Greasy Fork is available in English.

Bilibili-Live-Spamer

B站直播文字、表情独轮车

// ==UserScript==
// @name            Bilibili-Live-Spamer
// @name:zh         Bilibili-Live-Spamer
// @namespace       https://github.com/ADJazzzz
// @version         1.3.9
// @author          ADJazz
// @description     B站直播文字、表情独轮车
// @description:zh  B站直播文字、表情独轮车
// @license         MIT
// @copyright       2023, ADJazz (https://github.com/ADJazzzz)
// @icon            data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNiAzNiI+CgogPGc+CiAgPGcgdHJhbnNmb3JtPSJyb3RhdGUoMTAuMzM4NSAxNy4zNTk3IDEyLjI5MzEpIiBzdHJva2U9Im51bGwiIGlkPSJsYXllcjEiICA+CiAgIDxwYXRoIHN0cm9rZT0ibnVsbCIgc3Ryb2tlLXdpZHRoPSIwLjAzMzA3IiBpZD0ic3ZnXzMwIiBwLWlkPSIyMzA5IiBmaWxsPSIjMjBiMGUzIiBkPSJtMTEuNzkzOTMsNC4wMjgxN2ExLjM1OTgzLDEuMzIxMjYgMCAwIDEgMS4xNTU4NiwwYTIuODI4NDcsMi43NDgyMyAwIDAgMSAwLjcwNzExLDAuNTAyMDhsMi43MTk2OCwyLjMxMjIybDEuOTQ0NTcsMGwyLjcxOTY3LC0yLjMxMjIyYTIuODU1NjUsMi43NzQ2NSAwIDAgMSAwLjcwNzExLC0wLjUwMjA4YTEuMzU5ODMsMS4zMjEyNiAwIDAgMSAxLjgwODYsMS4wOTY2NmExLjM1OTgzLDEuMzIxMjYgMCAwIDEgLTAuMjk5MTYsMC44ODUyNWE3LjYwMTUsNy4zODU4NyAwIDAgMSAtMC41OTgzMywwLjUyODVhMy45Mjk5MywzLjgxODQ1IDAgMCAxIC0wLjM4MDc1LDAuMzAzODlsMS42OTk3OSwwYTIuODgyODYsMi44MDEwOCAwIDAgMSAxLjk5ODk3LDAuODcyMDNhMi44OTY0NSwyLjgxNDI5IDAg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g9IjE5LjIzIi8+CiAgIDxjaXJjbGUgaWQ9InN2Z18yNyIgcj0iMC41MTUiIGN5PSIzMS44NzkiIGN4PSIyMS4wMTUiLz4KICA8L2c+CiAgPGNpcmNsZSBpZD0ic3ZnXzI4IiByPSIwLjc3MyIgY3k9IjMzLjQyNSIgY3g9IjExLjg4MSIgZmlsbD0iIzI5MkYzMyIvPgogIDxjaXJjbGUgaWQ9InN2Z18yOSIgcj0iMC41MTUiIGN5PSIzMy45NCIgY3g9IjMwLjkzOSIgZmlsbD0iIzY2NzU3RiIvPgogPC9nPgo8L3N2Zz4=
// @homepageURL     https://github.com/ADJazzzz/BLSPAM
// @supportURL      https://github.com/ADJazzzz/BLSPAM/issues
// @match           *://live.bilibili.com/*
// @require         https://cdn.jsdelivr.net/npm/vue@3.4.38/dist/vue.global.prod.js
// @require         data:application/javascript,window.Vue%3DVue%2Cwindow.VueDemi%3DVue%3B
// @require         https://cdn.jsdelivr.net/npm/pinia@2.2.2/dist/pinia.iife.prod.js
// @require         https://cdn.jsdelivr.net/npm/naive-ui@2.39.0/dist/index.prod.js
// @require         https://cdn.jsdelivr.net/npm/axios@1.7.7/dist/axios.min.js
// @require         https://cdn.jsdelivr.net/npm/lodash@4.17.21/lodash.min.js
// @connect         api.bilibili.com
// @connect         api.live.bilibili.com
// @connect         live.bilibili.com
// @connect         api.github.com
// @grant           GM_addStyle
// @grant           GM_getValue
// @grant           GM_info
// @grant           GM_setValue
// @grant           GM_xmlhttpRequest
// @grant           unsafeWindow
// @run-at          document-end
// ==/UserScript==
!function(e,t,o,n,i){"use strict";var a=Object.defineProperty,r=(e,t,o)=>((e,t,o)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o)(e,"symbol"!=typeof t?t+"":t,o);const l=document.querySelector.bind(document);document.querySelectorAll.bind(document);const u=document.createElement.bind(document);var s=(()=>"undefined"!=typeof GM_addStyle?GM_addStyle:void 0)(),c=(()=>"undefined"!=typeof GM_getValue?GM_getValue:void 0)(),d=(()=>"undefined"!=typeof GM_info?GM_info:void 0)(),m=(()=>"undefined"!=typeof GM_setValue?GM_setValue:void 0)(),f=(()=>"undefined"!=typeof GM_xmlhttpRequest?GM_xmlhttpRequest:void 0)(),p=(()=>"undefined"!=typeof unsafeWindow?unsafeWindow:void 0)();const g={activeMenuIndex:"TextView",isShowPanel:!1,isCollapsed:!1,theme:"light"},h={TextSpam:{enable:!1,msg:"车了可能会被禁,但不车就等于一直被禁",timeinterval:3,textinterval:20,timelimit:0},EmotionSpam:{enable:!1,timeinterval:3,emotionViewSelectedID:1,msg:[],timelimit:0},TextGroupSpam:{enable:!1,timeinterval:3,textGroupTabsValue:1,textGroupTabPanels:[{key:1,name:1,tab:"第一个",msg:""}]},setting:{saveSpamerStatus:{enable:!1},autoCheckUpdate:{enable:!0},danmakuModules:{enable:!1}}};class C{static mergeConfigs(e,t){const o=n.pick(e,Object.keys(t)),i=n.merge({},t,o);return n.omitBy(i,n.isUndefined)}static setUiConfig(e){m("ui",e)}static getUiConfig(){const e=c("ui",{});return this.mergeConfigs(e,g)}static setModuleConfig(e){m("modules",e)}static getModuleConfig(){const e=c("modules",{});return this.mergeConfigs(e,h)}}const x=t.defineStore("ui",(()=>{const t=e.reactive(C.getUiConfig());return e.watch(t,n.debounce((e=>C.setUiConfig(e)),350)),{uiConfig:t,updateMenuValue:e=>{t.activeMenuIndex=e}}})),v=t.defineStore("bili",(()=>({cookies:e.ref(null),userInfo:e.ref(null),emotionData:e.ref([]),BilibiliLive:e.ref(null)})));class b{constructor(e){r(this,"NAME","BLSPAM"),r(this,"prefix_title_str"),r(this,"title"),this.title=e,this.prefix_title_str=e.split("_").join("][")}get prefix(){return[`%c${this.NAME}%c[${this.prefix_title_str}]%c:`,"font-weight: bold; color: white; background-color: #23ade5; padding: 1px 4px; border-radius: 4px;","font-weight: bold; color: #0093D3;","font-weight: bold;"]}log(...e){console.log(...this.prefix,...e)}error(...e){console.error(...this.prefix,...e)}warn(...e){console.warn(...this.prefix,...e)}}class w{constructor(e){r(this,"moduleName"),r(this,"logger"),r(this,"moduleStore",k()),this.moduleName=e,this.logger=new b(this.moduleName)}run(){throw new Error("Method not implemented.")}}i.defaults.withCredentials=!0;const N={sendMsg:(e,t,o=0,n=16777215,a=1,r=0,l=0,u=0,s=0,c="",d={appId:100,platform:5},m=25)=>{const f=v().cookies.bili_jct;return i.post("https://api.live.bilibili.com/msg/send",{msg:e,roomid:t,bubble:o,color:n,mode:a,room_type:r,jumpfrom:l,reply_mid:u,reply_attr:s,reply_dmid:c,fontsize:m,statistics:JSON.stringify(d),rnd:Date.parse((new Date).toString())/1e3,csrf:f,csrf_token:f},{headers:{"Content-Type":"multipart/form-data"}})},sendEmotion:(e,t,o=0,n=16777215,a=1,r=1,l=25)=>{const u=v().cookies.bili_jct;return i.post("https://api.live.bilibili.com/msg/send",{msg:e,roomid:t,bubble:o,color:n,mode:a,dm_type:r,fontsize:l,rnd:Date.parse((new Date).toString())/1e3,csrf:u,csrf_token:u},{headers:{"Content-Type":"multipart/form-data"}})},getEmoticons:async(e="pc",t)=>(await i.get(`https://api.live.bilibili.com/xlive/web-ucenter/v2/emoticon/GetEmoticons?platform=${e}&room_id=${t}`)).data,nav:async()=>(await i.get("https://api.bilibili.com/x/web-interface/nav")).data};const S=Object.freeze(Object.defineProperty({__proto__:null,Default_Cookies:class extends w{getCookiesValue(){return new Promise(((e,t)=>{const o=["bili_jct","LIVE_BUVID"],n={},i=document.cookie.split(";");for(const e of i){const[t,i]=e.trim().split("=");o.includes(t)&&(n[t]=i)}Object.keys(n).length===o.length?e(n):t(new Error("没找到cookies"))}))}async run(){v().cookies=await this.getCookiesValue()}},Default_UserInfo:class extends w{async getUserInfo(){try{const e=await N.nav();return 0===e.code?(this.logger.log("UserInfo",e),Promise.resolve(e.data)):(this.logger.error("获取用户信息出错",e.message),Promise.reject(e.message))}catch(e){return this.logger.error("获取用户信息出错",e),Promise.reject(e)}}getWindowBiliLive(){return new Promise((e=>{const t=setInterval((()=>{const o=p.BilibiliLive;o&&(clearInterval(t),this.logger.log("windowBiliLive",o),e(o))}),200)}))}async getEmotionData(){var e;const t=null==(e=v().BilibiliLive)?void 0:e.ROOMID;if(!t)return this.logger.error("获取用户信息出错","roomID 不存在"),Promise.reject("roomID 不存在");const o=[];try{const e=await N.getEmoticons("pc",t);return 0===e.code?(this.logger.log("EmotionData",e),o.push(...e.data.data),Promise.resolve(o)):(this.logger.error("获取表情包出错",e.message),Promise.reject(e.message))}catch(e){return this.logger.error("获取表情包出错",e),Promise.reject(e)}}async run(){v().BilibiliLive=await this.getWindowBiliLive(),v().BilibiliLive&&(v().emotionData=await this.getEmotionData()),v().userInfo=await this.getUserInfo()}}},Symbol.toStringTag,{value:"Module"}));class y extends w{constructor(){super(...arguments),r(this,"config",this.moduleStore.moduleConfig.setting.autoCheckUpdate)}async getLatestVersionRes(){return new Promise(((e,t)=>{f({url:"https://api.github.com/repos/ADJazzzz/BLSPAM/releases/latest",nocache:!0,method:"GET",responseType:"json",onload:t=>{e(t)},onerror:e=>{t(e)}})}))}getCurrentVersion(){return d.script.version}async CheckUpdate(){const t=this.getCurrentVersion(),n=(await this.getLatestVersionRes()).response;if(t===n.tag_name)this.logger.log("当前已是最新的版本");else if(t<n.tag_name){this.logger.log(`发现新版本:${n.tag_name}`);const{notification:t}=o.createDiscreteApi(["notification"]);t.create({title:`发现新版本:${n.tag_name}`,action:()=>[e.h(o.NButton,{text:!0,type:"info",style:"margin-right: 10px",onClick:()=>p.open("https://github.com/ADJazzzz/BLSPAM/blob/main/CHANGELOG.md")},{default:()=>"查看更新日志"}),e.h(o.NButton,{text:!0,type:"primary",style:"margin-right: 10px",onClick:()=>p.open(n.assets[0].browser_download_url)},{default:()=>"安装"}),e.h(o.NButton,{text:!0,type:"error",onClick:()=>{this.config.enable=!1,t.destroyAll()}},{default:()=>"关闭检测"})]})}}async run(){this.config.enable&&await this.CheckUpdate()}}const V=Object.freeze(Object.defineProperty({__proto__:null,Danmaku_DanmakuModules:class extends w{constructor(){super(...arguments),r(this,"config",this.moduleStore.moduleConfig.setting.danmakuModules)}async dmOB(){const e=l(".chat-items");e&&new MutationObserver((e=>{e.forEach((e=>{Array.from(e.addedNodes).forEach((e=>{(e instanceof HTMLElement&&e.classList.contains("chat-item")&&e.classList.contains("danmaku-item")&&2===e.classList.length||e instanceof HTMLElement&&e.classList.contains("chat-item")&&e.classList.contains("danmaku-item")&&e.classList.contains("chat-colorful-bubble")&&e.classList.contains("has-bubble")&&4===e.classList.length)&&e.addEventListener("click",(e=>this.handleNodeClick(e)))}))}))})).observe(e,{childList:!0,subtree:!1})}handleNodeClick(e){const t=e.target;t instanceof HTMLElement&&t.classList.contains("danmaku-item-right")&&this.renderMenu(t.innerText)}renderMenu(e){const t=l(".danmaku-menu.p-fixed.ts-dot-4.a-move-in-top.p-relative.z-danmaku-menu");t&&(t.querySelectorAll(".none-select").forEach((t=>{if(!t.querySelector(".dm-repeat")){const o=document.createElement("div");o.style.cursor="pointer",o.style.padding="10px",o.addEventListener("click",(()=>this.dmRepeat(e))),o.classList.add("dm-repeat");const n=document.createElement("a");n.style.color="#23ade5",n.innerText="弹幕+1",o.appendChild(n),t.appendChild(o)}if(!t.querySelector(".danmaku-copy")){const o=document.createElement("div");o.style.cursor="pointer",o.style.padding="10px",o.addEventListener("click",(()=>this.dmCopy(e))),o.classList.add("danmaku-copy");const n=document.createElement("a");n.style.color="#23ade5",n.innerText="弹幕复制",o.appendChild(n),t.appendChild(o)}})),new MutationObserver(((e,o)=>{e.forEach((e=>{"style"===e.attributeName&&"none"===t.style.display&&t.querySelectorAll(".dm-repeat, .danmaku-copy").forEach((e=>{e.remove(),o.disconnect()}))}))})).observe(t,{attributes:!0,attributeFilter:["style"]}))}async dmRepeat(e){var t;const n=null==(t=v().BilibiliLive)?void 0:t.ROOMID;if(n)try{const t=await N.sendMsg(e,n);if(0===t.data.code){this.logger.log(`弹幕 ${e} 发送成功`,t);const{message:n}=o.createDiscreteApi(["message"]);n.success(`弹幕 ${e} 发送成功`,{duration:2500})}else this.logger.error(`弹幕 ${e} 发送失败`,t)}catch(t){this.logger.error(`弹幕 ${e} 发送失败`,t)}}async dmCopy(e){try{await navigator.clipboard.writeText(e);const{message:t}=o.createDiscreteApi(["message"]);t.success(`弹幕 ${e} 已复制`,{duration:2500})}catch(e){this.logger.log("复制到剪切板失败",e)}}async run(){this.config.enable&&this.dmOB()}},Setting_AutoCheckUpdate:y,Setting_SaveSpamerStatus:class extends w{constructor(){super(...arguments),r(this,"config",this.moduleStore.moduleConfig.setting.saveSpamerStatus)}async run(){this.config.enable?(this.logger.log("将恢复上次独轮车开关状态"),setTimeout((()=>{const e=["TextSpam","EmotionSpam","TextGroupSpam"];for(const t of e)if(this.moduleStore.moduleConfig[t].enable){this.moduleStore.emitter.emit(t,{module:t});const{notification:e}=o.createDiscreteApi(["notification"]);e.create({content:"将恢复独轮车开关状态,如需关闭请到控制面板关闭并刷新网页",closable:!1,duration:6e3});break}}),200)):(this.moduleStore.moduleConfig.TextSpam.enable=!1,this.moduleStore.moduleConfig.EmotionSpam.enable=!1,this.moduleStore.moduleConfig.TextGroupSpam.enable=!1)}},Spamer_EmotionSpamer:class extends w{constructor(){super(...arguments),r(this,"config",this.moduleStore.moduleConfig.EmotionSpam)}formatTime(e){return 1e3*e}async cycleSendEmotion(e,t,o,n){let i=0;const a=async e=>{try{const o=await N.sendEmotion(e,t);0===o.data.code?this.logger.log(`表情 ${e} 发送成功`,o):this.logger.error(`表情 ${e} 发送失败`,o)}catch(t){this.logger.error(`表情 ${e} 发送失败`,t)}},r=setInterval((async()=>{this.config.enable?(i<e.length&&(await a(e[i]),i++),i>=e.length&&(i=0)):clearInterval(r)}),o);0!==n&&setTimeout((()=>{clearInterval(r),this.config.enable=!1}),n)}async run(){this.moduleStore.emitter.on("EmotionSpam",(async()=>{var e;const t=this.config.msg,o=null==(e=v().BilibiliLive)?void 0:e.ROOMID,n=this.formatTime(this.config.timeinterval),i=this.formatTime(this.config.timelimit);o&&await this.cycleSendEmotion(t,o,n,i)}))}},Spamer_TextGroupSpamer:class extends w{constructor(){super(...arguments),r(this,"config",this.moduleStore.moduleConfig.TextGroupSpam)}formatMsg(){return n.flatMap(this.config.textGroupTabPanels,(e=>{if(e.msg){const t=e.msg.replace(/\n/g,"");return t.length>20?t.match(/.{1,20}/g)||[]:[t]}return[]}))}formatTime(e){return 1e3*e}async cycleSendDanmuGroup(e,t,o){let n=0;const i=async e=>{try{const o=await N.sendMsg(e,t);0===o.data.code?this.logger.log(`弹幕 ${e} 发送成功`,o):this.logger.error(`弹幕 ${e} 发送失败`,o)}catch(t){this.logger.error(`弹幕 ${e} 发送失败`,t)}},a=setInterval((async()=>{this.config.enable?(n<e.length&&(await i(e[n]),n++),n>=e.length&&(n=0)):clearInterval(a)}),o)}async run(){this.moduleStore.emitter.on("TextGroupSpam",(async()=>{var e;const t=this.formatMsg(),o=null==(e=v().BilibiliLive)?void 0:e.ROOMID,n=this.formatTime(this.config.timeinterval);o&&await this.cycleSendDanmuGroup(t,o,n)}))}},Spamer_TextSpamer:class extends w{constructor(){super(...arguments),r(this,"config",this.moduleStore.moduleConfig.TextSpam)}formatMsg(e){return e.replace(/\n/g,"")}formatTime(e){return 1e3*e}async cycleSendDanmu(e,t,o,n,i){const a=async e=>{try{const o=await N.sendMsg(e,t);0===o.data.code?this.logger.log(`弹幕 ${e} 发送成功`,o):this.logger.error(`弹幕 ${e} 发送失败`,o)}catch(t){this.logger.error(`弹幕 ${e} 发送失败`,t)}};if(e.length<n){const t=setInterval((async()=>{this.config.enable?await a(e):clearInterval(t)}),o);0!==i&&setTimeout((()=>{clearInterval(t),this.config.enable=!1}),i)}else{const t=[];for(let o=0;o<e.length;o+=n)t.push(e.slice(o,o+n));let r=0;const l=setInterval((async()=>{this.config.enable?(r<t.length&&(await a(t[r]),r++),r>=t.length&&(r=0)):clearInterval(l)}),o);0!==i&&setTimeout((()=>{clearInterval(l),this.config.enable=!1}),i)}}async run(){this.moduleStore.emitter.on("TextSpam",(async()=>{var e;const t=this.formatMsg(this.config.msg),o=null==(e=v().BilibiliLive)?void 0:e.ROOMID,n=this.formatTime(this.config.timeinterval),i=this.config.textinterval,a=this.formatTime(this.config.timelimit);o&&await this.cycleSendDanmu(t,o,n,i,a)}))}}},Symbol.toStringTag,{value:"Module"})),k=t.defineStore("modules",(()=>{const t=e.reactive(C.getModuleConfig()),o={all:i=i||new Map,on:function(e,t){var o=i.get(e);o?o.push(t):i.set(e,[t])},off:function(e,t){var o=i.get(e);o&&(t?o.splice(o.indexOf(t)>>>0,1):i.set(e,[]))},emit:function(e,t){var o=i.get(e);o&&o.slice().map((function(e){e(t)})),(o=i.get("*"))&&o.slice().map((function(o){o(e,t)}))}};var i;return e.watch(t,n.debounce((e=>C.setModuleConfig(e)),350)),{moduleConfig:t,loadModules:async function(){const e=new b("LoadModules");let t=0;try{await function(){const e=[];for(const[t,o]of Object.entries(S))e.push(new o(t).run());return Promise.all(e)}()}catch(o){e.error("加载默认模块出错",o),t++}if(!t)try{await function(){const e=[];for(const[t,o]of Object.entries(V))e.push(new o(t).run());return Promise.all(e)}()}catch(t){e.error("加载模块出错",t)}},emitter:o}})),T=(e,t)=>{const o=e.__vccOpts||e;for(const[e,n]of t)o[e]=n;return o},_={},M={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"20px",height:"20px",viewBox:"0 0 20 20",version:"1.1"},E=[e.createStaticVNode('<g id="surface1"><path style="stroke:none;fill-rule:nonzero;fill:rgb(83.921569%, 54.509804%, 32.156863%);fill-opacity:1;" d="M 10 2.1875 C 14.308594 2.1875 17.8125 5.691406 17.8125 10 C 17.8125 14.308594 14.308594 17.8125 10 17.8125 C 5.691406 17.8125 2.1875 14.308594 2.1875 10 C 2.1875 5.691406 5.691406 2.1875 10 2.1875 M 10 0.625 C 4.820312 0.625 0.625 4.820312 0.625 10 C 0.625 15.179688 4.820312 19.375 10 19.375 C 15.179688 19.375 19.375 15.179688 19.375 10 C 19.375 4.820312 15.179688 0.625 10 0.625 Z M 10 0.625 "></path><path style="stroke:none;fill-rule:nonzero;fill:rgb(47.058824%, 30.196078%, 18.823529%);fill-opacity:1;" d="M 10 2.191406 C 14.304688 2.191406 17.808594 5.695312 17.808594 10 C 17.808594 14.304688 14.304688 17.808594 10 17.808594 C 5.695312 17.808594 2.191406 14.304688 2.191406 10 C 2.191406 5.695312 5.695312 2.191406 10 2.191406 M 10 1.726562 C 5.429688 1.726562 1.726562 5.429688 1.726562 10 C 1.726562 14.570312 5.429688 18.273438 10 18.273438 C 14.570312 18.273438 18.273438 14.570312 18.273438 10 C 18.273438 5.429688 14.570312 1.726562 10 1.726562 Z M 10 1.726562 "></path><path style="stroke:none;fill-rule:nonzero;fill:rgb(65.098039%, 37.254902%, 24.313725%);fill-opacity:1;" d="M 17.371094 12.109375 L 11.535156 10.210938 L 17.527344 8.265625 C 17.769531 8.179688 17.898438 7.917969 17.820312 7.675781 C 17.742188 7.433594 17.484375 7.300781 17.238281 7.371094 L 11.246094 9.320312 L 14.992188 4.160156 C 15.144531 3.953125 15.101562 3.65625 14.890625 3.507812 C 14.679688 3.355469 14.386719 3.398438 14.234375 3.609375 L 10.488281 8.769531 L 10.488281 2.320312 C 10.488281 2.058594 10.277344 1.851562 10.019531 1.851562 C 9.757812 1.851562 9.550781 2.058594 9.550781 2.320312 L 9.550781 8.769531 L 5.789062 3.589844 C 5.714844 3.488281 5.605469 3.421875 5.480469 3.402344 C 5.359375 3.382812 5.234375 3.414062 5.132812 3.488281 C 5.03125 3.558594 4.964844 3.671875 4.945312 3.792969 C 4.925781 3.917969 4.957031 4.042969 5.03125 4.140625 L 8.792969 9.320312 L 2.761719 7.359375 C 2.515625 7.289062 2.257812 7.421875 2.179688 7.664062 C 2.101562 7.90625 2.230469 8.167969 2.472656 8.253906 L 8.5 10.210938 L 2.617188 12.125 C 2.371094 12.203125 2.234375 12.46875 2.3125 12.714844 C 2.351562 12.832031 2.4375 12.929688 2.546875 12.988281 C 2.65625 13.042969 2.785156 13.054688 2.90625 13.015625 L 8.789062 11.101562 L 5.210938 16.027344 C 5.0625 16.234375 5.105469 16.53125 5.316406 16.679688 C 5.398438 16.742188 5.496094 16.769531 5.589844 16.769531 C 5.734375 16.769531 5.878906 16.703125 5.96875 16.578125 L 9.546875 11.648438 L 9.546875 17.648438 C 9.546875 17.90625 9.757812 18.117188 10.015625 18.117188 C 10.277344 18.117188 10.484375 17.90625 10.484375 17.648438 L 10.484375 11.648438 L 14.074219 16.585938 C 14.164062 16.710938 14.308594 16.78125 14.453125 16.78125 C 14.628906 16.78125 14.789062 16.679688 14.871094 16.523438 C 14.949219 16.367188 14.933594 16.179688 14.832031 16.035156 L 11.242188 11.097656 L 17.078125 12.996094 C 17.128906 13.011719 17.175781 13.019531 17.226562 13.019531 C 17.421875 13.019531 17.605469 12.890625 17.671875 12.695312 C 17.75 12.453125 17.617188 12.1875 17.371094 12.109375 Z M 10 11.511719 C 9.296875 11.511719 8.726562 10.941406 8.726562 10.238281 C 8.726562 9.53125 9.296875 8.960938 10 8.960938 C 10.703125 8.960938 11.273438 9.535156 11.273438 10.238281 C 11.273438 10.941406 10.703125 11.511719 10 11.511719 Z M 10 11.511719 "></path><path style="stroke:none;fill-rule:nonzero;fill:rgb(83.921569%, 54.509804%, 32.156863%);fill-opacity:1;" d="M 10 8.597656 C 9.09375 8.597656 8.363281 9.332031 8.363281 10.234375 C 8.363281 11.140625 9.09375 11.875 10 11.875 C 10.90625 11.875 11.636719 11.140625 11.636719 10.238281 C 11.636719 9.332031 10.90625 8.597656 10 8.597656 Z M 10 10.703125 C 9.742188 10.703125 9.535156 10.492188 9.535156 10.238281 C 9.535156 9.980469 9.742188 9.773438 10 9.773438 C 10.257812 9.773438 10.464844 9.980469 10.464844 10.238281 C 10.464844 10.492188 10.257812 10.703125 10 10.703125 Z M 10 10.703125 "></path><path style="stroke:none;fill-rule:nonzero;fill:rgb(47.058824%, 30.196078%, 18.823529%);fill-opacity:1;" d="M 10 9.773438 C 10.257812 9.773438 10.464844 9.980469 10.464844 10.234375 C 10.464844 10.492188 10.257812 10.699219 10 10.699219 C 9.742188 10.699219 9.535156 10.492188 9.535156 10.234375 C 9.535156 9.980469 9.742188 9.773438 10 9.773438 M 10 9.460938 C 9.570312 9.460938 9.222656 9.808594 9.222656 10.234375 C 9.222656 10.664062 9.570312 11.011719 10 11.011719 C 10.429688 11.011719 10.777344 10.664062 10.777344 10.234375 C 10.777344 9.808594 10.429688 9.460938 10 9.460938 Z M 10 9.460938 "></path></g>',1)];const B=T(_,[["render",function(t,o){return e.openBlock(),e.createElementBlock("svg",M,E)}]]),L={},G={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 36 36"},I=[e.createElementVNode("path",{fill:"#3B88C3",d:"M36 32a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4h28a4 4 0 0 1 4 4v28z"},null,-1),e.createElementVNode("path",{fill:"#FFF",d:"M12.821 22.328c0 .703 0 1.785-1.311 1.785-.798 0-1.121-.436-1.311-1.158-.703.836-1.558 1.273-2.603 1.273-2.565 0-4.521-2.186-4.521-5.263 0-3.001 2.014-5.3 4.521-5.3 1.007 0 1.995.399 2.603 1.254.076-.665.646-1.14 1.311-1.14 1.311 0 1.311 1.083 1.311 1.786v6.763zm-4.844-.607c1.425 0 2.109-1.444 2.109-2.755s-.665-2.792-2.109-2.792c-1.501 0-2.166 1.482-2.166 2.792.001 1.31.684 2.755 2.166 2.755zm6.403-10.829c0-.912.57-1.52 1.368-1.52.798 0 1.368.608 1.368 1.52v3.723a3.96 3.96 0 0 1 2.603-.95c2.944 0 4.407 2.754 4.407 5.415 0 2.584-1.747 5.148-4.503 5.148-.93 0-1.994-.418-2.507-1.254-.171.722-.608 1.139-1.368 1.139-.798 0-1.368-.607-1.368-1.52V10.892zm4.883 10.829c1.425 0 2.128-1.482 2.128-2.755 0-1.292-.703-2.792-2.128-2.792-1.463 0-2.146 1.368-2.146 2.697-.001 1.33.645 2.85 2.146 2.85zm12.824-5.016c-.684 0-1.292-.532-2.165-.532-1.559 0-2.299 1.387-2.299 2.792 0 1.349.817 2.755 2.299 2.755.684 0 1.709-.57 2.032-.57.647 0 1.178.551 1.178 1.197 0 1.405-2.355 1.881-3.344 1.881-2.944 0-4.901-2.413-4.901-5.263 0-2.773 2.015-5.3 4.901-5.3 1.083 0 3.344.399 3.344 1.729 0 .57-.399 1.311-1.045 1.311z"},null,-1)];const P=T(L,[["render",function(t,o){return e.openBlock(),e.createElementBlock("svg",G,I)}]]),D={},F={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 36 36"},z=[e.createElementVNode("circle",{cx:"18",cy:"18",r:"18",fill:"#FFCC4D"},null,-1),e.createElementVNode("path",{fill:"#664500",d:"M16 16.958c-.419 0-.809-.265-.949-.684-.203-.599-1.018-2.316-2.051-2.316-1.062 0-1.888 1.827-2.051 2.316a1 1 0 1 1-1.897-.633c.125-.377 1.304-3.684 3.949-3.684s3.823 3.307 3.949 3.684a1 1 0 0 1-.95 1.317zm10 0a.999.999 0 0 1-.948-.684c-.203-.599-1.019-2.316-2.052-2.316-1.062 0-1.889 1.827-2.052 2.316a1 1 0 0 1-1.897-.633c.125-.377 1.304-3.684 3.948-3.684s3.823 3.307 3.948 3.684A1 1 0 0 1 26 16.958zm1.335 3.733a.501.501 0 0 0-.635-.029c-.039.029-3.922 2.9-8.7 2.9-4.766 0-8.662-2.871-8.7-2.9a.5.5 0 0 0-.729.657c.129.215 3.217 5.243 9.429 5.243s9.301-5.028 9.429-5.243a.499.499 0 0 0-.094-.628z"},null,-1),e.createElementVNode("path",{fill:"#FFAC33",d:"M21.229 3.947c0 .24.03.472.082.696.425 2.643 3.364 5.431 5.47 6.197 1.665-.605 3.846-2.476 4.898-4.539A18.027 18.027 0 0 0 23.75.939a3.059 3.059 0 0 0-2.521 3.008zm-7.486 25.131c.057-.242.09-.494.09-.754a3.319 3.319 0 0 0-3.319-3.319 3.312 3.312 0 0 0-2.697 1.389 3.314 3.314 0 0 0-2.697-1.389 3.304 3.304 0 0 0-2.88 1.698 18.071 18.071 0 0 0 8.068 7.574c1.637-1.351 3.131-3.307 3.435-5.199zm20.558-3.436a2.29 2.29 0 0 0-4.062-.685 2.299 2.299 0 0 0-4.105 1.859c.307 1.905 2.348 3.896 3.909 4.561a18.045 18.045 0 0 0 4.258-5.735z"},null,-1),e.createElementVNode("path",{fill:"#DD2E44",d:"M33.625 3.269A3.063 3.063 0 0 0 30.562.206a3.057 3.057 0 0 0-2.489 1.282 3.063 3.063 0 0 0-5.47 2.477c.426 2.643 3.364 5.431 5.47 6.197 2.106-.766 5.044-3.554 5.469-6.196.053-.225.083-.457.083-.697zM12.208 28.408a3.319 3.319 0 0 0-3.319-3.319 3.312 3.312 0 0 0-2.697 1.389 3.311 3.311 0 0 0-2.697-1.389 3.319 3.319 0 0 0-3.23 4.073c.461 2.863 3.644 5.884 5.926 6.714 2.282-.829 5.465-3.85 5.926-6.713.058-.244.091-.496.091-.755zm23.74-2.281a2.299 2.299 0 0 0-4.167-1.337 2.299 2.299 0 0 0-4.105 1.859c.319 1.983 2.524 4.076 4.105 4.65 1.58-.574 3.786-2.667 4.104-4.65.04-.168.063-.342.063-.522z"},null,-1)];const U=T(D,[["render",function(t,o){return e.openBlock(),e.createElementBlock("svg",F,z)}]]),A={},j={xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",viewBox:"0 0 128 128"},O=[e.createStaticVNode('<path d="M88.24 9.65v-2.3c0-1.85 1.5-3.35 3.35-3.35h22.62c1.85 0 3.35 1.5 3.35 3.35v8.26c1.2 0 2.17.97 2.17 2.17V92.1H8.26V18.81c0-1.77 1.43-3.2 3.2-3.2h70.81c3.3 0 5.97-2.67 5.97-5.96" style="fill:#f3ab47;"></path><path d="M8.26 34.42v-4.43c0-1.62 1.31-2.94 2.94-2.94h105.6c1.62 0 2.94 1.31 2.94 2.94v4.43z" style="fill:#de7340;"></path><path d="M78.66 24.78v-2.3c0-1.85-1.5-3.35-3.35-3.35H52.69a3.35 3.35 0 0 0-3.35 3.35v2.3c0 3.29-2.67 5.96-5.96 5.96H11.46c-1.77 0-3.2 1.43-3.2 3.2v75.94h111.47V33.94c0-1.77-1.43-3.2-3.2-3.2H84.62c-3.29 0-5.96-2.67-5.96-5.96" style="fill:#ffca28;"></path><path d="M8.26 49.66v-4.54c0-1.62 1.31-2.94 2.94-2.94h105.6c1.62 0 2.94 1.31 2.94 2.94v4.43z" style="fill:#f3ab47;"></path><path d="M39.76 39.9v-2.3c0-1.85-1.5-3.35-3.35-3.35H13.79a3.35 3.35 0 0 0-3.35 3.35v8.26c-1.2 0-2.17.97-2.17 2.17v73.13c0 1.56 1.27 2.83 2.83 2.83h105.81c1.56 0 2.83-1.27 2.83-2.83v-72.1c0-1.77-1.43-3.2-3.2-3.2H45.72c-3.29 0-5.96-2.67-5.96-5.96" style="fill:#ffe36c;"></path><path d="M39.76 39.9v-2.3c0-1.85-1.5-3.35-3.35-3.35H13.79a3.35 3.35 0 0 0-3.35 3.35v8.26h35.29c-3.3 0-5.97-2.67-5.97-5.96" style="fill:#f44336;"></path><path d="M78.66 24.78v-2.3c0-1.85-1.5-3.35-3.35-3.35H52.69a3.35 3.35 0 0 0-3.35 3.35v2.3c0 3.29-2.67 5.96-5.96 5.96h41.25c-3.3 0-5.97-2.67-5.97-5.96" style="fill:#0288d1;"></path><path d="M117.56 15.07V7.35c0-1.85-1.5-3.35-3.35-3.35H91.59a3.35 3.35 0 0 0-3.35 3.35v2.3c0 2.41-1.44 4.49-3.5 5.42z" style="fill:#7cb342;"></path>',8)];const $=T(A,[["render",function(t,o){return e.openBlock(),e.createElementBlock("svg",j,O)}]]),q={},H={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Z=[e.createElementVNode("path",{d:"M12.8472 3.83391C12.9336 2.79732 13.8001 2 14.8403 2H17.1597C18.1999 2 19.0664 2.79732 19.1528 3.83391L19.3882 6.6587C19.422 7.06373 19.8992 7.2614 20.2095 6.99887L22.3734 5.16789C23.1674 4.49599 24.3439 4.54493 25.0795 5.28045L26.7196 6.92056C27.4551 7.65608 27.504 8.8326 26.8321 9.62666L25.0012 11.7905C24.7386 12.1008 24.9363 12.578 25.3413 12.6118L28.1661 12.8472C29.2027 12.9336 30 13.8001 30 14.8403V17.1597C30 18.1999 29.2027 19.0664 28.1661 19.1528L25.3413 19.3882C24.9363 19.422 24.7386 19.8992 25.0012 20.2095L26.8321 22.3733C27.504 23.1674 27.4551 24.3439 26.7196 25.0794L25.0795 26.7196C24.3439 27.4551 23.1674 27.504 22.3734 26.8321L20.2095 25.0011C19.8992 24.7386 19.422 24.9363 19.3882 25.3413L19.1528 28.1661C19.0664 29.2027 18.1999 30 17.1597 30H14.8403C13.8001 30 12.9336 29.2027 12.8472 28.1661L12.6118 25.3413C12.578 24.9363 12.1008 24.7386 11.7905 25.0012L9.62666 26.8321C8.8326 27.504 7.65608 27.4551 6.92056 26.7196L5.28045 25.0795C4.54493 24.3439 4.496 23.1674 5.16789 22.3734L6.99888 20.2095C7.26141 19.8992 7.06373 19.422 6.65871 19.3882L3.83391 19.1528C2.79732 19.0664 2 18.1999 2 17.1597V14.8403C2 13.8001 2.79732 12.9336 3.83391 12.8472L6.65871 12.6118C7.06373 12.578 7.2614 12.1008 6.99888 11.7905L5.16789 9.62664C4.496 8.83258 4.54493 7.65606 5.28045 6.92054L6.92056 5.28043C7.65608 4.54491 8.8326 4.49597 9.62666 5.16787L11.7905 6.99884C12.1008 7.26137 12.578 7.06369 12.6118 6.65867L12.8472 3.83391ZM21 16C21 13.2386 18.7614 11 16 11C13.2386 11 11 13.2386 11 16C11 18.7614 13.2386 21 16 21C18.7614 21 21 18.7614 21 16Z",fill:"#B4ACBC"},null,-1),e.createElementVNode("path",{d:"M24 16C24 20.4183 20.4183 24 16 24C11.5817 24 8 20.4183 8 16C8 11.5817 11.5817 8 16 8C20.4183 8 24 11.5817 24 16ZM20.5 16C20.5 13.5147 18.4853 11.5 16 11.5C13.5147 11.5 11.5 13.5147 11.5 16C11.5 18.4853 13.5147 20.5 16 20.5C18.4853 20.5 20.5 18.4853 20.5 16Z",fill:"#998EA4"},null,-1),e.createElementVNode("path",{d:"M10.5 16C10.5 12.9624 12.9624 10.5 16 10.5C19.0376 10.5 21.5 12.9624 21.5 16C21.5 19.0376 19.0376 21.5 16 21.5C12.9624 21.5 10.5 19.0376 10.5 16ZM21 16C21 13.2386 18.7614 11 16 11C13.2386 11 11 13.2386 11 16C11 18.7614 13.2386 21 16 21C18.7614 21 21 18.7614 21 16Z",fill:"#CDC4D6"},null,-1)];const R=T(q,[["render",function(t,o){return e.openBlock(),e.createElementBlock("svg",H,Z)}]]),W=e.defineComponent({__name:"PanelMenu",setup(t){const n=x();function i(t){return()=>e.h(o.NIcon,null,{default:()=>e.h(t)})}const a=[{label:"文字",key:"TextView",icon:i(P)},{label:"文字池",key:"TextGroupView",icon:i($)},{label:"表情",key:"EmotionView",icon:i(U)},{label:"全局设置",key:"SettingView",icon:i(R)}];return(t,i)=>(e.openBlock(),e.createBlock(e.unref(o.NMenu),{"collapsed-width":64,"collapsed-icon-size":22,options:a,"onUpdate:value":[e.unref(n).updateMenuValue,i[0]||(i[0]=t=>e.unref(n).uiConfig.activeMenuIndex=t)],value:e.unref(n).uiConfig.activeMenuIndex},null,8,["onUpdate:value","value"]))}}),J=e.createElementVNode("span",null,"弹幕发送时间间隔,默认为3秒,也是b站最快的发弹幕频率,当然这里可以设置小于该值",-1),K=e.createElementVNode("span",null,"每次弹幕发送字数,最大为30",-1),Q=e.createElementVNode("span",null,"设定一个时间,计时完成后自动停止,单位为秒,0为关闭该功能",-1),X=e.defineComponent({__name:"TextView",setup(t){const n=x(),i=k(),a=o.useMessage(),r=()=>{""===i.moduleConfig.TextSpam.msg||null===i.moduleConfig.TextSpam.msg?a.error("没内容你车什么?"):null===i.moduleConfig.TextSpam.textinterval||null===i.moduleConfig.TextSpam.timeinterval||null===i.moduleConfig.TextSpam.timelimit?a.error("没参数你车什么?"):(n.uiConfig.isShowPanel=!1,i.moduleConfig.TextSpam.enable=!0,i.emitter.emit("TextSpam",{module:"TextSpam"}))},l=()=>{i.moduleConfig.TextSpam.enable=!1},u={timeinterval:{required:!0,message:"最小为1",trigger:["input","blur"],validator:()=>null!==i.moduleConfig.TextSpam.timeinterval},textinterval:{required:!0,message:"输入一个大于0,小于30的数字",trigger:["input","blur"],validator:()=>null!==i.moduleConfig.TextSpam.textinterval},timelimit:{required:!0,message:"输入一个大于等于0的数字",trigger:["input","blur"],validator:()=>null!==i.moduleConfig.TextSpam.timelimit},msg:{required:!0,message:"没内容你车什么",trigger:["input","blur"],validator:()=>i.moduleConfig.TextSpam.msg.length>0}};return(t,a)=>(e.openBlock(),e.createBlock(e.unref(o.NForm),{rules:u,disabled:e.unref(i).moduleConfig.TextSpam.enable},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NFormItem),{"show-label":!1},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NFlex),{align:"center"},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NFormItem),{label:"时间间隔",path:"timeinterval"},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NPopover),{trigger:"hover",style:{"max-width":"300px"},placement:"bottom"},{trigger:e.withCtx((()=>[e.createVNode(e.unref(o.NInputNumber),{clearable:"","show-button":!1,value:e.unref(i).moduleConfig.TextSpam.timeinterval,"onUpdate:value":a[0]||(a[0]=t=>e.unref(i).moduleConfig.TextSpam.timeinterval=t),placeholder:"默认3,单位为秒",min:"1",precision:0},{suffix:e.withCtx((()=>[e.createTextVNode(" 秒 ")])),_:1},8,["value"])])),default:e.withCtx((()=>[J])),_:1})])),_:1}),e.createVNode(e.unref(o.NFormItem),{label:"数量间隔",path:"textinterval"},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NPopover),{trigger:"hover",placement:"bottom"},{trigger:e.withCtx((()=>[e.createVNode(e.unref(o.NInputNumber),{clearable:"","show-button":!1,value:e.unref(i).moduleConfig.TextSpam.textinterval,"onUpdate:value":a[1]||(a[1]=t=>e.unref(i).moduleConfig.TextSpam.textinterval=t),placeholder:"默认20",min:"1",max:"30",precision:0},null,8,["value"])])),default:e.withCtx((()=>[K])),_:1})])),_:1}),e.createVNode(e.unref(o.NFormItem),{label:"时间限制",path:"timelimit"},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NPopover),{trigger:"hover",placement:"bottom"},{trigger:e.withCtx((()=>[e.createVNode(e.unref(o.NInputNumber),{clearable:"","show-button":!1,value:e.unref(i).moduleConfig.TextSpam.timelimit,"onUpdate:value":a[2]||(a[2]=t=>e.unref(i).moduleConfig.TextSpam.timelimit=t),placeholder:"默认0",min:"0",precision:0},{suffix:e.withCtx((()=>[e.createTextVNode(" 秒 ")])),_:1},8,["value"])])),default:e.withCtx((()=>[Q])),_:1})])),_:1})])),_:1})])),_:1}),e.createVNode(e.unref(o.NFormItem),{label:"发送内容",path:"msg"},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NInput),{round:"",clearable:"",type:"textarea","show-count":"",value:e.unref(i).moduleConfig.TextSpam.msg,"onUpdate:value":a[3]||(a[3]=t=>e.unref(i).moduleConfig.TextSpam.msg=t),placeholder:"车了可能会被禁,但不车就等于一直被禁"},null,8,["value"])])),_:1}),e.unref(i).moduleConfig.TextSpam.enable?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(o.NFlex),{key:0,justify:"end",style:{"margin-top":"10px"}},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NButton),{round:"",onClick:a[4]||(a[4]=t=>e.unref(n).uiConfig.isShowPanel=!1)},{default:e.withCtx((()=>[e.createTextVNode("取消")])),_:1}),e.createVNode(e.unref(o.NButton),{round:"",type:"primary",onClick:r},{default:e.withCtx((()=>[e.createTextVNode("开车")])),_:1})])),_:1})),e.unref(i).moduleConfig.TextSpam.enable?(e.openBlock(),e.createBlock(e.unref(o.NFlex),{key:1,justify:"end",style:{"margin-top":"10px"}},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NButton),{round:"",onClick:a[5]||(a[5]=t=>e.unref(n).uiConfig.isShowPanel=!1)},{default:e.withCtx((()=>[e.createTextVNode("取消")])),_:1}),e.createVNode(e.unref(o.NButton),{round:"",type:"error",onClick:l},{default:e.withCtx((()=>[e.createTextVNode("停车")])),_:1})])),_:1})):e.createCommentVNode("",!0)])),_:1},8,["disabled"]))}}),Y=["id","onClick"],ee={key:0,id:"emotionContent"},te=e.createElementVNode("span",null,"弹幕发送时间间隔,默认为3秒,也是b站最快的发弹幕频率,当然这里可以设置小于该值",-1),oe=e.createElementVNode("span",null,"设定一个时间,计时完成后自动停止,单位为秒,0为关闭该功能",-1),ne=e.defineComponent({__name:"EmotionView",setup(t){const n=v(),i=k(),a=x(),r=o.useMessage(),l=e=>{i.moduleConfig.EmotionSpam.msg=e.map(String)},u={timeinterval:{required:!0,message:"最小为1",trigger:["input","blur"],validator:()=>null!==i.moduleConfig.EmotionSpam.timeinterval},timelimit:{required:!0,message:"输入一个大于等于0的数字",trigger:["input","blur"],validator:()=>null!==i.moduleConfig.EmotionSpam.timelimit}},s=()=>{0===i.moduleConfig.EmotionSpam.msg.length?r.error("没选表情你车什么?"):null===i.moduleConfig.EmotionSpam.timeinterval||null===i.moduleConfig.EmotionSpam.timelimit?r.error("没参数你车什么?"):(a.uiConfig.isShowPanel=!1,i.moduleConfig.EmotionSpam.enable=!0,i.emitter.emit("EmotionSpam",{module:"EmotionSpam"}))},c=()=>{i.moduleConfig.EmotionSpam.enable=!1};return(t,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(o.NFlex),{id:"emotionTab",justify:"start"},{default:e.withCtx((()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n).emotionData.filter((e=>100!==e.pkg_id)),(t=>(e.openBlock(),e.createElementBlock("div",{style:{padding:"0 5px"},key:t.pkg_id,id:t.pkg_id.toString(),onClick:e=>{return o=t.pkg_id,void(i.moduleConfig.EmotionSpam.emotionViewSelectedID=o);var o}},[e.createVNode(e.unref(o.NAvatar),{color:"dark"===e.unref(a).uiConfig.theme?"#101014":"white",src:t.current_cover,size:35},null,8,["color","src"])],8,Y)))),128))])),_:1}),e.createVNode(e.unref(o.NDivider),{style:{margin:"15px 0"}}),null!==e.unref(i).moduleConfig.EmotionSpam.emotionViewSelectedID?(e.openBlock(),e.createElementBlock("div",ee,[e.createVNode(e.unref(o.NCheckboxGroup),{value:e.unref(i).moduleConfig.EmotionSpam.msg,"onUpdate:value":[r[0]||(r[0]=t=>e.unref(i).moduleConfig.EmotionSpam.msg=t),l]},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NFlex),{style:{"padding-top":"5px"}},{default:e.withCtx((()=>{var t;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(null==(t=e.unref(n).emotionData.find((t=>t.pkg_id===e.unref(i).moduleConfig.EmotionSpam.emotionViewSelectedID)))?void 0:t.emoticons,(t=>(e.openBlock(),e.createBlock(e.unref(o.NCheckbox),{value:t.emoticon_unique,key:t.emoticon_id,disabled:0===t.perm||e.unref(i).moduleConfig.EmotionSpam.enable},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NPopover),null,{trigger:e.withCtx((()=>[e.createVNode(e.unref(o.NAvatar),{color:"dark"===e.unref(a).uiConfig.theme?"#101014":"white",size:60,src:t.url,"object-fit":"contain"},null,8,["color","src"])])),default:e.withCtx((()=>[e.createElementVNode("span",null,e.toDisplayString(t.emoji),1)])),_:2},1024)])),_:2},1032,["value","disabled"])))),128))]})),_:1})])),_:1},8,["value"])])):e.createCommentVNode("",!0),e.createVNode(e.unref(o.NDivider),{style:{margin:"15px 0"}}),e.createVNode(e.unref(o.NFlex),{justify:"space-between",align:"center"},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NForm),{rules:u,disabled:e.unref(i).moduleConfig.EmotionSpam.enable},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NFlex),null,{default:e.withCtx((()=>[e.createVNode(e.unref(o.NFormItem),{label:"时间间隔",path:"timeinterval"},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NPopover),{trigger:"hover",style:{"max-width":"300px"}},{trigger:e.withCtx((()=>[e.createVNode(e.unref(o.NInputNumber),{clearable:"","show-button":!1,value:e.unref(i).moduleConfig.EmotionSpam.timeinterval,"onUpdate:value":r[1]||(r[1]=t=>e.unref(i).moduleConfig.EmotionSpam.timeinterval=t),placeholder:"默认3,单位为秒",min:"1",precision:0},{suffix:e.withCtx((()=>[e.createTextVNode(" 秒 ")])),_:1},8,["value"])])),default:e.withCtx((()=>[te])),_:1})])),_:1}),e.createVNode(e.unref(o.NFormItem),{label:"时间限制",path:"timelimit"},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NPopover),{trigger:"hover"},{trigger:e.withCtx((()=>[e.createVNode(e.unref(o.NInputNumber),{clearable:"","show-button":!1,value:e.unref(i).moduleConfig.EmotionSpam.timelimit,"onUpdate:value":r[2]||(r[2]=t=>e.unref(i).moduleConfig.EmotionSpam.timelimit=t),placeholder:"默认0",min:"0",precision:0},{suffix:e.withCtx((()=>[e.createTextVNode(" 秒 ")])),_:1},8,["value"])])),default:e.withCtx((()=>[oe])),_:1})])),_:1})])),_:1})])),_:1},8,["disabled"]),e.unref(i).moduleConfig.EmotionSpam.enable?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(o.NFlex),{key:0,justify:"end",style:{"margin-top":"10px"}},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NButton),{disabled:0===e.unref(i).moduleConfig.EmotionSpam.msg.length,round:"",type:"info",onClick:r[3]||(r[3]=t=>e.unref(i).moduleConfig.EmotionSpam.msg=[])},{default:e.withCtx((()=>[e.createTextVNode("清空")])),_:1},8,["disabled"]),e.createVNode(e.unref(o.NButton),{round:"",onClick:r[4]||(r[4]=t=>e.unref(a).uiConfig.isShowPanel=!1)},{default:e.withCtx((()=>[e.createTextVNode("取消")])),_:1}),e.createVNode(e.unref(o.NButton),{round:"",type:"primary",onClick:s},{default:e.withCtx((()=>[e.createTextVNode("开车")])),_:1})])),_:1})),e.unref(i).moduleConfig.EmotionSpam.enable?(e.openBlock(),e.createBlock(e.unref(o.NFlex),{key:1,justify:"end",style:{"margin-top":"10px"}},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NButton),{round:"",onClick:r[5]||(r[5]=t=>e.unref(a).uiConfig.isShowPanel=!1)},{default:e.withCtx((()=>[e.createTextVNode("取消")])),_:1}),e.createVNode(e.unref(o.NButton),{round:"",type:"error",onClick:c},{default:e.withCtx((()=>[e.createTextVNode("停车")])),_:1})])),_:1})):e.createCommentVNode("",!0)])),_:1})],64))}}),ie=e.createElementVNode("span",null,"弹幕发送时间间隔,默认为3秒,也是b站最快的发弹幕频率,当然这里可以设置小于该值",-1),ae=e.defineComponent({__name:"TextGroupView",setup(t){const i=k(),a=x(),r=o.useMessage(),l=o.useDialog(),u={timeinterval:{required:!0,message:"最小为1",trigger:["input","blur"],validator:()=>null!==i.moduleConfig.TextGroupSpam.timeinterval}},s=e=>{i.moduleConfig.TextGroupSpam.textGroupTabsValue=e},c=e.computed((()=>i.moduleConfig.TextGroupSpam.textGroupTabPanels.length>1)),d=()=>{if(i.moduleConfig.TextGroupSpam.enable)r.error("停车后才能添加");else{const e=Math.max(...i.moduleConfig.TextGroupSpam.textGroupTabPanels.map((e=>e.key)))+1,t=Math.max(...i.moduleConfig.TextGroupSpam.textGroupTabPanels.map((e=>e.name)))+1;i.moduleConfig.TextGroupSpam.textGroupTabPanels.push({key:e,name:t,tab:"",msg:""}),i.moduleConfig.TextGroupSpam.textGroupTabsValue=t}},m=e=>{i.moduleConfig.TextGroupSpam.enable?r.error("停车后才能删除"):l.warning({title:"删除",content:"确定要删除吗?",positiveText:"确定",negativeText:"再想想",onPositiveClick:()=>{n.remove(i.moduleConfig.TextGroupSpam.textGroupTabPanels,{name:e}),i.moduleConfig.TextGroupSpam.textGroupTabsValue=e-1}})},f=()=>{const e=n.filter(i.moduleConfig.TextGroupSpam.textGroupTabPanels,(e=>n.isEmpty(e.msg)));n.isEmpty(e)?null===i.moduleConfig.TextGroupSpam.timeinterval?r.error("没参数你车什么?"):(a.uiConfig.isShowPanel=!1,i.moduleConfig.TextGroupSpam.enable=!0,i.emitter.emit("TextGroupSpam",{module:"TextGroupSpam"})):n.forEach(e,(e=>{r.error(`${e.tab}还没填内容呢`)}))},p=()=>{i.moduleConfig.TextGroupSpam.enable=!1};return(t,n)=>(e.openBlock(),e.createBlock(e.unref(o.NForm),{rules:u,disabled:e.unref(i).moduleConfig.TextGroupSpam.enable},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NFormItem),{"show-label":!1},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NFlex),null,{default:e.withCtx((()=>[e.createVNode(e.unref(o.NFormItem),{label:"时间间隔",path:"timeinterval"},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NPopover),{trigger:"hover",style:{"max-width":"300px"},placement:"bottom"},{trigger:e.withCtx((()=>[e.createVNode(e.unref(o.NInputNumber),{clearable:"","show-button":!1,value:e.unref(i).moduleConfig.TextGroupSpam.timeinterval,"onUpdate:value":n[0]||(n[0]=t=>e.unref(i).moduleConfig.TextGroupSpam.timeinterval=t),placeholder:"默认3,单位为秒",min:"1",precision:0},{suffix:e.withCtx((()=>[e.createTextVNode(" 秒 ")])),_:1},8,["value"])])),default:e.withCtx((()=>[ie])),_:1})])),_:1})])),_:1})])),_:1}),e.createVNode(e.unref(o.NFormItem),{"show-feedback":!1,"show-label":!1},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NTabs),{type:"card",value:e.unref(i).moduleConfig.TextGroupSpam.textGroupTabsValue,"onUpdate:value":[n[1]||(n[1]=t=>e.unref(i).moduleConfig.TextGroupSpam.textGroupTabsValue=t),s],addable:"",closable:c.value,onAdd:d,onClose:m},{default:e.withCtx((()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i).moduleConfig.TextGroupSpam.textGroupTabPanels,(t=>(e.openBlock(),e.createBlock(e.unref(o.NTabPane),{key:t.key,name:t.name,tab:t.tab},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NFormItem),{label:"标题,用于区分不同的弹幕组","show-require-mark":"","validation-status":""===t.tab?"error":void 0},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NInput),{value:t.tab,"onUpdate:value":e=>t.tab=e,clearable:"",placeholder:"最好写一下标题吧"},null,8,["value","onUpdate:value"])])),_:2},1032,["validation-status"]),e.createVNode(e.unref(o.NFormItem),{label:"发送内容","show-require-mark":"","validation-status":""===t.msg?"error":void 0},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NInput),{value:t.msg,"onUpdate:value":e=>t.msg=e,round:"",clearable:"","show-count":"",type:"textarea",placeholder:"默认每次弹幕发送字数为20,超出20将自动分割到下一条弹幕"},null,8,["value","onUpdate:value"])])),_:2},1032,["validation-status"])])),_:2},1032,["name","tab"])))),128))])),_:1},8,["value","closable"])])),_:1}),e.unref(i).moduleConfig.TextGroupSpam.enable?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(o.NFlex),{key:0,justify:"end",style:{"margin-top":"10px"}},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NButton),{round:"",onClick:n[2]||(n[2]=t=>e.unref(a).uiConfig.isShowPanel=!1)},{default:e.withCtx((()=>[e.createTextVNode("取消")])),_:1}),e.createVNode(e.unref(o.NButton),{round:"",type:"primary",onClick:f},{default:e.withCtx((()=>[e.createTextVNode("开车")])),_:1})])),_:1})),e.unref(i).moduleConfig.TextGroupSpam.enable?(e.openBlock(),e.createBlock(e.unref(o.NFlex),{key:1,justify:"end",style:{"margin-top":"10px"}},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NButton),{round:"",onClick:n[3]||(n[3]=t=>e.unref(a).uiConfig.isShowPanel=!1)},{default:e.withCtx((()=>[e.createTextVNode("取消")])),_:1}),e.createVNode(e.unref(o.NButton),{round:"",type:"error",onClick:p},{default:e.withCtx((()=>[e.createTextVNode("停车")])),_:1})])),_:1})):e.createCommentVNode("",!0)])),_:1},8,["disabled"]))}}),re={SettingView:{saveSpamerStatus:{title:"保持独轮车开关状态",content:()=>e.h("p",[e.h("span","启用后,独轮车开关状态将会被保持,下次启动时会自动恢复。"),e.h("br"),e.h("span","该功能默认关闭。")])},danmakuModules:{title:"弹幕+1和弹幕复制",content:()=>e.h("p",[e.h("span","启用后,会在弹幕菜单中提供弹幕+1和弹幕复制功能。(点击弹幕列表即可触发弹幕菜单,该功能只支持文字弹幕)"),e.h("br"),e.h("span",{style:{color:"#FF0000",fontWeight:"bold"}},"温馨提示:B站的弹幕菜单有问题,如果在太低的地方触发,它有可能会无法完全显示所有选项。"),e.h("br"),e.h("span","该功能默认关闭。")])},autoCheckUpdate:{title:"自动检测更新",content:()=>e.h("p",[e.h("span","启用后,将会在脚本启动时自动检测更新,当然也可以手动检测更新。检测到新版本,会在左上角弹出通知。"),e.h("br"),e.h("span","该功能默认开启。")])}}},le=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 36 36"},[e.createElementVNode("path",{fill:"#3B88C3",d:"M0 4c0-2.209 1.791-4 4-4h28c2.209 0 4 1.791 4 4v28c0 2.209-1.791 4-4 4H4c-2.209 0-4-1.791-4-4V4z"}),e.createElementVNode("path",{fill:"#FFF",d:"M20.512 8.071c0 1.395-1.115 2.573-2.511 2.573-1.333 0-2.511-1.209-2.511-2.573 0-1.271 1.178-2.45 2.511-2.45 1.333.001 2.511 1.148 2.511 2.45zm-4.744 6.728c0-1.488.931-2.481 2.232-2.481 1.302 0 2.232.992 2.232 2.481v11.906c0 1.488-.93 2.48-2.232 2.48s-2.232-.992-2.232-2.48V14.799z"})],-1),ue=e.defineComponent({__name:"InfoDialog",props:{id:{}},setup(t){const i=o.useDialog(),a=t,r=()=>{const{title:e,content:t}=n.get(re,a.id);i.info({title:e,content:t,positiveText:"知道了"})};return(t,n)=>(e.openBlock(),e.createBlock(e.unref(o.NIcon),{onClick:r},{default:e.withCtx((()=>[le])),_:1}))}}),se=e.defineComponent({__name:"SettingView",setup(t){const n=k(),i=new y("ManualCheckUpdate");return(t,a)=>(e.openBlock(),e.createBlock(e.unref(o.NFlex),{vertical:""},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NFlex),{align:"center"},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NSwitch),{value:e.unref(n).moduleConfig.setting.saveSpamerStatus.enable,"onUpdate:value":a[0]||(a[0]=t=>e.unref(n).moduleConfig.setting.saveSpamerStatus.enable=t)},null,8,["value"]),e.createTextVNode("保持独轮车开关状态"),e.createVNode(ue,{id:"SettingView.saveSpamerStatus"})])),_:1}),e.createVNode(e.unref(o.NFlex),{align:"center"},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NSwitch),{value:e.unref(n).moduleConfig.setting.danmakuModules.enable,"onUpdate:value":a[1]||(a[1]=t=>e.unref(n).moduleConfig.setting.danmakuModules.enable=t)},null,8,["value"]),e.createTextVNode("弹幕+1和弹幕复制"),e.createVNode(ue,{id:"SettingView.danmakuModules"})])),_:1}),e.createVNode(e.unref(o.NFlex),{align:"center"},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NSwitch),{value:e.unref(n).moduleConfig.setting.autoCheckUpdate.enable,"onUpdate:value":a[2]||(a[2]=t=>e.unref(n).moduleConfig.setting.autoCheckUpdate.enable=t)},null,8,["value"]),e.createTextVNode("自动检测更新"),e.createVNode(ue,{id:"SettingView.autoCheckUpdate"}),e.createVNode(e.unref(o.NButton),{strong:"",secondary:"",round:"",type:"primary",onClick:a[3]||(a[3]=t=>e.unref(i).CheckUpdate())},{default:e.withCtx((()=>[e.createTextVNode("检测更新")])),_:1})])),_:1})])),_:1}))}});const ce=T(e.defineComponent({components:{TextView:X,TextGroupView:ae,EmotionView:ne,SettingView:se},setup:()=>({uiStore:x()})}),[["render",function(t,o,n,i,a,r){return e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.uiStore.uiConfig.activeMenuIndex))}]]),de=e.defineComponent({__name:"App",setup(t){const n=new b("App"),i=x(),a=k();i.uiConfig.isShowPanel=!1;const r=(t,n)=>{var r,l,s,c;(r=document,l=t,s=300,c=300,new Promise(((e,t)=>{{const t=r.querySelector(l);if(t)return void e(t)}const o=setInterval((()=>{const t=r.querySelector(l);t&&(clearTimeout(o),e(t))}),s),n=setTimeout((()=>{clearTimeout(o),clearTimeout(n),t()}),c)}))).then((t=>{const r=e.h(o.NButton,{class:"blspam_btn",text:!0,tag:"div",style:n,focusable:!1,bordered:!1,onClick:()=>{var e;(null==(e=v().userInfo)?void 0:e.isLogin)?(i.uiConfig.isShowPanel=!0,u()):i.uiConfig.isShowPanel=!1}},{default:()=>{var t;return e.h(o.NBadge,{dot:!0,processing:!0,type:a.moduleConfig.TextSpam.enable||a.moduleConfig.EmotionSpam.enable||a.moduleConfig.TextGroupSpam.enable?"success":(null==(t=v().userInfo)?void 0:t.isLogin)?"info":"error"},{default:()=>e.h(o.NIcon,{component:B,size:24},{default:()=>null})})}});e.render(r,t)}))},u=()=>{const e=p.bililiveThemeV2.getTheme();i.uiConfig.theme=e};new MutationObserver(((e,t)=>{l("#control-panel-ctnr-box")&&(setTimeout((()=>{const e=l(".icon-left-part"),t=l(".chat-input-ctnr-new.p-relative");(e||t)&&(e&&r(".icon-left-part",{marginLeft:"4px",display:"inline-block"}),t&&r(".chat-input-ctnr-new.p-relative",{marginRight:"4px",alignSelf:"center"}))}),500),t.disconnect(),n.log("初始化完成"))})).observe(document.body,{childList:!0,subtree:!0});const c=e=>{i.uiConfig.isCollapsed=e};return s("body { font-size: 12px }"),(t,n)=>(e.openBlock(),e.createBlock(e.unref(o.NConfigProvider),{locale:e.unref(o.zhCN),theme:"dark"===e.unref(i).uiConfig.theme?e.unref(o.darkTheme):e.unref(o.lightTheme)},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NMessageProvider),null,{default:e.withCtx((()=>[e.createVNode(e.unref(o.NDialogProvider),null,{default:e.withCtx((()=>[e.createVNode(e.unref(o.NModal),{show:e.unref(i).uiConfig.isShowPanel,"onUpdate:show":n[0]||(n[0]=t=>e.unref(i).uiConfig.isShowPanel=t),style:{"max-width":"1200px"}},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NLayout),{"has-sider":""},{default:e.withCtx((()=>[e.createVNode(e.unref(o.NLayoutSider),{bordered:"","show-trigger":"","collapse-mode":"width","collapsed-width":64,width:240,"native-scrollbar":!1,"content-style":"max-height: 320px; padding-top: 8px",collapsed:e.unref(i).uiConfig.isCollapsed,"on-update:collapsed":c},{default:e.withCtx((()=>[e.createVNode(W)])),_:1},8,["collapsed"]),e.createVNode(e.unref(o.NLayoutContent),{"content-style":"padding: 24px;"},{default:e.withCtx((()=>[e.createVNode(ce)])),_:1})])),_:1})])),_:1},8,["show"])])),_:1})])),_:1})])),_:1},8,["locale","theme"]))}}),me=t.createPinia();p.onload=()=>{const t=e.createApp(de);t.use(me),t.use(o);k(me).loadModules();const n=u("div");n.id="BLSPAM",document.body.append(n),t.mount(n)}}(Vue,Pinia,naive,_,axios);