bilibili-app-recommend

为B站首页添加像App一样的推荐

当前为 2022-07-08 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         bilibili-app-recommend
// @namespace    https://magicdawn.fun
// @version      0.3.6
// @author       magicdawn
// @description  为B站首页添加像App一样的推荐
// @license      MIT
// @homepageURL  https://github.com/magicdawn/bilibili-app-recommend
// @supportURL   https://github.com/magicdawn/bilibili-app-recommend/issues
// @match        https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png
// @match        *://www.bilibili.com/
// @require      https://unpkg.com/[email protected]/dist/jquery.min.js
// @require      https://unpkg.com/[email protected]/dist/axios.min.js
// @require      https://unpkg.com/[email protected]/dist/axiosGmxhrAdapter.min.js
// @require      https://unpkg.com/[email protected]/umd/react.production.min.js
// @require      https://unpkg.com/[email protected]/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
// ==/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_14zjz_1{position:relative}._image-wrapper_14zjz_4{border-radius:6px;overflow:hidden}._preview-card-wrapper_14zjz_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_14zjz_21{z-index:3}._badge_14zjz_24{color:#fa6a9d;border-radius:2px;border:1px #fa6a9d solid;line-height:20px;padding:0 10px;transform:scale(.8)}._recommend-reason_14zjz_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_14zjz_47{color:default}._btn-dislike_14zjz_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_14zjz_50 ._btn-dislike-icon_14zjz_65{pointer-events:none;user-select:none;width:12px;height:12px;color:#fff}._btn-dislike_14zjz_50 ._btn-dislike-tip_14zjz_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_14zjz_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_14zjz_87{border:1px solid #333}._disliked-wrapper_14zjz_87 ._dislike-content-cover_14zjz_101{border-top-left-radius:6px;border-top-right-radius:6px;padding-top:56.25%;position:relative}._disliked-wrapper_14zjz_87 ._dislike-content-cover_14zjz_101 ._dislike-content-cover-inner_14zjz_107{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}._disliked-wrapper_14zjz_87 ._dislike-content-cover_14zjz_101 ._dislike-content-cover-inner_14zjz_107 ._dislike-icon_14zjz_118{color:inherit}._disliked-wrapper_14zjz_87 ._dislike-content-cover_14zjz_101 ._dislike-content-cover-inner_14zjz_107 ._dislike-reason_14zjz_121{font-size:20px;text-align:center}._disliked-wrapper_14zjz_87 ._dislike-content-cover_14zjz_101 ._dislike-content-cover-inner_14zjz_107 ._dislike-desc_14zjz_125{font-size:16px;text-align:center}._disliked-wrapper_14zjz_87 ._dislike-content-action_14zjz_129{flex:1;width:100%;border-top:1px solid #eee;display:flex;align-items:center;justify-content:center}body.dark ._disliked-wrapper_14zjz_87 ._dislike-content-action_14zjz_129{border-top:1px solid #333}._disliked-wrapper_14zjz_87 ._dislike-content-action_14zjz_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_1urmj_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_1urmj_1._narrow-mode_1urmj_13{background-color:#000000e6}._modal_1urmj_1{width:calc(100vw - 30px);height:calc(100vh - 30px);border-radius:10px;overflow:hidden;background-color:#fff;padding:0 0 15px 15px;display:flex;flex-direction:column}body.dark ._modal_1urmj_1{border:1px solid #fb7299}._modal_1urmj_1._narrow-mode_1urmj_13{width:606px;height:calc(100vh - 10px);border:none}body.dark ._modal_1urmj_1._narrow-mode_1urmj_13{border:none}._modal_1urmj_1 ._modal-header_1urmj_38{padding-top:10px;padding-bottom:10px;border-bottom:none;padding-right:15px;display:flex;align-items:center}._modal_1urmj_1 ._modal-header_1urmj_38 ._modal-title_1urmj_46{font-size:1.5rem;margin-bottom:0;line-height:1.5}body.dark ._modal_1urmj_1 ._modal-header_1urmj_38 ._btn-refresh_1urmj_51,body.dark ._modal_1urmj_1 ._modal-header_1urmj_38 ._btn-close_1urmj_52{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px}._modal_1urmj_1 ._modal-header_1urmj_38 ._btn-close_1urmj_52{margin-left:10px}._modal_1urmj_1 ._modal-header_1urmj_38 ._btn-close_1urmj_52 svg{width:10px;height:10px}._modal_1urmj_1 ._modal-body_1urmj_68{padding-top:0;flex-grow:1;overflow-y:scroll;padding-right:15px}._list_1urmj_74{color:inherit}._card_1urmj_77{border:2px solid transparent}._card_1urmj_77 .bili-video-card__info{padding-left:2px;padding-bottom:1px;margin-top:calc(var(--info-margin-top) - 1px)}._card_1urmj_77._active_1urmj_85{border-color:#fb7299;border-radius:6px;overflow:hidden}._video-card-list_1urmj_90{display:block!important}#_video-card-body_1urmj_1>*{display:block!important}#_video-card-body_1urmj_1._narrow-mode_1urmj_13{grid-template-columns:repeat(2,1fr)}._loader_1urmj_99{text-align:center;line-height:60px;font-size:120%}._checkbox_1urmj_104{margin-left:5px;margin-top:1px;cursor:pointer;outline:none}._checkbox_1urmj_104+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 gh=Object.defineProperty,yh=Object.defineProperties;var bh=Object.getOwnPropertyDescriptors;var ut=Object.getOwnPropertySymbols;var ms=Object.prototype.hasOwnProperty,gs=Object.prototype.propertyIsEnumerable;var Sn=(v,H,U)=>H in v?gh(v,H,{enumerable:!0,configurable:!0,writable:!0,value:U}):v[H]=U,Se=(v,H)=>{for(var U in H||(H={}))ms.call(H,U)&&Sn(v,U,H[U]);if(ut)for(var U of ut(H))gs.call(H,U)&&Sn(v,U,H[U]);return v},Oe=(v,H)=>yh(v,bh(H));var ys=(v,H)=>{var U={};for(var Z in v)ms.call(v,Z)&&H.indexOf(Z)<0&&(U[Z]=v[Z]);if(v!=null&&ut)for(var Z of ut(v))H.indexOf(Z)<0&&gs.call(v,Z)&&(U[Z]=v[Z]);return U};var Tn=(v,H,U)=>(Sn(v,typeof H!="symbol"?H+"":H,U),U);(function(v,H,U,Z,bs){"use strict";function Ae(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ft=Ae(v),Pe=Ae(H),_s=Ae(U),dt=Ae(Z),ws=Ae(bs),Ss=typeof global=="object"&&global&&global.Object===Object&&global,xn=Ss,Ts=typeof self=="object"&&self&&self.Object===Object&&self,xs=xn||Ts||Function("return this")(),ee=xs,Es=ee.Symbol,te=Es,En=Object.prototype,Cs=En.hasOwnProperty,Os=En.toString,Re=te?te.toStringTag:void 0;function As(e){var t=Cs.call(e,Re),n=e[Re];try{e[Re]=void 0;var r=!0}catch{}var i=Os.call(e);return r&&(t?e[Re]=n:delete e[Re]),i}var Ps=Object.prototype,Rs=Ps.toString;function Ms(e){return Rs.call(e)}var Ds="[object Null]",Ls="[object Undefined]",Cn=te?te.toStringTag:void 0;function Te(e){return e==null?e===void 0?Ls:Ds:Cn&&Cn in Object(e)?As(e):Ms(e)}function xe(e){return e!=null&&typeof e=="object"}var Ns="[object Symbol]";function He(e){return typeof e=="symbol"||xe(e)&&Te(e)==Ns}function ks(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var Fs=Array.isArray,se=Fs,js=1/0,On=te?te.prototype:void 0,An=On?On.toString:void 0;function ht(e){if(typeof e=="string")return e;if(se(e))return ks(e,ht)+"";if(He(e))return An?An.call(e):"";var t=e+"";return t=="0"&&1/e==-js?"-0":t}var Is=/\s/;function $s(e){for(var t=e.length;t--&&Is.test(e.charAt(t)););return t}var zs=/^\s+/;function Bs(e){return e&&e.slice(0,$s(e)+1).replace(zs,"")}function ce(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Pn=0/0,Hs=/^[-+]0x[0-9a-f]+$/i,Ws=/^0b[01]+$/i,Us=/^0o[0-7]+$/i,Ys=parseInt;function pt(e){if(typeof e=="number")return e;if(He(e))return Pn;if(ce(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ce(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Bs(e);var n=Ws.test(e);return n||Us.test(e)?Ys(e.slice(2),n?2:8):Hs.test(e)?Pn:+e}var Rn=1/0,Gs=17976931348623157e292;function Ks(e){if(!e)return e===0?e:0;if(e=pt(e),e===Rn||e===-Rn){var t=e<0?-1:1;return t*Gs}return e===e?e:0}function Vs(e){var t=Ks(e),n=t%1;return t===t?n?t-n:t:0}function Xs(e){return e}var Js="[object AsyncFunction]",Zs="[object Function]",Qs="[object GeneratorFunction]",qs="[object Proxy]";function Mn(e){if(!ce(e))return!1;var t=Te(e);return t==Zs||t==Qs||t==Js||t==qs}var ea=ee["__core-js_shared__"],vt=ea,Dn=function(){var e=/[^.]+$/.exec(vt&&vt.keys&&vt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ta(e){return!!Dn&&Dn in e}var na=Function.prototype,ra=na.toString;function de(e){if(e!=null){try{return ra.call(e)}catch{}try{return e+""}catch{}}return""}var ia=/[\\^$.*+?()[\]{}|]/g,sa=/^\[object .+?Constructor\]$/,aa=Function.prototype,oa=Object.prototype,la=aa.toString,ca=oa.hasOwnProperty,ua=RegExp("^"+la.call(ca).replace(ia,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fa(e){if(!ce(e)||ta(e))return!1;var t=Mn(e)?ua:sa;return t.test(de(e))}function da(e,t){return e==null?void 0:e[t]}function he(e,t){var n=da(e,t);return fa(n)?n:void 0}var ha=he(ee,"WeakMap"),mt=ha;function pa(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var va=800,ma=16,ga=Date.now;function ya(e){var t=0,n=0;return function(){var r=ga(),i=ma-(r-n);if(n=r,i>0){if(++t>=va)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function ba(e){return function(){return e}}var _a=function(){try{var e=he(Object,"defineProperty");return e({},"",{}),e}catch{}}(),We=_a,wa=We?function(e,t){return We(e,"toString",{configurable:!0,enumerable:!1,value:ba(t),writable:!0})}:Xs,Sa=wa,Ta=ya(Sa),xa=Ta,Ea=9007199254740991,Ca=/^(?:0|[1-9]\d*)$/;function gt(e,t){var n=typeof e;return t=t==null?Ea:t,!!t&&(n=="number"||n!="symbol"&&Ca.test(e))&&e>-1&&e%1==0&&e<t}function Oa(e,t,n){t=="__proto__"&&We?We(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function yt(e,t){return e===t||e!==e&&t!==t}var Aa=Object.prototype,Pa=Aa.hasOwnProperty;function Ra(e,t,n){var r=e[t];(!(Pa.call(e,t)&&yt(r,n))||n===void 0&&!(t in e))&&Oa(e,t,n)}var Ln=Math.max;function Ma(e,t,n){return t=Ln(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=Ln(r.length-t,0),a=Array(s);++i<s;)a[i]=r[t+i];i=-1;for(var o=Array(t+1);++i<t;)o[i]=r[i];return o[t]=n(a),pa(e,this,o)}}var Da=9007199254740991;function bt(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Da}function La(e){return e!=null&&bt(e.length)&&!Mn(e)}var Na=Object.prototype;function ka(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Na;return e===n}function Fa(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var ja="[object Arguments]";function Nn(e){return xe(e)&&Te(e)==ja}var kn=Object.prototype,Ia=kn.hasOwnProperty,$a=kn.propertyIsEnumerable,za=Nn(function(){return arguments}())?Nn:function(e){return xe(e)&&Ia.call(e,"callee")&&!$a.call(e,"callee")},_t=za;function Ba(){return!1}var Fn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,jn=Fn&&typeof module=="object"&&module&&!module.nodeType&&module,Ha=jn&&jn.exports===Fn,In=Ha?ee.Buffer:void 0,Wa=In?In.isBuffer:void 0,Ua=Wa||Ba,wt=Ua,Ya="[object Arguments]",Ga="[object Array]",Ka="[object Boolean]",Va="[object Date]",Xa="[object Error]",Ja="[object Function]",Za="[object Map]",Qa="[object Number]",qa="[object Object]",eo="[object RegExp]",to="[object Set]",no="[object String]",ro="[object WeakMap]",io="[object ArrayBuffer]",so="[object DataView]",ao="[object Float32Array]",oo="[object Float64Array]",lo="[object Int8Array]",co="[object Int16Array]",uo="[object Int32Array]",fo="[object Uint8Array]",ho="[object Uint8ClampedArray]",po="[object Uint16Array]",vo="[object Uint32Array]",F={};F[ao]=F[oo]=F[lo]=F[co]=F[uo]=F[fo]=F[ho]=F[po]=F[vo]=!0,F[Ya]=F[Ga]=F[io]=F[Ka]=F[so]=F[Va]=F[Xa]=F[Ja]=F[Za]=F[Qa]=F[qa]=F[eo]=F[to]=F[no]=F[ro]=!1;function mo(e){return xe(e)&&bt(e.length)&&!!F[Te(e)]}function go(e){return function(t){return e(t)}}var $n=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Me=$n&&typeof module=="object"&&module&&!module.nodeType&&module,yo=Me&&Me.exports===$n,St=yo&&xn.process,bo=function(){try{var e=Me&&Me.require&&Me.require("util").types;return e||St&&St.binding&&St.binding("util")}catch{}}(),zn=bo,Bn=zn&&zn.isTypedArray,_o=Bn?go(Bn):mo,Hn=_o,wo=Object.prototype,So=wo.hasOwnProperty;function To(e,t){var n=se(e),r=!n&&_t(e),i=!n&&!r&&wt(e),s=!n&&!r&&!i&&Hn(e),a=n||r||i||s,o=a?Fa(e.length,String):[],c=o.length;for(var l in e)(t||So.call(e,l))&&!(a&&(l=="length"||i&&(l=="offset"||l=="parent")||s&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||gt(l,c)))&&o.push(l);return o}function xo(e,t){return function(n){return e(t(n))}}var Eo=xo(Object.keys,Object),Co=Eo,Oo=Object.prototype,Ao=Oo.hasOwnProperty;function Po(e){if(!ka(e))return Co(e);var t=[];for(var n in Object(e))Ao.call(e,n)&&n!="constructor"&&t.push(n);return t}function Ro(e){return La(e)?To(e):Po(e)}var Mo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Do=/^\w*$/;function Lo(e,t){if(se(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||He(e)?!0:Do.test(e)||!Mo.test(e)||t!=null&&e in Object(t)}var No=he(Object,"create"),De=No;function ko(){this.__data__=De?De(null):{},this.size=0}function Fo(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var jo="__lodash_hash_undefined__",Io=Object.prototype,$o=Io.hasOwnProperty;function zo(e){var t=this.__data__;if(De){var n=t[e];return n===jo?void 0:n}return $o.call(t,e)?t[e]:void 0}var Bo=Object.prototype,Ho=Bo.hasOwnProperty;function Wo(e){var t=this.__data__;return De?t[e]!==void 0:Ho.call(t,e)}var Uo="__lodash_hash_undefined__";function Yo(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=De&&t===void 0?Uo:t,this}function pe(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}pe.prototype.clear=ko,pe.prototype.delete=Fo,pe.prototype.get=zo,pe.prototype.has=Wo,pe.prototype.set=Yo;function Go(){this.__data__=[],this.size=0}function Ue(e,t){for(var n=e.length;n--;)if(yt(e[n][0],t))return n;return-1}var Ko=Array.prototype,Vo=Ko.splice;function Xo(e){var t=this.__data__,n=Ue(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Vo.call(t,n,1),--this.size,!0}function Jo(e){var t=this.__data__,n=Ue(t,e);return n<0?void 0:t[n][1]}function Zo(e){return Ue(this.__data__,e)>-1}function Qo(e,t){var n=this.__data__,r=Ue(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function ae(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ae.prototype.clear=Go,ae.prototype.delete=Xo,ae.prototype.get=Jo,ae.prototype.has=Zo,ae.prototype.set=Qo;var qo=he(ee,"Map"),Le=qo;function el(){this.size=0,this.__data__={hash:new pe,map:new(Le||ae),string:new pe}}function tl(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ye(e,t){var n=e.__data__;return tl(t)?n[typeof t=="string"?"string":"hash"]:n.map}function nl(e){var t=Ye(this,e).delete(e);return this.size-=t?1:0,t}function rl(e){return Ye(this,e).get(e)}function il(e){return Ye(this,e).has(e)}function sl(e,t){var n=Ye(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function oe(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}oe.prototype.clear=el,oe.prototype.delete=nl,oe.prototype.get=rl,oe.prototype.has=il,oe.prototype.set=sl;var al="Expected a function";function Tt(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(al);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var a=e.apply(this,r);return n.cache=s.set(i,a)||s,a};return n.cache=new(Tt.Cache||oe),n}Tt.Cache=oe;var ol=500;function ll(e){var t=Tt(e,function(r){return n.size===ol&&n.clear(),r}),n=t.cache;return t}var cl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ul=/\\(\\)?/g,fl=ll(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(cl,function(n,r,i,s){t.push(i?s.replace(ul,"$1"):r||n)}),t}),dl=fl;function Wn(e){return e==null?"":ht(e)}function Ge(e,t){return se(e)?e:Lo(e,t)?[e]:dl(Wn(e))}var hl=1/0;function xt(e){if(typeof e=="string"||He(e))return e;var t=e+"";return t=="0"&&1/e==-hl?"-0":t}function pl(e,t){t=Ge(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[xt(t[n++])];return n&&n==r?e:void 0}function Un(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Yn=te?te.isConcatSpreadable:void 0;function vl(e){return se(e)||_t(e)||!!(Yn&&e&&e[Yn])}function Gn(e,t,n,r,i){var s=-1,a=e.length;for(n||(n=vl),i||(i=[]);++s<a;){var o=e[s];t>0&&n(o)?t>1?Gn(o,t-1,n,r,i):Un(i,o):r||(i[i.length]=o)}return i}function ml(e){var t=e==null?0:e.length;return t?Gn(e,1):[]}function gl(e){return xa(Ma(e,void 0,ml),e+"")}function yl(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(i);++r<i;)s[r]=e[r+t];return s}function bl(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:yl(e,t,n)}var _l="\\ud800-\\udfff",wl="\\u0300-\\u036f",Sl="\\ufe20-\\ufe2f",Tl="\\u20d0-\\u20ff",xl=wl+Sl+Tl,El="\\ufe0e\\ufe0f",Cl="\\u200d",Ol=RegExp("["+Cl+_l+xl+El+"]");function Et(e){return Ol.test(e)}function Al(e){return e.split("")}var Kn="\\ud800-\\udfff",Pl="\\u0300-\\u036f",Rl="\\ufe20-\\ufe2f",Ml="\\u20d0-\\u20ff",Dl=Pl+Rl+Ml,Ll="\\ufe0e\\ufe0f",Nl="["+Kn+"]",Ct="["+Dl+"]",Ot="\\ud83c[\\udffb-\\udfff]",kl="(?:"+Ct+"|"+Ot+")",Vn="[^"+Kn+"]",Xn="(?:\\ud83c[\\udde6-\\uddff]){2}",Jn="[\\ud800-\\udbff][\\udc00-\\udfff]",Fl="\\u200d",Zn=kl+"?",Qn="["+Ll+"]?",jl="(?:"+Fl+"(?:"+[Vn,Xn,Jn].join("|")+")"+Qn+Zn+")*",Il=Qn+Zn+jl,$l="(?:"+[Vn+Ct+"?",Ct,Xn,Jn,Nl].join("|")+")",zl=RegExp(Ot+"(?="+Ot+")|"+$l+Il,"g");function Bl(e){return e.match(zl)||[]}function Hl(e){return Et(e)?Bl(e):Al(e)}function Wl(){this.__data__=new ae,this.size=0}function Ul(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Yl(e){return this.__data__.get(e)}function Gl(e){return this.__data__.has(e)}var Kl=200;function Vl(e,t){var n=this.__data__;if(n instanceof ae){var r=n.__data__;if(!Le||r.length<Kl-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new oe(r)}return n.set(e,t),this.size=n.size,this}function ue(e){var t=this.__data__=new ae(e);this.size=t.size}ue.prototype.clear=Wl,ue.prototype.delete=Ul,ue.prototype.get=Yl,ue.prototype.has=Gl,ue.prototype.set=Vl;function Xl(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var a=e[n];t(a,n,e)&&(s[i++]=a)}return s}function Jl(){return[]}var Zl=Object.prototype,Ql=Zl.propertyIsEnumerable,qn=Object.getOwnPropertySymbols,ql=qn?function(e){return e==null?[]:(e=Object(e),Xl(qn(e),function(t){return Ql.call(e,t)}))}:Jl,ec=ql;function tc(e,t,n){var r=t(e);return se(e)?r:Un(r,n(e))}function er(e){return tc(e,Ro,ec)}var nc=he(ee,"DataView"),At=nc,rc=he(ee,"Promise"),Pt=rc,ic=he(ee,"Set"),Rt=ic,tr="[object Map]",sc="[object Object]",nr="[object Promise]",rr="[object Set]",ir="[object WeakMap]",sr="[object DataView]",ac=de(At),oc=de(Le),lc=de(Pt),cc=de(Rt),uc=de(mt),ve=Te;(At&&ve(new At(new ArrayBuffer(1)))!=sr||Le&&ve(new Le)!=tr||Pt&&ve(Pt.resolve())!=nr||Rt&&ve(new Rt)!=rr||mt&&ve(new mt)!=ir)&&(ve=function(e){var t=Te(e),n=t==sc?e.constructor:void 0,r=n?de(n):"";if(r)switch(r){case ac:return sr;case oc:return tr;case lc:return nr;case cc:return rr;case uc:return ir}return t});var ar=ve,fc=ee.Uint8Array,or=fc,dc="__lodash_hash_undefined__";function hc(e){return this.__data__.set(e,dc),this}function pc(e){return this.__data__.has(e)}function Ke(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new oe;++t<n;)this.add(e[t])}Ke.prototype.add=Ke.prototype.push=hc,Ke.prototype.has=pc;function vc(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function mc(e,t){return e.has(t)}var gc=1,yc=2;function lr(e,t,n,r,i,s){var a=n&gc,o=e.length,c=t.length;if(o!=c&&!(a&&c>o))return!1;var l=s.get(e),u=s.get(t);if(l&&u)return l==t&&u==e;var f=-1,h=!0,p=n&yc?new Ke:void 0;for(s.set(e,t),s.set(t,e);++f<o;){var d=e[f],y=t[f];if(r)var g=a?r(y,d,f,t,e,s):r(d,y,f,e,t,s);if(g!==void 0){if(g)continue;h=!1;break}if(p){if(!vc(t,function(b,P){if(!mc(p,P)&&(d===b||i(d,b,n,r,s)))return p.push(P)})){h=!1;break}}else if(!(d===y||i(d,y,n,r,s))){h=!1;break}}return s.delete(e),s.delete(t),h}function bc(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function _c(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var wc=1,Sc=2,Tc="[object Boolean]",xc="[object Date]",Ec="[object Error]",Cc="[object Map]",Oc="[object Number]",Ac="[object RegExp]",Pc="[object Set]",Rc="[object String]",Mc="[object Symbol]",Dc="[object ArrayBuffer]",Lc="[object DataView]",cr=te?te.prototype:void 0,Mt=cr?cr.valueOf:void 0;function Nc(e,t,n,r,i,s,a){switch(n){case Lc:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Dc:return!(e.byteLength!=t.byteLength||!s(new or(e),new or(t)));case Tc:case xc:case Oc:return yt(+e,+t);case Ec:return e.name==t.name&&e.message==t.message;case Ac:case Rc:return e==t+"";case Cc:var o=bc;case Pc:var c=r&wc;if(o||(o=_c),e.size!=t.size&&!c)return!1;var l=a.get(e);if(l)return l==t;r|=Sc,a.set(e,t);var u=lr(o(e),o(t),r,i,s,a);return a.delete(e),u;case Mc:if(Mt)return Mt.call(e)==Mt.call(t)}return!1}var kc=1,Fc=Object.prototype,jc=Fc.hasOwnProperty;function Ic(e,t,n,r,i,s){var a=n&kc,o=er(e),c=o.length,l=er(t),u=l.length;if(c!=u&&!a)return!1;for(var f=c;f--;){var h=o[f];if(!(a?h in t:jc.call(t,h)))return!1}var p=s.get(e),d=s.get(t);if(p&&d)return p==t&&d==e;var y=!0;s.set(e,t),s.set(t,e);for(var g=a;++f<c;){h=o[f];var b=e[h],P=t[h];if(r)var D=a?r(P,b,h,t,e,s):r(b,P,h,e,t,s);if(!(D===void 0?b===P||i(b,P,n,r,s):D)){y=!1;break}g||(g=h=="constructor")}if(y&&!g){var T=e.constructor,x=t.constructor;T!=x&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof x=="function"&&x instanceof x)&&(y=!1)}return s.delete(e),s.delete(t),y}var $c=1,ur="[object Arguments]",fr="[object Array]",Ve="[object Object]",zc=Object.prototype,dr=zc.hasOwnProperty;function Bc(e,t,n,r,i,s){var a=se(e),o=se(t),c=a?fr:ar(e),l=o?fr:ar(t);c=c==ur?Ve:c,l=l==ur?Ve:l;var u=c==Ve,f=l==Ve,h=c==l;if(h&&wt(e)){if(!wt(t))return!1;a=!0,u=!1}if(h&&!u)return s||(s=new ue),a||Hn(e)?lr(e,t,n,r,i,s):Nc(e,t,c,n,r,i,s);if(!(n&$c)){var p=u&&dr.call(e,"__wrapped__"),d=f&&dr.call(t,"__wrapped__");if(p||d){var y=p?e.value():e,g=d?t.value():t;return s||(s=new ue),i(y,g,n,r,s)}}return h?(s||(s=new ue),Ic(e,t,n,r,i,s)):!1}function hr(e,t,n,r,i){return e===t?!0:e==null||t==null||!xe(e)&&!xe(t)?e!==e&&t!==t:Bc(e,t,n,r,hr,i)}function Hc(e,t){return e!=null&&t in Object(e)}function Wc(e,t,n){t=Ge(t,e);for(var r=-1,i=t.length,s=!1;++r<i;){var a=xt(t[r]);if(!(s=e!=null&&n(e,a)))break;e=e[a]}return s||++r!=i?s:(i=e==null?0:e.length,!!i&&bt(i)&&gt(a,i)&&(se(e)||_t(e)))}function Uc(e,t){return e!=null&&Wc(e,t,Hc)}function Yc(e){return function(t){return t==null?void 0:t[e]}}var Gc=function(){return ee.Date.now()},Dt=Gc,Kc="Expected a function",Vc=Math.max,Xc=Math.min;function pr(e,t,n){var r,i,s,a,o,c,l=0,u=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(Kc);t=pt(t)||0,ce(n)&&(u=!!n.leading,f="maxWait"in n,s=f?Vc(pt(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h);function p(C){var j=r,z=i;return r=i=void 0,l=C,a=e.apply(z,j),a}function d(C){return l=C,o=setTimeout(b,t),u?p(C):a}function y(C){var j=C-c,z=C-l,k=t-j;return f?Xc(k,s-z):k}function g(C){var j=C-c,z=C-l;return c===void 0||j>=t||j<0||f&&z>=s}function b(){var C=Dt();if(g(C))return P(C);o=setTimeout(b,y(C))}function P(C){return o=void 0,h&&r?p(C):(r=i=void 0,a)}function D(){o!==void 0&&clearTimeout(o),l=0,r=c=i=o=void 0}function T(){return o===void 0?a:P(Dt())}function x(){var C=Dt(),j=g(C);if(r=arguments,i=this,c=C,j){if(o===void 0)return d(c);if(f)return clearTimeout(o),o=setTimeout(b,t),p(c)}return o===void 0&&(o=setTimeout(b,t)),a}return x.cancel=D,x.flush=T,x}function Jc(e,t){return hr(e,t)}function Zc(e,t,n,r){if(!ce(e))return e;t=Ge(t,e);for(var i=-1,s=t.length,a=s-1,o=e;o!=null&&++i<s;){var c=xt(t[i]),l=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(i!=a){var u=o[c];l=r?r(u,c,o):void 0,l===void 0&&(l=ce(u)?u:gt(t[i+1])?[]:{})}Ra(o,c,l),o=o[c]}return e}function Qc(e,t,n){for(var r=-1,i=t.length,s={};++r<i;){var a=t[r],o=pl(e,a);n(o,a)&&Zc(s,Ge(a,e),o)}return s}var qc=9007199254740991,eu=Math.floor;function vr(e,t){var n="";if(!e||t<1||t>qc)return n;do t%2&&(n+=e),t=eu(t/2),t&&(e+=e);while(t);return n}var tu=Yc("length"),nu=tu,mr="\\ud800-\\udfff",ru="\\u0300-\\u036f",iu="\\ufe20-\\ufe2f",su="\\u20d0-\\u20ff",au=ru+iu+su,ou="\\ufe0e\\ufe0f",lu="["+mr+"]",Lt="["+au+"]",Nt="\\ud83c[\\udffb-\\udfff]",cu="(?:"+Lt+"|"+Nt+")",gr="[^"+mr+"]",yr="(?:\\ud83c[\\udde6-\\uddff]){2}",br="[\\ud800-\\udbff][\\udc00-\\udfff]",uu="\\u200d",_r=cu+"?",wr="["+ou+"]?",fu="(?:"+uu+"(?:"+[gr,yr,br].join("|")+")"+wr+_r+")*",du=wr+_r+fu,hu="(?:"+[gr+Lt+"?",Lt,yr,br,lu].join("|")+")",Sr=RegExp(Nt+"(?="+Nt+")|"+hu+du,"g");function pu(e){for(var t=Sr.lastIndex=0;Sr.test(e);)++t;return t}function Tr(e){return Et(e)?pu(e):nu(e)}var vu=Math.ceil;function mu(e,t){t=t===void 0?" ":ht(t);var n=t.length;if(n<2)return n?vr(t,e):t;var r=vr(t,vu(e/Tr(t)));return Et(t)?bl(Hl(r),0,e).join(""):r.slice(0,e)}function gu(e,t,n){e=Wn(e),t=Vs(t);var r=t?Tr(e):0;return t&&r<t?mu(t-r,n)+e:e}function yu(e,t){return Qc(e,t,function(n,r){return Uc(e,r)})}var bu=gl(function(e,t){return e==null?{}:yu(e,t)}),xr=bu,_u="Expected a function";function wu(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(_u);return ce(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),pr(e,t,{leading:r,maxWait:t,trailing:i})}const kt=Symbol(),Su=Symbol(),Ft=Symbol(),jt=Object.getPrototypeOf,It=new WeakMap,Er=e=>e&&(It.has(e)?It.get(e):jt(e)===Object.prototype||jt(e)===Array.prototype),$t=e=>typeof e=="object"&&e!==null,Tu=(e,t)=>{let n=!1;const r=(s,a,o)=>{if(!n){let c=s.a.get(e);c||(c=new Set,s.a.set(e,c)),o&&c.has(kt)||c.add(a)}},i={f:t,get(s,a){return a===Ft?e:(r(this,a),Cr(s[a],this.a,this.c))},has(s,a){return a===Su?(n=!0,this.a.delete(e),!0):(r(this,a),a in s)},getOwnPropertyDescriptor(s,a){return r(this,a,!0),Object.getOwnPropertyDescriptor(s,a)},ownKeys(s){return r(this,kt),Reflect.ownKeys(s)}};return t&&(i.set=i.deleteProperty=()=>!1),i},Cr=(e,t,n)=>{if(!Er(e))return e;const r=e[Ft]||e,i=(a=>Object.isFrozen(a)||Object.values(Object.getOwnPropertyDescriptors(a)).some(o=>!o.writable))(r);let s=n&&n.get(r);return s&&s.f===i||(s=Tu(r,i),s.p=new Proxy(i?(a=>{if(Array.isArray(a))return Array.from(a);const o=Object.getOwnPropertyDescriptors(a);return Object.values(o).forEach(c=>{c.configurable=!0}),Object.create(jt(a),o)})(r):r,s),n&&n.set(r,s)),s.a=t,s.c=n,s.p},xu=(e,t)=>{const n=Reflect.ownKeys(e),r=Reflect.ownKeys(t);return n.length!==r.length||n.some((i,s)=>i!==r[s])},Or=(e,t,n,r)=>{if(Object.is(e,t))return!1;if(!$t(e)||!$t(t))return!0;const i=n.get(e);if(!i)return!0;if(r){const a=r.get(e);if(a&&a.n===t)return a.g;r.set(e,{n:t,g:!1})}let s=null;for(const a of i){const o=a===kt?xu(e,t):Or(e[a],t[a],n,r);if(o!==!0&&o!==!1||(s=o),s)break}return s===null&&(s=!0),r&&r.set(e,{n:t,g:s}),s},Eu=e=>Er(e)&&e[Ft]||null,Ar=(e,t)=>{It.set(e,t)},Cu=(e,t)=>{const n=[],r=new WeakSet,i=(s,a)=>{if(r.has(s))return;$t(s)&&r.add(s);const o=t.get(s);o?o.forEach(c=>{i(s[c],a?[...a,c]:[c])}):a&&n.push(a)};return i(e),n};var Ou=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Pr={exports:{}},Rr={};/**
 * @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 Ee=ft.default;function Au(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Pu=typeof Object.is=="function"?Object.is:Au,Ru=Ee.useState,Mu=Ee.useEffect,Du=Ee.useLayoutEffect,Lu=Ee.useDebugValue;function Nu(e,t){var n=t(),r=Ru({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return Du(function(){i.value=n,i.getSnapshot=t,zt(i)&&s({inst:i})},[e,n,t]),Mu(function(){return zt(i)&&s({inst:i}),e(function(){zt(i)&&s({inst:i})})},[e]),Lu(n),n}function zt(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Pu(e,n)}catch{return!0}}function ku(e,t){return t()}var Fu=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?ku:Nu;Rr.useSyncExternalStore=Ee.useSyncExternalStore!==void 0?Ee.useSyncExternalStore:Fu,Pr.exports=Rr;var ju=Pr.exports;const Iu=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("VERSION"):Symbol(),ne=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("LISTENERS"):Symbol(),Xe=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("SNAPSHOT"):Symbol(),$u=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("HANDLER"):Symbol(),Ne=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("PROMISE_RESULT"):Symbol(),Mr=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("PROMISE_ERROR"):Symbol(),Dr=new WeakSet,Bt=e=>typeof e=="object"&&e!==null,zu=e=>Bt(e)&&!Dr.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer),Lr=new WeakMap;let Nr=1;const kr=new WeakMap;function Je(e={}){if(!Bt(e))throw new Error("object required");const t=Lr.get(e);if(t)return t;let n=Nr;const r=new Set,i=(h,p=++Nr)=>{n!==p&&(n=p,r.forEach(d=>d(h,p)))},s=new Map,a=h=>{let p=s.get(h);return p||(p=(d,y)=>{const g=[...d];g[1]=[h,...g[1]],i(g,y)},s.set(h,p)),p},o=h=>{const p=s.get(h);return s.delete(h),p},c=(h,p)=>{const d=kr.get(p);if((d==null?void 0:d[0])===n)return d[1];const y=Array.isArray(h)?[]:Object.create(Object.getPrototypeOf(h));return Ar(y,!0),kr.set(p,[n,y]),Reflect.ownKeys(h).forEach(g=>{const b=Reflect.get(h,g,p);if(Dr.has(b))Ar(b,!1),y[g]=b;else if(b instanceof Promise)if(Ne in b)y[g]=b[Ne];else{const P=b[Mr]||b;Object.defineProperty(y,g,{get(){if(Ne in b)return b[Ne];throw P}})}else b!=null&&b[ne]?y[g]=b[Xe]:y[g]=b}),Object.freeze(y),y},l=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e)),u={get(h,p,d){return p===Iu?n:p===ne?r:p===Xe?c(h,d):p===$u?u:Reflect.get(h,p,d)},deleteProperty(h,p){const d=Reflect.get(h,p),y=d==null?void 0:d[ne];y&&y.delete(o(p));const g=Reflect.deleteProperty(h,p);return g&&i(["delete",[p],d]),g},is:Object.is,canProxy:zu,set(h,p,d,y){var g;const b=Reflect.has(h,p),P=Reflect.get(h,p,y);if(b&&this.is(P,d))return!0;const D=P==null?void 0:P[ne];D&&D.delete(o(p)),Bt(d)&&(d=Eu(d)||d);let T;return(g=Object.getOwnPropertyDescriptor(h,p))!=null&&g.set?T=d:d instanceof Promise?T=d.then(x=>(T[Ne]=x,i(["resolve",[p],x]),x)).catch(x=>{T[Mr]=x,i(["reject",[p],x])}):d!=null&&d[ne]?(T=d,T[ne].add(a(p))):this.canProxy(d)?(T=Je(d),T[ne].add(a(p))):T=d,Reflect.set(h,p,T,y),i(["set",[p],d,P]),!0}},f=new Proxy(l,u);return Lr.set(e,f),Reflect.ownKeys(e).forEach(h=>{const p=Object.getOwnPropertyDescriptor(e,h);p.get||p.set?Object.defineProperty(l,h,p):f[h]=e[h]}),f}function Fr(e,t,n){({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(e!=null&&e[ne])&&console.warn("Please use proxy object");let r;const i=[],s=a=>{if(i.push(a),n){t(i.splice(0));return}r||(r=Promise.resolve().then(()=>{r=void 0,t(i.splice(0))}))};return e[ne].add(s),()=>{e[ne].delete(s)}}function jr(e){return({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(e!=null&&e[Xe])&&console.warn("Please use proxy object"),e[Xe]}const{useSyncExternalStore:Bu}=ju,Hu=(e,t)=>{const n=v.useRef();v.useEffect(()=>{n.current=Cu(e,t)}),v.useDebugValue(n.current)};function Ht(e,t){const n=t==null?void 0:t.sync,r=v.useRef(),i=v.useRef();let s=!0;const a=Bu(v.useCallback(l=>{const u=Fr(e,l,n);return l(),u},[e,n]),()=>{const l=jr(e);try{if(!s&&r.current&&i.current&&!Or(r.current,l,i.current,new WeakMap))return r.current}catch{}return l},()=>jr(e));s=!1;const o=new WeakMap;v.useEffect(()=>{r.current=a,i.current=o}),({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&Hu(a,o);const c=v.useMemo(()=>new WeakMap,[]);return Cr(a,o,c)}const Ir={accessKey:"",useNarrowMode:!1,initialShowMore:!1},$r=Object.keys(Ir),re=Je(Ir),Wt=function(){return Ht(re)},zr="bilibili-app-recommend.config";function Wu(){const e=GM_getValue(zr);e&&typeof e=="object"&&Object.assign(re,xr(e,$r)),Fr(re,()=>{Uu()})}function Uu(){GM_setValue(zr,xr(re,$r))}function Br(e){Object.assign(re,e)}Wu();var Ut={exports:{}};const Yu=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),Hr=()=>{const e=new Error("Delay aborted");return e.name="AbortError",e},Wr=({clearTimeout:e,setTimeout:t,willResolve:n})=>(r,{value:i,signal:s}={})=>{if(s&&s.aborted)return Promise.reject(Hr());let a,o,c;const l=e||clearTimeout,u=()=>{l(a),c(Hr())},f=()=>{s&&s.removeEventListener("abort",u)},h=new Promise((p,d)=>{o=()=>{f(),n?p(i):d(i)},c=d,a=(t||setTimeout)(o,r)});return s&&s.addEventListener("abort",u,{once:!0}),h.clear=()=>{l(a),a=null,o()},h},Ur=e=>{const t=Wr(Oe(Se({},e),{willResolve:!0}));return t.reject=Wr(Oe(Se({},e),{willResolve:!1})),t.range=(n,r,i)=>t(Yu(n,r),i),t},Yt=Ur();Yt.createWithTimers=Ur,Ut.exports=Yt,Ut.exports.default=Yt;var Yr=Ut.exports,Gt,Gu=_s.default;Gt=Gu.createRoot;var Ku=function(t){return function(n,r){var i=v.useRef(!1);t(function(){return function(){i.current=!1}},[]),t(function(){if(!i.current)i.current=!0;else return n()},r)}},Kt=function(t){return typeof t=="function"},Vu=function(t){return typeof t=="string"},Gr=function(t){return typeof t=="number"};function W(e){var t=v.useRef(e);t.current=v.useMemo(function(){return e},[e]);var n=v.useRef();return n.current||(n.current=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.current.apply(this,r)}),n.current}var Vt=Ku(v.useEffect),Xu=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s},Kr=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Xu(arguments[t]));return e},Vr=function(t,n){var r=n.manual,i=n.ready,s=i===void 0?!0:i,a=n.defaultParams,o=a===void 0?[]:a,c=n.refreshDeps,l=c===void 0?[]:c,u=n.refreshDepsAction,f=v.useRef(!1);return f.current=!1,Vt(function(){!r&&s&&(f.current=!0,t.run.apply(t,Kr(o)))},[s]),Vt(function(){f.current||r||(f.current=!0,u?u():t.refresh())},Kr(l)),{onBefore:function(){if(!s)return{stopNow:!0}}}};Vr.onInit=function(e){var t=e.ready,n=t===void 0?!0:t,r=e.manual;return{loading:!r&&n}};var Ju=Vr;function Xt(e,t){if(e===t)return!0;for(var n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0}function Xr(e,t){var n=v.useRef({deps:t,obj:void 0,initialized:!1}).current;return(n.initialized===!1||!Xt(n.deps,t))&&(n.deps=t,n.obj=e(),n.initialized=!0),n.obj}function ke(e){var t=v.useRef(e);return t.current=e,t}var Zu=function(t){var n=ke(t);v.useEffect(function(){return function(){n.current()}},[])},Fe=Zu,Ze=globalThis&&globalThis.__assign||function(){return Ze=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Ze.apply(this,arguments)},Qe=new Map,Qu=function(t,n,r){var i=Qe.get(t);i!=null&&i.timer&&clearTimeout(i.timer);var s=void 0;n>-1&&(s=setTimeout(function(){Qe.delete(t)},n)),Qe.set(t,Ze(Ze({},r),{timer:s}))},qu=function(t){return Qe.get(t)},qe=new Map,ef=function(t){return qe.get(t)},tf=function(t,n){qe.set(t,n),n.then(function(r){return qe.delete(t),r}).catch(function(){qe.delete(t)})},me={},nf=function(t,n){me[t]&&me[t].forEach(function(r){return r(n)})},Jt=function(t,n){return me[t]||(me[t]=[]),me[t].push(n),function(){var i=me[t].indexOf(n);me[t].splice(i,1)}},rf=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s},sf=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(rf(arguments[t]));return e},af=function(t,n){var r=n.cacheKey,i=n.cacheTime,s=i===void 0?5*60*1e3:i,a=n.staleTime,o=a===void 0?0:a,c=n.setCache,l=n.getCache,u=v.useRef(),f=v.useRef(),h=function(y,g){c?c(g):Qu(y,s,g),nf(y,g.data)},p=function(y,g){return g===void 0&&(g=[]),l?l(g):qu(y)};return Xr(function(){if(!!r){var d=p(r);d&&Object.hasOwnProperty.call(d,"data")&&(t.state.data=d.data,t.state.params=d.params,(o===-1||new Date().getTime()-d.time<=o)&&(t.state.loading=!1)),u.current=Jt(r,function(y){t.setState({data:y})})}},[]),Fe(function(){var d;(d=u.current)===null||d===void 0||d.call(u)}),r?{onBefore:function(y){var g=p(r,y);return!g||!Object.hasOwnProperty.call(g,"data")?{}:o===-1||new Date().getTime()-g.time<=o?{loading:!1,data:g==null?void 0:g.data,returnNow:!0}:{data:g==null?void 0:g.data}},onRequest:function(y,g){var b=ef(r);return b&&b!==f.current?{servicePromise:b}:(b=y.apply(void 0,sf(g)),f.current=b,tf(r,b),{servicePromise:b})},onSuccess:function(y,g){var b;r&&((b=u.current)===null||b===void 0||b.call(u),h(r,{data:y,params:g,time:new Date().getTime()}),u.current=Jt(r,function(P){t.setState({data:P})}))},onMutate:function(y){var g;r&&((g=u.current)===null||g===void 0||g.call(u),h(r,{data:y,params:t.state.params,time:new Date().getTime()}),u.current=Jt(r,function(b){t.setState({data:b})}))}}:{}},of=af,lf=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s},cf=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(lf(arguments[t]));return e},uf=function(t,n){var r=n.debounceWait,i=n.debounceLeading,s=n.debounceTrailing,a=n.debounceMaxWait,o=v.useRef(),c=v.useMemo(function(){var l={};return i!==void 0&&(l.leading=i),s!==void 0&&(l.trailing=s),a!==void 0&&(l.maxWait=a),l},[i,s,a]);return v.useEffect(function(){if(r){var l=t.runAsync.bind(t);return o.current=pr(function(u){u()},r,c),t.runAsync=function(){for(var u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];return new Promise(function(h,p){var d;(d=o.current)===null||d===void 0||d.call(o,function(){l.apply(void 0,cf(u)).then(h).catch(p)})})},function(){var u;(u=o.current)===null||u===void 0||u.cancel(),t.runAsync=l}}},[r,c]),r?{onCancel:function(){var u;(u=o.current)===null||u===void 0||u.cancel()}}:{}},ff=uf,df=function(t,n){var r=n.loadingDelay,i=v.useRef();if(!r)return{};var s=function(){i.current&&clearTimeout(i.current)};return{onBefore:function(){return s(),i.current=setTimeout(function(){t.setState({loading:!0})},r),{loading:!1}},onFinally:function(){s()},onCancel:function(){s()}}},hf=df;function et(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}function Zt(){return et()?document.visibilityState!=="hidden":!0}var je=[];function pf(e){return je.push(e),function(){var n=je.indexOf(e);je.splice(n,1)}}if(et()){var vf=function(){if(!!Zt())for(var t=0;t<je.length;t++){var n=je[t];n()}};window.addEventListener("visibilitychange",vf,!1)}var mf=function(t,n){var r=n.pollingInterval,i=n.pollingWhenHidden,s=i===void 0?!0:i,a=v.useRef(),o=v.useRef(),c=function(){var u;a.current&&clearTimeout(a.current),(u=o.current)===null||u===void 0||u.call(o)};return Vt(function(){r||c()},[r]),r?{onBefore:function(){c()},onFinally:function(){if(!s&&!Zt()){o.current=pf(function(){t.refresh()});return}a.current=setTimeout(function(){t.refresh()},r)},onCancel:function(){c()}}:{}},gf=mf,yf=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s},bf=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(yf(arguments[t]));return e};function _f(e,t){var n=!1;return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];n||(n=!0,e.apply(void 0,bf(r)),setTimeout(function(){n=!1},t))}}function wf(){return et()&&typeof navigator.onLine!="undefined"?navigator.onLine:!0}var Ie=[];function Sf(e){return Ie.push(e),function(){var n=Ie.indexOf(e);Ie.splice(n,1)}}if(et()){var Jr=function(){if(!(!Zt()||!wf()))for(var t=0;t<Ie.length;t++){var n=Ie[t];n()}};window.addEventListener("visibilitychange",Jr,!1),window.addEventListener("focus",Jr,!1)}var Tf=function(t,n){var r=n.refreshOnWindowFocus,i=n.focusTimespan,s=i===void 0?5e3:i,a=v.useRef(),o=function(){var l;(l=a.current)===null||l===void 0||l.call(a)};return v.useEffect(function(){if(r){var c=_f(t.refresh.bind(t),s);a.current=Sf(function(){c()})}return function(){o()}},[r,s]),Fe(function(){o()}),{}},xf=Tf,Ef=function(t,n){var r=n.retryInterval,i=n.retryCount,s=v.useRef(),a=v.useRef(0),o=v.useRef(!1);return i?{onBefore:function(){o.current||(a.current=0),o.current=!1,s.current&&clearTimeout(s.current)},onSuccess:function(){a.current=0},onError:function(){if(a.current+=1,i===-1||a.current<=i){var l=r!=null?r:Math.min(1e3*Math.pow(2,a.current),3e4);s.current=setTimeout(function(){o.current=!0,t.refresh()},l)}else a.current=0},onCancel:function(){a.current=0,s.current&&clearTimeout(s.current)}}:{}},Cf=Ef,Of=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s},Af=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Of(arguments[t]));return e},Pf=function(t,n){var r=n.throttleWait,i=n.throttleLeading,s=n.throttleTrailing,a=v.useRef(),o={};return i!==void 0&&(o.leading=i),s!==void 0&&(o.trailing=s),v.useEffect(function(){if(r){var c=t.runAsync.bind(t);return a.current=wu(function(l){l()},r,o),t.runAsync=function(){for(var l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];return new Promise(function(f,h){var p;(p=a.current)===null||p===void 0||p.call(a,function(){c.apply(void 0,Af(l)).then(f).catch(h)})})},function(){var l;t.runAsync=c,(l=a.current)===null||l===void 0||l.cancel()}}},[r,i,s]),r?{onCancel:function(){var l;(l=a.current)===null||l===void 0||l.cancel()}}:{}},Rf=Pf,Mf=function(t){v.useEffect(function(){t==null||t()},[])},Df=Mf,Lf=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s},Nf=function(){var t=Lf(v.useState({}),2),n=t[1];return v.useCallback(function(){return n({})},[])},kf=Nf,fe=globalThis&&globalThis.__assign||function(){return fe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},fe.apply(this,arguments)},Ff=globalThis&&globalThis.__awaiter||function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function o(u){try{l(r.next(u))}catch(f){a(f)}}function c(u){try{l(r.throw(u))}catch(f){a(f)}}function l(u){u.done?s(u.value):i(u.value).then(o,c)}l((r=r.apply(e,t||[])).next())})},jf=globalThis&&globalThis.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(u){l=[6,u],i=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},If=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},$f=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s},Ce=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat($f(arguments[t]));return e},zf=function(){function e(t,n,r,i){i===void 0&&(i={}),this.serviceRef=t,this.options=n,this.subscribe=r,this.initState=i,this.count=0,this.state={loading:!1,params:void 0,data:void 0,error:void 0},this.state=fe(fe(fe({},this.state),{loading:!n.manual}),i)}return e.prototype.setState=function(t){t===void 0&&(t={}),this.state=fe(fe({},this.state),t),this.subscribe()},e.prototype.runPluginHandler=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this.pluginImpls.map(function(s){var a;return(a=s[t])===null||a===void 0?void 0:a.call.apply(a,Ce([s],n))}).filter(Boolean);return Object.assign.apply(Object,Ce([{}],i))},e.prototype.runAsync=function(){for(var t,n,r,i,s,a,o,c,l,u,f=[],h=0;h<arguments.length;h++)f[h]=arguments[h];return Ff(this,void 0,void 0,function(){var p,d,y,g,b,P,D,T,x,C,j;return jf(this,function(z){switch(z.label){case 0:if(this.count+=1,p=this.count,d=this.runPluginHandler("onBefore",f),y=d.stopNow,g=y===void 0?!1:y,b=d.returnNow,P=b===void 0?!1:b,D=If(d,["stopNow","returnNow"]),g)return[2,new Promise(function(){})];if(this.setState(fe({loading:!0,params:f},D)),P)return[2,Promise.resolve(D.data)];(n=(t=this.options).onBefore)===null||n===void 0||n.call(t,f),z.label=1;case 1:return z.trys.push([1,3,,4]),T=this.runPluginHandler("onRequest",this.serviceRef.current,f).servicePromise,T||(T=(j=this.serviceRef).current.apply(j,Ce(f))),[4,T];case 2:return x=z.sent(),p!==this.count?[2,new Promise(function(){})]:(this.setState({data:x,error:void 0,loading:!1}),(i=(r=this.options).onSuccess)===null||i===void 0||i.call(r,x,f),this.runPluginHandler("onSuccess",x,f),(a=(s=this.options).onFinally)===null||a===void 0||a.call(s,f,x,void 0),p===this.count&&this.runPluginHandler("onFinally",f,x,void 0),[2,x]);case 3:if(C=z.sent(),p!==this.count)return[2,new Promise(function(){})];throw this.setState({error:C,loading:!1}),(c=(o=this.options).onError)===null||c===void 0||c.call(o,C,f),this.runPluginHandler("onError",C,f),(u=(l=this.options).onFinally)===null||u===void 0||u.call(l,f,void 0,C),p===this.count&&this.runPluginHandler("onFinally",f,void 0,C),C;case 4:return[2]}})})},e.prototype.run=function(){for(var t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];this.runAsync.apply(this,Ce(n)).catch(function(i){t.options.onError||console.error(i)})},e.prototype.cancel=function(){this.count+=1,this.setState({loading:!1}),this.runPluginHandler("onCancel")},e.prototype.refresh=function(){this.run.apply(this,Ce(this.state.params||[]))},e.prototype.refreshAsync=function(){return this.runAsync.apply(this,Ce(this.state.params||[]))},e.prototype.mutate=function(t){var n;Kt(t)?n=t(this.state.data):n=t,this.runPluginHandler("onMutate",n),this.setState({data:n})},e}(),Bf=zf,Qt=globalThis&&globalThis.__assign||function(){return Qt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Qt.apply(this,arguments)},Hf=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Wf=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s},Zr=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Wf(arguments[t]));return e};function Uf(e,t,n){t===void 0&&(t={}),n===void 0&&(n=[]);var r=t.manual,i=r===void 0?!1:r,s=Hf(t,["manual"]),a=Qt({manual:i},s),o=ke(e),c=kf(),l=Xr(function(){var u=n.map(function(f){var h;return(h=f==null?void 0:f.onInit)===null||h===void 0?void 0:h.call(f,a)}).filter(Boolean);return new Bf(o,a,c,Object.assign.apply(Object,Zr([{}],u)))},[]);return l.options=a,l.pluginImpls=n.map(function(u){return u(l,a)}),Df(function(){if(!i){var u=l.state.params||t.defaultParams||[];l.run.apply(l,Zr(u))}}),Fe(function(){l.cancel()}),{loading:l.state.loading,data:l.state.data,error:l.state.error,params:l.state.params||[],cancel:W(l.cancel.bind(l)),refresh:W(l.refresh.bind(l)),refreshAsync:W(l.refreshAsync.bind(l)),run:W(l.run.bind(l)),runAsync:W(l.runAsync.bind(l)),mutate:W(l.mutate.bind(l))}}var Yf=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s},Gf=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Yf(arguments[t]));return e};function Kf(e,t,n){return Uf(e,t,Gf(n||[],[ff,hf,gf,xf,Rf,Ju,of,Cf]))}var Vf=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s};function Qr(e,t){e===void 0&&(e=!1);var n=Vf(v.useState(e),2),r=n[0],i=n[1],s=v.useMemo(function(){var a=t===void 0?!e:t,o=function(){return i(function(h){return h===e?a:e})},c=function(h){return i(h)},l=function(){return i(e)},u=function(){return i(a)};return{toggle:o,set:c,setLeft:l,setRight:u}},[]);return[r,s]}var Xf=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s};function Jf(e){e===void 0&&(e=!1);var t=Xf(Qr(e),2),n=t[0],r=t[1],i=r.toggle,s=r.set,a=v.useMemo(function(){var o=function(){return s(!0)},c=function(){return s(!1)};return{toggle:i,set:function(u){return s(!!u)},setTrue:o,setFalse:c}},[]);return[n,a]}var Zf=!!(typeof window!="undefined"&&window.document&&window.document.createElement),Qf=Zf;function tt(e,t){if(!!Qf){if(!e)return t;var n;return Kt(e)?n=e():"current"in e?n=e.current:n=e,n}}var qf=function(t){var n=function(i,s,a){var o=v.useRef(!1),c=v.useRef([]),l=v.useRef([]),u=v.useRef();t(function(){var f,h=Array.isArray(a)?a:[a],p=h.map(function(d){return tt(d)});if(!o.current){o.current=!0,c.current=p,l.current=s,u.current=i();return}(p.length!==c.current.length||!Xt(p,c.current)||!Xt(s,l.current))&&((f=u.current)===null||f===void 0||f.call(u),c.current=p,l.current=s,u.current=i())}),Fe(function(){var f;(f=u.current)===null||f===void 0||f.call(u),o.current=!1})};return n},ed=qf,td=ed(v.useEffect),qr=td,ei={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Ou,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",a="second",o="minute",c="hour",l="day",u="week",f="month",h="quarter",p="year",d="date",y="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|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,P={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("_")},D=function(E,S,_){var O=String(E);return!O||O.length>=S?E:""+Array(S+1-O.length).join(_)+E},T={s:D,z:function(E){var S=-E.utcOffset(),_=Math.abs(S),O=Math.floor(_/60),w=_%60;return(S<=0?"+":"-")+D(O,2,"0")+":"+D(w,2,"0")},m:function E(S,_){if(S.date()<_.date())return-E(_,S);var O=12*(_.year()-S.year())+(_.month()-S.month()),w=S.clone().add(O,f),A=_-w<0,R=S.clone().add(O+(A?-1:1),f);return+(-(O+(_-w)/(A?w-R:R-w))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:f,y:p,w:u,d:l,D:d,h:c,m:o,s:a,ms:s,Q:h}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},x="en",C={};C[x]=P;var j=function(E){return E instanceof K},z=function E(S,_,O){var w;if(!S)return x;if(typeof S=="string"){var A=S.toLowerCase();C[A]&&(w=A),_&&(C[A]=_,w=A);var R=S.split("-");if(!w&&R.length>1)return E(R[0])}else{var N=S.name;C[N]=S,w=N}return!O&&w&&(x=w),w||!O&&x},k=function(E,S){if(j(E))return E.clone();var _=typeof S=="object"?S:{};return _.date=E,_.args=arguments,new K(_)},L=T;L.l=z,L.i=j,L.w=function(E,S){return k(E,{locale:S.$L,utc:S.$u,x:S.$x,$offset:S.$offset})};var K=function(){function E(_){this.$L=z(_.locale,null,!0),this.parse(_)}var S=E.prototype;return S.parse=function(_){this.$d=function(O){var w=O.date,A=O.utc;if(w===null)return new Date(NaN);if(L.u(w))return new Date;if(w instanceof Date)return new Date(w);if(typeof w=="string"&&!/Z$/i.test(w)){var R=w.match(g);if(R){var N=R[2]-1||0,B=(R[7]||"0").substring(0,3);return A?new Date(Date.UTC(R[1],N,R[3]||1,R[4]||0,R[5]||0,R[6]||0,B)):new Date(R[1],N,R[3]||1,R[4]||0,R[5]||0,R[6]||0,B)}}return new Date(w)}(_),this.$x=_.x||{},this.init()},S.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},S.$utils=function(){return L},S.isValid=function(){return this.$d.toString()!==y},S.isSame=function(_,O){var w=k(_);return this.startOf(O)<=w&&w<=this.endOf(O)},S.isAfter=function(_,O){return k(_)<this.startOf(O)},S.isBefore=function(_,O){return this.endOf(O)<k(_)},S.$g=function(_,O,w){return L.u(_)?this[O]:this.set(w,_)},S.unix=function(){return Math.floor(this.valueOf()/1e3)},S.valueOf=function(){return this.$d.getTime()},S.startOf=function(_,O){var w=this,A=!!L.u(O)||O,R=L.p(_),N=function(J,G){var q=L.w(w.$u?Date.UTC(w.$y,G,J):new Date(w.$y,G,J),w);return A?q:q.endOf(l)},B=function(J,G){return L.w(w.toDate()[J].apply(w.toDate("s"),(A?[0,0,0,0]:[23,59,59,999]).slice(G)),w)},I=this.$W,Y=this.$M,ie=this.$D,Q="set"+(this.$u?"UTC":"");switch(R){case p:return A?N(1,0):N(31,11);case f:return A?N(1,Y):N(0,Y+1);case u:var _e=this.$locale().weekStart||0,we=(I<_e?I+7:I)-_e;return N(A?ie-we:ie+(6-we),Y);case l:case d:return B(Q+"Hours",0);case c:return B(Q+"Minutes",1);case o:return B(Q+"Seconds",2);case a:return B(Q+"Milliseconds",3);default:return this.clone()}},S.endOf=function(_){return this.startOf(_,!1)},S.$set=function(_,O){var w,A=L.p(_),R="set"+(this.$u?"UTC":""),N=(w={},w[l]=R+"Date",w[d]=R+"Date",w[f]=R+"Month",w[p]=R+"FullYear",w[c]=R+"Hours",w[o]=R+"Minutes",w[a]=R+"Seconds",w[s]=R+"Milliseconds",w)[A],B=A===l?this.$D+(O-this.$W):O;if(A===f||A===p){var I=this.clone().set(d,1);I.$d[N](B),I.init(),this.$d=I.set(d,Math.min(this.$D,I.daysInMonth())).$d}else N&&this.$d[N](B);return this.init(),this},S.set=function(_,O){return this.clone().$set(_,O)},S.get=function(_){return this[L.p(_)]()},S.add=function(_,O){var w,A=this;_=Number(_);var R=L.p(O),N=function(Y){var ie=k(A);return L.w(ie.date(ie.date()+Math.round(Y*_)),A)};if(R===f)return this.set(f,this.$M+_);if(R===p)return this.set(p,this.$y+_);if(R===l)return N(1);if(R===u)return N(7);var B=(w={},w[o]=r,w[c]=i,w[a]=n,w)[R]||1,I=this.$d.getTime()+_*B;return L.w(I,this)},S.subtract=function(_,O){return this.add(-1*_,O)},S.format=function(_){var O=this,w=this.$locale();if(!this.isValid())return w.invalidDate||y;var A=_||"YYYY-MM-DDTHH:mm:ssZ",R=L.z(this),N=this.$H,B=this.$m,I=this.$M,Y=w.weekdays,ie=w.months,Q=function(G,q,Be,ct){return G&&(G[q]||G(O,A))||Be[q].slice(0,ct)},_e=function(G){return L.s(N%12||12,G,"0")},we=w.meridiem||function(G,q,Be){var ct=G<12?"AM":"PM";return Be?ct.toLowerCase():ct},J={YY:String(this.$y).slice(-2),YYYY:this.$y,M:I+1,MM:L.s(I+1,2,"0"),MMM:Q(w.monthsShort,I,ie,3),MMMM:Q(ie,I),D:this.$D,DD:L.s(this.$D,2,"0"),d:String(this.$W),dd:Q(w.weekdaysMin,this.$W,Y,2),ddd:Q(w.weekdaysShort,this.$W,Y,3),dddd:Y[this.$W],H:String(N),HH:L.s(N,2,"0"),h:_e(1),hh:_e(2),a:we(N,B,!0),A:we(N,B,!1),m:String(B),mm:L.s(B,2,"0"),s:String(this.$s),ss:L.s(this.$s,2,"0"),SSS:L.s(this.$ms,3,"0"),Z:R};return A.replace(b,function(G,q){return q||J[G]||R.replace(":","")})},S.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},S.diff=function(_,O,w){var A,R=L.p(O),N=k(_),B=(N.utcOffset()-this.utcOffset())*r,I=this-N,Y=L.m(this,N);return Y=(A={},A[p]=Y/12,A[f]=Y,A[h]=Y/3,A[u]=(I-B)/6048e5,A[l]=(I-B)/864e5,A[c]=I/i,A[o]=I/r,A[a]=I/n,A)[R]||I,w?Y:L.a(Y)},S.daysInMonth=function(){return this.endOf(f).$D},S.$locale=function(){return C[this.$L]},S.locale=function(_,O){if(!_)return this.$L;var w=this.clone(),A=z(_,O,!0);return A&&(w.$L=A),w},S.clone=function(){return L.w(this.$d,this)},S.toDate=function(){return new Date(this.valueOf())},S.toJSON=function(){return this.isValid()?this.toISOString():null},S.toISOString=function(){return this.$d.toISOString()},S.toString=function(){return this.$d.toUTCString()},E}(),ze=K.prototype;return k.prototype=ze,[["$ms",s],["$s",a],["$m",o],["$H",c],["$W",l],["$M",f],["$y",p],["$D",d]].forEach(function(E){ze[E[1]]=function(S){return this.$g(S,E[0],E[1])}}),k.extend=function(E,S){return E.$i||(E(S,K,k),E.$i=!0),k},k.locale=z,k.isDayjs=j,k.unix=function(E){return k(1e3*E)},k.en=C[x],k.Ls=C,k.p={},k})})(ei);var ti=ei.exports;function qt(e,t,n){n===void 0&&(n={});var r=ke(t);qr(function(){var i=tt(n.target,window);if(!!(i!=null&&i.addEventListener)){var s=function(o){return r.current(o)};return i.addEventListener(e,s,{capture:n.capture,once:n.once,passive:n.passive}),function(){i.removeEventListener(e,s,{capture:n.capture})}}},[e,n.capture,n.once,n.passive],n.target)}var nd=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s},en=function(e,t){var n=t||{},r=n.onEnter,i=n.onLeave,s=nd(Jf(!1),2),a=s[0],o=s[1],c=o.setTrue,l=o.setFalse;return qt("mouseenter",function(){r==null||r(),c()},{target:e}),qt("mouseleave",function(){i==null||i(),l()},{target:e}),a},rd=function(t,n){return n===void 0&&(n=[]),Jc(t,n)},id=function(t,n,r){var i=v.useRef(),s=v.useRef(0);rd(n,i.current)||(i.current=n,s.current+=1),qr(t,[s.current],r)},sd=id,tn=globalThis&&globalThis.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ad={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},nn={ctrl:function(t){return t.ctrlKey},shift:function(t){return t.shiftKey},alt:function(t){return t.altKey},meta:function(t){return t.metaKey}};function od(e){var t=Object.keys(nn).reduce(function(n,r){return nn[r](e)?n+1:n},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function ni(e,t,n){var r,i;if(!e.key)return!1;if(Gr(t))return e.keyCode===t;var s=t.split("."),a=0;try{for(var o=tn(s),c=o.next();!c.done;c=o.next()){var l=c.value,u=nn[l],f=ad[l.toLowerCase()];(u&&u(e)||f&&f===e.keyCode)&&a++}}catch(h){r={error:h}}finally{try{c&&!c.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return n?a===s.length&&od(e)===s.length:a===s.length}function ld(e,t){return Kt(e)?e:Vu(e)||Gr(e)?function(n){return ni(n,e,t)}:Array.isArray(e)?function(n){return e.some(function(r){return ni(n,r,t)})}:e?function(){return!0}:function(){return!1}}var cd=["keydown"];function ge(e,t,n){var r=n||{},i=r.events,s=i===void 0?cd:i,a=r.target,o=r.exactMatch,c=o===void 0?!1:o,l=ke(t),u=ke(e);sd(function(){var f,h,p,d=tt(a,window);if(!!d){var y=function(T){var x,C=ld(u.current,c);if(C(T))return(x=l.current)===null||x===void 0?void 0:x.call(l,T)};try{for(var g=tn(s),b=g.next();!b.done;b=g.next()){var P=b.value;(p=d==null?void 0:d.addEventListener)===null||p===void 0||p.call(d,P,y)}}catch(D){f={error:D}}finally{try{b&&!b.done&&(h=g.return)&&h.call(g)}finally{if(f)throw f.error}}return function(){var D,T,x;try{for(var C=tn(s),j=C.next();!j.done;j=C.next()){var z=j.value;(x=d==null?void 0:d.removeEventListener)===null||x===void 0||x.call(d,z,y)}}catch(k){D={error:k}}finally{try{j&&!j.done&&(T=C.return)&&T.call(C)}finally{if(D)throw D.error}}}}},[s],a)}var ud=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s};function fd(e){var t=v.useRef(0),n=ud(v.useState(e),2),r=n[0],i=n[1],s=v.useCallback(function(a){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){i(a)})},[]);return Fe(function(){cancelAnimationFrame(t.current)}),[r,s]}var dd=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s},hd={screenX:NaN,screenY:NaN,clientX:NaN,clientY:NaN,pageX:NaN,pageY:NaN,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},pd=function(e){var t=dd(fd(hd),2),n=t[0],r=t[1];return qt("mousemove",function(i){var s=i.screenX,a=i.screenY,o=i.clientX,c=i.clientY,l=i.pageX,u=i.pageY,f={screenX:s,screenY:a,clientX:o,clientY:c,pageX:l,pageY:u,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},h=tt(e);if(h){var p=h.getBoundingClientRect(),d=p.left,y=p.top,g=p.width,b=p.height;f.elementPosX=d+window.pageXOffset,f.elementPosY=y+window.pageYOffset,f.elementX=l-f.elementPosX,f.elementY=u-f.elementPosY,f.elementW=g,f.elementH=b}r(f)},{target:function(){return document}}),n},ri={exports:{}};/*!
  Copyright (c) 2018 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var s=arguments[i];if(!!s){var a=typeof s;if(a==="string"||a==="number")r.push(s);else if(Array.isArray(s)){if(s.length){var o=n.apply(null,s);o&&r.push(o)}}else if(a==="object")if(s.toString===Object.prototype.toString)for(var c in s)t.call(s,c)&&s[c]&&r.push(c);else r.push(s.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(ri);var V=ri.exports;const vd="https://api.bilibili.com",ii="https://app.bilibili.com",rn=dt.default.create({baseURL:vd});rn.interceptors.request.use(function(e){var t;return(t=e.params)!=null&&t._||(e.params=Oe(Se({},e.params),{_:Date.now()})),e},function(e){return Promise.reject(e)});const nt=dt.default.create({adapter:ws.default});nt.interceptors.request.use(function(e){return e.params=Se({access_key:re.accessKey||""},e.params),e},function(e){return Promise.reject(e)}),nt.interceptors.response.use(e=>{if(e.config.responseType==="json"&&e.data&&e.data instanceof ArrayBuffer){const t=new TextDecoder,n=new Uint8Array(e.data),r=t.decode(n);e.data=r;try{e.data=JSON.parse(r)}catch{}}return e});async function md(){return(await nt.get(ii+"/x/feed/index",{responseType:"json",params:{build:"1",mobi_app:"android",idx:(Date.now()/1e3).toFixed(0)}})).data.data}async function gd(){return sn(2)}async function sn(e){const t=new Array(e).fill(0).map(i=>md());let r=(await Promise.all(t)).reduce((i,s)=>i.concat(s),[]);return r=yd(r),r.map(i=>Oe(Se({},i),{uniqId:i.param+"-"+crypto.randomUUID()}))}function yd(e){const t=new Set;return e=e.filter(n=>{const{param:r}=n;return t.has(r)?(console.log("[bilibili-app-recommend]: [uniqRecList]: duplicate",n),!1):(t.add(r),!0)}),e}const si="_toast-container_9119l_1";var wh={toastContainer:si};function le(e,t=2e3){const n=Pe.default(`<div class='${si}'>${e}</div>`);n.appendTo(document.body),setTimeout(()=>n.remove(),t)}const bd="\u8BF7\u6C42\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!",_d="\u64CD\u4F5C\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!";function ai(){return le(bd)}function oi(){return le(_d)}async function wd(){var c,l;const t=(await dt.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(!((c=t==null?void 0:t.data)!=null&&c.has_login))return{errmsg:"\u4F60\u5FC5\u987B\u767B\u5F55B\u7AD9\u4E4B\u540E\u624D\u80FD\u4F7F\u7528\u6388\u6743",json:t};if(!((l=t==null?void 0:t.data)!=null&&l.confirm_uri))return{errmsg:"\u65E0\u6CD5\u83B7\u5F97\u6388\u6743\u7F51\u5740",json:t};const n=t.data.confirm_uri;let r;const i=new Promise(u=>{window.addEventListener("message",h=>{if(h.origin!="https://www.mcbbs.net"||!h.data)return;const p=h.data.match(/access_key=([0-9a-z]{32})/);if(!p||!p[1])return u({errmsg:"\u6CA1\u6709\u83B7\u5F97\u5339\u914D\u7684\u5BC6\u94A5"});u(p[1])});let f=Number(GM_getValue("authTimeout")||10);isNaN(f)&&(f=10),console.log("[bilibili-app-recommend]: authTimeout = %s(s)",f),r=setTimeout(()=>{u({errmsg:"\u83B7\u53D6\u6388\u6743\u8D85\u65F6"})},f*1e3)}),s=Pe.default(`<iframe src='${n}' style="display: none;" />`);s.appendTo(document.body);function a(){s.remove(),r&&(clearTimeout(r),r=null)}const o=await i;return a(),o}async function Sd(){const e=await wd();if(typeof e=="object"&&"errmsg"in e){le(e.errmsg);return}const t=e;return re.accessKey=t,le("\u83B7\u53D6\u6210\u529F"),t}function Td(){re.accessKey="",le("\u5DF2\u5220\u9664 access_key")}const li="_expand-btn_wdzp9_1",ci="_expanded_wdzp9_12";var Sh={expandBtn:li,expanded:ci},rt={exports:{}},it={};/**
 * @license React
 * react-jsx-runtime.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 xd=ft.default,Ed=Symbol.for("react.element"),Cd=Symbol.for("react.fragment"),Od=Object.prototype.hasOwnProperty,Ad=xd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Pd={key:!0,ref:!0,__self:!0,__source:!0};function ui(e,t,n){var r,i={},s=null,a=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)Od.call(t,r)&&!Pd.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Ed,type:e,key:s,ref:a,props:i,_owner:Ad.current}}it.Fragment=Cd,it.jsx=ui,it.jsxs=ui,rt.exports=it;const m=rt.exports.jsx,M=rt.exports.jsxs,st=rt.exports.Fragment,fi=v.forwardRef(function({children:t},n){const[r,i]=Qr(!1);v.useImperativeHandle(n,()=>i,[i]);const s=m("button",{className:V("primary-btn",li),onClick:i.toggle,children:m("svg",{className:V({[ci]:r}),children:m("use",{xlinkHref:"#widget-arrow"})})});return M(st,{children:[s,r&&t]})});var di={exports:{}},Rd="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Md=Rd,Dd=Md;function hi(){}function pi(){}pi.resetWarningCache=hi;var Ld=function(){function e(r,i,s,a,o,c){if(c!==Dd){var l=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");throw l.name="Invariant Violation",l}}e.isRequired=e;function t(){return e}var n={array: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:pi,resetWarningCache:hi};return n.PropTypes=n,n};di.exports=Ld();var X=di.exports;class an extends v.Component{constructor(t){super(t),this.scrollListener=this.scrollListener.bind(this),this.eventListenerOptions=this.eventListenerOptions.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this)}componentDidMount(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}componentDidUpdate(){if(this.props.isReverse&&this.loadMore){const t=this.getParentElement(this.scrollComponent);t.scrollTop=t.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}componentWillUnmount(){this.detachScrollListener(),this.detachMousewheelListener()}isPassiveSupported(){let t=!1;const n={get passive(){t=!0}};try{document.addEventListener("test",null,n),document.removeEventListener("test",null,n)}catch{}return t}eventListenerOptions(){let t=this.props.useCapture;return this.isPassiveSupported()?t={useCapture:this.props.useCapture,passive:!0}:t={passive:!1},t}setDefaultLoader(t){this.defaultLoader=t}detachMousewheelListener(){let t=window;this.props.useWindow===!1&&(t=this.scrollComponent.parentNode),t.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}detachScrollListener(){let t=window;this.props.useWindow===!1&&(t=this.getParentElement(this.scrollComponent)),t.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}getParentElement(t){const n=this.props.getScrollParent&&this.props.getScrollParent();return n!=null?n:t&&t.parentNode}filterProps(t){return t}attachScrollListener(){const t=this.getParentElement(this.scrollComponent);if(!this.props.hasMore||!t)return;let n=window;this.props.useWindow===!1&&(n=t),n.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),n.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),n.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}mousewheelListener(t){t.deltaY===1&&!this.isPassiveSupported()&&t.preventDefault()}scrollListener(){const t=this.scrollComponent,n=window,r=this.getParentElement(t);let i;if(this.props.useWindow){const s=document.documentElement||document.body.parentNode||document.body,a=n.pageYOffset!==void 0?n.pageYOffset:s.scrollTop;this.props.isReverse?i=a:i=this.calculateOffset(t,a)}else this.props.isReverse?i=r.scrollTop:i=t.scrollHeight-r.scrollTop-r.clientHeight;i<Number(this.props.threshold)&&t&&t.offsetParent!==null&&(this.detachScrollListener(),this.beforeScrollHeight=r.scrollHeight,this.beforeScrollTop=r.scrollTop,typeof this.props.loadMore=="function"&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}calculateOffset(t,n){return t?this.calculateTopPosition(t)+(t.offsetHeight-n-window.innerHeight):0}calculateTopPosition(t){return t?t.offsetTop+this.calculateTopPosition(t.offsetParent):0}render(){const b=this.filterProps(this.props),{children:n,element:r,hasMore:i,initialLoad:s,isReverse:a,loader:o,loadMore:c,pageStart:l,ref:u,threshold:f,useCapture:h,useWindow:p,getScrollParent:d}=b,y=ys(b,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]);y.ref=P=>{this.scrollComponent=P,u&&u(P)};const g=[n];return i&&(o?a?g.unshift(o):g.push(o):this.defaultLoader&&(a?g.unshift(this.defaultLoader):g.push(this.defaultLoader))),ft.default.createElement(r,y,g)}}Tn(an,"propTypes",{children:X.node.isRequired,element:X.node,hasMore:X.bool,initialLoad:X.bool,isReverse:X.bool,loader:X.node,loadMore:X.func.isRequired,pageStart:X.number,ref:X.func,getScrollParent:X.func,threshold:X.number,useCapture:X.bool,useWindow:X.bool}),Tn(an,"defaultProps",{element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null});let $e=0;const Nd=()=>{$e++,document.body.style.overflow="hidden"},kd=()=>{$e--,$e<0&&($e=0),$e===0&&(document.body.style.overflow="overlay")},vi=()=>document.body.classList.contains("dark"),mi=Je({value:vi()}),Fd=function(){return Ht(mi).value};new MutationObserver(function(){mi.value=vi()}).observe(document.body,{attributes:!0,attributeFilter:["class"]});function gi({show:e,onHide:t,children:n,clsModalMask:r,clsModal:i,hideWhenMaskOnClick:s=!1}){v.useLayoutEffect(()=>{e?Nd():kd()},[e]);const a=v.useRef(null),o=Fd(),{bg:c,c:l}=v.useMemo(()=>{const d=window.getComputedStyle(document.body)["background-color"],y=window.getComputedStyle(document.body).color;return{bg:d,c:y}},[o]),u=v.useMemo(()=>o?{"--bg":c,"--c":l,backgroundColor:c,color:l}:{},[c,l,o]),f=v.useId(),h=v.useMemo(()=>{const d=document.createElement("div");return d.setAttribute("data-id","base-modal-"+f),document.body.appendChild(d),d},[]),p=W(d=>{var y;(y=a.current)!=null&&y.contains(d.target)||s&&t()});return e?U.createPortal(m("div",{className:V(r),onClick:p,children:m("div",{className:V(i),style:u,ref:a,children:n})}),h):null}function jd(e){if(!e)return"00:00";const t=Math.trunc(e/3600);e-=t*3600;const n=Math.trunc(e/60);e-=n*60;const i=[t,n,e];return i[0]===0&&i.shift(),i.map(a=>gu(a.toString(),2,"0")).join(":")}function on(e){if(!e)return"";if(e<=9999)return e.toString();let t=(e/1e4).toFixed(1);return t=t.replace(/\.0$/,""),`${t}\u4E07`}function Id({className:e,item:t,pvideo:n}){var k;const r=v.useRef(null),i=pd(r.current),{elementW:s,elementH:a,elementX:o}=i;let c=0,l=0;s&&o&&!isNaN(o)&&!isNaN(s)&&(c=o/s,c<0&&(c=0),c>1&&(c=1),l=Math.floor((t.duration||0)*c));let u=v.useMemo(()=>{const L=(n==null?void 0:n.index)||[];let K=zd(L,l);return K!==-1?K:l>L[L.length-1]?(K=Math.floor(L.length*c)-1,K<0&&(K=0),K):0},[n,l]);const{img_x_len:f,img_y_len:h,img_x_size:p,img_y_size:d}=n,y=h*f;u=u+1;const g=Math.floor(u/y),b=u-g*y,P=((k=n.image)==null?void 0:k[g])||"",D=Math.floor(b/f)+1,T=b-(D-1)*f,x=s*f,C=a*h,j=(D-1)*a,z=(T-1)*s;return m("div",{ref:r,className:e,style:{backgroundColor:"black",backgroundImage:`url(${P})`,backgroundPosition:`-${z}px -${j}px`,backgroundSize:`${x}px ${C}px`},children:m($d,{progress:c})})}function $d({progress:e}){return m("div",{className:"track",style:{position:"absolute",bottom:0,left:0,backgroundColor:"#eee",width:"100%",height:2},children:m("div",{className:"bar",style:{backgroundColor:"#fa6a9d",height:"100%",width:`${e*100}%`}})})}function zd(e,t){var o;let n=0,r=e.length-1,i=-1;for(;n<=r;){const c=Math.floor((n+r)/2),l=e[c];if(t===l)return c;l<t?(n=c+1,i=c):r=c-1}if(i===-1)return-1;const s=e[i],a=(o=e[i+1])!=null?o:0;return s<t&&t<a?i:-1}function Bd(){var t;const e=(t=document.cookie.match(/bili_jct=([0-9a-fA-F]{32})/))==null?void 0:t[1];if(!e)throw le("\u627E\u4E0D\u5230 csrf token, \u8BF7\u68C0\u67E5\u662F\u5426\u767B\u5F55"),new Error("\u627E\u4E0D\u5230 csrf token, \u8BF7\u68C0\u67E5\u662F\u5426\u767B\u5F55");return e}const ln=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,yi=typeof AbortController=="function",bi=yi?AbortController:class{constructor(){this.signal=new _i}abort(){this.signal.dispatchEvent("abort")}},_i=yi?AbortSignal:class{constructor(){this.aborted=!1,this._listeners=[]}dispatchEvent(t){if(t==="abort"){this.aborted=!0;const n={type:t,target:this};this.onabort(n),this._listeners.forEach(r=>r(n),this)}}onabort(){}addEventListener(t,n){t==="abort"&&this._listeners.push(n)}removeEventListener(t,n){t==="abort"&&(this._listeners=this._listeners.filter(r=>r!==n))}},cn=new Set,un=(e,t)=>{const n=`LRU_CACHE_OPTION_${e}`;at(n)&&dn(n,`${e} option`,`options.${t}`,be)},fn=(e,t)=>{const n=`LRU_CACHE_METHOD_${e}`;if(at(n)){const{prototype:r}=be,{get:i}=Object.getOwnPropertyDescriptor(r,e);dn(n,`${e} method`,`cache.${t}()`,i)}},Hd=(e,t)=>{const n=`LRU_CACHE_PROPERTY_${e}`;if(at(n)){const{prototype:r}=be,{get:i}=Object.getOwnPropertyDescriptor(r,e);dn(n,`${e} property`,`cache.${t}`,i)}},wi=(...e)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...e):console.error(...e)},at=e=>!cn.has(e),dn=(e,t,n,r)=>{cn.add(e);const i=`The ${t} is deprecated. Please use ${n} instead.`;wi(i,"DeprecationWarning",e,r)},ye=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),Si=e=>ye(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?ot:null:null;class ot extends Array{constructor(t){super(t),this.fill(0)}}class Wd{constructor(t){if(t===0)return[];const n=Si(t);this.heap=new n(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class be{constructor(t={}){const{max:n=0,ttl:r,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:a,updateAgeOnHas:o,allowStale:c,dispose:l,disposeAfter:u,noDisposeOnSet:f,noUpdateTTL:h,maxSize:p=0,sizeCalculation:d,fetchMethod:y,noDeleteOnFetchRejection:g}=t,{length:b,maxAge:P,stale:D}=t instanceof be?{}:t;if(n!==0&&!ye(n))throw new TypeError("max option must be a nonnegative integer");const T=n?Si(n):Array;if(!T)throw new Error("invalid max value: "+n);if(this.max=n,this.maxSize=p,this.sizeCalculation=d||b,this.sizeCalculation){if(!this.maxSize)throw new TypeError("cannot set sizeCalculation without setting maxSize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=y||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.keyMap=new Map,this.keyList=new Array(n).fill(null),this.valList=new Array(n).fill(null),this.next=new T(n),this.prev=new T(n),this.head=0,this.tail=0,this.free=new Wd(n),this.initialFill=1,this.size=0,typeof l=="function"&&(this.dispose=l),typeof u=="function"?(this.disposeAfter=u,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!f,this.noUpdateTTL=!!h,this.noDeleteOnFetchRejection=!!g,this.maxSize!==0){if(!ye(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!c||!!D,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!o,this.ttlResolution=ye(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=r||P||0,this.ttl){if(!ye(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const x="LRU_CACHE_UNBOUNDED";at(x)&&(cn.add(x),wi("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",x,be))}D&&un("stale","allowStale"),P&&un("maxAge","ttl"),b&&un("length","sizeCalculation")}getRemainingTTL(t){return this.has(t,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new ot(this.max),this.starts=new ot(this.max),this.setItemTTL=(r,i)=>{if(this.starts[r]=i!==0?ln.now():0,this.ttls[r]=i,i!==0&&this.ttlAutopurge){const s=setTimeout(()=>{this.isStale(r)&&this.delete(this.keyList[r])},i+1);s.unref&&s.unref()}},this.updateItemAge=r=>{this.starts[r]=this.ttls[r]!==0?ln.now():0};let t=0;const n=()=>{const r=ln.now();if(this.ttlResolution>0){t=r;const i=setTimeout(()=>t=0,this.ttlResolution);i.unref&&i.unref()}return r};this.getRemainingTTL=r=>{const i=this.keyMap.get(r);return i===void 0?0:this.ttls[i]===0||this.starts[i]===0?1/0:this.starts[i]+this.ttls[i]-(t||n())},this.isStale=r=>this.ttls[r]!==0&&this.starts[r]!==0&&(t||n())-this.starts[r]>this.ttls[r]}updateItemAge(t){}setItemTTL(t,n){}isStale(t){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new ot(this.max),this.removeItemSize=t=>this.calculatedSize-=this.sizes[t],this.requireSize=(t,n,r,i)=>{if(!ye(r))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(r=i(n,t),!ye(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer)");return r},this.addItemSize=(t,n,r,i)=>{this.sizes[t]=i;const s=this.maxSize-this.sizes[t];for(;this.calculatedSize>s;)this.evict(!0);this.calculatedSize+=this.sizes[t]}}removeItemSize(t){}addItemSize(t,n,r,i){}requireSize(t,n,r,i){if(r||i)throw new TypeError("cannot set size without setting maxSize on cache")}*indexes({allowStale:t=this.allowStale}={}){if(this.size)for(let n=this.tail;!(!this.isValidIndex(n)||((t||!this.isStale(n))&&(yield n),n===this.head));)n=this.prev[n]}*rindexes({allowStale:t=this.allowStale}={}){if(this.size)for(let n=this.head;!(!this.isValidIndex(n)||((t||!this.isStale(n))&&(yield n),n===this.tail));)n=this.next[n]}isValidIndex(t){return this.keyMap.get(this.keyList[t])===t}*entries(){for(const t of this.indexes())yield[this.keyList[t],this.valList[t]]}*rentries(){for(const t of this.rindexes())yield[this.keyList[t],this.valList[t]]}*keys(){for(const t of this.indexes())yield this.keyList[t]}*rkeys(){for(const t of this.rindexes())yield this.keyList[t]}*values(){for(const t of this.indexes())yield this.valList[t]}*rvalues(){for(const t of this.rindexes())yield this.valList[t]}[Symbol.iterator](){return this.entries()}find(t,n={}){for(const r of this.indexes())if(t(this.valList[r],this.keyList[r],this))return this.get(this.keyList[r],n)}forEach(t,n=this){for(const r of this.indexes())t.call(n,this.valList[r],this.keyList[r],this)}rforEach(t,n=this){for(const r of this.rindexes())t.call(n,this.valList[r],this.keyList[r],this)}get prune(){return fn("prune","purgeStale"),this.purgeStale}purgeStale(){let t=!1;for(const n of this.rindexes({allowStale:!0}))this.isStale(n)&&(this.delete(this.keyList[n]),t=!0);return t}dump(){const t=[];for(const n of this.indexes()){const r=this.keyList[n],s={value:this.valList[n]};this.ttls&&(s.ttl=this.ttls[n]),this.sizes&&(s.size=this.sizes[n]),t.unshift([r,s])}return t}load(t){this.clear();for(const[n,r]of t)this.set(n,r.value,r)}dispose(t,n,r){}set(t,n,{ttl:r=this.ttl,noDisposeOnSet:i=this.noDisposeOnSet,size:s=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:o=this.noUpdateTTL}={}){s=this.requireSize(t,n,s,a);let c=this.size===0?void 0:this.keyMap.get(t);if(c===void 0)c=this.newIndex(),this.keyList[c]=t,this.valList[c]=n,this.keyMap.set(t,c),this.next[this.tail]=c,this.prev[c]=this.tail,this.tail=c,this.size++,this.addItemSize(c,n,t,s),o=!1;else{const l=this.valList[c];n!==l&&(this.isBackgroundFetch(l)?l.__abortController.abort():i||(this.dispose(l,t,"set"),this.disposeAfter&&this.disposed.push([l,t,"set"])),this.removeItemSize(c),this.valList[c]=n,this.addItemSize(c,n,t,s)),this.moveToTail(c)}if(r!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),o||this.setItemTTL(c,r),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){const t=this.valList[this.head];return this.evict(!0),t}}evict(t){const n=this.head,r=this.keyList[n],i=this.valList[n];return this.isBackgroundFetch(i)?i.__abortController.abort():(this.dispose(i,r,"evict"),this.disposeAfter&&this.disposed.push([i,r,"evict"])),this.removeItemSize(n),t&&(this.keyList[n]=null,this.valList[n]=null,this.free.push(n)),this.head=this.next[n],this.keyMap.delete(r),this.size--,n}has(t,{updateAgeOnHas:n=this.updateAgeOnHas}={}){const r=this.keyMap.get(t);return r!==void 0&&!this.isStale(r)?(n&&this.updateItemAge(r),!0):!1}peek(t,{allowStale:n=this.allowStale}={}){const r=this.keyMap.get(t);if(r!==void 0&&(n||!this.isStale(r)))return this.valList[r]}backgroundFetch(t,n,r){const i=n===void 0?void 0:this.valList[n];if(this.isBackgroundFetch(i))return i;const s=new bi,a={signal:s.signal,options:r},o=f=>(s.signal.aborted||this.set(t,f,a.options),f),c=f=>{if(this.valList[n]===u&&(!r.noDeleteOnFetchRejection||u.__staleWhileFetching===void 0?this.delete(t):this.valList[n]=u.__staleWhileFetching),u.__returned===u)throw f},l=f=>f(this.fetchMethod(t,i,a)),u=new Promise(l).then(o,c);return u.__abortController=s,u.__staleWhileFetching=i,u.__returned=null,n===void 0?(this.set(t,u,a.options),n=this.keyMap.get(t)):this.valList[n]=u,u}isBackgroundFetch(t){return t&&typeof t=="object"&&typeof t.then=="function"&&Object.prototype.hasOwnProperty.call(t,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(t,"__returned")&&(t.__returned===t||t.__returned===null)}async fetch(t,{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,ttl:i=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:a=0,sizeCalculation:o=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:l=this.noDeleteOnFetchRejection}={}){if(!this.fetchMethod)return this.get(t,{allowStale:n,updateAgeOnGet:r});const u={allowStale:n,updateAgeOnGet:r,ttl:i,noDisposeOnSet:s,size:a,sizeCalculation:o,noUpdateTTL:c,noDeleteOnFetchRejection:l};let f=this.keyMap.get(t);if(f===void 0){const h=this.backgroundFetch(t,f,u);return h.__returned=h}else{const h=this.valList[f];if(this.isBackgroundFetch(h))return n&&h.__staleWhileFetching!==void 0?h.__staleWhileFetching:h.__returned=h;if(!this.isStale(f))return this.moveToTail(f),r&&this.updateItemAge(f),h;const p=this.backgroundFetch(t,f,u);return n&&p.__staleWhileFetching!==void 0?p.__staleWhileFetching:p.__returned=p}}get(t,{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet}={}){const i=this.keyMap.get(t);if(i!==void 0){const s=this.valList[i],a=this.isBackgroundFetch(s);return this.isStale(i)?a?n?s.__staleWhileFetching:void 0:(this.delete(t),n?s:void 0):a?void 0:(this.moveToTail(i),r&&this.updateItemAge(i),s)}}connect(t,n){this.prev[n]=t,this.next[t]=n}moveToTail(t){t!==this.tail&&(t===this.head?this.head=this.next[t]:this.connect(this.prev[t],this.next[t]),this.connect(this.tail,t),this.tail=t)}get del(){return fn("del","delete"),this.delete}delete(t){let n=!1;if(this.size!==0){const r=this.keyMap.get(t);if(r!==void 0)if(n=!0,this.size===1)this.clear();else{this.removeItemSize(r);const i=this.valList[r];this.isBackgroundFetch(i)?i.__abortController.abort():(this.dispose(i,t,"delete"),this.disposeAfter&&this.disposed.push([i,t,"delete"])),this.keyMap.delete(t),this.keyList[r]=null,this.valList[r]=null,r===this.tail?this.tail=this.prev[r]:r===this.head?this.head=this.next[r]:(this.next[this.prev[r]]=this.next[r],this.prev[this.next[r]]=this.prev[r]),this.size--,this.free.push(r)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return n}clear(){for(const t of this.rindexes({allowStale:!0})){const n=this.valList[t];if(this.isBackgroundFetch(n))n.__abortController.abort();else{const r=this.keyList[t];this.dispose(n,r,"delete"),this.disposeAfter&&this.disposed.push([n,r,"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 fn("reset","clear"),this.clear}get length(){return Hd("length","size"),this.size}static get AbortController(){return bi}static get AbortSignal(){return _i}}var Ud=be;async function Yd(e){return(await rn.get("/pvideo",{params:{aid:e}})).data.data}async function Gd(e){return[]}const hn=new Ud({max:200});async function Kd(e){if(hn.has(e))return hn.get(e);const[t,n]=await Promise.all([Yd(e),Gd()]);return hn.set(e,{pvideoData:t,dmData:n}),{pvideoData:t,dmData:n}}function Ti(e){return async function(n){const r=new FormData;r.append("aid",n),r.append("csrf",Bd());const s=(await rn.post("/x/v2/history/toview/"+e,r,{withCredentials:!0})).data;return(s==null?void 0:s.code)===0&&(s==null?void 0:s.message)==="0"}}const Vd=Ti("add"),Xd=Ti("del"),xi=e=>{const t={dislike:"/x/feed/dislike",cancel:"/x/feed/dislike/cancel"}[e];return async function(n,r){var o;const s=(await nt.get(ii+t,{params:{goto:n.goto,id:n.param,mid:n.mid,rid:n.tid,tag_id:(o=n.tag)==null?void 0:o.tag_id,reason_id:r,build:"1",mobi_app:"android",idx:(Date.now()/1e3).toFixed(0)}})).data;return(s==null?void 0:s.code)===0&&(s==null?void 0:s.message)==="0"}},Jd=xi("dislike"),Zd=xi("cancel"),Ei="_bili-video-card_14zjz_1",Ci="_image-wrapper_14zjz_4",Oi="_preview-card-wrapper_14zjz_8",Ai="_watch-later_14zjz_21",Pi="_badge_14zjz_24",Ri="_recommend-reason_14zjz_32",Mi="_bangumi-desc_14zjz_47",Di="_btn-dislike_14zjz_50",Li="_btn-dislike-icon_14zjz_65",Ni="_btn-dislike-tip_14zjz_72",ki="_disliked-wrapper_14zjz_87",Fi="_dislike-content-cover_14zjz_101",ji="_dislike-content-cover-inner_14zjz_107",Qd="_dislike-icon_14zjz_118",Ii="_dislike-reason_14zjz_121",$i="_dislike-desc_14zjz_125",zi="_dislike-content-action_14zjz_129";var xh={biliVideoCard:Ei,imageWrapper:Ci,previewCardWrapper:Oi,watchLater:Ai,badge:Pi,recommendReason:Ri,bangumiDesc:Mi,btnDislike:Di,btnDislikeIcon:Li,btnDislikeTip:Ni,dislikedWrapper:ki,dislikeContentCover:Fi,dislikeContentCoverInner:ji,dislikeIcon:Qd,dislikeReason:Ii,dislikeDesc:$i,dislikeContentAction:zi};function qd(e){const t=Je({data:Array.from(e||[]),has(n){return this.data.some(r=>r[0]===n)},set(n,r){const i=this.data.find(s=>s[0]===n);return i?i[1]=r:this.data.push([n,r]),this},get(n){var r;return(r=this.data.find(i=>i[0]===n))==null?void 0:r[1]},delete(n){const r=this.data.findIndex(i=>i[0]===n);return r===-1?!1:(this.data.splice(r,1),!0)},clear(){this.data.splice(0)},get size(){return this.data.length},toJSON(){return{}},forEach(n){this.data.forEach(r=>{n(r[1],r[0],this)})},keys(){return this.data.map(n=>n[0]).values()},values(){return this.data.map(n=>n[1]).values()},entries(){return new Map(this.data).entries()},get[Symbol.toStringTag](){return"Map"},[Symbol.iterator](){return this.entries()}});return Object.defineProperties(t,{data:{enumerable:!1},size:{enumerable:!1},toJSON:{enumerable:!1}}),Object.seal(t),t}const Bi="_modal-mask_vh629_1",Hi="_modal_vh629_1",Wi="_modal-header_vh629_23",Ui="_modal-title_vh629_30",Yi="_title-desc_vh629_35",Gi="_btn-close_vh629_39",Ki="_modal-body_vh629_57",Vi="_reason-list_vh629_62",Xi="_reason_vh629_62";var Eh={modalMask:Bi,modal:Hi,modalHeader:Wi,modalTitle:Ui,titleDesc:Yi,btnClose:Gi,modalBody:Ki,reasonList:Vi,reason:Xi};const pn=qd();function eh(){return Ht(pn)}function th(e){const t=eh();if(!!e)return t.get(e)}function nh({show:e,onHide:t,item:n}){const[r,i]=v.useState(!1),s=W(async(o,c)=>{if(!n)return;let l=!1,u=null;try{i(!0),l=await Jd(n,o)}catch(f){u=f}finally{i(!1)}if(u)return console.error(u.stack||u),ai();l?le("\u5DF2\u6807\u8BB0\u4E0D\u60F3\u770B"):oi(),l&&(pn.set(n.param,{id:o,name:c}),t())}),a=v.useMemo(()=>{var o;return[...(o=n==null?void 0:n.dislike_reasons)!=null?o:[],{reason_id:12,reason_name:"\u6B64\u7C7B\u5185\u5BB9\u8FC7\u591A"},{reason_id:13,reason_name:"\u63A8\u8350\u8FC7"}]},[n]);return M(gi,{show:e,onHide:t,clsModalMask:Bi,clsModal:Hi,hideWhenMaskOnClick:!0,children:[M("div",{className:Wi,children:[M("div",{className:Ui,children:["\u6211\u4E0D\u60F3\u770B",m("span",{className:Yi,children:"(\u9009\u62E9\u540E\u5C06\u51CF\u5C11\u76F8\u4F3C\u5185\u5BB9\u63A8\u8350)"})]}),m("div",{className:"space",style:{flex:1}}),M("button",{className:`primary-btn roll-btn ${Gi}`,onClick:t,children:[m("svg",{style:{transform:"rotate(0deg)"},children:m("use",{xlinkHref:"#widget-close"})}),m("span",{children:"\u5173\u95ED"})]})]}),m("div",{className:Ki,children:m("div",{className:Vi,children:a.map(o=>m("button",{className:Xi,"data-id":o.reason_id,onClick:()=>s(o.reason_id,o.reason_name),disabled:r,children:o.reason_name},o.reason_id))})})]})}const Ji={show:!1,onHide:Zi,item:null};function Zi(){Qi({show:!1,item:null})}function Qi(e){Object.assign(Ji,e),rh().render(m(nh,Oe(Se({},Ji),{onHide:Zi})))}let vn;function rh(){if(!vn){const e=document.createElement("div");e.classList.add("show-dislike-container"),document.body.appendChild(e),vn=Gt(e)}return vn}function ih(e){Qi({show:!0,item:e})}const sh=ti().format("YYYY"),ah=e=>{if(!e)return"";const t=ti.unix(e);return t.format("YYYY")===sh?t.format("M-D"):t.format("YY-M-D")},oh=e=>e.replace(/^http:\/\//,"https://"),mn=v.memo(function({style:t,className:n,item:r,loading:i}){i=i!=null?i:!r;const s=M("div",{className:V("bili-video-card__skeleton",{hide:!i}),children:[m("div",{className:"bili-video-card__skeleton--cover"}),m("div",{className:"bili-video-card__skeleton--info",children:M("div",{className:"bili-video-card__skeleton--right",children:[m("p",{className:"bili-video-card__skeleton--text"}),m("p",{className:"bili-video-card__skeleton--text short"}),m("p",{className:"bili-video-card__skeleton--light"})]})})]}),a=th(r==null?void 0:r.param);return M("div",{style:t,className:V("bili-video-card",Ei,n),"data-report":"partition_recommend.content",children:[s,!i&&r&&(a?m(lh,{item:r,dislikedReason:a}):m(ch,{item:r}))]})}),lh=v.memo(function({dislikedReason:t,item:n}){const r=W(async()=>{if(!(t!=null&&t.id))return;let i=!1,s=null;try{i=await Zd(n,t.id)}catch(a){s=a}if(s)return console.error(s.stack||s),ai();i?le("\u5DF2\u64A4\u9500"):oi(),i&&pn.delete(n.param)});return M("div",{className:V(ki),children:[m("div",{className:Fi,children:M("div",{className:ji,children:[m("div",{className:"icon"}),m("div",{className:Ii,children:t==null?void 0:t.name}),m("div",{className:$i,children:"\u5C06\u51CF\u5C11\u6B64\u7C7B\u5185\u5BB9\u63A8\u8350"})]})}),m("div",{className:zi,children:m("button",{onClick:r,children:"\u64A4\u9500"})})]})}),ch=v.memo(function({item:t}){const n=v.useRef(null),r=en(n),i=v.useRef(null),s=en(i),[a,o]=v.useState(!1),{accessKey:c}=Wt(),l=Boolean(c),{param:u,title:f,cover:h,goto:p,play:d,like:y,coin:g,desc:b,danmaku:P,ctime:D,duration:T,name:x,face:C,mid:j,favorite:z,badge:k,rcmd_reason:L}=t,K=v.useMemo(()=>ah(D),[D]),ze=v.useMemo(()=>oh(h),[h]),[E,S]=v.useState(null),[_,O]=v.useState(!1),w=W(async()=>{if(!E&&!_)try{O(!0);const J=await Kd(u);S(J)}finally{O(!1)}});v.useEffect(()=>{r&&w()},[r]);let A=!1;const R=W(async J=>{if(J.preventDefault(),A)return;A=!0;const G=a?Xd:Vd;let q=!1;try{q=await G(u)}finally{A=!1}q&&o(Be=>!Be)}),N=v.useRef(null),B=en(N),I=W(J=>{J.stopPropagation(),J.preventDefault(),ih(t)}),Y=t.goto==="av"?`/video/av${u}`:t.uri,ie=v.useMemo(()=>jd(T),[T]),Q=v.useMemo(()=>on(d),[d]),_e=v.useMemo(()=>on(y),[y]),we=v.useMemo(()=>on(z),[z]);return M("div",{className:"bili-video-card__wrap __scale-wrap",children:[m("a",{href:Y,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:M("div",{className:"bili-video-card__image __scale-player-wrap",ref:n,children:[M("div",{className:V("bili-video-card__image--wrap",Ci),children:[M("picture",{className:"v-img bili-video-card__cover",children:[m("source",{srcSet:`${ze}@672w_378h_1c.webp`,type:"image/webp"}),m("img",{src:`${ze}@672w_378h_1c.webp`,alt:f,loading:"lazy"})]}),r&&(E==null?void 0:E.pvideoData)&&m(Id,{className:Oi,item:t,pvideo:E==null?void 0:E.pvideoData}),M("div",{className:`bili-watch-later ${Ai}`,style:{display:r?"flex":"none"},ref:i,onClick:R,children:[m("svg",{className:"bili-watch-later__icon",children:m("use",{xlinkHref:a?"#widget-watch-save":"#widget-watch-later"})}),m("span",{className:"bili-watch-later__tip",style:{display:s?"block":"none"},children:a?"\u79FB\u9664":"\u7A0D\u540E\u518D\u770B"})]}),l&&M("div",{ref:N,className:Di,onClick:I,style:{display:r?"flex":"none"},children:[m("svg",{className:Li,children:m("use",{xlinkHref:"#widget-close"})}),m("span",{className:Ni,style:{display:B?"block":"none"},children:"\u6211\u4E0D\u60F3\u770B"})]})]}),m("div",{className:"bili-video-card__mask",children:M("div",{className:"bili-video-card__stats",children:[M("div",{className:"bili-video-card__stats--left",children:[M("span",{className:"bili-video-card__stats--item",children:[m("svg",{className:"bili-video-card__stats--icon",children:m("use",{xlinkHref:"#widget-play-count"})}),m("span",{className:"bili-video-card__stats--text",children:Q})]}),m("span",{className:"bili-video-card__stats--item",children:p==="av"?M(st,{children:[m("svg",{className:"bili-video-card__stats--icon",children:m("use",{xlinkHref:"#widget-agree"})}),m("span",{className:"bili-video-card__stats--text",children:_e})]}):M(st,{children:[m("svg",{className:"bili-video-card__stats--icon",children:m("use",{xlinkHref:"#widget-agree"})}),m("span",{className:"bili-video-card__stats--text",children:we})]})})]}),m("span",{className:"bili-video-card__stats__duration",children:ie})]})})]})}),m("div",{className:"bili-video-card__info __scale-disable",children:M("div",{className:"bili-video-card__info--right",children:[m("a",{href:Y,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:m("h3",{className:"bili-video-card__info--tit",title:f,children:f})}),M("p",{className:"bili-video-card__info--bottom",children:[p==="av"&&M("a",{className:"bili-video-card__info--owner",href:`//space.bilibili.com/${j}`,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:[L!=null&&L.content?m("span",{className:Ri,children:L.content}):m("svg",{className:"bili-video-card__info--owner__up",children:m("use",{xlinkHref:"#widget-up"})}),m("span",{className:"bili-video-card__info--author",children:x}),K&&M("span",{className:"bili-video-card__info--date",children:["\xB7 ",K]})]}),p==="bangumi"&&M("a",{className:"bili-video-card__info--owner",href:Y,target:"_blank",children:[m("span",{className:Pi,children:k}),m("span",{className:Mi,children:b})]})]})]})})]})}),qi="_modal-mask_1urmj_1",es="_narrow-mode_1urmj_13",ts="_modal_1urmj_1",ns="_modal-header_1urmj_38",rs="_modal-title_1urmj_46",is="_btn-refresh_1urmj_51",ss="_btn-close_1urmj_52",lt="_modal-body_1urmj_68",uh="_list_1urmj_74",gn="_card_1urmj_77",yn="_active_1urmj_85",as="_video-card-list_1urmj_90",bn="_video-card-body_1urmj_1",os="_loader_1urmj_99",_n="_checkbox_1urmj_104";var Ch={modalMask:qi,narrowMode:es,modal:ts,modalHeader:ns,modalTitle:rs,btnRefresh:is,btnClose:ss,modalBody:lt,list:uh,card:gn,active:yn,videoCardList:as,videoCardBody:bn,loader:os,checkbox:_n};function fh({show:e,refresh:t,minIndex:n=0,maxIndex:r}){const[i,s]=v.useState(null),a=W(()=>{if(i===null)return!1;const y=document.querySelector(`${wn}.${yn}`),g=document.querySelector(`.${lt}`);if(!y||!g)return!1;const b=g.getBoundingClientRect(),P=y.getBoundingClientRect();return!(P.top-b.top<-(b.height+P.height)||P.top-b.top>b.height*2+P.height)}),o=W((y,g)=>{if(!e)return;g==null||g.preventDefault();const b=a()?i+y:dh();if(!(b<n)){if(b>r){us(r);return}s(b),us(b)}}),c=v.useCallback(y=>{o(-1,y)},[]),l=v.useCallback(y=>{o(1,y)},[]);ge("leftarrow",c),ge("rightarrow",l);const u=v.useCallback(y=>{o(-ds(),y)},[]),f=v.useCallback(y=>{o(ds(),y)},[]);ge("uparrow",u),ge("downarrow",f);const h=W(()=>{!i||!e||hh(i)}),p=W(()=>{!e||s(null)});ge("enter",h),ge("esc",p);const d=W(()=>{!e||t()});return ge("r",d,{exactMatch:!0}),{activeIndex:i,clearActiveIndex:p}}function dh(){const e=document.querySelector(`.${lt}`);if(!e)return 0;const t=e.getBoundingClientRect(),n=ls();for(let r=0;r<n.length;r++)if(n[r].getBoundingClientRect().top>=t.top)return r;return 0}const wn=`#${bn} .${gn}`;function ls(){return[...document.querySelectorAll(wn)]}function cs(e){return ls()[e]}function us(e){var n;const t=cs(e);(n=t==null?void 0:t.scrollIntoViewIfNeeded)==null||n.call(t,!1)}function hh(e){const t=cs(e);if(!t)return;const n=t.querySelector(".bili-video-card__wrap > a");n==null||n.click()}const fs=new Map;function ds(){if(re.useNarrowMode)return 2;let e=fs.get(window.innerWidth);if(e)return e;const t=document.querySelector(wn);if(!t)throw new Error("expect found first card");e=1;const n=t.getBoundingClientRect().top;let r=t.nextElementSibling;for(;r&&r.getBoundingClientRect().top===n;)e++,r=r.nextElementSibling;return fs.set(window.innerWidth,e),e}function hs(){return v.useMemo(()=>crypto.randomUUID(),[])}const ph=v.memo(function({show:t,onHide:n}){const[r,i]=v.useState([]),[s,a]=v.useState(!1),o=v.useRef(null),c=W(async()=>{o.current&&(o.current.scrollTop=0),await Yr(50);try{a(!0),g(),i(await sn(2)),g()}finally{a(!1)}}),l=W(async D=>{const T=await sn(2);i(x=>[...x,...T])}),{useNarrowMode:u,initialShowMore:f}=Wt(),h=v.useCallback(D=>{const T=D.target.checked;Br({useNarrowMode:T})},[]),p=v.useCallback(D=>{const T=D.target.checked;Br({initialShowMore:T}),T&&le("\u5DF2\u5F00\u542F\u81EA\u52A8\u67E5\u770B\u66F4\u591A: \u4E0B\u6B21\u6253\u5F00\u9996\u9875\u65F6\u5C06\u76F4\u63A5\u5C55\u793A\u672C\u63A8\u8350\u5F39\u6846")},[]),d=v.useMemo(()=>({[es]:u}),[u]),{activeIndex:y,clearActiveIndex:g}=fh({show:t,refresh:c,maxIndex:r.length-1}),b=hs(),P=hs();return M(gi,{show:t,onHide:n,clsModalMask:V(qi,d),clsModal:V(ts,d),children:[M("div",{className:ns,children:[m("div",{className:rs,children:"\u63A8\u8350"}),m("div",{className:"space",style:{flex:1}}),M(fi,{children:[m("input",{type:"checkbox",className:_n,id:P,checked:f,onChange:p}),m("label",{htmlFor:P,children:"\u81EA\u52A8\u67E5\u770B\u66F4\u591A"}),m("input",{type:"checkbox",className:_n,id:b,checked:u,onChange:h}),m("label",{htmlFor:b,children:"\u542F\u7528\u7A84\u5C4F\u6A21\u5F0F"})]}),M("button",{className:`primary-btn roll-btn ${is}`,onClick:c,children:[m("svg",{children:m("use",{xlinkHref:"#widget-roll"})}),m("span",{children:"\u6362\u4E00\u6362"})]}),M("button",{className:`primary-btn roll-btn ${ss}`,onClick:n,children:[m("svg",{children:m("use",{xlinkHref:"#widget-close"})}),m("span",{children:"\u5173\u95ED"})]})]}),m("div",{className:lt,ref:o,children:m(an,{pageStart:0,loadMore:l,hasMore:!0,useWindow:!1,threshold:360,style:{minHeight:"100%"},loader:m("div",{className:os,children:"\u52A0\u8F7D\u4E2D..."},0),children:m("div",{className:`video-card-list is-full ${as}`,children:m("div",{id:bn,className:V("video-card-body",d),children:r.map((D,T)=>m(mn,{loading:s,item:D,className:V(gn,{[yn]:T===y})},D.uniqId))})})})})]})}),ps="_grid_p5dvw_1",vs="_video-card-list_p5dvw_5";var Ph={grid:ps,videoCardList:vs,expandBtn:"_expand-btn_p5dvw_19",expanded:"_expanded_p5dvw_30"};function vh(){const e=v.useRef(null),{accessKey:t}=Wt(),n=W(async(d=!1)=>{var g;await Sd()&&((g=e.current)==null||g.set(!1))}),r=Td,i=W(()=>{const d="https://github.com/indefined/UserScripts/tree/master/bilibiliHome#%E6%8E%88%E6%9D%83%E8%AF%B4%E6%98%8E";window.open(d,"_blank")}),s=v.useMemo(()=>new Array(20).fill(0).map(()=>crypto.randomUUID()),[]),{data:a,loading:o,error:c,refresh:l}=Kf(gd);c&&console.error(c.stack||c);const[u,f]=v.useState(()=>re.initialShowMore),h=v.useCallback(()=>{f(!0)},[]),p=v.useCallback(()=>{f(!1)},[]);return m("section",{className:V("bili-grid no-margin",ps),"data-area":"\u63A8\u8350",children:M("div",{className:`video-card-list is-full ${vs}`,children:[M("div",{className:"area-header",children:[M("div",{className:"left",children:[m("a",{id:"\u5F71\u89C6",className:"the-world area-anchor","data-id":"25"}),m("svg",{className:"icon",children:m("use",{xlinkHref:"#channel-cinephile"})}),m("a",{className:"title",href:"#",children:m("span",{children:"\u63A8\u8350"})})]}),M("div",{className:"right",children:[t?M(fi,{ref:e,children:[m("button",{className:"primary-btn roll-btn",onClick:i,children:m("span",{children:"access_key \u8BF4\u660E"})}),m("button",{className:"primary-btn roll-btn",onClick:()=>n(!0),children:m("span",{children:"\u91CD\u65B0\u83B7\u53D6 access_key"})}),m("button",{className:"primary-btn roll-btn",onClick:r,children:m("span",{children:"\u5220\u9664 access_key"})})]}):M(st,{children:[m("button",{className:"primary-btn roll-btn",onClick:i,children:m("span",{children:"access_key \u8BF4\u660E"})}),m("button",{className:"primary-btn roll-btn",onClick:n,children:m("span",{children:"\u83B7\u53D6 access_key"})})]}),M("button",{className:"primary-btn roll-btn",onClick:l,children:[m("svg",{style:{transform:"rotate(0deg)"},children:m("use",{xlinkHref:"#widget-roll"})}),m("span",{children:"\u6362\u4E00\u6362"})]}),M("button",{className:"primary-btn see-more",onClick:h,children:[m("span",{children:"\u67E5\u770B\u66F4\u591A"}),m("svg",{children:m("use",{xlinkHref:"#widget-arrow"})})]})]})]}),m(ph,{show:u,onHide:p}),m("div",{className:"video-card-body more-class1 more-class2",children:o||c?s.map(d=>m(mn,{},d)):a.map(d=>m(mn,{item:d},d.uniqId))})]})})}(function(){var t;if(location.href.startsWith("https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png?"))return window.stop(),(t=window.top)==null?void 0:t.postMessage(location.href,"https://www.bilibili.com");if(location.pathname==="/")return mh()})();async function mh(){const e=Date.now(),t=10*1e3,n=()=>Pe.default(".bili-layout > section.bili-grid").length>0;for(;!n()&&Date.now()-e<t;)await Yr(100);if(!n()){console.error("[bilibili-app-recommend]: init fail");return}const r=Pe.default(".bili-layout > section.bili-grid").eq(0),i=Pe.default("<section></section>");i.insertAfter(r);const s=i[0];Gt(s).render(m(vh,{}))}})(React,$,ReactDOM,axios,axiosGmxhrAdapter);