diff --git a/dist/bilibili-live-tasks-helper.meta.js b/dist/bilibili-live-tasks-helper.meta.js index 5f6d235..f601808 100644 --- a/dist/bilibili-live-tasks-helper.meta.js +++ b/dist/bilibili-live-tasks-helper.meta.js @@ -3,7 +3,7 @@ // @name:en Bilibili Live Tasks Helper // @name:zh Bilibili Live Tasks Helper // @namespace https://github.com/andywang425 -// @version 7.1.7 +// @version 7.1.8 // @author andywang425 // @description Enhancing the experience of watching Bilibili live streaming. // @description:en Enhancing the experience of watching Bilibili live streaming. diff --git a/dist/bilibili-live-tasks-helper.min.user.js b/dist/bilibili-live-tasks-helper.min.user.js index 3c85598..e8ca922 100644 --- a/dist/bilibili-live-tasks-helper.min.user.js +++ b/dist/bilibili-live-tasks-helper.min.user.js @@ -3,7 +3,7 @@ // @name:en Bilibili Live Tasks Helper // @name:zh Bilibili Live Tasks Helper // @namespace https://github.com/andywang425 -// @version 7.1.7 +// @version 7.1.8 // @author andywang425 // @description Enhancing the experience of watching Bilibili live streaming. // @description:en Enhancing the experience of watching Bilibili live streaming. @@ -57,4 +57,4 @@ // @grant unsafeWindow // @run-at document-start // ==/UserScript== -(e=>{if("function"==typeof GM_addStyle)return void GM_addStyle(e);const t=document.createElement("style");t.textContent=e,document.head.append(t)})(" .title[data-v-f383a843]{padding-left:20px;align-items:baseline;display:flex}.header-big-text[data-v-f383a843]{font-size:var(--big-text-size);align-self:unset}.header-small-text[data-v-f383a843]{font-size:var(--small-text-size);align-self:unset;margin-left:10px;--small-text-size: 18px}.collapse-btn[data-v-f383a843]{display:flex;justify-content:center;align-items:center;height:100%;float:left;cursor:pointer}.avatar-wrap[data-v-3d7ec9d9]{width:80px;height:80px}.avatar[data-v-3d7ec9d9]{display:flex;justify-content:center;align-items:center;border-radius:50%}.radio-group[data-v-3d7ec9d9]{display:block;font-size:inherit}.base[data-v-3884f5fc]{z-index:1003;position:absolute;background-color:#fff;border-bottom:1px solid #e3e5e7;border-left:1px solid #e3e5e7;border-right:1px solid #e3e5e7}.header[data-v-3884f5fc]{position:relative;box-sizing:border-box;width:100%;font-size:var(--big-text-size);align-items:center;display:flex;border-bottom:1px solid #e3e5e7;height:60px;--big-text-size: 25px}.aside[data-v-3884f5fc]{width:auto}.aside #aside-el-menu[data-v-3884f5fc]:not(.el-menu--collapse){width:150px}.main[data-v-3884f5fc]{--main-top-botton-padding: calc(var(--el-main-padding) * .625);padding-top:var(--main-top-botton-padding);padding-bottom:var(--main-top-botton-padding)}.fade-enter-active[data-v-3884f5fc],.fade-leave-active[data-v-3884f5fc]{transition:opacity .1s ease}.fade-enter-from[data-v-3884f5fc],.fade-leave-to[data-v-3884f5fc]{opacity:0}.info-icon[data-v-38289ed3]{font-size:var(--el-font-size-base);cursor:pointer}.status-icon[data-v-b4254e0f]{font-size:var(--el-font-size-base)}.blth_btn{background-color:#23ade5;font-size:small;margin-inline-start:5px;color:#fff;border-radius:4px;border:none;padding:5px;cursor:pointer;box-shadow:0 0 2px #00000075;line-height:10px;margin-left:15px}.blth_btn:hover{background-color:#1097cc}.blth_btn:hover:active{background-color:#0e86b6;position:relative;top:1px}.el-message-box li{list-style:initial} "),async function(e,t,o,i,n,a,s,r){"use strict";function l(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const o in e)if("default"!==o){const i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,i.get?i:{enumerable:!0,get:()=>e[o]})}return t.default=e,Object.freeze(t)}const c=l(i);var d,u=Object.defineProperty,m=(e,t,o)=>((e,t,o)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o)(e,"symbol"!=typeof t?t+"":t,o),h=(()=>"undefined"!=typeof GM_addStyle?GM_addStyle:void 0)(),g=(()=>"undefined"!=typeof GM_getValue?GM_getValue:void 0)(),p=(()=>"undefined"!=typeof GM_setValue?GM_setValue:void 0)(),f=(()=>"undefined"!=typeof GM_xmlhttpRequest?GM_xmlhttpRequest:void 0)(),v=(()=>"undefined"!=typeof unsafeWindow?unsafeWindow:void 0)();const w={ui:{isCollapse:!1,isShowPanel:!0,activeMenuIndex:"MainSiteTasks"},modules:{DailyTasks:{MainSiteTasks:{login:{enabled:!1,_lastCompleteTime:0},watch:{enabled:!1,_lastCompleteTime:0},coin:{enabled:!1,num:1,_lastCompleteTime:0},share:{enabled:!1,_lastCompleteTime:0}},LiveTasks:{sign:{enabled:!1,_lastCompleteTime:0},medalTasks:{light:{enabled:!1,mode:"danmu",danmuList:["(⌒▽⌒)","( ̄▽ ̄)","(=・ω・=)","(`・ω・´)","(〜 ̄△ ̄)〜","(・∀・)","(°∀°)ノ","╮( ̄▽ ̄)╭","_(:3」∠)_","(^・ω・^ )","(● ̄(エ) ̄●)","ε=ε=(ノ≧∇≦)ノ","⁄(⁄ ⁄•⁄ω⁄•⁄ ⁄)⁄","←◡←","(●'◡'●)ノ♥"],_lastCompleteTime:0},watch:{enabled:!1,time:25,_watchingProgress:{},_lastWatchTime:0,_lastCompleteTime:0},isWhiteList:!1,roomidList:[]}},OtherTasks:{groupSign:{enabled:!1,_lastCompleteTime:0},silverToCoin:{enabled:!1,_lastCompleteTime:0},coinToSilver:{enabled:!1,num:1,_lastCompleteTime:0},getYearVipPrivilege:{enabled:!1,_nextReceiveTime:0}}},EnhanceExperience:{switchLiveStreamQuality:{enabled:!1,qualityDesc:"原画"},banp2p:{enabled:!1},noReport:{enabled:!1},noSleep:{enabled:!1},invisibility:{enabled:!1},showContributionUserNum:{enabled:!1}},RemoveElement:{removePKBox:{enabled:!1},removeLiveWaterMark:{enabled:!1},removeShopPopover:{enabled:!1},removeGameParty:{enabled:!1},removeGiftPopover:{enabled:!1},removeMicPopover:{enabled:!1},removeComboCard:{enabled:!1},removeRank:{enabled:!1},removeGiftPlanet:{enabled:!1},removeActivityBanner:{enabled:!1},removePKBanner:{enabled:!1},removeFlipView:{enabled:!1},removeRecommendRoom:{enabled:!1},removeLiveMosaic:{enabled:!1}}},cache:{lastAliveHeartBeatTime:0}};class y{static mergeConfigs(e,t){const i=o.pick(e,o.keys(t));return o.defaults(i,t),o.forOwn(i,((e,i,n)=>{o.isPlainObject(e)&&o.isPlainObject(t[i])&&!o.isEmpty(t[i])&&(n[i]=this.mergeConfigs(e,t[i]))})),i}static setUiConfig(e){p("ui",e)}static getUiConfig(){return this.mergeConfigs(g("ui",{}),w.ui)}static setModuleConfig(e){p("modules",e)}static getModuleConfig(){return this.mergeConfigs(g("modules",{}),w.modules)}static setCache(e){p("cache",e)}static getCache(){return this.mergeConfigs(g("cache",{}),w.cache)}}const x={MainSiteTasks:"主站任务",LiveTasks:"直播任务",OtherTasks:"其它任务",EnhanceExperience:"体验优化",RemoveElement:"移除元素"},_=t.defineStore("ui",(()=>{const t=e.reactive(y.getUiConfig()),i=e.computed((()=>x[t.activeMenuIndex])),n=e.reactive({top:0,left:0,height:0,width:0}),a=e.computed((()=>({top:n.top.toString()+"px",left:n.left.toString()+"px",height:n.height.toString()+"px",width:n.width.toString()+"px"}))),s=e.computed((()=>t.isShowPanel?"隐藏控制面板":"显示控制面板")),r=e.computed((()=>(n.height-60).toString()+"px"));return e.watch(t,o.debounce((e=>y.setUiConfig(e)),350)),{isShowPanelButtonText:s,activeMenuName:i,baseStyleValue:n,baseStyle:a,scrollBarHeight:r,uiConfig:t,changeCollapse:function(){t.isCollapse=!t.isCollapse},changeShowPanel:function(){t.isShowPanel=!t.isShowPanel},setActiveMenuIndex:function(e){t.activeMenuIndex=e}}})),b={class:"title"},k=(e,t)=>{const o=e.__vccOpts||e;for(const[e,i]of t)o[e]=i;return o},C=k(e.defineComponent({__name:"PanelHeader",setup(t){const o=_();return(t,n)=>{const a=e.resolveComponent("el-icon"),s=e.resolveComponent("el-text");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"collapse-btn",onClick:n[0]||(n[0]=(...t)=>e.unref(o).changeCollapse&&e.unref(o).changeCollapse(...t))},[e.unref(o).uiConfig.isCollapse?(e.openBlock(),e.createBlock(a,{key:0},{default:e.withCtx((()=>[e.createVNode(e.unref(i.Expand))])),_:1})):(e.openBlock(),e.createBlock(a,{key:1},{default:e.withCtx((()=>[e.createVNode(e.unref(i.Fold))])),_:1}))]),e.createElementVNode("div",b,[e.createVNode(s,{tag:"b",class:"header-big-text"},{default:e.withCtx((()=>[e.createTextVNode("控制面板")])),_:1}),e.createVNode(s,{class:"header-small-text"},{default:e.withCtx((()=>[e.createTextVNode(e.toDisplayString(e.unref(o).activeMenuName),1)])),_:1})])],64)}}}),[["__scopeId","data-v-f383a843"]]),V=e.defineComponent({__name:"PanelAside",setup(t){const o=_(),i=[{icon:"Tasks",title:"每日任务",index:"DailyTasks",subs:[{title:"主站任务",index:"MainSiteTasks"},{title:"直播任务",index:"LiveTasks"},{title:"其它任务",index:"OtherTasks"}]},{icon:"Monitor",title:"体验优化",index:"EnhanceExperience"},{icon:"Scissor",title:"移除元素",index:"RemoveElement"}];return(t,n)=>{const a=e.resolveComponent("el-icon"),s=e.resolveComponent("el-menu-item"),r=e.resolveComponent("el-sub-menu"),l=e.resolveComponent("el-menu");return e.openBlock(),e.createBlock(l,{"default-active":e.unref(o).uiConfig.activeMenuIndex,style:e.normalizeStyle({"min-height":e.unref(o).scrollBarHeight}),collapse:e.unref(o).uiConfig.isCollapse,"unique-opened":"",onSelect:e.unref(o).setActiveMenuIndex,id:"aside-el-menu"},{default:e.withCtx((()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(i,(t=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.subs?(e.openBlock(),e.createBlock(r,{index:t.index,key:t.index},{title:e.withCtx((()=>[e.createVNode(a,null,{default:e.withCtx((()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon)))])),_:2},1024),e.createElementVNode("span",null,e.toDisplayString(t.title),1)])),default:e.withCtx((()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.subs,(t=>(e.openBlock(),e.createBlock(s,{index:t.index,key:t.index},{default:e.withCtx((()=>[e.createTextVNode(e.toDisplayString(t.title),1)])),_:2},1032,["index"])))),128))])),_:2},1032,["index"])):(e.openBlock(),e.createBlock(s,{index:t.index,key:t.index},{title:e.withCtx((()=>[e.createTextVNode(e.toDisplayString(t.title),1)])),default:e.withCtx((()=>[e.createVNode(a,null,{default:e.withCtx((()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon)))])),_:2},1024)])),_:2},1032,["index"]))],64)))),64))])),_:1},8,["default-active","style","collapse","onSelect"])}}}),T=t.defineStore("bili",(()=>{const t=e.ref(null),o=e.ref(null),i=e.ref(null),n=e.ref(null),a=e.ref(null),s=e.ref(null),r=e.ref(null),l=e.computed((()=>{var e;return(null==(e=r.value)?void 0:e.filter((e=>0!==e.room_info.room_id)))??null}));return{BilibiliLive:t,userInfo:i,giftConfig:n,cookies:o,dailyRewardInfo:a,dynamicVideos:s,fansMedals:r,filteredFansMedals:l}}));let N=class{constructor(e,t){m(this,"url_prefix"),m(this,"origin"),this.url_prefix=e??"",this.origin=t??"https://bilibili.com"}get(e,t,i){return new Promise(((n,a)=>{const s={method:"GET",url:this.url_prefix+e+(t?"?"+new URLSearchParams(t).toString():""),responseType:"json",headers:{Accept:"application/json, text/plain, */*",Referer:this.origin,Origin:this.origin,"Sec-Fetch-Site":"same-site"},onload:function(e){n(e.response)},onerror:function(e){a(e)}},r=o.defaultsDeep(i,s);f(r)}))}post(e,t,i){return new Promise(((n,a)=>{const s={method:"POST",url:this.url_prefix.concat(e),data:new URLSearchParams(t).toString(),responseType:"json",headers:{Accept:"application/json, text/plain, */*",Referer:this.origin,Origin:this.origin,"Sec-Fetch-Site":"same-site","Content-Type":"application/x-www-form-urlencoded"},onload:function(e){n(e.response)},onerror:function(e){a(e)}},r=o.defaultsDeep(i,s);"multipart/form-data"===r.headers["Content-Type"]&&delete r.headers["Content-Type"],f(r)}))}};function S(e){return new Promise((t=>setTimeout(t,e)))}function P(e){const t=new FormData;return o.forEach(e,((e,o)=>t.append(o,e.toString()))),t}function E(e,t,i){o.forOwn(e,(function(e,n){const a=i?i+"."+n:n;o.isPlainObject(e)&&!o.isEmpty(e)?E(e,t,a):t(e,a)}))}function R(e){switch(e){case"document-start":return Promise.resolve();case"document-head":return new Promise((e=>{if(document.head)e();else{const t=new MutationObserver((()=>{document.head&&(t.disconnect(),e())}));t.observe(document.documentElement,{childList:!0})}}));case"document-body":return new Promise((e=>{if(document.body)e();else{const t=new MutationObserver((()=>{document.body&&(t.disconnect(),e())}));t.observe(document.documentElement,{childList:!0})}}));case"document-end":return new Promise((e=>{"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",(()=>e()))}));case"window-load":return new Promise((e=>{"complete"===document.readyState?e():window.addEventListener("load",(()=>e()))}));default:return Promise.reject("Illegal moment")}}function M(e,t=0,o=5){const i=n.DateTime.fromMillis(e),a=n.DateTime.now().set({hour:t,minute:o,second:0,millisecond:0}),s=a.plus({days:1}),r=a.minus({days:1});return n.DateTime.now()>=a?i>=a&&i=r&&ii&&(i=i.plus({days:1}));const a=i.diff(o);return{ms:a.toMillis(),str:a.toFormat("h小时m分钟s秒").replace(/^0小时/,"").replace(/^0分钟/,"")}}function D(e,t,o,i){const a=n.DateTime.now(),s=n.DateTime.local(a.year,a.month,a.day,e,t),r=n.DateTime.local(a.year,a.month,a.day,o,i);return a>=s&&aO.live.get("/xlive/web-room/v1/giftPanel/roomGiftConfig",{platform:i,room_id:e,area_parent_id:t,area_id:o}),doSign:()=>O.live.get("/xlive/web-ucenter/v1/sign/DoSign"),getSignInfo:()=>O.live.get("/xlive/web-ucenter/v1/sign/WebGetSignInfo"),fansMedalPanel:(e,t=10)=>O.live.get("/xlive/app-ucenter/v1/fansMedal/panel",{page:e,page_size:t}),sendMsg:(e,t,o=0,i=1,n=0,a=25,s=16777215,r=0,l=0,c=0,d="",u={appId:100,platform:5})=>{const m=T().cookies.bili_jct;return O.live.post("/msg/send",void 0,{data:P({bubble:r,msg:e,color:s,mode:i,room_type:o,jumpfrom:n,reply_mid:l,reply_attr:c,replay_dmid:d,statistics:JSON.stringify(u),fontsize:a,rnd:I(),roomid:t,csrf:m,csrf_token:m}),headers:{"Content-Type":"multipart/form-data"}})},likeReport:(e,t,o=1,i="")=>{var n;const a=T(),s=a.cookies.bili_jct,r=null==(n=a.BilibiliLive)?void 0:n.UID;return O.live.post("/xlive/app-ucenter/v1/like_info_v3/like/likeReportV3",{click_time:o,room_id:e,anchor_id:t,uid:r,ts:I(),csrf:s,csrf_token:s,visit_id:i})},getInfoByRoom:e=>O.live.get("/xlive/web-room/v1/index/getInfoByRoom",{room_id:e}),getUserTaskProgress:(e=11153765)=>{const t=T().cookies.bili_jct;return O.live.get("/xlive/app-ucenter/v1/userTask/GetUserTaskProgress",{target_id:e,csrf:t,ts:I()})},userTaskReceiveRewards:(e=11153765)=>{const t=T().cookies.bili_jct;return O.live.post("/xlive/app-ucenter/v1/userTask/UserTaskReceiveRewards",{actionKey:"csrf",target_id:e,csrf:t,ts:I()})},silver2coin:(e="")=>{const t=T().cookies.bili_jct;return O.live.post("/xlive/revenue/v1/wallet/silver2coin",{csrf:t,csrf_token:t,visit_id:e})},coin2silver:(e,t="pc",o="")=>{const i=T().cookies.bili_jct;return O.live.post("/xlive/revenue/v1/wallet/coin2silver",{num:e,csrf:i,csrf_token:i,platform:t,visit_id:o})},queryContributionRank:(e,t,o,i,n="online_rank",a="contribution_rank")=>O.live.get("/xlive/general-interface/v1/rank/queryContributionRank",{ruid:e,room_id:t,page:o,page_size:i,type:n,switch:a}),wearMedal:(e,t="")=>{const o=T().cookies.bili_jct;return O.live.post("/xlive/web-room/v1/fansMedal/wear",{medal_id:e,csrf_token:o,csrf:o,visit_id:t})}},A={E:(e,t,o,i=0,n=[],a="")=>{const s=T().cookies.bili_jct;return O.liveTrace.post("/xlive/data-interface/v1/x25Kn/E",{id:JSON.stringify(e),device:JSON.stringify(t),ruid:o,ts:L(),is_patch:i,heart_beat:JSON.stringify(n),ua:navigator.userAgent,csrf_token:s,csrf:s,visit_id:a})},X:(e,t,o,i,n,a,s,r,l="")=>{const c=T().cookies.bili_jct;return O.liveTrace.post("/xlive/data-interface/v1/x25Kn/X",{s:e,id:JSON.stringify(t),device:JSON.stringify(o),ruid:i,ets:n,benchmark:a,time:s,ts:r,ua:navigator.userAgent,csrf_token:c,csrf:c,visit_id:l})}},U={nav:()=>O.main.get("/x/web-interface/nav"),reward:()=>O.main.get("/x/member/web/exp/reward"),dynamicAll:(e,t=1,o=-480,i="itemOpusStyle")=>O.main.get("/x/polymer/web-dynamic/v1/feed/all",{timezone_offset:o,type:e,page:t,features:i}),videoHeartbeat:(e,t="",o=0,i=0,n=0,a="https://t.bilibili.com/?spm_id_from=444.3.0.0",s=116,r=100,l=3,c=0,d=0,u=2,m=0,h=0,g="333.488.0.0",p="333.31.list.card_archive.click",f='{"player_version":"4.1.21-rc.1727.0"}')=>{var v;const w=T();return O.main.post("/x/click-interface/web/heartbeat",{start_ts:I(),mid:null==(v=T().userInfo)?void 0:v.mid,aid:e,cid:t,type:l,sub_type:c,dt:u,play_type:d,realtime:o,played_time:i,real_played_time:n,refer_url:a,quality:s,video_duration:r,last_play_progress_time:m,max_play_progress_time:h,spmid:g,from_spmid:p,extra:f,csrf:w.cookies.bili_jct})},share:(e,t="pc_client_normal",o=2,i=0,n=1)=>{const a=T().cookies.bili_jct;return O.main.post("/x/web-interface/share/add",{aid:e,eab_x:o,ramval:i,source:t,ga:n,csrf:a})},coinAdd:(e,t,o=0,i=!0,n=2,a=6,s="web_normal",r=1)=>{const l=T().cookies.bili_jct;return O.main.post("/x/web-interface/coin/add ",{aid:e,multiply:t,select_like:o,cross_domain:i,eab_x:n,ramval:a,source:s,ga:r,csrf:l})},videoRelation:(e,t="")=>O.main.get("/x/web-interface/archive/relation",{aid:e,bvid:t}),vip:{myPrivilege:()=>{const e=T().cookies.bili_jct;return O.main.get("/x/vip/privilege/my",{csrf:e},{headers:{Referer:"https://account.bilibili.com/account/big/myPackage",Origin:"https://account.bilibili.com/account/big/myPackage"}})},receivePrivilege:(e,t="web")=>{const o=T().cookies.bili_jct;return O.main.post("/x/vip/privilege/receive",{type:e,platform:t,csrf:o},{headers:{Referer:"https://account.bilibili.com/account/big/myPackage",Origin:"https://account.bilibili.com"}})},addExperience:()=>{var e,t,o;const i=T(),n=null==(e=i.BilibiliLive)?void 0:e.UID,a=null==(t=i.cookies)?void 0:t.buvid3,s=null==(o=i.cookies)?void 0:o.bili_jct;return O.main.post("/x/vip/experience/add",{mid:n,buvid:a,csrf:s},{headers:{Referer:"https://account.bilibili.com/big",Origin:"https://account.bilibili.com"}})}}},j={myGroups:(e=0,t="web")=>O.vc.get("/link_group/v1/member/my_groups",{build:e,mobi_app:t}),signIn:(e,t)=>O.vc.get("/link_setting/v1/link_setting/sign_in",{group_id:e,owner_id:t})};class H{constructor(e){m(this,"NAME","BLTH"),m(this,"prefix_title_str"),m(this,"title"),this.title=e,this.prefix_title_str=e.split("_").join("][")}get prefix(){return[`%c${this.NAME}%c[${(new Date).toLocaleString()}]%c[${this.prefix_title_str}]%c:`,"font-weight: bold; color: white; background-color: #23ade5; padding: 1px 4px; border-radius: 4px;","font-weight: bold; color: #0920e6;","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 G{constructor(e){m(this,"moduleName"),m(this,"logger"),m(this,"moduleStore",Je()),m(this,"config"),this.moduleName=e,this.logger=new H(this.moduleName)}set status(e){throw new Error("Method not implemented.")}run(){throw new Error("Method not implemented.")}}m(G,"runOnMultiplePages",!1),m(G,"runAt","document-body"),m(G,"onFrame","target"),m(G,"runAfterDefault",!0);function F(e,t=200,o=1e4){return new Promise(((i,n)=>{const a=Date.now(),s=new Set(e),r={},l=setInterval((()=>{Object.assign(r,function(e){const t={},o=new Set(e);for(const e of o)t[e]=null;for(const e of document.cookie.split("; ")){const[i,...n]=e.split("="),a=n.join("=");if(o.has(i)&&(t[i]=decodeURIComponent(a),o.delete(i),0===o.size))break}return t}(s));for(const e in r)null!==r[e]&&s.delete(e);0===s.size?(clearInterval(l),i(r)):-1!==o&&Date.now()-a>o&&(clearInterval(l),n("获取以下Cookies超时: "+[...s]))}),t)}))}class z extends G{getBilibiliLive(){return this.logger.log("unsafeWindow.BilibiliLive",v.BilibiliLive),new Promise((e=>{0===v.BilibiliLive.UID?v.BilibiliLive=new Proxy(v.BilibiliLive,{set:(t,o,i)=>(t[o]=i,"UID"===o&&(v.BilibiliLive=t,e(v.BilibiliLive)),!0)}):e(v.BilibiliLive)}))}async run(){T().BilibiliLive=await this.getBilibiliLive()}}m(z,"runOnMultiplePages",!0);const q=Object.freeze(Object.defineProperty({__proto__:null,Default_BilibiliLive:z,Default_Cookies:class extends G{getCookies(){return F(["bili_jct","LIVE_BUVID","buvid3"])}async run(){T().cookies=await this.getCookies()}},Default_DailyRewardInfo:class extends G{async getDailyRewardInfo(){const e=this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks;if(!Object.values(e).some((e=>e.enabled&&!M(e._lastCompleteTime))))return Promise.resolve(null);try{const e=await U.reward();return this.logger.log("BAPI.main.reward response",e),0===e.code?Promise.resolve(e.data):(this.logger.error("获取主站每日任务完成情况失败",e.message),Promise.reject(e.message))}catch(e){return this.logger.error("获取主站每日任务完成情况出错",e),Promise.reject(e)}}async run(){const e=T();e.dailyRewardInfo=await this.getDailyRewardInfo(),setTimeout((async()=>{e.dailyRewardInfo=await this.getDailyRewardInfo()}),B(0,4).ms)}},Default_DynamicVideos:class extends G{async getDynamicVideos(){const e=this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks;if(!Object.entries(e).filter((([e])=>["watch","share","coin"].includes(e))).some((e=>e[1].enabled&&!M(e[1]._lastCompleteTime))))return Promise.resolve(null);try{const e=await U.dynamicAll("video");return this.logger.log("BAPI.main.dynamicAll response",e),0===e.code?Promise.resolve(e.data.items):(this.logger.error("获取主站每日任务完成情况失败",e.message),Promise.reject(e.message))}catch(e){return this.logger.error("获取主站每日任务完成情况出错",e),Promise.reject(e)}}async run(){const e=T();e.dynamicVideos=await this.getDynamicVideos(),setTimeout((async()=>{e.dynamicVideos=await this.getDynamicVideos()}),B(0,4).ms)}},Default_FansMetals:class extends G{async getFansMetals(e=1/0,t=!1){const o=this.moduleStore.moduleConfig.DailyTasks.LiveTasks.medalTasks;if(!t&&!Object.entries(o).filter((([e])=>["light","watch"].includes(e))).some((e=>e[1].enabled&&!M(e[1]._lastCompleteTime))))return Promise.resolve(null);{const t=[];let o=1;try{const i=await $.fansMedalPanel(1);if(this.logger.log("BAPI.live.fansMedalPanel(1) response",i),0!==i.code)return this.logger.error("获取粉丝勋章列表第1页失败",i.message),Promise.reject(i.message);o=i.data.page_info.total_page,t.push(...i.data.special_list,...i.data.list);for(let n=2;n<=Math.min(o,e);n++){const e=await $.fansMedalPanel(n);if(this.logger.log(`BAPI.live.fansMedalPanel(${n}) response`,e),0!==i.code)return this.logger.error(`获取粉丝勋章列表第${n}页失败`,i.message),t;t.push(...e.data.list),await S(250)}return Promise.resolve(t)}catch(e){return this.logger.error("获取粉丝勋章列表出错",e),Promise.reject(e)}}}async run(){const e=T();e.fansMedals=await this.getFansMetals(),setTimeout((async()=>{const t=await this.getFansMetals(1,!0);null==t||t.forEach((t=>{var o;(null==(o=e.fansMedals)?void 0:o.every((e=>e.medal.target_id!==t.medal.target_id)))&&e.fansMedals.push(t)}))}),B(0,4).ms),Je().emitter.on("Default_FansMedals",(async()=>{e.fansMedals=await this.getFansMetals(1/0,!0)}))}},Default_UserInfo:class extends G{async getUserInfo(){try{const e=await U.nav();return this.logger.log("BAPI.main.nav response",e),0===e.code?Promise.resolve(e.data):(this.logger.error("获取用户信息失败",e.message),Promise.reject(e.message))}catch(e){return this.logger.error("获取用户信息出错",e),Promise.reject(e)}}async run(){const e=T();e.userInfo=await this.getUserInfo(),setTimeout((async()=>{e.userInfo=await this.getUserInfo()}),B(0,4).ms)}}},Symbol.toStringTag,{value:"Module"}));class K{constructor(e,t,o,i,n){m(this,"logger",new H("RoomHeart")),m(this,"config"),m(this,"watchedSeconds"),m(this,"timer"),m(this,"stop",!1),m(this,"areaID"),m(this,"parentID"),m(this,"roomID"),m(this,"ruid"),m(this,"seq",0),m(this,"buvid",(null==(d=T().cookies)?void 0:d.LIVE_BUVID)??function(e){const t=`; ${document.cookie}`.split(`; ${e}=`);return 2===t.length?t.pop().split(";").shift():null}("LIVE_BUVID")),m(this,"uuid","xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))),m(this,"device",[this.buvid,this.uuid]),m(this,"ua",navigator.userAgent),m(this,"heartBeatInterval"),m(this,"secretKey"),m(this,"secretRule"),m(this,"timestamp"),this.roomID=e,this.areaID=t,this.parentID=o,this.ruid=i,this.watchedSeconds=n,this.config=Je().moduleConfig.DailyTasks.LiveTasks.medalTasks.watch}set status(e){Je().moduleStatus.DailyTasks.LiveTasks.medalTasks.watch=e}get id(){return[this.parentID,this.areaID,this.seq,this.roomID]}updateProgress(){this.watchedSeconds+=this.heartBeatInterval,Je().moduleConfig.DailyTasks.LiveTasks.medalTasks.watch._watchingProgress[this.roomID]=this.watchedSeconds}start(){return this.buvid?(this.timer=setTimeout((()=>this.stop=!0),B(0,0).ms),this.E()):(this.logger.error(`缺少buvid,无法为直播间 ${this.roomID} 执行观看直播任务,请尝试刷新页面`),Promise.resolve())}async E(){if(this.stop)this.status="";else try{const e=await A.E(this.id,this.device,this.ruid);if(this.logger.log(`BAPI.liveTrace.E(${this.id}, ${this.device}, ${this.ruid}) response`,e),0===e.code)return this.seq+=1,({heartbeat_interval:this.heartBeatInterval,secret_key:this.secretKey,secret_rule:this.secretRule,timestamp:this.timestamp}=e.data),await S(1e3*this.heartBeatInterval),this.X();this.logger.error(`BAPI.liveTrace.E(${this.id}, ${this.device}, ${this.ruid}) 失败`,e.message)}catch(e){this.logger.error(`BAPI.liveTrace.E(${this.id}, ${this.device}, ${this.ruid}) 出错`,e)}}async X(){if(this.stop)this.status="";else try{const e={id:JSON.stringify(this.id),device:JSON.stringify(this.device),ets:this.timestamp,benchmark:this.secretKey,time:this.heartBeatInterval,ts:L(),ua:this.ua},t=this.spyder(JSON.stringify(e),this.secretRule),o=await A.X(t,this.id,this.device,this.ruid,this.timestamp,this.secretKey,this.heartBeatInterval,e.ts);if(this.logger.log(`BAPI.liveTrace.X(${t}, ${this.id}, ${this.device}, ${this.ruid}, ${this.timestamp}, ${this.secretKey}, ${this.heartBeatInterval}, ${e.ts}) response`,o),0===o.code)return this.seq+=1,this.updateProgress(),this.watchedSeconds>=60*this.config.time?void clearTimeout(this.timer):(({heartbeat_interval:this.heartBeatInterval,secret_key:this.secretKey,secret_rule:this.secretRule,timestamp:this.timestamp}=o.data),await S(1e3*this.heartBeatInterval),this.X());this.logger.error(`BAPI.liveTrace.X(${t}, ${this.id}, ${this.device}, ${this.ruid}, ${this.timestamp}, ${this.secretKey}, ${this.heartBeatInterval}) 失败`,o.message)}catch(e){this.logger.error(`BAPI.liveTrace.X(s, ${this.id}, ${this.device}, ${this.ruid}, ${this.timestamp}, ${this.secretKey}, ${this.heartBeatInterval}) 出错`,e)}}spyder(e,t){const o=JSON.parse(e),[i,n,s,r]=JSON.parse(o.id),[l,c]=JSON.parse(o.device),d=o.benchmark,u={platform:"web",parent_id:i,area_id:n,seq_id:s,room_id:r,buvid:l,uuid:c,ets:o.ets,time:o.time,ts:o.ts};let m=JSON.stringify(u);for(const e of t)switch(e){case 0:default:m=a.HmacMD5(m,d).toString(a.enc.Hex);break;case 1:m=a.HmacSHA1(m,d).toString(a.enc.Hex);break;case 2:m=a.HmacSHA256(m,d).toString(a.enc.Hex);break;case 3:m=a.HmacSHA224(m,d).toString(a.enc.Hex);break;case 4:m=a.HmacSHA512(m,d).toString(a.enc.Hex);break;case 5:m=a.HmacSHA384(m,d).toString(a.enc.Hex)}return m}}class W extends G{constructor(){super(...arguments),m(this,"medalTasksConfig",this.moduleStore.moduleConfig.DailyTasks.LiveTasks.medalTasks),m(this,"config",this.medalTasksConfig.watch)}set status(e){this.moduleStore.moduleStatus.DailyTasks.LiveTasks.medalTasks.watch=e}getRoomidUidList(){const e=T();return e.filteredFansMedals?e.filteredFansMedals.filter((e=>e.medal.level<20&&(this.medalTasksConfig.isWhiteList?this.medalTasksConfig.roomidList.includes(e.room_info.room_id):!this.medalTasksConfig.roomidList.includes(e.room_info.room_id)))).map((e=>[e.room_info.room_id,e.medal.target_id])).slice(0,199):null}async getAreaInfo(e){try{const t=await $.getInfoByRoom(e);if(this.logger.log(`BAPI.live.getInfoByRoom(${e}) response`,t),0===t.code){const e=t.data.room_info;return[e.area_id,e.parent_area_id]}return[-1,-1]}catch(t){return this.logger.error(`获取指定直播间的 area_id 和 parent_area_id(roomid = ${e}) 出错`,t),[-1,-1]}}async run(){if(this.logger.log("观看直播模块开始运行"),this.config.enabled)if(M(this.config._lastCompleteTime))D(0,0,0,5)?this.logger.log("昨天的观看直播任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过观看直播任务了"),this.status="done");else{this.status="running",M(this.config._lastWatchTime,0,0)?o.forOwn(this.config._watchingProgress,((e,t,o)=>{o[t]-=e%300})):this.config._watchingProgress={},this.config._lastWatchTime=L();const e=this.getRoomidUidList();if(e)if(0===e.length)this.status="done",this.config._lastCompleteTime=L();else{for(let t=0;t0&&a>0&&(!this.config._watchingProgress[o]||this.config._watchingProgress[o]<60*this.config.time)&&(this.logger.log(`开始直播间${o}的观看直播任务`),await new K(o,n,a,i,this.config._watchingProgress[o]??0).start(),await S(1e4))}this.config._lastCompleteTime=L(),this.logger.log("观看直播任务已完成"),this.status="done"}else this.status="error"}const e=B();setTimeout((()=>this.run()),e.ms),this.logger.log("距离观看直播模块下次运行时间:",e.str)}}m(W,"runAt","window-load");const X=document.querySelector.bind(document);document.querySelectorAll.bind(document);const J=document.createElement.bind(document);function Q(e,t,o=5e3){return new Promise(((i,n)=>{const a=e.querySelector(t);if(a)return void i(a);const s=new MutationObserver((()=>{const o=e.querySelector(t);o&&(clearTimeout(r),s.disconnect(),i(o))}));s.observe(e,{childList:!0,subtree:!0});const r=setTimeout((()=>{s.disconnect(),n(new Error(`无法在${o}毫秒内找到${e.localName}的子节点${t}`))}),o)}))}const Y=()=>v.self===v.top;class Z extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.EnhanceExperience.switchLiveStreamQuality)}async waitForPlayer(){return new Promise(((e,t)=>{const o=v.top?v.top:v,i=setInterval((()=>{o.livePlayer&&Object.prototype.hasOwnProperty.call(o.livePlayer,"switchQuality")&&Object.prototype.hasOwnProperty.call(o.livePlayer,"getPlayerInfo")&&(clearInterval(i),clearTimeout(n),e(o.livePlayer))}),200),n=setTimeout((()=>{clearInterval(i),clearTimeout(n),t("等待播放器超时")}),1e4)}))}async switchQuality(e){const t=e.getPlayerInfo();0===t.liveStatus?this.logger.log("当前直播间未开播,无需切换画质"):setTimeout((()=>{const o=t.qualityCandidates.find((({desc:e})=>e===this.config.qualityDesc));o?t.quality!==o.qn?(e.switchQuality(o.qn),this.logger.log(`已将画质切换为${this.config.qualityDesc}`,o)):this.logger.log("当前画质已经是目标画质了,无需切换画质"):this.logger.log("当前直播不支持目标画质,保持默认画质")}),Y()?2500:5e3)}async run(){if(this.logger.log("自动切换画质模块开始运行"),this.config.enabled)try{const e=await this.waitForPlayer();this.switchQuality(e)}catch(e){this.logger.error("自动切换画质模块出错",e)}}}m(Z,"runOnMultiplePages",!0),m(Z,"runAt","window-load"),m(Z,"runAfterDefault",!1);class ee extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.EnhanceExperience.banp2p)}banP2P(){const e=["RTCPeerConnection","mozRTCPeerConnection","webkitRTCPeerConnection"];for(const t of e)Object.prototype.hasOwnProperty.call(v,t)&&Object.defineProperty(v,t,{value:class{constructor(){}addEventListener(){}removeEventListener(){}createDataChannel(){return{close:function(){}}}createOffer(){return Promise.resolve()}setLocalDescription(){return Promise.resolve()}close(){}setRemoteDescription(){return Promise.resolve()}createAnswer(){}},enumerable:!1,writable:!1,configurable:!1})}run(){if(this.logger.log("禁用P2P模块开始运行"),this.config.enabled)try{this.banP2P()}catch(e){this.logger.error("禁用P2P失败",e)}}}m(ee,"runOnMultiplePages",!0),m(ee,"runAt","document-start"),m(ee,"onFrame","all"),m(ee,"runAfterDefault",!1);var te=["load","loadend","timeout","error","readystatechange","abort"],oe="__origin_xhr";function ie(e,t){var o={};for(var i in e)o[i]=e[i];return o.target=o.currentTarget=t,o}var ne=te[0],ae=te[1],se=te[2],re=te[3],le=te[4],ce=te[5],de="prototype";function ue(e,t){return function(e,t){var o=e.onRequest,i=e.onResponse,n=e.onError;function a(e){var t=e.responseType;if(!t||"text"===t)return e.responseText;var o=e.response;if("json"===t&&!o)try{return JSON.parse(e.responseText)}catch(e){console.warn(e)}return o}function s(e,t){var o=new ve(e),n={response:a(t),status:t.status,statusText:t.statusText,config:e.config,headers:e.resHeader||e.getAllResponseHeaders().split("\r\n").reduce((function(e,t){if(""===t)return e;var o=t.split(":");return e[o.shift()]=function(e){return e.replace(/^\s+|\s+$/g,"")}(o.join(":")),e}),{})};if(!i)return o.resolve(n);i(n,o)}function r(e,t,o,i){var a=new we(e);o={config:e.config,error:o,type:i},n?n(o,a):a.next(o)}function l(){return!0}function c(e){return function(t,o){return r(t,this,o,e),!0}}function d(e,t){return 4===e.readyState&&0!==e.status?s(e,t):4!==e.readyState&&he(e,le),!0}var{originXhr:u,unHook:m}=function(e,t){var o=(t=t||window).XMLHttpRequest,i=!0,n=function(){for(var e=new o,t=0;t(e.onRequest&&ke.push(e.onRequest),e.onResponse&&Ce.push(e.onResponse),be||((e=>{e.fetch=async(e,t)=>{for(const o of ke){const i=new xe;if(await o.apply(v,[{input:e,init:t},i]),i._resolve)return i._resolve;if(i._error)throw i._error;if(!i._next)break;e=i._input,t=i._init}let o=await ye.apply(v,[e,t]);for(const e of Ce){const t=new _e;if(await e.apply(v,[o,t]),t._resolve)return t._resolve;if(t._error)throw t._error;if(!t._next)break;o=t._response}return o}})(t),be=!0),{unProxy:()=>{e.onRequest&&ke.splice(ke.findIndex((t=>t===e.onRequest)),1),e.onResponse&&Ce.splice(Ce.findIndex((t=>t===e.onResponse)),1)},unHook:()=>{t.fetch=ye,ke=[],Ce=[]},originFetch:ye}),Te=class e extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.EnhanceExperience.noReport)}static isTargetURL(e){return!(!e.includes("//data.bilibili.com")&&!e.includes("//data.bilivideo.com"))}hookProperties(e){Object.defineProperty(e.navigator,"sendBeacon",{value:()=>!0}),Object.defineProperties(e,{reportObserver:{get:()=>({reportCustomData:function(){}}),set(){}},reportConfig:{get:()=>({}),set(){}}})}async ajaxHook(){const t={onRequest:(t,o)=>{e.isTargetURL(t.url)?o.resolve({config:t,status:200,headers:{"Content-Type":"text/plain; charset=utf-8"},response:"ok"}):o.next(t)}},o={onRequest(t,o){const i="string"==typeof(n=t.input)?n:n instanceof URL?n.toString():n instanceof Request?n.url:"Incorrect input";var n;e.isTargetURL(i)?o.resolve(new Response("ok")):o.next(t)},onResponse(e,t){t.next(e)}};this.hookProperties(v),ue(t,v),Ve(o,v)}run(){if(this.logger.log("拦截日志数据上报模块开始运行"),this.config.enabled)try{this.ajaxHook()}catch(e){this.logger.error("拦截日志数据上报失败",e)}}};m(Te,"runOnMultiplePages",!0),m(Te,"runAt","document-start"),m(Te,"onFrame","all"),m(Te,"runAfterDefault",!1);let Ne=Te;class Se extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.EnhanceExperience.noSleep)}run(){this.logger.log("屏蔽挂机检测模块开始运行"),this.config.enabled&&setInterval((()=>{document.dispatchEvent(new MouseEvent("mousemove"))}),3e5)}}m(Se,"runOnMultiplePages",!0),m(Se,"runAt","window-load"),m(Se,"runAfterDefault",!1);class Pe extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.EnhanceExperience.invisibility)}run(){this.logger.log("隐身入场模块开始运行"),this.config.enabled&&ue({onRequest:(e,t)=>{e.url.includes("//api.live.bilibili.com/xlive/web-room/v1/index/getInfoByUser")&&(e.url=e.url.replace("not_mock_enter_effect=0","not_mock_enter_effect=1")),t.next(e)}},v)}}m(Pe,"runOnMultiplePages",!0),m(Pe,"runAt","document-start"),m(Pe,"runAfterDefault",!1),m(Pe,"onFrame","all");class Ee extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.EnhanceExperience.showContributionUserNum)}async getContributionUserNum(e,t,o=1,i=100){return $.queryContributionRank(e,t,o,i).then((n=>(this.logger.log(`BAPI.live.queryContributionRank(${e}, ${t}, ${o}, ${i})`,n),0===n.code?n.data.count:(this.logger.error("获取高能用户数量失败",n.message),-1))))}async updateNumber(e,t,i){const n=await this.getContributionUserNum(t,i,1,100);-1!==n?(e.innerText=`高能用户(${n})`,setTimeout((()=>this.updateNumber(e,t,i)),o.random(5e4,7e4))):e.innerText="高能用户"}async run(){var e;if(this.logger.log("显示高能用户数量模块开始运行"),this.config.enabled){const t=T(),o=t.BilibiliLive.ANCHOR_UID,i=t.BilibiliLive.ROOMID,n=null==(e=await Q(document.body,"#rank-list-ctnr-box .tab-list"))?void 0:e.firstChild;n?this.updateNumber(n,o,i):this.logger.error("未找到高能用户标签")}}}m(Ee,"runOnMultiplePages",!0),m(Ee,"runAt","window-load");class Re extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removePKBox)}removePKNode(){h("#awesome-pk-vm { display: none !important }")}removePKToast(){const e=["主播即将结束PK","连线断开中"];new MutationObserver((t=>{for(const o of t)o.addedNodes.forEach((t=>{t instanceof HTMLElement&&t.classList.contains("link-toast")&&e.some((e=>{var o;return null==(o=t.textContent)?void 0:o.includes(e)}))&&(t.style.display="none")}))})).observe(document.body,{childList:!0})}async run(){this.logger.log("移除大乱斗元素模块开始运行"),this.config.enabled&&(this.removePKNode(),this.removePKToast())}}m(Re,"runOnMultiplePages",!0);class Me extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeLiveWaterMark)}async run(){this.logger.log("移除直播间水印模块开始运行"),this.config.enabled&&h(".web-player-icon-roomStatus { display: none !important }")}}m(Me,"runOnMultiplePages",!0);class Be extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeShopPopover)}async run(){this.logger.log("移除直播间小黄车弹窗模块开始运行"),this.config.enabled&&h(".shop-popover { display: none !important }")}}m(Be,"runOnMultiplePages",!0);class De extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeGameParty)}async run(){this.logger.log("移除直播间幻星派对标志模块开始运行"),this.config.enabled&&h("#game-id { display: none !important }")}}m(De,"runMultiple",!0);class Ie extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeGiftPopover)}async run(){this.logger.log("移除礼物赠送提示弹窗模块开始运行"),this.config.enabled&&h(".function-card { display: none !important }")}}m(Ie,"runOnMultiplePages",!0);class Le extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeMicPopover)}async run(){this.logger.log("移除连麦状态提示模块开始运行"),this.config.enabled&&h(".lin-mic-cntr { display: none !important }")}}m(Le,"runOnMultiplePages",!0);class Oe extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeComboCard)}async run(){this.logger.log("移除直播间相同弹幕连续提示模块开始运行"),this.config.enabled&&h("#combo-card { display: none !important }")}}m(Oe,"runOnMultiplePages",!0);class $e extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeRank)}async run(){this.logger.log("移除排行榜模块开始运行"),this.config.enabled&&h(".popular-and-hot-rank { display: none !important }")}}m($e,"runOnMultiplePages",!0);class Ae extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeGiftPlanet)}async run(){this.logger.log("移除礼物星球模块开始运行"),this.config.enabled&&h(".gift-planet-entry { display: none !important }")}}m(Ae,"runOnMultiplePages",!0);class Ue extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeActivityBanner)}async run(){this.logger.log("移除活动入口模块开始运行"),this.config.enabled&&h(".activity-gather-entry .task-box:nth-child(1) { display: none !important }")}}m(Ue,"runOnMultiplePages",!0);class je extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removePKBanner)}async run(){this.logger.log("移除大乱斗入口模块开始运行"),this.config.enabled&&h(".activity-gather-entry .task-box:nth-child(2) { display: none !important }")}}m(je,"runOnMultiplePages",!0);class He extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeFlipView)}async run(){this.logger.log("移除礼物栏下方广告模块开始运行"),this.config.enabled&&h(".flip-view { display: none !important }")}}m(He,"runOnMultiplePages",!0);class Ge extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeRecommendRoom)}async run(){this.logger.log("移除礼物栏下方推荐直播间模块开始运行"),this.config.enabled&&h(".room-info-ctnr { display: none !important }")}}m(Ge,"runOnMultiplePages",!0);class Fe extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeLiveMosaic)}async run(){this.logger.log("移除直播间马赛克模块开始运行"),this.config.enabled&&h("#web-player-module-area-mask-panel { opacity: 0 !important }")}}m(Fe,"runOnMultiplePages",!0);const ze=Object.freeze(Object.defineProperty({__proto__:null,DailyTask_LiveTask_LightTask:class extends G{constructor(){super(...arguments),m(this,"medalTasksConfig",this.moduleStore.moduleConfig.DailyTasks.LiveTasks.medalTasks),m(this,"config",this.medalTasksConfig.light)}set status(e){this.moduleStore.moduleStatus.DailyTasks.LiveTasks.medalTasks.light=e}getMedalList(){const e=T();return e.filteredFansMedals?e.filteredFansMedals.filter((e=>e.medal.level<20&&(this.medalTasksConfig.isWhiteList?this.medalTasksConfig.roomidList.includes(e.room_info.room_id):!this.medalTasksConfig.roomidList.includes(e.room_info.room_id))&&0===e.medal.is_lighted)):(this.status="error",null)}async like(e,t,o){try{const i=await $.likeReport(e,t,o);this.logger.log(`BAPI.live.likeReport(${e}, ${t}, ${o})`,i),0===i.code?this.logger.log(`点亮熄灭勋章-点赞 房间号 = ${e} 主播UID = ${t} 点赞次数 = ${o} 成功`):this.logger.error(`点亮熄灭勋章-点赞 房间号 = ${e} 主播UID = ${t} 点赞次数 = ${o} 失败`,i.message)}catch(i){this.logger.error(`点亮熄灭勋章-点赞 房间号 = ${e} 主播UID = ${t} 点赞次数 = ${o} 出错`,i)}}async sendDanmu(e,t){try{const o=await $.sendMsg(e,t);this.logger.log(`BAPI.live.sendMsg(${e}, ${t})`,o),0===o.code?this.logger.log(`点亮熄灭勋章-发送弹幕 在直播间 ${t} 发送弹幕 ${e} 成功`):this.logger.error(`点亮熄灭勋章-发送弹幕 在直播间 ${t} 发送弹幕 ${e} 失败`,o.message)}catch(o){this.logger.error(`点亮熄灭勋章-发送弹幕 在直播间 ${t} 发送弹幕 ${e} 出错`,o)}}async run(){if(this.logger.log("点亮熄灭勋章模块开始运行"),this.config.enabled)if(M(this.config._lastCompleteTime))D(0,0,0,5)?this.logger.log("昨天的给点亮熄灭勋章任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过点亮熄灭勋章任务了"),this.status="done");else{this.status="running";const e=this.getMedalList();if(e){for(let t=0;tthis.run()),e.ms),this.logger.log("距离点亮熄灭勋章模块下次运行时间:",e.str)}},DailyTask_LiveTask_SignTask:class extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.DailyTasks.LiveTasks.sign)}set status(e){this.moduleStore.moduleStatus.DailyTasks.LiveTasks.sign=e}async getSignInfo(){try{const e=await $.getSignInfo();return this.logger.log("BAPI.live.getSignInfo response",e),0===e.code?e.data:(this.logger.error("获取直播签到信息失败",e.message),null)}catch(e){return this.logger.error("获取直播签到信息出错",e),null}}async sign(){try{const e=await $.doSign();this.logger.log("BAPI.live.doSign response",e),0===e.code?(this.logger.log("直播签到成功,获得奖励:",e.data.text),this.config._lastCompleteTime=L(),this.status="done",this.logger.log("直播签到任务已完成")):(this.logger.error("直播签到失败",e.message),this.status="error")}catch(e){this.logger.error("执行直播签到任务出错",e),this.status="error"}}async run(){if(this.logger.log("直播签到模块开始运行"),this.config.enabled)if(M(this.config._lastCompleteTime))D(0,0,0,5)?this.logger.log("昨天的直播签到任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过直播签到任务了"),this.status="done");else{this.status="running";const e=await this.getSignInfo();e?0===e.status?await this.sign():(this.config._lastCompleteTime=L(),this.status="done"):await this.sign()}const e=B();setTimeout((()=>this.run()),e.ms),this.logger.log("距离直播签到模块下次运行时间:",e.str)}},DailyTask_LiveTask_WatchTask:W,DailyTask_MainSiteTask_CoinTask:class extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks.coin),m(this,"MAX_COIN",1)}set status(e){this.moduleStore.moduleStatus.DailyTasks.MainSiteTasks.coin=e}getDynamicVideoIds(){const e=T();return e.dynamicVideos?e.dynamicVideos.map((e=>{const t=e.modules.module_dynamic.major.archive;return{aid:t.aid,bvid:t.bvid}})):(this.status="error",null)}async getVideoCoinInfo(e,t){try{const o=await U.videoRelation(e,t);return this.logger.log(`BAPI.main.videoRelation(${e}, ${t}) response`,o),0===o.code?o.data.coin:(this.logger.error(`获取视频投币信息失败 aid = ${e} bvid = ${t}`,o.message),0)}catch(o){return this.logger.error(`获取视频投币信息出错 aid = ${e} bvid = ${t}`,o),0}}async coinDynamicVideos(e){const t=this.getDynamicVideoIds();if(t)for(const{aid:o,bvid:i}of t){const t=await this.getVideoCoinInfo(o,i),n=this.MAX_COIN-t;if(n>0){const t=Math.min(n,e),i=await this.coin(o,t);if(0===i){if(0===(e-=t)){this.logger.log("每日投币任务已完成"),this.config._lastCompleteTime=L(),this.status="done";break}}else if(1===i){this.status="error";break}}}}async coin(e,t){try{const o=await U.coinAdd(e,t);return this.logger.log(`BAPI.main.coinAdd(${e}) response`,o),0===o.code?(this.logger.log(`投币成功 视频aid = ${e} 投币数量num = ${t}`),0):-104===o.code?(this.logger.warn("硬币余额不足,每日投币任务终止"),1):(this.logger.error(`投币失败 视频aid = ${e} 投币数量num = ${t}`,o.message),2)}catch(o){return this.logger.error(`投币出错 视频aid = ${e} 投币数量num = ${t}`,o),3}}async run(){if(this.logger.log("每日投币模块开始运行"),this.config.enabled){const e=T();if(M(this.config._lastCompleteTime))D(0,0,0,5)?this.logger.log("昨天的每日投币任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过每日投币任务了"),this.status="done");else if(this.status="running",e.dailyRewardInfo){const t=e.dailyRewardInfo.coins/10;if(t(T().userInfo.money??5)?(this.logger.log("硬币余额不足,不执行每日投币任务"),this.status="done"):await this.coinDynamicVideos(e)}else this.config._lastCompleteTime=L(),this.status="done",this.logger.log("每日投币任务已完成")}}const e=B();setTimeout((()=>this.run()),e.ms),this.logger.log("距离每日投币模块下次运行时间:",e.str)}},DailyTask_MainSiteTask_LoginTask:class extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks.login)}set status(e){this.moduleStore.moduleStatus.DailyTasks.MainSiteTasks.login=e}async login(){return this.logger.log("每日登录任务已完成"),this.config._lastCompleteTime=L(),this.status="done",Promise.resolve()}async run(){if(this.logger.log("每日登录模块开始运行"),this.config.enabled){const e=T();M(this.config._lastCompleteTime)?D(0,0,0,5)?this.logger.log("昨天的每日登录任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过每日登录任务了"),this.status="done"):(this.status="running",e.dailyRewardInfo&&!e.dailyRewardInfo.login?await this.login():(this.config._lastCompleteTime=L(),this.status="done"))}const e=B();setTimeout((()=>this.run()),e.ms),this.logger.log("距离每日登录模块下次运行时间:",e.str)}},DailyTask_MainSiteTask_ShareTask:class extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks.share)}set status(e){this.moduleStore.moduleStatus.DailyTasks.MainSiteTasks.share=e}getAid(){const e=T();return e.dynamicVideos?e.dynamicVideos[0].modules.module_dynamic.major.archive.aid:"2"}async share(e){try{const t=await U.share(e);this.logger.log(`BAPI.main.share(${e}) response`,t),0===t.code||71e3===t.code?(this.logger.log("每日分享视频任务已完成"),this.config._lastCompleteTime=L(),this.status="done"):(this.logger.error("分享视频失败",t.message),this.status="error")}catch(e){this.logger.error("执行每日分享视频任务出错",e),this.status="error"}}async run(){if(this.logger.log("每日分享视频模块开始运行"),this.config.enabled){const e=T();if(M(this.config._lastCompleteTime))D(0,0,0,5)?this.logger.log("昨天的每日分享任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过每日分享任务了"),this.status="done");else if(this.status="running",e.dailyRewardInfo&&!e.dailyRewardInfo.share){const e=this.getAid();await this.share(e)}else this.config._lastCompleteTime=L(),this.status="done",this.logger.log("每日分享视频任务已完成")}const e=B();setTimeout((()=>this.run()),e.ms),this.logger.log("距离每日分享视频模块下次运行时间:",e.str)}},DailyTask_MainSiteTask_WatchTask:class extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks.watch)}set status(e){this.moduleStore.moduleStatus.DailyTasks.MainSiteTasks.watch=e}getAid(){const e=T();return o.isEmpty(e.dynamicVideos)?"2":e.dynamicVideos[0].modules.module_dynamic.major.archive.aid}async watch(e){try{const t=await U.videoHeartbeat(e);this.logger.log(`BAPI.main.videoHeartbeat(${e}) response`,t),0===t.code?(this.logger.log("每日观看视频任务已完成"),this.config._lastCompleteTime=L(),this.status="done"):(this.logger.error("发送观看视频心跳失败",t.message),this.status="error")}catch(e){this.logger.error("执行每日观看视频任务出错",e),this.status="error"}}async run(){if(this.logger.log("每日观看视频模块开始运行"),this.config.enabled){const e=T();if(M(this.config._lastCompleteTime))D(0,0,0,5)?this.logger.log("昨天的每日观看视频任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过每日观看视频任务了"),this.status="done");else if(this.status="running",e.dailyRewardInfo&&!e.dailyRewardInfo.watch){const e=this.getAid();await this.watch(e)}else this.config._lastCompleteTime=L(),this.status="done",this.logger.log("每日观看视频任务已完成")}const e=B();setTimeout((()=>this.run()),e.ms),this.logger.log("距离每日观看视频模块下次运行时间:",e.str)}},DailyTask_OtherTask_CoinToSilverTask:class extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.DailyTasks.OtherTasks.coinToSilver)}set status(e){this.moduleStore.moduleStatus.DailyTasks.OtherTasks.coinToSilver=e}async exchange(){try{const e=await $.coin2silver(this.config.num);this.logger.log(`BAPI.live.coin2silver{${this.config.num}} response`,e),0===e.code?(this.logger.log("硬币换银瓜子已完成,获得银瓜子:",e.data.silver),this.config._lastCompleteTime=L(),this.status="done"):(this.logger.error("硬币换银瓜子失败",e.message),this.status="error")}catch(e){this.logger.error("硬币换银瓜子出错",e),this.status="error"}}async run(){this.logger.log("硬币换银瓜子模块开始运行"),this.config.enabled&&(M(this.config._lastCompleteTime)?D(0,0,0,5)?this.logger.log("昨天的硬币换银瓜子任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过硬币换银瓜子任务了"),this.status="done"):(this.status="running",await this.exchange()));const e=B();setTimeout((()=>this.run()),e.ms),this.logger.log("硬币换银瓜子模块下次运行时间:",e.str)}},DailyTask_OtherTask_GetYearVipPrivilegeTask:class extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.DailyTasks.OtherTasks.getYearVipPrivilege),m(this,"type2Name",{1:"年度专享B币赠送",2:"年度专享会员购优惠券",3:"年度专享漫画礼包 - 漫画福利券",4:"大会员专享会员购包邮券",5:"年度专享漫画礼包 - 漫画商城优惠券",6:"大会员专享会员体验卡",7:"大会员专享课堂优惠券"})}set status(e){this.moduleStore.moduleStatus.DailyTasks.OtherTasks.getYearVipPrivilege=e}async myPrivilege(){try{const e=await U.vip.myPrivilege();if(this.logger.log("BAPI.main.vip.myPrivilege response",e),0===e.code)return e.data.list;this.logger.error("获取年度大会员权益信息失败",e.message),this.status="error"}catch(e){this.logger.error("获取年度大会员权益信息出错",e),this.status="error"}}async receivePrivilege(e){try{const t=await U.vip.receivePrivilege(e);this.logger.log(`BAPI.main.vip.receivePrivilege(${e}) response`,t),0===t.code?this.logger.log(`领取年度大会员权益(type = ${e}, ${this.type2Name[e]})成功`):this.logger.error(`领取年度大会员权益(type = ${e}, ${this.type2Name[e]})失败`,t.message)}catch(t){this.logger.error(`领取年度大会员权益(type = ${e}, ${this.type2Name[e]})出错`,t)}}async addExperience(){try{const e=await U.vip.addExperience();this.logger.log("BAPI.main.vip.addExperience response",e),0===e.code?this.logger.log("领取年度大会员权益(type = 9,专属等级加速包(10主站经验))成功"):this.logger.error("领取年度大会员权益(type = 9,专属等级加速包(10主站经验))失败",e.message)}catch(e){this.logger.error("领取年度大会员权益(type = 9,专属等级加速包(10主站经验))出错",e)}}isYearVip(){const e=T().userInfo;return!(!e||1!==e.vip.status||2!==e.vip.type)||(this.logger.log("当前账号不是年度大会员,不领取权益"),!1)}async run(){if(this.logger.log("领取年度大会员权益模块开始运行"),this.config.enabled){if(this.isYearVip()){if(I()>=this.config._nextReceiveTime){this.status="running";const t=await this.myPrivilege();if(t){for(const o of t)if(8!==o.type&&14!==o.type){if(0===o.state)9===o.type?await this.addExperience():await this.receivePrivilege(o.type);else if(1===o.state)this.logger.log(`该权益(type = ${o.type})已经领取过了`);else if(9===o.type){const t=this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks.watch;t.enabled?e.watch((()=>t._lastCompleteTime),(()=>this.addExperience()),{once:!0}):this.logger.warn("领取专属等级加速包(10主站经验)前需要观看任意一个视频,请打开【主站任务】中的【每日观看视频】,或是在运行脚本前手动观看")}await S(200)}this.status="done",this.config._nextReceiveTime=Math.min(...t.map((e=>e.period_end_unix)))}}const t=this.config._nextReceiveTime-I();t<86400?(this.logger.log("领取年度大会员权益模块下次运行时间:",n.DateTime.fromSeconds(this.config._nextReceiveTime).toJSDate()),setTimeout((()=>this.run()),1e3*t)):this.logger.log("距离下次领取年度大会员权益的时间超过一天,不计划下次运行")}}else{const e=B(0);setTimeout((()=>this.run()),e.ms),this.logger.log("领取年度大会员权益模块下次运行时间:",e.str)}}},DailyTask_OtherTask_GroupSignTask:class extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.DailyTasks.OtherTasks.groupSign)}set status(e){this.moduleStore.moduleStatus.DailyTasks.OtherTasks.groupSign=e}async getGroupidOwneruidList(){try{const e=await j.myGroups();if(this.logger.log("BAPI.vc.myGroups response",e),0===e.code)return e.data.list.map((e=>[e.group_id,e.owner_uid]));this.logger.error("获取应援团信息失败",e.message),this.status="error"}catch(e){this.logger.error("获取应援团信息出错",e),this.status="error"}}async sign(e,t){try{const o=await j.signIn(e,t);this.logger.log(`BAPI.vc.signIn(${e}, ${t}) response`,o),0===o.code?this.logger.log(`应援团签到 应援团ID = ${e} 拥有者UID = ${t} 成功, 粉丝勋章亲密度+${o.data.add_num}`):this.logger.error(`应援团签到 应援团ID = ${e} 拥有者UID = ${t} 失败`,o.message)}catch(o){this.logger.error(`应援团签到 应援团ID = ${e} 拥有者UID = ${t} 出错`,o)}}async run(){if(this.logger.log("应援团签到模块开始运行"),this.config.enabled)if(M(this.config._lastCompleteTime,8,5))D(0,0,8,5)?this.logger.log("昨天的应援团签到任务已经完成过了,等到今天早上八点零五分再次执行"):(this.logger.log("今天已经完成过应援团签到任务了"),this.status="done");else{this.status="running";const e=await this.getGroupidOwneruidList();if(e){for(const[t,o]of e)await this.sign(t,o),await S(2e3);this.config._lastCompleteTime=L(),this.logger.log("应援团签到任务已完成"),this.status="done"}}const e=B(8,5);setTimeout((()=>this.run()),e.ms),this.logger.log("距离应援团签到模块下次运行时间:",e.str)}},DailyTask_OtherTask_SilverToCoinTask:class extends G{constructor(){super(...arguments),m(this,"config",this.moduleStore.moduleConfig.DailyTasks.OtherTasks.silverToCoin)}set status(e){this.moduleStore.moduleStatus.DailyTasks.OtherTasks.silverToCoin=e}async exchange(){try{const e=await $.silver2coin();this.logger.log("BAPI.live.silver2coin response",e),0===e.code?(this.logger.log("银瓜子换硬币已完成,获得硬币:",e.data.coin),this.config._lastCompleteTime=L(),this.status="done"):403===e.code?(this.logger.log("每天最多只能用银瓜子兑换1个硬币"),this.config._lastCompleteTime=L(),this.status="done"):(this.logger.error("银瓜子换硬币失败",e.message),this.status="error")}catch(e){this.logger.error("银瓜子换硬币出错",e),this.status="error"}}run(){this.logger.log("银瓜子换硬币模块开始运行"),this.config.enabled&&(M(this.config._lastCompleteTime)?D(0,0,0,5)?this.logger.log("昨天的银瓜子换硬币任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过银瓜子换硬币任务了"),this.status="done"):(this.status="running",this.exchange()));const e=B();setTimeout((()=>this.run()),e.ms),this.logger.log("银瓜子换硬币模块下次运行时间:",e.str)}},EnhanceExperience_BanP2P:ee,EnhanceExperience_Invisibility:Pe,EnhanceExperience_NoReport:Ne,EnhanceExperience_NoSleep:Se,EnhanceExperience_ShowContributionUserNum:Ee,EnhanceExperience_SwitchLiveStreamQuality:Z,RemoveElement_RemoveActivityBanner:Ue,RemoveElement_RemoveComboCard:Oe,RemoveElement_RemoveFlipView:He,RemoveElement_RemoveGameParty:De,RemoveElement_RemoveGiftPlanet:Ae,RemoveElement_RemoveGiftPopover:Ie,RemoveElement_RemoveLiveMosaic:Fe,RemoveElement_RemoveLiveWaterMark:Me,RemoveElement_RemoveMicPopover:Le,RemoveElement_RemovePKBanner:je,RemoveElement_RemovePKBox:Re,RemoveElement_RemoveRank:$e,RemoveElement_RemoveRecommendRoom:Ge,RemoveElement_RemoveShopPopover:Be},Symbol.toStringTag,{value:"Module"}));function qe(e){const t={all:o=(o=e)||new Map,on:function(e,t){var i=o.get(e);i?i.push(t):o.set(e,[t])},off:function(e,t){var i=o.get(e);i&&(t?i.splice(i.indexOf(t)>>>0,1):o.set(e,[]))},emit:function(e,t){var i=o.get(e);i&&i.slice().map((function(e){e(t)})),(i=o.get("*"))&&i.slice().map((function(o){o(e,t)}))}};var o;return{...t,once(e,o){t.on(e,(function i(n){t.off(e,i),o(n)}))}}}const Ke=t.defineStore("cache",(()=>{const t=e.reactive(y.getCache()),o=e.ref("Main");return e.watch(t,(e=>y.setCache(e))),{cache:t,currentScriptType:o,startMainBLTHAliveHeartBeat:function(){t.lastAliveHeartBeatTime=Date.now();const e=setInterval((()=>t.lastAliveHeartBeatTime=Date.now()),5e3);window.addEventListener("unload",(()=>{clearInterval(e),t.lastAliveHeartBeatTime=0}))},checkCurrentScriptType:function(){0!==t.lastAliveHeartBeatTime&&Date.now()-t.lastAliveHeartBeatTime<8e3?null===sessionStorage.getItem("main_blth_flag")?o.value="Other":o.value="SubMain":(o.value="Main",sessionStorage.setItem("main_blth_flag","🚩"))}}})),We={DailyTasks:{MainSiteTasks:{login:"",watch:"",coin:"",share:""},LiveTasks:{sign:"",medalTasks:{light:"",watch:""}},OtherTasks:{groupSign:"",silverToCoin:"",coinToSilver:"",getYearVipPrivilege:""}}},Xe=[],Je=t.defineStore("module",(()=>{const t=e.reactive(y.getModuleConfig()),i=qe(),n=e.reactive(We);return e.watch(t,o.debounce((e=>y.setModuleConfig(e)),250,{leading:!0,trailing:!0})),function e(){setTimeout((()=>{E(n,((e,t)=>{o.set(n,t,"")})),e()}),B(0,0).ms)}(),{moduleConfig:t,emitter:i,moduleStatus:n,loadModules:function(e){const t=Ke(),o=new H("ModuleStore_LoadModules");if("unknown"===e)for(const[e,o]of Object.entries(ze))("all"===o.onFrame||"top"===o.onFrame&&Y())&&(o.runOnMultiplePages||"Other"!==t.currentScriptType)&&(o.runAfterDefault||(R(o.runAt).then((()=>new o(e).run())),Xe.push(e)));else{const e=function(){const e=Ke(),t=[];for(const[o,i]of Object.entries(q))(i.runOnMultiplePages||"Other"!==e.currentScriptType)&&t.push(new i(o).run());return Promise.all(t)}();for(const[i,n]of Object.entries(ze))("target"===n.onFrame||"top"===n.onFrame&&Y()&&!Xe.includes(i)||"all"===n.onFrame&&!Xe.includes(i))&&(n.runOnMultiplePages||"Other"!==t.currentScriptType)&&R(n.runAt).then((async()=>{try{n.runAfterDefault&&await e,new n(i).run()}catch(e){o.error(`运行默认模块时出错,模块 ${i} 不运行:`,e)}}))}}}})),Qe={DailyTasks:{MainSiteTasks:{login:{title:"每日登录",message:"完成主站的每日登录任务。"},watch:{title:"每日观看视频",message:e.h("p",[e.h("div","完成主站的每日观看视频任务。"),e.h("div","从动态中选取视频观看,会产生观看历史记录。")])},coin:{title:"每日投币",message:e.h("p",[e.h("div","完成主站的每日投币任务。"),e.h("div","从动态中选取视频投币,会根据你今天已经投过的币的数量计算还要投几个币。")])},share:{title:"每日分享视频",message:e.h("p",[e.h("div","完成主站的每日分享视频任务。"),e.h("div","不会真的分享到某处。")])}},LiveTasks:{sign:{title:"直播签到",message:e.h("p",[e.h("div","完成直播签到任务。")])},medalTasks:{list:{title:"黑白名单",message:e.h("p",[e.h("div","为了更精细地控制为哪些粉丝勋章执行点亮熄灭勋章和观看直播任务,你可以使用黑名单或白名单模式。"),e.h("div",[e.h("li",[e.h("span","黑名单:仅为"),e.h("strong","不在"),e.h("span","名单中的粉丝勋章执行任务。")]),e.h("li",[e.h("span","白名单:仅为"),e.h("strong","在"),e.h("span","名单中的粉丝勋章执行任务。")])]),e.h("div","点击编辑名单按钮,然后使用第一列的多选框即可编辑名单中的粉丝勋章。")])},light:{main:{title:"点亮熄灭勋章",message:e.h("p",[e.h("div","在你的每个已熄灭的粉丝勋章对应的直播间完成点亮任务,从而点亮粉丝勋章。"),e.h("div","支持两种点亮方式,可自由选择:"),e.h("div",[e.h("li",[e.h("span","点赞(不推荐):点赞30次")]),e.h("li",[e.h("strong","发送弹幕(推荐):"),e.h("span","发送弹幕1条")])])])},like:{title:"点赞",message:e.h("p",[e.h("div","在已熄灭粉丝勋章对应的直播间给主播点赞,点亮粉丝勋章。"),e.h("div",[e.h("li",[e.h("span","点赞次数为略微超过任务要求的随机值。")]),e.h("li",[e.h("span","部分直播间无法完成该任务,原因未知。")])]),e.h("div",[e.h("strong","注意:"),e.h("span","点赞只能点亮正在直播的直播间对应的粉丝勋章。")])])},danmu:{title:"发送弹幕",message:e.h("p",[e.h("div","在已熄灭粉丝勋章对应的直播间发送一条弹幕,点亮粉丝勋章。"),e.h("div",[e.h("span","点击编辑弹幕按钮编辑发送的弹幕,脚本会从中按顺序循环抽取弹幕发送。"),e.h("span","部分直播间无法完成该任务,可能的原因有:"),e.h("div",[e.h("li","你被禁言了"),e.h("li","发言有粉丝勋章等级要求"),e.h("li",[e.h("span","特殊直播间(比如"),e.h("a",{href:"https://live.bilibili.com/54",rel:"noreferrer",target:"_blank"},"54"),e.h("span",")")])])])])}},watch:{title:"观看直播",message:e.h("p",[e.h("div","完成粉丝勋章的观看直播任务。"),e.h("div",[e.h("li","部分直播间因为没有设置直播分区导致任务无法完成。"),e.h("li","主播当前是否开播不会影响该任务的完成。"),e.h("li","脚本会按粉丝勋章的默认顺序逐个完成观看指定时长直播的任务。")]),e.h("div",[e.h("strong","注意:"),e.h("span","如果当前所处的直播间正在直播,可能无法获得任何亲密度。请在未开播的直播间使用本功能,后续会优化这一点。")])])}}},OtherTasks:{groupSign:{title:"应援团签到",message:"完成应援团签到任务。"},silverToCoin:{title:"银瓜子换硬币",message:e.h("p",[e.h("div","把银瓜子兑换为硬币。"),e.h("div","具体兑换规则请点击直播间页面的“立即充值→银瓜子商店”查看。")])},coinToSilver:{title:"硬币换银瓜子",message:e.h("p",[e.h("div","把硬币兑换为银瓜子。"),e.h("div","具体兑换规则请点击直播间页面的“立即充值→银瓜子商店”查看。")])},getYearVipPrivilege:{title:"领取年度大会员权益",message:e.h("p",[e.h("div","自动领取年度大会员权益。"),e.h("div",[e.h("span","具体权益请前往"),e.h("a",{href:"https://account.bilibili.com/account/big/myPackage",rel:"noreferrer",target:"_blank"},"卡券包"),e.h("span","查看。")])])}}},EnhanceExperience:{switchLiveStreamQuality:{title:"自动切换画质",message:e.h("p",[e.h("div","打开直播间后自动把播放器切换到指定画质。"),e.h("div","如果指定画质不存在,则还是使用B站的默认画质。")])},banp2p:{title:"禁用P2P",message:e.h("p",[e.h("div","禁用直播流的P2P上传/下载"),e.h("div","B站使用WebRTC技术把许多浏览器点对点(P2P)地连接起来,实现视频流和音频流的传输。这样做是为了减轻B站服务器的压力,但是会占用你一定的上行带宽(大约几百kb每秒)。如果你不想被占用上行带宽,可以开启该功能。若开启后发现观看直播时有明显卡顿,请关闭。")])},noReport:{title:"拦截日志数据上报",message:e.h("p",[e.h("div","禁止B站上报日志数据。"),e.h("div",[e.h("span","B站会实时地上报大量日志信息,比如直播观看情况、代码报错等等。开启本功能后绝大多数日志上报都会被拦截并返回一个成功的响应。如果追求更好的效果和性能表现建议使用带有广告拦截功能的浏览器拓展,比如"),e.h("a",{href:"https://github.com/gorhill/uBlock",rel:"noreferrer",target:"_blank"},"uBlock Origin"),e.h("span","。")])])},noSleep:{title:"屏蔽挂机检测",message:e.h("p",[e.h("div","屏蔽B站直播间的挂机检测。"),e.h("div","如果长时间没有操作,会提示“检测到您已离开当前屏幕,倒计时后即将暂停播放”。开启本功能后即可避免这种情况。")])},invisibility:{title:"隐身入场",message:e.h("p",[e.h("div","进入直播间时其他人不会收到提示,但还是会出现在高能用户榜单上。")])},showContributionUserNum:{title:"显示高能用户数量",message:e.h("p",[e.h("div","在高能用户标签上显示当前直播间的高能用户数量,每分钟更新一次数据。")])}},RemoveElement:{removePKBox:{title:"移除大乱斗元素",message:"移除直播间的大乱斗元素(进度条,弹出的提示等)。"},removeLiveWaterMark:{title:"移除直播间水印",message:"移除直播画面左上角的水印。"},removeShopPopover:{title:"移除直播间小黄车弹窗",message:"移除直播间左上角的小黄车弹窗。"},removeGameParty:{title:"移除直播间幻星派对标志",message:"移除直播间右下角的幻星派对标志。"},removeGiftPopover:{title:"移除礼物赠送提示弹窗",message:"移除直播间右下角的礼物赠送提示弹窗(赠送一个牛蛙牛蛙支持主播)。"},removeMicPopover:{title:"移除连麦状态提示",message:"移除直播间左上角的连麦提示弹窗(连线功能只能在手机端使用,快使用手机登录吧~)。"},removeComboCard:{title:"移除直播间相同弹幕连续提示",message:"移除直播间相同弹幕连续提示。"},removeRank:{title:"移除排行榜",message:"移除直播画面上方的人气榜/航海榜,赠送人气票的入口也在这里。"},removeGiftPlanet:{title:"移除礼物星球",message:"移除直播画面上方的礼物星球。"},removeActivityBanner:{title:"移除活动入口",message:"移除直播画面上方的活动入口,当前活动内容会滚动切换。"},removePKBanner:{title:"移除大乱斗入口",message:"移除直播画面上方的大乱斗入口,这里在有BLS的时候也会成为BLS的入口,和大乱斗的入口滚动切换。"},removeFlipView:{title:"移除礼物栏下方广告",message:"移除礼物栏下方广告。"},removeRecommendRoom:{title:"移除礼物栏下方推荐直播间",message:"移除礼物栏下方推荐直播间。"},removeLiveMosaic:{title:"移除直播间马赛克",message:"移除部分直播间特有的马赛克。"}}},Ye=e.defineComponent({__name:"MainSiteTasks",setup(t){const o=Je(),i=o.moduleConfig.DailyTasks.MainSiteTasks,n=o.moduleStatus.DailyTasks.MainSiteTasks;return(t,o)=>{const a=e.resolveComponent("el-switch"),s=e.resolveComponent("Info"),r=e.resolveComponent("TaskStatus"),l=e.resolveComponent("el-space"),c=e.resolveComponent("el-row"),d=e.resolveComponent("el-option"),u=e.resolveComponent("el-select"),m=e.resolveComponent("el-text"),h=e.resolveComponent("el-divider"),g=e.resolveComponent("el-link");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).login.enabled,"onUpdate:modelValue":o[0]||(o[0]=t=>e.unref(i).login.enabled=t),"active-text":"每日登录"},null,8,["modelValue"]),e.createVNode(s,{item:e.unref(Qe).DailyTasks.MainSiteTasks.login},null,8,["item"]),e.createVNode(r,{status:e.unref(n).login},null,8,["status"])])),_:1})])),_:1}),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).watch.enabled,"onUpdate:modelValue":o[1]||(o[1]=t=>e.unref(i).watch.enabled=t),"active-text":"每日观看视频"},null,8,["modelValue"]),e.createVNode(s,{item:e.unref(Qe).DailyTasks.MainSiteTasks.watch},null,8,["item"]),e.createVNode(r,{status:e.unref(n).watch},null,8,["status"])])),_:1})])),_:1}),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).coin.enabled,"onUpdate:modelValue":o[2]||(o[2]=t=>e.unref(i).coin.enabled=t),"active-text":"每日投币"},null,8,["modelValue"]),e.createVNode(u,{modelValue:e.unref(i).coin.num,"onUpdate:modelValue":o[3]||(o[3]=t=>e.unref(i).coin.num=t),placeholder:"Select",style:{width:"64px"}},{default:e.withCtx((()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(5,(t=>e.createVNode(d,{key:t,label:t,value:t},null,8,["label","value"]))),64))])),_:1},8,["modelValue"]),e.createVNode(m,null,{default:e.withCtx((()=>[e.createTextVNode("个")])),_:1}),e.createVNode(s,{item:e.unref(Qe).DailyTasks.MainSiteTasks.coin},null,8,["item"]),e.createVNode(r,{status:e.unref(n).coin},null,8,["status"])])),_:1})])),_:1}),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).share.enabled,"onUpdate:modelValue":o[4]||(o[4]=t=>e.unref(i).share.enabled=t),"active-text":"每日分享视频"},null,8,["modelValue"]),e.createVNode(s,{item:e.unref(Qe).DailyTasks.MainSiteTasks.share},null,8,["item"]),e.createVNode(r,{status:e.unref(n).share},null,8,["status"])])),_:1})])),_:1}),e.createVNode(h),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(m,null,{default:e.withCtx((()=>[e.createVNode(m,null,{default:e.withCtx((()=>[e.createTextVNode("  主站每日任务的完成情况可在")])),_:1}),e.createVNode(g,{rel:"noreferrer",type:"primary",href:"https://account.bilibili.com/account/home",target:"_blank",style:{"vertical-align":"unset"}},{default:e.withCtx((()=>[e.createTextVNode("个人中心")])),_:1}),e.createVNode(m,null,{default:e.withCtx((()=>[e.createTextVNode("查看。")])),_:1}),e.createVNode(m,null,{default:e.withCtx((()=>[e.createTextVNode("数据更新可能有一定的延时。")])),_:1})])),_:1})])),_:1})])}}}),Ze=(t=>(e.pushScopeId("data-v-3d7ec9d9"),t=t(),e.popScopeId(),t))((()=>e.createElementVNode("br",null,null,-1))),et={class:"avatar-wrap"},tt=k(e.defineComponent({__name:"LiveTasks",setup(t){const o=Je(),n=T(),a=o.moduleConfig.DailyTasks.LiveTasks,r=o.moduleStatus.DailyTasks.LiveTasks,l=e.ref(!1),c=e.computed((()=>a.medalTasks.light.danmuList.map((e=>({content:e}))))),d=()=>{s.ElMessageBox.prompt("请输入新增的弹幕内容","新增弹幕",{confirmButtonText:"确认",cancelButtonText:"取消",inputPattern:/^.{1,30}$/,inputErrorMessage:"弹幕内容不得为空且长度不能超过30",lockScroll:!1}).then((({value:e})=>{a.medalTasks.light.danmuList.push(e)})).catch((()=>{}))},u=e.ref(!1),m=e.computed((()=>{var e;return null==(e=n.filteredFansMedals)?void 0:e.map((e=>({avatar:e.anchor_info.avatar,nick_name:e.anchor_info.nick_name,medal_name:e.medal.medal_name,medal_level:e.medal.level,roomid:e.room_info.room_id})))})),h=e.ref(!1);let g=!0;const p=async()=>{u.value=!0,g&&(g=!1,await e.nextTick(),n.fansMedals?v(m.value):(h.value=!0,e.watch(m,(e=>{v(e),h.value=!1}),{once:!0}),o.emitter.emit("Default_FansMedals",{module:"LiveTasks"})))},f=e.ref(),v=e=>{e&&a.medalTasks.roomidList.forEach(((t,o)=>{var i;const n=e.find((e=>e.roomid===t));n?null==(i=f.value)||i.toggleRowSelection(n,!0):a.medalTasks.roomidList.splice(o,1)}))};function w(e){a.medalTasks.roomidList=e.map((e=>e.roomid))}function y(e,t,o){var i;o.target.className.startsWith("el-link")||null==(i=f.value)||i.toggleRowSelection(e,void 0)}return(t,o)=>{const n=e.resolveComponent("el-switch"),g=e.resolveComponent("Info"),v=e.resolveComponent("TaskStatus"),x=e.resolveComponent("el-space"),_=e.resolveComponent("el-row"),b=e.resolveComponent("el-divider"),k=e.resolveComponent("SemiSelect"),C=e.resolveComponent("el-icon"),V=e.resolveComponent("el-radio"),T=e.resolveComponent("el-button"),N=e.resolveComponent("el-radio-group"),S=e.resolveComponent("el-option"),P=e.resolveComponent("el-select"),E=e.resolveComponent("el-text"),R=e.resolveComponent("el-link"),M=e.resolveComponent("el-table-column"),B=e.resolveComponent("el-dialog"),D=e.resolveComponent("el-image"),I=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(_,null,{default:e.withCtx((()=>[e.createVNode(x,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(a).sign.enabled,"onUpdate:modelValue":o[0]||(o[0]=t=>e.unref(a).sign.enabled=t),"active-text":"直播签到"},null,8,["modelValue"]),e.createVNode(g,{item:e.unref(Qe).DailyTasks.LiveTasks.sign},null,8,["item"]),e.createVNode(v,{status:e.unref(r).sign},null,8,["status"])])),_:1})])),_:1}),e.createVNode(b),e.createVNode(_,null,{default:e.withCtx((()=>[e.createVNode(x,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(a).medalTasks.light.enabled,"onUpdate:modelValue":o[1]||(o[1]=t=>e.unref(a).medalTasks.light.enabled=t),"active-text":"点亮熄灭勋章"},null,8,["modelValue"]),e.createVNode(g,{item:e.unref(Qe).DailyTasks.LiveTasks.medalTasks.light.main},null,8,["item"]),e.createVNode(v,{status:e.unref(r).medalTasks.light},null,8,["status"])])),_:1})])),_:1}),e.createVNode(_,null,{default:e.withCtx((()=>[e.createVNode(N,{modelValue:e.unref(a).medalTasks.light.mode,"onUpdate:modelValue":o[3]||(o[3]=t=>e.unref(a).medalTasks.light.mode=t),class:"radio-group"},{default:e.withCtx((()=>[e.createVNode(_,null,{default:e.withCtx((()=>[e.createVNode(x,{wrap:""},{default:e.withCtx((()=>[e.createVNode(C,null,{default:e.withCtx((()=>[e.createVNode(k)])),_:1}),e.createVNode(V,{value:"like"},{default:e.withCtx((()=>[e.createTextVNode("点赞")])),_:1}),e.createVNode(g,{item:e.unref(Qe).DailyTasks.LiveTasks.medalTasks.light.like},null,8,["item"])])),_:1})])),_:1}),e.createVNode(_,null,{default:e.withCtx((()=>[e.createVNode(x,{wrap:""},{default:e.withCtx((()=>[e.createVNode(C,null,{default:e.withCtx((()=>[e.createVNode(k)])),_:1}),e.createVNode(V,{value:"danmu"},{default:e.withCtx((()=>[e.createTextVNode("发送弹幕")])),_:1}),e.createVNode(T,{type:"primary",size:"small",icon:e.unref(i.Edit),onClick:o[2]||(o[2]=e=>l.value=!l.value)},{default:e.withCtx((()=>[e.createTextVNode("编辑弹幕 ")])),_:1},8,["icon"]),e.createVNode(g,{item:e.unref(Qe).DailyTasks.LiveTasks.medalTasks.light.danmu},null,8,["item"])])),_:1})])),_:1})])),_:1},8,["modelValue"])])),_:1}),e.createVNode(_,null,{default:e.withCtx((()=>[e.createVNode(x,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(a).medalTasks.watch.enabled,"onUpdate:modelValue":o[4]||(o[4]=t=>e.unref(a).medalTasks.watch.enabled=t),"active-text":"观看直播"},null,8,["modelValue"]),e.createVNode(P,{modelValue:e.unref(a).medalTasks.watch.time,"onUpdate:modelValue":o[5]||(o[5]=t=>e.unref(a).medalTasks.watch.time=t),placeholder:"Select",style:{width:"70px"}},{default:e.withCtx((()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(24,(t=>e.createVNode(S,{key:t,label:5*t,value:5*t},null,8,["label","value"]))),64))])),_:1},8,["modelValue"]),e.createVNode(E,null,{default:e.withCtx((()=>[e.createTextVNode("分钟")])),_:1}),e.createVNode(g,{item:e.unref(Qe).DailyTasks.LiveTasks.medalTasks.watch},null,8,["item"]),e.createVNode(v,{status:e.unref(r).medalTasks.watch},null,8,["status"])])),_:1})])),_:1}),e.createVNode(_,null,{default:e.withCtx((()=>[e.createVNode(x,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(a).medalTasks.isWhiteList,"onUpdate:modelValue":o[6]||(o[6]=t=>e.unref(a).medalTasks.isWhiteList=t),"active-text":"白名单","inactive-text":"黑名单"},null,8,["modelValue"]),e.createVNode(T,{type:"primary",size:"small",icon:e.unref(i.Edit),onClick:p},{default:e.withCtx((()=>[e.createTextVNode("编辑名单 ")])),_:1},8,["icon"]),e.createVNode(g,{item:e.unref(Qe).DailyTasks.LiveTasks.medalTasks.list},null,8,["item"])])),_:1})])),_:1}),e.createVNode(b),e.createVNode(_,null,{default:e.withCtx((()=>[e.createVNode(E,null,{default:e.withCtx((()=>[e.createTextVNode("直播任务相关信息可在")])),_:1}),e.createVNode(R,{rel:"noreferrer",type:"primary",href:"https://link.bilibili.com/p/help/index#/audience-fans-medal",target:"_blank"},{default:e.withCtx((()=>[e.createTextVNode("帮助中心 ")])),_:1}),e.createVNode(E,null,{default:e.withCtx((()=>[e.createTextVNode("查看。")])),_:1})])),_:1}),Ze,e.createVNode(_,null,{default:e.withCtx((()=>[e.createVNode(E,{tag:"b"},{default:e.withCtx((()=>[e.createTextVNode("注意:")])),_:1})])),_:1}),e.createVNode(_,null,{default:e.withCtx((()=>[e.createVNode(E,null,{default:e.withCtx((()=>[e.createTextVNode("  由于每天能通过完成任务获得亲密度的粉丝勋章数量有限,脚本默认仅为最多199个等级小于20的粉丝勋章完成观看直播任务。在脚本执行任务期间观看直播可能导致今天无法获取任何亲密度。 ")])),_:1})])),_:1}),e.createVNode(B,{modelValue:l.value,"onUpdate:modelValue":o[7]||(o[7]=e=>l.value=e),title:"编辑弹幕内容","lock-scroll":!1,width:"40%"},{footer:e.withCtx((()=>[e.createVNode(T,{type:"primary",onClick:d},{default:e.withCtx((()=>[e.createTextVNode("新增弹幕")])),_:1})])),default:e.withCtx((()=>[e.createVNode(e.unref(s.ElTable),{data:c.value,"max-height":"500"},{default:e.withCtx((()=>[e.createVNode(M,{type:"index",width:"50"}),e.createVNode(M,{prop:"content",label:"弹幕内容"}),e.createVNode(M,{label:"操作",width:"220",align:"center"},{default:e.withCtx((t=>[e.createVNode(T,{text:"",icon:e.unref(i.Edit),onClick:e=>{return o=t.$index,i=t.row,void s.ElMessageBox.prompt("请输入新的弹幕内容","修改弹幕",{confirmButtonText:"确认",cancelButtonText:"取消",inputPattern:/^.{1,30}$/,inputErrorMessage:"弹幕内容不得为空且长度不能超过30",inputValue:i.content,lockScroll:!1}).then((({value:e})=>{a.medalTasks.light.danmuList[o]=e})).catch((()=>{}));var o,i}},{default:e.withCtx((()=>[e.createTextVNode(" 修改 ")])),_:2},1032,["icon","onClick"]),e.createVNode(T,{text:"",icon:e.unref(i.Delete),type:"danger",onClick:e=>{return o=t.$index,void(1!==a.medalTasks.light.danmuList.length?a.medalTasks.light.danmuList.splice(o,1):s.ElMessage.warning({message:"至少要有一条弹幕",appendTo:".el-dialog"}));var o}},{default:e.withCtx((()=>[e.createTextVNode(" 删除 ")])),_:2},1032,["icon","onClick"])])),_:1})])),_:1},8,["data"])])),_:1},8,["modelValue"]),e.createVNode(B,{modelValue:u.value,"onUpdate:modelValue":o[8]||(o[8]=e=>u.value=e),title:"编辑粉丝勋章名单","lock-scroll":!1,width:"40%"},{default:e.withCtx((()=>[e.withDirectives((e.openBlock(),e.createBlock(e.unref(s.ElTable),{ref_key:"medalInfoTableRef",ref:f,data:m.value,"max-height":"500","empty-text":"没有粉丝勋章",onSelectionChange:w,onRowClick:y},{default:e.withCtx((()=>[e.createVNode(M,{type:"selection",align:"center",width:"55"}),e.createVNode(M,{prop:"avatar",label:"头像",width:"100"},{default:e.withCtx((t=>[e.createElementVNode("div",et,[e.createVNode(D,{src:t.row.avatar,loading:"lazy",referrerpolicy:"origin",class:"avatar"},{error:e.withCtx((()=>[e.createVNode(D,{src:"//i0.hdslb.com/bfs/face/member/noface.jpg",referrerpolicy:"origin",class:"avatar"})])),_:2},1032,["src"])])])),_:1}),e.createVNode(M,{prop:"nick_name",label:"昵称"}),e.createVNode(M,{prop:"medal_name",label:"粉丝勋章"}),e.createVNode(M,{prop:"medal_level",label:"等级",width:"80",sortable:""}),e.createVNode(M,{prop:"roomid",label:"房间号"},{default:e.withCtx((t=>[e.createVNode(R,{href:"https://live.bilibili.com/"+t.row.roomid+"?visit_id=",rel:"noreferrer",type:"primary",target:"_blank"},{default:e.withCtx((()=>[e.createTextVNode(e.toDisplayString(t.row.roomid),1)])),_:2},1032,["href"])])),_:1})])),_:1},8,["data"])),[[I,h.value]])])),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-3d7ec9d9"]]),ot=e.defineComponent({__name:"OtherTasks",setup(t){const o=Je(),i=o.moduleConfig.DailyTasks.OtherTasks,n=o.moduleStatus.DailyTasks.OtherTasks;return(t,o)=>{const a=e.resolveComponent("el-switch"),s=e.resolveComponent("Info"),r=e.resolveComponent("TaskStatus"),l=e.resolveComponent("el-space"),c=e.resolveComponent("el-row"),d=e.resolveComponent("el-text"),u=e.resolveComponent("el-option"),m=e.resolveComponent("el-select"),h=e.resolveComponent("el-divider");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).groupSign.enabled,"onUpdate:modelValue":o[0]||(o[0]=t=>e.unref(i).groupSign.enabled=t),"active-text":"应援团签到"},null,8,["modelValue"]),e.createVNode(s,{item:e.unref(Qe).DailyTasks.OtherTasks.groupSign},null,8,["item"]),e.createVNode(r,{status:e.unref(n).groupSign},null,8,["status"])])),_:1})])),_:1}),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).silverToCoin.enabled,"onUpdate:modelValue":o[1]||(o[1]=t=>e.unref(i).silverToCoin.enabled=t),"active-text":"银瓜子换硬币"},null,8,["modelValue"]),e.createVNode(s,{item:e.unref(Qe).DailyTasks.OtherTasks.silverToCoin},null,8,["item"]),e.createVNode(r,{status:e.unref(n).silverToCoin},null,8,["status"])])),_:1})])),_:1}),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).coinToSilver.enabled,"onUpdate:modelValue":o[2]||(o[2]=t=>e.unref(i).coinToSilver.enabled=t),"active-text":"硬币换银瓜子"},null,8,["modelValue"]),e.createVNode(d,null,{default:e.withCtx((()=>[e.createTextVNode("花费硬币")])),_:1}),e.createVNode(m,{modelValue:e.unref(i).coinToSilver.num,"onUpdate:modelValue":o[3]||(o[3]=t=>e.unref(i).coinToSilver.num=t),placeholder:"Select",style:{width:"64px"}},{default:e.withCtx((()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(50,(t=>e.createVNode(u,{key:t,label:t,value:t},null,8,["label","value"]))),64))])),_:1},8,["modelValue"]),e.createVNode(d,null,{default:e.withCtx((()=>[e.createTextVNode("个")])),_:1}),e.createVNode(s,{item:e.unref(Qe).DailyTasks.OtherTasks.coinToSilver},null,8,["item"]),e.createVNode(r,{status:e.unref(n).coinToSilver},null,8,["status"])])),_:1})])),_:1}),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).getYearVipPrivilege.enabled,"onUpdate:modelValue":o[4]||(o[4]=t=>e.unref(i).getYearVipPrivilege.enabled=t),"active-text":"领取年度大会员权益"},null,8,["modelValue"]),e.createVNode(s,{item:e.unref(Qe).DailyTasks.OtherTasks.getYearVipPrivilege},null,8,["item"]),e.createVNode(r,{status:e.unref(n).getYearVipPrivilege},null,8,["status"])])),_:1})])),_:1}),e.createVNode(h)])}}}),it=e.defineComponent({__name:"EnhanceExperience",setup(t){const o=Je().moduleConfig.EnhanceExperience,i=["原画","蓝光PRO","蓝光","超清PRO","超清","高清"];return(t,n)=>{const a=e.resolveComponent("el-switch"),s=e.resolveComponent("el-option"),r=e.resolveComponent("el-select"),l=e.resolveComponent("Info"),c=e.resolveComponent("el-space"),d=e.resolveComponent("el-row"),u=e.resolveComponent("el-divider");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(d,null,{default:e.withCtx((()=>[e.createVNode(c,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(o).switchLiveStreamQuality.enabled,"onUpdate:modelValue":n[0]||(n[0]=t=>e.unref(o).switchLiveStreamQuality.enabled=t),"active-text":"自动切换画质"},null,8,["modelValue"]),e.createVNode(r,{modelValue:e.unref(o).switchLiveStreamQuality.qualityDesc,"onUpdate:modelValue":n[1]||(n[1]=t=>e.unref(o).switchLiveStreamQuality.qualityDesc=t),placeholder:"Select",style:{width:"110px"}},{default:e.withCtx((()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(i,(t=>e.createVNode(s,{key:t,label:t,value:t},null,8,["label","value"]))),64))])),_:1},8,["modelValue"]),e.createVNode(l,{item:e.unref(Qe).EnhanceExperience.switchLiveStreamQuality},null,8,["item"])])),_:1})])),_:1}),e.createVNode(d,null,{default:e.withCtx((()=>[e.createVNode(c,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(o).banp2p.enabled,"onUpdate:modelValue":n[2]||(n[2]=t=>e.unref(o).banp2p.enabled=t),"active-text":"禁用P2P"},null,8,["modelValue"]),e.createVNode(l,{item:e.unref(Qe).EnhanceExperience.banp2p},null,8,["item"])])),_:1})])),_:1}),e.createVNode(d,null,{default:e.withCtx((()=>[e.createVNode(c,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(o).noReport.enabled,"onUpdate:modelValue":n[3]||(n[3]=t=>e.unref(o).noReport.enabled=t),"active-text":"拦截日志数据上报"},null,8,["modelValue"]),e.createVNode(l,{item:e.unref(Qe).EnhanceExperience.noReport},null,8,["item"])])),_:1})])),_:1}),e.createVNode(d,null,{default:e.withCtx((()=>[e.createVNode(c,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(o).noSleep.enabled,"onUpdate:modelValue":n[4]||(n[4]=t=>e.unref(o).noSleep.enabled=t),"active-text":"屏蔽挂机检测"},null,8,["modelValue"]),e.createVNode(l,{item:e.unref(Qe).EnhanceExperience.noSleep},null,8,["item"])])),_:1})])),_:1}),e.createVNode(d,null,{default:e.withCtx((()=>[e.createVNode(c,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(o).invisibility.enabled,"onUpdate:modelValue":n[5]||(n[5]=t=>e.unref(o).invisibility.enabled=t),"active-text":"隐身入场"},null,8,["modelValue"]),e.createVNode(l,{item:e.unref(Qe).EnhanceExperience.invisibility},null,8,["item"])])),_:1})])),_:1}),e.createVNode(d,null,{default:e.withCtx((()=>[e.createVNode(c,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(o).showContributionUserNum.enabled,"onUpdate:modelValue":n[6]||(n[6]=t=>e.unref(o).showContributionUserNum.enabled=t),"active-text":"显示高能用户数量"},null,8,["modelValue"]),e.createVNode(l,{item:e.unref(Qe).EnhanceExperience.showContributionUserNum},null,8,["item"])])),_:1})])),_:1}),e.createVNode(u)])}}}),nt=e.defineComponent({__name:"RemoveElement",setup(t){const o=Je().moduleConfig.RemoveElement;return(t,i)=>{const n=e.resolveComponent("el-switch"),a=e.resolveComponent("Info"),s=e.resolveComponent("el-space"),r=e.resolveComponent("el-row"),l=e.resolveComponent("el-divider");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removePKBox.enabled,"onUpdate:modelValue":i[0]||(i[0]=t=>e.unref(o).removePKBox.enabled=t),"active-text":"移除大乱斗元素"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removePKBox"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeLiveWaterMark.enabled,"onUpdate:modelValue":i[1]||(i[1]=t=>e.unref(o).removeLiveWaterMark.enabled=t),"active-text":"移除直播间水印"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeLiveWaterMark"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeShopPopover.enabled,"onUpdate:modelValue":i[2]||(i[2]=t=>e.unref(o).removeShopPopover.enabled=t),"active-text":"移除直播间小黄车弹窗"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeShopPopover"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeGameParty.enabled,"onUpdate:modelValue":i[3]||(i[3]=t=>e.unref(o).removeGameParty.enabled=t),"active-text":"移除直播间幻星派对标志"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeGameParty"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeGiftPopover.enabled,"onUpdate:modelValue":i[4]||(i[4]=t=>e.unref(o).removeGiftPopover.enabled=t),"active-text":"移除礼物赠送提示弹窗"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeGiftPopover"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeMicPopover.enabled,"onUpdate:modelValue":i[5]||(i[5]=t=>e.unref(o).removeMicPopover.enabled=t),"active-text":"移除连麦状态提示"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeMicPopover"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeComboCard.enabled,"onUpdate:modelValue":i[6]||(i[6]=t=>e.unref(o).removeComboCard.enabled=t),"active-text":"移除直播间相同弹幕连续提示"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeComboCard"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeRank.enabled,"onUpdate:modelValue":i[7]||(i[7]=t=>e.unref(o).removeRank.enabled=t),"active-text":"移除排行榜"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeRank"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeGiftPlanet.enabled,"onUpdate:modelValue":i[8]||(i[8]=t=>e.unref(o).removeGiftPlanet.enabled=t),"active-text":"移除礼物星球"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeGiftPlanet"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeActivityBanner.enabled,"onUpdate:modelValue":i[9]||(i[9]=t=>e.unref(o).removeActivityBanner.enabled=t),"active-text":"移除活动入口"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeActivityBanner"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removePKBanner.enabled,"onUpdate:modelValue":i[10]||(i[10]=t=>e.unref(o).removePKBanner.enabled=t),"active-text":"移除大乱斗入口"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removePKBanner"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeFlipView.enabled,"onUpdate:modelValue":i[11]||(i[11]=t=>e.unref(o).removeFlipView.enabled=t),"active-text":"移除礼物栏下方广告"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeFlipView"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeRecommendRoom.enabled,"onUpdate:modelValue":i[12]||(i[12]=t=>e.unref(o).removeRecommendRoom.enabled=t),"active-text":"移除礼物栏下方推荐直播间"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeRecommendRoom"})])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:""},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(o).removeLiveMosaic.enabled,"onUpdate:modelValue":i[13]||(i[13]=t=>e.unref(o).removeLiveMosaic.enabled=t),"active-text":"移除直播间马赛克"},null,8,["modelValue"]),e.createVNode(a,{id:"RemoveElement.removeLiveMosaic"})])),_:1})])),_:1}),e.createVNode(l)])}}}),at=e.defineComponent({components:{MainSiteTasks:Ye,LiveTasks:tt,OtherTasks:ot,EnhanceExperience:it,RemoveElement:nt}}),st=e.defineComponent({...at,__name:"PanelMain",setup(t){const o=_();return(t,i)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o).uiConfig.activeMenuIndex)))}}),rt=k(e.defineComponent({__name:"App",setup(t){const i=_(),n=new H("App.vue");let a,s,l=i.uiConfig.isShowPanel;function c(){const e=a.getBoundingClientRect();i.baseStyleValue.top=e.top+window.scrollY,i.baseStyleValue.left=e.left+window.scrollX,i.baseStyleValue.height=e.height,i.baseStyleValue.width=.4*e.width}i.uiConfig.isShowPanel=!1;const d=o.throttle((function(){i.changeShowPanel(),s.innerText=i.isShowPanelButtonText}),300);if(a=X("#live-player-ctnr"),a){c(),Q(X("#player-ctnr"),".left-ctnr.left-header-area",1e4).then((e=>{var t,o;s=J("button"),s.setAttribute("class","blth_btn"),s.onclick=d,s.innerText=i.isShowPanelButtonText,e.append(s),Y()||r("alt+b",{element:null==(o=null==(t=v.top)?void 0:t.document)?void 0:o.documentElement},d),r("alt+b",d)})).catch((e=>n.error(e))),window.addEventListener("resize",(()=>c()));const e=new MutationObserver((()=>c()));e.observe(document.documentElement,{attributes:!0}),e.observe(document.body,{attributes:!0}),l&&(i.uiConfig.isShowPanel=!0)}else n.error("livePlayer not found");return(t,o)=>{const n=e.resolveComponent("el-header"),a=e.resolveComponent("el-aside"),s=e.resolveComponent("el-main"),r=e.resolveComponent("el-container"),l=e.resolveComponent("el-scrollbar"),c=e.resolveComponent("el-collapse-transition");return e.openBlock(),e.createBlock(c,null,{default:e.withCtx((()=>[e.withDirectives(e.createVNode(r,{style:e.normalizeStyle(e.unref(i).baseStyle),class:"base"},{default:e.withCtx((()=>[e.createVNode(n,{class:"header"},{default:e.withCtx((()=>[e.createVNode(C)])),_:1}),e.createVNode(l,{height:e.unref(i).scrollBarHeight},{default:e.withCtx((()=>[e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(a,{class:"aside"},{default:e.withCtx((()=>[e.createVNode(V)])),_:1}),e.createVNode(s,{class:"main"},{default:e.withCtx((()=>[(e.openBlock(),e.createBlock(e.KeepAlive,null,[e.createVNode(e.Transition,{name:"fade",mode:"out-in"},{default:e.withCtx((()=>[e.createVNode(st)])),_:1})],1024))])),_:1})])),_:1})])),_:1},8,["height"])])),_:1},8,["style"]),[[e.vShow,e.unref(i).uiConfig.isShowPanel]])])),_:1})}}}),[["__scopeId","data-v-3884f5fc"]]);(e=>{const t=GM_getResourceText(e);GM_addStyle(t)})("element-plus/dist/index.css");const lt={},ct={xmlns:"http://www.w3.org/2000/svg",width:"128",height:"128",class:"icon",viewBox:"0 0 1024 1024"},dt=[e.createElementVNode("path",{d:"M831.825 63.94H191.94c-70.692 0-128 57.308-128 128v639.885c0 70.692 57.308 128 128 128h639.885c70.692 0 128-57.308 128-128V191.94c0-70.692-57.308-128-128-128zM895.885 832a63.835 63.835 0 0 1-63.973 63.886H192.088c-17.112 0-33.27-6.575-45.372-18.676S127.88 849.112 127.88 832V192a64.236 64.236 0 0 1 64.208-64.12h639.824A64.038 64.038 0 0 1 895.885 192v640z"},null,-1),e.createElementVNode("path",{d:"M791.998 351.852H536a31.97 31.97 0 0 0 0 63.94h256a31.97 31.97 0 0 0 0-63.94zm0 256.121H536a31.97 31.97 0 0 0 0 63.94h256a31.97 31.97 0 0 0 0-63.94zm-447.996-79.975c-61.856 0-111.986 50.144-111.986 111.985S282.16 751.97 344.002 751.97s111.985-50.144 111.985-111.986-50.13-111.985-111.985-111.985zm33.982 145.982a48.045 48.045 0 1 1 14.088-33.982 47.746 47.746 0 0 1-14.088 33.986zm39.412-376.586L311.999 402.787l-41.391-41.395a31.97 31.97 0 1 0-45.213 45.213l63.997 64.002a31.97 31.97 0 0 0 45.214 0l128-128a31.97 31.97 0 0 0-45.21-45.213z"},null,-1)];const ut=k(lt,[["render",function(t,o){return e.openBlock(),e.createElementBlock("svg",ct,dt)}]]),mt=(t=>(e.pushScopeId("data-v-38289ed3"),t=t(),e.popScopeId(),t))((()=>e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"128",height:"128",class:"icon",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"#276BC0",d:"M512.67 959.47c-246.343 0-446.76-200.632-446.76-447.24S266.326 64.98 512.67 64.98s446.76 200.642 446.76 447.25-200.416 447.24-446.76 447.24zm0-829.04c-210.291 0-381.38 171.283-381.38 381.8s171.089 381.79 381.38 381.79 381.381-171.273 381.381-381.79-171.09-381.8-381.38-381.8z"}),e.createElementVNode("path",{fill:"#276BC0",d:"M447.29 317.172a63.891 63.959 0 1 0 130.76 0 63.891 63.959 0 1 0-130.76 0Zm64.907 503.047c-30.093 0-54.235-24.416-54.235-54.541V482.062c0-30.126 24.142-54.541 54.235-54.541 30.094 0 54.236 24.416 54.236 54.541v283.616c0 30.125-24.142 54.54-54.236 54.54z"})],-1))),ht=k(e.defineComponent({__name:"InfoIcon",props:{item:{}},setup(t){const o=t,i=()=>{const{title:e,message:t}=o.item;s.ElMessageBox({title:e,message:t,lockScroll:!1,autofocus:!0,confirmButtonText:"OK"}).catch((()=>{}))};return(t,o)=>{const n=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(n,{class:"info-icon",onClick:i},{default:e.withCtx((()=>[mt])),_:1})}}}),[["__scopeId","data-v-38289ed3"]]),gt=k(e.defineComponent({__name:"TaskStatusIcon",props:{status:{}},setup:t=>(t,o)=>{const i=e.resolveComponent("Loading"),n=e.resolveComponent("el-icon"),a=e.resolveComponent("Select"),s=e.resolveComponent("CloseBold");return"running"===t.status?(e.openBlock(),e.createBlock(n,{key:0,class:"status-icon is-loading"},{default:e.withCtx((()=>[e.createVNode(i)])),_:1})):"done"===t.status?(e.openBlock(),e.createBlock(n,{key:1,class:"status-icon",style:{color:"#1ab059"}},{default:e.withCtx((()=>[e.createVNode(a)])),_:1})):"error"===t.status?(e.openBlock(),e.createBlock(n,{key:2,class:"status-icon",style:{color:"#ff6464"}},{default:e.withCtx((()=>[e.createVNode(s)])),_:1})):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-b4254e0f"]]),pt=Object.freeze(Object.defineProperty({__proto__:null,Info:ht,TaskStatus:gt,Tasks:ut},Symbol.toStringTag,{value:"Module"})),ft=new H("Main");ft.log("document.readyState",document.readyState);const vt=t.createPinia(),wt=Ke(vt),yt=Je(vt);if(wt.checkCurrentScriptType(),ft.log("当前脚本的类型为",wt.currentScriptType),"Main"===wt.currentScriptType&&wt.startMainBLTHAliveHeartBeat(),yt.loadModules("unknown"),await R("document-body"),document.head.innerHTML.includes("BilibiliLive")){const t=e.createApp(rt);t.use(s),t.use(vt);for(const[e,o]of Object.entries(c))t.component(e,o);for(const[e,o]of Object.entries(pt))t.component(e,o);yt.loadModules("yes"),await R("document-end");const o=J("div");o.id="BLTH",document.body.append(o),t.mount(o)}}(Vue,Pinia,_,ElementPlusIconsVue,luxon,CryptoJS,ElementPlus,hotkeys); \ No newline at end of file +(e=>{if("function"==typeof GM_addStyle)return void GM_addStyle(e);const t=document.createElement("style");t.textContent=e,document.head.append(t)})(" .title[data-v-f383a843]{padding-left:20px;align-items:baseline;display:flex}.header-big-text[data-v-f383a843]{font-size:var(--big-text-size);align-self:unset}.header-small-text[data-v-f383a843]{font-size:var(--small-text-size);align-self:unset;margin-left:10px;--small-text-size: 18px}.collapse-btn[data-v-f383a843]{display:flex;justify-content:center;align-items:center;height:100%;float:left;cursor:pointer}#aside-el-menu[data-v-42ddcb25]{height:100%}.avatar-wrap[data-v-cccdc865]{width:80px;height:80px}.avatar[data-v-cccdc865]{display:flex;justify-content:center;align-items:center;border-radius:50%}.radio-group[data-v-cccdc865]{display:block;font-size:inherit}.label-text[data-v-1cb0d081]{color:var(--el-text-color-primary);line-height:32px}.base[data-v-24895187]{z-index:1003;position:absolute;background-color:#fff;border-bottom:1px solid #e3e5e7;border-left:1px solid #e3e5e7;border-right:1px solid #e3e5e7}.header[data-v-24895187]{position:relative;box-sizing:border-box;width:100%;font-size:var(--big-text-size);align-items:center;display:flex;border-bottom:1px solid #e3e5e7;height:60px;--big-text-size: 25px}.aside[data-v-24895187]{width:auto}.aside #aside-el-menu[data-v-24895187]:not(.el-menu--collapse){width:150px}.main[data-v-24895187]{--main-top-botton-padding: calc(var(--el-main-padding) * .625);padding-top:var(--main-top-botton-padding);padding-bottom:var(--main-top-botton-padding)}.fade-enter-active[data-v-24895187]{animation:fade-in linear .2s}.info-icon[data-v-38289ed3]{font-size:var(--el-font-size-base);cursor:pointer}.status-icon[data-v-b4254e0f]{font-size:var(--el-font-size-base)}.blth_btn{background-color:#23ade5;font-size:small;margin-inline-start:5px;color:#fff;border-radius:4px;border:none;padding:5px;cursor:pointer;box-shadow:0 0 2px #00000075;line-height:10px;margin-left:15px}.blth_btn:hover{background-color:#1097cc}.blth_btn:hover:active{background-color:#0e86b6;position:relative;top:1px}.el-message-box li{list-style:initial}@media screen and (min-width: 1930px){html[lab-style*=adaptive] .base{zoom:.9375}}@media screen and (min-width: 2058px){html[lab-style*=adaptive] .base{zoom:.75}}@media screen and (min-width: 2570px){html[lab-style*=adaptive] .base{zoom:calc(2 / 3)}}@media screen and (min-width: 3210px){html[lab-style*=adaptive] .base{zoom:.5}}@media screen and (min-width: 3850px){html[lab-style*=adaptive] .base{zoom:.46875}} "),async function(e,t,i,o,n,a,s,r){"use strict";function l(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const i in e)if("default"!==i){const o=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:()=>e[i]})}return t.default=e,Object.freeze(t)}const c=l(o);var d=Object.defineProperty,u=(e,t,i)=>((e,t,i)=>t in e?d(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i)(e,"symbol"!=typeof t?t+"":t,i),m=(()=>"undefined"!=typeof GM_addStyle?GM_addStyle:void 0)(),h=(()=>"undefined"!=typeof GM_getValue?GM_getValue:void 0)(),g=(()=>"undefined"!=typeof GM_setValue?GM_setValue:void 0)(),p=(()=>"undefined"!=typeof GM_xmlhttpRequest?GM_xmlhttpRequest:void 0)(),f=(()=>"undefined"!=typeof unsafeWindow?unsafeWindow:void 0)();const v={ui:{isCollapse:!1,isShowPanel:!0,activeMenuIndex:"MainSiteTasks",panelWidthPercent:40},modules:{DailyTasks:{MainSiteTasks:{login:{enabled:!1,_lastCompleteTime:0},watch:{enabled:!1,_lastCompleteTime:0},coin:{enabled:!1,num:1,_lastCompleteTime:0},share:{enabled:!1,_lastCompleteTime:0}},LiveTasks:{sign:{enabled:!1,_lastCompleteTime:0},medalTasks:{light:{enabled:!1,mode:"danmu",danmuList:["(⌒▽⌒)","( ̄▽ ̄)","(=・ω・=)","(`・ω・´)","(〜 ̄△ ̄)〜","(・∀・)","(°∀°)ノ","╮( ̄▽ ̄)╭","_(:3」∠)_","(^・ω・^ )","(● ̄(エ) ̄●)","ε=ε=(ノ≧∇≦)ノ","⁄(⁄ ⁄•⁄ω⁄•⁄ ⁄)⁄","←◡←","(●'◡'●)ノ♥"],_lastCompleteTime:0},watch:{enabled:!1,time:25,_watchingProgress:{},_lastWatchTime:0,_lastCompleteTime:0},isWhiteList:!1,roomidList:[]}},OtherTasks:{groupSign:{enabled:!1,_lastCompleteTime:0},silverToCoin:{enabled:!1,_lastCompleteTime:0},coinToSilver:{enabled:!1,num:1,_lastCompleteTime:0},getYearVipPrivilege:{enabled:!1,_nextReceiveTime:0}}},EnhanceExperience:{switchLiveStreamQuality:{enabled:!1,qualityDesc:"原画"},banp2p:{enabled:!1},noReport:{enabled:!1},noSleep:{enabled:!1},invisibility:{enabled:!1}},RemoveElement:{removePKBox:{enabled:!1},removeLiveWaterMark:{enabled:!1},removeShopPopover:{enabled:!1},removeGameParty:{enabled:!1},removeGiftPopover:{enabled:!1},removeMicPopover:{enabled:!1},removeComboCard:{enabled:!1},removeRank:{enabled:!1},removeGiftPlanet:{enabled:!1},removeActivityBanner:{enabled:!1},removePKBanner:{enabled:!1},removeFlipView:{enabled:!1},removeRecommendRoom:{enabled:!1},removeLiveMosaic:{enabled:!1}}},cache:{lastAliveHeartBeatTime:0}};class w{static mergeConfigs(e,t){const o=i.pick(e,i.keys(t));return i.defaults(o,t),i.forOwn(o,((e,o,n)=>{i.isPlainObject(e)&&i.isPlainObject(t[o])&&!i.isEmpty(t[o])&&(n[o]=this.mergeConfigs(e,t[o]))})),o}static setUiConfig(e){g("ui",e)}static getUiConfig(){return this.mergeConfigs(h("ui",{}),v.ui)}static setModuleConfig(e){g("modules",e)}static getModuleConfig(){return this.mergeConfigs(h("modules",{}),v.modules)}static setCache(e){g("cache",e)}static getCache(){return this.mergeConfigs(h("cache",{}),v.cache)}}const _={MainSiteTasks:"主站任务",LiveTasks:"直播任务",OtherTasks:"其它任务",EnhanceExperience:"体验优化",RemoveElement:"移除元素",ScriptSettings:"设置"},y=t.defineStore("ui",(()=>{const t=e.reactive(w.getUiConfig()),o=e.computed((()=>_[t.activeMenuIndex])),n=e.reactive({top:0,left:0,height:0,width:0}),a=e.reactive({x:0,y:0}),s=e.computed((()=>({top:`${n.top+a.y}px`,left:`${n.left+a.x}px`,height:`${n.height}px`,width:n.width*t.panelWidthPercent/100+"px"}))),r=e.computed((()=>t.isShowPanel?"隐藏控制面板":"显示控制面板")),l=e.computed((()=>n.height-60+"px"));return e.watch(t,i.debounce((e=>w.setUiConfig(e)),350)),{isShowPanelButtonText:r,activeMenuName:o,livePlayerRect:n,windowScrollPosition:a,panelStyle:s,scrollBarHeight:l,uiConfig:t,changeCollapse:function(){t.isCollapse=!t.isCollapse},changeShowPanel:function(){t.isShowPanel=!t.isShowPanel},setActiveMenuIndex:function(e){t.activeMenuIndex=e}}})),x={class:"title"},b=(e,t)=>{const i=e.__vccOpts||e;for(const[e,o]of t)i[e]=o;return i},k=b(e.defineComponent({__name:"PanelHeader",setup(t){const i=y();return(t,n)=>{const a=e.resolveComponent("el-icon"),s=e.resolveComponent("el-text");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"collapse-btn",onClick:n[0]||(n[0]=(...t)=>e.unref(i).changeCollapse&&e.unref(i).changeCollapse(...t))},[e.unref(i).uiConfig.isCollapse?(e.openBlock(),e.createBlock(a,{key:0},{default:e.withCtx((()=>[e.createVNode(e.unref(o.Expand))])),_:1})):(e.openBlock(),e.createBlock(a,{key:1},{default:e.withCtx((()=>[e.createVNode(e.unref(o.Fold))])),_:1}))]),e.createElementVNode("div",x,[e.createVNode(s,{tag:"b",class:"header-big-text"},{default:e.withCtx((()=>[e.createTextVNode("控制面板")])),_:1}),e.createVNode(s,{class:"header-small-text"},{default:e.withCtx((()=>[e.createTextVNode(e.toDisplayString(e.unref(i).activeMenuName),1)])),_:1})])],64)}}}),[["__scopeId","data-v-f383a843"]]),C=b(e.defineComponent({__name:"PanelAside",setup(t){const i=y(),o=[{icon:"Tasks",title:"每日任务",index:"DailyTasks",subs:[{title:"主站任务",index:"MainSiteTasks"},{title:"直播任务",index:"LiveTasks"},{title:"其它任务",index:"OtherTasks"}]},{icon:"Monitor",title:"体验优化",index:"EnhanceExperience"},{icon:"Scissor",title:"移除元素",index:"RemoveElement"},{icon:"Setting",title:"设置",index:"ScriptSettings"}];return(t,n)=>{const a=e.resolveComponent("el-icon"),s=e.resolveComponent("el-menu-item"),r=e.resolveComponent("el-sub-menu"),l=e.resolveComponent("el-menu");return e.openBlock(),e.createBlock(l,{"default-active":e.unref(i).uiConfig.activeMenuIndex,style:e.normalizeStyle({"min-height":e.unref(i).scrollBarHeight}),collapse:e.unref(i).uiConfig.isCollapse,"unique-opened":"",onSelect:e.unref(i).setActiveMenuIndex,id:"aside-el-menu"},{default:e.withCtx((()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(t=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.subs?(e.openBlock(),e.createBlock(r,{index:t.index,key:t.index},{title:e.withCtx((()=>[e.createVNode(a,null,{default:e.withCtx((()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon)))])),_:2},1024),e.createElementVNode("span",null,e.toDisplayString(t.title),1)])),default:e.withCtx((()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.subs,(t=>(e.openBlock(),e.createBlock(s,{index:t.index,key:t.index},{default:e.withCtx((()=>[e.createTextVNode(e.toDisplayString(t.title),1)])),_:2},1032,["index"])))),128))])),_:2},1032,["index"])):(e.openBlock(),e.createBlock(s,{index:t.index,key:t.index},{title:e.withCtx((()=>[e.createTextVNode(e.toDisplayString(t.title),1)])),default:e.withCtx((()=>[e.createVNode(a,null,{default:e.withCtx((()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon)))])),_:2},1024)])),_:2},1032,["index"]))],64)))),64))])),_:1},8,["default-active","style","collapse","onSelect"])}}}),[["__scopeId","data-v-42ddcb25"]]);function T(e,t=0,i=5){const o=a.DateTime.fromMillis(e),n=a.DateTime.now().set({hour:t,minute:i,second:0,millisecond:0}),s=n.plus({days:1}),r=n.minus({days:1});return a.DateTime.now()>=n?o>=n&&o=r&&oo&&(o=o.plus({days:1}));const n=o.diff(i);return{ms:n.toMillis(),str:n.toFormat("h小时m分钟s秒").replace(/^0小时/,"").replace(/^0分钟/,"")}}function S(e,t,i,o){const n=a.DateTime.now(),s=a.DateTime.local(n.year,n.month,n.day,e,t),r=a.DateTime.local(n.year,n.month,n.day,i,o);return n>=s&&nsetTimeout(t,e)))}function M(e){return e.substring(e.lastIndexOf("/")+1).split(".")[0]}function B(e,t){return t?"string"==typeof t?e+"?"+t:e+"?"+new URLSearchParams(t).toString():e}function D(e){e.wts=N();const t=Object.keys(e).sort().map((t=>{const i=e[t].toString().replace(/[!'()*]/g,"");return`${encodeURIComponent(t)}=${encodeURIComponent(i)}`})).join("&");return t+"&w_rid="+n.MD5(t+O().wbiSalt).toString()}function I(e,t,o){i.forOwn(e,(function(e,n){const a=o?o+"."+n:n;i.isPlainObject(e)&&!i.isEmpty(e)?I(e,t,a):t(e,a)}))}function L(e){switch(e){case"document-start":return Promise.resolve();case"document-head":return new Promise((e=>{if(document.head)e();else{const t=new MutationObserver((()=>{document.head&&(t.disconnect(),e())}));t.observe(document.documentElement,{childList:!0})}}));case"document-body":return new Promise((e=>{if(document.body)e();else{const t=new MutationObserver((()=>{document.body&&(t.disconnect(),e())}));t.observe(document.documentElement,{childList:!0})}}));case"document-end":return new Promise((e=>{"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",(()=>e()))}));case"window-load":return new Promise((e=>{"complete"===document.readyState?e():window.addEventListener("load",(()=>e()))}));default:return Promise.reject("Illegal moment")}}a.Settings.defaultZone="Asia/Shanghai";const O=t.defineStore("bili",(()=>{const t=e.ref(),i=e.ref(),o=e.ref(),n=e.ref(),a=e.ref(),s=e.ref(),r=e.ref(),l=e.computed((()=>{var e;return(null==(e=r.value)?void 0:e.filter((e=>0!==e.room_info.room_id)))??[]})),c=e.computed((()=>{if(!o.value)return"";const e=M(o.value.wbi_img.img_url)+M(o.value.wbi_img.sub_url);return[46,47,18,2,53,8,23,32,15,50,10,31,58,3,45,35,27,43,5,49,33,9,42,19,29,28,14,39,12,38,41,13,37,48,7,16,24,55,40,61,26,17,0,1,60,51,30,4,22,25,54,21,56,59,6,63,57,62,11,36,20,34,44,52].map((t=>e[t])).join("").slice(0,32)}));return{BilibiliLive:t,userInfo:o,giftConfig:n,cookies:i,dailyRewardInfo:a,dynamicVideos:s,fansMedals:r,filteredFansMedals:l,wbiSalt:c}}));let A=class{constructor(e,t){u(this,"url_prefix"),u(this,"origin"),this.url_prefix=e??"",this.origin=t??"https://bilibili.com"}get(e,t,o){return e=B(this.url_prefix+e,t),new Promise(((t,n)=>{const a={method:"GET",url:e,responseType:"json",headers:{Accept:"application/json, text/plain, */*",Referer:this.origin,Origin:this.origin,"Sec-Fetch-Site":"same-site"},onload:function(e){t(e.response)},onerror:function(e){n(e)}},s=i.defaultsDeep(o,a);p(s)}))}post(e,t,o){const n={Accept:"application/json, text/plain, */*",Referer:this.origin,Origin:this.origin,"Sec-Fetch-Site":"same-site","Content-Type":"application/x-www-form-urlencoded"};return t instanceof FormData?delete n["Content-Type"]:"object"==typeof t&&(t=new URLSearchParams(t).toString()),e=B(this.url_prefix+e,null==o?void 0:o.params),null==o||delete o.params,new Promise(((a,s)=>{const r={method:"POST",url:e,data:t,responseType:"json",headers:n,onload:function(e){a(e.response)},onerror:function(e){s(e)}},l=i.defaultsDeep(o,r);p(l)}))}};const $={live:new A("https://api.live.bilibili.com","https://live.bilibili.com"),liveTrace:new A("https://live-trace.bilibili.com","https://live.bilibili.com"),passport:new A("https://passport.bilibili.com","https://passport.bilibili.com/"),main:new A("https://api.bilibili.com","https://www.bilibili.com"),vc:new A("https://api.vc.bilibili.com","https://message.bilibili.com/"),raw:new A},j={roomGiftConfig:(e=0,t=0,i=0,o="pc")=>$.live.get("/xlive/web-room/v1/giftPanel/roomGiftConfig",{platform:o,room_id:e,area_parent_id:t,area_id:i}),doSign:()=>$.live.get("/xlive/web-ucenter/v1/sign/DoSign"),getSignInfo:()=>$.live.get("/xlive/web-ucenter/v1/sign/WebGetSignInfo"),fansMedalPanel:(e,t=10)=>$.live.get("/xlive/app-ucenter/v1/fansMedal/panel",{page:e,page_size:t}),sendMsg:(e,t,o=0,n=1,a=0,s=25,r=16777215,l=0,c=0,d=0,u="",m='{"appId":100,"platform":5}')=>{const h=O().cookies.bili_jct;return $.live.post("/msg/send",function(e){const t=new FormData;return i.forEach(e,((e,i)=>t.append(i,e.toString()))),t}({bubble:l,msg:e,color:r,mode:n,room_type:o,jumpfrom:a,reply_mid:c,reply_attr:d,replay_dmid:u,statistics:m,fontsize:s,rnd:N(),roomid:t,csrf:h,csrf_token:h}))},likeReport:(e,t,i=1,o="")=>{const n=O(),a=n.cookies.bili_jct,s=n.BilibiliLive.UID;return $.live.post("/xlive/app-ucenter/v1/like_info_v3/like/likeReportV3",{click_time:i,room_id:e,uid:s,anchor_id:t,csrf_token:a,csrf:a,visit_id:o})},getInfoByRoom:(e,t="444.8")=>$.live.get("/xlive/web-room/v1/index/getInfoByRoom",D({room_id:e,web_location:t})),getUserTaskProgress:(e=11153765)=>{const t=O().cookies.bili_jct;return $.live.get("/xlive/app-ucenter/v1/userTask/GetUserTaskProgress",{target_id:e,csrf:t,ts:N()})},userTaskReceiveRewards:(e=11153765)=>{const t=O().cookies.bili_jct;return $.live.post("/xlive/app-ucenter/v1/userTask/UserTaskReceiveRewards",{actionKey:"csrf",target_id:e,csrf:t,ts:N()})},silver2coin:(e="")=>{const t=O().cookies.bili_jct;return $.live.post("/xlive/revenue/v1/wallet/silver2coin",{csrf:t,csrf_token:t,visit_id:e})},coin2silver:(e,t="pc",i="")=>{const o=O().cookies.bili_jct;return $.live.post("/xlive/revenue/v1/wallet/coin2silver",{num:e,csrf:o,csrf_token:o,platform:t,visit_id:i})},wearMedal:(e,t="")=>{const i=O().cookies.bili_jct;return $.live.post("/xlive/web-room/v1/fansMedal/wear",{medal_id:e,csrf_token:i,csrf:i,visit_id:t})}},z={E:(e,t,i,o=0,n=[],a="")=>{const s=O().cookies.bili_jct;return $.liveTrace.post("/xlive/data-interface/v1/x25Kn/E",{id:JSON.stringify(e),device:JSON.stringify(t),ruid:i,ts:P(),is_patch:o,heart_beat:JSON.stringify(n),ua:navigator.userAgent,csrf_token:s,csrf:s,visit_id:a})},X:(e,t,i,o,n,a,s,r,l="")=>{const c=O().cookies.bili_jct;return $.liveTrace.post("/xlive/data-interface/v1/x25Kn/X",{s:e,id:JSON.stringify(t),device:JSON.stringify(i),ruid:o,ets:n,benchmark:a,time:s,ts:r,ua:navigator.userAgent,csrf_token:c,csrf:c,visit_id:l})}},U={nav:()=>$.main.get("/x/web-interface/nav"),reward:()=>$.main.get("/x/member/web/exp/reward"),dynamicAll:(e="video",t=1,i=-480,o="web",n="itemOpusStyle,listOnlyfans,opusBigCover,onlyfansVote,decorationCard,onlyfansAssetsV2,forwardListHidden,ugcDelete",a="333.1365",s='{"platform":"web","device":"pc"}',r='{"spm_id":"333.1365"}')=>$.main.get("/x/polymer/web-dynamic/v1/feed/all",{timezone_offset:i,type:e,platform:o,page:t,features:n,web_location:a,x_bili_device_req_json:s,x_bili_web_req_json:r},{Origin:"https://t.bilibili.com",Referer:"https://t.bilibili.com/"}),videoHeartbeat:(e,t=1e9,i=3,o=0,n=2,a=1,s=61,r=62,l=62,c="https://t.bilibili.com/?tab=video",d=64,u=180,m=62,h=62,g=0,p="333.788.0.0",f="333.1365.list.card_archive.click",v=E().replaceAll("-",""),w='{"player_version":"4.8.43"}',_=1315873)=>{const y=O(),x=N(),b=O().userInfo.mid;return $.main.post("/x/click-interface/web/heartbeat",{start_ts:x,mid:b,aid:e,cid:t,type:i,sub_type:o,dt:n,play_type:a,realtime:s,played_time:r,real_played_time:l,refer_url:c,quality:d,video_duration:u,last_play_progress_time:m,max_play_progress_time:h,outer:g,spmid:p,from_spmid:f,session:v,extra:w,csrf:y.cookies.bili_jct},{params:D({w_start_ts:x,w_mid:b,w_aid:e,w_dt:n,w_realtime:s,w_played_time:r,w_real_played_time:l,w_video_duration:u,w_last_play_progress_time:m,web_location:_})})},share:(e,t="pc_client_normal",i=2,o=0,n=1)=>{const a=O().cookies.bili_jct;return $.main.post("/x/web-interface/share/add",{aid:e,eab_x:i,ramval:o,source:t,ga:n,csrf:a})},coinAdd:(e,t,i=0,o=!0,n=2,a=6,s="web_normal",r=1)=>{const l=O().cookies.bili_jct;return $.main.post("/x/web-interface/coin/add ",{aid:e,multiply:t,select_like:i,cross_domain:o,eab_x:n,ramval:a,source:s,ga:r,csrf:l})},videoRelation:(e,t="")=>$.main.get("/x/web-interface/archive/relation",{aid:e,bvid:t}),vip:{myPrivilege:(e="333.33")=>$.main.get("/x/vip/privilege/my",{web_location:e},{headers:{Referer:"https://account.bilibili.com/account/big/myPackage",Origin:"https://account.bilibili.com"}}),receivePrivilege:(e,t="web")=>{const i=O().cookies.bili_jct;return $.main.post("/x/vip/privilege/receive",{type:e,platform:t,csrf:i},{headers:{Referer:"https://account.bilibili.com/account/big/myPackage",Origin:"https://account.bilibili.com"}})},addExperience:()=>{const e=O(),t=e.BilibiliLive.UID,i=e.cookies.buvid3,o=e.cookies.bili_jct;return $.main.post("/x/vip/experience/add",{mid:t,buvid:i,csrf:o},{headers:{Referer:"https://account.bilibili.com/big",Origin:"https://account.bilibili.com"}})}}},H={myGroups:(e=0,t="web")=>$.vc.get("/link_group/v1/member/my_groups",{build:e,mobi_app:t}),signIn:(e,t)=>$.vc.get("/link_setting/v1/link_setting/sign_in",{group_id:e,owner_id:t})};class F{constructor(e){u(this,"NAME","BLTH"),u(this,"prefix_title_str"),u(this,"title"),this.title=e,this.prefix_title_str=e.split("_").join("][")}get prefix(){return[`%c${this.NAME}%c[${(new Date).toLocaleString()}]%c[${this.prefix_title_str}]%c:`,"font-weight: bold; color: white; background-color: #23ade5; padding: 1px 4px; border-radius: 4px;","font-weight: bold; color: #0920e6;","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 G{constructor(e){u(this,"moduleName"),u(this,"logger"),u(this,"moduleStore",Je()),u(this,"config"),this.moduleName=e,this.logger=new F(this.moduleName)}set status(e){throw new Error("Method not implemented.")}run(){throw new Error("Method not implemented.")}}u(G,"runOnMultiplePages",!1),u(G,"runAt","document-body"),u(G,"onFrame","target"),u(G,"runAfterDefault",!0);class q{static getAll(){if(""===document.cookie)return{};const e=document.cookie.split("; "),t={};for(const i of e){const[e,o]=i.split("=",2);t[decodeURIComponent(e)]=decodeURIComponent(o)}return t}static get(e,t){const i=this.getAll();if(Array.isArray(e)){const o={};for(const n of e)o[n]=i[n]?i[n]:t;return o}return i[e]?i[e]:t}static getAsync(e,t=300,i){return new Promise(((o,n)=>{let a=[...e];const s=this.get(a);if(a=a.filter((e=>!s[e])),0===a.length)return void o(s);let r;const l=setInterval((()=>{Object.assign(s,this.get(a)),a=a.filter((e=>!s[e])),0===a.length&&(i&&clearTimeout(r),clearInterval(l),o(s))}),t);i&&(r=setTimeout((()=>{clearInterval(l),n(`获取以下 cookie 超时:${a}`)}),i))}))}}class K extends G{getBilibiliLive(){return this.logger.log("unsafeWindow.BilibiliLive",f.BilibiliLive),new Promise((e=>{0===f.BilibiliLive.UID?f.BilibiliLive=new Proxy(f.BilibiliLive,{set:(t,i,o)=>(t[i]=o,"UID"===i&&(f.BilibiliLive=t,e(f.BilibiliLive)),!0)}):e(f.BilibiliLive)}))}async run(){O().BilibiliLive=await this.getBilibiliLive()}}u(K,"runOnMultiplePages",!0);const W=Object.freeze(Object.defineProperty({__proto__:null,Default_BilibiliLive:K,Default_Cookies:class extends G{getCookies(){return q.getAsync(["bili_jct","LIVE_BUVID","buvid3"],300,1e4)}async run(){O().cookies=await this.getCookies()}},Default_DailyRewardInfo:class extends G{async getDailyRewardInfo(){const e=this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks;if(Object.values(e).some((e=>e.enabled&&!T(e._lastCompleteTime))))try{const e=await U.reward();return this.logger.log("BAPI.main.reward response",e),0===e.code?Promise.resolve(e.data):(this.logger.error("获取主站每日任务完成情况失败",e.message),Promise.reject(e.message))}catch(e){return this.logger.error("获取主站每日任务完成情况出错",e),Promise.reject(e)}}async run(){const e=O();e.dailyRewardInfo=await this.getDailyRewardInfo(),setTimeout((async()=>{e.dailyRewardInfo=await this.getDailyRewardInfo()}),V(0,4).ms)}},Default_DynamicVideos:class extends G{async getDynamicVideos(){const e=this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks;if(Object.entries(e).filter((([e])=>["watch","share","coin"].includes(e))).some((e=>e[1].enabled&&!T(e[1]._lastCompleteTime))))try{const e=await U.dynamicAll("video");return this.logger.log("BAPI.main.dynamicAll response",e),0===e.code?Promise.resolve(e.data.items):(this.logger.error("获取主站每日任务完成情况失败",e.message),Promise.reject(e.message))}catch(e){return this.logger.error("获取主站每日任务完成情况出错",e),Promise.reject(e)}}async run(){const e=O();e.dynamicVideos=await this.getDynamicVideos(),setTimeout((async()=>{e.dynamicVideos=await this.getDynamicVideos()}),V(0,4).ms)}},Default_FansMetals:class extends G{async getFansMetals(e=1/0,t=!1){const i=this.moduleStore.moduleConfig.DailyTasks.LiveTasks.medalTasks;if(t||Object.entries(i).filter((([e])=>["light","watch"].includes(e))).some((e=>e[1].enabled&&!T(e[1]._lastCompleteTime)))){const t=[];let i=1;try{const o=await j.fansMedalPanel(1);if(this.logger.log("BAPI.live.fansMedalPanel(1) response",o),0!==o.code)return this.logger.error("获取粉丝勋章列表第1页失败",o.message),Promise.reject(o.message);i=o.data.page_info.total_page,t.push(...o.data.special_list,...o.data.list);for(let n=2;n<=Math.min(i,e);n++){const e=await j.fansMedalPanel(n);if(this.logger.log(`BAPI.live.fansMedalPanel(${n}) response`,e),0!==o.code)return this.logger.error(`获取粉丝勋章列表第${n}页失败`,o.message),t;t.push(...e.data.list),await R(250)}return Promise.resolve(t)}catch(e){return this.logger.error("获取粉丝勋章列表出错",e),Promise.reject(e)}}}async run(){const e=O();e.fansMedals=await this.getFansMetals(),setTimeout((async()=>{const t=await this.getFansMetals(1,!0);null==t||t.forEach((t=>{var i;(null==(i=e.fansMedals)?void 0:i.every((e=>e.medal.target_id!==t.medal.target_id)))&&e.fansMedals.push(t)}))}),V(0,4).ms),Je().emitter.on("Default_FansMedals",(async()=>{e.fansMedals=await this.getFansMetals(1/0,!0)}))}},Default_UserInfo:class extends G{async getUserInfo(){try{const e=await U.nav();return this.logger.log("BAPI.main.nav response",e),0===e.code?Promise.resolve(e.data):(this.logger.error("获取用户信息失败",e.message),Promise.reject(e.message))}catch(e){return this.logger.error("获取用户信息出错",e),Promise.reject(e)}}async run(){const e=O();e.userInfo=await this.getUserInfo(),setTimeout((async()=>{e.userInfo=await this.getUserInfo()}),V(0,4).ms)}}},Symbol.toStringTag,{value:"Module"}));class X{constructor(e,t,i,o,n){u(this,"logger",new F("RoomHeart")),u(this,"config"),u(this,"watchedSeconds"),u(this,"timer"),u(this,"stop",!1),u(this,"areaID"),u(this,"parentID"),u(this,"roomID"),u(this,"ruid"),u(this,"seq",0),u(this,"buvid",O().cookies.LIVE_BUVID),u(this,"uuid",E()),u(this,"device",[this.buvid,this.uuid]),u(this,"ua",navigator.userAgent),u(this,"heartBeatInterval"),u(this,"secretKey"),u(this,"secretRule"),u(this,"timestamp"),this.roomID=e,this.areaID=t,this.parentID=i,this.ruid=o,this.watchedSeconds=n,this.config=Je().moduleConfig.DailyTasks.LiveTasks.medalTasks.watch}set status(e){Je().moduleStatus.DailyTasks.LiveTasks.medalTasks.watch=e}get id(){return[this.parentID,this.areaID,this.seq,this.roomID]}updateProgress(){this.watchedSeconds+=this.heartBeatInterval,Je().moduleConfig.DailyTasks.LiveTasks.medalTasks.watch._watchingProgress[this.roomID]=this.watchedSeconds}start(){return this.buvid?(this.timer=setTimeout((()=>this.stop=!0),V(0,0).ms),this.E()):(this.logger.error(`缺少buvid,无法为直播间 ${this.roomID} 执行观看直播任务,请尝试刷新页面`),Promise.resolve())}async E(){if(this.stop)this.status="";else try{const e=await z.E(this.id,this.device,this.ruid);if(this.logger.log(`BAPI.liveTrace.E(${this.id}, ${this.device}, ${this.ruid}) response`,e),0===e.code)return this.seq+=1,({heartbeat_interval:this.heartBeatInterval,secret_key:this.secretKey,secret_rule:this.secretRule,timestamp:this.timestamp}=e.data),await R(1e3*this.heartBeatInterval),this.X();this.logger.error(`BAPI.liveTrace.E(${this.id}, ${this.device}, ${this.ruid}) 失败`,e.message)}catch(e){this.logger.error(`BAPI.liveTrace.E(${this.id}, ${this.device}, ${this.ruid}) 出错`,e)}}async X(){if(this.stop)this.status="";else try{const e={id:JSON.stringify(this.id),device:JSON.stringify(this.device),ets:this.timestamp,benchmark:this.secretKey,time:this.heartBeatInterval,ts:P(),ua:this.ua},t=this.spyder(JSON.stringify(e),this.secretRule),i=await z.X(t,this.id,this.device,this.ruid,this.timestamp,this.secretKey,this.heartBeatInterval,e.ts);if(this.logger.log(`BAPI.liveTrace.X(${t}, ${this.id}, ${this.device}, ${this.ruid}, ${this.timestamp}, ${this.secretKey}, ${this.heartBeatInterval}, ${e.ts}) response`,i),0===i.code)return this.seq+=1,this.updateProgress(),this.watchedSeconds>=60*this.config.time?void clearTimeout(this.timer):(({heartbeat_interval:this.heartBeatInterval,secret_key:this.secretKey,secret_rule:this.secretRule,timestamp:this.timestamp}=i.data),await R(1e3*this.heartBeatInterval),this.X());this.logger.error(`BAPI.liveTrace.X(${t}, ${this.id}, ${this.device}, ${this.ruid}, ${this.timestamp}, ${this.secretKey}, ${this.heartBeatInterval}) 失败`,i.message)}catch(e){this.logger.error(`BAPI.liveTrace.X(s, ${this.id}, ${this.device}, ${this.ruid}, ${this.timestamp}, ${this.secretKey}, ${this.heartBeatInterval}) 出错`,e)}}spyder(e,t){const i=JSON.parse(e),[o,a,s,r]=JSON.parse(i.id),[l,c]=JSON.parse(i.device),d=i.benchmark,u={platform:"web",parent_id:o,area_id:a,seq_id:s,room_id:r,buvid:l,uuid:c,ets:i.ets,time:i.time,ts:i.ts};let m=JSON.stringify(u);for(const e of t)switch(e){case 0:default:m=n.HmacMD5(m,d).toString(n.enc.Hex);break;case 1:m=n.HmacSHA1(m,d).toString(n.enc.Hex);break;case 2:m=n.HmacSHA256(m,d).toString(n.enc.Hex);break;case 3:m=n.HmacSHA224(m,d).toString(n.enc.Hex);break;case 4:m=n.HmacSHA512(m,d).toString(n.enc.Hex);break;case 5:m=n.HmacSHA384(m,d).toString(n.enc.Hex)}return m}}class J extends G{constructor(){super(...arguments),u(this,"medalTasksConfig",this.moduleStore.moduleConfig.DailyTasks.LiveTasks.medalTasks),u(this,"config",this.medalTasksConfig.watch)}set status(e){this.moduleStore.moduleStatus.DailyTasks.LiveTasks.medalTasks.watch=e}getRoomidUidList(){const e=O();return e.filteredFansMedals?e.filteredFansMedals.filter((e=>e.medal.level<20&&(this.medalTasksConfig.isWhiteList?this.medalTasksConfig.roomidList.includes(e.room_info.room_id):!this.medalTasksConfig.roomidList.includes(e.room_info.room_id)))).map((e=>[e.room_info.room_id,e.medal.target_id])).slice(0,199):null}async getAreaInfo(e){try{const t=await j.getInfoByRoom(e);if(this.logger.log(`BAPI.live.getInfoByRoom(${e}) response`,t),0===t.code){const e=t.data.room_info;return[e.area_id,e.parent_area_id]}return[-1,-1]}catch(t){return this.logger.error(`获取指定直播间的 area_id 和 parent_area_id(roomid = ${e}) 出错`,t),[-1,-1]}}async run(){if(this.logger.log("观看直播模块开始运行"),this.config.enabled)if(T(this.config._lastCompleteTime))S(0,0,0,5)?this.logger.log("昨天的观看直播任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过观看直播任务了"),this.status="done");else{this.status="running",T(this.config._lastWatchTime,0,0)?i.forOwn(this.config._watchingProgress,((e,t,i)=>{i[t]-=e%300})):this.config._watchingProgress={},this.config._lastWatchTime=P();const e=this.getRoomidUidList();if(e)if(0===e.length)this.status="done",this.config._lastCompleteTime=P();else{for(let t=0;t0&&a>0&&(!this.config._watchingProgress[i]||this.config._watchingProgress[i]<60*this.config.time)&&(this.logger.log(`开始直播间${i}的观看直播任务`),await new X(i,n,a,o,this.config._watchingProgress[i]??0).start(),await R(1e4))}this.config._lastCompleteTime=P(),this.logger.log("观看直播任务已完成"),this.status="done"}else this.status="error"}const e=V();setTimeout((()=>this.run()),e.ms),this.logger.log("距离观看直播模块下次运行时间:",e.str)}}u(J,"runAt","window-load");const Q=document.querySelector.bind(document);document.querySelectorAll.bind(document);const Y=document.createElement.bind(document);const Z=()=>window.self===window.top;class ee extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.EnhanceExperience.switchLiveStreamQuality)}async waitForPlayer(){return new Promise(((e,t)=>{const i=f.top?f.top:f,o=setInterval((()=>{i.livePlayer&&Object.hasOwn(i.livePlayer,"switchQuality")&&Object.hasOwn(i.livePlayer,"getPlayerInfo")&&(clearInterval(o),clearTimeout(n),e(i.livePlayer))}),200),n=setTimeout((()=>{clearInterval(o),clearTimeout(n),t("等待播放器超时")}),1e4)}))}async switchQuality(e){const t=e.getPlayerInfo();0===t.liveStatus?this.logger.log("当前直播间未开播,无需切换画质"):setTimeout((()=>{const i=t.qualityCandidates.find((({desc:e})=>e===this.config.qualityDesc));i?t.quality!==i.qn?(e.switchQuality(i.qn),this.logger.log(`已将画质切换为${this.config.qualityDesc}`,i)):this.logger.log("当前画质已经是目标画质了,无需切换画质"):this.logger.log("当前直播不支持目标画质,保持默认画质")}),Z()?2500:5e3)}async run(){if(this.logger.log("自动切换画质模块开始运行"),this.config.enabled)try{const e=await this.waitForPlayer();this.switchQuality(e)}catch(e){this.logger.error("自动切换画质模块出错",e)}}}u(ee,"runOnMultiplePages",!0),u(ee,"runAt","window-load"),u(ee,"runAfterDefault",!1);class te extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.EnhanceExperience.banp2p)}banP2P(){const e=["RTCPeerConnection","mozRTCPeerConnection","webkitRTCPeerConnection"];for(const t of e)Object.hasOwn(f,t)&&Object.defineProperty(f,t,{value:class{constructor(){}addEventListener(){}removeEventListener(){}createDataChannel(){return{close:function(){}}}createOffer(){return Promise.resolve()}setLocalDescription(){return Promise.resolve()}close(){}setRemoteDescription(){return Promise.resolve()}createAnswer(){}},enumerable:!1,writable:!1,configurable:!1})}run(){if(this.logger.log("禁用P2P模块开始运行"),this.config.enabled)try{this.banP2P()}catch(e){this.logger.error("禁用P2P失败",e)}}}u(te,"runOnMultiplePages",!0),u(te,"runAt","document-start"),u(te,"onFrame","all"),u(te,"runAfterDefault",!1);var ie=["load","loadend","timeout","error","readystatechange","abort"],oe="__origin_xhr";function ne(e,t){var i={};for(var o in e)i[o]=e[o];return i.target=i.currentTarget=t,i}var ae=ie[0],se=ie[1],re=ie[2],le=ie[3],ce=ie[4],de=ie[5],ue="prototype";function me(e,t){return function(e,t){var i=e.onRequest,o=e.onResponse,n=e.onError;function a(e){var t=e.responseType;if(!t||"text"===t)return e.responseText;var i=e.response;if("json"===t&&!i)try{return JSON.parse(e.responseText)}catch(e){console.warn(e)}return i}function s(e,t){var i=new we(e),n={response:a(t),status:t.status,statusText:t.statusText,config:e.config,headers:e.resHeader||e.getAllResponseHeaders().split("\r\n").reduce((function(e,t){if(""===t)return e;var i=t.split(":");return e[i.shift()]=function(e){return e.replace(/^\s+|\s+$/g,"")}(i.join(":")),e}),{})};if(!o)return i.resolve(n);o(n,i)}function r(e,t,i,o){var a=new _e(e);i={config:e.config,error:i,type:o},n?n(i,a):a.next(i)}function l(){return!0}function c(e){return function(t,i){return r(t,this,i,e),!0}}function d(e,t){return 4===e.readyState&&0!==e.status?s(e,t):4!==e.readyState&&ge(e,ce),!0}var{originXhr:u,unHook:m}=function(e,t){var i=(t=t||window).XMLHttpRequest,o=!0,n=function(){for(var e=new i,t=0;t(e.onRequest&&Ce.push(e.onRequest),e.onResponse&&Te.push(e.onResponse),ke||((e=>{e.fetch=async(e,t)=>{for(const i of Ce){const o=new xe;if(await i.apply(f,[{input:e,init:t},o]),o._resolve)return o._resolve;if(o._error)throw o._error;if(!o._next)break;e=o._input,t=o._init}let i=await ye.apply(f,[e,t]);for(const e of Te){const t=new be;if(await e.apply(f,[i,t]),t._resolve)return t._resolve;if(t._error)throw t._error;if(!t._next)break;i=t._response}return i}})(t),ke=!0),{unProxy:()=>{e.onRequest&&Ce.splice(Ce.findIndex((t=>t===e.onRequest)),1),e.onResponse&&Te.splice(Te.findIndex((t=>t===e.onResponse)),1)},unHook:()=>{t.fetch=ye,Ce=[],Te=[]},originFetch:ye}),Se=class e extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.EnhanceExperience.noReport)}static isTargetURL(e){return e.includes("//data.bilibili.com")||e.includes("//data.bilivideo.com")}hookProperties(e){Object.defineProperty(e.navigator,"sendBeacon",{value:()=>!0}),Object.defineProperties(e,{reportObserver:{get:()=>({reportCustomData:function(){}}),set(){}},reportConfig:{get:()=>({}),set(){}}})}async ajaxHook(){const t={onRequest:(t,i)=>{e.isTargetURL(t.url)?i.resolve({config:t,status:200,headers:{"Content-Type":"text/plain; charset=utf-8"},response:"ok"}):i.next(t)}},i={onRequest(t,i){const o="string"==typeof(n=t.input)?n:n instanceof URL?n.toString():n instanceof Request?n.url:"Incorrect input";var n;e.isTargetURL(o)?i.resolve(new Response("ok")):i.next(t)},onResponse(e,t){t.next(e)}};this.hookProperties(f),me(t,f),Ve(i,f)}run(){if(this.logger.log("拦截日志数据上报模块开始运行"),this.config.enabled)try{this.ajaxHook()}catch(e){this.logger.error("拦截日志数据上报失败",e)}}};u(Se,"runOnMultiplePages",!0),u(Se,"runAt","document-start"),u(Se,"onFrame","all"),u(Se,"runAfterDefault",!1);let Ne=Se;class Pe extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.EnhanceExperience.noSleep)}run(){this.logger.log("屏蔽挂机检测模块开始运行"),this.config.enabled&&setInterval((()=>{document.dispatchEvent(new MouseEvent("mousemove"))}),3e5)}}u(Pe,"runOnMultiplePages",!0),u(Pe,"runAt","window-load"),u(Pe,"runAfterDefault",!1);class Ee extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.EnhanceExperience.invisibility)}run(){this.logger.log("隐身入场模块开始运行"),this.config.enabled&&me({onRequest:(e,t)=>{e.url.includes("//api.live.bilibili.com/xlive/web-room/v1/index/getInfoByUser")&&(e.url=e.url.replace("not_mock_enter_effect=0","not_mock_enter_effect=1")),t.next(e)}},f)}}u(Ee,"runOnMultiplePages",!0),u(Ee,"runAt","document-start"),u(Ee,"runAfterDefault",!1),u(Ee,"onFrame","all");class Re extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.RemoveElement.removePKBox)}removePKNode(){m("#awesome-pk-vm { display: none !important }")}removePKToast(){const e=["主播即将结束PK","连线断开中"];new MutationObserver((t=>{for(const i of t)i.addedNodes.forEach((t=>{t instanceof HTMLElement&&t.classList.contains("link-toast")&&e.some((e=>{var i;return null==(i=t.textContent)?void 0:i.includes(e)}))&&(t.style.display="none")}))})).observe(document.body,{childList:!0})}async run(){this.logger.log("移除大乱斗元素模块开始运行"),this.config.enabled&&(this.removePKNode(),this.removePKToast())}}u(Re,"runOnMultiplePages",!0);class Me extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeLiveWaterMark)}async run(){this.logger.log("移除直播间水印模块开始运行"),this.config.enabled&&m(".web-player-icon-roomStatus { display: none !important }")}}u(Me,"runOnMultiplePages",!0);class Be extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeShopPopover)}async run(){this.logger.log("移除直播间小黄车弹窗模块开始运行"),this.config.enabled&&m(".shop-popover { display: none !important }")}}u(Be,"runOnMultiplePages",!0);class De extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeGameParty)}async run(){this.logger.log("移除直播间幻星派对标志模块开始运行"),this.config.enabled&&m("#game-id { display: none !important }")}}u(De,"runMultiple",!0);class Ie extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeGiftPopover)}async run(){this.logger.log("移除礼物赠送提示弹窗模块开始运行"),this.config.enabled&&m(".function-card { display: none !important }")}}u(Ie,"runOnMultiplePages",!0);class Le extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeMicPopover)}async run(){this.logger.log("移除连麦状态提示模块开始运行"),this.config.enabled&&m(".lin-mic-cntr { display: none !important }")}}u(Le,"runOnMultiplePages",!0);class Oe extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeComboCard)}async run(){this.logger.log("移除直播间相同弹幕连续提示模块开始运行"),this.config.enabled&&m("#combo-card { display: none !important }")}}u(Oe,"runOnMultiplePages",!0);class Ae extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeRank)}async run(){this.logger.log("移除排行榜模块开始运行"),this.config.enabled&&m(".popular-and-hot-rank { display: none !important }")}}u(Ae,"runOnMultiplePages",!0);class $e extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeGiftPlanet)}async run(){this.logger.log("移除礼物星球模块开始运行"),this.config.enabled&&m(".gift-planet-entry { display: none !important }")}}u($e,"runOnMultiplePages",!0);class je extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeActivityBanner)}async run(){this.logger.log("移除活动入口模块开始运行"),this.config.enabled&&m(".activity-gather-entry .task-box:nth-child(1) { display: none !important }")}}u(je,"runOnMultiplePages",!0);class ze extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.RemoveElement.removePKBanner)}async run(){this.logger.log("移除大乱斗入口模块开始运行"),this.config.enabled&&m(".activity-gather-entry .task-box:nth-child(2) { display: none !important }")}}u(ze,"runOnMultiplePages",!0);class Ue extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeFlipView)}async run(){this.logger.log("移除礼物栏下方广告模块开始运行"),this.config.enabled&&m(".flip-view { display: none !important }")}}u(Ue,"runOnMultiplePages",!0);class He extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeRecommendRoom)}async run(){this.logger.log("移除礼物栏下方推荐直播间模块开始运行"),this.config.enabled&&m(".room-info-ctnr { display: none !important }")}}u(He,"runOnMultiplePages",!0);class Fe extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.RemoveElement.removeLiveMosaic)}async run(){this.logger.log("移除直播间马赛克模块开始运行"),this.config.enabled&&m("#web-player-module-area-mask-panel { opacity: 0 !important }")}}u(Fe,"runOnMultiplePages",!0);const Ge=Object.freeze(Object.defineProperty({__proto__:null,DailyTask_LiveTask_LightTask:class extends G{constructor(){super(...arguments),u(this,"medalTasksConfig",this.moduleStore.moduleConfig.DailyTasks.LiveTasks.medalTasks),u(this,"config",this.medalTasksConfig.light)}set status(e){this.moduleStore.moduleStatus.DailyTasks.LiveTasks.medalTasks.light=e}getMedalList(){const e=O();return e.filteredFansMedals?e.filteredFansMedals.filter((e=>e.medal.level<20&&(this.medalTasksConfig.isWhiteList?this.medalTasksConfig.roomidList.includes(e.room_info.room_id):!this.medalTasksConfig.roomidList.includes(e.room_info.room_id))&&0===e.medal.is_lighted)):(this.status="error",null)}async like(e,t,i){try{const o=await j.likeReport(e,t,i);this.logger.log(`BAPI.live.likeReport(${e}, ${t}, ${i})`,o),0===o.code?this.logger.log(`点亮熄灭勋章-点赞 房间号 = ${e} 主播UID = ${t} 点赞次数 = ${i} 成功`):this.logger.error(`点亮熄灭勋章-点赞 房间号 = ${e} 主播UID = ${t} 点赞次数 = ${i} 失败`,o.message)}catch(o){this.logger.error(`点亮熄灭勋章-点赞 房间号 = ${e} 主播UID = ${t} 点赞次数 = ${i} 出错`,o)}}async sendDanmu(e,t){try{const i=await j.sendMsg(e,t);this.logger.log(`BAPI.live.sendMsg(${e}, ${t})`,i),0===i.code?"k"===i.msg?this.logger.warn(`点亮熄灭勋章-发送弹幕 在直播间 ${t} 发送弹幕 ${e} 异常,弹幕可能包含屏蔽词`):this.logger.log(`点亮熄灭勋章-发送弹幕 在直播间 ${t} 发送弹幕 ${e} 成功`):this.logger.error(`点亮熄灭勋章-发送弹幕 在直播间 ${t} 发送弹幕 ${e} 失败`,i.message)}catch(i){this.logger.error(`点亮熄灭勋章-发送弹幕 在直播间 ${t} 发送弹幕 ${e} 出错`,i)}}async run(){if(this.logger.log("点亮熄灭勋章模块开始运行"),this.config.enabled)if(T(this.config._lastCompleteTime))S(0,0,0,5)?this.logger.log("昨天的给点亮熄灭勋章任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过点亮熄灭勋章任务了"),this.status="done");else{this.status="running";const e=this.getMedalList();if(e){for(let t=0;tthis.run()),e.ms),this.logger.log("距离点亮熄灭勋章模块下次运行时间:",e.str)}},DailyTask_LiveTask_SignTask:class extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.DailyTasks.LiveTasks.sign)}set status(e){this.moduleStore.moduleStatus.DailyTasks.LiveTasks.sign=e}async getSignInfo(){try{const e=await j.getSignInfo();return this.logger.log("BAPI.live.getSignInfo response",e),0===e.code?e.data:(this.logger.error("获取直播签到信息失败",e.message),null)}catch(e){return this.logger.error("获取直播签到信息出错",e),null}}async sign(){try{const e=await j.doSign();this.logger.log("BAPI.live.doSign response",e),0===e.code?(this.logger.log("直播签到成功,获得奖励:",e.data.text),this.config._lastCompleteTime=P(),this.status="done",this.logger.log("直播签到任务已完成")):(this.logger.error("直播签到失败",e.message),this.status="error")}catch(e){this.logger.error("执行直播签到任务出错",e),this.status="error"}}async run(){if(this.logger.log("直播签到模块开始运行"),this.config.enabled)if(T(this.config._lastCompleteTime))S(0,0,0,5)?this.logger.log("昨天的直播签到任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过直播签到任务了"),this.status="done");else{this.status="running";const e=await this.getSignInfo();e?0===e.status?await this.sign():(this.config._lastCompleteTime=P(),this.status="done"):await this.sign()}const e=V();setTimeout((()=>this.run()),e.ms),this.logger.log("距离直播签到模块下次运行时间:",e.str)}},DailyTask_LiveTask_WatchTask:J,DailyTask_MainSiteTask_CoinTask:class extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks.coin),u(this,"MAX_COIN",1)}set status(e){this.moduleStore.moduleStatus.DailyTasks.MainSiteTasks.coin=e}getDynamicVideoIds(){return O().dynamicVideos.map((e=>{const t=e.modules.module_dynamic.major.archive;return{aid:t.aid,bvid:t.bvid}}))}async getVideoCoinInfo(e,t){try{const i=await U.videoRelation(e,t);return this.logger.log(`BAPI.main.videoRelation(${e}, ${t}) response`,i),0===i.code?i.data.coin:(this.logger.error(`获取视频投币信息失败 aid = ${e} bvid = ${t}`,i.message),0)}catch(i){return this.logger.error(`获取视频投币信息出错 aid = ${e} bvid = ${t}`,i),0}}async coinDynamicVideos(e){const t=this.getDynamicVideoIds();if(t)for(const{aid:i,bvid:o}of t){const t=await this.getVideoCoinInfo(i,o),n=this.MAX_COIN-t;if(n>0){const t=Math.min(n,e),o=await this.coin(i,t);if(0===o){if(0===(e-=t)){this.logger.log("每日投币任务已完成"),this.config._lastCompleteTime=P(),this.status="done";break}}else if(1===o){this.status="error";break}}}}async coin(e,t){try{const i=await U.coinAdd(e,t);return this.logger.log(`BAPI.main.coinAdd(${e}) response`,i),0===i.code?(this.logger.log(`投币成功 视频aid = ${e} 投币数量num = ${t}`),0):-104===i.code?(this.logger.warn("硬币余额不足,每日投币任务终止"),1):(this.logger.error(`投币失败 视频aid = ${e} 投币数量num = ${t}`,i.message),2)}catch(i){return this.logger.error(`投币出错 视频aid = ${e} 投币数量num = ${t}`,i),3}}async run(){if(this.logger.log("每日投币模块开始运行"),this.config.enabled){const e=O();if(T(this.config._lastCompleteTime))S(0,0,0,5)?this.logger.log("昨天的每日投币任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过每日投币任务了"),this.status="done");else{this.status="running";const t=e.dailyRewardInfo.coins/10;if(t(O().userInfo.money??5)?(this.logger.log("硬币余额不足,不执行每日投币任务"),this.status="done"):await this.coinDynamicVideos(e)}else this.config._lastCompleteTime=P(),this.status="done",this.logger.log("每日投币任务已完成")}}const e=V();setTimeout((()=>this.run()),e.ms),this.logger.log("距离每日投币模块下次运行时间:",e.str)}},DailyTask_MainSiteTask_LoginTask:class extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks.login)}set status(e){this.moduleStore.moduleStatus.DailyTasks.MainSiteTasks.login=e}async login(){return this.logger.log("每日登录任务已完成"),this.config._lastCompleteTime=P(),this.status="done",Promise.resolve()}async run(){if(this.logger.log("每日登录模块开始运行"),this.config.enabled){const e=O();T(this.config._lastCompleteTime)?S(0,0,0,5)?this.logger.log("昨天的每日登录任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过每日登录任务了"),this.status="done"):(this.status="running",e.dailyRewardInfo.login?(this.config._lastCompleteTime=P(),this.status="done"):await this.login())}const e=V();setTimeout((()=>this.run()),e.ms),this.logger.log("距离每日登录模块下次运行时间:",e.str)}},DailyTask_MainSiteTask_ShareTask:class extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks.share)}set status(e){this.moduleStore.moduleStatus.DailyTasks.MainSiteTasks.share=e}getAid(){return O().dynamicVideos[0].modules.module_dynamic.major.archive.aid}async share(e){try{const t=await U.share(e);this.logger.log(`BAPI.main.share(${e}) response`,t),0===t.code||71e3===t.code?(this.logger.log("每日分享视频任务已完成"),this.config._lastCompleteTime=P(),this.status="done"):(this.logger.error("分享视频失败",t.message),this.status="error")}catch(e){this.logger.error("执行每日分享视频任务出错",e),this.status="error"}}async run(){if(this.logger.log("每日分享视频模块开始运行"),this.config.enabled){const e=O();if(T(this.config._lastCompleteTime))S(0,0,0,5)?this.logger.log("昨天的每日分享任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过每日分享任务了"),this.status="done");else if(this.status="running",e.dailyRewardInfo.share)this.config._lastCompleteTime=P(),this.status="done",this.logger.log("每日分享视频任务已完成");else{const e=this.getAid();await this.share(e)}}const e=V();setTimeout((()=>this.run()),e.ms),this.logger.log("距离每日分享视频模块下次运行时间:",e.str)}},DailyTask_MainSiteTask_WatchTask:class extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks.watch)}set status(e){this.moduleStore.moduleStatus.DailyTasks.MainSiteTasks.watch=e}getAid(){const e=O();return Number(e.dynamicVideos[0].modules.module_dynamic.major.archive.aid)}async watch(e){try{const t=await U.videoHeartbeat(e,i.random(1e9,2e9));this.logger.log(`BAPI.main.videoHeartbeat(${e}) response`,t),0===t.code?(this.logger.log("每日观看视频任务已完成"),this.config._lastCompleteTime=P(),this.status="done"):(this.logger.error("发送观看视频心跳失败",t.message),this.status="error")}catch(e){this.logger.error("执行每日观看视频任务出错",e),this.status="error"}}async run(){if(this.logger.log("每日观看视频模块开始运行"),this.config.enabled){const e=O();if(T(this.config._lastCompleteTime))S(0,0,0,5)?this.logger.log("昨天的每日观看视频任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过每日观看视频任务了"),this.status="done");else if(this.status="running",e.dailyRewardInfo.watch)this.config._lastCompleteTime=P(),this.status="done",this.logger.log("每日观看视频任务已完成");else{const e=this.getAid();await this.watch(e)}}const e=V();setTimeout((()=>this.run()),e.ms),this.logger.log("距离每日观看视频模块下次运行时间:",e.str)}},DailyTask_OtherTask_CoinToSilverTask:class extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.DailyTasks.OtherTasks.coinToSilver)}set status(e){this.moduleStore.moduleStatus.DailyTasks.OtherTasks.coinToSilver=e}async exchange(){try{const e=await j.coin2silver(this.config.num);this.logger.log(`BAPI.live.coin2silver{${this.config.num}} response`,e),0===e.code?(this.logger.log("硬币换银瓜子已完成,获得银瓜子:",e.data.silver),this.config._lastCompleteTime=P(),this.status="done"):(this.logger.error("硬币换银瓜子失败",e.message),this.status="error")}catch(e){this.logger.error("硬币换银瓜子出错",e),this.status="error"}}async run(){this.logger.log("硬币换银瓜子模块开始运行"),this.config.enabled&&(T(this.config._lastCompleteTime)?S(0,0,0,5)?this.logger.log("昨天的硬币换银瓜子任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过硬币换银瓜子任务了"),this.status="done"):(this.status="running",await this.exchange()));const e=V();setTimeout((()=>this.run()),e.ms),this.logger.log("硬币换银瓜子模块下次运行时间:",e.str)}},DailyTask_OtherTask_GetYearVipPrivilegeTask:class extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.DailyTasks.OtherTasks.getYearVipPrivilege),u(this,"type2Name",{1:"年度专享B币赠送",2:"年度专享会员购优惠券",3:"年度专享漫画礼包 - 漫画福利券",4:"大会员专享会员购包邮券",5:"年度专享漫画礼包 - 漫画商城优惠券",6:"大会员专享会员体验卡",7:"大会员专享课堂优惠券"})}set status(e){this.moduleStore.moduleStatus.DailyTasks.OtherTasks.getYearVipPrivilege=e}async myPrivilege(){try{const e=await U.vip.myPrivilege();if(this.logger.log("BAPI.main.vip.myPrivilege response",e),0===e.code)return e.data.list;this.logger.error("获取年度大会员权益信息失败",e.message),this.status="error"}catch(e){this.logger.error("获取年度大会员权益信息出错",e),this.status="error"}}async receivePrivilege(e){try{const t=await U.vip.receivePrivilege(e);this.logger.log(`BAPI.main.vip.receivePrivilege(${e}) response`,t),0===t.code?this.logger.log(`领取年度大会员权益(type = ${e}, ${this.type2Name[e]})成功`):this.logger.error(`领取年度大会员权益(type = ${e}, ${this.type2Name[e]})失败`,t.message)}catch(t){this.logger.error(`领取年度大会员权益(type = ${e}, ${this.type2Name[e]})出错`,t)}}async addExperience(){try{const e=await U.vip.addExperience();this.logger.log("BAPI.main.vip.addExperience response",e),0===e.code?this.logger.log("领取年度大会员权益(type = 9,专属等级加速包(10主站经验))成功"):this.logger.error("领取年度大会员权益(type = 9,专属等级加速包(10主站经验))失败",e.message)}catch(e){this.logger.error("领取年度大会员权益(type = 9,专属等级加速包(10主站经验))出错",e)}}isYearVip(){const e=O().userInfo;return 1===e.vip.status&&2===e.vip.type||(this.logger.log("当前账号不是年度大会员,不领取权益"),!1)}async run(){if(this.logger.log("领取年度大会员权益模块开始运行"),this.config.enabled){if(this.isYearVip()){if(N()>=this.config._nextReceiveTime){this.status="running";const t=await this.myPrivilege();if(t){for(const i of t)if(8!==i.type&&14!==i.type){if(0===i.state)9===i.type?await this.addExperience():await this.receivePrivilege(i.type);else if(1===i.state)this.logger.log(`该权益(type = ${i.type})已经领取过了`);else if(9===i.type){const t=this.moduleStore.moduleConfig.DailyTasks.MainSiteTasks.watch;t.enabled?e.watch((()=>t._lastCompleteTime),(()=>R(3e3).then((()=>this.addExperience()))),{once:!0}):this.logger.warn("领取专属等级加速包(10主站经验)前需要观看任意一个视频,请打开【主站任务】中的【每日观看视频】,或是在运行脚本前手动观看")}await R(200)}this.status="done",this.config._nextReceiveTime=Math.min(...t.map((e=>e.period_end_unix)))}}const t=this.config._nextReceiveTime-N();t<86400?(this.logger.log("领取年度大会员权益模块下次运行时间:",a.DateTime.fromSeconds(this.config._nextReceiveTime).toJSDate()),setTimeout((()=>this.run()),1e3*t)):this.logger.log("距离下次领取年度大会员权益的时间超过一天,不计划下次运行")}}else{const e=V(0);setTimeout((()=>this.run()),e.ms),this.logger.log("领取年度大会员权益模块下次运行时间:",e.str)}}},DailyTask_OtherTask_GroupSignTask:class extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.DailyTasks.OtherTasks.groupSign)}set status(e){this.moduleStore.moduleStatus.DailyTasks.OtherTasks.groupSign=e}async getGroupidOwneruidList(){try{const e=await H.myGroups();if(this.logger.log("BAPI.vc.myGroups response",e),0===e.code)return e.data.list.map((e=>[e.group_id,e.owner_uid]));this.logger.error("获取应援团信息失败",e.message),this.status="error"}catch(e){this.logger.error("获取应援团信息出错",e),this.status="error"}}async sign(e,t){try{const i=await H.signIn(e,t);this.logger.log(`BAPI.vc.signIn(${e}, ${t}) response`,i),0===i.code?this.logger.log(`应援团签到 应援团ID = ${e} 拥有者UID = ${t} 成功, 粉丝勋章亲密度+${i.data.add_num}`):this.logger.error(`应援团签到 应援团ID = ${e} 拥有者UID = ${t} 失败`,i.message)}catch(i){this.logger.error(`应援团签到 应援团ID = ${e} 拥有者UID = ${t} 出错`,i)}}async run(){if(this.logger.log("应援团签到模块开始运行"),this.config.enabled)if(T(this.config._lastCompleteTime,8,5))S(0,0,8,5)?this.logger.log("昨天的应援团签到任务已经完成过了,等到今天早上八点零五分再次执行"):(this.logger.log("今天已经完成过应援团签到任务了"),this.status="done");else{this.status="running";const e=await this.getGroupidOwneruidList();if(e){for(const[t,i]of e)await this.sign(t,i),await R(2e3);this.config._lastCompleteTime=P(),this.logger.log("应援团签到任务已完成"),this.status="done"}}const e=V(8,5);setTimeout((()=>this.run()),e.ms),this.logger.log("距离应援团签到模块下次运行时间:",e.str)}},DailyTask_OtherTask_SilverToCoinTask:class extends G{constructor(){super(...arguments),u(this,"config",this.moduleStore.moduleConfig.DailyTasks.OtherTasks.silverToCoin)}set status(e){this.moduleStore.moduleStatus.DailyTasks.OtherTasks.silverToCoin=e}async exchange(){try{const e=await j.silver2coin();this.logger.log("BAPI.live.silver2coin response",e),0===e.code?(this.logger.log("银瓜子换硬币已完成,获得硬币:",e.data.coin),this.config._lastCompleteTime=P(),this.status="done"):403===e.code?(this.logger.log("每天最多只能用银瓜子兑换1个硬币"),this.config._lastCompleteTime=P(),this.status="done"):(this.logger.error("银瓜子换硬币失败",e.message),this.status="error")}catch(e){this.logger.error("银瓜子换硬币出错",e),this.status="error"}}run(){this.logger.log("银瓜子换硬币模块开始运行"),this.config.enabled&&(T(this.config._lastCompleteTime)?S(0,0,0,5)?this.logger.log("昨天的银瓜子换硬币任务已经完成过了,等到今天的00:05再执行"):(this.logger.log("今天已经完成过银瓜子换硬币任务了"),this.status="done"):(this.status="running",this.exchange()));const e=V();setTimeout((()=>this.run()),e.ms),this.logger.log("银瓜子换硬币模块下次运行时间:",e.str)}},EnhanceExperience_BanP2P:te,EnhanceExperience_Invisibility:Ee,EnhanceExperience_NoReport:Ne,EnhanceExperience_NoSleep:Pe,EnhanceExperience_SwitchLiveStreamQuality:ee,RemoveElement_RemoveActivityBanner:je,RemoveElement_RemoveComboCard:Oe,RemoveElement_RemoveFlipView:Ue,RemoveElement_RemoveGameParty:De,RemoveElement_RemoveGiftPlanet:$e,RemoveElement_RemoveGiftPopover:Ie,RemoveElement_RemoveLiveMosaic:Fe,RemoveElement_RemoveLiveWaterMark:Me,RemoveElement_RemoveMicPopover:Le,RemoveElement_RemovePKBanner:ze,RemoveElement_RemovePKBox:Re,RemoveElement_RemoveRank:Ae,RemoveElement_RemoveRecommendRoom:He,RemoveElement_RemoveShopPopover:Be},Symbol.toStringTag,{value:"Module"}));function qe(e){const t={all:i=(i=e)||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(i){i(e,t)}))}};var i;return{...t,once(e,i){t.on(e,(function o(n){t.off(e,o),i(n)}))}}}const Ke=t.defineStore("cache",(()=>{const t=e.reactive(w.getCache()),i=e.ref("Main");return e.watch(t,(e=>w.setCache(e))),{cache:t,currentScriptType:i,startMainBLTHAliveHeartBeat:function(){t.lastAliveHeartBeatTime=Date.now();const e=setInterval((()=>t.lastAliveHeartBeatTime=Date.now()),5e3);window.addEventListener("unload",(()=>{clearInterval(e),t.lastAliveHeartBeatTime=0}))},checkCurrentScriptType:function(){0!==t.lastAliveHeartBeatTime&&Date.now()-t.lastAliveHeartBeatTime<8e3?null===sessionStorage.getItem("main_blth_flag")?i.value="Other":i.value="SubMain":(i.value="Main",sessionStorage.setItem("main_blth_flag","🚩"))}}})),We={DailyTasks:{MainSiteTasks:{login:"",watch:"",coin:"",share:""},LiveTasks:{sign:"",medalTasks:{light:"",watch:""}},OtherTasks:{groupSign:"",silverToCoin:"",coinToSilver:"",getYearVipPrivilege:""}}},Xe=[],Je=t.defineStore("module",(()=>{const t=e.reactive(w.getModuleConfig()),o=qe(),n=e.reactive(We);return e.watch(t,i.debounce((e=>w.setModuleConfig(e)),250,{leading:!0,trailing:!0})),function e(){setTimeout((()=>{I(n,((e,t)=>{i.set(n,t,"")})),e()}),V(0,0).ms)}(),{moduleConfig:t,emitter:o,moduleStatus:n,loadModules:function(e){const t=Ke(),i=new F("ModuleStore_LoadModules");if("unknown"===e)for(const[e,i]of Object.entries(Ge))("all"===i.onFrame||"top"===i.onFrame&&Z())&&(i.runOnMultiplePages||"Other"!==t.currentScriptType)&&(i.runAfterDefault||(L(i.runAt).then((()=>new i(e).run())),Xe.push(e)));else{const e=function(){const e=Ke(),t=[];for(const[i,o]of Object.entries(W))(o.runOnMultiplePages||"Other"!==e.currentScriptType)&&t.push(new o(i).run());return Promise.all(t)}();for(const[o,n]of Object.entries(Ge))("target"===n.onFrame||"top"===n.onFrame&&Z()&&!Xe.includes(o)||"all"===n.onFrame&&!Xe.includes(o))&&(n.runOnMultiplePages||"Other"!==t.currentScriptType)&&L(n.runAt).then((async()=>{try{n.runAfterDefault&&await e,new n(o).run()}catch(e){i.error(`运行默认模块时出错,模块 ${o} 不运行:`,e)}}))}}}})),Qe={DailyTasks:{MainSiteTasks:{login:{title:"每日登录",message:"完成主站的每日登录任务。"},watch:{title:"每日观看视频",message:e.h("p",[e.h("div","完成主站的每日观看视频任务。"),e.h("div","从动态中选取视频观看,会产生观看历史记录。")])},coin:{title:"每日投币",message:e.h("p",[e.h("div","完成主站的每日投币任务。"),e.h("div","从动态中选取视频投币,会根据你今天已经投过的币的数量计算还要投几个币。")])},share:{title:"每日分享视频",message:e.h("p",[e.h("div","完成主站的每日分享视频任务。"),e.h("div","不会真的分享到某处。")])}},LiveTasks:{sign:{title:"直播签到",message:e.h("p",[e.h("div","完成直播签到任务。")])},medalTasks:{list:{title:"黑白名单",message:e.h("p",[e.h("div","为了更精细地控制为哪些粉丝勋章执行点亮熄灭勋章和观看直播任务,你可以使用黑名单或白名单模式。"),e.h("div",[e.h("li",[e.h("span","黑名单:仅为"),e.h("strong","不在"),e.h("span","名单中的粉丝勋章执行任务。")]),e.h("li",[e.h("span","白名单:仅为"),e.h("strong","在"),e.h("span","名单中的粉丝勋章执行任务。")])]),e.h("div","点击编辑名单按钮,然后使用第一列的多选框即可编辑名单中的粉丝勋章。")])},light:{main:{title:"点亮熄灭勋章",message:e.h("p",[e.h("div","在你的每个已熄灭的粉丝勋章对应的直播间完成点亮任务,从而点亮粉丝勋章。"),e.h("div","支持两种点亮方式,可自由选择:"),e.h("div",[e.h("li",[e.h("span","点赞(不推荐):点赞30次")]),e.h("li",[e.h("strong","发送弹幕(推荐):"),e.h("span","发送弹幕1条")])])])},like:{title:"点赞",message:e.h("p",[e.h("div","在已熄灭粉丝勋章对应的直播间给主播点赞,点亮粉丝勋章。"),e.h("div",[e.h("li",[e.h("span","点赞次数为略微超过任务要求的随机值。")]),e.h("li",[e.h("span","部分直播间无法完成该任务,原因未知。")])]),e.h("div",[e.h("strong","注意:"),e.h("span","点赞只能点亮正在直播的直播间对应的粉丝勋章。")])])},danmu:{title:"发送弹幕",message:e.h("p",[e.h("div","在已熄灭粉丝勋章对应的直播间发送一条弹幕,点亮粉丝勋章。"),e.h("div",[e.h("span","点击编辑弹幕按钮编辑发送的弹幕,脚本会从中按顺序循环抽取弹幕发送。"),e.h("span","部分直播间无法完成该任务,可能的原因有:"),e.h("div",[e.h("li","你被禁言了"),e.h("li","发言有粉丝勋章等级要求"),e.h("li",[e.h("span","特殊直播间(比如"),e.h("a",{href:"https://live.bilibili.com/54",rel:"noreferrer",target:"_blank"},"54"),e.h("span",")")])])])])}},watch:{title:"观看直播",message:e.h("p",[e.h("div","完成粉丝勋章的观看直播任务。"),e.h("div",[e.h("li","部分直播间因为没有设置直播分区导致任务无法完成。"),e.h("li","主播当前是否开播不会影响该任务的完成。"),e.h("li","脚本会按粉丝勋章的默认顺序逐个完成观看指定时长直播的任务。")]),e.h("div",[e.h("strong","注意:"),e.h("span","使用本功能时不能以任何方式观看直播(网页、APP、电视),否则可能无法获得任何亲密度。")])])}}},OtherTasks:{groupSign:{title:"应援团签到",message:"完成应援团签到任务。"},silverToCoin:{title:"银瓜子换硬币",message:e.h("p",[e.h("div","把银瓜子兑换为硬币。"),e.h("div","具体兑换规则请点击直播间页面的“立即充值→银瓜子商店”查看。")])},coinToSilver:{title:"硬币换银瓜子",message:e.h("p",[e.h("div","把硬币兑换为银瓜子。"),e.h("div","具体兑换规则请点击直播间页面的“立即充值→银瓜子商店”查看。")])},getYearVipPrivilege:{title:"领取年度大会员权益",message:e.h("p",[e.h("div","自动领取年度大会员权益。"),e.h("div",[e.h("span","具体权益请前往"),e.h("a",{href:"https://account.bilibili.com/account/big/myPackage",rel:"noreferrer",target:"_blank"},"卡券包"),e.h("span","查看。")])])}}},EnhanceExperience:{switchLiveStreamQuality:{title:"自动切换画质",message:e.h("p",[e.h("div","打开直播间后自动把播放器切换到指定画质。"),e.h("div","如果指定画质不存在,则还是使用B站的默认画质。")])},banp2p:{title:"禁用P2P",message:e.h("p",[e.h("div","禁用直播流的P2P上传/下载"),e.h("div","B站使用WebRTC技术把许多浏览器点对点(P2P)地连接起来,实现视频流和音频流的传输。这样做是为了减轻B站服务器的压力,但是会占用你一定的上行带宽(大约几百kb每秒)。如果你不想被占用上行带宽,可以开启该功能。若开启后发现观看直播时有明显卡顿,请关闭。")])},noReport:{title:"拦截日志数据上报",message:e.h("p",[e.h("div","禁止B站上报日志数据。"),e.h("div",[e.h("span","B站会实时地上报大量日志信息,比如直播观看情况、代码报错等等。开启本功能后绝大多数日志上报都会被拦截并返回一个成功的响应。如果追求更好的效果和性能表现建议使用带有广告拦截功能的浏览器拓展,比如"),e.h("a",{href:"https://github.com/gorhill/uBlock",rel:"noreferrer",target:"_blank"},"uBlock Origin"),e.h("span","。")])])},noSleep:{title:"屏蔽挂机检测",message:e.h("p",[e.h("div","屏蔽B站直播间的挂机检测。"),e.h("div","如果长时间没有操作,会提示“检测到您已离开当前屏幕,倒计时后即将暂停播放”。开启本功能后即可避免这种情况。")])},invisibility:{title:"隐身入场",message:e.h("p",[e.h("div","进入直播间时其他人不会收到提示,但还是会出现在高能用户榜单上。")])}},RemoveElement:{removePKBox:{title:"移除大乱斗元素",message:"移除直播间的大乱斗元素(进度条,弹出的提示等)。"},removeLiveWaterMark:{title:"移除直播间水印",message:"移除直播画面左上角的水印。"},removeShopPopover:{title:"移除直播间小黄车弹窗",message:"移除直播间左上角的小黄车弹窗。"},removeGameParty:{title:"移除直播间幻星派对标志",message:"移除直播间右下角的幻星派对标志。"},removeGiftPopover:{title:"移除礼物赠送提示弹窗",message:"移除直播间右下角的礼物赠送提示弹窗(赠送一个牛蛙牛蛙支持主播)。"},removeMicPopover:{title:"移除连麦状态提示",message:"移除直播间左上角的连麦提示弹窗(连线功能只能在手机端使用,快使用手机登录吧~)。"},removeComboCard:{title:"移除直播间相同弹幕连续提示",message:"移除直播间相同弹幕连续提示。"},removeRank:{title:"移除排行榜",message:"移除直播画面上方的人气榜/航海榜,赠送人气票的入口也在这里。"},removeGiftPlanet:{title:"移除礼物星球",message:"移除直播画面上方的礼物星球。"},removeActivityBanner:{title:"移除活动入口",message:"移除直播画面上方的活动入口,当前活动内容会滚动切换。"},removePKBanner:{title:"移除大乱斗入口",message:"移除直播画面上方的大乱斗入口,这里在有BLS的时候也会成为BLS的入口,和大乱斗的入口滚动切换。"},removeFlipView:{title:"移除礼物栏下方广告",message:"移除礼物栏下方广告。"},removeRecommendRoom:{title:"移除礼物栏下方推荐直播间",message:"移除礼物栏下方推荐直播间。"},removeLiveMosaic:{title:"移除直播间马赛克",message:"移除部分直播间特有的马赛克。"}}},Ye=e.defineComponent({__name:"MainSiteTasks",setup(t){const i=Je(),o=i.moduleConfig.DailyTasks.MainSiteTasks,n=i.moduleStatus.DailyTasks.MainSiteTasks;return(t,i)=>{const a=e.resolveComponent("el-switch"),s=e.resolveComponent("Info"),r=e.resolveComponent("TaskStatus"),l=e.resolveComponent("el-space"),c=e.resolveComponent("el-row"),d=e.resolveComponent("el-option"),u=e.resolveComponent("el-select"),m=e.resolveComponent("el-text"),h=e.resolveComponent("el-divider"),g=e.resolveComponent("el-link");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(o).login.enabled,"onUpdate:modelValue":i[0]||(i[0]=t=>e.unref(o).login.enabled=t),"active-text":"每日登录"},null,8,["modelValue"]),e.createVNode(s,{item:e.unref(Qe).DailyTasks.MainSiteTasks.login},null,8,["item"]),e.createVNode(r,{status:e.unref(n).login},null,8,["status"])])),_:1})])),_:1}),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(o).watch.enabled,"onUpdate:modelValue":i[1]||(i[1]=t=>e.unref(o).watch.enabled=t),"active-text":"每日观看视频"},null,8,["modelValue"]),e.createVNode(s,{item:e.unref(Qe).DailyTasks.MainSiteTasks.watch},null,8,["item"]),e.createVNode(r,{status:e.unref(n).watch},null,8,["status"])])),_:1})])),_:1}),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(o).coin.enabled,"onUpdate:modelValue":i[2]||(i[2]=t=>e.unref(o).coin.enabled=t),"active-text":"每日投币"},null,8,["modelValue"]),e.createVNode(u,{modelValue:e.unref(o).coin.num,"onUpdate:modelValue":i[3]||(i[3]=t=>e.unref(o).coin.num=t),placeholder:"Select",style:{width:"64px"}},{default:e.withCtx((()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(5,(t=>e.createVNode(d,{key:t,label:t,value:t},null,8,["label","value"]))),64))])),_:1},8,["modelValue"]),e.createVNode(m,null,{default:e.withCtx((()=>[e.createTextVNode("个")])),_:1}),e.createVNode(s,{item:e.unref(Qe).DailyTasks.MainSiteTasks.coin},null,8,["item"]),e.createVNode(r,{status:e.unref(n).coin},null,8,["status"])])),_:1})])),_:1}),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(o).share.enabled,"onUpdate:modelValue":i[4]||(i[4]=t=>e.unref(o).share.enabled=t),"active-text":"每日分享视频"},null,8,["modelValue"]),e.createVNode(s,{item:e.unref(Qe).DailyTasks.MainSiteTasks.share},null,8,["item"]),e.createVNode(r,{status:e.unref(n).share},null,8,["status"])])),_:1})])),_:1}),e.createVNode(h),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(m,null,{default:e.withCtx((()=>[e.createVNode(m,null,{default:e.withCtx((()=>[e.createTextVNode("  主站每日任务的完成情况可在")])),_:1}),e.createVNode(g,{rel:"noreferrer",type:"primary",href:"https://account.bilibili.com/account/home",target:"_blank",style:{"vertical-align":"unset"}},{default:e.withCtx((()=>[e.createTextVNode("个人中心")])),_:1}),e.createVNode(m,null,{default:e.withCtx((()=>[e.createTextVNode("查看。")])),_:1}),e.createVNode(m,null,{default:e.withCtx((()=>[e.createTextVNode("数据更新可能有一定的延时。")])),_:1})])),_:1})])),_:1})])}}}),Ze=(t=>(e.pushScopeId("data-v-cccdc865"),t=t(),e.popScopeId(),t))((()=>e.createElementVNode("br",null,null,-1))),et={class:"avatar-wrap"},tt=b(e.defineComponent({__name:"LiveTasks",setup(t){const i=Je(),n=O(),a=i.moduleConfig.DailyTasks.LiveTasks,r=i.moduleStatus.DailyTasks.LiveTasks,l=e.ref(!1),c=e.computed((()=>a.medalTasks.light.danmuList.map((e=>({content:e}))))),d=()=>{s.ElMessageBox.prompt("请输入新增的弹幕内容","新增弹幕",{confirmButtonText:"确认",cancelButtonText:"取消",inputPattern:/^.{1,30}$/,inputErrorMessage:"弹幕内容不得为空且长度不能超过30",lockScroll:!1}).then((({value:e})=>{a.medalTasks.light.danmuList.push(e)})).catch((()=>{}))},u=e.ref(!1),m=e.computed((()=>{var e;return null==(e=n.filteredFansMedals)?void 0:e.map((e=>({avatar:e.anchor_info.avatar,nick_name:e.anchor_info.nick_name,medal_name:e.medal.medal_name,medal_level:e.medal.level,roomid:e.room_info.room_id})))})),h=e.ref(!1);let g=!0;const p=async()=>{u.value=!0,g&&(g=!1,await e.nextTick(),n.fansMedals?v(m.value):(h.value=!0,e.watch(m,(e=>{v(e),h.value=!1}),{once:!0}),i.emitter.emit("Default_FansMedals",{module:"LiveTasks"})))},f=e.ref(),v=e=>{e&&a.medalTasks.roomidList.forEach(((t,i)=>{var o;const n=e.find((e=>e.roomid===t));n?null==(o=f.value)||o.toggleRowSelection(n,!0):a.medalTasks.roomidList.splice(i,1)}))};function w(e){a.medalTasks.roomidList=e.map((e=>e.roomid))}function _(e){var t;null==(t=f.value)||t.toggleRowSelection(e,void 0)}return(t,i)=>{const n=e.resolveComponent("el-switch"),g=e.resolveComponent("Info"),v=e.resolveComponent("TaskStatus"),y=e.resolveComponent("el-space"),x=e.resolveComponent("el-row"),b=e.resolveComponent("el-divider"),k=e.resolveComponent("SemiSelect"),C=e.resolveComponent("el-icon"),T=e.resolveComponent("el-radio"),V=e.resolveComponent("el-button"),S=e.resolveComponent("el-radio-group"),N=e.resolveComponent("el-option"),P=e.resolveComponent("el-select"),E=e.resolveComponent("el-text"),R=e.resolveComponent("el-link"),M=e.resolveComponent("el-table-column"),B=e.resolveComponent("el-dialog"),D=e.resolveComponent("el-image"),I=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(y,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(a).sign.enabled,"onUpdate:modelValue":i[0]||(i[0]=t=>e.unref(a).sign.enabled=t),"active-text":"直播签到"},null,8,["modelValue"]),e.createVNode(g,{item:e.unref(Qe).DailyTasks.LiveTasks.sign},null,8,["item"]),e.createVNode(v,{status:e.unref(r).sign},null,8,["status"])])),_:1})])),_:1}),e.createVNode(b),e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(y,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(a).medalTasks.light.enabled,"onUpdate:modelValue":i[1]||(i[1]=t=>e.unref(a).medalTasks.light.enabled=t),"active-text":"点亮熄灭勋章"},null,8,["modelValue"]),e.createVNode(g,{item:e.unref(Qe).DailyTasks.LiveTasks.medalTasks.light.main},null,8,["item"]),e.createVNode(v,{status:e.unref(r).medalTasks.light},null,8,["status"])])),_:1})])),_:1}),e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(S,{modelValue:e.unref(a).medalTasks.light.mode,"onUpdate:modelValue":i[3]||(i[3]=t=>e.unref(a).medalTasks.light.mode=t),class:"radio-group"},{default:e.withCtx((()=>[e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(y,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(C,null,{default:e.withCtx((()=>[e.createVNode(k)])),_:1}),e.createVNode(T,{value:"like"},{default:e.withCtx((()=>[e.createTextVNode("点赞")])),_:1}),e.createVNode(g,{item:e.unref(Qe).DailyTasks.LiveTasks.medalTasks.light.like},null,8,["item"])])),_:1})])),_:1}),e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(y,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(C,null,{default:e.withCtx((()=>[e.createVNode(k)])),_:1}),e.createVNode(T,{value:"danmu"},{default:e.withCtx((()=>[e.createTextVNode("发送弹幕")])),_:1}),e.createVNode(V,{type:"primary",size:"small",icon:e.unref(o.Edit),onClick:i[2]||(i[2]=e=>l.value=!l.value)},{default:e.withCtx((()=>[e.createTextVNode("编辑弹幕 ")])),_:1},8,["icon"]),e.createVNode(g,{item:e.unref(Qe).DailyTasks.LiveTasks.medalTasks.light.danmu},null,8,["item"])])),_:1})])),_:1})])),_:1},8,["modelValue"])])),_:1}),e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(y,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(a).medalTasks.watch.enabled,"onUpdate:modelValue":i[4]||(i[4]=t=>e.unref(a).medalTasks.watch.enabled=t),"active-text":"观看直播"},null,8,["modelValue"]),e.createVNode(P,{modelValue:e.unref(a).medalTasks.watch.time,"onUpdate:modelValue":i[5]||(i[5]=t=>e.unref(a).medalTasks.watch.time=t),placeholder:"Select",style:{width:"70px"}},{default:e.withCtx((()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(24,(t=>e.createVNode(N,{key:t,label:5*t,value:5*t},null,8,["label","value"]))),64))])),_:1},8,["modelValue"]),e.createVNode(E,null,{default:e.withCtx((()=>[e.createTextVNode("分钟")])),_:1}),e.createVNode(g,{item:e.unref(Qe).DailyTasks.LiveTasks.medalTasks.watch},null,8,["item"]),e.createVNode(v,{status:e.unref(r).medalTasks.watch},null,8,["status"])])),_:1})])),_:1}),e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(y,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(a).medalTasks.isWhiteList,"onUpdate:modelValue":i[6]||(i[6]=t=>e.unref(a).medalTasks.isWhiteList=t),"active-text":"白名单","inactive-text":"黑名单"},null,8,["modelValue"]),e.createVNode(V,{type:"primary",size:"small",icon:e.unref(o.Edit),onClick:p},{default:e.withCtx((()=>[e.createTextVNode("编辑名单 ")])),_:1},8,["icon"]),e.createVNode(g,{item:e.unref(Qe).DailyTasks.LiveTasks.medalTasks.list},null,8,["item"])])),_:1})])),_:1}),e.createVNode(b),e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(E,null,{default:e.withCtx((()=>[e.createTextVNode("直播任务相关信息可在")])),_:1}),e.createVNode(R,{rel:"noreferrer",type:"primary",href:"https://link.bilibili.com/p/help/index#/audience-fans-medal",target:"_blank"},{default:e.withCtx((()=>[e.createTextVNode("帮助中心 ")])),_:1}),e.createVNode(E,null,{default:e.withCtx((()=>[e.createTextVNode("查看。")])),_:1})])),_:1}),Ze,e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(E,{tag:"b"},{default:e.withCtx((()=>[e.createTextVNode("注意:")])),_:1})])),_:1}),e.createVNode(x,null,{default:e.withCtx((()=>[e.createVNode(E,null,{default:e.withCtx((()=>[e.createTextVNode("  由于每天能通过完成任务获得亲密度的粉丝勋章数量有限,脚本默认仅为最多199个等级小于20的粉丝勋章完成观看直播任务。在脚本执行任务期间观看直播可能导致今天无法获取任何亲密度。 ")])),_:1})])),_:1}),e.createVNode(B,{modelValue:l.value,"onUpdate:modelValue":i[7]||(i[7]=e=>l.value=e),title:"编辑弹幕内容","lock-scroll":!1,width:"40%"},{footer:e.withCtx((()=>[e.createVNode(V,{type:"primary",onClick:d},{default:e.withCtx((()=>[e.createTextVNode("新增弹幕")])),_:1})])),default:e.withCtx((()=>[e.createVNode(e.unref(s.ElTable),{data:c.value,"max-height":"500"},{default:e.withCtx((()=>[e.createVNode(M,{type:"index",width:"50"}),e.createVNode(M,{prop:"content",label:"弹幕内容"}),e.createVNode(M,{label:"操作",width:"220",align:"center"},{default:e.withCtx((t=>[e.createVNode(V,{text:"",icon:e.unref(o.Edit),onClick:e=>{return i=t.$index,o=t.row,void s.ElMessageBox.prompt("请输入新的弹幕内容","修改弹幕",{confirmButtonText:"确认",cancelButtonText:"取消",inputPattern:/^.{1,30}$/,inputErrorMessage:"弹幕内容不得为空且长度不能超过30",inputValue:o.content,lockScroll:!1}).then((({value:e})=>{a.medalTasks.light.danmuList[i]=e})).catch((()=>{}));var i,o}},{default:e.withCtx((()=>[e.createTextVNode(" 修改 ")])),_:2},1032,["icon","onClick"]),e.createVNode(V,{text:"",icon:e.unref(o.Delete),type:"danger",onClick:e=>{return i=t.$index,void(1!==a.medalTasks.light.danmuList.length?a.medalTasks.light.danmuList.splice(i,1):s.ElMessage.warning({message:"至少要有一条弹幕",appendTo:".el-dialog"}));var i}},{default:e.withCtx((()=>[e.createTextVNode(" 删除 ")])),_:2},1032,["icon","onClick"])])),_:1})])),_:1},8,["data"])])),_:1},8,["modelValue"]),e.createVNode(B,{modelValue:u.value,"onUpdate:modelValue":i[9]||(i[9]=e=>u.value=e),title:"编辑粉丝勋章名单","lock-scroll":!1,width:"40%"},{default:e.withCtx((()=>[e.withDirectives((e.openBlock(),e.createBlock(e.unref(s.ElTable),{ref_key:"medalInfoTableRef",ref:f,data:m.value,"max-height":"500","empty-text":"没有粉丝勋章",onSelectionChange:w,onRowClick:_},{default:e.withCtx((()=>[e.createVNode(M,{type:"selection",align:"center",width:"55"}),e.createVNode(M,{prop:"avatar",label:"头像",width:"100"},{default:e.withCtx((t=>[e.createElementVNode("div",et,[e.createVNode(D,{src:t.row.avatar,loading:"lazy",referrerpolicy:"origin",class:"avatar"},{error:e.withCtx((()=>[e.createVNode(D,{src:"//i0.hdslb.com/bfs/face/member/noface.jpg",referrerpolicy:"origin",class:"avatar"})])),_:2},1032,["src"])])])),_:1}),e.createVNode(M,{prop:"nick_name",label:"昵称"}),e.createVNode(M,{prop:"medal_name",label:"粉丝勋章"}),e.createVNode(M,{prop:"medal_level",label:"等级",width:"80",sortable:""}),e.createVNode(M,{prop:"roomid",label:"房间号"},{default:e.withCtx((t=>[e.createVNode(R,{href:"https://live.bilibili.com/"+t.row.roomid+"?visit_id=",rel:"noreferrer",type:"primary",target:"_blank",onClick:i[8]||(i[8]=e.withModifiers((()=>{}),["stop"]))},{default:e.withCtx((()=>[e.createTextVNode(e.toDisplayString(t.row.roomid),1)])),_:2},1032,["href"])])),_:1})])),_:1},8,["data"])),[[I,h.value]])])),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-cccdc865"]]),it=e.defineComponent({__name:"OtherTasks",setup(t){const i=Je(),o=i.moduleConfig.DailyTasks.OtherTasks,n=i.moduleStatus.DailyTasks.OtherTasks;return(t,i)=>{const a=e.resolveComponent("el-switch"),s=e.resolveComponent("Info"),r=e.resolveComponent("TaskStatus"),l=e.resolveComponent("el-space"),c=e.resolveComponent("el-row"),d=e.resolveComponent("el-text"),u=e.resolveComponent("el-option"),m=e.resolveComponent("el-select"),h=e.resolveComponent("el-divider");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(o).groupSign.enabled,"onUpdate:modelValue":i[0]||(i[0]=t=>e.unref(o).groupSign.enabled=t),"active-text":"应援团签到"},null,8,["modelValue"]),e.createVNode(s,{item:e.unref(Qe).DailyTasks.OtherTasks.groupSign},null,8,["item"]),e.createVNode(r,{status:e.unref(n).groupSign},null,8,["status"])])),_:1})])),_:1}),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:""},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(o).silverToCoin.enabled,"onUpdate:modelValue":i[1]||(i[1]=t=>e.unref(o).silverToCoin.enabled=t),"active-text":"银瓜子换硬币"},null,8,["modelValue"]),e.createVNode(s,{item:e.unref(Qe).DailyTasks.OtherTasks.silverToCoin},null,8,["item"]),e.createVNode(r,{status:e.unref(n).silverToCoin},null,8,["status"])])),_:1})])),_:1}),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(o).coinToSilver.enabled,"onUpdate:modelValue":i[2]||(i[2]=t=>e.unref(o).coinToSilver.enabled=t),"active-text":"硬币换银瓜子"},null,8,["modelValue"]),e.createVNode(d,null,{default:e.withCtx((()=>[e.createTextVNode("花费硬币")])),_:1}),e.createVNode(m,{modelValue:e.unref(o).coinToSilver.num,"onUpdate:modelValue":i[3]||(i[3]=t=>e.unref(o).coinToSilver.num=t),placeholder:"Select",style:{width:"64px"}},{default:e.withCtx((()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(50,(t=>e.createVNode(u,{key:t,label:t,value:t},null,8,["label","value"]))),64))])),_:1},8,["modelValue"]),e.createVNode(d,null,{default:e.withCtx((()=>[e.createTextVNode("个")])),_:1}),e.createVNode(s,{item:e.unref(Qe).DailyTasks.OtherTasks.coinToSilver},null,8,["item"]),e.createVNode(r,{status:e.unref(n).coinToSilver},null,8,["status"])])),_:1})])),_:1}),e.createVNode(c,null,{default:e.withCtx((()=>[e.createVNode(l,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(o).getYearVipPrivilege.enabled,"onUpdate:modelValue":i[4]||(i[4]=t=>e.unref(o).getYearVipPrivilege.enabled=t),"active-text":"领取年度大会员权益"},null,8,["modelValue"]),e.createVNode(s,{item:e.unref(Qe).DailyTasks.OtherTasks.getYearVipPrivilege},null,8,["item"]),e.createVNode(r,{status:e.unref(n).getYearVipPrivilege},null,8,["status"])])),_:1})])),_:1}),e.createVNode(h)])}}}),ot=e.defineComponent({__name:"EnhanceExperience",setup(t){const i=Je().moduleConfig.EnhanceExperience,o=["原画","蓝光PRO","蓝光","超清PRO","超清","高清"];return(t,n)=>{const a=e.resolveComponent("el-switch"),s=e.resolveComponent("el-option"),r=e.resolveComponent("el-select"),l=e.resolveComponent("Info"),c=e.resolveComponent("el-space"),d=e.resolveComponent("el-row"),u=e.resolveComponent("el-divider");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(d,null,{default:e.withCtx((()=>[e.createVNode(c,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).switchLiveStreamQuality.enabled,"onUpdate:modelValue":n[0]||(n[0]=t=>e.unref(i).switchLiveStreamQuality.enabled=t),"active-text":"自动切换画质"},null,8,["modelValue"]),e.createVNode(r,{modelValue:e.unref(i).switchLiveStreamQuality.qualityDesc,"onUpdate:modelValue":n[1]||(n[1]=t=>e.unref(i).switchLiveStreamQuality.qualityDesc=t),placeholder:"Select",style:{width:"110px"}},{default:e.withCtx((()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(t=>e.createVNode(s,{key:t,label:t,value:t},null,8,["label","value"]))),64))])),_:1},8,["modelValue"]),e.createVNode(l,{item:e.unref(Qe).EnhanceExperience.switchLiveStreamQuality},null,8,["item"])])),_:1})])),_:1}),e.createVNode(d,null,{default:e.withCtx((()=>[e.createVNode(c,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).banp2p.enabled,"onUpdate:modelValue":n[2]||(n[2]=t=>e.unref(i).banp2p.enabled=t),"active-text":"禁用P2P"},null,8,["modelValue"]),e.createVNode(l,{item:e.unref(Qe).EnhanceExperience.banp2p},null,8,["item"])])),_:1})])),_:1}),e.createVNode(d,null,{default:e.withCtx((()=>[e.createVNode(c,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).noReport.enabled,"onUpdate:modelValue":n[3]||(n[3]=t=>e.unref(i).noReport.enabled=t),"active-text":"拦截日志数据上报"},null,8,["modelValue"]),e.createVNode(l,{item:e.unref(Qe).EnhanceExperience.noReport},null,8,["item"])])),_:1})])),_:1}),e.createVNode(d,null,{default:e.withCtx((()=>[e.createVNode(c,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).noSleep.enabled,"onUpdate:modelValue":n[4]||(n[4]=t=>e.unref(i).noSleep.enabled=t),"active-text":"屏蔽挂机检测"},null,8,["modelValue"]),e.createVNode(l,{item:e.unref(Qe).EnhanceExperience.noSleep},null,8,["item"])])),_:1})])),_:1}),e.createVNode(d,null,{default:e.withCtx((()=>[e.createVNode(c,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(a,{modelValue:e.unref(i).invisibility.enabled,"onUpdate:modelValue":n[5]||(n[5]=t=>e.unref(i).invisibility.enabled=t),"active-text":"隐身入场"},null,8,["modelValue"]),e.createVNode(l,{item:e.unref(Qe).EnhanceExperience.invisibility},null,8,["item"])])),_:1})])),_:1}),e.createVNode(u)])}}}),nt=e.defineComponent({__name:"RemoveElement",setup(t){const i=Je().moduleConfig.RemoveElement;return(t,o)=>{const n=e.resolveComponent("el-switch"),a=e.resolveComponent("Info"),s=e.resolveComponent("el-space"),r=e.resolveComponent("el-row"),l=e.resolveComponent("el-divider");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(i).removePKBox.enabled,"onUpdate:modelValue":o[0]||(o[0]=t=>e.unref(i).removePKBox.enabled=t),"active-text":"移除大乱斗元素"},null,8,["modelValue"]),e.createVNode(a,{item:e.unref(Qe).RemoveElement.removePKBox},null,8,["item"])])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(i).removeLiveWaterMark.enabled,"onUpdate:modelValue":o[1]||(o[1]=t=>e.unref(i).removeLiveWaterMark.enabled=t),"active-text":"移除直播间水印"},null,8,["modelValue"]),e.createVNode(a,{item:e.unref(Qe).RemoveElement.removeLiveWaterMark},null,8,["item"])])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(i).removeShopPopover.enabled,"onUpdate:modelValue":o[2]||(o[2]=t=>e.unref(i).removeShopPopover.enabled=t),"active-text":"移除直播间小黄车弹窗"},null,8,["modelValue"]),e.createVNode(a,{item:e.unref(Qe).RemoveElement.removeShopPopover},null,8,["item"])])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(i).removeGameParty.enabled,"onUpdate:modelValue":o[3]||(o[3]=t=>e.unref(i).removeGameParty.enabled=t),"active-text":"移除直播间幻星派对标志"},null,8,["modelValue"]),e.createVNode(a,{item:e.unref(Qe).RemoveElement.removeGameParty},null,8,["item"])])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(i).removeGiftPopover.enabled,"onUpdate:modelValue":o[4]||(o[4]=t=>e.unref(i).removeGiftPopover.enabled=t),"active-text":"移除礼物赠送提示弹窗"},null,8,["modelValue"]),e.createVNode(a,{item:e.unref(Qe).RemoveElement.removeGiftPopover},null,8,["item"])])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(i).removeMicPopover.enabled,"onUpdate:modelValue":o[5]||(o[5]=t=>e.unref(i).removeMicPopover.enabled=t),"active-text":"移除连麦状态提示"},null,8,["modelValue"]),e.createVNode(a,{item:e.unref(Qe).RemoveElement.removeMicPopover},null,8,["item"])])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(i).removeComboCard.enabled,"onUpdate:modelValue":o[6]||(o[6]=t=>e.unref(i).removeComboCard.enabled=t),"active-text":"移除直播间相同弹幕连续提示"},null,8,["modelValue"]),e.createVNode(a,{item:e.unref(Qe).RemoveElement.removeComboCard},null,8,["item"])])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(i).removeRank.enabled,"onUpdate:modelValue":o[7]||(o[7]=t=>e.unref(i).removeRank.enabled=t),"active-text":"移除排行榜"},null,8,["modelValue"]),e.createVNode(a,{item:e.unref(Qe).RemoveElement.removeRank},null,8,["item"])])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(i).removeGiftPlanet.enabled,"onUpdate:modelValue":o[8]||(o[8]=t=>e.unref(i).removeGiftPlanet.enabled=t),"active-text":"移除礼物星球"},null,8,["modelValue"]),e.createVNode(a,{item:e.unref(Qe).RemoveElement.removeGiftPlanet},null,8,["item"])])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(i).removeActivityBanner.enabled,"onUpdate:modelValue":o[9]||(o[9]=t=>e.unref(i).removeActivityBanner.enabled=t),"active-text":"移除活动入口"},null,8,["modelValue"]),e.createVNode(a,{item:e.unref(Qe).RemoveElement.removeActivityBanner},null,8,["item"])])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(i).removePKBanner.enabled,"onUpdate:modelValue":o[10]||(o[10]=t=>e.unref(i).removePKBanner.enabled=t),"active-text":"移除大乱斗入口"},null,8,["modelValue"]),e.createVNode(a,{item:e.unref(Qe).RemoveElement.removePKBanner},null,8,["item"])])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(i).removeFlipView.enabled,"onUpdate:modelValue":o[11]||(o[11]=t=>e.unref(i).removeFlipView.enabled=t),"active-text":"移除礼物栏下方广告"},null,8,["modelValue"]),e.createVNode(a,{item:e.unref(Qe).RemoveElement.removeFlipView},null,8,["item"])])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{"wrap:size":"[8, 0]"},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(i).removeRecommendRoom.enabled,"onUpdate:modelValue":o[12]||(o[12]=t=>e.unref(i).removeRecommendRoom.enabled=t),"active-text":"移除礼物栏下方推荐直播间"},null,8,["modelValue"]),e.createVNode(a,{item:e.unref(Qe).RemoveElement.removeRecommendRoom},null,8,["item"])])),_:1})])),_:1}),e.createVNode(r,null,{default:e.withCtx((()=>[e.createVNode(s,{wrap:"",size:[8,0]},{default:e.withCtx((()=>[e.createVNode(n,{modelValue:e.unref(i).removeLiveMosaic.enabled,"onUpdate:modelValue":o[13]||(o[13]=t=>e.unref(i).removeLiveMosaic.enabled=t),"active-text":"移除直播间马赛克"},null,8,["modelValue"]),e.createVNode(a,{item:e.unref(Qe).RemoveElement.removeLiveMosaic},null,8,["item"])])),_:1})])),_:1}),e.createVNode(l)])}}}),at=b(e.defineComponent({__name:"ScriptSettings",setup(t){const i=y().uiConfig;return(t,o)=>{const n=e.resolveComponent("el-text"),a=e.resolveComponent("el-slider"),s=e.resolveComponent("el-space"),r=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(r,{align:"middle"},{default:e.withCtx((()=>[e.createVNode(s,{wrap:"",size:[16,0]},{default:e.withCtx((()=>[e.createVNode(n,{class:"label-text"},{default:e.withCtx((()=>[e.createTextVNode("控制面板宽度")])),_:1}),e.createVNode(a,{style:{width:"150px"},class:"slider",modelValue:e.unref(i).panelWidthPercent,"onUpdate:modelValue":o[0]||(o[0]=t=>e.unref(i).panelWidthPercent=t),min:30,max:60},null,8,["modelValue"])])),_:1})])),_:1})])}}}),[["__scopeId","data-v-1cb0d081"]]),st=e.defineComponent({components:{MainSiteTasks:Ye,LiveTasks:tt,OtherTasks:it,EnhanceExperience:ot,RemoveElement:nt,ScriptSettings:at}}),rt=e.defineComponent({...st,__name:"PanelMain",setup(t){const i=y();return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(i).uiConfig.activeMenuIndex)))}}),lt=b(e.defineComponent({__name:"App",setup(t){const o=y(),n=new F("App.vue");let a,s,l=o.uiConfig.isShowPanel;function c(){const e=a.getBoundingClientRect();o.livePlayerRect.top=e.top,o.livePlayerRect.left=e.left,o.livePlayerRect.height=e.height,o.livePlayerRect.width=e.width,o.windowScrollPosition.x=f.scrollX,o.windowScrollPosition.y=f.scrollY}o.uiConfig.isShowPanel=!1;const d=i.throttle((function(){o.changeShowPanel(),s.innerText=o.isShowPanelButtonText}),300);if(a=Q("#live-player-ctnr"),a){c(),function(e,t,i=5e3){return new Promise(((o,n)=>{const a=e.querySelector(t);if(a)return void o(a);const s=new MutationObserver((()=>{const i=e.querySelector(t);i&&(clearTimeout(r),s.disconnect(),o(i))}));s.observe(e,{childList:!0,subtree:!0});const r=setTimeout((()=>{s.disconnect(),n(new Error(`无法在${i}毫秒内找到${e.localName}的子节点${t}`))}),i)}))}(Q("#player-ctnr"),".left-ctnr.left-header-area",1e4).then((e=>{var t;s=Y("button"),s.setAttribute("class","blth_btn"),s.onclick=d,s.innerText=o.isShowPanelButtonText,e.append(s),Z()||r("alt+b",{element:null==(t=window.top)?void 0:t.document.documentElement},d),r("alt+b",d)})).catch((e=>n.error(e))),window.addEventListener("resize",(()=>c()));const e=new MutationObserver((()=>c()));e.observe(document.body,{attributes:!0}),e.observe(document.documentElement,{attributes:!0}),l&&(o.uiConfig.isShowPanel=!0)}else n.error("livePlayer not found");return(t,i)=>{const n=e.resolveComponent("el-header"),a=e.resolveComponent("el-aside"),s=e.resolveComponent("el-scrollbar"),r=e.resolveComponent("el-main"),l=e.resolveComponent("el-container"),c=e.resolveComponent("el-collapse-transition");return e.openBlock(),e.createBlock(c,null,{default:e.withCtx((()=>[e.withDirectives(e.createVNode(l,{style:e.normalizeStyle(e.unref(o).panelStyle),class:"base"},{default:e.withCtx((()=>[e.createVNode(n,{class:"header"},{default:e.withCtx((()=>[e.createVNode(k)])),_:1}),e.createVNode(l,null,{default:e.withCtx((()=>[e.createVNode(a,{class:"aside"},{default:e.withCtx((()=>[e.createVNode(C)])),_:1}),e.createVNode(r,{class:"main"},{default:e.withCtx((()=>[e.createVNode(s,{height:e.unref(o).scrollBarHeight},{default:e.withCtx((()=>[(e.openBlock(),e.createBlock(e.KeepAlive,null,[e.createVNode(e.Transition,{name:"fade",mode:"out-in"},{default:e.withCtx((()=>[e.createVNode(rt)])),_:1})],1024))])),_:1},8,["height"])])),_:1})])),_:1})])),_:1},8,["style"]),[[e.vShow,e.unref(o).uiConfig.isShowPanel]])])),_:1})}}}),[["__scopeId","data-v-24895187"]]);(e=>{const t=GM_getResourceText(e);GM_addStyle(t)})("element-plus/dist/index.css");const ct={},dt={xmlns:"http://www.w3.org/2000/svg",width:"128",height:"128",class:"icon",viewBox:"0 0 1024 1024"},ut=[e.createElementVNode("path",{d:"M831.825 63.94H191.94c-70.692 0-128 57.308-128 128v639.885c0 70.692 57.308 128 128 128h639.885c70.692 0 128-57.308 128-128V191.94c0-70.692-57.308-128-128-128zM895.885 832a63.835 63.835 0 0 1-63.973 63.886H192.088c-17.112 0-33.27-6.575-45.372-18.676S127.88 849.112 127.88 832V192a64.236 64.236 0 0 1 64.208-64.12h639.824A64.038 64.038 0 0 1 895.885 192v640z"},null,-1),e.createElementVNode("path",{d:"M791.998 351.852H536a31.97 31.97 0 0 0 0 63.94h256a31.97 31.97 0 0 0 0-63.94zm0 256.121H536a31.97 31.97 0 0 0 0 63.94h256a31.97 31.97 0 0 0 0-63.94zm-447.996-79.975c-61.856 0-111.986 50.144-111.986 111.985S282.16 751.97 344.002 751.97s111.985-50.144 111.985-111.986-50.13-111.985-111.985-111.985zm33.982 145.982a48.045 48.045 0 1 1 14.088-33.982 47.746 47.746 0 0 1-14.088 33.986zm39.412-376.586L311.999 402.787l-41.391-41.395a31.97 31.97 0 1 0-45.213 45.213l63.997 64.002a31.97 31.97 0 0 0 45.214 0l128-128a31.97 31.97 0 0 0-45.21-45.213z"},null,-1)];const mt=b(ct,[["render",function(t,i){return e.openBlock(),e.createElementBlock("svg",dt,ut)}]]),ht=(t=>(e.pushScopeId("data-v-38289ed3"),t=t(),e.popScopeId(),t))((()=>e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"128",height:"128",class:"icon",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"#276BC0",d:"M512.67 959.47c-246.343 0-446.76-200.632-446.76-447.24S266.326 64.98 512.67 64.98s446.76 200.642 446.76 447.25-200.416 447.24-446.76 447.24zm0-829.04c-210.291 0-381.38 171.283-381.38 381.8s171.089 381.79 381.38 381.79 381.381-171.273 381.381-381.79-171.09-381.8-381.38-381.8z"}),e.createElementVNode("path",{fill:"#276BC0",d:"M447.29 317.172a63.891 63.959 0 1 0 130.76 0 63.891 63.959 0 1 0-130.76 0Zm64.907 503.047c-30.093 0-54.235-24.416-54.235-54.541V482.062c0-30.126 24.142-54.541 54.235-54.541 30.094 0 54.236 24.416 54.236 54.541v283.616c0 30.125-24.142 54.54-54.236 54.54z"})],-1))),gt=b(e.defineComponent({__name:"InfoIcon",props:{item:{}},setup(t){const i=t,o=()=>{const{title:e,message:t}=i.item;s.ElMessageBox({title:e,message:t,lockScroll:!1,autofocus:!0,confirmButtonText:"OK"}).catch((()=>{}))};return(t,i)=>{const n=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(n,{class:"info-icon",onClick:o},{default:e.withCtx((()=>[ht])),_:1})}}}),[["__scopeId","data-v-38289ed3"]]),pt=b(e.defineComponent({__name:"TaskStatusIcon",props:{status:{}},setup:t=>(t,i)=>{const o=e.resolveComponent("Loading"),n=e.resolveComponent("el-icon"),a=e.resolveComponent("Select"),s=e.resolveComponent("CloseBold");return"running"===t.status?(e.openBlock(),e.createBlock(n,{key:0,class:"status-icon is-loading"},{default:e.withCtx((()=>[e.createVNode(o)])),_:1})):"done"===t.status?(e.openBlock(),e.createBlock(n,{key:1,class:"status-icon",style:{color:"#1ab059"}},{default:e.withCtx((()=>[e.createVNode(a)])),_:1})):"error"===t.status?(e.openBlock(),e.createBlock(n,{key:2,class:"status-icon",style:{color:"#ff6464"}},{default:e.withCtx((()=>[e.createVNode(s)])),_:1})):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-b4254e0f"]]),ft=Object.freeze(Object.defineProperty({__proto__:null,Info:gt,TaskStatus:pt,Tasks:mt},Symbol.toStringTag,{value:"Module"})),vt=new F("Main");vt.log("document.readyState",document.readyState);const wt=t.createPinia(),_t=Ke(wt),yt=Je(wt);if(_t.checkCurrentScriptType(),vt.log("当前脚本的类型为",_t.currentScriptType),"Main"===_t.currentScriptType&&_t.startMainBLTHAliveHeartBeat(),yt.loadModules("unknown"),await L("document-body"),document.head.innerHTML.includes("BilibiliLive")){const t=e.createApp(lt);t.use(s),t.use(wt);for(const[e,i]of Object.entries(c))t.component(e,i);for(const[e,i]of Object.entries(ft))t.component(e,i);yt.loadModules("yes"),await L("document-end");const i=Y("div");i.id="BLTH",document.body.append(i),t.mount(i)}}(Vue,Pinia,_,ElementPlusIconsVue,CryptoJS,luxon,ElementPlus,hotkeys); \ No newline at end of file diff --git a/dist/bilibili-live-tasks-helper.user.js b/dist/bilibili-live-tasks-helper.user.js index fb61110..e1600cb 100644 --- a/dist/bilibili-live-tasks-helper.user.js +++ b/dist/bilibili-live-tasks-helper.user.js @@ -3,7 +3,7 @@ // @name:en Bilibili Live Tasks Helper // @name:zh Bilibili Live Tasks Helper // @namespace https://github.com/andywang425 -// @version 7.1.7 +// @version 7.1.8 // @author andywang425 // @description Enhancing the experience of watching Bilibili live streaming. // @description:en Enhancing the experience of watching Bilibili live streaming. @@ -58,9 +58,9 @@ // @run-at document-start // ==/UserScript== -(e=>{if(typeof GM_addStyle=="function"){GM_addStyle(e);return}const t=document.createElement("style");t.textContent=e,document.head.append(t)})(" .title[data-v-f383a843]{padding-left:20px;align-items:baseline;display:flex}.header-big-text[data-v-f383a843]{font-size:var(--big-text-size);align-self:unset}.header-small-text[data-v-f383a843]{font-size:var(--small-text-size);align-self:unset;margin-left:10px;--small-text-size: 18px}.collapse-btn[data-v-f383a843]{display:flex;justify-content:center;align-items:center;height:100%;float:left;cursor:pointer}.avatar-wrap[data-v-3d7ec9d9]{width:80px;height:80px}.avatar[data-v-3d7ec9d9]{display:flex;justify-content:center;align-items:center;border-radius:50%}.radio-group[data-v-3d7ec9d9]{display:block;font-size:inherit}.base[data-v-3884f5fc]{z-index:1003;position:absolute;background-color:#fff;border-bottom:1px solid #e3e5e7;border-left:1px solid #e3e5e7;border-right:1px solid #e3e5e7}.header[data-v-3884f5fc]{position:relative;box-sizing:border-box;width:100%;font-size:var(--big-text-size);align-items:center;display:flex;border-bottom:1px solid #e3e5e7;height:60px;--big-text-size: 25px}.aside[data-v-3884f5fc]{width:auto}.aside #aside-el-menu[data-v-3884f5fc]:not(.el-menu--collapse){width:150px}.main[data-v-3884f5fc]{--main-top-botton-padding: calc(var(--el-main-padding) * .625);padding-top:var(--main-top-botton-padding);padding-bottom:var(--main-top-botton-padding)}.fade-enter-active[data-v-3884f5fc],.fade-leave-active[data-v-3884f5fc]{transition:opacity .1s ease}.fade-enter-from[data-v-3884f5fc],.fade-leave-to[data-v-3884f5fc]{opacity:0}.info-icon[data-v-38289ed3]{font-size:var(--el-font-size-base);cursor:pointer}.status-icon[data-v-b4254e0f]{font-size:var(--el-font-size-base)}.blth_btn{background-color:#23ade5;font-size:small;margin-inline-start:5px;color:#fff;border-radius:4px;border:none;padding:5px;cursor:pointer;box-shadow:0 0 2px #00000075;line-height:10px;margin-left:15px}.blth_btn:hover{background-color:#1097cc}.blth_btn:hover:active{background-color:#0e86b6;position:relative;top:1px}.el-message-box li{list-style:initial} "); +(e=>{if(typeof GM_addStyle=="function"){GM_addStyle(e);return}const t=document.createElement("style");t.textContent=e,document.head.append(t)})(" .title[data-v-f383a843]{padding-left:20px;align-items:baseline;display:flex}.header-big-text[data-v-f383a843]{font-size:var(--big-text-size);align-self:unset}.header-small-text[data-v-f383a843]{font-size:var(--small-text-size);align-self:unset;margin-left:10px;--small-text-size: 18px}.collapse-btn[data-v-f383a843]{display:flex;justify-content:center;align-items:center;height:100%;float:left;cursor:pointer}#aside-el-menu[data-v-42ddcb25]{height:100%}.avatar-wrap[data-v-cccdc865]{width:80px;height:80px}.avatar[data-v-cccdc865]{display:flex;justify-content:center;align-items:center;border-radius:50%}.radio-group[data-v-cccdc865]{display:block;font-size:inherit}.label-text[data-v-1cb0d081]{color:var(--el-text-color-primary);line-height:32px}.base[data-v-24895187]{z-index:1003;position:absolute;background-color:#fff;border-bottom:1px solid #e3e5e7;border-left:1px solid #e3e5e7;border-right:1px solid #e3e5e7}.header[data-v-24895187]{position:relative;box-sizing:border-box;width:100%;font-size:var(--big-text-size);align-items:center;display:flex;border-bottom:1px solid #e3e5e7;height:60px;--big-text-size: 25px}.aside[data-v-24895187]{width:auto}.aside #aside-el-menu[data-v-24895187]:not(.el-menu--collapse){width:150px}.main[data-v-24895187]{--main-top-botton-padding: calc(var(--el-main-padding) * .625);padding-top:var(--main-top-botton-padding);padding-bottom:var(--main-top-botton-padding)}.fade-enter-active[data-v-24895187]{animation:fade-in linear .2s}.info-icon[data-v-38289ed3]{font-size:var(--el-font-size-base);cursor:pointer}.status-icon[data-v-b4254e0f]{font-size:var(--el-font-size-base)}.blth_btn{background-color:#23ade5;font-size:small;margin-inline-start:5px;color:#fff;border-radius:4px;border:none;padding:5px;cursor:pointer;box-shadow:0 0 2px #00000075;line-height:10px;margin-left:15px}.blth_btn:hover{background-color:#1097cc}.blth_btn:hover:active{background-color:#0e86b6;position:relative;top:1px}.el-message-box li{list-style:initial}@media screen and (min-width: 1930px){html[lab-style*=adaptive] .base{zoom:.9375}}@media screen and (min-width: 2058px){html[lab-style*=adaptive] .base{zoom:.75}}@media screen and (min-width: 2570px){html[lab-style*=adaptive] .base{zoom:calc(2 / 3)}}@media screen and (min-width: 3210px){html[lab-style*=adaptive] .base{zoom:.5}}@media screen and (min-width: 3850px){html[lab-style*=adaptive] .base{zoom:.46875}} "); -(async function (vue, pinia$1, _, ElementPlusIconsVue, luxon, CryptoJS, ElementPlus, hotkeys) { +(async function (vue, pinia$1, _, ElementPlusIconsVue, CryptoJS, luxon, ElementPlus, hotkeys) { 'use strict'; function _interopNamespaceDefault(e) { @@ -85,7 +85,6 @@ var __defProp = Object.defineProperty; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); - var _a; var _GM_addStyle = /* @__PURE__ */ (() => typeof GM_addStyle != "undefined" ? GM_addStyle : void 0)(); var _GM_getValue = /* @__PURE__ */ (() => typeof GM_getValue != "undefined" ? GM_getValue : void 0)(); var _GM_setValue = /* @__PURE__ */ (() => typeof GM_setValue != "undefined" ? GM_setValue : void 0)(); @@ -95,7 +94,8 @@ ui: { isCollapse: false, isShowPanel: true, - activeMenuIndex: "MainSiteTasks" + activeMenuIndex: "MainSiteTasks", + panelWidthPercent: 40 }, modules: { DailyTasks: { @@ -193,9 +193,6 @@ }, invisibility: { enabled: false - }, - showContributionUserNum: { - enabled: false } }, RemoveElement: { @@ -298,24 +295,27 @@ LiveTasks: "直播任务", OtherTasks: "其它任务", EnhanceExperience: "体验优化", - RemoveElement: "移除元素" + RemoveElement: "移除元素", + ScriptSettings: "设置" }; const useUIStore = pinia$1.defineStore("ui", () => { const uiConfig = vue.reactive(Storage.getUiConfig()); const activeMenuName = vue.computed(() => { return index2name[uiConfig.activeMenuIndex]; }); - const baseStyleValue = vue.reactive({ + const livePlayerRect = vue.reactive({ top: 0, left: 0, height: 0, width: 0 }); - const baseStyle = vue.computed(() => ({ - top: baseStyleValue.top.toString() + "px", - left: baseStyleValue.left.toString() + "px", - height: baseStyleValue.height.toString() + "px", - width: baseStyleValue.width.toString() + "px" + const windowScrollPosition = vue.reactive({ x: 0, y: 0 }); + const panelStyle = vue.computed(() => ({ + // 此处若使用最新的滚动条位置(window.scrollX/Y),用户在调整控制面板宽度时可能导致面板在垂直方向上错位 + top: `${livePlayerRect.top + windowScrollPosition.y}px`, + left: `${livePlayerRect.left + windowScrollPosition.x}px`, + height: `${livePlayerRect.height}px`, + width: `${livePlayerRect.width * uiConfig.panelWidthPercent / 100}px` })); const isShowPanelButtonText = vue.computed(() => { if (uiConfig.isShowPanel) { @@ -324,7 +324,7 @@ return "显示控制面板"; } }); - const scrollBarHeight = vue.computed(() => (baseStyleValue.height - 60).toString() + "px"); + const scrollBarHeight = vue.computed(() => `${livePlayerRect.height - 60}px`); function changeCollapse() { uiConfig.isCollapse = !uiConfig.isCollapse; } @@ -341,8 +341,9 @@ return { isShowPanelButtonText, activeMenuName, - baseStyleValue, - baseStyle, + livePlayerRect, + windowScrollPosition, + panelStyle, scrollBarHeight, uiConfig, changeCollapse, @@ -351,7 +352,7 @@ }; }); const _hoisted_1$3 = { class: "title" }; - const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({ + const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({ __name: "PanelHeader", setup(__props) { const uiStore = useUIStore(); @@ -404,8 +405,8 @@ } return target; }; - const PanelHeader = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-f383a843"]]); - const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({ + const PanelHeader = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-f383a843"]]); + const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({ __name: "PanelAside", setup(__props) { const uiStore = useUIStore(); @@ -440,6 +441,11 @@ icon: "Scissor", title: "移除元素", index: "RemoveElement" + }, + { + icon: "Setting", + title: "设置", + index: "ScriptSettings" } ]; return (_ctx, _cache) => { @@ -510,108 +516,50 @@ }; } }); - const useBiliStore = pinia$1.defineStore("bili", () => { - const BilibiliLive2 = vue.ref(null); - const cookies = vue.ref(null); - const userInfo = vue.ref(null); - const giftConfig = vue.ref(null); - const dailyRewardInfo = vue.ref(null); - const dynamicVideos = vue.ref(null); - const fansMedals = vue.ref(null); - const filteredFansMedals = vue.computed( - () => { - var _a2; - return ((_a2 = fansMedals.value) == null ? void 0 : _a2.filter((m) => m.room_info.room_id !== 0)) ?? null; - } - ); - return { - BilibiliLive: BilibiliLive2, - userInfo, - giftConfig, - cookies, - dailyRewardInfo, - dynamicVideos, - fansMedals, - filteredFansMedals - }; - }); - let Request$1 = class Request2 { - constructor(url_prefix, orgin) { - /** 请求 URL 的前缀 */ - __publicField(this, "url_prefix"); - /** - * 请求 Header 中 Origin 的值,为了方便同时也是 Referer 的值 - */ - __publicField(this, "origin"); - this.url_prefix = url_prefix ?? ""; - this.origin = orgin ?? "https://bilibili.com"; - } - /** - * 发起一个 GET 请求 - * @param url 请求 URL 除去前缀的部分 - * @param params URL 参数 - * @param otherDetails GM_xmlhttpRequest 的 details 参数 - * @returns Promise - */ - get(url, params, otherDetails) { - return new Promise((resolve2, reject2) => { - const defaultDetails = { - method: "GET", - url: this.url_prefix + url + (params ? "?" + new URLSearchParams(params).toString() : ""), - responseType: "json", - headers: { - Accept: "application/json, text/plain, */*", - Referer: this.origin, - Origin: this.origin, - "Sec-Fetch-Site": "same-site" - }, - onload: function(response) { - resolve2(response.response); - }, - onerror: function(err) { - reject2(err); - } - }; - const details = _.defaultsDeep(otherDetails, defaultDetails); - _GM_xmlhttpRequest(details); - }); + const PanelAside = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-42ddcb25"]]); + luxon.Settings.defaultZone = "Asia/Shanghai"; + function isTimestampToday(timestamp, hour = 0, minute = 5) { + const time = luxon.DateTime.fromMillis(timestamp); + const startOfADay = luxon.DateTime.now().set({ + hour, + minute, + second: 0, + millisecond: 0 + }); + const startOfTomorrow = startOfADay.plus({ days: 1 }); + const startOfYesterday = startOfADay.minus({ days: 1 }); + if (luxon.DateTime.now() >= startOfADay) { + return time >= startOfADay && time < startOfTomorrow; + } else { + return time >= startOfYesterday && time < startOfADay; } - /** - * 发起一个 POST 请求 - * @param url 请求 URL 除去前缀的部分 - * @param data application/x-www-form-urlencoded 其它类型的数据需要在 otherDetails 中定义 - * @param otherDetails GM_xmlhttpRequest 的 details 参数 - * @returns Promise - */ - post(url, data, otherDetails) { - return new Promise((resolve2, reject2) => { - const defaultDetails = { - method: "POST", - url: this.url_prefix.concat(url), - data: new URLSearchParams(data).toString(), - responseType: "json", - headers: { - Accept: "application/json, text/plain, */*", - Referer: this.origin, - Origin: this.origin, - "Sec-Fetch-Site": "same-site", - "Content-Type": "application/x-www-form-urlencoded" - }, - onload: function(response) { - resolve2(response.response); - }, - onerror: function(err) { - reject2(err); - } - }; - const details = _.defaultsDeep(otherDetails, defaultDetails); - if (details.headers["Content-Type"] === "multipart/form-data") { - delete details.headers["Content-Type"]; - } - _GM_xmlhttpRequest(details); - }); + } + function delayToNextMoment(hour = 0, minute = 5) { + const now = luxon.DateTime.now(); + let nextTime = luxon.DateTime.local(now.year, now.month, now.day, hour, minute); + if (now > nextTime) { + nextTime = nextTime.plus({ days: 1 }); } - }; + const diff = nextTime.diff(now); + return { + // 时间戳 + ms: diff.toMillis(), + // 便于阅读的字符串,去掉开头的0小时和0分钟 + str: diff.toFormat("h小时m分钟s秒").replace(/^0小时/, "").replace(/^0分钟/, "") + }; + } + function isNowIn(startHour, startMinute, endHour, endMinute) { + const now = luxon.DateTime.now(); + const start = luxon.DateTime.local(now.year, now.month, now.day, startHour, startMinute); + const end = luxon.DateTime.local(now.year, now.month, now.day, endHour, endMinute); + return now >= start && now < end; + } + function ts() { + return Math.round(luxon.DateTime.now().toSeconds()); + } + function tsm() { + return luxon.DateTime.now().toMillis(); + } function uuid() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(char) { const randomInt = 16 * Math.random() | 0; @@ -621,6 +569,28 @@ function sleep(miliseconds) { return new Promise((resolve2) => setTimeout(resolve2, miliseconds)); } + function getFilenameFromUrl(url) { + return url.substring(url.lastIndexOf("/") + 1).split(".")[0]; + } + function addURLParams(url, params) { + if (!params) { + return url; + } + if (typeof params === "string") { + return url + "?" + params; + } else { + return url + "?" + new URLSearchParams(params).toString(); + } + } + function wbiSign(params) { + params.wts = ts(); + const query = Object.keys(params).sort().map((key) => { + const value = params[key].toString().replace(/[!'()*]/g, ""); + return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`; + }).join("&"); + const wbiSign2 = CryptoJS.MD5(query + useBiliStore().wbiSalt).toString(); + return query + "&w_rid=" + wbiSign2; + } function packFormData(json) { const formData = new FormData(); _.forEach(json, (value, key) => formData.append(key, value.toString())); @@ -705,49 +675,187 @@ } } } - luxon.Settings.defaultZone = "Asia/Shanghai"; - function isTimestampToday(timestamp, hour = 0, minute = 5) { - const time = luxon.DateTime.fromMillis(timestamp); - const startOfADay = luxon.DateTime.now().set({ - hour, - minute, - second: 0, - millisecond: 0 + const useBiliStore = pinia$1.defineStore("bili", () => { + const BilibiliLive2 = vue.ref(); + const cookies = vue.ref(); + const userInfo = vue.ref(); + const giftConfig = vue.ref(); + const dailyRewardInfo = vue.ref(); + const dynamicVideos = vue.ref(); + const fansMedals = vue.ref(); + const filteredFansMedals = vue.computed( + () => { + var _a; + return ((_a = fansMedals.value) == null ? void 0 : _a.filter((m) => m.room_info.room_id !== 0)) ?? []; + } + ); + const wbiSalt = vue.computed(() => { + if (!userInfo.value) { + return ""; + } + const imgKey = getFilenameFromUrl(userInfo.value.wbi_img.img_url); + const subKey = getFilenameFromUrl(userInfo.value.wbi_img.sub_url); + const imgAndSubKey = imgKey + subKey; + return [ + 46, + 47, + 18, + 2, + 53, + 8, + 23, + 32, + 15, + 50, + 10, + 31, + 58, + 3, + 45, + 35, + 27, + 43, + 5, + 49, + 33, + 9, + 42, + 19, + 29, + 28, + 14, + 39, + 12, + 38, + 41, + 13, + 37, + 48, + 7, + 16, + 24, + 55, + 40, + 61, + 26, + 17, + 0, + 1, + 60, + 51, + 30, + 4, + 22, + 25, + 54, + 21, + 56, + 59, + 6, + 63, + 57, + 62, + 11, + 36, + 20, + 34, + 44, + 52 + ].map((n) => imgAndSubKey[n]).join("").slice(0, 32); }); - const startOfTomorrow = startOfADay.plus({ days: 1 }); - const startOfYesterday = startOfADay.minus({ days: 1 }); - if (luxon.DateTime.now() >= startOfADay) { - return time >= startOfADay && time < startOfTomorrow; - } else { - return time >= startOfYesterday && time < startOfADay; - } - } - function delayToNextMoment(hour = 0, minute = 5) { - const now = luxon.DateTime.now(); - let nextTime = luxon.DateTime.local(now.year, now.month, now.day, hour, minute); - if (now > nextTime) { - nextTime = nextTime.plus({ days: 1 }); - } - const diff = nextTime.diff(now); return { - // 时间戳 - ms: diff.toMillis(), - // 便于阅读的字符串,去掉开头的0小时和0分钟 - str: diff.toFormat("h小时m分钟s秒").replace(/^0小时/, "").replace(/^0分钟/, "") + BilibiliLive: BilibiliLive2, + userInfo, + giftConfig, + cookies, + dailyRewardInfo, + dynamicVideos, + fansMedals, + filteredFansMedals, + wbiSalt }; - } - function isNowIn(startHour, startMinute, endHour, endMinute) { - const now = luxon.DateTime.now(); - const start = luxon.DateTime.local(now.year, now.month, now.day, startHour, startMinute); - const end = luxon.DateTime.local(now.year, now.month, now.day, endHour, endMinute); - return now >= start && now < end; - } - function ts() { - return Math.round(luxon.DateTime.now().toSeconds()); - } - function tsm() { - return luxon.DateTime.now().toMillis(); - } + }); + let Request$1 = class Request2 { + constructor(url_prefix, orgin) { + /** 请求 URL 的前缀 */ + __publicField(this, "url_prefix"); + /** + * 请求 Header 中 Origin 的值,为了方便同时也是 Referer 的值 + */ + __publicField(this, "origin"); + this.url_prefix = url_prefix ?? ""; + this.origin = orgin ?? "https://bilibili.com"; + } + /** + * 发起一个 GET 请求 + * @param url 请求 URL 除去前缀的部分 + * @param params URL 参数 + * @param otherDetails GM_xmlhttpRequest 的 details 参数 + */ + get(url, params, otherDetails) { + url = addURLParams(this.url_prefix + url, params); + return new Promise((resolve2, reject2) => { + const defaultDetails = { + method: "GET", + url, + responseType: "json", + headers: { + Accept: "application/json, text/plain, */*", + Referer: this.origin, + Origin: this.origin, + "Sec-Fetch-Site": "same-site" + }, + onload: function(response) { + resolve2(response.response); + }, + onerror: function(err) { + reject2(err); + } + }; + const details = _.defaultsDeep(otherDetails, defaultDetails); + _GM_xmlhttpRequest(details); + }); + } + /** + * 发起一个 POST 请求 + * @param url 请求 URL 除去前缀的部分 + * @param data POST data + * @param otherDetails GM_xmlhttpRequest 的 details 参数(特别的,可以提供 params 属性作为 URL 参数) + */ + post(url, data, otherDetails) { + const headers = { + Accept: "application/json, text/plain, */*", + Referer: this.origin, + Origin: this.origin, + "Sec-Fetch-Site": "same-site", + "Content-Type": "application/x-www-form-urlencoded" + }; + if (data instanceof FormData) { + delete headers["Content-Type"]; + } else if (typeof data === "object") { + data = new URLSearchParams(data).toString(); + } + url = addURLParams(this.url_prefix + url, otherDetails == null ? void 0 : otherDetails.params); + otherDetails == null ? true : delete otherDetails.params; + return new Promise((resolve2, reject2) => { + const defaultDetails = { + method: "POST", + url, + data, + responseType: "json", + headers, + onload: function(response) { + resolve2(response.response); + }, + onerror: function(err) { + reject2(err); + } + }; + const details = _.defaultsDeep(otherDetails, defaultDetails); + _GM_xmlhttpRequest(details); + }); + } + }; const request = { live: new Request$1("https://api.live.bilibili.com", "https://live.bilibili.com"), liveTrace: new Request$1("https://live-trace.bilibili.com", "https://live.bilibili.com"), @@ -778,11 +886,12 @@ page_size }); }, - sendMsg: (msg, roomid, room_type = 0, mode = 1, jumpfrom = 0, fontsize = 25, color = 16777215, bubble = 0, reply_mid = 0, reply_attr = 0, replay_dmid = "", statistics = { appId: 100, platform: 5 }) => { + sendMsg: (msg, roomid, room_type = 0, mode = 1, jumpfrom = 0, fontsize = 25, color = 16777215, bubble = 0, reply_mid = 0, reply_attr = 0, replay_dmid = "", statistics = '{"appId":100,"platform":5}') => { const biliStore = useBiliStore(); const bili_jct = biliStore.cookies.bili_jct; - return request.live.post("/msg/send", void 0, { - data: packFormData({ + return request.live.post( + "/msg/send", + packFormData({ bubble, msg, color, @@ -792,41 +901,40 @@ reply_mid, reply_attr, replay_dmid, - statistics: JSON.stringify(statistics), + statistics, fontsize, rnd: ts(), roomid, csrf: bili_jct, csrf_token: bili_jct - }), - headers: { - "Content-Type": "multipart/form-data" - } - }); + }) + ); }, likeReport: (room_id, anchor_id, click_time = 1, visit_id = "") => { - var _a2; const biliStore = useBiliStore(); const bili_jct = biliStore.cookies.bili_jct; - const uid = (_a2 = biliStore.BilibiliLive) == null ? void 0 : _a2.UID; + const uid = biliStore.BilibiliLive.UID; return request.live.post("/xlive/app-ucenter/v1/like_info_v3/like/likeReportV3", { click_time, room_id, - anchor_id, uid, - ts: ts(), - csrf: bili_jct, + anchor_id, csrf_token: bili_jct, + csrf: bili_jct, visit_id }); }, /** * 该API只在带有多层iframe(背景很好看)的直播间中被使用,但参数填任意直播间均可 */ - getInfoByRoom: (room_id) => { - return request.live.get("/xlive/web-room/v1/index/getInfoByRoom", { - room_id - }); + getInfoByRoom: (room_id, web_location = "444.8") => { + return request.live.get( + "/xlive/web-room/v1/index/getInfoByRoom", + wbiSign({ + room_id, + web_location + }) + ); }, getUserTaskProgress: (target_id = 11153765) => { const biliStore = useBiliStore(); @@ -865,16 +973,6 @@ visit_id }); }, - queryContributionRank: (ruid, room_id, page, page_size, type = "online_rank", _switch = "contribution_rank") => { - return request.live.get("/xlive/general-interface/v1/rank/queryContributionRank", { - ruid, - room_id, - page, - page_size, - type, - switch: _switch - }); - }, wearMedal: (medal_id, visit_id = "") => { const bili_jct = useBiliStore().cookies.bili_jct; return request.live.post("/xlive/web-room/v1/fansMedal/wear", { @@ -928,39 +1026,70 @@ reward: () => { return request.main.get("/x/member/web/exp/reward"); }, - dynamicAll: (type, page = 1, timezone_offset = -480, features = "itemOpusStyle") => { - return request.main.get("/x/polymer/web-dynamic/v1/feed/all", { - timezone_offset, - type, - page, - features - }); + dynamicAll: (type = "video", page = 1, timezone_offset = -480, platform = "web", features = "itemOpusStyle,listOnlyfans,opusBigCover,onlyfansVote,decorationCard,onlyfansAssetsV2,forwardListHidden,ugcDelete", web_location = "333.1365", x_bili_device_req_json = '{"platform":"web","device":"pc"}', x_bili_web_req_json = '{"spm_id":"333.1365"}') => { + return request.main.get( + "/x/polymer/web-dynamic/v1/feed/all", + { + timezone_offset, + type, + platform, + page, + features, + web_location, + x_bili_device_req_json, + x_bili_web_req_json + }, + { + Origin: "https://t.bilibili.com", + Referer: "https://t.bilibili.com/" + } + ); }, - videoHeartbeat: (aid, cid = "", realtime = 0, played_time = 0, real_played_time = 0, refer_url = "https://t.bilibili.com/?spm_id_from=444.3.0.0", quality = 116, video_duration = 100, type = 3, sub_type = 0, play_type = 0, dt = 2, last_play_progress_time = 0, max_play_progress_time = 0, spmid = "333.488.0.0", from_spmid = "333.31.list.card_archive.click", extra = '{"player_version":"4.1.21-rc.1727.0"}') => { - var _a2; + videoHeartbeat: (aid, cid = 1e9, type = 3, sub_type = 0, dt = 2, play_type = 1, realtime = 61, played_time = 62, real_played_time = 62, refer_url = "https://t.bilibili.com/?tab=video", quality = 64, video_duration = 180, last_play_progress_time = 62, max_play_progress_time = 62, outer = 0, spmid = "333.788.0.0", from_spmid = "333.1365.list.card_archive.click", session = uuid().replaceAll("-", ""), extra = '{"player_version":"4.8.43"}', web_location = 1315873) => { const biliStore = useBiliStore(); - return request.main.post("/x/click-interface/web/heartbeat", { - start_ts: ts(), - mid: (_a2 = useBiliStore().userInfo) == null ? void 0 : _a2.mid, - aid, - cid, - type, - sub_type, - dt, - play_type, - realtime, - played_time, - real_played_time, - refer_url, - quality, - video_duration, - last_play_progress_time, - max_play_progress_time, - spmid, - from_spmid, - extra, - csrf: biliStore.cookies.bili_jct - }); + const start_ts = ts(); + const mid = useBiliStore().userInfo.mid; + return request.main.post( + "/x/click-interface/web/heartbeat", + { + start_ts, + mid, + aid, + cid, + type, + sub_type, + dt, + play_type, + realtime, + played_time, + real_played_time, + refer_url, + quality, + video_duration, + last_play_progress_time, + max_play_progress_time, + outer, + spmid, + from_spmid, + session, + extra, + csrf: biliStore.cookies.bili_jct + }, + { + params: wbiSign({ + w_start_ts: start_ts, + w_mid: mid, + w_aid: aid, + w_dt: dt, + w_realtime: realtime, + w_played_time: played_time, + w_real_played_time: real_played_time, + w_video_duration: video_duration, + w_last_play_progress_time: last_play_progress_time, + web_location + }) + } + ); }, share: (aid, source = "pc_client_normal", eab_x = 2, ramval = 0, ga = 1) => { const bili_jct = useBiliStore().cookies.bili_jct; @@ -994,17 +1123,16 @@ }); }, vip: { - myPrivilege: () => { - const bili_jct = useBiliStore().cookies.bili_jct; + myPrivilege: (web_location = "333.33") => { return request.main.get( "/x/vip/privilege/my", { - csrf: bili_jct + web_location }, { headers: { Referer: "https://account.bilibili.com/account/big/myPackage", - Origin: "https://account.bilibili.com/account/big/myPackage" + Origin: "https://account.bilibili.com" } } ); @@ -1027,11 +1155,10 @@ ); }, addExperience: () => { - var _a2, _b, _c; const biliStore = useBiliStore(); - const mid = (_a2 = biliStore.BilibiliLive) == null ? void 0 : _a2.UID; - const buvid = (_b = biliStore.cookies) == null ? void 0 : _b.buvid3; - const bili_jct = (_c = biliStore.cookies) == null ? void 0 : _c.bili_jct; + const mid = biliStore.BilibiliLive.UID; + const buvid = biliStore.cookies.buvid3; + const bili_jct = biliStore.cookies.bili_jct; return request.main.post( "/x/vip/experience/add", { @@ -1230,8 +1357,6 @@ this.logger.error("获取主站每日任务完成情况出错", error); return Promise.reject(error); } - } else { - return Promise.resolve(null); } } async run() { @@ -1264,8 +1389,6 @@ this.logger.error("获取主站每日任务完成情况出错", error); return Promise.reject(error); } - } else { - return Promise.resolve(null); } } async run() { @@ -1320,8 +1443,6 @@ this.logger.error("获取粉丝勋章列表出错", error); return Promise.reject(error); } - } else { - return Promise.resolve(null); } } async run() { @@ -1330,8 +1451,8 @@ setTimeout(async () => { const firstPageMedals = await this.getFansMetals(1, true); firstPageMedals == null ? void 0 : firstPageMedals.forEach((firstPageMedal) => { - var _a2; - if ((_a2 = biliStore.fansMedals) == null ? void 0 : _a2.every((m) => m.medal.target_id !== firstPageMedal.medal.target_id)) { + var _a; + if ((_a = biliStore.fansMedals) == null ? void 0 : _a.every((m) => m.medal.target_id !== firstPageMedal.medal.target_id)) { biliStore.fansMedals.push(firstPageMedal); } }); @@ -1341,48 +1462,73 @@ }); } } - function getCookie(name) { - const value = `; ${document.cookie}`; - const parts = value.split(`; ${name}=`); - if (parts.length === 2) return parts.pop().split(";").shift(); - return null; - } - function getCookies(names) { - const cookies = {}; - const namesSet = new Set(names); - for (const name of namesSet) { - cookies[name] = null; - } - for (const cookie of document.cookie.split("; ")) { - const [cookieName, ...cookieValueParts] = cookie.split("="); - const cookieValue = cookieValueParts.join("="); - if (namesSet.has(cookieName)) { - cookies[cookieName] = decodeURIComponent(cookieValue); - namesSet.delete(cookieName); - if (namesSet.size === 0) break; + class Cookie { + /** + * 获取所有 cookies + */ + static getAll() { + if (document.cookie === "") return {}; + const cookies = document.cookie.split("; "); + const result = {}; + for (const cookie of cookies) { + const [name, value] = cookie.split("=", 2); + result[decodeURIComponent(name)] = decodeURIComponent(value); } + return result; } - return cookies; - } - function getCookiesAsync(names, interval = 200, timeout = 1e4) { - return new Promise((resolve2, reject2) => { - const startTime = Date.now(); - const remainNamesSet = new Set(names); - const cookies = {}; - const timer = setInterval(() => { - Object.assign(cookies, getCookies(remainNamesSet)); - for (const name in cookies) { - if (cookies[name] !== null) remainNamesSet.delete(name); + /** + * 获取指定名称的一个或多个 cookies + * @param names cookie 名称或 cookie 名称数组 + * @param defaultValue 当 cookie 不存在时使用的默认值,默认 undefined + */ + static get(names, defaultValue) { + const cookies = this.getAll(); + if (Array.isArray(names)) { + const result = {}; + for (const name of names) { + result[name] = cookies[name] ? cookies[name] : defaultValue; } - if (remainNamesSet.size === 0) { - clearInterval(timer); + return result; + } else { + return cookies[names] ? cookies[names] : defaultValue; + } + } + /** + * 获取一组 cookies,如果有 cookie 未获取到,会反复获取直到超时为止 + * + * TODO: 等 cookieStore 普及后使用监听取代轮询 + * + * @param names 要获取的 cookie 名称数组 + * @param interval 获取间隔,默认 300 毫秒 + * @param timeout 超时时间,若留空则永不超时 + */ + static getAsync(names, interval = 300, timeout) { + return new Promise((resolve2, reject2) => { + let remainCookieNames = [...names]; + const cookies = this.get(remainCookieNames); + remainCookieNames = remainCookieNames.filter((r) => !cookies[r]); + if (remainCookieNames.length === 0) { resolve2(cookies); - } else if (timeout !== -1 && Date.now() - startTime > timeout) { - clearInterval(timer); - reject2("获取以下Cookies超时: " + [...remainNamesSet]); + return; } - }, interval); - }); + let timeoutTimer; + const timer = setInterval(() => { + Object.assign(cookies, this.get(remainCookieNames)); + remainCookieNames = remainCookieNames.filter((r) => !cookies[r]); + if (remainCookieNames.length === 0) { + if (timeout) clearTimeout(timeoutTimer); + clearInterval(timer); + resolve2(cookies); + } + }, interval); + if (timeout) { + timeoutTimer = setTimeout(() => { + clearInterval(timer); + reject2(`获取以下 cookie 超时:${remainCookieNames}`); + }, timeout); + } + }); + } } class Cookies extends BaseModule { /** @@ -1393,7 +1539,7 @@ * buvid3: 作为参数 buvid 在请求中出现,目前仅在主站 API 中使用 */ getCookies() { - return getCookiesAsync(["bili_jct", "LIVE_BUVID", "buvid3"]); + return Cookie.getAsync(["bili_jct", "LIVE_BUVID", "buvid3"], 300, 1e4); } async run() { useBiliStore().cookies = await this.getCookies(); @@ -1456,7 +1602,7 @@ const biliStore = useBiliStore(); if (!isTimestampToday(this.config._lastCompleteTime)) { this.status = "running"; - if (biliStore.dailyRewardInfo && !biliStore.dailyRewardInfo.login) { + if (!biliStore.dailyRewardInfo.login) { await this.login(); } else { this.config._lastCompleteTime = tsm(); @@ -1486,15 +1632,11 @@ } getAid() { const biliStore = useBiliStore(); - if (!_.isEmpty(biliStore.dynamicVideos)) { - return biliStore.dynamicVideos[0].modules.module_dynamic.major.archive.aid; - } else { - return "2"; - } + return Number(biliStore.dynamicVideos[0].modules.module_dynamic.major.archive.aid); } async watch(aid) { try { - const response = await BAPI.main.videoHeartbeat(aid); + const response = await BAPI.main.videoHeartbeat(aid, _.random(1e9, 2e9)); this.logger.log(`BAPI.main.videoHeartbeat(${aid}) response`, response); if (response.code === 0) { this.logger.log("每日观看视频任务已完成"); @@ -1515,7 +1657,7 @@ const biliStore = useBiliStore(); if (!isTimestampToday(this.config._lastCompleteTime)) { this.status = "running"; - if (biliStore.dailyRewardInfo && !biliStore.dailyRewardInfo.watch) { + if (!biliStore.dailyRewardInfo.watch) { const aid = this.getAid(); await this.watch(aid); } else { @@ -1547,11 +1689,7 @@ } getAid() { const biliStore = useBiliStore(); - if (biliStore.dynamicVideos) { - return biliStore.dynamicVideos[0].modules.module_dynamic.major.archive.aid; - } else { - return "2"; - } + return biliStore.dynamicVideos[0].modules.module_dynamic.major.archive.aid; } async share(aid) { try { @@ -1576,7 +1714,7 @@ const biliStore = useBiliStore(); if (!isTimestampToday(this.config._lastCompleteTime)) { this.status = "running"; - if (biliStore.dailyRewardInfo && !biliStore.dailyRewardInfo.share) { + if (!biliStore.dailyRewardInfo.share) { const aid = this.getAid(); await this.share(aid); } else { @@ -1618,18 +1756,13 @@ */ getDynamicVideoIds() { const biliStore = useBiliStore(); - if (biliStore.dynamicVideos) { - return biliStore.dynamicVideos.map((item) => { - const archive = item.modules.module_dynamic.major.archive; - return { - aid: archive.aid, - bvid: archive.bvid - }; - }); - } else { - this.status = "error"; - return null; - } + return biliStore.dynamicVideos.map((item) => { + const archive = item.modules.module_dynamic.major.archive; + return { + aid: archive.aid, + bvid: archive.bvid + }; + }); } /** * 获取一个视频的你的已投硬币数量 @@ -1708,23 +1841,21 @@ const biliStore = useBiliStore(); if (!isTimestampToday(this.config._lastCompleteTime)) { this.status = "running"; - if (biliStore.dailyRewardInfo) { - const total_coined_num = biliStore.dailyRewardInfo.coins / 10; - if (total_coined_num < this.config.num) { - const left_coin_num = this.config.num - total_coined_num; - const biliStore2 = useBiliStore(); - const money = biliStore2.userInfo.money ?? 5; - if (left_coin_num > money) { - this.logger.log("硬币余额不足,不执行每日投币任务"); - this.status = "done"; - } else { - await this.coinDynamicVideos(left_coin_num); - } - } else { - this.config._lastCompleteTime = tsm(); + const total_coined_num = biliStore.dailyRewardInfo.coins / 10; + if (total_coined_num < this.config.num) { + const left_coin_num = this.config.num - total_coined_num; + const biliStore2 = useBiliStore(); + const money = biliStore2.userInfo.money ?? 5; + if (left_coin_num > money) { + this.logger.log("硬币余额不足,不执行每日投币任务"); this.status = "done"; - this.logger.log("每日投币任务已完成"); + } else { + await this.coinDynamicVideos(left_coin_num); } + } else { + this.config._lastCompleteTime = tsm(); + this.status = "done"; + this.logger.log("每日投币任务已完成"); } } else { if (isNowIn(0, 0, 0, 5)) { @@ -1871,7 +2002,13 @@ const response = await BAPI.live.sendMsg(danmu, roomid); this.logger.log(`BAPI.live.sendMsg(${danmu}, ${roomid})`, response); if (response.code === 0) { - this.logger.log(`点亮熄灭勋章-发送弹幕 在直播间 ${roomid} 发送弹幕 ${danmu} 成功`); + if (response.msg === "k") { + this.logger.warn( + `点亮熄灭勋章-发送弹幕 在直播间 ${roomid} 发送弹幕 ${danmu} 异常,弹幕可能包含屏蔽词` + ); + } else { + this.logger.log(`点亮熄灭勋章-发送弹幕 在直播间 ${roomid} 发送弹幕 ${danmu} 成功`); + } } else { this.logger.error( `点亮熄灭勋章-发送弹幕 在直播间 ${roomid} 发送弹幕 ${danmu} 失败`, @@ -1932,7 +2069,7 @@ __publicField(this, "ruid"); __publicField(this, "seq", 0); /** Cookie LIVE_BUVID */ - __publicField(this, "buvid", ((_a = useBiliStore().cookies) == null ? void 0 : _a.LIVE_BUVID) ?? getCookie("LIVE_BUVID")); + __publicField(this, "buvid", useBiliStore().cookies.LIVE_BUVID); __publicField(this, "uuid", uuid()); /** 计算签名和发送请求时均需要 JSON.stringify */ __publicField(this, "device", [this.buvid, this.uuid]); @@ -2476,7 +2613,7 @@ isYearVip() { const biliStore = useBiliStore(); const userInfo = biliStore.userInfo; - if (userInfo && userInfo.vip.status === 1 && userInfo.vip.type === 2) { + if (userInfo.vip.status === 1 && userInfo.vip.type === 2) { return true; } else { this.logger.log("当前账号不是年度大会员,不领取权益"); @@ -2509,7 +2646,7 @@ if (watchTaskConfig.enabled) { vue.watch( () => watchTaskConfig._lastCompleteTime, - () => this.addExperience(), + () => sleep(3e3).then(() => this.addExperience()), { once: true } ); } else { @@ -2571,17 +2708,11 @@ }, timeout); }); } - const isTargetFrame = () => { - if (document.head.innerHTML.includes("BilibiliLive")) { - return true; - } else { - return false; - } - }; - const isSelfTopFrame = () => _unsafeWindow.self === _unsafeWindow.top; - const topFrameDocuemntElement = () => { - var _a2, _b; - return (_b = (_a2 = _unsafeWindow.top) == null ? void 0 : _a2.document) == null ? void 0 : _b.documentElement; + const isTargetFrame = () => document.head.innerHTML.includes("BilibiliLive"); + const isSelfTopFrame = () => window.self === window.top; + const topFrameDocumentElement = () => { + var _a; + return (_a = window.top) == null ? void 0 : _a.document.documentElement; }; class SwitchLiveStreamQuality extends BaseModule { constructor() { @@ -2592,7 +2723,7 @@ return new Promise((resolve2, reject2) => { const topWindow = _unsafeWindow.top ? _unsafeWindow.top : _unsafeWindow; const findPlayertimer = setInterval(() => { - if (topWindow.livePlayer && Object.prototype.hasOwnProperty.call(topWindow.livePlayer, "switchQuality") && Object.prototype.hasOwnProperty.call(topWindow.livePlayer, "getPlayerInfo")) { + if (topWindow.livePlayer && Object.hasOwn(topWindow.livePlayer, "switchQuality") && Object.hasOwn(topWindow.livePlayer, "getPlayerInfo")) { clearInterval(findPlayertimer); clearTimeout(timeoutTimer); resolve2(topWindow.livePlayer); @@ -2658,7 +2789,7 @@ "webkitRTCPeerConnection" ]; for (const i of RTClist) { - if (Object.prototype.hasOwnProperty.call(_unsafeWindow, i)) { + if (Object.hasOwn(_unsafeWindow, i)) { Object.defineProperty(_unsafeWindow, i, { value: class { constructor() { @@ -3141,11 +3272,7 @@ * @param url 需要判断的 URL */ static isTargetURL(url) { - if (url.includes("//data.bilibili.com") || url.includes("//data.bilivideo.com")) { - return true; - } else { - return false; - } + return url.includes("//data.bilibili.com") || url.includes("//data.bilivideo.com"); } /** * 劫持一些能减少日志上报的方法 @@ -3273,58 +3400,6 @@ __publicField(Invisibility, "runAt", "document-start"); __publicField(Invisibility, "runAfterDefault", false); __publicField(Invisibility, "onFrame", "all"); - class ShowContributionUserNum extends BaseModule { - constructor() { - super(...arguments); - __publicField(this, "config", this.moduleStore.moduleConfig.EnhanceExperience.showContributionUserNum); - } - async getContributionUserNum(anchor_uid, roomid, page = 1, page_size = 100) { - return BAPI.live.queryContributionRank(anchor_uid, roomid, page, page_size).then((response) => { - this.logger.log( - `BAPI.live.queryContributionRank(${anchor_uid}, ${roomid}, ${page}, ${page_size})`, - response - ); - if (response.code === 0) { - return response.data.count; - } else { - this.logger.error("获取高能用户数量失败", response.message); - return -1; - } - }); - } - /** - * 更新显示的高能用户数量 - * @param element 高能用户的 DOM 元素 - * @param anchor_uid 主播uid - * @param roomid 房间号 - */ - async updateNumber(element, anchor_uid, roomid) { - const num = await this.getContributionUserNum(anchor_uid, roomid, 1, 100); - if (num !== -1) { - element.innerText = `高能用户(${num})`; - setTimeout(() => this.updateNumber(element, anchor_uid, roomid), _.random(5e4, 7e4)); - } else { - element.innerText = "高能用户"; - } - } - async run() { - var _a2; - this.logger.log("显示高能用户数量模块开始运行"); - if (this.config.enabled) { - const biliStore = useBiliStore(); - const anchor_uid = biliStore.BilibiliLive.ANCHOR_UID; - const roomid = biliStore.BilibiliLive.ROOMID; - const element = (_a2 = await waitForElement(document.body, "#rank-list-ctnr-box .tab-list")) == null ? void 0 : _a2.firstChild; - if (element) { - this.updateNumber(element, anchor_uid, roomid); - } else { - this.logger.error("未找到高能用户标签"); - } - } - } - } - __publicField(ShowContributionUserNum, "runOnMultiplePages", true); - __publicField(ShowContributionUserNum, "runAt", "window-load"); class RemovePKBox extends BaseModule { constructor() { super(...arguments); @@ -3339,8 +3414,8 @@ for (const mutation of mutationsList) { mutation.addedNodes.forEach((addedNode) => { if (addedNode instanceof HTMLElement && addedNode.classList.contains("link-toast") && blackWordList.some((word) => { - var _a2; - return (_a2 = addedNode.textContent) == null ? void 0 : _a2.includes(word); + var _a; + return (_a = addedNode.textContent) == null ? void 0 : _a.includes(word); })) { addedNode.style.display = "none"; } @@ -3544,7 +3619,6 @@ EnhanceExperience_Invisibility: Invisibility, EnhanceExperience_NoReport: NoReport, EnhanceExperience_NoSleep: NoSleep, - EnhanceExperience_ShowContributionUserNum: ShowContributionUserNum, EnhanceExperience_SwitchLiveStreamQuality: SwitchLiveStreamQuality, RemoveElement_RemoveActivityBanner: RemoveActitityBanner, RemoveElement_RemoveComboCard: RemoveComboCard, @@ -3835,7 +3909,7 @@ vue.h("strong", "注意:"), vue.h( "span", - "如果当前所处的直播间正在直播,可能无法获得任何亲密度。请在未开播的直播间使用本功能,后续会优化这一点。" + "使用本功能时不能以任何方式观看直播(网页、APP、电视),否则可能无法获得任何亲密度。" ) ]) ]) @@ -3935,12 +4009,6 @@ invisibility: { title: "隐身入场", message: vue.h("p", [vue.h("div", "进入直播间时其他人不会收到提示,但还是会出现在高能用户榜单上。")]) - }, - showContributionUserNum: { - title: "显示高能用户数量", - message: vue.h("p", [ - vue.h("div", "在高能用户标签上显示当前直播间的高能用户数量,每分钟更新一次数据。") - ]) } }, RemoveElement: { @@ -4002,7 +4070,7 @@ } } }; - const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({ + const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({ __name: "MainSiteTasks", setup(__props) { const moduleStore2 = useModuleStore(); @@ -4022,7 +4090,10 @@ return vue.openBlock(), vue.createElementBlock("div", null, [ vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).login.enabled, @@ -4043,7 +4114,10 @@ }), vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).watch.enabled, @@ -4064,7 +4138,10 @@ }), vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).coin.enabled, @@ -4108,7 +4185,10 @@ }), vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).share.enabled, @@ -4172,10 +4252,10 @@ }; } }); - const _withScopeId$1 = (n) => (vue.pushScopeId("data-v-3d7ec9d9"), n = n(), vue.popScopeId(), n); + const _withScopeId$1 = (n) => (vue.pushScopeId("data-v-cccdc865"), n = n(), vue.popScopeId(), n); const _hoisted_1$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue.createElementVNode("br", null, null, -1)); const _hoisted_2$1 = { class: "avatar-wrap" }; - const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({ + const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({ __name: "LiveTasks", setup(__props) { const moduleStore2 = useModuleStore(); @@ -4226,8 +4306,8 @@ const medalInfoPanelVisible = vue.ref(false); const medalInfoTableData = vue.computed( () => { - var _a2; - return (_a2 = biliStore.filteredFansMedals) == null ? void 0 : _a2.map((medal) => ({ + var _a; + return (_a = biliStore.filteredFansMedals) == null ? void 0 : _a.map((medal) => ({ avatar: medal.anchor_info.avatar, nick_name: medal.anchor_info.nick_name, medal_name: medal.medal.medal_name, @@ -4265,10 +4345,10 @@ const initSelection = (rows) => { if (rows) { config.medalTasks.roomidList.forEach((roomid, index) => { - var _a2; + var _a; const row = rows.find((row2) => row2.roomid === roomid); if (row) { - (_a2 = medalInfoTableRef.value) == null ? void 0 : _a2.toggleRowSelection(row, true); + (_a = medalInfoTableRef.value) == null ? void 0 : _a.toggleRowSelection(row, true); } else { config.medalTasks.roomidList.splice(index, 1); } @@ -4278,11 +4358,9 @@ function handleSelectionChange(selectedRows) { config.medalTasks.roomidList = selectedRows.map((row) => row.roomid); } - function handleRowClick(row, _column, event) { - var _a2; - if (!event.target.className.startsWith("el-link")) { - (_a2 = medalInfoTableRef.value) == null ? void 0 : _a2.toggleRowSelection(row, void 0); - } + function handleRowClick(row) { + var _a; + (_a = medalInfoTableRef.value) == null ? void 0 : _a.toggleRowSelection(row, void 0); } return (_ctx, _cache) => { const _component_el_switch = vue.resolveComponent("el-switch"); @@ -4307,7 +4385,10 @@ return vue.openBlock(), vue.createElementBlock("div", null, [ vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).sign.enabled, @@ -4329,7 +4410,10 @@ vue.createVNode(_component_el_divider), vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).medalTasks.light.enabled, @@ -4358,7 +4442,10 @@ default: vue.withCtx(() => [ vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_icon, null, { default: vue.withCtx(() => [ @@ -4383,7 +4470,10 @@ }), vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_icon, null, { default: vue.withCtx(() => [ @@ -4425,7 +4515,10 @@ }), vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).medalTasks.watch.enabled, @@ -4469,7 +4562,10 @@ }), vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).medalTasks.isWhiteList, @@ -4619,7 +4715,7 @@ }, 8, ["modelValue"]), vue.createVNode(_component_el_dialog, { modelValue: medalInfoPanelVisible.value, - "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => medalInfoPanelVisible.value = $event), + "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => medalInfoPanelVisible.value = $event), title: "编辑粉丝勋章名单", "lock-scroll": false, width: "40%" @@ -4689,7 +4785,9 @@ href: "https://live.bilibili.com/" + scope.row.roomid + "?visit_id=", rel: "noreferrer", type: "primary", - target: "_blank" + target: "_blank", + onClick: _cache[8] || (_cache[8] = vue.withModifiers(() => { + }, ["stop"])) }, { default: vue.withCtx(() => [ vue.createTextVNode(vue.toDisplayString(scope.row.roomid), 1) @@ -4711,8 +4809,8 @@ }; } }); - const LiveTasks = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-3d7ec9d9"]]); - const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({ + const LiveTasks = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-cccdc865"]]); + const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({ __name: "OtherTasks", setup(__props) { const moduleStore2 = useModuleStore(); @@ -4773,7 +4871,10 @@ }), vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).coinToSilver.enabled, @@ -4823,7 +4924,10 @@ }), vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).getYearVipPrivilege.enabled, @@ -4847,7 +4951,7 @@ }; } }); - const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({ + const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({ __name: "EnhanceExperience", setup(__props) { const moduleStore2 = useModuleStore(); @@ -4864,7 +4968,10 @@ return vue.openBlock(), vue.createElementBlock("div", null, [ vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).switchLiveStreamQuality.enabled, @@ -4899,7 +5006,10 @@ }), vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).banp2p.enabled, @@ -4917,7 +5027,10 @@ }), vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).noReport.enabled, @@ -4935,7 +5048,10 @@ }), vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).noSleep.enabled, @@ -4953,7 +5069,10 @@ }), vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).invisibility.enabled, @@ -4969,30 +5088,12 @@ ]), _: 1 }), - vue.createVNode(_component_el_row, null, { - default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { - default: vue.withCtx(() => [ - vue.createVNode(_component_el_switch, { - modelValue: vue.unref(config).showContributionUserNum.enabled, - "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => vue.unref(config).showContributionUserNum.enabled = $event), - "active-text": "显示高能用户数量" - }, null, 8, ["modelValue"]), - vue.createVNode(_component_Info, { - item: vue.unref(helpInfo).EnhanceExperience.showContributionUserNum - }, null, 8, ["item"]) - ]), - _: 1 - }) - ]), - _: 1 - }), vue.createVNode(_component_el_divider) ]); }; } }); - const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({ + const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({ __name: "RemoveElement", setup(__props) { const moduleStore2 = useModuleStore(); @@ -5006,14 +5107,19 @@ return vue.openBlock(), vue.createElementBlock("div", null, [ vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).removePKBox.enabled, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.unref(config).removePKBox.enabled = $event), "active-text": "移除大乱斗元素" }, null, 8, ["modelValue"]), - vue.createVNode(_component_Info, { id: "RemoveElement.removePKBox" }) + vue.createVNode(_component_Info, { + item: vue.unref(helpInfo).RemoveElement.removePKBox + }, null, 8, ["item"]) ]), _: 1 }) @@ -5022,14 +5128,19 @@ }), vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).removeLiveWaterMark.enabled, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.unref(config).removeLiveWaterMark.enabled = $event), "active-text": "移除直播间水印" }, null, 8, ["modelValue"]), - vue.createVNode(_component_Info, { id: "RemoveElement.removeLiveWaterMark" }) + vue.createVNode(_component_Info, { + item: vue.unref(helpInfo).RemoveElement.removeLiveWaterMark + }, null, 8, ["item"]) ]), _: 1 }) @@ -5038,14 +5149,19 @@ }), vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).removeShopPopover.enabled, "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.unref(config).removeShopPopover.enabled = $event), "active-text": "移除直播间小黄车弹窗" }, null, 8, ["modelValue"]), - vue.createVNode(_component_Info, { id: "RemoveElement.removeShopPopover" }) + vue.createVNode(_component_Info, { + item: vue.unref(helpInfo).RemoveElement.removeShopPopover + }, null, 8, ["item"]) ]), _: 1 }) @@ -5054,14 +5170,19 @@ }), vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).removeGameParty.enabled, "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.unref(config).removeGameParty.enabled = $event), "active-text": "移除直播间幻星派对标志" }, null, 8, ["modelValue"]), - vue.createVNode(_component_Info, { id: "RemoveElement.removeGameParty" }) + vue.createVNode(_component_Info, { + item: vue.unref(helpInfo).RemoveElement.removeGameParty + }, null, 8, ["item"]) ]), _: 1 }) @@ -5070,14 +5191,19 @@ }), vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).removeGiftPopover.enabled, "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => vue.unref(config).removeGiftPopover.enabled = $event), "active-text": "移除礼物赠送提示弹窗" }, null, 8, ["modelValue"]), - vue.createVNode(_component_Info, { id: "RemoveElement.removeGiftPopover" }) + vue.createVNode(_component_Info, { + item: vue.unref(helpInfo).RemoveElement.removeGiftPopover + }, null, 8, ["item"]) ]), _: 1 }) @@ -5086,14 +5212,19 @@ }), vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).removeMicPopover.enabled, "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => vue.unref(config).removeMicPopover.enabled = $event), "active-text": "移除连麦状态提示" }, null, 8, ["modelValue"]), - vue.createVNode(_component_Info, { id: "RemoveElement.removeMicPopover" }) + vue.createVNode(_component_Info, { + item: vue.unref(helpInfo).RemoveElement.removeMicPopover + }, null, 8, ["item"]) ]), _: 1 }) @@ -5102,14 +5233,19 @@ }), vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).removeComboCard.enabled, "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => vue.unref(config).removeComboCard.enabled = $event), "active-text": "移除直播间相同弹幕连续提示" }, null, 8, ["modelValue"]), - vue.createVNode(_component_Info, { id: "RemoveElement.removeComboCard" }) + vue.createVNode(_component_Info, { + item: vue.unref(helpInfo).RemoveElement.removeComboCard + }, null, 8, ["item"]) ]), _: 1 }) @@ -5118,14 +5254,19 @@ }), vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).removeRank.enabled, "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => vue.unref(config).removeRank.enabled = $event), "active-text": "移除排行榜" }, null, 8, ["modelValue"]), - vue.createVNode(_component_Info, { id: "RemoveElement.removeRank" }) + vue.createVNode(_component_Info, { + item: vue.unref(helpInfo).RemoveElement.removeRank + }, null, 8, ["item"]) ]), _: 1 }) @@ -5134,14 +5275,19 @@ }), vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).removeGiftPlanet.enabled, "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => vue.unref(config).removeGiftPlanet.enabled = $event), "active-text": "移除礼物星球" }, null, 8, ["modelValue"]), - vue.createVNode(_component_Info, { id: "RemoveElement.removeGiftPlanet" }) + vue.createVNode(_component_Info, { + item: vue.unref(helpInfo).RemoveElement.removeGiftPlanet + }, null, 8, ["item"]) ]), _: 1 }) @@ -5150,14 +5296,19 @@ }), vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).removeActivityBanner.enabled, "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => vue.unref(config).removeActivityBanner.enabled = $event), "active-text": "移除活动入口" }, null, 8, ["modelValue"]), - vue.createVNode(_component_Info, { id: "RemoveElement.removeActivityBanner" }) + vue.createVNode(_component_Info, { + item: vue.unref(helpInfo).RemoveElement.removeActivityBanner + }, null, 8, ["item"]) ]), _: 1 }) @@ -5166,14 +5317,19 @@ }), vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).removePKBanner.enabled, "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => vue.unref(config).removePKBanner.enabled = $event), "active-text": "移除大乱斗入口" }, null, 8, ["modelValue"]), - vue.createVNode(_component_Info, { id: "RemoveElement.removePKBanner" }) + vue.createVNode(_component_Info, { + item: vue.unref(helpInfo).RemoveElement.removePKBanner + }, null, 8, ["item"]) ]), _: 1 }) @@ -5182,14 +5338,19 @@ }), vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).removeFlipView.enabled, "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => vue.unref(config).removeFlipView.enabled = $event), "active-text": "移除礼物栏下方广告" }, null, 8, ["modelValue"]), - vue.createVNode(_component_Info, { id: "RemoveElement.removeFlipView" }) + vue.createVNode(_component_Info, { + item: vue.unref(helpInfo).RemoveElement.removeFlipView + }, null, 8, ["item"]) ]), _: 1 }) @@ -5198,14 +5359,16 @@ }), vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { "wrap:size": "[8, 0]" }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).removeRecommendRoom.enabled, "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => vue.unref(config).removeRecommendRoom.enabled = $event), "active-text": "移除礼物栏下方推荐直播间" }, null, 8, ["modelValue"]), - vue.createVNode(_component_Info, { id: "RemoveElement.removeRecommendRoom" }) + vue.createVNode(_component_Info, { + item: vue.unref(helpInfo).RemoveElement.removeRecommendRoom + }, null, 8, ["item"]) ]), _: 1 }) @@ -5214,14 +5377,19 @@ }), vue.createVNode(_component_el_row, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_space, { wrap: "" }, { + vue.createVNode(_component_el_space, { + wrap: "", + size: [8, 0] + }, { default: vue.withCtx(() => [ vue.createVNode(_component_el_switch, { modelValue: vue.unref(config).removeLiveMosaic.enabled, "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => vue.unref(config).removeLiveMosaic.enabled = $event), "active-text": "移除直播间马赛克" }, null, 8, ["modelValue"]), - vue.createVNode(_component_Info, { id: "RemoveElement.removeLiveMosaic" }) + vue.createVNode(_component_Info, { + item: vue.unref(helpInfo).RemoveElement.removeLiveMosaic + }, null, 8, ["item"]) ]), _: 1 }) @@ -5233,13 +5401,56 @@ }; } }); + const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({ + __name: "ScriptSettings", + setup(__props) { + const uiConfig = useUIStore().uiConfig; + return (_ctx, _cache) => { + const _component_el_text = vue.resolveComponent("el-text"); + const _component_el_slider = vue.resolveComponent("el-slider"); + const _component_el_space = vue.resolveComponent("el-space"); + const _component_el_row = vue.resolveComponent("el-row"); + return vue.openBlock(), vue.createElementBlock("div", null, [ + vue.createVNode(_component_el_row, { align: "middle" }, { + default: vue.withCtx(() => [ + vue.createVNode(_component_el_space, { + wrap: "", + size: [16, 0] + }, { + default: vue.withCtx(() => [ + vue.createVNode(_component_el_text, { class: "label-text" }, { + default: vue.withCtx(() => [ + vue.createTextVNode("控制面板宽度") + ]), + _: 1 + }), + vue.createVNode(_component_el_slider, { + style: { "width": "150px" }, + class: "slider", + modelValue: vue.unref(uiConfig).panelWidthPercent, + "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.unref(uiConfig).panelWidthPercent = $event), + min: 30, + max: 60 + }, null, 8, ["modelValue"]) + ]), + _: 1 + }) + ]), + _: 1 + }) + ]); + }; + } + }); + const ScriptSettings = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-1cb0d081"]]); const __default__ = vue.defineComponent({ components: { - MainSiteTasks: _sfc_main$9, + MainSiteTasks: _sfc_main$a, LiveTasks, - OtherTasks: _sfc_main$7, - EnhanceExperience: _sfc_main$6, - RemoveElement: _sfc_main$5 + OtherTasks: _sfc_main$8, + EnhanceExperience: _sfc_main$7, + RemoveElement: _sfc_main$6, + ScriptSettings } }); const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({ @@ -5261,42 +5472,44 @@ uiStore.uiConfig.isShowPanel = false; let livePlayer; let button; - function setPanelSize() { + function updatePosition() { const rect = livePlayer.getBoundingClientRect(); - uiStore.baseStyleValue.top = rect.top + window.scrollY; - uiStore.baseStyleValue.left = rect.left + window.scrollX; - uiStore.baseStyleValue.height = rect.height; - uiStore.baseStyleValue.width = rect.width * 0.4; + uiStore.livePlayerRect.top = rect.top; + uiStore.livePlayerRect.left = rect.left; + uiStore.livePlayerRect.height = rect.height; + uiStore.livePlayerRect.width = rect.width; + uiStore.windowScrollPosition.x = _unsafeWindow.scrollX; + uiStore.windowScrollPosition.y = _unsafeWindow.scrollY; } function buttonOnClick() { uiStore.changeShowPanel(); button.innerText = uiStore.isShowPanelButtonText; } - const throttleButtoOnClick = _.throttle(buttonOnClick, 300); + const throttleButtonOnClick = _.throttle(buttonOnClick, 300); livePlayer = dq("#live-player-ctnr"); if (livePlayer) { - setPanelSize(); + updatePosition(); waitForElement(dq("#player-ctnr"), ".left-ctnr.left-header-area", 1e4).then((playerHeaderLeft) => { button = dce("button"); button.setAttribute("class", "blth_btn"); - button.onclick = throttleButtoOnClick; + button.onclick = throttleButtonOnClick; button.innerText = uiStore.isShowPanelButtonText; playerHeaderLeft.append(button); if (!isSelfTopFrame()) { hotkeys( "alt+b", { - element: topFrameDocuemntElement() + element: topFrameDocumentElement() }, - throttleButtoOnClick + throttleButtonOnClick ); } - hotkeys("alt+b", throttleButtoOnClick); + hotkeys("alt+b", throttleButtonOnClick); }).catch((e) => logger2.error(e)); - window.addEventListener("resize", () => setPanelSize()); - const observer = new MutationObserver(() => setPanelSize()); - observer.observe(document.documentElement, { attributes: true }); + window.addEventListener("resize", () => updatePosition()); + const observer = new MutationObserver(() => updatePosition()); observer.observe(document.body, { attributes: true }); + observer.observe(document.documentElement, { attributes: true }); if (isShowPanel) { uiStore.uiConfig.isShowPanel = true; } @@ -5306,14 +5519,14 @@ return (_ctx, _cache) => { const _component_el_header = vue.resolveComponent("el-header"); const _component_el_aside = vue.resolveComponent("el-aside"); + const _component_el_scrollbar = vue.resolveComponent("el-scrollbar"); const _component_el_main = vue.resolveComponent("el-main"); const _component_el_container = vue.resolveComponent("el-container"); - const _component_el_scrollbar = vue.resolveComponent("el-scrollbar"); const _component_el_collapse_transition = vue.resolveComponent("el-collapse-transition"); return vue.openBlock(), vue.createBlock(_component_el_collapse_transition, null, { default: vue.withCtx(() => [ vue.withDirectives(vue.createVNode(_component_el_container, { - style: vue.normalizeStyle(vue.unref(uiStore).baseStyle), + style: vue.normalizeStyle(vue.unref(uiStore).panelStyle), class: "base" }, { default: vue.withCtx(() => [ @@ -5323,19 +5536,19 @@ ]), _: 1 }), - vue.createVNode(_component_el_scrollbar, { - height: vue.unref(uiStore).scrollBarHeight - }, { + vue.createVNode(_component_el_container, null, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_container, null, { + vue.createVNode(_component_el_aside, { class: "aside" }, { default: vue.withCtx(() => [ - vue.createVNode(_component_el_aside, { class: "aside" }, { - default: vue.withCtx(() => [ - vue.createVNode(_sfc_main$a) - ]), - _: 1 - }), - vue.createVNode(_component_el_main, { class: "main" }, { + vue.createVNode(PanelAside) + ]), + _: 1 + }), + vue.createVNode(_component_el_main, { class: "main" }, { + default: vue.withCtx(() => [ + vue.createVNode(_component_el_scrollbar, { + height: vue.unref(uiStore).scrollBarHeight + }, { default: vue.withCtx(() => [ (vue.openBlock(), vue.createBlock(vue.KeepAlive, null, [ vue.createVNode(vue.Transition, { @@ -5350,13 +5563,13 @@ ], 1024)) ]), _: 1 - }) + }, 8, ["height"]) ]), _: 1 }) ]), _: 1 - }, 8, ["height"]) + }) ]), _: 1 }, 8, ["style"]), [ @@ -5368,7 +5581,7 @@ }; } }); - const App = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-3884f5fc"]]); + const App = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-24895187"]]); const cssLoader = (e) => { const t = GM_getResourceText(e); return GM_addStyle(t), t; @@ -5520,4 +5733,4 @@ app.mount(div); } -})(Vue, Pinia, _, ElementPlusIconsVue, luxon, CryptoJS, ElementPlus, hotkeys); \ No newline at end of file +})(Vue, Pinia, _, ElementPlusIconsVue, CryptoJS, luxon, ElementPlus, hotkeys); \ No newline at end of file