Greasy Fork

Greasy Fork is available in English.

Bilibili-Gate

Bilibili 自定义首页

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Bilibili-Gate
// @namespace    https://magicdawn.fun
// @version      0.34.0
// @author       magicdawn
// @description  Bilibili 自定义首页
// @license      MIT
// @icon         https://www.bilibili.com/favicon.ico
// @homepageURL  http://greasyfork.icu/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, vT, yT, T0, sparkMd5, nx, framerMotion, wT) {
  '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 cT = 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));};

  cT(' @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-6px{margin-right:6px}.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{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-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%}.text-size-13px{font-size:13px}.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 ST='@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)}';cT(ST);const $T="_cls-gate-video-grid-divider_kgj54_1",F0="_video-grid_131wu_2",ET="_video-grid-center-empty_131wu_11",BE="_video-grid-bili-feed4_131wu_22",IT="_limit-two-lines_131wu_40",PT="_video-grid-container_131wu_58",NT="_video-grid-custom_131wu_69",MT="_narrow-mode_131wu_104";function RT(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 LE(e,t){const n=new Set(t);return e.filter(r=>!n.has(r))}function AT(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 TT(e,t,n){return e<t?n==="asc"?-1:1:e>t?n==="asc"?1:-1:0}function Qo(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=TT(u,d,a);if(m!==0)return m}return 0})}function OT(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 FT(e,t){return Math.floor(OT(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 BT(e){return DE(e)?NaN:Number(e)}function LT(e){return e?(e=BT(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function DT(e){const t=LT(e),n=t%1;return n?t-n:t}function B0(e){return [...new Set(e)]}function Xi(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 kT=class extends Error{constructor(t="The operation was aborted"){super(t),this.name="AbortError";}};function _T(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 zT(){}function xu(e){let t=false,n;return function(...r){return t||(t=true,n=e(...r)),n}}function zt(e,{signal:t}={}){return new Promise((n,r)=>{const o=()=>{r(new kT);},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 zs(e,t,{signal:n,edges:r=["leading","trailing"]}={}){let o=null;const i=_T(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 L0(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 kE(e){return e==null||typeof e!="object"&&typeof e!="function"}function _E(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Dp(e){if(kE(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 Tg(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Og(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const zE="[object RegExp]",HE="[object String]",VE="[object Number]",jE="[object Boolean]",Fg="[object Arguments]",WE="[object Symbol]",qE="[object Date]",UE="[object Map]",GE="[object Set]",KE="[object Array]",HT="[object Function]",XE="[object ArrayBuffer]",qd="[object Object]",VT="[object Error]",YE="[object DataView]",QE="[object Uint8Array]",ZE="[object Uint8ClampedArray]",JE="[object Uint16Array]",e3="[object Uint32Array]",jT="[object BigUint64Array]",t3="[object Int8Array]",n3="[object Int16Array]",r3="[object Int32Array]",WT="[object BigInt64Array]",o3="[object Float32Array]",i3="[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(kE(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"&&qT(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),...Tg(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 qT(e){switch(Og(e)){case Fg:case KE:case XE:case YE:case jE:case qE:case o3:case i3:case t3:case n3:case r3:case UE:case VE:case qd:case zE:case GE:case HE:case WE:case QE:case ZE:case JE:case e3:return  true;default:return  false}}function _a(e){return Sa(e,void 0,e,new Map,void 0)}function za(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 Ac(e){return e==="__proto__"}function Xo(e,t,n){const r=Object.keys(t);for(let o=0;o<r.length;o++){const i=r[o];if(Ac(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]=Xo(a,s,n):e[i]=Xo([],s,n):za(s)?za(a)?e[i]=Xo(a,s,n):e[i]=Xo({},s,n):(a===void 0||s!==void 0)&&(e[i]=s);}return e}function UT(e,t){const n={...e};for(let r=0;r<t.length;r++){const o=t[r];delete n[o];}return n}function Ha(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 GT=new RegExp("\\p{Lu}?\\p{Ll}+|[0-9]+|\\p{Lu}+(?!\\p{Ll})|\\p{Emoji_Presentation}|\\p{Extended_Pictographic}|\\p{L}+","gu");function KT(e){return Array.from(e.match(GT)??[])}function XT(e,t){return Xo(Dp(e),t,function n(r,o){if(Array.isArray(o))return Array.isArray(r)?Xo(Dp(r),o,n):Xo([],o,n);if(za(o))return za(r)?Xo(Dp(r),o,n):Xo({},o,n)})}function s3(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function YT(e,t,n){return tc(e,t,void 0,void 0,void 0,void 0,n)}function tc(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 dc(e,t,i,s)}return dc(e,t,i,s)}function dc(e,t,n,r){if(Object.is(e,t))return  true;let o=Og(e),i=Og(t);if(o===Fg&&(o=qd),i===Fg&&(i=qd),o!==i)return  false;switch(o){case HE:return e.toString()===t.toString();case VE:{const l=e.valueOf(),c=t.valueOf();return s3(l,c)}case jE:case qE:case WE:return Object.is(e.valueOf(),t.valueOf());case zE:return e.source===t.source&&e.flags===t.flags;case HT: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 UE:{if(e.size!==t.size)return !1;for(const[l,c]of e.entries())if(!t.has(l)||!tc(c,t.get(l),l,e,t,n,r))return !1;return !0}case GE:{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=>tc(d,p,void 0,e,t,n,r));if(m===-1)return !1;c.splice(m,1);}return !0}case KE:case QE:case ZE:case JE:case e3:case jT:case t3:case n3:case r3:case WT:case o3:case i3:{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(!tc(e[l],t[l],l,e,t,n,r))return !1;return !0}case XE:return e.byteLength!==t.byteLength?!1:dc(new Uint8Array(e),new Uint8Array(t),n,r);case YE:return e.byteLength!==t.byteLength||e.byteOffset!==t.byteOffset?!1:dc(new Uint8Array(e),new Uint8Array(t),n,r);case VT:return e.name===t.name&&e.message===t.message;case qd:{if(!(dc(e.constructor,t.constructor,n,r)||za(e)&&za(t)))return !1;const c=[...Object.keys(e),...Tg(e)],u=[...Object.keys(t),...Tg(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(!tc(p,h,m,e,t,n,r))return !1}return !0}default:return !1}}finally{n.delete(e),n.delete(t);}}function Bo(e,t){return YT(e,t,zT)}function ni(e){return e==null}function QT(e){const t=KT(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 Pm(e){try{return [null,e()]}catch(t){return [t,null]}}async function Nm(e){try{return [null,await e()]}catch(t){return [t,null]}}function Ri(e,t){if(!e)throw typeof t=="string"?new Error(t):t}function ZT(e){switch(typeof e){case "number":case "symbol":return  false;case "string":return e.includes(".")||e.includes("[")||e.includes("]")}}function D0(e){return typeof e=="string"||typeof e=="symbol"?e:Object.is(e?.valueOf?.(),-0)?"-0":String(e)}function a3(e){if(e==null)return "";if(typeof e=="string")return e;if(Array.isArray(e))return e.map(a3).join(",");const t=String(e);return t==="0"&&Object.is(Number(e),-0)?"-0":t}function l3(e){if(Array.isArray(e))return e.map(D0);if(typeof e=="symbol")return [e];e=a3(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 tr(e,t,n){if(e==null)return n;switch(typeof t){case "string":{if(Ac(t))return n;const r=e[t];return r===void 0?ZT(t)?tr(e,l3(t),n):n:r}case "number":case "symbol":{typeof t=="number"&&(t=D0(t));const r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return JT(e,t,n);if(Object.is(t?.valueOf(),-0)?t="-0":t=String(t),Ac(t))return n;const r=e[t];return r===void 0?n:r}}}function JT(e,t,n){if(t.length===0)return n;let r=e;for(let o=0;o<t.length;o++){if(r==null||Ac(t[o]))return n;r=r[t[o]];}return r===void 0?n:r}function rx(e){return e!==null&&(typeof e=="object"||typeof e=="function")}const eO=/^(?:0|[1-9]\d*)$/;function tO(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 eO.test(e)}}const nO=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rO=/^\w*$/;function oO(e,t){return Array.isArray(e)?false:typeof e=="number"||typeof e=="boolean"||e==null||DE(e)?true:typeof e=="string"&&(rO.test(e)||!nO.test(e))||t!=null&&Object.hasOwn(t,e)}const iO=(e,t,n)=>{const r=e[t];(!(Object.hasOwn(e,t)&&s3(r,n))||n===void 0&&!(t in e))&&(e[t]=n);};function sO(e,t,n,r){if(e==null&&!rx(e))return e;let o;oO(t,e)?o=[t]:Array.isArray(t)?o=t:o=l3(t);const i=n(tr(e,o));let s=e;for(let a=0;a<o.length&&s!=null;a++){const l=D0(o[a]);if(Ac(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:rx(u)?u:tO(o[a+1])?[]:{};}iO(s,l,c),s=s[l];}return e}function rl(e,t,n){return sO(e,t,()=>n,()=>{})}function aO(e,t){if(e=DT(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 lO=Symbol(),k0=Symbol(),nc="a",c3="f",ox="p",u3="c",d3="t",_0="h",fc="w",z0="o",H0="k";let cO=(e,t)=>new Proxy(e,t);const Bg=Object.getPrototypeOf,Lg=new WeakMap,f3=e=>e&&(Lg.has(e)?Lg.get(e):Bg(e)===Object.prototype||Bg(e)===Array.prototype),Sf=e=>typeof e=="object"&&e!==null,uO=e=>Object.values(Object.getOwnPropertyDescriptors(e)).some(t=>!t.configurable&&!t.writable),dO=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(Bg(e),t)},fO=(e,t)=>{const n={[c3]:t};let r=false;const o=(a,l)=>{if(!r){let c=n[nc].get(e);if(c||(c={},n[nc].set(e,c)),a===fc)c[fc]=true;else {let u=c[a];u||(u=new Set,c[a]=u),u.add(l);}}},i=()=>{r=true,n[nc].delete(e);},s={get(a,l){return l===k0?e:(o(H0,l),m3(Reflect.get(a,l),n[nc],n[u3],n[d3]))},has(a,l){return l===lO?(i(),true):(o(_0,l),Reflect.has(a,l))},getOwnPropertyDescriptor(a,l){return o(z0,l),Reflect.getOwnPropertyDescriptor(a,l)},ownKeys(a){return o(fc),Reflect.ownKeys(a)}};return t&&(s.set=s.deleteProperty=()=>false),[s,n]},V0=e=>e[k0]||e,m3=(e,t,n,r)=>{if(!f3(e))return e;let o=r&&r.get(e);if(!o){const l=V0(e);uO(l)?o=[l,dO(l)]:o=[l],r?.set(e,o);}const[i,s]=o;let a=n&&n.get(i);return (!a||a[1][c3]!==!!s)&&(a=fO(i,!!s),a[1][ox]=cO(s||i,a[0]),n&&n.set(i,a)),a[1][nc]=t,a[1][u3]=n,a[1][d3]=r,a[1][ox]},mO=(e,t)=>{const n=Reflect.ownKeys(e),r=Reflect.ownKeys(t);return n.length!==r.length||n.some((o,i)=>o!==r[i])},p3=(e,t,n,r,o=Object.is)=>{if(o(e,t))return  false;if(!Sf(e)||!Sf(t))return  true;const i=n.get(V0(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[_0]||[])if(s=Reflect.has(e,a)!==Reflect.has(t,a),s)return s;if(i[fc]===true){if(s=mO(e,t),s)return s}else for(const a of i[z0]||[]){const l=!!Reflect.getOwnPropertyDescriptor(e,a),c=!!Reflect.getOwnPropertyDescriptor(t,a);if(s=l!==c,s)return s}for(const a of i[H0]||[])if(s=p3(e[a],t[a],n,r,o),s)return s;if(s===null)throw new Error("invalid used");return s},pO=e=>f3(e)&&e[k0]||null,ix=(e,t=true)=>{Lg.set(e,t);},hO=(e,t,n)=>{const r=[],o=new WeakSet,i=(s,a)=>{var l,c,u;if(o.has(s))return;Sf(s)&&o.add(s);const d=Sf(s)&&t.get(V0(s));if(d){if((l=d[_0])===null||l===void 0||l.forEach(m=>{const p=`:has(${String(m)})`;r.push(a?[...a,p]:[p]);}),d[fc]===true){const m=":ownKeys";r.push(a?[...a,m]:[m]);}else (c=d[z0])===null||c===void 0||c.forEach(m=>{const p=`:hasOwn(${String(m)})`;r.push(a?[...a,p]:[p]);});(u=d[H0])===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},$f={},j0=e=>typeof e=="object"&&e!==null,gO=e=>j0(e)&&!wu.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),h3=(e,t)=>{const n=Dg.get(e);if(n?.[0]===t)return n[1];const r=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return ix(r,true),Dg.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(wu.has(i))ix(i,false);else if(Bi.has(i)){const[l,c]=Bi.get(i);a.value=h3(l,c());}Object.defineProperty(r,o,a);}),Object.preventExtensions(r)},bO=(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&&(sx(c,s)||Tc.has(s)&&sx(c,Tc.get(s))))return  true;n(i),j0(s)&&(s=pO(s)||s);const u=!Bi.has(s)&&yO(s)?rn(s):s;return t(i,u),Reflect.set(o,i,u,a),r(["set",[i],s,c]),true}}),Bi=new WeakMap,wu=new WeakSet,Dg=new WeakMap,Ud=[1],Tc=new WeakMap;let sx=Object.is,vO=(e,t)=>new Proxy(e,t),yO=gO,CO=h3,xO=bO;function rn(e={}){if(!j0(e))throw new Error("object required");const t=Tc.get(e);if(t)return t;let n=Ud[0];const r=new Set,o=(b,y=++Ud[0])=>{n!==y&&(i=n=y,r.forEach(C=>C(b,y)));};let i=n;const s=(b=Ud[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=!wu.has(y)&&Bi.get(y);if(C){if(($f?"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(($f?"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=xO(()=>m,c,u,o),h=vO(e,p);Tc.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 Yi(e,t,n){const r=Bi.get(e);($f?"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 Yn(e){const t=Bi.get(e);($f?"production":void 0)!=="production"&&!t&&console.warn("Please use proxy object");const[n,r]=t;return CO(n,r())}function wO(e){return wu.add(e),e}function g3(){return {proxyStateMap:Bi,refSet:wu,snapCache:Dg,versionHolder:Ud,proxyCache:Tc}}const SO={},$O=(e,t)=>{const n=f.useRef(void 0);f.useEffect(()=>{n.current=hO(e,t);}),f.useDebugValue(n.current);},EO=$O,IO=new WeakMap;function rt(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=Yi(e,l,n);return l(),()=>{c(),i.current=false;}},[e,n]),()=>{const l=Yn(e);try{if(i.current&&o.current&&!p3(o.current,l,r,new WeakMap))return o.current}catch{}return l},()=>Yn(e));f.useLayoutEffect(()=>{o.current=s;}),(SO?"production":void 0)!=="production"&&EO(s,r);const a=f.useMemo(()=>new WeakMap,[]);return m3(s,r,a,IO)}var dd=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 fd={exports:{}},kp,ax;function b3(){if(ax)return kp;ax=1;var e=1e3,t=e*60,n=t*60,r=n*24,o=r*7,i=r*365.25;kp=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 kp}var _p,lx;function PO(){if(lx)return _p;lx=1;function e(t){r.debug=r,r.default=r,r.coerce=c,r.disable=a,r.enable=i,r.enabled=l,r.humanize=b3(),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 _p=e,_p}var cx;function NO(){return cx||(cx=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=PO()(t);const{formatters:l}=e.exports;l.j=function(c){try{return JSON.stringify(c)}catch(u){return "[UnexpectedJSONParseError]: "+u.message}};})(fd,fd.exports)),fd.exports}var MO=NO();const RO=vr(MO),uo="Bilibili-Gate",Zn="bilibili-gate",W0="bilibili_gate",ux="bili-gate",zn=RO(Zn),v3="https://api.bilibili.com",y3="https://app.bilibili.com",Va={appkey:"4409e2ce8ffd12b8",appsec:"59b43e04ad6965f34319062b478f83dd"},Ho=`${Zn}-root`,AO=`${Zn}-video-grid`,xs=`${Zn}-video-card`,C3=`${Zn}-video-card-active`,x3=`${Zn}-video-card-cover`,w3=`${Zn}-tab-bar`,TO=`${Zn}-video-card__recommend-reason`,ol="请求失败, 请重试 !!!",Su="操作失败, 请重试 !!!",md="bilibili.com";var Li=(e=>(e[e.Tld=md]="Tld",e.Main=`www.${md}`,e.Space=`space.${md}`,e.Search=`search.${md}`,e))(Li||{});const{hostname:Oc,pathname:dx}=location;Oc===Li.Tld||Oc.endsWith(`.${Li.Tld}`);const S3=[Li.Tld,Li.Main].includes(Oc),OO=Oc===Li.Space,FO=Oc===Li.Search,Vo=S3&&(dx==="/"||dx==="/index.html");function $3(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 po=$3(console.warn),BO=$3(console.error);function at(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 fx=Ar()?f__namespace.useLayoutEffect:f__namespace.useEffect,Kt=(e,t)=>{const n=f__namespace.useRef(true);fx(()=>e(n.current),t),fx(()=>(n.current=false,()=>{n.current=true;}),[]);},Gd=(e,t)=>{Kt(n=>{if(!n)return e()},t);};function Ef(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 Lt(e,t){const[n,r]=f.useState(e),o=t!==void 0?t:n;return Kt(i=>{i||r(t);},[t]),[o,r]}var zp={exports:{}},Ut={};var mx;function LO(){if(mx)return Ut;mx=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 px;function DO(){return px||(px=1,zp.exports=LO()),zp.exports}var Hp=DO();function il(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 kO=Symbol.for("react.element"),_O=Symbol.for("react.transitional.element"),zO=Symbol.for("react.fragment");function E3(e){return e&&typeof e=="object"&&(e.$$typeof===kO||e.$$typeof===_O)&&e.type===zO}const HO=Number(f.version.split(".")[0]),VO=(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=>{VO(r,n);});}},Hs=(...e)=>il(()=>In(...e),e,(t,n)=>t.length!==n.length||t.every((r,o)=>r!==n[o])),Vs=e=>{if(!e)return  false;if(q0(e)&&HO>=19)return  true;const t=Hp.isMemo(e)?e.type.type:e.type;return !(typeof t=="function"&&!t.prototype?.render&&t.$$typeof!==Hp.ForwardRef||typeof e=="function"&&!e.prototype?.render&&e.$$typeof!==Hp.ForwardRef)};function q0(e){return f.isValidElement(e)&&!E3(e)}const jO=e=>q0(e)&&Vs(e),js=e=>{if(e&&q0(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 I3(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]=I3(s[o],i,n,r),s}function zr(e,t,n,r=false){return t.length&&r&&n===void 0&&!co(e,t.slice(0,-1))?e:I3(e,t,n,r)}function WO(e){return typeof e=="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function hx(e){return Array.isArray(e)?[]:{}}const qO=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function P3(e,t={}){const{prepareArray:n}=t,r=n||(()=>[]);let o=hx(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||WO(u)){if(!c.has(u)){c.add(u);const m=co(o,a);d?o=zr(o,a,r(m,u)):(!m||typeof m!="object")&&(o=zr(o,a,hx(u))),qO(u).forEach(p=>{s([...a,p],c);});}}else o=zr(o,a,u);}s([]);}),o}function $a(...e){return P3(e)}let kg={};const UO=e=>{};function GO(e,t){}function KO(e,t){}function XO(){kg={};}function N3(e,t,n){!t&&!kg[n]&&(e(false,n),kg[n]=true);}function Cn(e,t){N3(GO,e,t);}function YO(e,t){N3(KO,e,t);}Cn.preMessage=UO;Cn.resetWarned=XO;Cn.noteOnce=YO;function Zt(e,t){const n=Object.assign({},e);return Array.isArray(t)&&t.forEach(r=>{delete n[r];}),n}function hr(e,t={}){let n=[];return f.Children.forEach(e,r=>{r==null&&!t.keepEmpty||(Array.isArray(r)?n=n.concat(hr(r)):E3(r)&&r.props?n=n.concat(hr(r.props.children,t)):n.push(r));}),n}function QO(){return {...f__namespace}.useId}let gx=0;const bx=QO(),Ws=bx?(function(t){const n=bx();return t||n}):(function(t){const[n,r]=f__namespace.useState("ssr-id");return f__namespace.useEffect(()=>{const o=gx;gx+=1,r(`rc_unique_${o}`);},[]),t||n}),ZO=`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`,JO=`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`,e8=`${ZO} ${JO}`.split(/[\s\n]+/),t8="aria-",n8="data-";function vx(e,t){return e.indexOf(t)===0}function rr(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"||vx(o,t8))||n.data&&vx(o,n8)||n.attr&&e8.includes(o))&&(r[o]=e[o]);}),r}function M3(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=M3(e[t]))&&(r&&(r+=" "),r+=n);}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function V(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=M3(e))&&(r&&(r+=" "),r+=t);return r}var r8={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 o8={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 Vp(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 yx=(e,t,n)=>n===0?e:e/100;function Fl(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=o8[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=Fl(t.r),this.g=Fl(t.g),this.b=Fl(t.b),this.a=typeof t.a=="number"?Fl(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]=Fl(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=Vp(t,yx);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]});}fromHslString(t){const n=Vp(t,yx);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]});}fromRgbString(t){const n=Vp(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 pd=2,Cx=.16,i8=.05,s8=.05,a8=.15,R3=5,A3=4,l8=[{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 xx(e,t,n){let r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-pd*t:Math.round(e.h)+pd*t:r=n?Math.round(e.h)+pd*t:Math.round(e.h)-pd*t,r<0?r+=360:r>=360&&(r-=360),r}function wx(e,t,n){if(e.h===0&&e.s===0)return e.s;let r;return n?r=e.s-Cx*t:t===A3?r=e.s+Cx:r=e.s+i8*t,r>1&&(r=1),n&&t===R3&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function Sx(e,t,n){let r;return n?r=e.v+s8*t:r=e.v-a8*t,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function $u(e,t={}){const n=[],r=new Ft(e),o=r.toHsv();for(let i=R3;i>0;i-=1){const s=new Ft({h:xx(o,i,true),s:wx(o,i,true),v:Sx(o,i,true)});n.push(s);}n.push(r);for(let i=1;i<=A3;i+=1){const s=new Ft({h:xx(o,i),s:wx(o,i),v:Sx(o,i)});n.push(s);}return t.theme==="dark"?l8.map(({index:i,amount:s})=>new Ft(t.backgroundColor||"#141414").mix(n[i],s).toHexString()):n.map(i=>i.toHexString())}const jp={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"},_g=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];_g.primary=_g[5];const zg=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];zg.primary=zg[5];const Hg=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];Hg.primary=Hg[5];const Vg=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];Vg.primary=Vg[5];const jg=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];jg.primary=jg[5];const Wg=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];Wg.primary=Wg[5];const qg=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];qg.primary=qg[5];const Ug=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];Ug.primary=Ug[5];const If=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];If.primary=If[5];const Gg=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];Gg.primary=Gg[5];const Kg=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];Kg.primary=Kg[5];const Xg=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];Xg.primary=Xg[5];const Yg=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];Yg.primary=Yg[5];const Wp={red:_g,volcano:zg,orange:Hg,gold:Vg,yellow:jg,lime:Wg,green:qg,cyan:Ug,blue:If,geekblue:Gg,purple:Kg,magenta:Xg,grey:Yg},U0=f.createContext({});function Qg(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 $x="data-rc-order",Ex="data-rc-priority",c8="rc-util-key",Zg=new Map;function T3({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:c8}function Mm(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function u8(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function G0(e){return Array.from((Zg.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function O3(e,t={}){if(!Ar())return null;const{csp:n,prepend:r,priority:o=0}=t,i=u8(r),s=i==="prependQueue",a=document.createElement("style");a.setAttribute($x,i),s&&o&&a.setAttribute(Ex,`${o}`),n?.nonce&&(a.nonce=n?.nonce),a.innerHTML=e;const l=Mm(t),{firstChild:c}=l;if(r){if(s){const u=(t.styles||G0(l)).filter(d=>{if(!["prepend","prependQueue"].includes(d.getAttribute($x)))return  false;const m=Number(d.getAttribute(Ex)||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 F3(e,t={}){let{styles:n}=t;return n||=G0(Mm(t)),n.find(r=>r.getAttribute(T3(t))===e)}function Fc(e,t={}){const n=F3(e,t);n&&Mm(t).removeChild(n);}function d8(e,t){const n=Zg.get(e);if(!n||!Qg(document,n)){const r=O3("",t),{parentNode:o}=r;Zg.set(e,o),e.removeChild(r);}}function Ai(e,t,n={}){const r=Mm(n),o=G0(r),i={...n,styles:o};d8(r,i);const s=F3(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=O3(e,i);return a.setAttribute(T3(i),t),a}function B3(e){return e?.getRootNode?.()}function f8(e){return B3(e)instanceof ShadowRoot}function Pf(e){return f8(e)?B3(e):null}function m8(e){return e.replace(/-(.)/g,(t,n)=>n.toUpperCase())}function p8(e,t){Cn(e,`[@ant-design/icons] ${t}`);}function Ix(e){return typeof e=="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(typeof e.icon=="object"||typeof e.icon=="function")}function Px(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[m8(n)]=r;}return t},{})}function Jg(e,t,n){return n?f.createElement(e.tag,{key:t,...Px(e.attrs),...n},(e.children||[]).map((r,o)=>Jg(r,`${t}-${e.tag}-${o}`))):f.createElement(e.tag,{key:t,...Px(e.attrs)},(e.children||[]).map((r,o)=>Jg(r,`${t}-${e.tag}-${o}`)))}function L3(e){return $u(e)[0]}function D3(e){return e?Array.isArray(e)?e:[e]:[]}const h8=`
.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);
  }
}
`,g8=e=>{const{csp:t,prefixCls:n,layer:r}=f.useContext(U0);let o=h8;n&&(o=o.replace(/anticon/g,n)),r&&(o=`@layer ${r} {
${o}
}`),f.useEffect(()=>{const i=e.current,s=Pf(i);Ai(o,"@ant-design-icons",{prepend:!r,csp:t,attachTo:s});},[]);},mc={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:false};function b8({primaryColor:e,secondaryColor:t}){mc.primaryColor=e,mc.secondaryColor=t||L3(e),mc.calculated=!!t;}function v8(){return {...mc}}const sl=e=>{const{icon:t,className:n,onClick:r,style:o,primaryColor:i,secondaryColor:s,...a}=e,l=f__namespace.useRef(null);let c=mc;if(i&&(c={primaryColor:i,secondaryColor:s||L3(i)}),g8(l),p8(Ix(t),`icon should be icon definiton, but got ${t}`),!Ix(t))return null;let u=t;return u&&typeof u.icon=="function"&&(u={...u,icon:u.icon(c.primaryColor,c.secondaryColor)}),Jg(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})};sl.displayName="IconReact";sl.getTwoToneColors=v8;sl.setTwoToneColors=b8;function k3(e){const[t,n]=D3(e);return sl.setTwoToneColors({primaryColor:t,secondaryColor:n})}function y8(){const e=sl.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}function eb(){return eb=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},eb.apply(this,arguments)}k3(If.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(U0),m=V(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]=D3(l);return f__namespace.createElement("span",eb({role:"img","aria-label":r.name},c,{ref:t,tabIndex:p,onClick:a,className:m}),f__namespace.createElement(sl,{icon:r,primaryColor:g,secondaryColor:b,style:h}))});on.getTwoToneColor=y8;on.setTwoToneColor=k3;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 C8=(e,t)=>f__namespace.createElement(on,tb({},e,{ref:t,icon:r8})),ai=f__namespace.forwardRef(C8),x8=f__namespace.createContext({}),_3={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 w8={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:true};function Bc(e){"@babel/helpers - typeof";return Bc=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},Bc(e)}function Nx(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 Mx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Nx(Object(n),true).forEach(function(r){S8(e,r,n[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r));});}return e}function S8(e,t,n){return t=$8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true}):e[t]=n,e}function $8(e){var t=E8(e,"string");return Bc(t)=="symbol"?t:String(t)}function E8(e,t){if(Bc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return (t==="string"?String:Number)(e)}var I8=Mx(Mx({},w8),{},{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 z3={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},Rx={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"],...I8},timePickerLocale:{...z3}},xr="${label} is not a valid ${type}",ho={locale:"en",Pagination:_3,DatePicker:Rx,TimePicker:z3,Calendar:Rx,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 Kd={...ho.Modal},Xd=[];const Ax=()=>Xd.reduce((e,t)=>({...e,...t}),ho.Modal);function P8(e){if(e){const t={...e};return Xd.push(t),Kd=Ax(),()=>{Xd=Xd.filter(n=>n!==t),Kd=Ax();}}Kd={...ho.Modal};}function H3(){return Kd}const K0=f.createContext(void 0),ir=(e,t)=>{const n=f__namespace.useContext(K0),r=f__namespace.useMemo(()=>{const i=t||ho[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?ho.locale:i},[n]);return [r,o]},N8="internalMark",M8=e=>{const{locale:t={},children:n,_ANT_MARK__:r}=e;f__namespace.useEffect(()=>P8(t?.Modal),[t]);const o=f__namespace.useMemo(()=>({...t,exist:true}),[t]);return f__namespace.createElement(K0.Provider,{value:o},n)};function Tx(...e){const t={};return e.forEach(n=>{n&&Object.keys(n).forEach(r=>{n[r]!==void 0&&(t[r]=n[r]);});}),t}const Dn=e=>e!=null,Di=e=>{if(!e)return;const{closable:t,closeIcon:n}=e;return {closable:t,closeIcon:n}},V3={},Ox=(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},R8=(e,t,n)=>e===false?false:e?Tx(n,t,e):t===false?false:t?Tx(n,t):n.closable?n:false,A8=(e,t,n)=>{const{closeIconRender:r}=t,{closeIcon:o,...i}=e;let s=o;const a=rr(i,true);return Dn(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]},j3=(e,t,n=V3,r="Close")=>{const o=Ox(e?.closable,e?.closeIcon),i=Ox(t?.closable,t?.closeIcon),s={closeIcon:f.createElement(ai,null),...n},a=R8(o,i,s),l=typeof a!="boolean"?!!a?.disabled:false;if(a===false)return [false,null,l,{}];const[c,u]=A8(a,s,r);return [true,c,l,u]},X0=(e,t,n=V3)=>{const[r]=ir("global",ho.global);return f.useMemo(()=>j3(e,t,{closeIcon:f.createElement(ai,null),...n},r.close),[e,t,n,r.close])},W3=()=>f.useReducer(e=>e+1,0),Fx=e=>e&&typeof e=="object"?e:typeof e=="boolean"?{enabled:e,blur:e}:{},T8=(e,t,n)=>f.useMemo(()=>{const r=Fx(e),i={...Fx(t),...r},s=i.blur!==false?`${n}-mask-blur`:void 0;return [i.enabled!==false,{mask:s}]},[e,t,n]);function nb(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 O8(e){if(Array.isArray(e))return nb(e)}function F8(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Y0(e,t){if(e){if(typeof e=="string")return nb(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)?nb(e,t):void 0}}function B8(){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 O8(e)||F8(e)||Y0(e)||B8()}const Rm=(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]=Rm(s,r[i],a);else {const{_default:l}=s;l&&(r[i]=r[i]||{},r[i][l]=V(r[i][l],a));}else r[i]=V(r[i],a);}),r),{})},L8=(e,...t)=>f__namespace.useMemo(()=>Rm.apply(void 0,[e].concat(t)),[e].concat(t)),Q0=(...e)=>e.filter(Boolean).reduce((t,n={})=>(Object.keys(n).forEach(r=>{t[r]={...t[r],...n[r]};}),t),{}),D8=(...e)=>f__namespace.useMemo(()=>Q0.apply(void 0,e),[].concat(e)),rb=(e,t)=>{const n={...e};return Object.keys(t).forEach(r=>{if(r!=="_default"){const o=t[r],i=n[r]||{};n[r]=o?rb(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=L8.apply(void 0,[r].concat(Et(o))),a=D8.apply(void 0,Et(i));return f__namespace.useMemo(()=>r?[rb(s,r),rb(a,r)]:[s,a],[s,a,r])},Bx=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]},Lx=e=>e==="horizontal"||e==="vertical",qs=(e,t,n)=>f.useMemo(()=>{const r=Lx(e);let o;return r?o=e:typeof t=="boolean"?o=t?"vertical":"horizontal":o=Lx(n)?n:"horizontal",[o,o==="vertical"]},[n,e,t]),k8=()=>{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 ki(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 _8="%";function ob(e){return e.join(_8)}let Dx=0;class z8{instanceId;constructor(t){this.instanceId=t;}cache=new Map;updateTimes=new Map;extracted=new Set;get(t){return this.opGet(ob(t))}opGet(t){return this.cache.get(t)||null}update(t,n){return this.opUpdate(ob(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,Dx),Dx+=1);}}const H8={},Z0="data-token-hash",ri="data-css-hash",Ii="__cssinjs_instance__";function q3(){const e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const t=document.body.querySelectorAll(`style[${ri}]`)||[],{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[${ri}]`)).forEach(o=>{const i=o.getAttribute(ri);r[i]?o[Ii]===e&&o.parentNode?.removeChild(o):r[i]=true;});}return new z8(e)}const As=f__namespace.createContext({hashPriority:"low",cache:q3(),defaultCache:true,autoPrefix:false}),V8=e=>{const{children:t,...n}=e,r=f__namespace.useContext(As),o=il(()=>{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||q3(),i.defaultCache=!s&&r.defaultCache,a.includes(H8)&&(i.autoPrefix=true),i},[r,n],(i,s)=>!ki(i[0],s[0],true)||!ki(i[1],s[1],true));return f__namespace.createElement(As.Provider,{value:o},t)};function j8(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 Nf{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>Nf.MAX_CACHE_SIZE+Nf.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=>!j8(n,t)),this.deleteByPath(this.cache,t)}}let kx=0;class U3{derivatives;id;constructor(t){this.derivatives=Array.isArray(t)?t:[t],this.id=kx,t.length===0&&(t.length>0,void 0),kx+=1;}getDerivativeToken(t){return this.derivatives.reduce((n,r)=>r(t,n),void 0)}}const qp=new Nf;function Mf(e){const t=Array.isArray(e)?e:[e];return qp.has(t)||qp.set(t,new U3(t)),qp.get(t)}const W8=new WeakMap,Up={};function q8(e,t){let n=W8;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(Up)||n.set(Up,e()),n.get(Up)}const _x=new WeakMap;function pc(e){let t=_x.get(e)||"";return t||(Object.keys(e).forEach(n=>{const r=e[n];t+=n,r instanceof U3?t+=r.id:r&&typeof r=="object"?t+=pc(r):t+=r;}),t=Ma(t),_x.set(e,t)),t}function U8(e,t){return Ma(`${t}_${pc(e)}`)}const ib=Ar();function X(e){return typeof e=="number"?`${e}px`:e}function G8(e){const{hashCls:t,hashPriority:n="low"}=e||{};if(!t)return "";const r=`.${t}`;return n==="low"?`:where(${r})`:r}const Yd=(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(),K8=(e,t,n)=>{const{hashCls:r,hashPriority:o="low"}=n||{};return Object.keys(e).length?`${G8({hashCls:r,hashPriority:o})}.${t}${n?.scope?`.${n.scope}`:""}{${Object.entries(e).map(([i,s])=>`${i}:${s};`).join("")}}`:""},G3=(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=Yd(d,i);c[p]=typeof m=="number"&&!s?.[d]?`${m}px`:String(m),u[d]=`var(${p})`;}}),[u,K8(c,t,{scope:n?.scope,hashCls:r,hashPriority:o})]},hd=new Map;function J0(e,t,n,r,o){const{cache:i}=f__namespace.useContext(As),s=[e,...t],a=ob(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]),hd.has(a)||(o?.(u),hd.set(a,true),Promise.resolve().then(()=>{hd.delete(a);})),()=>{i.opUpdate(a,d=>{const[m=0,p]=d||[];return m-1===0?(r?.(p,false),hd.delete(a),null):[m-1,p]});}),[a]),u}const X8={},Y8="css",ps=new Map;function Q8(e){ps.set(e,(ps.get(e)||0)+1);}function Z8(e,t){typeof document<"u"&&document.querySelectorAll(`style[${Z0}="${e}"]`).forEach(r=>{r[Ii]===t&&r.parentNode?.removeChild(r);});}const J8=-1;function e9(e,t){ps.set(e,(ps.get(e)||0)-1);const n=new Set;ps.forEach((r,o)=>{r<=0&&n.add(o);}),ps.size-n.size>J8&&n.forEach(r=>{Z8(r,t),ps.delete(r);});}const K3=(e,t,n,r)=>{let i={...n.getDerivativeToken(e),...t};return r&&(i=r(i)),i},t9="token";function n9(e,t,n){const{cache:{instanceId:r},container:o,hashPriority:i}=f.useContext(As),{salt:s="",override:a=X8,formatToken:l,getComputedToken:c,cssVar:u}=n,d=q8(()=>Object.assign({},...t),t),m=pc(d),p=pc(a),h=pc(u);return J0(t9,[s,e.id,m,p,h],()=>{const b=c?c(d,a,e):K3(d,a,e,l),y={...b},C=`${s}_${u.prefix}`,x=Ma(C),w=`${Y8}-${Ma(C)}`;y._tokenKey=U8(y,C);const[S,I]=G3(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,Q8(u.key),[S,w,y,I,u.key]},([,,,,b])=>{e9(b,r);},([,,,b,y])=>{if(!b)return;const C=Ai(b,Ma(`css-var-${y}`),{mark:ri,prepend:"queue",attachTo:o,priority:-999});C[Ii]=r,C.setAttribute(Z0,y);})}var r9={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},tn="-ms-",hc="-moz-",Ht="-webkit-",X3="comm",ey="rule",ty="decl",o9="@import",i9="@namespace",Y3="@keyframes",s9="@layer",Q3=Math.abs,ny=String.fromCharCode,sb=Object.assign;function a9(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 Z3(e){return e.trim()}function Go(e,t){return (e=t.exec(e))?e[0]:e}function Nt(e,t,n){return e.replace(t,n)}function Qd(e,t,n){return e.indexOf(t,n)}function wn(e,t){return e.charCodeAt(t)|0}function Ts(e,t,n){return e.slice(t,n)}function so(e){return e.length}function J3(e){return e.length}function rc(e,t){return t.push(e),e}function l9(e,t){return e.map(t).join("")}function zx(e,t){return e.filter(function(n){return !Go(n,t)})}var Am=1,ja=1,eI=0,Qr=0,gn=0,al="";function Tm(e,t,n,r,o,i,s,a){return {value:e,root:t,parent:n,type:r,props:o,children:i,line:Am,column:ja,length:s,return:"",siblings:a}}function yi(e,t){return sb(Tm("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function ia(e){for(;e.root;)e=yi(e.root,{children:[e]});rc(e,e.siblings);}function c9(){return gn}function u9(){return gn=Qr>0?wn(al,--Qr):0,ja--,gn===10&&(ja=1,Am--),gn}function fo(){return gn=Qr<eI?wn(al,Qr++):0,ja++,gn===10&&(ja=1,Am++),gn}function Pi(){return wn(al,Qr)}function Zd(){return Qr}function Om(e,t){return Ts(al,e,t)}function Lc(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 d9(e){return Am=ja=1,eI=so(al=e),Qr=0,[]}function f9(e){return al="",e}function Gp(e){return Z3(Om(Qr-1,ab(e===91?e+2:e===40?e+1:e)))}function m9(e){for(;(gn=Pi())&&gn<33;)fo();return Lc(e)>2||Lc(gn)>3?"":" "}function p9(e,t){for(;--t&&fo()&&!(gn<48||gn>102||gn>57&&gn<65||gn>70&&gn<97););return Om(e,Zd()+(t<6&&Pi()==32&&fo()==32))}function ab(e){for(;fo();)switch(gn){case e:return Qr;case 34:case 39:e!==34&&e!==39&&ab(gn);break;case 40:e===41&&ab(e);break;case 92:fo();break}return Qr}function h9(e,t){for(;fo()&&e+gn!==57;)if(e+gn===84&&Pi()===47)break;return "/*"+Om(t,Qr-1)+"*"+ny(e===47?e:fo())}function g9(e){for(;!Lc(Pi());)fo();return Om(e,Qr)}function Hx(e){return f9(Jd("",null,null,null,[""],e=d9(e),0,[0],e))}function Jd(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){Qd($+=Nt(Gp(C),"&","&\f"),"&\f",Q3(c?a[c-1]:0))!=-1&&(y=-1);break}case 34:case 39:case 91:$+=Gp(C);break;case 9:case 10:case 13:case 32:$+=m9(h);break;case 92:$+=p9(Zd()-1,7);continue;case 47:switch(Pi()){case 42:case 47:rc(b9(h9(fo(),Zd()),t,n,l),l),(Lc(h||1)==5||Lc(Pi()||1)==5)&&so($)&&Ts($,-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)&&rc(p>32?jx($+";",r,n,d-1,l):jx(Nt($," ","")+";",r,n,d-2,l),l);break;case 59:$+=";";default:if(rc(I=Vx($,t,n,c,u,o,a,x,w=[],S=[],d,i),i),C===123)if(u===0)Jd($,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?Jd(e,I,I,r&&rc(Vx(e,I,I,0,0,o,a,x,o,w=[],d,S),S),o,S,d,a,r?w:S):Jd($,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&&u9()==125)continue}switch($+=ny(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&&($+=Gp(fo())),m=Pi(),u=d=so(x=$+=g9(Zd())),C++;break;case 45:h===45&&so($)==2&&(g=0);}}return i}function Vx(e,t,n,r,o,i,s,a,l,c,u,d){for(var m=o-1,p=o===0?i:[""],h=J3(p),g=0,b=0,y=0;g<r;++g)for(var C=0,x=Ts(e,m+1,m=Q3(b=s[g])),w=e;C<h;++C)(w=Z3(b>0?p[C]+" "+x:Nt(x,/&\f/g,p[C])))&&(l[y++]=w);return Tm(e,t,n,o===0?ey:a,l,c,u,d)}function b9(e,t,n,r){return Tm(e,t,n,X3,ny(c9()),Ts(e,2,-2),0,r)}function jx(e,t,n,r,o){return Tm(e,t,n,ty,Ts(e,0,r),Ts(e,r+1,-1),r,o)}function tI(e,t,n){switch(a9(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 hc+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ht+e+hc+e+tn+e+e;case 5936:switch(wn(e,t+11)){case 114:return Ht+e+tn+Nt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ht+e+tn+Nt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ht+e+tn+Nt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Ht+e+tn+e+e;case 6165:return Ht+e+tn+"flex-"+e+e;case 5187:return Ht+e+Nt(e,/(\w+).+(:[^]+)/,Ht+"box-$1$2"+tn+"flex-$1$2")+e;case 5443:return Ht+e+tn+"flex-item-"+Nt(e,/flex-|-self/g,"")+(Go(e,/flex-|baseline/)?"":tn+"grid-row-"+Nt(e,/flex-|-self/g,""))+e;case 4675:return Ht+e+tn+"flex-line-pack"+Nt(e,/align-content|flex-|-self/g,"")+e;case 5548:return Ht+e+tn+Nt(e,"shrink","negative")+e;case 5292:return Ht+e+tn+Nt(e,"basis","preferred-size")+e;case 6060:return Ht+"box-"+Nt(e,"-grow","")+Ht+e+tn+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"+tn+"flex-pack:$3"),/space-between/,"justify")+Ht+e+e;case 4200:if(!Go(e,/flex-|baseline/))return tn+"grid-column-align"+Ts(e,t)+e;break;case 2592:case 3360:return tn+Nt(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(r,o){return t=o,Go(r.props,/grid-\w+-end/)})?~Qd(e+(n=n[t].value),"span",0)?e:tn+Nt(e,"-start","")+e+tn+"grid-row-span:"+(~Qd(n,"span",0)?Go(n,/\d+/):+Go(n,/\d+/)-+Go(e,/\d+/))+";":tn+Nt(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(r){return Go(r.props,/grid-\w+-start/)})?e:tn+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"+hc+(wn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return ~Qd(e,"stretch",0)?tI(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 tn+o+":"+i+c+(s?tn+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"+tn+"$2box$3")+e;case 100:return Nt(e,":",":"+tn)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Nt(e,"scroll-","scroll-snap-")+e}return e}function Dc(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function Wx(e,t,n,r){switch(e.type){case s9:if(e.children.length)break;case o9:case i9:case ty:return e.return=e.return||e.value;case X3:return "";case Y3:return e.return=e.value+"{"+Dc(e.children,r)+"}";case ey:if(!so(e.value=e.props.join(",")))return ""}return so(n=Dc(e.children,r))?e.return=e.value+"{"+n+"}":""}function v9(e){var t=J3(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 y9(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case ty:e.return=tI(e.value,e.length,n);return;case Y3:return Dc([yi(e,{value:Nt(e.value,"@","@"+Ht)})],r);case ey:if(e.length)return l9(n=e.props,function(o){switch(Go(o,r=/(::plac\w+|:read-\w+)/)){case ":read-only":case ":read-write":ia(yi(e,{props:[Nt(o,/:(read-\w+)/,":"+hc+"$1")]})),ia(yi(e,{props:[o]})),sb(e,{props:zx(n,r)});break;case "::placeholder":ia(yi(e,{props:[Nt(o,/:(plac\w+)/,":"+Ht+"input-$1")]})),ia(yi(e,{props:[Nt(o,/:(plac\w+)/,":"+hc+"$1")]})),ia(yi(e,{props:[Nt(o,/:(plac\w+)/,tn+"input-$1")]})),ia(yi(e,{props:[o]})),sb(e,{props:zx(n,r)});break}return ""})}}const qx="data-ant-cssinjs-cache-path",nI="_FILE_STYLE__";let ws,rI=true;function C9(){if(!ws&&(ws={},Ar())){const e=document.createElement("div");e.className=qx,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(":");ws[o]=i;});const n=document.querySelector(`style[${qx}]`);n&&(rI=false,n.parentNode?.removeChild(n)),document.body.removeChild(e);}}function x9(e){return C9(),!!ws[e]}function w9(e){const t=ws[e];let n=null;if(t&&Ar())if(rI)n=nI;else {const r=document.querySelector(`style[${ri}="${ws[e]}"]`);r?n=r.innerHTML:delete ws[e];}return [n,t]}const S9="_skip_check_",oI="_multi_value_";function Kp(e,t){return (t?Dc(Hx(e),v9([y9,Wx])):Dc(Hx(e),Wx)).replace(/\{%%%\:[^;];}/g,";")}function $9(e){return typeof e=="object"&&e&&(S9 in e||oI in e)}function Ux(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 lb=(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]=lb(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)&&!$9(w)){let S=false,I=x.trim(),$=false;(n||r)&&i?I.startsWith("@")?S=true:I==="&"?I=Ux("",i,l):I=Ux(x,i,l):n&&!i&&(I==="&"||I==="")&&(I="",$=true);const[E,P]=lb(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;!r9[$]&&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?.[oI]&&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 iI(e,t){return Ma(`${e.join("%")}${t}`)}const E9="style";function cb(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(As),b=[r||""];h&&b.push("layer"),b.push(...n);let y=ib;J0(E9,b,()=>{const C=b.join("|");if(x9(C)){const[E,P]=w9(C);if(E)return [E,P,{},s,a]}const x=t(),[w,S]=lb(x,{hashId:r,hashPriority:c,layer:h?o:void 0,path:n.join("-"),transformers:d,linters:m}),I=Kp(w,g||false),$=iI(b,I);return [I,$,S,s,a]},(C,x)=>{const[,w]=C;x&&ib&&Fc(w,{mark:ri,attachTo:u});},C=>{const[x,w,S,,I]=C;if(y&&x!==nI){const $={mark:ri,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=>{Ai(Kp(S[A],g||false),`_layer-${A}`,{...$,prepend:true});});const N=Ai(x,w,$);N[Ii]=p.instanceId,M.forEach(A=>{Ai(Kp(S[A],g||false),`_effect-${A}`,$);});}});}const I9="cssVar",P9=(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(As),{_tokenKey:m}=s,p=[...e.path,n,l,m];return J0(I9,p,()=>{const g=t(),[b,y]=G3(g,n,{prefix:r,unitless:o,ignore:i,scope:l,hashPriority:d,hashCls:a}),C=iI(p,y);return [b,y,C,n]},([,,g])=>{ib&&Fc(g,{mark:ri,attachTo:u});},([,g,b])=>{if(!g)return;const y=Ai(g,b,{mark:ri,prepend:"queue",attachTo:u,priority:-999});y[Ii]=c,y.setAttribute(Z0,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 N9="6.1.1",ry={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={...ry,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 sI(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 M9=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 R9(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,...M9(r)}}const aI=e=>{const{controlHeight:t}=e;return {controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}};function ef(e){return (e+8)/e}function A9(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:ef(n)}))}const lI=e=>{const t=A9(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 T9(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 Dr=(e,t)=>new Ft(e).setA(t).toRgbString(),aa=(e,t)=>new Ft(e).darken(t).toHexString(),O9=e=>{const t=$u(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]}},F9=(e,t)=>{const n=e||"#fff",r=t||"#000";return {colorBgBase:n,colorTextBase:r,colorText:Dr(r,.88),colorTextSecondary:Dr(r,.65),colorTextTertiary:Dr(r,.45),colorTextQuaternary:Dr(r,.25),colorFill:Dr(r,.15),colorFillSecondary:Dr(r,.06),colorFillTertiary:Dr(r,.04),colorFillQuaternary:Dr(r,.02),colorBgSolid:Dr(r,1),colorBgSolidHover:Dr(r,.75),colorBgSolidActive:Dr(r,.95),colorBgLayout:aa(n,4),colorBgContainer:aa(n,0),colorBgElevated:aa(n,0),colorBgSpotlight:Dr(r,.85),colorBgBlur:"transparent",colorBorder:aa(n,15),colorBorderDisabled:aa(n,15),colorBorderSecondary:aa(n,6)}};function Fm(e){jp.pink=jp.magenta,Wp.pink=Wp.magenta;const t=Object.keys(ry).map(n=>{const r=e[n]===jp[n]?Wp[n]:$u(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,...sI(e,{generateColorPalettes:O9,generateNeutralColorPalettes:F9}),...lI(e.fontSize),...T9(e),...aI(e),...R9(e)}}const oy=Mf(Fm),kc={token:Wa,override:{override:Wa},hashed:true},iy=f.createContext(kc);function Xp(e){return e>=0&&e<=255}function oc(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(Xp(u)&&Xp(d)&&Xp(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 cI(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:oc(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:oc(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:oc(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:oc(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 uI={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},B9={motionBase:true,motionUnit:true},L9={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},dI=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:o,...i}=t;let s={...r,override:o};return s=cI(s),i&&Object.entries(i).forEach(([a,l])=>{const{theme:c,...u}=l;let d=u;c&&(d=dI({...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(iy),s={prefix:o?.prefix??"ant",key:o?.key??"css-var-root"},a=`${N9}-${t||""}`,l=n||oy,[c,u,d]=n9(l,[Wa,e],{salt:a,override:r,getComputedToken:dI,cssVar:{...s,unitless:uI,ignore:B9,preserve:L9}});return [l,d,t?u:"",c,s,!!i]}const Bm=f.createContext(void 0),Ci=100,D9=10,sy=Ci*D9,fI={Modal:Ci,Drawer:Ci,Popover:Ci,Popconfirm:Ci,Tooltip:Ci,Tour:Ci,FloatButton:Ci},k9={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1},_9=e=>e in fI,Us=(e,t)=>{const[,n]=Tn(),r=f.useContext(Bm),o=_9(e);let i;if(t!==void 0)i=[t,t];else {let s=r??0;o?s+=(r?0:n.zIndexPopupBase)+fI[e]:s+=k9[e],i=[r===void 0?t:s,s];}return i},z9=f.createContext(void 0),mI=f__namespace.createContext(null);let H9=false;function V9(e){return H9}const Gx=[];function j9(e,t){const[n]=f__namespace.useState(()=>Ar()?document.createElement("div"):null),r=f__namespace.useRef(false),o=f__namespace.useContext(mI),[i,s]=f__namespace.useState(Gx),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(Gx));},[i]),[n,a]}function W9(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};`:"";Ai(`
#${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),Fc(t),{width:s,height:a}}function q9(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:W9(e)}function U9(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}const G9=`rc-util-locker-${Date.now()}`;let Kx=0;function K9(e){const t=!!e,[n]=f__namespace.useState(()=>(Kx+=1,`${G9}_${Kx}`));Kt(()=>{if(t){const r=q9(document.body).width,o=U9();Ai(`
html body {
  overflow-y: hidden;
  ${o?`width: calc(100% - ${r}px);`:""}
}`,n);}else Fc(n);return ()=>{Fc(n);}},[t,n]);}const Xx=e=>e===false?false:!Ar()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e,Lm=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(()=>Xx(o));f__namespace.useEffect(()=>{const w=Xx(o);m(w??null);});const[p,h]=j9(u&&!d),g=d??p;K9(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||V9();let x=a;return t&&(x=f__namespace.cloneElement(a,{ref:y})),f__namespace.createElement(mI.Provider,{value:h},C?x:vT.createPortal(x,g))});function qa(e){return e instanceof HTMLElement||e instanceof SVGElement}function _c(e){return e&&typeof e=="object"&&qa(e.nativeElement)?e.nativeElement:qa(e)?e:null}const ub=f__namespace.createContext(null);function X9({children:e,onBatchResize:t}){const n=f__namespace.useRef(0),r=f__namespace.useRef([]),o=f__namespace.useContext(ub),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(ub.Provider,{value:i},e)}const Ni=new Map;function Y9(e){e.forEach(t=>{const{target:n}=t;Ni.get(n)?.forEach(r=>r(n));});}let Yp;function pI(){return Yp||(Yp=new ResizeObserver(Y9)),Yp}function Q9(e,t){Ni.has(e)||(Ni.set(e,new Set),pI().observe(e)),Ni.get(e).add(t);}function Z9(e,t){Ni.has(e)&&(Ni.get(e).delete(t),Ni.get(e).size||(pI().unobserve(e),Ni.delete(e)));}function J9(e,t){const{children:n,disabled:r}=e,o=f__namespace.useRef(null),i=f__namespace.useContext(ub),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=()=>_c(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&&Q9(g,h),()=>Z9(g,h)},[o.current,r]),c?f__namespace.cloneElement(a,{ref:d}):a}const eF=f__namespace.forwardRef(J9);function db(){return db=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},db.apply(this,arguments)}const tF="rc-observer-key";function nF(e,t){const{children:n}=e;return (typeof n=="function"?[n]:hr(n)).map((o,i)=>{const s=o?.key||`${tF}-${i}`;return f__namespace.createElement(eF,db({},e,{key:s,ref:i===0?t:void 0}),o)})}const Xr=f__namespace.forwardRef(nF);Xr.Collection=X9;const hI=f__namespace.createContext({});function rF({children:e,...t}){return f__namespace.createElement(hI.Provider,{value:t},e)}function oF(e){const[,t]=f__namespace.useReducer(i=>i+1,0),n=f__namespace.useRef(e),r=at(()=>n.current),o=at(i=>{n.current=typeof i=="function"?i(n.current):i,t();});return [r,o]}const Ko="none",gd="appear",bd="enter",vd="leave",Yx="none",ao="prepare",Ea="start",Ia="active",ay="end",gI="prepared";function Qx(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 iF(e,t){const n={animationend:Qx("Animation","AnimationEnd"),transitionend:Qx("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}const sF=iF(Ar(),typeof window<"u"?window:{});let bI={};Ar()&&({style:bI}=document.createElement("div"));const yd={};function vI(e){if(yd[e])return yd[e];const t=sF[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 bI)return yd[e]=t[i],yd[e]}}return ""}const yI=vI("animationend"),CI=vI("transitionend"),aF=!!(yI&&CI),Zx=yI||"animationend",Jx=CI||"transitionend";function ew(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 lF=e=>{const t=f.useRef();function n(o){o&&(o.removeEventListener(Jx,e),o.removeEventListener(Zx,e));}function r(o){t.current&&t.current!==o&&n(t.current),o&&o!==t.current&&(o.addEventListener(Jx,e),o.addEventListener(Zx,e),t.current=o);}return f__namespace.useEffect(()=>()=>{n(t.current),t.current=null;},[]),[r,n]},xI=Ar()?f.useLayoutEffect:f.useEffect;let wI=e=>+setTimeout(e,16),SI=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(wI=e=>window.requestAnimationFrame(e),SI=e=>window.cancelAnimationFrame(e));let tw=0;const ly=new Map;function $I(e){ly.delete(e);}const gt=(e,t=1)=>{tw+=1;const n=tw;function r(o){if(o===0)$I(n),e();else {const i=wI(()=>{r(o-1);});ly.set(n,i);}}return r(t),n};gt.cancel=e=>{const t=ly.get(e);return $I(e),SI(t)};const cF=()=>{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]},uF=[ao,Ea,Ia,ay],dF=[ao,gI],EI=false,fF=true;function II(e){return e===Ia||e===ay}const mF=(e,t,n)=>{const[r,o]=Ef(Yx),[i,s]=cF();function a(){o(ao,true);}const l=t?dF:uF;return xI(()=>{if(r!==Yx&&r!==ay){const c=l.indexOf(r),u=l[c+1],d=n(r);d===EI?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 pF(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]=Ef(),[$,E]=oF(Ko),[P,M]=Ef(null),N=$(),A=f.useRef(false),D=f.useRef(null);function R(){return n()}const B=f.useRef(false);function H(){E(Ko),M(null,true);}const k=at(K=>{const J=$();if(J===Ko)return;const Q=R();if(K&&!K.deadline&&K.target!==Q)return;const G=B.current;let ee;J===gd&&G?ee=y?.(Q,K):J===bd&&G?ee=C?.(Q,K):J===vd&&G&&(ee=x?.(Q,K)),G&&ee!==false&&H();}),[z]=lF(k),_=K=>{switch(K){case gd:return {[ao]:l,[Ea]:d,[Ia]:h};case bd:return {[ao]:c,[Ea]:m,[Ia]:g};case vd:return {[ao]:u,[Ea]:p,[Ia]:b};default:return {}}},W=f__namespace.useMemo(()=>_(N),[N]),[O,L]=mF(N,!e,K=>{if(K===ao){const J=W[ao];return J?J(R()):EI}return L in W&&M(W[L]?.(R(),null)||null),L===Ia&&N!==Ko&&(z(R()),s>0&&(clearTimeout(D.current),D.current=setTimeout(()=>{k({deadline:true});},s))),L===gI&&H(),fF}),j=II(L);B.current=j;const Y=f.useRef(null);xI(()=>{if(A.current&&Y.current===t)return;I(t);const K=A.current;A.current=true;let J;!K&&t&&o&&(J=gd),K&&t&&r&&(J=bd),(K&&!t&&i||!K&&a&&!t&&i)&&(J=vd);const Q=_(J);J&&(e||Q[ao])?(E(J),O()):E(Ko),Y.current=t;},[t]),f.useEffect(()=>{(N===gd&&!o||N===bd&&!r||N===vd&&!i)&&E(Ko);},[o,r,i]),f.useEffect(()=>()=>{A.current=false,clearTimeout(D.current);},[]);const q=f__namespace.useRef(false);f.useEffect(()=>{S&&(q.current=true),S!==void 0&&N===Ko&&((q.current||S)&&w?.(S),q.current=true);},[S,N]);let U=P;return W[ao]&&L===Ea&&(U={transition:"none",...U}),[$,L,U,S??t]}function hF(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(hI),h=n(o,p),g=f.useRef();function b(){return _c(g.current)}const[y,C,x,w]=pF(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()!==Ko},enableMotion:{enumerable:true,get:()=>()=>h}}),M},[]);f__namespace.useImperativeHandle(i,()=>$,[]);let E;const P={...m,visible:s};if(!c)E=null;else if(S===Ko)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":II(C)?M="active":C===Ea&&(M="start");const N=ew(u,`${S}-${M}`);E=c({...P,className:V(ew(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 Jn=hF(aF),fb="add",mb="keep",pb="remove",Qp="removed";function gF(e){let t;return e&&typeof e=="object"&&"key"in e?t=e:t={key:e},{...t,key:String(t.key)}}function hb(e=[]){return e.map(gF)}function bF(e=[],t=[]){let n=[],r=0;const o=t.length,i=hb(e),s=hb(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:fb}))),r=d),n.push({...m,status:mb}),r+=1,u=true;break}}u||n.push({...c,status:pb});}),r<o&&(n=n.concat(s.slice(r).map(c=>({...c,status:fb}))));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!==pb),n.forEach(u=>{u.key===c&&(u.status=mb);});}),n}function gb(){return gb=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},gb.apply(this,arguments)}const vF=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function yF(e,t=Jn){class n extends f__namespace.Component{static defaultProps={component:"div"};state={keyEntities:[]};static getDerivedStateFromProps({keys:o},{keyEntities:i}){const s=hb(o);return {keyEntities:bF(i,s).filter(l=>{const c=i.find(({key:u})=>l.key===u);return !(c&&c.status===Qp&&l.status===pb)})}}removeKey=o=>{this.setState(i=>({keyEntities:i.keyEntities.map(a=>a.key!==o?a:{...a,status:Qp})}),()=>{const{keyEntities:i}=this.state;i.filter(({status:a})=>a!==Qp).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 vF.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===fb||m===mb;return f__namespace.createElement(t,gb({},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 CF=yF();function xF(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:V(`${t}-arrow`,i),style:{...d,...a}},s)}function bb(){return bb=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},bb.apply(this,arguments)}function wF(e){const{prefixCls:t,open:n,zIndex:r,mask:o,motion:i,mobile:s}=e;return o?f__namespace.createElement(Jn,bb({},i,{motionAppear:true,visible:n,removeOnLeave:true}),({className:a})=>f__namespace.createElement("div",{style:{zIndex:r},className:V(`${t}-mask`,s&&`${t}-mobile-mask`,a)})):null}const SF=f__namespace.memo(({children:e})=>e,(e,t)=>t.cache);function PI(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 vb(){return vb=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},vb.apply(this,arguments)}const NI=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:D,offsetX:R,offsetY:B,offsetR:H,offsetB:k,onAlign:z,onPrepare:_,onResize:W,stretch:O,targetWidth:L,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,oe]=f__namespace.useState(!w||!G);Kt(()=>{!ee&&G&&s&&oe(true);},[ee,G,s]);const re=at((te,ce)=>{W?.(te,ce),z();}),he=PI(U,D,l,g,H,k,R,B);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")&&L?Z.width=L:O.includes("minWidth")&&L&&(Z.minWidth=L)),l||(Z.pointerEvents="none"),f__namespace.createElement(I,{open:x||q,getContainer:w&&(()=>w(s)),autoDestroy:S},f__namespace.createElement(wF,{prefixCls:o,open:l,zIndex:E,mask:K,motion:J,mobile:U}),f__namespace.createElement(Xr,{onResize:re,disabled:!l},te=>f__namespace.createElement(Jn,vb({motionAppear:true,motionEnter:true,motionLeave:true,removeOnLeave:false,forceRender:x,leavedClassName:`${o}-hidden`},Q,{onAppearPrepare:_,onEnterPrepare:_,visible:l,onVisibleChanged:ce=>{b?.onVisibleChanged?.(ce),a(ce);}}),({className:ce,style:ue},Ee)=>{const Re=V(o,ce,r,{[`${o}-mobile`]:U});return f__namespace.createElement("div",{ref:In(te,t,Ee),className:Re,style:{"--arrow-x":`${h.x||0}px`,"--arrow-y":`${h.y||0}px`,...he,...Z,...ue,boxSizing:"border-box",zIndex:E,...i},onMouseEnter:P,onMouseLeave:M,onPointerEnter:N,onClick:d,onPointerDownCapture:A},p&&f__namespace.createElement(xF,{prefixCls:o,arrow:p,arrowPos:h,align:g}),f__namespace.createElement(SF,{cache:!l&&!u},Y))})),$)}),Rf=f__namespace.createContext(null),MI=f__namespace.createContext(null);function nw(e){return e?Array.isArray(e)?e:[e]:[]}function $F(e,t,n){return f__namespace.useMemo(()=>{const r=nw(t??e),o=nw(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 cy=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 EF(e=[],t=[],n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function RI(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(EF(e[a]?.points,o,r))return `${t}-placement-${a}`}return ""}function Eu(e){return e.ownerDocument.defaultView}function yb(e){const t=[];let n=e?.parentElement;const r=["hidden","scroll","clip","auto"];for(;n;){const{overflowX:o,overflowY:i,overflow:s}=Eu(n).getComputedStyle(n);[o,i,s].some(a=>r.includes(a))&&t.push(n),n=n.parentElement;}return t}function zc(e,t=1){return Number.isNaN(e)?t:e}function Bl(e){return zc(parseFloat(e),0)}function rw(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}=Eu(r).getComputedStyle(r),u=r.getBoundingClientRect(),{offsetHeight:d,clientHeight:m,offsetWidth:p,clientWidth:h}=r,g=Bl(s),b=Bl(a),y=Bl(l),C=Bl(c),x=zc(Math.round(u.width/p*1e3)/1e3),w=zc(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 k=Bl(i);N=k*x,A=k*w;}const D=u.x+P-N,R=u.y+$-A,B=D+u.width+2*N-P-M-S,H=R+u.height+2*A-$-E-I;n.left=Math.max(n.left,D),n.top=Math.max(n.top,R),n.right=Math.min(n.right,B),n.bottom=Math.min(n.bottom,H);}),n}function ow(e,t=0){const n=`${t}`,r=n.match(/^(.*)\%$/);return r?e*(parseFloat(r[1])/100):parseFloat(n)}function iw(e,t){const[n,r]=t||[];return [ow(e.width,n),ow(e.height,r)]}function sw(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 AI(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?[]:yb(t),[t]),m=f__namespace.useRef({});e||(m.current={});const h=at(()=>{if(t&&n&&e&&!a){let Oe=function(St,er,sr=he){const ra=D.x+St,Tl=D.y+er,oa=ra+j,ad=Tl+L,ld=Math.max(ra,sr.left),cd=Math.max(Tl,sr.top),JC=Math.min(oa,sr.right),Lp=Math.min(ad,sr.bottom);return Math.max(0,(JC-ld)*(Lp-cd))},ve=function(){se=D.y+De,ge=se+L,fe=D.x+Pe,ie=fe+j;};const y=t,C=y.ownerDocument,x=Eu(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 St=n.getBoundingClientRect();St.x=St.x??St.left,St.y=St.y??St.top,A={x:St.x,y:St.y,width:St.width,height:St.height};}const D=y.getBoundingClientRect(),{height:R,width:B}=x.getComputedStyle(y);D.x=D.x??D.left,D.y=D.y??D.top;const{clientWidth:H,clientHeight:k,scrollWidth:z,scrollHeight:_,scrollTop:W,scrollLeft:O}=C.documentElement,L=D.height,j=D.width,Y=A.height,q=A.width,U={left:0,top:0,right:H,bottom:k},K={left:-O,top:-W,right:z-O,bottom:_-W};let{htmlRegion:J}=M;const Q="visible",G="visibleFirst";J!=="scroll"&&J!==G&&(J=Q);const ee=J===G,oe=rw(K,d),re=rw(U,d),he=J===Q?re:oe,Z=ee?re:he;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=zc(Math.round(j/parseFloat(B)*1e3)/1e3),ue=zc(Math.round(L/parseFloat(R)*1e3)/1e3);if(ce===0||ue===0||qa(n)&&!cy(n))return;const{offset:Ee,targetOffset:Re}=M;let[be,le]=iw(D,Ee);const[ae,ye]=iw(A,Re);A.x-=ae,A.y-=ye;const[Se,He]=M.points||[],Le=sw(He),Ae=sw(Se),_e=la(A,Le),Te=la(D,Ae),Ce={...M};let Pe=_e.x-Te.x+be,De=_e.y-Te.y+le;const Ne=Oe(Pe,De),Qe=Oe(Pe,De,re),mt=la(A,["t","l"]),it=la(D,["t","l"]),ct=la(A,["b","r"]),bt=la(D,["b","r"]),pt=M.overflow||{},{adjustX:nt,adjustY:et,shiftX:Xe,shiftY:Ie}=pt,Me=St=>typeof St=="boolean"?St:St>=0;let se,ge,fe,ie;ve();const me=Me(et),xe=Ae[0]===Le[0];if(me&&Ae[0]==="t"&&(ge>Z.bottom||m.current.bt)){let St=De;xe?St-=L-Y:St=mt.y-bt.y-le;const er=Oe(Pe,St),sr=Oe(Pe,St,re);er>Ne||er===Ne&&(!ee||sr>=Qe)?(m.current.bt=true,De=St,le=-le,Ce.points=[gi(Ae,0),gi(Le,0)]):m.current.bt=false;}if(me&&Ae[0]==="b"&&(se<Z.top||m.current.tb)){let St=De;xe?St+=L-Y:St=ct.y-it.y-le;const er=Oe(Pe,St),sr=Oe(Pe,St,re);er>Ne||er===Ne&&(!ee||sr>=Qe)?(m.current.tb=true,De=St,le=-le,Ce.points=[gi(Ae,0),gi(Le,0)]):m.current.tb=false;}const ke=Me(nt),qe=Ae[1]===Le[1];if(ke&&Ae[1]==="l"&&(ie>Z.right||m.current.rl)){let St=Pe;qe?St-=j-q:St=mt.x-bt.x-be;const er=Oe(St,De),sr=Oe(St,De,re);er>Ne||er===Ne&&(!ee||sr>=Qe)?(m.current.rl=true,Pe=St,be=-be,Ce.points=[gi(Ae,1),gi(Le,1)]):m.current.rl=false;}if(ke&&Ae[1]==="r"&&(fe<Z.left||m.current.lr)){let St=Pe;qe?St+=j-q:St=ct.x-it.x-be;const er=Oe(St,De),sr=Oe(St,De,re);er>Ne||er===Ne&&(!ee||sr>=Qe)?(m.current.lr=true,Pe=St,be=-be,Ce.points=[gi(Ae,1),gi(Le,1)]):m.current.lr=false;}ve();const Ze=Xe===true?0:Xe;typeof Ze=="number"&&(fe<re.left&&(Pe-=fe-re.left-be,A.x+q<re.left+Ze&&(Pe+=A.x-re.left+q-Ze)),ie>re.right&&(Pe-=ie-re.right-be,A.x>re.right-Ze&&(Pe+=A.x-re.right+Ze)));const st=Ie===true?0:Ie;typeof st=="number"&&(se<re.top&&(De-=se-re.top-le,A.y+Y<re.top+st&&(De+=A.y-re.top+Y-st)),ge>re.bottom&&(De-=ge-re.bottom-le,A.y>re.bottom-st&&(De+=A.y-re.bottom+st)));const Ct=D.x+Pe,an=Ct+j,On=D.y+De,Rt=On+L,pe=A.x,Fe=pe+q,Ge=A.y,ut=Ge+Y,Pt=Math.max(Ct,pe),qt=Math.min(an,Fe),hn=(Pt+qt)/2-Ct,Lr=Math.max(On,Ge),Wo=Math.min(Rt,ut),So=(Lr+Wo)/2-On;s?.(t,Ce);let Wn=te.right-D.x-(Pe+D.width),ss=te.bottom-D.y-(De+D.height);ce===1&&(Pe=Math.round(Pe),Wn=Math.round(Wn)),ue===1&&(De=Math.round(De),ss=Math.round(ss));const Al={ready:true,offsetX:Pe/ce,offsetY:De/ue,offsetR:Wn/ce,offsetB:ss/ue,arrowX:hn/ce,arrowY:So/ue,scaleX:ce,scaleY:ue,align:Ce};c(Al);}}),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 TI(){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 IF(e,t,n,r,o){Kt(()=>{if(e&&t&&n){let d=function(){r(),o();};const i=t,s=n,a=yb(i),l=yb(s),c=Eu(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 PF(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=Eu(r);p.addEventListener("pointerdown",d,true),p.addEventListener("mousedown",m,true),p.addEventListener("contextmenu",m,true);const h=Pf(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 NF(){const[e,t]=f.useState(null),[n,r]=f.useState(false),[o,i]=f.useState(false),s=f.useRef(null),a=at(c=>{c===false?(s.current=null,r(false)):o&&n?s.current=c:(r(true),t(c),s.current=null,n||i(true));}),l=at(c=>{c?(i(false),s.current&&(t(s.current),s.current=null)):(i(false),s.current=null);});return [a,n,e,l]}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)}const MF=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=PI(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(Jn,Cb({motionAppear:true,motionEnter:true,motionLeave:true,removeOnLeave:false,leavedClassName:`${g}-hidden`},m,{visible:o,onVisibleChanged:S=>{y(S);}}),({className:S,style:I})=>{const $=V(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}})})},RF=({children:e,postTriggerProps:t})=>{const[n,r,o,i]=NF(),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=at(z=>{d.current=z,qa(z)&&a!==z&&l(z);}),p=f__namespace.useRef(null),h=TI(),g=at((z,_)=>{p.current=_,h(()=>{n(z);},z.delay);}),b=z=>{h(()=>{p.current?.()||n(false);},z);},y=at(z=>{i(z);}),[C,x,w,S,I,$,E,,,P,M]=AI(r,a,s?.target,s?.popupPlacement,s?.builtinPlacements||{},s?.popupAlign,void 0,false),N=f__namespace.useMemo(()=>{if(!s)return "";const z=RI(s.builtinPlacements||{},s.prefixCls||"",P,false);return V(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 D=at(()=>(M(),Promise.resolve())),R=f__namespace.useRef({}),B=f__namespace.useContext(Rf),H=f__namespace.useMemo(()=>({registerSubPopup:(z,_)=>{R.current[z]=_,B?.registerSubPopup(z,_);}}),[B]),k=s?.prefixCls;return f__namespace.createElement(MI.Provider,{value:A},e,s&&f__namespace.createElement(Rf.Provider,{value:H},f__namespace.createElement(NI,{ref:m,portal:Lm,prefixCls:k,popup:s.popup,className:V(s.popupClassName,N,`${k}-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:D,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(MF,{prefixCls:k,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:V(s.uniqueContainerClassName,N),uniqueContainerStyle:s.uniqueContainerStyle}))))};function AF(e=Lm){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:D,builtinPlacements:R={},popupAlign:B,zIndex:H,stretch:k,getPopupClassNameFromAlign:z,fresh:_,unique:W,alignPoint:O,onPopupClick:L,onPopupAlign:j,arrow:Y,popupMotion:q,maskMotion:U,mobile:K,...J}=n,Q=$||false,G=c===void 0,ee=!!K,oe=f__namespace.useRef({}),re=f__namespace.useContext(Rf),he=f__namespace.useMemo(()=>({registerSubPopup:(Ye,en)=>{oe.current[Ye]=en,re?.registerSubPopup(Ye,en);}}),[re]),Z=f__namespace.useContext(MI),te=Ws(),[ce,ue]=f__namespace.useState(null),Ee=f__namespace.useRef(null),Re=at(Ye=>{Ee.current=Ye,qa(Ye)&&ce!==Ye&&ue(Ye),re?.registerSubPopup(te,Ye);}),[be,le]=f__namespace.useState(null),ae=f__namespace.useRef(null),ye=at(Ye=>{qa(Ye)&&be!==Ye&&(le(Ye),ae.current=Ye);}),Se={},He=at(Ye=>{const en=be;return en?.contains(Ye)||Pf(en)?.host===Ye||Ye===en||ce?.contains(Ye)||Pf(ce)?.host===Ye||Ye===ce||Object.values(oe.current).some(ud=>ud?.contains(Ye)||Ye===ud)}),Le=Y?{...Y!==true?Y:{}}:null,[Ae,_e]=Lt(u||false,c),Te=Ae||false,Ce=f__namespace.useMemo(()=>{const Ye=typeof i=="function"?i({open:Te}):i;return f__namespace.Children.only(Ye)},[i,Te]),Pe=Ce?.props||{},De=at(()=>Te),Oe=at((Ye=0)=>({popup:E,target:be,delay:Ye,prefixCls:o,popupClassName:P,uniqueContainerClassName:M,uniqueContainerStyle:N,popupStyle:A,popupPlacement:D,builtinPlacements:R,popupAlign:B,zIndex:H,mask:x,maskClosable:w,popupMotion:q,maskMotion:U,arrow:Le,getPopupContainer:S,getPopupClassNameFromAlign:z,id:te}));Kt(()=>{Z&&W&&be&&!G&&!re&&(Te?Z.show(Oe(g),De):Z.hide(b));},[Te,be]);const Ne=f__namespace.useRef(Te);Ne.current=Te;const Qe=f__namespace.useRef([]);Qe.current=[];const mt=at(Ye=>{_e(Ye),(Qe.current[Qe.current.length-1]??Te)!==Ye&&(Qe.current.push(Ye),d?.(Ye),p?.(Ye));}),it=TI(),ct=(Ye,en=0)=>{if(c!==void 0){it(()=>{mt(Ye);},en);return}if(Z&&W&&G&&!re){Ye?Z.show(Oe(en),De):Z.hide(en);return}it(()=>{mt(Ye);},en);},[bt,pt]=f__namespace.useState(false);Kt(Ye=>{(!Ye||Te)&&pt(true);},[Te]);const[nt,et]=f__namespace.useState(null),[Xe,Ie]=f__namespace.useState(null),Me=Ye=>{Ie([Ye.clientX,Ye.clientY]);},[se,ge,fe,ie,ve,me,xe,ke,qe,Ze,st]=AI(Te,ce,O&&Xe!==null?Xe:be,D,R,B,j,ee),[Ct,an]=$F(s,a,l),On=Ct.has("click"),Rt=an.has("click")||an.has("contextMenu"),pe=at(()=>{bt||st();});IF(Te,be,ce,pe,()=>{Ne.current&&O&&Rt&&ct(false);}),Kt(()=>{pe();},[Xe,D]),Kt(()=>{Te&&!R?.[D]&&pe();},[JSON.stringify(B)]);const Ge=f__namespace.useMemo(()=>{const Ye=RI(R,o,Ze,O);return V(Ye,z?.(Ze))},[Ze,z,R,o,O]);f__namespace.useImperativeHandle(r,()=>({nativeElement:ae.current,popupElement:Ee.current,forceAlign:pe}));const[ut,Pt]=f__namespace.useState(0),[qt,Xt]=f__namespace.useState(0),hn=()=>{if(k&&be){const Ye=be.getBoundingClientRect();Pt(Ye.width),Xt(Ye.height);}},Lr=()=>{hn(),pe();},Wo=Ye=>{pt(false),st(),m?.(Ye),h?.(Ye);},pi=()=>new Promise(Ye=>{hn(),et(()=>Ye);});Kt(()=>{nt&&(st(),nt(),et(null));},[nt]);function So(Ye,en,ud,aT,ex){Se[Ye]=(tx,...lT)=>{(!ex||!ex())&&(aT?.(tx),ct(en,ud)),Pe[Ye]?.(tx,...lT);};}const Wn=Ct.has("touch"),ss=an.has("touch"),Al=f__namespace.useRef(false);(Wn||ss)&&(Se.onTouchStart=(...Ye)=>{Al.current=true,Ne.current&&ss?ct(false):!Ne.current&&Wn&&ct(true),Pe.onTouchStart?.(...Ye);}),(On||Rt)&&(Se.onClick=(Ye,...en)=>{Ne.current&&Rt?ct(false):!Ne.current&&On&&(Me(Ye),ct(true)),Pe.onClick?.(Ye,...en),Al.current=false;});const St=PF(Te,Rt||ss,be,ce,x,w,He,ct),er=Ct.has("hover"),sr=an.has("hover");let ra,Tl;const oa=()=>Al.current;if(er){const Ye=en=>{Me(en);};So("onMouseEnter",true,g,Ye,oa),So("onPointerEnter",true,g,Ye,oa),ra=en=>{(Te||bt)&&ce?.contains(en.target)&&ct(true,g);},O&&(Se.onMouseMove=en=>{Pe.onMouseMove?.(en);});}sr&&(So("onMouseLeave",false,b,void 0,oa),So("onPointerLeave",false,b,void 0,oa),Tl=()=>{ct(false,b);}),Ct.has("focus")&&So("onFocus",true,y),an.has("focus")&&So("onBlur",false,C),Ct.has("contextMenu")&&(Se.onContextMenu=(Ye,...en)=>{Ne.current&&an.has("contextMenu")?ct(false):(Me(Ye),ct(true)),Ye.preventDefault(),Pe.onContextMenu?.(Ye,...en);});const ad=f__namespace.useRef(false);ad.current||=I||Te||bt;const ld={...Pe,...Se},cd={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach(Ye=>{J[Ye]&&(cd[Ye]=(...en)=>{ld[Ye]?.(...en),J[Ye](...en);});});const Lp={x:me,y:xe},sT=f__namespace.cloneElement(Ce,{...ld,...cd});return f__namespace.createElement(f__namespace.Fragment,null,f__namespace.createElement(Xr,{disabled:!Te,ref:ye,onResize:Lr},sT),ad.current&&(!Z||!W)&&f__namespace.createElement(Rf.Provider,{value:he},f__namespace.createElement(NI,{portal:e,ref:Re,prefixCls:o,popup:E,className:V(P,!ee&&Ge),style:A,target:be,onMouseEnter:ra,onMouseLeave:Tl,onPointerEnter:ra,zIndex:H,open:Te,keepDom:bt,fresh:_,onClick:L,onPointerDownCapture:St,mask:x,motion:q,maskMotion:U,onVisibleChanged:Wo,onPrepare:pi,forceRender:I,autoDestroy:Q,getPopupContainer:S,align:Ze,arrow:Le,arrowPos:Lp,ready:se,offsetX:ge,offsetY:fe,offsetR:ie,offsetB:ve,onAlign:pe,stretch:k,targetWidth:ut/ke,targetHeight:qt/qe,mobile:K})))})}const Dm=AF(Lm),Hc="ant",km="anticon",TF=["outlined","borderless","filled","underlined"],OF=(e,t)=>t||(e?`${Hc}-${e}`:Hc),ot=f__namespace.createContext({getPrefixCls:OF,iconPrefixCls:km}),{Consumer:Hce}=ot,aw={};function $t(e){const t=f__namespace.useContext(ot),{getPrefixCls:n,direction:r,getPopupContainer:o,renderEmpty:i}=t,s=t[e];return {classNames:aw,styles:aw,...s,getPrefixCls:n,direction:r,getPopupContainer:o,renderEmpty:i}}const FF=({children:e})=>{const{getPrefixCls:t}=f.useContext(ot),n=t();return f.isValidElement(e)?f.createElement(Jn,{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:V(i,o),style:a})}):e},Cd=[null,null];function BF(e){if(Cd[0]!==e){const t={};Object.keys(e).forEach(n=>{t[n]={...e[n],dynamicInset:false};}),Cd[0]=e,Cd[1]=t;}return Cd[1]}const OI=({children:e})=>{const t=n=>{const r=typeof n.popup=="function"?n.popup():n.popup,{id:o,builtinPlacements:i}=n,s=BF(i);return {...n,getPopupContainer:null,arrow:false,popup:f.createElement(FF,{key:o},r),builtinPlacements:s}};return f.createElement(RF,{postTriggerProps:t},e)},kn=f__namespace.createContext(false),FI=({children:e,disabled:t})=>{const n=f__namespace.useContext(kn);return f__namespace.createElement(kn.Provider,{value:t??n},e)},Ua=f__namespace.createContext(void 0),LF=({children:e,size:t})=>{const n=f__namespace.useContext(Ua);return f__namespace.createElement(Ua.Provider,{value:t||n},e)};function DF(){const e=f.useContext(kn),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 kF(e){if(Array.isArray(e))return e}function _F(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 zF(){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 uy(e,t){return kF(e)||_F(e,t)||Y0(e,t)||zF()}function HF(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 BI(e){var t=HF(e,"string");return yn(t)=="symbol"?t:t+""}function tt(e,t,n){return (t=BI(t))in e?Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true}):e[t]=n,e}function lw(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?lw(Object(n),true).forEach(function(r){tt(e,r,n[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lw(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 cw(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,BI(r.key),r);}}function ro(e,t,n){return t&&cw(e.prototype,t),n&&cw(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 Vc(e,t){return Vc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Vc(e,t)}function LI(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&&Vc(e,t);}function jc(e){return jc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},jc(e)}function dy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return (dy=function(){return !!e})()}function VF(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 DI(e){var t=dy();return function(){var n,r=jc(e);if(t){var o=jc(this).constructor;n=Reflect.construct(r,arguments,o);}else n=r.apply(this,arguments);return VF(this,n)}}var jF=ro(function e(){no(this,e);}),kI="CALC_UNIT",WF=new RegExp(kI,"g");function Zp(e){return typeof e=="number"?"".concat(e).concat(kI):e}var qF=(function(e){LI(n,e);var t=DI(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=Zp(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(Zp(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(Zp(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(WF,l?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),n})(jF),UF=function(t,n){var r=qF;return function(o){return new r(o,n)}},uw=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 dw(e,t,n,r){var o=ln({},t[e]);if(r!=null&&r.deprecatedTokens){var i=r.deprecatedTokens;i.forEach(function(a){var l=uy(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 _I=typeof CSSINJS_STATISTIC<"u",xb=true;function vt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!_I)return Object.assign.apply(Object,[{}].concat(t));xb=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]}});});}}),xb=true,r}var fw={};function GF(){}var KF=function(t){var n,r=t,o=GF;return _I&&typeof Proxy<"u"&&(n=new Set,r=new Proxy(t,{get:function(s,a){if(xb){var l;(l=n)===null||l===void 0||l.add(a);}return s[a]}}),o=function(s,a){var l;fw[s]={global:Array.from(n),component:ln(ln({},(l=fw[s])===null||l===void 0?void 0:l.component),a)};}),{token:r,keys:n,flush:o}};function mw(e,t,n){if(typeof n=="function"){var r;return n(vt(t,(r=t[e])!==null&&r!==void 0?r:{}))}return n??{}}function XF(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 YF=1e3*60*10,QF=(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>YF&&(n.map.delete(i),n.lastAccessBeat.delete(i));}),this.accessBeat=0;}}}]),e})(),pw=new QF;function ZF(e,t){return f.useMemo(function(){var n=pw.get(t);if(n)return n;var r=e();return pw.set(t,r),r},t)}var JF=function(){return {}};function eB(e){var t=e.useCSP,n=t===void 0?JF: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 P9({path:[m],prefix:w.prefix,key:w.key,unitless:g,ignore:y,token:S,scope:C},function(){var I=mw(m,S,p),$=dw(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=uy(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,D=$.zeroRuntime,R=f.useMemo(function(){return D},[]);if(R)return M;var B=o(),H=B.rootPrefixCls,k=B.iconPrefixCls,z=n(),_="css",W=ZF(function(){var q=new Set;return Object.keys(g.unitless||{}).forEach(function(U){q.add(Yd(U,A.prefix)),q.add(Yd(U,uw(C,A.prefix)));}),UF(_,q)},[_,C,A?.prefix]),O=XF(),L=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"&&cb(ln(ln({},Y),{},{clientOnly:false,path:["Shared",H]}),function(){return i(N,{prefix:{rootPrefixCls:H,iconPrefixCls:k},csp:z})}),cb(ln(ln({},Y),{},{path:[x,S,k]}),function(){if(g.injectStyle===false)return [];var q=KF(N),U=q.token,K=q.flush,J=mw(C,P,h),Q=".".concat(S),G=dw(C,P,J,{deprecatedTokens:g.deprecatedTokens});J&&yn(J)==="object"&&Object.keys(J).forEach(function(he){J[he]="var(".concat(Yd(he,uw(C,A.prefix)),")");});var ee=vt(U,{componentCls:Q,prefixCls:S,iconCls:".".concat(k),antCls:".".concat(H),calc:W,max:L,min:j},J),oe=p(ee,{hashId:M,prefixCls:S,rootPrefixCls:H,iconPrefixCls:k});K(C,G);var re=typeof s=="function"?s(ee,S,I,g.resetFont):null;return [g.resetStyle===false?null:re,oe]}),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"],Do={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},Bt=(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"}}),Af=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),tB=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"}}}),nB=(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}}},ko=(e,t)=>({outline:`${X(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:"outline-offset 0s, outline 0s"}),Tr=(e,t)=>({"&:focus-visible":ko(e,t)}),zI=e=>({[`.${e}`]:{...Gs(),[`.${e} .${e}-icon`]:{display:"block"}}}),rB=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:wt,genComponentStyleHook:oB,genSubStyleComponent:ll}=eB({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=tB(e);return [n,{"&":n},zI(t?.prefix.iconPrefixCls??km)]},getCommonStyle:nB,getCompUnitless:()=>uI}),fy=(e,t)=>{const n=`--${e.replace(".","")}-${t}-`;return (r,o=false)=>{const i=`${n}${r}`;return o?`var(${i})`:i}};function _m(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 iB=(e,t)=>(Tn(),cb({hashId:"",path:["ant-design-icons",e],nonce:()=>t?.nonce,layer:{name:"antd"}},()=>zI(e)));function sB(e,t,n){const r=e||{},o=r.inherit===false||!t?{...kc,hashed:t?.hashed??kc.hashed,cssVar:t?.cssVar}:t,i=f.useId();return il(()=>{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 !ki(l,u,true)}))}const hw=f__namespace.createContext(true);function aB(e){const t=f__namespace.useContext(hw),{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(hw.Provider,{value:o},f__namespace.createElement(rF,{motion:o},n)):n}const lB=()=>null,cB=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let Tf,HI,VI,jI;function Jp(){return Tf||Hc}function uB(){return HI||km}const dB=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:o}=e;t!==void 0&&(Tf=t),n!==void 0&&(HI=n),"holderRender"in e&&(jI=o),r&&(VI=r);},my=()=>({getPrefixCls:(e,t)=>t||(e?`${Jp()}-${e}`:Jp()),getIconPrefixCls:uB,getRootPrefixCls:()=>Tf||Jp(),getTheme:()=>VI,holderRender:jI}),fB=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:D,checkbox:R,descriptions:B,divider:H,drawer:k,skeleton:z,steps:_,image:W,layout:O,list:L,mentions:j,modal:Y,progress:q,result:U,slider:K,breadcrumb:J,masonry:Q,menu:G,pagination:ee,input:oe,textArea:re,otp:he,empty:Z,badge:te,radio:ce,rate:ue,ribbon:Ee,switch:Re,transfer:be,avatar:le,message:ae,tag:ye,table:Se,card:He,cardMeta:Le,tabs:Ae,timeline:_e,timePicker:Te,upload:Ce,notification:Pe,tree:De,colorPicker:Oe,datePicker:Ne,rangePicker:Qe,flex:mt,wave:it,dropdown:ct,warning:bt,tour:pt,tooltip:nt,popover:et,popconfirm:Xe,qrcode:Ie,floatButton:Me,floatButtonGroup:se,variant:ge,inputNumber:fe,treeSelect:ie,watermark:ve}=e,me=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||km,ke=n||C.csp;iB(xe,ke);const qe=sB(w,C.theme,{prefixCls:me("")}),Ze={csp:ke,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:me,iconPrefixCls:xe,theme:qe,segmented:I,statistic:$,spin:E,calendar:P,carousel:M,cascader:N,collapse:A,typography:D,checkbox:R,descriptions:B,divider:H,drawer:k,skeleton:z,steps:_,image:W,input:oe,textArea:re,otp:he,layout:O,list:L,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:Ee,switch:Re,transfer:be,avatar:le,message:ae,tag:ye,table:Se,card:He,cardMeta:Le,tabs:Ae,timeline:_e,timePicker:Te,upload:Ce,notification:Pe,tree:De,colorPicker:Oe,datePicker:Ne,rangePicker:Qe,flex:mt,wave:it,dropdown:ct,warning:bt,tour:pt,tooltip:nt,popover:et,popconfirm:Xe,qrcode:Ie,floatButton:Me,floatButtonGroup:se,variant:ge,inputNumber:fe,treeSelect:ie,watermark:ve},st={...C};Object.keys(Ze).forEach(Ge=>{Ze[Ge]!==void 0&&(st[Ge]=Ze[Ge]);}),cB.forEach(Ge=>{const ut=e[Ge];ut&&(st[Ge]=ut);}),typeof r<"u"&&(st.button={autoInsertSpace:r,...st.button});const Ct=il(()=>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(As),On=f__namespace.useMemo(()=>({prefixCls:xe,csp:ke,layer:an?"antd":void 0}),[xe,ke,an]);let Rt=f__namespace.createElement(f__namespace.Fragment,null,f__namespace.createElement(lB,{dropdownMatchSelectWidth:h}),t);const pe=f__namespace.useMemo(()=>$a(ho.Form?.defaultValidateMessages||{},Ct.locale?.Form?.defaultValidateMessages||{},Ct.form?.validateMessages||{},a?.validateMessages||{}),[Ct,a?.validateMessages]);Object.keys(pe).length>0&&(Rt=f__namespace.createElement(z9.Provider,{value:pe},Rt)),l&&(Rt=f__namespace.createElement(M8,{locale:l,_ANT_MARK__:N8},Rt)),Rt=f__namespace.createElement(U0.Provider,{value:On},Rt),c&&(Rt=f__namespace.createElement(LF,{size:c},Rt)),Rt=f__namespace.createElement(aB,null,Rt),nt?.unique&&(Rt=f__namespace.createElement(OI,null,Rt));const Fe=f__namespace.useMemo(()=>{const{algorithm:Ge,token:ut,components:Pt,cssVar:qt,...Xt}=qe||{},hn=Ge&&(!Array.isArray(Ge)||Ge.length>0)?Mf(Ge):oy,Lr={};Object.entries(Pt||{}).forEach(([pi,So])=>{const Wn={...So};"algorithm"in Wn&&(Wn.algorithm===true?Wn.theme=hn:(Array.isArray(Wn.algorithm)||typeof Wn.algorithm=="function")&&(Wn.theme=Mf(Wn.algorithm)),delete Wn.algorithm),Lr[pi]=Wn;});const Wo={...Wa,...ut};return {...Xt,theme:hn,token:Wo,components:Lr,override:{override:Wo,...Lr},cssVar:qt}},[qe]);return w&&(Rt=f__namespace.createElement(iy.Provider,{value:Fe},Rt)),Ct.warning&&(Rt=f__namespace.createElement(x8.Provider,{value:Ct.warning},Rt)),S!==void 0&&(Rt=f__namespace.createElement(FI,{disabled:S},Rt)),f__namespace.createElement(ot.Provider,{value:Ct},Rt)},yr=e=>{const t=f__namespace.useContext(ot),n=f__namespace.useContext(K0);return f__namespace.createElement(fB,{parentContext:t,legacyLocale:n,...e})};yr.ConfigContext=ot;yr.SizeContext=Ua;yr.config=dB;yr.useConfig=DF;Object.defineProperty(yr,"SizeContext",{get:()=>Ua});const sn=e=>`${e}-css-var`,Hn=e=>{const t=f.useContext(Ua);return f.useMemo(()=>e?typeof e=="string"?e??t:typeof e=="function"?e(t):t:t,[e,t])},bs="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})}),Of=f__namespace.createContext(null);function wb(e){return e==null?[]:Array.isArray(e)?e:[e]}function mB(e){return e&&!!e._init}function Sb(){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 $b=Sb();function pB(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function hB(e,t,n){if(dy())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&Vc(o,n.prototype),o}function Eb(e){var t=typeof Map=="function"?new Map:void 0;return Eb=function(r){if(r===null||!pB(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 hB(r,arguments,jc(this).constructor)}return o.prototype=Object.create(r.prototype,{constructor:{value:o,enumerable:false,writable:true,configurable:true}}),Vc(o,r)},Eb(e)}var gB=/%[sdj%]/g,bB=function(){};function Ib(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(gB,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 vB(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||vB(t)&&typeof e=="string"&&!e)}function yB(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 gw(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 CB(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,Et(e[n]||[]));}),t}var bw=(function(e){LI(n,e);var t=DI(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)})(Eb(Error));function xB(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 bw(y,Ib(y))):m(o)},g=CB(e);gw(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 bw(u,Ib(u))):m(o)};a.length||(r(u),m(o)),a.forEach(function(g){var b=e[g];s.indexOf(g)!==-1?gw(b,n,h):yB(b,n,h);});});return d.catch(function(m){return m}),d}function wB(e){return !!(e&&e.message!==void 0)}function SB(e,t){for(var n=e,r=0;r<t.length;r++){if(n==null)return n;n=n[t[r]];}return n}function vw(e,t){return function(n){var r;return e.fullFields?r=SB(t,e.fullFields):r=t[n.field||e.fullField],wB(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 yw(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",$B=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(", ")));},EB=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));}}},IB=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));},WI=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));},xd;const PB=(function(){if(xd)return xd;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 xd=new RegExp("(?:^".concat(w,"$)"),"i"),xd});var Cw={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},ic={integer:function(t){return ic.number(t)&&parseInt(t,10)===t},float:function(t){return ic.number(t)&&!ic.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"&&!ic.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(Cw.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(PB())},hex:function(t){return typeof t=="string"&&!!t.match(Cw.hex)}},NB=function(t,n,r,o,i){if(t.required&&n===void 0){WI(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?ic[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));},MB=function(t,n,r,o,i){(/^\s+$/.test(n)||n==="")&&o.push(Nr(i.messages.whitespace,t.fullField));};const Ot={required:WI,whitespace:MB,type:NB,range:IB,enum:$B,pattern:EB};var RB=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);},AB=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);},TB=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);},OB=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);},FB="enum",BB=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[FB](t,n,o,s,i);}r(s);},LB=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);},DB=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);},kB=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);},_B=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);},zB=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);},HB=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);},VB=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);},jB=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);},WB=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);},eh=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 gc={string:WB,method:kB,number:_B,boolean:TB,regexp:VB,integer:DB,float:LB,array:AB,object:zB,enum:BB,pattern:HB,date:OB,url:eh,hex:eh,email:eh,required:jB,any:RB};var Iu=(function(){function e(t){no(this,e),tt(this,"rules",null),tt(this,"_messages",$b),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=yw(Sb(),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=Ib(g),l(g,b)):l(null,s);}if(a.messages){var u=this.messages();u===$b&&(u=Sb()),yw(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 xB(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(vw(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(vw(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(D){M[D]=b.defaultField;}),M=ln(ln({},M),h.rule.fields);var N={};Object.keys(M).forEach(function(D){var R=M[D],B=Array.isArray(R)?R:[R];N[D]=B.map(C.bind(null,D));});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(D){var R=[];P&&P.length&&R.push.apply(R,Et(P)),D&&D.length&&R.push.apply(R,Et(D)),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&&!gc.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"?gc.required:gc[this.getType(n)]||void 0}}]),e})();tt(Iu,"register",function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");gc[t]=n;});tt(Iu,"warning",bB);tt(Iu,"messages",$b);tt(Iu,"validators",gc);const wr="'${name}' is not a valid ${type}",qI={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}"}},xw=Iu;function qB(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 ww="CODE_LOGIC_ERROR";async function Pb(e,t,n,r,o){const i={...n};if(delete i.ruleIndex,xw.warning=()=>{},i.validator){const m=i.validator;i.validator=(...p)=>{try{return m(...p)}catch(h){return console.error(h),Promise.reject(ww)}};}let s=null;i&&i.type==="array"&&i.defaultField&&(s=i.defaultField,delete i.defaultField);const a=new xw({[e]:[i]}),l=$a(qI,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===ww?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)=>Pb(`${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"?qB(m,u):m)}function UB(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 Pb(s,t,m,r,i);if(p.length){u([{errors:p,rule:m}]);return}}c([]);});else {const c=a.map(u=>Pb(s,t,u,r,i).then(d=>({errors:d,rule:u})));l=(o?KB(c):GB(c)).then(u=>Promise.reject(u));}return l.catch(c=>c),l}async function GB(e){return Promise.all(e).then(t=>[].concat(...t))}async function KB(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 wb(e)}function Sw(e,t){let n={};return t.forEach(r=>{const o=co(e,r);n=zr(n,r,o);}),n}function Aa(e,t,n=false){return e&&e.some(r=>Nb(t,r,n))}function Nb(e,t,n=false){return !e||!t||!n&&e.length!==t.length?false:t.every((r,o)=>e[o]===r)}function XB(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 YB(e,...t){const n=t[0];return n&&n.target&&typeof n.target=="object"&&e in n.target?n.target[e]:n}function $w(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 Mb(){return Mb=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},Mb.apply(this,arguments)}const as=[],Ll=[];function th(e,t,n,r,o,i){return typeof e=="function"?e(t,n,"source"in i?{source:i.source}:{}):r!==o}class QB extends f__namespace.Component{static contextType=Ga;state={resetCount:0};cancelRegisterFunc=null;mounted=false;touched=false;dirty=false;validatePromise;prevValidating;errors=as;warnings=Ll;constructor(t){if(super(t),t.fieldContext){const{getInternalHooks:n}=t.fieldContext,{initEntityValue:r}=n(bs);r(this);}}componentDidMount(){const{shouldUpdate:t,fieldContext:n}=this.props;if(this.mounted=true,n){const{getInternalHooks:r}=n,{registerField:o}=r(bs);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};ki(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"&&!ki(c,u)&&(this.touched=true,this.dirty=true,this.validatePromise=null,this.errors=as,this.warnings=Ll,this.triggerMetaEvent()),r.type){case "reset":if(!n||d){this.touched=false,this.dirty=false,this.validatePromise=void 0,this.errors=as,this.warnings=Ll,this.triggerMetaEvent(),s?.(),this.refresh();return}break;case "remove":{if(o&&th(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||as),"warnings"in m&&(this.warnings=m.warnings||Ll),this.dirty=true,this.triggerMetaEvent(),this.reRender();return}else if("value"in m&&Aa(n,l,true)){this.reRender();return}if(o&&!l.length&&th(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)&&th(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?wb(p).includes(o):true})),c&&o&&(await new Promise(m=>{setTimeout(m,c);}),this.validatePromise!==s))return [];const d=UB(n,r,u,t,a,l);return d.catch(m=>m).then((m=as)=>{if(this.validatePromise===s){this.validatePromise=null;const p=[],h=[];m.forEach?.(({rule:{warningOnly:g},errors:b=as})=>{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=as,this.warnings=Ll,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(bs);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=hr(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(bs),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=YB(a,...S),s&&(I=s(I,g,p(true))),I!==g&&h({type:"updateValue",namePath:d,value:I}),y&&y(...S);},wb(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 UI({name:e,...t}){const n=f__namespace.useContext(Ga),r=f__namespace.useContext(Of),o=e!==void 0?mn(e):void 0,i=t.isListField??!!r;let s="keep";return i||(s=`_${(o||[]).join("_")}`),f__namespace.createElement(QB,Mb({key:s,name:o,isListField:i},t,{fieldContext:n}))}function ZB({name:e,initialValue:t,children:n,rules:r,validateTrigger:o,isListField:i}){const s=f__namespace.useContext(Ga),a=f__namespace.useContext(Of),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(Of.Provider,{value:m},f__namespace.createElement(Ga.Provider,{value:d},f__namespace.createElement(UI,{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=$w(c.keys,S,I),g($w($,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 JB(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 GI="__@field_split__";function nh(e){return e.map(t=>`${typeof t}:${t}`).join(GI)}class ua{kvs=new Map;set(t,n){this.kvs.set(nh(t),n);}get(t){return this.kvs.get(nh(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(nh(t));}map(t){return [...this.kvs.entries()].map(([n,r])=>{const o=n.split(GI);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 eL{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===bs?(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=zr(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=Sw(this.store,s.map(mn));return a.forEach(c=>{co(l,c)||(l=zr(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(zr(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(zr(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(zr(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(zr(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=>!Nb(a.getNamePath(),n))){const a=this.store;this.updateStore(zr(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(zr(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=Sw(this.store,[r]),c=this.getFieldsValue(),u=P3([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=>Nb(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:{...qI,...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=JB(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 KI(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 eL(r);t.current=o.getForm();}return [t.current]}const Rb=f__namespace.createContext({triggerFormChange:()=>{},triggerFormFinish:()=>{},registerForm:()=>{},unregisterForm:()=>{}}),tL=({validateMessages:e,onFormChange:t,onFormFinish:n,children:r})=>{const o=f__namespace.useContext(Rb),i=f__namespace.useRef({});return f__namespace.createElement(Rb.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)},nL=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 Ab(){return Ab=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},Ab.apply(this,arguments)}const rL=({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(Rb),[C]=KI(r),{useSubscribe:x,setInitialValues:w,setCallbacks:S,setValidateMessages:I,setPreserve:$,destroyForm:E,setBatchUpdate:P}=C.getInternalHooks(bs);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,...L)=>{y.triggerFormChange(e,O),u&&u(O,...L);},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([]),D=()=>{N.current&&(A.current.forEach(([O,L])=>{N.current.batch(O,L);}),A.current=[]);},R=f__namespace.useCallback(O=>{N.current=O,D();},[]);P((O,L)=>{A.current.push([O,L]),D();}),f__namespace.useEffect(()=>()=>E(p),[]);let H;const k=typeof i=="function";if(k){const O=C.getFieldsValue(true);H=i(O,C);}else H=i;x(!k);const z=f__namespace.useRef(null);f__namespace.useEffect(()=>{XB(z.current||[],n||[])||C.setFields(n||[]),z.current=n;},[n,C]);const _=f__namespace.useMemo(()=>({...C,validateTrigger:l}),[C,l]),W=f__namespace.createElement(Of.Provider,{value:null},f__namespace.createElement(Ga.Provider,{value:_},H),f__namespace.createElement(nL,{ref:R}));return s===false?W:f__namespace.createElement(s,Ab({},h,{ref:b,onSubmit:O=>{O.preventDefault(),O.stopPropagation(),C.submit();},onReset:O=>{O.preventDefault(),C.resetFields(),h.onReset?.(O);}}),W)};function rh(e){try{return JSON.stringify(e)}catch{return Math.random()}}function oL(...e){const[t,n={}]=e,r=mB(n)?{form:n}:n,o=r.form,[i,s]=f.useState(()=>typeof t=="function"?t({}):void 0),a=f.useMemo(()=>rh(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(bs),g=at((y,C)=>{const x=r.preserve?C??m(true):y??m(),w=typeof t=="function"?t(x):co(x,mn(t));rh(i)!==rh(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 iL=f__namespace.forwardRef(rL),Pu=iL;Pu.FormProvider=tL;Pu.Field=UI;Pu.List=ZB;Pu.useForm=KI;Pu.useWatch=oL;const Qn=f__namespace.createContext({}),sL=({children:e,status:t,override:n})=>{const r=f__namespace.useContext(Qn),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(Qn.Provider,{value:o},e)},aL=f__namespace.createContext(void 0);function lL(e){return e===void 0||e===false?[]:Array.isArray(e)?e:[e]}function cL(e){return lL(e).join("_")}const XI=f__namespace.createContext(null),uL=XI.Provider,YI=f__namespace.createContext(null),dL=YI.Provider;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 QI=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]=Lt(a,i);f.useImperativeHandle(t,()=>({focus:C=>{m.current?.focus(C);},blur:()=>{m.current?.blur();},input:m.current,nativeElement:p.current}));const b=V(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",Tb({},d,{className:`${n}-input`,ref:m,onChange:y,disabled:s,checked:!!h,type:l})),f__namespace.createElement("span",{className:`${n}-inner`}))});function ZI(e){return e&&f.isValidElement(e)&&e.type===f.Fragment}const JI=(e,t,n)=>f.isValidElement(e)?f.cloneElement(e,typeof n=="function"?n(e.props||{}):n):t;function Rn(e,t){return JI(e,e,t)}const fL=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(",")}}}}},mL=oB("Wave",fL),zm=`${Hc}-wave-target`;var wd={},Ew;function pL(){if(Ew)return wd;Ew=1;var e=vT;return wd.createRoot=e.createRoot,wd.hydrateRoot=e.hydrateRoot,wd}var jo=pL();const Ff="__rc_react_root__";function Hm(e,t){const n=t[Ff]||jo.createRoot(t);n.render(e),t[Ff]=n;}async function eP(e){return Promise.resolve().then(()=>{e[Ff]?.unmount(),delete e[Ff];})}function Iw(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 hL(e,t=null){const n=getComputedStyle(e),{borderTopColor:r,borderColor:o,backgroundColor:i}=n;return t&&Iw(n[t])?n[t]:[r,o,i].find(Iw)??null}function oh(e){return Number.isNaN(e)?0:e}const gL=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(hL(n,o));const E=$.position==="static",{borderLeftWidth:P,borderTopWidth:M}=$;d(E?n.offsetLeft:oh(-Number.parseFloat(P))),p(E?n.offsetTop:oh(-Number.parseFloat(M))),g(n.offsetWidth),y(n.offsetHeight);const{borderTopLeftRadius:N,borderTopRightRadius:A,borderBottomLeftRadius:D,borderBottomRightRadius:R}=$;c([N,A,R,D].map(B=>oh(Number.parseFloat(B))));}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(zm);return f__namespace.createElement(Jn,{visible:true,motionAppear:true,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:($,E)=>{if(E.deadline||E.propertyName==="opacity"){const P=i.current?.parentElement;eP(P).then(()=>{P?.remove();});}return  false}},({className:$},E)=>f__namespace.createElement("div",{ref:In(i,E),className:V(t,$,{"wave-quick":I}),style:w}))},bL=(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),Hm(f__namespace.createElement(gL,{...t,target:e}),r);},vL=(e,t,n,r)=>{const{wave:o}=f__namespace.useContext(ot),[,i,s]=Tn(),a=at(u=>{const d=e.current;if(o?.disabled||!d)return;const m=d.querySelector(`.${zm}`)||d,{showEffect:p}=o||{};(p||bL)(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);});}},Nu=e=>{const{children:t,disabled:n,component:r,colorSource:o}=e,{getPrefixCls:i}=f.useContext(ot),s=f.useRef(null),a=i("wave"),[,l]=mL(a),c=vL(s,V(a,l),r,o);if(f.useEffect(()=>{const d=s.current;if(!d||d.nodeType!==window.Node.ELEMENT_NODE||n)return;const m=p=>{!cy(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 tP(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 yL=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-group`;return {[r]:{...Bt(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}}}},CL=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`]:{...Bt(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]:{...Bt(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}`]:ko(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}}}},xL=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:D,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)":ko(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:D,borderColor:D}},"&-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"}}}},wL=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}},nP=wt("Radio",e=>{const{controlOutline:t,controlOutlineWidth:n}=e,r=`0 0 0 ${X(n)} ${t}`,i=vt(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return [yL(i),CL(i),xL(i)]},wL,{unitless:{radioSize:true,dotSize:true}}),SL=(e,t)=>{const n=f__namespace.useContext(XI),r=f__namespace.useContext(YI),{getPrefixCls:o,direction:i,className:s,style:a,classNames:l,styles:c}=$t("radio"),u=f__namespace.useRef(null),d=In(t,u),{isFormItemInput:m}=f__namespace.useContext(Qn),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]=nP($,M),D={...I},R=f__namespace.useContext(kn);n&&(D.name=n.name,D.onChange=p,D.checked=e.value===n.value,D.disabled=D.disabled??n.disabled),D.disabled=D.disabled??R;const B={...e,...D},[H,k]=It([l,w],[c,S],{props:B}),z=V(`${P}-wrapper`,{[`${P}-wrapper-checked`]:D.checked,[`${P}-wrapper-disabled`]:D.disabled,[`${P}-wrapper-rtl`]:i==="rtl",[`${P}-wrapper-in-form-item`]:m,[`${P}-wrapper-block`]:!!n?.block},s,g,b,H.root,N,A,M),[_,W]=tP(D.onClick);return f__namespace.createElement(Nu,{component:"Radio",disabled:D.disabled},f__namespace.createElement("label",{className:z,style:{...k.root,...a,...C},onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:x,onClick:_},f__namespace.createElement(QI,{...D,className:V(H.icon,{[zm]:!E}),style:k.icon,type:"radio",prefixCls:P,ref:d,onClick:W}),y!==void 0?f__namespace.createElement("span",{className:V(`${P}-label`,H.label),style:k.label},y):null))},Bf=f__namespace.forwardRef(SL),$L=f__namespace.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r}=f__namespace.useContext(ot),{name:o}=f__namespace.useContext(Qn),i=Ws(cL(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,D]=Lt(C,x),R=f__namespace.useCallback(q=>{const U=A,K=q.target.value;"value"in e||D(K),K!==U&&S?.(q);},[A,D,S]),B=n("radio",s),H=`${B}-group`,k=sn(B),[z,_]=nP(B,k);let W=m;c&&c.length>0&&(W=c.map(q=>typeof q=="string"||typeof q=="number"?f__namespace.createElement(Bf,{key:q.toString(),prefixCls:B,disabled:d,value:q,checked:A===q},q):f__namespace.createElement(Bf,{key:`radio-group-value-options-${q.value}`,prefixCls:B,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=Hn(p),[,L]=qs(M,N),j=V(H,`${H}-${u}`,{[`${H}-${O}`]:O,[`${H}-rtl`]:r==="rtl",[`${H}-block`]:w},a,l,z,_,k),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",{...rr(e,{aria:true,data:true}),className:V(j,{[`${B}-group-vertical`]:L}),style:h,onMouseEnter:I,onMouseLeave:$,onFocus:E,onBlur:P,id:g,ref:t},f__namespace.createElement(uL,{value:Y},W))}),EL=f__namespace.memo($L),IL=(e,t)=>{const{getPrefixCls:n}=f__namespace.useContext(ot),{prefixCls:r,...o}=e,i=n("radio",r);return f__namespace.createElement(dL,{value:"button"},f__namespace.createElement(Bf,{prefixCls:i,...o,type:"radio",ref:t}))},PL=f__namespace.forwardRef(IL),fr=Bf;fr.Button=PL;fr.Group=EL;fr.__ANT_RADIO=true;var ih={exports:{}},Dl={};var Pw;function NL(){if(Pw)return Dl;Pw=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 Dl.Fragment=n,Dl.jsx=s,Dl.jsxs=s,Dl}var Nw;function ML(){return Nw||(Nw=1,ih.exports=NL()),ih.exports}var Wc=ML();function RL(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 AL(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 TL=(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(AL(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var i=RL(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})(),Kn="-ms-",Lf="-moz-",Vt="-webkit-",rP="comm",py="rule",hy="decl",OL="@import",oP="@keyframes",FL="@layer",BL=Math.abs,Vm=String.fromCharCode,LL=Object.assign;function DL(e,t){return Bn(e,0)^45?(((t<<2^Bn(e,0))<<2^Bn(e,1))<<2^Bn(e,2))<<2^Bn(e,3):0}function iP(e){return e.trim()}function kL(e,t){return (e=t.exec(e))?e[0]:e}function jt(e,t,n){return e.replace(t,n)}function Ob(e,t){return e.indexOf(t)}function Bn(e,t){return e.charCodeAt(t)|0}function qc(e,t,n){return e.slice(t,n)}function Eo(e){return e.length}function gy(e){return e.length}function Sd(e,t){return t.push(e),e}function _L(e,t){return e.map(t).join("")}var jm=1,Ka=1,sP=0,gr=0,bn=0,cl="";function Wm(e,t,n,r,o,i,s){return {value:e,root:t,parent:n,type:r,props:o,children:i,line:jm,column:Ka,length:s,return:""}}function kl(e,t){return LL(Wm("",null,null,"",null,null,0),e,{length:-e.length},t)}function zL(){return bn}function HL(){return bn=gr>0?Bn(cl,--gr):0,Ka--,bn===10&&(Ka=1,jm--),bn}function Rr(){return bn=gr<sP?Bn(cl,gr++):0,Ka++,bn===10&&(Ka=1,jm++),bn}function Lo(){return Bn(cl,gr)}function tf(){return gr}function Mu(e,t){return qc(cl,e,t)}function Uc(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 aP(e){return jm=Ka=1,sP=Eo(cl=e),gr=0,[]}function lP(e){return cl="",e}function nf(e){return iP(Mu(gr-1,Fb(e===91?e+2:e===40?e+1:e)))}function VL(e){for(;(bn=Lo())&&bn<33;)Rr();return Uc(e)>2||Uc(bn)>3?"":" "}function jL(e,t){for(;--t&&Rr()&&!(bn<48||bn>102||bn>57&&bn<65||bn>70&&bn<97););return Mu(e,tf()+(t<6&&Lo()==32&&Rr()==32))}function Fb(e){for(;Rr();)switch(bn){case e:return gr;case 34:case 39:e!==34&&e!==39&&Fb(bn);break;case 40:e===41&&Fb(e);break;case 92:Rr();break}return gr}function WL(e,t){for(;Rr()&&e+bn!==57;)if(e+bn===84&&Lo()===47)break;return "/*"+Mu(t,gr-1)+"*"+Vm(e===47?e:Rr())}function qL(e){for(;!Uc(Lo());)Rr();return Mu(e,gr)}function UL(e){return lP(rf("",null,null,null,[""],e=aP(e),0,[0],e))}function rf(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&&Bn($,d-1)==58){Ob($+=jt(nf(C),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:$+=nf(C);break;case 9:case 10:case 13:case 32:$+=VL(h);break;case 92:$+=jL(tf()-1,7);continue;case 47:switch(Lo()){case 42:case 47:Sd(GL(WL(Rr(),tf()),t,n),l);break;default:$+="/";}break;case 123*g:a[c++]=Eo($)*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&&Eo($)-d&&Sd(p>32?Rw($+";",r,n,d-1):Rw(jt($," ","")+";",r,n,d-2),l);break;case 59:$+=";";default:if(Sd(I=Mw($,t,n,c,u,o,a,x,w=[],S=[],d),i),C===123)if(u===0)rf($,t,I,I,w,i,d,a,S);else switch(m===99&&Bn($,3)===110?100:m){case 100:case 108:case 109:case 115:rf(e,I,I,r&&Sd(Mw(e,I,I,0,0,o,a,x,o,w=[],d),S),o,S,d,a,r?w:S);break;default:rf($,I,I,I,[""],S,0,a,S);}}c=u=p=0,g=y=1,x=$="",d=s;break;case 58:d=1+Eo($),p=h;default:if(g<1){if(C==123)--g;else if(C==125&&g++==0&&HL()==125)continue}switch($+=Vm(C),C*g){case 38:y=u>0?1:($+="\f",-1);break;case 44:a[c++]=(Eo($)-1)*y,y=1;break;case 64:Lo()===45&&($+=nf(Rr())),m=Lo(),u=d=Eo(x=$+=qL(tf())),C++;break;case 45:h===45&&Eo($)==2&&(g=0);}}return i}function Mw(e,t,n,r,o,i,s,a,l,c,u){for(var d=o-1,m=o===0?i:[""],p=gy(m),h=0,g=0,b=0;h<r;++h)for(var y=0,C=qc(e,d+1,d=BL(g=s[h])),x=e;y<p;++y)(x=iP(g>0?m[y]+" "+C:jt(C,/&\f/g,m[y])))&&(l[b++]=x);return Wm(e,t,n,o===0?py:a,l,c,u)}function GL(e,t,n){return Wm(e,t,n,rP,Vm(zL()),qc(e,2,-2),0)}function Rw(e,t,n,r){return Wm(e,t,n,hy,qc(e,0,r),qc(e,r+1,-1),r)}function Ta(e,t){for(var n="",r=gy(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function KL(e,t,n,r){switch(e.type){case FL:if(e.children.length)break;case OL:case hy:return e.return=e.return||e.value;case rP:return "";case oP:return e.return=e.value+"{"+Ta(e.children,r)+"}";case py:e.value=e.props.join(",");}return Eo(n=Ta(e.children,r))?e.return=e.value+"{"+n+"}":""}function XL(e){var t=gy(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 YL(e){return function(t){t.root||(t=t.return)&&e(t);}}function QL(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var ZL=function(t,n,r){for(var o=0,i=0;o=i,i=Lo(),o===38&&i===12&&(n[r]=1),!Uc(i);)Rr();return Mu(t,gr)},JL=function(t,n){var r=-1,o=44;do switch(Uc(o)){case 0:o===38&&Lo()===12&&(n[r]=1),t[r]+=ZL(gr-1,n,r);break;case 2:t[r]+=nf(o);break;case 4:if(o===44){t[++r]=Lo()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Vm(o);}while(o=Rr());return t},eD=function(t,n){return lP(JL(aP(t),n))},Aw=new WeakMap,tD=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&&!Aw.get(r))&&!o){Aw.set(t,true);for(var i=[],s=eD(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];}}},nD=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="");}};function cP(e,t){switch(DL(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+Lf+e+Kn+e+e;case 6828:case 4268:return Vt+e+Kn+e+e;case 6165:return Vt+e+Kn+"flex-"+e+e;case 5187:return Vt+e+jt(e,/(\w+).+(:[^]+)/,Vt+"box-$1$2"+Kn+"flex-$1$2")+e;case 5443:return Vt+e+Kn+"flex-item-"+jt(e,/flex-|-self/,"")+e;case 4675:return Vt+e+Kn+"flex-line-pack"+jt(e,/align-content|flex-|-self/,"")+e;case 5548:return Vt+e+Kn+jt(e,"shrink","negative")+e;case 5292:return Vt+e+Kn+jt(e,"basis","preferred-size")+e;case 6060:return Vt+"box-"+jt(e,"-grow","")+Vt+e+Kn+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"+Kn+"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(Eo(e)-1-t>6)switch(Bn(e,t+1)){case 109:if(Bn(e,t+4)!==45)break;case 102:return jt(e,/(.+:)(.+)-([^]+)/,"$1"+Vt+"$2-$3$1"+Lf+(Bn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return ~Ob(e,"stretch")?cP(jt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Bn(e,t+1)!==115)break;case 6444:switch(Bn(e,Eo(e)-3-(~Ob(e,"!important")&&10))){case 107:return jt(e,":",":"+Vt)+e;case 101:return jt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Vt+(Bn(e,14)===45?"inline-":"")+"box$3$1"+Vt+"$2$3$1"+Kn+"$2box$3")+e}break;case 5936:switch(Bn(e,t+11)){case 114:return Vt+e+Kn+jt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Vt+e+Kn+jt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Vt+e+Kn+jt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Vt+e+Kn+e+e}return e}var rD=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case hy:t.return=cP(t.value,t.length);break;case oP:return Ta([kl(t,{value:jt(t.value,"@","@"+Vt)})],o);case py:if(t.length)return _L(t.props,function(i){switch(kL(i,/(::plac\w+|:read-\w+)/)){case ":read-only":case ":read-write":return Ta([kl(t,{props:[jt(i,/:(read-\w+)/,":"+Lf+"$1")]})],o);case "::placeholder":return Ta([kl(t,{props:[jt(i,/:(plac\w+)/,":"+Vt+"input-$1")]}),kl(t,{props:[jt(i,/:(plac\w+)/,":"+Lf+"$1")]}),kl(t,{props:[jt(i,/:(plac\w+)/,Kn+"input-$1")]})],o)}return ""})}},oD=[rD],uP=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||oD,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=[tD,nD];{var u,d=[KL,YL(function(g){u.insert(g);})],m=XL(c.concat(o,d)),p=function(b){return Ta(UL(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 TL({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 sh={exports:{}},Gt={};var Tw;function iD(){if(Tw)return Gt;Tw=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 Ow;function sD(){return Ow||(Ow=1,sh.exports=iD()),sh.exports}var ah,Fw;function aD(){if(Fw)return ah;Fw=1;var e=sD(),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 ah=p,ah}aD();var lD=true;function by(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ");}),r}var dP=function(t,n,r){var o=t.key+"-"+n.name;(r===false||lD===false)&&t.registered[o]===void 0&&(t.registered[o]=n.styles);},vy=function(t,n,r){dP(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 cD(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 uD={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},dD=/[A-Z]|^ms/g,fD=/_EMO_([^_]+?)_([^]*?)_EMO_/g,fP=function(t){return t.charCodeAt(1)===45},Bw=function(t){return t!=null&&typeof t!="boolean"},lh=QL(function(e){return fP(e)?e:e.replace(dD,"-$&").toLowerCase()}),Lw=function(t,n){switch(t){case "animation":case "animationName":if(typeof n=="string")return n.replace(fD,function(r,o,i){return Io={name:o,styles:i,next:Io},o})}return uD[t]!==1&&!fP(t)&&typeof n=="number"&&n!==0?n+"px":n};function Gc(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 Io={name:o.name,styles:o.styles,next:Io},o.name;var i=n;if(i.styles!==void 0){var s=i.next;if(s!==void 0)for(;s!==void 0;)Io={name:s.name,styles:s.styles,next:Io},s=s.next;var a=i.styles+";";return a}return mD(e,t,n)}case "function":{if(e!==void 0){var l=Io,c=n(e);return Io=l,Gc(e,t,c)}break}}var u=n;if(t==null)return u;var d=t[u];return d!==void 0?d:u}function mD(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Gc(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]+"}":Bw(a)&&(r+=lh(i)+":"+Lw(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++)Bw(s[l])&&(r+=lh(i)+":"+Lw(i,s[l])+";");else {var c=Gc(e,t,s);switch(i){case "animation":case "animationName":{r+=lh(i)+":"+c+";";break}default:r+=i+"{"+c+"}";}}}return r}var Dw=/label:\s*([^\s;{]+)\s*(;|$)/g,Io;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="";Io=void 0;var i=e[0];if(i==null||i.raw===void 0)r=false,o+=Gc(n,t,i);else {var s=i;o+=s[0];}for(var a=1;a<e.length;a++)if(o+=Gc(n,t,e[a]),r){var l=i;o+=l[a];}Dw.lastIndex=0;for(var c="",u;(u=Dw.exec(o))!==null;)c+="-"+u[1];var d=cD(o)+c;return {name:d,styles:o,next:Io}}var pD=function(t){return t()},mP=f__namespace.useInsertionEffect?f__namespace.useInsertionEffect:false,hD=mP||pD,kw=mP||f__namespace.useLayoutEffect,pP=f__namespace.createContext(typeof HTMLElement<"u"?uP({key:"css"}):null),gD=pP.Provider,hP=function(t){return f.forwardRef(function(n,r){var o=f.useContext(pP);return t(n,o,r)})},gP=f__namespace.createContext({}),Ru={}.hasOwnProperty,Bb="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",yy=function(t,n){var r={};for(var o in n)Ru.call(n,o)&&(r[o]=n[o]);return r[Bb]=t,r},bD=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return dP(n,r,o),hD(function(){return vy(n,r,o)}),null},vD=hP(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[Bb],i=[r],s="";typeof e.className=="string"?s=by(t.registered,i,e.className):e.className!=null&&(s=e.className+" ");var a=Oa(i,void 0,f__namespace.useContext(gP));s+=t.key+"-"+a.name;var l={};for(var c in e)Ru.call(e,c)&&c!=="css"&&c!==Bb&&(l[c]=e[c]);return l.className=s,n&&(l.ref=n),f__namespace.createElement(f__namespace.Fragment,null,f__namespace.createElement(bD,{cache:t,serialized:a,isStringTag:typeof o=="string"}),f__namespace.createElement(o,l))}),Cy=vD,we=Wc.Fragment,v=function(t,n,r){return Ru.call(n,"css")?Wc.jsx(Cy,yy(t,n),r):Wc.jsx(t,n,r)},F=function(t,n,r){return Ru.call(n,"css")?Wc.jsxs(Cy,yy(t,n),r):Wc.jsxs(t,n,r)};function bP(e){return Array.from(new Set(e))}function yD(e,t){if(!e)throw Error(t)}const vP=String.raw,ls=(e,...t)=>new RegExp(vP(e,...t)),_w=vP`(\d+(\.\d+)?)?(xs|sm|md|lg|xl)`,$d="(solid|dashed|dotted|double|none|hidden)",CD=[[[...["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"],[ls`^(text|text-size|font-size)-(\d+|${_w}$)`,"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"],[ls`^b(?:order)?-${$d}$`,"border-style"],[ls`^b(?:order)?-([tblrxyse])-${$d}$`,(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",ls`^outline-${$d}$`],"outline-style"],[ls`^divide-${$d}$`,"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"]),ls`^shadow-${_w}$`],"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=>[ls`^${e}($|-)`,e])],Lb=new Map,yP=new Map;for(let[e,t]of CD){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);Lb.set(i,s);}),o.forEach(i=>{yP.set(i,t);});}function xD(e){if(Lb.has(e))return Lb.get(e);for(let[t,n]of yP.entries())if(t.test(e)){let r=t.exec(e);return typeof n=="string"?n:n(e,r)}}function wD(e){return SD.map(t=>typeof t=="string"?[t,t]:t).find(([t,n])=>e.startsWith(`${t}-`))}const SD=["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 ch(e){return zw.has(e)?zw.get(e):e}const zw=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 yD(e.endsWith("-"),"prefix must end with `-`"),t.map(n=>e+n)}function $D(e){return typeof e=="boolean"?[]:bP((e||"").split(" ").map(t=>t.trim()).filter(Boolean))}function CP(...e){let t=new Map;return e.map($D).flat().filter(Boolean).forEach(r=>ED(r,t)),bP(Array.from(t.values())).join(" ")}function ED(e,t){let n=e,r;function o(d){[d].flat().forEach(m=>{t.set(r?r+m:m,n);});}function i(){let d=xD(e);if(d)return o(d),true}function s(){let d=wD(e);if(!d)return;let[m,p]=d,h=ch(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=ch(e.slice(0,p));return o(h),true}function l(){return o(ch(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(()=>CP(...e),[...e])}const xy=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:V(`${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},kr=[0,0],ID={left:{points:["cr","cl"],overflow:fa,offset:[-4,0],targetOffset:kr},right:{points:["cl","cr"],overflow:fa,offset:[4,0],targetOffset:kr},top:{points:["bc","tc"],overflow:da,offset:[0,-4],targetOffset:kr},bottom:{points:["tc","bc"],overflow:da,offset:[0,4],targetOffset:kr},topLeft:{points:["bl","tl"],overflow:da,offset:[0,-4],targetOffset:kr},leftTop:{points:["tr","tl"],overflow:fa,offset:[-4,0],targetOffset:kr},topRight:{points:["br","tr"],overflow:da,offset:[0,-4],targetOffset:kr},rightTop:{points:["tl","tr"],overflow:fa,offset:[4,0],targetOffset:kr},bottomRight:{points:["tr","br"],overflow:da,offset:[0,4],targetOffset:kr},rightBottom:{points:["bl","br"],overflow:fa,offset:[4,0],targetOffset:kr},bottomLeft:{points:["tl","bl"],overflow:da,offset:[0,4],targetOffset:kr},leftBottom:{points:["br","bl"],overflow:fa,offset:[-4,0],targetOffset:kr}};function Db(){return Db=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},Db.apply(this,arguments)}const PD=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:V(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),D={"aria-describedby":b&&N?I:void 0};return f__namespace.cloneElement(A,D)};return f__namespace.createElement(Dm,Db({popupClassName:x?.root,prefixCls:i,popup:f__namespace.createElement(xy,{key:"content",prefixCls:i,id:I,classNames:x,styles:w},b),action:n,builtinPlacements:ID,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)}),ND=e=>{const{componentCls:t}=e;return {[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"}}}},MD=wt(["Space","Compact"],e=>[ND(e)],()=>({}),{resetStyle:false}),qm=f__namespace.createContext(null),li=(e,t)=>{const n=f__namespace.useContext(qm),r=f__namespace.useMemo(()=>{if(!n)return "";const{compactDirection:o,isFirstItem:i,isLastItem:s}=n,a=o==="vertical"?"-vertical-":"-";return V(`${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}},RD=e=>{const{children:t}=e;return f__namespace.createElement(qm.Provider,{value:null},t)},AD=e=>{const{children:t,...n}=e;return f__namespace.createElement(qm.Provider,{value:f__namespace.useMemo(()=>n,[n])},t)},wy=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=Hn(I=>r??I),b=t("space-compact",a),[y]=MD(b),C=V(b,y,{[`${b}-rtl`]:n==="rtl",[`${b}-block`]:s,[`${b}-vertical`]:h},l,c),x=f__namespace.useContext(qm),w=hr(u),S=f__namespace.useMemo(()=>w.map((I,$)=>{const E=I?.key||`${b}-item-${$}`;return f__namespace.createElement(AD,{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)},zi=e=>{const{space:t,form:n,children:r}=e;if(!Dn(r))return null;let o=r;return n&&(o=f.createElement(sL,{override:true,status:true},o)),t&&(o=f.createElement(RD,null,o)),o},uh=()=>({height:0,opacity:0}),Hw=e=>{const{scrollHeight:t}=e;return {height:t,opacity:1}},TD=e=>({height:e?e.offsetHeight:0}),dh=(e,t)=>t?.deadline===true||t.propertyName==="height",xP=(e=Hc)=>({motionName:`${e}-motion-collapse`,onAppearStart:uh,onEnterStart:uh,onAppearActive:Hw,onEnterActive:Hw,onLeaveStart:TD,onLeaveActive:uh,onAppearEnd:dh,onEnterEnd:dh,onLeaveEnd:dh,motionDeadline:500}),Hi=(e,t,n)=>n!==void 0?n:`${e}-${t}`;function Sy(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 OD=(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"}}},wP=8;function Um(e){const{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return {arrowOffsetHorizontal:r,arrowOffsetVertical:n?wP:r}}function Ed(e,t){return e?t:{}}function $y(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",...OD(e,t,o),"&:before":{background:t}}],...Ed(!!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}}}}),...Ed(!!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}}}}),...Ed(!!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}}),...Ed(!!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 FD(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 Vw={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"]}},BD={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"]}},LD=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function SP(e){const{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:o,borderRadius:i,visibleFirst:s}=e,a=t/2,l={},c=Um({contentRadius:i,limitVerticalRadius:true});return Object.keys(Vw).forEach(u=>{const m={...r&&BD[u]||Vw[u],offset:[0,0],dynamicInset:true};switch(l[u]=m,LD.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=FD(u,c,t,n),s&&(m.htmlRegion="visibleFirst");}),l}const Ey=(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])},$P=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`}}}),DD=e=>({animationDuration:e,animationFillMode:"both"}),kD=e=>({animationDuration:e,animationFillMode:"both"}),Gm=(e,t,n,r,o=false)=>{const i=o?"&":"";return {[`
      ${i}${e}-enter,
      ${i}${e}-appear
    `]:{...DD(r),animationPlayState:"paused"},[`${i}${e}-leave`]:{...kD(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"}}},_D=new ht("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),zD=new ht("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),Iy=(e,t=false)=>{const{antCls:n}=e,r=`${n}-fade`,o=t?"&":"";return [Gm(r,_D,zD,e.motionDurationMid,t),{[`
        ${o}${r}-enter,
        ${o}${r}-appear
      `]:{opacity:0,animationTimingFunction:"linear"},[`${o}${r}-leave`]:{animationTimingFunction:"linear"}}]},HD=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}}),VD=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}}),jD=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}}),WD=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}}),qD=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}}),UD=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}}),GD=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}}),KD=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}}),XD={"move-up":{inKeyframes:GD,outKeyframes:KD},"move-down":{inKeyframes:HD,outKeyframes:VD},"move-left":{inKeyframes:jD,outKeyframes:WD},"move-right":{inKeyframes:qD,outKeyframes:UD}},Df=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=XD[t];return [Gm(r,o,i,e.motionDurationMid),{[`
        ${r}-enter,
        ${r}-appear
      `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},Py=new ht("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Ny=new ht("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),My=new ht("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Ry=new ht("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),YD=new ht("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),QD=new ht("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),ZD=new ht("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),JD=new ht("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),ek={"slide-up":{inKeyframes:Py,outKeyframes:Ny},"slide-down":{inKeyframes:My,outKeyframes:Ry},"slide-left":{inKeyframes:YD,outKeyframes:QD},"slide-right":{inKeyframes:ZD,outKeyframes:JD}},Vi=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=ek[t];return [Gm(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}}]},tk=new ht("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),nk=new ht("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),jw=new ht("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Ww=new ht("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),rk=new ht("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),ok=new ht("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),ik=new ht("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),sk=new ht("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),ak=new ht("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),lk=new ht("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),ck=new ht("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),uk=new ht("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),dk={zoom:{inKeyframes:tk,outKeyframes:nk},"zoom-big":{inKeyframes:jw,outKeyframes:Ww},"zoom-big-fast":{inKeyframes:jw,outKeyframes:Ww},"zoom-left":{inKeyframes:ik,outKeyframes:sk},"zoom-right":{inKeyframes:ak,outKeyframes:lk},"zoom-up":{inKeyframes:rk,outKeyframes:ok},"zoom-down":{inKeyframes:ck,outKeyframes:uk}},Au=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=dk[t];return [Gm(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}}]},fk=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]:{...Bt(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,Iy(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,wP)}},[`${n}-content`]:{position:"relative"},..._m(e,(C,{darkColor:x})=>({[`&${n}-${C}`]:{[`${n}-container`]:{backgroundColor:x},[`${n}-arrow`]:{"--antd-arrow-background-color":x}}})),"&-rtl":{direction:"rtl"}}},$y(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}`}}}]},mk=e=>({zIndexPopup:e.zIndexPopupBase+70,...Um({contentRadius:e.borderRadius,limitVerticalRadius:true}),...Sy(vt(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))}),EP=(e,t,n=true)=>wt("Tooltip",o=>{const{borderRadius:i,colorTextLightSolid:s,colorBgSpotlight:a}=o,l=vt(o,{tooltipMaxWidth:250,tooltipColor:s,tooltipBorderRadius:i,tooltipBg:a});return [fk(l),Au(o,"zoom-big-fast")]},mk,{resetStyle:false,injectStyle:n})(e,t),pk=_i.map(e=>`${e}-inverse`),hk=["success","processing","error","default","warning"];function Km(e,t=true){return t?[].concat(Et(pk),Et(_i)).includes(e):_i.includes(e)}function gk(e){return hk.includes(e)}const fh=e=>Math.round(Number(e||0)),bk=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 go extends Ft{constructor(t){super(bk(t));}toHsbString(){const t=this.toHsb(),n=fh(t.s*100),r=fh(t.b*100),o=fh(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 vk="rc-color-picker",Fa=e=>e instanceof go?e:new go(e),yk=Fa("#1677ff"),IP=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})},PP=(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}}},Ay=({color:e,prefixCls:t,className:n,style:r,onClick:o})=>{const i=`${t}-color-block`;return f.createElement("div",{className:V(i,n),style:r,onClick:o},f.createElement("div",{className:`${i}-inner`,style:{background:e}}))};function Ck(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 NP(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}=Ck(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,D=Math.max(0,Math.min(x-S,$))-N,R={x:A,y:r==="x"?c.y:D};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 MP=({size:e="default",color:t,prefixCls:n})=>f.createElement("div",{className:V(`${n}-handler`,{[`${n}-handler-sm`]:e==="small"}),style:{backgroundColor:t}}),RP=({children:e,style:t,prefixCls:n})=>f.createElement("div",{className:`${n}-palette`,style:{position:"relative",...t}},e),AP=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)}),xk=({color:e,onChange:t,prefixCls:n,onChangeComplete:r,disabled:o})=>{const i=f.useRef(),s=f.useRef(),a=f.useRef(e),l=at(d=>{const m=IP({offset:d,targetRef:s,containerRef:i,color:e});a.current=m,t(m);}),[c,u]=NP({color:e,containerRef:i,targetRef:s,calculate:()=>PP(e),onDragChange:l,onDragChangeComplete:()=>r?.(a.current),disabledDrag:o});return f.createElement("div",{ref:i,className:`${n}-select`,onMouseDown:u,onTouchStart:u},f.createElement(RP,{prefixCls:n},f.createElement(AP,{x:c.x,y:c.y,ref:s},f.createElement(MP,{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))"}})))},wk=(e,t)=>{const[n,r]=Lt(e,t);return [f.useMemo(()=>Fa(n),[n]),r]},Sk=({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 go(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)},$k=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=at(y=>{const C=IP({offset:y,targetRef:c,containerRef:l,color:s,type:a});u.current=C,o(d(C));}),[p,h]=NP({color:s,targetRef:c,containerRef:l,calculate:()=>PP(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 go(y)}return s},[s,a]),b=f.useMemo(()=>n.map(y=>`${y.color} ${y.percent}%`),[n]);return f.createElement("div",{ref:l,className:V(`${t}-slider`,`${t}-slider-${a}`),onMouseDown:h,onTouchStart:h},f.createElement(RP,{prefixCls:t},f.createElement(AP,{x:p.x,y:p.y,ref:c},f.createElement(MP,{size:"small",color:g.toHexString(),prefixCls:t})),f.createElement(Sk,{colors:b,type:a,prefixCls:t})))};function Ek(e){return f__namespace.useMemo(()=>{const{slider:t}=e||{};return [t||$k]},[e])}function bc(){return bc=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},bc.apply(this,arguments)}const Ik=[{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}],Pk=f.forwardRef((e,t)=>{const{value:n,defaultValue:r,prefixCls:o=vk,onChange:i,onChangeComplete:s,className:a,style:l,panelRender:c,disabledAlpha:u=false,disabled:d=false,components:m}=e,[p]=Ek(m),[h,g]=wk(r||yk,n),b=f.useMemo(()=>h.setA(1).toRgbString(),[h]),y=(N,A)=>{n||g(N),i?.(N,A);},C=N=>new go(h.setHue(N)),x=N=>new go(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=V(`${o}-panel`,a,{[`${o}-panel-disabled`]:d}),P={prefixCls:o,disabled:d,color:h},M=f.createElement(f.Fragment,null,f.createElement(xk,bc({onChange:y},P,{onChangeComplete:s})),f.createElement("div",{className:`${o}-slider-container`},f.createElement("div",{className:V(`${o}-slider-group`,{[`${o}-slider-group-disabled-alpha`]:u})},f.createElement(p,bc({},P,{type:"hue",colors:Ik,min:0,max:359,value:h.getHue(),onChange:w,onChangeComplete:I})),!u&&f.createElement(p,bc({},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(Ay,{color:h.toRgbString(),prefixCls:o})));return f.createElement("div",{className:E,style:l,ref:t},typeof c=="function"?c(M):M)}),sc=(e,t)=>e?.replace(/[^\w/]/g,"").slice(0,t?8:6)||"",Nk=(e,t)=>e?sc(e,t):"";let mr=(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 go(this.colors[0].color.metaColor)):this.metaColor=new go(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 Nk(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 mr?e:new mr(e),of=e=>Math.round(Number(e||0)),Ty=e=>of(e.toHsb().a*100),sf=(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)},TP=(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 go(s),d=new go(a);return u.mix(d,c).toRgbString()}}return ""};function OP(e,t){const n=Km(t),r=V({[`${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 Mk=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]=EP(u,d),h=OP(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=V(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(xy,{...e,className:m,prefixCls:u,classNames:C,styles:x},o))},Rk=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,[,D]=Tn(),{getPopupContainer:R,getPrefixCls:B,direction:H,className:k,style:z,classNames:_,styles:W,arrow:O,trigger:L}=$t("tooltip"),j=Ey(l,O),Y=j.show,q=p||L||"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]=Lt(e.defaultOpen??false,e.open),G=!d&&!m&&d!==0,ee=Qe=>{Q(G?false:Qe),!G&&E&&E(Qe);},oe=f__namespace.useMemo(()=>h||SP({arrowPointAtCenter:j?.pointAtCenter??false,autoAdjustOverflow:g,arrowWidth:Y?D.sizePopupArrow:0,borderRadius:D.borderRadius,offset:D.marginXXS,visibleFirst:true}),[j,h,D,Y,g]),re=f__namespace.useMemo(()=>d===0?d:m||d||"",[m,d]),he=f__namespace.createElement(zi,{space:true},typeof re=="function"?re():re),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([_,$],[W,I],{props:Z}),ue=B("tooltip",n),Ee=B(),Re=e["data-popover-inject"];let be=J;!("open"in e)&&G&&(be=false);const le=f__namespace.isValidElement(s)&&!ZI(s)?s:f__namespace.createElement("span",null,s),ae=le.props,ye=!ae.className||typeof ae.className=="string"?V(ae.className,r||`${ue}-open`):ae.className,Se=sn(ue),[He,Le]=EP(ue,Se,!Re),Ae=OP(ue,i),_e=Ae.arrowStyle,Te=V(Se,He,Le),Ce=V(N,{[`${ue}-rtl`]:H==="rtl"},Ae.className,S,Te,k,te.root),[Pe,De]=Us("Tooltip",A.zIndex),Oe={...ce.container,...P,...Ae.overlayStyle},Ne=f__namespace.createElement(PD,{unique:true,...A,trigger:q,zIndex:Pe,showArrow:Y,placement:C,mouseEnterDelay:x,mouseLeaveDelay:w,prefixCls:ue,classNames:{root:Ce,container:te.container,arrow:te.arrow,uniqueContainer:V(Te,te.container)},styles:{root:{..._e,...ce.root,...z,...M},container:Oe,uniqueContainer:Oe,arrow:ce.arrow},getTooltipContainer:y||o||R,ref:U,builtinPlacements:oe,overlay:he,visible:be,onVisibleChange:ee,afterVisibleChange:a,arrowContent:f__namespace.createElement("span",{className:`${ue}-arrow-content`}),motion:{motionName:Hi(Ee,"zoom-big-fast",typeof b?.motionName=="string"?b?.motionName:void 0),motionDeadline:1e3},destroyOnHidden:u??!!c},be?Rn(le,{className:ye}):le);return f__namespace.createElement(Bm.Provider,{value:De},Ne)}),Qi=Rk;Qi._InternalPanelDoNotUseOrYouWillBeFired=Mk;Qi.UniqueProvider=OI;function Jt(e){return v(Qi,{...e,styles:{...e.styles,root:{width:"max-content",maxWidth:"50vw",...e.styles?.root}},children:e.children})}const Ak=({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"})]}),Tk=f.forwardRef(Ak),Ok=({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"})]}),Fk=f.forwardRef(Ok),Bk=({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"})]}),Lk=f.forwardRef(Bk);var FP=(e=>(e.Center="center",e.Left="left",e.Right="right",e))(FP||{});const BP="w-720px",Dk=(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 kk({className:e}){const{grid:{gridDisplayMode:t,twoColumnModeAlign:n}}=Mt();return F(fr.Group,{className:e,disabled:t!==Os.TwoColumnGrid,buttonStyle:"solid",size:"small",value:n,onChange:r=>{Ue.grid.twoColumnModeAlign=r.target.value;},children:[v(fr.Button,{value:"left",className:"inline-flex-center",children:v(Tk,{className:"size-16px"})}),v(fr.Button,{value:"center",className:"inline-flex-center",children:v(Fk,{className:"size-16px"})}),v(fr.Button,{value:"right",className:"inline-flex-center",children:v(Lk,{className:"size-16px"})})]})}const _k=({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"})]}),zk=f.forwardRef(_k),Hk=({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"})]}),Vk=f.forwardRef(Hk);var Os=(e=>(e.NormalGrid="grid",e.List="list",e.TwoColumnGrid="two-column-grid",e.CenterEmptyGrid="center-empty-grid",e))(Os||{});function LP(e){return {usingListMode:e==="list",usingTwoColumnMode:e==="two-column-grid",usingCenterEmptyMode:e==="center-empty-grid"}}function DP(){const{gridDisplayMode:e}=rt(Ue.grid);return LP(e)}function Oy(e){return e==="list"}function jk(){return rt(Ue.grid).gridDisplayMode==="list"}function Wk({className:e}){const{gridDisplayMode:t}=rt(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(fr.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(zk,{className:"mx-4px size-16px cursor-pointer"}),"网格"]})})},{value:"list",label:F(we,{children:[v(Vk,{className:"mx-4px size-16px cursor-pointer"}),"列表"]})},{value:"two-column-grid",label:F(we,{children:["双列模式",v(kk,{className:"ml-5px"})]})},{value:"center-empty-grid",label:v(we,{children:v(Jt,{title:"网格中间不显示卡片",children:"中空模式"})})}]})}var ze=(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))(ze||{}),vn=(e=>(e.PopularGeneral="popular-general",e.PopularWeekly="popular-weekly",e.Rank="ranking",e))(vn||{});const kb=Object.values(ze),qk=["space-upload"],Fy=LE(kb,qk),bi=new WeakMap,fs=new WeakMap,Yo=new WeakMap;var Uk={};const kf=Symbol("anyProducer"),qw=Promise.resolve(),_f=Symbol("listenerAdded"),zf=Symbol("listenerRemoved");let Hf=false,mh=false;const Vf=e=>typeof e=="string"||typeof e=="symbol"||typeof e=="number";function ma(e){if(!Vf(e))throw new TypeError("`eventName` must be a string, symbol, or number")}function Id(e){if(typeof e!="function")throw new TypeError("listener must be a function")}function pa(e,t){const n=fs.get(e);if(n.has(t))return n.get(t)}function vc(e,t){const n=Vf(t)?t:kf,r=Yo.get(e);if(r.has(n))return r.get(n)}function Gk(e,t,n){const r=Yo.get(e);if(r.has(t))for(const o of r.get(t))o.enqueue(n);if(r.has(kf)){const o=Promise.all([t,n]);for(const i of r.get(kf))i.enqueue(o);}}function Uw(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=vc(e,s);a||(a=new Set,Yo.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=vc(e,a);l&&(l.delete(i),l.size===0&&Yo.get(e).delete(a));}return r(),arguments.length>0?{done:true,value:await s}:{done:true}},[Symbol.asyncIterator](){return this}}}function Gw(e){if(e===void 0)return Kw;if(!Array.isArray(e))throw new TypeError("`methodNames` must be an array of strings");for(const t of e)if(!Kw.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===_f||e===zf;function Pd(e,t,n){if(xa(t))try{Hf=!0,e.emit(t,n);}finally{Hf=false;}}class Or{static mixin(t,n){return n=Gw(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 Uk!="object")return mh;const{env:t}=globalThis.process??{env:{}};return t.DEBUG==="emittery"||t.DEBUG==="*"||mh}static set isDebugEnabled(t){mh=t;}constructor(t={}){bi.set(this,new Set),fs.set(this,new Map),Yo.set(this,new Map),Yo.get(this).set(kf,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}={}){Id(n),t=Array.isArray(t)?t:[t];for(const i of t){ma(i);let s=pa(this,i);s||(s=new Set,fs.get(this).set(i,s)),s.add(n),this.logIfDebugEnabled("subscribe",i,void 0),xa(i)||Pd(this,_f,{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){Id(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&&fs.get(this).delete(r)),this.logIfDebugEnabled("unsubscribe",r,void 0),xa(r)||Pd(this,zf,{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 Uw(this,t)}async emit(t,n){if(ma(t),xa(t)&&!Hf)throw new TypeError("`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`");this.logIfDebugEnabled("emit",t,n),Gk(this,t,n);const r=pa(this,t)??new Set,o=bi.get(this),i=[...r],s=xa(t)?[]:[...o];await qw,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)&&!Hf)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 qw;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}={}){Id(t),this.logIfDebugEnabled("subscribeAny",void 0,void 0),bi.get(this).add(t),Pd(this,_f,{listener:t});const r=()=>{this.offAny(t),n?.removeEventListener("abort",r);};return n?.addEventListener("abort",r,{once:true}),n?.aborted&&r(),r}anyEvent(){return Uw(this)}offAny(t){Id(t),this.logIfDebugEnabled("unsubscribeAny",void 0,void 0),Pd(this,zf,{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),Vf(n)){const r=pa(this,n);r&&r.clear();const o=vc(this,n);if(o){for(const i of o)i.finish();o.clear();}}else {bi.get(this).clear();for(const[r,o]of fs.get(this).entries())o.clear(),fs.get(this).delete(r);for(const[r,o]of Yo.get(this).entries()){for(const i of o)i.finish();o.clear(),Yo.get(this).delete(r);}}}listenerCount(t){t=Array.isArray(t)?t:[t];let n=0;for(const r of t){if(Vf(r)){n+=bi.get(this).size+(pa(this,r)?.size??0)+(vc(this,r)?.size??0)+(vc(this)?.size??0);continue}r!==void 0&&ma(r),n+=bi.get(this).size;for(const o of fs.get(this).values())n+=o.size;for(const o of Yo.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=Gw(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 Kw=Object.getOwnPropertyNames(Or.prototype).filter(e=>e!=="constructor");Object.defineProperty(Or,"listenerAdded",{value:_f,writable:false,enumerable:true,configurable:false});Object.defineProperty(Or,"listenerRemoved",{value:zf,writable:false,enumerable:true,configurable:false});var Kk={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 _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 Xk=(e,t)=>f__namespace.createElement(on,_b({},e,{ref:t,icon:Kk})),By=f__namespace.forwardRef(Xk);var Yk={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 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 Qk=(e,t)=>f__namespace.createElement(on,zb({},e,{ref:t,icon:Yk})),Tu=f__namespace.forwardRef(Qk);var Zk={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 Hb(){return Hb=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},Hb.apply(this,arguments)}const Jk=(e,t)=>f__namespace.createElement(on,Hb({},e,{ref:t,icon:Zk})),Ou=f__namespace.forwardRef(Jk);var e_={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 Vb(){return Vb=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},Vb.apply(this,arguments)}const t_=(e,t)=>f__namespace.createElement(on,Vb({},e,{ref:t,icon:e_})),Ly=f__namespace.forwardRef(t_),kP=f__namespace.createContext(void 0),n_=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=V(a,{[`${a}-${c}`]:c,[`${a}-rtl`]:n==="rtl"},i,l);return f__namespace.createElement(kP.Provider,{value:o},f__namespace.createElement("div",{...s,className:u}))},Xw=/^[\u4E00-\u9FA5]{2}$/,jb=Xw.test.bind(Xw);function Dy(e){return e==="danger"?{danger:true}:{type:e}}function Yw(e){return typeof e=="string"}function ph(e){return e==="text"||e==="link"}function r_(e,t,n,r){if(!Dn(e)||e==="")return;const o=t?" ":"";return typeof e!="string"&&typeof e!="number"&&Yw(e.type)&&jb(e.props.children)?Rn(e,i=>({...i,children:i.children.split("").join(o),className:r,style:n})):Yw(e)?f.createElement("span",{className:r,style:n},jb(e)?e.split("").join(o):e):ZI(e)?f.createElement("span",{className:r,style:n},e):Rn(e,i=>({...i,className:V(i.className,r)||void 0,style:{...i.style,...n}}))}function o_(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=>r_(s,t,n,r))}["default","primary","danger"].concat(Et(_i));var i_={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 Wb(){return Wb=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},Wb.apply(this,arguments)}const s_=(e,t)=>f__namespace.createElement(on,Wb({},e,{ref:t,icon:i_})),Xm=f__namespace.forwardRef(s_),_P=f.forwardRef((e,t)=>{const{className:n,style:r,children:o,prefixCls:i}=e,s=V(`${i}-icon`,n);return f.createElement("span",{ref:t,className:s,style:r},o)}),Qw=f.forwardRef((e,t)=>{const{prefixCls:n,className:r,style:o,iconClassName:i}=e,s=V(`${n}-loading-icon`,r);return f.createElement(_P,{prefixCls:n,className:s,style:o,ref:t},f.createElement(Xm,{className:i}))}),hh=()=>({width:0,opacity:0,transform:"scale(0)"}),gh=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),a_=e=>{const{prefixCls:t,loading:n,existIcon:r,className:o,style:i,mount:s}=e,a=!!n;return r?f.createElement(Qw,{prefixCls:t,className:o,style:i}):f.createElement(Jn,{visible:a,motionName:`${t}-loading-icon-motion`,motionAppear:!s,motionEnter:!s,motionLeave:!s,removeOnLeave:true,onAppearStart:hh,onAppearActive:gh,onEnterStart:hh,onEnterActive:gh,onLeaveStart:gh,onLeaveActive:hh},({className:l,style:c},u)=>{const d={...i,...c};return f.createElement(Qw,{prefixCls:t,className:V(o,l),style:d,ref:u})})},Zw=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),l_=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}},Zw(`${t}-primary`,o),Zw(`${t}-danger`,i)]}};var c_={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 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 u_=(e,t)=>f__namespace.createElement(on,qb({},e,{ref:t,icon:c_})),Xa=f__namespace.forwardRef(u_),je={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},d_=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:V(`${n}-panel`,{[`${n}-panel-active`]:a,[`${n}-panel-inactive`]:!a},o),style:i,role:l},f.createElement("div",{className:V(`${n}-body`,c?.body),style:u?.body},s)):null}),zP=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:D=>{(D.key==="Enter"||D.keyCode===je.ENTER||D.which===je.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:V(`${u}-expand-icon`,l?.icon),style:c?.icon},["header","icon"].includes(d)?$:{}),E),M=V(`${u}-item`,{[`${u}-item-active`]:o,[`${u}-item-disabled`]:S},a),A={className:V(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:V(`${u}-title`,l?.title),style:c?.title},d==="header"?$:{}),g),I&&f.createElement("div",{className:`${u}-extra`},h)),f.createElement(Jn,dn({visible:o,leavedClassName:`${u}-panel-hidden`},y,{forceRender:s,removeOnLeave:C}),({className:D,style:R},B)=>f.createElement(d_,{ref:B,prefixCls:u,className:D,classNames:l,style:R,styles:c,isActive:o,forceRender:s,role:m?"tabpanel":void 0},x)))}),f_=(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(zP,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)})},m_=(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 p_(e,t,n){return Array.isArray(e)?f_(e,n):hr(t).map((r,o)=>m_(r,o,n))}function Jw(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 h_=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=V(n,s),[C,x]=Lt(m,d),w=Jw(C),S=at(E=>{const P=Jw(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 $=p_(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},rr(e,{aria:true,data:true})),$)}),ky=Object.assign(h_,{Panel:zP}),{Panel:Vce}=ky,g_=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=V({[`${s}-no-arrow`]:!i},o);return f__namespace.createElement(ky.Panel,{ref:t,...e,prefixCls:s,className:a})}),b_=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]:{...Bt(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}}}}}}},v_=e=>{const{componentCls:t}=e,n=`> ${t}-item > ${t}-header ${t}-arrow`;return {[`${t}-rtl`]:{[n]:{transform:"rotate(180deg)"}}}},y_=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}}}},C_=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}}}}}},x_=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"}),w_=wt("Collapse",e=>{const t=vt(e,{collapseHeaderPaddingSM:`${X(e.paddingXS)} ${X(e.paddingSM)}`,collapseHeaderPaddingLG:`${X(e.padding)} ${X(e.paddingLG)}`,collapsePanelBorderRadius:e.borderRadiusLG});return [b_(t),y_(t),C_(t),v_(t),$P(t)]},x_),S_=f__namespace.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r,expandIcon:o,className:i,style:s,classNames:a,styles:l}=$t("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=Hn(L=>g??L??"middle"),P=n("collapse",c),M=n(),[N,A]=w_(P),D=b??y??"start",R={...e,size:E,bordered:p,expandIconPlacement:D},[B,H]=It([a,I],[l,$],{props:R}),k=S??o,z=f__namespace.useCallback((L={})=>{const j=typeof k=="function"?k(L):f__namespace.createElement(Xa,{rotate:L.isActive?r==="rtl"?-90:90:void 0,"aria-label":L.isActive?"expanded":"collapsed"});return Rn(j,()=>({className:V(j?.props?.className,`${P}-arrow`)}))},[k,P,r]),_=V(`${P}-icon-placement-${D}`,{[`${P}-borderless`]:!p,[`${P}-rtl`]:r==="rtl",[`${P}-ghost`]:!!h,[`${P}-${E}`]:E!=="middle"},i,u,d,N,A,B.root),W=f__namespace.useMemo(()=>({...xP(M),motionAppear:false,leavedClassName:`${P}-panel-hidden`}),[M,P]),O=f__namespace.useMemo(()=>C?hr(C).map(L=>L):null,[C]);return f__namespace.createElement(ky,{ref:t,openMotion:W,...Zt(e,["rootClassName"]),expandIcon:z,prefixCls:P,className:_,style:{...H.root,...s,...m},classNames:B,styles:H,destroyOnHidden:w??x},O)}),HP=Object.assign(S_,{Panel:g_}),$_=e=>e.map(t=>(t.colors=t.colors.map(_n),t)),_y=(e,t)=>{const{r:n,g:r,b:o,a:i}=e.toRgb(),s=new go(e.toRgbString()).onBackground(t).toHsv();return i<=.5?s.v>.5:n*.299+r*.587+o*.114>192},eS=(e,t)=>`panel-${e.key??t}`,E_=({prefixCls:e,presets:t,value:n,onChange:r})=>{const[o]=ir("ColorPicker"),[,i]=Tn(),s=f.useMemo(()=>$_(t),[t]),a=`${e}-presets`,l=f.useMemo(()=>s.reduce((d,m,p)=>{const{defaultOpen:h=true}=m;return h&&d.push(eS(m,p)),d},[]),[s]),c=d=>{r?.(d);},u=s.map((d,m)=>({key:eS(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(Ay,{key:`preset-${h}-${p.toHexString()}`,color:g.toCssString(),prefixCls:e,className:V(`${a}-color`,{[`${a}-color-checked`]:p.toCssString()===n?.toCssString(),[`${a}-color-bright`]:_y(p,i.colorBgElevated)}),onClick:()=>c(p)})}):f.createElement("span",{className:`${a}-empty`},o.presetEmpty))}));return f.createElement("div",{className:a},f.createElement(HP,{defaultActiveKey:l,ghost:true,items:u}))},VP=e=>{const{paddingInline:t,onlyIconSize:n,borderColorDisabled:r}=e;return vt(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:n,colorBorderDisabled:r})},jP=e=>{const t=e.contentFontSize??e.fontSize,n=e.contentFontSizeSM??e.fontSize,r=e.contentFontSizeLG??e.fontSizeLG,o=e.contentLineHeight??ef(t),i=e.contentLineHeightSM??ef(n),s=e.contentLineHeightLG??ef(r),a=_y(new mr(e.colorBgSolid),"#fff")?"#000":"#fff",l=_i.reduce((d,m)=>({...d,[`${m}ShadowColor`]:`0 ${X(e.controlOutlineWidth)} 0 ${oc(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}},I_=e=>{const{componentCls:t,antCls:n}=e,r=fy(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"}}]}},P_=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()}}}}}},N_=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:"50%"}),zy=(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}`]:N_(e)},{[`${n}${n}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${n}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},M_=e=>{const t=vt(e,{fontSize:e.contentFontSize});return zy(t,e.componentCls)},R_=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 zy(t,`${e.componentCls}-sm`)},A_=e=>{const t=vt(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return zy(t,`${e.componentCls}-lg`)},T_=e=>{const{componentCls:t}=e;return {[t]:{[`&${t}-block`]:{width:"100%"}}}},O_=wt("Button",e=>{const t=VP(e);return [P_(t),M_(t),R_(t),A_(t),T_(t),I_(t),l_(t)]},jP,{unitless:{fontWeight:true,contentLineHeight:true,contentLineHeightSM:true,contentLineHeightLG:true}});function F_(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 B_(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 ul(e,t={focus:true}){const{componentCls:n}=e,{componentCls:r}=t,o=r||n,i=`${o}-compact`;return {[i]:{...F_(e,i,t,o),...B_(o,i,t)}}}function L_(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 D_(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 k_(e){const t=`${e.componentCls}-compact-vertical`;return {[t]:{...L_(e,t,e.componentCls),...D_(e.componentCls,t)}}}const __=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)}},z_=ll(["Button","compact"],e=>{const t=VP(e);return [ul(t),k_(t),__(t)]},jP);function H_(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 V_={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},j_=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=hr(h),A=a||"default",{button:D}=f.useContext(ot),R=c||D?.shape||"default",[B,H]=f.useMemo(()=>{if(i&&s)return [i,s];if(a||l){const Xe=V_[A]||[];return l?["danger",Xe[1]]:Xe}return D?.color&&D?.variant?[D.color,D.variant]:["default","outlined"]},[i,s,a,l,D?.color,D?.variant,A]),[k,z]=f.useMemo(()=>C&&H==="solid"?[B,"outlined"]:[B,H],[B,H,C]),_=k==="danger",W=_?"dangerous":k,{getPrefixCls:O,direction:L,autoInsertSpace:j,className:Y,style:q,classNames:U,styles:K}=$t("button"),J=E??j??true,Q=O("btn",o),[G,ee]=O_(Q),oe=f.useContext(kn),re=d??oe,he=f.useContext(kP),Z=f.useMemo(()=>H_(r),[r]),[te,ce]=f.useState(Z.loading),[ue,Ee]=f.useState(false),Re=f.useRef(null),be=Hs(t,Re),le=N.length===1&&!g&&!ph(z),ae=f.useRef(true);f.useEffect(()=>(ae.current=false,()=>{ae.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(!Re.current||!J)return;const Xe=Re.current.textContent||"";le&&jb(Xe)?ue||Ee(true):ue&&Ee(false);}),f.useEffect(()=>{P&&Re.current&&Re.current.focus();},[]);const ye=f.useCallback(Xe=>{if(te||re){Xe.preventDefault();return}e.onClick?.((Xe));},[e.onClick,te,re]),{compactSize:Se,compactItemClassnames:He}=li(Q,L),Le={large:"lg",small:"sm",middle:void 0},Ae=Hn(Xe=>u??Se??he??Xe),_e=Ae?Le[Ae]??"":"",Te=te?"loading":g,Ce=y??b??"start",Pe=Zt(M,["navigate"]),De={...e,type:A,color:k,variant:z,danger:_,shape:R,size:Ae,disabled:re,loading:te,iconPlacement:Ce},[Oe,Ne]=It([n?void 0:U,S],[n?void 0:K,I],{props:De}),Qe=V(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}-${_e}`]:_e,[`${Q}-icon-only`]:!h&&h!==0&&!!Te,[`${Q}-background-ghost`]:C&&!ph(z),[`${Q}-loading`]:te,[`${Q}-two-chinese-chars`]:ue&&J&&!te,[`${Q}-block`]:x,[`${Q}-rtl`]:L==="rtl",[`${Q}-icon-end`]:Ce==="end"},He,m,p,Y,Oe.root),mt={...Ne.root,...q,...$},it={className:Oe.icon,style:Ne.icon},ct=Xe=>f.createElement(_P,{prefixCls:Q,...it},Xe),bt=f.createElement(a_,{existIcon:!!g,prefixCls:Q,loading:te,mount:ae.current,...it});let pt;g&&!te?pt=ct(g):r&&typeof r=="object"&&r.icon?pt=ct(r.icon):pt=bt;const nt=Dn(h)?o_(h,le&&J,Ne.content,Oe.content):null;if(Pe.href!==void 0)return f.createElement("a",{...Pe,className:V(Qe,{[`${Q}-disabled`]:re}),href:re?void 0:Pe.href,style:mt,onClick:ye,ref:be,tabIndex:re?-1:0,"aria-disabled":re},pt,nt);let et=f.createElement("button",{...M,type:w,className:Qe,style:mt,onClick:ye,disabled:re,ref:be},pt,nt,He&&f.createElement(z_,{prefixCls:Q}));return ph(z)||(et=f.createElement(Nu,{component:"Button",disabled:te},et)),et}),Je=j_;Je.Group=n_;Je.__ANT_BUTTON=true;const bh=e=>typeof e?.then=="function",Hy=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]=Ef(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=>{bh(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&&!bh(x)){d.current=false,g(C);return}}else if(u.length)x=u(i),d.current=false;else if(x=u(),!bh(x)){g();return}b(x);};return f__namespace.createElement(Je,{...Dy(t),onClick:y,loading:p,prefixCls:r,...o,ref:m},n)},Fu=f.createContext({}),{Provider:WP}=Fu,tS=()=>{const{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:n,isSilent:r,mergedOkCancel:o,rootPrefixCls:i,close:s,onCancel:a,onConfirm:l,onClose:c}=f.useContext(Fu);return o?f.createElement(Hy,{isSilent:r,actionFn:a,close:(...u)=>{s?.(...u),l?.(false),c?.();},autoFocus:e==="cancel",buttonProps:t,prefixCls:`${i}-btn`},n):null},nS=()=>{const{autoFocusButton:e,close:t,isSilent:n,okButtonProps:r,rootPrefixCls:o,okTextLocale:i,okType:s,onConfirm:a,onOk:l,onClose:c}=f.useContext(Fu);return f.createElement(Hy,{isSilent:n,type:s||"primary",actionFn:l,close:(...u)=>{t?.(...u),a?.(true),c?.();},autoFocus:e==="ok",buttonProps:r,prefixCls:`${o}-btn`},i)},qP=f__namespace.createContext({});function rS(e,t,n){let r=t;return !r&&n&&(r=`${e}-${n}`),r}function oS(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 W_(e){const t=e.getBoundingClientRect(),n={left:t.left,top:t.top},r=e.ownerDocument,o=r.defaultView||r.parentWindow;return n.left+=oS(o),n.top+=oS(o,true),n}const q_=f__namespace.memo(({children:e})=>e,(e,{shouldUpdate:t})=>!t);function jf(){return jf=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},jf.apply(this,arguments)}const U_={width:0,height:0,overflow:"hidden",outline:"none"},G_={outline:"none"},UP=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(qP),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 D=a?f.createElement("div",{className:V(`${n}-footer`,I?.footer),style:{...$?.footer}},a):null,R=i?f.createElement("div",{className:V(`${n}-header`,I?.header),style:{...$?.header}},f.createElement("div",{className:V(`${n}-title`,I?.title),id:s,style:{...$?.title}},i)):null,B=f.useMemo(()=>typeof l=="object"&&l!==null?l:l?{closeIcon:c??f.createElement("span",{className:`${n}-close-x`})}:{},[l,c,n]),H=rr(B,true),k=typeof l=="object"&&l.disabled,z=l?f.createElement("button",jf({type:"button",onClick:u,"aria-label":"Close"},H,{className:`${n}-close`,disabled:k}),B.closeIcon):null,_=f.createElement("div",{className:V(`${n}-container`,I?.container),style:$?.container},z,R,f.createElement("div",jf({className:V(`${n}-body`,I?.body),style:{...m,...$?.body}},p),d),D);return f.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":i?s:null,"aria-modal":"true",ref:P,style:{...o,...A},className:V(n,r),onMouseDown:g,onMouseUp:b},f.createElement("div",{ref:M,tabIndex:0,style:G_},f.createElement(q_,{shouldUpdate:C||x},h?h(_):_)),f.createElement("div",{tabIndex:0,ref:N,style:U_}))});function Ub(){return Ub=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},Ub.apply(this,arguments)}const K_=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=W_(p.current.nativeElement);b(m&&(m.x||m.y)?`${m.x-x.left}px ${m.y-x.top}px`:"");}return f__namespace.createElement(Jn,{visible:s,onVisibleChanged:d,onAppearPrepare:C,onEnterPrepare:C,forceRender:a,motionName:c,removeOnLeave:l,ref:p},({className:x,style:w},S)=>f__namespace.createElement(UP,Ub({},e,{ref:h,title:r,ariaId:u,prefixCls:n,holderRef:S,style:{...w,...o,...y},className:V(i,x)})))});function Gb(){return Gb=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},Gb.apply(this,arguments)}const X_=e=>{const{prefixCls:t,style:n,visible:r,maskProps:o,motionName:i,className:s}=e;return f__namespace.createElement(Jn,{key:"mask",visible:r,motionName:i,leavedClassName:`${t}-mask-hidden`},({className:a,style:l},c)=>f__namespace.createElement("div",Gb({ref:c,style:{...l,...n},className:V(`${t}-mask`,a,s)},o)))};function yc(){return yc=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},yc.apply(this,arguments)}const Y_=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,D]=f__namespace.useState(r),R=Ws();function B(){Qg(M.current,document.activeElement)||(P.current=document.activeElement);}function H(){Qg(M.current,document.activeElement)||N.current?.focus();}function k(){if(D(false),g&&P.current&&i){try{P.current.focus({preventScroll:!0});}catch{}P.current=null;}A&&d?.();}function z(K){K?H():k(),u?.(K);}function _(K){c?.(K);}const W=f.useRef(false),O=f.useRef(null),L=()=>{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&&_(K);});function q(K){if(o&&K.keyCode===je.ESC){K.stopPropagation(),_(K);return}r&&K.keyCode===je.TAB&&N.current.changeActive(!K.shiftKey);}f.useEffect(()=>{r?(D(true),B()):A&&N.current.enableMotion()&&!N.current.inMotion()&&k();},[r]),f.useEffect(()=>()=>{clearTimeout(O.current);},[]);const U={zIndex:n,...s,...E?.wrapper,display:A?null:"none"};return f__namespace.createElement("div",yc({className:V(`${t}-root`,S),style:I},rr(e,{data:true})),f__namespace.createElement(X_,{prefixCls:t,visible:g&&r,motionName:rS(t,b,y),style:{zIndex:n,...x,...E?.mask},maskProps:w,className:$?.mask}),f__namespace.createElement("div",yc({tabIndex:-1,onKeyDown:q,className:V(`${t}-wrap`,a,$?.wrapper),ref:M,onClick:Y,style:U},l),f__namespace.createElement(K_,yc({},e,{onMouseDown:L,onMouseUp:j,ref:N,closable:h,ariaId:R,prefixCls:t,visible:r&&A,onClose:_,onVisibleChanged:z,motionName:rS(t,m,p)}))))};function Kb(){return Kb=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},Kb.apply(this,arguments)}const Q_=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(qP.Provider,{value:u},f__namespace.createElement(Lm,{open:t||r||l,autoDestroy:false,getContainer:n,autoLock:t||l},f__namespace.createElement(Y_,Kb({},e,{destroyOnHidden:o,afterClose:()=>{const d=s&&typeof s=="object"?s:{},{afterClose:m}=d||{};m?.(),i?.(),c(false);}}))))},Z_=()=>Ar()&&window.document.documentElement,Ym=e=>{const{prefixCls:t,className:n,style:r,size:o,shape:i}=e,s=V({[`${t}-lg`]:o==="large",[`${t}-sm`]:o==="small"}),a=V({[`${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:V(t,s,a,n),style:{...l,...r}})},J_=new ht("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),Vy=e=>({height:e,lineHeight:X(e)}),Ti=e=>({width:e,...Vy(e)}),ez=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:J_,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),vh=(e,t)=>({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal(),...Vy(e)}),tz=e=>{const{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:r,controlHeightLG:o,controlHeightSM:i}=e;return {[t]:{display:"inline-block",verticalAlign:"top",background:n,...Ti(r)},[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:{...Ti(o)},[`${t}${t}-sm`]:{...Ti(i)}}},nz=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,...vh(t,a)},[`${r}-lg`]:{...vh(o,a)},[`${r}-sm`]:{...vh(i,a)}}},GP=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,...Ti(o(r).mul(2).equal())}},rz=e=>({[e.skeletonNodeCls]:{...GP(e)}}),oz=e=>{const{skeletonImageCls:t,imageSizeBase:n,calc:r}=e;return {[t]:{...GP(e),[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:{...Ti(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%"}}},yh=(e,t,n)=>{const{skeletonButtonCls:r}=e;return {[`${n}${r}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${n}${r}-round`]:{borderRadius:t}}},Ch=(e,t)=>({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal(),...Vy(e)}),iz=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(),...Ch(r,a)},...yh(e,r,n),[`${n}-lg`]:{...Ch(o,a)},...yh(e,o,`${n}-lg`),[`${n}-sm`]:{...Ch(i,a)},...yh(e,i,`${n}-sm`)}},sz=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,...Ti(c)},[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:{...Ti(u)},[`${n}-sm`]:{...Ti(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",...iz(e),...tz(e),...nz(e),...rz(e),...oz(e)},[`${t}${t}-block`]:{width:"100%",[i]:{width:"100%"},[s]:{width:"100%"}},[`${t}${t}-active`]:{[`
        ${r},
        ${o} > li,
        ${n},
        ${i},
        ${s},
        ${a},
        ${l}
      `]:{...ez(e)}}}},az=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}},Bu=wt("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 sz(r)},az,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),lz=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]=Bu(m),g=V(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(Ym,{prefixCls:`${m}-avatar`,className:r?.content,style:{...a?.content,...s},shape:l,size:c,...u}))},cz=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]=Bu(m),g=V(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(Ym,{prefixCls:`${m}-button`,className:o?.content,style:{...a?.content,...s},size:c,...u}))},KP=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]=Bu(d),h=V(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:V(r?.content,i||`${d}-node`),style:{...a?.content,...s}},c))},uz="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",dz=e=>{const{getPrefixCls:t}=f__namespace.useContext(ot),n=t("skeleton",e.prefixCls);return f__namespace.createElement(KP,{...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:uz,className:`${n}-image-path`})))},fz=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]=Bu(m),g=V(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(Ym,{prefixCls:`${m}-input`,className:r?.content,style:{...l?.content,...a},size:c,...u}))},mz=(e,t)=>{const{width:n,rows:r=2}=t;if(Array.isArray(n))return n[e];if(r-1===e)return n},pz=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:mz(a,e)}}));return f__namespace.createElement("ul",{className:V(t,n),style:r},i)},hz=({prefixCls:e,className:t,width:n,style:r})=>f__namespace.createElement("h3",{className:V(e,t),style:{width:n,...r}});function xh(e){return e&&typeof e=="object"?e:{}}function gz(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function bz(e,t){return !e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}function vz(e,t){const n={};return (!e||!t)&&(n.width="61%"),!e&&t?n.rows=3:n.rows=2,n}const dl=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}=$t("skeleton"),w=h("skeleton",t),[S,I]=Bu(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 D;if(M){const H={className:E.avatar,prefixCls:`${w}-avatar`,...gz(N,A),...xh(c),style:P.avatar};D=f__namespace.createElement("div",{className:V(E.header,`${w}-header`),style:P.header},f__namespace.createElement(Ym,{...H}));}let R;if(N||A){let H;if(N){const z={className:E.title,prefixCls:`${w}-title`,...bz(M,A),...xh(u),style:P.title};H=f__namespace.createElement(hz,{...z});}let k;if(A){const z={className:E.paragraph,prefixCls:`${w}-paragraph`,...vz(M,N),...xh(d),style:P.paragraph};k=f__namespace.createElement(pz,{...z});}R=f__namespace.createElement("div",{className:V(E.section,`${w}-section`),style:P.section},H,k);}const B=V(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:B,style:{...P.root,...y,...s}},D,R)}return l??null};dl.Button=cz;dl.Avatar=lz;dl.Input=fz;dl.Image=dz;dl.Node=KP;function iS(){}const yz=f__namespace.createContext({add:iS,remove:iS});function Cz(e){const t=f__namespace.useContext(yz),n=f__namespace.useRef(null);return at(o=>{if(o){const i=e?o.querySelector(e):o;i&&(t.add(i),n.current=i);}else t.remove(n.current);})}const sS=()=>{const{cancelButtonProps:e,cancelTextLocale:t,onCancel:n}=f.useContext(Fu);return f.createElement(Je,{onClick:n,...e},t)},aS=()=>{const{confirmLoading:e,okButtonProps:t,okType:n,okTextLocale:r,onOk:o}=f.useContext(Fu);return f.createElement(Je,{...Dy(n),loading:e,onClick:o,...t},r)};function XP(e,t){return f.createElement("span",{className:`${e}-close-x`},t||f.createElement(ai,{className:`${e}-close-icon`}))}const YP=e=>{const{okText:t,okType:n="primary",cancelText:r,confirmLoading:o,onOk:i,onCancel:s,okButtonProps:a,cancelButtonProps:l,footer:c}=e,[u]=ir("Modal",H3()),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(sS,null),f.createElement(aS,null)),typeof c=="function"&&(h=c(h,{OkBtn:aS,CancelBtn:sS})),h=f.createElement(WP,{value:p},h)):h=c,f.createElement(FI,{disabled:false},h)},xz=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"}}}},wz=e=>{const{componentCls:t}=e;return {[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},Sz=(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},Xb=(e,t)=>Sz(e,t),$z=(e,t,n)=>({[`@media (min-width: ${X(t)})`]:{...Xb(e,n)}}),Ez=()=>({}),Iz=()=>({});wt("Grid",xz,Ez);const QP=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin});wt("Grid",e=>{const t=vt(e,{gridColumns:24}),n=QP(t);return delete n.xs,[wz(t),Xb(t,""),Xb(t,"-xs"),Object.keys(n).map(r=>$z(t,n[r],`-${r}`)).reduce((r,o)=>({...r,...o}),{})]},Iz);function lS(e){return {position:e,inset:0}}const Pz=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`]:{...lS("fixed"),zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,pointerEvents:"none",[`&${t}-mask-blur`]:{backdropFilter:"blur(4px)"},[`${t}-hidden`]:{display:"none"}},[`${t}-wrap`]:{...lS("fixed"),zIndex:e.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"}}},{[`${t}-root`]:Iy(e)}]},Nz=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]:{...Bt(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"}}}]},Mz=e=>{const{componentCls:t}=e;return {[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl",[`${t}-confirm-body`]:{direction:"rtl"}}}}},Rz=e=>{const{componentCls:t}=e,n=QP(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))}}},ZP=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()})},JP=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}),e6=wt("Modal",e=>{const t=ZP(e);return [Nz(t),Mz(t),Pz(t),Au(t,"zoom"),Rz(t)]},JP,{unitless:{titleLineHeight:true}});let Yb;const Az=e=>{Yb={x:e.pageX,y:e.pageY},setTimeout(()=>{Yb=null;},100);};Z_()&&document.documentElement.addEventListener("click",Az,true);const t6=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,...D}=e,{getPopupContainer:R,getPrefixCls:B,direction:H,className:k,style:z,classNames:_,styles:W,centered:O,cancelButtonProps:L,okButtonProps:j,mask:Y}=$t("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=B("modal",t),Q=B(),[G,ee]=T8(N,Y,J),oe=Qe=>{b||(w?.(Qe),K?.());},re=Qe=>{x?.(Qe),K?.();},he=sn(J),[Z,te]=e6(J,he),ce=V(i,{[`${J}-centered`]:s??O,[`${J}-wrap-rtl`]:H==="rtl"}),ue=d!==null&&!g?f__namespace.createElement(YP,{...e,okButtonProps:{...j,...S},onOk:re,cancelButtonProps:{...L,...I},onCancel:oe}):null,[Ee,Re,be,le]=X0(Di(e),Di(q),{closable:true,closeIcon:f__namespace.createElement(ai,{className:`${J}-close-icon`}),closeIconRender:Qe=>XP(J,Qe)}),ae=Ee?{disabled:be,closeIcon:Re,afterClose:U,...le}:false,ye=A?Qe=>f__namespace.createElement("div",{className:`${J}-render`},A(Qe)):void 0,Se=`.${J}-${A?"render":"container"}`,He=Cz(Se),Le=In(P,He),[Ae,_e]=Us("Modal",y),Te={...e,width:u,panelRef:P,focusTriggerAfterClose:l,mask:G,zIndex:Ae},[Ce,Pe]=It([_,m,ee],[W,p],{props:Te}),[De,Oe]=f__namespace.useMemo(()=>u&&typeof u=="object"?[void 0,u]:[u,void 0],[u]),Ne=f__namespace.useMemo(()=>{const Qe={};return Oe&&Object.keys(Oe).forEach(mt=>{const it=Oe[mt];it!==void 0&&(Qe[`--${J}-${mt}-width`]=typeof it=="number"?`${it}px`:it);}),Qe},[J,Oe]);return f__namespace.createElement(zi,{form:true,space:true},f__namespace.createElement(Bm.Provider,{value:_e},f__namespace.createElement(Q_,{width:De,...D,zIndex:Ae,getContainer:a===void 0?R:a,prefixCls:J,rootClassName:V(Z,r,te,he,Ce.root),rootStyle:Pe.root,footer:ue,visible:o,mousePosition:C??Yb,onClose:oe,closable:ae,closeIcon:Re,focusTriggerAfterClose:l,transitionName:Hi(Q,"zoom",e.transitionName),maskTransitionName:Hi(Q,"fade",e.maskTransitionName),mask:G,className:V(Z,n,k),style:{...z,...c,...Ne},classNames:{...Ce,wrapper:V(Ce.wrapper,ce)},styles:Pe,panelRef:Le,destroyOnHidden:$??E,modalRender:ye},g?f__namespace.createElement(dl,{active:true,title:false,paragraph:{rows:4},className:`${J}-body-skeleton`}):h)))},Tz=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`]:{...Af()},[`&${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}}},Oz=ll(["Modal","confirm"],e=>{const t=ZP(e);return Tz(t)},JP,{order:-1e3}),n6=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(Ly,null);break;case "success":d=f__namespace.createElement(By,null);break;case "error":d=f__namespace.createElement(Tu,null);break;default:d=f__namespace.createElement(Ou,null);}const m=a??s==="confirm",p=e.autoFocusButton===null?false:e.autoFocusButton||"ok",[h]=ir("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(tS,null),f__namespace.createElement(nS,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:V($,{[`${$}-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(WP,{value:w},f__namespace.createElement("div",{className:`${i}-btns`},typeof l=="function"?l(S,{OkBtn:nS,CancelBtn:tS}):S)):l,f__namespace.createElement(Oz,{prefixCls:t}))},Fz=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}=$t("modal"),y=`${i}-confirm`,C=e.width||416,x=e.style||{},w=e.maskClosable===void 0?false:e.maskClosable,S=V(y,`${y}-${e.type}`,{[`${y}-rtl`]:o==="rtl"},e.className),[,I]=Tn(),$=f__namespace.useMemo(()=>n!==void 0?n:I.zIndexPopupBase+sy,[n,I]);return f__namespace.createElement(t6,{...e,className:S,wrapClassName:V({[`${y}-centered`]:!!e.centered},s),onCancel:()=>{t?.({triggerCancel:true}),u?.(false);},title:m,footer:null,transitionName:Hi(a||"","zoom",e.transitionName),maskTransitionName:Hi(a||"","fade",e.maskTransitionName),maskClosable:w,style:x,styles:{body:l,mask:r,...d},width:C,zIndex:$,closable:c},f__namespace.createElement(n6,{...e,confirmPrefixCls:y,okButtonProps:{...b,...p},cancelButtonProps:{...g,...h}}))},r6=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(Fz,{...e}))},vs=[];let o6="";function i6(){return o6}const Bz=e=>{const{prefixCls:t,getContainer:n,direction:r}=e,o=H3(),i=f.useContext(ot),s=i6()||i.getPrefixCls(),a=t||`${s}-modal`;let l=n;return l===false&&(l=void 0),f.createElement(r6,{...e,rootPrefixCls:s,prefixCls:a,iconPrefixCls:i.iconPrefixCls,theme:i.theme,direction:r??i.direction,locale:i.locale?.Modal??o,getContainer:l})};function Lu(e){const t=my(),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<vs.length;d++)if(vs[d]===a){vs.splice(d,1);break}eP(n).then(()=>{});}const s=c=>{clearTimeout(o),o=setTimeout(()=>{const u=t.getPrefixCls(void 0,i6()),d=t.getIconPrefixCls(),m=t.getTheme(),p=f.createElement(Bz,{...c});Hm(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),vs.push(a),{destroy:a,update:l}}function s6(e){return {...e,type:"warning"}}function a6(e){return {...e,type:"info"}}function l6(e){return {...e,type:"success"}}function c6(e){return {...e,type:"error"}}function u6(e){return {...e,type:"confirm"}}function Lz({rootPrefixCls:e}){o6=e;}function d6(e){return t=>f__namespace.createElement(yr,{theme:{token:{motion:false,zIndexPopupBase:0}}},f__namespace.createElement(e,{...t}))}const jy=(e,t,n,r,o)=>d6(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]=Lt(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}))}),Dz=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]=e6(m,p),b=`${m}-confirm`;let y={};return i?y={closable:o??false,title:"",footer:"",children:f__namespace.createElement(n6,{...e,prefixCls:m,confirmPrefixCls:b,rootPrefixCls:d,content:a})}:y={closable:o??true,title:s,footer:l!==null&&f__namespace.createElement(YP,{...e}),children:a},f__namespace.createElement(UP,{prefixCls:m,className:V(h,`${m}-pure-panel`,i&&b,i&&`${b}-${i}`,n,g,p),...c,closeIcon:XP(m,r),closable:o,...y})},kz=d6(Dz),_z=({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]=ir("Modal",ho.Modal);return f__namespace.createElement(r6,{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})},zz=f__namespace.forwardRef(_z);let cS=0;const Hz=f__namespace.memo(f__namespace.forwardRef((e,t)=>{const[n,r]=k8();return f__namespace.useImperativeHandle(t,()=>({patchElement:r}),[r]),f__namespace.createElement(f__namespace.Fragment,null,n)}));function f6(){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){cS+=1;const l=f__namespace.createRef();let c;const u=new Promise(g=>{c=g;});let d=false,m;const p=f__namespace.createElement(zz,{key:`modal-${cS}`,config:i(a),ref:l,afterClose:()=>{m?.();},isSilent:()=>d,onConfirm:g=>{c(g);}});return m=e.current?.patchElement(p),m&&vs.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(a6),success:r(l6),error:r(c6),warning:r(s6),confirm:r(u6)}),[r]),f__namespace.createElement(Hz,{key:"modal-holder",ref:e})]}function m6(e){return Lu(s6(e))}const wo=t6;wo.useModal=f6;wo.info=function(t){return Lu(a6(t))};wo.success=function(t){return Lu(l6(t))};wo.error=function(t){return Lu(c6(t))};wo.warning=m6;wo.warn=m6;wo.confirm=function(t){return Lu(u6(t))};wo.destroyAll=function(){for(;vs.length;){const t=vs.pop();t&&t();}};wo.config=Lz;wo._InternalPanelDoNotUseOrYouWillBeFired=kz;const Wf=f.createContext({}),p6=f.createContext({message:{},notification:{},modal:{}});function qf(){return qf=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},qf.apply(this,arguments)}const Wy=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=B=>{(B.key==="Enter"||B.code==="Enter"||B.keyCode===je.ENTER)&&P();};f__namespace.useEffect(()=>{if(!I&&$>0){const B=Date.now()-w,H=setTimeout(()=>{P();},$*1e3-w);return ()=>{a&&clearTimeout(H),S(Date.now()-B);}}},[$,I,h]),f__namespace.useEffect(()=>{if(!I&&E&&(a||w===0)){const B=performance.now();let H;const k=()=>{cancelAnimationFrame(H),H=requestAnimationFrame(z=>{const _=z+w-B,W=Math.min(_/($*1e3),1);x(W*100),W<1&&k();});};return k(),()=>{a&&cancelAnimationFrame(H);}}},[$,w,I,E,h]);const N=f__namespace.useMemo(()=>typeof u=="object"&&u!==null?u:{},[u]),A=rr(N,true),D=100-(!C||C<0?0:C>100?100:C),R=`${n}-notice`;return f__namespace.createElement("div",qf({},d,{ref:t,className:V(R,o,{[`${R}-closable`]:u}),style:r,onMouseEnter:B=>{y(true),d?.onMouseEnter?.(B);},onMouseLeave:B=>{y(false),d?.onMouseLeave?.(B);},onClick:m}),f__namespace.createElement("div",{className:`${R}-content`},c),u&&f__namespace.createElement("button",qf({className:`${R}-close`,onKeyDown:M,"aria-label":"Close"},A,{onClick:B=>{B.preventDefault(),B.stopPropagation(),P();}}),N.closeIcon??"x"),E&&f__namespace.createElement("progress",{className:`${R}-progress`,max:"100",value:D},D+"%"))}),h6=f.createContext({}),g6=({children:e,classNames:t})=>f.createElement(h6.Provider,{value:{classNames:t}},e),uS=8,dS=3,fS=16,Vz=e=>{const t={offset:uS,threshold:dS,gap:fS};return e&&typeof e=="object"&&(t.offset=e.offset??uS,t.threshold=e.threshold??dS,t.gap=e.gap??fS),[!!e,t]};function Uf(){return Uf=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},Uf.apply(this,arguments)}const jz=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(h6),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}]=Vz(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(CF,Uf({key:n,className:V(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:D}=$,R=String(A),{className:B,style:H,classNames:k,styles:z,..._}=$,W=b.findIndex(L=>L.key===R),O={};if(y){const L=b.length-1-(W>-1?W:M-1),j=n==="top"||n==="bottom"?"-50%":"0";if(L>0){O.height=S?d.current[R]?.offsetHeight:m?.offsetHeight;let Y=0;for(let K=0;K<L;K++)Y+=d.current[b[b.length-1-K].key]?.offsetHeight+w;const q=(S?Y:L*C)*(n.startsWith("top")?1:-1),U=!S&&m?.offsetWidth&&d.current[R]?.offsetWidth?(m?.offsetWidth-C*2*(L<3?L: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:V(`${r}-notice-wrapper`,E,k?.wrapper),style:{...P,...O,...z?.wrapper},onMouseEnter:()=>g(L=>L.includes(R)?L:[...L,R]),onMouseLeave:()=>g(L=>L.filter(j=>j!==R))},f.createElement(Wy,Uf({},_,{ref:L=>{W>-1?d.current[R]=L:delete d.current[R];},prefixCls:r,classNames:k,styles:z,className:V(B,u?.notice),style:H,times:D,key:A,eventKey:A,onNoticeClose:l,hovering:y&&h.length>0})))})},Wz=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 vT.createPortal(f__namespace.createElement(f__namespace.Fragment,null,C.map(x=>{const w=h[x],S=f__namespace.createElement(jz,{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)}),qz=()=>document.body;let mS=0;function Uz(...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 b6(e={}){const{getContainer:t=qz,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(Wz,{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=at(x=>{const w=Uz(u,x);(w.key===null||w.key===void 0)&&(w.key=`rc-notification-${mS}`,mS+=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 Gz=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}}}}},Kz=["top","topLeft","topRight","bottom","bottomLeft","bottomRight"],Xz={topLeft:"left",topRight:"right",bottomLeft:"left",bottomRight:"right",top:"left",bottom:"left"},Yz=(e,t)=>{const{componentCls:n}=e;return {[`${n}-${t}`]:{[`&${n}-stack > ${n}-notice-wrapper`]:{[t.startsWith("top")?"top":"bottom"]:0,[Xz[t]]:{value:0,_skip_check_:true}}}}},Qz=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}},Zz=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}},Jz=e=>{const{componentCls:t}=e;return {[`${t}-stack`]:{[`& > ${t}-notice-wrapper`]:{transition:`transform ${e.motionDurationSlow}, backdrop-filter 0s`,willChange:"transform, opacity",position:"absolute",...Qz(e)}},[`${t}-stack:not(${t}-stack-expanded)`]:{[`& > ${t}-notice-wrapper`]:{...Zz(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"}}},...Kz.map(n=>Yz(e,n)).reduce((n,r)=>({...n,...r}),{})}},v6=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}}},e7=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]:{...Bt(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`]:v6(e)}}]},y6=e=>({zIndexPopup:e.zIndexPopupBase+sy+50,width:384,progressBg:`linear-gradient(90deg, ${e.colorPrimaryBorderHover}, ${e.colorPrimary})`,colorSuccessBg:void 0,colorErrorBg:void 0,colorInfoBg:void 0,colorWarningBg:void 0}),C6=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})},x6=wt("Notification",e=>{const t=C6(e);return [e7(t),Gz(t),Jz(t)]},y6),t7=ll(["Notification","PurePanel"],e=>{const t=`${e.componentCls}-notice`,n=C6(e);return {[`${t}-pure-panel`]:{...v6(n),width:n.width,maxWidth:`calc(100vw - ${X(e.calc(n.notificationMarginEdge).mul(2).equal())})`,margin:0}}},y6);function qy(e,t){return t===null||t===false?null:t||f__namespace.createElement(ai,{className:`${e}-close-icon`})}const n7={success:By,info:Ly,error:Tu,warning:Ou},w6=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:V(`${t}-icon`,c.icon),style:l.icon},n):r&&(u=f__namespace.createElement(n7[r]||null,{className:V(`${t}-icon`,c.icon,`${t}-icon-${r}`),style:l.icon})),f__namespace.createElement("div",{className:V({[`${t}-with-icon`]:u}),role:a},u,f__namespace.createElement("div",{className:V(`${t}-title`,c.title),style:l.title},o),i&&f__namespace.createElement("div",{className:V(`${t}-description`,c.description),style:l.description},i),s&&f__namespace.createElement("div",{className:V(`${t}-actions`,c.actions),style:l.actions},s))},r7=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}=$t("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),[D,R]=x6(M,A),[B,H,,k]=X0(Di(e),Di($),{closable:true,closeIcon:f__namespace.createElement(ai,{className:`${M}-close-icon`}),closeIconRender:_=>qy(M,_)}),z=B?{onClose:h&&typeof h=="object"?h?.onClose:void 0,closeIcon:H,...k}:false;return f__namespace.createElement("div",{className:V(`${N}-pure-panel`,D,u,R,A,S.root),style:I.root},f__namespace.createElement(t7,{prefixCls:M}),f__namespace.createElement(Wy,{style:{...C,...d},...g,prefixCls:M,eventKey:"pure",duration:null,closable:z,className:V(u,y),content:f__namespace.createElement(w6,{classNames:S,styles:I,prefixCls:N,icon:n,type:r,title:P,description:s,actions:E})}))};function o7(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 i7(e){return {motionName:`${e}-fade`}}function s7(e,t,n){return typeof e<"u"?e:typeof t?.closeIcon<"u"?t.closeIcon:n?.closeIcon}const pS=24,a7=4.5,l7="topRight",c7=({children:e,prefixCls:t})=>{const n=sn(t),[r,o]=x6(t,n);return f.createElement(g6,{classNames:{list:V(r,o,n)}},e)},u7=(e,{prefixCls:t,key:n})=>f.createElement(c7,{prefixCls:t,key:n},e),d7=f.forwardRef((e,t)=>{const{top:n,bottom:r,prefixCls:o,getContainer:i,maxCount:s,rtl:a,onAllRemoved:l,stack:c,duration:u=a7,pauseOnHover:d=true,showProgress:m}=e,{getPrefixCls:p,getPopupContainer:h,direction:g}=$t("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=>o7(N,n??pS,r??pS),S=()=>V({[`${C}-rtl`]:a??g==="rtl"}),I=()=>i7(C),[$,E]=b6({prefixCls:C,style:w,className:S,motion:I,closable:{closeIcon:qy(C)},duration:x,getContainer:()=>i?.()||h?.()||document.body,maxCount:s,pauseOnHover:d,showProgress:m,onAllRemoved:l,renderNotifications:u7,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 S6(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:D={},styles:R={},...B}=l,H=y??C,k=$??I,z=qy(b,s7(N,e,d)),[_,W,,O]=j3(Di({...e||{},...l}),Di(n),{closable:true,closeIcon:z}),L=_?{onClose:A&&typeof A=="object"?A.onClose:void 0,closeIcon:W,...O}:false,j=Ei(D,{props:l}),Y=Ei(R,{props:l}),q=Rm(void 0,m,j),U=Q0(p,Y);return c({placement:e?.placement??l7,...B,content:f.createElement(w6,{prefixCls:b,icon:w,type:S,title:H,description:x,actions:k,role:M,classNames:q,styles:U}),className:V({[`${b}-${S}`]:S},E,h,q.root),style:{...g,...U.root,...P},closable:L})},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(d7,{key:"notification-holder",...e,ref:t})]}function $6(e){return S6(e)}let wa=null,af=e=>e(),Gf=[],Kc={};function hS(){const{getContainer:e,rtl:t,maxCount:n,top:r,bottom:o,showProgress:i,pauseOnHover:s}=Kc,a=e?.()||document.body;return {getContainer:()=>a,rtl:t,maxCount:n,top:r,bottom:o,showProgress:i,pauseOnHover:s}}const f7=f.forwardRef((e,t)=>{const{notificationConfig:n,sync:r}=e,{getPrefixCls:o}=f.useContext(ot),i=Kc.prefixCls||o("notification"),s=f.useContext(Wf),[a,l]=S6({...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}),m7=f.forwardRef((e,t)=>{const[n,r]=f.useState(hS),o=()=>{r(hS);};f.useEffect(o,[]);const i=my(),s=i.getRootPrefixCls(),a=i.getIconPrefixCls(),l=i.getTheme(),c=f.createElement(f7,{ref:t,sync:o,notificationConfig:n});return f.createElement(yr,{prefixCls:s,iconPrefixCls:a,theme:l},i.holderRender?i.holderRender(c):c)}),Uy=()=>{if(!wa){const e=document.createDocumentFragment(),t={fragment:e};wa=t,af(()=>{Hm(f.createElement(m7,{ref:n=>{const{instance:r,sync:o}=n||{};Promise.resolve().then(()=>{!t.instance&&r&&(t.instance=r,t.sync=o,Uy());});}}),e);});return}wa.instance&&(Gf.forEach(e=>{switch(e.type){case "open":{af(()=>{wa.instance.open({...Kc,...e.config});});break}case "destroy":af(()=>{wa?.instance?.destroy(e.key);});break}}),Gf=[]);};function p7(e){Kc={...Kc,...e},af(()=>{wa?.sync?.();});}function E6(e){Gf.push({type:"open",config:e}),Uy();}const h7=e=>{Gf.push({type:"destroy",key:e}),Uy();},g7=["success","info","warning","error"],b7={open:E6,destroy:h7,config:p7,useNotification:$6,_InternalPanelDoNotUseOrYouWillBeFired:r7},I6=b7;g7.forEach(e=>{I6[e]=t=>E6({...t,type:e});});const v7=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]:{...Bt(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"}}]},y7=e=>({zIndexPopup:e.zIndexPopupBase+sy+10,contentBg:e.colorBgElevated,contentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`}),P6=wt("Message",e=>{const t=vt(e,{height:150});return v7(t)},y7),C7={info:f__namespace.createElement(Ly,null),success:f__namespace.createElement(By,null),error:f__namespace.createElement(Tu,null),warning:f__namespace.createElement(Ou,null),loading:f__namespace.createElement(Xm,null)},N6=e=>{const{prefixCls:t,type:n,icon:r,children:o,classNames:i,styles:s}=e,a=r||n&&C7[n],l=Rn(a,c=>{const u={...c?.style,...s?.icon};return {className:V(c.className,i?.icon),style:u}});return f__namespace.createElement("div",{className:V(`${t}-custom-content`,`${t}-${n}`)},l,f__namespace.createElement("span",{className:i?.content,style:s?.content},o))},x7=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}=$t("message"),g=t||u("message"),b=sn(g),[y,C]=P6(g,b),[x,w]=It([p,a],[h,l],{props:e});return f__namespace.createElement(Wy,{...c,prefixCls:g,className:V(d,x.root,n,y,`${g}-notice-pure-panel`,C,b),style:{...w.root,...m,...r},eventKey:"pure",duration:null,content:f__namespace.createElement(N6,{prefixCls:g,type:o,icon:i,classNames:x,styles:w},s)})};function w7(e,t){return {motionName:t??`${e}-move-up`}}function Gy(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 S7=8,$7=3,E7=({children:e,prefixCls:t})=>{const n=sn(t),[r,o]=P6(t,n);return f__namespace.createElement(g6,{classNames:{list:V(r,o,n)}},e)},I7=(e,{prefixCls:t,key:n})=>f__namespace.createElement(E7,{prefixCls:t,key:n},e),P7=f__namespace.forwardRef((e,t)=>{const{top:n,prefixCls:r,getContainer:o,maxCount:i,duration:s=$7,rtl:a,transitionName:l,onAllRemoved:c,pauseOnHover:u=true}=e,{getPrefixCls:d,direction:m,getPopupContainer:p}=$t("message"),{message:h}=f__namespace.useContext(ot),g=r||d("message"),b=()=>({left:"50%",transform:"translateX(-50%)",top:n??S7}),y=()=>V({[`${g}-rtl`]:a??m==="rtl"}),C=()=>w7(g,l),[x,w]=It([e?.classNames,h?.classNames],[e?.styles,h?.styles],{props:e}),[S,I]=b6({prefixCls:g,style:b,className:y,motion:C,closable:false,duration:s,getContainer:()=>o?.()||p?.()||document.body,maxCount:i,onAllRemoved:c,renderNotifications:I7,pauseOnHover:u});return f__namespace.useImperativeHandle(t,()=>({...S,prefixCls:g,message:h,classNames:x,styles:w})),I});let gS=0;function M6(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 D=I;Dn(D)||(gS+=1,D=`antd-message-${gS}`);const R={...e,...l},B=Ei(b,{props:R}),H=Ei(M,{props:R}),k=Ei(y,{props:R}),z=Ei(N,{props:R}),_=Rm(void 0,B,H,m),W=Q0(k,z,p);return Gy(O=>(c({...A,key:D,content:f__namespace.createElement(N6,{prefixCls:u,type:S,icon:w,classNames:_,styles:W},x),placement:"top",className:V({[`${C}-${S}`]:S},$,h,_.root),style:{...W.root,...g,...E},onClose:()=>{P?.(),O();}}),()=>{r(D);}))},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(P7,{key:"message-holder",...e,ref:t})]}function R6(e){return M6(e)}const N7=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"}}}},M7=()=>({}),R7=wt("App",N7,M7),A7=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]=R7(d),h=V(m,d,r,o,p,{[`${d}-rtl`]:c==="rtl"}),g=f.useContext(Wf),b=f.useMemo(()=>({message:{...g.message,...i},notification:{...g.notification,...s}}),[i,s,g.message,g.notification]),[y,C]=R6(b.message),[x,w]=$6(b.notification),[S,I]=f6(),$=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(p6.Provider,{value:$},f.createElement(Wf.Provider,{value:b},f.createElement(E,{...l===false?void 0:P},I,C,w,n)))},T7=()=>f.useContext(p6),Du=A7;Du.useApp=T7;let ms=null,ys=e=>e(),Xc=[],Yc={};function bS(){const{getContainer:e,duration:t,rtl:n,maxCount:r,top:o}=Yc,i=e?.()||document.body;return {getContainer:()=>i,duration:t,rtl:n,maxCount:r,top:o}}const O7=f.forwardRef((e,t)=>{const{messageConfig:n,sync:r}=e,{getPrefixCls:o}=f.useContext(ot),i=Yc.prefixCls||o("message"),s=f.useContext(Wf),[a,l]=M6({...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}),F7=f.forwardRef((e,t)=>{const[n,r]=f.useState(bS),o=()=>{r(bS);};f.useEffect(o,[]);const i=my(),s=i.getRootPrefixCls(),a=i.getIconPrefixCls(),l=i.getTheme(),c=f.createElement(O7,{ref:t,sync:o,messageConfig:n});return f.createElement(yr,{prefixCls:s,iconPrefixCls:a,theme:l},i.holderRender?i.holderRender(c):c)}),Qm=()=>{if(!ms){const e=document.createDocumentFragment(),t={fragment:e};ms=t,ys(()=>{Hm(f.createElement(F7,{ref:n=>{const{instance:r,sync:o}=n||{};Promise.resolve().then(()=>{!t.instance&&r&&(t.instance=r,t.sync=o,Qm());});}}),e);});return}ms.instance&&(Xc.forEach(e=>{const{type:t,skipped:n}=e;if(!n)switch(t){case "open":{ys(()=>{const r=ms.instance.open({...Yc,...e.config});r?.then(e.resolve),e.setCloseFn(r);});break}case "destroy":ys(()=>{ms?.instance.destroy(e.key);});break;default:ys(()=>{var r;const o=(r=ms.instance)[t].apply(r,Et(e.args));o?.then(e.resolve),e.setCloseFn(o);});}}),Xc=[]);};function B7(e){Yc={...Yc,...e},ys(()=>{ms?.sync?.();});}function L7(e){const t=Gy(n=>{let r;const o={type:"open",config:e,resolve:n,setCloseFn:i=>{r=i;}};return Xc.push(o),()=>{r?ys(()=>{r();}):o.skipped=true;}});return Qm(),t}function D7(e,t){const n=Gy(r=>{let o;const i={type:e,args:t,resolve:r,setCloseFn:s=>{o=s;}};return Xc.push(i),()=>{o?ys(()=>{o();}):i.skipped=true;}});return Qm(),n}const k7=e=>{Xc.push({type:"destroy",key:e}),Qm();},_7=["success","info","warning","error","loading"],z7={open:L7,destroy:k7,config:B7,useMessage:R6,_InternalPanelDoNotUseOrYouWillBeFired:x7},Ky=z7;_7.forEach(e=>{Ky[e]=(...t)=>D7(e,t);});function Kf(e,t,n){return e<t?t:e>n?n:e}function H7(e){return e.value}var Xy=class A6{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 A6(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=H7(n);try{return await t(r)}finally{this.idleState.set(n,true),setTimeout(()=>this.replenish(n));}}};async function ji(e,t,n){if(!e.length)return [];n=Math.min(n,e.length);const r=Xy.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 Yy(e){const t=Xy.fromConcurrency(e,"pLimit");return function(r,...o){return t.dispatch(()=>r(...o))}}var T6=V7;function V7(e,t){const n=Xy.fromConcurrency(t,"createLimitedVersionOfFn");return function(...o){return n.dispatch(()=>e(...o))}}function O6(e,t,n,r){let o=e[t];return Yi(e,()=>{const i=e[t];Object.is(o,i)||n(o=i);},r)}const{proxyStateMap:j7,snapCache:W7}=g3(),Nd=e=>j7.has(e);function F6(e){const t=[];let n=0;const r=new Map,o=new WeakMap,i=()=>{const c=W7.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 Nd(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(!Nd(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(!Nd(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(!Nd(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=rn(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:q7,snapCache:U7}=g3(),Md=e=>typeof e=="object"?rn({x:e}).x:e,Rd=e=>q7.has(e);function xn(e){const t=[],n=new Map;let r=0;const o=new WeakMap,i=()=>{const b=U7.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=Md(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 Rd(this)||i(),n.size},has(b){const y=s(this),C=Md(b);return this.epoch,y.has(C)},add(b){if(!Rd(this))throw new Error("Cannot perform mutations on a snapshot");const y=Md(b);return n.has(y)||(n.set(y,this.index),this.data[this.index++]=y,this.epoch++),this},delete(b){if(!Rd(this))throw new Error("Cannot perform mutations on a snapshot");const y=Md(b),C=n.get(y);return C===void 0?false:(delete this.data[C],n.delete(y),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++,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=rn(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 G7=GM_info?.scriptHandler==="Userscripts";function Po(e,t=true){if(e.startsWith("/")&&(e=location.origin+e),G7){GM.openInTab(e,!t);return}GM.openInTab(e,{active:t,insert:true,setParent:true});}function Qy({storageKey:e,onUpdate:t,setPersist:n}){if(typeof GM_addValueChangeListener>"u")return;const r=Yy(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=rn({value:e()});function n(){return rt(t).value}function r(){return t.value}function o(){t.value=e();}const i=zs(o,100,{edges:["leading","trailing"]});return {state:t,use:n,get:r,update:o,updateThrottled:i}}function B6(e,t,n){let r=Ha(Yn(e),t);Yi(e,()=>{const o=Yn(e),i=Ha(o,t);Bo(r,i)||n(o),r=i;});}async function Zy(e,t){async function n(){const o=Object.keys(e);return Ha(await GM.getValue(t)||{},o)}const r=rn({...e,...await n()});return setTimeout(()=>{const o=Yy(1);Yi(r,()=>o(async()=>{const i=await n(),s=XT(i,Yn(r));GM.setValue(t,s);}));}),r}async function L6(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(){Yi(n,()=>{o&&GM.setValue(e,Array.from(Yn(n)));}),Qy({storageKey:e,setPersist:s=>o=s,onUpdate:r});}return {set:n,replaceAllWith:r}}async function D6(e,t){const r=F6(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(){Yi(r,()=>{if(!i)return;let a=Array.from(Yn(r));GM.setValue(e,a);}),Qy({storageKey:e,setPersist:a=>i=a,onUpdate:o});}return {map:r,replaceAllWith:o}}function vS(e){return ni(e)||typeof e!="object"?e:wO(e)}const K7=()=>document.querySelector(".bili-header__bar");function k6(){const e=K7();return !!(e&&globalThis.getComputedStyle(e).display==="none")}const Jy=Ks(k6);function X7(){if(!k6())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 Fs=Ks(X7);function Y7(){const e=document.documentElement.style.getPropertyValue("--navbar-bounds-padding");return e?100-Kf(Number(e.replace("%","")),2,10)*2:void 0}const e1=Ks(Y7);function Q7(){const e=e1.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 Zm=Ks(function(){return globalThis.getComputedStyle(document.documentElement).getPropertyValue("--theme-color")});function Z7(){Jy.updateThrottled(),Fs.updateThrottled(),e1.updateThrottled(),Zm.updateThrottled();}const t1=new MutationObserver(()=>Z7());t1.observe(document.documentElement,{attributes:true,attributeFilter:["style"]});t1.observe(document.body,{attributes:true,attributeFilter:["class"]});window.addEventListener("unload",()=>{t1.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(Zm.updateThrottled,1e3);},{capture:true,passive:true});const _6={maxCount:5,top:Fs.get()-4};Ky.config(_6);function J7(){const e=Fs.use();return v(Du,{message:{..._6,top:e-4},children:v(eH,{})})}let Ad,ft=Ky,Qc=I6,n1=wo;function eH(){return Ad=Du.useApp(),ft=Ad.message,Qc=Ad.notification,n1=Ad.modal,null}function qr(e){return e.filter(Boolean).filter(t=>t.test===void 0?true:typeof t.test=="boolean"?t.test:t.test()).map(t=>UT(t,["test"]))}const tH=({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"})]}),nH=f.forwardRef(tH);function Xs(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}))}Xs(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 rH=Xs(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"})}));Xs(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 oH=({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"})]})]}),iH=f.forwardRef(oH),sH=({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"})]})]}),aH=f.forwardRef(sH),lH=({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"})]})]}),cH=f.forwardRef(lH),uH=({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"})]}),dH=f.forwardRef(uH),fH=({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"})]}),z6=f.forwardRef(fH),mH=({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"})]}),Qb=f.forwardRef(mH),pH=({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"})]})]}),hH=f.forwardRef(pH),gH=({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"})]}),Jm=f.forwardRef(gH),bH=({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"})]}),vH=f.forwardRef(bH),yH=({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"})]})]}),CH=f.forwardRef(yH),xH=({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"})]})]}),wH=f.forwardRef(xH),SH=({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"})]})]}),$H=f.forwardRef(SH),EH=({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"})]})]}),IH=f.forwardRef(EH),PH=({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"})]}),NH=f.forwardRef(PH),MH=({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"})]}),RH=f.forwardRef(MH),AH=({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"})]}),TH=f.forwardRef(AH),OH=({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"})})]})]}),FH=f.forwardRef(OH),BH=({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"})]})]}),LH=f.forwardRef(BH),DH=({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"})]})]}),H6=f.forwardRef(DH),kH=({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"})]})]}),_H=f.forwardRef(kH),zH=({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"})]})]}),r1=f.forwardRef(zH),HH=({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"})]}),VH=f.forwardRef(HH),o1=iH,V6=aH,ku=cH,bo=dH,jH=z6,WH=Qb,qH=hH,j6=Jm,UH=vH,W6=nH,Zc=CH,GH=wH,KH=$H,XH=IH,i1=rH,Oi=NH,YH=RH,QH=TH,s1=FH,Zb=LH,Jb=H6,Ss=_H,q6=r1,U6=Jm,ZH="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:ZH}):v(VH,{...t})}const l1=Xs(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"})]})),G6="inline-flex items-center justify-center line-height-[0]";function ac(e){return F("span",{className:V(G6,"gap-1px"),children:[e,v(WH,{className:"size-16px"})]})}function ev(e){return F("span",{className:V(G6,"gap-1px"),children:[e,v(jH,{className:"size-16px"})]})}const K6=yT(),c1=K6.os.name?.toLowerCase()==="mac os",JH=K6.browser.name||"",u1=e=>new RegExp(String.raw`\b${e}\b`,"i").test(JH),Ys=u1("safari"),eV=u1("firefox");u1("edge");const tV=({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"})]}),nV=f.forwardRef(tV),rV=({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"})]}),oV=f.forwardRef(rV),iV=({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})]})]}),sV=f.forwardRef(iV),aV=({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"})]}),lV=f.forwardRef(aV),yS="0";function $s(e){GM.setClipboard(e),ft.success(`已复制: ${e}`);}var Wi=(e=>(e.PlayerScreenMode=`${ux}-player-screen-mode`,e.ForceAutoPlay=`${ux}-force-auto-play`,e))(Wi||{}),$i=(e=>(e.Normal="normal",e.Wide="wide",e.WebFullscreen="web",e.Fullscreen="full",e))($i||{}),d1=(e=>(e.ON="on",e.OFF="off",e))(d1||{}),un=(e=>(e.Normal="Normal",e.CurrentPage="CurrentPage",e.NormalWebFullscreen="NormalWebFullscreen",e.Popup="Popup",e.Background="Background",e.Iina="Iina",e))(un||{});const CS=Object.entries(un).reduce((e,[t,n])=>({...e,[n]:`LinkOpenMode.${t}`}),{}),Er={Normal:{icon:v(bo,{className:"size-16px"}),label:"打开",desc:"默认在新标签页中打开"},CurrentPage:{icon:v(nV,{className:"size-16px"}),label:"当前页中打开",desc:"不打开新标签页, 使用当前标签页打开, 适用于将网站作为应用安装场景"},NormalWebFullscreen:{icon:v(oV,{className:"size-15px"}),label:"打开-网页全屏",desc:v(we,{children:"默认在新标签页中打开, 打开后自动网页全屏"})},Popup:{icon:v(sV,{className:"size-15px"}),label:"小窗打开",desc:F(we,{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(lV,{className:"size-15px"}),label:"后台打开"},Iina:{icon:v(ku,{className:"size-15px"}),label:"在 IINA 中打开",enabled:c1,desc:v(we,{children:v("a",{href:"https://github.com/magicdawn/Bilibili-Gate/blob/main/notes/iina.md",target:"_blank",children:"macOS IINA 设置教程"})})}};function cV(){return new Or}const X6=cV(),tv={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"}},uV="z-2",dV="z-3",fV="z-4",mV="z-5",pV="z-6";var pr=(e=>(e.AddTimeDesc="add-time-desc",e.AddTimeAsc="add-time-asc",e.Shuffle="shuffle",e))(pr||{});function Y6(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)&&Y6(o,i,n);}return [...new Set(n)]}function Q6(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(...Q6(o,i)));}return [...new Set(n)]}function hV(e){const t=Y6(e),n=Q6(e);return t.filter(r=>!n.includes(r))}const xS={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 _t(e,t=2e3,n=document.body){const r=document.createElement("div");r.textContent=e;const o=!e.includes(`
`)&&!e.includes("<br");r.className=V(Ho,xS.default,o&&xS.singleLine),n.appendChild(r),setTimeout(()=>r.remove(),t);}function Z6(){return _t(ol)}var gV=b3();const Vn=vr(gV);var wh,wS;function bV(){return wS||(wS=1,wh=function(t){return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}),wh}var Sh,SS;function vV(){return SS||(SS=1,Sh=function(t,n){return n?t.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):t}),Sh}var $h,$S;function yV(){if($S)return $h;$S=1;var e=bV(),t=vV();return $h=function(r,o,i){var s=!e(o);return r&&(s||i===false)?t(r,o):o},$h}var CV=yV();const xV=vr(CV);var Eh,ES;function wV(){return ES||(ES=1,Eh=function(t,n){return function(){return t.apply(n,arguments)}}),Eh}var Ih,IS;function _u(){if(IS)return Ih;IS=1;var e=wV(),t=Object.prototype.toString,n=(function(O){return function(L){var j=t.call(L);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 L;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?L=ArrayBuffer.isView(O):L=O&&O.buffer&&a(O.buffer),L}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 L=Object.getPrototypeOf(O);return L===null||L===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 L="[object FormData]";return O&&(typeof FormData=="function"&&O instanceof FormData||t.call(O)===L||C(O.toString)&&O.toString()===L)}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,L){if(!(O===null||typeof O>"u"))if(typeof O!="object"&&(O=[O]),o(O))for(var j=0,Y=O.length;j<Y;j++)L.call(null,O[j],j,O);else for(var q in O)Object.prototype.hasOwnProperty.call(O,q)&&L.call(null,O[q],q,O);}function P(){var O={};function L(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],L);return O}function M(O,L,j){return E(L,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,L,j,Y){O.prototype=Object.create(L.prototype,Y),O.prototype.constructor=O,j&&Object.assign(O.prototype,j);}function D(O,L,j,Y){var q,U,K,J={};if(L=L||{},O==null)return L;do{for(q=Object.getOwnPropertyNames(O),U=q.length;U-- >0;)K=q[U],(!Y||Y(K,O,L))&&!J[K]&&(L[K]=O[K],J[K]=true);O=j!==false&&Object.getPrototypeOf(O);}while(O&&(!j||j(O,L))&&O!==Object.prototype);return L}function R(O,L,j){O=String(O),(j===void 0||j>O.length)&&(j=O.length),j-=L.length;var Y=O.indexOf(L,j);return Y!==-1&&Y===j}function B(O){if(!O)return null;if(o(O))return O;var L=O.length;if(!u(L))return null;for(var j=new Array(L);L-- >0;)j[L]=O[L];return j}var H=(function(O){return function(L){return O&&L instanceof O}})(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array));function k(O,L){for(var j=O&&O[Symbol.iterator],Y=j.call(O),q;(q=Y.next())&&!q.done;){var U=q.value;L.call(O,U[0],U[1]);}}function z(O,L){for(var j,Y=[];(j=O.exec(L))!==null;)Y.push(j);return Y}var _=r("HTMLFormElement"),W=(function(L){return function(j,Y){return L.call(j,Y)}})(Object.prototype.hasOwnProperty);return Ih={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:D,kindOf:n,kindOfTest:r,endsWith:R,toArray:B,isTypedArray:H,isFileList:y,forEachEntry:k,matchAll:z,isHTMLForm:_,hasOwnProperty:W},Ih}var Ph,PS;function J6(){if(PS)return Ph;PS=1;var e=_u();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},Ph=t,Ph}var Nh,NS;function SV(){if(NS)return Nh;NS=1;var e=J6();return Nh=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));},Nh}var $V=SV();const EV=vr($V);var Mh,MS;function IV(){return MS||(MS=1,Mh=typeof self=="object"?self.FormData:window.FormData),Mh}var Rh,RS;function PV(){return RS||(RS=1,Rh=IV()),Rh}var Ah,AS;function NV(){if(AS)return Ah;AS=1;var e=_u(),t=J6(),n=PV();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(D,R){!(e.isUndefined(D)||D===null)&&d.append(b===true?i([P],R,g):b===null?P:P+"[]",x(D));}),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 D=!(e.isUndefined(N)||N===null)&&h.call(d,N,e.isString(A)?A.trim():A,P,I);D===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 Ah=c,Ah}var Th,TS;function MV(){if(TS)return Th;TS=1;var e=NV();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("&")},Th=n,Th}var Oh,OS;function RV(){if(OS)return Oh;OS=1;var e=_u(),t=MV();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 Oh=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},Oh}var AV=RV();const TV=vr(AV);var Fh,FS;function OV(){if(FS)return Fh;FS=1;var e=_u(),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 Fh=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},Fh}var FV=OV();const BV=vr(FV);var LV=_u();const BS=vr(LV);function DV(e){return new Promise((t,n)=>{let r=e.data;const o=e.headers??{};if(BS.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 T0.AxiosError("Network Error",T0.AxiosError.ERR_NETWORK,e));},s=function(){n(new T0.AxiosError("timeout of "+e.timeout+"ms exceeded",T0.AxiosError.ECONNABORTED,e));};BS.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?BV(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}};EV(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 T0.AxiosError(`${c} is not a supported method by GM.xmlHttpRequest`)):GM.xmlHttpRequest({method:c,url:TV(xV(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});})}var lf={exports:{}},kV=lf.exports,LS;function _V(){return LS||(LS=1,(function(e,t){(function(n,r){e.exports=r();})(kV,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 B=["th","st","nd","rd"],H=R%100;return "["+R+(B[(H-20)%10]||B[H]||B[0])+"]"}},x=function(R,B,H){var k=String(R);return !k||k.length>=B?R:""+Array(B+1-k.length).join(H)+R},w={s:x,z:function(R){var B=-R.utcOffset(),H=Math.abs(B),k=Math.floor(H/60),z=H%60;return (B<=0?"+":"-")+x(k,2,"0")+":"+x(z,2,"0")},m:function R(B,H){if(B.date()<H.date())return -R(H,B);var k=12*(H.year()-B.year())+(H.month()-B.month()),z=B.clone().add(k,d),_=H-z<0,W=B.clone().add(k+(_?-1:1),d);return +(-(k+(H-z)/(_?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(B,H,k){var z;if(!B)return S;if(typeof B=="string"){var _=B.toLowerCase();I[_]&&(z=_),H&&(I[_]=H,z=_);var W=B.split("-");if(!z&&W.length>1)return R(W[0])}else {var O=B.name;I[O]=B,z=O;}return !k&&z&&(S=z),z||!k&&S},M=function(R,B){if(E(R))return R.clone();var H=typeof B=="object"?B:{};return H.date=R,H.args=arguments,new A(H)},N=w;N.l=P,N.i=E,N.w=function(R,B){return M(R,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var A=(function(){function R(H){this.$L=P(H.locale,null,true),this.parse(H),this.$x=this.$x||H.x||{},this[$]=true;}var B=R.prototype;return B.parse=function(H){this.$d=(function(k){var z=k.date,_=k.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,L=(W[7]||"0").substring(0,3);return _?new Date(Date.UTC(W[1],O,W[3]||1,W[4]||0,W[5]||0,W[6]||0,L)):new Date(W[1],O,W[3]||1,W[4]||0,W[5]||0,W[6]||0,L)}}return new Date(z)})(H),this.init();},B.init=function(){var H=this.$d;this.$y=H.getFullYear(),this.$M=H.getMonth(),this.$D=H.getDate(),this.$W=H.getDay(),this.$H=H.getHours(),this.$m=H.getMinutes(),this.$s=H.getSeconds(),this.$ms=H.getMilliseconds();},B.$utils=function(){return N},B.isValid=function(){return this.$d.toString()!==g},B.isSame=function(H,k){var z=M(H);return this.startOf(k)<=z&&z<=this.endOf(k)},B.isAfter=function(H,k){return M(H)<this.startOf(k)},B.isBefore=function(H,k){return this.endOf(k)<M(H)},B.$g=function(H,k,z){return N.u(H)?this[k]:this.set(z,H)},B.unix=function(){return Math.floor(this.valueOf()/1e3)},B.valueOf=function(){return this.$d.getTime()},B.startOf=function(H,k){var z=this,_=!!N.u(k)||k,W=N.p(H),O=function(Q,G){var ee=N.w(z.$u?Date.UTC(z.$y,G,Q):new Date(z.$y,G,Q),z);return _?ee:ee.endOf(c)},L=function(Q,G){return N.w(z.toDate()[Q].apply(z.toDate("s"),(_?[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 _?O(1,0):O(31,11);case d:return _?O(1,Y):O(0,Y+1);case u:var K=this.$locale().weekStart||0,J=(j<K?j+7:j)-K;return O(_?q-J:q+(6-J),Y);case c:case h:return L(U+"Hours",0);case l:return L(U+"Minutes",1);case a:return L(U+"Seconds",2);case s:return L(U+"Milliseconds",3);default:return this.clone()}},B.endOf=function(H){return this.startOf(H,false)},B.$set=function(H,k){var z,_=N.p(H),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)[_],L=_===c?this.$D+(k-this.$W):k;if(_===d||_===p){var j=this.clone().set(h,1);j.$d[O](L),j.init(),this.$d=j.set(h,Math.min(this.$D,j.daysInMonth())).$d;}else O&&this.$d[O](L);return this.init(),this},B.set=function(H,k){return this.clone().$set(H,k)},B.get=function(H){return this[N.p(H)]()},B.add=function(H,k){var z,_=this;H=Number(H);var W=N.p(k),O=function(Y){var q=M(_);return N.w(q.date(q.date()+Math.round(Y*H)),_)};if(W===d)return this.set(d,this.$M+H);if(W===p)return this.set(p,this.$y+H);if(W===c)return O(1);if(W===u)return O(7);var L=(z={},z[a]=r,z[l]=o,z[s]=n,z)[W]||1,j=this.$d.getTime()+H*L;return N.w(j,this)},B.subtract=function(H,k){return this.add(-1*H,k)},B.format=function(H){var k=this,z=this.$locale();if(!this.isValid())return z.invalidDate||g;var _=H||"YYYY-MM-DDTHH:mm:ssZ",W=N.z(this),O=this.$H,L=this.$m,j=this.$M,Y=z.weekdays,q=z.months,U=z.meridiem,K=function(G,ee,oe,re){return G&&(G[ee]||G(k,_))||oe[ee].slice(0,re)},J=function(G){return N.s(O%12||12,G,"0")},Q=U||function(G,ee,oe){var re=G<12?"AM":"PM";return oe?re.toLowerCase():re};return _.replace(y,function(G,ee){return ee||(function(oe){switch(oe){case "YY":return String(k.$y).slice(-2);case "YYYY":return N.s(k.$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 k.$D;case "DD":return N.s(k.$D,2,"0");case "d":return String(k.$W);case "dd":return K(z.weekdaysMin,k.$W,Y,2);case "ddd":return K(z.weekdaysShort,k.$W,Y,3);case "dddd":return Y[k.$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,L,true);case "A":return Q(O,L,false);case "m":return String(L);case "mm":return N.s(L,2,"0");case "s":return String(k.$s);case "ss":return N.s(k.$s,2,"0");case "SSS":return N.s(k.$ms,3,"0");case "Z":return W}return null})(G)||W.replace(":","")})},B.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},B.diff=function(H,k,z){var _,W=this,O=N.p(k),L=M(H),j=(L.utcOffset()-this.utcOffset())*r,Y=this-L,q=function(){return N.m(W,L)};switch(O){case p:_=q()/12;break;case d:_=q();break;case m:_=q()/3;break;case u:_=(Y-j)/6048e5;break;case c:_=(Y-j)/864e5;break;case l:_=Y/o;break;case a:_=Y/r;break;case s:_=Y/n;break;default:_=Y;}return z?_:N.a(_)},B.daysInMonth=function(){return this.endOf(d).$D},B.$locale=function(){return I[this.$L]},B.locale=function(H,k){if(!H)return this.$L;var z=this.clone(),_=P(H,k,true);return _&&(z.$L=_),z},B.clone=function(){return N.w(this.$d,this)},B.toDate=function(){return new Date(this.valueOf())},B.toJSON=function(){return this.isValid()?this.toISOString():null},B.toISOString=function(){return this.$d.toISOString()},B.toString=function(){return this.$d.toUTCString()},R})(),D=A.prototype;return M.prototype=D,[["$ms",i],["$s",s],["$m",a],["$H",l],["$W",c],["$M",d],["$y",p],["$D",h]].forEach(function(R){D[R[1]]=function(B){return this.$g(B,R[0],R[1])};}),M.extend=function(R,B){return R.$i||(R(B,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});})(lf)),lf.exports}var zV=_V();const nn=vr(zV),Bh=()=>nn().format("YYYY-MM-DD");function eN(e){async function t(){const n=Bh();(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}:${Bh()}`,n);},get(){return t(),GM.getValue(`${e}:${Bh()}`)}}}const HV=(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);!VV(o,i)&&r||Object.defineProperty(e,n,i);},VV=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)},jV=(e,t)=>{const n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n);},WV=(e,t)=>`/* Wrapped ${e}*/
${t}`,qV=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),UV=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),GV=(e,t,n)=>{const r=n===""?"":`with ${n.trim()}() `,o=WV.bind(null,r,t.toString());Object.defineProperty(o,"name",UV);const{writable:i,enumerable:s,configurable:a}=qV;Object.defineProperty(e,"toString",{value:o,writable:i,enumerable:s,configurable:a});};function KV(e,t,{ignoreNonConfigurable:n=false}={}){const{name:r}=e;for(const o of Reflect.ownKeys(t))HV(e,t,o,n);return jV(e,t),GV(e,t,r),e}const XV=new WeakMap;function f1(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 KV(s,e,{ignoreNonConfigurable:true}),XV.set(s,o),s}function ci(e,t){return t??=(...n)=>JSON.stringify(n),f1(e,{cache:false,cacheKey(n){return t(...n)}})}async function ep(e){const{img_key:t,sub_key:n}=await YV(),r=JV(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 tN=eN("wbi-keys"),YV=ci(async function(){const e=await tN.get();return e?.val&&e?.ts&&Date.now()-e.ts<=Vn("6h")?e.val:QV()});async function QV(){const t=(await T0.get("/x/web-interface/nav",{baseURL:v3})).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 tN.set({val:o,ts:Date.now()}),o}const ZV=[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 JV(e){return ZV.map(t=>e[t]).join("").slice(0,32)}function nN(e,t,n){e.appkey=t;const r=new URLSearchParams(e);return r.sort(),sparkMd5.hash(r.toString()+n)}const Tt=T0.create({baseURL:v3,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=T0.create({adapter:DV}),DS=Va.appkey,ej=Va.appsec;tp.interceptors.request.use(function(e){return e.params={appkey:DS,access_key:Ue.accessKey||"",...e.params},e.params.sign=nN(e.params,DS,ej),e});tp.interceptors.response.use(e=>{if(e.config.responseType==="json"&&e.data&&e.data instanceof ArrayBuffer){const t=new TextDecoder,n=new Uint8Array(e.data),r=t.decode(n);e.data=r;try{e.data=JSON.parse(r);}catch{}}return e});function m1(){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 Qs(){const e=m1().bili_jct;if(!e)throw _t("找不到 csrf token, 请检查是否登录"),new Error("找不到 csrf token, 请检查是否登录");return e}function Br(){return m1().DedeUserID}function np(){return !!m1().DedeUserID}const nv=Ks(()=>({cookie:document.cookie,logined:np()}));function rN(){return nv.update(),nv.state.value.logined}function p1(){return nv.use().logined}async function kS(){return (await Tt.get("https://member.bilibili.com/x/web/draft/list")).data.artlist?.drafts||[]}async function Lh(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:Qs(),...e}),n=(await Tt.post("/x/article/creative/draft/addupdate",t)).data,r=n?.data?.aid?.toString(),o=cn(n);return o||_t(n.message||"addupdate error"),{success:o,aid:r}}async function tj(e){return (await Tt.get("/x/article/creative/draft/view",{params:{aid:e}})).data?.data?.content||""}class nj{title;constructor(t){this.title=t;}getData=async()=>{const{title:t}=this,r=(await kS()).find(l=>l.title===t);if(!r){const{success:l,aid:c}=await Lh({title:t});return}const o=await tj(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 kS()).find(a=>a.title===n);if(s)this._aid=s.id.toString();else {const{success:a,aid:l}=await Lh({title:n});if(!a)return  false;this._aid=l;}}const r=JSON.stringify(t),{success:o}=await Lh({aid:this._aid,title:n,content:`<p>${r}</p>`,words:r.length.toString()});return o}}const rj=zn.extend("settings"),oN=new nj(uo),iN=["accessKey","accessKeyExpireAt"],oj=()=>[...iN,...Xf,"backupSettingsToArticleDraft","fav.addSeparator","watchlaterAddSeparator","watchlaterItemsOrder","popularWeeklyUseShuffle","popularGeneralUseAnonymous"],ij=[...iN,"backupSettingsToArticleDraft"];let sN=false;function aN(e){sN=e;}let Dh;const sj=zs(oN.setData,Vn("5s"));async function aj(e){if(!e.backupSettingsToArticleDraft||sN)return;const{pickedSettings:t}=fl(e,Zi,oj());if(!Dh||!Bo(Dh,t))try{await sj(t),Dh=t,rj("backup to article draft complete");}catch(r){console.error(r.stack||r);}}const lj=zn.extend("settings"),zu={accessKey:"",accessKeyExpireAt:0,pureRecommend:true,appRecommend:{addOtherTabContents:false},showModalFeedOnLoad:false,showModalFeedEntry:false,modalFeedFullScreen:false,grid:{useCustomGrid:true,gridDisplayMode:Os.NormalGrid,twoColumnModeAlign:FP.Center},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,dynamicFeed:{showLive:true,followGroup:{enabled:true,forceUseMergeTimelineIds:[]},whenViewAll:{enableHideSomeContents:false,hideIds:[]},advancedSearch:false,__internal:{cacheAllItemsEntry:false,cacheAllItemsUpMids:[],externalSearchInput:false}},watchlaterAddSeparator:true,watchlaterItemsOrder:pr.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:[ze.KeepFollowOnly,ze.Live],customTabKeysOrder:[],multiSelect:{clearWhenExit:true,showIcon:true},__internalEnableCopyBvidInfo:false,__internalAddCopyBvidButton:false,__internalHotSubUseDropdown:false,__internalRecTabRenderAsSegments:false},Ue=rn(_a(zu)),Zi=hV(zu),Xf=Zi.filter(e=>e.includes("__internal")&&typeof tr(zu,e)=="boolean");lj("allowedLeafSettingsPaths = %O, internalBooleanPaths = %O",Zi,Xf);function Mt(){return rt(Ue)}function Hu(){return Yn(Ue)}const h1="settings";async function lN(){const e=await GM.getValue(h1);return !e||typeof e!="object"?{}:(g1(e),fl(e,Zi).pickedSettings)}async function cj(){const e=await lN();vo(e),Yi(Ue,()=>{uj();}),Qy({storageKey:h1,setPersist(t){cN=t;},onUpdate(t){vo(t);}});}async function uj(){const e=_a(Yn(Ue));await dj(e),await aj(e);}let cN=true;async function dj(e){cN&&await GM.setValue(h1,e);}function vo(e){const{pickedPaths:t}=fl(e,Zi);for(const n of t){const r=tr(e,n);rl(Ue,n,r);}}function fj(){return vo(zu)}function g1(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=>!ni(i);o(tr(e,n))||o(tr(e,r))&&rl(e,n,tr(e,r));}}function fl(e,t,n=[]){const r={},o=t.filter(i=>Zi.includes(i)&&!n.includes(i)&&!ni(tr(e,i)));return o.forEach(i=>{const s=tr(e,i);rl(r,i,s);}),{pickedPaths:o,pickedSettings:r}}function uN(e){const t=Mt();return tr(t,e)}async function rp(e){const t=await lN();return tr(t,e)||tr(Hu(),e)}function mj(e,t){rl(Ue,e,t);}async function ii(e,{add:t,remove:n}){const r=await rp(e),o=new Set(r);for(const i of t??[])o.add(i);for(const i of n??[])o.delete(i);mj(e,Array.from(o));}await( cj());Vo&&Ue.accessKey&&Ue.accessKeyExpireAt&&Date.now()>=Ue.accessKeyExpireAt&&_t("access_key 已过期, 请重新获取 !!!");var cf={exports:{}},pj=cf.exports,_S;function hj(){return _S||(_S=1,(function(e,t){(function(n,r){e.exports=r();})(pj,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 D=A.slice(2).map(function(R){return R!=null?Number(R):0});return this.$d.years=D[0],this.$d.months=D[1],this.$d.weeks=D[2],this.$d.days=D[3],this.$d.hours=D[4],this.$d.minutes=D[5],this.$d.seconds=D[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"),D=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 B=x(R,"S"),H=E.negative||P.negative||N.negative||A.negative||D.negative||B.negative,k=A.format||D.format||B.format?"T":"",z=(H?"-":"")+"P"+E.format+P.format+N.format+k+A.format+D.format+B.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 D=E.locale();return h(N,{$l:D},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)};}});})(cf)),cf.exports}var gj=hj();const bj=vr(gj);var vj={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 rv(){return rv=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},rv.apply(this,arguments)}const yj=(e,t)=>f__namespace.createElement(on,rv({},e,{ref:t,icon:vj})),Cj=f__namespace.forwardRef(yj);function ov(e){return Dn(e)&&e===e.window}const dN=e=>{if(typeof window>"u")return 0;let t=0;return ov(e)?t=e.pageYOffset:e instanceof Document?t=e.documentElement.scrollTop:(e instanceof HTMLElement||e)&&(t=e.scrollTop),e&&!ov(e)&&typeof t!="number"&&(t=(e.ownerDocument??e).documentElement?.scrollTop),t};function xj(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 wj(e,t={}){const{getContainer:n=()=>window,callback:r,duration:o=450}=t,i=n(),s=dN(i),a=Date.now();let l;const c=()=>{const d=Date.now()-a,m=xj(d>o?o:d,s,e,o);ov(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 Sj(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 Yf=f.createContext(null);var $j={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 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 Ej=(e,t)=>f__namespace.createElement(on,iv({},e,{ref:t,icon:$j})),fN=f__namespace.forwardRef(Ej),Ij=e=>Dn(e)?typeof e=="object"&&!f.isValidElement(e)?e:{title:e}:null,zS=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:V(`${t}-only-unit`,{current:r})},n)};function Pj(e,t,n){let r=e,o=0;for(;(r+10)%10!==t;)r+=n,o+=n;return o}const Nj=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(zS,{...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(zS,{...e,key:C,value:w,offset:g<0?x-b:x,current:x===b})}),m={transform:`translateY(${-Pj(s,o,g)}00%)`};}return f__namespace.createElement("span",{className:`${t}-only`,style:m,onTransitionEnd:u},d)},Mj=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:V(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(Nj,{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:V(`${p}-custom-component`,b?.className,i)})):f__namespace.createElement(c,{...h,ref:t},g)}),Rj=new ht("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),Aj=new ht("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),Tj=new ht("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),Oj=new ht("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),Fj=new ht("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),Bj=new ht("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),Lj=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=_m(e,(b,{darkColor:y})=>({[`&${t} ${t}-color-${b}`]:{background:y,[`&:not(${t}-count)`]:{color:y},"a:hover &":{background:y}}}));return {[t]:{...Bt(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:Bj,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:Rj,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:Aj,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`${t}-zoom-leave`]:{animationName:Tj,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:Oj,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:Fj,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%)"}}}}},mN=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%)"})},pN=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}},Dj=wt("Badge",e=>{const t=mN(e);return Lj(t)},pN),kj=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}=$t("badge"),N=S("badge",n),[A,D]=Dj(N),R={...e,overflowCount:c,size:d,dot:u,showZero:x},[B,H]=It([P,y],[M,C],{props:R}),k=l>c?`${c}+`:l,z=k==="0"||k===0||s==="0"||s===0,_=l===null||z&&!x,W=(Dn(i)||Dn(a))&&_,O=Dn(i)||!z,L=u&&!z,j=L?"":k,Y=f.useMemo(()=>((!Dn(j)||j==="")&&(!Dn(s)||s==="")||z&&!x)&&!L,[j,z,x,L,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(L);Y||(Q.current=L);const G=f.useMemo(()=>{if(!p)return {...E,...h};const Ee=Number.parseInt(p[0],10);return {...{marginTop:p[1],insetInlineEnd:-Ee},...E,...h}},[p,h,E]),ee=m??(typeof U=="string"||typeof U=="number"?U:void 0),oe=!Y&&(s===0?x:!!s&&s!==true),re=oe?f__namespace.createElement("span",{className:`${N}-status-text`},s):null,he=!U||typeof U!="object"?void 0:Rn(U,Ee=>({style:{...G,...Ee.style}})),Z=Km(a,false),te=V(B.indicator,{[`${N}-status-dot`]:W,[`${N}-status-${i}`]:!!i,[`${N}-color-${a}`]:Z}),ce={};a&&!Z&&(ce.color=a,ce.background=a);const ue=V(N,{[`${N}-status`]:W,[`${N}-not-a-wrapper`]:!o,[`${N}-rtl`]:I==="rtl"},g,b,$,B.root,A,D);if(!o&&W&&(s||O||!_)){const Ee=G.color;return f__namespace.createElement("span",{...w,className:ue,style:{...H.root,...G}},f__namespace.createElement("span",{className:te,style:{...H.indicator,...ce}}),oe&&f__namespace.createElement("span",{style:{color:Ee},className:`${N}-status-text`},s))}return f__namespace.createElement("span",{ref:t,...w,className:ue,style:H.root},o,f__namespace.createElement(Jn,{visible:!Y,motionName:`${N}-zoom`,motionAppear:false,motionDeadline:1e3},({className:Ee})=>{const Re=S("scroll-number",r),be=Q.current,le=V(B.indicator,{[`${N}-dot`]:be,[`${N}-count`]:!be,[`${N}-count-sm`]:d==="small",[`${N}-multiple-words`]:!be&&J&&J.toString().length>1,[`${N}-status-${i}`]:!!i,[`${N}-color-${a}`]:Z});let ae={...H.indicator,...G};return a&&!Z&&(ae=ae||{},ae.background=a),f__namespace.createElement(Mj,{prefixCls:Re,show:!Y,motionClassName:Ee,className:le,count:J,title:ee,style:ae,key:"scrollNumber"},he)}),re)}),_j=e=>{const{antCls:t,badgeFontHeight:n,marginXS:r,badgeRibbonOffset:o,calc:i}=e,s=`${t}-ribbon`,a=`${t}-ribbon-wrapper`,l=_m(e,(c,{darkColor:u})=>({[`&${s}-color-${c}`]:{background:u,color:u}}));return {[a]:{position:"relative"},[s]:{...Bt(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"}}}},zj=wt(["Badge","Ribbon"],e=>{const t=mN(e);return _j(t)},pN),Hj=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}=$t("ribbon"),y=d("ribbon",n),C=`${y}-wrapper`,[x,w]=zj(y,C),S={...e,placement:a},[I,$]=It([g,u],[b,c],{props:S}),E=Km(o,false),P=V(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:V(C,l,x,w,I.root),style:$.root},i,f__namespace.createElement("div",{className:V(P,x),style:{...M,...$.indicator,...h,...r}},f__namespace.createElement("span",{className:V(`${y}-content`,I.content),style:$.content},s),f__namespace.createElement("div",{className:`${y}-corner`,style:N})))},op=kj;op.Ribbon=Hj;const Vj=e=>{const{componentCls:t,floatButtonSize:n,iconCls:r,antCls:o,floatButtonIconSize:i}=e,s=fy(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}}}]}},jj=e=>{const{componentCls:t,antCls:n,floatButtonSize:r,padding:o}=e,i=`${t}-group`,s=`${i}-list`,a=fy(n,"float-btn");return {[i]:[{[a("list-transform-start")]:`translate(0,${X(r)})`,[a("list-trigger-offset")]:`calc(${X(r)} + ${X(o)})`},{...Bt(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)}}}]}},Wj=()=>({}),hN=wt("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 [Vj(s),jj(s),Iy(e)]},Wj,{order:-998}),ip="float-btn",qj=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(Yf),x=b(ip,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},[D,R]=hN(x,w),B=f.useMemo(()=>({icon:`${x}-icon`,content:`${x}-content`}),[x]),[H,k]=It([B,$,p],[E,h],{props:A}),z=!N&&!l?f.createElement(fN,null):l,[_]=Us("FloatButton",i?.zIndex),W={...i,zIndex:_},O=Zt(m,["title","children","status","text"]),L="badge"in e&&f.createElement(op,{...O,className:V(O.className,`${x}-badge`,{[`${x}-badge-dot`]:O.dot})}),j=Ij(d);let Y=f.createElement(Je,{...g,ref:t,className:V(D,R,w,x,r,o,`${x}-${s}`,`${x}-${P}`,{[`${x}-rtl`]:y==="rtl",[`${x}-individual`]:M,[`${x}-icon-only`]:!N}),classNames:H,styles:k,style:W,shape:P,type:s,size:"large",icon:z,_skipSemantic:true},N,L);return j&&(Y=f.createElement(Qi,{...j},Y)),Y}),Zs=qj,Uj=f.createElement(Cj,null),gN=f.forwardRef((e,t)=>{const{backTopIcon:n}=$t("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??Uj,[h,g]=f.useState(a===0),b=f.useRef(null);f.useImperativeHandle(t,()=>({nativeElement:b.current}));const y=()=>b.current?.ownerDocument||window,C=Sj(M=>{const N=dN(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=>{wj(0,{getContainer:c||y,duration:d}),u?.(M);},{getPrefixCls:w}=f.useContext(ot),S=w(ip,r),I=w(),E=f.useContext(Yf)?.shape||s,P={prefixCls:S,icon:p,type:i,shape:E,...m};return f.createElement(Jn,{visible:h,motionName:`${I}-fade`},({className:M},N)=>f.createElement(Zs,{ref:In(b,N),...P,onClick:x,className:V(o,M)}))});function Qf(e){return ["small","middle","large"].includes(e)}function HS(e){return e?typeof e=="number"&&!Number.isNaN(e):false}const bN=["wrap","nowrap","wrap-reverse"],vN=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],yN=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],Gj=(e,t)=>{const n=t.wrap===true?"wrap":t.wrap;return {[`${e}-wrap-${n}`]:n&&bN.includes(n)}},Kj=(e,t)=>{const n={};return yN.forEach(r=>{n[`${e}-align-${r}`]=t.align===r;}),n[`${e}-align-stretch`]=!t.align&&!!t.vertical,n},Xj=(e,t)=>{const n={};return vN.forEach(r=>{n[`${e}-justify-${r}`]=t.justify===r;}),n},Yj=(e,t)=>V({...Gj(e,t),...Kj(e,t),...Xj(e,t)}),Qj=e=>{const{componentCls:t}=e;return {[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},Zj=e=>{const{componentCls:t}=e;return {[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},Jj=e=>{const{componentCls:t}=e,n={};return bN.forEach(r=>{n[`${t}-wrap-${r}`]={flexWrap:r};}),n},eW=e=>{const{componentCls:t}=e,n={};return yN.forEach(r=>{n[`${t}-align-${r}`]={alignItems:r};}),n},tW=e=>{const{componentCls:t}=e,n={};return vN.forEach(r=>{n[`${t}-justify-${r}`]={justifyContent:r};}),n},nW=()=>({}),rW=wt("Flex",e=>{const{paddingXS:t,padding:n,paddingLG:r}=e,o=vt(e,{flexGapSM:t,flexGap:n,flexGapLG:r});return [Qj(o),Zj(o),Jj(o),eW(o),tW(o)]},nW,{resetStyle:false}),oW=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]=rW(b),[,x]=qs(c,l??p?.vertical),w=V(o,r,p?.className,b,y,C,Yj(b,e),{[`${b}-rtl`]:h==="rtl",[`${b}-gap-${a}`]:Qf(a),[`${b}-vertical`]:x}),S={...p?.style,...i};return Dn(s)&&(S.flex=s),Dn(a)&&!Qf(a)&&(S.gap=a),f.createElement(u,{ref:t,className:w,style:S,...Zt(m,["justify","wrap","align"])},d)}),qi=(e,t,n)=>V({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:n}),ml=(e,t)=>t||e,iW=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}}]}},sW=wt(["Space","Addon"],e=>[iW(e),ul(e,{focus:false})]),CN=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]=sW(m),{compactItemClassnames:g,compactSize:b}=li(m,d),y=qi(m,l),C=V(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)}),xN=f.createContext({latestIndex:0}),aW=xN.Provider,lW=e=>{const{className:t,prefix:n,index:r,children:o,separator:i,style:s,classNames:a,styles:l}=e,{latestIndex:c}=f__namespace.useContext(xN);return Dn(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:V(`${n}-item-separator`,a.separator),style:l.separator},i)):null},cW=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"}}}},uW=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}}}},dW=wt("Space",e=>{const t=vt(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return [cW(t),uW(t)]},()=>({}),{resetStyle:false}),fW=f__namespace.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r,size:o,className:i,style:s,classNames:a,styles:l}=$t("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),D=HS(M),R=HS(P),B=hr(p,{keepEmpty:true}),[H,k]=qs(g,w,h),z=u===void 0&&!k?"center":u,_=C??y,W=n("space",b),[O,L]=dW(W),j={...e,size:c,orientation:H,align:z},[Y,q]=It([a,I],[l,$],{props:j}),U=V(W,i,O,`${W}-${H}`,{[`${W}-rtl`]:r==="rtl",[`${W}-align-${z}`]:z,[`${W}-gap-row-${M}`]:N,[`${W}-gap-col-${P}`]:A},d,m,L,Y.root),K=V(`${W}-item`,Y.item),J=B.map((ee,oe)=>{const re=ee?.key||`${K}-${oe}`;return f__namespace.createElement(lW,{prefix:W,classNames:Y,styles:q,className:K,key:re,index:oe,separator:_,style:q.item},ee)}),Q=f__namespace.useMemo(()=>({latestIndex:B.reduce((oe,re,he)=>Dn(re)?he:oe,0)}),[B]);if(B.length===0)return null;const G={};return S&&(G.flexWrap="wrap"),!A&&R&&(G.columnGap=P),!N&&D&&(G.rowGap=M),f__namespace.createElement("div",{ref:t,className:U,style:{...G,...q.root,...s,...x},...E},f__namespace.createElement(aW,{value:Q},J))}),Fr=fW;Fr.Compact=wy;Fr.Addon=CN;const wN=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(fN,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}=$t("floatButtonGroup"),P=d??w??f.createElement(ai,null),M=x(ip,t),N=sn(M),[A,D]=hN(M,N),R=`${M}-group`,B=m&&["click","hover"].includes(m),[H]=Us("FloatButton",r?.zIndex),k=f.useRef(null),z=["top","left","right","bottom"].includes(c)?c:"top",[_,W]=Lt(false,g),O=m==="hover",L=m==="click",j=at(te=>{_!==te&&(W(te),h?.(te));}),Y=()=>{O&&j(true);},q=()=>{O&&j(false);},U=te=>{L&&j(!_),b?.(te);};f.useEffect(()=>{if(L){const te=ce=>{k.current?.contains(ce.target)||j(false);};return document.addEventListener("click",te,{capture:true}),()=>document.removeEventListener("click",te,{capture:true})}},[L]);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]),oe=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 re;const he=`${R}-list`,Z=te=>{const ce=z==="top"||z==="bottom",ue={className:V(he,Q.list,te),style:G.list};return K?re=f.createElement(oW,{vertical:ce,...ue},p):re=f.createElement(Fr.Compact,{vertical:ce,...ue},p),re};return f.createElement(Yf.Provider,{value:ee},f.createElement("div",{className:V(R,A,D,N,$,Q.root,n,s,{[`${R}-rtl`]:C==="rtl",[`${R}-individual`]:K,[`${R}-${z}`]:B,[`${R}-menu-mode`]:B}),style:{...E,zIndex:H,...G.root,...r},ref:k,onMouseEnter:Y,onMouseLeave:q},B?f.createElement(Jn,{visible:_,motionName:`${he}-motion`},({className:te})=>Z(te)):Z(),B&&f.createElement(Yf.Provider,{value:oe},f.createElement(Zs,{type:l,icon:_?P:u,"aria-label":e["aria-label"],className:`${R}-trigger`,onClick:U,...y}))))},VS=({backTop:e,...t})=>e?f__namespace.createElement(gN,{...t,visibilityHeight:0}):f__namespace.createElement(Zs,{...t}),mW=({className:e,items:t,classNames:n,styles:r,prefixCls:o,...i})=>{const{getPrefixCls:s}=f__namespace.useContext(ot),l=`${s(ip,o)}-pure`;return t?f__namespace.createElement(wN,{className:V(e,l),classNames:n,styles:r,...i},t.map((c,u)=>f__namespace.createElement(VS,{key:u,...c}))):f__namespace.createElement(VS,{className:V(e,l),classNames:n,styles:r,...i})};Zs.BackTop=gN;Zs.Group=wN;Zs._InternalPanelDoNotUseOrYouWillBeFired=mW;const pW=e=>{const t=e?.algorithm?Mf(e.algorithm):oy,n={...Wa,...e?.token};return K3(n,{override:e?.token},t,cI)};function hW(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 gW=(e,t)=>{const n=t??Fm(e),r=n.fontSizeSM,o=n.controlHeight-4;return {...n,...hW(t??e),...lI(r),controlHeight:o,...aI({...n,controlHeight:o})}},_r=(e,t)=>new Ft(e).setA(t).toRgbString(),cs=(e,t)=>new Ft(e).lighten(t).toHexString(),bW=e=>{const t=$u(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]}},vW=(e,t)=>{const n=e||"#000",r=t||"#fff";return {colorBgBase:n,colorTextBase:r,colorText:_r(r,.85),colorTextSecondary:_r(r,.65),colorTextTertiary:_r(r,.45),colorTextQuaternary:_r(r,.25),colorFill:_r(r,.18),colorFillSecondary:_r(r,.12),colorFillTertiary:_r(r,.08),colorFillQuaternary:_r(r,.04),colorBgSolid:_r(r,.95),colorBgSolidHover:_r(r,1),colorBgSolidActive:_r(r,.9),colorBgElevated:cs(n,12),colorBgContainer:cs(n,8),colorBgLayout:cs(n,0),colorBgSpotlight:cs(n,26),colorBgBlur:_r(r,.04),colorBorder:cs(n,26),colorBorderDisabled:cs(n,26),colorBorderSecondary:cs(n,19)}},yW=(e,t)=>{const n=Object.keys(ry).map(i=>{const s=$u(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??Fm(e),o=sI(e,{generateColorPalettes:bW,generateNeutralColorPalettes:vW});return {...r,...n,...o,colorPrimaryBg:o.colorPrimaryBorder,colorPrimaryBgHover:o.colorPrimaryBorderHover}};function CW(){const[e,t,n,r]=Tn();return {theme:e,token:t,hashId:n,cssVar:r}}const Zf={defaultSeed:kc.token,useToken:CW,defaultAlgorithm:Fm,darkAlgorithm:yW,compactAlgorithm:gW,getDesignToken:pW,defaultConfig:kc,_internalContext:iy};function jS(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,true)}function WS(e,t,n){var r=[],o=by(e,r,n);return r.length<2?n:o+t(r)}var SN=function(t){var n=uP(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 vy(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 jS(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);jS(n,d);},s=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return WS(n.registered,r,xW(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:by.bind(null,n.registered),merge:WS.bind(null,n.registered,r)}},xW=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},$N=SN({key:"css"}),qS=$N.css,EN=$N.cache,US=function(t,n){var r=arguments;if(n==null||!Ru.call(n,"css"))return f__namespace.createElement.apply(void 0,r);var o=r.length,i=new Array(o);i[0]=Cy,i[1]=yy(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={}));})(US||(US={}));var sv=hP(function(e,t){var n=e.styles,r=Oa([n],void 0,f__namespace.useContext(gP)),o=f__namespace.useRef();return kw(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]),kw(function(){var i=o.current,s=i[0],a=i[1];if(a){i[1]=false;return}if(r.next!==void 0&&vy(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 kt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Oa(t)}var _l={},kh={exports:{}},GS;function b1(){return GS||(GS=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;})(kh)),kh.exports}var zl={},KS;function wW(){if(KS)return zl;KS=1,Object.defineProperty(zl,"__esModule",{value:true}),zl.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 zl.default=e,zl}var Hl={},Vl={},jl={},Wl={},XS;function SW(){return XS||(XS=1,Object.defineProperty(Wl,"__esModule",{value:true}),Wl.commonLocale=void 0,Wl.commonLocale={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:true}),Wl}var YS;function $W(){if(YS)return jl;YS=1,Object.defineProperty(jl,"__esModule",{value:true}),jl.default=void 0;var e=SW();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 jl.default=a,jl}var ql={},QS;function IN(){if(QS)return ql;QS=1,Object.defineProperty(ql,"__esModule",{value:true}),ql.default=void 0;const e={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]};return ql.default=e,ql}var ZS;function PN(){if(ZS)return Vl;ZS=1;var e=b1().default;Object.defineProperty(Vl,"__esModule",{value:true}),Vl.default=void 0;var t=e($W()),n=e(IN());const r={lang:{placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"],...t.default},timePickerLocale:{...n.default}};return r.lang.ok="确定",Vl.default=r,Vl}var JS;function EW(){if(JS)return Hl;JS=1;var e=b1().default;Object.defineProperty(Hl,"__esModule",{value:true}),Hl.default=void 0;var t=e(PN());return Hl.default=t.default,Hl}var e$;function IW(){if(e$)return _l;e$=1;var e=b1().default;Object.defineProperty(_l,"__esModule",{value:true}),_l.default=void 0;var t=e(wW()),n=e(EW()),r=e(PN()),o=e(IN());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 _l.default=s,_l}var _h,t$;function PW(){return t$||(t$=1,_h=IW()),_h}var NW=PW();const MW=vr(NW),RW="--bilibili-gate--font",AW="--bilibili-gate--video-card--border-radius",NN="--bilibili-gate--primary-color",TW="--bilibili-gate--border-color",MN="--bilibili-gate--text-color",RN="--bilibili-gate--bg",OW="--bilibili-gate--bg-lv1",FW="--bilibili-gate--bg-lv2",BW="--bilibili-gate--bg-lv3",LW="#ff6699",DW='"Alibaba PuHuiTi 3.0", "PingFang SC", HarmonyOS_Regular, "Helvetica Neue", "Microsoft YaHei", sans-serif',AN="var(--custom-font-family--options--font-family, var(--bilibili-gate--font))",kW="bilibili-gate-root",TN="bilibili-gate-using-dark",ON="html.bilibili-gate-using-dark",_W="1001",zW="10003",av="11000",FN="11200",BN="11300",HW="90000",ui={appCustomFontId:RW,appVideoCardBorderRadiusId:AW,appPrimaryColorId:NN,appBorderColorId:TW,appTextColorId:MN,appBgId:RN,appBgLv1Id:OW,appBgLv2Id:FW,appBgLv3Id:BW,biliPink:LW,appCustomFontValue:DW,appUsingFont:AN,appClsRoot:kW,appClsDark:TN,appClsDarkSelector:ON,zIndexRecHeader:_W,zIndexBaseModal:zW,zIndexAntdPopupBase:av,zIndexVideoCardLargePreview:FN,zIndexVideoCardContextMenu:BN,zIndexToast:HW},n$=zn.extend("utility:dom"),LN=10*1e3,DN=200;async function pl(e,t){const n=t?.interval??DN;let r=t?.timeout??LN;r===0&&(r=1/0);const o=t?.validate??(a=>!ni(a)),i=performance.now();let s=e();for(;!o(s)&&performance.now()-i<r;)await zt(n),s=e();return s}async function sp(e,t,n){const r=n?.pollTimeout??LN,o=n?.pollInterval??DN,i=n?.selectorPredicate,s=n?.warnOnTimeout??false,a=await pl(()=>{let l=Array.from(document.querySelectorAll(e));if(i&&(l=l.filter(i)),l.length)return l},{timeout:r,interval:o});if(!a?.length){n$("tryAction: timeout for selector = `%s`",e),s&&po("tryAction timeout, selector = `%s`",e);return}n$("tryAction: selector=`%s` count=%s",e,a.length);for(const l of a)await Promise.resolve(t(l));}async function Ba(e,t,n){return sp(e,r=>r.remove(),{selectorPredicate:t,warnOnTimeout:false})}function di(){const e=document.activeElement?.tagName?.toLowerCase()??"";return !!(["input","textarea"].includes(e)||document.querySelector(".center-search__bar.is-focus"))}function VW(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 ap(e){return new Promise(t=>{typeof requestIdleCallback=="function"?requestIdleCallback(()=>t(),e):setTimeout(t);})}let zh="";function v1(e){zh||(zh=document.title),document.title=`${e} - ${zh}`;}const Jc={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}}},r$=e=>{const t=e.getDetectEl();return t?e.detect(t):false},Vu=Ks(()=>r$(Jc.Bili)||r$(Jc.Evolved)||document.body.classList.contains("bilibili-helper-dark-mode")||document.documentElement.classList.contains("dark"));function y1(){return Vu.use()}const kN=()=>{document.documentElement.classList.toggle(TN,Vu.get());};kN();Yi(Vu.state,kN);const lp=new MutationObserver(async()=>{await zt(0),Vu.updateThrottled();});lp.observe(document.body,{attributes:true,attributeFilter:["class"]});lp.observe(document.documentElement,{attributes:true,attributeFilter:["data-darkreader-scheme"]});jW();async function jW(){const e=await pl(Jc.Bili.getDetectEl);e&&lp.observe(e,{attributes:true});}document.addEventListener("click",_N,{passive:true});async function _N(e){const t=e.target;(Jc.Bili.isTrigger(t)||t.closest(Jc.Evolved.trigger))&&(await zt(0),Vu.updateThrottled());}window.addEventListener("unload",()=>{lp.disconnect(),document.removeEventListener("click",_N);});const WW=zn.extend("components:css-vars");WW(":export = %O",ui);const Ji=e=>(e.startsWith("--")||(e=`--${e}`),`var(${e})`),C1=Ji(ui.appVideoCardBorderRadiusId),Ui=Ji(ui.appPrimaryColorId),x1=Ji(ui.appBorderColorId);Ji(ui.appTextColorId);const qW=Ji(ui.appBgId),lv=Ji(ui.appBgLv1Id),UW=Ji(ui.appBgLv2Id);Ji(ui.appBgLv3Id);const hl={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 GW(){return Zf.useToken().token.colorPrimaryHover}function gl(){const{popoverBorderColorUseColorPrimary:e}=rt(Ue.style.general),t=GW();return e?t:x1}function KW(){const{colorLink:e,colorLinkActive:t,colorLinkHover:n}=Zf.useToken().token;return f.useMemo(()=>kt("color:",e,";&:visited{color:",e,";}&:hover{color:",n,";}&:active{color:",t,";}",""),[e,t,n])}const zN=`${Zn}--use-ant-link-color`;function XW(){const e=KW();return kt(":root .",zN,"{",e,";}","")}var HN=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 VN(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 jN(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 WN(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 cv(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 Ln(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 w1=function(e){return typeof e=="function"},YW=function(e){return typeof e=="string"},qN=function(e){return typeof e=="number"},We=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 Gi=HN(f.useEffect);var UN=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,Gi(function(){!n&&o&&(u.current=true,e.run.apply(e,Ln([],pn(s),false)));},[o]),Gi(function(){u.current||n||(u.current=true,c?c():e.refresh());},Ln([],pn(l),false)),{onBefore:function(){if(!o)return {stopNow:true}}}};UN.onInit=function(e){var t=e.ready,n=t===void 0?true:t,r=e.manual;return {loading:!r&&n}};function uv(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 S1=function(e,t){var n=f.useRef({deps:t,obj:void 0,initialized:false}).current;return (n.initialized===false||!uv(n.deps,t))&&(n.deps=t,n.obj=e(),n.initialized=true),n.obj};function Bs(e){var t=f.useRef(e);return t.current=e,t}var bl=function(e){var t=Bs(e);f.useEffect(function(){return function(){t.current();}},[]);},uf=new Map,QW=function(e,t,n){var r=uf.get(e);r?.timer&&clearTimeout(r.timer);var o=void 0;t>-1&&(o=setTimeout(function(){uf.delete(e);},t)),uf.set(e,lo(lo({},n),{timer:o}));},ZW=function(e){return uf.get(e)},df=new Map,JW=function(e){return df.get(e)},eq=function(e,t){df.set(e,t),t.then(function(n){return df.delete(e),n}).catch(function(){df.delete(e);});},hs={},tq=function(e,t){hs[e]&&hs[e].forEach(function(n){return n(t)});},Hh=function(e,t){return hs[e]||(hs[e]=[]),hs[e].push(t),function(){var r=hs[e].indexOf(t);hs[e].splice(r,1);}},nq=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):QW(p,o,h),tq(p,h.data);},m=function(p,h){return h===void 0&&(h=[]),l?l(h):ZW(p)};return S1(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=Hh(n,function(h){e.setState({data:h});});}},[]),bl(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=JW(n);return g&&g!==u.current?{servicePromise:g}:(g=p.apply(void 0,Ln([],pn(h),false)),u.current=g,eq(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=Hh(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=Hh(n,function(g){e.setState({data:g});}));}}:{}},Vh,o$;function $1(){if(o$)return Vh;o$=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Vh=e,Vh}var jh,i$;function rq(){if(i$)return jh;i$=1;var e=typeof dd=="object"&&dd&&dd.Object===Object&&dd;return jh=e,jh}var Wh,s$;function GN(){if(s$)return Wh;s$=1;var e=rq(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Wh=n,Wh}var qh,a$;function oq(){if(a$)return qh;a$=1;var e=GN(),t=function(){return e.Date.now()};return qh=t,qh}var Uh,l$;function iq(){if(l$)return Uh;l$=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return Uh=t,Uh}var Gh,c$;function sq(){if(c$)return Gh;c$=1;var e=iq(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return Gh=n,Gh}var Kh,u$;function KN(){if(u$)return Kh;u$=1;var e=GN(),t=e.Symbol;return Kh=t,Kh}var Xh,d$;function aq(){if(d$)return Xh;d$=1;var e=KN(),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 Xh=i,Xh}var Yh,f$;function lq(){if(f$)return Yh;f$=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return Yh=n,Yh}var Qh,m$;function cq(){if(m$)return Qh;m$=1;var e=KN(),t=aq(),n=lq(),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 Qh=s,Qh}var Zh,p$;function uq(){if(p$)return Zh;p$=1;function e(t){return t!=null&&typeof t=="object"}return Zh=e,Zh}var Jh,h$;function dq(){if(h$)return Jh;h$=1;var e=cq(),t=uq(),n="[object Symbol]";function r(o){return typeof o=="symbol"||t(o)&&e(o)==n}return Jh=r,Jh}var eg,g$;function fq(){if(g$)return eg;g$=1;var e=sq(),t=$1(),n=dq(),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 eg=l,eg}var tg,b$;function XN(){if(b$)return tg;b$=1;var e=$1(),t=oq(),n=fq(),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(D){var R=u,B=d;return u=d=void 0,b=D,p=a.apply(B,R),p}function S(D){return b=D,h=setTimeout(E,l),y?w(D):p}function I(D){var R=D-g,B=D-b,H=l-R;return C?i(H,m-B):H}function $(D){var R=D-g,B=D-b;return g===void 0||R>=l||R<0||C&&B>=m}function E(){var D=t();if($(D))return P(D);h=setTimeout(E,I(D));}function P(D){return h=void 0,x&&u?w(D):(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 D=t(),R=$(D);if(u=arguments,d=this,g=D,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 tg=s,tg}var mq=XN();const pq=vr(mq);var hq=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=pq(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,Ln([],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();}}:{}},gq=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();}}},ju=!!(typeof window<"u"&&window.document&&window.document.createElement);function E1(){return ju?document.visibilityState!=="hidden":true}var ff=new Set;function bq(e){return ff.add(e),function(){ff.has(e)&&ff.delete(e);}}if(ju){var vq=function(){E1()&&ff.forEach(function(e){return e()});};window.addEventListener("visibilitychange",vq,false);}var yq=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 Gi(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&&!E1()?l.current=bq(function(){e.refresh();}):e.refresh();},n):c.current=0;},onCancel:function(){u();}}:{}};function Cq(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,Ln([],pn(r),false)),setTimeout(function(){n=false;},t));}}var xq=function(){return ju&&typeof navigator.onLine<"u"?navigator.onLine:true},mf=new Set;function wq(e){return mf.add(e),function(){mf.has(e)&&mf.delete(e);}}if(ju){var v$=function(){!E1()||!xq()||mf.forEach(function(e){return e()});};window.addEventListener("visibilitychange",v$,false),window.addEventListener("focus",v$,false);}var Sq=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=Cq(e.refresh.bind(e),o);i.current=wq(function(){a();});}return function(){s();}},[n,o]),bl(function(){s();}),{}},$q=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);}}:{}},ng,y$;function Eq(){if(y$)return ng;y$=1;var e=XN(),t=$1(),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 ng=r,ng}var Iq=Eq();const Pq=vr(Iq);var Nq=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=Pq(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,Ln([],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();}}:{}},br=function(e){f.useEffect(function(){var t=e?.();if(!(t&&typeof t=="object"&&typeof t.then=="function"))return t},[]);},Mq=function(){var e=pn(f.useState({}),2),t=e[1];return f.useCallback(function(){return t({})},[])},Rq=(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,Ln([i],pn(n),false))}).filter(Boolean);return Object.assign.apply(Object,Ln([{}],pn(o),false))},e.prototype.runAsync=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return jN(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 WN(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=VN(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,Ln([],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,Ln([],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,Ln([],pn(this.state.params||[]),false));},e.prototype.refreshAsync=function(){return this.runAsync.apply(this,Ln([],pn(this.state.params||[]),false))},e.prototype.mutate=function(t){var n=w1(t)?t(this.state.data):t;this.runPluginHandler("onMutate",n),this.setState({data:n});},e})();function Aq(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=VN(t,["manual","ready"]),l=lo({manual:o,ready:s},a),c=Bs(e),u=Mq(),d=S1(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 Rq(c,l,u,Object.assign.apply(Object,Ln([{}],pn(m),false)))},[]);return d.options=l,d.pluginImpls=n.map(function(m){return m(d,l)}),br(function(){if(!o&&s){var m=d.state.params||t.defaultParams||[];d.run.apply(d,Ln([],pn(m),false));}}),bl(function(){d.cancel();}),{loading:d.state.loading,data:d.state.data,error:d.state.error,params:d.state.params||[],cancel:We(d.cancel.bind(d)),refresh:We(d.refresh.bind(d)),refreshAsync:We(d.refreshAsync.bind(d)),run:We(d.run.bind(d)),runAsync:We(d.runAsync.bind(d)),mutate:We(d.mutate.bind(d))}}function Ki(e,t,n){return Aq(e,t,Ln(Ln([],pn([]),false),[hq,gq,yq,Sq,Nq,UN,nq,$q],false))}function YN(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 Tq(e){var t=pn(YN(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 vl(e,t){if(ju){if(!e)return t;var n;return w1(e)?n=e():"current"in e?n=e.current:n=e,n}}var Oq=function(e){return e.every(function(t){var n=vl(t);return n?n.getRootNode()instanceof ShadowRoot:false})},Fq=function(e){return e?e.getRootNode():document},Bq=function(e){if(!e||!document.getRootNode)return document;var t=Array.isArray(e)?e:[e];return Oq(t)?Fq(vl(t[0])):document},Lq=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 vl(m)});if(!i.current){i.current=true,s.current=d,a.current=r,l.current=n();return}(d.length!==s.current.length||!uv(s.current,d)||!uv(a.current,r))&&((c=l.current)===null||c===void 0||c.call(l),s.current=d,a.current=r,l.current=n());}),bl(function(){var c;(c=l.current)===null||c===void 0||c.call(l),i.current=false;});};return t},I1=Lq(f.useEffect);function Dq(e,t,n){n===void 0&&(n="click");var r=Bs(e);I1(function(){var o=function(a){var l=Array.isArray(t)?t:[t];l.some(function(c){var u=vl(c);return !u||u.contains(a.target)})||r.current(a);},i=Bq(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 rg,C$;function kq(){if(C$)return rg;C$=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 rg=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}},rg}var _q=kq();const zq=vr(_q);var Hq=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),zq(e,t)};function mo(e,t,n){n===void 0&&(n={});var r=n.enable,o=r===void 0?true:r,i=Bs(t);I1(function(){if(o){var s=vl(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 P1=(function(e,t){var n={},r=n.onEnter,o=n.onLeave,i=n.onChange,s=pn(Tq(),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 Vq=function(e,t,n){var r=f.useRef(void 0),o=f.useRef(0);Hq(t,r.current)||(o.current+=1),r.current=t,I1(e,[o.current],n);},jq=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<"u"?navigator?.platform:""),QN={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:jq?[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},dv={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"?QN.meta.includes(e.keyCode):e.metaKey}};function ZN(e){return YW(e)||qN(e)}function Wq(e){var t=Object.keys(dv).reduce(function(n,r){return dv[r](e)?n+1:n},0);return [16,17,18,91,92].includes(e.keyCode)?t:t+1}function x$(e,t,n){var r,o;if(!e.key)return  false;if(qN(t))return e.keyCode===t?t:false;var i=t.split("."),s=0;try{for(var a=cv(i),l=a.next();!l.done;l=a.next()){var c=l.value,u=dv[c],d=QN[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&&Wq(e)===i.length?t:false:s===i.length?t:false}function qq(e,t){return w1(e)?e:ZN(e)?function(n){return x$(n,e,t)}:Array.isArray(e)?function(n){return e.find(function(r){return x$(n,r,t)})}:function(){return !!e}}var Uq=["keydown"];function Ur(e,t,n){var r=n||{},o=r.events,i=o===void 0?Uq:o,s=r.target,a=r.exactMatch,l=a===void 0?false:a,c=r.useCapture,u=c===void 0?false:c,d=Bs(t),m=Bs(e);Vq(function(){var p,h,g,b=vl(s,window);if(b){var y=function(S){var I,$=S,E=qq(m.current,l),P=E($),M=ZN(P)?P:$.key;if(P)return (I=d.current)===null||I===void 0?void 0:I.call(d,$,M)};try{for(var C=cv(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=cv(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 Wu(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 jN(t,void 0,void 0,function(){var i,s;return WN(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,Ln([],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 w$(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 bl(function(){cancelAnimationFrame(t.current);}),[r,i]}var Gq=function(e,t){return !Object.is(e,t)};function N1(e,t){t===void 0&&(t=Gq);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 JN=function(){var e=f.useRef(false);return f.useEffect(function(){return e.current=false,function(){e.current=true;}},[]),e};const Kq=HN(f.useLayoutEffect),Xq=({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"})]}),Yq=f.forwardRef(Xq),nr={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"},eM=`${Zn}-modal-visible`,Qq=kt("body:has(.",eM,"){overflow-y:hidden;}","");function qu({show:e,onHide:t,children:n,clsModalMask:r,clsModal:o,width:i,hideWhenMaskOnClick:s=false,hideWhenEsc:a=false}){const l=f.useRef(null),c=We(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();});Ur("esc",m=>{e&&a&&(m.preventDefault(),m.stopImmediatePropagation(),setTimeout(t));},{exactMatch:true});const u=An(nr.modalMask,r),d=An(nr.modal,o);return e?vT.createPortal(v("div",{className:V(Ho,{[eM]: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 Uu=({className:e,...t})=>{const n=An("ml-10px size-18px cursor-pointer",e);return v(Yq,{...t,className:n})};let qn=(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 Zq=[{name:"Lavender",nameZh:"薰衣草",hex:qn.Lavender,desc:"淡紫偏粉"},{name:"Thistle",nameZh:"蓟紫色",hex:qn.Thistle,desc:"带灰调"},{name:"Plum",nameZh:"李子紫",hex:qn.Plum,desc:"柔和温暖"},{name:"Mauve",nameZh:"淡紫色",hex:qn.Mauve,desc:"烟粉色调"},{name:"Wisteria",nameZh:"紫藤色",hex:qn.Wisteria,desc:"温柔浅紫"},{name:"Orchid",nameZh:"兰花紫",hex:qn.Orchid,desc:"偏红亮紫"},{name:"Medium Orchid",nameZh:"中兰花紫",hex:qn.MediumOrchid,desc:"稍深更艳"},{name:"Medium Purple",nameZh:"中紫色",hex:qn.MediumPurple,desc:"柔和略蓝"},{name:"Amethyst",nameZh:"紫水晶色",hex:qn.Amethyst,desc:"经典冷紫"},{name:"Blue Violet",nameZh:"蓝紫色",hex:qn.BlueViolet,desc:"较冷"},{name:"Purple",nameZh:"标准紫色",hex:qn.Purple,desc:"饱和且暗"},{name:"Violet",nameZh:"紫罗兰",hex:qn.Violet,desc:"更偏蓝光谱"},{name:"Magenta",nameZh:"洋红色",hex:qn.Magenta,desc:"红紫交界"},{name:"Grape",nameZh:"葡萄紫",hex:qn.Grape,desc:"饱和深紫"},{name:"Indigo",nameZh:"靛青色",hex:qn.Indigo,desc:"蓝紫之间"},{name:"Eggplant",nameZh:"茄子紫",hex:qn.Eggplant,desc:"极深紫红"}],Jq=[{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)"}],Ya={id:"default-bili-pink",name:"B站粉",colorPrimary:"#f69",tooltip:"B站品牌色"},tM={id:"color-picker",name:"自定义",isCustom:true,colorPrimary:Ya.colorPrimary};function eU(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 M1="UP长期洗涤",tU=eU(M1,`
  #0545b2 理想之蓝
  #f4cd00 柠檬黄
  #ef2729 石榴红
  #f89c00 鹿箭
  #233728 黛绿
  #f2b9b7 和熙粉
  #f3cc91 芝士黄
  #6b4c68 葡萄紫
  #ff7227 落日橙
  #004d62 碧海天
  #23909b 洗碧空
  #aeb400 芥丝绿
  #425a17 箬叶青

  #002fa7 克莱因蓝
  #003153 普鲁士蓝
  #01847f 马尔斯绿
  #fbd26a 申布伦黄
  #470024 勃艮第红
  #492d22 凡戴克棕
  `),nM="bilibili-evolved-sync",rM=[{name:"预设",themes:[Ya,{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:nM,name:"B-Evolved",colorPrimary:"var(--theme-color, #f69)",tooltip:F(we,{children:["使用 Bilibili-Evolved 的主题色",v("br",{}),"在 Bilibili-Evolved 设置中修改主题色后可能需要刷新页面同步"]})},tM]},{name:"LX Themes",themes:Jq,tooltip:F(we,{children:["提取自"," ",v("a",{target:"_blank",href:"https://github.com/lyswhut/lx-music-desktop/",children:"lx-music-desktop"}),v("br",{}),"Apache License 2.0"]})},{name:M1,themes:tU,tooltip:F(we,{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:Zq.map(e=>({id:`purple-colors-${e.name}`,name:e.nameZh,colorPrimary:e.hex,tooltip:F(we,{children:[e.name," ",e.nameZh," ",v("br",{}),e.desc]})})),tooltip:F(we,{children:["提取自"," ",v("a",{target:"_blank",href:"https://magicdawn.github.io/purple-colors/",children:"purple-colors"})," "]})}],nU=rM.map(e=>e.themes).flat(),S$={[`${M1}:马尔斯绿`]:F(we,{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 oM(){let{theme:e,colorPickerThemeSelectedColor:t}=Mt();return e||=Ya.id,f.useMemo(()=>{const n=nU.find(r=>r.id===e)||Ya;return n.id===tM.id&&t?{...n,colorPrimary:t}:n},[e,t])}function iM(){const e=oM(),t=Zm.use();let n=e.colorPrimary;return e.id===nM&&(n=t||Ya.colorPrimary),n}var rU={name:"1ughwg6",styles:".bili-feed4 .bili-header{min-height:64px!important;}"},oU={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);}"},iU={name:"qjp5ll",styles:"body{background-color:var(--bg1)!important;}"},sU={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 aU(){const e=iM(),{grid:t,pureRecommend:n,style:r}=Mt(),o=y1(),i=Q7(),s=Jy.use(),a=XW(),l=e1.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(we,{children:[v(sv,{styles:[a,Qq,kt`
            :root {
              ${NN}: ${e};
              ${RN}: var(${d.bgSrc}, ${d.bgFallback});
              ${MN}: var(--text1, ${d.text});
            }
          `,"",""]}),Vo&&n&&v(sv,{styles:[sU,t.useCustomGrid&&kt("#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"&&kt(".",Ho,"{--back-top-right:",i,"px;}",""),r.pureRecommend.useWhiteBackground?iU:oU,r.pureRecommend.hideTopChannel&&kt(".bili-header__channel,.bili-header__banner{display:none!important;}",!s&&rU," .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;}",""),"",""]})]})}EN.compat=true;function lU(...e){return function(t){return e.reduceRight((n,r)=>r(n),t)}}function fi({children:e,injectGlobalStyle:t=false,antdSetup:n=false,emotionCache:r=EN,styleProviderProps:o}){const i=y1(),s=iM();return lU(l=>v(gD,{value:r,children:l}),l=>v(V8,{...o,children:l}),l=>v(yr,{locale:MW,button:{autoInsertSpace:false},theme:{algorithm:i?Zf.darkAlgorithm:Zf.defaultAlgorithm,token:{colorPrimary:s,colorBgSpotlight:s,zIndexPopupBase:Number(av),fontFamily:AN},components:{Notification:{zIndexPopup:Number(av)},Button:{defaultShadow:"none",primaryShadow:"none"}}},children:l}))(F(we,{children:[n&&v(J7,{}),t&&v(aU,{}),e]}))}var cU={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 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 uU=(e,t)=>f__namespace.createElement(on,fv({},e,{ref:t,icon:cU})),R1=f__namespace.forwardRef(uU);var dU={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 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 fU=(e,t)=>f__namespace.createElement(on,mv({},e,{ref:t,icon:dU})),sM=f__namespace.forwardRef(fU);var Ul={exports:{}},$$;function mU(){if($$)return Ul.exports;$$=1,Ul.exports=r,Ul.exports.isMobile=r,Ul.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 Ul.exports}var pU=mU();const hU=vr(pU);let og;const gU=()=>(typeof og>"u"&&(og=hU()),og),A1=f.createContext(null),bU=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}},E$={width:0,height:0,left:0,top:0};function vU(e,t,n){return f.useMemo(()=>{const r=new Map,o=t.get(e[0]?.key)||E$,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)||E$);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 I$(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 yU=.1,P$=.01,pf=20,N$=.995**pf;function CU(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)<yU)return;let S=y,I=C;u.current=window.setInterval(()=>{if(Math.abs(S)<P$&&Math.abs(I)<P$){window.clearInterval(u.current);return}S*=N$,I*=N$,t(S*pf,I*pf);},pf);}}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 aM(e){const[t,n]=f.useState(0),r=f.useRef(0),o=f.useRef();return o.current=e,Gd(()=>{o.current?.();},[t]),()=>{r.current===t&&(r.current+=1,n(r.current));}}function xU(e){const t=f.useRef([]),[,n]=f.useState({}),r=f.useRef(typeof e=="function"?e():e),o=aM(()=>{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 M$={width:0,height:0,left:0,top:0,right:0};function wU(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)||M$;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)||M$)[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 R$(e){let t;return e instanceof Map?(t={},e.forEach((n,r)=>{t[r]=n;})):t=e,JSON.stringify(t)}const SU="TABS_DQ";function lM(e){return String(e).replace(/"/g,SU)}function T1(e,t,n,r){return !(!n||r||e===false||e===void 0&&(t===false||t===null))}const cM=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||"+")}),A$=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}),{ESC:$U,TAB:EU}=je;function IU({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 $U:s();break;case EU:{let u=false;i.current||(u=a()),u?c.preventDefault():s();break}}};f__namespace.useEffect(()=>e?(window.addEventListener("keydown",l),r&&gt(a,3),()=>{window.removeEventListener("keydown",l),i.current=false;}):()=>{i.current=false;},[e]);}const PU=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],NU={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 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 uM=f.forwardRef((e,t)=>{const{arrow:n=false,prefixCls:r="rc-dropdown",transitionName:o,animation:i,align:s,placement:a="bottomLeft",placements:l=NU,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);};IU({visible:$,triggerRef:N,onVisibleChange:A,autoFocus:b,overlayRef:M});const D=W=>{const{onOverlayClick:O}=e;I(false),O&&O(W);},R=()=>f.createElement(PU,{ref:M,overlay:y,prefixCls:r,arrow:n}),B=()=>typeof y=="function"?R:R(),H=()=>{const{minOverlayWidthMatchTrigger:W,alignPoint:O}=e;return "minOverlayWidthMatchTrigger"in e?W:!O},k=()=>{const{openClassName:W}=e;return W!==void 0?W:`${r}-open`},z=f.cloneElement(C,{className:V(C.props?.className,$&&k()),ref:Vs(C)?In(N,js(C)):void 0});let _=d;return !_&&g.indexOf("contextMenu")!==-1&&(_=["click"]),f.createElement(Dm,pv({builtinPlacements:l},w,{prefixCls:r,ref:P,popupClassName:V(m,{[`${r}-show-arrow`]:n}),popupStyle:p,action:g,showAction:u,hideAction:_,popupPlacement:a,popupAlign:s,popupMotion:{motionName:E},popupVisible:$,stretch:H()?"minWidth":"",popup:B(),onOpenChange:A,onPopupClick:D,getPopupContainer:c}),z)}),ba=void 0;function MU(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:V(!r&&n,u),style:{...w,...d}},S,b,{ref:t}),x);return s&&(I=f__namespace.createElement(Xr,{onResize:({offsetWidth:$})=>{C($);},disabled:a},I)),I}const lc=f__namespace.forwardRef(MU);function RU(e){if(typeof MessageChannel>"u")gt(e);else {const t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(void 0);}}function AU(){const e=f__namespace.useRef(null);return n=>{e.current||(e.current=[],RU(()=>{vT.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=at(i=>{e(()=>{r(i);});});return [n,o]}const Jf=f.createContext(null),TU=(e,t)=>{const n=f__namespace.useContext(Jf);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(Jf.Provider,{value:null},f__namespace.createElement(lc,dn({ref:t,className:V(r,i)},o,s)))},OU=f__namespace.forwardRef(TU),dM="responsive",fM="invalidate";function FU(e){return `+ ${e.length} ...`}function BU(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=AU(),[I,$]=va(S,null),E=I||0,[P,M]=va(S,new Map),[N,A]=va(S,0),[D,R]=va(S,0),[B,H]=va(S,0),[k,z]=va(S,0),[_,W]=f.useState(null),[O,L]=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,D),J=d===dM,Q=r.length&&J,G=d===fM,ee=Q||typeof d=="number"&&r.length>d,oe=f.useMemo(()=>{let Ce=r;return Q?I===null&&w?Ce=r:Ce=r.slice(0,Math.min(r.length,E/a)):typeof d=="number"&&(Ce=r.slice(0,d)),Ce},[r,a,I,d,Q]),re=f.useMemo(()=>Q?r.slice(j+1):r.slice(oe.length),[r,oe,Q,j]),he=f.useCallback((Ce,Pe)=>typeof s=="function"?s(Ce):(s&&Ce?.[s])??Pe,[s]),Z=f.useCallback(o||(Ce=>Ce),[o]);function te(Ce,Pe,De){O===Ce&&(Pe===void 0||Pe===_)||(L(Ce),De||(q(Ce<r.length-1),C?.(Ce)),Pe!==void 0&&W(Pe));}function ce(Ce,Pe){$(Pe.clientWidth);}function ue(Ce,Pe){M(De=>{const Oe=new Map(De);return Pe===null?Oe.delete(Ce):Oe.set(Ce,Pe),Oe});}function Ee(Ce,Pe){R(Pe),A(D);}function Re(Ce,Pe){H(Pe);}function be(Ce,Pe){z(Pe);}function le(Ce){return P.get(he(oe[Ce],Ce))}Kt(()=>{if(E&&typeof K=="number"&&oe){let Ce=B+k;const Pe=oe.length,De=Pe-1;if(!Pe){te(0,null);return}for(let Oe=0;Oe<Pe;Oe+=1){let Ne=le(Oe);if(w&&(Ne=Ne||0),Ne===void 0){te(Oe-1,void 0,true);break}if(Ce+=Ne,De===0&&Ce<=E||Oe===De-1&&Ce+le(De)<=E){te(De,null);break}else if(Ce+K>E){te(Oe-1,Ce-Ne-k+D);break}}g&&le(0)+k>E&&W(null);}},[E,P,D,B,k,he,oe]);const ae=Y&&!!re.length;let ye={};_!==null&&Q&&(ye={position:"absolute",left:_,top:0});const Se={prefixCls:U,responsive:Q,component:y,invalidate:G},He=i?(Ce,Pe)=>{const De=he(Ce,Pe);return f__namespace.createElement(Jf.Provider,{key:De,value:{...Se,order:Pe,item:Ce,itemKey:De,registerSize:ue,display:Pe<=j}},i(Ce,Pe))}:(Ce,Pe)=>{const De=he(Ce,Pe);return f__namespace.createElement(lc,dn({},Se,{order:Pe,key:De,item:Ce,renderItem:Z,itemKey:De,registerSize:ue,display:Pe<=j}))},Le={order:ae?j:Number.MAX_SAFE_INTEGER,className:`${U}-rest`,registerSize:Ee,display:ae},Ae=m||FU,_e=p?f__namespace.createElement(Jf.Provider,{value:{...Se,...Le}},p(re)):f__namespace.createElement(lc,dn({},Se,Le),typeof Ae=="function"?Ae(re):Ae),Te=f__namespace.createElement(b,dn({className:V(!G&&n,u),style:c,ref:t},x),h&&f__namespace.createElement(lc,dn({},Se,{responsive:J,responsiveDisabled:!Q,order:-1,className:`${U}-prefix`,registerSize:Re,display:true}),h),oe.map(He),ee?_e:null,g&&f__namespace.createElement(lc,dn({},Se,{responsive:J,responsiveDisabled:!Q,order:j,className:`${U}-suffix`,registerSize:be,display:true,style:ye}),g));return J?f__namespace.createElement(Xr,{onResize:ce,disabled:!Q},Te):Te}const oi=f__namespace.forwardRef(BU);oi.Item=OU;oi.RESPONSIVE=dM;oi.INVALIDATE=fM;const mM=f__namespace.createContext(null);function pM(e,t){return `${e}-${t}`}function hM(e){const t=f__namespace.useContext(mM);return pM(t,e)}const yo=f__namespace.createContext(null);function LU(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(yo),o=il(()=>LU(r,n),[r,n],(i,s)=>!t&&(i[0]!==s[0]||!ki(i[1],s[1],true)));return f__namespace.createElement(yo.Provider,{value:o},e)}const DU=[],gM=f__namespace.createContext(null);function cp(){return f__namespace.useContext(gM)}const bM=f__namespace.createContext(DU);function yl(e){const t=f__namespace.useContext(bM);return f__namespace.useMemo(()=>e!==void 0?[...t,e]:t,[t,e])}const vM=f__namespace.createContext(null),O1=f__namespace.createContext({});function T$(e,t=false){if(cy(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 kU(e,t=false){const n=[...e.querySelectorAll("*")].filter(r=>T$(r,t));return T$(e,t)&&n.unshift(e),n}function F1(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:hv,RIGHT:gv,UP:bv,DOWN:hf,ENTER:gf,ESC:yM,HOME:Gl,END:Kl}=je,O$=[bv,hf,hv,gv];function _U(e,t,n,r){const o="prev",i="next",s="children",a="parent";if(e==="inline"&&r===gf)return {inlineTrigger:true};const l={[bv]:o,[hf]:i},c={[hv]:n?i:o,[gv]:n?o:i,[hf]:s,[gf]:s},u={[bv]:o,[hf]:i,[gf]:s,[yM]:a,[hv]:n?s:a,[gv]: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 zU(e){let t=e;for(;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement;}return null}function HU(e,t){let n=e||document.activeElement;for(;n;){if(t.has(n))return n;n=n.parentElement;}return null}function B1(e,t){return kU(e,true).filter(r=>t.has(r))}function F$(e,t,n,r=1){if(!e)return null;const o=B1(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 em=(e,t)=>{const n=new Set,r=new Map,o=new Map;return e.forEach(i=>{const s=document.querySelector(`[data-menu-id='${pM(t,i)}']`);s&&(n.add(s),o.set(s,i),r.set(i,s));}),{elements:n,key2element:r,element2key:o}};function VU(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([...O$,gf,yM,Gl,Kl].includes(h)){const g=i();let b=em(g,r);const{elements:y,key2element:C,element2key:x}=b,w=C.get(t),S=HU(w,y),I=x.get(S),$=_U(e,s(I,true).length===1,n,h);if(!$&&h!==Gl&&h!==Kl)return;(O$.includes(h)||[Gl,Kl].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([Gl,Kl].includes(h)||$.sibling||!S){let P;!S||e==="inline"?P=o.current:P=zU(S);let M;const N=B1(P,y);h===Gl?M=N[0]:h===Kl?M=N[N.length-1]:M=F$(P,y,S,$.offset),E(M);}else if($.inlineTrigger)l(I);else if($.offset>0)l(I,true),m(),u.current=gt(()=>{b=em(g,r);const P=S.getAttribute("aria-controls"),M=document.getElementById(P),N=F$(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 jU(e){Promise.resolve().then(e);}const L1="__RC_UTIL_PATH_SPLIT__",B$=e=>e.join(L1),WU=e=>e.split(L1),vv="rc-menu-more";function qU(){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=B$(b);n.current.set(y,g),t.current.set(g,y),i.current+=1;const C=i.current;jU(()=>{C===i.current&&a();});},[]),c=f.useCallback((g,b)=>{const y=B$(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=WU(y);return b&&r.includes(C[0])&&C.unshift(vv),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(vv),g},h=f.useCallback(g=>{const b=`${t.current.get(g)}${L1}`,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 cc(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 CM(e,t,n,r){const{activeKey:o,onActive:i,onInactive:s}=f__namespace.useContext(yo),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 xM(e){const{mode:t,rtl:n,inlineIndent:r}=f__namespace.useContext(yo);if(t!=="inline")return null;const o=e;return n?{paddingRight:o*r}:{paddingLeft:o*r}}function wM({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 tm({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 UU 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 GU=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=hM(o),{prefixCls:y,onItemClick:C,disabled:x,overflowDisabled:w,itemIcon:S,selectedKeys:I,onActive:$}=f__namespace.useContext(yo),{_internalRenderMenuItem:E}=f__namespace.useContext(O1),P=`${y}-item`,M=f__namespace.useRef(),N=f__namespace.useRef(),A=x||s,D=Hs(t,N),R=yl(o),B=U=>({key:o,keyPath:[...R].reverse(),item:M.current,domEvent:U}),H=a||S,{active:k,...z}=CM(o,A,u,d),_=I.includes(o),W=xM(R.length),O=U=>{if(A)return;const K=B(U);m?.(tm(K)),C(K);},L=U=>{if(p?.(U),U.which===je.ENTER){const K=B(U);m?.(tm(K)),C(K);}},j=U=>{$(o),h?.(U);},Y={};e.role==="option"&&(Y["aria-selected"]=_);let q=f__namespace.createElement(UU,tu({ref:M,elementRef:D,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:V(P,{[`${P}-active`]:k,[`${P}-selected`]:_,[`${P}-disabled`]:A},r),onClick:O,onKeyDown:L,onFocus:j}),l,f__namespace.createElement(wM,{props:{...e,isSelected:_},icon:H}));return E&&(q=E(q,e,{selected:_})),q});function KU(e,t){const{eventKey:n}=e,r=cp(),o=yl(n);return f__namespace.useEffect(()=>{if(r)return r.registerPath(n,o),()=>{r.unregisterPath(n,o);}},[o]),r?null:f__namespace.createElement(GU,tu({},e,{ref:t}))}const Gu=f__namespace.forwardRef(KU);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 XU=({className:e,children:t,...n},r)=>{const{prefixCls:o,mode:i,rtl:s}=f__namespace.useContext(yo);return f__namespace.createElement("ul",yv({className:V(o,s&&`${o}-rtl`,`${o}-sub`,`${o}-${i==="inline"?"inline":"vertical"}`,e),role:"menu"},n,{"data-menu-list":true,ref:r}),t)},SM=f__namespace.forwardRef(XU);function D1(e,t){return hr(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 Xn={adjustX:1,adjustY:1},YU={topLeft:{points:["bl","tl"],overflow:Xn},topRight:{points:["br","tr"],overflow:Xn},bottomLeft:{points:["tl","bl"],overflow:Xn},bottomRight:{points:["tr","br"],overflow:Xn},leftTop:{points:["tr","tl"],overflow:Xn},leftBottom:{points:["br","bl"],overflow:Xn},rightTop:{points:["tl","tr"],overflow:Xn},rightBottom:{points:["bl","br"],overflow:Xn}},QU={topLeft:{points:["bl","tl"],overflow:Xn},topRight:{points:["br","tr"],overflow:Xn},bottomLeft:{points:["tl","bl"],overflow:Xn},bottomRight:{points:["tr","br"],overflow:Xn},rightTop:{points:["tr","tl"],overflow:Xn},rightBottom:{points:["br","bl"],overflow:Xn},leftTop:{points:["tl","tr"],overflow:Xn},leftBottom:{points:["bl","br"],overflow:Xn}};function $M(e,t,n){if(t)return t;if(n)return n[e]||n.other}const ZU={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function JU({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(yo),[w,S]=f__namespace.useState(false),I=d?{...QU,...h}:{...YU,...h},$=ZU[l],E=$M(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(Dm,{prefixCls:e,popupClassName:V(`${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 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)}function eG({id:e,open:t,keyPath:n,children:r}){const o="inline",{prefixCls:i,forceSubMenuRender:s,motion:a,defaultMotions:l,mode:c}=f__namespace.useContext(yo),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={...$M(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(Jn,Cv({visible:p},h,{forceRender:s,removeOnLeave:false,leavedClassName:`${i}-hidden`}),({className:b,style:y})=>f__namespace.createElement(SM,{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 tG=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=hM(a),{prefixCls:M,mode:N,openKeys:A,disabled:D,overflowDisabled:R,activeKey:B,selectedKeys:H,itemIcon:k,expandIcon:z,onItemClick:_,onOpenChange:W,onActive:O,popupRender:L}=f__namespace.useContext(yo),{_internalRenderSubMenuItem:j}=f__namespace.useContext(O1),{isSubPathKey:Y}=f__namespace.useContext(vM),q=yl(),U=`${M}-submenu`,K=D||c,J=f__namespace.useRef(),Q=f__namespace.useRef(),G=m??k,ee=p??z,oe=A.includes(a),re=!R&&oe,he=Y(H,a),{active:Z,...te}=CM(a,K,S,I),[ce,ue]=f__namespace.useState(false),Ee=Ne=>{K||ue(Ne);},Re=Ne=>{Ee(true),C?.({key:a,domEvent:Ne});},be=Ne=>{Ee(false),x?.({key:a,domEvent:Ne});},le=f__namespace.useMemo(()=>Z||(N!=="inline"?ce||Y([B],a):false),[N,Z,B,ce,a,Y]),ae=xM(q.length),ye=Ne=>{K||(w?.({key:a,domEvent:Ne}),N==="inline"&&W(a,!oe));},Se=cc(Ne=>{y?.(tm(Ne)),_(Ne);}),He=Ne=>{N!=="inline"&&W(a,Ne);},Le=()=>{O(a);},Ae=P&&`${P}-popup`,_e=f__namespace.useMemo(()=>f__namespace.createElement(wM,{icon:N!=="horizontal"?ee:void 0,props:{...e,isOpen:re,isSubMenu:true}},f__namespace.createElement("i",{className:`${U}-arrow`})),[N,ee,e,re,U]);let Te=f__namespace.createElement("div",nu({role:"menuitem",style:ae,className:`${U}-title`,tabIndex:K?null:-1,ref:J,title:typeof s=="string"?s:null,"data-menu-id":R&&P?null:P,"aria-expanded":re,"aria-haspopup":true,"aria-controls":Ae,"aria-disabled":K,onClick:ye,onFocus:Le},te),s,_e);const Ce=f__namespace.useRef(N);N!=="inline"&&q.length>1?Ce.current="vertical":Ce.current=N;const Pe=Ce.current,De=f__namespace.useMemo(()=>{const Ne=f__namespace.createElement(eu,{classNames:i,styles:o,mode:Pe==="horizontal"?"vertical":Pe},f__namespace.createElement(SM,{id:Ae,ref:Q},d)),Qe=$||L;return Qe?Qe(Ne,{item:e,keys:q}):Ne},[$,L,q,Ae,d,e,Pe]);if(!R){const Ne=Ce.current;Te=f__namespace.createElement(JU,{mode:Ne,prefixCls:U,visible:!u&&re&&N!=="inline",popupClassName:h,popupOffset:g,popupStyle:b,popup:De,disabled:K,onVisibleChange:He},Te);}let Oe=f__namespace.createElement(oi.Item,nu({ref:t,role:"none"},E,{component:"li",style:n,className:V(U,`${U}-${N}`,r,{[`${U}-open`]:re,[`${U}-active`]:le,[`${U}-selected`]:he,[`${U}-disabled`]:K}),onMouseEnter:Re,onMouseLeave:be}),Te,!R&&f__namespace.createElement(eG,{id:Ae,open:re,keyPath:q},d));return j&&(Oe=j(Oe,e,{selected:he,active:le,open:re,disabled:K})),f__namespace.createElement(eu,{classNames:i,styles:o,onItemClick:Se,mode:N==="horizontal"?"vertical":N,itemIcon:G,expandIcon:ee},Oe)}),up=f__namespace.forwardRef((e,t)=>{const{eventKey:n,children:r}=e,o=yl(n),i=D1(r,o),s=cp();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(tG,nu({ref:t},e),i),f__namespace.createElement(bM.Provider,{value:o},a)});function k1({className:e,style:t}){const{prefixCls:n}=f__namespace.useContext(yo);return cp()?null:f__namespace.createElement("li",{role:"separator",className:V(`${n}-item-divider`,e),style:t})}function nm(){return nm=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},nm.apply(this,arguments)}const nG=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(yo),u=`${a}-item-group`;return f__namespace.createElement("li",nm({ref:t,role:"presentation"},s,{onClick:d=>d.stopPropagation(),className:V(u,n)}),f__namespace.createElement("div",{role:"presentation",className:V(`${u}-title`,l?.listTitle),style:c?.listTitle,title:typeof r=="string"?r:void 0},r),f__namespace.createElement("ul",{role:"group",className:V(`${u}-list`,l?.list),style:c?.list},i))}),_1=f__namespace.forwardRef((e,t)=>{const{eventKey:n,children:r}=e,o=yl(n),i=D1(r,o);return cp()?i:f__namespace.createElement(nG,nm({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 xv(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}),xv(u,t,n)):f__namespace.createElement(i,Pa({key:g},h,{title:c}),xv(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 L$(e,t,n,r,o){let i=e;const s={divider:k1,item:Gu,group:_1,submenu:up,...r};return t&&(i=xv(t,s,o)),D1(i,n)}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)}const us=[],rG=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:D,inlineIndent:R=24,motion:B,defaultMotions:H,triggerSubMenuAction:k="hover",builtinPlacements:z,itemIcon:_,expandIcon:W,overflowedIndicator:O="...",overflowedIndicatorPopupClassName:L,getPopupContainer:j,onClick:Y,onOpenChange:q,onKeyDown:U,openAnimation:K,openTransitionName:J,_internalRenderMenuItem:Q,_internalRenderSubMenuItem:G,_internalComponents:ee,popupRender:oe,...re}=e,[he,Z]=f__namespace.useMemo(()=>[L$(u,c,us,ee,n),L$(u,c,us,{},n)],[u,c,ee]),[te,ce]=f__namespace.useState(false),ue=f__namespace.useRef(),Ee=Ws(m?`rc-menu-uuid-${m}`:"rc-menu-uuid"),Re=d==="rtl",[be,le]=Lt(w,S),ae=be||us,ye=(pe,Fe=false)=>{function Ge(){le(pe),q?.(pe);}Fe?vT.flushSync(Ge):Ge();},[Se,He]=f__namespace.useState(ae),Le=f__namespace.useRef(false),[Ae,_e]=f__namespace.useMemo(()=>(p==="inline"||p==="vertical")&&h?["vertical",h]:[p,false],[p,h]),Te=Ae==="inline",[Ce,Pe]=f__namespace.useState(Ae),[De,Oe]=f__namespace.useState(_e);f__namespace.useEffect(()=>{Pe(Ae),Oe(_e),Le.current&&(Te?le(Se):ye(us));},[Ae,_e]);const[Ne,Qe]=f__namespace.useState(0),mt=Ne>=he.length-1||Ce!=="horizontal"||b;f__namespace.useEffect(()=>{Te&&He(ae);},[ae]),f__namespace.useEffect(()=>(Le.current=true,()=>{Le.current=false;}),[]);const{registerPath:it,unregisterPath:ct,refreshOverflowKeys:bt,isSubPathKey:pt,getKeyPath:nt,getKeys:et,getSubPathKeys:Xe}=qU(),Ie=f__namespace.useMemo(()=>({registerPath:it,unregisterPath:ct}),[it,ct]),Me=f__namespace.useMemo(()=>({isSubPathKey:pt}),[pt]);f__namespace.useEffect(()=>{bt(mt?us:he.slice(Ne+1).map(pe=>pe.key));},[Ne,mt]);const[se,ge]=Lt(I||$&&he[0]?.key,I),fe=cc(pe=>{ge(pe);}),ie=cc(()=>{ge(void 0);});f.useImperativeHandle(t,()=>({list:ue.current,focus:pe=>{const Fe=et(),{elements:Ge,key2element:ut,element2key:Pt}=em(Fe,Ee),qt=B1(ue.current,Ge);let Xt;se&&Fe.includes(se)?Xt=se:Xt=qt[0]?Pt.get(qt[0]):he.find(Lr=>!Lr.props.disabled)?.key;const hn=ut.get(Xt);Xt&&hn&&hn?.focus?.(pe);},findItem:({key:pe})=>{const Fe=et(),{key2element:Ge}=em(Fe,Ee);return Ge.get(pe)||null}}));const[ve,me]=Lt(M||[],N),xe=f__namespace.useMemo(()=>Array.isArray(ve)?ve:ve==null?us:[ve],[ve]),ke=pe=>{if(E){const{key:Fe}=pe,Ge=xe.includes(Fe);let ut;P?Ge?ut=xe.filter(qt=>qt!==Fe):ut=[...xe,Fe]:ut=[Fe],me(ut);const Pt={...pe,selectedKeys:ut};Ge?D?.(Pt):A?.(Pt);}!P&&ae.length&&Ce!=="inline"&&ye(us);},qe=cc(pe=>{Y?.(tm(pe)),ke(pe);}),Ze=cc((pe,Fe)=>{let Ge=ae.filter(ut=>ut!==pe);if(Fe)Ge.push(pe);else if(Ce!=="inline"){const ut=Xe(pe);Ge=Ge.filter(Pt=>!ut.has(Pt));}ki(ae,Ge,true)||ye(Ge,true);}),Ct=VU(Ce,se,Re,Ee,ue,et,nt,ge,(pe,Fe)=>{const Ge=Fe??!ae.includes(pe);Ze(pe,Ge);},U);f__namespace.useEffect(()=>{ce(true);},[]);const an=f__namespace.useMemo(()=>({_internalRenderMenuItem:Q,_internalRenderSubMenuItem:G}),[Q,G]),On=Ce!=="horizontal"||b?he:he.map((pe,Fe)=>f__namespace.createElement(eu,{key:pe.key,overflowDisabled:Fe>Ne,classNames:a,styles:s},pe)),Rt=f__namespace.createElement(oi,wv({id:m,ref:ue,prefixCls:`${n}-overflow`,component:"ul",itemComponent:Gu,className:V(n,`${n}-root`,`${n}-${Ce}`,i,{[`${n}-inline-collapsed`]:De,[`${n}-rtl`]:Re},r),dir:d,style:o,role:"menu",tabIndex:l,data:On,renderRawItem:pe=>pe,renderRawRest:pe=>{const Fe=pe.length,Ge=Fe?he.slice(-Fe):null;return f__namespace.createElement(up,{eventKey:vv,title:O,disabled:mt,internalPopupClose:Fe===0,popupClassName:L},Ge)},maxCount:Ce!=="horizontal"||b?oi.INVALIDATE:oi.RESPONSIVE,ssr:"full","data-menu-list":true,onVisibleChange:pe=>{Qe(pe);},onKeyDown:Ct},re));return f__namespace.createElement(O1.Provider,{value:an},f__namespace.createElement(mM.Provider,{value:Ee},f__namespace.createElement(eu,{prefixCls:n,rootClassName:r,classNames:a,styles:s,mode:Ce,openKeys:ae,rtl:Re,disabled:g,motion:te?B:null,defaultMotions:te?H:null,activeKey:se,onActive:fe,onInactive:ie,selectedKeys:xe,inlineIndent:R,subMenuOpenDelay:y,subMenuCloseDelay:C,forceSubMenuRender:x,builtinPlacements:z,triggerSubMenuAction:k,getPopupContainer:j,itemIcon:_,expandIcon:W,onItemClick:qe,onOpenChange:Ze,popupRender:oe},f__namespace.createElement(vM.Provider,{value:Me},Rt),f__namespace.createElement("div",{style:{display:"none"},"aria-hidden":true},f__namespace.createElement(gM.Provider,{value:Ie},Z)))))}),Cl=rG;Cl.Item=Gu;Cl.SubMenu=up;Cl.ItemGroup=_1;Cl.Divider=k1;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)}const oG=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,_){z.preventDefault(),z.stopPropagation(),u.onEdit("remove",{key:_,event:z});}const A=f__namespace.createElement(Cl,{onClick:({key:z,domEvent:_})=>{h(z,_),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:_,disabled:W,closeIcon:O,key:L,label:j}=z,Y=T1(_,O,u,W);return f__namespace.createElement(Gu,{key:L,id:`${$}-${L}`,role:"option","aria-controls":r&&`${r}-panel-${L}`,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,L);}},O||u.removeIcon||"×"))}));function D(z){const _=o.filter(L=>!L.disabled);let W=_.findIndex(L=>L.key===w)||0;const O=_.length;for(let L=0;L<O;L+=1){W=(W+z+O)%O;const j=_[W];if(!j.disabled){S(j.key);return}}}function R(z){const{which:_}=z;if(!C){[je.DOWN,je.SPACE,je.ENTER].includes(_)&&(x(true),z.preventDefault());return}switch(_){case je.UP:D(-1),z.preventDefault();break;case je.DOWN:D(1),z.preventDefault();break;case je.ESC:x(false);break;case je.SPACE:case je.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 B={marginInlineStart:d};o.length||(B.visibility="hidden",B.order=1);const H=V(b,{[`${E}-rtl`]:m}),k=s?null:f__namespace.createElement(uM,Sv({prefixCls:E,overlay:A,visible:o.length?C:false,onVisibleChange:x,overlayClassName:H,overlayStyle:y,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:g},a),f__namespace.createElement("button",{type:"button",className:`${n}-nav-more`,style:B,"aria-haspopup":"listbox","aria-controls":$,id:`${r}-more`,"aria-expanded":C,onKeyDown:R},I));return f__namespace.createElement("div",{className:V(`${n}-nav-operations`,c),style:l,ref:t},k,f__namespace.createElement(cM,{prefixCls:n,locale:i,editable:u}))}),iG=f__namespace.memo(oG,(e,t)=>t.tabMoving),sG=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=T1(u,l,p,a);function M(B){a||h(B);}function N(B){B.preventDefault(),B.stopPropagation(),p.onEdit("remove",{key:i,event:B});}const A=f__namespace.useMemo(()=>c&&typeof s=="string"?f__namespace.createElement("span",null,s):s,[s,c]),D=f__namespace.useRef(null);f__namespace.useEffect(()=>{o&&D.current&&D.current.focus();},[o]);const R=f__namespace.createElement("div",{key:i,"data-node-key":lM(i),className:V(E,S,{[`${E}-with-remove`]:P,[`${E}-active`]:r,[`${E}-disabled`]:a,[`${E}-focus`]:o}),style:w,onClick:M},f__namespace.createElement("div",{ref:D,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:B=>{B.stopPropagation(),M(B);},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:B=>{B.stopPropagation(),N(B);}},l||p.removeIcon||"×"));return d?d(R):R};function $v(){return $v=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},$v.apply(this,arguments)}const aG=(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]},Td=(e,t)=>e[t?0:1],D$=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(A1),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",[D,R]=I$(0,(ie,ve)=>{A&&g&&g({direction:ie>ve?"left":"right"});}),[B,H]=I$(0,(ie,ve)=>{!A&&g&&g({direction:ie>ve?"top":"bottom"});}),[k,z]=f.useState([0,0]),[_,W]=f.useState([0,0]),[O,L]=f.useState([0,0]),[j,Y]=f.useState([0,0]),[q,U]=xU(new Map),K=vU(w,q,_[0]),J=Td(k,A),Q=Td(_,A),G=Td(O,A),ee=Td(j,A),oe=Math.floor(J)<Math.floor(Q+G),re=oe?J-ee:J-G,he=`${x}-nav-operations-hidden`;let Z=0,te=0;A&&a?(Z=0,te=Math.max(0,Q-re)):(Z=Math.min(0,re-Q),te=0);function ce(ie){return ie<Z?Z:ie>te?te:ie}const ue=f.useRef(null),[Ee,Re]=f.useState();function be(){Re(Date.now());}function le(){ue.current&&clearTimeout(ue.current);}CU(E,(ie,ve)=>{function me(xe,ke){xe(qe=>ce(qe+ke));}return oe?(A?me(R,ie):me(H,ve),le(),be(),true):false}),f.useEffect(()=>(le(),Ee&&(ue.current=setTimeout(()=>{Re(0);},100)),le),[Ee]);const[ae,ye]=wU(K,re,A?D:B,Q,G,ee,{...e,tabs:w}),Se=at((ie=s)=>{const ve=K.get(ie)||{width:0,height:0,left:0,right:0,top:0};if(A){let me=D;a?ve.right<D?me=ve.right:ve.right+ve.width>D+re&&(me=ve.right+ve.width-re):ve.left<-D?me=-ve.left:ve.left+ve.width>-D+re&&(me=-(ve.left+ve.width-re)),H(0),R(ce(me));}else {let me=B;ve.top<-B?me=-ve.top:ve.top+ve.height>-B+re&&(me=-(ve.top+ve.height-re)),R(0),H(ce(me));}}),[He,Le]=f.useState(),[Ae,_e]=f.useState(false),Te=w.filter(ie=>!ie.disabled).map(ie=>ie.key),Ce=ie=>{const ve=Te.indexOf(He||s),me=Te.length,xe=(ve+ie+me)%me,ke=Te[xe];Le(ke);},Pe=(ie,ve)=>{const me=Te.indexOf(ie),xe=w.find(qe=>qe.key===ie);T1(xe?.closable,xe?.closeIcon,c,xe?.disabled)&&(ve.preventDefault(),ve.stopPropagation(),c.onEdit("remove",{key:ie,event:ve}),me===Te.length-1?Ce(-1):Ce(1));},De=(ie,ve)=>{_e(true),ve.button===1&&Pe(ie,ve);},Oe=ie=>{const{code:ve}=ie,me=a&&A,xe=Te[0],ke=Te[Te.length-1];switch(ve){case "ArrowLeft":{A&&Ce(me?1:-1);break}case "ArrowRight":{A&&Ce(me?-1:1);break}case "ArrowUp":{ie.preventDefault(),A||Ce(-1);break}case "ArrowDown":{ie.preventDefault(),A||Ce(1);break}case "Home":{ie.preventDefault(),Le(xe);break}case "End":{ie.preventDefault(),Le(ke);break}case "Enter":case "Space":{ie.preventDefault(),h(He??s,ie);break}case "Backspace":case "Delete":{Pe(He,ie);break}}},Ne={};A?Ne.marginInlineStart=m:Ne.marginTop=m;const Qe=w.map((ie,ve)=>{const{key:me}=ie;return f__namespace.createElement(sG,{id:o,prefixCls:x,key:me,tab:ie,className:y?.item,style:ve===0?C?.item:{...Ne,...C?.item},closable:ie.closable,editable:c,active:me===s,focus:me===He,renderWrapper:p,removeAriaLabel:u?.removeAriaLabel,tabCount:Te.length,currentPosition:ve+1,onClick:xe=>{h(me,xe);},onKeyDown:Oe,onFocus:()=>{Ae||Le(me),Se(me),be(),E.current&&(a||(E.current.scrollLeft=0),E.current.scrollTop=0);},onBlur:()=>{Le(void 0);},onMouseDown:xe=>De(me,xe),onMouseUp:()=>{_e(false);}})}),mt=()=>U(()=>{const ie=new Map,ve=P.current?.getBoundingClientRect();return w.forEach(({key:me})=>{const xe=P.current?.querySelector(`[data-node-key="${lM(me)}"]`);if(xe){const[ke,qe,Ze,st]=aG(xe,ve);ie.set(me,{width:ke,height:qe,left:Ze,top:st});}}),ie});f.useEffect(()=>{mt();},[w.map(ie=>ie.key).join("_")]);const it=aM(()=>{const ie=ya(S),ve=ya(I),me=ya($);z([ie[0]-ve[0]-me[0],ie[1]-ve[1]-me[1]]);const xe=ya(N);L(xe);const ke=ya(M);Y(ke);const qe=ya(P);W([qe[0]-xe[0],qe[1]-xe[1]]),mt();}),ct=w.slice(0,ae),bt=w.slice(ye+1),pt=[...ct,...bt],nt=K.get(s),{style:et}=bU({activeTabOffset:nt,horizontal:A,indicator:b,rtl:a});f.useEffect(()=>{Se();},[s,Z,te,R$(nt),R$(K),A]),f.useEffect(()=>{it();},[a]);const Xe=!!pt.length,Ie=`${x}-nav-wrap`;let Me,se,ge,fe;return A?a?(se=D>0,Me=D!==te):(Me=D<0,se=D!==Z):(ge=B<0,fe=B!==Z),f__namespace.createElement(Xr,{onResize:it},f__namespace.createElement("div",{ref:Hs(t,S),role:"tablist","aria-orientation":A?"horizontal":"vertical",className:V(`${x}-nav`,n,y?.header),style:{...C?.header,...r},onKeyDown:()=>{be();}},f__namespace.createElement(A$,{ref:I,position:"left",extra:l,prefixCls:x}),f__namespace.createElement(Xr,{onResize:it},f__namespace.createElement("div",{className:V(Ie,{[`${Ie}-ping-left`]:Me,[`${Ie}-ping-right`]:se,[`${Ie}-ping-top`]:ge,[`${Ie}-ping-bottom`]:fe}),ref:E},f__namespace.createElement(Xr,{onResize:it},f__namespace.createElement("div",{ref:P,className:`${x}-nav-list`,style:{transform:`translate(${D}px, ${B}px)`,transition:Ee?"none":void 0}},Qe,f__namespace.createElement(cM,{ref:N,prefixCls:x,locale:u,editable:c,style:{...Qe.length===0?void 0:Ne,visibility:Xe?"hidden":null}}),f__namespace.createElement("div",{className:V(`${x}-ink-bar`,y?.indicator,{[`${x}-ink-bar-animated`]:i.inkBar}),style:{...et,...C?.indicator}}))))),f__namespace.createElement(iG,$v({},e,{removeAriaLabel:u?.removeAriaLabel,ref:M,prefixCls:x,tabs:pt,className:!Xe&&he,popupStyle:C?.popup,tabMoving:!!Ee})),f__namespace.createElement(A$,{ref:$,position:"right",extra:l,prefixCls:x})))}),lG=({renderTabBar:e,...t})=>e?e(t,D$):f__namespace.createElement(D$,t),cG=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:V(n,s&&`${n}-active`,r),ref:t},l)});function rm(){return rm=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},rm.apply(this,arguments)}const uG=e=>{const{id:t,activeKey:n,animated:r,tabPosition:o,destroyOnHidden:i,contentStyle:s,contentClassName:a}=e,{prefixCls:l,tabs:c}=f__namespace.useContext(A1),u=r.tabPane,d=`${l}-tabpane`;return f__namespace.createElement("div",{className:V(`${l}-content-holder`)},f__namespace.createElement("div",{className:V(`${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(Jn,rm({key:p,visible:x,forceRender:h,removeOnLeave:!!(i??y),leavedClassName:`${d}-hidden`},r.tabPaneMotion),({style:w,className:S},I)=>f__namespace.createElement(cG,rm({},C,{prefixCls:d,id:t,tabKey:p,animated:u,active:x,style:{...s,...g,...w},className:V(a,b,S),ref:I})))})))};function dG(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 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)}let k$=0;const fG=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]),D=s==="rtl",R=dG(u),[B,H]=f.useState(false);f.useEffect(()=>{H(gU());},[]);const[k,z]=Lt(l??A[0]?.key,a),[_,W]=f.useState(()=>A.findIndex(K=>K.key===k));f.useEffect(()=>{let K=A.findIndex(J=>J.key===k);K===-1&&(K=Math.max(0,Math.min(_,A.length-1)),z(A[K]?.key)),W(K);},[A.map(K=>K.key).join("_"),k,_]);const[O,L]=Lt(null,n);f.useEffect(()=>{n||(L(`rc-tabs-${k$}`),k$+=1);},[]);function j(K,J){w?.(K,J);const Q=K!==k;z(K),Q&&x?.(K);}const Y={id:O,activeKey:k,animated:R,tabPosition:d,rtl:D,mobile:B},q={...Y,editable:c,locale:g,more:b,tabBarGutter:m,onTabClick:j,onTabScroll:S,extra:h,style:p,getPopupContainer:I,popupClassName:V($,P?.popup),indicator:E,styles:M,classNames:P},U=f__namespace.useMemo(()=>({tabs:A,prefixCls:r}),[A,r]);return f__namespace.createElement(A1.Provider,{value:U},f__namespace.createElement("div",Cc({ref:t,id:n,className:V(r,`${r}-${d}`,{[`${r}-mobile`]:B,[`${r}-editable`]:c,[`${r}-rtl`]:D},o)},N),f__namespace.createElement(lG,Cc({},q,{renderTabBar:C})),f__namespace.createElement(uG,Cc({destroyOnHidden:y},Y,{contentStyle:M?.content,contentClassName:P?.content,animated:R}))))}),mG={motionAppear:false,motionEnter:true,motionLeave:true};function pG(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={...mG,motionName:Hi(e,"switch")}),n}function hG(e){return e.filter(t=>t)}function gG(e,t){if(e)return e.map(r=>({...r,destroyOnHidden:r.destroyOnHidden??r.destroyInactiveTabPane}));const n=hr(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 hG(n)}const bG=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}`}}}}},[Vi(e,"slide-up"),Vi(e,"slide-down")]]},vG=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)`]:ko(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}}}}}}},yG=e=>{const{componentCls:t,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=e;return {[`${t}-dropdown`]:{...Bt(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":{...Do,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"}}}}}}},CG=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}}}}}},xG=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}}}}}},wG=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`]:ko(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}}}},SG=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"}}}}},$G=e=>{const{componentCls:t,tabsCardPadding:n,cardHeight:r,cardGutter:o,itemHoverColor:i,itemActiveColor:s,colorBorderSecondary:a}=e;return {[t]:{...Bt(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"},...wG(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"}}}}}},EG=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}},IG=wt("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 [xG(t),SG(t),CG(t),yG(t),vG(t),$G(t),bG(t)]},EG),PG=()=>null,NG=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:D,getPopupContainer:R,className:B,style:H,classNames:k,styles:z}=$t("tabs"),{tabs:_}=f__namespace.useContext(ot),W=A("tabs",N),O=sn(W),[L,j]=IG(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??_?.removeIcon??f__namespace.createElement(ai,null),addIcon:(c??_?.addIcon)||f__namespace.createElement(sM,null),showAdd:a!==true});const U=A(),K=Hn(i),J=gG(g,h),Q=pG(W,b),G={align:x?.align??_?.indicator?.align,size:x?.size??C??_?.indicator?.size??_?.indicatorSize},ee=f__namespace.useMemo(()=>{const Z=E??P??void 0,te=D==="rtl";switch(Z){case "start":return te?"right":"left";case "end":return te?"left":"right";default:return Z}},[E,P,D]),oe={...e,size:K,tabPlacement:ee,items:J},[re,he]=It([k,w],[z,S],{props:oe},{popup:{_default:"root"}});return f__namespace.createElement(fG,{ref:Y,direction:D,getPopupContainer:R,...M,items:J,className:V({[`${W}-${K}`]:K,[`${W}-card`]:["card","editable-card"].includes(n),[`${W}-editable-card`]:n==="editable-card",[`${W}-centered`]:l},B,r,o,re.root,L,j,O),classNames:{...re,popup:V(p,L,j,O,re.popup?.root)},styles:he,style:{...he.root,...H,...y},editable:q,more:{icon:_?.more?.icon??_?.moreIcon??d??f__namespace.createElement(R1,null),transitionName:`${U}-slide-up`,...m},prefixCls:W,animated:Q,indicator:G,destroyOnHidden:$??I,tabPosition:ee})}),EM=NG;EM.TabPane=PG;function Ev(e,t,n){return (e-t)/(n-t)}function z1(e,t,n,r){const o=Ev(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 gs(e,t){return Array.isArray(e)?e[t]:e}const Js=f__namespace.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:true,styles:{},classNames:{}}),IM=f__namespace.createContext({});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 _$=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(Js),D=`${n}-handle`,R=L=>{x||i(L,o);},B=L=>{p?.(L,o);},H=L=>{h(L,o);},k=L=>{if(!x&&w){let j=null;switch(L.which||L.keyCode){case je.LEFT:j=C==="ltr"||C==="btt"?-1:1;break;case je.RIGHT:j=C==="ltr"||C==="btt"?1:-1;break;case je.UP:j=C!=="ttb"?1:-1;break;case je.DOWN:j=C!=="ttb"?-1:1;break;case je.HOME:j="min";break;case je.END:j="max";break;case je.PAGE_UP:j=2;break;case je.PAGE_DOWN:j=-2;break;case je.BACKSPACE:case je.DELETE:s?.(o);break}j!==null&&(L.preventDefault(),d(j,o));}},z=L=>{switch(L.which||L.keyCode){case je.LEFT:case je.RIGHT:case je.UP:case je.DOWN:case je.HOME:case je.END:case je.PAGE_UP:case je.PAGE_DOWN:m?.();break}},_=z1(C,r,b,y);let W={};o!==null&&(W={tabIndex:x?null:gs(I,o),role:"slider","aria-valuemin":b,"aria-valuemax":y,"aria-valuenow":r,"aria-disabled":x,"aria-label":gs($,o),"aria-labelledby":gs(E,o),"aria-required":gs(P,o),"aria-valuetext":gs(M,o)?.(r),"aria-orientation":C==="ltr"||C==="rtl"?"horizontal":"vertical",onMouseDown:R,onTouchStart:R,onFocus:B,onMouseEnter:H,onKeyDown:k,onKeyUp:z});let O=f__namespace.createElement("div",Iv({ref:t,className:V(D,{[`${D}-${o+1}`]:o!==null&&S,[`${D}-dragging`]:c,[`${D}-dragging-delete`]:u},A.handle),style:{..._,...a,...N.handle}},W,g));return l&&(O=l(O,{index:o,prefixCls:n,value:r,dragging:c,draggingDelete:u})),O});function om(){return om=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},om.apply(this,arguments)}const MG=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:()=>{vT.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(_$,om({ref:P=>{P?p.current[$]=P:delete p.current[$];},dragging:E,draggingDelete:E&&u,style:gs(r,$),key:$,value:I,valueIndex:$},S))}),l&&h&&f__namespace.createElement(_$,om({key:"a11y"},S,{value:s[b],valueIndex:null,dragging:c!==-1,draggingDelete:u,render:l,style:{pointerEvents:"none"},tabIndex:null,"aria-hidden":true})))}),RG=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(Js),m=`${t}-text`,p=z1(l,o,s,a);return f__namespace.createElement("span",{className:V(m,{[`${m}-active`]:d&&c<=o&&o<=u}),style:{...p,...n},onMouseDown:h=>{h.stopPropagation();},onClick:()=>{i(o);}},r)},AG=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(RG,{key:i,prefixCls:o,style:s,value:i,onClick:r},a))):null},TG=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(Js),d=`${t}-dot`,m=l&&c<=n&&n<=u;let p={...z1(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:V(d,{[`${d}-active`]:m}),style:p})},OG=e=>{const{prefixCls:t,marks:n,dots:r,style:o,activeStyle:i}=e,{min:s,max:a,step:l}=f__namespace.useContext(Js),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(TG,{prefixCls:t,key:u,value:u,style:o,activeStyle:i})))},z$=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(Js),h=`${t}-track`,g=Ev(r,c,u),b=Ev(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||V(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})},FG=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(Js),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(z$,{index:null,prefixCls:t,start:d[0].start,end:d[d.length-1].end,replaceCls:V(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(z$,{index:g,prefixCls:t,style:{...gs(n,g),...c.track},start:p,end:h,key:g,onStartMove:i})))},BG=130;function H$(e){const t="targetTouches"in e?e.targetTouches[0]:e;return {pageX:t.pageX,pageY:t.pageY}}function LG(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(IM);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,B,H)=>{B!==void 0&&m(B),C(R);let k=R;H&&(k=R.filter((z,_)=>_!==p)),s(k),P&&P({rawValues:R,deleteIndex:H?p:-1,draggingIndex:p,draggingValue:B});},N=at((R,B,H)=>{if(R===-1){const k=x[0],z=x[x.length-1],_=r-k,W=o-z;let O=B*(o-r);O=Math.max(O,_),O=Math.min(O,W),O=i(k+O)-k;const j=x.map(Y=>Y+O);M(j);}else {const k=(o-r)*B,z=[...y];z[R]=x[R];const _=l(z,k,R,"dist");M(_.values,_.value,H);}}),A=(R,B,H)=>{R.stopPropagation();const k=H||n,z=k[B];h(B),m(z),w(k),C(k),b(false);const{pageX:_,pageY:W}=H$(R);let O=false;E&&E({rawValues:k,draggingIndex:B,draggingValue:z});const L=Y=>{Y.preventDefault();const{pageX:q,pageY:U}=H$(Y),K=q-_,J=U-W,{width:Q,height:G}=e.current.getBoundingClientRect();let ee,oe;switch(t){case "btt":ee=-J/G,oe=K;break;case "ttb":ee=J/G,oe=K;break;case "rtl":ee=-K/Q,oe=J;break;default:ee=K/Q,oe=J;}O=c?Math.abs(oe)>BG&&u<y.length:false,b(O),N(B,ee,O);},j=Y=>{Y.preventDefault(),document.removeEventListener("mouseup",j),document.removeEventListener("mousemove",L),$.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",L),R.currentTarget.addEventListener("touchend",j),R.currentTarget.addEventListener("touchmove",L),S.current=L,I.current=j,$.current=R.currentTarget;},D=f__namespace.useMemo(()=>{const R=[...n].sort((_,W)=>_-W),B=[...y].sort((_,W)=>_-W),H={};B.forEach(_=>{H[_]=(H[_]||0)+1;}),R.forEach(_=>{H[_]=(H[_]||0)-1;});const k=c?1:0;return Object.values(H).reduce((_,W)=>_+Math.abs(W),0)<=k?y:n},[n,y,c]);return [p,d,g,D,A]}function DG(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 kG(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 _G=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:D,trackStyle:R,handleStyle:B,railStyle:H,dotStyle:k,activeDotStyle:z,marks:_,dots:W,handleRender:O,activeHandleRender:L,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]),[oe,re,he,Z,te]=kG(C),ce=f__namespace.useMemo(()=>isFinite(p)?p:0,[p]),ue=f__namespace.useMemo(()=>isFinite(h)?h:100,[h]),Ee=f__namespace.useMemo(()=>g!==null&&g<=0?1:g,[g]),Re=f__namespace.useMemo(()=>typeof P=="boolean"?P?Ee:false:P>=0?P:false,[P,Ee]),be=f__namespace.useMemo(()=>Object.keys(_||{}).map(ge=>{const fe=_[ge],ie={value:Number(ge)};return fe&&typeof fe=="object"&&!f__namespace.isValidElement(fe)&&("label"in fe||"style"in fe)?(ie.style=fe.style,ie.label=fe.label):ie.label=fe,ie}).filter(({label:ge})=>ge||typeof ge=="number").sort((ge,fe)=>ge.value-fe.value),[_]),[le,ae]=DG(ce,ue,Ee,be,E,Re),[ye,Se]=Lt(y,b),He=f__namespace.useMemo(()=>{const ge=ye==null?[]:Array.isArray(ye)?ye:[ye],[fe=ce]=ge;let ie=ye===null?[]:[fe];if(oe){if(ie=[...ge],x||ye===void 0){const ve=x>=0?x+1:2;for(ie=ie.slice(0,ve);ie.length<ve;)ie.push(ie[ie.length-1]??ce);}ie.sort((ve,me)=>ve-me);}return ie.forEach((ve,me)=>{ie[me]=le(ve);}),ie},[ye,oe,ce,x,le]),Le=ge=>oe?ge:ge[0],Ae=at(ge=>{const fe=[...ge].sort((ie,ve)=>ie-ve);w&&!ki(fe,He,true)&&w(Le(fe)),Se(fe);}),_e=at(ge=>{ge&&Q.current.hideHelp();const fe=Le(He);I?.(fe),Cn(!I,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),$?.(fe);}),Te=ge=>{if(l||!re||He.length<=Z)return;const fe=[...He];fe.splice(ge,1),S?.(Le(fe)),Ae(fe);const ie=Math.max(0,ge-1);Q.current.hideHelp(),Q.current.focus(ie);},[Ce,Pe,De,Oe,Ne]=LG(G,ee,He,ce,ue,le,Ae,_e,ae,re,Z),Qe=(ge,fe)=>{if(!l){const ie=[...He];let ve=0,me=0,xe=ue-ce;He.forEach((Ze,st)=>{const Ct=Math.abs(ge-Ze);Ct<=xe&&(xe=Ct,ve=st),Ze<ge&&(me=st);});let ke=ve;re&&xe!==0&&(!te||He.length<te)?(ie.splice(me+1,0,ge),ke=me+1):ie[ve]=ge,oe&&!He.length&&x===void 0&&ie.push(ge);const qe=Le(ie);S?.(qe),Ae(ie),fe?(document.activeElement?.blur?.(),Q.current.focus(ke),Ne(fe,ke,ie)):(I?.(qe),Cn(!I,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),$?.(qe));}},mt=ge=>{ge.preventDefault();const{width:fe,height:ie,left:ve,top:me,bottom:xe,right:ke}=G.current.getBoundingClientRect(),{clientX:qe,clientY:Ze}=ge;let st;switch(ee){case "btt":st=(xe-Ze)/ie;break;case "ttb":st=(Ze-me)/ie;break;case "rtl":st=(ke-qe)/fe;break;default:st=(qe-ve)/fe;}const Ct=ce+st*(ue-ce);Qe(le(Ct),ge);},[it,ct]=f__namespace.useState(null),bt=(ge,fe)=>{if(!l){const ie=ae(He,ge,fe);S?.(Le(He)),Ae(ie.values),ct(ie.value);}};f__namespace.useEffect(()=>{if(it!==null){const ge=He.indexOf(it);ge>=0&&Q.current.focus(ge);}ct(null);},[it]);const pt=f__namespace.useMemo(()=>he&&Ee===null?false:he,[he,Ee]),nt=at((ge,fe)=>{Ne(ge,fe),S?.(Le(He));}),et=Ce!==-1;f__namespace.useEffect(()=>{if(!et){const ge=He.lastIndexOf(Pe);Q.current.focus(ge);}},[et]);const Xe=f__namespace.useMemo(()=>[...Oe].sort((ge,fe)=>ge-fe),[Oe]),[Ie,Me]=f__namespace.useMemo(()=>oe?[Xe[0],Xe[Xe.length-1]]:[ce,Xe[0]],[Xe,oe,ce]);f__namespace.useImperativeHandle(t,()=>({focus:()=>{Q.current.focus(0);},blur:()=>{const{activeElement:ge}=document;G.current?.contains(ge)&&ge?.blur();}})),f__namespace.useEffect(()=>{u&&Q.current.focus(0);},[]);const se=f__namespace.useMemo(()=>({min:ce,max:ue,direction:ee,disabled:l,keyboard:c,step:Ee,included:A,includedStart:Ie,includedEnd:Me,range:oe,tabIndex:Y,ariaLabelForHandle:q,ariaLabelledByForHandle:U,ariaRequired:K,ariaValueTextFormatterForHandle:J,styles:s||{},classNames:i||{}}),[ce,ue,ee,l,c,Ee,A,Ie,Me,oe,Y,q,U,K,J,s,i]);return f__namespace.createElement(Js.Provider,{value:se},f__namespace.createElement("div",{ref:G,className:V(n,r,{[`${n}-disabled`]:l,[`${n}-vertical`]:N,[`${n}-horizontal`]:!N,[`${n}-with-marks`]:be.length}),style:o,onMouseDown:mt,id:a},f__namespace.createElement("div",{className:V(`${n}-rail`,i?.rail),style:{...H,...s?.rail}}),j!==false&&f__namespace.createElement(FG,{prefixCls:n,style:R,values:He,startPoint:D,onStartMove:pt?nt:void 0}),f__namespace.createElement(OG,{prefixCls:n,marks:be,dots:W,style:k,activeStyle:z}),f__namespace.createElement(MG,{ref:Q,prefixCls:n,style:B,values:Oe,draggingIndex:Ce,draggingDelete:De,onStartMove:nt,onOffsetChange:bt,onFocus:d,onBlur:m,handleRender:O,activeHandleRender:L,onChangeComplete:_e,onDelete:re?Te:void 0}),f__namespace.createElement(AG,{prefixCls:n,marks:be,onClick:Qe})))}),PM=f.createContext({}),V$=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(Qi,{ref:In(i,t),...e,open:s})}),zG=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]:{...Bt(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"}}}},NM=(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()}}},HG=e=>{const{componentCls:t,marginPartWithMark:n}=e;return {[`${t}-horizontal`]:{...NM(e,true),[`&${t}-with-marks`]:{marginBottom:n}}}},VG=e=>{const{componentCls:t}=e;return {[`${t}-vertical`]:{...NM(e,false),height:"100%"}}},jG=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}},WG=wt("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 [zG(t),HG(t),VG(t)]},jG);function ig(){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 qG(e){return e||e===null?e:t=>typeof t=="number"?t.toString():""}const MM=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}=$t("slider"),$=f.useContext(kn),E=a??$,P={...e,disabled:E,vertical:g},[M,N]=It([w,u],[S,d],{props:P}),{handleRender:A,direction:D}=f.useContext(PM),B=(D||y)==="rtl",[H,k]=ig(),[z,_]=ig(),W={...l},{open:O,placement:L,getPopupContainer:j,prefixCls:Y,formatter:q}=W,U=O,K=(H||z)&&U!==false,J=qG(q),[Q,G]=ig(),ee=be=>{c?.(be),G(false);},oe=(be,le)=>be||(le?B?"left":"right":"top"),re=b("slider",n),[he,Z]=WG(re),te=V(o,C,M.root,i,{[`${re}-rtl`]:B,[`${re}-lock`]:Q},he,Z);B&&!g&&(h.reverse=!h.reverse),f.useEffect(()=>{const be=()=>{gt(()=>{_(false);},1);};return document.addEventListener("mouseup",be),()=>{document.removeEventListener("mouseup",be);}},[]);const ce=r&&!U,ue=A||((be,le)=>{const{index:ae}=le,ye=be.props;function Se(_e,Te,Ce){Ce&&h[_e]?.(Te),ye[_e]?.(Te);}const He={...ye,onMouseEnter:_e=>{k(true),Se("onMouseEnter",_e);},onMouseLeave:_e=>{k(false),Se("onMouseLeave",_e);},onMouseDown:_e=>{_(true),G(true),Se("onMouseDown",_e);},onFocus:_e=>{_(true),h.onFocus?.(_e),Se("onFocus",_e,true);},onBlur:_e=>{_(false),h.onBlur?.(_e),Se("onBlur",_e,true);}},Le=f.cloneElement(be,He),Ae=(!!U||K)&&J!==null;return ce?Le:f.createElement(V$,{...W,prefixCls:b("tooltip",Y),title:J?J(le.value):"",value:le.value,open:Ae,placement:oe(L,g),key:ae,classNames:{root:`${re}-tooltip`},getPopupContainer:j||I},Le)}),Ee=ce?(be,le)=>{const ae=f.cloneElement(be,{style:{...be.props.style,visibility:"hidden"}});return f.createElement(V$,{...W,prefixCls:b("tooltip",Y),title:J?J(le.value):"",open:J!==null&&K,placement:oe(L,g),key:"tooltip",classNames:{root:`${re}-tooltip`},getPopupContainer:j||I,draggingDelete:le.draggingDelete},ae)}:void 0,Re={...N.root,...x,...s};return f.createElement(_G,{...h,classNames:M,styles:N,step:h.step,range:r,className:te,style:Re,disabled:E,vertical:g,ref:t,prefixCls:re,handleRender:ue,activeHandleRender:Ee,onChangeComplete:ee})}),Qa=e=>e?typeof e=="function"?e():e:null,UG=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]:{...Bt(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}}},$y(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block"}}]},GG=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"}}}})}},KG=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,...Sy(e),...Um({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}},RM=wt("Popover",e=>{const{colorBgElevated:t,colorText:n}=e,r=vt(e,{popoverBg:t,popoverColor:n});return [UG(r),GG(r),Au(r,"zoom-big")]},KG,{resetStyle:false,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]}),AM=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:V(`${r}-title`,o?.title),style:i?.title},t),n&&f__namespace.createElement("div",{className:V(`${r}-content`,o?.content),style:i?.content},n))},XG=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=Qa(s),m=Qa(a),p={...e,placement:i},[h,g]=It([c],[u],{props:p}),b=V(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(xy,{...e,className:t,prefixCls:n,classNames:h,styles:g},l||f__namespace.createElement(AM,{prefixCls:n,title:d,content:m,classNames:h,styles:g})))},TM=e=>{const{prefixCls:t,className:n,...r}=e,{getPrefixCls:o}=f__namespace.useContext(ot),i=o("popover",t),[s,a]=RM(i);return f__namespace.createElement(XG,{...r,prefixCls:i,hashId:s,className:V(n,a)})},YG=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}=$t("popover"),P=C("popover",n),[M,N]=RM(P),A=C(),D=Ey(b,$),R=a||E||"hover",B={...e,placement:s,trigger:R,mouseEnterDelay:c,mouseLeaveDelay:u,overlayStyle:m,styles:p,classNames:h},[H,k]=It([S,h],[I,p],{props:B}),z=V(i,M,N,x,H.root),[_,W]=Lt(e.defaultOpen??false,e.open),O=(U,K)=>{W(U),d?.(U,K);},L=U=>{U.keyCode===je.ESC&&O(false,U);},j=U=>{O(U);},Y=Qa(r),q=Qa(o);return f__namespace.createElement(Qi,{unique:false,arrow:D,placement:s,trigger:R,mouseEnterDelay:c,mouseLeaveDelay:u,...y,prefixCls:P,classNames:{root:z,container:H.container,arrow:H.arrow},styles:{root:{...k.root,...w,...m},container:k.container,arrow:k.arrow},ref:t,open:_,onOpenChange:j,overlay:Y||q?f__namespace.createElement(AM,{prefixCls:P,title:Y,content:q,classNames:H,styles:k}):null,motion:{motionName:Hi(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),L(U);}}))}),_o=YG;_o._InternalPanelDoNotUseOrYouWillBeFired=TM;const QG=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}}}}},ZG=e=>{const{zIndexPopupBase:t}=e;return {zIndexPopup:t+60}},OM=wt("Popconfirm",e=>QG(e),ZG,{resetStyle:false}),FM=e=>{const{prefixCls:t,okButtonProps:n,cancelButtonProps:r,title:o,description:i,cancelText:s,okText:a,okType:l="primary",icon:c=f__namespace.createElement(Ou,null),showCancel:u=true,close:d,onConfirm:m,onCancel:p,onPopupClick:h,classNames:g,styles:b}=e,{getPrefixCls:y}=f__namespace.useContext(ot),[C]=ir("Popconfirm",ho.Popconfirm),x=Qa(o),w=Qa(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:V(`${t}-title`,g?.title),style:b?.title},x),w&&f__namespace.createElement("div",{className:V(`${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(Hy,{buttonProps:{size:"small",...Dy(l),...n},actionFn:m,close:d,prefixCls:y("btn"),quitOnNullishReturnValue:true,emitEvent:true},a||C?.okText)))},JG=e=>{const{prefixCls:t,placement:n,className:r,style:o,...i}=e,{getPrefixCls:s}=f__namespace.useContext(ot),a=s("popconfirm",t);return OM(a),f__namespace.createElement(TM,{placement:n,className:V(a,r),style:o,content:f__namespace.createElement(FM,{prefixCls:a,...i})})},eK=f__namespace.forwardRef((e,t)=>{const{prefixCls:n,placement:r="top",trigger:o,okType:i="primary",icon:s=f__namespace.createElement(Ou,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}=$t("popconfirm"),[I,$]=Lt(e.defaultOpen??false,e.open),E=Ey(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),D=W=>{M(false,W),e.onCancel?.call(void 0,W);},R=(W,O)=>{const{disabled:L=false}=e;L||M(W,O);},B=g("popconfirm",n),H={...e,placement:r,trigger:P,okType:i,overlayStyle:u,styles:d,classNames:p},[k,z]=It([C,p],[x,d],{props:H}),_=V(B,b,l,k.root);return OM(B),f__namespace.createElement(_o,{arrow:E,...Zt(h,["title"]),trigger:P,placement:r,onOpenChange:R,open:I,ref:t,classNames:{root:_,container:k.container,arrow:k.arrow},styles:{root:{...y,...z.root,...u},container:z.container,arrow:z.arrow},content:f__namespace.createElement(FM,{okType:i,icon:s,...e,prefixCls:B,close:N,onConfirm:A,onCancel:D,classNames:k,styles:z}),"data-popover-inject":true},a)}),ru=eK;ru._InternalPanelDoNotUseOrYouWillBeFired=JG;function tK({expanded:e,children:t,...n}){return v("div",{...n,"data-classname":"wrapper",css:kt("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})})}const nK=({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"})]})]}),rK=f.forwardRef(nK),oK=rK,BM="rgb(0 0 0 / 0.85)";function Mn({children:e,tooltipProps:t,IconComponent:n,className:r,useBlackBg:o,...i}){n??=oK;const s=v(n,{...i,className:An("ml-4px size-16px cursor-pointer",r)});return !!e&&v(Jt,{color:o?BM:void 0,...t,title:e,children:s})}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 LM=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]=Lt(r??false,n);function y(S,I){let $=g;return o||($=S,b($),c?.($,I)),$}function C(S){S.which===je.LEFT?y(false,S):S.which===je.RIGHT&&y(true,S),u?.(S);}function x(S){const I=y(!g,S);l?.(I,S);}const w=V(e,t,{[`${e}-checked`]:g,[`${e}-disabled`]:o});return f__namespace.createElement("button",Pv({},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:V(`${e}-inner-checked`,m?.content),style:d?.content},s),f__namespace.createElement("span",{className:V(`${e}-inner-unchecked`,m?.content),style:d?.content},a)))});LM.displayName="Switch";const iK=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()}}}}}}},sK=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}}}},aK=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}}}}},lK=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()}}}}}},cK=e=>{const{componentCls:t,trackHeight:n,trackMinWidth:r}=e;return {[t]:{...Bt(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"}}}},uK=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}},dK=wt("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 [cK(t),lK(t),aK(t),sK(t),iK(t)]},uK),fK=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]=Lt(d??m??false,c??u),{getPrefixCls:x,direction:w,className:S,style:I,classNames:$,styles:E}=$t("switch"),P=f__namespace.useContext(kn),M=(o??P)||i,N=x("switch",n),A=f__namespace.createElement("div",{className:`${N}-handle`},i&&f__namespace.createElement(Xm,{className:`${N}-loading-icon`})),[D,R]=dK(N),B=Hn(r),H={...e,size:B,disabled:M},[k,z]=It([$,g],[E,h],{props:H}),_=V(S,{[`${N}-small`]:B==="small",[`${N}-loading`]:i,[`${N}-rtl`]:w==="rtl"},s,a,k.root,D,R),W={...z.root,...I,...l},O=(...L)=>{C(L[0]),p?.(...L);};return f__namespace.createElement(Nu,{component:"Switch",disabled:M},f__namespace.createElement(LM,{...b,classNames:k,styles:z,checked:y,onChange:O,prefixCls:N,className:_,style:W,disabled:M,ref:t,loadingIcon:A}))}),DM=fK;DM.__ANT_SWITCH=true;const kM=f.createContext(null),mK=e=>{const{checkboxCls:t}=e,n=`${t}-wrapper`;return [{[`${t}-group`]:{...Bt(e),display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}},[n]:{...Bt(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]:{...Bt(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`]:ko(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 pK(e,t){const n=vt(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return mK(n)}const _M=wt("Checkbox",(e,{prefixCls:t})=>[pK(t,e)]),hK=(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}=$t("checkbox"),S=f__namespace.useContext(kM),{isFormItemInput:I}=f__namespace.useContext(Qn),$=f__namespace.useContext(kn),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),D=f__namespace.useRef(null),R=In(t,D);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(()=>{D.current?.input&&(D.current.input.indeterminate=s);},[s]);const B=g("checkbox",n),H=sn(B),[k,z]=_M(B,H),_={...h};S&&!u&&(_.onChange=(...Y)=>{h.onChange&&h.onChange.apply(h,Y),S.toggleOption&&S.toggleOption({label:i,value:h.value});},_.name=S.name,_.checked=S.value.includes(h.value));const W=V(`${B}-wrapper`,{[`${B}-rtl`]:b==="rtl",[`${B}-wrapper-checked`]:_.checked,[`${B}-wrapper-disabled`]:E,[`${B}-wrapper-in-form-item`]:I},y,r,M.root,o,z,H,k),O=V(M.icon,{[`${B}-indeterminate`]:s},zm,k),[L,j]=tP(_.onClick);return f__namespace.createElement(Nu,{component:"Checkbox",disabled:E},f__namespace.createElement("label",{className:W,style:{...N.root,...C,...a},onMouseEnter:l,onMouseLeave:c,onClick:L},f__namespace.createElement(QI,{..._,onClick:j,prefixCls:B,className:O,style:N.icon,disabled:E,ref:R}),Dn(i)&&f__namespace.createElement("span",{className:V(`${B}-label`,M.label),style:N.label},i)))},zM=f__namespace.forwardRef(hK),gK=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(B=>B.filter(H=>H!==R));},x=R=>{b(B=>[].concat(Et(B),[R]));},w=R=>{const B=p.indexOf(R.value),H=Et(p);B===-1?H.push(R.value):H.splice(B,1),"value"in u||h(H),c?.(H.filter(k=>g.includes(k)).sort((k,z)=>{const _=y.findIndex(O=>O.value===k),W=y.findIndex(O=>O.value===z);return _-W}));},S=d("checkbox",i),I=`${S}-group`,$=sn(S),[E,P]=_M(S,$),M=Zt(u,["value","disabled"]),N=o.length?y.map(R=>f__namespace.createElement(zM,{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:V(`${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]),D=V(I,{[`${I}-rtl`]:m==="rtl"},s,a,P,$,E);return f__namespace.createElement("div",{className:D,style:l,...M,ref:t},f__namespace.createElement(kM.Provider,{value:A},N))}),Zr=zM;Zr.Group=gK;Zr.__ANT_CHECKBOX=true;function bK(e,t){const n=Mt(),r=!!tr(n,e,false),o=f.useCallback(a=>{rl(Ue,e,a),t?.(a);},[]),i=f.useCallback(a=>{o(a.target.checked);},[]),s=f.useCallback(()=>{o(!tr(Ue,e,false));},[]);return {checked:r,onChange:o,checkboxOnChange:i,onToggle:s}}const HM=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}=bK(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(Zr,{...s,checked:c,onChange:d,ref:l,children:h})}if(i==="switch"){let h=v(DM,{...a,checked:c,onChange:u,ref:l});return r&&(h=m(h)),h}}),lt=f.forwardRef(function({configPath:e,label:t,extraAction:n,tooltip:r,tooltipProps:o,...i},s){return v(HM,{ref:s,configPath:e,label:t,extraAction:n,tooltip:r,tooltipProps:o,as:"checkbox",checkboxProps:i})}),bf=f.forwardRef(function({configPath:t,extraAction:n,tooltip:r,tooltipProps:o,...i},s){return v(HM,{ref:s,configPath:t,extraAction:n,tooltip:r,tooltipProps:o,as:"switch",switchProps:i})});async function dp(e="即将刷新网页!"){ft.info(e),await zt(500),location.reload();}function lr(e,t){return F(we,{children:[F("div",{className:"flex items-center",children:["✅: ",e]}),F("div",{className:"flex items-center",children:["❎: ",t]})]})}let Xl;function vK(){Pm(()=>{Xl&&URL.revokeObjectURL(Xl),Xl=void 0;});const e=Hu(),t=JSON.stringify(e,null,2),n=new Blob([t],{type:"application/json"});return Xl=URL.createObjectURL(n),Xl}function yK(){const e=vK(),t=`${uo}-settings ${nn().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 CK(){const e=await xK();if(!e)return;const t=await e.text();if(!t)return _t("文件内容为空!");let n;try{n=JSON.parse(t);}catch{return _t("无法解析文件内容!")}g1(n);const{pickedPaths:r,pickedSettings:o}=fl(n,Zi);return r.length?(aN(true),vo(o),ft.success("导入成功!"),dp()):_t("没有有效的设置!")}function xK(){return wK({accept:".json",multiple:false})}function wK(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 ur={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:ur.settingsGroup,"data-role":"settings-group",...o,children:[v("div",{"data-role":"settings-group-title",className:An(ur.settingsGroupTitle,n),children:t}),v("div",{"data-role":"settings-group-content",className:An("flex flex-col gap-y-5px",r),children:e})]})}function SK(e){const{pickedSettings:t}=fl(zu,e);vo(t);}function Ro({paths:e,className:t}){return v(ru,{title:"确定重置下面的设置项?",onConfirm:()=>SK(e),children:F(Je,{className:V("gap-x-4px",t),children:[v(H6,{className:"mt--1px size-12px"}),v("span",{children:"重置"})]})})}const $K=({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"})]})]}),j$=f.forwardRef($K),EK=({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"})]})]}),Nv=f.forwardRef(EK),IK=({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"})]})]}),Mv=f.forwardRef(IK),PK=({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"})]}),NK=f.forwardRef(PK),MK=({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"})]})]}),RK=f.forwardRef(MK);function AK(){return fj(),dp()}async function TK(){const e=await oN.getData();g1(e);const{pickedPaths:t,pickedSettings:n}=fl(e,Zi,ij);return t.length?(aN(true),vo(n),dp()):ft.error("备份不存在或没有有效的配置")}function OK(){const{autoPreviewUpdateInterval:e}=Mt(),[t,n]=f.useState(false);return F("div",{className:ur.tabPane,children:[v(Sn,{title:"设置项",children:F(Fr,{size:20,children:[v(ru,{title:"确定",description:"确定恢复默认设置? 此操作不可逆!",onConfirm:AK,children:F(Je,{danger:true,type:"primary",children:[v(j$,{}),"恢复默认设置"]})}),F(Fr,{size:5,children:[v(Jt,{title:"导出所有设置项到文件中, 包含 access_key 等数据, 请妥善保存",children:F(Je,{onClick:()=>yK(),children:[v(Nv,{}),"导出设置"]})}),v(Jt,{title:"从文件中导入设置项, 将覆盖当前设置, 此操作不可逆!",children:F(Je,{onClick:()=>CK(),children:[v(Mv,{}),"导入设置"]})})]})]})}),v(Sn,{title:F(we,{children:[v(NK,{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(lt,{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(ru,{title:"确定",description:"将覆盖本地设置? 此操作不可逆!",onConfirm:TK,children:F(Je,{danger:true,type:"primary",children:[v(j$,{}),"从专栏草稿箱中恢复"]})})]})}),v(Sn,{titleClassName:"justify-between",title:F(we,{children:["预览",v(Ro,{paths:["autoPreviewUpdateInterval"]})]}),children:F("div",{className:"flex-v-center",children:["自动预览更新间隔",v(MM,{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(we,{children:["其他",v(Mn,{children:"这里是一些作者不愿意解释的设置项 😬"}),v(Je,{onClick:()=>n(r=>!r),className:"ml-10px inline-icon-only-round-button",css:t&&hl,children:v(RK,{className:V("size-16px transition-300 transition-transform",t?"rotate-180":"rotate-0")})})]}),children:v(tK,{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(Ro,{paths:Xf,className:"flex-none"}),v("div",{className:"flex flex-1 flex-wrap items-start gap-x-20px gap-y-10px",children:Xf.map(r=>v(lt,{configPath:r,tooltip:F(we,{children:[r,W$[r]&&F(we,{children:[v("br",{}),W$[r]]})]}),label:QT(r.startsWith("__internal")?r.slice(10):r.replaceAll("__internal.",""))},r))})]})})})]})}const W$={},FK=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]:{...Bt(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}}}}},H1=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})},V1=e=>{const t=_y(new mr(e.colorBgSolid),"#fff")?"#000":"#fff";return {defaultBg:new Ft(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText,solidTextColor:t}},j1=wt("Tag",e=>{const t=H1(e);return FK(t)},V1),VM=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(kn),g=u??h,b=S=>{g||(l?.(!i),c?.(S));},y=m("tag",n),[C,x]=j1(y),w=V(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 BK(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}=$t("tag"),I=b("tag",r),$=`${I}-checkable-group`,E=sn(I),[P,M]=j1(I,E),[N,A]=It([w,a],[S,l],{props:e}),D=f.useMemo(()=>(u||[]).map(_=>_&&typeof _=="object"?_:{value:_,label:_}),[u]),[R,B]=Lt(m,d),H=(_,W)=>{let O=null;if(h){const L=R||[];O=_?[].concat(Et(L),[W.value]):L.filter(j=>j!==W.value);}else O=_?W.value:null;B(O),p?.(O);},k=f.useRef(null);f.useImperativeHandle(t,()=>({nativeElement:k.current}));const z=rr(g,{aria:true,data:true});return f.createElement("div",{...z,className:V($,C,o,{[`${$}-disabled`]:c,[`${$}-rtl`]:y==="rtl"},P,M,i,N.root),style:{...x,...A.root,...s},id:n,ref:k},D.map(_=>f.createElement(VM,{key:_.value,className:V(`${$}-item`,N.item),style:A.item,checked:h?(R||[]).includes(_.value):R===_.value,onChange:W=>H(W,_),disabled:c},_.label)))}const LK=f.forwardRef(BK);function DK(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=Km(n),c=gk(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 kK=e=>_m(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}}})),_K=ll(["Tag","preset"],e=>{const t=H1(e);return kK(t)},V1);function zK(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const Od=(e,t,n)=>{const r=zK(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}`]}}}},HK=ll(["Tag","status"],e=>{const t=H1(e);return [Od(t,"success","Success"),Od(t,"processing","Info"),Od(t,"error","Error"),Od(t,"warning","Warning")]},V1),VK=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}=$t("tag"),[P,M,N,A,D]=DK(e,S),R=N||A,B=f__namespace.useContext(kn),H=m??B,{tag:k}=f__namespace.useContext(ot),[z,_]=f__namespace.useState(true),W=Zt(y,["closeIcon","closable"]),O={...e,color:M,variant:P,disabled:H,href:p,target:h,icon:a},[L,j]=It([$,b],[E,g],{props:O}),Y=f__namespace.useMemo(()=>{let te={...j.root,...I,...i};return H||(te={...D,...te}),te},[j.root,I,i,D,H]),q=C("tag",n),[U,K]=j1(q),J=V(q,w,L.root,`${q}-${P}`,{[`${q}-${M}`]:R,[`${q}-hidden`]:!z,[`${q}-rtl`]:x==="rtl",[`${q}-disabled`]:H},r,o,U,K),Q=te=>{H||(te.stopPropagation(),u?.(te),!te.defaultPrevented&&_(false));},[,G]=X0(Di(e),Di(k),{closable:false,closeIconRender:te=>{const ce=f__namespace.createElement("span",{className:`${q}-close-icon`,onClick:Q},te);return JI(te,ce,ue=>({onClick:Ee=>{ue?.onClick?.(Ee),Q(Ee);},className:V(ue?.className,`${q}-close-icon`)}))}}),ee=typeof y.onClick=="function"||s&&s.type==="a",oe=Rn(a,{className:V(f__namespace.isValidElement(a)?a.props?.className:"",L.icon),style:j.icon}),re=oe?f__namespace.createElement(f__namespace.Fragment,null,oe,s&&f__namespace.createElement("span",{className:L.content,style:j.content},s)):s,he=p?"a":"span",Z=f__namespace.createElement(he,{...W,ref:t,className:J,style:Y,href:H?void 0:p,target:h,onClick:H?void 0:W.onClick,...p&&H?{"aria-disabled":true}:{}},re,G,N&&f__namespace.createElement(_K,{key:"preset",prefixCls:q}),A&&f__namespace.createElement(HK,{key:"status",prefixCls:q}));return ee?f__namespace.createElement(Nu,{component:"Tag"},Z):Z}),Ir=VK;Ir.CheckableTag=VM;Ir.CheckableTagGroup=LK;const jK=e=>{const{componentCls:t}=e;return {[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}},WK=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:o,textPaddingInline:i,orientationMargin:s,verticalMarginInline:a}=e,l=`${t}-rail`;return {[t]:{...Bt(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}}}}},qK=e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),UK=wt("Divider",e=>{const t=vt(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return [WK(t),jK(t)]},qK,{unitless:{orientationMargin:true}}),GK=["left","right","center","start","end"],KK={small:"sm",middle:"md"},Za=e=>{const{getPrefixCls:t,direction:n,className:r,style:o,classNames:i,styles:s}=$t("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]=UK(E),A=Hn(w),D=KK[A],R=!!g,B=GK.includes(c||""),H=f__namespace.useMemo(()=>{const K=d??(B?c:"center");return K==="left"?n==="rtl"?"end":"start":K==="right"?n==="rtl"?"start":"end":K},[n,c,d,B]),k=H==="start"&&m!=null,z=H==="end"&&m!=null,[_,W]=qs(c,u,l),O={...e,orientation:_,titlePlacement:H,size:A},[L,j]=It([i,S],[s,I],{props:O}),Y=V(E,r,M,N,`${E}-${_}`,{[`${E}-with-text`]:R,[`${E}-with-text-${H}`]:R,[`${E}-dashed`]:!!b,[`${E}-${y}`]:y!=="solid",[`${E}-plain`]:!!C,[`${E}-rtl`]:n==="rtl",[`${E}-no-default-orientation-margin-start`]:k,[`${E}-no-default-orientation-margin-end`]:z,[`${E}-${D}`]:!!D,[P]:!g,[L.rail]:L.rail&&!g},p,h,L.root),q=f__namespace.useMemo(()=>typeof m=="number"?m:/^\d+$/.test(m)?Number(m):m,[m]),U={marginInlineStart:k?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:V(P,`${P}-start`,L.rail),style:j.rail}),f__namespace.createElement("span",{className:V(`${E}-inner-text`,L.content),style:{...U,...j.content}},g),f__namespace.createElement("div",{className:V(P,`${P}-end`,L.rail),style:j.rail})))},XK=(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])},jM=f__namespace.createContext(null);function ea(){return f__namespace.useContext(jM)}function YK(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 WM(e,t){return e.filter(n=>n).some(n=>n.contains(t)||n===t)}function QK(e,t,n,r){const o=at(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&&!WM(e(),s)&&n(false);});f__namespace.useEffect(()=>(window.addEventListener("mousedown",o),()=>window.removeEventListener("mousedown",o)),[o]);}function Rv(){return Rv=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},Rv.apply(this,arguments)}const ZK=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"}}},JK=(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||ZK(h),[p,h]),N=a?`${E}-${a}`:l,A=typeof h=="number",D=f__namespace.useMemo(()=>A?null:h===false?"minWidth":"width",[h,A]);let R=c;A&&(R={...c,width:h});const B=f__namespace.useRef(null);return f__namespace.useImperativeHandle(t,()=>({getPopupElement:()=>B.current?.popupElement})),f__namespace.createElement(Dm,Rv({},$,{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:B,stretch:D,popupAlign:b,popupVisible:o,getPopupContainer:y,popupClassName:V(u,{[`${E}-empty`]:C}),popupStyle:R,onPopupVisibleChange:x}),i)},eX=f__namespace.forwardRef(JK);function q$(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 Av(e){return typeof e<"u"&&!Number.isNaN(e)}function qM(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 tX(e,{fieldNames:t,childrenAsData:n}={}){const r=[],{label:o,value:i,options:s,groupLabel:a}=qM(t,false);function l(c,u){Array.isArray(c)&&c.forEach(d=>{if(u||!(s in d)){const m=d[i];r.push({key:q$(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:q$(d,r.length),group:true,data:d,label:m}),l(d[s],true);}});}return l(e,false),r}function Tv(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 nX=(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 rX(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 oX=e=>{const t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null);},W1=(e,t=1)=>{if(t<=0){e();return}oX(()=>{W1(e,t-1);});};function iX(e,t,n){const[r,o]=f.useState(false);f.useEffect(()=>{o(true);},[]);const[i,s]=Lt(false,e),l=n(r?i:false),c=f.useRef(0),u=at(m=>{t&&l!==m&&t(m),s(m);}),d=at((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():W1(()=>{y();});});return [l,d]}function sg(e){const{children:t,...n}=e;return t?f__namespace.createElement("div",n,t):null}const UM=f__namespace.createContext(null);function Ku(){return f__namespace.useContext(UM)}const KM=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"}}=Ku(),{id:w,classNames:S,styles:I,open:$,activeDescendantId:E,role:P,disabled:M}=ea()||{},N=V(`${d}-input`,S?.input,l),A=f__namespace.useRef(false),D=f__namespace.useRef(null),R=f__namespace.useRef(null);f__namespace.useImperativeHandle(t,()=>R.current);const B=q=>{let{value:U}=q.target;if(y&&D.current&&/[\r\n]/.test(D.current)){const K=D.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");U=U.replace(K,D.current);}D.current=null,p&&p(U,true,A.current),n?.(q);},H=q=>{const{key:U}=q,{value:K}=q.currentTarget;U==="Enter"&&m==="tags"&&!A.current&&h&&h(K),r?.(q);},k=q=>{g?.(),o?.(q);},z=()=>{A.current=true;},_=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");D.current=K||"";},[O,L]=f__namespace.useState(void 0);Kt(()=>{const q=R.current;if(s&&q){q.style.width="0px";const U=q.scrollWidth;L(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:B,onKeyDown:H,onBlur:k,onPaste:W,onCompositionStart:z,onCompositionEnd:_,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 XM(e){const{prefixCls:t,placeholder:n,displayValues:r}=Ku(),{classNames:o,styles:i}=ea(),{show:s=true}=e;return r.length?null:f__namespace.createElement("div",{className:V(`${t}-placeholder`,o?.placeholder),style:{visibility:s?"visible":"hidden",...i?.placeholder}},n)}const q1=f__namespace.createContext(null);function YM(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function sX(e){return e!=null}function aX(e){return !e&&e!==0}function U$(e){return ["string","number"].includes(typeof e)}function Ov(e){let t;return e&&(U$(e.title)?t=e.title.toString():U$(e.label)&&(t=e.label.toString())),t}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 lX=f__namespace.forwardRef(({inputProps:e},t)=>{const{prefixCls:n,searchValue:r,activeValue:o,displayValues:i,maxLength:s,mode:a}=Ku(),{triggerOpen:l,title:c,showSearch:u,classNames:d,styles:m}=ea(),p=f__namespace.useContext(q1),[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:Ov(S.data),className:V(w.className,E),style:{...w.style,...P}};}}return y&&!w.title&&(w.title=Ov(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:V(`${n}-content`,d?.content),style:m?.content},y?f__namespace.createElement("div",x,y.label):f__namespace.createElement(XM,{show:!C}),f__namespace.createElement(KM,Fv({ref:t},e,{value:C,maxLength:a==="combobox"?s:void 0,onChange:w=>{g(true),e.onChange?.(w);}})))}),QM=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:V(t.split(/\s+/).map(c=>`${c}-icon`))},i))};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)}function cX(e){return e.key??e.value}const G$=e=>{e.preventDefault(),e.stopPropagation();},uX=f__namespace.forwardRef(function({inputProps:t},n){const{prefixCls:r,displayValues:o,searchValue:i,mode:s,onSelectorRemove:a,removeIcon:l}=Ku(),{disabled:c,showSearch:u,triggerOpen:d,toggleOpen:m,autoClearSearchValue:p,tagRender:h,maxTagPlaceholder:g,maxTagTextLength:b,maxTagCount:y,classNames:C,styles:x}=ea(),w=`${r}-selection-item`;let S=i;!d&&s==="multiple"&&p!==false&&(S="");const I=u&&S||"",$=u&&!c,E=l??"×",P=g??(k=>`+ ${k.length} ...`),M=h,N=k=>{m(k);},A=k=>{a?.(k);},D=(k,z,_,W,O)=>f__namespace.createElement("span",{title:Ov(k),className:V(w,{[`${w}-disabled`]:_},C?.item),style:x?.item},f__namespace.createElement("span",{className:V(`${w}-content`,C?.itemContent),style:x?.itemContent},z),W&&f__namespace.createElement(QM,{className:V(`${w}-remove`,C?.itemRemove),style:x?.itemRemove,onMouseDown:G$,onClick:O,customizeIcon:E},"×")),R=(k,z,_,W,O,L,j)=>{const Y=q=>{G$(q),N(!d);};return f__namespace.createElement("span",{onMouseDown:Y},M({label:z,value:k,index:j?.index,disabled:_,closable:W,onClose:O,isMaxTag:!!L}))},B=(k,z)=>{const{disabled:_,label:W,value:O}=k,L=!c&&!_;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(k);};return typeof M=="function"?R(O,j,_,L,Y,void 0,z):D(k,j,_,L,Y)},H=k=>{if(!o.length)return null;const z=typeof P=="function"?P(k):P;return typeof M=="function"?R(void 0,z,false,false,void 0,true):D({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(XM,null):null,data:o,renderItem:B,renderRest:H,suffix:f__namespace.createElement(KM,Bv({ref:n,disabled:c,readOnly:!$},t,{value:I||"",syncWidth:true})),itemKey:cX,maxCount:y})}),dX=f__namespace.forwardRef(function(t,n){const{multiple:r,onInputKeyDown:o,tabIndex:i}=Ku(),s=ea(),{showSearch:a}=s,c={...rr(s,{aria:true}),onKeyDown:o,readOnly:!a,tabIndex:i};return r?f__namespace.createElement(uX,{ref:n,inputProps:c}):f__namespace.createElement(lX,{ref:n,inputProps:c})});function fX(e){return e&&![je.ESC,je.SHIFT,je.BACKSPACE,je.TAB,je.WIN_KEY,je.ALT,je.META,je.WIN_KEY_RIGHT,je.CTRL,je.SEMICOLON,je.EQUALS,je.CAPS_LOCK,je.CONTEXT_MENU,je.UP,je.LEFT,je.RIGHT,je.F1,je.F2,je.F3,je.F4,je.F5,je.F6,je.F7,je.F8,je.F9,je.F10,je.F11,je.F12].includes(e)}function im(){return im=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},im.apply(this,arguments)}const mX=["value","onChange","removeIcon","placeholder","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex","activeValue","onSelectorRemove","focused"],pX=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:D,disabled:R,loading:B,classNames:H,styles:k}=ea(),z=f__namespace.useRef(null),_=f__namespace.useRef(null),W=at(q=>{const{which:U}=q,K=_.current instanceof HTMLTextAreaElement;!K&&N&&(U===je.UP||U===je.DOWN)&&q.preventDefault(),I&&I(q),!(K&&!N&&~[je.UP,je.DOWN,je.LEFT,je.RIGHT].indexOf(U))&&fX(U)&&A(true);});f__namespace.useImperativeHandle(n,()=>({focus:q=>{(_.current||z.current).focus?.(q);},blur:()=>{(_.current||z.current).blur?.();},nativeElement:z.current}));const O=at(q=>{if(!R){const U=_c(_.current);q.nativeEvent._ori_target=U,U&&q.target!==U&&!U.contains(q.target)&&q.preventDefault();const K=N&&!u&&(p==="combobox"||D);q.nativeEvent._select_lazy?N&&A(false):(_.current?.focus(),K||A());}w?.(q);}),{root:L}=P,j=Zt(M,mX),Y={...t,onInputKeyDown:W};return L?f__namespace.isValidElement(L)?f__namespace.cloneElement(L,{...j,ref:In(L.ref,z)}):f__namespace.createElement(L,im({},j,{ref:z})):f__namespace.createElement(UM.Provider,{value:Y},f__namespace.createElement("div",im({},j,{ref:z,className:o,style:i,onMouseDown:O}),f__namespace.createElement(sg,{className:V(`${r}-prefix`,H?.prefix),style:k?.prefix},s),f__namespace.createElement(dX,{ref:_}),f__namespace.createElement(sg,{className:V(`${r}-suffix`,{[`${r}-suffix-loading`]:B},H?.suffix),style:k?.suffix},a),l&&f__namespace.createElement(sg,{className:V(`${r}-clear`,H?.clear),style:k?.clear,onMouseDown:q=>{q.nativeEvent._select_lazy=true,S?.(q);}},l),c))});function hX(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 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 Dv=e=>e==="tags"||e==="multiple",gX=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:D,searchValue:R,autoClearSearchValue:B,onSearch:H,onSearchSplit:k,tokenSeparators:z,allowClear:_,prefix:W,suffix:O,suffixIcon:L,clearIcon:j,OptionList:Y,animation:q,transitionName:U,popupStyle:K,popupClassName:J,popupMatchSelectWidth:Q,popupRender:G,popupAlign:ee,placement:oe,builtinPlacements:re,getPopupContainer:he,showAction:Z=[],onFocus:te,onBlur:ce,onKeyUp:ue,onKeyDown:Ee,onMouseDown:Re,components:be,...le}=e,ae=Dv(x),ye=f__namespace.useRef(null),Se=f__namespace.useRef(null),He=f__namespace.useRef(null),[Le,Ae]=f__namespace.useState(false);f__namespace.useImperativeHandle(t,()=>({focus:ye.current?.focus,blur:ye.current?.blur,scrollTo:pe=>He.current?.scrollTo(pe),nativeElement:_c(ye.current)}));const _e=hX(be,I,$),Te=f__namespace.useMemo(()=>{if(x!=="combobox")return R;const pe=m[0]?.value;return typeof pe=="string"||typeof pe=="number"?String(pe):""},[R,x,m]),Ce=x==="combobox"&&typeof I=="function"&&I()||null,Pe=!g&&h,[De,Oe]=iX(E,M,pe=>w||Pe?false:pe),Ne=f__namespace.useMemo(()=>(z||[]).some(pe=>[`
`,`\r
`].includes(pe)),[z]),Qe=(pe,Fe,Ge)=>{if(ae&&Av(y)&&m.length>=y)return;let ut=true,Pt=pe;A?.(null);const qt=nX(pe,z,Av(y)?y-m.length:void 0),Xt=Ge?null:qt;return x!=="combobox"&&Xt&&(Pt="",k?.(Xt),Oe(false),ut=false),H&&Te!==Pt&&H(Pt,{source:Fe?"typing":"effect"}),pe&&Fe&&ut&&Oe(true),ut},mt=pe=>{!pe||!pe.trim()||H(pe,{source:"submit"});};f__namespace.useEffect(()=>{!De&&!ae&&x!=="combobox"&&Qe("",false,false);},[De]),f__namespace.useEffect(()=>{w&&(Oe(false),Ae(false));},[w,De]);const[it,ct]=YK(),bt=f__namespace.useRef(false),pt=pe=>{const Fe=it(),{key:Ge}=pe,ut=Ge==="Enter";if(ut&&(x!=="combobox"&&pe.preventDefault(),De||Oe(true)),ct(!!Te),Ge==="Backspace"&&!Fe&&ae&&!Te&&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]});}De&&(!ut||!bt.current)&&(ut&&(bt.current=true),He.current?.onKeyDown(pe)),Ee?.(pe);},nt=(pe,...Fe)=>{De&&He.current?.onKeyUp(pe,...Fe),pe.key==="Enter"&&(bt.current=false),ue?.(pe,...Fe);},et=at(pe=>{const Fe=m.filter(Ge=>Ge!==pe);p(Fe,{type:"remove",values:[pe]});}),Xe=()=>{bt.current=false;},Ie=()=>[_c(ye.current),Se.current?.getPopupElement()];QK(Ie,De,Oe,!!_e.root);const Me=f__namespace.useRef(false),se=pe=>{Ae(true),w||(Z.includes("focus")&&Oe(true),te?.(pe));},ge=()=>{De&&!Me.current&&Oe(false,{cancelFun:()=>WM(Ie(),document.activeElement)});},fe=pe=>{Ae(false),Te&&(x==="tags"?H(Te,{source:"submit"}):x==="multiple"&&H("",{source:"blur"})),ge(),w||ce?.(pe);},ie=(pe,...Fe)=>{const{target:Ge}=pe;Se.current?.getPopupElement()?.contains(Ge)&&Oe&&Oe(true),Re?.(pe,...Fe),Me.current=true,W1(()=>{Me.current=false;});},[,ve]=f__namespace.useState({});function me(){ve({});}let xe;_e.root&&(xe=pe=>{Oe(pe);});const ke=f__namespace.useMemo(()=>({...e,notFoundContent:g,open:De,triggerOpen:De,id:n,showSearch:a,multiple:ae,toggleOpen:Oe,showScrollBar:c,styles:i,classNames:s}),[e,g,Oe,n,a,ae,De,c,i,s]),qe=f__namespace.useMemo(()=>{const pe=O??L;return typeof pe=="function"?pe({searchValue:Te,open:De,focused:Le,showSearch:a,loading:S}):pe},[O,L,Te,De,Le,a,S]),Ze=()=>{b?.(),ye.current?.focus(),p([],{type:"clear",values:m}),Qe("",false,false);},{allowClear:st,clearIcon:Ct}=XK(r,m,_,j,w,Te,x),an=f__namespace.createElement(Y,{ref:He}),On=V(r,o,{[`${r}-focused`]:Le,[`${r}-multiple`]:ae,[`${r}-single`]:!ae,[`${r}-allow-clear`]:st,[`${r}-show-arrow`]:qe!=null,[`${r}-disabled`]:w,[`${r}-loading`]:S,[`${r}-open`]:De,[`${r}-customize-input`]:Ce,[`${r}-show-search`]:a});let Rt=f__namespace.createElement(pX,Lv({},le,{ref:ye,prefixCls:r,className:On,focused:Le,prefix:W,suffix:qe,clearIcon:Ct,multiple:ae,mode:x,displayValues:m,placeholder:C,searchValue:Te,activeValue:N,onSearch:Qe,onSearchSubmit:mt,onInputBlur:Xe,onFocus:se,onBlur:fe,onClearMouseDown:Ze,onKeyDown:pt,onKeyUp:nt,onSelectorRemove:et,tokenWithEnter:Ne,onMouseDown:ie,components:_e}));return Rt=f__namespace.createElement(eX,{ref:Se,disabled:w,prefixCls:r,visible:De,popupElement:an,animation:q,transitionName:U,popupStyle:K,popupClassName:J,direction:u,popupMatchSelectWidth:Q,popupRender:G,popupAlign:ee,placement:oe,builtinPlacements:re,getPopupContainer:he,empty:h,onPopupVisibleChange:xe,onPopupMouseEnter:me,onPopupMouseDown:ie,onPopupBlur:ge},Rt),f__namespace.createElement(jM.Provider,{value:ke},f__namespace.createElement(rX,{visible:Le&&!De,values:m}),Rt)}),U1=()=>null;U1.isSelectOptGroup=true;const G1=()=>null;G1.isSelectOption=true;const ZM=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(Xr,{onResize:({offsetHeight:m})=>{m&&i&&i();}},f__namespace.createElement("div",dn({style:d,className:V({[`${o}-holder-inner`]:o}),ref:c},s),r,l)))});ZM.displayName="Filler";function bX({children:e,setRef:t}){const n=f__namespace.useCallback(r=>{t(r);},[]);return f__namespace.cloneElement(e,{ref:n})}function vX(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(bX,{key:m,setRef:p=>i(l,p)},d)})}function yX(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 CX(e,t,n){const[r,o]=f__namespace.useState(e),[i,s]=f__namespace.useState(null);return f__namespace.useEffect(()=>{const a=yX(r||[],e||[],t);a?.index!==void 0&&s(e[a.index]),o(e);},[e]),[i]}const K$=typeof navigator=="object"&&/Firefox/i.test(navigator.userAgent),JM=(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 xX(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=JM(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,K$||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),K$||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 wX(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 SX{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 X$(e){const t=parseFloat(e);return isNaN(t)?0:t}function $X(e,t,n){const[r,o]=f__namespace.useState(0),i=f.useRef(new Map),s=f.useRef(new SX),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=X$(y),w=X$(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 Y$=14/15;function EX(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*=Y$:b*=Y$;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 Q$(e){return Math.floor(e**.5)}function kv(e,t){return ("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}function IX(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=kv(m,false),{top:h,bottom:g}=r.getBoundingClientRect();if(p<=h){const b=h-p;s=-Q$(b),l();}else if(p>=g){const b=p-g;s=Q$(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 PX=10;function NX(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<PX){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 Z$=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,D=d-u||0,R=f__namespace.useMemo(()=>o===0||A===0?0:o/A*D,[o,A,D]),B=j=>{j.stopPropagation(),j.preventDefault();},H=f__namespace.useRef({top:R,dragging:g,pageY:y,startTop:x});H.current={top:R,dragging:g,pageY:y,startTop:x};const k=j=>{b(true),C(kv(j,c)),w(H.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",k,{passive:false}),()=>{Y.removeEventListener("touchstart",j),q.removeEventListener("touchstart",k);}},[]);const z=f__namespace.useRef();z.current=A;const _=f__namespace.useRef();_.current=D,f__namespace.useEffect(()=>{if(g){let j;const Y=U=>{const{dragging:K,pageY:J,startTop:Q}=H.current;gt.cancel(j);const G=I.current.getBoundingClientRect(),ee=d/(c?G.width:G.height);if(K){const oe=(kv(U,c)-J)*ee;let re=Q;!S&&c?re-=oe:re+=oe;const he=z.current,Z=_.current,te=Z?re/Z:0;let ce=Math.ceil(te*he);ce=Math.max(ce,0),ce=Math.min(ce,he),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"},L={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(L,{height:"100%",width:u,[S?"left":"right"]:R})):(Object.assign(O,{width:8,top:0,bottom:0,[S?"right":"left"]:0}),Object.assign(L,{width:"100%",height:u,top:R})),f__namespace.createElement("div",{ref:I,className:V(W,{[`${W}-horizontal`]:c,[`${W}-vertical`]:!c,[`${W}-visible`]:E}),style:{...O,...m},onMouseDown:B,onMouseMove:N},f__namespace.createElement("div",{ref:$,className:V(`${W}-thumb`,{[`${W}-thumb-moving`]:g}),style:{...L,...p},onMouseDown:k}))}),MX=20;function J$(e=0,t=0){let n=e/t*e;return isNaN(n)&&(n=0),n=Math.max(n,MX),Math.floor(n)}const RX=[],AX={overflowY:"auto",overflowAnchor:"none"};function TX(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(fe=>typeof u=="function"?u(fe):fe?.[u],[u]),[E,P,M,N]=$X($),A=!!(d!==false&&o&&i),D=f__namespace.useMemo(()=>Object.values(M.maps).reduce((fe,ie)=>fe+ie,0),[M.id,M.maps]),R=A&&l&&(Math.max(i*l.length,D)>o||!!p),B=m==="rtl",H=V(n,{[`${n}-rtl`]:B},r),k=l||RX,z=f.useRef(),_=f.useRef(),W=f.useRef(),[O,L]=f.useState(0),[j,Y]=f.useState(0),[q,U]=f.useState(false),K=()=>{U(true);},J=()=>{U(false);},Q={getKey:$};function G(fe){L(ie=>{let ve;typeof fe=="function"?ve=fe(ie):ve=fe;const me=Le(ve);return z.current.scrollTop=me,me});}const ee=f.useRef({start:0,end:k.length}),oe=f.useRef(),[re]=CX(k,$);oe.current=re;const{scrollHeight:he,start:Z,end:te,offset:ce}=f__namespace.useMemo(()=>{if(!A)return {scrollHeight:void 0,start:0,end:k.length-1,offset:void 0};if(!R)return {scrollHeight:_.current?.offsetHeight||0,start:0,end:k.length-1,offset:void 0};let fe=0,ie,ve,me;const xe=k.length;for(let ke=0;ke<xe;ke+=1){const qe=k[ke],Ze=$(qe),st=M.get(Ze),Ct=fe+(st===void 0?i:st);Ct>=O&&ie===void 0&&(ie=ke,ve=fe),Ct>O+o&&me===void 0&&(me=ke),fe=Ct;}return ie===void 0&&(ie=0,ve=0,me=Math.ceil(o/i)),me===void 0&&(me=k.length-1),me=Math.min(me+1,k.length-1),{scrollHeight:fe,start:ie,end:me,offset:ve}},[R,A,O,k,N,o]);ee.current.start=Z,ee.current.end=te,f__namespace.useLayoutEffect(()=>{const fe=M.getRecord();if(fe.size===1){const ie=Array.from(fe.keys())[0],ve=fe.get(ie),me=k[Z];if(me&&ve===void 0&&$(me)===ie){const qe=M.get(ie)-i;G(Ze=>Ze+qe);}}M.resetRecord();},[he]);const[ue,Ee]=f__namespace.useState({width:0,height:o}),Re=fe=>{Ee({width:fe.offsetWidth,height:fe.offsetHeight});},be=f.useRef(),le=f.useRef(),ae=f__namespace.useMemo(()=>J$(ue.width,p),[ue.width,p]),ye=f__namespace.useMemo(()=>J$(ue.height,he),[ue.height,he]),Se=he-o,He=f.useRef(Se);He.current=Se;function Le(fe){let ie=fe;return Number.isNaN(He.current)||(ie=Math.min(ie,He.current)),ie=Math.max(ie,0),ie}const Ae=O<=0,_e=O>=Se,Te=j<=0,Ce=j>=p,Pe=JM(Ae,_e,Te,Ce),De=()=>({x:B?-j:j,y:O}),Oe=f.useRef(De()),Ne=at(fe=>{if(b){const ie={...De(),...fe};(Oe.current.x!==ie.x||Oe.current.y!==ie.y)&&(b(ie),Oe.current=ie);}});function Qe(fe,ie){const ve=fe;ie?(vT.flushSync(()=>{Y(ve);}),Ne()):G(ve);}function mt(fe){const{scrollTop:ie}=fe.currentTarget;ie!==O&&G(ie),g?.(fe),Ne();}const it=fe=>{let ie=fe;const ve=p?p-ue.width:0;return ie=Math.max(ie,0),ie=Math.min(ie,ve),ie},ct=at((fe,ie)=>{ie?(vT.flushSync(()=>{Y(ve=>{const me=ve+(B?-fe:fe);return it(me)});}),Ne()):G(ve=>ve+fe);}),[bt,pt]=xX(A,Ae,_e,Te,Ce,!!p,ct);EX(A,z,(fe,ie,ve,me)=>{const xe=me;return Pe(fe,ie,ve)?false:!xe||!xe._virtualHandled?(xe&&(xe._virtualHandled=true),bt({preventDefault(){},deltaX:fe?ie:0,deltaY:fe?0:ie}),true):false}),IX(R,z,fe=>{G(ie=>ie+fe);}),Kt(()=>{function fe(ve){const me=Ae&&ve.detail<0,xe=_e&&ve.detail>0;A&&!me&&!xe&&ve.preventDefault();}const ie=z.current;return ie.addEventListener("wheel",bt,{passive:false}),ie.addEventListener("DOMMouseScroll",pt,{passive:true}),ie.addEventListener("MozMousePixelScroll",fe,{passive:false}),()=>{ie.removeEventListener("wheel",bt),ie.removeEventListener("DOMMouseScroll",pt),ie.removeEventListener("MozMousePixelScroll",fe);}},[A,Ae,_e]),Kt(()=>{if(p){const fe=it(j);Y(fe),Ne({x:fe});}},[ue.width,p]);const nt=()=>{be.current?.delayHidden(),le.current?.delayHidden();},et=NX(z,k,M,i,$,()=>P(true),G,nt);f__namespace.useImperativeHandle(t,()=>({nativeElement:W.current,getScrollInfo:De,scrollTo:fe=>{function ie(ve){return ve&&typeof ve=="object"&&("left"in ve||"top"in ve)}ie(fe)?(fe.left!==void 0&&Y(it(fe.left)),et(fe.top)):et(fe);}})),Kt(()=>{if(y){const fe=k.slice(Z,te+1);y(fe,k);}},[Z,te,k]);const Xe=wX(k,$,M,i),Ie=x?.({start:Z,end:te,virtual:R,offsetX:j,offsetY:ce,rtl:B,getSize:Xe}),Me=vX(k,Z,te,p,j,E,c,Q);let se=null;o&&(se={[s?"height":"maxHeight"]:o,...AX},A&&(se.overflowY="hidden",p&&(se.overflowX="hidden"),q&&(se.pointerEvents="none")));const ge={};return B&&(ge.dir="rtl"),f__namespace.createElement("div",dn({ref:W,style:{...a,position:"relative"},className:H},ge,I),f__namespace.createElement(Xr,{onResize:Re},f__namespace.createElement(h,{className:`${n}-holder`,style:se,ref:z,onScroll:mt,onMouseEnter:nt},f__namespace.createElement(ZM,{prefixCls:n,height:he,offsetX:j,offsetY:ce,scrollWidth:p,onInnerResize:P,ref:_,innerProps:C,rtl:B,extra:Ie},Me))),R&&he>o&&f__namespace.createElement(Z$,{ref:be,prefixCls:n,scrollOffset:O,scrollRange:he,rtl:B,onScroll:Qe,onStartMove:K,onStopMove:J,spinSize:ye,containerSize:ue.height,style:w?.verticalScrollBar,thumbStyle:w?.verticalScrollBarThumb,showScrollBar:S}),R&&p>ue.width&&f__namespace.createElement(Z$,{ref:le,prefixCls:n,scrollOffset:j,scrollRange:p,rtl:B,onScroll:Qe,onStartMove:K,onStopMove:J,spinSize:ae,containerSize:ue.width,horizontal:true,style:w?.horizontalScrollBar,thumbStyle:w?.horizontalScrollBarThumb,showScrollBar:S}))}const e5=f__namespace.forwardRef(TX);e5.displayName="List";function OX(){return /(mac\sos|macintosh)/i.test(navigator.appVersion)}function xc(){return xc=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},xc.apply(this,arguments)}function e2(e){return typeof e=="string"||typeof e=="number"}const FX=(e,t)=>{const{prefixCls:n,id:r,open:o,multiple:i,mode:s,searchValue:a,toggleOpen:l,notFoundContent:c,onPopupScroll:u,showScrollBar:d}=ea(),{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(q1),N=`${n}-item`,A=il(()=>p,[o,p],(Q,G)=>G[0]&&Q[1]!==G[1]),D=f__namespace.useRef(null),R=f__namespace.useMemo(()=>i&&Av(m)&&C?.size>=m,[i,m,C?.size]),B=Q=>{Q.preventDefault();},H=Q=>{D.current?.scrollTo(typeof Q=="number"?{index:Q}:Q);},k=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 oe=0;oe<ee;oe+=1){const re=(Q+oe*G+ee)%ee,{group:he,data:Z}=A[re]||{};if(!he&&!Z?.disabled&&(k(Z.value)||!R))return re}return  -1},[_,W]=f__namespace.useState(()=>z(0)),O=(Q,G=false)=>{W(Q);const ee={source:G?"keyboard":"mouse"},oe=A[Q];if(!oe){h(null,-1,ee);return}h(oe.value,Q,ee);};f.useEffect(()=>{O(g!==false?z(0):-1);},[A.length,a]);const L=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:oe})=>a?String(oe.value).startsWith(a):oe.value===G);ee!==-1&&(O(ee),Q=setTimeout(()=>{H(ee);}));}return o&&D.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 je.N:case je.P:case je.UP:case je.DOWN:{let oe=0;if(G===je.UP?oe=-1:G===je.DOWN?oe=1:OX()&&ee&&(G===je.N?oe=1:G===je.P&&(oe=-1)),oe!==0){const re=z(_+oe,oe);H(re),O(re,true);}break}case je.TAB:case je.ENTER:{const oe=A[_];if(!oe||oe.data.disabled)return j(void 0);!R||C.has(oe.value)?j(oe.value):j(void 0),o&&Q.preventDefault();break}case je.ESC:l(false),o&&Q.stopPropagation();}},onKeyUp:()=>{},scrollTo:Q=>{H(Q);}})),A.length===0)return f__namespace.createElement("div",{role:"listbox",id:`${r}_list`,className:`${N}-empty`,onMouseDown:B},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:oe}=ee,{group:re}=G,he=rr(ee,true),Z=q(G);return G?f__namespace.createElement("div",xc({"aria-label":typeof Z=="string"&&!re?Z:null},he,{key:Q},U(G,Q),{"aria-selected":L(oe)}),oe):null},J={role:"listbox",id:`${r}_list`};return f__namespace.createElement(f__namespace.Fragment,null,w&&f__namespace.createElement("div",xc({},J,{style:{height:0,width:0,overflow:"hidden"}}),K(_-1),K(_),K(_+1)),f__namespace.createElement(e5,{itemKey:"key",ref:D,data:A,height:I,itemHeight:$,fullHeight:false,onMouseDown:B,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:oe,data:re,label:he,value:Z}=Q,{key:te}=re;if(ee){const Pe=re.title??(e2(he)?he.toString():void 0);return f__namespace.createElement("div",{className:V(N,`${N}-group`,re.className),title:Pe},he!==void 0?he:te)}const{disabled:ce,title:ue,children:Ee,style:Re,className:be,...le}=re,ae=Zt(le,Y),ye=k(Z),Se=ce||!ye&&R,He=`${N}-option`,Le=V(N,He,be,P?.popup?.listItem,{[`${He}-grouped`]:oe,[`${He}-active`]:_===G&&!Se,[`${He}-disabled`]:Se,[`${He}-selected`]:ye}),Ae=q(Q),_e=!y||typeof y=="function"||ye,Te=typeof Ae=="number"?Ae:Ae||Z;let Ce=e2(Te)?Te.toString():void 0;return ue!==void 0&&(Ce=ue),f__namespace.createElement("div",xc({},rr(ae),w?{}:U(Q,G),{"aria-selected":w?void 0:L(Z),className:Le,title:Ce,onMouseMove:()=>{_===G||Se||O(G);},onClick:()=>{Se||j(Z);},style:{...M?.popup?.listItem,...Re}}),f__namespace.createElement("div",{className:`${He}-content`},typeof E=="function"?E(Q,{index:G}):Te),f__namespace.isValidElement(y)||ye,_e&&f__namespace.createElement(QM,{className:`${N}-option-state`,customizeIcon:y,customizeIconProps:{value:Z,disabled:Se,isSelected:ye}},ye?"✓":null))}))},BX=f__namespace.forwardRef(FX),LX=(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 ag(e,t){return YM(e).join("").toUpperCase().includes(t)}const DX=(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=>ag(h[g],u)):h[i]?ag(h[s!=="children"?s:"label"],u):ag(h[a],u),m=c?p=>Tv(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 kX(e){const{key:t,props:{children:n,value:r,...o}}=e;return {key:t,value:r!==void 0?r:t,children:n,...o}}function t5(e,t=false){return hr(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?kX(n):{key:`__RC_SELECT_GRP__${i===null?r:i}__`,label:i,...a,options:t5(s)}}).filter(n=>n)}const _X=(e,t,n,r,o)=>f__namespace.useMemo(()=>{let i=e;!e&&(i=t5(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 t2(e){const t=f__namespace.useRef();return t.current=e,f__namespace.useCallback((...r)=>t.current(...r),[])}function zX(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 _v(){return _v=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},_v.apply(this,arguments)}const HX=["inputValue"];function VX(e){return !e||typeof e!="object"}const jX=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:D,defaultValue:R,labelInValue:B,onChange:H,maxCount:k,classNames:z,styles:_,...W}=e,O={searchValue:l,onSearch:c,autoClearSearchValue:u,filterOption:d,optionFilterProp:m,filterSort:p},[L,j]=zX(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),oe=Dv(r),re=!!(!x&&S),he=f__namespace.useMemo(()=>Y===void 0&&r==="combobox"?false:Y,[Y,r]),Z=f__namespace.useMemo(()=>qM(s,re),[JSON.stringify(s),re]),[te,ce]=Lt("",q),ue=te||"",Ee=_X(x,S,Z,G,C),{valueOptions:Re,labelOptions:be,options:le}=Ee,ae=f__namespace.useCallback(me=>YM(me).map(ke=>{let qe,Ze,st,Ct;VX(ke)?qe=ke:(Ze=ke.label,qe=ke.value);const an=Re.get(qe);return an&&(Ze===void 0&&(Ze=an?.[C||Z.label]),st=an?.disabled,Ct=an?.title),{label:Ze,value:qe,key:qe,disabled:st,title:Ct}}),[Z,C,Re]),[ye,Se]=Lt(R,D),He=f__namespace.useMemo(()=>{const xe=ae(oe&&ye===null?[]:ye);return r==="combobox"&&aX(xe[0]?.value)?[]:xe},[ye,ae,r,oe]),[Le,Ae]=LX(He,Re),_e=f__namespace.useMemo(()=>{if(!r&&Le.length===1){const me=Le[0];if(me.value===null&&(me.label===null||me.label===void 0))return []}return Le.map(me=>({...me,label:(typeof A=="function"?A(me):me.label)??me.value}))},[r,Le,A]),Te=f__namespace.useMemo(()=>new Set(Le.map(me=>me.value)),[Le]);f__namespace.useEffect(()=>{if(r==="combobox"){const me=Le[0]?.value;ce(sX(me)?String(me):"");}},[Le]);const Ce=t2((me,xe)=>{const ke=xe??me;return {[Z.value]:me,[Z.label]:ke}}),Pe=f__namespace.useMemo(()=>{if(r!=="tags")return le;const me=[...le],xe=ke=>Re.has(ke);return [...Le].sort((ke,qe)=>ke.value<qe.value?-1:1).forEach(ke=>{const qe=ke.value;xe(qe)||me.push(Ce(qe,ke.label));}),me},[Ce,le,Re,Le,r]),De=DX(Pe,Z,ue,he,G),Oe=f__namespace.useMemo(()=>{const me=xe=>G.length?G.some(ke=>xe?.[ke]===ue):xe?.value===ue;return r!=="tags"||!ue||De.some(xe=>me(xe))||De.some(xe=>xe[Z.value]===ue)?De:[Ce(ue),...De]},[Ce,G,r,De,ue,Z]),Ne=me=>[...me].sort((ke,qe)=>K(ke,qe,{searchValue:ue})).map(ke=>Array.isArray(ke.options)?{...ke,options:ke.options.length>0?Ne(ke.options):ke.options}:ke),Qe=f__namespace.useMemo(()=>K?Ne(Oe):Oe,[Oe,K,ue]),mt=f__namespace.useMemo(()=>tX(Qe,{fieldNames:Z,childrenAsData:re}),[Qe,Z,re]),it=me=>{const xe=ae(me);if(Se(xe),H&&(xe.length!==Le.length||xe.some((ke,qe)=>Le[qe]?.value!==ke?.value))){const ke=B?xe.map(({label:Ze,value:st})=>({label:Ze,value:st})):xe.map(Ze=>Ze.value),qe=xe.map(Ze=>Tv(Ae(Ze.value)));H(oe?ke:ke[0],oe?qe:qe[0]);}},[ct,bt]=f__namespace.useState(null),[pt,nt]=f__namespace.useState(0),et=I!==void 0?I:r!=="combobox",Xe=f__namespace.useRef(),Ie=f__namespace.useCallback((me,xe,{source:ke="keyboard"}={})=>{nt(xe),i&&r==="combobox"&&me!==null&&ke==="keyboard"&&bt(String(me));const qe=Promise.resolve().then(()=>{Xe.current===qe&&b?.(me);});Xe.current=qe;},[i,r,b]),Me=(me,xe,ke)=>{const qe=()=>{const Ze=Ae(me);return [B?{label:Ze?.[Z.label],value:me}:me,Tv(Ze)]};if(xe&&h){const[Ze,st]=qe();h(Ze,st);}else if(!xe&&g&&ke!=="clear"){const[Ze,st]=qe();g(Ze,st);}},se=t2((me,xe)=>{let ke;const qe=oe?xe.selected:true;qe?ke=oe?[...Le,me]:[me]:ke=Le.filter(Ze=>Ze.value!==me),it(ke),Me(me,qe),r==="combobox"?bt(""):(!Dv||Q)&&(ce(""),bt(""));}),ge=(me,xe)=>{it(me);const{type:ke,values:qe}=xe;(ke==="remove"||ke==="clear")&&qe.forEach(Ze=>{Me(Ze.value,false,ke);});},fe=(me,xe)=>{if(ce(me),bt(null),xe.source==="submit"){const ke=(me||"").trim();if(ke){const qe=Array.from(new Set([...Te,ke]));it(qe),Me(ke,true),ce("");}return}xe.source!=="blur"&&(r==="combobox"&&it(me),J?.(me));},ie=me=>{let xe=me;r!=="tags"&&(xe=me.map(qe=>be.get(qe)?.value).filter(qe=>qe!==void 0));const ke=Array.from(new Set([...Te,...xe]));it(ke),ke.forEach(qe=>{Me(qe,true);});},ve=f__namespace.useMemo(()=>({...Ee,flattenOptions:mt,onActiveValue:Ie,defaultActiveFirstOption:et,onSelect:se,menuItemSelectedIcon:$,rawValues:Te,fieldNames:Z,virtual:E!==false&&y!==false,direction:P,listHeight:M,listItemHeight:N,childrenAsData:re,maxCount:k,optionRender:w,classNames:z,styles:_}),[k,Ee,mt,Ie,et,se,$,Te,Z,E,y,P,M,N,re,w,z,_]);return f__namespace.createElement(q1.Provider,{value:ve},f__namespace.createElement(gX,_v({},W,{id:ee,prefixCls:o,ref:t,omitDomProps:HX,mode:r,classNames:z,styles:_,displayValues:_e,onDisplayValuesChange:ge,maxCount:k,direction:P,showSearch:L,searchValue:ue,onSearch:fe,autoClearSearchValue:Q,onSearchSplit:ie,popupMatchSelectWidth:y,OptionList:BX,emptyOptions:!mt.length,activeValue:ct,activeDescendantId:`${ee}_list_${pt}`})))}),K1=jX;K1.Option=G1;K1.OptGroup=U1;const WX=()=>{const[,e]=Tn(),[t]=ir("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"}))))},qX=()=>{const[,e]=Tn(),[t]=ir("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}))))},UX=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}}}}},GX=wt("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 UX(o)}),n5=f__namespace.createElement(WX,null),r5=f__namespace.createElement(qX,null),jr=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}=$t("empty"),x=m("empty",r),[w,S]=GX(x),[I,$]=It([b,c],[y,u],{props:e}),[E]=ir("Empty"),P=typeof i<"u"?i:E?.description,M=typeof P=="string"?P:"empty",N=o??C??n5;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:V(w,S,x,h,{[`${x}-normal`]:N===r5,[`${x}-rtl`]:p==="rtl"},t,n,I.root),style:{...$.root,...g,...l},...d},f__namespace.createElement("div",{className:V(`${x}-image`,I.image),style:{...a,...$.image}},A),P&&f__namespace.createElement("div",{className:V(`${x}-description`,I.description),style:$.description},P),s&&f__namespace.createElement("div",{className:V(`${x}-footer`,I.footer),style:$.footer},s))};jr.PRESENTED_IMAGE_DEFAULT=n5;jr.PRESENTED_IMAGE_SIMPLE=r5;const o5=e=>{const{componentName:t}=e,{getPrefixCls:n}=f.useContext(ot),r=n("empty");switch(t){case "Table":case "List":return f.createElement(jr,{image:jr.PRESENTED_IMAGE_SIMPLE});case "Select":case "TreeSelect":case "Cascader":case "Transfer":case "Mentions":return f.createElement(jr,{image:jr.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case "Table.filter":return null;default:return f.createElement(jr,null)}},fp=(e,t,n)=>{const{variant:r,[e]:o}=f__namespace.useContext(ot),i=f__namespace.useContext(aL),s=o?.variant;let a;typeof t<"u"?a=t:n===false?a="borderless":a=i??s??r??"outlined";const l=TF.includes(a);return [a,l]},KX=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 XX(e,t){return e||KX(t)}const n2=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"}},YX=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`]:{...Bt(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:Py},[`
          ${o}${a}topLeft,
          ${i}${a}topLeft,
          ${o}${a}topRight,
          ${i}${a}topRight
        `]:{animationName:My},[`${s}${a}bottomLeft`]:{animationName:Ny},[`
          ${s}${a}topLeft,
          ${s}${a}topRight
        `]:{animationName:Ry},"&-hidden":{display:"none"},[r]:{...n2(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",...Do},"&-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":{...n2(e),color:e.colorTextDisabled}},[`${l}:has(+ ${l})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${l}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}}},Vi(e,"slide-up"),Vi(e,"slide-down"),Df(e,"move-up"),Df(e,"move-down")]},QX=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"}}}}},r2=4,ZX=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% - ${r2}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":{...Do,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:r2,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"}}}}},lg=(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}}},Fd=(e,t,n,r={},o={},i)=>{const{componentCls:s}=e;return {[`&${s}-${t}`]:[lg(e,n),{[`&${s}-status-error`]:lg(e,{...n,color:r.color||e.colorError,...r}),[`&${s}-status-warning`]:lg(e,{...n,color:o.color||e.colorWarning,...o})},i]}},JX=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))",...Bt(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`]:{...Do,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":{...Do,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"}}},ZX(e),Fd(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}),Fd(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}),Fd(e,"borderless",{border:"transparent",borderHover:"transparent",borderActive:"transparent",borderOutline:"transparent",background:"transparent"}),Fd(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"}),QX(e)]}},eY=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}},tY=e=>{const{antCls:t,componentCls:n,inputPaddingHorizontalBase:r}=e,o={[`${n}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:"50%"}};return {[n]:{...Bt(e),[`${n}-selection-item`]:{flex:1,fontWeight:"normal",position:"relative",userSelect:"none",...Do,[`> ${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()}}}}}},nY=e=>{const{componentCls:t}=e;return [{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},tY(e),YX(e),{[`${t}-rtl`]:{direction:"rtl"}},ul(e,{focusElCls:`${t}-focused`})]},rY=wt("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 [nY(n),JX(n)]},eY,{unitless:{optionLineHeight:true,optionSelectedFontWeight:true}});var oY={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 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 iY=(e,t)=>f__namespace.createElement(on,zv({},e,{ref:t,icon:oY})),sY=f__namespace.forwardRef(iY);var aY={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 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 lY=(e,t)=>f__namespace.createElement(on,Hv({},e,{ref:t,icon:aY})),X1=f__namespace.forwardRef(lY);var cY={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 Vv(){return Vv=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},Vv.apply(this,arguments)}const uY=(e,t)=>f__namespace.createElement(on,Vv({},e,{ref:t,icon:cY})),Y1=f__namespace.forwardRef(uY);function dY({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(Tu,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(Xm,{spin:true})):p=({open:b,showSearch:y})=>m(b&&y?f__namespace.createElement(Y1,null):f__namespace.createElement(X1,null));let h=null;n!==void 0?h=n:i?h=f__namespace.createElement(sY,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 fY(e){return f.useMemo(()=>{if(e)return (...t)=>f.createElement(zi,{space:true},e.apply(void 0,t))},[e])}function mY(e,t){return t!==void 0?t:e!==null}const i5="SECRET_COMBOBOX_MODE_DO_NOT_USE",pY=(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:D,popupRender:R,onDropdownVisibleChange:B,onOpenChange:H,styles:k,classNames:z,..._}=e,{getPopupContainer:W,getPrefixCls:O,renderEmpty:L,direction:j,virtual:Y,popupMatchSelectWidth:q,popupOverflow:U}=f__namespace.useContext(ot),{showSearch:K,style:J,styles:Q,className:G,classNames:ee}=$t("select"),[,oe]=Tn(),re=d??oe?.controlHeight,he=O("select",n),Z=O(),te=x??j,{compactSize:ce,compactItemClassnames:ue}=li(he,te),[Ee,Re]=fp("select",I,r),be=sn(he),[le,ae]=rY(he,be),ye=f__namespace.useMemo(()=>{const{mode:xe}=e;if(xe!=="combobox")return xe===i5?"combobox":xe},[e.mode]),Se=ye==="multiple"||ye==="tags",He=mY(e.suffixIcon,e.showArrow),Le=C??y??q,Ae=fY(R||D),_e=H||B,{status:Te,hasFeedback:Ce,isFormItemInput:Pe,feedbackIcon:De}=f__namespace.useContext(Qn),Oe=ml(Te,g);let Ne;h!==void 0?Ne=h:ye==="combobox"?Ne=null:Ne=L?.("Select")||f__namespace.createElement(o5,{componentName:"Select"});const{suffixIcon:Qe,itemIcon:mt,removeIcon:it,clearIcon:ct}=dY({..._,multiple:Se,hasFeedback:Ce,feedbackIcon:De,showSuffixIcon:He,componentName:"Select"}),bt=S===true?{clearIcon:ct}:S,pt=Zt(_,["suffixIcon","itemIcon"]),nt=Hn(xe=>m??ce??xe),et=f__namespace.useContext(kn),Xe=p??et,Ie={...e,variant:Ee,status:Oe,disabled:Xe,size:nt},[Me,se]=It([ee,z],[Q,k],{props:Ie},{popup:{_default:"root"}}),ge=V(Me.popup?.root,a,l,{[`${he}-dropdown-${te}`]:te==="rtl"},i,ae,be,le),fe={...se.popup?.root,...$??E},ie=V({[`${he}-lg`]:nt==="large",[`${he}-sm`]:nt==="small",[`${he}-rtl`]:te==="rtl",[`${he}-${Ee}`]:Re,[`${he}-in-form-item`]:Pe},qi(he,Oe,Ce),ue,G,o,Me.root,i,ae,be,le),ve=f__namespace.useMemo(()=>u!==void 0?u:te==="rtl"?"bottomRight":"bottomLeft",[u,te]),[me]=Us("SelectLike",se.popup?.root?.zIndex??fe?.zIndex);return f__namespace.createElement(K1,{ref:t,virtual:Y,classNames:Me,styles:se,showSearch:K,...pt,style:{...se.root,...J,...w},popupMatchSelectWidth:Le,transitionName:Hi(Z,"slide-up",P),builtinPlacements:XX(b,U),listHeight:c,listItemHeight:re,mode:ye,prefixCls:he,placement:ve,direction:te,prefix:A,suffixIcon:Qe,menuItemSelectedIcon:mt,removeIcon:it,allowClear:bt,notFoundContent:Ne,className:ie,getPopupContainer:s||W,popupClassName:ge,disabled:Xe,popupStyle:{...se.popup?.root,...fe,zIndex:me},maxCount:Se?N:void 0,tagRender:Se?M:void 0,popupRender:Ae,onPopupVisibleChange:_e})},es=f__namespace.forwardRef(pY),hY=jy(es,"popupAlign");es.SECRET_COMBOBOX_MODE_DO_NOT_USE=i5;es.Option=G1;es.OptGroup=U1;es._InternalPanelDoNotUseOrYouWillBeFired=hY;const s5=e=>{const t=nN(e,Va.appkey,Va.appsec);return new URLSearchParams({...e,sign:t})};async function gY(){const t=(await Tt.post("https://passport.bilibili.com/x/passport-tv-login/qrcode/auth_code",s5({appkey:Va.appkey,local_id:"0",ts:"0"}))).data;if(!cn(t)){_t(t?.message||"获取 auth_code 失败");return}return t.data}async function bY(e){const n=(await Tt.post("https://passport.bilibili.com/x/passport-tv-login/qrcode/poll",s5({appkey:Va.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=Y0(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 xl,Xu;function ar(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 qo(e,t){return (e>>>t&1)!=0}function Sr(e){if(!e)throw new Error("Assertion error")}var Ao=(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})();xl=Ao;tt(Ao,"NUMERIC",new xl(1,[10,12,14]));tt(Ao,"ALPHANUMERIC",new xl(2,[9,11,13]));tt(Ao,"BYTE",new xl(4,[8,16,16]));tt(Ao,"KANJI",new xl(8,[8,10,12]));tt(Ao,"ECI",new xl(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;});Xu=Gr;tt(Gr,"LOW",new Xu(0,1));tt(Gr,"MEDIUM",new Xu(1,0));tt(Gr,"QUARTILE",new Xu(2,3));tt(Gr,"HIGH",new Xu(3,2));var Es=(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;ar(s,8,r);}}catch(a){o.e(a);}finally{o.f();}return new e(Ao.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);ar(parseInt(n.substring(o,o+i),10),i*3+1,r),o+=i;}return new e(Ao.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)),ar(i,11,r);}return o<n.length&&ar(e.ALPHANUMERIC_CHARSET.indexOf(n.charAt(o)),6,r),new e(Ao.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)ar(n,8,r);else if(n<16384)ar(2,2,r),ar(n,14,r);else if(n<1e6)ar(6,3,r),ar(n,21,r);else throw new RangeError("ECI assignment value out of range");return new e(Ao.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(Es,"NUMERIC_REGEX",/^[0-9]*$/);tt(Es,"ALPHANUMERIC_REGEX",/^[A-Z0-9 $%*+.\/:-]*$/);tt(Es,"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,qo(s,a));this.setFunctionModule(8,7,qo(s,6)),this.setFunctionModule(8,8,qo(s,7)),this.setFunctionModule(7,8,qo(s,8));for(var l=9;l<15;l++)this.setFunctionModule(14-l,8,qo(s,l));for(var c=0;c<8;c++)this.setFunctionModule(this.size-1-c,8,qo(s,c));for(var u=8;u<15;u++)this.setFunctionModule(8,this.size-15+u,qo(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=qo(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]=qo(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=Es.makeSegments(n);return e.encodeSegments(o,r)}},{key:"encodeBinary",value:function(n,r){var o=Es.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=Es.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;ar(x.mode.modeBits,4,b),ar(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<=$),ar(0,Math.min(4,$-b.length),b),ar(0,(8-b.length%8)%8,b),Sr(b.length%8==0);for(var E=236;b.length<$;E^=253)ar(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 vY={L:Gr.LOW,M:Gr.MEDIUM,Q:Gr.QUARTILE,H:Gr.HIGH},a5=128,l5="L",c5="#FFFFFF",u5="#000000",d5=false,f5=1,yY=4,CY=0,xY=.1,m5=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("")},p5=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})})},wY=function(t,n,r,o){if(o==null)return null;var i=t.length+r*2,s=Math.floor(n*xY),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}},SY=function(t,n){return n!=null?Math.max(Math.floor(n),0):t?yY:CY},$Y=(function(){try{new Path2D().addPath(new Path2D);}catch{return  false}return  true})();function EY(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 h5(e,t){if(e==null)return {};var n,r,o=EY(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 g5=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(Es.makeSegments(h))),p},[]);return mi.encodeSegments(m,vY[r],o,void 0,void 0,c)},[n,r,o,c]);return f.useMemo(function(){var d=u.getModules(),m=SY(i,s),p=d.length+m*2,h=wY(d,l,m,a);return {cells:d,margin:m,numCells:p,calculatedImageSettings:h,qrcode:u}},[u,l,a,i,s])},IY=["value","size","level","bgColor","fgColor","includeMargin","minVersion","marginSize","style","imageSettings","boostLevel"],PY=f.forwardRef(function(e,t){var n=e.value,r=e.size,o=r===void 0?a5:r,i=e.level,s=i===void 0?l5:i,a=e.bgColor,l=a===void 0?c5:a,c=e.fgColor,u=c===void 0?u5:c,d=e.includeMargin,m=d===void 0?d5:d,p=e.minVersion,h=p===void 0?f5:p,g=e.marginSize,b=e.style,y=e.imageSettings,C=e.boostLevel,x=h5(e,IY),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=uy(E,2),M=P[1],N=g5({value:n,level:s,minVersion:h,includeMargin:m,marginSize:g,imageSettings:y,size:o,boostLevel:C}),A=N.margin,D=N.cells,R=N.numCells,B=N.calculatedImageSettings;f.useEffect(function(){if(S.current){var z=S.current,_=z.getContext("2d");if(!_)return;var W=D,O=I.current,L=B!=null&&O!==null&&O.complete&&O.naturalHeight!==0&&O.naturalWidth!==0;L&&B.excavation!=null&&(W=p5(D,B.excavation));var j=window.devicePixelRatio||1;z.height=z.width=o*j;var Y=o/R*j;_.scale(Y,Y),_.fillStyle=l,_.fillRect(0,0,R,R),_.fillStyle=u,$Y?_.fill(new Path2D(m5(W,A))):D.forEach(function(q,U){q.forEach(function(K,J){K&&_.fillRect(J+A,U+A,1,1);});}),B&&(_.globalAlpha=B.opacity),L&&_.drawImage(O,B.x+A,B.y+A,B.w,B.h);}}),f.useEffect(function(){M(false);},[w]);var H=ln({height:o,width:o},b),k=null;return w!=null&&(k=f.createElement("img",{alt:"QR-Code",src:w,key:w,style:{display:"none"},onLoad:function(){M(true);},ref:I,crossOrigin:B?.crossOrigin})),f.createElement(f.Fragment,null,f.createElement("canvas",dn({style:H,height:o,width:o,ref:$,role:"img"},x)),k)}),NY=["value","size","level","bgColor","fgColor","includeMargin","minVersion","title","marginSize","imageSettings","boostLevel"],MY=f.forwardRef(function(e,t){var n=e.value,r=e.size,o=r===void 0?a5:r,i=e.level,s=i===void 0?l5:i,a=e.bgColor,l=a===void 0?c5:a,c=e.fgColor,u=c===void 0?u5:c,d=e.includeMargin,m=d===void 0?d5:d,p=e.minVersion,h=p===void 0?f5:p,g=e.title,b=e.marginSize,y=e.imageSettings,C=e.boostLevel,x=h5(e,NY),w=g5({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=p5(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=m5(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)}),RY={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 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 AY=(e,t)=>f__namespace.createElement(on,jv({},e,{ref:t,icon:RY})),TY=f__namespace.forwardRef(AY);function OY(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 FY(e,t,n){var r={},o=r.atBegin,i=o===void 0?false:o;return OY(e,t,{debounceMode:i!==false})}const sm=100,b5=sm/5,v5=sm/2-b5/2,cg=v5*2*Math.PI,o2=50,i2=e=>{const{dotClassName:t,style:n,hasCircleCls:r}=e;return f__namespace.createElement("circle",{className:V(`${t}-circle`,{[`${t}-circle-bg`]:r}),r:v5,cx:o2,cy:o2,strokeWidth:b5,style:n})},BY=({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:`${cg/4}`,strokeDasharray:`${cg*a/100} ${cg*(100-a)/100}`};return f__namespace.createElement("span",{className:V(r,`${n}-progress`,a<=0&&o)},f__namespace.createElement("svg",{viewBox:`0 0 ${sm} ${sm}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":a},f__namespace.createElement(i2,{dotClassName:n,hasCircleCls:true}),f__namespace.createElement(i2,{dotClassName:n,style:l})))};function LY(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:V(s,r,n>0&&a),style:o},f__namespace.createElement("span",{className:V(i,`${t}-dot-spin`)},[1,2,3,4].map(l=>f__namespace.createElement("i",{className:`${t}-dot-item`,key:l})))),f__namespace.createElement(BY,{prefixCls:t,percent:n}))}function DY(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:V(a.className,s,o),style:{...a.style,...i},percent:r})):f__namespace.createElement(LY,{prefixCls:t,percent:r,className:o,style:i})}const kY=new ht("antSpinMove",{to:{opacity:1}}),_Y=new ht("antRotate",{to:{transform:"rotate(405deg)"}}),zY=e=>{const{componentCls:t,calc:n}=e;return {[t]:{...Bt(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:kY,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:_Y,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"}}}},HY=e=>{const{controlHeightLG:t,controlHeight:n}=e;return {contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:n}},VY=wt("Spin",e=>{const t=vt(e,{spinDotDefault:e.colorTextDescription});return zY(t)},HY),jY=200,s2=[[30,.05],[70,.03],[96,.01]];function WY(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<s2.length;l+=1){const[c,u]=s2[l];if(s<=c)return s+a*u}return s});},jY)),()=>{o.current&&(clearInterval(o.current),o.current=null);}),[i,e]),i?n:t}let y5;function qY(e,t){return !!e&&!!t&&!Number.isNaN(Number(t))}const mp=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:$}=$t("spin"),E=y("spin",t),[P,M]=VY(E),[N,A]=f__namespace.useState(()=>n&&!qY(n,r)),D=WY(N,p);f__namespace.useEffect(()=>{if(n){const j=FY(r,()=>{A(true);});return j(),()=>{j?.cancel?.();}}A(false);},[r,n]);const R=f__namespace.useMemo(()=>typeof u<"u"&&!d,[u,d]),B={...e,size:s,spinning:N,tip:a,fullscreen:d,children:u,percent:D},[H,k]=It([I,h],[$,g],{props:B}),z=V(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&&H.root,P,M),_=V(`${E}-container`,{[`${E}-blur`]:N}),W=m??x??y5,O={...S,...c},L=f__namespace.createElement("div",{...b,style:d?O:{...k.root,...O},className:z,"aria-live":"polite","aria-busy":N},f__namespace.createElement(DY,{className:H.indicator,style:k.indicator,prefixCls:E,indicator:W,percent:D}),a&&(R||d)?f__namespace.createElement("div",{className:V(`${E}-text`,H.tip),style:k.tip},a):null);return R?f__namespace.createElement("div",{...b,className:V(`${E}-nested-loading`,l,H.wrapper,P,M),style:k.wrapper},N&&f__namespace.createElement("div",{key:"loading"},L),f__namespace.createElement("div",{className:_,key:"container"},u)):d?f__namespace.createElement("div",{className:V(`${E}-fullscreen`,{[`${E}-fullscreen-show`]:N},i,P,M,H.mask),style:k.mask},L):L};mp.setDefaultIndicator=e=>{y5=e;};const UY=f.createElement(mp,null);function GY({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(TY,null),onClick:n},t?.refresh)),s=f.createElement("p",{className:`${e}-scanned`},t?.scanned),a={expired:i,loading:UY,scanned:s};return (r??(u=>a[u.status]))({status:o,locale:t,onRefresh:n})}const KY=e=>{const{componentCls:t,lineWidth:n,lineType:r,colorSplit:o}=e;return {[t]:{...Bt(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}}},XY=e=>({QRCodeCoverBackgroundColor:new Ft(e.colorBgContainer).setA(.96).toRgbString()}),YY=wt("QRCode",e=>{const t=vt(e,{QRCodeTextColor:e.colorText});return KY(t)},XY),QY=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}=$t("qrcode"),N={...e,bgColor:b,type:r,size:i,status:c,bordered:u,errorLevel:l},[A,D]=It([P,C],[M,x],{props:N}),R=I("qrcode",g),[B,H]=YY(R),k={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=rr(S,true),_=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?k:void 0,boostLevel:w,...z},[O]=ir("QRCode");if(!n)return null;const L=V(R,p,h,B,H,$,A.root,{[`${R}-borderless`]:!u}),j={backgroundColor:b,...D.root,...E,...m,width:m?.width??i,height:m?.height??i};return f.createElement("div",{..._,className:L,style:j},c!=="active"&&f.createElement("div",{className:V(`${R}-cover`,A.cover),style:D.cover},f.createElement(GY,{prefixCls:R,locale:O,status:c,onRefresh:d,statusRender:y})),r==="canvas"?f.createElement(PY,{...W}):f.createElement(MY,{...W}))},Q1={show:false,qrcodeUrl:"",auth_code:"",message:""},xi=rn({...Q1});function wc(e){tQ(),Object.assign(xi,e);}function ZY(e){wc({...Q1,...e,show:true});}const C5=new Or;function x5(){wc({...Q1}),C5.emit("hide");}function JY(){return C5.once("hide")}function eQ(){const{qrcodeUrl:e,show:t,message:n}=rt(xi),r=x5;return F(qu,{show:t,onHide:r,hideWhenMaskOnClick:false,hideWhenEsc:false,clsModalMask:"backdrop-blur-10px",clsModal:"aspect-ratio-10/16",width:260,children:[F("div",{className:nr.modalHeader,children:[v("div",{className:nr.modalTitle}),v(Uu,{onClick:r})]}),F("div",{className:V(nr.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(QY,{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 tQ=xu(function(){const t=document.createElement("div");t.classList.add("modal-tv-qrcode-auth",Ho),document.body.appendChild(t),jo.createRoot(t).render(v(fi,{children:v(eQ,{})}));});async function a2(){const e=await gY();if(e)return ZY({qrcodeUrl:e.url,auth_code:e.auth_code}),true}async function nQ(){if(!await a2())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=zt(1500),s=JY();if(await Promise.race([i,s]),s.off(),r())return;t=await bY(xi.auth_code);const{success:a,accessKey:l,accessKeyExpireAt:c,message:u,action:d}=t;if(r())return;if(wc({message:u}),a)return await zt(1e3),x5(),{accessKey:l,accessKeyExpireAt:c};if(d==="refresh"){if(await zt(2e3),r())return;await a2(),n=xi.auth_code,wc({message:"已刷新二维码"});continue}if(d!=="wait"){wc({message:u}),_t(u);return}}}async function rQ(){const{accessKey:e,accessKeyExpireAt:t}=await nQ()||{};!e||!t||(Ue.accessKey=e,Ue.accessKeyExpireAt=t,_t("获取成功"));}function oQ(){Ue.accessKey="",Ue.accessKeyExpireAt=0,_t("已删除 access_key");}const l2=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 w5({style:e,className:t}){const{runAsync:n,loading:r}=Ki(rQ,{manual:true}),{accessKey:o}=Mt();return v(Fr,{size:"small",style:e,className:t,children:o?F(we,{children:[v(Je,{onClick:n,loading:r,children:"重新获取 access_key"}),v(ru,{onConfirm:oQ,title:"确定删除 access_key?",children:v(Je,{children:"删除 access_key"})}),l2]}):F(we,{children:[v(Je,{onClick:n,loading:r,children:"获取 access_key"}),l2]})})}const S5=S3&&["/video/","/list/watchlater","/bangumi/play/"].some(e=>location.pathname.startsWith(e)),iQ=[["/video/",()=>/^\/video\/(?<bvid>BV\w+)\//.exec(location.pathname)?.groups?.bvid],["/list/watchlater",()=>new URLSearchParams(location.search).get("bvid")||void 0],["/bangumi/play/",()=>{}]];function $5(){return iQ.find(([t])=>location.pathname.startsWith(t))?.[1]()}async function sQ(e){return (await Tt.get("/x/v3/fav/folder/collected/list",{params:{up_mid:Br(),platform:"web",ps:20,pn:e}})).data.data}async function aQ(){let e=1,t=true,n=[];for(;t;){const r=await sQ(e);n.push(...r.list),t=r.has_more,e++;}return n=n.filter(r=>!(r.title==="该合集已失效"&&r.upper.mid===0)),n=Xi(n,r=>r.id),n}async function lQ(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 Wv(e,t){return t==="initial"?e:t==="shuffle"?Mr(e):t==="pub-time-desc"||t==="pub-time-asc"?Qo(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")?Qo(e,[r=>r.fav_time],[t==="fav-time-desc"?"desc":"asc"]):t==="play-count-desc"?Qo(e,[n=>n.cnt_info.play],["desc"]):t==="collect-count-desc"?Qo(e,[n=>n.cnt_info.collect],["desc"]):e}function Z1(e,t=21){return `https://space.bilibili.com/${Br()}/favlist?fid=${e}&ftype=create`}function E5(e,t=21){return `https://space.bilibili.com/${Br()}/favlist?fid=${e}&ftype=collect&ctype=${t}`}function cQ(e){return `https://www.bilibili.com/list/ml${e}`}function uQ(e){return `https://www.bilibili.com/video/${e}`}function I5(e){return e.toString(2).at(-2)==="0"}function J1(e){return e.toString(2).at(-1)==="1"}const Mi={getVideoFavState:mQ,removeFavs:dQ,moveFavs:fQ,addFav:hQ};async function dQ(e,t){const n=new URLSearchParams({resources:[t].flat().join(","),media_id:e.toString(),platform:"web",csrf:Qs()}),o=(await Tt.post("/x/v3/fav/resource/batch-del",n)).data,i=cn(o);return i||_t(o.message||Su),i}async function fQ(e,t,n){const r=new URLSearchParams({resources:[e].flat().join(","),src_media_id:t.toString(),tar_media_id:n.toString(),mid:Br(),platform:"web",csrf:Qs()}),i=(await Tt.post("/x/v3/fav/resource/move",r)).data,s=cn(i);return s||_t(i?.message||"fav deal api fail"),s}async function mQ(e){if(!np())return;const r=(await Tt.get("/x/v3/fav/folder/created/list-all",{params:{up_mid:Br(),type:2,rid:e}})).data.data.list.filter(a=>a.fav_state>0),o=r.map(a=>a.title),i=r.map(a=>Z1(a.id)),s=r.map(a=>a.id);return {favFolders:r,favFolderNames:o,favFolderUrls:i,favFolderIds:s}}async function pQ({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:Qs()}),i=(await Tt.post("/x/v3/fav/resource/deal",r)).data,s=cn(i);return s||_t(i?.message||"fav deal api fail"),s}let ug,qv;async function hQ(e,t){if(!t&&(!ug||!qv)){await iC();const{folders:n}=Dt,r=n.find(o=>I5(o.attr))??n[0];if(!r)return _t("没有找到默认收藏夹!");ug=r.id,qv=r.title;}return t||=ug,t?await pQ({avid:e,add_media_ids:t.toString()}):_t("没有找到默认收藏夹!")}async function gQ(){return (await Tt.get("/x/v3/fav/folder/created/list-all",{params:{up_mid:Br()}})).data.data.list}const P5=new Or;class N5{constructor(t){this.insideModal=t;}recSharedEmitter=new Or;servicesRegistry={};recStore=rn({refreshing:false,tabbarView:void 0,sidebarView:void 0})}const pp=f.createContext(new N5);function eC(...e){return S1(()=>new N5(...e),[])}function Jr(){return f.useContext(pp)}function bQ(){return rt(Jr().recStore)}function jn(){const{recSharedEmitter:e}=Jr();return Wu(t=>e.emit("refresh",t))}class ts{qs;constructor(t){this.qs=new hp(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 hp{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 ta(){const e=f.useRef(null),t=f.useCallback(()=>e.current?.closest(`.${w3}`)||document.body,[]);return {ref:e,getPopupContainer:t}}var vQ={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 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 yQ=(e,t)=>f__namespace.createElement(on,Uv({},e,{ref:t,icon:vQ})),ou=f__namespace.forwardRef(yQ),CQ=e=>typeof e!="object"&&typeof e!="function"||e===null,M5=f__namespace.createContext({}),am=f.createContext({prefixCls:"",firstLevel:true,inlineCollapsed:false,styles:null,classNames:null}),R5=e=>{const{prefixCls:t,className:n,dashed:r,...o}=e,{getPrefixCls:i}=f__namespace.useContext(ot),s=i("menu",t),a=V({[`${s}-item-divider-dashed`]:!!r},n);return f__namespace.createElement(k1,{className:a,...o})},A5=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(am),h=w=>{const S=n?.[0],I=f__namespace.createElement("span",{className:V(`${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(M5);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=hr(n).length;let x=f__namespace.createElement(Gu,{...Zt(e,["title","icon","danger"]),className:V(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:V(`${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(Qi,{...y,placement:c==="rtl"?"left":"right",classNames:{root:`${a}-inline-collapsed-tooltip`}},x)),x},lm=f__namespace.createContext(null),xQ=f__namespace.forwardRef((e,t)=>{const{children:n,...r}=e,o=f__namespace.useContext(lm),i=f__namespace.useMemo(()=>({...o,...r}),[o,r.prefixCls,r.mode,r.selectable,r.rootClassName]),s=jO(n),a=Hs(t,s?js(n):null);return f__namespace.createElement(lm.Provider,{value:i},f__namespace.createElement(zi,{space:true},s?f__namespace.cloneElement(n,{ref:a}):n))}),wQ=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"}}}},SQ=({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)})`}}}}),c2=e=>ko(e),u2=(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:D,menuSubMenuBg:R,horizontalItemSelectedColor:B,horizontalItemSelectedBg:H,horizontalItemBorderRadius:k,horizontalItemHoverBg:z}=e;return {[`${n}-${t}, ${n}-${t} > ${n}`]:{color:r,background:a,[`&${n}-root:focus-visible`]:{...c2(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`]:{...c2(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:D}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:A},"&:active":{backgroundColor:D}}},[`${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:k,"&::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:B}},"&-selected":{color:B,backgroundColor:H,"&:hover":{backgroundColor:H},"&::after":{borderBottomWidth:u,borderBottomColor:B}}}},[`&${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(",")}}}}}},d2=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}}},$Q=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"},...d2(e)}},[`${t}-submenu-popup`]:{[`${t}-vertical`]:{...d2(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`]:{...Do,paddingInline:p}}}]},f2=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"}}}},m2=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)})`}}}}},EQ=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]:{...Af(),"&-hidden":{display:"none"}}},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:{...Bt(e),...Af(),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"}},...f2(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,...f2(e),...m2(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}},...m2(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"}}}]},IQ=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)`}},PQ=(e,t=e,n=true)=>wt("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 [EQ(P),wQ(P),$Q(P),u2(P,"light"),u2(M,"dark"),SQ(P),$P(P),Vi(P,"slide-up"),Vi(P,"slide-down"),Au(P,"zoom-big")]},IQ,{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),T5=e=>{const{popupClassName:t,icon:n,title:r,theme:o}=e,i=f__namespace.useContext(am),{prefixCls:s,inlineCollapsed:a,theme:l,classNames:c,styles:u}=i,d=yl();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:V(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(am.Provider,{value:p},f__namespace.createElement(up,{...Zt(e,["icon"]),title:m,classNames:{list:c.subMenu.list,listTitle:c.subMenu.itemTitle},styles:{list:u.subMenu.list,listTitle:u.subMenu.itemTitle},popupClassName:V(s,t,c.popup.root,`${s}-${o||l}`),popupStyle:{zIndex:h,...e.popupStyle,...u.popup.root}}))};function dg(e){return e===null||e===false}const NQ={item:A5,submenu:T5,divider:R5},MQ=f.forwardRef((e,t)=>{const n=f__namespace.useContext(lm),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}=$t("menu"),A=S(),D=Zt(x,["collapsedWidth"]);r.validator?.({mode:p});const R=at((...Q)=>{g?.(...Q),r.onClick?.();}),B=r.mode||p,H=h??r.selectable,k=u??d,z={...e,mode:B,inlineCollapsed:k,selectable:H,theme:a},[_,W]=It([M,y],[N,C],{props:z},{popup:{_default:"root"},subMenu:{_default:"item"}}),O={horizontal:{motionName:`${A}-slide-up`},inline:xP(A),other:{motionName:`${A}-zoom-big`}},L=S("menu",o||r.prefixCls),j=sn(L),[Y,q]=PQ(L,j,!n),U=V(`${L}-${a}`,E,i),K=f__namespace.useMemo(()=>{if(typeof l=="function"||dg(l))return l||null;if(typeof r.expandIcon=="function"||dg(r.expandIcon))return r.expandIcon||null;if(typeof w?.expandIcon=="function"||dg(w?.expandIcon))return w?.expandIcon||null;const Q=l??r?.expandIcon??w?.expandIcon;return Rn(Q,{className:V(`${L}-submenu-expand-icon`,f__namespace.isValidElement(Q)?Q.props?.className:void 0)})},[l,r?.expandIcon,w?.expandIcon,L]),J=f__namespace.useMemo(()=>({prefixCls:L,inlineCollapsed:k||false,direction:$,firstLevel:true,theme:a,mode:B,disableMenuItemTitleTooltip:c,classNames:_,styles:W}),[L,k,$,c,a,B,_,W]);return f__namespace.createElement(lm.Provider,{value:null},f__namespace.createElement(am.Provider,{value:J},f__namespace.createElement(Cl,{getPopupContainer:I,overflowedIndicator:f__namespace.createElement(R1,null),overflowedIndicatorPopupClassName:V(L,`${L}-${a}`,b),classNames:{list:_.list,listTitle:_.itemTitle},styles:{list:W.list,listTitle:W.itemTitle},mode:B,selectable:H,onClick:R,...D,inlineCollapsed:k,style:{...W.root,...P,...s},className:U,prefixCls:L,direction:$,defaultMotions:O,expandIcon:K,ref:t,rootClassName:V(m,Y,r.rootClassName,q,j,_.root),_internalComponents:NQ})))}),ns=f.forwardRef((e,t)=>{const n=f.useRef(null),r=f__namespace.useContext(M5);return f.useImperativeHandle(t,()=>({menu:n.current,focus:o=>{n.current?.focus(o);}})),f__namespace.createElement(MQ,{ref:n,...e,...r})});ns.Item=A5;ns.SubMenu=T5;ns.Divider=R5;ns.ItemGroup=_1;const RQ=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}}}}}},AQ=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:Py},[`&${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:My},[`&${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:Ny},[`&${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:Ry}}},$y(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`]:{...Bt(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}}}},[Vi(e,"slide-up"),Vi(e,"slide-down"),Df(e,"move-up"),Df(e,"move-down"),Au(e,"zoom-big")]]},TQ=e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...Um({contentRadius:e.borderRadiusLG,limitVerticalRadius:true}),...Sy(e)}),OQ=wt("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 [AQ(i),RQ(i)]},TQ,{resetStyle:false}),gp=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:D,styles:R}=$t("dropdown"),B={...e,mouseEnterDelay:g,mouseLeaveDelay:b,autoAdjustOverflow:y},[H,k]=It([D,w],[R,S],{props:B}),z={...A,...m,...k.root},_=l||a,W=f__namespace.useMemo(()=>{const be=E();return x!==void 0?x:C.includes("top")?`${be}-slide-down`:`${be}-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]),L=E("dropdown",r),j=sn(L),[Y,q]=OQ(L,j),[,U]=Tn(),K=f__namespace.Children.only(CQ(o)?f__namespace.createElement("span",null,o):o),J=Rn(K,{className:V(`${L}-trigger`,{[`${L}-rtl`]:P==="rtl"},K.props.className),disabled:K.props.disabled??s}),Q=s?[]:i,G=!!Q?.includes("contextMenu"),[ee,oe]=Lt(false,p),re=at(be=>{h?.(be,{source:"trigger"}),oe(be);}),he=V(u,d,Y,q,j,N,H.root,{[`${L}-rtl`]:P==="rtl"}),Z=SP({arrowPointAtCenter:typeof n=="object"&&n.pointAtCenter,autoAdjustOverflow:y,offset:U.marginXXS,arrowWidth:n?U.sizePopupArrow:0,borderRadius:U.borderRadius}),te=at(()=>{t?.selectable&&t?.multiple||(h?.(false,{source:"menu"}),oe(false));}),ce=()=>{const be=Zt(H,["root"]),le=Zt(k,["root"]);let ae;return t?.items&&(ae=f__namespace.createElement(ns,{...t,classNames:{...be,subMenu:{...be}},styles:{...le,subMenu:{...le}}})),_&&(ae=_(ae)),ae=f__namespace.Children.only(typeof ae=="string"?f__namespace.createElement("span",null,ae):ae),f__namespace.createElement(xQ,{prefixCls:`${L}-menu`,rootClassName:V(q,j),expandIcon:f__namespace.createElement("span",{className:`${L}-menu-submenu-arrow`},P==="rtl"?f__namespace.createElement(ou,{className:`${L}-menu-submenu-arrow-icon`}):f__namespace.createElement(Xa,{className:`${L}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:false,onClick:te,validator:({mode:ye})=>{}},ae)},[ue,Ee]=Us("Dropdown",z.zIndex);let Re=f__namespace.createElement(uM,{alignPoint:G,...Zt(e,["rootClassName","onOpenChange"]),mouseEnterDelay:g,mouseLeaveDelay:b,visible:ee,builtinPlacements:Z,arrow:!!n,overlayClassName:he,prefixCls:L,getPopupContainer:c||M,transitionName:W,trigger:Q,overlay:ce,placement:O,onVisibleChange:re,overlayStyle:{...z,zIndex:ue},autoDestroy:$??I},J);return ue&&(Re=f__namespace.createElement(Bm.Provider,{value:Ee},Re)),Re},FQ=jy(gp,"align",void 0,"dropdown",e=>e),BQ=e=>f__namespace.createElement(FQ,{...e},f__namespace.createElement("span",null));gp._InternalPanelDoNotUseOrYouWillBeFired=BQ;const O5=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(R1,null),title:E,buttonsRender:P=G=>G,mouseEnterDelay:M,mouseLeaveDelay:N,overlayClassName:A,overlayStyle:D,destroyOnHidden:R,destroyPopupOnHide:B,dropdownRender:H,popupRender:k,...z}=e,_=n("dropdown",o),W=`${_}-button`,L={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:D},destroyOnHidden:R,popupRender:k||H},{compactSize:j,compactItemClassnames:Y}=li(_,r),q=V(W,Y,m);"destroyPopupOnHide"in e&&(L.destroyPopupOnHide=B),"open"in e&&(L.open=C),"placement"in e?L.placement=w:L.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(gp,{...L},Q))};O5.__ANT_BUTTON=true;const rs=gp;rs.Button=O5;const F5={createClass:qS,c:qS},LQ=F5.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;
    }
  }
`,tC=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=We(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(()=>qr(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=gl(),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(rs,{open:h,onOpenChange:g,disabled:n,menu:{items:d,style:p,className:LQ,selectedKeys:[e.toString()]},placement:"bottomRight",...i,children:v(Je,{onClick:u,css:[h&&hl,"",""],icon:l,className:"gap-8px px-16px",disabled:n,children:c})}),F(Mn,{children:[s,s&&v(Za,{variant:"solid",className:"my-7px"}),"操作说明: ",v("br",{}),"1. 点击/下拉切换 ",v("br",{}),"2. 按住 ",v("kbd",{children:"Shift"})," 键点击逆序切换 ",v("br",{})]})]})},vi="size-16px",DQ={[dt.Initial]:{icon:v(UH,{className:vi}),label:"初始顺序"},[dt.Shuffle]:{icon:v(W6,{className:vi}),label:"随机顺序"},[dt.PubTimeDesc]:{icon:v(Zc,{className:vi}),label:ac("最新投稿")},[dt.PubTimeAsc]:{icon:v(Zc,{className:vi}),label:ev("最早投稿")},[dt.PlayCountDesc]:{icon:v(ku,{className:vi}),label:ac("最多播放")},[dt.CollectCountDesc]:{icon:v(Oi,{className:V(vi,"mt--1px")}),label:ac("最多收藏")},[dt.FavTimeDesc]:{icon:v(Oi,{className:V(vi,"mt--1px")}),label:ac("最近收藏")},[dt.FavTimeAsc]:{icon:v(Oi,{className:V(vi,"mt--1px")}),label:ev("最早收藏")}},kQ={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 B5(e){return e.split(":")[0]}function L5(e){const t=B5(e);return kQ[t]||Object.values(dt)}function p2(e){const t=B5(e);return t==="fav-folder"?dt.FavTimeDesc:t==="fav-collection"?dt.PubTimeDesc:dt.Initial}function nC(e,t){const n=L5(e).filter(o=>o!=="divider"),r=t.get(e)||p2(e);return n.includes(r)?r:p2(e)}function _Q(e,t){return f.useMemo(()=>nC(e,t),[t,e])}function rC(){const e=jn(),{ref:t,getPopupContainer:n}=ta(),{selectedKey:r,savedOrderMap:o}=rt(Dt),i=_Q(r,o),s=f.useMemo(()=>L5(r),[r]);return v(tC,{value:i,onChange:async a=>{Dt.savedOrderMap.set(r,a),await zt(100),e();},list:s,listDisplayConfig:DQ,$ref:t,dropdownProps:{getPopupContainer:n}})}const zQ=zn.extend("modules:rec-services:fav:store");var cm=(e=>(e.CollectionIdFull="fav-collection-id",e.CollectionId="fav-cid",e.FolderIdFull="fav-folder-id",e.FolderId="fav-fid",e))(cm||{});const D5=e=>{if(!e)return;const t=Number(e);if(!Number.isNaN(t))return t},um=new URLSearchParams(location.search),k5=D5(um.get("fav-collection-id")??um.get("fav-cid")),_5=D5(um.get("fav-folder-id")??um.get("fav-fid")),Ja=Vo&&(typeof _5=="number"||typeof k5=="number"),Dt=rn({folders:[],foldersUpdateAt:0,selectedFavFolderId:_5,get selectedFavFolder(){if(typeof this.selectedFavFolderId=="number")return this.folders.find(e=>e.id===this.selectedFavFolderId)},collections:[],collectionsUpdateAt:0,selectedFavCollectionId:k5,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( D6("fav-saved-order"))).map,get usingShuffle(){return nC(this.selectedKey,this.savedOrderMap)===dt.Shuffle}});function z5(e,t){const n=Dt.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,zQ("update folder(id=%s title=%s) media_count to %s",n.id,n.title,r));}function oC(e=false){return Promise.all([iC(e),jQ(e)])}const HQ=ci(async()=>{const e=await gQ();Dt.folders=e,Dt.foldersUpdateAt=Date.now();});async function iC(e=false){if(!e){const{folders:t,foldersUpdateAt:n}=Dt;if(t.length&&n&&Date.now()-n<Vn("5min"))return}return HQ()}const VQ=ci(async()=>{const e=await aQ();Dt.collections=e,Dt.collectionsUpdateAt=Date.now();});async function jQ(e=false){if(!e){const{collections:t,collectionsUpdateAt:n}=Dt;if(t.length&&n&&Date.now()-n<Vn("5min"))return}return VQ()}Ja&&O6(Dt,"selectedLabel",()=>{Dt.selectedLabel&&v1(Dt.selectedLabel);});WQ();async function WQ(){if(!(Vo||S5)||Ja)return;const e="fav-store",t=["selectedFavFolderId","selectedFavCollectionId","folders"],n=await GM.getValue(e);if(n)for(const o of t)ni(n[o])||(Dt[o]=n[o]);const r=Yy(1);B6(Dt,t,o=>{if(Ja)return;const i=Ha(o,t);r(async()=>{await GM.setValue(e,i);});});}var $e=(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))($e||{});class qQ{constructor(t){this.anonymous=t;}hasMore=true;page=1;tabbarView=v(UQ,{});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:$e.PopularGeneral,uniqId:`${$e.PopularGeneral}-${o.bvid}`}))):(_t(n.message||ol),void 0)}}function UQ(){const e=jn();return v(lt,{configPath:"popularGeneralUseAnonymous",tooltip:v(we,{children:"✅ 匿名访问: 使用游客身份访问"}),label:"匿名访问",extraAction:async()=>{await zt(100),e();}})}function GQ(){const t=localStorage.getItem("bpx_player_profile");if(t)try{return JSON.parse(t)}catch{return}}function H5(){return !!GQ()?.media.autoplay}function wl(e){const t=nx.createInstance({driver:nx.INDEXEDDB,name:Zn,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 na({fn:e,generateKey:t,tableName:n,ttl:r,concurrency:o,autoCleanUp:i=true}){const s=typeof n=="string"?wl(n):n,a=zs(()=>{s.db.iterate((m,p)=>{l(m)||s.db.removeItem(p);});},1e3);i&&ap().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?T6(e,o):e,d=f1(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){ni(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 KQ(e){return (await Tt.get("/x/web-interface/view",{params:{bvid:e}})).data.data}const XQ=na({fn:KQ,generateKey:e=>e,tableName:"video-detail",ttl:Vn("3M"),concurrency:3});async function YQ(e){return (await Tt.get("/x/player/pagelist",{params:{bvid:e}})).data?.data||[]}const V5=na({fn:YQ,generateKey:e=>e,tableName:"video-page-list",ttl:Vn("3M"),concurrency:3});async function QQ({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 j5({appKey:e,nscode:t}){return new URLSearchParams([["appKey",e],["nscode",t.toString()]]).toString()}const h2=wl("kv-latest-version"),ZQ=ci(async({appKey:e,nscode:t})=>{const n=j5({appKey:e,nscode:t}),r=await h2.get(n);let o="0";r&&r.versionId&&r.data&&Object.keys(r.data).length&&(o=r.versionId);const i=await QQ({appKey:e,nscode:t,versionId:o});return r?.data&&i.code===-304&&i.message==="Not Modified"?r.data:(await h2.set(n,i.data),i.data.data)}),JQ=na({fn:ZQ,tableName:"get-kv-data",generateKey:({appKey:e,nscode:t})=>j5({appKey:e,nscode:t}),ttl:Vn("1h")});function eZ(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 g2=[{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"}],sC={name:"全站",tid:0,slug:"all"};async function tZ(){try{return await nZ()||g2}catch(e){return BO("parseRankTabsConfig failed",e),g2}}async function nZ(){const e=await JQ({appKey:"333.1339",nscode:10}),t=eZ(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 Xi(r,i=>i.slug)}var vf=(e=>(e.Normal="normal",e.PgcSeason="pgc/season",e.PgcWeb="pgc/web",e))(vf||{});function W5(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 aC(e){return e.from==="normal"}function rZ(e){return e.from==="pgc/season"}function oZ(e){return e.from==="pgc/web"}function q5(e,t){e&&(typeof e=="function"?e(t):e.current=t);}function U5(e){const t=f.useRef(null);return f.useMemo(()=>({get current(){return t.current},set current(n){t.current=n,q5(e,n);}}),[t])}const iu={top:e=>V("absolute top-8px",e==="left"?"left-8px":"right-8px",e==="left"?mV:pV),topContainer:e=>V(iu.top(e),"flex items-center gap-x-5px",e==="left"?"flex-row":"flex-row-reverse"),tooltip:e=>V("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")},To=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}=bp({inlinePosition:e,tooltip:n}),m=f.useMemo(()=>CP("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,q5(c,h);},children:F(we,{children:[t,d]})};return s?v(framerMotion.AnimatePresence,{children:r&&v(framerMotion.motion.div,{...p,...a},"action-button")}):v("div",{...p})}));function bp({inlinePosition:e,tooltip:t,tooltipClassName:n}){const r=f.useRef(null),o=P1(r),i=An(iu.tooltip(e),n,o?"block":"hidden");return {triggerRef:r,tooltipEl:t?v("span",{className:i,children:t}):void 0}}function iZ(e,t,n=true){let r=0,o=t;return (...i)=>{if(r++,r===o)return r=0,n&&o++,e(...i)}}function G5(e,t,n=true){const r=We(e);return f.useMemo(()=>iZ(r,t,n),[r,t,n])}const sZ=({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"})]}),K5=f.forwardRef(sZ),aZ=({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"})]}),lZ=f.forwardRef(aZ),cZ=({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"})]}),X5=f.forwardRef(cZ),uZ=({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"})]}),dZ=f.forwardRef(uZ);function fZ(e,t){const n=t.document.head,{cache:r}=SN({key:"pip-window",container:n});Array.from(document.querySelectorAll("style")).filter(s=>[Zn,"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(Ho),o.style.lineHeight="0",t.document.body.appendChild(o),jo.createRoot(o).render(v(fi,{emotionCache:r,styleProviderProps:{container:n},injectGlobalStyle:true,children:v(yr,{getPopupContainer:()=>t.document.body,getTargetContainer:()=>t,children:v(Du,{message:{getContainer:()=>t.document.body},children:v(pZ,{newHref:e,pipWindow:t})})})}));}var mZ={name:"pb1257",styles:"*{box-sizing:border-box;}:root,body,iframe{margin:0;padding:0;overscroll-behavior:none;}"};function pZ({newHref:e,pipWindow:t}){const n=P1(t.document.documentElement),[r,o]=f.useState(()=>Ue.pipWindow.defaultLocked);return F(we,{children:[v(sv,{styles:[mZ,"",""]}),v("iframe",{src:e,className:"block h-100vh w-full border-none"}),v(hZ,{locked:r,setLocked:o,pipWindow:t}),F("div",{className:V("fixed right-10px top-10px z-9999 flex-row-reverse items-center gap-x-6px",n?"flex":"hidden"),children:[v(gZ,{pipWindow:t,newHref:e}),v(bZ,{locked:r,setLocked:o})]})]})}const Y5="size-30px [&_svg]:size-16px";function hZ({locked:e,setLocked:t,pipWindow:n}){const{message:r}=Du.useApp(),o=G5(()=>{r.info("请先点击右上角「🔓解锁按钮」解锁");},3);return f.useMemo(()=>qr([{key:"unlock",label:"解锁",icon:v(X5,{}),onClick(){t(false);}}]),[]),e&&v("div",{className:V("locked-overlay","fixed inset-0 z-9999 select-none bg-transparent"),onClick:o})}function gZ({newHref:e,pipWindow:t}){return v(To,{inlinePosition:"right",icon:v(K5,{}),tooltip:"新窗口打开",onClick:()=>{t.close();const r=new URL(e);r.searchParams.delete(Wi.PlayerScreenMode),r.searchParams.delete(Wi.ForceAutoPlay),Po(r.href);},className:Y5})}function bZ({locked:e,setLocked:t}){const[n,r]=e?["锁定","解锁"]:["解锁","锁定"];return v(To,{inlinePosition:"right",icon:e?v(dZ,{}):v(X5,{}),tooltip:`已${n}, 点击${r}`,className:Y5,onClick:()=>t(o=>!o)})}const Q5=zn.extend("VideoCard:useOpenRelated");function vZ({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=We(C=>{C.stopPropagation(),C.preventDefault(),d(void 0,C);}),d=We((C,x)=>{C||=Ue.videoLinkOpenMode;const w=c(E=>{if((C===un.NormalWebFullscreen||C===un.Popup&&Ue.pipWindow.autoWebFullscreen)&&(E.searchParams.set(Wi.PlayerScreenMode,$i.WebFullscreen),C===un.Popup&&!H5()&&E.searchParams.set(Wi.ForceAutoPlay,d1.ON)),a()){const P=i();P&&(s(),E.searchParams.set("t",P.toString()));}}),S=()=>{const P=!(C===un.Background||!!(x?.metaKey||x?.ctrlKey));Po(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}=lC({item:t});return Z5(C,n.bvid,x,w)}function p(){let C=e;t.api===$e.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:CS[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:CS[C],label:Er[C].label,icon:Er[C].icon,onClick:()=>d(C)})):[],[]),b=f.useMemo(()=>{if(l!==un.Popup&&t.api!==$e.Live&&cC&&o)return v(To,{visible:r,inlinePosition:"right",icon:Er.Popup.icon,tooltip:Er.Popup.label,onClick:C=>{C.preventDefault(),C.stopPropagation(),d(un.Popup);}})},[l,r]),y=We(()=>{d(un.Popup);});return {onOpenWithMode:d,handleVideoLinkClick:u,consistentOpenMenus:h,conditionalOpenMenus:g,openInPopupActionButtonEl:b,onOpenInPopup:y}}function lC({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===$e.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===$e.Rank&&aC(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 cC=!!window.documentPictureInPicture?.requestWindow;async function Z5(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([V5(t),zt(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);}Q5("openInPipOrPopup newHref=%s size=%sx%s",e,o,i);let a;if(cC)try{a=await window.documentPictureInPicture?.requestWindow({width:o,height:i,disallowReturnToOpener:!0});}catch{}a?fZ(e,a):yZ(e,o,i);}function yZ(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(",");Q5("openInPopup: features -> %s",i),window.open(e,"_blank",i);}function J5(){const{videoLinkOpenMode:e}=Mt();return e!==un.CurrentPage}function vp(){return J5()?"_blank":"_self"}function Gv(){return Ue.videoLinkOpenMode!==un.CurrentPage?"_blank":"_self"}function su(e){const t=vp();return v("a",{...e,target:t,children:e.children})}let Bd=[],fg="";function b2(){const e=nn();return [e.format("YYYYMMDD"),e.hour()<18?"lt-18":"gte-18"].join("_")}async function CZ(){return Bd.length&&fg&&fg===b2()||(Bd=(await Tt.get("/x/web-interface/popular/series/list")).data.data.list,fg=b2()),Bd}class dm{constructor(t){this.useShuffle=t;}static PAGE_SIZE=20;episodesLoaded=false;episodes=[];qs=new hp(dm.PAGE_SIZE);get hasMore(){return this.episodesLoaded?!!this.qs.bufferQueue.length||!!this.episodes.length:true}async loadMore(){if(this.episodesLoaded||(this.episodes=await CZ(),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 v2(r);return this.qs.bufferQueue.push({api:$e.Separator,uniqId:`popular-weekly-separator-${r}`,content:v(su,{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<dm.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 ji(n.map(o=>o.number),o=>v2(o),2);this.qs.bufferQueue=Mr([...this.qs.bufferQueue,...r.flat()]);}return this.qs.sliceFromQueue()}get tabbarView(){return v(xZ,{})}}const mg={};async function v2(e){if(!mg[e]?.length){const o=((await Tt.get("/x/web-interface/popular/series/one",{params:{number:e}})).data.data.list||[]).map(i=>({...i,api:$e.PopularWeekly,uniqId:`${$e.PopularWeekly}-${i.bvid}`}));mg[e]=o;}return mg[e]}function xZ(){const e=jn();return v(we,{children:v(bf,{configPath:"popularWeeklyUseShuffle",checkedChildren:"随机顺序: 开",unCheckedChildren:"随机顺序: 关",extraAction:async()=>{await zt(100),e();}})})}const eR="rank-store-slug",wZ=await( GM.getValue(eR))||sC.slug,Yr=rn({slug:wZ,tabs:[],get currentTab(){return this.tabs.find(e=>e.slug===this.slug)||sC}}),SZ=ci(async()=>{if(Yr.tabs.length)return;const e=await tZ();Yr.tabs=e;});O6(Yr,"slug",()=>{GM.setValue(eR,Yr.slug);});class $Z{constructor(t){this.slug=t;}loaded=false;qs=new hp(20);tabbarView=v(EZ,{});sidebarView=v(IZ,{});get hasMore(){return this.loaded?!!this.qs.bufferQueue.length:true}get rankTab(){return Yn(Yr).tabs.find(t=>t.slug===this.slug)||sC}async loadMore(t){if(this.hasMore){if(!this.loaded){await SZ();const{url:n,apiType:r}=W5(this.rankTab),i=(await Tt.get(n,{signal:t})).data;if(this.loaded=true,!cn(i)){_t(i.message||ol);return}const a=(i?.data?.list||i?.result?.list||[]).map((l,c)=>{const u=c+1;return {...l,api:$e.Rank,uniqId:`${$e.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 tR(){const{tabs:e}=rt(Yr),{normalList:t,pgcList:n}=f.useMemo(()=>{const r=e.map(s=>({...s,apiType:W5(s).apiType})),o=r.filter(s=>[vf.PgcSeason,vf.PgcWeb].includes(s.apiType));return {normalList:r.filter(s=>s.apiType===vf.Normal),pgcList:o}},[e]);return {normalList:t,pgcList:n}}function EZ(){const{enableSidebar:e}=Mt(),{ref:t,getPopupContainer:n}=ta(),r=jn(),{slug:o,currentTab:i}=rt(Yr),{normalList:s,pgcList:a}=tR(),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:V({"b-gate-primary":C,"color-gate-primary":C}),onClick:x=>{m(false),Yr.slug=y.slug,r();},children:v("span",{children:y.name})},y.slug)})})]}):null,c=We(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;Yr.slug=g[C].slug,r();}),u=F(we,{children:[l(s,"视频"),l(a,"PGC内容","不能提供预览")]}),[d,m]=f.useState(false),p=v(_o,{arrow:false,open:d,onOpenChange:m,placement:"bottomLeft",getPopupContainer:n,content:u,styles:{container:{border:`1px solid ${gl()}`}},children:v(Je,{css:[d&&hl,"",""],onClick:c,className:"outline-none!",children:i.name})});if(!e)return v("div",{ref:t,children:p})}function IZ(){const{slug:e}=rt(Yr),{normalList:t,pgcList:n}=tR(),r=jn(),o=We(s=>{Yr.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(ns,{items:i,selectedKeys:[e],mode:"inline",inlineIndent:10})}const PZ={[vn.PopularGeneral]:()=>new qQ(Ue.popularGeneralUseAnonymous),[vn.PopularWeekly]:()=>new dm(Ue.popularWeeklyUseShuffle),[vn.Rank]:()=>new $Z(Yr.slug)};function nR(e){const{subtab:t}=dr;return e??=Ue.popularWeeklyUseShuffle,t===vn.PopularWeekly&&e}const pg=e=>v("img",{src:e,alt:"",className:"size-18px"}),hg={[vn.PopularGeneral]:{icon:pg("https://s1.hdslb.com/bfs/static/jinkela/popular/assets/icon_popular.png"),label:"综合热门",desc:"各个领域中新奇好玩的优质内容都在这里~",swr:true,anonymousUsage:true},[vn.PopularWeekly]:{icon:pg("https://s1.hdslb.com/bfs/static/jinkela/popular/assets/icon_weekly.png"),label:"每周必看",desc:"每周五晚 18:00 更新",anonymousUsage:true},[vn.Rank]:{icon:pg("https://s1.hdslb.com/bfs/static/jinkela/popular/assets/icon_rank.png"),label:"排行榜",desc:"排行榜根据稿件内容质量,近期的数据综合展示,动态更新",anonymousUsage:true,swr:true}};class NZ extends ts{subtab;service;constructor(){super(20),this.subtab=dr.subtab,this.service=PZ[dr.subtab]();}get tabbarView(){return v(MZ,{children:this.service.tabbarView})}get sidebarView(){return this.service.sidebarView}get hasMoreExceptQueue(){return this.service.hasMore}fetchMore(t){return this.service.loadMore(t)}}const dr=await( Zy({subtab:vn.PopularGeneral},"hot-store"));Object.values(vn).includes(dr.subtab)||(dr.subtab=vn.PopularGeneral);function MZ({children:e}){const{subtab:t}=rt(dr),{icon:n,label:r}=hg[t],o=jn(),{ref:i,getPopupContainer:s}=ta(),{__internalHotSubUseDropdown:a}=Mt(),l=f.useMemo(()=>[vn.PopularGeneral,vn.PopularWeekly,vn.Rank].map((d,m)=>{const p=hg[d],h=d===t;return [m>0&&{type:"divider"},{key:d,label:v("span",{className:V({"color-gate-primary":h}),children:p.label}),icon:p.icon,onClick(){d!==dr.subtab&&(dr.subtab=d,o());}}].filter(Boolean)}).flat(),[t]),c=v(rs,{menu:{items:l},getPopupContainer:s,rootClassName:F5.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}=hg[d],b=d===t;return v(Jt,{title:F(we,{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!==dr.subtab&&(dr.subtab=d,o());},children:h})},d)})}),[t]);return F(we,{children:[a?c:u,e]})}const rR=F(we,{children:["1. 可以使用多个搜索词, 用空格分隔, 逻辑关系为且 (AND) ",v("br",{}),'2. 可以使用引号包裹搜索词, 如 "word or sentence" ',v("br",{}),'3. 可以使用 -"word or sentence" 排除关键词; 必须使用引号(单引号 或 双引号) ',v("br",{})]});function oR(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 Sl={[ze.AppRecommend]:{icon:v(GH,{className:"size-18px"}),label:"推荐",desc:"使用 Bilibili App 端推荐 API",anonymousUsage:true},[ze.PcRecommend]:{icon:v(KH,{className:"size-18px"}),label:"推荐",desc:"使用新版首页顶部推荐 API",anonymousUsage:true},[ze.KeepFollowOnly]:{icon:v(XH,{className:"size-18px"}),label:"已关注",desc:"从PC端推荐中筛选出「已关注」,可能比较慢; 关注的UP更新在动态~"},[ze.DynamicFeed]:{icon:v(i1,{className:"size-18px"}),label:"动态",desc:"视频投稿动态",swr:true},[ze.Watchlater]:{icon:v(l1,{className:"size-17px [&_.circle]:stroke-current"}),label:"稍后再看",desc:"你添加的稍后再看; 默认随机乱序, 可在设置中关闭乱序",swr:true},[ze.Fav]:{icon:v(Oi,{className:"mt--1px size-16px"}),label:"收藏",desc:"你添加的收藏; 默认随机乱序, 可在设置中关闭乱序",get swr(){return !Dt.usingShuffle}},[ze.Hot]:{icon:v(QH,{className:"size-16px"}),label:"热门",desc:"各个领域中新奇好玩的优质内容都在这里~",anonymousUsage:true,get swr(){return !nR()}},[ze.Live]:{icon:v(a1,{className:"size-16px"}),label:"直播",desc:"直播~",swr:true},[ze.SpaceUpload]:{icon:v(s1,{className:"size-16px"}),label:"投稿",desc:"UP 视频投稿",anonymousUsage:true,extraHelpInfo:F("div",{className:"ml-20px",children:["搜索词: 搜索相关作品 ",v("br",{}),"本地过滤词: 本地过滤搜索结果; 本地过滤词支持高级规则:",v("div",{className:"ml-20px",children:rR})]})}};function Oo({tabKey:e,active:t,className:n}){const{icon:r}=Sl[e],o=An(r.props.className,n);return f.cloneElement(r,{css:r.props.css,active:e===ze.Live?t:void 0,className:o})}const iR="你需要登录B站后使用该功能! 如已完成登录, 请刷新网页重试~";function sR(){return _t(iR)}const RZ=({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"})]})]}),y2=f.forwardRef(RZ);function AZ(){const{grid:{gridDisplayMode:e},videoCard:{actions:{showLargePreview:t,openInPipWindow:n}},videoLinkOpenMode:r}=Mt(),o=f.useMemo(()=>Object.values(un).filter(s=>Er[s].enabled??true).map(s=>{const a=Er[s];return {config:a,value:s,label:F("span",{className:"flex-v-center gap-x-8px",children:[a.icon,v("span",{children:a.label})]})}}),[]),i=We(()=>{const s="v0.34.0";GM.setClipboard(s),ft.success(`已复制当前版本: ${s}`);});return F("div",{className:ur.tabPane,children:[v(Sn,{title:F(we,{children:[v(Oo,{tabKey:ze.AppRecommend,className:"mr-5px mt-2px size-30px"}),"推荐 access_key",F(Mn,{className:"ml-5px mt-6px size-18px",IconComponent:y2,children:[F("span",{className:"inline-flex items-center",children:["用于「",v(Oo,{tabKey:ze.AppRecommend,className:"mr-5px"}),"推荐」Tab"]}),v("br",{}),"用于 获取推荐 / 提交不喜欢等操作"]})]}),children:v(w5,{})}),v(Sn,{titleClassName:"justify-between",title:F(we,{children:["开关",v(Ro,{paths:["pureRecommend","showModalFeedOnLoad","showModalFeedEntry","multiSelect.showIcon"]})]}),children:F(Fr,{size:10,wrap:true,children:[v(lt,{configPath:"pureRecommend",label:"全屏模式",tooltip:F(we,{children:["清空自带推荐内容, 只显示脚本推荐",v("br",{}),"P.S 需要刷新网页~",v("br",{}),"P.S 之前版本称 (纯推荐模式)"]}),extraAction:()=>dp()}),v(lt,{configPath:"showModalFeedOnLoad",label:"自动「查看更多」",tooltip:"打开首页时自动打开「查看更多」弹窗",extraAction:s=>{s&&ft.success("已开启自动「查看更多」: 下次打开首页时将自动打开「查看更多」弹窗");}}),v(lt,{configPath:"showModalFeedEntry",label:"「查看更多」按钮",tooltip:"是否显示「查看更多」按钮"}),v(lt,{configPath:"multiSelect.showIcon",label:"「多选」按钮",tooltip:"是否显示「多选」按钮"})]})}),F(Sn,{title:F(we,{children:["布局",v(Mn,{className:"ml-5px size-18px",IconComponent:y2,children:"网格布局"})]}),children:[v(lt,{configPath:"grid.useCustomGrid",label:"全屏模式: 使用自定义网格配置",tooltip:F(we,{children:["网格配置指: 网格宽度, 间距, 列数等. ",v("br",{}),"自定义网格配置: 宽度为90%; 可跟随 Bilibili-Evolved 自定义顶栏配置; 列数: 4 - 10列; 由 ",uo," 自定义; ",v("br",{}),"默认网格配置: bili-feed4 版本B站首页默认的网格配置; 在 Safari 中使用建议取消勾选此项."]})}),F("div",{className:"flex items-center",children:["网格显示模式",v(Wk,{className:"ml-30px"})]})]}),v(Sn,{titleClassName:"justify-between",title:F(we,{children:["视频链接",v(Ro,{paths:["videoLinkOpenMode"]})]}),children:v(Fr,{size:20,children:F("div",{className:"flex-v-center",children:["默认打开模式",F(Mn,{useBlackBg:true,children:["选择点击视频(封面图片 或 标题)时打开的模式 ",v("br",{}),o.map(({value:s,config:a})=>!!a.desc&&F("div",{className:"mt-10px flex items-start first:mt-0",children:[F("span",{className:"inline-flex items-center",children:[a.icon,v("span",{className:"ml-4px mr-10px min-w-95px",children:a.label})]}),v("span",{className:"desc",children:a.desc})]},s))]}),v(es,{className:"ml-8px w-160px",options:o,value:r,onChange:s=>{vo({videoLinkOpenMode:s});}})]})})}),v(Sn,{titleClassName:"justify-between",title:F(we,{children:[F("span",{className:"flex items-center",children:["视频卡片操作",F(Mn,{children:["视频卡片右上角「稍后再看」按钮旁 ",v("br",{}),"「稍后再看」因其通用性不提供关闭选项"]})]}),v(Ro,{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(lt,{configPath:"videoCard.actions.showLargePreview",label:"浮动预览",tooltip:F(we,{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(lt,{configPath:"videoCard.actions.openInPipWindow",label:"小窗打开",tooltip:v(we,{children:"仅当「文档画中画」API 可用时, 勾选生效"})}),v(Za,{className:"grid-col-span-full my-2px py-0"}),F("div",{className:"flex flex-col",children:[v(lt,{configPath:"videoCard.videoPreview.useMp4",disabled:!t,label:"浮动预览: 使用 mp4",tooltip:lr("使用 mp4, 最高 720p, 有声音","使用 dash, 最高 1080p, 无声音, 理论上更快")}),v(lt,{configPath:"videoCard.videoPreview.usePreferredCdn",disabled:!t,label:"浮动预览: 使用优选 CDN",tooltip:lr("使用优选 CDN (降低 MCDN & PCDN 优先级)","使用默认 CDN")}),v(lt,{configPath:"videoCard.videoPreview.useScale",disabled:!t,label:"浮动预览: 使用放大效果",tooltip:lr("浮动预览面板: 放大展开 (类似浮图秀)","浮动预览面板: 滑动展开")}),v(lt,{configPath:"videoCard.videoPreview.useVideoCardAsTrigger",disabled:!t,label:"浮动预览: 使用视频卡片作为触发器",tooltip:F(we,{children:[lr("使用「视频卡片」作为触发器","使用「视频卡片右上角按钮」作为触发器"),v(Za,{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(lt,{configPath:"pipWindow.defaultLocked",disabled:!n,label:"小窗: 默认锁定",tooltip:lr("小窗打开时: 默认锁定","小窗打开时: 不锁定")}),v(lt,{configPath:"pipWindow.autoWebFullscreen",disabled:!n,label:"小窗: 自动网页全屏",tooltip:lr("自动网页全屏","不启用")})]})]})}),F(Sn,{titleClassName:"justify-between",title:F(we,{children:["快照预览",v(Ro,{paths:["videoCard.imgPreview.autoPreviewWhenKeyboardSelect","videoCard.imgPreview.autoPreviewWhenHover","videoCard.imgPreview.disableWhenMultiSelecting"]})]}),contentClassName:"flex-row flex-wrap items-center gap-x-10px",children:[v(lt,{configPath:"videoCard.imgPreview.autoPreviewWhenKeyboardSelect",label:"键盘选中后自动开始",tooltip:F(we,{children:["手动预览快捷键: ",v(Ir,{color:"green",children:"."})," or ",v(Ir,{color:"green",children:"p"})," ",v("br",{}),"切换设置快捷键: ",v(Ir,{color:"green",children:"shift+p"})]})}),v(lt,{configPath:"videoCard.imgPreview.autoPreviewWhenHover",label:"鼠标悬浮后自动开始",tooltip:F(we,{children:["鼠标悬浮后自动开始预览, 预览不再跟随鼠标位置 ",v("br",{}),"切换设置快捷键: ",v(Ir,{color:"green",children:"shift+m"})]})}),v(lt,{configPath:"videoCard.imgPreview.disableWhenMultiSelecting",label:"多选时禁用",tooltip:lr("多选开启时, 禁用快照预览","不禁用")})]}),F(Sn,{title:F(we,{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:i,children:[uo," v","0.34.0"]}),v(Ss,{className:"size-16px cursor-pointer",onClick:i})]})]}),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:"http://greasyfork.icu/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 gg=[{useBorder:false},{useBorder:true,useBorderOnlyOnHover:true},{useBorder:true,useBorderOnlyOnHover:false}],aR=["「卡片边框」: 禁用","「卡片边框」: 仅在悬浮时显示","「卡片边框」: 总是显示"];function TZ(){return Ur(["shift.b"],e=>{if(di())return;const t=Ha(Ue.style.videoCard,["useBorder","useBorderOnlyOnHover"]),n=gg.findIndex(s=>Bo(s,Ha(t,Object.keys(s))));if(n===-1)throw new Error("unexpected curIndex = -1");const r=(n+1)%gg.length,o=gg[r];Object.assign(Ue.style.videoCard,o);const i=aR[r];ft.success(i);},{exactMatch:true})}function OZ(){const{style:e}=Mt(),t=An(ur.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(we,{children:["通用",v(Ro,{className:"ml-10px",paths:["style.general.popoverBorderColorUseColorPrimary"]})]}),children:v("div",{className:n,children:v(lt,{configPath:"style.general.popoverBorderColorUseColorPrimary",label:"下拉面板使用主题色边框"})})}),v(Sn,{title:F(we,{children:["全屏模式",v(Ro,{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(lt,{configPath:"style.pureRecommend.useStickyTabbar",label:"全屏模式: 固定 Tab 栏",tooltip:lr("Tab 栏会吸附在顶栏下方","Tab 栏会随页面一起滚动")}),v(lt,{disabled:!e.pureRecommend.useStickyTabbar,configPath:"style.pureRecommend.stickyTabbarShadow",label:"全屏模式: 固定 Tab 栏 : 添加边框 & 阴影",tooltip:lr("Tab 栏在吸附状态下: 加宽, 添加边框 & 阴影","不改变")}),v(lt,{configPath:"style.pureRecommend.useWhiteBackground",label:"全屏模式: 使用纯白背景",tooltip:lr("纯白背景","浅灰色背景")}),v(lt,{configPath:"style.pureRecommend.hideTopChannel",label:"全屏模式: 隐藏顶部分区和Banner"})]})}),v(Sn,{title:F(we,{children:["视频卡片",v(Ro,{className:"ml-10px",paths:["style.videoCard.useBorder","style.videoCard.useBorderOnlyOnHover","style.videoCard.useBoxShadow","useDelayForHover"]})]}),children:F("div",{className:n,children:[v(lt,{configPath:"style.videoCard.useBorder",label:"使用卡片边框",tooltip:F(we,{children:["勾选后, 视频卡片会有边框包裹, 更像是一个卡片~ ",v("br",{}),"整个卡片区域可点击 / 可触发预览 / 可使用右键菜单 ",v("br",{}),"否则只是封面区域可以 ",v("br",{}),"使用快捷键 ",v(Ir,{color:"green",children:"shift+b"})," 切换状态",v("br",{}),aR.map(r=>v(Ir,{color:"success",children:r},r))]})}),v(lt,{configPath:"style.videoCard.useBorderOnlyOnHover",label:"仅在悬浮时显示",disabled:!e.videoCard.useBorder,tooltip:lr("仅在悬浮时显示","一直显示")}),v(lt,{configPath:"style.videoCard.useBoxShadow",disabled:!e.videoCard.useBorder,label:"悬浮卡片时使用发光效果",tooltip:v(we,{children:"悬浮卡片时使用发光效果, 看起来比较花哨~"})}),v(lt,{configPath:"useDelayForHover",label:"延迟悬浮预览",tooltip:v(we,{children:"延迟悬浮预览"})})]})})]})}var FZ={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 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 BZ=(e,t)=>f__namespace.createElement(on,Kv({},e,{ref:t,icon:FZ})),LZ=f__namespace.forwardRef(BZ);var DZ={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 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 kZ=(e,t)=>f__namespace.createElement(on,Xv({},e,{ref:t,icon:DZ})),C2=f__namespace.forwardRef(kZ);var _Z={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 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 zZ=(e,t)=>f__namespace.createElement(on,Yv({},e,{ref:t,icon:_Z})),x2=f__namespace.forwardRef(zZ);var HZ={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 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 VZ=(e,t)=>f__namespace.createElement(on,Qv({},e,{ref:t,icon:HZ})),jZ=f__namespace.forwardRef(VZ);var WZ={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 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 qZ=(e,t)=>f__namespace.createElement(on,Zv({},e,{ref:t,icon:WZ})),UZ=f__namespace.forwardRef(qZ);var GZ={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 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 KZ=(e,t)=>f__namespace.createElement(on,Jv({},e,{ref:t,icon:GZ})),XZ=f__namespace.forwardRef(KZ);var YZ={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 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 QZ=(e,t)=>f__namespace.createElement(on,e0({},e,{ref:t,icon:YZ})),ZZ=f__namespace.forwardRef(QZ);function t0(){return typeof BigInt=="function"}function lR(e){return !e&&e!==0&&!Number.isNaN(e)||!String(e).trim()}function Is(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 uC(e){var t=String(e);return !Number.isNaN(Number(t))&&t.includes("e")}function Cs(e){var t=String(e);if(uC(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(".")&&dC(t)?t.length-t.indexOf(".")-1:0}function yp(e){var t=String(e);if(uC(e)){if(e>Number.MAX_SAFE_INTEGER)return String(t0()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(e<Number.MIN_SAFE_INTEGER)return String(t0()?BigInt(e).toString():Number.MIN_SAFE_INTEGER);t=e.toFixed(Cs(t));}return Is(t).fullStr}function dC(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 JZ=(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),lR(t)){this.empty=true;return}if(this.origin=String(t),t==="-"||Number.isNaN(t)){this.nan=true;return}var n=t;if(uC(n)&&(n=Number(n)),n=typeof n=="string"?n:yp(n),dC(n)){var r=Is(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=Is(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()?"":Is("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),e})(),eJ=(function(){function e(t){if(no(this,e),tt(this,"origin",""),tt(this,"number",void 0),tt(this,"empty",void 0),lR(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(Cs(this.number),Cs(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(Cs(this.number),Cs(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()?"":yp(this.number):this.origin}}]),e})();function io(e){return t0()?new JZ(e):new eJ(e)}function yf(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:false;if(e==="")return "";var o=Is(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 yf(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 tJ(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 nJ(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 rJ=200,oJ=600;function w2({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,rJ);}l.current=setTimeout(b,oJ);};f__namespace.useEffect(()=>()=>{u(),c.current.forEach(g=>{gt.cancel(g);});},[]);const m=`${e}-action`,p=V(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 S2(e){const t=typeof e=="number"?yp(e):Is(e).fullStr;return t.includes(".")?Is(t.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:e+"0"}const iJ=()=>{const e=f.useRef(0),t=()=>{gt.cancel(e.current);};return f.useEffect(()=>t,[]),n=>{t(),e.current=gt(()=>{n();});}};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)}const $2=(e,t)=>e||t.isEmpty()?t.toString():t.toNumber(),E2=e=>{const t=io(e);return t.isInvalidate()?null:t},sJ=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:D,onStep:R,onMouseDown:B,onClick:H,onMouseUp:k,onMouseLeave:z,onMouseMove:_,onMouseEnter:W,onMouseOut:O,changeOnBlur:L=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,()=>tJ(G.current,{focus:Ie=>{F1(G.current,Ie);},blur:()=>{G.current?.blur();},nativeElement:Q.current}));const[ee,oe]=f__namespace.useState(()=>io(m??d));function re(Ie){m===void 0&&oe(Ie);}const he=f__namespace.useCallback((Ie,Me)=>{if(!Me)return P>=0?P:Math.max(Cs(Ie),Cs(u))},[P,u]),Z=f__namespace.useCallback(Ie=>{const Me=String(Ie);if($)return $(Me);let se=Me;return M&&(se=se.replace(M,".")),se.replace(/[^\w.-]+/g,"")},[$,M]),te=f__namespace.useRef(""),ce=f__namespace.useCallback((Ie,Me)=>{if(E)return E(Ie,{userTyping:Me,input:String(te.current)});let se=typeof Ie=="number"?yp(Ie):Ie;if(!Me){const ge=he(se,Me);dC(se)&&(M||ge>=0)&&(se=yf(se,M||".",ge));}return se},[E,he,M]),[ue,Ee]=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 Re(Ie,Me){Ee(ce(Ie.isInvalidate()?Ie.toString(false):Ie.toString(!Me),Me));}const be=f__namespace.useMemo(()=>E2(c),[c,P]),le=f__namespace.useMemo(()=>E2(l),[l,P]),ae=f__namespace.useMemo(()=>!be||!ee||ee.isInvalidate()?false:be.lessEquals(ee),[be,ee]),ye=f__namespace.useMemo(()=>!le||!ee||ee.isInvalidate()?false:ee.lessEquals(le),[le,ee]),[Se,He]=nJ(G.current,Y),Le=Ie=>be&&!Ie.lessEquals(be)?be:le&&!le.lessEquals(Ie)?le:null,Ae=Ie=>!Le(Ie),_e=(Ie,Me)=>{let se=Ie,ge=Ae(se)||se.isEmpty();if(!se.isEmpty()&&!Me&&(se=Le(se)||se,ge=true),!h&&!p&&ge){const fe=se.toString(),ie=he(fe,Me);return ie>=0&&(se=io(yf(fe,".",ie)),Ae(se)||(se=io(yf(fe,".",ie,true)))),se.equals(ee)||(re(se),N?.(se.isEmpty()?null:$2(I,se)),m===void 0&&Re(se,Me)),se}return ee},Te=iJ(),Ce=Ie=>{if(Se(),te.current=Ie,Ee(Ie),!K.current){const Me=Z(Ie),se=io(Me);se.isNaN()||_e(se,true);}A?.(Ie),Te(()=>{let Me=Ie;$||(Me=Ie.replace(/。/g,".")),Me!==Ie&&Ce(Me);});},Pe=()=>{K.current=true;},De=()=>{K.current=false,Ce(G.current.value);},Oe=Ie=>{Ce(Ie.target.value);},Ne=at((Ie,Me)=>{if(Ie&&ae||!Ie&&ye)return;U.current=false;let se=io(J.current?S2(u):u);Ie||(se=se.negate());const ge=(ee||io(0)).add(se.toString()),fe=_e(ge,false);R?.($2(I,fe),{offset:J.current?S2(u):u,type:Ie?"up":"down",emitter:Me}),G.current?.focus();}),Qe=Ie=>{const Me=io(Z(ue));let se;Me.isNaN()?se=_e(ee,Ie):se=_e(Me,Ie),m!==void 0?Re(ee,false):se.isNaN()||Re(se,false);},mt=()=>{U.current=true;},it=Ie=>{const{key:Me,shiftKey:se}=Ie;U.current=true,J.current=se,Me==="Enter"&&(K.current||(U.current=false),Qe(false),D?.(Ie)),y!==false&&!K.current&&["Up","ArrowUp","Down","ArrowDown"].includes(Me)&&(Ne(Me==="Up"||Me==="ArrowUp","keyboard"),Ie.preventDefault());},ct=()=>{U.current=false,J.current=false;};f__namespace.useEffect(()=>{if(C&&Y){const Ie=se=>{Ne(se.deltaY<0,"wheel"),se.preventDefault();},Me=G.current;if(Me)return Me.addEventListener("wheel",Ie,{passive:false}),()=>Me.removeEventListener("wheel",Ie)}});const bt=()=>{L&&Qe(false),q(false),U.current=false;},pt=Ie=>{G.current&&Ie.target!==G.current&&(G.current.focus(),Ie.preventDefault()),B?.(Ie);};Gd(()=>{ee.isInvalidate()||Re(ee,false);},[P,E]),Gd(()=>{const Ie=io(m);oe(Ie);const Me=io(Z(ue));(!Ie.equals(Me)||!U.current||E)&&Re(Ie,U.current);},[m]),Gd(()=>{E&&He();},[ue]);const nt={prefixCls:r,onStep:Ne,className:s?.action,style:a?.action},et=f__namespace.createElement(w2,Sc({},nt,{action:"up",disabled:ae}),g),Xe=f__namespace.createElement(w2,Sc({},nt,{action:"down",disabled:ye}),b);return f__namespace.createElement("div",{ref:Q,className:V(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()&&!Ae(ee)}),style:{...a?.root,...i},onMouseDown:pt,onMouseUp:k,onMouseLeave:z,onMouseMove:_,onMouseEnter:W,onMouseOut:O,onClick:H,onFocus:()=>{q(true);},onBlur:bt,onKeyDown:it,onKeyUp:ct,onCompositionStart:Pe,onCompositionEnd:De,onBeforeInput:mt},n==="spinner"&&x&&Xe,w!==void 0&&f__namespace.createElement("div",{className:V(`${r}-prefix`,s?.prefix),style:a?.prefix},w),f__namespace.createElement("input",Sc({autoComplete:"off",role:"spinbutton","aria-valuemin":l,"aria-valuemax":c,"aria-valuenow":ee.isInvalidate()?null:ee.toString(),step:u,ref:G,className:V(`${r}-input`,s?.input),style:a?.input,value:ue,onChange:Oe,disabled:p,readOnly:h},j)),S!==void 0&&f__namespace.createElement("div",{className:V(`${r}-suffix`,s?.suffix),style:a?.suffix},S),n==="spinner"&&x&&et,n==="input"&&x&&f__namespace.createElement("div",{className:V(`${r}-actions`,s?.actions),style:a?.actions},et,Xe))});function $l(e){return vt(e,{inputAffixPadding:e.paddingXXS})}const El=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}},aJ=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),Cp=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])":{...aJ(vt(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled}))}}),fC=(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}}),I2=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...fC(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),cR=(e,t)=>({"&-outlined":{...fC(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...Cp(e)},...I2(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...I2(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),P2=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),lJ=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}},...P2(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...P2(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...Cp(e)}}}}),uR=(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}}},dR=(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}}),N2=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...dR(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),fR=(e,t)=>({"&-filled":{...dR(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...Cp(e)},...N2(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError}),...N2(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning}),...t}}),M2=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),cJ=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}},...M2(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...M2(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}`}}}}}),mR=(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}}),R2=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...mR(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`}}),pR=(e,t)=>({"&-underlined":{...mR(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"},...R2(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...R2(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),hR=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),gR=e=>{const{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:o}=e;return {padding:`${X(t)} ${X(o)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},mC=e=>({padding:`${X(e.paddingBlockSM)} ${X(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),xp=(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}`,...hR(e.colorTextPlaceholder),"&-lg":{...gR(e),...t.largeStyle},"&-sm":{...mC(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:"rtl"}}),uJ=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`]:{...gR(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{...mC(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",...Af(),[`${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`]:{}}}}},dJ=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]:{...Bt(e),...xp(e),...cR(e),...fR(e),...uR(e),...pR(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"}}}},fJ=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)}`}}}},mJ=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]:{...xp(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}},...fJ(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}}}}},pJ=e=>{const{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return {[`${t}-group`]:{...Bt(e),...uJ(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}},...lJ(e),...cJ(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}}}}}},hJ=e=>{const{componentCls:t}=e;return {[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},bR=wt(["Input","Shared"],e=>{const t=vt(e,$l(e));return [dJ(t),mJ(t)]},El,{resetFont:false}),vR=wt(["Input","Component"],e=>{const t=vt(e,$l(e));return [pJ(t),hJ(t),ul(t,{focus:true,focusElCls:`${t.componentCls}-affix-wrapper-focused`})]},El,{resetFont:false}),gJ=e=>{const t=e.handleVisible??"auto",n=e.controlHeightSM-e.lineWidth*2;return {...El(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}},bJ=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]:{...Bt(e),...xp(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,...cR(e,{[`${t}-actions`]:{background:C,[`${t}-action-down`]:{borderBlockStart:M}}}),...fR(e,{[`${t}-actions`]:{background:E,[`${t}-action-down`]:{borderBlockStart:M}},"&:focus-within":{[`${t}-actions`]:{background:C}}}),...pR(e,{[`${t}-actions`]:{background:C,[`${t}-action-down`]:{borderBlockStart:M}}}),...uR(e),"&-rtl":{direction:"rtl",[`${t}-input`]:{direction:"rtl"}},[`&${t}-out-of-range`]:{[`${t}-input`]:{color:a}},[`${t}-input`]:{...Bt(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",...hR(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}}}}]},vJ=e=>{const{componentCls:t,antCls:n}=e;return {[`${t}-addon`]:{[`&:has(${n}-select)`]:{border:0,padding:0}}}},yJ=wt("InputNumber",e=>{const t=vt(e,$l(e));return [bJ(t),vJ(t),ul(t)]},gJ,{unitless:{handleOpacity:true},resetFont:false}),CJ=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}=$t("inputNumber"),N=f__namespace.useMemo(()=>!h||e.disabled||e.readOnly?false:h,[h,e.disabled,e.readOnly]),{compactSize:A,compactItemClassnames:D}=li(s,I);let R=w==="spinner"?f__namespace.createElement(sM,null):f__namespace.createElement(ZZ,null),B=w==="spinner"?f__namespace.createElement(XZ,null):f__namespace.createElement(X1,null);const H=typeof N=="boolean"?N:void 0;typeof N=="object"&&(R=N.upIcon||R,B=N.downIcon||B);const{hasFeedback:k,isFormItemInput:z,feedbackIcon:_}=f__namespace.useContext(Qn),W=Hn(Q=>o??A??Q),O=f__namespace.useContext(kn),L=i??O,[j,Y]=fp("inputNumber",g,d),q=k&&f__namespace.createElement(f__namespace.Fragment,null,_),U={...e,size:W,disabled:L,controls:N},[K,J]=It([M,C],[P,x],{props:U});return f__namespace.createElement(sJ,{ref:n,mode:w,disabled:L,className:V(b,r,K.root,$,D,qi(s,p,k),{[`${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:B,prefixCls:s,readOnly:m,controls:H,prefix:c,suffix:q||u,classNames:K,styles:J,...S})}),yR=f__namespace.forwardRef((e,t)=>{const{addonBefore:n,addonAfter:r,prefixCls:o,className:i,status:s,rootClassName:a,...l}=e,{getPrefixCls:c}=$t("inputNumber"),u=c("input-number",o),{status:d}=f__namespace.useContext(Qn),m=ml(d,s),p=sn(u),[h,g]=yJ(u,p),b=n||r,y=f__namespace.createElement(CJ,{ref:t,...l,prefixCls:u,status:m,className:V(g,p,h,i),rootClassName:b?void 0:a});if(b){const C=S=>S?f__namespace.createElement(CN,{className:V(`${u}-addon`,g,h),variant:e.variant,disabled:e.disabled,status:m},f__namespace.createElement(zi,{form:true},S)):null,x=C(n),w=C(r);return f__namespace.createElement(wy,{rootClassName:a},x,y,w)}return y}),$c=yR,xJ=e=>f__namespace.createElement(yr,{theme:{components:{InputNumber:{handleVisible:true}}}},f__namespace.createElement(yR,{...e}));$c._InternalPanelDoNotUseOrYouWillBeFired=xJ;const wJ=({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"})]}),CR=f.forwardRef(wJ),SJ=({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"})]}),$J=f.forwardRef(SJ),EJ=({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"})]}),IJ=f.forwardRef(EJ),xR=CR,wR=$J,n0=IJ;function SR(e){return `https://space.bilibili.com/${Br()}/fans/follow?tagid=${e}`}function Yu(e){return `https://space.bilibili.com/${e}`}const $R=eN("w_webid"),ER=ci(async()=>{const e=await $R.get();return e||PJ()});async function PJ(){const e=Br();if(!e)return;const t=Yu(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 $R.set(a),a}async function NJ(e){const n=(await Tt.get("/x/space/wbi/acc/info",{params:{mid:e,w_webid:await ER()||""}})).data;if(!cn(n)){po("space acc info error for %s: %o",e,n);return}return n.data}const pC=na({fn:NJ,generateKey:e=>e.toString(),tableName:"space-acc-info",ttl:Vn("10d"),concurrency:2});async function MJ(e){return (await pC(e))?.name}const Qu=na({fn:MJ,generateKey:e=>e.toString(),tableName:"user-nickname",ttl:Vn("10d")});async function A2(e,t){await Qu.cache.set(e.toString(),{val:t,ts:Date.now()});}function RJ(){return PR("filter.byAuthor.keywords")}function AJ(){return NR("filter.byAuthor.keywords")}function TJ(){return PR("filter.byTitle.keywords")}function OJ(){return NR("filter.byTitle.keywords")}function IR(e){return `__${uo}:${e}__`}async function PR(e){const t=IR(e),n=await rp(e);GM.setClipboard(JSON.stringify({[t]:n},null,2)),ft.success("已复制到剪贴板!");}async function NR(e){const[t,n]=await Nm(()=>navigator.clipboard.readText());if(t)return ft.error("读取剪贴板失败!");if(!n)return ft.error("剪贴板内容为空!");const[r,o]=Pm(()=>JSON.parse(n));if(r)return ft.error("无法解析剪贴板内容!");if(!o)return ft.error("剪贴板内容为空!");const i=IR(e),s=o?.[i];if(!s?.length)return ft.error("没有符合条件的数据!");const a=await rp(e),l=LE(s,a);if(!l.length)return ft.warning("没有可导入内容, 已全部存在!");ii(e,{add:l}),ft.success(`已导入 ${l.length} 条数据!`);}const T2=/^(?<mid>\d+)\((?<remark>[\S ]+)\)$/,FJ=/^\d+$/;function wp(e){if(T2.test(e)){const t=T2.exec(e)?.groups,n=t?.mid,r=t?.remark;return {mid:n,remark:r}}return FJ.test(e)?{mid:e,remark:void 0}:{}}function MR(e){const t=new Set,n=new Set;return e.forEach(r=>{const{mid:o}=wp(r);o?t.add(o):n.add(r);}),{blockUpMids:t,blockUpNames:n}}function BJ(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 LJ=e=>{const{getPrefixCls:t,direction:n}=f.useContext(ot),{prefixCls:r,className:o}=e,i=t("input-group",r),s=t("input"),[a,l]=vR(s),c=V(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(Qn),d=f.useMemo(()=>({...u,isFormItemInput:false}),[u]);return f__namespace.createElement(Qn.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 DJ(e){return !!(e.addonBefore||e.addonAfter)}function kJ(e){return !!(e.prefix||e.suffix||e.allowClear)}function O2(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 fm(e,t,n,r){if(!n)return;let o=t;if(t.type==="click"){o=O2(t,e,""),n(o);return}if(e.type!=="file"&&r!==void 0){o=O2(t,e,r),n(o);return}n(o);}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 RR=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",D=$?.groupAddon||"span",R=f.useRef(null),B=_=>{R.current?.contains(_.target)&&h?.();},H=kJ(e);let k=f.cloneElement(P,{value:b,className:V(P.props?.className,!H&&w?.variant)||null});const z=f.useRef(null);if(f.useImperativeHandle(t,()=>({nativeElement:z.current||R.current})),H){let _=null;if(g){const j=!d&&!m&&b,Y=`${o}-clear-icon`,q=typeof g=="object"&&g?.clearIcon?g.clearIcon:"✖";_=f.createElement("button",{type:"button",tabIndex:-1,onClick:U=>{y?.(U),E?.();},onMouseDown:U=>U.preventDefault(),className:V(Y,{[`${Y}-hidden`]:!j,[`${Y}-has-suffix`]:!!s})},q);}const W=`${o}-affix-wrapper`,O=V(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),L=(s||g)&&f.createElement("span",{className:V(`${o}-suffix`,w?.suffix),style:I?.suffix},_,s);k=f.createElement(M,r0({className:O,style:I?.affixWrapper,onClick:B},S?.affixWrapper,{ref:R}),i&&f.createElement("span",{className:V(`${o}-prefix`,w?.prefix),style:I?.prefix},i),k,L);}if(DJ(e)){const _=`${o}-group`,W=`${_}-addon`,O=`${_}-wrapper`,L=V(`${o}-wrapper`,_,x?.wrapper,w?.wrapper),j=V(O,{[`${O}-disabled`]:d},x?.group,w?.groupWrapper);k=f.createElement(N,{className:j,ref:z},f.createElement(A,{className:L},a&&f.createElement(D,{className:W},a),k,l&&f.createElement(D,{className:W},l)));}return f.cloneElement(k,{className:V(k.props?.className,c)||null,style:{...k.props?.style,...u},hidden:C})});function AR(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 mm(){return mm=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},mm.apply(this,arguments)}const _J=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),D=f.useRef(null),R=Z=>{A.current&&F1(A.current,Z);},[B,H]=Lt(e.defaultValue,e.value),k=B==null?"":String(B),[z,_]=f.useState(null),W=AR(b,g),O=W.max||p,L=W.strategy(k),j=!!O&&L>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:D.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&&_([A.current?.selectionStart||0,A.current?.selectionEnd||0]);else if(ce.source==="compositionEnd")return;H(ue),A.current&&fm(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=>{H(""),R(),A.current&&fm(A.current,Z,r);},oe=j&&`${c}-out-of-range`,re=()=>{const Z=Zt(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return f.createElement("input",mm({autoComplete:n},Z,{onChange:q,onFocus:Q,onBlur:G,onKeyDown:K,onKeyUp:J,className:V(c,{[`${c}-disabled`]:u},x?.input),style:w?.input,ref:A,size:d,type:y,onCompositionStart:te=>{M.current=true,S?.(te);},onCompositionEnd:U}))},he=()=>{const Z=Number(O)>0;if(h||W.show){const te=W.showFormatter?W.showFormatter({value:k,count:L,maxLength:O}):`${L}${Z?` / ${O}`:""}`;return f.createElement(f.Fragment,null,W.show&&f.createElement("span",{className:V(`${c}-show-count-suffix`,{[`${c}-show-count-has-suffix`]:!!h},x?.count),style:{...w?.count}},te),h)}return null};return f.createElement(RR,mm({},$,{prefixCls:c,className:V(m,oe),handleReset:ee,value:k,focused:E,triggerFocus:R,suffix:he(),disabled:u,classes:C,classNames:x,styles:w,ref:D}),re())}),TR=e=>{let t;return typeof e=="object"&&e?.clearIcon?t=e:e&&(t={clearIcon:f.createElement(Tu,null)}),t};function OR(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 zJ(e){return !!(e.prefix||e.suffix||e.allowClear||e.showCount)}const Il=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}=$t("input"),D=S("input",n),R=f.useRef(null),B=sn(D),[H,k]=bR(D,b);vR(D,B);const{compactSize:z,compactItemClassnames:_}=li(D,I),W=Hn(Ee=>i??z??Ee),O=f.useContext(kn),L=s??O,j={...e,size:W,disabled:L},[Y,q]=It([N,C],[A,g],{props:j}),{status:U,hasFeedback:K,feedbackIcon:J}=f.useContext(Qn),Q=ml(U,o),G=zJ(e)||!!K;f.useRef(G);const ee=OR(R,true),oe=Ee=>{ee(),a?.(Ee);},re=Ee=>{ee(),l?.(Ee);},he=Ee=>{ee(),y?.(Ee);},Z=(K||c)&&f.createElement(f.Fragment,null,c,K&&J),te=TR(u??$),[ce,ue]=fp("input",x,r);return f.createElement(_J,{ref:In(t,R),prefixCls:D,autoComplete:E,...w,disabled:L,onBlur:oe,onFocus:re,style:{...q.root,...M,...h},styles:q,suffix:Z,allowClear:te,className:V(p,b,k,B,_,P,Y.root),onChange:he,addonBefore:m&&f.createElement(zi,{form:true,space:true},m),addonAfter:d&&f.createElement(zi,{form:true,space:true},d),classNames:{...Y,input:V({[`${D}-sm`]:W==="small",[`${D}-lg`]:W==="large",[`${D}-rtl`]:I==="rtl"},Y.input,H),variant:V({[`${D}-${ce}`]:ue},qi(D,Q)),affixWrapper:V({[`${D}-affix-wrapper-sm`]:W==="small",[`${D}-affix-wrapper-lg`]:W==="large",[`${D}-affix-wrapper-rtl`]:I==="rtl"},H),wrapper:V({[`${D}-group-rtl`]:I==="rtl"},H),groupWrapper:V({[`${D}-group-wrapper-sm`]:W==="small",[`${D}-group-wrapper-lg`]:W==="large",[`${D}-group-wrapper-rtl`]:I==="rtl",[`${D}-group-wrapper-${ce}`]:ue},qi(`${D}-group-wrapper`,Q,K),H)}})}),HJ=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}}}},VJ=wt(["Input","OTP"],e=>{const t=vt(e,$l(e));return HJ(t)},El),jJ=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(Il,{"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:V(n,{[`${d}-mask-input`]:a})}))});function Ld(e){return (e||"").split("")}const WJ=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:V(`${n}-separator`,o),style:i},s):null},qJ=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:D}=$t("otp"),R=M("otp",n),B={...e,length:r},[H,k]=It([E,x],[P,w],{props:B}),z=rr($,{aria:true,data:true,attr:true}),[_,W]=VJ(R),O=Hn(te=>o??te),L=f__namespace.useContext(Qn),j=ml(L.status,m),Y=f__namespace.useMemo(()=>({...L,status:j,hasFeedback:false,feedbackIcon:null}),[L,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(()=>Ld(K(i||"")));f__namespace.useEffect(()=>{s!==void 0&&Q(Ld(s));},[s]);const G=at(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=at((te,ce)=>{let ue=Et(J);for(let Re=0;Re<te;Re+=1)ue[Re]||(ue[Re]="");ce.length<=1?ue[te]=ce:ue=ue.slice(0,te).concat(Ld(ce)),ue=ue.slice(0,r);for(let Re=ue.length-1;Re>=0&&!ue[Re];Re-=1)ue.pop();const Ee=K(ue.map(Re=>Re||" ").join(""));return ue=Ld(Ee).map((Re,be)=>Re===" "&&!ue[be]?ue[be]:Re),ue}),oe=(te,ce)=>{const ue=ee(te,ce),Ee=Math.min(te+ce.length,r-1);Ee!==te&&ue[te]!==void 0&&U.current[Ee]?.focus(),G(ue);},re=te=>{U.current[te]?.focus();},he=(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:V(S,R,{[`${R}-sm`]:O==="small",[`${R}-lg`]:O==="large",[`${R}-rtl`]:N==="rtl"},W,_,D,H.root),style:{...k.root,...A,...I},role:"group"},f__namespace.createElement(Qn.Provider,{value:Y},Array.from({length:r}).map((te,ce)=>{const ue=`otp-${ce}`,Ee=J[ce]||"";return f__namespace.createElement(f__namespace.Fragment,{key:ue},f__namespace.createElement(jJ,{ref:Re=>{U.current[ce]=Re;},index:ce,size:O,htmlSize:1,className:V(H.input,`${R}-input`),style:k.input,onChange:oe,value:Ee,onActiveChange:re,autoFocus:ce===0&&p,onFocus:Re=>he(Re,ce),...Z}),ce<r-1&&f__namespace.createElement(WJ,{separator:c,index:ce,prefixCls:R,className:V(H.separator),style:k.separator}))})))}),UJ=e=>e?f__namespace.createElement(UZ,null):f__namespace.createElement(jZ,null),GJ={click:"onClick",hover:"onMouseOver"},KJ=f__namespace.forwardRef((e,t)=>{const{disabled:n,action:r="click",visibilityToggle:o=true,iconRender:i=UJ,suffix:s}=e,a=f__namespace.useContext(kn),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=OR(m),h=()=>{if(l)return;u&&p();const N=!u;d(N),typeof o=="object"&&o.onVisibleChange?.(N);},g=N=>{const A=GJ[r]||"",D=i(u),R={[A]:h,className:`${N}-icon`,key:"passwordIcon",onMouseDown:B=>{B.preventDefault();},onMouseUp:B=>{B.preventDefault();}};return f__namespace.cloneElement(f__namespace.isValidElement(D)?D:f__namespace.createElement("span",null,D),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=V($,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(Il,{ref:In(t,m),...M})}),XJ=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}}}}}}},YJ=wt(["Input","Search"],e=>[XJ(e)]),QJ=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}=$t("inputSearch"),P={...e,enterButton:a},[M,N]=It([$,y],[E,C],{props:P},{button:{_default:"root"}}),A=f__namespace.useRef(false),D=I("input-search",n),R=I("input",r),[B,H]=YJ(D),{compactSize:k}=li(D,S),z=Hn(Z=>i??k??Z),_=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===_.current?.input&&Z.preventDefault();},L=Z=>{d&&d(_.current?.input?.value,Z,{source:"input"});},j=Z=>{A.current||c||(b?.(Z),L(Z));},Y=typeof a=="boolean"?f__namespace.createElement(Y1,null):null,q=`${D}-btn`,U=V(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),L(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:L,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=V(D,H,{[`${D}-rtl`]:S==="rtl",[`${D}-${z}`]:!!z,[`${D}-with-button`]:!!a},o,B,M.root),ee=Z=>{A.current=true,p?.(Z);},oe=Z=>{A.current=false,h?.(Z);},re=rr(w,{data:true}),he=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:oe,onChange:W,disabled:u},Object.keys(re));return f__namespace.createElement(wy,{className:G,style:{...s,...N.root},...re,hidden:x},f__namespace.createElement(Il,{ref:In(_,t),...he}),K)}),ZJ=`
  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;
`,JJ=["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"],bg={};let $r;function eee(e,t=false){const n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&bg[n])return bg[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:JJ.map(c=>`${c}:${r.getPropertyValue(c)}`).join(";"),paddingSize:i,borderSize:s,boxSizing:o};return t&&n&&(bg[n]=l),l}function tee(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}=eee(e,t);$r.setAttribute("style",`${a};${ZJ}`),$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 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 vg=0,yg=1,Cg=2,nee=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]=Lt(r,o),g=p??"",b=B=>{h(B.target.value),u?.(B);},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(Cg),[$,E]=f__namespace.useState(),P=()=>{I(vg);};Kt(()=>{w&&P();},[o,C,x,w]),Kt(()=>{if(S===vg)I(yg);else if(S===yg){const B=tee(y.current,false,C,x);I(Cg),E(B);}},[S]);const M=f__namespace.useRef(),N=()=>{gt.cancel(M.current);},A=B=>{S===Cg&&(s?.(B),i&&(N(),M.current=gt(()=>{P();})));};f__namespace.useEffect(()=>N,[]);const R={...l,...w?$:null};return (S===vg||S===yg)&&(R.overflowY="hidden",R.overflowX="hidden"),f__namespace.createElement(Xr,{onResize:A,disabled:!(i||s)},f__namespace.createElement("textarea",o0({},m,{ref:y,style:R,className:V(n,a,{[`${n}-disabled`]:c}),disabled:c,value:g,onChange:b})))});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 ree=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]=Lt(e,t),D=N==null?"":String(N),[R,B]=f.useState(false),H=f.useRef(false),[k,z]=f.useState(null),_=f.useRef(null),W=f.useRef(null),O=()=>W.current?.textArea,L=()=>{O().focus();};f.useImperativeHandle(M,()=>({resizableTextArea:W.current,focus:L,blur:()=>{O().blur();},nativeElement:_.current?.nativeElement||O()})),f.useEffect(()=>{B(le=>!g&&le);},[g]);const[j,Y]=f.useState(null);f.useEffect(()=>{j&&O().setSelectionRange(...j);},[j]);const q=AR(m,d),U=q.max??s,K=Number(U)>0,J=q.strategy(D),Q=!!U&&J>U,G=(le,ae)=>{let ye=ae;!H.current&&q.exceedFormatter&&q.max&&q.strategy(ae)>q.max&&(ye=q.exceedFormatter(ae,{max:q.max}),ae!==ye&&Y([O().selectionStart||0,O().selectionEnd||0])),A(ye),fm(le.currentTarget,le,o,ye);},ee=le=>{H.current=true,a?.(le);},oe=le=>{H.current=false,G(le,le.currentTarget.value),l?.(le);},re=le=>{G(le,le.target.value);},he=le=>{le.key==="Enter"&&S&&!le.nativeEvent.isComposing&&S(le),E?.(le);},Z=le=>{B(true),n?.(le);},te=le=>{B(false),r?.(le);},ce=le=>{A(""),L(),fm(O(),le,o);};let ue=c,Ee;q.show&&(q.showFormatter?Ee=q.showFormatter({value:D,count:J,maxLength:U}):Ee=`${J}${K?` / ${U}`:""}`,ue=f.createElement(f.Fragment,null,ue,f.createElement("span",{className:V(`${u}-data-count`,y?.count),style:C?.count},Ee)));const Re=le=>{x?.(le),O()?.style.height&&z(true);},be=!$&&!d&&!i;return f.createElement(RR,{ref:_,value:D,allowClear:i,handleReset:ce,suffix:ue,prefixCls:u,classNames:{...y,affixWrapper:V(y?.affixWrapper,{[`${u}-show-count`]:d,[`${u}-textarea-allow-clear`]:i})},disabled:g,focused:R,className:V(p,Q&&`${u}-out-of-range`),style:{...h,...k&&!be?{height:"auto"}:{}},dataAttrs:{affixWrapper:{"data-count":typeof Ee=="string"?Ee:void 0}},hidden:b,readOnly:I,onClear:w},f.createElement(nee,i0({},P,{autoSize:$,maxLength:s,onKeyDown:he,onChange:re,onFocus:Z,onBlur:te,onCompositionStart:ee,onCompositionEnd:oe,className:V(y?.textarea),style:{resize:h?.resize,...C?.textarea},disabled:g,prefixCls:u,onResize:Re,ref:W,readOnly:I})))}),oee=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}}}}}},iee=wt(["Input","TextArea"],e=>{const t=vt(e,$l(e));return oee(t)},El,{resetFont:false}),see=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}=$t("textArea"),M=f__namespace.useContext(kn),N=i??M,{status:A,hasFeedback:D,feedbackIcon:R}=f__namespace.useContext(Qn),B=ml(A,s),[H,k]=It([E,l],[P,m],{props:e}),z=f__namespace.useRef(null);f__namespace.useImperativeHandle(t,()=>({resizableTextArea:z.current?.resizableTextArea,focus:Z=>{F1(z.current?.resizableTextArea?.textArea,Z);},blur:()=>z.current?.blur()}));const _=C("input",n),W=sn(_),[O,L]=bR(_,c);iee(_,W);const{compactSize:j,compactItemClassnames:Y}=li(_,x),q=Hn(Z=>o??j??Z),[U,K]=fp("textArea",p,r),J=TR(a??w),[Q,G]=f__namespace.useState(false),[ee,oe]=f__namespace.useState(false),re=Z=>{G(true),g?.(Z);const te=()=>{G(false),document.removeEventListener("mouseup",te);};document.addEventListener("mouseup",te);},he=Z=>{if(b?.(Z),Q&&typeof getComputedStyle=="function"){const te=z.current?.nativeElement?.querySelector("textarea");te&&getComputedStyle(te).resize==="both"&&oe(true);}};return f__namespace.createElement(ree,{autoComplete:S,...y,style:{...k.root,...$,...d},styles:k,disabled:N,allowClear:J,className:V(L,W,u,c,Y,I,H.root,{[`${_}-textarea-affix-wrapper-resize-dirty`]:ee}),classNames:{...H,textarea:V({[`${_}-sm`]:q==="small",[`${_}-lg`]:q==="large"},O,H.textarea,Q&&`${_}-mouse-active`),variant:V({[`${_}-${U}`]:K},qi(_,B)),affixWrapper:V(`${_}-textarea-affix-wrapper`,{[`${_}-affix-wrapper-rtl`]:x==="rtl",[`${_}-affix-wrapper-sm`]:q==="small",[`${_}-affix-wrapper-lg`]:q==="large",[`${_}-textarea-show-count`]:h||e.count?.show},O)},prefixCls:_,suffix:D&&f__namespace.createElement("span",{className:`${_}-textarea-suffix`},R),showCount:h,ref:z,onResize:he,onMouseDown:re})}),Co=Il;Co.Group=LJ;Co.Search=QJ;Co.TextArea=see;Co.Password=KJ;Co.OTP=qJ;const aee=({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"})]}),lee=f.forwardRef(aee),{Search:cee}=Co;var uee={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 F2({configPath:e,searchProps:t,disabled:n}){const r=uN(e),o=f.useMemo(()=>B0(r).toReversed(),[r]);return F(we,{children:[v(cee,{className:"my-5px",enterButton:"添加",allowClear:true,disabled:n,...t,onSearch:async(i,s)=>{if(!i)return;if(new Set(await rp(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:[kt("min-height:82px;border-radius:6px;border:1px solid ",x1,";margin-top:3px;",""),n&&uee,"",""],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(FR,{tag:i.toString(),onDelete:async s=>{await ii(e,{remove:[s]});},renderTag:e==="filter.byAuthor.keywords"?s=>v(dee,{tag:s}):void 0},i))}):v(jr,{image:jr.PRESENTED_IMAGE_SIMPLE,description:"空空如也",className:"[&.ant-empty-normal]:my-5px"})})]})}const FR=f.forwardRef(({tag:e,renderTag:t,onDelete:n,className:r,...o},i)=>F("div",{ref:i,className:V("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(lee,{className:"ml-2px size-16px cursor-pointer text-size-12px",onClick:()=>{n?.(e);}})]}));function dee({tag:e}){const{mid:t,remark:n}=f.useMemo(()=>wp(e),[e]),[r,o]=f.useState(void 0);f.useEffect(()=>{(async()=>{if(!t)return;const a=await Qu(t);a&&o(a);})();},[t]);const i=t?r||n||t:e;return v(we,{children:v(Jt,{title:F(we,{children:[!!t&&F(we,{children:["mid: ",t," ",v("br",{})]}),!!n&&F(we,{children:["备注: ",n," ",v("br",{}),n===r&&F(we,{children:['P.S "备注" 与 "用户昵称" 相同, 是之前的数据, 现在你只需要填写 mid, 会自动获取昵称 ',v("br",{})]})]}),!t&&F(we,{children:["使用用户名过滤: 用户可能改名, 建议使用 mid 过滤 ",v("br",{})]})]}),children:F("span",{className:V("inline-flex items-center justify-center",t?"cursor-pointer":"cursor-[edit]"),children:[t&&v(CR,{className:"mr-2px size-12px"}),t?v("a",{href:Yu(t),target:"_blank",style:{color:"inherit"},children:i}):i]})})})}function fee(){const{enabled:e,minDuration:t,minPlayCount:n,minDanmakuCount:r,hideGotoTypeBangumi:o,hideGotoTypePicture:i,byAuthor:s,byTitle:a}=Mt().filter,l=c=>({label:"「已关注」豁免",tooltipProps:{color:BM},tooltip:F(we,{children:["「已关注」内容不考虑过滤条件, 总是展示",v("br",{}),'"豁免" 一词来源'," ",v("a",{target:"_blank",href:"https://github.com/magicdawn/Bilibili-Gate/issues/1#issuecomment-2197868587",children:"pilipala"})]})});return v("div",{className:V(ur.tabPane,"pr-15px"),children:v(Sn,{title:F(we,{children:["内容过滤",F(Mn,{children:["启用过滤会降低加载速度! ",v("br",{}),"视频/图文/影视: 仅推荐类 Tab 生效 ",v("br",{}),"UP/标题: 推荐类 / 热门 等Tab 生效"]}),v(bf,{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:ur.settingsGroupSubTitle,children:"视频"}),F("div",{className:"flex flex-col gap-y-5px",children:[F("div",{className:"flex items-center",children:[v(lt,{configPath:"filter.minDuration.enabled",label:"按视频时长过滤",tooltip:v(we,{children:"不显示短视频"}),disabled:!e,className:"min-w-130px"}),v($c,{className:"w-130px",size:"small",min:1,step:10,addonAfter:"秒",value:t.value,onChange:c=>!ni(c)&&(Ue.filter.minDuration.value=c),disabled:!e||!t.enabled})]}),F("div",{className:"flex items-center",children:[v(lt,{disabled:!e,configPath:"filter.minPlayCount.enabled",label:"按播放次数过滤",tooltip:v(we,{children:"不显示播放次数很少的视频"}),className:"min-w-130px"}),v($c,{className:"w-130px",size:"small",min:1,step:1e3,value:n.value,onChange:c=>!ni(c)&&(Ue.filter.minPlayCount.value=c),disabled:!e||!n.enabled,addonAfter:"次"})]}),F("div",{className:"flex items-center",children:[v(lt,{disabled:!e,configPath:"filter.minDanmakuCount.enabled",label:"按弹幕条数过滤",tooltip:v(we,{children:"不显示弹幕条数很少的视频"}),className:"min-w-130px"}),v($c,{className:"w-130px",size:"small",min:1,step:100,value:r.value,onChange:c=>!ni(c)&&(Ue.filter.minDanmakuCount.value=c),disabled:!e||!r.enabled,addonAfter:"条"})]}),v(lt,{configPath:"filter.exemptForFollowed.video",disabled:!e,...l()})]})]}),F("div",{className:"col",children:[v("div",{className:ur.settingsGroupSubTitle,children:"图文"}),v(lt,{configPath:"filter.hideGotoTypePicture",label:"过滤图文类型推荐",disabled:!e,className:"flex",tooltip:F(we,{children:["过滤 ",v("kbd",{children:"goto = picture"})," 的内容: 包括 (动态 & 专栏) 等"]})}),v(lt,{className:"flex",disabled:!e||!i,configPath:"filter.exemptForFollowed.picture",...l()}),v("div",{className:ur.settingsGroupSubTitle,children:"影视"}),v(lt,{configPath:"filter.hideGotoTypeBangumi",label:"过滤影视类型推荐",tooltip:F(we,{children:["过滤 ",v("kbd",{children:"goto = bangumi"})," 的内容: 包括 (番剧 / 电影 / 国创 / 纪录片) 等"]}),disabled:!e})]}),F("div",{className:"col",children:[F("div",{className:ur.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(qH,{className:"mt-3px"}),F("div",{className:"ml-8px flex-1",children:["B站官方支持黑名单, 对于不喜欢的 UP 可以直接拉黑 ",v("br",{}),"此脚本会拉取官方黑名单, 并无视此页开关, 总是会过滤掉 ",v("br",{}),"这里是客户端过滤, 与黑名单功能重复, 优先使用黑名单功能 ",v("br",{})]})]})]}),v(bf,{configPath:"filter.byAuthor.enabled",disabled:!e,className:"ml-10px"}),v("div",{className:"flex-1"}),v(_o,{placement:"left",content:F("div",{className:"flex flex-col gap-x-10px gap-y-5px",children:[F(Je,{onClick:mee,children:[v(j6,{}),"清理无效备注数据"]}),F(Je,{onClick:RJ,children:[v(Nv,{}),"导出"]}),F(Je,{onClick:AJ,children:[v(Mv,{}),"导入"]})]}),children:v(Je,{className:"icon-only-round-button size-26px",children:v(n0,{className:"size-16px"})})})]}),v(F2,{configPath:"filter.byAuthor.keywords",searchProps:{placeholder:"添加UP: 全名 / mid / mid(备注)"},disabled:!e||!s.enabled})]}),F("div",{className:"col",children:[F("div",{className:ur.settingsGroupSubTitle,children:[v("span",{children:"标题"}),F(Mn,{children:["根据标题关键词过滤视频 ",v("br",{}),"支持普通关键字和正则(i), 语法:/abc|\\d+/ ",v("br",{}),"作用范围: 推荐 / 热门"]}),v(bf,{configPath:"filter.byTitle.enabled",disabled:!e,className:"ml-10px"}),v("div",{className:"flex-1"}),v(_o,{placement:"left",content:F("div",{className:"flex flex-col gap-x-10px gap-y-5px",children:[F(Je,{onClick:TJ,children:[v(Nv,{}),"导出"]}),F(Je,{onClick:OJ,children:[v(Mv,{}),"导入"]})]}),children:v(Je,{className:"icon-only-round-button size-26px",children:v(n0,{className:"size-16px"})})})]}),v(F2,{configPath:"filter.byTitle.keywords",searchProps:{placeholder:"添加过滤关键词"},disabled:!e||!a.enabled})]})]})})})}async function mee(){const e=Ue.filter.byAuthor.keywords,t=await ji(e,async n=>{const{mid:r,remark:o}=wp(n);return !r||!o||await Qu(r)!==o?n:r},1/0);return Bo(t,e)?ft.warning("没有「无效备注」数据!"):(Ue.filter.byAuthor.keywords=t,ft.success("已清理「无效备注」数据!"))}const s0="cursor-pointer rounded bg-gate-bg-lv-3 p-x-1 text-gate-primary",BR=v(r1,{className:"text-gate-primary [.ant-spin_.ant-spin-dot&]:size-25px"});function pee(){return F("div",{className:ur.tabPane,children:[v(Sn,{title:"视频播放页",children:v(lt,{configPath:"fav.useCustomFavPicker.onPlayPage",label:"使用自定义收藏弹窗",tooltip:F(we,{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:V(s0,"mx-1 h-14px py-0 line-height-14px"),children:"e"}),"触发"]})})]})]})})}),v(Sn,{title:"搜索页",children:v(lt,{configPath:"videoCard.videoPreview.addTo.searchPage",label:"浮动预览: 添加到「搜索页」",tooltip:v(we,{children:"在搜索页的视频也添加「浮动预览」"})})})]})}function hee(){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 Sp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Pl(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function hC(e){return "nodeType"in e}function Cr(e){var t,n;return e?Pl(e)?e:hC(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function gC(e){const{Document:t}=Cr(e);return e instanceof t}function Zu(e){return Pl(e)?false:e instanceof Cr(e).HTMLElement}function LR(e){return e instanceof Cr(e).SVGElement}function Nl(e){return e?Pl(e)?e.document:hC(e)?gC(e)?e:Zu(e)||LR(e)?e.ownerDocument:document:document:document}const zo=Sp?f.useLayoutEffect:f.useEffect;function bC(e){const t=f.useRef(e);return zo(()=>{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 gee(){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 au(e,t){t===void 0&&(t=[e]);const n=f.useRef(e);return zo(()=>{n.current!==e&&(n.current=e);},t),n}function Ju(e,t){const n=f.useRef();return f.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function pm(e){const t=bC(e),n=f.useRef(null),r=f.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o;},[]);return [n,r]}function a0(e){const t=f.useRef();return f.useEffect(()=>{t.current=e;},[e]),t.current}let xg={};function ed(e,t){return f.useMemo(()=>{if(t)return t;const n=xg[e]==null?0:xg[e]+1;return xg[e]=n,e+"-"+n},[e,t])}function DR(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 La=DR(1),hm=DR(-1);function bee(e){return "clientX"in e&&"clientY"in e}function vC(e){if(!e)return  false;const{KeyboardEvent:t}=Cr(e.target);return t&&e instanceof t}function vee(e){if(!e)return  false;const{TouchEvent:t}=Cr(e.target);return t&&e instanceof t}function l0(e){if(vee(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 bee(e)?{x:e.clientX,y:e.clientY}:null}const lu=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 [lu.Translate.toString(e),lu.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),B2="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function yee(e){return e.matches(B2)?e:e.querySelector(B2)}const Cee={display:"none"};function xee(e){let{id:t,value:n}=e;return f.createElement("div",{id:t,style:Cee},n)}function wee(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 See(){const[e,t]=f.useState("");return {announce:f.useCallback(r=>{r!=null&&t(r);},[]),announcement:e}}const kR=f.createContext(null);function $ee(e){const t=f.useContext(kR);f.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t]);}function Eee(){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 Iee={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.
  `},Pee={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 Nee(e){let{announcements:t=Pee,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Iee}=e;const{announce:i,announcement:s}=See(),a=ed("DndLiveRegion"),[l,c]=f.useState(false);if(f.useEffect(()=>{c(true);},[]),$ee(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(xee,{id:r,value:o.draggable}),f.createElement(wee,{id:a,announcement:s}));return n?vT.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 gm(){}function Mee(e,t){return f.useMemo(()=>({sensor:e,options:{}}),[e,t])}function Ree(){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 xo=Object.freeze({x:0,y:0});function Aee(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Tee(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Oee(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Fee(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function L2(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 Bee=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=L2(t,t.left,t.top),i=[];for(const s of r){const{id:a}=s,l=n.get(a);if(l){const c=Aee(L2(l),o);i.push({id:a,data:{droppableContainer:s,value:c}});}}return i.sort(Tee)};function Lee(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 Dee=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=Lee(a,t);l>0&&o.push({id:s,data:{droppableContainer:i,value:l}});}}return o.sort(Oee)};function kee(e,t,n){return {...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function _R(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:xo}function _ee(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 zee=_ee(1);function Hee(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 Vee(e,t,n){const r=Hee(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 jee={ignoreTransform:false};function Ml(e,t){t===void 0&&(t=jee);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:u}=Cr(e).getComputedStyle(e);c&&(n=Vee(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 D2(e){return Ml(e,{ignoreTransform:true})}function Wee(e){const t=e.innerWidth,n=e.innerHeight;return {top:0,left:0,right:t,bottom:n,width:t,height:n}}function qee(e,t){return t===void 0&&(t=Cr(e).getComputedStyle(e)),t.position==="fixed"}function Uee(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 yC(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(gC(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!Zu(o)||LR(o)||n.includes(o))return n;const i=Cr(e).getComputedStyle(o);return o!==e&&Uee(o,i)&&n.push(o),qee(o,i)?n:r(o.parentNode)}return e?r(e):n}function zR(e){const[t]=yC(e,1);return t??null}function wg(e){return !Sp||!e?null:Pl(e)?e:hC(e)?gC(e)||e===Nl(e).scrollingElement?window:Zu(e)?e:null:null}function HR(e){return Pl(e)?e.scrollX:e.scrollLeft}function VR(e){return Pl(e)?e.scrollY:e.scrollTop}function c0(e){return {x:HR(e),y:VR(e)}}var Nn;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward";})(Nn||(Nn={}));function jR(e){return !Sp||!e?false:e===document.scrollingElement}function WR(e){const t={x:0,y:0},n=jR(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 Gee={x:.2,y:.2};function Kee(e,t,n,r,o){let{top:i,left:s,right:a,bottom:l}=n;r===void 0&&(r=10),o===void 0&&(o=Gee);const{isTop:c,isBottom:u,isLeft:d,isRight:m}=WR(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 Xee(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 qR(e){return e.reduce((t,n)=>La(t,c0(n)),xo)}function Yee(e){return e.reduce((t,n)=>t+HR(n),0)}function Qee(e){return e.reduce((t,n)=>t+VR(n),0)}function Zee(e,t){if(t===void 0&&(t=Ml),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);zR(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"});}const Jee=[["x",["left","right"],Yee],["y",["top","bottom"],Qee]];class CC{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=yC(n),o=qR(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,s,a]of Jee)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 Ec{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 ete(e){const{EventTarget:t}=Cr(e);return e instanceof t?e:Nl(e)}function Sg(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 k2(e){e.preventDefault();}function tte(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 UR={start:[Wt.Space,Wt.Enter],cancel:[Wt.Esc],end:[Wt.Space,Wt.Enter,Wt.Tab]},nte=(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 GR{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 Ec(Nl(n)),this.windowListeners=new Ec(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&&Zee(r),n(xo);}handleKeyDown(t){if(vC(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:i=UR,coordinateGetter:s=nte,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}:xo;this.referenceCoordinates||(this.referenceCoordinates=u);const d=s(t,{active:n,context:r.current,currentCoordinates:u});if(d){const m=hm(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}=WR(g),$=Xee(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,La(hm(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();}}GR.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=UR,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 _2(e){return !!(e&&"distance"in e)}function z2(e){return !!(e&&"delay"in e)}class xC{constructor(t,n,r){var o;r===void 0&&(r=ete(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=Nl(s),this.documentListeners=new Ec(this.document),this.listeners=new Ec(r),this.windowListeners=new Ec(Cr(s)),this.initialCoordinates=(o=l0(i))!=null?o:xo,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,k2),this.windowListeners.add(Hr.VisibilityChange,this.handleCancel),this.windowListeners.add(Hr.ContextMenu,k2),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(z2(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(_2(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,tte,{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=l0(t))!=null?n:xo,c=hm(o,l);if(!r&&a){if(_2(a)){if(a.tolerance!=null&&Sg(c,a.tolerance))return this.handleCancel();if(Sg(c,a.distance))return this.handleStart()}if(z2(a)&&Sg(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 rte={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class wC extends xC{constructor(t){const{event:n}=t,r=Nl(n.target);super(t,rte,r);}}wC.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 ote={move:{name:"mousemove"},end:{name:"mouseup"}};var u0;(function(e){e[e.RightClick=2]="RightClick";})(u0||(u0={}));class ite extends xC{constructor(t){super(t,ote,Nl(t.event.target));}}ite.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===u0.RightClick?false:(r?.({event:n}),true)}}];const $g={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class ste extends xC{constructor(t){super(t,$g);}static setup(){return window.addEventListener($g.move.name,t,{capture:false,passive:false}),function(){window.removeEventListener($g.move.name,t);};function t(){}}}ste.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 Ic;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect";})(Ic||(Ic={}));var bm;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder";})(bm||(bm={}));function ate(e){let{acceleration:t,activator:n=Ic.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:s=5,order:a=bm.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:d,threshold:m}=e;const p=cte({delta:d,disabled:!i}),[h,g]=gee(),b=f.useRef({x:0,y:0}),y=f.useRef({x:0,y:0}),C=f.useMemo(()=>{switch(n){case Ic.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case Ic.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===bm.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}=Kee(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 lte={x:{[Nn.Backward]:false,[Nn.Forward]:false},y:{[Nn.Backward]:false,[Nn.Forward]:false}};function cte(e){let{delta:t,disabled:n}=e;const r=a0(t);return Ju(o=>{if(n||!r||!o)return lte;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 ute(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return Ju(o=>{var i;return t==null?null:(i=r??o)!=null?i:null},[r,t])}function dte(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 cu;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging";})(cu||(cu={}));var d0;(function(e){e.Optimized="optimized";})(d0||(d0={}));const H2=new Map;function fte(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=au(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=Ju(y=>{if(d&&!n)return H2;if(!y||y===H2||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 CC(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 cu.Always:return  false;case cu.BeforeDragging:return n;default:return !n}}}function KR(e,t){return Ju(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function mte(e,t){return KR(e,t)}function pte(e){let{callback:t,disabled:n}=e;const r=bC(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 $p(e){let{callback:t,disabled:n}=e;const r=bC(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 hte(e){return new CC(Ml(e),e)}function V2(e,t,n){t===void 0&&(t=hte);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=pte({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=$p({callback:i});return zo(()=>{i(),e?(a?.observe(e),s?.observe(document.body,{childList:true,subtree:true})):(a?.disconnect(),s?.disconnect());},[e]),r}function gte(e){const t=KR(e);return _R(e,t)}const j2=[];function bte(e){const t=f.useRef(e),n=Ju(r=>e?r&&r!==j2&&e&&t.current&&e.parentNode===t.current.parentNode?r:yC(e):j2,[e]);return f.useEffect(()=>{t.current=e;},[e]),n}function vte(e){const[t,n]=f.useState(null),r=f.useRef(e),o=f.useCallback(i=>{const s=wg(i.target);s&&n(a=>a?(a.set(s,c0(s)),new Map(a)):null);},[]);return f.useEffect(()=>{const i=r.current;if(e!==i){s(i);const a=e.map(l=>{const c=wg(l);return c?(c.addEventListener("scroll",o,{passive:true}),[c,c0(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=wg(l);c?.removeEventListener("scroll",o);});}},[o,e]),f.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,s)=>La(i,s),xo):qR(e):xo,[e,t])}function W2(e,t){t===void 0&&(t=[]);const n=f.useRef(null);return f.useEffect(()=>{n.current=null;},t),f.useEffect(()=>{const r=e!==xo;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null);},[e]),n.current?hm(e,n.current):xo}function yte(e){f.useEffect(()=>{if(!Sp)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 Cte(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 XR(e){return f.useMemo(()=>e?Wee(e):null,[e])}const q2=[];function xte(e,t){t===void 0&&(t=Ml);const[n]=e,r=XR(n?Cr(n):null),[o,i]=f.useState(q2);function s(){i(()=>e.length?e.map(l=>jR(l)?r:new CC(t(l),l)):q2);}const a=$p({callback:s});return zo(()=>{a?.disconnect(),s(),e.forEach(l=>a?.observe(l));},[e]),o}function wte(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Zu(t)?t:e}function Ste(e){let{measure:t}=e;const[n,r]=f.useState(null),o=f.useCallback(c=>{for(const{target:u}of c)if(Zu(u)){r(d=>{const m=t(u);return d?{...d,width:m.width,height:m.height}:m});break}},[t]),i=$p({callback:o}),s=f.useCallback(c=>{const u=wte(c);i?.disconnect(),u&&i?.observe(u),r(u?t(u):null);},[t,i]),[a,l]=pm(s);return f.useMemo(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}const $te=[{sensor:wC,options:{}},{sensor:GR,options:{}}],Ete={current:{}},Cf={draggable:{measure:D2},droppable:{measure:D2,strategy:cu.WhileDragging,frequency:d0.Optimized},dragOverlay:{measure:Ml}};class Pc 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 Ite={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Pc,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:gm},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Cf,measureDroppableContainers:gm,windowRect:null,measuringScheduled:false},Pte={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:gm,draggableNodes:new Map,over:null,measureDroppableContainers:gm},Ep=f.createContext(Pte),YR=f.createContext(Ite);function Nte(){return {draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Pc}}}function Mte(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 Pc(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 Pc(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 Pc(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Rte(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=f.useContext(Ep),i=a0(r),s=a0(n?.id);return f.useEffect(()=>{if(!t&&!r&&i&&s!=null){if(!vC(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=yee(u);if(d){d.focus();break}}});}},[r,t,o,s,i]),null}function Ate(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,i)=>i({transform:o,...r}),n):n}function Tte(e){return f.useMemo(()=>({draggable:{...Cf.draggable,...e?.draggable},droppable:{...Cf.droppable,...e?.droppable},dragOverlay:{...Cf.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Ote(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;zo(()=>{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=_R(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=zR(c);m&&m.scrollBy({top:d.y,left:d.x});}},[t,s,a,r,n]);}const QR=f.createContext({...xo,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 Fte=f.memo(function(t){var n,r,o,i;let{id:s,accessibility:a,autoScroll:l=true,children:c,sensors:u=$te,collisionDetection:d=Dee,measuring:m,modifiers:p,...h}=t;const g=f.useReducer(Mte,void 0,Nte),[b,y]=g,[C,x]=Eee(),[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}),D=f.useMemo(()=>{var nt;return $!=null?{id:$,data:(nt=N?.data)!=null?nt:Ete,rect:A}:null},[$,N]),R=f.useRef(null),[B,H]=f.useState(null),[k,z]=f.useState(null),_=au(h,Object.values(h)),W=ed("DndDescribedBy",s),O=f.useMemo(()=>M.getEnabled(),[M]),L=Tte(m),{droppableRects:j,measureDroppableContainers:Y,measuringScheduled:q}=fte(O,{dragging:I,dependencies:[P.x,P.y],config:L.droppable}),U=ute(E,$),K=f.useMemo(()=>k?l0(k):null,[k]),J=pt(),Q=mte(U,L.draggable.measure);Ote({activeNode:$!=null?E.get($):null,config:J.layoutShiftCompensation,initialRect:Q,measure:L.draggable.measure});const G=V2(U,L.draggable.measure,Q),ee=V2(U?U.parentElement:null),oe=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}),re=M.getNodeFor((n=oe.current.over)==null?void 0:n.id),he=Ste({measure:L.dragOverlay.measure}),Z=(r=he.nodeRef.current)!=null?r:U,te=I?(o=he.rect)!=null?o:G:null,ce=!!(he.nodeRef.current&&he.rect),ue=gte(ce?null:G),Ee=XR(Z?Cr(Z):null),Re=bte(I?re??U:null),be=xte(Re),le=Ate(p,{transform:{x:P.x-ue.x,y:P.y-ue.y,scaleX:1,scaleY:1},activatorEvent:k,active:D,activeNodeRect:G,containerNodeRect:ee,draggingNodeRect:te,over:oe.current.over,overlayNodeRect:he.rect,scrollableAncestors:Re,scrollableAncestorRects:be,windowRect:Ee}),ae=K?La(K,P):null,ye=vte(Re),Se=W2(ye),He=W2(ye,[G]),Le=La(le,Se),Ae=te?zee(te,le):null,_e=D&&Ae?d({active:D,collisionRect:Ae,droppableRects:j,droppableContainers:O,pointerCoordinates:ae}):null,Te=Fee(_e,"id"),[Ce,Pe]=f.useState(null),De=ce?le:La(le,He),Oe=kee(De,(i=Ce?.rect)!=null?i:null,G),Ne=f.useRef(null),Qe=f.useCallback((nt,et)=>{let{sensor:Xe,options:Ie}=et;if(R.current==null)return;const Me=E.get(R.current);if(!Me)return;const se=nt.nativeEvent,ge=new Xe({active:R.current,activeNode:Me,event:se,options:Ie,context:oe,onAbort(ie){if(!E.get(ie))return;const{onDragAbort:me}=_.current,xe={id:ie};me?.(xe),C({type:"onDragAbort",event:xe});},onPending(ie,ve,me,xe){if(!E.get(ie))return;const{onDragPending:qe}=_.current,Ze={id:ie,constraint:ve,initialCoordinates:me,offset:xe};qe?.(Ze),C({type:"onDragPending",event:Ze});},onStart(ie){const ve=R.current;if(ve==null)return;const me=E.get(ve);if(!me)return;const{onDragStart:xe}=_.current,ke={activatorEvent:se,active:{id:ve,data:me.data,rect:A}};vT.unstable_batchedUpdates(()=>{xe?.(ke),S(wi.Initializing),y({type:$n.DragStart,initialCoordinates:ie,active:ve}),C({type:"onDragStart",event:ke}),H(Ne.current),z(se);});},onMove(ie){y({type:$n.DragMove,coordinates:ie});},onEnd:fe($n.DragEnd),onCancel:fe($n.DragCancel)});Ne.current=ge;function fe(ie){return async function(){const{active:me,collisions:xe,over:ke,scrollAdjustedTranslate:qe}=oe.current;let Ze=null;if(me&&qe){const{cancelDrop:st}=_.current;Ze={activatorEvent:se,active:me,collisions:xe,delta:qe,over:ke},ie===$n.DragEnd&&typeof st=="function"&&await Promise.resolve(st(Ze))&&(ie=$n.DragCancel);}R.current=null,vT.unstable_batchedUpdates(()=>{y({type:ie}),S(wi.Uninitialized),Pe(null),H(null),z(null),Ne.current=null;const st=ie===$n.DragEnd?"onDragEnd":"onDragCancel";if(Ze){const Ct=_.current[st];Ct?.(Ze),C({type:st,event:Ze});}});}}},[E]),mt=f.useCallback((nt,et)=>(Xe,Ie)=>{const Me=Xe.nativeEvent,se=E.get(Ie);if(R.current!==null||!se||Me.dndKit||Me.defaultPrevented)return;const ge={active:se};nt(Xe,et.options,ge)===true&&(Me.dndKit={capturedBy:et.sensor},R.current=Ie,Qe(Xe,et));},[E,Qe]),it=dte(u,mt);yte(u),zo(()=>{G&&w===wi.Initializing&&S(wi.Initialized);},[G,w]),f.useEffect(()=>{const{onDragMove:nt}=_.current,{active:et,activatorEvent:Xe,collisions:Ie,over:Me}=oe.current;if(!et||!Xe)return;const se={active:et,activatorEvent:Xe,collisions:Ie,delta:{x:Le.x,y:Le.y},over:Me};vT.unstable_batchedUpdates(()=>{nt?.(se),C({type:"onDragMove",event:se});});},[Le.x,Le.y]),f.useEffect(()=>{const{active:nt,activatorEvent:et,collisions:Xe,droppableContainers:Ie,scrollAdjustedTranslate:Me}=oe.current;if(!nt||R.current==null||!et||!Me)return;const{onDragOver:se}=_.current,ge=Ie.get(Te),fe=ge&&ge.rect.current?{id:ge.id,rect:ge.rect.current,data:ge.data,disabled:ge.disabled}:null,ie={active:nt,activatorEvent:et,collisions:Xe,delta:{x:Me.x,y:Me.y},over:fe};vT.unstable_batchedUpdates(()=>{Pe(fe),se?.(ie),C({type:"onDragOver",event:ie});});},[Te]),zo(()=>{oe.current={activatorEvent:k,active:D,activeNode:U,collisionRect:Ae,collisions:_e,droppableRects:j,draggableNodes:E,draggingNode:Z,draggingNodeRect:te,droppableContainers:M,over:Ce,scrollableAncestors:Re,scrollAdjustedTranslate:Le},A.current={initial:te,translated:Ae};},[D,U,_e,Ae,E,Z,te,j,M,Ce,Re,Le]),ate({...J,delta:P,draggingRect:Ae,pointerCoordinates:ae,scrollableAncestors:Re,scrollableAncestorRects:be});const ct=f.useMemo(()=>({active:D,activeNode:U,activeNodeRect:G,activatorEvent:k,collisions:_e,containerNodeRect:ee,dragOverlay:he,draggableNodes:E,droppableContainers:M,droppableRects:j,over:Ce,measureDroppableContainers:Y,scrollableAncestors:Re,scrollableAncestorRects:be,measuringConfiguration:L,measuringScheduled:q,windowRect:Ee}),[D,U,G,k,_e,ee,he,E,M,j,Ce,Y,Re,be,L,q,Ee]),bt=f.useMemo(()=>({activatorEvent:k,activators:it,active:D,activeNodeRect:G,ariaDescribedById:{draggable:W},dispatch:y,draggableNodes:E,over:Ce,measureDroppableContainers:Y}),[k,it,D,G,y,W,E,Ce,Y]);return f.createElement(kR.Provider,{value:x},f.createElement(Ep.Provider,{value:bt},f.createElement(YR.Provider,{value:ct},f.createElement(QR.Provider,{value:Oe},c)),f.createElement(Rte,{disabled:a?.restoreFocus===false})),f.createElement(Nee,{...a,hiddenTextDescribedById:W}));function pt(){const nt=B?.autoScrollEnabled===false,et=typeof l=="object"?l.enabled===false:l===false,Xe=I&&!nt&&!et;return typeof l=="object"?{...l,enabled:Xe}:{enabled:Xe}}}),Bte=f.createContext(null),U2="button",Lte="Draggable";function Dte(e){let{id:t,data:n,disabled:r=false,attributes:o}=e;const i=ed(Lte),{activators:s,activatorEvent:a,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:d,over:m}=f.useContext(Ep),{role:p=U2,roleDescription:h="draggable",tabIndex:g=0}=o??{},b=l?.id===t,y=f.useContext(b?QR:Bte),[C,x]=pm(),[w,S]=pm(),I=Cte(s,t),$=au(n);zo(()=>(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===U2?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 kte(){return f.useContext(YR)}const _te="Droppable",zte={timeout:25};function Hte(e){let{data:t,disabled:n=false,id:r,resizeObserverConfig:o}=e;const i=ed(_te),{active:s,dispatch:a,over:l,measureDroppableContainers:c}=f.useContext(Ep),u=f.useRef({disabled:n}),d=f.useRef(false),m=f.useRef(null),p=f.useRef(null),{disabled:h,updateMeasurementsFor:g,timeout:b}={...zte,...o},y=au(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=$p({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]=pm(w),$=au(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 Vte(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 jte=e=>{let{containerNodeRect:t,draggingNodeRect:n,transform:r}=e;return !n||!t?r:Vte(r,n,t)},Wte=e=>{let{transform:t}=e;return {...t,x:0}};function SC(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function qte(e,t){return e.reduce((n,r,o)=>{const i=t.get(r);return i&&(n[o]=i),n},Array(e.length))}function Dd(e){return e!==null&&e>=0}function Ute(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 Gte(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const ZR=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=SC(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}},kd={scaleX:1,scaleY:1},Kte=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,...kd}:null}const l=Xte(i,o,n);return o>n&&o<=s?{x:0,y:-a.height-l,...kd}:o<n&&o>=s?{x:0,y:a.height+l,...kd}:{x:0,y:0,...kd}};function Xte(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 JR="Sortable",e4=f.createContext({activeIndex:-1,containerId:JR,disableTransforms:false,items:[],overIndex:-1,useDragOverlay:false,sortedRects:[],strategy:ZR,disabled:{draggable:false,droppable:false}});function Yte(e){let{children:t,id:n,items:r,strategy:o=ZR,disabled:i=false}=e;const{active:s,dragOverlay:a,droppableRects:l,over:c,measureDroppableContainers:u}=kte(),d=ed(JR,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=!Ute(p,y.current),x=b!==-1&&g===-1||C,w=Gte(i);zo(()=>{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:qte(p,l),strategy:o}),[g,d,w.draggable,w.droppable,x,p,b,l,m,o]);return f.createElement(e4.Provider,{value:S},t)}const Qte=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return SC(n,r,o).indexOf(t)},Zte=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},Jte={duration:200,easing:"ease"},t4="transform",ene=lu.Transition.toString({property:t4,duration:0,easing:"linear"}),tne={roleDescription:"sortable"};function nne(e){let{disabled:t,index:n,node:r,rect:o}=e;const[i,s]=f.useState(null),a=f.useRef(n);return zo(()=>{if(!t&&n!==a.current&&r.current){const l=o.current;if(l){const c=Ml(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 rne(e){let{animateLayoutChanges:t=Zte,attributes:n,disabled:r,data:o,getNewIndex:i=Qte,id:s,strategy:a,resizeObserverConfig:l,transition:c=Jte}=e;const{items:u,containerId:d,activeIndex:m,disabled:p,disableTransforms:h,sortedRects:g,overIndex:b,useDragOverlay:y,strategy:C}=f.useContext(e4),x=one(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}=Hte({id:s,data:S,disabled:x.droppable,resizeObserverConfig:{updateMeasurementsFor:I,...l}}),{active:N,activatorEvent:A,activeNodeRect:D,attributes:R,setNodeRef:B,listeners:H,isDragging:k,over:z,setActivatorNodeRef:_,transform:W}=Dte({id:s,data:S,attributes:{...tne,...n},disabled:x.draggable}),O=hee(M,B),L=!!N,j=L&&!h&&Dd(m)&&Dd(b),Y=!y&&k,q=Y&&j?W:null,K=j?q??(a??C)({rects:g,activeNodeRect:D,activeIndex:m,overIndex:b,index:w}):null,J=Dd(m)&&Dd(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,oe=t({active:N,containerId:d,isDragging:k,isSorting:L,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}),re=nne({disabled:!oe,index:w,node:E,rect:$});return f.useEffect(()=>{L&&G.current.newIndex!==J&&(G.current.newIndex=J),d!==G.current.containerId&&(G.current.containerId=d),u!==G.current.items&&(G.current.items=u);},[L,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:L,isDragging:k,listeners:H,node:E,overIndex:b,over:z,setNodeRef:O,setActivatorNodeRef:_,setDroppableNodeRef:M,setDraggableNodeRef:B,transform:re??K,transition:he()};function he(){if(re||ee&&G.current.newIndex===w)return ene;if(!(Y&&!vC(A)||!c)&&(L||oe))return lu.Transition.toString({...c,property:t4})}}function one(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 G2=(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}},$o=e=>e!==void 0?`${e}px`:void 0;function ine(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=G2($,c),M=G2(E,c);m(r),g(P),y(M),$&&E?s():a();}},[r]);const C=f__namespace.useMemo(()=>$o(c?h?.top??0:l==="rtl"?-h?.right:h?.left),[c,l,h]),x=f__namespace.useMemo(()=>$o(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(Jn,{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":$o(h?.width),"--thumb-active-left":x,"--thumb-active-width":$o(b?.width),"--thumb-start-top":C,"--thumb-start-height":$o(h?.height),"--thumb-active-top":x,"--thumb-active-height":$o(b?.height)},N={ref:In(u,P),style:M,className:V(`${t}-thumb`,$)};return f__namespace.createElement("div",N)})}function sne(e){if(typeof e.title<"u")return e.title;if(typeof e.label!="object")return e.label?.toString()}function ane(e){return e.map(t=>{if(typeof t=="object"&&t!==null){const n=sne(t);return {...t,title:n}}return {label:t?.toString(),title:t?.toString(),value:t}})}const lne=({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:V(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:V(`${e}-item-label`,o?.label),title:c,role:"radio","aria-checked":a,style:r?.label},l));return C(w,{item:i})},cne=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(()=>ane(i),[i]),[S,I]=Lt(a??w[0]?.value,l),[$,E]=f__namespace.useState(false),P=(L,j)=>{I(j),u?.(j);},M=Zt(y,["children"]),[N,A]=f__namespace.useState(false),[D,R]=f__namespace.useState(false),B=()=>{R(true);},H=()=>{R(false);},k=()=>{A(false);},z=L=>{L.key==="Tab"&&A(true);},_=L=>{const j=w.findIndex(K=>K.value===S),Y=w.length,q=(j+L+Y)%Y,U=w[q];U&&(I(U.value),u?.(U.value));},W=L=>{switch(L.key){case "ArrowLeft":case "ArrowUp":_(-1);break;case "ArrowRight":case "ArrowDown":_(1);break}},O=L=>{const{value:j,disabled:Y}=L;return f__namespace.createElement(lne,dn({},L,{name:c,data:L,itemRender:b,key:j,prefixCls:n,className:V(L.className,`${n}-item`,h?.item,{[`${n}-item-selected`]:j===S&&!$,[`${n}-item-focused`]:D&&N&&j===S}),style:p?.item,classNames:h,styles:p,checked:j===S,onChange:P,onFocus:B,onBlur:H,onKeyDown:W,onKeyUp:z,onMouseDown:k,disabled:!!s||!!Y}))};return f__namespace.createElement("div",dn({role:"radiogroup","aria-label":"segmented control",tabIndex:s?void 0:0,style:m},M,{className:V(n,{[`${n}-rtl`]:r==="rtl",[`${n}-disabled`]:s,[`${n}-vertical`]:o},d),ref:x}),f__namespace.createElement("div",{className:`${n}-group`},f__namespace.createElement(ine,{vertical:o,prefixCls:n,value:S,containerRef:C,motionName:`${n}-${g}`,direction:r,getValueIndex:L=>w.findIndex(j=>j.value===L),onMotionStart:()=>{E(true);},onMotionEnd:()=>{E(false);}}),w.map(O)))}),une=cne;function K2(e,t){return {[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}function X2(e){return {background:e.itemSelectedBg,boxShadow:e.boxShadowTertiary}}const dne={overflow:"hidden",...Do},fne=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]:{...Bt(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":{...X2(e),color:e.itemSelectedColor},"&-focused":ko(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)}`,...dne},"&-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`]:{...X2(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}},...K2(`&-disabled ${t}-item`,e),...K2(`${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}}}}},mne=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}},pne=wt("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 fne(r)},mne);function hne(e){return typeof e=="object"&&!!e?.icon}const gne=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}=$t("segmented"),$={...e,options:a,size:l,shape:m},[E,P]=It([S,g],[I,h],{props:$}),M=y("segmented",r),[N,A]=pne(M),D=Hn(l),R=f__namespace.useMemo(()=>a.map(_=>{if(hne(_)){const{icon:W,label:O,...L}=_;return {...L,label:f__namespace.createElement(f__namespace.Fragment,null,f__namespace.createElement("span",{className:V(`${M}-item-icon`,E.icon),style:P.icon},W),O&&f__namespace.createElement("span",null,O))}}return _}),[a,M,E.icon,P.icon]),[,B]=qs(d,u),H=V(o,i,x,E.root,{[`${M}-block`]:s,[`${M}-sm`]:D==="small",[`${M}-lg`]:D==="large",[`${M}-vertical`]:B,[`${M}-shape-${m}`]:m==="round"},N,A),k={...P.root,...w,...c},z=(_,{item:W})=>{if(!W.tooltip)return _;const O=typeof W.tooltip=="object"?W.tooltip:{title:W.tooltip};return f__namespace.createElement(Qi,{...O},_)};return f__namespace.createElement(une,{...b,name:p,className:H,style:k,classNames:E,styles:P,itemRender:z,options:R,ref:t,prefixCls:M,direction:C,vertical:B})}),n4=gne;async function r4({removeEmpty:e=true}={}){const t=await ep({web_location:"0.0",w_webid:await ER()||""}),o=(await Tt.get("/x/relation/tags",{params:t})).data.data||[];return e?o.filter(i=>!!i.count):o}async function f0(e){const n=async a=>(await Tt.get("/x/relation/tag",{params:{mid:Br(),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 B0(o.map(a=>a.mid))}async function bne(){return (await Tt.get("/x/polymer/web-dynamic/v1/portal")).data?.data?.up_list||[]}var Wr=(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))(Wr||{});const Ls=new URLSearchParams(location.search),os=Ls.get("dyn-mid")?.trim(),vne=Ls.get("dyn-offset")||void 0,o4=os&&(Ls.get("dyn-search-text")||Ls.get("dyn-search"))||void 0,m0=os?Ls.get("dyn-min-id"):void 0,Y2=m0?Ls.get("dyn-min-ts"):void 0,uu=Vo&&!!os;let p0,i4;uu&&(p0=os,i4=Ls.get("dyn-name")??p0?.toString()??void 0);var No=(e=>(e.All="all",e.UploadOnly="upload-only",e.DynamicOnly="dynamic-only",e))(No||{}),Fo=(e=>(e.Upload="投稿视频",e.Dynamic="动态视频",e.ChargeOnly="充电专属",e))(Fo||{});const yne={all:"全部","upload-only":"仅投稿视频","dynamic-only":"仅动态视频"};var Ps=(e=>(e.All="all",e._5m="5min",e._2m="2min",e._1m="1min",e._30s="30s",e._10s="10s",e))(Ps||{});const s4={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}},du="all",el="up:",Ds="group:",Cne=(await( L6("dynamic-feed:hide-charge-only-videos-for-keys"))).set,xne=(await( D6("dynamic-feed:add-separators"))).map,At=a4();function a4(){return rn({upMid:p0,upName:i4,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:o4??void 0,get viewingAll(){return this.selectedKey===du},get viewingSomeUp(){return !!this.upMid},get viewingSomeGroup(){return typeof this.selectedGroupId=="number"},get selectedKey(){return this.upMid?`${el}${this.upMid}`:this.selectedGroup?`${Ds}${this.selectedGroup.tagid}`:du},hideChargeOnlyVideosForKeysSet:Cne,get hideChargeOnlyVideos(){return this.hideChargeOnlyVideosForKeysSet.has(this.selectedKey)},addSeparatorsMap:xne,get addSeparators(){return this.addSeparatorsMap.get("global")??false},filterMinDuration:"all",get filterMinDurationValue(){return s4[this.filterMinDuration].duration},updateUpList:l4,updateGroups:c4})}rn({followGroupInfo:{}});async function l4(e=false){if(!e&&At.upList.length&&At.upListUpdatedAt&&At.upListUpdatedAt-Date.now()<Vn("5min"))return;const n=await bne();At.upList=n,At.upListUpdatedAt=Date.now();}async function c4(e=false){{const{followGroup:n,whenViewAll:r}=Ue.dynamicFeed;if(!(n.enabled||!!r.hideIds.filter(i=>i.startsWith(Ds)).length))return}!e&&At.groups.length&&At.groupsUpdatedAt&&At.groupsUpdatedAt-Date.now()<Vn("1h")||(At.groups=await r4({removeEmpty:true}),At.groupsUpdatedAt=Date.now());}function u4(){if(Br())return Promise.all([l4(),c4()])}(async()=>Vo&&(await zt(5e3),(!At.upList.length||!At.groups.length)&&(await ap(),u4())))();os&&B6(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}`),v1(i);});const wne=Object.prototype.toString,Sne=e=>wne.call(e)==="[object Error]",$ne=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 Ene(e){return e&&Sne(e)&&e.name==="TypeError"&&typeof e.message=="string"?e.message==="Load failed"?e.stack===void 0:$ne.has(e.message):false}function Ine(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 _d(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 Pne 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 Nne(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 Q2(e,t){return Number.isFinite(t)?t-(performance.now()-e):t}async function Mne({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 Pne)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),Q2(r,a)<=0)throw i;const c=await o.shouldConsumeRetry(l),u=Q2(r,a);if(u<=0||s<=0)throw i;if(i instanceof TypeError&&!Ene(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=Nne(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 d4(e,t={}){if(t={...t},Ine(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,_d("factor",t.factor,{min:0,allowInfinity:false}),_d("minTimeout",t.minTimeout,{min:0,allowInfinity:false}),_d("maxTimeout",t.maxTimeout,{min:0,allowInfinity:true}),_d("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 Mne({error:i,attemptNumber:n,retriesConsumed:r,startTime:o,options:t})&&r++;}}throw new Error("Retry attempts exhausted without throwing an error.")}var Zo=(e=>(e.Latest="pubdate",e.View="click",e.Fav="stow",e))(Zo||{});const Rne={pubdate:{icon:v(Zc,{}),label:"最新发布"},click:{icon:v(ku,{}),label:"最多播放"},stow:{icon:v(Oi,{}),label:"最多收藏"}},Ane=40;async function Tne({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:Ane,pn:r}})).data;if(!cn(i))throw new Error(`request json error: ${i.message}`||Su);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 One(...e){return await d4(()=>Tne(...e),{retries:5,factor:1.5,onFailedAttempt:t=>console.error(t)})}var Jo=(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))(Jo||{});const td=new URLSearchParams(location.search),Fne=td.get("space-mid")||void 0,Z2=td.get("space-group-id")||void 0,Bne=td.get("space-search-text")||void 0,Lne=td.get("space-filter-text")||void 0,J2=td.get("space-initial-page")||void 0,f4=(Fne||"").split(/[,_-]/).map(e=>e.trim()).filter(Boolean).filter(e=>/^\d+$/.test(e)),m4=Z2?Number(Z2):void 0,fu=!!(f4.length||m4),oo=rn({mids:f4,groupId:m4,order:Zo.Latest,searchText:Bne,filterText:Lne,get isMultipleTraget(){return this.mids.length>1||!!this.groupId},get allowedOrders(){return [Zo.Latest,Zo.View,!this.isMultipleTraget&&Zo.Fav].filter(Boolean)},get usingOrder(){return this.allowedOrders.includes(this.order)?this.order:this.allowedOrders[0]}}),nd=await( Zy({value:ze.AppRecommend},"video-source-tab"));uu&&(nd.value=ze.DynamicFeed);Ja&&(nd.value=ze.Fav);fu&&(nd.value=ze.SpaceUpload);function p4(e){return Fy.slice().sort((t,n)=>{let r=e.indexOf(t),o=e.indexOf(n);return r===-1&&(r=kb.indexOf(t)),o===-1&&(o=kb.indexOf(n)),r-o})}function $C(){const{customTabKeysOrder:e}=Mt();return f.useMemo(()=>p4(e),[e])}function h4(){const{hidingTabKeys:e,customTabKeysOrder:t}=Mt(),n=p1(),r=f.useMemo(()=>p4(t).filter(i=>i===ze.AppRecommend&&!n||i===ze.DynamicFeed&&uu||i===ze.Fav&&Ja?true:i===ze.SpaceUpload&&!fu?false:!e.includes(i)),[e,t,n]);return uu&&r.includes(ze.DynamicFeed)?[ze.DynamicFeed]:Ja&&r.includes(ze.Fav)?[ze.Fav]:fu?[ze.SpaceUpload]:r}function Dne(){const e=h4();return f.useMemo(()=>e.map(t=>({key:t,...Sl[t]})),[e])}function Ip(){const e=rt(nd).value,t=h4(),n=p1(),r=ze.AppRecommend;return !t.includes(e)||!n&&!Sl[e].anonymousUsage?r:e}function EC(){const e=f.useDeferredValue(Ip()),t=N1(e),n=$C(),r=f.useMemo(()=>t?n.indexOf(e)>n.indexOf(t)?"right":"left":void 0,[n,e]);return {tab:e,prevTab:t,direction:r}}const kne={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 g4(){const e=p1(),t=Ip(),n=Dne(),{__internalRecTabRenderAsSegments:r}=Mt();jn();const o=We(a=>{if(!e&&!Sl[a].anonymousUsage&&!rN())return sR();nd.value=a;}),i=v(fr.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(fr.Button,{css:kne,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(n4,{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(we,{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 tl(e){return e.api===$e.AppRecommend}function Pp(e){return e.api===$e.PcRecommend}function vm(e){return e.api===$e.DynamicFeed}function Np(e){return e.api===$e.Watchlater}function ks(e){return e.api===$e.Fav}function _ne(e){return e.api===$e.PopularGeneral}function zne(e){return e.api===$e.PopularWeekly}function IC(e){return e.api===$e.Rank}function mu(e){return e.api===$e.Live}function PC(e){return e.api===$e.SpaceUpload}async function b4(e,t){const n=Br(),r=Qs(),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:Hne()}),csrf:r}),s=(await Tt.post("/x/relation/modify",o)).data,a=cn(s);return a||_t(s.message||"未知错误"),a}function Hne(){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 Vne=zn.extend("service:user:relations:blacklist"),jne=y4("follow"),Wne=y4("remove"),v4={add:jne,remove:Wne},{set:pu,replaceAllWith:qne}=await( L6("blacklist-mids"));function Une(e){const t=rt(pu);return !!e&&t.has(e)}function y4(e){const t=e==="follow"?5:6;return async function(r){const o=await b4(r,t);if(o){const i=pu;e==="follow"?i.add(r):e==="remove"&&i.delete(r);}return o}}async function Gne(){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(!Vo)return;await ap();const e=await Gne();Vne("user blocklist fetched: %o",e),e&&qne(e.map(t=>t.toString()));})();var C4=23442827791579n,Kne=2251799813685247n,Xne=1n<<51n,h0=58n,x4="FcwAPNKTMug3GV5Lj7EJnHpWsx4tb8haYeviqBz6rkCy12mUSDQX9RdoZf";function Yne(e){const t=["B","V","1","0","0","0","0","0","0","0","0","0"];let n=t.length-1,r=(Xne|BigInt(e))^C4;for(;r>0;)t[n]=x4[Number(r%BigInt(h0))],r=r/h0,n-=1;return [t[3],t[9]]=[t[9],t[3]],[t[4],t[7]]=[t[7],t[4]],t.join("")}function Qne(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*h0+BigInt(x4.indexOf(o)),0n);return Number(n&Kne^C4)}var w4={av2bv:Yne,bv2av:Qne};const Zne=Xs(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"})]})),Jne=Xs(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"})]})),ere=Xs(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 NC(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 is(e){return e||=0,nn.duration(e||0,"seconds").format(e>=3600?"HH:mm:ss":"mm:ss")}function tre(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 Nc(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 nre=nn().format("YYYY");function xf(e,t=false){if(!e)return "";const n=nn.unix(e),r=t?" HH:mm":"";return n.format("YYYY")===nre?n.format(`M-D${r}`):n.format(`YY-M-D${r}`)}function rre(e){const t=nn().subtract(1,"day").startOf("day").unix();return e>=t}function ore(e,t){if(!e)return;const n=nn.unix(e),r=n.format("YYYY-MM-DD")===nn().format("YYYY-MM-DD"),o=r&&Date.now()-e*1e3<=Vn("12h"),i=n.format("YYYY-MM-DD")===nn().subtract(1,"day").format("YYYY-MM-DD"),s=n.format("YYYY")===nn().format("YYYY");if(o){const a=nn().diff(n,"minutes"),l=nn().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 ire={1:"橙色通过",0:"开放浏览","-1":"待审","-2":"被打回","-3":"网警锁定","-4":"被锁定","-5":"管理员锁定","-6":"修复待审","-7":"暂缓审核","-8":"补档待审","-9":"等待转码","-10":"延迟审核","-11":"视频源待修","-12":"转储失败","-13":"允许评论待审","-14":"临时回收站","-15":"分发中","-16":"转码失败","-20":"创建未提交","-30":"创建已提交","-40":"定时发布","-100":"用户删除"};function sre(e){if(e!==void 0&&!(e>=0))return ire[e]}const are=({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"})]}),lre=f.forwardRef(are),cre=({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"})]}),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,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"})]})]}),fre=f.forwardRef(dre),mre=({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"})]})]}),pre=f.forwardRef(mre);const eE="size-18px",Yl="size-16px",hre={play:v(Zne,{className:eE}),danmaku:v(Jne,{className:eE}),like:v(lre,{className:Yl}),"bangumi:follow":v(ure,{className:Yl}),favorite:v(Oi,{className:Yl}),coin:v(fre,{className:Yl}),"live:viewed-by":v(pre,{className:Yl})},gre=f.memo(function({field:e,value:t}){const n=f.useMemo(()=>typeof t=="number"||t&&/^\d+$/.test(t)?tre(Number(t))??yS:t??yS,[t]),r=hre[e];return F("span",{"data-field":e,className:"bili-video-card__stats--item gap-x-2px mr-0!",children:[r,v("span",{className:V("bili-video-card__stats--text line-height-18px"),children:n})]})});var Fi=(e=>(e.AV="av",e.Ad="ad",e.Live="live",e))(Fi||{});const ym=e=>{const t=new Map;return e.forEach((n,r)=>{t.set(n,r);}),t},bre=e=>{const t=new Map;return e.forEach(({disabled:n,key:r},o)=>{n&&t.set(r,o);}),t};function vre(e,t){const n=e==="right";return t!=="rtl"?n?f.createElement(Xa,null):f.createElement(ou,null):n?f.createElement(ou,null):f.createElement(Xa,null)}const tE=({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=vre(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)},S4=e=>{const{className:t,style:n,oneWay:r,actions:o,...i}=e;return f.createElement("div",{className:t,style:n},f.createElement(tE,{type:"right",actions:o,...i}),!r&&f.createElement(tE,{type:"left",actions:o,...i}),o.slice(r?1:2))},yre=(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=ym(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)]},Cre=[];function zd(e,t){const n=e.filter(r=>t.has(r));return e.length===n.length?e:n}function nE(e){return Array.from(e).join(";")}function xre(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]=Lt(Cre,n),a=f__namespace.useMemo(()=>zd(i,r),[i,r]),l=f__namespace.useMemo(()=>zd(i,o),[i,o]);f__namespace.useEffect(()=>{s([].concat(Et(zd(i,r)),Et(zd(i,o))));},[nE(r),nE(o)]);const c=at(d=>{s([].concat(Et(d),Et(l)));}),u=at(d=>{s([].concat(Et(a),Et(d)));});return [a,l,c,u]}const $4=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(Il,{placeholder:t,className:r,value:n,onChange:a,disabled:o,allowClear:true,prefix:f__namespace.createElement(Y1,null)})},wre={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:"页码"},Sre=[10,20,50,100],$re=e=>{const{pageSizeOptions:t=Sre,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===je.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)},Ql=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=V(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 Ere=(e,t,n)=>n;function rE(){}function oE(e){const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function ds(e,t,n){const r=typeof e>"u"?t:e;return Math.floor((n-1)/r)+1}const Ire=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=rE,hideOnSinglePage:m,align:p,showPrevNextJumpers:h=true,showQuickJumper:g,showLessItems:b,showTitle:y=true,onShowSizeChange:C=rE,locale:x=wre,style:w,totalBoundaryShowSizeChanger:S=50,disabled:I,simple:$,showTotal:E,showSizeChanger:P=l>S,sizeChangerRender:M,pageSizeOptions:N,itemRender:A=Ere,jumpPrevIcon:D,jumpNextIcon:R,prevIcon:B,nextIcon:H}=e,k=f.useRef(null),[z,_]=Lt(u,c),[W,O]=Lt(a,s),L=Math.max(1,Math.min(W,ds(void 0,z,l))),[j,Y]=f.useState(L);f.useEffect(()=>{Y(L);},[L]);const q=Math.max(1,L-(b?3:5)),U=Math.min(ds(void 0,z,l),L+(b?3:5));function K(se,ge){let fe=se||f.createElement("button",{type:"button","aria-label":ge,className:`${t}-item-link`});return typeof se=="function"&&(fe=f.createElement(se,e)),fe}function J(se){const ge=se.target.value,fe=ds(void 0,z,l);let ie;return ge===""?ie=ge:Number.isNaN(Number(ge))?ie=j:ge>=fe?ie=fe:ie=Number(ge),ie}function Q(se){return oE(se)&&se!==L&&oE(l)&&l>0}const G=l>z?g:false;function ee(se){(se.keyCode===je.UP||se.keyCode===je.DOWN)&&se.preventDefault();}function oe(se){const ge=J(se);switch(ge!==j&&Y(ge),se.keyCode){case je.ENTER:Z(ge);break;case je.UP:Z(ge-1);break;case je.DOWN:Z(ge+1);break}}function re(se){Z(J(se));}function he(se){const ge=ds(se,z,l),fe=L>ge&&ge!==0?ge:L;_(se),Y(fe),C?.(L,se),O(fe),d?.(fe,se);}function Z(se){if(Q(se)&&!I){const ge=ds(void 0,z,l);let fe=se;return se>ge?fe=ge:se<1&&(fe=1),fe!==j&&Y(fe),O(fe),d?.(fe,z),fe}return L}const te=L>1,ce=L<ds(void 0,z,l);function ue(){te&&Z(L-1);}function Ee(){ce&&Z(L+1);}function Re(){Z(q);}function be(){Z(U);}function le(se,ge,...fe){(se.key==="Enter"||se.charCode===je.ENTER||se.keyCode===je.ENTER)&&ge(...fe);}function ae(se){le(se,ue);}function ye(se){le(se,Ee);}function Se(se){le(se,Re);}function He(se){le(se,be);}function Le(se){const ge=A(se,"prev",K(B,"prev page"));return f.isValidElement(ge)?f.cloneElement(ge,{disabled:!te}):ge}function Ae(se){const ge=A(se,"next",K(H,"next page"));return f.isValidElement(ge)?f.cloneElement(ge,{disabled:!ce}):ge}function _e(se){(se.type==="click"||se.keyCode===je.ENTER)&&Z(j);}let Te=null;const Ce=rr(e,{aria:true,data:true}),Pe=E&&f.createElement("li",{className:`${t}-total-text`},E(l,[l===0?0:(L-1)*z+1,L*z>l?l:L*z]));let De=null;const Oe=ds(void 0,z,l);if(m&&l<=z)return null;const Ne=[],Qe={rootPrefixCls:t,onClick:Z,onKeyPress:le,showTitle:y,itemRender:A,page:-1,className:o?.item,style:i?.item},mt=L-1>0?L-1:0,it=L+1<Oe?L+1:Oe,ct=g&&g.goButton,bt=typeof $=="object"?$.readOnly:!$;let pt=ct,nt=null;$&&(ct&&(typeof ct=="boolean"?pt=f.createElement("button",{type:"button",onClick:_e,onKeyUp:_e},x.jump_to_confirm):pt=f.createElement("span",{onClick:_e,onKeyUp:_e},ct),pt=f.createElement("li",{title:y?`${x.jump_to}${L}/${Oe}`:null,className:`${t}-simple-pager`},pt)),nt=f.createElement("li",{title:y?`${L}/${Oe}`:null,className:V(`${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:oe,onChange:oe,onBlur:re,size:3}),f.createElement("span",{className:`${t}-slash`},"/"),Oe));const et=b?1:2;if(Oe<=3+et*2){Oe||Ne.push(f.createElement(Ql,Si({},Qe,{key:"noPager",page:1,className:`${t}-item-disabled`})));for(let se=1;se<=Oe;se+=1)Ne.push(f.createElement(Ql,Si({},Qe,{key:se,page:se,active:L===se})));}else {const se=b?x.prev_3:x.prev_5,ge=b?x.next_3:x.next_5,fe=A(q,"jump-prev",K(D,"prev page")),ie=A(U,"jump-next",K(R,"next page"));h&&(Te=fe?f.createElement("li",{title:y?se:null,key:"prev",onClick:Re,tabIndex:0,onKeyDown:Se,className:V(`${t}-jump-prev`,{[`${t}-jump-prev-custom-icon`]:!!D})},fe):null,De=ie?f.createElement("li",{title:y?ge:null,key:"next",onClick:be,tabIndex:0,onKeyDown:He,className:V(`${t}-jump-next`,{[`${t}-jump-next-custom-icon`]:!!R})},ie):null);let ve=Math.max(1,L-et),me=Math.min(L+et,Oe);L-1<=et&&(me=1+et*2),Oe-L<=et&&(ve=Oe-et*2);for(let xe=ve;xe<=me;xe+=1)Ne.push(f.createElement(Ql,Si({},Qe,{key:xe,page:xe,active:L===xe})));if(L-1>=et*2&&L!==3&&(Ne[0]=f.cloneElement(Ne[0],{className:V(`${t}-item-after-jump-prev`,Ne[0].props.className)}),Ne.unshift(Te)),Oe-L>=et*2&&L!==Oe-2){const xe=Ne[Ne.length-1];Ne[Ne.length-1]=f.cloneElement(xe,{className:V(`${t}-item-before-jump-next`,xe.props.className)}),Ne.push(De);}ve!==1&&Ne.unshift(f.createElement(Ql,Si({},Qe,{key:1,page:1}))),me!==Oe&&Ne.push(f.createElement(Ql,Si({},Qe,{key:Oe,page:Oe})));}let Xe=Le(mt);if(Xe){const se=!te||!Oe;Xe=f.createElement("li",{title:y?x.prev_page:null,onClick:ue,tabIndex:se?null:0,onKeyDown:ae,className:V(`${t}-prev`,o?.item,{[`${t}-disabled`]:se}),style:i?.item,"aria-disabled":se},Xe);}let Ie=Ae(it);if(Ie){let se,ge;$?(se=!ce,ge=te?0:null):(se=!ce||!Oe,ge=se?null:0),Ie=f.createElement("li",{title:y?x.next_page:null,onClick:Ee,tabIndex:ge,onKeyDown:ye,className:V(`${t}-next`,o?.item,{[`${t}-disabled`]:se}),style:i?.item,"aria-disabled":se},Ie);}const Me=V(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:Me,style:w,ref:k},Ce),Pe,Xe,$?nt:Ne,Ie,f.createElement($re,{locale:x,rootPrefixCls:t,disabled:I,selectPrefixCls:n,changeSize:he,pageSize:z,pageSizeOptions:N,quickGo:G?Z:null,goButton:pt,showSizeChanger:P,sizeChangerRender:M}))},E4=["xxl","xl","lg","md","sm","xs"],Pre=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)`}),Nre=e=>{const t=e,n=[].concat(E4).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},Mre=()=>{const[,e]=Tn(),t=Pre(Nre(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 I4(e=true,t={}){const n=f.useRef(t),[,r]=W3(),o=Mre();return Kt(()=>{const i=o.subscribe(s=>{n.current=s,e&&r();});return ()=>o.unsubscribe(i)},[]),n.current}const Rre=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}}}}},Are=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:{...mC(e),width:e.paginationMiniQuickJumperInputWidth,height:e.controlHeightSM}}}}},Tre=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}}}}}},Ore=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:{...xp(e),...fC(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow}),"&[disabled]":{...Cp(e)},width:e.quickJumperInputWidth,height:e.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:e.marginXS,marginInlineEnd:e.marginXS}}}}},Fre=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}}}}},Bre=e=>{const{componentCls:t}=e;return {[t]:{...Bt(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"},...Fre(e),...Ore(e),...Tre(e),...Are(e),...Rre(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"}}},Lre=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},...ko(e)}},[`${t}-prev, ${t}-next`]:{[`&:focus-visible ${t}-item-link`]:ko(e)}}}},P4=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,...El(e)}),N4=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"},$l(e)),Dre=wt("Pagination",e=>{const t=N4(e);return [Bre(t),Lre(t)]},P4),kre=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}}}}},_re=ll(["Pagination","bordered"],e=>{const t=N4(e);return kre(t)},P4);function iE(e){return f.useMemo(()=>typeof e=="boolean"?[e,{}]:e&&typeof e=="object"?[true,e]:[void 0,void 0],[e])}const zre=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}=I4(c),[,y]=Tn(),{getPrefixCls:C,direction:x,showSizeChanger:w,className:S,style:I,classNames:$,styles:E}=$t("pagination"),P=C("pagination",n),[M,N]=Dre(P),A=Hn(a),D=A==="small"||!!(b&&!A&&c),R={...e,size:A},[B,H]=It([$,h],[E,p],{props:R}),[k]=ir("Pagination",_3),z={...k,...l},[_,W]=iE(u),[O,L]=iE(w),j=_??O,Y=W??L,q=d||es,U=f__namespace.useMemo(()=>m?m.map(oe=>Number(oe)):void 0,[m]),K=oe=>{const{disabled:re,size:he,onSizeChange:Z,"aria-label":te,className:ce,options:ue}=oe,{className:Ee,onChange:Re}=Y||{},be=ue.find(le=>String(le.value)===String(he))?.value;return f__namespace.createElement(q,{disabled:re,showSearch:true,popupMatchSelectWidth:false,getPopupContainer:le=>le.parentNode,"aria-label":te,options:ue,...Y,value:be,onChange:(le,ae)=>{Z?.(le),Re?.(le,ae);},size:D?"small":"middle",className:V(ce,Ee)})},J=f__namespace.useMemo(()=>{const oe=f__namespace.createElement("span",{className:`${P}-item-ellipsis`},"•••"),re=f__namespace.createElement("button",{className:`${P}-item-link`,type:"button",tabIndex:-1},x==="rtl"?f__namespace.createElement(Xa,null):f__namespace.createElement(ou,null)),he=f__namespace.createElement("button",{className:`${P}-item-link`,type:"button",tabIndex:-1},x==="rtl"?f__namespace.createElement(ou,null):f__namespace.createElement(Xa,null)),Z=f__namespace.createElement("a",{className:`${P}-item-link`},f__namespace.createElement("div",{className:`${P}-item-container`},x==="rtl"?f__namespace.createElement(x2,{className:`${P}-item-link-icon`}):f__namespace.createElement(C2,{className:`${P}-item-link-icon`}),oe)),te=f__namespace.createElement("a",{className:`${P}-item-link`},f__namespace.createElement("div",{className:`${P}-item-container`},x==="rtl"?f__namespace.createElement(C2,{className:`${P}-item-link-icon`}):f__namespace.createElement(x2,{className:`${P}-item-link-icon`}),oe));return {prevIcon:re,nextIcon:he,jumpPrevIcon:Z,jumpNextIcon:te}},[x,P]),Q=C("select",r),G=V({[`${P}-${t}`]:!!t,[`${P}-mini`]:D,[`${P}-rtl`]:x==="rtl",[`${P}-bordered`]:y.wireframe},S,o,i,B.root,M,N),ee={...H.root,...I,...s};return f__namespace.createElement(f__namespace.Fragment,null,y.wireframe&&f__namespace.createElement(_re,{prefixCls:P}),f__namespace.createElement(Ire,{...J,...g,styles:H,classNames:B,style:ee,prefixCls:P,selectPrefixCls:Q,className:G,locale:z,pageSizeOptions:U,showSizeChanger:j,sizeChangerRender:K}))},Hre=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=V(`${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]=ir("Transfer",ho.Transfer),g={className:m,style:r.item,title:p},b=f__namespace.createElement("span",{className:V(`${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(LZ,null))):(g.onClick=l||s.disabled?void 0:y=>c(s,y),f__namespace.createElement("li",{...g},f__namespace.createElement(Zr,{className:V(`${t}-checkbox`,n.itemIcon),style:r.itemIcon,checked:a,disabled:l||s.disabled}),b))},Vre=f__namespace.memo(Hre),jre=["handleFilter","handleClear","checkedKeys"],Wre=e=>({...{simple:true,showSizeChanger:false,showLessItems:false},...e}),qre=(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?Wre(typeof c=="object"?c:{}):null,[c]),[b,y]=Lt(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(zre,{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:V(`${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(Vre,{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}))),$)},Ure=f__namespace.forwardRef(qre),Gre=()=>null;function Kre(e){return !!(e&&!f.isValidElement(e)&&Object.prototype.toString.call(e)==="[object Object]")}function Zl(e){return e.filter(t=>!t.disabled).map(t=>t.key)}const Xre=e=>e!==void 0,Yre=e=>e&&typeof e=="object"?{...e,defaultValue:e.defaultValue||""}:{defaultValue:"",placeholder:""},g0=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:D,handleFilter:R,handleClear:B,filterOption:H,render:k=Gre}=e,z=`${t}-section`,_=`${t}-list`,W=Yre(c),[O,L]=f.useState(W.defaultValue),j=f.useRef({}),Y=le=>{L(le.target.value),R(le);},q=()=>{L(""),B();},U=(le,ae)=>typeof H=="function"?H(O,ae,S):le.includes(O),K=le=>{let ae=N?N({...le,onItemSelect:(Se,He)=>le.onItemSelect(Se,He)}):null;const ye=!!ae;return ye||(ae=f.createElement(Ure,{ref:j,...le,prefixCls:_})),{customize:ye,bodyContent:ae}},J=le=>{const ae=k(le),ye=Kre(ae);return {item:le,renderedEl:ye?ae.label:ae,renderedText:ye?ae.value:ae}},Q=f.useMemo(()=>Array.isArray(d)?d[S==="left"?0:1]:d,[d,S]),[G,ee]=f.useMemo(()=>{const le=[],ae=[];return i.forEach(ye=>{const Se=J(ye);O&&!U(Se.renderedText,ye)||(le.push(ye),ae.push(Se));}),[le,ae]},[i,O]),oe=f.useMemo(()=>G.filter(le=>a.includes(le.key)&&!le.disabled),[a,G]),re=f.useMemo(()=>{if(oe.length===0)return "none";const le=ym(a);return G.every(ae=>le.has(ae.key)||!!ae.disabled)?"all":"part"},[oe.length,a,G]),he=()=>{const le=c?f.createElement("div",{className:`${_}-body-search-wrapper`},f.createElement($4,{prefixCls:`${_}-search`,onChange:Y,handleClear:q,placeholder:W.placeholder||u,value:O,disabled:l})):null,{customize:ae,bodyContent:ye}=K({...Zt(e,jre),filteredItems:G,filteredRenderItems:ee,selectedKeys:a,classNames:r,styles:o});let Se;return ae?Se=f.createElement("div",{className:`${_}-body-customize-wrapper`},ye):Se=G.length?ye:f.createElement("div",{className:`${_}-body-not-found`},Q),f.createElement("div",{className:V(`${_}-body`,{[`${_}-body-with-search`]:c},r.body),style:o.body},le,Se)},Z=f.createElement(Zr,{disabled:i.filter(le=>!le.disabled).length===0||l,checked:re==="all",indeterminate:re==="part",className:`${_}-checkbox`,onChange:()=>{A?.(G.filter(le=>!le.disabled).map(({key:le})=>le),re!=="all");}}),te=(le,ae)=>{if(E)return typeof E=="function"?E({selectedCount:le,totalCount:ae}):E;const ye=ae>1?I:$;return f.createElement(f.Fragment,null,(le>0?`${le}/`:"")+ae," ",ye)},ce=M&&(M.length<2?M(e):M(e,{direction:S})),ue=ce?f.createElement("div",{className:V(`${_}-footer`,r.footer),style:o.footer},ce):null,Ee=!x&&!w&&Z;let Re;x?Re=[w?{key:"removeCurrent",label:y,onClick(){const le=Zl((j.current?.items||[]).map(ae=>ae.item));D?.(le);}}:null,{key:"removeAll",label:b,onClick(){D?.(Zl(G));}}].filter(Boolean):Re=[{key:"selectAll",label:re==="all"?p:m,onClick(){const le=Zl(G);A?.(le,le.length!==a.length);}},w?{key:"selectCurrent",label:h,onClick(){const le=j.current?.items||[];A?.(Zl(le.map(ae=>ae.item)),true);}}:null,{key:"selectInvert",label:g,onClick(){const le=Zl((j.current?.items||[]).map(Se=>Se.item)),ae=new Set(a),ye=new Set(ae);le.forEach(Se=>{ae.has(Se)?ye.delete(Se):ye.add(Se);}),A?.(Array.from(ye),"replace");}}];const be=f.createElement(rs,{className:`${_}-header-dropdown`,menu:{items:Re},disabled:l},Xre(P)?P:f.createElement(X1,null));return f.createElement("div",{className:V(z,r.section,{[`${z}-with-pagination`]:!!w,[`${z}-with-footer`]:!!ce}),style:{...n,...o.section}},f.createElement("div",{className:V(`${_}-header`,r.header),style:o.header},C?f.createElement(f.Fragment,null,Ee,be):null,f.createElement("span",{className:`${_}-header-selected`},te(oe.length,G.length)),f.createElement("span",{className:V(`${_}-header-title`,r.title),style:o.title},s)),he(),ue)},Qre=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"}}}},sE=(e,t)=>{const{componentCls:n,colorBorder:r}=e;return {[`${n}-section`]:{borderColor:t,[`${n}-list-search:not([disabled])`]:{borderColor:r}}}},Zre=e=>{const{componentCls:t}=e;return {[`${t}-status-error`]:{...sE(e,e.colorError)},[`${t}-status-warning`]:{...sE(e,e.colorWarning)}}},Jre=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":{...Do,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":{...Do,flex:"auto"},"&-remove":{...rB(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}}}},eoe=e=>{const{antCls:t,iconCls:n,componentCls:r,marginXS:o,marginXXS:i,fontSizeIcon:s,colorBgContainerDisabled:a}=e;return {[r]:{...Bt(e),position:"relative",display:"flex",alignItems:"stretch",[`${r}-disabled`]:{[`${r}-section`]:{background:a}},[`${r}-section`]:Jre(e),[`${r}-actions`]:{display:"flex",flex:"none",flexDirection:"column",alignSelf:"center",margin:`0 ${X(o)}`,verticalAlign:"middle",gap:i,[`${t}-btn ${n}`]:{fontSize:s}}}}},toe=e=>{const{componentCls:t}=e;return {[`${t}-rtl`]:{direction:"rtl"}}},noe=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)}},roe=wt("Transfer",e=>{const t=vt(e);return [eoe(t),Qre(t),Zre(t),toe(t)]},noe),Mp=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:D,onChange:R,onSearch:B,onSelectChange:H}=e,{getPrefixCls:k,renderEmpty:z,direction:_,className:W,style:O,classNames:L,styles:j,selectionsIcon:Y}=$t("transfer"),q=f.useContext(kn),U=y??q,K={...e,disabled:U},J=k("transfer",t),[Q,G]=roe(J),ee=u||c||[],[oe,re,he]=yre(d,A,m),[Z,te,ce,ue]=xre(re,he,p),[Ee,Re]=Bx(pe=>pe.key),[be,le]=Bx(pe=>pe.key),ae=f.useCallback((pe,Fe)=>{if(pe==="left"){const Ge=typeof Fe=="function"?Fe(Z||[]):Fe;ce(Ge);}else {const Ge=typeof Fe=="function"?Fe(te||[]):Fe;ue(Ge);}},[Z,te]),ye=(pe,Fe)=>{(pe==="left"?Re:le)(Fe);},Se=f.useCallback((pe,Fe)=>{pe==="left"?H?.(Fe,te):H?.(Z,Fe);},[Z,te]),He=pe=>b??pe.titles??[],Le=pe=>{D?.("left",pe);},Ae=pe=>{D?.("right",pe);},_e=pe=>{const Fe=pe==="right"?Z:te,Ge=bre(oe),ut=Fe.filter(hn=>!Ge.has(hn)),Pt=ym(ut),qt=pe==="right"?ut.concat(m):m.filter(hn=>!Pt.has(hn)),Xt=pe==="right"?"left":"right";ae(Xt,[]),Se(Xt,[]),R?.(qt,pe,ut);},Te=()=>{_e("left"),ye("left",null);},Ce=()=>{_e("right"),ye("right",null);},Pe=(pe,Fe,Ge)=>{ae(pe,ut=>{let Pt=[];if(Ge==="replace")Pt=Fe;else if(Ge)Pt=Array.from(new Set([].concat(Et(ut),Et(Fe))));else {const qt=ym(Fe);Pt=ut.filter(Xt=>!qt.has(Xt));}return Se(pe,Pt),Pt}),ye(pe,null);},De=(pe,Fe)=>{Pe("left",pe,Fe);},Oe=(pe,Fe)=>{Pe("right",pe,Fe);},Ne=pe=>B?.("left",pe.target.value),Qe=pe=>B?.("right",pe.target.value),mt=()=>B?.("left",""),it=()=>B?.("right",""),ct=(pe,Fe,Ge,ut,Pt)=>{Fe.has(Ge)&&(Fe.delete(Ge),ye(pe,null)),ut&&(Fe.add(Ge),ye(pe,Pt));},bt=(pe,Fe,Ge,ut)=>{(pe==="left"?Ee:be)(ut,Fe,Ge);},pt=(pe,Fe,Ge,ut)=>{const Pt=pe==="left",qt=Et(Pt?Z:te),Xt=new Set(qt),hn=Et(Pt?re:he).filter(pi=>!pi?.disabled),Lr=hn.findIndex(pi=>pi.key===Fe);ut&&qt.length>0?bt(pe,hn,Xt,Lr):ct(pe,Xt,Fe,Ge,Lr);const Wo=Array.from(Xt);Se(pe,Wo),e.selectedKeys||ae(pe,Wo);},nt=(pe,Fe,Ge)=>{pt("left",pe,Fe,Ge?.shiftKey);},et=(pe,Fe,Ge)=>{pt("right",pe,Fe,Ge?.shiftKey);},Xe=pe=>{ae("right",[]),R?.(m.filter(Fe=>!pe.includes(Fe)),"left",Et(pe));},Ie=pe=>typeof a=="function"?a({direction:pe}):a||{},Me=f.useContext(Qn),{hasFeedback:se,status:ge}=Me,fe=pe=>({...pe,notFoundContent:z?.("Transfer")||f.createElement(o5,{componentName:"Transfer"}),...g}),ie=ml(ge,I),ve=!N&&S,me=he.filter(pe=>te.includes(pe.key)&&!pe.disabled).length>0,xe=re.filter(pe=>Z.includes(pe.key)&&!pe.disabled).length>0,[ke,qe]=It([L,o],[j,i],{props:K}),Ze=V(J,{[`${J}-disabled`]:U,[`${J}-customize-list`]:!!N,[`${J}-rtl`]:_==="rtl"},qi(J,ie,se),W,n,r,Q,G,ke.root),[st]=ir("Transfer",ho.Transfer),Ct=fe(st),[an,On]=He(Ct),Rt=$??Y;return f.createElement("div",{className:Ze,style:{...O,...qe.root,...s}},f.createElement(g0,{prefixCls:J,style:Ie("left"),classNames:ke,styles:qe,titleText:an,dataSource:re,filterOption:E,checkedKeys:Z,handleFilter:Ne,handleClear:mt,onItemSelect:nt,onItemSelectAll:De,render:P,showSearch:C,renderList:N,footer:M,onScroll:Le,disabled:U,direction:_==="rtl"?"right":"left",showSelectAll:x,selectAllLabel:h[0],pagination:ve,selectionsIcon:Rt,...Ct}),f.createElement(S4,{className:V(`${J}-actions`,ke.actions),rightActive:xe,moveToRight:Ce,leftActive:me,actions:ee,moveToLeft:Te,style:{...l,...qe.actions},disabled:U,direction:_,oneWay:w}),f.createElement(g0,{prefixCls:J,style:Ie("right"),classNames:ke,styles:qe,titleText:On,dataSource:he,filterOption:E,checkedKeys:te,handleFilter:Qe,handleClear:it,onItemSelect:et,onItemSelectAll:Oe,onItemRemove:Xe,render:P,showSearch:C,renderList:N,footer:M,onScroll:Ae,disabled:U,direction:_==="rtl"?"left":"right",showSelectAll:x,selectAllLabel:h[1],showRemove:w,pagination:ve,selectionsIcon:Rt,...Ct}))};Mp.List=g0;Mp.Search=$4;Mp.Operation=S4;const ooe={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 MC(e){const{enableSidebar:t}=Mt(),{usingTwoColumnMode:n}=DP(),r=rt(dr).subtab,{insideModal:o}=Jr();return f.useMemo(()=>!t||o&&n?false:e===ze.DynamicFeed?!os:e===ze.Hot?r===vn.Rank:e===ze.Fav,[e,t,r,o,n])}function ioe(e){const t=rt(dr).subtab;if(e===ze.Fav)return "w-300px";if(e===ze.Hot&&t===vn.Rank)return "w-200px"}function M4({className:e,style:t,sidebarView:n,tab:r}){const o=MC(r),i=An("h-fit w-250px flex-none overflow-x-hidden overflow-y-auto b-1px b-gate-border rounded-15px b-solid",ioe(r),e);return o&&n&&v("div",{className:i,css:ooe,style:t,children:v(yr,{theme:{components:{Menu:{itemHeight:30}}},children:n})})}function R4(e,t){const n=f.useRef(null),r=We(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=We(()=>{if(o.current)return;r()&&(o.current=true);});return br(()=>i()),Gi(()=>i(),[e]),{menuRef:n,revealSelected:r}}var A4=function(e){return function(t,n,r){return e(t,n,r)*r}},b0=function(e,t){if(e)throw Error("Invalid sort config: "+t)},T4=function(e){var t=e||{},n=t.asc,r=t.desc,o=n?1:-1,i=n||r;b0(!i,"Expected `asc` or `desc` property"),b0(n&&r,"Ambiguous object with `asc` and `desc` config properties");var s=e.comparer&&A4(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=T4(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 O4(e,t,n){if(e===void 0||e===true)return function(i,s){return t(i,s,n)};if(typeof e=="string")return b0(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=T4(e);return O4(o.sortBy,o.comparer||t,o.order)}var Eg=function(e,t,n,r){var o;return Array.isArray(t)?(Array.isArray(n)&&n.length<2&&(o=n,n=o[0]),t.sort(O4(n,r,e))):t};function F4(e){var t=A4(e.comparer);return function(n){var r=Array.isArray(n)&&!e.inPlaceSorting?n.slice():n;return {asc:function(o){return Eg(1,r,o,t)},desc:function(o){return Eg(-1,r,o,t)},by:function(o){return Eg(1,r,o,t)}}}}var B4=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},L4=F4({comparer:B4});F4({comparer:B4,inPlaceSorting:true});function v0(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 L4(e).by(r)}function D4(e,t){const n=t.map(({order:r,prop:o})=>r==="asc"?{asc:o}:r==="desc"?{desc:o}:{asc:o,comparer:r});return L4(e).by(n)}const Qt=rn({multiSelecting:false,selectedIdSet:xn(),shiftMultiSelectAnchorUniqId:void 0});function aoe(){const{multiSelecting:e}=rt(Qt);return e}function loe(e){const{multiSelecting:t,selectedIdSet:n}=rt(Qt);return t&&!!e&&n.has(e)}const k4=[];function si(){return k4.at(-1)?.items??[]}function coe(e){const t=k4.at(-1);t&&(t.items=e);}function Rp(){const{multiSelecting:e,selectedIdSet:t}=Qt;return e?si().filter(n=>t.has(n.uniqId)):[]}function uoe(){return Rp().map(rd)}function RC(){const{multiSelecting:e}=Qt;let t=e?Rp():si();return e&&!t.length&&(t=si()),t.map(rd)}function AC(){const t=RC().map(n=>n.bvid).join(" ");$s(t);}function TC(e){let{bvid:t,authorName:n,pubts:r,title:o}=e;const i=nn.unix(r??0).format("YYYY-MM-DD");return o=o.replaceAll(/\n+/g," "),`${t} ;; [${n}] ${i} ${o}`}function OC(){const t=RC().map(TC).join(`
`);$s(t);}function doe(){const t=uoe().map(n=>{let r=n.href;if(r)return r.startsWith("/")&&(r=new URL(r,location.href).href),r}).filter(Boolean).join(`
`);$s(t);}function foe(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]=v0(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 moe=({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"})]}),poe=f.forwardRef(moe),hoe=({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"})]}),goe=f.forwardRef(hoe),boe=({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"})]}),voe=f.forwardRef(boe),yoe=({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"})]}),Coe=f.forwardRef(yoe);function _4({iconOnly:e,addCopyActions:t=false}){const{multiSelecting:n}=rt(Qt),r=gl(),o=We(()=>{Qt.multiSelecting||(Qt.shiftMultiSelectAnchorUniqId=void 0,Ue.multiSelect.clearWhenExit&&Qt.selectedIdSet.clear());}),i=F(Je,{type:n?"primary":"default",className:V(e?"icon-only-round-button":"inline-flex-center"),onClick:()=>{Qt.multiSelecting=!Qt.multiSelecting,o();},children:[v(poe,{className:"size-12px"}),!e&&F(we,{children:["多选",Qt.multiSelecting?"中":""]})]}),s=a=>v(_o,{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(Jm,{className:"size-18px"}),"清空"]}),F(Je,{className:"inline-flex items-center",onClick:()=>{const l=si().map(c=>c.uniqId);Qt.selectedIdSet=xn(l);},children:[v(goe,{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(voe,{className:"size-18px"}),"反选"]}),v("div",{className:"flex-basis-100%"}),F(Je,{className:"inline-flex items-center",onClick:()=>{Qt.multiSelecting=false,o();},children:[v(Coe,{className:"size-18px"}),"退出"]}),v(lt,{configPath:"multiSelect.clearWhenExit",label:"退出时清空",tooltip:"退出多选时, 清空所有已选择项"})]}),t&&F(we,{children:[v(Za,{variant:"solid",className:"my-7px"}),v("div",{className:"flex flex-wrap gap-x-10px gap-y-5px",children:v(z4,{})})]})]}),children:a});return n?s(i):e?v(Jt,{title:"多选",arrow:false,children:i}):i}function z4(){const{__internalEnableCopyBvidInfo:e}=Mt();return F(we,{children:[F(Je,{onClick:AC,className:"inline-flex-center",children:[v(Ss,{})," 复制 BVID"]}),e&&F(Je,{onClick:OC,className:"inline-flex-center",children:[v(Ss,{})," 复制 BVID 信息"]})]})}function Ap(){const{__internalAddCopyBvidButton:e}=Mt();return e?F(we,{children:[v(_4,{iconOnly:false}),v(z4,{})]}):null}function H4(e){return e.replace(/([A-Z])/,"999999$1").replace(/([a-z])/,"999998$1")}function V4(e,t){return e.localeCompare(t,"zh-CN")}function aE(e,t){return D4(e,[{prop:n=>{const r=typeof t=="function"?t(n):n[t];return H4(r)},order:V4}])}const j4={overscrollBehavior:"contain",maxHeight:"60vh",overflowY:"scroll",scrollbarWidth:"thin",paddingRight:"12px"},xoe=({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"})]}),woe=f.forwardRef(xoe),Soe=({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"})]})]}),$oe=f.forwardRef(Soe),Eoe=({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"})]}),Ioe=f.forwardRef(Eoe),Poe=({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"})]}),Noe=f.forwardRef(Poe),W4=woe,FC=$oe,BC=Ioe,Tp=Noe;function q4(e){const{folders:t,collections:n,selectedKey:r}=rt(Dt),o=jn();return {menuItems:f.useMemo(()=>{const s=[],a=AT(n,c=>c.upper.name);let l=Object.entries(a).map(([c,u])=>({upName:c,collections:aE(u,"title")}));l=aE(l,"upName");for(const{upName:c,collections:u}of l){const d=u[0]?.upper.mid,m=d?Yu(d):"#";s.push(...qr([{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(Tp,{className:"size-15px flex-none"}),p.title," (",p.media_count,")"]});return {key:h,label:g,title:`${p.title} (${p.media_count})`,async onClick(){Dt.selectedFavFolderId=void 0,Dt.selectedFavCollectionId=p.id,e?.(),await zt(100),o();}}})}]));}return qr([{key:"all",icon:v(W4,{}),label:"全部",async onClick(){Dt.selectedFavFolderId=void 0,Dt.selectedFavCollectionId=void 0,e?.(),await zt(100),o();}},!!t.length&&{type:"group",label:"收藏夹",children:t.map(c=>{I5(c.attr);const u=J1(c.attr),d=`fav-folder:${c.id}`,m=u?v(FC,{}):v(BC,{}),p=`${c.title} (${c.media_count})`;return {key:d,icon:m,label:p,async onClick(){Dt.selectedFavFolderId=c.id,Dt.selectedFavCollectionId=void 0,e?.(),await zt(100),o();}}})},!!n.length&&{type:"group",label:"合集",children:s}])},[t,n]),selectedKey:r}}function Moe({extraContent:e}){const{fav:t,enableSidebar:n}=Mt(),{selectedFavFolder:r,selectedFavCollection:o,selectedLabel:i,selectedKey:s}=rt(Dt),a=jn(),{ref:l,getPopupContainer:c}=ta();br(()=>{oC();}),Gi(()=>{(async()=>(await zt(100),a()))();},[t.addSeparator]);const[u,d]=f.useState(false),{menuItems:m}=q4(()=>{d(false);}),p="relative top-[-0.5px] size-15px",h=r?J1(r.attr)?v(FC,{className:p}):v(BC,{className:p}):o?v(Tp,{className:p}):v(W4,{className:p}),g=i,b=v(rs,{open:u,onOpenChange:d,placement:"bottomLeft",getPopupContainer:c,menu:{items:m,style:{...j4,border:`1px solid ${gl()}`},selectedKeys:[s]},children:v(Je,{css:[u&&hl,"",""],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(Ap,{})]})}function Roe({allFavFolderServices:e,state:t}){const{fav:n}=Mt(),r=jn(),{ref:o,getPopupContainer:i}=ta(),{totalCountInFavFolders:s}=rt(t),[a,l]=f.useState(false),c=We((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=We(m=>{m?l(false):a&&r();});return v(_o,{getTooltipContainer:i,trigger:"click",placement:"bottom",onOpenChange:d,getPopupContainer:m=>m.parentElement||document.body,content:v(we,{children:v(Mp,{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 Aoe(){const{menuItems:e,selectedKey:t}=q4(),{menuRef:n}=R4(e,t);return v(ns,{ref:n,items:e,selectedKeys:[t],mode:"inline",inlineIndent:10})}var Mo=(e=>(e[e.Offline=0]="Offline",e[e.Streaming=1]="Streaming",e[e.Rolling=2]="Rolling",e))(Mo||{});class LC 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 Toe=({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"})]}),Ooe=f.forwardRef(Toe);function Foe(e){return e instanceof Error&&e.name==="AxiosError"}function Hd(e){return e&&v("p",{className:"mt-10px",children:e})}function U4(e){if(!(e instanceof Error))return Hd(JSON.stringify(e));let t,n,r;if(e.stack?t=F(we,{children:["Error Stack: ",v("br",{}),e.stack]}):t=F(we,{children:["Error Message: ",e.message]}),e.cause&&(n=F(we,{children:["Error Cause: ",U4(e.cause)]})),Foe(e)){const o=_a(e);o.config?.params?.access_key&&(o.config.params.access_key="*".repeat(o.config.params.access_key.length)),r=F(we,{children:["axios config: ",JSON.stringify(o.config,null,2)]});}return F(we,{children:[Hd(t),Hd(n),Hd(r)]})}function Boe(e){return e&&e instanceof G4&&e.message?e.message:"出错了, 请刷新重试!"}class G4 extends Error{constructor(t){super(t),this.name="ShowMessageError";}}function Loe({err:e,tab:t}){const n=vp(),r=f.useMemo(()=>Boe(e),[e]),o=f.useMemo(()=>U4(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(Ooe,{className:"mr-4px"}),r]})}),t===ze.Hot&&dr.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 K4(e){const t=e==="follow"?1:2;return async function(r){return await b4(r,t)}}const Doe=K4("follow"),koe=K4("unfollow"),_oe={follow:Doe,unfollow:koe};function zoe(e){return [1,2,6].includes(e.attribute)}async function Hoe(e){return (await Tt.get("/x/relation",{params:{fid:e}})).data.data}const Voe=f1(Hoe,{cacheKey:([e])=>e.toString()});function joe(e){return !!(e.elec_arc_type===1||!e.elec_arc_type&&e.is_charging_arc||e.elec_arc_type===2)}function Woe(){const{searchText:e,filterText:t}=rt(oo,{sync:true}),{allowedOrders:n,usingOrder:r}=rt(oo),{spaceUpload:{useSyncFilterTextFromSearchText:o}}=Mt(),i=jn(),s=We(()=>{a();const{searchText:l,filterText:c}=oo,u=location.href,d=new URL(u);l?d.searchParams.set(Jo.SearchText,l):d.searchParams.delete(Jo.SearchText),c?d.searchParams.set(Jo.FilterText,c):d.searchParams.delete(Jo.FilterText),d.href!==u&&history.replaceState({},"",d.href);}),a=We(()=>{Ue.spaceUpload.useSyncFilterTextFromSearchText&&(oo.filterText=oo.searchText);});return br(s),F("div",{className:"flex items-center gap-x-10px",children:[v(tC,{value:r,list:n,listDisplayConfig:Rne,onChange:l=>{oo.order=l,i();}}),v(Co.Search,{style:{width:200},placeholder:"搜索词",allowClear:true,value:e,onChange:l=>oo.searchText=l.target.value,onSearch:l=>{oo.searchText=l,s(),i();}}),v(Co.Search,{style:{width:200},placeholder:"本地过滤词",allowClear:true,value:t,addonBefore:v(Jt,{title:v(we,{children:"精准搜索: 自动将搜索词同步到过滤词"}),children:v(lt,{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(lt,{configPath:"spaceUpload.showVol",label:"显示序号",className:"flex-none"}),v(Ap,{})]})}const X4=new LC({maxSize:100}),Cm=xn();async function qoe(e){if(Cm.has(e))return;const t=await Voe(e);zoe(t)&&Cm.add(e);}function Y4(){const e=Yn(oo);return {mids:e.mids,groupId:e.groupId,order:e.usingOrder,searchText:e.searchText,filterText:e.filterText,initialPage:J2?Number(J2):void 0}}class DC extends ts{constructor(t){if(super(DC.PAGE_SIZE),this.config=t,Object.assign(this,t),this.mids=t.mids,this.order=t.order,Ri(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(Woe,{});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 pC(n);r&&X4.set(n,r.face);}));}async fetchFollowState(t){await ji(t,qoe,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 ji(this.mids,Qu,3)).map(i=>i?.trim()).filter(Boolean).map(i=>`「${i}」`).join("、");else {const i=(await r4()).find(s=>s.tagid===this.groupId)?.name||"";n=i?`「${i}」`:"";}const r=[t.join(""),`${n}的投稿`].map(o=>o.trim()).filter(Boolean).join(" - ");v1(r),this.pageTitleSet=true;}singleUpService;mergeTimelineService;async setupServices(){if(!(this.singleUpService||this.mergeTimelineService)){if(this.mids.length===1){this.singleUpService=new Q4(this.mids[0],this.order,this.searchText,this.initialPage);return}if(this.mids.length){this.mergeTimelineService=new lE(this.mids,this.order,this.searchText);return}if(this.groupId){const t=await f0(this.groupId);t.forEach(n=>Cm.add(n)),this.mergeTimelineService=new lE(t.map(n=>n.toString()),this.order,this.searchText);return}}}get service(){return this.singleUpService||this.mergeTimelineService}isAnonymous=false;warnNeedLoginOnce=xu(()=>{sR();});async fetchMore(t){if(!rN())throw this.isAnonymous=true,this.warnNeedLoginOnce(),new G4(iR);this.setPageTitle(),await this.setupServices(),Ri(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:$e.SpaceUpload,uniqId:`${$e.SpaceUpload}-${i.bvid}`,vol:r-s,page:this.singleUpService?this.singleUpService.page-1:void 0}));if(o=o.filter(i=>!joe(i)),this.filterText){const{includes:i,excludes:s}=oR(this.filterText);o=o.filter(a=>i.every(l=>a.title.includes(l))&&s.every(l=>!a.title.includes(l)));}{const i=B0(o.filter(s=>s.author.trim()!=="账号已注销")).map(s=>s.mid).filter(Boolean);await Promise.all([this.fetchAvatars(i),this.fetchFollowState(i)]);}return o}}class lE{constructor(t,n,r){this.mids=t,this.order=n,this.searchText=r,Ri(this.mids.length===1||this.mids.length>1&&this.order!==Zo.Fav,"SpaceUploadItem.Fav not supported when merging"),this.singleUpServices=t.map(o=>new Q4(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 ji(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=Qo(o.map(a=>{const l=a.bufferQueue[0],c={[Zo.Latest]:l.created,[Zo.View]:l.play,[Zo.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 Q4{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 One({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 cE=e=>(e||"").replace(/^http:\/\//,"https://"),kC=" · ";function Z4(e,t){if(tl(e))return t[$e.AppRecommend](e);if(Pp(e))return t[$e.PcRecommend](e);if(vm(e))return t[$e.DynamicFeed](e);if(Np(e))return t[$e.Watchlater](e);if(ks(e))return t[$e.Fav](e);if(_ne(e))return t[$e.PopularGeneral](e);if(zne(e))return t[$e.PopularWeekly](e);if(IC(e))return t[$e.Rank](e);if(mu(e))return t[$e.Live](e);if(PC(e))return t[$e.SpaceUpload](e);throw new Error("unknown api type")}function rd(e){const t=Z4(e,{[$e.AppRecommend]:Uoe,[$e.PcRecommend]:Koe,[$e.DynamicFeed]:Xoe,[$e.Watchlater]:Yoe,[$e.Fav]:Qoe,[$e.PopularGeneral]:Zoe,[$e.PopularWeekly]:Joe,[$e.Rank]:eie,[$e.Live]:tie,[$e.SpaceUpload]:nie});return t.authorFace&&(t.authorFace=cE(t.authorFace)),t.cover=cE(t.cover),t}function Uoe(e){return Goe(e)}function Goe(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 Nc(I)}if(b==="danmaku"){const S=w.find($=>$.endsWith("弹幕"));if(!S)return;const I=S.replace(/弹幕$/,"");return Nc(I)}if(b==="bangumi:follow"){const S=w.find($=>/追[剧番]$/.test($));if(!S)return;const I=S.replace(/追[剧番]$/,"");return Nc(I)}},n=e.param,r=e.bvid||w4.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 po("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(kC);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:is(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 Koe(e){e.goto,Fi.AV;const t=e.goto===Fi.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:is(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 Xoe(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:NC(t.duration_text)||0,durationStr:t.duration_text,recommendReason:t.badge.text===Fo.Upload?t.badge.text:void 0,dynBadge:t.badge,statItems:[{field:"play",value:t.stat.play},{field:"danmaku",value:t.stat.danmaku}],play:Nc(t.stat.play),danmaku:Nc(t.stat.danmaku),authorName:n.name,authorFace:n.face,authorMid:n.mid.toString()}}function Yoe(e){const t=sre(e.state),n=e.progress>0,r=`${n?"【已观看】· ":""}${e.title}`,o=t?v(Jt,{title:F(we,{children:["视频已失效, 原因: ",t]}),align:{offset:[0,-5]},placement:"topLeft",children:F("del",{children:[n?"【已观看】· ":"",e.title,"`"]})}):void 0,{watchlaterUseNormalVideoUrl:i,watchlaterItemsOrder:s}=Hu(),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===pr.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:`${xf(e.pubdate,true)} 发布, ${xf(e.add_at,true)} 添加稍后再看`,duration:e.duration,durationStr:is(e.duration),recommendReason:`${xf(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 Qoe(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"?J1(e.folder.attr)?v(FC,{className:V("size-15px",r),style:n}):v(BC,{className:V("size-15px",r),style:n}):v(Tp,{className:V("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(we,{children:["【",o,t,"】· ",e.title]}),cover:e.cover,pubts:e.pubtime,duration:e.duration,durationStr:is(e.duration),recommendReason:e.from==="fav-folder"?`${xf(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 Zoe(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:is(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 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:is(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 eie(e){if(oZ(e)||rZ(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:is(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 tie(e){const t=`${e.area_name_v2}`,n=e.live_status===Mo.Streaming?"":`${kC}${r(e.record_live_time)} 直播过`;function r(o){const i=nn().format("YYYYMMDD"),s=nn().subtract(1,"day").format("YYYYMMDD"),a=nn.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 nie(e){const t=NC(e.length),n=is(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:X4.get(e.mid),authorMid:e.mid.toString(),followed:Cm.has(e.mid)}}const Uo=zn.extend("modules:filter");function _C(e){return !!e&&["已关注","新关注"].includes(e)}function J4(e){return !!(e===ze.KeepFollowOnly||[ze.AppRecommend,ze.PcRecommend,ze.Hot].includes(e)&&(pu.size||Ue.filter.enabled&&(Ue.filter.byAuthor.enabled&&Ue.filter.byAuthor.keywords.length||Ue.filter.byTitle.enabled&&Ue.filter.byTitle.keywords.length))||(e===ze.AppRecommend||e===ze.PcRecommend)&&Ue.filter.enabled)}function eA(e){return [$e.AppRecommend,$e.PcRecommend,$e.Rank,$e.PopularGeneral,$e.PopularWeekly].includes(e)}function y0(e,t){if(!J4(t))return e;const n=Hu().filter,{minDuration:r,minPlayCount:o,minDanmakuCount:i,byAuthor:s,byTitle:a}=n,{blockUpMids:l,blockUpNames:c}=MR(s.keywords),{titleKeywordList:u,titleRegexList:d}=BJ(a.keywords);return e.filter(m=>{if(m.api===$e.Separator)return  true;const{play:p,duration:h,danmaku:g,recommendReason:b,goto:y,authorName:C,authorMid:x,title:w,bvid:S,href:I}=rd(m),$=_C(b);if(t==="keep-follow-only"&&!$)return  false;function E(){if(x&&pu.size&&pu.has(x))return Uo("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 Uo("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===$e.Rank&&aC(m)&&m.desc&&A.push(m.desc),A=A.filter(Boolean),n.enabled&&a.enabled&&a.keywords.length&&A.length){const D=R=>u.some(B=>R.includes(B))||d.some(B=>B.test(R));if(A.some(D))return Uo("filter out by title-rule: %o",{possibleTitles:A,rules:a.keywords,bvid:S}),false}}if(eA(m.api)&&E()===false)return  false;if((m.api===$e.AppRecommend||m.api===$e.PcRecommend)&&n.enabled){const A=y==="av",D=y==="picture",R=y==="bangumi";if(A)return P();if(D)return M();if(R)return N()}function P(){return $&&n.exemptForFollowed.video?true:b==="关注了你"?(Uo("filter out by recommendReason-rule: %s %o",b,{bvid:S,title:w}),false):r.enabled&&r.value&&h&&h<r.value?(Uo("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?(Uo("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?(Uo("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:(Uo("filter out by goto-type-picture-rule: %s %o",y,{bvid:S,title:w}),false):true}function N(){return n.hideGotoTypeBangumi?(Uo("filter out by goto-type-bangumi-rule: %s %o",y,{title:w,href:I}),false):true}return  true})}async function rie(e){return (await Tt.get("https://api.live.bilibili.com/xlive/web-ucenter/user/following",{params:{page:e,page_size:od.PAGE_SIZE,ignoreRecord:1,hit_ab:true}})).data}class od extends ts{constructor(t=false){super(od.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 rie(this.page);cn(n)||(_t(n.message||ol),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:$e.Live,uniqId:`${$e.Live}-${u.roomid}`})),a=s.at(-1),l=nn().subtract(2,"weeks").unix();if(a){const u=a.live_status,d=a.record_live_time;u!==Mo.Streaming&&d&&d<l&&(this.hasMoreExceptQueue=false);}let c=s;if(!this.streamingOnly&&!this.separatorAdded&&s.some(u=>u.live_status!==Mo.Streaming)){this.separatorAdded=true;const u=s.findIndex(d=>d.live_status!==Mo.Streaming);c.splice(u,0,{api:$e.Separator,uniqId:"live-separator-recent",content:"最近直播过"});}return this.streamingOnly&&s.some(u=>u.live_status!==Mo.Streaming)&&(this.hasMoreExceptQueue=false,c=s.filter(u=>u.live_status===Mo.Streaming)),c}}async function id({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||ol;throw _t(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 xm=wl("dynamic-feed-items"),sd=wl("dynamic-feed-items-info");async function Op(e){return !!(await sd.get(e))?.count}function oie(e,t){const n=s=>`update-search-cache-${s}`,o=zs((s,a)=>{Qc.info({icon:v(r1,{className:"size-16px"}),key:n(e),title:"搜索缓存更新中...",description:`「${t}」更新中: Page(${s}) Total(${a})`,duration:false});},200);return {notifyOnProgress:o,notifyOnSuccess:()=>{o.flush(),Qc.success({key:n(e),title:"缓存更新成功",description:`「${t}」的搜索缓存更新成功`,duration:false});}}}async function iie(e,t){await Op(e)?await tA(e):await aie(e,void 0,t);}async function sie(e,t=false){const n=await sd.get(e);if(!(!t&&n&&n.count&&n.updatedAt&&Date.now()-n.updatedAt<60*1e3))return tA(e)}async function tA(e){if(!await Op(e))return;const t=await xm.get(e)||[],n=new Set(t.map(l=>l.id_str));let r=1,o="",i=true,s=[];for(;i;){const l=await id({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=Xi([...s,...t],l=>l.id_str);await xm.set(e,a),await sd.set(e,{count:a.length,updatedAt:Date.now()});}const Ig=wl("dynamic-feed-items-in-progress");async function aie(e,t=false,n){const r=t?void 0:await Ig.get(e);let o=r?.page??1,i=r?.offset??"",s=r?.items??[],a=true;for(;a;){const c=await id({upMid:e,page:o,offset:i}),u=c.items;s=[...s,...u],i=c.offset,a=c.has_more,o++,await Ig.set(e,{page:o,offset:i,items:s}),n?.(o,s.length);}const l=Xi(s,c=>c.id_str);await xm.set(e,l),await sd.set(e,{count:l.length,updatedAt:Date.now()}),await Ig.delete(e);}const nA=na({fn:id,generateKey:({upMid:e})=>`${e}`,tableName:"dynamic-feed-newest-items",ttl:300*1e3});class lie{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?nA:id)({upMid:this.upMid,page:this.page,offset:this.offset});return this.offset=r.offset,this.hasMoreForApi=r.has_more,this.page++,Bo(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 ei{constructor(t){this.upMids=t;const n=t.length>ei.ENABLE_HEAD_CACHE_UPMID_COUNT_THRESHOLD;this.upServices=t.map(r=>new lie(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 ji(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=Qo(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 C0=f__namespace.createContext({}),cie=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]:{...Bt(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"}}}},uie=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}}}},die=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}},rA=wt("Avatar",e=>{const{colorTextLightSolid:t,colorTextPlaceholder:n}=e,r=vt(e,{avatarBg:n,avatarColor:t});return [cie(r),uie(r)]},die),oA=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:D}=$t("avatar"),R=f__namespace.useContext(C0),B=()=>{if(!P.current||!E.current)return;const ee=P.current.offsetWidth,oe=E.current.offsetWidth;ee!==0&&oe!==0&&g*2<oe&&x(oe-g*2<ee?(oe-g*2)/ee:1);};f__namespace.useEffect(()=>{S(true);},[]),f__namespace.useEffect(()=>{$(true),x(1);},[i]),f__namespace.useEffect(B,[g]);const H=()=>{b?.()!==false&&$(false);},k=Hn(ee=>o??R?.size??ee??"default"),z=Object.keys(typeof k=="object"?k||{}:{}).some(ee=>["xs","sm","md","lg","xl","xxl"].includes(ee)),_=I4(z),W=f__namespace.useMemo(()=>{if(typeof k!="object")return {};const ee=E4.find(re=>_[re]),oe=k[ee];return oe?{width:oe,height:oe,fontSize:oe&&(a||p)?oe/2:18}:{}},[_,k,a,p]),O=N("avatar",n),L=sn(O),[j,Y]=rA(O,L),q=V({[`${O}-lg`]:k==="large",[`${O}-sm`]:k==="small"}),U=f__namespace.isValidElement(i),K=r||R?.shape||"circle",J=V(O,q,A,`${O}-${K}`,{[`${O}-image`]:U||i&&I,[`${O}-icon`]:!!a},Y,L,l,c,j),Q=typeof k=="number"?{width:k,height:k,fontSize:a?k/2:18}:{};let G;if(typeof i=="string"&&I)G=f__namespace.createElement("img",{src:i,draggable:m,srcSet:s,onError:H,alt:d,crossOrigin:h});else if(U)G=i;else if(a)G=a;else if(w||C!==1){const ee=`scale(${C})`,oe={msTransform:ee,WebkitTransform:ee,transform:ee};G=f__namespace.createElement(Xr,{onResize:B},f__namespace.createElement("span",{className:`${O}-string`,ref:P,style:oe},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,...D,...u},className:J,ref:M},G)}),uE=e=>{const{size:t,shape:n}=f__namespace.useContext(C0),r=f__namespace.useMemo(()=>({size:e.size||t,shape:e.shape||n}),[e.size,e.shape,t,n]);return f__namespace.createElement(C0.Provider,{value:r},e.children)},fie=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]=rA(g,y),w=V(b,{[`${b}-rtl`]:n==="rtl"},x,y,o,i,C),S=hr(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",D={content:P,...h?.popover,placement:A,trigger:N,rootClassName:V(`${b}-popover`,h?.popover?.rootClassName)};return E.push(f__namespace.createElement(_o,{key:"avatar-popover-key",destroyOnHidden:true,...D},f__namespace.createElement(oA,{style:M},`+${$-I}`))),f__namespace.createElement(uE,{shape:u,size:c},f__namespace.createElement("div",{className:w,style:s},E))}return f__namespace.createElement(uE,{shape:u,size:c},f__namespace.createElement("div",{className:w,style:s},S))},Ns=oA;Ns.Group=fie;function cr(e,t,n){const r=We(n);f.useEffect(()=>(e.on(t,r),()=>{e.off(t,r);}),[e,t]);}function mie(){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 pie=!Ys&&await( mie());function zC(e){return `${e}@96w_96h_1c_1s_!web-avatar${pie?".avif":".webp"}`}function dE(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>t(true),n.onerror=()=>t(false);})}function hie({externalSearchInput:e,onRefresh:t,getPopupContainer:n}){const{upMid:r,dynamicFeedVideoType:o,filterMinDuration:i,searchText:s,hideChargeOnlyVideos:a}=rt(At),l=v(Co.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=>{vie({searchText:g.target.value,upMid:r,onRefresh:t});},onSearch:async g=>{At.searchText=g||void 0,await zt(100),t();}}),c=v(gie,{externalSearchInput:e,searchInput:l,refresh:t}),[u,d]=f.useState(false),m=d,p=f.useMemo(()=>!!(o!==No.All||a||s||i!==Ps.All),[o,a,s,i]),h=v(_o,{open:u,onOpenChange:m,arrow:false,placement:"bottomLeft",getPopupContainer:n,content:c,styles:{container:{border:`1px solid ${gl()}`}},children:v(op,{dot:p,color:Ui,offset:[-5,5],children:v(Je,{className:"icon-only-round-button",css:u&&hl,children:v(n0,{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 gie({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}=rt(At);let m;{const p=uu&&!!d,h=d===o4,{href:g,path:b}=f.useMemo(()=>{const y=new URL(location.href);return y.searchParams.has(Wr.SearchTextFull)?y.searchParams.set(Wr.SearchTextFull,d||""):y.searchParams.has(Wr.SearchTextShort)?y.searchParams.set(Wr.SearchTextShort,d||""):y.searchParams.set(Wr.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:["「",Fo.ChargeOnly,"」在此程序中归类为「投稿视频」",v("br",{}),"「动态视频」时长通常较短"]})]}),v("div",{children:v(fr.Group,{buttonStyle:"solid",value:a,onChange:async p=>{At.dynamicFeedVideoType=p.target.value,await zt(100),n?.();},children:Object.values(No).map(p=>v(fr.Button,{value:p,children:yne[p]},p))})})]}),a!==No.DynamicOnly&&F("div",{className:Fn.section,children:[v("div",{className:Fn.sectionTilte,children:"充电专属"}),v("div",{className:Fn.sectionContent,children:v(Zr,{className:"ml-5px",checked:c,onChange:async p=>{const h=p.target.checked,g=At.hideChargeOnlyVideosForKeysSet;h?g.add(s):g.delete(s),await zt(100),n?.();},children:v(Jt,{title:F(we,{children:["隐藏「",Fo.ChargeOnly,"」视频 ",v("br",{}),"仅对当前 UP 或 分组生效"]}),children:F("span",{style:{userSelect:"none"},children:["隐藏「",Fo.ChargeOnly,"」"]})})})})]}),F("div",{className:Fn.section,children:[v("div",{className:Fn.sectionTilte,children:"最短时长"}),v("div",{children:v(fr.Group,{className:"overflow-hidden [&_.ant-radio-button-wrapper]:px-10px",buttonStyle:"solid",value:l,onChange:async p=>{At.filterMinDuration=p.target.value,await zt(100),n?.();},children:Object.values(Ps).map(p=>{const{label:h}=s4[p];return v(fr.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(bie,{}),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:SR(o?.tagid||""),target:"_blank",className:`mx-4px inline-flex items-center text-size-16px ${zN}`,children:[v(bo,{className:"mr-2px size-18px"}),o?.name]}),")"]})]}),F("div",{className:Fn.sectionContent,children:[v(Zr,{checked:u,onChange:async p=>{At.addSeparatorsMap.set("global",p.target.checked),await zt(100),n?.();},children:v(Jt,{title:"添加今日/更早分割线",children:"添加分割线"})}),i&&!!o&&v(yie,{followGroup:o,refresh:n})]})]})]})}function bie(){const{cacheAllItemsEntry:e,cacheAllItemsUpMids:t}=Mt().dynamicFeed.__internal,{viewingSomeUp:n,upMid:r,upName:o}=rt(At),i=Ki(async(l,c)=>{const{notifyOnProgress:u,notifyOnSuccess:d}=oie(l,c);await iie(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(we,{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(Zr,{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(lt,{configPath:"dynamicFeed.advancedSearch",label:"使用高级搜索",tooltip:rR})]})]})})}const vie=zs(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 Op(t))return;const r=await sd.get(t);!r||!r.count||r.count>=5e3||(At.searchText=e,await zt(0),n());},100);function iA(){return F(we,{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 数量不超过 ",ei.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 yie({followGroup:e,refresh:t}){const{whenViewAll:n}=rt(Ue.dynamicFeed),r=e.count;let o;const i=fE(e.tagid,"dynamicFeed.followGroup.forceUseMergeTimelineIds");{const{checked:l,onChange:c}=i,u=r<=ei.ENABLE_MERGE_TIMELINE_UPMID_COUNT_THRESHOLD;o=v(Zr,{checked:l,onChange:d=>{c(d),t?.();},disabled:u,children:v(Jt,{title:F(we,{children:[v(iA,{}),u&&F("p",{className:"text-yellow-400 italic",children:["当前分组 UP 数量: ",r,", 无需设置"]})]}),children:"分组动态: 强制使用「拼接时间线」"})});}let s;s=(r<=ei.ENABLE_MERGE_TIMELINE_UPMID_COUNT_THRESHOLD||i.checked)&&r>ei.ENABLE_HEAD_CACHE_UPMID_COUNT_THRESHOLD&&v(Jt,{title:F(we,{children:["当分组 UP 数量"," >  ",ei.ENABLE_HEAD_CACHE_UPMID_COUNT_THRESHOLD,"时, 「拼接时间线」功能会缓存每个 UP 的最新动态5分钟. ",v("br",{}),"这里可以手动清除缓存"]}),children:v(Je,{onClick:()=>{nA.cache.db.clear(),ft.success("已清除缓存");},children:"清除「拼接时间线」- 队头缓存"})});let a;{const{checked:l,onChange:c}=fE(`${Ds}${e.tagid}`,"dynamicFeed.whenViewAll.hideIds");a=n.enableHideSomeContents&&v(Zr,{checked:l,onChange:c,children:v(Jt,{title:F(we,{children:["在「全部」动态中隐藏来自此 ",e.name," 的动态"]}),children:"在「全部」动态中隐藏来自此分组的动态"})});}return F(we,{children:[a,o,s]})}function fE(e,t){const n=uN(t),r=f.useMemo(()=>n.includes(e),[n]),o=We(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 Cie(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 Pg={upMid:void 0,upName:void 0,upFace:void 0,searchText:void 0,selectedGroupId:void 0,dynamicFeedVideoType:No.All,filterMinDuration:Ps.All};function sA(e){const{upList:t,groups:n,selectedKey:r}=rt(At),o=jn(),{followGroup:{enabled:i}}=Mt().dynamicFeed,{recSharedEmitter:s}=Jr(),a=We(async u=>{Cie(u),await zt(100),o();}),l=We(()=>{a({...Pg}),s.emit("dynamic-feed:clear");});return {menuItems:f.useMemo(()=>{const u={key:"all",icon:v(Ns,{size:"small",children:"全"}),label:"全部",title:"全部",onClick:l};let d=[];i&&(d=n.map(h=>({key:`group:${h.tagid}`,icon:v(Ns,{size:"small",children:h.name[0]||"组"}),label:`${h.name} (${h.count})`,title:`${h.name} (${h.count})`,onClick:()=>a({...Pg,selectedGroupId:h.tagid})})));let m=t;e==="dropdown"&&(m=D4(t,[{prop:h=>h.has_update?1:0,order:"desc"},{prop:h=>H4(h.uname),order:V4}]));const p=m.map(h=>{let g=v(Ns,{size:"small",src:zC(h.face)});return h.has_update&&(g=v(op,{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({...Pg,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 xie(){const{dynamicFeed:{__internal:{externalSearchInput:e}}}=Mt(),{viewingSomeUp:t,upName:n,upFace:r,selectedGroup:o}=rt(At),i=jn(),{ref:s,getPopupContainer:a}=ta(),l=MC(ze.DynamicFeed),{menuItems:c,selectedKey:u,onClear:d}=sA("dropdown");br(()=>{u4();});const m=o?.count,p=v(xR,{className:"mt--2px size-14px"}),h=r?v(Ns,{size:20,src:zC(r)}):void 0,g=t?h||p:o?v(wR,{className:"size-18px"}):void 0,b=t?n:o?o.name+(m?` (${m})`:""):"全部",[y,C]=f.useState(false),x=v(rs,{open:y,onOpenChange:C,placement:"bottomLeft",getPopupContainer:a,menu:{items:c,style:{...j4,border:`1px solid ${gl()}`},selectedKeys:[u]},children:v(Je,{icon:g,className:"gap-4px",css:[y&&hl,"",""],children:b})}),{popoverTrigger:w,searchInput:S}=hie({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(Jb,{className:"mr-5px size-14px"}),v("span",{children:"清除"})]}):(t||o)&&F(Je,{onClick:d,className:"gap-0",children:[v(Jb,{className:"mr-5px size-14px"}),v("span",{children:"清除"})]}),w,e&&S,v(Ap,{})]})}function wie(){const e=MC(ze.DynamicFeed),{menuItems:t,selectedKey:n}=sA("sidebar"),{menuRef:r,revealSelected:o}=R4(t,n),{recSharedEmitter:i}=Jr();if(cr(i,"dynamic-feed:clear",()=>{o(du);}),!!e)return v(ns,{ref:r,items:t,selectedKeys:[n],mode:"inline",inlineIndent:10})}function HC(e=At){const t=Yn(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:vne,minId:mE(m0)?BigInt(m0):void 0,minTs:mE(Y2)?Number(Y2):void 0}}function mE(e){return !!e&&/^\d+$/.test(e)}const Sie=zn.extend("modules:rec-services:dynamic-feed");class Fp extends ts{constructor(t){super(Fp.PAGE_SIZE),this.config=t,this.config.showLiveInDynamicFeed&&!this.upMid&&this.groupId===void 0&&!this.searchText&&this.dynamicFeedVideoType===No.All&&this.filterMinDuration===Ps.All&&(this.liveRecService=new od(true)),this.config.startingOffset&&(this.offset=this.config.startingOffset);}static PAGE_SIZE=15;tabbarView=v(xie,{});sidebarView=v(wie,{});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===No.DynamicOnly||this.filterMinDuration!==Ps.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<=ei.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 f0(this.groupId);this.groupMids=new Set(t),this.shouldEnableMergeTimeline(t.length)&&(this.groupMergeTimelineService=new ei(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(el)).map(i=>i.slice(el.length)),n=Array.from(this.config.whenViewAllHideIds).filter(i=>i.startsWith(Ds)).map(i=>i.slice(Ds.length)),r=this.whenViewAllHideMids;t.forEach(i=>r.add(i)),(await ji(n,i=>f0(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!==$e.Separator);let n;this.viewingSomeGroup&&await this.loadGroupMids(),this.viewingAll&&(await this.loadWhenViewAllHideMids(),Sie("viewingAll: hide-mids = %o",this.whenViewAllHideMids));const r=!!(this.upMid&&this.searchText&&this.config.searchCacheEnabled&&await Op(this.upMid)),o=r&&this.config.advancedSearch,i=o?oR((this.searchText||"").toLowerCase()):void 0;if(r)this._queueForSearchCache||(await sie(this.upMid),this._queueForSearchCache=new hp(20),this._queueForSearchCache.bufferQueue=(await xm.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 id({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===No.All)return  true;const d=u.modules.module_dynamic.major.archive.badge.text;return this.dynamicFeedVideoType===No.DynamicOnly?d===Fo.Dynamic:this.dynamicFeedVideoType===No.UploadOnly?d===Fo.Upload||d===Fo.ChargeOnly:false}).filter(u=>this.hideChargeOnlyVideos?!(u.modules?.module_dynamic?.major?.archive?.badge?.text===Fo.ChargeOnly):true).filter(u=>{if(this.filterMinDuration===Ps.All)return  true;const d=u.modules.module_dynamic.major.archive;return NC(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!==du)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:$e.DynamicFeed,uniqId:`${$e.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(os&&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:$ie},earlier:{added:false,content:"更早",getInsertIndex:aA(-1/0,nn().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:$e.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:$e.Separator,uniqId:"dynamic-feed-separator-earlier",content:i}),r.added=true);}}return n}}function aA(e,t){return n=>n.findIndex(r=>{if(r.api!==$e.DynamicFeed)return  false;const o=r.modules.module_author.pub_ts;return o>=e&&o<t})}function $ie(e){const t=e.findIndex(r=>r.api===$e.Live&&r.live_status===Mo.Streaming);return t!==-1?t:aA(nn().startOf("day").unix(),nn().endOf("day").unix())(e)}const ti=20,wm="ml-30px inline-flex items-center text-15px [&_svg]:mr-5px [&_svg]:mt--1px first:ml-0";class lA{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:$e.Separator,uniqId:`fav-collection-separator-${this.collectionId}`,content:v(Eie,{service:this})}}state=rn({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 lQ(this.collectionId,1),o=r?.medias||[],i=r?.info;await Nm(()=>this.loadUserAvatarFromSpaceAccInfo(o,t));let s=o.map(l=>({...l,api:$e.Fav,uniqId:`${$e.Fav}-collection:${this.collectionId}-${l.bvid}`,collection:r.info,from:"fav-collection"}));[dt.PubTimeDesc,dt.PubTimeAsc,dt.Shuffle].includes(this.itemsOrder)&&(s=Wv(s,dt.PubTimeDesc),s.forEach((l,c,u)=>{l.vol=u.length-c,l.volTooltip=F(we,{children:["按投稿时间 Vol.",l.vol]});})),s=Wv(s,this.itemsOrder),this.bufferQueue=s,this.loaded=true,this.state.firstBvid=s[0]?.bvid,this.state.info=_a(i),Dt.selectedFavCollectionDetailInfo=_a(i);}this.itemsOrder===dt.Shuffle&&(this.bufferQueue=Mr(this.bufferQueue));let n;return [n,this.bufferQueue]=[this.bufferQueue.slice(0,ti),this.bufferQueue.slice(ti)],n}async loadUserAvatarFromSpaceAccInfo(t,n){if(!t.length)return;const r=RT(t,s=>s.upper.mid),o=Object.entries(r).map(([s,a])=>({mid:s,count:a})),i=Qo(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 pC(s))?.face;l&&t.filter(c=>c.upper.mid.toString()===s).forEach(c=>{c.upper.face||=l;});}));}get extraTabbarView(){return v(rC,{})}}function Eie({service:e}){const{firstBvid:t,info:n}=rt(e.state);return F(we,{children:[v(Jt,{title:F(we,{children:["UP: ",n?.upper.name," ",v("br",{}),n?.intro||"简介: N/A"]}),children:F(su,{href:E5(e.collectionId),className:wm,children:[v(bo,{className:"size-16px"}),n?.title]})}),t&&F(su,{href:uQ(t),className:wm,children:[v(ku,{className:"size-16px"}),"播放全部"]})]})}function Iie({service:e}){return F(we,{children:[F(su,{href:Z1(e.entry.id,e.entry.attr),className:wm,children:[v(bo,{className:"size-16px"}),e.entry.title]}),F(su,{href:cQ(e.entry.id),className:wm,children:[v(ku,{className:"size-16px"}),"播放全部"]})]})}const Pie=[dt.FavTimeDesc,dt.PlayCountDesc,dt.PubTimeDesc];function pE(e){return Pie.includes(e)}const cA=wl("fav-folder-all-items");async function Mc(e){await cA.delete(e);}class uA{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!");pE(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:$e.Separator,uniqId:`fav-folder-separator-${this.folderId}`,content:v(Iie,{service:this.innerService})}}entry;innerService;assertInnerService(){Ri(this.innerService,"this.innerService should not be undefined"),Ri(this.entry,"this.entry should not be undefined");}async createService(){if(this.innerService)return;await oC();const t=Yn(Dt.folders).find(n=>n.id===this.folderId);Ri(t,`favStore.favFolders should have this entry[fid=${this.folderId}]`),this.entry=t,pE(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,ti);return this.bufferQueue=this.bufferQueue.slice(ti),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=Wv(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=na({fn:this._fetchAllItems,tableName:cA,generateKey:()=>`${this.folderId}`,ttl:Vn("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"&&z5(this.folderId,this.innerService.info.media_count);}get extraTabbarView(){return v(rC,{})}}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)){_t(o.message||ol);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:$e.Fav,uniqId:`${$e.Fav}-folder:${this.info?.id||this.entry.id}-${s.bvid}`}))}}class Nie{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(we,{children:[v(rC,{}),v(Roe,{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<ti)for(;this.hasMoreInService&&this.shuffleBufferQueue.length<ti*3;){const i=this.allServices.filter(l=>l.hasMore),s=Mr(i).slice(0,6),a=(await ji(s,async l=>await l.loadMore(t)||[],2)).flat().filter(l=>l.api!==$e.Separator);this.shuffleBufferQueue=Mr([...this.shuffleBufferQueue,...Mr(a)]);}const n=this.shuffleBufferQueue.slice(0,ti);return this.shuffleBufferQueue=this.shuffleBufferQueue.slice(ti),n}allFolderServices=[];state=rn({totalCountInFavFolders:0});serviceCreated=false;allServices=[];async createServices(){await oC();const{folders:t,collections:n}=_a(Yn(Dt));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 uA(i.id,this.addSeparator,o)));}this.allServices.push(...n.map(r=>new lA(r.id,this.addSeparator,this.itemsOrder))),this.serviceCreated=true;}}function VC(){const e=Yn(Dt);return {selectedKey:e.selectedKey,itemsOrder:nC(e.selectedKey,e.savedOrderMap),selectedFavFolderId:e.selectedFavFolderId,selectedFavCollectionId:e.selectedFavCollectionId,addSeparator:Ue.fav.addSeparator,excludedFolderIds:Ue.fav.excludedFolderIds}}function Mie(e){return {...e,get viewingAll(){return e.selectedKey==="all"},get viewingSomeFolder(){return typeof e.selectedFavFolderId=="number"},get viewingSomeCollection(){return typeof e.selectedFavCollectionId=="number"}}}class Bp extends ts{static PAGE_SIZE=ti;config;innerService;constructor(t){super(Bp.PAGE_SIZE),this.config=Mie(t);const{viewingAll:n,viewingSomeFolder:r,viewingSomeCollection:o}=this.config;if(n)this.innerService=new Nie(this.config.addSeparator,this.config.itemsOrder,this.config.excludedFolderIds);else if(r)this.innerService=new uA(this.config.selectedFavFolderId,this.config.addSeparator,this.config.itemsOrder);else if(o)this.innerService=new lA(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(Moe,{extraContent:n})}sidebarView=v(Aoe,{});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?z5(this.config.selectedFavFolderId,t=>t-1):this.config.viewingSomeCollection&&this.config.selectedFavCollectionId;}}async function jC({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:Rie(i.data.list||[])}:(po("getAllWatchlaterItems error %s, fulljson %o",i.message,i),{err:i.message})}function Rie(e){return e.filter(t=>!(t.title==="以下为更早添加的视频"&&t.aid===0&&t.bvid===""&&t.add_at===0))}async function Aie(e){const t=new FormData;t.append("resources",e.join(",")),t.append("csrf",Qs());const n=await ep({}),o=(await Tt.post("/x/v2/history/toview/v2/dels",t,{params:n})).data;return cn(o)?true:(_t(o?.message||"出错了"),false)}const Rc=rn({searchText:void 0});function Tie({service:e}){const{watchlaterAddSeparator:t,watchlaterItemsOrder:n,watchlaterUseNormalVideoUrl:r}=Mt(),o=jn(),{searchText:i}=rt(Rc,{sync:true}),s=aoe(),{recSharedEmitter:a}=Jr();Gi(()=>{(async()=>(await zt(100),o()))();},[t,n,r]);const{total:l}=rt(e.state),c=i?`共 ${l} 条搜索结果`:`共 ${l} 个视频`,u=typeof l=="number"&&v(Ir,{color:"success",style:{marginRight:0,marginTop:1,cursor:"pointer"},title:c,onClick:()=>{_t(`稍后再看: ${c}`);},children:l});return F("div",{className:"flex items-center gap-x-12px",children:[v(Fie,{}),v(Co.Search,{allowClear:true,placeholder:"搜索稍后再看",style:{width:180},value:i,onChange:d=>Rc.searchText=d.target.value,onSearch:d=>{Rc.searchText=d,o();}}),u,s&&v(Jt,{arrow:false,title:"移除稍后再看 (多选)",children:v(Je,{className:"icon-only-round-button",onClick:()=>kie(a),children:v(U6,{})})}),v(Ap,{})]})}const dA={[pr.AddTimeDesc]:{icon:v(Zc,{}),label:ac("最近添加"),helpInfo:"按添加时间倒序"},[pr.AddTimeAsc]:{icon:v(Zc,{}),label:ev("最早添加"),helpInfo:"按添加时间增序"},[pr.Shuffle]:{icon:v(W6,{}),label:"随机顺序",helpInfo:"不包括近期添加的稍后再看, 近期: 最近48小时内"}},fA=Object.values(pr),Oie=v("div",{className:"flex flex-col gap-y-4px",children:fA.map(e=>{const{icon:t,label:n,helpInfo:r}=dA[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 Fie(){const e=jn(),{ref:t,getPopupContainer:n}=ta(),{watchlaterItemsOrder:r}=Mt(),{searchText:o}=rt(Rc),i=!!o;return v(tC,{disabled:i,value:i?pr.AddTimeDesc:r,onChange:s=>{Ue.watchlaterItemsOrder=s,e();},list:fA,listDisplayConfig:dA,$ref:t,dropdownProps:{getPopupContainer:n},extraHelpInfo:Oie})}const _s=rn({updatedAt:0,bvidSet:xn()});function Bie(e){const t=rt(_s).bvidSet;return !!e&&t.has(e)}function mA(e){_s.updatedAt=Date.now(),_s.bvidSet=xn(e);}function Lie(e,t){_s.updatedAt&&_s.bvidSet.add(t);}async function Die(){if(!np()||!Br())return;const{items:e=[]}=await jC();e.length&&mA(e.map(t=>t.bvid));}Vo&&(async()=>(await ap(),await d4(Die,{retries:3,onFailedAttempt(e){po(`Try updateWatchlaterState ${e.attemptNumber} failed. There are ${e.retriesLeft} retries left`);}})))();async function kie(e){const t=Rp().map(s=>({item:s,cardData:rd(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 _t("没有选中的视频");await Aie(n)&&e.emit("remove-cards",[r,o]);}class hu extends ts{constructor(t,n,r,o){super(hu.PAGE_SIZE),this.searchText=o,this.innerService=t===pr.Shuffle&&!this.searchText?new hE(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(Tie,{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 hE?this.innerService.currentBvidIndexMap:void 0}}}function pA(e){return {...e,api:$e.Watchlater,uniqId:`${$e.Watchlater}-${e.bvid}`}}const hA=()=>nn().subtract(2,"days").unix(),x0={api:$e.Separator,uniqId:"watchlater-separator-recent",content:"近期"},w0={api:$e.Separator,uniqId:"watchlater-separator-earlier",content:"更早"};function gA(e){throw _t(`获取稍后再看失败: ${e}`),new Error(`获取稍后再看失败: ${e}`,{cause:e})}class hE{constructor(t,n){this.addSeparator=t,n?.size?(this.keepOrder=true,this.prevBvidIndexMap=n):this.keepOrder=false;}hasMore=true;state=rn({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 jC({asc:false,searchText:void 0,abortSignal:t});r!==void 0&&gA(r),mA(n.map(l=>l.bvid).filter(Boolean));const o=n.map(pA),i=hA(),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=Qo(c,[u=>this.prevBvidIndexMap?.get(u.bvid)??-1],["asc"]):c=Mr(c),a=[!!l.length&&this.addSeparator&&x0,...l,!!c.length&&this.addSeparator&&w0,...c].filter(Boolean);}return this.state.total=n.length,this.currentBvidIndexMap=new Map(a.filter(l=>l.api!==$e.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||Ri(t!==pr.Shuffle,"shuffle not supported in NormalOrderService");}firstPageLoaded=false;state=rn({total:void 0});hasMore=true;page=1;async loadMore(){if(!this.hasMore)return;const t=await jC({asc:this.order===pr.AddTimeAsc,searchText:this.searchText,extraParams:{need_split:"true",ps:20,pn:this.page}});if(t.err!==void 0){this.hasMore=false,gA(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&&Lie("add",s.bvid);});const i=n.map(pA);return this.insertSeparator(i)}recentSeparatorInserted=false;earlierSeparatorInserted=false;insertSeparator(t){if(!this.addSeparator)return t;let n=[...t];const r=hA(),o=t.some(s=>s.add_at<r),i=t.some(s=>s.add_at>=r);if(this.order===pr.AddTimeAsc){if(!this.earlierSeparatorInserted&&o&&(n=[w0,...n],this.earlierSeparatorInserted=true),!this.recentSeparatorInserted&&i){const s=n.findIndex(a=>a.api===$e.Watchlater&&a.add_at>=r);n=[...n.slice(0,s),x0,...n.slice(s)],this.recentSeparatorInserted=true;}}else if(!this.recentSeparatorInserted&&i&&(n=[x0,...t],this.recentSeparatorInserted=true),!this.earlierSeparatorInserted&&o){const s=n.findIndex(a=>a.api===$e.Watchlater&&a.add_at<r);n=[...n.slice(0,s),w0,...n.slice(s)],this.earlierSeparatorInserted=true;}return n}}function zie(){return {addOtherTabContents:Hu().appRecommend.addOtherTabContents}}const bA=e=>v(lt,{configPath:"appRecommend.addOtherTabContents",label:"显示来自其他 Tab 的内容",tooltip:F(we,{children:["显示来自其他 Tab 的内容 ",v("br",{}),"如动态 / 收藏 / 稍后再看 ",v("br",{}),"但是: 刷新时间会更长"]}),extraAction:async()=>{await zt(100),e?.();}});function Hie(){const e=jn();return v(we,{children:bA(e)})}class gu extends ts{constructor(t){super(gu.PAGE_SIZE),this.config=t,this.innerService=new Vie,this.allServices=[this.innerService],this.initOtherTabServices();}static PAGE_SIZE=20;tabbarView=v(Hie,{});sidebarView=void 0;innerService;allServices=[];otherTabServices=[];initOtherTabServices(){if(!np()||!this.config.addOtherTabContents)return;let t,n,r;{const s=a4();s.upMid=void 0,s.selectedGroupId=void 0;const a=HC(s);Object.assign(a,{showLiveInDynamicFeed:true,whenViewAllEnableHideSomeContents:false,searchCacheEnabled:false}),t=new Fp(a);}{const s=Object.assign(VC(),{selectedKey:"all",itemsOrder:dt.Shuffle,selectedFavFolderId:void 0,selectedFavCollectionId:void 0,addSeparator:false});n=new Bp(s);}r=new hu(pr.AddTimeDesc,false),this.otherTabServices=[t,n,r];const o=[],i=7/3;o.push(...this.otherTabServices),aO(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<gu.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!==$e.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 Vie{static PAGE_SIZE=16;hasMore=true;async getRecommend(){const t=await tp.get(`${y3}/x/v2/feed/index`,{timeout:2e4,responseType:"json",params:{build:"1",mobi_app:"iphone",device:"pad",idx:Math.floor(Date.now()/1e3)+FT(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(L0(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=Xi(r,i=>i.param),r.map(i=>({...i,api:$e.AppRecommend,uniqId:`${$e.AppRecommend}-${i.param}`}))}}async function jie(e,t){const{bvid:n,goto:r,recommendReason:o}=t,i=r==="av";return tl(e)&&i&&!!n&&_C(o)?(await XQ(n))?.pubdate:void 0}const Wie=({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"})]}),qie=f.forwardRef(Wie);function Uie(){const{dynamicFeed:e,appRecommend:t}=Mt(),n=$C(),r=o=>({order:n.indexOf(o)+1});return v("div",{className:ur.tabPane,children:F("div",{className:"grid grid-cols-[250px_1fr] gap-x-50px",children:[v(Sn,{title:F(we,{children:["Tab 设置",v(Mn,{className:"ml-5px",children:"勾选显示, 拖动排序"}),v("span",{className:"flex-1"}),v(Ro,{paths:["hidingTabKeys","customTabKeysOrder"]})]}),children:v(Kie,{})}),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:v(lt,{configPath:"enableSidebar",label:"使用侧边栏",tooltip:lr("使用侧边栏(如动态 分组/UP 选择)","使用下拉面板")})})]}),F("div",{style:r(ze.Watchlater),children:[F("div",{className:"flex items-center text-size-1.3em",children:[v(Oo,{tabKey:ze.Watchlater,className:"mr-5px mt--1px"}),"稍后再看"]}),F(Fr,{size:10,children:[v(lt,{configPath:"watchlaterAddSeparator",label:"添加分割线",tooltip:"添加「近期」「更早」分割线"}),v(lt,{configPath:"watchlaterUseNormalVideoUrl",label:"使用普通视频链接",tooltip:lr("使用普通视频链接","使用「稍后再看」自动列表链接")})]})]}),F("div",{style:r(ze.Fav),children:[F("div",{className:"flex items-center text-size-1.3em",children:[v(Oo,{tabKey:ze.Fav,className:"mr-5px mt--2px"}),"收藏"]}),v(Fr,{size:10,children:v(lt,{configPath:"fav.addSeparator",label:"添加分割线",tooltip:"顺序显示时, 按收藏夹添加分割线"})})]}),F("div",{style:r(ze.DynamicFeed),children:[F("div",{className:"flex items-center text-size-1.3em",children:[v(Oo,{tabKey:ze.DynamicFeed,className:"mr-5px mt--2px"}),"动态"]}),F("div",{className:"flex flex-wrap gap-x-10px gap-y-10px",children:[v(lt,{configPath:"dynamicFeed.followGroup.enabled",label:"启用分组筛选",tooltip:F(we,{children:["动态 Tab 启用分组筛选 ",v("br",{}),v(iA,{})]})}),v(lt,{configPath:"dynamicFeed.showLive",label:"在动态中显示直播",tooltip:F(we,{children:["动态里显示正在直播的 UP",v("br",{}),"P.S 仅在选择「全部」时展示"]})}),v(lt,{configPath:"dynamicFeed.whenViewAll.enableHideSomeContents",label:"「全部」动态过滤",tooltip:F(we,{children:["查看「全部」动态时 ",v("br",{}),lr("将添加右键菜单, 点击可添加到「全部」动态的过滤列表","关闭此功能")]})}),e.whenViewAll.enableHideSomeContents&&v(HP,{size:"small",className:"w-full",items:[{key:"1",label:"在「全部」动态中隐藏 UP/分组 的动态",children:v(Yie,{})}]})]})]}),F("div",{style:r(ze.AppRecommend),children:[F("div",{className:"flex items-center text-size-1.3em",children:[v(Oo,{tabKey:ze.AppRecommend,className:"mr-5px"}),"App 推荐"]}),v("div",{className:"flex flex-col gap-y-5px",children:v("div",{className:"flex items-center",children:bA()})})]})]})]})})}function Gie(){const{hidingTabKeys:e}=Mt();return f.useMemo(()=>Fy.filter(t=>!e.includes(t)),[e])}function Kie({className:e,style:t}){const n=Gie(),r=$C(),o=Ree(Mee(wC)),i=We(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=SC(r,c,u);vo({customTabKeysOrder:d});});return v("div",{className:e,style:t,children:v(Zr.Group,{className:"block line-height-[unset]",value:n,onChange:s=>{if(!s.length)return ft.error("至少选择一项!");vo({hidingTabKeys:Fy.filter(a=>!s.includes(a))});},children:v(Fte,{sensors:o,collisionDetection:Bee,onDragEnd:i,modifiers:[Wte,jte],children:v(Yte,{items:r,strategy:Kte,children:r.map(s=>v(Xie,{id:s},s))})})})})}function Xie({id:e}){const{attributes:t,listeners:n,setNodeRef:r,transform:o,transition:i,setActivatorNodeRef:s}=rne({id:e}),a={transform:lu.Transform.toString(o),transition:i},{label:l,desc:c}=Sl[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(Zr,{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(qie,{className:"size-18px"})})]},e)}function Yie(){const{hideIds:e}=rt(Ue.dynamicFeed.whenViewAll),t=We(async o=>{await ii("dynamicFeed.whenViewAll.hideIds",{remove:[o]});}),{groups:n}=rt(At);return br(()=>{At.updateGroups();}),e.length?v("div",{className:"max-h-250px flex flex-wrap gap-10px overflow-y-scroll",children:e.map(o=>v(FR,{tag:o,onDelete:t,renderTag:i=>v(Qie,{tag:i,followGroups:n})},o))}):v("div",{className:"flex items-center justify-center",children:v(jr,{})})}function Qie({tag:e,followGroups:t}){let n,r;e.startsWith(el)?n=e.slice(el.length):e.startsWith(Ds)&&(r=e.slice(Ds.length));const[o,i]=f.useState(void 0);br(async()=>{if(!n)return;const m=await Qu(n);m&&i(m);});const[s,a]=f.useState(void 0);br(()=>{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(xR,{className:"mr-2px size-12px"}):r?v(wR,{className:"mr-2px size-16px"}):void 0,[n,r]),d=f.useMemo(()=>n?Yu(n):r?SR(r):void 0,[n,r]);return v(we,{children:v(Jt,{title:c,children:F("span",{className:V("inline-flex items-center",n?"cursor-pointer":"cursor-text"),children:[u,d?v("a",{href:d,target:"_blank",children:l}):l]})})})}const vA=f.createContext({}),yA=f.createContext({}),CA=({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})},xA="hex",wA="rgb",SA="hsb",Ms=({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($c,{className:V(a,i),min:t,max:n,value:u,formatter:s,size:"small",onChange:d=>{c(d||0),o?.(d);}})},Zie=({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(Ms,{value:Ty(s),prefixCls:e,formatter:l=>`${l}%`,className:r,onChange:a})},Jie=/(^#[\da-f]{6}$)|(^#[\da-f]{8}$)/i,ese=e=>Jie.test(`#${e}`),tse=({prefixCls:e,value:t,onChange:n})=>{const r=`${e}-hex-input`,[o,i]=f.useState(()=>t?sc(t.toHexString()):void 0);f.useEffect(()=>{t&&i(sc(t.toHexString()));},[t]);const s=a=>{const l=a.target.value;i(sc(l)),ese(sc(l,true))&&n?.(_n(l));};return f.createElement(Il,{className:r,value:o,prefix:"#",onChange:s,size:"small"})},nse=({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(Ms,{max:360,min:0,value:Number(s.toHsb().h),prefixCls:e,className:r,formatter:l=>of(l||0).toString(),onChange:l=>a(Number(l),"h")}),f.createElement(Ms,{max:100,min:0,value:Number(s.toHsb().s)*100,prefixCls:e,className:r,formatter:l=>`${of(l||0)}%`,onChange:l=>a(Number(l),"s")}),f.createElement(Ms,{max:100,min:0,value:Number(s.toHsb().b)*100,prefixCls:e,className:r,formatter:l=>`${of(l||0)}%`,onChange:l=>a(Number(l),"b")}))},rse=({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(Ms,{max:255,min:0,value:Number(s.toRgb().r),prefixCls:e,className:r,onChange:l=>a(Number(l),"r")}),f.createElement(Ms,{max:255,min:0,value:Number(s.toRgb().g),prefixCls:e,className:r,onChange:l=>a(Number(l),"g")}),f.createElement(Ms,{max:255,min:0,value:Number(s.toRgb().b),prefixCls:e,className:r,onChange:l=>a(Number(l),"b")}))},ose=[xA,SA,wA].map(e=>({value:e,label:e.toUpperCase()})),ise=e=>{const{prefixCls:t,format:n,value:r,disabledAlpha:o,onFormatChange:i,onChange:s,disabledFormat:a}=e,[l,c]=Lt(xA,n),u=`${t}-input`,d=p=>{c(p),i?.(p);},m=f.useMemo(()=>{const p={value:r,prefixCls:t,onChange:s};switch(l){case SA:return f.createElement(nse,{...p});case wA:return f.createElement(rse,{...p});default:return f.createElement(tse,{...p})}},[l,t,r,s]);return f.createElement("div",{className:`${u}-container`},!a&&f.createElement(es,{value:l,variant:"borderless",getPopupContainer:p=>p,popupMatchSelectWidth:68,placement:"bottomRight",onChange:d,className:`${t}-format-select`,size:"small",options:ose}),f.createElement("div",{className:u},m),!o&&f.createElement(Zie,{prefixCls:t,value:r,onChange:s}))},$A=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=at(c),y=at(u),C=f__namespace.useMemo(()=>({onDragStart:b,onDragChange:y}),[]),x=at((S,I)=>{const{onFocus:$,style:E,className:P,onKeyDown:M}=S.props,N={...E};return r==="gradient"&&(N.background=TP(n,I.value)),f__namespace.cloneElement(S,{onFocus:A=>{l?.(I.index),$?.(A);},style:N,className:V(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(PM.Provider,{value:w},f__namespace.createElement(IM.Provider,{value:C},f__namespace.createElement(MM,{...p,className:V(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`}})))},sse=e=>{const{value:t,onChange:n,onChangeComplete:r}=e,o=s=>n(s[0]),i=s=>r(s[0]);return f__namespace.createElement($A,{...e,value:[t],onChange:o,onChangeComplete:i})};function gE(e){return Et(e).sort((t,n)=>t.percent-n.percent)}const ase=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=TP(u,x),S=Et(u);S.splice(C,0,{percent:x,color:w}),m.current=S;}else m.current=u;a(true),r(new mr(gE(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=gE(w)),r(new mr(w),true);},g=y=>{const C=Et(u);C.splice(y,1);const x=new mr(C);r(x),o(x);},b=y=>{o(new mr(u)),s>=y.length&&i(y.length-1),a(false);};return c?f__namespace.createElement($A,{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},lse=f__namespace.memo(ase),cse={slider:sse},bE=()=>{const e=f.useContext(vA),{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 mr("")},{percent:100,color:new mr("")}]: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]=W3(),$=x?.equals(C)?C:x;Kt(()=>{w(C);},[S,C?.toHexString()]);const E=(R,B)=>{let H=_n(R);if(s.cleared){const z=H.toRgb();if(!z.r&&!z.g&&!z.b&&B){const{type:_,value:W=0}=B;H=new mr({h:_==="hue"?W:0,s:1,b:1,a:_==="alpha"?W/100:1});}else H=sf(H);}if(t==="single")return H;const k=Et(h);return k[d]={...k[d],color:H},new mr(k)},P=(R,B,H)=>{const k=E(R,H);w(k.isGradient()?k.getColors()[d].color:k),l(k,B);},M=(R,B)=>{u(E(R,B)),I();},N=R=>{l(E(R));};let A=null;const D=r.length>1;return (i||D)&&(A=f.createElement("div",{className:`${o}-operation`},D&&f.createElement(n4,{size:"small",options:r,value:t,onChange:n}),f.createElement(CA,{prefixCls:o,value:s,onChange:R=>{l(R),c?.();},...p}))),f.createElement(f.Fragment,null,A,f.createElement(lse,{...e,colors:h}),f.createElement(Pk,{prefixCls:o,value:$?.toHsb(),disabledAlpha:a,onChange:(R,B)=>{P(R,true,B);},onChangeComplete:(R,B)=>{M(R,B);},components:cse}),f.createElement(ise,{value:C,onChange:N,prefixCls:o,disabledAlpha:a,...p}))},vE=()=>{const{prefixCls:e,value:t,presets:n,onChange:r}=f.useContext(yA);return Array.isArray(n)?f.createElement(E_,{value:t,presets:n,prefixCls:e,onChange:r}):null},use=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(bE,null),Array.isArray(n)&&f.createElement(Za,null),f.createElement(vE,null));return f.createElement(vA.Provider,{value:S},f.createElement(yA.Provider,{value:I},f.createElement("div",{className:w},typeof r=="function"?r($,{components:{Picker:bE,Presets:vE}}):$)))},dse=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]=ir("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:V(p,S&&`${p}-inactive`)},x.color.toRgbString()," ",x.percent,"%")});const y=n.toHexString().toUpperCase(),C=Ty(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(CA,{prefixCls:r}):f.createElement(Ay,{prefixCls:r,color:n.toCssString()}),[n,r]);return f.createElement("div",{ref:t,className:V(d,a,{[`${d}-active`]:o,[`${d}-disabled`]:i}),...rr(u)},b,l&&f.createElement("div",{className:m},g))});function fse(e,t,n){const[r]=ir("ColorPicker"),[o,i]=Lt(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=at(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 EA=(e,t)=>({backgroundImage:`conic-gradient(${t} 25%, transparent 25% 50%, ${t} 50% 75%, transparent 75% 100%)`,backgroundSize:`${e} ${e}`}),yE=(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",...EA("50%",e.colorFillSecondary),[`${n}-color-block-inner`]:{width:"100%",height:"100%",boxShadow:`inset 0 0 0 ${X(i)} ${s}`,borderRadius:"inherit"}}}},mse=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}}}}}},pse=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}`}}},hse=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}}}},gse=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`]:[EA(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}}}},S0=(e,t,n)=>({borderInlineEndWidth:e.lineWidth,borderColor:t,boxShadow:`0 0 0 ${X(e.controlOutlineWidth)} ${n}`,outline:0}),bse=e=>{const{componentCls:t}=e;return {"&-rtl":{[`${t}-presets-color`]:{"&::after":{direction:"ltr"}},[`${t}-clear`]:{"&::after":{direction:"ltr"}}}}},CE=(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}}}},vse=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`]:{...S0(e,n,s)}},[`&${t}-status-warning`]:{borderColor:r,"&:hover":{borderColor:i},[`&${t}-trigger-active`]:{...S0(e,r,a)}}}},yse=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)}}}},Cse=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`]:{...pse(e)},...gse(e),...yE(e,y),...mse(e),...hse(e),...CE(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`]:{...S0(e,o,$)},"&-disabled":{color:a,background:c,cursor:"not-allowed","&:hover":{borderColor:g},[`${n}-trigger-text`]:{color:a}},...CE(e,h),...yE(e,h),...vse(e),...yse(e)},...bse(e)}},ul(e,{focusElCls:`${n}-trigger-active`})]},xse=wt("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 Cse(o)}),WC=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:D,autoAdjustOverflow:R=true,destroyTooltipOnHide:B,destroyOnHidden:H,disabledFormat:k,...z}=e,{getPrefixCls:_,direction:W,className:O,style:L,classNames:j,styles:Y}=$t("colorPicker"),q=f.useContext(kn),U=d??q,K=_("color-picker",w),{compactSize:J,compactItemClassnames:Q}=li(K,W),G=Hn(Me=>C??J??Me),ee={...e,trigger:c,allowClear:s,autoAdjustOverflow:R,disabledAlpha:$,arrow:p,placement:m,disabled:U,size:G},[oe,re]=It([j,I],[Y,S],{props:ee},{popup:{_default:"root"}}),[he,Z]=Lt(false,u),te=!U&&he,[ce,ue]=Lt(i,o),Ee=Me=>{ue(Me),ce!==Me&&E?.(Me);},Re=Me=>{(!Me||!U)&&(Z(Me),N?.(Me));},[be,le,ae,ye,Se]=fse(r,n,t),He=f.useMemo(()=>Ty(be)<100,[be]),[Le,Ae]=f.useState(null),_e=Me=>{if(A){let se=_n(Me);$&&He&&(se=sf(Me)),A(se);}},Te=(Me,se)=>{let ge=_n(Me);$&&He&&(ge=sf(ge)),le(ge),Ae(null),P&&P(ge,ge.toCssString()),se||_e(ge);},[Ce,Pe]=f.useState(0),[De,Oe]=f.useState(false),Ne=Me=>{if(ye(Me),Me==="single"&&be.isGradient())Pe(0),Te(new mr(be.getColors()[0].color)),Ae(be);else if(Me==="gradient"&&!be.isGradient()){const se=He?sf(be):be;Te(new mr(Le||[{percent:0,color:se},{percent:100,color:se}]));}},{status:Qe}=f.useContext(Qn),mt=sn(K),[it,ct]=xse(K,mt),bt={[`${K}-rtl`]:W},pt=V(oe.root,x,ct,mt,bt),nt=V(qi(K,Qe),{[`${K}-sm`]:G==="small",[`${K}-lg`]:G==="large"},Q,O,pt,y,it),et=V(K,pt,oe.popup?.root),Xe={open:te,trigger:c,placement:m,arrow:p,rootClassName:x,getPopupContainer:D,autoAdjustOverflow:R,destroyOnHidden:H??!!B},Ie={...re.root,...L,...b};return f.createElement(_o,{classNames:{root:et},styles:{root:re.popup?.root,container:S?.popupOverlayInner},onOpenChange:Re,content:f.createElement(zi,{form:true},f.createElement(use,{mode:ae,onModeChange:Ne,modeOptions:Se,prefixCls:K,value:be,allowClear:s,disabled:U,disabledAlpha:$,presets:a,panelRender:h,format:ce,onFormatChange:Ee,onChange:Te,onChangeComplete:_e,onClear:M,activeIndex:Ce,onActive:Pe,gradientDragging:De,onGradientDragging:Oe,disabledFormat:k})),...Xe},l||f.createElement(dse,{activeIndex:te?Ce:-1,open:te,className:nt,style:Ie,prefixCls:K,disabled:U,showText:g,format:ce,...z,color:be}))},wse=jy(WC,void 0,e=>({...e,placement:"bottom",autoAdjustOverflow:false}),"color-picker",e=>e);WC._InternalPanelDoNotUseOrYouWillBeFired=wse;function bu({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 Sse(){const e=oM().id,t=N1(e),{colorPickerThemeSelectedColor:n}=Mt(),[r,o]=f.useState(n||Ya.colorPrimary),i=f.useMemo(()=>typeof r=="string"?r:r.toHexString(),[r]);return br(()=>{Zm.updateThrottled();}),v("div",{children:rM.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:V("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:kt("width:",p,"px;background-color:",d?i:c.colorPrimary,";",""),children:u&&v(bu,{size:18,useAnimation:m})})});c.isCustom&&(g=v(WC,{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||S$[c.id])&&(b=v(Jt,{title:F(we,{children:[c.tooltip,S$[c.id]]}),color:c.colorPrimary,children:b})),b=v(f.Fragment,{children:b},c.id),b})})]},s))})}function xE(e,t,n){return Ur(e,r=>{if(di())return;const i=!!!tr(Ue,t);rl(Ue,t,i),ft.success(`已${i?"启用":"禁用"}「${n}」`);},{exactMatch:true})}const $se="basic",wE=rn({tab:$se});function Ese(){return xE(["shift.p"],"videoCard.imgPreview.autoPreviewWhenKeyboardSelect","键盘选中后自动开始预览"),xE(["shift.m"],"videoCard.imgPreview.autoPreviewWhenHover","鼠标悬浮后自动开始预览"),TZ(),null}const Ise={name:"4k370z",styles:"&.ant-tabs{.ant-tabs-tab{justify-content:end;padding-inline:5px 15px;}.ant-tabs-nav-operations{display:none;}}"};function Pse({show:e,onHide:t}){const{tab:n}=rt(wE);return F(qu,{show:e,onHide:t,hideWhenMaskOnClick:true,hideWhenEsc:true,width:900,clsModal:"max-h-unset",children:[F("div",{className:nr.modalHeader,children:[F("div",{className:nr.modalTitle,children:[v(V6,{className:"mr-4px mt--2px size-26px"}),"设置"]}),v(Uu,{onClick:t})]}),v("main",{className:nr.modalBody,style:{overflow:"hidden"},children:v(EM,{tabPlacement:"start",size:"middle",css:Ise,activeKey:n,onChange:r=>wE.tab=r,items:[{label:"常规设置",key:"basic",children:v(AZ,{})},{label:"内容过滤",key:"filter",children:v(fee,{})},{label:"主题选择",key:"theme-select",children:v("div",{className:ur.tabPane,children:v(Sse,{})})},{label:"样式自定",key:"custom-ui",children:v(OZ,{})},{label:"Tab 设置",key:"video-source-tab-config",children:v(Uie,{})},{label:"其他页面",key:"other-pages",children:v(pee,{})},{label:"高级设置",key:"advance",children:v(OK,{})}]})})]})}const Nse=({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"})]}),IA=f.forwardRef(Nse),Mse=f.forwardRef(function({children:t,initialOpen:n=false},r){const[o,i]=YN(n);f.useImperativeHandle(r,()=>i,[i]);const s=v(Je,{onClick:i.toggle,className:"icon-only-round-button",children:v(IA,{className:V("size-13px",o?"rotate-z-0":"rotate-z-180deg")})});return F(we,{children:[s,o&&t]})});function PA({Component:e,defaultProps:t,containerClassName:n}){const r=rn(t);function o(){const l=rt(r);return v(e,{...l})}const i=xu(()=>{const l=document.createElement("div");l.className=V(Ho,n),document.body.appendChild(l),jo.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 Sm=F6();function Rse(){return rt(Sm)}function Ase(e){const t=Rse();return e?t.get(e):void 0}function Tse(e){Sm.delete(e);}const Ose={show:false,reasons:[],onHide:Bse,okAction:void 0},{proxyProps:Fse,updateProps:NA}=PA({Component:Dse,containerClassName:"show-dislike-container",defaultProps:Ose}),MA=new Or;function Bse(){MA.emit("modal-close"),NA({show:false,reasons:[],okAction:void 0});}async function Lse(e,t){NA({show:true,reasons:e,okAction:t}),await MA.once("modal-close");}const RA=function(){return rt(Fse).show};function Dse({show:e,reasons:t,onHide:n,okAction:r}){const o=f.useRef(null),i=()=>!!e&&!!t?.length,s=Ki(async p=>r?.(p),{manual:true}),a=s.loading,[l,c]=f.useState(t.length-1);Kq(()=>{c(t.length-1);},[t]);const u=["1","2","3","4","5","6"];Ur(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=We(p=>{if(!i()||di())return;const h=t.length;let g=l+p;g<0&&(g=g%h+h),g>h-1&&(g=g%h),c(g);});Ur("uparrow",()=>d(-1),{exactMatch:true}),Ur("downarrow",()=>d(1),{exactMatch:true});const m=Wu(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 Ur("enter",m,{exactMatch:true}),F(qu,{show:e,onHide:n,hideWhenMaskOnClick:true,hideWhenEsc:true,width:350,clsModal:"rounded-15px",children:[F("div",{className:nr.modalHeader,children:[F("div",{className:nr.modalTitle,children:[v(o1,{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(Uu,{onClick:n})]}),v("div",{className:nr.modalBody,ref:o,children:v(mp,{spinning:a,indicator:BR,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:V("reason",{active:g},"relative flex items-center b-2px rounded-6px b-solid py-12px",g?"b-gate-primary":"b-gate-border"),disabled:a,onClick:()=>{c(h);},children:[v("span",{"data-cls":"reason-no",className:"ml-6px size-20px flex flex-none items-center justify-center rounded-full bg-gate-primary color-white",children:h+1}),v("span",{className:"flex-1 px-4px",children:p.name}),v("span",{className:"mr-6px size-20px flex-none",children:g&&v(bu,{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 kse=({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"})]}),qC=f.forwardRef(kse),_se={show:false,srcFavFolderId:void 0,onHide:Hse,okAction:void 0},{proxyProps:zse,updateProps:AA}=PA({Component:Vse,containerClassName:"ModalMoveFav",defaultProps:_se});function TA(){return rt(zse).show}const OA=new Or;function Hse(){AA({show:false}),OA.emit("modal-close");}async function $m(e,t){AA({show:true,srcFavFolderId:e,okAction:t}),await OA.once("modal-close");}function Vse({show:e,onHide:t,srcFavFolderId:n,okAction:r}){const o=Ki(iC,{manual:true}),i=Ki(async p=>r?.(p),{manual:true}),[s,a]=f.useState(void 0),[l,c]=f.useState(void 0);f.useEffect(()=>{e&&o.run();},[e]),Ur("r",()=>{e&&(di()||o.run(true));},{exactMatch:true});const{folders:u}=rt(Dt),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=>wT.match(y.title,l));return Xi([...h,...g,...b],y=>y.id)},[u,l]),m=We(async()=>{if(!s)return ft.error("请选择一个收藏夹");await i.runAsync(s)&&t();});return F(qu,{show:e,onHide:t,hideWhenMaskOnClick:true,hideWhenEsc:true,width:900,clsModal:"rounded-15px",children:[F("div",{className:nr.modalHeader,children:[F("div",{className:"flex shrink-0 items-center",children:[F("div",{className:nr.modalTitle,children:[v(qC,{className:"size-25px"}),v("span",{className:"ml-5px",children:"选择目标收藏夹"})]}),v(Co,{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:V({"text-red":u.length&&!d.length}),children:d.length})," ","/ ",v("span",{children:u.length})]}),F(Mn,{className:"ml-5px",children:["1. 使用 ",v("kbd",{className:s0,children:"r"})," 刷新收藏夹 ",v("br",{}),"2. 使用 ",v("kbd",{className:s0,children:"esc"})," 取消操作, 关闭窗口 ",v("br",{}),"3. 使用 拼音 / 首字母 过滤收藏夹标题 ",v("br",{})]})]}),v(Uu,{onClick:t})]}),v("div",{className:V(nr.modalBody),children:v(mp,{spinning:o.loading||i.loading,indicator:BR,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:V({active:g},"relative flex items-center b-2px b-gate-border rounded-6px b-solid bg-transparent 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:"ml-6px size-24px flex-center flex-none rounded-full bg-gate-bg-lv-2 text-center text-size-12px color-gate-text",children:p.vol}),F("span",{className:"flex-1 px-4px",children:[p.title," (",p.media_count,")"]}),v("span",{className:"mr-6px size-20px flex-none",children:g&&v(bu,{className:"h-100% w-100% color-white",useAnimation:true})})]},p.id)}):v(jr,{className:"grid-col-span-full",image:jr.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/${Br()}/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 $0=new Map,Vd=new WeakMap,SE=0,jse;function Wse(e){return e?(Vd.has(e)||(SE+=1,Vd.set(e,SE.toString())),Vd.get(e)):"0"}function qse(e){return Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>`${t}_${t==="root"?Wse(e.root):e[t]}`).toString()}function Use(e){const t=qse(e);let n=$0.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},$0.set(t,n);}return n}function Gse(e,t,n={},r=jse){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}=Use(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(),$0.delete(o));}}function Kse({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=Gse(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 Xse(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 Kr(e){const[t,n,r]=Xse(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 E0(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 $E(e){return !f.Children.toArray(e.props.children).length}function FA({src:e,avif:t,webp:n,imgProps:r,className:o,...i}){return t??=!Ys,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 Yse=typeof unsafeWindow<"u"?unsafeWindow:globalThis,UC=(e,t)=>{Pm(()=>Yse[e]=t);},Qse=`${W0}_gridItems`;function Zse(e){const t=e.filter(n=>n.api!==$e.Separator);coe(t),UC(Qse,t);}const Jse={getGenericCardDatas:RC,copyBvidsSingleLine:AC,copyBvidInfos:OC};setTimeout(()=>{Object.entries(Jse).forEach(([e,t])=>{UC(`${W0}_${e}`,t);});});function eae(e){const{enabled:t,keywords:n}=rt(Ue.filter.byAuthor),{blockUpMids:r}=f.useMemo(()=>MR(n),[n]);return e?t&&r.has(e):false}async function tae(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 v0(d,[m=>nae(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 v0(a.data?.dash?.video||[],["id","codecid"],["desc","desc"]).map(d=>l([d.baseUrl,...d.backupUrl||[]])[0]).filter(Boolean)}function nae(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 GC(e){return !!(e?.image?.length&&e?.index?.length)}function EE(e){return cn(e)?GC(e.data):true}async function rae(e){const n=(await Tt.get("/x/player/videoshot",{params:{bvid:e,index:"1"}})).data;return cn(n)||po("videoshot error for %s: %o",e,n),GC(n.data)||po("videoshot data invalid bvid=%s: %o",e,n.data),n}const Ng=new LC({maxSize:1e4}),oae=ci(async e=>{if(Ng.has(e)){const s=Ng.get(e);if(s)return s}const t=5,n=200;let r=0,o;do{if(r++,o=await rae(e),EE(o))break;await zt(n);}while(r<t);EE(o)&&Ng.set(e,o);const i=o.data;if(Ue.videoCard.imgPreview.autoPreviewWhenHover){const s=i?.image||[];await dE(s[0]),(async()=>{for(const a of s.slice(1))await dE(a);})();}return o}),iae=zn.extend("VideoCard:services");function BA(e){return async function(n){const r=new URLSearchParams({aid:n,csrf:Qs()}),i=(await Tt.post(`/x/v2/history/toview/${e}`,r)).data,s=cn(i);return s||_t(i?.message||"出错了"),s}}const I0=BA("add"),sae=BA("del"),LA=e=>{const t={dislike:"/x/feed/dislike",cancel:"/x/feed/dislike/cancel"}[e];return async function(n,r){const i=(await tp.get(y3+t,{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||=Su,a+=`(code ${i.code})`,a+=`
请重新获取 access_key 后重试`),{success:s,json:i,message:a}}},aae=LA("dislike"),lae=LA("cancel");async function cae(e){return {videoshotJson:await oae(e)}}function uae(e){return GC(e?.videoshotJson?.data)}const dae=e=>!!e?.playUrls?.length,IE=new LC({maxSize:1e4,maxAge:Vn("1h")}),fae=ci(async({bvid:e,cid:t,useMp4:n,usePreferredCdn:r,aspectRatioFromItem:o})=>{const i=JSON.stringify([e,n,r]),s=IE.get(i);if(s)return s;let a;if(t===void 0||o===void 0){const u=await V5(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 Nm(()=>tae(e,t,n,r));if(iae("playUrl: bvid=%s cid=%s %s",e,t,c),l)throw Qc.error({title:"获取视频播放地址失败",description:l.message||l}),l;return c?.length&&IE.set(i,{playUrls:c,dimension:a}),{playUrls:c??void 0,dimension:a}}),Ca=await( Zy({volume:void 0,muted:void 0},"large-preview-store")),mae=f.forwardRef(({currentTimeRef:e,...t},n)=>{const r=U5(n),o=f.useRef(false);br(()=>{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=We(()=>{o.current&&(e.current=r.current?.currentTime);}),s=We(()=>{o.current&&r.current&&(Ca.volume=r.current.volume,Ca.muted=r.current.muted);});return v("video",{ref:r,...t,onTimeUpdate:i,onVolumeChange:s})}),pae=zn.extend("VideoCard:LargePreview"),DA={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"}},Un={border:40,card:10};function hae(e){return e.closest(`.${xs}`)?.querySelector(`.${x3}`)?.getBoundingClientRect()??e.closest(".bili-video-card")?.querySelector(".bili-video-card__image")?.getBoundingClientRect()}const gae=f.forwardRef(({children:e,aspectRatio:t=1.7777777777777777,getCoverRect:n=hae,...r},o)=>{const i=f.useRef(null),s=U5(o),[a,l]=f.useState(false),[c,u]=f.useState(void 0),d=We(()=>{l(false),u(void 0);}),m=We(()=>{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=Qo(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];pae("picked direction",M);const{direction:N,bbox:A,scale:D,scaleLimit:R}=M;let B,H;if(R==="width")B=Math.floor(A.width-(Un.card+Un.border)),H=B/t;else if(R==="height")H=Math.floor(A.height-(Un.card+Un.border)),B=H*t;else throw new Error("unexpected scaleLimit");let k=0,z=0,_=0,W=0;const O=()=>{_=w.y+w.height/2-z;},L=()=>{W=w.x+w.width/2-k;},j=()=>{if(k<Un.border){k=Un.border;return}if(k+B>S-Un.border){k=S-Un.border-B;return}},Y=()=>{if(z<Un.border){z=Un.border;return}if(z+H>I-Un.border){z=I-Un.border-H;return}};switch(N){case "top":k=w.x+w.width/2-B/2,z=w.top-Un.card-H,j(),L();break;case "bottom":k=w.x+w.width/2-B/2,z=w.bottom+Un.card,j(),L();break;case "right":k=w.right+Un.card,z=w.y+w.height/2-H/2,Y(),O();break;case "left":k=w.left-Un.card-B,z=w.y+w.height/2-H/2,Y(),O();break}k=Math.floor(k),z=Math.floor(z),l(true),u({direction:N,elWidth:B,elHeight:H,elPosX:k,elPosY:z,arrowTop:_,arrowLeft:W});}),p=f.useMemo(()=>zs(m,100),[m]);br(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}=DA[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:[kt("display:",a?"block":"none",";",""),c&&kt("position:fixed;z-index:",FN,";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(bae,{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:kt("box-shadow:0px 0px 1px 1px ",Ui,";",""),children:e})]})});return F(we,{children:[y,Ys?vT.createPortal(C,document.body):C]})});function bae({size:e,direction:t,arrowTop:n,arrowLeft:r}){const{axis:o,multiplier:i,reverse:s}=DA[t],a=f.useMemo(()=>o==="x"?kt`
        ${t}: 100%;
        margin-${t}: -1px;
        top: ${n}px;
        margin-top: -${e/2}px;
      `:kt`
        ${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:[kt("border:",e,"px solid transparent;",""),a,kt`
          border-${t}-color: ${Ui};
        `,"",""]})}const vae=({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"})]}),yae=f.forwardRef(vae),Cae=({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"})]})]}),xae=f.forwardRef(Cae);function PE(e){e.current!==void 0&&(clearTimeout(e.current),e.current=void 0);}function kA({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}=rt(Ue.videoCard.videoPreview),b=Kr(void 0),y=Wu(async()=>{if(!e||dae(b.val))return;const G=await fae({bvid:i,cid:s,useMp4:p,usePreferredCdn:g,aspectRatioFromItem:c});b.set(G);});Gi(()=>{b.set(void 0);},[p,g]);const C=Ki(y,{manual:true,loadingDelay:100}),[x,w]=f.useState(false),S=Kr(void 0),I=Kr(void 0),$=Kr(void 0),E=E0({}),P=We(()=>$.val?Date.now()-$.val<1200:false),M=f.useRef(void 0),N=f.useRef(void 0),A=We(()=>{PE(M),PE(N);}),D=We((G,ee)=>{w(true),S.set(G),I.set(ee),l.emit("show-large-preview",a),$.set(void 0);}),R=We(()=>{w(false),S.set(void 0),I.set(void 0),$.set(Date.now());});cr(l,"show-large-preview",G=>{G!==a&&(A(),R());});const B=We(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(()=>D("hover",G),ee):D("hover",G);}),H=We(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();}),k=We(G=>{A(),S.val==="click"?R():D("click",G);}),z=We(()=>{if(j.current)return Math.floor(j.current)}),_=We(()=>!!(x||P())),W=We(()=>{if(!i)return;const G=new URL(`https://${Li.Main}/video/${i}`),ee=z();ee&&G.searchParams.set("t",ee.toString()),Po(G.href),L.current?.pause(),R();}),O=f.useMemo(()=>lC({dimensionFromApi:b.state?.dimension})?.aspectRatio??c,[b.state?.dimension]),L=f.useRef(null),j=f.useRef(void 0),Y=f.useRef(null),q=x&&!!b.state?.playUrls?.length,U=q&&F(gae,{ref:Y,aspectRatio:O,onMouseEnter:G=>B("popover"),onMouseLeave:G=>H("popover"),children:[v(mae,{ref:L,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(To,{inlinePosition:"right",icon:v(lZ,{className:"size-14px"}),tooltip:"关闭",onClick:G=>{G.preventDefault(),G.stopPropagation(),R();}}):v(To,{inlinePosition:"right",icon:v(yae,{className:"size-14px"}),tooltip:"固定",onClick:G=>{G.preventDefault(),G.stopPropagation(),k("popover-action-button");}}),v(To,{inlinePosition:"right",icon:v(K5,{className:"size-14px"}),tooltip:"新窗口打开",onClick:G=>{G.preventDefault(),G.stopPropagation(),W();}})]})]}),K=t&&e&&v(To,{css:o,...r,visible:n,active:q,inlinePosition:"right",icon:C.loading?v(q6,{className:"size-16px"}):v(xae,{className:"size-15px"}),tooltip:S.state==="click"&&x?"关闭浮动预览":"浮动预览",onMouseEnter:G=>B("video-card-action-button"),onMouseLeave:G=>H("video-card-action-button"),onClick:G=>{G.preventDefault(),G.stopPropagation(),k("video-card-action-button");}},"video-card-action-button");Ur("esc",()=>{di()||R();},{exactMatch:true}),Dq(()=>R(),[d?()=>d?.current?.closest(`.${xs}`):void 0,Y].filter(Boolean)),mo("fullscreenchange",()=>{document.fullscreenElement&&(!x||S.val==="click"||document.fullscreenElement===L.current&&D("click","popover-video-fullscreen-button"));},{target:document});const J=f.useRef(null),Q=m||J;return mo("mouseenter",()=>{!h||!m||B("video-card");},{target:Q}),mo("mouseleave",()=>{!h||!m||H("video-card");},{target:Q}),{largePreviewActionButtonEl:K,largePreviewEl:U,getLargePreviewCurrentTime:z,shouldUseLargePreviewCurrentTime:_,largePreviewVisible:x,hideLargePreview:R}}function wae(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 Sae(e,t){return wae(e,{deltaL:t})}const $ae=Sae(Ui,.1),Vr={normalBorder:kt("border-color:",x1,";",""),activeBorder:kt("border-color:",Ui,";box-shadow:0px 0px 9px 4px ",$ae,";",""),rounded:kt("border-radius:",C1,";",""),bgLv1:kt("background-color:",lv,";",""),coverZoomEffect:{name:"dj03ws",styles:".bili-video-card__cover{transform-origin:center center;transition:transform 0.2s ease-out;transform:scale(1.05);}"}},Eae=kt(Vr.activeBorder," &:hover{",Vr.activeBorder,";}","");function Iae(e){const t=`--${Zn}-separator-color`;return f.useMemo(()=>{if(e)return kt`
      ${Vr.rounded}
      ${Vr.normalBorder}

      background-color: ${qW};
      ${t}:  ${lv};
      &:hover {
        background-color: ${lv};
        ${t}: ${UW};
      }

      /* disable padding */
      margin-inline: 0;
      .bili-video-card__wrap {
        padding: 0;
      }
    `},[e])}var Pae={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 _A(){const{useDelayForHover:e,style:{videoCard:{useBorder:t,useBorderOnlyOnHover:n,useBoxShadow:r}}}=Mt(),{multiSelecting:o}=rt(Qt),i=jk();return f.useMemo(()=>[Pae,(o||t&&!i)&&[kt("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 Nae(e){return e&&[Vr.rounded,Vr.activeBorder]}const Mae="_skeleton-active_wlycr_12";function Rae(e,t){const[n,r]=f.useState(void 0),[o,i]=f.useState(void 0),[s,a]=f.useState(void 0),l=We(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 Aae(e,t,n){if(!Np(t)||!n)return [];const r=e.folderNames??[],o=e.folderUrls??[],i=e.folderIds??[],s=qr([{key:"watchlater-faved:browse-fav-folder",icon:v(YH,{className:"size-15px color-gate-primary"}),label:`已收藏在 ${(r||[]).map(c=>`「${c}」`).join("")}`,onClick(){o.forEach(c=>{window.open(c,Gv());});}},{key:"watchlater-faved:move-fav",icon:v(qC,{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 $m(u,async d=>{const m=await Mi.moveFavs(c,u,d.id);if(m)return Mc(u),Mc(d.id),ft.success(`已移动到「${d.title}」收藏夹`),m});}}]),a=qr([{key:"watchlater:add-quick-fav",icon:v(Oi,{className:"size-15px"}),label:"收藏到「默认收藏夹」",async onClick(){await Mi.addFav(n)&&ft.success(`已加入收藏夹「${qv}」`);}},{key:"watchlater:add-fav",icon:v(Oi,{className:"size-15px"}),label:"收藏到",async onClick(){await $m(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 Tae({item:e,cardData:t,tab:n,multiSelectingAppendix:r,onRemoveCurrent:o,recSharedEmitter:i}){return ks(e)?e.from==="fav-folder"?qr([{key:"open-fav-folder",label:"浏览收藏夹",icon:v(bo,{className:"size-15px"}),onClick(){const{id:s}=e.folder,a=n!==ze.Fav||Dt.selectedKey==="all"&&Dt.usingShuffle?`/?${cm.FolderIdFull}=${s}`:Z1(s);window.open(a,Gv());}},{key:"move-fav",label:`移动到其他收藏夹${r}`,icon:v(qC,{className:"size-13px"}),async onClick(){let s,a,l,c;if(Qt.multiSelecting){const u=Rp().filter(m=>ks(m)&&m.from==="fav-folder"),d=new Set(u.map(m=>m.folder.id));if(!d.size)return _t("至少选择一项视频");if(d.size>1)return _t("多选移动: 只能批量移动同一源收藏夹下的视频");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 $m(e.folder.id,async u=>{const d=await Mi.moveFavs(s,a,u.id);if(d)return Mc(e.folder.id),Mc(u.id),i.emit("remove-cards",[l,c,true]),ft.success(`已移动 ${l.length} 个视频到「${u.title}」收藏夹`),d});}},{key:"remove-fav",label:"移除收藏",icon:v(Jm,{className:"size-15px"}),async onClick(){if(!await n1.confirm({centered:true,title:"移除收藏",content:F(we,{children:["确定将视频「",e.title,"」",v("br",{}),"从收藏夹「",e.folder.title,"」中移除?"]})}))return;const a=`${e.id}:${e.type}`;await Mi.removeFavs(e.folder.id,a)&&(Mc(e.folder.id),o?.(e,t));}}]):e.from==="fav-collection"?qr([{key:"open-fav-collection",label:"浏览合集",icon:v(bo,{className:"size-15px"}),onClick(){const{id:s}=e.collection,a=n!==ze.Fav||Dt.selectedKey==="all"&&Dt.usingShuffle?`/?${cm.CollectionIdFull}=${s}`:E5(s);window.open(a,Gv());}}]):[]:[]}const Oae=({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"})]})]}),Fae=f.forwardRef(Oae),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"})]})]}),Lae=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"})]})]}),kae=f.forwardRef(Dae),Gn="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}=rt(Ue.dynamicFeed.whenViewAll),{recSharedEmitter:I}=Jr(),$=We(()=>{let j=y;y.startsWith("/")&&(j=new URL(y,location.href).href),$s(j);}),E=!!w&&eA(e.api)&&n!==ze.KeepFollowOnly,P=We(async()=>{if(!w)return ft.error("UP mid 为空!");await v4.add(w)&&ft.success(`已加入黑名单: ${x}`);}),M=We(async()=>{if(!w)return ft.error("UP mid 为空!");const j=`${w}`;if(Ue.filter.byAuthor.keywords.includes(j))return _t(`已在过滤名单中: ${j}`);await ii("filter.byAuthor.keywords",{add:[j]}),x&&A2(w,x),ft.success(`已加入过滤名单: ${x||w}`);}),N=t.followed??(e.api===$e.DynamicFeed||(e.api===$e.AppRecommend||e.api===$e.PcRecommend)&&_C(C)),A=N,D=We(async()=>{if(!w||!await n1.confirm({centered:true,title:"取消关注",content:F(we,{children:["确定取消关注「",x,"」?"]})}))return;await _oe.unfollow(w)&&ft.success("已取消关注");}),R=(r||mu(e))&&!!w&&!!x,B=We(()=>{if(!R)return;const j=`/?${Wr.Mid}=${w}`;Po(j);}),H=We(()=>{if(!R)return;const j=`/?${Jo.Mid}=${w}`;Po(j);}),k=S&&vm(e)&&At.selectedKey===du&&!!w,z=We(async()=>{k&&(await ii("dynamicFeed.whenViewAll.hideIds",{add:[el+w]}),A2(w,x||""),ft.success(`在「全部」动态中隐藏【${x}】的动态`));}),_=!!(vm(e)&&os&&At.viewingSomeUp&&w),W=f.useMemo(()=>_&&{label:"动态: 从此项开始查看",key:"动态: 从此项开始查看",icon:v(Qb,{className:Gn}),onClick(){const j=new URL("/",location.href);j.searchParams.set(Wr.Mid,w);const Y=si().findIndex(U=>U.api===$e.DynamicFeed&&U.id_str===e.id_str),q=si()[Y-1]?.id_str||e.id_str;j.searchParams.set(Wr.Offset,q),Po(j.href);}},[_,e]),O=f.useMemo(()=>_&&{icon:v(z6,{className:Gn}),label:"动态: 从此项开始截止",key:"动态: 从此项开始截止",onClick(){const j=new URL("/",location.href);j.searchParams.set(Wr.Mid,w),j.searchParams.set(Wr.MinId,e.id_str),Po(j.href);}},[_,e]),L=f.useMemo(()=>fu&&PC(e)&&!!e.page&&{key:"space-upload-view-start-from-here",label:`投稿: 从此页开始查看 (当前第${e.page}页)`,icon:v(Qb,{className:Gn}),onClick(){const j=new URL(location.href);j.searchParams.set(Jo.InitialPage,e.page.toString()),Po(j.href);}},[fu,e]);return f.useMemo(()=>{const{watchlaterAdded:j,hasWatchlaterEntry:Y,onToggleWatchlater:q}=s,U={type:"divider"},K=p?" (多选)":"",J=qr([{key:"copy-link",label:`复制视频链接${K}`,icon:v(Ss,{className:Gn}),onClick(){Qt.multiSelecting?doe():$();}},{test:!!g,key:"copy-bvid",label:`复制 BVID${K}`,icon:v(Ss,{className:Gn}),onClick(){Qt.multiSelecting?AC():$s(g);}},{test:!!g&&Ue.__internalEnableCopyBvidInfo,key:"copy-bvid-info",label:`复制 BVID 信息${K}`,icon:v(Ss,{className:Gn}),onClick(){Qt.multiSelecting?OC():$s(TC(t));}},{test:!!b,key:"view-cover",label:"查看封面",icon:v(bo,{className:Gn}),onClick(){if(!b)return;Po(b);}}]),Q=qr([{test:R,key:"view-up-space-upload",label:"查看 UP 的投稿",icon:v(s1,{className:Gn}),onClick:H},L,{test:R&&N,key:"view-up-dyn",label:"查看 UP 的动态",icon:v(i1,{className:Gn}),onClick:B},O,W,{test:Y,key:"watchlater",label:j?"移除稍后再看":"稍后再看",icon:j?v(U6,{className:Gn}):v(l1,{className:Gn}),onClick(){q();}},{test:Y&&j,key:"watchlater-readd",label:`重新添加稍候再看${n===ze.Watchlater?" (移到最前)":""}`,icon:v(Fae,{className:Gn}),async onClick(){const{success:oe}=await q(void 0,I0);oe&&(ft.success("已重新添加"),n===ze.Watchlater&&c?.(e,t));}},...Aae(i,e,h)]),G=qr([{test:a,key:"dislike",label:"我不想看",icon:v(o1,{width:15,height:15}),onClick(){l();}},{test:A,key:"unfollow-up",label:"取消关注",icon:v(Lae,{className:Gn}),onClick:D},{test:k,key:"hasEntry_addMidTo_dynamicFeedWhenViewAllHideIds",label:"在「全部」动态中隐藏 UP 的动态",icon:v(kae,{className:Gn}),onClick:z},{test:E,key:"blacklist-up",label:"将 UP 加入黑名单",icon:v(Zb,{className:Gn}),onClick:P},{test:E,key:"add-up-to-filterlist",label:"将 UP 加入过滤列表",icon:v(Zb,{className:Gn}),onClick:M}]),ee=Tae({item:e,cardData:t,tab:n,multiSelectingAppendix:K,onRemoveCurrent:u,recSharedEmitter:I});return qr([...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,k,d,m,p])}function uc(e){if(e.altKey)return e.stopPropagation(),true}const vu=Ks(()=>Date.now()),zae=(nn().add(1,"minute").startOf("minute").valueOf()-vu.get())%3e4;setTimeout(()=>{vu.update(),setInterval(vu.update,3e4);},zae);document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&vu.update();});const Hae=f.memo(function({ts:t}){return t?rre(t)?v(Vae,{ts:t}):v(zA,{ts:t}):null});function zA({ts:e}){return f.useMemo(()=>ore(e),[e])}function Vae({ts:e}){const t=vu.use();return v(zA,{ts:e},t)}const Mg={recommendReason:kt("display:inline-block;cursor:default;background-color:oklch(from ",Ui," calc(l * 0.1 + 0.9) calc(c * 0.1) h);",ON," &{background-color:oklch(from ",Ui," 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"}},jd={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 jae={name:"15xw6zv",styles:"display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;overflow:hidden;text-overflow:ellipsis;max-width:100%"},Wae={name:"feo88y",styles:".bili-video-card .bili-video-card__info--tit>a&{font-family:inherit;font-weight:initial;}"},qae={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 HA=f.memo(function({item:e,cardData:t,handleVideoLinkClick:n,className:r,gridDisplayMode:o}){const{useBorder:i}=rt(Ue.style.videoCard),s=vp(),a=Oy(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?Yu(C):c,P=e.api===$e.Live&&e.live_status===Mo.Streaming,{data:M}=Ki(()=>jie(e,t),{refreshDeps:[e,t]}),N=f.useMemo(()=>{if($&&(b||m||M||p||h)){let D;return m||M?D=nn.unix(m||M).format("YYYY年M月D日 HH:mm"):D=p,[b,h||D].filter(Boolean).join(" · ")}},[$,b,m,M,p,h]);return F("div",{className:V(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:V("relative flex-center self-start rounded-full p-1px ring-1px",P?"ring-gate-primary":"ring-gate-border"),children:[y?v(Ns,{src:zC(y)}):v(Ns,{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:qae,children:v("a",{onClick:n,onContextMenu:uc,href:c,target:s,rel:"noopener",css:Wae,children:d??u})}),A()]})]});function A(){const D=!!g&&v("span",{className:TO,css:[Mg.recommendReason,a&&Mg.recommendReasonInList,"",""],title:g,children:g});if($){let R;return m||M?R=v(Hae,{ts:m||M}):p&&(R=p),F(we,{children:[F("a",{className:"bili-video-card__info--owner",href:E,target:s,title:N,css:jd,onContextMenu:uc,children:[v("span",{className:"bili-video-card__info--author",children:b}),!!R&&F("span",{className:"bili-video-card__info--date",children:[kC,R]})]}),D]})}if(x||w)return F("a",{className:"bili-video-card__info--owner",css:jd,href:c,target:s,onContextMenu:uc,children:[!!x&&v("span",{css:Mg.appBadge,children:x}),!!w&&v("span",{children:w})]});if(IC(e)&&S)return v("div",{css:jd,children:S});if(mu(e)||Pp(e)&&e.goto===Fi.Live)return F(we,{children:[F("a",{css:[jd,jae,"",""],href:E,target:s,title:(b||"")+(I||""),onContextMenu:uc,children:[b,I&&v("span",{className:"ml-4px",children:I})]}),D]})}}),Uae=({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"})]})]}),Gae=f.forwardRef(Uae),Kae=f.memo(function({loading:t}){return F("div",{className:V("bili-video-card__skeleton",{hide:!t,[Mae]:t}),children:[v("div",{className:"bili-video-card__skeleton--cover",style:{borderRadius:C1}}),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 items-center p-15px text-16px color-inherit"},Xae=f.memo(function({item:t,cardData:n,dislikedReason:r,emitter:o=X6}){const i=We(async()=>{if(!r?.id)return;let s=false,a="",l;try{({success:s,message:a}=await lae(t,r.id));}catch(c){l=c;}if(l)return console.error(l.stack||l),Z6();s?(ft.success("已撤销"),Tse(t.param)):ft.error(a||Su);});return cr(o,"cancel-dislike",i),F("div",{className:Pr.wrapper,children:[v("div",{className:Pr.cover,children:F("div",{className:Pr.coverInner,children:[v(Gae,{className:"mb-5px size-32px"}),v("div",{className:Pr.dislikeReason,children:r?.name}),v("div",{className:Pr.dislikeDesc,children:r?.toast||"将减少此类内容推荐"})]})}),v(VA,{item:t,cardData:n,onClick:i})]})});function VA({item:e,cardData:t,onClick:n}){return F("div",{className:Pr.action,children:[v(HA,{item:e,cardData:t,className:"invisible"}),v("div",{className:Pr.actionInner,children:F("button",{className:Pr.actionButton,onClick:n,children:[v(Jb,{className:"mr-4px mt--2px size-16px"}),"撤销"]})})]})}const NE=f.memo(function({item:t,cardData:n,blockType:r}){const{authorMid:o,authorName:i}=n,s=r==="blacklist"?"已拉黑":"已加入过滤列表",a=We(()=>r==="blacklist"?l():c()),l=We(async()=>{if(!o)return;await v4.remove(o)&&ft.success(`已移出黑名单: ${i}`);}),c=We(()=>{if(!o)return;const u=Ue.filter.byAuthor.keywords.filter(d=>wp(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(Zb,{className:"mb-5px size-32px"}),v("div",{className:Pr.dislikeReason,children:s}),F("div",{className:Pr.dislikeDesc,children:["UP: ",i]})]})}),v(VA,{item:t,cardData:n,onClick:a})]})}),Yae=V("pointer-events-none absolute inset-0 overflow-hidden",dV,"rounded-b-none rounded-t-gate-video-card"),Qae=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}));br(()=>{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 Kf(h()??0,0,1)},[n]),d=f.useMemo(()=>r??Math.floor((e||0)*u),[r,e,u]),m=We(()=>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:V(Yae,o),children:!!(t&&l.width&&l.height&&u)&&v(Zae,{...p})})})),Zae=f.memo(function({t,progress:n,pvideo:r,elWidth:o,elHeight:i}){let s=f.useMemo(()=>Jae(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(jA,{progress:n})})});function jA({progress:e,className:t,...n}){return v("div",{...n,"data-role":"track",className:V("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 Jae(e,t){let n=ele(e,t);if(n!==-1)return n;t>e.at(-1)&&(n=e.length-1);}function ele(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 tle=({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"})]}),nle=f.forwardRef(tle),rle=({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"})]}),ole=f.forwardRef(rle),WA="pointer-events-none h-19px flex-center whitespace-nowrap rounded-2px bg-gate-primary px-4px text-center text-12px color-white";function qA({children:e,className:t}){return v("span",{className:An(WA,t),children:e})}function UA(e){if(e.api!==$e.DynamicFeed)return  false;const t=e.modules?.module_dynamic?.major?.archive?.badge;return !(!t||!t.text||t.text===Fo.Upload)}function ile({item:e}){if(!UA(e)||e.api!==$e.DynamicFeed)return null;const t=e.modules?.module_dynamic?.major?.archive?.badge,n=!!t.icon_url;return F(qA,{className:V("min-w-32px",n?"pl-4px pr-6px":"px-4px"),children:[n&&v(FA,{src:`${t.icon_url}@!web-dynamic`,className:"h-16px w-16px"}),t.text]})}function sle(e){return ["#FFD700","#C0C0C0","#B36700"][e-1]??Ui}function ale({item:e}){const t=e.rankingNo<=3,n=v(nle,{});let r=false,o=[];aC(e)&&e.others?.length&&(r=true,o=e.others);const i=`「${e.rankTab.name}」排行第 ${e.rankingNo} 名`,{triggerRef:s,tooltipEl:a}=bp({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:sle(e.rankingNo)}),[e.rankingNo]),u=J5();return F(we,{children:[F("div",{ref:s,className:l,style:c,children:[t?n:v("span",{style:{marginLeft:-1},children:e.rankingNo}),a]}),r&&v(rs,{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?Po(m):location.href=m;}}))}]},children:v("div",{className:l,style:c,children:v(ole,{})})})]})}function lle(){return F(qA,{children:[v(a1,{active:true,className:"size-14px"}),"直播中"]})}function cle({item:e}){const t=f.useMemo(()=>vm(e)?"动态":Np(e)?"稍后再看":ks(e)?e.from==="fav-folder"?"收藏夹":"合集":e.api,[e]),n=f.useMemo(()=>{if(ks(e)&&e.from==="fav-collection")return e.volTooltip},[e]),{triggerRef:r,tooltipEl:o}=bp({inlinePosition:"left",tooltip:n});return F("span",{ref:r,className:An(WA,"pointer-events-auto"),children:[t,o]})}function ule({vol:e,volTooltip:t}){const{triggerRef:n,tooltipEl:r}=bp({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 dle=v(o1,{className:"size-16px"});function fle({item:e,authed:t,actionButtonVisible:n}){const r=tl(e)&&!!e.three_point?.dislike_reasons?.length,o=We(async a=>{if(a?.preventDefault(),a?.stopPropagation(),!r)return e.api!==$e.AppRecommend?ft.error("当前视频不支持提交「我不想看」"):void 0;if(!t)return _t("请先获取 access_key !");e?.param&&Sm.has(e.param)||await Lse(e.three_point?.dislike_reasons||[],i);}),i=Wu(async a=>{if(!tl(e))return;let l=false,c="",u;try{({success:l,message:c}=await aae(e,a.id));}catch(d){u=d;}return u?(console.error(u.stack||u),Z6()):(l?(ft.success("已标记不想看"),Sm.set(e.param,{...a})):ft.error(c||Su),l)});return {dislikeButtonEl:r&&v(To,{visible:n,inlinePosition:"left",icon:dle,tooltip:"我不想看",onClick:o}),hasDislikeEntry:r,onTriggerDislike:o}}const mle=({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})]}),ple=f.forwardRef(mle),hle=({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"})]})]}),gle=f.forwardRef(hle),ble=ple,vle=gle;function yle({multiSelecting:e,multiSelected:t,uniqId:n}){const r=We(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?foe(Qt.shiftMultiSelectAnchorUniqId,n):t?l.delete(n):l.add(n);}),o=e&&v("div",{onClick:r,className:V("absolute inset-0 flex items-center justify-center bg-black/10",fV)}),s=e&&v(t?vle:ble,{onClick:r,className:V("size-30px cursor-pointer text-white [&_g]:fill-inherit",t?"fill-gate-primary":"fill-none")});return {toggleMultiSelect:r,multiSelectBgEl:o,multiSelectEl:s}}function Cle(...e){}function xle({uniqId:e,recSharedEmitter:t,title:n,active:r,videoDuration:o,tryFetchImagePreviewData:i,imagePreviewDataBox:s,autoPreviewWhenHover:a,videoPreviewWrapperRef:l}){const c=We(()=>{const L=s.val?.videoshotJson?.data;return !!(L?.index?.length&&L?.image?.length)}),[u,d]=f.useState(false),[m,p]=w$(),[h,g]=w$(),b=We(()=>m||0),[y,C]=f.useState(false),x=Kr(false),w=Kr(false),S=E0(false),[I,$]=f.useState(void 0),E=L=>{const j=l.current?.getBoundingClientRect();if(!j)return;const{x:Y,width:q}=j,U=L.pageX-window.scrollX-Y;$(U/q);};mo("mouseenter",async L=>{t.emit("mouseenter",e),x.set(true),E(L);const j=i(),Y=800;let q;Ue.useDelayForHover&&(q=zt(Y)),await Promise.all([j,q].filter(Boolean)),x.val&&(w.set(true),a&&!M.val&&c()&&R(true));},{target:l});const P=We(()=>{x.set(false),w.set(false);});mo("mouseleave",P,{target:l}),cr(t,"mouseenter",L=>{L!==e&&P();}),mo("mousemove",L=>{C(true),x.val&&(!w.val||!a)&&E(L),a||A.stop();},{target:l});const M=E0(void 0),N=f.useRef(void 0),A=wle({startByHoverBox:S,isHoveringBox:x,active:r,mouseMoved:y,idBox:M,autoPreviewWhenHover:a,setAutoPreviewing:d,setPreviewT:g,setPreviewProgress:p,onResume(){N.current?.();}}),D=We(async()=>{if(!M.val){await i(),c()&&R(false);return}A.togglePaused();}),R=We(L=>{S.set(L),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=Kf(Q%j/j,0,1);if(p(G),(!q||J-q>=Ue.autoPreviewUpdateInterval)&&(p(G),q=J,o)){const ee=Kf(Math.round(G*o),0,o);g(ee);}}M.val=requestAnimationFrame(U);}M.val=requestAnimationFrame(U);}),B=x.state,H=w.state,k=s.state?.videoshotJson?.data,z=!!k?.image?.length&&!!o&&(H||r)&&(a?u:true),_=f.useRef(null);let W,O;if(z){const L={videoDuration:o,pvideo:k};a?W={...L,progress:m,t:h}:W={...L,progress:I},O=v(Qae,{ref:_,...W});}return {onHotkeyPreviewAnimation:D,onStartPreviewAnimation:R,autoPreviewing:u,mouseProgress:I,previewProgress:m,previewT:h,isHovering:B,isHoveringAfterDelay:H,shouldShowPreview:z,previewImageRef:_,previewImgProps:W,previewImageEl:O}}function wle({startByHoverBox:e,isHoveringBox:t,idBox:n,active:r,mouseMoved:o,autoPreviewWhenHover:i,setAutoPreviewing:s,setPreviewT:a,setPreviewProgress:l,onResume:c}){const u=JN(),d=We(()=>{if(u.current)return  true;if(e.val){if(!t.val)return  true}else if(!r||o)return  true;return  false}),m=We((g=false)=>{g||Cle("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 Sle({item:e,cardData:t,onRemoveCurrent:n,actionButtonVisible:r,watchlaterAdded:o}){const{avid:i,bvid:s}=t,a=f.useMemo(()=>tl(e)||Pp(e)?e.goto==="av":e.api===$e.Rank?t.goto==="av":e.api!==$e.Live,[e,t]),l=Ki((b,y)=>b(y),{manual:true}),c=N1(o),u=We(async(b,y)=>{if(b?.preventDefault(),b?.stopPropagation(),l.loading)return {success:false};if(!i||!s)return {success:false};y??=o?sae:I0;const C=await l.runAsync(y,i),x=y===I0;return C&&(x?_s.bvidSet.add(s):_s.bvidSet.delete(s),e.api===$e.Watchlater?x||(await zt(250),n?.(e,t)):ft.success(`已${x?"添加":"移除"}稍后再看`)),{success:C,targetState:x}}),d=18,m=l.loading?v(q6,{className:"size-16px"}):e.api===$e.Watchlater?o?v(j6,{className:"size-16px"}):v(bu,{size:d,useAnimation:c===true}):o?v(bu,{size:d,useAnimation:c===false}):v(l1,{className:"size-20px"}),p=e.api===$e.Watchlater?o?"已添加稍后再看, 点击移除":"已移除稍后再看":o?"已添加稍后再看, 点击移除":"稍后再看",h=a&&v(To,{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 Em=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&&rd(r),[r]),y=Ase(r?.api===$e.AppRecommend?r.param:void 0),C=Une(b?.authorMid),x=eae(b?.authorMid),w=Bie(b?.bvid),S=loe(r?.uniqId),I=!!y,$=C,E=x,M=Iae(I||$||E),N=V("bili-video-card",xs,{[C3]:i},"relative",n),A=[m,M,Oy(p)&&tv.card,h&&S&&Eae];return v("div",{"data-bvid":b?.bvid,style:t,className:N,css:A,...g,children:o?v(Kae,{loading:o}):r&&b&&(I?v(Xae,{item:r,cardData:b,emitter:c,dislikedReason:y}):$?v(NE,{item:r,cardData:b,blockType:"blacklist"}):E?v(NE,{item:r,cardData:b,blockType:"filter"}):v(Ile,{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 $le={name:"vpmszz",styles:"background-color:unset;position:static;height:100%"},Ele={name:"he9puu",styles:"display:block;position:relative;overflow:hidden;isolation:isolate"};const Ile=f.memo(function({item:t,cardData:n,tab:r,active:o=false,onRemoveCurrent:i,onMoveToFirst:s,refresh:a,emitter:l=X6,recSharedEmitter:c=P5,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:D,durationStr:R,recommendReason:B,statItems:H,authorName:k,authorMid:z}=n,_=!!h,W=!(x&&m),O=P==="av",L=["av","bangumi","picture","live"];L.includes(P)||po(`none (${L.join(",")}) goto type %s`,P,t);const j=Oy(d),Y=f.useMemo(()=>lC({item:t})?.aspectRatio,[t]),q=Kr(void 0),U=f.useMemo(()=>!(!$||!$.startsWith("BV")||P!=="av"||!W),[$,P,W]),K=Wu(async()=>{if(!U||uae(q.val))return;const Fe=await cae($);q.set(Fe),cn(Fe.videoshotJson)||J(Fe.videoshotJson);}),J=G5(Fe=>{Qc.warning({title:`${Fe.message} (code: ${Fe.code})`,description:`${N} (${$})`,duration:2});},3,false),Q=f.useRef(null),G=f.useRef(null),ee=g&&!j?Q:G,{onStartPreviewAnimation:oe,onHotkeyPreviewAnimation:re,isHovering:he,previewImageEl:Z}=xle({uniqId:t.uniqId,recSharedEmitter:c,title:N,active:o,videoDuration:D,tryFetchImagePreviewData:K,imagePreviewDataBox:q,autoPreviewWhenHover:C,videoPreviewWrapperRef:ee});Gi(()=>{o&&(UC(`${W0}_activeItem`,t),Ue.videoCard.imgPreview.autoPreviewWhenKeyboardSelect&&K().then(()=>{oe(false);}));},[o]);const te=o||he,{watchlaterButtonEl:ce,context:ue}=Sle({item:t,cardData:n,onRemoveCurrent:i,actionButtonVisible:te,watchlaterAdded:u}),{dislikeButtonEl:Ee,hasDislikeEntry:Re,onTriggerDislike:be}=fle({item:t,authed:_,actionButtonVisible:te}),{largePreviewActionButtonEl:le,largePreviewEl:ae,shouldUseLargePreviewCurrentTime:ye,getLargePreviewCurrentTime:Se,largePreviewVisible:He,hideLargePreview:Le}=kA({shouldFetchPreviewData:U,actionButtonVisible:te,hasLargePreviewActionButton:y.showLargePreview,bvid:$,cid:E,uniqId:t.uniqId,recSharedEmitter:c,aspectRatioFromItem:Y,cover:A,cardRef:Q,videoCardAsTriggerRef:ee}),Ae=Rae(t,I),{onOpenWithMode:_e,handleVideoLinkClick:Te,consistentOpenMenus:Ce,conditionalOpenMenus:Pe,openInPopupActionButtonEl:De,onOpenInPopup:Oe}=vZ({href:M,item:t,cardData:n,actionButtonVisible:te,hasOpenInPopupActionButton:y.openInPipWindow,getLargePreviewCurrentTime:Se,hideLargePreview:Le,shouldUseLargePreviewCurrentTime:ye}),{multiSelectBgEl:Ne,multiSelectEl:Qe,toggleMultiSelect:mt}=yle({multiSelecting:m,multiSelected:p,uniqId:t.uniqId}),it=We(Fe=>{g&&(Fe.target.closest(".ant-dropdown-menu")||Fe.target.closest("a")||_e());});cr(l,"open",()=>_e()),cr(l,"open-in-popup",Oe),cr(l,"open-with-large-preview-visible",()=>{He&&(Le(),_e());}),cr(l,"toggle-watch-later",()=>{ue.onToggleWatchlater();}),cr(l,"trigger-dislike",()=>{be();}),cr(l,"start-preview-animation",oe),cr(l,"hotkey-preview-animation",re);const ct=_ae({item:t,cardData:n,tab:r,isNormalVideo:O,refresh:a,watchlaterContext:ue,favContext:Ae,onMoveToFirst:s,hasDislikeEntry:Re,onTriggerDislike:be,onRemoveCurrent:i,consistentOpenMenus:Ce,conditionalOpenMenus:Pe,multiSelecting:m}),bt=We(Fe=>{Fe&&Ae.updateFavFolderNames();}),pt=UA(t),nt=IC(t),et=mu(t)&&t.live_status===Mo.Streaming||Pp(t)&&t.goto===Fi.Live,Xe=r===ze.AppRecommend&&!tl(t)&&!mu(t),Ie=PC(t)&&w||ks(t)&&!!t.vol&&!Xe,Me=S&&v(To,{visible:te,inlinePosition:"right",icon:v(Ss,{className:"size-14px"}),tooltip:"复制 BVID 信息",onClick:Fe=>{Fe.stopPropagation(),Fe.preventDefault(),$s(TC(n));}}),se=F(we,{children:[m&&Qe,Ee,pt&&v(ile,{item:t}),nt&&v(ale,{item:t}),et&&v(lle,{}),Xe&&v(cle,{item:t}),Ie&&!!t.vol&&v(ule,{vol:t.vol,volTooltip:ks(t)?t.volTooltip:void 0})]}),ge=F(we,{children:[ce,Me,De,le]}),fe=!$E(se),ie=!$E(ge),ve=An("left-top-marks",iu.topContainer("left"),m?"gap-x-10px":void 0),me=Np(t)&&t.progress>0?v(jA,{progress:t.progress/t.duration,className:V("h-3px",uV)}):void 0,xe=`.${Ho} .${xs}`,ke=f.useMemo(()=>[kt(xe," &{overflow:hidden;border-radius:",C1,";transition:border-radius 0.2s ease-in-out;}",""),!j&&(he||o||m||g&&!b)&&kt(xe," &{border-bottom-left-radius:0;border-bottom-right-radius:0;}","")],[j,he,o,m,g,b]),qe=f.useMemo(()=>g&&!b||m?false:!g||g&&b&&!he,[g,b,he,m]),Ze=vp(),st=F("a",{ref:Fe=>G.current=Fe,href:M,target:Ze,className:V(x3,qe&&"ring-1px ring-gate-border"),css:[Ele,ke,j&&tv.cover,"",""],onClick:Te,onContextMenu:Fe=>{uc(Fe)||Fe.preventDefault();},children:[v("div",{className:"bili-video-card__image",style:{aspectRatio:"16 / 9"},children:v("div",{className:"bili-video-card__image--wrap",children:v(FA,{src:`${A}@672w_378h_1c_!web-home-common-cover`,className:"bili-video-card__cover v-img",style:{borderRadius:0},imgProps:{alt:eV?"":N}})})}),F("div",{className:"bili-video-card__stats",css:[kt(xe," &{pointer-events:none;border-radius:0;}",""),"",""],children:[v("div",{className:"bili-video-card__stats--left gap-x-4px xl:gap-x-8px",children:H.map(({field:Fe,value:Ge})=>v(gre,{field:Fe,value:Ge},Fe))}),v("span",{className:"bili-video-card__stats__duration relative top-0.5px",children:O&&R})]}),me,W&&Z,Ne,fe&&v("div",{className:ve,children:se}),ie&&v("div",{className:V("right-actions",iu.topContainer("right")),children:ge})]}),Ct=v(HA,{item:t,cardData:n,gridDisplayMode:d,handleVideoLinkClick:m?mt:Te}),an=v(we,{children:ae});function On(Fe){return v(rs,{getPopupContainer:()=>Ys?document.body:Q.current||document.body,styles:{root:{zIndex:Number(BN)}},menu:{items:ct,style:{width:"max-content"}},trigger:["contextMenu"],onOpenChange:bt,children:Fe})}function Rt(Fe){return v("div",{className:"bili-video-card__wrap",ref:Ge=>Q.current=Ge,css:[$le,j&&tv.cardWrap,"",""],onClick:m?mt:it,onContextMenu:Ge=>{g&&Ge.preventDefault();},children:Fe})}const pe=g&&!j?On(Rt(F(we,{children:[st,Ct]}))):Rt(F(we,{children:[On(st),Ct]}));return F(we,{children:[pe,an]})});function Ple({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=We(()=>!(!e||di())),m=We(()=>{if(typeof c!="number"||!o.current)return  false;const $=i(),E=o.current.querySelector(`.${xs}.${C3}`)?.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=KC(o.current),B=$==="down"?R:-R,H=S(c+B);if(H){const k=H.getBoundingClientRect().left;if(M(k))return B}}let N=0,A=E;const D=()=>$==="down"?A.nextElementSibling:A.previousElementSibling;for(;D();){if(A=D(),!A.classList.contains(xs))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)=>{Ur($,(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=`.${xs}`;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 Nle=new Map,Mle=new Map;function KC(e,t=true){if(t&&Ue.grid.gridDisplayMode===Os.TwoColumnGrid)return 2;const n=Ue.grid.useCustomGrid?Nle:Mle;{const i=n.get(Math.trunc(window.innerWidth));if(i)return i}if(e||=document.querySelector(`.${F0}`),!e)return 0;const r=globalThis.getComputedStyle(e);if(r.display!=="grid")return 0;const o=r.gridTemplateColumns.split(" ").length;return n.set(window.innerWidth,o),o}const Rle=zn.extend("modules:rec-services:pc");let Ale=0;const Tle=()=>Date.now()+Ale++;class yu extends ts{constructor(t){super(yu.PAGE_SIZE),this.isKeepFollowOnly=t;}static PAGE_SIZE=14;tabbarView=void 0;sidebarView=void 0;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(L0(t).map(()=>this.getRecommend(n)))).flat();return r=r.filter(i=>[Fi.AV,Fi.Live].includes(i.goto)?true:([Fi.Ad].includes(i.goto)||Rle("uknown goto: %s %o",i.goto,i),false)),r=Xi(r,i=>i.id),r.forEach(i=>{i.rcmd_reason?.reason_type===1&&(i.rcmd_reason.content||="已关注");}),r.map(i=>({...i,uniqId:`${$e.PcRecommend}-${i.bvid||i.room_info?.room_id||crypto.randomUUID()}`,api:$e.PcRecommend}))}page=0;hasMoreExceptQueue=true;async getRecommend(t){const n=++this.page,r="/x/web-interface/wbi/index/top/feed/rcmd",o={web_location:1430650,feed_version:"V8",homepage_ver:1,fresh_type:4,y_num:5,last_y_num:5,fresh_idx_1h:n,fresh_idx:n,uniq_id:Tle(),ps:12},s=(await Tt.get(r,{signal:t,params:o})).data;return !cn(s)&&s.code===-62011&&s.message==="暂时没有更多内容了"?(this.hasMoreExceptQueue=false,[]):(s.data?.item||_t(s.message||"API 请求没有返回结果"),s.data?.item||[])}}const Ole=[ze.KeepFollowOnly,ze.PcRecommend,ze.AppRecommend],Fle={[ze.AppRecommend]:()=>new gu(zie()),[ze.PcRecommend]:()=>new yu(false),[ze.KeepFollowOnly]:()=>new yu(true),[ze.DynamicFeed]:()=>new Fp(HC()),[ze.Watchlater]:({existingService:e})=>{const{watchlaterAddSeparator:t,watchlaterItemsOrder:n}=Ue,r=e&&e instanceof hu?e.getServiceSnapshot().bvidIndexMap:void 0;return new hu(n,t,r,Yn(Rc).searchText)},[ze.Fav]:()=>new Bp(VC()),[ze.Hot]:()=>new NZ,[ze.Live]:()=>new od,[ze.SpaceUpload]:()=>new DC(Y4())};function ka(e,t){const n=e[t];return Ri(n,`servicesRegistry[tab=${t}] should not be nil`),n}const Wd=zn.extend("service"),Ble=e=>e.api===$e.Separator?e.uniqId:Z4(e,{[$e.AppRecommend]:t=>t.param,[$e.PcRecommend]:t=>t.bvid,[$e.DynamicFeed]:t=>t.modules.module_dynamic.major.archive.bvid,[$e.Watchlater]:t=>t.bvid,[$e.Fav]:t=>t.bvid,[$e.PopularGeneral]:t=>t.bvid,[$e.PopularWeekly]:t=>t.bvid,[$e.Rank]:t=>t.uniqId,[$e.Live]:t=>t.roomid,[$e.SpaceUpload]:t=>t.bvid});function P0(e,t){return Xi([...e,...t],Ble)}const ME=e=>e===ze.PcRecommend||e===ze.KeepFollowOnly;async function GA(e,t,n=5){const{tab:r,abortSignal:o,servicesRegistry:i}=t;let s=[],a=true;const l=async c=>{let u=[];if(!Ole.includes(r)){const m=ka(i,r);u=await m.loadMore(o)||[],a=m.hasMore,u=y0(u,r),s=P0(s,u);return}let d;if(r===ze.KeepFollowOnly)d=8,Wd("getMinCount: addMore(restCount = %s) times=%s",c,d);else {const m=ME(r)?yu.PAGE_SIZE:gu.PAGE_SIZE,p=J4(r)?n:1.2;d=Math.ceil(c*p/m),Wd("getMinCount: addMore(restCount = %s) multipler=%s pagesize=%s times=%s",c,p,m,d);}if(ME(r)){const m=ka(i,r);u=await m.loadMoreBatch(d,o)||[],a=m.hasMore;}else {const m=ka(i,ze.AppRecommend);u=await(m.config.addOtherTabContents?m.loadMore(o):m.loadMoreBatch(o,d))||[],a=m.hasMore;}u=y0(u,r),s=P0(s,u);};for(await l(e);;){if(o?.aborted){Wd("getMinCount: break for abortSignal");break}if(!a){Wd("getMinCount: break for tab=%s hasMore=false",r);break}if(s.filter(u=>u.api!==$e.Separator).length>=e)break;await l(e-s.length);}return s}async function Lle(e){let t=await GA(KC(void 0,false)*2,e,5);return e.tab===ze.Watchlater&&(t=t.slice(0,20)),t}const XC=()=>KC()*4;async function Dle(e){let t=XC();return e.tab===ze.DynamicFeed&&await ka(e.servicesRegistry,ze.DynamicFeed).shouldReduceMinCount()&&(t=1),GA(t,e,5)}function KA({tab:e,servicesRegistry:t,debug:n,fetcher:r,preAction:o,postAction:i,updateViewFromService:s}){const{recStore:a}=Jr(),l=Kr(true),c=Kr([]);f.useEffect(()=>Zse(c.state),[c.state]);const u=Kr(()=>Date.now()),[d,m]=f.useState(()=>new AbortController),[p,h]=f.useState(false),[g,b]=f.useState(void 0),[y,C]=f.useState(true);br(()=>{C(false),x(true);}),bl(()=>{d.abort();});const x=We(async(S=false)=>{const I=performance.now();if(a.refreshing){let H;const k=()=>n("refresh(): tab=%s [start], current refreshing, sametab but conditions change, abort existing",e);if(e===ze.DynamicFeed&&(H=t[ze.DynamicFeed])&&!Bo(H.config,HC()))k(),d.abort();else if(e===ze.Fav&&(H=t[ze.Fav])&&!Bo(H.config,VC()))k(),d.abort();else if(e===ze.SpaceUpload&&(H=t[ze.SpaceUpload])&&!Bo(H.config,Y4()))k(),d.abort();else if(e===ze.Hot&&(H=t[ze.Hot])&&H.subtab!==dr.subtab)n("refresh(): tab=%s [start], current refreshing, sametab but subtab changed, abort existing",e),d.abort();else {n("refresh() tab=%s [start], current refreshing, prevent same tab refresh()",e);return}}else n("refresh(): tab=%s [start]",e);u.set(Date.now()),a.refreshing=true,b(void 0),c.set([]),l.set(true),await o?.();const $=new AbortController,E=$.signal;m($);function P(){a.refreshing=false,h(false);}function M(H){P(),l.set(false),console.error(H),b(H);}function N(){P(),l.set(ka(t,e).hasMore);}async function A(){const[H,k]=await Nm(()=>r({tab:e,abortSignal:E,servicesRegistry:t}));return E.aborted?n("refresh(): tab=%s [aborted], ignoring rest code",e):H?M(H):(c.set(k??[]),true)}let D;const R=S?t[e]:void 0;if(R?(R.restore(),c.set(R.qs.bufferQueue.slice(0,XC())),D=!!await A()&&!!Sl[e].swr):(h(true),D=true),D){const[H,k]=Pm(()=>Fle[e]({existingService:R}));if(H)return M(H);if(t[e]=k,s?.(),!await A())return}N(),await i?.();const B=performance.now()-I;n("refresh(): tab=%s [success] cost %s ms",e,B.toFixed(0));}),{recSharedEmitter:w}=Jr();return cr(w,"refresh",x),{itemsBox:c,error:g,refresh:x,hasMoreBox:l,refreshTsBox:u,refreshAbortController:d,showSkeleton:p,beforeMount:y}}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"})]})]}),_le=f.forwardRef(kle),Jl=zn.extend("components:RecGrid"),RE="grid-col-span-full",XA=f.memo(f.forwardRef(function({className:e,containerClassName:t,shortcutEnabled:n,tab:r,infiniteScrollUseWindow:o,onScrollToTop:i,scrollerRef:s},a){const{useCustomGrid:l,gridDisplayMode:c}=rt(Ue.grid),{multiSelecting:u}=rt(Qt),{recStore:d,servicesRegistry:m}=Jr(),{refreshing:p}=rt(d),h=JN(),g=Kr(0),b=We(()=>{h.current||(d.tabbarView=vS(m[r]?.tabbarView),d.sidebarView=vS(m[r]?.sidebarView));});br(b);const y=We(()=>{G(),b(),i?.();}),C=We(()=>{G(),b(),g.set(1),setTimeout(D);}),{itemsBox:x,error:w,refresh:S,hasMoreBox:I,refreshTsBox:$,refreshAbortController:E,showSkeleton:P,beforeMount:M}=KA({tab:r,servicesRegistry:m,debug:Jl,fetcher:Dle,preAction:y,postAction:C,updateViewFromService:b});f.useImperativeHandle(a,()=>({refresh:S}),[S]);const N=I.state,A=f.useRef();mo("visibilitychange",ae=>{if(!(document.visibilityState==="visible")){A.current=Date.now();return}d.refreshing||R.current[$.val]||r===ze.Watchlater&&A.current&&Date.now()-A.current>Vn("1h")&&S(true);},{target:document});const D=We(async()=>{await zt(Ys?100:0),Jl("checkShouldLoadMore(): footerInView = %s",te.current),te.current&&z();}),R=f.useRef({}),B=f.useCallback(ae=>R.current={[ae]:true},[]),H=f.useCallback(ae=>R.current[ae]=false,[]),k=We(ae=>!!R.current[ae]),z=We(async()=>{if(h.current||!I.val||E.signal.aborted||d.refreshing)return;const ae=()=>({refreshTs:$.val}),ye=ae(),Se=ye.refreshTs;if(k(Se))return;B(Se);let He=x.val,Le=true,Ae;try{const _e=ka(m,r);let Te=await _e.loadMore(E.signal)||[];Te=y0(Te,r),He=P0(He,Te),Le=_e.hasMore;}catch(_e){Ae=_e;}if(Ae)throw H(Se),Ae;{const _e=ae();if(!Bo(ye,_e)){Jl("loadMore: skip update for mismatch refresh state, %o != %o",ye,_e),H(Se);return}}Jl("loadMore: seq(%s) len %s -> %s",g.val+1,x.val.length,He.length),I.set(Le),x.set(He),g.set(_e=>_e+1),H(Se),D();}),_=x.state,W=f.useMemo(()=>_.filter(ae=>ae.api!==$e.Separator),[_]),O=f.useRef(null),L=We(()=>{if(o){const ae=Fs.get()+50;return new DOMRect(0,ae,window.innerWidth,window.innerHeight-ae)}else return s?.current?.getBoundingClientRect()}),j=f.useMemo(()=>new Map,[$.state]),Y=f.useMemo(()=>W.map(({uniqId:ae})=>{const ye=ae;return j.get(ye)||(()=>{const Se=new Or;return j.set(ye,Se),Se})()}),[W]),{recSharedEmitter:q}=Jr(),[U,K]=f.useState(void 0);cr(q,"show-large-preview",K);const J=f.useMemo(()=>{if(U)return W.findIndex(ae=>ae.uniqId===U)},[_,U]),{activeIndex:Q,clearActiveIndex:G}=Ple({enabled:n,refresh:S,maxIndex:W.length-1,containerRef:O,getScrollerRect:L,videoCardEmitters:Y,activeLargePreviewItemIndex:J,changeScrollY:o?function({offset:ae,absolute:ye}){const Se=document.documentElement;if(typeof ae=="number"){Se.scrollTop+=ae;return}if(typeof ye=="number"){Se.scrollTop=ye;return}}:void 0}),ee=x.set,oe=We((ae,ye,Se)=>{ee(He=>{const Le=He.slice(),Ae=[];for(const[_e,Te]of ae.entries()){const Ce=Le.findIndex(De=>De.uniqId===Te);if(Ce===-1)continue;Le.splice(Ce,1);const Pe=ye?.[_e];Pe&&Ae.push(Pe),r===ze.Watchlater&&m[r]?.decreaseTotal(),r===ze.Fav&&m[r]?.decreaseTotal();}return !Se&&Ae.length&&(Ae.length<=3?Ae.forEach(_e=>ft.success(`已移除: ${Ae.join(", ")}`)):ft.success(`已移除: ${Ae.length}个视频`)),Le});}),re=We((ae,ye)=>{ee(Se=>{const He=Se.find(Te=>Te.uniqId===ae.uniqId);if(!He)return Se;const Le=Se.indexOf(He),Ae=Se.slice();Ae.splice(Le,1);const _e=Ae.findIndex(Te=>Te.api!==$e.Separator);return Ae.splice(_e,0,He),Ae});});cr(q,"remove-cards",([ae,ye,Se])=>oe(ae,ye,Se));const{ref:he,inView:Z}=Kse({root:o?null:s?.current||null,rootMargin:`0px 0px ${window.innerHeight}px 0px`,onChange(ae){ae&&(Jl("footerInView change to visible",ae),setTimeout(D));}}),te=Bs(Z),ce=v("div",{ref:he,className:V(RE,"flex items-center justify-center py-30px text-size-120%"),children:!p&&v(we,{children:N?F(we,{children:[v(_le,{className:"mr-10px size-40px animate-spin color-gate-primary"}),"加载中~"]}):v(we,{children:"没有更多了~"})})}),ue=V("min-h-100vh",PT,t),Ee=V(AO,F0,l?NT:BE,c===Os.TwoColumnGrid?MT:c===Os.CenterEmptyGrid?ET:void 0,e),Re=_A();f.useMemo(()=>({footerContent:ce,containerRef:O,gridClassName:Ee}),[ce,O,Ee]);const be=({gridChildren:ae,gridSiblings:ye}={})=>F("div",{ref:O,className:ue,"data-tab":r,children:[v("div",{className:Ee,"data-tab":r,children:ae}),ye]});if(M)return be();if(w)return console.error("RecGrid.refresh error:",w.stack||w),be({gridSiblings:v(Loe,{tab:r,err:w})});if(p&&P){const ae=XC();return be({gridChildren:Array.from({length:ae}).fill(0).map((ye,Se)=>v(Em,{loading:true,tab:r},Se))})}const le=ae=>{if(ae.api===$e.Separator)return v(Za,{className:V(RE,$T),orientation:"horizontal",titlePlacement:"left",children:ae.content},ae.uniqId);{const ye=W.findIndex(He=>He.uniqId===ae.uniqId),Se=ye===Q;return v(Em,{baseCss:[Re,Nae(Se)],tab:r,item:ae,active:Se,onRemoveCurrent:(He,Le,Ae)=>oe([He.uniqId],[Le.title],Ae),onMoveToFirst:re,refresh:S,emitter:Y[ye],recSharedEmitter:q,gridDisplayMode:c,multiSelecting:u},ae.uniqId)}};return be({gridChildren:F(we,{children:[_.map(le),ce]})})})),Rl=rn({modalFeedVisible:false,modalSettingsVisible:false});function YC(){return rt(Rl)}function YA(){const{modalFeedVisible:e,modalSettingsVisible:t}=YC();return [e,t,RA(),TA()].every(n=>n===false)}const QA=f.forwardRef(function({className:e="",style:t,refreshHotkeyEnabled:n},r){n??=true;const{refreshing:o}=bQ(),i=jn(),s=f.useRef(null),a=We(()=>{s.current&&(s.current.disabled||s.current.click());});f.useImperativeHandle(r,()=>({click:a}),[]),Ur("r",()=>{di()||n&&a();},{exactMatch:true});const l=Ip(),{watchlaterItemsOrder:c,popularWeeklyUseShuffle:u}=Mt(),{usingShuffle:d}=rt(Dt),m=l===ze.AppRecommend||l===ze.PcRecommend||l===ze.KeepFollowOnly||l===ze.Watchlater&&c===pr.Shuffle||l===ze.Fav&&d||l===ze.Hot&&nR(u)?"换一换":"刷新",[p,h]=framerMotion.useAnimate(),g=We(b=>{h(p.current,{rotate:[0,360]},{duration:.5,type:"tween"}),i();});return F(Je,{ref:s,style:t,className:V("flex items-center gap-x-4px [&.ant-btn:not(:disabled):focus-visible]:outline-0",e),disabled:o,onClick:g,children:[v(ere,{ref:p,className:"size-14px"}),m]})}),zle=f.memo(function({show:t,onHide:n}){const{grid:{gridDisplayMode:r},modalFeedFullScreen:o}=Mt(),{usingTwoColumnMode:i}=LP(r),s=!i&&o,a=f.useRef(null),l=f.useMemo(()=>V(s?"b-5px":"b-1px","b-gate-primary b-solid"),[s]),c=We(()=>{a.current&&(a.current.scrollTop=0);}),{modalSettingsVisible:u}=YC(),d=[t,!u,!RA(),!TA()].every(Boolean),m=eC(true),{tabbarView:p,sidebarView:h}=rt(m.recStore),{tab:g,direction:b}=EC(),y=()=>F("div",{className:V(nr.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(g4,{}),p]}),F("div",{className:"right flex flex-shrink-0 items-center gap-x-8px",children:[r===Os.TwoColumnGrid?null:v(Mse,{initialOpen:true,children:v(Hle,{})}),v(QA,{refreshHotkeyEnabled:d}),v(Uu,{onClick:n,className:"ml-5px"})]})]}),C=V(i&&"bg-black/90%"),S=V("h-[calc(100vh-30px)] max-h-unset w-[calc(100vw-30px)] pr-0",s&&"h-full w-full",i&&BP,l);return v(pp.Provider,{value:m,children:F(qu,{show:t,onHide:n,clsModalMask:C,clsModal:S,children:[y(),F("div",{"data-role":"modal-body",className:"flex flex-1 gap-x-25px overflow-hidden",children:[v(M4,{tab:g,sidebarView:h,className:"max-h-full"}),v("div",{className:"h-full flex-1 overflow-y-scroll pr-15px",ref:a,children:v(XA,{tab:g,direction:b,shortcutEnabled:d,onScrollToTop:c,infiniteScrollUseWindow:false,scrollerRef:a},g)})]})]})})});function Hle(){return F(we,{children:[v(lt,{configPath:"showModalFeedOnLoad",label:"自动查看更多",tooltip:"打开首页时默认打开推荐弹窗",extraAction:e=>{e&&ft.success("已开启自动查看更多: 下次打开首页时将直接展示推荐弹窗");}}),v(lt,{configPath:"modalFeedFullScreen",label:"全屏",tooltip:"世界清净了~"})]})}function ZA(){tT(),Rl.modalFeedVisible=true;}function Vle(){Rl.modalFeedVisible=false;}Vo&&Ue.showModalFeedOnLoad&&setTimeout(ZA);function jle(){Rl.modalSettingsVisible?JA():QC();}function QC(){tT(),Rl.modalSettingsVisible=true;}function JA(){Rl.modalSettingsVisible=false;}function eT(){GM.registerMenuCommand?.("⚙️ 设置",QC);}const tT=xu(function(){const t=document.createElement("div");t.classList.add("modals-container",Ho),document.body.appendChild(t),jo.createRoot(t).render(v(fi,{children:v(Wle,{})}));});function Wle(){const{modalFeedVisible:e,modalSettingsVisible:t}=YC();return F(we,{children:[v(zle,{show:e,onHide:Vle}),v(Pse,{show:t,onHide:JA})]})}function qle(e,t,n){const r=We(t),o=Kr(n);return f.useEffect(()=>{const i=new ResizeObserver(s=>{for(const a of s)if(a.target===e&&a.contentRect){const l=r(a);Bo(o.val,l)||o.set(l);}});return i.observe(e),()=>{i.disconnect();}},[e,r]),o.state}function Ule(){const e=f.useRef(null),[t,n]=f.useState(false);return f.useEffect(()=>{const r=zs(()=>{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 Gle=zn.extend("RecHeader"),nT=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();Ur(["shift.comma"],I=>{di()||jle();},{exactMatch:true,useCapture:true});const[d,m]=Ule(),p=We(()=>{if(!s)return;const I=d.current?.parentElement;if(!I)return;const $=I.getBoundingClientRect(),E=Fs.get();if($.top<E){const P=VW(I).top;Gle("[refresh:scroll] rect.top = %s, headerHeight = %s",$.top,E),document.documentElement.scrollTop=P-E+2;}});f.useImperativeHandle(o,()=>({scrollToTop:p}));const h=Fs.use(),g=Xle(),b=Jy.use(),y=y1(),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%)"}`,kt("box-shadow:",I,";","")})(),x=Kle(),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 $=[kt("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:`${w3} 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(g4,{}),t]}),F("div",{"data-class-name":"right",className:"h-full flex flex-shrink-0 items-center gap-x-8px",children:[n,!i&&g&&v(w5,{style:{marginLeft:5}}),l&&v(_4,{iconOnly:true,addCopyActions:true}),v(Jt,{title:"设置",arrow:false,children:F(Je,{onClick:QC,className:"icon-only-round-button",children:[v(Ese,{}),v(V6,{className:"size-14px"})]})}),v(QA,{refreshHotkeyEnabled:r}),a&&F(Je,{onClick:ZA,className:"gap-0",children:[v("span",{className:"relative top-1px",children:"查看更多"}),v(IA,{})]})]})]})})});function Kle(){const{xScrolling:e,bodyWidth:t}=qle(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 kt("margin-inline:calc((100% - ",n,"px) / 2);padding-inline:calc((",n,"px - 100%) / 2);","")}else {const n=c1||Ys?"0px":"20px";return kt("margin-inline:calc((100% - 100vw + ",n,") / 2);padding-inline:calc((100vw - ",n," - 100%) / 2);","")}},[e,t])}function Xle(){return Ip()===ze.AppRecommend}function Yle(){const{grid:{twoColumnModeAlign:e}}=Mt(),{usingTwoColumnMode:t}=DP(),n=YA(),r=eC(),{tabbarView:o,sidebarView:i}=rt(r.recStore),{tab:s,direction:a}=EC(),l=f.useRef(null),c=We(()=>l.current?.scrollToTop()),u=Fs.use(),d=f.useMemo(()=>kt("position:sticky;top:",u+55,"px;max-height:calc(100vh - ",u+55+20,"px);",""),[u]);let m,p,h;return m=V("flex gap-x-25px"),p="flex-1",h=V(t&&[BP,Dk(e,"margin")]),F(pp.Provider,{value:r,children:[v(nT,{ref:l,leftSlot:o,shortcutEnabled:n}),F("div",{className:m,children:[v(M4,{css:d,tab:s,sidebarView:i}),v(XA,{tab:s,direction:a,containerClassName:p,className:h,shortcutEnabled:n,infiniteScrollUseWindow:true,onScrollToTop:c},s)]})]})}const Qle=zn.extend("components:SectionRecommend");function Zle(){const e=eC(),{tab:t}=EC();return v(pp.Provider,{value:e,children:v(Jle,{tab:t,servicesRegistry:e.servicesRegistry},t)})}const Jle=f.memo(function({tab:t,servicesRegistry:n}){const r=f.useMemo(()=>L0(20).map(()=>crypto.randomUUID()),[]),{itemsBox:o,error:i,showSkeleton:s}=KA({tab:t,debug:Qle,fetcher:Lle,servicesRegistry:n}),{recStore:a}=Jr(),{refreshing:l}=rt(a),c=o.state,u=!c.length||i||l&&s,d=_A(),m=YA();return F("section",{"data-area":"推荐",children:[v(nT,{shortcutEnabled:m}),v("div",{className:V(F0,IT,BE),style:{marginBottom:30},children:u?r.map(p=>v(Em,{tab:t},p)):c.map(p=>p.api===$e.Separator?null:v(Em,{item:p,tab:t,baseCss:d},p.uniqId))})]})}),ece=location.hash.startsWith(`#/${Zn}/`),rT="html.bewly-design:not(:has(#i_cecream,#app))";function tce(){return !ece&&!!document.querySelector(rT)}function nce(){return sp(rT,()=>{po("unmount for using bewly-design"),Cu?.unmount();},{pollTimeout:5e3,warnOnTimeout:false})}let Cu;async function rce(){if(Ba(".adblock-tips"),Ba(".vip-login-tip"),sp("html.gray",e=>e.classList.remove("gray")),eT(),tce())return po("quit for using bewly-design");Ue.pureRecommend?await ice():await oce(),nce();}async function oce(){const e=await pl(()=>document.querySelector(".bili-feed4-layout"));if(!e){po("init fail, can not find .bili-feed4-layout");return}const t=document.createElement("section");t.classList.add(Ho),e.insertAdjacentElement("afterbegin",t),Cu=jo.createRoot(t),Cu.render(v(fi,{injectGlobalStyle:true,antdSetup:true,children:v(Zle,{})})),Ba(".bili-feed4 .header-channel");}async function ice(){Ys&&await zt(500),Ba("#i_cecream .bili-feed4-layout, body > #app .bili-feed4-layout"),Ba(".bili-feed4 .header-channel"),Ba(".palette-button-wrap");const e=document.createElement("div");e.classList.add("bili-feed4-layout","pure-recommend"),await pl(()=>document.querySelector(".bili-feed4 .bili-header"),{interval:20,timeout:2e3}),document.body.appendChild(e);const t=document.createElement("section");t.classList.add(Ho),e.appendChild(t),Cu=jo.createRoot(t),Cu.render(F(fi,{injectGlobalStyle:true,antdSetup:true,children:[v(Yle,{}),v(Zs.BackTop,{style:{insetInlineEnd:"var(--back-top-right, 24px)"}})]}));}function ZC(){ace(),eT();}const sce=xu(()=>{const e=document.createElement("div");document.body.appendChild(e),jo.createRoot(e).render(v(fi,{injectGlobalStyle:true,antdSetup:true}));});function ace(){sce();}function lce(){try{return globalThis.self!==window.top}catch{return  true}}function cce(){lce()||(ZC(),Ue.videoCard.videoPreview.addTo.searchPage&&uce());}function uce(){const e=T6(()=>{const r=Array.from(document.querySelectorAll(".video-list-item:has(> .bili-video-card),div:has(> .bili-video-card)"));for(const o of r)dce(o);},1);e(),new MutationObserver(()=>e()).observe(document.body,{childList:true,subtree:true});}const AE=new WeakSet,TE=`${Zn}-add-large-preview-processed`;function dce(e){if(AE.has(e)||e.getAttribute(TE))return;const t=e.querySelector(".bili-watch-later--wrap");if(!t)return;const n=document.createElement("div");t.insertAdjacentElement("afterend",n),AE.add(e),e.setAttribute(TE,"true"),jo.createRoot(n).render(v(fi,{children:v(fce,{el:e})}));}function fce({el:e}){const{bvid:t="",cover:n}=f.useMemo(()=>mce(e),[e]),r=f.useMemo(()=>e.querySelector(".bili-video-card")??e,[e]),o=f.useMemo(()=>r.querySelector(".bili-video-card__wrap > a"),[e]),i=P1(r),s=f.useRef(o),{largePreviewActionButtonEl:a,largePreviewEl:l}=kA({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:P5,cover:n,videoCardAsTriggerRef:s});return F(we,{children:[v("div",{className:An(iu.top("right"),"right-[calc(8px+28px+5px)]"),children:a}),vT.createPortal(l,r)]})}function mce(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 pce(){ZC(),gce();}const hce=`${Zn}-${crypto.randomUUID()}`;async function gce(){if(!Rs.mid)return;const e=".h-action",t=".upinfo .operations";await sp([e,t].join(","),n=>{Rs.href=location.href,Rs.usingNewSpacePage=n.matches(t),oT();const r=document.createElement("span");r.id=hce,r.classList.add("mr-24px"),n.insertAdjacentElement("afterbegin",r),jo.createRoot(r).render(v(fi,{injectGlobalStyle:true,children:v(bce,{})}));},{pollTimeout:1e4,pollInterval:1e3});}const Rs=rn({href:location.href,usingNewSpacePage:false,followed:false,get mid(){return vce(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()}}),oT=ci(async()=>{const e=await pl(()=>{if(Array.from(document.querySelectorAll(".space-follow-btn")).filter(n=>n.textContent?.trim()==="已关注").length>0)return  true},{interval:100,timeout:5e3});Rs.followed=!!e;});window.navigation!==void 0&&window.navigation.addEventListener?.("navigatesuccess",()=>{Rs.href=location.href,oT();});function bce(){const{mid:e,collectionId:t,followed:n,isSearching:r,searchKeyword:o}=rt(Rs);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/?${Jo.Mid}=${e}`;r&&o&&(u+=`&${Jo.SearchText}=${o}`),a=v(Rg,{className:i,href:u,tooltip:`在「${uo}」中查看 UP 的投稿`,children:v(s1,{className:s})},"btnSpaceUpload");}let l;if(n){const u=`https://www.bilibili.com/?${Wr.Mid}=${e}`;l=v(Rg,{className:i,href:u,tooltip:`在「${uo}」中查看 UP 的动态`,children:v(i1,{className:s})},"btnDynamicFeed");}let c;return typeof t=="number"&&(c=v(Rg,{className:i,href:`https://www.bilibili.com/?${cm.CollectionIdFull}=${t}`,target:"_blank",tooltip:`在「${uo}」中查看合集`,children:v(Tp,{className:s})},"btnViewCollection")),F("span",{className:"inline-flex items-center gap-x-8px",children:[c,a,l]})}function Rg({href:e,children:t,className:n,style:r,tooltip:o,...i}){const{usingNewSpacePage:s}=rt(Rs),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:V("h-f-btn",n),style:{width:"auto",paddingInline:"15px",...r},...i,children:t});return o?v(Jt,{title:o,children:l}):l}function vce(e=location.href){const n=new URL(e).pathname.split("/").map(r=>r.trim()).find(Boolean);if(!(!n||!/^\d+$/.test(n)))return n}function N0(){if(!(typeof unsafeWindow>"u"))return unsafeWindow.player}const M0=zn.extend("main:video-play-page");async function yce(){ZC(),Cce(),Nce(),await Sce(),await $ce();}function Cce(){xce(),wce(),Pce();}function xce(){cC&&GM.registerMenuCommand?.("🎦 小窗打开",()=>{iT(),Ece();});}function wce(){c1&&GM.registerMenuCommand?.("▶️ IINA 打开",()=>{iT(),Ice();});}async function Sce(){const e=new URL(location.href).searchParams.get(Wi.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()+Vn("30s");for(;r()!==e&&Date.now()<=o;)M0("current mode: %s",r()),n?.(),await zt(100);M0("handleFullscreen to %s complete",e);}async function $ce(){if(H5()||!(new URL(location.href).searchParams.get(Wi.ForceAutoPlay)===d1.ON))return;const t=()=>{const r=N0();return !!r&&!r.isPaused()},n=Date.now()+Vn("30s");for(;Date.now()<=n&&!t();)N0()?.play(),await zt(1e3);M0("handleForceAutoPlay complete, playing = %s",t());}function iT(){const e=N0();e&&!e.isPaused()&&e.pause();}function Ece(){const e=new URL(location.href);e.searchParams.set(Wi.PlayerScreenMode,$i.WebFullscreen);const t=e.href;Z5(t,"");}function Ice(){const e=`iina://open?url=${encodeURIComponent(location.href)}`;window.open(e,"_self");}function Pce(){GM.registerMenuCommand?.("⭐️ 加入收藏",R0);}async function Nce(){if(!Ue.fav.useCustomFavPicker.onPlayPage||!$5())return;document.addEventListener("keydown",t=>{t.key==="e"&&(di()||Mce(t.target)||(t.stopImmediatePropagation(),t.preventDefault(),R0()));},{capture:true}),(await pl(()=>document.querySelector(".video-fav.video-toolbar-left-item"),{interval:100,timeout:5e3}))?.addEventListener("click",t=>{t.stopImmediatePropagation(),t.preventDefault(),R0();},{capture:true});}async function R0(){const e=$5();if(!e)return ft.error("无法解析视频 BVID !");const t=w4.bv2av(e);await $m(void 0,async n=>{const r=await Mi.addFav(t,n.id);return r&&ft.success(`已加入收藏夹「${n.title}」`),r});}function Mce(e){return e.tagName.toLowerCase()!=="bili-comments"?false:!!Rce(e,["bili-comments-header-renderer","bili-comment-box","#editor.active"])}function Rce(e,t){let n=e;for(const r of t)if(n=n.shadowRoot?.querySelector(r)??void 0,!n)return;return n}nn.extend(bj);(function(){if(Vo)return rce();if(S5)return yce();if(OO)return pce();if(FO)return cce()})();

})(React, ReactDOM, UAParser, axios, SparkMD5, localforage, Motion, PinyinMatch);