/*
活动名称：常规店铺签到监控
活动链接：https://h5.m.jd.com/babelDiy/Zeus/2PAAf74aG3D61qvfKUM5dxUssJQ9/index.html?token=<token>
环境变量：jd_dpqd_single_token // 活动令牌，不支持多个
        jd_dpqd_account_threads // 控制账号并发线程数（正整数），默认1
        jd_dpqd_account_interval // 自定义运行间隔时长（整数，单位毫秒），默认1000
        jd_dpqd_max_retry // 签到火爆时的最大重试次数（整数），默认0
        jd_dpqd_notify // 是否推送通知信息（true/false），默认不推送

此脚本为高并发单一签到本，自动过滤垃圾活动，与另外3个本无任何关联可单独运行

cron:1 1 1 1 *

*/

const $ = new Env('常规店铺签到监控')
const _0x1668f4=_0x35fb;(function(_0x48d460,_0x1cf17c){const _0x525381=_0x35fb,_0x5eac9a=_0x48d460();while(!![]){try{const _0x4ac842=-parseInt(_0x525381(0x218,'JUi3'))/0x1*(-parseInt(_0x525381(0x30d,'lP4F'))/0x2)+parseInt(_0x525381(0x2f5,'BPbO'))/0x3+-parseInt(_0x525381(0x1fe,'XnuV'))/0x4*(-parseInt(_0x525381(0x1f7,'e6I('))/0x5)+parseInt(_0x525381(0x2c2,'i1P]'))/0x6+-parseInt(_0x525381(0x242,'[bp6'))/0x7*(parseInt(_0x525381(0x29e,'hE%a'))/0x8)+parseInt(_0x525381(0x225,'r3tO'))/0x9+-parseInt(_0x525381(0x2ba,'CI!z'))/0xa;if(_0x4ac842===_0x1cf17c)break;else _0x5eac9a['push'](_0x5eac9a['shift']());}catch(_0x1ce109){_0x5eac9a['push'](_0x5eac9a['shift']());}}}(_0x3d0b,0xb003e));const jdCookie=require('./jdCookie'),notify=require(_0x1668f4(0x2bc,'x0vQ')),common=require(_0x1668f4(0x2e4,'k7T@')),{H5st,jsTk}=require(_0x1668f4(0x2eb,'3TWU'));function _0x35fb(_0x2a00cf,_0x4f56ec){const _0x3d0b4e=_0x3d0b();return _0x35fb=function(_0x35fb0c,_0x392e59){_0x35fb0c=_0x35fb0c-0x1e0;let _0x595035=_0x3d0b4e[_0x35fb0c];if(_0x35fb['DJVwJt']===undefined){var _0x253ecc=function(_0x25d1ad){const _0x7233='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5166db='',_0x1c21a8='';for(let _0x52ccd8=0x0,_0x1b194d,_0xb871c7,_0x307fc0=0x0;_0xb871c7=_0x25d1ad['charAt'](_0x307fc0++);~_0xb871c7&&(_0x1b194d=_0x52ccd8%0x4?_0x1b194d*0x40+_0xb871c7:_0xb871c7,_0x52ccd8++%0x4)?_0x5166db+=String['fromCharCode'](0xff&_0x1b194d>>(-0x2*_0x52ccd8&0x6)):0x0){_0xb871c7=_0x7233['indexOf'](_0xb871c7);}for(let _0x57c08a=0x0,_0x4b6edb=_0x5166db['length'];_0x57c08a<_0x4b6edb;_0x57c08a++){_0x1c21a8+='%'+('00'+_0x5166db['charCodeAt'](_0x57c08a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1c21a8);};const _0x2dfd6c=function(_0x235c27,_0x32c534){let _0x61599d=[],_0x548e0c=0x0,_0x105663,_0x187d1c='';_0x235c27=_0x253ecc(_0x235c27);let _0x32a588;for(_0x32a588=0x0;_0x32a588<0x100;_0x32a588++){_0x61599d[_0x32a588]=_0x32a588;}for(_0x32a588=0x0;_0x32a588<0x100;_0x32a588++){_0x548e0c=(_0x548e0c+_0x61599d[_0x32a588]+_0x32c534['charCodeAt'](_0x32a588%_0x32c534['length']))%0x100,_0x105663=_0x61599d[_0x32a588],_0x61599d[_0x32a588]=_0x61599d[_0x548e0c],_0x61599d[_0x548e0c]=_0x105663;}_0x32a588=0x0,_0x548e0c=0x0;for(let _0x1c326f=0x0;_0x1c326f<_0x235c27['length'];_0x1c326f++){_0x32a588=(_0x32a588+0x1)%0x100,_0x548e0c=(_0x548e0c+_0x61599d[_0x32a588])%0x100,_0x105663=_0x61599d[_0x32a588],_0x61599d[_0x32a588]=_0x61599d[_0x548e0c],_0x61599d[_0x548e0c]=_0x105663,_0x187d1c+=String['fromCharCode'](_0x235c27['charCodeAt'](_0x1c326f)^_0x61599d[(_0x61599d[_0x32a588]+_0x61599d[_0x548e0c])%0x100]);}return _0x187d1c;};_0x35fb['jFaBGR']=_0x2dfd6c,_0x2a00cf=arguments,_0x35fb['DJVwJt']=!![];}const _0x172c9a=_0x3d0b4e[0x0],_0x450873=_0x35fb0c+_0x172c9a,_0x89bb64=_0x2a00cf[_0x450873];return!_0x89bb64?(_0x35fb['YwayLV']===undefined&&(_0x35fb['YwayLV']=!![]),_0x595035=_0x35fb['jFaBGR'](_0x595035,_0x392e59),_0x2a00cf[_0x450873]=_0x595035):_0x595035=_0x89bb64,_0x595035;},_0x35fb(_0x2a00cf,_0x4f56ec);}let token=process[_0x1668f4(0x202,'lP4F')][_0x1668f4(0x2be,'e6I(')]||'',accountThreads=process[_0x1668f4(0x228,'l73O')][_0x1668f4(0x2c1,'wOt%')]||'1';const runInterval=process[_0x1668f4(0x2aa,'rdsG')][_0x1668f4(0x311,'BPbO')]||_0x1668f4(0x22f,']02G');let signHotMaxRetryTimes=process[_0x1668f4(0x1fb,'VnPM')][_0x1668f4(0x23d,'EyPU')]||'0';const isNotify=process[_0x1668f4(0x2bd,'5[Jb')][_0x1668f4(0x23e,'8LKY')]===_0x1668f4(0x303,'i1P]'),activityUrl='https://h5.m.jd.com/babelDiy/Zeus/2PAAf74aG3D61qvfKUM5dxUssJQ9/index.html?token='+token,signStatusMessages={0x1805c007:_0x1668f4(0x272,'8LKY'),0x181688ea:_0x1668f4(0x2d5,'$Nh['),0x1843da61:_0x1668f4(0x21e,'l73O'),0x1843da62:_0x1668f4(0x214,'5[Jb'),0x184253c7:'账号无效',0x192:_0x1668f4(0x2b1,'UpQm'),'-1':_0x1668f4(0x2d1,'JUi3')},cookiesArr=Object[_0x1668f4(0x2cd,'BPbO')](jdCookie)[_0x1668f4(0x265,'RU3E')](_0x2dfd6c=>jdCookie[_0x2dfd6c])[_0x1668f4(0x25b,'^iW%')](_0x25d1ad=>_0x25d1ad);!cookiesArr[0x0]&&($[_0x1668f4(0x263,'PXtM')]($[_0x1668f4(0x23f,'EaYq')],_0x1668f4(0x2d7,'EyPU')),process[_0x1668f4(0x258,'@pGm')](0x1));!(async()=>{const _0x394fe9=_0x1668f4;try{console[_0x394fe9(0x287,'3TWU')](_0x394fe9(0x2e0,'6!E$')+$[_0x394fe9(0x1f9,'lP4F')]+_0x394fe9(0x2a0,'UpQm')),console['log'](_0x394fe9(0x2ab,'C1Zz')+token+']'),console['log'](_0x394fe9(0x292,'^iW%')+common['getProxyStatus']()+']'),console[_0x394fe9(0x230,'l73O')](_0x394fe9(0x20f,'$[!8')+runInterval/0x3e8+_0x394fe9(0x24d,'RU3E')),console[_0x394fe9(0x212,'g3jR')](_0x394fe9(0x2a5,'hE%a')+signHotMaxRetryTimes+']'),console['log'](_0x394fe9(0x209,'6!E$')+(isNotify?'开启':'关闭')+']'),console[_0x394fe9(0x29a,'r3tO')](_0x394fe9(0x270,'l73O')+$[_0x394fe9(0x21d,'Rloe')]+_0x394fe9(0x2c3,'^iW%')),console[_0x394fe9(0x212,'g3jR')](''),notify[_0x394fe9(0x2ef,'rdsG')]({'title':$[_0x394fe9(0x1f9,'lP4F')]});if(!token){console[_0x394fe9(0x249,'PXtM')](_0x394fe9(0x2fb,'NfI0'));return;}$['waitTime']=null;if(runInterval)try{const _0x7233=parseInt(runInterval);_0x7233>=0x0&&($[_0x394fe9(0x2ec,'%ju5')]=_0x7233);}catch{console[_0x394fe9(0x230,'l73O')](_0x394fe9(0x248,'NfI0'));}try{const _0x5166db=parseInt(signHotMaxRetryTimes);signHotMaxRetryTimes=_0x5166db>0x0?_0x5166db:0x0;}catch{signHotMaxRetryTimes=0x3;}try{const _0x1c21a8=parseInt(accountThreads);_0x1c21a8>0x0&&_0x1c21a8!==0x1&&(accountThreads=_0x1c21a8);}catch{accountThreads=0x1;}await Main(),isNotify&&notify[_0x394fe9(0x22d,'aCZy')]()&&await notify[_0x394fe9(0x213,'JUi3')]();}catch(_0x52ccd8){console[_0x394fe9(0x2c9,'e6I(')]('❌\x20脚本运行遇到了错误\x0a'+_0x52ccd8);}})()[_0x1668f4(0x226,'XnuV')](_0x1b194d=>$[_0x1668f4(0x29b,'$Nh[')](_0x1b194d))[_0x1668f4(0x254,'CI!z')](()=>$[_0x1668f4(0x2c0,'ieEV')]());async function Main(){const _0x199b8e=_0x1668f4;let _0xb871c7=!![];token[_0x199b8e(0x279,'KKjw')](':')&&token[_0x199b8e(0x296,'k7T@')](':')['length']===0x3&&(token=token[_0x199b8e(0x27c,'XnuV')](':')[0x0]);if(token['length']!==0x20||!/^[A-Z0-9]*$/['test'](token)){console[_0x199b8e(0x23c,'x^o7')](_0x199b8e(0x250,'6!E$'));return;}$[_0x199b8e(0x26e,'aCZy')]=token,$['UA']=common[_0x199b8e(0x268,'$Nh[')](_0x199b8e(0x298,'k7T@')),{jsToken:$[_0x199b8e(0x278,'x^o7')]}=await jsTk($['UA'],'https://h5.m.jd.com/babelDiy/Zeus/2PAAf74aG3D61qvfKUM5dxUssJQ9/index.html',{'bizId':'SJHT-DPQDH5','v':_0x199b8e(0x307,'$nfq'),'qs':_0x199b8e(0x274,'ieEV')+$['token']});let _0x307fc0=0x0;$[_0x199b8e(0x234,'6!E$')]='',$[_0x199b8e(0x215,'EaYq')]=![];const _0x57c08a=0xa;while(!$[_0x199b8e(0x2de,'lP4F')]&&_0x307fc0<_0x57c08a&&!$[_0x199b8e(0x2a1,'$Nh[')]){$[_0x199b8e(0x27d,'EyPU')]='',await sendRequest(_0x199b8e(0x2ac,'aCZy')),await $[_0x199b8e(0x21b,'RU3E')](0x3e8),_0x307fc0++,_0x307fc0===_0x57c08a&&(console[_0x199b8e(0x1e3,'$nfq')]($[_0x199b8e(0x1fc,'$nfq')]||_0x199b8e(0x2cb,'A3YJ')),$[_0x199b8e(0x28e,'hE%a')]='');}if(!$['getActivityInfo'])return;$[_0x199b8e(0x2c7,'@pGm')]=$[_0x199b8e(0x23b,'RU3E')][_0x199b8e(0x264,'Rloe')],$['activityId']=$[_0x199b8e(0x29c,'r3tO')]['id'];if(!$[_0x199b8e(0x30a,'r3tO')]||!$['activityId']||$[_0x199b8e(0x294,'NfI0')])return;const _0x4b6edb=$[_0x199b8e(0x205,'e6I(')][_0x199b8e(0x24a,'wOt%')],_0x235c27=$[_0x199b8e(0x2f7,'C1Zz')][_0x199b8e(0x2b0,'hE%a')]||[],_0x32c534=$[_0x199b8e(0x201,'hE%a')][_0x199b8e(0x27e,'KxnF')]||[],_0x61599d=$[_0x199b8e(0x238,'2Bvq')][_0x199b8e(0x203,'k7T@')],_0x548e0c=$[_0x199b8e(0x26a,'^nPC')]['endTime'],_0x105663=$[_0x199b8e(0x2d9,'ieEV')](_0x199b8e(0x20e,'hE%a'),_0x61599d),_0x187d1c=$[_0x199b8e(0x26b,'lP4F')]('yyyy-MM-dd\x20HH:mm',_0x548e0c);let _0x32a588=![];const _0x1c326f=[],_0x1b6d31=[..._0x32c534,..._0x235c27];for(const _0x24b2eb of _0x1b6d31){const _0x386ef8=_0x24b2eb[_0x199b8e(0x22e,'rdsG')],_0x5afd9e=_0x24b2eb[_0x199b8e(0x2cc,')!a(')]||[],_0x36373a=[];for(const _0x4e9834 of _0x5afd9e){let _0x16e2a3='';const _0x369605=_0x4e9834[_0x199b8e(0x233,'RU3E')],_0x2b96cd=_0x4e9834[_0x199b8e(0x2db,'KKjw')],_0x2de9d6=_0x4e9834['number'],_0x43210d=_0x4e9834[_0x199b8e(0x2f0,'r3tO')],_0x4a5dda=_0x43210d===0x5;switch(_0x2b96cd){case 0x1:_0x16e2a3=_0x199b8e(0x288,'$[!8');break;case 0x4:_0x16e2a3=_0x369605+'京豆';break;case 0x6:_0x16e2a3=_0x369605+_0x199b8e(0x2c4,'e6I(');break;case 0x9:_0x16e2a3=''+_0x4e9834?.[_0x199b8e(0x28d,'6!E$')][0x0]?.[_0x199b8e(0x260,'lP4F')];break;case 0xa:_0x16e2a3=_0x369605+'元E卡';break;case 0xe:_0x16e2a3=_0x369605/0x64+_0x199b8e(0x305,'rdsG');break;default:_0x16e2a3=_0x199b8e(0x256,'hE%a')+_0x2b96cd+'）';}if(![0x1,0x6][_0x199b8e(0x309,']02G')](_0x2b96cd)&&!_0x4a5dda)_0x32a588=!![];_0x36373a['push'](_0x16e2a3+'（共'+_0x2de9d6+'份'+(_0x4a5dda?_0x199b8e(0x252,'i1P]'):'')+'）');}_0x1c326f['push']({'days':_0x386ef8,'prize':_0x36373a,'havePrize':_0x32a588});}const _0x36eb8a=await common['getShopName']({'venderId':$['venderId']});console[_0x199b8e(0x24b,'BPbO')]((_0x36eb8a?_0x199b8e(0x271,'wOt%')+_0x36eb8a+'\x0a':'')+_0x199b8e(0x232,'hE%a')+_0x105663+_0x199b8e(0x2f8,']02G')+_0x187d1c),notify[_0x199b8e(0x1e6,'hE%a')]((_0x36eb8a?_0x199b8e(0x244,'$Nh[')+_0x36eb8a:'')+_0x199b8e(0x20a,')!a(')+_0x105663+_0x199b8e(0x22b,'y3RL')+_0x187d1c);_0x1c326f['length']>0x0&&(console[_0x199b8e(0x1f5,'$Nh[')](_0x1c326f[_0x199b8e(0x2e9,'EaYq')](_0x310496=>(_0x310496[_0x199b8e(0x286,'C1Zz')]===0x0?_0x199b8e(0x235,'CI!z'):'连续'+(_0x310496[_0x199b8e(0x30f,'ieEV')]<0xa?'\x20':'')+_0x310496[_0x199b8e(0x30c,'BPbO')]+'天')+'：'+_0x310496[_0x199b8e(0x1e8,'[bp6')]['join']('，'))[_0x199b8e(0x211,'Rloe')]('\x0a')),notify[_0x199b8e(0x30b,'JUi3')]('\x0a'+_0x1c326f[_0x199b8e(0x221,'@pGm')](_0x55ae8f=>'【'+(_0x55ae8f[_0x199b8e(0x302,'$nfq')]===0x0?'每日签到':'连续'+(_0x55ae8f['days']<0xa?'\x20':'')+_0x55ae8f[_0x199b8e(0x2b6,'r3tO')]+'天')+'】'+_0x55ae8f['prize'][_0x199b8e(0x2e8,'aCZy')]('，'))[_0x199b8e(0x293,'JUi3')]('\x0a')));console['log'](''),notify[_0x199b8e(0x2fc,'%ju5')]('\x0a\x0a'+activityUrl);const _0x58a6a2=Date[_0x199b8e(0x2bf,'BPbO')]();_0x61599d&&_0x58a6a2<_0x61599d&&(console[_0x199b8e(0x231,'x0vQ')]('活动将在\x20'+_0x105663+'\x20开始，晚点再来吧~\x0a'),_0xb871c7=![]);if(_0x548e0c&&_0x58a6a2>_0x548e0c)console[_0x199b8e(0x224,'RU3E')]('活动已于\x20'+_0x187d1c+_0x199b8e(0x1f1,'3TWU')),_0xb871c7=![];else _0x4b6edb===0x3&&(console[_0x199b8e(0x290,'jAdR')](_0x199b8e(0x247,'PXtM')),_0xb871c7=![]);!_0x32a588&&(_0xb871c7=![]);_0x1c326f['length']>0x0&&($[_0x199b8e(0x2ea,'3TWU')]=_0x1c326f[0x0]['days'],$[_0x199b8e(0x1fd,'$[!8')]=_0x1c326f[_0x1c326f[_0x199b8e(0x2e6,'3TWU')]-0x1]['days']);if(!_0xb871c7)return;await common['concTask'](accountThreads,cookiesArr,async(_0x24cf61,_0x5485b8)=>{const _0x14452b=_0x199b8e;await concMain(_0x24cf61,_0x5485b8);if($[_0x14452b(0x257,'A3YJ')])await $[_0x14452b(0x2b9,'g3jR')]($[_0x14452b(0x2ae,'PXtM')]);});}async function concMain(_0x5b8553,_0x3231c1){const _0x2bfebb=_0x1668f4;if($['runEnd'])return{'runEnd':!![]};const _0x55a151=decodeURIComponent(common[_0x2bfebb(0x2dd,'2Bvq')](_0x5b8553,'pt_pin')),_0x1d44a1=_0x2bfebb(0x301,'2Bvq')+_0x3231c1+'】'+_0x55a151+'：',_0x1962bf=notify[_0x2bfebb(0x2d3,'KxnF')](_0x3231c1,_0x55a151),_0x4586d5=await common[_0x2bfebb(0x1f8,'RU3E')](_0x5b8553);if(!_0x4586d5&&typeof _0x4586d5===_0x2bfebb(0x239,'Rloe')){console[_0x2bfebb(0x227,'NfI0')](_0x1d44a1+_0x2bfebb(0x245,')!a(')),_0x1962bf[_0x2bfebb(0x222,'CI!z')](_0x2bfebb(0x26d,'%ju5'));return;}const _0x52be19=common[_0x2bfebb(0x2a2,']02G')](_0x55a151),{jsToken:_0x3af01c}=await jsTk(_0x52be19,_0x2bfebb(0x25c,'KxnF'),{'bizId':_0x2bfebb(0x2ca,'$[!8'),'v':_0x2bfebb(0x2d8,'JUi3'),'qs':_0x2bfebb(0x246,'wOt%')+$[_0x2bfebb(0x2ad,'XnuV')]});if($[_0x2bfebb(0x297,'^iW%')])return{'runEnd':!![]};let _0x36a833='',_0x197b84=[],_0x515409=![];await _0x135fe5(_0x2bfebb(0x25d,'VnPM'));if($[_0x2bfebb(0x289,'EaYq')])await $[_0x2bfebb(0x2b9,'g3jR')]($['waitTime']);if(_0x515409&&signHotMaxRetryTimes>0x0){let _0x3860f3=0x0;while(_0x3860f3<signHotMaxRetryTimes){if($[_0x2bfebb(0x261,'$Nh[')])return{'runEnd':!![]};await _0x135fe5(_0x2bfebb(0x206,'8LKY'));if(!_0x515409)break;if($[_0x2bfebb(0x257,'A3YJ')])await $[_0x2bfebb(0x24e,'^nPC')]($[_0x2bfebb(0x20d,'6!E$')]);_0x3860f3++;}}if(_0x36a833){await _0x135fe5(_0x2bfebb(0x283,'5[Jb'));const _0x524810=''+_0x36a833+(_0x197b84[_0x2bfebb(0x25f,'l73O')]>0x0?'（'+_0x197b84[_0x2bfebb(0x1e0,'BPbO')]('，')+'）':'');console[_0x2bfebb(0x2e7,'k7T@')](''+_0x1d44a1+_0x524810),_0x1962bf[_0x2bfebb(0x222,'CI!z')](_0x524810[_0x2bfebb(0x216,'g3jR')]('✅','')['replace']('❌','')[_0x2bfebb(0x30e,'y3RL')]('🚫','')[_0x2bfebb(0x200,'t0W#')]());}function _0xfb39e3(_0x320916,_0x8d4b3c){const _0x257f42=_0x2bfebb;try{switch(_0x320916){case _0x257f42(0x1ec,'KxnF'):if(_0x8d4b3c['code']===0xc8&&_0x8d4b3c[_0x257f42(0x1ea,'EyPU')]===!![]){const _0x136835=[];if(_0x8d4b3c[_0x257f42(0x280,'JUi3')]&&_0x8d4b3c['data'][_0x257f42(0x26c,'t0W#')]>0x0)for(const _0x4834d1 of _0x8d4b3c['data']){const _0x23901d=_0x4834d1?.[_0x257f42(0x2b5,'C1Zz')]||[];for(const _0x3c868a of _0x23901d){const _0x223e59=_0x3c868a?.['type'],_0x553a48=_0x3c868a?.[_0x257f42(0x1ff,'$Nh[')];let _0xd9266f='';switch(_0x223e59){case 0x1:_0xd9266f=_0x257f42(0x281,'RU3E');break;case 0x4:_0xd9266f=_0x553a48+_0x257f42(0x237,'e6I(');break;case 0x6:_0xd9266f=_0x553a48+_0x257f42(0x219,'g3jR');break;case 0x9:_0xd9266f=(_0x3c868a?.[_0x257f42(0x20b,'$Nh[')][0x0]?.[_0x257f42(0x2f2,'rdsG')]||'未知')+'🎁';break;case 0xa:_0xd9266f=_0x553a48+'元E卡🎁';break;case 0xe:_0xd9266f=_0x553a48/0x64+_0x257f42(0x300,'e6I(');break;default:_0xd9266f=_0x257f42(0x21f,'EaYq')+_0x223e59+'）';}_0x136835[_0x257f42(0x26f,'$Nh[')](_0xd9266f);}}_0x36a833=_0x257f42(0x269,'A3YJ'),_0x136835[_0x257f42(0x306,'EyPU')]>0x0&&(_0x197b84=_0x136835),_0x515409=![];}else{if(_0x8d4b3c[_0x257f42(0x2f1,'rdsG')]!==0xc8){const _0x88da47=signStatusMessages[_0x8d4b3c['code']]||_0x8d4b3c['code']+_0x257f42(0x208,'XnuV');[0x1843da61,0x1843da62,0x192][_0x257f42(0x2a3,'PXtM')](_0x8d4b3c[_0x257f42(0x2b2,'g3jR')])&&($[_0x257f42(0x2e2,'BPbO')]=!![]),_0x197b84=[_0x88da47],_0x36a833=_0x257f42(0x28b,'r3tO'),(_0x8d4b3c[_0x257f42(0x2f1,'rdsG')]==='-1'||_0x8d4b3c[_0x257f42(0x1f4,')!a(')]===-0x1)&&(_0x515409=!![]);}else{if(_0x8d4b3c['msg']){_0x36a833=_0x257f42(0x275,'rdsG'),_0x197b84=[_0x8d4b3c[_0x257f42(0x223,'EyPU')]];if(!signStatusMessages[_0x8d4b3c[_0x257f42(0x29f,'KKjw')]])_0x515409=!![];}else _0x36a833=_0x257f42(0x1e5,'8LKY')+JSON['stringify'](_0x8d4b3c);}}break;case _0x257f42(0x2a6,'jAdR'):if(_0x8d4b3c['code']===0xc8&&_0x8d4b3c['success']===!![]&&_0x8d4b3c[_0x257f42(0x2f9,'l73O')]){const _0x1ba3fc=_0x8d4b3c[_0x257f42(0x282,'x!Zm')][_0x257f42(0x1f2,'PXtM')];_0x1ba3fc>0x0&&$[_0x257f42(0x24c,'[bp6')]&&(_0x197b84[_0x257f42(0x2ed,'aCZy')]('连签'+_0x1ba3fc+'天'),$[_0x257f42(0x2df,'RU3E')]&&_0x1ba3fc>=$['maxLevel']&&_0x197b84['push'](_0x257f42(0x262,'VnPM')));}else{if(_0x8d4b3c['msg']){}else console[_0x257f42(0x224,'RU3E')]('❓'+_0x320916+'\x20'+JSON['stringify'](_0x8d4b3c));}break;}}catch(_0x34cb0a){console[_0x257f42(0x2c6,'C1Zz')]('❌\x20未能正确处理\x20'+_0x320916+'\x20请求响应\x20'+(_0x34cb0a[_0x257f42(0x2f3,'e6I(')]||_0x34cb0a));}}async function _0x135fe5(_0x4192ca){const _0x2150a0=_0x2bfebb;let _0x568cf8='',_0x631256=null,_0x299bfa=null,_0x85b97d=_0x2150a0(0x220,'6!E$'),_0x4d7af7={},_0xf97c78={};switch(_0x4192ca){case _0x2150a0(0x2e3,'KKjw'):_0xf97c78={'appId':_0x2150a0(0x1f6,'r3tO'),'functionId':_0x2150a0(0x27f,'KxnF'),'appid':_0x2150a0(0x2c5,'6!E$'),'body':{'token':$['token'],'venderId':parseInt($[_0x2150a0(0x1fa,'NfI0')])||'','activityId':parseInt($[_0x2150a0(0x207,'2Bvq')])||'','type':0x38,'actionType':0x7},'version':_0x2150a0(0x310,'g3jR'),'ua':_0x52be19},_0x4d7af7=await H5st[_0x2150a0(0x2ff,'EaYq')](_0xf97c78),_0x568cf8='https://api.m.jd.com/api',_0x299bfa=Object[_0x2150a0(0x2b8,'x^o7')]({},_0x4d7af7['paramsData'],{'jsonp':_0x2150a0(0x2e5,'KxnF')});break;case _0x2150a0(0x273,'i1P]'):_0x568cf8=_0x2150a0(0x1ef,'%ju5'),_0x299bfa={'appid':_0x2150a0(0x2b7,'x!Zm'),'functionId':'interact_center_shopSign_getSignRecord','body':JSON[_0x2150a0(0x243,']02G')]({'token':$['token'],'venderId':parseInt($['venderId'])||'','activityId':parseInt($[_0x2150a0(0x1e7,'rdsG')])||'','type':0x38}),'jsonp':_0x2150a0(0x28a,'KKjw')};break;}const _0x4ce49d={'t':Math[_0x2150a0(0x259,'x!Zm')](Date[_0x2150a0(0x236,'KxnF')]()/0x3e8)+_0x2150a0(0x2a9,'CI!z'),'loginType':'2','x-api-eid-token':_0x3af01c};_0x631256&&Object[_0x2150a0(0x21c,'r3tO')](_0x631256,_0x4ce49d);_0x299bfa&&Object[_0x2150a0(0x2bb,'EaYq')](_0x299bfa,_0x4ce49d);const _0x43c387={'url':_0x568cf8,'method':_0x85b97d,'headers':{'Accept':_0x2150a0(0x2e1,'[bp6'),'Accept-Encoding':_0x2150a0(0x2a7,'%ju5'),'Accept-Language':_0x2150a0(0x308,'^iW%'),'Connection':_0x2150a0(0x25a,'EyPU'),'Content-Type':_0x2150a0(0x2ce,'wOt%'),'Host':_0x2150a0(0x217,']02G'),'Referer':activityUrl,'Sec-Fetch-Dest':_0x2150a0(0x1ee,'x!Zm'),'Sec-Fetch-Mode':_0x2150a0(0x24f,'jAdR'),'Sec-Fetch-Site':'same-origin','User-Agent':_0x52be19,'Cookie':_0x5b8553},'params':_0x299bfa,'data':_0x631256,'timeout':0x7530};_0x85b97d===_0x2150a0(0x2fa,'$Nh[')&&(delete _0x43c387[_0x2150a0(0x2c8,'$[!8')],delete _0x43c387[_0x2150a0(0x22c,'lP4F')][_0x2150a0(0x2f4,'EyPU')]);const _0x13a02b=0x3;let _0x477da5=0x0,_0x28138d=null,_0x12806e=![];while(_0x477da5<_0x13a02b){const _0x2316cd=await common['request'](_0x43c387);if(!_0x2316cd[_0x2150a0(0x29d,'lP4F')]){_0x28138d=_0x4192ca+'\x20➜\x20请求失败（'+_0x2316cd[_0x2150a0(0x21a,'k7T@')]+_0x2150a0(0x240,'e6I('),_0x477da5++;continue;}if(!_0x2316cd['data']){_0x28138d=_0x4192ca+_0x2150a0(0x255,'jAdR'),_0x477da5++;continue;}_0xfb39e3(_0x4192ca,_0x2316cd[_0x2150a0(0x2f6,'ieEV')]),_0x12806e=![];break;}_0x477da5>=_0x13a02b&&(console[_0x2150a0(0x212,'g3jR')](_0x28138d),_0x12806e&&($[_0x2150a0(0x2dc,'C1Zz')]=!![]));}}async function handleResponse(_0x53c31a,_0xbd9faf){const _0x59ca1c=_0x1668f4;try{switch(_0x53c31a){case'getActivityInfo':if(_0xbd9faf[_0x59ca1c(0x299,'C1Zz')]===0xc8&&_0xbd9faf[_0x59ca1c(0x277,'RU3E')]===!![]&&_0xbd9faf[_0x59ca1c(0x27b,'lP4F')])$[_0x59ca1c(0x1e9,'CI!z')]=_0xbd9faf[_0x59ca1c(0x204,'EaYq')];else _0xbd9faf['msg']?(console[_0x59ca1c(0x2fe,'JUi3')]('🚫\x20查询活动信息失败\x20➜\x20'+_0xbd9faf[_0x59ca1c(0x1e4,'x^o7')]),$['invalidAct']=!![]):(console[_0x59ca1c(0x25e,'XnuV')]('❓'+_0x53c31a+'\x20'+JSON[_0x59ca1c(0x27a,'C1Zz')](_0xbd9faf)),$[_0x59ca1c(0x2da,'$[!8')]=!![]);break;}}catch(_0x45cb6b){console[_0x59ca1c(0x2c9,'e6I(')](_0x59ca1c(0x291,'EaYq')+_0x53c31a+'\x20请求响应\x20'+(_0x45cb6b[_0x59ca1c(0x2fd,'BPbO')]||_0x45cb6b));}}async function sendRequest(_0x3e00db){const _0xe96d90=_0x1668f4;if($[_0xe96d90(0x1f3,'NfI0')])return;let _0xdf3148='',_0x27af28=null,_0x1b8d65=null,_0x17fbc0=_0xe96d90(0x220,'6!E$'),_0x791ca3={},_0xe839e7={};switch(_0x3e00db){case _0xe96d90(0x234,'6!E$'):_0xe839e7={'appId':_0xe96d90(0x267,'t0W#'),'functionId':_0xe96d90(0x2d4,'^nPC'),'appid':_0xe96d90(0x28f,'C1Zz'),'body':{'token':$['token'],'venderId':''},'version':_0xe96d90(0x2b4,'^nPC'),'ua':$['UA']},_0x791ca3=await H5st[_0xe96d90(0x210,'k7T@')](_0xe839e7),_0xdf3148='https://api.m.jd.com/api',_0x1b8d65=Object['assign']({},_0x791ca3['paramsData'],{'jsonp':_0xe96d90(0x241,'ieEV')});break;default:console[_0xe96d90(0x2e7,'k7T@')](_0xe96d90(0x266,'Rloe')+_0x3e00db);return;}const _0x148c69={'t':Math['floor'](Date[_0xe96d90(0x1ed,'[bp6')]()/0x3e8)+_0xe96d90(0x2a8,'2Bvq'),'loginType':'2','x-api-eid-token':$[_0xe96d90(0x22a,'x!Zm')]};_0x27af28&&Object[_0xe96d90(0x1f0,'KxnF')](_0x27af28,_0x148c69);_0x1b8d65&&Object['assign'](_0x1b8d65,_0x148c69);const _0x59a8c3={'url':_0xdf3148,'method':_0x17fbc0,'headers':{'Accept':_0xe96d90(0x2a4,'k7T@'),'Accept-Encoding':_0xe96d90(0x2ee,'hE%a'),'Accept-Language':_0xe96d90(0x284,'KxnF'),'Connection':'keep-alive','Content-Type':_0xe96d90(0x304,'KKjw'),'Host':'api.m.jd.com','Referer':activityUrl,'Sec-Fetch-Dest':'script','Sec-Fetch-Mode':_0xe96d90(0x28c,'A3YJ'),'Sec-Fetch-Site':'same-origin','User-Agent':$['UA']},'params':_0x1b8d65,'data':_0x27af28,'timeout':0x7530,'httpsTlsOptions':common['useAppTls']()};_0x17fbc0===_0xe96d90(0x2cf,'KKjw')&&(delete _0x59a8c3[_0xe96d90(0x2b3,'XnuV')],delete _0x59a8c3[_0xe96d90(0x229,'RU3E')]['Content-Type']);const _0x399b93=0x1;let _0x2a0709=0x0,_0x32b38f=null,_0x8be8d3=null;while(_0x2a0709<_0x399b93){_0x2a0709>0x0&&await $[_0xe96d90(0x23a,'XnuV')](0x7d0);const _0x979d12=await common['request'](_0x59a8c3);if(!_0x979d12['success']){_0x8be8d3=_0x979d12[_0xe96d90(0x276,'t0W#')],_0x32b38f=_0xe96d90(0x295,'e6I(')+_0x3e00db+'\x20请求失败\x20➜\x20'+_0x979d12['error'],_0x2a0709++;continue;}if(!_0x979d12[_0xe96d90(0x2d2,'y3RL')]){_0x32b38f='🚫\x20'+_0x3e00db+'\x20请求失败\x20➜\x20无响应数据',_0x2a0709++;continue;}await handleResponse(_0x3e00db,_0x979d12[_0xe96d90(0x251,'lpX3')]),ipBlack=![];break;}_0x2a0709>=_0x399b93&&($[_0xe96d90(0x253,'y3RL')]=_0x32b38f,_0x8be8d3!==0x193&&console[_0xe96d90(0x25e,'XnuV')](_0x32b38f));}function _0x3d0b(){const _0x9da582=['fY5vD3vGD20','s8khCSk3dSo7W4ZdNmkw','hx5NW4Kjr8kaWPO','dCk9W5Ol','W5LjqSkRhCkCiZxcKCkSkmkcW45oW4m','lmojBW','psiGgSorW7uvW6KK','W6GxzCk2','o8oWuSoaW5dcGCkNWPNdPSoojNa1kIa','iu/dO8oaW5LokqVcUWzxlSksWONcIa','kMpdP1xdSmkYW5jJzrq','boA2IEwlRowNN+EaJ+EkJW','6ycp552/5O2K6yorWPJcPSo7','WOJJGQJLVPxLPihMLQ/PL43JG5G','ehLGW48uu8knWPRdQmkiuuZcVCkvWOKoWQG5oSkl','WQtdO2yfWPjnW6O','ySo7WQxcPmo2W6/dJuO','W4Dvt8ktu8kLb27cNmk8CCkdW6GsW4ee','6zAo6zUB5PEB6zwekJzj','ktm1imkqW5ii','D8ogy8oO','W7hcGSox','dJTffa','5RA45yQD5BsE57Mt57IF5P+f','W6uyz8k2vbRcHNWZFq','W6/cImoaqSo3m24','WPhdPxLPWOdcSSk5WOXxEbBcJq','r38etMhdJNJdUCkNW6FcVIu','5BIk6zcx56wF5yIO8lQVJ++4Ha','kYqZb8ox','umksWQdcOW','W4lcGc0NWQjE','C8oiz8oJ','5RAs5yUz5Bkv5P+u5B2Q5AwS','5P6M556t5Awh5zcw77YW','uSoFWPG','W5VdGCkb','W53cKmoG','waKI','s8kCWQ4','WPVdIM58W7igWR3cHCkuumoCWQr5','g8otmmkwda','amk1WQa','W4WFW7K','t8kwWQJcS8kZvCog','WQ3dUCoEnSo0W5Kn','h+ocMEE7UUACN+AxMEMuIoobOG','iCocEgBcQGrK','W7pdPYJcKGvIimo/W5CW','W7VdPMeiWRm','W4hcPsb3','W4uEW6G','W5hdHHS','5B6+5AEN5PEa6zsE772K','q8kAWRRcTmk5uSoBAG','CSo/WRJcKCobW7ldIvKqWPryW6b/WQfP','5Q205PsC56+M5yMa','sWSf','5lUW6lot8jAYTW','lgxdP33dPCkVW49SrqtdKrFdKSoQpa','F8ogzCoQW4hdGaS','d8otlCkb','qmkwWR3cLSk1u8oCAmkIWPpdG8oWs8o6W5O','D8kZW54','xX4ABJhdJ8k+dL9dr8kxzSoVmd7cKW','oeldM8okW6PqitJcSaPxamkDWPy','W6ixFmkY','772v8lQkJq','Cv7dUSogWRdcRSoJW4H5','W71sWR8bbSkcz30Bj8k9','WOpdOwiUWOpdU8k6WO4a','C+oaH+w6G+MrKowrQ+ENGUodV8on','8l+4K8k16lES5y6U5PEz5PAb','WPr8CmokWQbj','5Rw05yMD5Bwr57Mc5P6HmG','4PUmW7ROHk3LRlBKUjpOVO/OOl/PLA3PMyhMLOhPLBJORihNVjNPL7FORQu','i8kAW4q','WOfWB8ogWRGDW4r/W6BcVHVcLqqb','WQTmea','WQebW7v/uCkez1y','56E1WQ7OVjNOOPVPLklPMRpMLypPLAe','W6hdI2GR','dSovxf/dMr4n','4P2zWRRKUkJNIPZMOP7LVONPLRNOR4a','W7NdOdZdVG','77+Y5BA/5y255A2w','Cmo7wW1CWPS','W53cKmo2eCkWWRr6','qokCPLhOR4VMS7tLPz3OTzVVVQJMLO7LKPpLUQhML4RMJj3VVjhWVBIr','5P6u55+j5AwG5zcR7722','WRFcJCkMWR0NDJJdLW','W5pdMmkyDq','WQhdPSoLnSoT','xH8GEMZdN8k2oerh','F3JdIaxdHvq','tragBhPKhMxdRwCpWOdcK8oIcZzLbmkZW4xcUGmZWRpdU8kJWPqRpSk1uCoEx8oAiH9KW4hdSvOvDCklk8kRdvmCWPpcP8klWPRcOI9PW4OqpuBdQhtdSa/dKCkaW7vyrbFcSJZdPCoA','l8kNW5tcN3mxaCoip8kyfSoXsCoWnq','fmoDiW','W4uuW6hcMr7dJW','oSomBeZcRHTY','c2j6W68ivG','5BAU6l2W5RAi5yMz5lI66zIO','iSkgW4q','A8omzmoIW4hdKYXY','sSksWRK','4P2rWONMNkdNNApORzpMS6nf','tCkRW5jvW4u','hNj6W78N','4P+fW4ZNRRhLI7NMIApLIOa','W7hdJ3uEWPHnW5ieW4JdQmktccxdPLe','pCooDgC','fCkQW50bWOiP','6lEi5y+Q5PAS5PAe','W6ddRtFcUG4','cwjNW4i','WPrmWRldG1FcMSosWP3dR1K','5BM36zoP5zcw56wF77+uvW','5lQy5PEd5Bw256+q','WPKOW5ZcICkjW4bQWPCfW6tdK8krna','B0ldVSonWQ7cOG','4P+BWQpNRANLIz3LP67OT58','cSk7W5isWOmY','vmkgWQRcTmkZvmog','CCkVW63dKN3cT0C','W6D4juRcJgT4DG','dgnlWORdISkhBmkkcG','lCogBwm','c8ockmkCea','uH8XsYldISkZj1TwrSkbESoSkW','vryBzMWmrcBdOb5iWP7dIq','taOgExS/uJ7dMJfeWOpdICoThuD1a8kXWPRcIWS2WRJdImkuWPq1F8kSw8ohqmkqCZTIW6NdSrK','gI9chq','5lY/5Oct5yUX8yQKH++4Qa','WQpdQ8o+oa','W6rqWPJdJ8kLW71kW5BdMmkgWQBcGs0','xWXFx0DYsYlcQbPaWOpdJSkZhIu2rCoN','W5KIkCkDW75dW6rjW5dcKbtcPa','g3zaWPa','WPxdL0S','5l2I5OkV5yIv','W7SxEmkJBbRcJ1G','W6rLkuJcIt4Tnr0','4P+VW5pNRkdLIB7LP7tOTju','WQ7cG8oIWQOCBsy','Fmo0WRJcTCoqW6FdG1SPWPjiW5n0WPrTW4FdGmkrW7Kc','W5TErmkNdCkp','fNLnWOBdLSkJymkcbZK8a8kdtM7dNmoti8orWQC','dmovfG','4P+avUACU+IaQUATM+EGNEwNPUEqU3a','5lU655cx5B6K5yscWPOgW5i','fcfFeG','bCk0WRhdJty2f8oyWRyd','8kIyVGy','psyTaCor','A2tdIJtdJKi','5yMw5B2S5lMD','hhHDWOy','W4/cNdK','fxHZW68uqa','W4tcLIOpWQzeW6dcHCkQASoxWQzGW6DS','oSosEMhcQGvK','WOSBbmose8kBgGFcTCkq','W615iKm','5y6U6yEr5B6A5zce54IA5OoFb8opWP1fWP5/bCkkamkX','ehLIW4Skw8kkWQ/dM8ko','WPFdSh4sWQW','jSkBW4ddVCklxbtdKa','zhLR','56+a5yIC54gD54US5PAi55MS5P2k5AwK6ys16kYn5Q2W5PA7WPOiW7C','b8oFbw/dNWSqW7ilpvRdIbC','WOLNjCk8cYqIW6TuW7BdQW0nWQC4sYG','EZdcOW','WOVdICkO','W7ldRwe','5Rwe5yQ/5lUD54QVWP7dGf4','W7pdPYJcNGnLoSoOW5KHh8o1FXWr','dmoDl8kqcG','omkuW4RdPCkQurZdHG','W7JdLCo/W7TekwhdHbvPWRxdN8kb','W51dwmkEf8kgpYBcQmkQomkXW4v6W5KfACkTnCk5EW','5Rwn5yQ25Pw65PwJ','W77cGSousW','hmotmmku','WQlcHdy','d2vqWPNdGCkSBmkFbW','W4FcKIC9','WQ7dPmo+pmoTW78gv0m1zffmcfuOW4ydW6RdIq','ESkVW4RdLhhcVa','W6RcJmozwG','WONdJ8kTq8oKW6S3fSkXgCkkBCkgDG','W60fySk+xX0','WPpcHGL5W4xcTd4GWOJdRarDzCowW4ldQxVdTSoRdH/cShBdM8kTW5jz','W6zBWPO','nSoXECoLW4pcHmkQWRddVmotmv43krdcGWRdRSoCWRK','WQLmaa','F0ldU8on','WOP3rmolWR4fW5rzW5tcQrNcJGqCw25TWPFcNuWKj8om','W4T5WPRdOSotWPyWWQ8iW6ldJ8k1ka','5y+b6yEE54Is5OgW57MZ5P25WRqgWPdcPwtcM8k9W73dUeS','5BUl6zgV56Ej5yQh','Fmo0WRJcTCoqW4xdHuenWOvtW7zIWQ9PW4ldN8krW60y','e3HE','W4ddHCkFzvdcM27dIW','hI5zwG','mmo6qq','kqvLBZ1sqLddT8k3wa','4P6mW4ZOJBJLJj/MTyJLIRFKVRtMG53LPBpOTii','W7ldISo8WRa8DCkGjWS','WQXgdNy','WPr2y8oBW6eeW5XNW5ZcPa','W4LteG','sxOBExPKFhJdNG','5P2Z5yUV5zME57I95B6i','CCoOxse','rHyxFx07','W7/dHhu6WOLyW5GgW77dV8kplZ/dPuZcNKVdKWGzW4hdJ8kIhvBdKCoDfhRdUSoqW58riSooW6CjfSocnW','5BAl6l6P5yIK56+u5yMw5lI46zQ+','WQdcNZfTW4T7W4eCW67dImka','44cL5O6Q56w/44cB6k625yE26i2T5y6hCu1qWQn9W68','twaeuMddLXW','B0tdUmon','eYfBwNX/DKddKmkl','W7PVnKm','egjnWQxdImkbyG','lgxdP3/dQCk0W41ZssBdItldICoP','lSocBupcRaj+W6NdQL1YAWSLW4a','sSksWRhcM8kZuCoqCG','kmkNW7hdRCkFWRVcNrjeW50','W6zpWQC','WRvwgudcUmoX','W71/iuJcUMbXAuNdJSoCqSo8BGy','yhK0hmomW40pWQStdmo5W5TzACouWOStnmk6s8k/Evy','tXCDCNLVaxRcTG','WPxdNujTWRKC','iJKM','W77dRtxcSq','W6exyq','WPtdKujgWQGceSka','W5FcL1L+WQqybmodWR98W5C1W781W4yB','WPL8jCk4C20RW6S','W6tdTY/cTW','W5Lwx8kAuSoilIBcNSk0mmk/W4ueWOWlFG','W7tdRhKlWRBcNq','W5dcHZ86WRbd','W7tdRhmi','W6tdQgiJWR7cLXS','mCoWvCoYW5lcKSkR','DHuRFItdKmkUFgzBt8kT','W7yAtZhdPCkGq8kQivD1W63cJW','F0ZdOCoj','ghjnWQldH8kuBmkAgIG3fCkEqg4','W7RNUyBMNy/MLRhPLjNVVOy','W40qW7VcNW','pLja','4PUmW7RORldLH6tLR4dKUjBLVRBOPjJNMzhNJ5JLOOtLJAFPHRJLK6dLH4FOVyNOOjFOHP7MN6dVVjq','WO9TpmkPswafW6fCW67dRXCC','WQPgbhBcT8oYfG','eIfr','W6StzCkFdqdcLG','5ysF57I35yYJ8l+1La','44gB6lsM5y2K','hamgxa','WOO/W53cVW','W7PZpLldLN9XzexdGW','5yEu57IH5yYs','wr8RBtxdLG','s0XnaCkBsry','y3NcItldRGRdS1pcGmoqomoiW7pdU8k0s8o1WRhcVG','WPNdU3mRWPJdUmk2WPS','W5xcLJaQWQbcW4dcLW','hZ5ggt/cNw/dMCkSW4NcTq7dSa','WQncdNy','E8oUFLJcPGjg','z8oSwsXoWP8w','F0ZdRmoB','WQNdG8kh','WQ1hkghcPSoKf8kDc01hW7tcO8kkbCovv2GBW5NdQSkqmCkX','WQ1mhMS','lcBcLKNdJvxdMx/dOmoq','W4X7WP3dQCoyWPqWW7uzW47dV8kugum','fa0y','DSkVW54','4PYEbUEVUUwkNUwMQ+I0HgvkW74','W59CrSkpemkmcsZcLSkSnmkLW5q','W7BdOgmeWQNcKWRdRSoyna','WRWsW6rjuq','W5ZcNmoSmCk/WQXQumkHjmkWu8kHySk5','rG8MAstdJCkP','W4hcPYj1W5/dRmk2WQ8dvbS','vG0vCKOXxsBdOdfvWQRdLmoUgW','WQipW7O','WRtdQCo4mmoVW4G','WOzPomk8vd5PWQftW6RdO1CfWQvYtxqLW5BdOSobWOtcPmkG','rbCbDw4W','W5NNUAVMNBpVViBKU4BMRzxMLP7NGzxMNOJLKl7dI1O','k8kuW5RdOG','hSkVWQNdQtq7','W6hdL8oXWQ8','fxHZ','WPFcLZ99W7y','ASkGfSkZWOpcT8k0WOhdGmoUnq','qmkwWR3cM8k5qmoCCmkyWPpdM8onumoV','j8ogDgC','gSk/WQNdId8ToSo9','oCkGW4u','hranySozaa'];_0x3d0b=function(){return _0x9da582;};return _0x3d0b();}
// 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)}
