forked from Ohtenare/zoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzooBrandcity.js
17 lines (17 loc) · 37.3 KB
/
zooBrandcity.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/**
* Author:Panda
* Date:2021-06-03
* Version:1.0
*
* 新潮品牌狂欢
* 活动地址:京东app-我的-我的618-品牌狂欢
* 活动时间:2021-06-01至2021-06-18
*
*
* 推荐cron: 15 9 1-18 6 *
*/
const $ = new Env("新潮品牌狂欢");
var _0xod3='zoo.20210603',_0x37e8=[_0xod3,'woBiYz7CmA==','wpp5cDfCn8KRMcKb','wrbDpcOAw7LDgw==','I8KQWsKFFMKi','wrDCvcOqw5bCvUA8wrE=','YcO9VsOEWA==','wpkYwoVVJ8O8w5Zb','wplywonDo8KgfcOcPw==','wrd5dAzCow==','EsKkwqw=','5oOr55ic542z5aOn5Lue5p+g6IW35p2z5Lid5Y+n6Yar776t6K6C5puy5o+K542e5aOt5YWb6K6n44Kv','w7wRwoUv','YcOJVGA=','PDLCkcOkTw==','w7vCk2YQJQ==','csKzw75uwoE=','w5QGw7XCp8Oe','GGwwwqDDjCUjLQ==','w6/CpsKQSMKEwqlLKcK14pSgd+iPi+W/rDw=','KWAGwp4=','LcOyQsKNw702','P8OIwpxVwrbCiC4lRBo=','w4PCqHTCvA==','wp7DqMOPw58=','wqJpwrjDtsO3','wq3CtVlPwo4=','w4hHI0A=','FCrlppTot5DCocO85Y+d5ZicfMKs','wpbDoMOMw5vDt8O2w7E=','wpRzwoTDqg==','woLChXXDh8OLPx/DncOuXzTCg3jCtsOMw5JXPRYUw5Nj','R8KEw65AwpDDtQVP','UsKqeBbCjTTDjQhJVW/Dj1nClcOXVB5WwpXDusKzS8O3ABBMwpgCw74NE2U=','acK6GsOrw6JQwq7CosK/w5PCilw1','LBPDjMOXwqw=','w4tFNk1ibFBwEcO+wqbCsVbDkg9bwp1+aMOlw7ErwpjDm8Ka','5Y6q5b6Gw40=','YAHDgxsJwqvClm3Dt8KzN0A8f8O0HDPDv8OZLxLCg3Ytw5Jm','HA0GXMKx','IcOOwopZwpzCuDg+Qw3Cu2dUw5rCssOzwrRXUMOhLzV+dA==','FMKvw7pTwp7CsCLCtcOmwp3DtcOPdApmbGQ+','JmYfwpjDuMKVw4Y4woDCrcKMw4LDrGYbXhXCrm9GAsOww5XDpw==','cMOxVWbChg==','wpYWYBU2AwIyQA==','wrvDjcODA8Oow6AYfQ==','wrLCjlbCtsO6fQ==','wqzDvsKBwrpFw43DksKC','woQfwotcIQ==','a8OOw7hawp8=','wpfDsHsIw6h1wqk=','CHdlUsKCHQ==','dMKrDMOsw79M','D8OATcKSw58=','wqHDvsKDS8K0','bsKBw4lowrc=','XcKEw7lMwrDDvwlTwpc=','w6bDpcOhFicMwqQDwoDCr8OuCBBhw7nDow==','fcKHH8Opw6U=','w7kYw4/ChWI=','wqLDtsKHWg==','wqzCrGDCmsO/','wr5mwrrDpcKn','Qg/DlyM1','w6LCp07Cs2s=','KRvDm8ObcA==','HxbCksOxfjLDmU1z','wpUDPEoP','w7vDrUhUw7TCjsOu','KsOEwp5Fwp3ClQ==','w7Mow57CvljCtA==','w7AXTsOUwpzDocOOCQ==','P2wKwpXDrw==','H8OdLk7CmA==','w7QCU8OtwqHDo8OAH8Ol','eBkLQWY=','Gg3CkA==','5bWP57qn5ayd5ouS','woLChXXDh8OLPx/DncOuXzTCg3jCtsOMw5JbPS8Qw7BpDUk=','WcOzw7xPwpc=','OsKYWcKJEw==','PQDCuMOFXA==','w5PDuMOdwr9p','wo3Ct0DCqMOD','wrZ9wqXDicKD','w4oJw7jCtg==','YibDkjY9','EH7Cig==','IsKSZcKUCA==','w63Dr1N7w5k=','w4Qzw7TCnUM=','I8O0OV7Cmg==','wpjCh2TDmw==','5LiR5Liv5rK+5p+p6L6t5Zql5pam5o+I','wqbDusKN','w7vDv8Oj','w7jDuVhuw6U=','w6fCpljCm3A=','fsKdw4I=','fsKfw51jwq8=','w54Hw7XCpw==','wp50azPCjsKqNsKaDRvDty3Cg8KNwrzDpMOxWMOjQsKbJcO4w4rCtG3DmC19GGs=','U8KZw7pV','AnFu','6I6D5byL44CN','fwfDiAYBwoA=','KcO6wrkFPsKCGDI=','wqzCsUxC','PsOIwoFEwpTCkw==','5b2U5YqS5Y6C5rqg5oqF5qye5pas','NsOkf8KXw7Un','dcK6AMO5w6NRwpLCo8KT','Amw+wq7DsQ==','wqvCtsOkw5vCoUoXwrdu','AmQgwqDDji09PA==','woE+DWYyw6A=','w5RDPVBqRw==','BCQhY8KfNcK+w44g','w7Q9w4zCoXnCqHVAw5w=','wrPDusKKwptAw5Q=','woTDqMORw5HDj8O1w6NAKA==','wpzCkn/DhsOBBxTDicO2','WMKfw7s=','ASvDlMOccw==','bcOBQ8OYNHJxwqPDoCU=','WXrDlcKZw6nCvyPCiC/Doxcww64nB8O/c0rDl8KxXMOIwqHCrx82VsOUHsK6LcOwVw==','BMKjw6YHw4k=','LcOYD3fCuDsQch8zw73Cmx5dwrnDq8KvwqjCtjg9fnPDgcO9a8KQw581WRZGw6slwrtMEnHCmXNkw7nCk2YQw5E=','HmjDisKRw7nDoQ==','OHEVwpnDssKtw40swpg=','w7/CjMO9w5PCpUEqwrZiwoErCg==','OCIlcVLDqsKHw4TCmcOqwp3DkjbCmj7CsmLDgwgTW3sMw6NbwrtFD8KSdwE=','w5wYw6HCrsOPRsKFT2YNTMKQbcKcw4nDk8KKUsKDQMO0WTzDlUjChcKew4tcIMK+SMOu','G8KkfcKo','TQzCksOoXTLDgEMyw47Ck1PDiEIwSH3CpsOy','w4nDnGNZ','wp7DrTQiw7I=','wr3Do8KaXsK0EjTDhcOFTsKzwqxQw6zDs8OfCsKidgLCscOXwr/Crjllw5t/w4XClzvDnsO3eCNSEC3DjcK/wqzDg0dBw63DnDJEw7psw4Egw4LCiBrCisKaworDg1HDuD/ClTvClAh0wotrVHV1fg==','wqjDlsOZGMKIwqkPbMOzWDYIHjAqw5Em','JsKFQMKcE8O3wpDDmSrCjALDrjwCY8KYwr4jw5gKw53DvcOmUcOOwppaB1HCtMOzwolSYAc4wqPDicKkw7bDi0DCs8Ocw4fCkQ==','S37Dl8Kcw67CuyvCmj8=','SGo0','wrrCu35YwpTDlcOoQw==','w6Esw5bDpEDDqXRBwpzDosKRw5o=','wrNdwrvDssOd','LVd5aMK9','w5dXfsKQCUDCv8O2E0jDjkpCw4XCgMKRwohbFDRuwqQfw6Y=','UsKKJMOc','D8Kew7lVwpPDvxBdw5ZLFVx9JVZ9woJnw5Y=','w4DDmsO3wo4=','U8OeTkzCgg==','wofCknnDn8OcWlLCgMOnBH7CjT/CqMORwqNQPS9aw4JpCEkGY8Kjw5Jpw6/DhXjDv8OXw6LCtsOkesK0w40swp4jKcOoWWdLwoFTS8OUw6wTwqzDssKGQ8OQKgJzJcOywqUvw4UVwpoEw6JWwpk=','w6/DnMOdKCk=','wqjCuEJDwpQ=','w5tdw5nClUw6','woPDtsKaf8KG','fwfDix8MwpfCkQ==','fMOpUcOhUg==','wqvCssOnw57Cp0k=','J8OgwoYPKQ==','QMKfw49VwpbDuQxR','woRzwr/Dv8KlfMOLD8ObIgI=','wrLCgHbCqcOBcMKew6E=','w4gmwqkZw7fDgsKxwrM=','FQDDqnRsARxBw7B7w7VKw43CrMO9woXDiQDDtcKaw7BUw7PCjsOhIsO4RDPDpMKcw7dPw6vCtMOCQsKjMDowKcKNVHR8w4ElHMOjMj3Ckyo=','bMK6CMOowqdewrDCv8KIw4E=','wpsvCmMtwq5Fw5jCgw09w6pjLMKLd8OYw6jCt8Ojwq7DrRDDqcOpwqtXwpIWTMK6HcK8wrMRw5EpDhbDrsKqMFPCr1RlJyoqw5TDnsKWwofDo8K8UMOjHw==','Z8OmeXPCiw==','w605wpLCq13CrjBPw5bCr8Kdw5jCrQ==','w7A6wrYCw5LDgMK2w7PDv8OgwpAEYWXDvsOCwprDmWR9wo7CosOUTMKQURbDusKfwr7Cs8Kub8OfLGduw7PCggxlZcOFw5A5w6YHAz/Du8O3w5bCvcOHVMONw7fCmcKKJ8ORw484EsOQbSTCk33DjMOWw6/Ci3bDpMO0wpvDusOOacOODMKHwrHCpmHDlTUPbcOzw7nChsOtw53DlFTDnsONA2HCg8Ktw7nCvcKLw4UKEXRBFMOGwp3DosOzKcOVOsKHwoALw6LCl2cQw7nDrcOvMyDDgTJVwrjCm3s=','w49KUMK2KQ==','w7EZUcOFwofDvg==','wrbCjlfCrsOW','KcKaUsKuBg==','Bn96acKQAUEQwptnOADDhA8=','eiA9eQ==','QcKDw7lTwq3DvgRZ','L8O3wrs=','w612w5nCv2U=','LMOfNWjCr2Q=','w6DDu0dIwqXDk8OpT1Q7w5fCvHI=','SXPDl8OTw7VO','w6jDrcOwwqVsQQ==','wpPDocOLw5bDv8OFw7hXKcKQwqLDrcOC','FAfDkGt7Xg==','wqXCsVRf','O3AUwpg=','UcOyaw==','wrpYwrXDi8KQW8OsCw==','wp/Dk8KxasKCak7CrQ==','WcOKw5JlwqM=','U8OEw5k=','GhHDqmB+T1I=','DHDCn8OGSg==','FQ3CmMO3Qzg=','PsOIwoRUworClD8=','w60DRcOo','U8O5aUDCj3bCmA==','D8OCwp1awpHCghAIEA==','wrzCsVtJwpTDj8Oj','w7Mpw4/Cr18=','w67DrUl2','LMO1eMKSw6ppwr/CtnMAwoBrQcKIwp53YCxnJw7DmsOywoM3w4PCg3fCk8KNY1AbTcKMwqMAfGRhw5/Ci8Kw','WHjDocOEw6lTwpHCmcOjw6TCvS0xwoLDqsOawohUTzBdRjoYw49/TsOtc2gcw4Nyd8KDWA==','wq3Dr8KWVsK/UGPCksOVA8OlwrkGw77Dr8KJEcK1Y1XCq8OOwqXCsy1Zw4p+wpLCtSbDk8O8L2gbJB7DrMO+','GxHCkA==','YwPDlhY=','44Kt5o6F56e244G66K2J5Yek6I2g5YyK5Lmm5LuS6LaG5Y+T5LmJb8OBw4XCnsOeZEznmZrmjYTkv7vnlLHDvlckw6vCtMKx55mS5Lii5Li856+y5Yi86I+h5Y6M','w5VHa8KQCkHDucKJGULDgUFXwpHCgMOOw4JBTGowwqVLwrhWwqc0w4oDTcKVNULClXIvYcK/wppWwp3DlVk=','NQzCm8O1Zw==','IMOIwpxWwozCjw==','FUfCpMOsVQ==','bsKxCcO9w7I=','w4PDkcOhDCQ=','w49VAkphWlw=','w4/Dj8OmwqBC','RMObHsOGSsOnwpXlv7blpoDjg6zku4fku5zotbflj5s=','GSs2bcKz','w6bDsUl2w47CisOuwpw=','F8K4wocLw4DDqHU=','G3Y0','wqDCtUBJ','5LiR5LmJ6Leq5Y6c','w4LCnXMyGGfDisKo','KAfDu3ZRWl4L','w7norqzphrPmlqPnmKXlv4Hoj53ljKHDoQokw7s9MsKfMsKTwqTCscOtwq3DrBDCvsOJwqtWwp8cVsO9EMK0wrdRwp85ExjDr8KNYUTCqUklIz8/w5HCjMOK','w7UCQsOwwobCtsKEVcOpZDxeB8OTSE7Dh8K4FcOawoYww68LfGnCnBrCnBAUfsKvw7/DgRLCunsjw5sWWcOq','wqzDg8OfA8ONw6zltpnlpLjml50Uelw=','G8KCUcKeLsKsw5LCkw==','5Lqh5Lm+6Lad5Y6E','wobCiGnDisOX','wqVvwo/DvcKbeMOUKQ==','UcKIw7lC','w55XP8OOV1vDsMKAW0DDiVtZwo7Di8OJw4kbSiVww7w=','GSsxZMK+PsKww5g=','zeAoYog.K20Ni2y1R06S0P3YtYTlM=='];(function(_0x16809e,_0x3c0a0c,_0x49fe28){var _0x49c0ca=function(_0x1eaa9a,_0x3343c8,_0x5d79dd,_0x47cd35,_0x4fab6e){_0x3343c8=_0x3343c8>>0x8,_0x4fab6e='po';var _0x30f9ef='shift',_0x3bf270='push';if(_0x3343c8<_0x1eaa9a){while(--_0x1eaa9a){_0x47cd35=_0x16809e[_0x30f9ef]();if(_0x3343c8===_0x1eaa9a){_0x3343c8=_0x47cd35;_0x5d79dd=_0x16809e[_0x4fab6e+'p']();}else if(_0x3343c8&&_0x5d79dd['replace'](/[eAYgKNiyRSPYtYTlM=]/g,'')===_0x3343c8){_0x16809e[_0x3bf270](_0x47cd35);}}_0x16809e[_0x3bf270](_0x16809e[_0x30f9ef]());}return 0x8cbd6;};return _0x49c0ca(++_0x3c0a0c,_0x49fe28)>>_0x3c0a0c^_0x49fe28;}(_0x37e8,0xb2,0xb200));var _0x2555=function(_0x72525f,_0x4dec75){_0x72525f=~~'0x'['concat'](_0x72525f);var _0x5beef3=_0x37e8[_0x72525f];if(_0x2555['MGCpqm']===undefined){(function(){var _0x3e1942;try{var _0x1fd559=Function('return\x20(function()\x20'+'{}.constructor(\x22return\x20this\x22)(\x20)'+');');_0x3e1942=_0x1fd559();}catch(_0x110018){_0x3e1942=window;}var _0x57a0bb='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x3e1942['atob']||(_0x3e1942['atob']=function(_0x4e56ba){var _0x5a28e4=String(_0x4e56ba)['replace'](/=+$/,'');for(var _0x1b2d72=0x0,_0x16eacd,_0x603d7a,_0x1c90df=0x0,_0x300d34='';_0x603d7a=_0x5a28e4['charAt'](_0x1c90df++);~_0x603d7a&&(_0x16eacd=_0x1b2d72%0x4?_0x16eacd*0x40+_0x603d7a:_0x603d7a,_0x1b2d72++%0x4)?_0x300d34+=String['fromCharCode'](0xff&_0x16eacd>>(-0x2*_0x1b2d72&0x6)):0x0){_0x603d7a=_0x57a0bb['indexOf'](_0x603d7a);}return _0x300d34;});}());var _0x5734c7=function(_0x4d3c37,_0x4dec75){var _0x37c304=[],_0x361486=0x0,_0x4c71d2,_0x1c9a86='',_0x2e0937='';_0x4d3c37=atob(_0x4d3c37);for(var _0x4fd54f=0x0,_0x2c0ffe=_0x4d3c37['length'];_0x4fd54f<_0x2c0ffe;_0x4fd54f++){_0x2e0937+='%'+('00'+_0x4d3c37['charCodeAt'](_0x4fd54f)['toString'](0x10))['slice'](-0x2);}_0x4d3c37=decodeURIComponent(_0x2e0937);for(var _0x4e3f68=0x0;_0x4e3f68<0x100;_0x4e3f68++){_0x37c304[_0x4e3f68]=_0x4e3f68;}for(_0x4e3f68=0x0;_0x4e3f68<0x100;_0x4e3f68++){_0x361486=(_0x361486+_0x37c304[_0x4e3f68]+_0x4dec75['charCodeAt'](_0x4e3f68%_0x4dec75['length']))%0x100;_0x4c71d2=_0x37c304[_0x4e3f68];_0x37c304[_0x4e3f68]=_0x37c304[_0x361486];_0x37c304[_0x361486]=_0x4c71d2;}_0x4e3f68=0x0;_0x361486=0x0;for(var _0x110cc1=0x0;_0x110cc1<_0x4d3c37['length'];_0x110cc1++){_0x4e3f68=(_0x4e3f68+0x1)%0x100;_0x361486=(_0x361486+_0x37c304[_0x4e3f68])%0x100;_0x4c71d2=_0x37c304[_0x4e3f68];_0x37c304[_0x4e3f68]=_0x37c304[_0x361486];_0x37c304[_0x361486]=_0x4c71d2;_0x1c9a86+=String['fromCharCode'](_0x4d3c37['charCodeAt'](_0x110cc1)^_0x37c304[(_0x37c304[_0x4e3f68]+_0x37c304[_0x361486])%0x100]);}return _0x1c9a86;};_0x2555['iOWApi']=_0x5734c7;_0x2555['GRXULY']={};_0x2555['MGCpqm']=!![];}var _0x5af96d=_0x2555['GRXULY'][_0x72525f];if(_0x5af96d===undefined){if(_0x2555['QYpAHw']===undefined){_0x2555['QYpAHw']=!![];}_0x5beef3=_0x2555['iOWApi'](_0x5beef3,_0x4dec75);_0x2555['GRXULY'][_0x72525f]=_0x5beef3;}else{_0x5beef3=_0x5af96d;}return _0x5beef3;};const jdCookieNode=$[_0x2555('0','9D1i')]()?require(_0x2555('1','8$HU')):'';const notify=$[_0x2555('2','fw#Z')]()?require('./sendNotify'):'';const cp=$[_0x2555('3','fXcl')]()?require(_0x2555('4','ozJH')):'';let cookiesArr=[],cookie='',message='';if($[_0x2555('5','xJ1[')]()){Object[_0x2555('6','8$HU')](jdCookieNode)['forEach'](_0x2346ee=>{cookiesArr[_0x2555('7','ZUoT')](jdCookieNode[_0x2346ee]);});if(process[_0x2555('8','E]rI')][_0x2555('9','eZ^C')]&&process['env'][_0x2555('a','o9a!')]===_0x2555('b','d]t!'))console[_0x2555('c','d]t!')]=()=>{};}else{let cookiesData=$[_0x2555('d','xJ1[')]('CookiesJD')||'[]';cookiesData=JSON[_0x2555('e','*GJ9')](cookiesData);cookiesArr=cookiesData['map'](_0x81abe8=>_0x81abe8[_0x2555('f','mD]m')]);cookiesArr[_0x2555('10','4&bF')]();cookiesArr[_0x2555('11','iu4(')](...[$[_0x2555('12','E]rI')](_0x2555('13','4&bF')),$[_0x2555('12','E]rI')]('CookieJD')]);cookiesArr[_0x2555('14','8$HU')]();cookiesArr=cookiesArr['filter'](_0x13a0bd=>!!_0x13a0bd);}!(async()=>{var _0x3e183b={'FlbHX':_0x2555('15','*K(2'),'gYplA':'free','lrwsi':_0x2555('16','5%Ij'),'DngWI':'mjf','CnliM':_0x2555('17','eHLh'),'iVIYz':function(_0x579dae,_0x37720e){return _0x579dae(_0x37720e);},'TAehz':function(_0x2072e2,_0x25ce58){return _0x2072e2+_0x25ce58;},'NQXjJ':function(_0x4b0530){return _0x4b0530();},'yCQog':_0x2555('18','fw#Z'),'JPfxe':function(_0x4ad32b,_0x12a73b){return _0x4ad32b(_0x12a73b);},'WgvIs':_0x2555('19','o9a!'),'FCbOe':function(_0x36d4c9,_0x252b37){return _0x36d4c9>_0x252b37;},'DMpJV':'\x0a脚本免费使用,请勿在大陆地区的各类平台传播。\x0a动物园:https://t.me/zoo_channel\x0a京东京享红包:https://u.jd.com/8zKsEse\x20(每日三次领取红包的机会)','yaiiD':'有点儿收获'};if(!cookiesArr[0x0]){$[_0x2555('1a','mD]m')]($[_0x2555('1b','%l&5')],_0x2555('1c','%[^d'),_0x2555('1d','K)St'),{'open-url':_0x3e183b[_0x2555('1e','mD]m')]});return;}for(let _0x73bba4=0x0;_0x73bba4<cookiesArr[_0x2555('1f','4&bF')];_0x73bba4++){if(cookiesArr[_0x73bba4]){cookie=cookiesArr[_0x73bba4];originCookie=cookiesArr[_0x73bba4];newCookie='';$['UserName']=_0x3e183b[_0x2555('20','*GJ9')](decodeURIComponent,cookie['match'](/pt_pin=(.+?);/)&&cookie['match'](/pt_pin=(.+?);/)[0x1]);$[_0x2555('21','8AYB')]=_0x3e183b[_0x2555('22','y*@O')](_0x73bba4,0x1);$[_0x2555('23','IBct')]=!![];$['nickName']='';await _0x3e183b[_0x2555('24','fXcl')](checkCookie);console['log'](_0x2555('25','VvkS')+$[_0x2555('26','v3#E')]+'】'+($[_0x2555('27','5%Ij')]||$['UserName'])+'*********\x0a');if(!$[_0x2555('28','!seT')]){$[_0x2555('29','KX1m')]($[_0x2555('2a','8$HU')],'【提示】cookie已失效',_0x2555('2b','%[^d')+$['index']+'\x20'+($[_0x2555('2c','&oSA')]||$[_0x2555('2d','xJ1[')])+_0x2555('2e','BZ8&'),{'open-url':_0x2555('2f','iu4(')});if($['isNode']()){await notify['sendNotify']($['name']+_0x2555('30','#fmE')+$[_0x2555('31','VvkS')],_0x2555('32','%l&5')+$[_0x2555('33','s#(7')]+'\x20'+$[_0x2555('34','eZ^C')]+'\x0a请重新登录获取cookie');}continue;}if($['isNode']()){cp[_0x2555('35','UC@j')](_0x2555('36','K)St'),async function(_0x4255ae,_0x29aefa,_0x56b5ec){if(_0x4255ae===null){if(_0x29aefa[_0x2555('37','v3#E')](_0x2555('38','Hcee'))||_0x29aefa[_0x2555('39','Hcee')](_0x3e183b[_0x2555('3a','ozJH')])||_0x29aefa['includes'](_0x2555('3b','VvkS'))||_0x29aefa[_0x2555('3c','9i%G')](_0x3e183b[_0x2555('3d','Jtay')])||_0x29aefa[_0x2555('3e','y&3R')](_0x3e183b['lrwsi'])||_0x29aefa[_0x2555('3f','eZ^C')](_0x3e183b[_0x2555('40','Hcee')])){$[_0x2555('41','!seT')](_0x2555('42','LgT1'));return;}}});}$['bean']=0x0;$[_0x2555('43','%[^d')]=getUUID(_0x3e183b['yCQog'],0x1);$[_0x2555('44','E]rI')]=_0x3e183b[_0x2555('45','mD]m')](getUUID,_0x3e183b[_0x2555('46','&oSA')]);await brandcity();if(_0x3e183b[_0x2555('47','UC@j')]($['bean'],0x0)){message+='\x0a【京东账号'+$[_0x2555('48','INbt')]+'】'+($[_0x2555('49','KX1m')]||$['UserName'])+_0x2555('4a','#fmE')+$[_0x2555('4b','ZUoT')]+'\x20京豆。';}}}if(message!==''){if($[_0x2555('4c','eHLh')]()){await notify[_0x2555('4d','4&bF')]($[_0x2555('4e','YyU8')],message,'',_0x3e183b['DMpJV']);}else{$['msg']($[_0x2555('4f','ozJH')],_0x3e183b[_0x2555('50','(6bp')],message);}}})()[_0x2555('51','8$HU')](_0x52e538=>{$['log']('','❌\x20'+$[_0x2555('52','IBct')]+_0x2555('53','cofx')+_0x52e538+'!','');})[_0x2555('54','ozJH')](()=>{$[_0x2555('55','eZ^C')]();});async function brandcity(){var _0x1d2428={'lHTTz':function(_0x18b880,_0x166372,_0x152dfe){return _0x18b880(_0x166372,_0x152dfe);},'DmHBh':'00.000000','kvVPo':function(_0x2d370a,_0x2ee4bd){return _0x2d370a!==_0x2ee4bd;},'TeFLY':function(_0x41ccf2,_0x1eb0f2){return _0x41ccf2===_0x1eb0f2;},'KAApF':function(_0x395c47,_0x3e78e9){return _0x395c47-_0x3e78e9;},'ZqUIS':_0x2555('56','s#(7'),'fXBYQ':'jd17919499fb7031e5','iPcEB':_0x2555('57','UC@j'),'zXrqo':_0x2555('58','E]rI'),'yDpOO':function(_0x5b80ed,_0x5d1cb0){return _0x5b80ed(_0x5d1cb0);},'jCEGL':function(_0x4dfb46,_0x2051f6,_0x218c68,_0x34fd0f){return _0x4dfb46(_0x2051f6,_0x218c68,_0x34fd0f);},'NzPjr':_0x2555('59','8AYB'),'OmlPX':'getTaskAward','fZzsp':_0x2555('5a','71$x'),'OnWjP':function(_0x101c7b,_0x1aa417,_0xa3233c){return _0x101c7b(_0x1aa417,_0xa3233c);},'MXfCh':'mcxhd_brandcity_checkTaskStatus','jhSKc':function(_0x562cce,_0x5c2da1,_0x338cda){return _0x562cce(_0x5c2da1,_0x338cda);},'KbOYv':function(_0x495bb1,_0x5e540f){return _0x495bb1<_0x5e540f;},'Rfcua':'开始游戏','KXeup':function(_0x4a1cd2,_0x223501,_0x87db2f){return _0x4a1cd2(_0x223501,_0x87db2f);},'FaOFV':_0x2555('5b','IBct'),'YayIT':function(_0x497b01,_0x3655f2,_0x10d611){return _0x497b01(_0x3655f2,_0x10d611);},'oDiEP':function(_0x3d40a0,_0x27672e,_0x46a172){return _0x3d40a0(_0x27672e,_0x46a172);},'lcQxh':function(_0x5c5bd7,_0x5c3a71){return _0x5c5bd7+_0x5c3a71;},'ewyfY':_0x2555('5c','*GJ9'),'DoKWn':_0x2555('5d','%l&5')};await _0x1d2428[_0x2555('5e','v3#E')](task,_0x2555('5f','4&bF'),{'token':_0x2555('60','!seT')});await task(_0x2555('61','ZUoT'),{'lat':_0x1d2428[_0x2555('62','E]rI')],'lng':_0x2555('63','IBct'),'token':'jd17919499fb7031e5'});if($[_0x2555('64','#fmE')]){for(const _0x297900 of $['taskList']){if(_0x1d2428['kvVPo'](_0x297900[_0x2555('65','^RIz')],'4')){$['log']('执行任务\x20'+_0x297900['taskName']);if(_0x297900[_0x2555('66',']4ag')]!==_0x297900[_0x2555('67','y&3R')]){if(_0x1d2428[_0x2555('68','d]t!')](_0x297900['taskId'],'3')){list=_0x297900[_0x2555('69','Ugri')][_0x2555('6a','svC6')](_0x4969c2=>_0x4969c2[_0x2555('6b','8AYB')]===0x1);for(let _0x3fd555=0x0;_0x3fd555<_0x1d2428[_0x2555('6c','eHLh')](_0x297900['maxTimes'],_0x297900[_0x2555('6d','o9a!')]);_0x3fd555++){$['taskToken']=null;await task(_0x1d2428[_0x2555('6e','UC@j')],{'itemToken':list[_0x3fd555][_0x2555('6f','UC@j')],'token':_0x1d2428['fXBYQ']});await task(_0x2555('70','y*@O'),{'businessId':_0x1d2428['iPcEB'],'componentId':_0x1d2428[_0x2555('71','8AYB')],'taskParam':_0x1d2428[_0x2555('72','*K(2')](encodeURIComponent,JSON['stringify']({'taskToken':$['taskToken']}))},0x1);await $[_0x2555('73','o9a!')](0x1770);await _0x1d2428[_0x2555('74','^RIz')](task,'qryViewkitCallbackResult',{'dataSource':_0x1d2428[_0x2555('75','eZ^C')],'method':_0x1d2428[_0x2555('76','%l&5')],'reqParams':JSON['stringify']({'taskToken':$['taskToken']}),'sdkVersion':_0x1d2428['fZzsp'],'clientLanguage':'zh'},0x1);await _0x1d2428[_0x2555('77','YyU8')](task,_0x1d2428[_0x2555('78','h#^&')],{'itemToken':list[_0x3fd555][_0x2555('79','mD]m')],'token':_0x1d2428[_0x2555('7a','BZ8&')]});}}else{list=_0x297900[_0x2555('7b','5%Ij')][_0x2555('7c','4&bF')](_0x1bf854=>_0x1bf854[_0x2555('7d','*K(2')]===0x1);for(let _0x54d2d5=0x0;_0x54d2d5<_0x297900[_0x2555('7e','iu4(')]-_0x297900[_0x2555('7f','ZUoT')];_0x54d2d5++){await task(_0x1d2428[_0x2555('80','9D1i')],{'itemToken':list[_0x54d2d5][_0x2555('81','iu4(')],'token':_0x1d2428[_0x2555('82','y0dx')]});await $['wait'](0xbb8);}}}else{$[_0x2555('83','mD]m')](_0x2555('84','INbt'));}}}await _0x1d2428['jhSKc'](task,_0x2555('85','s#(7'),{'token':_0x1d2428[_0x2555('86','d]t!')]});if($[_0x2555('87','VvkS')]){for(let _0x5dcd08=0x0;_0x1d2428[_0x2555('88','mD]m')](_0x5dcd08,$[_0x2555('67','y&3R')]);_0x5dcd08++){$['log'](_0x1d2428[_0x2555('89','fXcl')]);await _0x1d2428[_0x2555('8a','^RIz')](task,_0x1d2428[_0x2555('8b','eZ^C')],{'token':'jd17919499fb7031e5'});await $[_0x2555('8c','INbt')](_0x1d2428['YayIT'](random,0x8,0xf)*0x3e8);score=_0x1d2428[_0x2555('8d','%l&5')](random,0x32,0x96);$[_0x2555('8e','*GJ9')](_0x1d2428[_0x2555('8f','VvkS')](_0x1d2428[_0x2555('90','5%Ij')]+score,'分'));await task(_0x1d2428[_0x2555('91','*K(2')],{'token':_0x1d2428[_0x2555('92','9D1i')],'score':score});await $[_0x2555('93','s#(7')](0x7d0);}}}}function task(_0x24ee10,_0x8586ec,_0x169c16=0x0){var _0xd1ed9c={'JoABK':function(_0x54ea00,_0xc77b31){return _0x54ea00===_0xc77b31;},'RdQfq':'mcxhd_brandcity_startGame','DTkKt':'queryVkComponent','ehiDk':_0x2555('94','K)St'),'WCKFx':function(_0x31401d){return _0x31401d();},'tCGNi':function(_0xb81992,_0x300456,_0x5c4d4d,_0x3c0227){return _0xb81992(_0x300456,_0x5c4d4d,_0x3c0227);}};return new Promise(_0x1b1154=>{$[_0x2555('95',']4ag')](_0xd1ed9c['tCGNi'](taskUrl,_0x24ee10,_0x8586ec,_0x169c16),async(_0x1bb062,_0x4505df,_0x2ff7a8)=>{try{if(_0x1bb062){$[_0x2555('96','y*@O')](_0x1bb062);}else{if(_0x2ff7a8){_0x2ff7a8=JSON[_0x2555('97','5%Ij')](_0x2ff7a8);if(_0xd1ed9c[_0x2555('98','YyU8')](_0x2ff7a8['retCode'],_0x2555('99','4&bF'))||_0xd1ed9c[_0x2555('9a','UC@j')](_0x2ff7a8[_0x2555('9b','INbt')],'0')){switch(_0x24ee10){case _0xd1ed9c['RdQfq']:case _0xd1ed9c['DTkKt']:case _0x2555('9c','Hcee'):case'qryViewkitCallbackResult':break;case'mcxhd_brandcity_reportGame':if(_0x2ff7a8['result'][_0x2555('9d','UC@j')]){$[_0x2555('9e','svC6')](_0x2555('9f','E]rI')+_0x2ff7a8[_0x2555('a0','%l&5')]['gift'][_0x2555('a1','LgT1')]+'】京豆');$[_0x2555('a2','8$HU')]+=_0x2ff7a8[_0x2555('a3','4&bF')]['gift']['jbeanNum'];}break;case'mcxhd_brandcity_homePage':$['log'](_0x2555('a4','8AYB')+_0x2ff7a8[_0x2555('a5','eHLh')][_0x2555('a6','8AYB')]);$[_0x2555('a7','KX1m')]=_0x2ff7a8['result'][_0x2555('a8','9i%G')];break;case'mcxhd_brandcity_taskList':$[_0x2555('a9','KX1m')]=_0x2ff7a8[_0x2555('aa','BZ8&')]['tasks'];break;case'mcxhd_brandcity_doTask':if(_0x2ff7a8[_0x2555('ab','IBct')][_0x2555('ac','v3#E')]){$[_0x2555('ad','*K(2')]=_0x2ff7a8[_0x2555('ae',']4ag')][_0x2555('af','ozJH')];}break;default:console['log'](_0x2ff7a8);break;}}else{switch(_0x24ee10){case'dz/common/getSimpleActInfoVo':break;default:$['log'](JSON[_0x2555('b0','s#(7')](_0x2ff7a8));break;}}}else{$[_0x2555('b1','UC@j')](_0xd1ed9c[_0x2555('b2','h#^&')]);}}}catch(_0x5c3d70){$[_0x2555('8e','*GJ9')](_0x5c3d70);}finally{_0xd1ed9c['WCKFx'](_0x1b1154);}});});}function taskUrl(_0x5ef9b8,_0x2b0712,_0x123225=0x0){var _0x3553b6={'AtOUf':function(_0x4b8ed5,_0x1f0b7e){return _0x4b8ed5(_0x1f0b7e);},'wzIcV':'api.m.jd.com','hUjmn':'https://h5.m.jd.com','oVvLZ':_0x2555('b3','Jtay'),'CIpNZ':_0x2555('b4','cofx'),'gBShl':_0x2555('b5','!seT')};if(_0x123225){return{'url':_0x2555('b6','9D1i')+_0x5ef9b8+_0x2555('b7','cofx')+_0x3553b6['AtOUf'](encodeURIComponent,JSON[_0x2555('b8','ZUoT')](_0x2b0712))+_0x2555('b9','9i%G')+new Date()['getTime']()['toString']()+_0x2555('ba','y0dx'),'headers':{'Host':_0x3553b6['wzIcV'],'Origin':_0x3553b6['hUjmn'],'Cookie':cookie,'Connection':_0x3553b6['oVvLZ'],'Accept':_0x2555('bb','INbt'),'User-Agent':'jdapp;iPhone;9.5.4;13.6;'+$[_0x2555('bc','VvkS')]+_0x2555('bd','mD]m')+$[_0x2555('be','5%Ij')]+';model/iPhone10,3;addressid/0;appBuild/167668;jdSupportDarkMode/0;Mozilla/5.0\x20(iPhone;\x20CPU\x20iPhone\x20OS\x2013_6\x20like\x20Mac\x20OS\x20X)\x20AppleWebKit/605.1.15\x20(KHTML,\x20like\x20Gecko)\x20Mobile/15E148;supportJDSHWK/1','Accept-Language':_0x2555('bf','Ugri'),'Referer':_0x2555('c0','o9a!'),'Accept-Encoding':_0x2555('c1','#fmE')}};}else{return{'url':_0x2555('c2','VvkS')+_0x5ef9b8+'&appid=publicUseApi&body='+JSON[_0x2555('c3','cofx')](_0x2b0712)+_0x2555('c4','svC6')+new Date()['getTime']()[_0x2555('c5','8$HU')]()+'&client=wh5&clientVersion=1.0.0&sid=&uuid='+$['UUID']+'&area=&networkType=wifi','headers':{'Host':_0x2555('c6','*K(2'),'Origin':_0x3553b6[_0x2555('c7','(6bp')],'Cookie':cookie,'Connection':'keep-alive','Accept':_0x3553b6[_0x2555('c8','svC6')],'User-Agent':_0x2555('c9','K)St')+$[_0x2555('ca','8AYB')]+_0x2555('cb','UC@j')+$[_0x2555('cc','fXcl')]+';model/iPhone10,3;addressid/0;appBuild/167668;jdSupportDarkMode/0;Mozilla/5.0\x20(iPhone;\x20CPU\x20iPhone\x20OS\x2013_6\x20like\x20Mac\x20OS\x20X)\x20AppleWebKit/605.1.15\x20(KHTML,\x20like\x20Gecko)\x20Mobile/15E148;supportJDSHWK/1','Accept-Language':_0x3553b6[_0x2555('cd','E]rI')],'Referer':_0x2555('ce','s#(7'),'Accept-Encoding':'gzip,\x20deflate,\x20br'}};}}function random(_0x1d9fc1,_0x2ec22d){var _0x779bdb={'xLYLw':function(_0x46560a,_0x1758df){return _0x46560a+_0x1758df;},'VatQA':function(_0xf22905,_0x14e101){return _0xf22905-_0x14e101;}};return _0x779bdb[_0x2555('cf','y*@O')](Math[_0x2555('d0','8$HU')](Math[_0x2555('d1','cdTE')]()*_0x779bdb[_0x2555('d2','o9a!')](_0x2ec22d,_0x1d9fc1)),_0x1d9fc1);}function getUUID(_0x4d5fa3='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',_0x52021d=0x0){var _0x13de89={'zMwIK':function(_0x3292d7,_0x301f74){return _0x3292d7|_0x301f74;},'ALYcC':function(_0x2628f4,_0x7896d3){return _0x2628f4*_0x7896d3;},'KTmtv':function(_0x36bc8e,_0x147575){return _0x36bc8e==_0x147575;},'dxZky':function(_0x50c3ce,_0x255384){return _0x50c3ce&_0x255384;}};return _0x4d5fa3[_0x2555('d3','%l&5')](/[xy]/g,function(_0x1fb025){var _0x4e0cd6=_0x13de89[_0x2555('d4','Jtay')](_0x13de89['ALYcC'](Math[_0x2555('d5','9i%G')](),0x10),0x0),_0x31d08c=_0x13de89['KTmtv'](_0x1fb025,'x')?_0x4e0cd6:_0x13de89[_0x2555('d6','LgT1')](_0x4e0cd6,0x3)|0x8;if(_0x52021d){uuid=_0x31d08c[_0x2555('d7','UC@j')](0x24)[_0x2555('d8','eZ^C')]();}else{uuid=_0x31d08c[_0x2555('d9','^RIz')](0x24);}return uuid;});}function checkCookie(){var _0x17b031={'OaSUm':_0x2555('da','%[^d'),'SzdWe':_0x2555('db','xJ1['),'rzbZK':'*/*','PSbdt':_0x2555('dc','8AYB'),'ryOVP':'zh-cn','Prbzc':_0x2555('dd','BZ8&')};const _0x225ec5={'url':_0x17b031[_0x2555('de','E]rI')],'headers':{'Host':_0x2555('df','*K(2'),'Accept':_0x17b031['rzbZK'],'Connection':_0x17b031['PSbdt'],'Cookie':cookie,'User-Agent':_0x2555('e0','%[^d'),'Accept-Language':_0x17b031[_0x2555('e1','K)St')],'Referer':_0x17b031['Prbzc'],'Accept-Encoding':'gzip,\x20deflate,\x20br'}};return new Promise(_0x19abcb=>{var _0x3c6f76={'gkfBf':function(_0x3cea1a,_0x82be08){return _0x3cea1a===_0x82be08;},'gVJcv':_0x17b031['OaSUm'],'DJnNF':function(_0x44b72b){return _0x44b72b();}};$['get'](_0x225ec5,(_0x3a1db2,_0x4aca13,_0x463260)=>{try{if(_0x3a1db2){$[_0x2555('e2','iu4(')](_0x3a1db2);}else{if(_0x463260){_0x463260=JSON[_0x2555('e3','^RIz')](_0x463260);if(_0x463260['retcode']==='1001'){$['isLogin']=![];return;}if(_0x3c6f76[_0x2555('e4','VvkS')](_0x463260['retcode'],'0')&&_0x463260['data'][_0x2555('e5','svC6')](_0x3c6f76['gVJcv'])){$['nickName']=_0x463260[_0x2555('e6','y0dx')][_0x2555('e7','UC@j')]['baseInfo']['nickname'];}}else{$[_0x2555('e8','LgT1')]('京东返回了空数据');}}}catch(_0x588aea){$['logErr'](_0x588aea);}finally{_0x3c6f76[_0x2555('e9','cdTE')](_0x19abcb);}});});}
// prettier-ignore
!function (n) { "use strict"; function t(n, t) { var r = (65535 & n) + (65535 & t); return (n >> 16) + (t >> 16) + (r >> 16) << 16 | 65535 & r } function r(n, t) { return n << t | n >>> 32 - t } function e(n, e, o, u, c, f) { return t(r(t(t(e, n), t(u, f)), c), o) } function o(n, t, r, o, u, c, f) { return e(t & r | ~t & o, n, t, u, c, f) } function u(n, t, r, o, u, c, f) { return e(t & o | r & ~o, n, t, u, c, f) } function c(n, t, r, o, u, c, f) { return e(t ^ r ^ o, n, t, u, c, f) } function f(n, t, r, o, u, c, f) { return e(r ^ (t | ~o), n, t, u, c, f) } function i(n, r) { n[r >> 5] |= 128 << r % 32, n[14 + (r + 64 >>> 9 << 4)] = r; var e, i, a, d, h, l = 1732584193, g = -271733879, v = -1732584194, m = 271733878; for (e = 0; e < n.length; e += 16)i = l, a = g, d = v, h = m, g = f(g = f(g = f(g = f(g = c(g = c(g = c(g = c(g = u(g = u(g = u(g = u(g = o(g = o(g = o(g = o(g, v = o(v, m = o(m, l = o(l, g, v, m, n[e], 7, -680876936), g, v, n[e + 1], 12, -389564586), l, g, n[e + 2], 17, 606105819), m, l, n[e + 3], 22, -1044525330), v = o(v, m = o(m, l = o(l, g, v, m, n[e + 4], 7, -176418897), g, v, n[e + 5], 12, 1200080426), l, g, n[e + 6], 17, -1473231341), m, l, n[e + 7], 22, -45705983), v = o(v, m = o(m, l = o(l, g, v, m, n[e + 8], 7, 1770035416), g, v, n[e + 9], 12, -1958414417), l, g, n[e + 10], 17, -42063), m, l, n[e + 11], 22, -1990404162), v = o(v, m = o(m, l = o(l, g, v, m, n[e + 12], 7, 1804603682), g, v, n[e + 13], 12, -40341101), l, g, n[e + 14], 17, -1502002290), m, l, n[e + 15], 22, 1236535329), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 1], 5, -165796510), g, v, n[e + 6], 9, -1069501632), l, g, n[e + 11], 14, 643717713), m, l, n[e], 20, -373897302), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 5], 5, -701558691), g, v, n[e + 10], 9, 38016083), l, g, n[e + 15], 14, -660478335), m, l, n[e + 4], 20, -405537848), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 9], 5, 568446438), g, v, n[e + 14], 9, -1019803690), l, g, n[e + 3], 14, -187363961), m, l, n[e + 8], 20, 1163531501), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 13], 5, -1444681467), g, v, n[e + 2], 9, -51403784), l, g, n[e + 7], 14, 1735328473), m, l, n[e + 12], 20, -1926607734), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 5], 4, -378558), g, v, n[e + 8], 11, -2022574463), l, g, n[e + 11], 16, 1839030562), m, l, n[e + 14], 23, -35309556), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 1], 4, -1530992060), g, v, n[e + 4], 11, 1272893353), l, g, n[e + 7], 16, -155497632), m, l, n[e + 10], 23, -1094730640), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 13], 4, 681279174), g, v, n[e], 11, -358537222), l, g, n[e + 3], 16, -722521979), m, l, n[e + 6], 23, 76029189), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 9], 4, -640364487), g, v, n[e + 12], 11, -421815835), l, g, n[e + 15], 16, 530742520), m, l, n[e + 2], 23, -995338651), v = f(v, m = f(m, l = f(l, g, v, m, n[e], 6, -198630844), g, v, n[e + 7], 10, 1126891415), l, g, n[e + 14], 15, -1416354905), m, l, n[e + 5], 21, -57434055), v = f(v, m = f(m, l = f(l, g, v, m, n[e + 12], 6, 1700485571), g, v, n[e + 3], 10, -1894986606), l, g, n[e + 10], 15, -1051523), m, l, n[e + 1], 21, -2054922799), v = f(v, m = f(m, l = f(l, g, v, m, n[e + 8], 6, 1873313359), g, v, n[e + 15], 10, -30611744), l, g, n[e + 6], 15, -1560198380), m, l, n[e + 13], 21, 1309151649), v = f(v, m = f(m, l = f(l, g, v, m, n[e + 4], 6, -145523070), g, v, n[e + 11], 10, -1120210379), l, g, n[e + 2], 15, 718787259), m, l, n[e + 9], 21, -343485551), l = t(l, i), g = t(g, a), v = t(v, d), m = t(m, h); return [l, g, v, m] } function a(n) { var t, r = "", e = 32 * n.length; for (t = 0; t < e; t += 8)r += String.fromCharCode(n[t >> 5] >>> t % 32 & 255); return r } function d(n) { var t, r = []; for (r[(n.length >> 2) - 1] = void 0, t = 0; t < r.length; t += 1)r[t] = 0; var e = 8 * n.length; for (t = 0; t < e; t += 8)r[t >> 5] |= (255 & n.charCodeAt(t / 8)) << t % 32; return r } function h(n) { return a(i(d(n), 8 * n.length)) } function l(n, t) { var r, e, o = d(n), u = [], c = []; for (u[15] = c[15] = void 0, o.length > 16 && (o = i(o, 8 * n.length)), r = 0; r < 16; r += 1)u[r] = 909522486 ^ o[r], c[r] = 1549556828 ^ o[r]; return e = i(u.concat(d(t)), 512 + 8 * t.length), a(i(c.concat(e), 640)) } function g(n) { var t, r, e = ""; for (r = 0; r < n.length; r += 1)t = n.charCodeAt(r), e += "0123456789abcdef".charAt(t >>> 4 & 15) + "0123456789abcdef".charAt(15 & t); return e } function v(n) { return unescape(encodeURIComponent(n)) } function m(n) { return h(v(n)) } function p(n) { return g(m(n)) } function s(n, t) { return l(v(n), v(t)) } function C(n, t) { return g(s(n, t)) } function A(n, t, r) { return t ? r ? s(t, n) : C(t, n) : r ? m(n) : p(n) } $.md5 = A }(this);
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) }