2023-07-28 10:10:43 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const il1I11=iii1II;(function(IiIlil,I1lil,IiIlii,liIi1i,IlIIII,lii1iI,lll1Il){return IiIlil=IiIlil>>0x3,lii1iI='hs',lll1Il='hs',function(lI1l1,lll1Ii,iilI1,lli11i,liIi1l){const lll1II=iii1II;lli11i='tfi',lii1iI=lli11i+lii1iI,liIi1l='up',lll1Il+=liIi1l,lii1iI=iilI1(lii1iI),lll1Il=iilI1(lll1Il),iilI1=0x0;const ll1iII=lI1l1();while(!![]&&--liIi1i+lll1Ii){try{lli11i=parseInt(lll1II(0x2ad,'DYF['))/0x1+-parseInt(lll1II(0x32c,'UEWH'))/0x2+-parseInt(lll1II(0x4db,'vw^J'))/0x3*(-parseInt(lll1II(0x35a,'k5jQ'))/0x4)+parseInt(lll1II(0x436,']b(a'))/0x5*(-parseInt(lll1II(0x368,'lGay'))/0x6)+-parseInt(lll1II(0x1ce,'HF%l'))/0x7+parseInt(lll1II(0x3bc,'yZy6'))/0x8*(parseInt(lll1II(0x183,'CPj]'))/0x9)+parseInt(lll1II(0x58f,'CPj]'))/0xa;}catch(lli11l){lli11i=iilI1;}finally{liIi1l=ll1iII[lii1iI]();if(IiIlil<=liIi1i)iilI1?IlIIII?lli11i=liIi1l:IlIIII=liIi1l:iilI1=liIi1l;else{if(iilI1==IlIIII['replace'](/[BybxQlLPCgIWUGuhFDAtX=]/g,'')){if(lli11i===lll1Ii){ll1iII['un'+lii1iI](liIi1l);break;}ll1iII[lll1Il](liIi1l);}}}}}(IiIlii,I1lil,function(I1ll1,ll1iI1,i1iII,IiIliI,IlIl11,lI1lI,il1Il){return ll1iI1='\x73\x70\x6c\x69\x74',I1ll1=arguments[0x0],I1ll1=I1ll1[ll1iI1](''),i1iII='\x72\x65\x76\x65\x72\x73\x65',I1ll1=I1ll1[i1iII]('\x76'),IiIliI='\x6a\x6f\x69\x6e',(0x136843,I1ll1[IiIliI](''));});}(0x608,0xb9513,Iii11l,0xc3),Iii11l)&&(version_=Iii11l);const IIilI1=$[il1I11(0x442,'hMuB')]()?require(il1I11(0x385,'6Jo1')):'',li1Il1=$['isNode']()?require('./jdCookie'):'',i1ii1I=require(il1I11(0x3d4,'tw16')),iil1=require(il1I11(0x221,'NF^H')),iiIIiI=require(il1I11(0x4f9,'P&[5'));let i1liII={},ilII1i='',ill1I=[],ilII1l='',IIilII='',l1Iil1='',IIiIl=process[il1I11(0x2f5,'NI3o')][il1I11(0x557,'7%G%')]?process[il1I11(0x379,'cg1@')]['jd_pointExgShiWu_activityUrl']:'',iiiiI1=null;if($[il1I11(0x547,'8Nb!')]()){if(JSON[il1I11(0x526,'HaJf')](process[il1I11(0x254,'HaJf')])[il1I11(0x402,'7%OK')](il1I11(0x608,'GBoa'))>-0x1)process['exit'](0x0);Object[il1I11(0x30f,'3[$4')](li1Il1)['forEach'](l1Iili=>{const lli11I=il1I11;ill1I[lli11I(0x5cf,'NI3o')](li1Il1[l1Iili]);});if(process[il1I11(0x301,'Fh!e')][il1I11(0x27a,'P&[5')]&&process[il1I11(0x324,'H@W(')]['JD_DEBUG']==='false')console['log']=()=>{};}else ill1I=[$[il1I11(0x284,'hMuB')](il1I11(0x391,'HaJf')),$[il1I11(0x39d,'n@7!')](il1I11(0x3e8,'xn0N')),...$[il1I11(0x37c,'G]kq')]($[il1I11(0x1af,'&SGy')]('CookiesJD')||'[]')['map'](IIi11l=>IIi11l[il1I11(0x382,'UEWH')])]['filter'](l1Iill=>!!l1Iill);let IIiIi=process[il1I11(0x2ca,'@KV#')]['JD_LZ_OPEN']?process[il1I11(0x446,'n@7!')][il1I11(0x5a7,'G]kq')]:il1I11(0x2b9,'DYF['),i1ii1i=process[il1I11(0x203,'85yH')][il1I11(0x1d3,'6Jo1')]?process[il1I11(0x5f9,'HLHZ')][il1I11(0x513,'%4Th')]:il1I11(0x268,']b(a'),iiii='',iiil='';$['whitelist']=process[il1I11(0x203,'85yH')][il1I11(0x42a,'yZy6')]||iiii,$[il1I11(0x38c,'n@7!')]=process[il1I11(0x1f4,'lGay')][il1I11(0x196,'8Nb!')]||iiil,IIl1Il(),li1Ill();if(IIiIl)activityId=lIlIil(''+IIiIl,'giftId'),venderId=lIlIil(''+IIiIl,'venderId'),$[il1I11(0x536,'U%n6')]=IIiIl[il1I11(0x262,']b(a')](/https?:\/\/([^/]+)/)[0x1];else{console[il1I11(0x492,'n8(n')](il1I11(0x609,'TJ73'));return;}let li1Iil=il1I11(0x185,'tmFF')+$[il1I11(0x449,'HF%l')];!(async()=>{const ii1lI1=il1I11,iiiiIi={'bboXU':ii1lI1(0x214,'7%G%'),'hfhyW':function(IIi11i,iiIIli){return IIi11i+iiIIli;},'WiHDs':ii1lI1(0x4e4,'6Jo1'),'VvGaA':ii1lI1(0x4b6,'6Jo1'),'mWNOY':ii1lI1(0x3f0,'H@W('),'ijqaC':'随机抽取到的收货地址信息为空,请正确使用\x20\x22|\x22\x20管道符以用于分割多个收货地址!','tKpxP':function(iili,IIl1Ii){return iili===IIl1Ii;},'Vbnug':'false','KzlEL':ii1lI1(0x503,'lGay'),'xryEI':function(ilIIl,I11ll1){return ilIIl!==I11ll1;},'wpYwV':'uHUEI','iraPY':ii1lI1(0x589,'[jyL'),'OUmsJ':'店铺id不存在!','wbfXR':function(lIIII,li1IlI){return lIIII===li1IlI;},'LZuJj':ii1lI1(0x15e,'HLHZ'),'DKtTV':'LaMUP','OylWm':ii1lI1(0x63b,'M%0]'),'CHpIY':ii1lI1(0x4ca,'H@W('),'xLYDf':function(iiI1i,iiI1l){return iiI1i*iiI1l;},'RcNwf':function(Ili1lI,lIlIl1){return Ili1lI==lIlIl1;},'SnyWA':function(ilIIi,IiII1l){return ilIIi!=IiII1l;},'OqKtS':'随<EFBFBD><EFBFBD>
|
|
|
|
|
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"])
|