| 340 | } |
| 341 | |
| 342 | msg(e = t, s = "", i = "", r) { |
| 343 | const o = t => { |
| 344 | if (!t) return t; |
| 345 | if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? {"open-url": t} : this.isSurge() ? {url: t} : void 0; |
| 346 | if ("object" == typeof t) { |
| 347 | if (this.isLoon()) { |
| 348 | let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; |
| 349 | return {openUrl: e, mediaUrl: s} |
| 350 | } |
| 351 | if (this.isQuanX()) { |
| 352 | let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; |
| 353 | return {"open-url": e, "media-url": s} |
| 354 | } |
| 355 | if (this.isSurge()) { |
| 356 | let e = t.url || t.openUrl || t["open-url"]; |
| 357 | return {url: e} |
| 358 | } |
| 359 | } |
| 360 | }; |
| 361 | if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { |
| 362 | let t = ["", "==============📣系统通知📣=============="]; |
| 363 | t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) |
| 364 | } |
| 365 | } |
| 366 | |
| 367 | log(...t) { |
| 368 | t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) |