// ==UserScript== // @name bilibili-app-recommend // @namespace https://magicdawn.fun // @version 0.0.6 // @description Add app like recommend part to bilibili homepage // @description:zh-CN 为B站首页添加像App一样的推荐 // @author magicdawn // @supportURL https://github.com/magicdawn/bilibili-app-recommend/issues // @homepageURL https://github.com/magicdawn/bilibili-app-recommend // @license MIT // // @match *://www.bilibili.com/* // // @include https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png?* // // @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 // // @require https://cdn.jsdelivr.net/npm/axios@0.22.0/dist/axios.min.js // @require https://cdn.jsdelivr.net/npm/axios-userscript-adapter@0.1.11/dist/axiosGmxhrAdapter.min.js // @require https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js // @require https://cdn.jsdelivr.net/npm/react@18/umd/react.production.min.js // @require https://cdn.jsdelivr.net/npm/react-dom@18/umd/react-dom.production.min.js // // @downloadURL none // ==/UserScript== (()=>{var n={803:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function a(){for(var e=[],t=0;t{"use strict";n.d(t,{Fy:()=>r,Kh:()=>c,X3:()=>o,YD:()=>d,ZP:()=>f,_m:()=>h,d$:()=>a,jm:()=>l,oC:()=>s,o_:()=>u});var t=n(117),t=n.n(t),i=n(488),n=n.n(i)()(t()),r=(n.push([e.id,".modal-mask_vsFTk {\n position: fixed;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, 0.5);\n z-index: 11000;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.modal_VuPWb {\n width: calc(100vw - 50px);\n height: calc(100vh - 50px);\n border: 1px solid #fa6a9d;\n border-radius: 10px;\n overflow: hidden;\n background-color: #fff;\n padding: 0 15px 15px 15px;\n display: flex;\n flex-direction: column;\n}\n.modal_VuPWb .modal-header_LjV9S {\n padding-top: 10px;\n padding-bottom: 10px;\n border-bottom: none;\n display: flex;\n align-items: center;\n}\n.modal_VuPWb .modal-header_LjV9S .modal-title_qlilb {\n font-size: 1.5rem;\n margin-bottom: 0;\n line-height: 1.5;\n}\nbody.dark .modal_VuPWb .modal-header_LjV9S .btn-refresh_UAaHz,\nbody.dark .modal_VuPWb .modal-header_LjV9S .btn-close_Sew_b {\n color: #eee !important;\n background-color: #333 !important;\n border-color: transparent !important;\n height: auto;\n padding: 8px 12px;\n line-height: 16px;\n font-size: 13px;\n}\n.modal_VuPWb .modal-header_LjV9S .btn-close_Sew_b {\n margin-left: 10px;\n}\n.modal_VuPWb .modal-body_cCBH_ {\n padding-top: 0;\n flex-grow: 1;\n overflow-y: scroll;\n}\n.list_ATnXW {\n color: inherit;\n}\n.card_j5epc {\n color: inherit;\n}\n.video-card-list_TnzRe.is-full .video-card-body.more-class1.more-class2 > * {\n display: block !important;\n}\n.loader_Fd9nU {\n text-align: center;\n line-height: 60px;\n font-size: 140%;\n}\n",""]),"modal-mask_vsFTk"),s="modal_VuPWb",o="modal-header_LjV9S",a="modal-title_qlilb",l="btn-refresh_UAaHz",c="btn-close_Sew_b",u="modal-body_cCBH_",d="video-card-list_TnzRe",h="loader_Fd9nU";const f=n},730:(e,t,n)=>{"use strict";n.d(t,{Nd:()=>a,R0:()=>o,Rs:()=>l,ZP:()=>c,Zl:()=>s,sN:()=>r});var t=n(117),t=n.n(t),i=n(488),n=n.n(i)()(t()),r=(n.push([e.id,".preview-card-wrapper_obs_2 {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 2;\n border-radius: inherit;\n}\n.watch-later_QtZPa {\n z-index: 3;\n}\n.badge_oIZF5 {\n color: #fa6a9d;\n border-radius: 2px;\n border: 1px #fa6a9d solid;\n line-height: 20px;\n padding: 0 10px;\n transform: scale(0.8);\n}\n.recommend-reason__Cdvz {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n display: inline-block;\n color: var(--Or5);\n background-color: var(--Or1);\n border-radius: 4px;\n margin-right: 4px;\n font-size: var(--follow-icon-font-size);\n line-height: var(--follow-icon-line-height);\n height: var(--follow-icon-line-height);\n padding: 0 4px;\n cursor: default;\n}\n.bangumi-desc_dFbZr {\n color: default;\n}\n",""]),"preview-card-wrapper_obs_2"),s="watch-later_QtZPa",o="badge_oIZF5",a="recommend-reason__Cdvz",l="bangumi-desc_dFbZr";const c=n},181:(e,t,n)=>{"use strict";n.d(t,{GG:()=>o,YD:()=>s,ZP:()=>l,eC:()=>r,zh:()=>a});var t=n(117),t=n.n(t),i=n(488),n=n.n(i)()(t()),r=(n.push([e.id,".grid_L8TTJ {\n color: default;\n}\n@media (min-width: 2200px) {\n .video-card-list_dUuWi.is-full {\n grid-column: span 7 !important;\n }\n .video-card-list_dUuWi.is-full .video-card-body.more-class1.more-class2 {\n grid-column: span 7 !important;\n grid-template-columns: repeat(7, 1fr) !important;\n }\n .video-card-list_dUuWi.is-full .video-card-body.more-class1.more-class2 > * {\n display: block !important;\n }\n .video-card-list_dUuWi.is-full .video-card-body.more-class1.more-class2 > *:nth-of-type(1n + 15) {\n display: none !important;\n }\n}\n.expand-btn_wnnXm {\n padding: 0;\n width: 31px;\n height: 31px;\n border-radius: 50%;\n}\n.expand-btn_wnnXm svg {\n width: 13px;\n height: 13px;\n transform: rotateZ(180deg);\n}\n.expand-btn_wnnXm svg.expanded_Uzmr_ {\n transform: rotateZ(0deg);\n}\n",""]),"grid_L8TTJ"),s="video-card-list_dUuWi",o="expand-btn_wnnXm",a="expanded_Uzmr_";const l=n},913:(e,t,n)=>{"use strict";n.d(t,{C:()=>r,Z:()=>s});var t=n(117),t=n.n(t),i=n(488),n=n.n(i)()(t()),r=(n.push([e.id,".toast-container_LjLRu {\n position: fixed;\n top: 50%;\n left: 50%;\n z-index: 999999;\n padding: 12px 24px;\n font-size: 14px;\n width: 240px;\n margin-left: -120px;\n background: #ffb243;\n color: #fff;\n border-radius: 6px;\n}\n",""]),"toast-container_LjLRu");const s=n},488:e=>{"use strict";e.exports=function(i){var u=[];return u.toString=function(){return this.map(function(e){var t="",n=void 0!==e[5];return e[4]&&(t+="@supports (".concat(e[4],") {")),e[2]&&(t+="@media ".concat(e[2]," {")),n&&(t+="@layer".concat(0{"use strict";e.exports=function(e){return e[1]}},624:function(e){e.exports=function(){"use strict";var c=1e3,u=6e4,d=36e5,l="millisecond",f="second",p="minute",m="hour",v="day",g="week",y="month",h="quarter",b="year",x="date",_="Invalid Date",o=/^(\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,e={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("_")},s=function(e,t,n){var i=String(e);return!i||i.length>=t?e:""+Array(t+1-i.length).join(n)+e},t={s:s,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),i=Math.floor(n/60),r=n%60;return(t<=0?"+":"-")+s(i,2,"0")+":"+s(r,2,"0")},m:function e(t,n){if(t.date()1)return e(o[0])}else{var a=t.name;j[a]=t,r=a}return!i&&r&&(S=r),r||!i&&S},k=function(e,t){if(i(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new a(n)},L=t,a=(L.l=r,L.i=i,L.w=function(e,t){return k(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})},function(){function e(e){this.$L=r(e.locale,null,!0),this.parse(e)}var t=e.prototype;return t.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(L.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var i=t.match(o);if(i){var r=i[2]-1||0,s=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},t.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},t.$utils=function(){return L},t.isValid=function(){return!(this.$d.toString()===_)},t.isSame=function(e,t){var n=k(e);return this.startOf(t)<=n&&n<=this.endOf(t)},t.isAfter=function(e,t){return k(e){"use strict";const h=()=>{const e=new Error("Delay aborted");return e.name="AbortError",e},t=({clearTimeout:c,setTimeout:u,willResolve:d})=>(n,{value:i,signal:r}={})=>{if(r&&r.aborted)return Promise.reject(h());let s,o,a;const e=c||clearTimeout,l=()=>{e(s),a(h())},t=new Promise((e,t)=>{o=()=>{r&&r.removeEventListener("abort",l),(d?e:t)(i)},a=t,s=(u||setTimeout)(o,n)});return r&&r.addEventListener("abort",l,{once:!0}),t.clear=()=>{e(s),s=null,o()},t};var n=e=>{const i=t({...e,willResolve:!0});return i.reject=t({...e,willResolve:!1}),i.range=(e,t,n)=>i(((e,t)=>Math.floor(Math.random()*(t-e+1)+e))(e,t),n),i};const i=n();i.createWithTimers=n,e.exports=i,e.exports.default=i},555:e=>{const i="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date;const a="undefined"!=typeof AbortController?AbortController:Object.assign(class{constructor(){this.signal=new a.AbortSignal}abort(){this.signal.aborted=!0}},{AbortSignal:class{constructor(){this.aborted=!1}}}),y=new Set,b=(e,t)=>{var n="LRU_CACHE_OPTION_"+e;_(n)&&r(n,e+" option","options."+t,k)},t=(e,t)=>{var n,i="LRU_CACHE_METHOD_"+e;_(i)&&(n=k["prototype"],n=Object.getOwnPropertyDescriptor(n,e)["get"],r(i,e+" method",`cache.${t}()`,n))},x=(...e)=>{"object"==typeof process&&process&&"function"==typeof process.emitWarning?process.emitWarning(...e):console.error(...e)},_=e=>!y.has(e),r=(e,t,n,i)=>{y.add(e);t=`The ${t} is deprecated. Please use ${n} instead.`;x(t,"DeprecationWarning",e,i)},w=e=>e&&e===Math.floor(e)&&0w(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?s:null:null;class s extends Array{constructor(e){super(e),this.fill(0)}}class j{constructor(e){if(0===e)return[];const t=S(e);this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class k{constructor(e={}){var{max:t=0,ttl:n,ttlResolution:i=1,ttlAutopurge:r,updateAgeOnGet:s,updateAgeOnHas:o,allowStale:a,dispose:l,disposeAfter:c,noDisposeOnSet:u,noUpdateTTL:d,maxSize:h=0,sizeCalculation:f,fetchMethod:p}=e,{length:e,maxAge:m,stale:v}=e instanceof k?{}:e;if(0!==t&&!w(t))throw new TypeError("max option must be a nonnegative integer");const g=t?S(t):Array;if(!g)throw new Error("invalid max value: "+t);if(this.max=t,this.maxSize=h,this.sizeCalculation=f||e,this.sizeCalculation){if(!this.maxSize)throw new TypeError("cannot set sizeCalculation without setting maxSize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=p||null,this.fetchMethod&&"function"!=typeof this.fetchMethod)throw new TypeError("fetchMethod must be a function if specified");if(this.keyMap=new Map,this.keyList=new Array(t).fill(null),this.valList=new Array(t).fill(null),this.next=new g(t),this.prev=new g(t),this.head=0,this.tail=0,this.free=new j(t),this.initialFill=1,this.size=0,"function"==typeof l&&(this.dispose=l),"function"==typeof c?(this.disposeAfter=c,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!u,this.noUpdateTTL=!!d,0!==this.maxSize){if(!w(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!a||!!v,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!o,this.ttlResolution=w(i)||0===i?i:1,this.ttlAutopurge=!!r,this.ttl=n||m||0,this.ttl){if(!w(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(0===this.max&&0===this.ttl&&0===this.maxSize)throw new TypeError("At least one of max, maxSize, or ttl is required");this.ttlAutopurge||this.max||this.maxSize||(h="LRU_CACHE_UNBOUNDED",_(h)&&(y.add(h),x("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",h,k))),v&&b("stale","allowStale"),m&&b("maxAge","ttl"),e&&b("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new s(this.max),this.starts=new s(this.max),this.setItemTTL=(e,t)=>{if(this.starts[e]=0!==t?i.now():0,0!==(this.ttls[e]=t)&&this.ttlAutopurge){const n=setTimeout(()=>{this.isStale(e)&&this.delete(this.keyList[e])},t+1);n.unref&&n.unref()}},this.updateItemAge=e=>{this.starts[e]=0!==this.ttls[e]?i.now():0};let n=0;const t=()=>{var e=i.now();if(0n=0,this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=e=>{e=this.keyMap.get(e);return void 0===e?0:0===this.ttls[e]||0===this.starts[e]?1/0:this.starts[e]+this.ttls[e]-(n||t())},this.isStale=e=>0!==this.ttls[e]&&0!==this.starts[e]&&(n||t())-this.starts[e]>this.ttls[e]}updateItemAge(e){}setItemTTL(e,t){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new s(this.max),this.removeItemSize=e=>this.calculatedSize-=this.sizes[e],this.requireSize=(e,t,n,i)=>{if(!w(n)){if(!i)throw new TypeError("invalid size value (must be positive integer)");if("function"!=typeof i)throw new TypeError("sizeCalculation must be a function");if(n=i(t,e),!w(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return n},this.addItemSize=(e,t,n,i)=>{this.sizes[e]=i;for(var r=this.maxSize-this.sizes[e];this.calculatedSize>r;)this.evict(!0);this.calculatedSize+=this.sizes[e]},this.delete=e=>{var t;return 0!==this.size&&void 0!==(t=this.keyMap.get(e))&&(this.calculatedSize-=this.sizes[t]),k.prototype.delete.call(this,e)}}removeItemSize(e){}addItemSize(e,t,n,i){}requireSize(e,t,n,i){if(n||i)throw new TypeError("cannot set size without setting maxSize on cache")}*indexes({allowStale:t=this.allowStale}={}){if(this.size)for(let e=this.tail;;){1;{if(!this.isValidIndex(e))break;if(!t&&this.isStale(e)||(yield e),e===this.head)break;e=this.prev[e]}}}*rindexes({allowStale:t=this.allowStale}={}){if(this.size)for(let e=this.head;;){1;{if(!this.isValidIndex(e))break;if(!t&&this.isStale(e)||(yield e),e===this.tail)break;e=this.next[e]}}}isValidIndex(e){return this.keyMap.get(this.keyList[e])===e}*entries(){for(const e of this.indexes())yield[this.keyList[e],this.valList[e]]}*rentries(){for(const e of this.rindexes())yield[this.keyList[e],this.valList[e]]}*keys(){for(const e of this.indexes())yield this.keyList[e]}*rkeys(){for(const e of this.rindexes())yield this.keyList[e]}*values(){for(const e of this.indexes())yield this.valList[e]}*rvalues(){for(const e of this.rindexes())yield this.valList[e]}[Symbol.iterator](){return this.entries()}find(e,t={}){for(const n of this.indexes())if(e(this.valList[n],this.keyList[n],this))return this.get(this.keyList[n],t)}forEach(e,t=this){for(const n of this.indexes())e.call(t,this.valList[n],this.keyList[n],this)}rforEach(e,t=this){for(const n of this.rindexes())e.call(t,this.valList[n],this.keyList[n],this)}get prune(){return t("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(const t of this.rindexes({allowStale:!0}))this.isStale(t)&&(this.delete(this.keyList[t]),e=!0);return e}dump(){const e=[];for(const n of this.indexes()){var t=this.keyList[n];const i={value:this.valList[n]};this.ttls&&(i.ttl=this.ttls[n]),this.sizes&&(i.size=this.sizes[n]),e.unshift([t,i])}return e}load(e){this.clear();for(var[t,n]of e)this.set(t,n.value,n)}dispose(e,t,n){}set(e,t,{ttl:n=this.ttl,noDisposeOnSet:i=this.noDisposeOnSet,size:r=0,sizeCalculation:s=this.sizeCalculation,noUpdateTTL:o=this.noUpdateTTL}={}){r=this.requireSize(e,t,r,s);let a=0===this.size?void 0:this.keyMap.get(e);if(void 0===a)a=this.newIndex(),this.keyList[a]=e,this.valList[a]=t,this.keyMap.set(e,a),this.next[this.tail]=a,this.prev[a]=this.tail,this.tail=a,this.size++,this.addItemSize(a,t,e,r),o=!1;else{const l=this.valList[a];t!==l&&(this.isBackgroundFetch(l)?l.__abortController.abort():i||(this.dispose(l,e,"set"),this.disposeAfter&&this.disposed.push([l,e,"set"])),this.removeItemSize(a),this.valList[a]=t,this.addItemSize(a,t,e,r)),this.moveToTail(a)}if(0===n||0!==this.ttl||this.ttls||this.initializeTTLTracking(),o||this.setItemTTL(a,n),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return 0===this.size?this.tail:this.size===this.max&&0!==this.max?this.evict(!1):0!==this.free.length?this.free.pop():this.initialFill++}pop(){var e;if(this.size)return e=this.valList[this.head],this.evict(!0),e}evict(e){var t=this.head,n=this.keyList[t];const i=this.valList[t];return this.isBackgroundFetch(i)?i.__abortController.abort():(this.dispose(i,n,"evict"),this.disposeAfter&&this.disposed.push([i,n,"evict"])),this.removeItemSize(t),e&&(this.keyList[t]=null,this.valList[t]=null,this.free.push(t)),this.head=this.next[t],this.keyMap.delete(n),this.size--,t}has(e,{updateAgeOnHas:t=this.updateAgeOnHas}={}){e=this.keyMap.get(e);return void 0!==e&&!this.isStale(e)&&(t&&this.updateItemAge(e),!0)}peek(e,{allowStale:t=this.allowStale}={}){e=this.keyMap.get(e);if(void 0!==e&&(t||!this.isStale(e)))return this.valList[e]}backgroundFetch(t,e,n){var i=void 0===e?void 0:this.valList[e];if(this.isBackgroundFetch(i))return i;const r=new a,s={signal:r.signal,options:n},o=Promise.resolve(this.fetchMethod(t,i,s)).then(e=>(r.signal.aborted||this.set(t,e,s.options),e));return o.__abortController=r,o.__staleWhileFetching=i,void 0===e?(this.set(t,o,s.options),e=this.keyMap.get(t)):this.valList[e]=o,o}isBackgroundFetch(e){return e&&"object"==typeof e&&"function"==typeof e.then&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")}async fetch(e,{allowStale:t=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,ttl:i=this.ttl,noDisposeOnSet:r=this.noDisposeOnSet,size:s=0,sizeCalculation:o=this.sizeCalculation,noUpdateTTL:a=this.noUpdateTTL}={}){if(!this.fetchMethod)return this.get(e,{allowStale:t,updateAgeOnGet:n});i={allowStale:t,updateAgeOnGet:n,ttl:i,noDisposeOnSet:r,size:s,sizeCalculation:o,noUpdateTTL:a},r=this.keyMap.get(e);if(void 0===r)return this.backgroundFetch(e,r,i);s=this.valList[r];if(this.isBackgroundFetch(s))return t&&void 0!==s.__staleWhileFetching?s.__staleWhileFetching:s;if(!this.isStale(r))return this.moveToTail(r),n&&this.updateItemAge(r),s;o=this.backgroundFetch(e,r,i);return t&&void 0!==o.__staleWhileFetching?o.__staleWhileFetching:o}get(e,{allowStale:t=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet}={}){var i,r,s=this.keyMap.get(e);if(void 0!==s)return i=this.valList[s],r=this.isBackgroundFetch(i),this.isStale(s)?r?t?i.__staleWhileFetching:void 0:(this.delete(e),t?i:void 0):r?void 0:(this.moveToTail(s),n&&this.updateItemAge(s),i)}connect(e,t){this.prev[t]=e,this.next[e]=t}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return t("del","delete"),this.delete}delete(e){let t=!1;if(0!==this.size){var n=this.keyMap.get(e);if(void 0!==n)if(t=!0,1===this.size)this.clear();else{this.removeItemSize(n);const i=this.valList[n];this.isBackgroundFetch(i)?i.__abortController.abort():(this.dispose(i,e,"delete"),this.disposeAfter&&this.disposed.push([i,e,"delete"])),this.keyMap.delete(e),this.keyList[n]=null,this.valList[n]=null,n===this.tail?this.tail=this.prev[n]:n===this.head?this.head=this.next[n]:(this.next[this.prev[n]]=this.next[n],this.prev[this.next[n]]=this.prev[n]),this.size--,this.free.push(n)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return t}clear(){for(const t of this.rindexes({allowStale:!0})){const n=this.valList[t];var e;this.isBackgroundFetch(n)?n.__abortController.abort():(e=this.keyList[t],this.dispose(n,e,"delete"),this.disposeAfter&&this.disposed.push([n,e,"delete"]))}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return t("reset","clear"),this.clear}get length(){var e,t,n,i;return t="size",i="LRU_CACHE_PROPERTY_"+(e="length"),_(i)&&(n=k["prototype"],n=Object.getOwnPropertyDescriptor(n,e)["get"],r(i,e+" property","cache."+t,n)),this.size}}e.exports=k},49:(e,t,n)=>{"use strict";var o=n(257);function i(){}function r(){}r.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,r,s){if(s!==o)throw s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"),s.name="Invariant Violation",s}function t(){return e}var n={array:e.isRequired=e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:i};return n.PropTypes=n}},507:(e,t,n)=>{e.exports=n(49)()},257:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},529:(e,t,n)=>{"use strict";n=n(533);t.s=n.createRoot,n.hydrateRoot},103:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e};function r(e,t){for(var n=0;n{e.exports=n(103)},768:(e,t,n)=>{"use strict";var n=n(363),a=Symbol.for("react.element"),i=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,c=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function r(e,t,n){var i,r={},s=null,o=null;for(i in void 0!==n&&(s=""+n),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(o=t.ref),t)l.call(t,i)&&!u.hasOwnProperty(i)&&(r[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===r[i]&&(r[i]=t[i]);return{$$typeof:a,type:e,key:s,ref:o,props:r,_owner:c.current}}t.Fragment=i,t.jsx=r,t.jsxs=r},10:(e,t,n)=>{"use strict";e.exports=n(768)},590:e=>{"use strict";var c=[];function u(e){for(var t=-1,n=0;n{"use strict";var n={};e.exports=function(e,t){if(!(e=function(e){if(void 0===n[e]){var t=document.querySelector(e);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}n[e]=t}return n[e]}(e)))throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");e.appendChild(t)}},980:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},98:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},937:e=>{"use strict";e.exports=function(s){var o=s.insertStyleElement(s);return{update:function(e){var t,n,i,r;t=o,n=s,i="",(e=e).supports&&(i+="@supports (".concat(e.supports,") {")),e.media&&(i+="@media ".concat(e.media," {")),(r=void 0!==e.layer)&&(i+="@layer".concat(0{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},363:e=>{"use strict";e.exports=React},533:e=>{"use strict";e.exports=ReactDOM}},i={};function pt(e){var t=i[e];if(void 0!==t)return t.exports;t=i[e]={id:e,exports:{}};return n[e].call(t.exports,t,t.exports,pt),t.exports}pt.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return pt.d(t,{a:t}),t},pt.d=(e,t)=>{for(var n in t)pt.o(t,n)&&!pt.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},pt.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),pt.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};(()=>{"use strict";var e={},A=(pt.r(e),pt.d(e,{clean:()=>function(){GM_deleteValue(n)},config:()=>p,load:()=>Y,save:()=>U,updateConfig:()=>m}),pt(10)),M=pt(529),t=$,s=pt.n(t),t=pt(803),E=pt.n(t),D=pt(363);const O=function(){var e=(0,D.useRef)(!1);return(0,D.useEffect)(function(){return e.current=!1,function(){e.current=!0}},[]),e};var z=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,s=n.call(e),o=[];try{for(;(void 0===t||0${e}`);n.appendTo(document.body),setTimeout(()=>n.remove(),t)}async function Z(){var e=await async function(){var e=(await r().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(!e?.data?.has_login)return{errmsg:"你必须登录B站之后才能使用授权",json:e};if(!e?.data?.confirm_uri)return{errmsg:"无法获得授权网址",json:e};e=e.data.confirm_uri;let n;var t=new Promise(t=>{window.addEventListener("message",e=>{if("https://www.mcbbs.net"==e.origin&&e.data)return e=e.data.match(/access_key=([0-9a-z]{32})/),e&&e[1]?void t(e[1]):t({errmsg:"没有获得匹配的密钥"})}),n=setTimeout(()=>{t({errmsg:"获取授权超时"})},5e3)});const i=s()(`