// ==UserScript==
// @name 🔥🔥网易,酷我,酷狗支持歌词和歌曲下载🔥🔥
// @namespace https://www.softrr.cn/
// @version 1.2.1
// @author hackhase
// @description 网易,酷我,酷狗支持当前页歌词下载,同时支持歌曲mp3下载
// @license MIT
// @icon http://s1.music.126.net/style/favicon.ico?v20180823
// @match *://music.163.com/*
// @match *://*.kuwo.cn/play_detail/*
// @match *://*.kugou.com/mixsong/*
// @match *://*.kugou.com/song/*
// @require https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.global.prod.js
// @require data:application/javascript,%3Bwindow.Vue%3DVue%3B
// @require https://cdn.jsdelivr.net/npm/[email protected]/dist/index.full.min.js
// @resource element-plus/dist/index.css https://cdn.jsdelivr.net/npm/[email protected]/dist/index.css
// @connect www.softrr.cn
// @connect music.163.com
// @connect music.163.com
// @connect m.kuwo.cn
// @connect wwwapi.kugou.com
// @grant GM_addStyle
// @grant GM_download
// @grant GM_getResourceText
// @grant GM_xmlhttpRequest
// @grant unsafeWindow
// @noframes
// ==/UserScript==
(e=>{if(typeof GM_addStyle=="function"){GM_addStyle(e);return}const o=document.createElement("style");o.textContent=e,document.head.append(o)})(' @charset "UTF-8";:root{font-family:Inter,Avenir,Helvetica,Arial,sans-serif;font-size:16px;line-height:24px;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}.card{padding:2em}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}.modal-wrapper[data-v-5b44b48f]{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;margin-top:0;display:flex;justify-content:center;align-items:center;z-index:999}.modal[data-v-5b44b48f]{background-color:#fff;padding:20px;border-radius:5px}.header[data-v-5b44b48f]{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.header h2[data-v-5b44b48f]{margin:0;font-size:20px;font-weight:700}.header button[data-v-5b44b48f]{border:none;background-color:transparent;font-size:20px;cursor:pointer}.contentBox[data-v-5b44b48f]{max-height:400px;overflow:auto;font-size:16px;display:flex;justify-content:space-between}.contentBox .produce[data-v-5b44b48f]{flex:60%}.contentBox .produce p[data-v-5b44b48f]{margin-top:15px}.contentBox .produce .ipt[data-v-5b44b48f]{margin-top:15px;height:30px;border-radius:5px;padding-left:10px}.contentBox .img[data-v-5b44b48f]{flex:35%;height:180px;display:flex;align-items:center;justify-content:center}.contentBox .img img[data-v-5b44b48f]{width:180px}input[data-v-5b44b48f]::-webkit-input-placeholder{color:#aab2bd;font-size:14px;padding-left:5px}:root{--el-color-white:#ffffff;--el-color-black:#000000;--el-color-primary-rgb:64,158,255;--el-color-success-rgb:103,194,58;--el-color-warning-rgb:230,162,60;--el-color-danger-rgb:245,108,108;--el-color-error-rgb:245,108,108;--el-color-info-rgb:144,147,153;--el-font-size-extra-large:20px;--el-font-size-large:18px;--el-font-size-medium:16px;--el-font-size-base:14px;--el-font-size-small:13px;--el-font-size-extra-small:12px;--el-font-family:"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","\u5FAE\u8F6F\u96C5\u9ED1",Arial,sans-serif;--el-font-weight-primary:500;--el-font-line-height-primary:24px;--el-index-normal:1;--el-index-top:1000;--el-index-popper:2000;--el-border-radius-base:4px;--el-border-radius-small:2px;--el-border-radius-round:20px;--el-border-radius-circle:100%;--el-transition-duration:.3s;--el-transition-duration-fast:.2s;--el-transition-function-ease-in-out-bezier:cubic-bezier(.645, .045, .355, 1);--el-transition-function-fast-bezier:cubic-bezier(.23, 1, .32, 1);--el-transition-all:all var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier);--el-transition-fade:opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);--el-transition-md-fade:transform var(--el-transition-duration) var(--el-transition-function-fast-bezier),opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);--el-transition-fade-linear:opacity var(--el-transition-duration-fast) linear;--el-transition-border:border-color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-transition-box-shadow:box-shadow var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-transition-color:color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-component-size-large:40px;--el-component-size:32px;--el-component-size-small:24px}:root{color-scheme:light;--el-color-white:#ffffff;--el-color-black:#000000;--el-color-primary:#409eff;--el-color-primary-light-3:#79bbff;--el-color-primary-light-5:#a0cfff;--el-color-primary-light-7:#c6e2ff;--el-color-primary-light-8:#d9ecff;--el-color-primary-light-9:#ecf5ff;--el-color-primary-dark-2:#337ecc;--el-color-success:#67c23a;--el-color-success-light-3:#95d475;--el-color-success-light-5:#b3e19d;--el-color-success-light-7:#d1edc4;--el-color-success-light-8:#e1f3d8;--el-color-success-light-9:#f0f9eb;--el-color-success-dark-2:#529b2e;--el-color-warning:#e6a23c;--el-color-warning-light-3:#eebe77;--el-color-warning-light-5:#f3d19e;--el-color-warning-light-7:#f8e3c5;--el-color-warning-light-8:#faecd8;--el-color-warning-light-9:#fdf6ec;--el-color-warning-dark-2:#b88230;--el-color-danger:#f56c6c;--el-color-danger-light-3:#f89898;--el-color-danger-light-5:#fab6b6;--el-color-danger-light-7:#fcd3d3;--el-color-danger-light-8:#fde2e2;--el-color-danger-light-9:#fef0f0;--el-color-danger-dark-2:#c45656;--el-color-error:#f56c6c;--el-color-error-light-3:#f89898;--el-color-error-light-5:#fab6b6;--el-color-error-light-7:#fcd3d3;--el-color-error-light-8:#fde2e2;--el-color-error-light-9:#fef0f0;--el-color-error-dark-2:#c45656;--el-color-info:#909399;--el-color-info-light-3:#b1b3b8;--el-color-info-light-5:#c8c9cc;--el-color-info-light-7:#dedfe0;--el-color-info-light-8:#e9e9eb;--el-color-info-light-9:#f4f4f5;--el-color-info-dark-2:#73767a;--el-bg-color:#ffffff;--el-bg-color-page:#f2f3f5;--el-bg-color-overlay:#ffffff;--el-text-color-primary:#303133;--el-text-color-regular:#606266;--el-text-color-secondary:#909399;--el-text-color-placeholder:#a8abb2;--el-text-color-disabled:#c0c4cc;--el-border-color:#dcdfe6;--el-border-color-light:#e4e7ed;--el-border-color-lighter:#ebeef5;--el-border-color-extra-light:#f2f6fc;--el-border-color-dark:#d4d7de;--el-border-color-darker:#cdd0d6;--el-fill-color:#f0f2f5;--el-fill-color-light:#f5f7fa;--el-fill-color-lighter:#fafafa;--el-fill-color-extra-light:#fafcff;--el-fill-color-dark:#ebedf0;--el-fill-color-darker:#e6e8eb;--el-fill-color-blank:#ffffff;--el-box-shadow:0px 12px 32px 4px rgba(0, 0, 0, .04),0px 8px 20px rgba(0, 0, 0, .08);--el-box-shadow-light:0px 0px 12px rgba(0, 0, 0, .12);--el-box-shadow-lighter:0px 0px 6px rgba(0, 0, 0, .12);--el-box-shadow-dark:0px 16px 48px 16px rgba(0, 0, 0, .08),0px 12px 32px rgba(0, 0, 0, .12),0px 8px 16px -8px rgba(0, 0, 0, .16);--el-disabled-bg-color:var(--el-fill-color-light);--el-disabled-text-color:var(--el-text-color-placeholder);--el-disabled-border-color:var(--el-border-color-light);--el-overlay-color:rgba(0, 0, 0, .8);--el-overlay-color-light:rgba(0, 0, 0, .7);--el-overlay-color-lighter:rgba(0, 0, 0, .5);--el-mask-color:rgba(255, 255, 255, .9);--el-mask-color-extra-light:rgba(255, 255, 255, .3);--el-border-width:1px;--el-border-style:solid;--el-border-color-hover:var(--el-text-color-disabled);--el-border:var(--el-border-width) var(--el-border-style) var(--el-border-color);--el-svg-monochrome-grey:var(--el-border-color)}.fade-in-linear-enter-active,.fade-in-linear-leave-active{transition:var(--el-transition-fade-linear)}.fade-in-linear-enter-from,.fade-in-linear-leave-to{opacity:0}.el-fade-in-linear-enter-active,.el-fade-in-linear-leave-active{transition:var(--el-transition-fade-linear)}.el-fade-in-linear-enter-from,.el-fade-in-linear-leave-to{opacity:0}.el-fade-in-enter-active,.el-fade-in-leave-active{transition:all var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-fade-in-enter-from,.el-fade-in-leave-active{opacity:0}.el-zoom-in-center-enter-active,.el-zoom-in-center-leave-active{transition:all var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-zoom-in-center-enter-from,.el-zoom-in-center-leave-active{opacity:0;transform:scaleX(0)}.el-zoom-in-top-enter-active,.el-zoom-in-top-leave-active{opacity:1;transform:scaleY(1);transition:var(--el-transition-md-fade);transform-origin:center top}.el-zoom-in-top-enter-active[data-popper-placement^=top],.el-zoom-in-top-leave-active[data-popper-placement^=top]{transform-origin:center bottom}.el-zoom-in-top-enter-from,.el-zoom-in-top-leave-active{opacity:0;transform:scaleY(0)}.el-zoom-in-bottom-enter-active,.el-zoom-in-bottom-leave-active{opacity:1;transform:scaleY(1);transition:var(--el-transition-md-fade);transform-origin:center bottom}.el-zoom-in-bottom-enter-from,.el-zoom-in-bottom-leave-active{opacity:0;transform:scaleY(0)}.el-zoom-in-left-enter-active,.el-zoom-in-left-leave-active{opacity:1;transform:scale(1);transition:var(--el-transition-md-fade);transform-origin:top left}.el-zoom-in-left-enter-from,.el-zoom-in-left-leave-active{opacity:0;transform:scale(.45)}.collapse-transition{transition:var(--el-transition-duration) height ease-in-out,var(--el-transition-duration) padding-top ease-in-out,var(--el-transition-duration) padding-bottom ease-in-out}.el-collapse-transition-enter-active,.el-collapse-transition-leave-active{transition:var(--el-transition-duration) max-height ease-in-out,var(--el-transition-duration) padding-top ease-in-out,var(--el-transition-duration) padding-bottom ease-in-out}.horizontal-collapse-transition{transition:var(--el-transition-duration) width ease-in-out,var(--el-transition-duration) padding-left ease-in-out,var(--el-transition-duration) padding-right ease-in-out}.el-list-enter-active,.el-list-leave-active{transition:all 1s}.el-list-enter-from,.el-list-leave-to{opacity:0;transform:translateY(-30px)}.el-list-leave-active{position:absolute!important}.el-opacity-transition{transition:opacity var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-icon-loading{-webkit-animation:rotating 2s linear infinite;animation:rotating 2s linear infinite}.el-icon--right{margin-left:5px}.el-icon--left{margin-right:5px}@-webkit-keyframes rotating{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes rotating{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.el-icon{--color:inherit;height:1em;width:1em;line-height:1em;display:inline-flex;justify-content:center;align-items:center;position:relative;fill:currentColor;color:var(--color);font-size:inherit}.el-icon.is-loading{-webkit-animation:rotating 2s linear infinite;animation:rotating 2s linear infinite}.el-icon svg{height:1em;width:1em}.el-badge{--el-badge-bg-color:var(--el-color-danger);--el-badge-radius:10px;--el-badge-font-size:12px;--el-badge-padding:6px;--el-badge-size:18px;position:relative;vertical-align:middle;display:inline-block;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.el-badge__content{background-color:var(--el-badge-bg-color);border-radius:var(--el-badge-radius);color:var(--el-color-white);display:inline-flex;justify-content:center;align-items:center;font-size:var(--el-badge-font-size);height:var(--el-badge-size);padding:0 var(--el-badge-padding);white-space:nowrap;border:1px solid var(--el-bg-color)}.el-badge__content.is-fixed{position:absolute;top:0;right:calc(1px + var(--el-badge-size)/ 2);transform:translateY(-50%) translate(100%);z-index:var(--el-index-normal)}.el-badge__content.is-fixed.is-dot{right:5px}.el-badge__content.is-dot{height:8px;width:8px;padding:0;right:0;border-radius:50%}.el-badge__content--primary{background-color:var(--el-color-primary)}.el-badge__content--success{background-color:var(--el-color-success)}.el-badge__content--warning{background-color:var(--el-color-warning)}.el-badge__content--info{background-color:var(--el-color-info)}.el-badge__content--danger{background-color:var(--el-color-danger)}.el-message{--el-message-bg-color:var(--el-color-info-light-9);--el-message-border-color:var(--el-border-color-lighter);--el-message-padding:15px 19px;--el-message-close-size:16px;--el-message-close-icon-color:var(--el-text-color-placeholder);--el-message-close-hover-color:var(--el-text-color-secondary)}.el-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;max-width:calc(100% - 32px);box-sizing:border-box;border-radius:var(--el-border-radius-base);border-width:var(--el-border-width);border-style:var(--el-border-style);border-color:var(--el-message-border-color);position:fixed;left:50%;top:20px;transform:translate(-50%);background-color:var(--el-message-bg-color);transition:opacity var(--el-transition-duration),transform .4s,top .4s;padding:var(--el-message-padding);display:flex;align-items:center}.el-message.is-center{justify-content:center}.el-message.is-closable .el-message__content{padding-right:31px}.el-message p{margin:0}.el-message--success{--el-message-bg-color:var(--el-color-success-light-9);--el-message-border-color:var(--el-color-success-light-8);--el-message-text-color:var(--el-color-success)}.el-message--success .el-message__content{color:var(--el-message-text-color);overflow-wrap:break-word}.el-message .el-message-icon--success{color:var(--el-message-text-color)}.el-message--info{--el-message-bg-color:var(--el-color-info-light-9);--el-message-border-color:var(--el-color-info-light-8);--el-message-text-color:var(--el-color-info)}.el-message--info .el-message__content{color:var(--el-message-text-color);overflow-wrap:break-word}.el-message .el-message-icon--info{color:var(--el-message-text-color)}.el-message--warning{--el-message-bg-color:var(--el-color-warning-light-9);--el-message-border-color:var(--el-color-warning-light-8);--el-message-text-color:var(--el-color-warning)}.el-message--warning .el-message__content{color:var(--el-message-text-color);overflow-wrap:break-word}.el-message .el-message-icon--warning{color:var(--el-message-text-color)}.el-message--error{--el-message-bg-color:var(--el-color-error-light-9);--el-message-border-color:var(--el-color-error-light-8);--el-message-text-color:var(--el-color-error)}.el-message--error .el-message__content{color:var(--el-message-text-color);overflow-wrap:break-word}.el-message .el-message-icon--error{color:var(--el-message-text-color)}.el-message__icon{margin-right:10px}.el-message .el-message__badge{position:absolute;top:-8px;right:-8px}.el-message__content{padding:0;font-size:14px;line-height:1}.el-message__content:focus{outline-width:0}.el-message .el-message__closeBtn{position:absolute;top:50%;right:19px;transform:translateY(-50%);cursor:pointer;color:var(--el-message-close-icon-color);font-size:var(--el-message-close-size)}.el-message .el-message__closeBtn:focus{outline-width:0}.el-message .el-message__closeBtn:hover{color:var(--el-message-close-hover-color)}.el-message-fade-enter-from,.el-message-fade-leave-to{opacity:0;transform:translate(-50%,-100%)}.copy[data-v-c876fde4]{width:200px;height:200px;position:fixed;right:10px;top:120px}.copy .btngroup[data-v-c876fde4]{display:flex;flex-direction:column;justify-content:center;align-items:center}.copy .btngroup .lyric[data-v-c876fde4]{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;width:80px;height:40px;border-radius:10%;font-size:14px;color:#e4cf0e;background-color:#07031c;cursor:pointer;margin-bottom:10px}.copy .btngroup .down[data-v-c876fde4]{display:flex;align-items:center;justify-content:center;width:80px;height:40px;border-radius:10%;font-size:14px;color:#fff;background-color:red;cursor:pointer}.copy .btngroup .down[data-v-c876fde4]:hover{background-color:#00ff48}.copy .btngroup .lyric[data-v-c876fde4]:hover{background-color:#933814!important} ');
(function (vue, elementPlus) {
'use strict';
const _export_sfc$1 = (sfc, props) => {
const target = sfc.__vccOpts || sfc;
for (const [key, val] of props) {
target[key] = val;
}
return target;
};
const _withScopeId = (n) => (vue.pushScopeId("data-v-5b44b48f"), n = n(), vue.popScopeId(), n);
const _hoisted_1$3 = { class: "modal" };
const _hoisted_2$1 = { class: "header" };
const _hoisted_3 = { class: "contentBox" };
const _hoisted_4 = { class: "produce" };
const _hoisted_5 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("p", null, "1、扫描右侧公众号,点击关注!", -1));
const _hoisted_6 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("p", null, "2、在软件爬取者后台回复:验证码", -1));
const _hoisted_7 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("p", null, "3、在下方输入框输入获取的验证码后回车", -1));
const _hoisted_8 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", { class: "img" }, [
/* @__PURE__ */ vue.createElementVNode("img", {
src: "https://www.softrr.cn/assets/pqz-daa4b840.jpg",
alt: ""
})
], -1));
const _sfc_main$4 = {
__name: "Model",
props: {
title: {
type: String,
required: true
},
code: {
type: Number
}
},
setup(__props, { expose: __expose }) {
const props = __props;
const visible = vue.ref(false);
const openModal = () => {
visible.value = true;
};
const closeModal = () => {
visible.value = false;
};
__expose({
visible,
openModal,
closeModal
});
const codeValue = vue.ref();
const enterCode = () => {
if (codeValue.value == props.code) {
localStorage.setItem("code", codeValue.value);
visible.value = false;
alert("验证成功,请再次点击解析!");
codeValue.value = "";
} else {
alert("验证码错误,请重新输入!");
codeValue.value = "";
}
};
return (_ctx, _cache) => {
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
class: "modal-wrapper",
onClick: vue.withModifiers(closeModal, ["self"])
}, [
vue.createElementVNode("div", _hoisted_1$3, [
vue.createElementVNode("div", _hoisted_2$1, [
vue.createElementVNode("h2", null, vue.toDisplayString(__props.title), 1),
vue.createElementVNode("button", { onClick: closeModal }, "X")
]),
vue.createElementVNode("div", _hoisted_3, [
vue.createElementVNode("div", _hoisted_4, [
_hoisted_5,
_hoisted_6,
_hoisted_7,
vue.withDirectives(vue.createElementVNode("input", {
class: "ipt",
type: "text",
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => codeValue.value = $event),
onKeydown: vue.withKeys(enterCode, ["enter"]),
placeholder: "请输入验证码后按回车"
}, null, 544), [
[vue.vModelText, codeValue.value]
])
]),
_hoisted_8
])
])
], 512)), [
[vue.vShow, visible.value]
]);
};
}
};
const Model = /* @__PURE__ */ _export_sfc$1(_sfc_main$4, [["__scopeId", "data-v-5b44b48f"]]);
var _GM_download = /* @__PURE__ */ (() => typeof GM_download != "undefined" ? GM_download : void 0)();
var _GM_xmlhttpRequest = /* @__PURE__ */ (() => typeof GM_xmlhttpRequest != "undefined" ? GM_xmlhttpRequest : void 0)();
const wyLyricApi = () => {
let iframe = document.getElementsByTagName("iframe")[0];
let doc = iframe.contentWindow.document;
var lyric = doc.getElementById("lyric-content").innerHTML;
let name = doc.getElementsByClassName("tit")[0].innerText;
lyric = lyric.split("</div>")[0].replace(/<br>/g, "\n");
let blob = new Blob([lyric], { type: "text/plain" });
let blobUrl = window.URL.createObjectURL(blob);
_GM_download(blobUrl, name + ".txt");
};
const wyMusicApi = async () => {
let iframe = document.getElementsByTagName("iframe")[0];
let doc = iframe.contentWindow.document;
let name = doc.getElementsByClassName("tit")[0].innerText;
let pageUrl = window.location.href;
let musicId = pageUrl.split("=")[pageUrl.split("=").length - 1];
let resList = await getUrl(musicId);
if (resList.status == 0) {
let downUrl = resList.data.url;
_GM_download(downUrl, name + "-" + musicId);
} else {
elementPlus.ElMessage.warning("无法下载VIP歌曲!");
}
};
const getUrl = (id) => {
return new Promise((resolve, reject) => {
_GM_xmlhttpRequest({
method: "GET",
url: `https://www.softrr.cn/crawler/getvideourl?id=` + id,
headers: {
Referer: "https://www.softrr.cn/",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.289 Safari/537.36"
},
onload: function(res) {
resolve(JSON.parse(res.response));
}
});
});
};
function main$1() {
var t, e, n;
var r = [47, 172, 107, 53, 5, 9];
var o, d = 0, h2 = 0;
var i = 0, b = e || [], f = (t = t || {}).node || r, v = void 0 !== t.clockseq ? t.clockseq : o;
var y = void 0 !== t.msecs ? t.msecs : (/* @__PURE__ */ new Date()).getTime(), w = void 0 !== t.nsecs ? t.nsecs : h2 + 1, dt = y - d + (w - h2) / 1e4;
if (dt < 0 && void 0 === t.clockseq && (v = v + 1 & 16383), (dt < 0 || y > d) && void 0 === t.nsecs && (w = 0), w >= 1e4)
throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
var x = (1e4 * (268435455 & (y += 122192928e5)) + w) % 4294967296;
b[i++] = x >>> 24 & 255, b[i++] = x >>> 16 & 255, b[i++] = x >>> 8 & 255, b[i++] = 255 & x;
var A = y / 4294967296 * 1e4 & 268435455;
b[i++] = A >>> 8 & 255, b[i++] = 255 & A, b[i++] = A >>> 24 & 15 | 16, b[i++] = A >>> 16 & 255, b[i++] = v >>> 8 | 128, b[i++] = 255 & v;
for (var _ = 0; _ < 6; ++_)
b[i + _] = f[_];
var t = b;
for (var n = [], i = 0; i < 256; ++i)
n[i] = (i + 256).toString(16).substr(1);
var i = 0, r = n;
return [r[t[i++]], r[t[i++]], r[t[i++]], r[t[i++]], "-", r[t[i++]], r[t[i++]], "-", r[t[i++]], r[t[i++]], "-", r[t[i++]], r[t[i++]], "-", r[t[i++]], r[t[i++]], r[t[i++]], r[t[i++]], r[t[i++]], r[t[i++]]].join("");
}
function h(t, e) {
if (null == e || e.length <= 0)
return null;
for (var n = "", i = 0; i < e.length; i++)
n += e.charCodeAt(i).toString();
var r = Math.floor(n.length / 5), o = parseInt(n.charAt(r) + n.charAt(2 * r) + n.charAt(3 * r) + n.charAt(4 * r) + n.charAt(5 * r)), l = Math.ceil(e.length / 2), c = Math.pow(2, 31) - 1;
if (o < 2)
return null;
var d = Math.round(1e9 * Math.random()) % 1e8;
for (n += d; n.length > 10; )
n = (parseInt(n.substring(0, 10)) + parseInt(n.substring(10, n.length))).toString();
n = (o * n + l) % c;
var h2 = "", f = "";
for (i = 0; i < t.length; i++)
f += (h2 = parseInt(t.charCodeAt(i) ^ Math.floor(n / c * 255))) < 16 ? "0" + h2.toString(16) : h2.toString(16), n = (o * n + l) % c;
for (d = d.toString(16); d.length < 8; )
d = "0" + d;
return f += d;
}
function getSecret(e) {
let f = "Hm_Iuvt_cdb524f42f23cer9b268564v7y735ewrq2324";
let Secret = h(e, f);
return Secret;
}
const headers$1 = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.289 Safari/537.36",
Referer: "http://www.kuwo.cn"
};
const getRes = async (reqId) => {
let url = window.location.href;
let musicId = url.split("/")[url.split("/").length - 1];
let searchUrl = `http://m.kuwo.cn/newh5/singles/songinfoandlrc?musicId=${musicId}&httpsStatus=1&reqId=` + reqId;
let searchList = await getFile(searchUrl, headers$1);
return searchList;
};
const kwLyricApi = async () => {
let reqId = main$1();
let searchList = await getRes(reqId);
if (searchList.status == 200) {
let lrcList = searchList.data.lrclist;
let lrcline = "";
lrcList.forEach((item) => {
lrcline += item.lineLyric + "\n";
});
let name = document.querySelector(".name");
name = name.innerText;
let blob = new Blob([lrcline], { type: "text/plain" });
let blobUrl = window.URL.createObjectURL(blob);
_GM_download(blobUrl, name + ".txt");
} else {
elementPlus.ElMessage.error("无法获取歌词!");
}
};
const kwMusicApi = async () => {
let name = document.querySelector(".name");
name = name.innerText;
let url = window.location.href;
let musicId = url.split("/")[url.split("/").length - 1];
let reqId = main$1();
const surl = `http://www.kuwo.cn/api/v1/www/music/playUrl?mid=${musicId}&type=music&httpsStatus=1&format=128&reqId=` + reqId;
let coo = await getCoo(headers$1);
headers$1["Secret"] = getSecret(coo);
headers$1["Cookie"] = "_ga=GA1.2.43034837.1705499543; Hm_lvt_cdb524f42f0ce19b169a8071123a4797=1708051710,1708144653,1708235545,1708864196; _gid=GA1.2.371636606.1708864196; Hm_lpvt_cdb524f42f0ce19b169a8071123a4797=1708870287; _ga_ETPBRPM9ML=GS1.2.1708864196.13.1.1708870287.60.0.0; Hm_Iuvt_cdb524f42f23cer9b268564v7y735ewrq2324=" + coo;
let result = await getDown$1(surl, headers$1);
if (result.code == 200) {
let downUrl = result.data.url;
_GM_download(downUrl, name);
} else {
elementPlus.ElMessage.error("无法下载歌曲!");
}
};
const getFile = (url, headers2) => {
return new Promise((resolve, reject) => {
_GM_xmlhttpRequest({
method: "GET",
url,
headers: headers2,
// responseType: 'blob',
onload: function(res) {
resolve(JSON.parse(res.response));
}
});
});
};
const getCoo = (headers2) => {
return new Promise((resolve, reject) => {
_GM_xmlhttpRequest({
method: "GET",
url: "http://www.kuwo.cn/rankList",
headers: headers2,
// responseType: 'blob',
onload: function(res) {
var cookies = res.responseHeaders;
cookies = cookies.split(";")[0].split(":")[1].split("=")[1];
resolve(cookies);
}
});
});
};
const getDown$1 = (url, headers2) => {
return new Promise((resolve, reject) => {
_GM_xmlhttpRequest({
method: "GET",
url,
headers: headers2,
// responseType: 'blob',
onload: function(res) {
console.log(res.response);
resolve(JSON.parse(res.response));
}
});
});
};
const getCode = () => {
return new Promise((resolve, reject) => {
_GM_xmlhttpRequest({
method: "GET",
url: `https://www.softrr.cn/crawler/getCode`,
headers: {
Referer: "https://www.softrr.cn/",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.289 Safari/537.36"
},
onload: function(res) {
resolve(JSON.parse(res.response).data[0].code);
}
});
});
};
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
function getDefaultExportFromCjs(x) {
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
}
function getAugmentedNamespace(n) {
if (n.__esModule)
return n;
var f = n.default;
if (typeof f == "function") {
var a = function a2() {
if (this instanceof a2) {
return Reflect.construct(f, arguments, this.constructor);
}
return f.apply(this, arguments);
};
a.prototype = f.prototype;
} else
a = {};
Object.defineProperty(a, "__esModule", { value: true });
Object.keys(n).forEach(function(k) {
var d = Object.getOwnPropertyDescriptor(n, k);
Object.defineProperty(a, k, d.get ? d : {
enumerable: true,
get: function() {
return n[k];
}
});
});
return a;
}
var md5$1 = { exports: {} };
const __viteBrowserExternal = {};
const __viteBrowserExternal$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
default: __viteBrowserExternal
}, Symbol.toStringTag, { value: "Module" }));
const require$$1 = /* @__PURE__ */ getAugmentedNamespace(__viteBrowserExternal$1);
/**
* [js-md5]{@link https://github.com/emn178/js-md5}
*
* @namespace md5
* @version 0.8.3
* @author Chen, Yi-Cyuan [[email protected]]
* @copyright Chen, Yi-Cyuan 2014-2023
* @license MIT
*/
(function(module) {
(function() {
var INPUT_ERROR = "input is invalid type";
var FINALIZE_ERROR = "finalize already called";
var WINDOW = typeof window === "object";
var root2 = WINDOW ? window : {};
if (root2.JS_MD5_NO_WINDOW) {
WINDOW = false;
}
var WEB_WORKER = !WINDOW && typeof self === "object";
var NODE_JS = !root2.JS_MD5_NO_NODE_JS && typeof process === "object" && process.versions && process.versions.node;
if (NODE_JS) {
root2 = commonjsGlobal;
} else if (WEB_WORKER) {
root2 = self;
}
var COMMON_JS = !root2.JS_MD5_NO_COMMON_JS && true && module.exports;
var ARRAY_BUFFER = !root2.JS_MD5_NO_ARRAY_BUFFER && typeof ArrayBuffer !== "undefined";
var HEX_CHARS = "0123456789abcdef".split("");
var EXTRA = [128, 32768, 8388608, -2147483648];
var SHIFT = [0, 8, 16, 24];
var OUTPUT_TYPES = ["hex", "array", "digest", "buffer", "arrayBuffer", "base64"];
var BASE64_ENCODE_CHAR = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
var blocks = [], buffer8;
if (ARRAY_BUFFER) {
var buffer = new ArrayBuffer(68);
buffer8 = new Uint8Array(buffer);
blocks = new Uint32Array(buffer);
}
var isArray2 = Array.isArray;
if (root2.JS_MD5_NO_NODE_JS || !isArray2) {
isArray2 = function(obj) {
return Object.prototype.toString.call(obj) === "[object Array]";
};
}
var isView = ArrayBuffer.isView;
if (ARRAY_BUFFER && (root2.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW || !isView)) {
isView = function(obj) {
return typeof obj === "object" && obj.buffer && obj.buffer.constructor === ArrayBuffer;
};
}
var formatMessage = function(message2) {
var type = typeof message2;
if (type === "string") {
return [message2, true];
}
if (type !== "object" || message2 === null) {
throw new Error(INPUT_ERROR);
}
if (ARRAY_BUFFER && message2.constructor === ArrayBuffer) {
return [new Uint8Array(message2), false];
}
if (!isArray2(message2) && !isView(message2)) {
throw new Error(INPUT_ERROR);
}
return [message2, false];
};
var createOutputMethod = function(outputType) {
return function(message2) {
return new Md5(true).update(message2)[outputType]();
};
};
var createMethod = function() {
var method = createOutputMethod("hex");
if (NODE_JS) {
method = nodeWrap(method);
}
method.create = function() {
return new Md5();
};
method.update = function(message2) {
return method.create().update(message2);
};
for (var i = 0; i < OUTPUT_TYPES.length; ++i) {
var type = OUTPUT_TYPES[i];
method[type] = createOutputMethod(type);
}
return method;
};
var nodeWrap = function(method) {
var crypto = require$$1;
var Buffer = require$$1.Buffer;
var bufferFrom;
if (Buffer.from && !root2.JS_MD5_NO_BUFFER_FROM) {
bufferFrom = Buffer.from;
} else {
bufferFrom = function(message2) {
return new Buffer(message2);
};
}
var nodeMethod = function(message2) {
if (typeof message2 === "string") {
return crypto.createHash("md5").update(message2, "utf8").digest("hex");
} else {
if (message2 === null || message2 === void 0) {
throw new Error(INPUT_ERROR);
} else if (message2.constructor === ArrayBuffer) {
message2 = new Uint8Array(message2);
}
}
if (isArray2(message2) || isView(message2) || message2.constructor === Buffer) {
return crypto.createHash("md5").update(bufferFrom(message2)).digest("hex");
} else {
return method(message2);
}
};
return nodeMethod;
};
var createHmacOutputMethod = function(outputType) {
return function(key, message2) {
return new HmacMd5(key, true).update(message2)[outputType]();
};
};
var createHmacMethod = function() {
var method = createHmacOutputMethod("hex");
method.create = function(key) {
return new HmacMd5(key);
};
method.update = function(key, message2) {
return method.create(key).update(message2);
};
for (var i = 0; i < OUTPUT_TYPES.length; ++i) {
var type = OUTPUT_TYPES[i];
method[type] = createHmacOutputMethod(type);
}
return method;
};
function Md5(sharedMemory) {
if (sharedMemory) {
blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
this.blocks = blocks;
this.buffer8 = buffer8;
} else {
if (ARRAY_BUFFER) {
var buffer2 = new ArrayBuffer(68);
this.buffer8 = new Uint8Array(buffer2);
this.blocks = new Uint32Array(buffer2);
} else {
this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
}
}
this.h0 = this.h1 = this.h2 = this.h3 = this.start = this.bytes = this.hBytes = 0;
this.finalized = this.hashed = false;
this.first = true;
}
Md5.prototype.update = function(message2) {
if (this.finalized) {
throw new Error(FINALIZE_ERROR);
}
var result = formatMessage(message2);
message2 = result[0];
var isString2 = result[1];
var code, index = 0, i, length = message2.length, blocks2 = this.blocks;
var buffer82 = this.buffer8;
while (index < length) {
if (this.hashed) {
this.hashed = false;
blocks2[0] = blocks2[16];
blocks2[16] = blocks2[1] = blocks2[2] = blocks2[3] = blocks2[4] = blocks2[5] = blocks2[6] = blocks2[7] = blocks2[8] = blocks2[9] = blocks2[10] = blocks2[11] = blocks2[12] = blocks2[13] = blocks2[14] = blocks2[15] = 0;
}
if (isString2) {
if (ARRAY_BUFFER) {
for (i = this.start; index < length && i < 64; ++index) {
code = message2.charCodeAt(index);
if (code < 128) {
buffer82[i++] = code;
} else if (code < 2048) {
buffer82[i++] = 192 | code >>> 6;
buffer82[i++] = 128 | code & 63;
} else if (code < 55296 || code >= 57344) {
buffer82[i++] = 224 | code >>> 12;
buffer82[i++] = 128 | code >>> 6 & 63;
buffer82[i++] = 128 | code & 63;
} else {
code = 65536 + ((code & 1023) << 10 | message2.charCodeAt(++index) & 1023);
buffer82[i++] = 240 | code >>> 18;
buffer82[i++] = 128 | code >>> 12 & 63;
buffer82[i++] = 128 | code >>> 6 & 63;
buffer82[i++] = 128 | code & 63;
}
}
} else {
for (i = this.start; index < length && i < 64; ++index) {
code = message2.charCodeAt(index);
if (code < 128) {
blocks2[i >>> 2] |= code << SHIFT[i++ & 3];
} else if (code < 2048) {
blocks2[i >>> 2] |= (192 | code >>> 6) << SHIFT[i++ & 3];
blocks2[i >>> 2] |= (128 | code & 63) << SHIFT[i++ & 3];
} else if (code < 55296 || code >= 57344) {
blocks2[i >>> 2] |= (224 | code >>> 12) << SHIFT[i++ & 3];
blocks2[i >>> 2] |= (128 | code >>> 6 & 63) << SHIFT[i++ & 3];
blocks2[i >>> 2] |= (128 | code & 63) << SHIFT[i++ & 3];
} else {
code = 65536 + ((code & 1023) << 10 | message2.charCodeAt(++index) & 1023);
blocks2[i >>> 2] |= (240 | code >>> 18) << SHIFT[i++ & 3];
blocks2[i >>> 2] |= (128 | code >>> 12 & 63) << SHIFT[i++ & 3];
blocks2[i >>> 2] |= (128 | code >>> 6 & 63) << SHIFT[i++ & 3];
blocks2[i >>> 2] |= (128 | code & 63) << SHIFT[i++ & 3];
}
}
}
} else {
if (ARRAY_BUFFER) {
for (i = this.start; index < length && i < 64; ++index) {
buffer82[i++] = message2[index];
}
} else {
for (i = this.start; index < length && i < 64; ++index) {
blocks2[i >>> 2] |= message2[index] << SHIFT[i++ & 3];
}
}
}
this.lastByteIndex = i;
this.bytes += i - this.start;
if (i >= 64) {
this.start = i - 64;
this.hash();
this.hashed = true;
} else {
this.start = i;
}
}
if (this.bytes > 4294967295) {
this.hBytes += this.bytes / 4294967296 << 0;
this.bytes = this.bytes % 4294967296;
}
return this;
};
Md5.prototype.finalize = function() {
if (this.finalized) {
return;
}
this.finalized = true;
var blocks2 = this.blocks, i = this.lastByteIndex;
blocks2[i >>> 2] |= EXTRA[i & 3];
if (i >= 56) {
if (!this.hashed) {
this.hash();
}
blocks2[0] = blocks2[16];
blocks2[16] = blocks2[1] = blocks2[2] = blocks2[3] = blocks2[4] = blocks2[5] = blocks2[6] = blocks2[7] = blocks2[8] = blocks2[9] = blocks2[10] = blocks2[11] = blocks2[12] = blocks2[13] = blocks2[14] = blocks2[15] = 0;
}
blocks2[14] = this.bytes << 3;
blocks2[15] = this.hBytes << 3 | this.bytes >>> 29;
this.hash();
};
Md5.prototype.hash = function() {
var a, b, c, d, bc, da, blocks2 = this.blocks;
if (this.first) {
a = blocks2[0] - 680876937;
a = (a << 7 | a >>> 25) - 271733879 << 0;
d = (-1732584194 ^ a & 2004318071) + blocks2[1] - 117830708;
d = (d << 12 | d >>> 20) + a << 0;
c = (-271733879 ^ d & (a ^ -271733879)) + blocks2[2] - 1126478375;
c = (c << 17 | c >>> 15) + d << 0;
b = (a ^ c & (d ^ a)) + blocks2[3] - 1316259209;
b = (b << 22 | b >>> 10) + c << 0;
} else {
a = this.h0;
b = this.h1;
c = this.h2;
d = this.h3;
a += (d ^ b & (c ^ d)) + blocks2[0] - 680876936;
a = (a << 7 | a >>> 25) + b << 0;
d += (c ^ a & (b ^ c)) + blocks2[1] - 389564586;
d = (d << 12 | d >>> 20) + a << 0;
c += (b ^ d & (a ^ b)) + blocks2[2] + 606105819;
c = (c << 17 | c >>> 15) + d << 0;
b += (a ^ c & (d ^ a)) + blocks2[3] - 1044525330;
b = (b << 22 | b >>> 10) + c << 0;
}
a += (d ^ b & (c ^ d)) + blocks2[4] - 176418897;
a = (a << 7 | a >>> 25) + b << 0;
d += (c ^ a & (b ^ c)) + blocks2[5] + 1200080426;
d = (d << 12 | d >>> 20) + a << 0;
c += (b ^ d & (a ^ b)) + blocks2[6] - 1473231341;
c = (c << 17 | c >>> 15) + d << 0;
b += (a ^ c & (d ^ a)) + blocks2[7] - 45705983;
b = (b << 22 | b >>> 10) + c << 0;
a += (d ^ b & (c ^ d)) + blocks2[8] + 1770035416;
a = (a << 7 | a >>> 25) + b << 0;
d += (c ^ a & (b ^ c)) + blocks2[9] - 1958414417;
d = (d << 12 | d >>> 20) + a << 0;
c += (b ^ d & (a ^ b)) + blocks2[10] - 42063;
c = (c << 17 | c >>> 15) + d << 0;
b += (a ^ c & (d ^ a)) + blocks2[11] - 1990404162;
b = (b << 22 | b >>> 10) + c << 0;
a += (d ^ b & (c ^ d)) + blocks2[12] + 1804603682;
a = (a << 7 | a >>> 25) + b << 0;
d += (c ^ a & (b ^ c)) + blocks2[13] - 40341101;
d = (d << 12 | d >>> 20) + a << 0;
c += (b ^ d & (a ^ b)) + blocks2[14] - 1502002290;
c = (c << 17 | c >>> 15) + d << 0;
b += (a ^ c & (d ^ a)) + blocks2[15] + 1236535329;
b = (b << 22 | b >>> 10) + c << 0;
a += (c ^ d & (b ^ c)) + blocks2[1] - 165796510;
a = (a << 5 | a >>> 27) + b << 0;
d += (b ^ c & (a ^ b)) + blocks2[6] - 1069501632;
d = (d << 9 | d >>> 23) + a << 0;
c += (a ^ b & (d ^ a)) + blocks2[11] + 643717713;
c = (c << 14 | c >>> 18) + d << 0;
b += (d ^ a & (c ^ d)) + blocks2[0] - 373897302;
b = (b << 20 | b >>> 12) + c << 0;
a += (c ^ d & (b ^ c)) + blocks2[5] - 701558691;
a = (a << 5 | a >>> 27) + b << 0;
d += (b ^ c & (a ^ b)) + blocks2[10] + 38016083;
d = (d << 9 | d >>> 23) + a << 0;
c += (a ^ b & (d ^ a)) + blocks2[15] - 660478335;
c = (c << 14 | c >>> 18) + d << 0;
b += (d ^ a & (c ^ d)) + blocks2[4] - 405537848;
b = (b << 20 | b >>> 12) + c << 0;
a += (c ^ d & (b ^ c)) + blocks2[9] + 568446438;
a = (a << 5 | a >>> 27) + b << 0;
d += (b ^ c & (a ^ b)) + blocks2[14] - 1019803690;
d = (d << 9 | d >>> 23) + a << 0;
c += (a ^ b & (d ^ a)) + blocks2[3] - 187363961;
c = (c << 14 | c >>> 18) + d << 0;
b += (d ^ a & (c ^ d)) + blocks2[8] + 1163531501;
b = (b << 20 | b >>> 12) + c << 0;
a += (c ^ d & (b ^ c)) + blocks2[13] - 1444681467;
a = (a << 5 | a >>> 27) + b << 0;
d += (b ^ c & (a ^ b)) + blocks2[2] - 51403784;
d = (d << 9 | d >>> 23) + a << 0;
c += (a ^ b & (d ^ a)) + blocks2[7] + 1735328473;
c = (c << 14 | c >>> 18) + d << 0;
b += (d ^ a & (c ^ d)) + blocks2[12] - 1926607734;
b = (b << 20 | b >>> 12) + c << 0;
bc = b ^ c;
a += (bc ^ d) + blocks2[5] - 378558;
a = (a << 4 | a >>> 28) + b << 0;
d += (bc ^ a) + blocks2[8] - 2022574463;
d = (d << 11 | d >>> 21) + a << 0;
da = d ^ a;
c += (da ^ b) + blocks2[11] + 1839030562;
c = (c << 16 | c >>> 16) + d << 0;
b += (da ^ c) + blocks2[14] - 35309556;
b = (b << 23 | b >>> 9) + c << 0;
bc = b ^ c;
a += (bc ^ d) + blocks2[1] - 1530992060;
a = (a << 4 | a >>> 28) + b << 0;
d += (bc ^ a) + blocks2[4] + 1272893353;
d = (d << 11 | d >>> 21) + a << 0;
da = d ^ a;
c += (da ^ b) + blocks2[7] - 155497632;
c = (c << 16 | c >>> 16) + d << 0;
b += (da ^ c) + blocks2[10] - 1094730640;
b = (b << 23 | b >>> 9) + c << 0;
bc = b ^ c;
a += (bc ^ d) + blocks2[13] + 681279174;
a = (a << 4 | a >>> 28) + b << 0;
d += (bc ^ a) + blocks2[0] - 358537222;
d = (d << 11 | d >>> 21) + a << 0;
da = d ^ a;
c += (da ^ b) + blocks2[3] - 722521979;
c = (c << 16 | c >>> 16) + d << 0;
b += (da ^ c) + blocks2[6] + 76029189;
b = (b << 23 | b >>> 9) + c << 0;
bc = b ^ c;
a += (bc ^ d) + blocks2[9] - 640364487;
a = (a << 4 | a >>> 28) + b << 0;
d += (bc ^ a) + blocks2[12] - 421815835;
d = (d << 11 | d >>> 21) + a << 0;
da = d ^ a;
c += (da ^ b) + blocks2[15] + 530742520;
c = (c << 16 | c >>> 16) + d << 0;
b += (da ^ c) + blocks2[2] - 995338651;
b = (b << 23 | b >>> 9) + c << 0;
a += (c ^ (b | ~d)) + blocks2[0] - 198630844;
a = (a << 6 | a >>> 26) + b << 0;
d += (b ^ (a | ~c)) + blocks2[7] + 1126891415;
d = (d << 10 | d >>> 22) + a << 0;
c += (a ^ (d | ~b)) + blocks2[14] - 1416354905;
c = (c << 15 | c >>> 17) + d << 0;
b += (d ^ (c | ~a)) + blocks2[5] - 57434055;
b = (b << 21 | b >>> 11) + c << 0;
a += (c ^ (b | ~d)) + blocks2[12] + 1700485571;
a = (a << 6 | a >>> 26) + b << 0;
d += (b ^ (a | ~c)) + blocks2[3] - 1894986606;
d = (d << 10 | d >>> 22) + a << 0;
c += (a ^ (d | ~b)) + blocks2[10] - 1051523;
c = (c << 15 | c >>> 17) + d << 0;
b += (d ^ (c | ~a)) + blocks2[1] - 2054922799;
b = (b << 21 | b >>> 11) + c << 0;
a += (c ^ (b | ~d)) + blocks2[8] + 1873313359;
a = (a << 6 | a >>> 26) + b << 0;
d += (b ^ (a | ~c)) + blocks2[15] - 30611744;
d = (d << 10 | d >>> 22) + a << 0;
c += (a ^ (d | ~b)) + blocks2[6] - 1560198380;
c = (c << 15 | c >>> 17) + d << 0;
b += (d ^ (c | ~a)) + blocks2[13] + 1309151649;
b = (b << 21 | b >>> 11) + c << 0;
a += (c ^ (b | ~d)) + blocks2[4] - 145523070;
a = (a << 6 | a >>> 26) + b << 0;
d += (b ^ (a | ~c)) + blocks2[11] - 1120210379;
d = (d << 10 | d >>> 22) + a << 0;
c += (a ^ (d | ~b)) + blocks2[2] + 718787259;
c = (c << 15 | c >>> 17) + d << 0;
b += (d ^ (c | ~a)) + blocks2[9] - 343485551;
b = (b << 21 | b >>> 11) + c << 0;
if (this.first) {
this.h0 = a + 1732584193 << 0;
this.h1 = b - 271733879 << 0;
this.h2 = c - 1732584194 << 0;
this.h3 = d + 271733878 << 0;
this.first = false;
} else {
this.h0 = this.h0 + a << 0;
this.h1 = this.h1 + b << 0;
this.h2 = this.h2 + c << 0;
this.h3 = this.h3 + d << 0;
}
};
Md5.prototype.hex = function() {
this.finalize();
var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3;
return HEX_CHARS[h0 >>> 4 & 15] + HEX_CHARS[h0 & 15] + HEX_CHARS[h0 >>> 12 & 15] + HEX_CHARS[h0 >>> 8 & 15] + HEX_CHARS[h0 >>> 20 & 15] + HEX_CHARS[h0 >>> 16 & 15] + HEX_CHARS[h0 >>> 28 & 15] + HEX_CHARS[h0 >>> 24 & 15] + HEX_CHARS[h1 >>> 4 & 15] + HEX_CHARS[h1 & 15] + HEX_CHARS[h1 >>> 12 & 15] + HEX_CHARS[h1 >>> 8 & 15] + HEX_CHARS[h1 >>> 20 & 15] + HEX_CHARS[h1 >>> 16 & 15] + HEX_CHARS[h1 >>> 28 & 15] + HEX_CHARS[h1 >>> 24 & 15] + HEX_CHARS[h2 >>> 4 & 15] + HEX_CHARS[h2 & 15] + HEX_CHARS[h2 >>> 12 & 15] + HEX_CHARS[h2 >>> 8 & 15] + HEX_CHARS[h2 >>> 20 & 15] + HEX_CHARS[h2 >>> 16 & 15] + HEX_CHARS[h2 >>> 28 & 15] + HEX_CHARS[h2 >>> 24 & 15] + HEX_CHARS[h3 >>> 4 & 15] + HEX_CHARS[h3 & 15] + HEX_CHARS[h3 >>> 12 & 15] + HEX_CHARS[h3 >>> 8 & 15] + HEX_CHARS[h3 >>> 20 & 15] + HEX_CHARS[h3 >>> 16 & 15] + HEX_CHARS[h3 >>> 28 & 15] + HEX_CHARS[h3 >>> 24 & 15];
};
Md5.prototype.toString = Md5.prototype.hex;
Md5.prototype.digest = function() {
this.finalize();
var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3;
return [
h0 & 255,
h0 >>> 8 & 255,
h0 >>> 16 & 255,
h0 >>> 24 & 255,
h1 & 255,
h1 >>> 8 & 255,
h1 >>> 16 & 255,
h1 >>> 24 & 255,
h2 & 255,
h2 >>> 8 & 255,
h2 >>> 16 & 255,
h2 >>> 24 & 255,
h3 & 255,
h3 >>> 8 & 255,
h3 >>> 16 & 255,
h3 >>> 24 & 255
];
};
Md5.prototype.array = Md5.prototype.digest;
Md5.prototype.arrayBuffer = function() {
this.finalize();
var buffer2 = new ArrayBuffer(16);
var blocks2 = new Uint32Array(buffer2);
blocks2[0] = this.h0;
blocks2[1] = this.h1;
blocks2[2] = this.h2;
blocks2[3] = this.h3;
return buffer2;
};
Md5.prototype.buffer = Md5.prototype.arrayBuffer;
Md5.prototype.base64 = function() {
var v1, v2, v3, base64Str = "", bytes = this.array();
for (var i = 0; i < 15; ) {
v1 = bytes[i++];
v2 = bytes[i++];
v3 = bytes[i++];
base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] + BASE64_ENCODE_CHAR[(v1 << 4 | v2 >>> 4) & 63] + BASE64_ENCODE_CHAR[(v2 << 2 | v3 >>> 6) & 63] + BASE64_ENCODE_CHAR[v3 & 63];
}
v1 = bytes[i];
base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] + BASE64_ENCODE_CHAR[v1 << 4 & 63] + "==";
return base64Str;
};
function HmacMd5(key, sharedMemory) {
var i, result = formatMessage(key);
key = result[0];
if (result[1]) {
var bytes = [], length = key.length, index = 0, code;
for (i = 0; i < length; ++i) {
code = key.charCodeAt(i);
if (code < 128) {
bytes[index++] = code;
} else if (code < 2048) {
bytes[index++] = 192 | code >>> 6;
bytes[index++] = 128 | code & 63;
} else if (code < 55296 || code >= 57344) {
bytes[index++] = 224 | code >>> 12;
bytes[index++] = 128 | code >>> 6 & 63;
bytes[index++] = 128 | code & 63;
} else {
code = 65536 + ((code & 1023) << 10 | key.charCodeAt(++i) & 1023);
bytes[index++] = 240 | code >>> 18;
bytes[index++] = 128 | code >>> 12 & 63;
bytes[index++] = 128 | code >>> 6 & 63;
bytes[index++] = 128 | code & 63;
}
}
key = bytes;
}
if (key.length > 64) {
key = new Md5(true).update(key).array();
}
var oKeyPad = [], iKeyPad = [];
for (i = 0; i < 64; ++i) {
var b = key[i] || 0;
oKeyPad[i] = 92 ^ b;
iKeyPad[i] = 54 ^ b;
}
Md5.call(this, sharedMemory);
this.update(iKeyPad);
this.oKeyPad = oKeyPad;
this.inner = true;
this.sharedMemory = sharedMemory;
}
HmacMd5.prototype = new Md5();
HmacMd5.prototype.finalize = function() {
Md5.prototype.finalize.call(this);
if (this.inner) {
this.inner = false;
var innerHash = this.array();
Md5.call(this, this.sharedMemory);
this.update(this.oKeyPad);
this.update(innerHash);
Md5.prototype.finalize.call(this);
}
};
var exports = createMethod();
exports.md5 = exports;
exports.md5.hmac = createHmacMethod();
if (COMMON_JS) {
module.exports = exports;
} else {
root2.md5 = exports;
}
})();
})(md5$1);
var md5Exports = md5$1.exports;
const md5 = /* @__PURE__ */ getDefaultExportFromCjs(md5Exports);
function main(time, id) {
let text = ["NVPh5oo715z5DIWAeQlhMDsWXXQV4hwt", "appid=1014", "clienttime=" + time, "clientver=20000", "dfid=4FHcdO39MvA22PXpyh2y0ng0", "encode_album_audio_id=" + id, "mid=269522b7f00c30ccbadd4fb48996beac", "platid=4", "srcappid=2919", "token=", "userid=0", "uuid=269522b7f00c30ccbadd4fb48996beac", "NVPh5oo715z5DIWAeQlhMDsWXXQV4hwt"];
let sign = md5(text.join("")).toString();
return sign;
}
var _a;
const isClient = typeof window !== "undefined";
const isString$1 = (val) => typeof val === "string";
const noop = () => {
};
isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
function resolveUnref(r) {
return typeof r === "function" ? r() : vue.unref(r);
}
function identity(arg) {
return arg;
}
function tryOnScopeDispose(fn) {
if (vue.getCurrentScope()) {
vue.onScopeDispose(fn);
return true;
}
return false;
}
function tryOnMounted(fn, sync = true) {
if (vue.getCurrentInstance())
vue.onMounted(fn);
else if (sync)
fn();
else
vue.nextTick(fn);
}
function useTimeoutFn(cb, interval, options = {}) {
const {
immediate = true
} = options;
const isPending = vue.ref(false);
let timer = null;
function clear() {
if (timer) {
clearTimeout(timer);
timer = null;
}
}
function stop() {
isPending.value = false;
clear();
}
function start(...args) {
clear();
isPending.value = true;
timer = setTimeout(() => {
isPending.value = false;
timer = null;
cb(...args);
}, resolveUnref(interval));
}
if (immediate) {
isPending.value = true;
if (isClient)
start();
}
tryOnScopeDispose(stop);
return {
isPending: vue.readonly(isPending),
start,
stop
};
}
function unrefElement(elRef) {
var _a2;
const plain = resolveUnref(elRef);
return (_a2 = plain == null ? void 0 : plain.$el) != null ? _a2 : plain;
}
const defaultWindow = isClient ? window : void 0;
function useEventListener(...args) {
let target;
let events;
let listeners;
let options;
if (isString$1(args[0]) || Array.isArray(args[0])) {
[events, listeners, options] = args;
target = defaultWindow;
} else {
[target, events, listeners, options] = args;
}
if (!target)
return noop;
if (!Array.isArray(events))
events = [events];
if (!Array.isArray(listeners))
listeners = [listeners];
const cleanups = [];
const cleanup = () => {
cleanups.forEach((fn) => fn());
cleanups.length = 0;
};
const register = (el, event, listener, options2) => {
el.addEventListener(event, listener, options2);
return () => el.removeEventListener(event, listener, options2);
};
const stopWatch = vue.watch(() => [unrefElement(target), resolveUnref(options)], ([el, options2]) => {
cleanup();
if (!el)
return;
cleanups.push(...events.flatMap((event) => {
return listeners.map((listener) => register(el, event, listener, options2));
}));
}, { immediate: true, flush: "post" });
const stop = () => {
stopWatch();
cleanup();
};
tryOnScopeDispose(stop);
return stop;
}
function useSupported(callback, sync = false) {
const isSupported = vue.ref();
const update = () => isSupported.value = Boolean(callback());
update();
tryOnMounted(update, sync);
return isSupported;
}
const _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
const globalKey = "__vueuse_ssr_handlers__";
_global[globalKey] = _global[globalKey] || {};
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
var __objRest$2 = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols$g)
for (var prop of __getOwnPropSymbols$g(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
target[prop] = source[prop];
}
return target;
};
function useResizeObserver(target, callback, options = {}) {
const _a2 = options, { window: window2 = defaultWindow } = _a2, observerOptions = __objRest$2(_a2, ["window"]);
let observer;
const isSupported = useSupported(() => window2 && "ResizeObserver" in window2);
const cleanup = () => {
if (observer) {
observer.disconnect();
observer = void 0;
}
};
const stopWatch = vue.watch(() => unrefElement(target), (el) => {
cleanup();
if (isSupported.value && window2 && el) {
observer = new ResizeObserver(callback);
observer.observe(el, observerOptions);
}
}, { immediate: true, flush: "post" });
const stop = () => {
cleanup();
stopWatch();
};
tryOnScopeDispose(stop);
return {
isSupported,
stop
};
}
var SwipeDirection;
(function(SwipeDirection2) {
SwipeDirection2["UP"] = "UP";
SwipeDirection2["RIGHT"] = "RIGHT";
SwipeDirection2["DOWN"] = "DOWN";
SwipeDirection2["LEFT"] = "LEFT";
SwipeDirection2["NONE"] = "NONE";
})(SwipeDirection || (SwipeDirection = {}));
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
const _TransitionPresets = {
easeInSine: [0.12, 0, 0.39, 0],
easeOutSine: [0.61, 1, 0.88, 1],
easeInOutSine: [0.37, 0, 0.63, 1],
easeInQuad: [0.11, 0, 0.5, 0],
easeOutQuad: [0.5, 1, 0.89, 1],
easeInOutQuad: [0.45, 0, 0.55, 1],
easeInCubic: [0.32, 0, 0.67, 0],
easeOutCubic: [0.33, 1, 0.68, 1],
easeInOutCubic: [0.65, 0, 0.35, 1],
easeInQuart: [0.5, 0, 0.75, 0],
easeOutQuart: [0.25, 1, 0.5, 1],
easeInOutQuart: [0.76, 0, 0.24, 1],
easeInQuint: [0.64, 0, 0.78, 0],
easeOutQuint: [0.22, 1, 0.36, 1],
easeInOutQuint: [0.83, 0, 0.17, 1],
easeInExpo: [0.7, 0, 0.84, 0],
easeOutExpo: [0.16, 1, 0.3, 1],
easeInOutExpo: [0.87, 0, 0.13, 1],
easeInCirc: [0.55, 0, 1, 0.45],
easeOutCirc: [0, 0.55, 0.45, 1],
easeInOutCirc: [0.85, 0, 0.15, 1],
easeInBack: [0.36, 0, 0.66, -0.56],
easeOutBack: [0.34, 1.56, 0.64, 1],
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
};
__spreadValues({
linear: identity
}, _TransitionPresets);
const hasOwnProperty$4 = Object.prototype.hasOwnProperty;
const hasOwn = (val, key) => hasOwnProperty$4.call(val, key);
const isFunction$1 = (val) => typeof val === "function";
const isString = (val) => typeof val === "string";
const isObject$1 = (val) => val !== null && typeof val === "object";
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
const freeGlobal$1 = freeGlobal;
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
var root = freeGlobal$1 || freeSelf || Function("return this")();
const root$1 = root;
var Symbol$1 = root$1.Symbol;
const Symbol$2 = Symbol$1;
var objectProto$4 = Object.prototype;
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
var nativeObjectToString$1 = objectProto$4.toString;
var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : void 0;
function getRawTag(value) {
var isOwn = hasOwnProperty$3.call(value, symToStringTag$1), tag = value[symToStringTag$1];
try {
value[symToStringTag$1] = void 0;
var unmasked = true;
} catch (e) {
}
var result = nativeObjectToString$1.call(value);
if (unmasked) {
if (isOwn) {
value[symToStringTag$1] = tag;
} else {
delete value[symToStringTag$1];
}
}
return result;
}
var objectProto$3 = Object.prototype;
var nativeObjectToString = objectProto$3.toString;
function objectToString(value) {
return nativeObjectToString.call(value);
}
var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : void 0;
function baseGetTag(value) {
if (value == null) {
return value === void 0 ? undefinedTag : nullTag;
}
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
}
function isObjectLike(value) {
return value != null && typeof value == "object";
}
var symbolTag = "[object Symbol]";
function isSymbol(value) {
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
}
function arrayMap(array, iteratee) {
var index = -1, length = array == null ? 0 : array.length, result = Array(length);
while (++index < length) {
result[index] = iteratee(array[index], index, array);
}
return result;
}
var isArray = Array.isArray;
const isArray$1 = isArray;
var INFINITY$1 = 1 / 0;
var symbolProto = Symbol$2 ? Symbol$2.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
function baseToString(value) {
if (typeof value == "string") {
return value;
}
if (isArray$1(value)) {
return arrayMap(value, baseToString) + "";
}
if (isSymbol(value)) {
return symbolToString ? symbolToString.call(value) : "";
}
var result = value + "";
return result == "0" && 1 / value == -INFINITY$1 ? "-0" : result;
}
function isObject(value) {
var type = typeof value;
return value != null && (type == "object" || type == "function");
}
var asyncTag = "[object AsyncFunction]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
function isFunction(value) {
if (!isObject(value)) {
return false;
}
var tag = baseGetTag(value);
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}
var coreJsData = root$1["__core-js_shared__"];
const coreJsData$1 = coreJsData;
var maskSrcKey = function() {
var uid = /[^.]+$/.exec(coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO || "");
return uid ? "Symbol(src)_1." + uid : "";
}();
function isMasked(func) {
return !!maskSrcKey && maskSrcKey in func;
}
var funcProto$1 = Function.prototype;
var funcToString$1 = funcProto$1.toString;
function toSource(func) {
if (func != null) {
try {
return funcToString$1.call(func);
} catch (e) {
}
try {
return func + "";
} catch (e) {
}
}
return "";
}
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
var reIsHostCtor = /^\[object .+?Constructor\]$/;
var funcProto = Function.prototype, objectProto$2 = Object.prototype;
var funcToString = funcProto.toString;
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
var reIsNative = RegExp(
"^" + funcToString.call(hasOwnProperty$2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function baseIsNative(value) {
if (!isObject(value) || isMasked(value)) {
return false;
}
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
function getValue(object, key) {
return object == null ? void 0 : object[key];
}
function getNative(object, key) {
var value = getValue(object, key);
return baseIsNative(value) ? value : void 0;
}
function eq(value, other) {
return value === other || value !== value && other !== other;
}
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
function isKey(value, object) {
if (isArray$1(value)) {
return false;
}
var type = typeof value;
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
return true;
}
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
}
var nativeCreate = getNative(Object, "create");
const nativeCreate$1 = nativeCreate;
function hashClear() {
this.__data__ = nativeCreate$1 ? nativeCreate$1(null) : {};
this.size = 0;
}
function hashDelete(key) {
var result = this.has(key) && delete this.__data__[key];
this.size -= result ? 1 : 0;
return result;
}
var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
var objectProto$1 = Object.prototype;
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
function hashGet(key) {
var data = this.__data__;
if (nativeCreate$1) {
var result = data[key];
return result === HASH_UNDEFINED$1 ? void 0 : result;
}
return hasOwnProperty$1.call(data, key) ? data[key] : void 0;
}
var objectProto = Object.prototype;
var hasOwnProperty = objectProto.hasOwnProperty;
function hashHas(key) {
var data = this.__data__;
return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty.call(data, key);
}
var HASH_UNDEFINED = "__lodash_hash_undefined__";
function hashSet(key, value) {
var data = this.__data__;
this.size += this.has(key) ? 0 : 1;
data[key] = nativeCreate$1 && value === void 0 ? HASH_UNDEFINED : value;
return this;
}
function Hash(entries) {
var index = -1, length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
Hash.prototype.clear = hashClear;
Hash.prototype["delete"] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;
function listCacheClear() {
this.__data__ = [];
this.size = 0;
}
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq(array[length][0], key)) {
return length;
}
}
return -1;
}
var arrayProto = Array.prototype;
var splice = arrayProto.splice;
function listCacheDelete(key) {
var data = this.__data__, index = assocIndexOf(data, key);
if (index < 0) {
return false;
}
var lastIndex = data.length - 1;
if (index == lastIndex) {
data.pop();
} else {
splice.call(data, index, 1);
}
--this.size;
return true;
}
function listCacheGet(key) {
var data = this.__data__, index = assocIndexOf(data, key);
return index < 0 ? void 0 : data[index][1];
}
function listCacheHas(key) {
return assocIndexOf(this.__data__, key) > -1;
}
function listCacheSet(key, value) {
var data = this.__data__, index = assocIndexOf(data, key);
if (index < 0) {
++this.size;
data.push([key, value]);
} else {
data[index][1] = value;
}
return this;
}
function ListCache(entries) {
var index = -1, length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
ListCache.prototype.clear = listCacheClear;
ListCache.prototype["delete"] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
var Map = getNative(root$1, "Map");
const Map$1 = Map;
function mapCacheClear() {
this.size = 0;
this.__data__ = {
"hash": new Hash(),
"map": new (Map$1 || ListCache)(),
"string": new Hash()
};
}
function isKeyable(value) {
var type = typeof value;
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
}
function getMapData(map, key) {
var data = map.__data__;
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
}
function mapCacheDelete(key) {
var result = getMapData(this, key)["delete"](key);
this.size -= result ? 1 : 0;
return result;
}
function mapCacheGet(key) {
return getMapData(this, key).get(key);
}
function mapCacheHas(key) {
return getMapData(this, key).has(key);
}
function mapCacheSet(key, value) {
var data = getMapData(this, key), size = data.size;
data.set(key, value);
this.size += data.size == size ? 0 : 1;
return this;
}
function MapCache(entries) {
var index = -1, length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype["delete"] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;
var FUNC_ERROR_TEXT = "Expected a function";
function memoize(func, resolver) {
if (typeof func != "function" || resolver != null && typeof resolver != "function") {
throw new TypeError(FUNC_ERROR_TEXT);
}
var memoized = function() {
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
if (cache.has(key)) {
return cache.get(key);
}
var result = func.apply(this, args);
memoized.cache = cache.set(key, result) || cache;
return result;
};
memoized.cache = new (memoize.Cache || MapCache)();
return memoized;
}
memoize.Cache = MapCache;
var MAX_MEMOIZE_SIZE = 500;
function memoizeCapped(func) {
var result = memoize(func, function(key) {
if (cache.size === MAX_MEMOIZE_SIZE) {
cache.clear();
}
return key;
});
var cache = result.cache;
return result;
}
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
var reEscapeChar = /\\(\\)?/g;
var stringToPath = memoizeCapped(function(string) {
var result = [];
if (string.charCodeAt(0) === 46) {
result.push("");
}
string.replace(rePropName, function(match, number, quote, subString) {
result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
});
return result;
});
const stringToPath$1 = stringToPath;
function toString(value) {
return value == null ? "" : baseToString(value);
}
function castPath(value, object) {
if (isArray$1(value)) {
return value;
}
return isKey(value, object) ? [value] : stringToPath$1(toString(value));
}
var INFINITY = 1 / 0;
function toKey(value) {
if (typeof value == "string" || isSymbol(value)) {
return value;
}
var result = value + "";
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
}
function baseGet(object, path) {
path = castPath(path, object);
var index = 0, length = path.length;
while (object != null && index < length) {
object = object[toKey(path[index++])];
}
return index && index == length ? object : void 0;
}
function get(object, path, defaultValue) {
var result = object == null ? void 0 : baseGet(object, path);
return result === void 0 ? defaultValue : result;
}
function fromPairs(pairs) {
var index = -1, length = pairs == null ? 0 : pairs.length, result = {};
while (++index < length) {
var pair = pairs[index];
result[pair[0]] = pair[1];
}
return result;
}
const isUndefined = (val) => val === void 0;
const isNumber = (val) => typeof val === "number";
const isElement = (e) => {
if (typeof Element === "undefined")
return false;
return e instanceof Element;
};
const isStringNumber = (val) => {
if (!isString(val)) {
return false;
}
return !Number.isNaN(Number(val));
};
const keysOf = (arr) => Object.keys(arr);
function addUnit(value, defaultUnit = "px") {
if (!value)
return "";
if (isNumber(value) || isStringNumber(value)) {
return `${value}${defaultUnit}`;
} else if (isString(value)) {
return value;
}
}
/*! Element Plus Icons Vue v2.3.1 */
var circle_close_filled_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
name: "CircleCloseFilled",
__name: "circle-close-filled",
setup(__props) {
return (_ctx, _cache) => (vue.openBlock(), vue.createElementBlock("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
vue.createElementVNode("path", {
fill: "currentColor",
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"
})
]));
}
});
var circle_close_filled_default = circle_close_filled_vue_vue_type_script_setup_true_lang_default;
var close_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
name: "Close",
__name: "close",
setup(__props) {
return (_ctx, _cache) => (vue.openBlock(), vue.createElementBlock("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
vue.createElementVNode("path", {
fill: "currentColor",
d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
})
]));
}
});
var close_default = close_vue_vue_type_script_setup_true_lang_default;
var info_filled_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
name: "InfoFilled",
__name: "info-filled",
setup(__props) {
return (_ctx, _cache) => (vue.openBlock(), vue.createElementBlock("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
vue.createElementVNode("path", {
fill: "currentColor",
d: "M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"
})
]));
}
});
var info_filled_default = info_filled_vue_vue_type_script_setup_true_lang_default;
var success_filled_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
name: "SuccessFilled",
__name: "success-filled",
setup(__props) {
return (_ctx, _cache) => (vue.openBlock(), vue.createElementBlock("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
vue.createElementVNode("path", {
fill: "currentColor",
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"
})
]));
}
});
var success_filled_default = success_filled_vue_vue_type_script_setup_true_lang_default;
var warning_filled_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
name: "WarningFilled",
__name: "warning-filled",
setup(__props) {
return (_ctx, _cache) => (vue.openBlock(), vue.createElementBlock("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
vue.createElementVNode("path", {
fill: "currentColor",
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"
})
]));
}
});
var warning_filled_default = warning_filled_vue_vue_type_script_setup_true_lang_default;
const epPropKey = "__epPropKey";
const definePropType = (val) => val;
const isEpProp = (val) => isObject$1(val) && !!val[epPropKey];
const buildProp = (prop, key) => {
if (!isObject$1(prop) || isEpProp(prop))
return prop;
const { values, required, default: defaultValue, type, validator } = prop;
const _validator = values || validator ? (val) => {
let valid = false;
let allowedValues = [];
if (values) {
allowedValues = Array.from(values);
if (hasOwn(prop, "default")) {
allowedValues.push(defaultValue);
}
valid || (valid = allowedValues.includes(val));
}
if (validator)
valid || (valid = validator(val));
if (!valid && allowedValues.length > 0) {
const allowValuesText = [...new Set(allowedValues)].map((value) => JSON.stringify(value)).join(", ");
vue.warn(`Invalid prop: validation failed${key ? ` for prop "${key}"` : ""}. Expected one of [${allowValuesText}], got value ${JSON.stringify(val)}.`);
}
return valid;
} : void 0;
const epProp = {
type,
required: !!required,
validator: _validator,
[epPropKey]: true
};
if (hasOwn(prop, "default"))
epProp.default = defaultValue;
return epProp;
};
const buildProps = (props) => fromPairs(Object.entries(props).map(([key, option]) => [
key,
buildProp(option, key)
]));
const iconPropType = definePropType([
String,
Object,
Function
]);
const TypeComponents = {
Close: close_default,
SuccessFilled: success_filled_default,
InfoFilled: info_filled_default,
WarningFilled: warning_filled_default,
CircleCloseFilled: circle_close_filled_default
};
const TypeComponentsMap = {
success: success_filled_default,
warning: warning_filled_default,
error: circle_close_filled_default,
info: info_filled_default
};
const withInstall = (main2, extra) => {
main2.install = (app) => {
for (const comp of [main2, ...Object.values(extra != null ? extra : {})]) {
app.component(comp.name, comp);
}
};
if (extra) {
for (const [key, comp] of Object.entries(extra)) {
main2[key] = comp;
}
}
return main2;
};
const withInstallFunction = (fn, name) => {
fn.install = (app) => {
fn._context = app._context;
app.config.globalProperties[name] = fn;
};
return fn;
};
const EVENT_CODE = {
tab: "Tab",
enter: "Enter",
space: "Space",
left: "ArrowLeft",
up: "ArrowUp",
right: "ArrowRight",
down: "ArrowDown",
esc: "Escape",
delete: "Delete",
backspace: "Backspace",
numpadEnter: "NumpadEnter",
pageUp: "PageUp",
pageDown: "PageDown",
home: "Home",
end: "End"
};
const componentSizes = ["", "default", "small", "large"];
const mutable = (val) => val;
var English = {
name: "en",
el: {
colorpicker: {
confirm: "OK",
clear: "Clear",
defaultLabel: "color picker",
description: "current color is {color}. press enter to select a new color."
},
datepicker: {
now: "Now",
today: "Today",
cancel: "Cancel",
clear: "Clear",
confirm: "OK",
dateTablePrompt: "Use the arrow keys and enter to select the day of the month",
monthTablePrompt: "Use the arrow keys and enter to select the month",
yearTablePrompt: "Use the arrow keys and enter to select the year",
selectedDate: "Selected date",
selectDate: "Select date",
selectTime: "Select time",
startDate: "Start Date",
startTime: "Start Time",
endDate: "End Date",
endTime: "End Time",
prevYear: "Previous Year",
nextYear: "Next Year",
prevMonth: "Previous Month",
nextMonth: "Next Month",
year: "",
month1: "January",
month2: "February",
month3: "March",
month4: "April",
month5: "May",
month6: "June",
month7: "July",
month8: "August",
month9: "September",
month10: "October",
month11: "November",
month12: "December",
week: "week",
weeks: {
sun: "Sun",
mon: "Mon",
tue: "Tue",
wed: "Wed",
thu: "Thu",
fri: "Fri",
sat: "Sat"
},
weeksFull: {
sun: "Sunday",
mon: "Monday",
tue: "Tuesday",
wed: "Wednesday",
thu: "Thursday",
fri: "Friday",
sat: "Saturday"
},
months: {
jan: "Jan",
feb: "Feb",
mar: "Mar",
apr: "Apr",
may: "May",
jun: "Jun",
jul: "Jul",
aug: "Aug",
sep: "Sep",
oct: "Oct",
nov: "Nov",
dec: "Dec"
}
},
inputNumber: {
decrease: "decrease number",
increase: "increase number"
},
select: {
loading: "Loading",
noMatch: "No matching data",
noData: "No data",
placeholder: "Select"
},
dropdown: {
toggleDropdown: "Toggle Dropdown"
},
cascader: {
noMatch: "No matching data",
loading: "Loading",
placeholder: "Select",
noData: "No data"
},
pagination: {
goto: "Go to",
pagesize: "/page",
total: "Total {total}",
pageClassifier: "",
page: "Page",
prev: "Go to previous page",
next: "Go to next page",
currentPage: "page {pager}",
prevPages: "Previous {pager} pages",
nextPages: "Next {pager} pages",
deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details"
},
dialog: {
close: "Close this dialog"
},
drawer: {
close: "Close this dialog"
},
messagebox: {
title: "Message",
confirm: "OK",
cancel: "Cancel",
error: "Illegal input",
close: "Close this dialog"
},
upload: {
deleteTip: "press delete to remove",
delete: "Delete",
preview: "Preview",
continue: "Continue"
},
slider: {
defaultLabel: "slider between {min} and {max}",
defaultRangeStartLabel: "pick start value",
defaultRangeEndLabel: "pick end value"
},
table: {
emptyText: "No Data",
confirmFilter: "Confirm",
resetFilter: "Reset",
clearFilter: "All",
sumText: "Sum"
},
tour: {
next: "Next",
previous: "Previous",
finish: "Finish"
},
tree: {
emptyText: "No Data"
},
transfer: {
noMatch: "No matching data",
noData: "No data",
titles: ["List 1", "List 2"],
filterPlaceholder: "Enter keyword",
noCheckedFormat: "{total} items",
hasCheckedFormat: "{checked}/{total} checked"
},
image: {
error: "FAILED"
},
pageHeader: {
title: "Back"
},
popconfirm: {
confirmButtonText: "Yes",
cancelButtonText: "No"
}
}
};
const buildTranslator = (locale) => (path, option) => translate(path, option, vue.unref(locale));
const translate = (path, option, locale) => get(locale, path, path).replace(/\{(\w+)\}/g, (_, key) => {
var _a2;
return `${(_a2 = option == null ? void 0 : option[key]) != null ? _a2 : `{${key}}`}`;
});
const buildLocaleContext = (locale) => {
const lang = vue.computed(() => vue.unref(locale).name);
const localeRef = vue.isRef(locale) ? locale : vue.ref(locale);
return {
lang,
locale: localeRef,
t: buildTranslator(locale)
};
};
const localeContextKey = Symbol("localeContextKey");
const useLocale = (localeOverrides) => {
const locale = localeOverrides || vue.inject(localeContextKey, vue.ref());
return buildLocaleContext(vue.computed(() => locale.value || English));
};
const defaultNamespace = "el";
const statePrefix = "is-";
const _bem = (namespace, block, blockSuffix, element, modifier) => {
let cls = `${namespace}-${block}`;
if (blockSuffix) {
cls += `-${blockSuffix}`;
}
if (element) {
cls += `__${element}`;
}
if (modifier) {
cls += `--${modifier}`;
}
return cls;
};
const namespaceContextKey = Symbol("namespaceContextKey");
const useGetDerivedNamespace = (namespaceOverrides) => {
const derivedNamespace = namespaceOverrides || (vue.getCurrentInstance() ? vue.inject(namespaceContextKey, vue.ref(defaultNamespace)) : vue.ref(defaultNamespace));
const namespace = vue.computed(() => {
return vue.unref(derivedNamespace) || defaultNamespace;
});
return namespace;
};
const useNamespace = (block, namespaceOverrides) => {
const namespace = useGetDerivedNamespace(namespaceOverrides);
const b = (blockSuffix = "") => _bem(namespace.value, block, blockSuffix, "", "");
const e = (element) => element ? _bem(namespace.value, block, "", element, "") : "";
const m = (modifier) => modifier ? _bem(namespace.value, block, "", "", modifier) : "";
const be = (blockSuffix, element) => blockSuffix && element ? _bem(namespace.value, block, blockSuffix, element, "") : "";
const em = (element, modifier) => element && modifier ? _bem(namespace.value, block, "", element, modifier) : "";
const bm = (blockSuffix, modifier) => blockSuffix && modifier ? _bem(namespace.value, block, blockSuffix, "", modifier) : "";
const bem = (blockSuffix, element, modifier) => blockSuffix && element && modifier ? _bem(namespace.value, block, blockSuffix, element, modifier) : "";
const is = (name, ...args) => {
const state = args.length >= 1 ? args[0] : true;
return name && state ? `${statePrefix}${name}` : "";
};
const cssVar = (object) => {
const styles = {};
for (const key in object) {
if (object[key]) {
styles[`--${namespace.value}-${key}`] = object[key];
}
}
return styles;
};
const cssVarBlock = (object) => {
const styles = {};
for (const key in object) {
if (object[key]) {
styles[`--${namespace.value}-${block}-${key}`] = object[key];
}
}
return styles;
};
const cssVarName = (name) => `--${namespace.value}-${name}`;
const cssVarBlockName = (name) => `--${namespace.value}-${block}-${name}`;
return {
namespace,
b,
e,
m,
be,
em,
bm,
bem,
is,
cssVar,
cssVarName,
cssVarBlock,
cssVarBlockName
};
};
const zIndex = vue.ref(0);
const defaultInitialZIndex = 2e3;
const zIndexContextKey = Symbol("zIndexContextKey");
const useZIndex = (zIndexOverrides) => {
const zIndexInjection = zIndexOverrides || (vue.getCurrentInstance() ? vue.inject(zIndexContextKey, void 0) : void 0);
const initialZIndex = vue.computed(() => {
const zIndexFromInjection = vue.unref(zIndexInjection);
return isNumber(zIndexFromInjection) ? zIndexFromInjection : defaultInitialZIndex;
});
const currentZIndex = vue.computed(() => initialZIndex.value + zIndex.value);
const nextZIndex = () => {
zIndex.value++;
return currentZIndex.value;
};
return {
initialZIndex,
currentZIndex,
nextZIndex
};
};
const useSizeProp = buildProp({
type: String,
values: componentSizes,
required: false
});
const SIZE_INJECTION_KEY = Symbol("size");
const configProviderContextKey = Symbol();
const globalConfig = vue.ref();
function useGlobalConfig(key, defaultValue = void 0) {
const config = vue.getCurrentInstance() ? vue.inject(configProviderContextKey, globalConfig) : globalConfig;
if (key) {
return vue.computed(() => {
var _a2, _b;
return (_b = (_a2 = config.value) == null ? void 0 : _a2[key]) != null ? _b : defaultValue;
});
} else {
return config;
}
}
function useGlobalComponentSettings(block, sizeFallback) {
const config = useGlobalConfig();
const ns = useNamespace(block, vue.computed(() => {
var _a2;
return ((_a2 = config.value) == null ? void 0 : _a2.namespace) || defaultNamespace;
}));
const locale = useLocale(vue.computed(() => {
var _a2;
return (_a2 = config.value) == null ? void 0 : _a2.locale;
}));
const zIndex2 = useZIndex(vue.computed(() => {
var _a2;
return ((_a2 = config.value) == null ? void 0 : _a2.zIndex) || defaultInitialZIndex;
}));
const size = vue.computed(() => {
var _a2;
return vue.unref(sizeFallback) || ((_a2 = config.value) == null ? void 0 : _a2.size) || "";
});
provideGlobalConfig(vue.computed(() => vue.unref(config) || {}));
return {
ns,
locale,
zIndex: zIndex2,
size
};
}
const provideGlobalConfig = (config, app, global2 = false) => {
var _a2;
const inSetup = !!vue.getCurrentInstance();
const oldConfig = inSetup ? useGlobalConfig() : void 0;
const provideFn = (_a2 = app == null ? void 0 : app.provide) != null ? _a2 : inSetup ? vue.provide : void 0;
if (!provideFn) {
return;
}
const context = vue.computed(() => {
const cfg = vue.unref(config);
if (!(oldConfig == null ? void 0 : oldConfig.value))
return cfg;
return mergeConfig(oldConfig.value, cfg);
});
provideFn(configProviderContextKey, context);
provideFn(localeContextKey, vue.computed(() => context.value.locale));
provideFn(namespaceContextKey, vue.computed(() => context.value.namespace));
provideFn(zIndexContextKey, vue.computed(() => context.value.zIndex));
provideFn(SIZE_INJECTION_KEY, {
size: vue.computed(() => context.value.size || "")
});
if (global2 || !globalConfig.value) {
globalConfig.value = context.value;
}
return context;
};
const mergeConfig = (a, b) => {
var _a2;
const keys = [.../* @__PURE__ */ new Set([...keysOf(a), ...keysOf(b)])];
const obj = {};
for (const key of keys) {
obj[key] = (_a2 = b[key]) != null ? _a2 : a[key];
}
return obj;
};
const configProviderProps = buildProps({
a11y: {
type: Boolean,
default: true
},
locale: {
type: definePropType(Object)
},
size: useSizeProp,
button: {
type: definePropType(Object)
},
experimentalFeatures: {
type: definePropType(Object)
},
keyboardNavigation: {
type: Boolean,
default: true
},
message: {
type: definePropType(Object)
},
zIndex: Number,
namespace: {
type: String,
default: "el"
}
});
const messageConfig = {};
vue.defineComponent({
name: "ElConfigProvider",
props: configProviderProps,
setup(props, { slots }) {
vue.watch(() => props.message, (val) => {
Object.assign(messageConfig, val != null ? val : {});
}, { immediate: true, deep: true });
const config = provideGlobalConfig(props);
return () => vue.renderSlot(slots, "default", { config: config == null ? void 0 : config.value });
}
});
var _export_sfc = (sfc, props) => {
const target = sfc.__vccOpts || sfc;
for (const [key, val] of props) {
target[key] = val;
}
return target;
};
const iconProps = buildProps({
size: {
type: definePropType([Number, String])
},
color: {
type: String
}
});
const __default__$2 = vue.defineComponent({
name: "ElIcon",
inheritAttrs: false
});
const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
...__default__$2,
props: iconProps,
setup(__props) {
const props = __props;
const ns = useNamespace("icon");
const style2 = vue.computed(() => {
const { size, color } = props;
if (!size && !color)
return {};
return {
fontSize: isUndefined(size) ? void 0 : addUnit(size),
"--color": color
};
});
return (_ctx, _cache) => {
return vue.openBlock(), vue.createElementBlock("i", vue.mergeProps({
class: vue.unref(ns).b(),
style: vue.unref(style2)
}, _ctx.$attrs), [
vue.renderSlot(_ctx.$slots, "default")
], 16);
};
}
});
var Icon = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__file", "icon.vue"]]);
const ElIcon = withInstall(Icon);
const badgeProps = buildProps({
value: {
type: [String, Number],
default: ""
},
max: {
type: Number,
default: 99
},
isDot: Boolean,
hidden: Boolean,
type: {
type: String,
values: ["primary", "success", "warning", "info", "danger"],
default: "danger"
}
});
const _hoisted_1$2 = ["textContent"];
const __default__$1 = vue.defineComponent({
name: "ElBadge"
});
const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
...__default__$1,
props: badgeProps,
setup(__props, { expose }) {
const props = __props;
const ns = useNamespace("badge");
const content = vue.computed(() => {
if (props.isDot)
return "";
if (isNumber(props.value) && isNumber(props.max)) {
return props.max < props.value ? `${props.max}+` : `${props.value}`;
}
return `${props.value}`;
});
expose({
content
});
return (_ctx, _cache) => {
return vue.openBlock(), vue.createElementBlock("div", {
class: vue.normalizeClass(vue.unref(ns).b())
}, [
vue.renderSlot(_ctx.$slots, "default"),
vue.createVNode(vue.Transition, {
name: `${vue.unref(ns).namespace.value}-zoom-in-center`,
persisted: ""
}, {
default: vue.withCtx(() => [
vue.withDirectives(vue.createElementVNode("sup", {
class: vue.normalizeClass([
vue.unref(ns).e("content"),
vue.unref(ns).em("content", _ctx.type),
vue.unref(ns).is("fixed", !!_ctx.$slots.default),
vue.unref(ns).is("dot", _ctx.isDot)
]),
textContent: vue.toDisplayString(vue.unref(content))
}, null, 10, _hoisted_1$2), [
[vue.vShow, !_ctx.hidden && (vue.unref(content) || _ctx.isDot)]
])
]),
_: 1
}, 8, ["name"])
], 2);
};
}
});
var Badge = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "badge.vue"]]);
const ElBadge = withInstall(Badge);
const messageTypes = ["success", "info", "warning", "error"];
const messageDefaults = mutable({
customClass: "",
center: false,
dangerouslyUseHTMLString: false,
duration: 3e3,
icon: void 0,
id: "",
message: "",
onClose: void 0,
showClose: false,
type: "info",
offset: 16,
zIndex: 0,
grouping: false,
repeatNum: 1,
appendTo: isClient ? document.body : void 0
});
const messageProps = buildProps({
customClass: {
type: String,
default: messageDefaults.customClass
},
center: {
type: Boolean,
default: messageDefaults.center
},
dangerouslyUseHTMLString: {
type: Boolean,
default: messageDefaults.dangerouslyUseHTMLString
},
duration: {
type: Number,
default: messageDefaults.duration
},
icon: {
type: iconPropType,
default: messageDefaults.icon
},
id: {
type: String,
default: messageDefaults.id
},
message: {
type: definePropType([
String,
Object,
Function
]),
default: messageDefaults.message
},
onClose: {
type: definePropType(Function),
required: false
},
showClose: {
type: Boolean,
default: messageDefaults.showClose
},
type: {
type: String,
values: messageTypes,
default: messageDefaults.type
},
offset: {
type: Number,
default: messageDefaults.offset
},
zIndex: {
type: Number,
default: messageDefaults.zIndex
},
grouping: {
type: Boolean,
default: messageDefaults.grouping
},
repeatNum: {
type: Number,
default: messageDefaults.repeatNum
}
});
const messageEmits = {
destroy: () => true
};
const instances = vue.shallowReactive([]);
const getInstance = (id) => {
const idx = instances.findIndex((instance) => instance.id === id);
const current = instances[idx];
let prev;
if (idx > 0) {
prev = instances[idx - 1];
}
return { current, prev };
};
const getLastOffset = (id) => {
const { prev } = getInstance(id);
if (!prev)
return 0;
return prev.vm.exposed.bottom.value;
};
const getOffsetOrSpace = (id, offset) => {
const idx = instances.findIndex((instance) => instance.id === id);
return idx > 0 ? 20 : offset;
};
const _hoisted_1$1 = ["id"];
const _hoisted_2 = ["innerHTML"];
const __default__ = vue.defineComponent({
name: "ElMessage"
});
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
...__default__,
props: messageProps,
emits: messageEmits,
setup(__props, { expose }) {
const props = __props;
const { Close } = TypeComponents;
const { ns, zIndex: zIndex2 } = useGlobalComponentSettings("message");
const { currentZIndex, nextZIndex } = zIndex2;
const messageRef = vue.ref();
const visible = vue.ref(false);
const height = vue.ref(0);
let stopTimer = void 0;
const badgeType = vue.computed(() => props.type ? props.type === "error" ? "danger" : props.type : "info");
const typeClass = vue.computed(() => {
const type = props.type;
return { [ns.bm("icon", type)]: type && TypeComponentsMap[type] };
});
const iconComponent = vue.computed(() => props.icon || TypeComponentsMap[props.type] || "");
const lastOffset = vue.computed(() => getLastOffset(props.id));
const offset = vue.computed(() => getOffsetOrSpace(props.id, props.offset) + lastOffset.value);
const bottom = vue.computed(() => height.value + offset.value);
const customStyle = vue.computed(() => ({
top: `${offset.value}px`,
zIndex: currentZIndex.value
}));
function startTimer() {
if (props.duration === 0)
return;
({ stop: stopTimer } = useTimeoutFn(() => {
close();
}, props.duration));
}
function clearTimer() {
stopTimer == null ? void 0 : stopTimer();
}
function close() {
visible.value = false;
}
function keydown({ code }) {
if (code === EVENT_CODE.esc) {
close();
}
}
vue.onMounted(() => {
startTimer();
nextZIndex();
visible.value = true;
});
vue.watch(() => props.repeatNum, () => {
clearTimer();
startTimer();
});
useEventListener(document, "keydown", keydown);
useResizeObserver(messageRef, () => {
height.value = messageRef.value.getBoundingClientRect().height;
});
expose({
visible,
bottom,
close
});
return (_ctx, _cache) => {
return vue.openBlock(), vue.createBlock(vue.Transition, {
name: vue.unref(ns).b("fade"),
onBeforeLeave: _ctx.onClose,
onAfterLeave: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("destroy")),
persisted: ""
}, {
default: vue.withCtx(() => [
vue.withDirectives(vue.createElementVNode("div", {
id: _ctx.id,
ref_key: "messageRef",
ref: messageRef,
class: vue.normalizeClass([
vue.unref(ns).b(),
{ [vue.unref(ns).m(_ctx.type)]: _ctx.type },
vue.unref(ns).is("center", _ctx.center),
vue.unref(ns).is("closable", _ctx.showClose),
_ctx.customClass
]),
style: vue.normalizeStyle(vue.unref(customStyle)),
role: "alert",
onMouseenter: clearTimer,
onMouseleave: startTimer
}, [
_ctx.repeatNum > 1 ? (vue.openBlock(), vue.createBlock(vue.unref(ElBadge), {
key: 0,
value: _ctx.repeatNum,
type: vue.unref(badgeType),
class: vue.normalizeClass(vue.unref(ns).e("badge"))
}, null, 8, ["value", "type", "class"])) : vue.createCommentVNode("v-if", true),
vue.unref(iconComponent) ? (vue.openBlock(), vue.createBlock(vue.unref(ElIcon), {
key: 1,
class: vue.normalizeClass([vue.unref(ns).e("icon"), vue.unref(typeClass)])
}, {
default: vue.withCtx(() => [
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(iconComponent))))
]),
_: 1
}, 8, ["class"])) : vue.createCommentVNode("v-if", true),
vue.renderSlot(_ctx.$slots, "default", {}, () => [
!_ctx.dangerouslyUseHTMLString ? (vue.openBlock(), vue.createElementBlock("p", {
key: 0,
class: vue.normalizeClass(vue.unref(ns).e("content"))
}, vue.toDisplayString(_ctx.message), 3)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
vue.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),
vue.createElementVNode("p", {
class: vue.normalizeClass(vue.unref(ns).e("content")),
innerHTML: _ctx.message
}, null, 10, _hoisted_2)
], 2112))
]),
_ctx.showClose ? (vue.openBlock(), vue.createBlock(vue.unref(ElIcon), {
key: 2,
class: vue.normalizeClass(vue.unref(ns).e("closeBtn")),
onClick: vue.withModifiers(close, ["stop"])
}, {
default: vue.withCtx(() => [
vue.createVNode(vue.unref(Close))
]),
_: 1
}, 8, ["class", "onClick"])) : vue.createCommentVNode("v-if", true)
], 46, _hoisted_1$1), [
[vue.vShow, visible.value]
])
]),
_: 3
}, 8, ["name", "onBeforeLeave"]);
};
}
});
var MessageConstructor = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "message.vue"]]);
let seed = 1;
const normalizeOptions = (params) => {
const options = !params || isString(params) || vue.isVNode(params) || isFunction$1(params) ? { message: params } : params;
const normalized = {
...messageDefaults,
...options
};
if (!normalized.appendTo) {
normalized.appendTo = document.body;
} else if (isString(normalized.appendTo)) {
let appendTo = document.querySelector(normalized.appendTo);
if (!isElement(appendTo)) {
appendTo = document.body;
}
normalized.appendTo = appendTo;
}
return normalized;
};
const closeMessage = (instance) => {
const idx = instances.indexOf(instance);
if (idx === -1)
return;
instances.splice(idx, 1);
const { handler } = instance;
handler.close();
};
const createMessage = ({ appendTo, ...options }, context) => {
const id = `message_${seed++}`;
const userOnClose = options.onClose;
const container = document.createElement("div");
const props = {
...options,
id,
onClose: () => {
userOnClose == null ? void 0 : userOnClose();
closeMessage(instance);
},
onDestroy: () => {
vue.render(null, container);
}
};
const vnode = vue.createVNode(MessageConstructor, props, isFunction$1(props.message) || vue.isVNode(props.message) ? {
default: isFunction$1(props.message) ? props.message : () => props.message
} : null);
vnode.appContext = context || message._context;
vue.render(vnode, container);
appendTo.appendChild(container.firstElementChild);
const vm = vnode.component;
const handler = {
close: () => {
vm.exposed.visible.value = false;
}
};
const instance = {
id,
vnode,
vm,
handler,
props: vnode.component.props
};
return instance;
};
const message = (options = {}, context) => {
if (!isClient)
return { close: () => void 0 };
if (isNumber(messageConfig.max) && instances.length >= messageConfig.max) {
return { close: () => void 0 };
}
const normalized = normalizeOptions(options);
if (normalized.grouping && instances.length) {
const instance2 = instances.find(({ vnode: vm }) => {
var _a2;
return ((_a2 = vm.props) == null ? void 0 : _a2.message) === normalized.message;
});
if (instance2) {
instance2.props.repeatNum += 1;
instance2.props.type = normalized.type;
return instance2.handler;
}
}
const instance = createMessage(normalized, context);
instances.push(instance);
return instance.handler;
};
messageTypes.forEach((type) => {
message[type] = (options = {}, appContext) => {
const normalized = normalizeOptions(options);
return message({ ...normalized, type }, appContext);
};
});
function closeAll(type) {
for (const instance of instances) {
if (!type || type === instance.props.type) {
instance.handler.close();
}
}
}
message.closeAll = closeAll;
message._context = null;
const ElMessage = withInstallFunction(message, "$message");
const kgLyricApi = async () => {
let content = document.querySelector(".jspPane").innerText;
let name = document.querySelector(".audioName").innerText;
let blob = new Blob([content], { type: "text/plain" });
let blobUrl = window.URL.createObjectURL(blob);
_GM_download(blobUrl, name + ".txt");
};
const headers = {
cookie: "",
authority: "complexsearch.kugou.com",
referer: "https://www.kugou.com/",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
};
const kgMusicApi = async () => {
let name = document.querySelector(".audioName").innerText;
let url = window.location.href;
let ID = url.split("/")[4].split(".")[0];
let timer = Date.now();
let datafrom = main(timer, ID);
const surl = `https://wwwapi.kugou.com/play/songinfo?srcappid=2919&clientver=20000&clienttime=${timer}&mid=269522b7f00c30ccbadd4fb48996beac&uuid=269522b7f00c30ccbadd4fb48996beac&dfid=4FHcdO39MvA22PXpyh2y0ng0&appid=1014&platid=4&encode_album_audio_id=${ID}&token=&userid=0&signature=${datafrom}`;
let response = await getDown(surl);
console.log(response);
if (response.status == 1) {
let downUrl = response.data.play_backup_url;
_GM_download(downUrl, name);
} else {
ElMessage.error("无法下载歌曲!");
}
};
const getDown = (url) => {
return new Promise((resolve, reject) => {
_GM_xmlhttpRequest({
method: "GET",
url,
headers,
// responseType: 'blob',
onload: function(res) {
resolve(JSON.parse(res.response));
}
});
});
};
const _hoisted_1 = {
class: "copy",
ref: "btnGroupRef"
};
const _sfc_main = {
__name: "App",
setup(__props) {
vue.onMounted(() => {
let url = window.location.href;
if (url.includes("kugou.com")) {
document.querySelector(".content").style.zIndex = 0;
document.querySelector(".cmhead2").style.zIndex = 0;
document.querySelector(".lyric").style.backgroundColor = "#e4cf0e";
document.querySelector(".lyric").style.color = "#222";
}
});
const code = vue.ref();
const title = vue.ref("为了减少端口压力,防止滥用,采取必要的验证手段。");
const model = vue.ref("");
const locoCode = vue.ref();
const onLyric = async () => {
locoCode.value = localStorage.getItem("code");
code.value = await getCode();
if (locoCode.value == code.value) {
let url = window.location.href;
if (url.includes("163.com")) {
wyLyricApi();
} else if (url.includes("kuwo.cn")) {
kwLyricApi();
} else if (url.includes("kugou.com")) {
kgLyricApi();
}
} else {
model.value.openModal();
}
};
const onMusic = async () => {
locoCode.value = localStorage.getItem("code");
code.value = await getCode();
if (locoCode.value == code.value) {
let url = window.location.href;
if (url.includes("163.com")) {
wyMusicApi();
} else if (url.includes("kuwo.cn")) {
kwMusicApi();
} else if (url.includes("kugou.com")) {
kgMusicApi();
}
} else {
model.value.openModal();
}
};
return (_ctx, _cache) => {
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
vue.createElementVNode("div", { class: "btngroup" }, [
vue.createElementVNode("a", {
onClick: onLyric,
class: "lyric"
}, "歌词下载"),
vue.createElementVNode("a", {
onClick: onMusic,
class: "down"
}, "音乐下载")
]),
vue.createVNode(Model, {
title: title.value,
code: code.value,
ref_key: "model",
ref: model
}, null, 8, ["title", "code"])
], 512);
};
}
};
const App = /* @__PURE__ */ _export_sfc$1(_sfc_main, [["__scopeId", "data-v-c876fde4"]]);
const cssLoader = (e) => {
const t = GM_getResourceText(e);
return GM_addStyle(t), t;
};
cssLoader("element-plus/dist/index.css");
vue.createApp(App).mount(
(() => {
const app = document.createElement("div");
document.body.append(app);
return app;
})()
);
})(Vue, ElementPlus);