// ==UserScript== // @name bilibili-app-recommend // @namespace https://magicdawn.fun // @version 0.3.1 // @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 JT=Object.defineProperty,qT=Object.defineProperties;var VT=Object.getOwnPropertyDescriptors;var vi=Object.getOwnPropertySymbols;var Bf=Object.prototype.hasOwnProperty,Wf=Object.prototype.propertyIsEnumerable;var Na=(Oe,Te,M)=>Te in Oe?JT(Oe,Te,{enumerable:!0,configurable:!0,writable:!0,value:M}):Oe[Te]=M,dn=(Oe,Te)=>{for(var M in Te||(Te={}))Bf.call(Te,M)&&Na(Oe,M,Te[M]);if(vi)for(var M of vi(Te))Wf.call(Te,M)&&Na(Oe,M,Te[M]);return Oe},Bn=(Oe,Te)=>qT(Oe,VT(Te));var $f=(Oe,Te)=>{var M={};for(var vt in Oe)Bf.call(Oe,vt)&&Te.indexOf(vt)<0&&(M[vt]=Oe[vt]);if(Oe!=null&&vi)for(var vt of vi(Oe))Te.indexOf(vt)<0&&Wf.call(Oe,vt)&&(M[vt]=Oe[vt]);return M};var Fa=(Oe,Te,M)=>(Na(Oe,typeof Te!="symbol"?Te+"":Te,M),M);(function(Oe,Te,M,vt,kf){"use strict";function Wn(i){return i&&typeof i=="object"&&"default"in i?i:{default:i}}var $n=Wn(Oe),Uf=Wn(Te),_i=Wn(M),mi=Wn(vt),Hf=Wn(kf),xt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},yi={exports:{}};const zf=(i,s)=>Math.floor(Math.random()*(s-i+1)+i),Ba=()=>{const i=new Error("Delay aborted");return i.name="AbortError",i},Wa=({clearTimeout:i,setTimeout:s,willResolve:r})=>(u,{value:f,signal:h}={})=>{if(h&&h.aborted)return Promise.reject(Ba());let g,m,w;const A=i||clearTimeout,C=()=>{A(g),w(Ba())},T=()=>{h&&h.removeEventListener("abort",C)},L=new Promise((O,D)=>{m=()=>{T(),r?O(f):D(f)},w=D,g=(s||setTimeout)(m,u)});return h&&h.addEventListener("abort",C,{once:!0}),L.clear=()=>{A(g),g=null,m()},L},$a=i=>{const s=Wa(Bn(dn({},i),{willResolve:!0}));return s.reject=Wa(Bn(dn({},i),{willResolve:!1})),s.range=(r,u,f)=>s(zf(r,u),f),s},wi=$a();wi.createWithTimers=$a,yi.exports=wi,yi.exports.default=wi;var ka=yi.exports,bi,Gf=Uf.default;bi=Gf.createRoot;var Ua={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 Va(i,s){i===void 0&&(i=!1);var r=vh(M.useState(i),2),u=r[0],f=r[1],h=M.useMemo(function(){var g=s===void 0?!i:s,m=function(){return f(function(L){return L===i?g:i})},w=function(L){return f(L)},A=function(){return f(i)},C=function(){return f(g)};return{toggle:m,set:w,setLeft:A,setRight:C}},[]);return[u,h]}var _h=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 mh(i){i===void 0&&(i=!1);var s=_h(Va(i),2),r=s[0],u=s[1],f=u.toggle,h=u.set,g=M.useMemo(function(){var m=function(){return h(!0)},w=function(){return h(!1)};return{toggle:f,set:function(C){return h(!!C)},setTrue:m,setFalse:w}},[]);return[r,g]}var yh=!!(typeof window!="undefined"&&window.document&&window.document.createElement),wh=yh;function hr(i,s){if(!!wh){if(!i)return s;var r;return Ha(i)?r=i():"current"in i?r=i.current:r=i,r}}var bh=function(s){var r=function(f,h,g){var m=M.useRef(!1),w=M.useRef([]),A=M.useRef([]),C=M.useRef();s(function(){var T,L=Array.isArray(g)?g:[g],O=L.map(function(D){return hr(D)});if(!m.current){m.current=!0,w.current=O,A.current=h,C.current=f();return}(O.length!==w.current.length||!Ga(O,w.current)||!Ga(h,A.current))&&((T=C.current)===null||T===void 0||T.call(C),w.current=O,A.current=h,C.current=f())}),Ka(function(){var T;(T=C.current)===null||T===void 0||T.call(C),m.current=!1})};return r},Sh=bh,xh=Sh(M.useEffect),Qa=xh,eo={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",C="week",T="month",L="quarter",O="year",D="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 $h=Wh,kh=dr;function Uh(i,s){var r=this.__data__,u=kh(r,i);return u<0?(++this.size,r.push([i,s])):r[u][1]=s,this}var Hh=Uh,zh=Th,Gh=Ih,Kh=Fh,Yh=$h,Xh=Hh;function pn(i){var s=-1,r=i==null?0:i.length;for(this.clear();++sm))return!1;var A=h.get(i),C=h.get(s);if(A&&C)return A==s&&C==i;var T=-1,L=!0,O=r&dg?new lg:void 0;for(h.set(i,s),h.set(s,i);++T-1&&i%1==0&&i-1&&i%1==0&&i<=Sv}var _o=xv,Av=cr,Tv=_o,Cv=fr,Ev="[object Arguments]",Lv="[object Array]",Ov="[object Boolean]",Rv="[object Date]",Mv="[object Error]",Dv="[object Function]",Iv="[object Map]",Pv="[object Number]",Nv="[object Object]",Fv="[object RegExp]",Bv="[object Set]",Wv="[object String]",$v="[object WeakMap]",kv="[object ArrayBuffer]",Uv="[object DataView]",Hv="[object Float32Array]",zv="[object Float64Array]",Gv="[object Int8Array]",Kv="[object Int16Array]",Yv="[object Int32Array]",Xv="[object Uint8Array]",Zv="[object Uint8ClampedArray]",jv="[object Uint16Array]",Jv="[object Uint32Array]",ye={};ye[Hv]=ye[zv]=ye[Gv]=ye[Kv]=ye[Yv]=ye[Xv]=ye[Zv]=ye[jv]=ye[Jv]=!0,ye[Ev]=ye[Lv]=ye[kv]=ye[Ov]=ye[Uv]=ye[Rv]=ye[Mv]=ye[Dv]=ye[Iv]=ye[Pv]=ye[Nv]=ye[Fv]=ye[Bv]=ye[Wv]=ye[$v]=!1;function qv(i){return Cv(i)&&Tv(i.length)&&!!ye[Av(i)]}var Vv=qv;function Qv(i){return function(s){return i(s)}}var e_=Qv,Ei={exports:{}};(function(i,s){var r=Xa,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})(Ei,Ei.exports);var t_=Vv,n_=e_,mo=Ei.exports,yo=mo&&mo.isTypedArray,r_=yo?n_(yo):t_,wo=r_,i_=sv,s_=gv,a_=Ci,o_=mr.exports,u_=bv,l_=wo,c_=Object.prototype,f_=c_.hasOwnProperty;function h_(i,s){var r=a_(i),u=!r&&s_(i),f=!r&&!u&&o_(i),h=!r&&!u&&!f&&l_(i),g=r||u||f||h,m=g?i_(i.length,String):[],w=m.length;for(var A in i)(s||f_.call(i,A))&&!(g&&(A=="length"||f&&(A=="offset"||A=="parent")||h&&(A=="buffer"||A=="byteLength"||A=="byteOffset")||u_(A,w)))&&m.push(A);return m}var d_=h_,p_=Object.prototype;function g_(i){var s=i&&i.constructor,r=typeof s=="function"&&s.prototype||p_;return i===r}var v_=g_;function __(i,s){return function(r){return i(s(r))}}var m_=__,y_=m_,w_=y_(Object.keys,Object),b_=w_,S_=v_,x_=b_,A_=Object.prototype,T_=A_.hasOwnProperty;function C_(i){if(!S_(i))return x_(i);var s=[];for(var r in Object(i))T_.call(i,r)&&r!="constructor"&&s.push(r);return s}var E_=C_,L_=ro,O_=_o;function R_(i){return i!=null&&O_(i.length)&&!L_(i)}var M_=R_,D_=d_,I_=E_,P_=M_;function N_(i){return P_(i)?D_(i):I_(i)}var F_=N_,B_=Xg,W_=rv,$_=F_;function k_(i){return B_(i,$_,W_)}var U_=k_,bo=U_,H_=1,z_=Object.prototype,G_=z_.hasOwnProperty;function K_(i,s,r,u,f,h){var g=r&H_,m=bo(i),w=m.length,A=bo(s),C=A.length;if(w!=C&&!g)return!1;for(var T=w;T--;){var L=m[T];if(!(g?L in s:G_.call(s,L)))return!1}var O=h.get(i),D=h.get(s);if(O&&D)return O==s&&D==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},Ni=function(i,s){var r=s||{},u=r.onEnter,f=r.onLeave,h=Om(mh(!1),2),g=h[0],m=h[1],w=m.setTrue,A=m.setFalse;return Pi("mouseenter",function(){u==null||u(),w()},{target:i}),Pi("mouseleave",function(){f==null||f(),A()},{target:i}),g},Rm=function(s,r){return r===void 0&&(r=[]),Lm(s,r)},Mm=function(s,r,u){var f=M.useRef(),h=M.useRef(0);Rm(r,f.current)||(f.current=r,h.current+=1),Qa(s,[h.current],u)},Dm=Mm,Fi=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.")},Im={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},Bi={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 Pm(i){var s=Object.keys(Bi).reduce(function(r,u){return Bi[u](i)?r+1:r},0);return[16,17,18,91,92].includes(i.keyCode)?s:s+1}function Fo(i,s,r){var u,f;if(!i.key)return!1;if(za(s))return i.keyCode===s;var h=s.split("."),g=0;try{for(var m=Fi(h),w=m.next();!w.done;w=m.next()){var A=w.value,C=Bi[A],T=Im[A.toLowerCase()];(C&&C(i)||T&&T===i.keyCode)&&g++}}catch(L){u={error:L}}finally{try{w&&!w.done&&(f=m.return)&&f.call(m)}finally{if(u)throw u.error}}return r?g===h.length&&Pm(i)===h.length:g===h.length}function Nm(i,s){return Ha(i)?i:Kf(i)||za(i)?function(r){return Fo(r,i,s)}:Array.isArray(i)?function(r){return i.some(function(u){return Fo(r,u,s)})}:i?function(){return!0}:function(){return!1}}var Fm=["keydown"];function Qt(i,s,r){var u=r||{},f=u.events,h=f===void 0?Fm:f,g=u.target,m=u.exactMatch,w=m===void 0?!1:m,A=lr(s),C=lr(i);Dm(function(){var T,L,O,D=hr(g,window);if(!!D){var I=function(ne){var J,we=Nm(C.current,w);if(we(ne))return(J=A.current)===null||J===void 0?void 0:J.call(A,ne)};try{for(var F=Fi(h),W=F.next();!W.done;W=F.next()){var le=W.value;(O=D==null?void 0:D.addEventListener)===null||O===void 0||O.call(D,le,I)}}catch(ae){T={error:ae}}finally{try{W&&!W.done&&(L=F.return)&&L.call(F)}finally{if(T)throw T.error}}return function(){var ae,ne,J;try{for(var we=Fi(h),xe=we.next();!xe.done;xe=we.next()){var Be=xe.value;(J=D==null?void 0:D.removeEventListener)===null||J===void 0||J.call(D,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 Bm=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 Wm(i){var s=M.useRef(0),r=Bm(M.useState(i),2),u=r[0],f=r[1],h=M.useCallback(function(g){cancelAnimationFrame(s.current),s.current=requestAnimationFrame(function(){f(g)})},[]);return Ka(function(){cancelAnimationFrame(s.current)}),[u,h]}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},km={screenX:NaN,screenY:NaN,clientX:NaN,clientY:NaN,pageX:NaN,pageY:NaN,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},Um=function(i){var s=$m(Wm(km),2),r=s[0],u=s[1];return Pi("mousemove",function(f){var h=f.screenX,g=f.screenY,m=f.clientX,w=f.clientY,A=f.pageX,C=f.pageY,T={screenX:h,screenY:g,clientX:m,clientY:w,pageX:A,pageY:C,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},L=hr(i);if(L){var O=L.getBoundingClientRect(),D=O.left,I=O.top,F=O.width,W=O.height;T.elementPosX=D+window.pageXOffset,T.elementPosY=I+window.pageYOffset,T.elementX=A-T.elementPosX,T.elementY=C-T.elementPosY,T.elementW=F,T.elementH=W}u(T)},{target:function(){return document}}),r};const Wi=Symbol(),Hm=Symbol(),$i=Symbol(),ki=Object.getPrototypeOf,Ui=new WeakMap,Bo=i=>i&&(Ui.has(i)?Ui.get(i):ki(i)===Object.prototype||ki(i)===Array.prototype),Hi=i=>typeof i=="object"&&i!==null,zm=(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(Wi)||w.add(g)}},f={f:s,get(h,g){return g===$i?i:(u(this,g),Wo(h[g],this.a,this.c))},has(h,g){return g===Hm?(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,Wi),Reflect.ownKeys(h)}};return s&&(f.set=f.deleteProperty=()=>!1),f},Wo=(i,s,r)=>{if(!Bo(i))return i;const u=i[$i]||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=zm(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(ki(g),m)})(u):u,h),r&&r.set(u,h)),h.a=s,h.c=r,h.p},Gm=(i,s)=>{const r=Reflect.ownKeys(i),u=Reflect.ownKeys(s);return r.length!==u.length||r.some((f,h)=>f!==u[h])},$o=(i,s,r,u)=>{if(Object.is(i,s))return!1;if(!Hi(i)||!Hi(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===Wi?Gm(i,s):$o(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},Km=i=>Bo(i)&&i[$i]||null,ko=(i,s)=>{Ui.set(i,s)},Ym=(i,s)=>{const r=[],u=new WeakSet,f=(h,g)=>{if(u.has(h))return;Hi(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 Uo={exports:{}},Ho={};/** * @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=_i.default;function Xm(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Zm=typeof Object.is=="function"?Object.is:Xm,jm=wn.useState,Jm=wn.useEffect,qm=wn.useLayoutEffect,Vm=wn.useDebugValue;function Qm(i,s){var r=s(),u=jm({inst:{value:r,getSnapshot:s}}),f=u[0].inst,h=u[1];return qm(function(){f.value=r,f.getSnapshot=s,zi(f)&&h({inst:f})},[i,r,s]),Jm(function(){return zi(f)&&h({inst:f}),i(function(){zi(f)&&h({inst:f})})},[i]),Vm(r),r}function zi(i){var s=i.getSnapshot;i=i.value;try{var r=s();return!Zm(i,r)}catch{return!0}}function e0(i,s){return s()}var t0=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?e0:Qm;Ho.useSyncExternalStore=wn.useSyncExternalStore!==void 0?wn.useSyncExternalStore:t0,Uo.exports=Ho;var n0=Uo.exports;const r0=({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(),i0=({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(),zo=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("PROMISE_ERROR"):Symbol(),Go=new WeakSet,Gi=i=>typeof i=="object"&&i!==null,s0=i=>Gi(i)&&!Go.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),Ko=new WeakMap;let Yo=1;const Xo=new WeakMap;function Ki(i={}){if(!Gi(i))throw new Error("object required");const s=Ko.get(i);if(s)return s;let r=Yo;const u=new Set,f=(L,O=++Yo)=>{r!==O&&(r=O,u.forEach(D=>D(L,O)))},h=new Map,g=L=>{let O=h.get(L);return O||(O=(D,I)=>{const F=[...D];F[1]=[L,...F[1]],f(F,I)},h.set(L,O)),O},m=L=>{const O=h.get(L);return h.delete(L),O},w=(L,O)=>{const D=Xo.get(O);if((D==null?void 0:D[0])===r)return D[1];const I=Array.isArray(L)?[]:Object.create(Object.getPrototypeOf(L));return ko(I,!0),Xo.set(O,[r,I]),Reflect.ownKeys(L).forEach(F=>{const W=Reflect.get(L,F,O);if(Go.has(W))ko(W,!1),I[F]=W;else if(W instanceof Promise)if(Un in W)I[F]=W[Un];else{const le=W[zo]||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)),C={get(L,O,D){return O===r0?r:O===At?u:O===wr?w(L,D):O===i0?C:Reflect.get(L,O,D)},deleteProperty(L,O){const D=Reflect.get(L,O),I=D==null?void 0:D[At];I&&I.delete(m(O));const F=Reflect.deleteProperty(L,O);return F&&f(["delete",[O],D]),F},is:Object.is,canProxy:s0,set(L,O,D,I){var F;const W=Reflect.has(L,O),le=Reflect.get(L,O,I);if(W&&this.is(le,D))return!0;const ae=le==null?void 0:le[At];ae&&ae.delete(m(O)),Gi(D)&&(D=Km(D)||D);let ne;return(F=Object.getOwnPropertyDescriptor(L,O))!=null&&F.set?ne=D:D instanceof Promise?ne=D.then(J=>(ne[Un]=J,f(["resolve",[O],J]),J)).catch(J=>{ne[zo]=J,f(["reject",[O],J])}):D!=null&&D[At]?(ne=D,ne[At].add(g(O))):this.canProxy(D)?(ne=Ki(D),ne[At].add(g(O))):ne=D,Reflect.set(L,O,ne,I),f(["set",[O],D,le]),!0}},T=new Proxy(A,C);return Ko.set(i,T),Reflect.ownKeys(i).forEach(L=>{const O=Object.getOwnPropertyDescriptor(i,L);O.get||O.set?Object.defineProperty(A,L,O):T[L]=i[L]}),T}function a0(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 Zo(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:o0}=n0,u0=(i,s)=>{const r=M.useRef();M.useEffect(()=>{r.current=Ym(i,s)}),M.useDebugValue(r.current)};function jo(i,s){const r=s==null?void 0:s.sync,u=M.useRef(),f=M.useRef();let h=!0;const g=o0(M.useCallback(A=>{const C=a0(i,A,r);return A(),C},[i,r]),()=>{const A=Zo(i);try{if(!h&&u.current&&f.current&&!$o(u.current,A,f.current,new WeakMap))return u.current}catch{}return A},()=>Zo(i));h=!1;const m=new WeakMap;M.useEffect(()=>{u.current=g,f.current=m}),({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&u0(g,m);const w=M.useMemo(()=>new WeakMap,[]);return Wo(g,m,w)}const bn=Ki({accessKey:"",useNarrowMode:!1}),Yi=function(){return jo(bn)},Jo="bilibili-app-recommend.config";function l0(){const i=GM_getValue(Jo);i&&typeof i=="object"&&Object.assign(bn,i)}function c0(){GM_setValue(Jo,bn)}function Xi(i){Object.assign(bn,i),c0()}l0();const qo="_toast-container_9119l_1";var eC={toastContainer:qo};function Ht(i,s=2e3){const r=$n.default(`
${i}
`);r.appendTo(document.body),setTimeout(()=>r.remove(),s)}const f0="\u8BF7\u6C42\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!",h0="\u64CD\u4F5C\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!";function Vo(){return Ht(f0)}function Qo(){return Ht(h0)}async function d0(){var w,A;const s=(await mi.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(C=>{window.addEventListener("message",T=>{if(T.origin!="https://www.mcbbs.net"||!T.data)return;const L=T.data.match(/access_key=([0-9a-z]{32})/);if(!L||!L[1])return C({errmsg:"\u6CA1\u6709\u83B7\u5F97\u5339\u914D\u7684\u5BC6\u94A5"});C(L[1])}),u=setTimeout(()=>{C({errmsg:"\u83B7\u53D6\u6388\u6743\u8D85\u65F6"})},5e3)}),h=$n.default(`