Bilibili 自定义首页
// ==UserScript==
// @name Bilibili-Gate
// @namespace https://magicdawn.fun
// @version 0.34.1
// @author magicdawn
// @description Bilibili 自定义首页
// @license MIT
// @icon https://www.bilibili.com/favicon.ico
// @homepageURL https://greasyfork.org/zh-CN/scripts/443530-bilibili-gate
// @supportURL https://github.com/magicdawn/Bilibili-Gate/issues
// @match https://www.bilibili.com/
// @match https://www.bilibili.com/?*
// @match https://www.bilibili.com/index.html
// @match https://www.bilibili.com/index.html?*
// @match https://www.bilibili.com/video/*
// @match https://www.bilibili.com/list/watchlater?*
// @match https://www.bilibili.com/bangumi/play/*
// @match https://space.bilibili.com/*
// @match https://search.bilibili.com/*
// @require https://registry.npmmirror.com/axios/0.30.0/files/dist/axios.min.js
// @require https://registry.npmmirror.com/react/18.3.1/files/umd/react.production.min.js
// @require https://registry.npmmirror.com/react-dom/18.3.1/files/umd/react-dom.production.min.js
// @require https://registry.npmmirror.com/ua-parser-js/1.0.40/files/dist/ua-parser.min.js
// @require https://registry.npmmirror.com/framer-motion/12.23.26/files/dist/framer-motion.js
// @require https://registry.npmmirror.com/localforage/1.10.0/files/dist/localforage.min.js
// @require https://registry.npmmirror.com/pinyin-match/1.2.10/files/dist/main.js
// @require https://registry.npmmirror.com/spark-md5/3.0.2/files/spark-md5.min.js
// @tag bilibili
// @connect app.bilibili.com
// @grant GM.deleteValue
// @grant GM.getValue
// @grant GM.listValues
// @grant GM.openInTab
// @grant GM.registerMenuCommand
// @grant GM.setClipboard
// @grant GM.setValue
// @grant GM.xmlHttpRequest
// @grant GM_addStyle
// @grant GM_addValueChangeListener
// @grant GM_download
// @grant GM_info
// @grant unsafeWindow
// @run-at document-body
// ==/UserScript==
(async function (f, ST, L0, sparkMd5, ox, framerMotion, IT, PT) {
'use strict';
function _interopNamespaceDefault(e) {
const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
if (e) {
for (const k in e) {
if (k !== 'default') {
const d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: () => e[k]
});
}
}
}
n.default = e;
return Object.freeze(n);
}
const f__namespace = /*#__PURE__*/_interopNamespaceDefault(f);
const d=new Set;const pT = async e=>{d.has(e)||(d.add(e),(t=>{typeof GM_addStyle=="function"?GM_addStyle(t):(document.head||document.documentElement).appendChild(document.createElement("style")).append(t);})(e));};
pT(' @charset "UTF-8";._cls-gate-video-grid-divider_kgj54_1 .ant-divider-inner-text{display:inline-flex;align-items:center;min-height:30px}._cls-gate-video-grid-divider_kgj54_1 .ant-divider-inner-text a{color:var(--ant-color-link)}._cls-gate-video-grid-divider_kgj54_1 .ant-divider-inner-text a:hover{color:var(--ant-color-primary)}._video-grid_131wu_2{display:grid;position:relative;width:100%;grid-gap:20px 12px;grid-template-columns:repeat(var(--col),minmax(0,1fr));--bilibili-gate--video-card--border-radius: 15px}._video-grid-center-empty_131wu_11:before{content:"";grid-column:3/-3;grid-row:1/span 9999;grid-auto-flow:dense}._video-grid-bili-feed4_131wu_22{grid-gap:20px 20px}._video-grid-bili-feed4_131wu_22 .ant-divider-horizontal.ant-divider-with-text{margin-bottom:-15px;margin-top:-15px}._video-grid-bili-feed4_131wu_22 .ant-divider-horizontal.ant-divider-with-text:first-of-type{margin-top:0}@media(max-width:1399px){._video-grid-bili-feed4_131wu_22{--col: 4}._video-grid-bili-feed4_131wu_22._limit-one-line_131wu_37>*:nth-of-type(n+5){display:none!important}._video-grid-bili-feed4_131wu_22._limit-two-lines_131wu_40>*:nth-of-type(n+9){display:none!important}}@media(min-width:1400px){._video-grid-bili-feed4_131wu_22{--col: 5}._video-grid-bili-feed4_131wu_22._limit-one-line_131wu_37>*:nth-of-type(n+6){display:none!important}._video-grid-bili-feed4_131wu_22._limit-two-lines_131wu_40>*:nth-of-type(n+11){display:none!important}}._video-grid-container_131wu_58{container-type:inline-size}._video-grid-container_131wu_58._virtual-grid-enabled_131wu_61 .virtuoso-grid-item{padding-bottom:var(--row-gap)}._video-grid-container_131wu_58._virtual-grid-enabled_131wu_61 .virtuoso-grid-item .bili-video-card{margin-bottom:0;height:100%}._video-grid-custom_131wu_69{--col: 4;column-gap:20px;row-gap:0;--row-gap: clamp(20px, 1.4vw, 40px)}._video-grid-custom_131wu_69 .bili-video-card{margin-bottom:var(--row-gap)}._video-grid-custom_131wu_69 .ant-divider-horizontal.ant-divider-with-text{margin-top:calc(10px - var(--row-gap));margin-bottom:5px}._video-grid-custom_131wu_69 .ant-divider-horizontal.ant-divider-with-text:first-of-type{margin-top:0}@container (width >= 1730px){._video-grid_131wu_2._video-grid-custom_131wu_69{--col: 5}}@container (width >= 2080px){._video-grid_131wu_2._video-grid-custom_131wu_69{--col: 6}}@container (width >= 2430px){._video-grid_131wu_2._video-grid-custom_131wu_69{--col: 7}}._narrow-mode_131wu_104{--col: 2 !important}*,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.icon-only-round-button{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:50%;padding:0}.inline-icon-only-round-button{width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;padding:0}.flex-center{display:flex;align-items:center;justify-content:center}.flex-v-center{display:flex;align-items:center}.inline-flex-center{display:inline-flex;align-items:center;justify-content:center}.\\[refresh\\:scroll\\]{refresh:scroll}.pointer-events-auto{pointer-events:auto}.\\[\\&_svg\\]\\:pointer-events-none svg,.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.absolute{position:absolute}.fixed{position:fixed}.position-relative,.relative{position:relative}.sticky{position:sticky}.static{position:static}.inset-0{inset:0}.inset-x-0{left:0;right:0}.bottom--6px{bottom:-6px}.bottom-0{bottom:0}.left--2px{left:-2px}.left-0{left:0}.left-50\\%{left:50%}.left-8px{left:8px}.right-\\[calc\\(8px\\+28px\\+5px\\)\\]{right:41px}.right-0{right:0}.right-10px{right:10px}.right-8px{right:8px}.top--1px,.top-\\[-1px\\]{top:-1px}.top-\\[-0\\.5px\\]{top:-.5px}.top-0{top:0}.top-0\\.5px{top:.5px}.top-10px{top:10px}.top-1px{top:1px}.top-4px{top:4px}.top-50\\%{top:50%}.top-8px{top:8px}.z-10000{z-index:10000}.z-2{z-index:2}.z-3{z-index:3}.z-4{z-index:4}.z-5{z-index:5}.z-6{z-index:6}.z-9999{z-index:9999}.z-gate-base-modal{z-index:var(--bilibili-gate--z-base-modal)}.z-gate-rec-header{z-index:var(--bilibili-gate--z-rec-header)}.z-gate-toast{z-index:var(--bilibili-gate--z-toast)}.order--10{order:-10}.grid{display:grid}.grid-col-span-full{grid-column:1/-1}.grid-cols-\\[250px_1fr\\]{grid-template-columns:250px 1fr}.grid-cols-\\[repeat\\(2\\,max-content\\)_1fr\\]{grid-template-columns:repeat(2,max-content) 1fr}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.m10{margin:40px}.m13{margin:52px}.m14{margin:56px}.m15{margin:60px}.m16{margin:64px}.m16\\.52{margin:66.08px}.m160{margin:640px}.m19{margin:76px}.m19\\.833{margin:79.332px}.m239\\.82{margin:959.28px}.m24{margin:96px}.m29\\.756{margin:119.024px}.m33{margin:132px}.m434\\.8{margin:1739.2px}.m5{margin:20px}.m8{margin:32px}.m9{margin:36px}.\\[\\&\\.ant-empty-normal\\]\\:my-5px.ant-empty-normal,.my-5px{margin-top:5px;margin-bottom:5px}.mx-0{margin-left:0;margin-right:0}.mx-1,.mx-4px{margin-left:4px;margin-right:4px}.mx-5px{margin-left:5px;margin-right:5px}.mx-auto{margin-left:auto;margin-right:auto}.my-0{margin-top:0;margin-bottom:0}.my-1{margin-top:4px;margin-bottom:4px}.my-2px{margin-top:2px;margin-bottom:2px}.my-7px{margin-top:7px;margin-bottom:7px}.\\[\\&_svg\\]\\:mr-5px svg,.mr-5px{margin-right:5px}.\\[\\&_svg\\]\\:mt--1px svg,.mt--1px{margin-top:-1px}.mb-0{margin-bottom:0}.mb-10px{margin-bottom:10px}.mb-20px{margin-bottom:20px}.mb-2px{margin-bottom:2px}.mb-40px{margin-bottom:40px}.mb-5px{margin-bottom:5px}.ml-0{margin-left:0}.ml-10px{margin-left:10px}.ml-12px{margin-left:12px}.ml-15px{margin-left:15px}.ml-1px{margin-left:1px}.ml-20px{margin-left:20px}.ml-2px{margin-left:2px}.ml-30px{margin-left:30px}.ml-4px{margin-left:4px}.ml-5px{margin-left:5px}.ml-6px{margin-left:6px}.ml-8px{margin-left:8px}.ml-auto{margin-left:auto}.mr-0{margin-right:0}.mr-0\\!{margin-right:0!important}.mr-10px{margin-right:10px}.mr-24px{margin-right:24px}.mr-2px{margin-right:2px}.mr-4px{margin-right:4px}.mr-auto{margin-right:auto}.ms{margin-inline-start:16px}.mt--2px{margin-top:-2px}.mt-10px{margin-top:10px}.mt-15px{margin-top:15px}.mt-2,.mt-8px{margin-top:8px}.mt-20px{margin-top:20px}.mt-2px{margin-top:2px}.mt-3px{margin-top:3px}.mt-4px{margin-top:4px}.mt-6px{margin-top:6px}.first\\:ml-0:first-child{margin-left:0}.first\\:mt-0:first-child,.first\\:mt-0px:first-child{margin-top:0}.box-content{box-sizing:content-box}.inline{display:inline}.block{display:block}.inline-block{display:inline-block}.contents{display:contents}.\\[\\&\\>\\.ant-checkbox-label\\]\\:hidden>.ant-checkbox-label,.hidden{display:none}.aspect-1{aspect-ratio:1}.aspect-16\\/9{aspect-ratio:16/9}.aspect-ratio-10\\/16{aspect-ratio:10/16}.\\[\\&_svg\\]\\:size-16px svg,.size-16px{width:16px;height:16px}.ant-spin .ant-spin-dot.\\[\\.ant-spin_\\.ant-spin-dot\\&\\]\\:size-25px,.size-25px{width:25px;height:25px}.size-12px{width:12px;height:12px}.size-13px{width:13px;height:13px}.size-14px{width:14px;height:14px}.size-15px{width:15px;height:15px}.size-17px{width:17px;height:17px}.size-18px{width:18px;height:18px}.size-20px{width:20px;height:20px}.size-24px{width:24px;height:24px}.size-26px{width:26px;height:26px}.size-28px{width:28px;height:28px}.size-30px{width:30px;height:30px}.size-32px{width:32px;height:32px}.size-40px{width:40px;height:40px}.size-full{width:100%;height:100%}.h-\\[calc\\(100vh-30px\\)\\]{height:calc(100vh - 30px)}.h-0{height:0}.h-100\\%,.h-full{height:100%}.h-100vh{height:100vh}.h-14px{height:14px}.h-16px{height:16px}.h-19px{height:19px}.h-22px{height:22px}.h-24px{height:24px}.h-2px{height:2px}.h-34px{height:34px}.h-35px{height:35px}.h-3px{height:3px}.h-auto{height:auto}.h-fit{height:fit-content}.max-h-\\[calc\\(90vh-50px\\)\\]{max-height:calc(90vh - 50px)}.max-h-\\[max\\(362px\\,calc\\(90vh-50px-56px-15px\\)\\)\\]{max-height:max(362px,calc(90vh - 121px))}.max-h-250px{max-height:250px}.max-h-50vh{max-height:50vh}.max-h-full{max-height:100%}.max-h-unset{max-height:unset}.max-w-130px{max-width:130px}.max-w-288px{max-width:288px}.max-w-350px{max-width:350px}.max-w-450px{max-width:450px}.min-h-100px{min-height:100px}.min-h-100vh{min-height:100vh}.min-h-25px{min-height:25px}.min-h-362px{min-height:362px}.min-w-130px{min-width:130px}.min-w-200px{min-width:200px}.min-w-24px{min-width:24px}.min-w-300px{min-width:300px}.min-w-32px{min-width:32px}.min-w-60px{min-width:60px}.min-w-80px{min-width:80px}.min-w-95px{min-width:95px}.w-\\[calc\\(100vw-30px\\)\\]{width:calc(100vw - 30px)}.w-\\[max-content\\]{width:max-content}.w-0{width:0}.w-100\\%,.w-full{width:100%}.w-114px{width:114px}.w-130px{width:130px}.w-150px{width:150px}.w-160px{width:160px}.w-16px{width:16px}.w-200px{width:200px}.w-250px{width:250px}.w-300px{width:300px}.w-34px{width:34px}.w-500px{width:500px}.w-720px{width:720px}.w-740px{width:740px}.flex{display:flex}.\\[\\&_\\.ant-checkbox-label\\]\\:inline-flex .ant-checkbox-label,.\\[\\&_\\.ant-radio-label\\]\\:inline-flex .ant-radio-label,.\\[\\&_\\.ant-radio-wrapper\\]\\:inline-flex .ant-radio-wrapper,.inline-flex{display:inline-flex}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink,.flex-shrink-1{flex-shrink:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow-1{flex-grow:1}.flex-basis-100\\%{flex-basis:100%}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.translate-x--50\\%{--un-translate-x:-50%;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.translate-y--50\\%{--un-translate-y:-50%;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.translate-y-100\\%{--un-translate-y:100%;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.rotate-0{--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-rotate:0deg;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.rotate-180{--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-rotate:180deg;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.rotate-z-0{--un-rotate:0;--un-rotate-z:0deg;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.rotate-z-180deg{--un-rotate:0;--un-rotate-z:180deg;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.transform{transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-\\[edit\\]{cursor:edit}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.cursor-not-allowed{cursor:not-allowed}.cursor-grab{cursor:grab}.\\[\\&_\\.ant-checkbox-label\\]\\:select-none .ant-checkbox-label,.\\[\\&_svg\\]\\:select-none svg,.select-none{-webkit-user-select:none;user-select:none}.resize{resize:both}.list-circle{list-style-type:circle}.content-start{align-content:flex-start}.items-start{align-items:flex-start}.\\[\\&_\\.ant-checkbox-label\\]\\:items-center .ant-checkbox-label,.\\[\\&_\\.ant-radio-label\\]\\:items-center .ant-radio-label,.\\[\\&_\\.ant-radio-wrapper\\]\\:items-center .ant-radio-wrapper,.items-center{align-items:center}.self-start{align-self:flex-start}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-left{justify-content:left}.justify-right{justify-content:right}.gap-0{gap:0}.gap-10px{gap:10px}.gap-1px{gap:1px}.gap-4px{gap:4px}.gap-8px{gap:8px}.gap-x-1,.gap-x-4px{column-gap:4px}.gap-x-10px{column-gap:10px}.gap-x-12px{column-gap:12px}.gap-x-15px{column-gap:15px}.gap-x-20px{column-gap:20px}.gap-x-25px{column-gap:25px}.gap-x-2px{column-gap:2px}.gap-x-30px{column-gap:30px}.gap-x-40px{column-gap:40px}.gap-x-50px{column-gap:50px}.gap-x-5px{column-gap:5px}.gap-x-6px{column-gap:6px}.gap-x-8px{column-gap:8px}.gap-y-10px{row-gap:10px}.gap-y-15px{row-gap:15px}.gap-y-2px{row-gap:2px}.gap-y-3px{row-gap:3px}.gap-y-4px{row-gap:4px}.gap-y-5px{row-gap:5px}.gap-y-6px{row-gap:6px}.gap-y-8px{row-gap:8px}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.overflow-y-scroll{overflow-y:scroll}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-normal{overflow-wrap:normal;word-break:normal}.b-1px,.border{border-width:1px}.b-2px{border-width:2px}.b-5px{border-width:5px}.b-b-1px{border-bottom-width:1px}.b-t-1px{border-top-width:1px}.border-b-0{border-bottom-width:0px}.b-\\#444{--un-border-opacity:1;border-color:rgb(68 68 68 / var(--un-border-opacity))}.b-gate-bg-lv-2{border-color:var(--bilibili-gate--bg-lv2)}.b-gate-border,.bilibili-gate-using-dark .dark\\:b-gate-border{border-color:var(--bilibili-gate--border-color)}.b-gate-primary{border-color:var(--bilibili-gate--primary-color)}.b-transparent{border-color:transparent}.b-white\\/20\\%{border-color:#fff3}.b-white\\/33\\%{border-color:#ffffff54}.hover\\:b-gate-primary:hover{border-color:var(--bilibili-gate--primary-color)}.b-b-gate-bg-lv1{border-bottom-color:var(--bilibili-gate--bg-lv1)}.b-b-transparent{border-bottom-color:transparent}.b-t-\\[var\\(--bilibili-gate-separator-color\\)\\]{border-top-color:var(--bilibili-gate-separator-color)}.rounded,.rounded-4px{border-radius:4px}.rounded-10px{border-radius:10px}.rounded-15px{border-radius:15px}.rounded-20px{border-radius:20px}.rounded-2px{border-radius:2px}.rounded-5px{border-radius:5px}.rounded-6px{border-radius:6px}.rounded-8px,.rounded-lg{border-radius:8px}.rounded-full{border-radius:9999px}.rounded-b-none{border-bottom-left-radius:0;border-bottom-right-radius:0}.rounded-t-6px{border-top-left-radius:6px;border-top-right-radius:6px}.rounded-t-gate-video-card{border-top-left-radius:var(--bilibili-gate--video-card--border-radius);border-top-right-radius:var(--bilibili-gate--video-card--border-radius)}.b-solid{border-style:solid}.border-none{border-style:none}.b-b-solid{border-bottom-style:solid}.b-t-solid{border-top-style:solid}.bg-\\[rgb\\(33_33_33_\\/_0\\.7\\)\\]{--un-bg-opacity:.7;background-color:rgb(33 33 33 / var(--un-bg-opacity))}.bg-\\$bg1_float{background-color:var(--bg1_float)}.bg-black\\/10{background-color:#0000001a}.bg-black\\/50{background-color:#00000080}.bg-black\\/90\\%{background-color:#000000e6}.bg-gate-bg{background-color:var(--bilibili-gate--bg)}.bg-gate-bg-lv-2{background-color:var(--bilibili-gate--bg-lv2)}.bg-gate-bg-lv-3{background-color:var(--bilibili-gate--bg-lv3)}.bg-gate-bg-lv1{background-color:var(--bilibili-gate--bg-lv1)}.bg-gate-primary{background-color:var(--bilibili-gate--primary-color)}.bg-gate-primary\\!{background-color:var(--bilibili-gate--primary-color)!important}.bg-transparent{background-color:transparent}.bg-white\\/14\\%{background-color:#ffffff24}.bg-white\\/50\\%{background-color:#ffffff80}.hover\\:bg-gate-bg-lv-3:hover{background-color:var(--bilibili-gate--bg-lv3)}.hover\\:bg-gate-bg-lv1:hover{background-color:var(--bilibili-gate--bg-lv1)}.hover\\:bg-gate-primary:hover{background-color:var(--bilibili-gate--primary-color)}.hover\\:bg-white\\/40\\%:hover{background-color:#fff6}.\\[\\&_g\\]\\:fill-inherit g{fill:inherit}.\\[\\&_path\\]\\:fill-gate-primary path,.fill-gate-primary{fill:var(--bilibili-gate--primary-color)}.fill-none{fill:none}.\\[\\&_\\.circle\\]\\:stroke-current .circle{stroke:currentColor}.object-cover{object-fit:cover}.object-contain{object-fit:contain}.p-10px{padding:10px}.p-15px{padding:15px}.p-1px{padding:1px}.p-20px{padding:20px}.p-8px{padding:8px}.\\[\\&_\\.ant-radio-button-wrapper\\]\\:px-10px .ant-radio-button-wrapper{padding-left:10px;padding-right:10px}.p-x-1,.px-4px{padding-left:4px;padding-right:4px}.px,.px-16px{padding-left:16px;padding-right:16px}.px-0{padding-left:0;padding-right:0}.px-15px{padding-left:15px;padding-right:15px}.px-24px{padding-left:24px;padding-right:24px}.px-2px{padding-left:2px;padding-right:2px}.px-5px{padding-left:5px;padding-right:5px}.px-6px{padding-left:6px;padding-right:6px}.px-8px{padding-left:8px;padding-right:8px}.py-0{padding-top:0;padding-bottom:0}.py-10px{padding-top:10px;padding-bottom:10px}.py-12px{padding-top:12px;padding-bottom:12px}.py-2px{padding-top:2px;padding-bottom:2px}.py-30px{padding-top:30px;padding-bottom:30px}.py-3px{padding-top:3px;padding-bottom:3px}.py-4px{padding-top:4px;padding-bottom:4px}.py-5px{padding-top:5px;padding-bottom:5px}.py-8px{padding-top:8px;padding-bottom:8px}.\\!\\[\\&_\\.ant-radio-label\\]\\:pl-4px .ant-radio-label{padding-left:4px!important}.pb-15px{padding-bottom:15px}.pb-2px{padding-bottom:2px}.pb1257{padding-bottom:5028px}.pl-10px{padding-left:10px}.pl-16px{padding-left:16px}.pl-25px{padding-left:25px}.pl-2px{padding-left:2px}.pl-4px{padding-left:4px}.pl-5px{padding-left:5px}.pl-6px{padding-left:6px}.pr-0{padding-right:0}.pr-10px{padding-right:10px}.pr-12px{padding-right:12px}.pr-15px{padding-right:15px}.pr-6px{padding-right:6px}.ps{padding-inline-start:16px}.pt-0{padding-top:0}.pt-15px{padding-top:15px}.pt-5px{padding-top:5px}.text-center{text-align:center}.text-\\[1\\.5rem\\]{font-size:24px}.text-1\\.3em,.text-size-1\\.3em{font-size:1.3em}.text-12px,.text-size-12px{font-size:12px}.text-13px,.text-size-13px{font-size:13px}.text-14px,.text-size-14px{font-size:14px}.text-15px{font-size:15px}.text-16px,.text-size-16px{font-size:16px}.font-size-20px,.text-20px,.text-size-20px{font-size:20px}.text-2em{font-size:2em}.text-size-0{font-size:0}.text-size-1\\.5em{font-size:1.5em}.text-size-120\\%{font-size:120%}.color-gate-primary,.text-gate-primary{color:var(--bilibili-gate--primary-color)}.color-gate-text,.text-gate-text{color:var(--bilibili-gate--text-color)}.text-red{--un-text-opacity:1;color:rgb(248 113 113 / var(--un-text-opacity))}.color-white,.text-white{--un-text-opacity:1;color:rgb(255 255 255 / var(--un-text-opacity))}.text-yellow-400{--un-text-opacity:1;color:rgb(250 204 21 / var(--un-text-opacity))}.hover\\:color-gate-primary:hover{color:var(--bilibili-gate--primary-color)}.color-inherit{color:inherit}.font-700{font-weight:700}.\\[\\&_\\.ant-btn-icon\\]\\:line-height-0 .ant-btn-icon,.line-height-\\[0\\]{line-height:0}.line-height-\\[1\\]{line-height:1}.line-height-\\[unset\\],.line-height-unset{line-height:unset}.line-height-1\\.5{line-height:6px}.line-height-14px{line-height:14px}.line-height-18px{line-height:18px}.italic{font-style:italic}.tab{-moz-tab-size:4;-o-tab-size:4;tab-size:4}.shadow{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgb(0 0 0 / .1)),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.\\[\\&\\.ant-btn\\:not\\(\\:disabled\\)\\:focus-visible\\]\\:outline-0.ant-btn:not(:disabled):focus-visible{outline-width:0px}.outline-none\\!{outline:2px solid transparent!important;outline-offset:2px!important}.ring-1px{--un-ring-width:1px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.ring-gate-border{--un-ring-color:var(--bilibili-gate--border-color) }.ring-gate-primary{--un-ring-color:var(--bilibili-gate--primary-color) }.backdrop-blur-10px{--un-backdrop-blur:blur(10px);-webkit-backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)}.filter{filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-300{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-duration-300{transition-duration:.3s}.ease,.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.transition-property-\\[border-color\\]{transition-property:border-color}.transition-property-all{transition-property:all}@media(min-width:1280px){.xl\\:gap-x-8px{column-gap:8px}}.bilibili-gate-root .bili-video-card__skeleton--cover,.bilibili-gate-root .bili-video-card__skeleton--text,.bilibili-gate-root .bili-video-card__skeleton--light,.bilibili-gate-root .bili-video-card__skeleton--avatar{background:linear-gradient(135deg,#0000000f 25%,#00000026 37%,#0000000f 63%)}.bilibili-gate-root .bili-video-card__skeleton--text.tiny{margin-top:4px;width:15%}html.bilibili-gate-using-dark .bilibili-gate-root .bili-video-card__skeleton--cover,html.bilibili-gate-using-dark .bilibili-gate-root .bili-video-card__skeleton--text,html.bilibili-gate-using-dark .bilibili-gate-root .bili-video-card__skeleton--light,html.bilibili-gate-using-dark .bilibili-gate-root .bili-video-card__skeleton--avatar{background-color:#444}._skeleton-active_wlycr_12 .bili-video-card__skeleton--cover,._skeleton-active_wlycr_12 .bili-video-card__skeleton--text,._skeleton-active_wlycr_12 .bili-video-card__skeleton--light,._skeleton-active_wlycr_12 .bili-video-card__skeleton--avatar{background-size:400% 100%;animation-name:_ant-skeleton-loading_wlycr_1;animation-duration:2s;animation-timing-function:ease;animation-iteration-count:infinite}@keyframes _ant-skeleton-loading_wlycr_1{0%{background-position:100% 50%}80%,to{background-position:0 50%}} ');
const NT='@charset "UTF-8";:root{--bilibili-gate--font: "Alibaba PuHuiTi 3.0", "PingFang SC", HarmonyOS_Regular, "Helvetica Neue", "Microsoft YaHei", sans-serif}:root{--bilibili-gate--border-color: oklch(from var(--bilibili-gate--bg) calc(l - .05) c h);--bilibili-gate--bg-lv1: oklch(from var(--bilibili-gate--bg) calc(l - .04) c h);--bilibili-gate--bg-lv2: oklch(from var(--bilibili-gate--bg) calc(l - .08) c h);--bilibili-gate--bg-lv3: oklch(from var(--bilibili-gate--bg) calc(l - .12) c h)}:root.bilibili-gate-using-dark{--bilibili-gate--border-color: oklch(from var(--bilibili-gate--bg) calc(l + .07) c h);--bilibili-gate--bg-lv1: oklch(from var(--bilibili-gate--bg) calc(l + .03) c h);--bilibili-gate--bg-lv2: oklch(from var(--bilibili-gate--bg) calc(l + .08) c h);--bilibili-gate--bg-lv3: oklch(from var(--bilibili-gate--bg) calc(l + .12) c h)}:root{--bilibili-gate--z-rec-header: 1001;--bilibili-gate--z-base-modal: 10003;--bilibili-gate--z-antd-popup-base: 11000;--bilibili-gate--z-video-card-large-preview: 11200;--bilibili-gate--z-video-card-context-menu: 11300;--bilibili-gate--z-toast: 90000}.bilibili-gate-root{font-family:var(--custom-font-family--options--font-family, var(--bilibili-gate--font))!important;--back-top-right: 24px}.bilibili-gate-root .bili-video-card .bili-video-card__info--tit:hover,.bilibili-gate-root .bili-video-card a:not(.disable-hover):hover{color:var(--bilibili-gate--primary-color)!important}.bilibili-gate-root .ant-btn{font-size:13px}.bilibili-gate-root .ant-btn:disabled{cursor:wait}.bilibili-gate-root .ant-btn>span.ant-btn-icon{line-height:0}.bilibili-gate-root .ant-radio-button-wrapper-disabled{cursor:wait}@media(max-width:1440px){.bilibili-gate-root{--back-top-right: 16px}}body .ant-tooltip a{color:#1677ff;transition:color .3s}body .ant-tooltip a:visited{color:#1677ff}body .ant-tooltip a:hover{color:#69b1ff}body .ant-tooltip a:active{color:#0958d9}body button:where(.ant-switch):focus,body button:where(.ant-switch):active{background-color:#00000040;outline:unset}body .ant-btn.ant-btn-variant-solid:focus,body .ant-btn.ant-btn-variant-solid:active{color:var(--ant-button-primary-color);background:var(--ant-color-primary)}';pT(NT);const MT="_cls-gate-video-grid-divider_kgj54_1",k0="_video-grid_131wu_2",RT="_video-grid-center-empty_131wu_11",BE="_video-grid-bili-feed4_131wu_22",AT="_limit-two-lines_131wu_40",TT="_video-grid-container_131wu_58",OT="_video-grid-custom_131wu_69",FT="_narrow-mode_131wu_104";function LT(e,t){const n={};for(let r=0;r<e.length;r++){const o=e[r],i=t(o);n[i]=(n[i]??0)+1;}return n}function kE(e,t){const n=new Set(t);return e.filter(r=>!n.has(r))}function BT(e,t){const n={};for(let r=0;r<e.length;r++){const o=e[r],i=t(o);Object.hasOwn(n,i)||(n[i]=[]),n[i].push(o);}return n}function kT(e,t,n){return e<t?n==="asc"?-1:1:e>t?n==="asc"?1:-1:0}function Xo(e,t,n){return e.slice().sort((r,o)=>{const i=n.length;for(let s=0;s<t.length;s++){const a=i>s?n[s]:n[i-1],l=t[s],c=typeof l=="function",u=c?l(r):r[l],d=c?l(o):o[l],m=kT(u,d,a);if(m!==0)return m}return 0})}function DT(e,t){if(t==null&&(t=e,e=0),e>=t)throw new Error("Invalid input: The maximum value must be greater than the minimum value.");return Math.random()*(t-e)+e}function zT(e,t){return Math.floor(DT(e,t))}function Mr(e){const t=e.slice();for(let n=t.length-1;n>=1;n--){const r=Math.floor(Math.random()*(n+1));[t[n],t[r]]=[t[r],t[n]];}return t}function DE(e){return typeof e=="symbol"||e instanceof Symbol}function _T(e){return DE(e)?NaN:Number(e)}function HT(e){return e?(e=_T(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function VT(e){const t=HT(e),n=t%1;return n?t-n:t}function D0(e){return [...new Set(e)]}function Yi(e,t){const n=new Map;for(let r=0;r<e.length;r++){const o=e[r],i=t(o);n.has(i)||n.set(i,o);}return Array.from(n.values())}let jT=class extends Error{constructor(t="The operation was aborted"){super(t),this.name="AbortError";}};function WT(e,t,{signal:n,edges:r}={}){let o,i=null;const s=r!=null&&r.includes("leading"),a=r==null||r.includes("trailing"),l=()=>{i!==null&&(e.apply(o,i),o=void 0,i=null);},c=()=>{a&&l(),p();};let u=null;const d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,c();},t);},m=()=>{u!==null&&(clearTimeout(u),u=null);},p=()=>{m(),o=void 0,i=null;},h=()=>{l();},g=function(...b){if(n?.aborted)return;o=this,i=b;const y=u==null;d(),s&&y&&l();};return g.schedule=d,g.cancel=p,g.flush=h,n?.addEventListener("abort",p,{once:true}),g}function qT(){}function wu(e){let t=false,n;return function(...r){return t||(t=true,n=e(...r)),n}}function _t(e,{signal:t}={}){return new Promise((n,r)=>{const o=()=>{r(new jT);},i=()=>{clearTimeout(s),o();};if(t?.aborted)return o();const s=setTimeout(()=>{t?.removeEventListener("abort",i),n();},e);t?.addEventListener("abort",i,{once:true});})}function _s(e,t,{signal:n,edges:r=["leading","trailing"]}={}){let o=null;const i=WT(function(...a){o=Date.now(),e.apply(this,a);},t,{signal:n,edges:r}),s=function(...a){if(o==null&&(o=Date.now()),Date.now()-o>=t){o=Date.now(),e.apply(this,a),i.cancel(),i.schedule();return}i.apply(this,a);};return s.cancel=i.cancel,s.flush=i.flush,s}function z0(e,t,n=1){if(t==null&&(t=e,e=0),!Number.isInteger(n)||n===0)throw new Error("The step value must be a non-zero integer.");const r=Math.max(Math.ceil((t-e)/n),0),o=new Array(r);for(let i=0;i<r;i++)o[i]=e+i*n;return o}function zE(e){return e==null||typeof e!="object"&&typeof e!="function"}function _E(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function _p(e){if(zE(e))return e;if(Array.isArray(e)||_E(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e),n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){const r=new n(e);return r.lastIndex=e.lastIndex,r}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){const r=new n(e.message);return r.stack=e.stack,r.name=e.name,r.cause=e.cause,r}if(typeof File<"u"&&e instanceof File)return new n([e],e.name,{type:e.type,lastModified:e.lastModified});if(typeof e=="object"){const r=Object.create(t);return Object.assign(r,e)}return e}function Lg(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Bg(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const HE="[object RegExp]",VE="[object String]",jE="[object Number]",WE="[object Boolean]",kg="[object Arguments]",qE="[object Symbol]",UE="[object Date]",GE="[object Map]",KE="[object Set]",XE="[object Array]",UT="[object Function]",YE="[object ArrayBuffer]",Gd="[object Object]",GT="[object Error]",QE="[object DataView]",ZE="[object Uint8Array]",JE="[object Uint8ClampedArray]",e3="[object Uint16Array]",t3="[object Uint32Array]",KT="[object BigUint64Array]",n3="[object Int8Array]",r3="[object Int16Array]",o3="[object Int32Array]",XT="[object BigInt64Array]",i3="[object Float32Array]",s3="[object Float64Array]";function Sa(e,t,n,r=new Map,o=void 0){const i=o?.(e,t,n,r);if(i!==void 0)return i;if(zE(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){const s=new Array(e.length);r.set(e,s);for(let a=0;a<e.length;a++)s[a]=Sa(e[a],a,n,r,o);return Object.hasOwn(e,"index")&&(s.index=e.index),Object.hasOwn(e,"input")&&(s.input=e.input),s}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const s=new RegExp(e.source,e.flags);return s.lastIndex=e.lastIndex,s}if(e instanceof Map){const s=new Map;r.set(e,s);for(const[a,l]of e)s.set(a,Sa(l,a,n,r,o));return s}if(e instanceof Set){const s=new Set;r.set(e,s);for(const a of e)s.add(Sa(a,void 0,n,r,o));return s}if(typeof Buffer<"u"&&Buffer.isBuffer(e))return e.subarray();if(_E(e)){const s=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,s);for(let a=0;a<e.length;a++)s[a]=Sa(e[a],a,n,r,o);return s}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const s=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,s),hi(s,e,n,r,o),s}if(typeof File<"u"&&e instanceof File){const s=new File([e],e.name,{type:e.type});return r.set(e,s),hi(s,e,n,r,o),s}if(typeof Blob<"u"&&e instanceof Blob){const s=new Blob([e],{type:e.type});return r.set(e,s),hi(s,e,n,r,o),s}if(e instanceof Error){const s=new e.constructor;return r.set(e,s),s.message=e.message,s.name=e.name,s.stack=e.stack,s.cause=e.cause,hi(s,e,n,r,o),s}if(e instanceof Boolean){const s=new Boolean(e.valueOf());return r.set(e,s),hi(s,e,n,r,o),s}if(e instanceof Number){const s=new Number(e.valueOf());return r.set(e,s),hi(s,e,n,r,o),s}if(e instanceof String){const s=new String(e.valueOf());return r.set(e,s),hi(s,e,n,r,o),s}if(typeof e=="object"&&YT(e)){const s=Object.create(Object.getPrototypeOf(e));return r.set(e,s),hi(s,e,n,r,o),s}return e}function hi(e,t,n=e,r,o){const i=[...Object.keys(t),...Lg(t)];for(let s=0;s<i.length;s++){const a=i[s],l=Object.getOwnPropertyDescriptor(e,a);(l==null||l.writable)&&(e[a]=Sa(t[a],a,n,r,o));}}function YT(e){switch(Bg(e)){case kg:case XE:case YE:case QE:case WE:case UE:case i3:case s3:case n3:case r3:case o3:case GE:case jE:case Gd:case HE:case KE:case VE:case qE:case ZE:case JE:case e3:case t3:return true;default:return false}}function _a(e){return Sa(e,void 0,e,new Map,void 0)}function Ha(e){if(!e||typeof e!="object")return false;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)==="[object Object]":false}function Oc(e){return e==="__proto__"}function Go(e,t,n){const r=Object.keys(t);for(let o=0;o<r.length;o++){const i=r[o];if(Oc(i))continue;const s=t[i],a=e[i],l=n(a,s,i,e,t);l!==void 0?e[i]=l:Array.isArray(s)?Array.isArray(a)?e[i]=Go(a,s,n):e[i]=Go([],s,n):Ha(s)?Ha(a)?e[i]=Go(a,s,n):e[i]=Go({},s,n):(a===void 0||s!==void 0)&&(e[i]=s);}return e}function a3(e,t){const n={...e};for(let r=0;r<t.length;r++){const o=t[r];delete n[o];}return n}function Va(e,t){const n={};for(let r=0;r<t.length;r++){const o=t[r];Object.hasOwn(e,o)&&(n[o]=e[o]);}return n}const QT=new RegExp("\\p{Lu}?\\p{Ll}+|[0-9]+|\\p{Lu}+(?!\\p{Ll})|\\p{Emoji_Presentation}|\\p{Extended_Pictographic}|\\p{L}+","gu");function ZT(e){return Array.from(e.match(QT)??[])}function JT(e,t){return Go(_p(e),t,function n(r,o){if(Array.isArray(o))return Array.isArray(r)?Go(_p(r),o,n):Go([],o,n);if(Ha(o))return Ha(r)?Go(_p(r),o,n):Go({},o,n)})}function l3(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function eO(e,t,n){return oc(e,t,void 0,void 0,void 0,void 0,n)}function oc(e,t,n,r,o,i,s){const a=s(e,t,n,r,o,i);if(a!==void 0)return a;if(typeof e==typeof t)switch(typeof e){case "bigint":case "string":case "boolean":case "symbol":case "undefined":return e===t;case "number":return e===t||Object.is(e,t);case "function":return e===t;case "object":return pc(e,t,i,s)}return pc(e,t,i,s)}function pc(e,t,n,r){if(Object.is(e,t))return true;let o=Bg(e),i=Bg(t);if(o===kg&&(o=Gd),i===kg&&(i=Gd),o!==i)return false;switch(o){case VE:return e.toString()===t.toString();case jE:{const l=e.valueOf(),c=t.valueOf();return l3(l,c)}case WE:case UE:case qE:return Object.is(e.valueOf(),t.valueOf());case HE:return e.source===t.source&&e.flags===t.flags;case UT:return e===t}n=n??new Map;const s=n.get(e),a=n.get(t);if(s!=null&&a!=null)return s===t;n.set(e,t),n.set(t,e);try{switch(o){case GE:{if(e.size!==t.size)return !1;for(const[l,c]of e.entries())if(!t.has(l)||!oc(c,t.get(l),l,e,t,n,r))return !1;return !0}case KE:{if(e.size!==t.size)return !1;const l=Array.from(e.values()),c=Array.from(t.values());for(let u=0;u<l.length;u++){const d=l[u],m=c.findIndex(p=>oc(d,p,void 0,e,t,n,r));if(m===-1)return !1;c.splice(m,1);}return !0}case XE:case ZE:case JE:case e3:case t3:case KT:case n3:case r3:case o3:case XT:case i3:case s3:{if(typeof Buffer<"u"&&Buffer.isBuffer(e)!==Buffer.isBuffer(t)||e.length!==t.length)return !1;for(let l=0;l<e.length;l++)if(!oc(e[l],t[l],l,e,t,n,r))return !1;return !0}case YE:return e.byteLength!==t.byteLength?!1:pc(new Uint8Array(e),new Uint8Array(t),n,r);case QE:return e.byteLength!==t.byteLength||e.byteOffset!==t.byteOffset?!1:pc(new Uint8Array(e),new Uint8Array(t),n,r);case GT:return e.name===t.name&&e.message===t.message;case Gd:{if(!(pc(e.constructor,t.constructor,n,r)||Ha(e)&&Ha(t)))return !1;const c=[...Object.keys(e),...Lg(e)],u=[...Object.keys(t),...Lg(t)];if(c.length!==u.length)return !1;for(let d=0;d<c.length;d++){const m=c[d],p=e[m];if(!Object.hasOwn(t,m))return !1;const h=t[m];if(!oc(p,h,m,e,t,n,r))return !1}return !0}default:return !1}}finally{n.delete(e),n.delete(t);}}function ei(e,t){return eO(e,t,qT)}function ti(e){return e==null}function tO(e){const t=ZT(e.trim());let n="";for(let r=0;r<t.length;r++){const o=t[r];n&&(n+=" "),n+=o[0].toUpperCase()+o.slice(1).toLowerCase();}return n}function Rm(e){try{return [null,e()]}catch(t){return [t,null]}}async function Am(e){try{return [null,await e()]}catch(t){return [t,null]}}function Ai(e,t){if(!e)throw typeof t=="string"?new Error(t):t}function nO(e){switch(typeof e){case "number":case "symbol":return false;case "string":return e.includes(".")||e.includes("[")||e.includes("]")}}function _0(e){return typeof e=="string"||typeof e=="symbol"?e:Object.is(e?.valueOf?.(),-0)?"-0":String(e)}function c3(e){if(e==null)return "";if(typeof e=="string")return e;if(Array.isArray(e))return e.map(c3).join(",");const t=String(e);return t==="0"&&Object.is(Number(e),-0)?"-0":t}function u3(e){if(Array.isArray(e))return e.map(_0);if(typeof e=="symbol")return [e];e=c3(e);const t=[],n=e.length;if(n===0)return t;let r=0,o="",i="",s=false;for(e.charCodeAt(0)===46&&(t.push(""),r++);r<n;){const a=e[r];i?a==="\\"&&r+1<n?(r++,o+=e[r]):a===i?i="":o+=a:s?a==='"'||a==="'"?i=a:a==="]"?(s=false,t.push(o),o=""):o+=a:a==="["?(s=true,o&&(t.push(o),o="")):a==="."?o&&(t.push(o),o=""):o+=a,r++;}return o&&t.push(o),t}function nr(e,t,n){if(e==null)return n;switch(typeof t){case "string":{if(Oc(t))return n;const r=e[t];return r===void 0?nO(t)?nr(e,u3(t),n):n:r}case "number":case "symbol":{typeof t=="number"&&(t=_0(t));const r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return rO(e,t,n);if(Object.is(t?.valueOf(),-0)?t="-0":t=String(t),Oc(t))return n;const r=e[t];return r===void 0?n:r}}}function rO(e,t,n){if(t.length===0)return n;let r=e;for(let o=0;o<t.length;o++){if(r==null||Oc(t[o]))return n;r=r[t[o]];}return r===void 0?n:r}function ix(e){return e!==null&&(typeof e=="object"||typeof e=="function")}const oO=/^(?:0|[1-9]\d*)$/;function iO(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case "number":return Number.isInteger(e)&&e>=0&&e<t;case "symbol":return false;case "string":return oO.test(e)}}const sO=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,aO=/^\w*$/;function lO(e,t){return Array.isArray(e)?false:typeof e=="number"||typeof e=="boolean"||e==null||DE(e)?true:typeof e=="string"&&(aO.test(e)||!sO.test(e))||t!=null&&Object.hasOwn(t,e)}const cO=(e,t,n)=>{const r=e[t];(!(Object.hasOwn(e,t)&&l3(r,n))||n===void 0&&!(t in e))&&(e[t]=n);};function uO(e,t,n,r){if(e==null&&!ix(e))return e;let o;lO(t,e)?o=[t]:Array.isArray(t)?o=t:o=u3(t);const i=n(nr(e,o));let s=e;for(let a=0;a<o.length&&s!=null;a++){const l=_0(o[a]);if(Oc(l))continue;let c;if(a===o.length-1)c=i;else {const u=s[l],d=r?.(u,l,e);c=d!==void 0?d:ix(u)?u:iO(o[a+1])?[]:{};}cO(s,l,c),s=s[l];}return e}function sl(e,t,n){return uO(e,t,()=>n,()=>{})}function dO(e,t){if(e=VT(e),e<1||!Number.isSafeInteger(e))return [];const n=new Array(e);for(let r=0;r<e;r++)n[r]=typeof t=="function"?t(r):r;return n}const fO=Symbol(),H0=Symbol(),ic="a",d3="f",sx="p",f3="c",m3="t",V0="h",hc="w",j0="o",W0="k";let mO=(e,t)=>new Proxy(e,t);const Dg=Object.getPrototypeOf,zg=new WeakMap,p3=e=>e&&(zg.has(e)?zg.get(e):Dg(e)===Object.prototype||Dg(e)===Array.prototype),Ef=e=>typeof e=="object"&&e!==null,pO=e=>Object.values(Object.getOwnPropertyDescriptors(e)).some(t=>!t.configurable&&!t.writable),hO=e=>{if(Array.isArray(e))return Array.from(e);const t=Object.getOwnPropertyDescriptors(e);return Object.values(t).forEach(n=>{n.configurable=true;}),Object.create(Dg(e),t)},gO=(e,t)=>{const n={[d3]:t};let r=false;const o=(a,l)=>{if(!r){let c=n[ic].get(e);if(c||(c={},n[ic].set(e,c)),a===hc)c[hc]=true;else {let u=c[a];u||(u=new Set,c[a]=u),u.add(l);}}},i=()=>{r=true,n[ic].delete(e);},s={get(a,l){return l===H0?e:(o(W0,l),h3(Reflect.get(a,l),n[ic],n[f3],n[m3]))},has(a,l){return l===fO?(i(),true):(o(V0,l),Reflect.has(a,l))},getOwnPropertyDescriptor(a,l){return o(j0,l),Reflect.getOwnPropertyDescriptor(a,l)},ownKeys(a){return o(hc),Reflect.ownKeys(a)}};return t&&(s.set=s.deleteProperty=()=>false),[s,n]},q0=e=>e[H0]||e,h3=(e,t,n,r)=>{if(!p3(e))return e;let o=r&&r.get(e);if(!o){const l=q0(e);pO(l)?o=[l,hO(l)]:o=[l],r?.set(e,o);}const[i,s]=o;let a=n&&n.get(i);return (!a||a[1][d3]!==!!s)&&(a=gO(i,!!s),a[1][sx]=mO(s||i,a[0]),n&&n.set(i,a)),a[1][ic]=t,a[1][f3]=n,a[1][m3]=r,a[1][sx]},bO=(e,t)=>{const n=Reflect.ownKeys(e),r=Reflect.ownKeys(t);return n.length!==r.length||n.some((o,i)=>o!==r[i])},g3=(e,t,n,r,o=Object.is)=>{if(o(e,t))return false;if(!Ef(e)||!Ef(t))return true;const i=n.get(q0(e));if(!i)return true;if(r){if(r.get(e)===t)return false;r.set(e,t);}let s=null;for(const a of i[V0]||[])if(s=Reflect.has(e,a)!==Reflect.has(t,a),s)return s;if(i[hc]===true){if(s=bO(e,t),s)return s}else for(const a of i[j0]||[]){const l=!!Reflect.getOwnPropertyDescriptor(e,a),c=!!Reflect.getOwnPropertyDescriptor(t,a);if(s=l!==c,s)return s}for(const a of i[W0]||[])if(s=g3(e[a],t[a],n,r,o),s)return s;if(s===null)throw new Error("invalid used");return s},vO=e=>p3(e)&&e[H0]||null,ax=(e,t=true)=>{zg.set(e,t);},yO=(e,t,n)=>{const r=[],o=new WeakSet,i=(s,a)=>{var l,c,u;if(o.has(s))return;Ef(s)&&o.add(s);const d=Ef(s)&&t.get(q0(s));if(d){if((l=d[V0])===null||l===void 0||l.forEach(m=>{const p=`:has(${String(m)})`;r.push(a?[...a,p]:[p]);}),d[hc]===true){const m=":ownKeys";r.push(a?[...a,m]:[m]);}else (c=d[j0])===null||c===void 0||c.forEach(m=>{const p=`:hasOwn(${String(m)})`;r.push(a?[...a,p]:[p]);});(u=d[W0])===null||u===void 0||u.forEach(m=>{"value"in(Object.getOwnPropertyDescriptor(s,m)||{})&&i(s[m],a?[...a,m]:[m]);});}else a&&r.push(a);};return i(e),r},If={},U0=e=>typeof e=="object"&&e!==null,CO=e=>U0(e)&&!Su.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)&&!(e instanceof Promise),b3=(e,t)=>{const n=_g.get(e);if(n?.[0]===t)return n[1];const r=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return ax(r,true),_g.set(e,[t,r]),Reflect.ownKeys(e).forEach(o=>{if(Object.getOwnPropertyDescriptor(r,o))return;const i=Reflect.get(e,o),{enumerable:s}=Reflect.getOwnPropertyDescriptor(e,o),a={value:i,enumerable:s,configurable:true};if(Su.has(i))ax(i,false);else if(Bi.has(i)){const[l,c]=Bi.get(i);a.value=b3(l,c());}Object.defineProperty(r,o,a);}),Object.preventExtensions(r)},xO=(e,t,n,r)=>({deleteProperty(o,i){const s=Reflect.get(o,i);n(i);const a=Reflect.deleteProperty(o,i);return a&&r(["delete",[i],s]),a},set(o,i,s,a){const l=!e()&&Reflect.has(o,i),c=Reflect.get(o,i,a);if(l&&(lx(c,s)||Fc.has(s)&&lx(c,Fc.get(s))))return true;n(i),U0(s)&&(s=vO(s)||s);const u=!Bi.has(s)&&SO(s)?tn(s):s;return t(i,u),Reflect.set(o,i,u,a),r(["set",[i],s,c]),true}}),Bi=new WeakMap,Su=new WeakSet,_g=new WeakMap,Kd=[1],Fc=new WeakMap;let lx=Object.is,wO=(e,t)=>new Proxy(e,t),SO=CO,$O=b3,EO=xO;function tn(e={}){if(!U0(e))throw new Error("object required");const t=Fc.get(e);if(t)return t;let n=Kd[0];const r=new Set,o=(b,y=++Kd[0])=>{n!==y&&(i=n=y,r.forEach(C=>C(b,y)));};let i=n;const s=(b=Kd[0])=>(i!==b&&(i=b,l.forEach(([y])=>{const C=y[1](b);C>n&&(n=C);})),n),a=b=>(y,C)=>{const x=[...y];x[1]=[b,...x[1]],o(x,C);},l=new Map,c=(b,y)=>{const C=!Su.has(y)&&Bi.get(y);if(C){if((If?"production":void 0)!=="production"&&l.has(b))throw new Error("prop listener already exists");if(r.size){const x=C[2](a(b));l.set(b,[C,x]);}else l.set(b,[C]);}},u=b=>{var y;const C=l.get(b);C&&(l.delete(b),(y=C[1])==null||y.call(C));},d=b=>(r.add(b),r.size===1&&l.forEach(([C,x],w)=>{if((If?"production":void 0)!=="production"&&x)throw new Error("remove already exists");const S=C[2](a(w));l.set(w,[C,S]);}),()=>{r.delete(b),r.size===0&&l.forEach(([C,x],w)=>{x&&(x(),l.set(w,[C]));});});let m=true;const p=EO(()=>m,c,u,o),h=wO(e,p);Fc.set(e,h);const g=[e,s,d];return Bi.set(h,g),Reflect.ownKeys(e).forEach(b=>{const y=Object.getOwnPropertyDescriptor(e,b);"value"in y&&y.writable&&(h[b]=e[b]);}),m=false,h}function Qi(e,t,n){const r=Bi.get(e);(If?"production":void 0)!=="production"&&!r&&console.warn("Please use proxy object");let o;const i=[],s=r[2];let a=false;const c=s(u=>{if(i.push(u),n){t(i.splice(0));return}o||(o=Promise.resolve().then(()=>{o=void 0,a&&t(i.splice(0));}));});return a=true,()=>{a=false,c();}}function Qn(e){const t=Bi.get(e);(If?"production":void 0)!=="production"&&!t&&console.warn("Please use proxy object");const[n,r]=t;return $O(n,r())}function v3(e){return Su.add(e),e}function y3(){return {proxyStateMap:Bi,refSet:Su,snapCache:_g,versionHolder:Kd,proxyCache:Fc}}const IO={},PO=(e,t)=>{const n=f.useRef(void 0);f.useEffect(()=>{n.current=yO(e,t);}),f.useDebugValue(n.current);},NO=PO,MO=new WeakMap;function nt(e,t){const n=t?.sync,r=f.useMemo(()=>e&&new WeakMap,[e]),o=f.useRef(void 0),i=f.useRef(false),s=f.useSyncExternalStore(f.useCallback(l=>{i.current=true;const c=Qi(e,l,n);return l(),()=>{c(),i.current=false;}},[e,n]),()=>{const l=Qn(e);try{if(i.current&&o.current&&!g3(o.current,l,r,new WeakMap))return o.current}catch{}return l},()=>Qn(e));f.useLayoutEffect(()=>{o.current=s;}),(IO?"production":void 0)!=="production"&&NO(s,r);const a=f.useMemo(()=>new WeakMap,[]);return h3(s,r,a,MO)}var md=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pd={exports:{}},Hp,cx;function C3(){if(cx)return Hp;cx=1;var e=1e3,t=e*60,n=t*60,r=n*24,o=r*7,i=r*365.25;Hp=function(u,d){d=d||{};var m=typeof u;if(m==="string"&&u.length>0)return s(u);if(m==="number"&&isFinite(u))return d.long?l(u):a(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))};function s(u){if(u=String(u),!(u.length>100)){var d=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(u);if(d){var m=parseFloat(d[1]),p=(d[2]||"ms").toLowerCase();switch(p){case "years":case "year":case "yrs":case "yr":case "y":return m*i;case "weeks":case "week":case "w":return m*o;case "days":case "day":case "d":return m*r;case "hours":case "hour":case "hrs":case "hr":case "h":return m*n;case "minutes":case "minute":case "mins":case "min":case "m":return m*t;case "seconds":case "second":case "secs":case "sec":case "s":return m*e;case "milliseconds":case "millisecond":case "msecs":case "msec":case "ms":return m;default:return}}}}function a(u){var d=Math.abs(u);return d>=r?Math.round(u/r)+"d":d>=n?Math.round(u/n)+"h":d>=t?Math.round(u/t)+"m":d>=e?Math.round(u/e)+"s":u+"ms"}function l(u){var d=Math.abs(u);return d>=r?c(u,d,r,"day"):d>=n?c(u,d,n,"hour"):d>=t?c(u,d,t,"minute"):d>=e?c(u,d,e,"second"):u+" ms"}function c(u,d,m,p){var h=d>=m*1.5;return Math.round(u/m)+" "+p+(h?"s":"")}return Hp}var Vp,ux;function RO(){if(ux)return Vp;ux=1;function e(t){r.debug=r,r.default=r,r.coerce=c,r.disable=a,r.enable=i,r.enabled=l,r.humanize=C3(),r.destroy=u,Object.keys(t).forEach(d=>{r[d]=t[d];}),r.names=[],r.skips=[],r.formatters={};function n(d){let m=0;for(let p=0;p<d.length;p++)m=(m<<5)-m+d.charCodeAt(p),m|=0;return r.colors[Math.abs(m)%r.colors.length]}r.selectColor=n;function r(d){let m,p=null,h,g;function b(...y){if(!b.enabled)return;const C=b,x=Number(new Date),w=x-(m||x);C.diff=w,C.prev=m,C.curr=x,m=x,y[0]=r.coerce(y[0]),typeof y[0]!="string"&&y.unshift("%O");let S=0;y[0]=y[0].replace(/%([a-zA-Z%])/g,($,E)=>{if($==="%%")return "%";S++;const P=r.formatters[E];if(typeof P=="function"){const M=y[S];$=P.call(C,M),y.splice(S,1),S--;}return $}),r.formatArgs.call(C,y),(C.log||r.log).apply(C,y);}return b.namespace=d,b.useColors=r.useColors(),b.color=r.selectColor(d),b.extend=o,b.destroy=r.destroy,Object.defineProperty(b,"enabled",{enumerable:true,configurable:false,get:()=>p!==null?p:(h!==r.namespaces&&(h=r.namespaces,g=r.enabled(d)),g),set:y=>{p=y;}}),typeof r.init=="function"&&r.init(b),b}function o(d,m){const p=r(this.namespace+(typeof m>"u"?":":m)+d);return p.log=this.log,p}function i(d){r.save(d),r.namespaces=d,r.names=[],r.skips=[];const m=(typeof d=="string"?d:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const p of m)p[0]==="-"?r.skips.push(p.slice(1)):r.names.push(p);}function s(d,m){let p=0,h=0,g=-1,b=0;for(;p<d.length;)if(h<m.length&&(m[h]===d[p]||m[h]==="*"))m[h]==="*"?(g=h,b=p,h++):(p++,h++);else if(g!==-1)h=g+1,b++,p=b;else return false;for(;h<m.length&&m[h]==="*";)h++;return h===m.length}function a(){const d=[...r.names,...r.skips.map(m=>"-"+m)].join(",");return r.enable(""),d}function l(d){for(const m of r.skips)if(s(d,m))return false;for(const m of r.names)if(s(d,m))return true;return false}function c(d){return d instanceof Error?d.stack||d.message:d}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");}return r.enable(r.load()),r}return Vp=e,Vp}var dx;function AO(){return dx||(dx=1,(function(e,t){var n={};t.formatArgs=o,t.save=i,t.load=s,t.useColors=r,t.storage=a(),t.destroy=(()=>{let c=false;return ()=>{c||(c=true,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return true;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return false;let c;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(c=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(c[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function o(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const u="color: "+this.color;c.splice(1,0,u,"color: inherit");let d=0,m=0;c[0].replace(/%[a-zA-Z%]/g,p=>{p!=="%%"&&(d++,p==="%c"&&(m=d));}),c.splice(m,0,u);}t.log=console.debug||console.log||(()=>{});function i(c){try{c?t.storage.setItem("debug",c):t.storage.removeItem("debug");}catch{}}function s(){let c;try{c=t.storage.getItem("debug")||t.storage.getItem("DEBUG");}catch{}return !c&&typeof process<"u"&&"env"in process&&(c=n.DEBUG),c}function a(){try{return localStorage}catch{}}e.exports=RO()(t);const{formatters:l}=e.exports;l.j=function(c){try{return JSON.stringify(c)}catch(u){return "[UnexpectedJSONParseError]: "+u.message}};})(pd,pd.exports)),pd.exports}var TO=AO();const OO=vr(TO),uo="Bilibili-Gate",Jn="bilibili-gate",G0="bilibili_gate",fx="bili-gate",Hn=OO(Jn),x3="https://api.bilibili.com",w3="https://app.bilibili.com",Lc={appkey:"4409e2ce8ffd12b8",appsec:"59b43e04ad6965f34319062b478f83dd"},zo=`${Jn}-root`,FO=`${Jn}-video-grid`,ws=`${Jn}-video-card`,S3=`${Jn}-video-card-active`,$3=`${Jn}-video-card-cover`,E3=`${Jn}-tab-bar`,LO=`${Jn}-video-card__recommend-reason`,al="请求失败, 请重试 !!!",$u="操作失败, 请重试 !!!",hd="bilibili.com";var ki=(e=>(e[e.Tld=hd]="Tld",e.Main=`www.${hd}`,e.Space=`space.${hd}`,e.Search=`search.${hd}`,e))(ki||{});const{hostname:Bc,pathname:mx}=location;Bc===ki.Tld||Bc.endsWith(`.${ki.Tld}`);const I3=[ki.Tld,ki.Main].includes(Bc),BO=Bc===ki.Space,kO=Bc===ki.Search,_o=I3&&(mx==="/"||mx==="/index.html");function P3(e){return function(...n){const[r,...o]=n,i=`%c${uo}%c`,s=["padding: 2px 4px; border-radius: 4px; color: #fff; background: #01847f; font-weight: bold;",""];return typeof r=="string"?e(`${i} ${r}`,...s,...o):e(`${i}`,...s,r,...o)}}const Yr=P3(console.warn),DO=P3(console.error);function lt(e){const t=f__namespace.useRef(e);return t.current=e,f__namespace.useCallback((...r)=>t.current?.(...r),[])}function Ar(){return !!(typeof window<"u"&&window.document&&window.document.createElement)}const px=Ar()?f__namespace.useLayoutEffect:f__namespace.useEffect,Kt=(e,t)=>{const n=f__namespace.useRef(true);px(()=>e(n.current),t),px(()=>(n.current=false,()=>{n.current=true;}),[]);},Xd=(e,t)=>{Kt(n=>{if(!n)return e()},t);};function Pf(e){const t=f__namespace.useRef(false),[n,r]=f__namespace.useState(e);f__namespace.useEffect(()=>(t.current=false,()=>{t.current=true;}),[]);function o(i,s){s&&t.current||r(i);}return [n,o]}function Bt(e,t){const[n,r]=f.useState(e),o=t!==void 0?t:n;return Kt(i=>{i||r(t);},[t]),[o,r]}var jp={exports:{}},Ut={};var hx;function zO(){if(hx)return Ut;hx=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),a=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),h;h=Symbol.for("react.module.reference");function g(b){if(typeof b=="object"&&b!==null){var y=b.$$typeof;switch(y){case e:switch(b=b.type,b){case n:case o:case r:case c:case u:return b;default:switch(b=b&&b.$$typeof,b){case a:case s:case l:case m:case d:case i:return b;default:return y}}case t:return y}}}return Ut.ContextConsumer=s,Ut.ContextProvider=i,Ut.Element=e,Ut.ForwardRef=l,Ut.Fragment=n,Ut.Lazy=m,Ut.Memo=d,Ut.Portal=t,Ut.Profiler=o,Ut.StrictMode=r,Ut.Suspense=c,Ut.SuspenseList=u,Ut.isAsyncMode=function(){return false},Ut.isConcurrentMode=function(){return false},Ut.isContextConsumer=function(b){return g(b)===s},Ut.isContextProvider=function(b){return g(b)===i},Ut.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},Ut.isForwardRef=function(b){return g(b)===l},Ut.isFragment=function(b){return g(b)===n},Ut.isLazy=function(b){return g(b)===m},Ut.isMemo=function(b){return g(b)===d},Ut.isPortal=function(b){return g(b)===t},Ut.isProfiler=function(b){return g(b)===o},Ut.isStrictMode=function(b){return g(b)===r},Ut.isSuspense=function(b){return g(b)===c},Ut.isSuspenseList=function(b){return g(b)===u},Ut.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===o||b===r||b===c||b===u||b===p||typeof b=="object"&&b!==null&&(b.$$typeof===m||b.$$typeof===d||b.$$typeof===i||b.$$typeof===s||b.$$typeof===l||b.$$typeof===h||b.getModuleId!==void 0)},Ut.typeOf=g,Ut}var gx;function _O(){return gx||(gx=1,jp.exports=zO()),jp.exports}var Wp=_O();function ll(e,t,n){const r=f__namespace.useRef({});return (!("value"in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}const HO=Symbol.for("react.element"),VO=Symbol.for("react.transitional.element"),jO=Symbol.for("react.fragment");function N3(e){return e&&typeof e=="object"&&(e.$$typeof===HO||e.$$typeof===VO)&&e.type===jO}const WO=Number(f.version.split(".")[0]),qO=(e,t)=>{typeof e=="function"?e(t):typeof e=="object"&&e&&"current"in e&&(e.current=t);},In=(...e)=>{const t=e.filter(Boolean);return t.length<=1?t[0]:n=>{e.forEach(r=>{qO(r,n);});}},Hs=(...e)=>ll(()=>In(...e),e,(t,n)=>t.length!==n.length||t.every((r,o)=>r!==n[o])),Vs=e=>{if(!e)return false;if(K0(e)&&WO>=19)return true;const t=Wp.isMemo(e)?e.type.type:e.type;return !(typeof t=="function"&&!t.prototype?.render&&t.$$typeof!==Wp.ForwardRef||typeof e=="function"&&!e.prototype?.render&&e.$$typeof!==Wp.ForwardRef)};function K0(e){return f.isValidElement(e)&&!N3(e)}const UO=e=>K0(e)&&Vs(e),js=e=>{if(e&&K0(e)){const t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null};function co(e,t){let n=e;for(let r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]];}return n}function M3(e,t,n,r){if(!t.length)return n;const[o,...i]=t;let s;return !e&&typeof o=="number"?s=[]:Array.isArray(e)?s=[...e]:s={...e},r&&n===void 0&&i.length===1?delete s[o][i[0]]:s[o]=M3(s[o],i,n,r),s}function _r(e,t,n,r=false){return t.length&&r&&n===void 0&&!co(e,t.slice(0,-1))?e:M3(e,t,n,r)}function GO(e){return typeof e=="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function bx(e){return Array.isArray(e)?[]:{}}const KO=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function R3(e,t={}){const{prepareArray:n}=t,r=n||(()=>[]);let o=bx(e[0]);return e.forEach(i=>{function s(a,l){const c=new Set(l),u=co(i,a),d=Array.isArray(u);if(d||GO(u)){if(!c.has(u)){c.add(u);const m=co(o,a);d?o=_r(o,a,r(m,u)):(!m||typeof m!="object")&&(o=_r(o,a,bx(u))),KO(u).forEach(p=>{s([...a,p],c);});}}else o=_r(o,a,u);}s([]);}),o}function $a(...e){return R3(e)}let Hg={};const XO=e=>{};function YO(e,t){}function QO(e,t){}function ZO(){Hg={};}function A3(e,t,n){!t&&!Hg[n]&&(e(false,n),Hg[n]=true);}function Cn(e,t){A3(YO,e,t);}function JO(e,t){A3(QO,e,t);}Cn.preMessage=XO;Cn.resetWarned=ZO;Cn.noteOnce=JO;function Zt(e,t){const n=Object.assign({},e);return Array.isArray(t)&&t.forEach(r=>{delete n[r];}),n}function gr(e,t={}){let n=[];return f.Children.forEach(e,r=>{r==null&&!t.keepEmpty||(Array.isArray(r)?n=n.concat(gr(r)):N3(r)&&r.props?n=n.concat(gr(r.props.children,t)):n.push(r));}),n}function e8(){return {...f__namespace}.useId}let vx=0;const yx=e8(),Ws=yx?(function(t){const n=yx();return t||n}):(function(t){const[n,r]=f__namespace.useState("ssr-id");return f__namespace.useEffect(()=>{const o=vx;vx+=1,r(`rc_unique_${o}`);},[]),t||n}),t8=`accept acceptCharset accessKey action allowFullScreen allowTransparency
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
charSet checked classID className colSpan cols content contentEditable contextMenu
controls coords crossOrigin data dateTime default defer dir disabled download draggable
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
mediaGroup method min minLength multiple muted name noValidate nonce open
optimum pattern placeholder poster preload radioGroup readOnly rel required
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
summary tabIndex target title type useMap value width wmode wrap`,n8=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,r8=`${t8} ${n8}`.split(/[\s\n]+/),o8="aria-",i8="data-";function Cx(e,t){return e.indexOf(t)===0}function or(e,t=false){let n;t===false?n={aria:true,data:true,attr:true}:t===true?n={aria:true}:n={...t};const r={};return Object.keys(e).forEach(o=>{(n.aria&&(o==="role"||Cx(o,o8))||n.data&&Cx(o,i8)||n.attr&&r8.includes(o))&&(r[o]=e[o]);}),r}function T3(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=T3(e[t]))&&(r&&(r+=" "),r+=n);}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function H(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=T3(e))&&(r&&(r+=" "),r+=t);return r}var s8={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};const a8={aliceblue:"9ehhb",antiquewhite:"9sgk7",aqua:"1ekf",aquamarine:"4zsno",azure:"9eiv3",beige:"9lhp8",bisque:"9zg04",black:"0",blanchedalmond:"9zhe5",blue:"73",blueviolet:"5e31e",brown:"6g016",burlywood:"8ouiv",cadetblue:"3qba8",chartreuse:"4zshs",chocolate:"87k0u",coral:"9yvyo",cornflowerblue:"3xael",cornsilk:"9zjz0",crimson:"8l4xo",cyan:"1ekf",darkblue:"3v",darkcyan:"rkb",darkgoldenrod:"776yz",darkgray:"6mbhl",darkgreen:"jr4",darkgrey:"6mbhl",darkkhaki:"7ehkb",darkmagenta:"5f91n",darkolivegreen:"3bzfz",darkorange:"9yygw",darkorchid:"5z6x8",darkred:"5f8xs",darksalmon:"9441m",darkseagreen:"5lwgf",darkslateblue:"2th1n",darkslategray:"1ugcv",darkslategrey:"1ugcv",darkturquoise:"14up",darkviolet:"5rw7n",deeppink:"9yavn",deepskyblue:"11xb",dimgray:"442g9",dimgrey:"442g9",dodgerblue:"16xof",firebrick:"6y7tu",floralwhite:"9zkds",forestgreen:"1cisi",fuchsia:"9y70f",gainsboro:"8m8kc",ghostwhite:"9pq0v",goldenrod:"8j4f4",gold:"9zda8",gray:"50i2o",green:"pa8",greenyellow:"6senj",grey:"50i2o",honeydew:"9eiuo",hotpink:"9yrp0",indianred:"80gnw",indigo:"2xcoy",ivory:"9zldc",khaki:"9edu4",lavenderblush:"9ziet",lavender:"90c8q",lawngreen:"4vk74",lemonchiffon:"9zkct",lightblue:"6s73a",lightcoral:"9dtog",lightcyan:"8s1rz",lightgoldenrodyellow:"9sjiq",lightgray:"89jo3",lightgreen:"5nkwg",lightgrey:"89jo3",lightpink:"9z6wx",lightsalmon:"9z2ii",lightseagreen:"19xgq",lightskyblue:"5arju",lightslategray:"4nwk9",lightslategrey:"4nwk9",lightsteelblue:"6wau6",lightyellow:"9zlcw",lime:"1edc",limegreen:"1zcxe",linen:"9shk6",magenta:"9y70f",maroon:"4zsow",mediumaquamarine:"40eju",mediumblue:"5p",mediumorchid:"79qkz",mediumpurple:"5r3rv",mediumseagreen:"2d9ip",mediumslateblue:"4tcku",mediumspringgreen:"1di2",mediumturquoise:"2uabw",mediumvioletred:"7rn9h",midnightblue:"z980",mintcream:"9ljp6",mistyrose:"9zg0x",moccasin:"9zfzp",navajowhite:"9zest",navy:"3k",oldlace:"9wq92",olive:"50hz4",olivedrab:"472ub",orange:"9z3eo",orangered:"9ykg0",orchid:"8iu3a",palegoldenrod:"9bl4a",palegreen:"5yw0o",paleturquoise:"6v4ku",palevioletred:"8k8lv",papayawhip:"9zi6t",peachpuff:"9ze0p",peru:"80oqn",pink:"9z8wb",plum:"8nba5",powderblue:"6wgdi",purple:"4zssg",rebeccapurple:"3zk49",red:"9y6tc",rosybrown:"7cv4f",royalblue:"2jvtt",saddlebrown:"5fmkz",salmon:"9rvci",sandybrown:"9jn1c",seagreen:"1tdnb",seashell:"9zje6",sienna:"6973h",silver:"7ir40",skyblue:"5arjf",slateblue:"45e4t",slategray:"4e100",slategrey:"4e100",snow:"9zke2",springgreen:"1egv",steelblue:"2r1kk",tan:"87yx8",teal:"pds",thistle:"8ggk8",tomato:"9yqfb",turquoise:"2j4r4",violet:"9b10u",wheat:"9ld4j",white:"9zldr",whitesmoke:"9lhpx",yellow:"9zl6o",yellowgreen:"61fzm"},Pn=Math.round;function qp(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(o=>parseFloat(o));for(let o=0;o<3;o+=1)r[o]=t(r[o]||0,n[o]||"",o);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const xx=(e,t,n)=>n===0?e:e/100;function kl(e,t){const n=t||255;return e>n?n:e<0?0:e}class Ft{isValid=true;r=0;g=0;b=0;a=1;_h;_s;_l;_v;_max;_min;_brightness;constructor(t){function n(r){return r[0]in t&&r[1]in t&&r[2]in t}if(t)if(typeof t=="string"){let o=function(i){return r.startsWith(i)};const r=t.trim();if(/^#?[A-F\d]{3,8}$/i.test(r))this.fromHexString(r);else if(o("rgb"))this.fromRgbString(r);else if(o("hsl"))this.fromHslString(r);else if(o("hsv")||o("hsb"))this.fromHsvString(r);else {const i=a8[r.toLowerCase()];i&&this.fromHexString(parseInt(i,36).toString(16).padStart(6,"0"));}}else if(t instanceof Ft)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(n("rgb"))this.r=kl(t.r),this.g=kl(t.g),this.b=kl(t.b),this.a=typeof t.a=="number"?kl(t.a,1):1;else if(n("hsl"))this.fromHsl(t);else if(n("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const n=this.toHsv();return n.h=t,this._c(n)}getLuminance(){function t(i){const s=i/255;return s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4)}const n=t(this.r),r=t(this.g),o=t(this.b);return .2126*n+.7152*r+.0722*o}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=Pn(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4));}return this._h}getSaturation(){if(typeof this._s>"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax();}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const n=this.getHue(),r=this.getSaturation();let o=this.getLightness()-t/100;return o<0&&(o=0),this._c({h:n,s:r,l:o,a:this.a})}lighten(t=10){const n=this.getHue(),r=this.getSaturation();let o=this.getLightness()+t/100;return o>1&&(o=1),this._c({h:n,s:r,l:o,a:this.a})}mix(t,n=50){const r=this._c(t),o=n/100,i=a=>(r[a]-this[a])*o+this[a],s={r:Pn(i("r")),g:Pn(i("g")),b:Pn(i("b")),a:Pn(i("a")*100)/100};return this._c(s)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const n=this._c(t),r=this.a+n.a*(1-this.a),o=i=>Pn((this[i]*this.a+n[i]*n.a*(1-this.a))/r);return this._c({r:o("r"),g:o("g"),b:o("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const n=(this.r||0).toString(16);t+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);t+=r.length===2?r:"0"+r;const o=(this.b||0).toString(16);if(t+=o.length===2?o:"0"+o,typeof this.a=="number"&&this.a>=0&&this.a<1){const i=Pn(this.a*255).toString(16);t+=i.length===2?i:"0"+i;}return t}toHsl(){return {h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),n=Pn(this.getSaturation()*100),r=Pn(this.getLightness()*100);return this.a!==1?`hsla(${t},${n}%,${r}%,${this.a})`:`hsl(${t},${n}%,${r}%)`}toHsv(){return {h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return {r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,n,r){const o=this.clone();return o[t]=kl(n,r),o}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const n=t.replace("#","");function r(o,i){return parseInt(n[o]+n[i||o],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1);}fromHsl({h:t,s:n,l:r,a:o}){if(this._h=t%360,this._s=n,this._l=r,this.a=typeof o=="number"?o:1,n<=0){const m=Pn(r*255);this.r=m,this.g=m,this.b=m;}let i=0,s=0,a=0;const l=t/60,c=(1-Math.abs(2*r-1))*n,u=c*(1-Math.abs(l%2-1));l>=0&&l<1?(i=c,s=u):l>=1&&l<2?(i=u,s=c):l>=2&&l<3?(s=c,a=u):l>=3&&l<4?(s=u,a=c):l>=4&&l<5?(i=u,a=c):l>=5&&l<6&&(i=c,a=u);const d=r-c/2;this.r=Pn((i+d)*255),this.g=Pn((s+d)*255),this.b=Pn((a+d)*255);}fromHsv({h:t,s:n,v:r,a:o}){this._h=t%360,this._s=n,this._v=r,this.a=typeof o=="number"?o:1;const i=Pn(r*255);if(this.r=i,this.g=i,this.b=i,n<=0)return;const s=t/60,a=Math.floor(s),l=s-a,c=Pn(r*(1-n)*255),u=Pn(r*(1-n*l)*255),d=Pn(r*(1-n*(1-l))*255);switch(a){case 0:this.g=d,this.b=c;break;case 1:this.r=u,this.b=c;break;case 2:this.r=c,this.b=d;break;case 3:this.r=c,this.g=u;break;case 4:this.r=d,this.g=c;break;case 5:default:this.g=c,this.b=u;break}}fromHsvString(t){const n=qp(t,xx);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]});}fromHslString(t){const n=qp(t,xx);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]});}fromRgbString(t){const n=qp(t,(r,o)=>o.includes("%")?Pn(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3];}}const gd=2,wx=.16,l8=.05,c8=.05,u8=.15,O3=5,F3=4,d8=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function Sx(e,t,n){let r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-gd*t:Math.round(e.h)+gd*t:r=n?Math.round(e.h)+gd*t:Math.round(e.h)-gd*t,r<0?r+=360:r>=360&&(r-=360),r}function $x(e,t,n){if(e.h===0&&e.s===0)return e.s;let r;return n?r=e.s-wx*t:t===F3?r=e.s+wx:r=e.s+l8*t,r>1&&(r=1),n&&t===O3&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function Ex(e,t,n){let r;return n?r=e.v+c8*t:r=e.v-u8*t,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function Eu(e,t={}){const n=[],r=new Ft(e),o=r.toHsv();for(let i=O3;i>0;i-=1){const s=new Ft({h:Sx(o,i,true),s:$x(o,i,true),v:Ex(o,i,true)});n.push(s);}n.push(r);for(let i=1;i<=F3;i+=1){const s=new Ft({h:Sx(o,i),s:$x(o,i),v:Ex(o,i)});n.push(s);}return t.theme==="dark"?d8.map(({index:i,amount:s})=>new Ft(t.backgroundColor||"#141414").mix(n[i],s).toHexString()):n.map(i=>i.toHexString())}const Up={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Vg=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];Vg.primary=Vg[5];const jg=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];jg.primary=jg[5];const Wg=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];Wg.primary=Wg[5];const qg=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];qg.primary=qg[5];const Ug=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];Ug.primary=Ug[5];const Gg=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];Gg.primary=Gg[5];const Kg=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];Kg.primary=Kg[5];const Xg=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];Xg.primary=Xg[5];const Nf=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Nf.primary=Nf[5];const Yg=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];Yg.primary=Yg[5];const Qg=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];Qg.primary=Qg[5];const Zg=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];Zg.primary=Zg[5];const Jg=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];Jg.primary=Jg[5];const Gp={red:Vg,volcano:jg,orange:Wg,gold:qg,yellow:Ug,lime:Gg,green:Kg,cyan:Xg,blue:Nf,geekblue:Yg,purple:Qg,magenta:Zg,grey:Jg},X0=f.createContext({});function eb(e,t){if(!e)return false;if(e.contains)return e.contains(t);let n=t;for(;n;){if(n===e)return true;n=n.parentNode;}return false}const Ix="data-rc-order",Px="data-rc-priority",f8="rc-util-key",tb=new Map;function L3({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:f8}function Tm(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function m8(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function Y0(e){return Array.from((tb.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function B3(e,t={}){if(!Ar())return null;const{csp:n,prepend:r,priority:o=0}=t,i=m8(r),s=i==="prependQueue",a=document.createElement("style");a.setAttribute(Ix,i),s&&o&&a.setAttribute(Px,`${o}`),n?.nonce&&(a.nonce=n?.nonce),a.innerHTML=e;const l=Tm(t),{firstChild:c}=l;if(r){if(s){const u=(t.styles||Y0(l)).filter(d=>{if(!["prepend","prependQueue"].includes(d.getAttribute(Ix)))return false;const m=Number(d.getAttribute(Px)||0);return o>=m});if(u.length)return l.insertBefore(a,u[u.length-1].nextSibling),a}l.insertBefore(a,c);}else l.appendChild(a);return a}function k3(e,t={}){let{styles:n}=t;return n||=Y0(Tm(t)),n.find(r=>r.getAttribute(L3(t))===e)}function kc(e,t={}){const n=k3(e,t);n&&Tm(t).removeChild(n);}function p8(e,t){const n=tb.get(e);if(!n||!eb(document,n)){const r=B3("",t),{parentNode:o}=r;tb.set(e,o),e.removeChild(r);}}function Ti(e,t,n={}){const r=Tm(n),o=Y0(r),i={...n,styles:o};p8(r,i);const s=k3(t,i);if(s)return i.csp?.nonce&&s.nonce!==i.csp?.nonce&&(s.nonce=i.csp?.nonce),s.innerHTML!==e&&(s.innerHTML=e),s;const a=B3(e,i);return a.setAttribute(L3(i),t),a}function D3(e){return e?.getRootNode?.()}function h8(e){return D3(e)instanceof ShadowRoot}function Mf(e){return h8(e)?D3(e):null}function g8(e){return e.replace(/-(.)/g,(t,n)=>n.toUpperCase())}function b8(e,t){Cn(e,`[@ant-design/icons] ${t}`);}function Nx(e){return typeof e=="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(typeof e.icon=="object"||typeof e.icon=="function")}function Mx(e={}){return Object.keys(e).reduce((t,n)=>{const r=e[n];switch(n){case "class":t.className=r,delete t.class;break;default:delete t[n],t[g8(n)]=r;}return t},{})}function nb(e,t,n){return n?f.createElement(e.tag,{key:t,...Mx(e.attrs),...n},(e.children||[]).map((r,o)=>nb(r,`${t}-${e.tag}-${o}`))):f.createElement(e.tag,{key:t,...Mx(e.attrs)},(e.children||[]).map((r,o)=>nb(r,`${t}-${e.tag}-${o}`)))}function z3(e){return Eu(e)[0]}function _3(e){return e?Array.isArray(e)?e:[e]:[]}const v8=`
.anticon {
display: inline-flex;
align-items: center;
color: inherit;
font-style: normal;
line-height: 0;
text-align: center;
text-transform: none;
vertical-align: -0.125em;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.anticon > * {
line-height: 1;
}
.anticon svg {
display: inline-block;
vertical-align: inherit;
}
.anticon::before {
display: none;
}
.anticon .anticon-icon {
display: block;
}
.anticon[tabindex] {
cursor: pointer;
}
.anticon-spin::before,
.anticon-spin {
display: inline-block;
-webkit-animation: loadingCircle 1s infinite linear;
animation: loadingCircle 1s infinite linear;
}
@-webkit-keyframes loadingCircle {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes loadingCircle {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
`,y8=e=>{const{csp:t,prefixCls:n,layer:r}=f.useContext(X0);let o=v8;n&&(o=o.replace(/anticon/g,n)),r&&(o=`@layer ${r} {
${o}
}`),f.useEffect(()=>{const i=e.current,s=Mf(i);Ti(o,"@ant-design-icons",{prepend:!r,csp:t,attachTo:s});},[]);},gc={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:false};function C8({primaryColor:e,secondaryColor:t}){gc.primaryColor=e,gc.secondaryColor=t||z3(e),gc.calculated=!!t;}function x8(){return {...gc}}const cl=e=>{const{icon:t,className:n,onClick:r,style:o,primaryColor:i,secondaryColor:s,...a}=e,l=f__namespace.useRef(null);let c=gc;if(i&&(c={primaryColor:i,secondaryColor:s||z3(i)}),y8(l),b8(Nx(t),`icon should be icon definiton, but got ${t}`),!Nx(t))return null;let u=t;return u&&typeof u.icon=="function"&&(u={...u,icon:u.icon(c.primaryColor,c.secondaryColor)}),nb(u.icon,`svg-${u.name}`,{className:n,onClick:r,style:o,"data-icon":u.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...a,ref:l})};cl.displayName="IconReact";cl.getTwoToneColors=x8;cl.setTwoToneColors=C8;function H3(e){const[t,n]=_3(e);return cl.setTwoToneColors({primaryColor:t,secondaryColor:n})}function w8(){const e=cl.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}function rb(){return rb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},rb.apply(this,arguments)}H3(Nf.primary);const on=f__namespace.forwardRef((e,t)=>{const{className:n,icon:r,spin:o,rotate:i,tabIndex:s,onClick:a,twoToneColor:l,...c}=e,{prefixCls:u="anticon",rootClassName:d}=f__namespace.useContext(X0),m=H(d,u,{[`${u}-${r.name}`]:!!r.name,[`${u}-spin`]:!!o||r.name==="loading"},n);let p=s;p===void 0&&a&&(p=-1);const h=i?{msTransform:`rotate(${i}deg)`,transform:`rotate(${i}deg)`}:void 0,[g,b]=_3(l);return f__namespace.createElement("span",rb({role:"img","aria-label":r.name},c,{ref:t,tabIndex:p,onClick:a,className:m}),f__namespace.createElement(cl,{icon:r,primaryColor:g,secondaryColor:b,style:h}))});on.getTwoToneColor=w8;on.setTwoToneColor=H3;function ob(){return ob=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},ob.apply(this,arguments)}const S8=(e,t)=>f__namespace.createElement(on,ob({},e,{ref:t,icon:s8})),ai=f__namespace.forwardRef(S8),$8=f__namespace.createContext({}),V3={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};var E8={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:true};function Dc(e){"@babel/helpers - typeof";return Dc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dc(e)}function Rx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r);}return n}function Ax(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Rx(Object(n),true).forEach(function(r){I8(e,r,n[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r));});}return e}function I8(e,t,n){return t=P8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true}):e[t]=n,e}function P8(e){var t=N8(e,"string");return Dc(t)=="symbol"?t:String(t)}function N8(e,t){if(Dc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Dc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return (t==="string"?String:Number)(e)}var M8=Ax(Ax({},E8),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"});const j3={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},Tx={lang:{placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"],...M8},timePickerLocale:{...j3}},xr="${label} is not a valid ${type}",po={locale:"en",Pagination:V3,DatePicker:Tx,TimePicker:j3,Calendar:Tx,global:{placeholder:"Please select",close:"Close",sortable:"sortable"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:xr,method:xr,array:xr,object:xr,number:xr,date:xr,boolean:xr,integer:xr,float:xr,regexp:xr,email:xr,url:xr,hex:xr},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};let Yd={...po.Modal},Qd=[];const Ox=()=>Qd.reduce((e,t)=>({...e,...t}),po.Modal);function R8(e){if(e){const t={...e};return Qd.push(t),Yd=Ox(),()=>{Qd=Qd.filter(n=>n!==t),Yd=Ox();}}Yd={...po.Modal};}function W3(){return Yd}const Q0=f.createContext(void 0),ar=(e,t)=>{const n=f__namespace.useContext(Q0),r=f__namespace.useMemo(()=>{const i=t||po[e],s=n?.[e]??{};return {...typeof i=="function"?i():i,...s||{}}},[e,t,n]),o=f__namespace.useMemo(()=>{const i=n?.locale;return n?.exist&&!i?po.locale:i},[n]);return [r,o]},A8="internalMark",T8=e=>{const{locale:t={},children:n,_ANT_MARK__:r}=e;f__namespace.useEffect(()=>R8(t?.Modal),[t]);const o=f__namespace.useMemo(()=>({...t,exist:true}),[t]);return f__namespace.createElement(Q0.Provider,{value:o},n)};function Fx(...e){const t={};return e.forEach(n=>{n&&Object.keys(n).forEach(r=>{n[r]!==void 0&&(t[r]=n[r]);});}),t}const kn=e=>e!=null,Di=e=>{if(!e)return;const{closable:t,closeIcon:n}=e;return {closable:t,closeIcon:n}},q3={},Lx=(e,t)=>{if(!e&&(e===false||t===false||t===null))return false;if(e===void 0&&t===void 0)return null;let n={closeIcon:typeof t!="boolean"&&t!==null?t:void 0};return e&&typeof e=="object"&&(n={...n,...e}),n},O8=(e,t,n)=>e===false?false:e?Fx(n,t,e):t===false?false:t?Fx(n,t):n.closable?n:false,F8=(e,t,n)=>{const{closeIconRender:r}=t,{closeIcon:o,...i}=e;let s=o;const a=or(i,true);return kn(s)&&(r&&(s=r(s)),s=f.isValidElement(s)?f.cloneElement(s,{"aria-label":n,...s.props,...a}):f.createElement("span",{"aria-label":n,...a},s)),[s,a]},U3=(e,t,n=q3,r="Close")=>{const o=Lx(e?.closable,e?.closeIcon),i=Lx(t?.closable,t?.closeIcon),s={closeIcon:f.createElement(ai,null),...n},a=O8(o,i,s),l=typeof a!="boolean"?!!a?.disabled:false;if(a===false)return [false,null,l,{}];const[c,u]=F8(a,s,r);return [true,c,l,u]},Z0=(e,t,n=q3)=>{const[r]=ar("global",po.global);return f.useMemo(()=>U3(e,t,{closeIcon:f.createElement(ai,null),...n},r.close),[e,t,n,r.close])},G3=()=>f.useReducer(e=>e+1,0),Bx=e=>e&&typeof e=="object"?e:typeof e=="boolean"?{enabled:e,blur:e}:{},L8=(e,t,n)=>f.useMemo(()=>{const r=Bx(e),i={...Bx(t),...r},s=i.blur!==false?`${n}-mask-blur`:void 0;return [i.enabled!==false,{mask:s}]},[e,t,n]);function ib(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function B8(e){if(Array.isArray(e))return ib(e)}function k8(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function J0(e,t){if(e){if(typeof e=="string")return ib(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ib(e,t):void 0}}function D8(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Et(e){return B8(e)||k8(e)||J0(e)||D8()}const Om=(e,...t)=>{const n=e||{};return t.filter(Boolean).reduce((r,o)=>(Object.keys(o||{}).forEach(i=>{const s=n[i],a=o[i];if(s&&typeof s=="object")if(a&&typeof a=="object")r[i]=Om(s,r[i],a);else {const{_default:l}=s;l&&(r[i]=r[i]||{},r[i][l]=H(r[i][l],a));}else r[i]=H(r[i],a);}),r),{})},z8=(e,...t)=>f__namespace.useMemo(()=>Om.apply(void 0,[e].concat(t)),[e].concat(t)),ey=(...e)=>e.filter(Boolean).reduce((t,n={})=>(Object.keys(n).forEach(r=>{t[r]={...t[r],...n[r]};}),t),{}),_8=(...e)=>f__namespace.useMemo(()=>ey.apply(void 0,e),[].concat(e)),sb=(e,t)=>{const n={...e};return Object.keys(t).forEach(r=>{if(r!=="_default"){const o=t[r],i=n[r]||{};n[r]=o?sb(i,o):i;}}),n},Ei=(e,t)=>typeof e=="function"?e(t):e,It=(e,t,n,r)=>{const o=e.map(l=>l?Ei(l,n):void 0),i=t.map(l=>l?Ei(l,n):void 0),s=z8.apply(void 0,[r].concat(Et(o))),a=_8.apply(void 0,Et(i));return f__namespace.useMemo(()=>r?[sb(s,r),sb(a,r)]:[s,a],[s,a,r])},kx=e=>{const[t,n]=f.useState(null);return [f.useCallback((o,i,s)=>{const a=t??o,l=Math.min(a||0,o),c=Math.max(a||0,o),u=i.slice(l,c+1).map(e),d=u.some(p=>!s.has(p)),m=[];return u.forEach(p=>{d?(s.has(p)||m.push(p),s.add(p)):(s.delete(p),m.push(p));}),n(d?c:null),m},[t]),n]},Dx=e=>e==="horizontal"||e==="vertical",qs=(e,t,n)=>f.useMemo(()=>{const r=Dx(e);let o;return r?o=e:typeof t=="boolean"?o=t?"vertical":"horizontal":o=Dx(n)?n:"horizontal",[o,o==="vertical"]},[n,e,t]),H8=()=>{const[e,t]=f__namespace.useState([]),n=f__namespace.useCallback(r=>(t(o=>[].concat(Et(o),[r])),()=>{t(o=>o.filter(i=>i!==r));}),[]);return [e,n]};function Ma(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&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)}function zi(e,t,n=false){const r=new Set;function o(i,s,a=1){const l=r.has(i);if(Cn(!l,"Warning: There may be circular references"),l)return false;if(i===s)return true;if(n&&a>1)return false;r.add(i);const c=a+1;if(Array.isArray(i)){if(!Array.isArray(s)||i.length!==s.length)return false;for(let u=0;u<i.length;u++)if(!o(i[u],s[u],c))return false;return true}if(i&&s&&typeof i=="object"&&typeof s=="object"){const u=Object.keys(i);return u.length!==Object.keys(s).length?false:u.every(d=>o(i[d],s[d],c))}return false}return o(e,t)}const V8="%";function ab(e){return e.join(V8)}let zx=0;class j8{instanceId;constructor(t){this.instanceId=t;}cache=new Map;updateTimes=new Map;extracted=new Set;get(t){return this.opGet(ab(t))}opGet(t){return this.cache.get(t)||null}update(t,n){return this.opUpdate(ab(t),n)}opUpdate(t,n){const r=this.cache.get(t),o=n(r);o===null?(this.cache.delete(t),this.updateTimes.delete(t)):(this.cache.set(t,o),this.updateTimes.set(t,zx),zx+=1);}}const W8={},ty="data-token-hash",ni="data-css-hash",Ii="__cssinjs_instance__";function K3(){const e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const t=document.body.querySelectorAll(`style[${ni}]`)||[],{firstChild:n}=document.head;Array.from(t).forEach(o=>{o[Ii]=o[Ii]||e,o[Ii]===e&&document.head.insertBefore(o,n);});const r={};Array.from(document.querySelectorAll(`style[${ni}]`)).forEach(o=>{const i=o.getAttribute(ni);r[i]?o[Ii]===e&&o.parentNode?.removeChild(o):r[i]=true;});}return new j8(e)}const Ts=f__namespace.createContext({hashPriority:"low",cache:K3(),defaultCache:true,autoPrefix:false}),q8=e=>{const{children:t,...n}=e,r=f__namespace.useContext(Ts),o=ll(()=>{const i={...r};Object.keys(n).forEach(l=>{const c=n[l];n[l]!==void 0&&(i[l]=c);});const{cache:s,transformers:a=[]}=n;return i.cache=i.cache||K3(),i.defaultCache=!s&&r.defaultCache,a.includes(W8)&&(i.autoPrefix=true),i},[r,n],(i,s)=>!zi(i[0],s[0],true)||!zi(i[1],s[1],true));return f__namespace.createElement(Ts.Provider,{value:o},t)};function U8(e,t){if(e.length!==t.length)return false;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return false;return true}class Rf{static MAX_CACHE_SIZE=20;static MAX_CACHE_OFFSET=5;cache;keys;cacheCallTimes;constructor(){this.cache=new Map,this.keys=[],this.cacheCallTimes=0;}size(){return this.keys.length}internalGet(t,n=false){let r={map:this.cache};return t.forEach(o=>{r?r=r?.map?.get(o):r=void 0;}),r?.value&&n&&(r.value[1]=this.cacheCallTimes++),r?.value}get(t){return this.internalGet(t,true)?.[0]}has(t){return !!this.internalGet(t)}set(t,n){if(!this.has(t)){if(this.size()+1>Rf.MAX_CACHE_SIZE+Rf.MAX_CACHE_OFFSET){const[o]=this.keys.reduce((i,s)=>{const[,a]=i;return this.internalGet(s)[1]<a?[s,this.internalGet(s)[1]]:i},[this.keys[0],this.cacheCallTimes]);this.delete(o);}this.keys.push(t);}let r=this.cache;t.forEach((o,i)=>{if(i===t.length-1)r.set(o,{value:[n,this.cacheCallTimes++]});else {const s=r.get(o);s?s.map||(s.map=new Map):r.set(o,{map:new Map}),r=r.get(o).map;}});}deleteByPath(t,n){const r=t.get(n[0]);if(n.length===1)return r.map?t.set(n[0],{map:r.map}):t.delete(n[0]),r.value?.[0];const o=this.deleteByPath(r.map,n.slice(1));return (!r.map||r.map.size===0)&&!r.value&&t.delete(n[0]),o}delete(t){if(this.has(t))return this.keys=this.keys.filter(n=>!U8(n,t)),this.deleteByPath(this.cache,t)}}let _x=0;class X3{derivatives;id;constructor(t){this.derivatives=Array.isArray(t)?t:[t],this.id=_x,t.length===0&&(t.length>0,void 0),_x+=1;}getDerivativeToken(t){return this.derivatives.reduce((n,r)=>r(t,n),void 0)}}const Kp=new Rf;function Af(e){const t=Array.isArray(e)?e:[e];return Kp.has(t)||Kp.set(t,new X3(t)),Kp.get(t)}const G8=new WeakMap,Xp={};function K8(e,t){let n=G8;for(let r=0;r<t.length;r+=1){const o=t[r];n.has(o)||n.set(o,new WeakMap),n=n.get(o);}return n.has(Xp)||n.set(Xp,e()),n.get(Xp)}const Hx=new WeakMap;function bc(e){let t=Hx.get(e)||"";return t||(Object.keys(e).forEach(n=>{const r=e[n];t+=n,r instanceof X3?t+=r.id:r&&typeof r=="object"?t+=bc(r):t+=r;}),t=Ma(t),Hx.set(e,t)),t}function X8(e,t){return Ma(`${t}_${bc(e)}`)}const lb=Ar();function X(e){return typeof e=="number"?`${e}px`:e}function Y8(e){const{hashCls:t,hashPriority:n="low"}=e||{};if(!t)return "";const r=`.${t}`;return n==="low"?`:where(${r})`:r}const Zd=(e,t="")=>`--${t?`${t}-`:""}${e}`.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase(),Q8=(e,t,n)=>{const{hashCls:r,hashPriority:o="low"}=n||{};return Object.keys(e).length?`${Y8({hashCls:r,hashPriority:o})}.${t}${n?.scope?`.${n.scope}`:""}{${Object.entries(e).map(([i,s])=>`${i}:${s};`).join("")}}`:""},Y3=(e,t,n)=>{const{hashCls:r,hashPriority:o="low",prefix:i,unitless:s,ignore:a,preserve:l}=n||{},c={},u={};return Object.entries(e).forEach(([d,m])=>{if(l?.[d])u[d]=m;else if((typeof m=="string"||typeof m=="number")&&!a?.[d]){const p=Zd(d,i);c[p]=typeof m=="number"&&!s?.[d]?`${m}px`:String(m),u[d]=`var(${p})`;}}),[u,Q8(c,t,{scope:n?.scope,hashCls:r,hashPriority:o})]},bd=new Map;function ny(e,t,n,r,o){const{cache:i}=f__namespace.useContext(Ts),s=[e,...t],a=ab(s),l=d=>{i.opUpdate(a,m=>{const[p=0,h]=m||[void 0,void 0],b=h||n(),y=[p,b];return d?d(y):y});};f__namespace.useMemo(()=>{l();},[a]);const u=i.opGet(a)[1];return f.useInsertionEffect(()=>(l(([d,m])=>[d+1,m]),bd.has(a)||(o?.(u),bd.set(a,true),Promise.resolve().then(()=>{bd.delete(a);})),()=>{i.opUpdate(a,d=>{const[m=0,p]=d||[];return m-1===0?(r?.(p,false),bd.delete(a),null):[m-1,p]});}),[a]),u}const Z8={},J8="css",hs=new Map;function e9(e){hs.set(e,(hs.get(e)||0)+1);}function t9(e,t){typeof document<"u"&&document.querySelectorAll(`style[${ty}="${e}"]`).forEach(r=>{r[Ii]===t&&r.parentNode?.removeChild(r);});}const n9=-1;function r9(e,t){hs.set(e,(hs.get(e)||0)-1);const n=new Set;hs.forEach((r,o)=>{r<=0&&n.add(o);}),hs.size-n.size>n9&&n.forEach(r=>{t9(r,t),hs.delete(r);});}const Q3=(e,t,n,r)=>{let i={...n.getDerivativeToken(e),...t};return r&&(i=r(i)),i},o9="token";function i9(e,t,n){const{cache:{instanceId:r},container:o,hashPriority:i}=f.useContext(Ts),{salt:s="",override:a=Z8,formatToken:l,getComputedToken:c,cssVar:u}=n,d=K8(()=>Object.assign({},...t),t),m=bc(d),p=bc(a),h=bc(u);return ny(o9,[s,e.id,m,p,h],()=>{const b=c?c(d,a,e):Q3(d,a,e,l),y={...b},C=`${s}_${u.prefix}`,x=Ma(C),w=`${J8}-${Ma(C)}`;y._tokenKey=X8(y,C);const[S,I]=Y3(b,u.key,{prefix:u.prefix,ignore:u.ignore,unitless:u.unitless,preserve:u.preserve,hashPriority:i,hashCls:u.hashed?w:void 0});return S._hashId=x,e9(u.key),[S,w,y,I,u.key]},([,,,,b])=>{r9(b,r);},([,,,b,y])=>{if(!b)return;const C=Ti(b,Ma(`css-var-${y}`),{mark:ni,prepend:"queue",attachTo:o,priority:-999});C[Ii]=r,C.setAttribute(ty,y);})}var s9={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},nn="-ms-",vc="-moz-",Ht="-webkit-",Z3="comm",ry="rule",oy="decl",a9="@import",l9="@namespace",J3="@keyframes",c9="@layer",eI=Math.abs,iy=String.fromCharCode,cb=Object.assign;function u9(e,t){return wn(e,0)^45?(((t<<2^wn(e,0))<<2^wn(e,1))<<2^wn(e,2))<<2^wn(e,3):0}function tI(e){return e.trim()}function qo(e,t){return (e=t.exec(e))?e[0]:e}function Nt(e,t,n){return e.replace(t,n)}function Jd(e,t,n){return e.indexOf(t,n)}function wn(e,t){return e.charCodeAt(t)|0}function Os(e,t,n){return e.slice(t,n)}function so(e){return e.length}function nI(e){return e.length}function sc(e,t){return t.push(e),e}function d9(e,t){return e.map(t).join("")}function Vx(e,t){return e.filter(function(n){return !qo(n,t)})}var Fm=1,ja=1,rI=0,Qr=0,gn=0,ul="";function Lm(e,t,n,r,o,i,s,a){return {value:e,root:t,parent:n,type:r,props:o,children:i,line:Fm,column:ja,length:s,return:"",siblings:a}}function yi(e,t){return cb(Lm("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function ia(e){for(;e.root;)e=yi(e.root,{children:[e]});sc(e,e.siblings);}function f9(){return gn}function m9(){return gn=Qr>0?wn(ul,--Qr):0,ja--,gn===10&&(ja=1,Fm--),gn}function fo(){return gn=Qr<rI?wn(ul,Qr++):0,ja++,gn===10&&(ja=1,Fm++),gn}function Pi(){return wn(ul,Qr)}function ef(){return Qr}function Bm(e,t){return Os(ul,e,t)}function zc(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 p9(e){return Fm=ja=1,rI=so(ul=e),Qr=0,[]}function h9(e){return ul="",e}function Yp(e){return tI(Bm(Qr-1,ub(e===91?e+2:e===40?e+1:e)))}function g9(e){for(;(gn=Pi())&&gn<33;)fo();return zc(e)>2||zc(gn)>3?"":" "}function b9(e,t){for(;--t&&fo()&&!(gn<48||gn>102||gn>57&&gn<65||gn>70&&gn<97););return Bm(e,ef()+(t<6&&Pi()==32&&fo()==32))}function ub(e){for(;fo();)switch(gn){case e:return Qr;case 34:case 39:e!==34&&e!==39&&ub(gn);break;case 40:e===41&&ub(e);break;case 92:fo();break}return Qr}function v9(e,t){for(;fo()&&e+gn!==57;)if(e+gn===84&&Pi()===47)break;return "/*"+Bm(t,Qr-1)+"*"+iy(e===47?e:fo())}function y9(e){for(;!zc(Pi());)fo();return Bm(e,Qr)}function jx(e){return h9(tf("",null,null,null,[""],e=p9(e),0,[0],e))}function tf(e,t,n,r,o,i,s,a,l){for(var c=0,u=0,d=s,m=0,p=0,h=0,g=1,b=1,y=1,C=0,x="",w=o,S=i,I=r,$=x;b;)switch(h=C,C=fo()){case 40:if(h!=108&&wn($,d-1)==58){Jd($+=Nt(Yp(C),"&","&\f"),"&\f",eI(c?a[c-1]:0))!=-1&&(y=-1);break}case 34:case 39:case 91:$+=Yp(C);break;case 9:case 10:case 13:case 32:$+=g9(h);break;case 92:$+=b9(ef()-1,7);continue;case 47:switch(Pi()){case 42:case 47:sc(C9(v9(fo(),ef()),t,n,l),l),(zc(h||1)==5||zc(Pi()||1)==5)&&so($)&&Os($,-1,void 0)!==" "&&($+=" ");break;default:$+="/";}break;case 123*g:a[c++]=so($)*y;case 125*g:case 59:case 0:switch(C){case 0:case 125:b=0;case 59+u:y==-1&&($=Nt($,/\f/g,"")),p>0&&(so($)-d||g===0&&h===47)&&sc(p>32?qx($+";",r,n,d-1,l):qx(Nt($," ","")+";",r,n,d-2,l),l);break;case 59:$+=";";default:if(sc(I=Wx($,t,n,c,u,o,a,x,w=[],S=[],d,i),i),C===123)if(u===0)tf($,t,I,I,w,i,d,a,S);else {switch(m){case 99:if(wn($,3)===110)break;case 108:if(wn($,2)===97)break;default:u=0;case 100:case 109:case 115:}u?tf(e,I,I,r&&sc(Wx(e,I,I,0,0,o,a,x,o,w=[],d,S),S),o,S,d,a,r?w:S):tf($,I,I,I,[""],S,0,a,S);}}c=u=p=0,g=y=1,x=$="",d=s;break;case 58:d=1+so($),p=h;default:if(g<1){if(C==123)--g;else if(C==125&&g++==0&&m9()==125)continue}switch($+=iy(C),C*g){case 38:y=u>0?1:($+="\f",-1);break;case 44:a[c++]=(so($)-1)*y,y=1;break;case 64:Pi()===45&&($+=Yp(fo())),m=Pi(),u=d=so(x=$+=y9(ef())),C++;break;case 45:h===45&&so($)==2&&(g=0);}}return i}function Wx(e,t,n,r,o,i,s,a,l,c,u,d){for(var m=o-1,p=o===0?i:[""],h=nI(p),g=0,b=0,y=0;g<r;++g)for(var C=0,x=Os(e,m+1,m=eI(b=s[g])),w=e;C<h;++C)(w=tI(b>0?p[C]+" "+x:Nt(x,/&\f/g,p[C])))&&(l[y++]=w);return Lm(e,t,n,o===0?ry:a,l,c,u,d)}function C9(e,t,n,r){return Lm(e,t,n,Z3,iy(f9()),Os(e,2,-2),0,r)}function qx(e,t,n,r,o){return Lm(e,t,n,oy,Os(e,0,r),Os(e,r+1,-1),r,o)}function oI(e,t,n){switch(u9(e,t)){case 5103:return Ht+"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 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return Ht+e+e;case 4855:return Ht+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return vc+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ht+e+vc+e+nn+e+e;case 5936:switch(wn(e,t+11)){case 114:return Ht+e+nn+Nt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ht+e+nn+Nt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ht+e+nn+Nt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Ht+e+nn+e+e;case 6165:return Ht+e+nn+"flex-"+e+e;case 5187:return Ht+e+Nt(e,/(\w+).+(:[^]+)/,Ht+"box-$1$2"+nn+"flex-$1$2")+e;case 5443:return Ht+e+nn+"flex-item-"+Nt(e,/flex-|-self/g,"")+(qo(e,/flex-|baseline/)?"":nn+"grid-row-"+Nt(e,/flex-|-self/g,""))+e;case 4675:return Ht+e+nn+"flex-line-pack"+Nt(e,/align-content|flex-|-self/g,"")+e;case 5548:return Ht+e+nn+Nt(e,"shrink","negative")+e;case 5292:return Ht+e+nn+Nt(e,"basis","preferred-size")+e;case 6060:return Ht+"box-"+Nt(e,"-grow","")+Ht+e+nn+Nt(e,"grow","positive")+e;case 4554:return Ht+Nt(e,/([^-])(transform)/g,"$1"+Ht+"$2")+e;case 6187:return Nt(Nt(Nt(e,/(zoom-|grab)/,Ht+"$1"),/(image-set)/,Ht+"$1"),e,"")+e;case 5495:case 3959:return Nt(e,/(image-set\([^]*)/,Ht+"$1$`$1");case 4968:return Nt(Nt(e,/(.+:)(flex-)?(.*)/,Ht+"box-pack:$3"+nn+"flex-pack:$3"),/space-between/,"justify")+Ht+e+e;case 4200:if(!qo(e,/flex-|baseline/))return nn+"grid-column-align"+Os(e,t)+e;break;case 2592:case 3360:return nn+Nt(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(r,o){return t=o,qo(r.props,/grid-\w+-end/)})?~Jd(e+(n=n[t].value),"span",0)?e:nn+Nt(e,"-start","")+e+nn+"grid-row-span:"+(~Jd(n,"span",0)?qo(n,/\d+/):+qo(n,/\d+/)-+qo(e,/\d+/))+";":nn+Nt(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(r){return qo(r.props,/grid-\w+-start/)})?e:nn+Nt(Nt(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Nt(e,/(.+)-inline(.+)/,Ht+"$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(so(e)-1-t>6)switch(wn(e,t+1)){case 109:if(wn(e,t+4)!==45)break;case 102:return Nt(e,/(.+:)(.+)-([^]+)/,"$1"+Ht+"$2-$3$1"+vc+(wn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return ~Jd(e,"stretch",0)?oI(Nt(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return Nt(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,o,i,s,a,l,c){return nn+o+":"+i+c+(s?nn+o+"-span:"+(a?l:+l-+i)+c:"")+e});case 4949:if(wn(e,t+6)===121)return Nt(e,":",":"+Ht)+e;break;case 6444:switch(wn(e,wn(e,14)===45?18:11)){case 120:return Nt(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Ht+(wn(e,14)===45?"inline-":"")+"box$3$1"+Ht+"$2$3$1"+nn+"$2box$3")+e;case 100:return Nt(e,":",":"+nn)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Nt(e,"scroll-","scroll-snap-")+e}return e}function _c(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function Ux(e,t,n,r){switch(e.type){case c9:if(e.children.length)break;case a9:case l9:case oy:return e.return=e.return||e.value;case Z3:return "";case J3:return e.return=e.value+"{"+_c(e.children,r)+"}";case ry:if(!so(e.value=e.props.join(",")))return ""}return so(n=_c(e.children,r))?e.return=e.value+"{"+n+"}":""}function x9(e){var t=nI(e);return function(n,r,o,i){for(var s="",a=0;a<t;a++)s+=e[a](n,r,o,i)||"";return s}}function w9(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case oy:e.return=oI(e.value,e.length,n);return;case J3:return _c([yi(e,{value:Nt(e.value,"@","@"+Ht)})],r);case ry:if(e.length)return d9(n=e.props,function(o){switch(qo(o,r=/(::plac\w+|:read-\w+)/)){case ":read-only":case ":read-write":ia(yi(e,{props:[Nt(o,/:(read-\w+)/,":"+vc+"$1")]})),ia(yi(e,{props:[o]})),cb(e,{props:Vx(n,r)});break;case "::placeholder":ia(yi(e,{props:[Nt(o,/:(plac\w+)/,":"+Ht+"input-$1")]})),ia(yi(e,{props:[Nt(o,/:(plac\w+)/,":"+vc+"$1")]})),ia(yi(e,{props:[Nt(o,/:(plac\w+)/,nn+"input-$1")]})),ia(yi(e,{props:[o]})),cb(e,{props:Vx(n,r)});break}return ""})}}const Gx="data-ant-cssinjs-cache-path",iI="_FILE_STYLE__";let Ss,sI=true;function S9(){if(!Ss&&(Ss={},Ar())){const e=document.createElement("div");e.className=Gx,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);let t=getComputedStyle(e).content||"";t=t.replace(/^"/,"").replace(/"$/,""),t.split(";").forEach(r=>{const[o,i]=r.split(":");Ss[o]=i;});const n=document.querySelector(`style[${Gx}]`);n&&(sI=false,n.parentNode?.removeChild(n)),document.body.removeChild(e);}}function $9(e){return S9(),!!Ss[e]}function E9(e){const t=Ss[e];let n=null;if(t&&Ar())if(sI)n=iI;else {const r=document.querySelector(`style[${ni}="${Ss[e]}"]`);r?n=r.innerHTML:delete Ss[e];}return [n,t]}const I9="_skip_check_",aI="_multi_value_";function Qp(e,t){return (t?_c(jx(e),x9([w9,Ux])):_c(jx(e),Ux)).replace(/\{%%%\:[^;];}/g,";")}function P9(e){return typeof e=="object"&&e&&(I9 in e||aI in e)}function Kx(e,t,n){if(!t)return e;const r=`.${t}`,o=n==="low"?`:where(${r})`:r;return e.split(",").map(s=>{const a=s.trim().split(/\s+/);let l=a[0]||"";const c=l.match(/^\w+/)?.[0]||"";return l=`${c}${o}${l.slice(c.length)}`,[l,...a.slice(1)].join(" ")}).join(",")}const db=(e,t={},{root:n,injectHash:r,parentSelectors:o}={root:true,parentSelectors:[]})=>{const{hashId:i,layer:s,path:a,hashPriority:l,transformers:c=[],linters:u=[]}=t;let d="",m={};function p(b){const y=b.getName(i);if(!m[y]){const[C]=db(b.style,t,{root:false,parentSelectors:o});m[y]=`@keyframes ${b.getName(i)}${C}`;}}function h(b,y=[]){return b.forEach(C=>{Array.isArray(C)?h(C,y):C&&y.push(C);}),y}return h(Array.isArray(e)?e:[e]).forEach(b=>{const y=typeof b=="string"&&!n?{}:b;if(typeof y=="string")d+=`${y}
`;else if(y._keyframe)p(y);else {const C=c.reduce((x,w)=>w?.visit?.(x)||x,y);Object.keys(C).forEach(x=>{const w=C[x];if(typeof w=="object"&&w&&(x!=="animationName"||!w._keyframe)&&!P9(w)){let S=false,I=x.trim(),$=false;(n||r)&&i?I.startsWith("@")?S=true:I==="&"?I=Kx("",i,l):I=Kx(x,i,l):n&&!i&&(I==="&"||I==="")&&(I="",$=true);const[E,P]=db(w,t,{root:$,injectHash:S,parentSelectors:[...o,I]});m={...m,...P},d+=`${I}${E}`;}else {let S=function($,E){const P=$.replace(/[A-Z]/g,N=>`-${N.toLowerCase()}`);let M=E;!s9[$]&&typeof M=="number"&&M!==0&&(M=`${M}px`),$==="animationName"&&E?._keyframe&&(p(E),M=E.getName(i)),d+=`${P}:${M};`;};const I=w?.value??w;typeof w=="object"&&w?.[aI]&&Array.isArray(I)?I.forEach($=>{S(x,$);}):S(x,I);}});}}),n?s&&(d&&(d=`@layer ${s.name} {${d}}`),s.dependencies&&(m[`@layer ${s.name}`]=s.dependencies.map(b=>`@layer ${b}, ${s.name};`).join(`
`))):d=`{${d}}`,[d,m]};function lI(e,t){return Ma(`${e.join("%")}${t}`)}const N9="style";function fb(e,t){const{path:n,hashId:r,layer:o,nonce:i,clientOnly:s,order:a=0}=e,{mock:l,hashPriority:c,container:u,transformers:d,linters:m,cache:p,layer:h,autoPrefix:g}=f__namespace.useContext(Ts),b=[r||""];h&&b.push("layer"),b.push(...n);let y=lb;ny(N9,b,()=>{const C=b.join("|");if($9(C)){const[E,P]=E9(C);if(E)return [E,P,{},s,a]}const x=t(),[w,S]=db(x,{hashId:r,hashPriority:c,layer:h?o:void 0,path:n.join("-"),transformers:d,linters:m}),I=Qp(w,g||false),$=lI(b,I);return [I,$,S,s,a]},(C,x)=>{const[,w]=C;x&&lb&&kc(w,{mark:ni,attachTo:u});},C=>{const[x,w,S,,I]=C;if(y&&x!==iI){const $={mark:ni,prepend:h?false:"queue",attachTo:u,priority:I},E=typeof i=="function"?i():i;E&&($.csp={nonce:E});const P=[],M=[];Object.keys(S).forEach(A=>{A.startsWith("@layer")?P.push(A):M.push(A);}),P.forEach(A=>{Ti(Qp(S[A],g||false),`_layer-${A}`,{...$,prepend:true});});const N=Ti(x,w,$);N[Ii]=p.instanceId,M.forEach(A=>{Ti(Qp(S[A],g||false),`_effect-${A}`,$);});}});}const M9="cssVar",R9=(e,t)=>{const{key:n,prefix:r,unitless:o,ignore:i,token:s,hashId:a,scope:l=""}=e,{cache:{instanceId:c},container:u,hashPriority:d}=f.useContext(Ts),{_tokenKey:m}=s,p=[...e.path,n,l,m];return ny(M9,p,()=>{const g=t(),[b,y]=Y3(g,n,{prefix:r,unitless:o,ignore:i,scope:l,hashPriority:d,hashCls:a}),C=lI(p,y);return [b,y,C,n]},([,,g])=>{lb&&kc(g,{mark:ni,attachTo:u});},([,g,b])=>{if(!g)return;const y=Ti(g,b,{mark:ni,prepend:"queue",attachTo:u,priority:-999});y[Ii]=c,y.setAttribute(ty,n);})};class ht{name;style;constructor(t,n){this.name=t,this.style=n;}getName(t=""){return t?`${t}-${this.name}`:this.name}_keyframe=true}function sa(e){return e.notSplit=true,e}sa(["borderTop","borderBottom"]),sa(["borderTop"]),sa(["borderBottom"]),sa(["borderLeft","borderRight"]),sa(["borderLeft"]),sa(["borderRight"]);const A9="6.1.1",sy={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},Wa={...sy,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:false,motion:true};function cI(e,{generateColorPalettes:t,generateNeutralColorPalettes:n}){const{colorSuccess:r,colorWarning:o,colorError:i,colorInfo:s,colorPrimary:a,colorBgBase:l,colorTextBase:c}=e,u=t(a),d=t(r),m=t(o),p=t(i),h=t(s),g=n(l,c),b=e.colorLink||e.colorInfo,y=t(b),C=new Ft(p[1]).mix(new Ft(p[3]),50).toHexString();return {...g,colorPrimaryBg:u[1],colorPrimaryBgHover:u[2],colorPrimaryBorder:u[3],colorPrimaryBorderHover:u[4],colorPrimaryHover:u[5],colorPrimary:u[6],colorPrimaryActive:u[7],colorPrimaryTextHover:u[8],colorPrimaryText:u[9],colorPrimaryTextActive:u[10],colorSuccessBg:d[1],colorSuccessBgHover:d[2],colorSuccessBorder:d[3],colorSuccessBorderHover:d[4],colorSuccessHover:d[4],colorSuccess:d[6],colorSuccessActive:d[7],colorSuccessTextHover:d[8],colorSuccessText:d[9],colorSuccessTextActive:d[10],colorErrorBg:p[1],colorErrorBgHover:p[2],colorErrorBgFilledHover:C,colorErrorBgActive:p[3],colorErrorBorder:p[3],colorErrorBorderHover:p[4],colorErrorHover:p[5],colorError:p[6],colorErrorActive:p[7],colorErrorTextHover:p[8],colorErrorText:p[9],colorErrorTextActive:p[10],colorWarningBg:m[1],colorWarningBgHover:m[2],colorWarningBorder:m[3],colorWarningBorderHover:m[4],colorWarningHover:m[4],colorWarning:m[6],colorWarningActive:m[7],colorWarningTextHover:m[8],colorWarningText:m[9],colorWarningTextActive:m[10],colorInfoBg:h[1],colorInfoBgHover:h[2],colorInfoBorder:h[3],colorInfoBorderHover:h[4],colorInfoHover:h[4],colorInfo:h[6],colorInfoActive:h[7],colorInfoTextHover:h[8],colorInfoText:h[9],colorInfoTextActive:h[10],colorLinkHover:y[4],colorLink:y[6],colorLinkActive:y[7],colorBgMask:new Ft("#000").setA(.45).toRgbString(),colorWhite:"#fff"}}const T9=e=>{let t=e,n=e,r=e,o=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?o=4:e>=8&&(o=6),{borderRadius:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:o}};function O9(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:o}=e;return {motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:o+1,...T9(r)}}const uI=e=>{const{controlHeight:t}=e;return {controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}};function nf(e){return (e+8)/e}function F9(e){const t=Array.from({length:10}).map((n,r)=>{const o=r-1,i=e*Math.E**(o/5),s=r>1?Math.floor(i):Math.ceil(i);return Math.floor(s/2)*2});return t[1]=e,t.map(n=>({size:n,lineHeight:nf(n)}))}const dI=e=>{const t=F9(e),n=t.map(u=>u.size),r=t.map(u=>u.lineHeight),o=n[1],i=n[0],s=n[2],a=r[1],l=r[0],c=r[2];return {fontSizeSM:i,fontSize:o,fontSizeLG:s,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:a,lineHeightLG:c,lineHeightSM:l,fontHeight:Math.round(a*o),fontHeightLG:Math.round(c*s),fontHeightSM:Math.round(l*i),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function L9(e){const{sizeUnit:t,sizeStep:n}=e;return {sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}const kr=(e,t)=>new Ft(e).setA(t).toRgbString(),aa=(e,t)=>new Ft(e).darken(t).toHexString(),B9=e=>{const t=Eu(e);return {1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},k9=(e,t)=>{const n=e||"#fff",r=t||"#000";return {colorBgBase:n,colorTextBase:r,colorText:kr(r,.88),colorTextSecondary:kr(r,.65),colorTextTertiary:kr(r,.45),colorTextQuaternary:kr(r,.25),colorFill:kr(r,.15),colorFillSecondary:kr(r,.06),colorFillTertiary:kr(r,.04),colorFillQuaternary:kr(r,.02),colorBgSolid:kr(r,1),colorBgSolidHover:kr(r,.75),colorBgSolidActive:kr(r,.95),colorBgLayout:aa(n,4),colorBgContainer:aa(n,0),colorBgElevated:aa(n,0),colorBgSpotlight:kr(r,.85),colorBgBlur:"transparent",colorBorder:aa(n,15),colorBorderDisabled:aa(n,15),colorBorderSecondary:aa(n,6)}};function km(e){Up.pink=Up.magenta,Gp.pink=Gp.magenta;const t=Object.keys(sy).map(n=>{const r=e[n]===Up[n]?Gp[n]:Eu(e[n]);return Array.from({length:10},()=>1).reduce((o,i,s)=>(o[`${n}-${s+1}`]=r[s],o[`${n}${s+1}`]=r[s],o),{})}).reduce((n,r)=>(n={...n,...r},n),{});return {...e,...t,...cI(e,{generateColorPalettes:B9,generateNeutralColorPalettes:k9}),...dI(e.fontSize),...L9(e),...uI(e),...O9(e)}}const ay=Af(km),Hc={token:Wa,override:{override:Wa},hashed:true},ly=f.createContext(Hc);function Zp(e){return e>=0&&e<=255}function ac(e,t){const{r:n,g:r,b:o,a:i}=new Ft(e).toRgb();if(i<1)return e;const{r:s,g:a,b:l}=new Ft(t).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-s*(1-c))/c),d=Math.round((r-a*(1-c))/c),m=Math.round((o-l*(1-c))/c);if(Zp(u)&&Zp(d)&&Zp(m))return new Ft({r:u,g:d,b:m,a:Math.round(c*100)/100}).toRgbString()}return new Ft({r:n,g:r,b:o,a:1}).toRgbString()}function fI(e){const{override:t,...n}=e,r={...t};Object.keys(Wa).forEach(m=>{delete r[m];});const o={...n,...r},i=480,s=576,a=768,l=992,c=1200,u=1600;return o.motion===false&&(o.motionDurationFast="0s",o.motionDurationMid="0s",o.motionDurationSlow="0s"),{...o,colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:ac(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:ac(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:ac(o.colorWarningBg,o.colorBgContainer),fontSizeIcon:o.fontSizeSM,lineWidthFocus:o.lineWidth*3,lineWidth:o.lineWidth,controlOutlineWidth:o.lineWidth*2,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:ac(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:`
0 6px 16px 0 rgba(0, 0, 0, 0.08),
0 3px 6px -4px rgba(0, 0, 0, 0.12),
0 9px 28px 8px rgba(0, 0, 0, 0.05)
`,boxShadowSecondary:`
0 6px 16px 0 rgba(0, 0, 0, 0.08),
0 3px 6px -4px rgba(0, 0, 0, 0.12),
0 9px 28px 8px rgba(0, 0, 0, 0.05)
`,boxShadowTertiary:`
0 1px 2px 0 rgba(0, 0, 0, 0.03),
0 1px 6px -1px rgba(0, 0, 0, 0.02),
0 2px 4px 0 rgba(0, 0, 0, 0.02)
`,screenXS:i,screenXSMin:i,screenXSMax:s-1,screenSM:s,screenSMMin:s,screenSMMax:a-1,screenMD:a,screenMDMin:a,screenMDMax:l-1,screenLG:l,screenLGMin:l,screenLGMax:c-1,screenXL:c,screenXLMin:c,screenXLMax:u-1,screenXXL:u,screenXXLMin:u,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:`
0 1px 2px -2px ${new Ft("rgba(0, 0, 0, 0.16)").toRgbString()},
0 3px 6px 0 ${new Ft("rgba(0, 0, 0, 0.12)").toRgbString()},
0 5px 12px 4px ${new Ft("rgba(0, 0, 0, 0.09)").toRgbString()}
`,boxShadowDrawerRight:`
-6px 0 16px 0 rgba(0, 0, 0, 0.08),
-3px 0 6px -4px rgba(0, 0, 0, 0.12),
-9px 0 28px 8px rgba(0, 0, 0, 0.05)
`,boxShadowDrawerLeft:`
6px 0 16px 0 rgba(0, 0, 0, 0.08),
3px 0 6px -4px rgba(0, 0, 0, 0.12),
9px 0 28px 8px rgba(0, 0, 0, 0.05)
`,boxShadowDrawerUp:`
0 6px 16px 0 rgba(0, 0, 0, 0.08),
0 3px 6px -4px rgba(0, 0, 0, 0.12),
0 9px 28px 8px rgba(0, 0, 0, 0.05)
`,boxShadowDrawerDown:`
0 -6px 16px 0 rgba(0, 0, 0, 0.08),
0 -3px 6px -4px rgba(0, 0, 0, 0.12),
0 -9px 28px 8px rgba(0, 0, 0, 0.05)
`,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)",...r}}const mI={lineHeight:true,lineHeightSM:true,lineHeightLG:true,lineHeightHeading1:true,lineHeightHeading2:true,lineHeightHeading3:true,lineHeightHeading4:true,lineHeightHeading5:true,opacityLoading:true,fontWeightStrong:true,zIndexPopupBase:true,zIndexBase:true,opacityImage:true},D9={motionBase:true,motionUnit:true},z9={screenXS:true,screenXSMin:true,screenXSMax:true,screenSM:true,screenSMMin:true,screenSMMax:true,screenMD:true,screenMDMin:true,screenMDMax:true,screenLG:true,screenLGMin:true,screenLGMax:true,screenXL:true,screenXLMin:true,screenXLMax:true,screenXXL:true,screenXXLMin:true},pI=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:o,...i}=t;let s={...r,override:o};return s=fI(s),i&&Object.entries(i).forEach(([a,l])=>{const{theme:c,...u}=l;let d=u;c&&(d=pI({...s,...u},{override:u},c)),s[a]=d;}),s};function Tn(){const{token:e,hashed:t,theme:n,override:r,cssVar:o,zeroRuntime:i}=f.useContext(ly),s={prefix:o?.prefix??"ant",key:o?.key??"css-var-root"},a=`${A9}-${t||""}`,l=n||ay,[c,u,d]=i9(l,[Wa,e],{salt:a,override:r,getComputedToken:pI,cssVar:{...s,unitless:mI,ignore:D9,preserve:z9}});return [l,d,t?u:"",c,s,!!i]}const Dm=f.createContext(void 0),Ci=100,_9=10,cy=Ci*_9,hI={Modal:Ci,Drawer:Ci,Popover:Ci,Popconfirm:Ci,Tooltip:Ci,Tour:Ci,FloatButton:Ci},H9={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1},V9=e=>e in hI,Us=(e,t)=>{const[,n]=Tn(),r=f.useContext(Dm),o=V9(e);let i;if(t!==void 0)i=[t,t];else {let s=r??0;o?s+=(r?0:n.zIndexPopupBase)+hI[e]:s+=H9[e],i=[r===void 0?t:s,s];}return i},j9=f.createContext(void 0),gI=f__namespace.createContext(null);let W9=false;function q9(e){return W9}const Xx=[];function U9(e,t){const[n]=f__namespace.useState(()=>Ar()?document.createElement("div"):null),r=f__namespace.useRef(false),o=f__namespace.useContext(gI),[i,s]=f__namespace.useState(Xx),a=o||(r.current?void 0:u=>{s(d=>[u,...d]);});function l(){n.parentElement||document.body.appendChild(n),r.current=true;}function c(){n.parentElement?.removeChild(n),r.current=false;}return Kt(()=>(e?o?o(l):l():c(),c),[e]),Kt(()=>{i.length&&(i.forEach(u=>u()),s(Xx));},[i]),[n,a]}function G9(e){const t=`rc-scrollbar-measure-${Math.random().toString(36).substring(7)}`,n=document.createElement("div");n.id=t;const r=n.style;r.position="absolute",r.left="0",r.top="0",r.width="100px",r.height="100px",r.overflow="scroll";let o,i;if(e){const l=getComputedStyle(e);r.scrollbarColor=l.scrollbarColor,r.scrollbarWidth=l.scrollbarWidth;const c=getComputedStyle(e,"::-webkit-scrollbar"),u=parseInt(c.width,10),d=parseInt(c.height,10);try{const m=u?`width: ${c.width};`:"",p=d?`height: ${c.height};`:"";Ti(`
#${t}::-webkit-scrollbar {
${m}
${p}
}`,t);}catch(m){console.error(m),o=u,i=d;}}document.body.appendChild(n);const s=e&&o&&!isNaN(o)?o:n.offsetWidth-n.clientWidth,a=e&&i&&!isNaN(i)?i:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),kc(t),{width:s,height:a}}function K9(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:G9(e)}function X9(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}const Y9=`rc-util-locker-${Date.now()}`;let Yx=0;function Q9(e){const t=!!e,[n]=f__namespace.useState(()=>(Yx+=1,`${Y9}_${Yx}`));Kt(()=>{if(t){const r=K9(document.body).width,o=X9();Ti(`
html body {
overflow-y: hidden;
${o?`width: calc(100% - ${r}px);`:""}
}`,n);}else kc(n);return ()=>{kc(n);}},[t,n]);}const Qx=e=>e===false?false:!Ar()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e,zm=f__namespace.forwardRef((e,t)=>{const{open:n,autoLock:r,getContainer:o,debug:i,autoDestroy:s=true,children:a}=e,[l,c]=f__namespace.useState(n),u=l||n;f__namespace.useEffect(()=>{(s||n)&&c(n);},[n,s]);const[d,m]=f__namespace.useState(()=>Qx(o));f__namespace.useEffect(()=>{const w=Qx(o);m(w??null);});const[p,h]=U9(u&&!d),g=d??p;Q9(r&&n&&Ar()&&(g===p||g===document.body));let b=null;a&&Vs(a)&&t&&(b=js(a));const y=Hs(b,t);if(!u||!Ar()||d===void 0)return null;const C=g===false||q9();let x=a;return t&&(x=f__namespace.cloneElement(a,{ref:y})),f__namespace.createElement(gI.Provider,{value:h},C?x:ST.createPortal(x,g))});function qa(e){return e instanceof HTMLElement||e instanceof SVGElement}function Vc(e){return e&&typeof e=="object"&&qa(e.nativeElement)?e.nativeElement:qa(e)?e:null}const mb=f__namespace.createContext(null);function Z9({children:e,onBatchResize:t}){const n=f__namespace.useRef(0),r=f__namespace.useRef([]),o=f__namespace.useContext(mb),i=f__namespace.useCallback((s,a,l)=>{n.current+=1;const c=n.current;r.current.push({size:s,element:a,data:l}),Promise.resolve().then(()=>{c===n.current&&(t?.(r.current),r.current=[]);}),o?.(s,a,l);},[t,o]);return f__namespace.createElement(mb.Provider,{value:i},e)}const Ni=new Map;function J9(e){e.forEach(t=>{const{target:n}=t;Ni.get(n)?.forEach(r=>r(n));});}let Jp;function bI(){return Jp||(Jp=new ResizeObserver(J9)),Jp}function eF(e,t){Ni.has(e)||(Ni.set(e,new Set),bI().observe(e)),Ni.get(e).add(t);}function tF(e,t){Ni.has(e)&&(Ni.get(e).delete(t),Ni.get(e).size||(bI().unobserve(e),Ni.delete(e)));}function nF(e,t){const{children:n,disabled:r}=e,o=f__namespace.useRef(null),i=f__namespace.useContext(mb),s=typeof n=="function",a=s?n(o):n,l=f__namespace.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),c=!s&&f__namespace.isValidElement(a)&&Vs(a),u=c?js(a):null,d=Hs(u,o),m=()=>Vc(o.current);f__namespace.useImperativeHandle(t,()=>m());const p=f__namespace.useRef(e);p.current=e;const h=f__namespace.useCallback(g=>{const{onResize:b,data:y}=p.current,{width:C,height:x}=g.getBoundingClientRect(),{offsetWidth:w,offsetHeight:S}=g,I=Math.floor(C),$=Math.floor(x);if(l.current.width!==I||l.current.height!==$||l.current.offsetWidth!==w||l.current.offsetHeight!==S){const E={width:I,height:$,offsetWidth:w,offsetHeight:S};l.current=E;const P=w===Math.round(C)?C:w,M=S===Math.round(x)?x:S,N={...E,offsetWidth:P,offsetHeight:M};i?.(N,g,y),b&&Promise.resolve().then(()=>{b(N,g);});}},[]);return f__namespace.useEffect(()=>{const g=m();return g&&!r&&eF(g,h),()=>tF(g,h)},[o.current,r]),c?f__namespace.cloneElement(a,{ref:d}):a}const rF=f__namespace.forwardRef(nF);function pb(){return pb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},pb.apply(this,arguments)}const oF="rc-observer-key";function iF(e,t){const{children:n}=e;return (typeof n=="function"?[n]:gr(n)).map((o,i)=>{const s=o?.key||`${oF}-${i}`;return f__namespace.createElement(rF,pb({},e,{key:s,ref:i===0?t:void 0}),o)})}const Kr=f__namespace.forwardRef(iF);Kr.Collection=Z9;const vI=f__namespace.createContext({});function sF({children:e,...t}){return f__namespace.createElement(vI.Provider,{value:t},e)}function aF(e){const[,t]=f__namespace.useReducer(i=>i+1,0),n=f__namespace.useRef(e),r=lt(()=>n.current),o=lt(i=>{n.current=typeof i=="function"?i(n.current):i,t();});return [r,o]}const Uo="none",vd="appear",yd="enter",Cd="leave",Zx="none",ao="prepare",Ea="start",Ia="active",uy="end",yI="prepared";function Jx(e,t){const n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit${e}`]=`webkit${t}`,n[`Moz${e}`]=`moz${t}`,n[`ms${e}`]=`MS${t}`,n[`O${e}`]=`o${t.toLowerCase()}`,n}function lF(e,t){const n={animationend:Jx("Animation","AnimationEnd"),transitionend:Jx("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}const cF=lF(Ar(),typeof window<"u"?window:{});let CI={};Ar()&&({style:CI}=document.createElement("div"));const xd={};function xI(e){if(xd[e])return xd[e];const t=cF[e];if(t){const n=Object.keys(t),r=n.length;for(let o=0;o<r;o+=1){const i=n[o];if(Object.prototype.hasOwnProperty.call(t,i)&&i in CI)return xd[e]=t[i],xd[e]}}return ""}const wI=xI("animationend"),SI=xI("transitionend"),uF=!!(wI&&SI),ew=wI||"animationend",tw=SI||"transitionend";function nw(e,t){if(!e)return null;if(typeof e=="object"){const n=t.replace(/-\w/g,r=>r[1].toUpperCase());return e[n]}return `${e}-${t}`}const dF=e=>{const t=f.useRef();function n(o){o&&(o.removeEventListener(tw,e),o.removeEventListener(ew,e));}function r(o){t.current&&t.current!==o&&n(t.current),o&&o!==t.current&&(o.addEventListener(tw,e),o.addEventListener(ew,e),t.current=o);}return f__namespace.useEffect(()=>()=>{n(t.current),t.current=null;},[]),[r,n]},$I=Ar()?f.useLayoutEffect:f.useEffect;let EI=e=>+setTimeout(e,16),II=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(EI=e=>window.requestAnimationFrame(e),II=e=>window.cancelAnimationFrame(e));let rw=0;const dy=new Map;function PI(e){dy.delete(e);}const gt=(e,t=1)=>{rw+=1;const n=rw;function r(o){if(o===0)PI(n),e();else {const i=EI(()=>{r(o-1);});dy.set(n,i);}}return r(t),n};gt.cancel=e=>{const t=dy.get(e);return PI(e),II(t)};const fF=()=>{const e=f__namespace.useRef(null);function t(){gt.cancel(e.current);}function n(r,o=2){t();const i=gt(()=>{o<=1?r({isCanceled:()=>i!==e.current}):n(r,o-1);});e.current=i;}return f__namespace.useEffect(()=>()=>{t();},[]),[n,t]},mF=[ao,Ea,Ia,uy],pF=[ao,yI],NI=false,hF=true;function MI(e){return e===Ia||e===uy}const gF=(e,t,n)=>{const[r,o]=Pf(Zx),[i,s]=fF();function a(){o(ao,true);}const l=t?pF:mF;return $I(()=>{if(r!==Zx&&r!==uy){const c=l.indexOf(r),u=l[c+1],d=n(r);d===NI?o(u,true):u&&i(m=>{function p(){m.isCanceled()||o(u,true);}d===true?p():Promise.resolve(d).then(p);});}},[e,r]),f__namespace.useEffect(()=>()=>{s();},[]),[a,r]};function bF(e,t,n,{motionEnter:r=true,motionAppear:o=true,motionLeave:i=true,motionDeadline:s,motionLeaveImmediately:a,onAppearPrepare:l,onEnterPrepare:c,onLeavePrepare:u,onAppearStart:d,onEnterStart:m,onLeaveStart:p,onAppearActive:h,onEnterActive:g,onLeaveActive:b,onAppearEnd:y,onEnterEnd:C,onLeaveEnd:x,onVisibleChanged:w}){const[S,I]=Pf(),[$,E]=aF(Uo),[P,M]=Pf(null),N=$(),A=f.useRef(false),k=f.useRef(null);function R(){return n()}const L=f.useRef(false);function V(){E(Uo),M(null,true);}const _=lt(K=>{const J=$();if(J===Uo)return;const Q=R();if(K&&!K.deadline&&K.target!==Q)return;const G=L.current;let ee;J===vd&&G?ee=y?.(Q,K):J===yd&&G?ee=C?.(Q,K):J===Cd&&G&&(ee=x?.(Q,K)),G&&ee!==false&&V();}),[z]=dF(_),D=K=>{switch(K){case vd:return {[ao]:l,[Ea]:d,[Ia]:h};case yd:return {[ao]:c,[Ea]:m,[Ia]:g};case Cd:return {[ao]:u,[Ea]:p,[Ia]:b};default:return {}}},W=f__namespace.useMemo(()=>D(N),[N]),[O,B]=gF(N,!e,K=>{if(K===ao){const J=W[ao];return J?J(R()):NI}return B in W&&M(W[B]?.(R(),null)||null),B===Ia&&N!==Uo&&(z(R()),s>0&&(clearTimeout(k.current),k.current=setTimeout(()=>{_({deadline:true});},s))),B===yI&&V(),hF}),j=MI(B);L.current=j;const Y=f.useRef(null);$I(()=>{if(A.current&&Y.current===t)return;I(t);const K=A.current;A.current=true;let J;!K&&t&&o&&(J=vd),K&&t&&r&&(J=yd),(K&&!t&&i||!K&&a&&!t&&i)&&(J=Cd);const Q=D(J);J&&(e||Q[ao])?(E(J),O()):E(Uo),Y.current=t;},[t]),f.useEffect(()=>{(N===vd&&!o||N===yd&&!r||N===Cd&&!i)&&E(Uo);},[o,r,i]),f.useEffect(()=>()=>{A.current=false,clearTimeout(k.current);},[]);const q=f__namespace.useRef(false);f.useEffect(()=>{S&&(q.current=true),S!==void 0&&N===Uo&&((q.current||S)&&w?.(S),q.current=true);},[S,N]);let U=P;return W[ao]&&B===Ea&&(U={transition:"none",...U}),[$,B,U,S??t]}function vF(e){let t=e;typeof e=="object"&&({transitionSupport:t}=e);function n(o,i){return !!(o.motionName&&t&&i!==false)}const r=f__namespace.forwardRef((o,i)=>{const{visible:s=true,removeOnLeave:a=true,forceRender:l,children:c,motionName:u,leavedClassName:d,eventProps:m}=o,{motion:p}=f__namespace.useContext(vI),h=n(o,p),g=f.useRef();function b(){return Vc(g.current)}const[y,C,x,w]=bF(h,s,b,o),S=y(),I=f__namespace.useRef(w);w&&(I.current=true);const $=f__namespace.useMemo(()=>{const M={};return Object.defineProperties(M,{nativeElement:{enumerable:true,get:b},inMotion:{enumerable:true,get:()=>()=>y()!==Uo},enableMotion:{enumerable:true,get:()=>()=>h}}),M},[]);f__namespace.useImperativeHandle(i,()=>$,[]);let E;const P={...m,visible:s};if(!c)E=null;else if(S===Uo)w?E=c({...P},g):!a&&I.current&&d?E=c({...P,className:d},g):l||!a&&!d?E=c({...P,style:{display:"none"}},g):E=null;else {let M;C===ao?M="prepare":MI(C)?M="active":C===Ea&&(M="start");const N=nw(u,`${S}-${M}`);E=c({...P,className:H(nw(u,S),{[N]:N&&M,[u]:typeof u=="string"}),style:x},g);}return f__namespace.isValidElement(E)&&Vs(E)&&(js(E)||(E=f__namespace.cloneElement(E,{ref:g}))),E});return r.displayName="CSSMotion",r}const er=vF(uF),hb="add",gb="keep",bb="remove",eh="removed";function yF(e){let t;return e&&typeof e=="object"&&"key"in e?t=e:t={key:e},{...t,key:String(t.key)}}function vb(e=[]){return e.map(yF)}function CF(e=[],t=[]){let n=[],r=0;const o=t.length,i=vb(e),s=vb(t);i.forEach(c=>{let u=false;for(let d=r;d<o;d+=1){const m=s[d];if(m.key===c.key){r<d&&(n=n.concat(s.slice(r,d).map(p=>({...p,status:hb}))),r=d),n.push({...m,status:gb}),r+=1,u=true;break}}u||n.push({...c,status:bb});}),r<o&&(n=n.concat(s.slice(r).map(c=>({...c,status:hb}))));const a={};return n.forEach(({key:c})=>{a[c]=(a[c]||0)+1;}),Object.keys(a).filter(c=>a[c]>1).forEach(c=>{n=n.filter(({key:u,status:d})=>u!==c||d!==bb),n.forEach(u=>{u.key===c&&(u.status=gb);});}),n}function yb(){return yb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},yb.apply(this,arguments)}const xF=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function wF(e,t=er){class n extends f__namespace.Component{static defaultProps={component:"div"};state={keyEntities:[]};static getDerivedStateFromProps({keys:o},{keyEntities:i}){const s=vb(o);return {keyEntities:CF(i,s).filter(l=>{const c=i.find(({key:u})=>l.key===u);return !(c&&c.status===eh&&l.status===bb)})}}removeKey=o=>{this.setState(i=>({keyEntities:i.keyEntities.map(a=>a.key!==o?a:{...a,status:eh})}),()=>{const{keyEntities:i}=this.state;i.filter(({status:a})=>a!==eh).length===0&&this.props.onAllRemoved&&this.props.onAllRemoved();});};render(){const{keyEntities:o}=this.state,{component:i,children:s,onVisibleChanged:a,onAllRemoved:l,...c}=this.props,u=i||f__namespace.Fragment,d={};return xF.forEach(m=>{d[m]=c[m],delete c[m];}),delete c.keys,f__namespace.createElement(u,c,o.map(({status:m,...p},h)=>{const g=m===hb||m===gb;return f__namespace.createElement(t,yb({},d,{key:p.key,visible:g,eventProps:p,onVisibleChanged:b=>{a?.(b,{key:p.key}),b||this.removeKey(p.key);}}),(b,y)=>s({...b,index:h},y))}))}}return n}const SF=wF();function $F(e){const{prefixCls:t,align:n,arrow:r,arrowPos:o}=e,{className:i,content:s,style:a}=r||{},{x:l=0,y:c=0}=o,u=f__namespace.useRef(null);if(!n||!n.points)return null;const d={position:"absolute"};if(n.autoArrow!==false){const m=n.points[0],p=n.points[1],h=m[0],g=m[1],b=p[0],y=p[1];h===b||!["t","b"].includes(h)?d.top=c:h==="t"?d.top=0:d.bottom=0,g===y||!["l","r"].includes(g)?d.left=l:g==="l"?d.left=0:d.right=0;}return f__namespace.createElement("div",{ref:u,className:H(`${t}-arrow`,i),style:{...d,...a}},s)}function Cb(){return Cb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Cb.apply(this,arguments)}function EF(e){const{prefixCls:t,open:n,zIndex:r,mask:o,motion:i,mobile:s}=e;return o?f__namespace.createElement(er,Cb({},i,{motionAppear:true,visible:n,removeOnLeave:true}),({className:a})=>f__namespace.createElement("div",{style:{zIndex:r},className:H(`${t}-mask`,s&&`${t}-mobile-mask`,a)})):null}const IF=f__namespace.memo(({children:e})=>e,(e,t)=>t.cache);function RI(e,t,n,r,o,i,s,a){const l="auto",c=e?{}:{left:"-1000vw",top:"-1000vh",right:l,bottom:l};if(!e&&(t||!n)){const{points:u}=r,d=r.dynamicInset||r._experimental?.dynamicInset,m=d&&u[0][1]==="r",p=d&&u[0][0]==="b";m?(c.right=o,c.left=l):(c.left=s,c.right=l),p?(c.bottom=i,c.top=l):(c.top=a,c.bottom=l);}return c}function xb(){return xb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},xb.apply(this,arguments)}const AI=f__namespace.forwardRef((e,t)=>{const{popup:n,className:r,prefixCls:o,style:i,target:s,onVisibleChanged:a,open:l,keepDom:c,fresh:u,onClick:d,mask:m,arrow:p,arrowPos:h,align:g,motion:b,maskMotion:y,mobile:C,forceRender:x,getPopupContainer:w,autoDestroy:S,portal:I,children:$,zIndex:E,onMouseEnter:P,onMouseLeave:M,onPointerEnter:N,onPointerDownCapture:A,ready:k,offsetX:R,offsetY:L,offsetR:V,offsetB:_,onAlign:z,onPrepare:D,onResize:W,stretch:O,targetWidth:B,targetHeight:j}=e,Y=typeof n=="function"?n():n,q=l||c,U=!!C,[K,J,Q]=f__namespace.useMemo(()=>C?[C.mask,C.maskMotion,C.motion]:[m,y,b],[C,m,y,b]),G=w?.length>0,[ee,re]=f__namespace.useState(!w||!G);Kt(()=>{!ee&&G&&s&&re(true);},[ee,G,s]);const oe=lt((te,ce)=>{W?.(te,ce),z();}),be=RI(U,k,l,g,V,_,R,L);if(!ee)return null;const Z={};return O&&(O.includes("height")&&j?Z.height=j:O.includes("minHeight")&&j&&(Z.minHeight=j),O.includes("width")&&B?Z.width=B:O.includes("minWidth")&&B&&(Z.minWidth=B)),l||(Z.pointerEvents="none"),f__namespace.createElement(I,{open:x||q,getContainer:w&&(()=>w(s)),autoDestroy:S},f__namespace.createElement(EF,{prefixCls:o,open:l,zIndex:E,mask:K,motion:J,mobile:U}),f__namespace.createElement(Kr,{onResize:oe,disabled:!l},te=>f__namespace.createElement(er,xb({motionAppear:true,motionEnter:true,motionLeave:true,removeOnLeave:false,forceRender:x,leavedClassName:`${o}-hidden`},Q,{onAppearPrepare:D,onEnterPrepare:D,visible:l,onVisibleChanged:ce=>{b?.onVisibleChanged?.(ce),a(ce);}}),({className:ce,style:ue},he)=>{const ye=H(o,ce,r,{[`${o}-mobile`]:U});return f__namespace.createElement("div",{ref:In(te,t,he),className:ye,style:{"--arrow-x":`${h.x||0}px`,"--arrow-y":`${h.y||0}px`,...be,...Z,...ue,boxSizing:"border-box",zIndex:E,...i},onMouseEnter:P,onMouseLeave:M,onPointerEnter:N,onClick:d,onPointerDownCapture:A},p&&f__namespace.createElement($F,{prefixCls:o,arrow:p,arrowPos:h,align:g}),f__namespace.createElement(IF,{cache:!l&&!u},Y))})),$)}),Tf=f__namespace.createContext(null),TI=f__namespace.createContext(null);function ow(e){return e?Array.isArray(e)?e:[e]:[]}function PF(e,t,n){return f__namespace.useMemo(()=>{const r=ow(t??e),o=ow(n??e),i=new Set(r),s=new Set(o);return i.has("hover")&&!i.has("click")&&i.add("touch"),s.has("hover")&&!s.has("click")&&s.add("touch"),[i,s]},[e,t,n])}const fy=e=>{if(!e)return false;if(e instanceof Element){if(e.offsetParent)return true;if(e.getBBox){const{width:t,height:n}=e.getBBox();if(t||n)return true}if(e.getBoundingClientRect){const{width:t,height:n}=e.getBoundingClientRect();if(t||n)return true}}return false};function NF(e=[],t=[],n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function OI(e,t,n,r){const{points:o}=n,i=Object.keys(e);for(let s=0;s<i.length;s+=1){const a=i[s];if(NF(e[a]?.points,o,r))return `${t}-placement-${a}`}return ""}function Iu(e){return e.ownerDocument.defaultView}function wb(e){const t=[];let n=e?.parentElement;const r=["hidden","scroll","clip","auto"];for(;n;){const{overflowX:o,overflowY:i,overflow:s}=Iu(n).getComputedStyle(n);[o,i,s].some(a=>r.includes(a))&&t.push(n),n=n.parentElement;}return t}function jc(e,t=1){return Number.isNaN(e)?t:e}function Dl(e){return jc(parseFloat(e),0)}function iw(e,t){const n={...e};return (t||[]).forEach(r=>{if(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)return;const{overflow:o,overflowClipMargin:i,borderTopWidth:s,borderBottomWidth:a,borderLeftWidth:l,borderRightWidth:c}=Iu(r).getComputedStyle(r),u=r.getBoundingClientRect(),{offsetHeight:d,clientHeight:m,offsetWidth:p,clientWidth:h}=r,g=Dl(s),b=Dl(a),y=Dl(l),C=Dl(c),x=jc(Math.round(u.width/p*1e3)/1e3),w=jc(Math.round(u.height/d*1e3)/1e3),S=(p-h-y-C)*x,I=(d-m-g-b)*w,$=g*w,E=b*w,P=y*x,M=C*x;let N=0,A=0;if(o==="clip"){const _=Dl(i);N=_*x,A=_*w;}const k=u.x+P-N,R=u.y+$-A,L=k+u.width+2*N-P-M-S,V=R+u.height+2*A-$-E-I;n.left=Math.max(n.left,k),n.top=Math.max(n.top,R),n.right=Math.min(n.right,L),n.bottom=Math.min(n.bottom,V);}),n}function sw(e,t=0){const n=`${t}`,r=n.match(/^(.*)\%$/);return r?e*(parseFloat(r[1])/100):parseFloat(n)}function aw(e,t){const[n,r]=t||[];return [sw(e.width,n),sw(e.height,r)]}function lw(e=""){return [e[0],e[1]]}function la(e,t){const n=t[0],r=t[1];let o,i;return n==="t"?i=e.y:n==="b"?i=e.y+e.height:i=e.y+e.height/2,r==="l"?o=e.x:r==="r"?o=e.x+e.width:o=e.x+e.width/2,{x:o,y:i}}function gi(e,t){const n={t:"b",b:"t",l:"r",r:"l"};return e.map((r,o)=>o===t?n[r]||"c":r).join("")}function FI(e,t,n,r,o,i,s,a){const[l,c]=f__namespace.useState({ready:false,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:o[r]||{}}),u=f__namespace.useRef(0),d=f__namespace.useMemo(()=>!t||a?[]:wb(t),[t]),m=f__namespace.useRef({});e||(m.current={});const h=lt(()=>{if(t&&n&&e&&!a){let Re=function(wt,tr,lr=be){const ra=k.x+wt,Ll=k.y+tr,oa=ra+j,cd=Ll+B,ud=Math.max(ra,lr.left),dd=Math.max(Ll,lr.top),tx=Math.min(oa,lr.right),zp=Math.min(cd,lr.bottom);return Math.max(0,(tx-ud)*(zp-dd))},Ce=function(){ae=k.y+Fe,ve=ae+B,de=k.x+Me,se=de+j;};const y=t,C=y.ownerDocument,x=Iu(y),{position:w}=x.getComputedStyle(y),S=y.style.left,I=y.style.top,$=y.style.right,E=y.style.bottom,P=y.style.overflow,M={...o[r],...i},N=C.createElement("div");y.parentElement?.appendChild(N),N.style.left=`${y.offsetLeft}px`,N.style.top=`${y.offsetTop}px`,N.style.position=w,N.style.height=`${y.offsetHeight}px`,N.style.width=`${y.offsetWidth}px`,y.style.left="0",y.style.top="0",y.style.right="auto",y.style.bottom="auto",y.style.overflow="hidden";let A;if(Array.isArray(n))A={x:n[0],y:n[1],width:0,height:0};else {const wt=n.getBoundingClientRect();wt.x=wt.x??wt.left,wt.y=wt.y??wt.top,A={x:wt.x,y:wt.y,width:wt.width,height:wt.height};}const k=y.getBoundingClientRect(),{height:R,width:L}=x.getComputedStyle(y);k.x=k.x??k.left,k.y=k.y??k.top;const{clientWidth:V,clientHeight:_,scrollWidth:z,scrollHeight:D,scrollTop:W,scrollLeft:O}=C.documentElement,B=k.height,j=k.width,Y=A.height,q=A.width,U={left:0,top:0,right:V,bottom:_},K={left:-O,top:-W,right:z-O,bottom:D-W};let{htmlRegion:J}=M;const Q="visible",G="visibleFirst";J!=="scroll"&&J!==G&&(J=Q);const ee=J===G,re=iw(K,d),oe=iw(U,d),be=J===Q?oe:re,Z=ee?oe:be;y.style.left="auto",y.style.top="auto",y.style.right="0",y.style.bottom="0";const te=y.getBoundingClientRect();y.style.left=S,y.style.top=I,y.style.right=$,y.style.bottom=E,y.style.overflow=P,y.parentElement?.removeChild(N);const ce=jc(Math.round(j/parseFloat(L)*1e3)/1e3),ue=jc(Math.round(B/parseFloat(R)*1e3)/1e3);if(ce===0||ue===0||qa(n)&&!fy(n))return;const{offset:he,targetOffset:ye}=M;let[pe,ie]=aw(k,he);const[ge,Se]=aw(A,ye);A.x-=ge,A.y-=Se;const[ke,qe]=M.points||[],De=lw(qe),ze=lw(ke),je=la(A,De),Le=la(k,ze),we={...M};let Me=je.x-Le.x+pe,Fe=je.y-Le.y+ie;const Pe=Re(Me,Fe),Qe=Re(Me,Fe,oe),mt=la(A,["t","l"]),it=la(k,["t","l"]),ct=la(A,["b","r"]),bt=la(k,["b","r"]),pt=M.overflow||{},{adjustX:rt,adjustY:et,shiftX:Xe,shiftY:Ie}=pt,Ne=wt=>typeof wt=="boolean"?wt:wt>=0;let ae,ve,de,se;Ce();const fe=Ne(et),xe=ze[0]===De[0];if(fe&&ze[0]==="t"&&(ve>Z.bottom||m.current.bt)){let wt=Fe;xe?wt-=B-Y:wt=mt.y-bt.y-ie;const tr=Re(Me,wt),lr=Re(Me,wt,oe);tr>Pe||tr===Pe&&(!ee||lr>=Qe)?(m.current.bt=true,Fe=wt,ie=-ie,we.points=[gi(ze,0),gi(De,0)]):m.current.bt=false;}if(fe&&ze[0]==="b"&&(ae<Z.top||m.current.tb)){let wt=Fe;xe?wt+=B-Y:wt=ct.y-it.y-ie;const tr=Re(Me,wt),lr=Re(Me,wt,oe);tr>Pe||tr===Pe&&(!ee||lr>=Qe)?(m.current.tb=true,Fe=wt,ie=-ie,we.points=[gi(ze,0),gi(De,0)]):m.current.tb=false;}const Oe=Ne(rt),We=ze[1]===De[1];if(Oe&&ze[1]==="l"&&(se>Z.right||m.current.rl)){let wt=Me;We?wt-=j-q:wt=mt.x-bt.x-pe;const tr=Re(wt,Fe),lr=Re(wt,Fe,oe);tr>Pe||tr===Pe&&(!ee||lr>=Qe)?(m.current.rl=true,Me=wt,pe=-pe,we.points=[gi(ze,1),gi(De,1)]):m.current.rl=false;}if(Oe&&ze[1]==="r"&&(de<Z.left||m.current.lr)){let wt=Me;We?wt+=j-q:wt=ct.x-it.x-pe;const tr=Re(wt,Fe),lr=Re(wt,Fe,oe);tr>Pe||tr===Pe&&(!ee||lr>=Qe)?(m.current.lr=true,Me=wt,pe=-pe,we.points=[gi(ze,1),gi(De,1)]):m.current.lr=false;}Ce();const Ze=Xe===true?0:Xe;typeof Ze=="number"&&(de<oe.left&&(Me-=de-oe.left-pe,A.x+q<oe.left+Ze&&(Me+=A.x-oe.left+q-Ze)),se>oe.right&&(Me-=se-oe.right-pe,A.x>oe.right-Ze&&(Me+=A.x-oe.right+Ze)));const st=Ie===true?0:Ie;typeof st=="number"&&(ae<oe.top&&(Fe-=ae-oe.top-ie,A.y+Y<oe.top+st&&(Fe+=A.y-oe.top+Y-st)),ve>oe.bottom&&(Fe-=ve-oe.bottom-ie,A.y>oe.bottom-st&&(Fe+=A.y-oe.bottom+st)));const Ct=k.x+Me,an=Ct+j,On=k.y+Fe,Rt=On+B,me=A.x,Ae=me+q,Ge=A.y,ut=Ge+Y,Pt=Math.max(Ct,me),qt=Math.min(an,Ae),hn=(Pt+qt)/2-Ct,Br=Math.max(On,Ge),Vo=Math.min(Rt,ut),wo=(Br+Vo)/2-On;s?.(t,we);let qn=te.right-k.x-(Me+k.width),as=te.bottom-k.y-(Fe+k.height);ce===1&&(Me=Math.round(Me),qn=Math.round(qn)),ue===1&&(Fe=Math.round(Fe),as=Math.round(as));const Fl={ready:true,offsetX:Me/ce,offsetY:Fe/ue,offsetR:qn/ce,offsetB:as/ue,arrowX:hn/ce,arrowY:wo/ue,scaleX:ce,scaleY:ue,align:we};c(Fl);}}),g=()=>{u.current+=1;const y=u.current;Promise.resolve().then(()=>{u.current===y&&h();});},b=()=>{c(y=>({...y,ready:false}));};return Kt(b,[r]),Kt(()=>{e||b();},[e]),[l.ready,l.offsetX,l.offsetY,l.offsetR,l.offsetB,l.arrowX,l.arrowY,l.scaleX,l.scaleY,l.align,g]}function LI(){const e=f__namespace.useRef(null),t=()=>{e.current&&(clearTimeout(e.current),e.current=null);},n=(r,o)=>{t(),o===0?r():e.current=setTimeout(()=>{r();},o*1e3);};return f__namespace.useEffect(()=>()=>{t();},[]),n}function MF(e,t,n,r,o){Kt(()=>{if(e&&t&&n){let d=function(){r(),o();};const i=t,s=n,a=wb(i),l=wb(s),c=Iu(s),u=new Set([c,...a,...l]);return u.forEach(m=>{m.addEventListener("scroll",d,{passive:true});}),c.addEventListener("resize",d,{passive:true}),r(),()=>{u.forEach(m=>{m.removeEventListener("scroll",d),c.removeEventListener("resize",d);});}}},[e,t,n]);}function RF(e,t,n,r,o,i,s,a){const l=f__namespace.useRef(e);l.current=e;const c=f__namespace.useRef(false);f__namespace.useEffect(()=>{if(t&&r&&(!o||i)){const d=()=>{c.current=false;},m=g=>{l.current&&!s(g.composedPath?.()?.[0]||g.target)&&!c.current&&a(false);},p=Iu(r);p.addEventListener("pointerdown",d,true),p.addEventListener("mousedown",m,true),p.addEventListener("contextmenu",m,true);const h=Mf(n);return h&&(h.addEventListener("mousedown",m,true),h.addEventListener("contextmenu",m,true)),()=>{p.removeEventListener("pointerdown",d,true),p.removeEventListener("mousedown",m,true),p.removeEventListener("contextmenu",m,true),h&&(h.removeEventListener("mousedown",m,true),h.removeEventListener("contextmenu",m,true));}}},[t,n,r,o,i]);function u(){c.current=true;}return u}function AF(){const[e,t]=f.useState(null),[n,r]=f.useState(false),[o,i]=f.useState(false),s=f.useRef(null),a=lt(c=>{c===false?(s.current=null,r(false)):o&&n?s.current=c:(r(true),t(c),s.current=null,n||i(true));}),l=lt(c=>{c?(i(false),s.current&&(t(s.current),s.current=null)):(i(false),s.current=null);});return [a,n,e,l]}function Sb(){return Sb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Sb.apply(this,arguments)}const TF=e=>{const{prefixCls:t,isMobile:n,ready:r,open:o,align:i,offsetR:s,offsetB:a,offsetX:l,offsetY:c,arrowPos:u,popupSize:d,motion:m,uniqueContainerClassName:p,uniqueContainerStyle:h}=e,g=`${t}-unique-container`,[b,y]=f.useState(false),C=RI(n,r,o,i,s,a,l,c),x=f.useRef(C);r&&(x.current=C);const w={};return d&&(w.width=d.width,w.height=d.height),f.createElement(er,Sb({motionAppear:true,motionEnter:true,motionLeave:true,removeOnLeave:false,leavedClassName:`${g}-hidden`},m,{visible:o,onVisibleChanged:S=>{y(S);}}),({className:S,style:I})=>{const $=H(g,S,p,{[`${g}-visible`]:b});return f.createElement("div",{className:$,style:{"--arrow-x":`${u?.x||0}px`,"--arrow-y":`${u?.y||0}px`,...x.current,...w,...I,...h}})})},OF=({children:e,postTriggerProps:t})=>{const[n,r,o,i]=AF(),s=f__namespace.useMemo(()=>!o||!t?o:t(o),[o,t]),[a,l]=f__namespace.useState(null),[c,u]=f__namespace.useState(null),d=f__namespace.useRef(null),m=lt(z=>{d.current=z,qa(z)&&a!==z&&l(z);}),p=f__namespace.useRef(null),h=LI(),g=lt((z,D)=>{p.current=D,h(()=>{n(z);},z.delay);}),b=z=>{h(()=>{p.current?.()||n(false);},z);},y=lt(z=>{i(z);}),[C,x,w,S,I,$,E,,,P,M]=FI(r,a,s?.target,s?.popupPlacement,s?.builtinPlacements||{},s?.popupAlign,void 0,false),N=f__namespace.useMemo(()=>{if(!s)return "";const z=OI(s.builtinPlacements||{},s.prefixCls||"",P,false);return H(z,s.getPopupClassNameFromAlign?.(P))},[P,s?.getPopupClassNameFromAlign,s?.builtinPlacements,s?.prefixCls]),A=f__namespace.useMemo(()=>({show:g,hide:b}),[]);f__namespace.useEffect(()=>{M();},[s?.target]);const k=lt(()=>(M(),Promise.resolve())),R=f__namespace.useRef({}),L=f__namespace.useContext(Tf),V=f__namespace.useMemo(()=>({registerSubPopup:(z,D)=>{R.current[z]=D,L?.registerSubPopup(z,D);}}),[L]),_=s?.prefixCls;return f__namespace.createElement(TI.Provider,{value:A},e,s&&f__namespace.createElement(Tf.Provider,{value:V},f__namespace.createElement(AI,{ref:m,portal:zm,prefixCls:_,popup:s.popup,className:H(s.popupClassName,N,`${_}-unique-controlled`),style:s.popupStyle,target:s.target,open:r,keepDom:true,fresh:true,autoDestroy:false,onVisibleChanged:y,ready:C,offsetX:x,offsetY:w,offsetR:S,offsetB:I,onAlign:M,onPrepare:k,onResize:z=>u({width:z.offsetWidth,height:z.offsetHeight}),arrowPos:{x:$,y:E},align:P,zIndex:s.zIndex,mask:s.mask,arrow:s.arrow,motion:s.popupMotion,maskMotion:s.maskMotion,getPopupContainer:s.getPopupContainer},f__namespace.createElement(TF,{prefixCls:_,isMobile:false,ready:C,open:r,align:P,offsetR:S,offsetB:I,offsetX:x,offsetY:w,arrowPos:{x:$,y:E},popupSize:c,motion:s.popupMotion,uniqueContainerClassName:H(s.uniqueContainerClassName,N),uniqueContainerStyle:s.uniqueContainerStyle}))))};function FF(e=zm){return f__namespace.forwardRef((n,r)=>{const{prefixCls:o="rc-trigger-popup",children:i,action:s="hover",showAction:a,hideAction:l,popupVisible:c,defaultPopupVisible:u,onOpenChange:d,afterOpenChange:m,onPopupVisibleChange:p,afterPopupVisibleChange:h,mouseEnterDelay:g,mouseLeaveDelay:b=.1,focusDelay:y,blurDelay:C,mask:x,maskClosable:w=true,getPopupContainer:S,forceRender:I,autoDestroy:$,popup:E,popupClassName:P,uniqueContainerClassName:M,uniqueContainerStyle:N,popupStyle:A,popupPlacement:k,builtinPlacements:R={},popupAlign:L,zIndex:V,stretch:_,getPopupClassNameFromAlign:z,fresh:D,unique:W,alignPoint:O,onPopupClick:B,onPopupAlign:j,arrow:Y,popupMotion:q,maskMotion:U,mobile:K,...J}=n,Q=$||false,G=c===void 0,ee=!!K,re=f__namespace.useRef({}),oe=f__namespace.useContext(Tf),be=f__namespace.useMemo(()=>({registerSubPopup:(Ye,en)=>{re.current[Ye]=en,oe?.registerSubPopup(Ye,en);}}),[oe]),Z=f__namespace.useContext(TI),te=Ws(),[ce,ue]=f__namespace.useState(null),he=f__namespace.useRef(null),ye=lt(Ye=>{he.current=Ye,qa(Ye)&&ce!==Ye&&ue(Ye),oe?.registerSubPopup(te,Ye);}),[pe,ie]=f__namespace.useState(null),ge=f__namespace.useRef(null),Se=lt(Ye=>{qa(Ye)&&pe!==Ye&&(ie(Ye),ge.current=Ye);}),ke={},qe=lt(Ye=>{const en=pe;return en?.contains(Ye)||Mf(en)?.host===Ye||Ye===en||ce?.contains(Ye)||Mf(ce)?.host===Ye||Ye===ce||Object.values(re.current).some(fd=>fd?.contains(Ye)||Ye===fd)}),De=Y?{...Y!==true?Y:{}}:null,[ze,je]=Bt(u||false,c),Le=ze||false,we=f__namespace.useMemo(()=>{const Ye=typeof i=="function"?i({open:Le}):i;return f__namespace.Children.only(Ye)},[i,Le]),Me=we?.props||{},Fe=lt(()=>Le),Re=lt((Ye=0)=>({popup:E,target:pe,delay:Ye,prefixCls:o,popupClassName:P,uniqueContainerClassName:M,uniqueContainerStyle:N,popupStyle:A,popupPlacement:k,builtinPlacements:R,popupAlign:L,zIndex:V,mask:x,maskClosable:w,popupMotion:q,maskMotion:U,arrow:De,getPopupContainer:S,getPopupClassNameFromAlign:z,id:te}));Kt(()=>{Z&&W&&pe&&!G&&!oe&&(Le?Z.show(Re(g),Fe):Z.hide(b));},[Le,pe]);const Pe=f__namespace.useRef(Le);Pe.current=Le;const Qe=f__namespace.useRef([]);Qe.current=[];const mt=lt(Ye=>{je(Ye),(Qe.current[Qe.current.length-1]??Le)!==Ye&&(Qe.current.push(Ye),d?.(Ye),p?.(Ye));}),it=LI(),ct=(Ye,en=0)=>{if(c!==void 0){it(()=>{mt(Ye);},en);return}if(Z&&W&&G&&!oe){Ye?Z.show(Re(en),Fe):Z.hide(en);return}it(()=>{mt(Ye);},en);},[bt,pt]=f__namespace.useState(false);Kt(Ye=>{(!Ye||Le)&&pt(true);},[Le]);const[rt,et]=f__namespace.useState(null),[Xe,Ie]=f__namespace.useState(null),Ne=Ye=>{Ie([Ye.clientX,Ye.clientY]);},[ae,ve,de,se,Ce,fe,xe,Oe,We,Ze,st]=FI(Le,ce,O&&Xe!==null?Xe:pe,k,R,L,j,ee),[Ct,an]=PF(s,a,l),On=Ct.has("click"),Rt=an.has("click")||an.has("contextMenu"),me=lt(()=>{bt||st();});MF(Le,pe,ce,me,()=>{Pe.current&&O&&Rt&&ct(false);}),Kt(()=>{me();},[Xe,k]),Kt(()=>{Le&&!R?.[k]&&me();},[JSON.stringify(L)]);const Ge=f__namespace.useMemo(()=>{const Ye=OI(R,o,Ze,O);return H(Ye,z?.(Ze))},[Ze,z,R,o,O]);f__namespace.useImperativeHandle(r,()=>({nativeElement:ge.current,popupElement:he.current,forceAlign:me}));const[ut,Pt]=f__namespace.useState(0),[qt,Xt]=f__namespace.useState(0),hn=()=>{if(_&&pe){const Ye=pe.getBoundingClientRect();Pt(Ye.width),Xt(Ye.height);}},Br=()=>{hn(),me();},Vo=Ye=>{pt(false),st(),m?.(Ye),h?.(Ye);},pi=()=>new Promise(Ye=>{hn(),et(()=>Ye);});Kt(()=>{rt&&(st(),rt(),et(null));},[rt]);function wo(Ye,en,fd,fT,nx){ke[Ye]=(rx,...mT)=>{(!nx||!nx())&&(fT?.(rx),ct(en,fd)),Me[Ye]?.(rx,...mT);};}const qn=Ct.has("touch"),as=an.has("touch"),Fl=f__namespace.useRef(false);(qn||as)&&(ke.onTouchStart=(...Ye)=>{Fl.current=true,Pe.current&&as?ct(false):!Pe.current&&qn&&ct(true),Me.onTouchStart?.(...Ye);}),(On||Rt)&&(ke.onClick=(Ye,...en)=>{Pe.current&&Rt?ct(false):!Pe.current&&On&&(Ne(Ye),ct(true)),Me.onClick?.(Ye,...en),Fl.current=false;});const wt=RF(Le,Rt||as,pe,ce,x,w,qe,ct),tr=Ct.has("hover"),lr=an.has("hover");let ra,Ll;const oa=()=>Fl.current;if(tr){const Ye=en=>{Ne(en);};wo("onMouseEnter",true,g,Ye,oa),wo("onPointerEnter",true,g,Ye,oa),ra=en=>{(Le||bt)&&ce?.contains(en.target)&&ct(true,g);},O&&(ke.onMouseMove=en=>{Me.onMouseMove?.(en);});}lr&&(wo("onMouseLeave",false,b,void 0,oa),wo("onPointerLeave",false,b,void 0,oa),Ll=()=>{ct(false,b);}),Ct.has("focus")&&wo("onFocus",true,y),an.has("focus")&&wo("onBlur",false,C),Ct.has("contextMenu")&&(ke.onContextMenu=(Ye,...en)=>{Pe.current&&an.has("contextMenu")?ct(false):(Ne(Ye),ct(true)),Ye.preventDefault(),Me.onContextMenu?.(Ye,...en);});const cd=f__namespace.useRef(false);cd.current||=I||Le||bt;const ud={...Me,...ke},dd={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach(Ye=>{J[Ye]&&(dd[Ye]=(...en)=>{ud[Ye]?.(...en),J[Ye](...en);});});const zp={x:fe,y:xe},dT=f__namespace.cloneElement(we,{...ud,...dd});return f__namespace.createElement(f__namespace.Fragment,null,f__namespace.createElement(Kr,{disabled:!Le,ref:Se,onResize:Br},dT),cd.current&&(!Z||!W)&&f__namespace.createElement(Tf.Provider,{value:be},f__namespace.createElement(AI,{portal:e,ref:ye,prefixCls:o,popup:E,className:H(P,!ee&&Ge),style:A,target:pe,onMouseEnter:ra,onMouseLeave:Ll,onPointerEnter:ra,zIndex:V,open:Le,keepDom:bt,fresh:D,onClick:B,onPointerDownCapture:wt,mask:x,motion:q,maskMotion:U,onVisibleChanged:Vo,onPrepare:pi,forceRender:I,autoDestroy:Q,getPopupContainer:S,align:Ze,arrow:De,arrowPos:zp,ready:ae,offsetX:ve,offsetY:de,offsetR:se,offsetB:Ce,onAlign:me,stretch:_,targetWidth:ut/Oe,targetHeight:qt/We,mobile:K})))})}const _m=FF(zm),Wc="ant",Hm="anticon",LF=["outlined","borderless","filled","underlined"],BF=(e,t)=>t||(e?`${Wc}-${e}`:Wc),ot=f__namespace.createContext({getPrefixCls:BF,iconPrefixCls:Hm}),{Consumer:_ce}=ot,cw={};function St(e){const t=f__namespace.useContext(ot),{getPrefixCls:n,direction:r,getPopupContainer:o,renderEmpty:i}=t,s=t[e];return {classNames:cw,styles:cw,...s,getPrefixCls:n,direction:r,getPopupContainer:o,renderEmpty:i}}const kF=({children:e})=>{const{getPrefixCls:t}=f.useContext(ot),n=t();return f.isValidElement(e)?f.createElement(er,{visible:true,motionName:`${n}-fade`,motionAppear:true,motionEnter:true,motionLeave:false,removeOnLeave:false},({style:r,className:o})=>{const{className:i,style:s}=e.props,a={...s,...r};return f.cloneElement(e,{className:H(i,o),style:a})}):e},wd=[null,null];function DF(e){if(wd[0]!==e){const t={};Object.keys(e).forEach(n=>{t[n]={...e[n],dynamicInset:false};}),wd[0]=e,wd[1]=t;}return wd[1]}const BI=({children:e})=>{const t=n=>{const r=typeof n.popup=="function"?n.popup():n.popup,{id:o,builtinPlacements:i}=n,s=DF(i);return {...n,getPopupContainer:null,arrow:false,popup:f.createElement(kF,{key:o},r),builtinPlacements:s}};return f.createElement(OF,{postTriggerProps:t},e)},zn=f__namespace.createContext(false),kI=({children:e,disabled:t})=>{const n=f__namespace.useContext(zn);return f__namespace.createElement(zn.Provider,{value:t??n},e)},Ua=f__namespace.createContext(void 0),zF=({children:e,size:t})=>{const n=f__namespace.useContext(Ua);return f__namespace.createElement(Ua.Provider,{value:t||n},e)};function _F(){const e=f.useContext(zn),t=f.useContext(Ua);return {componentDisabled:e,componentSize:t}}function yn(e){"@babel/helpers - typeof";return yn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yn(e)}function HF(e){if(Array.isArray(e))return e}function VF(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,s,a=[],l=true,c=false;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1;}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=true,o=u;}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}function jF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function my(e,t){return HF(e)||VF(e,t)||J0(e,t)||jF()}function WF(e,t){if(yn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return (t==="string"?String:Number)(e)}function DI(e){var t=WF(e,"string");return yn(t)=="symbol"?t:t+""}function tt(e,t,n){return (t=DI(t))in e?Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true}):e[t]=n,e}function uw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r);}return n}function ln(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uw(Object(n),true).forEach(function(r){tt(e,r,n[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r));});}return e}function no(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||false,r.configurable=true,"value"in r&&(r.writable=true),Object.defineProperty(e,DI(r.key),r);}}function ro(e,t,n){return t&&dw(e.prototype,t),n&&dw(e,n),Object.defineProperty(e,"prototype",{writable:false}),e}function Ra(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qc(e,t){return qc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},qc(e,t)}function zI(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:true,configurable:true}}),Object.defineProperty(e,"prototype",{writable:false}),t&&qc(e,t);}function Uc(e){return Uc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Uc(e)}function py(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return (py=function(){return !!e})()}function qF(e,t){if(t&&(yn(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ra(e)}function _I(e){var t=py();return function(){var n,r=Uc(e);if(t){var o=Uc(this).constructor;n=Reflect.construct(r,arguments,o);}else n=r.apply(this,arguments);return qF(this,n)}}var UF=ro(function e(){no(this,e);}),HI="CALC_UNIT",GF=new RegExp(HI,"g");function th(e){return typeof e=="number"?"".concat(e).concat(HI):e}var KF=(function(e){zI(n,e);var t=_I(n);function n(r,o){var i;no(this,n),i=t.call(this),tt(Ra(i),"result",""),tt(Ra(i),"unitlessCssVar",void 0),tt(Ra(i),"lowPriority",void 0);var s=yn(r);return i.unitlessCssVar=o,r instanceof n?i.result="(".concat(r.result,")"):s==="number"?i.result=th(r):s==="string"&&(i.result=r),i}return ro(n,[{key:"add",value:function(o){return o instanceof n?this.result="".concat(this.result," + ").concat(o.getResult()):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," + ").concat(th(o))),this.lowPriority=true,this}},{key:"sub",value:function(o){return o instanceof n?this.result="".concat(this.result," - ").concat(o.getResult()):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," - ").concat(th(o))),this.lowPriority=true,this}},{key:"mul",value:function(o){return this.lowPriority&&(this.result="(".concat(this.result,")")),o instanceof n?this.result="".concat(this.result," * ").concat(o.getResult(true)):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," * ").concat(o)),this.lowPriority=false,this}},{key:"div",value:function(o){return this.lowPriority&&(this.result="(".concat(this.result,")")),o instanceof n?this.result="".concat(this.result," / ").concat(o.getResult(true)):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," / ").concat(o)),this.lowPriority=false,this}},{key:"getResult",value:function(o){return this.lowPriority||o?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(o){var i=this,s=o||{},a=s.unit,l=true;return typeof a=="boolean"?l=a:Array.from(this.unitlessCssVar).some(function(c){return i.result.includes(c)})&&(l=false),this.result=this.result.replace(GF,l?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),n})(UF),XF=function(t,n){var r=KF;return function(o){return new r(o,n)}},fw=function(t,n){return "".concat([n,t.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))};function mw(e,t,n,r){var o=ln({},t[e]);if(r!=null&&r.deprecatedTokens){var i=r.deprecatedTokens;i.forEach(function(a){var l=my(a,2),c=l[0],u=l[1];if(o!=null&&o[c]||o!=null&&o[u]){var d;(d=o[u])!==null&&d!==void 0||(o[u]=o?.[c]);}});}var s=ln(ln({},n),o);return Object.keys(s).forEach(function(a){s[a]===t[a]&&delete s[a];}),s}var VI=typeof CSSINJS_STATISTIC<"u",$b=true;function vt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!VI)return Object.assign.apply(Object,[{}].concat(t));$b=false;var r={};return t.forEach(function(o){if(yn(o)==="object"){var i=Object.keys(o);i.forEach(function(s){Object.defineProperty(r,s,{configurable:true,enumerable:true,get:function(){return o[s]}});});}}),$b=true,r}var pw={};function YF(){}var QF=function(t){var n,r=t,o=YF;return VI&&typeof Proxy<"u"&&(n=new Set,r=new Proxy(t,{get:function(s,a){if($b){var l;(l=n)===null||l===void 0||l.add(a);}return s[a]}}),o=function(s,a){var l;pw[s]={global:Array.from(n),component:ln(ln({},(l=pw[s])===null||l===void 0?void 0:l.component),a)};}),{token:r,keys:n,flush:o}};function hw(e,t,n){if(typeof n=="function"){var r;return n(vt(t,(r=t[e])!==null&&r!==void 0?r:{}))}return n??{}}function ZF(e){return {max:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return "max(".concat(r.map(function(i){return X(i)}).join(","),")")},min:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return "min(".concat(r.map(function(i){return X(i)}).join(","),")")}}}var JF=1e3*60*10,eL=(function(){function e(){no(this,e),tt(this,"map",new Map),tt(this,"objectIDMap",new WeakMap),tt(this,"nextID",0),tt(this,"lastAccessBeat",new Map),tt(this,"accessBeat",0);}return ro(e,[{key:"set",value:function(n,r){this.clear();var o=this.getCompositeKey(n);this.map.set(o,r),this.lastAccessBeat.set(o,Date.now());}},{key:"get",value:function(n){var r=this.getCompositeKey(n),o=this.map.get(r);return this.lastAccessBeat.set(r,Date.now()),this.accessBeat+=1,o}},{key:"getCompositeKey",value:function(n){var r=this,o=n.map(function(i){return i&&yn(i)==="object"?"obj_".concat(r.getObjectID(i)):"".concat(yn(i),"_").concat(i)});return o.join("|")}},{key:"getObjectID",value:function(n){if(this.objectIDMap.has(n))return this.objectIDMap.get(n);var r=this.nextID;return this.objectIDMap.set(n,r),this.nextID+=1,r}},{key:"clear",value:function(){var n=this;if(this.accessBeat>1e4){var r=Date.now();this.lastAccessBeat.forEach(function(o,i){r-o>JF&&(n.map.delete(i),n.lastAccessBeat.delete(i));}),this.accessBeat=0;}}}]),e})(),gw=new eL;function tL(e,t){return f.useMemo(function(){var n=gw.get(t);if(n)return n;var r=e();return gw.set(t,r),r},t)}var nL=function(){return {}};function rL(e){var t=e.useCSP,n=t===void 0?nL:t,r=e.useToken,o=e.usePrefix,i=e.getResetStyles,s=e.getCommonStyle,a=e.getCompUnitless;function l(m,p,h,g){var b=Array.isArray(m)?m[0]:m;function y(E){return "".concat(String(b)).concat(E.slice(0,1).toUpperCase()).concat(E.slice(1))}var C=g?.unitless||{},x=typeof a=="function"?a(m):{},w=ln(ln({},x),{},tt({},y("zIndexPopup"),true));Object.keys(C).forEach(function(E){w[y(E)]=C[E];});var S=ln(ln({},g),{},{unitless:w,prefixToken:y}),I=u(m,p,h,S),$=c(b,h,S);return function(E){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:E,M=I(E,P),N=$(P);return [M,N]}}function c(m,p,h){var g=h.unitless,b=h.prefixToken,y=h.ignore;return function(C){var x=r(),w=x.cssVar,S=x.realToken;return R9({path:[m],prefix:w.prefix,key:w.key,unitless:g,ignore:y,token:S,scope:C},function(){var I=hw(m,S,p),$=mw(m,S,I,{deprecatedTokens:h?.deprecatedTokens});return I&&Object.keys(I).forEach(function(E){$[b(E)]=$[E],delete $[E];}),$}),w?.key}}function u(m,p,h){var g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},b=Array.isArray(m)?m:[m,m],y=my(b,1),C=y[0],x=b.join("-"),w=e.layer||{name:"antd"};return function(S){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:S,$=r(),E=$.theme,P=$.realToken,M=$.hashId,N=$.token,A=$.cssVar,k=$.zeroRuntime,R=f.useMemo(function(){return k},[]);if(R)return M;var L=o(),V=L.rootPrefixCls,_=L.iconPrefixCls,z=n(),D="css",W=tL(function(){var q=new Set;return Object.keys(g.unitless||{}).forEach(function(U){q.add(Zd(U,A.prefix)),q.add(Zd(U,fw(C,A.prefix)));}),XF(D,q)},[D,C,A?.prefix]),O=ZF(),B=O.max,j=O.min,Y={theme:E,token:N,hashId:M,nonce:function(){return z.nonce},clientOnly:g.clientOnly,layer:w,order:g.order||-999};return typeof i=="function"&&fb(ln(ln({},Y),{},{clientOnly:false,path:["Shared",V]}),function(){return i(N,{prefix:{rootPrefixCls:V,iconPrefixCls:_},csp:z})}),fb(ln(ln({},Y),{},{path:[x,S,_]}),function(){if(g.injectStyle===false)return [];var q=QF(N),U=q.token,K=q.flush,J=hw(C,P,h),Q=".".concat(S),G=mw(C,P,J,{deprecatedTokens:g.deprecatedTokens});J&&yn(J)==="object"&&Object.keys(J).forEach(function(be){J[be]="var(".concat(Zd(be,fw(C,A.prefix)),")");});var ee=vt(U,{componentCls:Q,prefixCls:S,iconCls:".".concat(_),antCls:".".concat(V),calc:W,max:B,min:j},J),re=p(ee,{hashId:M,prefixCls:S,rootPrefixCls:V,iconPrefixCls:_});K(C,G);var oe=typeof s=="function"?s(ee,S,I,g.resetFont):null;return [g.resetStyle===false?null:oe,re]}),M}}function d(m,p,h){var g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},b=u(m,p,h,ln({resetStyle:false,order:-998},g)),y=function(x){var w=x.prefixCls,S=x.rootCls,I=S===void 0?w:S;return b(w,I),null};return y}return {genStyleHooks:l,genSubStyleComponent:d,genComponentStyleHook:u}}const _i=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"],Lo={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},Lt=(e,t=false)=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}),Gs=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),Of=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),oL=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),iL=(e,t,n,r)=>{const o=`[class^="${t}"], [class*=" ${t}"]`,i=n?`.${n}`:o,s={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let a={};return r!==false&&(a={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[i]:{...a,...s,[o]:s}}},Bo=(e,t)=>({outline:`${X(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:"outline-offset 0s, outline 0s"}),Tr=(e,t)=>({"&:focus-visible":Bo(e,t)}),jI=e=>({[`.${e}`]:{...Gs(),[`.${e} .${e}-icon`]:{display:"block"}}}),sL=e=>({color:e.colorLink,textDecoration:e.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none",...Tr(e),"&:hover":{color:e.colorLinkHover,textDecoration:e.linkHoverDecoration},"&:focus":{color:e.colorLinkHover,textDecoration:e.linkFocusDecoration},"&:active":{color:e.colorLinkActive,textDecoration:e.linkHoverDecoration}}),{genStyleHooks:xt,genComponentStyleHook:aL,genSubStyleComponent:dl}=rL({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=f.useContext(ot);return {rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{const[e,t,n,r,o,i]=Tn();return {theme:e,realToken:t,hashId:n,token:r,cssVar:o,zeroRuntime:i}},useCSP:()=>{const{csp:e}=f.useContext(ot);return e??{}},getResetStyles:(e,t)=>{const n=oL(e);return [n,{"&":n},jI(t?.prefix.iconPrefixCls??Hm)]},getCommonStyle:iL,getCompUnitless:()=>mI}),hy=(e,t)=>{const n=`--${e.replace(".","")}-${t}-`;return (r,o=false)=>{const i=`${n}${r}`;return o?`var(${i})`:i}};function Vm(e,t){return _i.reduce((n,r)=>{const o=e[`${r}1`],i=e[`${r}3`],s=e[`${r}6`],a=e[`${r}7`];return {...n,...t(r,{lightColor:o,lightBorderColor:i,darkColor:s,textColor:a})}},{})}const lL=(e,t)=>(Tn(),fb({hashId:"",path:["ant-design-icons",e],nonce:()=>t?.nonce,layer:{name:"antd"}},()=>jI(e)));function cL(e,t,n){const r=e||{},o=r.inherit===false||!t?{...Hc,hashed:t?.hashed??Hc.hashed,cssVar:t?.cssVar}:t,i=f.useId();return ll(()=>{if(!e)return t;const s={...o.components};Object.keys(e.components||{}).forEach(c=>{s[c]={...s[c],...e.components[c]};});const a=`css-var-${i.replace(/:/g,"")}`,l={prefix:n?.prefixCls,...o.cssVar,...r.cssVar,key:r.cssVar?.key||a};return {...o,...r,token:{...o.token,...r.token},components:s,cssVar:l}},[r,o],(s,a)=>s.some((l,c)=>{const u=a[c];return !zi(l,u,true)}))}const bw=f__namespace.createContext(true);function uL(e){const t=f__namespace.useContext(bw),{children:n}=e,[,r]=Tn(),{motion:o}=r,i=f__namespace.useRef(false);return i.current||(i.current=t!==o),i.current?f__namespace.createElement(bw.Provider,{value:o},f__namespace.createElement(sF,{motion:o},n)):n}const dL=()=>null,fL=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let Ff,WI,qI,UI;function nh(){return Ff||Wc}function mL(){return WI||Hm}const pL=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:o}=e;t!==void 0&&(Ff=t),n!==void 0&&(WI=n),"holderRender"in e&&(UI=o),r&&(qI=r);},gy=()=>({getPrefixCls:(e,t)=>t||(e?`${nh()}-${e}`:nh()),getIconPrefixCls:mL,getRootPrefixCls:()=>Ff||nh(),getTheme:()=>qI,holderRender:UI}),hL=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,alert:o,affix:i,anchor:s,form:a,locale:l,componentSize:c,direction:u,space:d,splitter:m,virtual:p,dropdownMatchSelectWidth:h,popupMatchSelectWidth:g,popupOverflow:b,legacyLocale:y,parentContext:C,iconPrefixCls:x,theme:w,componentDisabled:S,segmented:I,statistic:$,spin:E,calendar:P,carousel:M,cascader:N,collapse:A,typography:k,checkbox:R,descriptions:L,divider:V,drawer:_,skeleton:z,steps:D,image:W,layout:O,list:B,mentions:j,modal:Y,progress:q,result:U,slider:K,breadcrumb:J,masonry:Q,menu:G,pagination:ee,input:re,textArea:oe,otp:be,empty:Z,badge:te,radio:ce,rate:ue,ribbon:he,switch:ye,transfer:pe,avatar:ie,message:ge,tag:Se,table:ke,card:qe,cardMeta:De,tabs:ze,timeline:je,timePicker:Le,upload:we,notification:Me,tree:Fe,colorPicker:Re,datePicker:Pe,rangePicker:Qe,flex:mt,wave:it,dropdown:ct,warning:bt,tour:pt,tooltip:rt,popover:et,popconfirm:Xe,qrcode:Ie,floatButton:Ne,floatButtonGroup:ae,variant:ve,inputNumber:de,treeSelect:se,watermark:Ce}=e,fe=f__namespace.useCallback((Ge,ut)=>{const{prefixCls:Pt}=e;if(ut)return ut;const qt=Pt||C.getPrefixCls("");return Ge?`${qt}-${Ge}`:qt},[C.getPrefixCls,e.prefixCls]),xe=x||C.iconPrefixCls||Hm,Oe=n||C.csp;lL(xe,Oe);const We=cL(w,C.theme,{prefixCls:fe("")}),Ze={csp:Oe,autoInsertSpaceInButton:r,alert:o,affix:i,anchor:s,locale:l||y,direction:u,space:d,splitter:m,virtual:p,popupMatchSelectWidth:g??h,popupOverflow:b,getPrefixCls:fe,iconPrefixCls:xe,theme:We,segmented:I,statistic:$,spin:E,calendar:P,carousel:M,cascader:N,collapse:A,typography:k,checkbox:R,descriptions:L,divider:V,drawer:_,skeleton:z,steps:D,image:W,input:re,textArea:oe,otp:be,layout:O,list:B,mentions:j,modal:Y,progress:q,result:U,slider:K,breadcrumb:J,masonry:Q,menu:G,pagination:ee,empty:Z,badge:te,radio:ce,rate:ue,ribbon:he,switch:ye,transfer:pe,avatar:ie,message:ge,tag:Se,table:ke,card:qe,cardMeta:De,tabs:ze,timeline:je,timePicker:Le,upload:we,notification:Me,tree:Fe,colorPicker:Re,datePicker:Pe,rangePicker:Qe,flex:mt,wave:it,dropdown:ct,warning:bt,tour:pt,tooltip:rt,popover:et,popconfirm:Xe,qrcode:Ie,floatButton:Ne,floatButtonGroup:ae,variant:ve,inputNumber:de,treeSelect:se,watermark:Ce},st={...C};Object.keys(Ze).forEach(Ge=>{Ze[Ge]!==void 0&&(st[Ge]=Ze[Ge]);}),fL.forEach(Ge=>{const ut=e[Ge];ut&&(st[Ge]=ut);}),typeof r<"u"&&(st.button={autoInsertSpace:r,...st.button});const Ct=ll(()=>st,st,(Ge,ut)=>{const Pt=Object.keys(Ge),qt=Object.keys(ut);return Pt.length!==qt.length||Pt.some(Xt=>Ge[Xt]!==ut[Xt])}),{layer:an}=f__namespace.useContext(Ts),On=f__namespace.useMemo(()=>({prefixCls:xe,csp:Oe,layer:an?"antd":void 0}),[xe,Oe,an]);let Rt=f__namespace.createElement(f__namespace.Fragment,null,f__namespace.createElement(dL,{dropdownMatchSelectWidth:h}),t);const me=f__namespace.useMemo(()=>$a(po.Form?.defaultValidateMessages||{},Ct.locale?.Form?.defaultValidateMessages||{},Ct.form?.validateMessages||{},a?.validateMessages||{}),[Ct,a?.validateMessages]);Object.keys(me).length>0&&(Rt=f__namespace.createElement(j9.Provider,{value:me},Rt)),l&&(Rt=f__namespace.createElement(T8,{locale:l,_ANT_MARK__:A8},Rt)),Rt=f__namespace.createElement(X0.Provider,{value:On},Rt),c&&(Rt=f__namespace.createElement(zF,{size:c},Rt)),Rt=f__namespace.createElement(uL,null,Rt),rt?.unique&&(Rt=f__namespace.createElement(BI,null,Rt));const Ae=f__namespace.useMemo(()=>{const{algorithm:Ge,token:ut,components:Pt,cssVar:qt,...Xt}=We||{},hn=Ge&&(!Array.isArray(Ge)||Ge.length>0)?Af(Ge):ay,Br={};Object.entries(Pt||{}).forEach(([pi,wo])=>{const qn={...wo};"algorithm"in qn&&(qn.algorithm===true?qn.theme=hn:(Array.isArray(qn.algorithm)||typeof qn.algorithm=="function")&&(qn.theme=Af(qn.algorithm)),delete qn.algorithm),Br[pi]=qn;});const Vo={...Wa,...ut};return {...Xt,theme:hn,token:Vo,components:Br,override:{override:Vo,...Br},cssVar:qt}},[We]);return w&&(Rt=f__namespace.createElement(ly.Provider,{value:Ae},Rt)),Ct.warning&&(Rt=f__namespace.createElement($8.Provider,{value:Ct.warning},Rt)),S!==void 0&&(Rt=f__namespace.createElement(kI,{disabled:S},Rt)),f__namespace.createElement(ot.Provider,{value:Ct},Rt)},yr=e=>{const t=f__namespace.useContext(ot),n=f__namespace.useContext(Q0);return f__namespace.createElement(hL,{parentContext:t,legacyLocale:n,...e})};yr.ConfigContext=ot;yr.SizeContext=Ua;yr.config=pL;yr.useConfig=_F;Object.defineProperty(yr,"SizeContext",{get:()=>Ua});const sn=e=>`${e}-css-var`,Vn=e=>{const t=f.useContext(Ua);return f.useMemo(()=>e?typeof e=="string"?e??t:typeof e=="function"?e(t):t:t,[e,t])},vs="RC_FORM_INTERNAL_HOOKS",Yt=()=>{Cn(false,"Can not find FormContext. Please make sure you wrap Field under Form.");},Ga=f__namespace.createContext({getFieldValue:Yt,getFieldsValue:Yt,getFieldError:Yt,getFieldWarning:Yt,getFieldsError:Yt,isFieldsTouched:Yt,isFieldTouched:Yt,isFieldValidating:Yt,isFieldsValidating:Yt,resetFields:Yt,setFields:Yt,setFieldValue:Yt,setFieldsValue:Yt,validateFields:Yt,submit:Yt,getInternalHooks:()=>(Yt(),{dispatch:Yt,initEntityValue:Yt,registerField:Yt,useSubscribe:Yt,setInitialValues:Yt,destroyForm:Yt,setCallbacks:Yt,registerWatch:Yt,getFields:Yt,setValidateMessages:Yt,setPreserve:Yt,getInitialValue:Yt,setBatchUpdate:Yt})}),Lf=f__namespace.createContext(null);function Eb(e){return e==null?[]:Array.isArray(e)?e:[e]}function gL(e){return e&&!!e._init}function Ib(){return {default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var Pb=Ib();function bL(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function vL(e,t,n){if(py())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&qc(o,n.prototype),o}function Nb(e){var t=typeof Map=="function"?new Map:void 0;return Nb=function(r){if(r===null||!bL(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(r))return t.get(r);t.set(r,o);}function o(){return vL(r,arguments,Uc(this).constructor)}return o.prototype=Object.create(r.prototype,{constructor:{value:o,enumerable:false,writable:true,configurable:true}}),qc(o,r)},Nb(e)}var yL=/%[sdj%]/g,CL=function(){};function Mb(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var r=n.field;t[r]=t[r]||[],t[r].push(n);}),t}function Nr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,i=n.length;if(typeof e=="function")return e.apply(null,n);if(typeof e=="string"){var s=e.replace(yL,function(a){if(a==="%%")return "%";if(o>=i)return a;switch(a){case "%s":return String(n[o++]);case "%d":return Number(n[o++]);case "%j":try{return JSON.stringify(n[o++])}catch{return "[Circular]"}break;default:return a}});return s}return e}function xL(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function En(e,t){return !!(e==null||t==="array"&&Array.isArray(e)&&!e.length||xL(t)&&typeof e=="string"&&!e)}function wL(e,t,n){var r=[],o=0,i=e.length;function s(a){r.push.apply(r,Et(a||[])),o++,o===i&&n(r);}e.forEach(function(a){t(a,s);});}function vw(e,t,n){var r=0,o=e.length;function i(s){if(s&&s.length){n(s);return}var a=r;r=r+1,a<o?t(e[a],i):n([]);}i([]);}function SL(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,Et(e[n]||[]));}),t}var yw=(function(e){zI(n,e);var t=_I(n);function n(r,o){var i;return no(this,n),i=t.call(this,"Async Validation Error"),tt(Ra(i),"errors",void 0),tt(Ra(i),"fields",void 0),i.errors=r,i.fields=o,i}return ro(n)})(Nb(Error));function $L(e,t,n,r,o){if(t.first){var i=new Promise(function(m,p){var h=function(y){return r(y),y.length?p(new yw(y,Mb(y))):m(o)},g=SL(e);vw(g,n,h);});return i.catch(function(m){return m}),i}var s=t.firstFields===true?Object.keys(e):t.firstFields||[],a=Object.keys(e),l=a.length,c=0,u=[],d=new Promise(function(m,p){var h=function(b){if(u.push.apply(u,b),c++,c===l)return r(u),u.length?p(new yw(u,Mb(u))):m(o)};a.length||(r(u),m(o)),a.forEach(function(g){var b=e[g];s.indexOf(g)!==-1?vw(b,n,h):wL(b,n,h);});});return d.catch(function(m){return m}),d}function EL(e){return !!(e&&e.message!==void 0)}function IL(e,t){for(var n=e,r=0;r<t.length;r++){if(n==null)return n;n=n[t[r]];}return n}function Cw(e,t){return function(n){var r;return e.fullFields?r=IL(t,e.fullFields):r=t[n.field||e.fullField],EL(n)?(n.field=n.field||e.fullField,n.fieldValue=r,n):{message:typeof n=="function"?n():n,fieldValue:r,field:n.field||e.fullField}}}function xw(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];yn(r)==="object"&&yn(e[n])==="object"?e[n]=ln(ln({},e[n]),r):e[n]=r;}}return e}var ca="enum",PL=function(t,n,r,o,i){t[ca]=Array.isArray(t[ca])?t[ca]:[],t[ca].indexOf(n)===-1&&o.push(Nr(i.messages[ca],t.fullField,t[ca].join(", ")));},NL=function(t,n,r,o,i){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||o.push(Nr(i.messages.pattern.mismatch,t.fullField,n,t.pattern));else if(typeof t.pattern=="string"){var s=new RegExp(t.pattern);s.test(n)||o.push(Nr(i.messages.pattern.mismatch,t.fullField,n,t.pattern));}}},ML=function(t,n,r,o,i){var s=typeof t.len=="number",a=typeof t.min=="number",l=typeof t.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=n,d=null,m=typeof n=="number",p=typeof n=="string",h=Array.isArray(n);if(m?d="number":p?d="string":h&&(d="array"),!d)return false;h&&(u=n.length),p&&(u=n.replace(c,"_").length),s?u!==t.len&&o.push(Nr(i.messages[d].len,t.fullField,t.len)):a&&!l&&u<t.min?o.push(Nr(i.messages[d].min,t.fullField,t.min)):l&&!a&&u>t.max?o.push(Nr(i.messages[d].max,t.fullField,t.max)):a&&l&&(u<t.min||u>t.max)&&o.push(Nr(i.messages[d].range,t.fullField,t.min,t.max));},GI=function(t,n,r,o,i,s){t.required&&(!r.hasOwnProperty(t.field)||En(n,s||t.type))&&o.push(Nr(i.messages.required,t.fullField));},Sd;const RL=(function(){if(Sd)return Sd;var e="[a-fA-F\\d:]",t=function(I){return I&&I.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(e,")|(?<=").concat(e,")(?=\\s|$))"):""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",o=["(?:".concat(r,":){7}(?:").concat(r,"|:)"),"(?:".concat(r,":){6}(?:").concat(n,"|:").concat(r,"|:)"),"(?:".concat(r,":){5}(?::").concat(n,"|(?::").concat(r,"){1,2}|:)"),"(?:".concat(r,":){4}(?:(?::").concat(r,"){0,1}:").concat(n,"|(?::").concat(r,"){1,3}|:)"),"(?:".concat(r,":){3}(?:(?::").concat(r,"){0,2}:").concat(n,"|(?::").concat(r,"){1,4}|:)"),"(?:".concat(r,":){2}(?:(?::").concat(r,"){0,3}:").concat(n,"|(?::").concat(r,"){1,5}|:)"),"(?:".concat(r,":){1}(?:(?::").concat(r,"){0,4}:").concat(n,"|(?::").concat(r,"){1,6}|:)"),"(?::(?:(?::".concat(r,"){0,5}:").concat(n,"|(?::").concat(r,"){1,7}|:))")],i="(?:%[0-9a-zA-Z]{1,})?",s="(?:".concat(o.join("|"),")").concat(i),a=new RegExp("(?:^".concat(n,"$)|(?:^").concat(s,"$)")),l=new RegExp("^".concat(n,"$")),c=new RegExp("^".concat(s,"$")),u=function(I){return I&&I.exact?a:new RegExp("(?:".concat(t(I)).concat(n).concat(t(I),")|(?:").concat(t(I)).concat(s).concat(t(I),")"),"g")};u.v4=function(S){return S&&S.exact?l:new RegExp("".concat(t(S)).concat(n).concat(t(S)),"g")},u.v6=function(S){return S&&S.exact?c:new RegExp("".concat(t(S)).concat(s).concat(t(S)),"g")};var d="(?:(?:[a-z]+:)?//)",m="(?:\\S+(?::\\S*)?@)?",p=u.v4().source,h=u.v6().source,g="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",b="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",y="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",C="(?::\\d{2,5})?",x='(?:[/?#][^\\s"]*)?',w="(?:".concat(d,"|www\\.)").concat(m,"(?:localhost|").concat(p,"|").concat(h,"|").concat(g).concat(b).concat(y,")").concat(C).concat(x);return Sd=new RegExp("(?:^".concat(w,"$)"),"i"),Sd});var ww={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},lc={integer:function(t){return lc.number(t)&&parseInt(t,10)===t},float:function(t){return lc.number(t)&&!lc.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return true;try{return !!new RegExp(t)}catch{return false}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?false:typeof t=="number"},object:function(t){return yn(t)==="object"&&!lc.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(ww.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(RL())},hex:function(t){return typeof t=="string"&&!!t.match(ww.hex)}},AL=function(t,n,r,o,i){if(t.required&&n===void 0){GI(t,n,r,o,i);return}var s=["integer","float","array","regexp","object","method","email","number","date","url","hex"],a=t.type;s.indexOf(a)>-1?lc[a](n)||o.push(Nr(i.messages.types[a],t.fullField,t.type)):a&&yn(n)!==t.type&&o.push(Nr(i.messages.types[a],t.fullField,t.type));},TL=function(t,n,r,o,i){(/^\s+$/.test(n)||n==="")&&o.push(Nr(i.messages.whitespace,t.fullField));};const Ot={required:GI,whitespace:TL,type:AL,range:ML,enum:PL,pattern:NL};var OL=function(t,n,r,o,i){var s=[],a=t.required||!t.required&&o.hasOwnProperty(t.field);if(a){if(En(n)&&!t.required)return r();Ot.required(t,n,o,s,i);}r(s);},FL=function(t,n,r,o,i){var s=[],a=t.required||!t.required&&o.hasOwnProperty(t.field);if(a){if(n==null&&!t.required)return r();Ot.required(t,n,o,s,i,"array"),n!=null&&(Ot.type(t,n,o,s,i),Ot.range(t,n,o,s,i));}r(s);},LL=function(t,n,r,o,i){var s=[],a=t.required||!t.required&&o.hasOwnProperty(t.field);if(a){if(En(n)&&!t.required)return r();Ot.required(t,n,o,s,i),n!==void 0&&Ot.type(t,n,o,s,i);}r(s);},BL=function(t,n,r,o,i){var s=[],a=t.required||!t.required&&o.hasOwnProperty(t.field);if(a){if(En(n,"date")&&!t.required)return r();if(Ot.required(t,n,o,s,i),!En(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),Ot.type(t,l,o,s,i),l&&Ot.range(t,l.getTime(),o,s,i);}}r(s);},kL="enum",DL=function(t,n,r,o,i){var s=[],a=t.required||!t.required&&o.hasOwnProperty(t.field);if(a){if(En(n)&&!t.required)return r();Ot.required(t,n,o,s,i),n!==void 0&&Ot[kL](t,n,o,s,i);}r(s);},zL=function(t,n,r,o,i){var s=[],a=t.required||!t.required&&o.hasOwnProperty(t.field);if(a){if(En(n)&&!t.required)return r();Ot.required(t,n,o,s,i),n!==void 0&&(Ot.type(t,n,o,s,i),Ot.range(t,n,o,s,i));}r(s);},_L=function(t,n,r,o,i){var s=[],a=t.required||!t.required&&o.hasOwnProperty(t.field);if(a){if(En(n)&&!t.required)return r();Ot.required(t,n,o,s,i),n!==void 0&&(Ot.type(t,n,o,s,i),Ot.range(t,n,o,s,i));}r(s);},HL=function(t,n,r,o,i){var s=[],a=t.required||!t.required&&o.hasOwnProperty(t.field);if(a){if(En(n)&&!t.required)return r();Ot.required(t,n,o,s,i),n!==void 0&&Ot.type(t,n,o,s,i);}r(s);},VL=function(t,n,r,o,i){var s=[],a=t.required||!t.required&&o.hasOwnProperty(t.field);if(a){if(n===""&&(n=void 0),En(n)&&!t.required)return r();Ot.required(t,n,o,s,i),n!==void 0&&(Ot.type(t,n,o,s,i),Ot.range(t,n,o,s,i));}r(s);},jL=function(t,n,r,o,i){var s=[],a=t.required||!t.required&&o.hasOwnProperty(t.field);if(a){if(En(n)&&!t.required)return r();Ot.required(t,n,o,s,i),n!==void 0&&Ot.type(t,n,o,s,i);}r(s);},WL=function(t,n,r,o,i){var s=[],a=t.required||!t.required&&o.hasOwnProperty(t.field);if(a){if(En(n,"string")&&!t.required)return r();Ot.required(t,n,o,s,i),En(n,"string")||Ot.pattern(t,n,o,s,i);}r(s);},qL=function(t,n,r,o,i){var s=[],a=t.required||!t.required&&o.hasOwnProperty(t.field);if(a){if(En(n)&&!t.required)return r();Ot.required(t,n,o,s,i),En(n)||Ot.type(t,n,o,s,i);}r(s);},UL=function(t,n,r,o,i){var s=[],a=Array.isArray(n)?"array":yn(n);Ot.required(t,n,o,s,i,a),r(s);},GL=function(t,n,r,o,i){var s=[],a=t.required||!t.required&&o.hasOwnProperty(t.field);if(a){if(En(n,"string")&&!t.required)return r();Ot.required(t,n,o,s,i,"string"),En(n,"string")||(Ot.type(t,n,o,s,i),Ot.range(t,n,o,s,i),Ot.pattern(t,n,o,s,i),t.whitespace===true&&Ot.whitespace(t,n,o,s,i));}r(s);},rh=function(t,n,r,o,i){var s=t.type,a=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(En(n,s)&&!t.required)return r();Ot.required(t,n,o,a,i,s),En(n,s)||Ot.type(t,n,o,a,i);}r(a);};const yc={string:GL,method:HL,number:VL,boolean:LL,regexp:qL,integer:_L,float:zL,array:FL,object:jL,enum:DL,pattern:WL,date:BL,url:rh,hex:rh,email:rh,required:UL,any:OL};var Pu=(function(){function e(t){no(this,e),tt(this,"rules",null),tt(this,"_messages",Pb),this.define(t);}return ro(e,[{key:"define",value:function(n){var r=this;if(!n)throw new Error("Cannot configure a schema with no rules");if(yn(n)!=="object"||Array.isArray(n))throw new Error("Rules must be an object");this.rules={},Object.keys(n).forEach(function(o){var i=n[o];r.rules[o]=Array.isArray(i)?i:[i];});}},{key:"messages",value:function(n){return n&&(this._messages=xw(Ib(),n)),this._messages}},{key:"validate",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},s=n,a=o,l=i;if(typeof a=="function"&&(l=a,a={}),!this.rules||Object.keys(this.rules).length===0)return l&&l(null,s),Promise.resolve(s);function c(h){var g=[],b={};function y(x){if(Array.isArray(x)){var w;g=(w=g).concat.apply(w,Et(x));}else g.push(x);}for(var C=0;C<h.length;C++)y(h[C]);g.length?(b=Mb(g),l(g,b)):l(null,s);}if(a.messages){var u=this.messages();u===Pb&&(u=Ib()),xw(u,a.messages),a.messages=u;}else a.messages=this.messages();var d={},m=a.keys||Object.keys(this.rules);m.forEach(function(h){var g=r.rules[h],b=s[h];g.forEach(function(y){var C=y;typeof C.transform=="function"&&(s===n&&(s=ln({},s)),b=s[h]=C.transform(b),b!=null&&(C.type=C.type||(Array.isArray(b)?"array":yn(b)))),typeof C=="function"?C={validator:C}:C=ln({},C),C.validator=r.getValidationMethod(C),C.validator&&(C.field=h,C.fullField=C.fullField||h,C.type=r.getType(C),d[h]=d[h]||[],d[h].push({rule:C,value:b,source:s,field:h}));});});var p={};return $L(d,a,function(h,g){var b=h.rule,y=(b.type==="object"||b.type==="array")&&(yn(b.fields)==="object"||yn(b.defaultField)==="object");y=y&&(b.required||!b.required&&h.value),b.field=h.field;function C($,E){return ln(ln({},E),{},{fullField:"".concat(b.fullField,".").concat($),fullFields:b.fullFields?[].concat(Et(b.fullFields),[$]):[$]})}function x(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],E=Array.isArray($)?$:[$];!a.suppressWarning&&E.length&&e.warning("async-validator:",E),E.length&&b.message!==void 0&&(E=[].concat(b.message));var P=E.map(Cw(b,s));if(a.first&&P.length)return p[b.field]=1,g(P);if(!y)g(P);else {if(b.required&&!h.value)return b.message!==void 0?P=[].concat(b.message).map(Cw(b,s)):a.error&&(P=[a.error(b,Nr(a.messages.required,b.field))]),g(P);var M={};b.defaultField&&Object.keys(h.value).map(function(k){M[k]=b.defaultField;}),M=ln(ln({},M),h.rule.fields);var N={};Object.keys(M).forEach(function(k){var R=M[k],L=Array.isArray(R)?R:[R];N[k]=L.map(C.bind(null,k));});var A=new e(N);A.messages(a.messages),h.rule.options&&(h.rule.options.messages=a.messages,h.rule.options.error=a.error),A.validate(h.value,h.rule.options||a,function(k){var R=[];P&&P.length&&R.push.apply(R,Et(P)),k&&k.length&&R.push.apply(R,Et(k)),g(R.length?R:null);});}}var w;if(b.asyncValidator)w=b.asyncValidator(b,h.value,x,h.source,a);else if(b.validator){try{w=b.validator(b,h.value,x,h.source,a);}catch($){var S,I;(S=(I=console).error)===null||S===void 0||S.call(I,$),a.suppressValidatorError||setTimeout(function(){throw $},0),x($.message);}w===true?x():w===false?x(typeof b.message=="function"?b.message(b.fullField||b.field):b.message||"".concat(b.fullField||b.field," fails")):w instanceof Array?x(w):w instanceof Error&&x(w.message);}w&&w.then&&w.then(function(){return x()},function($){return x($)});},function(h){c(h);},s)}},{key:"getType",value:function(n){if(n.type===void 0&&n.pattern instanceof RegExp&&(n.type="pattern"),typeof n.validator!="function"&&n.type&&!yc.hasOwnProperty(n.type))throw new Error(Nr("Unknown rule type %s",n.type));return n.type||"string"}},{key:"getValidationMethod",value:function(n){if(typeof n.validator=="function")return n.validator;var r=Object.keys(n),o=r.indexOf("message");return o!==-1&&r.splice(o,1),r.length===1&&r[0]==="required"?yc.required:yc[this.getType(n)]||void 0}}]),e})();tt(Pu,"register",function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");yc[t]=n;});tt(Pu,"warning",CL);tt(Pu,"messages",Pb);tt(Pu,"validators",yc);const wr="'${name}' is not a valid ${type}",KI={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:wr,method:wr,array:wr,object:wr,number:wr,date:wr,boolean:wr,integer:wr,float:wr,regexp:wr,email:wr,url:wr,hex:wr},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},Sw=Pu;function KL(e,t){return e.replace(/\\?\$\{\w+\}/g,n=>{if(n.startsWith("\\"))return n.slice(1);const r=n.slice(2,-1);return t[r]})}const $w="CODE_LOGIC_ERROR";async function Rb(e,t,n,r,o){const i={...n};if(delete i.ruleIndex,Sw.warning=()=>{},i.validator){const m=i.validator;i.validator=(...p)=>{try{return m(...p)}catch(h){return console.error(h),Promise.reject($w)}};}let s=null;i&&i.type==="array"&&i.defaultField&&(s=i.defaultField,delete i.defaultField);const a=new Sw({[e]:[i]}),l=$a(KI,r.validateMessages);a.messages(l);let c=[];try{await Promise.resolve(a.validate({[e]:t},{...r}));}catch(m){m.errors&&(c=m.errors.map(({message:p},h)=>{const g=p===$w?l.default:p;return f__namespace.isValidElement(g)?f__namespace.cloneElement(g,{key:`error_${h}`}):g}));}if(!c.length&&s&&Array.isArray(t)&&t.length>0)return (await Promise.all(t.map((p,h)=>Rb(`${e}.${h}`,p,s,r,o)))).reduce((p,h)=>[...p,...h],[]);const u={...n,name:e,enum:(n.enum||[]).join(", "),...o};return c.map(m=>typeof m=="string"?KL(m,u):m)}function XL(e,t,n,r,o,i){const s=e.join("."),a=n.map((c,u)=>{const d=c.validator,m={...c,ruleIndex:u};return d&&(m.validator=(p,h,g)=>{let b=false;const C=d(p,h,(...x)=>{Promise.resolve().then(()=>{Cn(!b,"Your validator function has already return a promise. `callback` will be ignored."),b||g(...x);});});b=C&&typeof C.then=="function"&&typeof C.catch=="function",Cn(b,"`callback` is deprecated. Please return a promise instead."),b&&C.then(()=>{g();}).catch(x=>{g(x||" ");});}),m}).sort(({warningOnly:c,ruleIndex:u},{warningOnly:d,ruleIndex:m})=>!!c==!!d?u-m:c?1:-1);let l;if(o===true)l=new Promise(async(c,u)=>{for(let d=0;d<a.length;d+=1){const m=a[d],p=await Rb(s,t,m,r,i);if(p.length){u([{errors:p,rule:m}]);return}}c([]);});else {const c=a.map(u=>Rb(s,t,u,r,i).then(d=>({errors:d,rule:u})));l=(o?QL(c):YL(c)).then(u=>Promise.reject(u));}return l.catch(c=>c),l}async function YL(e){return Promise.all(e).then(t=>[].concat(...t))}async function QL(e){let t=0;return new Promise(n=>{e.forEach(r=>{r.then(o=>{o.errors.length&&n([o]),t+=1,t===e.length&&n([]);});});})}function mn(e){return Eb(e)}function Ew(e,t){let n={};return t.forEach(r=>{const o=co(e,r);n=_r(n,r,o);}),n}function Aa(e,t,n=false){return e&&e.some(r=>Ab(t,r,n))}function Ab(e,t,n=false){return !e||!t||!n&&e.length!==t.length?false:t.every((r,o)=>e[o]===r)}function ZL(e,t){if(e===t)return true;if(!e&&t||e&&!t||!e||!t||typeof e!="object"||typeof t!="object")return false;const n=Object.keys(e),r=Object.keys(t);return [...new Set([...n,...r])].every(i=>{const s=e[i],a=t[i];return typeof s=="function"&&typeof a=="function"?true:s===a})}function JL(e,...t){const n=t[0];return n&&n.target&&typeof n.target=="object"&&e in n.target?n.target[e]:n}function Iw(e,t,n){const{length:r}=e;if(t<0||t>=r||n<0||n>=r)return e;const o=e[t],i=t-n;return i>0?[...e.slice(0,n),o,...e.slice(n,t),...e.slice(t+1,r)]:i<0?[...e.slice(0,t),...e.slice(t+1,n+1),o,...e.slice(n+1,r)]:e}function Tb(){return Tb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Tb.apply(this,arguments)}const ls=[],zl=[];function oh(e,t,n,r,o,i){return typeof e=="function"?e(t,n,"source"in i?{source:i.source}:{}):r!==o}class eB extends f__namespace.Component{static contextType=Ga;state={resetCount:0};cancelRegisterFunc=null;mounted=false;touched=false;dirty=false;validatePromise;prevValidating;errors=ls;warnings=zl;constructor(t){if(super(t),t.fieldContext){const{getInternalHooks:n}=t.fieldContext,{initEntityValue:r}=n(vs);r(this);}}componentDidMount(){const{shouldUpdate:t,fieldContext:n}=this.props;if(this.mounted=true,n){const{getInternalHooks:r}=n,{registerField:o}=r(vs);this.cancelRegisterFunc=o(this);}t===true&&this.reRender();}componentWillUnmount(){this.cancelRegister(),this.triggerMetaEvent(true),this.mounted=false;}cancelRegister=()=>{const{preserve:t,isListField:n,name:r}=this.props;this.cancelRegisterFunc&&this.cancelRegisterFunc(n,t,mn(r)),this.cancelRegisterFunc=null;};getNamePath=()=>{const{name:t,fieldContext:n}=this.props,{prefixName:r=[]}=n;return t!==void 0?[...r,...t]:[]};getRules=()=>{const{rules:t=[],fieldContext:n}=this.props;return t.map(r=>typeof r=="function"?r(n):r)};reRender(){this.mounted&&this.forceUpdate();}refresh=()=>{this.mounted&&this.setState(({resetCount:t})=>({resetCount:t+1}));};metaCache=null;triggerMetaEvent=t=>{const{onMetaChange:n}=this.props;if(n){const r={...this.getMeta(),destroy:t};zi(this.metaCache,r)||n(r),this.metaCache=r;}else this.metaCache=null;};onStoreChange=(t,n,r)=>{const{shouldUpdate:o,dependencies:i=[],onReset:s}=this.props,{store:a}=r,l=this.getNamePath(),c=this.getValue(t),u=this.getValue(a),d=n&&Aa(n,l);switch(r.type==="valueUpdate"&&r.source==="external"&&!zi(c,u)&&(this.touched=true,this.dirty=true,this.validatePromise=null,this.errors=ls,this.warnings=zl,this.triggerMetaEvent()),r.type){case "reset":if(!n||d){this.touched=false,this.dirty=false,this.validatePromise=void 0,this.errors=ls,this.warnings=zl,this.triggerMetaEvent(),s?.(),this.refresh();return}break;case "remove":{if(o&&oh(o,t,a,c,u,r)){this.reRender();return}break}case "setField":{const{data:m}=r;if(d){"touched"in m&&(this.touched=m.touched),"validating"in m&&!("originRCField"in m)&&(this.validatePromise=m.validating?Promise.resolve([]):null),"errors"in m&&(this.errors=m.errors||ls),"warnings"in m&&(this.warnings=m.warnings||zl),this.dirty=true,this.triggerMetaEvent(),this.reRender();return}else if("value"in m&&Aa(n,l,true)){this.reRender();return}if(o&&!l.length&&oh(o,t,a,c,u,r)){this.reRender();return}break}case "dependenciesUpdate":{if(i.map(mn).some(p=>Aa(r.relatedFields,p))){this.reRender();return}break}default:if(d||(!i.length||l.length||o)&&oh(o,t,a,c,u,r)){this.reRender();return}break}o===true&&this.reRender();};validateRules=t=>{const n=this.getNamePath(),r=this.getValue(),{triggerName:o,validateOnly:i=false}=t||{},s=Promise.resolve().then(async()=>{if(!this.mounted)return [];const{validateFirst:a=false,messageVariables:l,validateDebounce:c}=this.props;let u=this.getRules();if(o&&(u=u.filter(m=>m).filter(m=>{const{validateTrigger:p}=m;return p?Eb(p).includes(o):true})),c&&o&&(await new Promise(m=>{setTimeout(m,c);}),this.validatePromise!==s))return [];const d=XL(n,r,u,t,a,l);return d.catch(m=>m).then((m=ls)=>{if(this.validatePromise===s){this.validatePromise=null;const p=[],h=[];m.forEach?.(({rule:{warningOnly:g},errors:b=ls})=>{g?h.push(...b):p.push(...b);}),this.errors=p,this.warnings=h,this.triggerMetaEvent(),this.reRender();}}),d});return i||(this.validatePromise=s,this.dirty=true,this.errors=ls,this.warnings=zl,this.triggerMetaEvent(),this.reRender()),s};isFieldValidating=()=>!!this.validatePromise;isFieldTouched=()=>this.touched;isFieldDirty=()=>{if(this.dirty||this.props.initialValue!==void 0)return true;const{fieldContext:t}=this.props,{getInitialValue:n}=t.getInternalHooks(vs);return n(this.getNamePath())!==void 0};getErrors=()=>this.errors;getWarnings=()=>this.warnings;isListField=()=>this.props.isListField;isList=()=>this.props.isList;isPreserve=()=>this.props.preserve;getMeta=()=>(this.prevValidating=this.isFieldValidating(),{touched:this.isFieldTouched(),validating:this.prevValidating,errors:this.errors,warnings:this.warnings,name:this.getNamePath(),validated:this.validatePromise===null});getOnlyChild=t=>{if(typeof t=="function"){const r=this.getMeta();return {...this.getOnlyChild(t(this.getControlled(),r,this.props.fieldContext)),isFunction:true}}const n=gr(t);return n.length!==1||!f__namespace.isValidElement(n[0])?{child:n,isFunction:false}:{child:n[0],isFunction:false}};getValue=t=>{const{getFieldsValue:n}=this.props.fieldContext,r=this.getNamePath();return co(t||n(true),r)};getControlled=(t={})=>{const{name:n,trigger:r="onChange",validateTrigger:o,getValueFromEvent:i,normalize:s,valuePropName:a="value",getValueProps:l,fieldContext:c}=this.props,u=o!==void 0?o:c.validateTrigger,d=this.getNamePath(),{getInternalHooks:m,getFieldsValue:p}=c,{dispatch:h}=m(vs),g=this.getValue(),b=l||(S=>({[a]:S})),y=t[r],C=n!==void 0?b(g):{},x={...t,...C};return x[r]=(...S)=>{this.touched=true,this.dirty=true,this.triggerMetaEvent();let I;i?I=i(...S):I=JL(a,...S),s&&(I=s(I,g,p(true))),I!==g&&h({type:"updateValue",namePath:d,value:I}),y&&y(...S);},Eb(u||[]).forEach(S=>{const I=x[S];x[S]=(...$)=>{I&&I(...$);const{rules:E}=this.props;E&&E.length&&h({type:"validateField",namePath:d,triggerName:S});};}),x};render(){const{resetCount:t}=this.state,{children:n}=this.props,{child:r,isFunction:o}=this.getOnlyChild(n);let i;return o?i=r:f__namespace.isValidElement(r)?i=f__namespace.cloneElement(r,this.getControlled(r.props)):(Cn(!r,"`children` of Field is not validate ReactElement."),i=r),f__namespace.createElement(f__namespace.Fragment,{key:t},i)}}function XI({name:e,...t}){const n=f__namespace.useContext(Ga),r=f__namespace.useContext(Lf),o=e!==void 0?mn(e):void 0,i=t.isListField??!!r;let s="keep";return i||(s=`_${(o||[]).join("_")}`),f__namespace.createElement(eB,Tb({key:s,name:o,isListField:i},t,{fieldContext:n}))}function tB({name:e,initialValue:t,children:n,rules:r,validateTrigger:o,isListField:i}){const s=f__namespace.useContext(Ga),a=f__namespace.useContext(Lf),c=f__namespace.useRef({keys:[],id:0}).current,u=f__namespace.useMemo(()=>[...mn(s.prefixName)||[],...mn(e)],[s.prefixName,e]),d=f__namespace.useMemo(()=>({...s,prefixName:u}),[s,u]),m=f__namespace.useMemo(()=>({getKey:h=>{const g=u.length,b=h[g];return [c.keys[b],h.slice(g+1)]}}),[c,u]);if(typeof n!="function")return Cn(false,"Form.List only accepts function as children."),null;const p=(h,g,{source:b})=>b==="internal"?false:h!==g;return f__namespace.createElement(Lf.Provider,{value:m},f__namespace.createElement(Ga.Provider,{value:d},f__namespace.createElement(XI,{name:[],shouldUpdate:p,rules:r,validateTrigger:o,initialValue:t,isList:true,isListField:i??!!a},({value:h=[],onChange:g},b)=>{const{getFieldValue:y}=s,C=()=>y(u||[])||[],x={add:(S,I)=>{const $=C();I>=0&&I<=$.length?(c.keys=[...c.keys.slice(0,I),c.id,...c.keys.slice(I)],g([...$.slice(0,I),S,...$.slice(I)])):(c.keys=[...c.keys,c.id],g([...$,S])),c.id+=1;},remove:S=>{const I=C(),$=new Set(Array.isArray(S)?S:[S]);$.size<=0||(c.keys=c.keys.filter((E,P)=>!$.has(P)),g(I.filter((E,P)=>!$.has(P))));},move(S,I){if(S===I)return;const $=C();S<0||S>=$.length||I<0||I>=$.length||(c.keys=Iw(c.keys,S,I),g(Iw($,S,I)));}};let w=h||[];return Array.isArray(w)||(w=[]),n(w.map((S,I)=>{let $=c.keys[I];return $===void 0&&(c.keys[I]=c.id,$=c.keys[I],c.id+=1),{name:I,key:$,isListField:true}}),x,b)})))}function nB(e){let t=false,n=e.length;const r=[];return e.length?new Promise((o,i)=>{e.forEach((s,a)=>{s.catch(l=>(t=true,l)).then(l=>{n-=1,r[a]=l,!(n>0)&&(t&&i(r),o(r));});});}):Promise.resolve([])}const YI="__@field_split__";function ih(e){return e.map(t=>`${typeof t}:${t}`).join(YI)}class ua{kvs=new Map;set(t,n){this.kvs.set(ih(t),n);}get(t){return this.kvs.get(ih(t))}update(t,n){const r=this.get(t),o=n(r);o?this.set(t,o):this.delete(t);}delete(t){this.kvs.delete(ih(t));}map(t){return [...this.kvs.entries()].map(([n,r])=>{const o=n.split(YI);return t({key:o.map(i=>{const[,s,a]=i.match(/^([^:]*):(.*)$/);return s==="number"?Number(a):a}),value:r})})}toJSON(){const t={};return this.map(({key:n,value:r})=>(t[n.join(".")]=r,null)),t}}class rB{formHooked=false;forceRootUpdate;subscribable=true;store={};fieldEntities=[];initialValues={};callbacks={};validateMessages=null;preserve=null;lastValidatePromise=null;constructor(t){this.forceRootUpdate=t;}getForm=()=>({getFieldValue:this.getFieldValue,getFieldsValue:this.getFieldsValue,getFieldError:this.getFieldError,getFieldWarning:this.getFieldWarning,getFieldsError:this.getFieldsError,isFieldsTouched:this.isFieldsTouched,isFieldTouched:this.isFieldTouched,isFieldValidating:this.isFieldValidating,isFieldsValidating:this.isFieldsValidating,resetFields:this.resetFields,setFields:this.setFields,setFieldValue:this.setFieldValue,setFieldsValue:this.setFieldsValue,validateFields:this.validateFields,submit:this.submit,_init:true,getInternalHooks:this.getInternalHooks});getInternalHooks=t=>t===vs?(this.formHooked=true,{dispatch:this.dispatch,initEntityValue:this.initEntityValue,registerField:this.registerField,useSubscribe:this.useSubscribe,setInitialValues:this.setInitialValues,destroyForm:this.destroyForm,setCallbacks:this.setCallbacks,setValidateMessages:this.setValidateMessages,getFields:this.getFields,setPreserve:this.setPreserve,getInitialValue:this.getInitialValue,registerWatch:this.registerWatch,setBatchUpdate:this.setBatchUpdate}):(Cn(false,"`getInternalHooks` is internal usage. Should not call directly."),null);useSubscribe=t=>{this.subscribable=t;};prevWithoutPreserves=null;setInitialValues=(t,n)=>{if(this.initialValues=t||{},n){let r=$a(t,this.store);this.prevWithoutPreserves?.map(({key:o})=>{r=_r(r,o,co(t,o));}),this.prevWithoutPreserves=null,this.updateStore(r);}};destroyForm=t=>{if(t)this.updateStore({});else {const n=new ua;this.getFieldEntities(true).forEach(r=>{this.isMergedPreserve(r.isPreserve())||n.set(r.getNamePath(),true);}),this.prevWithoutPreserves=n;}};getInitialValue=t=>{const n=co(this.initialValues,t);return t.length?$a(n):n};setCallbacks=t=>{this.callbacks=t;};setValidateMessages=t=>{this.validateMessages=t;};setPreserve=t=>{this.preserve=t;};watchList=[];registerWatch=t=>(this.watchList.push(t),()=>{this.watchList=this.watchList.filter(n=>n!==t);});notifyWatch=(t=[])=>{if(this.watchList.length){const n=this.getFieldsValue(),r=this.getFieldsValue(true);this.watchList.forEach(o=>{o(n,r,t);});}};notifyWatchNamePathList=[];batchNotifyWatch=t=>{this.notifyWatchNamePathList.push(t),this.batch("notifyWatch",()=>{this.notifyWatch(this.notifyWatchNamePathList),this.notifyWatchNamePathList=[];});};batchUpdate;setBatchUpdate=t=>{this.batchUpdate=t;};batch=(t,n)=>{this.batchUpdate(t,n);};timeoutId=null;warningUnhooked=()=>{};updateStore=t=>{this.store=t;};getFieldEntities=(t=false)=>t?this.fieldEntities.filter(n=>n.getNamePath().length):this.fieldEntities;getFieldsMap=(t=false)=>{const n=new ua;return this.getFieldEntities(t).forEach(r=>{const o=r.getNamePath();n.set(o,r);}),n};getFieldEntitiesForNamePathList=t=>{if(!t)return this.getFieldEntities(true);const n=this.getFieldsMap(true);return t.map(r=>{const o=mn(r);return n.get(o)||{INVALIDATE_NAME_PATH:mn(r)}})};getFieldsValue=(t,n)=>{this.warningUnhooked();let r,o;if(t===true||Array.isArray(t)?(r=t,o=n):t&&typeof t=="object"&&(o=t.filter),r===true&&!o)return this.store;const i=this.getFieldEntitiesForNamePathList(Array.isArray(r)?r:null),s=[],a=[];i.forEach(c=>{const u=c.INVALIDATE_NAME_PATH||c.getNamePath();if(c.isList?.()){a.push(u);return}if(!o)s.push(u);else {const d="getMeta"in c?c.getMeta():null;o(d)&&s.push(u);}});let l=Ew(this.store,s.map(mn));return a.forEach(c=>{co(l,c)||(l=_r(l,c,[]));}),l};getFieldValue=t=>{this.warningUnhooked();const n=mn(t);return co(this.store,n)};getFieldsError=t=>(this.warningUnhooked(),this.getFieldEntitiesForNamePathList(t).map((r,o)=>r&&!r.INVALIDATE_NAME_PATH?{name:r.getNamePath(),errors:r.getErrors(),warnings:r.getWarnings()}:{name:mn(t[o]),errors:[],warnings:[]}));getFieldError=t=>{this.warningUnhooked();const n=mn(t);return this.getFieldsError([n])[0].errors};getFieldWarning=t=>{this.warningUnhooked();const n=mn(t);return this.getFieldsError([n])[0].warnings};isFieldsTouched=(...t)=>{this.warningUnhooked();const[n,r]=t;let o,i=false;t.length===0?o=null:t.length===1?Array.isArray(n)?(o=n.map(mn),i=false):(o=null,i=n):(o=n.map(mn),i=r);const s=this.getFieldEntities(true),a=d=>d.isFieldTouched();if(!o)return i?s.every(d=>a(d)||d.isList()):s.some(a);const l=new ua;o.forEach(d=>{l.set(d,[]);}),s.forEach(d=>{const m=d.getNamePath();o.forEach(p=>{p.every((h,g)=>m[g]===h)&&l.update(p,h=>[...h,d]);});});const c=d=>d.some(a),u=l.map(({value:d})=>d);return i?u.every(c):u.some(c)};isFieldTouched=t=>(this.warningUnhooked(),this.isFieldsTouched([t]));isFieldsValidating=t=>{this.warningUnhooked();const n=this.getFieldEntities();if(!t)return n.some(o=>o.isFieldValidating());const r=t.map(mn);return n.some(o=>{const i=o.getNamePath();return Aa(r,i)&&o.isFieldValidating()})};isFieldValidating=t=>(this.warningUnhooked(),this.isFieldsValidating([t]));resetWithFieldInitialValue=(t={})=>{const n=new ua,r=this.getFieldEntities(true);r.forEach(s=>{const{initialValue:a}=s.props,l=s.getNamePath();if(a!==void 0){const c=n.get(l)||new Set;c.add({entity:s,value:a}),n.set(l,c);}});const o=s=>{s.forEach(a=>{const{initialValue:l}=a.props;if(l!==void 0){const c=a.getNamePath();if(this.getInitialValue(c)!==void 0)Cn(false,`Form already set 'initialValues' with path '${c.join(".")}'. Field can not overwrite it.`);else {const d=n.get(c);if(d&&d.size>1)Cn(false,`Multiple Field with path '${c.join(".")}' set 'initialValue'. Can not decide which one to pick.`);else if(d){const m=this.getFieldValue(c);!a.isListField()&&(!t.skipExist||m===void 0)&&this.updateStore(_r(this.store,c,[...d][0].value));}}}});};let i;t.entities?i=t.entities:t.namePathList?(i=[],t.namePathList.forEach(s=>{const a=n.get(s);a&&i.push(...[...a].map(l=>l.entity));})):i=r,o(i);};resetFields=t=>{this.warningUnhooked();const n=this.store;if(!t){this.updateStore($a(this.initialValues)),this.resetWithFieldInitialValue(),this.notifyObservers(n,null,{type:"reset"}),this.notifyWatch();return}const r=t.map(mn);r.forEach(o=>{const i=this.getInitialValue(o);this.updateStore(_r(this.store,o,i));}),this.resetWithFieldInitialValue({namePathList:r}),this.notifyObservers(n,r,{type:"reset"}),this.notifyWatch(r);};setFields=t=>{this.warningUnhooked();const n=this.store,r=[];t.forEach(o=>{const{name:i,...s}=o,a=mn(i);r.push(a),"value"in s&&this.updateStore(_r(this.store,a,s.value)),this.notifyObservers(n,[a],{type:"setField",data:o});}),this.notifyWatch(r);};getFields=()=>this.getFieldEntities(true).map(r=>{const o=r.getNamePath(),s={...r.getMeta(),name:o,value:this.getFieldValue(o)};return Object.defineProperty(s,"originRCField",{value:true}),s});initEntityValue=t=>{const{initialValue:n}=t.props;if(n!==void 0){const r=t.getNamePath();co(this.store,r)===void 0&&this.updateStore(_r(this.store,r,n));}};isMergedPreserve=t=>(t!==void 0?t:this.preserve)??true;registerField=t=>{this.fieldEntities.push(t);const n=t.getNamePath();if(this.batchNotifyWatch(n),t.props.initialValue!==void 0){const r=this.store;this.resetWithFieldInitialValue({entities:[t],skipExist:true}),this.notifyObservers(r,[t.getNamePath()],{type:"valueUpdate",source:"internal"});}return (r,o,i=[])=>{if(this.fieldEntities=this.fieldEntities.filter(s=>s!==t),!this.isMergedPreserve(o)&&(!r||i.length>1)){const s=r?void 0:this.getInitialValue(n);if(n.length&&this.getFieldValue(n)!==s&&this.fieldEntities.every(a=>!Ab(a.getNamePath(),n))){const a=this.store;this.updateStore(_r(a,n,s,true)),this.notifyObservers(a,[n],{type:"remove"}),this.triggerDependenciesUpdate(a,n);}}this.batchNotifyWatch(n);}};dispatch=t=>{switch(t.type){case "updateValue":{const{namePath:n,value:r}=t;this.updateValue(n,r);break}case "validateField":{const{namePath:n,triggerName:r}=t;this.validateFields([n],{triggerName:r});break}}};notifyObservers=(t,n,r)=>{if(this.subscribable){const o={...r,store:this.getFieldsValue(true)};this.getFieldEntities().forEach(({onStoreChange:i})=>{i(t,n,o);});}else this.forceRootUpdate();};triggerDependenciesUpdate=(t,n)=>{const r=this.getDependencyChildrenFields(n);return r.length&&this.validateFields(r),this.notifyObservers(t,r,{type:"dependenciesUpdate",relatedFields:[n,...r]}),r};updateValue=(t,n)=>{const r=mn(t),o=this.store;this.updateStore(_r(this.store,r,n)),this.notifyObservers(o,[r],{type:"valueUpdate",source:"internal"}),this.notifyWatch([r]);const i=this.triggerDependenciesUpdate(o,r),{onValuesChange:s}=this.callbacks;if(s){const a=this.getFieldsMap(true).get(r),l=Ew(this.store,[r]),c=this.getFieldsValue(),u=R3([c,l],{prepareArray:d=>a?.isList()?[]:[...d||[]]});s(l,u);}this.triggerOnFieldsChange([r,...i]);};setFieldsValue=t=>{this.warningUnhooked();const n=this.store;if(t){const r=$a(this.store,t);this.updateStore(r);}this.notifyObservers(n,null,{type:"valueUpdate",source:"external"}),this.notifyWatch();};setFieldValue=(t,n)=>{this.setFields([{name:t,value:n,errors:[],warnings:[],touched:true}]);};getDependencyChildrenFields=t=>{const n=new Set,r=[],o=new ua;this.getFieldEntities().forEach(s=>{const{dependencies:a}=s.props;(a||[]).forEach(l=>{const c=mn(l);o.update(c,(u=new Set)=>(u.add(s),u));});});const i=s=>{(o.get(s)||new Set).forEach(l=>{if(!n.has(l)){n.add(l);const c=l.getNamePath();l.isFieldDirty()&&c.length&&(r.push(c),i(c));}});};return i(t),r};triggerOnFieldsChange=(t,n)=>{const{onFieldsChange:r}=this.callbacks;if(r){const o=this.getFields();if(n){const s=new ua;n.forEach(({name:a,errors:l})=>{s.set(a,l);}),o.forEach(a=>{a.errors=s.get(a.name)||a.errors;});}const i=o.filter(({name:s})=>Aa(t,s));i.length&&r(i,o);}};validateFields=(t,n)=>{this.warningUnhooked();let r,o;Array.isArray(t)||typeof t=="string"||typeof n=="string"?(r=t,o=n):o=t;const i=!!r,s=i?r.map(mn):[],a=[...s],l=[],c=String(Date.now()),u=new Set,{recursive:d,dirty:m}=o||{};this.getFieldEntities(true).forEach(b=>{const y=b.getNamePath();if(i||((!b.isList()||!s.some(C=>Ab(C,y,true)))&&a.push(y),s.push(y)),!(!b.props.rules||!b.props.rules.length)&&!(m&&!b.isFieldDirty())&&(u.add(y.join(c)),!i||Aa(s,y,d))){const C=b.validateRules({validateMessages:{...KI,...this.validateMessages},...o});l.push(C.then(()=>({name:y,errors:[],warnings:[]})).catch(x=>{const w=[],S=[];return x.forEach?.(({rule:{warningOnly:I},errors:$})=>{I?S.push(...$):w.push(...$);}),w.length?Promise.reject({name:y,errors:w,warnings:S}):{name:y,errors:w,warnings:S}}));}});const p=nB(l);this.lastValidatePromise=p,p.catch(b=>b).then(b=>{const y=b.map(({name:C})=>C);this.notifyObservers(this.store,y,{type:"validateFinish"}),this.triggerOnFieldsChange(y,b);});const h=p.then(()=>this.lastValidatePromise===p?Promise.resolve(this.getFieldsValue(a)):Promise.reject([])).catch(b=>{const y=b.filter(x=>x&&x.errors.length),C=y[0]?.errors?.[0];return Promise.reject({message:C,values:this.getFieldsValue(s),errorFields:y,outOfDate:this.lastValidatePromise!==p})});h.catch(b=>b);const g=s.filter(b=>u.has(b.join(c)));return this.triggerOnFieldsChange(g),h};submit=()=>{this.warningUnhooked(),this.validateFields().then(t=>{const{onFinish:n}=this.callbacks;if(n)try{n(t);}catch(r){console.error(r);}}).catch(t=>{const{onFinishFailed:n}=this.callbacks;n&&n(t);});}}function QI(e){const t=f__namespace.useRef(null),[,n]=f__namespace.useState({});if(!t.current)if(e)t.current=e;else {const r=()=>{n({});},o=new rB(r);t.current=o.getForm();}return [t.current]}const Ob=f__namespace.createContext({triggerFormChange:()=>{},triggerFormFinish:()=>{},registerForm:()=>{},unregisterForm:()=>{}}),oB=({validateMessages:e,onFormChange:t,onFormFinish:n,children:r})=>{const o=f__namespace.useContext(Ob),i=f__namespace.useRef({});return f__namespace.createElement(Ob.Provider,{value:{...o,validateMessages:{...o.validateMessages,...e},triggerFormChange:(s,a)=>{t&&t(s,{changedFields:a,forms:i.current}),o.triggerFormChange(s,a);},triggerFormFinish:(s,a)=>{n&&n(s,{values:a,forms:i.current}),o.triggerFormFinish(s,a);},registerForm:(s,a)=>{s&&(i.current={...i.current,[s]:a}),o.registerForm(s,a);},unregisterForm:s=>{const a={...i.current};delete a[s],i.current=a,o.unregisterForm(s);}}},r)},iB=f__namespace.forwardRef((e,t)=>{const[n,r]=f__namespace.useState({});return f__namespace.useLayoutEffect(()=>{const o=Object.keys(n);o.length&&(o.forEach(i=>{n[i]?.();}),r({}));},[n]),f__namespace.useImperativeHandle(t,()=>({batch:(o,i)=>{r(s=>({...s,[o]:i}));}})),null});function Fb(){return Fb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Fb.apply(this,arguments)}const sB=({name:e,initialValues:t,fields:n,form:r,preserve:o,children:i,component:s="form",validateMessages:a,validateTrigger:l="onChange",onValuesChange:c,onFieldsChange:u,onFinish:d,onFinishFailed:m,clearOnDestroy:p,...h},g)=>{const b=f__namespace.useRef(null),y=f__namespace.useContext(Ob),[C]=QI(r),{useSubscribe:x,setInitialValues:w,setCallbacks:S,setValidateMessages:I,setPreserve:$,destroyForm:E,setBatchUpdate:P}=C.getInternalHooks(vs);f__namespace.useImperativeHandle(g,()=>({...C,nativeElement:b.current})),f__namespace.useEffect(()=>(y.registerForm(e,C),()=>{y.unregisterForm(e);}),[y,C,e]),I({...y.validateMessages,...a}),S({onValuesChange:c,onFieldsChange:(O,...B)=>{y.triggerFormChange(e,O),u&&u(O,...B);},onFinish:O=>{y.triggerFormFinish(e,O),d&&d(O);},onFinishFailed:m}),$(o);const M=f__namespace.useRef(null);w(t,!M.current),M.current||(M.current=true);const N=f__namespace.useRef(null),A=f__namespace.useRef([]),k=()=>{N.current&&(A.current.forEach(([O,B])=>{N.current.batch(O,B);}),A.current=[]);},R=f__namespace.useCallback(O=>{N.current=O,k();},[]);P((O,B)=>{A.current.push([O,B]),k();}),f__namespace.useEffect(()=>()=>E(p),[]);let V;const _=typeof i=="function";if(_){const O=C.getFieldsValue(true);V=i(O,C);}else V=i;x(!_);const z=f__namespace.useRef(null);f__namespace.useEffect(()=>{ZL(z.current||[],n||[])||C.setFields(n||[]),z.current=n;},[n,C]);const D=f__namespace.useMemo(()=>({...C,validateTrigger:l}),[C,l]),W=f__namespace.createElement(Lf.Provider,{value:null},f__namespace.createElement(Ga.Provider,{value:D},V),f__namespace.createElement(iB,{ref:R}));return s===false?W:f__namespace.createElement(s,Fb({},h,{ref:b,onSubmit:O=>{O.preventDefault(),O.stopPropagation(),C.submit();},onReset:O=>{O.preventDefault(),C.resetFields(),h.onReset?.(O);}}),W)};function sh(e){try{return JSON.stringify(e)}catch{return Math.random()}}function aB(...e){const[t,n={}]=e,r=gL(n)?{form:n}:n,o=r.form,[i,s]=f.useState(()=>typeof t=="function"?t({}):void 0),a=f.useMemo(()=>sh(i),[i]),l=f.useRef(a);l.current=a;const c=f.useContext(Ga),u=o||c,d=u&&u._init,{getFieldsValue:m,getInternalHooks:p}=u,{registerWatch:h}=p(vs),g=lt((y,C)=>{const x=r.preserve?C??m(true):y??m(),w=typeof t=="function"?t(x):co(x,mn(t));sh(i)!==sh(w)&&s(w);}),b=typeof t=="function"?t:JSON.stringify(t);return f.useEffect(()=>{d&&g();},[d,b]),f.useEffect(()=>d?h((C,x)=>{g(C,x);}):void 0,[d]),i}const lB=f__namespace.forwardRef(sB),Nu=lB;Nu.FormProvider=oB;Nu.Field=XI;Nu.List=tB;Nu.useForm=QI;Nu.useWatch=aB;const Zn=f__namespace.createContext({}),cB=({children:e,status:t,override:n})=>{const r=f__namespace.useContext(Zn),o=f__namespace.useMemo(()=>{const i={...r};return n&&delete i.isFormItemInput,t&&(delete i.status,delete i.hasFeedback,delete i.feedbackIcon),i},[t,n,r]);return f__namespace.createElement(Zn.Provider,{value:o},e)},uB=f__namespace.createContext(void 0);function dB(e){return e===void 0||e===false?[]:Array.isArray(e)?e:[e]}function fB(e){return dB(e).join("_")}const ZI=f__namespace.createContext(null),mB=ZI.Provider,JI=f__namespace.createContext(null),pB=JI.Provider;function Lb(){return Lb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Lb.apply(this,arguments)}const eP=f.forwardRef((e,t)=>{const{prefixCls:n="rc-checkbox",className:r,style:o,checked:i,disabled:s,defaultChecked:a=false,type:l="checkbox",title:c,onChange:u,...d}=e,m=f.useRef(null),p=f.useRef(null),[h,g]=Bt(a,i);f.useImperativeHandle(t,()=>({focus:C=>{m.current?.focus(C);},blur:()=>{m.current?.blur();},input:m.current,nativeElement:p.current}));const b=H(n,r,{[`${n}-checked`]:h,[`${n}-disabled`]:s}),y=C=>{s||("checked"in e||g(C.target.checked),u?.({target:{...e,type:l,checked:C.target.checked},stopPropagation(){C.stopPropagation();},preventDefault(){C.preventDefault();},nativeEvent:C.nativeEvent}));};return f__namespace.createElement("span",{className:b,title:c,style:o,ref:p},f__namespace.createElement("input",Lb({},d,{className:`${n}-input`,ref:m,onChange:y,disabled:s,checked:!!h,type:l})),f__namespace.createElement("span",{className:`${n}-inner`}))});function tP(e){return e&&f.isValidElement(e)&&e.type===f.Fragment}const nP=(e,t,n)=>f.isValidElement(e)?f.cloneElement(e,typeof n=="function"?n(e.props||{}):n):t;function Rn(e,t){return nP(e,e,t)}const hB=e=>{const{componentCls:t,colorPrimary:n}=e;return {[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${n})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow ${e.motionDurationSlow} ${e.motionEaseInOut}`,`opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`].join(",")}}}}},gB=aL("Wave",hB),jm=`${Wc}-wave-target`;var $d={},Pw;function bB(){if(Pw)return $d;Pw=1;var e=ST;return $d.createRoot=e.createRoot,$d.hydrateRoot=e.hydrateRoot,$d}var Ho=bB();const Bf="__rc_react_root__";function Wm(e,t){const n=t[Bf]||Ho.createRoot(t);n.render(e),t[Bf]=n;}async function rP(e){return Promise.resolve().then(()=>{e[Bf]?.unmount(),delete e[Bf];})}function Nw(e){return e&&typeof e=="string"&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&e!=="transparent"&&e!=="canvastext"}function vB(e,t=null){const n=getComputedStyle(e),{borderTopColor:r,borderColor:o,backgroundColor:i}=n;return t&&Nw(n[t])?n[t]:[r,o,i].find(Nw)??null}function ah(e){return Number.isNaN(e)?0:e}const yB=e=>{const{className:t,target:n,component:r,colorSource:o}=e,i=f__namespace.useRef(null),[s,a]=f__namespace.useState(null),[l,c]=f__namespace.useState([]),[u,d]=f__namespace.useState(0),[m,p]=f__namespace.useState(0),[h,g]=f__namespace.useState(0),[b,y]=f__namespace.useState(0),[C,x]=f__namespace.useState(false),w={left:u,top:m,width:h,height:b,borderRadius:l.map($=>`${$}px`).join(" ")};s&&(w["--wave-color"]=s);function S(){const $=getComputedStyle(n);a(vB(n,o));const E=$.position==="static",{borderLeftWidth:P,borderTopWidth:M}=$;d(E?n.offsetLeft:ah(-Number.parseFloat(P))),p(E?n.offsetTop:ah(-Number.parseFloat(M))),g(n.offsetWidth),y(n.offsetHeight);const{borderTopLeftRadius:N,borderTopRightRadius:A,borderBottomLeftRadius:k,borderBottomRightRadius:R}=$;c([N,A,R,k].map(L=>ah(Number.parseFloat(L))));}if(f__namespace.useEffect(()=>{if(n){const $=gt(()=>{S(),x(true);});let E;return typeof ResizeObserver<"u"&&(E=new ResizeObserver(S),E.observe(n)),()=>{gt.cancel($),E?.disconnect();}}},[n]),!C)return null;const I=(r==="Checkbox"||r==="Radio")&&n?.classList.contains(jm);return f__namespace.createElement(er,{visible:true,motionAppear:true,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:($,E)=>{if(E.deadline||E.propertyName==="opacity"){const P=i.current?.parentElement;rP(P).then(()=>{P?.remove();});}return false}},({className:$},E)=>f__namespace.createElement("div",{ref:In(i,E),className:H(t,$,{"wave-quick":I}),style:w}))},CB=(e,t)=>{const{component:n}=t;if(n==="Checkbox"&&!e.querySelector("input")?.checked)return;const r=document.createElement("div");r.style.position="absolute",r.style.left="0px",r.style.top="0px",e?.insertBefore(r,e?.firstChild),Wm(f__namespace.createElement(yB,{...t,target:e}),r);},xB=(e,t,n,r)=>{const{wave:o}=f__namespace.useContext(ot),[,i,s]=Tn(),a=lt(u=>{const d=e.current;if(o?.disabled||!d)return;const m=d.querySelector(`.${jm}`)||d,{showEffect:p}=o||{};(p||CB)(m,{className:t,token:i,component:n,event:u,hashId:s,colorSource:r});}),l=f__namespace.useRef(null);return f__namespace.useEffect(()=>()=>{gt.cancel(l.current);},[]),u=>{gt.cancel(l.current),l.current=gt(()=>{a(u);});}},Mu=e=>{const{children:t,disabled:n,component:r,colorSource:o}=e,{getPrefixCls:i}=f.useContext(ot),s=f.useRef(null),a=i("wave"),[,l]=gB(a),c=xB(s,H(a,l),r,o);if(f.useEffect(()=>{const d=s.current;if(!d||d.nodeType!==window.Node.ELEMENT_NODE||n)return;const m=p=>{!fy(p.target)||!d.getAttribute||d.getAttribute("disabled")||d.disabled||d.className.includes("disabled")&&!d.className.includes("disabled:")||d.getAttribute("aria-disabled")==="true"||d.className.includes("-leave")||c(p);};return d.addEventListener("click",m,true),()=>{d.removeEventListener("click",m,true);}},[n]),!f.isValidElement(t))return t??null;const u=Vs(t)?In(js(t),s):s;return Rn(t,{ref:u})};function oP(e){const t=f.useRef(null),n=()=>{gt.cancel(t.current),t.current=null;};return [()=>{n(),t.current=gt(()=>{t.current=null;});},i=>{t.current&&(i.stopPropagation(),n()),e?.(i);}]}const wB=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-group`;return {[r]:{...Lt(e),display:"inline-block",fontSize:0,[`&${r}-rtl`]:{direction:"rtl"},[`&${r}-block`]:{display:"flex"},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:"none"},"&-vertical":{display:"flex",flexDirection:"column",rowGap:e.marginXS}}}},SB=e=>{const{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:r,radioSize:o,motionDurationSlow:i,motionDurationMid:s,motionEaseInOutCirc:a,colorBgContainer:l,colorBorder:c,lineWidth:u,colorBgContainerDisabled:d,colorTextDisabled:m,paddingXS:p,dotColorDisabled:h,lineType:g,radioColor:b,radioBgColor:y,calc:C}=e,x=`${t}-inner`,S=C(o).sub(C(4).mul(2)),I=C(1).mul(o).equal({unit:true});return {[`${t}-wrapper`]:{...Lt(e),display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer","&:last-child":{marginInlineEnd:0},[`&${t}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},[`${t}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${X(u)} ${g} ${r}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[t]:{...Lt(e),position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"},[`${t}-wrapper:hover &,
&:hover ${x}`]:{borderColor:r},[`${t}-input:focus-visible + ${x}`]:Bo(e),[`${t}:hover::after, ${t}-wrapper:hover &::after`]:{visibility:"visible"},[`${t}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:I,height:I,marginBlockStart:C(1).mul(o).div(-2).equal({unit:true}),marginInlineStart:C(1).mul(o).div(-2).equal({unit:true}),backgroundColor:b,borderBlockStart:0,borderInlineStart:0,borderRadius:I,transform:"scale(0)",opacity:0,transition:`all ${i} ${a}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:I,height:I,backgroundColor:l,borderColor:c,borderStyle:"solid",borderWidth:u,borderRadius:"50%",transition:`all ${s}`},[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${t}-checked`]:{[x]:{borderColor:r,backgroundColor:y,"&::after":{transform:`scale(${e.calc(e.dotSize).div(o).equal()})`,opacity:1,transition:`all ${i} ${a}`}}},[`${t}-disabled`]:{cursor:"not-allowed",[x]:{backgroundColor:d,borderColor:c,cursor:"not-allowed","&::after":{backgroundColor:h}},[`${t}-input`]:{cursor:"not-allowed"},[`${t}-disabled + span`]:{color:m,cursor:"not-allowed"},[`&${t}-checked`]:{[x]:{"&::after":{transform:`scale(${C(S).div(o).equal()})`}}}},[`span${t} + *`]:{paddingInlineStart:p,paddingInlineEnd:p}}}},$B=e=>{const{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:o,lineType:i,colorBorder:s,motionDurationMid:a,buttonPaddingInline:l,fontSize:c,buttonBg:u,fontSizeLG:d,controlHeightLG:m,controlHeightSM:p,paddingXS:h,borderRadius:g,borderRadiusSM:b,borderRadiusLG:y,buttonCheckedBg:C,buttonSolidCheckedColor:x,colorTextDisabled:w,colorBgContainerDisabled:S,buttonCheckedBgDisabled:I,buttonCheckedColorDisabled:$,colorPrimary:E,colorPrimaryHover:P,colorPrimaryActive:M,buttonSolidCheckedBg:N,buttonSolidCheckedHoverBg:A,buttonSolidCheckedActiveBg:k,calc:R}=e;return {[`${r}-button-wrapper`]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:l,paddingBlock:0,color:t,fontSize:c,lineHeight:X(R(n).sub(R(o).mul(2)).equal()),background:u,border:`${X(o)} ${i} ${s}`,borderBlockStartWidth:R(o).add(.02).equal(),borderInlineEndWidth:o,cursor:"pointer",transition:[`color ${a}`,`background ${a}`,`box-shadow ${a}`].join(","),a:{color:t},[`> ${r}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:last-child)":{marginInlineEnd:R(o).mul(-1).equal()},"&:first-child":{borderInlineStart:`${X(o)} ${i} ${s}`,borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g},"&:first-child:last-child":{borderRadius:g},[`${r}-group-large &`]:{height:m,fontSize:d,lineHeight:X(R(m).sub(R(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:y,borderEndStartRadius:y},"&:last-child":{borderStartEndRadius:y,borderEndEndRadius:y}},[`${r}-group-small &`]:{height:p,paddingInline:R(h).sub(o).equal(),paddingBlock:0,lineHeight:X(R(p).sub(R(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:b,borderEndStartRadius:b},"&:last-child":{borderStartEndRadius:b,borderEndEndRadius:b}},"&:hover":{position:"relative",color:E},"&:has(:focus-visible)":Bo(e),[`${r}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${r}-button-wrapper-disabled)`]:{zIndex:1,color:E,background:C,borderColor:E,"&::before":{backgroundColor:E},"&:first-child":{borderColor:E},"&:hover":{color:P,borderColor:P,"&::before":{backgroundColor:P}},"&:active":{color:M,borderColor:M,"&::before":{backgroundColor:M}}},[`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]:{color:x,background:N,borderColor:N,"&:hover":{color:x,background:A,borderColor:A},"&:active":{color:x,background:k,borderColor:k}},"&-disabled":{color:w,backgroundColor:S,borderColor:s,cursor:"not-allowed","&:first-child, &:hover":{color:w,backgroundColor:S,borderColor:s}},[`&-disabled${r}-button-wrapper-checked`]:{color:$,backgroundColor:I,borderColor:s,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},EB=e=>{const{wireframe:t,padding:n,marginXS:r,lineWidth:o,fontSizeLG:i,colorText:s,colorBgContainer:a,colorTextDisabled:l,controlItemBgActiveDisabled:c,colorTextLightSolid:u,colorPrimary:d,colorPrimaryHover:m,colorPrimaryActive:p,colorWhite:h}=e,g=4,b=i,y=t?b-g*2:b-(g+o)*2;return {radioSize:b,dotSize:y,dotColorDisabled:l,buttonSolidCheckedColor:u,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:m,buttonSolidCheckedActiveBg:p,buttonBg:a,buttonCheckedBg:a,buttonColor:s,buttonCheckedBgDisabled:c,buttonCheckedColorDisabled:l,buttonPaddingInline:n-o,wrapperMarginInlineEnd:r,radioColor:t?d:h,radioBgColor:t?a:d}},iP=xt("Radio",e=>{const{controlOutline:t,controlOutlineWidth:n}=e,r=`0 0 0 ${X(n)} ${t}`,i=vt(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return [wB(i),SB(i),$B(i)]},EB,{unitless:{radioSize:true,dotSize:true}}),IB=(e,t)=>{const n=f__namespace.useContext(ZI),r=f__namespace.useContext(JI),{getPrefixCls:o,direction:i,className:s,style:a,classNames:l,styles:c}=St("radio"),u=f__namespace.useRef(null),d=In(t,u),{isFormItemInput:m}=f__namespace.useContext(Zn),p=O=>{e.onChange?.(O),n?.onChange?.(O);},{prefixCls:h,className:g,rootClassName:b,children:y,style:C,title:x,classNames:w,styles:S,...I}=e,$=o("radio",h),E=(n?.optionType||r)==="button",P=E?`${$}-button`:$,M=sn($),[N,A]=iP($,M),k={...I},R=f__namespace.useContext(zn);n&&(k.name=n.name,k.onChange=p,k.checked=e.value===n.value,k.disabled=k.disabled??n.disabled),k.disabled=k.disabled??R;const L={...e,...k},[V,_]=It([l,w],[c,S],{props:L}),z=H(`${P}-wrapper`,{[`${P}-wrapper-checked`]:k.checked,[`${P}-wrapper-disabled`]:k.disabled,[`${P}-wrapper-rtl`]:i==="rtl",[`${P}-wrapper-in-form-item`]:m,[`${P}-wrapper-block`]:!!n?.block},s,g,b,V.root,N,A,M),[D,W]=oP(k.onClick);return f__namespace.createElement(Mu,{component:"Radio",disabled:k.disabled},f__namespace.createElement("label",{className:z,style:{..._.root,...a,...C},onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:x,onClick:D},f__namespace.createElement(eP,{...k,className:H(V.icon,{[jm]:!E}),style:_.icon,type:"radio",prefixCls:P,ref:d,onClick:W}),y!==void 0?f__namespace.createElement("span",{className:H(`${P}-label`,V.label),style:_.label},y):null))},kf=f__namespace.forwardRef(IB),PB=f__namespace.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r}=f__namespace.useContext(ot),{name:o}=f__namespace.useContext(Zn),i=Ws(fB(o)),{prefixCls:s,className:a,rootClassName:l,options:c,buttonStyle:u="outline",disabled:d,children:m,size:p,style:h,id:g,optionType:b,name:y=i,defaultValue:C,value:x,block:w=false,onChange:S,onMouseEnter:I,onMouseLeave:$,onFocus:E,onBlur:P,orientation:M,vertical:N}=e,[A,k]=Bt(C,x),R=f__namespace.useCallback(q=>{const U=A,K=q.target.value;"value"in e||k(K),K!==U&&S?.(q);},[A,k,S]),L=n("radio",s),V=`${L}-group`,_=sn(L),[z,D]=iP(L,_);let W=m;c&&c.length>0&&(W=c.map(q=>typeof q=="string"||typeof q=="number"?f__namespace.createElement(kf,{key:q.toString(),prefixCls:L,disabled:d,value:q,checked:A===q},q):f__namespace.createElement(kf,{key:`radio-group-value-options-${q.value}`,prefixCls:L,disabled:q.disabled||d,value:q.value,checked:A===q.value,title:q.title,style:q.style,className:q.className,id:q.id,required:q.required},q.label)));const O=Vn(p),[,B]=qs(M,N),j=H(V,`${V}-${u}`,{[`${V}-${O}`]:O,[`${V}-rtl`]:r==="rtl",[`${V}-block`]:w},a,l,z,D,_),Y=f__namespace.useMemo(()=>({onChange:R,value:A,disabled:d,name:y,optionType:b,block:w}),[R,A,d,y,b,w]);return f__namespace.createElement("div",{...or(e,{aria:true,data:true}),className:H(j,{[`${L}-group-vertical`]:B}),style:h,onMouseEnter:I,onMouseLeave:$,onFocus:E,onBlur:P,id:g,ref:t},f__namespace.createElement(mB,{value:Y},W))}),NB=f__namespace.memo(PB),MB=(e,t)=>{const{getPrefixCls:n}=f__namespace.useContext(ot),{prefixCls:r,...o}=e,i=n("radio",r);return f__namespace.createElement(pB,{value:"button"},f__namespace.createElement(kf,{prefixCls:i,...o,type:"radio",ref:t}))},RB=f__namespace.forwardRef(MB),Dn=kf;Dn.Button=RB;Dn.Group=NB;Dn.__ANT_RADIO=true;var lh={exports:{}},_l={};var Mw;function AB(){if(Mw)return _l;Mw=1;var e=f,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:true,ref:true,__self:true,__source:true};function s(a,l,c){var u,d={},m=null,p=null;c!==void 0&&(m=""+c),l.key!==void 0&&(m=""+l.key),l.ref!==void 0&&(p=l.ref);for(u in l)r.call(l,u)&&!i.hasOwnProperty(u)&&(d[u]=l[u]);if(a&&a.defaultProps)for(u in l=a.defaultProps,l)d[u]===void 0&&(d[u]=l[u]);return {$$typeof:t,type:a,key:m,ref:p,props:d,_owner:o.current}}return _l.Fragment=n,_l.jsx=s,_l.jsxs=s,_l}var Rw;function TB(){return Rw||(Rw=1,lh.exports=AB()),lh.exports}var Gc=TB();function OB(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 FB(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 LB=(function(){function e(n){var r=this;this._insertTag=function(o){var i;r.tags.length===0?r.insertionPoint?i=r.insertionPoint.nextSibling:r.prepend?i=r.container.firstChild:i=r.before:i=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,i),r.tags.push(o);},this.isSpeedy=n.speedy===void 0?true:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null;}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag);},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(FB(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var i=OB(o);try{i.insertRule(r,i.cssRules.length);}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++;},t.flush=function(){this.tags.forEach(function(r){var o;return (o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0;},e})(),Xn="-ms-",Df="-moz-",Vt="-webkit-",sP="comm",by="rule",vy="decl",BB="@import",aP="@keyframes",kB="@layer",DB=Math.abs,qm=String.fromCharCode,zB=Object.assign;function _B(e,t){return Ln(e,0)^45?(((t<<2^Ln(e,0))<<2^Ln(e,1))<<2^Ln(e,2))<<2^Ln(e,3):0}function lP(e){return e.trim()}function HB(e,t){return (e=t.exec(e))?e[0]:e}function jt(e,t,n){return e.replace(t,n)}function Bb(e,t){return e.indexOf(t)}function Ln(e,t){return e.charCodeAt(t)|0}function Kc(e,t,n){return e.slice(t,n)}function $o(e){return e.length}function yy(e){return e.length}function Ed(e,t){return t.push(e),e}function VB(e,t){return e.map(t).join("")}var Um=1,Ka=1,cP=0,br=0,bn=0,fl="";function Gm(e,t,n,r,o,i,s){return {value:e,root:t,parent:n,type:r,props:o,children:i,line:Um,column:Ka,length:s,return:""}}function Hl(e,t){return zB(Gm("",null,null,"",null,null,0),e,{length:-e.length},t)}function jB(){return bn}function WB(){return bn=br>0?Ln(fl,--br):0,Ka--,bn===10&&(Ka=1,Um--),bn}function Rr(){return bn=br<cP?Ln(fl,br++):0,Ka++,bn===10&&(Ka=1,Um++),bn}function Fo(){return Ln(fl,br)}function rf(){return br}function Ru(e,t){return Kc(fl,e,t)}function Xc(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 uP(e){return Um=Ka=1,cP=$o(fl=e),br=0,[]}function dP(e){return fl="",e}function of(e){return lP(Ru(br-1,kb(e===91?e+2:e===40?e+1:e)))}function qB(e){for(;(bn=Fo())&&bn<33;)Rr();return Xc(e)>2||Xc(bn)>3?"":" "}function UB(e,t){for(;--t&&Rr()&&!(bn<48||bn>102||bn>57&&bn<65||bn>70&&bn<97););return Ru(e,rf()+(t<6&&Fo()==32&&Rr()==32))}function kb(e){for(;Rr();)switch(bn){case e:return br;case 34:case 39:e!==34&&e!==39&&kb(bn);break;case 40:e===41&&kb(e);break;case 92:Rr();break}return br}function GB(e,t){for(;Rr()&&e+bn!==57;)if(e+bn===84&&Fo()===47)break;return "/*"+Ru(t,br-1)+"*"+qm(e===47?e:Rr())}function KB(e){for(;!Xc(Fo());)Rr();return Ru(e,br)}function XB(e){return dP(sf("",null,null,null,[""],e=uP(e),0,[0],e))}function sf(e,t,n,r,o,i,s,a,l){for(var c=0,u=0,d=s,m=0,p=0,h=0,g=1,b=1,y=1,C=0,x="",w=o,S=i,I=r,$=x;b;)switch(h=C,C=Rr()){case 40:if(h!=108&&Ln($,d-1)==58){Bb($+=jt(of(C),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:$+=of(C);break;case 9:case 10:case 13:case 32:$+=qB(h);break;case 92:$+=UB(rf()-1,7);continue;case 47:switch(Fo()){case 42:case 47:Ed(YB(GB(Rr(),rf()),t,n),l);break;default:$+="/";}break;case 123*g:a[c++]=$o($)*y;case 125*g:case 59:case 0:switch(C){case 0:case 125:b=0;case 59+u:y==-1&&($=jt($,/\f/g,"")),p>0&&$o($)-d&&Ed(p>32?Tw($+";",r,n,d-1):Tw(jt($," ","")+";",r,n,d-2),l);break;case 59:$+=";";default:if(Ed(I=Aw($,t,n,c,u,o,a,x,w=[],S=[],d),i),C===123)if(u===0)sf($,t,I,I,w,i,d,a,S);else switch(m===99&&Ln($,3)===110?100:m){case 100:case 108:case 109:case 115:sf(e,I,I,r&&Ed(Aw(e,I,I,0,0,o,a,x,o,w=[],d),S),o,S,d,a,r?w:S);break;default:sf($,I,I,I,[""],S,0,a,S);}}c=u=p=0,g=y=1,x=$="",d=s;break;case 58:d=1+$o($),p=h;default:if(g<1){if(C==123)--g;else if(C==125&&g++==0&&WB()==125)continue}switch($+=qm(C),C*g){case 38:y=u>0?1:($+="\f",-1);break;case 44:a[c++]=($o($)-1)*y,y=1;break;case 64:Fo()===45&&($+=of(Rr())),m=Fo(),u=d=$o(x=$+=KB(rf())),C++;break;case 45:h===45&&$o($)==2&&(g=0);}}return i}function Aw(e,t,n,r,o,i,s,a,l,c,u){for(var d=o-1,m=o===0?i:[""],p=yy(m),h=0,g=0,b=0;h<r;++h)for(var y=0,C=Kc(e,d+1,d=DB(g=s[h])),x=e;y<p;++y)(x=lP(g>0?m[y]+" "+C:jt(C,/&\f/g,m[y])))&&(l[b++]=x);return Gm(e,t,n,o===0?by:a,l,c,u)}function YB(e,t,n){return Gm(e,t,n,sP,qm(jB()),Kc(e,2,-2),0)}function Tw(e,t,n,r){return Gm(e,t,n,vy,Kc(e,0,r),Kc(e,r+1,-1),r)}function Ta(e,t){for(var n="",r=yy(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function QB(e,t,n,r){switch(e.type){case kB:if(e.children.length)break;case BB:case vy:return e.return=e.return||e.value;case sP:return "";case aP:return e.return=e.value+"{"+Ta(e.children,r)+"}";case by:e.value=e.props.join(",");}return $o(n=Ta(e.children,r))?e.return=e.value+"{"+n+"}":""}function ZB(e){var t=yy(e);return function(n,r,o,i){for(var s="",a=0;a<t;a++)s+=e[a](n,r,o,i)||"";return s}}function JB(e){return function(t){t.root||(t=t.return)&&e(t);}}function ek(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var tk=function(t,n,r){for(var o=0,i=0;o=i,i=Fo(),o===38&&i===12&&(n[r]=1),!Xc(i);)Rr();return Ru(t,br)},nk=function(t,n){var r=-1,o=44;do switch(Xc(o)){case 0:o===38&&Fo()===12&&(n[r]=1),t[r]+=tk(br-1,n,r);break;case 2:t[r]+=of(o);break;case 4:if(o===44){t[++r]=Fo()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=qm(o);}while(o=Rr());return t},rk=function(t,n){return dP(nk(uP(t),n))},Ow=new WeakMap,ok=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!Ow.get(r))&&!o){Ow.set(t,true);for(var i=[],s=rk(n,i),a=r.props,l=0,c=0;l<s.length;l++)for(var u=0;u<a.length;u++,c++)t.props[c]=i[l]?s[l].replace(/&\f/g,a[u]):a[u]+" "+s[l];}}},ik=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="");}};function fP(e,t){switch(_B(e,t)){case 5103:return Vt+"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 Vt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Vt+e+Df+e+Xn+e+e;case 6828:case 4268:return Vt+e+Xn+e+e;case 6165:return Vt+e+Xn+"flex-"+e+e;case 5187:return Vt+e+jt(e,/(\w+).+(:[^]+)/,Vt+"box-$1$2"+Xn+"flex-$1$2")+e;case 5443:return Vt+e+Xn+"flex-item-"+jt(e,/flex-|-self/,"")+e;case 4675:return Vt+e+Xn+"flex-line-pack"+jt(e,/align-content|flex-|-self/,"")+e;case 5548:return Vt+e+Xn+jt(e,"shrink","negative")+e;case 5292:return Vt+e+Xn+jt(e,"basis","preferred-size")+e;case 6060:return Vt+"box-"+jt(e,"-grow","")+Vt+e+Xn+jt(e,"grow","positive")+e;case 4554:return Vt+jt(e,/([^-])(transform)/g,"$1"+Vt+"$2")+e;case 6187:return jt(jt(jt(e,/(zoom-|grab)/,Vt+"$1"),/(image-set)/,Vt+"$1"),e,"")+e;case 5495:case 3959:return jt(e,/(image-set\([^]*)/,Vt+"$1$`$1");case 4968:return jt(jt(e,/(.+:)(flex-)?(.*)/,Vt+"box-pack:$3"+Xn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Vt+e+e;case 4095:case 3583:case 4068:case 2532:return jt(e,/(.+)-inline(.+)/,Vt+"$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($o(e)-1-t>6)switch(Ln(e,t+1)){case 109:if(Ln(e,t+4)!==45)break;case 102:return jt(e,/(.+:)(.+)-([^]+)/,"$1"+Vt+"$2-$3$1"+Df+(Ln(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return ~Bb(e,"stretch")?fP(jt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ln(e,t+1)!==115)break;case 6444:switch(Ln(e,$o(e)-3-(~Bb(e,"!important")&&10))){case 107:return jt(e,":",":"+Vt)+e;case 101:return jt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Vt+(Ln(e,14)===45?"inline-":"")+"box$3$1"+Vt+"$2$3$1"+Xn+"$2box$3")+e}break;case 5936:switch(Ln(e,t+11)){case 114:return Vt+e+Xn+jt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Vt+e+Xn+jt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Vt+e+Xn+jt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Vt+e+Xn+e+e}return e}var sk=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case vy:t.return=fP(t.value,t.length);break;case aP:return Ta([Hl(t,{value:jt(t.value,"@","@"+Vt)})],o);case by:if(t.length)return VB(t.props,function(i){switch(HB(i,/(::plac\w+|:read-\w+)/)){case ":read-only":case ":read-write":return Ta([Hl(t,{props:[jt(i,/:(read-\w+)/,":"+Df+"$1")]})],o);case "::placeholder":return Ta([Hl(t,{props:[jt(i,/:(plac\w+)/,":"+Vt+"input-$1")]}),Hl(t,{props:[jt(i,/:(plac\w+)/,":"+Df+"$1")]}),Hl(t,{props:[jt(i,/:(plac\w+)/,Xn+"input-$1")]})],o)}return ""})}},ak=[sk],mP=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var b=g.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""));});}var o=t.stylisPlugins||ak,i={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var b=g.getAttribute("data-emotion").split(" "),y=1;y<b.length;y++)i[b[y]]=true;a.push(g);});var l,c=[ok,ik];{var u,d=[QB,JB(function(g){u.insert(g);})],m=ZB(c.concat(o,d)),p=function(b){return Ta(XB(b),m)};l=function(b,y,C,x){u=C,p(b?b+"{"+y.styles+"}":y.styles),x&&(h.inserted[y.name]=true);};}var h={key:n,sheet:new LB({key:n,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:l};return h.sheet.hydrate(a),h};function dn(){return dn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},dn.apply(null,arguments)}var ch={exports:{}},Gt={};var Fw;function lk(){if(Fw)return Gt;Fw=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function x(S){if(typeof S=="object"&&S!==null){var I=S.$$typeof;switch(I){case t:switch(S=S.type,S){case l:case c:case r:case i:case o:case d:return S;default:switch(S=S&&S.$$typeof,S){case a:case u:case h:case p:case s:return S;default:return I}}case n:return I}}}function w(S){return x(S)===c}return Gt.AsyncMode=l,Gt.ConcurrentMode=c,Gt.ContextConsumer=a,Gt.ContextProvider=s,Gt.Element=t,Gt.ForwardRef=u,Gt.Fragment=r,Gt.Lazy=h,Gt.Memo=p,Gt.Portal=n,Gt.Profiler=i,Gt.StrictMode=o,Gt.Suspense=d,Gt.isAsyncMode=function(S){return w(S)||x(S)===l},Gt.isConcurrentMode=w,Gt.isContextConsumer=function(S){return x(S)===a},Gt.isContextProvider=function(S){return x(S)===s},Gt.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},Gt.isForwardRef=function(S){return x(S)===u},Gt.isFragment=function(S){return x(S)===r},Gt.isLazy=function(S){return x(S)===h},Gt.isMemo=function(S){return x(S)===p},Gt.isPortal=function(S){return x(S)===n},Gt.isProfiler=function(S){return x(S)===i},Gt.isStrictMode=function(S){return x(S)===o},Gt.isSuspense=function(S){return x(S)===d},Gt.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===c||S===i||S===o||S===d||S===m||typeof S=="object"&&S!==null&&(S.$$typeof===h||S.$$typeof===p||S.$$typeof===s||S.$$typeof===a||S.$$typeof===u||S.$$typeof===b||S.$$typeof===y||S.$$typeof===C||S.$$typeof===g)},Gt.typeOf=x,Gt}var Lw;function ck(){return Lw||(Lw=1,ch.exports=lk()),ch.exports}var uh,Bw;function uk(){if(Bw)return uh;Bw=1;var e=ck(),t={childContextTypes:true,contextType:true,contextTypes:true,defaultProps:true,displayName:true,getDefaultProps:true,getDerivedStateFromError:true,getDerivedStateFromProps:true,mixins:true,propTypes:true,type:true},n={name:true,length:true,prototype:true,caller:true,callee:true,arguments:true,arity:true},r={$$typeof:true,render:true,defaultProps:true,displayName:true,propTypes:true},o={$$typeof:true,compare:true,defaultProps:true,displayName:true,propTypes:true,type:true},i={};i[e.ForwardRef]=r,i[e.Memo]=o;function s(h){return e.isMemo(h)?o:i[h.$$typeof]||t}var a=Object.defineProperty,l=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,m=Object.prototype;function p(h,g,b){if(typeof g!="string"){if(m){var y=d(g);y&&y!==m&&p(h,y,b);}var C=l(g);c&&(C=C.concat(c(g)));for(var x=s(h),w=s(g),S=0;S<C.length;++S){var I=C[S];if(!n[I]&&!(b&&b[I])&&!(w&&w[I])&&!(x&&x[I])){var $=u(g,I);try{a(h,I,$);}catch{}}}}return h}return uh=p,uh}uk();var dk=true;function Cy(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ");}),r}var pP=function(t,n,r){var o=t.key+"-"+n.name;(r===false||dk===false)&&t.registered[o]===void 0&&(t.registered[o]=n.styles);},xy=function(t,n,r){pP(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+o:"",i,t.sheet,true),i=i.next;while(i!==void 0)}};function fk(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&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 mk={animationIterationCount:1,aspectRatio: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,scale: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},pk=/[A-Z]|^ms/g,hk=/_EMO_([^_]+?)_([^]*?)_EMO_/g,hP=function(t){return t.charCodeAt(1)===45},kw=function(t){return t!=null&&typeof t!="boolean"},dh=ek(function(e){return hP(e)?e:e.replace(pk,"-$&").toLowerCase()}),Dw=function(t,n){switch(t){case "animation":case "animationName":if(typeof n=="string")return n.replace(hk,function(r,o,i){return Eo={name:o,styles:i,next:Eo},o})}return mk[t]!==1&&!hP(t)&&typeof n=="number"&&n!==0?n+"px":n};function Yc(e,t,n){if(n==null)return "";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case "boolean":return "";case "object":{var o=n;if(o.anim===1)return Eo={name:o.name,styles:o.styles,next:Eo},o.name;var i=n;if(i.styles!==void 0){var s=i.next;if(s!==void 0)for(;s!==void 0;)Eo={name:s.name,styles:s.styles,next:Eo},s=s.next;var a=i.styles+";";return a}return gk(e,t,n)}case "function":{if(e!==void 0){var l=Eo,c=n(e);return Eo=l,Yc(e,t,c)}break}}var u=n;if(t==null)return u;var d=t[u];return d!==void 0?d:u}function gk(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Yc(e,t,n[o])+";";else for(var i in n){var s=n[i];if(typeof s!="object"){var a=s;t!=null&&t[a]!==void 0?r+=i+"{"+t[a]+"}":kw(a)&&(r+=dh(i)+":"+Dw(i,a)+";");}else if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var l=0;l<s.length;l++)kw(s[l])&&(r+=dh(i)+":"+Dw(i,s[l])+";");else {var c=Yc(e,t,s);switch(i){case "animation":case "animationName":{r+=dh(i)+":"+c+";";break}default:r+=i+"{"+c+"}";}}}return r}var zw=/label:\s*([^\s;{]+)\s*(;|$)/g,Eo;function Oa(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=true,o="";Eo=void 0;var i=e[0];if(i==null||i.raw===void 0)r=false,o+=Yc(n,t,i);else {var s=i;o+=s[0];}for(var a=1;a<e.length;a++)if(o+=Yc(n,t,e[a]),r){var l=i;o+=l[a];}zw.lastIndex=0;for(var c="",u;(u=zw.exec(o))!==null;)c+="-"+u[1];var d=fk(o)+c;return {name:d,styles:o,next:Eo}}var bk=function(t){return t()},gP=f__namespace.useInsertionEffect?f__namespace.useInsertionEffect:false,vk=gP||bk,_w=gP||f__namespace.useLayoutEffect,bP=f__namespace.createContext(typeof HTMLElement<"u"?mP({key:"css"}):null),yk=bP.Provider,vP=function(t){return f.forwardRef(function(n,r){var o=f.useContext(bP);return t(n,o,r)})},yP=f__namespace.createContext({}),Au={}.hasOwnProperty,Db="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",wy=function(t,n){var r={};for(var o in n)Au.call(n,o)&&(r[o]=n[o]);return r[Db]=t,r},Ck=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return pP(n,r,o),vk(function(){return xy(n,r,o)}),null},xk=vP(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[Db],i=[r],s="";typeof e.className=="string"?s=Cy(t.registered,i,e.className):e.className!=null&&(s=e.className+" ");var a=Oa(i,void 0,f__namespace.useContext(yP));s+=t.key+"-"+a.name;var l={};for(var c in e)Au.call(e,c)&&c!=="css"&&c!==Db&&(l[c]=e[c]);return l.className=s,n&&(l.ref=n),f__namespace.createElement(f__namespace.Fragment,null,f__namespace.createElement(Ck,{cache:t,serialized:a,isStringTag:typeof o=="string"}),f__namespace.createElement(o,l))}),Sy=xk,$e=Gc.Fragment,v=function(t,n,r){return Au.call(n,"css")?Gc.jsx(Sy,wy(t,n),r):Gc.jsx(t,n,r)},F=function(t,n,r){return Au.call(n,"css")?Gc.jsxs(Sy,wy(t,n),r):Gc.jsxs(t,n,r)};function CP(e){return Array.from(new Set(e))}function wk(e,t){if(!e)throw Error(t)}const xP=String.raw,cs=(e,...t)=>new RegExp(xP(e,...t)),Hw=xP`(\d+(\.\d+)?)?(xs|sm|md|lg|xl)`,Id="(solid|dashed|dotted|double|none|hidden)",Sk=[[[...["block","flex","grid","table"].flatMap(e=>[e,`inline-${e}`]),"inline","flow-root","contents","list-item","hidden",...fn("table-",["row","column","cell","caption","row-group","column-group","header-group","footer-group"])],"display"],[["isolate","isolation-auto"],"isolation"],[["static","fixed","absolute","relative","sticky"],"position"],[["visible","invisible","collapse"],"visibility"],[fn("flex-",["row","row-reverse","col","col-reverse"]),"flex-direction"],[fn("flex-",["wrap","wrap-reverse","nowrap"]),"flex-wrap"],[fn("object-",["contain","cover","fill","none","scale-down"]),"object-fit"],[fn("object-",["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"]),"object-position"],[["antialiased","subpixel-antialiased"],"font-smoothing"],[["italic","not-italic","oblique","not-oblique"],"font-style"],[fn("font-",["mono","sans","serif"]),"font-family"],[/^(?:font|fw)-?(thin|extralight|light|normal|medium|semibold|bold|extrabold|black|\d+)$/,"font-weight"],[["normal-nums","ordinal","slashed-zero","lining-nums","oldstyle-nums","proportional-nums","tabular-nums","diagonal-fractions","stacked-fractions"],"font-variant-numeric"],[cs`^(text|text-size|font-size)-(\d+|${Hw}$)`,"font-size"],[fn("list-",["inside","outside"]),"list-style-position"],[fn("list-",["none","disc","decimal"]),"list-style-type"],[fn("text-",["left","center","right","justify","start","end"]),"text-align"],[["underline","overline","line-through","no-underline"],"text-decoration-line"],[fn("decoration-",["solid","double","dotted","dashed","wavy"]),"text-decoration-style"],[/^decoration-(\d+|(auto|from-font)$)/,"text-decoration-thickness"],[["truncate","text-ellipsis","text-clip"],"text-overflow"],[fn("text-",["wrap","nowrap","balance","pretty"]),"text-wrap"],[fn("bg-",["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"]),"background-position"],[/^bg(-no)?-repeat($|-)/,"background-repeat"],[fn("bg-",["auto","cover","contain"]),"background-size"],[["bg-none",/^bg-gradient-to-/],"background-image"],[/^(?:border-|b-)?(?:rounded|rd)(?:-(.+))?$/,"rounded"],[cs`^b(?:order)?-${Id}$`,"border-style"],[cs`^b(?:order)?-([tblrxyse])-${Id}$`,(e,t)=>`border-${t?.[1]}-style`],[/^b(?:order)?($|-\d+)/,"border-width"],[/^b(?:order)?-([tblrxyse])($|-\d+)/,(e,t)=>`border-${t?.[1]}-width`],[/^(?:border|b)-(?:color-)?(.+)$/,"border-color"],[/^(?:border|b)-([rltbse])-(?:color-)?(.+)$/,(e,t)=>`border-${t?.[1]}-color`],[/^outline-\d+/,"outline-width"],[["outline",cs`^outline-${Id}$`],"outline-style"],[cs`^divide-${Id}$`,"divide-style"],[/^divide-(x|y)($|-\d+)/,(e,t)=>`divide-${t?.[1]}-width`],[["ring",/^ring-\d+/],"ring-width"],[[/^ring-offset-\d+/],"ring-offset-width"],[["shadow",...fn("shadow-",["inner","none"]),cs`^shadow-${Hw}$`],"box-shadow"],[fn("border-",["collapse","separate"]),"border-collapse"],[fn("table-",["auto","fixed"]),"table-layout"],[fn("caption-",["top","bottom"]),"caption-side"],[fn("scroll-",["auto","smooth"]),"scroll-behavior"],[fn("snap-",["start","end","center","align-none"]),"scroll-snap-align"],[fn("snap-",["normal","always"]),"scroll-snap-stop"],[fn("snap-",["none","x","y","both","mandatory","proximity"]),"scroll-snap-type"],[/^stroke-\d+/,"stroke-width"],[["sr-only","not-sr-only"],"Screen-Readers"],[/^(flex-)?grow($|-\d+$)/,"flex-grow"],[/^(flex-)?shrink($|-\d+$)/,"flex-shrink"],...["ring-inset","divide-x-reverse","divide-y-reverse"].map(e=>[e,e]),...["resize","blur","drop-shadow","grayscale","invert","sepia","backdrop-blur","backdrop-grayscale","backdrop-invert","backdrop-sepia"].map(e=>[cs`^${e}($|-)`,e])],zb=new Map,wP=new Map;for(let[e,t]of Sk){let n=[e].flat(),r=n.filter(i=>typeof i=="string"),o=n.filter(i=>typeof i=="object"&&i instanceof RegExp);r.forEach(i=>{let s=typeof t=="string"?t:t(i);zb.set(i,s);}),o.forEach(i=>{wP.set(i,t);});}function $k(e){if(zb.has(e))return zb.get(e);for(let[t,n]of wP.entries())if(t.test(e)){let r=t.exec(e);return typeof n=="string"?n:n(e,r)}}function Ek(e){return Ik.map(t=>typeof t=="string"?[t,t]:t).find(([t,n])=>e.startsWith(`${t}-`))}const Ik=["break-after","break-before","break-inside","grid-flow","align","whitespace","mix-blend","bg-blend","ease","origin","cursor","touch","color",["text","color"],["c","color"],["bg","background-color"],["decoration","text-decoration-color"],["from","gradient-color-stops"],["divide","divide-color"],["outline","outline-color"],["ring","ring-color"],["ring-offset","ring-offset-color"],["shadow","box-shadow-color"],["accent","accent-color"],["caret","caret-color"],"fill","stroke"];function fh(e){return Vw.has(e)?Vw.get(e):e}const Vw=new Map(Object.entries({leading:"line-height",col:"grid-column","col-span":"grid-column","col-start":"grid-column-start","col-end":"grid-column-end",row:"grid-row","row-span":"grid-row","row-start":"grid-row-start","row-end":"grid-row-end",m:["mt","mb","ml","mr"],mx:["ml","mr"],my:["mt","mb"],p:["pt","pb","pl","pr"],px:["pl","pr"],py:["pt","pb"]}));function fn(e,t){return wk(e.endsWith("-"),"prefix must end with `-`"),t.map(n=>e+n)}function Pk(e){return typeof e=="boolean"?[]:CP((e||"").split(" ").map(t=>t.trim()).filter(Boolean))}function SP(...e){let t=new Map;return e.map(Pk).flat().filter(Boolean).forEach(r=>Nk(r,t)),CP(Array.from(t.values())).join(" ")}function Nk(e,t){let n=e,r;function o(d){[d].flat().forEach(m=>{t.set(r?r+m:m,n);});}function i(){let d=$k(e);if(d)return o(d),true}function s(){let d=Ek(e);if(!d)return;let[m,p]=d,h=fh(p);return o(h),true}function a(){let d=e,m=/(\[[\w,()/-]+\])$/;m.test(e)&&(d=e.replace(m,function(g,b){return "*".repeat(b.length)})),d=d.replaceAll(/--(?=\d)/g,"-*");let p=d.lastIndexOf("-");if(p===-1)return;let h=fh(e.slice(0,p));return o(h),true}function l(){return o(fh(e))}function c(){let d=/^(?:(?:[\w-]+|\[[^\s[\]]+\]):)+/,m=d.exec(e);m&&(r=m[0].split(new RegExp("(?<=:)(?:\\b|$)")).filter(Boolean).sort().join(""),e=e.slice(r.length));}function u(){if(e.startsWith("!")){e="important:"+e.slice(1);return}if(e.endsWith("!")){e="important:"+e.slice(0,-1);return}}i()||s()||(u(),c(),i()||s()||a()||l());}function An(...e){return f.useMemo(()=>SP(...e),[...e])}const $y=e=>{const{children:t,prefixCls:n,id:r,classNames:o,styles:i,className:s,style:a}=e;return f__namespace.createElement("div",{id:r,className:H(`${n}-container`,o?.container,s),style:{...i?.container,...a},role:"tooltip"},typeof t=="function"?t():t)},da={shiftX:64,adjustY:1},fa={adjustX:1,shiftY:true},Dr=[0,0],Mk={left:{points:["cr","cl"],overflow:fa,offset:[-4,0],targetOffset:Dr},right:{points:["cl","cr"],overflow:fa,offset:[4,0],targetOffset:Dr},top:{points:["bc","tc"],overflow:da,offset:[0,-4],targetOffset:Dr},bottom:{points:["tc","bc"],overflow:da,offset:[0,4],targetOffset:Dr},topLeft:{points:["bl","tl"],overflow:da,offset:[0,-4],targetOffset:Dr},leftTop:{points:["tr","tl"],overflow:fa,offset:[-4,0],targetOffset:Dr},topRight:{points:["br","tr"],overflow:da,offset:[0,-4],targetOffset:Dr},rightTop:{points:["tl","tr"],overflow:fa,offset:[4,0],targetOffset:Dr},bottomRight:{points:["tr","br"],overflow:da,offset:[0,4],targetOffset:Dr},rightBottom:{points:["bl","br"],overflow:fa,offset:[4,0],targetOffset:Dr},bottomLeft:{points:["tl","bl"],overflow:da,offset:[0,4],targetOffset:Dr},leftBottom:{points:["br","bl"],overflow:fa,offset:[-4,0],targetOffset:Dr}};function _b(){return _b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},_b.apply(this,arguments)}const Rk=f__namespace.forwardRef((e,t)=>{const{trigger:n=["hover"],mouseEnterDelay:r=0,mouseLeaveDelay:o=.1,prefixCls:i="rc-tooltip",children:s,onVisibleChange:a,afterVisibleChange:l,motion:c,placement:u="right",align:d={},destroyOnHidden:m=false,defaultVisible:p,getTooltipContainer:h,arrowContent:g,overlay:b,id:y,showArrow:C=true,classNames:x,styles:w,...S}=e,I=Ws(y),$=f.useRef(null);f.useImperativeHandle(t,()=>$.current);const E={...S};"visible"in e&&(E.popupVisible=e.visible);const P=f__namespace.useMemo(()=>{if(!C)return false;const N=C===true?{}:C;return {...N,className:H(N.className,x?.arrow),style:{...N.style,...w?.arrow},content:N.content??g}},[C,x?.arrow,w?.arrow,g]),M=({open:N})=>{const A=f__namespace.Children.only(s),k={"aria-describedby":b&&N?I:void 0};return f__namespace.cloneElement(A,k)};return f__namespace.createElement(_m,_b({popupClassName:x?.root,prefixCls:i,popup:f__namespace.createElement($y,{key:"content",prefixCls:i,id:I,classNames:x,styles:w},b),action:n,builtinPlacements:Mk,popupPlacement:u,ref:$,popupAlign:d,getPopupContainer:h,onOpenChange:a,afterOpenChange:l,popupMotion:c,defaultPopupVisible:p,autoDestroy:m,mouseLeaveDelay:o,popupStyle:w?.root,mouseEnterDelay:r,arrow:P,uniqueContainerClassName:x?.uniqueContainer,uniqueContainerStyle:w?.uniqueContainer},E),M)}),Ak=e=>{const{componentCls:t}=e;return {[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"}}}},Tk=xt(["Space","Compact"],e=>[Ak(e)],()=>({}),{resetStyle:false}),Km=f__namespace.createContext(null),li=(e,t)=>{const n=f__namespace.useContext(Km),r=f__namespace.useMemo(()=>{if(!n)return "";const{compactDirection:o,isFirstItem:i,isLastItem:s}=n,a=o==="vertical"?"-vertical-":"-";return H(`${e}-compact${a}item`,{[`${e}-compact${a}first-item`]:i,[`${e}-compact${a}last-item`]:s,[`${e}-compact${a}item-rtl`]:t==="rtl"})},[e,t,n]);return {compactSize:n?.compactSize,compactDirection:n?.compactDirection,compactItemClassnames:r}},Ok=e=>{const{children:t}=e;return f__namespace.createElement(Km.Provider,{value:null},t)},Fk=e=>{const{children:t,...n}=e;return f__namespace.createElement(Km.Provider,{value:f__namespace.useMemo(()=>n,[n])},t)},Ey=e=>{const{getPrefixCls:t,direction:n}=f__namespace.useContext(ot),{size:r,direction:o,orientation:i,block:s,prefixCls:a,className:l,rootClassName:c,children:u,vertical:d,...m}=e,[p,h]=qs(i,d,o),g=Vn(I=>r??I),b=t("space-compact",a),[y]=Tk(b),C=H(b,y,{[`${b}-rtl`]:n==="rtl",[`${b}-block`]:s,[`${b}-vertical`]:h},l,c),x=f__namespace.useContext(Km),w=gr(u),S=f__namespace.useMemo(()=>w.map((I,$)=>{const E=I?.key||`${b}-item-${$}`;return f__namespace.createElement(Fk,{key:E,compactSize:g,compactDirection:p,isFirstItem:$===0&&(!x||x?.isFirstItem),isLastItem:$===w.length-1&&(!x||x?.isLastItem)},I)}),[w,x,p,g,b]);return w.length===0?null:f__namespace.createElement("div",{className:C,...m},S)},Hi=e=>{const{space:t,form:n,children:r}=e;if(!kn(r))return null;let o=r;return n&&(o=f.createElement(cB,{override:true,status:true},o)),t&&(o=f.createElement(Ok,null,o)),o},mh=()=>({height:0,opacity:0}),jw=e=>{const{scrollHeight:t}=e;return {height:t,opacity:1}},Lk=e=>({height:e?e.offsetHeight:0}),ph=(e,t)=>t?.deadline===true||t.propertyName==="height",$P=(e=Wc)=>({motionName:`${e}-motion-collapse`,onAppearStart:mh,onEnterStart:mh,onAppearActive:jw,onEnterActive:jw,onLeaveStart:Lk,onLeaveActive:mh,onAppearEnd:ph,onEnterEnd:ph,onLeaveEnd:ph,motionDeadline:500}),Vi=(e,t,n)=>n!==void 0?n:`${e}-${t}`;function Iy(e){const{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,o=t/2,i=0,s=o,a=r*1/Math.sqrt(2),l=o-r*(1-1/Math.sqrt(2)),c=o-n*(1/Math.sqrt(2)),u=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),d=2*o-c,m=u,p=2*o-a,h=l,g=2*o-i,b=s,y=o*Math.sqrt(2)+r*(Math.sqrt(2)-2),C=r*(Math.sqrt(2)-1),x=`polygon(${C}px 100%, 50% ${C}px, ${2*o-C}px 100%, ${C}px 100%)`,w=`path('M ${i} ${s} A ${r} ${r} 0 0 0 ${a} ${l} L ${c} ${u} A ${n} ${n} 0 0 1 ${d} ${m} L ${p} ${h} A ${r} ${r} 0 0 0 ${g} ${b} Z')`;return {arrowShadowWidth:y,arrowPath:w,arrowPolygon:x}}const Bk=(e,t,n)=>{const{sizePopupArrow:r,arrowPolygon:o,arrowPath:i,arrowShadowWidth:s,borderRadiusXS:a,calc:l}=e;return {pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:l(r).div(2).equal(),background:t,clipPath:{_multi_value_:true,value:[o,i]},content:'""'},"&::after":{content:'""',position:"absolute",width:s,height:s,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:true,value:`0 0 ${X(a)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}},EP=8;function Xm(e){const{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return {arrowOffsetHorizontal:r,arrowOffsetVertical:n?EP:r}}function Pd(e,t){return e?t:{}}function Py(e,t,n){const{componentCls:r,boxShadowPopoverArrow:o,arrowOffsetVertical:i,arrowOffsetHorizontal:s}=e,{arrowDistance:a=0,arrowPlacement:l={left:true,right:true,top:true,bottom:true}}=n||{};return {[r]:{[`${r}-arrow`]:[{position:"absolute",zIndex:1,display:"block",...Bk(e,t,o),"&:before":{background:t}}],...Pd(!!l.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(",")]:{bottom:a,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:true,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":s,[`> ${r}-arrow`]:{left:{_skip_check_:true,value:s}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${X(s)})`,[`> ${r}-arrow`]:{right:{_skip_check_:true,value:s}}}}),...Pd(!!l.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(",")]:{top:a,transform:"translateY(-100%)"},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:true,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":s,[`> ${r}-arrow`]:{left:{_skip_check_:true,value:s}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${X(s)})`,[`> ${r}-arrow`]:{right:{_skip_check_:true,value:s}}}}),...Pd(!!l.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(",")]:{right:{_skip_check_:true,value:a},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:true,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${r}-arrow`]:{top:i},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:i}}),...Pd(!!l.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(",")]:{left:{_skip_check_:true,value:a},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:true,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${r}-arrow`]:{top:i},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:i}})}}}function kk(e,t,n,r){if(r===false)return {adjustX:false,adjustY:false};const o=r&&typeof r=="object"?r:{},i={};switch(e){case "top":case "bottom":i.shiftX=t.arrowOffsetHorizontal*2+n,i.shiftY=true,i.adjustY=true;break;case "left":case "right":i.shiftY=t.arrowOffsetVertical*2+n,i.shiftX=true,i.adjustX=true;break}const s={...i,...o};return s.shiftX||(s.adjustX=true),s.shiftY||(s.adjustY=true),s}const Ww={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},Dk={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},zk=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function IP(e){const{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:o,borderRadius:i,visibleFirst:s}=e,a=t/2,l={},c=Xm({contentRadius:i,limitVerticalRadius:true});return Object.keys(Ww).forEach(u=>{const m={...r&&Dk[u]||Ww[u],offset:[0,0],dynamicInset:true};switch(l[u]=m,zk.has(u)&&(m.autoArrow=false),u){case "top":case "topLeft":case "topRight":m.offset[1]=-a-o;break;case "bottom":case "bottomLeft":case "bottomRight":m.offset[1]=a+o;break;case "left":case "leftTop":case "leftBottom":m.offset[0]=-a-o;break;case "right":case "rightTop":case "rightBottom":m.offset[0]=a+o;break}if(r)switch(u){case "topLeft":case "bottomLeft":m.offset[0]=-c.arrowOffsetHorizontal-a;break;case "topRight":case "bottomRight":m.offset[0]=c.arrowOffsetHorizontal+a;break;case "leftTop":case "rightTop":m.offset[1]=-c.arrowOffsetHorizontal*2+a;break;case "leftBottom":case "rightBottom":m.offset[1]=c.arrowOffsetHorizontal*2-a;break}m.overflow=kk(u,c,t,n),s&&(m.htmlRegion="visibleFirst");}),l}const Ny=(e,t)=>{const n=r=>typeof r=="boolean"?{show:r}:r||{};return f.useMemo(()=>{const r=n(e),o=n(t);return {...o,...r,show:r.show??o.show??true}},[e,t])},PP=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),_k=e=>({animationDuration:e,animationFillMode:"both"}),Hk=e=>({animationDuration:e,animationFillMode:"both"}),Ym=(e,t,n,r,o=false)=>{const i=o?"&":"";return {[`
${i}${e}-enter,
${i}${e}-appear
`]:{..._k(r),animationPlayState:"paused"},[`${i}${e}-leave`]:{...Hk(r),animationPlayState:"paused"},[`
${i}${e}-enter${e}-enter-active,
${i}${e}-appear${e}-appear-active
`]:{animationName:t,animationPlayState:"running"},[`${i}${e}-leave${e}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},Vk=new ht("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),jk=new ht("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),My=(e,t=false)=>{const{antCls:n}=e,r=`${n}-fade`,o=t?"&":"";return [Ym(r,Vk,jk,e.motionDurationMid,t),{[`
${o}${r}-enter,
${o}${r}-appear
`]:{opacity:0,animationTimingFunction:"linear"},[`${o}${r}-leave`]:{animationTimingFunction:"linear"}}]},Wk=new ht("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),qk=new ht("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),Uk=new ht("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Gk=new ht("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),Kk=new ht("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Xk=new ht("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),Yk=new ht("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Qk=new ht("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),Zk={"move-up":{inKeyframes:Yk,outKeyframes:Qk},"move-down":{inKeyframes:Wk,outKeyframes:qk},"move-left":{inKeyframes:Uk,outKeyframes:Gk},"move-right":{inKeyframes:Kk,outKeyframes:Xk}},zf=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=Zk[t];return [Ym(r,o,i,e.motionDurationMid),{[`
${r}-enter,
${r}-appear
`]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},Ry=new ht("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Ay=new ht("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Ty=new ht("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Oy=new ht("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),Jk=new ht("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),eD=new ht("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),tD=new ht("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),nD=new ht("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),rD={"slide-up":{inKeyframes:Ry,outKeyframes:Ay},"slide-down":{inKeyframes:Ty,outKeyframes:Oy},"slide-left":{inKeyframes:Jk,outKeyframes:eD},"slide-right":{inKeyframes:tD,outKeyframes:nD}},ji=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=rD[t];return [Ym(r,o,i,e.motionDurationMid),{[`
${r}-enter,
${r}-appear
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},oD=new ht("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),iD=new ht("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),qw=new ht("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Uw=new ht("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),sD=new ht("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),aD=new ht("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),lD=new ht("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),cD=new ht("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),uD=new ht("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),dD=new ht("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),fD=new ht("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),mD=new ht("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),pD={zoom:{inKeyframes:oD,outKeyframes:iD},"zoom-big":{inKeyframes:qw,outKeyframes:Uw},"zoom-big-fast":{inKeyframes:qw,outKeyframes:Uw},"zoom-left":{inKeyframes:lD,outKeyframes:cD},"zoom-right":{inKeyframes:uD,outKeyframes:dD},"zoom-up":{inKeyframes:sD,outKeyframes:aD},"zoom-down":{inKeyframes:fD,outKeyframes:mD}},Tu=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=pD[t];return [Ym(r,o,i,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[`
${r}-enter,
${r}-appear
`]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},hD=e=>{const{calc:t,componentCls:n,tooltipMaxWidth:r,tooltipColor:o,tooltipBg:i,tooltipBorderRadius:s,zIndexPopup:a,controlHeight:l,boxShadowSecondary:c,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:m,sizePopupArrow:p}=e,h=t(s).add(p).add(m).equal(),b={minWidth:t(s).mul(2).add(p).equal(),minHeight:l,padding:`${X(e.calc(u).div(2).equal())} ${X(d)}`,color:`var(--ant-tooltip-color, ${o})`,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:s,boxShadow:c,boxSizing:"border-box"},y={"--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" ")};return [{[n]:{...Lt(e),position:"absolute",zIndex:a,display:"block",width:"max-content",maxWidth:r,visibility:"visible",...y,"&-hidden":{display:"none"},"--antd-arrow-background-color":i,[`${n}-container`]:[b,My(e,true)],[`&:has(~ ${n}-unique-container)`]:{[`${n}-container`]:{border:"none",background:"transparent",boxShadow:"none"}},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:h},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:e.min(s,EP)}},[`${n}-content`]:{position:"relative"},...Vm(e,(C,{darkColor:x})=>({[`&${n}-${C}`]:{[`${n}-container`]:{backgroundColor:x},[`${n}-arrow`]:{"--antd-arrow-background-color":x}}})),"&-rtl":{direction:"rtl"}}},Py(e,"var(--antd-arrow-background-color)"),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}},{[`${n}-unique-container`]:{...b,...y,position:"absolute",zIndex:t(a).sub(1).equal(),"&-hidden":{display:"none"},"&-visible":{transition:`all ${e.motionDurationSlow}`}}}]},gD=e=>({zIndexPopup:e.zIndexPopupBase+70,...Xm({contentRadius:e.borderRadius,limitVerticalRadius:true}),...Iy(vt(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))}),NP=(e,t,n=true)=>xt("Tooltip",o=>{const{borderRadius:i,colorTextLightSolid:s,colorBgSpotlight:a}=o,l=vt(o,{tooltipMaxWidth:250,tooltipColor:s,tooltipBorderRadius:i,tooltipBg:a});return [hD(l),Tu(o,"zoom-big-fast")]},gD,{resetStyle:false,injectStyle:n})(e,t),bD=_i.map(e=>`${e}-inverse`),vD=["success","processing","error","default","warning"];function Qm(e,t=true){return t?[].concat(Et(bD),Et(_i)).includes(e):_i.includes(e)}function yD(e){return vD.includes(e)}const hh=e=>Math.round(Number(e||0)),CD=e=>{if(e instanceof Ft)return e;if(e&&typeof e=="object"&&"h"in e&&"b"in e){const{b:t,...n}=e;return {...n,v:t}}return typeof e=="string"&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e};class ho extends Ft{constructor(t){super(CD(t));}toHsbString(){const t=this.toHsb(),n=hh(t.s*100),r=hh(t.b*100),o=hh(t.h),i=t.a,s=`hsb(${o}, ${n}%, ${r}%)`,a=`hsba(${o}, ${n}%, ${r}%, ${i.toFixed(i===0?0:2)})`;return i===1?s:a}toHsb(){const{v:t,...n}=this.toHsv();return {...n,b:t,a:this.a}}}const xD="rc-color-picker",Fa=e=>e instanceof ho?e:new ho(e),wD=Fa("#1677ff"),MP=e=>{const{offset:t,targetRef:n,containerRef:r,color:o,type:i}=e,{width:s,height:a}=r.current.getBoundingClientRect(),{width:l,height:c}=n.current.getBoundingClientRect(),u=l/2,d=c/2,m=(t.x+u)/s,p=1-(t.y+d)/a,h=o.toHsb(),g=m,b=(t.x+u)/s*360;if(i)switch(i){case "hue":return Fa({...h,h:b<=0?0:b});case "alpha":return Fa({...h,a:g<=0?0:g})}return Fa({h:h.h,s:m<=0?0:m,b:p>=1?1:p,a:h.a})},RP=(e,t)=>{const n=e.toHsb();switch(t){case "hue":return {x:n.h/360*100,y:50};case "alpha":return {x:e.a*100,y:50};default:return {x:n.s*100,y:(1-n.b)*100}}},Fy=({color:e,prefixCls:t,className:n,style:r,onClick:o})=>{const i=`${t}-color-block`;return f.createElement("div",{className:H(i,n),style:r,onClick:o},f.createElement("div",{className:`${i}-inner`,style:{background:e}}))};function SD(e){const t="touches"in e?e.touches[0]:e,n=document.documentElement.scrollLeft||document.body.scrollLeft||window.pageXOffset,r=document.documentElement.scrollTop||document.body.scrollTop||window.pageYOffset;return {pageX:t.pageX-n,pageY:t.pageY-r}}function AP(e){const{targetRef:t,containerRef:n,direction:r,onDragChange:o,onDragChangeComplete:i,calculate:s,color:a,disabledDrag:l}=e,[c,u]=f.useState({x:0,y:0}),d=f.useRef(null),m=f.useRef(null);f.useEffect(()=>{u(s());},[a]),f.useEffect(()=>()=>{document.removeEventListener("mousemove",d.current),document.removeEventListener("mouseup",m.current),document.removeEventListener("touchmove",d.current),document.removeEventListener("touchend",m.current),d.current=null,m.current=null;},[]);const p=y=>{const{pageX:C,pageY:x}=SD(y),{x:w,y:S,width:I,height:$}=n.current.getBoundingClientRect(),{width:E,height:P}=t.current.getBoundingClientRect(),M=E/2,N=P/2,A=Math.max(0,Math.min(C-w,I))-M,k=Math.max(0,Math.min(x-S,$))-N,R={x:A,y:r==="x"?c.y:k};if(E===0&&P===0||E!==P)return false;o?.(R);},h=y=>{y.preventDefault(),p(y);},g=y=>{y.preventDefault(),document.removeEventListener("mousemove",d.current),document.removeEventListener("mouseup",m.current),document.removeEventListener("touchmove",d.current),document.removeEventListener("touchend",m.current),d.current=null,m.current=null,i?.();};return [c,y=>{document.removeEventListener("mousemove",d.current),document.removeEventListener("mouseup",m.current),!l&&(p(y),document.addEventListener("mousemove",h),document.addEventListener("mouseup",g),document.addEventListener("touchmove",h),document.addEventListener("touchend",g),d.current=h,m.current=g);}]}const TP=({size:e="default",color:t,prefixCls:n})=>f.createElement("div",{className:H(`${n}-handler`,{[`${n}-handler-sm`]:e==="small"}),style:{backgroundColor:t}}),OP=({children:e,style:t,prefixCls:n})=>f.createElement("div",{className:`${n}-palette`,style:{position:"relative",...t}},e),FP=f.forwardRef((e,t)=>{const{children:n,x:r,y:o}=e;return f.createElement("div",{ref:t,style:{position:"absolute",left:`${r}%`,top:`${o}%`,zIndex:1,transform:"translate(-50%, -50%)"}},n)}),$D=({color:e,onChange:t,prefixCls:n,onChangeComplete:r,disabled:o})=>{const i=f.useRef(),s=f.useRef(),a=f.useRef(e),l=lt(d=>{const m=MP({offset:d,targetRef:s,containerRef:i,color:e});a.current=m,t(m);}),[c,u]=AP({color:e,containerRef:i,targetRef:s,calculate:()=>RP(e),onDragChange:l,onDragChangeComplete:()=>r?.(a.current),disabledDrag:o});return f.createElement("div",{ref:i,className:`${n}-select`,onMouseDown:u,onTouchStart:u},f.createElement(OP,{prefixCls:n},f.createElement(FP,{x:c.x,y:c.y,ref:s},f.createElement(TP,{color:e.toRgbString(),prefixCls:n})),f.createElement("div",{className:`${n}-saturation`,style:{backgroundColor:`hsl(${e.toHsb().h},100%, 50%)`,backgroundImage:"linear-gradient(0deg, #000, transparent),linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0))"}})))},ED=(e,t)=>{const[n,r]=Bt(e,t);return [f.useMemo(()=>Fa(n),[n]),r]},ID=({colors:e,children:t,direction:n="to right",type:r,prefixCls:o})=>{const i=f.useMemo(()=>e.map((s,a)=>{let l=Fa(s);return r==="alpha"&&a===e.length-1&&(l=new ho(l.setA(1))),l.toRgbString()}).join(","),[e,r]);return f.createElement("div",{className:`${o}-gradient`,style:{position:"absolute",inset:0,background:`linear-gradient(${n}, ${i})`}},t)},PD=e=>{const{prefixCls:t,colors:n,disabled:r,onChange:o,onChangeComplete:i,color:s,type:a}=e,l=f.useRef(null),c=f.useRef(null),u=f.useRef(s),d=y=>a==="hue"?y.getHue():y.a*100,m=lt(y=>{const C=MP({offset:y,targetRef:c,containerRef:l,color:s,type:a});u.current=C,o(d(C));}),[p,h]=AP({color:s,targetRef:c,containerRef:l,calculate:()=>RP(s,a),onDragChange:m,onDragChangeComplete(){i(d(u.current));},direction:"x",disabledDrag:r}),g=f.useMemo(()=>{if(a==="hue"){const y=s.toHsb();return y.s=1,y.b=1,y.a=1,new ho(y)}return s},[s,a]),b=f.useMemo(()=>n.map(y=>`${y.color} ${y.percent}%`),[n]);return f.createElement("div",{ref:l,className:H(`${t}-slider`,`${t}-slider-${a}`),onMouseDown:h,onTouchStart:h},f.createElement(OP,{prefixCls:t},f.createElement(FP,{x:p.x,y:p.y,ref:c},f.createElement(TP,{size:"small",color:g.toHexString(),prefixCls:t})),f.createElement(ID,{colors:b,type:a,prefixCls:t})))};function ND(e){return f__namespace.useMemo(()=>{const{slider:t}=e||{};return [t||PD]},[e])}function Cc(){return Cc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Cc.apply(this,arguments)}const MD=[{color:"rgb(255, 0, 0)",percent:0},{color:"rgb(255, 255, 0)",percent:17},{color:"rgb(0, 255, 0)",percent:33},{color:"rgb(0, 255, 255)",percent:50},{color:"rgb(0, 0, 255)",percent:67},{color:"rgb(255, 0, 255)",percent:83},{color:"rgb(255, 0, 0)",percent:100}],RD=f.forwardRef((e,t)=>{const{value:n,defaultValue:r,prefixCls:o=xD,onChange:i,onChangeComplete:s,className:a,style:l,panelRender:c,disabledAlpha:u=false,disabled:d=false,components:m}=e,[p]=ND(m),[h,g]=ED(r||wD,n),b=f.useMemo(()=>h.setA(1).toRgbString(),[h]),y=(N,A)=>{n||g(N),i?.(N,A);},C=N=>new ho(h.setHue(N)),x=N=>new ho(h.setA(N/100)),w=N=>{y(C(N),{type:"hue",value:N});},S=N=>{y(x(N),{type:"alpha",value:N});},I=N=>{s&&s(C(N));},$=N=>{s&&s(x(N));},E=H(`${o}-panel`,a,{[`${o}-panel-disabled`]:d}),P={prefixCls:o,disabled:d,color:h},M=f.createElement(f.Fragment,null,f.createElement($D,Cc({onChange:y},P,{onChangeComplete:s})),f.createElement("div",{className:`${o}-slider-container`},f.createElement("div",{className:H(`${o}-slider-group`,{[`${o}-slider-group-disabled-alpha`]:u})},f.createElement(p,Cc({},P,{type:"hue",colors:MD,min:0,max:359,value:h.getHue(),onChange:w,onChangeComplete:I})),!u&&f.createElement(p,Cc({},P,{type:"alpha",colors:[{percent:0,color:"rgba(255, 0, 4, 0)"},{percent:100,color:b}],min:0,max:100,value:h.a*100,onChange:S,onChangeComplete:$}))),f.createElement(Fy,{color:h.toRgbString(),prefixCls:o})));return f.createElement("div",{className:E,style:l,ref:t},typeof c=="function"?c(M):M)}),cc=(e,t)=>e?.replace(/[^\w/]/g,"").slice(0,t?8:6)||"",AD=(e,t)=>e?cc(e,t):"";let pr=(function(){function e(t){if(no(this,e),this.cleared=false,t instanceof e){this.metaColor=t.metaColor.clone(),this.colors=t.colors?.map(r=>({color:new e(r.color),percent:r.percent})),this.cleared=t.cleared;return}const n=Array.isArray(t);n&&t.length?(this.colors=t.map(({color:r,percent:o})=>({color:new e(r),percent:o})),this.metaColor=new ho(this.colors[0].color.metaColor)):this.metaColor=new ho(n?"":t),(!t||n&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=true);}return ro(e,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return AD(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return !!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){const{colors:n}=this;return n?`linear-gradient(90deg, ${n.map(o=>`${o.color.toRgbString()} ${o.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(n){return !n||this.isGradient()!==n.isGradient()?false:this.isGradient()?this.colors.length===n.colors.length&&this.colors.every((r,o)=>{const i=n.colors[o];return r.percent===i.percent&&r.color.equals(i.color)}):this.toHexString()===n.toHexString()}}])})();const _n=e=>e instanceof pr?e:new pr(e),af=e=>Math.round(Number(e||0)),Ly=e=>af(e.toHsb().a*100),lf=(e,t)=>{const n=e.toRgb();if(!n.r&&!n.g&&!n.b){const r=e.toHsb();return r.a=1,_n(r)}return n.a=1,_n(n)},LP=(e,t)=>{const n=[{percent:0,color:e[0].color}].concat(Et(e),[{percent:100,color:e[e.length-1].color}]);for(let r=0;r<n.length-1;r+=1){const o=n[r].percent,i=n[r+1].percent,s=n[r].color,a=n[r+1].color;if(o<=t&&t<=i){const l=i-o;if(l===0)return s;const c=(t-o)/l*100,u=new ho(s),d=new ho(a);return u.mix(d,c).toRgbString()}}return ""};function BP(e,t){const n=Qm(t),r=H({[`${e}-${t}`]:t&&n}),o={},i={},s=_n(t).toRgb(),l=(.299*s.r+.587*s.g+.114*s.b)/255<.5?"#FFF":"#000";return t&&!n&&(o.background=t,o["--ant-tooltip-color"]=l,i["--antd-arrow-background-color"]=t),{className:r,overlayStyle:o,arrowStyle:i}}const TD=e=>{const{prefixCls:t,className:n,placement:r="top",title:o,color:i,overlayInnerStyle:s,classNames:a,styles:l}=e,{getPrefixCls:c}=f__namespace.useContext(ot),u=c("tooltip",t),d=sn(u),[m,p]=NP(u,d),h=BP(u,i),g=h.arrowStyle,b=f__namespace.useMemo(()=>({container:{...s,...h.overlayStyle}}),[s,h.overlayStyle]),y={...e,placement:r},[C,x]=It([a],[b,l],{props:y}),w=H(d,m,p,u,`${u}-pure`,`${u}-placement-${r}`,n,h.className);return f__namespace.createElement("div",{className:w,style:g},f__namespace.createElement("div",{className:`${u}-arrow`}),f__namespace.createElement($y,{...e,className:m,prefixCls:u,classNames:C,styles:x},o))},OD=f__namespace.forwardRef((e,t)=>{const{prefixCls:n,openClassName:r,getTooltipContainer:o,color:i,children:s,afterOpenChange:a,arrow:l,destroyTooltipOnHide:c,destroyOnHidden:u,title:d,overlay:m,trigger:p,builtinPlacements:h,autoAdjustOverflow:g=true,motion:b,getPopupContainer:y,placement:C="top",mouseEnterDelay:x=.1,mouseLeaveDelay:w=.1,rootClassName:S,styles:I,classNames:$,onOpenChange:E,overlayInnerStyle:P,overlayStyle:M,overlayClassName:N,...A}=e,[,k]=Tn(),{getPopupContainer:R,getPrefixCls:L,direction:V,className:_,style:z,classNames:D,styles:W,arrow:O,trigger:B}=St("tooltip"),j=Ny(l,O),Y=j.show,q=p||B||"hover",U=f__namespace.useRef(null),K=()=>{U.current?.forceAlign();};f__namespace.useImperativeHandle(t,()=>({forceAlign:K,nativeElement:U.current?.nativeElement,popupElement:U.current?.popupElement}));const[J,Q]=Bt(e.defaultOpen??false,e.open),G=!d&&!m&&d!==0,ee=Qe=>{Q(G?false:Qe),!G&&E&&E(Qe);},re=f__namespace.useMemo(()=>h||IP({arrowPointAtCenter:j?.pointAtCenter??false,autoAdjustOverflow:g,arrowWidth:Y?k.sizePopupArrow:0,borderRadius:k.borderRadius,offset:k.marginXXS,visibleFirst:true}),[j,h,k,Y,g]),oe=f__namespace.useMemo(()=>d===0?d:m||d||"",[m,d]),be=f__namespace.createElement(Hi,{space:true},typeof oe=="function"?oe():oe),Z={...e,trigger:q,color:i,placement:C,builtinPlacements:h,openClassName:r,arrow:l,autoAdjustOverflow:g,getPopupContainer:y,children:s,destroyTooltipOnHide:c,destroyOnHidden:u},[te,ce]=It([D,$],[W,I],{props:Z}),ue=L("tooltip",n),he=L(),ye=e["data-popover-inject"];let pe=J;!("open"in e)&&G&&(pe=false);const ie=f__namespace.isValidElement(s)&&!tP(s)?s:f__namespace.createElement("span",null,s),ge=ie.props,Se=!ge.className||typeof ge.className=="string"?H(ge.className,r||`${ue}-open`):ge.className,ke=sn(ue),[qe,De]=NP(ue,ke,!ye),ze=BP(ue,i),je=ze.arrowStyle,Le=H(ke,qe,De),we=H(N,{[`${ue}-rtl`]:V==="rtl"},ze.className,S,Le,_,te.root),[Me,Fe]=Us("Tooltip",A.zIndex),Re={...ce.container,...P,...ze.overlayStyle},Pe=f__namespace.createElement(Rk,{unique:true,...A,trigger:q,zIndex:Me,showArrow:Y,placement:C,mouseEnterDelay:x,mouseLeaveDelay:w,prefixCls:ue,classNames:{root:we,container:te.container,arrow:te.arrow,uniqueContainer:H(Le,te.container)},styles:{root:{...je,...ce.root,...z,...M},container:Re,uniqueContainer:Re,arrow:ce.arrow},getTooltipContainer:y||o||R,ref:U,builtinPlacements:re,overlay:be,visible:pe,onVisibleChange:ee,afterVisibleChange:a,arrowContent:f__namespace.createElement("span",{className:`${ue}-arrow-content`}),motion:{motionName:Vi(he,"zoom-big-fast",typeof b?.motionName=="string"?b?.motionName:void 0),motionDeadline:1e3},destroyOnHidden:u??!!c},pe?Rn(ie,{className:Se}):ie);return f__namespace.createElement(Dm.Provider,{value:Fe},Pe)}),Zi=OD;Zi._InternalPanelDoNotUseOrYouWillBeFired=TD;Zi.UniqueProvider=BI;function Jt(e){return v(Zi,{...e,styles:{...e.styles,root:{width:"max-content",maxWidth:"50vw",...e.styles?.root}},children:e.children})}const FD=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"currentColor",d:"M2 22V2h2v20zm4-5v-3h10v3zm0-7V7h16v3z"})]}),kP=f.forwardRef(FD),LD=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"currentColor",d:"M11 22v-5H6v-3h5v-4H3V7h8V2h2v5h8v3h-8v4h5v3h-5v5z"})]}),BD=f.forwardRef(LD),kD=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"currentColor",d:"M20 22V2h2v20zM8 17v-3h10v3zm-6-7V7h16v3z"})]}),DP=f.forwardRef(kD);var zP=(e=>(e.Center="center",e.Left="left",e.Right="right",e))(zP||{});const _P="w-720px",DD=(e,t)=>{switch(e){case "left":return t==="flex"?"justify-left":"ml-0 mr-auto";case "right":return t==="flex"?"justify-right":"ml-auto mr-0";default:return t==="flex"?"justify-center":"mx-auto"}};function zD({className:e}){const{grid:{gridDisplayMode:t,twoColumnModeAlign:n}}=Mt();return F(Dn.Group,{className:e,disabled:t!==ri.TwoColumnGrid,buttonStyle:"solid",size:"small",value:n,onChange:r=>{Ue.grid.twoColumnModeAlign=r.target.value;},children:[v(Dn.Button,{value:"left",className:"inline-flex-center",children:v(kP,{className:"size-16px"})}),v(Dn.Button,{value:"center",className:"inline-flex-center",children:v(BD,{className:"size-16px"})}),v(Dn.Button,{value:"right",className:"inline-flex-center",children:v(DP,{className:"size-16px"})})]})}const _D=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 5a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1zm10 0a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1zM4 15a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1zm10 0a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1z"})]}),HD=f.forwardRef(_D),VD=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 5h8m-8 4h5m-5 6h8m-8 4h5M3 5a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1zm0 10a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z"})]}),jD=f.forwardRef(VD);var ri=(e=>(e.NormalGrid="grid",e.List="list",e.TwoColumnGrid="two-column-grid",e.CenterEmptyGrid="center-empty-grid",e))(ri||{});function HP(e){return {usingListMode:e==="list",usingTwoColumnMode:e==="two-column-grid",usingCenterEmptyMode:e==="center-empty-grid"}}function VP(){const{gridDisplayMode:e}=nt(Ue.grid);return HP(e)}function By(e){return e==="list"}function WD(){return nt(Ue.grid).gridDisplayMode==="list"}function qD({className:e}){const{gridDisplayMode:t}=nt(Ue.grid),o=An("flex items-center gap-x-15px","[&_.ant-radio-wrapper]:inline-flex [&_.ant-radio-wrapper]:items-center","[&_.ant-radio-label]:inline-flex [&_.ant-radio-label]:items-center ![&_.ant-radio-label]:pl-4px",e);return v(Dn.Group,{size:"large",className:o,value:t,onChange:i=>{Ue.grid.gridDisplayMode=i.target.value;},options:[{value:"grid",label:v(Jt,{title:"这个是默认的网格模式",children:F("span",{className:"inline-flex-center",children:[v(HD,{className:"mx-4px size-16px cursor-pointer"}),"网格"]})})},{value:"list",label:F($e,{children:[v(jD,{className:"mx-4px size-16px cursor-pointer"}),"列表"]})},{value:"two-column-grid",label:F($e,{children:["双列模式",v(zD,{className:"ml-5px"})]})},{value:"center-empty-grid",label:v($e,{children:v(Jt,{title:"网格中间不显示卡片",children:"中空模式"})})}]})}var Be=(e=>(e.AppRecommend="app-recommend",e.PcRecommend="pc-recommend",e.KeepFollowOnly="keep-follow-only",e.DynamicFeed="dynamic-feed",e.Watchlater="watchlater",e.Fav="fav",e.Hot="hot",e.Live="live",e.SpaceUpload="space-upload",e))(Be||{}),vn=(e=>(e.PopularGeneral="popular-general",e.PopularWeekly="popular-weekly",e.Rank="ranking",e))(vn||{});const Hb=Object.values(Be),UD=["space-upload"],ky=kE(Hb,UD);var jP=function(e){return function(t,n){var r=f.useRef(false);e(function(){return function(){r.current=false;}},[]),e(function(){if(!r.current)r.current=true;else return t()},n);}},lo=function(){return lo=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);}return t},lo.apply(this,arguments)};function WP(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function qP(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i);})}return new(n||(n=Promise))(function(i,s){function a(u){try{c(r.next(u));}catch(d){s(d);}}function l(u){try{c(r.throw(u));}catch(d){s(d);}}function c(u){u.done?i(u.value):o(u.value).then(a,l);}c((r=r.apply(e,[])).next());})}function UP(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(c[0]===6&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n);}catch(u){c=[6,u],o=0;}finally{r=i=0;}if(c[0]&5)throw c[1];return {value:c[0]?c[1]:void 0,done:true}}}function Vb(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return {next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function pn(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value);}catch(a){s={error:a};}finally{try{o&&!o.done&&(n=r.return)&&n.call(r);}finally{if(s)throw s.error}}return i}function Bn(e,t,n){if(arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var Dy=function(e){return typeof e=="function"},GD=function(e){return typeof e=="string"},GP=function(e){return typeof e=="number"},Ve=function(e){var t=f.useRef(e);t.current=f.useMemo(function(){return e},[e]);var n=f.useRef(void 0);return n.current||(n.current=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.current.apply(this,r)}),n.current};const Wi=jP(f.useEffect);var KP=function(e,t){var n=t.manual,r=t.ready,o=r===void 0?true:r,i=t.defaultParams,s=i===void 0?[]:i,a=t.refreshDeps,l=a===void 0?[]:a,c=t.refreshDepsAction,u=f.useRef(false);return u.current=false,Wi(function(){!n&&o&&(u.current=true,e.run.apply(e,Bn([],pn(s),false)));},[o]),Wi(function(){u.current||n||(u.current=true,c?c():e.refresh());},Bn([],pn(l),false)),{onBefore:function(){if(!o)return {stopNow:true}}}};KP.onInit=function(e){var t=e.ready,n=t===void 0?true:t,r=e.manual;return {loading:!r&&n}};function jb(e,t){if(e===t)return true;for(var n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return false;return true}var Ou=function(e,t){var n=f.useRef({deps:t,obj:void 0,initialized:false}).current;return (n.initialized===false||!jb(n.deps,t))&&(n.deps=t,n.obj=e(),n.initialized=true),n.obj};function Fs(e){var t=f.useRef(e);return t.current=e,t}var ml=function(e){var t=Fs(e);f.useEffect(function(){return function(){t.current();}},[]);},cf=new Map,KD=function(e,t,n){var r=cf.get(e);r?.timer&&clearTimeout(r.timer);var o=void 0;t>-1&&(o=setTimeout(function(){cf.delete(e);},t)),cf.set(e,lo(lo({},n),{timer:o}));},XD=function(e){return cf.get(e)},uf=new Map,YD=function(e){return uf.get(e)},QD=function(e,t){uf.set(e,t),t.then(function(n){return uf.delete(e),n}).catch(function(){uf.delete(e);});},gs={},ZD=function(e,t){gs[e]&&gs[e].forEach(function(n){return n(t)});},gh=function(e,t){return gs[e]||(gs[e]=[]),gs[e].push(t),function(){var r=gs[e].indexOf(t);gs[e].splice(r,1);}},JD=function(e,t){var n=t.cacheKey,r=t.cacheTime,o=r===void 0?300*1e3:r,i=t.staleTime,s=i===void 0?0:i,a=t.setCache,l=t.getCache,c=f.useRef(void 0),u=f.useRef(void 0),d=function(p,h){a?a(h):KD(p,o,h),ZD(p,h.data);},m=function(p,h){return h===void 0&&(h=[]),l?l(h):XD(p)};return Ou(function(){if(n){var p=m(n);p&&Object.hasOwnProperty.call(p,"data")&&(e.state.data=p.data,e.state.params=p.params,(s===-1||Date.now()-p.time<=s)&&(e.state.loading=false)),c.current=gh(n,function(h){e.setState({data:h});});}},[]),ml(function(){var p;(p=c.current)===null||p===void 0||p.call(c);}),n?{onBefore:function(p){var h=m(n,p);return !h||!Object.hasOwnProperty.call(h,"data")?{}:s===-1||Date.now()-h.time<=s?{loading:false,data:h?.data,error:void 0,returnNow:true}:{data:h?.data,error:void 0}},onRequest:function(p,h){var g=YD(n);return g&&g!==u.current?{servicePromise:g}:(g=p.apply(void 0,Bn([],pn(h),false)),u.current=g,QD(n,g),{servicePromise:g})},onSuccess:function(p,h){var g;n&&((g=c.current)===null||g===void 0||g.call(c),d(n,{data:p,params:h,time:Date.now()}),c.current=gh(n,function(b){e.setState({data:b});}));},onMutate:function(p){var h;n&&((h=c.current)===null||h===void 0||h.call(c),d(n,{data:p,params:e.state.params,time:Date.now()}),c.current=gh(n,function(g){e.setState({data:g});}));}}:{}},bh,Gw;function zy(){if(Gw)return bh;Gw=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return bh=e,bh}var vh,Kw;function ez(){if(Kw)return vh;Kw=1;var e=typeof md=="object"&&md&&md.Object===Object&&md;return vh=e,vh}var yh,Xw;function XP(){if(Xw)return yh;Xw=1;var e=ez(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return yh=n,yh}var Ch,Yw;function tz(){if(Yw)return Ch;Yw=1;var e=XP(),t=function(){return e.Date.now()};return Ch=t,Ch}var xh,Qw;function nz(){if(Qw)return xh;Qw=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return xh=t,xh}var wh,Zw;function rz(){if(Zw)return wh;Zw=1;var e=nz(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return wh=n,wh}var Sh,Jw;function YP(){if(Jw)return Sh;Jw=1;var e=XP(),t=e.Symbol;return Sh=t,Sh}var $h,eS;function oz(){if(eS)return $h;eS=1;var e=YP(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;function i(s){var a=n.call(s,o),l=s[o];try{s[o]=void 0;var c=!0;}catch{}var u=r.call(s);return c&&(a?s[o]=l:delete s[o]),u}return $h=i,$h}var Eh,tS;function iz(){if(tS)return Eh;tS=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return Eh=n,Eh}var Ih,nS;function sz(){if(nS)return Ih;nS=1;var e=YP(),t=oz(),n=iz(),r="[object Null]",o="[object Undefined]",i=e?e.toStringTag:void 0;function s(a){return a==null?a===void 0?o:r:i&&i in Object(a)?t(a):n(a)}return Ih=s,Ih}var Ph,rS;function az(){if(rS)return Ph;rS=1;function e(t){return t!=null&&typeof t=="object"}return Ph=e,Ph}var Nh,oS;function lz(){if(oS)return Nh;oS=1;var e=sz(),t=az(),n="[object Symbol]";function r(o){return typeof o=="symbol"||t(o)&&e(o)==n}return Nh=r,Nh}var Mh,iS;function cz(){if(iS)return Mh;iS=1;var e=rz(),t=zy(),n=lz(),r=NaN,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt;function l(c){if(typeof c=="number")return c;if(n(c))return r;if(t(c)){var u=typeof c.valueOf=="function"?c.valueOf():c;c=t(u)?u+"":u;}if(typeof c!="string")return c===0?c:+c;c=e(c);var d=i.test(c);return d||s.test(c)?a(c.slice(2),d?2:8):o.test(c)?r:+c}return Mh=l,Mh}var Rh,sS;function QP(){if(sS)return Rh;sS=1;var e=zy(),t=tz(),n=cz(),r="Expected a function",o=Math.max,i=Math.min;function s(a,l,c){var u,d,m,p,h,g,b=0,y=false,C=false,x=true;if(typeof a!="function")throw new TypeError(r);l=n(l)||0,e(c)&&(y=!!c.leading,C="maxWait"in c,m=C?o(n(c.maxWait)||0,l):m,x="trailing"in c?!!c.trailing:x);function w(k){var R=u,L=d;return u=d=void 0,b=k,p=a.apply(L,R),p}function S(k){return b=k,h=setTimeout(E,l),y?w(k):p}function I(k){var R=k-g,L=k-b,V=l-R;return C?i(V,m-L):V}function $(k){var R=k-g,L=k-b;return g===void 0||R>=l||R<0||C&&L>=m}function E(){var k=t();if($(k))return P(k);h=setTimeout(E,I(k));}function P(k){return h=void 0,x&&u?w(k):(u=d=void 0,p)}function M(){h!==void 0&&clearTimeout(h),b=0,u=g=d=h=void 0;}function N(){return h===void 0?p:P(t())}function A(){var k=t(),R=$(k);if(u=arguments,d=this,g=k,R){if(h===void 0)return S(g);if(C)return clearTimeout(h),h=setTimeout(E,l),w(g)}return h===void 0&&(h=setTimeout(E,l)),p}return A.cancel=M,A.flush=N,A}return Rh=s,Rh}var uz=QP();const dz=vr(uz);var fz=function(e,t){var n=t.debounceWait,r=t.debounceLeading,o=t.debounceTrailing,i=t.debounceMaxWait,s=f.useRef(void 0),a=f.useMemo(function(){var l={};return r!==void 0&&(l.leading=r),o!==void 0&&(l.trailing=o),i!==void 0&&(l.maxWait=i),l},[r,o,i]);return f.useEffect(function(){if(n){var l=e.runAsync.bind(e);return s.current=dz(function(c){c();},n,a),e.runAsync=function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];return new Promise(function(d,m){var p;(p=s.current)===null||p===void 0||p.call(s,function(){l.apply(void 0,Bn([],pn(c),false)).then(d).catch(m);});})},function(){var c;(c=s.current)===null||c===void 0||c.cancel(),e.runAsync=l;}}},[n,a]),n?{onCancel:function(){var l;(l=s.current)===null||l===void 0||l.cancel();}}:{}},mz=function(e,t){var n=t.loadingDelay,r=t.ready,o=f.useRef(void 0);if(!n)return {};var i=function(){o.current&&clearTimeout(o.current);};return {onBefore:function(){return i(),r!==false&&(o.current=setTimeout(function(){e.setState({loading:true});},n)),{loading:false}},onFinally:function(){i();},onCancel:function(){i();}}},Fu=!!(typeof window<"u"&&window.document&&window.document.createElement);function _y(){return Fu?document.visibilityState!=="hidden":true}var df=new Set;function pz(e){return df.add(e),function(){df.has(e)&&df.delete(e);}}if(Fu){var hz=function(){_y()&&df.forEach(function(e){return e()});};window.addEventListener("visibilitychange",hz,false);}var gz=function(e,t){var n=t.pollingInterval,r=t.pollingWhenHidden,o=r===void 0?true:r,i=t.pollingErrorRetryCount,s=i===void 0?-1:i,a=f.useRef(void 0),l=f.useRef(void 0),c=f.useRef(0),u=function(){var d;a.current&&clearTimeout(a.current),(d=l.current)===null||d===void 0||d.call(l);};return Wi(function(){n||u();},[n]),n?{onBefore:function(){u();},onError:function(){c.current+=1;},onSuccess:function(){c.current=0;},onFinally:function(){s===-1||s!==-1&&c.current<=s?a.current=setTimeout(function(){!o&&!_y()?l.current=pz(function(){e.refresh();}):e.refresh();},n):c.current=0;},onCancel:function(){u();}}:{}};function bz(e,t){var n=false;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];n||(n=true,e.apply(void 0,Bn([],pn(r),false)),setTimeout(function(){n=false;},t));}}var vz=function(){return Fu&&typeof navigator.onLine<"u"?navigator.onLine:true},ff=new Set;function yz(e){return ff.add(e),function(){ff.has(e)&&ff.delete(e);}}if(Fu){var aS=function(){!_y()||!vz()||ff.forEach(function(e){return e()});};window.addEventListener("visibilitychange",aS,false),window.addEventListener("focus",aS,false);}var Cz=function(e,t){var n=t.refreshOnWindowFocus,r=t.focusTimespan,o=r===void 0?5e3:r,i=f.useRef(void 0),s=function(){var a;(a=i.current)===null||a===void 0||a.call(i);};return f.useEffect(function(){if(n){var a=bz(e.refresh.bind(e),o);i.current=yz(function(){a();});}return function(){s();}},[n,o]),ml(function(){s();}),{}},xz=function(e,t){var n=t.retryInterval,r=t.retryCount,o=f.useRef(void 0),i=f.useRef(0),s=f.useRef(false);return r?{onBefore:function(){s.current||(i.current=0),s.current=false,o.current&&clearTimeout(o.current);},onSuccess:function(){i.current=0;},onError:function(){if(i.current+=1,r===-1||i.current<=r){var a=n??Math.min(1e3*Math.pow(2,i.current),3e4);o.current=setTimeout(function(){s.current=true,e.refresh();},a);}else i.current=0;},onCancel:function(){i.current=0,o.current&&clearTimeout(o.current);}}:{}},Ah,lS;function wz(){if(lS)return Ah;lS=1;var e=QP(),t=zy(),n="Expected a function";function r(o,i,s){var a=true,l=true;if(typeof o!="function")throw new TypeError(n);return t(s)&&(a="leading"in s?!!s.leading:a,l="trailing"in s?!!s.trailing:l),e(o,i,{leading:a,maxWait:i,trailing:l})}return Ah=r,Ah}var Sz=wz();const $z=vr(Sz);var Ez=function(e,t){var n=t.throttleWait,r=t.throttleLeading,o=t.throttleTrailing,i=f.useRef(void 0),s={};return r!==void 0&&(s.leading=r),o!==void 0&&(s.trailing=o),f.useEffect(function(){if(n){var a=e.runAsync.bind(e);return i.current=$z(function(l){l();},n,s),e.runAsync=function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return new Promise(function(u,d){var m;(m=i.current)===null||m===void 0||m.call(i,function(){a.apply(void 0,Bn([],pn(l),false)).then(u).catch(d);});})},function(){var l;e.runAsync=a,(l=i.current)===null||l===void 0||l.cancel();}}},[n,r,o]),n?{onCancel:function(){var a;(a=i.current)===null||a===void 0||a.cancel();}}:{}},ir=function(e){f.useEffect(function(){var t=e?.();if(!(t&&typeof t=="object"&&typeof t.then=="function"))return t},[]);},Iz=function(){var e=pn(f.useState({}),2),t=e[1];return f.useCallback(function(){return t({})},[])},Pz=(function(){function e(t,n,r,o){o===void 0&&(o={}),this.serviceRef=t,this.options=n,this.subscribe=r,this.initState=o,this.pluginImpls=[],this.count=0,this.state={loading:false,params:void 0,data:void 0,error:void 0},this.state=lo(lo(lo({},this.state),{loading:!n.manual}),o);}return e.prototype.setState=function(t){t===void 0&&(t={}),this.state=lo(lo({},this.state),t),this.subscribe();},e.prototype.runPluginHandler=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=this.pluginImpls.map(function(i){var s;return (s=i[t])===null||s===void 0?void 0:s.call.apply(s,Bn([i],pn(n),false))}).filter(Boolean);return Object.assign.apply(Object,Bn([{}],pn(o),false))},e.prototype.runAsync=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return qP(this,void 0,void 0,function(){var r,o,i,s,a,l,c,u,d,m,p,h,g,b,y,C,x,w,S,I,$;return UP(this,function(E){switch(E.label){case 0:if(this.count+=1,r=this.count,o=this.runPluginHandler("onBefore",t),i=o.stopNow,s=i===void 0?false:i,a=o.returnNow,l=a===void 0?false:a,c=WP(o,["stopNow","returnNow"]),s)return [2,new Promise(function(){})];if(this.setState(lo({loading:true,params:t},c)),l)return [2,Promise.resolve(c.data)];(g=(h=this.options).onBefore)===null||g===void 0||g.call(h,t),E.label=1;case 1:return E.trys.push([1,3,,4]),u=this.runPluginHandler("onRequest",this.serviceRef.current,t).servicePromise,u||(u=(p=this.serviceRef).current.apply(p,Bn([],pn(t),false))),[4,u];case 2:return d=E.sent(),r!==this.count?[2,new Promise(function(){})]:(this.setState({data:d,error:void 0,loading:false}),(y=(b=this.options).onSuccess)===null||y===void 0||y.call(b,d,t),this.runPluginHandler("onSuccess",d,t),(x=(C=this.options).onFinally)===null||x===void 0||x.call(C,t,d,void 0),r===this.count&&this.runPluginHandler("onFinally",t,d,void 0),[2,d]);case 3:if(m=E.sent(),r!==this.count)return [2,new Promise(function(){})];throw this.setState({error:m,loading:false}),(S=(w=this.options).onError)===null||S===void 0||S.call(w,m,t),this.runPluginHandler("onError",m,t),($=(I=this.options).onFinally)===null||$===void 0||$.call(I,t,void 0,m),r===this.count&&this.runPluginHandler("onFinally",t,void 0,m),m;case 4:return [2]}})})},e.prototype.run=function(){for(var t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];this.runAsync.apply(this,Bn([],pn(n),false)).catch(function(o){t.options.onError||console.error(o);});},e.prototype.cancel=function(){this.count+=1,this.setState({loading:false}),this.runPluginHandler("onCancel");},e.prototype.refresh=function(){this.run.apply(this,Bn([],pn(this.state.params||[]),false));},e.prototype.refreshAsync=function(){return this.runAsync.apply(this,Bn([],pn(this.state.params||[]),false))},e.prototype.mutate=function(t){var n=Dy(t)?t(this.state.data):t;this.runPluginHandler("onMutate",n),this.setState({data:n});},e})();function Nz(e,t,n){t===void 0&&(t={}),n===void 0&&(n=[]);var r=t.manual,o=r===void 0?false:r,i=t.ready,s=i===void 0?true:i,a=WP(t,["manual","ready"]),l=lo({manual:o,ready:s},a),c=Fs(e),u=Iz(),d=Ou(function(){var m=n.map(function(p){var h;return (h=p?.onInit)===null||h===void 0?void 0:h.call(p,l)}).filter(Boolean);return new Pz(c,l,u,Object.assign.apply(Object,Bn([{}],pn(m),false)))},[]);return d.options=l,d.pluginImpls=n.map(function(m){return m(d,l)}),ir(function(){if(!o&&s){var m=d.state.params||t.defaultParams||[];d.run.apply(d,Bn([],pn(m),false));}}),ml(function(){d.cancel();}),{loading:d.state.loading,data:d.state.data,error:d.state.error,params:d.state.params||[],cancel:Ve(d.cancel.bind(d)),refresh:Ve(d.refresh.bind(d)),refreshAsync:Ve(d.refreshAsync.bind(d)),run:Ve(d.run.bind(d)),runAsync:Ve(d.runAsync.bind(d)),mutate:Ve(d.mutate.bind(d))}}function qi(e,t,n){return Nz(e,t,Bn(Bn([],pn([]),false),[fz,mz,gz,Cz,Ez,KP,JD,xz],false))}function ZP(e,t){e===void 0&&(e=false);var n=pn(f.useState(e),2),r=n[0],o=n[1],i=f.useMemo(function(){var s=!e,a=function(){return o(function(d){return d===e?s:e})},l=function(d){return o(d)},c=function(){return o(e)},u=function(){return o(s)};return {toggle:a,set:l,setLeft:c,setRight:u}},[]);return [r,i]}function Mz(e){var t=pn(ZP(false),2),n=t[0],r=t[1],o=r.toggle,i=r.set,s=f.useMemo(function(){var a=function(){return i(true)},l=function(){return i(false)};return {toggle:o,set:function(c){return i(!!c)},setTrue:a,setFalse:l}},[]);return [n,s]}function pl(e,t){if(Fu){if(!e)return t;var n;return Dy(e)?n=e():"current"in e?n=e.current:n=e,n}}var Rz=function(e){return e.every(function(t){var n=pl(t);return n?n.getRootNode()instanceof ShadowRoot:false})},Az=function(e){return e?e.getRootNode():document},Tz=function(e){if(!e||!document.getRootNode)return document;var t=Array.isArray(e)?e:[e];return Rz(t)?Az(pl(t[0])):document},Oz=function(e){var t=function(n,r,o){var i=f.useRef(false),s=f.useRef([]),a=f.useRef([]),l=f.useRef(void 0);e(function(){var c,u=Array.isArray(o)?o:[o],d=u.map(function(m){return pl(m)});if(!i.current){i.current=true,s.current=d,a.current=r,l.current=n();return}(d.length!==s.current.length||!jb(s.current,d)||!jb(a.current,r))&&((c=l.current)===null||c===void 0||c.call(l),s.current=d,a.current=r,l.current=n());}),ml(function(){var c;(c=l.current)===null||c===void 0||c.call(l),i.current=false;});};return t},Hy=Oz(f.useEffect);function Fz(e,t,n){n===void 0&&(n="click");var r=Fs(e);Hy(function(){var o=function(a){var l=Array.isArray(t)?t:[t];l.some(function(c){var u=pl(c);return !u||u.contains(a.target)})||r.current(a);},i=Tz(t),s=Array.isArray(n)?n:[n];return s.forEach(function(a){return i.addEventListener(a,o)}),function(){s.forEach(function(a){return i.removeEventListener(a,o)});}},Array.isArray(n)?n:[n],t);}var mf={exports:{}},Lz=mf.exports,cS;function Bz(){return cS||(cS=1,(function(e,t){(function(n,r){e.exports=r();})(Lz,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",s="second",a="minute",l="hour",c="day",u="week",d="month",m="quarter",p="year",h="date",g="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|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,C={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(R){var L=["th","st","nd","rd"],V=R%100;return "["+R+(L[(V-20)%10]||L[V]||L[0])+"]"}},x=function(R,L,V){var _=String(R);return !_||_.length>=L?R:""+Array(L+1-_.length).join(V)+R},w={s:x,z:function(R){var L=-R.utcOffset(),V=Math.abs(L),_=Math.floor(V/60),z=V%60;return (L<=0?"+":"-")+x(_,2,"0")+":"+x(z,2,"0")},m:function R(L,V){if(L.date()<V.date())return -R(V,L);var _=12*(V.year()-L.year())+(V.month()-L.month()),z=L.clone().add(_,d),D=V-z<0,W=L.clone().add(_+(D?-1:1),d);return +(-(_+(V-z)/(D?z-W:W-z))||0)},a:function(R){return R<0?Math.ceil(R)||0:Math.floor(R)},p:function(R){return {M:d,y:p,w:u,d:c,D:h,h:l,m:a,s,ms:i,Q:m}[R]||String(R||"").toLowerCase().replace(/s$/,"")},u:function(R){return R===void 0}},S="en",I={};I[S]=C;var $="$isDayjsObject",E=function(R){return R instanceof A||!(!R||!R[$])},P=function R(L,V,_){var z;if(!L)return S;if(typeof L=="string"){var D=L.toLowerCase();I[D]&&(z=D),V&&(I[D]=V,z=D);var W=L.split("-");if(!z&&W.length>1)return R(W[0])}else {var O=L.name;I[O]=L,z=O;}return !_&&z&&(S=z),z||!_&&S},M=function(R,L){if(E(R))return R.clone();var V=typeof L=="object"?L:{};return V.date=R,V.args=arguments,new A(V)},N=w;N.l=P,N.i=E,N.w=function(R,L){return M(R,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var A=(function(){function R(V){this.$L=P(V.locale,null,true),this.parse(V),this.$x=this.$x||V.x||{},this[$]=true;}var L=R.prototype;return L.parse=function(V){this.$d=(function(_){var z=_.date,D=_.utc;if(z===null)return new Date(NaN);if(N.u(z))return new Date;if(z instanceof Date)return new Date(z);if(typeof z=="string"&&!/Z$/i.test(z)){var W=z.match(b);if(W){var O=W[2]-1||0,B=(W[7]||"0").substring(0,3);return D?new Date(Date.UTC(W[1],O,W[3]||1,W[4]||0,W[5]||0,W[6]||0,B)):new Date(W[1],O,W[3]||1,W[4]||0,W[5]||0,W[6]||0,B)}}return new Date(z)})(V),this.init();},L.init=function(){var V=this.$d;this.$y=V.getFullYear(),this.$M=V.getMonth(),this.$D=V.getDate(),this.$W=V.getDay(),this.$H=V.getHours(),this.$m=V.getMinutes(),this.$s=V.getSeconds(),this.$ms=V.getMilliseconds();},L.$utils=function(){return N},L.isValid=function(){return this.$d.toString()!==g},L.isSame=function(V,_){var z=M(V);return this.startOf(_)<=z&&z<=this.endOf(_)},L.isAfter=function(V,_){return M(V)<this.startOf(_)},L.isBefore=function(V,_){return this.endOf(_)<M(V)},L.$g=function(V,_,z){return N.u(V)?this[_]:this.set(z,V)},L.unix=function(){return Math.floor(this.valueOf()/1e3)},L.valueOf=function(){return this.$d.getTime()},L.startOf=function(V,_){var z=this,D=!!N.u(_)||_,W=N.p(V),O=function(Q,G){var ee=N.w(z.$u?Date.UTC(z.$y,G,Q):new Date(z.$y,G,Q),z);return D?ee:ee.endOf(c)},B=function(Q,G){return N.w(z.toDate()[Q].apply(z.toDate("s"),(D?[0,0,0,0]:[23,59,59,999]).slice(G)),z)},j=this.$W,Y=this.$M,q=this.$D,U="set"+(this.$u?"UTC":"");switch(W){case p:return D?O(1,0):O(31,11);case d:return D?O(1,Y):O(0,Y+1);case u:var K=this.$locale().weekStart||0,J=(j<K?j+7:j)-K;return O(D?q-J:q+(6-J),Y);case c:case h:return B(U+"Hours",0);case l:return B(U+"Minutes",1);case a:return B(U+"Seconds",2);case s:return B(U+"Milliseconds",3);default:return this.clone()}},L.endOf=function(V){return this.startOf(V,false)},L.$set=function(V,_){var z,D=N.p(V),W="set"+(this.$u?"UTC":""),O=(z={},z[c]=W+"Date",z[h]=W+"Date",z[d]=W+"Month",z[p]=W+"FullYear",z[l]=W+"Hours",z[a]=W+"Minutes",z[s]=W+"Seconds",z[i]=W+"Milliseconds",z)[D],B=D===c?this.$D+(_-this.$W):_;if(D===d||D===p){var j=this.clone().set(h,1);j.$d[O](B),j.init(),this.$d=j.set(h,Math.min(this.$D,j.daysInMonth())).$d;}else O&&this.$d[O](B);return this.init(),this},L.set=function(V,_){return this.clone().$set(V,_)},L.get=function(V){return this[N.p(V)]()},L.add=function(V,_){var z,D=this;V=Number(V);var W=N.p(_),O=function(Y){var q=M(D);return N.w(q.date(q.date()+Math.round(Y*V)),D)};if(W===d)return this.set(d,this.$M+V);if(W===p)return this.set(p,this.$y+V);if(W===c)return O(1);if(W===u)return O(7);var B=(z={},z[a]=r,z[l]=o,z[s]=n,z)[W]||1,j=this.$d.getTime()+V*B;return N.w(j,this)},L.subtract=function(V,_){return this.add(-1*V,_)},L.format=function(V){var _=this,z=this.$locale();if(!this.isValid())return z.invalidDate||g;var D=V||"YYYY-MM-DDTHH:mm:ssZ",W=N.z(this),O=this.$H,B=this.$m,j=this.$M,Y=z.weekdays,q=z.months,U=z.meridiem,K=function(G,ee,re,oe){return G&&(G[ee]||G(_,D))||re[ee].slice(0,oe)},J=function(G){return N.s(O%12||12,G,"0")},Q=U||function(G,ee,re){var oe=G<12?"AM":"PM";return re?oe.toLowerCase():oe};return D.replace(y,function(G,ee){return ee||(function(re){switch(re){case "YY":return String(_.$y).slice(-2);case "YYYY":return N.s(_.$y,4,"0");case "M":return j+1;case "MM":return N.s(j+1,2,"0");case "MMM":return K(z.monthsShort,j,q,3);case "MMMM":return K(q,j);case "D":return _.$D;case "DD":return N.s(_.$D,2,"0");case "d":return String(_.$W);case "dd":return K(z.weekdaysMin,_.$W,Y,2);case "ddd":return K(z.weekdaysShort,_.$W,Y,3);case "dddd":return Y[_.$W];case "H":return String(O);case "HH":return N.s(O,2,"0");case "h":return J(1);case "hh":return J(2);case "a":return Q(O,B,true);case "A":return Q(O,B,false);case "m":return String(B);case "mm":return N.s(B,2,"0");case "s":return String(_.$s);case "ss":return N.s(_.$s,2,"0");case "SSS":return N.s(_.$ms,3,"0");case "Z":return W}return null})(G)||W.replace(":","")})},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},L.diff=function(V,_,z){var D,W=this,O=N.p(_),B=M(V),j=(B.utcOffset()-this.utcOffset())*r,Y=this-B,q=function(){return N.m(W,B)};switch(O){case p:D=q()/12;break;case d:D=q();break;case m:D=q()/3;break;case u:D=(Y-j)/6048e5;break;case c:D=(Y-j)/864e5;break;case l:D=Y/o;break;case a:D=Y/r;break;case s:D=Y/n;break;default:D=Y;}return z?D:N.a(D)},L.daysInMonth=function(){return this.endOf(d).$D},L.$locale=function(){return I[this.$L]},L.locale=function(V,_){if(!V)return this.$L;var z=this.clone(),D=P(V,_,true);return D&&(z.$L=D),z},L.clone=function(){return N.w(this.$d,this)},L.toDate=function(){return new Date(this.valueOf())},L.toJSON=function(){return this.isValid()?this.toISOString():null},L.toISOString=function(){return this.$d.toISOString()},L.toString=function(){return this.$d.toUTCString()},R})(),k=A.prototype;return M.prototype=k,[["$ms",i],["$s",s],["$m",a],["$H",l],["$W",c],["$M",d],["$y",p],["$D",h]].forEach(function(R){k[R[1]]=function(L){return this.$g(L,R[0],R[1])};}),M.extend=function(R,L){return R.$i||(R(L,A,M),R.$i=true),M},M.locale=P,M.isDayjs=E,M.unix=function(R){return M(1e3*R)},M.en=I[S],M.Ls=I,M.p={},M});})(mf)),mf.exports}var kz=Bz();const rn=vr(kz);var Th,uS;function Dz(){if(uS)return Th;uS=1;var e=typeof Element<"u",t=typeof Map=="function",n=typeof Set=="function",r=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function o(i,s){if(i===s)return true;if(i&&s&&typeof i=="object"&&typeof s=="object"){if(i.constructor!==s.constructor)return false;var a,l,c;if(Array.isArray(i)){if(a=i.length,a!=s.length)return false;for(l=a;l--!==0;)if(!o(i[l],s[l]))return false;return true}var u;if(t&&i instanceof Map&&s instanceof Map){if(i.size!==s.size)return false;for(u=i.entries();!(l=u.next()).done;)if(!s.has(l.value[0]))return false;for(u=i.entries();!(l=u.next()).done;)if(!o(l.value[1],s.get(l.value[0])))return false;return true}if(n&&i instanceof Set&&s instanceof Set){if(i.size!==s.size)return false;for(u=i.entries();!(l=u.next()).done;)if(!s.has(l.value[0]))return false;return true}if(r&&ArrayBuffer.isView(i)&&ArrayBuffer.isView(s)){if(a=i.length,a!=s.length)return false;for(l=a;l--!==0;)if(i[l]!==s[l])return false;return true}if(i.constructor===RegExp)return i.source===s.source&&i.flags===s.flags;if(i.valueOf!==Object.prototype.valueOf&&typeof i.valueOf=="function"&&typeof s.valueOf=="function")return i.valueOf()===s.valueOf();if(i.toString!==Object.prototype.toString&&typeof i.toString=="function"&&typeof s.toString=="function")return i.toString()===s.toString();if(c=Object.keys(i),a=c.length,a!==Object.keys(s).length)return false;for(l=a;l--!==0;)if(!Object.prototype.hasOwnProperty.call(s,c[l]))return false;if(e&&i instanceof Element)return false;for(l=a;l--!==0;)if(!((c[l]==="_owner"||c[l]==="__v"||c[l]==="__o")&&i.$$typeof)&&!o(i[c[l]],s[c[l]]))return false;return true}return i!==i&&s!==s}return Th=function(s,a){try{return o(s,a)}catch(l){if((l.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),false;throw l}},Th}var zz=Dz();const _z=vr(zz);var Hz=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),_z(e,t)};function mo(e,t,n){n===void 0&&(n={});var r=n.enable,o=r===void 0?true:r,i=Fs(t);Hy(function(){if(o){var s=pl(n.target,window);if(s?.addEventListener){var a=function(c){return i.current(c)},l=Array.isArray(e)?e:[e];return l.forEach(function(c){s.addEventListener(c,a,{capture:n.capture,once:n.once,passive:n.passive});}),function(){l.forEach(function(c){s.removeEventListener(c,a,{capture:n.capture});});}}}},[e,n.capture,n.once,n.passive,o],n.target);}const Vy=(function(e,t){var n={},r=n.onEnter,o=n.onLeave,i=n.onChange,s=pn(Mz(),2),a=s[0],l=s[1],c=l.setTrue,u=l.setFalse;return mo("mouseenter",function(){r?.(),c(),i?.(true);},{target:e}),mo("mouseleave",function(){o?.(),u(),i?.(false);},{target:e}),a});var Vz=function(e,t,n){var r=f.useRef(void 0),o=f.useRef(0);Hz(t,r.current)||(o.current+=1),r.current=t,Hy(e,[o.current],n);},jz=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<"u"?navigator?.platform:""),JP={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,meta:jz?[91,93]:[91,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},Wb={ctrl:function(e){return e.ctrlKey},shift:function(e){return e.shiftKey},alt:function(e){return e.altKey},meta:function(e){return e.type==="keyup"?JP.meta.includes(e.keyCode):e.metaKey}};function e6(e){return GD(e)||GP(e)}function Wz(e){var t=Object.keys(Wb).reduce(function(n,r){return Wb[r](e)?n+1:n},0);return [16,17,18,91,92].includes(e.keyCode)?t:t+1}function dS(e,t,n){var r,o;if(!e.key)return false;if(GP(t))return e.keyCode===t?t:false;var i=t.split("."),s=0;try{for(var a=Vb(i),l=a.next();!l.done;l=a.next()){var c=l.value,u=Wb[c],d=JP[c.toLowerCase()];(u&&u(e)||d&&d===e.keyCode)&&s++;}}catch(m){r={error:m};}finally{try{l&&!l.done&&(o=a.return)&&o.call(a);}finally{if(r)throw r.error}}return n?s===i.length&&Wz(e)===i.length?t:false:s===i.length?t:false}function qz(e,t){return Dy(e)?e:e6(e)?function(n){return dS(n,e,t)}:Array.isArray(e)?function(n){return e.find(function(r){return dS(n,r,t)})}:function(){return !!e}}var Uz=["keydown"];function qr(e,t,n){var r=n||{},o=r.events,i=o===void 0?Uz:o,s=r.target,a=r.exactMatch,l=a===void 0?false:a,c=r.useCapture,u=c===void 0?false:c,d=Fs(t),m=Fs(e);Vz(function(){var p,h,g,b=pl(s,window);if(b){var y=function(S){var I,$=S,E=qz(m.current,l),P=E($),M=e6(P)?P:$.key;if(P)return (I=d.current)===null||I===void 0?void 0:I.call(d,$,M)};try{for(var C=Vb(i),x=C.next();!x.done;x=C.next()){var w=x.value;(g=b?.addEventListener)===null||g===void 0||g.call(b,w,y,u);}}catch(S){p={error:S};}finally{try{x&&!x.done&&(h=C.return)&&h.call(C);}finally{if(p)throw p.error}}return function(){var S,I,$;try{for(var E=Vb(i),P=E.next();!P.done;P=E.next()){var M=P.value;($=b?.removeEventListener)===null||$===void 0||$.call(b,M,y,u);}}catch(N){S={error:N};}finally{try{P&&!P.done&&(I=E.return)&&I.call(E);}finally{if(S)throw S.error}}}}},[i],s);}function Lu(e){var t=this,n=f.useRef(false);return f.useCallback(function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return qP(t,void 0,void 0,function(){var i,s;return UP(this,function(a){switch(a.label){case 0:if(n.current)return [2];n.current=true,a.label=1;case 1:return a.trys.push([1,3,4,5]),[4,e.apply(void 0,Bn([],pn(r),false))];case 2:return i=a.sent(),[2,i];case 3:throw s=a.sent(),s;case 4:return n.current=false,[7];case 5:return [2]}})})},[e])}function fS(e){var t=f.useRef(0),n=pn(f.useState(e),2),r=n[0],o=n[1],i=f.useCallback(function(s){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){o(s);});},[]);return ml(function(){cancelAnimationFrame(t.current);}),[r,i]}var Gz=function(e,t){return !Object.is(e,t)};function jy(e,t){t===void 0&&(t=Gz);var n=f.useRef(void 0),r=f.useRef(void 0);return t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var t6=function(){var e=f.useRef(false);return f.useEffect(function(){return e.current=false,function(){e.current=true;}},[]),e};const Kz=jP(f.useLayoutEffect),bi=new WeakMap,ms=new WeakMap,Ko=new WeakMap;var Xz={};const _f=Symbol("anyProducer"),mS=Promise.resolve(),Hf=Symbol("listenerAdded"),Vf=Symbol("listenerRemoved");let jf=false,Oh=false;const Wf=e=>typeof e=="string"||typeof e=="symbol"||typeof e=="number";function ma(e){if(!Wf(e))throw new TypeError("`eventName` must be a string, symbol, or number")}function Nd(e){if(typeof e!="function")throw new TypeError("listener must be a function")}function pa(e,t){const n=ms.get(e);if(n.has(t))return n.get(t)}function xc(e,t){const n=Wf(t)?t:_f,r=Ko.get(e);if(r.has(n))return r.get(n)}function Yz(e,t,n){const r=Ko.get(e);if(r.has(t))for(const o of r.get(t))o.enqueue(n);if(r.has(_f)){const o=Promise.all([t,n]);for(const i of r.get(_f))i.enqueue(o);}}function pS(e,t){t=Array.isArray(t)?t:[t];let n=false,r=()=>{},o=[];const i={enqueue(s){o.push(s),r();},finish(){n=true,r();}};for(const s of t){let a=xc(e,s);a||(a=new Set,Ko.get(e).set(s,a)),a.add(i);}return {async next(){return o?o.length===0?n?(o=void 0,this.next()):(await new Promise(s=>{r=s;}),this.next()):{done:false,value:await o.shift()}:{done:true}},async return(s){o=void 0;for(const a of t){const l=xc(e,a);l&&(l.delete(i),l.size===0&&Ko.get(e).delete(a));}return r(),arguments.length>0?{done:true,value:await s}:{done:true}},[Symbol.asyncIterator](){return this}}}function hS(e){if(e===void 0)return gS;if(!Array.isArray(e))throw new TypeError("`methodNames` must be an array of strings");for(const t of e)if(!gS.includes(t))throw typeof t!="string"?new TypeError("`methodNames` element must be a string"):new Error(`${t} is not Emittery method`);return e}const xa=e=>e===Hf||e===Vf;function Md(e,t,n){if(xa(t))try{jf=!0,e.emit(t,n);}finally{jf=false;}}class Or{static mixin(t,n){return n=hS(n),r=>{if(typeof r!="function")throw new TypeError("`target` must be function");for(const s of n)if(r.prototype[s]!==void 0)throw new Error(`The property \`${s}\` already exists on \`target\``);function o(){return Object.defineProperty(this,t,{enumerable:false,value:new Or}),this[t]}Object.defineProperty(r.prototype,t,{enumerable:false,get:o});const i=s=>function(...a){return this[t][s](...a)};for(const s of n)Object.defineProperty(r.prototype,s,{enumerable:false,value:i(s)});return r}}static get isDebugEnabled(){if(typeof Xz!="object")return Oh;const{env:t}=globalThis.process??{env:{}};return t.DEBUG==="emittery"||t.DEBUG==="*"||Oh}static set isDebugEnabled(t){Oh=t;}constructor(t={}){bi.set(this,new Set),ms.set(this,new Map),Ko.set(this,new Map),Ko.get(this).set(_f,new Set),this.debug=t.debug??{},this.debug.enabled===void 0&&(this.debug.enabled=false),this.debug.logger||(this.debug.logger=(n,r,o,i)=>{try{i=JSON.stringify(i);}catch{i=`Object with the following keys failed to stringify: ${Object.keys(i).join(",")}`;}(typeof o=="symbol"||typeof o=="number")&&(o=o.toString());const s=new Date,a=`${s.getHours()}:${s.getMinutes()}:${s.getSeconds()}.${s.getMilliseconds()}`;console.log(`[${a}][emittery:${n}][${r}] Event Name: ${o}
data: ${i}`);});}logIfDebugEnabled(t,n,r){(Or.isDebugEnabled||this.debug.enabled)&&this.debug.logger(t,this.debug.name,n,r);}on(t,n,{signal:r}={}){Nd(n),t=Array.isArray(t)?t:[t];for(const i of t){ma(i);let s=pa(this,i);s||(s=new Set,ms.get(this).set(i,s)),s.add(n),this.logIfDebugEnabled("subscribe",i,void 0),xa(i)||Md(this,Hf,{eventName:i,listener:n});}const o=()=>{this.off(t,n),r?.removeEventListener("abort",o);};return r?.addEventListener("abort",o,{once:true}),r?.aborted&&o(),o}off(t,n){Nd(n),t=Array.isArray(t)?t:[t];for(const r of t){ma(r);const o=pa(this,r);o&&(o.delete(n),o.size===0&&ms.get(this).delete(r)),this.logIfDebugEnabled("unsubscribe",r,void 0),xa(r)||Md(this,Vf,{eventName:r,listener:n});}}once(t,n){if(n!==void 0&&typeof n!="function")throw new TypeError("predicate must be a function");let r;const o=new Promise(i=>{r=this.on(t,s=>{n&&!n(s)||(r(),i(s));});});return o.off=r,o}events(t){t=Array.isArray(t)?t:[t];for(const n of t)ma(n);return pS(this,t)}async emit(t,n){if(ma(t),xa(t)&&!jf)throw new TypeError("`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`");this.logIfDebugEnabled("emit",t,n),Yz(this,t,n);const r=pa(this,t)??new Set,o=bi.get(this),i=[...r],s=xa(t)?[]:[...o];await mS,await Promise.all([...i.map(async a=>{if(r.has(a))return a(n)}),...s.map(async a=>{if(o.has(a))return a(t,n)})]);}async emitSerial(t,n){if(ma(t),xa(t)&&!jf)throw new TypeError("`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`");this.logIfDebugEnabled("emitSerial",t,n);const r=pa(this,t)??new Set,o=bi.get(this),i=[...r],s=[...o];await mS;for(const a of i)r.has(a)&&await a(n);for(const a of s)o.has(a)&&await a(t,n);}onAny(t,{signal:n}={}){Nd(t),this.logIfDebugEnabled("subscribeAny",void 0,void 0),bi.get(this).add(t),Md(this,Hf,{listener:t});const r=()=>{this.offAny(t),n?.removeEventListener("abort",r);};return n?.addEventListener("abort",r,{once:true}),n?.aborted&&r(),r}anyEvent(){return pS(this)}offAny(t){Nd(t),this.logIfDebugEnabled("unsubscribeAny",void 0,void 0),Md(this,Vf,{listener:t}),bi.get(this).delete(t);}clearListeners(t){t=Array.isArray(t)?t:[t];for(const n of t)if(this.logIfDebugEnabled("clear",n,void 0),Wf(n)){const r=pa(this,n);r&&r.clear();const o=xc(this,n);if(o){for(const i of o)i.finish();o.clear();}}else {bi.get(this).clear();for(const[r,o]of ms.get(this).entries())o.clear(),ms.get(this).delete(r);for(const[r,o]of Ko.get(this).entries()){for(const i of o)i.finish();o.clear(),Ko.get(this).delete(r);}}}listenerCount(t){t=Array.isArray(t)?t:[t];let n=0;for(const r of t){if(Wf(r)){n+=bi.get(this).size+(pa(this,r)?.size??0)+(xc(this,r)?.size??0)+(xc(this)?.size??0);continue}r!==void 0&&ma(r),n+=bi.get(this).size;for(const o of ms.get(this).values())n+=o.size;for(const o of Ko.get(this).values())n+=o.size;}return n}bindMethods(t,n){if(typeof t!="object"||t===null)throw new TypeError("`target` must be an object");n=hS(n);for(const r of n){if(t[r]!==void 0)throw new Error(`The property \`${r}\` already exists on \`target\``);Object.defineProperty(t,r,{enumerable:false,value:this[r].bind(this)});}}}const gS=Object.getOwnPropertyNames(Or.prototype).filter(e=>e!=="constructor");Object.defineProperty(Or,"listenerAdded",{value:Hf,writable:false,enumerable:true,configurable:false});Object.defineProperty(Or,"listenerRemoved",{value:Vf,writable:false,enumerable:true,configurable:false});const n6=new Or;class r6{constructor(t){this.insideModal=t;}recSharedEmitter=new Or;servicesRegistry={};recStore=tn({refreshing:false,tabbarView:void 0,sidebarView:void 0})}const Zm=f.createContext(new r6);function Wy(...e){return Ou(()=>new r6(...e),[])}function Zr(){return f.useContext(Zm)}function Qz(){return nt(Zr().recStore)}function jn(){const{recSharedEmitter:e}=Zr();return Lu(t=>e.emit("refresh",t))}var Zz=C3();const Wn=vr(Zz),Fh=()=>rn().format("YYYY-MM-DD");function o6(e){async function t(){const n=Fh();(await GM.listValues()).filter(o=>o.startsWith(`${e}:`)&&o!==`${e}:${n}`).forEach(o=>GM.deleteValue(o));}return t(),{async set(n){t(),await GM.setValue(`${e}:${Fh()}`,n);},get(){return t(),GM.getValue(`${e}:${Fh()}`)}}}const bS={default:"fixed left-50% top-50% z-gate-toast max-w-450px min-w-200px w-[max-content] translate-x--50% translate-y--50% whitespace-pre-wrap rounded-6px bg-gate-primary px-24px py-12px text-14px text-white",singleLine:"text-center"};function zt(e,t=2e3,n=document.body){const r=document.createElement("div");r.textContent=e;const o=!e.includes(`
`)&&!e.includes("<br");r.className=H(zo,bS.default,o&&bS.singleLine),n.appendChild(r),setTimeout(()=>r.remove(),t);}function i6(){return zt(al)}function Jz(e){return e.value}var qy=class s6{static fromConcurrency(t,n=""){if(!isFinite(t))throw new Error("concurrency must be finite");if(!(t>0))throw new Error("concurrency must be greater than 0");const r=new Array(t).fill(0).map((o,i)=>[n,`executors(${t})`,i].map(s=>s&&s.toString().trim()).filter(Boolean).join("."));return new s6(r)}executorRefs;idleState;constructor(t){if(!t.length)throw new Error("executors can not be empty");this.executorRefs=t.map(n=>({value:n})),this.idleState=new WeakMap,this.executorRefs.forEach(n=>this.idleState.set(n,true));}aborted=false;abort(){this.aborted=true,this.pendingResolves=[];}pendingResolves=[];replenish=t=>{this.aborted||this.pendingResolves.length&&this.pendingResolves.shift()?.();};async getExecutorRef(){const t=()=>this.executorRefs.find(r=>this.idleState.get(r));let n=t();for(;!n;){const{promise:r,resolve:o}=Promise.withResolvers();this.pendingResolves.push(o),await r,n=t();}return this.idleState.set(n,false),n}async dispatch(t){const n=await this.getExecutorRef(),r=Jz(n);try{return await t(r)}finally{this.idleState.set(n,true),setTimeout(()=>this.replenish(n));}}};async function Ui(e,t,n){if(!e.length)return [];n=Math.min(n,e.length);const r=qy.fromConcurrency(n,"pmap");try{return await Promise.all(e.map((o,i)=>r.dispatch(()=>t(o,i,e))))}catch(o){throw r.abort(),o}}function Uy(e){const t=qy.fromConcurrency(e,"pLimit");return function(r,...o){return t.dispatch(()=>r(...o))}}var a6=e_;function e_(e,t){const n=qy.fromConcurrency(t,"createLimitedVersionOfFn");return function(...o){return n.dispatch(()=>e(...o))}}function l6(e,t,n,r){let o=e[t];return Qi(e,()=>{const i=e[t];Object.is(o,i)||n(o=i);},r)}const{proxyStateMap:t_,snapCache:n_}=y3(),Rd=e=>t_.has(e);function c6(e){const t=[];let n=0;const r=new Map,o=new WeakMap,i=()=>{const c=n_.get(a),u=c?.[1];if(u&&!o.has(u)){const d=new Map(r);o.set(u,d);}},s=c=>o.get(c)||r;if(e){if(typeof e[Symbol.iterator]!="function")throw new TypeError(`proxyMap:
initial state must be iterable
tip: structure should be [[key, value]]`);for(const[c,u]of e)r.set(c,n),t[n++]=u;}const a={data:t,index:n,epoch:0,get size(){return Rd(this)||i(),s(this).size},get(c){const d=s(this).get(c);if(d===void 0){this.epoch;return}return this.data[d]},has(c){const u=s(this);return this.epoch,u.has(c)},set(c,u){if(!Rd(this))throw new Error("Cannot perform mutations on a snapshot");const d=r.get(c);return d===void 0?(r.set(c,this.index),this.data[this.index++]=u):this.data[d]=u,this.epoch++,this},delete(c){if(!Rd(this))throw new Error("Cannot perform mutations on a snapshot");const u=r.get(c);return u===void 0?false:(delete this.data[u],r.delete(c),this.epoch++,true)},clear(){if(!Rd(this))throw new Error("Cannot perform mutations on a snapshot");this.data.length=0,this.index=0,this.epoch++,r.clear();},forEach(c){this.epoch,s(this).forEach((d,m)=>{c(this.data[d],m,this);});},*entries(){this.epoch;const c=s(this);for(const[u,d]of c)yield [u,this.data[d]];},*keys(){this.epoch;const c=s(this);for(const u of c.keys())yield u;},*values(){this.epoch;const c=s(this);for(const u of c.values())yield this.data[u];},[Symbol.iterator](){return this.entries()},get[Symbol.toStringTag](){return "Map"},toJSON(){return new Map(this.entries())}},l=tn(a);return Object.defineProperties(l,{size:{enumerable:false},index:{enumerable:false},epoch:{enumerable:false},data:{enumerable:false},toJSON:{enumerable:false}}),Object.seal(l),l}const{proxyStateMap:r_,snapCache:o_}=y3(),Ad=e=>typeof e=="object"?tn({x:e}).x:e,Td=e=>r_.has(e);function xn(e){const t=[],n=new Map;let r=0;const o=new WeakMap,i=()=>{const b=o_.get(h),y=b?.[1];if(y&&!o.has(y)){const C=new Map(n);o.set(y,C);}},s=b=>o.get(b)||n;if(e){if(typeof e[Symbol.iterator]!="function")throw new TypeError("not iterable");for(const b of e)if(!n.has(b)){const y=Ad(b);n.set(y,r),t[r++]=y;}}const a=b=>typeof b=="object"&&b!==null&&Symbol.iterator in b,l=b=>typeof b.forEach=="function",c=b=>{if(a(b))return b;if(l(b)){const y=[];return b.forEach(C=>y.push(C)),y}throw new TypeError("Expected an iterable")};function u(b){this.epoch;const y=xn(c(b)),C=xn();for(const x of this.values())y.has(x)&&C.add(x);return xn(C)}function d(b){this.epoch;const y=xn(c(b)),C=xn();for(const x of this.values())C.add(x);for(const x of y.values())C.add(x);return xn(C)}function m(b){this.epoch;const y=xn(c(b)),C=xn();for(const x of this.values())y.has(x)||C.add(x);return xn(C)}function p(b){this.epoch;const y=xn(c(b)),C=xn();for(const x of this.values())y.has(x)||C.add(x);for(const x of y.values())this.has(x)||C.add(x);return xn(C)}const h={data:t,index:r,epoch:0,get size(){return Td(this)||i(),n.size},has(b){const y=s(this),C=Ad(b);return this.epoch,y.has(C)},add(b){if(!Td(this))throw new Error("Cannot perform mutations on a snapshot");const y=Ad(b);return n.has(y)||(n.set(y,this.index),this.data[this.index++]=y,this.epoch++),this},delete(b){if(!Td(this))throw new Error("Cannot perform mutations on a snapshot");const y=Ad(b),C=n.get(y);return C===void 0?false:(delete this.data[C],n.delete(y),this.epoch++,true)},clear(){if(!Td(this))throw new Error("Cannot perform mutations on a snapshot");this.data.length=0,this.index=0,this.epoch++,n.clear();},forEach(b){this.epoch,s(this).forEach(C=>{b(this.data[C],this.data[C],this);});},*values(){this.epoch;const b=s(this);for(const y of b.values())yield this.data[y];},keys(){return this.epoch,this.values()},*entries(){this.epoch;const b=s(this);for(const y of b.values()){const C=this.data[y];yield [C,C];}},toJSON(){return new Set(this.values())},[Symbol.iterator](){return this.values()},get[Symbol.toStringTag](){return "Set"},intersection:u,union:d,difference:m,symmetricDifference:p,isSubsetOf(b){this.epoch;for(const y of this.values())if(!b.has(y))return false;return true},isSupersetOf(b){this.epoch;const y=c(b);for(const C of y)if(!this.has(C))return false;return true},isDisjointFrom(b){this.epoch;for(const y of this.values())if(b.has(y))return false;return true}},g=tn(h);return Object.defineProperties(g,{size:{enumerable:false},data:{enumerable:false},index:{enumerable:false},epoch:{enumerable:false},toJSON:{enumerable:false}}),Object.seal(g),g}const i_=GM_info?.scriptHandler==="Userscripts";function Io(e,t=true){if(e.startsWith("/")&&(e=location.origin+e),i_){GM.openInTab(e,!t);return}GM.openInTab(e,{active:t,insert:true,setParent:true});}function Gy({storageKey:e,onUpdate:t,setPersist:n}){if(typeof GM_addValueChangeListener>"u")return;const r=Uy(1);GM_addValueChangeListener(e,(o,i,s,a)=>{a&&s&&r(async()=>{n(false);try{t(s);}finally{await Promise.resolve().then(()=>{n(true);});}});});}function Ks(e){const t=tn({value:e()});function n(){return nt(t).value}function r(){return t.value}function o(){t.value=e();}const i=_s(o,100,{edges:["leading","trailing"]});return {state:t,use:n,get:r,update:o,updateThrottled:i}}function u6(e,t,n){let r=Va(Qn(e),t);Qi(e,()=>{const o=Qn(e),i=Va(o,t);ei(r,i)||n(o),r=i;});}async function Ky(e,t){async function n(){const o=Object.keys(e);return Va(await GM.getValue(t)||{},o)}const r=tn({...e,...await n()});return setTimeout(()=>{const o=Uy(1);Qi(r,()=>o(async()=>{const i=await n(),s=JT(i,Qn(r));GM.setValue(t,s);}));}),r}async function d6(e){const n=xn(await(async()=>await GM.getValue(e)||[])()),r=s=>{const a=new Set(s);for(const l of [...n,...a])a.has(l)?n.add(l):n.delete(l);};setTimeout(i);let o=true;function i(){Qi(n,()=>{o&&GM.setValue(e,Array.from(Qn(n)));}),Gy({storageKey:e,setPersist:s=>o=s,onUpdate:r});}return {set:n,replaceAllWith:r}}async function f6(e,t){const r=c6(await(async()=>await GM.getValue(e)||[])()),o=a=>{const l=new Map(a);for(const[c,u]of [...r,...l])l.has(c)?r.set(c,u):r.delete(c);};setTimeout(s);let i=true;function s(){Qi(r,()=>{if(!i)return;let a=Array.from(Qn(r));GM.setValue(e,a);}),Gy({storageKey:e,setPersist:a=>i=a,onUpdate:o});}return {map:r,replaceAllWith:o}}function vS(e){return ti(e)||typeof e!="object"?e:v3(e)}function Xy(){const e={};return document.cookie.split(";").map(t=>t.trim()).filter(Boolean).forEach(t=>{const[n,r]=t.split("=").map(o=>o.trim()).filter(Boolean);n&&(e[n]=r);}),e}function Xs(){const e=Xy().bili_jct;if(!e)throw zt("找不到 csrf token, 请检查是否登录"),new Error("找不到 csrf token, 请检查是否登录");return e}function Lr(){return Xy().DedeUserID}function Jm(){return !!Xy().DedeUserID}const qb=Ks(()=>({cookie:document.cookie,logined:Jm()}));function m6(){return qb.update(),qb.state.value.logined}function Yy(){return qb.use().logined}const s_=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 15 15",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"currentColor",d:"M7.5.875A3.626 3.626 0 0 1 11.127 4.5A3.624 3.624 0 0 1 8.5 7.983c1.197.145 2.224.568 2.997 1.33c.981.967 1.478 2.408 1.478 4.288a.475.475 0 0 1-.949 0c0-1.72-.453-2.88-1.196-3.613c-.745-.733-1.856-1.113-3.33-1.113c-1.472 0-2.584.38-3.328 1.113s-1.197 1.893-1.197 3.613a.475.475 0 0 1-.949 0c0-1.88.497-3.32 1.479-4.289c.772-.76 1.799-1.183 2.995-1.328a3.627 3.627 0 0 1 1-7.109m0 .95a2.676 2.676 0 1 0 0 5.35a2.676 2.676 0 0 0 0-5.35"})]}),p6=f.forwardRef(s_),a_=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M17 19.5c0-1.657-2.239-3-5-3s-5 1.343-5 3m14-3c0-1.23-1.234-2.287-3-2.75M3 16.5c0-1.23 1.234-2.287 3-2.75m12-4.014a3 3 0 1 0-4-4.472M6 9.736a3 3 0 0 1 4-4.472m2 8.236a3 3 0 1 1 0-6a3 3 0 0 1 0 6"})]}),l_=f.forwardRef(a_),c_=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 5v14m-7-7h14"})]}),u_=f.forwardRef(c_),h6=p6,g6=l_,Ub=u_;function b6(e){return `https://space.bilibili.com/${Lr()}/fans/follow?tagid=${e}`}function Bu(e){return `https://space.bilibili.com/${e}`}var Lh,yS;function d_(){return yS||(yS=1,Lh=function(t){return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}),Lh}var Bh,CS;function f_(){return CS||(CS=1,Bh=function(t,n){return n?t.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):t}),Bh}var kh,xS;function m_(){if(xS)return kh;xS=1;var e=d_(),t=f_();return kh=function(r,o,i){var s=!e(o);return r&&(s||i===false)?t(r,o):o},kh}var p_=m_();const h_=vr(p_);var Dh,wS;function g_(){return wS||(wS=1,Dh=function(t,n){return function(){return t.apply(n,arguments)}}),Dh}var zh,SS;function ku(){if(SS)return zh;SS=1;var e=g_(),t=Object.prototype.toString,n=(function(O){return function(B){var j=t.call(B);return O[j]||(O[j]=j.slice(8,-1).toLowerCase())}})(Object.create(null));function r(O){return O=O.toLowerCase(),function(j){return n(j)===O}}function o(O){return Array.isArray(O)}function i(O){return typeof O>"u"}function s(O){return O!==null&&!i(O)&&O.constructor!==null&&!i(O.constructor)&&typeof O.constructor.isBuffer=="function"&&O.constructor.isBuffer(O)}var a=r("ArrayBuffer");function l(O){var B;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?B=ArrayBuffer.isView(O):B=O&&O.buffer&&a(O.buffer),B}function c(O){return typeof O=="string"}function u(O){return typeof O=="number"}function d(O){return O!==null&&typeof O=="object"}function m(O){if(n(O)!=="object")return false;var B=Object.getPrototypeOf(O);return B===null||B===Object.prototype}function p(O){return O&&Object.keys(O).length===0&&Object.getPrototypeOf(O)===Object.prototype}var h=r("Date"),g=r("File"),b=r("Blob"),y=r("FileList");function C(O){return t.call(O)==="[object Function]"}function x(O){return d(O)&&C(O.pipe)}function w(O){var B="[object FormData]";return O&&(typeof FormData=="function"&&O instanceof FormData||t.call(O)===B||C(O.toString)&&O.toString()===B)}var S=r("URLSearchParams");function I(O){return O.trim?O.trim():O.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function $(){var O;return typeof navigator<"u"&&((O=navigator.product)==="ReactNative"||O==="NativeScript"||O==="NS")?false:typeof window<"u"&&typeof document<"u"}function E(O,B){if(!(O===null||typeof O>"u"))if(typeof O!="object"&&(O=[O]),o(O))for(var j=0,Y=O.length;j<Y;j++)B.call(null,O[j],j,O);else for(var q in O)Object.prototype.hasOwnProperty.call(O,q)&&B.call(null,O[q],q,O);}function P(){var O={};function B(q,U){m(O[U])&&m(q)?O[U]=P(O[U],q):m(q)?O[U]=P({},q):o(q)?O[U]=q.slice():O[U]=q;}for(var j=0,Y=arguments.length;j<Y;j++)E(arguments[j],B);return O}function M(O,B,j){return E(B,function(q,U){j&&typeof q=="function"?O[U]=e(q,j):O[U]=q;}),O}function N(O){return O.charCodeAt(0)===65279&&(O=O.slice(1)),O}function A(O,B,j,Y){O.prototype=Object.create(B.prototype,Y),O.prototype.constructor=O,j&&Object.assign(O.prototype,j);}function k(O,B,j,Y){var q,U,K,J={};if(B=B||{},O==null)return B;do{for(q=Object.getOwnPropertyNames(O),U=q.length;U-- >0;)K=q[U],(!Y||Y(K,O,B))&&!J[K]&&(B[K]=O[K],J[K]=true);O=j!==false&&Object.getPrototypeOf(O);}while(O&&(!j||j(O,B))&&O!==Object.prototype);return B}function R(O,B,j){O=String(O),(j===void 0||j>O.length)&&(j=O.length),j-=B.length;var Y=O.indexOf(B,j);return Y!==-1&&Y===j}function L(O){if(!O)return null;if(o(O))return O;var B=O.length;if(!u(B))return null;for(var j=new Array(B);B-- >0;)j[B]=O[B];return j}var V=(function(O){return function(B){return O&&B instanceof O}})(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array));function _(O,B){for(var j=O&&O[Symbol.iterator],Y=j.call(O),q;(q=Y.next())&&!q.done;){var U=q.value;B.call(O,U[0],U[1]);}}function z(O,B){for(var j,Y=[];(j=O.exec(B))!==null;)Y.push(j);return Y}var D=r("HTMLFormElement"),W=(function(B){return function(j,Y){return B.call(j,Y)}})(Object.prototype.hasOwnProperty);return zh={isArray:o,isArrayBuffer:a,isBuffer:s,isFormData:w,isArrayBufferView:l,isString:c,isNumber:u,isObject:d,isPlainObject:m,isEmptyObject:p,isUndefined:i,isDate:h,isFile:g,isBlob:b,isFunction:C,isStream:x,isURLSearchParams:S,isStandardBrowserEnv:$,forEach:E,merge:P,extend:M,trim:I,stripBOM:N,inherits:A,toFlatObject:k,kindOf:n,kindOfTest:r,endsWith:R,toArray:L,isTypedArray:V,isFileList:y,forEachEntry:_,matchAll:z,isHTMLForm:D,hasOwnProperty:W},zh}var _h,$S;function v6(){if($S)return _h;$S=1;var e=ku();function t(o,i,s,a,l){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=o,this.name="AxiosError",i&&(this.code=i),s&&(this.config=s),a&&(this.request=a),l&&(this.response=l);}e.inherits(t,Error,{toJSON:function(){return {message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var n=t.prototype,r={};return ["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(function(o){r[o]={value:o};}),Object.defineProperties(t,r),Object.defineProperty(n,"isAxiosError",{value:true}),t.from=function(o,i,s,a,l,c){var u=Object.create(n);return e.toFlatObject(o,u,function(m){return m!==Error.prototype}),t.call(u,o.message,i,s,a,l),u.cause=o,u.name=o.name,c&&Object.assign(u,c),u},_h=t,_h}var Hh,ES;function b_(){if(ES)return Hh;ES=1;var e=v6();return Hh=function(n,r,o){var i=o.config.validateStatus;!o.status||!i||i(o.status)?n(o):r(new e("Request failed with status code "+o.status,[e.ERR_BAD_REQUEST,e.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o));},Hh}var v_=b_();const y_=vr(v_);var Vh,IS;function C_(){return IS||(IS=1,Vh=typeof self=="object"?self.FormData:window.FormData),Vh}var jh,PS;function x_(){return PS||(PS=1,jh=C_()),jh}var Wh,NS;function w_(){if(NS)return Wh;NS=1;var e=ku(),t=v6(),n=x_();function r(u){return e.isPlainObject(u)||e.isArray(u)}function o(u){return e.endsWith(u,"[]")?u.slice(0,-2):u}function i(u,d,m){return u?u.concat(d).map(function(h,g){return h=o(h),!m&&g?"["+h+"]":h}).join(m?".":""):d}function s(u){return e.isArray(u)&&!u.some(r)}var a=e.toFlatObject(e,{},null,function(d){return /^is[A-Z]/.test(d)});function l(u){return u&&e.isFunction(u.append)&&u[Symbol.toStringTag]==="FormData"&&u[Symbol.iterator]}function c(u,d,m){if(!e.isObject(u))throw new TypeError("target must be an object");d=d||new(n||FormData),m=e.toFlatObject(m,{metaTokens:true,dots:false,indexes:false},false,function(P,M){return !e.isUndefined(M[P])});var p=m.metaTokens,h=m.visitor||w,g=m.dots,b=m.indexes,y=m.Blob||typeof Blob<"u"&&Blob,C=y&&l(d);if(!e.isFunction(h))throw new TypeError("visitor must be a function");function x(E){if(E===null)return "";if(e.isDate(E))return E.toISOString();if(!C&&e.isBlob(E))throw new t("Blob is not supported. Use a Buffer instead.");return e.isArrayBuffer(E)||e.isTypedArray(E)?C&&typeof Blob=="function"?new Blob([E]):Buffer.from(E):E}function w(E,P,M){var N=E;if(E&&!M&&typeof E=="object"){if(e.endsWith(P,"{}"))P=p?P:P.slice(0,-2),E=JSON.stringify(E);else if(e.isArray(E)&&s(E)||e.isFileList(E)||e.endsWith(P,"[]")&&(N=e.toArray(E)))return P=o(P),N.forEach(function(k,R){!(e.isUndefined(k)||k===null)&&d.append(b===true?i([P],R,g):b===null?P:P+"[]",x(k));}),false}return r(E)?true:(d.append(i(M,P,g),x(E)),false)}var S=[],I=Object.assign(a,{defaultVisitor:w,convertValue:x,isVisitable:r});function $(E,P){if(!e.isUndefined(E)){if(S.indexOf(E)!==-1)throw Error("Circular reference detected in "+P.join("."));S.push(E),e.forEach(E,function(N,A){var k=!(e.isUndefined(N)||N===null)&&h.call(d,N,e.isString(A)?A.trim():A,P,I);k===true&&$(N,P?P.concat(A):[A]);}),S.pop();}}if(!e.isObject(u))throw new TypeError("data must be an object");return $(u),d}return Wh=c,Wh}var qh,MS;function S_(){if(MS)return qh;MS=1;var e=w_();function t(o){var i={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(o).replace(/[!'\(\)~]|%20|%00/g,function(a){return i[a]})}function n(o,i){this._pairs=[],o&&e(o,this,i);}var r=n.prototype;return r.append=function(i,s){this._pairs.push([i,s]);},r.toString=function(i){var s=i?function(a){return i.call(this,a,t)}:t;return this._pairs.map(function(l){return s(l[0])+"="+s(l[1])},"").join("&")},qh=n,qh}var Uh,RS;function $_(){if(RS)return Uh;RS=1;var e=ku(),t=S_();function n(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}return Uh=function(o,i,s){if(!i)return o;var a=o.indexOf("#");a!==-1&&(o=o.slice(0,a));var l=s&&s.encode||n,c=s&&s.serialize,u;return c?u=c(i,s):u=e.isURLSearchParams(i)?i.toString():new t(i,s).toString(l),u&&(o+=(o.indexOf("?")===-1?"?":"&")+u),o},Uh}var E_=$_();const I_=vr(E_);var Gh,AS;function P_(){if(AS)return Gh;AS=1;var e=ku(),t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Gh=function(r){var o={},i,s,a;return r&&e.forEach(r.split(`
`),function(c){if(a=c.indexOf(":"),i=e.trim(c.slice(0,a)).toLowerCase(),s=e.trim(c.slice(a+1)),i){if(o[i]&&t.indexOf(i)>=0)return;i==="set-cookie"?o[i]=(o[i]?o[i]:[]).concat([s]):o[i]=o[i]?o[i]+", "+s:s;}}),o},Gh}var N_=P_();const M_=vr(N_);var R_=ku();const TS=vr(R_);function A_(e){return new Promise((t,n)=>{let r=e.data;const o=e.headers??{};if(TS.isFormData(r)&&delete o["Content-Type"],e.auth){const u=e.auth.username||"",d=e.auth.password||"";o.Authorization="Basic "+Buffer.from(u+":"+d).toString("base64");}const i=function(){n(new L0.AxiosError("Network Error",L0.AxiosError.ERR_NETWORK,e));},s=function(){n(new L0.AxiosError("timeout of "+e.timeout+"ms exceeded",L0.AxiosError.ECONNABORTED,e));};TS.forEach(o,function(d,m){typeof r>"u"&&m.toLowerCase()==="content-type"&&delete o[m];}),r===void 0&&(r=null);const a=function(d){const m="responseHeaders"in d?M_(d.responseHeaders):{},h={data:!e.responseType||e.responseType==="text"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:m,config:e,request:{responseURL:d.finalUrl,status:d.status,statusText:d.statusText,responseXML:null}};y_(t,n,h);};e.cancelToken&&e.cancelToken.promise.then(function(d){n(d);});let l;e.responseType&&e.responseType!=="json"&&(l=e.responseType);const c=e.method.toUpperCase();c==="UNLINK"||c==="PURGE"||c==="LINK"?n(new L0.AxiosError(`${c} is not a supported method by GM.xmlHttpRequest`)):GM.xmlHttpRequest({method:c,url:I_(h_(e.baseURL,e.url),e.params,e.paramsSerializer),headers:Object.fromEntries(Object.entries(o).map(([u,d])=>[u,d.toString()])),responseType:l,data:r,timeout:e.timeout,ontimeout:s,onload:a,onerror:i});})}const T_=(e,t,n,r)=>{if(n==="length"||n==="prototype"||n==="arguments"||n==="caller")return;const o=Object.getOwnPropertyDescriptor(e,n),i=Object.getOwnPropertyDescriptor(t,n);!O_(o,i)&&r||Object.defineProperty(e,n,i);},O_=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},F_=(e,t)=>{const n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n);},L_=(e,t)=>`/* Wrapped ${e}*/
${t}`,B_=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),k_=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),D_=(e,t,n)=>{const r=n===""?"":`with ${n.trim()}() `,o=L_.bind(null,r,t.toString());Object.defineProperty(o,"name",k_);const{writable:i,enumerable:s,configurable:a}=B_;Object.defineProperty(e,"toString",{value:o,writable:i,enumerable:s,configurable:a});};function z_(e,t,{ignoreNonConfigurable:n=false}={}){const{name:r}=e;for(const o of Reflect.ownKeys(t))T_(e,t,o,n);return F_(e,t),D_(e,t,r),e}const __=new WeakMap;function Qy(e,t){const n=([a])=>a,{cacheKey:r=n,cache:o=new Map}=t??{},i=new Map,s=function(...a){const l=r(a);if(i.has(l))return i.get(l);const c=(async()=>{try{if(o&&await o.has(l))return await o.get(l);const d=await e.apply(this,a);try{return d}finally{o&&(!t?.shouldCache||await t.shouldCache(d,{key:l,argumentsList:a}))&&await o.set(l,d);}}finally{i.delete(l);}})();return i.set(l,c),c};return z_(s,e,{ignoreNonConfigurable:true}),__.set(s,o),s}function ci(e,t){return t??=(...n)=>JSON.stringify(n),Qy(e,{cache:false,cacheKey(n){return t(...n)}})}async function ep(e){const{img_key:t,sub_key:n}=await H_(),r=W_(t+n),o=Math.round(Date.now()/1e3),i={...e,wts:o},s=/[!'()*]/g,a=Object.keys(i).sort().map(c=>`${encodeURIComponent(c)}=${encodeURIComponent(i[c].toString().replaceAll(s,""))}`).join("&"),l=sparkMd5.hash(a+r);return {...i,wts:o,w_rid:l}}const y6=o6("wbi-keys"),H_=ci(async function(){const e=await y6.get();return e?.val&&e?.ts&&Date.now()-e.ts<=Wn("6h")?e.val:V_()});async function V_(){const t=(await L0.get("/x/web-interface/nav",{baseURL:x3})).data,n=t.data.wbi_img.img_url,r=t.data.wbi_img.sub_url,o={img_key:n.slice(n.lastIndexOf("/")+1,n.lastIndexOf(".")),sub_key:r.slice(r.lastIndexOf("/")+1,r.lastIndexOf("."))};return await y6.set({val:o,ts:Date.now()}),o}const j_=[46,47,18,2,53,8,23,32,15,50,10,31,58,3,45,35,27,43,5,49,33,9,42,19,29,28,14,39,12,38,41,13,37,48,7,16,24,55,40,61,26,17,0,1,60,51,30,4,22,25,54,21,56,59,6,63,57,62,11,36,20,34,44,52];function W_(e){return j_.map(t=>e[t]).join("").slice(0,32)}function C6(e,t,n){e.appkey=t;const r=new URLSearchParams(e);return r.sort(),sparkMd5.hash(r.toString()+n)}const Tt=L0.create({baseURL:x3,withCredentials:true});Tt.interceptors.request.use(async function(e){return e.params||={},e.url?.includes("/wbi/")&&!(e.params.w_rid||e.params.wts)&&(e.params=await ep(e.params)),e});function cn(e){return e?.code===0&&(e?.message==="0"||e?.message==="success"||e?.message==="OK")}const tp=L0.create({adapter:A_});tp.interceptors.request.use(function(e){if(!e.params?.sign){const{appkey:t,appsec:n}=Lc;e.params={appkey:t,access_key:Ue.accessKey||"",...a3(e.params,["sign"])},e.params.sign=C6(e.params,t,n);}return e});tp.interceptors.response.use(e=>{if(e.config.responseType==="json"&&e.data&&e.data instanceof ArrayBuffer){Yr("response data is ArrayBuffer");const t=new TextDecoder,n=new Uint8Array(e.data),r=t.decode(n);e.data=r;try{e.data=JSON.parse(r);}catch{}}return e});const x6=o6("w_webid"),w6=ci(async()=>{const e=await x6.get();return e||q_()});async function q_(){const e=Lr();if(!e)return;const t=Bu(e),r=(await Tt.get(t,{responseType:"text",withCredentials:true})).data,i=new DOMParser().parseFromString(r,"text/html"),s=decodeURIComponent(i.getElementById("__RENDER_DATA__")?.textContent?.trim()||"");if(!s)return;const a=JSON.parse(s)?.access_id;return a&&await x6.set(a),a}async function S6({removeEmpty:e=true}={}){const t=await ep({web_location:"0.0",w_webid:await w6()||""}),o=(await Tt.get("/x/relation/tags",{params:t})).data.data||[];return e?o.filter(i=>!!i.count):o}async function Gb(e){const n=async a=>(await Tt.get("/x/relation/tag",{params:{mid:Lr(),tagid:e,pn:a,ps:20}})).data.data||[];let r=1,o=[],i=[];do i=await n(r++),o=o.concat(i);while(i.length>0);return D0(o.map(a=>a.mid))}const OS=Hn.extend("utility:dom"),$6=10*1e3,E6=200;async function hl(e,t){const n=t?.interval??E6;let r=t?.timeout??$6;r===0&&(r=1/0);const o=t?.validate??(a=>!ti(a)),i=performance.now();let s=e();for(;!o(s)&&performance.now()-i<r;)await _t(n),s=e();return s}async function np(e,t,n){const r=n?.pollTimeout??$6,o=n?.pollInterval??E6,i=n?.selectorPredicate,s=n?.warnOnTimeout??false,a=await hl(()=>{let l=Array.from(document.querySelectorAll(e));if(i&&(l=l.filter(i)),l.length)return l},{timeout:r,interval:o});if(!a?.length){OS("tryAction: timeout for selector = `%s`",e),s&&Yr("tryAction timeout, selector = `%s`",e);return}OS("tryAction: selector=`%s` count=%s",e,a.length);for(const l of a)await Promise.resolve(t(l));}async function La(e,t,n){return np(e,r=>r.remove(),{selectorPredicate:t,warnOnTimeout:false})}function ui(){const e=document.activeElement?.tagName?.toLowerCase()??"";return !!(["input","textarea"].includes(e)||document.querySelector(".center-search__bar.is-focus"))}function U_(e,t){t??=e.getBoundingClientRect();const n=document.documentElement;return {top:t.top+window.scrollY-n.clientTop,left:t.left+window.scrollX-n.clientLeft}}function rp(e){return new Promise(t=>{typeof requestIdleCallback=="function"?requestIdleCallback(()=>t(),e):setTimeout(t);})}let Kh="";function Zy(e){Kh||(Kh=document.title),document.title=`${e} - ${Kh}`;}async function G_(){return (await Tt.get("/x/polymer/web-dynamic/v1/portal")).data?.data?.up_list||[]}var jr=(e=>(e.Mid="dyn-mid",e.SearchTextFull="dyn-search-text",e.SearchTextShort="dyn-search",e.Offset="dyn-offset",e.MinId="dyn-min-id",e.MinTs="dyn-min-ts",e))(jr||{});const Ls=new URLSearchParams(location.search),Ji=Ls.get("dyn-mid")?.trim(),K_=Ls.get("dyn-offset")||void 0,I6=Ji&&(Ls.get("dyn-search-text")||Ls.get("dyn-search"))||void 0,Kb=Ji?Ls.get("dyn-min-id"):void 0,FS=Kb?Ls.get("dyn-min-ts"):void 0,Qc=_o&&!!Ji;let Xb,P6;Qc&&(Xb=Ji,P6=Ls.get("dyn-name")??Xb?.toString()??void 0);var Po=(e=>(e.All="all",e.UploadOnly="upload-only",e.DynamicOnly="dynamic-only",e))(Po||{}),Mo=(e=>(e.Upload="投稿视频",e.Dynamic="动态视频",e.ChargeOnly="充电专属",e))(Mo||{});const X_={all:"全部","upload-only":"仅投稿视频","dynamic-only":"仅动态视频"};var $s=(e=>(e.All="all",e._5m="5min",e._2m="2min",e._1m="1min",e._30s="30s",e._10s="10s",e))($s||{});const N6={all:{label:"全部时长",duration:0},"5min":{label:"5分钟",duration:300},"2min":{label:"2分钟",duration:120},"1min":{label:"1分钟",duration:60},"30s":{label:"30秒",duration:30},"10s":{label:"10秒",duration:10}},Zc="all",Xa="up:",Bs="group:",Y_=(await( d6("dynamic-feed:hide-charge-only-videos-for-keys"))).set,Q_=(await( f6("dynamic-feed:add-separators"))).map,At=M6();function M6(){return tn({upMid:Xb,upName:P6,upFace:void 0,upList:[],upListUpdatedAt:0,groups:[],groupsUpdatedAt:0,selectedGroupId:void 0,get selectedGroup(){if(typeof this.selectedGroupId=="number")return this.groups.find(e=>e.tagid===this.selectedGroupId)},dynamicFeedVideoType:"all",searchText:I6??void 0,get viewingAll(){return this.selectedKey===Zc},get viewingSomeUp(){return !!this.upMid},get viewingSomeGroup(){return typeof this.selectedGroupId=="number"},get selectedKey(){return this.upMid?`${Xa}${this.upMid}`:this.selectedGroup?`${Bs}${this.selectedGroup.tagid}`:Zc},hideChargeOnlyVideosForKeysSet:Y_,get hideChargeOnlyVideos(){return this.hideChargeOnlyVideosForKeysSet.has(this.selectedKey)},addSeparatorsMap:Q_,get addSeparators(){return this.addSeparatorsMap.get("global")??false},filterMinDuration:"all",get filterMinDurationValue(){return N6[this.filterMinDuration].duration},updateUpList:R6,updateGroups:A6})}tn({followGroupInfo:{}});async function R6(e=false){if(!e&&At.upList.length&&At.upListUpdatedAt&&At.upListUpdatedAt-Date.now()<Wn("5min"))return;const n=await G_();At.upList=n,At.upListUpdatedAt=Date.now();}async function A6(e=false){{const{followGroup:n,whenViewAll:r}=Ue.dynamicFeed;if(!(n.enabled||!!r.hideIds.filter(i=>i.startsWith(Bs)).length))return}!e&&At.groups.length&&At.groupsUpdatedAt&&At.groupsUpdatedAt-Date.now()<Wn("1h")||(At.groups=await S6({removeEmpty:true}),At.groupsUpdatedAt=Date.now());}function T6(){if(Lr())return Promise.all([R6(),A6()])}(async()=>_o&&(await _t(5e3),(!At.upList.length||!At.groups.length)&&(await rp(),T6())))();Ji&&u6(At,["upName","searchText","selectedGroup","viewingSomeUp","viewingAll"],({upName:e,searchText:t,selectedGroup:n,viewingSomeUp:r,viewingAll:o})=>{let i=o?"动态":r?`「${e}」的动态`:`「${n?.name}」分组动态`;t&&(i=`🔍【${t}】 - ${i}`),Zy(i);});function qf(e){return ["small","middle","large"].includes(e)}function LS(e){return e?typeof e=="number"&&!Number.isNaN(e):false}const Gi=(e,t,n)=>H({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:n}),gl=(e,t)=>t||e;function Z_(e,t,n,r){const{focusElCls:o,focus:i,borderElCls:s}=n,a=s?"> *":"",l=["hover",i?"focus":null,"active"].filter(Boolean).map(c=>`&:${c} ${a}`).join(",");return {[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":{[l]:{zIndex:3},...o?{[`&${o}`]:{zIndex:3}}:{},[`&[disabled] ${a}`]:{zIndex:0}}}}function J_(e,t,n){const{borderElCls:r}=n,o=r?`> ${r}`:"";return {[`&-item:not(${t}-first-item):not(${t}-last-item) ${o}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function bl(e,t={focus:true}){const{componentCls:n}=e,{componentCls:r}=t,o=r||n,i=`${o}-compact`;return {[i]:{...Z_(e,i,t,o),...J_(o,i,t)}}}const e7=e=>{const{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:o,paddingXS:i,fontSizeLG:s,fontSizeSM:a,borderRadiusLG:l,borderRadiusSM:c,colorBgContainerDisabled:u,lineWidth:d}=e;return {[t]:[{display:"inline-flex",alignItems:"center",gap:0,paddingInline:r,margin:0,borderWidth:d,borderStyle:"solid",borderRadius:n,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:s,borderRadius:l},"&-small":{paddingInline:i,borderRadius:c,fontSize:a},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0},"&-compact-item:not(:first-child)":{borderInlineStartWidth:0}},{"--space-addon-border-color":o,"--space-addon-background":u,"--space-addon-border-color-outlined":o,"--space-addon-background-filled":u,borderColor:"var(--space-addon-border-color)",background:"var(--space-addon-background)","&-variant-outlined":{"--space-addon-border-color":"var(--space-addon-border-color-outlined)"},"&-variant-filled":{"--space-addon-border-color":"transparent","--space-addon-background":"var(--space-addon-background-filled)",[`&${t}-disabled`]:{"--space-addon-border-color":o,"--space-addon-background":u}},"&-variant-borderless":{border:"none",background:"transparent"},"&-variant-underlined":{border:"none",background:"transparent"}},{"&-status-error":{"--space-addon-border-color-outlined":e.colorError,"--space-addon-background-filled":e.colorErrorBg,color:e.colorError},"&-status-warning":{"--space-addon-border-color-outlined":e.colorWarning,"--space-addon-background-filled":e.colorWarningBg,color:e.colorWarning}}]}},t7=xt(["Space","Addon"],e=>[e7(e),bl(e,{focus:false})]),O6=f.forwardRef((e,t)=>{const{className:n,children:r,style:o,prefixCls:i,variant:s="outlined",disabled:a,status:l,...c}=e,{getPrefixCls:u,direction:d}=f.useContext(ot),m=u("space-addon",i),[p,h]=t7(m),{compactItemClassnames:g,compactSize:b}=li(m,d),y=Gi(m,l),C=H(m,p,g,h,`${m}-variant-${s}`,y,{[`${m}-${b}`]:b,[`${m}-disabled`]:a},n);return f.createElement("div",{ref:t,className:C,style:o,...c},r)}),F6=f.createContext({latestIndex:0}),n7=F6.Provider,r7=e=>{const{className:t,prefix:n,index:r,children:o,separator:i,style:s,classNames:a,styles:l}=e,{latestIndex:c}=f__namespace.useContext(F6);return kn(o)?f__namespace.createElement(f__namespace.Fragment,null,f__namespace.createElement("div",{className:t,style:s},o),r<c&&i&&f__namespace.createElement("span",{className:H(`${n}-item-separator`,a.separator),style:l.separator},i)):null},o7=e=>{const{componentCls:t,antCls:n}=e;return {[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},i7=e=>{const{componentCls:t}=e;return {[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},s7=xt("Space",e=>{const t=vt(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return [o7(t),i7(t)]},()=>({}),{resetStyle:false}),a7=f__namespace.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r,size:o,className:i,style:s,classNames:a,styles:l}=St("space"),{size:c=o??"small",align:u,className:d,rootClassName:m,children:p,direction:h,orientation:g,prefixCls:b,split:y,separator:C,style:x,vertical:w,wrap:S=false,classNames:I,styles:$,...E}=e,[P,M]=Array.isArray(c)?c:[c,c],N=qf(M),A=qf(P),k=LS(M),R=LS(P),L=gr(p,{keepEmpty:true}),[V,_]=qs(g,w,h),z=u===void 0&&!_?"center":u,D=C??y,W=n("space",b),[O,B]=s7(W),j={...e,size:c,orientation:V,align:z},[Y,q]=It([a,I],[l,$],{props:j}),U=H(W,i,O,`${W}-${V}`,{[`${W}-rtl`]:r==="rtl",[`${W}-align-${z}`]:z,[`${W}-gap-row-${M}`]:N,[`${W}-gap-col-${P}`]:A},d,m,B,Y.root),K=H(`${W}-item`,Y.item),J=L.map((ee,re)=>{const oe=ee?.key||`${K}-${re}`;return f__namespace.createElement(r7,{prefix:W,classNames:Y,styles:q,className:K,key:oe,index:re,separator:D,style:q.item},ee)}),Q=f__namespace.useMemo(()=>({latestIndex:L.reduce((re,oe,be)=>kn(oe)?be:re,0)}),[L]);if(L.length===0)return null;const G={};return S&&(G.flexWrap="wrap"),!A&&R&&(G.columnGap=P),!N&&k&&(G.rowGap=M),f__namespace.createElement("div",{ref:t,className:U,style:{...G,...q.root,...s,...x},...E},f__namespace.createElement(n7,{value:Q},J))}),Fr=a7;Fr.Compact=Ey;Fr.Addon=O6;const L6=f__namespace.createContext(void 0),l7=e=>{const{getPrefixCls:t,direction:n}=f__namespace.useContext(ot),{prefixCls:r,size:o,className:i,...s}=e,a=t("btn-group",r),[,,l]=Tn(),c=f__namespace.useMemo(()=>{switch(o){case "large":return "lg";case "small":return "sm";default:return ""}},[o]),u=H(a,{[`${a}-${c}`]:c,[`${a}-rtl`]:n==="rtl"},i,l);return f__namespace.createElement(L6.Provider,{value:o},f__namespace.createElement("div",{...s,className:u}))},BS=/^[\u4E00-\u9FA5]{2}$/,Yb=BS.test.bind(BS);function Jy(e){return e==="danger"?{danger:true}:{type:e}}function kS(e){return typeof e=="string"}function Xh(e){return e==="text"||e==="link"}function c7(e,t,n,r){if(!kn(e)||e==="")return;const o=t?" ":"";return typeof e!="string"&&typeof e!="number"&&kS(e.type)&&Yb(e.props.children)?Rn(e,i=>({...i,children:i.children.split("").join(o),className:r,style:n})):kS(e)?f.createElement("span",{className:r,style:n},Yb(e)?e.split("").join(o):e):tP(e)?f.createElement("span",{className:r,style:n},e):Rn(e,i=>({...i,className:H(i.className,r)||void 0,style:{...i.style,...n}}))}function u7(e,t,n,r){let o=false;const i=[];return f.Children.forEach(e,s=>{const a=typeof s,l=a==="string"||a==="number";if(o&&l){const c=i.length-1,u=i[c];i[c]=`${u}${s}`;}else i.push(s);o=l;}),f.Children.map(i,s=>c7(s,t,n,r))}["default","primary","danger"].concat(Et(_i));var d7={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};function Qb(){return Qb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Qb.apply(this,arguments)}const f7=(e,t)=>f__namespace.createElement(on,Qb({},e,{ref:t,icon:d7})),op=f__namespace.forwardRef(f7),B6=f.forwardRef((e,t)=>{const{className:n,style:r,children:o,prefixCls:i}=e,s=H(`${i}-icon`,n);return f.createElement("span",{ref:t,className:s,style:r},o)}),DS=f.forwardRef((e,t)=>{const{prefixCls:n,className:r,style:o,iconClassName:i}=e,s=H(`${n}-loading-icon`,r);return f.createElement(B6,{prefixCls:n,className:s,style:o,ref:t},f.createElement(op,{className:i}))}),Yh=()=>({width:0,opacity:0,transform:"scale(0)"}),Qh=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),m7=e=>{const{prefixCls:t,loading:n,existIcon:r,className:o,style:i,mount:s}=e,a=!!n;return r?f.createElement(DS,{prefixCls:t,className:o,style:i}):f.createElement(er,{visible:a,motionName:`${t}-loading-icon-motion`,motionAppear:!s,motionEnter:!s,motionLeave:!s,removeOnLeave:true,onAppearStart:Yh,onAppearActive:Qh,onEnterStart:Yh,onEnterActive:Qh,onLeaveStart:Qh,onLeaveActive:Yh},({className:l,style:c},u)=>{const d={...i,...c};return f.createElement(DS,{prefixCls:t,className:H(o,l),style:d,ref:u})})},zS=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),p7=e=>{const{componentCls:t,fontSize:n,lineWidth:r,groupBorderColor:o,colorErrorHover:i}=e;return {[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(r).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:n}},zS(`${t}-primary`,o),zS(`${t}-danger`,i)]}};var h7={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};function Zb(){return Zb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Zb.apply(this,arguments)}const g7=(e,t)=>f__namespace.createElement(on,Zb({},e,{ref:t,icon:h7})),Ya=f__namespace.forwardRef(g7),_e={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,N:78,P:80,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,EQUALS:187,WIN_KEY:224},b7=f.forwardRef((e,t)=>{const{prefixCls:n,forceRender:r,className:o,style:i,children:s,isActive:a,role:l,classNames:c,styles:u}=e,[d,m]=f.useState(a||r);return f.useEffect(()=>{(r||a)&&m(true);},[r,a]),d?f.createElement("div",{ref:t,className:H(`${n}-panel`,{[`${n}-panel-active`]:a,[`${n}-panel-inactive`]:!a},o),style:i,role:l},f.createElement("div",{className:H(`${n}-body`,c?.body),style:u?.body},s)):null}),k6=f.forwardRef((e,t)=>{const{showArrow:n=true,headerClass:r,isActive:o,onItemClick:i,forceRender:s,className:a,classNames:l={},styles:c={},prefixCls:u,collapsible:d,accordion:m,panelKey:p,extra:h,header:g,expandIcon:b,openMotion:y,destroyOnHidden:C,children:x,...w}=e,S=d==="disabled",I=h!=null&&typeof h!="boolean",$={onClick:()=>{i?.(p);},onKeyDown:k=>{(k.key==="Enter"||k.keyCode===_e.ENTER||k.which===_e.ENTER)&&i?.(p);},role:m?"tab":"button","aria-expanded":o,"aria-disabled":S,tabIndex:S?-1:0},E=typeof b=="function"?b(e):f.createElement("i",{className:"arrow"}),P=E&&f.createElement("div",dn({className:H(`${u}-expand-icon`,l?.icon),style:c?.icon},["header","icon"].includes(d)?$:{}),E),M=H(`${u}-item`,{[`${u}-item-active`]:o,[`${u}-item-disabled`]:S},a),A={className:H(r,`${u}-header`,{[`${u}-collapsible-${d}`]:!!d},l?.header),style:c?.header,...["header","icon"].includes(d)?{}:$};return f.createElement("div",dn({},w,{ref:t,className:M}),f.createElement("div",A,n&&P,f.createElement("span",dn({className:H(`${u}-title`,l?.title),style:c?.title},d==="header"?$:{}),g),I&&f.createElement("div",{className:`${u}-extra`},h)),f.createElement(er,dn({visible:o,leavedClassName:`${u}-panel-hidden`},y,{forceRender:s,removeOnLeave:C}),({className:k,style:R},L)=>f.createElement(b7,{ref:L,prefixCls:u,className:k,classNames:l,style:R,styles:c,isActive:o,forceRender:s,role:m?"tabpanel":void 0},x)))}),v7=(e,t)=>{const{prefixCls:n,accordion:r,collapsible:o,destroyOnHidden:i,onItemClick:s,activeKey:a,openMotion:l,expandIcon:c,classNames:u,styles:d}=t;return e.map((m,p)=>{const{children:h,label:g,key:b,collapsible:y,onItemClick:C,destroyOnHidden:x,...w}=m,S=String(b??p),I=y??o,$=x??i,E=M=>{I!=="disabled"&&(s(M),C?.(M));};let P=false;return r?P=a[0]===S:P=a.indexOf(S)>-1,f.createElement(k6,dn({},w,{classNames:u,styles:d,prefixCls:n,key:S,panelKey:S,isActive:P,accordion:r,openMotion:l,expandIcon:c,header:g,collapsible:I,onItemClick:E,destroyOnHidden:$}),h)})},y7=(e,t,n)=>{if(!e)return null;const{prefixCls:r,accordion:o,collapsible:i,destroyOnHidden:s,onItemClick:a,activeKey:l,openMotion:c,expandIcon:u,classNames:d,styles:m}=n,p=e.key||String(t),{header:h,headerClass:g,destroyOnHidden:b,collapsible:y,onItemClick:C}=e.props;let x=false;o?x=l[0]===p:x=l.indexOf(p)>-1;const w=y??i,S=$=>{w!=="disabled"&&(a($),C?.($));},I={key:p,panelKey:p,header:h,headerClass:g,classNames:d,styles:m,isActive:x,prefixCls:r,destroyOnHidden:b??s,openMotion:c,accordion:o,children:e.props.children,onItemClick:S,expandIcon:u,collapsible:w};return typeof e.type=="string"?e:(Object.keys(I).forEach($=>{typeof I[$]>"u"&&delete I[$];}),f.cloneElement(e,I))};function C7(e,t,n){return Array.isArray(e)?v7(e,n):gr(t).map((r,o)=>y7(r,o,n))}function _S(e){let t=e;if(!Array.isArray(t)){const n=typeof t;t=n==="number"||n==="string"?[t]:[];}return t.map(n=>String(n))}const x7=f.forwardRef((e,t)=>{const{prefixCls:n="rc-collapse",destroyOnHidden:r=false,style:o,accordion:i,className:s,children:a,collapsible:l,openMotion:c,expandIcon:u,activeKey:d,defaultActiveKey:m,onChange:p,items:h,classNames:g,styles:b}=e,y=H(n,s),[C,x]=Bt(m,d),w=_S(C),S=lt(E=>{const P=_S(E);x(P),p?.(P);}),I=E=>{S(i?w[0]===E?[]:[E]:w.includes(E)?w.filter(P=>P!==E):[...w,E]);};Cn(!a,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");const $=C7(h,a,{prefixCls:n,accordion:i,openMotion:c,expandIcon:u,collapsible:l,destroyOnHidden:r,onItemClick:I,activeKey:w,classNames:g,styles:b});return f.createElement("div",dn({ref:t,className:y,style:o,role:i?"tablist":void 0},or(e,{aria:true,data:true})),$)}),e1=Object.assign(x7,{Panel:k6}),{Panel:Hce}=e1,w7=f__namespace.forwardRef((e,t)=>{const{getPrefixCls:n}=f__namespace.useContext(ot),{prefixCls:r,className:o,showArrow:i=true}=e,s=n("collapse",r),a=H({[`${s}-no-arrow`]:!i},o);return f__namespace.createElement(e1.Panel,{ref:t,...e,prefixCls:s,className:a})}),S7=e=>{const{componentCls:t,contentBg:n,padding:r,headerBg:o,headerPadding:i,collapseHeaderPaddingSM:s,collapseHeaderPaddingLG:a,collapsePanelBorderRadius:l,lineWidth:c,lineType:u,colorBorder:d,colorText:m,colorTextHeading:p,colorTextDisabled:h,fontSizeLG:g,lineHeight:b,lineHeightLG:y,marginSM:C,paddingSM:x,paddingLG:w,paddingXS:S,motionDurationSlow:I,fontSizeIcon:$,contentPadding:E,fontHeight:P,fontHeightLG:M}=e,N=`${X(c)} ${u} ${d}`;return {[t]:{...Lt(e),backgroundColor:o,border:N,borderRadius:l,"&-rtl":{direction:"rtl"},[`& > ${t}-item`]:{borderBottom:N,"&:first-child":{[`
&,
& > ${t}-header`]:{borderRadius:`${X(l)} ${X(l)} 0 0`}},"&:last-child":{[`
&,
& > ${t}-header`]:{borderRadius:`0 0 ${X(l)} ${X(l)}`}},[`> ${t}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:i,color:p,lineHeight:b,cursor:"pointer",transition:`all ${I}, visibility 0s`,...Tr(e),[`> ${t}-title`]:{flex:"auto"},[`${t}-expand-icon`]:{height:P,display:"flex",alignItems:"center",marginInlineEnd:C},[`${t}-arrow`]:{...Gs(),fontSize:$,transition:`transform ${I}`,svg:{transition:`transform ${I}`}},[`${t}-title`]:{marginInlineEnd:"auto"}},[`${t}-collapsible-header`]:{cursor:"default",[`${t}-title`]:{flex:"none",cursor:"pointer"},[`${t}-expand-icon`]:{cursor:"pointer"}},[`${t}-collapsible-icon`]:{cursor:"unset",[`${t}-expand-icon`]:{cursor:"pointer"}}},[`${t}-panel`]:{color:m,backgroundColor:n,borderTop:N,[`& > ${t}-body`]:{padding:E},"&-hidden":{display:"none"}},"&-small":{[`> ${t}-item`]:{[`> ${t}-header`]:{padding:s,paddingInlineStart:S,[`> ${t}-expand-icon`]:{marginInlineStart:e.calc(x).sub(S).equal()}},[`> ${t}-panel > ${t}-body`]:{padding:x}}},"&-large":{[`> ${t}-item`]:{fontSize:g,lineHeight:y,[`> ${t}-header`]:{padding:a,paddingInlineStart:r,[`> ${t}-expand-icon`]:{height:M,marginInlineStart:e.calc(w).sub(r).equal()}},[`> ${t}-panel > ${t}-body`]:{padding:w}}},[`${t}-item:last-child`]:{borderBottom:0,[`> ${t}-panel`]:{borderRadius:`0 0 ${X(l)} ${X(l)}`}},[`& ${t}-item-disabled > ${t}-header`]:{"\n &,\n & > .arrow\n ":{color:h,cursor:"not-allowed"}},[`&${t}-icon-placement-end`]:{[`& > ${t}-item`]:{[`> ${t}-header`]:{[`${t}-expand-icon`]:{order:1,marginInlineEnd:0,marginInlineStart:C}}}}}}},$7=e=>{const{componentCls:t}=e,n=`> ${t}-item > ${t}-header ${t}-arrow`;return {[`${t}-rtl`]:{[n]:{transform:"rotate(180deg)"}}}},E7=e=>{const{componentCls:t,headerBg:n,borderlessContentPadding:r,borderlessContentBg:o,colorBorder:i}=e;return {[`${t}-borderless`]:{backgroundColor:n,border:0,[`> ${t}-item`]:{borderBottom:`1px solid ${i}`},[`
> ${t}-item:last-child,
> ${t}-item:last-child ${t}-header
`]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-panel`]:{backgroundColor:o,borderTop:0},[`> ${t}-item > ${t}-panel > ${t}-body`]:{padding:r}}}},I7=e=>{const{componentCls:t,paddingSM:n}=e;return {[`${t}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-panel`]:{backgroundColor:"transparent",border:0,[`> ${t}-body`]:{paddingBlock:n}}}}}},P7=e=>({headerPadding:`${e.paddingSM}px ${e.padding}px`,headerBg:e.colorFillAlter,contentPadding:`${e.padding}px 16px`,contentBg:e.colorBgContainer,borderlessContentPadding:`${e.paddingXXS}px 16px ${e.padding}px`,borderlessContentBg:"transparent"}),N7=xt("Collapse",e=>{const t=vt(e,{collapseHeaderPaddingSM:`${X(e.paddingXS)} ${X(e.paddingSM)}`,collapseHeaderPaddingLG:`${X(e.padding)} ${X(e.paddingLG)}`,collapsePanelBorderRadius:e.borderRadiusLG});return [S7(t),E7(t),I7(t),$7(t),PP(t)]},P7),M7=f__namespace.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r,expandIcon:o,className:i,style:s,classNames:a,styles:l}=St("collapse"),{prefixCls:c,className:u,rootClassName:d,style:m,bordered:p=true,ghost:h,size:g,expandIconPlacement:b,expandIconPosition:y,children:C,destroyInactivePanel:x,destroyOnHidden:w,expandIcon:S,classNames:I,styles:$}=e,E=Vn(B=>g??B??"middle"),P=n("collapse",c),M=n(),[N,A]=N7(P),k=b??y??"start",R={...e,size:E,bordered:p,expandIconPlacement:k},[L,V]=It([a,I],[l,$],{props:R}),_=S??o,z=f__namespace.useCallback((B={})=>{const j=typeof _=="function"?_(B):f__namespace.createElement(Ya,{rotate:B.isActive?r==="rtl"?-90:90:void 0,"aria-label":B.isActive?"expanded":"collapsed"});return Rn(j,()=>({className:H(j?.props?.className,`${P}-arrow`)}))},[_,P,r]),D=H(`${P}-icon-placement-${k}`,{[`${P}-borderless`]:!p,[`${P}-rtl`]:r==="rtl",[`${P}-ghost`]:!!h,[`${P}-${E}`]:E!=="middle"},i,u,d,N,A,L.root),W=f__namespace.useMemo(()=>({...$P(M),motionAppear:false,leavedClassName:`${P}-panel-hidden`}),[M,P]),O=f__namespace.useMemo(()=>C?gr(C).map(B=>B):null,[C]);return f__namespace.createElement(e1,{ref:t,openMotion:W,...Zt(e,["rootClassName"]),expandIcon:z,prefixCls:P,className:D,style:{...V.root,...s,...m},classNames:L,styles:V,destroyOnHidden:w??x},O)}),D6=Object.assign(M7,{Panel:w7}),R7=e=>e.map(t=>(t.colors=t.colors.map(_n),t)),t1=(e,t)=>{const{r:n,g:r,b:o,a:i}=e.toRgb(),s=new ho(e.toRgbString()).onBackground(t).toHsv();return i<=.5?s.v>.5:n*.299+r*.587+o*.114>192},HS=(e,t)=>`panel-${e.key??t}`,A7=({prefixCls:e,presets:t,value:n,onChange:r})=>{const[o]=ar("ColorPicker"),[,i]=Tn(),s=f.useMemo(()=>R7(t),[t]),a=`${e}-presets`,l=f.useMemo(()=>s.reduce((d,m,p)=>{const{defaultOpen:h=true}=m;return h&&d.push(HS(m,p)),d},[]),[s]),c=d=>{r?.(d);},u=s.map((d,m)=>({key:HS(d,m),label:f.createElement("div",{className:`${a}-label`},d?.label),children:f.createElement("div",{className:`${a}-items`},Array.isArray(d?.colors)&&d.colors?.length>0?d.colors.map((p,h)=>{const g=_n(p);return f.createElement(Fy,{key:`preset-${h}-${p.toHexString()}`,color:g.toCssString(),prefixCls:e,className:H(`${a}-color`,{[`${a}-color-checked`]:p.toCssString()===n?.toCssString(),[`${a}-color-bright`]:t1(p,i.colorBgElevated)}),onClick:()=>c(p)})}):f.createElement("span",{className:`${a}-empty`},o.presetEmpty))}));return f.createElement("div",{className:a},f.createElement(D6,{defaultActiveKey:l,ghost:true,items:u}))},z6=e=>{const{paddingInline:t,onlyIconSize:n,borderColorDisabled:r}=e;return vt(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:n,colorBorderDisabled:r})},_6=e=>{const t=e.contentFontSize??e.fontSize,n=e.contentFontSizeSM??e.fontSize,r=e.contentFontSizeLG??e.fontSizeLG,o=e.contentLineHeight??nf(t),i=e.contentLineHeightSM??nf(n),s=e.contentLineHeightLG??nf(r),a=t1(new pr(e.colorBgSolid),"#fff")?"#000":"#fff",l=_i.reduce((d,m)=>({...d,[`${m}ShadowColor`]:`0 ${X(e.controlOutlineWidth)} 0 ${ac(e[`${m}1`],e.colorBgContainer)}`}),{}),c=e.colorBgContainerDisabled,u=e.colorBgContainerDisabled;return {...l,fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorderDisabled,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:a,contentFontSize:t,contentFontSizeSM:n,contentFontSizeLG:r,contentLineHeight:o,contentLineHeightSM:i,contentLineHeightLG:s,paddingBlock:Math.max((e.controlHeight-t*o)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-n*i)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-r*s)/2-e.lineWidth,0),defaultBgDisabled:c,dashedBgDisabled:u}},T7=e=>{const{componentCls:t,antCls:n}=e,r=hy(n,"btn");return {[t]:[{[r("border-width")]:"1px",[r("border-color")]:"#000",[r("border-color-hover")]:`var(${r("border-color")})`,[r("border-color-active")]:`var(${r("border-color")})`,[r("border-color-disabled")]:`var(${r("border-color")})`,[r("border-style")]:"solid",[r("text-color")]:"#000",[r("text-color-hover")]:`var(${r("text-color")})`,[r("text-color-active")]:`var(${r("text-color")})`,[r("text-color-disabled")]:`var(${r("text-color")})`,[r("bg-color")]:"#ddd",[r("bg-color-hover")]:`var(${r("bg-color")})`,[r("bg-color-active")]:`var(${r("bg-color")})`,[r("bg-color-disabled")]:e.colorBgContainerDisabled,[r("bg-color-container")]:e.colorBgContainer,[r("shadow")]:"none"},{border:`var(${r("border-width")}) var(${r("border-style")}) var(${r("border-color")})`,color:`var(${r("text-color")})`,backgroundColor:`var(${r("bg-color")})`,[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":{border:`var(${r("border-width")}) var(${r("border-style")}) var(${r("border-color-hover")})`,color:`var(${r("text-color-hover")})`,backgroundColor:`var(${r("bg-color-hover")})`},"&:active":{border:`var(${r("border-width")}) var(${r("border-style")}) var(${r("border-color-active")})`,color:`var(${r("text-color-active")})`,backgroundColor:`var(${r("bg-color-active")})`}}},{[`&${t}-variant-solid`]:{[r("solid-bg-color")]:`var(${r("color-base")})`,[r("solid-bg-color-hover")]:`var(${r("color-hover")})`,[r("solid-bg-color-active")]:`var(${r("color-active")})`,[r("border-color")]:"transparent",[r("text-color")]:e.colorTextLightSolid,[r("bg-color")]:`var(${r("solid-bg-color")})`,[r("bg-color-hover")]:`var(${r("solid-bg-color-hover")})`,[r("bg-color-active")]:`var(${r("solid-bg-color-active")})`,boxShadow:`var(${r("shadow")})`},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[r("border-color")]:`var(${r("color-base")})`,[r("border-color-hover")]:`var(${r("color-hover")})`,[r("border-color-active")]:`var(${r("color-active")})`,[r("bg-color")]:`var(${r("bg-color-container")})`,[r("text-color")]:`var(${r("color-base")})`,[r("text-color-hover")]:`var(${r("color-hover")})`,[r("text-color-active")]:`var(${r("color-active")})`,boxShadow:`var(${r("shadow")})`},[`&${t}-variant-dashed`]:{[r("border-style")]:"dashed",[r("bg-color-disabled")]:e.dashedBgDisabled},[`&${t}-variant-filled`]:{[r("border-color")]:"transparent",[r("text-color")]:`var(${r("color-base")})`,[r("bg-color")]:`var(${r("color-light")})`,[r("bg-color-hover")]:`var(${r("color-light-hover")})`,[r("bg-color-active")]:`var(${r("color-light-active")})`},[`&${t}-variant-text, &${t}-variant-link`]:{[r("border-color")]:"transparent",[r("text-color")]:`var(${r("color-base")})`,[r("text-color-hover")]:`var(${r("color-hover")})`,[r("text-color-active")]:`var(${r("color-active")})`,[r("bg-color")]:"transparent",[r("bg-color-hover")]:"transparent",[r("bg-color-active")]:"transparent",[`&:disabled, &${e.componentCls}-disabled`]:{background:"transparent",borderColor:"transparent"}},[`&${t}-variant-text`]:{[r("bg-color-hover")]:`var(${r("color-light")})`,[r("bg-color-active")]:`var(${r("color-light-active")})`}},{[`&${t}-variant-link`]:{[r("color-base")]:e.colorLink,[r("color-hover")]:e.colorLinkHover,[r("color-active")]:e.colorLinkActive},[`&${t}-color-primary`]:{[r("color-base")]:e.colorPrimary,[r("color-hover")]:e.colorPrimaryHover,[r("color-active")]:e.colorPrimaryActive,[r("color-light")]:e.colorPrimaryBg,[r("color-light-hover")]:e.colorPrimaryBgHover,[r("color-light-active")]:e.colorPrimaryBorder,[r("shadow")]:e.primaryShadow,[`&${t}-variant-solid`]:{[r("text-color")]:e.primaryColor,[r("text-color-hover")]:`var(${r("text-color")})`,[r("text-color-active")]:`var(${r("text-color")})`}},[`&${t}-color-dangerous`]:{[r("color-base")]:e.colorError,[r("color-hover")]:e.colorErrorHover,[r("color-active")]:e.colorErrorActive,[r("color-light")]:e.colorErrorBg,[r("color-light-hover")]:e.colorErrorBgFilledHover,[r("color-light-active")]:e.colorErrorBgActive,[r("shadow")]:e.dangerShadow,[`&${t}-variant-solid`]:{[r("text-color")]:e.dangerColor,[r("text-color-hover")]:`var(${r("text-color")})`,[r("text-color-active")]:`var(${r("text-color")})`}},[`&${t}-color-default`]:{[r("solid-bg-color")]:e.colorBgSolid,[r("solid-bg-color-hover")]:e.colorBgSolidHover,[r("solid-bg-color-active")]:e.colorBgSolidActive,[r("color-base")]:e.defaultBorderColor,[r("color-hover")]:e.defaultHoverBorderColor,[r("color-active")]:e.defaultActiveBorderColor,[r("color-light")]:e.colorFillTertiary,[r("color-light-hover")]:e.colorFillSecondary,[r("color-light-active")]:e.colorFill,[r("text-color")]:e.colorText,[r("text-color-hover")]:e.defaultHoverBorderColor,[r("text-color-active")]:e.defaultActiveBorderColor,[r("shadow")]:e.defaultShadow,[`&${t}-variant-solid`]:{[r("text-color")]:e.solidTextColor,[r("text-color-hover")]:`var(${r("text-color")})`,[r("text-color-active")]:`var(${r("text-color")})`},[`&${t}-variant-filled, &${t}-variant-text`]:{[r("text-color-hover")]:`var(${r("text-color")})`,[r("text-color-active")]:`var(${r("text-color")})`},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[r("bg-color-hover")]:e.defaultHoverBg,[r("bg-color-active")]:e.defaultActiveBg},[`&${t}-background-ghost`]:{[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[r("text-color")]:e.defaultGhostColor,[r("border-color")]:e.defaultGhostBorderColor}}}},_i.map(o=>{const i=e[`${o}6`],s=e[`${o}1`],a=e[`${o}5`],l=e[`${o}2`],c=e[`${o}3`],u=e[`${o}7`],d=e[`${o}ShadowColor`];return {[`&${t}-color-${o}`]:{[r("color-base")]:i,[r("color-hover")]:a,[r("color-active")]:u,[r("color-light")]:s,[r("color-light-hover")]:l,[r("color-light-active")]:c,[r("shadow")]:d}}}),{[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",borderColor:e.colorBorderDisabled,background:`var(${r("bg-color-disabled")})`,color:e.colorTextDisabled,boxShadow:"none"}},{[`&${t}-background-ghost`]:{[r("bg-color")]:"transparent",[r("shadow")]:"none"}}]}},O7=e=>{const{componentCls:t,iconCls:n,fontWeight:r,opacityLoading:o,motionDurationSlow:i,motionEaseInOut:s,iconGap:a,calc:l}=e;return {[t]:{outline:"none",position:"relative",display:"inline-flex",gap:a,alignItems:"center",justifyContent:"center",fontWeight:r,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation","&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:Gs(),"> a":{color:"currentColor"},"&:not(:disabled)":Tr(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${t}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:"none"}},[`&${t}-loading`]:{opacity:o,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map(c=>`${c} ${i} ${s}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:l(a).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:l(a).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:l(a).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:l(a).mul(-1).equal()}}}}}},F7=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:"50%"}),n1=(e,t="")=>{const{componentCls:n,controlHeight:r,fontSize:o,borderRadius:i,buttonPaddingHorizontal:s,iconCls:a,buttonPaddingVertical:l,buttonIconOnlyFontSize:c}=e;return [{[t]:{fontSize:o,height:r,padding:`${X(l)} ${X(s)}`,borderRadius:i,[`&${n}-icon-only`]:{width:r,[a]:{fontSize:c}}}},{[`${n}${n}-circle${t}`]:F7(e)},{[`${n}${n}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${n}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},L7=e=>{const t=vt(e,{fontSize:e.contentFontSize});return n1(t,e.componentCls)},B7=e=>{const t=vt(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return n1(t,`${e.componentCls}-sm`)},k7=e=>{const t=vt(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return n1(t,`${e.componentCls}-lg`)},D7=e=>{const{componentCls:t}=e;return {[t]:{[`&${t}-block`]:{width:"100%"}}}},z7=xt("Button",e=>{const t=z6(e);return [O7(t),L7(t),B7(t),k7(t),D7(t),T7(t),p7(t)]},_6,{unitless:{fontWeight:true,contentLineHeight:true,contentLineHeightSM:true,contentLineHeightLG:true}});function _7(e,t,n){return {[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":{"&:hover,&:focus,&:active":{zIndex:3},"&[disabled]":{zIndex:0}}}}function H7(e,t){return {[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function V7(e){const t=`${e.componentCls}-compact-vertical`;return {[t]:{..._7(e,t,e.componentCls),...H7(e.componentCls,t)}}}const j7=e=>{const{componentCls:t,colorPrimaryHover:n,lineWidth:r,calc:o}=e,i=o(r).mul(-1).equal(),s=a=>{const l=`${t}-compact${a?"-vertical":""}-item`,c=`${l}${t}-primary:not([disabled])`;return {[l]:{transition:"none"},[`${c} + ${c}::before`]:{position:"absolute",top:a?i:0,insetInlineStart:a?0:i,backgroundColor:n,content:'""',width:a?"100%":r,height:a?r:"100%"}}};return {...s(),...s(true)}},W7=dl(["Button","compact"],e=>{const t=z6(e);return [bl(t),V7(t),j7(t)]},_6);function q7(e){if(typeof e=="object"&&e){let t=e?.delay;return t=!Number.isNaN(t)&&typeof t=="number"?t:0,{loading:t<=0,delay:t}}return {loading:!!e,delay:0}}const U7={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},G7=f.forwardRef((e,t)=>{const{_skipSemantic:n,loading:r=false,prefixCls:o,color:i,variant:s,type:a,danger:l=false,shape:c,size:u,disabled:d,className:m,rootClassName:p,children:h,icon:g,iconPosition:b,iconPlacement:y,ghost:C=false,block:x=false,htmlType:w="button",classNames:S,styles:I,style:$,autoInsertSpace:E,autoFocus:P,...M}=e,N=gr(h),A=a||"default",{button:k}=f.useContext(ot),R=c||k?.shape||"default",[L,V]=f.useMemo(()=>{if(i&&s)return [i,s];if(a||l){const Xe=U7[A]||[];return l?["danger",Xe[1]]:Xe}return k?.color&&k?.variant?[k.color,k.variant]:["default","outlined"]},[i,s,a,l,k?.color,k?.variant,A]),[_,z]=f.useMemo(()=>C&&V==="solid"?[L,"outlined"]:[L,V],[L,V,C]),D=_==="danger",W=D?"dangerous":_,{getPrefixCls:O,direction:B,autoInsertSpace:j,className:Y,style:q,classNames:U,styles:K}=St("button"),J=E??j??true,Q=O("btn",o),[G,ee]=z7(Q),re=f.useContext(zn),oe=d??re,be=f.useContext(L6),Z=f.useMemo(()=>q7(r),[r]),[te,ce]=f.useState(Z.loading),[ue,he]=f.useState(false),ye=f.useRef(null),pe=Hs(t,ye),ie=N.length===1&&!g&&!Xh(z),ge=f.useRef(true);f.useEffect(()=>(ge.current=false,()=>{ge.current=true;}),[]),Kt(()=>{let Xe=null;Z.delay>0?Xe=setTimeout(()=>{Xe=null,ce(true);},Z.delay):ce(Z.loading);function Ie(){Xe&&(clearTimeout(Xe),Xe=null);}return Ie},[Z.delay,Z.loading]),f.useEffect(()=>{if(!ye.current||!J)return;const Xe=ye.current.textContent||"";ie&&Yb(Xe)?ue||he(true):ue&&he(false);}),f.useEffect(()=>{P&&ye.current&&ye.current.focus();},[]);const Se=f.useCallback(Xe=>{if(te||oe){Xe.preventDefault();return}e.onClick?.((Xe));},[e.onClick,te,oe]),{compactSize:ke,compactItemClassnames:qe}=li(Q,B),De={large:"lg",small:"sm",middle:void 0},ze=Vn(Xe=>u??ke??be??Xe),je=ze?De[ze]??"":"",Le=te?"loading":g,we=y??b??"start",Me=Zt(M,["navigate"]),Fe={...e,type:A,color:_,variant:z,danger:D,shape:R,size:ze,disabled:oe,loading:te,iconPlacement:we},[Re,Pe]=It([n?void 0:U,S],[n?void 0:K,I],{props:Fe}),Qe=H(Q,G,ee,{[`${Q}-${R}`]:R!=="default"&&R!=="square"&&R,[`${Q}-${A}`]:A,[`${Q}-dangerous`]:l,[`${Q}-color-${W}`]:W,[`${Q}-variant-${z}`]:z,[`${Q}-${je}`]:je,[`${Q}-icon-only`]:!h&&h!==0&&!!Le,[`${Q}-background-ghost`]:C&&!Xh(z),[`${Q}-loading`]:te,[`${Q}-two-chinese-chars`]:ue&&J&&!te,[`${Q}-block`]:x,[`${Q}-rtl`]:B==="rtl",[`${Q}-icon-end`]:we==="end"},qe,m,p,Y,Re.root),mt={...Pe.root,...q,...$},it={className:Re.icon,style:Pe.icon},ct=Xe=>f.createElement(B6,{prefixCls:Q,...it},Xe),bt=f.createElement(m7,{existIcon:!!g,prefixCls:Q,loading:te,mount:ge.current,...it});let pt;g&&!te?pt=ct(g):r&&typeof r=="object"&&r.icon?pt=ct(r.icon):pt=bt;const rt=kn(h)?u7(h,ie&&J,Pe.content,Re.content):null;if(Me.href!==void 0)return f.createElement("a",{...Me,className:H(Qe,{[`${Q}-disabled`]:oe}),href:oe?void 0:Me.href,style:mt,onClick:Se,ref:pe,tabIndex:oe?-1:0,"aria-disabled":oe},pt,rt);let et=f.createElement("button",{...M,type:w,className:Qe,style:mt,onClick:Se,disabled:oe,ref:pe},pt,rt,qe&&f.createElement(W7,{prefixCls:Q}));return Xh(z)||(et=f.createElement(Mu,{component:"Button",disabled:te},et)),et}),Je=G7;Je.Group=l7;Je.__ANT_BUTTON=true;var K7={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};function Jb(){return Jb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Jb.apply(this,arguments)}const X7=(e,t)=>f__namespace.createElement(on,Jb({},e,{ref:t,icon:K7})),Jc=f__namespace.forwardRef(X7),{ESC:Y7,TAB:Q7}=_e;function Z7({visible:e,triggerRef:t,onVisibleChange:n,autoFocus:r,overlayRef:o}){const i=f__namespace.useRef(false),s=()=>{e&&(t.current?.focus?.(),n?.(false));},a=()=>o.current?.focus?(o.current.focus(),i.current=true,true):false,l=c=>{switch(c.keyCode){case Y7:s();break;case Q7:{let u=false;i.current||(u=a()),u?c.preventDefault():s();break}}};f__namespace.useEffect(()=>e?(window.addEventListener("keydown",l),r&>(a,3),()=>{window.removeEventListener("keydown",l),i.current=false;}):()=>{i.current=false;},[e]);}const J7=f.forwardRef((e,t)=>{const{overlay:n,arrow:r,prefixCls:o}=e,i=f.useMemo(()=>{let a;return typeof n=="function"?a=n():a=n,a},[n]),s=In(t,js(i));return f.createElement(f.Fragment,null,r&&f.createElement("div",{className:`${o}-arrow`}),f.cloneElement(i,{ref:Vs(i)?s:void 0}))}),ha={adjustX:1,adjustY:1},ga=[0,0],eH={topLeft:{points:["bl","tl"],overflow:ha,offset:[0,-4],targetOffset:ga},top:{points:["bc","tc"],overflow:ha,offset:[0,-4],targetOffset:ga},topRight:{points:["br","tr"],overflow:ha,offset:[0,-4],targetOffset:ga},bottomLeft:{points:["tl","bl"],overflow:ha,offset:[0,4],targetOffset:ga},bottom:{points:["tc","bc"],overflow:ha,offset:[0,4],targetOffset:ga},bottomRight:{points:["tr","br"],overflow:ha,offset:[0,4],targetOffset:ga}};function ev(){return ev=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},ev.apply(this,arguments)}const H6=f.forwardRef((e,t)=>{const{arrow:n=false,prefixCls:r="rc-dropdown",transitionName:o,animation:i,align:s,placement:a="bottomLeft",placements:l=eH,getPopupContainer:c,showAction:u,hideAction:d,overlayClassName:m,overlayStyle:p,visible:h,trigger:g=["hover"],autoFocus:b,overlay:y,children:C,onVisibleChange:x,...w}=e,[S,I]=f.useState(),$="visible"in e?h:S,E=i?`${r}-${i}`:o,P=f.useRef(null),M=f.useRef(null),N=f.useRef(null);f.useImperativeHandle(t,()=>P.current);const A=W=>{I(W),x?.(W);};Z7({visible:$,triggerRef:N,onVisibleChange:A,autoFocus:b,overlayRef:M});const k=W=>{const{onOverlayClick:O}=e;I(false),O&&O(W);},R=()=>f.createElement(J7,{ref:M,overlay:y,prefixCls:r,arrow:n}),L=()=>typeof y=="function"?R:R(),V=()=>{const{minOverlayWidthMatchTrigger:W,alignPoint:O}=e;return "minOverlayWidthMatchTrigger"in e?W:!O},_=()=>{const{openClassName:W}=e;return W!==void 0?W:`${r}-open`},z=f.cloneElement(C,{className:H(C.props?.className,$&&_()),ref:Vs(C)?In(N,js(C)):void 0});let D=d;return !D&&g.indexOf("contextMenu")!==-1&&(D=["click"]),f.createElement(_m,ev({builtinPlacements:l},w,{prefixCls:r,ref:P,popupClassName:H(m,{[`${r}-show-arrow`]:n}),popupStyle:p,action:g,showAction:u,hideAction:D,popupPlacement:a,popupAlign:s,popupMotion:{motionName:E},popupVisible:$,stretch:V()?"minWidth":"",popup:L(),onOpenChange:A,onPopupClick:k,getPopupContainer:c}),z)}),tH=e=>typeof e!="object"&&typeof e!="function"||e===null;function V6(e){return t=>f__namespace.createElement(yr,{theme:{token:{motion:false,zIndexPopupBase:0}}},f__namespace.createElement(e,{...t}))}const r1=(e,t,n,r,o)=>V6(s=>{const{prefixCls:a,style:l}=s,c=f__namespace.useRef(null),[u,d]=f__namespace.useState(0),[m,p]=f__namespace.useState(0),[h,g]=Bt(false,s.open),{getPrefixCls:b}=f__namespace.useContext(ot),y=b(r||"select",a);f__namespace.useEffect(()=>{if(g(true),typeof ResizeObserver<"u"){const w=new ResizeObserver(I=>{const $=I[0].target;d($.offsetHeight+8),p($.offsetWidth);}),S=setInterval(()=>{const I=o?`.${o(y)}`:`.${y}-dropdown`,$=c.current?.querySelector(I);$&&(clearInterval(S),w.observe($));},10);return ()=>{clearInterval(S),w.disconnect();}}},[y]);let C={...s,style:{...l,margin:0},open:h,getPopupContainer:()=>c.current};n&&(C=n(C)),t&&Object.assign(C,{[t]:{overflow:{adjustX:false,adjustY:false}}});const x={paddingBottom:u,position:"relative",minWidth:m};return f__namespace.createElement("div",{ref:c,style:x},f__namespace.createElement(e,{...C}))}),ba=void 0;function nH(e,t){const{prefixCls:n,invalidate:r,item:o,renderItem:i,responsive:s,responsiveDisabled:a,registerSize:l,itemKey:c,className:u,style:d,children:m,display:p,order:h,component:g="div",...b}=e,y=s&&!p;function C($){l(c,$);}f__namespace.useEffect(()=>()=>{C(null);},[]);const x=i&&o!==ba?i(o,{index:h}):m;let w;r||(w={opacity:y?0:1,height:y?0:ba,overflowY:y?"hidden":ba,order:s?h:ba,pointerEvents:y?"none":ba,position:y?"absolute":ba});const S={};y&&(S["aria-hidden"]=true);let I=f__namespace.createElement(g,dn({className:H(!r&&n,u),style:{...w,...d}},S,b,{ref:t}),x);return s&&(I=f__namespace.createElement(Kr,{onResize:({offsetWidth:$})=>{C($);},disabled:a},I)),I}const uc=f__namespace.forwardRef(nH);function rH(e){if(typeof MessageChannel>"u")gt(e);else {const t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(void 0);}}function oH(){const e=f__namespace.useRef(null);return n=>{e.current||(e.current=[],rH(()=>{ST.unstable_batchedUpdates(()=>{e.current.forEach(r=>{r();}),e.current=null;});})),e.current.push(n);}}function va(e,t){const[n,r]=f__namespace.useState(t),o=lt(i=>{e(()=>{r(i);});});return [n,o]}const Uf=f.createContext(null),iH=(e,t)=>{const n=f__namespace.useContext(Uf);if(!n){const{component:a="div",...l}=e;return f__namespace.createElement(a,dn({},l,{ref:t}))}const{className:r,...o}=n,{className:i,...s}=e;return f__namespace.createElement(Uf.Provider,{value:null},f__namespace.createElement(uc,dn({ref:t,className:H(r,i)},o,s)))},sH=f__namespace.forwardRef(iH),j6="responsive",W6="invalidate";function aH(e){return `+ ${e.length} ...`}function lH(e,t){const{prefixCls:n="rc-overflow",data:r=[],renderItem:o,renderRawItem:i,itemKey:s,itemWidth:a=10,ssr:l,style:c,className:u,maxCount:d,renderRest:m,renderRawRest:p,prefix:h,suffix:g,component:b="div",itemComponent:y,onVisibleChange:C,...x}=e,w=l==="full",S=oH(),[I,$]=va(S,null),E=I||0,[P,M]=va(S,new Map),[N,A]=va(S,0),[k,R]=va(S,0),[L,V]=va(S,0),[_,z]=va(S,0),[D,W]=f.useState(null),[O,B]=f.useState(null),j=f__namespace.useMemo(()=>O===null&&w?Number.MAX_SAFE_INTEGER:O||0,[O,I]),[Y,q]=f.useState(false),U=`${n}-item`,K=Math.max(N,k),J=d===j6,Q=r.length&&J,G=d===W6,ee=Q||typeof d=="number"&&r.length>d,re=f.useMemo(()=>{let we=r;return Q?I===null&&w?we=r:we=r.slice(0,Math.min(r.length,E/a)):typeof d=="number"&&(we=r.slice(0,d)),we},[r,a,I,d,Q]),oe=f.useMemo(()=>Q?r.slice(j+1):r.slice(re.length),[r,re,Q,j]),be=f.useCallback((we,Me)=>typeof s=="function"?s(we):(s&&we?.[s])??Me,[s]),Z=f.useCallback(o||(we=>we),[o]);function te(we,Me,Fe){O===we&&(Me===void 0||Me===D)||(B(we),Fe||(q(we<r.length-1),C?.(we)),Me!==void 0&&W(Me));}function ce(we,Me){$(Me.clientWidth);}function ue(we,Me){M(Fe=>{const Re=new Map(Fe);return Me===null?Re.delete(we):Re.set(we,Me),Re});}function he(we,Me){R(Me),A(k);}function ye(we,Me){V(Me);}function pe(we,Me){z(Me);}function ie(we){return P.get(be(re[we],we))}Kt(()=>{if(E&&typeof K=="number"&&re){let we=L+_;const Me=re.length,Fe=Me-1;if(!Me){te(0,null);return}for(let Re=0;Re<Me;Re+=1){let Pe=ie(Re);if(w&&(Pe=Pe||0),Pe===void 0){te(Re-1,void 0,true);break}if(we+=Pe,Fe===0&&we<=E||Re===Fe-1&&we+ie(Fe)<=E){te(Fe,null);break}else if(we+K>E){te(Re-1,we-Pe-_+k);break}}g&&ie(0)+_>E&&W(null);}},[E,P,k,L,_,be,re]);const ge=Y&&!!oe.length;let Se={};D!==null&&Q&&(Se={position:"absolute",left:D,top:0});const ke={prefixCls:U,responsive:Q,component:y,invalidate:G},qe=i?(we,Me)=>{const Fe=be(we,Me);return f__namespace.createElement(Uf.Provider,{key:Fe,value:{...ke,order:Me,item:we,itemKey:Fe,registerSize:ue,display:Me<=j}},i(we,Me))}:(we,Me)=>{const Fe=be(we,Me);return f__namespace.createElement(uc,dn({},ke,{order:Me,key:Fe,item:we,renderItem:Z,itemKey:Fe,registerSize:ue,display:Me<=j}))},De={order:ge?j:Number.MAX_SAFE_INTEGER,className:`${U}-rest`,registerSize:he,display:ge},ze=m||aH,je=p?f__namespace.createElement(Uf.Provider,{value:{...ke,...De}},p(oe)):f__namespace.createElement(uc,dn({},ke,De),typeof ze=="function"?ze(oe):ze),Le=f__namespace.createElement(b,dn({className:H(!G&&n,u),style:c,ref:t},x),h&&f__namespace.createElement(uc,dn({},ke,{responsive:J,responsiveDisabled:!Q,order:-1,className:`${U}-prefix`,registerSize:ye,display:true}),h),re.map(qe),ee?je:null,g&&f__namespace.createElement(uc,dn({},ke,{responsive:J,responsiveDisabled:!Q,order:j,className:`${U}-suffix`,registerSize:pe,display:true,style:Se}),g));return J?f__namespace.createElement(Kr,{onResize:ce,disabled:!Q},Le):Le}const oi=f__namespace.forwardRef(lH);oi.Item=sH;oi.RESPONSIVE=j6;oi.INVALIDATE=W6;const q6=f__namespace.createContext(null);function U6(e,t){return `${e}-${t}`}function G6(e){const t=f__namespace.useContext(q6);return U6(t,e)}const go=f__namespace.createContext(null);function cH(e,t){const n={...e};return Object.keys(t).forEach(r=>{const o=t[r];o!==void 0&&(n[r]=o);}),n}function eu({children:e,locked:t,...n}){const r=f__namespace.useContext(go),o=ll(()=>cH(r,n),[r,n],(i,s)=>!t&&(i[0]!==s[0]||!zi(i[1],s[1],true)));return f__namespace.createElement(go.Provider,{value:o},e)}const uH=[],K6=f__namespace.createContext(null);function ip(){return f__namespace.useContext(K6)}const X6=f__namespace.createContext(uH);function vl(e){const t=f__namespace.useContext(X6);return f__namespace.useMemo(()=>e!==void 0?[...t,e]:t,[t,e])}const Y6=f__namespace.createContext(null),o1=f__namespace.createContext({});function VS(e,t=false){if(fy(e)){const n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||n==="a"&&!!e.getAttribute("href"),o=e.getAttribute("tabindex"),i=Number(o);let s=null;return o&&!Number.isNaN(i)?s=i:r&&s===null&&(s=0),r&&e.disabled&&(s=null),s!==null&&(s>=0||t&&s<0)}return false}function dH(e,t=false){const n=[...e.querySelectorAll("*")].filter(r=>VS(r,t));return VS(e,t)&&n.unshift(e),n}function i1(e,t){if(!e)return;e.focus(t);const{cursor:n}=t||{};if(n&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)){const r=e.value.length;switch(n){case "start":e.setSelectionRange(0,0);break;case "end":e.setSelectionRange(r,r);break;default:e.setSelectionRange(0,r);}}}const{LEFT:tv,RIGHT:nv,UP:rv,DOWN:pf,ENTER:hf,ESC:Q6,HOME:Vl,END:jl}=_e,jS=[rv,pf,tv,nv];function fH(e,t,n,r){const o="prev",i="next",s="children",a="parent";if(e==="inline"&&r===hf)return {inlineTrigger:true};const l={[rv]:o,[pf]:i},c={[tv]:n?i:o,[nv]:n?o:i,[pf]:s,[hf]:s},u={[rv]:o,[pf]:i,[hf]:s,[Q6]:a,[tv]:n?s:a,[nv]:n?a:s};switch({inline:l,horizontal:c,vertical:u,inlineSub:l,horizontalSub:u,verticalSub:u}[`${e}${t?"":"Sub"}`]?.[r]){case o:return {offset:-1,sibling:true};case i:return {offset:1,sibling:true};case a:return {offset:-1,sibling:false};case s:return {offset:1,sibling:false};default:return null}}function mH(e){let t=e;for(;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement;}return null}function pH(e,t){let n=e||document.activeElement;for(;n;){if(t.has(n))return n;n=n.parentElement;}return null}function s1(e,t){return dH(e,true).filter(r=>t.has(r))}function WS(e,t,n,r=1){if(!e)return null;const o=s1(e,t),i=o.length;let s=o.findIndex(a=>n===a);return r<0?s===-1?s=i-1:s-=1:r>0&&(s+=1),s=(s+i)%i,o[s]}const Gf=(e,t)=>{const n=new Set,r=new Map,o=new Map;return e.forEach(i=>{const s=document.querySelector(`[data-menu-id='${U6(t,i)}']`);s&&(n.add(s),o.set(s,i),r.set(i,s));}),{elements:n,key2element:r,element2key:o}};function hH(e,t,n,r,o,i,s,a,l,c){const u=f__namespace.useRef(),d=f__namespace.useRef();d.current=t;const m=()=>{gt.cancel(u.current);};return f__namespace.useEffect(()=>()=>{m();},[]),p=>{const{which:h}=p;if([...jS,hf,Q6,Vl,jl].includes(h)){const g=i();let b=Gf(g,r);const{elements:y,key2element:C,element2key:x}=b,w=C.get(t),S=pH(w,y),I=x.get(S),$=fH(e,s(I,true).length===1,n,h);if(!$&&h!==Vl&&h!==jl)return;(jS.includes(h)||[Vl,jl].includes(h))&&p.preventDefault();const E=P=>{if(P){let M=P;const N=P.querySelector("a");N?.getAttribute("href")&&(M=N);const A=x.get(P);a(A),m(),u.current=gt(()=>{d.current===A&&M.focus();});}};if([Vl,jl].includes(h)||$.sibling||!S){let P;!S||e==="inline"?P=o.current:P=mH(S);let M;const N=s1(P,y);h===Vl?M=N[0]:h===jl?M=N[N.length-1]:M=WS(P,y,S,$.offset),E(M);}else if($.inlineTrigger)l(I);else if($.offset>0)l(I,true),m(),u.current=gt(()=>{b=Gf(g,r);const P=S.getAttribute("aria-controls"),M=document.getElementById(P),N=WS(M,b.elements);E(N);},5);else if($.offset<0){const P=s(I,true),M=P[P.length-2],N=C.get(M);l(M,false),E(N);}}c?.(p);}}function gH(e){Promise.resolve().then(e);}const a1="__RC_UTIL_PATH_SPLIT__",qS=e=>e.join(a1),bH=e=>e.split(a1),ov="rc-menu-more";function vH(){const[,e]=f__namespace.useState({}),t=f.useRef(new Map),n=f.useRef(new Map),[r,o]=f__namespace.useState([]),i=f.useRef(0),s=f.useRef(false),a=()=>{s.current||e({});},l=f.useCallback((g,b)=>{const y=qS(b);n.current.set(y,g),t.current.set(g,y),i.current+=1;const C=i.current;gH(()=>{C===i.current&&a();});},[]),c=f.useCallback((g,b)=>{const y=qS(b);n.current.delete(y),t.current.delete(g);},[]),u=f.useCallback(g=>{o(g);},[]),d=f.useCallback((g,b)=>{const y=t.current.get(g)||"",C=bH(y);return b&&r.includes(C[0])&&C.unshift(ov),C},[r]),m=f.useCallback((g,b)=>g.filter(y=>y!==void 0).some(y=>d(y,true).includes(b)),[d]),p=()=>{const g=[...t.current.keys()];return r.length&&g.push(ov),g},h=f.useCallback(g=>{const b=`${t.current.get(g)}${a1}`,y=new Set;return [...n.current.keys()].forEach(C=>{C.startsWith(b)&&y.add(n.current.get(C));}),y},[]);return f__namespace.useEffect(()=>()=>{s.current=true;},[]),{registerPath:l,unregisterPath:c,refreshOverflowKeys:u,isSubPathKey:m,getKeyPath:d,getKeys:p,getSubPathKeys:h}}function dc(e){const t=f__namespace.useRef(e);t.current=e;const n=f__namespace.useCallback((...r)=>t.current?.(...r),[]);return e?n:void 0}function Z6(e,t,n,r){const{activeKey:o,onActive:i,onInactive:s}=f__namespace.useContext(go),a={active:o===e};return t||(a.onMouseEnter=l=>{n?.({key:e,domEvent:l}),i(e);},a.onMouseLeave=l=>{r?.({key:e,domEvent:l}),s(e);}),a}function J6(e){const{mode:t,rtl:n,inlineIndent:r}=f__namespace.useContext(go);if(t!=="inline")return null;const o=e;return n?{paddingRight:o*r}:{paddingLeft:o*r}}function eN({icon:e,props:t,children:n}){let r;return e===null||e===false?null:(typeof e=="function"?r=f__namespace.createElement(e,{...t}):typeof e!="boolean"&&(r=e),r||n||null)}function Kf({item:e,...t}){return Object.defineProperty(t,"item",{get:()=>(Cn(false,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e)}),t}function tu(){return tu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},tu.apply(this,arguments)}class yH extends f__namespace.Component{render(){const{title:t,attribute:n,elementRef:r,...o}=this.props,i=Zt(o,["eventKey","popupClassName","popupOffset","onTitleClick"]);return Cn(!n,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),f__namespace.createElement(oi.Item,tu({},n,{title:typeof t=="string"?t:void 0},i,{ref:r}))}}const CH=f__namespace.forwardRef((e,t)=>{const{style:n,className:r,eventKey:o,warnKey:i,disabled:s,itemIcon:a,children:l,role:c,onMouseEnter:u,onMouseLeave:d,onClick:m,onKeyDown:p,onFocus:h,...g}=e,b=G6(o),{prefixCls:y,onItemClick:C,disabled:x,overflowDisabled:w,itemIcon:S,selectedKeys:I,onActive:$}=f__namespace.useContext(go),{_internalRenderMenuItem:E}=f__namespace.useContext(o1),P=`${y}-item`,M=f__namespace.useRef(),N=f__namespace.useRef(),A=x||s,k=Hs(t,N),R=vl(o),L=U=>({key:o,keyPath:[...R].reverse(),item:M.current,domEvent:U}),V=a||S,{active:_,...z}=Z6(o,A,u,d),D=I.includes(o),W=J6(R.length),O=U=>{if(A)return;const K=L(U);m?.(Kf(K)),C(K);},B=U=>{if(p?.(U),U.which===_e.ENTER){const K=L(U);m?.(Kf(K)),C(K);}},j=U=>{$(o),h?.(U);},Y={};e.role==="option"&&(Y["aria-selected"]=D);let q=f__namespace.createElement(yH,tu({ref:M,elementRef:k,role:c===null?"none":c||"menuitem",tabIndex:s?null:-1,"data-menu-id":w&&b?null:b},Zt(g,["extra"]),z,Y,{component:"li","aria-disabled":s,style:{...W,...n},className:H(P,{[`${P}-active`]:_,[`${P}-selected`]:D,[`${P}-disabled`]:A},r),onClick:O,onKeyDown:B,onFocus:j}),l,f__namespace.createElement(eN,{props:{...e,isSelected:D},icon:V}));return E&&(q=E(q,e,{selected:D})),q});function xH(e,t){const{eventKey:n}=e,r=ip(),o=vl(n);return f__namespace.useEffect(()=>{if(r)return r.registerPath(n,o),()=>{r.unregisterPath(n,o);}},[o]),r?null:f__namespace.createElement(CH,tu({},e,{ref:t}))}const Du=f__namespace.forwardRef(xH);function iv(){return iv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},iv.apply(this,arguments)}const wH=({className:e,children:t,...n},r)=>{const{prefixCls:o,mode:i,rtl:s}=f__namespace.useContext(go);return f__namespace.createElement("ul",iv({className:H(o,s&&`${o}-rtl`,`${o}-sub`,`${o}-${i==="inline"?"inline":"vertical"}`,e),role:"menu"},n,{"data-menu-list":true,ref:r}),t)},tN=f__namespace.forwardRef(wH);function l1(e,t){return gr(e).map((n,r)=>{if(f__namespace.isValidElement(n)){const{key:o}=n;let i=n.props?.eventKey??o;i==null&&(i=`tmp_key-${[...t,r].join("-")}`);const a={key:i,eventKey:i};return f__namespace.cloneElement(n,a)}return n})}const Yn={adjustX:1,adjustY:1},SH={topLeft:{points:["bl","tl"],overflow:Yn},topRight:{points:["br","tr"],overflow:Yn},bottomLeft:{points:["tl","bl"],overflow:Yn},bottomRight:{points:["tr","br"],overflow:Yn},leftTop:{points:["tr","tl"],overflow:Yn},leftBottom:{points:["br","bl"],overflow:Yn},rightTop:{points:["tl","tr"],overflow:Yn},rightBottom:{points:["bl","br"],overflow:Yn}},$H={topLeft:{points:["bl","tl"],overflow:Yn},topRight:{points:["br","tr"],overflow:Yn},bottomLeft:{points:["tl","bl"],overflow:Yn},bottomRight:{points:["tr","br"],overflow:Yn},rightTop:{points:["tr","tl"],overflow:Yn},rightBottom:{points:["br","bl"],overflow:Yn},leftTop:{points:["tl","tr"],overflow:Yn},leftBottom:{points:["bl","br"],overflow:Yn}};function nN(e,t,n){if(t)return t;if(n)return n[e]||n.other}const EH={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function IH({prefixCls:e,visible:t,children:n,popup:r,popupStyle:o,popupClassName:i,popupOffset:s,disabled:a,mode:l,onVisibleChange:c}){const{getPopupContainer:u,rtl:d,subMenuOpenDelay:m,subMenuCloseDelay:p,builtinPlacements:h,triggerSubMenuAction:g,forceSubMenuRender:b,rootClassName:y,motion:C,defaultMotions:x}=f__namespace.useContext(go),[w,S]=f__namespace.useState(false),I=d?{...$H,...h}:{...SH,...h},$=EH[l],E=nN(l,C,x),P=f__namespace.useRef(E);l!=="inline"&&(P.current=E);const M={...P.current,leavedClassName:`${e}-hidden`,removeOnLeave:false,motionAppear:true},N=f__namespace.useRef();return f__namespace.useEffect(()=>(N.current=gt(()=>{S(t);}),()=>{gt.cancel(N.current);}),[t]),f__namespace.createElement(_m,{prefixCls:e,popupClassName:H(`${e}-popup`,{[`${e}-rtl`]:d},i,y),stretch:l==="horizontal"?"minWidth":null,getPopupContainer:u,builtinPlacements:I,popupPlacement:$,popupVisible:w,popup:r,popupStyle:o,popupAlign:s&&{offset:s},action:a?[]:[g],mouseEnterDelay:m,mouseLeaveDelay:p,onPopupVisibleChange:c,forceRender:b,popupMotion:M,fresh:true},n)}function sv(){return sv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},sv.apply(this,arguments)}function PH({id:e,open:t,keyPath:n,children:r}){const o="inline",{prefixCls:i,forceSubMenuRender:s,motion:a,defaultMotions:l,mode:c}=f__namespace.useContext(go),u=f__namespace.useRef(false);u.current=c===o;const[d,m]=f__namespace.useState(!u.current),p=u.current?t:false;f__namespace.useEffect(()=>{u.current&&m(false);},[c]);const h={...nN(o,a,l)};n.length>1&&(h.motionAppear=false);const g=h.onVisibleChanged;return h.onVisibleChanged=b=>(!u.current&&!b&&m(true),g?.(b)),d?null:f__namespace.createElement(eu,{mode:o,locked:!u.current},f__namespace.createElement(er,sv({visible:p},h,{forceRender:s,removeOnLeave:false,leavedClassName:`${i}-hidden`}),({className:b,style:y})=>f__namespace.createElement(tN,{id:e,className:b,style:y},r)))}function nu(){return nu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},nu.apply(this,arguments)}const NH=f__namespace.forwardRef((e,t)=>{const{style:n,className:r,styles:o,classNames:i,title:s,eventKey:a,warnKey:l,disabled:c,internalPopupClose:u,children:d,itemIcon:m,expandIcon:p,popupClassName:h,popupOffset:g,popupStyle:b,onClick:y,onMouseEnter:C,onMouseLeave:x,onTitleClick:w,onTitleMouseEnter:S,onTitleMouseLeave:I,popupRender:$,...E}=e,P=G6(a),{prefixCls:M,mode:N,openKeys:A,disabled:k,overflowDisabled:R,activeKey:L,selectedKeys:V,itemIcon:_,expandIcon:z,onItemClick:D,onOpenChange:W,onActive:O,popupRender:B}=f__namespace.useContext(go),{_internalRenderSubMenuItem:j}=f__namespace.useContext(o1),{isSubPathKey:Y}=f__namespace.useContext(Y6),q=vl(),U=`${M}-submenu`,K=k||c,J=f__namespace.useRef(),Q=f__namespace.useRef(),G=m??_,ee=p??z,re=A.includes(a),oe=!R&&re,be=Y(V,a),{active:Z,...te}=Z6(a,K,S,I),[ce,ue]=f__namespace.useState(false),he=Pe=>{K||ue(Pe);},ye=Pe=>{he(true),C?.({key:a,domEvent:Pe});},pe=Pe=>{he(false),x?.({key:a,domEvent:Pe});},ie=f__namespace.useMemo(()=>Z||(N!=="inline"?ce||Y([L],a):false),[N,Z,L,ce,a,Y]),ge=J6(q.length),Se=Pe=>{K||(w?.({key:a,domEvent:Pe}),N==="inline"&&W(a,!re));},ke=dc(Pe=>{y?.(Kf(Pe)),D(Pe);}),qe=Pe=>{N!=="inline"&&W(a,Pe);},De=()=>{O(a);},ze=P&&`${P}-popup`,je=f__namespace.useMemo(()=>f__namespace.createElement(eN,{icon:N!=="horizontal"?ee:void 0,props:{...e,isOpen:oe,isSubMenu:true}},f__namespace.createElement("i",{className:`${U}-arrow`})),[N,ee,e,oe,U]);let Le=f__namespace.createElement("div",nu({role:"menuitem",style:ge,className:`${U}-title`,tabIndex:K?null:-1,ref:J,title:typeof s=="string"?s:null,"data-menu-id":R&&P?null:P,"aria-expanded":oe,"aria-haspopup":true,"aria-controls":ze,"aria-disabled":K,onClick:Se,onFocus:De},te),s,je);const we=f__namespace.useRef(N);N!=="inline"&&q.length>1?we.current="vertical":we.current=N;const Me=we.current,Fe=f__namespace.useMemo(()=>{const Pe=f__namespace.createElement(eu,{classNames:i,styles:o,mode:Me==="horizontal"?"vertical":Me},f__namespace.createElement(tN,{id:ze,ref:Q},d)),Qe=$||B;return Qe?Qe(Pe,{item:e,keys:q}):Pe},[$,B,q,ze,d,e,Me]);if(!R){const Pe=we.current;Le=f__namespace.createElement(IH,{mode:Pe,prefixCls:U,visible:!u&&oe&&N!=="inline",popupClassName:h,popupOffset:g,popupStyle:b,popup:Fe,disabled:K,onVisibleChange:qe},Le);}let Re=f__namespace.createElement(oi.Item,nu({ref:t,role:"none"},E,{component:"li",style:n,className:H(U,`${U}-${N}`,r,{[`${U}-open`]:oe,[`${U}-active`]:ie,[`${U}-selected`]:be,[`${U}-disabled`]:K}),onMouseEnter:ye,onMouseLeave:pe}),Le,!R&&f__namespace.createElement(PH,{id:ze,open:oe,keyPath:q},d));return j&&(Re=j(Re,e,{selected:be,active:ie,open:oe,disabled:K})),f__namespace.createElement(eu,{classNames:i,styles:o,onItemClick:ke,mode:N==="horizontal"?"vertical":N,itemIcon:G,expandIcon:ee},Re)}),sp=f__namespace.forwardRef((e,t)=>{const{eventKey:n,children:r}=e,o=vl(n),i=l1(r,o),s=ip();f__namespace.useEffect(()=>{if(s)return s.registerPath(n,o),()=>{s.unregisterPath(n,o);}},[o]);let a;return s?a=i:a=f__namespace.createElement(NH,nu({ref:t},e),i),f__namespace.createElement(X6.Provider,{value:o},a)});function c1({className:e,style:t}){const{prefixCls:n}=f__namespace.useContext(go);return ip()?null:f__namespace.createElement("li",{role:"separator",className:H(`${n}-item-divider`,e),style:t})}function Xf(){return Xf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Xf.apply(this,arguments)}const MH=f__namespace.forwardRef((e,t)=>{const{className:n,title:r,eventKey:o,children:i,...s}=e,{prefixCls:a,classNames:l,styles:c}=f__namespace.useContext(go),u=`${a}-item-group`;return f__namespace.createElement("li",Xf({ref:t,role:"presentation"},s,{onClick:d=>d.stopPropagation(),className:H(u,n)}),f__namespace.createElement("div",{role:"presentation",className:H(`${u}-title`,l?.listTitle),style:c?.listTitle,title:typeof r=="string"?r:void 0},r),f__namespace.createElement("ul",{role:"group",className:H(`${u}-list`,l?.list),style:c?.list},i))}),u1=f__namespace.forwardRef((e,t)=>{const{eventKey:n,children:r}=e,o=vl(n),i=l1(r,o);return ip()?i:f__namespace.createElement(MH,Xf({ref:t},Zt(e,["warnKey"])),i)});function Pa(){return Pa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Pa.apply(this,arguments)}function av(e,t,n){const{item:r,group:o,submenu:i,divider:s}=t;return (e||[]).map((a,l)=>{if(a&&typeof a=="object"){const{label:c,children:u,key:d,type:m,extra:p,...h}=a,g=d??`tmp-${l}`;return u||m==="group"?m==="group"?f__namespace.createElement(o,Pa({key:g},h,{title:c}),av(u,t,n)):f__namespace.createElement(i,Pa({key:g},h,{title:c}),av(u,t,n)):m==="divider"?f__namespace.createElement(s,Pa({key:g},h)):f__namespace.createElement(r,Pa({key:g},h,{extra:p}),c,(!!p||p===0)&&f__namespace.createElement("span",{className:`${n}-item-extra`},p))}return null}).filter(a=>a)}function US(e,t,n,r,o){let i=e;const s={divider:c1,item:Du,group:u1,submenu:sp,...r};return t&&(i=av(t,s,o)),l1(i,n)}function lv(){return lv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},lv.apply(this,arguments)}const us=[],RH=f__namespace.forwardRef((e,t)=>{const{prefixCls:n="rc-menu",rootClassName:r,style:o,className:i,styles:s,classNames:a,tabIndex:l=0,items:c,children:u,direction:d,id:m,mode:p="vertical",inlineCollapsed:h,disabled:g,disabledOverflow:b,subMenuOpenDelay:y=.1,subMenuCloseDelay:C=.1,forceSubMenuRender:x,defaultOpenKeys:w,openKeys:S,activeKey:I,defaultActiveFirst:$,selectable:E=true,multiple:P=false,defaultSelectedKeys:M,selectedKeys:N,onSelect:A,onDeselect:k,inlineIndent:R=24,motion:L,defaultMotions:V,triggerSubMenuAction:_="hover",builtinPlacements:z,itemIcon:D,expandIcon:W,overflowedIndicator:O="...",overflowedIndicatorPopupClassName:B,getPopupContainer:j,onClick:Y,onOpenChange:q,onKeyDown:U,openAnimation:K,openTransitionName:J,_internalRenderMenuItem:Q,_internalRenderSubMenuItem:G,_internalComponents:ee,popupRender:re,...oe}=e,[be,Z]=f__namespace.useMemo(()=>[US(u,c,us,ee,n),US(u,c,us,{},n)],[u,c,ee]),[te,ce]=f__namespace.useState(false),ue=f__namespace.useRef(),he=Ws(m?`rc-menu-uuid-${m}`:"rc-menu-uuid"),ye=d==="rtl",[pe,ie]=Bt(w,S),ge=pe||us,Se=(me,Ae=false)=>{function Ge(){ie(me),q?.(me);}Ae?ST.flushSync(Ge):Ge();},[ke,qe]=f__namespace.useState(ge),De=f__namespace.useRef(false),[ze,je]=f__namespace.useMemo(()=>(p==="inline"||p==="vertical")&&h?["vertical",h]:[p,false],[p,h]),Le=ze==="inline",[we,Me]=f__namespace.useState(ze),[Fe,Re]=f__namespace.useState(je);f__namespace.useEffect(()=>{Me(ze),Re(je),De.current&&(Le?ie(ke):Se(us));},[ze,je]);const[Pe,Qe]=f__namespace.useState(0),mt=Pe>=be.length-1||we!=="horizontal"||b;f__namespace.useEffect(()=>{Le&&qe(ge);},[ge]),f__namespace.useEffect(()=>(De.current=true,()=>{De.current=false;}),[]);const{registerPath:it,unregisterPath:ct,refreshOverflowKeys:bt,isSubPathKey:pt,getKeyPath:rt,getKeys:et,getSubPathKeys:Xe}=vH(),Ie=f__namespace.useMemo(()=>({registerPath:it,unregisterPath:ct}),[it,ct]),Ne=f__namespace.useMemo(()=>({isSubPathKey:pt}),[pt]);f__namespace.useEffect(()=>{bt(mt?us:be.slice(Pe+1).map(me=>me.key));},[Pe,mt]);const[ae,ve]=Bt(I||$&&be[0]?.key,I),de=dc(me=>{ve(me);}),se=dc(()=>{ve(void 0);});f.useImperativeHandle(t,()=>({list:ue.current,focus:me=>{const Ae=et(),{elements:Ge,key2element:ut,element2key:Pt}=Gf(Ae,he),qt=s1(ue.current,Ge);let Xt;ae&&Ae.includes(ae)?Xt=ae:Xt=qt[0]?Pt.get(qt[0]):be.find(Br=>!Br.props.disabled)?.key;const hn=ut.get(Xt);Xt&&hn&&hn?.focus?.(me);},findItem:({key:me})=>{const Ae=et(),{key2element:Ge}=Gf(Ae,he);return Ge.get(me)||null}}));const[Ce,fe]=Bt(M||[],N),xe=f__namespace.useMemo(()=>Array.isArray(Ce)?Ce:Ce==null?us:[Ce],[Ce]),Oe=me=>{if(E){const{key:Ae}=me,Ge=xe.includes(Ae);let ut;P?Ge?ut=xe.filter(qt=>qt!==Ae):ut=[...xe,Ae]:ut=[Ae],fe(ut);const Pt={...me,selectedKeys:ut};Ge?k?.(Pt):A?.(Pt);}!P&&ge.length&&we!=="inline"&&Se(us);},We=dc(me=>{Y?.(Kf(me)),Oe(me);}),Ze=dc((me,Ae)=>{let Ge=ge.filter(ut=>ut!==me);if(Ae)Ge.push(me);else if(we!=="inline"){const ut=Xe(me);Ge=Ge.filter(Pt=>!ut.has(Pt));}zi(ge,Ge,true)||Se(Ge,true);}),Ct=hH(we,ae,ye,he,ue,et,rt,ve,(me,Ae)=>{const Ge=Ae??!ge.includes(me);Ze(me,Ge);},U);f__namespace.useEffect(()=>{ce(true);},[]);const an=f__namespace.useMemo(()=>({_internalRenderMenuItem:Q,_internalRenderSubMenuItem:G}),[Q,G]),On=we!=="horizontal"||b?be:be.map((me,Ae)=>f__namespace.createElement(eu,{key:me.key,overflowDisabled:Ae>Pe,classNames:a,styles:s},me)),Rt=f__namespace.createElement(oi,lv({id:m,ref:ue,prefixCls:`${n}-overflow`,component:"ul",itemComponent:Du,className:H(n,`${n}-root`,`${n}-${we}`,i,{[`${n}-inline-collapsed`]:Fe,[`${n}-rtl`]:ye},r),dir:d,style:o,role:"menu",tabIndex:l,data:On,renderRawItem:me=>me,renderRawRest:me=>{const Ae=me.length,Ge=Ae?be.slice(-Ae):null;return f__namespace.createElement(sp,{eventKey:ov,title:O,disabled:mt,internalPopupClose:Ae===0,popupClassName:B},Ge)},maxCount:we!=="horizontal"||b?oi.INVALIDATE:oi.RESPONSIVE,ssr:"full","data-menu-list":true,onVisibleChange:me=>{Qe(me);},onKeyDown:Ct},oe));return f__namespace.createElement(o1.Provider,{value:an},f__namespace.createElement(q6.Provider,{value:he},f__namespace.createElement(eu,{prefixCls:n,rootClassName:r,classNames:a,styles:s,mode:we,openKeys:ge,rtl:ye,disabled:g,motion:te?L:null,defaultMotions:te?V:null,activeKey:ae,onActive:de,onInactive:se,selectedKeys:xe,inlineIndent:R,subMenuOpenDelay:y,subMenuCloseDelay:C,forceSubMenuRender:x,builtinPlacements:z,triggerSubMenuAction:_,getPopupContainer:j,itemIcon:D,expandIcon:W,onItemClick:We,onOpenChange:Ze,popupRender:re},f__namespace.createElement(Y6.Provider,{value:Ne},Rt),f__namespace.createElement("div",{style:{display:"none"},"aria-hidden":true},f__namespace.createElement(K6.Provider,{value:Ie},Z)))))}),yl=RH;yl.Item=Du;yl.SubMenu=sp;yl.ItemGroup=u1;yl.Divider=c1;const rN=f__namespace.createContext({});var AH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};function cv(){return cv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},cv.apply(this,arguments)}const TH=(e,t)=>f__namespace.createElement(on,cv({},e,{ref:t,icon:AH})),d1=f__namespace.forwardRef(TH),Yf=f.createContext({prefixCls:"",firstLevel:true,inlineCollapsed:false,styles:null,classNames:null}),oN=e=>{const{prefixCls:t,className:n,dashed:r,...o}=e,{getPrefixCls:i}=f__namespace.useContext(ot),s=i("menu",t),a=H({[`${s}-item-divider-dashed`]:!!r},n);return f__namespace.createElement(c1,{className:a,...o})},iN=e=>{const{className:t,children:n,icon:r,title:o,danger:i,extra:s}=e,{prefixCls:a,firstLevel:l,direction:c,disableMenuItemTitleTooltip:u,inlineCollapsed:d,styles:m,classNames:p}=f__namespace.useContext(Yf),h=w=>{const S=n?.[0],I=f__namespace.createElement("span",{className:H(`${a}-title-content`,l?p.itemContent:p.subMenu.itemContent,{[`${a}-title-content-with-extra`]:!!s||s===0}),style:l?m.itemContent:m.subMenu.itemContent},n);return (!r||f__namespace.isValidElement(n)&&n.type==="span")&&n&&w&&l&&typeof S=="string"?f__namespace.createElement("div",{className:`${a}-inline-collapsed-noicon`},S.charAt(0)):I},{siderCollapsed:g}=f__namespace.useContext(rN);let b=o;typeof o>"u"?b=l?n:"":o===false&&(b="");const y={title:b};!g&&!d&&(y.title=null,y.open=false);const C=gr(n).length;let x=f__namespace.createElement(Du,{...Zt(e,["title","icon","danger"]),className:H(l?p.item:p.subMenu.item,{[`${a}-item-danger`]:i,[`${a}-item-only-child`]:(r?C+1:C)===1},t),style:{...l?m.item:m.subMenu.item,...e.style},title:typeof o=="string"?o:void 0},Rn(r,w=>({className:H(`${a}-item-icon`,l?p.itemIcon:p.subMenu.itemIcon,w.className),style:{...l?m.itemIcon:m.subMenu.itemIcon,...w.style}})),h(d));return u||(x=f__namespace.createElement(Zi,{...y,placement:c==="rtl"?"left":"right",classNames:{root:`${a}-inline-collapsed-tooltip`}},x)),x},Qf=f__namespace.createContext(null),OH=f__namespace.forwardRef((e,t)=>{const{children:n,...r}=e,o=f__namespace.useContext(Qf),i=f__namespace.useMemo(()=>({...o,...r}),[o,r.prefixCls,r.mode,r.selectable,r.rootClassName]),s=UO(n),a=Hs(t,s?js(n):null);return f__namespace.createElement(Qf.Provider,{value:i},f__namespace.createElement(Hi,{space:true},s?f__namespace.cloneElement(n,{ref:a}):n))}),FH=e=>{const{componentCls:t,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:o,lineWidth:i,lineType:s,itemPaddingInline:a}=e;return {[`${t}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${X(i)} ${s} ${o}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:a},[`> ${t}-item:hover,
> ${t}-item-active,
> ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color ${n}`,`background ${n}`].join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},LH=({componentCls:e,menuArrowOffset:t,calc:n})=>({[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical,
${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${X(n(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${X(t)})`}}}}),GS=e=>Bo(e),KS=(e,t)=>{const{componentCls:n,itemColor:r,itemSelectedColor:o,subMenuItemSelectedColor:i,groupTitleColor:s,itemBg:a,subMenuItemBg:l,itemSelectedBg:c,activeBarHeight:u,activeBarWidth:d,activeBarBorderWidth:m,motionDurationSlow:p,motionEaseInOut:h,motionEaseOut:g,itemPaddingInline:b,motionDurationMid:y,itemHoverColor:C,lineType:x,colorSplit:w,itemDisabledColor:S,dangerItemColor:I,dangerItemHoverColor:$,dangerItemSelectedColor:E,dangerItemActiveBg:P,dangerItemSelectedBg:M,popupBg:N,itemHoverBg:A,itemActiveBg:k,menuSubMenuBg:R,horizontalItemSelectedColor:L,horizontalItemSelectedBg:V,horizontalItemBorderRadius:_,horizontalItemHoverBg:z}=e;return {[`${n}-${t}, ${n}-${t} > ${n}`]:{color:r,background:a,[`&${n}-root:focus-visible`]:{...GS(e)},[`${n}-item`]:{"&-group-title, &-extra":{color:s}},[`${n}-submenu-selected > ${n}-submenu-title`]:{color:i},[`${n}-item, ${n}-submenu-title`]:{color:r,[`&:not(${n}-item-disabled):focus-visible`]:{...GS(e)}},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${S} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:C}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:A},"&:active":{backgroundColor:k}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:A},"&:active":{backgroundColor:k}}},[`${n}-item-danger`]:{color:I,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:$}},[`&${n}-item:active`]:{background:P}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:o,[`&${n}-item-danger`]:{color:E},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:c,[`&${n}-item-danger`]:{backgroundColor:M}},[`&${n}-submenu > ${n}`]:{backgroundColor:R},[`&${n}-popup > ${n}`]:{backgroundColor:N},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:N},[`&${n}-horizontal`]:{...t==="dark"?{borderBottom:0}:{},[`> ${n}-item, > ${n}-submenu`]:{top:m,marginTop:e.calc(m).mul(-1).equal(),marginBottom:0,borderRadius:_,"&::after":{position:"absolute",insetInline:b,bottom:0,borderBottom:`${X(u)} solid transparent`,transition:`border-color ${p} ${h}`,content:'""'},"&:hover, &-active, &-open":{background:z,"&::after":{borderBottomWidth:u,borderBottomColor:L}},"&-selected":{color:L,backgroundColor:V,"&:hover":{backgroundColor:V},"&::after":{borderBottomWidth:u,borderBottomColor:L}}}},[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${X(m)} ${x} ${w}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:l},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${X(d)} solid ${o}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${y} ${g}`,`opacity ${y} ${g}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:E}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${y} ${h}`,`opacity ${y} ${h}`].join(",")}}}}}},XS=e=>{const{componentCls:t,itemHeight:n,itemMarginInline:r,padding:o,menuArrowSize:i,marginXS:s,itemMarginBlock:a,itemWidth:l,itemPaddingInline:c}=e,u=e.calc(i).add(o).add(s).equal();return {[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:n,lineHeight:X(n),paddingInline:c,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:a,width:l},[`> ${t}-item,
> ${t}-submenu > ${t}-submenu-title`]:{height:n,lineHeight:X(n)},[`${t}-item-group-list ${t}-submenu-title,
${t}-submenu-title`]:{paddingInlineEnd:u}}},BH=e=>{const{componentCls:t,iconCls:n,itemHeight:r,colorTextLightSolid:o,dropdownWidth:i,controlHeightLG:s,motionEaseOut:a,paddingXL:l,itemMarginInline:c,fontSizeLG:u,motionDurationFast:d,motionDurationSlow:m,paddingXS:p,boxShadowSecondary:h,collapsedWidth:g,collapsedIconSize:b}=e,y={height:r,lineHeight:X(r),listStylePosition:"inside",listStyleType:"disc"};return [{[t]:{"&-inline, &-vertical":{[`&${t}-root`]:{boxShadow:"none"},...XS(e)}},[`${t}-submenu-popup`]:{[`${t}-vertical`]:{...XS(e),boxShadow:h}}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:i,maxHeight:`calc(100vh - ${X(e.calc(s).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${t}-inline`]:{width:"100%",[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${m}`,`background ${m}`,`padding ${d} ${a}`].join(","),[`> ${t}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${t}-submenu > ${t}-submenu-title`]:y,[`& ${t}-item-group-title`]:{paddingInlineStart:l}},[`${t}-item`]:y}},{[`${t}-inline-collapsed`]:{width:g,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:u,textAlign:"center"}}},[`> ${t}-item,
> ${t}-item-group > ${t}-item-group-list > ${t}-item,
> ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,
> ${t}-submenu > ${t}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${X(e.calc(b).div(2).equal())} - ${X(c)})`,textOverflow:"clip",[`
${t}-submenu-arrow,
${t}-submenu-expand-icon
`]:{opacity:0},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:b,lineHeight:X(r),"+ span":{display:"inline-block",opacity:0}}},[`${t}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${n}`]:{display:"none"},"a, a:hover":{color:o}},[`${t}-item-group-title`]:{...Lo,paddingInline:p}}}]},YS=e=>{const{componentCls:t,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:o,motionEaseOut:i,iconCls:s,iconSize:a,iconMarginInlineEnd:l}=e;return {[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${n}`,`background ${n}`,`padding calc(${n} + 0.1s) ${o}`].join(","),[`${t}-item-icon, ${s}`]:{minWidth:a,fontSize:a,transition:[`font-size ${r} ${i}`,`margin ${n} ${o}`,`color ${n}`].join(","),"+ span":{marginInlineStart:l,opacity:1,transition:[`opacity ${n} ${o}`,`margin ${n}`,`color ${n}`].join(",")}},[`${t}-item-icon`]:{...Gs()},[`&${t}-item-only-child`]:{[`> ${s}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${t}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},QS=e=>{const{componentCls:t,motionDurationSlow:n,motionEaseInOut:r,borderRadius:o,menuArrowSize:i,menuArrowOffset:s}=e;return {[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:i,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${n} ${r}, opacity ${n}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(i).mul(.6).equal(),height:e.calc(i).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:o,transition:[`background ${n} ${r}`,`transform ${n} ${r}`,`top ${n} ${r}`,`color ${n} ${r}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${X(e.calc(s).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${X(s)})`}}}}},kH=e=>{const{antCls:t,componentCls:n,fontSize:r,motionDurationSlow:o,motionDurationMid:i,motionEaseInOut:s,paddingXS:a,padding:l,colorSplit:c,lineWidth:u,zIndexPopup:d,borderRadiusLG:m,subMenuItemBorderRadius:p,menuArrowSize:h,menuArrowOffset:g,lineType:b,groupTitleLineHeight:y,groupTitleFontSize:C}=e;return [{"":{[n]:{...Of(),"&-hidden":{display:"none"}}},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:{...Lt(e),...Of(),marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${o} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${n}-item`]:{flex:"none"}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${X(a)} ${X(l)}`,fontSize:C,lineHeight:y,transition:`all ${o}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color ${o} ${s}`,`background ${o} ${s}`].join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${o} ${s}`,`background ${o} ${s}`,`padding ${i} ${s}`].join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:[`background ${o} ${s}`,`padding ${o} ${s}`].join(",")},[`${n}-title-content`]:{transition:`color ${o}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${t}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${n}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:e.padding}},[`${n}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${n}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:c,borderStyle:b,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:"dashed"}},...YS(e),[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${X(e.calc(r).mul(2).equal())} ${X(l)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:d,borderRadius:m,boxShadow:"none",transformOrigin:"0 0",[`&${n}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${n}`]:{borderRadius:m,...YS(e),...QS(e),[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:p},[`${n}-submenu-title::after`]:{transition:`transform ${o} ${s}`}}},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:e.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:e.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:e.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:e.paddingXS}},...QS(e),[`&-inline-collapsed ${n}-submenu-arrow,
&-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${X(g)})`},"&::after":{transform:`rotate(45deg) translateX(${X(e.calc(g).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${X(e.calc(h).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${X(e.calc(g).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${X(g)})`}}}},{[`${t}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},DH=e=>{const{colorPrimary:t,colorError:n,colorTextDisabled:r,colorErrorBg:o,colorText:i,colorTextDescription:s,colorBgContainer:a,colorFillAlter:l,colorFillContent:c,lineWidth:u,lineWidthBold:d,controlItemBgActive:m,colorBgTextHover:p,controlHeightLG:h,lineHeight:g,colorBgElevated:b,marginXXS:y,padding:C,fontSize:x,controlHeightSM:w,fontSizeLG:S,colorTextLightSolid:I,colorErrorHover:$}=e,E=e.activeBarWidth??0,P=e.activeBarBorderWidth??u,M=e.itemMarginInline??e.marginXXS,N=new Ft(I).setA(.65).toRgbString();return {dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:i,itemColor:i,colorItemTextHover:i,itemHoverColor:i,colorItemTextHoverHorizontal:t,horizontalItemHoverColor:t,colorGroupTitle:s,groupTitleColor:s,colorItemTextSelected:t,itemSelectedColor:t,subMenuItemSelectedColor:t,colorItemTextSelectedHorizontal:t,horizontalItemSelectedColor:t,colorItemBg:a,itemBg:a,colorItemBgHover:p,itemHoverBg:p,colorItemBgActive:c,itemActiveBg:m,colorSubItemBg:l,subMenuItemBg:l,colorItemBgSelected:m,itemSelectedBg:m,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:E,colorActiveBarHeight:d,activeBarHeight:d,colorActiveBarBorderSize:u,activeBarBorderWidth:P,colorItemTextDisabled:r,itemDisabledColor:r,colorDangerItemText:n,dangerItemColor:n,colorDangerItemTextHover:n,dangerItemHoverColor:n,colorDangerItemTextSelected:n,dangerItemSelectedColor:n,colorDangerItemBgActive:o,dangerItemActiveBg:o,colorDangerItemBgSelected:o,dangerItemSelectedBg:o,itemMarginInline:M,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:h,groupTitleLineHeight:g,collapsedWidth:h*2,popupBg:b,itemMarginBlock:y,itemPaddingInline:C,horizontalLineHeight:`${h*1.15}px`,iconSize:x,iconMarginInlineEnd:w-x,collapsedIconSize:S,groupTitleFontSize:x,darkItemDisabledColor:new Ft(I).setA(.25).toRgbString(),darkItemColor:N,darkDangerItemColor:n,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:I,darkItemSelectedBg:t,darkDangerItemSelectedBg:n,darkItemHoverBg:"transparent",darkGroupTitleColor:N,darkItemHoverColor:I,darkDangerItemHoverColor:$,darkDangerItemSelectedColor:I,darkDangerItemActiveBg:n,itemWidth:E?`calc(100% + ${P}px)`:`calc(100% - ${M*2}px)`}},zH=(e,t=e,n=true)=>xt("Menu",o=>{const{colorBgElevated:i,controlHeightLG:s,fontSize:a,darkItemColor:l,darkDangerItemColor:c,darkItemBg:u,darkSubMenuItemBg:d,darkItemSelectedColor:m,darkItemSelectedBg:p,darkDangerItemSelectedBg:h,darkItemHoverBg:g,darkGroupTitleColor:b,darkItemHoverColor:y,darkItemDisabledColor:C,darkDangerItemHoverColor:x,darkDangerItemSelectedColor:w,darkDangerItemActiveBg:S,popupBg:I,darkPopupBg:$}=o,E=o.calc(a).div(7).mul(5).equal(),P=vt(o,{menuArrowSize:E,menuHorizontalHeight:o.calc(s).mul(1.15).equal(),menuArrowOffset:o.calc(E).mul(.25).equal(),menuSubMenuBg:i,calc:o.calc,popupBg:I}),M=vt(P,{itemColor:l,itemHoverColor:y,groupTitleColor:b,itemSelectedColor:m,subMenuItemSelectedColor:m,itemBg:u,popupBg:$,subMenuItemBg:d,itemActiveBg:"transparent",itemSelectedBg:p,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:g,itemDisabledColor:C,dangerItemColor:c,dangerItemHoverColor:x,dangerItemSelectedColor:w,dangerItemActiveBg:S,dangerItemSelectedBg:h,menuSubMenuBg:d,horizontalItemSelectedColor:m,horizontalItemSelectedBg:p});return [kH(P),FH(P),BH(P),KS(P,"light"),KS(M,"dark"),LH(P),PP(P),ji(P,"slide-up"),ji(P,"slide-down"),Tu(P,"zoom-big")]},DH,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:n,unitless:{groupTitleLineHeight:true}})(e,t),sN=e=>{const{popupClassName:t,icon:n,title:r,theme:o}=e,i=f__namespace.useContext(Yf),{prefixCls:s,inlineCollapsed:a,theme:l,classNames:c,styles:u}=i,d=vl();let m;if(!n)m=a&&!d.length&&r&&typeof r=="string"?f__namespace.createElement("div",{className:`${s}-inline-collapsed-noicon`},r.charAt(0)):f__namespace.createElement("span",{className:`${s}-title-content`},r);else {const g=f__namespace.isValidElement(r)&&r.type==="span";m=f__namespace.createElement(f__namespace.Fragment,null,Rn(n,b=>({className:H(b.className,`${s}-item-icon`,c.itemIcon),style:{...b.style,...u.itemIcon}})),g?r:f__namespace.createElement("span",{className:`${s}-title-content`},r));}const p=f__namespace.useMemo(()=>({...i,firstLevel:false}),[i]),[h]=Us("Menu");return f__namespace.createElement(Yf.Provider,{value:p},f__namespace.createElement(sp,{...Zt(e,["icon"]),title:m,classNames:{list:c.subMenu.list,listTitle:c.subMenu.itemTitle},styles:{list:u.subMenu.list,listTitle:u.subMenu.itemTitle},popupClassName:H(s,t,c.popup.root,`${s}-${o||l}`),popupStyle:{zIndex:h,...e.popupStyle,...u.popup.root}}))};function Zh(e){return e===null||e===false}const _H={item:iN,submenu:sN,divider:oN},HH=f.forwardRef((e,t)=>{const n=f__namespace.useContext(Qf),r=n||{},{prefixCls:o,className:i,style:s,theme:a="light",expandIcon:l,_internalDisableMenuItemTitleTooltip:c,inlineCollapsed:u,siderCollapsed:d,rootClassName:m,mode:p,selectable:h,onClick:g,overflowedIndicatorPopupClassName:b,classNames:y,styles:C,...x}=e,{menu:w}=f__namespace.useContext(ot),{getPrefixCls:S,getPopupContainer:I,direction:$,className:E,style:P,classNames:M,styles:N}=St("menu"),A=S(),k=Zt(x,["collapsedWidth"]);r.validator?.({mode:p});const R=lt((...Q)=>{g?.(...Q),r.onClick?.();}),L=r.mode||p,V=h??r.selectable,_=u??d,z={...e,mode:L,inlineCollapsed:_,selectable:V,theme:a},[D,W]=It([M,y],[N,C],{props:z},{popup:{_default:"root"},subMenu:{_default:"item"}}),O={horizontal:{motionName:`${A}-slide-up`},inline:$P(A),other:{motionName:`${A}-zoom-big`}},B=S("menu",o||r.prefixCls),j=sn(B),[Y,q]=zH(B,j,!n),U=H(`${B}-${a}`,E,i),K=f__namespace.useMemo(()=>{if(typeof l=="function"||Zh(l))return l||null;if(typeof r.expandIcon=="function"||Zh(r.expandIcon))return r.expandIcon||null;if(typeof w?.expandIcon=="function"||Zh(w?.expandIcon))return w?.expandIcon||null;const Q=l??r?.expandIcon??w?.expandIcon;return Rn(Q,{className:H(`${B}-submenu-expand-icon`,f__namespace.isValidElement(Q)?Q.props?.className:void 0)})},[l,r?.expandIcon,w?.expandIcon,B]),J=f__namespace.useMemo(()=>({prefixCls:B,inlineCollapsed:_||false,direction:$,firstLevel:true,theme:a,mode:L,disableMenuItemTitleTooltip:c,classNames:D,styles:W}),[B,_,$,c,a,L,D,W]);return f__namespace.createElement(Qf.Provider,{value:null},f__namespace.createElement(Yf.Provider,{value:J},f__namespace.createElement(yl,{getPopupContainer:I,overflowedIndicator:f__namespace.createElement(d1,null),overflowedIndicatorPopupClassName:H(B,`${B}-${a}`,b),classNames:{list:D.list,listTitle:D.itemTitle},styles:{list:W.list,listTitle:W.itemTitle},mode:L,selectable:V,onClick:R,...k,inlineCollapsed:_,style:{...W.root,...P,...s},className:U,prefixCls:B,direction:$,defaultMotions:O,expandIcon:K,ref:t,rootClassName:H(m,Y,r.rootClassName,q,j,D.root),_internalComponents:_H})))}),es=f.forwardRef((e,t)=>{const n=f.useRef(null),r=f__namespace.useContext(rN);return f.useImperativeHandle(t,()=>({menu:n.current,focus:o=>{n.current?.focus(o);}})),f__namespace.createElement(HH,{ref:n,...e,...r})});es.Item=iN;es.SubMenu=sN;es.Divider=oN;es.ItemGroup=u1;const VH=e=>{const{componentCls:t,menuCls:n,colorError:r,colorTextLightSolid:o}=e,i=`${n}-item`;return {[`${t}, ${t}-menu-submenu`]:{[`${n} ${i}`]:{[`&${i}-danger:not(${i}-disabled)`]:{color:r,"&:hover":{color:o,backgroundColor:r}}}}}},jH=e=>{const{componentCls:t,menuCls:n,zIndexPopup:r,dropdownArrowDistance:o,sizePopupArrow:i,antCls:s,iconCls:a,motionDurationMid:l,paddingBlock:c,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:m,fontSizeIcon:p,controlPaddingHorizontal:h,colorBgElevated:g}=e;return [{[t]:{position:"absolute",top:-9999,left:{_skip_check_:true,value:-9999},zIndex:r,display:"block","&::before":{position:"absolute",insetBlock:e.calc(i).div(2).sub(o).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${s}-btn`]:{[`& > ${a}-down, & > ${s}-btn-icon > ${a}-down`]:{fontSize:p}},[`${t}-wrap`]:{position:"relative",[`${s}-btn > ${a}-down`]:{fontSize:p},[`${a}-down::before`]:{transition:`transform ${l}`}},[`${t}-wrap-open`]:{[`${a}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${s}-slide-down-enter${s}-slide-down-enter-active${t}-placement-bottomLeft,
&${s}-slide-down-appear${s}-slide-down-appear-active${t}-placement-bottomLeft,
&${s}-slide-down-enter${s}-slide-down-enter-active${t}-placement-bottom,
&${s}-slide-down-appear${s}-slide-down-appear-active${t}-placement-bottom,
&${s}-slide-down-enter${s}-slide-down-enter-active${t}-placement-bottomRight,
&${s}-slide-down-appear${s}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:Ry},[`&${s}-slide-up-enter${s}-slide-up-enter-active${t}-placement-topLeft,
&${s}-slide-up-appear${s}-slide-up-appear-active${t}-placement-topLeft,
&${s}-slide-up-enter${s}-slide-up-enter-active${t}-placement-top,
&${s}-slide-up-appear${s}-slide-up-appear-active${t}-placement-top,
&${s}-slide-up-enter${s}-slide-up-enter-active${t}-placement-topRight,
&${s}-slide-up-appear${s}-slide-up-appear-active${t}-placement-topRight`]:{animationName:Ty},[`&${s}-slide-down-leave${s}-slide-down-leave-active${t}-placement-bottomLeft,
&${s}-slide-down-leave${s}-slide-down-leave-active${t}-placement-bottom,
&${s}-slide-down-leave${s}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:Ay},[`&${s}-slide-up-leave${s}-slide-up-leave-active${t}-placement-topLeft,
&${s}-slide-up-leave${s}-slide-up-leave-active${t}-placement-top,
&${s}-slide-up-leave${s}-slide-up-leave-active${t}-placement-topRight`]:{animationName:Oy}}},Py(e,g,{arrowPlacement:{top:true,bottom:true}}),{[`${t} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:r,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${t}, ${t}-menu-submenu`]:{...Lt(e),[n]:{padding:d,listStyleType:"none",backgroundColor:g,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,...Tr(e),"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${X(c)} ${X(h)}`,color:e.colorTextDescription,transition:`all ${l}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${n}-item-icon`]:{minWidth:u,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${n}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${l}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${n}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:{display:"flex",margin:0,padding:`${X(c)} ${X(h)}`,color:e.colorText,fontWeight:"normal",fontSize:u,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${l}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover},...Tr(e),"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:m,cursor:"not-allowed","&:hover":{color:m,backgroundColor:g,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${X(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorIcon,fontSize:p,fontStyle:"normal"}}},[`${n}-item-group-list`]:{margin:`0 ${X(e.marginXS)}`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(h).add(e.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:m,backgroundColor:g,cursor:"not-allowed"}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}}}},[ji(e,"slide-up"),ji(e,"slide-down"),zf(e,"move-up"),zf(e,"move-down"),Tu(e,"zoom-big")]]},WH=e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...Xm({contentRadius:e.borderRadiusLG,limitVerticalRadius:true}),...Iy(e)}),qH=xt("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:o}=e,i=vt(e,{menuCls:`${o}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return [jH(i),VH(i)]},WH,{resetStyle:false}),ap=e=>{const{menu:t,arrow:n,prefixCls:r,children:o,trigger:i,disabled:s,dropdownRender:a,popupRender:l,getPopupContainer:c,overlayClassName:u,rootClassName:d,overlayStyle:m,open:p,onOpenChange:h,mouseEnterDelay:g=.15,mouseLeaveDelay:b=.1,autoAdjustOverflow:y=true,placement:C="",transitionName:x,classNames:w,styles:S,destroyPopupOnHide:I,destroyOnHidden:$}=e,{getPrefixCls:E,direction:P,getPopupContainer:M,className:N,style:A,classNames:k,styles:R}=St("dropdown"),L={...e,mouseEnterDelay:g,mouseLeaveDelay:b,autoAdjustOverflow:y},[V,_]=It([k,w],[R,S],{props:L}),z={...A,...m,..._.root},D=l||a,W=f__namespace.useMemo(()=>{const pe=E();return x!==void 0?x:C.includes("top")?`${pe}-slide-down`:`${pe}-slide-up`},[E,C,x]),O=f__namespace.useMemo(()=>C?C.includes("Center")?C.slice(0,C.indexOf("Center")):C:P==="rtl"?"bottomRight":"bottomLeft",[C,P]),B=E("dropdown",r),j=sn(B),[Y,q]=qH(B,j),[,U]=Tn(),K=f__namespace.Children.only(tH(o)?f__namespace.createElement("span",null,o):o),J=Rn(K,{className:H(`${B}-trigger`,{[`${B}-rtl`]:P==="rtl"},K.props.className),disabled:K.props.disabled??s}),Q=s?[]:i,G=!!Q?.includes("contextMenu"),[ee,re]=Bt(false,p),oe=lt(pe=>{h?.(pe,{source:"trigger"}),re(pe);}),be=H(u,d,Y,q,j,N,V.root,{[`${B}-rtl`]:P==="rtl"}),Z=IP({arrowPointAtCenter:typeof n=="object"&&n.pointAtCenter,autoAdjustOverflow:y,offset:U.marginXXS,arrowWidth:n?U.sizePopupArrow:0,borderRadius:U.borderRadius}),te=lt(()=>{t?.selectable&&t?.multiple||(h?.(false,{source:"menu"}),re(false));}),ce=()=>{const pe=Zt(V,["root"]),ie=Zt(_,["root"]);let ge;return t?.items&&(ge=f__namespace.createElement(es,{...t,classNames:{...pe,subMenu:{...pe}},styles:{...ie,subMenu:{...ie}}})),D&&(ge=D(ge)),ge=f__namespace.Children.only(typeof ge=="string"?f__namespace.createElement("span",null,ge):ge),f__namespace.createElement(OH,{prefixCls:`${B}-menu`,rootClassName:H(q,j),expandIcon:f__namespace.createElement("span",{className:`${B}-menu-submenu-arrow`},P==="rtl"?f__namespace.createElement(Jc,{className:`${B}-menu-submenu-arrow-icon`}):f__namespace.createElement(Ya,{className:`${B}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:false,onClick:te,validator:({mode:Se})=>{}},ge)},[ue,he]=Us("Dropdown",z.zIndex);let ye=f__namespace.createElement(H6,{alignPoint:G,...Zt(e,["rootClassName","onOpenChange"]),mouseEnterDelay:g,mouseLeaveDelay:b,visible:ee,builtinPlacements:Z,arrow:!!n,overlayClassName:be,prefixCls:B,getPopupContainer:c||M,transitionName:W,trigger:Q,overlay:ce,placement:O,onVisibleChange:oe,overlayStyle:{...z,zIndex:ue},autoDestroy:$??I},J);return ue&&(ye=f__namespace.createElement(Dm.Provider,{value:he},ye)),ye},UH=r1(ap,"align",void 0,"dropdown",e=>e),GH=e=>f__namespace.createElement(UH,{...e},f__namespace.createElement("span",null));ap._InternalPanelDoNotUseOrYouWillBeFired=GH;const aN=e=>{const{getPopupContainer:t,getPrefixCls:n,direction:r}=f__namespace.useContext(ot),{prefixCls:o,type:i="default",danger:s,disabled:a,loading:l,onClick:c,htmlType:u,children:d,className:m,menu:p,arrow:h,autoFocus:g,trigger:b,align:y,open:C,onOpenChange:x,placement:w,getPopupContainer:S,href:I,icon:$=f__namespace.createElement(d1,null),title:E,buttonsRender:P=G=>G,mouseEnterDelay:M,mouseLeaveDelay:N,overlayClassName:A,overlayStyle:k,destroyOnHidden:R,destroyPopupOnHide:L,dropdownRender:V,popupRender:_,...z}=e,D=n("dropdown",o),W=`${D}-button`,B={menu:p,arrow:h,autoFocus:g,align:y,disabled:a,trigger:a?[]:b,onOpenChange:x,getPopupContainer:S||t,mouseEnterDelay:M,mouseLeaveDelay:N,classNames:{root:A},styles:{root:k},destroyOnHidden:R,popupRender:_||V},{compactSize:j,compactItemClassnames:Y}=li(D,r),q=H(W,Y,m);"destroyPopupOnHide"in e&&(B.destroyPopupOnHide=L),"open"in e&&(B.open=C),"placement"in e?B.placement=w:B.placement=r==="rtl"?"bottomLeft":"bottomRight";const U=f__namespace.createElement(Je,{type:i,danger:s,disabled:a,loading:l,onClick:c,htmlType:u,href:I,title:E},d),K=f__namespace.createElement(Je,{type:i,danger:s,icon:$}),[J,Q]=P([U,K]);return f__namespace.createElement(Fr.Compact,{className:q,size:j,block:true,...z},J,f__namespace.createElement(ap,{...B},Q))};aN.__ANT_BUTTON=true;const ts=ap;ts.Button=aN;function ZS(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,true)}function JS(e,t,n){var r=[],o=Cy(e,r,n);return r.length<2?n:o+t(r)}var lN=function(t){var n=mP(t);n.sheet.speedy=function(a){this.isSpeedy=a;},n.compat=true;var r=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var d=Oa(c,n.registered,void 0);return xy(n,d,false),n.key+"-"+d.name},o=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var d=Oa(c,n.registered),m="animation-"+d.name;return ZS(n,{name:d.name,styles:"@keyframes "+m+"{"+d.styles+"}"}),m},i=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var d=Oa(c,n.registered);ZS(n,d);},s=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return JS(n.registered,r,KH(c))};return {css:r,cx:s,injectGlobal:i,keyframes:o,hydrate:function(l){l.forEach(function(c){n.inserted[c]=true;});},flush:function(){n.registered={},n.inserted={},n.sheet.flush();},sheet:n.sheet,cache:n,getRegisteredStyles:Cy.bind(null,n.registered),merge:JS.bind(null,n.registered,r)}},KH=function e(t){for(var n="",r=0;r<t.length;r++){var o=t[r];if(o!=null){var i=void 0;switch(typeof o){case "boolean":break;case "object":{if(Array.isArray(o))i=e(o);else {i="";for(var s in o)o[s]&&s&&(i&&(i+=" "),i+=s);}break}default:i=o;}i&&(n&&(n+=" "),n+=i);}}return n},cN=lN({key:"css"}),e$=cN.css,uN=cN.cache;const dN={createClass:e$,c:e$};class ns{qs;constructor(t){this.qs=new lp(t);}get hasMore(){return !!this.qs.bufferQueue.length||this.hasMoreExceptQueue}restore(){this.qs.restore();}async loadMore(t){if(!this.hasMore)return;if(this.qs.bufferQueue.length)return this.qs.sliceFromQueue();const n=await this.fetchMore(t);return n?.length&&this.qs.bufferQueue.push(...n),this.qs.sliceFromQueue()}}class lp{returnQueue=[];bufferQueue=[];get hasCache(){return !!this.returnQueue.length}ps;constructor(t=20){this.ps=t;}sliceCountFromQueue(t){if(this.bufferQueue.length){const n=this.bufferQueue.slice(0,t);return this.bufferQueue=this.bufferQueue.slice(t),this.doReturnItems(n)??[]}else return []}sliceFromQueue(t=1){return this.sliceCountFromQueue(this.ps*t)}doReturnItems(t){return this.returnQueue=[...this.returnQueue,...t??[]],t}restore(){this.bufferQueue=[...this.returnQueue,...this.bufferQueue],this.returnQueue=[];}get fetchedCount(){return this.returnQueue.length+this.bufferQueue.length}}function Ys(){const e=f.useRef(null),t=f.useCallback(()=>e.current?.closest(`.${E3}`)||document.body,[]);return {ref:e,getPopupContainer:t}}function uv(){return uv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},uv.apply(this,arguments)}const fN=f__namespace.forwardRef(({prefixCls:e="rc-switch",className:t,checked:n,defaultChecked:r,disabled:o,loadingIcon:i,checkedChildren:s,unCheckedChildren:a,onClick:l,onChange:c,onKeyDown:u,styles:d,classNames:m,...p},h)=>{const[g,b]=Bt(r??false,n);function y(S,I){let $=g;return o||($=S,b($),c?.($,I)),$}function C(S){S.which===_e.LEFT?y(false,S):S.which===_e.RIGHT&&y(true,S),u?.(S);}function x(S){const I=y(!g,S);l?.(I,S);}const w=H(e,t,{[`${e}-checked`]:g,[`${e}-disabled`]:o});return f__namespace.createElement("button",uv({},p,{type:"button",role:"switch","aria-checked":g,disabled:o,className:w,ref:h,onKeyDown:C,onClick:x}),i,f__namespace.createElement("span",{className:`${e}-inner`},f__namespace.createElement("span",{className:H(`${e}-inner-checked`,m?.content),style:d?.content},s),f__namespace.createElement("span",{className:H(`${e}-inner-unchecked`,m?.content),style:d?.content},a)))});fN.displayName="Switch";const XH=e=>{const{componentCls:t,trackHeightSM:n,trackPadding:r,trackMinWidthSM:o,innerMinMarginSM:i,innerMaxMarginSM:s,handleSizeSM:a,calc:l}=e,c=`${t}-inner`,u=X(l(a).add(l(r).mul(2)).equal()),d=X(l(s).mul(2).equal());return {[t]:{[`&${t}-small`]:{minWidth:o,height:n,lineHeight:X(n),[`${t}-inner`]:{paddingInlineStart:s,paddingInlineEnd:i,[`${c}-checked, ${c}-unchecked`]:{minHeight:n},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${u} - ${d})`,marginInlineEnd:`calc(100% - ${u} + ${d})`},[`${c}-unchecked`]:{marginTop:l(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:a,height:a},[`${t}-loading-icon`]:{top:l(l(a).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:i,paddingInlineEnd:s,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${u} + ${d})`,marginInlineEnd:`calc(-100% + ${u} - ${d})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${X(l(a).add(r).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:l(e.marginXXS).div(2).equal(),marginInlineEnd:l(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:l(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:l(e.marginXXS).div(2).equal()}}}}}}},YH=e=>{const{componentCls:t,handleSize:n,calc:r}=e;return {[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:r(r(n).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},QH=e=>{const{componentCls:t,trackPadding:n,handleBg:r,handleShadow:o,handleSize:i,calc:s}=e,a=`${t}-handle`;return {[t]:{[a]:{position:"absolute",top:n,insetInlineStart:n,width:i,height:i,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:s(i).div(2).equal(),boxShadow:o,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${a}`]:{insetInlineStart:`calc(100% - ${X(s(i).add(n).equal())})`},[`&:not(${t}-disabled):active`]:{[`${a}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${a}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},ZH=e=>{const{componentCls:t,trackHeight:n,trackPadding:r,innerMinMargin:o,innerMaxMargin:i,handleSize:s,calc:a}=e,l=`${t}-inner`,c=X(a(s).add(a(r).mul(2)).equal()),u=X(a(i).mul(2).equal());return {[t]:{[l]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:i,paddingInlineEnd:o,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${l}-checked, ${l}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:n},[`${l}-checked`]:{marginInlineStart:`calc(-100% + ${c} - ${u})`,marginInlineEnd:`calc(100% - ${c} + ${u})`},[`${l}-unchecked`]:{marginTop:a(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${l}`]:{paddingInlineStart:o,paddingInlineEnd:i,[`${l}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${l}-unchecked`]:{marginInlineStart:`calc(100% - ${c} + ${u})`,marginInlineEnd:`calc(-100% + ${c} - ${u})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${l}`]:{[`${l}-unchecked`]:{marginInlineStart:a(r).mul(2).equal(),marginInlineEnd:a(r).mul(-1).mul(2).equal()}},[`&${t}-checked ${l}`]:{[`${l}-checked`]:{marginInlineStart:a(r).mul(-1).mul(2).equal(),marginInlineEnd:a(r).mul(2).equal()}}}}}},JH=e=>{const{componentCls:t,trackHeight:n,trackMinWidth:r}=e;return {[t]:{...Lt(e),position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:r,height:n,lineHeight:X(n),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary},...Tr(e),[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}}}},eV=e=>{const{fontSize:t,lineHeight:n,controlHeight:r,colorWhite:o}=e,i=t*n,s=r/2,a=2,l=i-a*2,c=s-a*2;return {trackHeight:i,trackHeightSM:s,trackMinWidth:l*2+a*4,trackMinWidthSM:c*2+a*2,trackPadding:a,handleBg:o,handleSize:l,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new Ft("#00230b").setA(.2).toRgbString()}`,innerMinMargin:l/2,innerMaxMargin:l+a+a*2,innerMinMarginSM:c/2,innerMaxMarginSM:c+a+a*2}},tV=xt("Switch",e=>{const t=vt(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return [JH(t),ZH(t),QH(t),YH(t),XH(t)]},eV),nV=f__namespace.forwardRef((e,t)=>{const{prefixCls:n,size:r,disabled:o,loading:i,className:s,rootClassName:a,style:l,checked:c,value:u,defaultChecked:d,defaultValue:m,onChange:p,styles:h,classNames:g,...b}=e,[y,C]=Bt(d??m??false,c??u),{getPrefixCls:x,direction:w,className:S,style:I,classNames:$,styles:E}=St("switch"),P=f__namespace.useContext(zn),M=(o??P)||i,N=x("switch",n),A=f__namespace.createElement("div",{className:`${N}-handle`},i&&f__namespace.createElement(op,{className:`${N}-loading-icon`})),[k,R]=tV(N),L=Vn(r),V={...e,size:L,disabled:M},[_,z]=It([$,g],[E,h],{props:V}),D=H(S,{[`${N}-small`]:L==="small",[`${N}-loading`]:i,[`${N}-rtl`]:w==="rtl"},s,a,_.root,k,R),W={...z.root,...I,...l},O=(...B)=>{C(B[0]),p?.(...B);};return f__namespace.createElement(Mu,{component:"Switch",disabled:M},f__namespace.createElement(fN,{...b,classNames:_,styles:z,checked:y,onChange:O,prefixCls:N,className:D,style:W,disabled:M,ref:t,loadingIcon:A}))}),mN=nV;mN.__ANT_SWITCH=true;const pN=f.createContext(null),rV=e=>{const{checkboxCls:t}=e,n=`${t}-wrapper`;return [{[`${t}-group`]:{...Lt(e),display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}},[n]:{...Lt(e),display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${n}`]:{marginInlineStart:0},[`&${n}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}},[t]:{...Lt(e),position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:Bo(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${X(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}}},{[`
${n}:not(${n}-disabled),
${t}:not(${t}-disabled)
`]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${n}:not(${n}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[`
${n}-checked:not(${n}-disabled),
${t}-checked:not(${t}-disabled)
`]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${n}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function oV(e,t){const n=vt(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return rV(n)}const hN=xt("Checkbox",(e,{prefixCls:t})=>[oV(t,e)]),iV=(e,t)=>{const{prefixCls:n,className:r,rootClassName:o,children:i,indeterminate:s=false,style:a,onMouseEnter:l,onMouseLeave:c,skipGroup:u=false,disabled:d,classNames:m,styles:p,...h}=e,{getPrefixCls:g,direction:b,className:y,style:C,classNames:x,styles:w}=St("checkbox"),S=f__namespace.useContext(pN),{isFormItemInput:I}=f__namespace.useContext(Zn),$=f__namespace.useContext(zn),E=(S?.disabled||d)??$,P={...e,indeterminate:s,disabled:E},[M,N]=It([x,m],[w,p],{props:P}),A=f__namespace.useRef(h.value),k=f__namespace.useRef(null),R=In(t,k);f__namespace.useEffect(()=>{S?.registerValue(h.value);},[]),f__namespace.useEffect(()=>{if(!u)return h.value!==A.current&&(S?.cancelValue(A.current),S?.registerValue(h.value),A.current=h.value),()=>S?.cancelValue(h.value)},[h.value]),f__namespace.useEffect(()=>{k.current?.input&&(k.current.input.indeterminate=s);},[s]);const L=g("checkbox",n),V=sn(L),[_,z]=hN(L,V),D={...h};S&&!u&&(D.onChange=(...Y)=>{h.onChange&&h.onChange.apply(h,Y),S.toggleOption&&S.toggleOption({label:i,value:h.value});},D.name=S.name,D.checked=S.value.includes(h.value));const W=H(`${L}-wrapper`,{[`${L}-rtl`]:b==="rtl",[`${L}-wrapper-checked`]:D.checked,[`${L}-wrapper-disabled`]:E,[`${L}-wrapper-in-form-item`]:I},y,r,M.root,o,z,V,_),O=H(M.icon,{[`${L}-indeterminate`]:s},jm,_),[B,j]=oP(D.onClick);return f__namespace.createElement(Mu,{component:"Checkbox",disabled:E},f__namespace.createElement("label",{className:W,style:{...N.root,...C,...a},onMouseEnter:l,onMouseLeave:c,onClick:B},f__namespace.createElement(eP,{...D,onClick:j,prefixCls:L,className:O,style:N.icon,disabled:E,ref:R}),kn(i)&&f__namespace.createElement("span",{className:H(`${L}-label`,M.label),style:N.label},i)))},gN=f__namespace.forwardRef(iV),sV=f__namespace.forwardRef((e,t)=>{const{defaultValue:n,children:r,options:o=[],prefixCls:i,className:s,rootClassName:a,style:l,onChange:c,...u}=e,{getPrefixCls:d,direction:m}=f__namespace.useContext(ot),[p,h]=f__namespace.useState(u.value||n||[]),[g,b]=f__namespace.useState([]);f__namespace.useEffect(()=>{"value"in u&&h(u.value||[]);},[u.value]);const y=f__namespace.useMemo(()=>o.map(R=>typeof R=="string"||typeof R=="number"?{label:R,value:R}:R),[o]),C=R=>{b(L=>L.filter(V=>V!==R));},x=R=>{b(L=>[].concat(Et(L),[R]));},w=R=>{const L=p.indexOf(R.value),V=Et(p);L===-1?V.push(R.value):V.splice(L,1),"value"in u||h(V),c?.(V.filter(_=>g.includes(_)).sort((_,z)=>{const D=y.findIndex(O=>O.value===_),W=y.findIndex(O=>O.value===z);return D-W}));},S=d("checkbox",i),I=`${S}-group`,$=sn(S),[E,P]=hN(S,$),M=Zt(u,["value","disabled"]),N=o.length?y.map(R=>f__namespace.createElement(gN,{prefixCls:S,key:R.value.toString(),disabled:"disabled"in R?R.disabled:u.disabled,value:R.value,checked:p.includes(R.value),onChange:R.onChange,className:H(`${I}-item`,R.className),style:R.style,title:R.title,id:R.id,required:R.required},R.label)):r,A=f__namespace.useMemo(()=>({toggleOption:w,value:p,disabled:u.disabled,name:u.name,registerValue:x,cancelValue:C}),[w,p,u.disabled,u.name,x,C]),k=H(I,{[`${I}-rtl`]:m==="rtl"},s,a,P,$,E);return f__namespace.createElement("div",{className:k,style:l,...M,ref:t},f__namespace.createElement(pN.Provider,{value:A},N))}),Jr=gN;Jr.Group=sV;Jr.__ANT_CHECKBOX=true;function aV(e,t){const n=Mt(),r=!!nr(n,e,false),o=f.useCallback(a=>{sl(Ue,e,a),t?.(a);},[]),i=f.useCallback(a=>{o(a.target.checked);},[]),s=f.useCallback(()=>{o(!nr(Ue,e,false));},[]);return {checked:r,onChange:o,checkboxOnChange:i,onToggle:s}}const bN=f.forwardRef(function({configPath:e,label:t,extraAction:n,tooltip:r,tooltipProps:o,as:i,checkboxProps:s,switchProps:a},l){const{checked:c,onChange:u,checkboxOnChange:d}=aV(e,n),m=h=>r?v(Jt,{...o,title:r,children:h}):h;let p;if(typeof t=="function"?p=t(c):p=(t??e)||null,i==="checkbox"){let h=v("span",{style:{userSelect:"none"},children:p});return r&&(h=m(h)),v(Jr,{...s,checked:c,onChange:d,ref:l,children:h})}if(i==="switch"){let h=v(mN,{...a,checked:c,onChange:u,ref:l});return r&&(h=m(h)),h}}),at=f.forwardRef(function({configPath:e,label:t,extraAction:n,tooltip:r,tooltipProps:o,...i},s){return v(bN,{ref:s,configPath:e,label:t,extraAction:n,tooltip:r,tooltipProps:o,as:"checkbox",checkboxProps:i})}),gf=f.forwardRef(function({configPath:t,extraAction:n,tooltip:r,tooltipProps:o,...i},s){return v(bN,{ref:s,configPath:t,extraAction:n,tooltip:r,tooltipProps:o,as:"switch",switchProps:i})});var Ee=(e=>(e.Separator="separator",e.AppRecommend="app-recommend",e.PcRecommend="pc-recommend",e.DynamicFeed="dynamic-feed",e.Watchlater="watchlater",e.Fav="fav",e.PopularGeneral="popular-general",e.PopularWeekly="popular-weekly",e.Rank="ranking",e.Live="live",e.SpaceUpload="space-upload",e))(Ee||{});class lV{constructor(t){this.anonymous=t;}hasMore=true;page=1;tabbarView=v(cV,{});async loadMore(){if(!this.hasMore)return;const n=(await Tt.get("/x/web-interface/popular",{params:{ps:20,pn:this.page},withCredentials:!this.anonymous})).data;return cn(n)?(this.page++,this.hasMore=!n.data.no_more,(n.data.list||[]).map(o=>({...o,api:Ee.PopularGeneral,uniqId:`${Ee.PopularGeneral}-${o.bvid}`}))):(zt(n.message||al),void 0)}}function cV(){const e=jn();return v(at,{configPath:"popularGeneralUseAnonymous",tooltip:v($e,{children:"✅ 匿名访问: 使用游客身份访问"}),label:"匿名访问",extraAction:async()=>{await _t(100),e();}})}function uV(){const t=localStorage.getItem("bpx_player_profile");if(t)try{return JSON.parse(t)}catch{return}}function vN(){return !!uV()?.media.autoplay}function Cl(e){const t=ox.createInstance({driver:ox.INDEXEDDB,name:Jn,storeName:e});return {db:t,get(n){return t.getItem(n.toString())},set(n,r){return t.setItem(n.toString(),r)},delete(n){return t.removeItem(n.toString())}}}function Qs({fn:e,generateKey:t,tableName:n,ttl:r,concurrency:o,autoCleanUp:i=true}){const s=typeof n=="string"?Cl(n):n,a=_s(()=>{s.db.iterate((m,p)=>{l(m)||s.db.removeItem(p);});},1e3);i&&rp().then(a);function l(m){return !!(m&&m.val&&m.ts&&Date.now()-m.ts<=r)}async function c(...m){const p=t(...m),h=await s.get(p);if(h&&l(h))return h.val}const u=o&&o>0?a6(e,o):e,d=Qy(u,{cacheKey(m){return t(...m)},cache:{async has(m){const p=await s.get(m);return l(p)},async get(m){const p=await s.get(m);if(p&&l(p))return p.val},async set(m,p){ti(p)||await s.set(m,{val:p,ts:Date.now()});},async delete(m){await s.delete(m);}}});return Object.defineProperties(d,{cache:{value:s},cleanUp:{value:a},generateKey:{value:t},shouldReuseCached:{value:l},queryCache:{value:c}}),d}async function dV(e){return (await Tt.get("/x/web-interface/view",{params:{bvid:e}})).data.data}const fV=Qs({fn:dV,generateKey:e=>e,tableName:"video-detail",ttl:Wn("3M"),concurrency:3});async function mV(e){return (await Tt.get("/x/player/pagelist",{params:{bvid:e}})).data?.data||[]}const yN=Qs({fn:mV,generateKey:e=>e,tableName:"video-page-list",ttl:Wn("3M"),concurrency:3});async function pV({appKey:e,nscode:t,versionId:n}){const r={appKey:e,nscode:t,versionId:n};return (await Tt.get("/x/kv-frontend/namespace/data",{params:r})).data}function CN({appKey:e,nscode:t}){return new URLSearchParams([["appKey",e],["nscode",t.toString()]]).toString()}const t$=Cl("kv-latest-version"),hV=ci(async({appKey:e,nscode:t})=>{const n=CN({appKey:e,nscode:t}),r=await t$.get(n);let o="0";r&&r.versionId&&r.data&&Object.keys(r.data).length&&(o=r.versionId);const i=await pV({appKey:e,nscode:t,versionId:o});return r?.data&&i.code===-304&&i.message==="Not Modified"?r.data:(await t$.set(n,i.data),i.data.data)}),gV=Qs({fn:hV,tableName:"get-kv-data",generateKey:({appKey:e,nscode:t})=>CN({appKey:e,nscode:t}),ttl:Wn("1h")});function bV(e={},t){t.endsWith(".")||(t+=".");const n={};return e&&Object.keys(e).filter(r=>r.startsWith(t)).forEach(r=>{const o=r.slice(t.length),i=e[r]||"";n[o]=i;}),n}const n$=[{tid:0,name:"全部",slug:"all",season_type:0,type:"all"},{tid:0,name:"番剧",slug:"anime",season_type:1,type:"anime"},{tid:0,name:"国创",slug:"guochuang",season_type:4,type:"guochuang"},{tid:0,name:"纪录片",slug:"documentary",season_type:3,type:"documentary"},{tid:0,name:"电影",slug:"movie",season_type:2,type:"movie"},{tid:0,name:"电视剧",slug:"tv",season_type:5,type:"tv"},{tid:0,name:"综艺",slug:"variety",season_type:7,type:"variety"},{tid:1005,name:"动画",slug:"douga",season_type:0,type:"douga"},{tid:1008,name:"游戏",slug:"game",season_type:0,type:"game"},{tid:1007,name:"鬼畜",slug:"kichiku",season_type:0,type:"kichiku"},{tid:1003,name:"音乐",slug:"music",season_type:0,type:"music"},{tid:1004,name:"舞蹈",slug:"dance",season_type:0,type:"dance"},{tid:1001,name:"影视",slug:"cinephile",season_type:0,type:"cinephile"},{tid:1002,name:"娱乐",slug:"ent",season_type:0,type:"ent"},{tid:1010,name:"知识",slug:"knowledge",season_type:0,type:"knowledge"},{tid:1012,name:"科技数码",slug:"tech",season_type:0,type:"tech"},{tid:1020,name:"美食",slug:"food",season_type:0,type:"food"},{tid:1013,name:"汽车",slug:"car",season_type:0,type:"car"},{tid:1014,name:"时尚美妆",slug:"fashion",season_type:0,type:"fashion"},{tid:1018,name:"体育运动",slug:"sports",season_type:0,type:"sports"},{tid:1024,name:"动物",slug:"animal",season_type:0,type:"animal"}],f1={name:"全站",tid:0,slug:"all"};async function vV(){try{return await yV()||n$}catch(e){return DO("parseRankTabsConfig failed",e),n$}}async function yV(){const e=await gV({appKey:"333.1339",nscode:10}),t=bV(e,"channel_list"),n=JSON.parse(t.popular_page_sort||"");if(!n.length)return;const r=[],o=i=>{r.push({tid:i.tid||0,name:i.name,slug:i.route,season_type:i.seasonType||0,type:i.route});};for(const i of n){if(!t[i])continue;const s=JSON.parse(t[i]);o(s);}return Yi(r,i=>i.slug)}var bf=(e=>(e.Normal="normal",e.PgcSeason="pgc/season",e.PgcWeb="pgc/web",e))(bf||{});function xN(e){if(!["anime","guochuang","documentary","movie","tv","variety"].includes(e.type||""))return {apiType:"normal",url:`/x/web-interface/ranking/v2?rid=${e.tid}&type=all`};const{season_type:t}=e,n=`?day=3&season_type=${t}`;let r=`/pgc/web/rank/list${n}`,o="pgc/web";return t&&[2,3,4,5,7].includes(t)&&(r=`/pgc/season/rank/web/list${n}`,o="pgc/season"),{apiType:o,url:r}}function m1(e){return e.from==="normal"}function CV(e){return e.from==="pgc/season"}function xV(e){return e.from==="pgc/web"}function wN(e,t){e&&(typeof e=="function"?e(t):e.current=t);}function SN(e){const t=f.useRef(null);return f.useMemo(()=>({get current(){return t.current},set current(n){t.current=n,wN(e,n);}}),[t])}var wV={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};function dv(){return dv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},dv.apply(this,arguments)}const SV=(e,t)=>f__namespace.createElement(on,dv({},e,{ref:t,icon:wV})),p1=f__namespace.forwardRef(SV);var $V={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"};function fv(){return fv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},fv.apply(this,arguments)}const EV=(e,t)=>f__namespace.createElement(on,fv({},e,{ref:t,icon:$V})),zu=f__namespace.forwardRef(EV);var IV={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"};function mv(){return mv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},mv.apply(this,arguments)}const PV=(e,t)=>f__namespace.createElement(on,mv({},e,{ref:t,icon:IV})),_u=f__namespace.forwardRef(PV);var NV={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"};function pv(){return pv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},pv.apply(this,arguments)}const MV=(e,t)=>f__namespace.createElement(on,pv({},e,{ref:t,icon:NV})),h1=f__namespace.forwardRef(MV),Jh=e=>typeof e?.then=="function",g1=e=>{const{type:t,children:n,prefixCls:r,buttonProps:o,close:i,autoFocus:s,emitEvent:a,isSilent:l,quitOnNullishReturnValue:c,actionFn:u}=e,d=f__namespace.useRef(false),m=f__namespace.useRef(null),[p,h]=Pf(false),g=(...C)=>{i?.(...C);};f__namespace.useEffect(()=>{let C=null;return s&&(C=setTimeout(()=>{m.current?.focus({preventScroll:true});})),()=>{C&&clearTimeout(C);}},[s]);const b=C=>{Jh(C)&&(h(true),C.then((...x)=>{h(false,true),g.apply(void 0,x),d.current=false;},x=>{if(h(false,true),d.current=false,!l?.())return Promise.reject(x)}));},y=C=>{if(d.current)return;if(d.current=true,!u){g();return}let x;if(a){if(x=u(C),c&&!Jh(x)){d.current=false,g(C);return}}else if(u.length)x=u(i),d.current=false;else if(x=u(),!Jh(x)){g();return}b(x);};return f__namespace.createElement(Je,{...Jy(t),onClick:y,loading:p,prefixCls:r,...o,ref:m},n)},Hu=f.createContext({}),{Provider:$N}=Hu,r$=()=>{const{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:n,isSilent:r,mergedOkCancel:o,rootPrefixCls:i,close:s,onCancel:a,onConfirm:l,onClose:c}=f.useContext(Hu);return o?f.createElement(g1,{isSilent:r,actionFn:a,close:(...u)=>{s?.(...u),l?.(false),c?.();},autoFocus:e==="cancel",buttonProps:t,prefixCls:`${i}-btn`},n):null},o$=()=>{const{autoFocusButton:e,close:t,isSilent:n,okButtonProps:r,rootPrefixCls:o,okTextLocale:i,okType:s,onConfirm:a,onOk:l,onClose:c}=f.useContext(Hu);return f.createElement(g1,{isSilent:n,type:s||"primary",actionFn:l,close:(...u)=>{t?.(...u),a?.(true),c?.();},autoFocus:e==="ok",buttonProps:r,prefixCls:`${o}-btn`},i)},EN=f__namespace.createContext({});function i$(e,t,n){let r=t;return !r&&n&&(r=`${e}-${n}`),r}function s$(e,t){let n=e[`page${t?"Y":"X"}Offset`];const r=`scroll${t?"Top":"Left"}`;if(typeof n!="number"){const o=e.document;n=o.documentElement[r],typeof n!="number"&&(n=o.body[r]);}return n}function RV(e){const t=e.getBoundingClientRect(),n={left:t.left,top:t.top},r=e.ownerDocument,o=r.defaultView||r.parentWindow;return n.left+=s$(o),n.top+=s$(o,true),n}const AV=f__namespace.memo(({children:e})=>e,(e,{shouldUpdate:t})=>!t);function Zf(){return Zf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Zf.apply(this,arguments)}const TV={width:0,height:0,overflow:"hidden",outline:"none"},OV={outline:"none"},IN=f.forwardRef((e,t)=>{const{prefixCls:n,className:r,style:o,title:i,ariaId:s,footer:a,closable:l,closeIcon:c,onClose:u,children:d,bodyStyle:m,bodyProps:p,modalRender:h,onMouseDown:g,onMouseUp:b,holderRef:y,visible:C,forceRender:x,width:w,height:S,classNames:I,styles:$}=e,{panel:E}=f.useContext(EN),P=Hs(y,E),M=f.useRef(null),N=f.useRef(null);f.useImperativeHandle(t,()=>({focus:()=>{M.current?.focus({preventScroll:true});},changeActive:W=>{const{activeElement:O}=document;W&&O===N.current?M.current.focus({preventScroll:true}):!W&&O===M.current&&N.current.focus({preventScroll:true});}}));const A={};w!==void 0&&(A.width=w),S!==void 0&&(A.height=S);const k=a?f.createElement("div",{className:H(`${n}-footer`,I?.footer),style:{...$?.footer}},a):null,R=i?f.createElement("div",{className:H(`${n}-header`,I?.header),style:{...$?.header}},f.createElement("div",{className:H(`${n}-title`,I?.title),id:s,style:{...$?.title}},i)):null,L=f.useMemo(()=>typeof l=="object"&&l!==null?l:l?{closeIcon:c??f.createElement("span",{className:`${n}-close-x`})}:{},[l,c,n]),V=or(L,true),_=typeof l=="object"&&l.disabled,z=l?f.createElement("button",Zf({type:"button",onClick:u,"aria-label":"Close"},V,{className:`${n}-close`,disabled:_}),L.closeIcon):null,D=f.createElement("div",{className:H(`${n}-container`,I?.container),style:$?.container},z,R,f.createElement("div",Zf({className:H(`${n}-body`,I?.body),style:{...m,...$?.body}},p),d),k);return f.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":i?s:null,"aria-modal":"true",ref:P,style:{...o,...A},className:H(n,r),onMouseDown:g,onMouseUp:b},f.createElement("div",{ref:M,tabIndex:0,style:OV},f.createElement(AV,{shouldUpdate:C||x},h?h(D):D)),f.createElement("div",{tabIndex:0,ref:N,style:TV}))});function hv(){return hv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},hv.apply(this,arguments)}const FV=f__namespace.forwardRef((e,t)=>{const{prefixCls:n,title:r,style:o,className:i,visible:s,forceRender:a,destroyOnHidden:l,motionName:c,ariaId:u,onVisibleChanged:d,mousePosition:m}=e,p=f.useRef(null),h=f.useRef(null);f__namespace.useImperativeHandle(t,()=>({...h.current,inMotion:p.current.inMotion,enableMotion:p.current.enableMotion}));const[g,b]=f__namespace.useState(),y={};g&&(y.transformOrigin=g);function C(){const x=RV(p.current.nativeElement);b(m&&(m.x||m.y)?`${m.x-x.left}px ${m.y-x.top}px`:"");}return f__namespace.createElement(er,{visible:s,onVisibleChanged:d,onAppearPrepare:C,onEnterPrepare:C,forceRender:a,motionName:c,removeOnLeave:l,ref:p},({className:x,style:w},S)=>f__namespace.createElement(IN,hv({},e,{ref:h,title:r,ariaId:u,prefixCls:n,holderRef:S,style:{...w,...o,...y},className:H(i,x)})))});function gv(){return gv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},gv.apply(this,arguments)}const LV=e=>{const{prefixCls:t,style:n,visible:r,maskProps:o,motionName:i,className:s}=e;return f__namespace.createElement(er,{key:"mask",visible:r,motionName:i,leavedClassName:`${t}-mask-hidden`},({className:a,style:l},c)=>f__namespace.createElement("div",gv({ref:c,style:{...l,...n},className:H(`${t}-mask`,a,s)},o)))};function wc(){return wc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},wc.apply(this,arguments)}const BV=e=>{const{prefixCls:t="rc-dialog",zIndex:n,visible:r=false,keyboard:o=true,focusTriggerAfterClose:i=true,wrapStyle:s,wrapClassName:a,wrapProps:l,onClose:c,afterOpenChange:u,afterClose:d,transitionName:m,animation:p,closable:h=true,mask:g=true,maskTransitionName:b,maskAnimation:y,maskClosable:C=true,maskStyle:x,maskProps:w,rootClassName:S,rootStyle:I,classNames:$,styles:E}=e,P=f.useRef(null),M=f.useRef(null),N=f.useRef(null),[A,k]=f__namespace.useState(r),R=Ws();function L(){eb(M.current,document.activeElement)||(P.current=document.activeElement);}function V(){eb(M.current,document.activeElement)||N.current?.focus();}function _(){if(k(false),g&&P.current&&i){try{P.current.focus({preventScroll:!0});}catch{}P.current=null;}A&&d?.();}function z(K){K?V():_(),u?.(K);}function D(K){c?.(K);}const W=f.useRef(false),O=f.useRef(null),B=()=>{clearTimeout(O.current),W.current=true;},j=()=>{O.current=setTimeout(()=>{W.current=false;});};let Y=null;C&&(Y=K=>{W.current?W.current=false:M.current===K.target&&D(K);});function q(K){if(o&&K.keyCode===_e.ESC){K.stopPropagation(),D(K);return}r&&K.keyCode===_e.TAB&&N.current.changeActive(!K.shiftKey);}f.useEffect(()=>{r?(k(true),L()):A&&N.current.enableMotion()&&!N.current.inMotion()&&_();},[r]),f.useEffect(()=>()=>{clearTimeout(O.current);},[]);const U={zIndex:n,...s,...E?.wrapper,display:A?null:"none"};return f__namespace.createElement("div",wc({className:H(`${t}-root`,S),style:I},or(e,{data:true})),f__namespace.createElement(LV,{prefixCls:t,visible:g&&r,motionName:i$(t,b,y),style:{zIndex:n,...x,...E?.mask},maskProps:w,className:$?.mask}),f__namespace.createElement("div",wc({tabIndex:-1,onKeyDown:q,className:H(`${t}-wrap`,a,$?.wrapper),ref:M,onClick:Y,style:U},l),f__namespace.createElement(FV,wc({},e,{onMouseDown:B,onMouseUp:j,ref:N,closable:h,ariaId:R,prefixCls:t,visible:r&&A,onClose:D,onVisibleChanged:z,motionName:i$(t,m,p)}))))};function bv(){return bv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},bv.apply(this,arguments)}const kV=e=>{const{visible:t,getContainer:n,forceRender:r,destroyOnHidden:o=false,afterClose:i,closable:s,panelRef:a}=e,[l,c]=f__namespace.useState(t),u=f__namespace.useMemo(()=>({panel:a}),[a]);return f__namespace.useEffect(()=>{t&&c(true);},[t]),!r&&o&&!l?null:f__namespace.createElement(EN.Provider,{value:u},f__namespace.createElement(zm,{open:t||r||l,autoDestroy:false,getContainer:n,autoLock:t||l},f__namespace.createElement(BV,bv({},e,{destroyOnHidden:o,afterClose:()=>{const d=s&&typeof s=="object"?s:{},{afterClose:m}=d||{};m?.(),i?.(),c(false);}}))))},DV=()=>Ar()&&window.document.documentElement,cp=e=>{const{prefixCls:t,className:n,style:r,size:o,shape:i}=e,s=H({[`${t}-lg`]:o==="large",[`${t}-sm`]:o==="small"}),a=H({[`${t}-circle`]:i==="circle",[`${t}-square`]:i==="square",[`${t}-round`]:i==="round"}),l=f__namespace.useMemo(()=>typeof o=="number"?{width:o,height:o,lineHeight:`${o}px`}:{},[o]);return f__namespace.createElement("span",{className:H(t,s,a,n),style:{...l,...r}})},zV=new ht("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),b1=e=>({height:e,lineHeight:X(e)}),Oi=e=>({width:e,...b1(e)}),_V=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:zV,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),eg=(e,t)=>({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal(),...b1(e)}),HV=e=>{const{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:r,controlHeightLG:o,controlHeightSM:i}=e;return {[t]:{display:"inline-block",verticalAlign:"top",background:n,...Oi(r)},[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:{...Oi(o)},[`${t}${t}-sm`]:{...Oi(i)}}},VV=e=>{const{controlHeight:t,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:o,controlHeightSM:i,gradientFromColor:s,calc:a}=e;return {[r]:{display:"inline-block",verticalAlign:"top",background:s,borderRadius:n,...eg(t,a)},[`${r}-lg`]:{...eg(o,a)},[`${r}-sm`]:{...eg(i,a)}}},PN=e=>{const{gradientFromColor:t,borderRadiusSM:n,imageSizeBase:r,calc:o}=e;return {display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:t,borderRadius:n,...Oi(o(r).mul(2).equal())}},jV=e=>({[e.skeletonNodeCls]:{...PN(e)}}),WV=e=>{const{skeletonImageCls:t,imageSizeBase:n,calc:r}=e;return {[t]:{...PN(e),[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:{...Oi(n),maxWidth:r(n).mul(4).equal(),maxHeight:r(n).mul(4).equal()},[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}},[`${t}${t}-circle`]:{borderRadius:"50%"}}},tg=(e,t,n)=>{const{skeletonButtonCls:r}=e;return {[`${n}${r}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${n}${r}-round`]:{borderRadius:t}}},ng=(e,t)=>({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal(),...b1(e)}),qV=e=>{const{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:r,controlHeightLG:o,controlHeightSM:i,gradientFromColor:s,calc:a}=e;return {[n]:{display:"inline-block",verticalAlign:"top",background:s,borderRadius:t,width:a(r).mul(2).equal(),minWidth:a(r).mul(2).equal(),...ng(r,a)},...tg(e,r,n),[`${n}-lg`]:{...ng(o,a)},...tg(e,o,`${n}-lg`),[`${n}-sm`]:{...ng(i,a)},...tg(e,i,`${n}-sm`)}},UV=e=>{const{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:o,skeletonButtonCls:i,skeletonInputCls:s,skeletonNodeCls:a,skeletonImageCls:l,controlHeight:c,controlHeightLG:u,controlHeightSM:d,gradientFromColor:m,padding:p,marginSM:h,borderRadius:g,titleHeight:b,blockRadius:y,paragraphLiHeight:C,controlHeightXS:x,paragraphMarginTop:w}=e;return {[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:p,verticalAlign:"top",[n]:{display:"inline-block",verticalAlign:"top",background:m,...Oi(c)},[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:{...Oi(u)},[`${n}-sm`]:{...Oi(d)}},[`${t}-section`]:{display:"table-cell",width:"100%",verticalAlign:"top",[r]:{width:"100%",height:b,background:m,borderRadius:y,[`+ ${o}`]:{marginBlockStart:d}},[o]:{padding:0,"> li":{width:"100%",height:C,listStyle:"none",background:m,borderRadius:y,"+ li":{marginBlockStart:x}}},[`${o}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-section`]:{[`${r}, ${o} > li`]:{borderRadius:g}}},[`${t}-with-avatar ${t}-section`]:{[r]:{marginBlockStart:h,[`+ ${o}`]:{marginBlockStart:w}}},[`${t}${t}-element`]:{display:"inline-block",width:"auto",...qV(e),...HV(e),...VV(e),...jV(e),...WV(e)},[`${t}${t}-block`]:{width:"100%",[i]:{width:"100%"},[s]:{width:"100%"}},[`${t}${t}-active`]:{[`
${r},
${o} > li,
${n},
${i},
${s},
${a},
${l}
`]:{..._V(e)}}}},GV=e=>{const{colorFillContent:t,colorFill:n}=e,r=t,o=n;return {color:r,colorGradientEnd:o,gradientFromColor:r,gradientToColor:o,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},Vu=xt("Skeleton",e=>{const{componentCls:t,calc:n}=e,r=vt(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonNodeCls:`${t}-node`,skeletonImageCls:`${t}-image`,imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return UV(r)},GV,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),KV=e=>{const{prefixCls:t,className:n,classNames:r,rootClassName:o,active:i,style:s,styles:a,shape:l="circle",size:c="default",...u}=e,{getPrefixCls:d}=f__namespace.useContext(ot),m=d("skeleton",t),[p,h]=Vu(m),g=H(m,`${m}-element`,{[`${m}-active`]:i},r?.root,n,o,p,h);return f__namespace.createElement("div",{className:g,style:a?.root},f__namespace.createElement(cp,{prefixCls:`${m}-avatar`,className:r?.content,style:{...a?.content,...s},shape:l,size:c,...u}))},XV=e=>{const{prefixCls:t,className:n,rootClassName:r,classNames:o,active:i,style:s,styles:a,block:l=false,size:c="default",...u}=e,{getPrefixCls:d}=f__namespace.useContext(ot),m=d("skeleton",t),[p,h]=Vu(m),g=H(m,`${m}-element`,{[`${m}-active`]:i,[`${m}-block`]:l},o?.root,n,r,p,h);return f__namespace.createElement("div",{className:g,style:a?.root},f__namespace.createElement(cp,{prefixCls:`${m}-button`,className:o?.content,style:{...a?.content,...s},size:c,...u}))},NN=e=>{const{prefixCls:t,className:n,classNames:r,rootClassName:o,internalClassName:i,style:s,styles:a,active:l,children:c}=e,{getPrefixCls:u}=f__namespace.useContext(ot),d=u("skeleton",t),[m,p]=Vu(d),h=H(d,`${d}-element`,{[`${d}-active`]:l},m,r?.root,n,o,p);return f__namespace.createElement("div",{className:h,style:a?.root},f__namespace.createElement("div",{className:H(r?.content,i||`${d}-node`),style:{...a?.content,...s}},c))},YV="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",QV=e=>{const{getPrefixCls:t}=f__namespace.useContext(ot),n=t("skeleton",e.prefixCls);return f__namespace.createElement(NN,{...e,internalClassName:`${n}-image`},f__namespace.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${n}-image-svg`},f__namespace.createElement("title",null,"Image placeholder"),f__namespace.createElement("path",{d:YV,className:`${n}-image-path`})))},ZV=e=>{const{prefixCls:t,className:n,classNames:r,rootClassName:o,active:i,block:s,style:a,styles:l,size:c="default",...u}=e,{getPrefixCls:d}=f__namespace.useContext(ot),m=d("skeleton",t),[p,h]=Vu(m),g=H(m,`${m}-element`,{[`${m}-active`]:i,[`${m}-block`]:s},r?.root,n,o,p,h);return f__namespace.createElement("div",{className:g,style:l?.root},f__namespace.createElement(cp,{prefixCls:`${m}-input`,className:r?.content,style:{...l?.content,...a},size:c,...u}))},JV=(e,t)=>{const{width:n,rows:r=2}=t;if(Array.isArray(n))return n[e];if(r-1===e)return n},ej=e=>{const{prefixCls:t,className:n,style:r,rows:o=0}=e,i=Array.from({length:o}).map((s,a)=>f__namespace.createElement("li",{key:a,style:{width:JV(a,e)}}));return f__namespace.createElement("ul",{className:H(t,n),style:r},i)},tj=({prefixCls:e,className:t,width:n,style:r})=>f__namespace.createElement("h3",{className:H(e,t),style:{width:n,...r}});function rg(e){return e&&typeof e=="object"?e:{}}function nj(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function rj(e,t){return !e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}function oj(e,t){const n={};return (!e||!t)&&(n.width="61%"),!e&&t?n.rows=3:n.rows=2,n}const xl=e=>{const{prefixCls:t,loading:n,className:r,rootClassName:o,classNames:i,style:s,styles:a,children:l,avatar:c=false,title:u=true,paragraph:d=true,active:m,round:p}=e,{getPrefixCls:h,direction:g,className:b,style:y,classNames:C,styles:x}=St("skeleton"),w=h("skeleton",t),[S,I]=Vu(w),$={...e,avatar:c,title:u,paragraph:d},[E,P]=It([C,i],[x,a],{props:$});if(n||!("loading"in e)){const M=!!c,N=!!u,A=!!d;let k;if(M){const V={className:E.avatar,prefixCls:`${w}-avatar`,...nj(N,A),...rg(c),style:P.avatar};k=f__namespace.createElement("div",{className:H(E.header,`${w}-header`),style:P.header},f__namespace.createElement(cp,{...V}));}let R;if(N||A){let V;if(N){const z={className:E.title,prefixCls:`${w}-title`,...rj(M,A),...rg(u),style:P.title};V=f__namespace.createElement(tj,{...z});}let _;if(A){const z={className:E.paragraph,prefixCls:`${w}-paragraph`,...oj(M,N),...rg(d),style:P.paragraph};_=f__namespace.createElement(ej,{...z});}R=f__namespace.createElement("div",{className:H(E.section,`${w}-section`),style:P.section},V,_);}const L=H(w,{[`${w}-with-avatar`]:M,[`${w}-active`]:m,[`${w}-rtl`]:g==="rtl",[`${w}-round`]:p},E.root,b,r,o,S,I);return f__namespace.createElement("div",{className:L,style:{...P.root,...y,...s}},k,R)}return l??null};xl.Button=XV;xl.Avatar=KV;xl.Input=ZV;xl.Image=QV;xl.Node=NN;function a$(){}const ij=f__namespace.createContext({add:a$,remove:a$});function sj(e){const t=f__namespace.useContext(ij),n=f__namespace.useRef(null);return lt(o=>{if(o){const i=e?o.querySelector(e):o;i&&(t.add(i),n.current=i);}else t.remove(n.current);})}const l$=()=>{const{cancelButtonProps:e,cancelTextLocale:t,onCancel:n}=f.useContext(Hu);return f.createElement(Je,{onClick:n,...e},t)},c$=()=>{const{confirmLoading:e,okButtonProps:t,okType:n,okTextLocale:r,onOk:o}=f.useContext(Hu);return f.createElement(Je,{...Jy(n),loading:e,onClick:o,...t},r)};function MN(e,t){return f.createElement("span",{className:`${e}-close-x`},t||f.createElement(ai,{className:`${e}-close-icon`}))}const RN=e=>{const{okText:t,okType:n="primary",cancelText:r,confirmLoading:o,onOk:i,onCancel:s,okButtonProps:a,cancelButtonProps:l,footer:c}=e,[u]=ar("Modal",W3()),d=t||u?.okText,m=r||u?.cancelText,p=f.useMemo(()=>({confirmLoading:o,okButtonProps:a,cancelButtonProps:l,okTextLocale:d,cancelTextLocale:m,okType:n,onOk:i,onCancel:s}),[o,a,l,d,m,n,i,s]);let h;return typeof c=="function"||typeof c>"u"?(h=f.createElement(f.Fragment,null,f.createElement(l$,null),f.createElement(c$,null)),typeof c=="function"&&(h=c(h,{OkBtn:c$,CancelBtn:l$})),h=f.createElement($N,{value:p},h)):h=c,f.createElement(kI,{disabled:false},h)},aj=e=>{const{componentCls:t}=e;return {[t]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around":{justifyContent:"space-around"},"&-space-evenly":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},lj=e=>{const{componentCls:t}=e;return {[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},cj=(e,t)=>{const{prefixCls:n,componentCls:r,gridColumns:o}=e,i={};for(let s=o;s>=0;s--)s===0?(i[`${r}${t}-${s}`]={display:"none"},i[`${r}-push-${s}`]={insetInlineStart:"auto"},i[`${r}-pull-${s}`]={insetInlineEnd:"auto"},i[`${r}${t}-push-${s}`]={insetInlineStart:"auto"},i[`${r}${t}-pull-${s}`]={insetInlineEnd:"auto"},i[`${r}${t}-offset-${s}`]={marginInlineStart:0},i[`${r}${t}-order-${s}`]={order:0}):(i[`${r}${t}-${s}`]=[{"--ant-display":"block",display:"block"},{display:"var(--ant-display)",flex:`0 0 ${s/o*100}%`,maxWidth:`${s/o*100}%`}],i[`${r}${t}-push-${s}`]={insetInlineStart:`${s/o*100}%`},i[`${r}${t}-pull-${s}`]={insetInlineEnd:`${s/o*100}%`},i[`${r}${t}-offset-${s}`]={marginInlineStart:`${s/o*100}%`},i[`${r}${t}-order-${s}`]={order:s});return i[`${r}${t}-flex`]={flex:`var(--${n}${t}-flex)`},i},vv=(e,t)=>cj(e,t),uj=(e,t,n)=>({[`@media (min-width: ${X(t)})`]:{...vv(e,n)}}),dj=()=>({}),fj=()=>({});xt("Grid",aj,dj);const AN=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin});xt("Grid",e=>{const t=vt(e,{gridColumns:24}),n=AN(t);return delete n.xs,[lj(t),vv(t,""),vv(t,"-xs"),Object.keys(n).map(r=>uj(t,n[r],`-${r}`)).reduce((r,o)=>({...r,...o}),{})]},fj);function u$(e){return {position:e,inset:0}}const mj=e=>{const{componentCls:t,antCls:n}=e;return [{[`${t}-root`]:{[`${t}${n}-zoom-enter, ${t}${n}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},[`${t}${n}-zoom-leave ${t}-container`]:{pointerEvents:"none"},[`${t}-mask`]:{...u$("fixed"),zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,pointerEvents:"none",[`&${t}-mask-blur`]:{backdropFilter:"blur(4px)"},[`${t}-hidden`]:{display:"none"}},[`${t}-wrap`]:{...u$("fixed"),zIndex:e.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"}}},{[`${t}-root`]:My(e)}]},pj=e=>{const{componentCls:t}=e;return [{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl"},[`${t}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[t]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{maxWidth:"calc(100vw - 16px)",margin:`${X(e.marginXS)} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:{...Lt(e),pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${X(e.calc(e.margin).mul(2).equal())})`,margin:"0 auto",paddingBottom:e.paddingLG,[`${t}-title`]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:"break-word"},[`${t}-container`]:{position:"relative",backgroundColor:e.contentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:"auto",padding:e.contentPadding},[`${t}-close`]:{position:"absolute",top:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),insetInlineEnd:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),zIndex:e.calc(e.zIndexPopupBase).add(10).equal(),padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:`color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,"&-x":{display:"flex",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:X(e.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:e.modalCloseIconHoverColor,backgroundColor:e.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:e.colorBgTextActive},...Tr(e)},[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)} 0 0`,marginBottom:e.headerMarginBottom,padding:e.headerPadding,borderBottom:e.headerBorderBottom},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word",padding:e.bodyPadding,[`${t}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",margin:`${X(e.margin)} auto`}},[`${t}-footer`]:{textAlign:"end",background:e.footerBg,marginTop:e.footerMarginTop,padding:e.footerPadding,borderTop:e.footerBorderTop,borderRadius:e.footerBorderRadius,[`> ${e.antCls}-btn + ${e.antCls}-btn`]:{marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:"hidden"}}},{[`${t}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${t}-container,
${t}-body,
${t}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${t}-confirm-body`]:{marginBottom:"auto"}}}]},hj=e=>{const{componentCls:t}=e;return {[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl",[`${t}-confirm-body`]:{direction:"rtl"}}}}},gj=e=>{const{componentCls:t}=e,n=AN(e),r={...n};delete r.xs;const o=`--${t.replace(".","")}-`,i=Object.keys(r).map(s=>({[`@media (min-width: ${X(r[s])})`]:{width:`var(${o}${s}-width)`}}));return {[`${t}-root`]:{[t]:[].concat(Et(Object.keys(n).map((s,a)=>{const l=Object.keys(n)[a-1];return l?{[`${o}${s}-width`]:`var(${o}${l}-width)`}:null})),[{width:`var(${o}xs-width)`}],Et(i))}}},TN=e=>{const t=e.padding,n=e.fontSizeHeading5,r=e.lineHeightHeading5;return vt(e,{modalHeaderHeight:e.calc(e.calc(r).mul(n).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalCloseIconColor:e.colorIcon,modalCloseIconHoverColor:e.colorIconHover,modalCloseBtnSize:e.controlHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},ON=e=>({footerBg:"transparent",headerBg:"transparent",titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${X(e.paddingMD)} ${X(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${X(e.padding)} ${X(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${X(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${X(e.paddingXS)} ${X(e.padding)}`:0,footerBorderTop:e.wireframe?`${X(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",footerBorderRadius:e.wireframe?`0 0 ${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${X(e.padding*2)} ${X(e.padding*2)} ${X(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM,mask:true}),FN=xt("Modal",e=>{const t=TN(e);return [pj(t),hj(t),mj(t),Tu(t,"zoom"),gj(t)]},ON,{unitless:{titleLineHeight:true}});let yv;const bj=e=>{yv={x:e.pageX,y:e.pageY},setTimeout(()=>{yv=null;},100);};DV()&&document.documentElement.addEventListener("click",bj,true);const LN=e=>{const{prefixCls:t,className:n,rootClassName:r,open:o,wrapClassName:i,centered:s,getContainer:a,focusTriggerAfterClose:l=true,style:c,width:u=520,footer:d,classNames:m,styles:p,children:h,loading:g,confirmLoading:b,zIndex:y,mousePosition:C,onOk:x,onCancel:w,okButtonProps:S,cancelButtonProps:I,destroyOnHidden:$,destroyOnClose:E,panelRef:P=null,closable:M,mask:N,modalRender:A,...k}=e,{getPopupContainer:R,getPrefixCls:L,direction:V,className:_,style:z,classNames:D,styles:W,centered:O,cancelButtonProps:B,okButtonProps:j,mask:Y}=St("modal"),{modal:q}=f__namespace.useContext(ot),[U,K]=f__namespace.useMemo(()=>typeof M=="boolean"?[void 0,void 0]:[M?.afterClose,M?.onClose],[M]),J=L("modal",t),Q=L(),[G,ee]=L8(N,Y,J),re=Qe=>{b||(w?.(Qe),K?.());},oe=Qe=>{x?.(Qe),K?.();},be=sn(J),[Z,te]=FN(J,be),ce=H(i,{[`${J}-centered`]:s??O,[`${J}-wrap-rtl`]:V==="rtl"}),ue=d!==null&&!g?f__namespace.createElement(RN,{...e,okButtonProps:{...j,...S},onOk:oe,cancelButtonProps:{...B,...I},onCancel:re}):null,[he,ye,pe,ie]=Z0(Di(e),Di(q),{closable:true,closeIcon:f__namespace.createElement(ai,{className:`${J}-close-icon`}),closeIconRender:Qe=>MN(J,Qe)}),ge=he?{disabled:pe,closeIcon:ye,afterClose:U,...ie}:false,Se=A?Qe=>f__namespace.createElement("div",{className:`${J}-render`},A(Qe)):void 0,ke=`.${J}-${A?"render":"container"}`,qe=sj(ke),De=In(P,qe),[ze,je]=Us("Modal",y),Le={...e,width:u,panelRef:P,focusTriggerAfterClose:l,mask:G,zIndex:ze},[we,Me]=It([D,m,ee],[W,p],{props:Le}),[Fe,Re]=f__namespace.useMemo(()=>u&&typeof u=="object"?[void 0,u]:[u,void 0],[u]),Pe=f__namespace.useMemo(()=>{const Qe={};return Re&&Object.keys(Re).forEach(mt=>{const it=Re[mt];it!==void 0&&(Qe[`--${J}-${mt}-width`]=typeof it=="number"?`${it}px`:it);}),Qe},[J,Re]);return f__namespace.createElement(Hi,{form:true,space:true},f__namespace.createElement(Dm.Provider,{value:je},f__namespace.createElement(kV,{width:Fe,...k,zIndex:ze,getContainer:a===void 0?R:a,prefixCls:J,rootClassName:H(Z,r,te,be,we.root),rootStyle:Me.root,footer:ue,visible:o,mousePosition:C??yv,onClose:re,closable:ge,closeIcon:ye,focusTriggerAfterClose:l,transitionName:Vi(Q,"zoom",e.transitionName),maskTransitionName:Vi(Q,"fade",e.maskTransitionName),mask:G,className:H(Z,n,_),style:{...z,...c,...Pe},classNames:{...we,wrapper:H(we.wrapper,ce)},styles:Me,panelRef:De,destroyOnHidden:$??E,modalRender:Se},g?f__namespace.createElement(xl,{active:true,title:false,paragraph:{rows:4},className:`${J}-body-skeleton`}):h)))},vj=e=>{const{componentCls:t,titleFontSize:n,titleLineHeight:r,modalConfirmIconSize:o,fontSize:i,lineHeight:s,modalTitleHeight:a,fontHeight:l,confirmBodyPadding:c}=e,u=`${t}-confirm`;return {[u]:{"&-rtl":{direction:"rtl"},[`${e.antCls}-modal-header`]:{display:"none"},[`${u}-body-wrapper`]:{...Of()},[`&${t} ${t}-body`]:{padding:c},[`${u}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e.iconCls}`]:{flex:"none",fontSize:o,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(l).sub(o).equal()).div(2).equal()},[`&-has-title > ${e.iconCls}`]:{marginTop:e.calc(e.calc(a).sub(o).equal()).div(2).equal()}},[`${u}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:e.marginXS,maxWidth:`calc(100% - ${X(e.marginSM)})`},[`${e.iconCls} + ${u}-paragraph`]:{maxWidth:`calc(100% - ${X(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`},[`${u}-title`]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:n,lineHeight:r},[`${u}-container`]:{color:e.colorText,fontSize:i,lineHeight:s},[`${u}-btns`]:{textAlign:"end",marginTop:e.confirmBtnsMarginTop,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${u}-error ${u}-body > ${e.iconCls}`]:{color:e.colorError},[`${u}-warning ${u}-body > ${e.iconCls},
${u}-confirm ${u}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${u}-info ${u}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${u}-success ${u}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},yj=dl(["Modal","confirm"],e=>{const t=TN(e);return vj(t)},ON,{order:-1e3}),BN=e=>{const{prefixCls:t,icon:n,okText:r,cancelText:o,confirmPrefixCls:i,type:s,okCancel:a,footer:l,locale:c,...u}=e;let d=n;if(!n&&n!==null)switch(s){case "info":d=f__namespace.createElement(h1,null);break;case "success":d=f__namespace.createElement(p1,null);break;case "error":d=f__namespace.createElement(zu,null);break;default:d=f__namespace.createElement(_u,null);}const m=a??s==="confirm",p=e.autoFocusButton===null?false:e.autoFocusButton||"ok",[h]=ar("Modal"),g=c||h,b=r||(m?g?.okText:g?.justOkText),y=o||g?.cancelText,{closable:C}=u,{onClose:x}=C&&typeof C=="object"?C:{},w=f__namespace.useMemo(()=>({autoFocusButton:p,cancelTextLocale:y,okTextLocale:b,mergedOkCancel:m,onClose:x,...u}),[p,y,b,m,x,u]),S=f__namespace.createElement(f__namespace.Fragment,null,f__namespace.createElement(r$,null),f__namespace.createElement(o$,null)),I=e.title!==void 0&&e.title!==null,$=`${i}-body`;return f__namespace.createElement("div",{className:`${i}-body-wrapper`},f__namespace.createElement("div",{className:H($,{[`${$}-has-title`]:I})},d,f__namespace.createElement("div",{className:`${i}-paragraph`},I&&f__namespace.createElement("span",{className:`${i}-title`},e.title),f__namespace.createElement("div",{className:`${i}-content`},e.content))),l===void 0||typeof l=="function"?f__namespace.createElement($N,{value:w},f__namespace.createElement("div",{className:`${i}-btns`},typeof l=="function"?l(S,{OkBtn:o$,CancelBtn:r$}):S)):l,f__namespace.createElement(yj,{prefixCls:t}))},Cj=e=>{const{close:t,zIndex:n,maskStyle:r,direction:o,prefixCls:i,wrapClassName:s,rootPrefixCls:a,bodyStyle:l,closable:c=false,onConfirm:u,styles:d,title:m,okButtonProps:p,cancelButtonProps:h}=e,{cancelButtonProps:g,okButtonProps:b}=St("modal"),y=`${i}-confirm`,C=e.width||416,x=e.style||{},w=e.maskClosable===void 0?false:e.maskClosable,S=H(y,`${y}-${e.type}`,{[`${y}-rtl`]:o==="rtl"},e.className),[,I]=Tn(),$=f__namespace.useMemo(()=>n!==void 0?n:I.zIndexPopupBase+cy,[n,I]);return f__namespace.createElement(LN,{...e,className:S,wrapClassName:H({[`${y}-centered`]:!!e.centered},s),onCancel:()=>{t?.({triggerCancel:true}),u?.(false);},title:m,footer:null,transitionName:Vi(a||"","zoom",e.transitionName),maskTransitionName:Vi(a||"","fade",e.maskTransitionName),maskClosable:w,style:x,styles:{body:l,mask:r,...d},width:C,zIndex:$,closable:c},f__namespace.createElement(BN,{...e,confirmPrefixCls:y,okButtonProps:{...b,...p},cancelButtonProps:{...g,...h}}))},kN=e=>{const{rootPrefixCls:t,iconPrefixCls:n,direction:r,theme:o}=e;return f__namespace.createElement(yr,{prefixCls:t,iconPrefixCls:n,direction:r,theme:o},f__namespace.createElement(Cj,{...e}))},ys=[];let DN="";function zN(){return DN}const xj=e=>{const{prefixCls:t,getContainer:n,direction:r}=e,o=W3(),i=f.useContext(ot),s=zN()||i.getPrefixCls(),a=t||`${s}-modal`;let l=n;return l===false&&(l=void 0),f.createElement(kN,{...e,rootPrefixCls:s,prefixCls:a,iconPrefixCls:i.iconPrefixCls,theme:i.theme,direction:r??i.direction,locale:i.locale?.Modal??o,getContainer:l})};function ju(e){const t=gy(),n=document.createDocumentFragment();let r={...e,close:a,open:true},o;function i(...c){c.some(d=>d?.triggerCancel)&&e.onCancel?.(()=>{},...c.slice(1));for(let d=0;d<ys.length;d++)if(ys[d]===a){ys.splice(d,1);break}rP(n).then(()=>{});}const s=c=>{clearTimeout(o),o=setTimeout(()=>{const u=t.getPrefixCls(void 0,zN()),d=t.getIconPrefixCls(),m=t.getTheme(),p=f.createElement(xj,{...c});Wm(f.createElement(yr,{prefixCls:u,iconPrefixCls:d,theme:m},typeof t.holderRender=="function"?t.holderRender(p):p),n);});};function a(...c){r={...r,open:false,afterClose:()=>{typeof e.afterClose=="function"&&e.afterClose(),i.apply(this,c);}},s(r);}function l(c){typeof c=="function"?r=c(r):r={...r,...c},s(r);}return s(r),ys.push(a),{destroy:a,update:l}}function _N(e){return {...e,type:"warning"}}function HN(e){return {...e,type:"info"}}function VN(e){return {...e,type:"success"}}function jN(e){return {...e,type:"error"}}function WN(e){return {...e,type:"confirm"}}function wj({rootPrefixCls:e}){DN=e;}const Sj=e=>{const{prefixCls:t,className:n,closeIcon:r,closable:o,type:i,title:s,children:a,footer:l,...c}=e,{getPrefixCls:u}=f__namespace.useContext(ot),d=u(),m=t||u("modal"),p=sn(d),[h,g]=FN(m,p),b=`${m}-confirm`;let y={};return i?y={closable:o??false,title:"",footer:"",children:f__namespace.createElement(BN,{...e,prefixCls:m,confirmPrefixCls:b,rootPrefixCls:d,content:a})}:y={closable:o??true,title:s,footer:l!==null&&f__namespace.createElement(RN,{...e}),children:a},f__namespace.createElement(IN,{prefixCls:m,className:H(h,`${m}-pure-panel`,i&&b,i&&`${b}-${i}`,n,g,p),...c,closeIcon:MN(m,r),closable:o,...y})},$j=V6(Sj),Ej=({afterClose:e,config:t,...n},r)=>{const[o,i]=f__namespace.useState(true),[s,a]=f__namespace.useState(t),{direction:l,getPrefixCls:c}=f__namespace.useContext(ot),u=c("modal"),d=c(),m=()=>{e(),s.afterClose?.();},p=(...b)=>{i(false),b.some(C=>C?.triggerCancel)&&s.onCancel?.(()=>{},...b.slice(1));};f__namespace.useImperativeHandle(r,()=>({destroy:p,update:b=>{a(y=>{const C=typeof b=="function"?b(y):b;return {...y,...C}});}}));const h=s.okCancel??s.type==="confirm",[g]=ar("Modal",po.Modal);return f__namespace.createElement(kN,{prefixCls:u,rootPrefixCls:d,...s,close:p,open:o,afterClose:m,okText:s.okText||(h?g?.okText:g?.justOkText),direction:s.direction||l,cancelText:s.cancelText||g?.cancelText,...n})},Ij=f__namespace.forwardRef(Ej);let d$=0;const Pj=f__namespace.memo(f__namespace.forwardRef((e,t)=>{const[n,r]=H8();return f__namespace.useImperativeHandle(t,()=>({patchElement:r}),[r]),f__namespace.createElement(f__namespace.Fragment,null,n)}));function qN(){const e=f__namespace.useRef(null),[t,n]=f__namespace.useState([]);f__namespace.useEffect(()=>{t.length&&(Et(t).forEach(s=>{s();}),n([]));},[t]);const r=f__namespace.useCallback(i=>function(a){d$+=1;const l=f__namespace.createRef();let c;const u=new Promise(g=>{c=g;});let d=false,m;const p=f__namespace.createElement(Ij,{key:`modal-${d$}`,config:i(a),ref:l,afterClose:()=>{m?.();},isSilent:()=>d,onConfirm:g=>{c(g);}});return m=e.current?.patchElement(p),m&&ys.push(m),{destroy:()=>{function g(){l.current?.destroy();}l.current?g():n(b=>[].concat(Et(b),[g]));},update:g=>{function b(){l.current?.update(g);}l.current?b():n(y=>[].concat(Et(y),[b]));},then:g=>(d=true,u.then(g))}},[]);return [f__namespace.useMemo(()=>({info:r(HN),success:r(VN),error:r(jN),warning:r(_N),confirm:r(WN)}),[r]),f__namespace.createElement(Pj,{key:"modal-holder",ref:e})]}function UN(e){return ju(_N(e))}const xo=LN;xo.useModal=qN;xo.info=function(t){return ju(HN(t))};xo.success=function(t){return ju(VN(t))};xo.error=function(t){return ju(jN(t))};xo.warning=UN;xo.warn=UN;xo.confirm=function(t){return ju(WN(t))};xo.destroyAll=function(){for(;ys.length;){const t=ys.pop();t&&t();}};xo.config=wj;xo._InternalPanelDoNotUseOrYouWillBeFired=$j;const Jf=f.createContext({}),GN=f.createContext({message:{},notification:{},modal:{}});function em(){return em=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},em.apply(this,arguments)}const v1=f__namespace.forwardRef((e,t)=>{const{prefixCls:n,style:r,className:o,duration:i=4.5,showProgress:s,pauseOnHover:a=true,eventKey:l,content:c,closable:u,props:d,onClick:m,onNoticeClose:p,times:h,hovering:g}=e,[b,y]=f__namespace.useState(false),[C,x]=f__namespace.useState(0),[w,S]=f__namespace.useState(0),I=g||b,$=typeof i=="number"?i:0,E=$>0&&s,P=()=>{p(l);},M=L=>{(L.key==="Enter"||L.code==="Enter"||L.keyCode===_e.ENTER)&&P();};f__namespace.useEffect(()=>{if(!I&&$>0){const L=Date.now()-w,V=setTimeout(()=>{P();},$*1e3-w);return ()=>{a&&clearTimeout(V),S(Date.now()-L);}}},[$,I,h]),f__namespace.useEffect(()=>{if(!I&&E&&(a||w===0)){const L=performance.now();let V;const _=()=>{cancelAnimationFrame(V),V=requestAnimationFrame(z=>{const D=z+w-L,W=Math.min(D/($*1e3),1);x(W*100),W<1&&_();});};return _(),()=>{a&&cancelAnimationFrame(V);}}},[$,w,I,E,h]);const N=f__namespace.useMemo(()=>typeof u=="object"&&u!==null?u:{},[u]),A=or(N,true),k=100-(!C||C<0?0:C>100?100:C),R=`${n}-notice`;return f__namespace.createElement("div",em({},d,{ref:t,className:H(R,o,{[`${R}-closable`]:u}),style:r,onMouseEnter:L=>{y(true),d?.onMouseEnter?.(L);},onMouseLeave:L=>{y(false),d?.onMouseLeave?.(L);},onClick:m}),f__namespace.createElement("div",{className:`${R}-content`},c),u&&f__namespace.createElement("button",em({className:`${R}-close`,onKeyDown:M,"aria-label":"Close"},A,{onClick:L=>{L.preventDefault(),L.stopPropagation(),P();}}),N.closeIcon??"x"),E&&f__namespace.createElement("progress",{className:`${R}-progress`,max:"100",value:k},k+"%"))}),KN=f.createContext({}),XN=({children:e,classNames:t})=>f.createElement(KN.Provider,{value:{classNames:t}},e),f$=8,m$=3,p$=16,Nj=e=>{const t={offset:f$,threshold:m$,gap:p$};return e&&typeof e=="object"&&(t.offset=e.offset??f$,t.threshold=e.threshold??m$,t.gap=e.gap??p$),[!!e,t]};function tm(){return tm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},tm.apply(this,arguments)}const Mj=e=>{const{configList:t,placement:n,prefixCls:r,className:o,style:i,motion:s,onAllNoticeRemoved:a,onNoticeClose:l,stack:c}=e,{classNames:u}=f.useContext(KN),d=f.useRef({}),[m,p]=f.useState(null),[h,g]=f.useState([]),b=t.map($=>({config:$,key:String($.key)})),[y,{offset:C,threshold:x,gap:w}]=Nj(c),S=y&&(h.length>0||b.length<=x),I=typeof s=="function"?s(n):s;return f.useEffect(()=>{y&&h.length>1&&g($=>$.filter(E=>b.some(({key:P})=>E===P)));},[h,b,y]),f.useEffect(()=>{y&&d.current[b[b.length-1]?.key]&&p(d.current[b[b.length-1]?.key]);},[b,y]),f.createElement(SF,tm({key:n,className:H(r,`${r}-${n}`,u?.list,o,{[`${r}-stack`]:!!y,[`${r}-stack-expanded`]:S}),style:i,keys:b,motionAppear:true},I,{onAllRemoved:()=>{a(n);}}),({config:$,className:E,style:P,index:M},N)=>{const{key:A,times:k}=$,R=String(A),{className:L,style:V,classNames:_,styles:z,...D}=$,W=b.findIndex(B=>B.key===R),O={};if(y){const B=b.length-1-(W>-1?W:M-1),j=n==="top"||n==="bottom"?"-50%":"0";if(B>0){O.height=S?d.current[R]?.offsetHeight:m?.offsetHeight;let Y=0;for(let K=0;K<B;K++)Y+=d.current[b[b.length-1-K].key]?.offsetHeight+w;const q=(S?Y:B*C)*(n.startsWith("top")?1:-1),U=!S&&m?.offsetWidth&&d.current[R]?.offsetWidth?(m?.offsetWidth-C*2*(B<3?B:3))/d.current[R]?.offsetWidth:1;O.transform=`translate3d(${j}, ${q}px, 0) scaleX(${U})`;}else O.transform=`translate3d(${j}, 0, 0)`;}return f.createElement("div",{ref:N,className:H(`${r}-notice-wrapper`,E,_?.wrapper),style:{...P,...O,...z?.wrapper},onMouseEnter:()=>g(B=>B.includes(R)?B:[...B,R]),onMouseLeave:()=>g(B=>B.filter(j=>j!==R))},f.createElement(v1,tm({},D,{ref:B=>{W>-1?d.current[R]=B:delete d.current[R];},prefixCls:r,classNames:_,styles:z,className:H(L,u?.notice),style:V,times:k,key:A,eventKey:A,onNoticeClose:l,hovering:y&&h.length>0})))})},Rj=f__namespace.forwardRef((e,t)=>{const{prefixCls:n="rc-notification",container:r,motion:o,maxCount:i,className:s,style:a,onAllRemoved:l,stack:c,renderNotifications:u}=e,[d,m]=f__namespace.useState([]),p=x=>{const w=d.find(E=>E.key===x),S=w?.closable,I=S&&typeof S=="object"?S:{},{onClose:$}=I;$?.(),w?.onClose?.(),m(E=>E.filter(P=>P.key!==x));};f__namespace.useImperativeHandle(t,()=>({open:x=>{m(w=>{let S=[...w];const I=S.findIndex(E=>E.key===x.key),$={...x};return I>=0?($.times=(w[I]?.times||0)+1,S[I]=$):($.times=0,S.push($)),i>0&&S.length>i&&(S=S.slice(-i)),S});},close:x=>{p(x);},destroy:()=>{m([]);}}));const[h,g]=f__namespace.useState({});f__namespace.useEffect(()=>{const x={};d.forEach(w=>{const{placement:S="topRight"}=w;S&&(x[S]=x[S]||[],x[S].push(w));}),Object.keys(h).forEach(w=>{x[w]=x[w]||[];}),g(x);},[d]);const b=x=>{g(w=>{const S={...w};return (S[x]||[]).length||delete S[x],S});},y=f__namespace.useRef(false);if(f__namespace.useEffect(()=>{Object.keys(h).length>0?y.current=true:y.current&&(l?.(),y.current=false);},[h]),!r)return null;const C=Object.keys(h);return ST.createPortal(f__namespace.createElement(f__namespace.Fragment,null,C.map(x=>{const w=h[x],S=f__namespace.createElement(Mj,{key:x,configList:w,placement:x,prefixCls:n,className:s?.(x),style:a?.(x),motion:o,onNoticeClose:p,onAllNoticeRemoved:b,stack:c});return u?u(S,{prefixCls:n,key:x}):S})),r)}),Aj=()=>document.body;let h$=0;function Tj(...e){const t={};return e.forEach(n=>{n&&Object.keys(n).forEach(r=>{const o=n[r];o!==void 0&&(t[r]=o);});}),t}function YN(e={}){const{getContainer:t=Aj,motion:n,prefixCls:r,maxCount:o,className:i,style:s,onAllRemoved:a,stack:l,renderNotifications:c,...u}=e,[d,m]=f__namespace.useState(),p=f__namespace.useRef(),h=f__namespace.createElement(Rj,{container:d,ref:p,prefixCls:r,motion:n,maxCount:o,className:i,style:s,onAllRemoved:a,stack:l,renderNotifications:c}),[g,b]=f__namespace.useState([]),y=lt(x=>{const w=Tj(u,x);(w.key===null||w.key===void 0)&&(w.key=`rc-notification-${h$}`,h$+=1),b(S=>[...S,{type:"open",config:w}]);}),C=f__namespace.useMemo(()=>({open:y,close:x=>{b(w=>[...w,{type:"close",key:x}]);},destroy:()=>{b(x=>[...x,{type:"destroy"}]);}}),[]);return f__namespace.useEffect(()=>{m(t());}),f__namespace.useEffect(()=>{if(p.current&&g.length){g.forEach(S=>{switch(S.type){case "open":p.current.open(S.config);break;case "close":p.current.close(S.key);break;case "destroy":p.current.destroy();break}});let x,w;b(S=>((x!==S||!w)&&(x=S,w=S.filter(I=>!g.includes(I))),w));}},[g]),[C,h]}const Oj=e=>{const{componentCls:t,notificationMarginEdge:n,animationMaxHeight:r}=e,o=`${t}-notice`,i=new ht("antNotificationFadeIn",{"0%":{transform:"translate3d(100%, 0, 0)",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",opacity:1}}),s=new ht("antNotificationTopFadeIn",{"0%":{top:-r,opacity:0},"100%":{top:0,opacity:1}}),a=new ht("antNotificationBottomFadeIn",{"0%":{bottom:e.calc(r).mul(-1).equal(),opacity:0},"100%":{bottom:0,opacity:1}}),l=new ht("antNotificationLeftFadeIn",{"0%":{transform:"translate3d(-100%, 0, 0)",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",opacity:1}});return {[t]:{[`&${t}-top, &${t}-bottom`]:{marginInline:0,[o]:{marginInline:"auto auto"}},[`&${t}-top`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:s}},[`&${t}-bottom`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:a}},[`&${t}-topRight, &${t}-bottomRight`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:i}},[`&${t}-topLeft, &${t}-bottomLeft`]:{marginRight:{value:0,_skip_check_:true},marginLeft:{value:n,_skip_check_:true},[o]:{marginInlineEnd:"auto",marginInlineStart:0},[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:l}}}}},Fj=["top","topLeft","topRight","bottom","bottomLeft","bottomRight"],Lj={topLeft:"left",topRight:"right",bottomLeft:"left",bottomRight:"right",top:"left",bottom:"left"},Bj=(e,t)=>{const{componentCls:n}=e;return {[`${n}-${t}`]:{[`&${n}-stack > ${n}-notice-wrapper`]:{[t.startsWith("top")?"top":"bottom"]:0,[Lj[t]]:{value:0,_skip_check_:true}}}}},kj=e=>{const t={};for(let n=1;n<e.notificationStackLayer;n++)t[`&:nth-last-child(${n+1})`]={overflow:"hidden",[`& > ${e.componentCls}-notice`]:{opacity:0,transition:`opacity ${e.motionDurationMid}`}};return {[`&:not(:nth-last-child(-n+${e.notificationStackLayer}))`]:{opacity:0,overflow:"hidden",color:"transparent",pointerEvents:"none"},...t}},Dj=e=>{const t={};for(let n=1;n<e.notificationStackLayer;n++)t[`&:nth-last-child(${n+1})`]={background:e.colorBgBlur,backdropFilter:"blur(10px)","-webkit-backdrop-filter":"blur(10px)"};return {...t}},zj=e=>{const{componentCls:t}=e;return {[`${t}-stack`]:{[`& > ${t}-notice-wrapper`]:{transition:`transform ${e.motionDurationSlow}, backdrop-filter 0s`,willChange:"transform, opacity",position:"absolute",...kj(e)}},[`${t}-stack:not(${t}-stack-expanded)`]:{[`& > ${t}-notice-wrapper`]:{...Dj(e)}},[`${t}-stack${t}-stack-expanded`]:{[`& > ${t}-notice-wrapper`]:{"&:not(:nth-last-child(-n + 1))":{opacity:1,overflow:"unset",color:"inherit",pointerEvents:"auto",[`& > ${e.componentCls}-notice`]:{opacity:1}},"&:after":{content:'""',position:"absolute",height:e.margin,width:"100%",insetInline:0,bottom:e.calc(e.margin).mul(-1).equal(),background:"transparent",pointerEvents:"auto"}}},...Fj.map(n=>Bj(e,n)).reduce((n,r)=>({...n,...r}),{})}},QN=e=>{const{iconCls:t,componentCls:n,boxShadow:r,fontSizeLG:o,notificationMarginBottom:i,borderRadiusLG:s,colorSuccess:a,colorInfo:l,colorWarning:c,colorError:u,colorTextHeading:d,notificationBg:m,notificationPadding:p,notificationMarginEdge:h,progressBg:g,notificationProgressHeight:b,fontSize:y,lineHeight:C,width:x,notificationIconSize:w,colorText:S,colorSuccessBg:I,colorErrorBg:$,colorInfoBg:E,colorWarningBg:P}=e,M=`${n}-notice`;return {position:"relative",marginBottom:i,marginInlineStart:"auto",background:m,borderRadius:s,boxShadow:r,[M]:{padding:p,width:x,maxWidth:`calc(100vw - ${X(e.calc(h).mul(2).equal())})`,lineHeight:C,wordWrap:"break-word",borderRadius:s,overflow:"hidden","&-success":I?{background:I}:{},"&-error":$?{background:$}:{},"&-info":E?{background:E}:{},"&-warning":P?{background:P}:{}},[`${M}-title`]:{marginBottom:e.marginXS,color:d,fontSize:o,lineHeight:e.lineHeightLG},[`${M}-description`]:{fontSize:y,color:S,marginTop:e.marginXS},[`${M}-closable ${M}-title`]:{paddingInlineEnd:e.paddingLG},[`${M}-with-icon ${M}-title`]:{marginBottom:e.marginXS,marginInlineStart:e.calc(e.marginSM).add(w).equal(),fontSize:o},[`${M}-with-icon ${M}-description`]:{marginInlineStart:e.calc(e.marginSM).add(w).equal(),fontSize:y},[`${M}-icon`]:{position:"absolute",fontSize:w,lineHeight:1,[`&-success${t}`]:{color:a},[`&-info${t}`]:{color:l},[`&-warning${t}`]:{color:c},[`&-error${t}`]:{color:u}},[`${M}-close`]:{position:"absolute",top:e.notificationPaddingVertical,insetInlineEnd:e.notificationPaddingHorizontal,color:e.colorIcon,outline:"none",width:e.notificationCloseButtonSize,height:e.notificationCloseButtonSize,borderRadius:e.borderRadiusSM,transition:`background-color ${e.motionDurationMid}, color ${e.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none","&:hover":{color:e.colorIconHover,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},...Tr(e)},[`${M}-progress`]:{position:"absolute",display:"block",appearance:"none",inlineSize:`calc(100% - ${X(s)} * 2)`,left:{_skip_check_:true,value:s},right:{_skip_check_:true,value:s},bottom:0,blockSize:b,border:0,"&, &::-webkit-progress-bar":{borderRadius:s,backgroundColor:"rgba(0, 0, 0, 0.04)"},"&::-moz-progress-bar":{background:g},"&::-webkit-progress-value":{borderRadius:s,background:g}},[`${M}-actions`]:{float:"right",marginTop:e.marginSM}}},_j=e=>{const{componentCls:t,notificationMarginBottom:n,notificationMarginEdge:r,motionDurationMid:o,motionEaseInOut:i}=e,s=`${t}-notice`,a=new ht("antNotificationFadeOut",{"0%":{maxHeight:e.animationMaxHeight,marginBottom:n},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return [{[t]:{...Lt(e),position:"fixed",zIndex:e.zIndexPopup,marginRight:{value:r,_skip_check_:true},[`${t}-hook-holder`]:{position:"relative"},[`${t}-fade-appear-prepare`]:{opacity:"0 !important"},[`${t}-fade-enter, ${t}-fade-appear`]:{animationDuration:e.motionDurationMid,animationTimingFunction:i,animationFillMode:"both",opacity:0,animationPlayState:"paused"},[`${t}-fade-leave`]:{animationTimingFunction:i,animationFillMode:"both",animationDuration:o,animationPlayState:"paused"},[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationPlayState:"running"},[`${t}-fade-leave${t}-fade-leave-active`]:{animationName:a,animationPlayState:"running"},"&-rtl":{direction:"rtl",[`${s}-actions`]:{float:"left"}}}},{[t]:{[`${s}-wrapper`]:QN(e)}}]},ZN=e=>({zIndexPopup:e.zIndexPopupBase+cy+50,width:384,progressBg:`linear-gradient(90deg, ${e.colorPrimaryBorderHover}, ${e.colorPrimary})`,colorSuccessBg:void 0,colorErrorBg:void 0,colorInfoBg:void 0,colorWarningBg:void 0}),JN=e=>{const t=e.paddingMD,n=e.paddingLG;return vt(e,{notificationBg:e.colorBgElevated,notificationPaddingVertical:t,notificationPaddingHorizontal:n,notificationIconSize:e.calc(e.fontSizeLG).mul(e.lineHeightLG).equal(),notificationCloseButtonSize:e.calc(e.controlHeightLG).mul(.55).equal(),notificationMarginBottom:e.margin,notificationPadding:`${X(e.paddingMD)} ${X(e.paddingContentHorizontalLG)}`,notificationMarginEdge:e.marginLG,animationMaxHeight:150,notificationStackLayer:3,notificationProgressHeight:2})},eM=xt("Notification",e=>{const t=JN(e);return [_j(t),Oj(t),zj(t)]},ZN),Hj=dl(["Notification","PurePanel"],e=>{const t=`${e.componentCls}-notice`,n=JN(e);return {[`${t}-pure-panel`]:{...QN(n),width:n.width,maxWidth:`calc(100vw - ${X(e.calc(n.notificationMarginEdge).mul(2).equal())})`,margin:0}}},ZN);function y1(e,t){return t===null||t===false?null:t||f__namespace.createElement(ai,{className:`${e}-close-icon`})}const Vj={success:p1,info:h1,error:zu,warning:_u},tM=e=>{const{prefixCls:t,icon:n,type:r,title:o,description:i,actions:s,role:a="alert",styles:l,classNames:c}=e;let u=null;return n?u=f__namespace.createElement("span",{className:H(`${t}-icon`,c.icon),style:l.icon},n):r&&(u=f__namespace.createElement(Vj[r]||null,{className:H(`${t}-icon`,c.icon,`${t}-icon-${r}`),style:l.icon})),f__namespace.createElement("div",{className:H({[`${t}-with-icon`]:u}),role:a},u,f__namespace.createElement("div",{className:H(`${t}-title`,c.title),style:l.title},o),i&&f__namespace.createElement("div",{className:H(`${t}-description`,c.description),style:l.description},i),s&&f__namespace.createElement("div",{className:H(`${t}-actions`,c.actions),style:l.actions},s))},jj=e=>{const{prefixCls:t,icon:n,type:r,message:o,title:i,description:s,btn:a,actions:l,closeIcon:c,className:u,style:d,styles:m,classNames:p,closable:h,...g}=e,{getPrefixCls:b,className:y,style:C,classNames:x,styles:w}=St("notification"),[S,I]=It([x,p],[w,m],{props:e}),{notification:$}=f__namespace.useContext(ot),E=l??a,P=i??o,M=t||b("notification"),N=`${M}-notice`,A=sn(M),[k,R]=eM(M,A),[L,V,,_]=Z0(Di(e),Di($),{closable:true,closeIcon:f__namespace.createElement(ai,{className:`${M}-close-icon`}),closeIconRender:D=>y1(M,D)}),z=L?{onClose:h&&typeof h=="object"?h?.onClose:void 0,closeIcon:V,..._}:false;return f__namespace.createElement("div",{className:H(`${N}-pure-panel`,k,u,R,A,S.root),style:I.root},f__namespace.createElement(Hj,{prefixCls:M}),f__namespace.createElement(v1,{style:{...C,...d},...g,prefixCls:M,eventKey:"pure",duration:null,closable:z,className:H(u,y),content:f__namespace.createElement(tM,{classNames:S,styles:I,prefixCls:N,icon:n,type:r,title:P,description:s,actions:E})}))};function Wj(e,t,n){let r;switch(e){case "top":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:t,bottom:"auto"};break;case "topLeft":r={left:0,top:t,bottom:"auto"};break;case "topRight":r={right:0,top:t,bottom:"auto"};break;case "bottom":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:n};break;case "bottomLeft":r={left:0,top:"auto",bottom:n};break;default:r={right:0,top:"auto",bottom:n};break}return r}function qj(e){return {motionName:`${e}-fade`}}function Uj(e,t,n){return typeof e<"u"?e:typeof t?.closeIcon<"u"?t.closeIcon:n?.closeIcon}const g$=24,Gj=4.5,Kj="topRight",Xj=({children:e,prefixCls:t})=>{const n=sn(t),[r,o]=eM(t,n);return f.createElement(XN,{classNames:{list:H(r,o,n)}},e)},Yj=(e,{prefixCls:t,key:n})=>f.createElement(Xj,{prefixCls:t,key:n},e),Qj=f.forwardRef((e,t)=>{const{top:n,bottom:r,prefixCls:o,getContainer:i,maxCount:s,rtl:a,onAllRemoved:l,stack:c,duration:u=Gj,pauseOnHover:d=true,showProgress:m}=e,{getPrefixCls:p,getPopupContainer:h,direction:g}=St("notification"),{notification:b}=f.useContext(ot),[,y]=Tn(),C=o||p("notification"),x=f.useMemo(()=>typeof u=="number"&&u>0?u:false,[u]),w=N=>Wj(N,n??g$,r??g$),S=()=>H({[`${C}-rtl`]:a??g==="rtl"}),I=()=>qj(C),[$,E]=YN({prefixCls:C,style:w,className:S,motion:I,closable:{closeIcon:y1(C)},duration:x,getContainer:()=>i?.()||h?.()||document.body,maxCount:s,pauseOnHover:d,showProgress:m,onAllRemoved:l,renderNotifications:Yj,stack:c===false?false:{threshold:typeof c=="object"?c?.threshold:void 0,offset:8,gap:y.margin}}),[P,M]=It([b?.classNames,e?.classNames],[b?.styles,e?.styles],{props:e});return f.useImperativeHandle(t,()=>({...$,prefixCls:C,notification:b,classNames:P,styles:M})),E});function nM(e){const t=f.useRef(null),{notification:n}=f.useContext(ot);return [f.useMemo(()=>{const o=l=>{if(!t.current)return;const{open:c,prefixCls:u,notification:d,classNames:m,styles:p}=t.current,h=d?.className||{},g=d?.style||{},b=`${u}-notice`,{title:y,message:C,description:x,icon:w,type:S,btn:I,actions:$,className:E,style:P,role:M="alert",closeIcon:N,closable:A,classNames:k={},styles:R={},...L}=l,V=y??C,_=$??I,z=y1(b,Uj(N,e,d)),[D,W,,O]=U3(Di({...e||{},...l}),Di(n),{closable:true,closeIcon:z}),B=D?{onClose:A&&typeof A=="object"?A.onClose:void 0,closeIcon:W,...O}:false,j=Ei(k,{props:l}),Y=Ei(R,{props:l}),q=Om(void 0,m,j),U=ey(p,Y);return c({placement:e?.placement??Kj,...L,content:f.createElement(tM,{prefixCls:b,icon:w,type:S,title:V,description:x,actions:_,role:M,classNames:q,styles:U}),className:H({[`${b}-${S}`]:S},E,h,q.root),style:{...g,...U.root,...P},closable:B})},s={open:o,destroy:l=>{l!==void 0?t.current?.close(l):t.current?.destroy();}};return ["success","info","warning","error"].forEach(l=>{s[l]=c=>o({...c,type:l});}),s},[e,n]),f.createElement(Qj,{key:"notification-holder",...e,ref:t})]}function rM(e){return nM(e)}let wa=null,vf=e=>e(),nm=[],ru={};function b$(){const{getContainer:e,rtl:t,maxCount:n,top:r,bottom:o,showProgress:i,pauseOnHover:s}=ru,a=e?.()||document.body;return {getContainer:()=>a,rtl:t,maxCount:n,top:r,bottom:o,showProgress:i,pauseOnHover:s}}const Zj=f.forwardRef((e,t)=>{const{notificationConfig:n,sync:r}=e,{getPrefixCls:o}=f.useContext(ot),i=ru.prefixCls||o("notification"),s=f.useContext(Jf),[a,l]=nM({...n,prefixCls:i,...s.notification});return f.useEffect(r,[]),f.useImperativeHandle(t,()=>{const c={...a};return Object.keys(c).forEach(u=>{c[u]=(...d)=>(r(),a[u].apply(a,d));}),{instance:c,sync:r}}),l}),Jj=f.forwardRef((e,t)=>{const[n,r]=f.useState(b$),o=()=>{r(b$);};f.useEffect(o,[]);const i=gy(),s=i.getRootPrefixCls(),a=i.getIconPrefixCls(),l=i.getTheme(),c=f.createElement(Zj,{ref:t,sync:o,notificationConfig:n});return f.createElement(yr,{prefixCls:s,iconPrefixCls:a,theme:l},i.holderRender?i.holderRender(c):c)}),C1=()=>{if(!wa){const e=document.createDocumentFragment(),t={fragment:e};wa=t,vf(()=>{Wm(f.createElement(Jj,{ref:n=>{const{instance:r,sync:o}=n||{};Promise.resolve().then(()=>{!t.instance&&r&&(t.instance=r,t.sync=o,C1());});}}),e);});return}wa.instance&&(nm.forEach(e=>{switch(e.type){case "open":{vf(()=>{wa.instance.open({...ru,...e.config});});break}case "destroy":vf(()=>{wa?.instance?.destroy(e.key);});break}}),nm=[]);};function eW(e){ru={...ru,...e},vf(()=>{wa?.sync?.();});}function oM(e){nm.push({type:"open",config:e}),C1();}const tW=e=>{nm.push({type:"destroy",key:e}),C1();},nW=["success","info","warning","error"],rW={open:oM,destroy:tW,config:eW,useNotification:rM,_InternalPanelDoNotUseOrYouWillBeFired:jj},iM=rW;nW.forEach(e=>{iM[e]=t=>oM({...t,type:e});});const oW=e=>{const{componentCls:t,iconCls:n,boxShadow:r,colorText:o,colorSuccess:i,colorError:s,colorWarning:a,colorInfo:l,fontSizeLG:c,motionEaseInOutCirc:u,motionDurationSlow:d,marginXS:m,paddingXS:p,borderRadiusLG:h,zIndexPopup:g,contentPadding:b,contentBg:y}=e,C=`${t}-notice`,x=new ht("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:p,transform:"translateY(0)",opacity:1}}),w=new ht("MessageMoveOut",{"0%":{maxHeight:e.height,padding:p,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}}),S={padding:p,textAlign:"center",[`${t}-custom-content`]:{display:"flex",alignItems:"center"},[`${t}-custom-content > ${n}`]:{marginInlineEnd:m,fontSize:c},[`${C}-content`]:{display:"inline-block",padding:b,background:y,borderRadius:h,boxShadow:r,pointerEvents:"all"},[`${t}-success > ${n}`]:{color:i},[`${t}-error > ${n}`]:{color:s},[`${t}-warning > ${n}`]:{color:a},[`${t}-info > ${n},
${t}-loading > ${n}`]:{color:l}};return [{[t]:{...Lt(e),color:o,position:"fixed",top:m,width:"100%",pointerEvents:"none",zIndex:g,[`${t}-move-up`]:{animationFillMode:"forwards"},[`
${t}-move-up-appear,
${t}-move-up-enter
`]:{animationName:x,animationDuration:d,animationPlayState:"paused",animationTimingFunction:u},[`
${t}-move-up-appear${t}-move-up-appear-active,
${t}-move-up-enter${t}-move-up-enter-active
`]:{animationPlayState:"running"},[`${t}-move-up-leave`]:{animationName:w,animationDuration:d,animationPlayState:"paused",animationTimingFunction:u},[`${t}-move-up-leave${t}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}}},{[t]:{[`${C}-wrapper`]:{...S}}},{[`${t}-notice-pure-panel`]:{...S,padding:0,textAlign:"start"}}]},iW=e=>({zIndexPopup:e.zIndexPopupBase+cy+10,contentBg:e.colorBgElevated,contentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`}),sM=xt("Message",e=>{const t=vt(e,{height:150});return oW(t)},iW),sW={info:f__namespace.createElement(h1,null),success:f__namespace.createElement(p1,null),error:f__namespace.createElement(zu,null),warning:f__namespace.createElement(_u,null),loading:f__namespace.createElement(op,null)},aM=e=>{const{prefixCls:t,type:n,icon:r,children:o,classNames:i,styles:s}=e,a=r||n&&sW[n],l=Rn(a,c=>{const u={...c?.style,...s?.icon};return {className:H(c.className,i?.icon),style:u}});return f__namespace.createElement("div",{className:H(`${t}-custom-content`,`${t}-${n}`)},l,f__namespace.createElement("span",{className:i?.content,style:s?.content},o))},aW=e=>{const{prefixCls:t,className:n,style:r,type:o,icon:i,content:s,classNames:a,styles:l,...c}=e,{getPrefixCls:u,className:d,style:m,classNames:p,styles:h}=St("message"),g=t||u("message"),b=sn(g),[y,C]=sM(g,b),[x,w]=It([p,a],[h,l],{props:e});return f__namespace.createElement(v1,{...c,prefixCls:g,className:H(d,x.root,n,y,`${g}-notice-pure-panel`,C,b),style:{...w.root,...m,...r},eventKey:"pure",duration:null,content:f__namespace.createElement(aM,{prefixCls:g,type:o,icon:i,classNames:x,styles:w},s)})};function lW(e,t){return {motionName:t??`${e}-move-up`}}function x1(e){let t;const n=new Promise(o=>{t=e(()=>{o(true);});}),r=()=>{t?.();};return r.then=(o,i)=>n.then(o,i),r.promise=n,r}const cW=8,uW=3,dW=({children:e,prefixCls:t})=>{const n=sn(t),[r,o]=sM(t,n);return f__namespace.createElement(XN,{classNames:{list:H(r,o,n)}},e)},fW=(e,{prefixCls:t,key:n})=>f__namespace.createElement(dW,{prefixCls:t,key:n},e),mW=f__namespace.forwardRef((e,t)=>{const{top:n,prefixCls:r,getContainer:o,maxCount:i,duration:s=uW,rtl:a,transitionName:l,onAllRemoved:c,pauseOnHover:u=true}=e,{getPrefixCls:d,direction:m,getPopupContainer:p}=St("message"),{message:h}=f__namespace.useContext(ot),g=r||d("message"),b=()=>({left:"50%",transform:"translateX(-50%)",top:n??cW}),y=()=>H({[`${g}-rtl`]:a??m==="rtl"}),C=()=>lW(g,l),[x,w]=It([e?.classNames,h?.classNames],[e?.styles,h?.styles],{props:e}),[S,I]=YN({prefixCls:g,style:b,className:y,motion:C,closable:false,duration:s,getContainer:()=>o?.()||p?.()||document.body,maxCount:i,onAllRemoved:c,renderNotifications:fW,pauseOnHover:u});return f__namespace.useImperativeHandle(t,()=>({...S,prefixCls:g,message:h,classNames:x,styles:w})),I});let v$=0;function lM(e){const t=f__namespace.useRef(null);return [f__namespace.useMemo(()=>{const r=l=>{t.current?.close(l);},o=l=>{if(!t.current){const O=()=>{};return O.then=()=>{},O}const{open:c,prefixCls:u,message:d,classNames:m,styles:p}=t.current,h=d?.className||{},g=d?.style||{},b=d?.classNames||{},y=d?.styles||{},C=`${u}-notice`,{content:x,icon:w,type:S,key:I,className:$,style:E,onClose:P,classNames:M={},styles:N={},...A}=l;let k=I;kn(k)||(v$+=1,k=`antd-message-${v$}`);const R={...e,...l},L=Ei(b,{props:R}),V=Ei(M,{props:R}),_=Ei(y,{props:R}),z=Ei(N,{props:R}),D=Om(void 0,L,V,m),W=ey(_,z,p);return x1(O=>(c({...A,key:k,content:f__namespace.createElement(aM,{prefixCls:u,type:S,icon:w,classNames:D,styles:W},x),placement:"top",className:H({[`${C}-${S}`]:S},$,h,D.root),style:{...W.root,...g,...E},onClose:()=>{P?.(),O();}}),()=>{r(k);}))},s={open:o,destroy:l=>{l!==void 0?r(l):t.current?.destroy();}};return ["info","success","warning","error","loading"].forEach(l=>{const c=(u,d,m)=>{let p;u&&typeof u=="object"&&"content"in u?p=u:p={content:u};let h,g;typeof d=="function"?g=d:(h=d,g=m);const b={onClose:g,duration:h,...p,type:l};return o(b)};s[l]=c;}),s},[]),f__namespace.createElement(mW,{key:"message-holder",...e,ref:t})]}function cM(e){return lM(e)}const pW=e=>{const{componentCls:t,colorText:n,fontSize:r,lineHeight:o,fontFamily:i}=e;return {[t]:{color:n,fontSize:r,lineHeight:o,fontFamily:i,[`&${t}-rtl`]:{direction:"rtl"}}}},hW=()=>({}),gW=xt("App",pW,hW),bW=e=>{const{prefixCls:t,children:n,className:r,rootClassName:o,message:i,notification:s,style:a,component:l="div"}=e,{direction:c,getPrefixCls:u}=f.useContext(ot),d=u("app",t),[m,p]=gW(d),h=H(m,d,r,o,p,{[`${d}-rtl`]:c==="rtl"}),g=f.useContext(Jf),b=f.useMemo(()=>({message:{...g.message,...i},notification:{...g.notification,...s}}),[i,s,g.message,g.notification]),[y,C]=cM(b.message),[x,w]=rM(b.notification),[S,I]=qN(),$=f.useMemo(()=>({message:y,notification:x,modal:S}),[y,x,S]),E=l===false?f.Fragment:l,P={className:h,style:a};return f.createElement(GN.Provider,{value:$},f.createElement(Jf.Provider,{value:b},f.createElement(E,{...l===false?void 0:P},I,C,w,n)))},vW=()=>f.useContext(GN),Wu=bW;Wu.useApp=vW;let ps=null,Cs=e=>e(),ou=[],iu={};function y$(){const{getContainer:e,duration:t,rtl:n,maxCount:r,top:o}=iu,i=e?.()||document.body;return {getContainer:()=>i,duration:t,rtl:n,maxCount:r,top:o}}const yW=f.forwardRef((e,t)=>{const{messageConfig:n,sync:r}=e,{getPrefixCls:o}=f.useContext(ot),i=iu.prefixCls||o("message"),s=f.useContext(Jf),[a,l]=lM({...n,prefixCls:i,...s.message});return f.useImperativeHandle(t,()=>{const c={...a};return Object.keys(c).forEach(u=>{c[u]=(...d)=>(r(),a[u].apply(a,d));}),{instance:c,sync:r}}),l}),CW=f.forwardRef((e,t)=>{const[n,r]=f.useState(y$),o=()=>{r(y$);};f.useEffect(o,[]);const i=gy(),s=i.getRootPrefixCls(),a=i.getIconPrefixCls(),l=i.getTheme(),c=f.createElement(yW,{ref:t,sync:o,messageConfig:n});return f.createElement(yr,{prefixCls:s,iconPrefixCls:a,theme:l},i.holderRender?i.holderRender(c):c)}),up=()=>{if(!ps){const e=document.createDocumentFragment(),t={fragment:e};ps=t,Cs(()=>{Wm(f.createElement(CW,{ref:n=>{const{instance:r,sync:o}=n||{};Promise.resolve().then(()=>{!t.instance&&r&&(t.instance=r,t.sync=o,up());});}}),e);});return}ps.instance&&(ou.forEach(e=>{const{type:t,skipped:n}=e;if(!n)switch(t){case "open":{Cs(()=>{const r=ps.instance.open({...iu,...e.config});r?.then(e.resolve),e.setCloseFn(r);});break}case "destroy":Cs(()=>{ps?.instance.destroy(e.key);});break;default:Cs(()=>{var r;const o=(r=ps.instance)[t].apply(r,Et(e.args));o?.then(e.resolve),e.setCloseFn(o);});}}),ou=[]);};function xW(e){iu={...iu,...e},Cs(()=>{ps?.sync?.();});}function wW(e){const t=x1(n=>{let r;const o={type:"open",config:e,resolve:n,setCloseFn:i=>{r=i;}};return ou.push(o),()=>{r?Cs(()=>{r();}):o.skipped=true;}});return up(),t}function SW(e,t){const n=x1(r=>{let o;const i={type:e,args:t,resolve:r,setCloseFn:s=>{o=s;}};return ou.push(i),()=>{o?Cs(()=>{o();}):i.skipped=true;}});return up(),n}const $W=e=>{ou.push({type:"destroy",key:e}),up();},EW=["success","info","warning","error","loading"],IW={open:wW,destroy:$W,config:xW,useMessage:cM,_InternalPanelDoNotUseOrYouWillBeFired:aW},w1=IW;EW.forEach(e=>{w1[e]=(...t)=>SW(e,t);});function rm(e,t,n){return e<t?t:e>n?n:e}const PW=()=>document.querySelector(".bili-header__bar");function uM(){const e=PW();return !!(e&&globalThis.getComputedStyle(e).display==="none")}const S1=Ks(uM);function NW(){if(!uM())return 64;if(!document.body.classList.contains("fixed-navbar"))return 0;const t=document.documentElement.style.getPropertyValue("--navbar-height");if(!t)return 50;const n=Number(t.replace("px",""));return Number.isNaN(n)?50:n}const ks=Ks(NW);function MW(){const e=document.documentElement.style.getPropertyValue("--navbar-bounds-padding");return e?100-rm(Number(e.replace("%","")),2,10)*2:void 0}const $1=Ks(MW);function RW(){const e=$1.use(),{pureRecommend:t,grid:{useCustomGrid:n}}=Mt();if(!t||!n||!e)return;const r=(1-e/100)/2*window.innerWidth+10,o=40;return r>o+24+5?void 0:r<o?0:Math.floor((r-o)/2)}const dp=Ks(function(){return globalThis.getComputedStyle(document.documentElement).getPropertyValue("--theme-color")});function AW(){S1.updateThrottled(),ks.updateThrottled(),$1.updateThrottled(),dp.updateThrottled();}const E1=new MutationObserver(()=>AW());E1.observe(document.documentElement,{attributes:true,attributeFilter:["style"]});E1.observe(document.body,{attributes:true,attributeFilter:["class"]});window.addEventListener("unload",()=>{E1.disconnect();});document.body.addEventListener("click",e=>{const t=e.target,n=r=>!!r?.matches(".be-button.ok");!n(t)&&!n(t.parentElement)||t.closest(".be-popup.picker.open")&&setTimeout(dp.updateThrottled,1e3);},{capture:true,passive:true});const dM={maxCount:5,top:ks.get()-4};w1.config(dM);function TW(){const e=ks.use();return v(Wu,{message:{...dM,top:e-4},children:v(OW,{})})}let Od,ft=w1,Qa=iM,I1=xo;function OW(){return Od=Wu.useApp(),ft=Od.message,Qa=Od.notification,I1=Od.modal,null}function Ur(e){return e.filter(Boolean).filter(t=>t.test===void 0?true:typeof t.test=="boolean"?t.test:t.test()).map(t=>a3(t,["test"]))}const FW=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"currentColor",fillRule:"evenodd",d:"M17.793 3.693a1 1 0 0 1 1.414 0l2.5 2.5a1 1 0 0 1 0 1.414l-2.5 2.5a1 1 0 1 1-1.414-1.414L19.586 6.9l-1.793-1.793a1 1 0 0 1 0-1.414m0 10.15a1 1 0 0 1 1.414 0l2.5 2.5a1 1 0 0 1 0 1.414l-2.5 2.5a1 1 0 1 1-1.414-1.414l1.793-1.793l-1.793-1.793a1 1 0 0 1 0-1.414",clipRule:"evenodd"}),v("path",{fill:"currentColor",fillRule:"evenodd",d:"M19.054 5.913c.352.023.657.043.946.043a1 1 0 1 1 0 2c-.346 0-.776-.028-1.184-.054a37 37 0 0 0-.606-.037c-.614-.03-1.118-.02-1.482.065c-1.456.341-3.07 1.481-4.394 4.117c1.304 2.555 2.9 3.529 4.394 3.879c.364.085.868.094 1.482.064c.186-.009.393-.022.606-.036A19 19 0 0 1 20 15.899a1 1 0 1 1 0 2c-.289 0-.594.02-.946.044c-.227.015-.473.032-.747.045c-.63.03-1.377.04-2.035-.115c-1.812-.424-3.549-1.493-4.972-3.634c-.553 1.02-1.177 1.822-1.927 2.427c-.978.788-2.12 1.106-3.213 1.24c-.882.108-1.81.102-2.64.096L3 18a1 1 0 1 1 0-2l.582.002c.824.005 1.593.01 2.335-.08c.892-.11 1.624-.348 2.201-.813c.687-.554 1.323-1.447 1.962-2.95l.046-.109l-.046-.109c-.651-1.53-1.303-2.495-2.015-3.103c-.56-.477-1.277-.726-2.161-.845c-.763-.102-1.562-.099-2.42-.095L3 7.899a1 1 0 1 1 0-2l.445-.001c.853-.004 1.813-.01 2.724.113c1.094.146 2.234.486 3.194 1.305c.75.64 1.375 1.481 1.93 2.52c1.408-2.187 3.136-3.421 4.979-3.853c.658-.154 1.405-.145 2.035-.115c.274.013.52.03.747.045",clipRule:"evenodd"})]}),LW=f.forwardRef(FW);function Zs(e){return f.forwardRef((t,n)=>e({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:"1em",height:"1em",...t,ref:n}))}Zs(e=>v("svg",{viewBox:"0 0 1024 1024",...e,children:v("path",{d:"M427 116L263 545q-7 19 4.5 35.5T299 597h115L308 872q-7 18 3 31t26 15.5q16 2.5 29-12.5l386-451q10-12 9-26t-11-24q-10-10-25-10H607l172-249q9-13 6.5-27T773 95q-10-10-26-10H471q-15 0-27 8.5T427 116z"})}));const BW=Zs(e=>v("svg",{viewBox:"0 0 1024 1024",fill:"currentColor",...e,children:v("path",{d:"M550 470q10-36 34-62.5t56.5-41Q673 352 709 352q35 0 67.5 14t57 40.5Q858 433 869 470q1 4-1 7t-9 3H560q-4 0-8-2t-2-8zm-64-11q-7 27 3.5 46t28.5 29q18 10 36 10h310q19 0 37.5-10.5t28-30Q939 484 931 456q-14-51-46.5-88.5T807 309q-45-21-98-21-57 0-103 23.5t-77 62Q498 412 486 459zm-17 15q-35-10-61.5-34t-41-56.5Q352 351 352 315q0-35 14-67.5t40.5-57Q433 166 470 155q3-1 6.5 1t3.5 9v299q0 4-2 8t-9 2zm-11 64q28 7 47-3t29-28.5q10-18.5 10-36.5V160q0-19-10.5-37.5t-30.5-28Q483 85 455 93q-50 14-88 46.5T308.5 217Q288 262 288 315q0 57 23 103t62 77q39 31 85 43zm16 16q-10 36-34 62.5t-57 41Q350 672 314 672q-35 0-67.5-14T190 617.5Q166 591 155 554q-1-3 1-6.5t9-3.5h298q5 0 9 2t2 8zm63 11q7-27-3-46t-28-29q-18-10-36-10H160q-19 0-37.5 10.5t-28 30Q85 540 93 569q14 50 46.5 87.5T217 715q45 21 97 21 57 0 103.5-23.5t77.5-62q31-38.5 42-85.5zm17-15q36 10 62.5 34t41 57q14.5 33 14.5 69 0 35-14 67t-40.5 56.5Q591 858 554 869q-3 1-6.5-1t-3.5-9V560q0-4 2-8t8-2zm11-63q-27-7-46 3t-29 28q-10 18-10 36v310q0 19 10.5 37.5t30 28Q540 939 568 931q51-14 88.5-46.5T715 807q21-45 21-97 0-57-23.5-103.5t-62-77.5Q612 498 565 487z"})}));Zs(e=>v("svg",{viewBox:"0 0 1024 1024",fill:"currentColor",...e,children:v("path",{d:"M512 160q73 0 136.5 27.5t112 75.5q48.5 48 76 112T864 512q0 20-2 39-2 13 6.5 23.5T890 586q13 2 23.5-6.5T925 558q3-23 3-46 0-86-32.5-161.5T806 218q-57-57-132.5-89.5T512 96q-86 0-161.5 32.5T218 218q-57 57-89.5 132.5T96 512q0 86 32.5 161.5T218 806q57 57 132.5 89.5T512 928q86 0 162-32.5T806 806q9-9 9-22.5t-9-22.5q-9-9-22.5-9t-22.5 9q-48 48-112 75.5T512 864q-73 0-136.5-27.5t-112-76q-48.5-48.5-76-112T160 512q0-73 27.5-137t76-112q48.5-48 112-75.5T512 160zm276 308q-9 9-9 22.5t9 22.5l78 78q12 13 30 13t30-13l78-78q9-9 9-22.5t-9-22.5q-9-9-22.5-9t-22.5 9l-63 63-63-63q-9-9-22.5-9t-22.5 9zm-148 7l-160-92q-21-13-42.5-.5T416 420v184q0 25 21.5 37.5t42.5-.5l160-92q21-12 21-37t-21-37z"})}));const kW=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 256 256",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"currentColor",children:[v("path",{d:"M80 48v104H32a8 8 0 0 1-8-8V56a8 8 0 0 1 8-8Z",opacity:.2}),v("path",{d:"m239.82 157l-12-96A24 24 0 0 0 204 40H32a16 16 0 0 0-16 16v88a16 16 0 0 0 16 16h43.06l37.78 75.58A8 8 0 0 0 120 240a40 40 0 0 0 40-40v-16h56a24 24 0 0 0 23.82-27M72 144H32V56h40Zm150 21.29a7.88 7.88 0 0 1-6 2.71h-64a8 8 0 0 0-8 8v24a24 24 0 0 1-19.29 23.54L88 150.11V56h116a8 8 0 0 1 7.94 7l12 96a7.87 7.87 0 0 1-1.94 6.29"})]})]}),DW=f.forwardRef(kW),zW=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,children:[v("path",{d:"m24 4l-6 6h-8v8l-6 6l6 6v8h8l6 6l6-6h8v-8l6-6l-6-6v-8h-8z"}),v("path",{d:"M24 30a6 6 0 1 0 0-12a6 6 0 0 0 0 12Z"})]})]}),_W=f.forwardRef(zW),HW=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,children:[v("rect",{width:36,height:36,x:6,y:6,strokeLinecap:"round",rx:3}),v("path",{d:"M18.5 24v-7.794l6.75 3.897L32 24l-6.75 3.897l-6.75 3.897z"})]})]}),VW=f.forwardRef(HW),jW=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"currentColor",d:"M5.616 20q-.691 0-1.153-.462T4 18.384V5.616q0-.691.463-1.153T5.616 4h5.615v1H5.616q-.231 0-.424.192T5 5.616v12.769q0 .23.192.423t.423.192h12.77q.23 0 .423-.192t.192-.423v-5.616h1v5.616q0 .69-.462 1.152T18.384 20zm4.123-5.03l-.708-.709L18.292 5H14V4h6v6h-1V5.708z"})]}),WW=f.forwardRef(jW),qW=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m14 9l3-3l3 3M5 5.5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-4a.5.5 0 0 1-.5-.5zm0 9a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-4a.5.5 0 0 1-.5-.5zM17 6v12"})]}),fM=f.forwardRef(qW),UW=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 5.5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-4a.5.5 0 0 1-.5-.5zm0 9a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-4a.5.5 0 0 1-.5-.5zm9 .5l3 3l3-3m-3 3V6"})]}),Cv=f.forwardRef(UW),GW=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",children:[v("path",{stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,d:"M24 44a19.94 19.94 0 0 0 14.142-5.858A19.94 19.94 0 0 0 44 24a19.94 19.94 0 0 0-5.858-14.142A19.94 19.94 0 0 0 24 4A19.94 19.94 0 0 0 9.858 9.858A19.94 19.94 0 0 0 4 24a19.94 19.94 0 0 0 5.858 14.142A19.94 19.94 0 0 0 24 44Z"}),v("path",{fill:"currentColor",fillRule:"evenodd",d:"M24 11a2.5 2.5 0 1 1 0 5a2.5 2.5 0 0 1 0-5",clipRule:"evenodd"}),v("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,d:"M24.5 34V20h-2M21 34h7"})]})]}),KW=f.forwardRef(GW),XW=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"currentColor",d:"M7 21q-.825 0-1.412-.587T5 19V6q-.425 0-.712-.288T4 5t.288-.712T5 4h4q0-.425.288-.712T10 3h4q.425 0 .713.288T15 4h4q.425 0 .713.288T20 5t-.288.713T19 6v13q0 .825-.587 1.413T17 21zM17 6H7v13h10zm-7 11q.425 0 .713-.288T11 16V9q0-.425-.288-.712T10 8t-.712.288T9 9v7q0 .425.288.713T10 17m4 0q.425 0 .713-.288T15 16V9q0-.425-.288-.712T14 8t-.712.288T13 9v7q0 .425.288.713T14 17M7 6v13z"})]}),fp=f.forwardRef(XW),YW=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"currentColor",d:"M16 4.5V7H5v2h11v2.5L19.5 8M16 12.5V15H5v2h11v2.5l3.5-3.5"})]}),QW=f.forwardRef(YW),ZW=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,children:[v("path",{d:"M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4S4 12.954 4 24s8.954 20 20 20Z"}),v("path",{strokeLinecap:"round",d:"M24.008 12v12.01l8.479 8.48"})]})]}),JW=f.forwardRef(ZW),eq=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",stroke:"currentColor",strokeWidth:4,children:[v("rect",{width:26,height:40,x:11,y:4,rx:3}),v("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M22 10h4m-6 28h8"})]})]}),tq=f.forwardRef(eq),nq=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",stroke:"currentColor",strokeWidth:4,children:[v("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 32h10v9H19z"}),v("rect",{width:38,height:24,x:5,y:8,rx:2}),v("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M22 27h4M14 41h20"})]})]}),rq=f.forwardRef(nq),oq=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",stroke:"currentColor",children:[v("path",{strokeLinecap:"round",strokeWidth:4,d:"M10.858 9.858A19.94 19.94 0 0 0 5 24a19.94 19.94 0 0 0 5.858 14.142m28.284 0A19.94 19.94 0 0 0 45 24a19.94 19.94 0 0 0-5.858-14.142M34.9 33.9A13.96 13.96 0 0 0 39 24a13.96 13.96 0 0 0-4.1-9.9m-19.8 0A13.96 13.96 0 0 0 11 24a13.96 13.96 0 0 0 4.1 9.9"}),v("path",{strokeLinejoin:"round",strokeWidth:3.5,d:"M28.182 20C30.29 20 32 21.612 32 23.6c0 2.588-2.546 4.8-3.818 6Q26.908 30.8 25 32q-1.909-1.2-3.182-2.4C20.545 28.4 18 26.188 18 23.6c0-1.988 1.71-3.6 3.818-3.6c1.328 0 2.498.64 3.182 1.61c.684-.97 1.854-1.61 3.182-1.61Z"})]})]}),iq=f.forwardRef(oq),sq=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"currentColor",d:"m16 6.52l2.76 5.58l.46 1l1 .15l6.16.89l-4.38 4.3l-.75.73l.18 1l1.05 6.13l-5.51-2.89L16 23l-.93.49l-5.51 2.85l1-6.13l.18-1l-.74-.77l-4.42-4.35l6.16-.89l1-.15l.46-1zM16 2l-4.55 9.22l-10.17 1.47l7.36 7.18L6.9 30l9.1-4.78L25.1 30l-1.74-10.13l7.36-7.17l-10.17-1.48Z"})]}),aq=f.forwardRef(sq),lq=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"currentColor",d:"m16 2l-4.55 9.22l-10.17 1.47l7.36 7.18L6.9 30l9.1-4.78L25.1 30l-1.74-10.13l7.36-7.17l-10.17-1.48Z"})]}),cq=f.forwardRef(lq),uq=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,d:"M24 44c8.235 0 15-6.526 15-14.902c0-2.056-.105-4.26-1.245-7.686s-1.369-3.868-2.574-5.984c-.515 4.317-3.27 6.117-3.97 6.655c0-.56-1.666-6.747-4.193-10.45C24.537 8 21.163 5.617 19.185 4c0 3.07-.863 7.634-2.1 9.96c-1.236 2.325-1.468 2.41-3.013 4.14s-2.253 2.265-3.545 4.365S9 27.362 9 29.418C9 37.794 15.765 44 24 44Z"})]}),dq=f.forwardRef(uq),fq=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[v("path",{strokeDasharray:"2 4",strokeDashoffset:6,d:"M12 21c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9",children:v("animate",{attributeName:"stroke-dashoffset",dur:"0.6s",repeatCount:"indefinite",values:"6;0"})}),v("path",{strokeDasharray:32,strokeDashoffset:32,d:"M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9",children:v("animate",{fill:"freeze",attributeName:"stroke-dashoffset",begin:"0.1s",dur:"0.4s",values:"32;0"})}),v("path",{strokeDasharray:10,strokeDashoffset:10,d:"M12 16v-7.5",children:v("animate",{fill:"freeze",attributeName:"stroke-dashoffset",begin:"0.5s",dur:"0.2s",values:"10;0"})}),v("path",{strokeDasharray:6,strokeDashoffset:6,d:"M12 8.5l3.5 3.5M12 8.5l-3.5 3.5",children:v("animate",{fill:"freeze",attributeName:"stroke-dashoffset",begin:"0.7s",dur:"0.2s",values:"6;0"})})]})]}),mq=f.forwardRef(fq),pq=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,children:[v("path",{d:"M19 20a7 7 0 1 0 0-14a7 7 0 0 0 0 14Z"}),v("path",{strokeLinecap:"round",d:"m33 31l8 8m-8 0l8-8m-14-3h-8.2c-4.48 0-6.72 0-8.432.872a8 8 0 0 0-3.496 3.496C6 34.08 6 36.32 6 40.8V42h21"})]})]}),hq=f.forwardRef(pq),gq=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,children:[v("path",{d:"m13 8l-7 6l7 7"}),v("path",{d:"M6 14h22.994c6.883 0 12.728 5.62 12.996 12.5c.284 7.27-5.723 13.5-12.996 13.5H11.998"})]})]}),mM=f.forwardRef(gq),bq=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,children:[v("path",{strokeLinecap:"round",d:"M13 12.432v-4.62A2.813 2.813 0 0 1 15.813 5h24.374A2.813 2.813 0 0 1 43 7.813v24.375A2.813 2.813 0 0 1 40.188 35h-4.672"}),v("path",{d:"M32.188 13H7.811A2.813 2.813 0 0 0 5 15.813v24.374A2.813 2.813 0 0 0 7.813 43h24.375A2.813 2.813 0 0 0 35 40.188V15.811A2.813 2.813 0 0 0 32.188 13Z"})]})]}),vq=f.forwardRef(bq),yq=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{children:[v("rect",{width:2,height:5,x:11,y:1,fill:"currentColor",opacity:.14}),v("rect",{width:2,height:5,x:11,y:1,fill:"currentColor",opacity:.29,transform:"rotate(30 12 12)"}),v("rect",{width:2,height:5,x:11,y:1,fill:"currentColor",opacity:.43,transform:"rotate(60 12 12)"}),v("rect",{width:2,height:5,x:11,y:1,fill:"currentColor",opacity:.57,transform:"rotate(90 12 12)"}),v("rect",{width:2,height:5,x:11,y:1,fill:"currentColor",opacity:.71,transform:"rotate(120 12 12)"}),v("rect",{width:2,height:5,x:11,y:1,fill:"currentColor",opacity:.86,transform:"rotate(150 12 12)"}),v("rect",{width:2,height:5,x:11,y:1,fill:"currentColor",transform:"rotate(180 12 12)"}),v("animateTransform",{attributeName:"transform",calcMode:"discrete",dur:"0.75s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;30 12 12;60 12 12;90 12 12;120 12 12;150 12 12;180 12 12;210 12 12;240 12 12;270 12 12;300 12 12;330 12 12;360 12 12"})]})]}),P1=f.forwardRef(yq),Cq=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"currentColor",d:"M16 20v-7h4v7zm-6 0V4h4v16zm-6 0V9h4v11z"})]}),xq=f.forwardRef(Cq),N1=DW,pM=_W,qu=VW,bo=WW,wq=fM,Sq=Cv,$q=KW,hM=fp,Eq=QW,gM=LW,su=JW,Iq=tq,Pq=rq,Nq=iq,M1=BW,Fi=aq,Mq=cq,Rq=dq,R1=mq,xv=hq,wv=mM,Es=vq,bM=P1,vM=fp,Aq="data:image/gif;base64,R0lGODlhGAAYAJECAP7+/v///wAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ4IDc5LjE2NDAzNiwgMjAxOS8wOC8xMy0wMTowNjo1NyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDIxLjAgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QTI2NTYzMDc2RTNDMTFFREJENEJEMzUxOTQzQjMxMkQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QTI2NTYzMDg2RTNDMTFFREJENEJEMzUxOTQzQjMxMkQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBMjY1NjMwNTZFM0MxMUVEQkQ0QkQzNTE5NDNCMzEyRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBMjY1NjMwNjZFM0MxMUVEQkQ0QkQzNTE5NDNCMzEyRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAkEAAIALAAAAAAYABgAAAI5lI+py+0Po2QhTFXrRdlu031gJgqhpI0pdJ4sacJv6j6trABeTOMcfFslgp7ar4fcDVcyX+kJjToKACH5BAkEAAIALAAAAAAYABgAAAI2lI+py+0Po5xUhFDRvdls3H0T522SaJkRikKs6qptAr+kYoOzJvc37dPBgKQco3YbdpbM5qQAACH5BAkEAAIALAAAAAAYABgAAAI3lI+py+0Po5y02hhykHqLzmkGiImfCZHkkh0qmrztOSuyt8bmzfC0Z9sJa7qZLwhEwS7MpnNSAAAh+QQJBAACACwAAAAAGAAYAAACPJSPqcvtD6OctJoQ7MFYC55dYQSKHcmZo3J+qdsmJRzO7DvbMs7HSN5b/YIqBvCkGyKJixds4/NIp1RHAQAh+QQJBAACACwAAAAAGAAYAAACOpSPqcvtD6OcLwSarMVHXy54YKhJIrmhn3K25eKmJ/vGa1bnKS3rN2IzzHC94q/jE754yNVyBI1KIQUAIfkECQQAAgAsAAAAABgAGAAAAjmUj6nL7Q+jnLSaEOzBePbLSVwmjGJYopCZfmnDxmoif6xSkzeN5ozfIuF6RBfPVhQeN66Z5gmNTgoAIfkECQQAAgAsAAAAABgAGAAAAjmUj6nL7Q+jnLRaETLSMnMfdJ4Bit8YlRgKqerauOibyCen2OGK1/Pf2wB3NOGNyPLteIfk5QmNTgoAIfkECQQAAgAsAAAAABgAGAAAAjeUj6nL7Q+jnCkEWu3FRm/uHdYUCiVUnk+qSewYvd/amrWKyF2t6DbcuwmBGZgv+OHxOMyms1kAACH5BAkEAAIALAAAAAAYABgAAAI5lI+py+0PowtBLkptwlUf7n1YaIBlF5kmpI6puz5t9tLxBLsCgCpzdxPZcjQfEajbFHVJkvMJtRQAACH5BAkEAAIALAAAAAAYABgAAAI1lI+py+0Po5wpBFrtxUZv7nGdJgqheJ5QSkasJb2bmsFmSyPyaCv73avNcC1fr1gsKZdMSAEAIfkECQQAAgAsAAAAABgAGAAAAjWUj6nL7Q+jnLRaEfI1Wd8ebKDYkR4WHqcyol7Llm4KJ+0tx69cI/i+8vGGQdUpl9sol0xIAQAh+QQJBAACACwAAAAAGAAYAAACNJSPqcvtD6OctNq7QsBCa+xtV9h8DJl5p5qaCtqJsZugNvuyN43sIlzTCXkHnJHISSqXiQIAIfkECQQAAgAsAAAAABgAGAAAAjKUj6nL7Q+jnLTai3MMPLDuLeDXkZwZKqNYsqebJqva0u86yy1e6/feQ9SGL43xiEwUAAAh+QQJBAACACwAAAAAGAAYAAACM5SPqcvtD6OctNp7Q8BCa+xtzDd6JamEp5iai2qgcEvCc2K7N5LXLi3qsXCy4pCDTCoXBQAh+QQJBAACACwAAAAAGAAYAAACNJSPqcvtD6OctNoYcrhC7+txIag1mVkuY/exp5qOayLHqVK/M5J/+9Ez/IQvF7DISSqXkAIAIfkEBQQAAgAsAAAAABgAGAAAAjKUj6nL7Q+jnFSEUNG92WzcfZ21jWJYRucJranyutwig2xSey+e5nQPnMGEMeHoiExCCgA7";function A1({active:e=false,...t}){return e?v("img",{...t,src:Aq}):v(xq,{...t})}const T1=Zs(e=>F("svg",{viewBox:"0 0 20 20",fill:"currentColor",...e,children:[v("path",{className:"circle",d:"M10 3.1248000000000005C6.20305 3.1248000000000005 3.1250083333333336 6.202841666666667 3.1250083333333336 9.999833333333335C3.1250083333333336 13.796750000000001 6.20305 16.874833333333335 10 16.874833333333335C11.898291666666667 16.874833333333335 13.615833333333333 16.106291666666667 14.860625 14.861916666666666C15.104708333333335 14.617916666666666 15.500416666666668 14.617958333333334 15.7445 14.862041666666668C15.9885 15.106166666666669 15.988416666666668 15.501916666666666 15.744333333333334 15.745958333333334C14.274750000000001 17.215041666666668 12.243041666666667 18.124833333333335 10 18.124833333333335C5.512691666666667 18.124833333333335 1.8750083333333334 14.487125 1.8750083333333334 9.999833333333335C1.8750083333333334 5.512483333333334 5.512691666666667 1.8748000000000002 10 1.8748000000000002C14.487291666666668 1.8748000000000002 18.125 5.512483333333334 18.125 9.999833333333335C18.125 10.304458333333333 18.108208333333334 10.605458333333333 18.075458333333337 10.901791666666668C18.0375 11.244916666666667 17.728625 11.492291666666667 17.385583333333333 11.454333333333334C17.0425 11.416416666666667 16.795083333333334 11.107541666666668 16.833000000000002 10.764458333333334C16.860750000000003 10.513625000000001 16.875 10.2585 16.875 9.999833333333335C16.875 6.202841666666667 13.796958333333333 3.1248000000000005 10 3.1248000000000005z",fill:"currentColor"}),v("path",{d:"M15.391416666666666 9.141166666666667C15.635458333333334 8.897083333333335 16.031208333333332 8.897083333333335 16.275291666666668 9.141166666666667L17.5 10.365875L18.72475 9.141166666666667C18.968791666666668 8.897083333333335 19.364541666666668 8.897083333333335 19.608625 9.141166666666667C19.852666666666668 9.385291666666667 19.852666666666668 9.780958333333334 19.608625 10.025083333333333L18.08925 11.544416666666669C17.763833333333334 11.869833333333334 17.236208333333334 11.869833333333334 16.91075 11.544416666666669L15.391416666666666 10.025083333333333C15.147333333333334 9.780958333333334 15.147333333333334 9.385291666666667 15.391416666666666 9.141166666666667z",fill:"currentColor"}),v("path",{d:"M12.499333333333334 9.278375C13.05475 9.599 13.05475 10.400666666666668 12.499333333333334 10.721291666666668L9.373916666666666 12.525791666666668C8.818541666666667 12.846416666666666 8.124274999999999 12.445583333333333 8.124274999999999 11.804291666666668L8.124274999999999 8.1954C8.124274999999999 7.554066666666667 8.818541666666667 7.153233333333334 9.373916666666666 7.473900000000001L12.499333333333334 9.278375z",fill:"currentColor"})]})),yM="inline-flex items-center justify-center line-height-[0]";function fc(e){return F("span",{className:H(yM,"gap-1px"),children:[e,v(Sq,{className:"size-16px"})]})}function Sv(e){return F("span",{className:H(yM,"gap-1px"),children:[e,v(wq,{className:"size-16px"})]})}const CM=IT(),O1=CM.os.name?.toLowerCase()==="mac os",Tq=CM.browser.name||"",F1=e=>new RegExp(String.raw`\b${e}\b`,"i").test(Tq),Js=F1("safari"),Oq=F1("firefox");F1("edge");const Fq=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"currentColor",d:"m19.833 21.26l-1.298-1.298q-.096.019-.173.029q-.077.009-.173.009H5.616q-.691 0-1.153-.462T4 18.384V5.813q0-.096.01-.173t.029-.173l-1.299-1.3l.713-.713l17.092 17.092zM5.616 19h11.957l-5.933-5.933l-1.902 1.902l-.707-.708l1.902-1.902L5 6.427v11.958q0 .23.192.423t.423.192M7.813 5l-1-1h4.419v1zm5.948 5.948l-.708-.707L18.292 5H14V4h6v6h-1V5.708zm6.24 6.24l-1-1V12.77h1z"})]}),Lq=f.forwardRef(Fq),Bq=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"currentColor",d:"M16 3h6v6h-2V5h-4zM2 3h6v2H4v4H2zm18 16v-4h2v6h-6v-2zM4 19h4v2H2v-6h2z"})]}),kq=f.forwardRef(Bq),Dq=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[v("rect",{width:20,height:16,x:2,y:4,rx:2}),v("rect",{width:9,height:7,x:13,y:13,rx:2})]})]}),zq=f.forwardRef(Dq),_q=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"currentColor",d:"M6 3h8.99v1.5H6zM2.99 6h1.5v1.5h-1.5zm0-3h1.5v1.5h-1.5zm0 6.01H4.5v1.5H2.99z"}),v("path",{fill:"currentColor",d:"M4.5 12h-3V1.49h15V6H18V2a2 2 0 0 0-2-2H2a2 2 0 0 0-2 2v9.48a2 2 0 0 0 2 2h2.5Z"}),v("path",{fill:"currentColor",d:"M22 7.5H8a2 2 0 0 0-2 2V19a2 2 0 0 0 2 2h5.53v1.53H12V24h6v-1.49h-1.5V21H22a2 2 0 0 0 2-2V9.5a2 2 0 0 0-2-2m.51 12h-15V9h15Z"})]}),Hq=f.forwardRef(_q),C$="0";function Is(e){GM.setClipboard(e),ft.success(`已复制: ${e}`);}var Ki=(e=>(e.PlayerScreenMode=`${fx}-player-screen-mode`,e.ForceAutoPlay=`${fx}-force-auto-play`,e))(Ki||{}),$i=(e=>(e.Normal="normal",e.Wide="wide",e.WebFullscreen="web",e.Fullscreen="full",e))($i||{}),L1=(e=>(e.ON="on",e.OFF="off",e))(L1||{}),un=(e=>(e.Normal="Normal",e.CurrentPage="CurrentPage",e.NormalWebFullscreen="NormalWebFullscreen",e.Popup="Popup",e.Background="Background",e.Iina="Iina",e))(un||{});const x$=Object.entries(un).reduce((e,[t,n])=>({...e,[n]:`LinkOpenMode.${t}`}),{}),Er={Normal:{icon:v(bo,{className:"size-16px"}),label:"打开",desc:"默认在新标签页中打开"},CurrentPage:{icon:v(Lq,{className:"size-16px"}),label:"当前页中打开",desc:"不打开新标签页, 使用当前标签页打开, 适用于将网站作为应用安装场景"},NormalWebFullscreen:{icon:v(kq,{className:"size-15px"}),label:"打开-网页全屏",desc:v($e,{children:"默认在新标签页中打开, 打开后自动网页全屏"})},Popup:{icon:v(zq,{className:"size-15px"}),label:"小窗打开",desc:F($e,{children:["当"," ",v("a",{href:"https://developer.chrome.com/docs/web-platform/document-picture-in-picture",target:"_blank",children:"「文档画中画」API"})," ","可用时, 会使用「文档画中画」的形式: 窗口置顶 + 播放页网页全屏.",v("br",{}),"当该 API 不可用时, 会使用 popup window + 播放页网页全屏 的形式."]})},Background:{icon:v(Hq,{className:"size-15px"}),label:"后台打开"},Iina:{icon:v(qu,{className:"size-15px"}),label:"在 IINA 中打开",enabled:O1,desc:v($e,{children:v("a",{href:"https://github.com/magicdawn/Bilibili-Gate/blob/main/notes/iina.md",target:"_blank",children:"macOS IINA 设置教程"})})}};function Vq(){return new Or}const xM=Vq(),$v={card:{name:"18iuzk9",styles:"grid-column:1/-1"},cardWrap:{name:"k9oiqw",styles:"display:flex;column-gap:20px"},cover:{name:"1t7agkb",styles:"width:clamp(250px, 20%, 400px);flex-shrink:0"}},jq="z-2",Wq="z-3",qq="z-4",Uq="z-5",Gq="z-6",au={top:e=>H("absolute top-8px",e==="left"?"left-8px":"right-8px",e==="left"?Uq:Gq),topContainer:e=>H(au.top(e),"flex items-center gap-x-5px",e==="left"?"flex-row":"flex-row-reverse"),tooltip:e=>H("pointer-events-none absolute bottom--6px translate-y-100% select-none whitespace-nowrap rounded-4px bg-gate-primary px-8px py-4px text-12px text-white line-height-18px",e==="left"?"left-0":"right-0")},Ro=f.memo(f.forwardRef(({inlinePosition:e,icon:t,tooltip:n,visible:r=true,active:o=false,className:i,useMotion:s=false,motionProps:a,...l},c)=>{const{triggerRef:u,tooltipEl:d}=mp({inlinePosition:e,tooltip:n}),m=f.useMemo(()=>SP("action-button","relative size-28px cursor-pointer rounded-6px bg-[rgb(33_33_33_/_0.7)] color-white","b-1px b-solid",o?"b-gate-primary":"b-#444","hover:b-gate-primary",s||r?"inline-flex":"hidden","items-center justify-center","[&_svg]:pointer-events-none [&_svg]:select-none",i),[o,i,r,s]),p={...l,className:m,ref:h=>{u.current=h,wN(c,h);},children:F($e,{children:[t,d]})};return s?v(framerMotion.AnimatePresence,{children:r&&v(framerMotion.motion.div,{...p,...a},"action-button")}):v("div",{...p})}));function mp({inlinePosition:e,tooltip:t,tooltipClassName:n}){const r=f.useRef(null),o=Vy(r),i=An(au.tooltip(e),n,o?"block":"hidden");return {triggerRef:r,tooltipEl:t?v("span",{className:i,children:t}):void 0}}var w$=function(t,n){var r=arguments;if(n==null||!Au.call(n,"css"))return f__namespace.createElement.apply(void 0,r);var o=r.length,i=new Array(o);i[0]=Sy,i[1]=wy(t,n);for(var s=2;s<o;s++)i[s]=r[s];return f__namespace.createElement.apply(null,i)};(function(e){var t;t||(t=e.JSX||(e.JSX={}));})(w$||(w$={}));var Ev=vP(function(e,t){var n=e.styles,r=Oa([n],void 0,f__namespace.useContext(yP)),o=f__namespace.useRef();return _w(function(){var i=t.key+"-global",s=new t.sheet.constructor({key:i,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),a=false,l=document.querySelector('style[data-emotion="'+i+" "+r.name+'"]');return t.sheet.tags.length&&(s.before=t.sheet.tags[0]),l!==null&&(a=true,l.setAttribute("data-emotion",i),s.hydrate([l])),o.current=[s,a],function(){s.flush();}},[t]),_w(function(){var i=o.current,s=i[0],a=i[1];if(a){i[1]=false;return}if(r.next!==void 0&&xy(t,r.next,true),s.tags.length){var l=s.tags[s.tags.length-1].nextElementSibling;s.before=l,s.flush();}t.insert("",r,s,false);},[t,r.name]),null});function Dt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Oa(t)}function Kq(e,t,n=true){let r=0,o=t;return (...i)=>{if(r++,r===o)return r=0,n&&o++,e(...i)}}function wM(e,t,n=true){const r=Ve(e);return f.useMemo(()=>Kq(r,t,n),[r,t,n])}const Xq=e=>{const t=e?.algorithm?Af(e.algorithm):ay,n={...Wa,...e?.token};return Q3(n,{override:e?.token},t,fI)};function Yq(e){const{sizeUnit:t,sizeStep:n}=e,r=n-2;return {sizeXXL:t*(r+10),sizeXL:t*(r+6),sizeLG:t*(r+2),sizeMD:t*(r+2),sizeMS:t*(r+1),size:t*r,sizeSM:t*r,sizeXS:t*(r-1),sizeXXS:t*(r-1)}}const Qq=(e,t)=>{const n=t??km(e),r=n.fontSizeSM,o=n.controlHeight-4;return {...n,...Yq(t??e),...dI(r),controlHeight:o,...uI({...n,controlHeight:o})}},zr=(e,t)=>new Ft(e).setA(t).toRgbString(),ds=(e,t)=>new Ft(e).lighten(t).toHexString(),Zq=e=>{const t=Eu(e,{theme:"dark"});return {1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},Jq=(e,t)=>{const n=e||"#000",r=t||"#fff";return {colorBgBase:n,colorTextBase:r,colorText:zr(r,.85),colorTextSecondary:zr(r,.65),colorTextTertiary:zr(r,.45),colorTextQuaternary:zr(r,.25),colorFill:zr(r,.18),colorFillSecondary:zr(r,.12),colorFillTertiary:zr(r,.08),colorFillQuaternary:zr(r,.04),colorBgSolid:zr(r,.95),colorBgSolidHover:zr(r,1),colorBgSolidActive:zr(r,.9),colorBgElevated:ds(n,12),colorBgContainer:ds(n,8),colorBgLayout:ds(n,0),colorBgSpotlight:ds(n,26),colorBgBlur:zr(r,.04),colorBorder:ds(n,26),colorBorderDisabled:ds(n,26),colorBorderSecondary:ds(n,19)}},eU=(e,t)=>{const n=Object.keys(sy).map(i=>{const s=Eu(e[i],{theme:"dark"});return Array.from({length:10},()=>1).reduce((a,l,c)=>(a[`${i}-${c+1}`]=s[c],a[`${i}${c+1}`]=s[c],a),{})}).reduce((i,s)=>(i={...i,...s},i),{}),r=t??km(e),o=cI(e,{generateColorPalettes:Zq,generateNeutralColorPalettes:Jq});return {...r,...n,...o,colorPrimaryBg:o.colorPrimaryBorder,colorPrimaryBgHover:o.colorPrimaryBorderHover}};function tU(){const[e,t,n,r]=Tn();return {theme:e,token:t,hashId:n,cssVar:r}}const om={defaultSeed:Hc.token,useToken:tU,defaultAlgorithm:km,darkAlgorithm:eU,compactAlgorithm:Qq,getDesignToken:Xq,defaultConfig:Hc,_internalContext:ly};var Wl={},og={exports:{}},S$;function B1(){return S$||(S$=1,(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=true,e.exports.default=e.exports;})(og)),og.exports}var ql={},$$;function nU(){if($$)return ql;$$=1,Object.defineProperty(ql,"__esModule",{value:true}),ql.default=void 0;const e={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"};return ql.default=e,ql}var Ul={},Gl={},Kl={},Xl={},E$;function rU(){return E$||(E$=1,Object.defineProperty(Xl,"__esModule",{value:true}),Xl.commonLocale=void 0,Xl.commonLocale={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:true}),Xl}var I$;function oU(){if(I$)return Kl;I$=1,Object.defineProperty(Kl,"__esModule",{value:true}),Kl.default=void 0;var e=rU();function t(l){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},t(l)}function n(l,c){var u=Object.keys(l);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(l);c&&(d=d.filter(function(m){return Object.getOwnPropertyDescriptor(l,m).enumerable})),u.push.apply(u,d);}return u}function r(l){for(var c=1;c<arguments.length;c++){var u=arguments[c]!=null?arguments[c]:{};c%2?n(Object(u),true).forEach(function(d){o(l,d,u[d]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(u)):n(Object(u)).forEach(function(d){Object.defineProperty(l,d,Object.getOwnPropertyDescriptor(u,d));});}return l}function o(l,c,u){return c=i(c),c in l?Object.defineProperty(l,c,{value:u,enumerable:true,configurable:true,writable:true}):l[c]=u,l}function i(l){var c=s(l,"string");return t(c)=="symbol"?c:String(c)}function s(l,c){if(t(l)!="object"||!l)return l;var u=l[Symbol.toPrimitive];if(u!==void 0){var d=u.call(l,c);if(t(d)!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return (c==="string"?String:Number)(l)}var a=r(r({},e.commonLocale),{},{locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",week:"周",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪",yearFormat:"YYYY年",cellDateFormat:"D",monthBeforeYear:false});return Kl.default=a,Kl}var Yl={},P$;function SM(){if(P$)return Yl;P$=1,Object.defineProperty(Yl,"__esModule",{value:true}),Yl.default=void 0;const e={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]};return Yl.default=e,Yl}var N$;function $M(){if(N$)return Gl;N$=1;var e=B1().default;Object.defineProperty(Gl,"__esModule",{value:true}),Gl.default=void 0;var t=e(oU()),n=e(SM());const r={lang:{placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"],...t.default},timePickerLocale:{...n.default}};return r.lang.ok="确定",Gl.default=r,Gl}var M$;function iU(){if(M$)return Ul;M$=1;var e=B1().default;Object.defineProperty(Ul,"__esModule",{value:true}),Ul.default=void 0;var t=e($M());return Ul.default=t.default,Ul}var R$;function sU(){if(R$)return Wl;R$=1;var e=B1().default;Object.defineProperty(Wl,"__esModule",{value:true}),Wl.default=void 0;var t=e(nU()),n=e(iU()),r=e($M()),o=e(SM());const i="${label}不是一个有效的${type}",s={locale:"zh-cn",Pagination:t.default,DatePicker:r.default,TimePicker:o.default,Calendar:n.default,global:{placeholder:"请选择",close:"关闭",sortable:"可排序"},Table:{filterTitle:"筛选",filterConfirm:"确定",filterReset:"重置",filterEmptyText:"无筛选项",filterCheckAll:"全选",filterSearchPlaceholder:"在筛选项中搜索",emptyText:"暂无数据",selectAll:"全选当页",selectInvert:"反选当页",selectNone:"清空所有",selectionAll:"全选所有",sortTitle:"排序",expand:"展开行",collapse:"关闭行",triggerDesc:"点击降序",triggerAsc:"点击升序",cancelSort:"取消排序"},Modal:{okText:"确定",cancelText:"取消",justOkText:"知道了"},Tour:{Next:"下一步",Previous:"上一步",Finish:"结束导览"},Popconfirm:{cancelText:"取消",okText:"确定"},Transfer:{titles:["",""],searchPlaceholder:"请输入搜索内容",itemUnit:"项",itemsUnit:"项",remove:"删除",selectCurrent:"全选当页",removeCurrent:"删除当页",selectAll:"全选所有",deselectAll:"取消全选",removeAll:"删除全部",selectInvert:"反选当页"},Upload:{uploading:"文件上传中",removeFile:"删除文件",uploadError:"上传错误",previewFile:"预览文件",downloadFile:"下载文件"},Empty:{description:"暂无数据"},Icon:{icon:"图标"},Text:{edit:"编辑",copy:"复制",copied:"复制成功",expand:"展开",collapse:"收起"},Form:{optional:"(可选)",defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:i,method:i,array:i,object:i,number:i,date:i,boolean:i,integer:i,float:i,regexp:i,email:i,url:i,hex:i},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},QRCode:{expired:"二维码过期",refresh:"点击刷新",scanned:"已扫描"},ColorPicker:{presetEmpty:"暂无",transparent:"无色",singleColor:"单色",gradientColor:"渐变色"}};return Wl.default=s,Wl}var ig,A$;function aU(){return A$||(A$=1,ig=sU()),ig}var lU=aU();const cU=vr(lU),uU="--bilibili-gate--font",dU="--bilibili-gate--video-card--border-radius",EM="--bilibili-gate--primary-color",fU="--bilibili-gate--border-color",IM="--bilibili-gate--text-color",PM="--bilibili-gate--bg",mU="--bilibili-gate--bg-lv1",pU="--bilibili-gate--bg-lv2",hU="--bilibili-gate--bg-lv3",gU="#ff6699",bU='"Alibaba PuHuiTi 3.0", "PingFang SC", HarmonyOS_Regular, "Helvetica Neue", "Microsoft YaHei", sans-serif',NM="var(--custom-font-family--options--font-family, var(--bilibili-gate--font))",vU="bilibili-gate-root",MM="bilibili-gate-using-dark",RM="html.bilibili-gate-using-dark",yU="1001",CU="10003",Iv="11000",AM="11200",TM="11300",xU="90000",di={appCustomFontId:uU,appVideoCardBorderRadiusId:dU,appPrimaryColorId:EM,appBorderColorId:fU,appTextColorId:IM,appBgId:PM,appBgLv1Id:mU,appBgLv2Id:pU,appBgLv3Id:hU,biliPink:gU,appCustomFontValue:bU,appUsingFont:NM,appClsRoot:vU,appClsDark:MM,appClsDarkSelector:RM,zIndexRecHeader:yU,zIndexBaseModal:CU,zIndexAntdPopupBase:Iv,zIndexVideoCardLargePreview:AM,zIndexVideoCardContextMenu:TM,zIndexToast:xU},lu={Evolved:{getDetectEl:()=>document.body,detect:e=>e.classList.contains("dark"),trigger:'.custom-navbar-item[role="listitem"][data-name="darkMode"]',triggerInner:'.navbar-dark-mode[item="darkMode"]'},Bili:{getDetectEl:()=>document.documentElement,detect:e=>e.classList.contains("bili_dark"),isTrigger:e=>{const t=e.closest(".avatar-panel-popover a.single-link-item");return t?!!Array.from(t.querySelectorAll(".link-title span")).find(n=>["深色","浅色"].includes(n.textContent||"")):false}}},T$=e=>{const t=e.getDetectEl();return t?e.detect(t):false},Uu=Ks(()=>T$(lu.Bili)||T$(lu.Evolved)||document.body.classList.contains("bilibili-helper-dark-mode")||document.documentElement.classList.contains("dark"));function k1(){return Uu.use()}const OM=()=>{document.documentElement.classList.toggle(MM,Uu.get());};OM();Qi(Uu.state,OM);const pp=new MutationObserver(async()=>{await _t(0),Uu.updateThrottled();});pp.observe(document.body,{attributes:true,attributeFilter:["class"]});pp.observe(document.documentElement,{attributes:true,attributeFilter:["data-darkreader-scheme"]});wU();async function wU(){const e=await hl(lu.Bili.getDetectEl);e&&pp.observe(e,{attributes:true});}document.addEventListener("click",FM,{passive:true});async function FM(e){const t=e.target;(lu.Bili.isTrigger(t)||t.closest(lu.Evolved.trigger))&&(await _t(0),Uu.updateThrottled());}window.addEventListener("unload",()=>{pp.disconnect(),document.removeEventListener("click",FM);});const SU=Hn.extend("components:css-vars");SU(":export = %O",di);const rs=e=>(e.startsWith("--")||(e=`--${e}`),`var(${e})`),D1=rs(di.appVideoCardBorderRadiusId),Xi=rs(di.appPrimaryColorId),z1=rs(di.appBorderColorId);rs(di.appTextColorId);const $U=rs(di.appBgId),Pv=rs(di.appBgLv1Id),EU=rs(di.appBgLv2Id);rs(di.appBgLv3Id);const wl={name:"rmyi3a",styles:"color:var(--ant-button-default-hover-color);border-color:var(--ant-button-default-hover-border-color);background:var(--ant-button-default-hover-bg)"};function IU(){return om.useToken().token.colorPrimaryHover}function Sl(){const{popoverBorderColorUseColorPrimary:e}=nt(Ue.style.general),t=IU();return e?t:z1}function PU(){const{colorLink:e,colorLinkActive:t,colorLinkHover:n}=om.useToken().token;return f.useMemo(()=>Dt("color:",e,";&:visited{color:",e,";}&:hover{color:",n,";}&:active{color:",t,";}",""),[e,t,n])}const LM=`${Jn}--use-ant-link-color`;function NU(){const e=PU();return Dt(":root .",LM,"{",e,";}","")}const MU=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,d:"m8 8l32 32M8 40L40 8"})]}),RU=f.forwardRef(MU),rr={modalMask:"fixed inset-0 z-gate-base-modal flex items-center justify-center bg-black/50",modal:"max-h-[calc(90vh-50px)] w-500px flex flex-col overflow-hidden b-1px b-transparent rounded-10px b-solid bg-gate-bg px-15px pb-15px text-gate-text dark:b-gate-border",modalHeader:"flex items-center justify-between border-b-0 py-10px",modalTitle:"mb-0 flex items-center text-[1.5rem] line-height-1.5",modalBody:"flex-grow-1 overflow-y-auto pt-0"},BM=`${Jn}-modal-visible`,AU=Dt("body:has(.",BM,"){overflow-y:hidden;}","");function Gu({show:e,onHide:t,children:n,clsModalMask:r,clsModal:o,width:i,hideWhenMaskOnClick:s=false,hideWhenEsc:a=false}){const l=f.useRef(null),c=Ve(m=>{const p=m.target;if(l.current?.contains(p))return;const h=['.ant-tooltip-container[role="tooltip"]','.ant-popover-container[role="tooltip"]',".ant-select-dropdown"];p.closest(h.join(","))||s&&t();});qr("esc",m=>{e&&a&&(m.preventDefault(),m.stopImmediatePropagation(),setTimeout(t));},{exactMatch:true});const u=An(rr.modalMask,r),d=An(rr.modal,o);return e?ST.createPortal(v("div",{className:H(zo,{[BM]:e}),"data-role":"base-modal",children:v("div",{className:u,onClick:c,children:v("div",{className:d,style:{width:i},ref:l,children:n})})}),document.body):null}const Ku=({className:e,...t})=>{const n=An("ml-10px size-18px cursor-pointer",e);return v(RU,{...t,className:n})};let Un=(function(e){return e.Lavender="#e6e6fa",e.Thistle="#d8bfd8",e.Plum="#dda0dd",e.Mauve="#e0b0ff",e.Wisteria="#c9a0dc",e.Orchid="#da70d6",e.MediumOrchid="#ba55d3",e.MediumPurple="#9370db",e.Amethyst="#9966cc",e.BlueViolet="#8a2be2",e.Purple="#800080",e.Violet="#8f00ff",e.Magenta="#ff00ff",e.Grape="#6f2da8",e.Indigo="#4b0082",e.Eggplant="#301934",e})({});const TU=[{name:"Lavender",nameZh:"薰衣草",hex:Un.Lavender,desc:"淡紫偏粉"},{name:"Thistle",nameZh:"蓟紫色",hex:Un.Thistle,desc:"带灰调"},{name:"Plum",nameZh:"李子紫",hex:Un.Plum,desc:"柔和温暖"},{name:"Mauve",nameZh:"淡紫色",hex:Un.Mauve,desc:"烟粉色调"},{name:"Wisteria",nameZh:"紫藤色",hex:Un.Wisteria,desc:"温柔浅紫"},{name:"Orchid",nameZh:"兰花紫",hex:Un.Orchid,desc:"偏红亮紫"},{name:"Medium Orchid",nameZh:"中兰花紫",hex:Un.MediumOrchid,desc:"稍深更艳"},{name:"Medium Purple",nameZh:"中紫色",hex:Un.MediumPurple,desc:"柔和略蓝"},{name:"Amethyst",nameZh:"紫水晶色",hex:Un.Amethyst,desc:"经典冷紫"},{name:"Blue Violet",nameZh:"蓝紫色",hex:Un.BlueViolet,desc:"较冷"},{name:"Purple",nameZh:"标准紫色",hex:Un.Purple,desc:"饱和且暗"},{name:"Violet",nameZh:"紫罗兰",hex:Un.Violet,desc:"更偏蓝光谱"},{name:"Magenta",nameZh:"洋红色",hex:Un.Magenta,desc:"红紫交界"},{name:"Grape",nameZh:"葡萄紫",hex:Un.Grape,desc:"饱和深紫"},{name:"Indigo",nameZh:"靛青色",hex:Un.Indigo,desc:"蓝紫之间"},{name:"Eggplant",nameZh:"茄子紫",hex:Un.Eggplant,desc:"极深紫红"}],OU=[{id:"green",name:"绿意盎然",isDark:false,isCustom:false,colorPrimary:"rgb(77, 175, 124)",colorTheme:"rgb(77, 175, 124)"},{id:"blue",name:"蓝田生玉",isDark:false,isCustom:false,colorPrimary:"rgb(52, 152, 219)",colorTheme:"rgb(52, 152, 219)"},{id:"blue_plus",name:"蛋雅深蓝",isDark:false,isCustom:false,colorPrimary:"rgb(77, 131, 175)",colorTheme:"rgb(77, 131, 175)"},{id:"orange",name:"橙黄橘绿",isDark:false,isCustom:false,colorPrimary:"rgb(245, 171, 53)",colorTheme:"rgb(245, 171, 53)"},{id:"red",name:"热情似火",isDark:false,isCustom:false,colorPrimary:"rgb(214, 69, 65)",colorTheme:"rgb(214, 69, 65)"},{id:"pink",name:"粉装玉琢",isDark:false,isCustom:false,colorPrimary:"rgb(241, 130, 141)",colorTheme:"rgb(241, 130, 141)"},{id:"purple",name:"重斤球紫",isDark:false,isCustom:false,colorPrimary:"rgb(155, 89, 182)",colorTheme:"rgb(155, 89, 182)"},{id:"grey",name:"灰常美丽",isDark:false,isCustom:false,colorPrimary:"rgb(108, 122, 137)",colorTheme:"rgb(108, 122, 137)"},{id:"ming",name:"青出于黑",isDark:false,isCustom:false,colorPrimary:"rgb(51, 110, 123)",colorTheme:"rgb(51, 110, 123)"},{id:"blue2",name:"清热板蓝",isDark:false,isCustom:false,colorPrimary:"rgb(79, 98, 208)",colorTheme:"rgb(79, 98, 208)"},{id:"black",name:"黑灯瞎火",isDark:true,isCustom:false,colorPrimary:"rgb(150, 150, 150)",colorTheme:"rgb(59,59,59)"},{id:"mid_autumn",name:"月里嫦娥",isDark:false,isCustom:false,colorPrimary:"rgb(74, 55, 82)",colorTheme:"rgb(74, 55, 82)"},{id:"naruto",name:"木叶之村",isDark:false,isCustom:false,colorPrimary:"rgb(87, 144, 167)",colorTheme:"rgb(87, 144, 167)"},{id:"china_ink",name:"近墨者黑",isDark:false,isCustom:false,colorPrimary:"rgba(47, 47, 47, 1)",colorTheme:"rgba(47, 47, 47, 1)"},{id:"happy_new_year",name:"新年快乐",isDark:false,isCustom:false,colorPrimary:"rgb(192, 57, 43)",colorTheme:"rgb(192, 57, 43)"}],Za={id:"default-bili-pink",name:"B站粉",colorPrimary:"#f69",tooltip:"B站品牌色"},kM={id:"color-picker",name:"自定义",isCustom:true,colorPrimary:Za.colorPrimary};function FU(e,t){return t.split(`
`).map(n=>n.trim()).filter(Boolean).map(n=>{const[r,o]=n.split(" ").filter(Boolean);return {id:`${e}:${o}`,name:o,colorPrimary:r}})}const _1="UP长期洗涤",LU=FU(_1,`
#0545b2 理想之蓝
#f4cd00 柠檬黄
#ef2729 石榴红
#f89c00 鹿箭
#233728 黛绿
#f2b9b7 和熙粉
#f3cc91 芝士黄
#6b4c68 葡萄紫
#ff7227 落日橙
#004d62 碧海天
#23909b 洗碧空
#aeb400 芥丝绿
#425a17 箬叶青
#002fa7 克莱因蓝
#003153 普鲁士蓝
#01847f 马尔斯绿
#fbd26a 申布伦黄
#470024 勃艮第红
#492d22 凡戴克棕
`),DM="bilibili-evolved-sync",zM=[{name:"预设",themes:[Za,{id:"bilibili-blue",name:"B站蓝",colorPrimary:"#00aeec",tooltip:"B站品牌色"},{id:"app-custom-高能红",name:"高能红",colorPrimary:"#fd453e"},{id:"app-custom-咸蛋黄",name:"咸蛋黄",colorPrimary:"#ffc034"},{id:"app-custom-早苗绿",name:"早苗绿",colorPrimary:"#85c255"},{id:"app-custom-宝石蓝",name:"宝石蓝",colorPrimary:"#0095ef"},{id:"app-custom-罗兰紫",name:"罗兰紫",colorPrimary:"#a029ac"},{id:DM,name:"B-Evolved",colorPrimary:"var(--theme-color, #f69)",tooltip:F($e,{children:["使用 Bilibili-Evolved 的主题色",v("br",{}),"在 Bilibili-Evolved 设置中修改主题色后可能需要刷新页面同步"]})},kM]},{name:"LX Themes",themes:OU,tooltip:F($e,{children:["提取自"," ",v("a",{target:"_blank",href:"https://github.com/lyswhut/lx-music-desktop/",children:"lx-music-desktop"}),v("br",{}),"Apache License 2.0"]})},{name:_1,themes:LU,tooltip:F($e,{children:["提取自"," ",v("a",{target:"_blank",href:"https://www.bilibili.com/video/BV1g3411u7Lg/",children:"BV1g3411u7Lg"})," ","&"," ",v("a",{target:"_blank",href:"https://www.bilibili.com/video/BV1xu411q7sU/",children:"BV1xu411q7sU"})]})},{name:"紫定能行",themes:TU.map(e=>({id:`purple-colors-${e.name}`,name:e.nameZh,colorPrimary:e.hex,tooltip:F($e,{children:[e.name," ",e.nameZh," ",v("br",{}),e.desc]})})),tooltip:F($e,{children:["提取自"," ",v("a",{target:"_blank",href:"https://magicdawn.github.io/purple-colors/",children:"purple-colors"})," "]})}],BU=zM.map(e=>e.themes).flat(),O$={[`${_1}:马尔斯绿`]:F($e,{children:["马尔斯绿 MARRS GREEN ",v("br",{}),"2017年英国的百年造纸商G.F SMITH和英国城市文化节联合发起了「选出全世界最受欢迎的颜色」的活动, ",v("br",{}),"在为期半年由来自100多个约3万名用户的投票后,由来自苏格兰的联合国教科文组织工作人员 ",v("br",{}),"安妮•马尔斯(ANNIE MARRS)提交的一种蓝绿色当选。 ",v("br",{}),"马尔斯绿也因此由ANNIE MARRS的姓氏和主色调组合而得名。 ",v("br",{}),"马尔斯绿的灵感来源于ANNIE家乡苏格兰的泰勒河畔自然景观的一种蓝绿色调。 ",v("br",{})]})};function _M(){let{theme:e,colorPickerThemeSelectedColor:t}=Mt();return e||=Za.id,f.useMemo(()=>{const n=BU.find(r=>r.id===e)||Za;return n.id===kM.id&&t?{...n,colorPrimary:t}:n},[e,t])}function HM(){const e=_M(),t=dp.use();let n=e.colorPrimary;return e.id===DM&&(n=t||Za.colorPrimary),n}var kU={name:"1ughwg6",styles:".bili-feed4 .bili-header{min-height:64px!important;}"},DU={name:"74xyp3",styles:"body,.large-header,#i_cecream,body>#app,.bili-header .bili-header__channel{background-color:var(--bg2);}.bili-header .bili-header__channel .channel-entry-more__link,.bili-header .bili-header__channel .channel-link{background-color:var(--bg1);}"},zU={name:"qjp5ll",styles:"body{background-color:var(--bg1)!important;}"},_U={name:"rpxvzv",styles:"#i_cecream,body>#app{.bili-feed4-layout{display:none;}}.desktop-download-tip,.vip-login-tip,.palette-button-adcard{display:none!important;}"};function HU(){const e=HM(),{grid:t,pureRecommend:n,style:r}=Mt(),o=k1(),i=RW(),s=S1.use(),a=NU(),l=$1.use()??90,c="0 10px",{useWhiteBackground:u}=r.pureRecommend,d=f.useMemo(()=>({text:o?"#fff":"#333",bgSrc:o||u?"--bg1":"--bg2",bgFallback:o?"#222":u?"#fff":"#f6f7f8"}),[o,u]);return F($e,{children:[v(Ev,{styles:[a,AU,Dt`
:root {
${EM}: ${e};
${PM}: var(${d.bgSrc}, ${d.bgFallback});
${IM}: var(--text1, ${d.text});
}
`,"",""]}),_o&&n&&v(Ev,{styles:[_U,t.useCustomGrid&&Dt("#i_cecream,body>#app,.bili-feed4 .bili-header,.bili-feed4 .bili-header .bili-header__bar{max-width:unset;}.bili-feed4-layout,.bili-feed4 .bili-header .bili-header__channel{max-width:",l,"%;padding:",c,";}",""),t.useCustomGrid&&typeof i=="number"&&Dt(".",zo,"{--back-top-right:",i,"px;}",""),r.pureRecommend.useWhiteBackground?zU:DU,r.pureRecommend.hideTopChannel&&Dt(".bili-header__channel,.bili-header__banner{display:none!important;}",!s&&kU," .bili-feed4 .bili-header .bili-header__bar{&.slide-down,&:not(.slide-down){animation:headerSlideDown 0.3s linear forwards!important;box-shadow:0 2px 4px ",o?"rgb(255 255 255 / 5%)":"rgb(0 0 0 / 8%)","!important;}}.bili-header__bar:not(.slide-down){background-color:var(--bg1);color:var(--text1);transition:background-color 0.2s linear;animation-name:headerSlideDown;.left-entry{.mini-header__title,.entry-title,.default-entry,.loc-mc-box__text,.download-entry,.loc-entry{color:var(--text1);}}.right-entry .right-entry__outside{.right-entry-text,.right-entry-icon{color:var(--text2);}}}.area-header-wrapper{margin-top:10px;}",""),"",""]})]})}uN.compat=true;function VU(...e){return function(t){return e.reduceRight((n,r)=>r(n),t)}}function fi({children:e,injectGlobalStyle:t=false,antdSetup:n=false,emotionCache:r=uN,styleProviderProps:o}){const i=k1(),s=HM();return VU(l=>v(yk,{value:r,children:l}),l=>v(q8,{...o,children:l}),l=>v(yr,{locale:cU,button:{autoInsertSpace:false},theme:{algorithm:i?om.darkAlgorithm:om.defaultAlgorithm,token:{colorPrimary:s,colorBgSpotlight:s,zIndexPopupBase:Number(Iv),fontFamily:NM},components:{Notification:{zIndexPopup:Number(Iv)},Button:{defaultShadow:"none",primaryShadow:"none"}}},children:l}))(F($e,{children:[n&&v(TW,{}),t&&v(HU,{}),e]}))}const jU=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 15 15",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"currentColor",d:"M8.5 6q.049 0 .098.009q.076.017.142.054q.061.034.114.083q.05.052.082.113A.5.5 0 0 1 9 6.5v3a.5.5 0 0 1-1 0V7.707l-5.146 5.147a.5.5 0 1 1-.708-.707L7.293 7H5.5a.5.5 0 0 1 0-1zM12 2a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H8.5a.5.5 0 0 1 0-1H12V3H3v3.5a.5.5 0 0 1-1 0V3a1 1 0 0 1 1-1z"})]}),VM=f.forwardRef(jU),WU=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 15 15",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"currentColor",d:"M10.969 3.219a.574.574 0 1 1 .812.812L8.313 7.5l3.468 3.469l.074.09a.575.575 0 0 1-.796.796l-.09-.074L7.5 8.312l-3.469 3.47a.574.574 0 1 1-.812-.813L6.688 7.5l-3.47-3.469l-.073-.09a.575.575 0 0 1 .796-.797l.09.075L7.5 6.687z"})]}),qU=f.forwardRef(WU),UU=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 15 15",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"currentColor",d:"M7.499 0c1.072 0 1.966.338 2.589 1.002c.619.66.912 1.58.912 2.634V6h1a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h7V3.636c0-.876-.242-1.524-.642-1.95C8.963 1.267 8.357 1 7.5 1c-.888 0-1.502.269-1.895.715l-.077.092C5.197 2.233 5 2.843 5 3.633H4c0-.95.237-1.795.737-2.44l.121-.145C5.482.342 6.4 0 7.5 0M3 13h9V7H3z"})]}),jM=f.forwardRef(UU),GU=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 15 15",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"currentColor",d:"M7.501.978c1.074 0 1.968.345 2.59 1.014c.616.664.909 1.587.909 2.642V6h1a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h1V4.636c0-1.055.293-1.979.91-2.643c.622-.67 1.517-1.015 2.591-1.015M3 13h9V7H3zM7.501 1.978c-.855 0-1.461.27-1.857.696C5.243 3.105 5 3.76 5 4.636V6h5V4.634c0-.877-.241-1.531-.642-1.962c-.395-.426-1.001-.694-1.857-.694"})]}),KU=f.forwardRef(GU);function XU(e,t){const n=t.document.head,{cache:r}=lN({key:"pip-window",container:n});Array.from(document.querySelectorAll("style")).filter(s=>[Jn,"ant","rc"].some(a=>s.textContent.includes(a))).forEach(s=>{const a=t.document.createElement("style");a.textContent=s.textContent,t.document.head.appendChild(a);});const o=document.createElement("div");o.classList.add(zo),o.style.lineHeight="0",t.document.body.appendChild(o),Ho.createRoot(o).render(v(fi,{emotionCache:r,styleProviderProps:{container:n},injectGlobalStyle:true,children:v(yr,{getPopupContainer:()=>t.document.body,getTargetContainer:()=>t,children:v(Wu,{message:{getContainer:()=>t.document.body},children:v(QU,{newHref:e,pipWindow:t})})})}));}var YU={name:"pb1257",styles:"*{box-sizing:border-box;}:root,body,iframe{margin:0;padding:0;overscroll-behavior:none;}"};function QU({newHref:e,pipWindow:t}){const n=Vy(t.document.documentElement),[r,o]=f.useState(()=>Ue.pipWindow.defaultLocked);return F($e,{children:[v(Ev,{styles:[YU,"",""]}),v("iframe",{src:e,className:"block h-100vh w-full border-none"}),v(ZU,{locked:r,setLocked:o,pipWindow:t}),F("div",{className:H("fixed right-10px top-10px z-9999 flex-row-reverse items-center gap-x-6px",n?"flex":"hidden"),children:[v(JU,{pipWindow:t,newHref:e}),v(eG,{locked:r,setLocked:o})]})]})}const WM="size-30px [&_svg]:size-16px";function ZU({locked:e,setLocked:t,pipWindow:n}){const{message:r}=Wu.useApp(),o=wM(()=>{r.info("请先点击右上角「🔓解锁按钮」解锁");},3);return f.useMemo(()=>Ur([{key:"unlock",label:"解锁",icon:v(jM,{}),onClick(){t(false);}}]),[]),e&&v("div",{className:H("locked-overlay","fixed inset-0 z-9999 select-none bg-transparent"),onClick:o})}function JU({newHref:e,pipWindow:t}){return v(Ro,{inlinePosition:"right",icon:v(VM,{}),tooltip:"新窗口打开",onClick:()=>{t.close();const r=new URL(e);r.searchParams.delete(Ki.PlayerScreenMode),r.searchParams.delete(Ki.ForceAutoPlay),Io(r.href);},className:WM})}function eG({locked:e,setLocked:t}){const[n,r]=e?["锁定","解锁"]:["解锁","锁定"];return v(Ro,{inlinePosition:"right",icon:e?v(KU,{}):v(jM,{}),tooltip:`已${n}, 点击${r}`,className:WM,onClick:()=>t(o=>!o)})}const qM=Hn.extend("VideoCard:useOpenRelated");function tG({href:e,item:t,cardData:n,actionButtonVisible:r,hasOpenInPopupActionButton:o,getLargePreviewCurrentTime:i,hideLargePreview:s,shouldUseLargePreviewCurrentTime:a}){const{videoLinkOpenMode:l}=Mt();function c(C){const x=new URL(e,location.href);return C?.(x),x.href}const u=Ve(C=>{C.stopPropagation(),C.preventDefault(),d(void 0,C);}),d=Ve((C,x)=>{C||=Ue.videoLinkOpenMode;const w=c(E=>{if((C===un.NormalWebFullscreen||C===un.Popup&&Ue.pipWindow.autoWebFullscreen)&&(E.searchParams.set(Ki.PlayerScreenMode,$i.WebFullscreen),C===un.Popup&&!vN()&&E.searchParams.set(Ki.ForceAutoPlay,L1.ON)),a()){const P=i();P&&(s(),E.searchParams.set("t",P.toString()));}}),S=()=>{const P=!(C===un.Background||!!(x?.metaKey||x?.ctrlKey));Io(w,P);},I=()=>{location.href=w;};({[un.Normal]:S,[un.Background]:S,[un.CurrentPage]:I,[un.NormalWebFullscreen]:S,[un.Popup]:()=>m(w),[un.Iina]:p})[C]?.();});function m(C){const{width:x,height:w}=H1({item:t});return UM(C,n.bvid,x,w)}function p(){let C=e;t.api===Ee.Watchlater&&(C=`/video/${t.bvid}`);const x=new URL(C,location.href).href,w=`iina://open?url=${encodeURIComponent(x)}`;window.open(w,"_self");}const h=f.useMemo(()=>Object.values(un).filter(C=>Er[C].enabled===void 0).map(C=>({key:x$[C],label:Er[C].label,icon:Er[C].icon,onClick:()=>d(C)})),[]),g=f.useMemo(()=>Object.values(un).filter(C=>typeof Er[C].enabled=="boolean"&&Er[C].enabled).length?Object.values(un).filter(C=>typeof Er[C].enabled=="boolean"&&Er[C].enabled).map(C=>({key:x$[C],label:Er[C].label,icon:Er[C].icon,onClick:()=>d(C)})):[],[]),b=f.useMemo(()=>{if(l!==un.Popup&&t.api!==Ee.Live&&V1&&o)return v(Ro,{visible:r,inlinePosition:"right",icon:Er.Popup.icon,tooltip:Er.Popup.label,onClick:C=>{C.preventDefault(),C.stopPropagation(),d(un.Popup);}})},[l,r]),y=Ve(()=>{d(un.Popup);});return {onOpenWithMode:d,handleVideoLinkClick:u,consistentOpenMenus:h,conditionalOpenMenus:g,openInPopupActionButtonEl:b,onOpenInPopup:y}}function H1({item:e,dimensionFromApi:t}){let n,r,o;if(t)[n,r]=[t.width,t.height],t.rotate===1&&([n,r]=[r,n]),o=n/r;else if(e?.api===Ee.AppRecommend&&e.uri?.startsWith("bilibili://")){const i=new URL(e.uri).searchParams,s=Number(i.get("player_width")||0),a=Number(i.get("player_height")||0),l=Number(i.get("player_rotate")||0);s&&a&&!Number.isNaN(s)&&!Number.isNaN(a)&&([n,r]=[s,a],l===1&&([n,r]=[r,n]),o=n/r);}else if(e?.api===Ee.Rank&&m1(e)){const i=e.dimension.width,s=e.dimension.height,a=e.dimension.rotate;i&&s&&!Number.isNaN(i)&&!Number.isNaN(s)&&([n,r]=[i,s],a===1&&([n,r]=[r,n]),o=n/r);}return {width:n,height:r,aspectRatio:o}}const V1=!!window.documentPictureInPicture?.requestWindow;async function UM(e,t,n,r){let o=1e3,i=Math.ceil(o/16*9);const s=200;if((!n||!r)&&t){const l=await Promise.race([yN(t),_t(s)]);if(l?.[0]?.dimension){const{dimension:c}=l[0];n=c.width,r=c.height;}}if(n&&r&&n<r){const l=Math.min(Math.floor(window.screen.availHeight*.8),1e3),c=Math.floor(l/r*n);o=Math.min(720,c),i=Math.floor(o/n*r);}qM("openInPipOrPopup newHref=%s size=%sx%s",e,o,i);let a;if(V1)try{a=await window.documentPictureInPicture?.requestWindow({width:o,height:i,disallowReturnToOpener:!0});}catch{}a?XU(e,a):nG(e,o,i);}function nG(e,t,n){const r=(window.innerWidth-t)/2,o=(window.innerHeight-n)/2-50,i=["popup=true",`width=${t}`,`height=${n}`,`left=${r}`,`top=${o}`].join(",");qM("openInPopup: features -> %s",i),window.open(e,"_blank",i);}function KM(){const{videoLinkOpenMode:e}=Mt();return e!==un.CurrentPage}function hp(){return KM()?"_blank":"_self"}function Nv(){return Ue.videoLinkOpenMode!==un.CurrentPage?"_blank":"_self"}function cu(e){const t=hp();return v("a",{...e,target:t,children:e.children})}let Fd=[],sg="";function F$(){const e=rn();return [e.format("YYYYMMDD"),e.hour()<18?"lt-18":"gte-18"].join("_")}async function rG(){return Fd.length&&sg&&sg===F$()||(Fd=(await Tt.get("/x/web-interface/popular/series/list")).data.data.list,sg=F$()),Fd}class im{constructor(t){this.useShuffle=t;}static PAGE_SIZE=20;episodesLoaded=false;episodes=[];qs=new lp(im.PAGE_SIZE);get hasMore(){return this.episodesLoaded?!!this.qs.bufferQueue.length||!!this.episodes.length:true}async loadMore(){if(this.episodesLoaded||(this.episodes=await rG(),this.episodesLoaded=true,this.useShuffle&&(this.episodes=Mr(this.episodes))),!this.hasMore)return;if(!this.useShuffle){if(this.qs.bufferQueue.length)return this.qs.sliceFromQueue();const n=this.episodes[0],r=n.number,o=await L$(r);return this.qs.bufferQueue.push({api:Ee.Separator,uniqId:`popular-weekly-separator-${r}`,content:v(cu,{href:`https://www.bilibili.com/v/popular/weekly?num=${r}`,children:n.name})},...o),this.episodes=this.episodes.slice(1),this.qs.sliceFromQueue()}const t=5;for(;this.qs.bufferQueue.length<im.PAGE_SIZE*t&&this.episodes.length;){this.episodes=Mr(this.episodes);const n=this.episodes.slice(0,t);this.episodes=this.episodes.slice(t);const r=await Ui(n.map(o=>o.number),o=>L$(o),2);this.qs.bufferQueue=Mr([...this.qs.bufferQueue,...r.flat()]);}return this.qs.sliceFromQueue()}get tabbarView(){return v(oG,{})}}const ag={};async function L$(e){if(!ag[e]?.length){const o=((await Tt.get("/x/web-interface/popular/series/one",{params:{number:e}})).data.data.list||[]).map(i=>({...i,api:Ee.PopularWeekly,uniqId:`${Ee.PopularWeekly}-${i.bvid}`}));ag[e]=o;}return ag[e]}function oG(){const e=jn();return v($e,{children:v(gf,{configPath:"popularWeeklyUseShuffle",checkedChildren:"随机顺序: 开",unCheckedChildren:"随机顺序: 关",extraAction:async()=>{await _t(100),e();}})})}const Ja=e=>e?typeof e=="function"?e():e:null,iG=e=>{const{componentCls:t,popoverColor:n,titleMinWidth:r,fontWeightStrong:o,innerPadding:i,boxShadowSecondary:s,colorTextHeading:a,borderRadiusLG:l,zIndexPopup:c,titleMarginBottom:u,colorBgElevated:d,popoverBg:m,titleBorderBottom:p,innerContentPadding:h,titlePadding:g}=e;return [{[t]:{...Lt(e),position:"absolute",top:0,left:{_skip_check_:true,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"--antd-arrow-background-color":d,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-container`]:{backgroundColor:m,backgroundClip:"padding-box",borderRadius:l,boxShadow:s,padding:i},[`${t}-title`]:{minWidth:r,marginBottom:u,color:a,fontWeight:o,borderBottom:p,padding:g},[`${t}-content`]:{color:n,padding:h}}},Py(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block"}}]},sG=e=>{const{componentCls:t}=e;return {[t]:_i.map(n=>{const r=e[`${n}6`];return {[`&${t}-${n}`]:{"--antd-arrow-background-color":r,[`${t}-inner`]:{backgroundColor:r},[`${t}-arrow`]:{background:"transparent"}}}})}},aG=e=>{const{lineWidth:t,controlHeight:n,fontHeight:r,padding:o,wireframe:i,zIndexPopupBase:s,borderRadiusLG:a,marginXS:l,lineType:c,colorSplit:u,paddingSM:d}=e,m=n-r,p=m/2,h=m/2-t,g=o;return {titleMinWidth:177,zIndexPopup:s+30,...Iy(e),...Xm({contentRadius:a,limitVerticalRadius:true}),innerPadding:i?0:12,titleMarginBottom:i?0:l,titlePadding:i?`${p}px ${g}px ${h}px`:0,titleBorderBottom:i?`${t}px ${c} ${u}`:"none",innerContentPadding:i?`${d}px ${g}px`:0}},XM=xt("Popover",e=>{const{colorBgElevated:t,colorText:n}=e,r=vt(e,{popoverBg:t,popoverColor:n});return [iG(r),sG(r),Tu(r,"zoom-big")]},aG,{resetStyle:false,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]}),YM=e=>{const{title:t,content:n,prefixCls:r,classNames:o,styles:i}=e;return !t&&!n?null:f__namespace.createElement(f__namespace.Fragment,null,t&&f__namespace.createElement("div",{className:H(`${r}-title`,o?.title),style:i?.title},t),n&&f__namespace.createElement("div",{className:H(`${r}-content`,o?.content),style:i?.content},n))},lG=e=>{const{hashId:t,prefixCls:n,className:r,style:o,placement:i="top",title:s,content:a,children:l,classNames:c,styles:u}=e,d=Ja(s),m=Ja(a),p={...e,placement:i},[h,g]=It([c],[u],{props:p}),b=H(t,n,`${n}-pure`,`${n}-placement-${i}`,r);return f__namespace.createElement("div",{className:b,style:o},f__namespace.createElement("div",{className:`${n}-arrow`}),f__namespace.createElement($y,{...e,className:t,prefixCls:n,classNames:h,styles:g},l||f__namespace.createElement(YM,{prefixCls:n,title:d,content:m,classNames:h,styles:g})))},QM=e=>{const{prefixCls:t,className:n,...r}=e,{getPrefixCls:o}=f__namespace.useContext(ot),i=o("popover",t),[s,a]=XM(i);return f__namespace.createElement(lG,{...r,prefixCls:i,hashId:s,className:H(n,a)})},cG=f__namespace.forwardRef((e,t)=>{const{prefixCls:n,title:r,content:o,overlayClassName:i,placement:s="top",trigger:a,children:l,mouseEnterDelay:c=.1,mouseLeaveDelay:u=.1,onOpenChange:d,overlayStyle:m={},styles:p,classNames:h,motion:g,arrow:b,...y}=e,{getPrefixCls:C,className:x,style:w,classNames:S,styles:I,arrow:$,trigger:E}=St("popover"),P=C("popover",n),[M,N]=XM(P),A=C(),k=Ny(b,$),R=a||E||"hover",L={...e,placement:s,trigger:R,mouseEnterDelay:c,mouseLeaveDelay:u,overlayStyle:m,styles:p,classNames:h},[V,_]=It([S,h],[I,p],{props:L}),z=H(i,M,N,x,V.root),[D,W]=Bt(e.defaultOpen??false,e.open),O=(U,K)=>{W(U),d?.(U,K);},B=U=>{U.keyCode===_e.ESC&&O(false,U);},j=U=>{O(U);},Y=Ja(r),q=Ja(o);return f__namespace.createElement(Zi,{unique:false,arrow:k,placement:s,trigger:R,mouseEnterDelay:c,mouseLeaveDelay:u,...y,prefixCls:P,classNames:{root:z,container:V.container,arrow:V.arrow},styles:{root:{..._.root,...w,...m},container:_.container,arrow:_.arrow},ref:t,open:D,onOpenChange:j,overlay:Y||q?f__namespace.createElement(YM,{prefixCls:P,title:Y,content:q,classNames:V,styles:_}):null,motion:{motionName:Vi(A,"zoom-big",typeof g?.motionName=="string"?g?.motionName:void 0)},"data-popover-inject":true},Rn(l,{onKeyDown:U=>{f.isValidElement(l)&&l?.props.onKeyDown?.(U),B(U);}}))}),ko=cG;ko._InternalPanelDoNotUseOrYouWillBeFired=QM;const uG=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,children:[v("path",{d:"M40 20c0 6.808-4.252 12.622-10.244 14.934H18.244C12.252 32.622 8 26.808 8 20c0-8.837 7.163-16 16-16s16 7.163 16 16"}),v("path",{d:"m29.756 34.934l-.68 8.15a1 1 0 0 1-.996.916h-8.16a1 1 0 0 1-.996-.917l-.68-8.15M18 17v6l6-3l6 3v-6"})]})]}),dG=f.forwardRef(uG),fG=dG,ZM="rgb(0 0 0 / 0.85)";function Mn({children:e,tooltipProps:t,IconComponent:n,className:r,useBlackBg:o,...i}){n??=fG;const s=v(n,{...i,className:An("ml-4px size-16px cursor-pointer",r)});return !!e&&v(Jt,{color:o?ZM:void 0,...t,title:e,children:s})}const JM="rank-store-slug",mG=await( GM.getValue(JM))||f1.slug,Xr=tn({slug:mG,tabs:[],get currentTab(){return this.tabs.find(e=>e.slug===this.slug)||f1}}),pG=ci(async()=>{if(Xr.tabs.length)return;const e=await vV();Xr.tabs=e;});l6(Xr,"slug",()=>{GM.setValue(JM,Xr.slug);});class hG{constructor(t){this.slug=t;}loaded=false;qs=new lp(20);tabbarView=v(gG,{});sidebarView=v(bG,{});get hasMore(){return this.loaded?!!this.qs.bufferQueue.length:true}get rankTab(){return Qn(Xr).tabs.find(t=>t.slug===this.slug)||f1}async loadMore(t){if(this.hasMore){if(!this.loaded){await pG();const{url:n,apiType:r}=xN(this.rankTab),i=(await Tt.get(n,{signal:t})).data;if(this.loaded=true,!cn(i)){zt(i.message||al);return}const a=(i?.data?.list||i?.result?.list||[]).map((l,c)=>{const u=c+1;return {...l,api:Ee.Rank,uniqId:`${Ee.Rank}-${this.rankTab.slug}-rankingNo:${u}`,rankingNo:u,slug:this.rankTab.slug,rankTab:this.rankTab,from:r}});this.qs.bufferQueue=a;}return this.qs.sliceFromQueue()}}}function e5(){const{tabs:e}=nt(Xr),{normalList:t,pgcList:n}=f.useMemo(()=>{const r=e.map(s=>({...s,apiType:xN(s).apiType})),o=r.filter(s=>[bf.PgcSeason,bf.PgcWeb].includes(s.apiType));return {normalList:r.filter(s=>s.apiType===bf.Normal),pgcList:o}},[e]);return {normalList:t,pgcList:n}}function gG(){const{enableSidebar:e}=Mt(),{ref:t,getPopupContainer:n}=Ys(),r=jn(),{slug:o,currentTab:i}=nt(Xr),{normalList:s,pgcList:a}=e5(),l=(h,g,b)=>h.length?F("div",{className:"mt-15px max-w-350px first:mt-0",children:[F("p",{className:"mb-5px flex-v-center rounded-5px bg-gate-primary py-5px pl-6px text-white",children:[g,!!b&&v(Mn,{children:b})]}),v("div",{className:"grid grid-cols-4 gap-x-10px gap-y-8px px-2px",children:h.map(y=>{const C=y.slug===o;return v(Je,{className:H({"b-gate-primary":C,"color-gate-primary":C}),onClick:x=>{m(false),Xr.slug=y.slug,r();},children:v("span",{children:y.name})},y.slug)})})]}):null,c=Ve(h=>{const g=[...s,...a];if(!g.length)return;const b=g.findIndex(x=>x.slug===o);if(b===-1)return;const y=h.shiftKey?-1:1,C=(b+y+g.length)%g.length;Xr.slug=g[C].slug,r();}),u=F($e,{children:[l(s,"视频"),l(a,"PGC内容","不能提供预览")]}),[d,m]=f.useState(false),p=v(ko,{arrow:false,open:d,onOpenChange:m,placement:"bottomLeft",getPopupContainer:n,content:u,styles:{container:{border:`1px solid ${Sl()}`}},children:v(Je,{css:[d&&wl,"",""],onClick:c,className:"outline-none!",children:i.name})});if(!e)return v("div",{ref:t,children:p})}function bG(){const{slug:e}=nt(Xr),{normalList:t,pgcList:n}=e5(),r=jn(),o=Ve(s=>{Xr.slug=s,r();}),i=f.useMemo(()=>{const s={type:"group",label:"视频",children:t.map(l=>({key:l.slug,label:l.name,onClick:()=>o(l.slug)}))},a={type:"group",label:"PGC内容",children:n.map(l=>({key:l.slug,label:l.name,onClick:()=>o(l.slug)}))};return [s,a]},[t,n]);return v(es,{items:i,selectedKeys:[e],mode:"inline",inlineIndent:10})}const vG={[vn.PopularGeneral]:()=>new lV(Ue.popularGeneralUseAnonymous),[vn.PopularWeekly]:()=>new im(Ue.popularWeeklyUseShuffle),[vn.Rank]:()=>new hG(Xr.slug)};function t5(e){const{subtab:t}=mr;return e??=Ue.popularWeeklyUseShuffle,t===vn.PopularWeekly&&e}const lg=e=>v("img",{src:e,alt:"",className:"size-18px"}),cg={[vn.PopularGeneral]:{icon:lg("https://s1.hdslb.com/bfs/static/jinkela/popular/assets/icon_popular.png"),label:"综合热门",desc:"各个领域中新奇好玩的优质内容都在这里~",swr:true,anonymousUsage:true},[vn.PopularWeekly]:{icon:lg("https://s1.hdslb.com/bfs/static/jinkela/popular/assets/icon_weekly.png"),label:"每周必看",desc:"每周五晚 18:00 更新",anonymousUsage:true},[vn.Rank]:{icon:lg("https://s1.hdslb.com/bfs/static/jinkela/popular/assets/icon_rank.png"),label:"排行榜",desc:"排行榜根据稿件内容质量,近期的数据综合展示,动态更新",anonymousUsage:true,swr:true}};class yG extends ns{subtab;service;constructor(){super(20),this.subtab=mr.subtab,this.service=vG[mr.subtab]();}get tabbarView(){return v(CG,{children:this.service.tabbarView})}get sidebarView(){return this.service.sidebarView}get hasMoreExceptQueue(){return this.service.hasMore}fetchMore(t){return this.service.loadMore(t)}}const mr=await( Ky({subtab:vn.PopularGeneral},"hot-store"));Object.values(vn).includes(mr.subtab)||(mr.subtab=vn.PopularGeneral);function CG({children:e}){const{subtab:t}=nt(mr),{icon:n,label:r}=cg[t],o=jn(),{ref:i,getPopupContainer:s}=Ys(),{__internalHotSubUseDropdown:a}=Mt(),l=f.useMemo(()=>[vn.PopularGeneral,vn.PopularWeekly,vn.Rank].map((d,m)=>{const p=cg[d],h=d===t;return [m>0&&{type:"divider"},{key:d,label:v("span",{className:H({"color-gate-primary":h}),children:p.label}),icon:p.icon,onClick(){d!==mr.subtab&&(mr.subtab=d,o());}}].filter(Boolean)}).flat(),[t]),c=v(ts,{menu:{items:l},getPopupContainer:s,rootClassName:dN.createClass`
.ant-dropdown-menu-item-divider {
margin: 2px 0 !important;
}
`,children:F(Je,{ref:i,className:"w-114px flex items-center justify-start gap-0 pl-16px",children:[n,v("span",{className:"ml-8px",children:r})]})}),u=f.useMemo(()=>v(Fr.Compact,{children:[vn.PopularGeneral,vn.PopularWeekly,vn.Rank].map((d,m)=>{const{icon:p,label:h,desc:g}=cg[d],b=d===t;return v(Jt,{title:F($e,{children:[h,": ",g]}),children:v(Je,{className:"[&_.ant-btn-icon]:line-height-0",icon:p,variant:b?"solid":"outlined",color:b?"primary":"default",onClick:()=>{d!==mr.subtab&&(mr.subtab=d,o());},children:h})},d)})}),[t]);return F($e,{children:[a?c:u,e]})}var el=(e=>(e.Left="left",e.Right="right",e))(el||{});const xG={name:"x4d4ct",styles:"scrollbar-width:thin;.ant-menu-item-group-title{padding:4px 8px;}.ant-menu-item{margin-block:1px;}ul.ant-menu-item-group-list{font-size:inherit;}"};function j1(e){const{enableSidebar:t}=Mt(),{usingTwoColumnMode:n}=VP(),r=nt(mr).subtab,{insideModal:o}=Zr();return f.useMemo(()=>!t||o&&n?false:e===Be.DynamicFeed?!Ji:e===Be.Hot?r===vn.Rank:e===Be.Fav,[e,t,r,o,n])}function wG(e){const t=nt(mr).subtab;if(e===Be.Fav)return "w-300px";if(e===Be.Hot&&t===vn.Rank)return "w-200px"}function n5({className:e,style:t,sidebarView:n,tab:r}){const o=j1(r),i=An("h-fit w-250px flex-none overflow-x-hidden overflow-y-auto b-1px b-gate-border rounded-15px b-solid",wG(r),e);return o&&n&&v("div",{className:i,css:xG,style:t,children:v(yr,{theme:{components:{Menu:{itemHeight:30}}},children:n})})}function r5(e,t){const n=f.useRef(null),r=Ve(s=>{if(s||=t,!s)return;const a=n.current?.menu?.findItem({key:s});if(a)return a.scrollIntoViewIfNeeded?a.scrollIntoViewIfNeeded():a.scrollIntoView(),true}),o=f.useRef(false),i=Ve(()=>{if(o.current)return;r()&&(o.current=true);});return ir(()=>i()),Wi(()=>i(),[e]),{menuRef:n,revealSelected:r}}var hr=(e=>(e.AddTimeDesc="add-time-desc",e.AddTimeAsc="add-time-asc",e.Shuffle="shuffle",e))(hr||{});function o5(e,t="",n=[]){t&&n.push(t);for(const r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;const o=e[r],i=t?`${t}.${r}`:r;n.push(i),o&&typeof o=="object"&&!Array.isArray(o)&&!(o instanceof Date)&&!(o instanceof RegExp)&&o5(o,i,n);}return [...new Set(n)]}function i5(e,t=""){const n=[];t&&n.push(t);for(const r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;const o=e[r],i=t?`${t}.${r}`:r;o&&typeof o=="object"&&!Array.isArray(o)&&!(o instanceof Date)&&!(o instanceof RegExp)&&Object.getPrototypeOf(o)===Object.prototype&&(n.push(i),n.push(...i5(o,i)));}return [...new Set(n)]}function SG(e){const t=o5(e),n=i5(e);return t.filter(r=>!n.includes(r))}async function B$(){return (await Tt.get("https://member.bilibili.com/x/web/draft/list")).data.artlist?.drafts||[]}async function ug(e){const t=new URLSearchParams({title:"",banner_url:"",content:"",summary:"",words:"0",category:"15",tid:"0",reprint:"0",tags:"",image_urls:"",origin_image_urls:"",dynamic_intro:"",media_id:"0",spoiler:"0",original:"0",top_video_bvid:"",aid:"",csrf:Xs(),...e}),n=(await Tt.post("/x/article/creative/draft/addupdate",t)).data,r=n?.data?.aid?.toString(),o=cn(n);return o||zt(n.message||"addupdate error"),{success:o,aid:r}}async function $G(e){return (await Tt.get("/x/article/creative/draft/view",{params:{aid:e}})).data?.data?.content||""}class EG{title;constructor(t){this.title=t;}getData=async()=>{const{title:t}=this,r=(await B$()).find(l=>l.title===t);if(!r){const{success:l,aid:c}=await ug({title:t});return}const o=await $G(r.id),a=(new DOMParser().parseFromString(o,"text/html").body.textContent||"").trim();if(a)try{return JSON.parse(a)}catch{return}};_aid;setData=async t=>{const{title:n}=this;if(!this._aid){const s=(await B$()).find(a=>a.title===n);if(s)this._aid=s.id.toString();else {const{success:a,aid:l}=await ug({title:n});if(!a)return false;this._aid=l;}}const r=JSON.stringify(t),{success:o}=await ug({aid:this._aid,title:n,content:`<p>${r}</p>`,words:r.length.toString()});return o}}const IG=Hn.extend("settings"),s5=new EG(uo),a5=["accessKey","accessKeyExpireAt"],PG=()=>[...a5,...sm,"backupSettingsToArticleDraft","fav.addSeparator","watchlaterAddSeparator","watchlaterItemsOrder","popularWeeklyUseShuffle","popularGeneralUseAnonymous"],NG=[...a5,"backupSettingsToArticleDraft"];let l5=false;function c5(e){l5=e;}let dg;const MG=_s(s5.setData,Wn("5s"));async function RG(e){if(!e.backupSettingsToArticleDraft||l5)return;const{pickedSettings:t}=$l(e,os,PG());if(!dg||!ei(dg,t))try{await MG(t),dg=t,IG("backup to article draft complete");}catch(r){console.error(r.stack||r);}}const AG=Hn.extend("settings"),Xu={accessKey:"",accessKeyExpireAt:0,pureRecommend:true,appRecommend:{addOtherTabContents:false},showModalFeedOnLoad:false,showModalFeedEntry:false,modalFeedFullScreen:false,grid:{useCustomGrid:true,gridDisplayMode:ri.NormalGrid,twoColumnModeAlign:zP.Center,enableForceCoumn:false,forceColumnCount:4},videoCard:{actions:{openInPipWindow:false,showLargePreview:true},videoPreview:{useMp4:true,useScale:false,useVideoCardAsTrigger:false,usePreferredCdn:true,addTo:{searchPage:true}},imgPreview:{autoPreviewWhenKeyboardSelect:false,autoPreviewWhenHover:true,disableWhenMultiSelecting:true}},autoPreviewUpdateInterval:700,useDelayForHover:false,enableSidebar:true,sidebarAlign:el.Left,dynamicFeed:{showLive:true,followGroup:{enabled:true,forceUseMergeTimelineIds:[]},whenViewAll:{enableHideSomeContents:false,hideIds:[]},advancedSearch:false,__internal:{cacheAllItemsEntry:false,cacheAllItemsUpMids:[],externalSearchInput:false}},watchlaterAddSeparator:true,watchlaterItemsOrder:hr.AddTimeDesc,watchlaterUseNormalVideoUrl:false,fav:{addSeparator:true,excludedFolderIds:[],useCustomFavPicker:{onPlayPage:false}},popularGeneralUseAnonymous:false,popularWeeklyUseShuffle:false,spaceUpload:{showVol:false,useSyncFilterTextFromSearchText:false},filter:{enabled:true,minDuration:{enabled:false,value:60},minPlayCount:{enabled:false,value:1e4},minDanmakuCount:{enabled:false,value:10},exemptForFollowed:{video:true,picture:true},hideGotoTypePicture:false,hideGotoTypeBangumi:false,byAuthor:{enabled:false,keywords:[]},byTitle:{enabled:false,keywords:[]}},style:{general:{popoverBorderColorUseColorPrimary:false},pureRecommend:{useStickyTabbar:true,stickyTabbarShadow:false,useWhiteBackground:true,hideTopChannel:false},videoCard:{useBorder:true,useBorderOnlyOnHover:true,useBoxShadow:false}},theme:"",colorPickerThemeSelectedColor:"",backupSettingsToArticleDraft:false,videoLinkOpenMode:un.Normal,pipWindow:{defaultLocked:true,autoWebFullscreen:true},hidingTabKeys:[Be.KeepFollowOnly,Be.Live],customTabKeysOrder:[],multiSelect:{clearWhenExit:true,showIcon:true},__internalEnableCopyBvidInfo:false,__internalAddCopyBvidButton:false,__internalHotSubUseDropdown:false,__internalRecTabRenderAsSegments:false},Ue=tn(_a(Xu)),os=SG(Xu),sm=os.filter(e=>e.includes("__internal")&&typeof nr(Xu,e)=="boolean");AG("allowedLeafSettingsPaths = %O, internalBooleanPaths = %O",os,sm);function Mt(){return nt(Ue)}function Yu(){return Qn(Ue)}const W1="settings";async function u5(){const e=await GM.getValue(W1);return !e||typeof e!="object"?{}:(q1(e),$l(e,os).pickedSettings)}async function TG(){const e=await u5();vo(e),Qi(Ue,()=>{OG();}),Gy({storageKey:W1,setPersist(t){d5=t;},onUpdate(t){vo(t);}});}async function OG(){const e=_a(Qn(Ue));await FG(e),await RG(e);}let d5=true;async function FG(e){d5&&await GM.setValue(W1,e);}function vo(e){const{pickedPaths:t}=$l(e,os);for(const n of t){const r=nr(e,n);sl(Ue,n,r);}}function LG(){return vo(Xu)}function q1(e){if(!e)return;const t=[["dynamicFeed.showLive","dynamicFeedShowLive"],["dynamicFeed.followGroup.enabled","dynamicFeedFollowGroupEnabled"],["dynamicFeed.followGroup.forceUseMergeTimelineIds","dynamicFeedFollowGroupForceUseMergeTimelineIds"],["dynamicFeed.whenViewAll.enableHideSomeContents","dynamicFeedWhenViewAllEnableHideSomeContents"],["dynamicFeed.whenViewAll.hideIds","dynamicFeedWhenViewAllHideIds"],["dynamicFeed.advancedSearch","dynamicFeedAdvancedSearch"],["fav.addSeparator","favAddSeparator"],["fav.excludedFolderIds","favExcludedFolderIds"],["filter.enabled","filterEnabled"],["filter.minPlayCount.enabled","filterMinPlayCountEnabled"],["filter.minPlayCount.value","filterMinPlayCount"],["filter.minDuration.enabled","filterMinDurationEnabled"],["filter.minDuration.value","filterMinDuration"],["filter.exemptForFollowed.video","exemptForFollowedVideo"],["filter.exemptForFollowed.picture","exemptForFollowedPicture"],["filter.hideGotoTypePicture","filterOutGotoTypePicture"],["filter.hideGotoTypeBangumi","filterOutGotoTypeBangumi"],["filter.byAuthor.enabled","filterByAuthorNameEnabled"],["filter.byAuthor.keywords","filterByAuthorNameKeywords"],["filter.byTitle.enabled","filterByTitleEnabled"],["filter.byTitle.keywords","filterByTitleKeywords"],["style.pureRecommend.useStickyTabbar","styleUseStickyTabbarInPureRecommend"],["style.pureRecommend.useWhiteBackground","styleUseWhiteBackground"],["style.pureRecommend.hideTopChannel","styleHideTopChannel"],["style.videoCard.useBorder","styleUseCardBorder"],["style.videoCard.useBorderOnlyOnHover","styleUseCardBorderOnlyOnHover"],["style.videoCard.useBoxShadow","styleUseCardBoxShadow"],["pipWindow.defaultLocked","pipWindowDefaultLocked"],["videoCard.imgPreview.autoPreviewWhenKeyboardSelect","autoPreviewWhenKeyboardSelect"],["videoCard.imgPreview.autoPreviewWhenHover","autoPreviewWhenHover"],["grid.useCustomGrid","style.pureRecommend.useCustomGrid"]];for(const[n,r]of t){const o=i=>!ti(i);o(nr(e,n))||o(nr(e,r))&&sl(e,n,nr(e,r));}}function $l(e,t,n=[]){const r={},o=t.filter(i=>os.includes(i)&&!n.includes(i)&&!ti(nr(e,i)));return o.forEach(i=>{const s=nr(e,i);sl(r,i,s);}),{pickedPaths:o,pickedSettings:r}}function f5(e){const t=Mt();return nr(t,e)}async function gp(e){const t=await u5();return nr(t,e)||nr(Yu(),e)}function BG(e,t){sl(Ue,e,t);}async function ii(e,{add:t,remove:n}){const r=await gp(e),o=new Set(r);for(const i of t??[])o.add(i);for(const i of n??[])o.delete(i);BG(e,Array.from(o));}await( TG());_o&&Ue.accessKey&&Ue.accessKeyExpireAt&&Date.now()>=Ue.accessKeyExpireAt&&zt("access_key 已过期, 请重新获取 !!!");var yf={exports:{}},kG=yf.exports,k$;function DG(){return k$||(k$=1,(function(e,t){(function(n,r){e.exports=r();})(kG,function(){var n,r,o=1e3,i=6e4,s=36e5,a=864e5,l=/\[([^\]]+)]|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,c=31536e6,u=2628e6,d=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,m={years:c,months:u,days:a,hours:s,minutes:i,seconds:o,milliseconds:1,weeks:6048e5},p=function(I){return I instanceof w},h=function(I,$,E){return new w(I,E,$.$l)},g=function(I){return r.p(I)+"s"},b=function(I){return I<0},y=function(I){return b(I)?Math.ceil(I):Math.floor(I)},C=function(I){return Math.abs(I)},x=function(I,$){return I?b(I)?{negative:true,format:""+C(I)+$}:{negative:false,format:""+I+$}:{negative:false,format:""}},w=(function(){function I(E,P,M){var N=this;if(this.$d={},this.$l=M,E===void 0&&(this.$ms=0,this.parseFromMilliseconds()),P)return h(E*m[g(P)],this);if(typeof E=="number")return this.$ms=E,this.parseFromMilliseconds(),this;if(typeof E=="object")return Object.keys(E).forEach(function(R){N.$d[g(R)]=E[R];}),this.calMilliseconds(),this;if(typeof E=="string"){var A=E.match(d);if(A){var k=A.slice(2).map(function(R){return R!=null?Number(R):0});return this.$d.years=k[0],this.$d.months=k[1],this.$d.weeks=k[2],this.$d.days=k[3],this.$d.hours=k[4],this.$d.minutes=k[5],this.$d.seconds=k[6],this.calMilliseconds(),this}}return this}var $=I.prototype;return $.calMilliseconds=function(){var E=this;this.$ms=Object.keys(this.$d).reduce(function(P,M){return P+(E.$d[M]||0)*m[M]},0);},$.parseFromMilliseconds=function(){var E=this.$ms;this.$d.years=y(E/c),E%=c,this.$d.months=y(E/u),E%=u,this.$d.days=y(E/a),E%=a,this.$d.hours=y(E/s),E%=s,this.$d.minutes=y(E/i),E%=i,this.$d.seconds=y(E/o),E%=o,this.$d.milliseconds=E;},$.toISOString=function(){var E=x(this.$d.years,"Y"),P=x(this.$d.months,"M"),M=+this.$d.days||0;this.$d.weeks&&(M+=7*this.$d.weeks);var N=x(M,"D"),A=x(this.$d.hours,"H"),k=x(this.$d.minutes,"M"),R=this.$d.seconds||0;this.$d.milliseconds&&(R+=this.$d.milliseconds/1e3,R=Math.round(1e3*R)/1e3);var L=x(R,"S"),V=E.negative||P.negative||N.negative||A.negative||k.negative||L.negative,_=A.format||k.format||L.format?"T":"",z=(V?"-":"")+"P"+E.format+P.format+N.format+_+A.format+k.format+L.format;return z==="P"||z==="-P"?"P0D":z},$.toJSON=function(){return this.toISOString()},$.format=function(E){var P=E||"YYYY-MM-DDTHH:mm:ss",M={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return P.replace(l,function(N,A){return A||String(M[N])})},$.as=function(E){return this.$ms/m[g(E)]},$.get=function(E){var P=this.$ms,M=g(E);return M==="milliseconds"?P%=1e3:P=M==="weeks"?y(P/m[M]):this.$d[M],P||0},$.add=function(E,P,M){var N;return N=P?E*m[g(P)]:p(E)?E.$ms:h(E,this).$ms,h(this.$ms+N*(M?-1:1),this)},$.subtract=function(E,P){return this.add(E,P,true)},$.locale=function(E){var P=this.clone();return P.$l=E,P},$.clone=function(){return h(this.$ms,this)},$.humanize=function(E){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!E)},$.valueOf=function(){return this.asMilliseconds()},$.milliseconds=function(){return this.get("milliseconds")},$.asMilliseconds=function(){return this.as("milliseconds")},$.seconds=function(){return this.get("seconds")},$.asSeconds=function(){return this.as("seconds")},$.minutes=function(){return this.get("minutes")},$.asMinutes=function(){return this.as("minutes")},$.hours=function(){return this.get("hours")},$.asHours=function(){return this.as("hours")},$.days=function(){return this.get("days")},$.asDays=function(){return this.as("days")},$.weeks=function(){return this.get("weeks")},$.asWeeks=function(){return this.as("weeks")},$.months=function(){return this.get("months")},$.asMonths=function(){return this.as("months")},$.years=function(){return this.get("years")},$.asYears=function(){return this.as("years")},I})(),S=function(I,$,E){return I.add($.years()*E,"y").add($.months()*E,"M").add($.days()*E,"d").add($.hours()*E,"h").add($.minutes()*E,"m").add($.seconds()*E,"s").add($.milliseconds()*E,"ms")};return function(I,$,E){n=E,r=E().$utils(),E.duration=function(N,A){var k=E.locale();return h(N,{$l:k},A)},E.isDuration=p;var P=$.prototype.add,M=$.prototype.subtract;$.prototype.add=function(N,A){return p(N)?S(this,N,1):P.bind(this)(N,A)},$.prototype.subtract=function(N,A){return p(N)?S(this,N,-1):M.bind(this)(N,A)};}});})(yf)),yf.exports}var zG=DG();const _G=vr(zG);var HG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M859.9 168H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zM518.3 355a8 8 0 00-12.6 0l-112 141.7a7.98 7.98 0 006.3 12.9h73.9V848c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V509.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 355z"}}]},name:"vertical-align-top",theme:"outlined"};function Mv(){return Mv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Mv.apply(this,arguments)}const VG=(e,t)=>f__namespace.createElement(on,Mv({},e,{ref:t,icon:HG})),jG=f__namespace.forwardRef(VG);function Rv(e){return kn(e)&&e===e.window}const m5=e=>{if(typeof window>"u")return 0;let t=0;return Rv(e)?t=e.pageYOffset:e instanceof Document?t=e.documentElement.scrollTop:(e instanceof HTMLElement||e)&&(t=e.scrollTop),e&&!Rv(e)&&typeof t!="number"&&(t=(e.ownerDocument??e).documentElement?.scrollTop),t};function WG(e,t,n,r){const o=n-t;return e/=r/2,e<1?o/2*e*e*e+t:o/2*((e-=2)*e*e+2)+t}function qG(e,t={}){const{getContainer:n=()=>window,callback:r,duration:o=450}=t,i=n(),s=m5(i),a=Date.now();let l;const c=()=>{const d=Date.now()-a,m=WG(d>o?o:d,s,e,o);Rv(i)?i.scrollTo(window.pageXOffset,m):i instanceof Document||i.constructor.name==="HTMLDocument"?i.documentElement.scrollTop=m:i.scrollTop=m,d<o?l=gt(c):typeof r=="function"&&r();};return l=gt(c),()=>{gt.cancel(l);}}function UG(e){let t=null;const n=o=>()=>{t=null,e.apply(void 0,Et(o));},r=(...o)=>{t===null&&(t=gt(n(o)));};return r.cancel=()=>{gt.cancel(t),t=null;},r}const am=f.createContext(null);var GG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"};function Av(){return Av=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Av.apply(this,arguments)}const KG=(e,t)=>f__namespace.createElement(on,Av({},e,{ref:t,icon:GG})),p5=f__namespace.forwardRef(KG),XG=e=>kn(e)?typeof e=="object"&&!f.isValidElement(e)?e:{title:e}:null,D$=e=>{const{prefixCls:t,value:n,current:r,offset:o=0}=e;let i;return o&&(i={position:"absolute",top:`${o}00%`,left:0}),f__namespace.createElement("span",{style:i,className:H(`${t}-only-unit`,{current:r})},n)};function YG(e,t,n){let r=e,o=0;for(;(r+10)%10!==t;)r+=n,o+=n;return o}const QG=e=>{const{prefixCls:t,count:n,value:r}=e,o=Number(r),i=Math.abs(n),[s,a]=f__namespace.useState(o),[l,c]=f__namespace.useState(i),u=()=>{a(o),c(i);};f__namespace.useEffect(()=>{const p=setTimeout(u,1e3);return ()=>clearTimeout(p)},[o]);let d,m;if(s===o||Number.isNaN(o)||Number.isNaN(s))d=[f__namespace.createElement(D$,{...e,key:o,current:true})],m={transition:"none"};else {d=[];const p=o+10,h=[];for(let C=o;C<=p;C+=1)h.push(C);const g=l<i?1:-1,b=h.findIndex(C=>C%10===s);d=(g<0?h.slice(0,b+1):h.slice(b)).map((C,x)=>{const w=C%10;return f__namespace.createElement(D$,{...e,key:C,value:w,offset:g<0?x-b:x,current:x===b})}),m={transform:`translateY(${-YG(s,o,g)}00%)`};}return f__namespace.createElement("span",{className:`${t}-only`,style:m,onTransitionEnd:u},d)},ZG=f__namespace.forwardRef((e,t)=>{const{prefixCls:n,count:r,className:o,motionClassName:i,style:s,title:a,show:l,component:c="sup",children:u,...d}=e,{getPrefixCls:m}=f__namespace.useContext(ot),p=m("scroll-number",n),h={...d,"data-show":l,style:s,className:H(p,o,i),title:a};let g=r;if(r&&Number(r)%1===0){const b=String(r).split("");g=f__namespace.createElement("bdi",null,b.map((y,C)=>f__namespace.createElement(QG,{prefixCls:p,count:Number(r),value:y,key:b.length-C})));}return s?.borderColor&&(h.style={...s,boxShadow:`0 0 0 1px ${s.borderColor} inset`}),u?Rn(u,b=>({className:H(`${p}-custom-component`,b?.className,i)})):f__namespace.createElement(c,{...h,ref:t},g)}),JG=new ht("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),eK=new ht("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),tK=new ht("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),nK=new ht("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),rK=new ht("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),oK=new ht("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),iK=e=>{const{componentCls:t,iconCls:n,antCls:r,badgeShadowSize:o,textFontSize:i,textFontSizeSM:s,statusSize:a,dotSize:l,textFontWeight:c,indicatorHeight:u,indicatorHeightSM:d,marginXS:m,calc:p}=e,h=`${r}-scroll-number`,g=Vm(e,(b,{darkColor:y})=>({[`&${t} ${t}-color-${b}`]:{background:y,[`&:not(${t}-count)`]:{color:y},"a:hover &":{background:y}}}));return {[t]:{...Lt(e),position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${t}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:e.indicatorZIndex,minWidth:u,height:u,color:e.badgeTextColor,fontWeight:c,fontSize:i,lineHeight:X(u),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:p(u).div(2).equal(),boxShadow:`0 0 0 ${X(o)} ${e.badgeShadowColor}`,transition:`background ${e.motionDurationMid}`,a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},[`${t}-count-sm`]:{minWidth:d,height:d,fontSize:s,lineHeight:X(d),borderRadius:p(d).div(2).equal()},[`${t}-multiple-words`]:{padding:`0 ${X(e.paddingXS)}`,bdi:{unicodeBidi:"plaintext"}},[`${t}-dot`]:{zIndex:e.indicatorZIndex,width:l,minWidth:l,height:l,background:e.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${X(o)} ${e.badgeShadowColor}`},[`${t}-count, ${t}-dot, ${h}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${n}-spin`]:{animationName:oK,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${t}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${t}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:a,height:a,verticalAlign:"middle",borderRadius:"50%"},[`${t}-status-success`]:{backgroundColor:e.colorSuccess},[`${t}-status-processing`]:{overflow:"visible",color:e.colorInfo,backgroundColor:e.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:o,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:JG,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${t}-status-default`]:{backgroundColor:e.colorTextPlaceholder},[`${t}-status-error`]:{backgroundColor:e.colorError},[`${t}-status-warning`]:{backgroundColor:e.colorWarning},[`${t}-status-text`]:{marginInlineStart:m,color:e.colorText,fontSize:e.fontSize}},...g,[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:eK,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`${t}-zoom-leave`]:{animationName:tK,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:nK,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:rK,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`&:not(${t}-status)`]:{verticalAlign:"middle"},[`${h}-custom-component, ${t}-count`]:{transform:"none"},[`${h}-custom-component, ${h}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[h]:{overflow:"hidden",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack}`,[`${h}-only`]:{position:"relative",display:"inline-block",height:u,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${h}-only-unit`]:{height:u,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${h}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${t}-count, ${t}-dot, ${h}-custom-component`]:{transform:"translate(-50%, -50%)"}}}}},h5=e=>{const{fontHeight:t,lineWidth:n,marginXS:r,colorBorderBg:o}=e,i=t,s=n,a=e.colorTextLightSolid,l=e.colorError,c=e.colorErrorHover;return vt(e,{badgeFontHeight:i,badgeShadowSize:s,badgeTextColor:a,badgeColor:l,badgeColorHover:c,badgeShadowColor:o,badgeProcessingDuration:"1.2s",badgeRibbonOffset:r,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},g5=e=>{const{fontSize:t,lineHeight:n,fontSizeSM:r,lineWidth:o}=e;return {indicatorZIndex:"auto",indicatorHeight:Math.round(t*n)-2*o,indicatorHeightSM:t,dotSize:r/2,textFontSize:r,textFontSizeSM:r,textFontWeight:"normal",statusSize:r/2}},sK=xt("Badge",e=>{const t=h5(e);return iK(t)},g5),aK=f__namespace.forwardRef((e,t)=>{const{prefixCls:n,scrollNumberPrefixCls:r,children:o,status:i,text:s,color:a,count:l=null,overflowCount:c=99,dot:u=false,size:d="default",title:m,offset:p,style:h,className:g,rootClassName:b,classNames:y,styles:C,showZero:x=false,...w}=e,{getPrefixCls:S,direction:I,className:$,style:E,classNames:P,styles:M}=St("badge"),N=S("badge",n),[A,k]=sK(N),R={...e,overflowCount:c,size:d,dot:u,showZero:x},[L,V]=It([P,y],[M,C],{props:R}),_=l>c?`${c}+`:l,z=_==="0"||_===0||s==="0"||s===0,D=l===null||z&&!x,W=(kn(i)||kn(a))&&D,O=kn(i)||!z,B=u&&!z,j=B?"":_,Y=f.useMemo(()=>((!kn(j)||j==="")&&(!kn(s)||s==="")||z&&!x)&&!B,[j,z,x,B,s]),q=f.useRef(l);Y||(q.current=l);const U=q.current,K=f.useRef(j);Y||(K.current=j);const J=K.current,Q=f.useRef(B);Y||(Q.current=B);const G=f.useMemo(()=>{if(!p)return {...E,...h};const he=Number.parseInt(p[0],10);return {...{marginTop:p[1],insetInlineEnd:-he},...E,...h}},[p,h,E]),ee=m??(typeof U=="string"||typeof U=="number"?U:void 0),re=!Y&&(s===0?x:!!s&&s!==true),oe=re?f__namespace.createElement("span",{className:`${N}-status-text`},s):null,be=!U||typeof U!="object"?void 0:Rn(U,he=>({style:{...G,...he.style}})),Z=Qm(a,false),te=H(L.indicator,{[`${N}-status-dot`]:W,[`${N}-status-${i}`]:!!i,[`${N}-color-${a}`]:Z}),ce={};a&&!Z&&(ce.color=a,ce.background=a);const ue=H(N,{[`${N}-status`]:W,[`${N}-not-a-wrapper`]:!o,[`${N}-rtl`]:I==="rtl"},g,b,$,L.root,A,k);if(!o&&W&&(s||O||!D)){const he=G.color;return f__namespace.createElement("span",{...w,className:ue,style:{...V.root,...G}},f__namespace.createElement("span",{className:te,style:{...V.indicator,...ce}}),re&&f__namespace.createElement("span",{style:{color:he},className:`${N}-status-text`},s))}return f__namespace.createElement("span",{ref:t,...w,className:ue,style:V.root},o,f__namespace.createElement(er,{visible:!Y,motionName:`${N}-zoom`,motionAppear:false,motionDeadline:1e3},({className:he})=>{const ye=S("scroll-number",r),pe=Q.current,ie=H(L.indicator,{[`${N}-dot`]:pe,[`${N}-count`]:!pe,[`${N}-count-sm`]:d==="small",[`${N}-multiple-words`]:!pe&&J&&J.toString().length>1,[`${N}-status-${i}`]:!!i,[`${N}-color-${a}`]:Z});let ge={...V.indicator,...G};return a&&!Z&&(ge=ge||{},ge.background=a),f__namespace.createElement(ZG,{prefixCls:ye,show:!Y,motionClassName:he,className:ie,count:J,title:ee,style:ge,key:"scrollNumber"},be)}),oe)}),lK=e=>{const{antCls:t,badgeFontHeight:n,marginXS:r,badgeRibbonOffset:o,calc:i}=e,s=`${t}-ribbon`,a=`${t}-ribbon-wrapper`,l=Vm(e,(c,{darkColor:u})=>({[`&${s}-color-${c}`]:{background:u,color:u}}));return {[a]:{position:"relative"},[s]:{...Lt(e),position:"absolute",top:r,padding:`0 ${X(e.paddingXS)}`,color:e.colorPrimary,lineHeight:X(n),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,[`${s}-content`]:{color:e.badgeTextColor},[`${s}-corner`]:{position:"absolute",top:"100%",width:o,height:o,color:"currentcolor",border:`${X(i(o).div(2).equal())} solid`,transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter},...l,[`&${s}-placement-end`]:{insetInlineEnd:i(o).mul(-1).equal(),borderEndEndRadius:0,[`${s}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${s}-placement-start`]:{insetInlineStart:i(o).mul(-1).equal(),borderEndStartRadius:0,[`${s}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}}}},cK=xt(["Badge","Ribbon"],e=>{const t=h5(e);return lK(t)},g5),uK=e=>{const{className:t,prefixCls:n,style:r,color:o,children:i,text:s,placement:a="end",rootClassName:l,styles:c,classNames:u}=e,{getPrefixCls:d,direction:m,className:p,style:h,classNames:g,styles:b}=St("ribbon"),y=d("ribbon",n),C=`${y}-wrapper`,[x,w]=cK(y,C),S={...e,placement:a},[I,$]=It([g,u],[b,c],{props:S}),E=Qm(o,false),P=H(y,`${y}-placement-${a}`,{[`${y}-rtl`]:m==="rtl",[`${y}-color-${o}`]:E},t,p,I.indicator),M={},N={};return o&&!E&&(M.background=o,N.color=o),f__namespace.createElement("div",{className:H(C,l,x,w,I.root),style:$.root},i,f__namespace.createElement("div",{className:H(P,x),style:{...M,...$.indicator,...h,...r}},f__namespace.createElement("span",{className:H(`${y}-content`,I.content),style:$.content},s),f__namespace.createElement("div",{className:`${y}-corner`,style:N})))},bp=aK;bp.Ribbon=uK;const dK=e=>{const{componentCls:t,floatButtonSize:n,iconCls:r,antCls:o,floatButtonIconSize:i}=e,s=hy(o,"float-btn"),a=`${t}-badge`,l=Math.SQRT2,c=(l-1)/l,u=e.calc(e.borderRadius).mul(c).equal(),d=e.calc(e.controlHeight).div(2).mul(c).equal();return {[t]:[{[s("size")]:X(n)},{flexDirection:"column",margin:0,padding:`${X(e.paddingXXS)} 0`,width:`var(${s("size")})`,minHeight:`var(${s("size")})`,height:"auto",wordBreak:"break-word",whiteSpace:"normal",gap:e.calc(e.paddingXXS).div(2).equal(),"&-rtl":{direction:"rtl"},[`&${t}-individual`]:{position:"fixed",zIndex:e.zIndexPopupBase,insetInlineEnd:e.floatButtonInsetInlineEnd,bottom:e.floatButtonInsetBlockEnd,boxShadow:e.boxShadowSecondary},[`&${t}-pure`]:{position:"relative",inset:"auto"},"&:empty":{display:"none"},[`${t}-icon`]:{lineHeight:1},[`&${t}-icon-only`]:{[r]:{fontSize:i}},[`${t}-content`]:{fontSize:e.fontSizeSM},[a]:{position:"absolute",top:0,insetInlineEnd:0,[`&:not(${a}-dot)`]:{transform:"translate(50%, -50%)"}},[`&-rtl ${a}:not(${a}-dot)`]:{transform:"translate(-50%, -50%)"},"&-square":{[`${a}-dot`]:{marginTop:u,marginInlineEnd:u}},"&-circle":{[a]:{marginTop:d,marginInlineEnd:d}}}]}},fK=e=>{const{componentCls:t,antCls:n,floatButtonSize:r,padding:o}=e,i=`${t}-group`,s=`${i}-list`,a=hy(n,"float-btn");return {[i]:[{[a("list-transform-start")]:`translate(0,${X(r)})`,[a("list-trigger-offset")]:`calc(${X(r)} + ${X(o)})`},{...Lt(e),position:"fixed",zIndex:e.zIndexPopupBase,insetInlineEnd:e.floatButtonInsetInlineEnd,bottom:e.floatButtonInsetBlockEnd,gap:o,"&-rtl":{direction:"rtl"},[`&${t}-pure`]:{position:"relative",inset:"auto"},[t]:{position:"relative",inset:"auto"}},{[`&:not(${i}-individual) ${s}`]:{boxShadow:e.boxShadowSecondary},[`&${i}-individual ${s}`]:{gap:o},[`&-menu-mode ${s}`]:{position:"absolute"},[s]:{borderRadius:e.borderRadiusLG,"&-motion":{transition:`all ${e.motionDurationSlow}`,"&-enter, &-appear":{opacity:0,transform:a("list-transform-start",true),"&-active":{opacity:1,transform:"translate(0, 0)"}},"&-leave":{"&-active":{opacity:0,transform:a("list-transform-start",true)}}}},"&-top":{[s]:{bottom:a("list-trigger-offset",true)}},"&-bottom":{[s]:{[a("list-transform-start")]:`translate(0, calc(${X(r)} * -1))`,top:a("list-trigger-offset",true)}},"&-left":{[s]:{[a("list-transform-start")]:`translate(${X(r)}, 0)`,right:a("list-trigger-offset",true)}},"&-right":{[s]:{[a("list-transform-start")]:`translate(calc(${X(r)} * -1), 0)`,left:a("list-trigger-offset",true)}}}]}},mK=()=>({}),b5=xt("FloatButton",e=>{const{controlHeightLG:t,marginXXL:n,marginLG:r,fontSizeIcon:o,calc:i}=e,s=vt(e,{floatButtonIconSize:i(o).mul(1.5).equal(),floatButtonSize:t,floatButtonInsetBlockEnd:n,floatButtonInsetInlineEnd:r});return [dK(s),fK(s),My(e)]},mK,{order:-998}),vp="float-btn",pK=f.forwardRef((e,t)=>{const{prefixCls:n,className:r,rootClassName:o,style:i,type:s="default",shape:a="circle",icon:l,description:c,content:u,tooltip:d,badge:m={},classNames:p,styles:h,...g}=e,{getPrefixCls:b,direction:y}=f.useContext(ot),C=f.useContext(am),x=b(vp,n),w=sn(x),{shape:S,individual:I,classNames:$,styles:E}=C||{},P=S||a,M=I??true,N=u??c,A={...e,type:s,shape:P},[k,R]=b5(x,w),L=f.useMemo(()=>({icon:`${x}-icon`,content:`${x}-content`}),[x]),[V,_]=It([L,$,p],[E,h],{props:A}),z=!N&&!l?f.createElement(p5,null):l,[D]=Us("FloatButton",i?.zIndex),W={...i,zIndex:D},O=Zt(m,["title","children","status","text"]),B="badge"in e&&f.createElement(bp,{...O,className:H(O.className,`${x}-badge`,{[`${x}-badge-dot`]:O.dot})}),j=XG(d);let Y=f.createElement(Je,{...g,ref:t,className:H(k,R,w,x,r,o,`${x}-${s}`,`${x}-${P}`,{[`${x}-rtl`]:y==="rtl",[`${x}-individual`]:M,[`${x}-icon-only`]:!N}),classNames:V,styles:_,style:W,shape:P,type:s,size:"large",icon:z,_skipSemantic:true},N,B);return j&&(Y=f.createElement(Zi,{...j},Y)),Y}),ea=pK,hK=f.createElement(jG,null),v5=f.forwardRef((e,t)=>{const{backTopIcon:n}=St("floatButton"),{prefixCls:r,className:o,type:i="default",shape:s="circle",visibilityHeight:a=400,icon:l,target:c,onClick:u,duration:d=450,...m}=e,p=l??n??hK,[h,g]=f.useState(a===0),b=f.useRef(null);f.useImperativeHandle(t,()=>({nativeElement:b.current}));const y=()=>b.current?.ownerDocument||window,C=UG(M=>{const N=m5(M.target);g(N>=a);});f.useEffect(()=>{const N=(c||y)();return C({target:N}),N?.addEventListener("scroll",C),()=>{C.cancel(),N?.removeEventListener("scroll",C);}},[c]);const x=M=>{qG(0,{getContainer:c||y,duration:d}),u?.(M);},{getPrefixCls:w}=f.useContext(ot),S=w(vp,r),I=w(),E=f.useContext(am)?.shape||s,P={prefixCls:S,icon:p,type:i,shape:E,...m};return f.createElement(er,{visible:h,motionName:`${I}-fade`},({className:M},N)=>f.createElement(ea,{ref:In(b,N),...P,onClick:x,className:H(o,M)}))}),y5=["wrap","nowrap","wrap-reverse"],C5=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],x5=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],gK=(e,t)=>{const n=t.wrap===true?"wrap":t.wrap;return {[`${e}-wrap-${n}`]:n&&y5.includes(n)}},bK=(e,t)=>{const n={};return x5.forEach(r=>{n[`${e}-align-${r}`]=t.align===r;}),n[`${e}-align-stretch`]=!t.align&&!!t.vertical,n},vK=(e,t)=>{const n={};return C5.forEach(r=>{n[`${e}-justify-${r}`]=t.justify===r;}),n},yK=(e,t)=>H({...gK(e,t),...bK(e,t),...vK(e,t)}),CK=e=>{const{componentCls:t}=e;return {[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},xK=e=>{const{componentCls:t}=e;return {[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},wK=e=>{const{componentCls:t}=e,n={};return y5.forEach(r=>{n[`${t}-wrap-${r}`]={flexWrap:r};}),n},SK=e=>{const{componentCls:t}=e,n={};return x5.forEach(r=>{n[`${t}-align-${r}`]={alignItems:r};}),n},$K=e=>{const{componentCls:t}=e,n={};return C5.forEach(r=>{n[`${t}-justify-${r}`]={justifyContent:r};}),n},EK=()=>({}),IK=xt("Flex",e=>{const{paddingXS:t,padding:n,paddingLG:r}=e,o=vt(e,{flexGapSM:t,flexGap:n,flexGapLG:r});return [CK(o),xK(o),wK(o),SK(o),$K(o)]},EK,{resetStyle:false}),PK=f.forwardRef((e,t)=>{const{prefixCls:n,rootClassName:r,className:o,style:i,flex:s,gap:a,vertical:l,orientation:c,component:u="div",children:d,...m}=e,{flex:p,direction:h,getPrefixCls:g}=f.useContext(ot),b=g("flex",n),[y,C]=IK(b),[,x]=qs(c,l??p?.vertical),w=H(o,r,p?.className,b,y,C,yK(b,e),{[`${b}-rtl`]:h==="rtl",[`${b}-gap-${a}`]:qf(a),[`${b}-vertical`]:x}),S={...p?.style,...i};return kn(s)&&(S.flex=s),kn(a)&&!qf(a)&&(S.gap=a),f.createElement(u,{ref:t,className:w,style:S,...Zt(m,["justify","wrap","align"])},d)}),w5=e=>{const{prefixCls:t,className:n,style:r,classNames:o,styles:i,rootClassName:s,shape:a="circle",type:l="default",placement:c,icon:u=f.createElement(p5,null),closeIcon:d,trigger:m,children:p,onOpenChange:h,open:g,onClick:b,...y}=e,{direction:C,getPrefixCls:x,closeIcon:w,classNames:S,styles:I,className:$,style:E}=St("floatButtonGroup"),P=d??w??f.createElement(ai,null),M=x(vp,t),N=sn(M),[A,k]=b5(M,N),R=`${M}-group`,L=m&&["click","hover"].includes(m),[V]=Us("FloatButton",r?.zIndex),_=f.useRef(null),z=["top","left","right","bottom"].includes(c)?c:"top",[D,W]=Bt(false,g),O=m==="hover",B=m==="click",j=lt(te=>{D!==te&&(W(te),h?.(te));}),Y=()=>{O&&j(true);},q=()=>{O&&j(false);},U=te=>{B&&j(!D),b?.(te);};f.useEffect(()=>{if(B){const te=ce=>{_.current?.contains(ce.target)||j(false);};return document.addEventListener("click",te,{capture:true}),()=>document.removeEventListener("click",te,{capture:true})}},[B]);const K=a==="circle",J={...e,shape:a,type:l,placement:z},[Q,G]=It([S,o],[I,i],{props:J}),ee=f.useMemo(()=>({shape:a,individual:K,classNames:{root:Q.item,icon:Q.itemIcon,content:Q.itemContent},styles:{root:G.item,icon:G.itemIcon,content:G.itemContent}}),[a,K,Q,G]),re=f.useMemo(()=>({...ee,individual:true,classNames:{root:Q.trigger,icon:Q.triggerIcon,content:Q.triggerContent},styles:{root:G.trigger,icon:G.triggerIcon,content:G.triggerContent}}),[ee,Q,G]);let oe;const be=`${R}-list`,Z=te=>{const ce=z==="top"||z==="bottom",ue={className:H(be,Q.list,te),style:G.list};return K?oe=f.createElement(PK,{vertical:ce,...ue},p):oe=f.createElement(Fr.Compact,{vertical:ce,...ue},p),oe};return f.createElement(am.Provider,{value:ee},f.createElement("div",{className:H(R,A,k,N,$,Q.root,n,s,{[`${R}-rtl`]:C==="rtl",[`${R}-individual`]:K,[`${R}-${z}`]:L,[`${R}-menu-mode`]:L}),style:{...E,zIndex:V,...G.root,...r},ref:_,onMouseEnter:Y,onMouseLeave:q},L?f.createElement(er,{visible:D,motionName:`${be}-motion`},({className:te})=>Z(te)):Z(),L&&f.createElement(am.Provider,{value:re},f.createElement(ea,{type:l,icon:D?P:u,"aria-label":e["aria-label"],className:`${R}-trigger`,onClick:U,...y}))))},z$=({backTop:e,...t})=>e?f__namespace.createElement(v5,{...t,visibilityHeight:0}):f__namespace.createElement(ea,{...t}),NK=({className:e,items:t,classNames:n,styles:r,prefixCls:o,...i})=>{const{getPrefixCls:s}=f__namespace.useContext(ot),l=`${s(vp,o)}-pure`;return t?f__namespace.createElement(w5,{className:H(e,l),classNames:n,styles:r,...i},t.map((c,u)=>f__namespace.createElement(z$,{key:u,...c}))):f__namespace.createElement(z$,{className:H(e,l),classNames:n,styles:r,...i})};ea.BackTop=v5;ea.Group=w5;ea._InternalPanelDoNotUseOrYouWillBeFired=NK;var MK={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};function Tv(){return Tv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Tv.apply(this,arguments)}const RK=(e,t)=>f__namespace.createElement(on,Tv({},e,{ref:t,icon:MK})),S5=f__namespace.forwardRef(RK);var Ql={exports:{}},_$;function AK(){if(_$)return Ql.exports;_$=1,Ql.exports=r,Ql.exports.isMobile=r,Ql.exports.default=r;const e=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,t=/CrOS/,n=/android|ipad|playbook|silk/i;function r(o){o||(o={});let i=o.ua;if(!i&&typeof navigator<"u"&&(i=navigator.userAgent),i&&i.headers&&typeof i.headers["user-agent"]=="string"&&(i=i.headers["user-agent"]),typeof i!="string")return false;let s=e.test(i)&&!t.test(i)||!!o.tablet&&n.test(i);return !s&&o.tablet&&o.featureDetect&&navigator&&navigator.maxTouchPoints>1&&i.indexOf("Macintosh")!==-1&&i.indexOf("Safari")!==-1&&(s=true),s}return Ql.exports}var TK=AK();const OK=vr(TK);let fg;const FK=()=>(typeof fg>"u"&&(fg=OK()),fg),U1=f.createContext(null),LK=e=>{const{activeTabOffset:t,horizontal:n,rtl:r,indicator:o={}}=e,{size:i,align:s="center"}=o,[a,l]=f.useState(),c=f.useRef(),u=f.useCallback(m=>typeof i=="function"?i(m):typeof i=="number"?i:m,[i]);function d(){gt.cancel(c.current);}return f.useEffect(()=>{const m={};if(t)if(n){m.width=u(t.width);const p=r?"right":"left";s==="start"&&(m[p]=t[p]),s==="center"&&(m[p]=t[p]+t.width/2,m.transform=r?"translateX(50%)":"translateX(-50%)"),s==="end"&&(m[p]=t[p]+t.width,m.transform="translateX(-100%)");}else m.height=u(t.height),s==="start"&&(m.top=t.top),s==="center"&&(m.top=t.top+t.height/2,m.transform="translateY(-50%)"),s==="end"&&(m.top=t.top+t.height,m.transform="translateY(-100%)");return d(),c.current=gt(()=>{a&&m&&Object.keys(m).every(h=>{const g=m[h],b=a[h];return typeof g=="number"&&typeof b=="number"?Math.round(g)===Math.round(b):g===b})||l(m);}),d},[JSON.stringify(t),n,r,s,u]),{style:a}},H$={width:0,height:0,left:0,top:0};function BK(e,t,n){return f.useMemo(()=>{const r=new Map,o=t.get(e[0]?.key)||H$,i=o.left+o.width;for(let s=0;s<e.length;s+=1){const{key:a}=e[s];let l=t.get(a);l||(l=t.get(e[s-1]?.key)||H$);const c=r.get(a)||{...l};c.right=i-c.left-c.width,r.set(a,c);}return r},[e.map(r=>r.key).join("_"),t,n])}function V$(e,t){const n=f__namespace.useRef(e),[,r]=f__namespace.useState({});function o(i){const s=typeof i=="function"?i(n.current):i;s!==n.current&&t(s,n.current),n.current=s,r({});}return [n.current,o]}const kK=.1,j$=.01,Cf=20,W$=.995**Cf;function DK(e,t){const[n,r]=f.useState(),[o,i]=f.useState(0),[s,a]=f.useState(0),[l,c]=f.useState(),u=f.useRef();function d(y){const{screenX:C,screenY:x}=y.touches[0];r({x:C,y:x}),window.clearInterval(u.current);}function m(y){if(!n)return;const{screenX:C,screenY:x}=y.touches[0];r({x:C,y:x});const w=C-n.x,S=x-n.y;t(w,S);const I=Date.now();i(I),a(I-o),c({x:w,y:S});}function p(){if(n&&(r(null),c(null),l)){const y=l.x/s,C=l.y/s,x=Math.abs(y),w=Math.abs(C);if(Math.max(x,w)<kK)return;let S=y,I=C;u.current=window.setInterval(()=>{if(Math.abs(S)<j$&&Math.abs(I)<j$){window.clearInterval(u.current);return}S*=W$,I*=W$,t(S*Cf,I*Cf);},Cf);}}const h=f.useRef();function g(y){const{deltaX:C,deltaY:x}=y;let w=0;const S=Math.abs(C),I=Math.abs(x);S===I?w=h.current==="x"?C:x:S>I?(w=C,h.current="x"):(w=x,h.current="y"),t(-w,-w)&&y.preventDefault();}const b=f.useRef(null);b.current={onTouchStart:d,onTouchMove:m,onTouchEnd:p,onWheel:g},f__namespace.useEffect(()=>{function y(S){b.current.onTouchStart(S);}function C(S){b.current.onTouchMove(S);}function x(S){b.current.onTouchEnd(S);}function w(S){b.current.onWheel(S);}return document.addEventListener("touchmove",C,{passive:false}),document.addEventListener("touchend",x,{passive:true}),e.current.addEventListener("touchstart",y,{passive:true}),e.current.addEventListener("wheel",w,{passive:false}),()=>{document.removeEventListener("touchmove",C),document.removeEventListener("touchend",x);}},[]);}function $5(e){const[t,n]=f.useState(0),r=f.useRef(0),o=f.useRef();return o.current=e,Xd(()=>{o.current?.();},[t]),()=>{r.current===t&&(r.current+=1,n(r.current));}}function zK(e){const t=f.useRef([]),[,n]=f.useState({}),r=f.useRef(typeof e=="function"?e():e),o=$5(()=>{let s=r.current;t.current.forEach(a=>{s=a(s);}),t.current=[],r.current=s,n({});});function i(s){t.current.push(s),o();}return [r.current,i]}const q$={width:0,height:0,left:0,top:0,right:0};function _K(e,t,n,r,o,i,{tabs:s,tabPosition:a,rtl:l}){let c,u,d;return ["top","bottom"].includes(a)?(c="width",u=l?"right":"left",d=Math.abs(n)):(c="height",u="top",d=-n),f.useMemo(()=>{if(!s.length)return [0,0];const m=s.length;let p=m;for(let g=0;g<m;g+=1){const b=e.get(s[g].key)||q$;if(Math.floor(b[u]+b[c])>Math.floor(d+t)){p=g-1;break}}let h=0;for(let g=m-1;g>=0;g-=1)if((e.get(s[g].key)||q$)[u]<d){h=g+1;break}return h>p?[0,-1]:[h,p]},[e,t,r,o,i,d,a,s.map(m=>m.key).join("_"),l])}function U$(e){let t;return e instanceof Map?(t={},e.forEach((n,r)=>{t[r]=n;})):t=e,JSON.stringify(t)}const HK="TABS_DQ";function E5(e){return String(e).replace(/"/g,HK)}function G1(e,t,n,r){return !(!n||r||e===false||e===void 0&&(t===false||t===null))}const I5=f__namespace.forwardRef((e,t)=>{const{prefixCls:n,editable:r,locale:o,style:i}=e;return !r||r.showAdd===false?null:f__namespace.createElement("button",{ref:t,type:"button",className:`${n}-nav-add`,style:i,"aria-label":o?.addAriaLabel||"Add tab",onClick:s=>{r.onEdit("add",{event:s});}},r.addIcon||"+")}),G$=f__namespace.forwardRef((e,t)=>{const{position:n,prefixCls:r,extra:o}=e;if(!o)return null;let i,s={};return typeof o=="object"&&!f__namespace.isValidElement(o)?s=o:s.right=o,n==="right"&&(i=s.right),n==="left"&&(i=s.left),i?f__namespace.createElement("div",{className:`${r}-extra-content`,ref:t},i):null});function Ov(){return Ov=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Ov.apply(this,arguments)}const VK=f__namespace.forwardRef((e,t)=>{const{prefixCls:n,id:r,tabs:o,locale:i,mobile:s,more:a={},style:l,className:c,editable:u,tabBarGutter:d,rtl:m,removeAriaLabel:p,onTabClick:h,getPopupContainer:g,popupClassName:b,popupStyle:y}=e,[C,x]=f.useState(false),[w,S]=f.useState(null),{icon:I="More"}=a,$=`${r}-more-popup`,E=`${n}-dropdown`,P=w!==null?`${$}-${w}`:null,M=i?.dropdownAriaLabel;function N(z,D){z.preventDefault(),z.stopPropagation(),u.onEdit("remove",{key:D,event:z});}const A=f__namespace.createElement(yl,{onClick:({key:z,domEvent:D})=>{h(z,D),x(false);},prefixCls:`${E}-menu`,id:$,tabIndex:-1,role:"listbox","aria-activedescendant":P,selectedKeys:[w],"aria-label":M!==void 0?M:"expanded dropdown"},o.map(z=>{const{closable:D,disabled:W,closeIcon:O,key:B,label:j}=z,Y=G1(D,O,u,W);return f__namespace.createElement(Du,{key:B,id:`${$}-${B}`,role:"option","aria-controls":r&&`${r}-panel-${B}`,disabled:W},f__namespace.createElement("span",null,j),Y&&f__namespace.createElement("button",{type:"button","aria-label":p||"remove",tabIndex:0,className:`${E}-menu-item-remove`,onClick:q=>{q.stopPropagation(),N(q,B);}},O||u.removeIcon||"×"))}));function k(z){const D=o.filter(B=>!B.disabled);let W=D.findIndex(B=>B.key===w)||0;const O=D.length;for(let B=0;B<O;B+=1){W=(W+z+O)%O;const j=D[W];if(!j.disabled){S(j.key);return}}}function R(z){const{which:D}=z;if(!C){[_e.DOWN,_e.SPACE,_e.ENTER].includes(D)&&(x(true),z.preventDefault());return}switch(D){case _e.UP:k(-1),z.preventDefault();break;case _e.DOWN:k(1),z.preventDefault();break;case _e.ESC:x(false);break;case _e.SPACE:case _e.ENTER:w!==null&&h(w,z);break}}f.useEffect(()=>{const z=document.getElementById(P);z?.scrollIntoView&&z.scrollIntoView(false);},[P,w]),f.useEffect(()=>{C||S(null);},[C]);const L={marginInlineStart:d};o.length||(L.visibility="hidden",L.order=1);const V=H(b,{[`${E}-rtl`]:m}),_=s?null:f__namespace.createElement(H6,Ov({prefixCls:E,overlay:A,visible:o.length?C:false,onVisibleChange:x,overlayClassName:V,overlayStyle:y,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:g},a),f__namespace.createElement("button",{type:"button",className:`${n}-nav-more`,style:L,"aria-haspopup":"listbox","aria-controls":$,id:`${r}-more`,"aria-expanded":C,onKeyDown:R},I));return f__namespace.createElement("div",{className:H(`${n}-nav-operations`,c),style:l,ref:t},_,f__namespace.createElement(I5,{prefixCls:n,locale:i,editable:u}))}),jK=f__namespace.memo(VK,(e,t)=>t.tabMoving),WK=e=>{const{prefixCls:t,id:n,active:r,focus:o,tab:{key:i,label:s,disabled:a,closeIcon:l,icon:c},closable:u,renderWrapper:d,removeAriaLabel:m,editable:p,onClick:h,onFocus:g,onBlur:b,onKeyDown:y,onMouseDown:C,onMouseUp:x,style:w,className:S,tabCount:I,currentPosition:$}=e,E=`${t}-tab`,P=G1(u,l,p,a);function M(L){a||h(L);}function N(L){L.preventDefault(),L.stopPropagation(),p.onEdit("remove",{key:i,event:L});}const A=f__namespace.useMemo(()=>c&&typeof s=="string"?f__namespace.createElement("span",null,s):s,[s,c]),k=f__namespace.useRef(null);f__namespace.useEffect(()=>{o&&k.current&&k.current.focus();},[o]);const R=f__namespace.createElement("div",{key:i,"data-node-key":E5(i),className:H(E,S,{[`${E}-with-remove`]:P,[`${E}-active`]:r,[`${E}-disabled`]:a,[`${E}-focus`]:o}),style:w,onClick:M},f__namespace.createElement("div",{ref:k,role:"tab","aria-selected":r,id:n&&`${n}-tab-${i}`,className:`${E}-btn`,"aria-controls":n&&`${n}-panel-${i}`,"aria-disabled":a,tabIndex:a?null:r?0:-1,onClick:L=>{L.stopPropagation(),M(L);},onKeyDown:y,onMouseDown:C,onMouseUp:x,onFocus:g,onBlur:b},o&&f__namespace.createElement("div",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},`Tab ${$} of ${I}`),c&&f__namespace.createElement("span",{className:`${E}-icon`},c),s&&A),P&&f__namespace.createElement("button",{type:"button","aria-label":m||"remove",tabIndex:r?0:-1,className:`${E}-remove`,onClick:L=>{L.stopPropagation(),N(L);}},l||p.removeIcon||"×"));return d?d(R):R};function Fv(){return Fv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Fv.apply(this,arguments)}const qK=(e,t)=>{const{offsetWidth:n,offsetHeight:r,offsetTop:o,offsetLeft:i}=e,{width:s,height:a,left:l,top:c}=e.getBoundingClientRect();return Math.abs(s-n)<1?[s,a,l-t.left,c-t.top]:[n,r,i,o]},ya=e=>{const{offsetWidth:t=0,offsetHeight:n=0}=e.current||{};if(e.current){const{width:r,height:o}=e.current.getBoundingClientRect();if(Math.abs(r-t)<1)return [r,o]}return [t,n]},Ld=(e,t)=>e[t?0:1],K$=f__namespace.forwardRef((e,t)=>{const{className:n,style:r,id:o,animated:i,activeKey:s,rtl:a,extra:l,editable:c,locale:u,tabPosition:d,tabBarGutter:m,children:p,onTabClick:h,onTabScroll:g,indicator:b,classNames:y,styles:C}=e,{prefixCls:x,tabs:w}=f__namespace.useContext(U1),S=f.useRef(null),I=f.useRef(null),$=f.useRef(null),E=f.useRef(null),P=f.useRef(null),M=f.useRef(null),N=f.useRef(null),A=d==="top"||d==="bottom",[k,R]=V$(0,(se,Ce)=>{A&&g&&g({direction:se>Ce?"left":"right"});}),[L,V]=V$(0,(se,Ce)=>{!A&&g&&g({direction:se>Ce?"top":"bottom"});}),[_,z]=f.useState([0,0]),[D,W]=f.useState([0,0]),[O,B]=f.useState([0,0]),[j,Y]=f.useState([0,0]),[q,U]=zK(new Map),K=BK(w,q,D[0]),J=Ld(_,A),Q=Ld(D,A),G=Ld(O,A),ee=Ld(j,A),re=Math.floor(J)<Math.floor(Q+G),oe=re?J-ee:J-G,be=`${x}-nav-operations-hidden`;let Z=0,te=0;A&&a?(Z=0,te=Math.max(0,Q-oe)):(Z=Math.min(0,oe-Q),te=0);function ce(se){return se<Z?Z:se>te?te:se}const ue=f.useRef(null),[he,ye]=f.useState();function pe(){ye(Date.now());}function ie(){ue.current&&clearTimeout(ue.current);}DK(E,(se,Ce)=>{function fe(xe,Oe){xe(We=>ce(We+Oe));}return re?(A?fe(R,se):fe(V,Ce),ie(),pe(),true):false}),f.useEffect(()=>(ie(),he&&(ue.current=setTimeout(()=>{ye(0);},100)),ie),[he]);const[ge,Se]=_K(K,oe,A?k:L,Q,G,ee,{...e,tabs:w}),ke=lt((se=s)=>{const Ce=K.get(se)||{width:0,height:0,left:0,right:0,top:0};if(A){let fe=k;a?Ce.right<k?fe=Ce.right:Ce.right+Ce.width>k+oe&&(fe=Ce.right+Ce.width-oe):Ce.left<-k?fe=-Ce.left:Ce.left+Ce.width>-k+oe&&(fe=-(Ce.left+Ce.width-oe)),V(0),R(ce(fe));}else {let fe=L;Ce.top<-L?fe=-Ce.top:Ce.top+Ce.height>-L+oe&&(fe=-(Ce.top+Ce.height-oe)),R(0),V(ce(fe));}}),[qe,De]=f.useState(),[ze,je]=f.useState(false),Le=w.filter(se=>!se.disabled).map(se=>se.key),we=se=>{const Ce=Le.indexOf(qe||s),fe=Le.length,xe=(Ce+se+fe)%fe,Oe=Le[xe];De(Oe);},Me=(se,Ce)=>{const fe=Le.indexOf(se),xe=w.find(We=>We.key===se);G1(xe?.closable,xe?.closeIcon,c,xe?.disabled)&&(Ce.preventDefault(),Ce.stopPropagation(),c.onEdit("remove",{key:se,event:Ce}),fe===Le.length-1?we(-1):we(1));},Fe=(se,Ce)=>{je(true),Ce.button===1&&Me(se,Ce);},Re=se=>{const{code:Ce}=se,fe=a&&A,xe=Le[0],Oe=Le[Le.length-1];switch(Ce){case "ArrowLeft":{A&&we(fe?1:-1);break}case "ArrowRight":{A&&we(fe?-1:1);break}case "ArrowUp":{se.preventDefault(),A||we(-1);break}case "ArrowDown":{se.preventDefault(),A||we(1);break}case "Home":{se.preventDefault(),De(xe);break}case "End":{se.preventDefault(),De(Oe);break}case "Enter":case "Space":{se.preventDefault(),h(qe??s,se);break}case "Backspace":case "Delete":{Me(qe,se);break}}},Pe={};A?Pe.marginInlineStart=m:Pe.marginTop=m;const Qe=w.map((se,Ce)=>{const{key:fe}=se;return f__namespace.createElement(WK,{id:o,prefixCls:x,key:fe,tab:se,className:y?.item,style:Ce===0?C?.item:{...Pe,...C?.item},closable:se.closable,editable:c,active:fe===s,focus:fe===qe,renderWrapper:p,removeAriaLabel:u?.removeAriaLabel,tabCount:Le.length,currentPosition:Ce+1,onClick:xe=>{h(fe,xe);},onKeyDown:Re,onFocus:()=>{ze||De(fe),ke(fe),pe(),E.current&&(a||(E.current.scrollLeft=0),E.current.scrollTop=0);},onBlur:()=>{De(void 0);},onMouseDown:xe=>Fe(fe,xe),onMouseUp:()=>{je(false);}})}),mt=()=>U(()=>{const se=new Map,Ce=P.current?.getBoundingClientRect();return w.forEach(({key:fe})=>{const xe=P.current?.querySelector(`[data-node-key="${E5(fe)}"]`);if(xe){const[Oe,We,Ze,st]=qK(xe,Ce);se.set(fe,{width:Oe,height:We,left:Ze,top:st});}}),se});f.useEffect(()=>{mt();},[w.map(se=>se.key).join("_")]);const it=$5(()=>{const se=ya(S),Ce=ya(I),fe=ya($);z([se[0]-Ce[0]-fe[0],se[1]-Ce[1]-fe[1]]);const xe=ya(N);B(xe);const Oe=ya(M);Y(Oe);const We=ya(P);W([We[0]-xe[0],We[1]-xe[1]]),mt();}),ct=w.slice(0,ge),bt=w.slice(Se+1),pt=[...ct,...bt],rt=K.get(s),{style:et}=LK({activeTabOffset:rt,horizontal:A,indicator:b,rtl:a});f.useEffect(()=>{ke();},[s,Z,te,U$(rt),U$(K),A]),f.useEffect(()=>{it();},[a]);const Xe=!!pt.length,Ie=`${x}-nav-wrap`;let Ne,ae,ve,de;return A?a?(ae=k>0,Ne=k!==te):(Ne=k<0,ae=k!==Z):(ve=L<0,de=L!==Z),f__namespace.createElement(Kr,{onResize:it},f__namespace.createElement("div",{ref:Hs(t,S),role:"tablist","aria-orientation":A?"horizontal":"vertical",className:H(`${x}-nav`,n,y?.header),style:{...C?.header,...r},onKeyDown:()=>{pe();}},f__namespace.createElement(G$,{ref:I,position:"left",extra:l,prefixCls:x}),f__namespace.createElement(Kr,{onResize:it},f__namespace.createElement("div",{className:H(Ie,{[`${Ie}-ping-left`]:Ne,[`${Ie}-ping-right`]:ae,[`${Ie}-ping-top`]:ve,[`${Ie}-ping-bottom`]:de}),ref:E},f__namespace.createElement(Kr,{onResize:it},f__namespace.createElement("div",{ref:P,className:`${x}-nav-list`,style:{transform:`translate(${k}px, ${L}px)`,transition:he?"none":void 0}},Qe,f__namespace.createElement(I5,{ref:N,prefixCls:x,locale:u,editable:c,style:{...Qe.length===0?void 0:Pe,visibility:Xe?"hidden":null}}),f__namespace.createElement("div",{className:H(`${x}-ink-bar`,y?.indicator,{[`${x}-ink-bar-animated`]:i.inkBar}),style:{...et,...C?.indicator}}))))),f__namespace.createElement(jK,Fv({},e,{removeAriaLabel:u?.removeAriaLabel,ref:M,prefixCls:x,tabs:pt,className:!Xe&&be,popupStyle:C?.popup,tabMoving:!!he})),f__namespace.createElement(G$,{ref:$,position:"right",extra:l,prefixCls:x})))}),UK=({renderTabBar:e,...t})=>e?e(t,K$):f__namespace.createElement(K$,t),GK=f__namespace.forwardRef((e,t)=>{const{prefixCls:n,className:r,style:o,id:i,active:s,tabKey:a,children:l}=e,c=f__namespace.Children.count(l)>0;return f__namespace.createElement("div",{id:i&&`${i}-panel-${a}`,role:"tabpanel",tabIndex:s&&c?0:-1,"aria-labelledby":i&&`${i}-tab-${a}`,"aria-hidden":!s,style:o,className:H(n,s&&`${n}-active`,r),ref:t},l)});function lm(){return lm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},lm.apply(this,arguments)}const KK=e=>{const{id:t,activeKey:n,animated:r,tabPosition:o,destroyOnHidden:i,contentStyle:s,contentClassName:a}=e,{prefixCls:l,tabs:c}=f__namespace.useContext(U1),u=r.tabPane,d=`${l}-tabpane`;return f__namespace.createElement("div",{className:H(`${l}-content-holder`)},f__namespace.createElement("div",{className:H(`${l}-content`,`${l}-content-${o}`,{[`${l}-content-animated`]:u})},c.map(m=>{const{key:p,forceRender:h,style:g,className:b,destroyOnHidden:y,...C}=m,x=p===n;return f__namespace.createElement(er,lm({key:p,visible:x,forceRender:h,removeOnLeave:!!(i??y),leavedClassName:`${d}-hidden`},r.tabPaneMotion),({style:w,className:S},I)=>f__namespace.createElement(GK,lm({},C,{prefixCls:d,id:t,tabKey:p,animated:u,active:x,style:{...s,...g,...w},className:H(a,b,S),ref:I})))})))};function XK(e={inkBar:true,tabPane:false}){let t;return e===false?t={inkBar:false,tabPane:false}:e===true?t={inkBar:true,tabPane:false}:t={inkBar:true,...typeof e=="object"?e:{}},t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=true),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=false),t}function Sc(){return Sc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Sc.apply(this,arguments)}let X$=0;const YK=f__namespace.forwardRef((e,t)=>{const{id:n,prefixCls:r="rc-tabs",className:o,items:i,direction:s,activeKey:a,defaultActiveKey:l,editable:c,animated:u,tabPosition:d="top",tabBarGutter:m,tabBarStyle:p,tabBarExtraContent:h,locale:g,more:b,destroyOnHidden:y,renderTabBar:C,onChange:x,onTabClick:w,onTabScroll:S,getPopupContainer:I,popupClassName:$,indicator:E,classNames:P,styles:M,...N}=e,A=f__namespace.useMemo(()=>(i||[]).filter(K=>K&&typeof K=="object"&&"key"in K),[i]),k=s==="rtl",R=XK(u),[L,V]=f.useState(false);f.useEffect(()=>{V(FK());},[]);const[_,z]=Bt(l??A[0]?.key,a),[D,W]=f.useState(()=>A.findIndex(K=>K.key===_));f.useEffect(()=>{let K=A.findIndex(J=>J.key===_);K===-1&&(K=Math.max(0,Math.min(D,A.length-1)),z(A[K]?.key)),W(K);},[A.map(K=>K.key).join("_"),_,D]);const[O,B]=Bt(null,n);f.useEffect(()=>{n||(B(`rc-tabs-${X$}`),X$+=1);},[]);function j(K,J){w?.(K,J);const Q=K!==_;z(K),Q&&x?.(K);}const Y={id:O,activeKey:_,animated:R,tabPosition:d,rtl:k,mobile:L},q={...Y,editable:c,locale:g,more:b,tabBarGutter:m,onTabClick:j,onTabScroll:S,extra:h,style:p,getPopupContainer:I,popupClassName:H($,P?.popup),indicator:E,styles:M,classNames:P},U=f__namespace.useMemo(()=>({tabs:A,prefixCls:r}),[A,r]);return f__namespace.createElement(U1.Provider,{value:U},f__namespace.createElement("div",Sc({ref:t,id:n,className:H(r,`${r}-${d}`,{[`${r}-mobile`]:L,[`${r}-editable`]:c,[`${r}-rtl`]:k},o)},N),f__namespace.createElement(UK,Sc({},q,{renderTabBar:C})),f__namespace.createElement(KK,Sc({destroyOnHidden:y},Y,{contentStyle:M?.content,contentClassName:P?.content,animated:R}))))}),QK={motionAppear:false,motionEnter:true,motionLeave:true};function ZK(e,t={inkBar:true,tabPane:false}){let n;return t===false?n={inkBar:false,tabPane:false}:t===true?n={inkBar:true,tabPane:true}:n={inkBar:true,...typeof t=="object"?t:{}},n.tabPane&&(n.tabPaneMotion={...QK,motionName:Vi(e,"switch")}),n}function JK(e){return e.filter(t=>t)}function eX(e,t){if(e)return e.map(r=>({...r,destroyOnHidden:r.destroyOnHidden??r.destroyInactiveTabPane}));const n=gr(t).map(r=>{if(f__namespace.isValidElement(r)){const{key:o,props:i}=r,{tab:s,...a}=i||{};return {key:String(o),...a,label:s}}return null});return JK(n)}const tX=e=>{const{componentCls:t,motionDurationSlow:n}=e;return [{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[ji(e,"slide-up"),ji(e,"slide-down")]]},nX=e=>{const{componentCls:t,tabsCardPadding:n,cardBg:r,cardGutter:o,colorBorderSecondary:i,itemSelectedColor:s}=e;return {[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:r,border:`${X(e.lineWidth)} ${e.lineType} ${i}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:s,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:Bo(e,-3),[`& ${t}-tab${t}-tab-focus ${t}-tab-btn:focus-visible`]:{outline:"none"},[`${t}-ink-bar`]:{visibility:"hidden"}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:true,value:X(o)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:X(o)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:true,value:`${X(e.borderRadiusLG)} 0 0 ${X(e.borderRadiusLG)}`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:true,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:true,value:`0 ${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:true,value:e.colorBgContainer}}}}}}},rX=e=>{const{componentCls:t,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=e;return {[`${t}-dropdown`]:{...Lt(e),position:"absolute",top:-9999,left:{_skip_check_:true,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${X(r)} 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:true,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":{...Lo,display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${X(e.paddingXXS)} ${X(e.paddingSM)}`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:true,value:e.marginSM},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}}}}}},oX=e=>{const{componentCls:t,margin:n,colorBorderSecondary:r,horizontalMargin:o,verticalItemPadding:i,verticalItemMargin:s,calc:a}=e;return {[`${t}-top, ${t}-bottom`]:{flexDirection:"column",[`> ${t}-nav, > div > ${t}-nav`]:{margin:o,"&::before":{position:"absolute",right:{_skip_check_:true,value:0},left:{_skip_check_:true,value:0},borderBottom:`${X(e.lineWidth)} ${e.lineType} ${r}`,content:"''"},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:`width ${e.motionDurationSlow}, left ${e.motionDurationSlow},
right ${e.motionDurationSlow}`}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:true,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:true,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav,
> div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:"column",minWidth:a(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:i,textAlign:"center"},[`${t}-tab + ${t}-tab`]:{margin:s},[`${t}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:true,value:0},left:{_skip_check_:true,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:`height ${e.motionDurationSlow}, top ${e.motionDurationSlow}`}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:true,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:true,value:X(a(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:true,value:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:true,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:true,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:true,value:a(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:true,value:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:true,value:e.paddingLG}}}}}},iX=e=>{const{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:o,cardHeightLG:i,horizontalItemPaddingSM:s,horizontalItemPaddingLG:a}=e;return {[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:s,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:a,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:o,minHeight:o}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${X(e.borderRadius)} ${X(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${X(e.borderRadius)} ${X(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:true,value:`0 ${X(e.borderRadius)} ${X(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:true,value:`${X(e.borderRadius)} 0 0 ${X(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:i,minHeight:i}}}}}},sX=e=>{const{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:o,tabsHorizontalItemMargin:i,horizontalItemPadding:s,itemSelectedColor:a,itemColor:l}=e,c=`${t}-tab`;return {[c]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:s,fontSize:e.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:l,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:"none",transition:`all ${e.motionDurationSlow}`,[`${c}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM}},"&-remove":{flex:"none",lineHeight:1,marginRight:{_skip_check_:true,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:true,value:e.marginXS},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading},...Tr(e)},"&:hover":{color:r},[`&${c}-active ${c}-btn`]:{color:a},[`&${c}-focus ${c}-btn:focus-visible`]:Bo(e),[`&${c}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${c}-disabled ${c}-btn, &${c}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${c}-remove ${o}`]:{margin:0,verticalAlign:"middle"},[`${o}:not(:last-child)`]:{marginRight:{_skip_check_:true,value:e.marginSM}}},[`${c} + ${c}`]:{margin:{_skip_check_:true,value:i}}}},aX=e=>{const{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:o,calc:i}=e;return {[`${t}-rtl`]:{direction:"rtl",[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:true,value:n},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:true,value:0}},[r]:{marginRight:{_skip_check_:true,value:0},marginLeft:{_skip_check_:true,value:X(e.marginSM)}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:true,value:X(e.marginXS)},marginLeft:{_skip_check_:true,value:X(i(e.marginXXS).mul(-1).equal())},[r]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-content-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:true,value:o},marginLeft:{_skip_check_:true,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:"rtl"},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:true,value:"right"}}}}},lX=e=>{const{componentCls:t,tabsCardPadding:n,cardHeight:r,cardGutter:o,itemHoverColor:i,itemActiveColor:s,colorBorderSecondary:a}=e;return {[t]:{...Lt(e),display:"flex",[`> ${t}-nav, > div > ${t}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${t}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${t}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${t}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${t}-nav-more`]:{position:"relative",padding:n,background:"transparent",border:0,color:e.colorText,"&::after":{position:"absolute",right:{_skip_check_:true,value:0},bottom:0,left:{_skip_check_:true,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},[`${t}-nav-add`]:{minWidth:r,minHeight:r,marginLeft:{_skip_check_:true,value:o},background:"transparent",border:`${X(e.lineWidth)} ${e.lineType} ${a}`,borderRadius:`${X(e.borderRadiusLG)} ${X(e.borderRadiusLG)} 0 0`,outline:"none",cursor:"pointer",color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:i},"&:active, &:focus:not(:focus-visible)":{color:s},...Tr(e,-3)}},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.inkBarColor,pointerEvents:"none"},...sX(e),[`${t}-content`]:{position:"relative",width:"100%"},[`${t}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-tabpane`]:{...Tr(e),"&-hidden":{display:"none"}}},[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping']) > ${t}-nav-list`]:{margin:"auto"}}}}}},cX=e=>{const{cardHeight:t,cardHeightSM:n,cardHeightLG:r,controlHeight:o,controlHeightLG:i}=e,s=t||i,a=n||o,l=r||i+8;return {zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:s,cardHeightSM:a,cardHeightLG:l,cardPadding:`${(s-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(a-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(l-e.fontHeightLG)/2-e.lineWidth}px ${e.padding}px`,titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:`0 0 ${e.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${e.paddingSM}px 0`,horizontalItemPaddingSM:`${e.paddingXS}px 0`,horizontalItemPaddingLG:`${e.padding}px 0`,verticalItemPadding:`${e.paddingXS}px ${e.paddingLG}px`,verticalItemMargin:`${e.margin}px 0 0 0`,itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}},uX=xt("Tabs",e=>{const t=vt(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${X(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${X(e.horizontalItemGutter)}`});return [iX(t),aX(t),oX(t),rX(t),nX(t),lX(t),tX(t)]},cX),dX=()=>null,fX=f__namespace.forwardRef((e,t)=>{const{type:n,className:r,rootClassName:o,size:i,onEdit:s,hideAdd:a,centered:l,addIcon:c,removeIcon:u,moreIcon:d,more:m,popupClassName:p,children:h,items:g,animated:b,style:y,indicatorSize:C,indicator:x,classNames:w,styles:S,destroyInactiveTabPane:I,destroyOnHidden:$,tabPlacement:E,tabPosition:P,...M}=e,{prefixCls:N}=M,{getPrefixCls:A,direction:k,getPopupContainer:R,className:L,style:V,classNames:_,styles:z}=St("tabs"),{tabs:D}=f__namespace.useContext(ot),W=A("tabs",N),O=sn(W),[B,j]=uX(W,O),Y=f__namespace.useRef(null);f__namespace.useImperativeHandle(t,()=>({nativeElement:Y.current}));let q;n==="editable-card"&&(q={onEdit:(Z,{key:te,event:ce})=>{s?.(Z==="add"?ce:te,Z);},removeIcon:u??D?.removeIcon??f__namespace.createElement(ai,null),addIcon:(c??D?.addIcon)||f__namespace.createElement(S5,null),showAdd:a!==true});const U=A(),K=Vn(i),J=eX(g,h),Q=ZK(W,b),G={align:x?.align??D?.indicator?.align,size:x?.size??C??D?.indicator?.size??D?.indicatorSize},ee=f__namespace.useMemo(()=>{const Z=E??P??void 0,te=k==="rtl";switch(Z){case "start":return te?"right":"left";case "end":return te?"left":"right";default:return Z}},[E,P,k]),re={...e,size:K,tabPlacement:ee,items:J},[oe,be]=It([_,w],[z,S],{props:re},{popup:{_default:"root"}});return f__namespace.createElement(YK,{ref:Y,direction:k,getPopupContainer:R,...M,items:J,className:H({[`${W}-${K}`]:K,[`${W}-card`]:["card","editable-card"].includes(n),[`${W}-editable-card`]:n==="editable-card",[`${W}-centered`]:l},L,r,o,oe.root,B,j,O),classNames:{...oe,popup:H(p,B,j,O,oe.popup?.root)},styles:be,style:{...be.root,...V,...y},editable:q,more:{icon:D?.more?.icon??D?.moreIcon??d??f__namespace.createElement(d1,null),transitionName:`${U}-slide-up`,...m},prefixCls:W,animated:Q,indicator:G,destroyOnHidden:$??I,tabPosition:ee})}),P5=fX;P5.TabPane=dX;function Lv(e,t,n){return (e-t)/(n-t)}function K1(e,t,n,r){const o=Lv(t,n,r),i={};switch(e){case "rtl":i.right=`${o*100}%`,i.transform="translateX(50%)";break;case "btt":i.bottom=`${o*100}%`,i.transform="translateY(50%)";break;case "ttb":i.top=`${o*100}%`,i.transform="translateY(-50%)";break;default:i.left=`${o*100}%`,i.transform="translateX(-50%)";break}return i}function bs(e,t){return Array.isArray(e)?e[t]:e}const ta=f__namespace.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:true,styles:{},classNames:{}}),N5=f__namespace.createContext({});function Bv(){return Bv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Bv.apply(this,arguments)}const Y$=f__namespace.forwardRef((e,t)=>{const{prefixCls:n,value:r,valueIndex:o,onStartMove:i,onDelete:s,style:a,render:l,dragging:c,draggingDelete:u,onOffsetChange:d,onChangeComplete:m,onFocus:p,onMouseEnter:h,...g}=e,{min:b,max:y,direction:C,disabled:x,keyboard:w,range:S,tabIndex:I,ariaLabelForHandle:$,ariaLabelledByForHandle:E,ariaRequired:P,ariaValueTextFormatterForHandle:M,styles:N,classNames:A}=f__namespace.useContext(ta),k=`${n}-handle`,R=B=>{x||i(B,o);},L=B=>{p?.(B,o);},V=B=>{h(B,o);},_=B=>{if(!x&&w){let j=null;switch(B.which||B.keyCode){case _e.LEFT:j=C==="ltr"||C==="btt"?-1:1;break;case _e.RIGHT:j=C==="ltr"||C==="btt"?1:-1;break;case _e.UP:j=C!=="ttb"?1:-1;break;case _e.DOWN:j=C!=="ttb"?-1:1;break;case _e.HOME:j="min";break;case _e.END:j="max";break;case _e.PAGE_UP:j=2;break;case _e.PAGE_DOWN:j=-2;break;case _e.BACKSPACE:case _e.DELETE:s?.(o);break}j!==null&&(B.preventDefault(),d(j,o));}},z=B=>{switch(B.which||B.keyCode){case _e.LEFT:case _e.RIGHT:case _e.UP:case _e.DOWN:case _e.HOME:case _e.END:case _e.PAGE_UP:case _e.PAGE_DOWN:m?.();break}},D=K1(C,r,b,y);let W={};o!==null&&(W={tabIndex:x?null:bs(I,o),role:"slider","aria-valuemin":b,"aria-valuemax":y,"aria-valuenow":r,"aria-disabled":x,"aria-label":bs($,o),"aria-labelledby":bs(E,o),"aria-required":bs(P,o),"aria-valuetext":bs(M,o)?.(r),"aria-orientation":C==="ltr"||C==="rtl"?"horizontal":"vertical",onMouseDown:R,onTouchStart:R,onFocus:L,onMouseEnter:V,onKeyDown:_,onKeyUp:z});let O=f__namespace.createElement("div",Bv({ref:t,className:H(k,{[`${k}-${o+1}`]:o!==null&&S,[`${k}-dragging`]:c,[`${k}-dragging-delete`]:u},A.handle),style:{...D,...a,...N.handle}},W,g));return l&&(O=l(O,{index:o,prefixCls:n,value:r,dragging:c,draggingDelete:u})),O});function cm(){return cm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},cm.apply(this,arguments)}const mX=f__namespace.forwardRef((e,t)=>{const{prefixCls:n,style:r,onStartMove:o,onOffsetChange:i,values:s,handleRender:a,activeHandleRender:l,draggingIndex:c,draggingDelete:u,onFocus:d,...m}=e,p=f__namespace.useRef({}),[h,g]=f__namespace.useState(false),[b,y]=f__namespace.useState(-1),C=I=>{y(I),g(true);},x=(I,$)=>{C($),d?.(I);},w=(I,$)=>{C($);};f__namespace.useImperativeHandle(t,()=>({focus:I=>{p.current[I]?.focus();},hideHelp:()=>{ST.flushSync(()=>{g(false);});}}));const S={prefixCls:n,onStartMove:o,onOffsetChange:i,render:a,onFocus:x,onMouseEnter:w,...m};return f__namespace.createElement(f__namespace.Fragment,null,s.map((I,$)=>{const E=c===$;return f__namespace.createElement(Y$,cm({ref:P=>{P?p.current[$]=P:delete p.current[$];},dragging:E,draggingDelete:E&&u,style:bs(r,$),key:$,value:I,valueIndex:$},S))}),l&&h&&f__namespace.createElement(Y$,cm({key:"a11y"},S,{value:s[b],valueIndex:null,dragging:c!==-1,draggingDelete:u,render:l,style:{pointerEvents:"none"},tabIndex:null,"aria-hidden":true})))}),pX=e=>{const{prefixCls:t,style:n,children:r,value:o,onClick:i}=e,{min:s,max:a,direction:l,includedStart:c,includedEnd:u,included:d}=f__namespace.useContext(ta),m=`${t}-text`,p=K1(l,o,s,a);return f__namespace.createElement("span",{className:H(m,{[`${m}-active`]:d&&c<=o&&o<=u}),style:{...p,...n},onMouseDown:h=>{h.stopPropagation();},onClick:()=>{i(o);}},r)},hX=e=>{const{prefixCls:t,marks:n,onClick:r}=e,o=`${t}-mark`;return n.length?f__namespace.createElement("div",{className:o},n.map(({value:i,style:s,label:a})=>f__namespace.createElement(pX,{key:i,prefixCls:o,style:s,value:i,onClick:r},a))):null},gX=e=>{const{prefixCls:t,value:n,style:r,activeStyle:o}=e,{min:i,max:s,direction:a,included:l,includedStart:c,includedEnd:u}=f__namespace.useContext(ta),d=`${t}-dot`,m=l&&c<=n&&n<=u;let p={...K1(a,n,i,s),...typeof r=="function"?r(n):r};return m&&(p={...p,...typeof o=="function"?o(n):o}),f__namespace.createElement("span",{className:H(d,{[`${d}-active`]:m}),style:p})},bX=e=>{const{prefixCls:t,marks:n,dots:r,style:o,activeStyle:i}=e,{min:s,max:a,step:l}=f__namespace.useContext(ta),c=f__namespace.useMemo(()=>{const u=new Set;if(n.forEach(d=>{u.add(d.value);}),r&&l!==null){let d=s;for(;d<=a;)u.add(d),d+=l;}return Array.from(u)},[s,a,l,r,n]);return f__namespace.createElement("div",{className:`${t}-step`},c.map(u=>f__namespace.createElement(gX,{prefixCls:t,key:u,value:u,style:o,activeStyle:i})))},Q$=e=>{const{prefixCls:t,style:n,start:r,end:o,index:i,onStartMove:s,replaceCls:a}=e,{direction:l,min:c,max:u,disabled:d,range:m,classNames:p}=f__namespace.useContext(ta),h=`${t}-track`,g=Lv(r,c,u),b=Lv(o,c,u),y=w=>{!d&&s&&s(w,-1);},C={};switch(l){case "rtl":C.right=`${g*100}%`,C.width=`${b*100-g*100}%`;break;case "btt":C.bottom=`${g*100}%`,C.height=`${b*100-g*100}%`;break;case "ttb":C.top=`${g*100}%`,C.height=`${b*100-g*100}%`;break;default:C.left=`${g*100}%`,C.width=`${b*100-g*100}%`;}const x=a||H(h,{[`${h}-${i+1}`]:i!==null&&m,[`${t}-track-draggable`]:s},p.track);return f__namespace.createElement("div",{className:x,style:{...C,...n},onMouseDown:y,onTouchStart:y})},vX=e=>{const{prefixCls:t,style:n,values:r,startPoint:o,onStartMove:i}=e,{included:s,range:a,min:l,styles:c,classNames:u}=f__namespace.useContext(ta),d=f__namespace.useMemo(()=>{if(!a){if(r.length===0)return [];const h=o??l,g=r[0];return [{start:Math.min(h,g),end:Math.max(h,g)}]}const p=[];for(let h=0;h<r.length-1;h+=1)p.push({start:r[h],end:r[h+1]});return p},[r,a,o,l]);if(!s)return null;const m=d?.length&&(u.tracks||c.tracks)?f__namespace.createElement(Q$,{index:null,prefixCls:t,start:d[0].start,end:d[d.length-1].end,replaceCls:H(u.tracks,`${t}-tracks`),style:c.tracks}):null;return f__namespace.createElement(f__namespace.Fragment,null,m,d.map(({start:p,end:h},g)=>f__namespace.createElement(Q$,{index:g,prefixCls:t,style:{...bs(n,g),...c.track},start:p,end:h,key:g,onStartMove:i})))},yX=130;function Z$(e){const t="targetTouches"in e?e.targetTouches[0]:e;return {pageX:t.pageX,pageY:t.pageY}}function CX(e,t,n,r,o,i,s,a,l,c,u){const[d,m]=f__namespace.useState(null),[p,h]=f__namespace.useState(-1),[g,b]=f__namespace.useState(false),[y,C]=f__namespace.useState(n),[x,w]=f__namespace.useState(n),S=f__namespace.useRef(null),I=f__namespace.useRef(null),$=f__namespace.useRef(null),{onDragStart:E,onDragChange:P}=f__namespace.useContext(N5);Kt(()=>{p===-1&&C(n);},[n,p]),f__namespace.useEffect(()=>()=>{document.removeEventListener("mousemove",S.current),document.removeEventListener("mouseup",I.current),$.current&&($.current.removeEventListener("touchmove",S.current),$.current.removeEventListener("touchend",I.current));},[]);const M=(R,L,V)=>{L!==void 0&&m(L),C(R);let _=R;V&&(_=R.filter((z,D)=>D!==p)),s(_),P&&P({rawValues:R,deleteIndex:V?p:-1,draggingIndex:p,draggingValue:L});},N=lt((R,L,V)=>{if(R===-1){const _=x[0],z=x[x.length-1],D=r-_,W=o-z;let O=L*(o-r);O=Math.max(O,D),O=Math.min(O,W),O=i(_+O)-_;const j=x.map(Y=>Y+O);M(j);}else {const _=(o-r)*L,z=[...y];z[R]=x[R];const D=l(z,_,R,"dist");M(D.values,D.value,V);}}),A=(R,L,V)=>{R.stopPropagation();const _=V||n,z=_[L];h(L),m(z),w(_),C(_),b(false);const{pageX:D,pageY:W}=Z$(R);let O=false;E&&E({rawValues:_,draggingIndex:L,draggingValue:z});const B=Y=>{Y.preventDefault();const{pageX:q,pageY:U}=Z$(Y),K=q-D,J=U-W,{width:Q,height:G}=e.current.getBoundingClientRect();let ee,re;switch(t){case "btt":ee=-J/G,re=K;break;case "ttb":ee=J/G,re=K;break;case "rtl":ee=-K/Q,re=J;break;default:ee=K/Q,re=J;}O=c?Math.abs(re)>yX&&u<y.length:false,b(O),N(L,ee,O);},j=Y=>{Y.preventDefault(),document.removeEventListener("mouseup",j),document.removeEventListener("mousemove",B),$.current&&($.current.removeEventListener("touchmove",S.current),$.current.removeEventListener("touchend",I.current)),S.current=null,I.current=null,$.current=null,a(O),h(-1),b(false);};document.addEventListener("mouseup",j),document.addEventListener("mousemove",B),R.currentTarget.addEventListener("touchend",j),R.currentTarget.addEventListener("touchmove",B),S.current=B,I.current=j,$.current=R.currentTarget;},k=f__namespace.useMemo(()=>{const R=[...n].sort((D,W)=>D-W),L=[...y].sort((D,W)=>D-W),V={};L.forEach(D=>{V[D]=(V[D]||0)+1;}),R.forEach(D=>{V[D]=(V[D]||0)-1;});const _=c?1:0;return Object.values(V).reduce((D,W)=>D+Math.abs(W),0)<=_?y:n},[n,y,c]);return [p,d,g,k,A]}function xX(e,t,n,r,o,i){const s=f__namespace.useCallback(p=>Math.max(e,Math.min(t,p)),[e,t]),a=f__namespace.useCallback(p=>{if(n!==null){const h=e+Math.round((s(p)-e)/n)*n,g=C=>(String(C).split(".")[1]||"").length,b=Math.max(g(n),g(t),g(e)),y=Number(h.toFixed(b));return e<=y&&y<=t?y:null}return null},[n,e,t,s]),l=f__namespace.useCallback(p=>{const h=s(p),g=r.map(C=>C.value);n!==null&&g.push(a(p)),g.push(e,t);let b=g[0],y=t-e;return g.forEach(C=>{const x=Math.abs(h-C);x<=y&&(b=C,y=x);}),b},[e,t,r,n,s,a]),c=(p,h,g,b="unit")=>{if(typeof h=="number"){let y;const C=p[g],x=C+h;let w=[];r.forEach(E=>{w.push(E.value);}),w.push(e,t),w.push(a(C));const S=h>0?1:-1;b==="unit"?w.push(a(C+S*n)):w.push(a(x)),w=w.filter(E=>E!==null).filter(E=>h<0?E<=C:E>=C),b==="unit"&&(w=w.filter(E=>E!==C));const I=b==="unit"?C:x;y=w[0];let $=Math.abs(y-I);if(w.forEach(E=>{const P=Math.abs(E-I);P<$&&(y=E,$=P);}),y===void 0)return h<0?e:t;if(b==="dist")return y;if(Math.abs(h)>1){const E=[...p];return E[g]=y,c(E,h-S,g,b)}return y}else {if(h==="min")return e;if(h==="max")return t}},u=(p,h,g,b="unit")=>{const y=p[g],C=c(p,h,g,b);return {value:C,changed:C!==y}},d=p=>i===null&&p===0||typeof i=="number"&&p<i;return [l,(p,h,g,b="unit")=>{const y=p.map(l),C=y[g],x=c(y,h,g,b);if(y[g]=x,o===false){const w=i||0;g>0&&y[g-1]!==C&&(y[g]=Math.max(y[g],y[g-1]+w)),g<y.length-1&&y[g+1]!==C&&(y[g]=Math.min(y[g],y[g+1]-w));}else if(typeof i=="number"||i===null){for(let w=g+1;w<y.length;w+=1){let S=true;for(;d(y[w]-y[w-1])&&S;)({value:y[w],changed:S}=u(y,1,w));}for(let w=g;w>0;w-=1){let S=true;for(;d(y[w]-y[w-1])&&S;)({value:y[w-1],changed:S}=u(y,-1,w-1));}for(let w=y.length-1;w>0;w-=1){let S=true;for(;d(y[w]-y[w-1])&&S;)({value:y[w-1],changed:S}=u(y,-1,w-1));}for(let w=0;w<y.length-1;w+=1){let S=true;for(;d(y[w+1]-y[w])&&S;)({value:y[w+1],changed:S}=u(y,1,w+1));}}return {value:y[g],values:y}}]}function wX(e){return f.useMemo(()=>{if(e===true||!e)return [!!e,false,false,0];const{editable:t,draggableTrack:n,minCount:r,maxCount:o}=e;return [true,t,!t&&n,r||0,o]},[e])}const SX=f__namespace.forwardRef((e,t)=>{const{prefixCls:n="rc-slider",className:r,style:o,classNames:i,styles:s,id:a,disabled:l=false,keyboard:c=true,autoFocus:u,onFocus:d,onBlur:m,min:p=0,max:h=100,step:g=1,value:b,defaultValue:y,range:C,count:x,onChange:w,onBeforeChange:S,onAfterChange:I,onChangeComplete:$,allowCross:E=true,pushable:P=false,reverse:M,vertical:N,included:A=true,startPoint:k,trackStyle:R,handleStyle:L,railStyle:V,dotStyle:_,activeDotStyle:z,marks:D,dots:W,handleRender:O,activeHandleRender:B,track:j,tabIndex:Y=0,ariaLabelForHandle:q,ariaLabelledByForHandle:U,ariaRequired:K,ariaValueTextFormatterForHandle:J}=e,Q=f__namespace.useRef(null),G=f__namespace.useRef(null),ee=f__namespace.useMemo(()=>N?M?"ttb":"btt":M?"rtl":"ltr",[M,N]),[re,oe,be,Z,te]=wX(C),ce=f__namespace.useMemo(()=>isFinite(p)?p:0,[p]),ue=f__namespace.useMemo(()=>isFinite(h)?h:100,[h]),he=f__namespace.useMemo(()=>g!==null&&g<=0?1:g,[g]),ye=f__namespace.useMemo(()=>typeof P=="boolean"?P?he:false:P>=0?P:false,[P,he]),pe=f__namespace.useMemo(()=>Object.keys(D||{}).map(ve=>{const de=D[ve],se={value:Number(ve)};return de&&typeof de=="object"&&!f__namespace.isValidElement(de)&&("label"in de||"style"in de)?(se.style=de.style,se.label=de.label):se.label=de,se}).filter(({label:ve})=>ve||typeof ve=="number").sort((ve,de)=>ve.value-de.value),[D]),[ie,ge]=xX(ce,ue,he,pe,E,ye),[Se,ke]=Bt(y,b),qe=f__namespace.useMemo(()=>{const ve=Se==null?[]:Array.isArray(Se)?Se:[Se],[de=ce]=ve;let se=Se===null?[]:[de];if(re){if(se=[...ve],x||Se===void 0){const Ce=x>=0?x+1:2;for(se=se.slice(0,Ce);se.length<Ce;)se.push(se[se.length-1]??ce);}se.sort((Ce,fe)=>Ce-fe);}return se.forEach((Ce,fe)=>{se[fe]=ie(Ce);}),se},[Se,re,ce,x,ie]),De=ve=>re?ve:ve[0],ze=lt(ve=>{const de=[...ve].sort((se,Ce)=>se-Ce);w&&!zi(de,qe,true)&&w(De(de)),ke(de);}),je=lt(ve=>{ve&&Q.current.hideHelp();const de=De(qe);I?.(de),Cn(!I,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),$?.(de);}),Le=ve=>{if(l||!oe||qe.length<=Z)return;const de=[...qe];de.splice(ve,1),S?.(De(de)),ze(de);const se=Math.max(0,ve-1);Q.current.hideHelp(),Q.current.focus(se);},[we,Me,Fe,Re,Pe]=CX(G,ee,qe,ce,ue,ie,ze,je,ge,oe,Z),Qe=(ve,de)=>{if(!l){const se=[...qe];let Ce=0,fe=0,xe=ue-ce;qe.forEach((Ze,st)=>{const Ct=Math.abs(ve-Ze);Ct<=xe&&(xe=Ct,Ce=st),Ze<ve&&(fe=st);});let Oe=Ce;oe&&xe!==0&&(!te||qe.length<te)?(se.splice(fe+1,0,ve),Oe=fe+1):se[Ce]=ve,re&&!qe.length&&x===void 0&&se.push(ve);const We=De(se);S?.(We),ze(se),de?(document.activeElement?.blur?.(),Q.current.focus(Oe),Pe(de,Oe,se)):(I?.(We),Cn(!I,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),$?.(We));}},mt=ve=>{ve.preventDefault();const{width:de,height:se,left:Ce,top:fe,bottom:xe,right:Oe}=G.current.getBoundingClientRect(),{clientX:We,clientY:Ze}=ve;let st;switch(ee){case "btt":st=(xe-Ze)/se;break;case "ttb":st=(Ze-fe)/se;break;case "rtl":st=(Oe-We)/de;break;default:st=(We-Ce)/de;}const Ct=ce+st*(ue-ce);Qe(ie(Ct),ve);},[it,ct]=f__namespace.useState(null),bt=(ve,de)=>{if(!l){const se=ge(qe,ve,de);S?.(De(qe)),ze(se.values),ct(se.value);}};f__namespace.useEffect(()=>{if(it!==null){const ve=qe.indexOf(it);ve>=0&&Q.current.focus(ve);}ct(null);},[it]);const pt=f__namespace.useMemo(()=>be&&he===null?false:be,[be,he]),rt=lt((ve,de)=>{Pe(ve,de),S?.(De(qe));}),et=we!==-1;f__namespace.useEffect(()=>{if(!et){const ve=qe.lastIndexOf(Me);Q.current.focus(ve);}},[et]);const Xe=f__namespace.useMemo(()=>[...Re].sort((ve,de)=>ve-de),[Re]),[Ie,Ne]=f__namespace.useMemo(()=>re?[Xe[0],Xe[Xe.length-1]]:[ce,Xe[0]],[Xe,re,ce]);f__namespace.useImperativeHandle(t,()=>({focus:()=>{Q.current.focus(0);},blur:()=>{const{activeElement:ve}=document;G.current?.contains(ve)&&ve?.blur();}})),f__namespace.useEffect(()=>{u&&Q.current.focus(0);},[]);const ae=f__namespace.useMemo(()=>({min:ce,max:ue,direction:ee,disabled:l,keyboard:c,step:he,included:A,includedStart:Ie,includedEnd:Ne,range:re,tabIndex:Y,ariaLabelForHandle:q,ariaLabelledByForHandle:U,ariaRequired:K,ariaValueTextFormatterForHandle:J,styles:s||{},classNames:i||{}}),[ce,ue,ee,l,c,he,A,Ie,Ne,re,Y,q,U,K,J,s,i]);return f__namespace.createElement(ta.Provider,{value:ae},f__namespace.createElement("div",{ref:G,className:H(n,r,{[`${n}-disabled`]:l,[`${n}-vertical`]:N,[`${n}-horizontal`]:!N,[`${n}-with-marks`]:pe.length}),style:o,onMouseDown:mt,id:a},f__namespace.createElement("div",{className:H(`${n}-rail`,i?.rail),style:{...V,...s?.rail}}),j!==false&&f__namespace.createElement(vX,{prefixCls:n,style:R,values:qe,startPoint:k,onStartMove:pt?rt:void 0}),f__namespace.createElement(bX,{prefixCls:n,marks:pe,dots:W,style:_,activeStyle:z}),f__namespace.createElement(mX,{ref:Q,prefixCls:n,style:L,values:Re,draggingIndex:we,draggingDelete:Fe,onStartMove:rt,onOffsetChange:bt,onFocus:d,onBlur:m,handleRender:O,activeHandleRender:B,onChangeComplete:je,onDelete:oe?Le:void 0}),f__namespace.createElement(hX,{prefixCls:n,marks:pe,onClick:Qe})))}),M5=f.createContext({}),J$=f__namespace.forwardRef((e,t)=>{const{open:n,draggingDelete:r,value:o}=e,i=f.useRef(null),s=n&&!r,a=f.useRef(null);function l(){gt.cancel(a.current),a.current=null;}function c(){a.current=gt(()=>{i.current?.forceAlign(),a.current=null;});}return f__namespace.useEffect(()=>(s?c():l(),l),[s,e.title,o]),f__namespace.createElement(Zi,{ref:In(i,t),...e,open:s})}),$X=e=>{const{componentCls:t,antCls:n,controlSize:r,dotSize:o,marginFull:i,marginPart:s,colorFillContentHover:a,handleColorDisabled:l,calc:c,handleSize:u,handleSizeHover:d,handleActiveColor:m,handleActiveOutlineColor:p,handleLineWidth:h,handleLineWidthHover:g,motionDurationMid:b}=e;return {[t]:{...Lt(e),position:"relative",height:r,margin:`${X(s)} ${X(i)}`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${X(i)} ${X(s)}`},[`${t}-rail`]:{position:"absolute",backgroundColor:e.railBg,borderRadius:e.borderRadiusXS,transition:`background-color ${b}`},[`${t}-track,${t}-tracks`]:{position:"absolute",transition:`background-color ${b}`},[`${t}-track`]:{backgroundColor:e.trackBg,borderRadius:e.borderRadiusXS},[`${t}-track-draggable`]:{boxSizing:"content-box",backgroundClip:"content-box",border:"solid rgba(0,0,0,0)"},"&:hover":{[`${t}-rail`]:{backgroundColor:e.railHoverBg},[`${t}-track`]:{backgroundColor:e.trackHoverBg},[`${t}-dot`]:{borderColor:a},[`${t}-handle::after`]:{boxShadow:`0 0 0 ${X(h)} ${e.colorPrimaryBorderHover}`},[`${t}-dot-active`]:{borderColor:e.dotActiveBorderColor}},[`${t}-handle`]:{position:"absolute",width:u,height:u,outline:"none",userSelect:"none","&-dragging-delete":{opacity:0},"&::before":{content:'""',position:"absolute",insetInlineStart:c(h).mul(-1).equal(),insetBlockStart:c(h).mul(-1).equal(),width:c(u).add(c(h).mul(2)).equal(),height:c(u).add(c(h).mul(2)).equal(),backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:u,height:u,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${X(h)} ${e.handleColor}`,outline:"0px solid transparent",borderRadius:"50%",cursor:"pointer",transition:`
inset-inline-start ${b},
inset-block-start ${b},
width ${b},
height ${b},
box-shadow ${b},
outline ${b}
`},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:c(d).sub(u).div(2).add(g).mul(-1).equal(),insetBlockStart:c(d).sub(u).div(2).add(g).mul(-1).equal(),width:c(d).add(c(g).mul(2)).equal(),height:c(d).add(c(g).mul(2)).equal()},"&::after":{boxShadow:`0 0 0 ${X(g)} ${m}`,outline:`6px solid ${p}`,width:d,height:d,insetInlineStart:e.calc(u).sub(d).div(2).equal(),insetBlockStart:e.calc(u).sub(d).div(2).equal()}}},[`&-lock ${t}-handle`]:{"&::before, &::after":{transition:"none"}},[`${t}-mark`]:{position:"absolute",fontSize:e.fontSize},[`${t}-mark-text`]:{position:"absolute",display:"inline-block",color:e.colorTextDescription,textAlign:"center",wordBreak:"keep-all",cursor:"pointer",userSelect:"none","&-active":{color:e.colorText}},[`${t}-step`]:{position:"absolute",background:"transparent",pointerEvents:"none"},[`${t}-dot`]:{position:"absolute",width:o,height:o,backgroundColor:e.colorBgElevated,border:`${X(h)} solid ${e.dotBorderColor}`,borderRadius:"50%",cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,pointerEvents:"auto","&-active":{borderColor:e.dotActiveBorderColor}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-rail`]:{backgroundColor:`${e.railBg} !important`},[`${t}-track`]:{backgroundColor:`${e.trackBgDisabled} !important`},[`
${t}-dot
`]:{backgroundColor:e.colorBgElevated,borderColor:e.trackBgDisabled,boxShadow:"none",cursor:"not-allowed"},[`${t}-handle::after`]:{backgroundColor:e.colorBgElevated,cursor:"not-allowed",width:u,height:u,boxShadow:`0 0 0 ${X(h)} ${l}`,insetInlineStart:0,insetBlockStart:0},[`
${t}-mark-text,
${t}-dot
`]:{cursor:"not-allowed !important"}},[`&-tooltip ${n}-tooltip-container`]:{minWidth:"unset"}}}},R5=(e,t)=>{const{componentCls:n,railSize:r,handleSize:o,dotSize:i,marginFull:s,calc:a}=e,l=t?"paddingBlock":"paddingInline",c=t?"width":"height",u=t?"height":"width",d=t?"insetBlockStart":"insetInlineStart",m=t?"top":"insetInlineStart",p=a(r).mul(3).sub(o).div(2).equal(),h=a(o).sub(r).div(2).equal(),g=t?{borderWidth:`${X(h)} 0`,transform:`translateY(${X(a(h).mul(-1).equal())})`}:{borderWidth:`0 ${X(h)}`,transform:`translateX(${X(e.calc(h).mul(-1).equal())})`};return {[l]:r,[u]:a(r).mul(3).equal(),[`${n}-rail`]:{[c]:"100%",[u]:r},[`${n}-track,${n}-tracks`]:{[u]:r},[`${n}-track-draggable`]:{...g},[`${n}-handle`]:{[d]:p},[`${n}-mark`]:{insetInlineStart:0,top:0,[m]:a(r).mul(3).add(t?0:s).equal(),[c]:"100%"},[`${n}-step`]:{insetInlineStart:0,top:0,[m]:r,[c]:"100%",[u]:r},[`${n}-dot`]:{position:"absolute",[d]:a(r).sub(i).div(2).equal()}}},EX=e=>{const{componentCls:t,marginPartWithMark:n}=e;return {[`${t}-horizontal`]:{...R5(e,true),[`&${t}-with-marks`]:{marginBottom:n}}}},IX=e=>{const{componentCls:t}=e;return {[`${t}-vertical`]:{...R5(e,false),height:"100%"}}},PX=e=>{const n=e.controlHeightLG/4,r=e.controlHeightSM/2,o=e.lineWidth+1,i=e.lineWidth+1*1.5,s=e.colorPrimary,a=new Ft(s).setA(.2).toRgbString();return {controlSize:n,railSize:4,handleSize:n,handleSizeHover:r,dotSize:8,handleLineWidth:o,handleLineWidthHover:i,railBg:e.colorFillTertiary,railHoverBg:e.colorFillSecondary,trackBg:e.colorPrimaryBorder,trackHoverBg:e.colorPrimaryBorderHover,handleColor:e.colorPrimaryBorder,handleActiveColor:s,handleActiveOutlineColor:a,handleColorDisabled:new Ft(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexString(),dotBorderColor:e.colorBorderSecondary,dotActiveBorderColor:e.colorPrimaryBorder,trackBgDisabled:e.colorBgContainerDisabled}},NX=xt("Slider",e=>{const t=vt(e,{marginPart:e.calc(e.controlHeight).sub(e.controlSize).div(2).equal(),marginFull:e.calc(e.controlSize).div(2).equal(),marginPartWithMark:e.calc(e.controlHeightLG).sub(e.controlSize).equal()});return [$X(t),EX(t),IX(t)]},PX);function mg(){const[e,t]=f__namespace.useState(false),n=f__namespace.useRef(null),r=()=>{gt.cancel(n.current);},o=i=>{r(),i?t(i):n.current=gt(()=>{t(i);});};return f__namespace.useEffect(()=>r,[]),[e,o]}function MX(e){return e||e===null?e:t=>typeof t=="number"?t.toString():""}const A5=f.forwardRef((e,t)=>{const{prefixCls:n,range:r,className:o,rootClassName:i,style:s,disabled:a,tooltip:l={},onChangeComplete:c,classNames:u,styles:d,vertical:m,orientation:p,...h}=e,[,g]=qs(p,m),{getPrefixCls:b,direction:y,className:C,style:x,classNames:w,styles:S,getPopupContainer:I}=St("slider"),$=f.useContext(zn),E=a??$,P={...e,disabled:E,vertical:g},[M,N]=It([w,u],[S,d],{props:P}),{handleRender:A,direction:k}=f.useContext(M5),L=(k||y)==="rtl",[V,_]=mg(),[z,D]=mg(),W={...l},{open:O,placement:B,getPopupContainer:j,prefixCls:Y,formatter:q}=W,U=O,K=(V||z)&&U!==false,J=MX(q),[Q,G]=mg(),ee=pe=>{c?.(pe),G(false);},re=(pe,ie)=>pe||(ie?L?"left":"right":"top"),oe=b("slider",n),[be,Z]=NX(oe),te=H(o,C,M.root,i,{[`${oe}-rtl`]:L,[`${oe}-lock`]:Q},be,Z);L&&!g&&(h.reverse=!h.reverse),f.useEffect(()=>{const pe=()=>{gt(()=>{D(false);},1);};return document.addEventListener("mouseup",pe),()=>{document.removeEventListener("mouseup",pe);}},[]);const ce=r&&!U,ue=A||((pe,ie)=>{const{index:ge}=ie,Se=pe.props;function ke(je,Le,we){we&&h[je]?.(Le),Se[je]?.(Le);}const qe={...Se,onMouseEnter:je=>{_(true),ke("onMouseEnter",je);},onMouseLeave:je=>{_(false),ke("onMouseLeave",je);},onMouseDown:je=>{D(true),G(true),ke("onMouseDown",je);},onFocus:je=>{D(true),h.onFocus?.(je),ke("onFocus",je,true);},onBlur:je=>{D(false),h.onBlur?.(je),ke("onBlur",je,true);}},De=f.cloneElement(pe,qe),ze=(!!U||K)&&J!==null;return ce?De:f.createElement(J$,{...W,prefixCls:b("tooltip",Y),title:J?J(ie.value):"",value:ie.value,open:ze,placement:re(B,g),key:ge,classNames:{root:`${oe}-tooltip`},getPopupContainer:j||I},De)}),he=ce?(pe,ie)=>{const ge=f.cloneElement(pe,{style:{...pe.props.style,visibility:"hidden"}});return f.createElement(J$,{...W,prefixCls:b("tooltip",Y),title:J?J(ie.value):"",open:J!==null&&K,placement:re(B,g),key:"tooltip",classNames:{root:`${oe}-tooltip`},getPopupContainer:j||I,draggingDelete:ie.draggingDelete},ge)}:void 0,ye={...N.root,...x,...s};return f.createElement(SX,{...h,classNames:M,styles:N,step:h.step,range:r,className:te,style:ye,disabled:E,vertical:g,ref:t,prefixCls:oe,handleRender:ue,activeHandleRender:he,onChangeComplete:ee})}),RX=e=>{const{componentCls:t,iconCls:n,antCls:r,zIndexPopup:o,colorText:i,colorWarning:s,marginXXS:a,marginXS:l,fontSize:c,fontWeightStrong:u,colorTextHeading:d}=e;return {[t]:{zIndex:o,[`&${r}-popover`]:{fontSize:c},[`${t}-message`]:{marginBottom:l,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t}-message-icon ${n}`]:{color:s,fontSize:c,lineHeight:1,marginInlineEnd:l},[`${t}-title`]:{fontWeight:u,color:d,"&:only-child":{fontWeight:"normal"}},[`${t}-description`]:{marginTop:a,color:i}},[`${t}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:l}}}}},AX=e=>{const{zIndexPopupBase:t}=e;return {zIndexPopup:t+60}},T5=xt("Popconfirm",e=>RX(e),AX,{resetStyle:false}),O5=e=>{const{prefixCls:t,okButtonProps:n,cancelButtonProps:r,title:o,description:i,cancelText:s,okText:a,okType:l="primary",icon:c=f__namespace.createElement(_u,null),showCancel:u=true,close:d,onConfirm:m,onCancel:p,onPopupClick:h,classNames:g,styles:b}=e,{getPrefixCls:y}=f__namespace.useContext(ot),[C]=ar("Popconfirm",po.Popconfirm),x=Ja(o),w=Ja(i);return f__namespace.createElement("div",{className:`${t}-inner-content`,onClick:h},f__namespace.createElement("div",{className:`${t}-message`},c&&f__namespace.createElement("span",{className:`${t}-message-icon`},c),f__namespace.createElement("div",{className:`${t}-message-text`},x&&f__namespace.createElement("div",{className:H(`${t}-title`,g?.title),style:b?.title},x),w&&f__namespace.createElement("div",{className:H(`${t}-description`,g?.content),style:b?.content},w))),f__namespace.createElement("div",{className:`${t}-buttons`},u&&f__namespace.createElement(Je,{onClick:p,size:"small",...r},s||C?.cancelText),f__namespace.createElement(g1,{buttonProps:{size:"small",...Jy(l),...n},actionFn:m,close:d,prefixCls:y("btn"),quitOnNullishReturnValue:true,emitEvent:true},a||C?.okText)))},TX=e=>{const{prefixCls:t,placement:n,className:r,style:o,...i}=e,{getPrefixCls:s}=f__namespace.useContext(ot),a=s("popconfirm",t);return T5(a),f__namespace.createElement(QM,{placement:n,className:H(a,r),style:o,content:f__namespace.createElement(O5,{prefixCls:a,...i})})},OX=f__namespace.forwardRef((e,t)=>{const{prefixCls:n,placement:r="top",trigger:o,okType:i="primary",icon:s=f__namespace.createElement(_u,null),children:a,overlayClassName:l,onOpenChange:c,overlayStyle:u,styles:d,arrow:m,classNames:p,...h}=e,{getPrefixCls:g,className:b,style:y,classNames:C,styles:x,arrow:w,trigger:S}=St("popconfirm"),[I,$]=Bt(e.defaultOpen??false,e.open),E=Ny(m,w),P=o||S||"click",M=(W,O)=>{$(W),c?.(W,O);},N=W=>{M(false,W);},A=W=>e.onConfirm?.call(void 0,W),k=W=>{M(false,W),e.onCancel?.call(void 0,W);},R=(W,O)=>{const{disabled:B=false}=e;B||M(W,O);},L=g("popconfirm",n),V={...e,placement:r,trigger:P,okType:i,overlayStyle:u,styles:d,classNames:p},[_,z]=It([C,p],[x,d],{props:V}),D=H(L,b,l,_.root);return T5(L),f__namespace.createElement(ko,{arrow:E,...Zt(h,["title"]),trigger:P,placement:r,onOpenChange:R,open:I,ref:t,classNames:{root:D,container:_.container,arrow:_.arrow},styles:{root:{...y,...z.root,...u},container:z.container,arrow:z.arrow},content:f__namespace.createElement(O5,{okType:i,icon:s,...e,prefixCls:L,close:N,onConfirm:A,onCancel:k,classNames:_,styles:z}),"data-popover-inject":true},a)}),uu=OX;uu._InternalPanelDoNotUseOrYouWillBeFired=TX;function FX({expanded:e,children:t,...n}){return v("div",{...n,"data-classname":"wrapper",css:Dt("transition:grid-template-rows 0.2s ease-out;display:grid;grid-template-rows:",e?1:0,"fr;",""),children:v("div",{"data-classname":"inner",className:"overflow-hidden",children:t})})}async function yp(e="即将刷新网页!"){ft.info(e),await _t(500),location.reload();}function ur(e,t){return F($e,{children:[F("div",{className:"flex items-center",children:["✅: ",e]}),F("div",{className:"flex items-center",children:["❎: ",t]})]})}let Zl;function LX(){Rm(()=>{Zl&&URL.revokeObjectURL(Zl),Zl=void 0;});const e=Yu(),t=JSON.stringify(e,null,2),n=new Blob([t],{type:"application/json"});return Zl=URL.createObjectURL(n),Zl}function BX(){const e=LX(),t=`${uo}-settings ${rn().format("YYYY-MM-DD HH:mm:ss")}.json`;if(typeof GM_download<"u")GM_download?.({url:e,name:t});else {const n=document.createElement("a");n.href=e,n.download=t,n.click();}}async function kX(){const e=await DX();if(!e)return;const t=await e.text();if(!t)return zt("文件内容为空!");let n;try{n=JSON.parse(t);}catch{return zt("无法解析文件内容!")}q1(n);const{pickedPaths:r,pickedSettings:o}=$l(n,os);return r.length?(c5(true),vo(o),ft.success("导入成功!"),yp()):zt("没有有效的设置!")}function DX(){return zX({accept:".json",multiple:false})}function zX(e){return new Promise(t=>{const n=document.createElement("input");n.type="file",Object.assign(n,e),n.addEventListener("change",()=>{t(n.files?.[0]||null);}),n.click();})}const fr={tabPane:"max-h-[max(362px,calc(90vh-50px-56px-15px))] min-h-362px overflow-y-auto pr-12px",settingsGroup:"mb-10px",settingsGroupTitle:"flex items-center text-2em",settingsGroupSubTitle:"mt-15px flex items-center text-1.3em"};function Sn({children:e,title:t,titleClassName:n,contentClassName:r,...o}){return F("div",{className:fr.settingsGroup,"data-role":"settings-group",...o,children:[v("div",{"data-role":"settings-group-title",className:An(fr.settingsGroupTitle,n),children:t}),v("div",{"data-role":"settings-group-content",className:An("flex flex-col gap-y-5px",r),children:e})]})}function _X(e){const{pickedSettings:t}=$l(Xu,e);vo(t);}function Ao({paths:e,className:t}){return v(uu,{title:"确定重置下面的设置项?",onConfirm:()=>_X(e),children:F(Je,{className:H("gap-x-4px",t),children:[v(mM,{className:"mt--1px size-12px"}),v("span",{children:"重置"})]})})}const HX=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[v("path",{d:"M3.06 13a9 9 0 1 0 .49-4.087"}),v("path",{d:"M3 4.001v5h5M11 12a1 1 0 1 0 2 0a1 1 0 1 0-2 0"})]})]}),e2=f.forwardRef(HX),VX=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[v("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),v("path",{d:"M11.5 21H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7l5 5v5m-5 6h7m-3-3l3 3l-3 3"})]})]}),kv=f.forwardRef(VX),jX=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[v("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),v("path",{d:"M5 13V5a2 2 0 0 1 2-2h7l5 5v11a2 2 0 0 1-2 2h-5.5M2 19h7m-3-3l3 3l-3 3"})]})]}),Dv=f.forwardRef(jX),WX=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"currentColor",d:"M12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5l1.53.11A2.98 2.98 0 0 1 22 15c0 1.65-1.35 3-3 3H6c-2.21 0-4-1.79-4-4c0-2.05 1.53-3.76 3.56-3.97l1.07-.11l.5-.95A5.47 5.47 0 0 1 12 6m0-2C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 0 0 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5c0-2.64-2.05-4.78-4.65-4.96A7.49 7.49 0 0 0 12 4"})]}),qX=f.forwardRef(WX),UX=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,children:[v("path",{d:"M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4S4 12.954 4 24s8.954 20 20 20Z"}),v("path",{strokeLinecap:"round",d:"m33 21l-9 9l-9-9"})]})]}),GX=f.forwardRef(UX);function KX(){return LG(),yp()}async function XX(){const e=await s5.getData();q1(e);const{pickedPaths:t,pickedSettings:n}=$l(e,os,NG);return t.length?(c5(true),vo(n),yp()):ft.error("备份不存在或没有有效的配置")}function YX(){const{autoPreviewUpdateInterval:e}=Mt(),[t,n]=f.useState(false);return F("div",{className:fr.tabPane,children:[v(Sn,{title:"设置项",children:F(Fr,{size:20,children:[v(uu,{title:"确定",description:"确定恢复默认设置? 此操作不可逆!",onConfirm:KX,children:F(Je,{danger:true,type:"primary",children:[v(e2,{}),"恢复默认设置"]})}),F(Fr,{size:5,children:[v(Jt,{title:"导出所有设置项到文件中, 包含 access_key 等数据, 请妥善保存",children:F(Je,{onClick:()=>BX(),children:[v(kv,{}),"导出设置"]})}),v(Jt,{title:"从文件中导入设置项, 将覆盖当前设置, 此操作不可逆!",children:F(Je,{onClick:()=>kX(),children:[v(Dv,{}),"导入设置"]})})]})]})}),v(Sn,{title:F($e,{children:[v(qX,{className:"mr-4px size-28px"}),"备份"]}),children:F("div",{className:"flex items-center gap-x-40px",children:[F("span",{className:"flex items-center gap-x-8px",children:[v(at,{configPath:"backupSettingsToArticleDraft",label:"备份设置到专栏草稿箱中",tooltip:`专栏 - 草稿箱 - ${uo}`}),F("a",{className:"inline-flex items-center",href:"https://member.bilibili.com/platform/upload/text/draft",target:"_blank",children:[v(bo,{className:"mr-4px size-16px"}),"去草稿箱浏览"]})]}),v(uu,{title:"确定",description:"将覆盖本地设置? 此操作不可逆!",onConfirm:XX,children:F(Je,{danger:true,type:"primary",children:[v(e2,{}),"从专栏草稿箱中恢复"]})})]})}),v(Sn,{titleClassName:"justify-between",title:F($e,{children:["预览",v(Ao,{paths:["autoPreviewUpdateInterval"]})]}),children:F("div",{className:"flex-v-center",children:["自动预览更新间隔",v(A5,{style:{flex:1,margin:"0 15px"},min:0,max:1e3,keyboard:true,onChange:r=>Ue.autoPreviewUpdateInterval=r,value:e}),F("span",{style:{width:"65px"},children:["(",e,"ms)"]})]})}),v(Sn,{title:F($e,{children:["其他",v(Mn,{children:"这里是一些作者不愿意解释的设置项 😬"}),v(Je,{onClick:()=>n(r=>!r),className:"ml-10px inline-icon-only-round-button",css:t&&wl,children:v(GX,{className:H("size-16px transition-300 transition-transform",t?"rotate-180":"rotate-0")})})]}),children:v(FX,{expanded:t,children:F("div",{className:"w-full flex gap-x-20px b-1px b-gate-border rounded-6px b-solid p-10px",children:[v(Ao,{paths:sm,className:"flex-none"}),v("div",{className:"flex flex-1 flex-wrap items-start gap-x-20px gap-y-10px",children:sm.map(r=>v(at,{configPath:r,tooltip:F($e,{children:[r,t2[r]&&F($e,{children:[v("br",{}),t2[r]]})]}),label:tO(r.startsWith("__internal")?r.slice(10):r.replaceAll("__internal.",""))},r))})]})})})]})}const t2={},QX=e=>{const{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:o,calc:i}=e,s=i(r).sub(n).equal(),a=i(t).sub(n).equal();return {[o]:{...Lt(e),display:"inline-block",height:"auto",paddingInline:s,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",backgroundColor:e.defaultBg,border:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${o}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${o}-close-icon`]:{marginInlineStart:a,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${o}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive},"&-disabled":{cursor:"not-allowed",[`&:not(${o}-checkable-checked)`]:{color:e.colorTextDisabled,"&:hover":{backgroundColor:"transparent"}},[`&${o}-checkable-checked`]:{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled},"&:hover, &:active":{backgroundColor:e.colorBgContainerDisabled,color:e.colorTextDisabled},[`&:not(${o}-checkable-checked):hover`]:{color:e.colorTextDisabled}},"&-group":{display:"flex",flexWrap:"wrap",gap:e.paddingXS}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:s}},[`&${e.componentCls}-solid`]:{borderColor:"transparent",color:e.colorTextLightSolid,backgroundColor:e.colorBgSolid,[`&${o}-default`]:{color:e.solidTextColor}},[`${o}-filled`]:{borderColor:"transparent",backgroundColor:e.tagBorderlessBg},[`&${o}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",backgroundColor:e.colorBgContainerDisabled,a:{cursor:"not-allowed",pointerEvents:"none",color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}},"a&":{"&:hover, &:active":{color:e.colorTextDisabled}},[`&${o}-outlined`]:{borderColor:e.colorBorderDisabled},[`&${o}-solid, &${o}-filled`]:{color:e.colorTextDisabled,[`${o}-close-icon`]:{color:e.colorTextDisabled}},[`${o}-close-icon`]:{cursor:"not-allowed",color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}}}}},X1=e=>{const{lineWidth:t,fontSizeIcon:n,calc:r}=e,o=e.fontSizeSM;return vt(e,{tagFontSize:o,tagLineHeight:X(r(e.lineHeightSM).mul(o).equal()),tagIconSize:r(n).sub(r(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},Y1=e=>{const t=t1(new pr(e.colorBgSolid),"#fff")?"#000":"#fff";return {defaultBg:new Ft(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText,solidTextColor:t}},Q1=xt("Tag",e=>{const t=X1(e);return QX(t)},Y1),F5=f__namespace.forwardRef((e,t)=>{const{prefixCls:n,style:r,className:o,checked:i,children:s,icon:a,onChange:l,onClick:c,disabled:u,...d}=e,{getPrefixCls:m,tag:p}=f__namespace.useContext(ot),h=f__namespace.useContext(zn),g=u??h,b=S=>{g||(l?.(!i),c?.(S));},y=m("tag",n),[C,x]=Q1(y),w=H(y,`${y}-checkable`,{[`${y}-checkable-checked`]:i,[`${y}-checkable-disabled`]:g},p?.className,o,C,x);return f__namespace.createElement("span",{...d,ref:t,style:{...r,...p?.style},className:w,onClick:b},a,f__namespace.createElement("span",null,s))});function ZX(e,t){const{id:n,prefixCls:r,rootClassName:o,className:i,style:s,classNames:a,styles:l,disabled:c,options:u,value:d,defaultValue:m,onChange:p,multiple:h,...g}=e,{getPrefixCls:b,direction:y,className:C,style:x,classNames:w,styles:S}=St("tag"),I=b("tag",r),$=`${I}-checkable-group`,E=sn(I),[P,M]=Q1(I,E),[N,A]=It([w,a],[S,l],{props:e}),k=f.useMemo(()=>(u||[]).map(D=>D&&typeof D=="object"?D:{value:D,label:D}),[u]),[R,L]=Bt(m,d),V=(D,W)=>{let O=null;if(h){const B=R||[];O=D?[].concat(Et(B),[W.value]):B.filter(j=>j!==W.value);}else O=D?W.value:null;L(O),p?.(O);},_=f.useRef(null);f.useImperativeHandle(t,()=>({nativeElement:_.current}));const z=or(g,{aria:true,data:true});return f.createElement("div",{...z,className:H($,C,o,{[`${$}-disabled`]:c,[`${$}-rtl`]:y==="rtl"},P,M,i,N.root),style:{...x,...A.root,...s},id:n,ref:_},k.map(D=>f.createElement(F5,{key:D.value,className:H(`${$}-item`,N.item),style:A.item,checked:h?(R||[]).includes(D.value):R===D.value,onChange:W=>V(W,D),disabled:c},D.label)))}const JX=f.forwardRef(ZX);function eY(e,t){const{color:n,variant:r,bordered:o}=e;return f__namespace.useMemo(()=>{const i=n?.endsWith("-inverse");let s;r?s=r:i?s="solid":o===false?s="filled":s=t||"filled";const a=i?n?.replace("-inverse",""):n,l=Qm(n),c=yD(n),u={};if(!l&&!c&&a)if(s==="solid")u.backgroundColor=n;else {const d=new Ft(a).toHsl();d.l=.95,u.backgroundColor=new Ft(d).toHexString(),u.color=n,s==="outlined"&&(u.borderColor=n);}return [s,a,l,c,u]},[n,r,o,t])}const tY=e=>Vm(e,(t,{textColor:n,lightBorderColor:r,lightColor:o,darkColor:i})=>({[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:o,borderColor:r,color:n},[`&${e.componentCls}-solid`]:{backgroundColor:i,borderColor:i,color:e.colorTextLightSolid},[`&${e.componentCls}-filled`]:{backgroundColor:o,color:n}}})),nY=dl(["Tag","preset"],e=>{const t=X1(e);return tY(t)},Y1);function rY(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const Bd=(e,t,n)=>{const r=rY(n);return {[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:e[`color${r}Bg`],borderColor:e[`color${r}Border`],color:e[`color${n}`]},[`&${e.componentCls}-solid`]:{backgroundColor:e[`color${n}`],borderColor:e[`color${n}`]},[`&${e.componentCls}-filled`]:{backgroundColor:e[`color${r}Bg`],color:e[`color${n}`]}}}},oY=dl(["Tag","status"],e=>{const t=X1(e);return [Bd(t,"success","Success"),Bd(t,"processing","Info"),Bd(t,"error","Error"),Bd(t,"warning","Warning")]},Y1),iY=f__namespace.forwardRef((e,t)=>{const{prefixCls:n,className:r,rootClassName:o,style:i,children:s,icon:a,color:l,variant:c,onClose:u,bordered:d,disabled:m,href:p,target:h,styles:g,classNames:b,...y}=e,{getPrefixCls:C,direction:x,className:w,variant:S,style:I,classNames:$,styles:E}=St("tag"),[P,M,N,A,k]=eY(e,S),R=N||A,L=f__namespace.useContext(zn),V=m??L,{tag:_}=f__namespace.useContext(ot),[z,D]=f__namespace.useState(true),W=Zt(y,["closeIcon","closable"]),O={...e,color:M,variant:P,disabled:V,href:p,target:h,icon:a},[B,j]=It([$,b],[E,g],{props:O}),Y=f__namespace.useMemo(()=>{let te={...j.root,...I,...i};return V||(te={...k,...te}),te},[j.root,I,i,k,V]),q=C("tag",n),[U,K]=Q1(q),J=H(q,w,B.root,`${q}-${P}`,{[`${q}-${M}`]:R,[`${q}-hidden`]:!z,[`${q}-rtl`]:x==="rtl",[`${q}-disabled`]:V},r,o,U,K),Q=te=>{V||(te.stopPropagation(),u?.(te),!te.defaultPrevented&&D(false));},[,G]=Z0(Di(e),Di(_),{closable:false,closeIconRender:te=>{const ce=f__namespace.createElement("span",{className:`${q}-close-icon`,onClick:Q},te);return nP(te,ce,ue=>({onClick:he=>{ue?.onClick?.(he),Q(he);},className:H(ue?.className,`${q}-close-icon`)}))}}),ee=typeof y.onClick=="function"||s&&s.type==="a",re=Rn(a,{className:H(f__namespace.isValidElement(a)?a.props?.className:"",B.icon),style:j.icon}),oe=re?f__namespace.createElement(f__namespace.Fragment,null,re,s&&f__namespace.createElement("span",{className:B.content,style:j.content},s)):s,be=p?"a":"span",Z=f__namespace.createElement(be,{...W,ref:t,className:J,style:Y,href:V?void 0:p,target:h,onClick:V?void 0:W.onClick,...p&&V?{"aria-disabled":true}:{}},oe,G,N&&f__namespace.createElement(nY,{key:"preset",prefixCls:q}),A&&f__namespace.createElement(oY,{key:"status",prefixCls:q}));return ee?f__namespace.createElement(Mu,{component:"Tag"},Z):Z}),Ir=iY;Ir.CheckableTag=F5;Ir.CheckableTagGroup=JX;const sY=e=>{const{componentCls:t}=e;return {[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}},aY=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:o,textPaddingInline:i,orientationMargin:s,verticalMarginInline:a}=e,l=`${t}-rail`;return {[t]:{...Lt(e),borderBlockStart:`${X(o)} solid ${r}`,[l]:{borderBlockStart:`${X(o)} solid ${r}`},"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:a,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${X(o)} solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${X(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${X(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,[`${l}-start, ${l}-end`]:{width:"50%",borderBlockStartColor:"inherit",borderBlockEnd:0,content:"''"}},[`&-horizontal${t}-with-text-start`]:{[`${l}-start`]:{width:`calc(${s} * 100%)`},[`${l}-end`]:{width:`calc(100% - ${s} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{[`${l}-start`]:{width:`calc(100% - ${s} * 100%)`},[`${l}-end`]:{width:`calc(${s} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:i},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${X(o)} 0 0`,[l]:{borderBlockStart:`${X(o)} dashed ${r}`}},[`&-horizontal${t}-with-text${t}-dashed`]:{[`${l}-start, ${l}-end`]:{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:o,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:r,borderStyle:"dotted",borderWidth:`${X(o)} 0 0`,[l]:{borderBlockStart:`${X(o)} dotted ${r}`}},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:o,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{[`${l}-start`]:{width:0},[`${l}-end`]:{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{[`${l}-start`]:{width:"100%"},[`${l}-end`]:{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}}}},lY=e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),cY=xt("Divider",e=>{const t=vt(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return [aY(t),sY(t)]},lY,{unitless:{orientationMargin:true}}),uY=["left","right","center","start","end"],dY={small:"sm",middle:"md"},tl=e=>{const{getPrefixCls:t,direction:n,className:r,style:o,classNames:i,styles:s}=St("divider"),{prefixCls:a,type:l,orientation:c,vertical:u,titlePlacement:d,orientationMargin:m,className:p,rootClassName:h,children:g,dashed:b,variant:y="solid",plain:C,style:x,size:w,classNames:S,styles:I,...$}=e,E=t("divider",a),P=`${E}-rail`,[M,N]=cY(E),A=Vn(w),k=dY[A],R=!!g,L=uY.includes(c||""),V=f__namespace.useMemo(()=>{const K=d??(L?c:"center");return K==="left"?n==="rtl"?"end":"start":K==="right"?n==="rtl"?"start":"end":K},[n,c,d,L]),_=V==="start"&&m!=null,z=V==="end"&&m!=null,[D,W]=qs(c,u,l),O={...e,orientation:D,titlePlacement:V,size:A},[B,j]=It([i,S],[s,I],{props:O}),Y=H(E,r,M,N,`${E}-${D}`,{[`${E}-with-text`]:R,[`${E}-with-text-${V}`]:R,[`${E}-dashed`]:!!b,[`${E}-${y}`]:y!=="solid",[`${E}-plain`]:!!C,[`${E}-rtl`]:n==="rtl",[`${E}-no-default-orientation-margin-start`]:_,[`${E}-no-default-orientation-margin-end`]:z,[`${E}-${k}`]:!!k,[P]:!g,[B.rail]:B.rail&&!g},p,h,B.root),q=f__namespace.useMemo(()=>typeof m=="number"?m:/^\d+$/.test(m)?Number(m):m,[m]),U={marginInlineStart:_?q:void 0,marginInlineEnd:z?q:void 0};return f__namespace.createElement("div",{className:Y,style:{...o,...j.root,...g?{}:j.rail,...x},...$,role:"separator"},g&&!W&&f__namespace.createElement(f__namespace.Fragment,null,f__namespace.createElement("div",{className:H(P,`${P}-start`,B.rail),style:j.rail}),f__namespace.createElement("span",{className:H(`${E}-inner-text`,B.content),style:{...U,...j.content}},g),f__namespace.createElement("div",{className:H(P,`${P}-end`,B.rail),style:j.rail})))},fY=(e,t,n,r,o=false,i,s)=>{const a=f.useMemo(()=>typeof n=="boolean"?{allowClear:n}:n&&typeof n=="object"?n:{allowClear:false},[n]);return f.useMemo(()=>{const l=!o&&a.allowClear!==false&&(t.length||i)&&!(s==="combobox"&&i==="");return {allowClear:l,clearIcon:l?a.clearIcon||r||"×":null}},[a,r,o,t.length,i,s])},L5=f__namespace.createContext(null);function na(){return f__namespace.useContext(L5)}function mY(e=250){const t=f__namespace.useRef(null),n=f__namespace.useRef(null);f__namespace.useEffect(()=>()=>{window.clearTimeout(n.current);},[]);function r(o){(o||t.current===null)&&(t.current=o),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{t.current=null;},e);}return [()=>t.current,r]}function B5(e,t){return e.filter(n=>n).some(n=>n.contains(t)||n===t)}function pY(e,t,n,r){const o=lt(i=>{if(r)return;let s=i.target;s.shadowRoot&&i.composed&&(s=i.composedPath()[0]||s),i._ori_target&&(s=i._ori_target),t&&!B5(e(),s)&&n(false);});f__namespace.useEffect(()=>(window.addEventListener("mousedown",o),()=>window.removeEventListener("mousedown",o)),[o]);}function zv(){return zv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},zv.apply(this,arguments)}const hY=e=>{const t=e===true?0:1;return {bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"}}},gY=(e,t)=>{const{prefixCls:n,disabled:r,visible:o,children:i,popupElement:s,animation:a,transitionName:l,popupStyle:c,popupClassName:u,direction:d="ltr",placement:m,builtinPlacements:p,popupMatchSelectWidth:h,popupRender:g,popupAlign:b,getPopupContainer:y,empty:C,onPopupVisibleChange:x,onPopupMouseEnter:w,onPopupMouseDown:S,onPopupBlur:I,...$}=e,E=`${n}-dropdown`;let P=s;g&&(P=g(s));const M=f__namespace.useMemo(()=>p||hY(h),[p,h]),N=a?`${E}-${a}`:l,A=typeof h=="number",k=f__namespace.useMemo(()=>A?null:h===false?"minWidth":"width",[h,A]);let R=c;A&&(R={...c,width:h});const L=f__namespace.useRef(null);return f__namespace.useImperativeHandle(t,()=>({getPopupElement:()=>L.current?.popupElement})),f__namespace.createElement(_m,zv({},$,{showAction:x?["click"]:[],hideAction:x?["click"]:[],popupPlacement:m||(d==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:M,prefixCls:E,popupMotion:{motionName:N},popup:f__namespace.createElement("div",{onMouseEnter:w,onMouseDown:S,onBlur:I},P),ref:L,stretch:k,popupAlign:b,popupVisible:o,getPopupContainer:y,popupClassName:H(u,{[`${E}-empty`]:C}),popupStyle:R,onPopupVisibleChange:x}),i)},bY=f__namespace.forwardRef(gY);function n2(e,t){const{key:n}=e;let r;return "value"in e&&({value:r}=e),n??(r!==void 0?r:`rc-index-key-${t}`)}function _v(e){return typeof e<"u"&&!Number.isNaN(e)}function k5(e,t){const{label:n,value:r,options:o,groupLabel:i}=e||{},s=n||(t?"children":"label");return {label:s,value:r||"value",options:o||"options",groupLabel:i||s}}function vY(e,{fieldNames:t,childrenAsData:n}={}){const r=[],{label:o,value:i,options:s,groupLabel:a}=k5(t,false);function l(c,u){Array.isArray(c)&&c.forEach(d=>{if(u||!(s in d)){const m=d[i];r.push({key:n2(d,r.length),groupOption:u,data:d,label:d[o],value:m});}else {let m=d[a];m===void 0&&n&&(m=d.label),r.push({key:n2(d,r.length),group:true,data:d,label:m}),l(d[s],true);}});}return l(e,false),r}function Hv(e){const t={...e};return "props"in t||Object.defineProperty(t,"props",{get(){return Cn(false,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}const yY=(e,t,n)=>{if(!t||!t.length)return null;let r=false;const o=(s,[a,...l])=>{if(!a)return [s];const c=s.split(a);return r=r||c.length>1,c.reduce((u,d)=>[...u,...o(d,l)],[]).filter(Boolean)},i=o(e,t);return r?typeof n<"u"?i.slice(0,n):i:null};function CY(e){const{visible:t,values:n}=e;if(!t)return null;const r=50;return f__namespace.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},`${n.slice(0,r).map(({label:o,value:i})=>["number","string"].includes(typeof o)?o:i).join(", ")}`,n.length>r?", ...":null)}const xY=e=>{const t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null);},Z1=(e,t=1)=>{if(t<=0){e();return}xY(()=>{Z1(e,t-1);});};function wY(e,t,n){const[r,o]=f.useState(false);f.useEffect(()=>{o(true);},[]);const[i,s]=Bt(false,e),l=n(r?i:false),c=f.useRef(0),u=lt(m=>{t&&l!==m&&t(m),s(m);}),d=lt((m,p={})=>{const{cancelFun:h}=p;c.current+=1;const g=c.current,b=typeof m=="boolean"?m:!l;function y(){g===c.current&&!h?.()&&u(b);}b?y():Z1(()=>{y();});});return [l,d]}function pg(e){const{children:t,...n}=e;return t?f__namespace.createElement("div",n,t):null}const D5=f__namespace.createContext(null);function Qu(){return f__namespace.useContext(D5)}const z5=f__namespace.forwardRef((e,t)=>{const{onChange:n,onKeyDown:r,onBlur:o,style:i,syncWidth:s,value:a,className:l,autoComplete:c,...u}=e,{prefixCls:d,mode:m,onSearch:p,onSearchSubmit:h,onInputBlur:g,autoFocus:b,tokenWithEnter:y,placeholder:C,components:{input:x="input"}}=Qu(),{id:w,classNames:S,styles:I,open:$,activeDescendantId:E,role:P,disabled:M}=na()||{},N=H(`${d}-input`,S?.input,l),A=f__namespace.useRef(false),k=f__namespace.useRef(null),R=f__namespace.useRef(null);f__namespace.useImperativeHandle(t,()=>R.current);const L=q=>{let{value:U}=q.target;if(y&&k.current&&/[\r\n]/.test(k.current)){const K=k.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");U=U.replace(K,k.current);}k.current=null,p&&p(U,true,A.current),n?.(q);},V=q=>{const{key:U}=q,{value:K}=q.currentTarget;U==="Enter"&&m==="tags"&&!A.current&&h&&h(K),r?.(q);},_=q=>{g?.(),o?.(q);},z=()=>{A.current=true;},D=q=>{if(A.current=false,m!=="combobox"){const{value:U}=q.currentTarget;p?.(U,true,false);}},W=q=>{const{clipboardData:U}=q,K=U?.getData("text");k.current=K||"";},[O,B]=f__namespace.useState(void 0);Kt(()=>{const q=R.current;if(s&&q){q.style.width="0px";const U=q.scrollWidth;B(U),q.style.width="";}},[s,a]);const j={id:w,type:m==="combobox"?"text":"search",...u,ref:R,style:{...I?.input,...i,"--select-input-width":O},autoFocus:b,autoComplete:c||"off",className:N,disabled:M,value:a||"",onChange:L,onKeyDown:V,onBlur:_,onPaste:W,onCompositionStart:z,onCompositionEnd:D,role:P||"combobox","aria-expanded":$||false,"aria-haspopup":"listbox","aria-owns":$?`${w}_list`:void 0,"aria-autocomplete":"list","aria-controls":$?`${w}_list`:void 0,"aria-activedescendant":$?E:void 0};if(f__namespace.isValidElement(x)){const q=x.props||{},U={placeholder:e.placeholder||C,...j,...q};return Object.keys(q).forEach(K=>{const J=q[K];typeof J=="function"&&(U[K]=(...Q)=>{J(...Q),j[K]?.(...Q);});}),U.ref=In(x.ref,j.ref),f__namespace.cloneElement(x,U)}const Y=x;return f__namespace.createElement(Y,j)});function _5(e){const{prefixCls:t,placeholder:n,displayValues:r}=Qu(),{classNames:o,styles:i}=na(),{show:s=true}=e;return r.length?null:f__namespace.createElement("div",{className:H(`${t}-placeholder`,o?.placeholder),style:{visibility:s?"visible":"hidden",...i?.placeholder}},n)}const J1=f__namespace.createContext(null);function H5(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function SY(e){return e!=null}function $Y(e){return !e&&e!==0}function r2(e){return ["string","number"].includes(typeof e)}function Vv(e){let t;return e&&(r2(e.title)?t=e.title.toString():r2(e.label)&&(t=e.label.toString())),t}function jv(){return jv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},jv.apply(this,arguments)}const EY=f__namespace.forwardRef(({inputProps:e},t)=>{const{prefixCls:n,searchValue:r,activeValue:o,displayValues:i,maxLength:s,mode:a}=Qu(),{triggerOpen:l,title:c,showSearch:u,classNames:d,styles:m}=na(),p=f__namespace.useContext(J1),[h,g]=f__namespace.useState(false),b=a==="combobox",y=i[0],C=f__namespace.useMemo(()=>b&&o&&!h&&l?o:u?r:"",[b,o,h,l,r,u]),x=f__namespace.useMemo(()=>{let w={className:`${n}-content-value`,style:{visibility:C?"hidden":"visible"}};if(y&&p?.flattenOptions){const S=p.flattenOptions.find(I=>I.value===y.value);if(S?.data){const{label:I,value:$,className:E,style:P,key:M,...N}=S.data;w={...w,...N,title:Vv(S.data),className:H(w.className,E),style:{...w.style,...P}};}}return y&&!w.title&&(w.title=Vv(y)),c!==void 0&&(w.title=c),w},[y,p?.flattenOptions,n,C,c]);return f__namespace.useEffect(()=>{b&&g(false);},[b,o]),f__namespace.createElement("div",{className:H(`${n}-content`,d?.content),style:m?.content},y?f__namespace.createElement("div",x,y.label):f__namespace.createElement(_5,{show:!C}),f__namespace.createElement(z5,jv({ref:t},e,{value:C,maxLength:a==="combobox"?s:void 0,onChange:w=>{g(true),e.onChange?.(w);}})))}),V5=e=>{const{className:t,style:n,customizeIcon:r,customizeIconProps:o,children:i,onMouseDown:s,onClick:a}=e,l=typeof r=="function"?r(o):r;return f__namespace.createElement("span",{className:t,onMouseDown:c=>{c.preventDefault(),s?.(c);},style:{userSelect:"none",WebkitUserSelect:"none",...n},unselectable:"on",onClick:a,"aria-hidden":true},l!==void 0?l:f__namespace.createElement("span",{className:H(t.split(/\s+/).map(c=>`${c}-icon`))},i))};function Wv(){return Wv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Wv.apply(this,arguments)}function IY(e){return e.key??e.value}const o2=e=>{e.preventDefault(),e.stopPropagation();},PY=f__namespace.forwardRef(function({inputProps:t},n){const{prefixCls:r,displayValues:o,searchValue:i,mode:s,onSelectorRemove:a,removeIcon:l}=Qu(),{disabled:c,showSearch:u,triggerOpen:d,toggleOpen:m,autoClearSearchValue:p,tagRender:h,maxTagPlaceholder:g,maxTagTextLength:b,maxTagCount:y,classNames:C,styles:x}=na(),w=`${r}-selection-item`;let S=i;!d&&s==="multiple"&&p!==false&&(S="");const I=u&&S||"",$=u&&!c,E=l??"×",P=g??(_=>`+ ${_.length} ...`),M=h,N=_=>{m(_);},A=_=>{a?.(_);},k=(_,z,D,W,O)=>f__namespace.createElement("span",{title:Vv(_),className:H(w,{[`${w}-disabled`]:D},C?.item),style:x?.item},f__namespace.createElement("span",{className:H(`${w}-content`,C?.itemContent),style:x?.itemContent},z),W&&f__namespace.createElement(V5,{className:H(`${w}-remove`,C?.itemRemove),style:x?.itemRemove,onMouseDown:o2,onClick:O,customizeIcon:E},"×")),R=(_,z,D,W,O,B,j)=>{const Y=q=>{o2(q),N(!d);};return f__namespace.createElement("span",{onMouseDown:Y},M({label:z,value:_,index:j?.index,disabled:D,closable:W,onClose:O,isMaxTag:!!B}))},L=(_,z)=>{const{disabled:D,label:W,value:O}=_,B=!c&&!D;let j=W;if(typeof b=="number"&&(typeof W=="string"||typeof W=="number")){const q=String(j);q.length>b&&(j=`${q.slice(0,b)}...`);}const Y=q=>{q&&q.stopPropagation(),A(_);};return typeof M=="function"?R(O,j,D,B,Y,void 0,z):k(_,j,D,B,Y)},V=_=>{if(!o.length)return null;const z=typeof P=="function"?P(_):P;return typeof M=="function"?R(void 0,z,false,false,void 0,true):k({title:z},z,false)};return f__namespace.createElement(oi,{prefixCls:`${r}-content`,className:C?.content,style:x?.content,prefix:!o.length&&(!i||!d)?f__namespace.createElement(_5,null):null,data:o,renderItem:L,renderRest:V,suffix:f__namespace.createElement(z5,Wv({ref:n,disabled:c,readOnly:!$},t,{value:I||"",syncWidth:true})),itemKey:IY,maxCount:y})}),NY=f__namespace.forwardRef(function(t,n){const{multiple:r,onInputKeyDown:o,tabIndex:i}=Qu(),s=na(),{showSearch:a}=s,c={...or(s,{aria:true}),onKeyDown:o,readOnly:!a,tabIndex:i};return r?f__namespace.createElement(PY,{ref:n,inputProps:c}):f__namespace.createElement(EY,{ref:n,inputProps:c})});function MY(e){return e&&![_e.ESC,_e.SHIFT,_e.BACKSPACE,_e.TAB,_e.WIN_KEY,_e.ALT,_e.META,_e.WIN_KEY_RIGHT,_e.CTRL,_e.SEMICOLON,_e.EQUALS,_e.CAPS_LOCK,_e.CONTEXT_MENU,_e.UP,_e.LEFT,_e.RIGHT,_e.F1,_e.F2,_e.F3,_e.F4,_e.F5,_e.F6,_e.F7,_e.F8,_e.F9,_e.F10,_e.F11,_e.F12].includes(e)}function um(){return um=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},um.apply(this,arguments)}const RY=["value","onChange","removeIcon","placeholder","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex","activeValue","onSelectorRemove","focused"],AY=f__namespace.forwardRef(function(t,n){const{prefixCls:r,className:o,style:i,prefix:s,suffix:a,clearIcon:l,children:c,multiple:u,displayValues:d,placeholder:m,mode:p,searchValue:h,onSearch:g,onSearchSubmit:b,onInputBlur:y,maxLength:C,autoFocus:x,onMouseDown:w,onClearMouseDown:S,onInputKeyDown:I,onSelectorRemove:$,tokenWithEnter:E,components:P,...M}=t,{triggerOpen:N,toggleOpen:A,showSearch:k,disabled:R,loading:L,classNames:V,styles:_}=na(),z=f__namespace.useRef(null),D=f__namespace.useRef(null),W=lt(q=>{const{which:U}=q,K=D.current instanceof HTMLTextAreaElement;!K&&N&&(U===_e.UP||U===_e.DOWN)&&q.preventDefault(),I&&I(q),!(K&&!N&&~[_e.UP,_e.DOWN,_e.LEFT,_e.RIGHT].indexOf(U))&&MY(U)&&A(true);});f__namespace.useImperativeHandle(n,()=>({focus:q=>{(D.current||z.current).focus?.(q);},blur:()=>{(D.current||z.current).blur?.();},nativeElement:z.current}));const O=lt(q=>{if(!R){const U=Vc(D.current);q.nativeEvent._ori_target=U,U&&q.target!==U&&!U.contains(q.target)&&q.preventDefault();const K=N&&!u&&(p==="combobox"||k);q.nativeEvent._select_lazy?N&&A(false):(D.current?.focus(),K||A());}w?.(q);}),{root:B}=P,j=Zt(M,RY),Y={...t,onInputKeyDown:W};return B?f__namespace.isValidElement(B)?f__namespace.cloneElement(B,{...j,ref:In(B.ref,z)}):f__namespace.createElement(B,um({},j,{ref:z})):f__namespace.createElement(D5.Provider,{value:Y},f__namespace.createElement("div",um({},j,{ref:z,className:o,style:i,onMouseDown:O}),f__namespace.createElement(pg,{className:H(`${r}-prefix`,V?.prefix),style:_?.prefix},s),f__namespace.createElement(NY,{ref:D}),f__namespace.createElement(pg,{className:H(`${r}-suffix`,{[`${r}-suffix-loading`]:L},V?.suffix),style:_?.suffix},a),l&&f__namespace.createElement(pg,{className:H(`${r}-clear`,V?.clear),style:_?.clear,onMouseDown:q=>{q.nativeEvent._select_lazy=true,S?.(q);}},l),c))});function TY(e,t,n){return f__namespace.useMemo(()=>{let{root:r,input:o}=e||{};return n&&(r=n()),t&&(o=t()),{root:r,input:o}},[e,t,n])}function qv(){return qv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},qv.apply(this,arguments)}const Uv=e=>e==="tags"||e==="multiple",OY=f__namespace.forwardRef((e,t)=>{const{id:n,prefixCls:r,className:o,styles:i,classNames:s,showSearch:a,tagRender:l,showScrollBar:c="optional",direction:u,omitDomProps:d,displayValues:m,onDisplayValuesChange:p,emptyOptions:h,notFoundContent:g="Not Found",onClear:b,maxCount:y,placeholder:C,mode:x,disabled:w,loading:S,getInputElement:I,getRawInputElement:$,open:E,defaultOpen:P,onPopupVisibleChange:M,activeValue:N,onActiveValueChange:A,activeDescendantId:k,searchValue:R,autoClearSearchValue:L,onSearch:V,onSearchSplit:_,tokenSeparators:z,allowClear:D,prefix:W,suffix:O,suffixIcon:B,clearIcon:j,OptionList:Y,animation:q,transitionName:U,popupStyle:K,popupClassName:J,popupMatchSelectWidth:Q,popupRender:G,popupAlign:ee,placement:re,builtinPlacements:oe,getPopupContainer:be,showAction:Z=[],onFocus:te,onBlur:ce,onKeyUp:ue,onKeyDown:he,onMouseDown:ye,components:pe,...ie}=e,ge=Uv(x),Se=f__namespace.useRef(null),ke=f__namespace.useRef(null),qe=f__namespace.useRef(null),[De,ze]=f__namespace.useState(false);f__namespace.useImperativeHandle(t,()=>({focus:Se.current?.focus,blur:Se.current?.blur,scrollTo:me=>qe.current?.scrollTo(me),nativeElement:Vc(Se.current)}));const je=TY(pe,I,$),Le=f__namespace.useMemo(()=>{if(x!=="combobox")return R;const me=m[0]?.value;return typeof me=="string"||typeof me=="number"?String(me):""},[R,x,m]),we=x==="combobox"&&typeof I=="function"&&I()||null,Me=!g&&h,[Fe,Re]=wY(E,M,me=>w||Me?false:me),Pe=f__namespace.useMemo(()=>(z||[]).some(me=>[`
`,`\r
`].includes(me)),[z]),Qe=(me,Ae,Ge)=>{if(ge&&_v(y)&&m.length>=y)return;let ut=true,Pt=me;A?.(null);const qt=yY(me,z,_v(y)?y-m.length:void 0),Xt=Ge?null:qt;return x!=="combobox"&&Xt&&(Pt="",_?.(Xt),Re(false),ut=false),V&&Le!==Pt&&V(Pt,{source:Ae?"typing":"effect"}),me&&Ae&&ut&&Re(true),ut},mt=me=>{!me||!me.trim()||V(me,{source:"submit"});};f__namespace.useEffect(()=>{!Fe&&!ge&&x!=="combobox"&&Qe("",false,false);},[Fe]),f__namespace.useEffect(()=>{w&&(Re(false),ze(false));},[w,Fe]);const[it,ct]=mY(),bt=f__namespace.useRef(false),pt=me=>{const Ae=it(),{key:Ge}=me,ut=Ge==="Enter";if(ut&&(x!=="combobox"&&me.preventDefault(),Fe||Re(true)),ct(!!Le),Ge==="Backspace"&&!Ae&&ge&&!Le&&m.length){const Pt=[...m];let qt=null;for(let Xt=Pt.length-1;Xt>=0;Xt-=1){const hn=Pt[Xt];if(!hn.disabled){Pt.splice(Xt,1),qt=hn;break}}qt&&p(Pt,{type:"remove",values:[qt]});}Fe&&(!ut||!bt.current)&&(ut&&(bt.current=true),qe.current?.onKeyDown(me)),he?.(me);},rt=(me,...Ae)=>{Fe&&qe.current?.onKeyUp(me,...Ae),me.key==="Enter"&&(bt.current=false),ue?.(me,...Ae);},et=lt(me=>{const Ae=m.filter(Ge=>Ge!==me);p(Ae,{type:"remove",values:[me]});}),Xe=()=>{bt.current=false;},Ie=()=>[Vc(Se.current),ke.current?.getPopupElement()];pY(Ie,Fe,Re,!!je.root);const Ne=f__namespace.useRef(false),ae=me=>{ze(true),w||(Z.includes("focus")&&Re(true),te?.(me));},ve=()=>{Fe&&!Ne.current&&Re(false,{cancelFun:()=>B5(Ie(),document.activeElement)});},de=me=>{ze(false),Le&&(x==="tags"?V(Le,{source:"submit"}):x==="multiple"&&V("",{source:"blur"})),ve(),w||ce?.(me);},se=(me,...Ae)=>{const{target:Ge}=me;ke.current?.getPopupElement()?.contains(Ge)&&Re&&Re(true),ye?.(me,...Ae),Ne.current=true,Z1(()=>{Ne.current=false;});},[,Ce]=f__namespace.useState({});function fe(){Ce({});}let xe;je.root&&(xe=me=>{Re(me);});const Oe=f__namespace.useMemo(()=>({...e,notFoundContent:g,open:Fe,triggerOpen:Fe,id:n,showSearch:a,multiple:ge,toggleOpen:Re,showScrollBar:c,styles:i,classNames:s}),[e,g,Re,n,a,ge,Fe,c,i,s]),We=f__namespace.useMemo(()=>{const me=O??B;return typeof me=="function"?me({searchValue:Le,open:Fe,focused:De,showSearch:a,loading:S}):me},[O,B,Le,Fe,De,a,S]),Ze=()=>{b?.(),Se.current?.focus(),p([],{type:"clear",values:m}),Qe("",false,false);},{allowClear:st,clearIcon:Ct}=fY(r,m,D,j,w,Le,x),an=f__namespace.createElement(Y,{ref:qe}),On=H(r,o,{[`${r}-focused`]:De,[`${r}-multiple`]:ge,[`${r}-single`]:!ge,[`${r}-allow-clear`]:st,[`${r}-show-arrow`]:We!=null,[`${r}-disabled`]:w,[`${r}-loading`]:S,[`${r}-open`]:Fe,[`${r}-customize-input`]:we,[`${r}-show-search`]:a});let Rt=f__namespace.createElement(AY,qv({},ie,{ref:Se,prefixCls:r,className:On,focused:De,prefix:W,suffix:We,clearIcon:Ct,multiple:ge,mode:x,displayValues:m,placeholder:C,searchValue:Le,activeValue:N,onSearch:Qe,onSearchSubmit:mt,onInputBlur:Xe,onFocus:ae,onBlur:de,onClearMouseDown:Ze,onKeyDown:pt,onKeyUp:rt,onSelectorRemove:et,tokenWithEnter:Pe,onMouseDown:se,components:je}));return Rt=f__namespace.createElement(bY,{ref:ke,disabled:w,prefixCls:r,visible:Fe,popupElement:an,animation:q,transitionName:U,popupStyle:K,popupClassName:J,direction:u,popupMatchSelectWidth:Q,popupRender:G,popupAlign:ee,placement:re,builtinPlacements:oe,getPopupContainer:be,empty:h,onPopupVisibleChange:xe,onPopupMouseEnter:fe,onPopupMouseDown:se,onPopupBlur:ve},Rt),f__namespace.createElement(L5.Provider,{value:Oe},f__namespace.createElement(CY,{visible:De&&!Fe,values:m}),Rt)}),eC=()=>null;eC.isSelectOptGroup=true;const tC=()=>null;tC.isSelectOption=true;const j5=f__namespace.forwardRef(({height:e,offsetY:t,offsetX:n,children:r,prefixCls:o,onInnerResize:i,innerProps:s,rtl:a,extra:l},c)=>{let u={},d={display:"flex",flexDirection:"column"};return t!==void 0&&(u={height:e,position:"relative",overflow:"hidden"},d={...d,transform:`translateY(${t}px)`,[a?"marginRight":"marginLeft"]:-n,position:"absolute",left:0,right:0,top:0}),f__namespace.createElement("div",{style:u},f__namespace.createElement(Kr,{onResize:({offsetHeight:m})=>{m&&i&&i();}},f__namespace.createElement("div",dn({style:d,className:H({[`${o}-holder-inner`]:o}),ref:c},s),r,l)))});j5.displayName="Filler";function FY({children:e,setRef:t}){const n=f__namespace.useCallback(r=>{t(r);},[]);return f__namespace.cloneElement(e,{ref:n})}function LY(e,t,n,r,o,i,s,{getKey:a}){return e.slice(t,n+1).map((l,c)=>{const u=t+c,d=s(l,u,{style:{width:r},offsetX:o}),m=a(l);return f__namespace.createElement(FY,{key:m,setRef:p=>i(l,p)},d)})}function BY(e,t,n){const r=e.length,o=t.length;let i,s;if(r===0&&o===0)return null;r<o?(i=e,s=t):(i=t,s=e);const a={__EMPTY_ITEM__:true};function l(d){return d!==void 0?n(d):a}let c=null,u=Math.abs(r-o)!==1;for(let d=0;d<s.length;d+=1){const m=l(i[d]),p=l(s[d]);if(m!==p){c=d,u=u||m!==l(s[d+1]);break}}return c===null?null:{index:c,multiple:u}}function kY(e,t,n){const[r,o]=f__namespace.useState(e),[i,s]=f__namespace.useState(null);return f__namespace.useEffect(()=>{const a=BY(r||[],e||[],t);a?.index!==void 0&&s(e[a.index]),o(e);},[e]),[i]}const i2=typeof navigator=="object"&&/Firefox/i.test(navigator.userAgent),W5=(e,t,n,r)=>{const o=f.useRef(false),i=f.useRef(null);function s(){clearTimeout(i.current),o.current=true,i.current=setTimeout(()=>{o.current=false;},50);}const a=f.useRef({top:e,bottom:t,left:n,right:r});return a.current.top=e,a.current.bottom=t,a.current.left=n,a.current.right=r,(l,c,u=false)=>{const d=l?c<0&&a.current.left||c>0&&a.current.right:c<0&&a.current.top||c>0&&a.current.bottom;return u&&d?(clearTimeout(i.current),o.current=false):(!d||o.current)&&s(),!o.current&&d}};function DY(e,t,n,r,o,i,s){const a=f.useRef(0),l=f.useRef(null),c=f.useRef(null),u=f.useRef(false),d=W5(t,n,r,o);function m(C,x){if(gt.cancel(l.current),d(false,x))return;const w=C;if(!w._virtualHandled)w._virtualHandled=true;else return;a.current+=x,c.current=x,i2||w.preventDefault(),l.current=gt(()=>{const S=u.current?10:1;s(a.current*S,false),a.current=0;});}function p(C,x){s(x,true),i2||C.preventDefault();}const h=f.useRef(null),g=f.useRef(null);function b(C){if(!e)return;gt.cancel(g.current),g.current=gt(()=>{h.current=null;},2);const{deltaX:x,deltaY:w,shiftKey:S}=C;let I=x,$=w;(h.current==="sx"||!h.current&&S&&w&&!x)&&(I=w,$=0,h.current="sx");const E=Math.abs(I),P=Math.abs($);h.current===null&&(h.current=i&&E>P?"x":"y"),h.current==="y"?m(C,$):p(C,I);}function y(C){e&&(u.current=C.detail===c.current);}return [b,y]}function zY(e,t,n,r){const[o,i]=f__namespace.useMemo(()=>[new Map,[]],[e,n.id,r]);return (a,l=a)=>{let c=o.get(a),u=o.get(l);if(c===void 0||u===void 0){const d=e.length;for(let m=i.length;m<d;m+=1){const p=e[m],h=t(p);o.set(h,m);const g=n.get(h)??r;if(i[m]=(i[m-1]||0)+g,h===a&&(c=m),h===l&&(u=m),c!==void 0&&u!==void 0)break}}return {top:i[c-1]||0,bottom:i[u]}}}class _Y{maps;id=0;diffRecords=new Map;constructor(){this.maps=Object.create(null);}set(t,n){this.diffRecords.set(t,this.maps[t]),this.maps[t]=n,this.id+=1;}get(t){return this.maps[t]}resetRecord(){this.diffRecords.clear();}getRecord(){return this.diffRecords}}function s2(e){const t=parseFloat(e);return isNaN(t)?0:t}function HY(e,t,n){const[r,o]=f__namespace.useState(0),i=f.useRef(new Map),s=f.useRef(new _Y),a=f.useRef(0);function l(){a.current+=1;}function c(d=false){l();const m=()=>{let p=false;i.current.forEach((h,g)=>{if(h&&h.offsetParent){const{offsetHeight:b}=h,{marginTop:y,marginBottom:C}=getComputedStyle(h),x=s2(y),w=s2(C),S=b+x+w;s.current.get(g)!==S&&(s.current.set(g,S),p=true);}}),p&&o(h=>h+1);};if(d)m();else {a.current+=1;const p=a.current;Promise.resolve().then(()=>{p===a.current&&m();});}}function u(d,m){const p=e(d);i.current.get(p),m?(i.current.set(p,m),c()):i.current.delete(p);}return f.useEffect(()=>l,[]),[u,c,s.current,r]}const a2=14/15;function VY(e,t,n){const r=f.useRef(false),o=f.useRef(0),i=f.useRef(0),s=f.useRef(null),a=f.useRef(null);let l;const c=m=>{if(r.current){const p=Math.ceil(m.touches[0].pageX),h=Math.ceil(m.touches[0].pageY);let g=o.current-p,b=i.current-h;const y=Math.abs(g)>Math.abs(b);y?o.current=p:i.current=h;const C=n(y,y?g:b,false,m);C&&m.preventDefault(),clearInterval(a.current),C&&(a.current=setInterval(()=>{y?g*=a2:b*=a2;const x=Math.floor(y?g:b);(!n(y,x,true)||Math.abs(x)<=.1)&&clearInterval(a.current);},16));}},u=()=>{r.current=false,l();},d=m=>{l(),m.touches.length===1&&!r.current&&(r.current=true,o.current=Math.ceil(m.touches[0].pageX),i.current=Math.ceil(m.touches[0].pageY),s.current=m.target,s.current.addEventListener("touchmove",c,{passive:false}),s.current.addEventListener("touchend",u,{passive:true}));};l=()=>{s.current&&(s.current.removeEventListener("touchmove",c),s.current.removeEventListener("touchend",u));},Kt(()=>(e&&t.current.addEventListener("touchstart",d,{passive:true}),()=>{t.current?.removeEventListener("touchstart",d),l(),clearInterval(a.current);}),[e]);}function l2(e){return Math.floor(e**.5)}function Gv(e,t){return ("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}function jY(e,t,n){f__namespace.useEffect(()=>{const r=t.current;if(e&&r){let o=false,i,s;const a=()=>{gt.cancel(i);},l=()=>{a(),i=gt(()=>{n(s),l();});},c=()=>{o=false,a();},u=m=>{if(m.target.draggable||m.button!==0)return;const p=m;p._virtualHandled||(p._virtualHandled=true,o=true);},d=m=>{if(o){const p=Gv(m,false),{top:h,bottom:g}=r.getBoundingClientRect();if(p<=h){const b=h-p;s=-l2(b),l();}else if(p>=g){const b=p-g;s=l2(b),l();}else a();}};return r.addEventListener("mousedown",u),r.ownerDocument.addEventListener("mouseup",c),r.ownerDocument.addEventListener("mousemove",d),r.ownerDocument.addEventListener("dragend",c),()=>{r.removeEventListener("mousedown",u),r.ownerDocument.removeEventListener("mouseup",c),r.ownerDocument.removeEventListener("mousemove",d),r.ownerDocument.removeEventListener("dragend",c),a();}}},[e]);}const WY=10;function qY(e,t,n,r,o,i,s,a){const l=f__namespace.useRef(),[c,u]=f__namespace.useState(null);return Kt(()=>{if(c&&c.times<WY){if(!e.current){u(x=>({...x}));return}i();const{targetAlign:d,originAlign:m,index:p,offset:h}=c,g=e.current.clientHeight;let b=false,y=d,C=null;if(g){const x=d||m;let w=0,S=0,I=0;const $=Math.min(t.length-1,p);for(let P=0;P<=$;P+=1){const M=o(t[P]);S=w;const N=n.get(M);I=S+(N===void 0?r:N),w=I;}let E=x==="top"?h:g-h;for(let P=$;P>=0;P-=1){const M=o(t[P]),N=n.get(M);if(N===void 0){b=true;break}if(E-=N,E<=0)break}switch(x){case "top":C=S-h;break;case "bottom":C=I-g+h;break;default:{const{scrollTop:P}=e.current,M=P+g;S<P?y="top":I>M&&(y="bottom");}}C!==null&&s(C),C!==c.lastTop&&(b=true);}b&&u({...c,times:c.times+1,targetAlign:y,lastTop:C});}},[c,e.current]),d=>{if(d==null){a();return}if(gt.cancel(l.current),typeof d=="number")s(d);else if(d&&typeof d=="object"){let m;const{align:p}=d;"index"in d?{index:m}=d:m=t.findIndex(g=>o(g)===d.key);const{offset:h=0}=d;u({times:0,index:m,offset:h,originAlign:p});}}}const c2=f__namespace.forwardRef((e,t)=>{const{prefixCls:n,rtl:r,scrollOffset:o,scrollRange:i,onStartMove:s,onStopMove:a,onScroll:l,horizontal:c,spinSize:u,containerSize:d,style:m,thumbStyle:p,showScrollBar:h}=e,[g,b]=f__namespace.useState(false),[y,C]=f__namespace.useState(null),[x,w]=f__namespace.useState(null),S=!r,I=f__namespace.useRef(),$=f__namespace.useRef(),[E,P]=f__namespace.useState(h),M=f__namespace.useRef(),N=()=>{h===true||h===false||(clearTimeout(M.current),P(true),M.current=setTimeout(()=>{P(false);},3e3));},A=i-d||0,k=d-u||0,R=f__namespace.useMemo(()=>o===0||A===0?0:o/A*k,[o,A,k]),L=j=>{j.stopPropagation(),j.preventDefault();},V=f__namespace.useRef({top:R,dragging:g,pageY:y,startTop:x});V.current={top:R,dragging:g,pageY:y,startTop:x};const _=j=>{b(true),C(Gv(j,c)),w(V.current.top),s(),j.stopPropagation(),j.preventDefault();};f__namespace.useEffect(()=>{const j=U=>{U.preventDefault();},Y=I.current,q=$.current;return Y.addEventListener("touchstart",j,{passive:false}),q.addEventListener("touchstart",_,{passive:false}),()=>{Y.removeEventListener("touchstart",j),q.removeEventListener("touchstart",_);}},[]);const z=f__namespace.useRef();z.current=A;const D=f__namespace.useRef();D.current=k,f__namespace.useEffect(()=>{if(g){let j;const Y=U=>{const{dragging:K,pageY:J,startTop:Q}=V.current;gt.cancel(j);const G=I.current.getBoundingClientRect(),ee=d/(c?G.width:G.height);if(K){const re=(Gv(U,c)-J)*ee;let oe=Q;!S&&c?oe-=re:oe+=re;const be=z.current,Z=D.current,te=Z?oe/Z:0;let ce=Math.ceil(te*be);ce=Math.max(ce,0),ce=Math.min(ce,be),j=gt(()=>{l(ce,c);});}},q=()=>{b(false),a();};return window.addEventListener("mousemove",Y,{passive:true}),window.addEventListener("touchmove",Y,{passive:true}),window.addEventListener("mouseup",q,{passive:true}),window.addEventListener("touchend",q,{passive:true}),()=>{window.removeEventListener("mousemove",Y),window.removeEventListener("touchmove",Y),window.removeEventListener("mouseup",q),window.removeEventListener("touchend",q),gt.cancel(j);}}},[g]),f__namespace.useEffect(()=>(N(),()=>{clearTimeout(M.current);}),[o]),f__namespace.useImperativeHandle(t,()=>({delayHidden:N}));const W=`${n}-scrollbar`,O={position:"absolute",visibility:E?null:"hidden"},B={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return c?(Object.assign(O,{height:8,left:0,right:0,bottom:0}),Object.assign(B,{height:"100%",width:u,[S?"left":"right"]:R})):(Object.assign(O,{width:8,top:0,bottom:0,[S?"right":"left"]:0}),Object.assign(B,{width:"100%",height:u,top:R})),f__namespace.createElement("div",{ref:I,className:H(W,{[`${W}-horizontal`]:c,[`${W}-vertical`]:!c,[`${W}-visible`]:E}),style:{...O,...m},onMouseDown:L,onMouseMove:N},f__namespace.createElement("div",{ref:$,className:H(`${W}-thumb`,{[`${W}-thumb-moving`]:g}),style:{...B,...p},onMouseDown:_}))}),UY=20;function u2(e=0,t=0){let n=e/t*e;return isNaN(n)&&(n=0),n=Math.max(n,UY),Math.floor(n)}const GY=[],KY={overflowY:"auto",overflowAnchor:"none"};function XY(e,t){const{prefixCls:n="rc-virtual-list",className:r,height:o,itemHeight:i,fullHeight:s=true,style:a,data:l,children:c,itemKey:u,virtual:d,direction:m,scrollWidth:p,component:h="div",onScroll:g,onVirtualScroll:b,onVisibleChange:y,innerProps:C,extraRender:x,styles:w,showScrollBar:S="optional",...I}=e,$=f__namespace.useCallback(de=>typeof u=="function"?u(de):de?.[u],[u]),[E,P,M,N]=HY($),A=!!(d!==false&&o&&i),k=f__namespace.useMemo(()=>Object.values(M.maps).reduce((de,se)=>de+se,0),[M.id,M.maps]),R=A&&l&&(Math.max(i*l.length,k)>o||!!p),L=m==="rtl",V=H(n,{[`${n}-rtl`]:L},r),_=l||GY,z=f.useRef(),D=f.useRef(),W=f.useRef(),[O,B]=f.useState(0),[j,Y]=f.useState(0),[q,U]=f.useState(false),K=()=>{U(true);},J=()=>{U(false);},Q={getKey:$};function G(de){B(se=>{let Ce;typeof de=="function"?Ce=de(se):Ce=de;const fe=De(Ce);return z.current.scrollTop=fe,fe});}const ee=f.useRef({start:0,end:_.length}),re=f.useRef(),[oe]=kY(_,$);re.current=oe;const{scrollHeight:be,start:Z,end:te,offset:ce}=f__namespace.useMemo(()=>{if(!A)return {scrollHeight:void 0,start:0,end:_.length-1,offset:void 0};if(!R)return {scrollHeight:D.current?.offsetHeight||0,start:0,end:_.length-1,offset:void 0};let de=0,se,Ce,fe;const xe=_.length;for(let Oe=0;Oe<xe;Oe+=1){const We=_[Oe],Ze=$(We),st=M.get(Ze),Ct=de+(st===void 0?i:st);Ct>=O&&se===void 0&&(se=Oe,Ce=de),Ct>O+o&&fe===void 0&&(fe=Oe),de=Ct;}return se===void 0&&(se=0,Ce=0,fe=Math.ceil(o/i)),fe===void 0&&(fe=_.length-1),fe=Math.min(fe+1,_.length-1),{scrollHeight:de,start:se,end:fe,offset:Ce}},[R,A,O,_,N,o]);ee.current.start=Z,ee.current.end=te,f__namespace.useLayoutEffect(()=>{const de=M.getRecord();if(de.size===1){const se=Array.from(de.keys())[0],Ce=de.get(se),fe=_[Z];if(fe&&Ce===void 0&&$(fe)===se){const We=M.get(se)-i;G(Ze=>Ze+We);}}M.resetRecord();},[be]);const[ue,he]=f__namespace.useState({width:0,height:o}),ye=de=>{he({width:de.offsetWidth,height:de.offsetHeight});},pe=f.useRef(),ie=f.useRef(),ge=f__namespace.useMemo(()=>u2(ue.width,p),[ue.width,p]),Se=f__namespace.useMemo(()=>u2(ue.height,be),[ue.height,be]),ke=be-o,qe=f.useRef(ke);qe.current=ke;function De(de){let se=de;return Number.isNaN(qe.current)||(se=Math.min(se,qe.current)),se=Math.max(se,0),se}const ze=O<=0,je=O>=ke,Le=j<=0,we=j>=p,Me=W5(ze,je,Le,we),Fe=()=>({x:L?-j:j,y:O}),Re=f.useRef(Fe()),Pe=lt(de=>{if(b){const se={...Fe(),...de};(Re.current.x!==se.x||Re.current.y!==se.y)&&(b(se),Re.current=se);}});function Qe(de,se){const Ce=de;se?(ST.flushSync(()=>{Y(Ce);}),Pe()):G(Ce);}function mt(de){const{scrollTop:se}=de.currentTarget;se!==O&&G(se),g?.(de),Pe();}const it=de=>{let se=de;const Ce=p?p-ue.width:0;return se=Math.max(se,0),se=Math.min(se,Ce),se},ct=lt((de,se)=>{se?(ST.flushSync(()=>{Y(Ce=>{const fe=Ce+(L?-de:de);return it(fe)});}),Pe()):G(Ce=>Ce+de);}),[bt,pt]=DY(A,ze,je,Le,we,!!p,ct);VY(A,z,(de,se,Ce,fe)=>{const xe=fe;return Me(de,se,Ce)?false:!xe||!xe._virtualHandled?(xe&&(xe._virtualHandled=true),bt({preventDefault(){},deltaX:de?se:0,deltaY:de?0:se}),true):false}),jY(R,z,de=>{G(se=>se+de);}),Kt(()=>{function de(Ce){const fe=ze&&Ce.detail<0,xe=je&&Ce.detail>0;A&&!fe&&!xe&&Ce.preventDefault();}const se=z.current;return se.addEventListener("wheel",bt,{passive:false}),se.addEventListener("DOMMouseScroll",pt,{passive:true}),se.addEventListener("MozMousePixelScroll",de,{passive:false}),()=>{se.removeEventListener("wheel",bt),se.removeEventListener("DOMMouseScroll",pt),se.removeEventListener("MozMousePixelScroll",de);}},[A,ze,je]),Kt(()=>{if(p){const de=it(j);Y(de),Pe({x:de});}},[ue.width,p]);const rt=()=>{pe.current?.delayHidden(),ie.current?.delayHidden();},et=qY(z,_,M,i,$,()=>P(true),G,rt);f__namespace.useImperativeHandle(t,()=>({nativeElement:W.current,getScrollInfo:Fe,scrollTo:de=>{function se(Ce){return Ce&&typeof Ce=="object"&&("left"in Ce||"top"in Ce)}se(de)?(de.left!==void 0&&Y(it(de.left)),et(de.top)):et(de);}})),Kt(()=>{if(y){const de=_.slice(Z,te+1);y(de,_);}},[Z,te,_]);const Xe=zY(_,$,M,i),Ie=x?.({start:Z,end:te,virtual:R,offsetX:j,offsetY:ce,rtl:L,getSize:Xe}),Ne=LY(_,Z,te,p,j,E,c,Q);let ae=null;o&&(ae={[s?"height":"maxHeight"]:o,...KY},A&&(ae.overflowY="hidden",p&&(ae.overflowX="hidden"),q&&(ae.pointerEvents="none")));const ve={};return L&&(ve.dir="rtl"),f__namespace.createElement("div",dn({ref:W,style:{...a,position:"relative"},className:V},ve,I),f__namespace.createElement(Kr,{onResize:ye},f__namespace.createElement(h,{className:`${n}-holder`,style:ae,ref:z,onScroll:mt,onMouseEnter:rt},f__namespace.createElement(j5,{prefixCls:n,height:be,offsetX:j,offsetY:ce,scrollWidth:p,onInnerResize:P,ref:D,innerProps:C,rtl:L,extra:Ie},Ne))),R&&be>o&&f__namespace.createElement(c2,{ref:pe,prefixCls:n,scrollOffset:O,scrollRange:be,rtl:L,onScroll:Qe,onStartMove:K,onStopMove:J,spinSize:Se,containerSize:ue.height,style:w?.verticalScrollBar,thumbStyle:w?.verticalScrollBarThumb,showScrollBar:S}),R&&p>ue.width&&f__namespace.createElement(c2,{ref:ie,prefixCls:n,scrollOffset:j,scrollRange:p,rtl:L,onScroll:Qe,onStartMove:K,onStopMove:J,spinSize:ge,containerSize:ue.width,horizontal:true,style:w?.horizontalScrollBar,thumbStyle:w?.horizontalScrollBarThumb,showScrollBar:S}))}const q5=f__namespace.forwardRef(XY);q5.displayName="List";function YY(){return /(mac\sos|macintosh)/i.test(navigator.appVersion)}function $c(){return $c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},$c.apply(this,arguments)}function d2(e){return typeof e=="string"||typeof e=="number"}const QY=(e,t)=>{const{prefixCls:n,id:r,open:o,multiple:i,mode:s,searchValue:a,toggleOpen:l,notFoundContent:c,onPopupScroll:u,showScrollBar:d}=na(),{maxCount:m,flattenOptions:p,onActiveValue:h,defaultActiveFirstOption:g,onSelect:b,menuItemSelectedIcon:y,rawValues:C,fieldNames:x,virtual:w,direction:S,listHeight:I,listItemHeight:$,optionRender:E,classNames:P,styles:M}=f__namespace.useContext(J1),N=`${n}-item`,A=ll(()=>p,[o,p],(Q,G)=>G[0]&&Q[1]!==G[1]),k=f__namespace.useRef(null),R=f__namespace.useMemo(()=>i&&_v(m)&&C?.size>=m,[i,m,C?.size]),L=Q=>{Q.preventDefault();},V=Q=>{k.current?.scrollTo(typeof Q=="number"?{index:Q}:Q);},_=f__namespace.useCallback(Q=>s==="combobox"?false:C.has(Q),[s,[...C].toString(),C.size]),z=(Q,G=1)=>{const ee=A.length;for(let re=0;re<ee;re+=1){const oe=(Q+re*G+ee)%ee,{group:be,data:Z}=A[oe]||{};if(!be&&!Z?.disabled&&(_(Z.value)||!R))return oe}return -1},[D,W]=f__namespace.useState(()=>z(0)),O=(Q,G=false)=>{W(Q);const ee={source:G?"keyboard":"mouse"},re=A[Q];if(!re){h(null,-1,ee);return}h(re.value,Q,ee);};f.useEffect(()=>{O(g!==false?z(0):-1);},[A.length,a]);const B=f__namespace.useCallback(Q=>s==="combobox"?String(Q).toLowerCase()===a.toLowerCase():C.has(Q),[s,a,[...C].toString(),C.size]);f.useEffect(()=>{let Q;if(!i&&o&&C.size===1){const G=Array.from(C)[0],ee=A.findIndex(({data:re})=>a?String(re.value).startsWith(a):re.value===G);ee!==-1&&(O(ee),Q=setTimeout(()=>{V(ee);}));}return o&&k.current?.scrollTo(void 0),()=>clearTimeout(Q)},[o,a]);const j=Q=>{Q!==void 0&&b(Q,{selected:!C.has(Q)}),i||l(false);};if(f__namespace.useImperativeHandle(t,()=>({onKeyDown:Q=>{const{which:G,ctrlKey:ee}=Q;switch(G){case _e.N:case _e.P:case _e.UP:case _e.DOWN:{let re=0;if(G===_e.UP?re=-1:G===_e.DOWN?re=1:YY()&&ee&&(G===_e.N?re=1:G===_e.P&&(re=-1)),re!==0){const oe=z(D+re,re);V(oe),O(oe,true);}break}case _e.TAB:case _e.ENTER:{const re=A[D];if(!re||re.data.disabled)return j(void 0);!R||C.has(re.value)?j(re.value):j(void 0),o&&Q.preventDefault();break}case _e.ESC:l(false),o&&Q.stopPropagation();}},onKeyUp:()=>{},scrollTo:Q=>{V(Q);}})),A.length===0)return f__namespace.createElement("div",{role:"listbox",id:`${r}_list`,className:`${N}-empty`,onMouseDown:L},c);const Y=Object.keys(x).map(Q=>x[Q]),q=Q=>Q.label;function U(Q,G){const{group:ee}=Q;return {role:ee?"presentation":"option",id:`${r}_list_${G}`}}const K=Q=>{const G=A[Q];if(!G)return null;const ee=G.data||{},{value:re}=ee,{group:oe}=G,be=or(ee,true),Z=q(G);return G?f__namespace.createElement("div",$c({"aria-label":typeof Z=="string"&&!oe?Z:null},be,{key:Q},U(G,Q),{"aria-selected":B(re)}),re):null},J={role:"listbox",id:`${r}_list`};return f__namespace.createElement(f__namespace.Fragment,null,w&&f__namespace.createElement("div",$c({},J,{style:{height:0,width:0,overflow:"hidden"}}),K(D-1),K(D),K(D+1)),f__namespace.createElement(q5,{itemKey:"key",ref:k,data:A,height:I,itemHeight:$,fullHeight:false,onMouseDown:L,onScroll:u,virtual:w,direction:S,innerProps:w?null:J,showScrollBar:d,className:P?.popup?.list,style:M?.popup?.list},(Q,G)=>{const{group:ee,groupOption:re,data:oe,label:be,value:Z}=Q,{key:te}=oe;if(ee){const Me=oe.title??(d2(be)?be.toString():void 0);return f__namespace.createElement("div",{className:H(N,`${N}-group`,oe.className),title:Me},be!==void 0?be:te)}const{disabled:ce,title:ue,children:he,style:ye,className:pe,...ie}=oe,ge=Zt(ie,Y),Se=_(Z),ke=ce||!Se&&R,qe=`${N}-option`,De=H(N,qe,pe,P?.popup?.listItem,{[`${qe}-grouped`]:re,[`${qe}-active`]:D===G&&!ke,[`${qe}-disabled`]:ke,[`${qe}-selected`]:Se}),ze=q(Q),je=!y||typeof y=="function"||Se,Le=typeof ze=="number"?ze:ze||Z;let we=d2(Le)?Le.toString():void 0;return ue!==void 0&&(we=ue),f__namespace.createElement("div",$c({},or(ge),w?{}:U(Q,G),{"aria-selected":w?void 0:B(Z),className:De,title:we,onMouseMove:()=>{D===G||ke||O(G);},onClick:()=>{ke||j(Z);},style:{...M?.popup?.listItem,...ye}}),f__namespace.createElement("div",{className:`${qe}-content`},typeof E=="function"?E(Q,{index:G}):Le),f__namespace.isValidElement(y)||Se,je&&f__namespace.createElement(V5,{className:`${N}-option-state`,customizeIcon:y,customizeIconProps:{value:Z,disabled:ke,isSelected:Se}},Se?"✓":null))}))},ZY=f__namespace.forwardRef(QY),JY=(e,t)=>{const n=f__namespace.useRef({values:new Map,options:new Map}),r=f__namespace.useMemo(()=>{const{values:i,options:s}=n.current,a=e.map(u=>u.label===void 0?{...u,label:i.get(u.value)?.label}:u),l=new Map,c=new Map;return a.forEach(u=>{l.set(u.value,u),c.set(u.value,t.get(u.value)||s.get(u.value));}),n.current.values=l,n.current.options=c,a},[e,t]),o=f__namespace.useCallback(i=>t.get(i)||n.current.options.get(i),[t]);return [r,o]};function hg(e,t){return H5(e).join("").toUpperCase().includes(t)}const eQ=(e,t,n,r,o)=>f__namespace.useMemo(()=>{if(!n||r===false)return e;const{options:i,label:s,value:a}=t,l=[],c=typeof r=="function",u=n.toUpperCase(),d=c?r:(p,h)=>o&&o.length?o.some(g=>hg(h[g],u)):h[i]?hg(h[s!=="children"?s:"label"],u):hg(h[a],u),m=c?p=>Hv(p):p=>p;return e.forEach(p=>{if(p[i]){if(d(n,m(p)))l.push(p);else {const g=p[i].filter(b=>d(n,m(b)));g.length&&l.push({...p,[i]:g});}return}d(n,m(p))&&l.push(p);}),l},[e,r,o,n,t]);function tQ(e){const{key:t,props:{children:n,value:r,...o}}=e;return {key:t,value:r!==void 0?r:t,children:n,...o}}function U5(e,t=false){return gr(e).map((n,r)=>{if(!f__namespace.isValidElement(n)||!n.type)return null;const{type:{isSelectOptGroup:o},key:i,props:{children:s,...a}}=n;return t||!o?tQ(n):{key:`__RC_SELECT_GRP__${i===null?r:i}__`,label:i,...a,options:U5(s)}}).filter(n=>n)}const nQ=(e,t,n,r,o)=>f__namespace.useMemo(()=>{let i=e;!e&&(i=U5(t));const a=new Map,l=new Map,c=(d,m,p)=>{p&&typeof p=="string"&&d.set(m[p],m);},u=(d,m=false)=>{for(let p=0;p<d.length;p+=1){const h=d[p];!h[n.options]||m?(a.set(h[n.value],h),c(l,h,n.label),r.forEach(g=>{c(l,h,g);}),c(l,h,o)):u(h[n.options],true);}};return u(i),{options:i,valueOptions:a,labelOptions:l}},[e,t,n,r,o]);function f2(e){const t=f__namespace.useRef();return t.current=e,f__namespace.useCallback((...r)=>t.current(...r),[])}function rQ(e,t,n){const{filterOption:r,searchValue:o,optionFilterProp:i,filterSort:s,onSearch:a,autoClearSearchValue:l}=t;return f__namespace.useMemo(()=>{const c=typeof e=="object",u={filterOption:r,searchValue:o,optionFilterProp:i,filterSort:s,onSearch:a,autoClearSearchValue:l,...c?e:{}};return [c||n==="combobox"||n==="tags"||n==="multiple"&&e===void 0?true:e,u]},[n,e,r,o,i,s,a,l])}function Kv(){return Kv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Kv.apply(this,arguments)}const oQ=["inputValue"];function iQ(e){return !e||typeof e!="object"}const sQ=f__namespace.forwardRef((e,t)=>{const{id:n,mode:r,prefixCls:o="rc-select",backfill:i,fieldNames:s,showSearch:a,searchValue:l,onSearch:c,autoClearSearchValue:u,filterOption:d,optionFilterProp:m,filterSort:p,onSelect:h,onDeselect:g,onActive:b,popupMatchSelectWidth:y=true,optionLabelProp:C,options:x,optionRender:w,children:S,defaultActiveFirstOption:I,menuItemSelectedIcon:$,virtual:E,direction:P,listHeight:M=200,listItemHeight:N=20,labelRender:A,value:k,defaultValue:R,labelInValue:L,onChange:V,maxCount:_,classNames:z,styles:D,...W}=e,O={searchValue:l,onSearch:c,autoClearSearchValue:u,filterOption:d,optionFilterProp:m,filterSort:p},[B,j]=rQ(a,O,r),{filterOption:Y,searchValue:q,optionFilterProp:U,filterSort:K,onSearch:J,autoClearSearchValue:Q=true}=j,G=f__namespace.useMemo(()=>U?Array.isArray(U)?U:[U]:[],[U]),ee=Ws(n),re=Uv(r),oe=!!(!x&&S),be=f__namespace.useMemo(()=>Y===void 0&&r==="combobox"?false:Y,[Y,r]),Z=f__namespace.useMemo(()=>k5(s,oe),[JSON.stringify(s),oe]),[te,ce]=Bt("",q),ue=te||"",he=nQ(x,S,Z,G,C),{valueOptions:ye,labelOptions:pe,options:ie}=he,ge=f__namespace.useCallback(fe=>H5(fe).map(Oe=>{let We,Ze,st,Ct;iQ(Oe)?We=Oe:(Ze=Oe.label,We=Oe.value);const an=ye.get(We);return an&&(Ze===void 0&&(Ze=an?.[C||Z.label]),st=an?.disabled,Ct=an?.title),{label:Ze,value:We,key:We,disabled:st,title:Ct}}),[Z,C,ye]),[Se,ke]=Bt(R,k),qe=f__namespace.useMemo(()=>{const xe=ge(re&&Se===null?[]:Se);return r==="combobox"&&$Y(xe[0]?.value)?[]:xe},[Se,ge,r,re]),[De,ze]=JY(qe,ye),je=f__namespace.useMemo(()=>{if(!r&&De.length===1){const fe=De[0];if(fe.value===null&&(fe.label===null||fe.label===void 0))return []}return De.map(fe=>({...fe,label:(typeof A=="function"?A(fe):fe.label)??fe.value}))},[r,De,A]),Le=f__namespace.useMemo(()=>new Set(De.map(fe=>fe.value)),[De]);f__namespace.useEffect(()=>{if(r==="combobox"){const fe=De[0]?.value;ce(SY(fe)?String(fe):"");}},[De]);const we=f2((fe,xe)=>{const Oe=xe??fe;return {[Z.value]:fe,[Z.label]:Oe}}),Me=f__namespace.useMemo(()=>{if(r!=="tags")return ie;const fe=[...ie],xe=Oe=>ye.has(Oe);return [...De].sort((Oe,We)=>Oe.value<We.value?-1:1).forEach(Oe=>{const We=Oe.value;xe(We)||fe.push(we(We,Oe.label));}),fe},[we,ie,ye,De,r]),Fe=eQ(Me,Z,ue,be,G),Re=f__namespace.useMemo(()=>{const fe=xe=>G.length?G.some(Oe=>xe?.[Oe]===ue):xe?.value===ue;return r!=="tags"||!ue||Fe.some(xe=>fe(xe))||Fe.some(xe=>xe[Z.value]===ue)?Fe:[we(ue),...Fe]},[we,G,r,Fe,ue,Z]),Pe=fe=>[...fe].sort((Oe,We)=>K(Oe,We,{searchValue:ue})).map(Oe=>Array.isArray(Oe.options)?{...Oe,options:Oe.options.length>0?Pe(Oe.options):Oe.options}:Oe),Qe=f__namespace.useMemo(()=>K?Pe(Re):Re,[Re,K,ue]),mt=f__namespace.useMemo(()=>vY(Qe,{fieldNames:Z,childrenAsData:oe}),[Qe,Z,oe]),it=fe=>{const xe=ge(fe);if(ke(xe),V&&(xe.length!==De.length||xe.some((Oe,We)=>De[We]?.value!==Oe?.value))){const Oe=L?xe.map(({label:Ze,value:st})=>({label:Ze,value:st})):xe.map(Ze=>Ze.value),We=xe.map(Ze=>Hv(ze(Ze.value)));V(re?Oe:Oe[0],re?We:We[0]);}},[ct,bt]=f__namespace.useState(null),[pt,rt]=f__namespace.useState(0),et=I!==void 0?I:r!=="combobox",Xe=f__namespace.useRef(),Ie=f__namespace.useCallback((fe,xe,{source:Oe="keyboard"}={})=>{rt(xe),i&&r==="combobox"&&fe!==null&&Oe==="keyboard"&&bt(String(fe));const We=Promise.resolve().then(()=>{Xe.current===We&&b?.(fe);});Xe.current=We;},[i,r,b]),Ne=(fe,xe,Oe)=>{const We=()=>{const Ze=ze(fe);return [L?{label:Ze?.[Z.label],value:fe}:fe,Hv(Ze)]};if(xe&&h){const[Ze,st]=We();h(Ze,st);}else if(!xe&&g&&Oe!=="clear"){const[Ze,st]=We();g(Ze,st);}},ae=f2((fe,xe)=>{let Oe;const We=re?xe.selected:true;We?Oe=re?[...De,fe]:[fe]:Oe=De.filter(Ze=>Ze.value!==fe),it(Oe),Ne(fe,We),r==="combobox"?bt(""):(!Uv||Q)&&(ce(""),bt(""));}),ve=(fe,xe)=>{it(fe);const{type:Oe,values:We}=xe;(Oe==="remove"||Oe==="clear")&&We.forEach(Ze=>{Ne(Ze.value,false,Oe);});},de=(fe,xe)=>{if(ce(fe),bt(null),xe.source==="submit"){const Oe=(fe||"").trim();if(Oe){const We=Array.from(new Set([...Le,Oe]));it(We),Ne(Oe,true),ce("");}return}xe.source!=="blur"&&(r==="combobox"&&it(fe),J?.(fe));},se=fe=>{let xe=fe;r!=="tags"&&(xe=fe.map(We=>pe.get(We)?.value).filter(We=>We!==void 0));const Oe=Array.from(new Set([...Le,...xe]));it(Oe),Oe.forEach(We=>{Ne(We,true);});},Ce=f__namespace.useMemo(()=>({...he,flattenOptions:mt,onActiveValue:Ie,defaultActiveFirstOption:et,onSelect:ae,menuItemSelectedIcon:$,rawValues:Le,fieldNames:Z,virtual:E!==false&&y!==false,direction:P,listHeight:M,listItemHeight:N,childrenAsData:oe,maxCount:_,optionRender:w,classNames:z,styles:D}),[_,he,mt,Ie,et,ae,$,Le,Z,E,y,P,M,N,oe,w,z,D]);return f__namespace.createElement(J1.Provider,{value:Ce},f__namespace.createElement(OY,Kv({},W,{id:ee,prefixCls:o,ref:t,omitDomProps:oQ,mode:r,classNames:z,styles:D,displayValues:je,onDisplayValuesChange:ve,maxCount:_,direction:P,showSearch:B,searchValue:ue,onSearch:de,autoClearSearchValue:Q,onSearchSplit:se,popupMatchSelectWidth:y,OptionList:ZY,emptyOptions:!mt.length,activeValue:ct,activeDescendantId:`${ee}_list_${pt}`})))}),nC=sQ;nC.Option=tC;nC.OptGroup=eC;const aQ=()=>{const[,e]=Tn(),[t]=ar("Empty"),r=new Ft(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return f__namespace.createElement("svg",{style:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},f__namespace.createElement("title",null,t?.description||"Empty"),f__namespace.createElement("g",{fill:"none",fillRule:"evenodd"},f__namespace.createElement("g",{transform:"translate(24 31.67)"},f__namespace.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),f__namespace.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),f__namespace.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),f__namespace.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),f__namespace.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),f__namespace.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),f__namespace.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},f__namespace.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),f__namespace.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},lQ=()=>{const[,e]=Tn(),[t]=ar("Empty"),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:o,colorBgContainer:i}=e,{borderColor:s,shadowColor:a,contentColor:l}=f.useMemo(()=>({borderColor:new Ft(n).onBackground(i).toHexString(),shadowColor:new Ft(r).onBackground(i).toHexString(),contentColor:new Ft(o).onBackground(i).toHexString()}),[n,r,o,i]);return f__namespace.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},f__namespace.createElement("title",null,t?.description||"Empty"),f__namespace.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},f__namespace.createElement("ellipse",{fill:a,cx:"32",cy:"33",rx:"32",ry:"7"}),f__namespace.createElement("g",{fillRule:"nonzero",stroke:s},f__namespace.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),f__namespace.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:l}))))},cQ=e=>{const{componentCls:t,margin:n,marginXS:r,marginXL:o,fontSize:i,lineHeight:s}=e;return {[t]:{marginInline:r,fontSize:i,lineHeight:s,textAlign:"center",[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:r,opacity:e.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${t}-description`]:{color:e.colorTextDescription},[`${t}-footer`]:{marginTop:n},"&-normal":{marginBlock:o,color:e.colorTextDescription,[`${t}-description`]:{color:e.colorTextDescription},[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:r,color:e.colorTextDescription,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},uQ=xt("Empty",e=>{const{componentCls:t,controlHeightLG:n,calc:r}=e,o=vt(e,{emptyImgCls:`${t}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()});return cQ(o)}),G5=f__namespace.createElement(aQ,null),K5=f__namespace.createElement(lQ,null),Wr=e=>{const{className:t,rootClassName:n,prefixCls:r,image:o,description:i,children:s,imageStyle:a,style:l,classNames:c,styles:u,...d}=e,{getPrefixCls:m,direction:p,className:h,style:g,classNames:b,styles:y,image:C}=St("empty"),x=m("empty",r),[w,S]=uQ(x),[I,$]=It([b,c],[y,u],{props:e}),[E]=ar("Empty"),P=typeof i<"u"?i:E?.description,M=typeof P=="string"?P:"empty",N=o??C??G5;let A=null;return typeof N=="string"?A=f__namespace.createElement("img",{draggable:false,alt:M,src:N}):A=N,f__namespace.createElement("div",{className:H(w,S,x,h,{[`${x}-normal`]:N===K5,[`${x}-rtl`]:p==="rtl"},t,n,I.root),style:{...$.root,...g,...l},...d},f__namespace.createElement("div",{className:H(`${x}-image`,I.image),style:{...a,...$.image}},A),P&&f__namespace.createElement("div",{className:H(`${x}-description`,I.description),style:$.description},P),s&&f__namespace.createElement("div",{className:H(`${x}-footer`,I.footer),style:$.footer},s))};Wr.PRESENTED_IMAGE_DEFAULT=G5;Wr.PRESENTED_IMAGE_SIMPLE=K5;const X5=e=>{const{componentName:t}=e,{getPrefixCls:n}=f.useContext(ot),r=n("empty");switch(t){case "Table":case "List":return f.createElement(Wr,{image:Wr.PRESENTED_IMAGE_SIMPLE});case "Select":case "TreeSelect":case "Cascader":case "Transfer":case "Mentions":return f.createElement(Wr,{image:Wr.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case "Table.filter":return null;default:return f.createElement(Wr,null)}},Cp=(e,t,n)=>{const{variant:r,[e]:o}=f__namespace.useContext(ot),i=f__namespace.useContext(uB),s=o?.variant;let a;typeof t<"u"?a=t:n===false?a="borderless":a=i??s??r??"outlined";const l=LF.includes(a);return [a,l]},dQ=e=>{const n={overflow:{adjustX:true,adjustY:true,shiftY:true},htmlRegion:e==="scroll"?"scroll":"visible",dynamicInset:true};return {bottomLeft:{...n,points:["tl","bl"],offset:[0,4]},bottomRight:{...n,points:["tr","br"],offset:[0,4]},topLeft:{...n,points:["bl","tl"],offset:[0,-4]},topRight:{...n,points:["br","tr"],offset:[0,-4]}}};function fQ(e,t){return e||dQ(t)}const m2=e=>{const{optionHeight:t,optionFontSize:n,optionLineHeight:r,optionPadding:o}=e;return {position:"relative",display:"block",minHeight:t,padding:o,color:e.colorText,fontWeight:"normal",fontSize:n,lineHeight:r,boxSizing:"border-box"}},mQ=e=>{const{antCls:t,componentCls:n}=e,r=`${n}-item`,o=`&${t}-slide-up-enter${t}-slide-up-enter-active`,i=`&${t}-slide-up-appear${t}-slide-up-appear-active`,s=`&${t}-slide-up-leave${t}-slide-up-leave-active`,a=`${n}-dropdown-placement-`,l=`${r}-option-selected`;return [{[`${n}-dropdown`]:{...Lt(e),position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[`
${o}${a}bottomLeft,
${i}${a}bottomLeft
`]:{animationName:Ry},[`
${o}${a}topLeft,
${i}${a}topLeft,
${o}${a}topRight,
${i}${a}topRight
`]:{animationName:Ty},[`${s}${a}bottomLeft`]:{animationName:Ay},[`
${s}${a}topLeft,
${s}${a}topRight
`]:{animationName:Oy},"&-hidden":{display:"none"},[r]:{...m2(e),cursor:"pointer",transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":{flex:"auto",...Lo},"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${r}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${r}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${r}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${r}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":{...m2(e),color:e.colorTextDisabled}},[`${l}:has(+ ${l})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${l}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}}},ji(e,"slide-up"),ji(e,"slide-down"),zf(e,"move-up"),zf(e,"move-down")]},pQ=e=>{const{componentCls:t}=e;return {[`&${t}-customize`]:{border:0,padding:0,fontSize:"inherit",lineHeight:"inherit",[`${t}-placeholder`]:{display:"none"},[`${t}-content`]:{margin:0,padding:0,"&-value":{display:"none"}}}}},p2=4,hQ=e=>{const{componentCls:t,calc:n,iconCls:r,paddingXS:o,paddingXXS:i,INTERNAL_FIXED_ITEM_MARGIN:s,lineWidth:a,colorIcon:l,colorIconHover:c,inputPaddingHorizontalBase:u}=e;return {"&-multiple":{"--select-multi-item-background":e.multipleItemBg,"--select-multi-item-border-color":"transparent","--select-multi-item-border-radius":e.borderRadiusSM,"--select-multi-item-height":e.multipleItemHeight,"--select-multi-padding-base":"calc((var(--select-height) - var(--select-multi-item-height)) / 2)","--select-multi-padding-vertical":`calc(var(--select-multi-padding-base) - ${s} - ${a})`,"--select-multi-item-padding-horizontal":`calc(${u} - var(--select-multi-padding-vertical) - ${a} * 2)`,paddingBlock:"var(--select-multi-padding-vertical)",paddingInlineStart:`calc(var(--select-multi-padding-base) - ${a})`,[`${t}-prefix`]:{marginInlineStart:"var(--select-multi-item-padding-horizontal)"},[`${t}-prefix + ${t}-content`]:{[`${t}-placeholder`]:{insetInlineStart:0},[`${t}-content-item${t}-content-item-suffix`]:{marginInlineStart:0}},[`${t}-placeholder`]:{position:"absolute",lineHeight:"var(--select-line-height)",insetInlineStart:"var(--select-multi-item-padding-horizontal)",width:"calc(100% - var(--select-multi-item-padding-horizontal))",top:"50%",transform:"translateY(-50%)"},[`${t}-content`]:{flexWrap:"wrap",alignItems:"center",lineHeight:1,"&-item-prefix":{height:"var(--select-font-size)"},"&-item":{lineHeight:1,maxWidth:`calc(100% - ${p2}px)`},[`${t}-content-item-prefix + ${t}-content-item-suffix,
${t}-content-item-suffix:first-child`]:{marginInlineStart:"var(--select-multi-item-padding-horizontal)"},[`${t}-selection-item`]:{lineHeight:`calc(var(--select-multi-item-height) - ${a} * 2)`,border:`${a} solid var(--select-multi-item-border-color)`,display:"flex",marginBlock:s,marginInlineEnd:n(s).mul(2).equal(),background:"var(--select-multi-item-background)",borderRadius:"var(--select-multi-item-border-radius)",paddingInlineStart:o,paddingInlineEnd:i,transition:["height","line-height","padding"].map(d=>`${d} ${e.motionDurationSlow}`).join(","),"&-content":{...Lo,marginInlineEnd:i},"&-remove":{...Gs(),display:"inline-flex",alignItems:"center",color:l,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${r}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c}}},[`${t}-input`]:{lineHeight:n(s).mul(2).add("var(--select-multi-item-height)").equal(),width:"calc(var(--select-input-width, 0) * 1px)",minWidth:p2,maxWidth:"100%",transition:`line-height ${e.motionDurationSlow}`}},[`&${t}-sm`]:{"--select-multi-item-height":e.multipleItemHeightSM,"--select-multi-item-border-radius":e.borderRadiusXS},[`&${t}-lg`]:{"--select-multi-item-height":e.multipleItemHeightLG,"--select-multi-item-border-radius":e.borderRadius},[`&${t}-filled`]:{"--select-multi-item-border-color":e.colorSplit,"--select-multi-item-background":e.colorBgContainer,[`&${t}-disabled`]:{"--select-multi-item-border-color":"transparent"}}}}},gg=(e,t)=>{const{componentCls:n}=e,{border:r,borderHover:o,borderActive:i,borderOutline:s}=t,a=t.background||e.selectorBg||e.colorBgContainer;return {"--select-border-color":r,"--select-background":a,"--select-color":t.color||e.colorText,[`&:not(${n}-disabled)`]:{"&:hover":{"--select-border-color":o,"--select-background":t.backgroundHover||a},[`&${n}-focused`]:{"--select-border-color":i,"--select-background":t.backgroundActive||a,boxShadow:`0 0 0 ${X(e.controlOutlineWidth)} ${s}`}},[`&${n}-disabled`]:{"--select-border-color":t.borderDisabled||t.border,"--select-background":t.backgroundDisabled||t.background}}},kd=(e,t,n,r={},o={},i)=>{const{componentCls:s}=e;return {[`&${s}-${t}`]:[gg(e,n),{[`&${s}-status-error`]:gg(e,{...n,color:r.color||e.colorError,...r}),[`&${s}-status-warning`]:gg(e,{...n,color:o.color||e.colorWarning,...o})},i]}},gQ=e=>{const{componentCls:t,calc:n,fontHeight:r,controlHeight:o,iconCls:i}=e;return {[t]:[{"--select-border-radius":e.borderRadius,"--select-border-color":"#000","--select-border-size":e.lineWidth,"--select-background":e.colorBgContainer,"--select-font-size":e.fontSize,"--select-line-height":e.lineHeight,"--select-font-height":r,"--select-color":e.colorText,"--select-height":o,"--select-padding-horizontal":n(e.paddingSM).sub(e.lineWidth).equal(),"--select-padding-vertical":"calc((var(--select-height) - var(--select-font-height)) / 2 - var(--select-border-size))",...Lt(e,true),display:"inline-flex",flexWrap:"nowrap",position:"relative",transition:`all ${e.motionDurationSlow}`,alignItems:"flex-start",outline:0,cursor:"pointer",borderRadius:"var(--select-border-radius)",borderWidth:"var(--select-border-size)",borderStyle:e.lineType,borderColor:"var(--select-border-color)",background:"var(--select-background)",fontSize:"var(--select-font-size)",lineHeight:"var(--select-line-height)",color:"var(--select-color)",paddingInline:"var(--select-padding-horizontal)",paddingBlock:"var(--select-padding-vertical)",[`${t}-prefix`]:{flex:"none",lineHeight:1},[`${t}-placeholder`]:{...Lo,color:e.colorTextPlaceholder,pointerEvents:"none",zIndex:1},[`${t}-content`]:{flex:"auto",minWidth:0,position:"relative",display:"flex",marginInlineEnd:n(e.paddingXXS).mul(1.5).equal(),"&:before":{content:'"\\a0"',width:0,overflow:"hidden"},"&-value":{...Lo,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,zIndex:1},"input[readonly]":{cursor:"inherit",caretColor:"transparent"}},[`&-open ${t}-content-value`]:{color:e.colorTextPlaceholder},[`${t}-suffix`]:{flex:"none",color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,"> :not(:last-child)":{marginInlineEnd:e.marginXS}},[`${t}-prefix, ${t}-suffix`]:{alignSelf:"center",[i]:{verticalAlign:"top"}},"&-disabled":{background:e.colorBgContainerDisabled,color:e.colorTextDisabled,cursor:"not-allowed"},"&-sm":{"--select-height":e.controlHeightSM,"--select-padding-horizontal":n(e.paddingXS).sub(e.lineWidth).equal(),"--select-border-radius":e.borderRadiusSM},"&-lg":{"--select-height":e.controlHeightLG,"--select-font-size":e.fontSizeLG,"--select-line-height":e.lineHeightLG,"--select-font-height":e.fontHeightLG,"--select-border-radius":e.borderRadiusLG}},{[`&:not(${t}-customize)`]:{[`${t}-input`]:{outline:"none",background:"transparent",appearance:"none",border:0,margin:0,padding:0,color:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},{[`&-single:not(${t}-customize)`]:{[`${t}-input`]:{position:"absolute",insetInline:0,insetBlock:"calc(var(--select-padding-vertical) * -1)",lineHeight:"calc(var(--select-font-height) + var(--select-padding-vertical) * 2)"},[`${t}-content`]:{alignSelf:"center"}}},hQ(e),kd(e,"outlined",{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:e.activeOutlineColor,borderDisabled:e.colorBorderDisabled},{border:e.colorError,borderHover:e.colorErrorHover,borderActive:e.colorError,borderOutline:e.colorErrorOutline},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning,borderOutline:e.colorWarningOutline}),kd(e,"filled",{border:"transparent",borderHover:"transparent",borderActive:e.activeBorderColor,borderOutline:"transparent",borderDisabled:e.colorBorderDisabled,background:e.colorFillTertiary,backgroundHover:e.colorFillSecondary,backgroundActive:e.colorBgContainer},{background:e.colorErrorBg,backgroundHover:e.colorErrorBgHover,borderActive:e.colorError},{background:e.colorWarningBg,backgroundHover:e.colorWarningBgHover,borderActive:e.colorWarning}),kd(e,"borderless",{border:"transparent",borderHover:"transparent",borderActive:"transparent",borderOutline:"transparent",background:"transparent"}),kd(e,"underlined",{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:"transparent"},{border:e.colorError,borderHover:e.colorErrorHover,borderActive:e.colorError},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning},{borderRadius:0,borderTopColor:"transparent",borderRightColor:"transparent",borderLeftColor:"transparent"}),pQ(e)]}},bQ=e=>{const{fontSize:t,lineHeight:n,lineWidth:r,controlHeight:o,controlHeightSM:i,controlHeightLG:s,paddingXXS:a,controlPaddingHorizontal:l,zIndexPopupBase:c,colorText:u,fontWeightStrong:d,controlItemBgActive:m,controlItemBgHover:p,colorBgContainer:h,colorFillSecondary:g,colorBgContainerDisabled:b,colorTextDisabled:y,colorPrimaryHover:C,colorPrimary:x,controlOutline:w}=e,S=a*2,I=r*2,$=Math.min(o-S,o-I),E=Math.min(i-S,i-I),P=Math.min(s-S,s-I);return {INTERNAL_FIXED_ITEM_MARGIN:Math.floor(a/2),zIndexPopup:c+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:m,optionActiveBg:p,optionPadding:`${(o-t*n)/2}px ${l}px`,optionFontSize:t,optionLineHeight:n,optionHeight:o,selectorBg:h,clearBg:h,singleItemHeightLG:s,multipleItemBg:g,multipleItemBorderColor:"transparent",multipleItemHeight:$,multipleItemHeightSM:E,multipleItemHeightLG:P,multipleSelectorBgDisabled:b,multipleItemColorDisabled:y,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:C,activeBorderColor:x,activeOutlineColor:w,selectAffixPadding:a}},vQ=e=>{const{antCls:t,componentCls:n,inputPaddingHorizontalBase:r}=e,o={[`${n}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:"50%"}};return {[n]:{...Lt(e),[`${n}-selection-item`]:{flex:1,fontWeight:"normal",position:"relative",userSelect:"none",...Lo,[`> ${t}-typography`]:{display:"inline"}},[`${n}-prefix`]:{flex:"none",marginInlineEnd:e.selectAffixPadding},[`${n}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,textRendering:"auto",transform:"translateZ(0)","&:before":{display:"block"},"&:hover":{color:e.colorIcon}},"@media(hover:none)":o,"&:hover":o},[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:e.calc(r).add(e.fontSize).add(e.paddingXS).equal()}}}}}},yQ=e=>{const{componentCls:t}=e;return [{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},vQ(e),mQ(e),{[`${t}-rtl`]:{direction:"rtl"}},bl(e,{focusElCls:`${t}-focused`})]},CQ=xt("Select",(e,{rootPrefixCls:t})=>{const n=vt(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(e.lineWidth).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return [yQ(n),gQ(n)]},bQ,{unitless:{optionLineHeight:true,optionSelectedFontWeight:true}});var xQ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"};function Xv(){return Xv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Xv.apply(this,arguments)}const wQ=(e,t)=>f__namespace.createElement(on,Xv({},e,{ref:t,icon:xQ})),SQ=f__namespace.forwardRef(wQ);var $Q={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};function Yv(){return Yv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Yv.apply(this,arguments)}const EQ=(e,t)=>f__namespace.createElement(on,Yv({},e,{ref:t,icon:$Q})),rC=f__namespace.forwardRef(EQ);var IQ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"};function Qv(){return Qv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Qv.apply(this,arguments)}const PQ=(e,t)=>f__namespace.createElement(on,Qv({},e,{ref:t,icon:IQ})),oC=f__namespace.forwardRef(PQ);function NQ({suffixIcon:e,clearIcon:t,menuItemSelectedIcon:n,removeIcon:r,loading:o,multiple:i,hasFeedback:s,showSuffixIcon:a,feedbackIcon:l,showArrow:c,componentName:u}){const d=t??f__namespace.createElement(zu,null),m=b=>e===null&&!s&&!c?null:f__namespace.createElement(f__namespace.Fragment,null,a!==false&&b,s&&l);let p=null;e!==void 0?p=m(e):o?p=m(f__namespace.createElement(op,{spin:true})):p=({open:b,showSearch:y})=>m(b&&y?f__namespace.createElement(oC,null):f__namespace.createElement(rC,null));let h=null;n!==void 0?h=n:i?h=f__namespace.createElement(SQ,null):h=null;let g=null;return r!==void 0?g=r:g=f__namespace.createElement(ai,null),{clearIcon:d,suffixIcon:p,itemIcon:h,removeIcon:g}}function MQ(e){return f.useMemo(()=>{if(e)return (...t)=>f.createElement(Hi,{space:true},e.apply(void 0,t))},[e])}function RQ(e,t){return t!==void 0?t:e!==null}const Y5="SECRET_COMBOBOX_MODE_DO_NOT_USE",AQ=(e,t)=>{const{prefixCls:n,bordered:r,className:o,rootClassName:i,getPopupContainer:s,popupClassName:a,dropdownClassName:l,listHeight:c=256,placement:u,listItemHeight:d,size:m,disabled:p,notFoundContent:h,status:g,builtinPlacements:b,dropdownMatchSelectWidth:y,popupMatchSelectWidth:C,direction:x,style:w,allowClear:S,variant:I,popupStyle:$,dropdownStyle:E,transitionName:P,tagRender:M,maxCount:N,prefix:A,dropdownRender:k,popupRender:R,onDropdownVisibleChange:L,onOpenChange:V,styles:_,classNames:z,...D}=e,{getPopupContainer:W,getPrefixCls:O,renderEmpty:B,direction:j,virtual:Y,popupMatchSelectWidth:q,popupOverflow:U}=f__namespace.useContext(ot),{showSearch:K,style:J,styles:Q,className:G,classNames:ee}=St("select"),[,re]=Tn(),oe=d??re?.controlHeight,be=O("select",n),Z=O(),te=x??j,{compactSize:ce,compactItemClassnames:ue}=li(be,te),[he,ye]=Cp("select",I,r),pe=sn(be),[ie,ge]=CQ(be,pe),Se=f__namespace.useMemo(()=>{const{mode:xe}=e;if(xe!=="combobox")return xe===Y5?"combobox":xe},[e.mode]),ke=Se==="multiple"||Se==="tags",qe=RQ(e.suffixIcon,e.showArrow),De=C??y??q,ze=MQ(R||k),je=V||L,{status:Le,hasFeedback:we,isFormItemInput:Me,feedbackIcon:Fe}=f__namespace.useContext(Zn),Re=gl(Le,g);let Pe;h!==void 0?Pe=h:Se==="combobox"?Pe=null:Pe=B?.("Select")||f__namespace.createElement(X5,{componentName:"Select"});const{suffixIcon:Qe,itemIcon:mt,removeIcon:it,clearIcon:ct}=NQ({...D,multiple:ke,hasFeedback:we,feedbackIcon:Fe,showSuffixIcon:qe,componentName:"Select"}),bt=S===true?{clearIcon:ct}:S,pt=Zt(D,["suffixIcon","itemIcon"]),rt=Vn(xe=>m??ce??xe),et=f__namespace.useContext(zn),Xe=p??et,Ie={...e,variant:he,status:Re,disabled:Xe,size:rt},[Ne,ae]=It([ee,z],[Q,_],{props:Ie},{popup:{_default:"root"}}),ve=H(Ne.popup?.root,a,l,{[`${be}-dropdown-${te}`]:te==="rtl"},i,ge,pe,ie),de={...ae.popup?.root,...$??E},se=H({[`${be}-lg`]:rt==="large",[`${be}-sm`]:rt==="small",[`${be}-rtl`]:te==="rtl",[`${be}-${he}`]:ye,[`${be}-in-form-item`]:Me},Gi(be,Re,we),ue,G,o,Ne.root,i,ge,pe,ie),Ce=f__namespace.useMemo(()=>u!==void 0?u:te==="rtl"?"bottomRight":"bottomLeft",[u,te]),[fe]=Us("SelectLike",ae.popup?.root?.zIndex??de?.zIndex);return f__namespace.createElement(nC,{ref:t,virtual:Y,classNames:Ne,styles:ae,showSearch:K,...pt,style:{...ae.root,...J,...w},popupMatchSelectWidth:De,transitionName:Vi(Z,"slide-up",P),builtinPlacements:fQ(b,U),listHeight:c,listItemHeight:oe,mode:Se,prefixCls:be,placement:Ce,direction:te,prefix:A,suffixIcon:Qe,menuItemSelectedIcon:mt,removeIcon:it,allowClear:bt,notFoundContent:Pe,className:se,getPopupContainer:s||W,popupClassName:ve,disabled:Xe,popupStyle:{...ae.popup?.root,...de,zIndex:fe},maxCount:ke?N:void 0,tagRender:ke?M:void 0,popupRender:ze,onPopupVisibleChange:je})},is=f__namespace.forwardRef(AQ),TQ=r1(is,"popupAlign");is.SECRET_COMBOBOX_MODE_DO_NOT_USE=Y5;is.Option=tC;is.OptGroup=eC;is._InternalPanelDoNotUseOrYouWillBeFired=TQ;var OQ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};function Zv(){return Zv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Zv.apply(this,arguments)}const FQ=(e,t)=>f__namespace.createElement(on,Zv({},e,{ref:t,icon:OQ})),LQ=f__namespace.forwardRef(FQ);var BQ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"};function Jv(){return Jv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Jv.apply(this,arguments)}const kQ=(e,t)=>f__namespace.createElement(on,Jv({},e,{ref:t,icon:BQ})),h2=f__namespace.forwardRef(kQ);var DQ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};function e0(){return e0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},e0.apply(this,arguments)}const zQ=(e,t)=>f__namespace.createElement(on,e0({},e,{ref:t,icon:DQ})),g2=f__namespace.forwardRef(zQ);var _Q={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"};function t0(){return t0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},t0.apply(this,arguments)}const HQ=(e,t)=>f__namespace.createElement(on,t0({},e,{ref:t,icon:_Q})),VQ=f__namespace.forwardRef(HQ);var jQ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};function n0(){return n0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},n0.apply(this,arguments)}const WQ=(e,t)=>f__namespace.createElement(on,n0({},e,{ref:t,icon:jQ})),qQ=f__namespace.forwardRef(WQ);var UQ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"minus",theme:"outlined"};function r0(){return r0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},r0.apply(this,arguments)}const GQ=(e,t)=>f__namespace.createElement(on,r0({},e,{ref:t,icon:UQ})),KQ=f__namespace.forwardRef(GQ);var XQ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};function o0(){return o0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},o0.apply(this,arguments)}const YQ=(e,t)=>f__namespace.createElement(on,o0({},e,{ref:t,icon:XQ})),QQ=f__namespace.forwardRef(YQ);var ZQ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"};function i0(){return i0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},i0.apply(this,arguments)}const JQ=(e,t)=>f__namespace.createElement(on,i0({},e,{ref:t,icon:ZQ})),eZ=f__namespace.forwardRef(JQ);function s0(){return typeof BigInt=="function"}function Q5(e){return !e&&e!==0&&!Number.isNaN(e)||!String(e).trim()}function Ps(e){var t=e.trim(),n=t.startsWith("-");n&&(t=t.slice(1)),t=t.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),t.startsWith(".")&&(t="0".concat(t));var r=t||"0",o=r.split("."),i=o[0]||"0",s=o[1]||"0";i==="0"&&s==="0"&&(n=false);var a=n?"-":"";return {negative:n,negativeStr:a,trimStr:r,integerStr:i,decimalStr:s,fullStr:"".concat(a).concat(r)}}function iC(e){var t=String(e);return !Number.isNaN(Number(t))&&t.includes("e")}function xs(e){var t=String(e);if(iC(e)){var n=Number(t.slice(t.indexOf("e-")+2)),r=t.match(/\.(\d+)/);return r!=null&&r[1]&&(n+=r[1].length),n}return t.includes(".")&&sC(t)?t.length-t.indexOf(".")-1:0}function xp(e){var t=String(e);if(iC(e)){if(e>Number.MAX_SAFE_INTEGER)return String(s0()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(e<Number.MIN_SAFE_INTEGER)return String(s0()?BigInt(e).toString():Number.MIN_SAFE_INTEGER);t=e.toFixed(xs(t));}return Ps(t).fullStr}function sC(e){return typeof e=="number"?!Number.isNaN(e):e?/^\s*-?\d+(\.\d+)?\s*$/.test(e)||/^\s*-?\d+\.\s*$/.test(e)||/^\s*-?\.\d+\s*$/.test(e):false}var tZ=(function(){function e(t){if(no(this,e),tt(this,"origin",""),tt(this,"negative",void 0),tt(this,"integer",void 0),tt(this,"decimal",void 0),tt(this,"decimalLen",void 0),tt(this,"empty",void 0),tt(this,"nan",void 0),Q5(t)){this.empty=true;return}if(this.origin=String(t),t==="-"||Number.isNaN(t)){this.nan=true;return}var n=t;if(iC(n)&&(n=Number(n)),n=typeof n=="string"?n:xp(n),sC(n)){var r=Ps(n);this.negative=r.negative;var o=r.trimStr.split(".");this.integer=BigInt(o[0]);var i=o[1]||"0";this.decimal=BigInt(i),this.decimalLen=i.length;}else this.nan=true;}return ro(e,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(n){var r="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(n,"0"));return BigInt(r)}},{key:"negate",value:function(){var n=new e(this.toString());return n.negative=!n.negative,n}},{key:"cal",value:function(n,r,o){var i=Math.max(this.getDecimalStr().length,n.getDecimalStr().length),s=this.alignDecimal(i),a=n.alignDecimal(i),l=r(s,a).toString(),c=o(i),u=Ps(l),d=u.negativeStr,m=u.trimStr,p="".concat(d).concat(m.padStart(c+1,"0"));return new e("".concat(p.slice(0,-c),".").concat(p.slice(-c)))}},{key:"add",value:function(n){if(this.isInvalidate())return new e(n);var r=new e(n);return r.isInvalidate()?this:this.cal(r,function(o,i){return o+i},function(o){return o})}},{key:"multi",value:function(n){var r=new e(n);return this.isInvalidate()||r.isInvalidate()?new e(NaN):this.cal(r,function(o,i){return o*i},function(o){return o*2})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(n){return this.toString()===n?.toString()}},{key:"lessEquals",value:function(n){return this.add(n.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:true;return n?this.isInvalidate()?"":Ps("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),e})(),nZ=(function(){function e(t){if(no(this,e),tt(this,"origin",""),tt(this,"number",void 0),tt(this,"empty",void 0),Q5(t)){this.empty=true;return}this.origin=String(t),this.number=Number(t);}return ro(e,[{key:"negate",value:function(){return new e(-this.toNumber())}},{key:"add",value:function(n){if(this.isInvalidate())return new e(n);var r=Number(n);if(Number.isNaN(r))return this;var o=this.number+r;if(o>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(o<Number.MIN_SAFE_INTEGER)return new e(Number.MIN_SAFE_INTEGER);var i=Math.max(xs(this.number),xs(r));return new e(o.toFixed(i))}},{key:"multi",value:function(n){var r=Number(n);if(this.isInvalidate()||Number.isNaN(r))return new e(NaN);var o=this.number*r;if(o>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(o<Number.MIN_SAFE_INTEGER)return new e(Number.MIN_SAFE_INTEGER);var i=Math.max(xs(this.number),xs(r));return new e(o.toFixed(i))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(n){return this.toNumber()===n?.toNumber()}},{key:"lessEquals",value:function(n){return this.add(n.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:true;return n?this.isInvalidate()?"":xp(this.number):this.origin}}]),e})();function io(e){return s0()?new tZ(e):new nZ(e)}function xf(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:false;if(e==="")return "";var o=Ps(e),i=o.negativeStr,s=o.integerStr,a=o.decimalStr,l="".concat(t).concat(a),c="".concat(i).concat(s);if(n>=0){var u=Number(a[n]);if(u>=5&&!r){var d=io(e).add("".concat(i,"0.").concat("0".repeat(n)).concat(10-u));return xf(d.toString(),t,n,r)}return n===0?c:"".concat(c).concat(t).concat(a.padEnd(n,"0").slice(0,n))}return l===".0"?c:"".concat(c).concat(l)}function rZ(e,t){return typeof Proxy<"u"&&e?new Proxy(e,{get(n,r){if(t[r])return t[r];const o=n[r];return typeof o=="function"?o.bind(n):o}}):e}function oZ(e,t){const n=f.useRef(null);function r(){try{const{selectionStart:i,selectionEnd:s,value:a}=e,l=a.substring(0,i),c=a.substring(s);n.current={start:i,end:s,value:a,beforeTxt:l,afterTxt:c};}catch{}}function o(){if(e&&n.current&&t)try{const{value:i}=e,{beforeTxt:s,afterTxt:a,start:l}=n.current;let c=i.length;if(i.startsWith(s))c=s.length;else if(i.endsWith(a))c=i.length-n.current.afterTxt.length;else {const u=s[l-1],d=i.indexOf(u,l-1);d!==-1&&(c=d+1);}e.setSelectionRange(c,c);}catch(i){Cn(false,`Something warning of cursor restore. Please fire issue about this: ${i.message}`);}}return [r,o]}const iZ=200,sZ=600;function b2({prefixCls:e,action:t,children:n,disabled:r,className:o,style:i,onStep:s}){const a=t==="up",l=f__namespace.useRef(),c=f__namespace.useRef([]),u=()=>{clearTimeout(l.current);},d=g=>{g.preventDefault(),u(),s(a,"handler");function b(){s(a,"handler"),l.current=setTimeout(b,iZ);}l.current=setTimeout(b,sZ);};f__namespace.useEffect(()=>()=>{u(),c.current.forEach(g=>{gt.cancel(g);});},[]);const m=`${e}-action`,p=H(m,`${m}-${t}`,{[`${m}-${t}-disabled`]:r},o),h=()=>c.current.push(gt(u));return f__namespace.createElement("span",{unselectable:"on",role:"button",onMouseUp:h,onMouseLeave:h,onMouseDown:g=>{d(g);},"aria-label":a?"Increase Value":"Decrease Value","aria-disabled":r,className:p,style:i},n||f__namespace.createElement("span",{unselectable:"on",className:`${e}-action-${t}-inner`}))}function v2(e){const t=typeof e=="number"?xp(e):Ps(e).fullStr;return t.includes(".")?Ps(t.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:e+"0"}const aZ=()=>{const e=f.useRef(0),t=()=>{gt.cancel(e.current);};return f.useEffect(()=>t,[]),n=>{t(),e.current=gt(()=>{n();});}};function Ec(){return Ec=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Ec.apply(this,arguments)}const y2=(e,t)=>e||t.isEmpty()?t.toString():t.toNumber(),C2=e=>{const t=io(e);return t.isInvalidate()?null:t},lZ=f__namespace.forwardRef((e,t)=>{const{mode:n="input",prefixCls:r="rc-input-number",className:o,style:i,classNames:s,styles:a,min:l,max:c,step:u=1,defaultValue:d,value:m,disabled:p,readOnly:h,upHandler:g,downHandler:b,keyboard:y,changeOnWheel:C=false,controls:x=true,prefix:w,suffix:S,stringMode:I,parser:$,formatter:E,precision:P,decimalSeparator:M,onChange:N,onInput:A,onPressEnter:k,onStep:R,onMouseDown:L,onClick:V,onMouseUp:_,onMouseLeave:z,onMouseMove:D,onMouseEnter:W,onMouseOut:O,changeOnBlur:B=true,...j}=e,[Y,q]=f__namespace.useState(false),U=f__namespace.useRef(false),K=f__namespace.useRef(false),J=f__namespace.useRef(false),Q=f__namespace.useRef(null),G=f__namespace.useRef(null);f__namespace.useImperativeHandle(t,()=>rZ(G.current,{focus:Ie=>{i1(G.current,Ie);},blur:()=>{G.current?.blur();},nativeElement:Q.current}));const[ee,re]=f__namespace.useState(()=>io(m??d));function oe(Ie){m===void 0&&re(Ie);}const be=f__namespace.useCallback((Ie,Ne)=>{if(!Ne)return P>=0?P:Math.max(xs(Ie),xs(u))},[P,u]),Z=f__namespace.useCallback(Ie=>{const Ne=String(Ie);if($)return $(Ne);let ae=Ne;return M&&(ae=ae.replace(M,".")),ae.replace(/[^\w.-]+/g,"")},[$,M]),te=f__namespace.useRef(""),ce=f__namespace.useCallback((Ie,Ne)=>{if(E)return E(Ie,{userTyping:Ne,input:String(te.current)});let ae=typeof Ie=="number"?xp(Ie):Ie;if(!Ne){const ve=be(ae,Ne);sC(ae)&&(M||ve>=0)&&(ae=xf(ae,M||".",ve));}return ae},[E,be,M]),[ue,he]=f__namespace.useState(()=>{const Ie=d??m;return ee.isInvalidate()&&["string","number"].includes(typeof Ie)?Number.isNaN(Ie)?"":Ie:ce(ee.toString(),false)});te.current=ue;function ye(Ie,Ne){he(ce(Ie.isInvalidate()?Ie.toString(false):Ie.toString(!Ne),Ne));}const pe=f__namespace.useMemo(()=>C2(c),[c,P]),ie=f__namespace.useMemo(()=>C2(l),[l,P]),ge=f__namespace.useMemo(()=>!pe||!ee||ee.isInvalidate()?false:pe.lessEquals(ee),[pe,ee]),Se=f__namespace.useMemo(()=>!ie||!ee||ee.isInvalidate()?false:ee.lessEquals(ie),[ie,ee]),[ke,qe]=oZ(G.current,Y),De=Ie=>pe&&!Ie.lessEquals(pe)?pe:ie&&!ie.lessEquals(Ie)?ie:null,ze=Ie=>!De(Ie),je=(Ie,Ne)=>{let ae=Ie,ve=ze(ae)||ae.isEmpty();if(!ae.isEmpty()&&!Ne&&(ae=De(ae)||ae,ve=true),!h&&!p&&ve){const de=ae.toString(),se=be(de,Ne);return se>=0&&(ae=io(xf(de,".",se)),ze(ae)||(ae=io(xf(de,".",se,true)))),ae.equals(ee)||(oe(ae),N?.(ae.isEmpty()?null:y2(I,ae)),m===void 0&&ye(ae,Ne)),ae}return ee},Le=aZ(),we=Ie=>{if(ke(),te.current=Ie,he(Ie),!K.current){const Ne=Z(Ie),ae=io(Ne);ae.isNaN()||je(ae,true);}A?.(Ie),Le(()=>{let Ne=Ie;$||(Ne=Ie.replace(/。/g,".")),Ne!==Ie&&we(Ne);});},Me=()=>{K.current=true;},Fe=()=>{K.current=false,we(G.current.value);},Re=Ie=>{we(Ie.target.value);},Pe=lt((Ie,Ne)=>{if(Ie&&ge||!Ie&&Se)return;U.current=false;let ae=io(J.current?v2(u):u);Ie||(ae=ae.negate());const ve=(ee||io(0)).add(ae.toString()),de=je(ve,false);R?.(y2(I,de),{offset:J.current?v2(u):u,type:Ie?"up":"down",emitter:Ne}),G.current?.focus();}),Qe=Ie=>{const Ne=io(Z(ue));let ae;Ne.isNaN()?ae=je(ee,Ie):ae=je(Ne,Ie),m!==void 0?ye(ee,false):ae.isNaN()||ye(ae,false);},mt=()=>{U.current=true;},it=Ie=>{const{key:Ne,shiftKey:ae}=Ie;U.current=true,J.current=ae,Ne==="Enter"&&(K.current||(U.current=false),Qe(false),k?.(Ie)),y!==false&&!K.current&&["Up","ArrowUp","Down","ArrowDown"].includes(Ne)&&(Pe(Ne==="Up"||Ne==="ArrowUp","keyboard"),Ie.preventDefault());},ct=()=>{U.current=false,J.current=false;};f__namespace.useEffect(()=>{if(C&&Y){const Ie=ae=>{Pe(ae.deltaY<0,"wheel"),ae.preventDefault();},Ne=G.current;if(Ne)return Ne.addEventListener("wheel",Ie,{passive:false}),()=>Ne.removeEventListener("wheel",Ie)}});const bt=()=>{B&&Qe(false),q(false),U.current=false;},pt=Ie=>{G.current&&Ie.target!==G.current&&(G.current.focus(),Ie.preventDefault()),L?.(Ie);};Xd(()=>{ee.isInvalidate()||ye(ee,false);},[P,E]),Xd(()=>{const Ie=io(m);re(Ie);const Ne=io(Z(ue));(!Ie.equals(Ne)||!U.current||E)&&ye(Ie,U.current);},[m]),Xd(()=>{E&&qe();},[ue]);const rt={prefixCls:r,onStep:Pe,className:s?.action,style:a?.action},et=f__namespace.createElement(b2,Ec({},rt,{action:"up",disabled:ge}),g),Xe=f__namespace.createElement(b2,Ec({},rt,{action:"down",disabled:Se}),b);return f__namespace.createElement("div",{ref:Q,className:H(r,`${r}-mode-${n}`,o,s?.root,{[`${r}-focused`]:Y,[`${r}-disabled`]:p,[`${r}-readonly`]:h,[`${r}-not-a-number`]:ee.isNaN(),[`${r}-out-of-range`]:!ee.isInvalidate()&&!ze(ee)}),style:{...a?.root,...i},onMouseDown:pt,onMouseUp:_,onMouseLeave:z,onMouseMove:D,onMouseEnter:W,onMouseOut:O,onClick:V,onFocus:()=>{q(true);},onBlur:bt,onKeyDown:it,onKeyUp:ct,onCompositionStart:Me,onCompositionEnd:Fe,onBeforeInput:mt},n==="spinner"&&x&&Xe,w!==void 0&&f__namespace.createElement("div",{className:H(`${r}-prefix`,s?.prefix),style:a?.prefix},w),f__namespace.createElement("input",Ec({autoComplete:"off",role:"spinbutton","aria-valuemin":l,"aria-valuemax":c,"aria-valuenow":ee.isInvalidate()?null:ee.toString(),step:u,ref:G,className:H(`${r}-input`,s?.input),style:a?.input,value:ue,onChange:Re,disabled:p,readOnly:h},j)),S!==void 0&&f__namespace.createElement("div",{className:H(`${r}-suffix`,s?.suffix),style:a?.suffix},S),n==="spinner"&&x&&et,n==="input"&&x&&f__namespace.createElement("div",{className:H(`${r}-actions`,s?.actions),style:a?.actions},et,Xe))});function El(e){return vt(e,{inputAffixPadding:e.paddingXXS})}const Il=e=>{const{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:o,controlHeightSM:i,controlHeightLG:s,fontSizeLG:a,lineHeightLG:l,paddingSM:c,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:m,colorPrimaryHover:p,colorPrimary:h,controlOutlineWidth:g,controlOutline:b,colorErrorOutline:y,colorWarningOutline:C,colorBgContainer:x,inputFontSize:w,inputFontSizeLG:S,inputFontSizeSM:I}=e,$=w||n,E=I||$,P=S||a,M=Math.round((t-$*r)/2*10)/10-o,N=Math.round((i-E*r)/2*10)/10-o,A=Math.ceil((s-P*l)/2*10)/10-o;return {paddingBlock:Math.max(M,0),paddingBlockSM:Math.max(N,0),paddingBlockLG:Math.max(A,0),paddingInline:c-o,paddingInlineSM:u-o,paddingInlineLG:d-o,addonBg:m,activeBorderColor:h,hoverBorderColor:p,activeShadow:`0 0 0 ${g}px ${b}`,errorActiveShadow:`0 0 0 ${g}px ${y}`,warningActiveShadow:`0 0 0 ${g}px ${C}`,hoverBg:x,activeBg:x,inputFontSize:$,inputFontSizeLG:P,inputFontSizeSM:E}},cZ=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),wp=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":{...cZ(vt(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled}))}}),aC=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),x2=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...aC(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),Z5=(e,t)=>({"&-outlined":{...aC(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...wp(e)},...x2(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...x2(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),w2=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),uZ=e=>({"&-outlined":{[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},...w2(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...w2(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...wp(e)}}}}),J5=(e,t)=>{const{componentCls:n}=e;return {"&-borderless":{background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${n}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${n}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}},...t}}},eR=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:t?.inputColor??"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),S2=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...eR(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),tR=(e,t)=>({"&-filled":{...eR(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...wp(e)},...S2(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError}),...S2(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning}),...t}}),$2=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),dZ=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}},...$2(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...$2(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}}}),nR=(e,t)=>({background:e.colorBgContainer,borderWidth:`${X(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.hoverBorderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),E2=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...nR(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),rR=(e,t)=>({"&-underlined":{...nR(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"},...E2(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...E2(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),oR=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),iR=e=>{const{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:o}=e;return {padding:`${X(t)} ${X(o)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},lC=e=>({padding:`${X(e.paddingBlockSM)} ${X(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),Sp=(e,t={})=>({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${X(e.paddingBlock)} ${X(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...oR(e.colorTextPlaceholder),"&-lg":{...iR(e),...t.largeStyle},"&-sm":{...lC(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:"rtl"}}),fZ=e=>{const{componentCls:t,antCls:n}=e;return {position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:{...iR(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{...lC(e)},[`&-lg ${n}-select-single`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${X(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${X(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${X(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{backgroundColor:"inherit",border:`${X(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}},[`${n}-cascader-picker`]:{margin:`-9px ${X(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[t]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0},"&:not(:first-child)":{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:{display:"block",...Of(),[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
& > ${t}-affix-wrapper,
& > ${t}-number-affix-wrapper,
& > ${n}-picker-range
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:"none"},[`& > ${n}-select,
& > ${n}-select-auto-complete ${t},
& > ${n}-cascader-picker ${t},
& > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${n}-select-focused`]:{zIndex:1},[`& > ${n}-select > ${n}-select-arrow`]:{zIndex:1},[`& > *:first-child,
& > ${n}-select:first-child,
& > ${n}-select-auto-complete:first-child ${t},
& > ${n}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child,
& > ${n}-select:last-child,
& > ${n}-cascader-picker:last-child ${t},
& > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{}}}}},mZ=e=>{const{componentCls:t,controlHeightSM:n,lineWidth:r,calc:o}=e,s=o(n).sub(o(r).mul(2)).sub(16).div(2).equal();return {[t]:{...Lt(e),...Sp(e),...Z5(e),...tR(e),...J5(e),...rR(e),'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:s,paddingBottom:s}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}}}},pZ=e=>{const{componentCls:t}=e;return {[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:e.colorIcon},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${X(e.inputAffixPadding)}`}}}},hZ=e=>{const{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:o,colorIcon:i,colorIconHover:s,iconCls:a}=e,l=`${t}-affix-wrapper`,c=`${t}-affix-wrapper-disabled`;return {[l]:{...Sp(e),display:"inline-flex","&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r,direction:"ltr"},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}},...pZ(e),[`${a}${t}-password-icon`]:{color:i,cursor:"pointer",transition:`all ${o}`,"&:hover":{color:s}}},[`${t}-underlined`]:{borderRadius:0},[c]:{[`${a}${t}-password-icon`]:{color:i,cursor:"not-allowed","&:hover":{color:i}}}}},gZ=e=>{const{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return {[`${t}-group`]:{...Lt(e),...fZ(e),"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:n,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:r}},...uZ(e),...dZ(e),[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}}},bZ=e=>{const{componentCls:t}=e;return {[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},sR=xt(["Input","Shared"],e=>{const t=vt(e,El(e));return [mZ(t),hZ(t)]},Il,{resetFont:false}),aR=xt(["Input","Component"],e=>{const t=vt(e,El(e));return [gZ(t),bZ(t),bl(t,{focus:true,focusElCls:`${t.componentCls}-affix-wrapper-focused`})]},Il,{resetFont:false}),vZ=e=>{const t=e.handleVisible??"auto",n=e.controlHeightSM-e.lineWidth*2;return {...Il(e),controlWidth:90,handleWidth:n,handleFontSize:e.fontSize/2,handleVisible:t,handleActiveBg:e.colorFillAlter,handleBg:e.colorBgContainer,filledHandleBg:new Ft(e.colorFillSecondary).onBackground(e.colorBgContainer).toHexString(),handleHoverColor:e.colorPrimary,handleBorderColor:e.colorBorder,handleOpacity:t===true?1:0,handleVisibleWidth:t===true?n:0}},yZ=e=>{const{componentCls:t,lineWidth:n,lineType:r,borderRadius:o,inputFontSizeSM:i,inputFontSizeLG:s,colorError:a,paddingInlineSM:l,paddingBlockSM:c,paddingBlockLG:u,paddingInlineLG:d,colorIcon:m,motionDurationMid:p,handleHoverColor:h,handleOpacity:g,paddingInline:b,paddingBlock:y,handleBg:C,handleActiveBg:x,inputAffixPadding:w,borderRadiusSM:S,controlWidth:I,handleBorderColor:$,filledHandleBg:E,lineHeightLG:P}=e,M=`${X(n)} ${r} ${$}`;return [{[t]:{...Lt(e),...Sp(e),"--input-number-input-padding-block":X(y),"--input-number-input-padding-inline":X(b),display:"inline-flex",width:I,margin:0,paddingBlock:0,borderRadius:o,...Z5(e,{[`${t}-actions`]:{background:C,[`${t}-action-down`]:{borderBlockStart:M}}}),...tR(e,{[`${t}-actions`]:{background:E,[`${t}-action-down`]:{borderBlockStart:M}},"&:focus-within":{[`${t}-actions`]:{background:C}}}),...rR(e,{[`${t}-actions`]:{background:C,[`${t}-action-down`]:{borderBlockStart:M}}}),...J5(e),"&-rtl":{direction:"rtl",[`${t}-input`]:{direction:"rtl"}},[`&${t}-out-of-range`]:{[`${t}-input`]:{color:a}},[`${t}-input`]:{...Lt(e),width:"100%",paddingBlock:"var(--input-number-input-padding-block)",textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:o,outline:0,transition:`all ${p} linear`,appearance:"textfield",fontSize:"inherit",lineHeight:"inherit",...oR(e.colorTextPlaceholder),'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:"none"}},[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:e.handleWidth,opacity:1},[`&-disabled ${t}-input`]:{cursor:"not-allowed",color:e.colorTextDisabled}}},{[t]:{[`
${t}-action-up-disabled,
${t}-action-down-disabled
`]:{cursor:"not-allowed"},[`${t}-action`]:{...Gs(),userSelect:"none",overflow:"hidden",fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",transition:`all ${p} linear`,"&:active":{background:x},"&:hover":{color:h}},"&-mode-input":{overflow:"hidden",[`${t}-actions`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:e.handleVisibleWidth,opacity:g,height:"100%",borderRadius:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`all ${p}`,overflow:"hidden",[`${t}-action`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",marginInlineEnd:0,fontSize:e.handleFontSize}},[`&:hover ${t}-actions, &-focused ${t}-actions`]:{width:e.handleWidth,opacity:1},[`${t}-action`]:{color:m,height:"50%",borderInlineStart:M,"&:hover":{height:"60%"}},[`&${t}-disabled, &${t}-readonly`]:{[`${t}-actions`]:{display:"none"}}},[`&${t}-mode-spinner`]:{padding:0,width:"auto",[`${t}-action`]:{flex:"none",paddingInline:"var(--input-number-input-padding-inline)","&-up":{borderInlineStart:M},"&-down":{borderInlineEnd:M}},[`${t}-input`]:{textAlign:"center",paddingInline:"var(--input-number-input-padding-inline)"}}}},{[t]:{"&-lg":{"--input-number-input-padding-block":X(u),"--input-number-input-padding-inline":X(d),paddingBlock:0,fontSize:s,lineHeight:P},"&-sm":{"--input-number-input-padding-block":X(c),"--input-number-input-padding-inline":X(l),paddingBlock:0,fontSize:i,borderRadius:S}}},{[t]:{[`${t}-prefix, ${t}-suffix`]:{display:"flex",flex:"none",alignItems:"center",alignSelf:"center",pointerEvents:"none"},[`${t}-prefix`]:{marginInlineEnd:w},[`${t}-suffix`]:{height:"100%",marginInlineStart:w,transition:`margin ${p}`},[`&:hover:not(${t}-without-controls)`]:{[`${t}-suffix`]:{marginInlineEnd:e.handleWidth}}}}]},CZ=e=>{const{componentCls:t,antCls:n}=e;return {[`${t}-addon`]:{[`&:has(${n}-select)`]:{border:0,padding:0}}}},xZ=xt("InputNumber",e=>{const t=vt(e,El(e));return [yZ(t),CZ(t),bl(t)]},vZ,{unitless:{handleOpacity:true},resetFont:false}),wZ=f__namespace.forwardRef((e,t)=>{const n=f__namespace.useRef(null);f__namespace.useImperativeHandle(t,()=>n.current);const{rootClassName:r,size:o,disabled:i,prefixCls:s,addonBefore:a,addonAfter:l,prefix:c,suffix:u,bordered:d,readOnly:m,status:p,controls:h=true,variant:g,className:b,style:y,classNames:C,styles:x,mode:w,...S}=e,{direction:I,className:$,style:E,styles:P,classNames:M}=St("inputNumber"),N=f__namespace.useMemo(()=>!h||e.disabled||e.readOnly?false:h,[h,e.disabled,e.readOnly]),{compactSize:A,compactItemClassnames:k}=li(s,I);let R=w==="spinner"?f__namespace.createElement(S5,null):f__namespace.createElement(eZ,null),L=w==="spinner"?f__namespace.createElement(KQ,null):f__namespace.createElement(rC,null);const V=typeof N=="boolean"?N:void 0;typeof N=="object"&&(R=N.upIcon||R,L=N.downIcon||L);const{hasFeedback:_,isFormItemInput:z,feedbackIcon:D}=f__namespace.useContext(Zn),W=Vn(Q=>o??A??Q),O=f__namespace.useContext(zn),B=i??O,[j,Y]=Cp("inputNumber",g,d),q=_&&f__namespace.createElement(f__namespace.Fragment,null,D),U={...e,size:W,disabled:B,controls:N},[K,J]=It([M,C],[P,x],{props:U});return f__namespace.createElement(lZ,{ref:n,mode:w,disabled:B,className:H(b,r,K.root,$,k,Gi(s,p,_),{[`${s}-${j}`]:Y,[`${s}-lg`]:W==="large",[`${s}-sm`]:W==="small",[`${s}-rtl`]:I==="rtl",[`${s}-in-form-item`]:z,[`${s}-without-controls`]:!N}),style:{...J.root,...E,...y},upHandler:R,downHandler:L,prefixCls:s,readOnly:m,controls:V,prefix:c,suffix:q||u,classNames:K,styles:J,...S})}),lR=f__namespace.forwardRef((e,t)=>{const{addonBefore:n,addonAfter:r,prefixCls:o,className:i,status:s,rootClassName:a,...l}=e,{getPrefixCls:c}=St("inputNumber"),u=c("input-number",o),{status:d}=f__namespace.useContext(Zn),m=gl(d,s),p=sn(u),[h,g]=xZ(u,p),b=n||r,y=f__namespace.createElement(wZ,{ref:t,...l,prefixCls:u,status:m,className:H(g,p,h,i),rootClassName:b?void 0:a});if(b){const C=S=>S?f__namespace.createElement(O6,{className:H(`${u}-addon`,g,h),variant:e.variant,disabled:e.disabled,status:m},f__namespace.createElement(Hi,{form:true},S)):null,x=C(n),w=C(r);return f__namespace.createElement(Ey,{rootClassName:a},x,y,w)}return y}),Ba=lR,SZ=e=>f__namespace.createElement(yr,{theme:{components:{InputNumber:{handleVisible:true}}}},f__namespace.createElement(lR,{...e}));Ba._InternalPanelDoNotUseOrYouWillBeFired=SZ;const cR=e=>{const t=C6(e,Lc.appkey,Lc.appsec);return new URLSearchParams({...e,sign:t})};async function $Z(){const t=(await Tt.post("https://passport.bilibili.com/x/passport-tv-login/qrcode/auth_code",cR({appkey:Lc.appkey,local_id:"0",ts:"0"}))).data;if(!cn(t)){zt(t?.message||"获取 auth_code 失败");return}return t.data}async function EZ(e){const n=(await Tt.post("https://passport.bilibili.com/x/passport-tv-login/qrcode/poll",cR({appkey:Lc.appkey,auth_code:e,local_id:"0",ts:"0"}))).data,r={0:"成功","-3":"API校验密匙错误","-400":"请求错误","-404":"啥都木有",86038:"二维码已失效",86039:"二维码尚未确认",86090:"二维码已扫码未确认"};if(!cn(n)){const s=n.code.toString(),a=n.message||r[s]||"未知错误";return s==="86038"?{success:false,message:a,action:"refresh"}:s==="86039"||s==="86090"?{success:false,message:a,action:"wait"}:{success:false,message:a,action:void 0}}const o=n.data.access_token,i=Date.now()+n.data.expires_in*1e3;return {success:true,message:"获取成功",accessKey:o,accessKeyExpireAt:i}}function Na(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=J0(e))||t){n&&(e=n);var r=0,o=function(){};return {s:o,n:function(){return r>=e.length?{done:true}:{done:false,value:e[r++]}},e:function(c){throw c},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,s=true,a=false;return {s:function(){n=n.call(e);},n:function(){var c=n.next();return s=c.done,c},e:function(c){a=true,i=c;},f:function(){try{s||n.return==null||n.return();}finally{if(a)throw i}}}}var Pl,Zu;function cr(e,t,n){if(t<0||t>31||e>>>t)throw new RangeError("Value out of range");for(var r=t-1;r>=0;r--)n.push(e>>>r&1);}function jo(e,t){return (e>>>t&1)!=0}function Sr(e){if(!e)throw new Error("Assertion error")}var To=(function(){function e(t,n){no(this,e),tt(this,"modeBits",void 0),tt(this,"numBitsCharCount",void 0),this.modeBits=t,this.numBitsCharCount=n;}return ro(e,[{key:"numCharCountBits",value:function(n){return this.numBitsCharCount[Math.floor((n+7)/17)]}}]),e})();Pl=To;tt(To,"NUMERIC",new Pl(1,[10,12,14]));tt(To,"ALPHANUMERIC",new Pl(2,[9,11,13]));tt(To,"BYTE",new Pl(4,[8,16,16]));tt(To,"KANJI",new Pl(8,[8,10,12]));tt(To,"ECI",new Pl(7,[0,0,0]));var Gr=ro(function e(t,n){no(this,e),tt(this,"ordinal",void 0),tt(this,"formatBits",void 0),this.ordinal=t,this.formatBits=n;});Zu=Gr;tt(Gr,"LOW",new Zu(0,1));tt(Gr,"MEDIUM",new Zu(1,0));tt(Gr,"QUARTILE",new Zu(2,3));tt(Gr,"HIGH",new Zu(3,2));var Ns=(function(){function e(t,n,r){if(no(this,e),tt(this,"mode",void 0),tt(this,"numChars",void 0),tt(this,"bitData",void 0),this.mode=t,this.numChars=n,this.bitData=r,n<0)throw new RangeError("Invalid argument");this.bitData=r.slice();}return ro(e,[{key:"getData",value:function(){return this.bitData.slice()}}],[{key:"makeBytes",value:function(n){var r=[],o=Na(n),i;try{for(o.s();!(i=o.n()).done;){var s=i.value;cr(s,8,r);}}catch(a){o.e(a);}finally{o.f();}return new e(To.BYTE,n.length,r)}},{key:"makeNumeric",value:function(n){if(!e.isNumeric(n))throw new RangeError("String contains non-numeric characters");for(var r=[],o=0;o<n.length;){var i=Math.min(n.length-o,3);cr(parseInt(n.substring(o,o+i),10),i*3+1,r),o+=i;}return new e(To.NUMERIC,n.length,r)}},{key:"makeAlphanumeric",value:function(n){if(!e.isAlphanumeric(n))throw new RangeError("String contains unencodable characters in alphanumeric mode");var r=[],o;for(o=0;o+2<=n.length;o+=2){var i=e.ALPHANUMERIC_CHARSET.indexOf(n.charAt(o))*45;i+=e.ALPHANUMERIC_CHARSET.indexOf(n.charAt(o+1)),cr(i,11,r);}return o<n.length&&cr(e.ALPHANUMERIC_CHARSET.indexOf(n.charAt(o)),6,r),new e(To.ALPHANUMERIC,n.length,r)}},{key:"makeSegments",value:function(n){return n==""?[]:e.isNumeric(n)?[e.makeNumeric(n)]:e.isAlphanumeric(n)?[e.makeAlphanumeric(n)]:[e.makeBytes(e.toUtf8ByteArray(n))]}},{key:"makeEci",value:function(n){var r=[];if(n<0)throw new RangeError("ECI assignment value out of range");if(n<128)cr(n,8,r);else if(n<16384)cr(2,2,r),cr(n,14,r);else if(n<1e6)cr(6,3,r),cr(n,21,r);else throw new RangeError("ECI assignment value out of range");return new e(To.ECI,0,r)}},{key:"isNumeric",value:function(n){return e.NUMERIC_REGEX.test(n)}},{key:"isAlphanumeric",value:function(n){return e.ALPHANUMERIC_REGEX.test(n)}},{key:"getTotalBits",value:function(n,r){var o=0,i=Na(n),s;try{for(i.s();!(s=i.n()).done;){var a=s.value,l=a.mode.numCharCountBits(r);if(a.numChars>=1<<l)return 1/0;o+=4+l+a.bitData.length;}}catch(c){i.e(c);}finally{i.f();}return o}},{key:"toUtf8ByteArray",value:function(n){for(var r=encodeURI(n),o=[],i=0;i<r.length;i++)r.charAt(i)!="%"?o.push(r.charCodeAt(i)):(o.push(parseInt(r.substring(i+1,i+3),16)),i+=2);return o}}]),e})();tt(Ns,"NUMERIC_REGEX",/^[0-9]*$/);tt(Ns,"ALPHANUMERIC_REGEX",/^[A-Z0-9 $%*+.\/:-]*$/);tt(Ns,"ALPHANUMERIC_CHARSET","0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:");var mi=(function(){function e(t,n,r,o){no(this,e),tt(this,"size",void 0),tt(this,"mask",void 0),tt(this,"modules",[]),tt(this,"isFunction",[]),tt(this,"version",void 0),tt(this,"errorCorrectionLevel",void 0);var i=o;if(this.version=t,this.errorCorrectionLevel=n,t<e.MIN_VERSION||t>e.MAX_VERSION)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=t*4+17;for(var s=[],a=0;a<this.size;a++)s.push(false);for(var l=0;l<this.size;l++)this.modules.push(s.slice()),this.isFunction.push(s.slice());this.drawFunctionPatterns();var c=this.addEccAndInterleave(r);if(this.drawCodewords(c),i==-1)for(var u=1e9,d=0;d<8;d++){this.applyMask(d),this.drawFormatBits(d);var m=this.getPenaltyScore();m<u&&(i=d,u=m),this.applyMask(d);}Sr(0<=i&&i<=7),this.mask=i,this.applyMask(i),this.drawFormatBits(i),this.isFunction=[];}return ro(e,[{key:"getModule",value:function(n,r){return 0<=n&&n<this.size&&0<=r&&r<this.size&&this.modules[r][n]}},{key:"getModules",value:function(){return this.modules}},{key:"drawFunctionPatterns",value:function(){for(var n=0;n<this.size;n++)this.setFunctionModule(6,n,n%2==0),this.setFunctionModule(n,6,n%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);for(var r=this.getAlignmentPatternPositions(),o=r.length,i=0;i<o;i++)for(var s=0;s<o;s++)i==0&&s==0||i==0&&s==o-1||i==o-1&&s==0||this.drawAlignmentPattern(r[i],r[s]);this.drawFormatBits(0),this.drawVersion();}},{key:"drawFormatBits",value:function(n){for(var r=this.errorCorrectionLevel.formatBits<<3|n,o=r,i=0;i<10;i++)o=o<<1^(o>>>9)*1335;var s=(r<<10|o)^21522;Sr(s>>>15==0);for(var a=0;a<=5;a++)this.setFunctionModule(8,a,jo(s,a));this.setFunctionModule(8,7,jo(s,6)),this.setFunctionModule(8,8,jo(s,7)),this.setFunctionModule(7,8,jo(s,8));for(var l=9;l<15;l++)this.setFunctionModule(14-l,8,jo(s,l));for(var c=0;c<8;c++)this.setFunctionModule(this.size-1-c,8,jo(s,c));for(var u=8;u<15;u++)this.setFunctionModule(8,this.size-15+u,jo(s,u));this.setFunctionModule(8,this.size-8,true);}},{key:"drawVersion",value:function(){if(!(this.version<7)){for(var n=this.version,r=0;r<12;r++)n=n<<1^(n>>>11)*7973;var o=this.version<<12|n;Sr(o>>>18==0);for(var i=0;i<18;i++){var s=jo(o,i),a=this.size-11+i%3,l=Math.floor(i/3);this.setFunctionModule(a,l,s),this.setFunctionModule(l,a,s);}}}},{key:"drawFinderPattern",value:function(n,r){for(var o=-4;o<=4;o++)for(var i=-4;i<=4;i++){var s=Math.max(Math.abs(i),Math.abs(o)),a=n+i,l=r+o;0<=a&&a<this.size&&0<=l&&l<this.size&&this.setFunctionModule(a,l,s!=2&&s!=4);}}},{key:"drawAlignmentPattern",value:function(n,r){for(var o=-2;o<=2;o++)for(var i=-2;i<=2;i++)this.setFunctionModule(n+i,r+o,Math.max(Math.abs(i),Math.abs(o))!=1);}},{key:"setFunctionModule",value:function(n,r,o){this.modules[r][n]=o,this.isFunction[r][n]=true;}},{key:"addEccAndInterleave",value:function(n){var r=this.version,o=this.errorCorrectionLevel;if(n.length!=e.getNumDataCodewords(r,o))throw new RangeError("Invalid argument");for(var i=e.NUM_ERROR_CORRECTION_BLOCKS[o.ordinal][r],s=e.ECC_CODEWORDS_PER_BLOCK[o.ordinal][r],a=Math.floor(e.getNumRawDataModules(r)/8),l=i-a%i,c=Math.floor(a/i),u=[],d=e.reedSolomonComputeDivisor(s),m=0,p=0;m<i;m++){var h=n.slice(p,p+c-s+(m<l?0:1));p+=h.length;var g=e.reedSolomonComputeRemainder(h,d);m<l&&h.push(0),u.push(h.concat(g));}for(var b=[],y=function(w){u.forEach(function(S,I){(w!=c-s||I>=l)&&b.push(S[w]);});},C=0;C<u[0].length;C++)y(C);return Sr(b.length==a),b}},{key:"drawCodewords",value:function(n){if(n.length!=Math.floor(e.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");for(var r=0,o=this.size-1;o>=1;o-=2){o==6&&(o=5);for(var i=0;i<this.size;i++)for(var s=0;s<2;s++){var a=o-s,l=(o+1&2)==0,c=l?this.size-1-i:i;!this.isFunction[c][a]&&r<n.length*8&&(this.modules[c][a]=jo(n[r>>>3],7-(r&7)),r++);}}Sr(r==n.length*8);}},{key:"applyMask",value:function(n){if(n<0||n>7)throw new RangeError("Mask value out of range");for(var r=0;r<this.size;r++)for(var o=0;o<this.size;o++){var i=void 0;switch(n){case 0:i=(o+r)%2==0;break;case 1:i=r%2==0;break;case 2:i=o%3==0;break;case 3:i=(o+r)%3==0;break;case 4:i=(Math.floor(o/3)+Math.floor(r/2))%2==0;break;case 5:i=o*r%2+o*r%3==0;break;case 6:i=(o*r%2+o*r%3)%2==0;break;case 7:i=((o+r)%2+o*r%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[r][o]&&i&&(this.modules[r][o]=!this.modules[r][o]);}}},{key:"getPenaltyScore",value:function(){for(var n=0,r=0;r<this.size;r++){for(var o=false,i=0,s=[0,0,0,0,0,0,0],a=0;a<this.size;a++)this.modules[r][a]==o?(i++,i==5?n+=e.PENALTY_N1:i>5&&n++):(this.finderPenaltyAddHistory(i,s),o||(n+=this.finderPenaltyCountPatterns(s)*e.PENALTY_N3),o=this.modules[r][a],i=1);n+=this.finderPenaltyTerminateAndCount(o,i,s)*e.PENALTY_N3;}for(var l=0;l<this.size;l++){for(var c=false,u=0,d=[0,0,0,0,0,0,0],m=0;m<this.size;m++)this.modules[m][l]==c?(u++,u==5?n+=e.PENALTY_N1:u>5&&n++):(this.finderPenaltyAddHistory(u,d),c||(n+=this.finderPenaltyCountPatterns(d)*e.PENALTY_N3),c=this.modules[m][l],u=1);n+=this.finderPenaltyTerminateAndCount(c,u,d)*e.PENALTY_N3;}for(var p=0;p<this.size-1;p++)for(var h=0;h<this.size-1;h++){var g=this.modules[p][h];g==this.modules[p][h+1]&&g==this.modules[p+1][h]&&g==this.modules[p+1][h+1]&&(n+=e.PENALTY_N2);}var b=0,y=Na(this.modules),C;try{for(y.s();!(C=y.n()).done;){var x=C.value;b=x.reduce(function(I,$){return I+($?1:0)},b);}}catch(I){y.e(I);}finally{y.f();}var w=this.size*this.size,S=Math.ceil(Math.abs(b*20-w*10)/w)-1;return Sr(0<=S&&S<=9),n+=S*e.PENALTY_N4,Sr(0<=n&&n<=2568888),n}},{key:"getAlignmentPatternPositions",value:function(){if(this.version==1)return [];for(var n=Math.floor(this.version/7)+2,r=this.version==32?26:Math.ceil((this.version*4+4)/(n*2-2))*2,o=[6],i=this.size-7;o.length<n;i-=r)o.splice(1,0,i);return o}},{key:"finderPenaltyCountPatterns",value:function(n){var r=n[1];Sr(r<=this.size*3);var o=r>0&&n[2]==r&&n[3]==r*3&&n[4]==r&&n[5]==r;return (o&&n[0]>=r*4&&n[6]>=r?1:0)+(o&&n[6]>=r*4&&n[0]>=r?1:0)}},{key:"finderPenaltyTerminateAndCount",value:function(n,r,o){var i=r;return n&&(this.finderPenaltyAddHistory(i,o),i=0),i+=this.size,this.finderPenaltyAddHistory(i,o),this.finderPenaltyCountPatterns(o)}},{key:"finderPenaltyAddHistory",value:function(n,r){var o=n;r[0]==0&&(o+=this.size),r.pop(),r.unshift(o);}}],[{key:"encodeText",value:function(n,r){var o=Ns.makeSegments(n);return e.encodeSegments(o,r)}},{key:"encodeBinary",value:function(n,r){var o=Ns.makeBytes(n);return e.encodeSegments([o],r)}},{key:"encodeSegments",value:function(n,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:40,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:true;if(!(e.MIN_VERSION<=o&&o<=i&&i<=e.MAX_VERSION)||s<-1||s>7)throw new RangeError("Invalid value");var l,c;for(l=o;;l++){var u=e.getNumDataCodewords(l,r)*8,d=Ns.getTotalBits(n,l);if(d<=u){c=d;break}if(l>=i)throw new RangeError("Data too long")}for(var m=r,p=0,h=[Gr.MEDIUM,Gr.QUARTILE,Gr.HIGH];p<h.length;p++){var g=h[p];a&&c<=e.getNumDataCodewords(l,g)*8&&(m=g);}var b=[],y=Na(n),C;try{for(y.s();!(C=y.n()).done;){var x=C.value;cr(x.mode.modeBits,4,b),cr(x.numChars,x.mode.numCharCountBits(l),b);var w=Na(x.getData()),S;try{for(w.s();!(S=w.n()).done;){var I=S.value;b.push(I);}}catch(M){w.e(M);}finally{w.f();}}}catch(M){y.e(M);}finally{y.f();}Sr(b.length==c);var $=e.getNumDataCodewords(l,m)*8;Sr(b.length<=$),cr(0,Math.min(4,$-b.length),b),cr(0,(8-b.length%8)%8,b),Sr(b.length%8==0);for(var E=236;b.length<$;E^=253)cr(E,8,b);for(var P=[];P.length*8<b.length;)P.push(0);return b.forEach(function(M,N){P[N>>>3]|=M<<7-(N&7);}),new e(l,m,P,s)}},{key:"getNumRawDataModules",value:function(n){if(n<e.MIN_VERSION||n>e.MAX_VERSION)throw new RangeError("Version number out of range");var r=(16*n+128)*n+64;if(n>=2){var o=Math.floor(n/7)+2;r-=(25*o-10)*o-55,n>=7&&(r-=36);}return Sr(208<=r&&r<=29648),r}},{key:"getNumDataCodewords",value:function(n,r){return Math.floor(e.getNumRawDataModules(n)/8)-e.ECC_CODEWORDS_PER_BLOCK[r.ordinal][n]*e.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][n]}},{key:"reedSolomonComputeDivisor",value:function(n){if(n<1||n>255)throw new RangeError("Degree out of range");for(var r=[],o=0;o<n-1;o++)r.push(0);r.push(1);for(var i=1,s=0;s<n;s++){for(var a=0;a<r.length;a++)r[a]=e.reedSolomonMultiply(r[a],i),a+1<r.length&&(r[a]^=r[a+1]);i=e.reedSolomonMultiply(i,2);}return r}},{key:"reedSolomonComputeRemainder",value:function(n,r){var o=r.map(function(){return 0}),i=Na(n),s;try{var a=function(){var c=s.value,u=c^o.shift();o.push(0),r.forEach(function(d,m){o[m]^=e.reedSolomonMultiply(d,u);});};for(i.s();!(s=i.n()).done;)a();}catch(l){i.e(l);}finally{i.f();}return o}},{key:"reedSolomonMultiply",value:function(n,r){if(n>>>8||r>>>8)throw new RangeError("Byte out of range");for(var o=0,i=7;i>=0;i--)o=o<<1^(o>>>7)*285,o^=(r>>>i&1)*n;return Sr(o>>>8==0),o}}]),e})();tt(mi,"MIN_VERSION",1);tt(mi,"MAX_VERSION",40);tt(mi,"PENALTY_N1",3);tt(mi,"PENALTY_N2",3);tt(mi,"PENALTY_N3",40);tt(mi,"PENALTY_N4",10);tt(mi,"ECC_CODEWORDS_PER_BLOCK",[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]]);tt(mi,"NUM_ERROR_CORRECTION_BLOCKS",[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]]);var IZ={L:Gr.LOW,M:Gr.MEDIUM,Q:Gr.QUARTILE,H:Gr.HIGH},uR=128,dR="L",fR="#FFFFFF",mR="#000000",pR=false,hR=1,PZ=4,NZ=0,MZ=.1,gR=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=[];return t.forEach(function(o,i){var s=null;o.forEach(function(a,l){if(!a&&s!==null){r.push("M".concat(s+n," ").concat(i+n,"h").concat(l-s,"v1H").concat(s+n,"z")),s=null;return}if(l===o.length-1){if(!a)return;s===null?r.push("M".concat(l+n,",").concat(i+n," h1v1H").concat(l+n,"z")):r.push("M".concat(s+n,",").concat(i+n," h").concat(l+1-s,"v1H").concat(s+n,"z"));return}a&&s===null&&(s=l);});}),r.join("")},bR=function(t,n){return t.slice().map(function(r,o){return o<n.y||o>=n.y+n.h?r:r.map(function(i,s){return s<n.x||s>=n.x+n.w?i:false})})},RZ=function(t,n,r,o){if(o==null)return null;var i=t.length+r*2,s=Math.floor(n*MZ),a=i/n,l=(o.width||s)*a,c=(o.height||s)*a,u=o.x==null?t.length/2-l/2:o.x*a,d=o.y==null?t.length/2-c/2:o.y*a,m=o.opacity==null?1:o.opacity,p=null;if(o.excavate){var h=Math.floor(u),g=Math.floor(d),b=Math.ceil(l+u-h),y=Math.ceil(c+d-g);p={x:h,y:g,w:b,h:y};}var C=o.crossOrigin;return {x:u,y:d,h:c,w:l,excavation:p,opacity:m,crossOrigin:C}},AZ=function(t,n){return n!=null?Math.max(Math.floor(n),0):t?PZ:NZ},TZ=(function(){try{new Path2D().addPath(new Path2D);}catch{return false}return true})();function OZ(e,t){if(e==null)return {};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r];}return n}function vR(e,t){if(e==null)return {};var n,r,o=OZ(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);}return o}var yR=function(t){var n=t.value,r=t.level,o=t.minVersion,i=t.includeMargin,s=t.marginSize,a=t.imageSettings,l=t.size,c=t.boostLevel,u=f.useMemo(function(){var d=Array.isArray(n)?n:[n],m=d.reduce(function(p,h){return p.push.apply(p,Et(Ns.makeSegments(h))),p},[]);return mi.encodeSegments(m,IZ[r],o,void 0,void 0,c)},[n,r,o,c]);return f.useMemo(function(){var d=u.getModules(),m=AZ(i,s),p=d.length+m*2,h=RZ(d,l,m,a);return {cells:d,margin:m,numCells:p,calculatedImageSettings:h,qrcode:u}},[u,l,a,i,s])},FZ=["value","size","level","bgColor","fgColor","includeMargin","minVersion","marginSize","style","imageSettings","boostLevel"],LZ=f.forwardRef(function(e,t){var n=e.value,r=e.size,o=r===void 0?uR:r,i=e.level,s=i===void 0?dR:i,a=e.bgColor,l=a===void 0?fR:a,c=e.fgColor,u=c===void 0?mR:c,d=e.includeMargin,m=d===void 0?pR:d,p=e.minVersion,h=p===void 0?hR:p,g=e.marginSize,b=e.style,y=e.imageSettings,C=e.boostLevel,x=vR(e,FZ),w=y?.src,S=f.useRef(null),I=f.useRef(null),$=f.useCallback(function(z){S.current=z,typeof t=="function"?t(z):t&&(t.current=z);},[t]),E=f.useState(false),P=my(E,2),M=P[1],N=yR({value:n,level:s,minVersion:h,includeMargin:m,marginSize:g,imageSettings:y,size:o,boostLevel:C}),A=N.margin,k=N.cells,R=N.numCells,L=N.calculatedImageSettings;f.useEffect(function(){if(S.current){var z=S.current,D=z.getContext("2d");if(!D)return;var W=k,O=I.current,B=L!=null&&O!==null&&O.complete&&O.naturalHeight!==0&&O.naturalWidth!==0;B&&L.excavation!=null&&(W=bR(k,L.excavation));var j=window.devicePixelRatio||1;z.height=z.width=o*j;var Y=o/R*j;D.scale(Y,Y),D.fillStyle=l,D.fillRect(0,0,R,R),D.fillStyle=u,TZ?D.fill(new Path2D(gR(W,A))):k.forEach(function(q,U){q.forEach(function(K,J){K&&D.fillRect(J+A,U+A,1,1);});}),L&&(D.globalAlpha=L.opacity),B&&D.drawImage(O,L.x+A,L.y+A,L.w,L.h);}}),f.useEffect(function(){M(false);},[w]);var V=ln({height:o,width:o},b),_=null;return w!=null&&(_=f.createElement("img",{alt:"QR-Code",src:w,key:w,style:{display:"none"},onLoad:function(){M(true);},ref:I,crossOrigin:L?.crossOrigin})),f.createElement(f.Fragment,null,f.createElement("canvas",dn({style:V,height:o,width:o,ref:$,role:"img"},x)),_)}),BZ=["value","size","level","bgColor","fgColor","includeMargin","minVersion","title","marginSize","imageSettings","boostLevel"],kZ=f.forwardRef(function(e,t){var n=e.value,r=e.size,o=r===void 0?uR:r,i=e.level,s=i===void 0?dR:i,a=e.bgColor,l=a===void 0?fR:a,c=e.fgColor,u=c===void 0?mR:c,d=e.includeMargin,m=d===void 0?pR:d,p=e.minVersion,h=p===void 0?hR:p,g=e.title,b=e.marginSize,y=e.imageSettings,C=e.boostLevel,x=vR(e,BZ),w=yR({value:n,level:s,minVersion:h,includeMargin:m,marginSize:b,imageSettings:y,size:o,boostLevel:C}),S=w.margin,I=w.cells,$=w.numCells,E=w.calculatedImageSettings,P=I,M=null;y!=null&&E!=null&&(E.excavation!=null&&(P=bR(I,E.excavation)),M=f.createElement("image",{href:y.src,height:E.h,width:E.w,x:E.x+S,y:E.y+S,preserveAspectRatio:"none",opacity:E.opacity,crossOrigin:E.crossOrigin}));var N=gR(P,S);return f.createElement("svg",dn({height:o,width:o,viewBox:"0 0 ".concat($," ").concat($),ref:t,role:"img"},x),!!g&&f.createElement("title",null,g),f.createElement("path",{fill:l,d:"M0,0 h".concat($,"v").concat($,"H0z"),shapeRendering:"crispEdges"}),f.createElement("path",{fill:u,d:N,shapeRendering:"crispEdges"}),M)});function DZ(e,t,n){var r=n||{},o=r.noTrailing,i=o===void 0?false:o,s=r.noLeading,a=s===void 0?false:s,l=r.debounceMode,c=l===void 0?void 0:l,u,d=false,m=0;function p(){u&&clearTimeout(u);}function h(b){var y=b||{},C=y.upcomingOnly,x=C===void 0?false:C;p(),d=!x;}function g(){for(var b=arguments.length,y=new Array(b),C=0;C<b;C++)y[C]=arguments[C];var x=this,w=Date.now()-m;if(d)return;function S(){m=Date.now(),t.apply(x,y);}function I(){u=void 0;}!a&&c&&!u&&S(),p(),c===void 0&&w>e?a?(m=Date.now(),i||(u=setTimeout(c?I:S,e))):S():i!==true&&(u=setTimeout(c?I:S,c===void 0?e-w:e));}return g.cancel=h,g}function zZ(e,t,n){var r={},o=r.atBegin,i=o===void 0?false:o;return DZ(e,t,{debounceMode:i!==false})}const dm=100,CR=dm/5,xR=dm/2-CR/2,bg=xR*2*Math.PI,I2=50,P2=e=>{const{dotClassName:t,style:n,hasCircleCls:r}=e;return f__namespace.createElement("circle",{className:H(`${t}-circle`,{[`${t}-circle-bg`]:r}),r:xR,cx:I2,cy:I2,strokeWidth:CR,style:n})},_Z=({percent:e,prefixCls:t})=>{const n=`${t}-dot`,r=`${n}-holder`,o=`${r}-hidden`,[i,s]=f__namespace.useState(false);Kt(()=>{e!==0&&s(true);},[e!==0]);const a=Math.max(Math.min(e,100),0);if(!i)return null;const l={strokeDashoffset:`${bg/4}`,strokeDasharray:`${bg*a/100} ${bg*(100-a)/100}`};return f__namespace.createElement("span",{className:H(r,`${n}-progress`,a<=0&&o)},f__namespace.createElement("svg",{viewBox:`0 0 ${dm} ${dm}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":a},f__namespace.createElement(P2,{dotClassName:n,hasCircleCls:true}),f__namespace.createElement(P2,{dotClassName:n,style:l})))};function HZ(e){const{prefixCls:t,percent:n=0,className:r,style:o}=e,i=`${t}-dot`,s=`${i}-holder`,a=`${s}-hidden`;return f__namespace.createElement(f__namespace.Fragment,null,f__namespace.createElement("span",{className:H(s,r,n>0&&a),style:o},f__namespace.createElement("span",{className:H(i,`${t}-dot-spin`)},[1,2,3,4].map(l=>f__namespace.createElement("i",{className:`${t}-dot-item`,key:l})))),f__namespace.createElement(_Z,{prefixCls:t,percent:n}))}function VZ(e){const{prefixCls:t,indicator:n,percent:r,className:o,style:i}=e,s=`${t}-dot`;return n&&f__namespace.isValidElement(n)?Rn(n,a=>({className:H(a.className,s,o),style:{...a.style,...i},percent:r})):f__namespace.createElement(HZ,{prefixCls:t,percent:r,className:o,style:i})}const jZ=new ht("antSpinMove",{to:{opacity:1}}),WZ=new ht("antRotate",{to:{transform:"rotate(405deg)"}}),qZ=e=>{const{componentCls:t,calc:n}=e;return {[t]:{...Lt(e),position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:n(n(e.dotSize).sub(e.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:`all ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${t}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${t}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:n(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:n(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:n(n(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:n(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:n(n(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:"1em",height:"1em",fontSize:e.dotSize,display:"inline-block",transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${t}-dot-progress`]:{position:"absolute",inset:0},[`${t}-dot`]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),height:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:jZ,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:WZ,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(r=>`${r} ${e.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal(),height:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}}}},UZ=e=>{const{controlHeightLG:t,controlHeight:n}=e;return {contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:n}},GZ=xt("Spin",e=>{const t=vt(e,{spinDotDefault:e.colorTextDescription});return qZ(t)},UZ),KZ=200,N2=[[30,.05],[70,.03],[96,.01]];function XZ(e,t){const[n,r]=f__namespace.useState(0),o=f__namespace.useRef(null),i=t==="auto";return f__namespace.useEffect(()=>(i&&e&&(r(0),o.current=setInterval(()=>{r(s=>{const a=100-s;for(let l=0;l<N2.length;l+=1){const[c,u]=N2[l];if(s<=c)return s+a*u}return s});},KZ)),()=>{o.current&&(clearInterval(o.current),o.current=null);}),[i,e]),i?n:t}let wR;function YZ(e,t){return !!e&&!!t&&!Number.isNaN(Number(t))}const $p=e=>{const{prefixCls:t,spinning:n=true,delay:r=0,className:o,rootClassName:i,size:s="default",tip:a,wrapperClassName:l,style:c,children:u,fullscreen:d=false,indicator:m,percent:p,classNames:h,styles:g,...b}=e,{getPrefixCls:y,direction:C,indicator:x,className:w,style:S,classNames:I,styles:$}=St("spin"),E=y("spin",t),[P,M]=GZ(E),[N,A]=f__namespace.useState(()=>n&&!YZ(n,r)),k=XZ(N,p);f__namespace.useEffect(()=>{if(n){const j=zZ(r,()=>{A(true);});return j(),()=>{j?.cancel?.();}}A(false);},[r,n]);const R=f__namespace.useMemo(()=>typeof u<"u"&&!d,[u,d]),L={...e,size:s,spinning:N,tip:a,fullscreen:d,children:u,percent:k},[V,_]=It([I,h],[$,g],{props:L}),z=H(E,w,{[`${E}-sm`]:s==="small",[`${E}-lg`]:s==="large",[`${E}-spinning`]:N,[`${E}-show-text`]:!!a,[`${E}-rtl`]:C==="rtl"},o,!d&&i,!d&&V.root,P,M),D=H(`${E}-container`,{[`${E}-blur`]:N}),W=m??x??wR,O={...S,...c},B=f__namespace.createElement("div",{...b,style:d?O:{..._.root,...O},className:z,"aria-live":"polite","aria-busy":N},f__namespace.createElement(VZ,{className:V.indicator,style:_.indicator,prefixCls:E,indicator:W,percent:k}),a&&(R||d)?f__namespace.createElement("div",{className:H(`${E}-text`,V.tip),style:_.tip},a):null);return R?f__namespace.createElement("div",{...b,className:H(`${E}-nested-loading`,l,V.wrapper,P,M),style:_.wrapper},N&&f__namespace.createElement("div",{key:"loading"},B),f__namespace.createElement("div",{className:D,key:"container"},u)):d?f__namespace.createElement("div",{className:H(`${E}-fullscreen`,{[`${E}-fullscreen-show`]:N},i,P,M,V.mask),style:_.mask},B):B};$p.setDefaultIndicator=e=>{wR=e;};const QZ=f.createElement($p,null);function ZZ({prefixCls:e,locale:t,onRefresh:n,statusRender:r,status:o}){const i=f.createElement(f.Fragment,null,f.createElement("p",{className:`${e}-expired`},t?.expired),n&&f.createElement(Je,{type:"link",icon:f.createElement(QQ,null),onClick:n},t?.refresh)),s=f.createElement("p",{className:`${e}-scanned`},t?.scanned),a={expired:i,loading:QZ,scanned:s};return (r??(u=>a[u.status]))({status:o,locale:t,onRefresh:n})}const JZ=e=>{const{componentCls:t,lineWidth:n,lineType:r,colorSplit:o}=e;return {[t]:{...Lt(e),display:"flex",justifyContent:"center",alignItems:"center",padding:e.paddingSM,backgroundColor:e.colorWhite,borderRadius:e.borderRadiusLG,border:`${X(n)} ${r} ${o}`,position:"relative",overflow:"hidden",[`& > ${t}-cover`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:10,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",color:e.colorText,lineHeight:e.lineHeight,background:e.QRCodeCoverBackgroundColor,textAlign:"center",[`& > ${t}-expired, & > ${t}-scanned`]:{color:e.QRCodeTextColor}},"> canvas":{alignSelf:"stretch",flex:"auto",minWidth:0},"&-icon":{marginBlockEnd:e.marginXS,fontSize:e.controlHeight}},[`${t}-borderless`]:{borderColor:"transparent",padding:0,borderRadius:0}}},eJ=e=>({QRCodeCoverBackgroundColor:new Ft(e.colorBgContainer).setA(.96).toRgbString()}),tJ=xt("QRCode",e=>{const t=vt(e,{QRCodeTextColor:e.colorText});return JZ(t)},eJ),nJ=e=>{const[,t]=Tn(),{value:n,type:r="canvas",icon:o="",size:i=160,iconSize:s,color:a=t.colorText,errorLevel:l="M",status:c="active",bordered:u=true,onRefresh:d,style:m,className:p,rootClassName:h,prefixCls:g,bgColor:b="transparent",statusRender:y,classNames:C,styles:x,boostLevel:w,...S}=e,{getPrefixCls:I,className:$,style:E,classNames:P,styles:M}=St("qrcode"),N={...e,bgColor:b,type:r,size:i,status:c,bordered:u,errorLevel:l},[A,k]=It([P,C],[M,x],{props:N}),R=I("qrcode",g),[L,V]=tJ(R),_={src:o,x:void 0,y:void 0,height:typeof s=="number"?s:s?.height??40,width:typeof s=="number"?s:s?.width??40,excavate:true,crossOrigin:"anonymous"},z=or(S,true),D=Zt(S,Object.keys(z)),W={value:n,size:i,level:l,bgColor:b,fgColor:a,style:{width:m?.width,height:m?.height},imageSettings:o?_:void 0,boostLevel:w,...z},[O]=ar("QRCode");if(!n)return null;const B=H(R,p,h,L,V,$,A.root,{[`${R}-borderless`]:!u}),j={backgroundColor:b,...k.root,...E,...m,width:m?.width??i,height:m?.height??i};return f.createElement("div",{...D,className:B,style:j},c!=="active"&&f.createElement("div",{className:H(`${R}-cover`,A.cover),style:k.cover},f.createElement(ZZ,{prefixCls:R,locale:O,status:c,onRefresh:d,statusRender:y})),r==="canvas"?f.createElement(LZ,{...W}):f.createElement(kZ,{...W}))},cC={show:false,qrcodeUrl:"",auth_code:"",message:""},xi=tn({...cC});function Ic(e){sJ(),Object.assign(xi,e);}function rJ(e){Ic({...cC,...e,show:true});}const SR=new Or;function $R(){Ic({...cC}),SR.emit("hide");}function oJ(){return SR.once("hide")}function iJ(){const{qrcodeUrl:e,show:t,message:n}=nt(xi),r=$R;return F(Gu,{show:t,onHide:r,hideWhenMaskOnClick:false,hideWhenEsc:false,clsModalMask:"backdrop-blur-10px",clsModal:"aspect-ratio-10/16",width:260,children:[F("div",{className:rr.modalHeader,children:[v("div",{className:rr.modalTitle}),v(Ku,{onClick:r})]}),F("div",{className:H(rr.modalBody,"flex flex-col items-center justify-center text-center"),children:[v("div",{className:"mb-2px min-h-25px flex-center text-size-14px",children:n||""}),e&&v(nJ,{className:"mx-auto mb-40px flex-shrink-0 p-8px",value:e,size:200,icon:"https://is1-ssl.mzstatic.com/image/thumb/Purple211/v4/72/9c/b6/729cb6d8-75f5-0a56-0508-3a26cbba69ae/AppIcon-1x_U007emarketing-0-6-0-0-85-220-0.png/230x0w.webp"}),F("div",{className:"footnote text-size-13px",children:["打开「哔哩哔哩」或「bilibili」App ",v("br",{}),"扫码获取 access_key"]})]})]})}const sJ=wu(function(){const t=document.createElement("div");t.classList.add("modal-tv-qrcode-auth",zo),document.body.appendChild(t),Ho.createRoot(t).render(v(fi,{children:v(iJ,{})}));});async function M2(){const e=await $Z();if(e)return rJ({qrcodeUrl:e.url,auth_code:e.auth_code}),true}async function aJ(){if(!await M2())return;let t,n=xi.auth_code;function r(){if(!xi.show||!xi.auth_code||n!==xi.auth_code)return true}function o(){return !r()}for(;o();){const i=_t(1500),s=oJ();if(await Promise.race([i,s]),s.off(),r())return;t=await EZ(xi.auth_code);const{success:a,accessKey:l,accessKeyExpireAt:c,message:u,action:d}=t;if(r())return;if(Ic({message:u}),a)return await _t(1e3),$R(),{accessKey:l,accessKeyExpireAt:c};if(d==="refresh"){if(await _t(2e3),r())return;await M2(),n=xi.auth_code,Ic({message:"已刷新二维码"});continue}if(d!=="wait"){Ic({message:u}),zt(u);return}}}async function lJ(){const{accessKey:e,accessKeyExpireAt:t}=await aJ()||{};!e||!t||(Ue.accessKey=e,Ue.accessKeyExpireAt=t,zt("获取成功"));}function cJ(){Ue.accessKey="",Ue.accessKeyExpireAt=0,zt("已删除 access_key");}const R2=v(Je,{target:"_blank",href:"https://github.com/indefined/UserScripts/tree/master/bilibiliHome#%E6%8E%88%E6%9D%83%E8%AF%B4%E6%98%8E",children:"access_key 说明"});function ER({style:e,className:t}){const{runAsync:n,loading:r}=qi(lJ,{manual:true}),{accessKey:o}=Mt();return v(Fr,{size:"small",style:e,className:t,children:o?F($e,{children:[v(Je,{onClick:n,loading:r,children:"重新获取 access_key"}),v(uu,{onConfirm:cJ,title:"确定删除 access_key?",children:v(Je,{children:"删除 access_key"})}),R2]}):F($e,{children:[v(Je,{onClick:n,loading:r,children:"获取 access_key"}),R2]})})}const IR=I3&&["/video/","/list/watchlater","/bangumi/play/"].some(e=>location.pathname.startsWith(e)),uJ=[["/video/",()=>/^\/video\/(?<bvid>BV\w+)\//.exec(location.pathname)?.groups?.bvid],["/list/watchlater",()=>new URLSearchParams(location.search).get("bvid")||void 0],["/bangumi/play/",()=>{}]];function PR(){return uJ.find(([t])=>location.pathname.startsWith(t))?.[1]()}async function dJ(e){return (await Tt.get("/x/v3/fav/folder/collected/list",{params:{up_mid:Lr(),platform:"web",ps:20,pn:e}})).data.data}async function fJ(){let e=1,t=true,n=[];for(;t;){const r=await dJ(e);n.push(...r.list),t=r.has_more,e++;}return n=n.filter(r=>!(r.title==="该合集已失效"&&r.upper.mid===0)),n=Yi(n,r=>r.id),n}async function mJ(e,t){return (await Tt.get("/x/space/fav/season/list",{params:{season_id:e,ps:20,pn:t}})).data.data}var dt=(e=>(e.Initial="initial",e.Shuffle="shuffle",e.PubTimeDesc="pub-time-desc",e.PubTimeAsc="pub-time-asc",e.PlayCountDesc="play-count-desc",e.CollectCountDesc="collect-count-desc",e.FavTimeDesc="fav-time-desc",e.FavTimeAsc="fav-time-asc",e))(dt||{});function a0(e,t){return t==="initial"?e:t==="shuffle"?Mr(e):t==="pub-time-desc"||t==="pub-time-asc"?Xo(e,[r=>r.pubtime],[t==="pub-time-desc"?"desc":"asc"]):(t==="fav-time-desc"||t==="fav-time-asc")&&e.every(n=>n.from==="fav-folder")?Xo(e,[r=>r.fav_time],[t==="fav-time-desc"?"desc":"asc"]):t==="play-count-desc"?Xo(e,[n=>n.cnt_info.play],["desc"]):t==="collect-count-desc"?Xo(e,[n=>n.cnt_info.collect],["desc"]):e}function uC(e,t=21){return `https://space.bilibili.com/${Lr()}/favlist?fid=${e}&ftype=create`}function NR(e,t=21){return `https://space.bilibili.com/${Lr()}/favlist?fid=${e}&ftype=collect&ctype=${t}`}function pJ(e){return `https://www.bilibili.com/list/ml${e}`}function hJ(e){return `https://www.bilibili.com/video/${e}`}function MR(e){return e.toString(2).at(-2)==="0"}function dC(e){return e.toString(2).at(-1)==="1"}const Mi={getVideoFavState:vJ,removeFavs:gJ,moveFavs:bJ,addFav:CJ};async function gJ(e,t){const n=new URLSearchParams({resources:[t].flat().join(","),media_id:e.toString(),platform:"web",csrf:Xs()}),o=(await Tt.post("/x/v3/fav/resource/batch-del",n)).data,i=cn(o);return i||zt(o.message||$u),i}async function bJ(e,t,n){const r=new URLSearchParams({resources:[e].flat().join(","),src_media_id:t.toString(),tar_media_id:n.toString(),mid:Lr(),platform:"web",csrf:Xs()}),i=(await Tt.post("/x/v3/fav/resource/move",r)).data,s=cn(i);return s||zt(i?.message||"fav deal api fail"),s}async function vJ(e){if(!Jm())return;const r=(await Tt.get("/x/v3/fav/folder/created/list-all",{params:{up_mid:Lr(),type:2,rid:e}})).data.data.list.filter(a=>a.fav_state>0),o=r.map(a=>a.title),i=r.map(a=>uC(a.id)),s=r.map(a=>a.id);return {favFolders:r,favFolderNames:o,favFolderUrls:i,favFolderIds:s}}async function yJ({avid:e,add_media_ids:t="",del_media_ids:n=""}){const r=new URLSearchParams({rid:e.toString(),type:"2",add_media_ids:t,del_media_ids:n,platform:"web",eab_x:"2",ramval:"0",ga:"1",gaia_source:"web_normal",csrf:Xs()}),i=(await Tt.post("/x/v3/fav/resource/deal",r)).data,s=cn(i);return s||zt(i?.message||"fav deal api fail"),s}let vg,l0;async function CJ(e,t){if(!t&&(!vg||!l0)){await gC();const{folders:n}=kt,r=n.find(o=>MR(o.attr))??n[0];if(!r)return zt("没有找到默认收藏夹!");vg=r.id,l0=r.title;}return t||=vg,t?await yJ({avid:e,add_media_ids:t.toString()}):zt("没有找到默认收藏夹!")}async function xJ(){return (await Tt.get("/x/v3/fav/folder/created/list-all",{params:{up_mid:Lr()}})).data.data.list}const wJ=dN.createClass`
.ant-dropdown &.ant-dropdown-menu .ant-dropdown-menu-item {
font-size: 13px; // same as Button
justify-content: flex-start;
.ant-dropdown-menu-title-content {
flex-shrink: 0;
}
}
`,fC=function({value:e,onChange:t,disabled:n,list:r,listDisplayConfig:o,dropdownProps:i,extraHelpInfo:s,$ref:a}){const{icon:l,label:c}=o[e],u=Ve(b=>{const y=r.filter(S=>S!=="divider"),C=y.indexOf(e);if(C===-1)return;const x=(C+(b.shiftKey?-1:1)+y.length)%y.length,w=y[x];t(w);}),d=f.useMemo(()=>Ur(r.map(b=>{if(b==="divider")return {type:"divider"};const{icon:y,label:C}=o[b];return {key:b,icon:y,label:C,onClick:()=>t(b)}})),[r,o,t]),m=Sl(),p=f.useMemo(()=>({overscrollBehavior:"contain",border:`1px solid ${m}`}),[]),[h,g]=f.useState(false);return F("span",{className:"inline-flex items-center",ref:a,children:[v(ts,{open:h,onOpenChange:g,disabled:n,menu:{items:d,style:p,className:wJ,selectedKeys:[e.toString()]},placement:"bottomRight",...i,children:v(Je,{onClick:u,css:[h&&wl,"",""],icon:l,className:"gap-8px px-16px",disabled:n,children:c})}),F(Mn,{children:[s,s&&v(tl,{variant:"solid",className:"my-7px"}),"操作说明: ",v("br",{}),"1. 点击/下拉切换 ",v("br",{}),"2. 按住 ",v("kbd",{children:"Shift"})," 键点击逆序切换 ",v("br",{})]})]})},vi="size-16px",SJ={[dt.Initial]:{icon:v(Eq,{className:vi}),label:"初始顺序"},[dt.Shuffle]:{icon:v(gM,{className:vi}),label:"随机顺序"},[dt.PubTimeDesc]:{icon:v(su,{className:vi}),label:fc("最新投稿")},[dt.PubTimeAsc]:{icon:v(su,{className:vi}),label:Sv("最早投稿")},[dt.PlayCountDesc]:{icon:v(qu,{className:vi}),label:fc("最多播放")},[dt.CollectCountDesc]:{icon:v(Fi,{className:H(vi,"mt--1px")}),label:fc("最多收藏")},[dt.FavTimeDesc]:{icon:v(Fi,{className:H(vi,"mt--1px")}),label:fc("最近收藏")},[dt.FavTimeAsc]:{icon:v(Fi,{className:H(vi,"mt--1px")}),label:Sv("最早收藏")}},$J={all:[dt.Initial,dt.Shuffle],"fav-folder":[dt.FavTimeDesc,dt.PubTimeDesc,dt.PlayCountDesc,dt.CollectCountDesc,"divider",dt.FavTimeAsc,dt.PubTimeAsc,"divider",dt.Shuffle],"fav-collection":[dt.Initial,dt.PubTimeDesc,dt.PlayCountDesc,dt.CollectCountDesc,"divider",dt.PubTimeAsc,"divider",dt.Shuffle]};function RR(e){return e.split(":")[0]}function AR(e){const t=RR(e);return $J[t]||Object.values(dt)}function A2(e){const t=RR(e);return t==="fav-folder"?dt.FavTimeDesc:t==="fav-collection"?dt.PubTimeDesc:dt.Initial}function mC(e,t){const n=AR(e).filter(o=>o!=="divider"),r=t.get(e)||A2(e);return n.includes(r)?r:A2(e)}function EJ(e,t){return f.useMemo(()=>mC(e,t),[t,e])}function pC(){const e=jn(),{ref:t,getPopupContainer:n}=Ys(),{selectedKey:r,savedOrderMap:o}=nt(kt),i=EJ(r,o),s=f.useMemo(()=>AR(r),[r]);return v(fC,{value:i,onChange:async a=>{kt.savedOrderMap.set(r,a),await _t(100),e();},list:s,listDisplayConfig:SJ,$ref:t,dropdownProps:{getPopupContainer:n}})}const IJ=Hn.extend("modules:rec-services:fav:store");var fm=(e=>(e.CollectionIdFull="fav-collection-id",e.CollectionId="fav-cid",e.FolderIdFull="fav-folder-id",e.FolderId="fav-fid",e))(fm||{});const TR=e=>{if(!e)return;const t=Number(e);if(!Number.isNaN(t))return t},mm=new URLSearchParams(location.search),OR=TR(mm.get("fav-collection-id")??mm.get("fav-cid")),FR=TR(mm.get("fav-folder-id")??mm.get("fav-fid")),nl=_o&&(typeof FR=="number"||typeof OR=="number"),kt=tn({folders:[],foldersUpdateAt:0,selectedFavFolderId:FR,get selectedFavFolder(){if(typeof this.selectedFavFolderId=="number")return this.folders.find(e=>e.id===this.selectedFavFolderId)},collections:[],collectionsUpdateAt:0,selectedFavCollectionId:OR,selectedFavCollectionDetailInfo:void 0,get selectedFavCollection(){if(typeof this.selectedFavCollectionId=="number")return this.collections.find(e=>e.id===this.selectedFavCollectionId)},get selectedKey(){let e,t;if(this.selectedFavFolderId!==void 0)e="fav-folder",t=this.selectedFavFolderId;else if(this.selectedFavCollectionId!==void 0)e="fav-collection",t=this.selectedFavCollectionId;else return "all";return `${e}:${t}`},get selectedLabel(){if(this.selectedFavFolder)return `${this.selectedFavFolder.title} (${this.selectedFavFolder.media_count})`;if(typeof this.selectedFavCollectionId=="number"){if(this.selectedFavCollection)return `${this.selectedFavCollection.title} (${this.selectedFavCollection.media_count})`;const e=this.selectedFavCollectionDetailInfo;return e?.id===this.selectedFavCollectionId?`${e.title} (${e.media_count})`:void 0}return "全部"},savedOrderMap:(await( f6("fav-saved-order"))).map,get usingShuffle(){return mC(this.selectedKey,this.savedOrderMap)===dt.Shuffle}});function LR(e,t){const n=kt.folders.find(o=>o.id===e);if(!n)return;const r=typeof t=="function"?t(n.media_count):t;r!==n.media_count&&(n.media_count=r,IJ("update folder(id=%s title=%s) media_count to %s",n.id,n.title,r));}function hC(e=false){return Promise.all([gC(e),MJ(e)])}const PJ=ci(async()=>{const e=await xJ();kt.folders=e,kt.foldersUpdateAt=Date.now();});async function gC(e=false){if(!e){const{folders:t,foldersUpdateAt:n}=kt;if(t.length&&n&&Date.now()-n<Wn("5min"))return}return PJ()}const NJ=ci(async()=>{const e=await fJ();kt.collections=e,kt.collectionsUpdateAt=Date.now();});async function MJ(e=false){if(!e){const{collections:t,collectionsUpdateAt:n}=kt;if(t.length&&n&&Date.now()-n<Wn("5min"))return}return NJ()}nl&&l6(kt,"selectedLabel",()=>{kt.selectedLabel&&Zy(kt.selectedLabel);});RJ();async function RJ(){if(!(_o||IR)||nl)return;const e="fav-store",t=["selectedFavFolderId","selectedFavCollectionId","folders"],n=await GM.getValue(e);if(n)for(const o of t)ti(n[o])||(kt[o]=n[o]);const r=Uy(1);u6(kt,t,o=>{if(nl)return;const i=Va(o,t);r(async()=>{await GM.setValue(e,i);});});}const BR=F($e,{children:["1. 可以使用多个搜索词, 用空格分隔, 逻辑关系为且 (AND) ",v("br",{}),'2. 可以使用引号包裹搜索词, 如 "word or sentence" ',v("br",{}),'3. 可以使用 -"word or sentence" 排除关键词; 必须使用引号(单引号 或 双引号) ',v("br",{})]});function kR(e){const t=[],n=[];if(!e.trim())return {includes:t,excludes:n};let r=0;const o=e.length;for(;r<o;){for(;r<o&&e[r]===" ";)r++;if(r>=o)break;let i=false,s="";if(e[r]==="-"){const a=e[r+1];(a==='"'||a==="'")&&(i=true,r++);}if(e[r]==='"'||e[r]==="'"){const a=e[r];r++;let l=false;for(;r<o;){const c=e[r];if(l){s+=c,l=false,r++;continue}if(c==="\\"){const u=e[r+1];if(u==='"'||u==="'"){l=true,r++;continue}s+=c,r++;continue}if(c===a){r++;break}s+=c,r++;}}else for(;r<o&&e[r]!==" ";){if(e[r]==="\\"){r++,r<o&&(s+=e[r],r++);continue}s+=e[r],r++;}s&&(i?n.push(s):t.push(s));}return {includes:t,excludes:n}}const Nl={[Be.AppRecommend]:{icon:v(Iq,{className:"size-18px"}),label:"推荐",desc:"使用 Bilibili App 端推荐 API",anonymousUsage:true},[Be.PcRecommend]:{icon:v(Pq,{className:"size-18px"}),label:"推荐",desc:"使用新版首页顶部推荐 API",anonymousUsage:true},[Be.KeepFollowOnly]:{icon:v(Nq,{className:"size-18px"}),label:"已关注",desc:"从PC端推荐中筛选出「已关注」,可能比较慢; 关注的UP更新在动态~"},[Be.DynamicFeed]:{icon:v(M1,{className:"size-18px"}),label:"动态",desc:"视频投稿动态",swr:true},[Be.Watchlater]:{icon:v(T1,{className:"size-17px [&_.circle]:stroke-current"}),label:"稍后再看",desc:"你添加的稍后再看; 默认随机乱序, 可在设置中关闭乱序",swr:true},[Be.Fav]:{icon:v(Fi,{className:"mt--1px size-16px"}),label:"收藏",desc:"你添加的收藏; 默认随机乱序, 可在设置中关闭乱序",get swr(){return !kt.usingShuffle}},[Be.Hot]:{icon:v(Rq,{className:"size-16px"}),label:"热门",desc:"各个领域中新奇好玩的优质内容都在这里~",anonymousUsage:true,get swr(){return !t5()}},[Be.Live]:{icon:v(A1,{className:"size-16px"}),label:"直播",desc:"直播~",swr:true},[Be.SpaceUpload]:{icon:v(R1,{className:"size-16px"}),label:"投稿",desc:"UP 视频投稿",anonymousUsage:true,extraHelpInfo:F("div",{className:"ml-20px",children:["搜索词: 搜索相关作品 ",v("br",{}),"本地过滤词: 本地过滤搜索结果; 本地过滤词支持高级规则:",v("div",{className:"ml-20px",children:BR})]})}};function Oo({tabKey:e,active:t,className:n}){const{icon:r}=Nl[e],o=An(r.props.className,n);return f.cloneElement(r,{css:r.props.css,active:e===Be.Live?t:void 0,className:o})}const DR="你需要登录B站后使用该功能! 如已完成登录, 请刷新网页重试~";function zR(){return zt(DR)}const AJ=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",children:[v("path",{stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,d:"M24 44a19.94 19.94 0 0 0 14.142-5.858A19.94 19.94 0 0 0 44 24a19.94 19.94 0 0 0-5.858-14.142A19.94 19.94 0 0 0 24 4A19.94 19.94 0 0 0 9.858 9.858A19.94 19.94 0 0 0 4 24a19.94 19.94 0 0 0 5.858 14.142A19.94 19.94 0 0 0 24 44Z"}),v("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,d:"M24 28.625v-4a6 6 0 1 0-6-6"}),v("path",{fill:"currentColor",fillRule:"evenodd",d:"M24 37.625a2.5 2.5 0 1 0 0-5a2.5 2.5 0 0 0 0 5",clipRule:"evenodd"})]})]}),T2=f.forwardRef(AJ);function TJ(){const{videoCard:{actions:{showLargePreview:e,openInPipWindow:t}},grid:{useCustomGrid:n,enableForceCoumn:r,forceColumnCount:o},videoLinkOpenMode:i}=Mt(),s=f.useMemo(()=>Object.values(un).filter(l=>Er[l].enabled??true).map(l=>{const c=Er[l];return {config:c,value:l,label:F("span",{className:"flex-v-center gap-x-8px",children:[c.icon,v("span",{children:c.label})]})}}),[]),a=Ve(()=>{const l="v0.34.1";GM.setClipboard(l),ft.success(`已复制当前版本: ${l}`);});return F("div",{className:fr.tabPane,children:[v(Sn,{title:F($e,{children:[v(Oo,{tabKey:Be.AppRecommend,className:"mr-5px mt-2px size-30px"}),"推荐 access_key",F(Mn,{className:"ml-5px mt-6px size-18px",IconComponent:T2,children:[F("span",{className:"inline-flex items-center",children:["用于「",v(Oo,{tabKey:Be.AppRecommend,className:"mr-5px"}),"推荐」Tab"]}),v("br",{}),"用于 获取推荐 / 提交不喜欢等操作"]})]}),children:v(ER,{})}),v(Sn,{titleClassName:"justify-between",title:F($e,{children:["开关",v(Ao,{paths:["pureRecommend","showModalFeedOnLoad","showModalFeedEntry","multiSelect.showIcon"]})]}),children:F(Fr,{size:10,wrap:true,children:[v(at,{configPath:"pureRecommend",label:"全屏模式",tooltip:F($e,{children:["清空自带推荐内容, 只显示脚本推荐",v("br",{}),"P.S 需要刷新网页~",v("br",{}),"P.S 之前版本称 (纯推荐模式)"]}),extraAction:()=>yp()}),v(at,{configPath:"showModalFeedOnLoad",label:"自动「查看更多」",tooltip:"打开首页时自动打开「查看更多」弹窗",extraAction:l=>{l&&ft.success("已开启自动「查看更多」: 下次打开首页时将自动打开「查看更多」弹窗");}}),v(at,{configPath:"showModalFeedEntry",label:"「查看更多」按钮",tooltip:"是否显示「查看更多」按钮"}),v(at,{configPath:"multiSelect.showIcon",label:"「多选」按钮",tooltip:"是否显示「多选」按钮"})]})}),F(Sn,{title:F($e,{children:["布局",v(Mn,{className:"ml-5px size-18px",IconComponent:T2,children:"网格布局"})]}),children:[F("div",{className:"flex items-center gap-x-15px",children:[v(at,{configPath:"grid.useCustomGrid",label:"全屏模式: 使用自定义网格配置",tooltip:F($e,{children:["网格配置指: 网格宽度, 间距, 列数等. ",v("br",{}),"自定义网格配置: 宽度为90%; 可跟随 Bilibili-Evolved 自定义顶栏配置; 列数: 4 - 10列; 由 ",uo," 自定义; ",v("br",{}),"默认网格配置: bili-feed4 版本B站首页默认的网格配置; 在 Safari 中使用建议取消勾选此项."]})}),F("div",{className:"flex items-center gap-x-4px",children:[v(at,{disabled:!n,configPath:"grid.enableForceCoumn",label:"手动设置列数",tooltip:v($e,{children:"手动设置列数"})}),n&&r&&v(Ba,{value:o,onChange:l=>{l&&(Ue.grid.forceColumnCount=l);},min:0,max:10,step:1,size:"small",style:{width:50}})]})]}),F("div",{className:"flex items-center",children:["网格显示模式",v(qD,{className:"ml-30px"})]})]}),v(Sn,{titleClassName:"justify-between",title:F($e,{children:["视频链接",v(Ao,{paths:["videoLinkOpenMode"]})]}),children:v(Fr,{size:20,children:F("div",{className:"flex-v-center",children:["默认打开模式",F(Mn,{useBlackBg:true,children:["选择点击视频(封面图片 或 标题)时打开的模式 ",v("br",{}),s.map(({value:l,config:c})=>!!c.desc&&F("div",{className:"mt-10px flex items-start first:mt-0",children:[F("span",{className:"inline-flex items-center",children:[c.icon,v("span",{className:"ml-4px mr-10px min-w-95px",children:c.label})]}),v("span",{className:"desc",children:c.desc})]},l))]}),v(is,{className:"ml-8px w-160px",options:s,value:i,onChange:l=>{vo({videoLinkOpenMode:l});}})]})})}),v(Sn,{titleClassName:"justify-between",title:F($e,{children:[F("span",{className:"flex items-center",children:["视频卡片操作",F(Mn,{children:["视频卡片右上角「稍后再看」按钮旁 ",v("br",{}),"「稍后再看」因其通用性不提供关闭选项"]})]}),v(Ao,{paths:["videoCard.actions.showLargePreview","videoCard.actions.openInPipWindow","videoCard.videoPreview.useMp4","videoCard.videoPreview.usePreferredCdn","videoCard.videoPreview.useScale","videoCard.videoPreview.useVideoCardAsTrigger","pipWindow.defaultLocked","pipWindow.autoWebFullscreen"]})]}),children:F("div",{className:"grid grid-cols-[repeat(2,max-content)_1fr] items-start gap-x-20px",children:[v(at,{configPath:"videoCard.actions.showLargePreview",label:"浮动预览",tooltip:F($e,{children:["创意来源「浮图秀」, 但使用视频预览 ",v("br",{}),"操作说明: ",v("br",{}),"1. 鼠标悬浮打开 「浮动预览」, 离开关闭 ",v("br",{}),"2. 点击固定「浮动预览」, 固定指: 不再随鼠标移出关闭预览 ",v("br",{}),"3. 可使用以下方式关闭固定的「浮动预览」",F("ul",{className:"ml-30px list-circle",children:[v("li",{children:"再次点击视频卡片按钮"}),v("li",{children:"点击预览视频右上方的「关闭」按钮"}),v("li",{children:"触发其他卡片的「浮动预览」"}),v("li",{children:"Esc键"}),v("li",{children:"点击页面空白处"})]})]})}),v(at,{configPath:"videoCard.actions.openInPipWindow",label:"小窗打开",tooltip:v($e,{children:"仅当「文档画中画」API 可用时, 勾选生效"})}),v(tl,{className:"grid-col-span-full my-2px py-0"}),F("div",{className:"flex flex-col",children:[v(at,{configPath:"videoCard.videoPreview.useMp4",disabled:!e,label:"浮动预览: 使用 mp4",tooltip:ur("使用 mp4, 最高 720p, 有声音","使用 dash, 最高 1080p, 无声音, 理论上更快")}),v(at,{configPath:"videoCard.videoPreview.usePreferredCdn",disabled:!e,label:"浮动预览: 使用优选 CDN",tooltip:ur("使用优选 CDN (降低 MCDN & PCDN 优先级)","使用默认 CDN")}),v(at,{configPath:"videoCard.videoPreview.useScale",disabled:!e,label:"浮动预览: 使用放大效果",tooltip:ur("浮动预览面板: 放大展开 (类似浮图秀)","浮动预览面板: 滑动展开")}),v(at,{configPath:"videoCard.videoPreview.useVideoCardAsTrigger",disabled:!e,label:"浮动预览: 使用视频卡片作为触发器",tooltip:F($e,{children:[ur("使用「视频卡片」作为触发器","使用「视频卡片右上角按钮」作为触发器"),v(tl,{className:"my-1"}),F("ul",{className:"list-circle pl-25px",children:[v("li",{children:"悬浮视频卡片 1 秒后展开「浮动预览」"}),v("li",{children:"「视频卡片」更容易触发, 但也容易非预览意图误触发"}),v("li",{children:"与「视频卡片右上角按钮」独立, 关掉视频卡片按钮, 此选项仍然生效"})]})]})})]}),F("div",{className:"flex flex-col",children:[v(at,{configPath:"pipWindow.defaultLocked",disabled:!t,label:"小窗: 默认锁定",tooltip:ur("小窗打开时: 默认锁定","小窗打开时: 不锁定")}),v(at,{configPath:"pipWindow.autoWebFullscreen",disabled:!t,label:"小窗: 自动网页全屏",tooltip:ur("自动网页全屏","不启用")})]})]})}),F(Sn,{titleClassName:"justify-between",title:F($e,{children:["快照预览",v(Ao,{paths:["videoCard.imgPreview.autoPreviewWhenKeyboardSelect","videoCard.imgPreview.autoPreviewWhenHover","videoCard.imgPreview.disableWhenMultiSelecting"]})]}),contentClassName:"flex-row flex-wrap items-center gap-x-10px",children:[v(at,{configPath:"videoCard.imgPreview.autoPreviewWhenKeyboardSelect",label:"键盘选中后自动开始",tooltip:F($e,{children:["手动预览快捷键: ",v(Ir,{color:"green",children:"."})," or ",v(Ir,{color:"green",children:"p"})," ",v("br",{}),"切换设置快捷键: ",v(Ir,{color:"green",children:"shift+p"})]})}),v(at,{configPath:"videoCard.imgPreview.autoPreviewWhenHover",label:"鼠标悬浮后自动开始",tooltip:F($e,{children:["鼠标悬浮后自动开始预览, 预览不再跟随鼠标位置 ",v("br",{}),"切换设置快捷键: ",v(Ir,{color:"green",children:"shift+m"})]})}),v(at,{configPath:"videoCard.imgPreview.disableWhenMultiSelecting",label:"多选时禁用",tooltip:ur("多选开启时, 禁用快照预览","不禁用")})]}),F(Sn,{title:F($e,{children:["帮助",F("span",{className:"relative top-4px ml-8px mr-4px inline-flex items-center text-size-14px",children:["当前版本",F(Ir,{color:"green",className:"mx-4px cursor-pointer",onClick:a,children:[uo," v","0.34.1"]}),v(Es,{className:"size-16px cursor-pointer",onClick:a})]})]}),contentClassName:"flex-row gap-x-10px",children:[v(Jt,{title:"来个 Star 支持一下",children:v(Je,{href:"https://github.com/magicdawn/Bilibili-Gate",target:"_blank",children:"GitHub 主页"})}),v(Je,{href:"https://afdian.com/a/magicdawn",target:"_blank",children:"「爱发电」支持"}),v(Je,{href:"https://greasyfork.org/zh-CN/scripts/443530-bilibili-gate",target:"_blank",children:"GreasyFork 主页"}),v(Je,{href:"https://github.com/magicdawn/Bilibili-Gate/#%E5%BF%AB%E6%8D%B7%E9%94%AE%E8%AF%B4%E6%98%8E",target:"_blank",children:"查看可用的快捷键"}),v(Je,{href:"https://github.com/magicdawn/Bilibili-Gate/releases",target:"_blank",children:"更新日志"})]})]})}const yg=[{useBorder:false},{useBorder:true,useBorderOnlyOnHover:true},{useBorder:true,useBorderOnlyOnHover:false}],_R=["「卡片边框」: 禁用","「卡片边框」: 仅在悬浮时显示","「卡片边框」: 总是显示"];function OJ(){return qr(["shift.b"],e=>{if(ui())return;const t=Va(Ue.style.videoCard,["useBorder","useBorderOnlyOnHover"]),n=yg.findIndex(s=>ei(s,Va(t,Object.keys(s))));if(n===-1)throw new Error("unexpected curIndex = -1");const r=(n+1)%yg.length,o=yg[r];Object.assign(Ue.style.videoCard,o);const i=_R[r];ft.success(i);},{exactMatch:true})}function FJ(){const{style:e}=Mt(),t=An(fr.tabPane,"flex flex-col flex-wrap content-start gap-x-30px gap-y-10px"),n="flex flex-col gap-y-4px";return F("div",{className:t,children:[v(Sn,{title:F($e,{children:["通用",v(Ao,{className:"ml-10px",paths:["style.general.popoverBorderColorUseColorPrimary"]})]}),children:v("div",{className:n,children:v(at,{configPath:"style.general.popoverBorderColorUseColorPrimary",label:"下拉面板使用主题色边框"})})}),v(Sn,{title:F($e,{children:["全屏模式",v(Ao,{className:"ml-10px",paths:["style.pureRecommend.useStickyTabbar","style.pureRecommend.stickyTabbarShadow","grid.useCustomGrid","style.pureRecommend.useWhiteBackground","style.pureRecommend.hideTopChannel"]})]}),children:F("div",{className:n,children:[v(at,{configPath:"style.pureRecommend.useStickyTabbar",label:"全屏模式: 固定 Tab 栏",tooltip:ur("Tab 栏会吸附在顶栏下方","Tab 栏会随页面一起滚动")}),v(at,{disabled:!e.pureRecommend.useStickyTabbar,configPath:"style.pureRecommend.stickyTabbarShadow",label:"全屏模式: 固定 Tab 栏 : 添加边框 & 阴影",tooltip:ur("Tab 栏在吸附状态下: 加宽, 添加边框 & 阴影","不改变")}),v(at,{configPath:"style.pureRecommend.useWhiteBackground",label:"全屏模式: 使用纯白背景",tooltip:ur("纯白背景","浅灰色背景")}),v(at,{configPath:"style.pureRecommend.hideTopChannel",label:"全屏模式: 隐藏顶部分区和Banner"})]})}),v(Sn,{title:F($e,{children:["视频卡片",v(Ao,{className:"ml-10px",paths:["style.videoCard.useBorder","style.videoCard.useBorderOnlyOnHover","style.videoCard.useBoxShadow","useDelayForHover"]})]}),children:F("div",{className:n,children:[v(at,{configPath:"style.videoCard.useBorder",label:"使用卡片边框",tooltip:F($e,{children:["勾选后, 视频卡片会有边框包裹, 更像是一个卡片~ ",v("br",{}),"整个卡片区域可点击 / 可触发预览 / 可使用右键菜单 ",v("br",{}),"否则只是封面区域可以 ",v("br",{}),"使用快捷键 ",v(Ir,{color:"green",children:"shift+b"})," 切换状态",v("br",{}),_R.map(r=>v(Ir,{color:"success",children:r},r))]})}),v(at,{configPath:"style.videoCard.useBorderOnlyOnHover",label:"仅在悬浮时显示",disabled:!e.videoCard.useBorder,tooltip:ur("仅在悬浮时显示","一直显示")}),v(at,{configPath:"style.videoCard.useBoxShadow",disabled:!e.videoCard.useBorder,label:"悬浮卡片时使用发光效果",tooltip:v($e,{children:"悬浮卡片时使用发光效果, 看起来比较花哨~"})}),v(at,{configPath:"useDelayForHover",label:"延迟悬浮预览",tooltip:v($e,{children:"延迟悬浮预览"})})]})})]})}async function LJ(e){const n=(await Tt.get("/x/space/wbi/acc/info",{params:{mid:e,w_webid:await w6()||""}})).data;if(!cn(n)){Yr("space acc info error for %s: %o",e,n);return}return n.data}const bC=Qs({fn:LJ,generateKey:e=>e.toString(),tableName:"space-acc-info",ttl:Wn("10d"),concurrency:2});async function BJ(e){return (await bC(e))?.name}const Ju=Qs({fn:BJ,generateKey:e=>e.toString(),tableName:"user-nickname",ttl:Wn("10d")});async function O2(e,t){await Ju.cache.set(e.toString(),{val:t,ts:Date.now()});}function kJ(){return VR("filter.byAuthor.keywords")}function DJ(){return jR("filter.byAuthor.keywords")}function zJ(){return VR("filter.byTitle.keywords")}function _J(){return jR("filter.byTitle.keywords")}function HR(e){return `__${uo}:${e}__`}async function VR(e){const t=HR(e),n=await gp(e);GM.setClipboard(JSON.stringify({[t]:n},null,2)),ft.success("已复制到剪贴板!");}async function jR(e){const[t,n]=await Am(()=>navigator.clipboard.readText());if(t)return ft.error("读取剪贴板失败!");if(!n)return ft.error("剪贴板内容为空!");const[r,o]=Rm(()=>JSON.parse(n));if(r)return ft.error("无法解析剪贴板内容!");if(!o)return ft.error("剪贴板内容为空!");const i=HR(e),s=o?.[i];if(!s?.length)return ft.error("没有符合条件的数据!");const a=await gp(e),l=kE(s,a);if(!l.length)return ft.warning("没有可导入内容, 已全部存在!");ii(e,{add:l}),ft.success(`已导入 ${l.length} 条数据!`);}const F2=/^(?<mid>\d+)\((?<remark>[\S ]+)\)$/,HJ=/^\d+$/;function Ep(e){if(F2.test(e)){const t=F2.exec(e)?.groups,n=t?.mid,r=t?.remark;return {mid:n,remark:r}}return HJ.test(e)?{mid:e,remark:void 0}:{}}function WR(e){const t=new Set,n=new Set;return e.forEach(r=>{const{mid:o}=Ep(r);o?t.add(o):n.add(r);}),{blockUpMids:t,blockUpNames:n}}function VJ(e){const t=[],n=[];return e.forEach(r=>{if(r.startsWith("/")&&r.endsWith("/")){const o=new RegExp(r.slice(1,-1),"i");t.push(o);}else n.push(r);}),{titleKeywordList:n,titleRegexList:t}}const jJ=e=>{const{getPrefixCls:t,direction:n}=f.useContext(ot),{prefixCls:r,className:o}=e,i=t("input-group",r),s=t("input"),[a,l]=aR(s),c=H(i,l,{[`${i}-lg`]:e.size==="large",[`${i}-sm`]:e.size==="small",[`${i}-compact`]:e.compact,[`${i}-rtl`]:n==="rtl"},a,o),u=f.useContext(Zn),d=f.useMemo(()=>({...u,isFormItemInput:false}),[u]);return f__namespace.createElement(Zn.Provider,{value:d},f__namespace.createElement(Fr.Compact,{className:c,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},e.children))};function WJ(e){return !!(e.addonBefore||e.addonAfter)}function qJ(e){return !!(e.prefix||e.suffix||e.allowClear)}function L2(e,t,n){const r=t.cloneNode(true),o=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart=="number"&&typeof t.selectionEnd=="number"&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=(...i)=>{t.setSelectionRange(...i);},o}function pm(e,t,n,r){if(!n)return;let o=t;if(t.type==="click"){o=L2(t,e,""),n(o);return}if(e.type!=="file"&&r!==void 0){o=L2(t,e,r),n(o);return}n(o);}function c0(){return c0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},c0.apply(this,arguments)}const qR=f.forwardRef((e,t)=>{const{inputElement:n,children:r,prefixCls:o,prefix:i,suffix:s,addonBefore:a,addonAfter:l,className:c,style:u,disabled:d,readOnly:m,focused:p,triggerFocus:h,allowClear:g,value:b,handleReset:y,hidden:C,classes:x,classNames:w,dataAttrs:S,styles:I,components:$,onClear:E}=e,P=r??n,M=$?.affixWrapper||"span",N=$?.groupWrapper||"span",A=$?.wrapper||"span",k=$?.groupAddon||"span",R=f.useRef(null),L=D=>{R.current?.contains(D.target)&&h?.();},V=qJ(e);let _=f.cloneElement(P,{value:b,className:H(P.props?.className,!V&&w?.variant)||null});const z=f.useRef(null);if(f.useImperativeHandle(t,()=>({nativeElement:z.current||R.current})),V){let D=null;if(g){const j=!d&&!m&&b,Y=`${o}-clear-icon`,q=typeof g=="object"&&g?.clearIcon?g.clearIcon:"✖";D=f.createElement("button",{type:"button",tabIndex:-1,onClick:U=>{y?.(U),E?.();},onMouseDown:U=>U.preventDefault(),className:H(Y,{[`${Y}-hidden`]:!j,[`${Y}-has-suffix`]:!!s})},q);}const W=`${o}-affix-wrapper`,O=H(W,{[`${o}-disabled`]:d,[`${W}-disabled`]:d,[`${W}-focused`]:p,[`${W}-readonly`]:m,[`${W}-input-with-clear-btn`]:s&&g&&b},x?.affixWrapper,w?.affixWrapper,w?.variant),B=(s||g)&&f.createElement("span",{className:H(`${o}-suffix`,w?.suffix),style:I?.suffix},D,s);_=f.createElement(M,c0({className:O,style:I?.affixWrapper,onClick:L},S?.affixWrapper,{ref:R}),i&&f.createElement("span",{className:H(`${o}-prefix`,w?.prefix),style:I?.prefix},i),_,B);}if(WJ(e)){const D=`${o}-group`,W=`${D}-addon`,O=`${D}-wrapper`,B=H(`${o}-wrapper`,D,x?.wrapper,w?.wrapper),j=H(O,{[`${O}-disabled`]:d},x?.group,w?.groupWrapper);_=f.createElement(N,{className:j,ref:z},f.createElement(A,{className:B},a&&f.createElement(k,{className:W},a),_,l&&f.createElement(k,{className:W},l)));}return f.cloneElement(_,{className:H(_.props?.className,c)||null,style:{..._.props?.style,...u},hidden:C})});function UR(e,t){return f__namespace.useMemo(()=>{let n={};t&&(n.show=typeof t=="object"&&t.formatter?t.formatter:!!t),n={...n,...e};const{show:r,...o}=n;return {...o,show:!!r,showFormatter:typeof r=="function"?r:void 0,strategy:o.strategy||(i=>i.length)}},[e,t])}function hm(){return hm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},hm.apply(this,arguments)}const UJ=f.forwardRef((e,t)=>{const{autoComplete:n,onChange:r,onFocus:o,onBlur:i,onPressEnter:s,onKeyDown:a,onKeyUp:l,prefixCls:c="rc-input",disabled:u,htmlSize:d,className:m,maxLength:p,suffix:h,showCount:g,count:b,type:y="text",classes:C,classNames:x,styles:w,onCompositionStart:S,onCompositionEnd:I,...$}=e,[E,P]=f.useState(false),M=f.useRef(false),N=f.useRef(false),A=f.useRef(null),k=f.useRef(null),R=Z=>{A.current&&i1(A.current,Z);},[L,V]=Bt(e.defaultValue,e.value),_=L==null?"":String(L),[z,D]=f.useState(null),W=UR(b,g),O=W.max||p,B=W.strategy(_),j=!!O&&B>O;f.useImperativeHandle(t,()=>({focus:R,blur:()=>{A.current?.blur();},setSelectionRange:(Z,te,ce)=>{A.current?.setSelectionRange(Z,te,ce);},select:()=>{A.current?.select();},input:A.current,nativeElement:k.current?.nativeElement||A.current})),f.useEffect(()=>{N.current&&(N.current=false),P(Z=>Z&&u?false:Z);},[u]);const Y=(Z,te,ce)=>{let ue=te;if(!M.current&&W.exceedFormatter&&W.max&&W.strategy(te)>W.max)ue=W.exceedFormatter(te,{max:W.max}),te!==ue&&D([A.current?.selectionStart||0,A.current?.selectionEnd||0]);else if(ce.source==="compositionEnd")return;V(ue),A.current&&pm(A.current,Z,r,ue);};f.useEffect(()=>{z&&A.current?.setSelectionRange(...z);},[z]);const q=Z=>{Y(Z,Z.target.value,{source:"change"});},U=Z=>{M.current=false,Y(Z,Z.currentTarget.value,{source:"compositionEnd"}),I?.(Z);},K=Z=>{s&&Z.key==="Enter"&&!N.current&&!Z.nativeEvent.isComposing&&(N.current=true,s(Z)),a?.(Z);},J=Z=>{Z.key==="Enter"&&(N.current=false),l?.(Z);},Q=Z=>{P(true),o?.(Z);},G=Z=>{N.current&&(N.current=false),P(false),i?.(Z);},ee=Z=>{V(""),R(),A.current&&pm(A.current,Z,r);},re=j&&`${c}-out-of-range`,oe=()=>{const Z=Zt(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return f.createElement("input",hm({autoComplete:n},Z,{onChange:q,onFocus:Q,onBlur:G,onKeyDown:K,onKeyUp:J,className:H(c,{[`${c}-disabled`]:u},x?.input),style:w?.input,ref:A,size:d,type:y,onCompositionStart:te=>{M.current=true,S?.(te);},onCompositionEnd:U}))},be=()=>{const Z=Number(O)>0;if(h||W.show){const te=W.showFormatter?W.showFormatter({value:_,count:B,maxLength:O}):`${B}${Z?` / ${O}`:""}`;return f.createElement(f.Fragment,null,W.show&&f.createElement("span",{className:H(`${c}-show-count-suffix`,{[`${c}-show-count-has-suffix`]:!!h},x?.count),style:{...w?.count}},te),h)}return null};return f.createElement(qR,hm({},$,{prefixCls:c,className:H(m,re),handleReset:ee,value:_,focused:E,triggerFocus:R,suffix:be(),disabled:u,classes:C,classNames:x,styles:w,ref:k}),oe())}),GR=e=>{let t;return typeof e=="object"&&e?.clearIcon?t=e:e&&(t={clearIcon:f.createElement(zu,null)}),t};function KR(e,t){const n=f.useRef([]),r=()=>{n.current.push(setTimeout(()=>{e.current?.input&&e.current?.input.getAttribute("type")==="password"&&e.current?.input.hasAttribute("value")&&e.current?.input.removeAttribute("value");}));};return f.useEffect(()=>(t&&r(),()=>n.current.forEach(o=>{o&&clearTimeout(o);})),[]),r}function GJ(e){return !!(e.prefix||e.suffix||e.allowClear||e.showCount)}const Ml=f.forwardRef((e,t)=>{const{prefixCls:n,bordered:r=true,status:o,size:i,disabled:s,onBlur:a,onFocus:l,suffix:c,allowClear:u,addonAfter:d,addonBefore:m,className:p,style:h,styles:g,rootClassName:b,onChange:y,classNames:C,variant:x,...w}=e,{getPrefixCls:S,direction:I,allowClear:$,autoComplete:E,className:P,style:M,classNames:N,styles:A}=St("input"),k=S("input",n),R=f.useRef(null),L=sn(k),[V,_]=sR(k,b);aR(k,L);const{compactSize:z,compactItemClassnames:D}=li(k,I),W=Vn(he=>i??z??he),O=f.useContext(zn),B=s??O,j={...e,size:W,disabled:B},[Y,q]=It([N,C],[A,g],{props:j}),{status:U,hasFeedback:K,feedbackIcon:J}=f.useContext(Zn),Q=gl(U,o),G=GJ(e)||!!K;f.useRef(G);const ee=KR(R,true),re=he=>{ee(),a?.(he);},oe=he=>{ee(),l?.(he);},be=he=>{ee(),y?.(he);},Z=(K||c)&&f.createElement(f.Fragment,null,c,K&&J),te=GR(u??$),[ce,ue]=Cp("input",x,r);return f.createElement(UJ,{ref:In(t,R),prefixCls:k,autoComplete:E,...w,disabled:B,onBlur:re,onFocus:oe,style:{...q.root,...M,...h},styles:q,suffix:Z,allowClear:te,className:H(p,b,_,L,D,P,Y.root),onChange:be,addonBefore:m&&f.createElement(Hi,{form:true,space:true},m),addonAfter:d&&f.createElement(Hi,{form:true,space:true},d),classNames:{...Y,input:H({[`${k}-sm`]:W==="small",[`${k}-lg`]:W==="large",[`${k}-rtl`]:I==="rtl"},Y.input,V),variant:H({[`${k}-${ce}`]:ue},Gi(k,Q)),affixWrapper:H({[`${k}-affix-wrapper-sm`]:W==="small",[`${k}-affix-wrapper-lg`]:W==="large",[`${k}-affix-wrapper-rtl`]:I==="rtl"},V),wrapper:H({[`${k}-group-rtl`]:I==="rtl"},V),groupWrapper:H({[`${k}-group-wrapper-sm`]:W==="small",[`${k}-group-wrapper-lg`]:W==="large",[`${k}-group-wrapper-rtl`]:I==="rtl",[`${k}-group-wrapper-${ce}`]:ue},Gi(`${k}-group-wrapper`,Q,K),V)}})}),KJ=e=>{const{componentCls:t,paddingXS:n}=e;return {[t]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:n,[`${t}-input-wrapper`]:{position:"relative",[`${t}-mask-icon`]:{position:"absolute",zIndex:"1",top:"50%",right:"50%",transform:"translate(50%, -50%)",pointerEvents:"none"},[`${t}-mask-input`]:{color:"transparent",caretColor:e.colorText},[`${t}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":"none",margin:0},[`${t}-mask-input[type=number]`]:{"-moz-appearance":"textfield"}},"&-rtl":{direction:"rtl"},[`${t}-input`]:{textAlign:"center",paddingInline:e.paddingXXS},[`&${t}-sm ${t}-input`]:{paddingInline:e.calc(e.paddingXXS).div(2).equal()},[`&${t}-lg ${t}-input`]:{paddingInline:e.paddingXS}}}},XJ=xt(["Input","OTP"],e=>{const t=vt(e,El(e));return KJ(t)},Il),YJ=f__namespace.forwardRef((e,t)=>{const{className:n,value:r,onChange:o,onActiveChange:i,index:s,mask:a,onFocus:l,...c}=e,{getPrefixCls:u}=f__namespace.useContext(ot),d=u("otp"),m=typeof a=="string"?a:r,p=f__namespace.useRef(null);f__namespace.useImperativeHandle(t,()=>p.current);const h=C=>{o(s,C.target.value);},g=()=>{gt(()=>{const C=p.current?.input;document.activeElement===C&&C&&C.select();});},b=C=>{l?.(C),g();},y=C=>{const{key:x,ctrlKey:w,metaKey:S}=C;x==="ArrowLeft"?i(s-1):x==="ArrowRight"?i(s+1):x==="z"&&(w||S)?C.preventDefault():x==="Backspace"&&!r&&i(s-1),g();};return f__namespace.createElement("span",{className:`${d}-input-wrapper`,role:"presentation"},a&&r!==""&&r!==void 0&&f__namespace.createElement("span",{className:`${d}-mask-icon`,"aria-hidden":"true"},m),f__namespace.createElement(Ml,{"aria-label":`OTP Input ${s+1}`,type:a===true?"password":"text",...c,ref:p,value:r,onInput:h,onFocus:b,onKeyDown:y,onMouseDown:g,onMouseUp:g,className:H(n,{[`${d}-mask-input`]:a})}))});function Dd(e){return (e||"").split("")}const QJ=e=>{const{index:t,prefixCls:n,separator:r,className:o,style:i}=e,s=typeof r=="function"?r(t):r;return s?f__namespace.createElement("span",{className:H(`${n}-separator`,o),style:i},s):null},ZJ=f__namespace.forwardRef((e,t)=>{const{prefixCls:n,length:r=6,size:o,defaultValue:i,value:s,onChange:a,formatter:l,separator:c,variant:u,disabled:d,status:m,autoFocus:p,mask:h,type:g,onInput:b,onFocus:y,inputMode:C,classNames:x,styles:w,className:S,style:I,...$}=e,{classNames:E,styles:P,getPrefixCls:M,direction:N,style:A,className:k}=St("otp"),R=M("otp",n),L={...e,length:r},[V,_]=It([E,x],[P,w],{props:L}),z=or($,{aria:true,data:true,attr:true}),[D,W]=XJ(R),O=Vn(te=>o??te),B=f__namespace.useContext(Zn),j=gl(B.status,m),Y=f__namespace.useMemo(()=>({...B,status:j,hasFeedback:false,feedbackIcon:null}),[B,j]),q=f__namespace.useRef(null),U=f__namespace.useRef({});f__namespace.useImperativeHandle(t,()=>({focus:()=>{U.current[0]?.focus();},blur:()=>{for(let te=0;te<r;te+=1)U.current[te]?.blur();},nativeElement:q.current}));const K=te=>l?l(te):te,[J,Q]=f__namespace.useState(()=>Dd(K(i||"")));f__namespace.useEffect(()=>{s!==void 0&&Q(Dd(s));},[s]);const G=lt(te=>{Q(te),b&&b(te),a&&te.length===r&&te.every(ce=>ce)&&te.some((ce,ue)=>J[ue]!==ce)&&a(te.join(""));}),ee=lt((te,ce)=>{let ue=Et(J);for(let ye=0;ye<te;ye+=1)ue[ye]||(ue[ye]="");ce.length<=1?ue[te]=ce:ue=ue.slice(0,te).concat(Dd(ce)),ue=ue.slice(0,r);for(let ye=ue.length-1;ye>=0&&!ue[ye];ye-=1)ue.pop();const he=K(ue.map(ye=>ye||" ").join(""));return ue=Dd(he).map((ye,pe)=>ye===" "&&!ue[pe]?ue[pe]:ye),ue}),re=(te,ce)=>{const ue=ee(te,ce),he=Math.min(te+ce.length,r-1);he!==te&&ue[te]!==void 0&&U.current[he]?.focus(),G(ue);},oe=te=>{U.current[te]?.focus();},be=(te,ce)=>{for(let ue=0;ue<ce;ue+=1)if(!U.current[ue]?.input?.value){U.current[ue]?.focus();break}y?.(te);},Z={variant:u,disabled:d,status:j,mask:h,type:g,inputMode:C};return f__namespace.createElement("div",{...z,ref:q,className:H(S,R,{[`${R}-sm`]:O==="small",[`${R}-lg`]:O==="large",[`${R}-rtl`]:N==="rtl"},W,D,k,V.root),style:{..._.root,...A,...I},role:"group"},f__namespace.createElement(Zn.Provider,{value:Y},Array.from({length:r}).map((te,ce)=>{const ue=`otp-${ce}`,he=J[ce]||"";return f__namespace.createElement(f__namespace.Fragment,{key:ue},f__namespace.createElement(YJ,{ref:ye=>{U.current[ce]=ye;},index:ce,size:O,htmlSize:1,className:H(V.input,`${R}-input`),style:_.input,onChange:re,value:he,onActiveChange:oe,autoFocus:ce===0&&p,onFocus:ye=>be(ye,ce),...Z}),ce<r-1&&f__namespace.createElement(QJ,{separator:c,index:ce,prefixCls:R,className:H(V.separator),style:_.separator}))})))}),JJ=e=>e?f__namespace.createElement(qQ,null):f__namespace.createElement(VQ,null),eee={click:"onClick",hover:"onMouseOver"},tee=f__namespace.forwardRef((e,t)=>{const{disabled:n,action:r="click",visibilityToggle:o=true,iconRender:i=JJ,suffix:s}=e,a=f__namespace.useContext(zn),l=n??a,c=typeof o=="object"&&o.visible!==void 0,[u,d]=f.useState(()=>c?o.visible:false),m=f.useRef(null);f__namespace.useEffect(()=>{c&&d(o.visible);},[c,o]);const p=KR(m),h=()=>{if(l)return;u&&p();const N=!u;d(N),typeof o=="object"&&o.onVisibleChange?.(N);},g=N=>{const A=eee[r]||"",k=i(u),R={[A]:h,className:`${N}-icon`,key:"passwordIcon",onMouseDown:L=>{L.preventDefault();},onMouseUp:L=>{L.preventDefault();}};return f__namespace.cloneElement(f__namespace.isValidElement(k)?k:f__namespace.createElement("span",null,k),R)},{className:b,prefixCls:y,inputPrefixCls:C,size:x,...w}=e,{getPrefixCls:S}=f__namespace.useContext(ot),I=S("input",C),$=S("input-password",y),E=o&&g($),P=H($,b,{[`${$}-${x}`]:!!x}),M={...Zt(w,["suffix","iconRender","visibilityToggle"]),type:u?"text":"password",className:P,prefixCls:I,suffix:f__namespace.createElement(f__namespace.Fragment,null,E,s)};return x&&(M.size=x),f__namespace.createElement(Ml,{ref:In(t,m),...M})}),nee=e=>{const{componentCls:t}=e,n=`${t}-btn`;return {[t]:{width:"100%",[n]:{"&-filled":{background:e.colorFillTertiary,"&:not(:disabled)":{"&:hover":{background:e.colorFillSecondary},"&:active":{background:e.colorFill}}}}}}},ree=xt(["Input","Search"],e=>[nee(e)]),oee=f__namespace.forwardRef((e,t)=>{const{prefixCls:n,inputPrefixCls:r,className:o,size:i,style:s,enterButton:a=false,addonAfter:l,loading:c,disabled:u,onSearch:d,onChange:m,onCompositionStart:p,onCompositionEnd:h,variant:g,onPressEnter:b,classNames:y,styles:C,hidden:x,...w}=e,{direction:S,getPrefixCls:I,classNames:$,styles:E}=St("inputSearch"),P={...e,enterButton:a},[M,N]=It([$,y],[E,C],{props:P},{button:{_default:"root"}}),A=f__namespace.useRef(false),k=I("input-search",n),R=I("input",r),[L,V]=ree(k),{compactSize:_}=li(k,S),z=Vn(Z=>i??_??Z),D=f__namespace.useRef(null),W=Z=>{Z?.target&&Z.type==="click"&&d&&d(Z.target.value,Z,{source:"clear"}),m?.(Z);},O=Z=>{document.activeElement===D.current?.input&&Z.preventDefault();},B=Z=>{d&&d(D.current?.input?.value,Z,{source:"input"});},j=Z=>{A.current||c||(b?.(Z),B(Z));},Y=typeof a=="boolean"?f__namespace.createElement(oC,null):null,q=`${k}-btn`,U=H(q,{[`${q}-${g}`]:g});let K;const J=a||{},Q=J.type&&J.type.__ANT_BUTTON===true;Q||J.type==="button"?K=Rn(J,{onMouseDown:O,onClick:Z=>{J?.props?.onClick?.(Z),B(Z);},key:"enterButton",...Q?{className:U,size:z}:{}}):K=f__namespace.createElement(Je,{classNames:M.button,styles:N.button,className:U,color:a?"primary":"default",size:z,disabled:u,key:"enterButton",onMouseDown:O,onClick:B,loading:c,icon:Y,variant:g==="borderless"||g==="filled"||g==="underlined"?"text":a?"solid":void 0},a),l&&(K=[K,Rn(l,{key:"addonAfter"})]);const G=H(k,V,{[`${k}-rtl`]:S==="rtl",[`${k}-${z}`]:!!z,[`${k}-with-button`]:!!a},o,L,M.root),ee=Z=>{A.current=true,p?.(Z);},re=Z=>{A.current=false,h?.(Z);},oe=or(w,{data:true}),be=Zt({...w,classNames:Zt(M,["button","root"]),styles:Zt(N,["button","root"]),prefixCls:R,type:"search",size:z,variant:g,onPressEnter:j,onCompositionStart:ee,onCompositionEnd:re,onChange:W,disabled:u},Object.keys(oe));return f__namespace.createElement(Ey,{className:G,style:{...s,...N.root},...oe,hidden:x},f__namespace.createElement(Ml,{ref:In(D,t),...be}),K)}),iee=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important;
pointer-events: none !important;
`,see=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],Cg={};let $r;function aee(e,t=false){const n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&Cg[n])return Cg[n];const r=window.getComputedStyle(e),o=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),i=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),s=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),l={sizingStyle:see.map(c=>`${c}:${r.getPropertyValue(c)}`).join(";"),paddingSize:i,borderSize:s,boxSizing:o};return t&&n&&(Cg[n]=l),l}function lee(e,t=false,n=null,r=null){$r||($r=document.createElement("textarea"),$r.setAttribute("tab-index","-1"),$r.setAttribute("aria-hidden","true"),$r.setAttribute("name","hiddenTextarea"),document.body.appendChild($r)),e.getAttribute("wrap")?$r.setAttribute("wrap",e.getAttribute("wrap")):$r.removeAttribute("wrap");const{paddingSize:o,borderSize:i,boxSizing:s,sizingStyle:a}=aee(e,t);$r.setAttribute("style",`${a};${iee}`),$r.value=e.value||e.placeholder||"";let l,c,u,d=$r.scrollHeight;if(s==="border-box"?d+=i:s==="content-box"&&(d-=o),n!==null||r!==null){$r.value=" ";const p=$r.scrollHeight-o;n!==null&&(l=p*n,s==="border-box"&&(l=l+o+i),d=Math.max(l,d)),r!==null&&(c=p*r,s==="border-box"&&(c=c+o+i),u=d>c?"":"hidden",d=Math.min(c,d));}const m={height:d,overflowY:u,resize:"none"};return l&&(m.minHeight=l),c&&(m.maxHeight=c),m}function u0(){return u0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},u0.apply(this,arguments)}const xg=0,wg=1,Sg=2,cee=f__namespace.forwardRef((e,t)=>{const{prefixCls:n,defaultValue:r,value:o,autoSize:i,onResize:s,className:a,style:l,disabled:c,onChange:u,onInternalAutoSize:d,...m}=e,[p,h]=Bt(r,o),g=p??"",b=L=>{h(L.target.value),u?.(L);},y=f__namespace.useRef();f__namespace.useImperativeHandle(t,()=>({textArea:y.current}));const[C,x]=f__namespace.useMemo(()=>i&&typeof i=="object"?[i.minRows,i.maxRows]:[],[i]),w=!!i,[S,I]=f__namespace.useState(Sg),[$,E]=f__namespace.useState(),P=()=>{I(xg);};Kt(()=>{w&&P();},[o,C,x,w]),Kt(()=>{if(S===xg)I(wg);else if(S===wg){const L=lee(y.current,false,C,x);I(Sg),E(L);}},[S]);const M=f__namespace.useRef(),N=()=>{gt.cancel(M.current);},A=L=>{S===Sg&&(s?.(L),i&&(N(),M.current=gt(()=>{P();})));};f__namespace.useEffect(()=>N,[]);const R={...l,...w?$:null};return (S===xg||S===wg)&&(R.overflowY="hidden",R.overflowX="hidden"),f__namespace.createElement(Kr,{onResize:A,disabled:!(i||s)},f__namespace.createElement("textarea",u0({},m,{ref:y,style:R,className:H(n,a,{[`${n}-disabled`]:c}),disabled:c,value:g,onChange:b})))});function d0(){return d0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},d0.apply(this,arguments)}const uee=f.forwardRef(({defaultValue:e,value:t,onFocus:n,onBlur:r,onChange:o,allowClear:i,maxLength:s,onCompositionStart:a,onCompositionEnd:l,suffix:c,prefixCls:u="rc-textarea",showCount:d,count:m,className:p,style:h,disabled:g,hidden:b,classNames:y,styles:C,onResize:x,onClear:w,onPressEnter:S,readOnly:I,autoSize:$,onKeyDown:E,...P},M)=>{const[N,A]=Bt(e,t),k=N==null?"":String(N),[R,L]=f.useState(false),V=f.useRef(false),[_,z]=f.useState(null),D=f.useRef(null),W=f.useRef(null),O=()=>W.current?.textArea,B=()=>{O().focus();};f.useImperativeHandle(M,()=>({resizableTextArea:W.current,focus:B,blur:()=>{O().blur();},nativeElement:D.current?.nativeElement||O()})),f.useEffect(()=>{L(ie=>!g&&ie);},[g]);const[j,Y]=f.useState(null);f.useEffect(()=>{j&&O().setSelectionRange(...j);},[j]);const q=UR(m,d),U=q.max??s,K=Number(U)>0,J=q.strategy(k),Q=!!U&&J>U,G=(ie,ge)=>{let Se=ge;!V.current&&q.exceedFormatter&&q.max&&q.strategy(ge)>q.max&&(Se=q.exceedFormatter(ge,{max:q.max}),ge!==Se&&Y([O().selectionStart||0,O().selectionEnd||0])),A(Se),pm(ie.currentTarget,ie,o,Se);},ee=ie=>{V.current=true,a?.(ie);},re=ie=>{V.current=false,G(ie,ie.currentTarget.value),l?.(ie);},oe=ie=>{G(ie,ie.target.value);},be=ie=>{ie.key==="Enter"&&S&&!ie.nativeEvent.isComposing&&S(ie),E?.(ie);},Z=ie=>{L(true),n?.(ie);},te=ie=>{L(false),r?.(ie);},ce=ie=>{A(""),B(),pm(O(),ie,o);};let ue=c,he;q.show&&(q.showFormatter?he=q.showFormatter({value:k,count:J,maxLength:U}):he=`${J}${K?` / ${U}`:""}`,ue=f.createElement(f.Fragment,null,ue,f.createElement("span",{className:H(`${u}-data-count`,y?.count),style:C?.count},he)));const ye=ie=>{x?.(ie),O()?.style.height&&z(true);},pe=!$&&!d&&!i;return f.createElement(qR,{ref:D,value:k,allowClear:i,handleReset:ce,suffix:ue,prefixCls:u,classNames:{...y,affixWrapper:H(y?.affixWrapper,{[`${u}-show-count`]:d,[`${u}-textarea-allow-clear`]:i})},disabled:g,focused:R,className:H(p,Q&&`${u}-out-of-range`),style:{...h,..._&&!pe?{height:"auto"}:{}},dataAttrs:{affixWrapper:{"data-count":typeof he=="string"?he:void 0}},hidden:b,readOnly:I,onClear:w},f.createElement(cee,d0({},P,{autoSize:$,maxLength:s,onKeyDown:be,onChange:oe,onFocus:Z,onBlur:te,onCompositionStart:ee,onCompositionEnd:re,className:H(y?.textarea),style:{resize:h?.resize,...C?.textarea},disabled:g,prefixCls:u,onResize:ye,ref:W,readOnly:I})))}),dee=e=>{const{componentCls:t,paddingLG:n}=e,r=`${t}-textarea`;return {[`textarea${t}`]:{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}`,resize:"vertical",[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[r]:{position:"relative","&-show-count":{[`${t}-data-count`]:{position:"absolute",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
&-allow-clear > ${t},
&-affix-wrapper${r}-has-feedback ${t}
`]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},fee=xt(["Input","TextArea"],e=>{const t=vt(e,El(e));return dee(t)},Il,{resetFont:false}),mee=f.forwardRef((e,t)=>{const{prefixCls:n,bordered:r=true,size:o,disabled:i,status:s,allowClear:a,classNames:l,rootClassName:c,className:u,style:d,styles:m,variant:p,showCount:h,onMouseDown:g,onResize:b,...y}=e,{getPrefixCls:C,direction:x,allowClear:w,autoComplete:S,className:I,style:$,classNames:E,styles:P}=St("textArea"),M=f__namespace.useContext(zn),N=i??M,{status:A,hasFeedback:k,feedbackIcon:R}=f__namespace.useContext(Zn),L=gl(A,s),[V,_]=It([E,l],[P,m],{props:e}),z=f__namespace.useRef(null);f__namespace.useImperativeHandle(t,()=>({resizableTextArea:z.current?.resizableTextArea,focus:Z=>{i1(z.current?.resizableTextArea?.textArea,Z);},blur:()=>z.current?.blur()}));const D=C("input",n),W=sn(D),[O,B]=sR(D,c);fee(D,W);const{compactSize:j,compactItemClassnames:Y}=li(D,x),q=Vn(Z=>o??j??Z),[U,K]=Cp("textArea",p,r),J=GR(a??w),[Q,G]=f__namespace.useState(false),[ee,re]=f__namespace.useState(false),oe=Z=>{G(true),g?.(Z);const te=()=>{G(false),document.removeEventListener("mouseup",te);};document.addEventListener("mouseup",te);},be=Z=>{if(b?.(Z),Q&&typeof getComputedStyle=="function"){const te=z.current?.nativeElement?.querySelector("textarea");te&&getComputedStyle(te).resize==="both"&&re(true);}};return f__namespace.createElement(uee,{autoComplete:S,...y,style:{..._.root,...$,...d},styles:_,disabled:N,allowClear:J,className:H(B,W,u,c,Y,I,V.root,{[`${D}-textarea-affix-wrapper-resize-dirty`]:ee}),classNames:{...V,textarea:H({[`${D}-sm`]:q==="small",[`${D}-lg`]:q==="large"},O,V.textarea,Q&&`${D}-mouse-active`),variant:H({[`${D}-${U}`]:K},Gi(D,L)),affixWrapper:H(`${D}-textarea-affix-wrapper`,{[`${D}-affix-wrapper-rtl`]:x==="rtl",[`${D}-affix-wrapper-sm`]:q==="small",[`${D}-affix-wrapper-lg`]:q==="large",[`${D}-textarea-show-count`]:h||e.count?.show},O)},prefixCls:D,suffix:k&&f__namespace.createElement("span",{className:`${D}-textarea-suffix`},R),showCount:h,ref:z,onResize:be,onMouseDown:oe})}),yo=Ml;yo.Group=jJ;yo.Search=oee;yo.TextArea=mee;yo.Password=tee;yo.OTP=ZJ;const pee=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,d:"m14 14l20 20m-20 0l20-20"})]}),hee=f.forwardRef(pee),{Search:gee}=yo;var bee={name:"2vv6yp",styles:"color:var(--ant-color-text-disabled);background-color:var(--ant-color-bg-container-disabled);border-color:var(--ant-color-border);box-shadow:none;opacity:1;pointer-events:none;cursor:not-allowed"};function B2({configPath:e,searchProps:t,disabled:n}){const r=f5(e),o=f.useMemo(()=>D0(r).toReversed(),[r]);return F($e,{children:[v(gee,{className:"my-5px",enterButton:"添加",allowClear:true,disabled:n,...t,onSearch:async(i,s)=>{if(!i)return;if(new Set(await gp(e)).has(i)){ft.warning(`${i} 已存在`);return}await ii(e,{add:[i]}),s?.target&&s.target.closest(".ant-input-wrapper")?.querySelector(".ant-input-clear-icon")?.click();}}),v("div",{css:[Dt("min-height:82px;border-radius:6px;border:1px solid ",z1,";margin-top:3px;",""),n&&bee,"",""],children:o.length?v("div",{className:"max-h-250px flex flex-wrap items-start gap-x-10px gap-y-5px overflow-y-auto py-5px pl-5px pr-10px",children:o.map(i=>v(XR,{tag:i.toString(),onDelete:async s=>{await ii(e,{remove:[s]});},renderTag:e==="filter.byAuthor.keywords"?s=>v(vee,{tag:s}):void 0},i))}):v(Wr,{image:Wr.PRESENTED_IMAGE_SIMPLE,description:"空空如也",className:"[&.ant-empty-normal]:my-5px"})})]})}const XR=f.forwardRef(({tag:e,renderTag:t,onDelete:n,className:r,...o},i)=>F("div",{ref:i,className:H("relative inline-flex items-center b-1px b-gate-border rounded-5px b-solid px-6px py-2px hover:b-gate-primary hover:color-gate-primary",r),...o,children:[t?t(e):e,v(hee,{className:"ml-2px size-16px cursor-pointer text-size-12px",onClick:()=>{n?.(e);}})]}));function vee({tag:e}){const{mid:t,remark:n}=f.useMemo(()=>Ep(e),[e]),[r,o]=f.useState(void 0);f.useEffect(()=>{(async()=>{if(!t)return;const a=await Ju(t);a&&o(a);})();},[t]);const i=t?r||n||t:e;return v($e,{children:v(Jt,{title:F($e,{children:[!!t&&F($e,{children:["mid: ",t," ",v("br",{})]}),!!n&&F($e,{children:["备注: ",n," ",v("br",{}),n===r&&F($e,{children:['P.S "备注" 与 "用户昵称" 相同, 是之前的数据, 现在你只需要填写 mid, 会自动获取昵称 ',v("br",{})]})]}),!t&&F($e,{children:["使用用户名过滤: 用户可能改名, 建议使用 mid 过滤 ",v("br",{})]})]}),children:F("span",{className:H("inline-flex items-center justify-center",t?"cursor-pointer":"cursor-[edit]"),children:[t&&v(p6,{className:"mr-2px size-12px"}),t?v("a",{href:Bu(t),target:"_blank",style:{color:"inherit"},children:i}):i]})})})}function yee(){const{enabled:e,minDuration:t,minPlayCount:n,minDanmakuCount:r,hideGotoTypeBangumi:o,hideGotoTypePicture:i,byAuthor:s,byTitle:a}=Mt().filter,l=c=>({label:"「已关注」豁免",tooltipProps:{color:ZM},tooltip:F($e,{children:["「已关注」内容不考虑过滤条件, 总是展示",v("br",{}),'"豁免" 一词来源'," ",v("a",{target:"_blank",href:"https://github.com/magicdawn/Bilibili-Gate/issues/1#issuecomment-2197868587",children:"pilipala"})]})});return v("div",{className:H(fr.tabPane,"pr-15px"),children:v(Sn,{title:F($e,{children:["内容过滤",F(Mn,{children:["启用过滤会降低加载速度! ",v("br",{}),"视频/图文/影视: 仅推荐类 Tab 生效 ",v("br",{}),"UP/标题: 推荐类 / 热门 等Tab 生效"]}),v(gf,{configPath:"filter.enabled",className:"ml-10px"})]}),children:F("div",{className:"grid grid-cols-2 gap-x-15px",children:[F("div",{className:"col",children:[v("div",{className:fr.settingsGroupSubTitle,children:"视频"}),F("div",{className:"flex flex-col gap-y-5px",children:[F("div",{className:"flex items-center",children:[v(at,{configPath:"filter.minDuration.enabled",label:"按视频时长过滤",tooltip:v($e,{children:"不显示短视频"}),disabled:!e,className:"min-w-130px"}),v(Ba,{className:"w-130px",size:"small",min:1,step:10,addonAfter:"秒",value:t.value,onChange:c=>!ti(c)&&(Ue.filter.minDuration.value=c),disabled:!e||!t.enabled})]}),F("div",{className:"flex items-center",children:[v(at,{disabled:!e,configPath:"filter.minPlayCount.enabled",label:"按播放次数过滤",tooltip:v($e,{children:"不显示播放次数很少的视频"}),className:"min-w-130px"}),v(Ba,{className:"w-130px",size:"small",min:1,step:1e3,value:n.value,onChange:c=>!ti(c)&&(Ue.filter.minPlayCount.value=c),disabled:!e||!n.enabled,addonAfter:"次"})]}),F("div",{className:"flex items-center",children:[v(at,{disabled:!e,configPath:"filter.minDanmakuCount.enabled",label:"按弹幕条数过滤",tooltip:v($e,{children:"不显示弹幕条数很少的视频"}),className:"min-w-130px"}),v(Ba,{className:"w-130px",size:"small",min:1,step:100,value:r.value,onChange:c=>!ti(c)&&(Ue.filter.minDanmakuCount.value=c),disabled:!e||!r.enabled,addonAfter:"条"})]}),v(at,{configPath:"filter.exemptForFollowed.video",disabled:!e,...l()})]})]}),F("div",{className:"col",children:[v("div",{className:fr.settingsGroupSubTitle,children:"图文"}),v(at,{configPath:"filter.hideGotoTypePicture",label:"过滤图文类型推荐",disabled:!e,className:"flex",tooltip:F($e,{children:["过滤 ",v("kbd",{children:"goto = picture"})," 的内容: 包括 (动态 & 专栏) 等"]})}),v(at,{className:"flex",disabled:!e||!i,configPath:"filter.exemptForFollowed.picture",...l()}),v("div",{className:fr.settingsGroupSubTitle,children:"影视"}),v(at,{configPath:"filter.hideGotoTypeBangumi",label:"过滤影视类型推荐",tooltip:F($e,{children:["过滤 ",v("kbd",{children:"goto = bangumi"})," 的内容: 包括 (番剧 / 电影 / 国创 / 纪录片) 等"]}),disabled:!e})]}),F("div",{className:"col",children:[F("div",{className:fr.settingsGroupSubTitle,children:["UP",F(Mn,{children:["根据 UP 过滤视频 ",v("br",{}),"使用 mid 屏蔽时支持备注, 格式: ",v(Ir,{color:"success",children:"mid(备注)"})," ","如 ",v(Ir,{color:"success",children:"8047632(B站官方)"})," ",v("br",{}),"作用范围: 推荐 / 热门 ",v("br",{}),F("div",{className:"mt-4px flex items-start",children:[v($q,{className:"mt-3px"}),F("div",{className:"ml-8px flex-1",children:["B站官方支持黑名单, 对于不喜欢的 UP 可以直接拉黑 ",v("br",{}),"此脚本会拉取官方黑名单, 并无视此页开关, 总是会过滤掉 ",v("br",{}),"这里是客户端过滤, 与黑名单功能重复, 优先使用黑名单功能 ",v("br",{})]})]})]}),v(gf,{configPath:"filter.byAuthor.enabled",disabled:!e,className:"ml-10px"}),v("div",{className:"flex-1"}),v(ko,{placement:"left",content:F("div",{className:"flex flex-col gap-x-10px gap-y-5px",children:[F(Je,{onClick:Cee,children:[v(hM,{}),"清理无效备注数据"]}),F(Je,{onClick:kJ,children:[v(kv,{}),"导出"]}),F(Je,{onClick:DJ,children:[v(Dv,{}),"导入"]})]}),children:v(Je,{className:"icon-only-round-button size-26px",children:v(Ub,{className:"size-16px"})})})]}),v(B2,{configPath:"filter.byAuthor.keywords",searchProps:{placeholder:"添加UP: 全名 / mid / mid(备注)"},disabled:!e||!s.enabled})]}),F("div",{className:"col",children:[F("div",{className:fr.settingsGroupSubTitle,children:[v("span",{children:"标题"}),F(Mn,{children:["根据标题关键词过滤视频 ",v("br",{}),"支持普通关键字和正则(i), 语法:/abc|\\d+/ ",v("br",{}),"作用范围: 推荐 / 热门"]}),v(gf,{configPath:"filter.byTitle.enabled",disabled:!e,className:"ml-10px"}),v("div",{className:"flex-1"}),v(ko,{placement:"left",content:F("div",{className:"flex flex-col gap-x-10px gap-y-5px",children:[F(Je,{onClick:zJ,children:[v(kv,{}),"导出"]}),F(Je,{onClick:_J,children:[v(Dv,{}),"导入"]})]}),children:v(Je,{className:"icon-only-round-button size-26px",children:v(Ub,{className:"size-16px"})})})]}),v(B2,{configPath:"filter.byTitle.keywords",searchProps:{placeholder:"添加过滤关键词"},disabled:!e||!a.enabled})]})]})})})}async function Cee(){const e=Ue.filter.byAuthor.keywords,t=await Ui(e,async n=>{const{mid:r,remark:o}=Ep(n);return !r||!o||await Ju(r)!==o?n:r},1/0);return ei(t,e)?ft.warning("没有「无效备注」数据!"):(Ue.filter.byAuthor.keywords=t,ft.success("已清理「无效备注」数据!"))}const f0="cursor-pointer rounded bg-gate-bg-lv-3 p-x-1 text-gate-primary",YR=v(P1,{className:"text-gate-primary [.ant-spin_.ant-spin-dot&]:size-25px"});function xee(){return F("div",{className:fr.tabPane,children:[v(Sn,{title:"视频播放页",children:v(at,{configPath:"fav.useCustomFavPicker.onPlayPage",label:"使用自定义收藏弹窗",tooltip:F($e,{children:["使用「",uo,"」提供的选择收藏夹弹窗 ",v("br",{}),F("ul",{className:"ml-20px list-circle",children:[v("li",{children:"支持拼音搜索, 帮你快速找到收藏夹"}),v("li",{children:F("span",{className:"flex-v-center",children:["支持从收藏夹图标 或 快捷键",v("kbd",{className:H(f0,"mx-1 h-14px py-0 line-height-14px"),children:"e"}),"触发"]})})]})]})})}),v(Sn,{title:"搜索页",children:v(at,{configPath:"videoCard.videoPreview.addTo.searchPage",label:"浮动预览: 添加到「搜索页」",tooltip:v($e,{children:"在搜索页的视频也添加「浮动预览」"})})})]})}function wee(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return f.useMemo(()=>r=>{t.forEach(o=>o(r));},t)}const Ip=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Rl(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function vC(e){return "nodeType"in e}function Cr(e){var t,n;return e?Rl(e)?e:vC(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function yC(e){const{Document:t}=Cr(e);return e instanceof t}function ed(e){return Rl(e)?false:e instanceof Cr(e).HTMLElement}function QR(e){return e instanceof Cr(e).SVGElement}function Al(e){return e?Rl(e)?e.document:vC(e)?yC(e)?e:ed(e)||QR(e)?e.ownerDocument:document:document:document}const Do=Ip?f.useLayoutEffect:f.useEffect;function CC(e){const t=f.useRef(e);return Do(()=>{t.current=e;}),f.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function See(){const e=f.useRef(null),t=f.useCallback((r,o)=>{e.current=setInterval(r,o);},[]),n=f.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null);},[]);return [t,n]}function du(e,t){t===void 0&&(t=[e]);const n=f.useRef(e);return Do(()=>{n.current!==e&&(n.current=e);},t),n}function td(e,t){const n=f.useRef();return f.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function gm(e){const t=CC(e),n=f.useRef(null),r=f.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o;},[]);return [n,r]}function m0(e){const t=f.useRef();return f.useEffect(()=>{t.current=e;},[e]),t.current}let $g={};function nd(e,t){return f.useMemo(()=>{if(t)return t;const n=$g[e]==null?0:$g[e]+1;return $g[e]=n,e+"-"+n},[e,t])}function ZR(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,s)=>{const a=Object.entries(s);for(const[l,c]of a){const u=i[l];u!=null&&(i[l]=u+e*c);}return i},{...t})}}const ka=ZR(1),bm=ZR(-1);function $ee(e){return "clientX"in e&&"clientY"in e}function xC(e){if(!e)return false;const{KeyboardEvent:t}=Cr(e.target);return t&&e instanceof t}function Eee(e){if(!e)return false;const{TouchEvent:t}=Cr(e.target);return t&&e instanceof t}function p0(e){if(Eee(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return {x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return {x:t,y:n}}}return $ee(e)?{x:e.clientX,y:e.clientY}:null}const fu=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return "translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return "scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return [fu.Translate.toString(e),fu.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),k2="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Iee(e){return e.matches(k2)?e:e.querySelector(k2)}const Pee={display:"none"};function Nee(e){let{id:t,value:n}=e;return f.createElement("div",{id:t,style:Pee},n)}function Mee(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return f.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":true},n)}function Ree(){const[e,t]=f.useState("");return {announce:f.useCallback(r=>{r!=null&&t(r);},[]),announcement:e}}const JR=f.createContext(null);function Aee(e){const t=f.useContext(JR);f.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t]);}function Tee(){const[e]=f.useState(()=>new Set),t=f.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return [f.useCallback(r=>{let{type:o,event:i}=r;e.forEach(s=>{var a;return (a=s[o])==null?void 0:a.call(s,i)});},[e]),t]}const Oee={draggable:`
To pick up a draggable item, press the space bar.
While dragging, use the arrow keys to move the item.
Press space again to drop the item in its new position, or press escape to cancel.
`},Fee={onDragStart(e){let{active:t}=e;return "Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return "Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Lee(e){let{announcements:t=Fee,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Oee}=e;const{announce:i,announcement:s}=Ree(),a=nd("DndLiveRegion"),[l,c]=f.useState(false);if(f.useEffect(()=>{c(true);},[]),Aee(f.useMemo(()=>({onDragStart(d){let{active:m}=d;i(t.onDragStart({active:m}));},onDragMove(d){let{active:m,over:p}=d;t.onDragMove&&i(t.onDragMove({active:m,over:p}));},onDragOver(d){let{active:m,over:p}=d;i(t.onDragOver({active:m,over:p}));},onDragEnd(d){let{active:m,over:p}=d;i(t.onDragEnd({active:m,over:p}));},onDragCancel(d){let{active:m,over:p}=d;i(t.onDragCancel({active:m,over:p}));}}),[i,t])),!l)return null;const u=f.createElement(f.Fragment,null,f.createElement(Nee,{id:r,value:o.draggable}),f.createElement(Mee,{id:a,announcement:s}));return n?ST.createPortal(u,n):u}var $n;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable";})($n||($n={}));function vm(){}function Bee(e,t){return f.useMemo(()=>({sensor:e,options:{}}),[e,t])}function kee(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return f.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const Co=Object.freeze({x:0,y:0});function Dee(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function zee(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function _ee(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Hee(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function D2(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const Vee=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=D2(t,t.left,t.top),i=[];for(const s of r){const{id:a}=s,l=n.get(a);if(l){const c=Dee(D2(l),o);i.push({id:a,data:{droppableContainer:s,value:c}});}}return i.sort(zee)};function jee(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),s=o-r,a=i-n;if(r<o&&n<i){const l=t.width*t.height,c=e.width*e.height,u=s*a,d=u/(l+c-u);return Number(d.toFixed(4))}return 0}const Wee=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const i of r){const{id:s}=i,a=n.get(s);if(a){const l=jee(a,t);l>0&&o.push({id:s,data:{droppableContainer:i,value:l}});}}return o.sort(_ee)};function qee(e,t,n){return {...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function e4(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Co}function Uee(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return o.reduce((s,a)=>({...s,top:s.top+e*a.y,bottom:s.bottom+e*a.y,left:s.left+e*a.x,right:s.right+e*a.x}),{...n})}}const Gee=Uee(1);function Kee(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return {x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return {x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Xee(e,t,n){const r=Kee(t);if(!r)return e;const{scaleX:o,scaleY:i,x:s,y:a}=r,l=e.left-s-(1-o)*parseFloat(n),c=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,d=i?e.height/i:e.height;return {width:u,height:d,top:c,right:l+u,bottom:c+d,left:l}}const Yee={ignoreTransform:false};function Tl(e,t){t===void 0&&(t=Yee);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:u}=Cr(e).getComputedStyle(e);c&&(n=Xee(n,c,u));}const{top:r,left:o,width:i,height:s,bottom:a,right:l}=n;return {top:r,left:o,width:i,height:s,bottom:a,right:l}}function z2(e){return Tl(e,{ignoreTransform:true})}function Qee(e){const t=e.innerWidth,n=e.innerHeight;return {top:0,left:0,right:t,bottom:n,width:t,height:n}}function Zee(e,t){return t===void 0&&(t=Cr(e).getComputedStyle(e)),t.position==="fixed"}function Jee(e,t){t===void 0&&(t=Cr(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return ["overflow","overflowX","overflowY"].some(o=>{const i=t[o];return typeof i=="string"?n.test(i):false})}function wC(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(yC(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!ed(o)||QR(o)||n.includes(o))return n;const i=Cr(e).getComputedStyle(o);return o!==e&&Jee(o,i)&&n.push(o),Zee(o,i)?n:r(o.parentNode)}return e?r(e):n}function t4(e){const[t]=wC(e,1);return t??null}function Eg(e){return !Ip||!e?null:Rl(e)?e:vC(e)?yC(e)||e===Al(e).scrollingElement?window:ed(e)?e:null:null}function n4(e){return Rl(e)?e.scrollX:e.scrollLeft}function r4(e){return Rl(e)?e.scrollY:e.scrollTop}function h0(e){return {x:n4(e),y:r4(e)}}var Nn;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward";})(Nn||(Nn={}));function o4(e){return !Ip||!e?false:e===document.scrollingElement}function i4(e){const t={x:0,y:0},n=o4(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,i=e.scrollLeft<=t.x,s=e.scrollTop>=r.y,a=e.scrollLeft>=r.x;return {isTop:o,isLeft:i,isBottom:s,isRight:a,maxScroll:r,minScroll:t}}const ete={x:.2,y:.2};function tte(e,t,n,r,o){let{top:i,left:s,right:a,bottom:l}=n;r===void 0&&(r=10),o===void 0&&(o=ete);const{isTop:c,isBottom:u,isLeft:d,isRight:m}=i4(e),p={x:0,y:0},h={x:0,y:0},g={height:t.height*o.y,width:t.width*o.x};return !c&&i<=t.top+g.height?(p.y=Nn.Backward,h.y=r*Math.abs((t.top+g.height-i)/g.height)):!u&&l>=t.bottom-g.height&&(p.y=Nn.Forward,h.y=r*Math.abs((t.bottom-g.height-l)/g.height)),!m&&a>=t.right-g.width?(p.x=Nn.Forward,h.x=r*Math.abs((t.right-g.width-a)/g.width)):!d&&s<=t.left+g.width&&(p.x=Nn.Backward,h.x=r*Math.abs((t.left+g.width-s)/g.width)),{direction:p,speed:h}}function nte(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:s}=window;return {top:0,left:0,right:i,bottom:s,width:i,height:s}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return {top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function s4(e){return e.reduce((t,n)=>ka(t,h0(n)),Co)}function rte(e){return e.reduce((t,n)=>t+n4(n),0)}function ote(e){return e.reduce((t,n)=>t+r4(n),0)}function ite(e,t){if(t===void 0&&(t=Tl),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);t4(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"});}const ste=[["x",["left","right"],rte],["y",["top","bottom"],ote]];class SC{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=wC(n),o=s4(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,s,a]of ste)for(const l of s)Object.defineProperty(this,l,{get:()=>{const c=a(r),u=o[i]-c;return this.rect[l]+u},enumerable:true});Object.defineProperty(this,"rect",{enumerable:false});}}class Pc{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return (r=this.target)==null?void 0:r.removeEventListener(...n)});},this.target=t;}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r]);}}function ate(e){const{EventTarget:t}=Cr(e);return e instanceof t?e:Al(e)}function Ig(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:false}var Hr;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange";})(Hr||(Hr={}));function _2(e){e.preventDefault();}function lte(e){e.stopPropagation();}var Wt;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab";})(Wt||(Wt={}));const a4={start:[Wt.Space,Wt.Enter],cancel:[Wt.Esc],end:[Wt.Space,Wt.Enter,Wt.Tab]},cte=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Wt.Right:return {...n,x:n.x+25};case Wt.Left:return {...n,x:n.x-25};case Wt.Down:return {...n,y:n.y+25};case Wt.Up:return {...n,y:n.y-25}}};class l4{constructor(t){this.props=void 0,this.autoScrollEnabled=false,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Pc(Al(n)),this.windowListeners=new Pc(Cr(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach();}attach(){this.handleStart(),this.windowListeners.add(Hr.Resize,this.handleCancel),this.windowListeners.add(Hr.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Hr.Keydown,this.handleKeyDown));}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&ite(r),n(Co);}handleKeyDown(t){if(xC(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:i=a4,coordinateGetter:s=cte,scrollBehavior:a="smooth"}=o,{code:l}=t;if(i.end.includes(l)){this.handleEnd(t);return}if(i.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=r.current,u=c?{x:c.left,y:c.top}:Co;this.referenceCoordinates||(this.referenceCoordinates=u);const d=s(t,{active:n,context:r.current,currentCoordinates:u});if(d){const m=bm(d,u),p={x:0,y:0},{scrollableAncestors:h}=r.current;for(const g of h){const b=t.code,{isTop:y,isRight:C,isLeft:x,isBottom:w,maxScroll:S,minScroll:I}=i4(g),$=nte(g),E={x:Math.min(b===Wt.Right?$.right-$.width/2:$.right,Math.max(b===Wt.Right?$.left:$.left+$.width/2,d.x)),y:Math.min(b===Wt.Down?$.bottom-$.height/2:$.bottom,Math.max(b===Wt.Down?$.top:$.top+$.height/2,d.y))},P=b===Wt.Right&&!C||b===Wt.Left&&!x,M=b===Wt.Down&&!w||b===Wt.Up&&!y;if(P&&E.x!==d.x){const N=g.scrollLeft+m.x,A=b===Wt.Right&&N<=S.x||b===Wt.Left&&N>=I.x;if(A&&!m.y){g.scrollTo({left:N,behavior:a});return}A?p.x=g.scrollLeft-N:p.x=b===Wt.Right?g.scrollLeft-S.x:g.scrollLeft-I.x,p.x&&g.scrollBy({left:-p.x,behavior:a});break}else if(M&&E.y!==d.y){const N=g.scrollTop+m.y,A=b===Wt.Down&&N<=S.y||b===Wt.Up&&N>=I.y;if(A&&!m.x){g.scrollTo({top:N,behavior:a});return}A?p.y=g.scrollTop-N:p.y=b===Wt.Down?g.scrollTop-S.y:g.scrollTop-I.y,p.y&&g.scrollBy({top:-p.y,behavior:a});break}}this.handleMove(t,ka(bm(d,this.referenceCoordinates),p));}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n);}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n();}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n();}detach(){this.listeners.removeAll(),this.windowListeners.removeAll();}}l4.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=a4,onActivation:o}=t,{active:i}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const a=i.activatorNode.current;return a&&e.target!==a?false:(e.preventDefault(),o?.({event:e.nativeEvent}),true)}return false}}];function H2(e){return !!(e&&"distance"in e)}function V2(e){return !!(e&&"delay"in e)}class $C{constructor(t,n,r){var o;r===void 0&&(r=ate(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=true,this.document=void 0,this.activated=false,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:i}=t,{target:s}=i;this.props=t,this.events=n,this.document=Al(s),this.documentListeners=new Pc(this.document),this.listeners=new Pc(r),this.windowListeners=new Pc(Cr(s)),this.initialCoordinates=(o=p0(i))!=null?o:Co,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach();}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:false}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Hr.Resize,this.handleCancel),this.windowListeners.add(Hr.DragStart,_2),this.windowListeners.add(Hr.VisibilityChange,this.handleCancel),this.windowListeners.add(Hr.ContextMenu,_2),this.documentListeners.add(Hr.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(V2(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(H2(n)){this.handlePending(n);return}}this.handleStart();}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null);}handlePending(t,n){const{active:r,onPending:o}=this.props;o(r,t,this.initialCoordinates,n);}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=true,this.documentListeners.add(Hr.Click,lte,{capture:true}),this.removeTextSelection(),this.documentListeners.add(Hr.SelectionChange,this.removeTextSelection),n(t));}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:i}=this,{onMove:s,options:{activationConstraint:a}}=i;if(!o)return;const l=(n=p0(t))!=null?n:Co,c=bm(o,l);if(!r&&a){if(H2(a)){if(a.tolerance!=null&&Ig(c,a.tolerance))return this.handleCancel();if(Ig(c,a.distance))return this.handleStart()}if(V2(a)&&Ig(c,a.tolerance))return this.handleCancel();this.handlePending(a,c);return}t.cancelable&&t.preventDefault(),s(l);}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n();}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n();}handleKeydown(t){t.code===Wt.Esc&&this.handleCancel();}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges();}}const ute={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class EC extends $C{constructor(t){const{event:n}=t,r=Al(n.target);super(t,ute,r);}}EC.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return !n.isPrimary||n.button!==0?false:(r?.({event:n}),true)}}];const dte={move:{name:"mousemove"},end:{name:"mouseup"}};var g0;(function(e){e[e.RightClick=2]="RightClick";})(g0||(g0={}));class fte extends $C{constructor(t){super(t,dte,Al(t.event.target));}}fte.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===g0.RightClick?false:(r?.({event:n}),true)}}];const Pg={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class mte extends $C{constructor(t){super(t,Pg);}static setup(){return window.addEventListener(Pg.move.name,t,{capture:false,passive:false}),function(){window.removeEventListener(Pg.move.name,t);};function t(){}}}mte.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?false:(r?.({event:n}),true)}}];var Nc;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect";})(Nc||(Nc={}));var ym;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder";})(ym||(ym={}));function pte(e){let{acceleration:t,activator:n=Nc.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:s=5,order:a=ym.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:d,threshold:m}=e;const p=gte({delta:d,disabled:!i}),[h,g]=See(),b=f.useRef({x:0,y:0}),y=f.useRef({x:0,y:0}),C=f.useMemo(()=>{switch(n){case Nc.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case Nc.DraggableRect:return o}},[n,o,l]),x=f.useRef(null),w=f.useCallback(()=>{const I=x.current;if(!I)return;const $=b.current.x*y.current.x,E=b.current.y*y.current.y;I.scrollBy($,E);},[]),S=f.useMemo(()=>a===ym.TreeOrder?[...c].reverse():c,[a,c]);f.useEffect(()=>{if(!i||!c.length||!C){g();return}for(const I of S){if(r?.(I)===false)continue;const $=c.indexOf(I),E=u[$];if(!E)continue;const{direction:P,speed:M}=tte(I,E,C,t,m);for(const N of ["x","y"])p[N][P[N]]||(M[N]=0,P[N]=0);if(M.x>0||M.y>0){g(),x.current=I,h(w,s),b.current=M,y.current=P;return}}b.current={x:0,y:0},y.current={x:0,y:0},g();},[t,w,r,g,i,s,JSON.stringify(C),JSON.stringify(p),h,c,S,u,JSON.stringify(m)]);}const hte={x:{[Nn.Backward]:false,[Nn.Forward]:false},y:{[Nn.Backward]:false,[Nn.Forward]:false}};function gte(e){let{delta:t,disabled:n}=e;const r=m0(t);return td(o=>{if(n||!r||!o)return hte;const i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return {x:{[Nn.Backward]:o.x[Nn.Backward]||i.x===-1,[Nn.Forward]:o.x[Nn.Forward]||i.x===1},y:{[Nn.Backward]:o.y[Nn.Backward]||i.y===-1,[Nn.Forward]:o.y[Nn.Forward]||i.y===1}}},[n,t,r])}function bte(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return td(o=>{var i;return t==null?null:(i=r??o)!=null?i:null},[r,t])}function vte(e,t){return f.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,i=o.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,r)}));return [...n,...i]},[]),[e,t])}var mu;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging";})(mu||(mu={}));var b0;(function(e){e.Optimized="optimized";})(b0||(b0={}));const j2=new Map;function yte(e,t){let{dragging:n,dependencies:r,config:o}=t;const[i,s]=f.useState(null),{frequency:a,measure:l,strategy:c}=o,u=f.useRef(e),d=b(),m=du(d),p=f.useCallback(function(y){y===void 0&&(y=[]),!m.current&&s(C=>C===null?y:C.concat(y.filter(x=>!C.includes(x))));},[m]),h=f.useRef(null),g=td(y=>{if(d&&!n)return j2;if(!y||y===j2||u.current!==e||i!=null){const C=new Map;for(let x of e){if(!x)continue;if(i&&i.length>0&&!i.includes(x.id)&&x.rect.current){C.set(x.id,x.rect.current);continue}const w=x.node.current,S=w?new SC(l(w),w):null;x.rect.current=S,S&&C.set(x.id,S);}return C}return y},[e,i,n,d,l]);return f.useEffect(()=>{u.current=e;},[e]),f.useEffect(()=>{d||p();},[n,d]),f.useEffect(()=>{i&&i.length>0&&s(null);},[JSON.stringify(i)]),f.useEffect(()=>{d||typeof a!="number"||h.current!==null||(h.current=setTimeout(()=>{p(),h.current=null;},a));},[a,d,p,...r]),{droppableRects:g,measureDroppableContainers:p,measuringScheduled:i!=null};function b(){switch(c){case mu.Always:return false;case mu.BeforeDragging:return n;default:return !n}}}function c4(e,t){return td(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Cte(e,t){return c4(e,t)}function xte(e){let{callback:t,disabled:n}=e;const r=CC(t),o=f.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(r)},[r,n]);return f.useEffect(()=>()=>o?.disconnect(),[o]),o}function Pp(e){let{callback:t,disabled:n}=e;const r=CC(t),o=f.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(r)},[n]);return f.useEffect(()=>()=>o?.disconnect(),[o]),o}function wte(e){return new SC(Tl(e),e)}function W2(e,t,n){t===void 0&&(t=wte);const[r,o]=f.useState(null);function i(){o(l=>{if(!e)return null;if(e.isConnected===false){var c;return (c=l??n)!=null?c:null}const u=t(e);return JSON.stringify(l)===JSON.stringify(u)?l:u});}const s=xte({callback(l){if(e)for(const c of l){const{type:u,target:d}=c;if(u==="childList"&&d instanceof HTMLElement&&d.contains(e)){i();break}}}}),a=Pp({callback:i});return Do(()=>{i(),e?(a?.observe(e),s?.observe(document.body,{childList:true,subtree:true})):(a?.disconnect(),s?.disconnect());},[e]),r}function Ste(e){const t=c4(e);return e4(e,t)}const q2=[];function $te(e){const t=f.useRef(e),n=td(r=>e?r&&r!==q2&&e&&t.current&&e.parentNode===t.current.parentNode?r:wC(e):q2,[e]);return f.useEffect(()=>{t.current=e;},[e]),n}function Ete(e){const[t,n]=f.useState(null),r=f.useRef(e),o=f.useCallback(i=>{const s=Eg(i.target);s&&n(a=>a?(a.set(s,h0(s)),new Map(a)):null);},[]);return f.useEffect(()=>{const i=r.current;if(e!==i){s(i);const a=e.map(l=>{const c=Eg(l);return c?(c.addEventListener("scroll",o,{passive:true}),[c,h0(c)]):null}).filter(l=>l!=null);n(a.length?new Map(a):null),r.current=e;}return ()=>{s(e),s(i);};function s(a){a.forEach(l=>{const c=Eg(l);c?.removeEventListener("scroll",o);});}},[o,e]),f.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,s)=>ka(i,s),Co):s4(e):Co,[e,t])}function U2(e,t){t===void 0&&(t=[]);const n=f.useRef(null);return f.useEffect(()=>{n.current=null;},t),f.useEffect(()=>{const r=e!==Co;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null);},[e]),n.current?bm(e,n.current):Co}function Ite(e){f.useEffect(()=>{if(!Ip)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return ()=>{for(const n of t)n?.();}},e.map(t=>{let{sensor:n}=t;return n}));}function Pte(e,t){return f.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:i}=r;return n[o]=s=>{i(s,t);},n},{}),[e,t])}function u4(e){return f.useMemo(()=>e?Qee(e):null,[e])}const G2=[];function Nte(e,t){t===void 0&&(t=Tl);const[n]=e,r=u4(n?Cr(n):null),[o,i]=f.useState(G2);function s(){i(()=>e.length?e.map(l=>o4(l)?r:new SC(t(l),l)):G2);}const a=Pp({callback:s});return Do(()=>{a?.disconnect(),s(),e.forEach(l=>a?.observe(l));},[e]),o}function Mte(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ed(t)?t:e}function Rte(e){let{measure:t}=e;const[n,r]=f.useState(null),o=f.useCallback(c=>{for(const{target:u}of c)if(ed(u)){r(d=>{const m=t(u);return d?{...d,width:m.width,height:m.height}:m});break}},[t]),i=Pp({callback:o}),s=f.useCallback(c=>{const u=Mte(c);i?.disconnect(),u&&i?.observe(u),r(u?t(u):null);},[t,i]),[a,l]=gm(s);return f.useMemo(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}const Ate=[{sensor:EC,options:{}},{sensor:l4,options:{}}],Tte={current:{}},wf={draggable:{measure:z2},droppable:{measure:z2,strategy:mu.WhileDragging,frequency:b0.Optimized},dragOverlay:{measure:Tl}};class Mc extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return !n})}getNodeFor(t){var n,r;return (n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const Ote={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Mc,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:vm},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:wf,measureDroppableContainers:vm,windowRect:null,measuringScheduled:false},Fte={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:vm,draggableNodes:new Map,over:null,measureDroppableContainers:vm},Np=f.createContext(Fte),d4=f.createContext(Ote);function Lte(){return {draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Mc}}}function Bte(e,t){switch(t.type){case $n.DragStart:return {...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case $n.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case $n.DragEnd:case $n.DragCancel:return {...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case $n.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Mc(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case $n.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const s=new Mc(e.droppable.containers);return s.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:s}}}case $n.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Mc(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function kte(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=f.useContext(Np),i=m0(r),s=m0(n?.id);return f.useEffect(()=>{if(!t&&!r&&i&&s!=null){if(!xC(i)||document.activeElement===i.target)return;const a=o.get(s);if(!a)return;const{activatorNode:l,node:c}=a;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const u of [l.current,c.current]){if(!u)continue;const d=Iee(u);if(d){d.focus();break}}});}},[r,t,o,s,i]),null}function Dte(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,i)=>i({transform:o,...r}),n):n}function zte(e){return f.useMemo(()=>({draggable:{...wf.draggable,...e?.draggable},droppable:{...wf.droppable,...e?.droppable},dragOverlay:{...wf.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function _te(e){let{activeNode:t,measure:n,initialRect:r,config:o=true}=e;const i=f.useRef(false),{x:s,y:a}=typeof o=="boolean"?{x:o,y:o}:o;Do(()=>{if(!s&&!a||!t){i.current=false;return}if(i.current||!r)return;const c=t?.node.current;if(!c||c.isConnected===false)return;const u=n(c),d=e4(u,r);if(s||(d.x=0),a||(d.y=0),i.current=true,Math.abs(d.x)>0||Math.abs(d.y)>0){const m=t4(c);m&&m.scrollBy({top:d.y,left:d.x});}},[t,s,a,r,n]);}const f4=f.createContext({...Co,scaleX:1,scaleY:1});var wi;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized";})(wi||(wi={}));const Hte=f.memo(function(t){var n,r,o,i;let{id:s,accessibility:a,autoScroll:l=true,children:c,sensors:u=Ate,collisionDetection:d=Wee,measuring:m,modifiers:p,...h}=t;const g=f.useReducer(Bte,void 0,Lte),[b,y]=g,[C,x]=Tee(),[w,S]=f.useState(wi.Uninitialized),I=w===wi.Initialized,{draggable:{active:$,nodes:E,translate:P},droppable:{containers:M}}=b,N=$!=null?E.get($):null,A=f.useRef({initial:null,translated:null}),k=f.useMemo(()=>{var rt;return $!=null?{id:$,data:(rt=N?.data)!=null?rt:Tte,rect:A}:null},[$,N]),R=f.useRef(null),[L,V]=f.useState(null),[_,z]=f.useState(null),D=du(h,Object.values(h)),W=nd("DndDescribedBy",s),O=f.useMemo(()=>M.getEnabled(),[M]),B=zte(m),{droppableRects:j,measureDroppableContainers:Y,measuringScheduled:q}=yte(O,{dragging:I,dependencies:[P.x,P.y],config:B.droppable}),U=bte(E,$),K=f.useMemo(()=>_?p0(_):null,[_]),J=pt(),Q=Cte(U,B.draggable.measure);_te({activeNode:$!=null?E.get($):null,config:J.layoutShiftCompensation,initialRect:Q,measure:B.draggable.measure});const G=W2(U,B.draggable.measure,Q),ee=W2(U?U.parentElement:null),re=f.useRef({activatorEvent:null,active:null,activeNode:U,collisionRect:null,collisions:null,droppableRects:j,draggableNodes:E,draggingNode:null,draggingNodeRect:null,droppableContainers:M,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),oe=M.getNodeFor((n=re.current.over)==null?void 0:n.id),be=Rte({measure:B.dragOverlay.measure}),Z=(r=be.nodeRef.current)!=null?r:U,te=I?(o=be.rect)!=null?o:G:null,ce=!!(be.nodeRef.current&&be.rect),ue=Ste(ce?null:G),he=u4(Z?Cr(Z):null),ye=$te(I?oe??U:null),pe=Nte(ye),ie=Dte(p,{transform:{x:P.x-ue.x,y:P.y-ue.y,scaleX:1,scaleY:1},activatorEvent:_,active:k,activeNodeRect:G,containerNodeRect:ee,draggingNodeRect:te,over:re.current.over,overlayNodeRect:be.rect,scrollableAncestors:ye,scrollableAncestorRects:pe,windowRect:he}),ge=K?ka(K,P):null,Se=Ete(ye),ke=U2(Se),qe=U2(Se,[G]),De=ka(ie,ke),ze=te?Gee(te,ie):null,je=k&&ze?d({active:k,collisionRect:ze,droppableRects:j,droppableContainers:O,pointerCoordinates:ge}):null,Le=Hee(je,"id"),[we,Me]=f.useState(null),Fe=ce?ie:ka(ie,qe),Re=qee(Fe,(i=we?.rect)!=null?i:null,G),Pe=f.useRef(null),Qe=f.useCallback((rt,et)=>{let{sensor:Xe,options:Ie}=et;if(R.current==null)return;const Ne=E.get(R.current);if(!Ne)return;const ae=rt.nativeEvent,ve=new Xe({active:R.current,activeNode:Ne,event:ae,options:Ie,context:re,onAbort(se){if(!E.get(se))return;const{onDragAbort:fe}=D.current,xe={id:se};fe?.(xe),C({type:"onDragAbort",event:xe});},onPending(se,Ce,fe,xe){if(!E.get(se))return;const{onDragPending:We}=D.current,Ze={id:se,constraint:Ce,initialCoordinates:fe,offset:xe};We?.(Ze),C({type:"onDragPending",event:Ze});},onStart(se){const Ce=R.current;if(Ce==null)return;const fe=E.get(Ce);if(!fe)return;const{onDragStart:xe}=D.current,Oe={activatorEvent:ae,active:{id:Ce,data:fe.data,rect:A}};ST.unstable_batchedUpdates(()=>{xe?.(Oe),S(wi.Initializing),y({type:$n.DragStart,initialCoordinates:se,active:Ce}),C({type:"onDragStart",event:Oe}),V(Pe.current),z(ae);});},onMove(se){y({type:$n.DragMove,coordinates:se});},onEnd:de($n.DragEnd),onCancel:de($n.DragCancel)});Pe.current=ve;function de(se){return async function(){const{active:fe,collisions:xe,over:Oe,scrollAdjustedTranslate:We}=re.current;let Ze=null;if(fe&&We){const{cancelDrop:st}=D.current;Ze={activatorEvent:ae,active:fe,collisions:xe,delta:We,over:Oe},se===$n.DragEnd&&typeof st=="function"&&await Promise.resolve(st(Ze))&&(se=$n.DragCancel);}R.current=null,ST.unstable_batchedUpdates(()=>{y({type:se}),S(wi.Uninitialized),Me(null),V(null),z(null),Pe.current=null;const st=se===$n.DragEnd?"onDragEnd":"onDragCancel";if(Ze){const Ct=D.current[st];Ct?.(Ze),C({type:st,event:Ze});}});}}},[E]),mt=f.useCallback((rt,et)=>(Xe,Ie)=>{const Ne=Xe.nativeEvent,ae=E.get(Ie);if(R.current!==null||!ae||Ne.dndKit||Ne.defaultPrevented)return;const ve={active:ae};rt(Xe,et.options,ve)===true&&(Ne.dndKit={capturedBy:et.sensor},R.current=Ie,Qe(Xe,et));},[E,Qe]),it=vte(u,mt);Ite(u),Do(()=>{G&&w===wi.Initializing&&S(wi.Initialized);},[G,w]),f.useEffect(()=>{const{onDragMove:rt}=D.current,{active:et,activatorEvent:Xe,collisions:Ie,over:Ne}=re.current;if(!et||!Xe)return;const ae={active:et,activatorEvent:Xe,collisions:Ie,delta:{x:De.x,y:De.y},over:Ne};ST.unstable_batchedUpdates(()=>{rt?.(ae),C({type:"onDragMove",event:ae});});},[De.x,De.y]),f.useEffect(()=>{const{active:rt,activatorEvent:et,collisions:Xe,droppableContainers:Ie,scrollAdjustedTranslate:Ne}=re.current;if(!rt||R.current==null||!et||!Ne)return;const{onDragOver:ae}=D.current,ve=Ie.get(Le),de=ve&&ve.rect.current?{id:ve.id,rect:ve.rect.current,data:ve.data,disabled:ve.disabled}:null,se={active:rt,activatorEvent:et,collisions:Xe,delta:{x:Ne.x,y:Ne.y},over:de};ST.unstable_batchedUpdates(()=>{Me(de),ae?.(se),C({type:"onDragOver",event:se});});},[Le]),Do(()=>{re.current={activatorEvent:_,active:k,activeNode:U,collisionRect:ze,collisions:je,droppableRects:j,draggableNodes:E,draggingNode:Z,draggingNodeRect:te,droppableContainers:M,over:we,scrollableAncestors:ye,scrollAdjustedTranslate:De},A.current={initial:te,translated:ze};},[k,U,je,ze,E,Z,te,j,M,we,ye,De]),pte({...J,delta:P,draggingRect:ze,pointerCoordinates:ge,scrollableAncestors:ye,scrollableAncestorRects:pe});const ct=f.useMemo(()=>({active:k,activeNode:U,activeNodeRect:G,activatorEvent:_,collisions:je,containerNodeRect:ee,dragOverlay:be,draggableNodes:E,droppableContainers:M,droppableRects:j,over:we,measureDroppableContainers:Y,scrollableAncestors:ye,scrollableAncestorRects:pe,measuringConfiguration:B,measuringScheduled:q,windowRect:he}),[k,U,G,_,je,ee,be,E,M,j,we,Y,ye,pe,B,q,he]),bt=f.useMemo(()=>({activatorEvent:_,activators:it,active:k,activeNodeRect:G,ariaDescribedById:{draggable:W},dispatch:y,draggableNodes:E,over:we,measureDroppableContainers:Y}),[_,it,k,G,y,W,E,we,Y]);return f.createElement(JR.Provider,{value:x},f.createElement(Np.Provider,{value:bt},f.createElement(d4.Provider,{value:ct},f.createElement(f4.Provider,{value:Re},c)),f.createElement(kte,{disabled:a?.restoreFocus===false})),f.createElement(Lee,{...a,hiddenTextDescribedById:W}));function pt(){const rt=L?.autoScrollEnabled===false,et=typeof l=="object"?l.enabled===false:l===false,Xe=I&&!rt&&!et;return typeof l=="object"?{...l,enabled:Xe}:{enabled:Xe}}}),Vte=f.createContext(null),K2="button",jte="Draggable";function Wte(e){let{id:t,data:n,disabled:r=false,attributes:o}=e;const i=nd(jte),{activators:s,activatorEvent:a,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:d,over:m}=f.useContext(Np),{role:p=K2,roleDescription:h="draggable",tabIndex:g=0}=o??{},b=l?.id===t,y=f.useContext(b?f4:Vte),[C,x]=gm(),[w,S]=gm(),I=Pte(s,t),$=du(n);Do(()=>(d.set(t,{id:t,key:i,node:C,activatorNode:w,data:$}),()=>{const P=d.get(t);P&&P.key===i&&d.delete(t);}),[d,t]);const E=f.useMemo(()=>({role:p,tabIndex:g,"aria-disabled":r,"aria-pressed":b&&p===K2?true:void 0,"aria-roledescription":h,"aria-describedby":u.draggable}),[r,p,g,b,h,u.draggable]);return {active:l,activatorEvent:a,activeNodeRect:c,attributes:E,isDragging:b,listeners:r?void 0:I,node:C,over:m,setNodeRef:x,setActivatorNodeRef:S,transform:y}}function qte(){return f.useContext(d4)}const Ute="Droppable",Gte={timeout:25};function Kte(e){let{data:t,disabled:n=false,id:r,resizeObserverConfig:o}=e;const i=nd(Ute),{active:s,dispatch:a,over:l,measureDroppableContainers:c}=f.useContext(Np),u=f.useRef({disabled:n}),d=f.useRef(false),m=f.useRef(null),p=f.useRef(null),{disabled:h,updateMeasurementsFor:g,timeout:b}={...Gte,...o},y=du(g??r),C=f.useCallback(()=>{if(!d.current){d.current=true;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{c(Array.isArray(y.current)?y.current:[y.current]),p.current=null;},b);},[b]),x=Pp({callback:C,disabled:h||!s}),w=f.useCallback((E,P)=>{x&&(P&&(x.unobserve(P),d.current=false),E&&x.observe(E));},[x]),[S,I]=gm(w),$=du(t);return f.useEffect(()=>{!x||!S.current||(x.disconnect(),d.current=false,x.observe(S.current));},[S,x]),f.useEffect(()=>(a({type:$n.RegisterDroppable,element:{id:r,key:i,disabled:n,node:S,rect:m,data:$}}),()=>a({type:$n.UnregisterDroppable,key:i,id:r})),[r]),f.useEffect(()=>{n!==u.current.disabled&&(a({type:$n.SetDroppableDisabled,id:r,key:i,disabled:n}),u.current.disabled=n);},[r,i,n,a]),{active:s,rect:m,isOver:l?.id===r,node:S,over:l,setNodeRef:I}}function Xte(e,t,n){const r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}const Yte=e=>{let{containerNodeRect:t,draggingNodeRect:n,transform:r}=e;return !n||!t?r:Xte(r,n,t)},Qte=e=>{let{transform:t}=e;return {...t,x:0}};function IC(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Zte(e,t){return e.reduce((n,r,o)=>{const i=t.get(r);return i&&(n[o]=i),n},Array(e.length))}function zd(e){return e!==null&&e>=0}function Jte(e,t){if(e===t)return true;if(e.length!==t.length)return false;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return false;return true}function ene(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const m4=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=IC(t,r,n),s=t[o],a=i[o];return !a||!s?null:{x:a.left-s.left,y:a.top-s.top,scaleX:a.width/s.width,scaleY:a.height/s.height}},_d={scaleX:1,scaleY:1},tne=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:i,overIndex:s}=e;const a=(t=i[n])!=null?t:r;if(!a)return null;if(o===n){const c=i[s];return c?{x:0,y:n<s?c.top+c.height-(a.top+a.height):c.top-a.top,..._d}:null}const l=nne(i,o,n);return o>n&&o<=s?{x:0,y:-a.height-l,..._d}:o<n&&o>=s?{x:0,y:a.height+l,..._d}:{x:0,y:0,..._d}};function nne(e,t,n){const r=e[t],o=e[t-1],i=e[t+1];return r?n<t?o?r.top-(o.top+o.height):i?i.top-(r.top+r.height):0:i?i.top-(r.top+r.height):o?r.top-(o.top+o.height):0:0}const p4="Sortable",h4=f.createContext({activeIndex:-1,containerId:p4,disableTransforms:false,items:[],overIndex:-1,useDragOverlay:false,sortedRects:[],strategy:m4,disabled:{draggable:false,droppable:false}});function rne(e){let{children:t,id:n,items:r,strategy:o=m4,disabled:i=false}=e;const{active:s,dragOverlay:a,droppableRects:l,over:c,measureDroppableContainers:u}=qte(),d=nd(p4,n),m=a.rect!==null,p=f.useMemo(()=>r.map(I=>typeof I=="object"&&"id"in I?I.id:I),[r]),h=s!=null,g=s?p.indexOf(s.id):-1,b=c?p.indexOf(c.id):-1,y=f.useRef(p),C=!Jte(p,y.current),x=b!==-1&&g===-1||C,w=ene(i);Do(()=>{C&&h&&u(p);},[C,p,h,u]),f.useEffect(()=>{y.current=p;},[p]);const S=f.useMemo(()=>({activeIndex:g,containerId:d,disabled:w,disableTransforms:x,items:p,overIndex:b,useDragOverlay:m,sortedRects:Zte(p,l),strategy:o}),[g,d,w.draggable,w.droppable,x,p,b,l,m,o]);return f.createElement(h4.Provider,{value:S},t)}const one=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return IC(n,r,o).indexOf(t)},ine=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:s,previousItems:a,previousContainerId:l,transition:c}=e;return !c||!r||a!==i&&o===s?false:n?true:s!==o&&t===l},sne={duration:200,easing:"ease"},g4="transform",ane=fu.Transition.toString({property:g4,duration:0,easing:"linear"}),lne={roleDescription:"sortable"};function cne(e){let{disabled:t,index:n,node:r,rect:o}=e;const[i,s]=f.useState(null),a=f.useRef(n);return Do(()=>{if(!t&&n!==a.current&&r.current){const l=o.current;if(l){const c=Tl(r.current,{ignoreTransform:true}),u={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(u.x||u.y)&&s(u);}}n!==a.current&&(a.current=n);},[t,n,r,o]),f.useEffect(()=>{i&&s(null);},[i]),i}function une(e){let{animateLayoutChanges:t=ine,attributes:n,disabled:r,data:o,getNewIndex:i=one,id:s,strategy:a,resizeObserverConfig:l,transition:c=sne}=e;const{items:u,containerId:d,activeIndex:m,disabled:p,disableTransforms:h,sortedRects:g,overIndex:b,useDragOverlay:y,strategy:C}=f.useContext(h4),x=dne(r,p),w=u.indexOf(s),S=f.useMemo(()=>({sortable:{containerId:d,index:w,items:u},...o}),[d,o,w,u]),I=f.useMemo(()=>u.slice(u.indexOf(s)),[u,s]),{rect:$,node:E,isOver:P,setNodeRef:M}=Kte({id:s,data:S,disabled:x.droppable,resizeObserverConfig:{updateMeasurementsFor:I,...l}}),{active:N,activatorEvent:A,activeNodeRect:k,attributes:R,setNodeRef:L,listeners:V,isDragging:_,over:z,setActivatorNodeRef:D,transform:W}=Wte({id:s,data:S,attributes:{...lne,...n},disabled:x.draggable}),O=wee(M,L),B=!!N,j=B&&!h&&zd(m)&&zd(b),Y=!y&&_,q=Y&&j?W:null,K=j?q??(a??C)({rects:g,activeNodeRect:k,activeIndex:m,overIndex:b,index:w}):null,J=zd(m)&&zd(b)?i({id:s,items:u,activeIndex:m,overIndex:b}):w,Q=N?.id,G=f.useRef({activeId:Q,items:u,newIndex:J,containerId:d}),ee=u!==G.current.items,re=t({active:N,containerId:d,isDragging:_,isSorting:B,id:s,index:w,items:u,newIndex:G.current.newIndex,previousItems:G.current.items,previousContainerId:G.current.containerId,transition:c,wasDragging:G.current.activeId!=null}),oe=cne({disabled:!re,index:w,node:E,rect:$});return f.useEffect(()=>{B&&G.current.newIndex!==J&&(G.current.newIndex=J),d!==G.current.containerId&&(G.current.containerId=d),u!==G.current.items&&(G.current.items=u);},[B,J,d,u]),f.useEffect(()=>{if(Q===G.current.activeId)return;if(Q!=null&&G.current.activeId==null){G.current.activeId=Q;return}const Z=setTimeout(()=>{G.current.activeId=Q;},50);return ()=>clearTimeout(Z)},[Q]),{active:N,activeIndex:m,attributes:R,data:S,rect:$,index:w,newIndex:J,items:u,isOver:P,isSorting:B,isDragging:_,listeners:V,node:E,overIndex:b,over:z,setNodeRef:O,setActivatorNodeRef:D,setDroppableNodeRef:M,setDraggableNodeRef:L,transform:oe??K,transition:be()};function be(){if(oe||ee&&G.current.newIndex===w)return ane;if(!(Y&&!xC(A)||!c)&&(B||re))return fu.Transition.toString({...c,property:g4})}}function dne(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:false}:{draggable:(n=e?.draggable)!=null?n:t.draggable,droppable:(r=e?.droppable)!=null?r:t.droppable}}Wt.Down,Wt.Right,Wt.Up,Wt.Left;const X2=(e,t)=>{if(!e)return null;const n={left:e.offsetLeft,right:e.parentElement.clientWidth-e.clientWidth-e.offsetLeft,width:e.clientWidth,top:e.offsetTop,bottom:e.parentElement.clientHeight-e.clientHeight-e.offsetTop,height:e.clientHeight};return t?{left:0,right:0,width:0,top:n.top,bottom:n.bottom,height:n.height}:{left:n.left,right:n.right,width:n.width,top:0,bottom:0,height:0}},So=e=>e!==void 0?`${e}px`:void 0;function fne(e){const{prefixCls:t,containerRef:n,value:r,getValueIndex:o,motionName:i,onMotionStart:s,onMotionEnd:a,direction:l,vertical:c=false}=e,u=f__namespace.useRef(null),[d,m]=f__namespace.useState(r),p=$=>{const E=o($),P=n.current?.querySelectorAll(`.${t}-item`)[E];return P?.offsetParent&&P},[h,g]=f__namespace.useState(null),[b,y]=f__namespace.useState(null);Kt(()=>{if(d!==r){const $=p(d),E=p(r),P=X2($,c),M=X2(E,c);m(r),g(P),y(M),$&&E?s():a();}},[r]);const C=f__namespace.useMemo(()=>So(c?h?.top??0:l==="rtl"?-h?.right:h?.left),[c,l,h]),x=f__namespace.useMemo(()=>So(c?b?.top??0:l==="rtl"?-b?.right:b?.left),[c,l,b]),w=()=>c?{transform:"translateY(var(--thumb-start-top))",height:"var(--thumb-start-height)"}:{transform:"translateX(var(--thumb-start-left))",width:"var(--thumb-start-width)"},S=()=>c?{transform:"translateY(var(--thumb-active-top))",height:"var(--thumb-active-height)"}:{transform:"translateX(var(--thumb-active-left))",width:"var(--thumb-active-width)"},I=()=>{g(null),y(null),a();};return !h||!b?null:f__namespace.createElement(er,{visible:true,motionName:i,motionAppear:true,onAppearStart:w,onAppearActive:S,onVisibleChanged:I},({className:$,style:E},P)=>{const M={...E,"--thumb-start-left":C,"--thumb-start-width":So(h?.width),"--thumb-active-left":x,"--thumb-active-width":So(b?.width),"--thumb-start-top":C,"--thumb-start-height":So(h?.height),"--thumb-active-top":x,"--thumb-active-height":So(b?.height)},N={ref:In(u,P),style:M,className:H(`${t}-thumb`,$)};return f__namespace.createElement("div",N)})}function mne(e){if(typeof e.title<"u")return e.title;if(typeof e.label!="object")return e.label?.toString()}function pne(e){return e.map(t=>{if(typeof t=="object"&&t!==null){const n=mne(t);return {...t,title:n}}return {label:t?.toString(),title:t?.toString(),value:t}})}const hne=({prefixCls:e,className:t,style:n,styles:r,classNames:o,data:i,disabled:s,checked:a,label:l,title:c,value:u,name:d,onChange:m,onFocus:p,onBlur:h,onKeyDown:g,onKeyUp:b,onMouseDown:y,itemRender:C=x=>x})=>{const x=S=>{s||m(S,u);},w=f__namespace.createElement("label",{className:H(t,{[`${e}-item-disabled`]:s}),style:n,onMouseDown:y},f__namespace.createElement("input",{name:d,className:`${e}-item-input`,type:"radio",disabled:s,checked:a,onChange:x,onFocus:p,onBlur:h,onKeyDown:g,onKeyUp:b}),f__namespace.createElement("div",{className:H(`${e}-item-label`,o?.label),title:c,role:"radio","aria-checked":a,style:r?.label},l));return C(w,{item:i})},gne=f__namespace.forwardRef((e,t)=>{const{prefixCls:n="rc-segmented",direction:r,vertical:o,options:i=[],disabled:s,defaultValue:a,value:l,name:c,onChange:u,className:d="",style:m,styles:p,classNames:h,motionName:g="thumb-motion",itemRender:b,...y}=e,C=f__namespace.useRef(null),x=f__namespace.useMemo(()=>In(C,t),[C,t]),w=f__namespace.useMemo(()=>pne(i),[i]),[S,I]=Bt(a??w[0]?.value,l),[$,E]=f__namespace.useState(false),P=(B,j)=>{I(j),u?.(j);},M=Zt(y,["children"]),[N,A]=f__namespace.useState(false),[k,R]=f__namespace.useState(false),L=()=>{R(true);},V=()=>{R(false);},_=()=>{A(false);},z=B=>{B.key==="Tab"&&A(true);},D=B=>{const j=w.findIndex(K=>K.value===S),Y=w.length,q=(j+B+Y)%Y,U=w[q];U&&(I(U.value),u?.(U.value));},W=B=>{switch(B.key){case "ArrowLeft":case "ArrowUp":D(-1);break;case "ArrowRight":case "ArrowDown":D(1);break}},O=B=>{const{value:j,disabled:Y}=B;return f__namespace.createElement(hne,dn({},B,{name:c,data:B,itemRender:b,key:j,prefixCls:n,className:H(B.className,`${n}-item`,h?.item,{[`${n}-item-selected`]:j===S&&!$,[`${n}-item-focused`]:k&&N&&j===S}),style:p?.item,classNames:h,styles:p,checked:j===S,onChange:P,onFocus:L,onBlur:V,onKeyDown:W,onKeyUp:z,onMouseDown:_,disabled:!!s||!!Y}))};return f__namespace.createElement("div",dn({role:"radiogroup","aria-label":"segmented control",tabIndex:s?void 0:0,style:m},M,{className:H(n,{[`${n}-rtl`]:r==="rtl",[`${n}-disabled`]:s,[`${n}-vertical`]:o},d),ref:x}),f__namespace.createElement("div",{className:`${n}-group`},f__namespace.createElement(fne,{vertical:o,prefixCls:n,value:S,containerRef:C,motionName:`${n}-${g}`,direction:r,getValueIndex:B=>w.findIndex(j=>j.value===B),onMotionStart:()=>{E(true);},onMotionEnd:()=>{E(false);}}),w.map(O)))}),bne=gne;function Y2(e,t){return {[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}function Q2(e){return {background:e.itemSelectedBg,boxShadow:e.boxShadowTertiary}}const vne={overflow:"hidden",...Lo},yne=e=>{const{componentCls:t}=e,n=e.calc(e.controlHeight).sub(e.calc(e.trackPadding).mul(2)).equal(),r=e.calc(e.controlHeightLG).sub(e.calc(e.trackPadding).mul(2)).equal(),o=e.calc(e.controlHeightSM).sub(e.calc(e.trackPadding).mul(2)).equal();return {[t]:{...Lt(e),display:"inline-block",padding:e.trackPadding,color:e.itemColor,background:e.trackBg,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...Tr(e),[`${t}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",flexDirection:"row",width:"100%"},[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-vertical`]:{[`${t}-group`]:{flexDirection:"column"},[`${t}-thumb`]:{width:"100%",height:0,padding:`0 ${X(e.paddingXXS)}`}},[`&${t}-block`]:{display:"flex"},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${e.motionDurationMid}`,borderRadius:e.borderRadiusSM,transform:"translateZ(0)","&-selected":{...Q2(e),color:e.itemSelectedColor},"&-focused":Bo(e),"&::after":{content:'""',position:"absolute",zIndex:-1,width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",opacity:0,transition:`opacity ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,pointerEvents:"none"},[`&:not(${t}-item-selected):not(${t}-item-disabled)`]:{"&:hover, &:active":{color:e.itemHoverColor},"&:hover::after":{opacity:1,backgroundColor:e.itemHoverBg},"&:active::after":{opacity:1,backgroundColor:e.itemActiveBg}},"&-label":{minHeight:n,lineHeight:X(n),padding:`0 ${X(e.segmentedPaddingHorizontal)}`,...vne},"&-icon + *":{marginInlineStart:e.calc(e.marginSM).div(2).equal()},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${t}-thumb`]:{...Q2(e),position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${X(e.paddingXXS)} 0`,borderRadius:e.borderRadiusSM,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:"transparent"}},[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:r,lineHeight:X(r),padding:`0 ${X(e.segmentedPaddingHorizontal)}`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:o,lineHeight:X(o),padding:`0 ${X(e.segmentedPaddingHorizontalSM)}`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}},...Y2(`&-disabled ${t}-item`,e),...Y2(`${t}-item-disabled`,e),[`${t}-thumb-motion-appear-active`]:{transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, width ${e.motionDurationSlow} ${e.motionEaseInOut}`,willChange:"transform, width"},[`&${t}-shape-round`]:{borderRadius:9999,[`${t}-item, ${t}-thumb`]:{borderRadius:9999}}}}},Cne=e=>{const{colorTextLabel:t,colorText:n,colorFillSecondary:r,colorBgElevated:o,colorFill:i,lineWidthBold:s,colorBgLayout:a}=e;return {trackPadding:s,trackBg:a,itemColor:t,itemHoverColor:n,itemHoverBg:r,itemSelectedBg:o,itemActiveBg:i,itemSelectedColor:n}},xne=xt("Segmented",e=>{const{lineWidth:t,calc:n}=e,r=vt(e,{segmentedPaddingHorizontal:n(e.controlPaddingHorizontal).sub(t).equal(),segmentedPaddingHorizontalSM:n(e.controlPaddingHorizontalSM).sub(t).equal()});return yne(r)},Cne);function wne(e){return typeof e=="object"&&!!e?.icon}const Sne=f__namespace.forwardRef((e,t)=>{const n=Ws(),{prefixCls:r,className:o,rootClassName:i,block:s,options:a=[],size:l="middle",style:c,vertical:u,orientation:d,shape:m="default",name:p=n,styles:h,classNames:g,...b}=e,{getPrefixCls:y,direction:C,className:x,style:w,classNames:S,styles:I}=St("segmented"),$={...e,options:a,size:l,shape:m},[E,P]=It([S,g],[I,h],{props:$}),M=y("segmented",r),[N,A]=xne(M),k=Vn(l),R=f__namespace.useMemo(()=>a.map(D=>{if(wne(D)){const{icon:W,label:O,...B}=D;return {...B,label:f__namespace.createElement(f__namespace.Fragment,null,f__namespace.createElement("span",{className:H(`${M}-item-icon`,E.icon),style:P.icon},W),O&&f__namespace.createElement("span",null,O))}}return D}),[a,M,E.icon,P.icon]),[,L]=qs(d,u),V=H(o,i,x,E.root,{[`${M}-block`]:s,[`${M}-sm`]:k==="small",[`${M}-lg`]:k==="large",[`${M}-vertical`]:L,[`${M}-shape-${m}`]:m==="round"},N,A),_={...P.root,...w,...c},z=(D,{item:W})=>{if(!W.tooltip)return D;const O=typeof W.tooltip=="object"?W.tooltip:{title:W.tooltip};return f__namespace.createElement(Zi,{...O},D)};return f__namespace.createElement(bne,{...b,name:p,className:V,style:_,classNames:E,styles:P,itemRender:z,options:R,ref:t,prefixCls:M,direction:C,vertical:L})}),b4=Sne,$ne=Object.prototype.toString,Ene=e=>$ne.call(e)==="[object Error]",Ine=new Set(["network error","Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Load failed","Network request failed","fetch failed","terminated"]);function Pne(e){return e&&Ene(e)&&e.name==="TypeError"&&typeof e.message=="string"?e.message==="Load failed"?e.stack===void 0:Ine.has(e.message):false}function Nne(e){if(typeof e=="number"){if(e<0)throw new TypeError("Expected `retries` to be a non-negative number.");if(Number.isNaN(e))throw new TypeError("Expected `retries` to be a valid number or Infinity, got NaN.")}else if(e!==void 0)throw new TypeError("Expected `retries` to be a number or Infinity.")}function Hd(e,t,{min:n=0,allowInfinity:r=false}={}){if(t!==void 0){if(typeof t!="number"||Number.isNaN(t))throw new TypeError(`Expected \`${e}\` to be a number${r?" or Infinity":""}.`);if(!r&&!Number.isFinite(t))throw new TypeError(`Expected \`${e}\` to be a finite number.`);if(t<n)throw new TypeError(`Expected \`${e}\` to be ≥ ${n}.`)}}class Mne 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;}}function Rne(e,t){const n=Math.max(1,e+1),r=t.randomize?Math.random()+1:1;let o=Math.round(r*t.minTimeout*t.factor**(n-1));return o=Math.min(o,t.maxTimeout),o}function Z2(e,t){return Number.isFinite(t)?t-(performance.now()-e):t}async function Ane({error:e,attemptNumber:t,retriesConsumed:n,startTime:r,options:o}){const i=e instanceof Error?e:new TypeError(`Non-error was thrown: "${e}". You should only throw errors.`);if(i instanceof Mne)throw i.originalError;const s=Number.isFinite(o.retries)?Math.max(0,o.retries-n):o.retries,a=o.maxRetryTime??Number.POSITIVE_INFINITY,l=Object.freeze({error:i,attemptNumber:t,retriesLeft:s,retriesConsumed:n});if(await o.onFailedAttempt(l),Z2(r,a)<=0)throw i;const c=await o.shouldConsumeRetry(l),u=Z2(r,a);if(u<=0||s<=0)throw i;if(i instanceof TypeError&&!Pne(i)){if(c)throw i;return o.signal?.throwIfAborted(),false}if(!await o.shouldRetry(l))throw i;if(!c)return o.signal?.throwIfAborted(),false;const d=Rne(n,o),m=Math.min(d,u);return o.signal?.throwIfAborted(),m>0&&await new Promise((p,h)=>{const g=()=>{clearTimeout(b),o.signal?.removeEventListener("abort",g),h(o.signal.reason);},b=setTimeout(()=>{o.signal?.removeEventListener("abort",g),p();},m);o.unref&&b.unref?.(),o.signal?.addEventListener("abort",g,{once:true});}),o.signal?.throwIfAborted(),true}async function v4(e,t={}){if(t={...t},Nne(t.retries),Object.hasOwn(t,"forever"))throw new Error("The `forever` option is no longer supported. For many use-cases, you can set `retries: Infinity` instead.");t.retries??=10,t.factor??=2,t.minTimeout??=1e3,t.maxTimeout??=Number.POSITIVE_INFINITY,t.maxRetryTime??=Number.POSITIVE_INFINITY,t.randomize??=false,t.onFailedAttempt??=()=>{},t.shouldRetry??=()=>true,t.shouldConsumeRetry??=()=>true,Hd("factor",t.factor,{min:0,allowInfinity:false}),Hd("minTimeout",t.minTimeout,{min:0,allowInfinity:false}),Hd("maxTimeout",t.maxTimeout,{min:0,allowInfinity:true}),Hd("maxRetryTime",t.maxRetryTime,{min:0,allowInfinity:true}),t.factor>0||(t.factor=1),t.signal?.throwIfAborted();let n=0,r=0;const o=performance.now();for(;!Number.isFinite(t.retries)||r<=t.retries;){n++;try{t.signal?.throwIfAborted();const i=await e(n);return t.signal?.throwIfAborted(),i}catch(i){await Ane({error:i,attemptNumber:n,retriesConsumed:r,startTime:o,options:t})&&r++;}}throw new Error("Retry attempts exhausted without throwing an error.")}var Yo=(e=>(e.Latest="pubdate",e.View="click",e.Fav="stow",e))(Yo||{});const Tne={pubdate:{icon:v(su,{}),label:"最新发布"},click:{icon:v(qu,{}),label:"最多播放"},stow:{icon:v(Fi,{}),label:"最多收藏"}},One=40;async function Fne({mid:e,order:t="pubdate",keyword:n="",pagenum:r=1}){const i=(await Tt.get("/x/space/wbi/arc/search",{params:{mid:e,order:t,keyword:n,ps:One,pn:r}})).data;if(!cn(i))throw new Error(`request json error: ${i.message}`||$u);const s=i.data.list.vlist||[],a=i.data.page.count;let l,c;{const{count:u,pn:d,ps:m}=i.data.page;l=d*m<u,c=u-(d-1)*m;}return {items:s,hasMore:l,count:a,endVol:c}}async function Lne(...e){return await v4(()=>Fne(...e),{retries:5,factor:1.5,onFailedAttempt:t=>console.error(t)})}var Qo=(e=>(e.Mid="space-mid",e.GroupId="space-group-id",e.SearchText="space-search-text",e.FilterText="space-filter-text",e.InitialPage="space-initial-page",e))(Qo||{});const rd=new URLSearchParams(location.search),Bne=rd.get("space-mid")||void 0,J2=rd.get("space-group-id")||void 0,kne=rd.get("space-search-text")||void 0,Dne=rd.get("space-filter-text")||void 0,eE=rd.get("space-initial-page")||void 0,y4=(Bne||"").split(/[,_-]/).map(e=>e.trim()).filter(Boolean).filter(e=>/^\d+$/.test(e)),C4=J2?Number(J2):void 0,pu=!!(y4.length||C4),oo=tn({mids:y4,groupId:C4,order:Yo.Latest,searchText:kne,filterText:Dne,get isMultipleTraget(){return this.mids.length>1||!!this.groupId},get allowedOrders(){return [Yo.Latest,Yo.View,!this.isMultipleTraget&&Yo.Fav].filter(Boolean)},get usingOrder(){return this.allowedOrders.includes(this.order)?this.order:this.allowedOrders[0]}}),od=await( Ky({value:Be.AppRecommend},"video-source-tab"));Qc&&(od.value=Be.DynamicFeed);nl&&(od.value=Be.Fav);pu&&(od.value=Be.SpaceUpload);function x4(e){return ky.slice().sort((t,n)=>{let r=e.indexOf(t),o=e.indexOf(n);return r===-1&&(r=Hb.indexOf(t)),o===-1&&(o=Hb.indexOf(n)),r-o})}function PC(){const{customTabKeysOrder:e}=Mt();return f.useMemo(()=>x4(e),[e])}function w4(){const{hidingTabKeys:e,customTabKeysOrder:t}=Mt(),n=Yy(),r=f.useMemo(()=>x4(t).filter(i=>i===Be.AppRecommend&&!n||i===Be.DynamicFeed&&Qc||i===Be.Fav&&nl?true:i===Be.SpaceUpload&&!pu?false:!e.includes(i)),[e,t,n]);return Qc&&r.includes(Be.DynamicFeed)?[Be.DynamicFeed]:nl&&r.includes(Be.Fav)?[Be.Fav]:pu?[Be.SpaceUpload]:r}function zne(){const e=w4();return f.useMemo(()=>e.map(t=>({key:t,...Nl[t]})),[e])}function Mp(){const e=nt(od).value,t=w4(),n=Yy(),r=Be.AppRecommend;return !t.includes(e)||!n&&!Nl[e].anonymousUsage?r:e}function NC(){const e=f.useDeferredValue(Mp()),t=jy(e),n=PC(),r=f.useMemo(()=>t?n.indexOf(e)>n.indexOf(t)?"right":"left":void 0,[n,e]);return {tab:e,prevTab:t,direction:r}}const _ne={name:"18r7nz9",styles:"height:32px;line-height:unset;--ant-border-radius:16px;&:has(:focus-visible){outline:none;outline-offset:unset;}>.ant-radio-button+span{height:100%;}"};function S4(){const e=Yy(),t=Mp(),n=zne(),{__internalRecTabRenderAsSegments:r}=Mt();jn();const o=Ve(a=>{if(!e&&!Nl[a].anonymousUsage&&!m6())return zR();od.value=a;}),i=v(Dn.Group,{optionType:"button",buttonStyle:"solid",size:"middle",value:t,className:"inline-flex items-center overflow-hidden",onFocus:a=>{a.target.blur();},onChange:a=>{const l=a.target.value;o(l);},children:n.map(({key:a,label:l})=>v(Dn.Button,{css:_ne,className:"video-source-tab",tabIndex:-1,value:a,children:F("span",{className:"h-full flex items-center line-height-unset",children:[v(Oo,{tabKey:a,className:"mr-4px",active:a===t}),l]})},a))});let s;{const a=f.useMemo(()=>n.map(({key:l,label:c})=>({value:l,label:F("div",{className:"flex items-center gap-x-6px",children:[v(Oo,{tabKey:l,active:l===t}),c]})})),[n,t]);s=v(b4,{size:"middle",options:a,value:t,onChange:o});}return F("div",{className:"flex-v-center",children:[r?s:i,v(Mn,{className:"ml-6px size-16px",children:v($e,{children:n.map(({key:a,label:l,desc:c,extraHelpInfo:u})=>F(f.Fragment,{children:[F("div",{className:"h-22px flex items-center",children:[v(Oo,{tabKey:a,className:"mr-4px",active:true}),l,": ",c]}),!!u&&u]},a))})})]})}function rl(e){return e.api===Ee.AppRecommend}function Rp(e){return e.api===Ee.PcRecommend}function Cm(e){return e.api===Ee.DynamicFeed}function Ap(e){return e.api===Ee.Watchlater}function Ds(e){return e.api===Ee.Fav}function Hne(e){return e.api===Ee.PopularGeneral}function Vne(e){return e.api===Ee.PopularWeekly}function MC(e){return e.api===Ee.Rank}function hu(e){return e.api===Ee.Live}function RC(e){return e.api===Ee.SpaceUpload}async function $4(e,t){const n=Lr(),r=Xs(),o=new URLSearchParams({fid:e,act:String(t),re_src:"11",gaia_source:"web_main",spmid:"333.999.0.0",extend_content:JSON.stringify({entity:"user",entity_id:n,fp:jne()}),csrf:r}),s=(await Tt.post("/x/relation/modify",o)).data,a=cn(s);return a||zt(s.message||"未知错误"),a}function jne(){let e,t;const n=((e=window.reportObserver)===null||e===void 0||(t=e.cache)===null||t===void 0?void 0:t.fpriskMsg)||{};let r="empty";return n&&(r=`${n.webdriver}${n.screenResolution}${n.platform}${n.hardwareConcurrency}${n.deviceMemory}${n.colorDepth}${n.indexedDb}${n.language}${n.openDatabase}${n.touchSupport}${n.userAgent}`),decodeURIComponent(r)}const Wne=Hn.extend("service:user:relations:blacklist"),qne=I4("follow"),Une=I4("remove"),E4={add:qne,remove:Une},{set:gu,replaceAllWith:Gne}=await( d6("blacklist-mids"));function Kne(e){const t=nt(gu);return !!e&&t.has(e)}function I4(e){const t=e==="follow"?5:6;return async function(r){const o=await $4(r,t);if(o){const i=gu;e==="follow"?i.add(r):e==="remove"&&i.delete(r);}return o}}async function Xne(){const t=async s=>{const l=(await Tt.get("/x/relation/blacks",{params:{re_version:0,ps:20,pn:s}})).data;if(!cn(l))return;const c=l.data.total,u=l.data.list.map(d=>d.mid);return {total:c,mids:u}},n=await t(1);if(!n)return;const{total:r,mids:o=[]}=n;let i=o;if(r){const s=Math.ceil(r/20);for(let a=2;a<=s;a++){const{mids:l=[]}=await t(a)||{};i=i.concat(l);}}return i}(async()=>{if(!_o)return;await rp();const e=await Xne();Wne("user blocklist fetched: %o",e),e&&Gne(e.map(t=>t.toString()));})();var P4=23442827791579n,Yne=2251799813685247n,Qne=1n<<51n,v0=58n,N4="FcwAPNKTMug3GV5Lj7EJnHpWsx4tb8haYeviqBz6rkCy12mUSDQX9RdoZf";function Zne(e){const t=["B","V","1","0","0","0","0","0","0","0","0","0"];let n=t.length-1,r=(Qne|BigInt(e))^P4;for(;r>0;)t[n]=N4[Number(r%BigInt(v0))],r=r/v0,n-=1;return [t[3],t[9]]=[t[9],t[3]],[t[4],t[7]]=[t[7],t[4]],t.join("")}function Jne(e){const t=Array.from(e);[t[3],t[9]]=[t[9],t[3]],[t[4],t[7]]=[t[7],t[4]],t.splice(0,3);const n=t.reduce((r,o)=>r*v0+BigInt(N4.indexOf(o)),0n);return Number(n&Yne^P4)}var M4={av2bv:Zne,bv2av:Jne};const ere=Zs(e=>F("svg",{viewBox:"0 0 24 24",fill:"currentColor",...e,children:[v("path",{d:"M12 4.99805C9.48178 4.99805 7.283 5.12616 5.73089 5.25202C4.65221 5.33949 3.81611 6.16352 3.72 7.23254C3.60607 8.4998 3.5 10.171 3.5 11.998C3.5 13.8251 3.60607 15.4963 3.72 16.76355C3.81611 17.83255 4.65221 18.6566 5.73089 18.7441C7.283 18.8699 9.48178 18.998 12 18.998C14.5185 18.998 16.7174 18.8699 18.2696 18.74405C19.3481 18.65655 20.184 17.8328 20.2801 16.76405C20.394 15.4973 20.5 13.82645 20.5 11.998C20.5 10.16965 20.394 8.49877 20.2801 7.23205C20.184 6.1633 19.3481 5.33952 18.2696 5.25205C16.7174 5.12618 14.5185 4.99805 12 4.99805zM5.60965 3.75693C7.19232 3.62859 9.43258 3.49805 12 3.49805C14.5677 3.49805 16.8081 3.62861 18.3908 3.75696C20.1881 3.90272 21.6118 5.29278 21.7741 7.09773C21.8909 8.3969 22 10.11405 22 11.998C22 13.88205 21.8909 15.5992 21.7741 16.8984C21.6118 18.7033 20.1881 20.09335 18.3908 20.23915C16.8081 20.3675 14.5677 20.498 12 20.498C9.43258 20.498 7.19232 20.3675 5.60965 20.2392C3.81206 20.0934 2.38831 18.70295 2.22603 16.8979C2.10918 15.5982 2 13.8808 2 11.998C2 10.1153 2.10918 8.39787 2.22603 7.09823C2.38831 5.29312 3.81206 3.90269 5.60965 3.75693z",fill:"currentColor"}),v("path",{d:"M14.7138 10.96875C15.50765 11.4271 15.50765 12.573 14.71375 13.0313L11.5362 14.8659C10.74235 15.3242 9.75 14.7513 9.75001 13.8346L9.75001 10.1655C9.75001 9.24881 10.74235 8.67587 11.5362 9.13422L14.7138 10.96875z",fill:"currentColor"})]})),tre=Zs(e=>F("svg",{viewBox:"0 0 24 24",fill:"currentColor",...e,children:[v("path",{d:"M12 4.99805C9.48178 4.99805 7.283 5.12616 5.73089 5.25202C4.65221 5.33949 3.81611 6.16352 3.72 7.23254C3.60607 8.4998 3.5 10.171 3.5 11.998C3.5 13.8251 3.60607 15.4963 3.72 16.76355C3.81611 17.83255 4.65221 18.6566 5.73089 18.7441C7.283 18.8699 9.48178 18.998 12 18.998C14.5185 18.998 16.7174 18.8699 18.2696 18.74405C19.3481 18.65655 20.184 17.8328 20.2801 16.76405C20.394 15.4973 20.5 13.82645 20.5 11.998C20.5 10.16965 20.394 8.49877 20.2801 7.23205C20.184 6.1633 19.3481 5.33952 18.2696 5.25205C16.7174 5.12618 14.5185 4.99805 12 4.99805zM5.60965 3.75693C7.19232 3.62859 9.43258 3.49805 12 3.49805C14.5677 3.49805 16.8081 3.62861 18.3908 3.75696C20.1881 3.90272 21.6118 5.29278 21.7741 7.09773C21.8909 8.3969 22 10.11405 22 11.998C22 13.88205 21.8909 15.5992 21.7741 16.8984C21.6118 18.7033 20.1881 20.09335 18.3908 20.23915C16.8081 20.3675 14.5677 20.498 12 20.498C9.43258 20.498 7.19232 20.3675 5.60965 20.2392C3.81206 20.0934 2.38831 18.70295 2.22603 16.8979C2.10918 15.5982 2 13.8808 2 11.998C2 10.1153 2.10918 8.39787 2.22603 7.09823C2.38831 5.29312 3.81206 3.90269 5.60965 3.75693z",fill:"currentColor"}),v("path",{d:"M15.875 10.75L9.875 10.75C9.46079 10.75 9.125 10.4142 9.125 10C9.125 9.58579 9.46079 9.25 9.875 9.25L15.875 9.25C16.2892 9.25 16.625 9.58579 16.625 10C16.625 10.4142 16.2892 10.75 15.875 10.75z",fill:"currentColor"}),v("path",{d:"M17.375 14.75L11.375 14.75C10.9608 14.75 10.625 14.4142 10.625 14C10.625 13.5858 10.9608 13.25 11.375 13.25L17.375 13.25C17.7892 13.25 18.125 13.5858 18.125 14C18.125 14.4142 17.7892 14.75 17.375 14.75z",fill:"currentColor"}),v("path",{d:"M7.875 10C7.875 10.4142 7.53921 10.75 7.125 10.75L6.625 10.75C6.21079 10.75 5.875 10.4142 5.875 10C5.875 9.58579 6.21079 9.25 6.625 9.25L7.125 9.25C7.53921 9.25 7.875 9.58579 7.875 10z",fill:"currentColor"}),v("path",{d:"M9.375 14C9.375 14.4142 9.03921 14.75 8.625 14.75L8.125 14.75C7.71079 14.75 7.375 14.4142 7.375 14C7.375 13.5858 7.71079 13.25 8.125 13.25L8.625 13.25C9.03921 13.25 9.375 13.5858 9.375 14z",fill:"currentColor"})]})),nre=Zs(function(e){return F("svg",{viewBox:"0 0 16 16",fill:"currentColor",...e,children:[v("path",{d:"M8.624933333333333 13.666666666666666C8.624933333333333 14.011849999999999 8.345125 14.291666666666666 7.999933333333333 14.291666666666666C4.525166666666666 14.291666666666666 1.7082933333333332 11.474791666666665 1.7082933333333332 8C1.7082933333333332 6.013308333333333 2.629825 4.2414233333333335 4.066321666666667 3.089385C4.335603333333333 2.8734283333333335 4.728959999999999 2.9166533333333335 4.944915 3.1859349999999997C5.160871666666666 3.4552099999999997 5.1176466666666665 3.848573333333333 4.848366666666666 4.0645283333333335C3.694975 4.98953 2.9582933333333328 6.40852 2.9582933333333328 8C2.9582933333333328 10.784416666666667 5.215528333333333 13.041666666666666 7.999933333333333 13.041666666666666C8.345125 13.041666666666666 8.624933333333333 13.321483333333333 8.624933333333333 13.666666666666666zM11.060475 12.810558333333333C10.844225000000002 12.541558333333331 10.887033333333335 12.148125 11.156041666666667 11.931875C12.306858333333333 11.006775 13.041599999999999 9.589424999999999 13.041599999999999 8C13.041599999999999 5.215561666666666 10.784408333333332 2.958333333333333 7.999933333333333 2.958333333333333C7.6548083333333325 2.958333333333333 7.374933333333333 2.6785083333333333 7.374933333333333 2.333333333333333C7.374933333333333 1.9881533333333332 7.6548083333333325 1.7083333333333333 7.999933333333333 1.7083333333333333C11.474725000000001 1.7083333333333333 14.291599999999999 4.525206666666667 14.291599999999999 8C14.291599999999999 9.984108333333333 13.372483333333332 11.753958333333332 11.939225 12.906125C11.670166666666663 13.122375 11.276725 13.079625 11.060475 12.810558333333333z",fill:"currentColor"}),v("path",{d:"M1.375 3.4130866666666666C1.375 3.0679066666666666 1.654825 2.7880866666666666 2 2.7880866666666666L4.333333333333333 2.7880866666666666C4.862608333333333 2.7880866666666666 5.291666666666666 3.2171449999999995 5.291666666666666 3.7464199999999996L5.291666666666666 6.079753333333334C5.291666666666666 6.424928333333334 5.011841666666666 6.704736666666666 4.666666666666666 6.704736666666666C4.321491666666667 6.704736666666666 4.041666666666666 6.424928333333334 4.041666666666666 6.079753333333334L4.041666666666666 4.038086666666667L2 4.038086666666667C1.654825 4.038086666666667 1.375 3.7582616666666664 1.375 3.4130866666666666z",fill:"currentColor"}),v("path",{d:"M14.625 12.5864C14.625 12.931591666666666 14.345183333333333 13.2114 14 13.2114L11.666666666666666 13.2114C11.137408333333335 13.2114 10.708333333333332 12.782383333333332 10.708333333333332 12.253066666666665L10.708333333333332 9.919733333333333C10.708333333333332 9.574608333333334 10.98815 9.294733333333333 11.333333333333332 9.294733333333333C11.678516666666667 9.294733333333333 11.958333333333332 9.574608333333334 11.958333333333332 9.919733333333333L11.958333333333332 11.9614L14 11.9614C14.345183333333333 11.9614 14.625 12.241275000000002 14.625 12.5864z",fill:"currentColor"})]})});function AC(e){if(!e)return 0;const t=[1,60,360];return e.split(":").map(Number).reverse().reduce((o,i,s)=>o+i*t[s],0)}function ss(e){return e||=0,rn.duration(e||0,"seconds").format(e>=3600?"HH:mm:ss":"mm:ss")}function rre(e){if(!e)return typeof e=="number"?"0":e;if(e<=9999)return e.toString();const t=n=>n.replace(/\.0$/,"");if(e/=1e4,e<=9999)return `${t(e.toFixed(1))}万`;if(e/=1e4,e<=9999)return `${t(e.toFixed(1))}亿`;console.warn(`formatCount(count = ${e}); can not handle input`);}function Rc(e){if(e){if(e==="-")return 0;if(/^\d+$/.test(e))return Number(e);if(/^\d+(?:\.\d+)?万$/.test(e))return Number(e.slice(0,-1))*1e4;if(/^\d+(?:\.\d+)?亿$/.test(e))return Number(e.slice(0,-1))*1e8}}const ore=rn().format("YYYY");function Sf(e,t=false){if(!e)return "";const n=rn.unix(e),r=t?" HH:mm":"";return n.format("YYYY")===ore?n.format(`M-D${r}`):n.format(`YY-M-D${r}`)}function ire(e){const t=rn().subtract(1,"day").startOf("day").unix();return e>=t}function sre(e,t){if(!e)return;const n=rn.unix(e),r=n.format("YYYY-MM-DD")===rn().format("YYYY-MM-DD"),o=r&&Date.now()-e*1e3<=Wn("12h"),i=n.format("YYYY-MM-DD")===rn().subtract(1,"day").format("YYYY-MM-DD"),s=n.format("YYYY")===rn().format("YYYY");if(o){const a=rn().diff(n,"minutes"),l=rn().diff(n,"hours");return a<1?"刚刚":a<60?`${a}分钟前`:`${l}小时前`}return r?n.format("今天 HH:mm"):i?n.format("昨天 HH:mm"):s?n.format("M月D日"):n.format("YYYY年M月D日")}const are={1:"橙色通过",0:"开放浏览","-1":"待审","-2":"被打回","-3":"网警锁定","-4":"被锁定","-5":"管理员锁定","-6":"修复待审","-7":"暂缓审核","-8":"补档待审","-9":"等待转码","-10":"延迟审核","-11":"视频源待修","-12":"转储失败","-13":"允许评论待审","-14":"临时回收站","-15":"分发中","-16":"转码失败","-20":"创建未提交","-30":"创建已提交","-40":"定时发布","-100":"用户删除"};function lre(e){if(e!==void 0&&!(e>=0))return are[e]}const cre=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,d:"M27.6 18.6v-7.2A5.4 5.4 0 0 0 22.2 6L15 22.2V42h20.916a3.6 3.6 0 0 0 3.6-3.06L42 22.74a3.6 3.6 0 0 0-3.6-4.14zM15 22h-4.806C8.085 21.963 6.283 23.71 6 25.8v12.6a4.16 4.16 0 0 0 4.194 3.6H15z"})]}),ure=f.forwardRef(cre),dre=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"currentColor",d:"M6.979 3.074a6 6 0 0 1 4.988 1.425l.037.033l.034-.03a6 6 0 0 1 4.733-1.44l.246.036a6 6 0 0 1 3.364 10.008l-.18.185l-.048.041l-7.45 7.379a1 1 0 0 1-1.313.082l-.094-.082l-7.493-7.422A6 6 0 0 1 6.979 3.074"})]}),fre=f.forwardRef(dre),mre=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[v("path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0m6 0h6m-6 3h6M9 8l3 4.5"}),v("path",{d:"m15 8l-3 4.5V17"})]})]}),pre=f.forwardRef(mre),hre=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,children:[v("path",{d:"M24 36c11.046 0 20-12 20-12s-8.954-12-20-12S4 24 4 24s8.954 12 20 12Z"}),v("path",{d:"M24 29a5 5 0 1 0 0-10a5 5 0 0 0 0 10Z"})]})]}),gre=f.forwardRef(hre);const tE="size-18px",Jl="size-16px",bre={play:v(ere,{className:tE}),danmaku:v(tre,{className:tE}),like:v(ure,{className:Jl}),"bangumi:follow":v(fre,{className:Jl}),favorite:v(Fi,{className:Jl}),coin:v(pre,{className:Jl}),"live:viewed-by":v(gre,{className:Jl})},vre=f.memo(function({field:e,value:t}){const n=f.useMemo(()=>typeof t=="number"||t&&/^\d+$/.test(t)?rre(Number(t))??C$:t??C$,[t]),r=bre[e];return F("span",{"data-field":e,className:"bili-video-card__stats--item gap-x-2px mr-0!",children:[r,v("span",{className:H("bili-video-card__stats--text line-height-18px"),children:n})]})});var Li=(e=>(e.AV="av",e.Ad="ad",e.Live="live",e))(Li||{});const xm=e=>{const t=new Map;return e.forEach((n,r)=>{t.set(n,r);}),t},yre=e=>{const t=new Map;return e.forEach(({disabled:n,key:r},o)=>{n&&t.set(r,o);}),t};function Cre(e,t){const n=e==="right";return t!=="rtl"?n?f.createElement(Ya,null):f.createElement(Jc,null):n?f.createElement(Jc,null):f.createElement(Ya,null)}const nE=({type:e,actions:t,moveToLeft:n,moveToRight:r,leftActive:o,rightActive:i,direction:s,disabled:a})=>{const l=e==="right",c=l?t[0]:t[1],u=l?r:n,d=l?i:o,m=Cre(e,s);if(f.isValidElement(c)){const p=c,h=g=>{p?.props?.onClick?.(g),u?.(g);};return f.cloneElement(p,{disabled:a||!d,onClick:h})}return f.createElement(Je,{type:"primary",size:"small",disabled:a||!d,onClick:p=>u?.(p),icon:m},c)},R4=e=>{const{className:t,style:n,oneWay:r,actions:o,...i}=e;return f.createElement("div",{className:t,style:n},f.createElement(nE,{type:"right",actions:o,...i}),!r&&f.createElement(nE,{type:"left",actions:o,...i}),o.slice(r?1:2))},xre=(e,t,n)=>{const r=f__namespace.useMemo(()=>(e||[]).map(s=>t?{...s,key:t(s)}:s),[e,t]),[o,i]=f__namespace.useMemo(()=>{const s=[],a=Array.from({length:n?.length??0}),l=xm(n||[]);return r.forEach(c=>{if(l.has(c.key)){const u=l.get(c.key);a[u]=c;}else s.push(c);}),[s,a]},[r,n]);return [r,o.filter(Boolean),i.filter(Boolean)]},wre=[];function Vd(e,t){const n=e.filter(r=>t.has(r));return e.length===n.length?e:n}function rE(e){return Array.from(e).join(";")}function Sre(e,t,n){const[r,o]=f__namespace.useMemo(()=>[new Set(e.map(d=>d?.key)),new Set(t.map(d=>d?.key))],[e,t]),[i,s]=Bt(wre,n),a=f__namespace.useMemo(()=>Vd(i,r),[i,r]),l=f__namespace.useMemo(()=>Vd(i,o),[i,o]);f__namespace.useEffect(()=>{s([].concat(Et(Vd(i,r)),Et(Vd(i,o))));},[rE(r),rE(o)]);const c=lt(d=>{s([].concat(Et(d),Et(l)));}),u=lt(d=>{s([].concat(Et(a),Et(d)));});return [a,l,c,u]}const A4=e=>{const{placeholder:t="",value:n,prefixCls:r,disabled:o,onChange:i,handleClear:s}=e,a=f__namespace.useCallback(l=>{i?.(l),l.target.value===""&&s?.();},[i]);return f__namespace.createElement(Ml,{placeholder:t,className:r,value:n,onChange:a,disabled:o,allowClear:true,prefix:f__namespace.createElement(oC,null)})},$re={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"},Ere=[10,20,50,100],Ire=e=>{const{pageSizeOptions:t=Ere,locale:n,changeSize:r,pageSize:o,goButton:i,quickGo:s,rootPrefixCls:a,disabled:l,buildOptionText:c,showSizeChanger:u,sizeChangerRender:d}=e,[m,p]=f.useState(""),h=f.useMemo(()=>!m||Number.isNaN(m)?void 0:Number(m),[m]),g=typeof c=="function"?c:E=>`${E} ${n.items_per_page}`,b=E=>{const P=E.target.value;/^\d*$/.test(P)&&p(P);},y=E=>{i||m===""||(p(""),!(E.relatedTarget&&(E.relatedTarget.className.includes(`${a}-item-link`)||E.relatedTarget.className.includes(`${a}-item`)))&&s?.(h));},C=E=>{m!==""&&(E.keyCode===_e.ENTER||E.type==="click")&&(p(""),s?.(h));},x=()=>t.some(E=>E.toString()===o.toString())?t:t.concat([o]).sort((E,P)=>{const M=Number.isNaN(Number(E))?0:Number(E),N=Number.isNaN(Number(P))?0:Number(P);return M-N}),w=`${a}-options`;if(!u&&!s)return null;let S=null,I=null,$=null;return u&&d&&(S=d({disabled:l,size:o,onSizeChange:E=>{r?.(Number(E));},"aria-label":n.page_size,className:`${w}-size-changer`,options:x().map(E=>({label:g(E),value:E}))})),s&&(i&&($=typeof i=="boolean"?f.createElement("button",{type:"button",onClick:C,onKeyUp:C,disabled:l,className:`${w}-quick-jumper-button`},n.jump_to_confirm):f.createElement("span",{onClick:C,onKeyUp:C},i)),I=f.createElement("div",{className:`${w}-quick-jumper`},n.jump_to,f.createElement("input",{disabled:l,type:"text",value:m,onChange:b,onKeyUp:C,onBlur:y,"aria-label":n.page}),n.page,$)),f.createElement("li",{className:w},S,I)},ec=e=>{const{rootPrefixCls:t,page:n,active:r,className:o,style:i,showTitle:s,onClick:a,onKeyPress:l,itemRender:c}=e,u=`${t}-item`,d=H(u,`${u}-${n}`,{[`${u}-active`]:r,[`${u}-disabled`]:!n},o),m=()=>{a(n);},p=g=>{l(g,a,n);},h=c(n,"page",f.createElement("a",{rel:"nofollow"},n));return h?f.createElement("li",{title:s?String(n):null,className:d,style:i,onClick:m,onKeyDown:p,tabIndex:0},h):null};function Si(){return Si=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},Si.apply(this,arguments)}const Pre=(e,t,n)=>n;function oE(){}function iE(e){const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function fs(e,t,n){const r=typeof e>"u"?t:e;return Math.floor((n-1)/r)+1}const Nre=e=>{const{prefixCls:t="rc-pagination",selectPrefixCls:n="rc-select",className:r,classNames:o,styles:i,current:s,defaultCurrent:a=1,total:l=0,pageSize:c,defaultPageSize:u=10,onChange:d=oE,hideOnSinglePage:m,align:p,showPrevNextJumpers:h=true,showQuickJumper:g,showLessItems:b,showTitle:y=true,onShowSizeChange:C=oE,locale:x=$re,style:w,totalBoundaryShowSizeChanger:S=50,disabled:I,simple:$,showTotal:E,showSizeChanger:P=l>S,sizeChangerRender:M,pageSizeOptions:N,itemRender:A=Pre,jumpPrevIcon:k,jumpNextIcon:R,prevIcon:L,nextIcon:V}=e,_=f.useRef(null),[z,D]=Bt(u,c),[W,O]=Bt(a,s),B=Math.max(1,Math.min(W,fs(void 0,z,l))),[j,Y]=f.useState(B);f.useEffect(()=>{Y(B);},[B]);const q=Math.max(1,B-(b?3:5)),U=Math.min(fs(void 0,z,l),B+(b?3:5));function K(ae,ve){let de=ae||f.createElement("button",{type:"button","aria-label":ve,className:`${t}-item-link`});return typeof ae=="function"&&(de=f.createElement(ae,e)),de}function J(ae){const ve=ae.target.value,de=fs(void 0,z,l);let se;return ve===""?se=ve:Number.isNaN(Number(ve))?se=j:ve>=de?se=de:se=Number(ve),se}function Q(ae){return iE(ae)&&ae!==B&&iE(l)&&l>0}const G=l>z?g:false;function ee(ae){(ae.keyCode===_e.UP||ae.keyCode===_e.DOWN)&&ae.preventDefault();}function re(ae){const ve=J(ae);switch(ve!==j&&Y(ve),ae.keyCode){case _e.ENTER:Z(ve);break;case _e.UP:Z(ve-1);break;case _e.DOWN:Z(ve+1);break}}function oe(ae){Z(J(ae));}function be(ae){const ve=fs(ae,z,l),de=B>ve&&ve!==0?ve:B;D(ae),Y(de),C?.(B,ae),O(de),d?.(de,ae);}function Z(ae){if(Q(ae)&&!I){const ve=fs(void 0,z,l);let de=ae;return ae>ve?de=ve:ae<1&&(de=1),de!==j&&Y(de),O(de),d?.(de,z),de}return B}const te=B>1,ce=B<fs(void 0,z,l);function ue(){te&&Z(B-1);}function he(){ce&&Z(B+1);}function ye(){Z(q);}function pe(){Z(U);}function ie(ae,ve,...de){(ae.key==="Enter"||ae.charCode===_e.ENTER||ae.keyCode===_e.ENTER)&&ve(...de);}function ge(ae){ie(ae,ue);}function Se(ae){ie(ae,he);}function ke(ae){ie(ae,ye);}function qe(ae){ie(ae,pe);}function De(ae){const ve=A(ae,"prev",K(L,"prev page"));return f.isValidElement(ve)?f.cloneElement(ve,{disabled:!te}):ve}function ze(ae){const ve=A(ae,"next",K(V,"next page"));return f.isValidElement(ve)?f.cloneElement(ve,{disabled:!ce}):ve}function je(ae){(ae.type==="click"||ae.keyCode===_e.ENTER)&&Z(j);}let Le=null;const we=or(e,{aria:true,data:true}),Me=E&&f.createElement("li",{className:`${t}-total-text`},E(l,[l===0?0:(B-1)*z+1,B*z>l?l:B*z]));let Fe=null;const Re=fs(void 0,z,l);if(m&&l<=z)return null;const Pe=[],Qe={rootPrefixCls:t,onClick:Z,onKeyPress:ie,showTitle:y,itemRender:A,page:-1,className:o?.item,style:i?.item},mt=B-1>0?B-1:0,it=B+1<Re?B+1:Re,ct=g&&g.goButton,bt=typeof $=="object"?$.readOnly:!$;let pt=ct,rt=null;$&&(ct&&(typeof ct=="boolean"?pt=f.createElement("button",{type:"button",onClick:je,onKeyUp:je},x.jump_to_confirm):pt=f.createElement("span",{onClick:je,onKeyUp:je},ct),pt=f.createElement("li",{title:y?`${x.jump_to}${B}/${Re}`:null,className:`${t}-simple-pager`},pt)),rt=f.createElement("li",{title:y?`${B}/${Re}`:null,className:H(`${t}-simple-pager`,o?.item),style:i?.item},bt?j:f.createElement("input",{type:"text","aria-label":x.jump_to,value:j,disabled:I,onKeyDown:ee,onKeyUp:re,onChange:re,onBlur:oe,size:3}),f.createElement("span",{className:`${t}-slash`},"/"),Re));const et=b?1:2;if(Re<=3+et*2){Re||Pe.push(f.createElement(ec,Si({},Qe,{key:"noPager",page:1,className:`${t}-item-disabled`})));for(let ae=1;ae<=Re;ae+=1)Pe.push(f.createElement(ec,Si({},Qe,{key:ae,page:ae,active:B===ae})));}else {const ae=b?x.prev_3:x.prev_5,ve=b?x.next_3:x.next_5,de=A(q,"jump-prev",K(k,"prev page")),se=A(U,"jump-next",K(R,"next page"));h&&(Le=de?f.createElement("li",{title:y?ae:null,key:"prev",onClick:ye,tabIndex:0,onKeyDown:ke,className:H(`${t}-jump-prev`,{[`${t}-jump-prev-custom-icon`]:!!k})},de):null,Fe=se?f.createElement("li",{title:y?ve:null,key:"next",onClick:pe,tabIndex:0,onKeyDown:qe,className:H(`${t}-jump-next`,{[`${t}-jump-next-custom-icon`]:!!R})},se):null);let Ce=Math.max(1,B-et),fe=Math.min(B+et,Re);B-1<=et&&(fe=1+et*2),Re-B<=et&&(Ce=Re-et*2);for(let xe=Ce;xe<=fe;xe+=1)Pe.push(f.createElement(ec,Si({},Qe,{key:xe,page:xe,active:B===xe})));if(B-1>=et*2&&B!==3&&(Pe[0]=f.cloneElement(Pe[0],{className:H(`${t}-item-after-jump-prev`,Pe[0].props.className)}),Pe.unshift(Le)),Re-B>=et*2&&B!==Re-2){const xe=Pe[Pe.length-1];Pe[Pe.length-1]=f.cloneElement(xe,{className:H(`${t}-item-before-jump-next`,xe.props.className)}),Pe.push(Fe);}Ce!==1&&Pe.unshift(f.createElement(ec,Si({},Qe,{key:1,page:1}))),fe!==Re&&Pe.push(f.createElement(ec,Si({},Qe,{key:Re,page:Re})));}let Xe=De(mt);if(Xe){const ae=!te||!Re;Xe=f.createElement("li",{title:y?x.prev_page:null,onClick:ue,tabIndex:ae?null:0,onKeyDown:ge,className:H(`${t}-prev`,o?.item,{[`${t}-disabled`]:ae}),style:i?.item,"aria-disabled":ae},Xe);}let Ie=ze(it);if(Ie){let ae,ve;$?(ae=!ce,ve=te?0:null):(ae=!ce||!Re,ve=ae?null:0),Ie=f.createElement("li",{title:y?x.next_page:null,onClick:he,tabIndex:ve,onKeyDown:Se,className:H(`${t}-next`,o?.item,{[`${t}-disabled`]:ae}),style:i?.item,"aria-disabled":ae},Ie);}const Ne=H(t,r,{[`${t}-start`]:p==="start",[`${t}-center`]:p==="center",[`${t}-end`]:p==="end",[`${t}-simple`]:$,[`${t}-disabled`]:I});return f.createElement("ul",Si({className:Ne,style:w,ref:_},we),Me,Xe,$?rt:Pe,Ie,f.createElement(Ire,{locale:x,rootPrefixCls:t,disabled:I,selectPrefixCls:n,changeSize:be,pageSize:z,pageSizeOptions:N,quickGo:G?Z:null,goButton:pt,showSizeChanger:P,sizeChangerRender:M}))},T4=["xxl","xl","lg","md","sm","xs"],Mre=e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`}),Rre=e=>{const t=e,n=[].concat(T4).reverse();return n.forEach((r,o)=>{const i=r.toUpperCase(),s=`screen${i}Min`,a=`screen${i}`;if(!(t[s]<=t[a]))throw new Error(`${s}<=${a} fails : !(${t[s]}<=${t[a]})`);if(o<n.length-1){const l=`screen${i}Max`;if(!(t[a]<=t[l]))throw new Error(`${a}<=${l} fails : !(${t[a]}<=${t[l]})`);const u=`screen${n[o+1].toUpperCase()}Min`;if(!(t[l]<=t[u]))throw new Error(`${l}<=${u} fails : !(${t[l]}<=${t[u]})`)}}),e},Are=()=>{const[,e]=Tn(),t=Mre(Rre(e));return f.useMemo(()=>{const n=new Map;let r=-1,o={};return {responsiveMap:t,matchHandlers:{},dispatch(i){return o=i,n.forEach(s=>s(o)),n.size>=1},subscribe(i){return n.size||this.register(),r+=1,n.set(r,i),i(o),r},unsubscribe(i){n.delete(i),n.size||this.unregister();},register(){Object.entries(t).forEach(([i,s])=>{const a=({matches:c})=>{this.dispatch({...o,[i]:c});},l=window.matchMedia(s);typeof l?.addEventListener=="function"&&l.addEventListener("change",a),this.matchHandlers[s]={mql:l,listener:a},a(l);});},unregister(){Object.values(t).forEach(i=>{const s=this.matchHandlers[i];typeof s?.mql?.removeEventListener=="function"&&s.mql.removeEventListener("change",s?.listener);}),n.clear();}}},[t])};function O4(e=true,t={}){const n=f.useRef(t),[,r]=G3(),o=Are();return Kt(()=>{const i=o.subscribe(s=>{n.current=s,e&&r();});return ()=>o.unsubscribe(i)},[]),n.current}const Tre=e=>{const{componentCls:t}=e;return {[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-item`]:{cursor:"not-allowed",backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"},a:{color:e.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${t}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}}}},Ore=e=>{const{componentCls:t}=e;return {[`&${t}-mini ${t}-total-text, &${t}-mini ${t}-simple-pager`]:{height:e.itemSizeSM,lineHeight:X(e.itemSizeSM)},[`&${t}-mini ${t}-item`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:X(e.calc(e.itemSizeSM).sub(2).equal())},[`&${t}-mini ${t}-prev, &${t}-mini ${t}-next`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:X(e.itemSizeSM)},[`&${t}-mini:not(${t}-disabled)`]:{[`${t}-prev, ${t}-next`]:{[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover ${t}-item-link`]:{backgroundColor:"transparent"}}},[`
&${t}-mini ${t}-prev ${t}-item-link,
&${t}-mini ${t}-next ${t}-item-link
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:e.itemSizeSM,lineHeight:X(e.itemSizeSM)}},[`&${t}-mini ${t}-jump-prev, &${t}-mini ${t}-jump-next`]:{height:e.itemSizeSM,marginInlineEnd:0,lineHeight:X(e.itemSizeSM)},[`&${t}-mini ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:e.miniOptionsSizeChangerTop},"&-quick-jumper":{height:e.itemSizeSM,lineHeight:X(e.itemSizeSM),input:{...lC(e),width:e.paginationMiniQuickJumperInputWidth,height:e.controlHeightSM}}}}},Fre=e=>{const{componentCls:t}=e;return {[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{height:e.itemSize,lineHeight:X(e.itemSize),verticalAlign:"top",[`${t}-item-link`]:{height:e.itemSize,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:e.itemSize,lineHeight:X(e.itemSize)}}},[`${t}-simple-pager`]:{display:"inline-flex",alignItems:"center",height:e.itemSize,marginInlineEnd:e.marginXS,input:{boxSizing:"border-box",height:"100%",width:e.quickJumperInputWidth,padding:`0 ${X(e.paginationItemPaddingInline)}`,textAlign:"center",backgroundColor:e.itemInputBg,border:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,outline:"none",transition:`border-color ${e.motionDurationMid}`,color:"inherit","&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:`${X(e.inputOutlineOffset)} 0 ${X(e.controlOutlineWidth)} ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:"not-allowed"}}},[`&${t}-disabled`]:{[`${t}-prev, ${t}-next`]:{[`${t}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}},[`&${t}-mini`]:{[`${t}-prev, ${t}-next`]:{height:e.itemSizeSM,lineHeight:X(e.itemSizeSM),[`${t}-item-link`]:{height:e.itemSizeSM,"&::after":{height:e.itemSizeSM,lineHeight:X(e.itemSizeSM)}}},[`${t}-simple-pager`]:{height:e.itemSizeSM,input:{width:e.paginationMiniQuickJumperInputWidth}}}}}},Lre=e=>{const{componentCls:t}=e;return {[`${t}-jump-prev, ${t}-jump-next`]:{outline:0,[`${t}-item-container`]:{position:"relative",[`${t}-item-link-icon`]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:`all ${e.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${t}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:e.colorTextDisabled,letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:`all ${e.motionDurationMid}`}},"&:hover":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}}},[`
${t}-prev,
${t}-jump-prev,
${t}-jump-next
`]:{marginInlineEnd:e.marginXS},[`
${t}-prev,
${t}-next,
${t}-jump-prev,
${t}-jump-next
`]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,color:e.colorText,fontFamily:e.fontFamily,lineHeight:X(e.itemSize),textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:e.borderRadius,cursor:"pointer",transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{outline:0,button:{color:e.colorText,cursor:"pointer",userSelect:"none"},[`${t}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:e.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${X(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:"none",transition:`all ${e.motionDurationMid}`},[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:"transparent"}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:"inline-block",marginInlineStart:e.margin,verticalAlign:"middle","&-size-changer":{width:"auto"},"&-quick-jumper":{display:"inline-block",height:e.controlHeight,marginInlineStart:e.marginXS,lineHeight:X(e.controlHeight),verticalAlign:"top",input:{...Sp(e),...aC(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow}),"&[disabled]":{...wp(e)},width:e.quickJumperInputWidth,height:e.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:e.marginXS,marginInlineEnd:e.marginXS}}}}},Bre=e=>{const{componentCls:t}=e;return {[`${t}-item`]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,marginInlineEnd:e.marginXS,fontFamily:e.fontFamily,lineHeight:X(e.calc(e.itemSize).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:e.itemBg,border:`${X(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${X(e.paginationItemPaddingInline)}`,color:e.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},"&-active":{fontWeight:e.fontWeightStrong,backgroundColor:e.itemActiveBg,borderColor:e.colorPrimary,a:{color:e.itemActiveColor},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.itemActiveColorHover}}}}},kre=e=>{const{componentCls:t}=e;return {[t]:{...Lt(e),display:"flex","&-start":{justifyContent:"start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"end"},"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${t}-total-text`]:{display:"inline-block",height:e.itemSize,marginInlineEnd:e.marginXS,lineHeight:X(e.calc(e.itemSize).sub(2).equal()),verticalAlign:"middle"},...Bre(e),...Lre(e),...Fre(e),...Ore(e),...Tre(e),[`@media only screen and (max-width: ${e.screenLG}px)`]:{[`${t}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${e.screenSM}px)`]:{[`${t}-options`]:{display:"none"}}},[`&${e.componentCls}-rtl`]:{direction:"rtl"}}},Dre=e=>{const{componentCls:t}=e;return {[`${t}:not(${t}-disabled)`]:{[`${t}-item`]:{...Tr(e)},[`${t}-jump-prev, ${t}-jump-next`]:{"&:focus-visible":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0},...Bo(e)}},[`${t}-prev, ${t}-next`]:{[`&:focus-visible ${t}-item-link`]:Bo(e)}}}},F4=e=>({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemActiveBg:e.colorBgContainer,itemActiveColor:e.colorPrimary,itemActiveColorHover:e.colorPrimaryHover,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0,...Il(e)}),L4=e=>vt(e,{inputOutlineOffset:0,quickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.25).equal(),paginationMiniOptionsMarginInlineStart:e.calc(e.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:e.calc(e.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:e.calc(e.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:e.marginSM,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:"0.13em"},El(e)),zre=xt("Pagination",e=>{const t=L4(e);return [kre(t),Dre(t)]},F4),_re=e=>{const{componentCls:t}=e;return {[`${t}${t}-bordered${t}-disabled:not(${t}-mini)`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.itemActiveBgDisabled}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[`${t}${t}-bordered:not(${t}-mini)`]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.itemBg},[`${t}-item-link`]:{backgroundColor:e.itemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.itemBg,border:`${X(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},Hre=dl(["Pagination","bordered"],e=>{const t=L4(e);return _re(t)},F4);function sE(e){return f.useMemo(()=>typeof e=="boolean"?[e,{}]:e&&typeof e=="object"?[true,e]:[void 0,void 0],[e])}const Vre=e=>{const{align:t,prefixCls:n,selectPrefixCls:r,className:o,rootClassName:i,style:s,size:a,locale:l,responsive:c,showSizeChanger:u,selectComponentClass:d,pageSizeOptions:m,styles:p,classNames:h,...g}=e,{xs:b}=O4(c),[,y]=Tn(),{getPrefixCls:C,direction:x,showSizeChanger:w,className:S,style:I,classNames:$,styles:E}=St("pagination"),P=C("pagination",n),[M,N]=zre(P),A=Vn(a),k=A==="small"||!!(b&&!A&&c),R={...e,size:A},[L,V]=It([$,h],[E,p],{props:R}),[_]=ar("Pagination",V3),z={..._,...l},[D,W]=sE(u),[O,B]=sE(w),j=D??O,Y=W??B,q=d||is,U=f__namespace.useMemo(()=>m?m.map(re=>Number(re)):void 0,[m]),K=re=>{const{disabled:oe,size:be,onSizeChange:Z,"aria-label":te,className:ce,options:ue}=re,{className:he,onChange:ye}=Y||{},pe=ue.find(ie=>String(ie.value)===String(be))?.value;return f__namespace.createElement(q,{disabled:oe,showSearch:true,popupMatchSelectWidth:false,getPopupContainer:ie=>ie.parentNode,"aria-label":te,options:ue,...Y,value:pe,onChange:(ie,ge)=>{Z?.(ie),ye?.(ie,ge);},size:k?"small":"middle",className:H(ce,he)})},J=f__namespace.useMemo(()=>{const re=f__namespace.createElement("span",{className:`${P}-item-ellipsis`},"•••"),oe=f__namespace.createElement("button",{className:`${P}-item-link`,type:"button",tabIndex:-1},x==="rtl"?f__namespace.createElement(Ya,null):f__namespace.createElement(Jc,null)),be=f__namespace.createElement("button",{className:`${P}-item-link`,type:"button",tabIndex:-1},x==="rtl"?f__namespace.createElement(Jc,null):f__namespace.createElement(Ya,null)),Z=f__namespace.createElement("a",{className:`${P}-item-link`},f__namespace.createElement("div",{className:`${P}-item-container`},x==="rtl"?f__namespace.createElement(g2,{className:`${P}-item-link-icon`}):f__namespace.createElement(h2,{className:`${P}-item-link-icon`}),re)),te=f__namespace.createElement("a",{className:`${P}-item-link`},f__namespace.createElement("div",{className:`${P}-item-container`},x==="rtl"?f__namespace.createElement(h2,{className:`${P}-item-link-icon`}):f__namespace.createElement(g2,{className:`${P}-item-link-icon`}),re));return {prevIcon:oe,nextIcon:be,jumpPrevIcon:Z,jumpNextIcon:te}},[x,P]),Q=C("select",r),G=H({[`${P}-${t}`]:!!t,[`${P}-mini`]:k,[`${P}-rtl`]:x==="rtl",[`${P}-bordered`]:y.wireframe},S,o,i,L.root,M,N),ee={...V.root,...I,...s};return f__namespace.createElement(f__namespace.Fragment,null,y.wireframe&&f__namespace.createElement(Hre,{prefixCls:P}),f__namespace.createElement(Nre,{...J,...g,styles:V,classNames:L,style:ee,prefixCls:P,selectPrefixCls:Q,className:G,locale:z,pageSizeOptions:U,showSizeChanger:j,sizeChangerRender:K}))},jre=e=>{const{prefixCls:t,classNames:n,styles:r,renderedText:o,renderedEl:i,item:s,checked:a,disabled:l,onClick:c,onRemove:u,showRemove:d}=e,m=H(`${t}-content-item`,n.item,{[`${t}-content-item-disabled`]:l||s.disabled,[`${t}-content-item-checked`]:a&&!s.disabled});let p;(typeof o=="string"||typeof o=="number")&&(p=String(o));const[h]=ar("Transfer",po.Transfer),g={className:m,style:r.item,title:p},b=f__namespace.createElement("span",{className:H(`${t}-content-item-text`,n.itemContent),style:r.itemContent},i);return d?f__namespace.createElement("li",{...g},b,f__namespace.createElement("button",{type:"button",disabled:l||s.disabled,className:`${t}-content-item-remove`,"aria-label":h?.remove,onClick:()=>u?.(s)},f__namespace.createElement(LQ,null))):(g.onClick=l||s.disabled?void 0:y=>c(s,y),f__namespace.createElement("li",{...g},f__namespace.createElement(Jr,{className:H(`${t}-checkbox`,n.itemIcon),style:r.itemIcon,checked:a,disabled:l||s.disabled}),b))},Wre=f__namespace.memo(jre),qre=["handleFilter","handleClear","checkedKeys"],Ure=e=>({...{simple:true,showSizeChanger:false,showLessItems:false},...e}),Gre=(e,t)=>{const{prefixCls:n,classNames:r,styles:o,filteredRenderItems:i,selectedKeys:s,disabled:a,showRemove:l,pagination:c,onScroll:u,onItemSelect:d,onItemRemove:m}=e,[p,h]=f__namespace.useState(1),g=f__namespace.useMemo(()=>c?Ure(typeof c=="object"?c:{}):null,[c]),[b,y]=Bt(10,g?.pageSize);f__namespace.useEffect(()=>{if(g){const E=Math.ceil(i.length/b);h(Math.min(p,E));}},[i,g,b]);const C=(E,P)=>{d(E.key,!s.includes(E.key),P);},x=E=>{m?.([E.key]);},w=E=>{h(E);},S=(E,P)=>{h(E),y(P);},I=f__namespace.useMemo(()=>g?i.slice((p-1)*b,p*b):i,[p,i,g,b]);f__namespace.useImperativeHandle(t,()=>({items:I}));const $=g?f__namespace.createElement(Vre,{size:"small",disabled:a,simple:g.simple,pageSize:b,showLessItems:g.showLessItems,showSizeChanger:g.showSizeChanger,className:`${n}-pagination`,total:i.length,current:p,onChange:w,onShowSizeChange:S}):null;return f__namespace.createElement(f__namespace.Fragment,null,f__namespace.createElement("ul",{className:H(`${n}-content`,r.list,{[`${n}-content-show-remove`]:l}),style:o.list,onScroll:u},(I||[]).map(({renderedEl:E,renderedText:P,item:M})=>f__namespace.createElement(Wre,{key:M.key,prefixCls:n,classNames:r,styles:o,item:M,renderedText:P,renderedEl:E,showRemove:l,onClick:C,onRemove:x,checked:s.includes(M.key),disabled:a||M.disabled}))),$)},Kre=f__namespace.forwardRef(Gre),Xre=()=>null;function Yre(e){return !!(e&&!f.isValidElement(e)&&Object.prototype.toString.call(e)==="[object Object]")}function tc(e){return e.filter(t=>!t.disabled).map(t=>t.key)}const Qre=e=>e!==void 0,Zre=e=>e&&typeof e=="object"?{...e,defaultValue:e.defaultValue||""}:{defaultValue:"",placeholder:""},y0=e=>{const{prefixCls:t,style:n,classNames:r,styles:o,dataSource:i=[],titleText:s="",checkedKeys:a,disabled:l,showSearch:c=false,searchPlaceholder:u,notFoundContent:d,selectAll:m,deselectAll:p,selectCurrent:h,selectInvert:g,removeAll:b,removeCurrent:y,showSelectAll:C=true,showRemove:x,pagination:w,direction:S,itemsUnit:I,itemUnit:$,selectAllLabel:E,selectionsIcon:P,footer:M,renderList:N,onItemSelectAll:A,onItemRemove:k,handleFilter:R,handleClear:L,filterOption:V,render:_=Xre}=e,z=`${t}-section`,D=`${t}-list`,W=Zre(c),[O,B]=f.useState(W.defaultValue),j=f.useRef({}),Y=ie=>{B(ie.target.value),R(ie);},q=()=>{B(""),L();},U=(ie,ge)=>typeof V=="function"?V(O,ge,S):ie.includes(O),K=ie=>{let ge=N?N({...ie,onItemSelect:(ke,qe)=>ie.onItemSelect(ke,qe)}):null;const Se=!!ge;return Se||(ge=f.createElement(Kre,{ref:j,...ie,prefixCls:D})),{customize:Se,bodyContent:ge}},J=ie=>{const ge=_(ie),Se=Yre(ge);return {item:ie,renderedEl:Se?ge.label:ge,renderedText:Se?ge.value:ge}},Q=f.useMemo(()=>Array.isArray(d)?d[S==="left"?0:1]:d,[d,S]),[G,ee]=f.useMemo(()=>{const ie=[],ge=[];return i.forEach(Se=>{const ke=J(Se);O&&!U(ke.renderedText,Se)||(ie.push(Se),ge.push(ke));}),[ie,ge]},[i,O]),re=f.useMemo(()=>G.filter(ie=>a.includes(ie.key)&&!ie.disabled),[a,G]),oe=f.useMemo(()=>{if(re.length===0)return "none";const ie=xm(a);return G.every(ge=>ie.has(ge.key)||!!ge.disabled)?"all":"part"},[re.length,a,G]),be=()=>{const ie=c?f.createElement("div",{className:`${D}-body-search-wrapper`},f.createElement(A4,{prefixCls:`${D}-search`,onChange:Y,handleClear:q,placeholder:W.placeholder||u,value:O,disabled:l})):null,{customize:ge,bodyContent:Se}=K({...Zt(e,qre),filteredItems:G,filteredRenderItems:ee,selectedKeys:a,classNames:r,styles:o});let ke;return ge?ke=f.createElement("div",{className:`${D}-body-customize-wrapper`},Se):ke=G.length?Se:f.createElement("div",{className:`${D}-body-not-found`},Q),f.createElement("div",{className:H(`${D}-body`,{[`${D}-body-with-search`]:c},r.body),style:o.body},ie,ke)},Z=f.createElement(Jr,{disabled:i.filter(ie=>!ie.disabled).length===0||l,checked:oe==="all",indeterminate:oe==="part",className:`${D}-checkbox`,onChange:()=>{A?.(G.filter(ie=>!ie.disabled).map(({key:ie})=>ie),oe!=="all");}}),te=(ie,ge)=>{if(E)return typeof E=="function"?E({selectedCount:ie,totalCount:ge}):E;const Se=ge>1?I:$;return f.createElement(f.Fragment,null,(ie>0?`${ie}/`:"")+ge," ",Se)},ce=M&&(M.length<2?M(e):M(e,{direction:S})),ue=ce?f.createElement("div",{className:H(`${D}-footer`,r.footer),style:o.footer},ce):null,he=!x&&!w&&Z;let ye;x?ye=[w?{key:"removeCurrent",label:y,onClick(){const ie=tc((j.current?.items||[]).map(ge=>ge.item));k?.(ie);}}:null,{key:"removeAll",label:b,onClick(){k?.(tc(G));}}].filter(Boolean):ye=[{key:"selectAll",label:oe==="all"?p:m,onClick(){const ie=tc(G);A?.(ie,ie.length!==a.length);}},w?{key:"selectCurrent",label:h,onClick(){const ie=j.current?.items||[];A?.(tc(ie.map(ge=>ge.item)),true);}}:null,{key:"selectInvert",label:g,onClick(){const ie=tc((j.current?.items||[]).map(ke=>ke.item)),ge=new Set(a),Se=new Set(ge);ie.forEach(ke=>{ge.has(ke)?Se.delete(ke):Se.add(ke);}),A?.(Array.from(Se),"replace");}}];const pe=f.createElement(ts,{className:`${D}-header-dropdown`,menu:{items:ye},disabled:l},Qre(P)?P:f.createElement(rC,null));return f.createElement("div",{className:H(z,r.section,{[`${z}-with-pagination`]:!!w,[`${z}-with-footer`]:!!ce}),style:{...n,...o.section}},f.createElement("div",{className:H(`${D}-header`,r.header),style:o.header},C?f.createElement(f.Fragment,null,he,pe):null,f.createElement("span",{className:`${D}-header-selected`},te(re.length,G.length)),f.createElement("span",{className:H(`${D}-header-title`,r.title),style:o.title},s)),be(),ue)},Jre=e=>{const{antCls:t,componentCls:n,listHeight:r,controlHeightLG:o}=e,i=`${t}-table`,s=`${t}-input`;return {[`${n}-customize-list`]:{[`${n}-section`]:{flex:"1 1 50%",width:"auto",height:"auto",minHeight:r,minWidth:0},[`${i}-wrapper`]:{[`${i}-small`]:{border:0,borderRadius:0,[`${i}-selection-column`]:{width:o,minWidth:o}},[`${i}-pagination${i}-pagination`]:{margin:0,padding:e.paddingXS}},[`${s}[disabled]`]:{backgroundColor:"transparent"}}}},aE=(e,t)=>{const{componentCls:n,colorBorder:r}=e;return {[`${n}-section`]:{borderColor:t,[`${n}-list-search:not([disabled])`]:{borderColor:r}}}},eoe=e=>{const{componentCls:t}=e;return {[`${t}-status-error`]:{...aE(e,e.colorError)},[`${t}-status-warning`]:{...aE(e,e.colorWarning)}}},toe=e=>{const{componentCls:t,colorBorder:n,colorSplit:r,lineWidth:o,itemHeight:i,headerHeight:s,transferHeaderVerticalPadding:a,itemPaddingBlock:l,controlItemBgActive:c,colorTextDisabled:u,colorTextSecondary:d,listHeight:m,listWidth:p,listWidthLG:h,fontSizeIcon:g,marginXS:b,paddingSM:y,lineType:C,antCls:x,iconCls:w,motionDurationSlow:S,controlItemBgHover:I,borderRadiusLG:$,colorBgContainer:E,colorText:P,controlItemBgActiveHover:M}=e,N=X(e.calc($).sub(o).equal());return {display:"flex",flexDirection:"column",width:p,height:m,border:`${X(o)} ${C} ${n}`,borderRadius:e.borderRadiusLG,"&-with-pagination":{width:h,height:"auto"},[`${t}-list`]:{"&-search":{[`${w}-search`]:{color:u}},"&-header":{display:"flex",flex:"none",alignItems:"center",height:s,padding:`${X(e.calc(a).sub(o).equal())} ${X(y)} ${X(a)}`,color:P,background:E,borderBottom:`${X(o)} ${C} ${r}`,borderRadius:`${X($)} ${X($)} 0 0`,"> *:not(:last-child)":{marginInlineEnd:4},"> *":{flex:"none"},"&-title":{...Lo,flex:"0 1 auto",textAlign:"end",marginInlineStart:"auto"},"&-dropdown":{...Gs(),fontSize:g,transform:"translateY(10%)",cursor:"pointer","&[disabled]":{cursor:"not-allowed"}}},"&-body":{display:"flex",flex:"auto",flexDirection:"column",fontSize:e.fontSize,minHeight:0,"&-search-wrapper":{position:"relative",flex:"none",padding:y}},"&-content":{flex:"auto",margin:0,padding:0,overflow:"auto",listStyle:"none",borderRadius:`0 0 ${N} ${N}`,"&-item":{display:"flex",alignItems:"center",minHeight:i,padding:`${X(l)} ${X(y)}`,transition:`all ${S}`,"> *:not(:last-child)":{marginInlineEnd:b},"> *":{flex:"none"},"&-text":{...Lo,flex:"auto"},"&-remove":{...sL(e),color:n,"&:hover, &:focus":{color:d}},[`&:not(${t}-list-content-item-disabled)`]:{"&:hover":{backgroundColor:I,cursor:"pointer"},[`&${t}-list-content-item-checked:hover`]:{backgroundColor:M}},"&-checked":{backgroundColor:c},"&-disabled":{color:u,cursor:"not-allowed"}},[`&-show-remove ${t}-list-content-item:not(${t}-list-content-item-disabled):hover`]:{background:"transparent",cursor:"default"}},"&-pagination":{padding:e.paddingXS,textAlign:"end",borderTop:`${X(o)} ${C} ${r}`,[`${x}-pagination-options`]:{paddingInlineEnd:e.paddingXS}},"&-body-not-found":{flex:"none",width:"100%",margin:"auto 0",color:u,textAlign:"center"},"&-footer":{borderTop:`${X(o)} ${C} ${r}`},"&-checkbox":{lineHeight:1}}}},noe=e=>{const{antCls:t,iconCls:n,componentCls:r,marginXS:o,marginXXS:i,fontSizeIcon:s,colorBgContainerDisabled:a}=e;return {[r]:{...Lt(e),position:"relative",display:"flex",alignItems:"stretch",[`${r}-disabled`]:{[`${r}-section`]:{background:a}},[`${r}-section`]:toe(e),[`${r}-actions`]:{display:"flex",flex:"none",flexDirection:"column",alignSelf:"center",margin:`0 ${X(o)}`,verticalAlign:"middle",gap:i,[`${t}-btn ${n}`]:{fontSize:s}}}}},roe=e=>{const{componentCls:t}=e;return {[`${t}-rtl`]:{direction:"rtl"}}},ooe=e=>{const{fontSize:t,lineHeight:n,controlHeight:r,controlHeightLG:o,lineWidth:i}=e,s=Math.round(t*n);return {listWidth:180,listHeight:200,listWidthLG:250,headerHeight:o,itemHeight:r,itemPaddingBlock:(r-s)/2,transferHeaderVerticalPadding:Math.ceil((o-i-s)/2)}},ioe=xt("Transfer",e=>{const t=vt(e);return [noe(t),Jre(t),eoe(t),roe(t)]},ooe),Tp=e=>{const{prefixCls:t,className:n,rootClassName:r,classNames:o,styles:i,style:s,listStyle:a,operationStyle:l,operations:c,actions:u,dataSource:d,targetKeys:m=[],selectedKeys:p,selectAllLabels:h=[],locale:g={},titles:b,disabled:y,showSearch:C=false,showSelectAll:x,oneWay:w,pagination:S,status:I,selectionsIcon:$,filterOption:E,render:P,footer:M,children:N,rowKey:A,onScroll:k,onChange:R,onSearch:L,onSelectChange:V}=e,{getPrefixCls:_,renderEmpty:z,direction:D,className:W,style:O,classNames:B,styles:j,selectionsIcon:Y}=St("transfer"),q=f.useContext(zn),U=y??q,K={...e,disabled:U},J=_("transfer",t),[Q,G]=ioe(J),ee=u||c||[],[re,oe,be]=xre(d,A,m),[Z,te,ce,ue]=Sre(oe,be,p),[he,ye]=kx(me=>me.key),[pe,ie]=kx(me=>me.key),ge=f.useCallback((me,Ae)=>{if(me==="left"){const Ge=typeof Ae=="function"?Ae(Z||[]):Ae;ce(Ge);}else {const Ge=typeof Ae=="function"?Ae(te||[]):Ae;ue(Ge);}},[Z,te]),Se=(me,Ae)=>{(me==="left"?ye:ie)(Ae);},ke=f.useCallback((me,Ae)=>{me==="left"?V?.(Ae,te):V?.(Z,Ae);},[Z,te]),qe=me=>b??me.titles??[],De=me=>{k?.("left",me);},ze=me=>{k?.("right",me);},je=me=>{const Ae=me==="right"?Z:te,Ge=yre(re),ut=Ae.filter(hn=>!Ge.has(hn)),Pt=xm(ut),qt=me==="right"?ut.concat(m):m.filter(hn=>!Pt.has(hn)),Xt=me==="right"?"left":"right";ge(Xt,[]),ke(Xt,[]),R?.(qt,me,ut);},Le=()=>{je("left"),Se("left",null);},we=()=>{je("right"),Se("right",null);},Me=(me,Ae,Ge)=>{ge(me,ut=>{let Pt=[];if(Ge==="replace")Pt=Ae;else if(Ge)Pt=Array.from(new Set([].concat(Et(ut),Et(Ae))));else {const qt=xm(Ae);Pt=ut.filter(Xt=>!qt.has(Xt));}return ke(me,Pt),Pt}),Se(me,null);},Fe=(me,Ae)=>{Me("left",me,Ae);},Re=(me,Ae)=>{Me("right",me,Ae);},Pe=me=>L?.("left",me.target.value),Qe=me=>L?.("right",me.target.value),mt=()=>L?.("left",""),it=()=>L?.("right",""),ct=(me,Ae,Ge,ut,Pt)=>{Ae.has(Ge)&&(Ae.delete(Ge),Se(me,null)),ut&&(Ae.add(Ge),Se(me,Pt));},bt=(me,Ae,Ge,ut)=>{(me==="left"?he:pe)(ut,Ae,Ge);},pt=(me,Ae,Ge,ut)=>{const Pt=me==="left",qt=Et(Pt?Z:te),Xt=new Set(qt),hn=Et(Pt?oe:be).filter(pi=>!pi?.disabled),Br=hn.findIndex(pi=>pi.key===Ae);ut&&qt.length>0?bt(me,hn,Xt,Br):ct(me,Xt,Ae,Ge,Br);const Vo=Array.from(Xt);ke(me,Vo),e.selectedKeys||ge(me,Vo);},rt=(me,Ae,Ge)=>{pt("left",me,Ae,Ge?.shiftKey);},et=(me,Ae,Ge)=>{pt("right",me,Ae,Ge?.shiftKey);},Xe=me=>{ge("right",[]),R?.(m.filter(Ae=>!me.includes(Ae)),"left",Et(me));},Ie=me=>typeof a=="function"?a({direction:me}):a||{},Ne=f.useContext(Zn),{hasFeedback:ae,status:ve}=Ne,de=me=>({...me,notFoundContent:z?.("Transfer")||f.createElement(X5,{componentName:"Transfer"}),...g}),se=gl(ve,I),Ce=!N&&S,fe=be.filter(me=>te.includes(me.key)&&!me.disabled).length>0,xe=oe.filter(me=>Z.includes(me.key)&&!me.disabled).length>0,[Oe,We]=It([B,o],[j,i],{props:K}),Ze=H(J,{[`${J}-disabled`]:U,[`${J}-customize-list`]:!!N,[`${J}-rtl`]:D==="rtl"},Gi(J,se,ae),W,n,r,Q,G,Oe.root),[st]=ar("Transfer",po.Transfer),Ct=de(st),[an,On]=qe(Ct),Rt=$??Y;return f.createElement("div",{className:Ze,style:{...O,...We.root,...s}},f.createElement(y0,{prefixCls:J,style:Ie("left"),classNames:Oe,styles:We,titleText:an,dataSource:oe,filterOption:E,checkedKeys:Z,handleFilter:Pe,handleClear:mt,onItemSelect:rt,onItemSelectAll:Fe,render:P,showSearch:C,renderList:N,footer:M,onScroll:De,disabled:U,direction:D==="rtl"?"right":"left",showSelectAll:x,selectAllLabel:h[0],pagination:Ce,selectionsIcon:Rt,...Ct}),f.createElement(R4,{className:H(`${J}-actions`,Oe.actions),rightActive:xe,moveToRight:we,leftActive:fe,actions:ee,moveToLeft:Le,style:{...l,...We.actions},disabled:U,direction:D,oneWay:w}),f.createElement(y0,{prefixCls:J,style:Ie("right"),classNames:Oe,styles:We,titleText:On,dataSource:be,filterOption:E,checkedKeys:te,handleFilter:Qe,handleClear:it,onItemSelect:et,onItemSelectAll:Re,onItemRemove:Xe,render:P,showSearch:C,renderList:N,footer:M,onScroll:ze,disabled:U,direction:D==="rtl"?"left":"right",showSelectAll:x,selectAllLabel:h[1],showRemove:w,pagination:Ce,selectionsIcon:Rt,...Ct}))};Tp.List=y0;Tp.Search=A4;Tp.Operation=R4;var B4=function(e){return function(t,n,r){return e(t,n,r)*r}},C0=function(e,t){if(e)throw Error("Invalid sort config: "+t)},k4=function(e){var t=e||{},n=t.asc,r=t.desc,o=n?1:-1,i=n||r;C0(!i,"Expected `asc` or `desc` property"),C0(n&&r,"Ambiguous object with `asc` and `desc` config properties");var s=e.comparer&&B4(e.comparer);return {order:o,sortBy:i,comparer:s}},soe=function(e){return function t(n,r,o,i,s,a,l){var c,u;if(typeof n=="string")c=a[n],u=l[n];else if(typeof n=="function")c=n(a),u=n(l);else {var d=k4(n);return t(d.sortBy,r,o,d.order,d.comparer||e,a,l)}var m=s(c,u,i);return (m===0||c==null&&u==null)&&r.length>o?t(r[o],r,o+1,i,s,a,l):m}};function D4(e,t,n){if(e===void 0||e===true)return function(i,s){return t(i,s,n)};if(typeof e=="string")return C0(e.includes("."),"String syntax not allowed for nested properties."),function(i,s){return t(i[e],s[e],n)};if(typeof e=="function")return function(i,s){return t(e(i),e(s),n)};if(Array.isArray(e)){var r=soe(t);return function(i,s){return r(e[0],e,1,n,t,i,s)}}var o=k4(e);return D4(o.sortBy,o.comparer||t,o.order)}var Ng=function(e,t,n,r){var o;return Array.isArray(t)?(Array.isArray(n)&&n.length<2&&(o=n,n=o[0]),t.sort(D4(n,r,e))):t};function z4(e){var t=B4(e.comparer);return function(n){var r=Array.isArray(n)&&!e.inPlaceSorting?n.slice():n;return {asc:function(o){return Ng(1,r,o,t)},desc:function(o){return Ng(-1,r,o,t)},by:function(o){return Ng(1,r,o,t)}}}}var _4=function(e,t,n){return e==null?n:t==null?-n:typeof e!=typeof t?typeof e<typeof t?-1:1:e<t?-1:e>t?1:0},H4=z4({comparer:_4});z4({comparer:_4,inPlaceSorting:true});function x0(e,t,n){if(t.length!==n.length)throw new Error("props & orders length not match");const r=t.map((o,i)=>{const s=n[i];return s==="asc"?{asc:o}:s==="desc"?{desc:o}:{asc:o,comparer:s}});return H4(e).by(r)}function V4(e,t){const n=t.map(({order:r,prop:o})=>r==="asc"?{asc:o}:r==="desc"?{desc:o}:{asc:o,comparer:r});return H4(e).by(n)}const Qt=tn({multiSelecting:false,selectedIdSet:xn(),shiftMultiSelectAnchorUniqId:void 0});function aoe(){const{multiSelecting:e}=nt(Qt);return e}function loe(e){const{multiSelecting:t,selectedIdSet:n}=nt(Qt);return t&&!!e&&n.has(e)}const wm=[];function si(){return wm.at(-1)?.items??[]}function coe(e){const t=wm.at(-1);t&&(t.items=e);}function uoe(){ir(()=>(wm.push({items:[]}),()=>{wm.pop();}));}function Op(){const{multiSelecting:e,selectedIdSet:t}=Qt;return e?si().filter(n=>t.has(n.uniqId)):[]}function doe(){return Op().map(id)}function TC(){const{multiSelecting:e}=Qt;let t=e?Op():si();return e&&!t.length&&(t=si()),t.map(id)}function OC(){const t=TC().map(n=>n.bvid).join(" ");Is(t);}function FC(e){let{bvid:t,authorName:n,pubts:r,title:o}=e;const i=rn.unix(r??0).format("YYYY-MM-DD");return o=o.replaceAll(/\n+/g," "),`${t} ;; [${n}] ${i} ${o}`}function LC(){const t=TC().map(FC).join(`
`);Is(t);}function foe(){const t=doe().map(n=>{let r=n.href;if(r)return r.startsWith("/")&&(r=new URL(r,location.href).href),r}).filter(Boolean).join(`
`);Is(t);}function moe(e,t){const{multiSelecting:n,selectedIdSet:r}=Qt;if(!n||!e||!t||e===t)return;const o=si(),i=o.findIndex(m=>m.uniqId===e),s=o.findIndex(m=>m.uniqId===t),a=m=>m>=0&&m<=o.length-1;if(!a(i)||!a(s))return;const l=[i,s],[c,u]=x0(l,[m=>m],["asc"]),d=r.has(e);for(let m=c;m<=u;m++){const p=si()[m].uniqId;d?r.add(p):r.delete(p);}}const poe=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 16 16",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"currentColor",d:"M2 10h3a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1m9-9h3a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-3a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1m0 9a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1zm0-10a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h3a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zM2 9a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h3a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2zm7 2a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2h-3a2 2 0 0 1-2-2zM0 2a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2zm5.354.854a.5.5 0 1 0-.708-.708L3 3.793l-.646-.647a.5.5 0 1 0-.708.708l1 1a.5.5 0 0 0 .708 0z"})]}),hoe=f.forwardRef(poe),goe=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 16 16",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"currentColor",d:"M9.854 5.854a.5.5 0 0 0-.708-.708L6.5 7.793L5.354 6.646a.5.5 0 1 0-.708.708l1.5 1.5a.5.5 0 0 0 .708 0zM2 4.5A2.5 2.5 0 0 1 4.5 2h5A2.5 2.5 0 0 1 12 4.5v5A2.5 2.5 0 0 1 9.5 12h-5A2.5 2.5 0 0 1 2 9.5zM4.5 3A1.5 1.5 0 0 0 3 4.5v5A1.5 1.5 0 0 0 4.5 11h5A1.5 1.5 0 0 0 11 9.5v-5A1.5 1.5 0 0 0 9.5 3zM7 14a2.5 2.5 0 0 1-2-1h4.5A3.5 3.5 0 0 0 13 9.5V4c.607.456 1 1.182 1 2v3.5A4.5 4.5 0 0 1 9.5 14z"})]}),boe=f.forwardRef(goe),voe=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"currentColor",d:"M6.99 11L3 15l3.99 4v-3H14v-2H6.99zM21 9l-3.99-4v3H10v2h7.01v3z"})]}),yoe=f.forwardRef(voe),Coe=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 512 512",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M320 176v-40a40 40 0 0 0-40-40H88a40 40 0 0 0-40 40v240a40 40 0 0 0 40 40h192a40 40 0 0 0 40-40v-40m64-160l80 80l-80 80m-193-80h273"})]}),xoe=f.forwardRef(Coe);function j4({iconOnly:e,addCopyActions:t=false}){const{multiSelecting:n}=nt(Qt),r=Sl(),o=Ve(()=>{Qt.multiSelecting||(Qt.shiftMultiSelectAnchorUniqId=void 0,Ue.multiSelect.clearWhenExit&&Qt.selectedIdSet.clear());}),i=F(Je,{type:n?"primary":"default",className:H(e?"icon-only-round-button":"inline-flex-center"),onClick:()=>{Qt.multiSelecting=!Qt.multiSelecting,o();},children:[v(hoe,{className:"size-12px"}),!e&&F($e,{children:["多选",Qt.multiSelecting?"中":""]})]}),s=a=>v(ko,{styles:{container:{border:`1px solid ${r}`}},content:F("div",{className:"max-w-288px",children:[F("div",{className:"flex flex-wrap items-center gap-x-15px gap-y-2px",children:[F(Je,{className:"inline-flex items-center",onClick:()=>Qt.selectedIdSet.clear(),children:[v(fp,{className:"size-18px"}),"清空"]}),F(Je,{className:"inline-flex items-center",onClick:()=>{const l=si().map(c=>c.uniqId);Qt.selectedIdSet=xn(l);},children:[v(boe,{className:"size-18px"}),"全选"]}),F(Je,{className:"inline-flex items-center",onClick:()=>{const l=si().filter(c=>!Qt.selectedIdSet.has(c.uniqId)).map(c=>c.uniqId);Qt.selectedIdSet=xn(l);},children:[v(yoe,{className:"size-18px"}),"反选"]}),v("div",{className:"flex-basis-100%"}),F(Je,{className:"inline-flex items-center",onClick:()=>{Qt.multiSelecting=false,o();},children:[v(xoe,{className:"size-18px"}),"退出"]}),v(at,{configPath:"multiSelect.clearWhenExit",label:"退出时清空",tooltip:"退出多选时, 清空所有已选择项"})]}),t&&F($e,{children:[v(tl,{variant:"solid",className:"my-7px"}),v("div",{className:"flex flex-wrap gap-x-10px gap-y-5px",children:v(W4,{})})]})]}),children:a});return n?s(i):e?v(Jt,{title:"多选",arrow:false,children:i}):i}function W4(){const{__internalEnableCopyBvidInfo:e}=Mt();return F($e,{children:[F(Je,{onClick:OC,className:"inline-flex-center",children:[v(Es,{})," 复制 BVID"]}),e&&F(Je,{onClick:LC,className:"inline-flex-center",children:[v(Es,{})," 复制 BVID 信息"]})]})}function Fp(){const{__internalAddCopyBvidButton:e}=Mt();return e?F($e,{children:[v(j4,{iconOnly:false}),v(W4,{})]}):null}function q4(e){return e.replace(/([A-Z])/,"999999$1").replace(/([a-z])/,"999998$1")}function U4(e,t){return e.localeCompare(t,"zh-CN")}function lE(e,t){return V4(e,[{prop:n=>{const r=typeof t=="function"?t(n):n[t];return q4(r)},order:U4}])}const G4={overscrollBehavior:"contain",maxHeight:"60vh",overflowY:"scroll",scrollbarWidth:"thin",paddingRight:"12px"},woe=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 5h.01M3 12h.01M3 19h.01M8 5h13M8 12h13M8 19h13"})]}),Soe=f.forwardRef(woe),$oe=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[v("rect",{width:8,height:5,x:14,y:17,rx:1}),v("path",{d:"M10 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v2.5"}),v("path",{d:"M20 17v-2a2 2 0 1 0-4 0v2"})]})]}),Eoe=f.forwardRef($oe),Ioe=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"})]}),Poe=f.forwardRef(Ioe),Noe=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 512 512",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"m434.8 137.65l-149.36-68.1c-16.19-7.4-42.69-7.4-58.88 0L77.3 137.65c-17.6 8-17.6 21.09 0 29.09l148 67.5c16.89 7.7 44.69 7.7 61.58 0l148-67.5c17.52-8 17.52-21.1-.08-29.09M160 308.52l-82.7 37.11c-17.6 8-17.6 21.1 0 29.1l148 67.5c16.89 7.69 44.69 7.69 61.58 0l148-67.5c17.6-8 17.6-21.1 0-29.1l-79.94-38.47"}),v("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"m160 204.48l-82.8 37.16c-17.6 8-17.6 21.1 0 29.1l148 67.49c16.89 7.7 44.69 7.7 61.58 0l148-67.49c17.7-8 17.7-21.1.1-29.1L352 204.48"})]}),Moe=f.forwardRef(Noe),K4=Soe,BC=Eoe,kC=Poe,Lp=Moe;function X4(e){const{folders:t,collections:n,selectedKey:r}=nt(kt),o=jn();return {menuItems:f.useMemo(()=>{const s=[],a=BT(n,c=>c.upper.name);let l=Object.entries(a).map(([c,u])=>({upName:c,collections:lE(u,"title")}));l=lE(l,"upName");for(const{upName:c,collections:u}of l){const d=u[0]?.upper.mid,m=d?Bu(d):"#";s.push(...Ur([{type:"group",label:F("span",{className:"flex items-center gap-x-2px",children:[v(bo,{className:"mt-2px size-15px flex-none"}),F("a",{target:"_blank",href:m,children:["@",c]})]}),children:u.map(p=>{const h=`fav-collection:${p.id}`,g=F("span",{className:"ml-8px flex items-center gap-x-2px",children:[v(Lp,{className:"size-15px flex-none"}),p.title," (",p.media_count,")"]});return {key:h,label:g,title:`${p.title} (${p.media_count})`,async onClick(){kt.selectedFavFolderId=void 0,kt.selectedFavCollectionId=p.id,e?.(),await _t(100),o();}}})}]));}return Ur([{key:"all",icon:v(K4,{}),label:"全部",async onClick(){kt.selectedFavFolderId=void 0,kt.selectedFavCollectionId=void 0,e?.(),await _t(100),o();}},!!t.length&&{type:"group",label:"收藏夹",children:t.map(c=>{MR(c.attr);const u=dC(c.attr),d=`fav-folder:${c.id}`,m=u?v(BC,{}):v(kC,{}),p=`${c.title} (${c.media_count})`;return {key:d,icon:m,label:p,async onClick(){kt.selectedFavFolderId=c.id,kt.selectedFavCollectionId=void 0,e?.(),await _t(100),o();}}})},!!n.length&&{type:"group",label:"合集",children:s}])},[t,n]),selectedKey:r}}function Roe({extraContent:e}){const{fav:t,enableSidebar:n}=Mt(),{selectedFavFolder:r,selectedFavCollection:o,selectedLabel:i,selectedKey:s}=nt(kt),a=jn(),{ref:l,getPopupContainer:c}=Ys();ir(()=>{hC();}),Wi(()=>{(async()=>(await _t(100),a()))();},[t.addSeparator]);const[u,d]=f.useState(false),{menuItems:m}=X4(()=>{d(false);}),p="relative top-[-0.5px] size-15px",h=r?dC(r.attr)?v(BC,{className:p}):v(kC,{className:p}):o?v(Lp,{className:p}):v(K4,{className:p}),g=i,b=v(ts,{open:u,onOpenChange:d,placement:"bottomLeft",getPopupContainer:c,menu:{items:m,style:{...G4,border:`1px solid ${Sl()}`},selectedKeys:[s]},children:v(Je,{css:[u&&wl,"",""],children:F("span",{className:"h-full flex items-center gap-x-4px",children:[h,g]})})});return F("div",{ref:l,className:"flex items-center gap-x-10px",children:[!n&&b,e,v(Fp,{})]})}function Aoe({allFavFolderServices:e,state:t}){const{fav:n}=Mt(),r=jn(),{ref:o,getPopupContainer:i}=Ys(),{totalCountInFavFolders:s}=nt(t),[a,l]=f.useState(false),c=Ve((m,p,h)=>{l(true),Ue.fav.excludedFolderIds=m.map(g=>g.toString());}),u=f.useMemo(()=>e.filter(m=>!n.excludedFolderIds.includes(m.entry.id.toString())).length,[e,n.excludedFolderIds]),d=Ve(m=>{m?l(false):a&&r();});return v(ko,{getTooltipContainer:i,trigger:"click",placement:"bottom",onOpenChange:d,getPopupContainer:m=>m.parentElement||document.body,content:v($e,{children:v(Tp,{dataSource:e,rowKey:m=>m.entry.id.toString(),titles:["收藏夹","忽略"],targetKeys:n.excludedFolderIds,onChange:c,render:m=>m.entry.title,oneWay:true,style:{marginBottom:10}})}),children:F(Ir,{ref:o,color:"success",className:"mx-0 cursor-pointer text-size-12px",children:["收藏夹(",u,") 收藏(",s,")"]})})}function Toe(){const{menuItems:e,selectedKey:t}=X4(),{menuRef:n}=r5(e,t);return v(es,{ref:n,items:e,selectedKeys:[t],mode:"inline",inlineIndent:10})}var No=(e=>(e[e.Offline=0]="Offline",e[e.Streaming=1]="Streaming",e[e.Rolling=2]="Rolling",e))(No||{});class DC extends Map{#n=0;#e=new Map;#t=new Map;#o;#s;#i;constructor(t={}){if(super(),!(t.maxSize&&t.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if(typeof t.maxAge=="number"&&t.maxAge===0)throw new TypeError("`maxAge` must be a number greater than 0");this.#o=t.maxSize,this.#s=t.maxAge||Number.POSITIVE_INFINITY,this.#i=t.onEviction;}get __oldCache(){return this.#t}#a(t){if(typeof this.#i=="function")for(const[n,r]of t)this.#i(n,r.value);}#r(t,n){return typeof n.expiry=="number"&&n.expiry<=Date.now()?(typeof this.#i=="function"&&this.#i(t,n.value),this.delete(t)):false}#f(t,n){if(this.#r(t,n)===false)return n.value}#c(t,n){return n.expiry?this.#f(t,n):n.value}#u(t,n){const r=n.get(t);return this.#c(t,r)}#d(t,n){this.#e.set(t,n),this.#n++,this.#n>=this.#o&&(this.#n=0,this.#a(this.#t),this.#t=this.#e,this.#e=new Map);}#m(t,n){this.#t.delete(t),this.#d(t,n);}*#l(){for(const t of this.#t){const[n,r]=t;this.#e.has(n)||this.#r(n,r)===false&&(yield t);}for(const t of this.#e){const[n,r]=t;this.#r(n,r)===false&&(yield t);}}get(t){if(this.#e.has(t)){const n=this.#e.get(t);return this.#c(t,n)}if(this.#t.has(t)){const n=this.#t.get(t);if(this.#r(t,n)===false)return this.#m(t,n),n.value}}set(t,n,{maxAge:r=this.#s}={}){const o=typeof r=="number"&&r!==Number.POSITIVE_INFINITY?Date.now()+r:void 0;return this.#e.has(t)?this.#e.set(t,{value:n,expiry:o}):this.#d(t,{value:n,expiry:o}),this}has(t){return this.#e.has(t)?!this.#r(t,this.#e.get(t)):this.#t.has(t)?!this.#r(t,this.#t.get(t)):false}peek(t){if(this.#e.has(t))return this.#u(t,this.#e);if(this.#t.has(t))return this.#u(t,this.#t)}expiresIn(t){const n=this.#e.get(t)??this.#t.get(t);if(n)return n.expiry?n.expiry-Date.now():Number.POSITIVE_INFINITY}delete(t){const n=this.#e.delete(t);return n&&this.#n--,this.#t.delete(t)||n}clear(){this.#e.clear(),this.#t.clear(),this.#n=0;}resize(t){if(!(t&&t>0))throw new TypeError("`maxSize` must be a number greater than 0");const n=[...this.#l()],r=n.length-t;r<0?(this.#e=new Map(n),this.#t=new Map,this.#n=n.length):(r>0&&this.#a(n.slice(0,r)),this.#t=new Map(n.slice(r)),this.#e=new Map,this.#n=0),this.#o=t;}evict(t=1){const n=Number(t);if(!n||n<=0)return;const r=[...this.#l()],o=Math.trunc(Math.min(n,Math.max(r.length-1,0)));o<=0||(this.#a(r.slice(0,o)),this.#t=new Map(r.slice(o)),this.#e=new Map,this.#n=0);}*keys(){for(const[t]of this)yield t;}*values(){for(const[,t]of this)yield t;}*[Symbol.iterator](){for(const t of this.#e){const[n,r]=t;this.#r(n,r)===false&&(yield [n,r.value]);}for(const t of this.#t){const[n,r]=t;this.#e.has(n)||this.#r(n,r)===false&&(yield [n,r.value]);}}*entriesDescending(){let t=[...this.#e];for(let n=t.length-1;n>=0;--n){const r=t[n],[o,i]=r;this.#r(o,i)===false&&(yield [o,i.value]);}t=[...this.#t];for(let n=t.length-1;n>=0;--n){const r=t[n],[o,i]=r;this.#e.has(o)||this.#r(o,i)===false&&(yield [o,i.value]);}}*entriesAscending(){for(const[t,n]of this.#l())yield [t,n.value];}get size(){if(!this.#n)return this.#t.size;let t=0;for(const n of this.#t.keys())this.#e.has(n)||t++;return Math.min(this.#n+t,this.#o)}get maxSize(){return this.#o}get maxAge(){return this.#s}entries(){return this.entriesAscending()}forEach(t,n=this){for(const[r,o]of this.entriesAscending())t.call(n,o,r,this);}get[Symbol.toStringTag](){return "QuickLRU"}toString(){return `QuickLRU(${this.size}/${this.maxSize})`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}const Ooe=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 8V6a2 2 0 0 1 2-2h2M4 16v2a2 2 0 0 0 2 2h2m8-16h2a2 2 0 0 1 2 2v2m-4 12h2a2 2 0 0 0 2-2v-2M9 10h.01M15 10h.01M9.5 15.05a3.5 3.5 0 0 1 5 0"})]}),Foe=f.forwardRef(Ooe);function Loe(e){return e instanceof Error&&e.name==="AxiosError"}function jd(e){return e&&v("p",{className:"mt-10px",children:e})}function Y4(e){if(!(e instanceof Error))return jd(JSON.stringify(e));let t,n,r;if(e.stack?t=F($e,{children:["Error Stack: ",v("br",{}),e.stack]}):t=F($e,{children:["Error Message: ",e.message]}),e.cause&&(n=F($e,{children:["Error Cause: ",Y4(e.cause)]})),Loe(e)){const o=_a(e);o.config?.params?.access_key&&(o.config.params.access_key="*".repeat(o.config.params.access_key.length)),r=F($e,{children:["axios config: ",JSON.stringify(o.config,null,2)]});}return F($e,{children:[jd(t),jd(n),jd(r)]})}function Boe(e){return e&&e instanceof Q4&&e.message?e.message:"出错了, 请刷新重试!"}class Q4 extends Error{constructor(t){super(t),this.name="ShowMessageError";}}function koe({err:e,tab:t}){const n=hp(),r=f.useMemo(()=>Boe(e),[e]),o=f.useMemo(()=>Y4(e),[e]);return F("div",{className:"p-20px text-center text-size-20px",children:[v(Jt,{title:F("div",{className:"py-10px",children:[v("h3",{children:"错误详情"}),v("div",{className:"max-h-50vh overflow-hidden overflow-y-auto whitespace-pre-wrap break-normal",children:o})]}),children:F("p",{className:"flex cursor-pointer items-center justify-center",children:[v(Foe,{className:"mr-4px"}),r]})}),t===Be.Hot&&mr.subtab===vn.PopularWeekly&&F("p",{className:"mt-8px flex items-center justify-center",children:["可能需手动输入验证码",v(bo,{className:"ml-12px"}),v("a",{href:"https://www.bilibili.com/v/popular/weekly",target:n,className:"ml-2px",children:"每周必看"})]})]})}function Z4(e){const t=e==="follow"?1:2;return async function(r){return await $4(r,t)}}const Doe=Z4("follow"),zoe=Z4("unfollow"),_oe={follow:Doe,unfollow:zoe};function Hoe(e){return [1,2,6].includes(e.attribute)}async function Voe(e){return (await Tt.get("/x/relation",{params:{fid:e}})).data.data}const joe=Qy(Voe,{cacheKey:([e])=>e.toString()});function Woe(e){return !!(e.elec_arc_type===1||!e.elec_arc_type&&e.is_charging_arc||e.elec_arc_type===2)}function qoe(){const{searchText:e,filterText:t}=nt(oo,{sync:true}),{allowedOrders:n,usingOrder:r}=nt(oo),{spaceUpload:{useSyncFilterTextFromSearchText:o}}=Mt(),i=jn(),s=Ve(()=>{a();const{searchText:l,filterText:c}=oo,u=location.href,d=new URL(u);l?d.searchParams.set(Qo.SearchText,l):d.searchParams.delete(Qo.SearchText),c?d.searchParams.set(Qo.FilterText,c):d.searchParams.delete(Qo.FilterText),d.href!==u&&history.replaceState({},"",d.href);}),a=Ve(()=>{Ue.spaceUpload.useSyncFilterTextFromSearchText&&(oo.filterText=oo.searchText);});return ir(s),F("div",{className:"flex items-center gap-x-10px",children:[v(fC,{value:r,list:n,listDisplayConfig:Tne,onChange:l=>{oo.order=l,i();}}),v(yo.Search,{style:{width:200},placeholder:"搜索词",allowClear:true,value:e,onChange:l=>oo.searchText=l.target.value,onSearch:l=>{oo.searchText=l,s(),i();}}),v(yo.Search,{style:{width:200},placeholder:"本地过滤词",allowClear:true,value:t,addonBefore:v(Jt,{title:v($e,{children:"精准搜索: 自动将搜索词同步到过滤词"}),children:v(at,{className:"[&>.ant-checkbox-label]:hidden",configPath:"spaceUpload.useSyncFilterTextFromSearchText",extraAction:l=>{l&&(s(),i());}})}),disabled:o,onChange:l=>oo.filterText=l.target.value,onSearch:l=>{oo.filterText=l,s(),i();}}),v(at,{configPath:"spaceUpload.showVol",label:"显示序号",className:"flex-none"}),v(Fp,{})]})}const J4=new DC({maxSize:100}),Sm=xn();async function Uoe(e){if(Sm.has(e))return;const t=await joe(e);Hoe(t)&&Sm.add(e);}function eA(){const e=Qn(oo);return {mids:e.mids,groupId:e.groupId,order:e.usingOrder,searchText:e.searchText,filterText:e.filterText,initialPage:eE?Number(eE):void 0}}class zC extends ns{constructor(t){if(super(zC.PAGE_SIZE),this.config=t,Object.assign(this,t),this.mids=t.mids,this.order=t.order,Ai(this.mids.length||this.groupId,"mid & groupId can not both be empty"),this.searchText=this.searchText?.trim(),this.initialPage&&(this.groupId||this.mids.length>1))throw new Error("initialPage not supported when merging")}static PAGE_SIZE=20;mids;groupId;order;searchText;filterText;initialPage;sidebarView=void 0;tabbarView=v(qoe,{});get hasMoreExceptQueue(){return this.isAnonymous?false:this.service?this.service.hasMore:true}async fetchAvatars(t){await Promise.all(t.map(async n=>{const r=await bC(n);r&&J4.set(n,r.face);}));}async fetchFollowState(t){await Ui(t,Uoe,3);}pageTitleSet=false;async setPageTitle(){if(this.pageTitleSet)return;const t=[];this.searchText&&t.push(`🔍【${this.searchText}】`),this.filterText&&t.push(`⏳【${this.filterText}】`);let n;if(this.mids.length)n=(await Ui(this.mids,Ju,3)).map(i=>i?.trim()).filter(Boolean).map(i=>`「${i}」`).join("、");else {const i=(await S6()).find(s=>s.tagid===this.groupId)?.name||"";n=i?`「${i}」`:"";}const r=[t.join(""),`${n}的投稿`].map(o=>o.trim()).filter(Boolean).join(" - ");Zy(r),this.pageTitleSet=true;}singleUpService;mergeTimelineService;async setupServices(){if(!(this.singleUpService||this.mergeTimelineService)){if(this.mids.length===1){this.singleUpService=new tA(this.mids[0],this.order,this.searchText,this.initialPage);return}if(this.mids.length){this.mergeTimelineService=new cE(this.mids,this.order,this.searchText);return}if(this.groupId){const t=await Gb(this.groupId);t.forEach(n=>Sm.add(n)),this.mergeTimelineService=new cE(t.map(n=>n.toString()),this.order,this.searchText);return}}}get service(){return this.singleUpService||this.mergeTimelineService}isAnonymous=false;warnNeedLoginOnce=wu(()=>{zR();});async fetchMore(t){if(!m6())throw this.isAnonymous=true,this.warnNeedLoginOnce(),new Q4(DR);this.setPageTitle(),await this.setupServices(),Ai(this.service,"no service available after setupServices");const n=await this.service.loadMore(t)||[],r=this.singleUpService?this.singleUpService.endVol:this.mergeTimelineService.count-this.qs.fetchedCount;let o=n.map((i,s)=>({...i,api:Ee.SpaceUpload,uniqId:`${Ee.SpaceUpload}-${i.bvid}`,vol:r-s,page:this.singleUpService?this.singleUpService.page-1:void 0}));if(o=o.filter(i=>!Woe(i)),this.filterText){const{includes:i,excludes:s}=kR(this.filterText);o=o.filter(a=>i.every(l=>a.title.includes(l))&&s.every(l=>!a.title.includes(l)));}{const i=D0(o.filter(s=>s.author.trim()!=="账号已注销")).map(s=>s.mid).filter(Boolean);await Promise.all([this.fetchAvatars(i),this.fetchFollowState(i)]);}return o}}class cE{constructor(t,n,r){this.mids=t,this.order=n,this.searchText=r,Ai(this.mids.length===1||this.mids.length>1&&this.order!==Yo.Fav,"SpaceUploadItem.Fav not supported when merging"),this.singleUpServices=t.map(o=>new tA(o,this.order,this.searchText));}singleUpServices;get hasMore(){return this.singleUpServices.some(t=>t.hasMore)}get count(){return this.singleUpServices.reduce((t,n)=>t+n.count,0)}async refillQueues(t){await Ui(this.singleUpServices,n=>n.refillQueue(1,t),5);}async loadMore(t){if(!this.hasMore)return;if(this.mids.length===1)return this.singleUpServices[0].loadMore(t);const n=[],r=10;for(;this.hasMore&&n.length<r;){await this.refillQueues(t);const o=this.singleUpServices.filter(a=>a.bufferQueue.length>0),i=Xo(o.map(a=>{const l=a.bufferQueue[0],c={[Yo.Latest]:l.created,[Yo.View]:l.play,[Yo.Fav]:l.play}[this.order];return {service:a,item:l,valueForSort:c}}),["valueForSort"],["desc"]).map(a=>a.service)[0];if(!i)break;const s=i.bufferQueue[0];i.bufferQueue=i.bufferQueue.slice(1),n.push(s);}return n}}class tA{constructor(t,n,r,o){this.mid=t,this.order=n,this.searchText=r,this.initialPage=o,this.page=this.initialPage??1;}bufferQueue=[];hasMoreForApi=true;count=0;endVol=0;get hasMore(){return !!this.bufferQueue.length||this.hasMoreForApi}async refillQueue(t,n){if(this.hasMore)for(;!n?.aborted&&this.hasMoreForApi&&this.bufferQueue.length<t;){const r=await this.loadMore(n)||[];this.bufferQueue.push(...r);}}page;async loadMore(t){const{items:n,hasMore:r,count:o,endVol:i}=await Lne({mid:this.mid,order:this.order,pagenum:this.page,keyword:this.searchText||""});return this.hasMoreForApi=r,this.page++,this.count=o,this.endVol=i,n}}const uE=e=>(e||"").replace(/^http:\/\//,"https://"),_C=" · ";function nA(e,t){if(rl(e))return t[Ee.AppRecommend](e);if(Rp(e))return t[Ee.PcRecommend](e);if(Cm(e))return t[Ee.DynamicFeed](e);if(Ap(e))return t[Ee.Watchlater](e);if(Ds(e))return t[Ee.Fav](e);if(Hne(e))return t[Ee.PopularGeneral](e);if(Vne(e))return t[Ee.PopularWeekly](e);if(MC(e))return t[Ee.Rank](e);if(hu(e))return t[Ee.Live](e);if(RC(e))return t[Ee.SpaceUpload](e);throw new Error("unknown api type")}function id(e){const t=nA(e,{[Ee.AppRecommend]:Goe,[Ee.PcRecommend]:Xoe,[Ee.DynamicFeed]:Yoe,[Ee.Watchlater]:Qoe,[Ee.Fav]:Zoe,[Ee.PopularGeneral]:Joe,[Ee.PopularWeekly]:eie,[Ee.Rank]:tie,[Ee.Live]:nie,[Ee.SpaceUpload]:rie});return t.authorFace&&(t.authorFace=uE(t.authorFace)),t.cover=uE(t.cover),t}function Goe(e){return Koe(e)}function Koe(e){const t=b=>{const{cover_left_text_1:y,cover_left_text_2:C,cover_left_text_3:x}=e,w=[y,C,x].filter(Boolean);if(b==="play"){const S=w.find($=>/观看|播放$/.test($));if(!S)return;const I=S.replace(/观看|播放$/,"");return Rc(I)}if(b==="danmaku"){const S=w.find($=>$.endsWith("弹幕"));if(!S)return;const I=S.replace(/弹幕$/,"");return Rc(I)}if(b==="bangumi:follow"){const S=w.find($=>/追[剧番]$/.test($));if(!S)return;const I=S.replace(/追[剧番]$/,"");return Rc(I)}},n=e.param,r=e.bvid||M4.av2bv(Number(e.param)),o=e.player_args?.cid,i=(()=>{if(e.uri.startsWith("http://")||e.uri.startsWith("https://"))return e.uri;if(e.goto==="av")return `/video/${r}/`;if(e.goto==="bangumi")return Yr("bangumi uri should not starts with 'bilibili://': %s",e.uri),e.uri;if(e.goto==="picture"){const b=/^bilibili:\/\/article\/(\d+)$/.exec(e.uri)?.[1];return b?`/read/cv${b}`:e.uri}return e.uri})(),s=t("play"),a=void 0,l=void 0,c=t("danmaku"),u=void 0,d=t("bangumi:follow"),m=[{field:"play",value:s},typeof c=="number"?{field:"danmaku",value:c}:{field:"bangumi:follow",value:d}],p=e.desc||"",[h=void 0,g=void 0]=p.split(_C);return {avid:n,bvid:r,cid:o,goto:e.goto,href:i,title:e.title,cover:e.cover,pubts:void 0,pubdateDisplay:g,duration:e.player_args?.duration||0,durationStr:ss(e.player_args?.duration),recommendReason:e.bottom_rcmd_reason||e.top_rcmd_reason,play:s,like:a,coin:l,danmaku:c,favorite:u,bangumiFollow:d,statItems:m,authorName:e.args.up_name||h,authorFace:e.avatar.cover,authorMid:String(e.args.up_id||""),appBadge:e.cover_badge,appBadgeDesc:e.desc}}function Xoe(e){e.goto,Li.AV;const t=e.goto===Li.Live;return {avid:t?void 0:String(e.id),bvid:t?void 0:e.bvid,cid:t?void 0:e.cid,goto:e.goto,href:e.goto==="av"?`/video/${e.bvid}/`:e.uri,title:e.title,cover:e.pic,pubts:e.pubdate,duration:e.duration,durationStr:ss(e.duration),recommendReason:t?e.room_info?.area.area_name:e.rcmd_reason?.content,play:e.stat?.view,like:e.stat?.like,coin:void 0,danmaku:e.stat?.danmaku,favorite:void 0,statItems:t?[{field:"live:viewed-by",value:e.room_info?.watched_show.num}]:[{field:"play",value:e.stat?.view},{field:"danmaku",value:e.stat?.danmaku}],authorName:e.owner?.name,authorFace:e.owner?.face,authorMid:String(e.owner?.mid)}}function Yoe(e){const t=e.modules.module_dynamic.major.archive,n=e.modules.module_author;return {avid:t.aid,bvid:t.bvid,goto:"av",href:`/video/${t.bvid}/`,title:t.title,cover:t.cover,pubts:n.pub_ts,duration:AC(t.duration_text)||0,durationStr:t.duration_text,recommendReason:t.badge.text===Mo.Upload?t.badge.text:void 0,dynBadge:t.badge,statItems:[{field:"play",value:t.stat.play},{field:"danmaku",value:t.stat.danmaku}],play:Rc(t.stat.play),danmaku:Rc(t.stat.danmaku),authorName:n.name,authorFace:n.face,authorMid:n.mid.toString()}}function Qoe(e){const t=lre(e.state),n=e.progress>0,r=`${n?"【已观看】· ":""}${e.title}`,o=t?v(Jt,{title:F($e,{children:["视频已失效, 原因: ",t]}),align:{offset:[0,-5]},placement:"topLeft",children:F("del",{children:[n?"【已观看】· ":"",e.title,"`"]})}):void 0,{watchlaterUseNormalVideoUrl:i,watchlaterItemsOrder:s}=Yu(),a=(()=>{if(i)return `https://www.bilibili.com/video/${e.bvid}/`;let l=`https://www.bilibili.com/list/watchlater?bvid=${e.bvid}&oid=${e.aid}`;return s===hr.AddTimeAsc&&(l+="&desc=0"),l})();return {avid:String(e.aid),bvid:e.bvid,cid:e.cid,goto:"av",href:a,title:r,titleRender:o,cover:e.pic,pubts:e.pubdate,pubdateDisplayForTitleAttr:`${Sf(e.pubdate,true)} 发布, ${Sf(e.add_at,true)} 添加稍后再看`,duration:e.duration,durationStr:ss(e.duration),recommendReason:`${Sf(e.add_at)} · 稍后再看`,statItems:[{field:"play",value:e.stat.view},{field:"like",value:e.stat.like},{field:"favorite",value:e.stat.favorite}],play:e.stat.view,like:e.stat.like,danmaku:e.stat.danmaku,authorName:e.owner.name,authorFace:e.owner.face,authorMid:String(e.owner.mid)}}function Zoe(e){const t=e.from==="fav-folder"?e.folder.title:e.collection.title,n={display:"inline-block",verticalAlign:"middle",marginRight:4,marginTop:-2},r="[&_path]:fill-gate-primary",o=e.from==="fav-folder"?dC(e.folder.attr)?v(BC,{className:H("size-15px",r),style:n}):v(kC,{className:H("size-15px",r),style:n}):v(Lp,{className:H("size-15px",r),style:n});return {avid:String(e.id),bvid:e.bvid,goto:"av",href:`/video/${e.bvid}/`,title:`【${t}】· ${e.title}`,titleRender:F($e,{children:["【",o,t,"】· ",e.title]}),cover:e.cover,pubts:e.pubtime,duration:e.duration,durationStr:ss(e.duration),recommendReason:e.from==="fav-folder"?`${Sf(e.fav_time)} · 收藏`:void 0,play:e.cnt_info.play,danmaku:e.cnt_info.danmaku,favorite:e.cnt_info.collect,statItems:[{field:"play",value:e.cnt_info.play},{field:"danmaku",value:e.cnt_info.danmaku},{field:"favorite",value:e.cnt_info.collect}],authorName:e.upper.name,authorFace:e.upper.face,authorMid:String(e.upper.mid)}}function Joe(e){return {avid:String(e.aid),bvid:e.bvid,cid:e.cid,goto:"av",href:`/video/${e.bvid}/`,title:e.title,cover:e.pic,pubts:e.pubdate,duration:e.duration,durationStr:ss(e.duration),recommendReason:e.rcmd_reason?.content,play:e.stat.view,like:e.stat.like,coin:void 0,danmaku:e.stat.danmaku,favorite:void 0,statItems:[{field:"play",value:e.stat.view},{field:"like",value:e.stat.like}],authorName:e.owner.name,authorFace:e.owner.face,authorMid:String(e.owner.mid)}}function eie(e){return {avid:String(e.aid),bvid:e.bvid,cid:e.cid,goto:"av",href:`/video/${e.bvid}/`,title:e.title,cover:e.pic,pubts:e.pubdate,duration:e.duration,durationStr:ss(e.duration),recommendReason:e.rcmd_reason,play:e.stat.view,like:e.stat.like,danmaku:e.stat.danmaku,statItems:[{field:"play",value:e.stat.view},{field:"like",value:e.stat.like}],authorName:e.owner.name,authorFace:e.owner.face,authorMid:String(e.owner.mid)}}function tie(e){if(xV(e)||CV(e)){const n=e.new_ep.cover,r=e.new_ep.index_show;return {avid:"",bvid:"",goto:"bangumi",href:e.url,title:e.title,cover:n,pubts:void 0,pubdateDisplay:void 0,duration:0,durationStr:"",play:e.stat.view,like:e.stat.follow,danmaku:e.stat.danmaku,statItems:[{field:"play",value:e.stat.view},{field:"bangumi:follow",value:e.stat.follow}],rankingDesc:r}}let t=(e.dynamic||e.desc)?.trim();return t==="-"&&(t=void 0),t&&e.title.includes(t)&&(t=void 0),{avid:String(e.aid),bvid:e.bvid,cid:e.cid,goto:"av",href:`/video/${e.bvid}/`,title:e.title,cover:e.pic,pubts:e.pubdate,duration:e.duration,durationStr:ss(e.duration),recommendReason:t,play:e.stat.view,like:e.stat.like,danmaku:e.stat.danmaku,statItems:[{field:"play",value:e.stat.view},{field:"like",value:e.stat.like}],authorName:e.owner.name,authorFace:e.owner.face,authorMid:String(e.owner.mid)}}function nie(e){const t=`${e.area_name_v2}`,n=e.live_status===No.Streaming?"":`${_C}${r(e.record_live_time)} 直播过`;function r(o){const i=rn().format("YYYYMMDD"),s=rn().subtract(1,"day").format("YYYYMMDD"),a=rn.unix(o);return a.format("YYYYMMDD")===i?a.format("HH:mm"):a.format("YYYYMMDD")===s?`昨天 ${a.format("HH:mm")}`:a.format("MM-DD HH:mm")}return {goto:"live",href:`https://live.bilibili.com/${e.roomid}`,title:e.title,cover:e.room_cover,recommendReason:t,liveExtraDesc:n,statItems:[{field:"live:viewed-by",value:e.text_small}],authorName:e.uname,authorFace:e.face,authorMid:String(e.uid)}}function rie(e){const t=AC(e.length),n=ss(t);let r=e.description?.trim();return r==="-"&&(r=void 0),r&&e.title.includes(r)&&(r=void 0),{avid:e.aid.toString(),bvid:e.bvid,cid:void 0,goto:"av",href:`/video/${e.bvid}/`,title:e.title,cover:e.pic,pubts:e.created,duration:t,durationStr:n,recommendReason:r,play:e.play,like:void 0,coin:void 0,danmaku:e.video_review,favorite:void 0,statItems:[{field:"play",value:e.play},{field:"danmaku",value:e.video_review}],authorName:e.author,authorFace:J4.get(e.mid),authorMid:e.mid.toString(),followed:Sm.has(e.mid)}}const Wo=Hn.extend("modules:filter");function HC(e){return !!e&&["已关注","新关注"].includes(e)}function rA(e){return !!(e===Be.KeepFollowOnly||[Be.AppRecommend,Be.PcRecommend,Be.Hot].includes(e)&&(gu.size||Ue.filter.enabled&&(Ue.filter.byAuthor.enabled&&Ue.filter.byAuthor.keywords.length||Ue.filter.byTitle.enabled&&Ue.filter.byTitle.keywords.length))||(e===Be.AppRecommend||e===Be.PcRecommend)&&Ue.filter.enabled)}function oA(e){return [Ee.AppRecommend,Ee.PcRecommend,Ee.Rank,Ee.PopularGeneral,Ee.PopularWeekly].includes(e)}function w0(e,t){if(!rA(t))return e;const n=Yu().filter,{minDuration:r,minPlayCount:o,minDanmakuCount:i,byAuthor:s,byTitle:a}=n,{blockUpMids:l,blockUpNames:c}=WR(s.keywords),{titleKeywordList:u,titleRegexList:d}=VJ(a.keywords);return e.filter(m=>{if(m.api===Ee.Separator)return true;const{play:p,duration:h,danmaku:g,recommendReason:b,goto:y,authorName:C,authorMid:x,title:w,bvid:S,href:I}=id(m),$=HC(b);if(t==="keep-follow-only"&&!$)return false;function E(){if(x&&gu.size&&gu.has(x))return Wo("filter out by blacklist-rule: %s %o",x,{bvid:S,title:w}),false;if(n.enabled&&s.enabled&&(l.size||c.size)&&(C||x)&&(C&&c.has(C)||x&&l.has(x)))return Wo("filter out by author-rule: %o",{authorName:C,authorMid:x,rules:s.keywords,blockUpMids:l,blockUpNames:c,bvid:S,title:w}),false;let A=[w];if(m.api===Ee.Rank&&m1(m)&&m.desc&&A.push(m.desc),A=A.filter(Boolean),n.enabled&&a.enabled&&a.keywords.length&&A.length){const k=R=>u.some(L=>R.includes(L))||d.some(L=>L.test(R));if(A.some(k))return Wo("filter out by title-rule: %o",{possibleTitles:A,rules:a.keywords,bvid:S}),false}}if(oA(m.api)&&E()===false)return false;if((m.api===Ee.AppRecommend||m.api===Ee.PcRecommend)&&n.enabled){const A=y==="av",k=y==="picture",R=y==="bangumi";if(A)return P();if(k)return M();if(R)return N()}function P(){return $&&n.exemptForFollowed.video?true:b==="关注了你"?(Wo("filter out by recommendReason-rule: %s %o",b,{bvid:S,title:w}),false):r.enabled&&r.value&&h&&h<r.value?(Wo("filter out by min-duration-rule: %s < %s %o",h,r.value,{bvid:S,title:w}),false):o.enabled&&o.value&&typeof p=="number"&&p<o.value?(Wo("filter out by min-play-count-rule: %s < %s, %o",p,o.value,{bvid:S,title:w}),false):i.enabled&&i.value&&typeof g=="number"&&g<i.value?(Wo("filter out by min-danmaku-count-rule: %s < %s, %o",g,i.value,{bvid:S,title:w}),false):true}function M(){return n.hideGotoTypePicture?$&&n.exemptForFollowed.picture?true:(Wo("filter out by goto-type-picture-rule: %s %o",y,{bvid:S,title:w}),false):true}function N(){return n.hideGotoTypeBangumi?(Wo("filter out by goto-type-bangumi-rule: %s %o",y,{title:w,href:I}),false):true}return true})}async function oie(e){return (await Tt.get("https://api.live.bilibili.com/xlive/web-ucenter/user/following",{params:{page:e,page_size:sd.PAGE_SIZE,ignoreRecord:1,hit_ab:true}})).data}class sd extends ns{constructor(t=false){super(sd.PAGE_SIZE),this.streamingOnly=t;}static PAGE_SIZE=20;tabbarView=void 0;sidebarView=void 0;hasMoreExceptQueue=true;separatorAdded=false;liveCount=-1;page=1;totalPage=1/0;async fetchMore(t){if(this.page>this.totalPage){this.hasMoreExceptQueue=false;return}const n=await oie(this.page);cn(n)||(zt(n.message||al),this.hasMoreExceptQueue=false),this.page++;const{count:r,live_count:o,totalPage:i}=n.data;this.totalPage=i,this.liveCount=o;const s=n.data.list.map(u=>({...u,api:Ee.Live,uniqId:`${Ee.Live}-${u.roomid}`})),a=s.at(-1),l=rn().subtract(2,"weeks").unix();if(a){const u=a.live_status,d=a.record_live_time;u!==No.Streaming&&d&&d<l&&(this.hasMoreExceptQueue=false);}let c=s;if(!this.streamingOnly&&!this.separatorAdded&&s.some(u=>u.live_status!==No.Streaming)){this.separatorAdded=true;const u=s.findIndex(d=>d.live_status!==No.Streaming);c.splice(u,0,{api:Ee.Separator,uniqId:"live-separator-recent",content:"最近直播过"});}return this.streamingOnly&&s.some(u=>u.live_status!==No.Streaming)&&(this.hasMoreExceptQueue=false,c=s.filter(u=>u.live_status===No.Streaming)),c}}async function ad({offset:e,page:t,upMid:n,abortSignal:r}){const o={timezone_offset:"-480",type:"video",platform:"web",features:"itemOpusStyle",web_location:"0.0","x-bili-device-req-json":JSON.stringify({platform:"web",device:"pc"}),"x-bili-web-req-json":JSON.stringify({spm_id:"0.0"}),page:t};e&&(o.offset=e);const i="/x/polymer/web-dynamic/v1/feed/all";n&&(o.host_mid=n);const a=(await Tt.get(i,{signal:r,params:o})).data;if(!cn(a)){const c=a.message||al;throw zt(c),new Error(c,{cause:a})}const l=a.data;return l?.items?.length&&(l.items=l.items.filter(c=>c.type==="DYNAMIC_TYPE_AV")),l}const $m=Cl("dynamic-feed-items"),ld=Cl("dynamic-feed-items-info");async function Bp(e){return !!(await ld.get(e))?.count}function iie(e,t){const n=s=>`update-search-cache-${s}`,o=_s((s,a)=>{Qa.info({icon:v(P1,{className:"size-16px"}),key:n(e),title:"搜索缓存更新中...",description:`「${t}」更新中: Page(${s}) Total(${a})`,duration:false});},200);return {notifyOnProgress:o,notifyOnSuccess:()=>{o.flush(),Qa.success({key:n(e),title:"缓存更新成功",description:`「${t}」的搜索缓存更新成功`,duration:false});}}}async function sie(e,t){await Bp(e)?await iA(e):await lie(e,void 0,t);}async function aie(e,t=false){const n=await ld.get(e);if(!(!t&&n&&n.count&&n.updatedAt&&Date.now()-n.updatedAt<60*1e3))return iA(e)}async function iA(e){if(!await Bp(e))return;const t=await $m.get(e)||[],n=new Set(t.map(l=>l.id_str));let r=1,o="",i=true,s=[];for(;i;){const l=await ad({upMid:e,page:r,offset:o}),c=l.items;s=[...s,...c],o=l.offset,i=l.has_more,r++,i&&n.size&&c.every(d=>n.has(d.id_str))&&(i=false);}const a=Yi([...s,...t],l=>l.id_str);await $m.set(e,a),await ld.set(e,{count:a.length,updatedAt:Date.now()});}const Mg=Cl("dynamic-feed-items-in-progress");async function lie(e,t=false,n){const r=t?void 0:await Mg.get(e);let o=r?.page??1,i=r?.offset??"",s=r?.items??[],a=true;for(;a;){const c=await ad({upMid:e,page:o,offset:i}),u=c.items;s=[...s,...u],i=c.offset,a=c.has_more,o++,await Mg.set(e,{page:o,offset:i,items:s}),n?.(o,s.length);}const l=Yi(s,c=>c.id_str);await $m.set(e,l),await ld.set(e,{count:l.length,updatedAt:Date.now()}),await Mg.delete(e);}const sA=Qs({fn:ad,generateKey:({upMid:e})=>`${e}`,tableName:"dynamic-feed-newest-items",ttl:300*1e3});class cie{constructor(t,n=false){this.upMid=t,this.enableHeadCache=n;}bufferQueue=[];hasMoreForApi=true;offset="";page=1;get hasMore(){return !!this.bufferQueue.length||this.hasMoreForApi}async loadMore(){const r=await(this.page===1&&!this.offset&&this.enableHeadCache?sA:ad)({upMid:this.upMid,page:this.page,offset:this.offset});return this.offset=r.offset,this.hasMoreForApi=r.has_more,this.page++,ei(r,{has_more:true,items:[],offset:"",update_baseline:"",update_num:0})&&(this.hasMoreForApi=false),r.items}async fillQueue(t,n){for(;!n?.aborted&&this.hasMoreForApi&&this.bufferQueue.length<t;){const r=await this.loadMore();this.bufferQueue.push(...r);}}}class Zo{constructor(t){this.upMids=t;const n=t.length>Zo.ENABLE_HEAD_CACHE_UPMID_COUNT_THRESHOLD;this.upServices=t.map(r=>new cie(r,n));}static ENABLE_MERGE_TIMELINE_UPMID_COUNT_THRESHOLD=20;static ENABLE_HEAD_CACHE_UPMID_COUNT_THRESHOLD=10;upServices=[];get hasMore(){return this.upServices.some(t=>t.hasMore)}async loadMore(t){if(!this.hasMore)return [];const n=async()=>{await Ui(this.upServices,s=>s.fillQueue(1,t),5);},r=[],o=10;for(;this.hasMore&&r.length<o;){await n();const i=this.upServices.filter(l=>l.hasMore),s=Xo(i.map(l=>{const c=l.bufferQueue[0],u=BigInt(c.id_str);return {service:l,item:c,id:u}}),["id"],["desc"]).map(l=>l.service)[0];if(!s)break;const a=s.bufferQueue[0];s.bufferQueue=s.bufferQueue.slice(1),r.push(a);}return r}}const S0=f__namespace.createContext({}),uie=e=>{const{antCls:t,componentCls:n,iconCls:r,avatarBg:o,avatarColor:i,containerSize:s,containerSizeLG:a,containerSizeSM:l,textFontSize:c,textFontSizeLG:u,textFontSizeSM:d,iconFontSize:m,iconFontSizeLG:p,iconFontSizeSM:h,borderRadius:g,borderRadiusLG:b,borderRadiusSM:y,lineWidth:C,lineType:x}=e,w=(S,I,$,E)=>({width:S,height:S,borderRadius:"50%",fontSize:I,[`&${n}-square`]:{borderRadius:E},[`&${n}-icon`]:{fontSize:$,[`> ${r}`]:{margin:0}}});return {[n]:{...Lt(e),position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",overflow:"hidden",color:i,whiteSpace:"nowrap",textAlign:"center",verticalAlign:"middle",background:o,border:`${X(C)} ${x} transparent`,"&-image":{background:"transparent"},[`${t}-image-img`]:{display:"block"},...w(s,c,m,g),"&-lg":{...w(a,u,p,b)},"&-sm":{...w(l,d,h,y)},"> img":{display:"block",width:"100%",height:"100%",objectFit:"cover"}}}},die=e=>{const{componentCls:t,groupBorderColor:n,groupOverlapping:r,groupSpace:o}=e;return {[`${t}-group`]:{display:"inline-flex",[t]:{borderColor:n},"> *:not(:first-child)":{marginInlineStart:r}},[`${t}-group-popover`]:{[`${t} + ${t}`]:{marginInlineStart:o}}}},fie=e=>{const{controlHeight:t,controlHeightLG:n,controlHeightSM:r,fontSize:o,fontSizeLG:i,fontSizeXL:s,fontSizeHeading3:a,marginXS:l,marginXXS:c,colorBorderBg:u}=e;return {containerSize:t,containerSizeLG:n,containerSizeSM:r,textFontSize:o,textFontSizeLG:o,textFontSizeSM:o,iconFontSize:Math.round((i+s)/2),iconFontSizeLG:a,iconFontSizeSM:o,groupSpace:c,groupOverlapping:-l,groupBorderColor:u}},aA=xt("Avatar",e=>{const{colorTextLightSolid:t,colorTextPlaceholder:n}=e,r=vt(e,{avatarBg:n,avatarColor:t});return [uie(r),die(r)]},fie),lA=f__namespace.forwardRef((e,t)=>{const{prefixCls:n,shape:r,size:o,src:i,srcSet:s,icon:a,className:l,rootClassName:c,style:u,alt:d,draggable:m,children:p,crossOrigin:h,gap:g=4,onError:b,...y}=e,[C,x]=f__namespace.useState(1),[w,S]=f__namespace.useState(false),[I,$]=f__namespace.useState(true),E=f__namespace.useRef(null),P=f__namespace.useRef(null),M=In(t,E),{getPrefixCls:N,className:A,style:k}=St("avatar"),R=f__namespace.useContext(S0),L=()=>{if(!P.current||!E.current)return;const ee=P.current.offsetWidth,re=E.current.offsetWidth;ee!==0&&re!==0&&g*2<re&&x(re-g*2<ee?(re-g*2)/ee:1);};f__namespace.useEffect(()=>{S(true);},[]),f__namespace.useEffect(()=>{$(true),x(1);},[i]),f__namespace.useEffect(L,[g]);const V=()=>{b?.()!==false&&$(false);},_=Vn(ee=>o??R?.size??ee??"default"),z=Object.keys(typeof _=="object"?_||{}:{}).some(ee=>["xs","sm","md","lg","xl","xxl"].includes(ee)),D=O4(z),W=f__namespace.useMemo(()=>{if(typeof _!="object")return {};const ee=T4.find(oe=>D[oe]),re=_[ee];return re?{width:re,height:re,fontSize:re&&(a||p)?re/2:18}:{}},[D,_,a,p]),O=N("avatar",n),B=sn(O),[j,Y]=aA(O,B),q=H({[`${O}-lg`]:_==="large",[`${O}-sm`]:_==="small"}),U=f__namespace.isValidElement(i),K=r||R?.shape||"circle",J=H(O,q,A,`${O}-${K}`,{[`${O}-image`]:U||i&&I,[`${O}-icon`]:!!a},Y,B,l,c,j),Q=typeof _=="number"?{width:_,height:_,fontSize:a?_/2:18}:{};let G;if(typeof i=="string"&&I)G=f__namespace.createElement("img",{src:i,draggable:m,srcSet:s,onError:V,alt:d,crossOrigin:h});else if(U)G=i;else if(a)G=a;else if(w||C!==1){const ee=`scale(${C})`,re={msTransform:ee,WebkitTransform:ee,transform:ee};G=f__namespace.createElement(Kr,{onResize:L},f__namespace.createElement("span",{className:`${O}-string`,ref:P,style:re},p));}else G=f__namespace.createElement("span",{className:`${O}-string`,style:{opacity:0},ref:P},p);return f__namespace.createElement("span",{...y,style:{...Q,...W,...k,...u},className:J,ref:M},G)}),dE=e=>{const{size:t,shape:n}=f__namespace.useContext(S0),r=f__namespace.useMemo(()=>({size:e.size||t,shape:e.shape||n}),[e.size,e.shape,t,n]);return f__namespace.createElement(S0.Provider,{value:r},e.children)},mie=e=>{const{getPrefixCls:t,direction:n}=f__namespace.useContext(ot),{prefixCls:r,className:o,rootClassName:i,style:s,maxCount:a,maxStyle:l,size:c,shape:u,maxPopoverPlacement:d,maxPopoverTrigger:m,children:p,max:h}=e,g=t("avatar",r),b=`${g}-group`,y=sn(g),[C,x]=aA(g,y),w=H(b,{[`${b}-rtl`]:n==="rtl"},x,y,o,i,C),S=gr(p).map((E,P)=>Rn(E,{key:`avatar-key-${P}`})),I=h?.count||a,$=S.length;if(I&&I<$){const E=S.slice(0,I),P=S.slice(I,$),M=h?.style||l,N=h?.popover?.trigger||m||"hover",A=h?.popover?.placement||d||"top",k={content:P,...h?.popover,placement:A,trigger:N,rootClassName:H(`${b}-popover`,h?.popover?.rootClassName)};return E.push(f__namespace.createElement(ko,{key:"avatar-popover-key",destroyOnHidden:true,...k},f__namespace.createElement(lA,{style:M},`+${$-I}`))),f__namespace.createElement(dE,{shape:u,size:c},f__namespace.createElement("div",{className:w,style:s},E))}return f__namespace.createElement(dE,{shape:u,size:c},f__namespace.createElement("div",{className:w,style:s},S))},Ms=lA;Ms.Group=mie;function dr(e,t,n){const r=Ve(n);f.useEffect(()=>(e.on(t,r),()=>{e.off(t,r);}),[e,t]);}function pie(){return new Promise((e,t)=>{const n=new Image;n.onload=()=>e(true),n.onerror=r=>e(false),n.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=";})}const hie=!Js&&await( pie());function VC(e){return `${e}@96w_96h_1c_1s_!web-avatar${hie?".avif":".webp"}`}function fE(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>t(true),n.onerror=()=>t(false);})}function gie({externalSearchInput:e,onRefresh:t,getPopupContainer:n}){const{upMid:r,dynamicFeedVideoType:o,filterMinDuration:i,searchText:s,hideChargeOnlyVideos:a}=nt(At),l=v(yo.Search,{style:{width:e?"250px":void 0},placeholder:"按标题关键字过滤",type:"search",autoCorrect:"off",autoCapitalize:"off",name:`searchText_${r}`,variant:"outlined",defaultValue:At.searchText,autoComplete:"off",allowClear:true,onChange:g=>{yie({searchText:g.target.value,upMid:r,onRefresh:t});},onSearch:async g=>{At.searchText=g||void 0,await _t(100),t();}}),c=v(bie,{externalSearchInput:e,searchInput:l,refresh:t}),[u,d]=f.useState(false),m=d,p=f.useMemo(()=>!!(o!==Po.All||a||s||i!==$s.All),[o,a,s,i]),h=v(ko,{open:u,onOpenChange:m,arrow:false,placement:"bottomLeft",getPopupContainer:n,content:c,styles:{container:{border:`1px solid ${Sl()}`}},children:v(bp,{dot:p,color:Xi,offset:[-5,5],children:v(Je,{className:"icon-only-round-button",css:u&&wl,children:v(Ub,{className:"ml-1px"})})})});return {searchInput:l,popoverContent:c,popoverTrigger:h}}const Fn={wrapper:"max-w-350px",section:"mt-10px first:mt-0px min-w-300px",sectionTilte:"flex items-center text-20px pl-2px pb-2px",sectionContent:"flex flex-col items-start gap-x-10px gap-y-6px"};function bie({externalSearchInput:e,searchInput:t,refresh:n}){const{viewingSomeUp:r,selectedGroup:o,viewingSomeGroup:i,selectedKey:s,dynamicFeedVideoType:a,filterMinDuration:l,hideChargeOnlyVideos:c,addSeparators:u,searchText:d}=nt(At);let m;{const p=Qc&&!!d,h=d===I6,{href:g,path:b}=f.useMemo(()=>{const y=new URL(location.href);return y.searchParams.has(jr.SearchTextFull)?y.searchParams.set(jr.SearchTextFull,d||""):y.searchParams.has(jr.SearchTextShort)?y.searchParams.set(jr.SearchTextShort,d||""):y.searchParams.set(jr.SearchTextFull,d||""),{href:y.href,path:`${y.pathname}?${y.search}`}},[d]);m=p&&v(Jt,{title:g,children:F(Je,{disabled:h,href:g,children:["转到搜索词为「",d||"空","」的链接"]})});}return F("div",{className:Fn.wrapper,children:[F("div",{className:Fn.section,children:[F("div",{className:Fn.sectionTilte,children:["视频类型",F(Mn,{children:["「",Mo.ChargeOnly,"」在此程序中归类为「投稿视频」",v("br",{}),"「动态视频」时长通常较短"]})]}),v("div",{children:v(Dn.Group,{buttonStyle:"solid",value:a,onChange:async p=>{At.dynamicFeedVideoType=p.target.value,await _t(100),n?.();},children:Object.values(Po).map(p=>v(Dn.Button,{value:p,children:X_[p]},p))})})]}),a!==Po.DynamicOnly&&F("div",{className:Fn.section,children:[v("div",{className:Fn.sectionTilte,children:"充电专属"}),v("div",{className:Fn.sectionContent,children:v(Jr,{className:"ml-5px",checked:c,onChange:async p=>{const h=p.target.checked,g=At.hideChargeOnlyVideosForKeysSet;h?g.add(s):g.delete(s),await _t(100),n?.();},children:v(Jt,{title:F($e,{children:["隐藏「",Mo.ChargeOnly,"」视频 ",v("br",{}),"仅对当前 UP 或 分组生效"]}),children:F("span",{style:{userSelect:"none"},children:["隐藏「",Mo.ChargeOnly,"」"]})})})})]}),F("div",{className:Fn.section,children:[v("div",{className:Fn.sectionTilte,children:"最短时长"}),v("div",{children:v(Dn.Group,{className:"overflow-hidden [&_.ant-radio-button-wrapper]:px-10px",buttonStyle:"solid",value:l,onChange:async p=>{At.filterMinDuration=p.target.value,await _t(100),n?.();},children:Object.values($s).map(p=>{const{label:h}=N6[p];return v(Dn.Button,{value:p,children:h},p)})})})]}),(!e||m)&&F("div",{className:Fn.section,children:[v("div",{className:Fn.sectionTilte,children:"搜索"}),F("div",{className:Fn.sectionContent,children:[!e&&t,m]})]}),v(vie,{}),F("div",{className:Fn.section,children:[F("div",{className:Fn.sectionTilte,children:[i?"分组":r?"UP":"全部",F(Mn,{children:["当前",i?"分组":r?"UP":"范围","的一些操作~"]}),i&&o&&F("span",{className:"ml-15px inline-flex items-center text-size-14px",children:["(",F("a",{href:b6(o?.tagid||""),target:"_blank",className:`mx-4px inline-flex items-center text-size-16px ${LM}`,children:[v(bo,{className:"mr-2px size-18px"}),o?.name]}),")"]})]}),F("div",{className:Fn.sectionContent,children:[v(Jr,{checked:u,onChange:async p=>{At.addSeparatorsMap.set("global",p.target.checked),await _t(100),n?.();},children:v(Jt,{title:"添加今日/更早分割线",children:"添加分割线"})}),i&&!!o&&v(Cie,{followGroup:o,refresh:n})]})]})]})}function vie(){const{cacheAllItemsEntry:e,cacheAllItemsUpMids:t}=Mt().dynamicFeed.__internal,{viewingSomeUp:n,upMid:r,upName:o}=nt(At),i=qi(async(l,c)=>{const{notifyOnProgress:u,notifyOnSuccess:d}=iie(l,c);await sie(l,u),d();},{manual:true}),s=f.useMemo(()=>!!r&&t.includes(r.toString()),[r,t]),a=f.useCallback(async l=>{if(!r)return;const u=l.target.checked?{add:[r]}:{remove:[r]};await ii("dynamicFeed.__internal.cacheAllItemsUpMids",u);},[]);return v($e,{children:e&&n&&r&&o&&F("div",{className:Fn.section,children:[F("div",{className:Fn.sectionTilte,children:["搜索缓存",F(Mn,{children:["开启搜索缓存后, 会加载并缓存 UP 所有的动态 ",v("br",{}),"当本地有缓存且总条数 <= 5000时, 搜索框成为及时搜索, 无需点击搜索按钮"]})]}),F("div",{className:Fn.sectionContent,children:[F("div",{className:"flex flex-wrap items-center gap-x-10px gap-y-3px",children:[v(Jr,{className:"inline-flex items-center",checked:s,onChange:a,children:v(Jt,{title:"只有开启此项, 搜索时才会使用缓存",children:F("span",{children:["为「",o,"」开启"]})})}),v(Je,{loading:i.loading,onClick:async()=>{await i.runAsync(r,o);},children:"更新缓存"})]}),v(at,{configPath:"dynamicFeed.advancedSearch",label:"使用高级搜索",tooltip:BR})]})]})})}const yie=_s(async function({searchText:e,upMid:t,onRefresh:n}){if(!t||!(e||!e&&At.searchText)||!Ue.dynamicFeed.__internal.cacheAllItemsEntry||!Ue.dynamicFeed.__internal.cacheAllItemsUpMids.includes(t.toString())||!await Bp(t))return;const r=await ld.get(t);!r||!r.count||r.count>=5e3||(At.searchText=e,await _t(0),n());},100);function cA(){return F($e,{children:[v("p",{children:"机制介绍:"}),F("ul",{children:[F("li",{className:"flex items-start gap-x-10px",children:[v("div",{children:"「从全部过滤」:"}),v("div",{children:'基于全部动态 + 分组UP过滤, 速度可能巨慢, 且过滤后的数量取决于B站记录的"全部"动态范围'})]}),F("li",{className:"flex items-start gap-x-10px",children:[v("div",{children:"「拼接时间线」:"}),F("div",{children:["可以理解为: 去看一遍分组所有 UP 的动态, 然后将它们拼接起来 ",v("br",{}),"启动慢, 但可以加载所有动态; 且分组 UP 越多, 启动越慢 ",v("br",{}),"默认分组 UP 数量不超过 ",Zo.ENABLE_MERGE_TIMELINE_UPMID_COUNT_THRESHOLD," ","时会使用「拼接时间线」 ",v("br",{}),"详见",v("a",{className:"mx-5px",href:"https://magicdawn.fun/2024/12/01/bilibili-gate-dynamic-feed-merge-timeline/",target:"_blank",children:"介绍博客"})]})]})]})]})}function Cie({followGroup:e,refresh:t}){const{whenViewAll:n}=nt(Ue.dynamicFeed),r=e.count;let o;const i=mE(e.tagid,"dynamicFeed.followGroup.forceUseMergeTimelineIds");{const{checked:l,onChange:c}=i,u=r<=Zo.ENABLE_MERGE_TIMELINE_UPMID_COUNT_THRESHOLD;o=v(Jr,{checked:l,onChange:d=>{c(d),t?.();},disabled:u,children:v(Jt,{title:F($e,{children:[v(cA,{}),u&&F("p",{className:"text-yellow-400 italic",children:["当前分组 UP 数量: ",r,", 无需设置"]})]}),children:"分组动态: 强制使用「拼接时间线」"})});}let s;s=(r<=Zo.ENABLE_MERGE_TIMELINE_UPMID_COUNT_THRESHOLD||i.checked)&&r>Zo.ENABLE_HEAD_CACHE_UPMID_COUNT_THRESHOLD&&v(Jt,{title:F($e,{children:["当分组 UP 数量"," > ",Zo.ENABLE_HEAD_CACHE_UPMID_COUNT_THRESHOLD,"时, 「拼接时间线」功能会缓存每个 UP 的最新动态5分钟. ",v("br",{}),"这里可以手动清除缓存"]}),children:v(Je,{onClick:()=>{sA.cache.db.clear(),ft.success("已清除缓存");},children:"清除「拼接时间线」- 队头缓存"})});let a;{const{checked:l,onChange:c}=mE(`${Bs}${e.tagid}`,"dynamicFeed.whenViewAll.hideIds");a=n.enableHideSomeContents&&v(Jr,{checked:l,onChange:c,children:v(Jt,{title:F($e,{children:["在「全部」动态中隐藏来自此 ",e.name," 的动态"]}),children:"在「全部」动态中隐藏来自此分组的动态"})});}return F($e,{children:[a,o,s]})}function mE(e,t){const n=f5(t),r=f.useMemo(()=>n.includes(e),[n]),o=Ve(async s=>{await ii(t,s?{add:[e]}:{remove:[e]});}),i=f.useCallback(s=>{o(s.target.checked);},[]);return {checked:r,setChecked:o,onChange:i}}function xie(e){if(Object.assign(At,e),e.upMid){const t=At.upList.find(n=>n.mid.toString()===e.upMid);t&&(t.has_update=false);}}const Rg={upMid:void 0,upName:void 0,upFace:void 0,searchText:void 0,selectedGroupId:void 0,dynamicFeedVideoType:Po.All,filterMinDuration:$s.All};function uA(e){const{upList:t,groups:n,selectedKey:r}=nt(At),o=jn(),{followGroup:{enabled:i}}=Mt().dynamicFeed,{recSharedEmitter:s}=Zr(),a=Ve(async u=>{xie(u),await _t(100),o();}),l=Ve(()=>{a({...Rg}),s.emit("dynamic-feed:clear");});return {menuItems:f.useMemo(()=>{const u={key:"all",icon:v(Ms,{size:"small",children:"全"}),label:"全部",title:"全部",onClick:l};let d=[];i&&(d=n.map(h=>({key:`group:${h.tagid}`,icon:v(Ms,{size:"small",children:h.name[0]||"组"}),label:`${h.name} (${h.count})`,title:`${h.name} (${h.count})`,onClick:()=>a({...Rg,selectedGroupId:h.tagid})})));let m=t;e==="dropdown"&&(m=V4(t,[{prop:h=>h.has_update?1:0,order:"desc"},{prop:h=>q4(h.uname),order:U4}]));const p=m.map(h=>{let g=v(Ms,{size:"small",src:VC(h.face)});return h.has_update&&(g=v(bp,{dot:true,children:g})),{key:`up:${h.mid}`,icon:g,label:v("span",{title:h.uname,className:"block max-w-130px overflow-hidden text-ellipsis whitespace-nowrap",children:h.uname}),title:h.uname,onClick(){a({...Rg,upMid:h.mid.toString(),upName:h.uname,upFace:h.face});}}});return [u,...d,...p]},[t,i,n,e]),selectedKey:r,onClear:l,onSelect:a}}function wie(){const{dynamicFeed:{__internal:{externalSearchInput:e}}}=Mt(),{viewingSomeUp:t,upName:n,upFace:r,selectedGroup:o}=nt(At),i=jn(),{ref:s,getPopupContainer:a}=Ys(),l=j1(Be.DynamicFeed),{menuItems:c,selectedKey:u,onClear:d}=uA("dropdown");ir(()=>{T6();});const m=o?.count,p=v(h6,{className:"mt--2px size-14px"}),h=r?v(Ms,{size:20,src:VC(r)}):void 0,g=t?h||p:o?v(g6,{className:"size-18px"}):void 0,b=t?n:o?o.name+(m?` (${m})`:""):"全部",[y,C]=f.useState(false),x=v(ts,{open:y,onOpenChange:C,placement:"bottomLeft",getPopupContainer:a,menu:{items:c,style:{...G4,border:`1px solid ${Sl()}`},selectedKeys:[u]},children:v(Je,{icon:g,className:"gap-4px",css:[y&&wl,"",""],children:b})}),{popoverTrigger:w,searchInput:S}=gie({externalSearchInput:e,onRefresh:i,getPopupContainer:a});return F("div",{ref:s,className:"inline-flex items-center gap-x-8px",children:[!l&&x,l?F(Je,{onClick:d,className:"gap-0",disabled:!(t||o),children:[v(wv,{className:"mr-5px size-14px"}),v("span",{children:"清除"})]}):(t||o)&&F(Je,{onClick:d,className:"gap-0",children:[v(wv,{className:"mr-5px size-14px"}),v("span",{children:"清除"})]}),w,e&&S,v(Fp,{})]})}function Sie(){const e=j1(Be.DynamicFeed),{menuItems:t,selectedKey:n}=uA("sidebar"),{menuRef:r,revealSelected:o}=r5(t,n),{recSharedEmitter:i}=Zr();if(dr(i,"dynamic-feed:clear",()=>{o(Zc);}),!!e)return v(es,{ref:r,items:t,selectedKeys:[n],mode:"inline",inlineIndent:10})}function jC(e=At){const t=Qn(e);return {upMid:t.upMid,groupId:t.selectedGroup?.tagid,searchText:t.searchText,dynamicFeedVideoType:t.dynamicFeedVideoType,hideChargeOnlyVideos:t.hideChargeOnlyVideos,filterMinDuration:t.filterMinDuration,filterMinDurationValue:t.filterMinDurationValue,selectedKey:t.selectedKey,viewingAll:t.viewingAll,viewingSomeUp:t.viewingSomeUp,viewingSomeGroup:t.viewingSomeGroup,addSeparators:t.addSeparators,showLiveInDynamicFeed:Ue.dynamicFeed.showLive,whenViewAllEnableHideSomeContents:Ue.dynamicFeed.whenViewAll.enableHideSomeContents,whenViewAllHideIds:new Set(Ue.dynamicFeed.whenViewAll.hideIds),advancedSearch:Ue.dynamicFeed.advancedSearch,searchCacheEnabled:!!t.upMid&&Ue.dynamicFeed.__internal.cacheAllItemsEntry&&Ue.dynamicFeed.__internal.cacheAllItemsUpMids.includes(t.upMid.toString()),forceUseMergeTime:!!t.selectedGroup&&Ue.dynamicFeed.followGroup.forceUseMergeTimelineIds.includes(t.selectedGroup.tagid),startingOffset:K_,minId:pE(Kb)?BigInt(Kb):void 0,minTs:pE(FS)?Number(FS):void 0}}function pE(e){return !!e&&/^\d+$/.test(e)}const $ie=Hn.extend("modules:rec-services:dynamic-feed");class kp extends ns{constructor(t){super(kp.PAGE_SIZE),this.config=t,this.config.showLiveInDynamicFeed&&!this.upMid&&this.groupId===void 0&&!this.searchText&&this.dynamicFeedVideoType===Po.All&&this.filterMinDuration===$s.All&&(this.liveRecService=new sd(true)),this.config.startingOffset&&(this.offset=this.config.startingOffset);}static PAGE_SIZE=15;tabbarView=v(wie,{});sidebarView=v(Sie,{});hasMoreExceptQueue=true;get hasMore(){return this.qs.bufferQueue.length||this.liveRecService?.hasMore?true:this.viewingSomeGroup&&this.groupMergeTimelineService?this.groupMergeTimelineService.hasMore:!!this.hasMoreExceptQueue}async shouldReduceMinCount(){return this.viewingAll,this.viewingSomeGroup?(await this.loadGroupMids(),!this.groupMergeTimelineService):!!(this.searchText||this.dynamicFeedVideoType===Po.DynamicOnly||this.filterMinDuration!==$s.All)}offset="";page=0;liveRecService;get upMid(){return this.config.upMid}get groupId(){return this.config.groupId}get searchText(){return this.config.searchText}get dynamicFeedVideoType(){return this.config.dynamicFeedVideoType}get hideChargeOnlyVideos(){return this.config.hideChargeOnlyVideos}get filterMinDuration(){return this.config.filterMinDuration}get filterMinDurationValue(){return this.config.filterMinDurationValue}get viewingSomeUp(){return this.config.viewingSomeUp}get viewingSomeGroup(){return this.config.viewingSomeGroup}shouldEnableMergeTimeline(t){return this.config.forceUseMergeTime||t>0&&t<=Zo.ENABLE_MERGE_TIMELINE_UPMID_COUNT_THRESHOLD}groupMergeTimelineService;groupMids=new Set;groupMidsLoaded=false;async loadGroupMids(){if(typeof this.groupId=="number"&&!this.groupMidsLoaded)try{const t=await Gb(this.groupId);this.groupMids=new Set(t),this.shouldEnableMergeTimeline(t.length)&&(this.groupMergeTimelineService=new Zo(t.map(n=>n.toString())));}finally{this.groupMidsLoaded=true;}}get viewingAll(){return this.config.viewingAll}whenViewAllHideMids=new Set;whenViewAllHideMidsLoaded=false;async loadWhenViewAllHideMids(){if(!this.viewingAll||!this.config.whenViewAllEnableHideSomeContents||!this.config.whenViewAllHideIds.size||this.whenViewAllHideMidsLoaded)return;const t=Array.from(this.config.whenViewAllHideIds).filter(i=>i.startsWith(Xa)).map(i=>i.slice(Xa.length)),n=Array.from(this.config.whenViewAllHideIds).filter(i=>i.startsWith(Bs)).map(i=>i.slice(Bs.length)),r=this.whenViewAllHideMids;t.forEach(i=>r.add(i)),(await Ui(n,i=>Gb(i),3)).flat().forEach(i=>r.add(i.toString())),this.whenViewAllHideMidsLoaded=true;}async fetchMore(t){const n=await this._fetchMore(t);return this.handleAddSeparators(n)}_queueForSearchCache;async _fetchMore(t){if(this.liveRecService?.hasMore)return (await this.liveRecService.loadMore(t)||[]).filter(d=>d.api!==Ee.Separator);let n;this.viewingSomeGroup&&await this.loadGroupMids(),this.viewingAll&&(await this.loadWhenViewAllHideMids(),$ie("viewingAll: hide-mids = %o",this.whenViewAllHideMids));const r=!!(this.upMid&&this.searchText&&this.config.searchCacheEnabled&&await Bp(this.upMid)),o=r&&this.config.advancedSearch,i=o?kR((this.searchText||"").toLowerCase()):void 0;if(r)this._queueForSearchCache||(await aie(this.upMid),this._queueForSearchCache=new lp(20),this._queueForSearchCache.bufferQueue=(await $m.get(this.upMid)||[]).filter(u=>{const d=u?.modules?.module_dynamic?.major?.archive?.title||"";return a({searchText:this.searchText,title:d,useAdvancedSearch:o,useAdvancedSearchParsed:i})})),n=this._queueForSearchCache.sliceFromQueue(this.page+1)||[],this.page++,this.hasMoreExceptQueue=!!this._queueForSearchCache.bufferQueue.length;else if(this.viewingSomeGroup&&this.groupMergeTimelineService)n=await this.groupMergeTimelineService.loadMore(t);else {const u=await ad({abortSignal:t,page:this.page+1,offset:this.offset,upMid:this.upMid});if(this.page++,this.hasMoreExceptQueue=u.has_more,this.offset=u.offset,n=u.items,this.config.minId){const d=this.config.minId,m=n.findIndex(p=>BigInt(p.id_str)<=d);m!==-1&&(this.hasMoreExceptQueue=false,n=n.slice(0,m+1));}if(this.config.minTs){const d=this.config.minTs,m=n.findIndex(p=>p.modules.module_author.pub_ts<=d);m!==-1&&(this.hasMoreExceptQueue=false,n=n.slice(0,m+1));}}const s=n.filter(u=>{if(!this.viewingSomeGroup||!this.groupMids.size)return true;const d=u?.modules?.module_author?.mid;return d?this.groupMids.has(d):true}).filter(u=>{if(this.dynamicFeedVideoType===Po.All)return true;const d=u.modules.module_dynamic.major.archive.badge.text;return this.dynamicFeedVideoType===Po.DynamicOnly?d===Mo.Dynamic:this.dynamicFeedVideoType===Po.UploadOnly?d===Mo.Upload||d===Mo.ChargeOnly:false}).filter(u=>this.hideChargeOnlyVideos?!(u.modules?.module_dynamic?.major?.archive?.badge?.text===Mo.ChargeOnly):true).filter(u=>{if(this.filterMinDuration===$s.All)return true;const d=u.modules.module_dynamic.major.archive;return AC(d.duration_text)>=this.filterMinDurationValue}).filter(u=>{if(!this.searchText)return true;const d=u?.modules?.module_dynamic?.major?.archive?.title||"";return a({searchText:this.searchText,title:d,useAdvancedSearch:o,useAdvancedSearchParsed:i})}).filter(u=>{if(this.config.selectedKey!==Zc)return true;const d=this.whenViewAllHideMids;if(!d.size)return true;const m=u?.modules?.module_author?.mid;return m?!d.has(m.toString()):true}).map(u=>({...u,api:Ee.DynamicFeed,uniqId:`${Ee.DynamicFeed}-${u.id_str||crypto.randomUUID()}`}));function a({title:u,searchText:d,useAdvancedSearch:m,useAdvancedSearchParsed:p}){return u=u.toLowerCase(),d=d.toLowerCase(),m?(p?.includes??[]).every(b=>u.includes(b))&&(p?.excludes??[]).every(b=>!u.includes(b)):u.includes(d)}const{upMid:l,upName:c}=At;if(Ji&&l&&c&&c===l.toString()&&s[0]){const u=s[0].modules.module_author.name,d=s[0].modules.module_author.face;At.upName=u,At.upFace=d;}if(this.viewingSomeGroup&&At.groups.length){const u=At.groups.find(d=>d.tagid===this.groupId);u&&(u.count=this.groupMids.size);}return s}separatorsConfig={today:{added:false,content:"今日",getInsertIndex:Eie},earlier:{added:false,content:"更早",getInsertIndex:dA(-1/0,rn().startOf("day").unix())}};handleAddSeparators(t){if(!this.config.addSeparators)return t;const n=t;{const r=this.separatorsConfig.today,{getInsertIndex:o,content:i,added:s}=r;if(!s){const a=o(t);a!==-1&&(n.splice(a,0,{api:Ee.Separator,uniqId:"dynamic-feed-separator-today",content:i}),r.added=true);}}{const r=this.separatorsConfig.earlier,{getInsertIndex:o,content:i,added:s}=r;if(!s){const a=o(t);a!==-1&&(n.splice(a,0,{api:Ee.Separator,uniqId:"dynamic-feed-separator-earlier",content:i}),r.added=true);}}return n}}function dA(e,t){return n=>n.findIndex(r=>{if(r.api!==Ee.DynamicFeed)return false;const o=r.modules.module_author.pub_ts;return o>=e&&o<t})}function Eie(e){const t=e.findIndex(r=>r.api===Ee.Live&&r.live_status===No.Streaming);return t!==-1?t:dA(rn().startOf("day").unix(),rn().endOf("day").unix())(e)}const Jo=20,Em="ml-30px inline-flex items-center text-15px [&_svg]:mr-5px [&_svg]:mt--1px first:ml-0";class fA{constructor(t,n,r){this.collectionId=t,this.addSeparator=n,this.itemsOrder=r;}get hasMore(){return this.addSeparator&&!this.separatorAdded||!this.loaded?true:!!this.bufferQueue.length}loaded=false;bufferQueue=[];separatorAdded=false;get separator(){return {api:Ee.Separator,uniqId:`fav-collection-separator-${this.collectionId}`,content:v(Iie,{service:this})}}state=tn({firstBvid:void 0,info:void 0});async loadMore(t){if(!this.hasMore)return;if(this.addSeparator&&!this.separatorAdded)return this.separatorAdded=true,[this.separator];if(!this.loaded){const r=await mJ(this.collectionId,1),o=r?.medias||[],i=r?.info;await Am(()=>this.loadUserAvatarFromSpaceAccInfo(o,t));let s=o.map(l=>({...l,api:Ee.Fav,uniqId:`${Ee.Fav}-collection:${this.collectionId}-${l.bvid}`,collection:r.info,from:"fav-collection"}));[dt.PubTimeDesc,dt.PubTimeAsc,dt.Shuffle].includes(this.itemsOrder)&&(s=a0(s,dt.PubTimeDesc),s.forEach((l,c,u)=>{l.vol=u.length-c,l.volTooltip=F($e,{children:["按投稿时间 Vol.",l.vol]});})),s=a0(s,this.itemsOrder),this.bufferQueue=s,this.loaded=true,this.state.firstBvid=s[0]?.bvid,this.state.info=_a(i),kt.selectedFavCollectionDetailInfo=_a(i);}this.itemsOrder===dt.Shuffle&&(this.bufferQueue=Mr(this.bufferQueue));let n;return [n,this.bufferQueue]=[this.bufferQueue.slice(0,Jo),this.bufferQueue.slice(Jo)],n}async loadUserAvatarFromSpaceAccInfo(t,n){if(!t.length)return;const r=LT(t,s=>s.upper.mid),o=Object.entries(r).map(([s,a])=>({mid:s,count:a})),i=Xo(o,[s=>s.count],["desc"]).slice(0,3).map(s=>s.mid);await Promise.all(i.map(async s=>{if(n?.aborted)return;const l=(await bC(s))?.face;l&&t.filter(c=>c.upper.mid.toString()===s).forEach(c=>{c.upper.face||=l;});}));}get extraTabbarView(){return v(pC,{})}}function Iie({service:e}){const{firstBvid:t,info:n}=nt(e.state);return F($e,{children:[v(Jt,{title:F($e,{children:["UP: ",n?.upper.name," ",v("br",{}),n?.intro||"简介: N/A"]}),children:F(cu,{href:NR(e.collectionId),className:Em,children:[v(bo,{className:"size-16px"}),n?.title]})}),t&&F(cu,{href:hJ(t),className:Em,children:[v(qu,{className:"size-16px"}),"播放全部"]})]})}function Pie({service:e}){return F($e,{children:[F(cu,{href:uC(e.entry.id,e.entry.attr),className:Em,children:[v(bo,{className:"size-16px"}),e.entry.title]}),F(cu,{href:pJ(e.entry.id),className:Em,children:[v(qu,{className:"size-16px"}),"播放全部"]})]})}const Nie=[dt.FavTimeDesc,dt.PlayCountDesc,dt.PubTimeDesc];function hE(e){return Nie.includes(e)}const mA=Cl("fav-folder-all-items");async function Ac(e){await mA.delete(e);}class pA{constructor(t,n,r){if(this.folderId=t,this.addSeparator=n,this.itemsOrder=r,this.itemsOrder===dt.Initial)throw new Error("this should not happen!");hE(this.itemsOrder)?this.needLoadAll=false:this.needLoadAll=true;}needLoadAll;get hasMore(){return this.addSeparator&&!this.separatorAdded?true:this.needLoadAll?this.allItemsLoaded?!!this.bufferQueue.length:true:this.innerService?this.innerService.hasMore:true}separatorAdded=false;get separator(){return this.assertInnerService(),{api:Ee.Separator,uniqId:`fav-folder-separator-${this.folderId}`,content:v(Pie,{service:this.innerService})}}entry;innerService;assertInnerService(){Ai(this.innerService,"this.innerService should not be undefined"),Ai(this.entry,"this.entry should not be undefined");}async createService(){if(this.innerService)return;await hC();const t=Qn(kt.folders).find(n=>n.id===this.folderId);Ai(t,`favStore.favFolders should have this entry[fid=${this.folderId}]`),this.entry=t,hE(this.itemsOrder)?this.innerService=new Da(t,this.itemsOrder):this.innerService=new Da(t);}async loadMore(t){if(this.innerService||await this.createService(),!!this.hasMore){if(this.addSeparator&&!this.separatorAdded)return this.separatorAdded=true,[this.separator];if(this.needLoadAll){this.allItemsLoaded||await this.loadAllItems(t),this.itemsOrder===dt.Shuffle&&(this.bufferQueue=Mr(this.bufferQueue));const n=this.bufferQueue.slice(0,Jo);return this.bufferQueue=this.bufferQueue.slice(Jo),n}else {const n=await this.innerService?.loadMore(t);return this.runSideEffects(),n}}}allItemsLoaded=false;bufferQueue=[];async loadAllItems(t){const n=await this.fetchAllItems(t);this.bufferQueue=a0(n,this.itemsOrder),this.allItemsLoaded=true,this.runSideEffects();}_fetchAllItems=async t=>{this.assertInnerService();const n=[];for(;this.innerService.hasMore&&!t.aborted;){const r=await this.innerService.loadMore(t)||[];n.push(...r);}return n};_fetchAllItemsWithCache=Qs({fn:this._fetchAllItems,tableName:mA,generateKey:()=>`${this.folderId}`,ttl:Wn("5min")});fetchAllItems=t=>(this.assertInnerService(),this.entry.media_count>Da.PAGE_SIZE*3?this._fetchAllItemsWithCache(t):this._fetchAllItems(t));runSideEffects(){this.assertInnerService(),typeof this.innerService.info?.media_count=="number"&&LR(this.folderId,this.innerService.info.media_count);}get extraTabbarView(){return v(pC,{})}}class Da{constructor(t,n=dt.FavTimeDesc){this.entry=t,this.itemsOrder=n,this.hasMore=t.media_count>0;}static PAGE_SIZE=20;hasMore;info;page=0;async loadMore(t){if(!this.hasMore)return;const n={[dt.FavTimeDesc]:"mtime",[dt.PlayCountDesc]:"view",[dt.PubTimeDesc]:"pubtime"}[this.itemsOrder],o=(await Tt.get("/x/v3/fav/resource/list",{params:{media_id:this.entry.id,pn:this.page+1,ps:Da.PAGE_SIZE,keyword:"",order:n,type:"0",tid:"0",platform:"web"}})).data;if(!cn(o)){zt(o.message||al);return}this.page++,this.hasMore=o.data.has_more,this.info=o.data.info;let i=o.data.medias||[];return i=i.filter(s=>s.title!=="已失效视频"),i.map(s=>({...s,from:"fav-folder",folder:this.info,api:Ee.Fav,uniqId:`${Ee.Fav}-folder:${this.info?.id||this.entry.id}-${s.bvid}`}))}}class Mie{constructor(t,n,r){if(this.addSeparator=t,this.itemsOrder=n,this.excludedFolderIds=r,![dt.Initial,dt.Shuffle].includes(this.itemsOrder))throw new Error("invalid items order")}get useShuffle(){return this.itemsOrder===dt.Shuffle}shuffleBufferQueue=[];get hasMoreInService(){return this.serviceCreated?this.allServices.some(t=>t.hasMore):true}get hasMore(){return this.useShuffle?!!this.shuffleBufferQueue.length||this.hasMoreInService:this.hasMoreInService}get extraTabbarView(){return F($e,{children:[v(pC,{}),v(Aoe,{allFavFolderServices:this.allFolderServices,state:this.state})]})}async loadMore(t){if(this.serviceCreated||await this.createServices(),!this.hasMore)return;if(!this.useShuffle)return this.allServices.find(o=>o.hasMore)?.loadMore(t);if(this.shuffleBufferQueue.length<Jo)for(;this.hasMoreInService&&this.shuffleBufferQueue.length<Jo*3;){const i=this.allServices.filter(l=>l.hasMore),s=Mr(i).slice(0,6),a=(await Ui(s,async l=>await l.loadMore(t)||[],2)).flat().filter(l=>l.api!==Ee.Separator);this.shuffleBufferQueue=Mr([...this.shuffleBufferQueue,...Mr(a)]);}const n=this.shuffleBufferQueue.slice(0,Jo);return this.shuffleBufferQueue=this.shuffleBufferQueue.slice(Jo),n}allFolderServices=[];state=tn({totalCountInFavFolders:0});serviceCreated=false;allServices=[];async createServices(){await hC();const{folders:t,collections:n}=_a(Qn(kt));this.allFolderServices=t.map(r=>new Da(r)),this.state.totalCountInFavFolders=t.filter(r=>!this.excludedFolderIds.includes(r.id.toString())).reduce((r,o)=>r+o.media_count,0);{const r=t.filter(i=>!this.excludedFolderIds.includes(i.id.toString()));let o=this.itemsOrder;o===dt.Initial&&(o=dt.FavTimeDesc),this.allServices.push(...r.map(i=>new pA(i.id,this.addSeparator,o)));}this.allServices.push(...n.map(r=>new fA(r.id,this.addSeparator,this.itemsOrder))),this.serviceCreated=true;}}function WC(){const e=Qn(kt);return {selectedKey:e.selectedKey,itemsOrder:mC(e.selectedKey,e.savedOrderMap),selectedFavFolderId:e.selectedFavFolderId,selectedFavCollectionId:e.selectedFavCollectionId,addSeparator:Ue.fav.addSeparator,excludedFolderIds:Ue.fav.excludedFolderIds}}function Rie(e){return {...e,get viewingAll(){return e.selectedKey==="all"},get viewingSomeFolder(){return typeof e.selectedFavFolderId=="number"},get viewingSomeCollection(){return typeof e.selectedFavCollectionId=="number"}}}class Dp extends ns{static PAGE_SIZE=Jo;config;innerService;constructor(t){super(Dp.PAGE_SIZE),this.config=Rie(t);const{viewingAll:n,viewingSomeFolder:r,viewingSomeCollection:o}=this.config;if(n)this.innerService=new Mie(this.config.addSeparator,this.config.itemsOrder,this.config.excludedFolderIds);else if(r)this.innerService=new pA(this.config.selectedFavFolderId,this.config.addSeparator,this.config.itemsOrder);else if(o)this.innerService=new fA(this.config.selectedFavCollectionId,this.config.addSeparator,this.config.itemsOrder);else throw new Error("unexpected case!")}get tabbarView(){const{tabbarView:t,extraTabbarView:n}=this.innerService;return t||v(Roe,{extraContent:n})}sidebarView=v(Toe,{});get hasMoreExceptQueue(){return this.innerService.hasMore}fetchMore(t){return this.innerService.loadMore(t)}decreaseTotal(){this.config.viewingAll?this.innerService.state.totalCountInFavFolders-=1:this.config.viewingSomeFolder&&this.config.selectedFavFolderId?LR(this.config.selectedFavFolderId,t=>t-1):this.config.viewingSomeCollection&&this.config.selectedFavCollectionId;}}async function qC({asc:e=false,searchText:t="",abortSignal:n,extraParams:r}={}){const i=(await Tt.get("/x/v2/history/toview/web",{signal:n,params:await ep({asc:e,key:t,viewed:0,web_location:333.881,...r})})).data;return cn(i)?{total:i.data.count,items:Aie(i.data.list||[])}:(Yr("getAllWatchlaterItems error %s, fulljson %o",i.message,i),{err:i.message})}function Aie(e){return e.filter(t=>!(t.title==="以下为更早添加的视频"&&t.aid===0&&t.bvid===""&&t.add_at===0))}async function Tie(e){const t=new FormData;t.append("resources",e.join(",")),t.append("csrf",Xs());const n=await ep({}),o=(await Tt.post("/x/v2/history/toview/v2/dels",t,{params:n})).data;return cn(o)?true:(zt(o?.message||"出错了"),false)}const Tc=tn({searchText:void 0});function Oie({service:e}){const{watchlaterAddSeparator:t,watchlaterItemsOrder:n,watchlaterUseNormalVideoUrl:r}=Mt(),o=jn(),{searchText:i}=nt(Tc,{sync:true}),s=aoe(),{recSharedEmitter:a}=Zr();Wi(()=>{(async()=>(await _t(100),o()))();},[t,n,r]);const{total:l}=nt(e.state),c=i?`共 ${l} 条搜索结果`:`共 ${l} 个视频`,u=typeof l=="number"&&v(Ir,{color:"success",style:{marginRight:0,marginTop:1,cursor:"pointer"},title:c,onClick:()=>{zt(`稍后再看: ${c}`);},children:l});return F("div",{className:"flex items-center gap-x-12px",children:[v(Lie,{}),v(yo.Search,{allowClear:true,placeholder:"搜索稍后再看",style:{width:180},value:i,onChange:d=>Tc.searchText=d.target.value,onSearch:d=>{Tc.searchText=d,o();}}),u,s&&v(Jt,{arrow:false,title:"移除稍后再看 (多选)",children:v(Je,{className:"icon-only-round-button",onClick:()=>zie(a),children:v(vM,{})})}),v(Fp,{})]})}const hA={[hr.AddTimeDesc]:{icon:v(su,{}),label:fc("最近添加"),helpInfo:"按添加时间倒序"},[hr.AddTimeAsc]:{icon:v(su,{}),label:Sv("最早添加"),helpInfo:"按添加时间增序"},[hr.Shuffle]:{icon:v(gM,{}),label:"随机顺序",helpInfo:"不包括近期添加的稍后再看, 近期: 最近48小时内"}},gA=Object.values(hr),Fie=v("div",{className:"flex flex-col gap-y-4px",children:gA.map(e=>{const{icon:t,label:n,helpInfo:r}=hA[e];return F("div",{className:"flex items-center justify-left gap-x-4px line-height-[0]",children:[t," ",v("span",{className:"min-w-80px",children:n})," : ",r]},e)})});function Lie(){const e=jn(),{ref:t,getPopupContainer:n}=Ys(),{watchlaterItemsOrder:r}=Mt(),{searchText:o}=nt(Tc),i=!!o;return v(fC,{disabled:i,value:i?hr.AddTimeDesc:r,onChange:s=>{Ue.watchlaterItemsOrder=s,e();},list:gA,listDisplayConfig:hA,$ref:t,dropdownProps:{getPopupContainer:n},extraHelpInfo:Fie})}const zs=tn({updatedAt:0,bvidSet:xn()});function Bie(e){const t=nt(zs).bvidSet;return !!e&&t.has(e)}function bA(e){zs.updatedAt=Date.now(),zs.bvidSet=xn(e);}function kie(e,t){zs.updatedAt&&zs.bvidSet.add(t);}async function Die(){if(!Jm()||!Lr())return;const{items:e=[]}=await qC();e.length&&bA(e.map(t=>t.bvid));}_o&&(async()=>(await rp(),await v4(Die,{retries:3,onFailedAttempt(e){Yr(`Try updateWatchlaterState ${e.attemptNumber} failed. There are ${e.retriesLeft} retries left`);}})))();async function zie(e){const t=Op().map(s=>({item:s,cardData:id(s)})).filter(s=>s.cardData.avid).map(s=>[s.cardData.avid,s.item.uniqId,s.cardData.title]).filter(Boolean),n=t.map(s=>s[0]),r=t.map(s=>s[1]),o=t.map(s=>s[2]);if(!n.length)return zt("没有选中的视频");await Tie(n)&&e.emit("remove-cards",[r,o]);}class bu extends ns{constructor(t,n,r,o){super(bu.PAGE_SIZE),this.searchText=o,this.innerService=t===hr.Shuffle&&!this.searchText?new gE(n,r):new _ie(t,n,this.searchText);}static PAGE_SIZE=10;sidebarView=void 0;innerService;get hasMoreExceptQueue(){return this.innerService.hasMore}fetchMore(t){return this.innerService.loadMore(t)}get tabbarView(){return v(Oie,{service:this})}get state(){return this.innerService.state}decreaseTotal(){this.innerService.state.total!==void 0&&this.innerService.state.total--;}getServiceSnapshot(){return {bvidIndexMap:this.innerService instanceof gE?this.innerService.currentBvidIndexMap:void 0}}}function vA(e){return {...e,api:Ee.Watchlater,uniqId:`${Ee.Watchlater}-${e.bvid}`}}const yA=()=>rn().subtract(2,"days").unix(),$0={api:Ee.Separator,uniqId:"watchlater-separator-recent",content:"近期"},E0={api:Ee.Separator,uniqId:"watchlater-separator-earlier",content:"更早"};function CA(e){throw zt(`获取稍后再看失败: ${e}`),new Error(`获取稍后再看失败: ${e}`,{cause:e})}class gE{constructor(t,n){this.addSeparator=t,n?.size?(this.keepOrder=true,this.prevBvidIndexMap=n):this.keepOrder=false;}hasMore=true;state=tn({total:void 0});keepOrder;prevBvidIndexMap;async loadMore(t){if(!this.hasMore)return;const n=await this.fetch(t);return this.hasMore=false,n}currentBvidIndexMap;async fetch(t){const{items:n=[],err:r}=await qC({asc:false,searchText:void 0,abortSignal:t});r!==void 0&&CA(r),bA(n.map(l=>l.bvid).filter(Boolean));const o=n.map(vA),i=yA(),s=o.findIndex(l=>l.add_at<i);let a=o;if(s!==-1){const l=o.slice(0,s);let c=o.slice(s);this.keepOrder&&this.prevBvidIndexMap?.size?c=Xo(c,[u=>this.prevBvidIndexMap?.get(u.bvid)??-1],["asc"]):c=Mr(c),a=[!!l.length&&this.addSeparator&&$0,...l,!!c.length&&this.addSeparator&&E0,...c].filter(Boolean);}return this.state.total=n.length,this.currentBvidIndexMap=new Map(a.filter(l=>l.api!==Ee.Separator).map((l,c)=>[l.bvid,c])),a}}class _ie{constructor(t,n,r){this.order=t,this.addSeparator=n,this.searchText=r,this.searchText||Ai(t!==hr.Shuffle,"shuffle not supported in NormalOrderService");}firstPageLoaded=false;state=tn({total:void 0});hasMore=true;page=1;async loadMore(){if(!this.hasMore)return;const t=await qC({asc:this.order===hr.AddTimeAsc,searchText:this.searchText,extraParams:{need_split:"true",ps:20,pn:this.page}});if(t.err!==void 0){this.hasMore=false,CA(t.err);return}const{items:n,total:r}=t,o=Math.ceil(r/20);this.firstPageLoaded=true,this.state.total=t.total,this.hasMore=this.page<o,this.page++,n.forEach(s=>{s.bvid&&kie("add",s.bvid);});const i=n.map(vA);return this.insertSeparator(i)}recentSeparatorInserted=false;earlierSeparatorInserted=false;insertSeparator(t){if(!this.addSeparator)return t;let n=[...t];const r=yA(),o=t.some(s=>s.add_at<r),i=t.some(s=>s.add_at>=r);if(this.order===hr.AddTimeAsc){if(!this.earlierSeparatorInserted&&o&&(n=[E0,...n],this.earlierSeparatorInserted=true),!this.recentSeparatorInserted&&i){const s=n.findIndex(a=>a.api===Ee.Watchlater&&a.add_at>=r);n=[...n.slice(0,s),$0,...n.slice(s)],this.recentSeparatorInserted=true;}}else if(!this.recentSeparatorInserted&&i&&(n=[$0,...t],this.recentSeparatorInserted=true),!this.earlierSeparatorInserted&&o){const s=n.findIndex(a=>a.api===Ee.Watchlater&&a.add_at<r);n=[...n.slice(0,s),E0,...n.slice(s)],this.earlierSeparatorInserted=true;}return n}}function Hie(){return {addOtherTabContents:Yu().appRecommend.addOtherTabContents}}const xA=e=>v(at,{configPath:"appRecommend.addOtherTabContents",label:"显示来自其他 Tab 的内容",tooltip:F($e,{children:["显示来自其他 Tab 的内容 ",v("br",{}),"如动态 / 收藏 / 稍后再看 ",v("br",{}),"但是: 刷新时间会更长"]}),extraAction:async()=>{await _t(100),e?.();}});function Vie(){const e=jn();return v($e,{children:xA(e)})}class vu extends ns{constructor(t){super(vu.PAGE_SIZE),this.config=t,this.innerService=new jie,this.allServices=[this.innerService],this.initOtherTabServices();}static PAGE_SIZE=20;tabbarView=v(Vie,{});sidebarView=void 0;innerService;allServices=[];otherTabServices=[];initOtherTabServices(){if(!Jm()||!this.config.addOtherTabContents)return;let t,n,r;{const s=M6();s.upMid=void 0,s.selectedGroupId=void 0;const a=jC(s);Object.assign(a,{showLiveInDynamicFeed:true,whenViewAllEnableHideSomeContents:false,searchCacheEnabled:false}),t=new kp(a);}{const s=Object.assign(WC(),{selectedKey:"all",itemsOrder:dt.Shuffle,selectedFavFolderId:void 0,selectedFavCollectionId:void 0,addSeparator:false});n=new Dp(s);}r=new bu(hr.AddTimeDesc,false),this.otherTabServices=[t,n,r];const o=[],i=7/3;o.push(...this.otherTabServices),dO(Math.round(i*this.otherTabServices.length),()=>o.push(this.innerService)),this.allServices=Mr(o);}get hasMore(){return !!this.qs.bufferQueue.length||this.innerService.hasMore||this.otherTabServices.some(t=>t.hasMore)}hasMoreExceptQueue=true;fetchMore(t){throw new Error("Method not implemented.")}async loadMore(t){if(this.hasMore){for(;this.hasMore&&this.qs.bufferQueue.length<vu.PAGE_SIZE*3;){const n=this.allServices.filter(i=>i.hasMore);if(!n.length)break;const r=Mr(n).slice(0,3),o=(await Promise.all(r.map(async i=>await i.loadMore(t)||[]))).flat().filter(i=>i.api!==Ee.Separator);this.qs.bufferQueue.push(...o),this.qs.bufferQueue=Mr(this.qs.bufferQueue);}return this.qs.sliceFromQueue()}}async loadMoreBatch(t,n){if(this.hasMore)return this.qs.bufferQueue.length?this.qs.sliceFromQueue(n):this.qs.doReturnItems(await this.innerService.getRecommendTimes(t,n))}}class jie{static PAGE_SIZE=16;hasMore=true;async getRecommend(){const t=await tp.get(`${w3}/x/v2/feed/index`,{timeout:2e4,responseType:"json",params:{build:"1",mobi_app:"iphone",device:"pad",idx:Math.floor(Date.now()/1e3)+zT(1e3)}}),n=t.data;if(!n.data)throw new Error("Request fail with none invalid json",{cause:{type:"invalid-json",statusCode:t.status,json:n}});return n?.data?.items||[]}loadMore(t,n=2){return this.getRecommendTimes(t,n)}async getRecommendTimes(t,n){let r=(await Promise.all(z0(n).map(()=>this.getRecommend()))).flat();return r=r.filter(i=>!(i.card_goto?.includes("ad")||i.goto?.includes("ad")||i.ad_info||i.card_goto==="banner"||i.goto==="av"&&i.player_args===void 0)),r=Yi(r,i=>i.param),r.map(i=>({...i,api:Ee.AppRecommend,uniqId:`${Ee.AppRecommend}-${i.param}`}))}}async function Wie(e,t){const{bvid:n,goto:r,recommendReason:o}=t,i=r==="av";return rl(e)&&i&&!!n&&HC(o)?(await fV(n))?.pubdate:void 0}const qie=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"currentColor",fillRule:"evenodd",d:"M19 10a4 4 0 1 1-8 0a4 4 0 0 1 8 0m-4 18a4 4 0 1 0 0-8a4 4 0 0 0 0 8m0 14a4 4 0 1 0 0-8a4 4 0 0 0 0 8m22-32a4 4 0 1 1-8 0a4 4 0 0 1 8 0m-4 18a4 4 0 1 0 0-8a4 4 0 0 0 0 8m0 14a4 4 0 1 0 0-8a4 4 0 0 0 0 8",clipRule:"evenodd"})]}),Uie=f.forwardRef(qie);function Gie(){const{dynamicFeed:e,sidebarAlign:t,enableSidebar:n}=Mt(),r=PC(),o=i=>({order:r.indexOf(i)+1});return v("div",{className:fr.tabPane,children:F("div",{className:"grid grid-cols-[250px_1fr] gap-x-50px",children:[v(Sn,{title:F($e,{children:["Tab 设置",v(Mn,{className:"ml-5px",children:"勾选显示, 拖动排序"}),v("span",{className:"flex-1"}),v(Ao,{paths:["hidingTabKeys","customTabKeysOrder"]})]}),children:v(Xie,{})}),F(Sn,{title:"更多设置",contentClassName:"gap-y-15px",children:[F("div",{className:"order--10",children:[v("div",{className:"flex items-center text-size-1.3em",children:"通用"}),v("div",{className:"flex flex-wrap items-center gap-x-10px",children:F("div",{className:"flex items-center gap-x-4px",children:[v(at,{configPath:"enableSidebar",label:"使用侧边栏",tooltip:ur("使用侧边栏(如动态 分组/UP 选择)","使用下拉面板")}),F(Dn.Group,{disabled:!n,buttonStyle:"solid",size:"small",value:t,onChange:i=>{Ue.sidebarAlign=i.target.value;},children:[v(Dn.Button,{value:el.Left,className:"inline-flex-center",children:v(kP,{className:"size-16px"})}),v(Dn.Button,{value:el.Right,className:"inline-flex-center",children:v(DP,{className:"size-16px"})})]})]})})]}),F("div",{style:o(Be.Watchlater),children:[F("div",{className:"flex items-center text-size-1.3em",children:[v(Oo,{tabKey:Be.Watchlater,className:"mr-5px mt--1px"}),"稍后再看"]}),F(Fr,{size:10,children:[v(at,{configPath:"watchlaterAddSeparator",label:"添加分割线",tooltip:"添加「近期」「更早」分割线"}),v(at,{configPath:"watchlaterUseNormalVideoUrl",label:"使用普通视频链接",tooltip:ur("使用普通视频链接","使用「稍后再看」自动列表链接")})]})]}),F("div",{style:o(Be.Fav),children:[F("div",{className:"flex items-center text-size-1.3em",children:[v(Oo,{tabKey:Be.Fav,className:"mr-5px mt--2px"}),"收藏"]}),v(Fr,{size:10,children:v(at,{configPath:"fav.addSeparator",label:"添加分割线",tooltip:"顺序显示时, 按收藏夹添加分割线"})})]}),F("div",{style:o(Be.DynamicFeed),children:[F("div",{className:"flex items-center text-size-1.3em",children:[v(Oo,{tabKey:Be.DynamicFeed,className:"mr-5px mt--2px"}),"动态"]}),F("div",{className:"flex flex-wrap gap-x-10px gap-y-10px",children:[v(at,{configPath:"dynamicFeed.followGroup.enabled",label:"启用分组筛选",tooltip:F($e,{children:["动态 Tab 启用分组筛选 ",v("br",{}),v(cA,{})]})}),v(at,{configPath:"dynamicFeed.showLive",label:"在动态中显示直播",tooltip:F($e,{children:["动态里显示正在直播的 UP",v("br",{}),"P.S 仅在选择「全部」时展示"]})}),v(at,{configPath:"dynamicFeed.whenViewAll.enableHideSomeContents",label:"「全部」动态过滤",tooltip:F($e,{children:["查看「全部」动态时 ",v("br",{}),ur("将添加右键菜单, 点击可添加到「全部」动态的过滤列表","关闭此功能")]})}),e.whenViewAll.enableHideSomeContents&&v(D6,{size:"small",className:"w-full",items:[{key:"1",label:"在「全部」动态中隐藏 UP/分组 的动态",children:v(Qie,{})}]})]})]}),F("div",{style:o(Be.AppRecommend),children:[F("div",{className:"flex items-center text-size-1.3em",children:[v(Oo,{tabKey:Be.AppRecommend,className:"mr-5px"}),"App 推荐"]}),v("div",{className:"flex flex-col gap-y-5px",children:v("div",{className:"flex items-center",children:xA()})})]})]})]})})}function Kie(){const{hidingTabKeys:e}=Mt();return f.useMemo(()=>ky.filter(t=>!e.includes(t)),[e])}function Xie({className:e,style:t}){const n=Kie(),r=PC(),o=kee(Bee(EC)),i=Ve(s=>{const{over:a,active:l}=s;if(!a?.id||a.id===l.id)return;const c=r.indexOf(l.id.toString()),u=r.indexOf(a.id.toString()),d=IC(r,c,u);vo({customTabKeysOrder:d});});return v("div",{className:e,style:t,children:v(Jr.Group,{className:"block line-height-[unset]",value:n,onChange:s=>{if(!s.length)return ft.error("至少选择一项!");vo({hidingTabKeys:ky.filter(a=>!s.includes(a))});},children:v(Hte,{sensors:o,collisionDetection:Vee,onDragEnd:i,modifiers:[Qte,Yte],children:v(rne,{items:r,strategy:tne,children:r.map(s=>v(Yie,{id:s},s))})})})})}function Yie({id:e}){const{attributes:t,listeners:n,setNodeRef:r,transform:o,transition:i,setActivatorNodeRef:s}=une({id:e}),a={transform:fu.Transform.toString(o),transition:i},{label:l,desc:c}=Nl[e];return F("div",{ref:r,style:a,className:"mt-8px h-35px flex items-center justify-between b-1px b-gate-bg-lv-2 rounded-6px b-solid pl-10px pr-6px",...t,children:[F(Jr,{value:e,className:"inline-flex items-center [&_.ant-checkbox-label]:inline-flex [&_.ant-checkbox-label]:select-none [&_.ant-checkbox-label]:items-center",children:[v(Oo,{tabKey:e,className:"mr-5px"}),v(Jt,{align:{offset:[0,-6]},title:c,children:l})]}),v("div",{...n,ref:s,className:"cursor-grab rounded-5px px-5px py-3px text-size-0 hover:bg-gate-bg-lv-3",children:v(Uie,{className:"size-18px"})})]},e)}function Qie(){const{hideIds:e}=nt(Ue.dynamicFeed.whenViewAll),t=Ve(async o=>{await ii("dynamicFeed.whenViewAll.hideIds",{remove:[o]});}),{groups:n}=nt(At);return ir(()=>{At.updateGroups();}),e.length?v("div",{className:"max-h-250px flex flex-wrap gap-10px overflow-y-scroll",children:e.map(o=>v(XR,{tag:o,onDelete:t,renderTag:i=>v(Zie,{tag:i,followGroups:n})},o))}):v("div",{className:"flex items-center justify-center",children:v(Wr,{})})}function Zie({tag:e,followGroups:t}){let n,r;e.startsWith(Xa)?n=e.slice(Xa.length):e.startsWith(Bs)&&(r=e.slice(Bs.length));const[o,i]=f.useState(void 0);ir(async()=>{if(!n)return;const m=await Ju(n);m&&i(m);});const[s,a]=f.useState(void 0);ir(()=>{if(!r)return;const m=t?.find(p=>p.tagid.toString()===r)?.name;m&&a(m);});const l=f.useMemo(()=>n?o||n:r?s||r:"无效数据",[n,o,r,s]),c=f.useMemo(()=>n?`mid: ${n}`:r?`分组: ${r}`:`Tag: ${e}`,[n,r,e]),u=f.useMemo(()=>n?v(h6,{className:"mr-2px size-12px"}):r?v(g6,{className:"mr-2px size-16px"}):void 0,[n,r]),d=f.useMemo(()=>n?Bu(n):r?b6(r):void 0,[n,r]);return v($e,{children:v(Jt,{title:c,children:F("span",{className:H("inline-flex items-center",n?"cursor-pointer":"cursor-text"),children:[u,d?v("a",{href:d,target:"_blank",children:l}):l]})})})}const wA=f.createContext({}),SA=f.createContext({}),$A=({prefixCls:e,value:t,onChange:n})=>{const r=()=>{if(n&&t&&!t.cleared){const o=t.toHsb();o.a=0;const i=_n(o);i.cleared=true,n(i);}};return f.createElement("div",{className:`${e}-clear`,onClick:r})},EA="hex",IA="rgb",PA="hsb",Rs=({prefixCls:e,min:t=0,max:n=100,value:r,onChange:o,className:i,formatter:s})=>{const a=`${e}-steppers`,[l,c]=f.useState(0),u=Number.isNaN(r)?l:r;return f.createElement(Ba,{className:H(a,i),min:t,max:n,value:u,formatter:s,size:"small",onChange:d=>{c(d||0),o?.(d);}})},Jie=({prefixCls:e,value:t,onChange:n})=>{const r=`${e}-alpha-input`,[o,i]=f.useState(()=>_n(t||"#000")),s=t||o,a=l=>{const c=s.toHsb();c.a=(l||0)/100;const u=_n(c);i(u),n?.(u);};return f.createElement(Rs,{value:Ly(s),prefixCls:e,formatter:l=>`${l}%`,className:r,onChange:a})},ese=/(^#[\da-f]{6}$)|(^#[\da-f]{8}$)/i,tse=e=>ese.test(`#${e}`),nse=({prefixCls:e,value:t,onChange:n})=>{const r=`${e}-hex-input`,[o,i]=f.useState(()=>t?cc(t.toHexString()):void 0);f.useEffect(()=>{t&&i(cc(t.toHexString()));},[t]);const s=a=>{const l=a.target.value;i(cc(l)),tse(cc(l,true))&&n?.(_n(l));};return f.createElement(Ml,{className:r,value:o,prefix:"#",onChange:s,size:"small"})},rse=({prefixCls:e,value:t,onChange:n})=>{const r=`${e}-hsb-input`,[o,i]=f.useState(()=>_n(t||"#000")),s=t||o,a=(l,c)=>{const u=s.toHsb();u[c]=c==="h"?l:(l||0)/100;const d=_n(u);i(d),n?.(d);};return f.createElement("div",{className:r},f.createElement(Rs,{max:360,min:0,value:Number(s.toHsb().h),prefixCls:e,className:r,formatter:l=>af(l||0).toString(),onChange:l=>a(Number(l),"h")}),f.createElement(Rs,{max:100,min:0,value:Number(s.toHsb().s)*100,prefixCls:e,className:r,formatter:l=>`${af(l||0)}%`,onChange:l=>a(Number(l),"s")}),f.createElement(Rs,{max:100,min:0,value:Number(s.toHsb().b)*100,prefixCls:e,className:r,formatter:l=>`${af(l||0)}%`,onChange:l=>a(Number(l),"b")}))},ose=({prefixCls:e,value:t,onChange:n})=>{const r=`${e}-rgb-input`,[o,i]=f.useState(()=>_n(t||"#000")),s=t||o,a=(l,c)=>{const u=s.toRgb();u[c]=l||0;const d=_n(u);i(d),n?.(d);};return f.createElement("div",{className:r},f.createElement(Rs,{max:255,min:0,value:Number(s.toRgb().r),prefixCls:e,className:r,onChange:l=>a(Number(l),"r")}),f.createElement(Rs,{max:255,min:0,value:Number(s.toRgb().g),prefixCls:e,className:r,onChange:l=>a(Number(l),"g")}),f.createElement(Rs,{max:255,min:0,value:Number(s.toRgb().b),prefixCls:e,className:r,onChange:l=>a(Number(l),"b")}))},ise=[EA,PA,IA].map(e=>({value:e,label:e.toUpperCase()})),sse=e=>{const{prefixCls:t,format:n,value:r,disabledAlpha:o,onFormatChange:i,onChange:s,disabledFormat:a}=e,[l,c]=Bt(EA,n),u=`${t}-input`,d=p=>{c(p),i?.(p);},m=f.useMemo(()=>{const p={value:r,prefixCls:t,onChange:s};switch(l){case PA:return f.createElement(rse,{...p});case IA:return f.createElement(ose,{...p});default:return f.createElement(nse,{...p})}},[l,t,r,s]);return f.createElement("div",{className:`${u}-container`},!a&&f.createElement(is,{value:l,variant:"borderless",getPopupContainer:p=>p,popupMatchSelectWidth:68,placement:"bottomRight",onChange:d,className:`${t}-format-select`,size:"small",options:ise}),f.createElement("div",{className:u},m),!o&&f.createElement(Jie,{prefixCls:t,value:r,onChange:s}))},NA=e=>{const{prefixCls:t,colors:n,type:r,color:o,range:i=false,className:s,activeIndex:a,onActive:l,onDragStart:c,onDragChange:u,onKeyDelete:d,...m}=e,p={...m,track:false},h=f__namespace.useMemo(()=>`linear-gradient(90deg, ${n.map(I=>`${I.color} ${I.percent}%`).join(", ")})`,[n]),g=f__namespace.useMemo(()=>!o||!r?null:r==="alpha"?o.toRgbString():`hsl(${o.toHsb().h}, 100%, 50%)`,[o,r]),b=lt(c),y=lt(u),C=f__namespace.useMemo(()=>({onDragStart:b,onDragChange:y}),[]),x=lt((S,I)=>{const{onFocus:$,style:E,className:P,onKeyDown:M}=S.props,N={...E};return r==="gradient"&&(N.background=LP(n,I.value)),f__namespace.cloneElement(S,{onFocus:A=>{l?.(I.index),$?.(A);},style:N,className:H(P,{[`${t}-slider-handle-active`]:a===I.index}),onKeyDown:A=>{(A.key==="Delete"||A.key==="Backspace")&&d&&d(I.index),M?.(A);}})}),w=f__namespace.useMemo(()=>({direction:"ltr",handleRender:x}),[]);return f__namespace.createElement(M5.Provider,{value:w},f__namespace.createElement(N5.Provider,{value:C},f__namespace.createElement(A5,{...p,className:H(s,`${t}-slider`),tooltip:{open:false},range:{editable:i,minCount:2},styles:{rail:{background:h},handle:g?{background:g}:{}},classNames:{rail:`${t}-slider-rail`,handle:`${t}-slider-handle`}})))},ase=e=>{const{value:t,onChange:n,onChangeComplete:r}=e,o=s=>n(s[0]),i=s=>r(s[0]);return f__namespace.createElement(NA,{...e,value:[t],onChange:o,onChangeComplete:i})};function bE(e){return Et(e).sort((t,n)=>t.percent-n.percent)}const lse=e=>{const{prefixCls:t,mode:n,onChange:r,onChangeComplete:o,onActive:i,activeIndex:s,onGradientDragging:a,colors:l}=e,c=n==="gradient",u=f__namespace.useMemo(()=>l.map(y=>({percent:y.percent,color:y.color.toRgbString()})),[l]),d=f__namespace.useMemo(()=>u.map(y=>y.percent),[u]),m=f__namespace.useRef(u),p=({rawValues:y,draggingIndex:C,draggingValue:x})=>{if(y.length>u.length){const w=LP(u,x),S=Et(u);S.splice(C,0,{percent:x,color:w}),m.current=S;}else m.current=u;a(true),r(new pr(bE(m.current)),true);},h=({deleteIndex:y,draggingIndex:C,draggingValue:x})=>{let w=Et(m.current);y!==-1?w.splice(y,1):(w[C]={...w[C],percent:x},w=bE(w)),r(new pr(w),true);},g=y=>{const C=Et(u);C.splice(y,1);const x=new pr(C);r(x),o(x);},b=y=>{o(new pr(u)),s>=y.length&&i(y.length-1),a(false);};return c?f__namespace.createElement(NA,{min:0,max:100,prefixCls:t,className:`${t}-gradient-slider`,colors:u,color:null,value:d,range:true,onChangeComplete:b,disabled:false,type:"gradient",activeIndex:s,onActive:i,onDragStart:p,onDragChange:h,onKeyDelete:g}):null},cse=f__namespace.memo(lse),use={slider:ase},vE=()=>{const e=f.useContext(wA),{mode:t,onModeChange:n,modeOptions:r,prefixCls:o,allowClear:i,value:s,disabledAlpha:a,onChange:l,onClear:c,onChangeComplete:u,activeIndex:d,gradientDragging:m,...p}=e,h=f.useMemo(()=>s.cleared?[{percent:0,color:new pr("")},{percent:100,color:new pr("")}]:s.getColors(),[s]),g=!s.isGradient(),[b,y]=f.useState(s);Kt(()=>{g||y(h[d]?.color);},[g,h,m,d]);const C=f.useMemo(()=>g?s:m?b:h[d]?.color,[h,s,d,g,b,m]),[x,w]=f.useState(C),[S,I]=G3(),$=x?.equals(C)?C:x;Kt(()=>{w(C);},[S,C?.toHexString()]);const E=(R,L)=>{let V=_n(R);if(s.cleared){const z=V.toRgb();if(!z.r&&!z.g&&!z.b&&L){const{type:D,value:W=0}=L;V=new pr({h:D==="hue"?W:0,s:1,b:1,a:D==="alpha"?W/100:1});}else V=lf(V);}if(t==="single")return V;const _=Et(h);return _[d]={..._[d],color:V},new pr(_)},P=(R,L,V)=>{const _=E(R,V);w(_.isGradient()?_.getColors()[d].color:_),l(_,L);},M=(R,L)=>{u(E(R,L)),I();},N=R=>{l(E(R));};let A=null;const k=r.length>1;return (i||k)&&(A=f.createElement("div",{className:`${o}-operation`},k&&f.createElement(b4,{size:"small",options:r,value:t,onChange:n}),f.createElement($A,{prefixCls:o,value:s,onChange:R=>{l(R),c?.();},...p}))),f.createElement(f.Fragment,null,A,f.createElement(cse,{...e,colors:h}),f.createElement(RD,{prefixCls:o,value:$?.toHsb(),disabledAlpha:a,onChange:(R,L)=>{P(R,true,L);},onChangeComplete:(R,L)=>{M(R,L);},components:use}),f.createElement(sse,{value:C,onChange:N,prefixCls:o,disabledAlpha:a,...p}))},yE=()=>{const{prefixCls:e,value:t,presets:n,onChange:r}=f.useContext(SA);return Array.isArray(n)?f.createElement(A7,{value:t,presets:n,prefixCls:e,onChange:r}):null},dse=e=>{const{prefixCls:t,presets:n,panelRender:r,value:o,onChange:i,onClear:s,allowClear:a,disabledAlpha:l,mode:c,onModeChange:u,modeOptions:d,onChangeComplete:m,activeIndex:p,onActive:h,format:g,onFormatChange:b,gradientDragging:y,onGradientDragging:C,disabledFormat:x}=e,w=`${t}-inner`,S=f.useMemo(()=>({prefixCls:t,value:o,onChange:i,onClear:s,allowClear:a,disabledAlpha:l,mode:c,onModeChange:u,modeOptions:d,onChangeComplete:m,activeIndex:p,onActive:h,format:g,onFormatChange:b,gradientDragging:y,onGradientDragging:C,disabledFormat:x}),[t,o,i,s,a,l,c,u,d,m,p,h,g,b,y,C,x]),I=f.useMemo(()=>({prefixCls:t,value:o,presets:n,onChange:i}),[t,o,n,i]),$=f.createElement("div",{className:`${w}-content`},f.createElement(vE,null),Array.isArray(n)&&f.createElement(tl,null),f.createElement(yE,null));return f.createElement(wA.Provider,{value:S},f.createElement(SA.Provider,{value:I},f.createElement("div",{className:w},typeof r=="function"?r($,{components:{Picker:vE,Presets:yE}}):$)))},fse=f.forwardRef((e,t)=>{const{color:n,prefixCls:r,open:o,disabled:i,format:s,className:a,showText:l,activeIndex:c,...u}=e,d=`${r}-trigger`,m=`${d}-text`,p=`${m}-cell`,[h]=ar("ColorPicker"),g=f.useMemo(()=>{if(!l)return "";if(typeof l=="function")return l(n);if(n.cleared)return h.transparent;if(n.isGradient())return n.getColors().map((x,w)=>{const S=c!==-1&&c!==w;return f.createElement("span",{key:w,className:H(p,S&&`${p}-inactive`)},x.color.toRgbString()," ",x.percent,"%")});const y=n.toHexString().toUpperCase(),C=Ly(n);switch(s){case "rgb":return n.toRgbString();case "hsb":return n.toHsbString();default:return C<100?`${y.slice(0,7)},${C}%`:y}},[n,s,l,c,h.transparent,p]),b=f.useMemo(()=>n.cleared?f.createElement($A,{prefixCls:r}):f.createElement(Fy,{prefixCls:r,color:n.toCssString()}),[n,r]);return f.createElement("div",{ref:t,className:H(d,a,{[`${d}-active`]:o,[`${d}-disabled`]:i}),...or(u)},b,l&&f.createElement("div",{className:m},g))});function mse(e,t,n){const[r]=ar("ColorPicker"),[o,i]=Bt(e,t),[s,a]=f__namespace.useState("single"),[l,c]=f__namespace.useMemo(()=>{const g=(Array.isArray(n)?n:[n]).filter(x=>x);g.length||g.push("single");const b=new Set(g),y=[],C=(x,w)=>{b.has(x)&&y.push({label:w,value:x});};return C("single",r.singleColor),C("gradient",r.gradientColor),[y,b]},[n,r.singleColor,r.gradientColor]),[u,d]=f__namespace.useState(null),m=lt(g=>{d(g),i(g);}),p=f__namespace.useMemo(()=>{const g=_n(o||"");return g.equals(u)?u:g},[o,u]),h=f__namespace.useMemo(()=>c.has(s)?s:l[0]?.value,[c,s,l]);return f__namespace.useEffect(()=>{a(p.isGradient()?"gradient":"single");},[p]),[p,m,h,a,l]}const MA=(e,t)=>({backgroundImage:`conic-gradient(${t} 25%, transparent 25% 50%, ${t} 50% 75%, transparent 75% 100%)`,backgroundSize:`${e} ${e}`}),CE=(e,t)=>{const{componentCls:n,borderRadiusSM:r,colorPickerInsetShadow:o,lineWidth:i,colorFillSecondary:s}=e;return {[`${n}-color-block`]:{position:"relative",borderRadius:r,width:t,height:t,boxShadow:o,flex:"none",...MA("50%",e.colorFillSecondary),[`${n}-color-block-inner`]:{width:"100%",height:"100%",boxShadow:`inset 0 0 0 ${X(i)} ${s}`,borderRadius:"inherit"}}}},pse=e=>{const{componentCls:t,antCls:n,fontSizeSM:r,lineHeightSM:o,colorPickerAlphaInputWidth:i,marginXXS:s,paddingXXS:a,controlHeightSM:l,marginXS:c,fontSizeIcon:u,paddingXS:d,colorTextPlaceholder:m,colorPickerInputNumberHandleWidth:p,lineWidth:h}=e;return {[`${t}-input-container`]:{display:"flex",[`${t}-steppers${n}-input-number`]:{fontSize:r,lineHeight:o,padding:0,[`${n}-input-number-input`]:{paddingInlineStart:a,paddingInlineEnd:0},[`${n}-input-number-handler-wrap`]:{width:p}},[`${t}-steppers${t}-alpha-input`]:{flex:`0 0 ${X(i)}`,marginInlineStart:s},[`${t}-format-select${n}-select`]:{marginInlineEnd:c,width:"auto","&-single":{[`${n}-select-selector`]:{padding:0,border:0},[`${n}-select-arrow`]:{insetInlineEnd:0},[`${n}-select-selection-item`]:{paddingInlineEnd:e.calc(u).add(s).equal(),fontSize:r,lineHeight:X(l)},[`${n}-select-item-option-content`]:{fontSize:r,lineHeight:o},[`${n}-select-dropdown`]:{[`${n}-select-item`]:{minHeight:"auto"}}}},[`${t}-input`]:{gap:s,alignItems:"center",flex:1,width:0,[`${t}-hsb-input,${t}-rgb-input`]:{height:l,display:"flex",gap:s,alignItems:"center"},[`${t}-steppers`]:{flex:1},[`${t}-hex-input${n}-input-affix-wrapper`]:{flex:1,padding:`0 ${X(d)}`,[`${n}-input`]:{fontSize:r,textTransform:"uppercase",lineHeight:X(e.calc(l).sub(e.calc(h).mul(2)).equal())},[`${n}-input-prefix`]:{color:m}}}}}},hse=e=>{const{componentCls:t,controlHeightLG:n,borderRadiusSM:r,colorPickerInsetShadow:o,marginSM:i,colorBgElevated:s,colorFillSecondary:a,lineWidthBold:l,colorPickerHandlerSize:c}=e;return {userSelect:"none",[`${t}-select`]:{[`${t}-palette`]:{minHeight:e.calc(n).mul(4).equal(),overflow:"hidden",borderRadius:r},[`${t}-saturation`]:{position:"absolute",borderRadius:"inherit",boxShadow:o,inset:0},marginBottom:i},[`${t}-handler`]:{width:c,height:c,border:`${X(l)} solid ${s}`,position:"relative",borderRadius:"50%",cursor:"pointer",boxShadow:`${o}, 0 0 0 1px ${a}`}}},gse=e=>{const{componentCls:t,antCls:n,colorTextQuaternary:r,paddingXXS:o,colorPickerPresetColorSize:i,fontSizeSM:s,colorText:a,lineHeightSM:l,lineWidth:c,borderRadius:u,colorFill:d,colorWhite:m,marginXXS:p,paddingXS:h,fontHeightSM:g}=e;return {[`${t}-presets`]:{[`${n}-collapse-item > ${n}-collapse-header`]:{padding:0,[`${n}-collapse-expand-icon`]:{height:g,color:r,paddingInlineEnd:o}},[`${n}-collapse`]:{display:"flex",flexDirection:"column",gap:p},[`${n}-collapse-item > ${n}-collapse-panel > ${n}-collapse-body`]:{padding:`${X(h)} 0`},"&-label":{fontSize:s,color:a,lineHeight:l},"&-items":{display:"flex",flexWrap:"wrap",gap:e.calc(p).mul(1.5).equal(),[`${t}-presets-color`]:{position:"relative",cursor:"pointer",width:i,height:i,"&::before":{content:'""',pointerEvents:"none",width:e.calc(i).add(e.calc(c).mul(4)).equal(),height:e.calc(i).add(e.calc(c).mul(4)).equal(),position:"absolute",top:e.calc(c).mul(-2).equal(),insetInlineStart:e.calc(c).mul(-2).equal(),borderRadius:u,border:`${X(c)} solid transparent`,transition:`border-color ${e.motionDurationMid} ${e.motionEaseInBack}`},"&:hover::before":{borderColor:d},"&::after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:e.calc(i).div(13).mul(5).equal(),height:e.calc(i).div(13).mul(8).equal(),border:`${X(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`},[`&${t}-presets-color-checked`]:{"&::after":{opacity:1,borderColor:m,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`transform ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`},[`&${t}-presets-color-bright`]:{"&::after":{borderColor:"rgba(0, 0, 0, 0.45)"}}}}},"&-empty":{fontSize:s,color:r}}}},bse=e=>{const{componentCls:t,colorPickerInsetShadow:n,colorBgElevated:r,colorFillSecondary:o,lineWidthBold:i,colorPickerHandlerSizeSM:s,colorPickerSliderHeight:a,marginSM:l,marginXS:c}=e,u=e.calc(s).sub(e.calc(i).mul(2).equal()).equal(),d=e.calc(s).add(e.calc(i).mul(2).equal()).equal(),m={"&:after":{transform:"scale(1)",boxShadow:`${n}, 0 0 0 1px ${e.colorPrimaryActive}`}};return {[`${t}-slider`]:[MA(X(a),e.colorFillSecondary),{margin:0,padding:0,height:a,borderRadius:e.calc(a).div(2).equal(),"&-rail":{height:a,borderRadius:e.calc(a).div(2).equal(),boxShadow:n},[`& ${t}-slider-handle`]:{width:u,height:u,top:0,borderRadius:"100%","&:before":{display:"block",position:"absolute",background:"transparent",left:{_skip_check_:true,value:"50%"},top:"50%",transform:"translate(-50%, -50%)",width:d,height:d,borderRadius:"100%"},"&:after":{width:s,height:s,border:`${X(i)} solid ${r}`,boxShadow:`${n}, 0 0 0 1px ${o}`,outline:"none",insetInlineStart:e.calc(i).mul(-1).equal(),top:e.calc(i).mul(-1).equal(),background:"transparent",transition:"none"},"&:focus":m}}],[`${t}-slider-container`]:{display:"flex",gap:l,marginBottom:l,[`${t}-slider-group`]:{flex:1,flexDirection:"column",justifyContent:"space-between",display:"flex","&-disabled-alpha":{justifyContent:"center"}}},[`${t}-gradient-slider`]:{marginBottom:c,[`& ${t}-slider-handle`]:{"&:after":{transform:"scale(0.8)"},"&-active, &:focus":m}}}},I0=(e,t,n)=>({borderInlineEndWidth:e.lineWidth,borderColor:t,boxShadow:`0 0 0 ${X(e.controlOutlineWidth)} ${n}`,outline:0}),vse=e=>{const{componentCls:t}=e;return {"&-rtl":{[`${t}-presets-color`]:{"&::after":{direction:"ltr"}},[`${t}-clear`]:{"&::after":{direction:"ltr"}}}}},xE=(e,t,n)=>{const{componentCls:r,borderRadiusSM:o,lineWidth:i,colorSplit:s,colorBorder:a,red6:l}=e;return {[`${r}-clear`]:{width:t,height:t,borderRadius:o,border:`${X(i)} solid ${s}`,position:"relative",overflow:"hidden",cursor:"inherit",transition:`all ${e.motionDurationFast}`,...n,"&::after":{content:'""',position:"absolute",insetInlineEnd:e.calc(i).mul(-1).equal(),top:e.calc(i).mul(-1).equal(),display:"block",width:40,height:2,transformOrigin:"calc(100% - 1px) 1px",transform:"rotate(-45deg)",backgroundColor:l},"&:hover":{borderColor:a}}}},yse=e=>{const{componentCls:t,colorError:n,colorWarning:r,colorErrorHover:o,colorWarningHover:i,colorErrorOutline:s,colorWarningOutline:a}=e;return {[`&${t}-status-error`]:{borderColor:n,"&:hover":{borderColor:o},[`&${t}-trigger-active`]:{...I0(e,n,s)}},[`&${t}-status-warning`]:{borderColor:r,"&:hover":{borderColor:i},[`&${t}-trigger-active`]:{...I0(e,r,a)}}}},Cse=e=>{const{componentCls:t,controlHeightLG:n,controlHeightSM:r,controlHeight:o,controlHeightXS:i,borderRadius:s,borderRadiusSM:a,borderRadiusXS:l,borderRadiusLG:c,fontSizeLG:u}=e;return {[`&${t}-lg`]:{minWidth:n,minHeight:n,borderRadius:c,[`${t}-color-block, ${t}-clear`]:{width:o,height:o,borderRadius:s},[`${t}-trigger-text`]:{fontSize:u}},[`&${t}-sm`]:{minWidth:r,minHeight:r,borderRadius:a,[`${t}-color-block, ${t}-clear`]:{width:i,height:i,borderRadius:l},[`${t}-trigger-text`]:{lineHeight:X(i)}}}},xse=e=>{const{antCls:t,componentCls:n,colorPickerWidth:r,colorPrimary:o,motionDurationMid:i,colorBgElevated:s,colorTextDisabled:a,colorText:l,colorBgContainerDisabled:c,borderRadius:u,marginXS:d,marginSM:m,controlHeight:p,controlHeightSM:h,colorBgTextActive:g,colorPickerPresetColorSize:b,colorPickerPreviewSize:y,lineWidth:C,colorBorder:x,paddingXXS:w,fontSize:S,colorPrimaryHover:I,controlOutline:$}=e;return [{[n]:{[`${n}-inner`]:{"&-content":{display:"flex",flexDirection:"column",width:r,[`& > ${t}-divider`]:{margin:`${X(m)} 0 ${X(d)}`}},[`${n}-panel`]:{...hse(e)},...bse(e),...CE(e,y),...pse(e),...gse(e),...xE(e,b,{marginInlineStart:"auto"}),[`${n}-operation`]:{display:"flex",justifyContent:"space-between",marginBottom:d}},"&-trigger":{minWidth:p,minHeight:p,borderRadius:u,border:`${X(C)} solid ${x}`,cursor:"pointer",display:"inline-flex",alignItems:"flex-start",justifyContent:"center",transition:`all ${i}`,background:s,padding:e.calc(w).sub(C).equal(),[`${n}-trigger-text`]:{marginInlineStart:d,marginInlineEnd:e.calc(d).sub(e.calc(w).sub(C)).equal(),fontSize:S,color:l,alignSelf:"center","&-cell":{"&:not(:last-child):after":{content:'", "'},"&-inactive":{color:a}}},"&:hover":{borderColor:I},[`&${n}-trigger-active`]:{...I0(e,o,$)},"&-disabled":{color:a,background:c,cursor:"not-allowed","&:hover":{borderColor:g},[`${n}-trigger-text`]:{color:a}},...xE(e,h),...CE(e,h),...yse(e),...Cse(e)},...vse(e)}},bl(e,{focusElCls:`${n}-trigger-active`})]},wse=xt("ColorPicker",e=>{const{colorTextQuaternary:t,marginSM:n}=e,r=8,o=vt(e,{colorPickerWidth:234,colorPickerHandlerSize:16,colorPickerHandlerSizeSM:12,colorPickerAlphaInputWidth:44,colorPickerInputNumberHandleWidth:16,colorPickerPresetColorSize:24,colorPickerInsetShadow:`inset 0 0 1px 0 ${t}`,colorPickerSliderHeight:r,colorPickerPreviewSize:e.calc(r).mul(2).add(n).equal()});return xse(o)}),UC=e=>{const{mode:t,value:n,defaultValue:r,format:o,defaultFormat:i,allowClear:s=false,presets:a,children:l,trigger:c="click",open:u,disabled:d,placement:m="bottomLeft",arrow:p=true,panelRender:h,showText:g,style:b,className:y,size:C,rootClassName:x,prefixCls:w,styles:S,classNames:I,disabledAlpha:$=false,onFormatChange:E,onChange:P,onClear:M,onOpenChange:N,onChangeComplete:A,getPopupContainer:k,autoAdjustOverflow:R=true,destroyTooltipOnHide:L,destroyOnHidden:V,disabledFormat:_,...z}=e,{getPrefixCls:D,direction:W,className:O,style:B,classNames:j,styles:Y}=St("colorPicker"),q=f.useContext(zn),U=d??q,K=D("color-picker",w),{compactSize:J,compactItemClassnames:Q}=li(K,W),G=Vn(Ne=>C??J??Ne),ee={...e,trigger:c,allowClear:s,autoAdjustOverflow:R,disabledAlpha:$,arrow:p,placement:m,disabled:U,size:G},[re,oe]=It([j,I],[Y,S],{props:ee},{popup:{_default:"root"}}),[be,Z]=Bt(false,u),te=!U&&be,[ce,ue]=Bt(i,o),he=Ne=>{ue(Ne),ce!==Ne&&E?.(Ne);},ye=Ne=>{(!Ne||!U)&&(Z(Ne),N?.(Ne));},[pe,ie,ge,Se,ke]=mse(r,n,t),qe=f.useMemo(()=>Ly(pe)<100,[pe]),[De,ze]=f.useState(null),je=Ne=>{if(A){let ae=_n(Ne);$&&qe&&(ae=lf(Ne)),A(ae);}},Le=(Ne,ae)=>{let ve=_n(Ne);$&&qe&&(ve=lf(ve)),ie(ve),ze(null),P&&P(ve,ve.toCssString()),ae||je(ve);},[we,Me]=f.useState(0),[Fe,Re]=f.useState(false),Pe=Ne=>{if(Se(Ne),Ne==="single"&&pe.isGradient())Me(0),Le(new pr(pe.getColors()[0].color)),ze(pe);else if(Ne==="gradient"&&!pe.isGradient()){const ae=qe?lf(pe):pe;Le(new pr(De||[{percent:0,color:ae},{percent:100,color:ae}]));}},{status:Qe}=f.useContext(Zn),mt=sn(K),[it,ct]=wse(K,mt),bt={[`${K}-rtl`]:W},pt=H(re.root,x,ct,mt,bt),rt=H(Gi(K,Qe),{[`${K}-sm`]:G==="small",[`${K}-lg`]:G==="large"},Q,O,pt,y,it),et=H(K,pt,re.popup?.root),Xe={open:te,trigger:c,placement:m,arrow:p,rootClassName:x,getPopupContainer:k,autoAdjustOverflow:R,destroyOnHidden:V??!!L},Ie={...oe.root,...B,...b};return f.createElement(ko,{classNames:{root:et},styles:{root:oe.popup?.root,container:S?.popupOverlayInner},onOpenChange:ye,content:f.createElement(Hi,{form:true},f.createElement(dse,{mode:ge,onModeChange:Pe,modeOptions:ke,prefixCls:K,value:pe,allowClear:s,disabled:U,disabledAlpha:$,presets:a,panelRender:h,format:ce,onFormatChange:he,onChange:Le,onChangeComplete:je,onClear:M,activeIndex:we,onActive:Me,gradientDragging:Fe,onGradientDragging:Re,disabledFormat:_})),...Xe},l||f.createElement(fse,{activeIndex:te?we:-1,open:te,className:rt,style:Ie,prefixCls:K,disabled:U,showText:g,format:ce,...z,color:pe}))},Sse=r1(UC,void 0,e=>({...e,placement:"bottom",autoAdjustOverflow:false}),"color-picker",e=>e);UC._InternalPanelDoNotUseOrYouWillBeFired=Sse;function yu({size:e=18,useAnimation:t=false,color:n="currentColor",...r}){return v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:e,...r,children:v(framerMotion.motion.path,{fill:"transparent",stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 11L11 17L21 7",...t&&{initial:{pathLength:0},animate:{pathLength:1},transition:{duration:.2,ease:"easeInOut"}}})})}function $se(){const e=_M().id,t=jy(e),{colorPickerThemeSelectedColor:n}=Mt(),[r,o]=f.useState(n||Za.colorPrimary),i=f.useMemo(()=>typeof r=="string"?r:r.toHexString(),[r]);return ir(()=>{dp.updateThrottled();}),v("div",{children:zM.map(({name:s,themes:a,tooltip:l})=>F(f.Fragment,{children:[F("div",{className:"mt-2 flex items-center text-size-1.5em",children:[s,v(Mn,{className:"size-16px",useBlackBg:true,children:l})]}),v("div",{className:"flex flex-wrap gap-x-5px gap-y-2px",children:a.map(c=>{const u=e===c.id,d=c.isCustom,m=!!t&&t!==c.id,p=28,h=p+8;let g=v("div",{"data-role":"preview-wrapper",style:{width:h},className:H("mx-auto my-0 aspect-1 b-2px rounded-full b-solid",u?"b-gate-primary":"b-transparent","flex items-center justify-center text-size-0"),children:v("div",{"data-role":"preview",className:"aspect-1 flex items-center justify-center rounded-full text-white",css:Dt("width:",p,"px;background-color:",d?i:c.colorPrimary,";",""),children:u&&v(yu,{size:18,useAnimation:m})})});c.isCustom&&(g=v(UC,{value:r,onChange:y=>o(y),onOpenChange:y=>{y||vo({colorPickerThemeSelectedColor:i});},children:g}));let b=F("div",{className:"min-w-60px cursor-pointer text-center",onClick:y=>{vo({theme:c.id});},children:[g,c.name]});return (c.tooltip||O$[c.id])&&(b=v(Jt,{title:F($e,{children:[c.tooltip,O$[c.id]]}),color:c.colorPrimary,children:b})),b=v(f.Fragment,{children:b},c.id),b})})]},s))})}function wE(e,t,n){return qr(e,r=>{if(ui())return;const i=!!!nr(Ue,t);sl(Ue,t,i),ft.success(`已${i?"启用":"禁用"}「${n}」`);},{exactMatch:true})}const Ese="basic",SE=tn({tab:Ese});function Ise(){return wE(["shift.p"],"videoCard.imgPreview.autoPreviewWhenKeyboardSelect","键盘选中后自动开始预览"),wE(["shift.m"],"videoCard.imgPreview.autoPreviewWhenHover","鼠标悬浮后自动开始预览"),OJ(),null}const Pse={name:"4k370z",styles:"&.ant-tabs{.ant-tabs-tab{justify-content:end;padding-inline:5px 15px;}.ant-tabs-nav-operations{display:none;}}"};function Nse({show:e,onHide:t}){const{tab:n}=nt(SE);return F(Gu,{show:e,onHide:t,hideWhenMaskOnClick:true,hideWhenEsc:true,width:900,clsModal:"max-h-unset",children:[F("div",{className:rr.modalHeader,children:[F("div",{className:rr.modalTitle,children:[v(pM,{className:"mr-4px mt--2px size-26px"}),"设置"]}),v(Ku,{onClick:t})]}),v("main",{className:rr.modalBody,style:{overflow:"hidden"},children:v(P5,{tabPlacement:"start",size:"middle",css:Pse,activeKey:n,onChange:r=>SE.tab=r,items:[{label:"常规设置",key:"basic",children:v(TJ,{})},{label:"内容过滤",key:"filter",children:v(yee,{})},{label:"主题选择",key:"theme-select",children:v("div",{className:fr.tabPane,children:v($se,{})})},{label:"样式自定",key:"custom-ui",children:v(FJ,{})},{label:"Tab 设置",key:"video-source-tab-config",children:v(Gie,{})},{label:"其他页面",key:"other-pages",children:v(xee,{})},{label:"高级设置",key:"advance",children:v(YX,{})}]})})]})}const Mse=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,d:"m19 12l12 12l-12 12"})]}),RA=f.forwardRef(Mse),Rse=f.forwardRef(function({children:t,initialOpen:n=false},r){const[o,i]=ZP(n);f.useImperativeHandle(r,()=>i,[i]);const s=v(Je,{onClick:i.toggle,className:"icon-only-round-button",children:v(RA,{className:H("size-13px",o?"rotate-z-0":"rotate-z-180deg")})});return F($e,{children:[s,o&&t]})});function AA({Component:e,defaultProps:t,containerClassName:n}){const r=tn(t);function o(){const l=nt(r);return v(e,{...l})}const i=wu(()=>{const l=document.createElement("div");l.className=H(zo,n),document.body.appendChild(l),Ho.createRoot(l).render(v(fi,{children:v(o,{})}));});function s(l){return (...c)=>(i(),l(...c))}const a=s(l=>{Object.assign(r,l);});return {WrappedComponent:o,proxyProps:r,mount:i,wrapAction:s,updateProps:a}}const Im=c6();function Ase(){return nt(Im)}function Tse(e){const t=Ase();return e?t.get(e):void 0}function Ose(e){Im.delete(e);}const Fse={show:false,reasons:[],onHide:Bse,okAction:void 0},{proxyProps:Lse,updateProps:TA}=AA({Component:Dse,containerClassName:"show-dislike-container",defaultProps:Fse}),OA=new Or;function Bse(){OA.emit("modal-close"),TA({show:false,reasons:[],okAction:void 0});}async function kse(e,t){TA({show:true,reasons:e,okAction:t}),await OA.once("modal-close");}const FA=function(){return nt(Lse).show};function Dse({show:e,reasons:t,onHide:n,okAction:r}){const o=f.useRef(null),i=()=>!!e&&!!t?.length,s=qi(async p=>r?.(p),{manual:true}),a=s.loading,[l,c]=f.useState(t.length-1);Kz(()=>{c(t.length-1);},[t]);const u=["1","2","3","4","5","6"];qr(u,p=>{if(!i()||!u.includes(p.key)||!t?.length)return;const h=Number(p.key)-1;h>=0&&h<t.length&&c(h);});const d=Ve(p=>{if(!i()||ui())return;const h=t.length;let g=l+p;g<0&&(g=g%h+h),g>h-1&&(g=g%h),c(g);});qr("uparrow",()=>d(-1),{exactMatch:true}),qr("downarrow",()=>d(1),{exactMatch:true});const m=Lu(async p=>{if(!i()||l<0||l>t.length-1)return;const h=t[l];if(!h)return;p.preventDefault(),p.stopPropagation(),await s.runAsync(h)&&n();});return qr("enter",m,{exactMatch:true}),F(Gu,{show:e,onHide:n,hideWhenMaskOnClick:true,hideWhenEsc:true,width:350,clsModal:"rounded-15px",children:[F("div",{className:rr.modalHeader,children:[F("div",{className:rr.modalTitle,children:[v(N1,{className:"size-25px"}),v("span",{className:"ml-5px",children:"我不想看"}),F(Mn,{children:["选择后将减少相似内容推荐 ",v("br",{}),"操作说明: ",v("br",{}),F("div",{className:"ml-10px",children:["1. 使用删除键打开弹窗, Esc 关闭 ",v("br",{}),"2. 数字键 或 方向键选择 ",v("br",{}),"3. 回车键 或 确定按钮提交 ",v("br",{})]})]})]}),v(Ku,{onClick:n})]}),v("div",{className:rr.modalBody,ref:o,children:v($p,{spinning:a,indicator:YR,children:v("div",{className:"reason-list mb-20px mt-20px flex flex-col gap-y-10px",children:t.map((p,h)=>{const g=h===l;return F("button",{"data-id":p.id,className:H("reason",{active:g},"relative flex cursor-pointer items-center b-2px rounded-6px b-solid bg-transparent px-6px py-12px",g?"b-gate-primary":"b-gate-border"),disabled:a,onClick:()=>{c(h);},children:[v("span",{"data-cls":"reason-no",className:"size-20px flex flex-none items-center justify-center rounded-full bg-gate-primary text-13px color-white",children:h+1}),v("span",{className:"flex-1 px-4px text-14px",children:p.name}),v("span",{className:"size-20px flex-none",children:g&&v(yu,{className:"h-100% w-100% color-gate-primary",useAnimation:true})})]},p.id)})})})}),F("div",{className:"mt-2 flex items-center justify-end gap-x-10px",children:[v(Je,{onClick:n,children:"取消"}),v(Je,{type:"primary",onClick:m,loading:a,children:"确定"})]})]})}const zse=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,d:"m10 8l-6 6l6 6m28 8l6 6l-6 6M4 14h40M4 34h40"})]}),GC=f.forwardRef(zse),_se={show:false,srcFavFolderId:void 0,onHide:Vse,okAction:void 0},{proxyProps:Hse,updateProps:LA}=AA({Component:jse,containerClassName:"ModalMoveFav",defaultProps:_se});function BA(){return nt(Hse).show}const kA=new Or;function Vse(){LA({show:false}),kA.emit("modal-close");}async function Pm(e,t){LA({show:true,srcFavFolderId:e,okAction:t}),await kA.once("modal-close");}function jse({show:e,onHide:t,srcFavFolderId:n,okAction:r}){const o=qi(gC,{manual:true}),i=qi(async p=>r?.(p),{manual:true}),[s,a]=f.useState(void 0),[l,c]=f.useState(void 0);f.useEffect(()=>{e&&o.run();},[e]),qr("r",()=>{e&&(ui()||o.run(true));},{exactMatch:true});const{folders:u}=nt(kt),d=f.useMemo(()=>{const p=u.map((y,C)=>({...y,vol:C+1}));if(!l)return p;const h=p.filter(y=>y.title.includes(l)),g=p.filter(y=>y.title.toLowerCase().includes(l.toLowerCase())),b=p.filter(y=>PT.match(y.title,l));return Yi([...h,...g,...b],y=>y.id)},[u,l]),m=Ve(async()=>{if(!s)return ft.error("请选择一个收藏夹");await i.runAsync(s)&&t();});return F(Gu,{show:e,onHide:t,hideWhenMaskOnClick:true,hideWhenEsc:true,width:920,clsModal:"rounded-15px",children:[F("div",{className:rr.modalHeader,children:[F("div",{className:"flex shrink-0 items-center",children:[F("div",{className:rr.modalTitle,children:[v(GC,{className:"size-25px"}),v("span",{className:"ml-5px",children:"选择目标收藏夹"})]}),v(yo,{className:"ml-15px",style:{width:200},allowClear:true,placeholder:"过滤: 支持拼音 / 首字母",value:l,onChange:p=>c(p.target.value)}),!!l&&F("span",{className:"ml-5px",children:[v("span",{className:H({"text-red":u.length&&!d.length}),children:d.length})," ","/ ",v("span",{children:u.length})]}),F(Mn,{className:"ml-5px",children:["1. 使用 ",v("kbd",{className:f0,children:"r"})," 刷新收藏夹 ",v("br",{}),"2. 使用 ",v("kbd",{className:f0,children:"esc"})," 取消操作, 关闭窗口 ",v("br",{}),"3. 使用 拼音 / 首字母 过滤收藏夹标题 ",v("br",{})]})]}),v(Ku,{onClick:t})]}),v("div",{className:H(rr.modalBody),children:v($p,{spinning:o.loading||i.loading,indicator:YR,children:v("div",{className:"grid grid-cols-4 mb-10px min-h-100px items-start gap-10px pr-15px",children:d.length?d.map(p=>{const h=p.id===n,g=!h&&p.id===s?.id;return F("button",{"data-id":p.id,className:H({active:g},"relative flex items-center b-2px b-gate-border rounded-6px b-solid bg-transparent px-4px py-12px",!h&&"hover:bg-gate-bg-lv1",h?"cursor-not-allowed":"cursor-pointer",g&&"b-gate-primary color-white bg-gate-primary!"),disabled:h,onClick:()=>{a({id:p.id,title:p.title});},children:[v("span",{className:"size-24px flex-center flex-none rounded-full bg-gate-bg-lv-2 text-center text-13px color-gate-text",children:p.vol}),F("span",{className:"flex-1 px-4px text-12px",children:[p.title," (",p.media_count,")"]}),v("span",{className:"size-20px flex-none",children:g&&v(yu,{className:"h-100% w-100% color-white",useAnimation:true})})]},p.id)}):v(Wr,{className:"grid-col-span-full",image:Wr.PRESENTED_IMAGE_SIMPLE,description:"未找到收藏夹",children:"无过滤结果, 请清除过滤词!"})})})}),F("div",{className:"mt-2 flex items-center justify-between",children:[v("div",{className:"flex-v-center gap-x-10px",children:F("a",{href:`https://space.bilibili.com/${Lr()}/favlist`,target:"_blank",className:"flex-v-center gap-x-1",children:[v(bo,{className:"relative top--1px size-13px"}),"去个人空间新建收藏夹"]})}),F("div",{className:"flex-v-center gap-x-10px",children:[v(Je,{onClick:t,children:"取消"}),v(Je,{type:"primary",onClick:m,loading:i.loading,children:"确定"})]})]})]})}var P0=new Map,Wd=new WeakMap,$E=0,Wse;function qse(e){return e?(Wd.has(e)||($E+=1,Wd.set(e,$E.toString())),Wd.get(e)):"0"}function Use(e){return Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>`${t}_${t==="root"?qse(e.root):e[t]}`).toString()}function Gse(e){const t=Use(e);let n=P0.get(t);if(!n){const r=new Map;let o;const i=new IntersectionObserver(s=>{s.forEach(a=>{var l;const c=a.isIntersecting&&o.some(u=>a.intersectionRatio>=u);e.trackVisibility&&typeof a.isVisible>"u"&&(a.isVisible=c),(l=r.get(a.target))==null||l.forEach(u=>{u(c,a);});});},e);o=i.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:i,elements:r},P0.set(t,n);}return n}function Kse(e,t,n={},r=Wse){if(typeof window.IntersectionObserver>"u"&&r!==void 0){const l=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:l,intersectionRect:l,rootBounds:l}),()=>{}}const{id:o,observer:i,elements:s}=Gse(n),a=s.get(e)||[];return s.has(e)||s.set(e,a),a.push(t),i.observe(e),function(){a.splice(a.indexOf(t),1),a.length===0&&(s.delete(e),i.unobserve(e)),s.size===0&&(i.disconnect(),P0.delete(o));}}function Xse({threshold:e,delay:t,trackVisibility:n,rootMargin:r,root:o,triggerOnce:i,skip:s,initialInView:a,fallbackInView:l,onChange:c}={}){var u;const[d,m]=f__namespace.useState(null),p=f__namespace.useRef(c),h=f__namespace.useRef(a),[g,b]=f__namespace.useState({inView:!!a,entry:void 0});p.current=c,f__namespace.useEffect(()=>{if(h.current===void 0&&(h.current=a),s||!d)return;let w;return w=Kse(d,(S,I)=>{const $=h.current;h.current=S,!($===void 0&&!S)&&(b({inView:S,entry:I}),p.current&&p.current(S,I),I.isIntersecting&&i&&w&&(w(),w=void 0));},{root:o,rootMargin:r,threshold:e,trackVisibility:n,delay:t},l),()=>{w&&w();}},[Array.isArray(e)?e.toString():e,d,o,r,i,s,n,l,t]);const y=(u=g.entry)==null?void 0:u.target,C=f__namespace.useRef(void 0);!d&&y&&!i&&!s&&C.current!==y&&(C.current=y,b({inView:!!a,entry:void 0}),h.current=a);const x=[m,g.inView,g.entry];return x.ref=x[0],x.inView=x[1],x.entry=x[2],x}function EE(e){return !f.Children.toArray(e.props.children).length}function Yse(e){const[t,n]=f.useState(e),r=f.useRef(t),o=f.useCallback(s=>{const a=typeof s=="function"?s(r.current):s;r.current=a,n(a);},[n]),i=f.useCallback(()=>r.current,[]);return [t,o,i]}function Ri(e){const[t,n,r]=Yse(e),o=f.useMemo(()=>({state:t,get:r,set:n,get val(){return r()},set val(i){n(i);}}),[r,n]);return o.state=t,o}function N0(e){const t=f.useRef(e),n=f.useCallback(()=>t.current,[]),r=f.useCallback(o=>t.current=o,[]);return f.useMemo(()=>({get:n,set:r,get val(){return n()},set val(o){r(o);}}),[n,r])}function DA({src:e,avif:t,webp:n,imgProps:r,className:o,...i}){return t??=!Js,n??=true,F("picture",{className:An("h-full w-full object-cover",o),...i,children:[t&&v("source",{srcSet:`${e}.avif`,type:"image/avif"}),n&&v("source",{srcSet:`${e}.webp`,type:"image/webp"}),v("img",{src:e,loading:"lazy",className:"block h-full w-full",...r})]})}const Qse=typeof unsafeWindow<"u"?unsafeWindow:globalThis,KC=(e,t)=>{Rm(()=>Qse[e]=t);},Zse=`${G0}_gridItems`;function Jse(e){const t=e.filter(n=>n.api!==Ee.Separator);coe(t),KC(Zse,t);}const eae={getGenericCardDatas:TC,copyBvidsSingleLine:OC,copyBvidInfos:LC};setTimeout(()=>{Object.entries(eae).forEach(([e,t])=>{KC(`${G0}_${e}`,t);});});function tae(e){const{enabled:t,keywords:n}=nt(Ue.filter.byAuthor),{blockUpMids:r}=f.useMemo(()=>WR(n),[n]);return e?t&&r.has(e):false}async function nae(e,t,n=false,r=false){const o={cid:t,fnver:0,fnval:n?1:16},i=e.toString();if(i.startsWith("BV"))o.bvid=i;else if(/^\d+$/.test(i))o.avid=i;else throw new Error("Invalid videoId provided, must be avid | bvid");const a=(await Tt.get("/x/player/wbi/playurl",{params:o})).data;function l(d){return x0(d,[m=>rae(m,r)],["desc"])}if(a?.data?.durl){const d=(a.data.durl||[]).map(m=>[m.url,...m.backup_url||[]]).flat().filter(Boolean);if(d.length)return l(d)}return x0(a.data?.dash?.video||[],["id","codecid"],["desc","desc"]).map(d=>l([d.baseUrl,...d.backupUrl||[]])[0]).filter(Boolean)}function rae(e,t){if(!t)return 10;const{hostname:n,searchParams:r,pathname:o}=new URL(e);return n.includes("mcdn")||r.get("os")==="mcdn"?2:o.startsWith("/v1/resource/")?1:n.includes("-mirror")?100:10}function XC(e){return !!(e?.image?.length&&e?.index?.length)}function IE(e){return cn(e)?XC(e.data):true}async function oae(e){const n=(await Tt.get("/x/player/videoshot",{params:{bvid:e,index:"1"}})).data;return cn(n)||Yr("videoshot error for %s: %o",e,n),XC(n.data)||Yr("videoshot data invalid bvid=%s: %o",e,n.data),n}const Ag=new DC({maxSize:1e4}),iae=ci(async e=>{if(Ag.has(e)){const s=Ag.get(e);if(s)return s}const t=5,n=200;let r=0,o;do{if(r++,o=await oae(e),IE(o))break;await _t(n);}while(r<t);IE(o)&&Ag.set(e,o);const i=o.data;if(Ue.videoCard.imgPreview.autoPreviewWhenHover){const s=i?.image||[];await fE(s[0]),(async()=>{for(const a of s.slice(1))await fE(a);})();}return o}),sae=Hn.extend("VideoCard:services");function zA(e){return async function(n){const r=new URLSearchParams({aid:n,csrf:Xs()}),i=(await Tt.post(`/x/v2/history/toview/${e}`,r)).data,s=cn(i);return s||zt(i?.message||"出错了"),s}}const M0=zA("add"),aae=zA("del"),_A=e=>{const t={dislike:"/x/feed/dislike",cancel:"/x/feed/dislike/cancel"}[e];return async function(n,r){const i=(await tp.get(w3+t,{responseType:"json",params:{goto:n.goto,id:n.param,reason_id:r,build:"1",mobi_app:"android",idx:(Date.now()/1e3).toFixed(0)}})).data,s=cn(i);let a=i.message;return s||(a||=$u,a+=`(code ${i.code})`,a+=`
请重新获取 access_key 后重试`),{success:s,json:i,message:a}}},lae=_A("dislike"),cae=_A("cancel");async function uae(e){return {videoshotJson:await iae(e)}}function dae(e){return XC(e?.videoshotJson?.data)}const fae=e=>!!e?.playUrls?.length,PE=new DC({maxSize:1e4,maxAge:Wn("1h")}),mae=ci(async({bvid:e,cid:t,useMp4:n,usePreferredCdn:r,aspectRatioFromItem:o})=>{const i=JSON.stringify([e,n,r]),s=PE.get(i);if(s)return s;let a;if(t===void 0||o===void 0){const u=await yN(e);if(t=u[0]?.cid,a=u[0]?.dimension,t===void 0)throw new TypeError(`can not get cid by bvid=${e}`)}const[l,c]=await Am(()=>nae(e,t,n,r));if(sae("playUrl: bvid=%s cid=%s %s",e,t,c),l)throw Qa.error({title:"获取视频播放地址失败",description:l.message||l}),l;return c?.length&&PE.set(i,{playUrls:c,dimension:a}),{playUrls:c??void 0,dimension:a}}),Ca=await( Ky({volume:void 0,muted:void 0},"large-preview-store")),pae=f.forwardRef(({currentTimeRef:e,...t},n)=>{const r=SN(n),o=f.useRef(false);ir(()=>{r.current&&(typeof e.current=="number"&&(r.current.currentTime=e.current),typeof Ca.volume=="number"&&(r.current.volume=Ca.volume),typeof Ca.muted=="boolean"&&(r.current.muted=Ca.muted)),o.current=true;});const i=Ve(()=>{o.current&&(e.current=r.current?.currentTime);}),s=Ve(()=>{o.current&&r.current&&(Ca.volume=r.current.volume,Ca.muted=r.current.muted);});return v("video",{ref:r,...t,onTimeUpdate:i,onVolumeChange:s})}),hae=Hn.extend("VideoCard:LargePreview"),HA={right:{multiplier:1,axis:"x",reverse:"left"},left:{multiplier:-1,axis:"x",reverse:"right"},bottom:{multiplier:1,axis:"y",reverse:"top"},top:{multiplier:-1,axis:"y",reverse:"bottom"}},Gn={border:40,card:10};function gae(e){return e.closest(`.${ws}`)?.querySelector(`.${$3}`)?.getBoundingClientRect()??e.closest(".bili-video-card")?.querySelector(".bili-video-card__image")?.getBoundingClientRect()}const bae=f.forwardRef(({children:e,aspectRatio:t=1.7777777777777777,getCoverRect:n=gae,...r},o)=>{const i=f.useRef(null),s=SN(o),[a,l]=f.useState(false),[c,u]=f.useState(void 0),d=Ve(()=>{l(false),u(void 0);}),m=Ve(()=>{const x=i.current;if(!x)return d();const w=n(x);if(!w)return d();const S=document.documentElement.clientWidth,I=document.documentElement.clientHeight,$=40;if(w.top>I-$||w.bottom<0+$||w.left>S-$||w.right<0+$)return d();const E={top:{x:0,y:0,width:S,height:w.top},bottom:{x:0,y:w.bottom,width:S,height:I-w.bottom},left:{x:0,y:0,width:w.left,height:I},right:{x:w.right,y:0,width:S-w.right,height:I}},P=q=>{const U=t,K=1,J=q.width/U,Q=q.height/K;return {scale:Math.min(J,Q),scaleLimit:J>Q?"height":"width"}},M=Xo(Object.entries(E).map(([q,U])=>({direction:q,bbox:U,...P(U)})),["scale",q=>{switch(q.direction){case "top":return w.top;case "bottom":return I-w.bottom;case "left":return w.left;case "right":return S-w.right}}],["desc","desc"])[0];hae("picked direction",M);const{direction:N,bbox:A,scale:k,scaleLimit:R}=M;let L,V;if(R==="width")L=Math.floor(A.width-(Gn.card+Gn.border)),V=L/t;else if(R==="height")V=Math.floor(A.height-(Gn.card+Gn.border)),L=V*t;else throw new Error("unexpected scaleLimit");let _=0,z=0,D=0,W=0;const O=()=>{D=w.y+w.height/2-z;},B=()=>{W=w.x+w.width/2-_;},j=()=>{if(_<Gn.border){_=Gn.border;return}if(_+L>S-Gn.border){_=S-Gn.border-L;return}},Y=()=>{if(z<Gn.border){z=Gn.border;return}if(z+V>I-Gn.border){z=I-Gn.border-V;return}};switch(N){case "top":_=w.x+w.width/2-L/2,z=w.top-Gn.card-V,j(),B();break;case "bottom":_=w.x+w.width/2-L/2,z=w.bottom+Gn.card,j(),B();break;case "right":_=w.right+Gn.card,z=w.y+w.height/2-V/2,Y(),O();break;case "left":_=w.left-Gn.card-L,z=w.y+w.height/2-V/2,Y(),O();break}_=Math.floor(_),z=Math.floor(z),l(true),u({direction:N,elWidth:L,elHeight:V,elPosX:_,elPosY:z,arrowTop:D,arrowLeft:W});}),p=f.useMemo(()=>_s(m,100),[m]);ir(p),mo("resize",p,{target:window}),mo("scroll",p,{target:window});const{useScale:h}=Mt().videoCard.videoPreview,g=h?.2:.3,b=f.useMemo(()=>{const x=c?.direction;if(!x)return;const{axis:w,multiplier:S,reverse:I}=HA[x];if(h)return w==="x"?{scale:.5,transformOrigin:`${I} ${c.arrowTop}px`}:{scale:.5,transformOrigin:`${c.arrowLeft}px ${I}`};{let $=30;return x==="top"&&($=20),w==="x"?{x:-S*$,y:0}:{x:0,y:-S*$}}},[c,h]),y=v("div",{ref:i,"data-role":"video-card-descendant"}),C=v("div",{...r,ref:s,css:[Dt("display:",a?"block":"none",";",""),c&&Dt("position:fixed;z-index:",AM,";width:",c.elWidth,"px;height:",c.elHeight,"px;top:",c.elPosY,"px;left:",c.elPosX,"px;",""),"",""],children:a&&F(framerMotion.motion.div,{className:"relative h-100%",initial:{opacity:0,...b},animate:{opacity:1,x:0,y:0,scale:1},transition:{bounce:0,duration:g},children:[c?.direction&&v(vae,{size:7,direction:c.direction,arrowTop:c.arrowTop,arrowLeft:c.arrowLeft}),v("div",{className:"h-full overflow-hidden rounded-20px bg-white/50% backdrop-blur-10px",css:Dt("box-shadow:0px 0px 1px 1px ",Xi,";",""),children:e})]})});return F($e,{children:[y,Js?ST.createPortal(C,document.body):C]})});function vae({size:e,direction:t,arrowTop:n,arrowLeft:r}){const{axis:o,multiplier:i,reverse:s}=HA[t],a=f.useMemo(()=>o==="x"?Dt`
${t}: 100%;
margin-${t}: -1px;
top: ${n}px;
margin-top: -${e/2}px;
`:Dt`
${t}: 100%;
margin-${t}: -1px;
left: ${r}px;
margin-left: -${e/2}px;
`,[e,t,o,n,r]);return v("div",{className:"absolute box-content h-0 w-0",css:[Dt("border:",e,"px solid transparent;",""),a,Dt`
border-${t}-color: ${Xi};
`,"",""]})}const yae=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,d:"M10.696 17.504c2.639-2.638 5.774-2.565 9.182-.696L32.62 9.745l-.721-4.958L43.213 16.1l-4.947-.71l-7.074 12.73c1.783 3.638 1.942 6.544-.697 9.182l-7.778-7.778L6.443 41.556l11.995-16.31z"})]}),Cae=f.forwardRef(yae),xae=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,children:[v("path",{d:"M39 6H9a3 3 0 0 0-3 3v30a3 3 0 0 0 3 3h30a3 3 0 0 0 3-3V9a3 3 0 0 0-3-3"}),v("path",{d:"M20.5 28v-6.062l5.25 3.03L31 28l-5.25 3.031l-5.25 3.031zM6 15h36m-9-9l-6 9m-6-9l-6 9"})]})]}),wae=f.forwardRef(xae);function NE(e){e.current!==void 0&&(clearTimeout(e.current),e.current=void 0);}function VA({shouldFetchPreviewData:e,hasLargePreviewActionButton:t,actionButtonVisible:n,actionButtonProps:r,actionButtonCss:o,bvid:i,cid:s,uniqId:a,recSharedEmitter:l,aspectRatioFromItem:c,cover:u,cardRef:d,videoCardAsTriggerRef:m}){const{useMp4:p,useVideoCardAsTrigger:h,usePreferredCdn:g}=nt(Ue.videoCard.videoPreview),b=Ri(void 0),y=Lu(async()=>{if(!e||fae(b.val))return;const G=await mae({bvid:i,cid:s,useMp4:p,usePreferredCdn:g,aspectRatioFromItem:c});b.set(G);});Wi(()=>{b.set(void 0);},[p,g]);const C=qi(y,{manual:true,loadingDelay:100}),[x,w]=f.useState(false),S=Ri(void 0),I=Ri(void 0),$=Ri(void 0),E=N0({}),P=Ve(()=>$.val?Date.now()-$.val<1200:false),M=f.useRef(void 0),N=f.useRef(void 0),A=Ve(()=>{NE(M),NE(N);}),k=Ve((G,ee)=>{w(true),S.set(G),I.set(ee),l.emit("show-large-preview",a),$.set(void 0);}),R=Ve(()=>{w(false),S.set(void 0),I.set(void 0),$.set(Date.now());});dr(l,"show-large-preview",G=>{G!==a&&(A(),R());});const L=Ve(G=>{if(E.set({...E.val,[G]:true}),S.val==="click")return;C.run(),A();let ee=0;G==="video-card-action-button"&&(ee=200),G==="video-card"&&(ee=1e3),ee?M.current=setTimeout(()=>k("hover",G),ee):k("hover",G);}),V=Ve(G=>{if(E.set({...E.val,[G]:false}),S.val==="click")return;const ee=()=>{E.val.popover||E.val["video-card-action-button"]||R();};A(),G==="video-card-action-button"||G==="video-card"||G==="popover"?N.current=setTimeout(ee,250):ee();}),_=Ve(G=>{A(),S.val==="click"?R():k("click",G);}),z=Ve(()=>{if(j.current)return Math.floor(j.current)}),D=Ve(()=>!!(x||P())),W=Ve(()=>{if(!i)return;const G=new URL(`https://${ki.Main}/video/${i}`),ee=z();ee&&G.searchParams.set("t",ee.toString()),Io(G.href),B.current?.pause(),R();}),O=f.useMemo(()=>H1({dimensionFromApi:b.state?.dimension})?.aspectRatio??c,[b.state?.dimension]),B=f.useRef(null),j=f.useRef(void 0),Y=f.useRef(null),q=x&&!!b.state?.playUrls?.length,U=q&&F(bae,{ref:Y,aspectRatio:O,onMouseEnter:G=>L("popover"),onMouseLeave:G=>V("popover"),children:[v(pae,{ref:B,currentTimeRef:j,autoPlay:true,controls:true,loop:true,poster:u,className:"size-full object-contain",children:b.state?.playUrls?.map((G,ee)=>v("source",{src:G},ee))}),F("div",{className:"absolute right-10px top-10px flex flex-row-reverse items-center justify-start gap-x-5px",children:[S.state==="click"?v(Ro,{inlinePosition:"right",icon:v(qU,{className:"size-14px"}),tooltip:"关闭",onClick:G=>{G.preventDefault(),G.stopPropagation(),R();}}):v(Ro,{inlinePosition:"right",icon:v(Cae,{className:"size-14px"}),tooltip:"固定",onClick:G=>{G.preventDefault(),G.stopPropagation(),_("popover-action-button");}}),v(Ro,{inlinePosition:"right",icon:v(VM,{className:"size-14px"}),tooltip:"新窗口打开",onClick:G=>{G.preventDefault(),G.stopPropagation(),W();}})]})]}),K=t&&e&&v(Ro,{css:o,...r,visible:n,active:q,inlinePosition:"right",icon:C.loading?v(bM,{className:"size-16px"}):v(wae,{className:"size-15px"}),tooltip:S.state==="click"&&x?"关闭浮动预览":"浮动预览",onMouseEnter:G=>L("video-card-action-button"),onMouseLeave:G=>V("video-card-action-button"),onClick:G=>{G.preventDefault(),G.stopPropagation(),_("video-card-action-button");}},"video-card-action-button");qr("esc",()=>{ui()||R();},{exactMatch:true}),Fz(()=>R(),[d?()=>d?.current?.closest(`.${ws}`):void 0,Y].filter(Boolean)),mo("fullscreenchange",()=>{document.fullscreenElement&&(!x||S.val==="click"||document.fullscreenElement===B.current&&k("click","popover-video-fullscreen-button"));},{target:document});const J=f.useRef(null),Q=m||J;return mo("mouseenter",()=>{!h||!m||L("video-card");},{target:Q}),mo("mouseleave",()=>{!h||!m||V("video-card");},{target:Q}),{largePreviewActionButtonEl:K,largePreviewEl:U,getLargePreviewCurrentTime:z,shouldUseLargePreviewCurrentTime:D,largePreviewVisible:x,hideLargePreview:R}}function Sae(e,{l:t,c:n,h:r,alpha:o,deltaL:i,deltaC:s,deltaH:a,deltaAlpha:l}={}){const c=t??(i?`calc(l + ${i})`:"l"),u=n??(s?`calc(c + ${s})`:"c"),d=r??(a?`calc(h + ${a})`:"h"),m=o??(l?`calc(alpha + ${l})`:""),p=m?`/ ${m}`:"";return `oklch(from ${e} ${[c,u,d,p].filter(Boolean).join(" ")})`}function $ae(e,t){return Sae(e,{deltaL:t})}const Eae=$ae(Xi,.1),Vr={normalBorder:Dt("border-color:",z1,";",""),activeBorder:Dt("border-color:",Xi,";box-shadow:0px 0px 9px 4px ",Eae,";",""),rounded:Dt("border-radius:",D1,";",""),bgLv1:Dt("background-color:",Pv,";",""),coverZoomEffect:{name:"dj03ws",styles:".bili-video-card__cover{transform-origin:center center;transition:transform 0.2s ease-out;transform:scale(1.05);}"}},Iae=Dt(Vr.activeBorder," &:hover{",Vr.activeBorder,";}","");function Pae(e){const t=`--${Jn}-separator-color`;return f.useMemo(()=>{if(e)return Dt`
${Vr.rounded}
${Vr.normalBorder}
background-color: ${$U};
${t}: ${Pv};
&:hover {
background-color: ${Pv};
${t}: ${EU};
}
/* disable padding */
margin-inline: 0;
.bili-video-card__wrap {
padding: 0;
}
`},[e])}var Nae={name:"7dle4o",styles:"border:1px solid transparent;transition-property:border-color,box-shadow,background-color;transition-duration:0.3s;transition-timing-function:ease-in-out"};function jA(){const{useDelayForHover:e,style:{videoCard:{useBorder:t,useBorderOnlyOnHover:n,useBoxShadow:r}}}=Mt(),{multiSelecting:o}=nt(Qt),i=WD();return f.useMemo(()=>[Nae,(o||t&&!i)&&[Dt("cursor:pointer;",Vr.rounded," &:hover{",Vr.bgLv1," ",Vr.normalBorder," ",r&&Vr.activeBorder," ",e&&Vr.coverZoomEffect,";}",""),(o||!n)&&Vr.normalBorder]],[t,n,r,e,i,o])}function Mae(e){return e&&[Vr.rounded,Vr.activeBorder]}const Rae="_skeleton-active_wlycr_12";function Aae(e,t){const[n,r]=f.useState(void 0),[o,i]=f.useState(void 0),[s,a]=f.useState(void 0),l=Ve(async()=>{if(e.api!=="watchlater"||!t)return;const c=await Mi.getVideoFavState(t);c&&(r(c.favFolderNames),i(c.favFolderUrls),a(c.favFolderIds));});return f.useMemo(()=>({folderNames:n,folderUrls:o,folderIds:s,updateFavFolderNames:l}),[n,o,s,l])}function Tae(e,t,n){if(!Ap(t)||!n)return [];const r=e.folderNames??[],o=e.folderUrls??[],i=e.folderIds??[],s=Ur([{key:"watchlater-faved:browse-fav-folder",icon:v(Mq,{className:"size-15px color-gate-primary"}),label:`已收藏在 ${(r||[]).map(c=>`「${c}」`).join("")}`,onClick(){o.forEach(c=>{window.open(c,Nv());});}},{key:"watchlater-faved:move-fav",icon:v(GC,{className:"size-13px"}),label:"移动到其他收藏夹",async onClick(){const c=`${n}:2`,u=i[0];if(i.length>1){const d=i.slice(1),m=r.slice(1);for(const[p,h]of d.entries())if(!await Mi.removeFavs(h,c)){const b=m[p];ft.warning(`从收藏夹「${b}」移除失败!`);}}await Pm(u,async d=>{const m=await Mi.moveFavs(c,u,d.id);if(m)return Ac(u),Ac(d.id),ft.success(`已移动到「${d.title}」收藏夹`),m});}}]),a=Ur([{key:"watchlater:add-quick-fav",icon:v(Fi,{className:"size-15px"}),label:"收藏到「默认收藏夹」",async onClick(){await Mi.addFav(n)&&ft.success(`已加入收藏夹「${l0}」`);}},{key:"watchlater:add-fav",icon:v(Fi,{className:"size-15px"}),label:"收藏到",async onClick(){await Pm(void 0,async c=>{const u=await Mi.addFav(n,c.id);return u&&ft.success(`已加入收藏夹「${c.title}」`),u});}}]);return !!r.length?s:a}function Oae({item:e,cardData:t,tab:n,multiSelectingAppendix:r,onRemoveCurrent:o,recSharedEmitter:i}){return Ds(e)?e.from==="fav-folder"?Ur([{key:"open-fav-folder",label:"浏览收藏夹",icon:v(bo,{className:"size-15px"}),onClick(){const{id:s}=e.folder,a=n!==Be.Fav||kt.selectedKey==="all"&&kt.usingShuffle?`/?${fm.FolderIdFull}=${s}`:uC(s);window.open(a,Nv());}},{key:"move-fav",label:`移动到其他收藏夹${r}`,icon:v(GC,{className:"size-13px"}),async onClick(){let s,a,l,c;if(Qt.multiSelecting){const u=Op().filter(m=>Ds(m)&&m.from==="fav-folder"),d=new Set(u.map(m=>m.folder.id));if(!d.size)return zt("至少选择一项视频");if(d.size>1)return zt("多选移动: 只能批量移动同一源收藏夹下的视频");a=u[0].folder.id,s=u.map(m=>`${m.id}:${m.type}`),l=u.map(m=>m.uniqId),c=u.map(m=>m.title);}else s=`${e.id}:${e.type}`,a=e.folder.id,l=[e.uniqId],c=[e.title];await Pm(e.folder.id,async u=>{const d=await Mi.moveFavs(s,a,u.id);if(d)return Ac(e.folder.id),Ac(u.id),i.emit("remove-cards",[l,c,true]),ft.success(`已移动 ${l.length} 个视频到「${u.title}」收藏夹`),d});}},{key:"remove-fav",label:"移除收藏",icon:v(fp,{className:"size-15px"}),async onClick(){if(!await I1.confirm({centered:true,title:"移除收藏",content:F($e,{children:["确定将视频「",e.title,"」",v("br",{}),"从收藏夹「",e.folder.title,"」中移除?"]})}))return;const a=`${e.id}:${e.type}`;await Mi.removeFavs(e.folder.id,a)&&(Ac(e.folder.id),o?.(e,t));}}]):e.from==="fav-collection"?Ur([{key:"open-fav-collection",label:"浏览合集",icon:v(bo,{className:"size-15px"}),onClick(){const{id:s}=e.collection,a=n!==Be.Fav||kt.selectedKey==="all"&&kt.usingShuffle?`/?${fm.CollectionIdFull}=${s}`:NR(s);window.open(a,Nv());}}]):[]:[]}const Fae=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:4,children:[v("path",{d:"M33 7.263A18.9 18.9 0 0 0 24 5C13.507 5 5 13.507 5 24s8.507 19 19 19a18.9 18.9 0 0 0 8-1.761"}),v("path",{strokeLinejoin:"round",d:"M31 30h12m-28-8l7 7l19-18m-4 13v12"})]})]}),Lae=f.forwardRef(Fae),Bae=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",children:[v("path",{stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,d:"M19 20a7 7 0 1 0 0-14a7 7 0 0 0 0 14Z"}),v("path",{d:"M30 35h12z",clipRule:"evenodd"}),v("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,d:"M30 35h12m-15-7h-8.2c-4.48 0-6.72 0-8.432.872a8 8 0 0 0-3.496 3.496C6 34.08 6 36.32 6 40.8V42h21"})]})]}),kae=f.forwardRef(Bae),Dae=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",children:[v("path",{fill:"currentColor",fillRule:"evenodd",d:"M15.92 12.799Q16 12.41 16 12a4 4 0 0 0-4.799-3.92zM8.667 9.788a4 4 0 0 0 5.545 5.545l-1.474-1.474a2 2 0 0 1-2.597-2.597z",clipRule:"evenodd"}),v("path",{fill:"currentColor",fillRule:"evenodd",d:"m16.52 17.64l-1.47-1.469c-.972.51-2.002.829-3.05.829c-1.526 0-3.014-.678-4.34-1.632c-1.32-.95-2.396-2.112-3.076-2.938c-.1-.121-.174-.212-.236-.291a2 2 0 0 1-.1-.139q.028-.045.1-.139c.062-.08.136-.17.236-.291c.665-.808 1.71-1.938 2.99-2.875l-1.43-1.43C4.797 8.297 3.723 9.47 3.04 10.3l-.073.088c-.314.375-.737.883-.737 1.613s.423 1.238.737 1.613l.073.088c.74.899 1.94 2.203 3.451 3.29C7.994 18.073 9.891 19 12 19c1.67 0 3.206-.581 4.52-1.36M8.806 5.686C9.79 5.269 10.864 5 12 5c2.11 0 4.006.927 5.509 2.009c1.51 1.087 2.711 2.391 3.45 3.29l.074.088c.314.375.737.883.737 1.613s-.423 1.238-.737 1.613l-.073.088a20.5 20.5 0 0 1-2.015 2.123l-1.416-1.416a18.5 18.5 0 0 0 2.123-2.27a2 2 0 0 0 .1-.138a2 2 0 0 0-.1-.139a14 14 0 0 0-.236-.291c-.68-.826-1.756-1.989-3.075-2.938C15.014 7.678 13.526 7 12 7c-.551 0-1.097.088-1.632.246z",clipRule:"evenodd"}),v("path",{stroke:"currentColor",strokeWidth:2,d:"m5 2l16 16"})]})]}),zae=f.forwardRef(Dae),Kn="size-16px";function _ae({item:e,cardData:t,tab:n,isNormalVideo:r,refresh:o,favContext:i,watchlaterContext:s,hasDislikeEntry:a,onTriggerDislike:l,onMoveToFirst:c,onRemoveCurrent:u,consistentOpenMenus:d,conditionalOpenMenus:m,multiSelecting:p}){const{avid:h,bvid:g,cover:b,href:y,recommendReason:C,authorName:x,authorMid:w}=t,{enableHideSomeContents:S}=nt(Ue.dynamicFeed.whenViewAll),{recSharedEmitter:I}=Zr(),$=Ve(()=>{let j=y;y.startsWith("/")&&(j=new URL(y,location.href).href),Is(j);}),E=!!w&&oA(e.api)&&n!==Be.KeepFollowOnly,P=Ve(async()=>{if(!w)return ft.error("UP mid 为空!");await E4.add(w)&&ft.success(`已加入黑名单: ${x}`);}),M=Ve(async()=>{if(!w)return ft.error("UP mid 为空!");const j=`${w}`;if(Ue.filter.byAuthor.keywords.includes(j))return zt(`已在过滤名单中: ${j}`);await ii("filter.byAuthor.keywords",{add:[j]}),x&&O2(w,x),ft.success(`已加入过滤名单: ${x||w}`);}),N=t.followed??(e.api===Ee.DynamicFeed||(e.api===Ee.AppRecommend||e.api===Ee.PcRecommend)&&HC(C)),A=N,k=Ve(async()=>{if(!w||!await I1.confirm({centered:true,title:"取消关注",content:F($e,{children:["确定取消关注「",x,"」?"]})}))return;await _oe.unfollow(w)&&ft.success("已取消关注");}),R=(r||hu(e))&&!!w&&!!x,L=Ve(()=>{if(!R)return;const j=`/?${jr.Mid}=${w}`;Io(j);}),V=Ve(()=>{if(!R)return;const j=`/?${Qo.Mid}=${w}`;Io(j);}),_=S&&Cm(e)&&At.selectedKey===Zc&&!!w,z=Ve(async()=>{_&&(await ii("dynamicFeed.whenViewAll.hideIds",{add:[Xa+w]}),O2(w,x||""),ft.success(`在「全部」动态中隐藏【${x}】的动态`));}),D=!!(Cm(e)&&Ji&&At.viewingSomeUp&&w),W=f.useMemo(()=>D&&{label:"动态: 从此项开始查看",key:"动态: 从此项开始查看",icon:v(Cv,{className:Kn}),onClick(){const j=new URL("/",location.href);j.searchParams.set(jr.Mid,w);const Y=si().findIndex(U=>U.api===Ee.DynamicFeed&&U.id_str===e.id_str),q=si()[Y-1]?.id_str||e.id_str;j.searchParams.set(jr.Offset,q),Io(j.href);}},[D,e]),O=f.useMemo(()=>D&&{icon:v(fM,{className:Kn}),label:"动态: 从此项开始截止",key:"动态: 从此项开始截止",onClick(){const j=new URL("/",location.href);j.searchParams.set(jr.Mid,w),j.searchParams.set(jr.MinId,e.id_str),Io(j.href);}},[D,e]),B=f.useMemo(()=>pu&&RC(e)&&!!e.page&&{key:"space-upload-view-start-from-here",label:`投稿: 从此页开始查看 (当前第${e.page}页)`,icon:v(Cv,{className:Kn}),onClick(){const j=new URL(location.href);j.searchParams.set(Qo.InitialPage,e.page.toString()),Io(j.href);}},[pu,e]);return f.useMemo(()=>{const{watchlaterAdded:j,hasWatchlaterEntry:Y,onToggleWatchlater:q}=s,U={type:"divider"},K=p?" (多选)":"",J=Ur([{key:"copy-link",label:`复制视频链接${K}`,icon:v(Es,{className:Kn}),onClick(){Qt.multiSelecting?foe():$();}},{test:!!g,key:"copy-bvid",label:`复制 BVID${K}`,icon:v(Es,{className:Kn}),onClick(){Qt.multiSelecting?OC():Is(g);}},{test:!!g&&Ue.__internalEnableCopyBvidInfo,key:"copy-bvid-info",label:`复制 BVID 信息${K}`,icon:v(Es,{className:Kn}),onClick(){Qt.multiSelecting?LC():Is(FC(t));}},{test:!!b,key:"view-cover",label:"查看封面",icon:v(bo,{className:Kn}),onClick(){if(!b)return;Io(b);}}]),Q=Ur([{test:R,key:"view-up-space-upload",label:"查看 UP 的投稿",icon:v(R1,{className:Kn}),onClick:V},B,{test:R&&N,key:"view-up-dyn",label:"查看 UP 的动态",icon:v(M1,{className:Kn}),onClick:L},O,W,{test:Y,key:"watchlater",label:j?"移除稍后再看":"稍后再看",icon:j?v(vM,{className:Kn}):v(T1,{className:Kn}),onClick(){q();}},{test:Y&&j,key:"watchlater-readd",label:`重新添加稍候再看${n===Be.Watchlater?" (移到最前)":""}`,icon:v(Lae,{className:Kn}),async onClick(){const{success:re}=await q(void 0,M0);re&&(ft.success("已重新添加"),n===Be.Watchlater&&c?.(e,t));}},...Tae(i,e,h)]),G=Ur([{test:a,key:"dislike",label:"我不想看",icon:v(N1,{width:15,height:15}),onClick(){l();}},{test:A,key:"unfollow-up",label:"取消关注",icon:v(kae,{className:Kn}),onClick:k},{test:_,key:"hasEntry_addMidTo_dynamicFeedWhenViewAllHideIds",label:"在「全部」动态中隐藏 UP 的动态",icon:v(zae,{className:Kn}),onClick:z},{test:E,key:"blacklist-up",label:"将 UP 加入黑名单",icon:v(xv,{className:Kn}),onClick:P},{test:E,key:"add-up-to-filterlist",label:"将 UP 加入过滤列表",icon:v(xv,{className:Kn}),onClick:M}]),ee=Oae({item:e,cardData:t,tab:n,multiSelectingAppendix:K,onRemoveCurrent:u,recSharedEmitter:I});return Ur([...d,!!J.length&&U,...J,!!Q.length&&U,...Q,!!G.length&&U,...G,!!ee.length&&U,...ee,!!m.length&&U,...m])},[e,t,n,s,i,a,A,E,R,_,d,m,p])}function mc(e){if(e.altKey)return e.stopPropagation(),true}const Cu=Ks(()=>Date.now()),Hae=(rn().add(1,"minute").startOf("minute").valueOf()-Cu.get())%3e4;setTimeout(()=>{Cu.update(),setInterval(Cu.update,3e4);},Hae);document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&Cu.update();});const Vae=f.memo(function({ts:t}){return t?ire(t)?v(jae,{ts:t}):v(WA,{ts:t}):null});function WA({ts:e}){return f.useMemo(()=>sre(e),[e])}function jae({ts:e}){const t=Cu.use();return v(WA,{ts:e},t)}const Tg={recommendReason:Dt("display:inline-block;cursor:default;background-color:oklch(from ",Xi," calc(l * 0.1 + 0.9) calc(c * 0.1) h);",RM," &{background-color:oklch(from ",Xi," calc(l * 0.3 + 0.175) calc(c * 0.08) h);}color:var(--Or5);border-radius:8px;font-size:var(--follow-icon-font-size);line-height:var(--follow-icon-line-height);height:var(--follow-icon-line-height);width:max-content;max-width:calc(100% - 6px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-inline:8px;padding-block:0;",""),recommendReasonInList:{name:"125ka3i",styles:"margin-top:10px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;height:auto;white-space:normal"},appBadge:{name:"1atx64h",styles:"color:#fa6a9d;border-radius:2px;border:1px #fa6a9d solid;line-height:20px;padding:0 10px;transform:scale(0.8);transform-origin:center left"}},qd={name:"nux2qa",styles:"font-size:var(--subtitle-font-size);line-height:var(--subtitle-line-height);color:var(--text3);a&:visited{color:var(--text3);}display:inline-flex;width:max-content;max-width:100%;align-items:center;justify-content:flex-start"};var Wae={name:"15xw6zv",styles:"display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;overflow:hidden;text-overflow:ellipsis;max-width:100%"},qae={name:"feo88y",styles:".bili-video-card .bili-video-card__info--tit>a&{font-family:inherit;font-weight:initial;}"},Uae={name:"1eyh0r6",styles:"text-indent:0!important;.bili-video-card &.bili-video-card__info--tit{padding-right:0;height:auto;max-height:calc(2 * var(--title-line-height));}"};const qA=f.memo(function({item:e,cardData:t,handleVideoLinkClick:n,className:r,gridDisplayMode:o}){const{useBorder:i}=nt(Ue.style.videoCard),s=hp(),a=By(o),{goto:l,href:c,title:u,titleRender:d,pubts:m,pubdateDisplay:p,pubdateDisplayForTitleAttr:h,recommendReason:g,authorName:b,authorFace:y,authorMid:C,appBadge:x,appBadgeDesc:w,rankingDesc:S,liveExtraDesc:I}=t,$=l==="av",E=C?Bu(C):c,P=e.api===Ee.Live&&e.live_status===No.Streaming,{data:M}=qi(()=>Wie(e,t),{refreshDeps:[e,t]}),N=f.useMemo(()=>{if($&&(b||m||M||p||h)){let k;return m||M?k=rn.unix(m||M).format("YYYY年M月D日 HH:mm"):k=p,[b,h||k].filter(Boolean).join(" · ")}},[$,b,m,M,p,h]);return F("div",{className:H(a?"pt-5px":"pt-15px","flex gap-x-5px overflow-hidden px-5px",i?"mb-10px":"mb-5px",r),children:[!!C&&F("a",{href:E,target:s,className:H("relative flex-center self-start rounded-full p-1px ring-1px",P?"ring-gate-primary":"ring-gate-border"),children:[y?v(Ms,{src:VC(y)}):v(Ms,{children:b?.[0]||w?.[0]||""}),P&&v(A1,{active:true,className:"absolute bottom-0 right-0 size-12px rounded-full bg-gate-primary"})]}),F("div",{className:"ml-5px flex flex-1 flex-col gap-y-4px overflow-hidden",children:[v("h3",{className:"bili-video-card__info--tit",title:u,css:Uae,children:v("a",{onClick:n,onContextMenu:mc,href:c,target:s,rel:"noopener",css:qae,children:d??u})}),A()]})]});function A(){const k=!!g&&v("span",{className:LO,css:[Tg.recommendReason,a&&Tg.recommendReasonInList,"",""],title:g,children:g});if($){let R;return m||M?R=v(Vae,{ts:m||M}):p&&(R=p),F($e,{children:[F("a",{className:"bili-video-card__info--owner",href:E,target:s,title:N,css:qd,onContextMenu:mc,children:[v("span",{className:"bili-video-card__info--author",children:b}),!!R&&F("span",{className:"bili-video-card__info--date",children:[_C,R]})]}),k]})}if(x||w)return F("a",{className:"bili-video-card__info--owner",css:qd,href:c,target:s,onContextMenu:mc,children:[!!x&&v("span",{css:Tg.appBadge,children:x}),!!w&&v("span",{children:w})]});if(MC(e)&&S)return v("div",{css:qd,children:S});if(hu(e)||Rp(e)&&e.goto===Li.Live)return F($e,{children:[F("a",{css:[qd,Wae,"",""],href:E,target:s,title:(b||"")+(I||""),onContextMenu:mc,children:[b,I&&v("span",{className:"ml-4px",children:I})]}),k]})}}),Gae=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,children:[v("path",{d:"M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4S4 12.954 4 24s8.954 20 20 20Z"}),v("path",{strokeLinecap:"round",d:"M24 29c5 0 7 4 7 4H17s2-4 7-4m8-12l-3 3l3 3m-16-6l3 3l-3 3"})]})]}),Kae=f.forwardRef(Gae),Xae=f.memo(function({loading:t}){return F("div",{className:H("bili-video-card__skeleton",{hide:!t,[Rae]:t}),children:[v("div",{className:"bili-video-card__skeleton--cover",style:{borderRadius:D1}}),F("div",{className:"bili-video-card__skeleton--info px-5px",children:[v("div",{className:"bili-video-card__skeleton--avatar size-32px rounded-full"}),F("div",{className:"bili-video-card__skeleton--right ml-10px flex-1",children:[v("p",{className:"bili-video-card__skeleton--text"}),v("p",{className:"bili-video-card__skeleton--text short"}),v("p",{className:"bili-video-card__skeleton--light"}),v("p",{className:"bili-video-card__skeleton--text tiny"})]})]})]})}),Pr={wrapper:"h-full flex flex-col overflow-hidden",cover:"relative aspect-16/9 rounded-t-6px",coverInner:"absolute left-0 top-0 h-full w-full flex flex-col items-center justify-center",dislikeReason:"text-center font-size-20px",dislikeDesc:"text-center text-16px",action:"relative flex-1",actionInner:"absolute left-0 top-0 h-full w-full flex items-center justify-center b-t-1px b-t-[var(--bilibili-gate-separator-color)] b-t-solid transition-duration-300 transition-property-[border-color]",actionButton:"flex cursor-pointer items-center rounded-lg bg-transparent p-15px text-16px color-inherit"},Yae=f.memo(function({item:t,cardData:n,dislikedReason:r,emitter:o=xM}){const i=Ve(async()=>{if(!r?.id)return;let s=false,a="",l;try{({success:s,message:a}=await cae(t,r.id));}catch(c){l=c;}if(l)return console.error(l.stack||l),i6();s?(ft.success("已撤销"),Ose(t.param)):ft.error(a||$u);});return dr(o,"cancel-dislike",i),F("div",{className:Pr.wrapper,children:[v("div",{className:Pr.cover,children:F("div",{className:Pr.coverInner,children:[v(Kae,{className:"mb-5px size-32px"}),v("div",{className:Pr.dislikeReason,children:r?.name}),v("div",{className:Pr.dislikeDesc,children:r?.toast||"将减少此类内容推荐"})]})}),v(UA,{item:t,cardData:n,onClick:i})]})});function UA({item:e,cardData:t,onClick:n}){return F("div",{className:Pr.action,children:[v(qA,{item:e,cardData:t,className:"invisible"}),v("div",{className:Pr.actionInner,children:F("button",{className:Pr.actionButton,onClick:n,children:[v(wv,{className:"mr-4px mt--2px size-16px"}),"撤销"]})})]})}const ME=f.memo(function({item:t,cardData:n,blockType:r}){const{authorMid:o,authorName:i}=n,s=r==="blacklist"?"已拉黑":"已加入过滤列表",a=Ve(()=>r==="blacklist"?l():c()),l=Ve(async()=>{if(!o)return;await E4.remove(o)&&ft.success(`已移出黑名单: ${i}`);}),c=Ve(()=>{if(!o)return;const u=Ue.filter.byAuthor.keywords.filter(d=>Ep(d).mid===o);ii("filter.byAuthor.keywords",{remove:u}),ft.success(`已移出过滤列表: ${i}`);});return F("div",{className:Pr.wrapper,children:[v("div",{className:Pr.cover,children:F("div",{className:Pr.coverInner,children:[v(xv,{className:"mb-5px size-32px"}),v("div",{className:Pr.dislikeReason,children:s}),F("div",{className:Pr.dislikeDesc,children:["UP: ",i]})]})}),v(UA,{item:t,cardData:n,onClick:a})]})}),Qae=H("pointer-events-none absolute inset-0 overflow-hidden",Wq,"rounded-b-none rounded-t-gate-video-card"),Zae=f.memo(f.forwardRef(function({videoDuration:e,pvideo:t,progress:n,t:r,className:o,...i},s){const a=f.useRef(null),[l,c]=f.useState(()=>({width:0,height:0}));ir(()=>{const h=a.current?.getBoundingClientRect();h&&c({width:h.width,height:h.height});});const u=f.useMemo(()=>{function h(){return typeof n=="number"&&!Number.isNaN(n)?n:0}return rm(h()??0,0,1)},[n]),d=f.useMemo(()=>r??Math.floor((e||0)*u),[r,e,u]),m=Ve(()=>d);f.useImperativeHandle(s,()=>({getT:m}),[m]);const p={progress:u,t:d,pvideo:t,elWidth:l.width,elHeight:l.height};return v("div",{...i,ref:a,className:H(Qae,o),children:!!(t&&l.width&&l.height&&u)&&v(Jae,{...p})})})),Jae=f.memo(function({t,progress:n,pvideo:r,elWidth:o,elHeight:i}){let s=f.useMemo(()=>ele(r?.index||[],t)??0,[r,t]);const{img_x_len:a,img_y_len:l,img_x_size:c,img_y_size:u}=r,d=l*a;s=s+1;const m=Math.floor(s/d),p=s-m*d,h=r.image?.[m]||"",g=Math.floor(p/a)+1,b=p-(g-1)*a,y=o*a,C=i*l,x=(g-1)*i,w=(b-1)*o;return v("div",{className:"size-full",style:{backgroundColor:"black",backgroundImage:`url(${h})`,backgroundPosition:`-${w}px -${x}px`,backgroundSize:`${y}px ${C}px`},children:v(GA,{progress:n})})});function GA({progress:e,className:t,...n}){return v("div",{...n,"data-role":"track",className:H("absolute inset-x-0 bottom-0 h-2px bg-gate-bg-lv1",t),children:v("div",{"data-role":"bar",className:"h-full bg-gate-primary",style:{width:`${e*100}%`}})})}function ele(e,t){let n=tle(e,t);if(n!==-1)return n;t>e.at(-1)&&(n=e.length-1);}function tle(e,t){let n=0,r=e.length-1,o=-1;for(;n<=r;){const a=Math.floor((n+r)/2),l=e[a];if(t===l)return a;l<t?(n=a+1,o=a):r=a-1;}if(o===-1)return -1;const i=e[o],s=e[o+1]??0;return i<t&&t<s?o:-1}const nle=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 256 256",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("path",{fill:"currentColor",d:"M248 80a28 28 0 1 0-51.12 15.77l-26.79 33L146 73.4a28 28 0 1 0-36.06 0l-24.03 55.34l-26.79-33a28 28 0 1 0-26.6 12L47 194.63A16 16 0 0 0 62.78 208h130.44A16 16 0 0 0 209 194.63l14.47-86.85A28 28 0 0 0 248 80M128 40a12 12 0 1 1-12 12a12 12 0 0 1 12-12M24 80a12 12 0 1 1 12 12a12 12 0 0 1-12-12m196 12a12 12 0 1 1 12-12a12 12 0 0 1-12 12"})]}),rle=f.forwardRef(nle),ole=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("circle",{cx:12,cy:24,r:3,fill:"currentColor"}),v("circle",{cx:24,cy:24,r:3,fill:"currentColor"}),v("circle",{cx:36,cy:24,r:3,fill:"currentColor"})]}),ile=f.forwardRef(ole),KA="pointer-events-none h-19px flex-center whitespace-nowrap rounded-2px bg-gate-primary px-4px text-center text-12px color-white";function XA({children:e,className:t}){return v("span",{className:An(KA,t),children:e})}function YA(e){if(e.api!==Ee.DynamicFeed)return false;const t=e.modules?.module_dynamic?.major?.archive?.badge;return !(!t||!t.text||t.text===Mo.Upload)}function sle({item:e}){if(!YA(e)||e.api!==Ee.DynamicFeed)return null;const t=e.modules?.module_dynamic?.major?.archive?.badge,n=!!t.icon_url;return F(XA,{className:H("min-w-32px",n?"pl-4px pr-6px":"px-4px"),children:[n&&v(DA,{src:`${t.icon_url}@!web-dynamic`,className:"h-16px w-16px"}),t.text]})}function ale(e){return ["#FFD700","#C0C0C0","#B36700"][e-1]??Xi}function lle({item:e}){const t=e.rankingNo<=3,n=v(rle,{});let r=false,o=[];m1(e)&&e.others?.length&&(r=true,o=e.others);const i=`「${e.rankTab.name}」排行第 ${e.rankingNo} 名`,{triggerRef:s,tooltipEl:a}=mp({inlinePosition:"left",tooltip:i,tooltipClassName:"left--2px"}),l="relative size-28px flex-center whitespace-nowrap rounded-full text-14px color-white",c=f.useMemo(()=>({backgroundColor:ale(e.rankingNo)}),[e.rankingNo]),u=KM();return F($e,{children:[F("div",{ref:s,className:l,style:c,children:[t?n:v("span",{style:{marginLeft:-1},children:e.rankingNo}),a]}),r&&v(ts,{placement:"bottomLeft",menu:{items:[{type:"group",label:"「其他上榜视频」",children:o.map(d=>({key:d.bvid,label:d.title,onClick(){const m=new URL(`/video/${d.bvid}`,location.href).href;u?Io(m):location.href=m;}}))}]},children:v("div",{className:l,style:c,children:v(ile,{})})})]})}function cle(){return F(XA,{children:[v(A1,{active:true,className:"size-14px"}),"直播中"]})}function ule({item:e}){const t=f.useMemo(()=>Cm(e)?"动态":Ap(e)?"稍后再看":Ds(e)?e.from==="fav-folder"?"收藏夹":"合集":e.api,[e]),n=f.useMemo(()=>{if(Ds(e)&&e.from==="fav-collection")return e.volTooltip},[e]),{triggerRef:r,tooltipEl:o}=mp({inlinePosition:"left",tooltip:n});return F("span",{ref:r,className:An(KA,"pointer-events-auto"),children:[t,o]})}function dle({vol:e,volTooltip:t}){const{triggerRef:n,tooltipEl:r}=mp({inlinePosition:"left",tooltip:t,tooltipClassName:"left--2px"});return F("div",{ref:n,className:"relative h-24px min-w-24px flex-center whitespace-nowrap rounded-8px bg-gate-primary px-6px text-center text-14px color-white",children:[e,r]})}const fle=v(N1,{className:"size-16px"});function mle({item:e,authed:t,actionButtonVisible:n}){const r=rl(e)&&!!e.three_point?.dislike_reasons?.length,o=Ve(async a=>{if(a?.preventDefault(),a?.stopPropagation(),!r)return e.api!==Ee.AppRecommend?ft.error("当前视频不支持提交「我不想看」"):void 0;if(!t)return zt("请先获取 access_key !");e?.param&&Im.has(e.param)||await kse(e.three_point?.dislike_reasons||[],i);}),i=Lu(async a=>{if(!rl(e))return;let l=false,c="",u;try{({success:l,message:c}=await lae(e,a.id));}catch(d){u=d;}return u?(console.error(u.stack||u),i6()):(l?(ft.success("已标记不想看"),Im.set(e.param,{...a})):ft.error(c||$u),l)});return {dislikeButtonEl:r&&v(Ro,{visible:n,inlinePosition:"left",icon:fle,tooltip:"我不想看",onClick:o}),hasDislikeEntry:r,onTriggerDislike:o}}const ple=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,v("circle",{cx:12,cy:12,r:10,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2})]}),hle=f.forwardRef(ple),gle=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[v("circle",{cx:12,cy:12,r:10}),v("path",{d:"m9 12l2 2l4-4"})]})]}),ble=f.forwardRef(gle),vle=hle,yle=ble;function Cle({multiSelecting:e,multiSelected:t,uniqId:n}){const r=Ve(a=>{const{selectedIdSet:l,multiSelecting:c}=Qt;if(!c)return;a?.preventDefault(),a?.stopPropagation();const u=!!a?.shiftKey;Qt.shiftMultiSelectAnchorUniqId??=n,u||(Qt.shiftMultiSelectAnchorUniqId=n),u?moe(Qt.shiftMultiSelectAnchorUniqId,n):t?l.delete(n):l.add(n);}),o=e&&v("div",{onClick:r,className:H("absolute inset-0 flex items-center justify-center bg-black/10",qq)}),s=e&&v(t?yle:vle,{onClick:r,className:H("size-30px cursor-pointer text-white [&_g]:fill-inherit",t?"fill-gate-primary":"fill-none")});return {toggleMultiSelect:r,multiSelectBgEl:o,multiSelectEl:s}}function xle(...e){}function wle({uniqId:e,recSharedEmitter:t,title:n,active:r,videoDuration:o,tryFetchImagePreviewData:i,imagePreviewDataBox:s,autoPreviewWhenHover:a,videoPreviewWrapperRef:l}){const c=Ve(()=>{const B=s.val?.videoshotJson?.data;return !!(B?.index?.length&&B?.image?.length)}),[u,d]=f.useState(false),[m,p]=fS(),[h,g]=fS(),b=Ve(()=>m||0),[y,C]=f.useState(false),x=Ri(false),w=Ri(false),S=N0(false),[I,$]=f.useState(void 0),E=B=>{const j=l.current?.getBoundingClientRect();if(!j)return;const{x:Y,width:q}=j,U=B.pageX-window.scrollX-Y;$(U/q);};mo("mouseenter",async B=>{t.emit("mouseenter",e),x.set(true),E(B);const j=i(),Y=800;let q;Ue.useDelayForHover&&(q=_t(Y)),await Promise.all([j,q].filter(Boolean)),x.val&&(w.set(true),a&&!M.val&&c()&&R(true));},{target:l});const P=Ve(()=>{x.set(false),w.set(false);});mo("mouseleave",P,{target:l}),dr(t,"mouseenter",B=>{B!==e&&P();}),mo("mousemove",B=>{C(true),x.val&&(!w.val||!a)&&E(B),a||A.stop();},{target:l});const M=N0(void 0),N=f.useRef(void 0),A=Sle({startByHoverBox:S,isHoveringBox:x,active:r,mouseMoved:y,idBox:M,autoPreviewWhenHover:a,setAutoPreviewing:d,setPreviewT:g,setPreviewProgress:p,onResume(){N.current?.();}}),k=Ve(async()=>{if(!M.val){await i(),c()&&R(false);return}A.togglePaused();}),R=Ve(B=>{S.set(B),C(false),A.reset(),A.stop(true),d(true),p(K=>K===void 0?0:K),g(void 0);const j=8e3;let Y=performance.now(),q=0;N.current=()=>{Y=performance.now()-b()*j;};function U(K){if(A.shouldStop())return A.stop();if(!A.paused){const J=performance.now(),Q=J-Y,G=rm(Q%j/j,0,1);if(p(G),(!q||J-q>=Ue.autoPreviewUpdateInterval)&&(p(G),q=J,o)){const ee=rm(Math.round(G*o),0,o);g(ee);}}M.val=requestAnimationFrame(U);}M.val=requestAnimationFrame(U);}),L=x.state,V=w.state,_=s.state?.videoshotJson?.data,z=!!_?.image?.length&&!!o&&(V||r)&&(a?u:true),D=f.useRef(null);let W,O;if(z){const B={videoDuration:o,pvideo:_};a?W={...B,progress:m,t:h}:W={...B,progress:I},O=v(Zae,{ref:D,...W});}return {onHotkeyPreviewAnimation:k,onStartPreviewAnimation:R,autoPreviewing:u,mouseProgress:I,previewProgress:m,previewT:h,isHovering:L,isHoveringAfterDelay:V,shouldShowPreview:z,previewImageRef:D,previewImgProps:W,previewImageEl:O}}function Sle({startByHoverBox:e,isHoveringBox:t,idBox:n,active:r,mouseMoved:o,autoPreviewWhenHover:i,setAutoPreviewing:s,setPreviewT:a,setPreviewProgress:l,onResume:c}){const u=t6(),d=Ve(()=>{if(u.current)return true;if(e.val){if(!t.val)return true}else if(!r||o)return true;return false}),m=Ve((g=false)=>{g||xle("stopAnimation: %o",{autoPreviewWhenHover:i,unmounted:u.current,isHovering:t.val,active:r,mouseMoved:o}),n.val&&cancelAnimationFrame(n.val),n.val=void 0,s(false),l(void 0),a(void 0),h.reset();}),p=f.useRef(false),h=f.useMemo(()=>({shouldStop:d,stop:m,get paused(){return p.current},set paused(g){p.current=g;},togglePaused(){const g=this.paused;this.paused=!this.paused,g&&c?.();},reset(){this.paused=false;}}),[d,m,p,c]);return h}function $le({item:e,cardData:t,onRemoveCurrent:n,actionButtonVisible:r,watchlaterAdded:o}){const{avid:i,bvid:s}=t,a=f.useMemo(()=>rl(e)||Rp(e)?e.goto==="av":e.api===Ee.Rank?t.goto==="av":e.api!==Ee.Live,[e,t]),l=qi((b,y)=>b(y),{manual:true}),c=jy(o),u=Ve(async(b,y)=>{if(b?.preventDefault(),b?.stopPropagation(),l.loading)return {success:false};if(!i||!s)return {success:false};y??=o?aae:M0;const C=await l.runAsync(y,i),x=y===M0;return C&&(x?zs.bvidSet.add(s):zs.bvidSet.delete(s),e.api===Ee.Watchlater?x||(await _t(250),n?.(e,t)):ft.success(`已${x?"添加":"移除"}稍后再看`)),{success:C,targetState:x}}),d=18,m=l.loading?v(bM,{className:"size-16px"}):e.api===Ee.Watchlater?o?v(hM,{className:"size-16px"}):v(yu,{size:d,useAnimation:c===true}):o?v(yu,{size:d,useAnimation:c===false}):v(T1,{className:"size-20px"}),p=e.api===Ee.Watchlater?o?"已添加稍后再看, 点击移除":"已移除稍后再看":o?"已添加稍后再看, 点击移除":"稍后再看",h=a&&v(Ro,{visible:r,inlinePosition:"right",icon:m,tooltip:p,onClick:u});return {context:f.useMemo(()=>({watchlaterAdded:o,hasWatchlaterEntry:a,onToggleWatchlater:u}),[u,o,a]),watchlaterButtonEl:h}}const Nm=f.memo(function({style:t,className:n,item:r,loading:o,active:i,onRemoveCurrent:s,onMoveToFirst:a,refresh:l,emitter:c,recSharedEmitter:u,tab:d,baseCss:m,gridDisplayMode:p,multiSelecting:h,...g}){o=o??!r;const b=f.useMemo(()=>r&&id(r),[r]),y=Tse(r?.api===Ee.AppRecommend?r.param:void 0),C=Kne(b?.authorMid),x=tae(b?.authorMid),w=Bie(b?.bvid),S=loe(r?.uniqId),I=!!y,$=C,E=x,M=Pae(I||$||E),N=H("bili-video-card",ws,{[S3]:i},"relative",n),A=[m,M,By(p)&&$v.card,h&&S&&Iae];return v("div",{"data-bvid":b?.bvid,style:t,className:N,css:A,...g,children:o?v(Xae,{loading:o}):r&&b&&(I?v(Yae,{item:r,cardData:b,emitter:c,dislikedReason:y}):$?v(ME,{item:r,cardData:b,blockType:"blacklist"}):E?v(ME,{item:r,cardData:b,blockType:"filter"}):v(Ple,{item:r,cardData:b,active:i,emitter:c,recSharedEmitter:u,tab:d,onRemoveCurrent:s,onMoveToFirst:a,refresh:l,watchlaterAdded:w,gridDisplayMode:p,multiSelecting:h,multiSelected:S}))})});var Ele={name:"vpmszz",styles:"background-color:unset;position:static;height:100%"},Ile={name:"he9puu",styles:"display:block;position:relative;overflow:hidden;isolation:isolate"};const Ple=f.memo(function({item:t,cardData:n,tab:r,active:o=false,onRemoveCurrent:i,onMoveToFirst:s,refresh:a,emitter:l=xM,recSharedEmitter:c=n6,watchlaterAdded:u,gridDisplayMode:d,multiSelecting:m=false,multiSelected:p}){const{accessKey:h,style:{videoCard:{useBorder:g,useBorderOnlyOnHover:b}},videoCard:{actions:y,imgPreview:{autoPreviewWhenHover:C,disableWhenMultiSelecting:x}},spaceUpload:{showVol:w},__internalEnableCopyBvidInfo:S}=Mt(),{avid:I,bvid:$,cid:E,goto:P,href:M,title:N,cover:A,duration:k,durationStr:R,recommendReason:L,statItems:V,authorName:_,authorMid:z}=n,D=!!h,W=!(x&&m),O=P==="av",B=["av","bangumi","picture","live"];B.includes(P)||Yr(`none (${B.join(",")}) goto type %s`,P,t);const j=By(d),Y=f.useMemo(()=>H1({item:t})?.aspectRatio,[t]),q=Ri(void 0),U=f.useMemo(()=>!(!$||!$.startsWith("BV")||P!=="av"||!W),[$,P,W]),K=Lu(async()=>{if(!U||dae(q.val))return;const Ae=await uae($);q.set(Ae),cn(Ae.videoshotJson)||J(Ae.videoshotJson);}),J=wM(Ae=>{Qa.warning({title:`${Ae.message} (code: ${Ae.code})`,description:`${N} (${$})`,duration:2});},3,false),Q=f.useRef(null),G=f.useRef(null),ee=g&&!j?Q:G,{onStartPreviewAnimation:re,onHotkeyPreviewAnimation:oe,isHovering:be,previewImageEl:Z}=wle({uniqId:t.uniqId,recSharedEmitter:c,title:N,active:o,videoDuration:k,tryFetchImagePreviewData:K,imagePreviewDataBox:q,autoPreviewWhenHover:C,videoPreviewWrapperRef:ee});Wi(()=>{o&&(KC(`${G0}_activeItem`,t),Ue.videoCard.imgPreview.autoPreviewWhenKeyboardSelect&&K().then(()=>{re(false);}));},[o]);const te=o||be,{watchlaterButtonEl:ce,context:ue}=$le({item:t,cardData:n,onRemoveCurrent:i,actionButtonVisible:te,watchlaterAdded:u}),{dislikeButtonEl:he,hasDislikeEntry:ye,onTriggerDislike:pe}=mle({item:t,authed:D,actionButtonVisible:te}),{largePreviewActionButtonEl:ie,largePreviewEl:ge,shouldUseLargePreviewCurrentTime:Se,getLargePreviewCurrentTime:ke,largePreviewVisible:qe,hideLargePreview:De}=VA({shouldFetchPreviewData:U,actionButtonVisible:te,hasLargePreviewActionButton:y.showLargePreview,bvid:$,cid:E,uniqId:t.uniqId,recSharedEmitter:c,aspectRatioFromItem:Y,cover:A,cardRef:Q,videoCardAsTriggerRef:ee}),ze=Aae(t,I),{onOpenWithMode:je,handleVideoLinkClick:Le,consistentOpenMenus:we,conditionalOpenMenus:Me,openInPopupActionButtonEl:Fe,onOpenInPopup:Re}=tG({href:M,item:t,cardData:n,actionButtonVisible:te,hasOpenInPopupActionButton:y.openInPipWindow,getLargePreviewCurrentTime:ke,hideLargePreview:De,shouldUseLargePreviewCurrentTime:Se}),{multiSelectBgEl:Pe,multiSelectEl:Qe,toggleMultiSelect:mt}=Cle({multiSelecting:m,multiSelected:p,uniqId:t.uniqId}),it=Ve(Ae=>{g&&(Ae.target.closest(".ant-dropdown-menu")||Ae.target.closest("a")||je());});dr(l,"open",()=>je()),dr(l,"open-in-popup",Re),dr(l,"open-with-large-preview-visible",()=>{qe&&(De(),je());}),dr(l,"toggle-watch-later",()=>{ue.onToggleWatchlater();}),dr(l,"trigger-dislike",()=>{pe();}),dr(l,"start-preview-animation",re),dr(l,"hotkey-preview-animation",oe);const ct=_ae({item:t,cardData:n,tab:r,isNormalVideo:O,refresh:a,watchlaterContext:ue,favContext:ze,onMoveToFirst:s,hasDislikeEntry:ye,onTriggerDislike:pe,onRemoveCurrent:i,consistentOpenMenus:we,conditionalOpenMenus:Me,multiSelecting:m}),bt=Ve(Ae=>{Ae&&ze.updateFavFolderNames();}),pt=YA(t),rt=MC(t),et=hu(t)&&t.live_status===No.Streaming||Rp(t)&&t.goto===Li.Live,Xe=r===Be.AppRecommend&&!rl(t)&&!hu(t),Ie=RC(t)&&w||Ds(t)&&!!t.vol&&!Xe,Ne=S&&v(Ro,{visible:te,inlinePosition:"right",icon:v(Es,{className:"size-14px"}),tooltip:"复制 BVID 信息",onClick:Ae=>{Ae.stopPropagation(),Ae.preventDefault(),Is(FC(n));}}),ae=F($e,{children:[m&&Qe,he,pt&&v(sle,{item:t}),rt&&v(lle,{item:t}),et&&v(cle,{}),Xe&&v(ule,{item:t}),Ie&&!!t.vol&&v(dle,{vol:t.vol,volTooltip:Ds(t)?t.volTooltip:void 0})]}),ve=F($e,{children:[ce,Ne,Fe,ie]}),de=!EE(ae),se=!EE(ve),Ce=An("left-top-marks",au.topContainer("left"),m?"gap-x-10px":void 0),fe=Ap(t)&&t.progress>0?v(GA,{progress:t.progress/t.duration,className:H("h-3px",jq)}):void 0,xe=`.${zo} .${ws}`,Oe=f.useMemo(()=>[Dt(xe," &{overflow:hidden;border-radius:",D1,";transition:border-radius 0.2s ease-in-out;}",""),!j&&(be||o||m||g&&!b)&&Dt(xe," &{border-bottom-left-radius:0;border-bottom-right-radius:0;}","")],[j,be,o,m,g,b]),We=f.useMemo(()=>g&&!b||m?false:!g||g&&b&&!be,[g,b,be,m]),Ze=hp(),st=F("a",{ref:Ae=>G.current=Ae,href:M,target:Ze,className:H($3,We&&"ring-1px ring-gate-border"),css:[Ile,Oe,j&&$v.cover,"",""],onClick:Le,onContextMenu:Ae=>{mc(Ae)||Ae.preventDefault();},children:[v("div",{className:"bili-video-card__image",style:{aspectRatio:"16 / 9"},children:v("div",{className:"bili-video-card__image--wrap",children:v(DA,{src:`${A}@672w_378h_1c_!web-home-common-cover`,className:"bili-video-card__cover v-img",style:{borderRadius:0},imgProps:{alt:Oq?"":N}})})}),F("div",{className:"bili-video-card__stats",css:[Dt(xe," &{pointer-events:none;border-radius:0;}",""),"",""],children:[v("div",{className:"bili-video-card__stats--left gap-x-4px xl:gap-x-8px",children:V.map(({field:Ae,value:Ge})=>v(vre,{field:Ae,value:Ge},Ae))}),v("span",{className:"bili-video-card__stats__duration relative top-0.5px",children:O&&R})]}),fe,W&&Z,Pe,de&&v("div",{className:Ce,children:ae}),se&&v("div",{className:H("right-actions",au.topContainer("right")),children:ve})]}),Ct=v(qA,{item:t,cardData:n,gridDisplayMode:d,handleVideoLinkClick:m?mt:Le}),an=v($e,{children:ge});function On(Ae){return v(ts,{getPopupContainer:()=>Js?document.body:Q.current||document.body,styles:{root:{zIndex:Number(TM)}},menu:{items:ct,style:{width:"max-content"}},trigger:["contextMenu"],onOpenChange:bt,children:Ae})}function Rt(Ae){return v("div",{className:"bili-video-card__wrap",ref:Ge=>Q.current=Ge,css:[Ele,j&&$v.cardWrap,"",""],onClick:m?mt:it,onContextMenu:Ge=>{g&&Ge.preventDefault();},children:Ae})}const me=g&&!j?On(Rt(F($e,{children:[st,Ct]}))):Rt(F($e,{children:[On(st),Ct]}));return F($e,{children:[me,an]})});function Nle({enabled:e,refresh:t,minIndex:n=0,maxIndex:r,containerRef:o,getScrollerRect:i,changeScrollY:s,videoCardEmitters:a,activeLargePreviewItemIndex:l}){const[c,u]=f.useState(void 0),d=Ve(()=>!(!e||ui())),m=Ve(()=>{if(typeof c!="number"||!o.current)return false;const $=i(),E=o.current.querySelector(`.${ws}.${S3}`)?.getBoundingClientRect();return !(!$||!E||E.top-$.top<-($.height+E.height)||E.top-$.top>$.height*2+E.height)});function p($){const E=S(c),P=E.getBoundingClientRect().left,M=R=>Math.abs(P-R)<1;{const R=YC(o.current),L=$==="down"?R:-R,V=S(c+L);if(V){const _=V.getBoundingClientRect().left;if(M(_))return L}}let N=0,A=E;const k=()=>$==="down"?A.nextElementSibling:A.previousElementSibling;for(;k();){if(A=k(),!A.classList.contains(ws))continue;$==="down"?N++:N--;const R=A.getBoundingClientRect().left;if(M(R))return N}return 0}const h=$=>E=>{if(!d())return;E?.preventDefault();let P;if(m()){const M=typeof $=="number"?$:p($);P=c+M;}else P=C();if(P<n){I(n);return}if(P>r){I(r);return}u(P),I(P);},g=($,E)=>{qr($,(P,M)=>{d()&&E(P,M);},{exactMatch:true});};g("leftarrow",h(-1)),g("rightarrow",h(1)),g("tab",h(1)),g("shift.tab",h(-1)),g("uparrow",h("up")),g("downarrow",h("down"));const b=()=>{d()&&u(void 0);},y=()=>{if(!(!d()||typeof c!="number"))return a[c]};g("esc",b),g("enter",$=>{if(d()){if(typeof c=="number")return $.preventDefault(),a[c]?.emit("open");if(typeof l=="number")return $.preventDefault(),a[l]?.emit("open-with-large-preview-visible")}}),g("x",()=>y()?.emit("open-in-popup")),g("backspace",()=>y()?.emit("trigger-dislike")),g(["s","w"],()=>y()?.emit("toggle-watch-later")),g(["period","p"],()=>y()?.emit("hotkey-preview-animation"));function C(){const $=i();if(!$)return 0;const E=w();for(const[P,M]of E.entries())if(M.getBoundingClientRect().top>=$.top)return P;return 0}const x=`.${ws}`;function w(){return [...o.current?.querySelectorAll(x)||[]]}function S($){return w()[$]}function I($){const E=S($);E?.scrollIntoViewIfNeeded?.(false);const P=i(),M=E.getBoundingClientRect();if(!(!P||!M)){if(M.top<=P.top){const N=-(P.top-M.top+10);s?.({offset:N});return}if(P.bottom-M.bottom<20){const N=20-(P.bottom-M.bottom);s?.({offset:N});return}}}return {activeIndex:c,clearActiveIndex:b}}const Mle=new Map,Rle=new Map;function YC(e,t=true){const{gridDisplayMode:n,useCustomGrid:r,enableForceCoumn:o,forceColumnCount:i}=Ue.grid;if(n===ri.List)return 1;if(t&&n===ri.TwoColumnGrid)return 2;if(r&&o&&i)return i;const s=r?Mle:Rle;{const c=s.get(Math.trunc(window.innerWidth));if(c)return c}if(e||=document.querySelector(`.${k0}`),!e)return 0;const a=globalThis.getComputedStyle(e);if(a.display!=="grid")return 0;const l=a.gridTemplateColumns.split(" ").length;return s.set(window.innerWidth,l),l}const Ale=Hn.extend("modules:rec-services:pc");class ol extends ns{constructor(t){super(ol.PAGE_SIZE),this.isKeepFollowOnly=t;}static PAGE_SIZE=30;tabbarView=void 0;sidebarView=void 0;hasMoreExceptQueue=true;fetchMore(t){const n=this.isKeepFollowOnly?5:2;return this.getRecommendTimes(n,t)}async loadMoreBatch(t,n){if(this.hasMore)return this.qs.bufferQueue.length?this.qs.sliceFromQueue(t):this.qs.doReturnItems(await this.getRecommendTimes(t,n))}async getRecommendTimes(t,n){let r=(await Promise.all(z0(t).map(()=>this.getRecommend(n)))).flat();return r=r.filter(i=>[Li.AV,Li.Live].includes(i.goto)?true:([Li.Ad].includes(i.goto)||Ale("uknown goto: %s %o",i.goto,i),false)),r=Yi(r,i=>i.id),r.forEach(i=>{i.rcmd_reason?.reason_type===1&&(i.rcmd_reason.content||="已关注");}),r.map(i=>({...i,uniqId:`${Ee.PcRecommend}-${i.bvid||i.room_info?.room_id||crypto.randomUUID()}`,api:Ee.PcRecommend}))}page=0;async getRecommend(t){const n=++this.page,r="/x/web-interface/wbi/index/top/feed/rcmd",o={fresh_type:8,fresh_idx_1h:n,fresh_idx:n,ps:ol.PAGE_SIZE,web_location:1430650,feed_version:"V8",homepage_ver:1},s=(await Tt.get(r,{signal:t,params:o})).data;return !cn(s)&&s.code===-62011&&s.message==="暂时没有更多内容了"?(this.hasMoreExceptQueue=false,[]):(s.data?.item||zt(s.message||"API 请求没有返回结果"),s.data?.item||[])}}const Tle=[Be.KeepFollowOnly,Be.PcRecommend,Be.AppRecommend],Ole={[Be.AppRecommend]:()=>new vu(Hie()),[Be.PcRecommend]:()=>new ol(false),[Be.KeepFollowOnly]:()=>new ol(true),[Be.DynamicFeed]:()=>new kp(jC()),[Be.Watchlater]:({existingService:e})=>{const{watchlaterAddSeparator:t,watchlaterItemsOrder:n}=Ue,r=e&&e instanceof bu?e.getServiceSnapshot().bvidIndexMap:void 0;return new bu(n,t,r,Qn(Tc).searchText)},[Be.Fav]:()=>new Dp(WC()),[Be.Hot]:()=>new yG,[Be.Live]:()=>new sd,[Be.SpaceUpload]:()=>new zC(eA())};function za(e,t){const n=e[t];return Ai(n,`servicesRegistry[tab=${t}] should not be nil`),n}const Ud=Hn.extend("service"),Fle=e=>e.api===Ee.Separator?e.uniqId:nA(e,{[Ee.AppRecommend]:t=>t.param,[Ee.PcRecommend]:t=>t.bvid,[Ee.DynamicFeed]:t=>t.modules.module_dynamic.major.archive.bvid,[Ee.Watchlater]:t=>t.bvid,[Ee.Fav]:t=>t.bvid,[Ee.PopularGeneral]:t=>t.bvid,[Ee.PopularWeekly]:t=>t.bvid,[Ee.Rank]:t=>t.uniqId,[Ee.Live]:t=>t.roomid,[Ee.SpaceUpload]:t=>t.bvid});function R0(e,t){return Yi([...e,...t],Fle)}const RE=e=>e===Be.PcRecommend||e===Be.KeepFollowOnly;async function QA(e,t,n=5){const{tab:r,abortSignal:o,servicesRegistry:i}=t;let s=[],a=true;const l=async c=>{let u=[];if(!Tle.includes(r)){const m=za(i,r);u=await m.loadMore(o)??[],a=m.hasMore,u=w0(u,r),s=R0(s,u);return}let d;if(r===Be.KeepFollowOnly)d=8,Ud("getMinCount: addMore(restCount = %s) times=%s",c,d);else {const m=RE(r)?ol.PAGE_SIZE:vu.PAGE_SIZE,p=rA(r)?n:1.2;d=Math.ceil(c*p/m),Ud("getMinCount: addMore(restCount = %s) multipler=%s pagesize=%s times=%s",c,p,m,d);}if(RE(r)){const m=za(i,r);u=await m.loadMoreBatch(d,o)||[],a=m.hasMore;}else {const m=za(i,Be.AppRecommend);u=await(m.config.addOtherTabContents?m.loadMore(o):m.loadMoreBatch(o,d))||[],a=m.hasMore;}u=w0(u,r),s=R0(s,u);};for(await l(e);;){if(o?.aborted){Ud("getMinCount: break for abortSignal");break}if(!a){Ud("getMinCount: break for tab=%s hasMore=false",r);break}if(s.filter(u=>u.api!==Ee.Separator).length>=e)break;await l(e-s.length);}return s}async function Lle(e){let t=await QA(YC(void 0,false)*2,e,5);return e.tab===Be.Watchlater&&(t=t.slice(0,20)),t}const QC=()=>YC()*4;async function Ble(e){let t=QC();return e.tab===Be.DynamicFeed&&await za(e.servicesRegistry,Be.DynamicFeed).shouldReduceMinCount()&&(t=1),QA(t,e,5)}function ZA({tab:e,debug:t,fetcher:n,preAction:r,postAction:o,updateViewFromService:i,self:s}){const{recStore:a,servicesRegistry:l}=Zr();ir(()=>{c(true);}),ml(()=>{s.abortController.abort();});const c=Ve(async(d=false)=>{const m=performance.now();if(a.refreshing){let I;const $=()=>t("refresh(): tab=%s [start], current refreshing, sametab but conditions change, abort existing",e);if(e===Be.DynamicFeed&&(I=l[Be.DynamicFeed])&&!ei(I.config,jC()))$(),s.abortController.abort();else if(e===Be.Fav&&(I=l[Be.Fav])&&!ei(I.config,WC()))$(),s.abortController.abort();else if(e===Be.SpaceUpload&&(I=l[Be.SpaceUpload])&&!ei(I.config,eA()))$(),s.abortController.abort();else if(e===Be.Hot&&(I=l[Be.Hot])&&I.subtab!==mr.subtab)t("refresh(): tab=%s [start], current refreshing, sametab but subtab changed, abort existing",e),s.abortController.abort();else {t("refresh() tab=%s [start], current refreshing, prevent same tab refresh()",e);return}}else t("refresh(): tab=%s [start]",e);a.refreshing=true,s.setStore({refreshError:void 0,hasMore:true,items:[],refreshTs:Date.now()});const p=new AbortController,{signal:h}=p;s.abortController=p,await r?.();function g(){a.refreshing=false,s.setStore({showSkeleton:false});}function b(I){g(),s.setStore({refreshError:I}),console.error(I);}function y(){g(),s.setStore({hasMore:za(l,e).hasMore});}async function C(){const[I,$]=await Am(()=>n({tab:e,abortSignal:h,servicesRegistry:l}));return h.aborted?t("refresh(): tab=%s [aborted], ignoring rest code",e):I?b(I):(s.setStore({items:$??[]}),true)}let x;const w=d?l[e]:void 0;if(w?(w.restore(),s.setStore({items:w.qs.bufferQueue.slice(0,QC())}),x=!!await C()&&!!Nl[e].swr):(s.setStore({showSkeleton:true}),x=true),x){const[I,$]=Rm(()=>Ole[e]({existingService:w}));if(I)return b(I);if(l[e]=$,i?.(),!await C())return}y(),await o?.();const S=performance.now()-m;t("refresh(): tab=%s [success] cost %s ms",e,S.toFixed(0));}),{recSharedEmitter:u}=Zr();return dr(u,"refresh",c),{refresh:c}}f.forwardRef(({context:e,children:t,...n},r)=>{function o(i){r&&(typeof r=="function"?r(i):r.current=i);}return v("div",{ref:i=>{o(i),e.containerRef.current=i;},...n,className:e.gridClassName,children:t})});const kle=({title:e,titleId:t,...n},r)=>F("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?v("title",{id:t,children:e}):null,F("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,children:[v("path",{d:"M4 24c0 11.046 8.954 20 20 20v0c11.046 0 20-8.954 20-20S35.046 4 24 4"}),v("path",{d:"M36 24c0-6.627-5.373-12-12-12s-12 5.373-12 12s5.373 12 12 12v0"})]})]}),Dle=f.forwardRef(kle),nc=Hn.extend("components:RecGrid"),AE="grid-col-span-full";class JA{store=tn({refreshTs:-1,showSkeleton:false,hasMore:true,refreshError:void 0,items:[]});setStore=t=>{const n=["items","refreshError"];for(const r of n)typeof t[r]=="object"&&(t[r]=v3(t[r]));Object.assign(this.store,t);};loadedPage=0;abortController=new AbortController;loadMoreLocker={};isLocked=t=>!!this.loadMoreLocker[t];lock=t=>{this.loadMoreLocker={[t]:true};};unlock=t=>{this.loadMoreLocker[t]=false;};get loadMoreRunning(){return this.isLocked(this.store.refreshTs)}}const eT=f.memo(f.forwardRef(function({className:e,containerClassName:t,shortcutEnabled:n,tab:r,infiniteScrollUseWindow:o,onScrollToTop:i,scrollerRef:s},a){const l=Ou(()=>new JA,[]),{useCustomGrid:c,gridDisplayMode:u,enableForceCoumn:d,forceColumnCount:m}=nt(Ue.grid),{multiSelecting:p}=nt(Qt),{recStore:h,servicesRegistry:g}=Zr(),{refreshing:b}=nt(h),y=t6();uoe();const C=Ve(()=>{y.current||(h.tabbarView=vS(g[r]?.tabbarView),h.sidebarView=vS(g[r]?.sidebarView));});ir(C);const x=Ve(()=>{q(),C(),i?.();}),w=Ve(()=>{q(),C(),l.loadedPage=1,A();}),{refresh:S}=ZA({tab:r,debug:nc,fetcher:Ble,preAction:x,postAction:w,updateViewFromService:C,self:l});f.useImperativeHandle(a,()=>({refresh:S}),[S]);const{items:I,hasMore:$,refreshError:E,refreshTs:P,showSkeleton:M}=nt(l.store);f.useEffect(()=>Jse(I),[I]);const N=f.useRef();mo("visibilitychange",he=>{if(!(document.visibilityState==="visible")){N.current=Date.now();return}h.refreshing||l.loadMoreRunning||r===Be.Watchlater&&N.current&&Date.now()-N.current>Wn("1h")&&S(true);},{target:document});const A=Ve(async()=>{await _t(Js?100:0),nc("checkShouldLoadMore(): footerInView = %s",ee.current),ee.current&&k();}),k=Ve(async()=>{if(y.current||h.refreshing||l.loadMoreRunning||l.store.refreshError||l.abortController.signal.aborted||l.store.refreshTs<0||!l.store.hasMore)return;const he=l.store.refreshTs;l.lock(he);let ye=l.store.items,pe=true,ie;try{const ge=za(g,r);let Se=await ge.loadMore(l.abortController.signal)||[];Se=w0(Se,r),ye=R0(ye,Se),pe=ge.hasMore;}catch(ge){ie=ge;}if(ie)throw l.unlock(he),Qa.error({title:"加载失败",description:ie.message||ie.stack}),ie;{const ge=l.store.refreshTs;if(he!==ge){nc("loadMore: skip update for mismatch refreshTs, %o != %o",he,ge),l.unlock(he);return}}l.loadedPage++,nc("loadMore: loadedPage(%s) len(%s -> %s)",l.loadedPage,l.store.items.length,ye.length),l.setStore({hasMore:pe,items:ye}),l.unlock(he),A();}),R=I,L=f.useMemo(()=>R.filter(he=>he.api!==Ee.Separator),[R]),V=f.useRef(null),_=Ve(()=>{if(o){const he=ks.get()+50;return new DOMRect(0,he,window.innerWidth,window.innerHeight-he)}else return s?.current?.getBoundingClientRect()}),z=f.useMemo(()=>new Map,[P]),D=f.useMemo(()=>L.map(({uniqId:he})=>{const ye=he;return z.get(ye)||(()=>{const pe=new Or;return z.set(ye,pe),pe})()}),[L]),{recSharedEmitter:W}=Zr(),[O,B]=f.useState(void 0);dr(W,"show-large-preview",B);const j=f.useMemo(()=>{if(O)return L.findIndex(he=>he.uniqId===O)},[R,O]),{activeIndex:Y,clearActiveIndex:q}=Nle({enabled:n,refresh:S,maxIndex:L.length-1,containerRef:V,getScrollerRect:_,videoCardEmitters:D,activeLargePreviewItemIndex:j,changeScrollY:o?function({offset:he,absolute:ye}){const pe=document.documentElement;if(typeof he=="number"){pe.scrollTop+=he;return}if(typeof ye=="number"){pe.scrollTop=ye;return}}:void 0}),U=he=>{l.setStore({items:he(l.store.items)});},K=Ve((he,ye,pe)=>{U(ie=>{const ge=ie.slice(),Se=[];for(const[ke,qe]of he.entries()){const De=ge.findIndex(je=>je.uniqId===qe);if(De===-1)continue;ge.splice(De,1);const ze=ye?.[ke];ze&&Se.push(ze),r===Be.Watchlater&&g[r]?.decreaseTotal(),r===Be.Fav&&g[r]?.decreaseTotal();}return !pe&&Se.length&&(Se.length<=3?Se.forEach(ke=>ft.success(`已移除: ${Se.join(", ")}`)):ft.success(`已移除: ${Se.length}个视频`)),ge});}),J=Ve((he,ye)=>{U(pe=>{const ie=pe.find(qe=>qe.uniqId===he.uniqId);if(!ie)return pe;const ge=pe.indexOf(ie),Se=pe.slice();Se.splice(ge,1);const ke=Se.findIndex(qe=>qe.api!==Ee.Separator);return Se.splice(ke,0,ie),Se});});dr(W,"remove-cards",([he,ye,pe])=>K(he,ye,pe));const{ref:Q,inView:G}=Xse({root:o?null:s?.current||null,rootMargin:`0px 0px ${window.innerHeight}px 0px`,onChange(he){he&&(nc("footerInView change to visible",he),A());}}),ee=Fs(G),re=v("div",{ref:Q,className:H(AE,"flex items-center justify-center py-30px text-size-120%"),children:!b&&v($e,{children:$?F($e,{children:[v(Dle,{className:"mr-10px size-40px animate-spin color-gate-primary"}),"加载中~"]}):v($e,{children:"没有更多了~"})})}),oe=f.useMemo(()=>H("min-h-100vh",TT,t),[t]),be=f.useMemo(()=>H(FO,k0,c?OT:BE,u===ri.TwoColumnGrid?FT:u===ri.CenterEmptyGrid?RT:void 0,e),[u,c,e]),Z=f.useMemo(()=>{if(u!==ri.TwoColumnGrid&&c&&d&&m)return {"--col":m.toString()}},[u,c,d,m]),te=jA();f.useMemo(()=>({footerContent:re,containerRef:V,gridClassName:be}),[re,V,be]);const ce=({gridChildren:he,gridSiblings:ye}={})=>F("div",{"data-tab":r,ref:V,className:oe,children:[v("div",{"data-tab":r,className:be,style:Z,children:he}),ye]});if(E)return console.error("RecGrid.refresh error:",E.stack||E),ce({gridSiblings:v(koe,{tab:r,err:E})});if(b&&M){const he=QC();return ce({gridChildren:Array.from({length:he}).fill(0).map((ye,pe)=>v(Nm,{loading:true,tab:r},pe))})}const ue=he=>{if(he.api===Ee.Separator)return v(tl,{className:H(AE,MT),orientation:"horizontal",titlePlacement:"left",children:he.content},he.uniqId);{const ye=L.findIndex(ie=>ie.uniqId===he.uniqId),pe=ye===Y;return v(Nm,{baseCss:[te,Mae(pe)],tab:r,item:he,active:pe,onRemoveCurrent:(ie,ge,Se)=>K([ie.uniqId],[ge.title],Se),onMoveToFirst:J,refresh:S,emitter:D[ye],recSharedEmitter:W,gridDisplayMode:u,multiSelecting:p},he.uniqId)}};return ce({gridChildren:F($e,{children:[R.map(ue),re]})})})),Ol=tn({modalFeedVisible:false,modalSettingsVisible:false});function ZC(){return nt(Ol)}function tT(){const{modalFeedVisible:e,modalSettingsVisible:t}=ZC();return [e,t,FA(),BA()].every(n=>n===false)}const nT=f.forwardRef(function({className:e="",style:t,refreshHotkeyEnabled:n},r){n??=true;const{refreshing:o}=Qz(),i=jn(),s=f.useRef(null),a=Ve(()=>{s.current&&(s.current.disabled||s.current.click());});f.useImperativeHandle(r,()=>({click:a}),[]),qr("r",()=>{ui()||n&&a();},{exactMatch:true});const l=Mp(),{watchlaterItemsOrder:c,popularWeeklyUseShuffle:u}=Mt(),{usingShuffle:d}=nt(kt),m=l===Be.AppRecommend||l===Be.PcRecommend||l===Be.KeepFollowOnly||l===Be.Watchlater&&c===hr.Shuffle||l===Be.Fav&&d||l===Be.Hot&&t5(u)?"换一换":"刷新",[p,h]=framerMotion.useAnimate(),g=Ve(b=>{h(p.current,{rotate:[0,360]},{duration:.5,type:"tween"}),i();});return F(Je,{ref:s,style:t,className:H("flex items-center gap-x-4px [&.ant-btn:not(:disabled):focus-visible]:outline-0",e),disabled:o,onClick:g,children:[v(nre,{ref:p,className:"size-14px"}),m]})}),zle=f.memo(function({show:t,onHide:n}){const{grid:{gridDisplayMode:r},modalFeedFullScreen:o,sidebarAlign:i}=Mt(),{usingTwoColumnMode:s}=HP(r),a=!s&&o,l=f.useRef(null),c=f.useMemo(()=>H(a?"b-5px":"b-1px","b-gate-primary b-solid"),[a]),u=Ve(()=>{l.current&&(l.current.scrollTop=0);}),{modalSettingsVisible:d}=ZC(),m=[t,!d,!FA(),!BA()].every(Boolean),p=Wy(true),{tabbarView:h,sidebarView:g}=nt(p.recStore),{tab:b,direction:y}=NC(),C=()=>F("div",{className:H(rr.modalHeader,"gap-x-15px pr-15px"),children:[F("div",{className:"left flex flex-shrink-1 flex-wrap items-center gap-x-15px gap-y-4px",children:[v(S4,{}),h]}),F("div",{className:"right flex flex-shrink-0 items-center gap-x-8px",children:[r===ri.TwoColumnGrid?null:v(Rse,{initialOpen:true,children:v(_le,{})}),v(nT,{refreshHotkeyEnabled:m}),v(Ku,{onClick:n,className:"ml-5px"})]})]}),x=H(s&&"bg-black/90%"),I=H("h-[calc(100vh-30px)] max-h-unset w-[calc(100vw-30px)] pr-0",a&&"h-full w-full",s&&_P,c);return v(Zm.Provider,{value:p,children:F(Gu,{show:t,onHide:n,clsModalMask:x,clsModal:I,children:[C(),F("div",{"data-role":"modal-body",className:H("flex flex-1 gap-x-25px overflow-hidden",i===el.Right&&"flex-row-reverse"),children:[v(n5,{tab:b,sidebarView:g,className:"max-h-full"}),v("div",{className:"h-full flex-1 overflow-y-scroll pr-15px",ref:l,children:v(eT,{tab:b,direction:y,shortcutEnabled:m,onScrollToTop:u,infiniteScrollUseWindow:false,scrollerRef:l},b)})]})]})})});function _le(){return F($e,{children:[v(at,{configPath:"showModalFeedOnLoad",label:"自动查看更多",tooltip:"打开首页时默认打开推荐弹窗",extraAction:e=>{e&&ft.success("已开启自动查看更多: 下次打开首页时将直接展示推荐弹窗");}}),v(at,{configPath:"modalFeedFullScreen",label:"全屏",tooltip:"世界清净了~"})]})}function rT(){sT(),Ol.modalFeedVisible=true;}function Hle(){Ol.modalFeedVisible=false;}_o&&Ue.showModalFeedOnLoad&&setTimeout(rT);function Vle(){Ol.modalSettingsVisible?oT():JC();}function JC(){sT(),Ol.modalSettingsVisible=true;}function oT(){Ol.modalSettingsVisible=false;}function iT(){GM.registerMenuCommand?.("⚙️ 设置",JC);}const sT=wu(function(){const t=document.createElement("div");t.classList.add("modals-container",zo),document.body.appendChild(t),Ho.createRoot(t).render(v(fi,{children:v(jle,{})}));});function jle(){const{modalFeedVisible:e,modalSettingsVisible:t}=ZC();return F($e,{children:[v(zle,{show:e,onHide:Hle}),v(Nse,{show:t,onHide:oT})]})}function Wle(e,t,n){const r=Ve(t),o=Ri(n);return f.useEffect(()=>{const i=new ResizeObserver(s=>{for(const a of s)if(a.target===e&&a.contentRect){const l=r(a);ei(o.val,l)||o.set(l);}});return i.observe(e),()=>{i.disconnect();}},[e,r]),o.state}function qle(){const e=f.useRef(null),[t,n]=f.useState(false);return f.useEffect(()=>{const r=_s(()=>{if(!e.current)return;const o=Math.trunc(e.current.getBoundingClientRect().top*10)/10,i=Number.parseInt(getComputedStyle(e.current).top),s=o<=i;n(s);},16);return r(),document.addEventListener("scroll",r),window.addEventListener("resize",r),globalThis.addEventListener("orientationchange",r),()=>{document.removeEventListener("scroll",r),window.removeEventListener("resize",r),globalThis.removeEventListener("orientationchange",r);}},[t]),[e,t]}const Ule=Hn.extend("RecHeader"),aT=f.forwardRef(function({leftSlot:t,rightSlot:n,shortcutEnabled:r},o){const{accessKey:i,pureRecommend:s,showModalFeedEntry:a,multiSelect:{showIcon:l},style:{pureRecommend:{useStickyTabbar:c,stickyTabbarShadow:u}}}=Mt();qr(["shift.comma"],I=>{ui()||Vle();},{exactMatch:true,useCapture:true});const[d,m]=qle(),p=Ve(()=>{if(!s)return;const I=d.current?.parentElement;if(!I)return;const $=I.getBoundingClientRect(),E=ks.get();if($.top<E){const P=U_(I).top;Ule("[refresh:scroll] rect.top = %s, headerHeight = %s",$.top,E),document.documentElement.scrollTop=P-E+2;}});f.useImperativeHandle(o,()=>({scrollToTop:p}));const h=ks.use(),g=Kle(),b=S1.use(),y=k1(),C=(()=>{let I;return b?I=y?"rgba(0, 0, 0, 26%) 0px 2px 10px 1px":"rgba(0, 0, 0, 13%) 0 1px 10px 1px;":I=`0 2px 4px ${y?"rgb(255 255 255 / 5%)":"rgb(0 0 0 / 8%)"}`,Dt("box-shadow:",I,";","")})(),x=Gle(),w=An(s&&c&&"sticky z-gate-rec-header mb-10px b-b-1px b-b-transparent b-b-solid",s&&c&&m&&"b-b-gate-bg-lv1 bg-$bg1_float",m&&"sticky-state-on"),S=f.useMemo(()=>{if(!(s&&c))return;const $=[Dt("top:",h-1,"px;","")];return u&&m&&$.push(C,x),$},[s,c,u,m,h,C,x]);return v("div",{ref:d,"data-role":"tab-bar-wrapper",className:w,css:S,children:F("div",{"data-role":"tab-bar",className:`${E3} relative mb-0 h-auto flex flex-row items-center justify-between gap-x-15px px-0 py-8px`,children:[F("div",{"data-class-name":"left",className:"h-full flex flex-shrink-1 flex-wrap items-center gap-x-15px gap-y-8px",children:[v(S4,{}),t]}),F("div",{"data-class-name":"right",className:"h-full flex flex-shrink-0 items-center gap-x-8px",children:[n,!i&&g&&v(ER,{style:{marginLeft:5}}),l&&v(j4,{iconOnly:true,addCopyActions:true}),v(Jt,{title:"设置",arrow:false,children:F(Je,{onClick:JC,className:"icon-only-round-button",children:[v(Ise,{}),v(pM,{className:"size-14px"})]})}),v(nT,{refreshHotkeyEnabled:r}),a&&F(Je,{onClick:rT,className:"gap-0",children:[v("span",{className:"relative top-1px",children:"查看更多"}),v(RA,{})]})]})]})})});function Gle(){const{xScrolling:e,bodyWidth:t}=Wle(document.body,n=>{const r=n.contentRect.width,o=!!(r&&Math.round(r)>Math.round(window.innerWidth));return o?{xScrolling:o,bodyWidth:r}:{xScrolling:o}},()=>({xScrolling:false}));return f.useMemo(()=>{if(e){const n=Math.floor(t);return Dt("margin-inline:calc((100% - ",n,"px) / 2);padding-inline:calc((",n,"px - 100%) / 2);","")}else {const n=O1||Js?"0px":"20px";return Dt("margin-inline:calc((100% - 100vw + ",n,") / 2);padding-inline:calc((100vw - ",n," - 100%) / 2);","")}},[e,t])}function Kle(){return Mp()===Be.AppRecommend}function Xle(){const{grid:{twoColumnModeAlign:e},sidebarAlign:t}=Mt(),{usingTwoColumnMode:n}=VP(),r=tT(),o=Wy(),{tabbarView:i,sidebarView:s}=nt(o.recStore),{tab:a,direction:l}=NC(),c=f.useRef(null),u=Ve(()=>c.current?.scrollToTop()),d=ks.use(),m=f.useMemo(()=>Dt("position:sticky;top:",d+55,"px;max-height:calc(100vh - ",d+55+20,"px);",""),[d]);let p,h,g;return p=H("flex gap-x-25px",t===el.Right&&"flex-row-reverse"),h="flex-1",g=H(n&&[_P,DD(e,"margin")]),F(Zm.Provider,{value:o,children:[v(aT,{ref:c,leftSlot:i,shortcutEnabled:r}),F("div",{className:p,children:[v(n5,{css:m,tab:a,sidebarView:s}),v(eT,{tab:a,direction:l,containerClassName:h,className:g,shortcutEnabled:r,infiniteScrollUseWindow:true,onScrollToTop:u},a)]})]})}const Yle=Hn.extend("components:SectionRecommend");function Qle(){const e=Wy(),{tab:t}=NC();return v(Zm.Provider,{value:e,children:v(Zle,{tab:t},t)})}const Zle=f.memo(function({tab:t}){const n=f.useMemo(()=>z0(20).map(()=>crypto.randomUUID()),[]),r=Ou(()=>new JA,[]);ZA({tab:t,debug:Yle,fetcher:Lle,self:r});const{items:o,refreshError:i,showSkeleton:s}=nt(r.store),{recStore:a}=Zr(),{refreshing:l}=nt(a),c=!o.length||i||l&&s,u=jA(),d=tT();return F("section",{"data-area":"推荐",children:[v(aT,{shortcutEnabled:d}),v("div",{className:H(k0,AT,BE),style:{marginBottom:30},children:c?n.map(m=>v(Nm,{tab:t},m)):o.map(m=>m.api===Ee.Separator?null:v(Nm,{item:m,tab:t,baseCss:u},m.uniqId))})]})}),Jle=location.hash.startsWith(`#/${Jn}/`),lT="html.bewly-design:not(:has(#i_cecream,#app))";function ece(){return !Jle&&!!document.querySelector(lT)}function tce(){return np(lT,()=>{Yr("unmount for using bewly-design"),xu?.unmount();},{pollTimeout:5e3,warnOnTimeout:false})}let xu;async function nce(){if(La(".adblock-tips"),La(".vip-login-tip"),np("html.gray",e=>e.classList.remove("gray")),iT(),ece())return Yr("quit for using bewly-design");Ue.pureRecommend?await oce():await rce(),tce();}async function rce(){const e=await hl(()=>document.querySelector(".bili-feed4-layout"));if(!e){Yr("init fail, can not find .bili-feed4-layout");return}const t=document.createElement("section");t.classList.add(zo),e.insertAdjacentElement("afterbegin",t),xu=Ho.createRoot(t),xu.render(v(fi,{injectGlobalStyle:true,antdSetup:true,children:v(Qle,{})})),La(".bili-feed4 .header-channel");}async function oce(){Js&&await _t(500),La("#i_cecream .bili-feed4-layout, body > #app .bili-feed4-layout"),La(".bili-feed4 .header-channel"),La(".palette-button-wrap");const e=document.createElement("div");e.classList.add("bili-feed4-layout","pure-recommend"),await hl(()=>document.querySelector(".bili-feed4 .bili-header"),{interval:20,timeout:2e3}),document.body.appendChild(e);const t=document.createElement("section");t.classList.add(zo),e.appendChild(t),xu=Ho.createRoot(t),xu.render(F(fi,{injectGlobalStyle:true,antdSetup:true,children:[v(Xle,{}),v(ea.BackTop,{style:{insetInlineEnd:"var(--back-top-right, 24px)"}})]}));}function ex(){sce(),iT();}const ice=wu(()=>{const e=document.createElement("div");document.body.appendChild(e),Ho.createRoot(e).render(v(fi,{injectGlobalStyle:true,antdSetup:true}));});function sce(){ice();}function ace(){try{return globalThis.self!==window.top}catch{return true}}function lce(){ace()||(ex(),Ue.videoCard.videoPreview.addTo.searchPage&&cce());}function cce(){const e=a6(()=>{const r=Array.from(document.querySelectorAll(".video-list-item:has(> .bili-video-card),div:has(> .bili-video-card)"));for(const o of r)uce(o);},1);e(),new MutationObserver(()=>e()).observe(document.body,{childList:true,subtree:true});}const TE=new WeakSet,OE=`${Jn}-add-large-preview-processed`;function uce(e){if(TE.has(e)||e.getAttribute(OE))return;const t=e.querySelector(".bili-watch-later--wrap");if(!t)return;const n=document.createElement("div");t.insertAdjacentElement("afterend",n),TE.add(e),e.setAttribute(OE,"true"),Ho.createRoot(n).render(v(fi,{children:v(dce,{el:e})}));}function dce({el:e}){const{bvid:t="",cover:n}=f.useMemo(()=>fce(e),[e]),r=f.useMemo(()=>e.querySelector(".bili-video-card")??e,[e]),o=f.useMemo(()=>r.querySelector(".bili-video-card__wrap > a"),[e]),i=Vy(r),s=f.useRef(o),{largePreviewActionButtonEl:a,largePreviewEl:l}=VA({shouldFetchPreviewData:!!t,hasLargePreviewActionButton:true,actionButtonVisible:i,actionButtonProps:{useMotion:true,motionProps:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{delay:0}},transition:{duration:.2,ease:"linear",delay:.2}}},bvid:t,cid:void 0,uniqId:t,recSharedEmitter:n6,cover:n,videoCardAsTriggerRef:s});return F($e,{children:[v("div",{className:An(au.top("right"),"right-[calc(8px+28px+5px)]"),children:a}),ST.createPortal(l,r)]})}function fce(e){let t;{const r=e.querySelector(".bili-video-card__wrap > a")?.href;r&&(t=/^\/video\/(?<bvid>BV\w+)\//i.exec(new URL(r).pathname)?.groups?.bvid);}const n=e.querySelector("picture.v-img.bili-video-card__cover img")?.currentSrc;return {bvid:t,cover:n}}function mce(){ex(),hce();}const pce=`${Jn}-${crypto.randomUUID()}`;async function hce(){if(!As.mid)return;const e=".h-action",t=".upinfo .operations";await np([e,t].join(","),n=>{As.href=location.href,As.usingNewSpacePage=n.matches(t),cT();const r=document.createElement("span");r.id=pce,r.classList.add("mr-24px"),n.insertAdjacentElement("afterbegin",r),Ho.createRoot(r).render(v(fi,{injectGlobalStyle:true,children:v(gce,{})}));},{pollTimeout:1e4,pollInterval:1e3});}const As=tn({href:location.href,usingNewSpacePage:false,followed:false,get mid(){return bce(this.href)},get collectionId(){const e=new URL(this.href);{const t=/https:\/\/space.bilibili.com\/(?<mid>\d+)\/lists\/(?<collectionId>\d+)(?:\?type=season)?/,n=this.href.match(t);if(n?.groups?.collectionId&&(e.searchParams.get("type")==="season"||!e.searchParams.get("type")))return Number(n?.groups?.collectionId)}if(/https:\/\/space.bilibili.com\/\d+\/channel\/collectiondetail\?/.test(this.href)){const r=new URL(this.href).searchParams.get("sid")?.trim();if(r)return Number(r)}},get isCollectionPage(){return typeof this.collectionId=="number"},get searchKeyword(){return /https:\/\/space.bilibili.com\/\d+\/search/.test(this.href)?new URLSearchParams(location.search).get("keyword")??void 0:void 0},get isSearching(){return !!this.searchKeyword?.trim()}}),cT=ci(async()=>{const e=await hl(()=>{if(Array.from(document.querySelectorAll(".space-follow-btn")).filter(n=>n.textContent?.trim()==="已关注").length>0)return true},{interval:100,timeout:5e3});As.followed=!!e;});window.navigation!==void 0&&window.navigation.addEventListener?.("navigatesuccess",()=>{As.href=location.href,cT();});function gce(){const{mid:e,collectionId:t,followed:n,isSearching:r,searchKeyword:o}=nt(As);if(!e)return;const i="w-34px b-white/33% rounded-full hover:b-gate-primary hover:bg-gate-primary",s="size-17px";let a;{let u=`https://www.bilibili.com/?${Qo.Mid}=${e}`;r&&o&&(u+=`&${Qo.SearchText}=${o}`),a=v(Og,{className:i,href:u,tooltip:`在「${uo}」中查看 UP 的投稿`,children:v(R1,{className:s})},"btnSpaceUpload");}let l;if(n){const u=`https://www.bilibili.com/?${jr.Mid}=${e}`;l=v(Og,{className:i,href:u,tooltip:`在「${uo}」中查看 UP 的动态`,children:v(M1,{className:s})},"btnDynamicFeed");}let c;return typeof t=="number"&&(c=v(Og,{className:i,href:`https://www.bilibili.com/?${fm.CollectionIdFull}=${t}`,target:"_blank",tooltip:`在「${uo}」中查看合集`,children:v(Lp,{className:s})},"btnViewCollection")),F("span",{className:"inline-flex items-center gap-x-8px",children:[c,a,l]})}function Og({href:e,children:t,className:n,style:r,tooltip:o,...i}){const{usingNewSpacePage:s}=nt(As),a=An("h-34px w-150px flex cursor-pointer items-center justify-center b-1px b-white/20% rounded-6px b-solid bg-white/14% text-14px color-white font-700 transition-duration-300 transition-property-all hover:bg-white/40%",n),l=s?v("a",{...i,href:e,className:a,style:r,children:t}):v("a",{href:e,className:H("h-f-btn",n),style:{width:"auto",paddingInline:"15px",...r},...i,children:t});return o?v(Jt,{title:o,children:l}):l}function bce(e=location.href){const n=new URL(e).pathname.split("/").map(r=>r.trim()).find(Boolean);if(!(!n||!/^\d+$/.test(n)))return n}function A0(){if(!(typeof unsafeWindow>"u"))return unsafeWindow.player}const T0=Hn.extend("main:video-play-page");async function vce(){ex(),yce(),Pce(),await wce(),await Sce();}function yce(){Cce(),xce(),Ice();}function Cce(){V1&&GM.registerMenuCommand?.("🎦 小窗打开",()=>{uT(),$ce();});}function xce(){O1&&GM.registerMenuCommand?.("▶️ IINA 打开",()=>{uT(),Ece();});}async function wce(){const e=new URL(location.href).searchParams.get(Ki.PlayerScreenMode);if(!(e===$i.WebFullscreen||e===$i.Fullscreen))return;let n;e===$i.WebFullscreen&&(n=()=>document.querySelector('[role="button"][aria-label="网页全屏"]')?.click()),e===$i.Fullscreen&&(n=()=>document.querySelector('[role="button"][aria-label="全屏"]')?.click());const r=()=>document.querySelector("#bilibili-player .bpx-player-container")?.dataset.screen||$i.Normal,o=Date.now()+Wn("30s");for(;r()!==e&&Date.now()<=o;)T0("current mode: %s",r()),n?.(),await _t(100);T0("handleFullscreen to %s complete",e);}async function Sce(){if(vN()||!(new URL(location.href).searchParams.get(Ki.ForceAutoPlay)===L1.ON))return;const t=()=>{const r=A0();return !!r&&!r.isPaused()},n=Date.now()+Wn("30s");for(;Date.now()<=n&&!t();)A0()?.play(),await _t(1e3);T0("handleForceAutoPlay complete, playing = %s",t());}function uT(){const e=A0();e&&!e.isPaused()&&e.pause();}function $ce(){const e=new URL(location.href);e.searchParams.set(Ki.PlayerScreenMode,$i.WebFullscreen);const t=e.href;UM(t,"");}function Ece(){const e=`iina://open?url=${encodeURIComponent(location.href)}`;window.open(e,"_self");}function Ice(){GM.registerMenuCommand?.("⭐️ 加入收藏",O0);}async function Pce(){if(!Ue.fav.useCustomFavPicker.onPlayPage||!PR())return;document.addEventListener("keydown",t=>{t.key==="e"&&(ui()||Nce(t.target)||(t.stopImmediatePropagation(),t.preventDefault(),O0()));},{capture:true}),(await hl(()=>document.querySelector(".video-fav.video-toolbar-left-item"),{interval:100,timeout:5e3}))?.addEventListener("click",t=>{t.stopImmediatePropagation(),t.preventDefault(),O0();},{capture:true});}async function O0(){const e=PR();if(!e)return ft.error("无法解析视频 BVID !");const t=M4.bv2av(e);await Pm(void 0,async n=>{const r=await Mi.addFav(t,n.id);return r&&ft.success(`已加入收藏夹「${n.title}」`),r});}function Nce(e){return e.tagName.toLowerCase()!=="bili-comments"?false:!!Mce(e,["bili-comments-header-renderer","bili-comment-box","#editor.active"])}function Mce(e,t){let n=e;for(const r of t)if(n=n.shadowRoot?.querySelector(r)??void 0,!n)return;return n}rn.extend(_G);(function(){if(_o)return nce();if(IR)return vce();if(BO)return mce();if(kO)return lce()})();
})(React, ReactDOM, axios, SparkMD5, localforage, Motion, UAParser, PinyinMatch);