bilibili-app-recommend

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

目前為 2022-12-08 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         bilibili-app-recommend
// @namespace    https://magicdawn.fun
// @version      0.6.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        *://www.bilibili.com/
// @match        *://www.bilibili.com/?*
// @match        https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png
// @match        https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png?*
// @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_deleteValue
// @grant        GM_getValue
// @grant        GM_setValue
// @grant        GM_xmlhttpRequest
// @grant        unsafeWindow
// ==/UserScript==

(i=>{const e=document.createElement("style");e.dataset.source="vite-plugin-monkey",e.innerText=i,document.head.appendChild(e)})(`.primary-btn[disabled]:active,.primary-btn[disabled]:hover{cursor:wait;background-color:inherit}._modal-mask_1fjgs_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_1fjgs_1{width:500px;max-height:calc(80vh - 50px);background-color:#fff;border-radius:10px;padding:0 15px 15px;display:flex;flex-direction:column;overflow:hidden}._modal-header_1fjgs_23{padding-top:10px;padding-bottom:10px;border-bottom:none;display:flex;align-items:center}._modal-body_1fjgs_30{padding-top:0;flex-grow:1;overflow-y:scroll}._modal-title_1fjgs_35{font-size:1.5rem;margin-bottom:0;line-height:1.5;display:flex;align-items:center}._btn-close_1fjgs_42{margin-left:10px}._btn-close_1fjgs_42 svg{width:10px;height:10px;margin-right:3px;margin-top:-1px}body.dark ._btn-close_1fjgs_42{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px}._toast-container_mcbuq_1{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:999999;padding:12px 24px;font-size:14px;min-width:200px;width:max-content;max-width:450px;background:#ffb243;color:#fff;border-radius:6px;white-space:pre-wrap}._toast-container_mcbuq_1._single-line_mcbuq_17{text-align:center}._modal_g0in4_1{width:500px}._title-desc_g0in4_4{margin-left:5px;font-size:40%}._reason-list_g0in4_8{display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between}._reason_g0in4_8{color:inherit;width:48%;text-align:center;line-height:20px;position:relative;border:1px solid #eee;padding-top:5px;padding-bottom:5px;margin-top:5px;margin-bottom:5px}body.dark ._reason_g0in4_8{border:1px solid #333}._reason-no_g0in4_29{position:absolute;left:6px;width:20px;height:20px;border-radius:50%;top:6px;display:flex;align-items:center;justify-content:center;background-color:#6a5acd;background-color:#fb7299;color:#fff}._tips_g0in4_43{margin-top:20px;display:flex;align-items:center}._bili-video-card_1a93a_1{position:relative}._image-wrapper_1a93a_4{border-radius:6px;overflow:hidden}._preview-card-wrapper_1a93a_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}._preview-card-wrapper_1a93a_8 ._preview-card-inner_1a93a_21{width:100%;height:100%}._watch-later_1a93a_25{z-index:3}._badge_1a93a_28{color:#fa6a9d;border-radius:2px;border:1px #fa6a9d solid;line-height:20px;padding:0 10px;transform:scale(.8)}._recommend-reason_1a93a_36{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_1a93a_51{color:default}._btn-dislike_1a93a_54{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_1a93a_54 ._btn-dislike-icon_1a93a_69{pointer-events:none;user-select:none;width:12px;height:12px;color:#fff}._btn-dislike_1a93a_54 ._btn-dislike-tip_1a93a_76{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_1a93a_91{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_1a93a_91{border:1px solid #333}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105{border-top-left-radius:6px;border-top-right-radius:6px;padding-top:56.25%;position:relative}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105 ._dislike-content-cover-inner_1a93a_111{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105 ._dislike-content-cover-inner_1a93a_111 ._dislike-icon_1a93a_122{margin-bottom:5px}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105 ._dislike-content-cover-inner_1a93a_111 ._dislike-reason_1a93a_125{font-size:20px;text-align:center}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105 ._dislike-content-cover-inner_1a93a_111 ._dislike-desc_1a93a_129{font-size:16px;text-align:center}._disliked-wrapper_1a93a_91 ._dislike-content-action_1a93a_133{flex:1;width:100%;border-top:1px solid #eee;display:flex;align-items:center;justify-content:center}body.dark ._disliked-wrapper_1a93a_91 ._dislike-content-action_1a93a_133{border-top:1px solid #333}._disliked-wrapper_1a93a_91 ._dislike-content-action_1a93a_133 button{font-size:16px;color:inherit;display:flex;align-items:center}._video-grid_14t5i_9{display:grid;position:relative;width:100%;grid-gap:20px 12px}@media (max-width: 1099.9px){._video-grid_14t5i_9{grid-template-columns:repeat(4,1fr)}._video-grid_14t5i_9._limit-two-lines_14t5i_19>*:nth-of-type(1n + 9){display:none!important}}@media (min-width: 1100px) and (max-width: 1700.9px){._video-grid_14t5i_9{grid-template-columns:repeat(5,1fr)}._video-grid_14t5i_9._limit-two-lines_14t5i_19>*:nth-of-type(1n + 11){display:none!important}}@media (min-width: 1701px){._video-grid_14t5i_9{grid-template-columns:repeat(6,1fr)}._video-grid_14t5i_9._limit-two-lines_14t5i_19>*:nth-of-type(1n + 13){display:none!important}}._video-grid_14t5i_9._internal-testing_14t5i_43{grid-gap:20px 20px}@media (max-width: 1399.9px){._video-grid_14t5i_9._internal-testing_14t5i_43{grid-template-columns:repeat(4,1fr)}._video-grid_14t5i_9._internal-testing_14t5i_43._limit-one-line_14t5i_50>*:nth-of-type(1n + 5){display:none!important}._video-grid_14t5i_9._internal-testing_14t5i_43._limit-two-lines_14t5i_19>*:nth-of-type(1n + 9){display:none!important}}@media (min-width: 1400px){._video-grid_14t5i_9._internal-testing_14t5i_43{grid-template-columns:repeat(5,1fr)}._video-grid_14t5i_9._internal-testing_14t5i_43._limit-one-line_14t5i_50>*:nth-of-type(1n + 6){display:none!important}._video-grid_14t5i_9._internal-testing_14t5i_43._limit-two-lines_14t5i_19>*:nth-of-type(1n + 11){display:none!important}}._narrow-mode_14t5i_71{grid-template-columns:repeat(2,1fr)!important}._checkbox_5cp8u_1{margin-top:1px;cursor:pointer;outline:none}._checkbox_5cp8u_1+label{margin-left:2px;user-select:none;cursor:pointer}._config-icon_1jab1_1{line-height:1;margin-right:5px;font-size:0}._settings-group_1jab1_6{margin-bottom:10px}._settings-group_1jab1_6 ._settings-group-title_1jab1_9{font-size:2em}._settings-group_1jab1_6 ._settings-group-content_1jab1_12{color:default}._settings-group_1jab1_6 ._settings-group-content_1jab1_12 button:first-child{margin-left:0}._row_1jab1_18{display:flex;align-items:center}._check_1jab1_22{margin-left:20px}._check_1jab1_22:first-child{margin-left:0}._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}._modal-mask_1as61_1._narrow-mode_1as61_1{background-color:#000000e6}._modal_1as61_1{width:calc(100vw - 30px);height:calc(100vh - 30px);max-height:unset;padding-right:0}body.dark ._modal_1as61_1{border:1px solid #fb7299}._modal_1as61_1._narrow-mode_1as61_1{width:606px;height:calc(100vh - 10px);border:none}body.dark ._modal_1as61_1._narrow-mode_1as61_1{border:none}._modal-header_1as61_21,._modal-body_1as61_22{padding-right:15px}body.dark ._btn-refresh_1as61_25{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px}
`);

