2022-02-11 21:32:50 +08:00
/ *
赚京豆 - 瓜分京豆脚本 , 一 : 做任务 天天领京豆 ( 加速领京豆 )
Last Modified time : 2022 - 2 - 8
活动入口 : 赚京豆 - 瓜分京豆 ( 微信小程序 ) - 赚京豆 - 瓜分京豆 - 瓜分京豆
2022-02-14 19:51:56 +08:00
更新地址 : jd _zjd . js
2022-02-11 21:32:50 +08:00
作者 : 搞鸡玩家
已支持IOS双京东账号 , Node . js支持N个京东账号
脚本兼容 : QuantumultX , Surge , Loon , 小火箭 , JSBox , Node . js
=== === === === Quantumultx === === === === ===
[ task _local ]
# 赚京豆 - 瓜分京豆
2022-02-18 17:40:22 +08:00
10 0 , 9 , 12 * * * jd _zjd . js , tag = 赚京豆 - 瓜分京豆 , img - url = https : //raw.githubusercontent.com/58xinian/icon/master/jd_syj.png, enabled=true
2022-02-11 21:32:50 +08:00
=== === === === === = Loon === === === === ==
[ Script ]
2022-02-18 17:40:22 +08:00
cron "10 0,9,12 * * *" script - path = jd _zjd . js , tag = 赚京豆 - 瓜分京豆
2022-02-11 21:32:50 +08:00
=== === === === === Surge === === === === === ==
2022-02-18 17:40:22 +08:00
赚京豆 - 瓜分京豆 = type = cron , cronexp = "10 0,9,12 * * *" , wake - system = 1 , timeout = 3600 , script - path = jd _zjd . js
2022-02-11 21:32:50 +08:00
=== === === === 小火箭 === === ===
2022-02-18 17:40:22 +08:00
赚京豆 - 瓜分京豆 = type = cron , script - path = jd _zjd . js , cronexpr = "10 0,9,12 * * *" , timeout = 3600 , enable = true
2022-02-11 21:32:50 +08:00
* /
const $ = new Env ( '赚京豆-瓜分京豆' ) ;
$ . appId = 'dde2b' ;
CryptoScripts ( )
$ . CryptoJS = $ . isNode ( ) ? require ( 'crypto-js' ) : CryptoJS ;
const notify = $ . isNode ( ) ? require ( './sendNotify' ) : '' ;
//Node.js用户请在jdCookie.js处填写京东ck;
const jdCookieNode = $ . isNode ( ) ? require ( './jdCookie.js' ) : '' ;
let jdNotify = true ; //是否关闭通知, false打开通知推送, true关闭通知推送
const randomCount = $ . isNode ( ) ? 20 : 5 ;
//IOS等用户直接用NobyDa的jd cookie
let cookiesArr = [ ] , cookie = '' , message ;
$ . tuanList = [ ] ;
$ . authorTuanList = [ ] ;
inviteCodes = [ ]
if ( $ . isNode ( ) ) {
Object . keys ( jdCookieNode ) . forEach ( ( item ) => {
cookiesArr . push ( jdCookieNode [ item ] )
} )
if ( process . env . JD _DEBUG && process . env . JD _DEBUG === 'false' ) console . log = ( ) => { } ;
if ( JSON . stringify ( process . env ) . indexOf ( 'GITHUB' ) > - 1 ) process . exit ( 0 ) ;
} else {
cookiesArr = [ $ . getdata ( 'CookieJD' ) , $ . getdata ( 'CookieJD2' ) , ... jsonParse ( $ . getdata ( 'CookiesJD' ) || "[]" ) . map ( item => item . cookie ) ] . filter ( item => ! ! item ) ;
}
const JD _API _HOST = 'https://api.m.jd.com/api' ;
! ( async ( ) => {
if ( ! cookiesArr [ 0 ] ) {
$ . msg ( $ . name , '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取' , 'https://bean.m.jd.com/bean/signIndex.action' , { "open-url" : "https://bean.m.jd.com/bean/signIndex.action" } ) ;
return ;
}
for ( let i = 0 ; i < cookiesArr . length ; i ++ ) {
if ( cookiesArr [ i ] ) {
cookie = cookiesArr [ i ] ;
$ . UserName = decodeURIComponent ( cookie . match ( /pt_pin=([^; ]+)(?=;?)/ ) && cookie . match ( /pt_pin=([^; ]+)(?=;?)/ ) [ 1 ] )
$ . index = i + 1 ;
2022-02-18 17:40:22 +08:00
$ . total = 0 ;
2022-02-11 21:32:50 +08:00
$ . isLogin = true ;
$ . nickName = '' ;
message = '' ;
await TotalBean ( ) ;
console . log ( ` \n ******开始【京东账号 ${ $ . index } 】 ${ $ . nickName || $ . UserName } ********* \n ` ) ;
if ( ! $ . isLogin ) {
$ . msg ( $ . name , ` 【提示】cookie已失效 ` , ` 京东账号 ${ $ . index } ${ $ . nickName || $ . UserName } \n 请重新登录获取 \n https://bean.m.jd.com/bean/signIndex.action ` , { "open-url" : "https://bean.m.jd.com/bean/signIndex.action" } ) ;
if ( $ . isNode ( ) ) {
await notify . sendNotify ( ` ${ $ . name } cookie已失效 - ${ $ . UserName } ` , ` 京东账号 ${ $ . index } ${ $ . UserName } \n 请重新登录获取cookie ` ) ;
}
continue
}
2022-02-18 17:40:22 +08:00
while ( $ . total < 3 ) {
$ . tuanList = [ ] ;
await main ( )
if ( ! $ . tuanList . length )
break
//$.log($.tuanList.length)
//console.log(`\n\n内部互助 【赚京豆-瓜分京豆(微信小程序)-瓜分京豆】活动(内部账号互助(需内部cookie数量大于${$.assistNum || 4}个))\n`)
console . log ( ` XXXXXXXXXXX开始账号内部互助XXXXXXXXXXXXXXXXX \n ` )
for ( let i = 0 ; i < cookiesArr . length ; i ++ ) {
$ . canHelp = true
if ( cookiesArr [ i ] ) {
cookie = cookiesArr [ i ] ;
$ . UserName = decodeURIComponent ( cookie . match ( /pt_pin=([^; ]+)(?=;?)/ ) && cookie . match ( /pt_pin=([^; ]+)(?=;?)/ ) [ 1 ] )
if ( ( cookiesArr . length > $ . assistNum ) ) {
for ( let j = 0 ; j < $ . tuanList . length ; ++ j ) {
console . log ( ` 账号 ${ $ . UserName } 开始给 【 ${ $ . tuanList [ j ] [ 'assistedPinEncrypted' ] } 】助力 \n ` )
await helpFriendTuan ( $ . tuanList [ j ] [ 'activityIdEncrypted' ] , $ . tuanList [ j ] [ 'assistStartRecordId' ] , $ . tuanList [ j ] [ 'assistedPinEncrypted' ] )
2022-02-11 21:32:50 +08:00
2022-02-18 17:40:22 +08:00
}
if ( ! $ . canHelp ) break
await $ . wait ( 3000 )
}
console . log ( 'ck数量少于4个,停止运行!\n' )
return
}
}
$ . total = $ . total + 1
2022-02-11 21:32:50 +08:00
}
}
2022-02-18 17:40:22 +08:00
}
2022-02-11 21:32:50 +08:00
} ) ( )
. catch ( ( e ) => {
$ . log ( '' , ` ❌ ${ $ . name } , 失败! 原因: ${ e } ! ` , '' )
} )
. finally ( ( ) => {
$ . done ( ) ;
} )
function showMsg ( ) {
return new Promise ( resolve => {
if ( message ) $ . msg ( $ . name , '' , ` 【京东账号 ${ $ . index } 】 ${ $ . nickName } \n ${ message } ` ) ;
resolve ( )
} )
}
async function main ( ) {
try {
await getUA ( )
await requestAlgo ( )
await distributeBeanActivity ( ) ;
await showMsg ( ) ;
} catch ( e ) {
$ . logErr ( e )
}
}
async function distributeBeanActivity ( ) {
try {
$ . tuan = ''
$ . hasOpen = false ;
$ . assistStatus = 0 ;
await getUserTuanInfo ( )
if ( ! $ . tuan && ( $ . assistStatus === 3 || $ . assistStatus === 2 || $ . assistStatus === 0 ) && $ . canStartNewAssist ) {
2022-02-18 17:40:22 +08:00
console . log ( ` 准备再次开团 \n ` )
2022-02-11 21:32:50 +08:00
await openTuan ( )
if ( $ . hasOpen ) await getUserTuanInfo ( )
}
if ( $ . tuan && $ . tuan . hasOwnProperty ( 'assistedPinEncrypted' ) && $ . assistStatus !== 3 ) {
$ . tuanList . push ( $ . tuan ) ;
}
} catch ( e ) {
$ . logErr ( e ) ;
}
}
//领取200京豆
function pg _interact _interface _invoke ( floorToken ) {
const body = { floorToken , "dataSourceCode" : "takeReward" , "argMap" : { } }
const options = {
url : ` ${ JD _API _HOST } ?functionId=pg_interact_interface_invoke&body= ${ escape ( JSON . stringify ( body ) ) } &appid=swat_miniprogram&fromType=wxapp×tamp= ${ new Date ( ) . getTime ( ) + new Date ( ) . getTimezoneOffset ( ) * 60 * 1000 + 8 * 60 * 60 * 1000 } ` ,
headers : {
"Accept" : "*/*" ,
"Accept-Encoding" : "gzip, deflate, br" ,
"Accept-Language" : "zh-cn" ,
"Connection" : "keep-alive" ,
"Content-Type" : "application/x-www-form-urlencoded" ,
"Host" : "api.m.jd.com" ,
"Referer" : "https://servicewechat.com/wxa5bf5ee667d91626/108/page-frame.html" ,
"Cookie" : cookie ,
"User-Agent" : $ . isNode ( ) ? ( process . env . JD _USER _AGENT ? process . env . JD _USER _AGENT : ( require ( './USER_AGENTS' ) . USER _AGENT ) ) : ( $ . getdata ( 'JDUA' ) ? $ . getdata ( 'JDUA' ) : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1" ) ,
}
}
return new Promise ( ( resolve ) => {
$ . post ( options , ( err , resp , data ) => {
try {
if ( err ) {
console . log ( ` ${ JSON . stringify ( err ) } ` )
console . log ( ` ${ $ . name } API请求失败, 请检查网路重试 ` )
} else {
if ( safeGet ( data ) ) {
data = JSON . parse ( data ) ;
if ( data [ 'success' ] ) {
console . log ( ` 【做任务 天天领京豆】 ${ data [ 'data' ] [ 'rewardBeanAmount' ] } 京豆领取成功 ` ) ;
$ . rewardBeanNum += data [ 'data' ] [ 'rewardBeanAmount' ] ;
message += ` ${ message ? '\n' : '' } 【做任务 天天领京豆】 ${ $ . rewardBeanNum } 京豆 ` ;
} else {
console . log ( ` 【做任务 天天领京豆】 ${ data . message } ` ) ;
}
}
}
} catch ( e ) {
$ . logErr ( e , resp )
} finally {
resolve ( ) ;
}
} )
} )
}
function openRedPacket ( floorToken ) {
const body = { floorToken , "dataSourceCode" : "openRedPacket" , "argMap" : { } }
const options = {
url : ` ${ JD _API _HOST } ?functionId=pg_interact_interface_invoke&body= ${ escape ( JSON . stringify ( body ) ) } &appid=swat_miniprogram&fromType=wxapp×tamp= ${ new Date ( ) . getTime ( ) + new Date ( ) . getTimezoneOffset ( ) * 60 * 1000 + 8 * 60 * 60 * 1000 } ` ,
headers : {
"Accept" : "*/*" ,
"Accept-Encoding" : "gzip, deflate, br" ,
"Accept-Language" : "zh-cn" ,
"Connection" : "keep-alive" ,
"Content-Type" : "application/x-www-form-urlencoded" ,
"Host" : "api.m.jd.com" ,
"Referer" : "https://servicewechat.com/wxa5bf5ee667d91626/108/page-frame.html" ,
"Cookie" : cookie ,
"User-Agent" : $ . isNode ( ) ? ( process . env . JD _USER _AGENT ? process . env . JD _USER _AGENT : ( require ( './USER_AGENTS' ) . USER _AGENT ) ) : ( $ . getdata ( 'JDUA' ) ? $ . getdata ( 'JDUA' ) : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1" ) ,
}
}
return new Promise ( ( resolve ) => {
$ . post ( options , ( err , resp , data ) => {
try {
if ( err ) {
console . log ( ` ${ JSON . stringify ( err ) } ` )
console . log ( ` ${ $ . name } API请求失败, 请检查网路重试 ` )
} else {
if ( safeGet ( data ) ) {
data = JSON . parse ( data ) ;
if ( data [ 'success' ] ) {
console . log ( ` 活动开启成功,初始: ${ data . data && data . data [ 'activityBeanInitAmount' ] } 京豆 ` )
$ . vvipFlag = true ;
} else {
console . log ( data . message )
}
}
}
} catch ( e ) {
$ . logErr ( e , resp )
} finally {
resolve ( ) ;
}
} )
} )
}
//================赚京豆-瓜分京豆-加速领京豆===========END========
//================赚京豆-瓜分京豆开团===========
function helpFriendTuan ( activityIdEncrypted = '' , assistStartRecordId = '' , assistedPinEncrypted = '' ) {
return new Promise ( async resolve => {
let body = { "activityIdEncrypted" : activityIdEncrypted , "assistStartRecordId" : assistStartRecordId , "assistedPinEncrypted" : assistedPinEncrypted , "channel" : "FISSION_BEAN" , "launchChannel" : "undefined" }
let body1 = { "activityIdEncrypted" : $ . tuanActId , "channel" : "FISSION_BEAN" }
let h5st = h5stSign ( body1 ) || 'undefined'
$ . post ( taskTuanUrl ( "vvipclub_distributeBean_assist" , body , h5st ) , async ( err , resp , data ) => {
try {
if ( err ) {
console . log ( ` ${ JSON . stringify ( err ) } ` )
console . log ( ` ${ $ . name } API请求失败, 请检查网路重试 ` )
} else {
if ( safeGet ( data ) ) {
data = JSON . parse ( data ) ;
if ( data . success ) {
console . log ( '助力结果:助力成功\n' )
} else {
if ( data . resultCode === '9200008' ) console . log ( '助力结果:不能助力自己\n' )
else if ( data . resultCode === '9200011' ) console . log ( '助力结果:已经助力过\n' )
else if ( data . resultCode === '2400205' ) console . log ( '助力结果:团已满\n' )
else if ( data . resultCode === '2400203' ) { console . log ( '助力结果:助力次数已耗尽\n' ) ; $ . canHelp = false }
else if ( data . resultCode === '9000000' ) { console . log ( '助力结果:活动火爆,跳出\n' ) ; $ . canHelp = false }
else if ( data . resultCode === '9000013' ) { console . log ( '助力结果:活动火爆,跳出\n' ) ; $ . canHelp = false }
else if ( data . resultCode === '101' ) { console . log ( '未登录,跳出\n' ) ; $ . canHelp = false }
2022-02-18 17:40:22 +08:00
else console . log ( ` 助力结果:火爆了 \n ${ JSON . stringify ( data ) } \n ` )
2022-02-11 21:32:50 +08:00
}
}
}
} catch ( e ) {
$ . logErr ( e , resp )
} finally {
resolve ( data ) ;
}
} )
} )
}
function getUserTuanInfo ( ) {
return new Promise ( async resolve => {
let body = { "paramData" : { "channel" : "FISSION_BEAN" } }
let h5st = h5stSign ( body ) || 'undefined'
$ . post ( taskTuanUrl ( "distributeBeanActivityInfo" , body , h5st ) , async ( err , resp , data ) => {
try {
if ( err ) {
console . log ( ` ${ JSON . stringify ( err ) } ` )
console . log ( ` ${ $ . name } API请求失败, 请检查网路重试 ` )
} else {
if ( safeGet ( data ) ) {
data = JSON . parse ( data ) ;
if ( data [ 'success' ] ) {
2022-02-18 17:40:22 +08:00
$ . log ( ` \n 当前能否再次开团: ${ data . data . canStartNewAssist ? '是' : '否' } \n ` )
//console.log(`assistStatus ${data.data.assistStatus}`)
2022-02-11 21:32:50 +08:00
if ( data . data . assistStatus === 1 && ! data . data . canStartNewAssist ) {
2022-02-18 17:40:22 +08:00
console . log ( ` 已开团(未达上限),但团成员人未满 \n ` )
2022-02-11 21:32:50 +08:00
} else if ( data . data . assistStatus === 3 && data . data . canStartNewAssist ) {
2022-02-18 17:40:22 +08:00
console . log ( ` 已开团(未达上限),团成员人已满 \n ` )
2022-02-11 21:32:50 +08:00
} else if ( data . data . assistStatus === 3 && ! data . data . canStartNewAssist ) {
2022-02-18 17:40:22 +08:00
console . log ( ` 今日开团已达上限,且当前团成员人已满 \n ` )
2022-02-11 21:32:50 +08:00
}
if ( data . data && ! data . data . canStartNewAssist ) {
$ . tuan = {
"activityIdEncrypted" : data . data . id ,
"assistStartRecordId" : data . data . assistStartRecordId ,
"assistedPinEncrypted" : data . data . encPin ,
"channel" : "FISSION_BEAN"
}
}
$ . tuanActId = data . data . id ;
$ . assistNum = data [ 'data' ] [ 'assistNum' ] || 4 ;
$ . assistStatus = data [ 'data' ] [ 'assistStatus' ] ;
$ . canStartNewAssist = data [ 'data' ] [ 'canStartNewAssist' ] ;
} else {
$ . tuan = true ; //活动火爆
2022-02-18 17:40:22 +08:00
console . log ( ` 获取【活动信息失败 ${ JSON . stringify ( data ) } \n ` )
2022-02-11 21:32:50 +08:00
}
}
}
} catch ( e ) {
$ . logErr ( e , resp )
} finally {
resolve ( data ) ;
}
} )
} )
}
function openTuan ( ) {
return new Promise ( async resolve => {
let body = { "activityIdEncrypted" : $ . tuanActId , "channel" : "FISSION_BEAN" }
let h5st = h5stSign ( body ) || 'undefined'
$ . post ( taskTuanUrl ( "vvipclub_distributeBean_startAssist" , body , h5st ) , async ( err , resp , data ) => {
try {
if ( err ) {
console . log ( ` ${ JSON . stringify ( err ) } ` )
console . log ( ` ${ $ . name } API请求失败, 请检查网路重试 ` )
} else {
if ( safeGet ( data ) ) {
data = JSON . parse ( data ) ;
if ( data [ 'success' ] ) {
2022-02-18 17:40:22 +08:00
console . log ( ` 开团成功 \n ` )
2022-02-11 21:32:50 +08:00
$ . hasOpen = true
} else {
console . log ( ` \n 开团失败: ${ JSON . stringify ( data ) } \n ` )
}
}
}
} catch ( e ) {
$ . logErr ( e , resp )
} finally {
resolve ( data ) ;
}
} )
} )
}
//======================赚京豆-瓜分京豆开团===========END=====
function taskUrl ( function _id , body = { } ) {
return {
url : ` ${ JD _API _HOST } ?functionId= ${ function _id } &body= ${ escape ( JSON . stringify ( body ) ) } &appid=swat_miniprogram&&h5st= ${ h5st } &osVersion=5.0.0&clientVersion=3.1.3&fromType=wxapp×tamp= ${ new Date ( ) . getTime ( ) + new Date ( ) . getTimezoneOffset ( ) * 60 * 1000 + 8 * 60 * 60 * 1000 } ` ,
headers : {
"Accept" : "*/*" ,
"Accept-Encoding" : "gzip, deflate, br" ,
"Accept-Language" : "zh-cn" ,
"Connection" : "keep-alive" ,
"Content-Type" : "application/x-www-form-urlencoded" ,
"Host" : "api.m.jd.com" ,
"Referer" : "https://servicewechat.com/wxa5bf5ee667d91626/108/page-frame.html" ,
"Cookie" : cookie ,
"User-Agent" : $ . isNode ( ) ? ( process . env . JD _USER _AGENT ? process . env . JD _USER _AGENT : ( require ( './USER_AGENTS' ) . USER _AGENT ) ) : ( $ . getdata ( 'JDUA' ) ? $ . getdata ( 'JDUA' ) : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1" ) ,
}
}
}
function taskTuanUrl ( function _id , body = { } , h5st ) {
return {
url : ` https://api.m.jd.com/api?functionId= ${ function _id } &fromType=wxapp×tamp=1644311410891 ` ,
body : ` body= ${ escape ( JSON . stringify ( body ) ) } &appid=swat_miniprogram&h5st= ${ h5st } &uuid=61673901346831643128800601&client=tjj_m&screen=1920*1080&osVersion=5.0.0&networkType=wifi&sdkName=orderDetail&sdkVersion=1.0.0&clientVersion=3.1.3&area=11 ` ,
headers : {
"Accept" : "*/*" ,
"Accept-Encoding" : "gzip, deflate, br" ,
"Accept-Language" : "zh-cn" ,
"Connection" : "keep-alive" ,
"Content-Type" : "application/x-www-form-urlencoded; Charset=UTF-8" ,
"Host" : "api.m.jd.com" ,
"Referer" : "https://servicewechat.com/wxa5bf5ee667d91626/182/page-frame.html" ,
"Cookie" : cookie ,
'User-Agent' : 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36 MicroMessenger/7.0.9.501 NetType/WIFI MiniProgramEnv/Windows WindowsWechat' ,
}
}
}
function TotalBean ( ) {
return new Promise ( async resolve => {
const options = {
url : "https://wq.jd.com/user_new/info/GetJDUserInfoUnion?sceneval=2" ,
headers : {
Host : "wq.jd.com" ,
Accept : "*/*" ,
Connection : "keep-alive" ,
Cookie : cookie ,
"User-Agent" : $ . isNode ( ) ? ( process . env . JD _USER _AGENT ? process . env . JD _USER _AGENT : ( require ( './USER_AGENTS' ) . USER _AGENT ) ) : ( $ . getdata ( 'JDUA' ) ? $ . getdata ( 'JDUA' ) : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1" ) ,
"Accept-Language" : "zh-cn" ,
"Referer" : "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&" ,
"Accept-Encoding" : "gzip, deflate, br"
}
}
$ . get ( options , ( err , resp , data ) => {
try {
if ( err ) {
$ . logErr ( err )
} else {
if ( data ) {
data = JSON . parse ( data ) ;
if ( data [ 'retcode' ] === 1001 ) {
$ . isLogin = false ; //cookie过期
return ;
}
if ( data [ 'retcode' ] === 0 && data . data && data . data . hasOwnProperty ( "userInfo" ) ) {
$ . nickName = data . data . userInfo . baseInfo . nickname ;
}
} else {
console . log ( '京东服务器返回空数据' ) ;
}
}
} catch ( e ) {
$ . logErr ( e )
} finally {
resolve ( ) ;
}
} )
} )
}
function safeGet ( data ) {
try {
if ( typeof JSON . parse ( data ) == "object" ) {
return true ;
}
} catch ( e ) {
console . log ( e ) ;
console . log ( ` 京东服务器访问数据为空,请检查自身设备网络情况 ` ) ;
return false ;
}
}
function jsonParse ( str ) {
if ( typeof str == "string" ) {
try {
return JSON . parse ( str ) ;
} catch ( e ) {
console . log ( e ) ;
$ . msg ( $ . name , '' , '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie' )
return [ ] ;
}
}
}
function getUA ( ) {
$ . UA = ` jdapp;iPhone;10.2.2;14.3; ${ randomString ( 40 ) } ;M/5.0;network/wifi;ADID/;model/iPhone12,1;addressid/4199175193;appBuild/167863;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1; `
}
function randomString ( e ) {
e = e || 32 ;
let t = "abcdef0123456789" , a = t . length , n = "" ;
for ( i = 0 ; i < e ; i ++ )
n += t . charAt ( Math . floor ( Math . random ( ) * a ) ) ;
return n
}
var _0xode = 'jsjiami.com.v6' ,
_0xode _ = [ ' _0xode' ] ,
_0x3e5c = [ _0xode , 'EcKAXEUmw7LCmw==' , 'XsO9wr/Ci1Q=' , 'wrXCnCnDm2DDtQ==' , 'wotcN33DiQ==' , 'w5BUJsKgWsKIwqM=' , 'BEXCpgYD' , 'wox6WMOlwrA=' , 'w44ORMKkw7k=' , 'VMKvRzjDtw==' , 'w4tJQ3hgBh3DvwrDtAM8w5kbI2XCpkwOJDbDgcKMEsKbB1/Cu8KOXMKLw5REDHV5wokLHz/Ci31Pwr8=' , 'NsOkVcKDLA==' , 'JGvDrC0swqhpenTDu8OswrLDik7ClhxQw45/w7/DjWV3' , 'wqQJLcKUW8KoQ8KcYzNVFcOVFFdKw5DClMORw5fDnMOuwq0=' , 'w7rCsMOnMng=' , 'woMSKHvDnhzClXvDmhLChsKXwoxYP1jDhE/DgmjCjMOZw7Q=' , 'w5ocfH/DnB/CtXDClgrCnsKDwowSOULDikHChmzDh8KOwrPCl8OvfcKHeMKwJg==' , 'w7Qgw44=' , 'CcKKQkQ6' , 'E1rDncKNwoc=' , 'wqrCjR/ClQ==' , 'wo1ZwqjCszE=' , 'wqsYN8KvTcOr' , 'w5BUIsK5ScKFw6Y=' , 'w4ZzecOd' , 'wrTClMKtwrJR' , 'wo9mwrgqaC4=' , 'wpwgLyzDr8O8' , 'w6k7w4tLw50r' , 'wq0RKcKMScOwCcOH' , 'wqsLc8K8QWHDjhQQwqJvwpNFwpfCpMK3BcO2w7h8UnxXVGoOI0p3wrZAN8K5wpc3IsObwp3DoWLCuk1owotHwrocw6XDmS8UXg==' , 'wrLDqUo=' , 'LWrCuws=' , 'w7fCkwHDk3rCtw3CmA==' , 'TFPDggvCrQ==' , 'wpPCg8K5wpNdfxfChjLCpg==' , 'wr3CusKvwq54' , 'C0rDt2XDkg==' , 'KFJkKwc=' , 'w4JkcH3CvsK7w4BcKsOp' , 'OcKiacKyDA==' , 'wppFwoHCpjM=' , 'EcOBecKiwpUT' , 'wqAYN8KDXMO6' , 'wrjCiTfDlXA=' , 'wpjCnMKTwqIeCQ==' , 'wrrClS7DmXrDqQ==' , 'f8OnHcO1SQ==' , 'dWvDshI=' , 'wqXDiQbCkBY=' , 'aMKvPw==' , 'I0MaK2c=' , 'A8OnBMOuOg==' , 'wqDDjsO/w45sw6rCksOx' , 'DcOIwpXDvBI=' , 'w6AncMK4w6p9woLDoQ==' , 'OU/DgcKtDA==' , 'ZU0ew6/DrxATwqYAwrI=' , 'w5DCu8KHw6MQ' , 'wrTCjRs=' , 'woMIcsOlwoA=' , 'bsOYfQ==' , 'EcKJW043' , 'wqZkwq8Jag==' , 'OWbCryUHw70=' , 'DcOIwq3DrQ4=' , 'wq7CjT/ClcOxQj3Clg==' , 'woPDgcKfwrcPFGIJ' , 'ZCBEwpbDksK2BMOjUcKE' , 'wqvDp2HDlcKQewcv' , 'woY6ETrDuMOnwpgM' , 'w5bDrMKfw6BwaXxx' , 'IMOGasKjH3I=' , 'wqJ7R8O7wqA=' , 'Km/Dnk3Domw=' , 'OsKmRsK+Fw==' , 'wrrClinDn3XDqQ==' , 'wqkGfsK7RXM=' , 'wp3DgcKlwq0=' , 'w48fw7Npw5c=' , 'IsOZdMKpGg==' , 'wpRhw6o=' , 'KcOHIMOsPkLCisOpwq7DnkvDqz0=' , 'dg0uV1M=' , 'en7DuDE5wqzDgsOKWMK5VjPCscOUw6Q=' , 'wo7Dl8K1wrowMGgKJ8K6wpHCtQvCnXxUJg==' , 'w7xadMOvHA==' , 'wqTCvSs=' , 'C8KpVEUR' , 'IElGPRk=' , 'LcO9wrTDojE=' , 'w4NOwrg=' , 'JMKaXMK5Hw==' , 'w7Z1SMO9Jw==' , 'Z8OSYDU=' , 'QsKpUVDCkwQ=' , 'w6fClTHDk1zCpxPCmg==' , 'w6JVTsOdPg==' , 'wqMTSMK+aA==' , 'EsOHbsKgwrg=' , 'FcKPSA==' , 'w7NIXMOzIA==' , 'MEnCrB7Cug==' , 'LHvDisKJwqg=' , 'wrIceMK1Zg==' , 'WUbDvATCkw==' , 'w5nCocOdDVo=' , 'w70qw5dpw5Y1' , 'L8OuZcOTwoo=' , 'w5NwTcOGPm4/Lg==' , 'w7nCvMOFCGLDiXLDvA==' , 'w5DCiBvDl1rCoTfCrg==' , 'worDkcK6w54BwqrDp8Oh' , 'OsOVwr/DuBQAw4HCtQ==' , 'DMKBa1Qsw5TCkyk=' , 'w6DDokhvOMOGbMK4' , 'F8OPRMKywogXeMOh' , 'G8KBVkM/w4k=' , 'wr4GQ8KsVm7Dhxs=' , 'UsK0aCbDow==' , 'OGgcJVTDtcOIGg==' , 'w4RwcMORLXM=' , 'wqQGZw==' , 'EHPCpjnCpA==' , 'bXrDvggvwp3DhMOW' , 'w70qw41mw5I4TQ==' , 'wpDDi8K4wosSCH4d' , 'woTDmcOyw7Z3w7DCqsOR' , 'wp9VKlPDhQHCiWDDkUM=' , 'wr7CnDPDr3HDvlgcwoXDow==' , 'w70qw41mw5I1' , 'wqcxfMOZwro=' , 'AsO6QcKjEQ==' , 'w7PDqG9WI8ODbsK2XGDCiV/DtsKSwq4=' , 'eHrDuikhwpDDlQ==' , 'ehAgMsKzw5Q=' , 'JMOMcMKGC2pYQXEaew==' , 'FMKLVkcqw5U=' , 'wqoSK8KhScOxBA==' , 'L2ghMkfDqA==' , 'OGI8JQ==' , 'J3DDg8KzGQ==' , 'dsOIZj9ZRg==' , 'OMOuYMOVwoVi' , 'wrXCocK6wqxD' , 'woM6ER/Dmw==' , 'WsKTIsO+w4xJIcK0csKXAGPDksOecMKG' , 'AUDDqcK2wokywpR/HsOfw6nDgCAQL04=' , 'FnrDvMKaZwvDssKSwp4Kw43DijrCqCAAAg==' , 'w4rDt8K4w6RxOj05aEXDi8OyJsKUdcOlwp3CuUHCi8Oew5fCocOm' , 'MwlCwr/Cr0xKw79xw68=' , 'AMKNUGUu' , 'jsjiami.rAcoym.vk6qlwTCTYSrWdy==' ] ;
if ( function ( _0x4aa0ba , _0x6651ee , _0x213183 ) {
function _0x3f40da ( _0x66cbe6 , _0xa8d18c , _0x11b699 , _0x11a38d , _0x57b1dc , _0x18b84b ) {
_0xa8d18c = _0xa8d18c >> 0x8 , _0x57b1dc = 'po' ;
var _0x27fb3c = 'shift' ,
_0x495bbd = 'push' ,
_0x18b84b = ' ' ;
if ( _0xa8d18c < _0x66cbe6 ) {
while ( -- _0x66cbe6 ) {
_0x11a38d = _0x4aa0ba [ _0x27fb3c ] ( ) ;
if ( _0xa8d18c === _0x66cbe6 && _0x18b84b === ' ' && _0x18b84b [ 'length' ] === 0x1 ) {
_0xa8d18c = _0x11a38d , _0x11b699 = _0x4aa0ba [ _0x57b1dc + 'p' ] ( ) ;
} else if ( _0xa8d18c && _0x11b699 [ 'replace' ] ( /[rAykqlwTCTYSrWdy=]/g , '' ) === _0xa8d18c ) {
_0x4aa0ba [ _0x495bbd ] ( _0x11a38d ) ;
}
}
_0x4aa0ba [ _0x495bbd ] ( _0x4aa0ba [ _0x27fb3c ] ( ) ) ;
}
return 0xced86 ;
} ;
return _0x3f40da ( ++ _0x6651ee , _0x213183 ) >> _0x6651ee ^ _0x213183 ;
} ( _0x3e5c , 0x1bd , 0x1bd00 ) , _0x3e5c ) {
_0xode _ = _0x3e5c [ 'length' ] ^ 0x1bd ;
} ;
function _0x5722 ( _0x583609 , _0xdaa79d ) {
_0x583609 = ~ ~ '0x' [ 'concat' ] ( _0x583609 [ 'slice' ] ( 0x1 ) ) ;
var _0x4295ed = _0x3e5c [ _0x583609 ] ;
if ( _0x5722 [ 'fwnILs' ] === undefined ) {
( function ( ) {
var _0x2e1e8e = typeof window !== 'undefined' ? window : typeof process === 'object' && typeof require === 'function' && typeof global === 'object' ? global : this ;
var _0x46d1da = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' ;
_0x2e1e8e [ 'atob' ] || ( _0x2e1e8e [ 'atob' ] = function ( _0x12157a ) {
var _0x357a6d = String ( _0x12157a ) [ 'replace' ] ( /=+$/ , '' ) ;
for ( var _0x17f039 = 0x0 , _0x7aba02 , _0x38a27d , _0x588938 = 0x0 , _0x10831c = '' ; _0x38a27d = _0x357a6d [ 'charAt' ] ( _0x588938 ++ ) ; ~ _0x38a27d && ( _0x7aba02 = _0x17f039 % 0x4 ? _0x7aba02 * 0x40 + _0x38a27d : _0x38a27d , _0x17f039 ++ % 0x4 ) ? _0x10831c += String [ 'fromCharCode' ] ( 0xff & _0x7aba02 >> ( - 0x2 * _0x17f039 & 0x6 ) ) : 0x0 ) {
_0x38a27d = _0x46d1da [ 'indexOf' ] ( _0x38a27d ) ;
}
return _0x10831c ;
} ) ;
} ( ) ) ;
function _0x38066e ( _0x5f582d , _0xdaa79d ) {
var _0x3f541e = [ ] ,
_0x5609f9 = 0x0 ,
_0x30716b , _0x28413e = '' ,
_0x180c10 = '' ;
_0x5f582d = atob ( _0x5f582d ) ;
for ( var _0x360e57 = 0x0 , _0x475e55 = _0x5f582d [ 'length' ] ; _0x360e57 < _0x475e55 ; _0x360e57 ++ ) {
_0x180c10 += '%' + ( '00' + _0x5f582d [ 'charCodeAt' ] ( _0x360e57 ) [ 'toString' ] ( 0x10 ) ) [ 'slice' ] ( - 0x2 ) ;
}
_0x5f582d = decodeURIComponent ( _0x180c10 ) ;
for ( var _0x22963d = 0x0 ; _0x22963d < 0x100 ; _0x22963d ++ ) {
_0x3f541e [ _0x22963d ] = _0x22963d ;
}
for ( _0x22963d = 0x0 ; _0x22963d < 0x100 ; _0x22963d ++ ) {
_0x5609f9 = ( _0x5609f9 + _0x3f541e [ _0x22963d ] + _0xdaa79d [ 'charCodeAt' ] ( _0x22963d % _0xdaa79d [ 'length' ] ) ) % 0x100 ;
_0x30716b = _0x3f541e [ _0x22963d ] ;
_0x3f541e [ _0x22963d ] = _0x3f541e [ _0x5609f9 ] ;
_0x3f541e [ _0x5609f9 ] = _0x30716b ;
}
_0x22963d = 0x0 ;
_0x5609f9 = 0x0 ;
for ( var _0x330cd5 = 0x0 ; _0x330cd5 < _0x5f582d [ 'length' ] ; _0x330cd5 ++ ) {
_0x22963d = ( _0x22963d + 0x1 ) % 0x100 ;
_0x5609f9 = ( _0x5609f9 + _0x3f541e [ _0x22963d ] ) % 0x100 ;
_0x30716b = _0x3f541e [ _0x22963d ] ;
_0x3f541e [ _0x22963d ] = _0x3f541e [ _0x5609f9 ] ;
_0x3f541e [ _0x5609f9 ] = _0x30716b ;
_0x28413e += String [ 'fromCharCode' ] ( _0x5f582d [ 'charCodeAt' ] ( _0x330cd5 ) ^ _0x3f541e [ ( _0x3f541e [ _0x22963d ] + _0x3f541e [ _0x5609f9 ] ) % 0x100 ] ) ;
}
return _0x28413e ;
}
_0x5722 [ 'OGaFOa' ] = _0x38066e ;
_0x5722 [ 'WQPEqO' ] = { } ;
_0x5722 [ 'fwnILs' ] = ! ! [ ] ;
}
var _0x73635e = _0x5722 [ 'WQPEqO' ] [ _0x583609 ] ;
if ( _0x73635e === undefined ) {
if ( _0x5722 [ 'QjgVLm' ] === undefined ) {
_0x5722 [ 'QjgVLm' ] = ! ! [ ] ;
}
_0x4295ed = _0x5722 [ 'OGaFOa' ] ( _0x4295ed , _0xdaa79d ) ;
_0x5722 [ 'WQPEqO' ] [ _0x583609 ] = _0x4295ed ;
} else {
_0x4295ed = _0x73635e ;
}
return _0x4295ed ;
} ;
async function requestAlgo ( ) {
var _0x236f59 = {
'fqadZ' : function ( _0x5b76a3 , _0x374415 ) {
return _0x5b76a3 !== _0x374415 ;
} ,
'DbgUc' : _0x5722 ( ' 0' , 'tYT]' ) ,
'FkuqW' : function ( _0x4d5faf ) {
return _0x4d5faf ( ) ;
} ,
'sjDWg' : _0x5722 ( ' 1' , '71I(' ) ,
'XFTCM' : function ( _0x55e4f6 , _0x21dae2 ) {
return _0x55e4f6 | _0x21dae2 ;
} ,
'HAWAS' : function ( _0x5083b1 , _0x20e5a0 ) {
return _0x5083b1 ( _0x20e5a0 ) ;
} ,
'xchEp' : function ( _0x35126b , _0x23382b ) {
return _0x35126b == _0x23382b ;
} ,
'YSvzm' : function ( _0x4f32e5 , _0x3b4c9e ) {
return _0x4f32e5 < _0x3b4c9e ;
} ,
'ZFgha' : function ( _0xe2cfaa , _0x567812 ) {
return _0xe2cfaa + _0x567812 ;
} ,
'WtFpg' : function ( _0x45f018 , _0x12d70b ) {
return _0x45f018 - _0x12d70b ;
} ,
'quvkT' : function ( _0x421043 , _0xe67bb3 ) {
return _0x421043 + _0xe67bb3 ;
} ,
'ENWZQ' : _0x5722 ( ' 2' , 'VepR' ) ,
'uMQCR' : _0x5722 ( ' 3' , 'IzVh' ) ,
'QVGNU' : _0x5722 ( ' 4' , 'cBwY' ) ,
'wcqNh' : _0x5722 ( ' 5' , 'n$S*' )
} ;
var _0x4c279a = '' ,
_0x3cf7b2 = _0x5722 ( ' 6' , 'lnMx' ) ,
_0x32e98d = _0x3cf7b2 ,
_0x54cb36 = _0x236f59 [ 'XFTCM' ] ( Math [ 'random' ] ( ) * 0xa , 0x0 ) ;
do {
ss = _0x236f59 [ 'HAWAS' ] ( getRandomIDPro , {
'size' : 0x1 ,
'customDict' : _0x3cf7b2
} ) + '' ;
if ( _0x236f59 [ _0x5722 ( ' 7' , '9I9J' ) ] ( _0x4c279a [ _0x5722 ( ' 8' , '9I9J' ) ] ( ss ) , - 0x1 ) ) _0x4c279a += ss ;
} while ( _0x236f59 [ _0x5722 ( ' 9' , 'Y^Z7' ) ] ( _0x4c279a [ _0x5722 ( ' a' , 'RRac' ) ] , 0x3 ) ) ;
for ( let _0x48780e of _0x4c279a [ _0x5722 ( ' b' , 'yqlT' ) ] ( ) ) _0x32e98d = _0x32e98d [ _0x5722 ( ' c' , 'WfFI' ) ] ( _0x48780e , '' ) ;
$ [ 'fp' ] = _0x236f59 [ _0x5722 ( ' d' , '#FOB' ) ] ( _0x236f59 [ _0x5722 ( ' e' , 'g$*r' ) ] ( getRandomIDPro ( {
'size' : _0x54cb36 ,
'customDict' : _0x32e98d
} ) , '' ) , _0x4c279a ) + _0x236f59 [ 'HAWAS' ] ( getRandomIDPro , {
'size' : _0x236f59 [ _0x5722 ( ' f' , 'TZxy' ) ] ( _0x236f59 [ 'WtFpg' ] ( 0xe , _0x236f59 [ 'quvkT' ] ( _0x54cb36 , 0x3 ) ) , 0x1 ) ,
'customDict' : _0x32e98d
} ) + _0x54cb36 + '' ;
$ [ 'fp' ] = _0x236f59 [ _0x5722 ( ' 10' , 'I85n' ) ] ;
let _0x5b175b = {
'url' : _0x5722 ( ' 11' , ')ALl' ) ,
'headers' : {
'Accept' : 'application/json' ,
'Content-Type' : _0x236f59 [ _0x5722 ( ' 12' , 'zzT%' ) ] ,
'Accept-Encoding' : _0x236f59 [ 'QVGNU' ] ,
'Accept-Language' : _0x5722 ( ' 13' , '#FOB' ) ,
'host' : 'cactus.jd.com' ,
'Referer' : 'https://cactus.jd.com' ,
'User-Agent' : 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36 MicroMessenger/7.0.9.501 NetType/WIFI MiniProgramEnv/Windows WindowsWechat' ,
} ,
'body' : ` {"version":"3.0","fp": ${ getRandomIDPro ( ) } ,"appId":"dde2b","timestamp": ${ Date . now ( ) } ,"platform":"applet","expandParams":""} ` ,
} ;
return new Promise ( async _0x53c7f3 => {
if ( _0x5722 ( ' 19' , '9I9J' ) === _0x236f59 [ _0x5722 ( ' 1a' , 'IzVh' ) ] ) {
t = new Date ( time ) ;
} else {
$ [ _0x5722 ( ' 1b' , 'b17P' ) ] ( _0x5b175b , ( _0x2c2c84 , _0x1b3374 , _0x41f319 ) => {
try {
const {
ret ,
msg ,
data : {
result
} = { }
} = JSON [ 'parse' ] ( _0x41f319 ) ;
$ [ _0x5722 ( ' 1c' , 'xBk^' ) ] = result [ 'tk' ] ;
$ [ _0x5722 ( ' 1d' , 'fP)@' ) ] = new Function ( _0x5722 ( ' 1e' , 'WfFI' ) + result [ _0x5722 ( ' 1f' , 'O*W[' ) ] ) ( ) ;
} catch ( _0x23f40a ) {
if ( _0x236f59 [ 'fqadZ' ] ( _0x236f59 [ 'DbgUc' ] , _0x236f59 [ _0x5722 ( ' 20' , 'tYT]' ) ] ) ) {
$ [ 'logErr' ] ( _0x23f40a , _0x1b3374 ) ;
} else {
$ [ _0x5722 ( ' 21' , ')UFK' ) ] ( _0x23f40a , _0x1b3374 ) ;
}
} finally {
_0x236f59 [ 'FkuqW' ] ( _0x53c7f3 ) ;
}
} ) ;
}
} ) ;
}
function getRandomIDPro ( ) {
var _0x5ce014 = {
'BCJdQ' : function ( _0x3c92e4 , _0x509a4e ) {
return _0x3c92e4 === _0x509a4e ;
} ,
'oyejR' : function ( _0x365c16 , _0x2b1dcd ) {
return _0x365c16 === _0x2b1dcd ;
} ,
'SWYwd' : _0x5722 ( ' 22' , '71I(' ) ,
'rWvqc' : function ( _0x16559d , _0x54b890 ) {
return _0x16559d == _0x54b890 ;
} ,
'MLeIJ' : _0x5722 ( ' 23' , 'zwqr' ) ,
'CQvOV' : _0x5722 ( ' 24' , 'fP)@' ) ,
'BJGKQ' : _0x5722 ( ' 25' , 'TMW@' ) ,
'oqzRd' : _0x5722 ( ' 26' , 'sywN' ) ,
'wkDiu' : function ( _0x4e5971 , _0x575151 ) {
return _0x4e5971 | _0x575151 ;
} ,
'csBpl' : function ( _0x27f35e , _0x13d632 ) {
return _0x27f35e * _0x13d632 ;
}
} ;
var _0x5f0a7a , _0x484f6f , _0x2b28ff = _0x5ce014 [ 'BCJdQ' ] ( void 0x0 , _0x58ef1d = ( _0x484f6f = 0x0 < arguments [ 'length' ] && void 0x0 !== arguments [ 0x0 ] ? arguments [ 0x0 ] : { } ) [ _0x5722 ( ' 27' , '#FOB' ) ] ) ? 0xa : _0x58ef1d ,
_0x58ef1d = _0x5ce014 [ 'oyejR' ] ( void 0x0 , _0x58ef1d = _0x484f6f [ _0x5722 ( ' 28' , 'SyL7' ) ] ) ? _0x5ce014 [ _0x5722 ( ' 29' , 'exNn' ) ] : _0x58ef1d ,
_0x1f2fbe = '' ;
if ( ( _0x484f6f = _0x484f6f [ _0x5722 ( ' 2a' , 'tYT]' ) ] ) && _0x5ce014 [ 'rWvqc' ] ( _0x5ce014 [ _0x5722 ( ' 2b' , 'tYT]' ) ] , typeof _0x484f6f ) ) _0x5f0a7a = _0x484f6f ;
else switch ( _0x58ef1d ) {
case _0x5ce014 [ 'CQvOV' ] :
_0x5f0a7a = _0x5ce014 [ _0x5722 ( ' 2c' , '5nJB' ) ] ;
break ;
case _0x5ce014 [ _0x5722 ( ' 2d' , '!R@H' ) ] :
_0x5f0a7a = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-' ;
break ;
case _0x5ce014 [ 'SWYwd' ] :
default :
_0x5f0a7a = _0x5722 ( ' 2e' , '71I(' ) ;
}
for ( ; _0x2b28ff -- ; ) _0x1f2fbe += _0x5f0a7a [ _0x5ce014 [ _0x5722 ( ' 2f' , 'w3T]' ) ] ( _0x5ce014 [ _0x5722 ( ' 30' , 'xBk^' ) ] ( Math [ _0x5722 ( ' 31' , 'VepR' ) ] ( ) , _0x5f0a7a [ _0x5722 ( ' 32' , 'fP)@' ) ] ) , 0x0 ) ] ;
return _0x1f2fbe ;
}
function h5stSign ( _0x16a27f ) {
var _0x4b101c = {
'BUaSH' : function ( _0x1addd5 , _0x56d688 ) {
return _0x1addd5 + _0x56d688 ;
} ,
'igcni' : 'value' ,
'oDUzA' : _0x5722 ( ' 33' , 'RRac' ) ,
'IflDx' : _0x5722 ( ' 34' , '7Rz$' ) ,
'ILMgj' : 'body' ,
'dziYL' : _0x5722 ( ' 35' , 'RRac' ) ,
'HOTGG' : 'clientVersion' ,
'Erlzo' : _0x5722 ( ' 36' , 'w3T]' ) ,
'UAmWZ' : 'party_rt_assist' ,
'Empfp' : _0x5722 ( ' 37' , 'exNn' ) ,
'KePDb' : 'yyyyMMddhhmmssSSS' ,
'uXyRi' : _0x5722 ( ' 38' , 'SyL7' ) ,
'oVeqz' : _0x5722 ( ' 39' , 'Y6zP' ) ,
'UPJKd' : function ( _0x4f11c4 , _0x1e6c2d ) {
return _0x4f11c4 ( _0x1e6c2d ) ;
}
} ;
let _0x137258 = [ {
'key' : _0x4b101c [ _0x5722 ( ' 3a' , '!ydp' ) ] ,
'value' : 'activities_platform'
} , {
'key' : _0x4b101c [ _0x5722 ( ' 3b' , 'Tg(&' ) ] ,
'value' : $ [ _0x5722 ( ' 3c' , 'wrSy' ) ] [ 'SHA256' ] ( $ [ _0x5722 ( ' 3d' , 'lIgg' ) ] ( _0x16a27f , _0x16a27f ) ) [ _0x5722 ( ' 3e' , 'TZxy' ) ] ( )
} , {
'key' : _0x4b101c [ 'dziYL' ] ,
'value' : 'applet'
} , {
'key' : _0x4b101c [ _0x5722 ( ' 3f' , 'cBwY' ) ] ,
'value' : _0x4b101c [ 'Erlzo' ]
} , {
'key' : _0x5722 ( ' 40' , 'lnMx' ) ,
'value' : 'vvipclub_distributeBean_startAssist'
} , {
'key' : 't' ,
'value' : Date [ _0x5722 ( ' 42' , 'b17P' ) ] ( )
} ] ;
let _0x2d7791 = _0x137258 [ 'map' ] ( function ( _0x2d64bd ) {
return _0x4b101c [ _0x5722 ( ' 43' , 'hoOY' ) ] ( _0x2d64bd [ _0x5722 ( ' 44' , 'rAKg' ) ] , ':' ) + _0x2d64bd [ _0x4b101c [ _0x5722 ( ' 45' , '9I9J' ) ] ] ;
} ) [ _0x4b101c [ _0x5722 ( ' 46' , ')UFK' ) ] ] ( '&' ) ;
let _0x4fa26b = Date [ 'now' ] ( ) ;
let _0x3ed202 = '' ;
let _0x2cecaf = format ( _0x4b101c [ 'KePDb' ] , _0x4fa26b ) ;
_0x3ed202 = $ [ _0x5722 ( ' 47' , '#FOB' ) ] ( $ [ _0x5722 ( ' 48' , 'lIgg' ) ] , $ [ 'fp' ] [ 'toString' ] ( ) , _0x2cecaf [ 'toString' ] ( ) , _0x4b101c [ 'uXyRi' ] [ _0x5722 ( ' 49' , 'b17P' ) ] ( ) , $ [ 'CryptoJS' ] ) [ _0x5722 ( ' 4a' , '7Rz$' ) ] ( ) ;
const _0x1c4805 = $ [ 'CryptoJS' ] [ _0x5722 ( ' 4b' , '%PEG' ) ] ( _0x2d7791 , _0x3ed202 [ _0x5722 ( ' 4c' , 'sywN' ) ] ( ) ) [ _0x5722 ( ' 4d' , '71I(' ) ] ( ) ;
let _0x55c9fe = [ '' [ 'concat' ] ( _0x2cecaf [ 'toString' ] ( ) ) , '' [ 'concat' ] ( $ [ 'fp' ] [ _0x5722 ( ' 4e' , 'n$S*' ) ] ( ) ) , '' [ _0x5722 ( ' 4f' , 'zzT%' ) ] ( _0x5722 ( ' 50' , 'TZxy' ) [ _0x5722 ( ' 4a' , '7Rz$' ) ] ( ) ) , '' [ _0x5722 ( ' 51' , '5nJB' ) ] ( $ [ _0x5722 ( ' 52' , 'w3T]' ) ] ) , '' [ _0x5722 ( ' 53' , 'RRac' ) ] ( _0x1c4805 ) , _0x4b101c [ 'oVeqz' ] , '' [ _0x5722 ( ' 54' , 'TMW@' ) ] ( _0x4fa26b ) ] [ _0x5722 ( ' 55' , '7Rz$' ) ] ( ';' )
return _0x4b101c [ _0x5722 ( ' 56' , 'zwqr' ) ] ( encodeURIComponent , _0x55c9fe ) ;
}
function format ( _0x3b3946 , _0x57ab39 ) {
var _0x2b4c38 = {
'jSqbf' : 'value' ,
'FMiFO' : _0x5722 ( ' 57' , 'zzT%' ) ,
'QjVOk' : 'o2_act' ,
'EJPor' : 'client' ,
'izXfL' : _0x5722 ( ' 58' , ')UFK' ) ,
'WJuOB' : _0x5722 ( ' 59' , 'Tg(&' ) ,
'qgyfB' : _0x5722 ( ' 5a' , '!R@H' ) ,
'pzCVZ' : _0x5722 ( ' 5b' , '3L1^' ) ,
'xuhmB' : 'join' ,
'FBgxZ' : function ( _0x277431 , _0x210f7a , _0x2e532b ) {
return _0x277431 ( _0x210f7a , _0x2e532b ) ;
} ,
'TrKqJ' : _0x5722 ( ' 5c' , '7Rz$' ) ,
'CUxDE' : _0x5722 ( ' 5d' , 'TMW@' ) ,
'HypbS' : '3.1' ,
'jwcTE' : function ( _0x6d2876 , _0x5b3211 ) {
return _0x6d2876 ( _0x5b3211 ) ;
} ,
'VpVYR' : _0x5722 ( ' 5e' , 'G^Kg' ) ,
'gjXDz' : 'yyyy-MM-dd' ,
'TZrjQ' : _0x5722 ( ' 5f' , '9I9J' ) ,
'tmHfr' : function ( _0x425847 , _0x553802 ) {
return _0x425847 + _0x553802 ;
} ,
'ASEco' : function ( _0x7279d2 , _0xec4d8 ) {
return _0x7279d2 / _0xec4d8 ;
}
} ;
if ( ! _0x3b3946 ) _0x3b3946 = _0x2b4c38 [ _0x5722 ( ' 60' , '!R@H' ) ] ;
var _0x119460 ;
if ( ! _0x57ab39 ) {
if ( _0x2b4c38 [ 'TZrjQ' ] !== _0x2b4c38 [ _0x5722 ( ' 61' , 'lIgg' ) ] ) {
var _0x5c0b26 = {
'TWBAl' : function ( _0x4213a0 , _0x3e02d4 ) {
return _0x4213a0 + _0x3e02d4 ;
} ,
'LKSSH' : _0x5722 ( ' 62' , '7JdI' ) ,
'hrRqG' : _0x2b4c38 [ _0x5722 ( ' 63' , 'w3T]' ) ]
} ;
let _0x4c69ef = [ {
'key' : _0x2b4c38 [ 'FMiFO' ] ,
'value' : _0x2b4c38 [ _0x5722 ( ' 64' , 'O*W[' ) ]
} , {
'key' : _0x5722 ( ' 65' , 'rAKg' ) ,
'value' : $ [ 'CryptoJS' ] [ _0x5722 ( ' 66' , 'I85n' ) ] ( $ [ 'toStr' ] ( body , body ) ) [ _0x5722 ( ' 67' , 'SyL7' ) ] ( )
} , {
'key' : _0x2b4c38 [ _0x5722 ( ' 68' , 'O*W[' ) ] ,
'value' : _0x2b4c38 [ _0x5722 ( ' 69' , 'TMW@' ) ]
} , {
'key' : _0x2b4c38 [ 'WJuOB' ] ,
'value' : _0x2b4c38 [ _0x5722 ( ' 6a' , 'VepR' ) ]
} , {
'key' : 'functionId' ,
'value' : _0x2b4c38 [ 'pzCVZ' ]
} , {
'key' : 't' ,
'value' : Date [ 'now' ] ( )
} ] ;
let _0xe6d7be = _0x4c69ef [ _0x5722 ( ' 6b' , '9I9J' ) ] ( function ( _0x1a232b ) {
return _0x5c0b26 [ _0x5722 ( ' 6c' , 'O*W[' ) ] ( _0x5c0b26 [ _0x5722 ( ' 6d' , 'g9zi' ) ] ( _0x1a232b [ _0x5c0b26 [ _0x5722 ( ' 6e' , 'IzVh' ) ] ] , ':' ) , _0x1a232b [ _0x5c0b26 [ 'hrRqG' ] ] ) ;
} ) [ _0x2b4c38 [ _0x5722 ( ' 6f' , 'TMW@' ) ] ] ( '&' ) ;
let _0x8d4b31 = Date [ 'now' ] ( ) ;
let _0x30adc7 = '' ;
let _0x4cc82c = _0x2b4c38 [ _0x5722 ( ' 70' , 'exNn' ) ] ( format , _0x2b4c38 [ _0x5722 ( ' 71' , 'jFAu' ) ] , _0x8d4b31 ) ;
_0x30adc7 = $ [ _0x5722 ( ' 72' , 'zwqr' ) ] ( $ [ _0x5722 ( ' 73' , 'Y6zP' ) ] , $ [ 'fp' ] [ 'toString' ] ( ) , _0x4cc82c [ _0x5722 ( ' 74' , 'O*W[' ) ] ( ) , _0x2b4c38 [ 'CUxDE' ] [ _0x5722 ( ' 75' , 'jFAu' ) ] ( ) , $ [ _0x5722 ( ' 76' , 'SyL7' ) ] ) [ _0x5722 ( ' 77' , 'WcWE' ) ] ( ) ;
const _0x3bef71 = $ [ _0x5722 ( ' 78' , 'lIgg' ) ] [ 'HmacSHA256' ] ( _0xe6d7be , _0x30adc7 [ _0x5722 ( ' 79' , '9I9J' ) ] ( ) ) [ _0x5722 ( ' 7a' , 'G^Kg' ) ] ( ) ;
let _0x30ebad = [ '' [ 'concat' ] ( _0x4cc82c [ _0x5722 ( ' 7b' , 'VepR' ) ] ( ) ) , '' [ _0x5722 ( ' 7c' , '9I9J' ) ] ( $ [ 'fp' ] [ _0x5722 ( ' 7d' , 'TMW@' ) ] ( ) ) , '' [ 'concat' ] ( _0x2b4c38 [ _0x5722 ( ' 7e' , 'I85n' ) ] [ _0x5722 ( ' 7f' , '!ydp' ) ] ( ) ) , '' [ 'concat' ] ( $ [ 'token' ] ) , '' [ 'concat' ] ( _0x3bef71 ) , _0x2b4c38 [ 'HypbS' ] , '' [ _0x5722 ( ' 80' , 'O*W[' ) ] ( _0x8d4b31 ) ] [ 'join' ] ( ';' ) ;
return _0x2b4c38 [ 'jwcTE' ] ( encodeURIComponent , _0x30ebad ) ;
} else {
_0x119460 = Date [ _0x5722 ( ' 81' , 'TMW@' ) ] ( ) ;
}
} else {
_0x119460 = new Date ( _0x57ab39 ) ;
}
var _0xd7a8f2 , _0x514fe8 = new Date ( _0x119460 ) ,
_0x117011 = _0x3b3946 ,
_0x589edc = {
'M+' : _0x2b4c38 [ _0x5722 ( ' 82' , 'g9zi' ) ] ( _0x514fe8 [ _0x5722 ( ' 83' , '3L1^' ) ] ( ) , 0x1 ) ,
'd+' : _0x514fe8 [ 'getDate' ] ( ) ,
'D+' : _0x514fe8 [ _0x5722 ( ' 84' , 'zwqr' ) ] ( ) ,
'h+' : _0x514fe8 [ _0x5722 ( ' 85' , '7Rz$' ) ] ( ) ,
'H+' : _0x514fe8 [ _0x5722 ( ' 86' , 'wrSy' ) ] ( ) ,
'm+' : _0x514fe8 [ _0x5722 ( ' 87' , 'yqlT' ) ] ( ) ,
's+' : _0x514fe8 [ _0x5722 ( ' 88' , 'RRac' ) ] ( ) ,
'w+' : _0x514fe8 [ _0x5722 ( ' 89' , 'zwqr' ) ] ( ) ,
'q+' : Math [ _0x5722 ( ' 8a' , 'hoOY' ) ] ( _0x2b4c38 [ _0x5722 ( ' 8b' , 'zzT%' ) ] ( _0x514fe8 [ 'getMonth' ] ( ) + 0x3 , 0x3 ) ) ,
'S+' : _0x514fe8 [ _0x5722 ( ' 8c' , 'G^Kg' ) ] ( )
} ;
/(y+)/i [ 'test' ] ( _0x117011 ) && ( _0x117011 = _0x117011 [ _0x5722 ( ' 8d' , '3L1^' ) ] ( RegExp [ '$1' ] , '' [ _0x5722 ( ' 8e' , 'qXjd' ) ] ( _0x514fe8 [ _0x5722 ( ' 8f' , 'zzT%' ) ] ( ) ) [ 'substr' ] ( 0x4 - RegExp [ '$1' ] [ _0x5722 ( ' 90' , '9I9J' ) ] ) ) ) ;
Object [ 'keys' ] ( _0x589edc ) [ _0x5722 ( ' 91' , 'fP)@' ) ] ( _0xd7a8f2 => {
if ( new RegExp ( '(' [ _0x5722 ( ' 92' , '!ydp' ) ] ( _0xd7a8f2 , ')' ) ) [ _0x5722 ( ' 93' , '!ydp' ) ] ( _0x117011 ) ) {
var _0x119460 , _0x3b3946 = 'S+' === _0xd7a8f2 ? _0x2b4c38 [ _0x5722 ( ' 94' , 'cBwY' ) ] : '00' ;
_0x117011 = _0x117011 [ 'replace' ] ( RegExp [ '$1' ] , 0x1 == RegExp [ '$1' ] [ 'length' ] ? _0x589edc [ _0xd7a8f2 ] : '' [ 'concat' ] ( _0x3b3946 ) [ 'concat' ] ( _0x589edc [ _0xd7a8f2 ] ) [ _0x5722 ( ' 95' , 'rAKg' ) ] ( '' [ _0x5722 ( ' 96' , 'Y6zP' ) ] ( _0x589edc [ _0xd7a8f2 ] ) [ 'length' ] ) ) ;
}
} ) ;
return _0x117011 ;
} ;
_0xode = 'jsjiami.com.v6' ;
function CryptoScripts ( ) {
// prettier-ignore
! function ( t , e ) { "object" == typeof exports ? module . exports = exports = e ( ) : "function" == typeof define && define . amd ? define ( [ ] , e ) : t . CryptoJS = e ( ) } ( this , function ( ) { var t , e , r , i , n , o , s , c , a , h , l , f , d , u , p , _ , v , y , g , B , w , k , S , m , x , b , H , z , A , C , D , E , R , M , F , P , W , O , I , U , K , X , L , j , N , T , q , Z , V , G , J , $ , Q , Y , tt , et , rt , it , nt , ot , st , ct , at , ht , lt , ft , dt , ut , pt , _t , vt , yt , gt , Bt , wt , kt , St , mt = mt || function ( t ) { var e ; if ( "undefined" != typeof window && window . crypto && ( e = window . crypto ) , ! e && "undefined" != typeof window && window . msCrypto && ( e = window . msCrypto ) , ! e && "undefined" != typeof global && global . crypto && ( e = global . crypto ) , ! e && "function" == typeof require ) try { e = require ( "crypto" ) } catch ( e ) { } function r ( ) { if ( e ) { if ( "function" == typeof e . getRandomValues ) try { return e . getRandomValues ( new Uint32Array ( 1 ) ) [ 0 ] } catch ( t ) { } if ( "function" == typeof e . randomBytes ) try { return e . randomBytes ( 4 ) . readInt32LE ( ) } catch ( t ) { } } throw new Error ( "Native crypto module could not be used to get secure random number." ) } var i = Object . create || function ( t ) { var e ; return n . prototype = t , e = new n , n . prototype = null , e } ; function n ( ) { } var o = { } , s = o . lib = { } , c = s . Base = { extend : function ( t ) { var e = i ( this ) ; return t && e . mixIn ( t ) , e . hasOwnProperty ( "init" ) && this . init !== e . init || ( e . init = function ( ) { e . $super . init . apply ( this , arguments ) } ) , ( e . init . prototype = e ) . $super = this , e } , create : function ( ) { var t = this . extend ( ) ; return t . init . apply ( t , arguments ) , t } , init : function ( ) { } , mixIn : function ( t ) { for ( var e in t ) t . hasOwnProperty ( e ) && ( this [ e ] = t [ e ] ) ; t . hasOwnProperty ( "toString" ) && ( this . toString = t . toString ) } , clone : function ( ) { return this . init . prototype . extend ( this ) } } , a = s . WordArray = c . extend ( { init : function ( t , e ) { t = this . words = t || [ ] , this . sigBytes = null != e ? e : 4 * t . length } , toString : function ( t ) { return ( t || l ) . stringify ( this ) } , concat : function ( t ) { var e = this . words , r = t . words , i = this . sigBytes , n = t . sigBytes ; if ( this . clamp ( ) , i % 4 ) for ( var o = 0 ; o < n ; o ++ ) { var s = r [ o >>> 2 ] >>> 24 - o % 4 * 8 & 255 ; e [ i + o >>> 2 ] |= s << 24 - ( i + o ) % 4 * 8 } else for ( o = 0 ; o < n ; o += 4 ) e [ i + o >>> 2 ] = r [ o >>> 2 ] ; return this . sigBytes += n , this } , clamp : function ( ) { var e = this . words , r = this . sigBytes ; e [ r >>> 2 ] &= 4294967295 << 32 - r % 4 * 8 , e . length = t . ceil ( r / 4 ) } , clone : function ( ) { var t = c . clone . call ( this ) ; return t . words = this . words . slice ( 0 ) , t } , random : function ( t ) { for ( var e = [ ] , i = 0 ; i < t ; i += 4 ) e . push ( r ( ) ) ; return new a . init ( e , t ) } } ) , h = o . enc = { } , l = h . Hex = { stringify : function ( t ) { for ( var e = t . words , r = t . sigBytes , i = [ ] , n = 0 ; n < r ; n ++ ) { var o = e [ n >>> 2 ] >>> 24 - n % 4 * 8 & 255 ; i . push ( ( o >>> 4 ) . toString ( 16 ) ) , i . push ( ( 15 & o ) . toString ( 16 ) ) } return i . join ( "" ) } , parse : function ( t ) { for ( var e = t . length , r = [ ] , i = 0 ; i < e ; i += 2 ) r [ i >>> 3 ] |= parseInt ( t . substr ( i , 2 ) , 16 ) << 24 - i % 8 * 4 ; return new a . init ( r , e / 2 ) } } , f = h . Latin1 = { stringify : function ( t ) { for ( var e = t . words , r = t . sigBytes , i = [ ] , n = 0 ; n < r ; n ++ ) { var o = e [ n >>> 2 ] >>> 24 - n % 4 * 8 & 255 ; i . push ( String . fromCharCode ( o ) ) } return i . join ( "" ) } , parse : function ( t ) { for ( var e = t . length , r = [ ] , i = 0 ; i < e ; i ++ ) r [ i >>> 2 ] |= ( 255 & t . charCodeAt ( i ) ) << 24 - i % 4 * 8 ; return new a . init ( r , e ) } } , d = h . Utf8 = { stringify : function ( t ) { try { return decodeURIComponent ( escape ( f . stringify ( t ) ) ) } catch ( t ) { throw new Error ( "Malformed UTF-8 data" ) } } , parse : function ( t ) { return f . parse ( unescape ( encodeURIComponent ( t ) ) ) } } , u = s . BufferedBlockAlgorithm = c . extend ( { reset : function ( ) { this . _data = new a . init , this . _nDataBytes = 0 } , _append : function ( t ) { "string" == typeof t && ( t = d . parse ( t ) ) , this . _data . concat ( t ) , this . _nDataBytes += t . sigBytes } , _process : function ( e ) { var r , i = this . _data , n = i . words , o = i . sigBytes , s = this . blockSize , c = o / ( 4 * s ) , h = ( c = e ? t . ceil ( c ) : t . max ( ( 0 | c ) - this . _minBufferSize , 0 ) ) * s , l = t . min ( 4 * h , o ) ; if ( h ) { for ( var f = 0 ; f < h ; f += s ) this . _doProcessBlock ( n , f ) ; r = n . splice ( 0 , h ) , i . sigBytes -= l } return new a . init ( r , l ) } , clone : function ( ) { var t = c . clone . call ( this ) ; return t . _data = this . _data . clone ( ) , t } , _minBufferSize : 0 } ) , p = ( s . Hasher = u . extend ( { cfg : c . extend ( ) , init : function ( t ) { this . cfg = this . cfg . extend ( t ) , this . reset ( ) } , reset : function ( ) { u . reset . call ( this ) , this . _doReset ( ) } , update : function ( t ) { return this . _append ( t ) , this . _process ( ) , this } , finalize : function ( t ) { return t && this . _append ( t ) , this . _doFinalize ( ) } , blockSize : 16 , _createHelper : function ( t ) { return function ( e , r ) { return new t . init ( r ) . finalize ( e ) } } , _createHmacHelper : function ( t ) { return function ( e , r ) { return new p . HMAC . init ( t , r ) . finalize ( e ) } } } ) , o . algo = { } ) ; return o } ( Math ) ; function xt ( t , e , r ) { return t ^ e ^ r } fu
}
// 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" ] )