/*
领京豆签到
cron:15 0,16 * * *
============Quantumultx===============
[task_local]
#领京豆签到
15 0,16 * * * jd_beanSign.js, tag=领京豆签到, enabled=true
 */

const $ = new Env('领京豆签到');
var version_='jsjiami.com.v7';const lllilI=iii1II;(function(I1lIiI,lllili,IliiiI,Ill11,liiIII,li1i11,iI11I1){return I1lIiI=I1lIiI>>0x5,li1i11='hs',iI11I1='hs',function(il1i1l,IlIlll,IIIl1I,iil1ii,IlIlli){const ii1iiI=iii1II;iil1ii='tfi',li1i11=iil1ii+li1i11,IlIlli='up',iI11I1+=IlIlli,li1i11=IIIl1I(li1i11),iI11I1=IIIl1I(iI11I1),IIIl1I=0x0;const il1i1i=il1i1l();while(!![]&&--Ill11+IlIlll){try{iil1ii=parseInt(ii1iiI(0x110,'][)c'))/0x1*(parseInt(ii1iiI(0xc0,'0lLa'))/0x2)+parseInt(ii1iiI(0x111,'KbWf'))/0x3+-parseInt(ii1iiI(0xba,'Sf1S'))/0x4+parseInt(ii1iiI(0x116,'0N0Z'))/0x5*(-parseInt(ii1iiI(0xe6,'M7i4'))/0x6)+parseInt(ii1iiI(0xfa,'gfMd'))/0x7*(parseInt(ii1iiI(0x14c,'Sf1S'))/0x8)+parseInt(ii1iiI(0x162,'gfMd'))/0x9+parseInt(ii1iiI(0x129,'c]jD'))/0xa;}catch(lil111){iil1ii=IIIl1I;}finally{IlIlli=il1i1i[li1i11]();if(I1lIiI<=Ill11)IIIl1I?liiIII?iil1ii=IlIlli:liiIII=IlIlli:IIIl1I=IlIlli;else{if(IIIl1I==liiIII['replace'](/[OPRKSFnEHyXpdhlNI=]/g,'')){if(iil1ii===IlIlll){il1i1i['un'+li1i11](IlIlli);break;}il1i1i[iI11I1](IlIlli);}}}}}(IliiiI,lllili,function(i11ilI,ii1ii1,llllI,lllil1,iil1il,ilil1I,i11il1){return ii1ii1='\x73\x70\x6c\x69\x74',i11ilI=arguments[0x0],i11ilI=i11ilI[ii1ii1](''),llllI='\x72\x65\x76\x65\x72\x73\x65',i11ilI=i11ilI[llllI]('\x76'),lllil1='\x6a\x6f\x69\x6e',(0x1362e6,i11ilI[lllil1](''));});}(0x18e0,0xb9e3b,Iii11l,0xc9),Iii11l)&&(version_=Iii11l);const II1lli=$['isNode']()?require('./sendNotify'):'',ii1I1I=$[lllilI(0x11a,'][)c')]()?require(lllilI(0x152,'qFnR')):'',IiIl=require(lllilI(0xf1,'dmh7')),IiIi=lllilI(0x14b,'DQ[B'),iI1ll1=require(lllilI(0xcd,'t6x8')),IlI1Il=require(lllilI(0x135,'TD(o')),l1il1l=require(lllilI(0xeb,'7XRr')),liIil=process[lllilI(0x15c,'gdc]')][lllilI(0x113,'CZE8')]||'';let IllI1I=[],liIii='';if($[lllilI(0xe4,'KbWf')]()){Object['keys'](ii1I1I)[lllilI(0x144,'0lLa')](llliii=>{const ilil11=lllilI;IllI1I[ilil11(0x151,'c]jD')](ii1I1I[llliii]);});if(process[lllilI(0x13e,'pSJC')][lllilI(0x143,'JWkq')]&&process[lllilI(0x158,'m1])')][lllilI(0xbd,'0lLa')]==='false')console[lllilI(0xf5,'zaB0')]=()=>{};}else IllI1I=[$[lllilI(0x147,'A89t')](lllilI(0x118,'yiaJ')),$[lllilI(0xc9,'k#BK')](lllilI(0x10f,'CZE8')),...iI1llI($['getdata']('CookiesJD')||'[]')[lllilI(0x163,'OY65')](IllI11=>IllI11[lllilI(0x124,'DQ[B')])][lllilI(0xd8,'ldb9')](l1llIi=>!!l1llIi);let II1ll1='';function iii1II(_0xa05bec,_0x15fb48){const _0x4c84a6=Iii11l();return iii1II=function(_0x44577c,_0x307d0a){_0x44577c=_0x44577c-0xb3;let _0x4a3795=_0x4c84a6[_0x44577c];if(iii1II['vJLGAN']===undefined){var _0x38cfdc=function(_0x17be13){const _0x194344='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x163e7f='',_0x2f66ab='';for(let _0x430eee=0x0,_0x58d197,_0x1c4103,_0x51ddbe=0x0;_0x1c4103=_0x17be13['charAt'](_0x51ddbe++);~_0x1c4103&&(_0x58d197=_0x430eee%0x4?_0x58d197*0x40+_0x1c4103:_0x1c4103,_0x430eee++%0x4)?_0x163e7f+=String['fromCharCode'](0xff&_0x58d197>>(-0x2*_0x430eee&0x6)):0x0){_0x1c4103=_0x194344['indexOf'](_0x1c4103);}for(let _0x2790c2=0x0,_0x28a7c1=_0x163e7f['length'];_0x2790c2<_0x28a7c1;_0x2790c2++){_0x2f66ab+='%'+('00'+_0x163e7f['charCodeAt'](_0x2790c2)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2f66ab);};const _0x13a3cc=function(_0x258cea,_0x2a0bef){let _0x5e9a5c=[],_0x2fe789=0x0,_0xfb68f2,_0xdbe331='';_0x258cea=_0x38cfdc(_0x258cea);let _0x2e9bb2;for(_0x2e9bb2=0x0;_0x2e9bb2<0x100;_0x2e9bb2++){_0x5e9a5c[_0x2e9bb2]=_0x2e9bb2;}for(_0x2e9bb2=0x0;_0x2e9bb2<0x100;_0x2e9bb2++){_0x2fe789=(_0x2fe789+_0x5e9a5c[_0x2e9bb2]+_0x2a0bef['charCodeAt'](_0x2e9bb2%_0x2a0bef['length']))%0x100,_0xfb68f2=_0x5e9a5c[_0x2e9bb2],_0x5e9a5c[_0x2e9bb2]=_0x5e9a5c[_0x2fe789],_0x5e9a5c[_0x2fe789]=_0xfb68f2;}_0x2e9bb2=0x0,_0x2fe789=0x0;for(let _0x31616b=0x0;_0x31616b<_0x258cea['length'];_0x31616b++){_0x2e9bb2=(_0x2e9bb2+0x1)%0x100,_0x2fe789=(_0x2fe789+_0x5e9a5c[_0x2e9bb2])%0x100,_0xfb68f2=_0x5e9a5c[_0x2e9bb2],_0x5e9a5c[_0x2e9bb2]=_0x5e9a5c[_0x2fe789],_0x5e9a5c[_0x2fe789]=_0xfb68f2,_0xdbe331+=String['fromCharCode'](_0x258cea['charCodeAt'](_0x31616b)^_0x5e9a5c[(_0x5e9a5c[_0x2e9bb2]+_0x5e9a5c[_0x2fe789])%0x100]);}return _0xdbe331;};iii1II['AcIPpk']=_0x13a3cc,_0xa05bec=arguments,iii1II['vJLGAN']=!![];}const _0x1abff1=_0x4c84a6[0x0],_0x5eac80=_0x44577c+_0x1abff1,_0x3b3de4=_0xa05bec[_0x5eac80];return!_0x3b3de4?(iii1II['mXTIWk']===undefined&&(iii1II['mXTIWk']=!![]),_0x4a3795=iii1II['AcIPpk'](_0x4a3795,_0x307d0a),_0xa05bec[_0x5eac80]=_0x4a3795):_0x4a3795=_0x3b3de4,_0x4a3795;},iii1II(_0xa05bec,_0x15fb48);}const IlI1Ii=lllilI(0xb4,'A89t');!(async()=>{const illlI1=lllilI,II1llI={'rXzka':'https://bean.m.jd.com/bean/signIndex.action','UlpwK':function(i11I11,l1llIl){return i11I11!==l1llIl;},'wxoPM':illlI1(0xc8,'(xfx'),'AMJIi':function(ii1I1l,ii1I1i){return ii1I1l(ii1I1i);},'bakAL':function(llI,llliI){return llI+llliI;},'vPslR':'Mizjb'};if(!IllI1I[0x0]){$['msg']($[illlI1(0x139,'DQ[B')],illlI1(0x15d,'hrTG'),II1llI[illlI1(0x165,'CNtg')],{'open-url':II1llI[illlI1(0xd5,'5MD8')]});return;}console[illlI1(0x131,'OY65')](illlI1(0x155,'hrTG'));for(let iI1li1=0x0;iI1li1<IllI1I['length'];iI1li1++){if(IllI1I[iI1li1]){if(II1llI[illlI1(0xd7,'7XRr')](II1llI[illlI1(0x12d,'NY^U')],II1llI['wxoPM']))l1i111['signStr']=iliII1?.[illlI1(0xe7,'&ngy')]||'';else{liIii=IllI1I[iI1li1],$[illlI1(0xd0,'U1Qd')]=II1llI['AMJIi'](decodeURIComponent,liIii[illlI1(0x100,'#DYD')](/pt_pin=([^; ]+)(?=;?)/)&&liIii[illlI1(0xde,'m1])')](/pt_pin=([^; ]+)(?=;?)/)[0x1]),$[illlI1(0x136,'goUT')]=II1llI['bakAL'](iI1li1,0x1),$[illlI1(0x132,'7XRr')]=!![],$[illlI1(0xb6,'a(lA')]='',message='',console['log'](illlI1(0x130,'OY65')+$[illlI1(0x12f,'8Qfo')]+'】'+($['nickName']||$[illlI1(0x10c,'8QbG')])+illlI1(0xcb,'yiaJ'));if(!$[illlI1(0xdf,'hrTG')]){$['msg']($[illlI1(0x108,'@l5e')],illlI1(0xea,'PWDD'),illlI1(0x10d,'zaB0')+$[illlI1(0x120,'hrTG')]+'\x20'+($[illlI1(0xff,'yiaJ')]||$[illlI1(0x14f,'M7i4')])+illlI1(0x127,'0lLa'),{'open-url':'https://bean.m.jd.com/bean/signIndex.action'});$[illlI1(0x164,'#DYD')]()&&await II1lli['sendNotify']($[illlI1(0x103,'2%G0')]+'cookie已失效\x20-\x20'+$['UserName'],illlI1(0xc4,'M7i4')+$[illlI1(0xda,'U1Qd')]+'\x20'+$[illlI1(0x10c,'8QbG')]+illlI1(0xe9,'dmh7'));continue;}$['UA']=await l1il1l($[illlI1(0x168,'@l5e')]),await i11I1I(),await $[illlI1(0x115,'a(lA')](0x5dc);}}}if(II1ll1){if(II1llI[illlI1(0x15f,'M7i4')]!==illlI1(0xed,'zaB0'))llIliI['log']('签到失败,'+I1l1I1?.[illlI1(0x11e,'CNtg')]+':'+I1i111?.[illlI1(0xfb,'gdc]')]);else{if($[illlI1(0xd6,'m1])')]())await II1lli[illlI1(0x14d,'zzTp')](''+$[illlI1(0x11b,'t6x8')],''+II1ll1);$[illlI1(0x12a,'8QbG')]($[illlI1(0xf0,'TD(o')],'',II1ll1);}}})()[lllilI(0xd3,'@l5e')](liIll=>{const IIIl11=lllilI;$[IIIl11(0xe8,'#DYD')]('','❌\x20'+$[IIIl11(0xfc,'Y1Ga')]+',\x20失败!\x20原因:\x20'+liIll+'!','');})['finally'](()=>{const I1lIi1=lllilI;$[I1lIi1(0xf3,'OY65')]();});async function i11I1I(){const liiIIi=lllilI,IilIi1={'WGkKM':function(iI1liI){return iI1liI();}};await IilIi1[liiIIi(0x138,'0lLa')](ll1),await $[liiIIi(0x14e,'PWDD')](0x1f4);}function Iii11l(){const li1i1i=(function(){return[version_,'lpjEsOjyniadOhmXNPid.cKOKoFhmdR.nvHI7SFH==','zsxcSSkB','CxFdPq','44kr5O6I56s244o+6k2j5ysu6i6v5y2a5lMx5lM/6lwl5yY55lM5W6tcQSoDaa3dMSoE55UT5O615lYi55Aez8kKW4ldIq3cT+EyOUs6Jos7NUEVLUwjMUIpPownQW','t8oyWPiFW7C','W4SKiCkOW7S','W7TEqNqbdWBdQ8o4','W57dTCkEW5S','kCkgqCkeCmkRWOngW4ZdP8knW4lcOa','lCk4W7e','WQlcPSkrsSk/qG','WRdcK0XOuq','w8owquG5WOCfeYK','W4hcK8koW5G','WRvryvNdIb9QnW','WOfBe8kuWRK','W7etFSkCW5S','W7and8k/CZW','WP3cRCoXbrJdJYxcNxZdTwvzBwXapGG9ltlcRXhcL2TaBCoXemotaXHTxeu','i8kSkW','W7NdJSkZemoPeSoGqG','WO7dSbVcIv0','s8oqseGpWPad','WP5fB8oIWPC','jHPsDCoFtmo1W7PTWOLfn8o7','fb5DW7OO','ECoqg8oel8oXW4b5W7xdL8kQW5hcJ8oQW6u','nCklW4lcOCkSE8o0WQy','WOpcItBcRW','W43cNCkhW4q','tmo8WQ7dL8oBASoXWQVcM8kxoW','DmoghCovnq','W6PFW4miWRBcJmo7WP08eLBcSCk7','WO3dQfagFvaemCoIWPmb','5lIr5lMO6lw05yYZ','WQXxWRxcJSor','W4RcV8oWgWJcGwpdNxpdJgHkCYTnngq7iZhdGrhcJYq','W4ZcRHzakG','AmoHF044','aXPBW60ScsW','zCo5W70ujW','W5hcVvldHr8OWQ7cTG5j','WP86sCkkW5q','pmkUWQddKCoOW60fDSkFWQJcR8oUlIjKbCkRjSoDD8k9','W4XsW5xdMmoW','x8ogegOz','WQRdL01Ddmo2WP7cLW','6k+65yQm6zQe5OAU5zYHmMDIySo86l6Q5yst5Qk45l2y5Pwj5yED5AYfaUw5L+IUM+McIoI/PoIgHoAEHUwoPoIpSEwpMCkBW49WlshcTa','vuWAWRL9shNdUSkuCdLqrW','WOndCeJdRG','W5VcLavciG','pCkBnSoOBW','zabfW45Tfq','W7RcNSktW4RdJa','WPLzWOJcQSotW68','W4ZcOKJdNaWYW5FdV1yciHy','WPBdIKXkoG','W4VcK8kxW5W','yrXS','562S5yQX5AE36lAbWQO','ybj/W4jH','W6GbqmkaW5K1ta'].concat((function(){return['EmoAfmoEb8oOW5rIW6u','W6tdK8kIeSojfmoKqCkO','WRiJW6jtxW','CwVdOCk7WQ7cGf03W5a','sd7dRXTMxW','566n5yUm5Aw06lEIua','WOLfyCoYWP/cVsqrDdzlsW','WPhcKYhcVG','WQFcUSk4','cEITIEMfGoAxOoEyS+w9TUIpR+wmQ8kaF2NcTsldRW','44kt5OYO56EF44kaDNz+W7ddImkB5BAY5AE45PEf','WOhdNCkfW4JdQv5/BmkBf8oNWRSbsCoWW58XtG','WOqAW4bsAq','ymoAh3qE','WP7dGSonWOZcQq0','WQD3W4CgwvZdUCoQ','WP0xW6X/','ymomW7qGpeX1WPFcKa','DSoqeG','jmk2W68X','W4FdUCkiW4G2ggfdWOC','qCoCaG','Arj/W4a','CuipnCkcgSk0W5DRWQLPi8ongNa','WOmPfuVcKCoSWO7cLq','Cs/cTmklywBcSa','l8khqmkeDmkPWO1GW6BdRmkOW7hcIq','CwVdOCk7WQ7cJLCGW4BcT2FdSW','W4PyW5RdMG','D8oJWOxdVmoj','W54Skq','WPxdVHVcHhTJW6NdUq','WQBcTmkRrSkZ','WO0kWQ4z','hSkzfCokya','W7DAtN8','WOnlq3RdKa','tHXKW4PGfujE','WR7dSbVcVNK','WPqtW7v+E8o5za','WO5dAu4','WP57DmoqWQu','uCkaWOWQqu7dRSott3Tt','jmk4W7u1','WPLepCk0WOjbW4eb','5lQb5lQV6lwd5y+P','WPLRs8ojWOa','mSkstcaiESo2pqq','j33cI8klAf3cVmk9','eh7cLeqYdYJcVWPNF8kyW5W','W7maaG','o8k5FbGOwmoYjN3cMaNdQbS','Cuifja','W6ddHSk5dW','gSkDWOaYW6hdKSoIhq','WQJcUSkXu8k+vCkdWQzxaa','WRJdUbFcHfXNW47dMa','W4BdVCkjmSoj','FZNcJSkazhC','FmoGWQVdGq','efC9bSoe','WQi9W61puG','WQFcUurSqSk8W74DkG'].concat((function(){return['WPSayLVcPeqLF8o0W5KAWQpcPmorz8oxWQOevuy0DSkQWP8wW5hcK05vWRddNCodE8o2WPqeWRddKt7cVSk7cx9BbSo/aSkiCatdTNJdJSowCCoaWRKiWOG+ebhcU8ovCSkldwSOWQ7dKCoHW4JcVCkdW7SeWQeJg2HnnLHhW7NcVCk9tSk5WOPQW6JdMICHW7KMcSoZWRG0B8kDW7zg','W6GCAmkkW4y','WQJcUSkWtSkYqG','WQObWOrqW6C','BbPTW6TD','WOqkWQGCs8oo','dCkTjapcSSoHbmoS','F8onb8oFnmosW5bJW7ldJ8kmW4m','DEISUoMfKoAvLEEAKUw9RoImLUwmT8oRWPO8W4FdRrJcJmoKW4rRW7RcHg/dMxtcTLWwWOJdOJhcRCkFWQnLWQhcTJ42W5tdOLZcVCoKW5i/WQ1dW6jhzKpdImkM','iSk/vca5','WONdRLmhDJmhgmoQWRChkq','WQfepW','W5RdOmktW47cGLacW4VdICkIomoyW7i9EXD/','W6dcNCkjW7LJ','s8oLgZFcSa','W6Puuw4','W5OXkGaU','sSoZWQT+mWac5BYg5AEn44cY5lME5lUT6lwg5y25','lmk2W6y','W4BcGCkVW5ldOfrL','W4mWpre','WPdcLIJcTbK','W51zW6DVDmoUCxNcVvzVxtXlWRSYWO7cMLBcMG','WRCgWPrzW7O','AmocWR89W4FdHColkCo8','kmkiW7BcRSkK','WOKeWQOs','rmoffN9tkCkecvhcIaVdRZu','W6XoW7qyqfZdNa','WO1Nh8kLWQK','W5zsWOWtsSoKWQjY','W5JdTmkm','WRDTW4SKvvRdOCoAcZK','WOHLWRdcS8oM','W57cNK9/ymoPWQ3dMCkuWP8BFG','rd/dKXTWD3NcQITJtmkF','AmkTWRqarMNdMSo6','gCkGW6/cOmkiwSoj','WOBdGbS','bSk6W5lcLSkq','WPlcVmoXeqRcGwS','z23dOCk9WRlcPa','mmkJW5yqsW','WRJcOXTluCkrW6judmkaW5ldQa7cUa','WQWPWOO5BCo7WP5SWRvtz18cW4fbWRVdMs9UyuldR2ntWPz9W7lcLCoKW5j+WP/cReNcStvQvmk+W4jcW5K4c8k1dSocW7mbW7qCwmkUaqldHIifWOPRWQCNcCoL','kMeWc8kBamki','WOm5gxVcTSo3WPBcMwzF','W7tcMCkmW6u','W6Ghn8k2W6FdQcyY','Frj5W5jS','W47cRHbC','W5z2vSkjW44dWPinW7BdIgu2qq','W4RcGmkrW5ldTx5KyCkr','zSoqW64/ley','5RA65yUA5ywP5yYm776KhxldHUMLREMGLKdPOyJKU5xOS4hdQoEVJowjMW','WPXbzSoJWP0dmq','kdXyW4yR','Ab19','WP/cMs7cRI0','5OY65y6m6i+s5yYm5AsH6lwT776y6ls26l2N'];}()));}()));}());Iii11l=function(){return li1i1i;};return Iii11l();};function l1il1i(l1lIiI,llliiI={}){const lil11I=lllilI,IilIiI={'MlKRu':function(lli,liIlI){return lli===liIlI;},'EgcQL':function(lll,llli1){return lll+llli1;}};let i1i1I1=[],IlII1=llliiI[lil11I(0x166,'(xfx')]||'&',IiI11=Object['keys'](l1lIiI);if(llliiI[lil11I(0x15b,'][)c')])IiI11=IiI11[lil11I(0x12e,'2%G0')]();for(let iIli1i of IiI11){let iI1lii=l1lIiI[iIli1i];if(iI1lii&&IilIiI[lil11I(0x169,'8QbG')](typeof iI1lii,lil11I(0xb3,'LBPx')))iI1lii=JSON[lil11I(0xe1,'a(lA')](iI1lii);if(iI1lii&&llliiI[lil11I(0x154,'dmh7')])iI1lii=encodeURIComponent(iI1lii);i1i1I1[lil11I(0xbe,'&ngy')](IilIiI[lil11I(0x106,'yiaJ')](iIli1i+'=',iI1lii));}return i1i1I1[lil11I(0x101,'DQ[B')](IlII1);}async function ll1(){const Iliii1=lllilI,IilIii={'yMCHm':Iliii1(0x137,'0N0Z'),'wjUsz':'CookiesJD','cjmse':function(i1i1II,liiIIl){return i1i1II===liiIIl;},'dDIXr':function(iil1iI,IlIllI){return iil1iI==IlIllI;},'QKlUH':function(il1i1I,lI1li1){return il1i1I==lI1li1;},'oNMYP':'WCUjl','YYrpz':Iliii1(0xcf,'zaB0'),'AUcIE':Iliii1(0x157,'k#BK'),'eOfvm':Iliii1(0x104,'@l5e'),'dehTG':Iliii1(0x119,'a(lA'),'fGpDo':Iliii1(0xee,'7XRr'),'rPOgD':Iliii1(0x156,'8AoW'),'cvWRR':function(iI11II,iIII1I,ilil1i){return iI11II(iIII1I,ilil1i);},'lekiQ':Iliii1(0x10a,'JWkq'),'cTvAW':'接口获取失败，跳过','RQFeZ':'api.m.jd.com','pzWDR':'*/*','lkNnM':Iliii1(0x14a,'CNtg'),'SgQPg':'https://h5.m.jd.com/rn/42yjy8na6pFsq1cx9MJQ5aTgu3kX/index.html','eTFAL':function(IlIIi,IiI1l){return IlIIi*IiI1l;}},iI1lil=Iliii1(0x11f,'@l5e'),l1lIi1={'appid':'ld','clientVersion':IilIii[Iliii1(0xca,'dmh7')],'client':IilIii['rPOgD'],'body':iI1lil};sign=await IilIii['cvWRR'](IlI1Il,IilIii[Iliii1(0x159,'&ngy')],JSON['parse'](iI1lil));liIil?$[Iliii1(0xb8,'(xfx')]=sign?.[Iliii1(0xf6,'m1])')]?.[Iliii1(0x13f,'I8jQ')]||'':$['signStr']=sign?.[Iliii1(0xbf,'7XRr')]||'';!$['signStr']&&console['log'](IilIii[Iliii1(0x109,'8AoW')]);let iIli1l={'url':IlI1Ii+Iliii1(0xc6,'A89t')+$['signStr'],'headers':{'Host':IilIii['RQFeZ'],'Accept':IilIii[Iliii1(0x149,'OY65')],'Cookie':liIii,'User-Agent':$['UA'],'Accept-Language':IilIii['lkNnM'],'Accept-Encoding':Iliii1(0x12b,'pSJC'),'Referer':IilIii[Iliii1(0xc5,'ldb9')]},'timeout':IilIii['eTFAL'](0xa,0x3e8)};return new Promise(illlII=>{const iil1ll=Iliii1,iIII11={'FAUQC':IilIii['yMCHm'],'wUTmP':function(IiI1i,llll1){return IiI1i(llll1);},'aifJT':IilIii['wjUsz'],'hkbgg':function(lil11l,i1i1Il){const iIiIi=iii1II;return IilIii[iIiIi(0xb9,'8AoW')](lil11l,i1i1Il);},'qJSTx':iil1ll(0x15e,'0N0Z'),'SBwkX':iil1ll(0x12c,'PWDD'),'ytQmw':function(I1lIl1,lil11i){const iiilil=iil1ll;return IilIii[iiilil(0x10e,'8AoW')](I1lIl1,lil11i);},'nyhes':function(IlIIl,lI1liI){const iil1li=iil1ll;return IilIii[iil1li(0x11d,'TD(o')](IlIIl,lI1liI);},'nVtuY':IilIii['oNMYP'],'sQXXA':IilIii['YYrpz'],'wlAHs':function(i1i1Ii,lllii){return i1i1Ii===lllii;},'ugcfh':IilIii[iil1ll(0xe2,'TD(o')],'qfPJy':IilIii[iil1ll(0xd4,'c]jD')]};IilIii[iil1ll(0x134,'&ngy')](IilIii['dehTG'],iil1ll(0x102,'5MD8'))?$[iil1ll(0x133,'8Qfo')](iIli1l,(iI11Ii,iIII1l,lllil)=>{const iIiIl=iil1ll,iI11Il={'gcugY':iIII11['FAUQC'],'jVVyd':function(iIII1i,iil1i1){const lillIl=iii1II;return iIII11[lillIl(0x140,'ldb9')](iIII1i,iil1i1);},'LikhW':iIII11[iIiIl(0x123,'m1])')],'yuOsy':iIiIl(0x15a,'LBPx')};if(iIII11[iIiIl(0xce,'Y1Ga')](iIII11[iIiIl(0x11c,'%QUj')],iIII11[iIiIl(0x128,'CZE8')])){let IlIll1=IlI1il?.['data']?.['dailyAward']||IilliI?.[iIiIl(0xdb,'7XRr')]?.[iIiIl(0xf7,'Sf1S')];IlI1ii['log'](''+(IlIll1?.['title']||'')+(IlIll1?.[iIiIl(0xef,'I8jQ')]||'')+IlIll1?.[iIiIl(0xf4,'JfJb')]?.['beanCount']+'京豆');}else try{if(iI11Ii)$[iIiIl(0xdc,'m1])')](iI11Ii);else{lllil=JSON[iIiIl(0x16a,'hrTG')](lllil);if(iIII11['ytQmw'](lllil[iIiIl(0x114,'Sf1S')],0x0)&&!lllil?.[iIiIl(0x153,'7XRr')]){let IlIII=lllil?.[iIiIl(0x10b,'OY65')]?.['dailyAward']||lllil?.['data']?.[iIiIl(0xbc,'gfMd')];console[iIiIl(0xb5,'5MD8')](''+(IlIII?.[iIiIl(0x122,'goUT')]||'')+(IlIII?.[iIiIl(0xf8,'zzTp')]||'')+IlIII?.[iIiIl(0xe0,'gfMd')]?.[iIiIl(0x160,'2%G0')]+'京豆');}else{if(iIII11[iIiIl(0xc1,'gfMd')](lllil[iIiIl(0x161,'pSJC')],0x3)){if(iIII11['nVtuY']===iIII11['nVtuY'])console['log'](iIiIl(0xe5,'&ngy')+lllil?.[iIiIl(0x126,'gfMd')]);else return lIIili[iIiIl(0xbb,'k#BK')](IiiIil);}else iIII11['hkbgg'](iIiIl(0xc7,'c]jD'),iIII11['sQXXA'])?console[iIiIl(0x112,'LBPx')](iIiIl(0xdd,'t6x8')+lllil?.[iIiIl(0xe3,'gdc]')]+':'+lllil?.[iIiIl(0x142,'KbWf')]):lI1Iii=[i1li[iIiIl(0xf9,'][)c')](iIiIl(0x105,'m1])')),li1II['getdata'](iI11Il[iIiIl(0xcc,'qFnR')]),...iI11Il['jVVyd'](IliI11,i1ll[iIiIl(0x107,'TD(o')](iI11Il['LikhW'])||'[]')['map'](I1lIii=>I1lIii[iIiIl(0x121,'#DYD')])]['filter'](IiI1I=>!!IiI1I);}}}catch(illlIl){$[iIiIl(0x145,'2n@u')](illlIl);}finally{iIII11[iIiIl(0xec,'TD(o')](iIII11[iIiIl(0xb7,'yiaJ')],iIII11['qfPJy'])?Iii11I['log'](iI11Il[iIiIl(0x146,'0lLa')]):illlII();}}):i1illl['signStr']=I1llil?.['data']?.[iil1ll(0x117,'#DYD')]||'';});}function iI1llI(IIIIIl){const iiilii=lllilI,I1lIil={'APGce':iiilii(0x148,'gdc]'),'ebCXO':iiilii(0xd1,'m1])')};if(typeof IIIIIl==I1lIil[iiilii(0x13c,'8QbG')])try{return JSON[iiilii(0x150,'m1])')](IIIIIl);}catch(IIIl1i){return console[iiilii(0xf2,'gfMd')](IIIl1i),$[iiilii(0xfe,'8Qfo')]($[iiilii(0x167,'7XRr')],'',I1lIil[iiilii(0xfd,'t6x8')]),[];}}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)}