| 857 | } |
| 858 | |
| 859 | msg(e = t, s = "", i = "", r) { |
| 860 | const o = t => { |
| 861 | if (!t) return t; |
| 862 | if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? {"open-url": t} : this.isSurge() ? {url: t} : void 0; |
| 863 | if ("object" == typeof t) { |
| 864 | if (this.isLoon()) { |
| 865 | let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; |
| 866 | return {openUrl: e, mediaUrl: s} |
| 867 | } |
| 868 | if (this.isQuanX()) { |
| 869 | let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; |
| 870 | return {"open-url": e, "media-url": s} |
| 871 | } |
| 872 | if (this.isSurge()) { |
| 873 | let e = t.url || t.openUrl || t["open-url"]; |
| 874 | return {url: e} |
| 875 | } |
| 876 | } |
| 877 | }; |
| 878 | if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { |
| 879 | let t = ["", "==============📣系统通知📣=============="]; |
| 880 | t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) |
| 881 | } |
| 882 | } |
| 883 | |
| 884 | log(...t) { |
| 885 | t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) |