// ==UserScript== // @name bilibili-app-recommend // @namespace https://magicdawn.fun // @version 0.3.2 // @author magicdawn // @description 为B站首页添加像App一样的推荐 // @license MIT // @homepageURL https://github.com/magicdawn/bilibili-app-recommend // @supportURL https://github.com/magicdawn/bilibili-app-recommend/issues // @include https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png?* // @match *://www.bilibili.com/* // @require https://unpkg.com/jquery@3.6.0/dist/jquery.min.js // @require https://unpkg.com/axios@0.27.2/dist/axios.min.js // @require https://unpkg.com/axios-userscript-adapter@0.2.0/dist/axiosGmxhrAdapter.min.js // @require https://unpkg.com/react@18.1.0/umd/react.production.min.js // @require https://unpkg.com/react-dom@18.1.0/umd/react-dom.production.min.js // @connect app.bilibili.com // @connect passport.bilibili.com // @connect link.acg.tv // @connect www.mcbbs.net // @grant GM.xmlHttpRequest // @grant GM_xmlhttpRequest // @grant GM_getValue // @grant GM_setValue // @grant GM_deleteValue // @grant unsafeWindow // @downloadURL none // ==/UserScript== ;(({ cssTextList = [] }) => { cssTextList.forEach((s) => { const style = document.createElement("style"); style.innerText = s; style.dataset.source = "vite-plugin-monkey"; document.head.appendChild(style); }); })({ "cssTextList": [ "._toast-container_9119l_1{position:fixed;top:50%;left:50%;z-index:999999;padding:12px 24px;font-size:14px;width:240px;margin-left:-120px;background:#ffb243;color:#fff;border-radius:6px}._expand-btn_wdzp9_1{padding:0;width:31px;height:31px;border-radius:50%}._expand-btn_wdzp9_1 svg{width:13px;height:13px;transform:rotate(180deg)}._expand-btn_wdzp9_1 svg._expanded_wdzp9_12{transform:rotate(0)}body.dark ._expand-btn_wdzp9_1{color:#eee!important;border-color:transparent!important;background-color:#333!important}body.dark ._expand-btn_wdzp9_1:hover{background-color:#555!important}._bili-video-card_3h2r6_1{position:relative}._image-wrapper_3h2r6_4{border-radius:\"6px\";overflow:\"hidden\"}._preview-card-wrapper_3h2r6_8{position:absolute;top:0;left:0;right:0;bottom:0;z-index:2;overflow:hidden;border-top-left-radius:inherit;border-top-right-radius:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0}._watch-later_3h2r6_21{z-index:3}._badge_3h2r6_24{color:#fa6a9d;border-radius:2px;border:1px #fa6a9d solid;line-height:20px;padding:0 10px;transform:scale(.8)}._recommend-reason_3h2r6_32{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;display:inline-block;color:var(--Or5);background-color:var(--Or1);border-radius:4px;margin-right:4px;font-size:var(--follow-icon-font-size);line-height:var(--follow-icon-line-height);height:var(--follow-icon-line-height);padding:0 4px;cursor:default}._bangumi-desc_3h2r6_47{color:default}._btn-dislike_3h2r6_50{display:flex;align-items:center;justify-content:center;position:absolute;top:8px;left:8px;width:28px;height:28px;border-radius:6px;cursor:pointer;background-color:#212121cc;z-index:9;transform:translateZ(0)}._btn-dislike_3h2r6_50 ._btn-dislike-icon_3h2r6_65{pointer-events:none;user-select:none;width:12px;height:12px;color:#fff}._btn-dislike_3h2r6_50 ._btn-dislike-tip_3h2r6_72{pointer-events:none;user-select:none;position:absolute;bottom:-6px;left:-5px;transform:translateY(100%);font-size:12px;color:#fff;border-radius:4px;line-height:18px;padding:4px 8px;background-color:#000c;white-space:nowrap}._disliked-wrapper_3h2r6_87{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;border-radius:6px;border:1px solid #eee}body.dark ._disliked-wrapper_3h2r6_87{border:1px solid #333}._disliked-wrapper_3h2r6_87 ._dislike-content-cover_3h2r6_101{border-top-left-radius:6px;border-top-right-radius:6px;padding-top:56.25%;position:relative}._disliked-wrapper_3h2r6_87 ._dislike-content-cover_3h2r6_101 ._dislike-content-cover-inner_3h2r6_107{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}._disliked-wrapper_3h2r6_87 ._dislike-content-cover_3h2r6_101 ._dislike-content-cover-inner_3h2r6_107 ._dislike-icon_3h2r6_118{color:inherit}._disliked-wrapper_3h2r6_87 ._dislike-content-cover_3h2r6_101 ._dislike-content-cover-inner_3h2r6_107 ._dislike-reason_3h2r6_121{font-size:20px;text-align:center}._disliked-wrapper_3h2r6_87 ._dislike-content-cover_3h2r6_101 ._dislike-content-cover-inner_3h2r6_107 ._dislike-desc_3h2r6_125{font-size:16px;text-align:center}._disliked-wrapper_3h2r6_87 ._dislike-content-action_3h2r6_129{flex:1;width:100%;border-top:1px solid #eee;display:flex;align-items:center;justify-content:center}body.dark ._disliked-wrapper_3h2r6_87 ._dislike-content-action_3h2r6_129{border-top:1px solid #333}._disliked-wrapper_3h2r6_87 ._dislike-content-action_3h2r6_129 button{font-size:18px;color:inherit}._modal-mask_vh629_1{position:fixed;left:0;top:0;right:0;bottom:0;background-color:#00000080;z-index:11003;display:flex;align-items:center;justify-content:center}._modal_vh629_1{width:500px;max-height:calc(80vh - 50px);border-radius:10px;overflow:hidden;background-color:#fff;padding:0 15px 15px;display:flex;flex-direction:column}._modal_vh629_1 ._modal-header_vh629_23{padding-top:10px;padding-bottom:10px;border-bottom:none;display:flex;align-items:center}._modal_vh629_1 ._modal-header_vh629_23 ._modal-title_vh629_30{font-size:1.5rem;margin-bottom:0;line-height:1.5}._modal_vh629_1 ._modal-header_vh629_23 ._title-desc_vh629_35{margin-left:5px;font-size:40%}._modal_vh629_1 ._modal-header_vh629_23 ._btn-close_vh629_39{margin-left:10px}._modal_vh629_1 ._modal-header_vh629_23 ._btn-close_vh629_39 svg{width:10px;height:10px;margin-right:3px;margin-top:-1px}body.dark ._modal_vh629_1 ._modal-header_vh629_23 ._btn-close_vh629_39{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px}._modal_vh629_1 ._modal-body_vh629_57{padding-top:0;flex-grow:1;overflow-y:scroll}._reason-list_vh629_62{display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between}._reason_vh629_62{color:inherit;width:45%;text-align:center;line-height:20px;border:1px solid #eee;margin-top:8px;margin-bottom:8px;padding-top:5px;padding-bottom:5px}body.dark ._reason_vh629_62{border:1px solid #333}._modal-mask_5dl20_1{position:fixed;left:0;top:0;right:0;bottom:0;z-index:11000;background-color:#00000080;display:flex;align-items:center;justify-content:center}._modal-mask_5dl20_1._narrow-mode_5dl20_13{background-color:#000000e6}._modal_5dl20_1{width:calc(100vw - 50px);height:calc(100vh - 50px);border:1px solid #fa6a9d;border-radius:10px;overflow:hidden;background-color:#fff;padding:0 0 15px 15px;display:flex;flex-direction:column}._modal_5dl20_1._narrow-mode_5dl20_13{width:606px;height:calc(100vh - 10px)}._modal_5dl20_1 ._modal-header_5dl20_32{padding-top:10px;padding-bottom:10px;border-bottom:none;padding-right:15px;display:flex;align-items:center}._modal_5dl20_1 ._modal-header_5dl20_32 ._modal-title_5dl20_40{font-size:1.5rem;margin-bottom:0;line-height:1.5}body.dark ._modal_5dl20_1 ._modal-header_5dl20_32 ._btn-refresh_5dl20_45,body.dark ._modal_5dl20_1 ._modal-header_5dl20_32 ._btn-close_5dl20_46{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px}._modal_5dl20_1 ._modal-header_5dl20_32 ._btn-close_5dl20_46{margin-left:10px}._modal_5dl20_1 ._modal-header_5dl20_32 ._btn-close_5dl20_46 svg{width:10px;height:10px}._modal_5dl20_1 ._modal-body_5dl20_62{padding-top:0;flex-grow:1;overflow-y:scroll;padding-right:15px}._list_5dl20_68{color:inherit}._card_5dl20_71{border:2px solid transparent}._card_5dl20_71._active_5dl20_74{border-color:#fa6a9d;border-radius:6px}._video-card-list_5dl20_78{display:block!important}#_video-card-body_5dl20_1>*{display:block!important}#_video-card-body_5dl20_1._narrow-mode_5dl20_13{grid-template-columns:repeat(2,1fr)}._loader_5dl20_87{text-align:center;line-height:60px;font-size:120%}#_use-narrow-mode_5dl20_1{margin-left:5px;margin-top:1px;cursor:pointer;outline:none}#_use-narrow-mode_5dl20_1+label{margin-left:2px;user-select:none;cursor:pointer}._grid_p5dvw_1{color:default}@media (min-width: 2200px){._video-card-list_p5dvw_5.is-full{grid-column:span 7!important}._video-card-list_p5dvw_5.is-full .video-card-body.more-class1.more-class2{grid-column:span 7!important;grid-template-columns:repeat(7,1fr)!important}._video-card-list_p5dvw_5.is-full .video-card-body.more-class1.more-class2>*{display:block!important}._video-card-list_p5dvw_5.is-full .video-card-body.more-class1.more-class2>*:nth-of-type(1n + 15){display:none!important}}._expand-btn_p5dvw_19{padding:0;width:31px;height:31px;border-radius:50%}._expand-btn_p5dvw_19 svg{width:13px;height:13px;transform:rotate(180deg)}._expand-btn_p5dvw_19 svg._expanded_p5dvw_30{transform:rotate(0)}\n" ] }); var QT=Object.defineProperty,eC=Object.defineProperties;var tC=Object.getOwnPropertyDescriptors;var _i=Object.getOwnPropertySymbols;var $f=Object.prototype.hasOwnProperty,kf=Object.prototype.propertyIsEnumerable;var Fa=(Oe,Te,D)=>Te in Oe?QT(Oe,Te,{enumerable:!0,configurable:!0,writable:!0,value:D}):Oe[Te]=D,dn=(Oe,Te)=>{for(var D in Te||(Te={}))$f.call(Te,D)&&Fa(Oe,D,Te[D]);if(_i)for(var D of _i(Te))kf.call(Te,D)&&Fa(Oe,D,Te[D]);return Oe},Bn=(Oe,Te)=>eC(Oe,tC(Te));var Uf=(Oe,Te)=>{var D={};for(var vt in Oe)$f.call(Oe,vt)&&Te.indexOf(vt)<0&&(D[vt]=Oe[vt]);if(Oe!=null&&_i)for(var vt of _i(Oe))Te.indexOf(vt)<0&&kf.call(Oe,vt)&&(D[vt]=Oe[vt]);return D};var Ba=(Oe,Te,D)=>(Fa(Oe,typeof Te!="symbol"?Te+"":Te,D),D);(function(Oe,Te,D,vt,Hf){"use strict";function Wn(i){return i&&typeof i=="object"&&"default"in i?i:{default:i}}var $n=Wn(Oe),zf=Wn(Te),mi=Wn(D),yi=Wn(vt),Gf=Wn(Hf),xt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},wi={exports:{}};const Kf=(i,s)=>Math.floor(Math.random()*(s-i+1)+i),Wa=()=>{const i=new Error("Delay aborted");return i.name="AbortError",i},$a=({clearTimeout:i,setTimeout:s,willResolve:r})=>(u,{value:f,signal:h}={})=>{if(h&&h.aborted)return Promise.reject(Wa());let g,m,w;const A=i||clearTimeout,R=()=>{A(g),w(Wa())},T=()=>{h&&h.removeEventListener("abort",R)},E=new Promise((L,M)=>{m=()=>{T(),r?L(f):M(f)},w=M,g=(s||setTimeout)(m,u)});return h&&h.addEventListener("abort",R,{once:!0}),E.clear=()=>{A(g),g=null,m()},E},ka=i=>{const s=$a(Bn(dn({},i),{willResolve:!0}));return s.reject=$a(Bn(dn({},i),{willResolve:!1})),s.range=(r,u,f)=>s(Kf(r,u),f),s},bi=ka();bi.createWithTimers=ka,wi.exports=bi,wi.exports.default=bi;var Ua=wi.exports,Si,Yf=zf.default;Si=Yf.createRoot;var Ha={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */(function(i){(function(){var s={}.hasOwnProperty;function r(){for(var u=[],f=0;f0)&&!(f=u.next()).done;)h.push(f.value)}catch(m){g={error:m}}finally{try{f&&!f.done&&(r=u.return)&&r.call(u)}finally{if(g)throw g.error}}return h};function Qa(i,s){i===void 0&&(i=!1);var r=mh(D.useState(i),2),u=r[0],f=r[1],h=D.useMemo(function(){var g=s===void 0?!i:s,m=function(){return f(function(E){return E===i?g:i})},w=function(E){return f(E)},A=function(){return f(i)},R=function(){return f(g)};return{toggle:m,set:w,setLeft:A,setRight:R}},[]);return[u,h]}var yh=globalThis&&globalThis.__read||function(i,s){var r=typeof Symbol=="function"&&i[Symbol.iterator];if(!r)return i;var u=r.call(i),f,h=[],g;try{for(;(s===void 0||s-- >0)&&!(f=u.next()).done;)h.push(f.value)}catch(m){g={error:m}}finally{try{f&&!f.done&&(r=u.return)&&r.call(u)}finally{if(g)throw g.error}}return h};function wh(i){i===void 0&&(i=!1);var s=yh(Qa(i),2),r=s[0],u=s[1],f=u.toggle,h=u.set,g=D.useMemo(function(){var m=function(){return h(!0)},w=function(){return h(!1)};return{toggle:f,set:function(R){return h(!!R)},setTrue:m,setFalse:w}},[]);return[r,g]}var bh=!!(typeof window!="undefined"&&window.document&&window.document.createElement),Sh=bh;function hr(i,s){if(!!Sh){if(!i)return s;var r;return za(i)?r=i():"current"in i?r=i.current:r=i,r}}var xh=function(s){var r=function(f,h,g){var m=D.useRef(!1),w=D.useRef([]),A=D.useRef([]),R=D.useRef();s(function(){var T,E=Array.isArray(g)?g:[g],L=E.map(function(M){return hr(M)});if(!m.current){m.current=!0,w.current=L,A.current=h,R.current=f();return}(L.length!==w.current.length||!Ka(L,w.current)||!Ka(h,A.current))&&((T=R.current)===null||T===void 0||T.call(R),w.current=L,A.current=h,R.current=f())}),Ya(function(){var T;(T=R.current)===null||T===void 0||T.call(R),m.current=!1})};return r},Ah=xh,Th=Ah(D.useEffect),eo=Th,to={exports:{}};(function(i,s){(function(r,u){i.exports=u()})(xt,function(){var r=1e3,u=6e4,f=36e5,h="millisecond",g="second",m="minute",w="hour",A="day",R="week",T="month",E="quarter",L="year",M="date",I="Invalid Date",F=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,W=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,le={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},ae=function(X,U,B){var Z=String(X);return!Z||Z.length>=U?X:""+Array(U+1-Z.length).join(B)+X},ne={s:ae,z:function(X){var U=-X.utcOffset(),B=Math.abs(U),Z=Math.floor(B/60),P=B%60;return(U<=0?"+":"-")+ae(Z,2,"0")+":"+ae(P,2,"0")},m:function X(U,B){if(U.date()1)return X(j[0])}else{var oe=U.name;we[oe]=U,P=oe}return!Z&&P&&(J=P),P||!Z&&J},pe=function(X,U){if(xe(X))return X.clone();var B=typeof U=="object"?U:{};return B.date=X,B.args=arguments,new Ue(B)},re=ne;re.l=Be,re.i=xe,re.w=function(X,U){return pe(X,{locale:U.$L,utc:U.$u,x:U.$x,$offset:U.$offset})};var Ue=function(){function X(B){this.$L=Be(B.locale,null,!0),this.parse(B)}var U=X.prototype;return U.parse=function(B){this.$d=function(Z){var P=Z.date,z=Z.utc;if(P===null)return new Date(NaN);if(re.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var j=P.match(F);if(j){var oe=j[2]-1||0,fe=(j[7]||"0").substring(0,3);return z?new Date(Date.UTC(j[1],oe,j[3]||1,j[4]||0,j[5]||0,j[6]||0,fe)):new Date(j[1],oe,j[3]||1,j[4]||0,j[5]||0,j[6]||0,fe)}}return new Date(P)}(B),this.$x=B.x||{},this.init()},U.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},U.$utils=function(){return re},U.isValid=function(){return this.$d.toString()!==I},U.isSame=function(B,Z){var P=pe(B);return this.startOf(Z)<=P&&P<=this.endOf(Z)},U.isAfter=function(B,Z){return pe(B)-1}var Uh=kh,Hh=dr;function zh(i,s){var r=this.__data__,u=Hh(r,i);return u<0?(++this.size,r.push([i,s])):r[u][1]=s,this}var Gh=zh,Kh=Eh,Yh=Nh,Xh=Wh,Zh=Uh,jh=Gh;function pn(i){var s=-1,r=i==null?0:i.length;for(this.clear();++sm))return!1;var A=h.get(i),R=h.get(s);if(A&&R)return A==s&&R==i;var T=-1,E=!0,L=r&gg?new fg:void 0;for(h.set(i,s),h.set(s,i);++T-1&&i%1==0&&i-1&&i%1==0&&i<=Av}var mo=Tv,Cv=cr,Ev=mo,Lv=fr,Ov="[object Arguments]",Rv="[object Array]",Mv="[object Boolean]",Dv="[object Date]",Iv="[object Error]",Pv="[object Function]",Nv="[object Map]",Fv="[object Number]",Bv="[object Object]",Wv="[object RegExp]",$v="[object Set]",kv="[object String]",Uv="[object WeakMap]",Hv="[object ArrayBuffer]",zv="[object DataView]",Gv="[object Float32Array]",Kv="[object Float64Array]",Yv="[object Int8Array]",Xv="[object Int16Array]",Zv="[object Int32Array]",jv="[object Uint8Array]",Jv="[object Uint8ClampedArray]",qv="[object Uint16Array]",Vv="[object Uint32Array]",ye={};ye[Gv]=ye[Kv]=ye[Yv]=ye[Xv]=ye[Zv]=ye[jv]=ye[Jv]=ye[qv]=ye[Vv]=!0,ye[Ov]=ye[Rv]=ye[Hv]=ye[Mv]=ye[zv]=ye[Dv]=ye[Iv]=ye[Pv]=ye[Nv]=ye[Fv]=ye[Bv]=ye[Wv]=ye[$v]=ye[kv]=ye[Uv]=!1;function Qv(i){return Lv(i)&&Ev(i.length)&&!!ye[Cv(i)]}var e_=Qv;function t_(i){return function(s){return i(s)}}var n_=t_,Li={exports:{}};(function(i,s){var r=Za,u=s&&!s.nodeType&&s,f=u&&!0&&i&&!i.nodeType&&i,h=f&&f.exports===u,g=h&&r.process,m=function(){try{var w=f&&f.require&&f.require("util").types;return w||g&&g.binding&&g.binding("util")}catch{}}();i.exports=m})(Li,Li.exports);var r_=e_,i_=n_,yo=Li.exports,wo=yo&&yo.isTypedArray,s_=wo?i_(wo):r_,bo=s_,a_=ov,o_=_v,u_=Ei,l_=mr.exports,c_=xv,f_=bo,h_=Object.prototype,d_=h_.hasOwnProperty;function p_(i,s){var r=u_(i),u=!r&&o_(i),f=!r&&!u&&l_(i),h=!r&&!u&&!f&&f_(i),g=r||u||f||h,m=g?a_(i.length,String):[],w=m.length;for(var A in i)(s||d_.call(i,A))&&!(g&&(A=="length"||f&&(A=="offset"||A=="parent")||h&&(A=="buffer"||A=="byteLength"||A=="byteOffset")||c_(A,w)))&&m.push(A);return m}var g_=p_,v_=Object.prototype;function __(i){var s=i&&i.constructor,r=typeof s=="function"&&s.prototype||v_;return i===r}var m_=__;function y_(i,s){return function(r){return i(s(r))}}var w_=y_,b_=w_,S_=b_(Object.keys,Object),x_=S_,A_=m_,T_=x_,C_=Object.prototype,E_=C_.hasOwnProperty;function L_(i){if(!A_(i))return T_(i);var s=[];for(var r in Object(i))E_.call(i,r)&&r!="constructor"&&s.push(r);return s}var O_=L_,R_=io,M_=mo;function D_(i){return i!=null&&M_(i.length)&&!R_(i)}var I_=D_,P_=g_,N_=O_,F_=I_;function B_(i){return F_(i)?P_(i):N_(i)}var W_=B_,$_=jg,k_=sv,U_=W_;function H_(i){return $_(i,U_,k_)}var z_=H_,So=z_,G_=1,K_=Object.prototype,Y_=K_.hasOwnProperty;function X_(i,s,r,u,f,h){var g=r&G_,m=So(i),w=m.length,A=So(s),R=A.length;if(w!=R&&!g)return!1;for(var T=w;T--;){var E=m[T];if(!(g?E in s:Y_.call(s,E)))return!1}var L=h.get(i),M=h.get(s);if(L&&M)return L==s&&M==i;var I=!0;h.set(i,s),h.set(s,i);for(var F=g;++T0)&&!(f=u.next()).done;)h.push(f.value)}catch(m){g={error:m}}finally{try{f&&!f.done&&(r=u.return)&&r.call(u)}finally{if(g)throw g.error}}return h},Fi=function(i,s){var r=s||{},u=r.onEnter,f=r.onLeave,h=Mm(wh(!1),2),g=h[0],m=h[1],w=m.setTrue,A=m.setFalse;return Ni("mouseenter",function(){u==null||u(),w()},{target:i}),Ni("mouseleave",function(){f==null||f(),A()},{target:i}),g},Dm=function(s,r){return r===void 0&&(r=[]),Rm(s,r)},Im=function(s,r,u){var f=D.useRef(),h=D.useRef(0);Dm(r,f.current)||(f.current=r,h.current+=1),eo(s,[h.current],u)},Pm=Im,Bi=globalThis&&globalThis.__values||function(i){var s=typeof Symbol=="function"&&Symbol.iterator,r=s&&i[s],u=0;if(r)return r.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&u>=i.length&&(i=void 0),{value:i&&i[u++],done:!i}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},Nm={0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pausebreak:19,capslock:20,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftwindowkey:91,rightwindowkey:92,selectkey:93,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105,multiply:106,add:107,subtract:109,decimalpoint:110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numlock:144,scrolllock:145,semicolon:186,equalsign:187,comma:188,dash:189,period:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222},Wi={ctrl:function(s){return s.ctrlKey},shift:function(s){return s.shiftKey},alt:function(s){return s.altKey},meta:function(s){return s.metaKey}};function Fm(i){var s=Object.keys(Wi).reduce(function(r,u){return Wi[u](i)?r+1:r},0);return[16,17,18,91,92].includes(i.keyCode)?s:s+1}function Bo(i,s,r){var u,f;if(!i.key)return!1;if(Ga(s))return i.keyCode===s;var h=s.split("."),g=0;try{for(var m=Bi(h),w=m.next();!w.done;w=m.next()){var A=w.value,R=Wi[A],T=Nm[A.toLowerCase()];(R&&R(i)||T&&T===i.keyCode)&&g++}}catch(E){u={error:E}}finally{try{w&&!w.done&&(f=m.return)&&f.call(m)}finally{if(u)throw u.error}}return r?g===h.length&&Fm(i)===h.length:g===h.length}function Bm(i,s){return za(i)?i:Xf(i)||Ga(i)?function(r){return Bo(r,i,s)}:Array.isArray(i)?function(r){return i.some(function(u){return Bo(r,u,s)})}:i?function(){return!0}:function(){return!1}}var Wm=["keydown"];function Qt(i,s,r){var u=r||{},f=u.events,h=f===void 0?Wm:f,g=u.target,m=u.exactMatch,w=m===void 0?!1:m,A=lr(s),R=lr(i);Pm(function(){var T,E,L,M=hr(g,window);if(!!M){var I=function(ne){var J,we=Bm(R.current,w);if(we(ne))return(J=A.current)===null||J===void 0?void 0:J.call(A,ne)};try{for(var F=Bi(h),W=F.next();!W.done;W=F.next()){var le=W.value;(L=M==null?void 0:M.addEventListener)===null||L===void 0||L.call(M,le,I)}}catch(ae){T={error:ae}}finally{try{W&&!W.done&&(E=F.return)&&E.call(F)}finally{if(T)throw T.error}}return function(){var ae,ne,J;try{for(var we=Bi(h),xe=we.next();!xe.done;xe=we.next()){var Be=xe.value;(J=M==null?void 0:M.removeEventListener)===null||J===void 0||J.call(M,Be,I)}}catch(pe){ae={error:pe}}finally{try{xe&&!xe.done&&(ne=we.return)&&ne.call(we)}finally{if(ae)throw ae.error}}}}},[h],g)}var $m=globalThis&&globalThis.__read||function(i,s){var r=typeof Symbol=="function"&&i[Symbol.iterator];if(!r)return i;var u=r.call(i),f,h=[],g;try{for(;(s===void 0||s-- >0)&&!(f=u.next()).done;)h.push(f.value)}catch(m){g={error:m}}finally{try{f&&!f.done&&(r=u.return)&&r.call(u)}finally{if(g)throw g.error}}return h};function km(i){var s=D.useRef(0),r=$m(D.useState(i),2),u=r[0],f=r[1],h=D.useCallback(function(g){cancelAnimationFrame(s.current),s.current=requestAnimationFrame(function(){f(g)})},[]);return Ya(function(){cancelAnimationFrame(s.current)}),[u,h]}var Um=globalThis&&globalThis.__read||function(i,s){var r=typeof Symbol=="function"&&i[Symbol.iterator];if(!r)return i;var u=r.call(i),f,h=[],g;try{for(;(s===void 0||s-- >0)&&!(f=u.next()).done;)h.push(f.value)}catch(m){g={error:m}}finally{try{f&&!f.done&&(r=u.return)&&r.call(u)}finally{if(g)throw g.error}}return h},Hm={screenX:NaN,screenY:NaN,clientX:NaN,clientY:NaN,pageX:NaN,pageY:NaN,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},zm=function(i){var s=Um(km(Hm),2),r=s[0],u=s[1];return Ni("mousemove",function(f){var h=f.screenX,g=f.screenY,m=f.clientX,w=f.clientY,A=f.pageX,R=f.pageY,T={screenX:h,screenY:g,clientX:m,clientY:w,pageX:A,pageY:R,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},E=hr(i);if(E){var L=E.getBoundingClientRect(),M=L.left,I=L.top,F=L.width,W=L.height;T.elementPosX=M+window.pageXOffset,T.elementPosY=I+window.pageYOffset,T.elementX=A-T.elementPosX,T.elementY=R-T.elementPosY,T.elementW=F,T.elementH=W}u(T)},{target:function(){return document}}),r};const $i=Symbol(),Gm=Symbol(),ki=Symbol(),Ui=Object.getPrototypeOf,Hi=new WeakMap,Wo=i=>i&&(Hi.has(i)?Hi.get(i):Ui(i)===Object.prototype||Ui(i)===Array.prototype),zi=i=>typeof i=="object"&&i!==null,Km=(i,s)=>{let r=!1;const u=(h,g,m)=>{if(!r){let w=h.a.get(i);w||(w=new Set,h.a.set(i,w)),m&&w.has($i)||w.add(g)}},f={f:s,get(h,g){return g===ki?i:(u(this,g),$o(h[g],this.a,this.c))},has(h,g){return g===Gm?(r=!0,this.a.delete(i),!0):(u(this,g),g in h)},getOwnPropertyDescriptor(h,g){return u(this,g,!0),Object.getOwnPropertyDescriptor(h,g)},ownKeys(h){return u(this,$i),Reflect.ownKeys(h)}};return s&&(f.set=f.deleteProperty=()=>!1),f},$o=(i,s,r)=>{if(!Wo(i))return i;const u=i[ki]||i,f=(g=>Object.isFrozen(g)||Object.values(Object.getOwnPropertyDescriptors(g)).some(m=>!m.writable))(u);let h=r&&r.get(u);return h&&h.f===f||(h=Km(u,f),h.p=new Proxy(f?(g=>{if(Array.isArray(g))return Array.from(g);const m=Object.getOwnPropertyDescriptors(g);return Object.values(m).forEach(w=>{w.configurable=!0}),Object.create(Ui(g),m)})(u):u,h),r&&r.set(u,h)),h.a=s,h.c=r,h.p},Ym=(i,s)=>{const r=Reflect.ownKeys(i),u=Reflect.ownKeys(s);return r.length!==u.length||r.some((f,h)=>f!==u[h])},ko=(i,s,r,u)=>{if(Object.is(i,s))return!1;if(!zi(i)||!zi(s))return!0;const f=r.get(i);if(!f)return!0;if(u){const g=u.get(i);if(g&&g.n===s)return g.g;u.set(i,{n:s,g:!1})}let h=null;for(const g of f){const m=g===$i?Ym(i,s):ko(i[g],s[g],r,u);if(m!==!0&&m!==!1||(h=m),h)break}return h===null&&(h=!0),u&&u.set(i,{n:s,g:h}),h},Xm=i=>Wo(i)&&i[ki]||null,Uo=(i,s)=>{Hi.set(i,s)},Zm=(i,s)=>{const r=[],u=new WeakSet,f=(h,g)=>{if(u.has(h))return;zi(h)&&u.add(h);const m=s.get(h);m?m.forEach(w=>{f(h[w],g?[...g,w]:[w])}):g&&r.push(g)};return f(i),r};var Ho={exports:{}},zo={};/** * @license React * use-sync-external-store-shim.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var wn=mi.default;function jm(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Jm=typeof Object.is=="function"?Object.is:jm,qm=wn.useState,Vm=wn.useEffect,Qm=wn.useLayoutEffect,e0=wn.useDebugValue;function t0(i,s){var r=s(),u=qm({inst:{value:r,getSnapshot:s}}),f=u[0].inst,h=u[1];return Qm(function(){f.value=r,f.getSnapshot=s,Gi(f)&&h({inst:f})},[i,r,s]),Vm(function(){return Gi(f)&&h({inst:f}),i(function(){Gi(f)&&h({inst:f})})},[i]),e0(r),r}function Gi(i){var s=i.getSnapshot;i=i.value;try{var r=s();return!Jm(i,r)}catch{return!0}}function n0(i,s){return s()}var r0=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?n0:t0;zo.useSyncExternalStore=wn.useSyncExternalStore!==void 0?wn.useSyncExternalStore:r0,Ho.exports=zo;var i0=Ho.exports;const s0=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("VERSION"):Symbol(),At=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("LISTENERS"):Symbol(),wr=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("SNAPSHOT"):Symbol(),a0=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("HANDLER"):Symbol(),Un=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("PROMISE_RESULT"):Symbol(),Go=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("PROMISE_ERROR"):Symbol(),Ko=new WeakSet,Ki=i=>typeof i=="object"&&i!==null,o0=i=>Ki(i)&&!Ko.has(i)&&(Array.isArray(i)||!(Symbol.iterator in i))&&!(i instanceof WeakMap)&&!(i instanceof WeakSet)&&!(i instanceof Error)&&!(i instanceof Number)&&!(i instanceof Date)&&!(i instanceof String)&&!(i instanceof RegExp)&&!(i instanceof ArrayBuffer),Yo=new WeakMap;let Xo=1;const Zo=new WeakMap;function br(i={}){if(!Ki(i))throw new Error("object required");const s=Yo.get(i);if(s)return s;let r=Xo;const u=new Set,f=(E,L=++Xo)=>{r!==L&&(r=L,u.forEach(M=>M(E,L)))},h=new Map,g=E=>{let L=h.get(E);return L||(L=(M,I)=>{const F=[...M];F[1]=[E,...F[1]],f(F,I)},h.set(E,L)),L},m=E=>{const L=h.get(E);return h.delete(E),L},w=(E,L)=>{const M=Zo.get(L);if((M==null?void 0:M[0])===r)return M[1];const I=Array.isArray(E)?[]:Object.create(Object.getPrototypeOf(E));return Uo(I,!0),Zo.set(L,[r,I]),Reflect.ownKeys(E).forEach(F=>{const W=Reflect.get(E,F,L);if(Ko.has(W))Uo(W,!1),I[F]=W;else if(W instanceof Promise)if(Un in W)I[F]=W[Un];else{const le=W[Go]||W;Object.defineProperty(I,F,{get(){if(Un in W)return W[Un];throw le}})}else W!=null&&W[At]?I[F]=W[wr]:I[F]=W}),Object.freeze(I),I},A=Array.isArray(i)?[]:Object.create(Object.getPrototypeOf(i)),R={get(E,L,M){return L===s0?r:L===At?u:L===wr?w(E,M):L===a0?R:Reflect.get(E,L,M)},deleteProperty(E,L){const M=Reflect.get(E,L),I=M==null?void 0:M[At];I&&I.delete(m(L));const F=Reflect.deleteProperty(E,L);return F&&f(["delete",[L],M]),F},is:Object.is,canProxy:o0,set(E,L,M,I){var F;const W=Reflect.has(E,L),le=Reflect.get(E,L,I);if(W&&this.is(le,M))return!0;const ae=le==null?void 0:le[At];ae&&ae.delete(m(L)),Ki(M)&&(M=Xm(M)||M);let ne;return(F=Object.getOwnPropertyDescriptor(E,L))!=null&&F.set?ne=M:M instanceof Promise?ne=M.then(J=>(ne[Un]=J,f(["resolve",[L],J]),J)).catch(J=>{ne[Go]=J,f(["reject",[L],J])}):M!=null&&M[At]?(ne=M,ne[At].add(g(L))):this.canProxy(M)?(ne=br(M),ne[At].add(g(L))):ne=M,Reflect.set(E,L,ne,I),f(["set",[L],M,le]),!0}},T=new Proxy(A,R);return Yo.set(i,T),Reflect.ownKeys(i).forEach(E=>{const L=Object.getOwnPropertyDescriptor(i,E);L.get||L.set?Object.defineProperty(A,E,L):T[E]=i[E]}),T}function u0(i,s,r){({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(i!=null&&i[At])&&console.warn("Please use proxy object");let u;const f=[],h=g=>{if(f.push(g),r){s(f.splice(0));return}u||(u=Promise.resolve().then(()=>{u=void 0,s(f.splice(0))}))};return i[At].add(h),()=>{i[At].delete(h)}}function jo(i){return({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(i!=null&&i[wr])&&console.warn("Please use proxy object"),i[wr]}const{useSyncExternalStore:l0}=i0,c0=(i,s)=>{const r=D.useRef();D.useEffect(()=>{r.current=Zm(i,s)}),D.useDebugValue(r.current)};function Yi(i,s){const r=s==null?void 0:s.sync,u=D.useRef(),f=D.useRef();let h=!0;const g=l0(D.useCallback(A=>{const R=u0(i,A,r);return A(),R},[i,r]),()=>{const A=jo(i);try{if(!h&&u.current&&f.current&&!ko(u.current,A,f.current,new WeakMap))return u.current}catch{}return A},()=>jo(i));h=!1;const m=new WeakMap;D.useEffect(()=>{u.current=g,f.current=m}),({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&c0(g,m);const w=D.useMemo(()=>new WeakMap,[]);return $o(g,m,w)}const bn=br({accessKey:"",useNarrowMode:!1}),Xi=function(){return Yi(bn)},Jo="bilibili-app-recommend.config";function f0(){const i=GM_getValue(Jo);i&&typeof i=="object"&&Object.assign(bn,i)}function h0(){GM_setValue(Jo,bn)}function Zi(i){Object.assign(bn,i),h0()}f0();const qo="_toast-container_9119l_1";var rC={toastContainer:qo};function Ht(i,s=2e3){const r=$n.default(`
${i}
`);r.appendTo(document.body),setTimeout(()=>r.remove(),s)}const d0="\u8BF7\u6C42\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!",p0="\u64CD\u4F5C\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!";function Vo(){return Ht(d0)}function Qo(){return Ht(p0)}async function g0(){var w,A;const s=(await yi.default.get("https://passport.bilibili.com/login/app/third",{params:{appkey:"27eb53fc9058f8c3",api:"https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png",sign:"04224646d1fea004e79606d3b038c84a"},withCredentials:!0})).data;if(!((w=s==null?void 0:s.data)!=null&&w.has_login))return{errmsg:"\u4F60\u5FC5\u987B\u767B\u5F55B\u7AD9\u4E4B\u540E\u624D\u80FD\u4F7F\u7528\u6388\u6743",json:s};if(!((A=s==null?void 0:s.data)!=null&&A.confirm_uri))return{errmsg:"\u65E0\u6CD5\u83B7\u5F97\u6388\u6743\u7F51\u5740",json:s};const r=s.data.confirm_uri;let u;const f=new Promise(R=>{window.addEventListener("message",T=>{if(T.origin!="https://www.mcbbs.net"||!T.data)return;const E=T.data.match(/access_key=([0-9a-z]{32})/);if(!E||!E[1])return R({errmsg:"\u6CA1\u6709\u83B7\u5F97\u5339\u914D\u7684\u5BC6\u94A5"});R(E[1])}),u=setTimeout(()=>{R({errmsg:"\u83B7\u53D6\u6388\u6743\u8D85\u65F6"})},5e3)}),h=$n.default(`