KR/jd_dongDongFarm_draw.js

11 lines
43 KiB
JavaScript
Raw Normal View History

2023-10-29 12:06:52 +08:00
/*
2023-10-30 20:08:37 +08:00
新东东农场幸运转盘
2023-10-29 12:06:52 +08:00
2023-10-30 20:08:37 +08:00
cron "55 5 * * *" script-path=jd_dongDongFarm_draw.js, tag=新东东农场幸运转盘
2023-10-29 12:06:52 +08:00
*/
2023-10-30 20:08:37 +08:00
const $ = new Env('新东东农场幸运转盘')
2023-10-31 01:51:28 +08:00
var version_='jsjiami.com.v7';function Iii11l(){const iiIiII=(function(){return[...[version_,'LjwsxGjJdirPaGgmiNb.QcfoHmLu.v7yFCAYMITQ==','WQddSGJdPsn6W5e','iCo7h8k6WQBdSSoueW','WRRcV8kRyW','htmCvG','W5uYW5G7rs3cLSo0hq','wSkNBIj9','W5/dGZ3cI0ZdNHhcLmoglSk/W4Wj','W4OIW7ewEG','WQtcMdVdPSkvWQBcJw1RWQvbW7FcTbRdLwxcLCk2nmo7tSkPW7pdG8k9sbBdTaWet34B','W54vq8k1WR8','wIFcGGbAaCoqtW','WQNcHZ/dVSkzWRFcLvPQWQTbWRVcUXO','WQNcMItdN8k/','zCkVCsfS','WP5ph8oAWOFcKa','hCkqySotqq','p1pdQSoLWRy','WPSXW4O','W7jtu8oDxq','WQS4rW7dLW','WQ7dUa8','uCouW4pdRfbKoSkwo8kVuKVdNXtdKmoUebVdUw4','W5L/WRHQWOe','ACorW5aLaW','W4fCWRn0WQ8','amk9WRmkWO8','zSo/W53dUejJ','WPtdQXBdJd9Pyc0','W5nEWOeD','WRVdNrRcPCoze8ok','WOxdGZ/dSGC','WQBcV8kOyH0j','q3pdG8kCoWPK','amoPm8k9WOK','WPddMCkoavq','WPhdG2u6vx1zfCkAye1t','u8otW53dTuiZFmkxoCkWvKVdHa0','WOXhWPqaFqFcQSoPW4ldPuldJ8oiESolWOf+W7jcW5NcNr1ydmoEWObwWOTLk8oXomkddSkItq0sW4VdHhBdVCoNC8oecSkMWOeVWO9JWRqkWPjsCCkjWRbZWQVdJSkvgmk2tvrP','ptmxwd/dVSoXDa','q8ofcW','wqxdKSk4ncb6W7FdQLPKlXtcRgbUW4OlbSop','WOxcOmoqWOdcKq','gMJdGa','gCoRtSoxWPy','edmpudNdTCopwCkmW5Wr','W7b9WQavCa','CaddQCkJdG','W4C8j8oeWOy','W4FcHGnSeIeLg8kruNXBW68','WQSyWPO','fYDxW4/dIW','W4i/ta','lmofdmk5WOO','W4Opq8kLW5RdHW','W5iBW7SuvW','WRu+qWNdNW','WP/cKhVdKs/cHrtcNSogh8kjW5y','WOSpW7CHimo/WO7dUSk0ka','WQfdWOL1W70fW5rWzN3dKmoJg8kPBM3dIWC1W7OuW58iWRhdIsf7W74oqmo7W5Lg','WOmLqZ/dRW','W4VdJLPHv3xdQG','WQNcTSovWQNcVa','W45hWRDUACkH','he/dJCk+','WPaYxcldOq','W6uGi8otWR0','WPuvqZS','W4qcpmoKWPfGwK5cf8kO','rSkPEW','WOj+WP5z','CWhdPa','uZNdVSkmmq','W6rBCSoY','WPf+WOnm','W4ddHeK','WQBcHY/dRW','WPiSW5/cISkEna','WQ1WWP5zW7y','y8ooW5ZdHgq','cvRdGmo4WOi','W7ztw8orrq','W7iCW68IEW','WQJcPmoWWRlcHG','W4aJW5S8EcFcG8oSeCoYWRmQW6KBEConW58tqSk7W4FcIHVcUb4REJPbw8kqmSoB','gLL8AcCsWOnblw1l','wsRcNaP6','W4JdILPK','44gA5O2/56w844oy6kYk5yEA6iYT5y6p5lUx5lMm6lAK5y2E5lITmmkZWO4kWPZdONVNMkhMJiVKVPpNLl3cU8kEya0fy+EyOEs6UEs4VEETSEwiKoInTownLW','CWNdL8kpiLhcMSofxtNcJCo1','W4ifB8kZWRK','5A215OUD5lMN5yIwW6dMIQxLPjFMRzxMLANVVAm','WQpcV8kVCG','FbWPegW','emoEFSo+WQ8c','W4aZzCkxWP8','aCkfcSovW40fW77dGxtcJmoRW7BdUhvKWQZcTuuL','5lU95lIQ6lss5y2/','WPSXW5NcS8kiiwNcQmk3W7RdJSk5W7xcPq','WRtcV8oDW5pcQq','rmoZW7qee8koWPhdLCoTsXaTewy','WOVcRmoYW5pcO3u','w8oOW7izgmkBWOhdSmo8','WRPkWPjrW7a','W7uzW7Grqa','aLLB','WOimWRPxea','iUIURUMgTEAxIUEzKUw/S+IpJEwoMmoHtc0MwmksW7xdHNivuCkAWPtcSIq9aaPQqgpcLXFdMZq8WQ7dJs0acmkLWRddJCobWR01W4OMjd3dVfbI','ogXOWOrv','bevrW7RcLSkPWR5H','zCoUm8oKW6yKW5/dRW','FbBcVazR','WO3dQGBdLa','W44AjCofWOG','a0viWPDao8ojWRG+CSkAC8olW7O','gmoNhq','WRj0WPXIW4a','WPZcGmoXWQtcUq','tmofa8olW4Od','5OQS5AEt5AE96lEpWRO','CH3dPa','omkdy8oOsG','WO1RWPH9W7O','5A6v5OQJ5lUG5yU05AwP6lsiWR8','WPdcO8o4W5lcTa','AW/dSmkQa8oUzs0','ce9iWODepCor','W5eQW5GpWPnMWOVcQ8kJWOJdK8oQWPG','WRddVXNdPc59W7HaWRtdGG','WQJdGaBcRSom','rmkNCtq','WPxdSqhdKdK3kNhcHv8EyfvtW7xcRCojaYhdGSoyxCkcW63cQ8k+W6lcOWT6','etjIW5ldNq','W6aRd8o3WQq','ptmxwd/dVSoiESkM','W4FdJsK','W5JdIL1UzwNdPmkkWQtcGL7dIte','W47dKdZcRwZdLG','WOiartpdGWiHW6v+'],...(function(){return[...['WRSWAb7dQcCDW4q','W7HiWRfbWPft','WRVcMSorWRdcHW','D8osDJa','WOiWrs/dGa','WRJdMrRcOa','WORdRrddHsz+sthcNuqpzKK','WPmyWPHFku1fzG','wXGjW5ivFCoaWOm1r8kxEa','dJmlrW','6l2W5yEh6AEy6Akv5AsU6lAusa','EmoUWQtcVCod','ebyCAW4','g8ojnCkXWRe','WQ3dI8kanG','W6PKWPXrtG','WQxdLttcRCo3','WQaeWO9ObK9a','W6vgBSoAwgi','WOD8WP5rW5e4W4/cPCk+WR3dLmo2WQldKmocqCklWO7cTq','WPvTrW','sIhdM8k0oq','WPDscG','WRxcVCkYBWqnj8kTW4P3WRO0FgBcT0BcQL/cKW','vSoXW57dJfi','aCkxWQ8MWRi','qmkJW5GBW7fI','gCo7hq','W5S7w8k5WQxcVwm3','emklWOOVWOy','6l235yEo6AA46AgW5Ash6lsKWQC','W48Gw8kQWRqJW7yxW4/cOmovW6WxrGldO1hcImkpjLD9DK9fWPFcRK9qr8kDi8or','WO3dSaBdIa','5A6K5OQm5lM75yUr5Awh6lEzW4q','WRVdGx0ttG','WQ/dPCkbeNu','WOFcJmoTWPZcRq','WRz+WQrYW7a','WRldUG/dSIy','xSkTW5e','WQ7cGSovWOhcNG','gdmFCaa','W445gCo2WRq','W5pdMJBcMgFdIrZcNSoDm8ksW4yDefODdWiCtG','W58FgSodWPO','h8oCi8k7WRpdS8o3pa','sbNdMSkMpq','WPaxqZpdMWW8W6PIW63dTXZdQmkwimkTWOPHW7y','5OQs5AE85AwD6lAfWO8','6l2U5ys36AAU6AkN5AEA6lE5iG','aHDeW5tdVW','WRefkCkVeZ3cS17cILdcKmkNW50','lCokmSkTWPZdPSo7','WRedlCkJhtpcVcxcUxJcMSkKW4hdHa','zcaxmMW','jwRdPSowWR8','guFdM8kbaG','cSkiWPS
2023-10-29 12:06:52 +08:00
// 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.d