// ==UserScript== // @name bilibili-app-recommend // @namespace https://magicdawn.fun // @version 0.2.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.26.1/dist/axios.min.js // @require https://unpkg.com/axios-userscript-adapter@0.1.11/dist/axiosGmxhrAdapter.min.js // @require https://unpkg.com/react@18.0.0/umd/react.production.min.js // @require https://unpkg.com/react-dom@18.0.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_1mlbh_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_1mlbh_1._narrow-mode_1mlbh_13{background-color:#000000e6}._modal_1mlbh_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_1mlbh_1._narrow-mode_1mlbh_13{width:606px;height:calc(100vh - 10px)}._modal_1mlbh_1 ._modal-header_1mlbh_32{padding-top:10px;padding-bottom:10px;border-bottom:none;padding-right:15px;display:flex;align-items:center}._modal_1mlbh_1 ._modal-header_1mlbh_32 ._modal-title_1mlbh_40{font-size:1.5rem;margin-bottom:0;line-height:1.5}body.dark ._modal_1mlbh_1 ._modal-header_1mlbh_32 ._btn-refresh_1mlbh_45,body.dark ._modal_1mlbh_1 ._modal-header_1mlbh_32 ._btn-close_1mlbh_46{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px}._modal_1mlbh_1 ._modal-header_1mlbh_32 ._btn-close_1mlbh_46{margin-left:10px}._modal_1mlbh_1 ._modal-header_1mlbh_32 ._btn-close_1mlbh_46 svg{width:10px;height:10px}._modal_1mlbh_1 ._modal-body_1mlbh_62{padding-top:0;flex-grow:1;overflow-y:scroll;padding-right:15px}._list_1mlbh_68{color:inherit}._card_1mlbh_71{border:2px solid transparent}._card_1mlbh_71._active_1mlbh_74{border-color:#fa6a9d;border-radius:6px}._video-card-list_1mlbh_78{display:block!important}#_video-card-body_1mlbh_1>*{display:block!important}#_video-card-body_1mlbh_1._narrow-mode_1mlbh_13{grid-template-columns:repeat(2,1fr)}._loader_1mlbh_87{text-align:center;line-height:60px;font-size:120%}#_use-narrow-mode_1mlbh_1{margin-left:5px;margin-top:1px;cursor:pointer}#_use-narrow-mode_1mlbh_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 FT=Object.defineProperty,BT=Object.defineProperties;var WT=Object.getOwnPropertyDescriptors;var wi=Object.getOwnPropertySymbols;var Of=Object.prototype.hasOwnProperty,Rf=Object.prototype.propertyIsEnumerable;var Na=(Oe,Te,D)=>Te in Oe?FT(Oe,Te,{enumerable:!0,configurable:!0,writable:!0,value:D}):Oe[Te]=D,Bn=(Oe,Te)=>{for(var D in Te||(Te={}))Of.call(Te,D)&&Na(Oe,D,Te[D]);if(wi)for(var D of wi(Te))Rf.call(Te,D)&&Na(Oe,D,Te[D]);return Oe},cr=(Oe,Te)=>BT(Oe,WT(Te));var Mf=(Oe,Te)=>{var D={};for(var yt in Oe)Of.call(Oe,yt)&&Te.indexOf(yt)<0&&(D[yt]=Oe[yt]);if(Oe!=null&&wi)for(var yt of wi(Oe))Te.indexOf(yt)<0&&Rf.call(Oe,yt)&&(D[yt]=Oe[yt]);return D};var $a=(Oe,Te,D)=>(Na(Oe,typeof Te!="symbol"?Te+"":Te,D),D);(function(Oe,Te,D,yt,Df){"use strict";function Wn(i){return i&&typeof i=="object"&&"default"in i?i:{default:i}}var kn=Wn(Oe),If=Wn(Te),bi=Wn(D),Si=Wn(yt),Pf=Wn(Df),Ct=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},xi={exports:{}};const Nf=(i,s)=>Math.floor(Math.random()*(s-i+1)+i),Fa=()=>{const i=new Error("Delay aborted");return i.name="AbortError",i},Ba=({clearTimeout:i,setTimeout:s,willResolve:r})=>(u,{value:f,signal:h}={})=>{if(h&&h.aborted)return Promise.reject(Fa());let g,m,w;const A=i||clearTimeout,R=()=>{A(g),w(Fa())},L=()=>{h&&h.removeEventListener("abort",R)},O=new Promise((E,M)=>{m=()=>{L(),r?E(f):M(f)},w=M,g=(s||setTimeout)(m,u)});return h&&h.addEventListener("abort",R,{once:!0}),O.clear=()=>{A(g),g=null,m()},O},Wa=i=>{const s=Ba(cr(Bn({},i),{willResolve:!0}));return s.reject=Ba(cr(Bn({},i),{willResolve:!1})),s.range=(r,u,f)=>s(Nf(r,u),f),s},Ai=Wa();Ai.createWithTimers=Wa,xi.exports=Ai,xi.exports.default=Ai;var ka=xi.exports,Ti,$f=If.default;Ti=$f.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 qa(i,s){i===void 0&&(i=!1);var r=oh(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(O){return O===i?g:i})},w=function(O){return f(O)},A=function(){return f(i)},R=function(){return f(g)};return{toggle:m,set:w,setLeft:A,setRight:R}},[]);return[u,h]}var uh=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 lh(i){i===void 0&&(i=!1);var s=uh(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 ch=!!(typeof window!="undefined"&&window.document&&window.document.createElement),fh=ch;function pr(i,s){if(!!fh){if(!i)return s;var r;return typeof i=="function"?r=i():"current"in i?r=i.current:r=i,r}}var hh=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 L,O=Array.isArray(g)?g:[g],E=O.map(function(M){return pr(M)});if(!m.current){m.current=!0,w.current=E,A.current=h,R.current=f();return}(E.length!==w.current.length||!Ha(E,w.current)||!Ha(h,A.current))&&((L=R.current)===null||L===void 0||L.call(R),w.current=E,A.current=h,R.current=f())}),za(function(){var L;(L=R.current)===null||L===void 0||L.call(R),m.current=!1})};return r},dh=hh,ph=dh(D.useEffect),ja=ph,Va={exports:{}};(function(i,s){(function(r,u){i.exports=u()})(Ct,function(){var r=1e3,u=6e4,f=36e5,h="millisecond",g="second",m="minute",w="hour",A="day",R="week",L="month",O="quarter",E="year",M="date",U="Invalid Date",F=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,H=/\[([^\]]+)]|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,de={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("_")},re=function(q,W,I){var Z=String(q);return!Z||Z.length>=W?q:""+Array(W+1-Z.length).join(I)+q},ie={s:re,z:function(q){var W=-q.utcOffset(),I=Math.abs(W),Z=Math.floor(I/60),P=I%60;return(W<=0?"+":"-")+re(Z,2,"0")+":"+re(P,2,"0")},m:function q(W,I){if(W.date()1)return q(J[0])}else{var oe=W.name;Q[oe]=W,P=oe}return!Z&&P&&(K=P),P||!Z&&K},ve=function(q,W){if(be(q))return q.clone();var I=typeof W=="object"?W:{};return I.date=q,I.args=arguments,new Ge(I)},ae=ie;ae.l=Re,ae.i=be,ae.w=function(q,W){return ve(q,{locale:W.$L,utc:W.$u,x:W.$x,$offset:W.$offset})};var Ge=function(){function q(I){this.$L=Re(I.locale,null,!0),this.parse(I)}var W=q.prototype;return W.parse=function(I){this.$d=function(Z){var P=Z.date,z=Z.utc;if(P===null)return new Date(NaN);if(ae.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)}(I),this.$x=I.x||{},this.init()},W.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},W.$utils=function(){return ae},W.isValid=function(){return this.$d.toString()!==U},W.isSame=function(I,Z){var P=ve(I);return this.startOf(Z)<=P&&P<=this.endOf(Z)},W.isAfter=function(I,Z){return ve(I)-1}var Rh=Oh,Mh=gr;function Dh(i,s){var r=this.__data__,u=Mh(r,i);return u<0?(++this.size,r.push([i,s])):r[u][1]=s,this}var Ih=Dh,Ph=vh,Nh=Ah,$h=Eh,Fh=Rh,Bh=Ih;function vn(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 L=-1,O=!0,E=r&ig?new eg:void 0;for(h.set(i,s),h.set(s,i);++L-1&&i%1==0&&i-1&&i%1==0&&i<=dv}var go=pv,gv=hr,vv=go,_v=dr,mv="[object Arguments]",yv="[object Array]",wv="[object Boolean]",bv="[object Date]",Sv="[object Error]",xv="[object Function]",Av="[object Map]",Tv="[object Number]",Cv="[object Object]",Ev="[object RegExp]",Lv="[object Set]",Ov="[object String]",Rv="[object WeakMap]",Mv="[object ArrayBuffer]",Dv="[object DataView]",Iv="[object Float32Array]",Pv="[object Float64Array]",Nv="[object Int8Array]",$v="[object Int16Array]",Fv="[object Int32Array]",Bv="[object Uint8Array]",Wv="[object Uint8ClampedArray]",kv="[object Uint16Array]",Uv="[object Uint32Array]",we={};we[Iv]=we[Pv]=we[Nv]=we[$v]=we[Fv]=we[Bv]=we[Wv]=we[kv]=we[Uv]=!0,we[mv]=we[yv]=we[Mv]=we[wv]=we[Dv]=we[bv]=we[Sv]=we[xv]=we[Av]=we[Tv]=we[Cv]=we[Ev]=we[Lv]=we[Ov]=we[Rv]=!1;function Hv(i){return _v(i)&&vv(i.length)&&!!we[gv(i)]}var zv=Hv;function Gv(i){return function(s){return i(s)}}var Kv=Gv,Mi={exports:{}};(function(i,s){var r=Ka,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})(Mi,Mi.exports);var Yv=zv,Xv=Kv,vo=Mi.exports,_o=vo&&vo.isTypedArray,Zv=_o?Xv(_o):Yv,mo=Zv,Jv=qg,qv=av,jv=Ri,Vv=wr.exports,Qv=hv,e_=mo,t_=Object.prototype,n_=t_.hasOwnProperty;function r_(i,s){var r=jv(i),u=!r&&qv(i),f=!r&&!u&&Vv(i),h=!r&&!u&&!f&&e_(i),g=r||u||f||h,m=g?Jv(i.length,String):[],w=m.length;for(var A in i)(s||n_.call(i,A))&&!(g&&(A=="length"||f&&(A=="offset"||A=="parent")||h&&(A=="buffer"||A=="byteLength"||A=="byteOffset")||Qv(A,w)))&&m.push(A);return m}var i_=r_,s_=Object.prototype;function a_(i){var s=i&&i.constructor,r=typeof s=="function"&&s.prototype||s_;return i===r}var o_=a_;function u_(i,s){return function(r){return i(s(r))}}var l_=u_,c_=l_,f_=c_(Object.keys,Object),h_=f_,d_=o_,p_=h_,g_=Object.prototype,v_=g_.hasOwnProperty;function __(i){if(!d_(i))return p_(i);var s=[];for(var r in Object(i))v_.call(i,r)&&r!="constructor"&&s.push(r);return s}var m_=__,y_=to,w_=go;function b_(i){return i!=null&&w_(i.length)&&!y_(i)}var S_=b_,x_=i_,A_=m_,T_=S_;function C_(i){return T_(i)?x_(i):A_(i)}var E_=C_,L_=Bg,O_=Zg,R_=E_;function M_(i){return L_(i,R_,O_)}var D_=M_,yo=D_,I_=1,P_=Object.prototype,N_=P_.hasOwnProperty;function $_(i,s,r,u,f,h){var g=r&I_,m=yo(i),w=m.length,A=yo(s),R=A.length;if(w!=R&&!g)return!1;for(var L=w;L--;){var O=m[L];if(!(g?O in s:N_.call(s,O)))return!1}var E=h.get(i),M=h.get(s);if(E&&M)return E==s&&M==i;var U=!0;h.set(i,s),h.set(s,i);for(var F=g;++L0)&&!(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},Wi=function(i,s){var r=s||{},u=r.onEnter,f=r.onLeave,h=wm(lh(!1),2),g=h[0],m=h[1],w=m.setTrue,A=m.setFalse;return Bi("mouseenter",function(){u==null||u(),w()},{target:i}),Bi("mouseleave",function(){f==null||f(),A()},{target:i}),g},bm=function(s,r){return r===void 0&&(r=[]),ym(s,r)},Sm=function(s,r,u){var f=D.useRef(),h=D.useRef(0);bm(r,f.current)||(f.current=r,h.current+=1),ja(s,[h.current],u)},xm=Sm,ki=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.")},Am={"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},Ui={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 Tm(i){var s=Object.keys(Ui).reduce(function(r,u){return Ui[u](i)?r+1:r},0);return[16,17,18,91,92].includes(i.keyCode)?s:s+1}function Po(i,s,r){var u,f;if(!i.key)return!1;if(typeof s=="number")return i.keyCode===s;var h=s.split("."),g=0;try{for(var m=ki(h),w=m.next();!w.done;w=m.next()){var A=w.value,R=Ui[A],L=Am[A.toLowerCase()];(R&&R(i)||L&&L===i.keyCode)&&g++}}catch(O){u={error:O}}finally{try{w&&!w.done&&(f=m.return)&&f.call(m)}finally{if(u)throw u.error}}return r?g===h.length&&Tm(i)===h.length:g===h.length}function Cm(i,s){return typeof i=="function"?i:typeof i=="string"||typeof i=="number"?function(r){return Po(r,i,s)}:Array.isArray(i)?function(r){return i.some(function(u){return Po(r,u,s)})}:i?function(){return!0}:function(){return!1}}var Em=["keydown"];function sn(i,s,r){var u=r||{},f=u.events,h=f===void 0?Em:f,g=u.target,m=u.exactMatch,w=m===void 0?!1:m,A=fr(s),R=fr(i);xm(function(){var L,O,E,M=pr(g,window);if(!!M){var U=function(ie){var K,Q=Cm(R.current,w);if(Q(ie))return(K=A.current)===null||K===void 0?void 0:K.call(A,ie)};try{for(var F=ki(h),H=F.next();!H.done;H=F.next()){var de=H.value;(E=M==null?void 0:M.addEventListener)===null||E===void 0||E.call(M,de,U)}}catch(re){L={error:re}}finally{try{H&&!H.done&&(O=F.return)&&O.call(F)}finally{if(L)throw L.error}}return function(){var re,ie,K;try{for(var Q=ki(h),be=Q.next();!be.done;be=Q.next()){var Re=be.value;(K=M==null?void 0:M.removeEventListener)===null||K===void 0||K.call(M,Re,U)}}catch(ve){re={error:ve}}finally{try{be&&!be.done&&(ie=Q.return)&&ie.call(Q)}finally{if(re)throw re.error}}}}},[h],g)}var Lm=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 Om(i){var s=D.useRef(0),r=Lm(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 za(function(){cancelAnimationFrame(s.current)}),[u,h]}var Rm=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},Mm={screenX:NaN,screenY:NaN,clientX:NaN,clientY:NaN,pageX:NaN,pageY:NaN,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},Dm=function(i){var s=Rm(Om(Mm),2),r=s[0],u=s[1];return Bi("mousemove",function(f){var h=f.screenX,g=f.screenY,m=f.clientX,w=f.clientY,A=f.pageX,R=f.pageY,L={screenX:h,screenY:g,clientX:m,clientY:w,pageX:A,pageY:R,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},O=pr(i);if(O){var E=O.getBoundingClientRect(),M=E.left,U=E.top,F=E.width,H=E.height;L.elementPosX=M+window.pageXOffset,L.elementPosY=U+window.pageYOffset,L.elementX=A-L.elementPosX,L.elementY=R-L.elementPosY,L.elementW=F,L.elementH=H}u(L)},{target:document}),r},Im=function(){var s=D.useRef(!1);return D.useEffect(function(){return s.current=!1,function(){s.current=!0}},[]),s},Pm=Im,Nm=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 Et(i){var s=Pm(),r=Nm(D.useState(i),2),u=r[0],f=r[1],h=D.useCallback(function(g){s.current||f(g)},[]);return[u,h]}const Hi=Symbol(),$m=Symbol(),zi=Symbol(),Gi=Object.getPrototypeOf,Ki=new WeakMap,No=i=>i&&(Ki.has(i)?Ki.get(i):Gi(i)===Object.prototype||Gi(i)===Array.prototype),Yi=i=>typeof i=="object"&&i!==null,Fm=(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(Hi)||w.add(g)}},f={f:s,get(h,g){return g===zi?i:(u(this,g),$o(h[g],this.a,this.c))},has(h,g){return g===$m?(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,Hi),Reflect.ownKeys(h)}};return s&&(f.set=f.deleteProperty=()=>!1),f},$o=(i,s,r)=>{if(!No(i))return i;const u=i[zi]||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=Fm(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(Gi(g),m)})(u):u,h),r&&r.set(u,h)),h.a=s,h.c=r,h.p},Bm=(i,s)=>{const r=Reflect.ownKeys(i),u=Reflect.ownKeys(s);return r.length!==u.length||r.some((f,h)=>f!==u[h])},Fo=(i,s,r,u)=>{if(Object.is(i,s))return!1;if(!Yi(i)||!Yi(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===Hi?Bm(i,s):Fo(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},Wm=i=>No(i)&&i[zi]||null,Bo=(i,s)=>{Ki.set(i,s)},km=(i,s)=>{const r=[],u=new WeakSet,f=(h,g)=>{if(u.has(h))return;Yi(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 Wo={exports:{}},ko={};/** * @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 Sn=bi.default;function Um(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Hm=typeof Object.is=="function"?Object.is:Um,zm=Sn.useState,Gm=Sn.useEffect,Km=Sn.useLayoutEffect,Ym=Sn.useDebugValue;function Xm(i,s){var r=s(),u=zm({inst:{value:r,getSnapshot:s}}),f=u[0].inst,h=u[1];return Km(function(){f.value=r,f.getSnapshot=s,Xi(f)&&h({inst:f})},[i,r,s]),Gm(function(){return Xi(f)&&h({inst:f}),i(function(){Xi(f)&&h({inst:f})})},[i]),Ym(r),r}function Xi(i){var s=i.getSnapshot;i=i.value;try{var r=s();return!Hm(i,r)}catch{return!0}}function Zm(i,s){return s()}var Jm=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?Zm:Xm;ko.useSyncExternalStore=Sn.useSyncExternalStore!==void 0?Sn.useSyncExternalStore:Jm,Wo.exports=ko;var qm=Wo.exports;const jm=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("VERSION"):Symbol(),Lt=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("LISTENERS"):Symbol(),Sr=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("SNAPSHOT"):Symbol(),Vm=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("HANDLER"):Symbol(),Hn=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("PROMISE_RESULT"):Symbol(),Uo=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("PROMISE_ERROR"):Symbol(),Ho=new WeakSet,Zi=i=>typeof i=="object"&&i!==null,Qm=i=>Zi(i)&&!Ho.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),zo=new WeakMap;let Go=1;const Ko=new WeakMap;function Ji(i={}){if(!Zi(i))throw new Error("object required");const s=zo.get(i);if(s)return s;let r=Go;const u=new Set,f=(O,E=++Go)=>{r!==E&&(r=E,u.forEach(M=>M(O,E)))},h=new Map,g=O=>{let E=h.get(O);return E||(E=(M,U)=>{const F=[...M];F[1]=[O,...F[1]],f(F,U)},h.set(O,E)),E},m=O=>{const E=h.get(O);return h.delete(O),E},w=(O,E)=>{const M=Ko.get(E);if((M==null?void 0:M[0])===r)return M[1];const U=Array.isArray(O)?[]:Object.create(Object.getPrototypeOf(O));return Bo(U,!0),Ko.set(E,[r,U]),Reflect.ownKeys(O).forEach(F=>{const H=Reflect.get(O,F,E);if(Ho.has(H))Bo(H,!1),U[F]=H;else if(H instanceof Promise)if(Hn in H)U[F]=H[Hn];else{const de=H[Uo]||H;Object.defineProperty(U,F,{get(){if(Hn in H)return H[Hn];throw de}})}else H!=null&&H[Lt]?U[F]=H[Sr]:U[F]=H}),Object.freeze(U),U},A=Array.isArray(i)?[]:Object.create(Object.getPrototypeOf(i)),R={get(O,E,M){return E===jm?r:E===Lt?u:E===Sr?w(O,M):E===Vm?R:Reflect.get(O,E,M)},deleteProperty(O,E){const M=Reflect.get(O,E),U=M==null?void 0:M[Lt];U&&U.delete(m(E));const F=Reflect.deleteProperty(O,E);return F&&f(["delete",[E],M]),F},is:Object.is,canProxy:Qm,set(O,E,M,U){var F;const H=Reflect.has(O,E),de=Reflect.get(O,E,U);if(H&&this.is(de,M))return!0;const re=de==null?void 0:de[Lt];re&&re.delete(m(E)),Zi(M)&&(M=Wm(M)||M);let ie;return(F=Object.getOwnPropertyDescriptor(O,E))!=null&&F.set?ie=M:M instanceof Promise?ie=M.then(K=>(ie[Hn]=K,f(["resolve",[E],K]),K)).catch(K=>{ie[Uo]=K,f(["reject",[E],K])}):M!=null&&M[Lt]?(ie=M,ie[Lt].add(g(E))):this.canProxy(M)?(ie=Ji(M),ie[Lt].add(g(E))):ie=M,Reflect.set(O,E,ie,U),f(["set",[E],M,de]),!0}},L=new Proxy(A,R);return zo.set(i,L),Reflect.ownKeys(i).forEach(O=>{const E=Object.getOwnPropertyDescriptor(i,O);E.get||E.set?Object.defineProperty(A,O,E):L[O]=i[O]}),L}function e0(i,s,r){({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(i!=null&&i[Lt])&&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[Lt].add(h),()=>{i[Lt].delete(h)}}function Yo(i){return({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(i!=null&&i[Sr])&&console.warn("Please use proxy object"),i[Sr]}const{useSyncExternalStore:t0}=qm,n0=(i,s)=>{const r=D.useRef();D.useEffect(()=>{r.current=km(i,s)}),D.useDebugValue(r.current)};function Xo(i,s){const r=s==null?void 0:s.sync,u=D.useRef(),f=D.useRef();let h=!0;const g=t0(D.useCallback(A=>{const R=e0(i,A,r);return A(),R},[i,r]),()=>{const A=Yo(i);try{if(!h&&u.current&&f.current&&!Fo(u.current,A,f.current,new WeakMap))return u.current}catch{}return A},()=>Yo(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"&&n0(g,m);const w=D.useMemo(()=>new WeakMap,[]);return $o(g,m,w)}const zn=Ji({accessKey:"",useNarrowMode:!1}),qi=function(){return Xo(zn)},Zo="bilibili-app-recommend.config";function r0(){const i=GM_getValue(Zo);i&&typeof i=="object"&&Object.assign(zn,i)}function i0(){GM_setValue(Zo,zn)}function ji(i){Object.assign(zn,i),i0()}r0();const Jo="_toast-container_9119l_1";var UT={toastContainer:Jo};function Kt(i,s=2e3){const r=kn.default(`
${i}
`);r.appendTo(document.body),setTimeout(()=>r.remove(),s)}async function s0(){var w,A;const s=(await Si.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",L=>{if(L.origin!="https://www.mcbbs.net"||!L.data)return;const O=L.data.match(/access_key=([0-9a-z]{32})/);if(!O||!O[1])return R({errmsg:"\u6CA1\u6709\u83B7\u5F97\u5339\u914D\u7684\u5BC6\u94A5"});R(O[1])}),u=setTimeout(()=>{R({errmsg:"\u83B7\u53D6\u6388\u6743\u8D85\u65F6"})},5e3)}),h=kn.default(`