var _y=Object.defineProperty;var wy=(g,pe,He)=>pe in g?_y(g,pe,{enumerable:!0,configurable:!0,writable:!0,value:He}):g[pe]=He;var Zr=(g,pe,He)=>(wy(g,typeof pe!="symbol"?pe+"":pe,He),He);(function(g,pe,He,pc){"use strict";const Qt=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function mc(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const ae=Qt(g),Xi=mc(g),gc=Qt(pe),Qr=Qt(He),vc=Qt(pc);var yc=typeof global=="object"&&global&&global.Object===Object&&global;const Ji=yc;var bc=typeof self=="object"&&self&&self.Object===Object&&self,_c=Ji||bc||Function("return this")();const me=_c;var wc=me.Symbol;const ge=wc;var Zi=Object.prototype,Sc=Zi.hasOwnProperty,Cc=Zi.toString,Ct=ge?ge.toStringTag:void 0;function kc(e){var t=Sc.call(e,Ct),r=e[Ct];try{e[Ct]=void 0;var n=!0}catch{}var i=Cc.call(e);return n&&(t?e[Ct]=r:delete e[Ct]),i}var Ec=Object.prototype,Tc=Ec.toString;function xc(e){return Tc.call(e)}var Ac="[object Null]",Oc="[object Undefined]",Qi=ge?ge.toStringTag:void 0;function et(e){return e==null?e===void 0?Oc:Ac:Qi&&Qi in Object(e)?kc(e):xc(e)}function tt(e){return e!=null&&typeof e=="object"}var Lc="[object Symbol]";function qt(e){return typeof e=="symbol"||tt(e)&&et(e)==Lc}function Mc(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Pc=Array.isArray;const Le=Pc;var Rc=1/0,qi=ge?ge.prototype:void 0,es=qi?qi.toString:void 0;function qr(e){if(typeof e=="string")return e;if(Le(e))return Mc(e,qr)+"";if(qt(e))return es?es.call(e):"";var t=e+"";return t=="0"&&1/e==-Rc?"-0":t}var Nc=/\s/;function Dc(e){for(var t=e.length;t--&&Nc.test(e.charAt(t)););return t}var Fc=/^\s+/;function jc(e){return e&&e.slice(0,Dc(e)+1).replace(Fc,"")}function Fe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ts=0/0,Ic=/^[-+]0x[0-9a-f]+$/i,Wc=/^0b[01]+$/i,zc=/^0o[0-7]+$/i,Bc=parseInt;function en(e){if(typeof e=="number")return e;if(qt(e))return ts;if(Fe(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Fe(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=jc(e);var r=Wc.test(e);return r||zc.test(e)?Bc(e.slice(2),r?2:8):Ic.test(e)?ts:+e}var rs=1/0,$c=17976931348623157e292;function Hc(e){if(!e)return e===0?e:0;if(e=en(e),e===rs||e===-rs){var t=e<0?-1:1;return t*$c}return e===e?e:0}function ns(e){var t=Hc(e),r=t%1;return t===t?r?t-r:t:0}function Uc(e){return e}var Gc="[object AsyncFunction]",Vc="[object Function]",Yc="[object GeneratorFunction]",Kc="[object Proxy]";function is(e){if(!Fe(e))return!1;var t=et(e);return t==Vc||t==Yc||t==Gc||t==Kc}var Xc=me["__core-js_shared__"];const tn=Xc;var ss=function(){var e=/[^.]+$/.exec(tn&&tn.keys&&tn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Jc(e){return!!ss&&ss in e}var Zc=Function.prototype,Qc=Zc.toString;function Ue(e){if(e!=null){try{return Qc.call(e)}catch{}try{return e+""}catch{}}return""}var qc=/[\\^$.*+?()[\]{}|]/g,eu=/^\[object .+?Constructor\]$/,tu=Function.prototype,ru=Object.prototype,nu=tu.toString,iu=ru.hasOwnProperty,su=RegExp("^"+nu.call(iu).replace(qc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ou(e){if(!Fe(e)||Jc(e))return!1;var t=is(e)?su:eu;return t.test(Ue(e))}function au(e,t){return e==null?void 0:e[t]}function Ge(e,t){var r=au(e,t);return ou(r)?r:void 0}var cu=Ge(me,"WeakMap");const rn=cu;function uu(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var lu=800,fu=16,du=Date.now;function hu(e){var t=0,r=0;return function(){var n=du(),i=fu-(n-r);if(r=n,i>0){if(++t>=lu)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function pu(e){return function(){return e}}var mu=function(){try{var e=Ge(Object,"defineProperty");return e({},"",{}),e}catch{}}();const er=mu;var gu=er?function(e,t){return er(e,"toString",{configurable:!0,enumerable:!1,value:pu(t),writable:!0})}:Uc,vu=hu(gu);const yu=vu;var bu=9007199254740991,_u=/^(?:0|[1-9]\d*)$/;function nn(e,t){var r=typeof e;return t=t==null?bu:t,!!t&&(r=="number"||r!="symbol"&&_u.test(e))&&e>-1&&e%1==0&&e<t}function wu(e,t,r){t=="__proto__"&&er?er(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function sn(e,t){return e===t||e!==e&&t!==t}var Su=Object.prototype,Cu=Su.hasOwnProperty;function ku(e,t,r){var n=e[t];(!(Cu.call(e,t)&&sn(n,r))||r===void 0&&!(t in e))&&wu(e,t,r)}var os=Math.max;function Eu(e,t,r){return t=os(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,s=os(n.length-t,0),o=Array(s);++i<s;)o[i]=n[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=n[i];return a[t]=r(o),uu(e,this,a)}}var Tu=9007199254740991;function on(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Tu}function xu(e){return e!=null&&on(e.length)&&!is(e)}var Au=Object.prototype;function Ou(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Au;return e===r}function Lu(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Mu="[object Arguments]";function as(e){return tt(e)&&et(e)==Mu}var cs=Object.prototype,Pu=cs.hasOwnProperty,Ru=cs.propertyIsEnumerable,Nu=as(function(){return arguments}())?as:function(e){return tt(e)&&Pu.call(e,"callee")&&!Ru.call(e,"callee")};const an=Nu;function Du(){return!1}var us=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ls=us&&typeof module=="object"&&module&&!module.nodeType&&module,Fu=ls&&ls.exports===us,fs=Fu?me.Buffer:void 0,ju=fs?fs.isBuffer:void 0,Iu=ju||Du;const cn=Iu;var Wu="[object Arguments]",zu="[object Array]",Bu="[object Boolean]",$u="[object Date]",Hu="[object Error]",Uu="[object Function]",Gu="[object Map]",Vu="[object Number]",Yu="[object Object]",Ku="[object RegExp]",Xu="[object Set]",Ju="[object String]",Zu="[object WeakMap]",Qu="[object ArrayBuffer]",qu="[object DataView]",el="[object Float32Array]",tl="[object Float64Array]",rl="[object Int8Array]",nl="[object Int16Array]",il="[object Int32Array]",sl="[object Uint8Array]",ol="[object Uint8ClampedArray]",al="[object Uint16Array]",cl="[object Uint32Array]",U={};U[el]=U[tl]=U[rl]=U[nl]=U[il]=U[sl]=U[ol]=U[al]=U[cl]=!0,U[Wu]=U[zu]=U[Qu]=U[Bu]=U[qu]=U[$u]=U[Hu]=U[Uu]=U[Gu]=U[Vu]=U[Yu]=U[Ku]=U[Xu]=U[Ju]=U[Zu]=!1;function ul(e){return tt(e)&&on(e.length)&&!!U[et(e)]}function ll(e){return function(t){return e(t)}}var ds=typeof exports=="object"&&exports&&!exports.nodeType&&exports,kt=ds&&typeof module=="object"&&module&&!module.nodeType&&module,fl=kt&&kt.exports===ds,un=fl&&Ji.process,dl=function(){try{var e=kt&&kt.require&&kt.require("util").types;return e||un&&un.binding&&un.binding("util")}catch{}}();const hs=dl;var ps=hs&&hs.isTypedArray,hl=ps?ll(ps):ul;const ms=hl;var pl=Object.prototype,ml=pl.hasOwnProperty;function gl(e,t){var r=Le(e),n=!r&&an(e),i=!r&&!n&&cn(e),s=!r&&!n&&!i&&ms(e),o=r||n||i||s,a=o?Lu(e.length,String):[],u=a.length;for(var c in e)(t||ml.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||nn(c,u)))&&a.push(c);return a}function vl(e,t){return function(r){return e(t(r))}}var yl=vl(Object.keys,Object);const bl=yl;var _l=Object.prototype,wl=_l.hasOwnProperty;function Sl(e){if(!Ou(e))return bl(e);var t=[];for(var r in Object(e))wl.call(e,r)&&r!="constructor"&&t.push(r);return t}function Cl(e){return xu(e)?gl(e):Sl(e)}var kl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,El=/^\w*$/;function Tl(e,t){if(Le(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||qt(e)?!0:El.test(e)||!kl.test(e)||t!=null&&e in Object(t)}var xl=Ge(Object,"create");const Et=xl;function Al(){this.__data__=Et?Et(null):{},this.size=0}function Ol(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Ll="__lodash_hash_undefined__",Ml=Object.prototype,Pl=Ml.hasOwnProperty;function Rl(e){var t=this.__data__;if(Et){var r=t[e];return r===Ll?void 0:r}return Pl.call(t,e)?t[e]:void 0}var Nl=Object.prototype,Dl=Nl.hasOwnProperty;function Fl(e){var t=this.__data__;return Et?t[e]!==void 0:Dl.call(t,e)}var jl="__lodash_hash_undefined__";function Il(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Et&&t===void 0?jl:t,this}function Ve(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ve.prototype.clear=Al,Ve.prototype.delete=Ol,Ve.prototype.get=Rl,Ve.prototype.has=Fl,Ve.prototype.set=Il;function Wl(){this.__data__=[],this.size=0}function tr(e,t){for(var r=e.length;r--;)if(sn(e[r][0],t))return r;return-1}var zl=Array.prototype,Bl=zl.splice;function $l(e){var t=this.__data__,r=tr(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Bl.call(t,r,1),--this.size,!0}function Hl(e){var t=this.__data__,r=tr(t,e);return r<0?void 0:t[r][1]}function Ul(e){return tr(this.__data__,e)>-1}function Gl(e,t){var r=this.__data__,n=tr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Me(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Me.prototype.clear=Wl,Me.prototype.delete=$l,Me.prototype.get=Hl,Me.prototype.has=Ul,Me.prototype.set=Gl;var Vl=Ge(me,"Map");const Tt=Vl;function Yl(){this.size=0,this.__data__={hash:new Ve,map:new(Tt||Me),string:new Ve}}function Kl(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function rr(e,t){var r=e.__data__;return Kl(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Xl(e){var t=rr(this,e).delete(e);return this.size-=t?1:0,t}function Jl(e){return rr(this,e).get(e)}function Zl(e){return rr(this,e).has(e)}function Ql(e,t){var r=rr(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Pe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Pe.prototype.clear=Yl,Pe.prototype.delete=Xl,Pe.prototype.get=Jl,Pe.prototype.has=Zl,Pe.prototype.set=Ql;var ql="Expected a function";function ln(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ql);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var o=e.apply(this,n);return r.cache=s.set(i,o)||s,o};return r.cache=new(ln.Cache||Pe),r}ln.Cache=Pe;var ef=500;function tf(e){var t=ln(e,function(n){return r.size===ef&&r.clear(),n}),r=t.cache;return t}var rf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nf=/\\(\\)?/g,sf=tf(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(rf,function(r,n,i,s){t.push(i?s.replace(nf,"$1"):n||r)}),t});const of=sf;function gs(e){return e==null?"":qr(e)}function nr(e,t){return Le(e)?e:Tl(e,t)?[e]:of(gs(e))}var af=1/0;function fn(e){if(typeof e=="string"||qt(e))return e;var t=e+"";return t=="0"&&1/e==-af?"-0":t}function cf(e,t){t=nr(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[fn(t[r++])];return r&&r==n?e:void 0}function vs(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var ys=ge?ge.isConcatSpreadable:void 0;function uf(e){return Le(e)||an(e)||!!(ys&&e&&e[ys])}function bs(e,t,r,n,i){var s=-1,o=e.length;for(r||(r=uf),i||(i=[]);++s<o;){var a=e[s];t>0&&r(a)?t>1?bs(a,t-1,r,n,i):vs(i,a):n||(i[i.length]=a)}return i}function lf(e){var t=e==null?0:e.length;return t?bs(e,1):[]}function ff(e){return yu(Eu(e,void 0,lf),e+"")}var df="Expected a function";function hf(e,t){var r;if(typeof t!="function")throw new TypeError(df);return e=ns(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=void 0),r}}function pf(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(i);++n<i;)s[n]=e[n+t];return s}function mf(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:pf(e,t,r)}var gf="\\ud800-\\udfff",vf="\\u0300-\\u036f",yf="\\ufe20-\\ufe2f",bf="\\u20d0-\\u20ff",_f=vf+yf+bf,wf="\\ufe0e\\ufe0f",Sf="\\u200d",Cf=RegExp("["+Sf+gf+_f+wf+"]");function dn(e){return Cf.test(e)}function kf(e){return e.split("")}var _s="\\ud800-\\udfff",Ef="\\u0300-\\u036f",Tf="\\ufe20-\\ufe2f",xf="\\u20d0-\\u20ff",Af=Ef+Tf+xf,Of="\\ufe0e\\ufe0f",Lf="["+_s+"]",hn="["+Af+"]",pn="\\ud83c[\\udffb-\\udfff]",Mf="(?:"+hn+"|"+pn+")",ws="[^"+_s+"]",Ss="(?:\\ud83c[\\udde6-\\uddff]){2}",Cs="[\\ud800-\\udbff][\\udc00-\\udfff]",Pf="\\u200d",ks=Mf+"?",Es="["+Of+"]?",Rf="(?:"+Pf+"(?:"+[ws,Ss,Cs].join("|")+")"+Es+ks+")*",Nf=Es+ks+Rf,Df="(?:"+[ws+hn+"?",hn,Ss,Cs,Lf].join("|")+")",Ff=RegExp(pn+"(?="+pn+")|"+Df+Nf,"g");function jf(e){return e.match(Ff)||[]}function If(e){return dn(e)?jf(e):kf(e)}function Wf(){this.__data__=new Me,this.size=0}function zf(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Bf(e){return this.__data__.get(e)}function $f(e){return this.__data__.has(e)}var Hf=200;function Uf(e,t){var r=this.__data__;if(r instanceof Me){var n=r.__data__;if(!Tt||n.length<Hf-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Pe(n)}return r.set(e,t),this.size=r.size,this}function je(e){var t=this.__data__=new Me(e);this.size=t.size}je.prototype.clear=Wf,je.prototype.delete=zf,je.prototype.get=Bf,je.prototype.has=$f,je.prototype.set=Uf;function Gf(e,t){for(var r=-1,n=e==null?0:e.length,i=0,s=[];++r<n;){var o=e[r];t(o,r,e)&&(s[i++]=o)}return s}function Vf(){return[]}var Yf=Object.prototype,Kf=Yf.propertyIsEnumerable,Ts=Object.getOwnPropertySymbols,Xf=Ts?function(e){return e==null?[]:(e=Object(e),Gf(Ts(e),function(t){return Kf.call(e,t)}))}:Vf;const Jf=Xf;function Zf(e,t,r){var n=t(e);return Le(e)?n:vs(n,r(e))}function xs(e){return Zf(e,Cl,Jf)}var Qf=Ge(me,"DataView");const mn=Qf;var qf=Ge(me,"Promise");const gn=qf;var ed=Ge(me,"Set");const vn=ed;var As="[object Map]",td="[object Object]",Os="[object Promise]",Ls="[object Set]",Ms="[object WeakMap]",Ps="[object DataView]",rd=Ue(mn),nd=Ue(Tt),id=Ue(gn),sd=Ue(vn),od=Ue(rn),Ye=et;(mn&&Ye(new mn(new ArrayBuffer(1)))!=Ps||Tt&&Ye(new Tt)!=As||gn&&Ye(gn.resolve())!=Os||vn&&Ye(new vn)!=Ls||rn&&Ye(new rn)!=Ms)&&(Ye=function(e){var t=et(e),r=t==td?e.constructor:void 0,n=r?Ue(r):"";if(n)switch(n){case rd:return Ps;case nd:return As;case id:return Os;case sd:return Ls;case od:return Ms}return t});const Rs=Ye;var ad=me.Uint8Array;const Ns=ad;var cd="__lodash_hash_undefined__";function ud(e){return this.__data__.set(e,cd),this}function ld(e){return this.__data__.has(e)}function ir(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Pe;++t<r;)this.add(e[t])}ir.prototype.add=ir.prototype.push=ud,ir.prototype.has=ld;function fd(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function dd(e,t){return e.has(t)}var hd=1,pd=2;function Ds(e,t,r,n,i,s){var o=r&hd,a=e.length,u=t.length;if(a!=u&&!(o&&u>a))return!1;var c=s.get(e),l=s.get(t);if(c&&l)return c==t&&l==e;var f=-1,d=!0,p=r&pd?new ir:void 0;for(s.set(e,t),s.set(t,e);++f<a;){var m=e[f],y=t[f];if(n)var v=o?n(y,m,f,t,e,s):n(m,y,f,e,t,s);if(v!==void 0){if(v)continue;d=!1;break}if(p){if(!fd(t,function(C,M){if(!dd(p,M)&&(m===C||i(m,C,r,n,s)))return p.push(M)})){d=!1;break}}else if(!(m===y||i(m,y,r,n,s))){d=!1;break}}return s.delete(e),s.delete(t),d}function md(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function gd(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var vd=1,yd=2,bd="[object Boolean]",_d="[object Date]",wd="[object Error]",Sd="[object Map]",Cd="[object Number]",kd="[object RegExp]",Ed="[object Set]",Td="[object String]",xd="[object Symbol]",Ad="[object ArrayBuffer]",Od="[object DataView]",Fs=ge?ge.prototype:void 0,yn=Fs?Fs.valueOf:void 0;function Ld(e,t,r,n,i,s,o){switch(r){case Od:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ad:return!(e.byteLength!=t.byteLength||!s(new Ns(e),new Ns(t)));case bd:case _d:case Cd:return sn(+e,+t);case wd:return e.name==t.name&&e.message==t.message;case kd:case Td:return e==t+"";case Sd:var a=md;case Ed:var u=n&vd;if(a||(a=gd),e.size!=t.size&&!u)return!1;var c=o.get(e);if(c)return c==t;n|=yd,o.set(e,t);var l=Ds(a(e),a(t),n,i,s,o);return o.delete(e),l;case xd:if(yn)return yn.call(e)==yn.call(t)}return!1}var Md=1,Pd=Object.prototype,Rd=Pd.hasOwnProperty;function Nd(e,t,r,n,i,s){var o=r&Md,a=xs(e),u=a.length,c=xs(t),l=c.length;if(u!=l&&!o)return!1;for(var f=u;f--;){var d=a[f];if(!(o?d in t:Rd.call(t,d)))return!1}var p=s.get(e),m=s.get(t);if(p&&m)return p==t&&m==e;var y=!0;s.set(e,t),s.set(t,e);for(var v=o;++f<u;){d=a[f];var C=e[d],M=t[d];if(n)var A=o?n(M,C,d,t,e,s):n(C,M,d,e,t,s);if(!(A===void 0?C===M||i(C,M,r,n,s):A)){y=!1;break}v||(v=d=="constructor")}if(y&&!v){var x=e.constructor,_=t.constructor;x!=_&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof _=="function"&&_ instanceof _)&&(y=!1)}return s.delete(e),s.delete(t),y}var Dd=1,js="[object Arguments]",Is="[object Array]",sr="[object Object]",Fd=Object.prototype,Ws=Fd.hasOwnProperty;function jd(e,t,r,n,i,s){var o=Le(e),a=Le(t),u=o?Is:Rs(e),c=a?Is:Rs(t);u=u==js?sr:u,c=c==js?sr:c;var l=u==sr,f=c==sr,d=u==c;if(d&&cn(e)){if(!cn(t))return!1;o=!0,l=!1}if(d&&!l)return s||(s=new je),o||ms(e)?Ds(e,t,r,n,i,s):Ld(e,t,u,r,n,i,s);if(!(r&Dd)){var p=l&&Ws.call(e,"__wrapped__"),m=f&&Ws.call(t,"__wrapped__");if(p||m){var y=p?e.value():e,v=m?t.value():t;return s||(s=new je),i(y,v,r,n,s)}}return d?(s||(s=new je),Nd(e,t,r,n,i,s)):!1}function zs(e,t,r,n,i){return e===t?!0:e==null||t==null||!tt(e)&&!tt(t)?e!==e&&t!==t:jd(e,t,r,n,zs,i)}function Id(e,t){return e!=null&&t in Object(e)}function Wd(e,t,r){t=nr(t,e);for(var n=-1,i=t.length,s=!1;++n<i;){var o=fn(t[n]);if(!(s=e!=null&&r(e,o)))break;e=e[o]}return s||++n!=i?s:(i=e==null?0:e.length,!!i&&on(i)&&nn(o,i)&&(Le(e)||an(e)))}function zd(e,t){return e!=null&&Wd(e,t,Id)}function Bd(e){return function(t){return t==null?void 0:t[e]}}var $d=function(){return me.Date.now()};const bn=$d;var Hd="Expected a function",Ud=Math.max,Gd=Math.min;function Bs(e,t,r){var n,i,s,o,a,u,c=0,l=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(Hd);t=en(t)||0,Fe(r)&&(l=!!r.leading,f="maxWait"in r,s=f?Ud(en(r.maxWait)||0,t):s,d="trailing"in r?!!r.trailing:d);function p(b){var E=n,R=i;return n=i=void 0,c=b,o=e.apply(R,E),o}function m(b){return c=b,a=setTimeout(C,t),l?p(b):o}function y(b){var E=b-u,R=b-c,I=t-E;return f?Gd(I,s-R):I}function v(b){var E=b-u,R=b-c;return u===void 0||E>=t||E<0||f&&R>=s}function C(){var b=bn();if(v(b))return M(b);a=setTimeout(C,y(b))}function M(b){return a=void 0,d&&n?p(b):(n=i=void 0,o)}function A(){a!==void 0&&clearTimeout(a),c=0,n=u=i=a=void 0}function x(){return a===void 0?o:M(bn())}function _(){var b=bn(),E=v(b);if(n=arguments,i=this,u=b,E){if(a===void 0)return m(u);if(f)return clearTimeout(a),a=setTimeout(C,t),p(u)}return a===void 0&&(a=setTimeout(C,t)),o}return _.cancel=A,_.flush=x,_}function Vd(e,t){return zs(e,t)}function Yd(e,t,r,n){if(!Fe(e))return e;t=nr(t,e);for(var i=-1,s=t.length,o=s-1,a=e;a!=null&&++i<s;){var u=fn(t[i]),c=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(i!=o){var l=a[u];c=n?n(l,u,a):void 0,c===void 0&&(c=Fe(l)?l:nn(t[i+1])?[]:{})}ku(a,u,c),a=a[u]}return e}function Kd(e,t,r){for(var n=-1,i=t.length,s={};++n<i;){var o=t[n],a=cf(e,o);r(a,o)&&Yd(s,nr(o,e),a)}return s}function Xd(e){return hf(2,e)}var Jd=9007199254740991,Zd=Math.floor;function $s(e,t){var r="";if(!e||t<1||t>Jd)return r;do t%2&&(r+=e),t=Zd(t/2),t&&(e+=e);while(t);return r}var Qd=Bd("length");const qd=Qd;var Hs="\\ud800-\\udfff",eh="\\u0300-\\u036f",th="\\ufe20-\\ufe2f",rh="\\u20d0-\\u20ff",nh=eh+th+rh,ih="\\ufe0e\\ufe0f",sh="["+Hs+"]",_n="["+nh+"]",wn="\\ud83c[\\udffb-\\udfff]",oh="(?:"+_n+"|"+wn+")",Us="[^"+Hs+"]",Gs="(?:\\ud83c[\\udde6-\\uddff]){2}",Vs="[\\ud800-\\udbff][\\udc00-\\udfff]",ah="\\u200d",Ys=oh+"?",Ks="["+ih+"]?",ch="(?:"+ah+"(?:"+[Us,Gs,Vs].join("|")+")"+Ks+Ys+")*",uh=Ks+Ys+ch,lh="(?:"+[Us+_n+"?",_n,Gs,Vs,sh].join("|")+")",Xs=RegExp(wn+"(?="+wn+")|"+lh+uh,"g");function fh(e){for(var t=Xs.lastIndex=0;Xs.test(e);)++t;return t}function Js(e){return dn(e)?fh(e):qd(e)}var dh=Math.ceil;function hh(e,t){t=t===void 0?" ":qr(t);var r=t.length;if(r<2)return r?$s(t,e):t;var n=$s(t,dh(e/Js(t)));return dn(t)?mf(If(n),0,e).join(""):n.slice(0,e)}function ph(e,t,r){e=gs(e),t=ns(t);var n=t?Js(e):0;return t&&n<t?hh(t-n,r)+e:e}function mh(e,t){return Kd(e,t,function(r,n){return zd(e,n)})}var gh=ff(function(e,t){return e==null?{}:mh(e,t)});const Zs=gh;var vh="Expected a function";function yh(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(vh);return Fe(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Bs(e,t,{leading:n,maxWait:t,trailing:i})}const Sn=Symbol(),bh=Symbol(),Cn=Symbol();let _h=(e,t)=>new Proxy(e,t);const kn=Object.getPrototypeOf,En=new WeakMap,Qs=e=>e&&(En.has(e)?En.get(e):kn(e)===Object.prototype||kn(e)===Array.prototype),qs=e=>typeof e=="object"&&e!==null,eo=new WeakMap,to=e=>e[Cn]||e,ro=(e,t,r)=>{if(!Qs(e))return e;const n=to(e),i=(o=>Object.isFrozen(o)||Object.values(Object.getOwnPropertyDescriptors(o)).some(a=>!a.writable))(n);let s=r&&r.get(n);return s&&s[1].f===i||(s=((o,a)=>{const u={f:a};let c=!1;const l=(d,p)=>{if(!c){let m=u.a.get(o);m||(m=new Set,u.a.set(o,m)),p&&m.has(Sn)||m.add(d)}},f={get:(d,p)=>p===Cn?o:(l(p),ro(d[p],u.a,u.c)),has:(d,p)=>p===bh?(c=!0,u.a.delete(o),!0):(l(p),p in d),getOwnPropertyDescriptor:(d,p)=>(l(p,!0),Object.getOwnPropertyDescriptor(d,p)),ownKeys:d=>(l(Sn),Reflect.ownKeys(d))};return a&&(f.set=f.deleteProperty=()=>!1),[f,u]})(n,i),s[1].p=_h(i?(o=>{let a=eo.get(o);if(!a){if(Array.isArray(o))a=Array.from(o);else{const u=Object.getOwnPropertyDescriptors(o);Object.values(u).forEach(c=>{c.configurable=!0}),a=Object.create(kn(o),u)}eo.set(o,a)}return a})(n):n,s[0]),r&&r.set(n,s)),s[1].a=t,s[1].c=r,s[1].p},wh=(e,t)=>{const r=Reflect.ownKeys(e),n=Reflect.ownKeys(t);return r.length!==n.length||r.some((i,s)=>i!==n[s])},no=(e,t,r,n)=>{if(Object.is(e,t))return!1;if(!qs(e)||!qs(t))return!0;const i=r.get(to(e));if(!i)return!0;if(n){const o=n.get(e);if(o&&o.n===t)return o.g;n.set(e,{n:t,g:!1})}let s=null;for(const o of i){const a=o===Sn?wh(e,t):no(e[o],t[o],r,n);if(a!==!0&&a!==!1||(s=a),s)break}return s===null&&(s=!0),n&&n.set(e,{n:t,g:s}),s},io=e=>Qs(e)&&e[Cn]||null,so=(e,t=!0)=>{En.set(e,t)};var Sh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ch(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function kh(e){var t=e.default;if(typeof t=="function"){var r=function(){return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var oo={exports:{}},ao={};/**
 * @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 rt=ae.default;function Eh(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Th=typeof Object.is=="function"?Object.is:Eh,xh=rt.useState,Ah=rt.useEffect,Oh=rt.useLayoutEffect,Lh=rt.useDebugValue;function Mh(e,t){var r=t(),n=xh({inst:{value:r,getSnapshot:t}}),i=n[0].inst,s=n[1];return Oh(function(){i.value=r,i.getSnapshot=t,Tn(i)&&s({inst:i})},[e,r,t]),Ah(function(){return Tn(i)&&s({inst:i}),e(function(){Tn(i)&&s({inst:i})})},[e]),Lh(r),r}function Tn(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Th(e,r)}catch{return!0}}function Ph(e,t){return t()}var Rh=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Ph:Mh;ao.useSyncExternalStore=rt.useSyncExternalStore!==void 0?rt.useSyncExternalStore:Rh,function(e){e.exports=ao}(oo);const Nh=Ch(oo.exports),xn=e=>typeof e=="object"&&e!==null,fe=Symbol(),An=new WeakSet,Dh=(e=Object.is,t=(c,l)=>new Proxy(c,l),r=c=>xn(c)&&!An.has(c)&&(Array.isArray(c)||!(Symbol.iterator in c))&&!(c instanceof WeakMap)&&!(c instanceof WeakSet)&&!(c instanceof Error)&&!(c instanceof Number)&&!(c instanceof Date)&&!(c instanceof String)&&!(c instanceof RegExp)&&!(c instanceof ArrayBuffer),n=c=>{switch(c.status){case"fulfilled":return c.value;case"rejected":throw c.reason;default:throw c}},i=new WeakMap,s=(c,l,f,d=n)=>{const p=i.get(l);if((p==null?void 0:p[0])===f)return p[1];const m=Array.isArray(c)?[]:Object.create(Object.getPrototypeOf(c));return so(m,!0),i.set(l,[f,m]),Reflect.ownKeys(c).forEach(y=>{const v=Reflect.get(c,y,l);An.has(v)?(so(v,!1),m[y]=v):v instanceof Promise?Object.defineProperty(m,y,{get(){return d(v)}}):v!=null&&v[fe]?m[y]=On(v,d):m[y]=v}),Object.freeze(m)},o=new WeakMap,a=[1],u=c=>{if(!xn(c))throw new Error("object required");const l=o.get(c);if(l)return l;let f=a[0];const d=new Set,p=(x,_=++a[0])=>{f!==_&&(f=_,d.forEach(b=>b(x,_)))},m=new Map,y=x=>{let _=m.get(x);return _||(_=(b,E)=>{const R=[...b];R[1]=[x,...R[1]],p(R,E)},m.set(x,_)),_},v=x=>{const _=m.get(x);return m.delete(x),_},C=Array.isArray(c)?[]:Object.create(Object.getPrototypeOf(c)),A=t(C,{get(x,_,b){return _===fe?[x,b,f,s,d]:Reflect.get(x,_,b)},deleteProperty(x,_){var b;const E=Reflect.get(x,_),R=(b=E==null?void 0:E[fe])==null?void 0:b[4];R&&R.delete(v(_));const I=Reflect.deleteProperty(x,_);return I&&p(["delete",[_],E]),I},set(x,_,b,E){var R,I;const j=Reflect.has(x,_),P=Reflect.get(x,_,E);if(j&&e(P,b))return!0;const F=(R=P==null?void 0:P[fe])==null?void 0:R[4];F&&F.delete(v(_)),xn(b)&&(b=io(b)||b);let k=b;return(I=Object.getOwnPropertyDescriptor(x,_))!=null&&I.set||(b instanceof Promise?b.then(w=>{b.status="fulfilled",b.value=w,p(["resolve",[_],w])}).catch(w=>{b.status="rejected",b.reason=w,p(["reject",[_],w])}):(!(b!=null&&b[fe])&&r(b)&&(k=nt(b)),k!=null&&k[fe]&&k[fe][4].add(y(_)))),Reflect.set(x,_,k,E),p(["set",[_],b,P]),!0}});return o.set(c,A),Reflect.ownKeys(c).forEach(x=>{const _=Object.getOwnPropertyDescriptor(c,x);_.get||_.set?Object.defineProperty(C,x,_):A[x]=c[x]}),A})=>[u,fe,An,e,t,r,n,i,s,o,a],[Fh]=Dh();function nt(e={}){return Fh(e)}function co(e,t,r){({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(e!=null&&e[fe])&&console.warn("Please use proxy object");let n;const i=[],s=e[fe][4],o=a=>{if(i.push(a),r){t(i.splice(0));return}n||(n=Promise.resolve().then(()=>{n=void 0,s.has(o)&&t(i.splice(0))}))};return s.add(o),()=>s.delete(o)}function On(e,t){({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(e!=null&&e[fe])&&console.warn("Please use proxy object");const[r,n,i,s]=e[fe];return s(r,n,i,t)}const{use:uo}=ae.default,{useSyncExternalStore:jh}=Nh,Ih=(e,t)=>{const r=[],n=new WeakSet,i=(s,o)=>{if(n.has(s))return;let a;typeof s=="object"&&s!==null&&(n.add(s),a=t.get(io(s)||s)),a?a.forEach(u=>{"value"in(Object.getOwnPropertyDescriptor(s,u)||{})&&i(s[u],o?[...o,u]:[u])}):o&&r.push(o)};return i(e),r},Wh=(e,t)=>{const r=g.useRef();g.useEffect(()=>{r.current=Ih(e,t)}),g.useDebugValue(r.current)};function it(e,t){const r=t==null?void 0:t.sync,n=g.useRef(),i=g.useRef();let s=!0;const o=jh(g.useCallback(c=>{const l=co(e,c,r);return c(),l},[e,r]),()=>{const c=On(e,uo);try{if(!s&&n.current&&i.current&&!no(n.current,c,i.current,new WeakMap))return n.current}catch{}return c},()=>On(e,uo));s=!1;const a=new WeakMap;g.useEffect(()=>{n.current=o,i.current=a}),({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&Wh(o,a);const u=g.useMemo(()=>new WeakMap,[]);return ro(o,a,u)}const Ln={accessKey:"",useNarrowMode:!1,initialShowMore:!1,pureRecommend:!1,openInIINAWhenRightClick:!1,getRecommendParallelRequest:!0},ne=nt({...Ln}),lo=Object.keys(Ln),Ie=function(){return it(ne)},fo="bilibili-app-recommend",Mn=`${fo}.config`,or=`${fo}.settings`;function zh(){Object.keys(GM_getValue(Mn)||{}).length&&!Object.keys(GM_getValue(or)||{}).length&&(GM_setValue(or,GM_getValue(Mn)),GM_deleteValue(Mn));const e=GM_getValue(or);e&&typeof e=="object"&&Object.assign(ne,Zs(e,lo)),co(ne,()=>{Bh()})}function Bh(){const e=Zs(ne,lo);GM_setValue(or,e)}function ho(e){Object.assign(ne,e)}function $h(){return ho(Ln)}zh();var xt={exports:{}};const Hh=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),po=()=>{const e=new Error("Delay aborted");return e.name="AbortError",e},mo=({clearTimeout:e,setTimeout:t,willResolve:r})=>(n,{value:i,signal:s}={})=>{if(s&&s.aborted)return Promise.reject(po());let o,a,u;const c=e||clearTimeout,l=()=>{c(o),u(po())},f=()=>{s&&s.removeEventListener("abort",l)},d=new Promise((p,m)=>{a=()=>{f(),r?p(i):m(i)},u=m,o=(t||setTimeout)(a,n)});return s&&s.addEventListener("abort",l,{once:!0}),d.clear=()=>{c(o),o=null,a()},d},go=e=>{const t=mo({...e,willResolve:!0});return t.reject=mo({...e,willResolve:!1}),t.range=(r,n,i)=>t(Hh(r,n),i),t},Pn=go();Pn.createWithTimers=go,xt.exports=Pn,xt.exports.default=Pn;var ar,vo=gc.default;ar=vo.createRoot,vo.hydrateRoot;const Cy="",At=Xd(()=>!!document.querySelectorAll(".bili-feed4").length),yo=document.querySelector(".bili-header__bar"),bo=Boolean(yo&&window.getComputedStyle(yo).display==="none")?50:64,_o=()=>document.body.classList.contains("dark"),wo=nt({value:_o()});function Rn(){return it(wo).value}const cr=new MutationObserver(function(){wo.value=_o()});cr.observe(document.body,{attributes:!0,attributeFilter:["class"]}),window.addEventListener("unload",()=>{cr==null||cr.disconnect()});var Nn={},ie={};Object.defineProperty(ie,"__esModule",{value:!0}),ie.DEFAULT_ICON_CONFIGS=void 0,ie.IconConverter=To,ie.IconProvider=void 0,ie.IconWrapper=Zh;var ur=Uh(ae.default);function So(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(So=function(n){return n?r:t})(e)}function Uh(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=So(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)){var o=i?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(n,s,o):n[s]=e[s]}return n.default=e,r&&r.set(e,n),n}var Gh=["size","strokeWidth","strokeLinecap","strokeLinejoin","theme","fill","className","spin"];function Co(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ko(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Co(Object(r),!0).forEach(function(n){Vh(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Co(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Vh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yh(e,t){if(e==null)return{};var r=Kh(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(r[n]=e[n]))}return r}function Kh(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,s;for(s=0;s<n.length;s++)i=n[s],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var Eo={size:"1em",strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round",rtl:!1,theme:"outline",colors:{outline:{fill:"#333",background:"transparent"},filled:{fill:"#333",background:"#FFF"},twoTone:{fill:"#333",twoTone:"#2F88FF"},multiColor:{outStrokeColor:"#333",outFillColor:"#2F88FF",innerStrokeColor:"#FFF",innerFillColor:"#43CCF8"}},prefix:"i"};ie.DEFAULT_ICON_CONFIGS=Eo;function Xh(){return"icon-"+((1+Math.random())*4294967296|0).toString(16).substring(1)}function To(e,t,r){var n=typeof t.fill=="string"?[t.fill]:t.fill||[],i=[],s=t.theme||r.theme;switch(s){case"outline":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push("none"),i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push("none");break;case"filled":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push("#FFF"),i.push("#FFF");break;case"two-tone":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[1]=="string"?n[1]:r.colors.twoTone.twoTone),i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[1]=="string"?n[1]:r.colors.twoTone.twoTone);break;case"multi-color":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[1]=="string"?n[1]:r.colors.multiColor.outFillColor),i.push(typeof n[2]=="string"?n[2]:r.colors.multiColor.innerStrokeColor),i.push(typeof n[3]=="string"?n[3]:r.colors.multiColor.innerFillColor);break}return{size:t.size||r.size,strokeWidth:t.strokeWidth||r.strokeWidth,strokeLinecap:t.strokeLinecap||r.strokeLinecap,strokeLinejoin:t.strokeLinejoin||r.strokeLinejoin,colors:i,id:e}}var xo=(0,ur.createContext)(Eo),Jh=xo.Provider;ie.IconProvider=Jh;function Zh(e,t,r){return function(n){var i=n.size,s=n.strokeWidth,o=n.strokeLinecap,a=n.strokeLinejoin,u=n.theme,c=n.fill,l=n.className,f=n.spin,d=Yh(n,Gh),p=(0,ur.useContext)(xo),m=(0,ur.useMemo)(Xh,[]),y=To(m,{size:i,strokeWidth:s,strokeLinecap:o,strokeLinejoin:a,theme:u,fill:c},p),v=[p.prefix+"-icon"];return v.push(p.prefix+"-icon-"+e),t&&p.rtl&&v.push(p.prefix+"-icon-rtl"),f&&v.push(p.prefix+"-icon-spin"),l&&v.push(l),ur.default.createElement("span",ko(ko({},d),{},{className:v.join(" ")}),r(y))}}Object.defineProperty(Nn,"__esModule",{value:!0});var Ao=Nn.default=void 0,Dn=qh(ae.default),Qh=ie;function qh(e){return e&&e.__esModule?e:{default:e}}var ep=(0,Qh.IconWrapper)("close",!1,function(e){return Dn.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},Dn.default.createElement("path",{d:"M8 8L40 40",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Dn.default.createElement("path",{d:"M8 40L40 8",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});Ao=Nn.default=ep;var Fn={};Object.defineProperty(Fn,"__esModule",{value:!0});var Oo=Fn.default=void 0,jn=rp(ae.default),tp=ie;function rp(e){return e&&e.__esModule?e:{default:e}}var np=(0,tp.IconWrapper)("config",!1,function(e){return jn.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},jn.default.createElement("path",{d:"M24 4L18 10H10V18L4 24L10 30V38H18L24 44L30 38H38V30L44 24L38 18V10H30L24 4Z",fill:e.colors[1],stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinejoin:e.strokeLinejoin}),jn.default.createElement("path",{d:"M24 30C27.3137 30 30 27.3137 30 24C30 20.6863 27.3137 18 24 18C20.6863 18 18 20.6863 18 24C18 27.3137 20.6863 30 24 30Z",fill:e.colors[3],stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinejoin:e.strokeLinejoin}))});Oo=Fn.default=np;var In={};Object.defineProperty(In,"__esModule",{value:!0});var Lo=In.default=void 0,Ot=sp(ae.default),ip=ie;function sp(e){return e&&e.__esModule?e:{default:e}}var op=(0,ip.IconWrapper)("distraught-face",!1,function(e){return Ot.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},Ot.default.createElement("path",{d:"M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z",fill:e.colors[1],stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinejoin:e.strokeLinejoin}),Ot.default.createElement("path",{d:"M24 29C29 29 31 33 31 33H17C17 33 19 29 24 29Z",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Ot.default.createElement("path",{d:"M32 17L29 20L32 23",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Ot.default.createElement("path",{d:"M16 17L19 20L16 23",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});Lo=In.default=op;var Wn={};Object.defineProperty(Wn,"__esModule",{value:!0});var Mo=Wn.default=void 0,Lt=cp(ae.default),ap=ie;function cp(e){return e&&e.__esModule?e:{default:e}}var up=(0,ap.IconWrapper)("info",!0,function(e){return Lt.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},Lt.default.createElement("path",{d:"M24 44C29.5228 44 34.5228 41.7614 38.1421 38.1421C41.7614 34.5228 44 29.5228 44 24C44 18.4772 41.7614 13.4772 38.1421 9.85786C34.5228 6.23858 29.5228 4 24 4C18.4772 4 13.4772 6.23858 9.85786 9.85786C6.23858 13.4772 4 18.4772 4 24C4 29.5228 6.23858 34.5228 9.85786 38.1421C13.4772 41.7614 18.4772 44 24 44Z",fill:e.colors[1],stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinejoin:e.strokeLinejoin}),Lt.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24 11C25.3807 11 26.5 12.1193 26.5 13.5C26.5 14.8807 25.3807 16 24 16C22.6193 16 21.5 14.8807 21.5 13.5C21.5 12.1193 22.6193 11 24 11Z",fill:e.colors[2]}),Lt.default.createElement("path",{d:"M24.5 34V20H23.5H22.5",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Lt.default.createElement("path",{d:"M21 34H28",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});Mo=Wn.default=up;var zn={};Object.defineProperty(zn,"__esModule",{value:!0});var Po=zn.default=void 0,Bn=fp(ae.default),lp=ie;function fp(e){return e&&e.__esModule?e:{default:e}}var dp=(0,lp.IconWrapper)("loading",!0,function(e){return Bn.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},Bn.default.createElement("path",{d:"M4 24C4 35.0457 12.9543 44 24 44V44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Bn.default.createElement("path",{d:"M36 24C36 17.3726 30.6274 12 24 12C17.3726 12 12 17.3726 12 24C12 30.6274 17.3726 36 24 36V36",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});Po=zn.default=dp;var $n={};Object.defineProperty($n,"__esModule",{value:!0});var Ro=$n.default=void 0,ve=pp(ae.default),hp=ie;function pp(e){return e&&e.__esModule?e:{default:e}}var mp=(0,hp.IconWrapper)("loading-three",!1,function(e){return ve.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},ve.default.createElement("path",{d:"M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z",fill:e.colors[1],stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),ve.default.createElement("path",{d:"M24 12V15",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),ve.default.createElement("path",{d:"M32.4852 15.5147L30.3639 17.636",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),ve.default.createElement("path",{d:"M36 24H33",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),ve.default.createElement("path",{d:"M32.4852 32.4853L30.3639 30.364",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),ve.default.createElement("path",{d:"M24 36V33",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),ve.default.createElement("path",{d:"M15.5148 32.4853L17.6361 30.364",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),ve.default.createElement("path",{d:"M12 24H15",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),ve.default.createElement("path",{d:"M15.5148 15.5147L17.6361 17.636",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});Ro=$n.default=mp;var Hn={};Object.defineProperty(Hn,"__esModule",{value:!0});var No=Hn.default=void 0,Un=vp(ae.default),gp=ie;function vp(e){return e&&e.__esModule?e:{default:e}}var yp=(0,gp.IconWrapper)("return",!0,function(e){return Un.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},Un.default.createElement("path",{d:"M12.9998 8L6 14L12.9998 21",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Un.default.createElement("path",{d:"M6 14H28.9938C35.8768 14 41.7221 19.6204 41.9904 26.5C42.2739 33.7696 36.2671 40 28.9938 40H11.9984",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});No=Hn.default=yp;function bp(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function _p(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var wp=function(){function e(r){var n=this;this._insertTag=function(i){var s;n.tags.length===0?n.insertionPoint?s=n.insertionPoint.nextSibling:n.prepend?s=n.container.firstChild:s=n.before:s=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(i,s),n.tags.push(i)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(_p(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var s=bp(i);try{s.insertRule(n,s.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){return n.parentNode&&n.parentNode.removeChild(n)}),this.tags=[],this.ctr=0},e}(),te="-ms-",lr="-moz-",z="-webkit-",Do="comm",Gn="rule",Vn="decl",Sp="@import",Fo="@keyframes",Cp=Math.abs,fr=String.fromCharCode,kp=Object.assign;function Ep(e,t){return ee(e,0)^45?(((t<<2^ee(e,0))<<2^ee(e,1))<<2^ee(e,2))<<2^ee(e,3):0}function jo(e){return e.trim()}function Tp(e,t){return(e=t.exec(e))?e[0]:e}function B(e,t,r){return e.replace(t,r)}function Yn(e,t){return e.indexOf(t)}function ee(e,t){return e.charCodeAt(t)|0}function Mt(e,t,r){return e.slice(t,r)}function ye(e){return e.length}function Kn(e){return e.length}function dr(e,t){return t.push(e),e}function xp(e,t){return e.map(t).join("")}var hr=1,st=1,Io=0,se=0,K=0,ot="";function pr(e,t,r,n,i,s,o){return{value:e,root:t,parent:r,type:n,props:i,children:s,line:hr,column:st,length:o,return:""}}function Pt(e,t){return kp(pr("",null,null,"",null,null,0),e,{length:-e.length},t)}function Ap(){return K}function Op(){return K=se>0?ee(ot,--se):0,st--,K===10&&(st=1,hr--),K}function ce(){return K=se<Io?ee(ot,se++):0,st++,K===10&&(st=1,hr++),K}function be(){return ee(ot,se)}function mr(){return se}function Rt(e,t){return Mt(ot,e,t)}function Nt(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Wo(e){return hr=st=1,Io=ye(ot=e),se=0,[]}function zo(e){return ot="",e}function gr(e){return jo(Rt(se-1,Xn(e===91?e+2:e===40?e+1:e)))}function Lp(e){for(;(K=be())&&K<33;)ce();return Nt(e)>2||Nt(K)>3?"":" "}function Mp(e,t){for(;--t&&ce()&&!(K<48||K>102||K>57&&K<65||K>70&&K<97););return Rt(e,mr()+(t<6&&be()==32&&ce()==32))}function Xn(e){for(;ce();)switch(K){case e:return se;case 34:case 39:e!==34&&e!==39&&Xn(K);break;case 40:e===41&&Xn(e);break;case 92:ce();break}return se}function Pp(e,t){for(;ce()&&e+K!==47+10;)if(e+K===42+42&&be()===47)break;return"/*"+Rt(t,se-1)+"*"+fr(e===47?e:ce())}function Rp(e){for(;!Nt(be());)ce();return Rt(e,se)}function Np(e){return zo(vr("",null,null,null,[""],e=Wo(e),0,[0],e))}function vr(e,t,r,n,i,s,o,a,u){for(var c=0,l=0,f=o,d=0,p=0,m=0,y=1,v=1,C=1,M=0,A="",x=i,_=s,b=n,E=A;v;)switch(m=M,M=ce()){case 40:if(m!=108&&ee(E,f-1)==58){Yn(E+=B(gr(M),"&","&\f"),"&\f")!=-1&&(C=-1);break}case 34:case 39:case 91:E+=gr(M);break;case 9:case 10:case 13:case 32:E+=Lp(m);break;case 92:E+=Mp(mr()-1,7);continue;case 47:switch(be()){case 42:case 47:dr(Dp(Pp(ce(),mr()),t,r),u);break;default:E+="/"}break;case 123*y:a[c++]=ye(E)*C;case 125*y:case 59:case 0:switch(M){case 0:case 125:v=0;case 59+l:p>0&&ye(E)-f&&dr(p>32?$o(E+";",n,r,f-1):$o(B(E," ","")+";",n,r,f-2),u);break;case 59:E+=";";default:if(dr(b=Bo(E,t,r,c,l,i,a,A,x=[],_=[],f),s),M===123)if(l===0)vr(E,t,b,b,x,s,f,a,_);else switch(d===99&&ee(E,3)===110?100:d){case 100:case 109:case 115:vr(e,b,b,n&&dr(Bo(e,b,b,0,0,i,a,A,i,x=[],f),_),i,_,f,a,n?x:_);break;default:vr(E,b,b,b,[""],_,0,a,_)}}c=l=p=0,y=C=1,A=E="",f=o;break;case 58:f=1+ye(E),p=m;default:if(y<1){if(M==123)--y;else if(M==125&&y++==0&&Op()==125)continue}switch(E+=fr(M),M*y){case 38:C=l>0?1:(E+="\f",-1);break;case 44:a[c++]=(ye(E)-1)*C,C=1;break;case 64:be()===45&&(E+=gr(ce())),d=be(),l=f=ye(A=E+=Rp(mr())),M++;break;case 45:m===45&&ye(E)==2&&(y=0)}}return s}function Bo(e,t,r,n,i,s,o,a,u,c,l){for(var f=i-1,d=i===0?s:[""],p=Kn(d),m=0,y=0,v=0;m<n;++m)for(var C=0,M=Mt(e,f+1,f=Cp(y=o[m])),A=e;C<p;++C)(A=jo(y>0?d[C]+" "+M:B(M,/&\f/g,d[C])))&&(u[v++]=A);return pr(e,t,r,i===0?Gn:a,u,c,l)}function Dp(e,t,r){return pr(e,t,r,Do,fr(Ap()),Mt(e,2,-2),0)}function $o(e,t,r,n){return pr(e,t,r,Vn,Mt(e,0,n),Mt(e,n+1,-1),n)}function at(e,t){for(var r="",n=Kn(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function Fp(e,t,r,n){switch(e.type){case Sp:case Vn:return e.return=e.return||e.value;case Do:return"";case Fo:return e.return=e.value+"{"+at(e.children,n)+"}";case Gn:e.value=e.props.join(",")}return ye(r=at(e.children,n))?e.return=e.value+"{"+r+"}":""}function jp(e){var t=Kn(e);return function(r,n,i,s){for(var o="",a=0;a<t;a++)o+=e[a](r,n,i,s)||"";return o}}function Ip(e){return function(t){t.root||(t=t.return)&&e(t)}}function Wp(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var zp=function(t,r,n){for(var i=0,s=0;i=s,s=be(),i===38&&s===12&&(r[n]=1),!Nt(s);)ce();return Rt(t,se)},Bp=function(t,r){var n=-1,i=44;do switch(Nt(i)){case 0:i===38&&be()===12&&(r[n]=1),t[n]+=zp(se-1,r,n);break;case 2:t[n]+=gr(i);break;case 4:if(i===44){t[++n]=be()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=fr(i)}while(i=ce());return t},$p=function(t,r){return zo(Bp(Wo(t),r))},Ho=new WeakMap,Hp=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,i=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!Ho.get(n))&&!i){Ho.set(t,!0);for(var s=[],o=$p(r,s),a=n.props,u=0,c=0;u<o.length;u++)for(var l=0;l<a.length;l++,c++)t.props[c]=s[u]?o[u].replace(/&\f/g,a[l]):a[l]+" "+o[u]}}},Up=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function Uo(e,t){switch(Ep(e,t)){case 5103:return z+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return z+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return z+e+lr+e+te+e+e;case 6828:case 4268:return z+e+te+e+e;case 6165:return z+e+te+"flex-"+e+e;case 5187:return z+e+B(e,/(\w+).+(:[^]+)/,z+"box-$1$2"+te+"flex-$1$2")+e;case 5443:return z+e+te+"flex-item-"+B(e,/flex-|-self/,"")+e;case 4675:return z+e+te+"flex-line-pack"+B(e,/align-content|flex-|-self/,"")+e;case 5548:return z+e+te+B(e,"shrink","negative")+e;case 5292:return z+e+te+B(e,"basis","preferred-size")+e;case 6060:return z+"box-"+B(e,"-grow","")+z+e+te+B(e,"grow","positive")+e;case 4554:return z+B(e,/([^-])(transform)/g,"$1"+z+"$2")+e;case 6187:return B(B(B(e,/(zoom-|grab)/,z+"$1"),/(image-set)/,z+"$1"),e,"")+e;case 5495:case 3959:return B(e,/(image-set\([^]*)/,z+"$1$`$1");case 4968:return B(B(e,/(.+:)(flex-)?(.*)/,z+"box-pack:$3"+te+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+z+e+e;case 4095:case 3583:case 4068:case 2532:return B(e,/(.+)-inline(.+)/,z+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ye(e)-1-t>6)switch(ee(e,t+1)){case 109:if(ee(e,t+4)!==45)break;case 102:return B(e,/(.+:)(.+)-([^]+)/,"$1"+z+"$2-$3$1"+lr+(ee(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Yn(e,"stretch")?Uo(B(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ee(e,t+1)!==115)break;case 6444:switch(ee(e,ye(e)-3-(~Yn(e,"!important")&&10))){case 107:return B(e,":",":"+z)+e;case 101:return B(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+z+(ee(e,14)===45?"inline-":"")+"box$3$1"+z+"$2$3$1"+te+"$2box$3")+e}break;case 5936:switch(ee(e,t+11)){case 114:return z+e+te+B(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return z+e+te+B(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return z+e+te+B(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return z+e+te+e+e}return e}var Gp=function(t,r,n,i){if(t.length>-1&&!t.return)switch(t.type){case Vn:t.return=Uo(t.value,t.length);break;case Fo:return at([Pt(t,{value:B(t.value,"@","@"+z)})],i);case Gn:if(t.length)return xp(t.props,function(s){switch(Tp(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return at([Pt(t,{props:[B(s,/:(read-\w+)/,":"+lr+"$1")]})],i);case"::placeholder":return at([Pt(t,{props:[B(s,/:(plac\w+)/,":"+z+"input-$1")]}),Pt(t,{props:[B(s,/:(plac\w+)/,":"+lr+"$1")]}),Pt(t,{props:[B(s,/:(plac\w+)/,te+"input-$1")]})],i)}return""})}},Vp=[Gp],Go=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(y){var v=y.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var i=t.stylisPlugins||Vp,s={},o,a=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(y){for(var v=y.getAttribute("data-emotion").split(" "),C=1;C<v.length;C++)s[v[C]]=!0;a.push(y)});var u,c=[Hp,Up];{var l,f=[Fp,Ip(function(y){l.insert(y)})],d=jp(c.concat(i,f)),p=function(v){return at(Np(v),d)};u=function(v,C,M,A){l=M,p(v?v+"{"+C.styles+"}":C.styles),A&&(m.inserted[C.name]=!0)}}var m={key:r,sheet:new wp({key:r,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:u};return m.sheet.hydrate(a),m},Vo={exports:{}},$={};/** @license React v16.13.1
 * react-is.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 Z=typeof Symbol=="function"&&Symbol.for,Jn=Z?Symbol.for("react.element"):60103,Zn=Z?Symbol.for("react.portal"):60106,yr=Z?Symbol.for("react.fragment"):60107,br=Z?Symbol.for("react.strict_mode"):60108,_r=Z?Symbol.for("react.profiler"):60114,wr=Z?Symbol.for("react.provider"):60109,Sr=Z?Symbol.for("react.context"):60110,Qn=Z?Symbol.for("react.async_mode"):60111,Cr=Z?Symbol.for("react.concurrent_mode"):60111,kr=Z?Symbol.for("react.forward_ref"):60112,Er=Z?Symbol.for("react.suspense"):60113,Yp=Z?Symbol.for("react.suspense_list"):60120,Tr=Z?Symbol.for("react.memo"):60115,xr=Z?Symbol.for("react.lazy"):60116,Kp=Z?Symbol.for("react.block"):60121,Xp=Z?Symbol.for("react.fundamental"):60117,Jp=Z?Symbol.for("react.responder"):60118,Zp=Z?Symbol.for("react.scope"):60119;function ue(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Jn:switch(e=e.type,e){case Qn:case Cr:case yr:case _r:case br:case Er:return e;default:switch(e=e&&e.$$typeof,e){case Sr:case kr:case xr:case Tr:case wr:return e;default:return t}}case Zn:return t}}}function Yo(e){return ue(e)===Cr}$.AsyncMode=Qn,$.ConcurrentMode=Cr,$.ContextConsumer=Sr,$.ContextProvider=wr,$.Element=Jn,$.ForwardRef=kr,$.Fragment=yr,$.Lazy=xr,$.Memo=Tr,$.Portal=Zn,$.Profiler=_r,$.StrictMode=br,$.Suspense=Er,$.isAsyncMode=function(e){return Yo(e)||ue(e)===Qn},$.isConcurrentMode=Yo,$.isContextConsumer=function(e){return ue(e)===Sr},$.isContextProvider=function(e){return ue(e)===wr},$.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Jn},$.isForwardRef=function(e){return ue(e)===kr},$.isFragment=function(e){return ue(e)===yr},$.isLazy=function(e){return ue(e)===xr},$.isMemo=function(e){return ue(e)===Tr},$.isPortal=function(e){return ue(e)===Zn},$.isProfiler=function(e){return ue(e)===_r},$.isStrictMode=function(e){return ue(e)===br},$.isSuspense=function(e){return ue(e)===Er},$.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===yr||e===Cr||e===_r||e===br||e===Er||e===Yp||typeof e=="object"&&e!==null&&(e.$$typeof===xr||e.$$typeof===Tr||e.$$typeof===wr||e.$$typeof===Sr||e.$$typeof===kr||e.$$typeof===Xp||e.$$typeof===Jp||e.$$typeof===Zp||e.$$typeof===Kp)},$.typeOf=ue,function(e){e.exports=$}(Vo);var Ko=Vo.exports,Qp={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},qp={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Xo={};Xo[Ko.ForwardRef]=Qp,Xo[Ko.Memo]=qp;var em=!0;function qn(e,t,r){var n="";return r.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):n+=i+" "}),n}var Jo=function(t,r,n){var i=t.key+"-"+r.name;(n===!1||em===!1)&&t.registered[i]===void 0&&(t.registered[i]=r.styles)},Zo=function(t,r,n){Jo(t,r,n);var i=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var s=r;do t.insert(r===s?"."+i:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function tm(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var rm={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},nm=/[A-Z]|^ms/g,im=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Qo=function(t){return t.charCodeAt(1)===45},qo=function(t){return t!=null&&typeof t!="boolean"},ei=Wp(function(e){return Qo(e)?e:e.replace(nm,"-$&").toLowerCase()}),ea=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(im,function(n,i,s){return _e={name:i,styles:s,next:_e},i})}return rm[t]!==1&&!Qo(t)&&typeof r=="number"&&r!==0?r+"px":r},Ey="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Dt(e,t,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return _e={name:r.name,styles:r.styles,next:_e},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)_e={name:n.name,styles:n.styles,next:_e},n=n.next;var i=r.styles+";";return i}return sm(e,t,r)}case"function":{if(e!==void 0){var s=_e,o=r(e);return _e=s,Dt(e,t,o)}break}}if(t==null)return r;var a=t[r];return a!==void 0?a:r}function sm(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=Dt(e,t,r[i])+";";else for(var s in r){var o=r[s];if(typeof o!="object")t!=null&&t[o]!==void 0?n+=s+"{"+t[o]+"}":qo(o)&&(n+=ei(s)+":"+ea(s,o)+";");else if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var a=0;a<o.length;a++)qo(o[a])&&(n+=ei(s)+":"+ea(s,o[a])+";");else{var u=Dt(e,t,o);switch(s){case"animation":case"animationName":{n+=ei(s)+":"+u+";";break}default:n+=s+"{"+u+"}"}}}return n}var ta=/label:\s*([^\s;\n{]+)\s*(;|$)/g,_e,Ft=function(t,r,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,s="";_e=void 0;var o=t[0];o==null||o.raw===void 0?(i=!1,s+=Dt(n,r,o)):s+=o[0];for(var a=1;a<t.length;a++)s+=Dt(n,r,t[a]),i&&(s+=o[a]);ta.lastIndex=0;for(var u="",c;(c=ta.exec(s))!==null;)u+="-"+c[1];var l=tm(s)+u;return{name:l,styles:s,next:_e}},om=function(t){return t()},am=Xi["useInsertionEffect"]?Xi["useInsertionEffect"]:!1,cm=am||om,Ar={}.hasOwnProperty,ra=g.createContext(typeof HTMLElement<"u"?Go({key:"css"}):null);ra.Provider;var um=function(t){return g.forwardRef(function(r,n){var i=g.useContext(ra);return t(r,i,n)})},lm=g.createContext({}),ti="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",na=function(t,r){var n={};for(var i in r)Ar.call(r,i)&&(n[i]=r[i]);return n[ti]=t,n},fm=function(t){var r=t.cache,n=t.serialized,i=t.isStringTag;return Jo(r,n,i),cm(function(){return Zo(r,n,i)}),null},ia=um(function(e,t,r){var n=e.css;typeof n=="string"&&t.registered[n]!==void 0&&(n=t.registered[n]);var i=e[ti],s=[n],o="";typeof e.className=="string"?o=qn(t.registered,s,e.className):e.className!=null&&(o=e.className+" ");var a=Ft(s,void 0,g.useContext(lm));o+=t.key+"-"+a.name;var u={};for(var c in e)Ar.call(e,c)&&c!=="css"&&c!==ti&&(u[c]=e[c]);return u.ref=r,u.className=o,g.createElement(g.Fragment,null,g.createElement(fm,{cache:t,serialized:a,isStringTag:typeof i=="string"}),g.createElement(i,u))}),Or={exports:{}},Lr={};/**
 * @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 dm=ae.default,hm=Symbol.for("react.element"),pm=Symbol.for("react.fragment"),mm=Object.prototype.hasOwnProperty,gm=dm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,vm={key:!0,ref:!0,__self:!0,__source:!0};function sa(e,t,r){var n,i={},s=null,o=null;r!==void 0&&(s=""+r),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)mm.call(t,n)&&!vm.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:hm,type:e,key:s,ref:o,props:i,_owner:gm.current}}Lr.Fragment=pm,Lr.jsx=sa,Lr.jsxs=sa,function(e){e.exports=Lr}(Or);const ym=Or.exports.Fragment,oa=Or.exports.jsx,aa=Or.exports.jsxs;var We=ym;function h(e,t,r){return Ar.call(t,"css")?oa(ia,na(e,t),r):oa(e,t,r)}function O(e,t,r){return Ar.call(t,"css")?aa(ia,na(e,t),r):aa(e,t,r)}const bm={Close:Ao,Config:Oo,DistraughtFace:Lo,Return:No,Loading:Po,LoadingThree:Ro,Info:Mo};function ct({name:e,theme:t,size:r,fill:n,...i}){t||(t="outline"),r||(r=24);const s=Rn();n||(n=s?"#fff":"#333");const o=bm[e];return h(o,{theme:t,size:r,fill:n,...i,style:{fontSize:0,...i.style}})}var ca={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 r(){for(var n=[],i=0;i<arguments.length;i++){var s=arguments[i];if(!!s){var o=typeof s;if(o==="string"||o==="number")n.push(s);else if(Array.isArray(s)){if(s.length){var a=r.apply(null,s);a&&n.push(a)}}else if(o==="object"){if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]")){n.push(s.toString());continue}for(var u in s)t.call(s,u)&&s[u]&&n.push(u)}}}return n.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ca);const X=ca.exports;function ut(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Ft(t)}function ua(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function la(e,t,r){var n=[],i=qn(e,n,r);return n.length<2?r:i+t(n)}var _m=function(t){var r=Go(t);r.sheet.speedy=function(a){this.isSpeedy=a},r.compat=!0;var n=function(){for(var u=arguments.length,c=new Array(u),l=0;l<u;l++)c[l]=arguments[l];var f=Ft(c,r.registered,void 0);return Zo(r,f,!1),r.key+"-"+f.name},i=function(){for(var u=arguments.length,c=new Array(u),l=0;l<u;l++)c[l]=arguments[l];var f=Ft(c,r.registered),d="animation-"+f.name;return ua(r,{name:f.name,styles:"@keyframes "+d+"{"+f.styles+"}"}),d},s=function(){for(var u=arguments.length,c=new Array(u),l=0;l<u;l++)c[l]=arguments[l];var f=Ft(c,r.registered);ua(r,f)},o=function(){for(var u=arguments.length,c=new Array(u),l=0;l<u;l++)c[l]=arguments[l];return la(r.registered,n,wm(c))};return{css:n,cx:o,injectGlobal:s,keyframes:i,hydrate:function(u){u.forEach(function(c){r.inserted[c]=!0})},flush:function(){r.registered={},r.inserted={},r.sheet.flush()},sheet:r.sheet,cache:r,getRegisteredStyles:qn.bind(null,r.registered),merge:la.bind(null,r.registered,n)}},wm=function e(t){for(var r="",n=0;n<t.length;n++){var i=t[n];if(i!=null){var s=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))s=e(i);else{s="";for(var o in i)i[o]&&o&&(s&&(s+=" "),s+=o)}break}default:s=i}s&&(r&&(r+=" "),r+=s)}}return r},Sm=_m({key:"css"}),ri=Sm.css,Cm=function(t){return function(r,n){var i=g.useRef(!1);t(function(){return function(){i.current=!1}},[]),t(function(){if(!i.current)i.current=!0;else return r()},n)}},lt=function(t){return typeof t=="function"},km=function(t){return typeof t=="string"},fa=function(t){return typeof t=="number"},Em=!1;const ni=Em;function H(e){ni&&(lt(e)||console.error("useMemoizedFn expected parameter is a function, got ".concat(typeof e)));var t=g.useRef(e);t.current=g.useMemo(function(){return e},[e]);var r=g.useRef();return r.current||(r.current=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return t.current.apply(this,n)}),r.current}const ii=Cm(g.useEffect);var da=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},ha=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},pa=function(t,r){var n=r.manual,i=r.ready,s=i===void 0?!0:i,o=r.defaultParams,a=o===void 0?[]:o,u=r.refreshDeps,c=u===void 0?[]:u,l=r.refreshDepsAction,f=g.useRef(!1);return f.current=!1,ii(function(){!n&&s&&(f.current=!0,t.run.apply(t,ha([],da(a),!1)))},[s]),ii(function(){f.current||n||(f.current=!0,l?l():t.refresh())},ha([],da(c),!1)),{onBefore:function(){if(!s)return{stopNow:!0}}}};pa.onInit=function(e){var t=e.ready,r=t===void 0?!0:t,n=e.manual;return{loading:!n&&r}};const Tm=pa;function si(e,t){if(e===t)return!0;for(var r=0;r<e.length;r++)if(!Object.is(e[r],t[r]))return!1;return!0}function ma(e,t){var r=g.useRef({deps:t,obj:void 0,initialized:!1}).current;return(r.initialized===!1||!si(r.deps,t))&&(r.deps=t,r.obj=e(),r.initialized=!0),r.obj}function jt(e){var t=g.useRef(e);return t.current=e,t}var xm=function(t){ni&&(lt(t)||console.error("useUnmount expected parameter is a function, got ".concat(typeof t)));var r=jt(t);g.useEffect(function(){return function(){r.current()}},[])};const It=xm;var Mr=globalThis&&globalThis.__assign||function(){return Mr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Mr.apply(this,arguments)},Pr=new Map,Am=function(t,r,n){var i=Pr.get(t);i!=null&&i.timer&&clearTimeout(i.timer);var s=void 0;r>-1&&(s=setTimeout(function(){Pr.delete(t)},r)),Pr.set(t,Mr(Mr({},n),{timer:s}))},Om=function(t){return Pr.get(t)},Rr=new Map,Lm=function(t){return Rr.get(t)},Mm=function(t,r){Rr.set(t,r),r.then(function(n){return Rr.delete(t),n}).catch(function(){Rr.delete(t)})},Ke={},Pm=function(t,r){Ke[t]&&Ke[t].forEach(function(n){return n(r)})},oi=function(t,r){return Ke[t]||(Ke[t]=[]),Ke[t].push(r),function(){var i=Ke[t].indexOf(r);Ke[t].splice(i,1)}},Rm=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Nm=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},Dm=function(t,r){var n=r.cacheKey,i=r.cacheTime,s=i===void 0?5*60*1e3:i,o=r.staleTime,a=o===void 0?0:o,u=r.setCache,c=r.getCache,l=g.useRef(),f=g.useRef(),d=function(y,v){u?u(v):Am(y,s,v),Pm(y,v.data)},p=function(y,v){return v===void 0&&(v=[]),c?c(v):Om(y)};return ma(function(){if(!!n){var m=p(n);m&&Object.hasOwnProperty.call(m,"data")&&(t.state.data=m.data,t.state.params=m.params,(a===-1||new Date().getTime()-m.time<=a)&&(t.state.loading=!1)),l.current=oi(n,function(y){t.setState({data:y})})}},[]),It(function(){var m;(m=l.current)===null||m===void 0||m.call(l)}),n?{onBefore:function(y){var v=p(n,y);return!v||!Object.hasOwnProperty.call(v,"data")?{}:a===-1||new Date().getTime()-v.time<=a?{loading:!1,data:v==null?void 0:v.data,error:void 0,returnNow:!0}:{data:v==null?void 0:v.data,error:void 0}},onRequest:function(y,v){var C=Lm(n);return C&&C!==f.current?{servicePromise:C}:(C=y.apply(void 0,Nm([],Rm(v),!1)),f.current=C,Mm(n,C),{servicePromise:C})},onSuccess:function(y,v){var C;n&&((C=l.current)===null||C===void 0||C.call(l),d(n,{data:y,params:v,time:new Date().getTime()}),l.current=oi(n,function(M){t.setState({data:M})}))},onMutate:function(y){var v;n&&((v=l.current)===null||v===void 0||v.call(l),d(n,{data:y,params:t.state.params,time:new Date().getTime()}),l.current=oi(n,function(C){t.setState({data:C})}))}}:{}};const Fm=Dm;var jm=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Im=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},Wm=function(t,r){var n=r.debounceWait,i=r.debounceLeading,s=r.debounceTrailing,o=r.debounceMaxWait,a=g.useRef(),u=g.useMemo(function(){var c={};return i!==void 0&&(c.leading=i),s!==void 0&&(c.trailing=s),o!==void 0&&(c.maxWait=o),c},[i,s,o]);return g.useEffect(function(){if(n){var c=t.runAsync.bind(t);return a.current=Bs(function(l){l()},n,u),t.runAsync=function(){for(var l=[],f=0;f<arguments.length;f++)l[f]=arguments[f];return new Promise(function(d,p){var m;(m=a.current)===null||m===void 0||m.call(a,function(){c.apply(void 0,Im([],jm(l),!1)).then(d).catch(p)})})},function(){var l;(l=a.current)===null||l===void 0||l.cancel(),t.runAsync=c}}},[n,u]),n?{onCancel:function(){var l;(l=a.current)===null||l===void 0||l.cancel()}}:{}};const zm=Wm;var Bm=function(t,r){var n=r.loadingDelay,i=g.useRef();if(!n)return{};var s=function(){i.current&&clearTimeout(i.current)};return{onBefore:function(){return s(),i.current=setTimeout(function(){t.setState({loading:!0})},n),{loading:!1}},onFinally:function(){s()},onCancel:function(){s()}}};const $m=Bm;var Hm=!!(typeof window<"u"&&window.document&&window.document.createElement);const Wt=Hm;function ai(){return Wt?document.visibilityState!=="hidden":!0}var zt=[];function Um(e){return zt.push(e),function(){var r=zt.indexOf(e);zt.splice(r,1)}}if(Wt){var Gm=function(){if(!!ai())for(var t=0;t<zt.length;t++){var r=zt[t];r()}};window.addEventListener("visibilitychange",Gm,!1)}var Vm=function(t,r){var n=r.pollingInterval,i=r.pollingWhenHidden,s=i===void 0?!0:i,o=r.pollingErrorRetryCount,a=o===void 0?-1:o,u=g.useRef(),c=g.useRef(),l=g.useRef(0),f=function(){var p;u.current&&clearTimeout(u.current),(p=c.current)===null||p===void 0||p.call(c)};return ii(function(){n||f()},[n]),n?{onBefore:function(){f()},onError:function(){l.current+=1},onSuccess:function(){l.current=0},onFinally:function(){a===-1||a!==-1&&l.current<=a?u.current=setTimeout(function(){!s&&!ai()?c.current=Um(function(){t.refresh()}):t.refresh()},n):l.current=0},onCancel:function(){f()}}:{}};const Ym=Vm;var Km=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Xm=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))};function Jm(e,t){var r=!1;return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];r||(r=!0,e.apply(void 0,Xm([],Km(n),!1)),setTimeout(function(){r=!1},t))}}function Zm(){return Wt&&typeof navigator.onLine<"u"?navigator.onLine:!0}var Bt=[];function Qm(e){return Bt.push(e),function(){var r=Bt.indexOf(e);r>-1&&Bt.splice(r,1)}}if(Wt){var ga=function(){if(!(!ai()||!Zm()))for(var t=0;t<Bt.length;t++){var r=Bt[t];r()}};window.addEventListener("visibilitychange",ga,!1),window.addEventListener("focus",ga,!1)}var qm=function(t,r){var n=r.refreshOnWindowFocus,i=r.focusTimespan,s=i===void 0?5e3:i,o=g.useRef(),a=function(){var c;(c=o.current)===null||c===void 0||c.call(o)};return g.useEffect(function(){if(n){var u=Jm(t.refresh.bind(t),s);o.current=Qm(function(){u()})}return function(){a()}},[n,s]),It(function(){a()}),{}};const eg=qm;var tg=function(t,r){var n=r.retryInterval,i=r.retryCount,s=g.useRef(),o=g.useRef(0),a=g.useRef(!1);return i?{onBefore:function(){a.current||(o.current=0),a.current=!1,s.current&&clearTimeout(s.current)},onSuccess:function(){o.current=0},onError:function(){if(o.current+=1,i===-1||o.current<=i){var c=n!=null?n:Math.min(1e3*Math.pow(2,o.current),3e4);s.current=setTimeout(function(){a.current=!0,t.refresh()},c)}else o.current=0},onCancel:function(){o.current=0,s.current&&clearTimeout(s.current)}}:{}};const rg=tg;var ng=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},ig=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},sg=function(t,r){var n=r.throttleWait,i=r.throttleLeading,s=r.throttleTrailing,o=g.useRef(),a={};return i!==void 0&&(a.leading=i),s!==void 0&&(a.trailing=s),g.useEffect(function(){if(n){var u=t.runAsync.bind(t);return o.current=yh(function(c){c()},n,a),t.runAsync=function(){for(var c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];return new Promise(function(f,d){var p;(p=o.current)===null||p===void 0||p.call(o,function(){u.apply(void 0,ig([],ng(c),!1)).then(f).catch(d)})})},function(){var c;t.runAsync=u,(c=o.current)===null||c===void 0||c.cancel()}}},[n,i,s]),n?{onCancel:function(){var c;(c=o.current)===null||c===void 0||c.cancel()}}:{}};const og=sg;var ag=function(t){ni&&(lt(t)||console.error('useMount: parameter `fn` expected to be a function, but got "'.concat(typeof t,'".'))),g.useEffect(function(){t==null||t()},[])};const cg=ag;var ug=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},lg=function(){var t=ug(g.useState({}),2),r=t[1];return g.useCallback(function(){return r({})},[])};const fg=lg;var ze=globalThis&&globalThis.__assign||function(){return ze=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},ze.apply(this,arguments)},dg=globalThis&&globalThis.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(n.next(l))}catch(f){o(f)}}function u(l){try{c(n.throw(l))}catch(f){o(f)}}function c(l){l.done?s(l.value):i(l.value).then(a,u)}c((n=n.apply(e,t||[])).next())})},hg=globalThis&&globalThis.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(l){return u([c,l])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(l){c=[6,l],i=0}finally{n=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},pg=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},ft=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},dt=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},mg=function(){function e(t,r,n,i){i===void 0&&(i={}),this.serviceRef=t,this.options=r,this.subscribe=n,this.initState=i,this.count=0,this.state={loading:!1,params:void 0,data:void 0,error:void 0},this.state=ze(ze(ze({},this.state),{loading:!r.manual}),i)}return e.prototype.setState=function(t){t===void 0&&(t={}),this.state=ze(ze({},this.state),t),this.subscribe()},e.prototype.runPluginHandler=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=this.pluginImpls.map(function(s){var o;return(o=s[t])===null||o===void 0?void 0:o.call.apply(o,dt([s],ft(r),!1))}).filter(Boolean);return Object.assign.apply(Object,dt([{}],ft(i),!1))},e.prototype.runAsync=function(){for(var t,r,n,i,s,o,a,u,c,l,f=[],d=0;d<arguments.length;d++)f[d]=arguments[d];return dg(this,void 0,void 0,function(){var p,m,y,v,C,M,A,x,_,b,E;return hg(this,function(R){switch(R.label){case 0:if(this.count+=1,p=this.count,m=this.runPluginHandler("onBefore",f),y=m.stopNow,v=y===void 0?!1:y,C=m.returnNow,M=C===void 0?!1:C,A=pg(m,["stopNow","returnNow"]),v)return[2,new Promise(function(){})];if(this.setState(ze({loading:!0,params:f},A)),M)return[2,Promise.resolve(A.data)];(r=(t=this.options).onBefore)===null||r===void 0||r.call(t,f),R.label=1;case 1:return R.trys.push([1,3,,4]),x=this.runPluginHandler("onRequest",this.serviceRef.current,f).servicePromise,x||(x=(E=this.serviceRef).current.apply(E,dt([],ft(f),!1))),[4,x];case 2:return _=R.sent(),p!==this.count?[2,new Promise(function(){})]:(this.setState({data:_,error:void 0,loading:!1}),(i=(n=this.options).onSuccess)===null||i===void 0||i.call(n,_,f),this.runPluginHandler("onSuccess",_,f),(o=(s=this.options).onFinally)===null||o===void 0||o.call(s,f,_,void 0),p===this.count&&this.runPluginHandler("onFinally",f,_,void 0),[2,_]);case 3:if(b=R.sent(),p!==this.count)return[2,new Promise(function(){})];throw this.setState({error:b,loading:!1}),(u=(a=this.options).onError)===null||u===void 0||u.call(a,b,f),this.runPluginHandler("onError",b,f),(l=(c=this.options).onFinally)===null||l===void 0||l.call(c,f,void 0,b),p===this.count&&this.runPluginHandler("onFinally",f,void 0,b),b;case 4:return[2]}})})},e.prototype.run=function(){for(var t=this,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];this.runAsync.apply(this,dt([],ft(r),!1)).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,dt([],ft(this.state.params||[]),!1))},e.prototype.refreshAsync=function(){return this.runAsync.apply(this,dt([],ft(this.state.params||[]),!1))},e.prototype.mutate=function(t){var r=lt(t)?t(this.state.data):t;this.runPluginHandler("onMutate",r),this.setState({data:r})},e}();const gg=mg;var ci=globalThis&&globalThis.__assign||function(){return ci=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},ci.apply(this,arguments)},vg=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},va=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},ya=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))};function yg(e,t,r){t===void 0&&(t={}),r===void 0&&(r=[]);var n=t.manual,i=n===void 0?!1:n,s=vg(t,["manual"]),o=ci({manual:i},s),a=jt(e),u=fg(),c=ma(function(){var l=r.map(function(f){var d;return(d=f==null?void 0:f.onInit)===null||d===void 0?void 0:d.call(f,o)}).filter(Boolean);return new gg(a,o,u,Object.assign.apply(Object,ya([{}],va(l),!1)))},[]);return c.options=o,c.pluginImpls=r.map(function(l){return l(c,o)}),cg(function(){if(!i){var l=c.state.params||t.defaultParams||[];c.run.apply(c,ya([],va(l),!1))}}),It(function(){c.cancel()}),{loading:c.state.loading,data:c.state.data,error:c.state.error,params:c.state.params||[],cancel:H(c.cancel.bind(c)),refresh:H(c.refresh.bind(c)),refreshAsync:H(c.refreshAsync.bind(c)),run:H(c.run.bind(c)),runAsync:H(c.runAsync.bind(c)),mutate:H(c.mutate.bind(c))}}var bg=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},ba=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))};function _a(e,t,r){return yg(e,t,ba(ba([],bg(r||[]),!1),[zm,$m,Ym,eg,og,Tm,Fm,rg],!1))}var _g=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function wa(e,t){e===void 0&&(e=!1);var r=_g(g.useState(e),2),n=r[0],i=r[1],s=g.useMemo(function(){var o=t===void 0?!e:t,a=function(){return i(function(d){return d===e?o:e})},u=function(d){return i(d)},c=function(){return i(e)},l=function(){return i(o)};return{toggle:a,set:u,setLeft:c,setRight:l}},[]);return[n,s]}var wg=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function Sg(e){e===void 0&&(e=!1);var t=wg(wa(e),2),r=t[0],n=t[1],i=n.toggle,s=n.set,o=g.useMemo(function(){var a=function(){return s(!0)},u=function(){return s(!1)};return{toggle:i,set:function(l){return s(!!l)},setTrue:a,setFalse:u}},[]);return[r,o]}function Nr(e,t){if(!!Wt){if(!e)return t;var r;return lt(e)?r=e():"current"in e?r=e.current:r=e,r}}var Cg=function(t){var r=function(i,s,o){var a=g.useRef(!1),u=g.useRef([]),c=g.useRef([]),l=g.useRef();t(function(){var f,d=Array.isArray(o)?o:[o],p=d.map(function(m){return Nr(m)});if(!a.current){a.current=!0,u.current=p,c.current=s,l.current=i();return}(p.length!==u.current.length||!si(p,u.current)||!si(s,c.current))&&((f=l.current)===null||f===void 0||f.call(l),u.current=p,c.current=s,l.current=i())}),It(function(){var f;(f=l.current)===null||f===void 0||f.call(l),a.current=!1})};return r},kg=Cg(g.useEffect);const Sa=kg;var Ca={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(Sh,function(){var r=1e3,n=6e4,i=36e5,s="millisecond",o="second",a="minute",u="hour",c="day",l="week",f="month",d="quarter",p="year",m="date",y="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|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,M={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("_"),ordinal:function(k){var w=["th","st","nd","rd"],S=k%100;return"["+k+(w[(S-20)%10]||w[S]||w[0])+"]"}},A=function(k,w,S){var L=String(k);return!L||L.length>=w?k:""+Array(w+1-L.length).join(S)+k},x={s:A,z:function(k){var w=-k.utcOffset(),S=Math.abs(w),L=Math.floor(S/60),T=S%60;return(w<=0?"+":"-")+A(L,2,"0")+":"+A(T,2,"0")},m:function k(w,S){if(w.date()<S.date())return-k(S,w);var L=12*(S.year()-w.year())+(S.month()-w.month()),T=w.clone().add(L,f),N=S-T<0,D=w.clone().add(L+(N?-1:1),f);return+(-(L+(S-T)/(N?T-D:D-T))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:f,y:p,w:l,d:c,D:m,h:u,m:a,s:o,ms:s,Q:d}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},_="en",b={};b[_]=M;var E=function(k){return k instanceof P},R=function k(w,S,L){var T;if(!w)return _;if(typeof w=="string"){var N=w.toLowerCase();b[N]&&(T=N),S&&(b[N]=S,T=N);var D=w.split("-");if(!T&&D.length>1)return k(D[0])}else{var W=w.name;b[W]=w,T=W}return!L&&T&&(_=T),T||!L&&_},I=function(k,w){if(E(k))return k.clone();var S=typeof w=="object"?w:{};return S.date=k,S.args=arguments,new P(S)},j=x;j.l=R,j.i=E,j.w=function(k,w){return I(k,{locale:w.$L,utc:w.$u,x:w.$x,$offset:w.$offset})};var P=function(){function k(S){this.$L=R(S.locale,null,!0),this.parse(S)}var w=k.prototype;return w.parse=function(S){this.$d=function(L){var T=L.date,N=L.utc;if(T===null)return new Date(NaN);if(j.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var D=T.match(v);if(D){var W=D[2]-1||0,V=(D[7]||"0").substring(0,3);return N?new Date(Date.UTC(D[1],W,D[3]||1,D[4]||0,D[5]||0,D[6]||0,V)):new Date(D[1],W,D[3]||1,D[4]||0,D[5]||0,D[6]||0,V)}}return new Date(T)}(S),this.$x=S.x||{},this.init()},w.init=function(){var S=this.$d;this.$y=S.getFullYear(),this.$M=S.getMonth(),this.$D=S.getDate(),this.$W=S.getDay(),this.$H=S.getHours(),this.$m=S.getMinutes(),this.$s=S.getSeconds(),this.$ms=S.getMilliseconds()},w.$utils=function(){return j},w.isValid=function(){return this.$d.toString()!==y},w.isSame=function(S,L){var T=I(S);return this.startOf(L)<=T&&T<=this.endOf(L)},w.isAfter=function(S,L){return I(S)<this.startOf(L)},w.isBefore=function(S,L){return this.endOf(L)<I(S)},w.$g=function(S,L,T){return j.u(S)?this[L]:this.set(T,S)},w.unix=function(){return Math.floor(this.valueOf()/1e3)},w.valueOf=function(){return this.$d.getTime()},w.startOf=function(S,L){var T=this,N=!!j.u(L)||L,D=j.p(S),W=function($e,re){var Ae=j.w(T.$u?Date.UTC(T.$y,re,$e):new Date(T.$y,re,$e),T);return N?Ae:Ae.endOf(c)},V=function($e,re){return j.w(T.toDate()[$e].apply(T.toDate("s"),(N?[0,0,0,0]:[23,59,59,999]).slice(re)),T)},G=this.$W,q=this.$M,Te=this.$D,he="set"+(this.$u?"UTC":"");switch(D){case p:return N?W(1,0):W(31,11);case f:return N?W(1,q):W(0,q+1);case l:var De=this.$locale().weekStart||0,xe=(G<De?G+7:G)-De;return W(N?Te-xe:Te+(6-xe),q);case c:case m:return V(he+"Hours",0);case u:return V(he+"Minutes",1);case a:return V(he+"Seconds",2);case o:return V(he+"Milliseconds",3);default:return this.clone()}},w.endOf=function(S){return this.startOf(S,!1)},w.$set=function(S,L){var T,N=j.p(S),D="set"+(this.$u?"UTC":""),W=(T={},T[c]=D+"Date",T[m]=D+"Date",T[f]=D+"Month",T[p]=D+"FullYear",T[u]=D+"Hours",T[a]=D+"Minutes",T[o]=D+"Seconds",T[s]=D+"Milliseconds",T)[N],V=N===c?this.$D+(L-this.$W):L;if(N===f||N===p){var G=this.clone().set(m,1);G.$d[W](V),G.init(),this.$d=G.set(m,Math.min(this.$D,G.daysInMonth())).$d}else W&&this.$d[W](V);return this.init(),this},w.set=function(S,L){return this.clone().$set(S,L)},w.get=function(S){return this[j.p(S)]()},w.add=function(S,L){var T,N=this;S=Number(S);var D=j.p(L),W=function(q){var Te=I(N);return j.w(Te.date(Te.date()+Math.round(q*S)),N)};if(D===f)return this.set(f,this.$M+S);if(D===p)return this.set(p,this.$y+S);if(D===c)return W(1);if(D===l)return W(7);var V=(T={},T[a]=n,T[u]=i,T[o]=r,T)[D]||1,G=this.$d.getTime()+S*V;return j.w(G,this)},w.subtract=function(S,L){return this.add(-1*S,L)},w.format=function(S){var L=this,T=this.$locale();if(!this.isValid())return T.invalidDate||y;var N=S||"YYYY-MM-DDTHH:mm:ssZ",D=j.z(this),W=this.$H,V=this.$m,G=this.$M,q=T.weekdays,Te=T.months,he=function(re,Ae,Zt,_t){return re&&(re[Ae]||re(L,N))||Zt[Ae].slice(0,_t)},De=function(re){return j.s(W%12||12,re,"0")},xe=T.meridiem||function(re,Ae,Zt){var _t=re<12?"AM":"PM";return Zt?_t.toLowerCase():_t},$e={YY:String(this.$y).slice(-2),YYYY:this.$y,M:G+1,MM:j.s(G+1,2,"0"),MMM:he(T.monthsShort,G,Te,3),MMMM:he(Te,G),D:this.$D,DD:j.s(this.$D,2,"0"),d:String(this.$W),dd:he(T.weekdaysMin,this.$W,q,2),ddd:he(T.weekdaysShort,this.$W,q,3),dddd:q[this.$W],H:String(W),HH:j.s(W,2,"0"),h:De(1),hh:De(2),a:xe(W,V,!0),A:xe(W,V,!1),m:String(V),mm:j.s(V,2,"0"),s:String(this.$s),ss:j.s(this.$s,2,"0"),SSS:j.s(this.$ms,3,"0"),Z:D};return N.replace(C,function(re,Ae){return Ae||$e[re]||D.replace(":","")})},w.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},w.diff=function(S,L,T){var N,D=j.p(L),W=I(S),V=(W.utcOffset()-this.utcOffset())*n,G=this-W,q=j.m(this,W);return q=(N={},N[p]=q/12,N[f]=q,N[d]=q/3,N[l]=(G-V)/6048e5,N[c]=(G-V)/864e5,N[u]=G/i,N[a]=G/n,N[o]=G/r,N)[D]||G,T?q:j.a(q)},w.daysInMonth=function(){return this.endOf(f).$D},w.$locale=function(){return b[this.$L]},w.locale=function(S,L){if(!S)return this.$L;var T=this.clone(),N=R(S,L,!0);return N&&(T.$L=N),T},w.clone=function(){return j.w(this.$d,this)},w.toDate=function(){return new Date(this.valueOf())},w.toJSON=function(){return this.isValid()?this.toISOString():null},w.toISOString=function(){return this.$d.toISOString()},w.toString=function(){return this.$d.toUTCString()},k}(),F=P.prototype;return I.prototype=F,[["$ms",s],["$s",o],["$m",a],["$H",u],["$W",c],["$M",f],["$y",p],["$D",m]].forEach(function(k){F[k[1]]=function(w){return this.$g(w,k[0],k[1])}}),I.extend=function(k,w){return k.$i||(k(w,P,I),k.$i=!0),I},I.locale=R,I.isDayjs=E,I.unix=function(k){return I(1e3*k)},I.en=b[_],I.Ls=b,I.p={},I})})(Ca);const ka=Ca.exports;function Dr(e,t,r){r===void 0&&(r={});var n=jt(t);Sa(function(){var i=Nr(r.target,window);if(!!(i!=null&&i.addEventListener)){var s=function(a){return n.current(a)};return i.addEventListener(e,s,{capture:r.capture,once:r.once,passive:r.passive}),function(){i.removeEventListener(e,s,{capture:r.capture})}}},[e,r.capture,r.once,r.passive],r.target)}var Eg=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};const ui=function(e,t){var r=t||{},n=r.onEnter,i=r.onLeave,s=r.onChange,o=Eg(Sg(!1),2),a=o[0],u=o[1],c=u.setTrue,l=u.setFalse;return Dr("mouseenter",function(){n==null||n(),c(),s==null||s(!0)},{target:e}),Dr("mouseleave",function(){i==null||i(),l(),s==null||s(!1)},{target:e}),a};var Tg=function(t,r){return r===void 0&&(r=[]),Vd(t,r)},xg=function(t,r,n){var i=g.useRef(),s=g.useRef(0);Tg(r,i.current)||(i.current=r,s.current+=1),Sa(t,[s.current],n)};const Ag=xg;var li=globalThis&&globalThis.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Og={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},fi={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 Lg(e){var t=Object.keys(fi).reduce(function(r,n){return fi[n](e)?r+1:r},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function Ea(e,t,r){var n,i;if(!e.key)return!1;if(fa(t))return e.keyCode===t;var s=t.split("."),o=0;try{for(var a=li(s),u=a.next();!u.done;u=a.next()){var c=u.value,l=fi[c],f=Og[c.toLowerCase()];(l&&l(e)||f&&f===e.keyCode)&&o++}}catch(d){n={error:d}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return r?o===s.length&&Lg(e)===s.length:o===s.length}function Mg(e,t){return lt(e)?e:km(e)||fa(e)?function(r){return Ea(r,e,t)}:Array.isArray(e)?function(r){return e.some(function(n){return Ea(r,n,t)})}:e?function(){return!0}:function(){return!1}}var Pg=["keydown"];function we(e,t,r){var n=r||{},i=n.events,s=i===void 0?Pg:i,o=n.target,a=n.exactMatch,u=a===void 0?!1:a,c=jt(t),l=jt(e);Ag(function(){var f,d,p,m=Nr(o,window);if(!!m){var y=function(x){var _,b=Mg(l.current,u);if(b(x))return(_=c.current)===null||_===void 0?void 0:_.call(c,x)};try{for(var v=li(s),C=v.next();!C.done;C=v.next()){var M=C.value;(p=m==null?void 0:m.addEventListener)===null||p===void 0||p.call(m,M,y)}}catch(A){f={error:A}}finally{try{C&&!C.done&&(d=v.return)&&d.call(v)}finally{if(f)throw f.error}}return function(){var A,x,_;try{for(var b=li(s),E=b.next();!E.done;E=b.next()){var R=E.value;(_=m==null?void 0:m.removeEventListener)===null||_===void 0||_.call(m,R,y)}}catch(I){A={error:I}}finally{try{E&&!E.done&&(x=b.return)&&x.call(b)}finally{if(A)throw A.error}}}}},[s],o)}var Rg=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function Ng(e){var t=g.useRef(0),r=Rg(g.useState(e),2),n=r[0],i=r[1],s=g.useCallback(function(o){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){i(o)})},[]);return It(function(){cancelAnimationFrame(t.current)}),[n,s]}var Dg=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Fg={screenX:NaN,screenY:NaN,clientX:NaN,clientY:NaN,pageX:NaN,pageY:NaN,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN};const jg=function(e){var t=Dg(Ng(Fg),2),r=t[0],n=t[1];return Dr("mousemove",function(i){var s=i.screenX,o=i.screenY,a=i.clientX,u=i.clientY,c=i.pageX,l=i.pageY,f={screenX:s,screenY:o,clientX:a,clientY:u,pageX:c,pageY:l,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},d=Nr(e);if(d){var p=d.getBoundingClientRect(),m=p.left,y=p.top,v=p.width,C=p.height;f.elementPosX=m+window.pageXOffset,f.elementPosY=y+window.pageYOffset,f.elementX=c-f.elementPosX,f.elementY=l-f.elementPosY,f.elementW=v,f.elementH=C}n(f)},{target:function(){return document}}),r},de={modalMask:"_modal-mask_1fjgs_1",modal:"_modal_1fjgs_1",modalHeader:"_modal-header_1fjgs_23",modalBody:"_modal-body_1fjgs_30",modalTitle:"_modal-title_1fjgs_35",btnClose:"_btn-close_1fjgs_42"};let $t=0;const Ig=()=>{$t++,document.body.style.overflow="hidden"},Wg=()=>{$t--,$t<0&&($t=0),$t===0&&(document.body.style.overflow="overlay")};function di({show:e,onHide:t,children:r,clsModalMask:n,clsModal:i,hideWhenMaskOnClick:s=!1,hideWhenEsc:o=!1}){g.useLayoutEffect(()=>{e?Ig():Wg()},[e]);const a=g.useRef(null),u=Rn(),{bg:c,c:l}=g.useMemo(()=>{const y=window.getComputedStyle(document.body)["background-color"],v=window.getComputedStyle(document.body).color;return{bg:y,c:v}},[u]),f=g.useMemo(()=>u?{"--bg":c,"--c":l,backgroundColor:c,color:l}:{},[c,l,u]),d=g.useId(),p=g.useMemo(()=>{const y=document.createElement("div");return y.setAttribute("data-id","base-modal-"+d),document.body.appendChild(y),y},[]),m=H(y=>{var v;(v=a.current)!=null&&v.contains(y.target)||s&&t()});return we("esc",()=>{!e||o&&t()}),e?pe.createPortal(h("div",{className:X(de.modalMask,n),onClick:m,children:h("div",{className:X(de.modal,i),style:f,ref:a,children:r})}),p):null}const hi=e=>h(ct,{...e,name:"Close",size:18,style:{cursor:"pointer",marginLeft:10,...e.style}});var ht=1e3,pt=ht*60,mt=pt*60,Xe=mt*24,zg=Xe*7,Bg=Xe*365.25,$g=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return Hg(e);if(r==="number"&&isFinite(e))return t.long?Gg(e):Ug(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Hg(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!!t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Bg;case"weeks":case"week":case"w":return r*zg;case"days":case"day":case"d":return r*Xe;case"hours":case"hour":case"hrs":case"hr":case"h":return r*mt;case"minutes":case"minute":case"mins":case"min":case"m":return r*pt;case"seconds":case"second":case"secs":case"sec":case"s":return r*ht;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Ug(e){var t=Math.abs(e);return t>=Xe?Math.round(e/Xe)+"d":t>=mt?Math.round(e/mt)+"h":t>=pt?Math.round(e/pt)+"m":t>=ht?Math.round(e/ht)+"s":e+"ms"}function Gg(e){var t=Math.abs(e);return t>=Xe?Fr(e,t,Xe,"day"):t>=mt?Fr(e,t,mt,"hour"):t>=pt?Fr(e,t,pt,"minute"):t>=ht?Fr(e,t,ht,"second"):e+" ms"}function Fr(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}const Ta="_toast-container_mcbuq_1",xa="_single-line_mcbuq_17",Ry={toastContainer:Ta,singleLine:xa};function le(e,t=2e3){let r=typeof t=="number"?t:$g(t);const n=document.createElement("div");n.className=Ta,n.innerText=e,!e.includes(`
`)&&!e.includes("<br")&&n.classList.add(xa),document.body.appendChild(n),setTimeout(()=>n.remove(),r)}const Vg="\u8BF7\u6C42\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!",Yg="\u64CD\u4F5C\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!";function Aa(){return le(Vg)}function Oa(){return le(Yg)}function Kg(e){const t=nt({data:Array.from(e||[]),has(r){return this.data.some(n=>n[0]===r)},set(r,n){const i=this.data.find(s=>s[0]===r);return i?i[1]=n:this.data.push([r,n]),this},get(r){var n;return(n=this.data.find(i=>i[0]===r))==null?void 0:n[1]},delete(r){const n=this.data.findIndex(i=>i[0]===r);return n===-1?!1:(this.data.splice(n,1),!0)},clear(){this.data.splice(0)},get size(){return this.data.length},toJSON(){return new Map(this.data)},forEach(r){this.data.forEach(n=>{r(n[1],n[0],this)})},keys(){return this.data.map(r=>r[0]).values()},values(){return this.data.map(r=>r[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 Xg="https://api.bilibili.com",La="https://app.bilibili.com",pi=Qr.default.create({baseURL:Xg});pi.interceptors.request.use(function(e){var t;return(t=e.params)!=null&&t._||(e.params={...e.params,_:Date.now()}),e},function(e){return Promise.reject(e)});const jr=Qr.default.create({adapter:vc.default});jr.interceptors.request.use(function(e){return e.params={access_key:ne.accessKey||"",...e.params},e},function(e){return Promise.reject(e)}),jr.interceptors.response.use(e=>{if(e.config.responseType==="json"&&e.data&&e.data instanceof ArrayBuffer){const t=new TextDecoder,r=new Uint8Array(e.data),n=t.decode(r);e.data=n;try{e.data=JSON.parse(n)}catch{}}return e});function Jg(){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 Ht=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Ir=typeof AbortController=="function"?AbortController:class{constructor(){this.signal=new Ma}abort(){this.signal.dispatchEvent("abort")}},Zg=typeof AbortSignal=="function",Qg=typeof Ir.AbortSignal=="function",Ma=Zg?AbortSignal:Qg?Ir.AbortController:class{constructor(){this.aborted=!1,this._listeners=[]}dispatchEvent(t){if(t==="abort"){this.aborted=!0;const r={type:t,target:this};this.onabort(r),this._listeners.forEach(n=>n(r),this)}}onabort(){}addEventListener(t,r){t==="abort"&&this._listeners.push(r)}removeEventListener(t,r){t==="abort"&&(this._listeners=this._listeners.filter(n=>n!==r))}},mi=new Set,gi=(e,t)=>{const r=`LRU_CACHE_OPTION_${e}`;Wr(r)&&yi(r,`${e} option`,`options.${t}`,Je)},vi=(e,t)=>{const r=`LRU_CACHE_METHOD_${e}`;if(Wr(r)){const{prototype:n}=Je,{get:i}=Object.getOwnPropertyDescriptor(n,e);yi(r,`${e} method`,`cache.${t}()`,i)}},qg=(e,t)=>{const r=`LRU_CACHE_PROPERTY_${e}`;if(Wr(r)){const{prototype:n}=Je,{get:i}=Object.getOwnPropertyDescriptor(n,e);yi(r,`${e} property`,`cache.${t}`,i)}},Pa=(...e)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...e):console.error(...e)},Wr=e=>!mi.has(e),yi=(e,t,r,n)=>{mi.add(e);const i=`The ${t} is deprecated. Please use ${r} instead.`;Pa(i,"DeprecationWarning",e,n)},Be=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),Ra=e=>Be(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?zr:null:null;class zr extends Array{constructor(t){super(t),this.fill(0)}}class ev{constructor(t){if(t===0)return[];const r=Ra(t);this.heap=new r(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class Je{constructor(t={}){const{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:u,dispose:c,disposeAfter:l,noDisposeOnSet:f,noUpdateTTL:d,maxSize:p=0,maxEntrySize:m=0,sizeCalculation:y,fetchMethod:v,fetchContext:C,noDeleteOnFetchRejection:M,noDeleteOnStaleGet:A}=t,{length:x,maxAge:_,stale:b}=t instanceof Je?{}:t;if(r!==0&&!Be(r))throw new TypeError("max option must be a nonnegative integer");const E=r?Ra(r):Array;if(!E)throw new Error("invalid max value: "+r);if(this.max=r,this.maxSize=p,this.maxEntrySize=m||this.maxSize,this.sizeCalculation=y||x,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=v||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=C,!this.fetchMethod&&C!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(r).fill(null),this.valList=new Array(r).fill(null),this.next=new E(r),this.prev=new E(r),this.head=0,this.tail=0,this.free=new ev(r),this.initialFill=1,this.size=0,typeof c=="function"&&(this.dispose=c),typeof l=="function"?(this.disposeAfter=l,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!f,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!M,this.maxEntrySize!==0){if(this.maxSize!==0&&!Be(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!Be(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!u||!!b,this.noDeleteOnStaleGet=!!A,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=Be(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=n||_||0,this.ttl){if(!Be(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 R="LRU_CACHE_UNBOUNDED";Wr(R)&&(mi.add(R),Pa("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",R,Je))}b&&gi("stale","allowStale"),_&&gi("maxAge","ttl"),x&&gi("length","sizeCalculation")}getRemainingTTL(t){return this.has(t,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new zr(this.max),this.starts=new zr(this.max),this.setItemTTL=(n,i,s=Ht.now())=>{if(this.starts[n]=i!==0?s:0,this.ttls[n]=i,i!==0&&this.ttlAutopurge){const o=setTimeout(()=>{this.isStale(n)&&this.delete(this.keyList[n])},i+1);o.unref&&o.unref()}},this.updateItemAge=n=>{this.starts[n]=this.ttls[n]!==0?Ht.now():0};let t=0;const r=()=>{const n=Ht.now();if(this.ttlResolution>0){t=n;const i=setTimeout(()=>t=0,this.ttlResolution);i.unref&&i.unref()}return n};this.getRemainingTTL=n=>{const i=this.keyMap.get(n);return i===void 0?0:this.ttls[i]===0||this.starts[i]===0?1/0:this.starts[i]+this.ttls[i]-(t||r())},this.isStale=n=>this.ttls[n]!==0&&this.starts[n]!==0&&(t||r())-this.starts[n]>this.ttls[n]}updateItemAge(t){}setItemTTL(t,r,n){}isStale(t){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new zr(this.max),this.removeItemSize=t=>{this.calculatedSize-=this.sizes[t],this.sizes[t]=0},this.requireSize=(t,r,n,i)=>{if(this.isBackgroundFetch(r))return 0;if(!Be(n))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(n=i(r,t),!Be(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer)");return n},this.addItemSize=(t,r)=>{if(this.sizes[t]=r,this.maxSize){const n=this.maxSize-this.sizes[t];for(;this.calculatedSize>n;)this.evict(!0)}this.calculatedSize+=this.sizes[t]}}removeItemSize(t){}addItemSize(t,r){}requireSize(t,r,n,i){if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:t=this.allowStale}={}){if(this.size)for(let r=this.tail;!(!this.isValidIndex(r)||((t||!this.isStale(r))&&(yield r),r===this.head));)r=this.prev[r]}*rindexes({allowStale:t=this.allowStale}={}){if(this.size)for(let r=this.head;!(!this.isValidIndex(r)||((t||!this.isStale(r))&&(yield r),r===this.tail));)r=this.next[r]}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,r={}){for(const n of this.indexes())if(t(this.valList[n],this.keyList[n],this))return this.get(this.keyList[n],r)}forEach(t,r=this){for(const n of this.indexes())t.call(r,this.valList[n],this.keyList[n],this)}rforEach(t,r=this){for(const n of this.rindexes())t.call(r,this.valList[n],this.keyList[n],this)}get prune(){return vi("prune","purgeStale"),this.purgeStale}purgeStale(){let t=!1;for(const r of this.rindexes({allowStale:!0}))this.isStale(r)&&(this.delete(this.keyList[r]),t=!0);return t}dump(){const t=[];for(const r of this.indexes({allowStale:!0})){const n=this.keyList[r],i=this.valList[r],o={value:this.isBackgroundFetch(i)?i.__staleWhileFetching:i};if(this.ttls){o.ttl=this.ttls[r];const a=Ht.now()-this.starts[r];o.start=Math.floor(Date.now()-a)}this.sizes&&(o.size=this.sizes[r]),t.unshift([n,o])}return t}load(t){this.clear();for(const[r,n]of t){if(n.start){const i=Date.now()-n.start;n.start=Ht.now()-i}this.set(r,n.value,n)}}dispose(t,r,n){}set(t,r,{ttl:n=this.ttl,start:i,noDisposeOnSet:s=this.noDisposeOnSet,size:o=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL}={}){if(o=this.requireSize(t,r,o,a),this.maxEntrySize&&o>this.maxEntrySize)return this.delete(t),this;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]=r,this.keyMap.set(t,c),this.next[this.tail]=c,this.prev[c]=this.tail,this.tail=c,this.size++,this.addItemSize(c,o),u=!1;else{const l=this.valList[c];r!==l&&(this.isBackgroundFetch(l)?l.__abortController.abort():s||(this.dispose(l,t,"set"),this.disposeAfter&&this.disposed.push([l,t,"set"])),this.removeItemSize(c),this.valList[c]=r,this.addItemSize(c,o)),this.moveToTail(c)}if(n!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),u||this.setItemTTL(c,n,i),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 r=this.head,n=this.keyList[r],i=this.valList[r];return this.isBackgroundFetch(i)?i.__abortController.abort():(this.dispose(i,n,"evict"),this.disposeAfter&&this.disposed.push([i,n,"evict"])),this.removeItemSize(r),t&&(this.keyList[r]=null,this.valList[r]=null,this.free.push(r)),this.head=this.next[r],this.keyMap.delete(n),this.size--,r}has(t,{updateAgeOnHas:r=this.updateAgeOnHas}={}){const n=this.keyMap.get(t);return n!==void 0&&!this.isStale(n)?(r&&this.updateItemAge(n),!0):!1}peek(t,{allowStale:r=this.allowStale}={}){const n=this.keyMap.get(t);if(n!==void 0&&(r||!this.isStale(n))){const i=this.valList[n];return this.isBackgroundFetch(i)?i.__staleWhileFetching:i}}backgroundFetch(t,r,n,i){const s=r===void 0?void 0:this.valList[r];if(this.isBackgroundFetch(s))return s;const o=new Ir,a={signal:o.signal,options:n,context:i},u=d=>(o.signal.aborted||this.set(t,d,a.options),d),c=d=>{if(this.valList[r]===f&&(!n.noDeleteOnFetchRejection||f.__staleWhileFetching===void 0?this.delete(t):this.valList[r]=f.__staleWhileFetching),f.__returned===f)throw d},l=d=>d(this.fetchMethod(t,s,a)),f=new Promise(l).then(u,c);return f.__abortController=o,f.__staleWhileFetching=s,f.__returned=null,r===void 0?(this.set(t,f,a.options),r=this.keyMap.get(t)):this.valList[r]=f,f}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:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:l=this.noDeleteOnFetchRejection,fetchContext:f=this.fetchContext,forceRefresh:d=!1}={}){if(!this.fetchMethod)return this.get(t,{allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i});const p={allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i,ttl:s,noDisposeOnSet:o,size:a,sizeCalculation:u,noUpdateTTL:c,noDeleteOnFetchRejection:l};let m=this.keyMap.get(t);if(m===void 0){const y=this.backgroundFetch(t,m,p,f);return y.__returned=y}else{const y=this.valList[m];if(this.isBackgroundFetch(y))return r&&y.__staleWhileFetching!==void 0?y.__staleWhileFetching:y.__returned=y;if(!d&&!this.isStale(m))return this.moveToTail(m),n&&this.updateItemAge(m),y;const v=this.backgroundFetch(t,m,p,f);return r&&v.__staleWhileFetching!==void 0?v.__staleWhileFetching:v.__returned=v}}get(t,{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet}={}){const s=this.keyMap.get(t);if(s!==void 0){const o=this.valList[s],a=this.isBackgroundFetch(o);return this.isStale(s)?a?r?o.__staleWhileFetching:void 0:(i||this.delete(t),r?o:void 0):a?void 0:(this.moveToTail(s),n&&this.updateItemAge(s),o)}}connect(t,r){this.prev[r]=t,this.next[t]=r}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 vi("del","delete"),this.delete}delete(t){let r=!1;if(this.size!==0){const n=this.keyMap.get(t);if(n!==void 0)if(r=!0,this.size===1)this.clear();else{this.removeItemSize(n);const i=this.valList[n];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[n]=null,this.valList[n]=null,n===this.tail?this.tail=this.prev[n]:n===this.head?this.head=this.next[n]:(this.next[this.prev[n]]=this.next[n],this.prev[this.next[n]]=this.prev[n]),this.size--,this.free.push(n)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return r}clear(){for(const t of this.rindexes({allowStale:!0})){const r=this.valList[t];if(this.isBackgroundFetch(r))r.__abortController.abort();else{const n=this.keyList[t];this.dispose(r,n,"delete"),this.disposeAfter&&this.disposed.push([r,n,"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 vi("reset","clear"),this.clear}get length(){return qg("length","size"),this.size}static get AbortController(){return Ir}static get AbortSignal(){return Ma}}var tv=Je;const rv=tv;async function nv(e){return(await pi.get("/pvideo",{params:{aid:e}})).data.data}async function iv(e){return[]}const bi=new rv({max:200});async function sv(e){if(bi.has(e))return bi.get(e);const[t,r]=await Promise.all([nv(e),iv()]);return bi.set(e,{pvideoData:t,dmData:r}),{pvideoData:t,dmData:r}}function Na(e){return async function(r){const n=new FormData;n.append("aid",r),n.append("csrf",Jg());const s=(await pi.post("/x/v2/history/toview/"+e,n,{withCredentials:!0})).data,o=(s==null?void 0:s.code)===0&&(s==null?void 0:s.message)==="0";return o||le((s==null?void 0:s.message)||"\u51FA\u9519\u4E86"),o}}const ov=Na("add"),av=Na("del"),Da=e=>{const t={dislike:"/x/feed/dislike",cancel:"/x/feed/dislike/cancel"}[e];return async function(r,n){var a;const s=(await jr.get(La+t,{params:{goto:r.goto,id:r.param,mid:r.mid,rid:r.tid,tag_id:(a=r.tag)==null?void 0:a.tag_id,reason_id:n,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"}},cv=Da("dislike"),uv=Da("cancel"),Ze={modal:"_modal_g0in4_1",titleDesc:"_title-desc_g0in4_4",reasonList:"_reason-list_g0in4_8",reason:"_reason_g0in4_8",reasonNo:"_reason-no_g0in4_29",tips:"_tips_g0in4_43"},Br=Kg();function lv(){return it(Br)}function fv(e){const t=lv();if(!!e)return t.get(e)}function dv({show:e,onHide:t,item:r}){const[n,i]=g.useState(!1),s=H(async(u,c)=>{if(!r)return;let l=!1,f=null;try{i(!0),l=await cv(r,u)}catch(d){f=d}finally{i(!1)}if(f)return console.error(f.stack||f),Aa();l?le("\u5DF2\u6807\u8BB0\u4E0D\u60F3\u770B"):Oa(),l&&(Br.set(r.param,{id:u,name:c}),t())}),o=g.useMemo(()=>{var u;return[...(u=r==null?void 0:r.dislike_reasons)!=null?u:[],{reason_id:12,reason_name:"\u6B64\u7C7B\u5185\u5BB9\u8FC7\u591A"},{reason_id:13,reason_name:"\u63A8\u8350\u8FC7"}]},[r]),a=["1","2","3","4","5","6"];return we(a,u=>{if(!e||!r||!a.includes(u.key))return;const c=Number(u.key)-1,l=document.querySelectorAll(`.${Ze.reason}`)[c]||null;l==null||l.click()}),O(di,{show:e,onHide:t,clsModal:Ze.modal,hideWhenMaskOnClick:!0,hideWhenEsc:!0,children:[O("div",{className:de.modalHeader,children:[O("div",{className:de.modalTitle,children:["\u6211\u4E0D\u60F3\u770B",h("span",{className:Ze.titleDesc,children:"(\u9009\u62E9\u540E\u5C06\u51CF\u5C11\u76F8\u4F3C\u5185\u5BB9\u63A8\u8350)"})]}),h("div",{className:"space",style:{flex:1}}),h(hi,{onClick:t})]}),O("div",{className:de.modalBody,children:[h("div",{className:Ze.reasonList,children:o.map((u,c)=>O("button",{className:Ze.reason,"data-id":u.reason_id,onClick:()=>s(u.reason_id,u.reason_name),disabled:n,children:[h("span",{className:Ze.reasonNo,children:c+1}),u.reason_name]},u.reason_id))}),O("div",{className:Ze.tips,children:[h(ct,{name:"Info",size:15,style:{marginRight:5}}),"\u4F7F\u7528\u5220\u9664\u952E\u6253\u5F00\u5F39\u6846, \u6570\u5B57\u952E\u9009\u62E9, Esc \u5173\u95ED"]})]})]})}const $r={show:!1,onHide:ja,item:null},Fa=nt({value:$r.show}),hv=function(){return it(Fa).value};function ja(){Ia({show:!1,item:null})}function Ia(e){Object.assign($r,e),Fa.value=$r.show,pv().render(h(dv,{...$r,onHide:ja}))}let _i;function pv(){if(!_i){const e=document.createElement("div");e.classList.add("show-dislike-container"),document.body.appendChild(e),_i=ar(e)}return _i}function Wa(e){(e==null?void 0:e.param)&&Br.has(e.param)||Ia({show:!0,item:e})}function mv(e){if(!e)return"00:00";const t=Math.trunc(e/3600);e-=t*3600;const r=Math.trunc(e/60);e-=r*60;const i=[t,r,e];return i[0]===0&&i.shift(),i.map(o=>ph(o.toString(),2,"0")).join(":")}function wi(e){if(!e)return"";if(e<=9999)return e.toString();let t=(e/1e4).toFixed(1);return t=t.replace(/\.0$/,""),`${t}\u4E07`}const Q={biliVideoCard:"_bili-video-card_1a93a_1",imageWrapper:"_image-wrapper_1a93a_4",previewCardWrapper:"_preview-card-wrapper_1a93a_8",previewCardInner:"_preview-card-inner_1a93a_21",watchLater:"_watch-later_1a93a_25",badge:"_badge_1a93a_28",recommendReason:"_recommend-reason_1a93a_36",bangumiDesc:"_bangumi-desc_1a93a_51",btnDislike:"_btn-dislike_1a93a_54",btnDislikeIcon:"_btn-dislike-icon_1a93a_69",btnDislikeTip:"_btn-dislike-tip_1a93a_76",dislikedWrapper:"_disliked-wrapper_1a93a_91",dislikeContentCover:"_dislike-content-cover_1a93a_105",dislikeContentCoverInner:"_dislike-content-cover-inner_1a93a_111",dislikeIcon:"_dislike-icon_1a93a_122",dislikeReason:"_dislike-reason_1a93a_125",dislikeDesc:"_dislike-desc_1a93a_129",dislikeContentAction:"_dislike-content-action_1a93a_133"};function Si(e,t){return isNaN(e)?t:e}function gv({className:e,item:t,pvideo:r,enterCursorState:n}){const i=g.useRef(null),s=jg(i),o={item:t,pvideo:r,cursorState:s,elWidth:Si(s.elementW,n.width),elHeight:Si(s.elementH,n.height),relativeX:Si(s.elementX,n.relativeX)};return h("div",{ref:i,className:X(Q.previewCardWrapper,e),children:r?h(vv,{...o}):!1})}function vv({item:e,pvideo:t,elWidth:r,elHeight:n,relativeX:i}){var b;let s=0,o=0;r&&i&&!isNaN(i)&&!isNaN(r)&&(s=i/r,s<0&&(s=0),s>1&&(s=1),o=Math.floor((e.duration||0)*s));let a=g.useMemo(()=>{const E=(t==null?void 0:t.index)||[];let R=bv(E,o);return R!==-1?R:o>E[E.length-1]?(R=Math.floor(E.length*s)-1,R<0&&(R=0),R):0},[t,o]);const{img_x_len:u,img_y_len:c,img_x_size:l,img_y_size:f}=t,d=c*u;a=a+1;const p=Math.floor(a/d),m=a-p*d,y=((b=t.image)==null?void 0:b[p])||"",v=Math.floor(m/u)+1,C=m-(v-1)*u,M=r*u,A=n*c,x=(v-1)*n,_=(C-1)*r;return h("div",{className:Q.previewCardInner,style:{backgroundColor:"black",backgroundImage:`url(${y})`,backgroundPosition:`-${_}px -${x}px`,backgroundSize:`${M}px ${A}px`},children:h(yv,{progress:s})})}function yv({progress:e}){return h("div",{className:"track",style:{position:"absolute",bottom:0,left:0,backgroundColor:"#eee",width:"100%",height:2},children:h("div",{className:"bar",style:{backgroundColor:"#fa6a9d",height:"100%",width:`${e*100}%`}})})}function bv(e,t){var a;let r=0,n=e.length-1,i=-1;for(;r<=n;){const u=Math.floor((r+n)/2),c=e[u];if(t===c)return u;c<t?(r=u+1,i=u):n=u-1}if(i===-1)return-1;const s=e[i],o=(a=e[i+1])!=null?a:0;return s<t&&t<o?i:-1}const _v=ka().format("YYYY"),wv=e=>{if(!e)return"";const t=ka.unix(e);return t.format("YYYY")===_v?t.format("M-D"):t.format("YY-M-D")},Sv=e=>e.replace(/^http:\/\//,"https://"),Ci=g.memo(function({style:t,className:r,item:n,loading:i,...s}){i=i!=null?i:!n;const o=O("div",{className:X("bili-video-card__skeleton",{hide:!i}),children:[h("div",{className:"bili-video-card__skeleton--cover"}),h("div",{className:"bili-video-card__skeleton--info",children:O("div",{className:"bili-video-card__skeleton--right",children:[h("p",{className:"bili-video-card__skeleton--text"}),h("p",{className:"bili-video-card__skeleton--text short"}),h("p",{className:"bili-video-card__skeleton--light"})]})})]}),a=fv(n==null?void 0:n.param);return O("div",{style:t,className:X("bili-video-card",Q.biliVideoCard,r),"data-report":"partition_recommend.content",...s,children:[o,!i&&n&&(a?h(Cv,{item:n,dislikedReason:a}):h(kv,{item:n}))]})}),Cv=g.memo(function({dislikedReason:t,item:r}){const n=H(async()=>{if(!(t!=null&&t.id))return;let i=!1,s=null;try{i=await uv(r,t.id)}catch(o){s=o}if(s)return console.error(s.stack||s),Aa();i?le("\u5DF2\u64A4\u9500"):Oa(),i&&Br.delete(r.param)});return O("div",{className:X(Q.dislikedWrapper),children:[h("div",{className:Q.dislikeContentCover,children:O("div",{className:Q.dislikeContentCoverInner,children:[h(ct,{name:"DistraughtFace",size:32,className:Q.dislikeIcon}),h("div",{className:Q.dislikeReason,children:t==null?void 0:t.name}),h("div",{className:Q.dislikeDesc,children:"\u5C06\u51CF\u5C11\u6B64\u7C7B\u5185\u5BB9\u63A8\u8350"})]})}),h("div",{className:Q.dislikeContentAction,children:O("button",{onClick:n,children:[h(ct,{name:"Return",size:"16",style:{marginRight:4,marginTop:-2}}),"\u64A4\u9500"]})})]})}),kv=g.memo(function({item:t}){const r=g.useRef(null),[n,i]=g.useState(()=>({width:0,height:0,relativeX:0}));Dr("mouseenter",Oe=>{var hc;const wt=(hc=r.current)==null?void 0:hc.getBoundingClientRect();if(!wt)return;const{width:St,height:Ki,x:by}=wt;i({width:St,height:Ki,relativeX:Oe.pageX-window.pageXOffset-by})},{target:r});const s=ui(r),o=g.useRef(null),a=ui(o),[u,c]=g.useState(!1),{accessKey:l}=Ie(),f=Boolean(l),{param:d,title:p,cover:m,goto:y,play:v,like:C,coin:M,desc:A,danmaku:x,ctime:_,duration:b,name:E,face:R,mid:I,favorite:j,badge:P,rcmd_reason:F}=t,k=g.useMemo(()=>wv(_),[_]),w=g.useMemo(()=>Sv(m),[m]),[S,L]=g.useState(null),[T,N]=g.useState(!1),D=H(async()=>{if(!S&&!T)try{N(!0);const Oe=await sv(d);L(Oe)}finally{N(!1)}});g.useEffect(()=>{s&&D()},[s]);let W=!1;const V=H(async Oe=>{if(Oe.preventDefault(),W)return;W=!0;const wt=u?av:ov;let St=!1;try{St=await wt(d)}finally{W=!1}St&&c(Ki=>!Ki)}),G=g.useRef(null),q=ui(G),Te=H(Oe=>{Oe.stopPropagation(),Oe.preventDefault(),Wa(t)}),he=t.goto==="bangumi",De=t.goto==="av",xe=De?`/video/av${d}`:t.uri,$e=g.useMemo(()=>mv(b),[b]),re=g.useMemo(()=>wi(v),[v]),Ae=g.useMemo(()=>wi(C),[C]),Zt=g.useMemo(()=>wi(j),[j]),_t=H(Oe=>{if(!ne.openInIINAWhenRightClick)return;const wt=new URL(xe,location.href).href,St=`iina://open?url=${encodeURIComponent(wt)}`;window.open(St,"_self"),Oe.preventDefault()});return O("div",{className:"bili-video-card__wrap __scale-wrap",onContextMenu:_t,children:[h("a",{href:xe,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:O("div",{className:"bili-video-card__image __scale-player-wrap",ref:r,children:[O("div",{className:X("bili-video-card__image--wrap",Q.imageWrapper),children:[O("picture",{className:"v-img bili-video-card__cover",children:[h("source",{srcSet:`${w}@672w_378h_1c.webp`,type:"image/webp"}),h("img",{src:`${w}@672w_378h_1c.webp`,alt:p,loading:"lazy"})]}),s&&h(gv,{item:t,pvideo:S==null?void 0:S.pvideoData,enterCursorState:n}),O("div",{className:`bili-watch-later ${Q.watchLater}`,style:{display:s?"flex":"none"},ref:o,onClick:V,children:[h("svg",{className:"bili-watch-later__icon",children:h("use",{xlinkHref:u?"#widget-watch-save":"#widget-watch-later"})}),h("span",{className:"bili-watch-later__tip",style:{display:a?"block":"none"},children:u?"\u79FB\u9664":"\u7A0D\u540E\u518D\u770B"})]}),f&&O("div",{ref:G,className:Q.btnDislike,onClick:Te,style:{display:s?"flex":"none"},children:[h("svg",{className:Q.btnDislikeIcon,children:h("use",{xlinkHref:"#widget-close"})}),h("span",{className:Q.btnDislikeTip,style:{display:q?"block":"none"},children:"\u6211\u4E0D\u60F3\u770B"})]})]}),h("div",{className:"bili-video-card__mask",children:O("div",{className:"bili-video-card__stats",children:[O("div",{className:"bili-video-card__stats--left",children:[O("span",{className:"bili-video-card__stats--item",children:[h("svg",{className:"bili-video-card__stats--icon",children:h("use",{xlinkHref:"#widget-play-count"})}),h("span",{className:"bili-video-card__stats--text",children:re})]}),h("span",{className:"bili-video-card__stats--item",children:y==="av"?O(We,{children:[h("svg",{className:"bili-video-card__stats--icon",children:h("use",{xlinkHref:"#widget-agree"})}),h("span",{className:"bili-video-card__stats--text",children:Ae})]}):O(We,{children:[h("svg",{className:"bili-video-card__stats--icon",children:h("use",{xlinkHref:"#widget-agree"})}),h("span",{className:"bili-video-card__stats--text",children:Zt})]})})]}),h("span",{className:"bili-video-card__stats__duration",children:De&&$e})]})})]})}),h("div",{className:"bili-video-card__info __scale-disable",children:O("div",{className:"bili-video-card__info--right",children:[h("a",{href:xe,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:h("h3",{className:"bili-video-card__info--tit",title:p,children:p})}),O("p",{className:"bili-video-card__info--bottom",children:[De&&O("a",{className:"bili-video-card__info--owner",href:`//space.bilibili.com/${I}`,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:[F!=null&&F.content?h("span",{className:Q.recommendReason,children:F.content}):h("svg",{className:"bili-video-card__info--owner__up",children:h("use",{xlinkHref:"#widget-up"})}),h("span",{className:"bili-video-card__info--author",children:E}),k&&O("span",{className:"bili-video-card__info--date",children:["\xB7 ",k]})]}),he&&O("a",{className:"bili-video-card__info--owner",href:xe,target:"_blank",children:[h("span",{className:Q.badge,children:P}),h("span",{className:Q.bangumiDesc,children:A})]})]})]})})]})});var Hr={exports:{}},ki={exports:{}},Ut={exports:{}},Y=Ut.exports={},Se,Ce;function Ei(){throw new Error("setTimeout has not been defined")}function Ti(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Se=setTimeout:Se=Ei}catch{Se=Ei}try{typeof clearTimeout=="function"?Ce=clearTimeout:Ce=Ti}catch{Ce=Ti}})();function za(e){if(Se===setTimeout)return setTimeout(e,0);if((Se===Ei||!Se)&&setTimeout)return Se=setTimeout,setTimeout(e,0);try{return Se(e,0)}catch{try{return Se.call(null,e,0)}catch{return Se.call(this,e,0)}}}function Ev(e){if(Ce===clearTimeout)return clearTimeout(e);if((Ce===Ti||!Ce)&&clearTimeout)return Ce=clearTimeout,clearTimeout(e);try{return Ce(e)}catch{try{return Ce.call(null,e)}catch{return Ce.call(this,e)}}}var Re=[],gt=!1,Qe,Ur=-1;function Tv(){!gt||!Qe||(gt=!1,Qe.length?Re=Qe.concat(Re):Ur=-1,Re.length&&Ba())}function Ba(){if(!gt){var e=za(Tv);gt=!0;for(var t=Re.length;t;){for(Qe=Re,Re=[];++Ur<t;)Qe&&Qe[Ur].run();Ur=-1,t=Re.length}Qe=null,gt=!1,Ev(e)}}Y.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];Re.push(new $a(e,t)),Re.length===1&&!gt&&za(Ba)};function $a(e,t){this.fun=e,this.array=t}$a.prototype.run=function(){this.fun.apply(null,this.array)},Y.title="browser",Y.browser=!0,Y.env={},Y.argv=[],Y.version="",Y.versions={};function Ne(){}Y.on=Ne,Y.addListener=Ne,Y.once=Ne,Y.off=Ne,Y.removeListener=Ne,Y.removeAllListeners=Ne,Y.emit=Ne,Y.prependListener=Ne,Y.prependOnceListener=Ne,Y.listeners=function(e){return[]},Y.binding=function(e){throw new Error("process.binding is not supported")},Y.cwd=function(){return"/"},Y.chdir=function(e){throw new Error("process.chdir is not supported")},Y.umask=function(){return 0};var xi;typeof Object.create=="function"?xi=function(t,r){t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:xi=function(t,r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t};const Ha=xi;var xv=/%[sdj%]/g;function vt(e){if(!Vt(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(ke(arguments[r]));return t.join(" ")}for(var r=1,n=arguments,i=n.length,s=String(e).replace(xv,function(a){if(a==="%%")return"%";if(r>=i)return a;switch(a){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch{return"[Circular]"}default:return a}}),o=n[r];r<i;o=n[++r])Gt(o)||!qe(o)?s+=" "+o:s+=" "+ke(o);return s}function Ai(e,t){if(Ee(global.process))return function(){return Ai(e,t).apply(this,arguments)};if(Ut.exports.noDeprecation===!0)return e;var r=!1;function n(){if(!r){if(Ut.exports.throwDeprecation)throw new Error(t);Ut.exports.traceDeprecation?console.trace(t):console.error(t),r=!0}return e.apply(this,arguments)}return n}var Gr={},Oi;function Ua(e){if(Ee(Oi)&&(Oi=Ut.exports.env.NODE_DEBUG||""),e=e.toUpperCase(),!Gr[e])if(new RegExp("\\b"+e+"\\b","i").test(Oi)){var t=0;Gr[e]=function(){var r=vt.apply(null,arguments);console.error("%s %d: %s",e,t,r)}}else Gr[e]=function(){};return Gr[e]}function ke(e,t){var r={seen:[],stylize:Ov};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),Yr(t)?r.showHidden=t:t&&Fi(r,t),Ee(r.showHidden)&&(r.showHidden=!1),Ee(r.depth)&&(r.depth=2),Ee(r.colors)&&(r.colors=!1),Ee(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=Av),Vr(r,e,r.depth)}ke.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},ke.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Av(e,t){var r=ke.styles[t];return r?"\x1B["+ke.colors[r][0]+"m"+e+"\x1B["+ke.colors[r][1]+"m":e}function Ov(e,t){return e}function Lv(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function Vr(e,t,r){if(e.customInspect&&t&&Xt(t.inspect)&&t.inspect!==ke&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return Vt(n)||(n=Vr(e,n,r)),n}var i=Mv(e,t);if(i)return i;var s=Object.keys(t),o=Lv(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),Kt(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return Li(t);if(s.length===0){if(Xt(t)){var a=t.name?": "+t.name:"";return e.stylize("[Function"+a+"]","special")}if(Yt(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(Kr(t))return e.stylize(Date.prototype.toString.call(t),"date");if(Kt(t))return Li(t)}var u="",c=!1,l=["{","}"];if(Pi(t)&&(c=!0,l=["[","]"]),Xt(t)){var f=t.name?": "+t.name:"";u=" [Function"+f+"]"}if(Yt(t)&&(u=" "+RegExp.prototype.toString.call(t)),Kr(t)&&(u=" "+Date.prototype.toUTCString.call(t)),Kt(t)&&(u=" "+Li(t)),s.length===0&&(!c||t.length==0))return l[0]+u+l[1];if(r<0)return Yt(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var d;return c?d=Pv(e,t,r,o,s):d=s.map(function(p){return Mi(e,t,r,o,p,c)}),e.seen.pop(),Rv(d,u,l)}function Mv(e,t){if(Ee(t))return e.stylize("undefined","undefined");if(Vt(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(Ri(t))return e.stylize(""+t,"number");if(Yr(t))return e.stylize(""+t,"boolean");if(Gt(t))return e.stylize("null","null")}function Li(e){return"["+Error.prototype.toString.call(e)+"]"}function Pv(e,t,r,n,i){for(var s=[],o=0,a=t.length;o<a;++o)Ja(t,String(o))?s.push(Mi(e,t,r,n,String(o),!0)):s.push("");return i.forEach(function(u){u.match(/^\d+$/)||s.push(Mi(e,t,r,n,u,!0))}),s}function Mi(e,t,r,n,i,s){var o,a,u;if(u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},u.get?u.set?a=e.stylize("[Getter/Setter]","special"):a=e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),Ja(n,i)||(o="["+i+"]"),a||(e.seen.indexOf(u.value)<0?(Gt(r)?a=Vr(e,u.value,null):a=Vr(e,u.value,r-1),a.indexOf(`
`)>-1&&(s?a=a.split(`
`).map(function(c){return"  "+c}).join(`
`).substr(2):a=`
`+a.split(`
`).map(function(c){return"   "+c}).join(`
`))):a=e.stylize("[Circular]","special")),Ee(o)){if(s&&i.match(/^\d+$/))return a;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+a}function Rv(e,t,r){var n=e.reduce(function(i,s){return s.indexOf(`
`)>=0,i+s.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?r[0]+(t===""?"":t+`
 `)+" "+e.join(`,
  `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function Pi(e){return Array.isArray(e)}function Yr(e){return typeof e=="boolean"}function Gt(e){return e===null}function Ga(e){return e==null}function Ri(e){return typeof e=="number"}function Vt(e){return typeof e=="string"}function Va(e){return typeof e=="symbol"}function Ee(e){return e===void 0}function Yt(e){return qe(e)&&Ni(e)==="[object RegExp]"}function qe(e){return typeof e=="object"&&e!==null}function Kr(e){return qe(e)&&Ni(e)==="[object Date]"}function Kt(e){return qe(e)&&(Ni(e)==="[object Error]"||e instanceof Error)}function Xt(e){return typeof e=="function"}function Ya(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}function Ka(e){return Buffer.isBuffer(e)}function Ni(e){return Object.prototype.toString.call(e)}function Di(e){return e<10?"0"+e.toString(10):e.toString(10)}var Nv=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Dv(){var e=new Date,t=[Di(e.getHours()),Di(e.getMinutes()),Di(e.getSeconds())].join(":");return[e.getDate(),Nv[e.getMonth()],t].join(" ")}function Xa(){console.log("%s - %s",Dv(),vt.apply(null,arguments))}function Fi(e,t){if(!t||!qe(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}function Ja(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Fv=kh(Object.freeze(Object.defineProperty({__proto__:null,format:vt,deprecate:Ai,debuglog:Ua,inspect:ke,isArray:Pi,isBoolean:Yr,isNull:Gt,isNullOrUndefined:Ga,isNumber:Ri,isString:Vt,isSymbol:Va,isUndefined:Ee,isRegExp:Yt,isObject:qe,isDate:Kr,isError:Kt,isFunction:Xt,isPrimitive:Ya,isBuffer:Ka,log:Xa,inherits:Ha,_extend:Fi,default:{inherits:Ha,_extend:Fi,log:Xa,isBuffer:Ka,isPrimitive:Ya,isFunction:Xt,isError:Kt,isDate:Kr,isObject:qe,isRegExp:Yt,isUndefined:Ee,isSymbol:Va,isString:Vt,isNumber:Ri,isNullOrUndefined:Ga,isNull:Gt,isBoolean:Yr,isArray:Pi,inspect:ke,deprecate:Ai,format:vt,debuglog:Ua}},Symbol.toStringTag,{value:"Module"}))).format;function jv(){(typeof AbortController>"u"||typeof AbortSignal>"u")&&console.error("[promise.timeout] need global AbortController & AbortSingal")}function Iv(e,t){return function(){var r=this,n=[].slice.call(arguments);jv();var i=new AbortController;return n.push(i.signal),new Promise(function(s,o){var a=setTimeout(function(){var u=new Xr(t);o(u),i.abort()},t);Promise.resolve(e.apply(r,n)).then(function(u){clearTimeout(a),s(u)},function(u){clearTimeout(a),o(u)})})}}class Xr extends Error{constructor(t){super(),this.timeout=t,this.message=Fv("timeout of %sms exceed",t),Error.captureStackTrace(this,Xr)}}ki.exports=Iv,ki.exports.TimeoutError=Xr;const Za=ki.exports,Wv=Za.TimeoutError;Hr.exports=function(t,r){const n=t;r=r||{};const i=r.times||5,s=r.timeout;s&&(t=Za(t,s));const o=r.onerror;return async function(){const a=this,u=[].slice.call(arguments),c=new Array(i);for(let l=0;l<i;l++){let f,d;try{f=await t.apply(a,u)}catch(p){d=p}if(!d)return f;if(d instanceof TypeError)throw d;if(d instanceof zv)throw d.originalError;c[l]=d,o&&o(d,l)}throw new Qa({times:i,timeout:s,fn:n,errors:c})}};class Qa extends Error{constructor(t){super(),this.times=t.times,this.timeout=t.timeout,this.fn=t.fn,this.errors=t.errors,this.name="RetryError",this.message=`tried function ${this.fn.name||"<anonymous>"} ${this.times} times`,this.timeout&&(this.message+=` with timeout = ${this.timeout}ms`),Error.captureStackTrace(this,this.constructor)}}class zv extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}}var Bv=Hr.exports.RetryError=Qa;Hr.exports.TimeoutError=Wv;const ji="bilibili-app-recommend";class Ii extends Error{constructor(r){super();Zr(this,"json");Error.captureStackTrace(this,Ii),this.json=r,this.message=r.message||JSON.stringify(r)}}async function $v(){const t=(await jr.get(La+"/x/feed/index",{responseType:"json",params:{build:"1",mobi_app:"android",idx:(Date.now()/1e3).toFixed(0)+"0"+(Math.random()*10).toFixed(0)}})).data;if(!t.data){if(t.code===-663)throw new Ii(t);return le(`${ji}: \u672A\u77E5\u9519\u8BEF, \u8BF7\u8054\u7CFB\u5F00\u53D1\u8005

  code=${t.code} message=${t.message||""}`,"5s"),[]}return t.data}const Hv=Hr.exports($v,{times:5,timeout:2e3,onerror(e,t){console.info("[%s] tryGetRecommend onerror: index=%s",ji,t,e)}});async function qa(){try{return await Hv()}catch(e){if(e instanceof Bv){console.error(e.errors);const t=[vt("\u8BF7\u6C42\u51FA\u9519, \u5DF2\u91CD\u8BD5%s\u6B21:",e.times),...e.errors.map((r,n)=>vt("  %s) %s",n+1,r.message)),"","\u8BF7\u91CD\u65B0\u83B7\u53D6 access_key \u540E\u91CD\u8BD5~"].join(`
`);le(t,"5s")}throw e}}async function Uv(){return Wi(2)}async function Wi(e){let t=[];if(ne.getRecommendParallelRequest){const r=new Array(e).fill(0).map(i=>qa());t=(await Promise.all(r)).reduce((i,s)=>i.concat(s||[]),[])}else for(let r=1;r<=e;r++)t=t.concat(await qa());return t=Gv(t),t.map(r=>({...r,uniqId:r.param+"-"+crypto.randomUUID()}))}function Gv(e){const t=new Set;return e=e.filter(r=>{const{param:n}=r;return t.has(n)?(console.log("[%s]: [uniqRecList]: duplicate",ji,r),!1):(t.add(n),!0)}),e}var oe={exports:{}},Vv="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Yv=Vv,Kv=Yv;function ec(){}function tc(){}tc.resetWarningCache=ec;var Xv=function(){function e(n,i,s,o,a,u){if(u!==Kv){var c=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 c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var r={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:tc,resetWarningCache:ec};return r.PropTypes=r,r};oe.exports=Xv();class zi extends g.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 r={get passive(){t=!0}};try{document.addEventListener("test",null,r),document.removeEventListener("test",null,r)}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 r=this.props.getScrollParent&&this.props.getScrollParent();return r!=null?r:t&&t.parentNode}filterProps(t){return t}attachScrollListener(){const t=this.getParentElement(this.scrollComponent);if(!this.props.hasMore||!t)return;let r=window;this.props.useWindow===!1&&(r=t),r.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),r.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),r.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,r=window,n=this.getParentElement(t);let i;if(this.props.useWindow){const s=document.documentElement||document.body.parentNode||document.body,o=r.pageYOffset!==void 0?r.pageYOffset:s.scrollTop;this.props.isReverse?i=o:i=this.calculateOffset(t,o)}else this.props.isReverse?i=n.scrollTop:i=t.scrollHeight-n.scrollTop-n.clientHeight;i<Number(this.props.threshold)&&t&&t.offsetParent!==null&&(this.detachScrollListener(),this.beforeScrollHeight=n.scrollHeight,this.beforeScrollTop=n.scrollTop,typeof this.props.loadMore=="function"&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}calculateOffset(t,r){return t?this.calculateTopPosition(t)+(t.offsetHeight-r-window.innerHeight):0}calculateTopPosition(t){return t?t.offsetTop+this.calculateTopPosition(t.offsetParent):0}render(){const t=this.filterProps(this.props),{children:r,element:n,hasMore:i,initialLoad:s,isReverse:o,loader:a,loadMore:u,pageStart:c,ref:l,threshold:f,useCapture:d,useWindow:p,getScrollParent:m,...y}=t;y.ref=C=>{this.scrollComponent=C,l&&l(C)};const v=[r];return i&&(a?o?v.unshift(a):v.push(a):this.defaultLoader&&(o?v.unshift(this.defaultLoader):v.push(this.defaultLoader))),ae.default.createElement(n,y,v)}}Zr(zi,"propTypes",{children:oe.exports.node.isRequired,element:oe.exports.node,hasMore:oe.exports.bool,initialLoad:oe.exports.bool,isReverse:oe.exports.bool,loader:oe.exports.node,loadMore:oe.exports.func.isRequired,pageStart:oe.exports.number,ref:oe.exports.func,getScrollParent:oe.exports.func,threshold:oe.exports.number,useCapture:oe.exports.bool,useWindow:oe.exports.bool}),Zr(zi,"defaultProps",{element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null});const Bi="_video-grid_14t5i_9",rc="_limit-two-lines_14t5i_19",$i="_internal-testing_14t5i_43",Jv="_limit-one-line_14t5i_50",nc="_narrow-mode_14t5i_71",cb={videoGrid:Bi,limitTwoLines:rc,internalTesting:$i,limitOneLine:Jv,narrowMode:nc};function Zv({enabled:e,refresh:t,minIndex:r=0,maxIndex:n,containerRef:i,getScrollerRect:s,openDislikeAt:o,changeScrollY:a}){const[u,c]=g.useState(null),l=H(()=>{var k;if(u===null||!i.current)return!1;const P=s(),F=(k=i.current.querySelector(`.${yt.card}.${yt.cardActive}`))==null?void 0:k.getBoundingClientRect();return!(!P||!F||F.top-P.top<-(P.height+F.height)||F.top-P.top>P.height*2+F.height)}),f=H((P,F)=>{if(!e)return;F==null||F.preventDefault();const k=l()?u+P:x();if(k<r){R(r);return}if(k>n){R(n);return}c(k),R(k)}),d=g.useCallback(P=>{f(-1,P)},[]),p=g.useCallback(P=>{f(1,P)},[]);we("leftarrow",d),we("rightarrow",p);const m=g.useCallback(P=>{f(-j(),P)},[]),y=g.useCallback(P=>{f(j(),P)},[]);we("uparrow",m),we("downarrow",y);const v=H(()=>{!e||c(null)}),C=H(()=>{!e||typeof u!="number"||I(u)}),M=H(()=>{!e||typeof u!="number"||o(u)});we("esc",v),we("enter",C),we("backspace",M);const A=H(()=>{!e||t()});we("r",A,{exactMatch:!0});function x(){const P=s();if(!P)return 0;const F=b();for(let k=0;k<F.length;k++)if(F[k].getBoundingClientRect().top>=P.top)return k;return 0}const _=`.${yt.card}`;function b(){var P;return[...((P=i.current)==null?void 0:P.querySelectorAll(_))||[]]}function E(P){return b()[P]}function R(P){var S;const F=E(P);(S=F==null?void 0:F.scrollIntoViewIfNeeded)==null||S.call(F,!1);const k=s(),w=F.getBoundingClientRect();if(!(!k||!w)){if(w.top<=k.top){const L=-(k.top-w.top+10);a==null||a({offset:L});return}if(k.bottom-w.bottom<10){const L=10-(k.bottom-w.bottom);a==null||a({offset:L});return}}}function I(P){const F=E(P);if(!F)return;const k=F.querySelector(".bili-video-card__wrap > a");k==null||k.click()}function j(){if(ne.useNarrowMode)return 2;let P=ic.get(window.innerWidth);if(P)return P;const F=i.current;if(!F)return 0;const k=window.getComputedStyle(F);return k.display!=="grid"?0:(P=k.gridTemplateColumns.split(" ").length,ic.set(window.innerWidth,P),P)}return{activeIndex:u,clearActiveIndex:v}}const ic=new Map,yt={loader:ri`
    text-align: center;
    line-height: 60px;
    font-size: 120%;
  `,card:ri`
    border: 2px solid transparent;

    /* global class under .card */
    .bili-video-card__info {
      padding-left: 2px;
      padding-bottom: 1px;
      margin-top: calc(var(--info-margin-top) - 1px);
    }
  `,cardActive:ri`
    border-color: #fb7299;
    border-radius: 6px;
    overflow: hidden;
  `},sc=g.forwardRef(({infiteScrollUseWindow:e,shortcutEnabled:t,onScrollToTop:r,className:n,scrollerRef:i},s)=>{const[o,a]=g.useState([]),[u,c]=g.useState(!1);g.useImperativeHandle(s,()=>({refresh:l}));const l=H(async()=>{await(r==null?void 0:r());try{C(),c(!0),a(await Wi(2)),C()}finally{c(!1)}}),f=H(async A=>{const x=await Wi(2);a(_=>[..._,...x])}),{useNarrowMode:d}=Ie(),p=g.useRef(null),m=H(()=>{var A;if(e){const x=bo+50;return new DOMRect(0,x,window.innerWidth,window.innerHeight-x)}else return(A=i==null?void 0:i.current)==null?void 0:A.getBoundingClientRect()}),y=hv(),{activeIndex:v,clearActiveIndex:C}=Zv({enabled:t&&!y,refresh:l,maxIndex:o.length-1,containerRef:p,getScrollerRect:m,openDislikeAt(A){Wa(o[A])},changeScrollY:e?function({offset:A,absolute:x}){const _=document.documentElement;if(typeof A=="number"){_.scrollTop+=A;return}if(typeof x=="number"){_.scrollTop=x;return}}:void 0}),M=At();return h(zi,{pageStart:0,loadMore:f,hasMore:!0,useWindow:e,threshold:360,style:{minHeight:"100%"},loader:h("div",{className:yt.loader,children:"\u52A0\u8F7D\u4E2D..."},0),children:h("div",{ref:p,className:X(Bi,{[$i]:M},{[nc]:d},n),children:o.map((A,x)=>h(Ci,{loading:u,item:A,className:X(yt.card,{[yt.cardActive]:x===v})},A.uniqId))})})}),Qv={checkbox:"_checkbox_5cp8u_1"};async function qv(){var u,c;const t=(await Qr.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(!((u=t==null?void 0:t.data)!=null&&u.has_login))return{errmsg:"\u4F60\u5FC5\u987B\u767B\u5F55B\u7AD9\u4E4B\u540E\u624D\u80FD\u4F7F\u7528\u6388\u6743",json:t};if(!((c=t==null?void 0:t.data)!=null&&c.confirm_uri))return{errmsg:"\u65E0\u6CD5\u83B7\u5F97\u6388\u6743\u7F51\u5740",json:t};const r=t.data.confirm_uri;let n;const i=new Promise(l=>{window.addEventListener("message",f=>{if(f.origin!="https://www.mcbbs.net"||!f.data)return;const d=f.data.match(/access_key=([0-9a-z]{32})/);if(!d||!d[1])return l({errmsg:"\u6CA1\u6709\u83B7\u5F97\u5339\u914D\u7684\u5BC6\u94A5"});l(d[1])}),n=setTimeout(()=>{l({errmsg:"\u83B7\u53D6\u6388\u6743\u8D85\u65F6"})},10*1e3)}),s=document.createElement("iframe");s.src=r,s.style.display="none",document.body.appendChild(s);function o(){s.remove(),n&&(clearTimeout(n),n=null)}const a=await i;return o(),a}async function ey(){const e=await qv();if(typeof e=="object"&&"errmsg"in e){le(e.errmsg);return}const t=e;return ne.accessKey=t,le("\u83B7\u53D6\u6210\u529F"),t}function ty(){ne.accessKey="",le("\u5DF2\u5220\u9664 access_key")}function Hi(){const e=g.useRef(null),{accessKey:t}=Ie(),r=_a(ey,{manual:!0}),n=H(async()=>{var a;await r.runAsync()&&((a=e.current)==null||a.set(!1))}),i=ty,s=H(()=>{const o="https://github.com/indefined/UserScripts/tree/master/bilibiliHome#%E6%8E%88%E6%9D%83%E8%AF%B4%E6%98%8E";window.open(o,"_blank")});return h(We,{children:t?O(We,{children:[h("button",{className:"primary-btn roll-btn",onClick:s,children:h("span",{children:"access_key \u8BF4\u660E"})}),h("button",{className:"primary-btn roll-btn",onClick:()=>n(),disabled:r.loading,children:h("span",{children:"\u91CD\u65B0\u83B7\u53D6 access_key"})}),h("button",{className:"primary-btn roll-btn",onClick:i,children:h("span",{children:"\u5220\u9664 access_key"})})]}):O(We,{children:[h("button",{className:"primary-btn roll-btn",onClick:s,children:h("span",{children:"access_key \u8BF4\u660E"})}),h("button",{className:"primary-btn roll-btn",onClick:n,disabled:r.loading,children:h("span",{children:"\u83B7\u53D6 access_key"})})]})})}const Ui={container:{name:"8irbms",styles:"display:inline-flex;align-items:center"},checkbox:{name:"4l4ubo",styles:"cursor:pointer;outline:none"},label:{name:"side0b",styles:"margin-left:2px;user-select:none;cursor:pointer"}};function bt({configKey:e,label:t,className:r}){const i=!!Ie()[e],s=g.useCallback(a=>{const u=a.target.checked;ho({[e]:u}),u&&e==="initialShowMore"&&le("\u5DF2\u5F00\u542F\u81EA\u52A8\u67E5\u770B\u66F4\u591A: \u4E0B\u6B21\u6253\u5F00\u9996\u9875\u65F6\u5C06\u76F4\u63A5\u5C55\u793A\u63A8\u8350\u5F39\u6846")},[]),o=g.useId();return O("span",{css:Ui.container,className:r,children:[h("input",{type:"checkbox",id:o,checked:i,onChange:s,css:Ui.checkbox}),h("label",{htmlFor:o,css:Ui.label,children:t||e})]})}var ry={name:"1qkltea",styles:"margin-left:5px"};const ny=function(){const e=ry;return O(We,{children:[h(bt,{configKey:"initialShowMore",label:"\u81EA\u52A8\u67E5\u770B\u66F4\u591A",css:e}),h(bt,{configKey:"useNarrowMode",label:"\u542F\u7528\u5C45\u4E2D\u6A21\u5F0F(\u5C45\u4E2D\u4E24\u5217)",css:e})]})},J={configIcon:"_config-icon_1jab1_1",settingsGroup:"_settings-group_1jab1_6",settingsGroupTitle:"_settings-group-title_1jab1_9",settingsGroupContent:"_settings-group-content_1jab1_12",row:"_row_1jab1_18",check:"_check_1jab1_22"};async function oc(){le("\u5373\u5C06\u5237\u65B0\u7F51\u9875"),await xt.exports(500),location.reload()}function iy(){if(!!window.confirm("\u786E\u5B9A?"))return $h(),oc()}function sy({show:e,onHide:t}){const r=g.useId(),{pureRecommend:n}=Ie();return O(di,{show:e,onHide:t,hideWhenMaskOnClick:!0,hideWhenEsc:!0,children:[O("div",{className:de.modalHeader,children:[O("div",{className:de.modalTitle,children:[h(ct,{name:"Config",className:J.configIcon}),"\u8BBE\u7F6E\u9879"]}),h("div",{className:"space",style:{flex:1}}),h(hi,{onClick:t})]}),O("main",{className:de.modalBody,children:[O("div",{className:J.settingsGroup,children:[h("div",{className:J.settingsGroupTitle,children:"Auth"}),h("div",{className:X(J.settingsGroupContent,J.row),children:h(Hi,{})})]}),O("div",{className:J.settingsGroup,children:[h("div",{className:J.settingsGroupTitle,children:"\u5F00\u5173"}),O("div",{className:X(J.settingsGroupContent,J.row),children:[h("input",{type:"checkbox",className:Qv.checkbox,id:r,checked:n,onChange:i=>(ne.pureRecommend=i.target.checked,oc())}),h("label",{htmlFor:r,children:"\u5F00\u542F\u7EAF\u63A8\u8350\u6A21\u5F0F"}),h(bt,{configKey:"initialShowMore",label:"\u81EA\u52A8\u67E5\u770B\u66F4\u591A",className:J.check}),h(bt,{configKey:"useNarrowMode",label:"\u542F\u7528\u5C45\u4E2D\u6A21\u5F0F(\u5C45\u4E2D\u4E24\u5217)",className:J.check})]})]}),O("div",{className:J.settingsGroup,children:[h("div",{className:J.settingsGroupTitle,children:"\u9AD8\u7EA7"}),O("div",{className:X(J.settingsGroupContent),children:[h("div",{className:J.row,children:h("button",{className:"primary-btn roll-btn",style:{display:"inline-flex"},onClick:iy,children:h("span",{children:"\u6062\u590D\u9ED8\u8BA4\u8BBE\u7F6E"})})}),h("div",{className:J.row,style:{marginTop:10},children:h(bt,{configKey:"openInIINAWhenRightClick",label:"\u53F3\u952E\u5728 IINA \u4E2D\u6253\u5F00",className:J.check})}),h("div",{className:J.row,style:{marginTop:10},children:h(bt,{configKey:"getRecommendParallelRequest",label:"\u63A8\u8350\u63A5\u53E3\u4F7F\u7528\u5E76\u884C\u8BF7\u6C42",className:J.check})})]})]})]})]})}const ac={expandBtn:"_expand-btn_wdzp9_1",expanded:"_expanded_wdzp9_12"},cc=g.forwardRef(function({children:t},r){const[n,i]=wa(!1);g.useImperativeHandle(r,()=>i,[i]);const s=h("button",{className:X("primary-btn",ac.expandBtn),onClick:i.toggle,children:h("svg",{className:X({[ac.expanded]:n}),children:h("use",{xlinkHref:"#widget-arrow"})})});return O(We,{children:[s,n&&t]})}),Jt={modalMask:"_modal-mask_1as61_1",narrowMode:"_narrow-mode_1as61_1",modal:"_modal_1as61_1",modalHeader:"_modal-header_1as61_21",modalBody:"_modal-body_1as61_22",btnRefresh:"_btn-refresh_1as61_25"},oy=g.memo(function({show:t,onHide:r}){const n=g.useRef(null),i=g.useRef(null),{useNarrowMode:s}=Ie(),o=g.useMemo(()=>({[Jt.narrowMode]:s}),[s]),a=H(()=>{var c;return(c=i.current)==null?void 0:c.refresh()}),u=H(()=>{n.current&&(n.current.scrollTop=0)});return O(di,{show:t,onHide:r,clsModalMask:X(o),clsModal:X(Jt.modal,o),children:[O("div",{className:X(de.modalHeader,Jt.modalHeader),children:[h("div",{className:de.modalTitle,children:"\u63A8\u8350"}),h("div",{className:"space",style:{flex:1}}),h(cc,{children:h(ny,{})}),O("button",{className:`primary-btn roll-btn ${Jt.btnRefresh}`,onClick:a,children:[h("svg",{children:h("use",{xlinkHref:"#widget-roll"})}),h("span",{children:"\u6362\u4E00\u6362"})]}),h(hi,{onClick:r})]}),h("div",{className:X(de.modalBody,Jt.modalBody),ref:n,children:h(sc,{ref:i,shortcutEnabled:t,onScrollToTop:u,infiteScrollUseWindow:!1,scrollerRef:n})})]})});var Gi={};Object.defineProperty(Gi,"__esModule",{value:!0});var uc=Gi.useSticky=void 0;const Vi=ae.default;function ay(){const e=(0,Vi.useRef)(null),[t,r]=(0,Vi.useState)(!1);return(0,Vi.useEffect)(()=>{function n(){if(!e.current)return;const i=e.current.getBoundingClientRect().top,s=parseInt(getComputedStyle(e.current).top),o=i<=s;o&&!t?r(!0):!o&&t&&r(!1)}return n(),document.addEventListener("scroll",n),window.addEventListener("resize",n),window.addEventListener("orientationchange",n),()=>{document.removeEventListener("scroll",n),window.removeEventListener("resize",n),window.removeEventListener("orientationchange",n)}},[t]),[e,t]}uc=Gi.useSticky=ay;const lc={btn:ut`
    padding: 0;
    width: 31px;
    height: 31px;
    border-radius: 50%;
  `,icon:ut`
    svg {
      width: 14px;
      height: 14px;
    }
  `},Jr=nt({showMore:ne.initialShowMore}),cy=function(){return it(Jr)},uy=()=>{Jr.showMore=!0},ly=()=>{Jr.showMore=!1};function fc({onRefresh:e}){const{accessKey:t,pureRecommend:r}=Ie(),n=g.useRef(null),{showMore:i}=it(Jr),[s,o]=g.useState(!1),a=g.useCallback(()=>{o(!0)},[]),u=g.useCallback(()=>{o(!1)},[]),[c,l]=uc();return Rn(),O(We,{children:[O("div",{ref:c,className:"area-header",css:[ut`
            margin-bottom: 0;
            height: 50px;
          `,r&&ut`
              position: sticky;
              top: ${bo}px;
              z-index: 1000;
            `,r&&l&&ut`
              background-color: var(--bg1_float);
              box-shadow: 0 2px 4px rgb(0 0 0 / 8%);
            `,"",""],children:[O("div",{className:"left",children:[h("a",{id:"\u5F71\u89C6",className:"the-world area-anchor","data-id":"25"}),h("svg",{className:"icon",children:h("use",{xlinkHref:"#channel-cinephile"})}),h("a",{className:"title",href:"#",children:h("span",{children:"\u63A8\u8350"})})]}),O("div",{className:"right",children:[h("button",{className:"primary-btn",css:lc.btn,onClick:a,children:h(ct,{name:"Config",css:lc.icon})}),t?h(cc,{ref:n,children:h(Hi,{})}):h(Hi,{}),O("button",{className:"primary-btn roll-btn",onClick:e,children:[h("svg",{style:{transform:"rotate(0deg)"},children:h("use",{xlinkHref:"#widget-roll"})}),h("span",{children:"\u6362\u4E00\u6362"})]}),O("button",{className:"primary-btn see-more",onClick:uy,children:[h("span",{children:"\u67E5\u770B\u66F4\u591A"}),h("svg",{children:h("use",{xlinkHref:"#widget-arrow"})})]})]})]}),h(oy,{show:i,onHide:ly}),h(sy,{show:s,onHide:u})]})}const fy={grid:ut`
    /* card=299 col-gap=20  */
    width: ${299*2+20}px;
    margin: 0 auto;
  `};function dy(){const{useNarrowMode:e}=Ie(),{showMore:t}=cy(),r=g.useRef(null),n=H(()=>{var s;return(s=r.current)==null?void 0:s.refresh()}),i=H(()=>{document.documentElement.scrollTop=0});return O("section",{"data-area":"\u63A8\u8350",children:[h(fc,{onRefresh:n}),h(sc,{ref:r,css:[e&&fy.grid,"",""],shortcutEnabled:!t,infiteScrollUseWindow:!0,onScrollToTop:i})]})}function hy(){const e=g.useMemo(()=>new Array(20).fill(0).map(()=>crypto.randomUUID()),[]),{data:t,loading:r,error:n,refresh:i}=_a(Uv);n&&console.error(n.stack||n);const s=At();return O("section",{"data-area":"\u63A8\u8350",children:[h(fc,{onRefresh:i}),h("div",{className:X(Bi,rc,{[$i]:s}),style:{marginBottom:s?30:0},children:r||n?e.map(o=>h(Ci,{},o)):t.map(o=>h(Ci,{item:o},o.uniqId))})]})}const py=10*1e3,my=200;async function dc(e,t){let r=[];const n=()=>{r=Array.from(document.querySelectorAll(e))};n();const i=performance.now();for(;!r.length&&performance.now()-i<py;)await xt.exports(my),n();if(!r.length){console.log("[bilibili-app-recommend]: tryAction timeout, selector = %s",e);return}for(const s of r)await Promise.resolve(t(s))}function Yi(e){return dc(e,t=>t.remove())}(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 gy()})();async function gy(){return Yi(".adblock-tips"),dc("html.gray",e=>e.classList.remove("gray")),ne.pureRecommend?yy():vy()}async function vy(){const t=Date.now()+1e4;let r=null;for(;;){if(document.querySelector(".bili-layout > section.bili-grid")){r=document.querySelector(".bili-layout > section.bili-grid");break}if(At()&&document.querySelector(".recommended-container")){r=document.querySelector(".recommended-container");break}if(Date.now()>t)break;await xt.exports(100)}if(!r){console.error("[bilibili-app-recommend]: init fail");return}const n=document.createElement("section");r.insertAdjacentElement("afterend",n),ar(n).render(h(hy,{}))}async function yy(){var i,s;At()?((i=document.querySelector(".bili-feed4 .bili-feed4-layout"))==null||i.remove(),Yi(".bili-feed4 .header-channel")):((s=document.querySelector(".bili-layout"))==null||s.remove(),Yi(".bili-footer"));const e=document.createElement("div");e.classList.add(At()?"bili-feed4-layout":"bili-layout","pure-recommend");const t=document.querySelector(".bili-header");t==null||t.insertAdjacentElement("afterend",e);const r=document.createElement("section");e==null||e.appendChild(r),ar(r).render(h(dy,{}))}})(React,ReactDOM,axios,axiosGmxhrAdapter);