Greasy Fork is available in English.
Bilibili 自定义首页
当前为
// ==UserScript==
// @name Bilibili-Gate
// @namespace https://magicdawn.fun
// @version 0.34.11
// @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.2/files/dist/axios.min.js
// @require https://registry.npmmirror.com/ua-parser-js/1.0.41/files/dist/ua-parser.min.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 (RX, uM, sparkMd5, t5, TX) {
'use strict';
const d=new Set;const MX = 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));};
MX(' ._cls--gate-video-grid--divider_h4766_1 .ant-divider-inner-text{display:inline-flex;align-items:center;min-height:30px}._cls--gate-video-grid--divider_h4766_1 .ant-divider-inner-text a{color:var(--ant-color-link)}._cls--gate-video-grid--divider_h4766_1 .ant-divider-inner-text a:hover{color:var(--ant-color-primary)}._cls--gate-video-card--context-menu--root_h4766_13 .ant-dropdown-menu{--ant-dropdown-padding-block: 3px}._cls--gate-video-card--context-menu--root_h4766_13 .ant-dropdown-menu:has(:nth-child(12)){--ant-dropdown-padding-block: 2px}._video-grid_ucv12_1{display:grid;position:relative;width:100%;grid-gap:20px 12px;--bilibili-gate--video-card--border-radius: 15px}._grid-template-columns-using-var-col_ucv12_9{--col: 4;grid-template-columns:repeat(var(--col),minmax(0,1fr))}._grid-template-columns-using-card-min-width_ucv12_14{--card-min-width: 330px;grid-template-columns:repeat(auto-fill,minmax(var(--card-min-width),1fr))}._video-grid-addon-center-empty_ucv12_19:before{content:"";grid-column:3/-3;grid-row:1/span 9999;grid-auto-flow:dense}._video-grid-bili-feed4_ucv12_26{grid-gap:20px 20px}@media(max-width:1399px){._video-grid-bili-feed4_ucv12_26{--col: 4}}@media(min-width:1400px){._video-grid-bili-feed4_ucv12_26{--col: 5}}._video-grid-bili-feed4_ucv12_26 .ant-divider-horizontal.ant-divider-with-text{margin-bottom:-15px;margin-top:-15px}._video-grid-bili-feed4_ucv12_26 .ant-divider-horizontal.ant-divider-with-text:first-of-type{margin-top:0}._video-grid-custom_ucv12_47{--row-gap: clamp(20px, 1.4vw, 40px);column-gap:clamp(15px,1.1cqw,20px);row-gap:0}._video-grid-custom_ucv12_47 .bili-video-card{margin-bottom:var(--row-gap)}._video-grid-custom_ucv12_47 .ant-divider-horizontal.ant-divider-with-text{margin-top:calc(10px - var(--row-gap));margin-bottom:5px}._video-grid-custom_ucv12_47 .ant-divider-horizontal.ant-divider-with-text:first-of-type{margin-top:0}._narrow-mode_ucv12_63{--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--30px{left:-30px}.left-0{left:0}.left-2,.left-8px{left:8px}.left-50\\%{left:50%}.right--30px{right:-30px}.right-\\[calc\\(8px\\+28px\\+5px\\)\\]{right:41px}.right-0{right:0}.right-10px{right:10px}.right-8px{right:8px}.top-\\[-0\\.5px\\]{top:-.5px}.top-\\[-1px\\]{top:-1px}.top-0{top:0}.top-0\\.5px{top:.5px}.top-10px{top:10px}.top-4px{top:4px}.top-50\\%{top:50%}.top-8px{top:8px}.hover\\:left-0:hover{left:0}.hover\\:right-0:hover{right:0}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3}.isolate{isolation:isolate}.z-10000{z-index:10000}.z-10004{z-index:10004}.z-10005{z-index:10005}.z-1001{z-index:1001}.z-11000{z-index:11000}.z-11200{z-index:11200}.z-11300{z-index:11300}.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-90000{z-index:90000}.z-9999{z-index:9999}.grid{display:grid}.col-span-full,.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-\\[repeat\\(2\\,max-content\\)\\]{grid-template-columns:repeat(2,max-content)}.grid-cols-\\[repeat\\(auto-fill\\,minmax\\(225px\\,1fr\\)\\)\\]{grid-template-columns:repeat(auto-fill,minmax(225px,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}.m12{margin:48px}.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}.m27\\.952{margin:111.808px}.m29\\.756{margin:119.024px}.m3{margin:12px}.m33{margin:132px}.m434\\.8{margin:1739.2px}.m5{margin:20px}.m9{margin:36px}.\\[\\&_\\[role\\=\\"separator\\"\\]\\]\\:mx-0 [role=separator],.mx-0{margin-left:0;margin-right:0}.\\[\\&_\\[role\\=\\"separator\\"\\]\\]\\:my-2px [role=separator],.my-2px{margin-top:2px;margin-bottom:2px}.\\[\\&\\.ant-divider-horizontal\\.ant-divider-with-text\\]\\:my-5px.ant-divider-horizontal.ant-divider-with-text,.my-5px{margin-top:5px;margin-bottom:5px}.\\[\\&\\.ant-empty-normal\\]\\:my-1.ant-empty-normal,.my-1{margin-top:4px;margin-bottom:4px}.mx-1,.mx-4px{margin-left:4px;margin-right:4px}.mx-2px{margin-left:2px;margin-right:2px}.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-7px{margin-top:7px;margin-bottom:7px}.my-auto{margin-top:auto;margin-bottom:auto}.\\[\\&_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-1,.ml-4px{margin-left:4px}.ml-1\\.5,.ml-6px{margin-left:6px}.ml-10px{margin-left:10px}.ml-12px,.ml-3{margin-left:12px}.ml-15px{margin-left:15px}.ml-1px{margin-left:1px}.ml-20px,.ml-xl{margin-left:20px}.ml-25px{margin-left:25px}.ml-2px{margin-left:2px}.ml-30px{margin-left:30px}.ml-4{margin-left:16px}.ml-5px{margin-left:5px}.ml-8px{margin-left:8px}.ml-auto{margin-left:auto}.mr-0{margin-right:0}.mr-0\\!{margin-right:0!important}.mr-1,.mr-4px{margin-right:4px}.mr-10px{margin-right:10px}.mr-24px{margin-right:24px}.mr-2px{margin-right:2px}.mr-auto{margin-right:auto}.ms{margin-inline-start:16px}.mt--2px{margin-top:-2px}.mt-0{margin-top:0}.mt-0\\.5em{margin-top:.5em}.mt-1,.mt-4px{margin-top:4px}.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-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-1\\.1em{width:1.1em;height:1.1em}.size-1\\.3em{width:1.3em;height:1.3em}.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-1em{width:1em;height:1em}.size-2\\.5{width:10px;height:10px}.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-130px{max-height:130px}.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-\\[calc\\(100\\%-6px\\)\\]{max-width:calc(100% - 6px)}.max-w-130px{max-width:130px}.max-w-250px{max-width:250px}.max-w-288px{max-width:288px}.max-w-300px{max-width:300px}.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-h-40px{min-height:40px}.min-w-130px{min-width:130px}.min-w-180px{min-width:180px}.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-95px{min-width:95px}.w-\\[calc\\(100vw-30px\\)\\]{width:calc(100vw - 30px)}.w-\\[max-content\\],.w-max{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-215px{width:215px}.w-34px{width:34px}.w-500px{width:500px}.w-50px{width:50px}.w-55px{width:55px}.w-720px{width:720px}.w-740px{width:740px}.w-75px{width:75px}.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-0{flex-shrink:0}.flex-shrink-1{flex-shrink:1}.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))}.hover\\:rotate-90:hover{--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-rotate:90deg;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))}.hover\\:scale-105\\%:hover{--un-scale-x:1.05;--un-scale-y:1.05;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-default{cursor:default}.cursor-pointer{cursor:pointer}.\\[\\&\\:disabled\\]\\:cursor-wait:disabled{cursor:wait}.cursor-text{cursor:text}.cursor-move{cursor:move}.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}.list-disc{list-style-type:disc}.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-15px{gap:15px}.gap-1px{gap:1px}.gap-4px{gap:4px}.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-2,.gap-x-8px{column-gap:8px}.gap-x-20px{column-gap:20px}.gap-x-25px{column-gap:25px}.gap-x-2px{column-gap:2px}.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-y-0{row-gap:0}.gap-y-0\\.5em{row-gap:.5em}.gap-y-1,.gap-y-4px{row-gap:4px}.gap-y-10px{row-gap:10px}.gap-y-15px{row-gap:15px}.gap-y-2,.gap-y-8px{row-gap:8px}.gap-y-2px{row-gap:2px}.gap-y-3px{row-gap:3px}.gap-y-5px{row-gap:5px}.gap-y-6px{row-gap:6px}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-normal{overflow-wrap:normal;word-break:normal}.break-all{word-break:break-all}.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}.bilibili-gate-using-light .light\\:hover\\:b-gate-primary:hover,.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-\\$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-18px{border-radius:18px}.rounded-20px{border-radius:20px}.rounded-2px{border-radius:2px}.rounded-5px{border-radius:5px}.rounded-6px,.rounded-md{border-radius:6px}.rounded-8px,.rounded-lg{border-radius:8px}.rounded-9px{border-radius:9px}.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}.\\[\\&\\:has\\(svg\\.peeking\\)\\]\\:bg-transparent:has(svg.peeking),.bg-transparent{background-color:transparent}.bg-\\[rgb\\(33_33_33_\\/_0\\.7\\)\\]{--un-bg-opacity:.7;background-color:rgb(33 33 33 / var(--un-bg-opacity))}.bg-\\$brand_blue{background-color:var(--brand_blue)}.bg-\\$brand_pink{background-color:var(--brand_pink)}.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-lv1{background-color:var(--bilibili-gate--bg--lv1)}.bg-gate-primary{background-color:var(--bilibili-gate--primary-color)}.bg-gate-primary-lv-3{background-color:var(--bilibili-gate--primary-color--lv3)}.bg-gate-primary\\!{background-color:var(--bilibili-gate--primary-color)!important}.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-lv1\\!:hover{background-color:var(--bilibili-gate--primary-color--lv1)!important}.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-2px{padding:2px}.p-4px{padding:4px}.p-8px{padding:8px}.\\[\\&_\\.ant-radio-button-wrapper\\]\\:px-10px .ant-radio-button-wrapper{padding-left:10px;padding-right:10px}.\\[\\&\\.ant-empty-normal\\]\\:py-5px.ant-empty-normal,.py-5px{padding-top:5px;padding-bottom:5px}.p-x-2,.px-8px{padding-left:8px;padding-right:8px}.p-y-1,.py-4px{padding-top:4px;padding-bottom:4px}.px,.px-4{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-3{padding-left:12px;padding-right:12px}.px-4px{padding-left:4px;padding-right:4px}.px-5px{padding-left:5px;padding-right:5px}.px-6px{padding-left:6px;padding-right:6px}.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-2,.py-8px{padding-top:8px;padding-bottom:8px}.py-2px{padding-top:2px;padding-bottom:2px}.py-30px{padding-top:30px;padding-bottom:30px}.py-3px{padding-top:3px;padding-bottom:3px}.\\!\\[\\&_\\.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-20px{padding-left:20px}.pl-2px{padding-left:2px}.pl-4px{padding-left:4px}.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-18px{padding-right:18px}.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}.align-top{vertical-align:top}.\\[\\&\\.ant-divider-horizontal\\.ant-divider-with-text\\]\\:text-14px.ant-divider-horizontal.ant-divider-with-text,.text-14px,.text-size-14px{font-size:14px}.text-\\[1\\.5rem\\]{font-size:24px}.text-1\\.25em{font-size:1.25em}.text-1\\.2em{font-size:1.2em}.text-1\\.5em,.text-size-1\\.5em{font-size:1.5em}.text-12px,.text-size-12px{font-size:12px}.text-13px,.text-size-13px{font-size:13px}.text-15px{font-size:15px}.text-15px\\!{font-size:15px!important}.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\\.3em{font-size:1.3em}.text-size-120\\%{font-size:120%}.color-gate-primary,.text-gate-primary{color:var(--bilibili-gate--primary-color)}.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\\.2\\]{line-height:1.2}.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-17px{line-height:17px}.line-height-18px{line-height:18px}.line-height-normal{line-height:1.5}.line-height-snug{line-height:1.375}.line-height-tight{line-height:1.25}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.italic{font-style:italic}.tab{-moz-tab-size:4;-o-tab-size:4;tab-size:4}.\\[\\&\\:has\\(svg\\.peeking\\)\\]\\:opacity-10:has(svg.peeking){opacity:.1}.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-200{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:.2s}.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-150{transition-duration:.15s}.transition-duration-300{transition-duration:.3s}.ease,.ease-in-out,.transition-ease,.transition-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}.transition-property-right\\,left{transition-property:right,left}.transition-property-transform{transition-property:transform}.\\@container,.\\@container-inline-size{container-type:inline-size}@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%}} ');
function AX(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:true,get:()=>r[o]});}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const NX='@charset "UTF-8";:root{--bilibili-gate--font: "Alibaba PuHuiTi 3.0", "PingFang SC", "HarmonyOS_Regular", "Helvetica Neue", "Microsoft YaHei", sans-serif}:root{--bilibili-gate--primary-color--lv1: oklch(from var(--bilibili-gate--primary-color) calc(l - .04) c h/alpha);--bilibili-gate--primary-color--lv2: oklch(from var(--bilibili-gate--primary-color) calc(l - .08) c h/alpha);--bilibili-gate--primary-color--lv3: oklch(from var(--bilibili-gate--primary-color) calc(l - .12) c h/alpha);--bilibili-gate--border-color: oklch(from var(--bilibili-gate--bg) calc(l - .05) c h/alpha);--bilibili-gate--bg--lv1: oklch(from var(--bilibili-gate--bg) calc(l - .04) c h/alpha);--bilibili-gate--bg--lv2: oklch(from var(--bilibili-gate--bg) calc(l - .08) c h/alpha);--bilibili-gate--bg--lv3: oklch(from var(--bilibili-gate--bg) calc(l - .12) c h/alpha)}:root.bilibili-gate-using-dark{--bilibili-gate--border-color: oklch(from var(--bilibili-gate--bg) calc(l + .07) c h/alpha);--bilibili-gate--bg--lv1: oklch(from var(--bilibili-gate--bg) calc(l + .03) c h/alpha);--bilibili-gate--bg--lv2: oklch(from var(--bilibili-gate--bg) calc(l + .08) c h/alpha);--bilibili-gate--bg--lv3: oklch(from var(--bilibili-gate--bg) calc(l + .12) c h/alpha)}.bilibili-gate-root{font-family:var(--custom-font-family--options--font-family, var(--bilibili-gate--font))!important;font-size:14px;--back-top-right: 24px}.bilibili-gate-root button,.bilibili-gate-root dd,.bilibili-gate-root dl,.bilibili-gate-root ol,.bilibili-gate-root ul{font-size:inherit}.bilibili-gate-root li{list-style:unset}.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 img:-moz-loading{visibility:hidden}@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)}';MX(NX);const PX="_cls--gate-video-grid--divider_h4766_1",IX="_cls--gate-video-card--context-menu--root_h4766_13",dM="_video-grid_ucv12_1",EL="_grid-template-columns-using-var-col_ucv12_9",ML="_grid-template-columns-using-card-min-width_ucv12_14",RL="_video-grid-addon-center-empty_ucv12_19",TL="_video-grid-bili-feed4_ucv12_26",AL="_video-grid-custom_ucv12_47",NL="_narrow-mode_ucv12_63",OX={videoGrid:dM,gridTemplateColumnsUsingVarCol:EL,gridTemplateColumnsUsingCardMinWidth:ML,videoGridAddonCenterEmpty:RL,videoGridBiliFeed4:TL,videoGridCustom:AL,narrowMode:NL},n5=Object.freeze(Object.defineProperty({__proto__:null,default:OX,gridTemplateColumnsUsingCardMinWidth:ML,gridTemplateColumnsUsingVarCol:EL,narrowMode:NL,videoGrid:dM,videoGridAddonCenterEmpty:RL,videoGridBiliFeed4:TL,videoGridCustom:AL},Symbol.toStringTag,{value:"Module"}));function DX(e,t){const n={};for(let r=0;r<e.length;r++){const o=e[r],i=t(o,r,e);n[i]=(n[i]??0)+1;}return n}function g0(e,t){const n=new Set(t);return e.filter(r=>!n.has(r))}function _X(e,t){const n={};for(let r=0;r<e.length;r++){const o=e[r],i=t(o,r,e);Object.hasOwn(n,i)||(n[i]=[]),n[i].push(o);}return n}function LX(e,t,n){return e<t?n==="asc"?-1:1:e>t?n==="asc"?1:-1:0}function Ss(e,t,n){return e.slice().sort((r,o)=>{const i=n.length;for(let a=0;a<t.length;a++){const l=i>a?n[a]:n[i-1],u=t[a],d=typeof u=="function",m=d?u(r):r[u],p=d?u(o):o[u],g=LX(m,p,l);if(g!==0)return g}return 0})}function zX(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 BX(e,t){return Math.floor(zX(e,t))}function Si(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 PL(e){return typeof e=="symbol"||e instanceof Symbol}function kX(e){return PL(e)?NaN:Number(e)}function FX(e){return e?(e=kX(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function HX(e){const t=FX(e),n=t%1;return n?t-n:t}function By(e){return [...new Set(e)]}function Wl(e,t){const n=new Map;for(let r=0;r<e.length;r++){const o=e[r],i=t(o,r,e);n.has(i)||n.set(i,o);}return Array.from(n.values())}let VX=class extends Error{constructor(t="The operation was aborted"){super(t),this.name="AbortError";}};function jX(e,t,{signal:n,edges:r}={}){let o,i=null;const a=r!=null&&r.includes("leading"),l=r==null||r.includes("trailing"),u=()=>{i!==null&&(e.apply(o,i),o=void 0,i=null);},d=()=>{l&&u(),b();};let m=null;const p=()=>{m!=null&&clearTimeout(m),m=setTimeout(()=>{m=null,d();},t);},g=()=>{m!==null&&(clearTimeout(m),m=null);},b=()=>{g(),o=void 0,i=null;},y=()=>{u();},S=function(...C){if(n?.aborted)return;o=this,i=C;const w=m==null;p(),a&&w&&u();};return S.schedule=p,S.cancel=b,S.flush=y,n?.addEventListener("abort",b,{once:true}),S}function IL(e){return e}function UX(e,t={}){const{cache:n=new Map,getCacheKey:r}=t,o=function(i){const a=r?r(i):i;if(n.has(a))return n.get(a);const l=e.call(this,i);return n.set(a,l),l};return o.cache=n,o}function OL(){}function Sf(e){let t=false,n;return function(...r){return t||(t=true,n=e(...r)),n}}function pn(e,{signal:t}={}){return new Promise((n,r)=>{const o=()=>{r(new VX);},i=()=>{clearTimeout(a),o();};if(t?.aborted)return o();const a=setTimeout(()=>{t?.removeEventListener("abort",i),n();},e);t?.addEventListener("abort",i,{once:true});})}function Gl(e,t,{signal:n,edges:r=["leading","trailing"]}={}){let o=null;const i=jX(function(...l){o=Date.now(),e.apply(this,l);},t,{signal:n,edges:r}),a=function(...l){if(o==null&&(o=Date.now()),Date.now()-o>=t){o=Date.now(),e.apply(this,l),i.cancel(),i.schedule();return}i.apply(this,l);};return a.cancel=i.cancel,a.flush=i.flush,a}function DL(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 _L(e){return e==null||typeof e!="object"&&typeof e!="function"}function LL(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function cx(e){if(_L(e))return e;if(Array.isArray(e)||LL(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const 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){let r;return e instanceof AggregateError?r=new n(e.errors,e.message,{cause:e.cause}):r=new n(e.message,{cause:e.cause}),r.stack=e.stack,Object.assign(r,e),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 L$(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function z$(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const zL="[object RegExp]",BL="[object String]",kL="[object Number]",FL="[object Boolean]",B$="[object Arguments]",HL="[object Symbol]",VL="[object Date]",jL="[object Map]",UL="[object Set]",qL="[object Array]",qX="[object Function]",WL="[object ArrayBuffer]",Pb="[object Object]",WX="[object Error]",GL="[object DataView]",KL="[object Uint8Array]",YL="[object Uint8ClampedArray]",XL="[object Uint16Array]",QL="[object Uint32Array]",GX="[object BigUint64Array]",ZL="[object Int8Array]",JL="[object Int16Array]",ez="[object Int32Array]",KX="[object BigInt64Array]",tz="[object Float32Array]",nz="[object Float64Array]";function Ad(e,t,n,r=new Map,o=void 0){const i=o?.(e,t,n,r);if(i!==void 0)return i;if(_L(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){const a=new Array(e.length);r.set(e,a);for(let l=0;l<e.length;l++)a[l]=Ad(e[l],l,n,r,o);return Object.hasOwn(e,"index")&&(a.index=e.index),Object.hasOwn(e,"input")&&(a.input=e.input),a}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const a=new RegExp(e.source,e.flags);return a.lastIndex=e.lastIndex,a}if(e instanceof Map){const a=new Map;r.set(e,a);for(const[l,u]of e)a.set(l,Ad(u,l,n,r,o));return a}if(e instanceof Set){const a=new Set;r.set(e,a);for(const l of e)a.add(Ad(l,void 0,n,r,o));return a}if(typeof Buffer<"u"&&Buffer.isBuffer(e))return e.subarray();if(LL(e)){const a=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,a);for(let l=0;l<e.length;l++)a[l]=Ad(e[l],l,n,r,o);return a}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const a=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,a),ml(a,e,n,r,o),a}if(typeof File<"u"&&e instanceof File){const a=new File([e],e.name,{type:e.type});return r.set(e,a),ml(a,e,n,r,o),a}if(typeof Blob<"u"&&e instanceof Blob){const a=new Blob([e],{type:e.type});return r.set(e,a),ml(a,e,n,r,o),a}if(e instanceof Error){const a=new e.constructor;return r.set(e,a),a.message=e.message,a.name=e.name,a.stack=e.stack,a.cause=e.cause,ml(a,e,n,r,o),a}if(e instanceof Boolean){const a=new Boolean(e.valueOf());return r.set(e,a),ml(a,e,n,r,o),a}if(e instanceof Number){const a=new Number(e.valueOf());return r.set(e,a),ml(a,e,n,r,o),a}if(e instanceof String){const a=new String(e.valueOf());return r.set(e,a),ml(a,e,n,r,o),a}if(typeof e=="object"&&YX(e)){const a=Object.create(Object.getPrototypeOf(e));return r.set(e,a),ml(a,e,n,r,o),a}return e}function ml(e,t,n=e,r,o){const i=[...Object.keys(t),...L$(t)];for(let a=0;a<i.length;a++){const l=i[a],u=Object.getOwnPropertyDescriptor(e,l);(u==null||u.writable)&&(e[l]=Ad(t[l],l,n,r,o));}}function YX(e){switch(z$(e)){case B$:case qL:case WL:case GL:case FL:case VL:case tz:case nz:case ZL:case JL:case ez:case jL:case kL:case Pb:case zL:case UL:case BL:case HL:case KL:case YL:case XL:case QL:return true;default:return false}}function Zd(e){return Ad(e,void 0,e,new Map,void 0)}function Jd(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 Kh(e){return e==="__proto__"}function bs(e,t,n){const r=Object.keys(t);for(let o=0;o<r.length;o++){const i=r[o];if(Kh(i))continue;const a=t[i],l=e[i],u=n(l,a,i,e,t);u!==void 0?e[i]=u:Array.isArray(a)?Array.isArray(l)?e[i]=bs(l,a,n):e[i]=bs([],a,n):Jd(a)?Jd(l)?e[i]=bs(l,a,n):e[i]=bs({},a,n):(l===void 0||a!==void 0)&&(e[i]=a);}return e}function rz(e,t){const n={...e};for(let r=0;r<t.length;r++){const o=t[r];delete n[o];}return n}function au(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 XX=new RegExp("\\p{Lu}?\\p{Ll}+|[0-9]+|\\p{Lu}+(?!\\p{Ll})|\\p{Emoji_Presentation}|\\p{Extended_Pictographic}|\\p{L}+","gu");function QX(e){return Array.from(e.match(XX)??[])}function ZX(e,t){return bs(cx(e),t,function n(r,o){if(Array.isArray(o))return Array.isArray(r)?bs(cx(r),o,n):bs([],o,n);if(Jd(o))return Jd(r)?bs(cx(r),o,n):bs({},o,n)})}function oz(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function JX(e,t,n){return mh(e,t,void 0,void 0,void 0,void 0,n)}function mh(e,t,n,r,o,i,a){const l=a(e,t,n,r,o,i);if(l!==void 0)return l;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 $h(e,t,i,a)}return $h(e,t,i,a)}function $h(e,t,n,r){if(Object.is(e,t))return true;let o=z$(e),i=z$(t);if(o===B$&&(o=Pb),i===B$&&(i=Pb),o!==i)return false;switch(o){case BL:return e.toString()===t.toString();case kL:{const u=e.valueOf(),d=t.valueOf();return oz(u,d)}case FL:case VL:case HL:return Object.is(e.valueOf(),t.valueOf());case zL:return e.source===t.source&&e.flags===t.flags;case qX:return e===t}n=n??new Map;const a=n.get(e),l=n.get(t);if(a!=null&&l!=null)return a===t;n.set(e,t),n.set(t,e);try{switch(o){case jL:{if(e.size!==t.size)return !1;for(const[u,d]of e.entries())if(!t.has(u)||!mh(d,t.get(u),u,e,t,n,r))return !1;return !0}case UL:{if(e.size!==t.size)return !1;const u=Array.from(e.values()),d=Array.from(t.values());for(let m=0;m<u.length;m++){const p=u[m],g=d.findIndex(b=>mh(p,b,void 0,e,t,n,r));if(g===-1)return !1;d.splice(g,1);}return !0}case qL:case KL:case YL:case XL:case QL:case GX:case ZL:case JL:case ez:case KX:case tz:case nz:{if(typeof Buffer<"u"&&Buffer.isBuffer(e)!==Buffer.isBuffer(t)||e.length!==t.length)return !1;for(let u=0;u<e.length;u++)if(!mh(e[u],t[u],u,e,t,n,r))return !1;return !0}case WL:return e.byteLength!==t.byteLength?!1:$h(new Uint8Array(e),new Uint8Array(t),n,r);case GL:return e.byteLength!==t.byteLength||e.byteOffset!==t.byteOffset?!1:$h(new Uint8Array(e),new Uint8Array(t),n,r);case WX:return e.name===t.name&&e.message===t.message;case Pb:{if(!($h(e.constructor,t.constructor,n,r)||Jd(e)&&Jd(t)))return !1;const d=[...Object.keys(e),...L$(e)],m=[...Object.keys(t),...L$(t)];if(d.length!==m.length)return !1;for(let p=0;p<d.length;p++){const g=d[p],b=e[g];if(!Object.hasOwn(t,g))return !1;const y=t[g];if(!mh(b,y,g,e,t,n,r))return !1}return !0}default:return !1}}finally{n.delete(e),n.delete(t);}}function ma(e,t){return JX(e,t,OL)}function Fa(e){return e==null}function eQ(e){const t=QX(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 Cf(e){try{return [null,e()]}catch(t){return [t,null]}}async function Hp(e){try{return [null,await e()]}catch(t){return [t,null]}}function qi(e,t){if(!e)throw typeof t=="string"?new Error(t):t}function tQ(e){switch(typeof e){case "number":case "symbol":return false;case "string":return e.includes(".")||e.includes("[")||e.includes("]")}}function fM(e){return typeof e=="string"||typeof e=="symbol"?e:Object.is(e?.valueOf?.(),-0)?"-0":String(e)}function iz(e){if(e==null)return "";if(typeof e=="string")return e;if(Array.isArray(e))return e.map(iz).join(",");const t=String(e);return t==="0"&&Object.is(Number(e),-0)?"-0":t}function az(e){if(Array.isArray(e))return e.map(fM);if(typeof e=="symbol")return [e];e=iz(e);const t=[],n=e.length;if(n===0)return t;let r=0,o="",i="",a=false;for(e.charCodeAt(0)===46&&(t.push(""),r++);r<n;){const l=e[r];i?l==="\\"&&r+1<n?(r++,o+=e[r]):l===i?i="":o+=l:a?l==='"'||l==="'"?i=l:l==="]"?(a=false,t.push(o),o=""):o+=l:l==="["?(a=true,o&&(t.push(o),o="")):l==="."?o&&(t.push(o),o=""):o+=l,r++;}return o&&t.push(o),t}function To(e,t,n){if(e==null)return n;switch(typeof t){case "string":{if(Kh(t))return n;const r=e[t];return r===void 0?tQ(t)?To(e,az(t),n):n:r}case "number":case "symbol":{typeof t=="number"&&(t=fM(t));const r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return nQ(e,t,n);if(Object.is(t?.valueOf(),-0)?t="-0":t=String(t),Kh(t))return n;const r=e[t];return r===void 0?n:r}}}function nQ(e,t,n){if(t.length===0)return n;let r=e;for(let o=0;o<t.length;o++){if(r==null||Kh(t[o]))return n;r=r[t[o]];}return r===void 0?n:r}function r5(e){return e!==null&&(typeof e=="object"||typeof e=="function")}const rQ=/^(?:0|[1-9]\d*)$/;function oQ(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 rQ.test(e)}}const iQ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,aQ=/^\w*$/;function sQ(e,t){return Array.isArray(e)?false:typeof e=="number"||typeof e=="boolean"||e==null||PL(e)?true:typeof e=="string"&&(aQ.test(e)||!iQ.test(e))||t!=null&&Object.hasOwn(t,e)}const lQ=(e,t,n)=>{const r=e[t];(!(Object.hasOwn(e,t)&&oz(r,n))||n===void 0&&!(t in e))&&(e[t]=n);};function cQ(e,t,n,r){if(e==null&&!r5(e))return e;let o;sQ(t,e)?o=[t]:Array.isArray(t)?o=t:o=az(t);const i=n(To(e,o));let a=e;for(let l=0;l<o.length&&a!=null;l++){const u=fM(o[l]);if(Kh(u))continue;let d;if(l===o.length-1)d=i;else {const m=a[u],p=r?.(m,u,e);d=p!==void 0?p:r5(m)?m:oQ(o[l+1])?[]:{};}lQ(a,u,d),a=a[u];}return e}function xf(e,t,n){return cQ(e,t,()=>n,()=>{})}function uQ(e,t){if(e=HX(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 dQ=Symbol(),mM=Symbol(),hh="a",sz="f",o5="p",lz="c",cz="t",hM="h",Eh="w",pM="o",gM="k";let fQ=(e,t)=>new Proxy(e,t);const k$=Object.getPrototypeOf,F$=new WeakMap,uz=e=>e&&(F$.has(e)?F$.get(e):k$(e)===Object.prototype||k$(e)===Array.prototype),v0=e=>typeof e=="object"&&e!==null,mQ=e=>Object.values(Object.getOwnPropertyDescriptors(e)).some(t=>!t.configurable&&!t.writable),hQ=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(k$(e),t)},pQ=(e,t)=>{const n={[sz]:t};let r=false;const o=(l,u)=>{if(!r){let d=n[hh].get(e);if(d||(d={},n[hh].set(e,d)),l===Eh)d[Eh]=true;else {let m=d[l];m||(m=new Set,d[l]=m),m.add(u);}}},i=()=>{r=true,n[hh].delete(e);},a={get(l,u){return u===mM?e:(o(gM,u),dz(Reflect.get(l,u),n[hh],n[lz],n[cz]))},has(l,u){return u===dQ?(i(),true):(o(hM,u),Reflect.has(l,u))},getOwnPropertyDescriptor(l,u){return o(pM,u),Reflect.getOwnPropertyDescriptor(l,u)},ownKeys(l){return o(Eh),Reflect.ownKeys(l)}};return t&&(a.set=a.deleteProperty=()=>false),[a,n]},vM=e=>e[mM]||e,dz=(e,t,n,r)=>{if(!uz(e))return e;let o=r&&r.get(e);if(!o){const u=vM(e);mQ(u)?o=[u,hQ(u)]:o=[u],r?.set(e,o);}const[i,a]=o;let l=n&&n.get(i);return (!l||l[1][sz]!==!!a)&&(l=pQ(i,!!a),l[1][o5]=fQ(a||i,l[0]),n&&n.set(i,l)),l[1][hh]=t,l[1][lz]=n,l[1][cz]=r,l[1][o5]},gQ=(e,t)=>{const n=Reflect.ownKeys(e),r=Reflect.ownKeys(t);return n.length!==r.length||n.some((o,i)=>o!==r[i])},fz=(e,t,n,r,o=Object.is)=>{if(o(e,t))return false;if(!v0(e)||!v0(t))return true;const i=n.get(vM(e));if(!i)return true;if(r){if(r.get(e)===t)return false;r.set(e,t);}let a=null;for(const l of i[hM]||[])if(a=Reflect.has(e,l)!==Reflect.has(t,l),a)return a;if(i[Eh]===true){if(a=gQ(e,t),a)return a}else for(const l of i[pM]||[]){const u=!!Reflect.getOwnPropertyDescriptor(e,l),d=!!Reflect.getOwnPropertyDescriptor(t,l);if(a=u!==d,a)return a}for(const l of i[gM]||[])if(a=fz(e[l],t[l],n,r,o),a)return a;if(a===null)throw new Error("invalid used");return a},vQ=e=>uz(e)&&e[mM]||null,i5=(e,t=true)=>{F$.set(e,t);},bQ=(e,t,n)=>{const r=[],o=new WeakSet,i=(a,l)=>{var u,d,m;if(o.has(a))return;v0(a)&&o.add(a);const p=v0(a)&&t.get(vM(a));if(p){if((u=p[hM])===null||u===void 0||u.forEach(g=>{const b=`:has(${String(g)})`;r.push(l?[...l,b]:[b]);}),p[Eh]===true){const g=":ownKeys";r.push(l?[...l,g]:[g]);}else (d=p[pM])===null||d===void 0||d.forEach(g=>{const b=`:hasOwn(${String(g)})`;r.push(l?[...l,b]:[b]);});(m=p[gM])===null||m===void 0||m.forEach(g=>{"value"in(Object.getOwnPropertyDescriptor(a,g)||{})&&i(a[g],l?[...l,g]:[g]);});}else l&&r.push(l);};return i(e),r},b0={},bM=e=>typeof e=="object"&&e!==null,yQ=e=>bM(e)&&!Vp.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),mz=(e,t)=>{const n=H$.get(e);if(n?.[0]===t)return n[1];const r=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return i5(r,true),H$.set(e,[t,r]),Reflect.ownKeys(e).forEach(o=>{if(Object.getOwnPropertyDescriptor(r,o))return;const i=Reflect.get(e,o),{enumerable:a}=Reflect.getOwnPropertyDescriptor(e,o),l={value:i,enumerable:a,configurable:true};if(Vp.has(i))i5(i,false);else if(Rs.has(i)){const[u,d]=Rs.get(i);l.value=mz(u,d());}Object.defineProperty(r,o,l);}),Object.preventExtensions(r)},SQ=(e,t,n,r)=>({deleteProperty(o,i){Reflect.get(o,i),n(i);const a=Reflect.deleteProperty(o,i);return a&&r(void 0),a},set(o,i,a,l){const u=!e()&&Reflect.has(o,i),d=Reflect.get(o,i,l);if(u&&(y0(d,a)||Yh.has(a)&&y0(d,Yh.get(a))))return true;n(i),bM(a)&&(a=vQ(a)||a);const m=!Rs.has(a)&&j$(a)?kn(a):a;return t(i,m),Reflect.set(o,i,m,l),r(void 0),true}}),Rs=new WeakMap,Vp=new WeakSet,H$=new WeakMap,Ib=[1],Yh=new WeakMap;let y0=Object.is,V$=(e,t)=>new Proxy(e,t),j$=yQ,U$=mz,q$=SQ;function kn(e={}){if(!bM(e))throw new Error("object required");const t=Yh.get(e);if(t)return t;let n=Ib[0];const r=new Set,o=(C,w=++Ib[0])=>{n!==w&&(i=n=w,r.forEach($=>$(C,w)));};let i=n;const a=(C=Ib[0])=>(i!==C&&(i=C,u.forEach(([w])=>{const $=w[1](C);$>n&&(n=$);})),n),l=C=>(w,$)=>{let M;w&&(M=[...w],M[1]=[C,...M[1]]),o(M,$);},u=new Map,d=(C,w)=>{const $=!Vp.has(w)&&Rs.get(w);if($){if((b0?"production":void 0)!=="production"&&u.has(C))throw new Error("prop listener already exists");if(r.size){const M=$[2](l(C));u.set(C,[$,M]);}else u.set(C,[$]);}},m=C=>{var w;const $=u.get(C);$&&(u.delete(C),(w=$[1])==null||w.call($));},p=C=>(r.add(C),r.size===1&&u.forEach(([$,M],T)=>{if((b0?"production":void 0)!=="production"&&M)throw new Error("remove already exists");const R=$[2](l(T));u.set(T,[$,R]);}),()=>{r.delete(C),r.size===0&&u.forEach(([$,M],T)=>{M&&(M(),u.set(T,[$]));});});let g=true;const b=q$(()=>g,d,m,o),y=V$(e,b);Yh.set(e,y);const S=[e,a,p];return Rs.set(y,S),Reflect.ownKeys(e).forEach(C=>{const w=Object.getOwnPropertyDescriptor(e,C);"value"in w&&w.writable&&(y[C]=e[C]);}),g=false,y}function a5(e){const t=Rs.get(e);return t?.[1]()}function Ya(e,t,n){const r=Rs.get(e);(b0?"production":void 0)!=="production"&&!r&&console.warn("Please use proxy object");let o;const i=[],a=r[2];let l=false;const d=a(m=>{if(m&&i.push(m),n){t(i.splice(0));return}o||(o=Promise.resolve().then(()=>{o=void 0,l&&t(i.splice(0));}));});return l=true,()=>{l=false,d();}}function eo(e){const t=Rs.get(e);(b0?"production":void 0)!=="production"&&!t&&console.warn("Please use proxy object");const[n,r]=t;return U$(n,r())}function hz(e){return Vp.add(e),e}function yM(){return {proxyStateMap:Rs,refSet:Vp,snapCache:H$,versionHolder:Ib,proxyCache:Yh}}function CQ(e,t){switch(e){case "objectIs":y0=t(y0);break;case "newProxy":V$=t(V$);break;case "canProxy":j$=t(j$);break;case "createSnapshot":U$=t(U$);break;case "createHandler":q$=t(q$);break;default:throw new Error("unknown function")}}var Gv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Io(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function xQ(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var o=false;try{o=this instanceof r;}catch{}return o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype;}else n={};return Object.defineProperty(n,"__esModule",{value:true}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:true,get:function(){return e[r]}});}),n}var ux={exports:{}},jt={};var s5;function wQ(){if(s5)return jt;s5=1;var e=Symbol.for("react.transitional.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.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),g=Symbol.iterator;function b(D){return D===null||typeof D!="object"?null:(D=g&&D[g]||D["@@iterator"],typeof D=="function"?D:null)}var y={isMounted:function(){return false},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function w(D,z,Y){this.props=D,this.context=z,this.refs=C,this.updater=Y||y;}w.prototype.isReactComponent={},w.prototype.setState=function(D,z){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,z,"setState");},w.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate");};function $(){}$.prototype=w.prototype;function M(D,z,Y){this.props=D,this.context=z,this.refs=C,this.updater=Y||y;}var T=M.prototype=new $;T.constructor=M,S(T,w.prototype),T.isPureReactComponent=true;var R=Array.isArray;function I(){}var N={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function O(D,z,Y){var ee=Y.ref;return {$$typeof:e,type:D,key:z,ref:ee!==void 0?ee:null,props:Y}}function _(D,z){return O(D.type,z,D.props)}function L(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function j(D){var z={"=":"=0",":":"=2"};return "$"+D.replace(/[=:]/g,function(Y){return z[Y]})}var U=/\/+/g;function q(D,z){return typeof D=="object"&&D!==null&&D.key!=null?j(""+D.key):z.toString(36)}function V(D){switch(D.status){case "fulfilled":return D.value;case "rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(I,I):(D.status="pending",D.then(function(z){D.status==="pending"&&(D.status="fulfilled",D.value=z);},function(z){D.status==="pending"&&(D.status="rejected",D.reason=z);})),D.status){case "fulfilled":return D.value;case "rejected":throw D.reason}}throw D}function B(D,z,Y,ee,J){var te=typeof D;(te==="undefined"||te==="boolean")&&(D=null);var ne=false;if(D===null)ne=true;else switch(te){case "bigint":case "string":case "number":ne=true;break;case "object":switch(D.$$typeof){case e:case t:ne=true;break;case m:return ne=D._init,B(ne(D._payload),z,Y,ee,J)}}if(ne)return J=J(D),ne=ee===""?"."+q(D,0):ee,R(J)?(Y="",ne!=null&&(Y=ne.replace(U,"$&/")+"/"),B(J,z,Y,"",function(re){return re})):J!=null&&(L(J)&&(J=_(J,Y+(J.key==null||D&&D.key===J.key?"":(""+J.key).replace(U,"$&/")+"/")+ne)),z.push(J)),1;ne=0;var se=ee===""?".":ee+":";if(R(D))for(var ae=0;ae<D.length;ae++)ee=D[ae],te=se+q(ee,ae),ne+=B(ee,z,Y,te,J);else if(ae=b(D),typeof ae=="function")for(D=ae.call(D),ae=0;!(ee=D.next()).done;)ee=ee.value,te=se+q(ee,ae++),ne+=B(ee,z,Y,te,J);else if(te==="object"){if(typeof D.then=="function")return B(V(D),z,Y,ee,J);throw z=String(D),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.")}return ne}function F(D,z,Y){if(D==null)return D;var ee=[],J=0;return B(D,ee,"","",function(te){return z.call(Y,te,J++)}),ee}function W(D){if(D._status===-1){var z=D._result;z=z(),z.then(function(Y){(D._status===0||D._status===-1)&&(D._status=1,D._result=Y);},function(Y){(D._status===0||D._status===-1)&&(D._status=2,D._result=Y);}),D._status===-1&&(D._status=0,D._result=z);}if(D._status===1)return D._result.default;throw D._result}var K=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var z=new window.ErrorEvent("error",{bubbles:true,cancelable:true,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D);},Q={map:F,forEach:function(D,z,Y){F(D,function(){z.apply(this,arguments);},Y);},count:function(D){var z=0;return F(D,function(){z++;}),z},toArray:function(D){return F(D,function(z){return z})||[]},only:function(D){if(!L(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return jt.Activity=p,jt.Children=Q,jt.Component=w,jt.Fragment=n,jt.Profiler=o,jt.PureComponent=M,jt.StrictMode=r,jt.Suspense=u,jt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,jt.__COMPILER_RUNTIME={__proto__:null,c:function(D){return N.H.useMemoCache(D)}},jt.cache=function(D){return function(){return D.apply(null,arguments)}},jt.cacheSignal=function(){return null},jt.cloneElement=function(D,z,Y){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var ee=S({},D.props),J=D.key;if(z!=null)for(te in z.key!==void 0&&(J=""+z.key),z)!P.call(z,te)||te==="key"||te==="__self"||te==="__source"||te==="ref"&&z.ref===void 0||(ee[te]=z[te]);var te=arguments.length-2;if(te===1)ee.children=Y;else if(1<te){for(var ne=Array(te),se=0;se<te;se++)ne[se]=arguments[se+2];ee.children=ne;}return O(D.type,J,ee)},jt.createContext=function(D){return D={$$typeof:a,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:i,_context:D},D},jt.createElement=function(D,z,Y){var ee,J={},te=null;if(z!=null)for(ee in z.key!==void 0&&(te=""+z.key),z)P.call(z,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(J[ee]=z[ee]);var ne=arguments.length-2;if(ne===1)J.children=Y;else if(1<ne){for(var se=Array(ne),ae=0;ae<ne;ae++)se[ae]=arguments[ae+2];J.children=se;}if(D&&D.defaultProps)for(ee in ne=D.defaultProps,ne)J[ee]===void 0&&(J[ee]=ne[ee]);return O(D,te,J)},jt.createRef=function(){return {current:null}},jt.forwardRef=function(D){return {$$typeof:l,render:D}},jt.isValidElement=L,jt.lazy=function(D){return {$$typeof:m,_payload:{_status:-1,_result:D},_init:W}},jt.memo=function(D,z){return {$$typeof:d,type:D,compare:z===void 0?null:z}},jt.startTransition=function(D){var z=N.T,Y={};N.T=Y;try{var ee=D(),J=N.S;J!==null&&J(Y,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(I,K);}catch(te){K(te);}finally{z!==null&&Y.types!==null&&(z.types=Y.types),N.T=z;}},jt.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},jt.use=function(D){return N.H.use(D)},jt.useActionState=function(D,z,Y){return N.H.useActionState(D,z,Y)},jt.useCallback=function(D,z){return N.H.useCallback(D,z)},jt.useContext=function(D){return N.H.useContext(D)},jt.useDebugValue=function(){},jt.useDeferredValue=function(D,z){return N.H.useDeferredValue(D,z)},jt.useEffect=function(D,z){return N.H.useEffect(D,z)},jt.useEffectEvent=function(D){return N.H.useEffectEvent(D)},jt.useId=function(){return N.H.useId()},jt.useImperativeHandle=function(D,z,Y){return N.H.useImperativeHandle(D,z,Y)},jt.useInsertionEffect=function(D,z){return N.H.useInsertionEffect(D,z)},jt.useLayoutEffect=function(D,z){return N.H.useLayoutEffect(D,z)},jt.useMemo=function(D,z){return N.H.useMemo(D,z)},jt.useOptimistic=function(D,z){return N.H.useOptimistic(D,z)},jt.useReducer=function(D,z,Y){return N.H.useReducer(D,z,Y)},jt.useRef=function(D){return N.H.useRef(D)},jt.useState=function(D){return N.H.useState(D)},jt.useSyncExternalStore=function(D,z,Y){return N.H.useSyncExternalStore(D,z,Y)},jt.useTransition=function(){return N.H.useTransition()},jt.version="19.2.4",jt}var l5;function Kl(){return l5||(l5=1,ux.exports=wQ()),ux.exports}var f=Kl();const G=Io(f),W$=AX({__proto__:null,default:G},[f]),$Q={},EQ=(e,t)=>{const n=f.useRef(void 0);f.useEffect(()=>{n.current=bQ(e,t);}),f.useDebugValue(n.current);},MQ=EQ,RQ=new WeakMap;function bt(e,t){const n=t?.sync,r=f.useMemo(()=>e&&new WeakMap,[e]),o=f.useRef(void 0),i=f.useRef(false),a=f.useSyncExternalStore(f.useCallback(u=>{i.current=true;const d=Ya(e,u,n);return u(),()=>{d(),i.current=false;}},[e,n]),()=>{const u=eo(e);try{if(i.current&&o.current&&!fz(o.current,u,r,new WeakMap))return o.current}catch{}return u},()=>eo(e));f.useLayoutEffect(()=>{o.current=a;}),($Q?"production":void 0)!=="production"&&MQ(a,r);const l=f.useMemo(()=>new WeakMap,[]);return dz(a,r,l,RQ)}function TQ(e){return e instanceof Error?e.stack||e.message:e}function AQ(e,t){let n=0;for(let r=0;r<t.length;r++)n=(n<<5)-n+t.charCodeAt(r),n|=0;return e[Math.abs(n)%e.length]}function c5(e,t){let n=0,r=0,o=-1,i=0;for(;n<e.length;)if(r<t.length&&(t[r]===e[n]||t[r]==="*"))t[r]==="*"?(o=r,i=n,r++):(n++,r++);else if(o!==-1)r=o+1,i++,n=i;else return false;for(;r<t.length&&t[r]==="*";)r++;return r===t.length}function NQ(e){return e>=1e3?`${(e/1e3).toFixed(1)}s`:`${e}ms`}let S0="";function pz(e,t){let n,r,o,i;const a=(...l)=>{if(!a.enabled)return;const u=Date.now(),d=u-(n||u);n=u,l[0]=TQ(l[0]),typeof l[0]!="string"&&l.unshift("%O");let m=0;l[0]=l[0].replace(/%([a-z%])/gi,(p,g)=>{if(p==="%%")return "%";m++;const b=t.formatters[g];if(typeof b=="function"){const y=l[m];p=b.call(a,y),l.splice(m,1),m--;}return p}),t.formatArgs.call(a,d,l),a.log(...l);};return a.extend=function(l,u=":"){return pz(this.namespace+u+l,{useColors:this.useColors,color:this.color,formatArgs:this.formatArgs,formatters:this.formatters,inspectOpts:this.inspectOpts,log:this.log,humanize:this.humanize})},Object.assign(a,t),a.namespace=e,Object.defineProperty(a,"enabled",{enumerable:true,configurable:false,get:()=>r??(o!==S0&&(o=S0,i=IQ(e)),i),set:l=>{r=l;}}),a}let G$=[],K$=[];function PQ(e){S0=e,G$=[],K$=[];const t=S0.trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const n of t)n[0]==="-"?K$.push(n.slice(1)):G$.push(n);}function IQ(e){for(const t of K$)if(c5(e,t))return false;for(const t of G$)if(c5(e,t))return true;return false}var OQ={};const DQ=["#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 _Q(e,t){const{useColors:n}=this;if(t[0]=`${(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")}+${this.humanize(e)}`,!n)return;const r=`color: ${this.color}`;t.splice(1,0,r,"color: inherit");let o=0,i=0;t[0].replace(/%[a-z%]/gi,a=>{a!=="%%"&&(o++,a==="%c"&&(i=o));}),t.splice(i,0,r);}const LQ=console.debug||console.log||(()=>{}),u5=kQ(),zQ={useColors:true,formatArgs:_Q,formatters:{j(e){try{return JSON.stringify(e)}catch(t){return `[UnexpectedJSONParseError]: ${t.message}`}}},inspectOpts:{},humanize:NQ,log:LQ};function BQ(e,t){var n;const r=(n=t)!==null&&n!==void 0?n:AQ(DQ,e);return pz(e,Object.assign(zQ,{color:r},t))}function kQ(){try{return localStorage}catch{}}function FQ(){let e;try{e=u5.getItem("debug")||u5.getItem("DEBUG");}catch{}return !e&&typeof process<"u"&&"env"in process&&(e=OQ.DEBUG),e||""}PQ(FQ());const Ao="Bilibili-Gate",oo="bilibili-gate",SM="bilibili_gate",d5="bili-gate",io=BQ(oo),gz="https://api.bilibili.com",vz="https://app.bilibili.com",Xh={appkey:"4409e2ce8ffd12b8",appsec:"59b43e04ad6965f34319062b478f83dd"},$a=`${oo}-root`,HQ=`${oo}-video-grid`,Nl=`${oo}-video-card`,bz=`${oo}-video-card-active`,yz=`${oo}-video-card-cover`,Sz=`${oo}-tab-bar`,VQ=`${oo}-video-card__recommend-reason`,wf="请求失败, 请重试 !!!",jp="操作失败, 请重试 !!!",Kv="bilibili.com";var Ol=(e=>(e[e.Tld=Kv]="Tld",e.Main=`www.${Kv}`,e.Space=`space.${Kv}`,e.Search=`search.${Kv}`,e))(Ol||{});const{hostname:Qh,pathname:f5}=location;Qh===Ol.Tld||Qh.endsWith(`.${Ol.Tld}`);const Cz=[Ol.Tld,Ol.Main].includes(Qh),jQ=Qh===Ol.Space,UQ=Qh===Ol.Search,Os=Cz&&(f5==="/"||f5==="/index.html");function CM(e){return function(...n){const[r,...o]=n,i=`%c${Ao}%c`,a=["padding: 2px 4px; border-radius: 4px; color: #fff; background: #01847f; font-weight: bold;",""];return typeof r=="string"?e(`${i} ${r}`,...a,...o):e(`${i}`,...a,r,...o)}}const qQ=CM(console.log),Ko=CM(console.warn),WQ=CM(console.error);var $f=(e=>(e.Pink="#f69",e.Blue="#00aeec",e))($f||{}),et=(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.Liked="liked",e))(et||{}),fr=(e=>(e.PopularGeneral="popular-general",e.PopularWeekly="popular-weekly",e.Rank="ranking",e))(fr||{});const Y$=Object.values(et),GQ=["space-upload"],xM=g0(Y$,GQ);var dx={exports:{}},jm={};var m5;function KQ(){if(m5)return jm;m5=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,i){var a=null;if(i!==void 0&&(a=""+i),o.key!==void 0&&(a=""+o.key),"key"in o){i={};for(var l in o)l!=="key"&&(i[l]=o[l]);}else i=o;return o=i.ref,{$$typeof:e,type:r,key:a,ref:o!==void 0?o:null,props:i}}return jm.Fragment=t,jm.jsx=n,jm.jsxs=n,jm}var h5;function YQ(){return h5||(h5=1,dx.exports=KQ()),dx.exports}var Go=YQ();function XQ(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 QQ(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 ZQ=(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(QQ(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var i=XQ(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})(),mo="-ms-",C0="-moz-",Cn="-webkit-",xz="comm",wM="rule",$M="decl",JQ="@import",wz="@keyframes",eZ="@layer",tZ=Math.abs,ky=String.fromCharCode,nZ=Object.assign;function rZ(e,t){return Yr(e,0)^45?(((t<<2^Yr(e,0))<<2^Yr(e,1))<<2^Yr(e,2))<<2^Yr(e,3):0}function $z(e){return e.trim()}function oZ(e,t){return (e=t.exec(e))?e[0]:e}function wn(e,t,n){return e.replace(t,n)}function X$(e,t){return e.indexOf(t)}function Yr(e,t){return e.charCodeAt(t)|0}function Zh(e,t,n){return e.slice(t,n)}function Oa(e){return e.length}function EM(e){return e.length}function Yv(e,t){return t.push(e),e}function iZ(e,t){return e.map(t).join("")}var Fy=1,ef=1,Ez=0,Yo=0,Sr=0,Ef="";function Hy(e,t,n,r,o,i,a){return {value:e,root:t,parent:n,type:r,props:o,children:i,line:Fy,column:ef,length:a,return:""}}function Um(e,t){return nZ(Hy("",null,null,"",null,null,0),e,{length:-e.length},t)}function aZ(){return Sr}function sZ(){return Sr=Yo>0?Yr(Ef,--Yo):0,ef--,Sr===10&&(ef=1,Fy--),Sr}function Ci(){return Sr=Yo<Ez?Yr(Ef,Yo++):0,ef++,Sr===10&&(ef=1,Fy++),Sr}function Ha(){return Yr(Ef,Yo)}function Ob(){return Yo}function Up(e,t){return Zh(Ef,e,t)}function Jh(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 Mz(e){return Fy=ef=1,Ez=Oa(Ef=e),Yo=0,[]}function Rz(e){return Ef="",e}function Db(e){return $z(Up(Yo-1,Q$(e===91?e+2:e===40?e+1:e)))}function lZ(e){for(;(Sr=Ha())&&Sr<33;)Ci();return Jh(e)>2||Jh(Sr)>3?"":" "}function cZ(e,t){for(;--t&&Ci()&&!(Sr<48||Sr>102||Sr>57&&Sr<65||Sr>70&&Sr<97););return Up(e,Ob()+(t<6&&Ha()==32&&Ci()==32))}function Q$(e){for(;Ci();)switch(Sr){case e:return Yo;case 34:case 39:e!==34&&e!==39&&Q$(Sr);break;case 40:e===41&&Q$(e);break;case 92:Ci();break}return Yo}function uZ(e,t){for(;Ci()&&e+Sr!==57;)if(e+Sr===84&&Ha()===47)break;return "/*"+Up(t,Yo-1)+"*"+ky(e===47?e:Ci())}function dZ(e){for(;!Jh(Ha());)Ci();return Up(e,Yo)}function fZ(e){return Rz(_b("",null,null,null,[""],e=Mz(e),0,[0],e))}function _b(e,t,n,r,o,i,a,l,u){for(var d=0,m=0,p=a,g=0,b=0,y=0,S=1,C=1,w=1,$=0,M="",T=o,R=i,I=r,N=M;C;)switch(y=$,$=Ci()){case 40:if(y!=108&&Yr(N,p-1)==58){X$(N+=wn(Db($),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:N+=Db($);break;case 9:case 10:case 13:case 32:N+=lZ(y);break;case 92:N+=cZ(Ob()-1,7);continue;case 47:switch(Ha()){case 42:case 47:Yv(mZ(uZ(Ci(),Ob()),t,n),u);break;default:N+="/";}break;case 123*S:l[d++]=Oa(N)*w;case 125*S:case 59:case 0:switch($){case 0:case 125:C=0;case 59+m:w==-1&&(N=wn(N,/\f/g,"")),b>0&&Oa(N)-p&&Yv(b>32?g5(N+";",r,n,p-1):g5(wn(N," ","")+";",r,n,p-2),u);break;case 59:N+=";";default:if(Yv(I=p5(N,t,n,d,m,o,l,M,T=[],R=[],p),i),$===123)if(m===0)_b(N,t,I,I,T,i,p,l,R);else switch(g===99&&Yr(N,3)===110?100:g){case 100:case 108:case 109:case 115:_b(e,I,I,r&&Yv(p5(e,I,I,0,0,o,l,M,o,T=[],p),R),o,R,p,l,r?T:R);break;default:_b(N,I,I,I,[""],R,0,l,R);}}d=m=b=0,S=w=1,M=N="",p=a;break;case 58:p=1+Oa(N),b=y;default:if(S<1){if($==123)--S;else if($==125&&S++==0&&sZ()==125)continue}switch(N+=ky($),$*S){case 38:w=m>0?1:(N+="\f",-1);break;case 44:l[d++]=(Oa(N)-1)*w,w=1;break;case 64:Ha()===45&&(N+=Db(Ci())),g=Ha(),m=p=Oa(M=N+=dZ(Ob())),$++;break;case 45:y===45&&Oa(N)==2&&(S=0);}}return i}function p5(e,t,n,r,o,i,a,l,u,d,m){for(var p=o-1,g=o===0?i:[""],b=EM(g),y=0,S=0,C=0;y<r;++y)for(var w=0,$=Zh(e,p+1,p=tZ(S=a[y])),M=e;w<b;++w)(M=$z(S>0?g[w]+" "+$:wn($,/&\f/g,g[w])))&&(u[C++]=M);return Hy(e,t,n,o===0?wM:l,u,d,m)}function mZ(e,t,n){return Hy(e,t,n,xz,ky(aZ()),Zh(e,2,-2),0)}function g5(e,t,n,r){return Hy(e,t,n,$M,Zh(e,0,r),Zh(e,r+1,-1),r)}function Hd(e,t){for(var n="",r=EM(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function hZ(e,t,n,r){switch(e.type){case eZ:if(e.children.length)break;case JQ:case $M:return e.return=e.return||e.value;case xz:return "";case wz:return e.return=e.value+"{"+Hd(e.children,r)+"}";case wM:e.value=e.props.join(",");}return Oa(n=Hd(e.children,r))?e.return=e.value+"{"+n+"}":""}function pZ(e){var t=EM(e);return function(n,r,o,i){for(var a="",l=0;l<t;l++)a+=e[l](n,r,o,i)||"";return a}}function gZ(e){return function(t){t.root||(t=t.return)&&e(t);}}function vZ(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var bZ=function(t,n,r){for(var o=0,i=0;o=i,i=Ha(),o===38&&i===12&&(n[r]=1),!Jh(i);)Ci();return Up(t,Yo)},yZ=function(t,n){var r=-1,o=44;do switch(Jh(o)){case 0:o===38&&Ha()===12&&(n[r]=1),t[r]+=bZ(Yo-1,n,r);break;case 2:t[r]+=Db(o);break;case 4:if(o===44){t[++r]=Ha()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=ky(o);}while(o=Ci());return t},SZ=function(t,n){return Rz(yZ(Mz(t),n))},v5=new WeakMap,CZ=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&&!v5.get(r))&&!o){v5.set(t,true);for(var i=[],a=SZ(n,i),l=r.props,u=0,d=0;u<a.length;u++)for(var m=0;m<l.length;m++,d++)t.props[d]=i[u]?a[u].replace(/&\f/g,l[m]):l[m]+" "+a[u];}}},xZ=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="");}};function Tz(e,t){switch(rZ(e,t)){case 5103:return Cn+"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 Cn+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Cn+e+C0+e+mo+e+e;case 6828:case 4268:return Cn+e+mo+e+e;case 6165:return Cn+e+mo+"flex-"+e+e;case 5187:return Cn+e+wn(e,/(\w+).+(:[^]+)/,Cn+"box-$1$2"+mo+"flex-$1$2")+e;case 5443:return Cn+e+mo+"flex-item-"+wn(e,/flex-|-self/,"")+e;case 4675:return Cn+e+mo+"flex-line-pack"+wn(e,/align-content|flex-|-self/,"")+e;case 5548:return Cn+e+mo+wn(e,"shrink","negative")+e;case 5292:return Cn+e+mo+wn(e,"basis","preferred-size")+e;case 6060:return Cn+"box-"+wn(e,"-grow","")+Cn+e+mo+wn(e,"grow","positive")+e;case 4554:return Cn+wn(e,/([^-])(transform)/g,"$1"+Cn+"$2")+e;case 6187:return wn(wn(wn(e,/(zoom-|grab)/,Cn+"$1"),/(image-set)/,Cn+"$1"),e,"")+e;case 5495:case 3959:return wn(e,/(image-set\([^]*)/,Cn+"$1$`$1");case 4968:return wn(wn(e,/(.+:)(flex-)?(.*)/,Cn+"box-pack:$3"+mo+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Cn+e+e;case 4095:case 3583:case 4068:case 2532:return wn(e,/(.+)-inline(.+)/,Cn+"$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(Oa(e)-1-t>6)switch(Yr(e,t+1)){case 109:if(Yr(e,t+4)!==45)break;case 102:return wn(e,/(.+:)(.+)-([^]+)/,"$1"+Cn+"$2-$3$1"+C0+(Yr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return ~X$(e,"stretch")?Tz(wn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Yr(e,t+1)!==115)break;case 6444:switch(Yr(e,Oa(e)-3-(~X$(e,"!important")&&10))){case 107:return wn(e,":",":"+Cn)+e;case 101:return wn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Cn+(Yr(e,14)===45?"inline-":"")+"box$3$1"+Cn+"$2$3$1"+mo+"$2box$3")+e}break;case 5936:switch(Yr(e,t+11)){case 114:return Cn+e+mo+wn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Cn+e+mo+wn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Cn+e+mo+wn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Cn+e+mo+e+e}return e}var wZ=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case $M:t.return=Tz(t.value,t.length);break;case wz:return Hd([Um(t,{value:wn(t.value,"@","@"+Cn)})],o);case wM:if(t.length)return iZ(t.props,function(i){switch(oZ(i,/(::plac\w+|:read-\w+)/)){case ":read-only":case ":read-write":return Hd([Um(t,{props:[wn(i,/:(read-\w+)/,":"+C0+"$1")]})],o);case "::placeholder":return Hd([Um(t,{props:[wn(i,/:(plac\w+)/,":"+Cn+"input-$1")]}),Um(t,{props:[wn(i,/:(plac\w+)/,":"+C0+"$1")]}),Um(t,{props:[wn(i,/:(plac\w+)/,mo+"input-$1")]})],o)}return ""})}},$Z=[wZ],Az=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(S){var C=S.getAttribute("data-emotion");C.indexOf(" ")!==-1&&(document.head.appendChild(S),S.setAttribute("data-s",""));});}var o=t.stylisPlugins||$Z,i={},a,l=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(S){for(var C=S.getAttribute("data-emotion").split(" "),w=1;w<C.length;w++)i[C[w]]=true;l.push(S);});var u,d=[CZ,xZ];{var m,p=[hZ,gZ(function(S){m.insert(S);})],g=pZ(d.concat(o,p)),b=function(C){return Hd(fZ(C),g)};u=function(C,w,$,M){m=$,b(C?C+"{"+w.styles+"}":w.styles),M&&(y.inserted[w.name]=true);};}var y={key:n,sheet:new ZQ({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:u};return y.sheet.hydrate(l),y};function ir(){return ir=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},ir.apply(null,arguments)}var fx={exports:{}},Mn={};var b5;function EZ(){if(b5)return Mn;b5=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,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,S=e?Symbol.for("react.block"):60121,C=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,$=e?Symbol.for("react.scope"):60119;function M(R){if(typeof R=="object"&&R!==null){var I=R.$$typeof;switch(I){case t:switch(R=R.type,R){case u:case d:case r:case i:case o:case p:return R;default:switch(R=R&&R.$$typeof,R){case l:case m:case y:case b:case a:return R;default:return I}}case n:return I}}}function T(R){return M(R)===d}return Mn.AsyncMode=u,Mn.ConcurrentMode=d,Mn.ContextConsumer=l,Mn.ContextProvider=a,Mn.Element=t,Mn.ForwardRef=m,Mn.Fragment=r,Mn.Lazy=y,Mn.Memo=b,Mn.Portal=n,Mn.Profiler=i,Mn.StrictMode=o,Mn.Suspense=p,Mn.isAsyncMode=function(R){return T(R)||M(R)===u},Mn.isConcurrentMode=T,Mn.isContextConsumer=function(R){return M(R)===l},Mn.isContextProvider=function(R){return M(R)===a},Mn.isElement=function(R){return typeof R=="object"&&R!==null&&R.$$typeof===t},Mn.isForwardRef=function(R){return M(R)===m},Mn.isFragment=function(R){return M(R)===r},Mn.isLazy=function(R){return M(R)===y},Mn.isMemo=function(R){return M(R)===b},Mn.isPortal=function(R){return M(R)===n},Mn.isProfiler=function(R){return M(R)===i},Mn.isStrictMode=function(R){return M(R)===o},Mn.isSuspense=function(R){return M(R)===p},Mn.isValidElementType=function(R){return typeof R=="string"||typeof R=="function"||R===r||R===d||R===i||R===o||R===p||R===g||typeof R=="object"&&R!==null&&(R.$$typeof===y||R.$$typeof===b||R.$$typeof===a||R.$$typeof===l||R.$$typeof===m||R.$$typeof===C||R.$$typeof===w||R.$$typeof===$||R.$$typeof===S)},Mn.typeOf=M,Mn}var y5;function MZ(){return y5||(y5=1,fx.exports=EZ()),fx.exports}var mx,S5;function RZ(){if(S5)return mx;S5=1;var e=MZ(),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 a(y){return e.isMemo(y)?o:i[y.$$typeof]||t}var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,m=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,g=Object.prototype;function b(y,S,C){if(typeof S!="string"){if(g){var w=p(S);w&&w!==g&&b(y,w,C);}var $=u(S);d&&($=$.concat(d(S)));for(var M=a(y),T=a(S),R=0;R<$.length;++R){var I=$[R];if(!n[I]&&!(C&&C[I])&&!(T&&T[I])&&!(M&&M[I])){var N=m(S,I);try{l(y,I,N);}catch{}}}}return y}return mx=b,mx}RZ();var TZ=true;function MM(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ");}),r}var Nz=function(t,n,r){var o=t.key+"-"+n.name;(r===false||TZ===false)&&t.registered[o]===void 0&&(t.registered[o]=n.styles);},RM=function(t,n,r){Nz(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 AZ(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 NZ={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},PZ=/[A-Z]|^ms/g,IZ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Pz=function(t){return t.charCodeAt(1)===45},C5=function(t){return t!=null&&typeof t!="boolean"},hx=vZ(function(e){return Pz(e)?e:e.replace(PZ,"-$&").toLowerCase()}),x5=function(t,n){switch(t){case "animation":case "animationName":if(typeof n=="string")return n.replace(IZ,function(r,o,i){return Da={name:o,styles:i,next:Da},o})}return NZ[t]!==1&&!Pz(t)&&typeof n=="number"&&n!==0?n+"px":n};function ep(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 Da={name:o.name,styles:o.styles,next:Da},o.name;var i=n;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Da={name:a.name,styles:a.styles,next:Da},a=a.next;var l=i.styles+";";return l}return OZ(e,t,n)}case "function":{if(e!==void 0){var u=Da,d=n(e);return Da=u,ep(e,t,d)}break}}var m=n;if(t==null)return m;var p=t[m];return p!==void 0?p:m}function OZ(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=ep(e,t,n[o])+";";else for(var i in n){var a=n[i];if(typeof a!="object"){var l=a;t!=null&&t[l]!==void 0?r+=i+"{"+t[l]+"}":C5(l)&&(r+=hx(i)+":"+x5(i,l)+";");}else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var u=0;u<a.length;u++)C5(a[u])&&(r+=hx(i)+":"+x5(i,a[u])+";");else {var d=ep(e,t,a);switch(i){case "animation":case "animationName":{r+=hx(i)+":"+d+";";break}default:r+=i+"{"+d+"}";}}}return r}var w5=/label:\s*([^\s;{]+)\s*(;|$)/g,Da;function Vd(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="";Da=void 0;var i=e[0];if(i==null||i.raw===void 0)r=false,o+=ep(n,t,i);else {var a=i;o+=a[0];}for(var l=1;l<e.length;l++)if(o+=ep(n,t,e[l]),r){var u=i;o+=u[l];}w5.lastIndex=0;for(var d="",m;(m=w5.exec(o))!==null;)d+="-"+m[1];var p=AZ(o)+d;return {name:p,styles:o,next:Da}}var DZ=function(t){return t()},Iz=W$.useInsertionEffect?W$.useInsertionEffect:false,_Z=Iz||DZ,$5=Iz||f.useLayoutEffect,Oz=f.createContext(typeof HTMLElement<"u"?Az({key:"css"}):null),LZ=Oz.Provider,Dz=function(t){return f.forwardRef(function(n,r){var o=f.useContext(Oz);return t(n,o,r)})},_z=f.createContext({}),qp={}.hasOwnProperty,Z$="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",TM=function(t,n){var r={};for(var o in n)qp.call(n,o)&&(r[o]=n[o]);return r[Z$]=t,r},zZ=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return Nz(n,r,o),_Z(function(){return RM(n,r,o)}),null},BZ=Dz(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[Z$],i=[r],a="";typeof e.className=="string"?a=MM(t.registered,i,e.className):e.className!=null&&(a=e.className+" ");var l=Vd(i,void 0,f.useContext(_z));a+=t.key+"-"+l.name;var u={};for(var d in e)qp.call(e,d)&&d!=="css"&&d!==Z$&&(u[d]=e[d]);return u.className=a,n&&(u.ref=n),f.createElement(f.Fragment,null,f.createElement(zZ,{cache:t,serialized:l,isStringTag:typeof o=="string"}),f.createElement(o,u))}),AM=BZ,ze=Go.Fragment,x=function(t,n,r){return qp.call(n,"css")?Go.jsx(AM,TM(t,n),r):Go.jsx(t,n,r)},H=function(t,n,r){return qp.call(n,"css")?Go.jsxs(AM,TM(t,n),r):Go.jsxs(t,n,r)};const hl=new WeakMap,Oc=new WeakMap,ys=new WeakMap;var kZ={};const x0=Symbol("anyProducer"),E5=Promise.resolve(),w0=Symbol("listenerAdded"),$0=Symbol("listenerRemoved");let E0=false,px=false;const M0=e=>typeof e=="string"||typeof e=="symbol"||typeof e=="number";function ud(e){if(!M0(e))throw new TypeError("`eventName` must be a string, symbol, or number")}function Xv(e){if(typeof e!="function")throw new TypeError("listener must be a function")}function dd(e,t){const n=Oc.get(e);if(n.has(t))return n.get(t)}function Mh(e,t){const n=M0(t)?t:x0,r=ys.get(e);if(r.has(n))return r.get(n)}function FZ(e,t,n){const r=ys.get(e);if(r.has(t))for(const o of r.get(t))o.enqueue(n);if(r.has(x0)){const o=Promise.all([t,n]);for(const i of r.get(x0))i.enqueue(o);}}function M5(e,t){t=Array.isArray(t)?t:[t];let n=false,r=()=>{},o=[];const i={enqueue(a){o.push(a),r();},finish(){n=true,r();}};for(const a of t){let l=Mh(e,a);l||(l=new Set,ys.get(e).set(a,l)),l.add(i);}return {async next(){return o?o.length===0?n?(o=void 0,this.next()):(await new Promise(a=>{r=a;}),this.next()):{done:false,value:await o.shift()}:{done:true}},async return(a){o=void 0;for(const l of t){const u=Mh(e,l);u&&(u.delete(i),u.size===0&&ys.get(e).delete(l));}return r(),arguments.length>0?{done:true,value:await a}:{done:true}},[Symbol.asyncIterator](){return this}}}function R5(e){if(e===void 0)return T5;if(!Array.isArray(e))throw new TypeError("`methodNames` must be an array of strings");for(const t of e)if(!T5.includes(t))throw typeof t!="string"?new TypeError("`methodNames` element must be a string"):new Error(`${t} is not Emittery method`);return e}const Md=e=>e===w0||e===$0;function Qv(e,t,n){if(Md(t))try{E0=!0,e.emit(t,n);}finally{E0=false;}}class Xo{static mixin(t,n){return n=R5(n),r=>{if(typeof r!="function")throw new TypeError("`target` must be function");for(const a of n)if(r.prototype[a]!==void 0)throw new Error(`The property \`${a}\` already exists on \`target\``);function o(){return Object.defineProperty(this,t,{enumerable:false,value:new Xo}),this[t]}Object.defineProperty(r.prototype,t,{enumerable:false,get:o});const i=a=>function(...l){return this[t][a](...l)};for(const a of n)Object.defineProperty(r.prototype,a,{enumerable:false,value:i(a)});return r}}static get isDebugEnabled(){if(typeof kZ!="object")return px;const{env:t}=globalThis.process??{env:{}};return t.DEBUG==="emittery"||t.DEBUG==="*"||px}static set isDebugEnabled(t){px=t;}constructor(t={}){hl.set(this,new Set),Oc.set(this,new Map),ys.set(this,new Map),ys.get(this).set(x0,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 a=new Date,l=`${a.getHours()}:${a.getMinutes()}:${a.getSeconds()}.${a.getMilliseconds()}`;console.log(`[${l}][emittery:${n}][${r}] Event Name: ${o}
data: ${i}`);});}logIfDebugEnabled(t,n,r){(Xo.isDebugEnabled||this.debug.enabled)&&this.debug.logger(t,this.debug.name,n,r);}on(t,n,{signal:r}={}){Xv(n),t=Array.isArray(t)?t:[t];for(const i of t){ud(i);let a=dd(this,i);a||(a=new Set,Oc.get(this).set(i,a)),a.add(n),this.logIfDebugEnabled("subscribe",i,void 0),Md(i)||Qv(this,w0,{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){Xv(n),t=Array.isArray(t)?t:[t];for(const r of t){ud(r);const o=dd(this,r);o&&(o.delete(n),o.size===0&&Oc.get(this).delete(r)),this.logIfDebugEnabled("unsubscribe",r,void 0),Md(r)||Qv(this,$0,{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,a=>{n&&!n(a)||(r(),i(a));});});return o.off=r,o}events(t){t=Array.isArray(t)?t:[t];for(const n of t)ud(n);return M5(this,t)}async emit(t,n){if(ud(t),Md(t)&&!E0)throw new TypeError("`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`");this.logIfDebugEnabled("emit",t,n),FZ(this,t,n);const r=dd(this,t)??new Set,o=hl.get(this),i=[...r],a=Md(t)?[]:[...o];await E5,await Promise.all([...i.map(async l=>{if(r.has(l))return l(n)}),...a.map(async l=>{if(o.has(l))return l(t,n)})]);}async emitSerial(t,n){if(ud(t),Md(t)&&!E0)throw new TypeError("`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`");this.logIfDebugEnabled("emitSerial",t,n);const r=dd(this,t)??new Set,o=hl.get(this),i=[...r],a=[...o];await E5;for(const l of i)r.has(l)&&await l(n);for(const l of a)o.has(l)&&await l(t,n);}onAny(t,{signal:n}={}){Xv(t),this.logIfDebugEnabled("subscribeAny",void 0,void 0),hl.get(this).add(t),Qv(this,w0,{listener:t});const r=()=>{this.offAny(t),n?.removeEventListener("abort",r);};return n?.addEventListener("abort",r,{once:true}),n?.aborted&&r(),r}anyEvent(){return M5(this)}offAny(t){Xv(t),this.logIfDebugEnabled("unsubscribeAny",void 0,void 0),Qv(this,$0,{listener:t}),hl.get(this).delete(t);}clearListeners(t){t=Array.isArray(t)?t:[t];for(const n of t)if(this.logIfDebugEnabled("clear",n,void 0),M0(n)){const r=dd(this,n);r&&r.clear();const o=Mh(this,n);if(o){for(const i of o)i.finish();o.clear();}}else {hl.get(this).clear();for(const[r,o]of Oc.get(this).entries())o.clear(),Oc.get(this).delete(r);for(const[r,o]of ys.get(this).entries()){for(const i of o)i.finish();o.clear(),ys.get(this).delete(r);}}}listenerCount(t){t=Array.isArray(t)?t:[t];let n=0;for(const r of t){if(M0(r)){n+=hl.get(this).size+(dd(this,r)?.size??0)+(Mh(this,r)?.size??0)+(Mh(this)?.size??0);continue}r!==void 0&&ud(r),n+=hl.get(this).size;for(const o of Oc.get(this).values())n+=o.size;for(const o of ys.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=R5(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 T5=Object.getOwnPropertyNames(Xo.prototype).filter(e=>e!=="constructor");Object.defineProperty(Xo,"listenerAdded",{value:w0,writable:false,enumerable:true,configurable:false});Object.defineProperty(Xo,"listenerRemoved",{value:$0,writable:false,enumerable:true,configurable:false});function Et(e){const t=f.useRef(e);return t.current=e,f.useCallback((...r)=>t.current?.(...r),[])}function wi(){return !!(typeof window<"u"&&window.document&&window.document.createElement)}const A5=wi()?f.useLayoutEffect:f.useEffect,An=(e,t)=>{const n=f.useRef(true);A5(()=>e(n.current),t),A5(()=>(n.current=false,()=>{n.current=true;}),[]);},Lb=(e,t)=>{An(n=>{if(!n)return e()},t);},R0=e=>{const t=f.useRef(false),[n,r]=f.useState(e);f.useEffect(()=>(t.current=false,()=>{t.current=true;}),[]);function o(i,a){a&&t.current||r(i);}return [n,o]};function hn(e,t){const[n,r]=f.useState(e),o=t!==void 0?t:n;return An(i=>{i||r(t);},[t]),[o,r]}var gx={exports:{}},Rn={};var N5;function HZ(){if(N5)return Rn;N5=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"),a=Symbol.for("react.context"),l=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),y;y=Symbol.for("react.module.reference");function S(C){if(typeof C=="object"&&C!==null){var w=C.$$typeof;switch(w){case e:switch(C=C.type,C){case n:case o:case r:case d:case m:return C;default:switch(C=C&&C.$$typeof,C){case l:case a:case u:case g:case p:case i:return C;default:return w}}case t:return w}}}return Rn.ContextConsumer=a,Rn.ContextProvider=i,Rn.Element=e,Rn.ForwardRef=u,Rn.Fragment=n,Rn.Lazy=g,Rn.Memo=p,Rn.Portal=t,Rn.Profiler=o,Rn.StrictMode=r,Rn.Suspense=d,Rn.SuspenseList=m,Rn.isAsyncMode=function(){return false},Rn.isConcurrentMode=function(){return false},Rn.isContextConsumer=function(C){return S(C)===a},Rn.isContextProvider=function(C){return S(C)===i},Rn.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===e},Rn.isForwardRef=function(C){return S(C)===u},Rn.isFragment=function(C){return S(C)===n},Rn.isLazy=function(C){return S(C)===g},Rn.isMemo=function(C){return S(C)===p},Rn.isPortal=function(C){return S(C)===t},Rn.isProfiler=function(C){return S(C)===o},Rn.isStrictMode=function(C){return S(C)===r},Rn.isSuspense=function(C){return S(C)===d},Rn.isSuspenseList=function(C){return S(C)===m},Rn.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===n||C===o||C===r||C===d||C===m||C===b||typeof C=="object"&&C!==null&&(C.$$typeof===g||C.$$typeof===p||C.$$typeof===i||C.$$typeof===a||C.$$typeof===u||C.$$typeof===y||C.getModuleId!==void 0)},Rn.typeOf=S,Rn}var P5;function VZ(){return P5||(P5=1,gx.exports=HZ()),gx.exports}var vx=VZ();function Mf(e,t,n){const r=f.useRef({});return (!("value"in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}const jZ=Symbol.for("react.element"),UZ=Symbol.for("react.transitional.element"),qZ=Symbol.for("react.fragment");function Lz(e){return e&&typeof e=="object"&&(e.$$typeof===jZ||e.$$typeof===UZ)&&e.type===qZ}const WZ=Number(f.version.split(".")[0]),GZ=(e,t)=>{typeof e=="function"?e(t):typeof e=="object"&&e&&"current"in e&&(e.current=t);},Nr=(...e)=>{const t=e.filter(Boolean);return t.length<=1?t[0]:n=>{e.forEach(r=>{GZ(r,n);});}},Yl=(...e)=>Mf(()=>Nr(...e),e,(t,n)=>t.length!==n.length||t.every((r,o)=>r!==n[o])),yu=e=>{if(!e)return false;if(NM(e)&&WZ>=19)return true;const t=vx.isMemo(e)?e.type.type:e.type;return !(typeof t=="function"&&!t.prototype?.render&&t.$$typeof!==vx.ForwardRef||typeof e=="function"&&!e.prototype?.render&&e.$$typeof!==vx.ForwardRef)};function NM(e){return f.isValidElement(e)&&!Lz(e)}const KZ=e=>NM(e)&&yu(e),Xl=e=>{if(e&&NM(e)){const t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null};function ca(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 zz(e,t,n,r){if(!t.length)return n;const[o,...i]=t;let a;return !e&&typeof o=="number"?a=[]:Array.isArray(e)?a=[...e]:a={...e},r&&n===void 0&&i.length===1?delete a[o][i[0]]:a[o]=zz(a[o],i,n,r),a}function ki(e,t,n,r=false){return t.length&&r&&n===void 0&&!ca(e,t.slice(0,-1))?e:zz(e,t,n,r)}function YZ(e){return typeof e=="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function I5(e){return Array.isArray(e)?[]:{}}const XZ=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function Bz(e,t={}){const{prepareArray:n}=t,r=n||(()=>[]);let o=I5(e[0]);return e.forEach(i=>{function a(l,u){const d=new Set(u),m=ca(i,l),p=Array.isArray(m);if(p||YZ(m)){if(!d.has(m)){d.add(m);const g=ca(o,l);p?o=ki(o,l,r(g,m)):(!g||typeof g!="object")&&(o=ki(o,l,I5(m))),XZ(m).forEach(b=>{Object.getOwnPropertyDescriptor(m,b).enumerable&&a([...l,b],d);});}}else o=ki(o,l,m);}a([]);}),o}function Nd(...e){return Bz(e)}let J$={};const QZ=e=>{};function ZZ(e,t){}function JZ(e,t){}function eJ(){J$={};}function kz(e,t,n){!t&&!J$[n]&&(e(false,n),J$[n]=true);}function wr(e,t){kz(ZZ,e,t);}function tJ(e,t){kz(JZ,e,t);}wr.preMessage=QZ;wr.resetWarned=eJ;wr.noteOnce=tJ;function Bn(e,t){const n=Object.assign({},e);return Array.isArray(t)&&t.forEach(r=>{delete n[r];}),n}function Qo(e,t={}){let n=[];return G.Children.forEach(e,r=>{r==null&&!t.keepEmpty||(Array.isArray(r)?n=n.concat(Qo(r)):Lz(r)&&r.props?n=n.concat(Qo(r.props.children,t)):n.push(r));}),n}const nJ=f.createContext({});function tf(e){return e instanceof HTMLElement||e instanceof SVGElement}function nf(e){return e&&typeof e=="object"&&tf(e.nativeElement)?e.nativeElement:tf(e)?e:null}const e2=f.createContext(null);function rJ({children:e,onBatchResize:t}){const n=f.useRef(0),r=f.useRef([]),o=f.useContext(e2),i=f.useCallback((a,l,u)=>{n.current+=1;const d=n.current;r.current.push({size:a,element:l,data:u}),Promise.resolve().then(()=>{d===n.current&&(t?.(r.current),r.current=[]);}),o?.(a,l,u);},[t,o]);return f.createElement(e2.Provider,{value:i},e)}const El=new Map;function oJ(e){e.forEach(t=>{const{target:n}=t;El.get(n)?.forEach(r=>r(n));});}let bx;function Fz(){return bx||(bx=new ResizeObserver(oJ)),bx}function iJ(e,t){El.has(e)||(El.set(e,new Set),Fz().observe(e)),El.get(e).add(t);}function aJ(e,t){El.has(e)&&(El.get(e).delete(t),El.get(e).size||(Fz().unobserve(e),El.delete(e)));}function Hz(e,t,n,r){const o=f.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),i=Et(l=>{const{width:u,height:d}=l.getBoundingClientRect(),{offsetWidth:m,offsetHeight:p}=l,g=Math.floor(u),b=Math.floor(d);if(o.current.width!==g||o.current.height!==b||o.current.offsetWidth!==m||o.current.offsetHeight!==p){const y={width:g,height:b,offsetWidth:m,offsetHeight:p};o.current=y;const S=m===Math.round(u)?u:m,C=p===Math.round(d)?d:p,w={...y,offsetWidth:S,offsetHeight:C};r?.(w,l),Promise.resolve().then(()=>{n?.(w,l);});}}),a=typeof t=="function";f.useEffect(()=>{const l=a?t():t;return l&&e&&iJ(l,i),()=>{l&&aJ(l,i);}},[e,a?0:t]);}function sJ(e,t){const{children:n,disabled:r,onResize:o,data:i}=e,a=f.useRef(null),l=f.useContext(e2),u=typeof n=="function",d=u?n(a):n,m=!u&&f.isValidElement(d)&&yu(d),p=m?Xl(d):null,g=Yl(p,a),b=()=>nf(a.current);return f.useImperativeHandle(t,()=>b()),Hz(!r,b,o,(y,S)=>{l?.(y,S,i);}),m?f.cloneElement(d,{ref:g}):d}const lJ=f.forwardRef(sJ);function t2(){return t2=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},t2.apply(this,arguments)}const cJ="rc-observer-key";function uJ(e,t){const{children:n}=e;return (typeof n=="function"?[n]:Qo(n)).map((o,i)=>{const a=o?.key||`${cJ}-${i}`;return f.createElement(lJ,t2({},e,{key:a,ref:i===0?t:void 0}),o)})}const ha=f.forwardRef(uJ);ha.Collection=rJ;function Vz(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=Vz(e[t]))&&(r&&(r+=" "),r+=n);}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function X(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Vz(e))&&(r&&(r+=" "),r+=t);return r}function n2(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 dJ(e){if(Array.isArray(e))return n2(e)}function fJ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function PM(e,t){if(e){if(typeof e=="string")return n2(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)?n2(e,t):void 0}}function mJ(){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 Yt(e){return dJ(e)||fJ(e)||PM(e)||mJ()}let jz=e=>+setTimeout(e,16),Uz=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(jz=e=>window.requestAnimationFrame(e),Uz=e=>window.cancelAnimationFrame(e));let O5=0;const IM=new Map;function qz(e){IM.delete(e);}const Lt=(e,t=1)=>{O5+=1;const n=O5;function r(o){if(o===0)qz(n),e();else {const i=jz(()=>{r(o-1);});IM.set(n,i);}}return r(t),n};Lt.cancel=e=>{const t=IM.get(e);return qz(e),Uz(t)};function hJ(e){let t=null;const n=o=>()=>{t=null,e.apply(void 0,Yt(o));},r=(...o)=>{t===null&&(t=Lt(n(o)));};return r.cancel=()=>{Lt.cancel(t),t=null;},r}const tp="ant",Vy="anticon",pJ=["outlined","borderless","filled","underlined"],gJ=(e,t)=>t||(e?`${tp}-${e}`:tp),Ct=f.createContext({getPrefixCls:gJ,iconPrefixCls:Vy}),{Consumer:R4e}=Ct,D5={};function Gt(e){const t=f.useContext(Ct),{getPrefixCls:n,direction:r,getPopupContainer:o,renderEmpty:i}=t,a=t[e];return {classNames:D5,styles:D5,...a,getPrefixCls:n,direction:r,getPopupContainer:o,renderEmpty:i}}function np(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 r2(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 _5="data-rc-order",L5="data-rc-priority",vJ="rc-util-key",o2=new Map;function Wz({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:vJ}function jy(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function bJ(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function OM(e){return Array.from((o2.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function Gz(e,t={}){if(!wi())return null;const{csp:n,prepend:r,priority:o=0}=t,i=bJ(r),a=i==="prependQueue",l=document.createElement("style");l.setAttribute(_5,i),a&&o&&l.setAttribute(L5,`${o}`),n?.nonce&&(l.nonce=n?.nonce),l.innerHTML=e;const u=jy(t),{firstChild:d}=u;if(r){if(a){const m=(t.styles||OM(u)).filter(p=>{if(!["prepend","prependQueue"].includes(p.getAttribute(_5)))return false;const g=Number(p.getAttribute(L5)||0);return o>=g});if(m.length)return u.insertBefore(l,m[m.length-1].nextSibling),l}u.insertBefore(l,d);}else u.appendChild(l);return l}function Kz(e,t={}){let{styles:n}=t;return n||=OM(jy(t)),n.find(r=>r.getAttribute(Wz(t))===e)}function rp(e,t={}){const n=Kz(e,t);n&&jy(t).removeChild(n);}function yJ(e,t){const n=o2.get(e);if(!n||!r2(document,n)){const r=Gz("",t),{parentNode:o}=r;o2.set(e,o),e.removeChild(r);}}function Pl(e,t,n={}){const r=jy(n),o=OM(r),i={...n,styles:o};yJ(r,i);const a=Kz(t,i);if(a)return i.csp?.nonce&&a.nonce!==i.csp?.nonce&&(a.nonce=i.csp?.nonce),a.innerHTML!==e&&(a.innerHTML=e),a;const l=Gz(e,i);return l.setAttribute(Wz(i),t),l}function Dl(e,t,n=false){const r=new Set;function o(i,a,l=1){const u=r.has(i);if(wr(!u,"Warning: There may be circular references"),u)return false;if(i===a)return true;if(n&&l>1)return false;r.add(i);const d=l+1;if(Array.isArray(i)){if(!Array.isArray(a)||i.length!==a.length)return false;for(let m=0;m<i.length;m++)if(!o(i[m],a[m],d))return false;return true}if(i&&a&&typeof i=="object"&&typeof a=="object"){const m=Object.keys(i);return m.length!==Object.keys(a).length?false:m.every(p=>o(i[p],a[p],d))}return false}return o(e,t)}const SJ="%";function i2(e){return e.join(SJ)}let z5=0;class CJ{instanceId;constructor(t){this.instanceId=t;}cache=new Map;updateTimes=new Map;extracted=new Set;get(t){return this.opGet(i2(t))}opGet(t){return this.cache.get(t)||null}update(t,n){return this.opUpdate(i2(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,z5),z5+=1);}}const xJ={},DM="data-token-hash",Es="data-css-hash",Gc="__cssinjs_instance__";function Yz(){const e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const t=document.body.querySelectorAll(`style[${Es}]`)||[],{firstChild:n}=document.head;Array.from(t).forEach(o=>{o[Gc]||=e,o[Gc]===e&&document.head.insertBefore(o,n);});const r={};Array.from(document.querySelectorAll(`style[${Es}]`)).forEach(o=>{const i=o.getAttribute(Es);r[i]?o[Gc]===e&&o.parentNode?.removeChild(o):r[i]=true;});}return new CJ(e)}const su=f.createContext({hashPriority:"low",cache:Yz(),defaultCache:true,autoPrefix:false}),wJ=e=>{const{children:t,...n}=e,r=f.useContext(su),o=Mf(()=>{const i={...r};Object.keys(n).forEach(u=>{const d=n[u];n[u]!==void 0&&(i[u]=d);});const{cache:a,transformers:l=[]}=n;return i.cache=i.cache||Yz(),i.defaultCache=!a&&r.defaultCache,l.includes(xJ)&&(i.autoPrefix=true),i},[r,n],(i,a)=>!Dl(i[0],a[0],true)||!Dl(i[1],a[1],true));return f.createElement(su.Provider,{value:o},t)};function $J(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 T0{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>T0.MAX_CACHE_SIZE+T0.MAX_CACHE_OFFSET){const[o]=this.keys.reduce((i,a)=>{const[,l]=i;return this.internalGet(a)[1]<l?[a,this.internalGet(a)[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 a=r.get(o);a?a.map||(a.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=>!$J(n,t)),this.deleteByPath(this.cache,t)}}let B5=0;class Xz{derivatives;id;constructor(t){this.derivatives=Array.isArray(t)?t:[t],this.id=B5,t.length===0&&(t.length>0,void 0),B5+=1;}getDerivativeToken(t){return this.derivatives.reduce((n,r)=>r(t,n),void 0)}}const yx=new T0;function A0(e){const t=Array.isArray(e)?e:[e];return yx.has(t)||yx.set(t,new Xz(t)),yx.get(t)}const EJ=new WeakMap,Sx={};function MJ(e,t){let n=EJ;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(Sx)||n.set(Sx,e()),n.get(Sx)}const k5=new WeakMap;function Rh(e){let t=k5.get(e)||"";return t||(Object.keys(e).forEach(n=>{const r=e[n];t+=n,r instanceof Xz?t+=r.id:r&&typeof r=="object"?t+=Rh(r):t+=r;}),t=np(t),k5.set(e,t)),t}function RJ(e,t){return np(`${t}_${Rh(e)}`)}const a2=wi();function oe(e){return typeof e=="number"?`${e}px`:e}function Qz(e){const{hashCls:t,hashPriority:n="low"}=e||{};if(!t)return "";const r=`.${t}`;return n==="low"?`:where(${r})`:r}const TJ=e=>e!=null,zb=(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(),AJ=(e,t,n)=>{const{hashCls:r,hashPriority:o="low"}=n||{};return Object.keys(e).length?`${Qz({hashCls:r,hashPriority:o})}.${t}${n?.scope?`.${n.scope}`:""}{${Object.entries(e).map(([i,a])=>`${i}:${a};`).join("")}}`:""},Zz=(e,t,n)=>{const{hashCls:r,hashPriority:o="low",prefix:i,unitless:a,ignore:l,preserve:u}=n||{},d={},m={};return Object.entries(e).forEach(([p,g])=>{if(u?.[p])m[p]=g;else if((typeof g=="string"||typeof g=="number")&&!l?.[p]){const b=zb(p,i);d[b]=typeof g=="number"&&!a?.[p]?`${g}px`:String(g),m[p]=`var(${b})`;}}),[m,AJ(d,t,{scope:n?.scope,hashCls:r,hashPriority:o})]},Zv=new Map;function _M(e,t,n,r,o){const{cache:i}=f.useContext(su),a=[e,...t],l=i2(a),u=p=>{i.opUpdate(l,g=>{const[b=0,y]=g||[void 0,void 0],C=y||n(),w=[b,C];return p?p(w):w});};f.useMemo(()=>{u();},[l]);const m=i.opGet(l)[1];return f.useInsertionEffect(()=>(u(([p,g])=>[p+1,g]),Zv.has(l)||(o?.(m),Zv.set(l,true),Promise.resolve().then(()=>{Zv.delete(l);})),()=>{i.opUpdate(l,p=>{const[g=0,b]=p||[];return g-1===0?(r?.(b,false),Zv.delete(l),null):[g-1,b]});}),[l]),m}const NJ={},PJ="css",Lc=new Map;function IJ(e){Lc.set(e,(Lc.get(e)||0)+1);}function OJ(e,t){typeof document<"u"&&document.querySelectorAll(`style[${DM}="${e}"]`).forEach(r=>{r[Gc]===t&&r.parentNode?.removeChild(r);});}const DJ=-1;function _J(e,t){Lc.set(e,(Lc.get(e)||0)-1);const n=new Set;Lc.forEach((r,o)=>{r<=0&&n.add(o);}),Lc.size-n.size>DJ&&n.forEach(r=>{OJ(r,t),Lc.delete(r);});}const Jz=(e,t,n,r)=>{let i={...n.getDerivativeToken(e),...t};return r&&(i=r(i)),i},LJ="token";function zJ(e,t,n){const{cache:{instanceId:r},container:o,hashPriority:i}=f.useContext(su),{salt:a="",override:l=NJ,formatToken:u,getComputedToken:d,cssVar:m}=n,p=MJ(()=>Object.assign({},...t),t),g=Rh(p),b=Rh(l),y=Rh(m);return _M(LJ,[a,e.id,g,b,y],()=>{const C=d?d(p,l,e):Jz(p,l,e,u),w={...C},$=`${a}_${m.prefix}`,M=np($),T=`${PJ}-${M}`;w._tokenKey=RJ(w,$);const[R,I]=Zz(C,m.key,{prefix:m.prefix,ignore:m.ignore,unitless:m.unitless,preserve:m.preserve,hashPriority:i,hashCls:m.hashed?T:void 0});return R._hashId=M,IJ(m.key),[R,T,w,I,m.key]},([,,,,C])=>{_J(C,r);},([,,,C,w])=>{if(!C)return;const $=Pl(C,np(`css-var-${w}`),{mark:Es,prepend:"queue",attachTo:o,priority:-999});$[Gc]=r,$.setAttribute(DM,w);})}var BJ={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},Wn="-ms-",Th="-moz-",xn="-webkit-",eB="comm",LM="rule",zM="decl",kJ="@import",FJ="@namespace",tB="@keyframes",HJ="@layer",nB=Math.abs,BM=String.fromCharCode,s2=Object.assign;function VJ(e,t){return Mr(e,0)^45?(((t<<2^Mr(e,0))<<2^Mr(e,1))<<2^Mr(e,2))<<2^Mr(e,3):0}function rB(e){return e.trim()}function gs(e,t){return (e=t.exec(e))?e[0]:e}function Qt(e,t,n){return e.replace(t,n)}function Bb(e,t,n){return e.indexOf(t,n)}function Mr(e,t){return e.charCodeAt(t)|0}function lu(e,t,n){return e.slice(t,n)}function sa(e){return e.length}function oB(e){return e.length}function ph(e,t){return t.push(e),e}function jJ(e,t){return e.map(t).join("")}function F5(e,t){return e.filter(function(n){return !gs(n,t)})}var Uy=1,rf=1,iB=0,Gi=0,Cr=0,Rf="";function qy(e,t,n,r,o,i,a,l){return {value:e,root:t,parent:n,type:r,props:o,children:i,line:Uy,column:rf,length:a,return:"",siblings:l}}function vl(e,t){return s2(qy("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function fd(e){for(;e.root;)e=vl(e.root,{children:[e]});ph(e,e.siblings);}function UJ(){return Cr}function qJ(){return Cr=Gi>0?Mr(Rf,--Gi):0,rf--,Cr===10&&(rf=1,Uy--),Cr}function pa(){return Cr=Gi<iB?Mr(Rf,Gi++):0,rf++,Cr===10&&(rf=1,Uy++),Cr}function Ml(){return Mr(Rf,Gi)}function kb(){return Gi}function Wy(e,t){return lu(Rf,e,t)}function op(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 WJ(e){return Uy=rf=1,iB=sa(Rf=e),Gi=0,[]}function GJ(e){return Rf="",e}function Cx(e){return rB(Wy(Gi-1,l2(e===91?e+2:e===40?e+1:e)))}function KJ(e){for(;(Cr=Ml())&&Cr<33;)pa();return op(e)>2||op(Cr)>3?"":" "}function YJ(e,t){for(;--t&&pa()&&!(Cr<48||Cr>102||Cr>57&&Cr<65||Cr>70&&Cr<97););return Wy(e,kb()+(t<6&&Ml()==32&&pa()==32))}function l2(e){for(;pa();)switch(Cr){case e:return Gi;case 34:case 39:e!==34&&e!==39&&l2(Cr);break;case 40:e===41&&l2(e);break;case 92:pa();break}return Gi}function XJ(e,t){for(;pa()&&e+Cr!==57;)if(e+Cr===84&&Ml()===47)break;return "/*"+Wy(t,Gi-1)+"*"+BM(e===47?e:pa())}function QJ(e){for(;!op(Ml());)pa();return Wy(e,Gi)}function H5(e){return GJ(Fb("",null,null,null,[""],e=WJ(e),0,[0],e))}function Fb(e,t,n,r,o,i,a,l,u){for(var d=0,m=0,p=a,g=0,b=0,y=0,S=1,C=1,w=1,$=0,M="",T=o,R=i,I=r,N=M;C;)switch(y=$,$=pa()){case 40:if(y!=108&&Mr(N,p-1)==58){Bb(N+=Qt(Cx($),"&","&\f"),"&\f",nB(d?l[d-1]:0))!=-1&&(w=-1);break}case 34:case 39:case 91:N+=Cx($);break;case 9:case 10:case 13:case 32:N+=KJ(y);break;case 92:N+=YJ(kb()-1,7);continue;case 47:switch(Ml()){case 42:case 47:ph(ZJ(XJ(pa(),kb()),t,n,u),u),(op(y||1)==5||op(Ml()||1)==5)&&sa(N)&&lu(N,-1,void 0)!==" "&&(N+=" ");break;default:N+="/";}break;case 123*S:l[d++]=sa(N)*w;case 125*S:case 59:case 0:switch($){case 0:case 125:C=0;case 59+m:w==-1&&(N=Qt(N,/\f/g,"")),b>0&&(sa(N)-p||S===0&&y===47)&&ph(b>32?j5(N+";",r,n,p-1,u):j5(Qt(N," ","")+";",r,n,p-2,u),u);break;case 59:N+=";";default:if(ph(I=V5(N,t,n,d,m,o,l,M,T=[],R=[],p,i),i),$===123)if(m===0)Fb(N,t,I,I,T,i,p,l,R);else {switch(g){case 99:if(Mr(N,3)===110)break;case 108:if(Mr(N,2)===97)break;default:m=0;case 100:case 109:case 115:}m?Fb(e,I,I,r&&ph(V5(e,I,I,0,0,o,l,M,o,T=[],p,R),R),o,R,p,l,r?T:R):Fb(N,I,I,I,[""],R,0,l,R);}}d=m=b=0,S=w=1,M=N="",p=a;break;case 58:p=1+sa(N),b=y;default:if(S<1){if($==123)--S;else if($==125&&S++==0&&qJ()==125)continue}switch(N+=BM($),$*S){case 38:w=m>0?1:(N+="\f",-1);break;case 44:l[d++]=(sa(N)-1)*w,w=1;break;case 64:Ml()===45&&(N+=Cx(pa())),g=Ml(),m=p=sa(M=N+=QJ(kb())),$++;break;case 45:y===45&&sa(N)==2&&(S=0);}}return i}function V5(e,t,n,r,o,i,a,l,u,d,m,p){for(var g=o-1,b=o===0?i:[""],y=oB(b),S=0,C=0,w=0;S<r;++S)for(var $=0,M=lu(e,g+1,g=nB(C=a[S])),T=e;$<y;++$)(T=rB(C>0?b[$]+" "+M:Qt(M,/&\f/g,b[$])))&&(u[w++]=T);return qy(e,t,n,o===0?LM:l,u,d,m,p)}function ZJ(e,t,n,r){return qy(e,t,n,eB,BM(UJ()),lu(e,2,-2),0,r)}function j5(e,t,n,r,o){return qy(e,t,n,zM,lu(e,0,r),lu(e,r+1,-1),r,o)}function aB(e,t,n){switch(VJ(e,t)){case 5103:return xn+"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 xn+e+e;case 4855:return xn+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return Th+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return xn+e+Th+e+Wn+e+e;case 5936:switch(Mr(e,t+11)){case 114:return xn+e+Wn+Qt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return xn+e+Wn+Qt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return xn+e+Wn+Qt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return xn+e+Wn+e+e;case 6165:return xn+e+Wn+"flex-"+e+e;case 5187:return xn+e+Qt(e,/(\w+).+(:[^]+)/,xn+"box-$1$2"+Wn+"flex-$1$2")+e;case 5443:return xn+e+Wn+"flex-item-"+Qt(e,/flex-|-self/g,"")+(gs(e,/flex-|baseline/)?"":Wn+"grid-row-"+Qt(e,/flex-|-self/g,""))+e;case 4675:return xn+e+Wn+"flex-line-pack"+Qt(e,/align-content|flex-|-self/g,"")+e;case 5548:return xn+e+Wn+Qt(e,"shrink","negative")+e;case 5292:return xn+e+Wn+Qt(e,"basis","preferred-size")+e;case 6060:return xn+"box-"+Qt(e,"-grow","")+xn+e+Wn+Qt(e,"grow","positive")+e;case 4554:return xn+Qt(e,/([^-])(transform)/g,"$1"+xn+"$2")+e;case 6187:return Qt(Qt(Qt(e,/(zoom-|grab)/,xn+"$1"),/(image-set)/,xn+"$1"),e,"")+e;case 5495:case 3959:return Qt(e,/(image-set\([^]*)/,xn+"$1$`$1");case 4968:return Qt(Qt(e,/(.+:)(flex-)?(.*)/,xn+"box-pack:$3"+Wn+"flex-pack:$3"),/space-between/,"justify")+xn+e+e;case 4200:if(!gs(e,/flex-|baseline/))return Wn+"grid-column-align"+lu(e,t)+e;break;case 2592:case 3360:return Wn+Qt(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(r,o){return t=o,gs(r.props,/grid-\w+-end/)})?~Bb(e+(n=n[t].value),"span",0)?e:Wn+Qt(e,"-start","")+e+Wn+"grid-row-span:"+(~Bb(n,"span",0)?gs(n,/\d+/):+gs(n,/\d+/)-+gs(e,/\d+/))+";":Wn+Qt(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(r){return gs(r.props,/grid-\w+-start/)})?e:Wn+Qt(Qt(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Qt(e,/(.+)-inline(.+)/,xn+"$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(sa(e)-1-t>6)switch(Mr(e,t+1)){case 109:if(Mr(e,t+4)!==45)break;case 102:return Qt(e,/(.+:)(.+)-([^]+)/,"$1"+xn+"$2-$3$1"+Th+(Mr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return ~Bb(e,"stretch",0)?aB(Qt(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return Qt(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,o,i,a,l,u,d){return Wn+o+":"+i+d+(a?Wn+o+"-span:"+(l?u:+u-+i)+d:"")+e});case 4949:if(Mr(e,t+6)===121)return Qt(e,":",":"+xn)+e;break;case 6444:switch(Mr(e,Mr(e,14)===45?18:11)){case 120:return Qt(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+xn+(Mr(e,14)===45?"inline-":"")+"box$3$1"+xn+"$2$3$1"+Wn+"$2box$3")+e;case 100:return Qt(e,":",":"+Wn)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Qt(e,"scroll-","scroll-snap-")+e}return e}function ip(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function U5(e,t,n,r){switch(e.type){case HJ:if(e.children.length)break;case kJ:case FJ:case zM:return e.return=e.return||e.value;case eB:return "";case tB:return e.return=e.value+"{"+ip(e.children,r)+"}";case LM:if(!sa(e.value=e.props.join(",")))return ""}return sa(n=ip(e.children,r))?e.return=e.value+"{"+n+"}":""}function JJ(e){var t=oB(e);return function(n,r,o,i){for(var a="",l=0;l<t;l++)a+=e[l](n,r,o,i)||"";return a}}function eee(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case zM:e.return=aB(e.value,e.length,n);return;case tB:return ip([vl(e,{value:Qt(e.value,"@","@"+xn)})],r);case LM:if(e.length)return jJ(n=e.props,function(o){switch(gs(o,r=/(::plac\w+|:read-\w+)/)){case ":read-only":case ":read-write":fd(vl(e,{props:[Qt(o,/:(read-\w+)/,":"+Th+"$1")]})),fd(vl(e,{props:[o]})),s2(e,{props:F5(n,r)});break;case "::placeholder":fd(vl(e,{props:[Qt(o,/:(plac\w+)/,":"+xn+"input-$1")]})),fd(vl(e,{props:[Qt(o,/:(plac\w+)/,":"+Th+"$1")]})),fd(vl(e,{props:[Qt(o,/:(plac\w+)/,Wn+"input-$1")]})),fd(vl(e,{props:[o]})),s2(e,{props:F5(n,r)});break}return ""})}}const q5="data-ant-cssinjs-cache-path",sB="_FILE_STYLE__";let Kc,lB=true;function tee(){if(!Kc&&(Kc={},wi())){const e=document.createElement("div");e.className=q5,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(":");Kc[o]=i;});const n=document.querySelector(`style[${q5}]`);n&&(lB=false,n.parentNode?.removeChild(n)),document.body.removeChild(e);}}function nee(e){return tee(),!!Kc[e]}function ree(e){const t=Kc[e];let n=null;if(t&&wi())if(lB)n=sB;else {const r=document.querySelector(`style[${Es}="${Kc[e]}"]`);r?n=r.innerHTML:delete Kc[e];}return [n,t]}const oee="_skip_check_",cB="_multi_value_";function xx(e,t){return (t?ip(H5(e),JJ([eee,U5])):ip(H5(e),U5)).replace(/\{%%%\:[^;];}/g,";")}function iee(e){return typeof e=="object"&&e&&(oee in e||cB in e)}function W5(e,t,n="high"){if(!t)return e;const r=Qz({hashCls:t,hashPriority:n});return e.split(",").map(i=>{const a=i.trim().split(/\s+/);let l=a[0]||"";const u=l.match(/^\w+/)?.[0]||"";return l=`${u}${r}${l.slice(u.length)}`,[l,...a.slice(1)].join(" ")}).join(",")}const c2=(e,t={},{root:n,injectHash:r,parentSelectors:o}={root:true,parentSelectors:[]})=>{const{hashId:i,layer:a,path:l,hashPriority:u,transformers:d=[],linters:m=[]}=t;let p="",g={};function b(C){const w=C.getName(i);if(!g[w]){const[$]=c2(C.style,t,{root:false,parentSelectors:o});g[w]=`@keyframes ${C.getName(i)}${$}`;}}function y(C,w=[]){return C.forEach($=>{Array.isArray($)?y($,w):$&&w.push($);}),w}return y(Array.isArray(e)?e:[e]).forEach(C=>{const w=typeof C=="string"&&!n?{}:C;if(typeof w=="string")p+=`${w}
`;else if(w._keyframe)b(w);else {const $=d.reduce((M,T)=>T?.visit?.(M)||M,w);Object.keys($).forEach(M=>{const T=$[M];if(typeof T=="object"&&T&&(M!=="animationName"||!T._keyframe)&&!iee(T)){let R=false,I=M.trim(),N=false;(n||r)&&i?I.startsWith("@")?R=true:I==="&"?I=W5("",i,u):I=W5(M,i,u):n&&!i&&(I==="&"||I==="")&&(I="",N=true);const[P,O]=c2(T,t,{root:N,injectHash:R,parentSelectors:[...o,I]});g={...g,...O},p+=`${I}${P}`;}else {let R=function(N,P){const O=N.replace(/[A-Z]/g,L=>`-${L.toLowerCase()}`);let _=P;!BJ[N]&&typeof _=="number"&&_!==0&&(_=`${_}px`),N==="animationName"&&P?._keyframe&&(b(P),_=P.getName(i)),p+=`${O}:${_};`;};const I=T?.value??T;typeof T=="object"&&T?.[cB]&&Array.isArray(I)?I.forEach(N=>{R(M,N);}):TJ(I)&&R(M,I);}});}}),n?a&&(p&&(p=`@layer ${a.name} {${p}}`),a.dependencies&&(g[`@layer ${a.name}`]=a.dependencies.map(C=>`@layer ${C}, ${a.name};`).join(`
`))):p=`{${p}}`,[p,g]};function uB(e,t){return np(`${e.join("%")}${t}`)}const aee="style";function u2(e,t){const{path:n,hashId:r,layer:o,nonce:i,clientOnly:a,order:l=0}=e,{mock:u,hashPriority:d,container:m,transformers:p,linters:g,cache:b,layer:y,autoPrefix:S}=f.useContext(su),C=[r||""];y&&C.push("layer"),C.push(...n);let w=a2;_M(aee,C,()=>{const $=C.join("|");if(nee($)){const[P,O]=ree($);if(P)return [P,O,{},a,l]}const M=t(),[T,R]=c2(M,{hashId:r,hashPriority:d,layer:y?o:void 0,path:n.join("-"),transformers:p,linters:g}),I=xx(T,S||false),N=uB(C,I);return [I,N,R,a,l]},($,M)=>{const[,T]=$;M&&a2&&rp(T,{mark:Es,attachTo:m});},$=>{const[M,T,R,,I]=$;if(w&&M!==sB){const N={mark:Es,prepend:y?false:"queue",attachTo:m,priority:I},P=typeof i=="function"?i():i;P&&(N.csp={nonce:P});const O=[],_=[];Object.keys(R).forEach(j=>{j.startsWith("@layer")?O.push(j):_.push(j);}),O.forEach(j=>{Pl(xx(R[j],S||false),`_layer-${j}`,{...N,prepend:true});});const L=Pl(M,T,N);L[Gc]=b.instanceId,_.forEach(j=>{Pl(xx(R[j],S||false),`_effect-${j}`,N);});}});}const see="cssVar",lee=(e,t)=>{const{key:n,prefix:r,unitless:o,ignore:i,token:a,hashId:l,scope:u=""}=e,{cache:{instanceId:d},container:m,hashPriority:p}=f.useContext(su),{_tokenKey:g}=a,b=[...e.path,n,u,g];return _M(see,b,()=>{const S=t(),[C,w]=Zz(S,n,{prefix:r,unitless:o,ignore:i,scope:u,hashPriority:p,hashCls:l}),$=uB(b,w);return [C,w,$,n]},([,,S])=>{a2&&rp(S,{mark:Es,attachTo:m});},([,S,C])=>{if(!S)return;const w=Pl(S,C,{mark:Es,prepend:"queue",attachTo:m,priority:-999});w[Gc]=d,w.setAttribute(DM,n);})};class zt{name;style;constructor(t,n){this.name=t,this.style=n;}getName(t=""){return t?`${t}-${this.name}`:this.name}_keyframe=true}function md(e){return e.notSplit=true,e}md(["borderTop","borderBottom"]),md(["borderTop"]),md(["borderBottom"]),md(["borderLeft","borderRight"]),md(["borderLeft"]),md(["borderRight"]);function xr(e){"@babel/helpers - typeof";return xr=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},xr(e)}function cee(e){if(Array.isArray(e))return e}function uee(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,l=[],u=true,d=false;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1;}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(m){d=true,o=m;}finally{try{if(!u&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw o}}return l}}function dee(){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 kM(e,t){return cee(e)||uee(e,t)||PM(e,t)||dee()}function fee(e,t){if(xr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return (t==="string"?String:Number)(e)}function dB(e){var t=fee(e,"string");return xr(t)=="symbol"?t:t+""}function St(e,t,n){return (t=dB(t))in e?Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true}):e[t]=n,e}function G5(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 Jn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?G5(Object(n),true).forEach(function(r){St(e,r,n[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r));});}return e}function Qi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function K5(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,dB(r.key),r);}}function Zi(e,t,n){return t&&K5(e.prototype,t),n&&K5(e,n),Object.defineProperty(e,"prototype",{writable:false}),e}function jd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ap(e,t){return ap=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},ap(e,t)}function fB(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&&ap(e,t);}function sp(e){return sp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},sp(e)}function FM(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return (FM=function(){return !!e})()}function mee(e,t){if(t&&(xr(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jd(e)}function mB(e){var t=FM();return function(){var n,r=sp(e);if(t){var o=sp(this).constructor;n=Reflect.construct(r,arguments,o);}else n=r.apply(this,arguments);return mee(this,n)}}var hee=Zi(function e(){Qi(this,e);}),hB="CALC_UNIT",pee=new RegExp(hB,"g");function wx(e){return typeof e=="number"?"".concat(e).concat(hB):e}var gee=(function(e){fB(n,e);var t=mB(n);function n(r,o){var i;Qi(this,n),i=t.call(this),St(jd(i),"result",""),St(jd(i),"unitlessCssVar",void 0),St(jd(i),"lowPriority",void 0);var a=xr(r);return i.unitlessCssVar=o,r instanceof n?i.result="(".concat(r.result,")"):a==="number"?i.result=wx(r):a==="string"&&(i.result=r),i}return Zi(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(wx(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(wx(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,a=o||{},l=a.unit,u=true;return typeof l=="boolean"?u=l:Array.from(this.unitlessCssVar).some(function(d){return i.result.includes(d)})&&(u=false),this.result=this.result.replace(pee,u?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),n})(hee),vee=function(t,n){var r=gee;return function(o){return new r(o,n)}},Y5=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 X5(e,t,n,r){var o=Jn({},t[e]);if(r!=null&&r.deprecatedTokens){var i=r.deprecatedTokens;i.forEach(function(l){var u=kM(l,2),d=u[0],m=u[1];if(o!=null&&o[d]||o!=null&&o[m]){var p;(p=o[m])!==null&&p!==void 0||(o[m]=o?.[d]);}});}var a=Jn(Jn({},n),o);return Object.keys(a).forEach(function(l){a[l]===t[l]&&delete a[l];}),a}var pB=typeof CSSINJS_STATISTIC<"u",d2=true;function Ft(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!pB)return Object.assign.apply(Object,[{}].concat(t));d2=false;var r={};return t.forEach(function(o){if(xr(o)==="object"){var i=Object.keys(o);i.forEach(function(a){Object.defineProperty(r,a,{configurable:true,enumerable:true,get:function(){return o[a]}});});}}),d2=true,r}var Q5={};function bee(){}var yee=function(t){var n,r=t,o=bee;return pB&&typeof Proxy<"u"&&(n=new Set,r=new Proxy(t,{get:function(a,l){if(d2){var u;(u=n)===null||u===void 0||u.add(l);}return a[l]}}),o=function(a,l){var u;Q5[a]={global:Array.from(n),component:Jn(Jn({},(u=Q5[a])===null||u===void 0?void 0:u.component),l)};}),{token:r,keys:n,flush:o}};function Z5(e,t,n){if(typeof n=="function"){var r;return n(Ft(t,(r=t[e])!==null&&r!==void 0?r:{}))}return n??{}}function See(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 oe(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 oe(i)}).join(","),")")}}}var Cee=1e3*60*10,xee=(function(){function e(){Qi(this,e),St(this,"map",new Map),St(this,"objectIDMap",new WeakMap),St(this,"nextID",0),St(this,"lastAccessBeat",new Map),St(this,"accessBeat",0);}return Zi(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&&xr(i)==="object"?"obj_".concat(r.getObjectID(i)):"".concat(xr(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>Cee&&(n.map.delete(i),n.lastAccessBeat.delete(i));}),this.accessBeat=0;}}}]),e})(),J5=new xee;function wee(e,t){return G.useMemo(function(){var n=J5.get(t);if(n)return n;var r=e();return J5.set(t,r),r},t)}var $ee=function(){return {}};function Eee(e){var t=e.useCSP,n=t===void 0?$ee:t,r=e.useToken,o=e.usePrefix,i=e.getResetStyles,a=e.getCommonStyle,l=e.getCompUnitless;function u(g,b,y,S){var C=Array.isArray(g)?g[0]:g;function w(P){return "".concat(String(C)).concat(P.slice(0,1).toUpperCase()).concat(P.slice(1))}var $=S?.unitless||{},M=typeof l=="function"?l(g):{},T=Jn(Jn({},M),{},St({},w("zIndexPopup"),true));Object.keys($).forEach(function(P){T[w(P)]=$[P];});var R=Jn(Jn({},S),{},{unitless:T,prefixToken:w}),I=m(g,b,y,R),N=d(C,y,R);return function(P){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:P,_=I(P,O),L=N(O);return [_,L]}}function d(g,b,y){var S=y.unitless,C=y.prefixToken,w=y.ignore;return function($){var M=r(),T=M.cssVar,R=M.realToken;return lee({path:[g],prefix:T.prefix,key:T.key,unitless:S,ignore:w,token:R,scope:$},function(){var I=Z5(g,R,b),N=X5(g,R,I,{deprecatedTokens:y?.deprecatedTokens});return I&&Object.keys(I).forEach(function(P){N[C(P)]=N[P],delete N[P];}),N}),T?.key}}function m(g,b,y){var S=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},C=Array.isArray(g)?g:[g,g],w=kM(C,1),$=w[0],M=C.join("-"),T=e.layer||{name:"antd"};return function(R){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:R,N=r(),P=N.theme,O=N.realToken,_=N.hashId,L=N.token,j=N.cssVar,U=N.zeroRuntime,q=f.useMemo(function(){return U},[]);if(q)return _;var V=o(),B=V.rootPrefixCls,F=V.iconPrefixCls,W=n(),K="css",Q=wee(function(){var J=new Set;return Object.keys(S.unitless||{}).forEach(function(te){J.add(zb(te,j.prefix)),J.add(zb(te,Y5($,j.prefix)));}),vee(K,J)},[K,$,j?.prefix]),D=See(),z=D.max,Y=D.min,ee={theme:P,token:L,hashId:_,nonce:function(){return W.nonce},clientOnly:S.clientOnly,layer:T,order:S.order||-999};return typeof i=="function"&&u2(Jn(Jn({},ee),{},{clientOnly:false,path:["Shared",B]}),function(){return i(L,{prefix:{rootPrefixCls:B,iconPrefixCls:F},csp:W})}),u2(Jn(Jn({},ee),{},{path:[M,R,F]}),function(){if(S.injectStyle===false)return [];var J=yee(L),te=J.token,ne=J.flush,se=Z5($,O,y),ae=".".concat(R),re=X5($,O,se,{deprecatedTokens:S.deprecatedTokens});se&&xr(se)==="object"&&Object.keys(se).forEach(function(Ee){se[Ee]="var(".concat(zb(Ee,Y5($,j.prefix)),")");});var de=Ft(te,{componentCls:ae,prefixCls:R,iconCls:".".concat(F),antCls:".".concat(B),calc:Q,max:z,min:Y},se),ge=b(de,{hashId:_,prefixCls:R,rootPrefixCls:B,iconPrefixCls:F});ne($,re);var ie=typeof a=="function"?a(de,R,I,S.resetFont):null;return [S.resetStyle===false?null:ie,ge]}),_}}function p(g,b,y){var S=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},C=m(g,b,y,Jn({resetStyle:false,order:-998},S)),w=function(M){var T=M.prefixCls,R=M.rootCls,I=R===void 0?T:R;return C(T,I),null};return w}return {genStyleHooks:u,genSubStyleComponent:p,genComponentStyleHook:m}}const _l=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function Hb(e){return (e+8)/e}function Mee(e){const t=Array.from({length:10}).map((n,r)=>{const o=r-1,i=e*Math.E**(o/5),a=r>1?Math.floor(i):Math.ceil(i);return Math.floor(a/2)*2});return t[1]=e,t.map(n=>({size:n,lineHeight:Hb(n)}))}const Ree="6.2.3",HM={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"},of={...HM,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},Tee={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"},Dr=Math.round;function $x(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 eI=(e,t,n)=>n===0?e:e/100;function qm(e,t){const n=t||255;return e>n?n:e<0?0:e}class cn{isValid=true;r=0;g=0;b=0;a=1;_h;_hsl_s;_hsv_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=Tee[r.toLowerCase()];i&&this.fromHexString(parseInt(i,36).toString(16).padStart(6,"0"));}}else if(t instanceof cn)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._hsl_s=t._hsl_s,this._hsv_s=t._hsv_s,this._l=t._l,this._v=t._v;else if(n("rgb"))this.r=qm(t.r),this.g=qm(t.g),this.b=qm(t.b),this.a=typeof t.a=="number"?qm(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 a=i/255;return a<=.03928?a/12.92:Math.pow((a+.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=Dr(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(){return this.getHSVSaturation()}getHSVSaturation(){if(typeof this._hsv_s>"u"){const t=this.getMax()-this.getMin();t===0?this._hsv_s=0:this._hsv_s=t/this.getMax();}return this._hsv_s}getHSLSaturation(){if(typeof this._hsl_s>"u"){const t=this.getMax()-this.getMin();if(t===0)this._hsl_s=0;else {const n=this.getLightness();this._hsl_s=t/255/(1-Math.abs(2*n-1));}}return this._hsl_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=l=>(r[l]-this[l])*o+this[l],a={r:Dr(i("r")),g:Dr(i("g")),b:Dr(i("b")),a:Dr(i("a")*100)/100};return this._c(a)}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=>Dr((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=Dr(this.a*255).toString(16);t+=i.length===2?i:"0"+i;}return t}toHsl(){return {h:this.getHue(),s:this.getHSLSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),n=Dr(this.getHSLSaturation()*100),r=Dr(this.getLightness()*100);return this.a!==1?`hsla(${t},${n}%,${r}%,${this.a})`:`hsl(${t},${n}%,${r}%)`}toHsv(){return {h:this.getHue(),s:this.getHSVSaturation(),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]=qm(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}){const i=(t%360+360)%360;if(this._h=i,this._hsl_s=n,this._l=r,this.a=typeof o=="number"?o:1,n<=0){const b=Dr(r*255);this.r=b,this.g=b,this.b=b;return}let a=0,l=0,u=0;const d=i/60,m=(1-Math.abs(2*r-1))*n,p=m*(1-Math.abs(d%2-1));d>=0&&d<1?(a=m,l=p):d>=1&&d<2?(a=p,l=m):d>=2&&d<3?(l=m,u=p):d>=3&&d<4?(l=p,u=m):d>=4&&d<5?(a=p,u=m):d>=5&&d<6&&(a=m,u=p);const g=r-m/2;this.r=Dr((a+g)*255),this.g=Dr((l+g)*255),this.b=Dr((u+g)*255);}fromHsv({h:t,s:n,v:r,a:o}){const i=(t%360+360)%360;this._h=i,this._hsv_s=n,this._v=r,this.a=typeof o=="number"?o:1;const a=Dr(r*255);if(this.r=a,this.g=a,this.b=a,n<=0)return;const l=i/60,u=Math.floor(l),d=l-u,m=Dr(r*(1-n)*255),p=Dr(r*(1-n*d)*255),g=Dr(r*(1-n*(1-d))*255);switch(u){case 0:this.g=g,this.b=m;break;case 1:this.r=p,this.b=m;break;case 2:this.r=m,this.b=g;break;case 3:this.r=m,this.g=p;break;case 4:this.r=g,this.g=m;break;default:this.g=m,this.b=p;break}}fromHsvString(t){const n=$x(t,eI);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]});}fromHslString(t){const n=$x(t,eI);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]});}fromRgbString(t){const n=$x(t,(r,o)=>o.includes("%")?Dr(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3];}}const Jv=2,tI=.16,Aee=.05,Nee=.05,Pee=.15,gB=5,vB=4,Iee=[{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 nI(e,t,n){let r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-Jv*t:Math.round(e.h)+Jv*t:r=n?Math.round(e.h)+Jv*t:Math.round(e.h)-Jv*t,r<0?r+=360:r>=360&&(r-=360),r}function rI(e,t,n){if(e.h===0&&e.s===0)return e.s;let r;return n?r=e.s-tI*t:t===vB?r=e.s+tI:r=e.s+Aee*t,r>1&&(r=1),n&&t===gB&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function oI(e,t,n){let r;return n?r=e.v+Nee*t:r=e.v-Pee*t,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function Wp(e,t={}){const n=[],r=new cn(e),o=r.toHsv();for(let i=gB;i>0;i-=1){const a=new cn({h:nI(o,i,true),s:rI(o,i,true),v:oI(o,i,true)});n.push(a);}n.push(r);for(let i=1;i<=vB;i+=1){const a=new cn({h:nI(o,i),s:rI(o,i),v:oI(o,i)});n.push(a);}return t.theme==="dark"?Iee.map(({index:i,amount:a})=>new cn(t.backgroundColor||"#141414").mix(n[i],a).toHexString()):n.map(i=>i.toHexString())}const Ex={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"},f2=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];f2.primary=f2[5];const m2=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];m2.primary=m2[5];const h2=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];h2.primary=h2[5];const p2=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];p2.primary=p2[5];const g2=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];g2.primary=g2[5];const v2=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];v2.primary=v2[5];const b2=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];b2.primary=b2[5];const y2=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];y2.primary=y2[5];const N0=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];N0.primary=N0[5];const S2=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];S2.primary=S2[5];const C2=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];C2.primary=C2[5];const x2=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];x2.primary=x2[5];const w2=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];w2.primary=w2[5];const Mx={red:f2,volcano:m2,orange:h2,gold:p2,yellow:g2,lime:v2,green:b2,cyan:y2,blue:N0,geekblue:S2,purple:C2,magenta:x2,grey:w2};function bB(e,{generateColorPalettes:t,generateNeutralColorPalettes:n}){const{colorSuccess:r,colorWarning:o,colorError:i,colorInfo:a,colorPrimary:l,colorBgBase:u,colorTextBase:d}=e,m=t(l),p=t(r),g=t(o),b=t(i),y=t(a),S=n(u,d),C=e.colorLink||e.colorInfo,w=t(C),$=new cn(b[1]).mix(new cn(b[3]),50).toHexString();return {...S,colorPrimaryBg:m[1],colorPrimaryBgHover:m[2],colorPrimaryBorder:m[3],colorPrimaryBorderHover:m[4],colorPrimaryHover:m[5],colorPrimary:m[6],colorPrimaryActive:m[7],colorPrimaryTextHover:m[8],colorPrimaryText:m[9],colorPrimaryTextActive:m[10],colorSuccessBg:p[1],colorSuccessBgHover:p[2],colorSuccessBorder:p[3],colorSuccessBorderHover:p[4],colorSuccessHover:p[4],colorSuccess:p[6],colorSuccessActive:p[7],colorSuccessTextHover:p[8],colorSuccessText:p[9],colorSuccessTextActive:p[10],colorErrorBg:b[1],colorErrorBgHover:b[2],colorErrorBgFilledHover:$,colorErrorBgActive:b[3],colorErrorBorder:b[3],colorErrorBorderHover:b[4],colorErrorHover:b[5],colorError:b[6],colorErrorActive:b[7],colorErrorTextHover:b[8],colorErrorText:b[9],colorErrorTextActive:b[10],colorWarningBg:g[1],colorWarningBgHover:g[2],colorWarningBorder:g[3],colorWarningBorderHover:g[4],colorWarningHover:g[4],colorWarning:g[6],colorWarningActive:g[7],colorWarningTextHover:g[8],colorWarningText:g[9],colorWarningTextActive:g[10],colorInfoBg:y[1],colorInfoBgHover:y[2],colorInfoBorder:y[3],colorInfoBorderHover:y[4],colorInfoHover:y[4],colorInfo:y[6],colorInfoActive:y[7],colorInfoTextHover:y[8],colorInfoText:y[9],colorInfoTextActive:y[10],colorLinkHover:w[4],colorLink:w[6],colorLinkActive:w[7],colorBgMask:new cn("#000").setA(.45).toRgbString(),colorWhite:"#fff"}}const Oee=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 Dee(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,...Oee(r)}}const yB=e=>{const{controlHeight:t}=e;return {controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}},SB=e=>{const t=Mee(e),n=t.map(m=>m.size),r=t.map(m=>m.lineHeight),o=n[1],i=n[0],a=n[2],l=r[1],u=r[0],d=r[2];return {fontSizeSM:i,fontSize:o,fontSizeLG:a,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:l,lineHeightLG:d,lineHeightSM:u,fontHeight:Math.round(l*o),fontHeightLG:Math.round(d*a),fontHeightSM:Math.round(u*i),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function _ee(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 _i=(e,t)=>new cn(e).setA(t).toRgbString(),hd=(e,t)=>new cn(e).darken(t).toHexString(),Lee=e=>{const t=Wp(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]}},zee=(e,t)=>{const n=e||"#fff",r=t||"#000";return {colorBgBase:n,colorTextBase:r,colorText:_i(r,.88),colorTextSecondary:_i(r,.65),colorTextTertiary:_i(r,.45),colorTextQuaternary:_i(r,.25),colorFill:_i(r,.15),colorFillSecondary:_i(r,.06),colorFillTertiary:_i(r,.04),colorFillQuaternary:_i(r,.02),colorBgSolid:_i(r,1),colorBgSolidHover:_i(r,.75),colorBgSolidActive:_i(r,.95),colorBgLayout:hd(n,4),colorBgContainer:hd(n,0),colorBgElevated:hd(n,0),colorBgSpotlight:_i(r,.85),colorBgBlur:"transparent",colorBorder:hd(n,15),colorBorderDisabled:hd(n,15),colorBorderSecondary:hd(n,6)}};function Gy(e){Ex.pink=Ex.magenta,Mx.pink=Mx.magenta;const t=Object.keys(HM).map(n=>{const r=e[n]===Ex[n]?Mx[n]:Wp(e[n]);return Array.from({length:10},()=>1).reduce((o,i,a)=>(o[`${n}-${a+1}`]=r[a],o[`${n}${a+1}`]=r[a],o),{})}).reduce((n,r)=>(n={...n,...r},n),{});return {...e,...t,...bB(e,{generateColorPalettes:Lee,generateNeutralColorPalettes:zee}),...SB(e.fontSize),..._ee(e),...yB(e),...Dee(e)}}const VM=A0(Gy),lp={token:of,override:{override:of},hashed:true},jM=G.createContext(lp);function Rx(e){return e>=0&&e<=255}function gh(e,t){const{r:n,g:r,b:o,a:i}=new cn(e).toRgb();if(i<1)return e;const{r:a,g:l,b:u}=new cn(t).toRgb();for(let d=.01;d<=1;d+=.01){const m=Math.round((n-a*(1-d))/d),p=Math.round((r-l*(1-d))/d),g=Math.round((o-u*(1-d))/d);if(Rx(m)&&Rx(p)&&Rx(g))return new cn({r:m,g:p,b:g,a:Math.round(d*100)/100}).toRgbString()}return new cn({r:n,g:r,b:o,a:1}).toRgbString()}function CB(e){const{override:t,...n}=e,r={...t};Object.keys(of).forEach(g=>{delete r[g];});const o={...n,...r},i=480,a=576,l=768,u=992,d=1200,m=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:gh(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:gh(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:gh(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:gh(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:a-1,screenSM:a,screenSMMin:a,screenSMMax:l-1,screenMD:l,screenMDMin:l,screenMDMax:u-1,screenLG:u,screenLGMin:u,screenLGMax:d-1,screenXL:d,screenXLMin:d,screenXLMax:m-1,screenXXL:m,screenXXLMin:m,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:`
0 1px 2px -2px ${new cn("rgba(0, 0, 0, 0.16)").toRgbString()},
0 3px 6px 0 ${new cn("rgba(0, 0, 0, 0.12)").toRgbString()},
0 5px 12px 4px ${new cn("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 xB={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},Bee={motionBase:true,motionUnit:true},kee={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},wB=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:o,...i}=t;let a={...r,override:o};return a=CB(a),i&&Object.entries(i).forEach(([l,u])=>{const{theme:d,...m}=u;let p=m;d&&(p=wB({...a,...m},{override:m},d)),a[l]=p;}),a};function Fr(){const{token:e,hashed:t,theme:n,override:r,cssVar:o,zeroRuntime:i}=G.useContext(jM),a={prefix:o?.prefix??"ant",key:o?.key??"css-var-root"},l=`${Ree}-${t||""}`,u=n||VM,[d,m,p]=zJ(u,[of,e],{salt:l,override:r,getComputedToken:wB,cssVar:{...a,unitless:xB,ignore:Bee,preserve:kee}});return [u,p,t?m:"",d,a,!!i]}const qa={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},un=(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}),Su=()=>({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"}}),P0=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),Fee=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"}}}),Hee=(e,t,n,r)=>{const o=`[class^="${t}"], [class*=" ${t}"]`,i=n?`.${n}`:o,a={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let l={};return r!==false&&(l={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[i]:{...l,...a,[o]:a}}},ba=(e,t)=>({outline:`${oe(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:"outline-offset 0s, outline 0s"}),$i=(e,t)=>({"&:focus-visible":ba(e,t)}),$B=e=>({[`.${e}`]:{...Su(),[`.${e} .${e}-icon`]:{display:"block"}}}),Vee=e=>({color:e.colorLink,textDecoration:e.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none",...$i(e),"&:hover":{color:e.colorLinkHover,textDecoration:e.linkHoverDecoration},"&:focus":{color:e.colorLinkHover,textDecoration:e.linkFocusDecoration},"&:active":{color:e.colorLinkActive,textDecoration:e.linkHoverDecoration}}),{genStyleHooks:qt,genComponentStyleHook:jee,genSubStyleComponent:Tf}=Eee({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=f.useContext(Ct);return {rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{const[e,t,n,r,o,i]=Fr();return {theme:e,realToken:t,hashId:n,token:r,cssVar:o,zeroRuntime:i}},useCSP:()=>{const{csp:e}=f.useContext(Ct);return e??{}},getResetStyles:(e,t)=>{const n=Fee(e);return [n,{"&":n},$B(t?.prefix.iconPrefixCls??Vy)]},getCommonStyle:Hee,getCompUnitless:()=>xB}),ar=(e,t)=>{const n=`--${e.replace(/\./g,"")}-${t}-`;return [i=>`${n}${i}`,(i,a)=>a?`var(${n}${i}, ${a})`:`var(${n}${i})`]};function Ky(e,t){return _l.reduce((n,r)=>{const o=e[`${r}1`],i=e[`${r}3`],a=e[`${r}6`],l=e[`${r}7`];return {...n,...t(r,{lightColor:o,lightBorderColor:i,darkColor:a,textColor:l})}},{})}const Uee=(e,t)=>(Fr(),u2({hashId:"",path:["ant-design-icons",e],nonce:()=>t?.nonce,layer:{name:"antd"}},()=>$B(e)));var qee={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"};const UM=f.createContext({});function EB(e){return e?.getRootNode?.()}function Wee(e){return EB(e)instanceof ShadowRoot}function I0(e){return Wee(e)?EB(e):null}function Gee(e){return e.replace(/-(.)/g,(t,n)=>n.toUpperCase())}function Kee(e,t){wr(e,`[@ant-design/icons] ${t}`);}function iI(e){return typeof e=="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(typeof e.icon=="object"||typeof e.icon=="function")}function aI(e={}){return Object.keys(e).reduce((t,n)=>{const r=e[n];return n==="class"?(t.className=r,delete t.class):(delete t[n],t[Gee(n)]=r),t},{})}function $2(e,t,n){return n?G.createElement(e.tag,{key:t,...aI(e.attrs),...n},(e.children||[]).map((r,o)=>$2(r,`${t}-${e.tag}-${o}`))):G.createElement(e.tag,{key:t,...aI(e.attrs)},(e.children||[]).map((r,o)=>$2(r,`${t}-${e.tag}-${o}`)))}function MB(e){return Wp(e)[0]}function RB(e){return e?Array.isArray(e)?e:[e]:[]}const Yee=`
.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);
}
}
`,Xee=e=>{const{csp:t,prefixCls:n,layer:r}=f.useContext(UM);let o=Yee;n&&(o=o.replace(/anticon/g,n)),r&&(o=`@layer ${r} {
${o}
}`),f.useEffect(()=>{const i=e.current,a=I0(i);Pl(o,"@ant-design-icons",{prepend:!r,csp:t,attachTo:a});},[]);},Ah={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:false};function Qee({primaryColor:e,secondaryColor:t}){Ah.primaryColor=e,Ah.secondaryColor=t||MB(e),Ah.calculated=!!t;}function Zee(){return {...Ah}}const Af=e=>{const{icon:t,className:n,onClick:r,style:o,primaryColor:i,secondaryColor:a,...l}=e,u=f.useRef(null);let d=Ah;if(i&&(d={primaryColor:i,secondaryColor:a||MB(i)}),Xee(u),Kee(iI(t),`icon should be icon definiton, but got ${t}`),!iI(t))return null;let m=t;return m&&typeof m.icon=="function"&&(m={...m,icon:m.icon(d.primaryColor,d.secondaryColor)}),$2(m.icon,`svg-${m.name}`,{className:n,onClick:r,style:o,"data-icon":m.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...l,ref:u})};Af.displayName="IconReact";Af.getTwoToneColors=Zee;Af.setTwoToneColors=Qee;function TB(e){const[t,n]=RB(e);return Af.setTwoToneColors({primaryColor:t,secondaryColor:n})}function Jee(){const e=Af.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}function E2(){return E2=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},E2.apply(this,arguments)}TB(N0.primary);const Kn=f.forwardRef((e,t)=>{const{className:n,icon:r,spin:o,rotate:i,tabIndex:a,onClick:l,twoToneColor:u,...d}=e,{prefixCls:m="anticon",rootClassName:p}=f.useContext(UM),g=X(p,m,{[`${m}-${r.name}`]:!!r.name,[`${m}-spin`]:!!o||r.name==="loading"},n);let b=a;b===void 0&&l&&(b=-1);const y=i?{msTransform:`rotate(${i}deg)`,transform:`rotate(${i}deg)`}:void 0,[S,C]=RB(u);return f.createElement("span",E2({role:"img","aria-label":r.name},d,{ref:t,tabIndex:b,onClick:l,className:g}),f.createElement(Af,{icon:r,primaryColor:S,secondaryColor:C,style:y}))});Kn.getTwoToneColor=Jee;Kn.setTwoToneColor=TB;function M2(){return M2=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},M2.apply(this,arguments)}const ete=(e,t)=>f.createElement(Kn,M2({},e,{ref:t,icon:qee})),qM=f.forwardRef(ete);var tte={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 R2(){return R2=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},R2.apply(this,arguments)}const nte=(e,t)=>f.createElement(Kn,R2({},e,{ref:t,icon:tte})),Gp=f.forwardRef(nte);var rte={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"};function T2(){return T2=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},T2.apply(this,arguments)}const ote=(e,t)=>f.createElement(Kn,T2({},e,{ref:t,icon:rte})),Ds=f.forwardRef(ote);var ite={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 A2(){return A2=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},A2.apply(this,arguments)}const ate=(e,t)=>f.createElement(Kn,A2({},e,{ref:t,icon:ite})),Kp=f.forwardRef(ate);var ste={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 N2(){return N2=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},N2.apply(this,arguments)}const lte=(e,t)=>f.createElement(Kn,N2({},e,{ref:t,icon:ste})),WM=f.forwardRef(lte),AB=f.createContext({});function cte({children:e,...t}){return f.createElement(AB.Provider,{value:t},e)}function ute(e){const[,t]=f.useReducer(i=>i+1,0),n=f.useRef(e),r=Et(()=>n.current),o=Et(i=>{n.current=typeof i=="function"?i(n.current):i,t();});return [r,o]}const vs="none",eb="appear",tb="enter",nb="leave",sI="none",la="prepare",Pd="start",Id="active",KM="end",NB="prepared";function lI(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 dte(e,t){const n={animationend:lI("Animation","AnimationEnd"),transitionend:lI("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}const fte=dte(wi(),typeof window<"u"?window:{});let PB={};wi()&&({style:PB}=document.createElement("div"));const rb={};function IB(e){if(rb[e])return rb[e];const t=fte[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 PB)return rb[e]=t[i],rb[e]}}return ""}const OB=IB("animationend"),DB=IB("transitionend"),mte=!!(OB&&DB),cI=OB||"animationend",uI=DB||"transitionend";function dI(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 hte=(e=>{const t=f.useRef();function n(o){o&&(o.removeEventListener(uI,e),o.removeEventListener(cI,e));}function r(o){t.current&&t.current!==o&&n(t.current),o&&o!==t.current&&(o.addEventListener(uI,e),o.addEventListener(cI,e),t.current=o);}return f.useEffect(()=>()=>{n(t.current),t.current=null;},[]),[r,n]}),_B=wi()?f.useLayoutEffect:f.useEffect,pte=(()=>{const e=f.useRef(null);function t(){Lt.cancel(e.current);}function n(r,o=2){t();const i=Lt(()=>{o<=1?r({isCanceled:()=>i!==e.current}):n(r,o-1);});e.current=i;}return f.useEffect(()=>()=>{t();},[]),[n,t]}),gte=[la,Pd,Id,KM],vte=[la,NB],LB=false,bte=true;function zB(e){return e===Id||e===KM}const yte=((e,t,n)=>{const[r,o]=R0(sI),[i,a]=pte();function l(){o(la,true);}const u=t?vte:gte;return _B(()=>{if(r!==sI&&r!==KM){const d=u.indexOf(r),m=u[d+1],p=n(r);p===LB?o(m,true):m&&i(g=>{function b(){g.isCanceled()||o(m,true);}p===true?b():Promise.resolve(p).then(b);});}},[e,r]),f.useEffect(()=>()=>{a();},[]),[l,r]});function Ste(e,t,n,{motionEnter:r=true,motionAppear:o=true,motionLeave:i=true,motionDeadline:a,motionLeaveImmediately:l,onAppearPrepare:u,onEnterPrepare:d,onLeavePrepare:m,onAppearStart:p,onEnterStart:g,onLeaveStart:b,onAppearActive:y,onEnterActive:S,onLeaveActive:C,onAppearEnd:w,onEnterEnd:$,onLeaveEnd:M,onVisibleChanged:T}){const[R,I]=R0(),[N,P]=ute(vs),[O,_]=R0(null),L=N(),j=f.useRef(false),U=f.useRef(null);function q(){return n()}const V=f.useRef(false);function B(){P(vs),_(null,true);}const F=Et(ne=>{const se=N();if(se===vs)return;const ae=q();if(ne&&!ne.deadline&&ne.target!==ae)return;const re=V.current;let de;se===eb&&re?de=w?.(ae,ne):se===tb&&re?de=$?.(ae,ne):se===nb&&re&&(de=M?.(ae,ne)),re&&de!==false&&B();}),[W]=hte(F),K=ne=>{switch(ne){case eb:return {[la]:u,[Pd]:p,[Id]:y};case tb:return {[la]:d,[Pd]:g,[Id]:S};case nb:return {[la]:m,[Pd]:b,[Id]:C};default:return {}}},Q=f.useMemo(()=>K(L),[L]),[D,z]=yte(L,!e,ne=>{if(ne===la){const se=Q[la];return se?se(q()):LB}return z in Q&&_(Q[z]?.(q(),null)||null),z===Id&&L!==vs&&(W(q()),a>0&&(clearTimeout(U.current),U.current=setTimeout(()=>{F({deadline:true});},a))),z===NB&&B(),bte}),Y=zB(z);V.current=Y;const ee=f.useRef(null);_B(()=>{if(j.current&&ee.current===t)return;I(t);const ne=j.current;j.current=true;let se;!ne&&t&&o&&(se=eb),ne&&t&&r&&(se=tb),(ne&&!t&&i||!ne&&l&&!t&&i)&&(se=nb);const ae=K(se);se&&(e||ae[la])?(P(se),D()):P(vs),ee.current=t;},[t]),f.useEffect(()=>{(L===eb&&!o||L===tb&&!r||L===nb&&!i)&&P(vs);},[o,r,i]),f.useEffect(()=>()=>{j.current=false,clearTimeout(U.current);},[]);const J=f.useRef(false);f.useEffect(()=>{R&&(J.current=true),R!==void 0&&L===vs&&((J.current||R)&&T?.(R),J.current=true);},[R,L]);let te=O;return Q[la]&&z===Pd&&(te={transition:"none",...te}),[N,z,te,R??t]}function Cte(e){let t=e;typeof e=="object"&&({transitionSupport:t}=e);function n(o,i){return !!(o.motionName&&t&&i!==false)}const r=f.forwardRef((o,i)=>{const{visible:a=true,removeOnLeave:l=true,forceRender:u,children:d,motionName:m,leavedClassName:p,eventProps:g}=o,{motion:b}=f.useContext(AB),y=n(o,b),S=f.useRef();function C(){return nf(S.current)}const[w,$,M,T]=Ste(y,a,C,o),R=w(),I=f.useRef(T);T&&(I.current=true);const N=f.useMemo(()=>{const _={};return Object.defineProperties(_,{nativeElement:{enumerable:true,get:C},inMotion:{enumerable:true,get:()=>()=>w()!==vs},enableMotion:{enumerable:true,get:()=>()=>y}}),_},[]);f.useImperativeHandle(i,()=>N,[]);let P;const O={...g,visible:a};if(!d)P=null;else if(R===vs)T?P=d({...O},S):!l&&I.current&&p?P=d({...O,className:p},S):u||!l&&!p?P=d({...O,style:{display:"none"}},S):P=null;else {let _;$===la?_="prepare":zB($)?_="active":$===Pd&&(_="start");const L=dI(m,`${R}-${_}`);P=d({...O,className:X(dI(m,R),{[L]:L&&_,[m]:typeof m=="string"}),style:M},S);}return f.isValidElement(P)&&yu(P)&&(Xl(P)||(P=f.cloneElement(P,{ref:S}))),P});return r.displayName="CSSMotion",r}const So=Cte(mte),P2="add",I2="keep",O2="remove",Tx="removed";function xte(e){let t;return e&&typeof e=="object"&&"key"in e?t=e:t={key:e},{...t,key:String(t.key)}}function D2(e=[]){return e.map(xte)}function wte(e=[],t=[]){let n=[],r=0;const o=t.length,i=D2(e),a=D2(t);i.forEach(d=>{let m=false;for(let p=r;p<o;p+=1){const g=a[p];if(g.key===d.key){r<p&&(n=n.concat(a.slice(r,p).map(b=>({...b,status:P2}))),r=p),n.push({...g,status:I2}),r+=1,m=true;break}}m||n.push({...d,status:O2});}),r<o&&(n=n.concat(a.slice(r).map(d=>({...d,status:P2}))));const l={};return n.forEach(({key:d})=>{l[d]=(l[d]||0)+1;}),Object.keys(l).filter(d=>l[d]>1).forEach(d=>{n=n.filter(({key:m,status:p})=>m!==d||p!==O2),n.forEach(m=>{m.key===d&&(m.status=I2);});}),n}function _2(){return _2=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},_2.apply(this,arguments)}const $te=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Ete(e,t=So){class n extends f.Component{static defaultProps={component:"div"};state={keyEntities:[]};static getDerivedStateFromProps({keys:o},{keyEntities:i}){const a=D2(o);return {keyEntities:wte(i,a).filter(u=>{const d=i.find(({key:m})=>u.key===m);return !(d&&d.status===Tx&&u.status===O2)})}}removeKey=o=>{this.setState(i=>({keyEntities:i.keyEntities.map(l=>l.key!==o?l:{...l,status:Tx})}),()=>{const{keyEntities:i}=this.state;i.filter(({status:l})=>l!==Tx).length===0&&this.props.onAllRemoved&&this.props.onAllRemoved();});};render(){const{keyEntities:o}=this.state,{component:i,children:a,onVisibleChanged:l,onAllRemoved:u,...d}=this.props,m=i||f.Fragment,p={};return $te.forEach(g=>{p[g]=d[g],delete d[g];}),delete d.keys,f.createElement(m,d,o.map(({status:g,...b},y)=>{const S=g===P2||g===I2;return f.createElement(t,_2({},p,{key:b.key,visible:S,eventProps:b,onVisibleChanged:C=>{l?.(C,{key:b.key}),C||this.removeKey(b.key);}}),(C,w)=>a({...C,index:y},w))}))}}return n}const Mte=Ete(),Rte=`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`,Tte=`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`,Ate=`${Rte} ${Tte}`.split(/[\s\n]+/),Nte="aria-",Pte="data-";function fI(e,t){return e.indexOf(t)===0}function bo(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"||fI(o,Nte))||n.data&&fI(o,Pte)||n.attr&&Ate.includes(o))&&(r[o]=e[o]);}),r}const BB={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 Ite={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:true};function cp(e){"@babel/helpers - typeof";return cp=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},cp(e)}function mI(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 hI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mI(Object(n),true).forEach(function(r){Ote(e,r,n[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r));});}return e}function Ote(e,t,n){return t=Dte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true}):e[t]=n,e}function Dte(e){var t=_te(e,"string");return cp(t)=="symbol"?t:String(t)}function _te(e,t){if(cp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(cp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return (t==="string"?String:Number)(e)}var Lte=hI(hI({},Ite),{},{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 kB={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},pI={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"],...Lte},timePickerLocale:{...kB}},li="${label} is not a valid ${type}",ya={locale:"en",Pagination:BB,DatePicker:pI,TimePicker:kB,Calendar:pI,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:li,method:li,array:li,object:li,number:li,date:li,boolean:li,integer:li,float:li,regexp:li,email:li,url:li,hex:li},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 Vb={...ya.Modal},jb=[];const gI=()=>jb.reduce((e,t)=>({...e,...t}),ya.Modal);function zte(e){if(e){const t={...e};return jb.push(t),Vb=gI(),()=>{jb=jb.filter(n=>n!==t),Vb=gI();}}Vb={...ya.Modal};}function FB(){return Vb}const YM=f.createContext(void 0),Oo=(e,t)=>{const n=f.useContext(YM),r=f.useMemo(()=>{const i=t||ya[e],a=n?.[e]??{};return {...typeof i=="function"?i():i,...a||{}}},[e,t,n]),o=f.useMemo(()=>{const i=n?.locale;return n?.exist&&!i?ya.locale:i},[n]);return [r,o]},Bte="internalMark",kte=e=>{const{locale:t={},children:n,_ANT_MARK__:r}=e;f.useEffect(()=>zte(t?.Modal),[t]);const o=f.useMemo(()=>({...t,exist:true}),[t]);return f.createElement(YM.Provider,{value:o},n)};function vI(...e){const t={};return e.forEach(n=>{n&&Object.keys(n).forEach(r=>{n[r]!==void 0&&(t[r]=n[r]);});}),t}const Qr=e=>e!=null,Ll=e=>{if(!e)return;const{closable:t,closeIcon:n}=e;return {closable:t,closeIcon:n}},HB={},bI=(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},Fte=(e,t,n)=>e===false?false:e?vI(n,t,e):t===false?false:t?vI(n,t):n.closable?n:false,Hte=(e,t,n)=>{const{closeIconRender:r}=t,{closeIcon:o,...i}=e;let a=o;const l=bo(i,true);return Qr(a)&&(r&&(a=r(a)),a=G.isValidElement(a)?G.cloneElement(a,{"aria-label":n,...a.props,...l}):G.createElement("span",{"aria-label":n,...l},a)),[a,l]},VB=(e,t,n=HB,r="Close")=>{const o=bI(e?.closable,e?.closeIcon),i=bI(t?.closable,t?.closeIcon),a={closeIcon:G.createElement(Ds,null),...n},l=Fte(o,i,a),u=typeof l!="boolean"?!!l?.disabled:false;if(l===false)return [false,null,u,{}];const[d,m]=Hte(l,a,r);return [true,d,u,m]},XM=(e,t,n=HB)=>{const[r]=Oo("global",ya.global);return G.useMemo(()=>VB(e,t,{closeIcon:G.createElement(Ds,null),...n},r.close),[e,t,n,r.close])},jB=()=>G.useReducer(e=>e+1,0),yI=e=>e&&typeof e=="object"?e:typeof e=="boolean"?{enabled:e,blur:e}:{},Vte=(e,t,n)=>f.useMemo(()=>{const r=yI(e),i={...yI(t),...r},a=i.blur!==false?`${n}-mask-blur`:void 0;return [i.enabled!==false,{mask:a}]},[e,t,n]),Yy=(e,...t)=>{const n=e||{};return t.filter(Boolean).reduce((r,o)=>(Object.keys(o||{}).forEach(i=>{const a=n[i],l=o[i];if(a&&typeof a=="object")if(l&&typeof l=="object")r[i]=Yy(a,r[i],l);else {const{_default:u}=a;u&&(r[i]=r[i]||{},r[i][u]=X(r[i][u],l));}else r[i]=X(r[i],l);}),r),{})},jte=(e,...t)=>f.useMemo(()=>Yy.apply(void 0,[e].concat(t)),[e].concat(t)),QM=(...e)=>e.filter(Boolean).reduce((t,n={})=>(Object.keys(n).forEach(r=>{t[r]={...t[r],...n[r]};}),t),{}),Ute=(...e)=>f.useMemo(()=>QM.apply(void 0,e),[].concat(e)),L2=(e,t)=>{const n={...e};return Object.keys(t).forEach(r=>{if(r!=="_default"){const o=t[r],i=n[r]||{};n[r]=o?L2(i,o):i;}}),n},Rl=(e,t)=>typeof e=="function"?e(t):e,Xt=(e,t,n,r)=>{const o=e.map(u=>u?Rl(u,n):void 0),i=t.map(u=>u?Rl(u,n):void 0),a=jte.apply(void 0,[r].concat(Yt(o))),l=Ute.apply(void 0,Yt(i));return f.useMemo(()=>r?[L2(a,r),L2(l,r)]:[a,l],[a,l,r])},SI=e=>{const[t,n]=f.useState(null);return [f.useCallback((o,i,a)=>{const l=t??o,u=Math.min(l||0,o),d=Math.max(l||0,o),m=i.slice(u,d+1).map(e),p=m.some(b=>!a.has(b)),g=[];return m.forEach(b=>{p?(a.has(b)||g.push(b),a.add(b)):(a.delete(b),g.push(b));}),n(p?d:null),g},[t]),n]},CI=e=>e==="horizontal"||e==="vertical",Cu=(e,t,n)=>f.useMemo(()=>{const r=CI(e);let o;return r?o=e:typeof t=="boolean"?o=t?"vertical":"horizontal":o=CI(n)?n:"horizontal",[o,o==="vertical"]},[n,e,t]),qte=()=>{const[e,t]=f.useState([]),n=f.useCallback(r=>(t(o=>[].concat(Yt(o),[r])),()=>{t(o=>o.filter(i=>i!==r));}),[]);return [e,n]},Xy=G.createContext(void 0),bl=100,Wte=10,ZM=bl*Wte,UB={Modal:bl,Drawer:bl,Popover:bl,Popconfirm:bl,Tooltip:bl,Tour:bl,FloatButton:bl},Gte={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1},Kte=e=>e in UB,xu=(e,t)=>{const[,n]=Fr(),r=G.useContext(Xy),o=Kte(e);let i;if(t!==void 0)i=[t,t];else {let a=r??0;o?a+=(r?0:n.zIndexPopupBase)+UB[e]:a+=Gte[e],i=[r===void 0?t:a,a];}return i};function z2(e){return Qr(e)&&e===e.window}const qB=e=>{if(typeof window>"u")return 0;let t=0;return z2(e)?t=e.pageYOffset:e instanceof Document?t=e.documentElement.scrollTop:(e instanceof HTMLElement||e)&&(t=e.scrollTop),e&&!z2(e)&&typeof t!="number"&&(t=(e.ownerDocument??e).documentElement?.scrollTop),t};function Yte(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 Xte(e,t={}){const{getContainer:n=()=>window,callback:r,duration:o=450}=t,i=n(),a=qB(i),l=Date.now();let u;const d=()=>{const p=Date.now()-l,g=Yte(p>o?o:p,a,e,o);z2(i)?i.scrollTo(window.pageXOffset,g):i instanceof Document||i.constructor.name==="HTMLDocument"?i.documentElement.scrollTop=g:i.scrollTop=g,p<o?u=Lt(d):typeof r=="function"&&r();};return u=Lt(d),()=>{Lt.cancel(u);}}const Yn=e=>`${e}-css-var`,Qte=f.createContext(void 0);var Ax={exports:{}},co={};var xI;function Zte(){if(xI)return co;xI=1;var e=Kl();function t(u){var d="https://react.dev/errors/"+u;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)d+="&args[]="+encodeURIComponent(arguments[m]);}return "Minified React error #"+u+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function i(u,d,m){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return {$$typeof:o,key:p==null?null:""+p,children:u,containerInfo:d,implementation:m}}var a=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(u,d){if(u==="font")return "";if(typeof d=="string")return d==="use-credentials"?d:""}return co.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,co.createPortal=function(u,d){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(t(299));return i(u,d,null,m)},co.flushSync=function(u){var d=a.T,m=r.p;try{if(a.T=null,r.p=2,u)return u()}finally{a.T=d,r.p=m,r.d.f();}},co.preconnect=function(u,d){typeof u=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,r.d.C(u,d));},co.prefetchDNS=function(u){typeof u=="string"&&r.d.D(u);},co.preinit=function(u,d){if(typeof u=="string"&&d&&typeof d.as=="string"){var m=d.as,p=l(m,d.crossOrigin),g=typeof d.integrity=="string"?d.integrity:void 0,b=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;m==="style"?r.d.S(u,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:p,integrity:g,fetchPriority:b}):m==="script"&&r.d.X(u,{crossOrigin:p,integrity:g,fetchPriority:b,nonce:typeof d.nonce=="string"?d.nonce:void 0});}},co.preinitModule=function(u,d){if(typeof u=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var m=l(d.as,d.crossOrigin);r.d.M(u,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0});}}else d==null&&r.d.M(u);},co.preload=function(u,d){if(typeof u=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var m=d.as,p=l(m,d.crossOrigin);r.d.L(u,m,{crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0});}},co.preloadModule=function(u,d){if(typeof u=="string")if(d){var m=l(d.as,d.crossOrigin);r.d.m(u,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0});}else r.d.m(u);},co.requestFormReset=function(u){r.d.r(u);},co.unstable_batchedUpdates=function(u,d){return u(d)},co.useFormState=function(u,d,m){return a.H.useFormState(u,d,m)},co.useFormStatus=function(){return a.H.useHostTransitionStatus()},co.version="19.2.4",co}var wI;function WB(){if(wI)return Ax.exports;wI=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e);}catch(t){console.error(t);}}return e(),Ax.exports=Zte(),Ax.exports}var Eo=WB();const GB=f.createContext(null);let Jte=false;function ene(e){return Jte}const $I=[];function tne(e,t){const[n]=f.useState(()=>wi()?document.createElement("div"):null),r=f.useRef(false),o=f.useContext(GB),[i,a]=f.useState($I),l=o||(r.current?void 0:m=>{a(p=>[m,...p]);});function u(){n.parentElement||document.body.appendChild(n),r.current=true;}function d(){n.parentElement?.removeChild(n),r.current=false;}return An(()=>(e?o?o(u):u():d(),d),[e]),An(()=>{i.length&&(i.forEach(m=>m()),a($I));},[i]),[n,l]}function nne(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 u=getComputedStyle(e);r.scrollbarColor=u.scrollbarColor,r.scrollbarWidth=u.scrollbarWidth;const d=getComputedStyle(e,"::-webkit-scrollbar"),m=parseInt(d.width,10),p=parseInt(d.height,10);try{const g=m?`width: ${d.width};`:"",b=p?`height: ${d.height};`:"";Pl(`
#${t}::-webkit-scrollbar {
${g}
${b}
}`,t);}catch(g){console.error(g),o=m,i=p;}}document.body.appendChild(n);const a=e&&o&&!isNaN(o)?o:n.offsetWidth-n.clientWidth,l=e&&i&&!isNaN(i)?i:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),rp(t),{width:a,height:l}}function rne(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:nne(e)}function one(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}const ine=`rc-util-locker-${Date.now()}`;let EI=0;function ane(e){const t=!!e,[n]=f.useState(()=>(EI+=1,`${ine}_${EI}`));An(()=>{if(t){const r=rne(document.body).width,o=one();Pl(`
html body {
overflow-y: hidden;
${o?`width: calc(100% - ${r}px);`:""}
}`,n);}else rp(n);return ()=>{rp(n);}},[t,n]);}function sne(){return {...W$}.useId}let MI=0;const RI=sne(),Ql=RI?(function(t){const n=RI();return t||n}):(function(t){const[n,r]=f.useState("ssr-id");return f.useEffect(()=>{const o=MI;MI+=1,r(`rc_unique_${o}`);},[]),t||n});let kc=[];const lne=200;let KB=0;const YB=e=>{if(e.key==="Escape"&&!e.isComposing){if(Date.now()-KB<lne)return;const n=kc.length;for(let r=n-1;r>=0;r-=1)kc[r].onEsc({top:r===n-1,event:e});}},XB=()=>{KB=Date.now();};function cne(){window.addEventListener("keydown",YB),window.addEventListener("compositionend",XB);}function une(){kc.length===0&&(window.removeEventListener("keydown",YB),window.removeEventListener("compositionend",XB));}function dne(e,t){const n=Ql(),r=Et(t),o=()=>{kc.find(a=>a.id===n)||kc.push({id:n,onEsc:r});},i=()=>{kc=kc.filter(a=>a.id!==n);};f.useMemo(()=>{e?o():e||i();},[e]),f.useEffect(()=>{if(e)return o(),cne(),()=>{i(),une();}},[e]);}const TI=e=>e===false?false:!wi()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e,Qy=f.forwardRef((e,t)=>{const{open:n,autoLock:r,getContainer:o,debug:i,autoDestroy:a=true,children:l,onEsc:u}=e,[d,m]=f.useState(n),p=d||n;f.useEffect(()=>{(a||n)&&m(n);},[n,a]);const[g,b]=f.useState(()=>TI(o));f.useEffect(()=>{const R=TI(o);b(()=>R??null);});const[y,S]=tne(p&&!g),C=g??y;ane(r&&n&&wi()&&(C===y||C===document.body)),dne(n,u);let w=null;l&&yu(l)&&t&&(w=Xl(l));const $=Yl(w,t);if(!p||!wi()||g===void 0)return null;const M=C===false||ene();let T=l;return t&&(T=f.cloneElement(l,{ref:$})),f.createElement(GB.Provider,{value:S},M?T:Eo.createPortal(T,C))});function fne(e){const{prefixCls:t,align:n,arrow:r,arrowPos:o}=e,{className:i,content:a,style:l}=r||{},{x:u=0,y:d=0}=o,m=f.useRef(null);if(!n||!n.points)return null;const p={position:"absolute"};if(n.autoArrow!==false){const g=n.points[0],b=n.points[1],y=g[0],S=g[1],C=b[0],w=b[1];y===C||!["t","b"].includes(y)?p.top=d:y==="t"?p.top=0:p.bottom=0,S===w||!["l","r"].includes(S)?p.left=u:S==="l"?p.left=0:p.right=0;}return f.createElement("div",{ref:m,className:X(`${t}-arrow`,i),style:{...p,...l}},a)}function B2(){return B2=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},B2.apply(this,arguments)}function mne(e){const{prefixCls:t,open:n,zIndex:r,mask:o,motion:i,mobile:a}=e;return o?f.createElement(So,B2({},i,{motionAppear:true,visible:n,removeOnLeave:true}),({className:l})=>f.createElement("div",{style:{zIndex:r},className:X(`${t}-mask`,a&&`${t}-mobile-mask`,l)})):null}const hne=f.memo(({children:e})=>e,(e,t)=>t.cache);function QB(e,t,n,r,o,i,a,l){const u="auto",d=e?{}:{left:"-1000vw",top:"-1000vh",right:u,bottom:u};if(!e&&(t||!n)){const{points:m}=r,p=r.dynamicInset||r._experimental?.dynamicInset,g=p&&m[0][1]==="r",b=p&&m[0][0]==="b";g?(d.right=o,d.left=u):(d.left=a,d.right=u),b?(d.bottom=i,d.top=u):(d.top=l,d.bottom=u);}return d}function k2(){return k2=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},k2.apply(this,arguments)}const ZB=f.forwardRef((e,t)=>{const{onEsc:n,popup:r,className:o,prefixCls:i,style:a,target:l,onVisibleChanged:u,open:d,keepDom:m,fresh:p,onClick:g,mask:b,arrow:y,arrowPos:S,align:C,motion:w,maskMotion:$,mobile:M,forceRender:T,getPopupContainer:R,autoDestroy:I,portal:N,children:P,zIndex:O,onMouseEnter:_,onMouseLeave:L,onPointerEnter:j,onPointerDownCapture:U,ready:q,offsetX:V,offsetY:B,offsetR:F,offsetB:W,onAlign:K,onPrepare:Q,onResize:D,stretch:z,targetWidth:Y,targetHeight:ee}=e,J=typeof r=="function"?r():r,te=d||m,ne=!!M,[se,ae,re]=f.useMemo(()=>M?[M.mask,M.maskMotion,M.motion]:[b,$,w],[M,b,$,w]),de=R?.length>0,[ge,ie]=f.useState(!R||!de);An(()=>{!ge&&de&&l&&ie(true);},[ge,de,l]);const Ee=Et((Se,ye)=>{D?.(Se,ye),K();}),le=QB(ne,q,d,C,F,W,V,B);if(!ge)return null;const ue={};return z&&(z.includes("height")&&ee?ue.height=ee:z.includes("minHeight")&&ee&&(ue.minHeight=ee),z.includes("width")&&Y?ue.width=Y:z.includes("minWidth")&&Y&&(ue.minWidth=Y)),d||(ue.pointerEvents="none"),f.createElement(N,{open:T||te,getContainer:R&&(()=>R(l)),autoDestroy:I,onEsc:n},f.createElement(mne,{prefixCls:i,open:d,zIndex:O,mask:se,motion:ae,mobile:ne}),f.createElement(ha,{onResize:Ee,disabled:!d},Se=>f.createElement(So,k2({motionAppear:true,motionEnter:true,motionLeave:true,removeOnLeave:false,forceRender:T,leavedClassName:`${i}-hidden`},re,{onAppearPrepare:Q,onEnterPrepare:Q,visible:d,onVisibleChanged:ye=>{w?.onVisibleChanged?.(ye),u(ye);}}),({className:ye,style:Be},je)=>{const Ne=X(i,ye,o,{[`${i}-mobile`]:ne});return f.createElement("div",{ref:Nr(Se,t,je),className:Ne,style:{"--arrow-x":`${S.x||0}px`,"--arrow-y":`${S.y||0}px`,...le,...ue,...Be,boxSizing:"border-box",zIndex:O,...a},onMouseEnter:_,onMouseLeave:L,onPointerEnter:j,onClick:g,onPointerDownCapture:U},y&&f.createElement(fne,{prefixCls:i,arrow:y,arrowPos:S,align:C}),f.createElement(hne,{cache:!d&&!p},J))})),P)}),O0=f.createContext(null),JB=f.createContext(null);function AI(e){return e?Array.isArray(e)?e:[e]:[]}function pne(e,t,n){return f.useMemo(()=>{const r=AI(t??e),o=AI(n??e),i=new Set(r),a=new Set(o);return i.has("hover")&&!i.has("click")&&i.add("touch"),a.has("hover")&&!a.has("click")&&a.add("touch"),[i,a]},[e,t,n])}const JM=(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 gne(e=[],t=[],n){const r=(o,i)=>o[i]||"";return n?r(e,0)===r(t,0):r(e,0)===r(t,0)&&r(e,1)===r(t,1)}function ek(e,t,n,r){const{points:o}=n,i=Object.keys(e);for(let a=0;a<i.length;a+=1){const l=i[a];if(gne(e[l]?.points,o,r))return `${t}-placement-${l}`}return ""}function Yp(e){return e.ownerDocument.defaultView}function F2(e){const t=[];let n=e?.parentElement;const r=["hidden","scroll","clip","auto"];for(;n;){const{overflowX:o,overflowY:i,overflow:a}=Yp(n).getComputedStyle(n);[o,i,a].some(l=>r.includes(l))&&t.push(n),n=n.parentElement;}return t}function up(e,t=1){return Number.isNaN(e)?t:e}function Wm(e){return up(parseFloat(e),0)}function NI(e,t){const n={...e};return (t||[]).forEach(r=>{if(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)return;const{overflow:o,overflowClipMargin:i,borderTopWidth:a,borderBottomWidth:l,borderLeftWidth:u,borderRightWidth:d}=Yp(r).getComputedStyle(r),m=r.getBoundingClientRect(),{offsetHeight:p,clientHeight:g,offsetWidth:b,clientWidth:y}=r,S=Wm(a),C=Wm(l),w=Wm(u),$=Wm(d),M=up(Math.round(m.width/b*1e3)/1e3),T=up(Math.round(m.height/p*1e3)/1e3),R=(b-y-w-$)*M,I=(p-g-S-C)*T,N=S*T,P=C*T,O=w*M,_=$*M;let L=0,j=0;if(o==="clip"){const F=Wm(i);L=F*M,j=F*T;}const U=m.x+O-L,q=m.y+N-j,V=U+m.width+2*L-O-_-R,B=q+m.height+2*j-N-P-I;n.left=Math.max(n.left,U),n.top=Math.max(n.top,q),n.right=Math.min(n.right,V),n.bottom=Math.min(n.bottom,B);}),n}function PI(e,t=0){const n=`${t}`,r=n.match(/^(.*)\%$/);return r?e*(parseFloat(r[1])/100):parseFloat(n)}function II(e,t){const[n,r]=t||[];return [PI(e.width,n),PI(e.height,r)]}function OI(e=""){return [e[0],e[1]]}function pd(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 pl(e,t){const n={t:"b",b:"t",l:"r",r:"l"},r=[...e];return r[t]=n[e[t]]||"c",r}function DI(e){return e.join("")}function tk(e,t,n,r,o,i,a,l){const[u,d]=f.useState({ready:false,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:o[r]||{}}),m=f.useRef(0),p=f.useMemo(()=>!t||l?[]:F2(t),[t]),g=f.useRef({});e||(g.current={});const y=Et(()=>{if(t&&n&&e&&!l){let ke=function(kt,Pr,Ir=Ee){const Ra=U.x+kt,Mi=U.y+Pr,Lo=Ra+Y,Vr=Mi+z,sc=Math.max(Ra,Ir.left),_g=Math.max(Mi,Ir.top),lc=Math.min(Lo,Ir.right),Au=Math.min(Vr,Ir.bottom);return Math.max(0,(lc-sc)*(Au-_g))},we=function(){Te=U.y+_e,Ce=Te+z,he=U.x+Ke,Ie=he+Y;};const w=t,$=w.ownerDocument,M=Yp(w),{position:T}=M.getComputedStyle(w),R=w.style.left,I=w.style.top,N=w.style.right,P=w.style.bottom,O=w.style.overflow,_={...o[r],...i},L=$.createElement("div");w.parentElement?.appendChild(L),L.style.left=`${w.offsetLeft}px`,L.style.top=`${w.offsetTop}px`,L.style.position=T,L.style.height=`${w.offsetHeight}px`,L.style.width=`${w.offsetWidth}px`,w.style.left="0",w.style.top="0",w.style.right="auto",w.style.bottom="auto",w.style.overflow="hidden";let j;if(Array.isArray(n))j={x:n[0],y:n[1],width:0,height:0};else {const kt=n.getBoundingClientRect();kt.x=kt.x??kt.left,kt.y=kt.y??kt.top,j={x:kt.x,y:kt.y,width:kt.width,height:kt.height};}const U=w.getBoundingClientRect(),{height:q,width:V}=M.getComputedStyle(w);U.x=U.x??U.left,U.y=U.y??U.top;const{clientWidth:B,clientHeight:F,scrollWidth:W,scrollHeight:K,scrollTop:Q,scrollLeft:D}=$.documentElement,z=U.height,Y=U.width,ee=j.height,J=j.width,te={left:0,top:0,right:B,bottom:F},ne={left:-D,top:-Q,right:W-D,bottom:K-Q};let{htmlRegion:se}=_;const ae="visible",re="visibleFirst";se!=="scroll"&&se!==re&&(se=ae);const de=se===re,ge=NI(ne,p),ie=NI(te,p),Ee=se===ae?ie:ge,le=de?ie:Ee;w.style.left="auto",w.style.top="auto",w.style.right="0",w.style.bottom="0";const ue=w.getBoundingClientRect();w.style.left=R,w.style.top=I,w.style.right=N,w.style.bottom=P,w.style.overflow=O,w.parentElement?.removeChild(L);const Se=up(Math.round(Y/parseFloat(V)*1e3)/1e3),ye=up(Math.round(z/parseFloat(q)*1e3)/1e3);if(Se===0||ye===0||tf(n)&&!JM(n))return;const{offset:Be,targetOffset:je}=_;let[Ne,fe]=II(U,Be);const[be,Re]=II(j,je);j.x-=be,j.y-=Re;const[qe,Qe]=_.points||[],We=OI(Qe),tt=OI(qe),rt=pd(j,We),Ze=pd(U,tt),Oe={..._};let Ye=[tt,We],Ke=rt.x-Ze.x+Ne,_e=rt.y-Ze.y+fe;const lt=ke(Ke,_e),At=ke(Ke,_e,ie),dt=pd(j,["t","l"]),Dt=pd(U,["t","l"]),Tt=pd(j,["b","r"]),xt=pd(U,["b","r"]),gt=_.overflow||{},{adjustX:ft,adjustY:st,shiftX:He,shiftY:Ge}=gt,ve=kt=>typeof kt=="boolean"?kt:kt>=0;let Te,Ce,he,Ie;we();const Le=ve(st),Xe=tt[0]===We[0];if(Le&&tt[0]==="t"&&(Ce>le.bottom||g.current.bt)){let kt=_e;Xe?kt-=z-ee:kt=dt.y-xt.y-fe;const Pr=ke(Ke,kt),Ir=ke(Ke,kt,ie);Pr>lt||Pr===lt&&(!de||Ir>=At)?(g.current.bt=true,_e=kt,fe=-fe,Ye=[pl(Ye[0],0),pl(Ye[1],0)]):g.current.bt=false;}if(Le&&tt[0]==="b"&&(Te<le.top||g.current.tb)){let kt=_e;Xe?kt+=z-ee:kt=Tt.y-Dt.y-fe;const Pr=ke(Ke,kt),Ir=ke(Ke,kt,ie);Pr>lt||Pr===lt&&(!de||Ir>=At)?(g.current.tb=true,_e=kt,fe=-fe,Ye=[pl(Ye[0],0),pl(Ye[1],0)]):g.current.tb=false;}const it=ve(ft),mt=tt[1]===We[1];if(it&&tt[1]==="l"&&(Ie>le.right||g.current.rl)){let kt=Ke;mt?kt-=Y-J:kt=dt.x-xt.x-Ne;const Pr=ke(kt,_e),Ir=ke(kt,_e,ie);Pr>lt||Pr===lt&&(!de||Ir>=At)?(g.current.rl=true,Ke=kt,Ne=-Ne,Ye=[pl(Ye[0],1),pl(Ye[1],1)]):g.current.rl=false;}if(it&&tt[1]==="r"&&(he<le.left||g.current.lr)){let kt=Ke;mt?kt+=Y-J:kt=Tt.x-Dt.x-Ne;const Pr=ke(kt,_e),Ir=ke(kt,_e,ie);Pr>lt||Pr===lt&&(!de||Ir>=At)?(g.current.lr=true,Ke=kt,Ne=-Ne,Ye=[pl(Ye[0],1),pl(Ye[1],1)]):g.current.lr=false;}Oe.points=[DI(Ye[0]),DI(Ye[1])],we();const wt=He===true?0:He;typeof wt=="number"&&(he<ie.left&&(Ke-=he-ie.left-Ne,j.x+J<ie.left+wt&&(Ke+=j.x-ie.left+J-wt)),Ie>ie.right&&(Ke-=Ie-ie.right-Ne,j.x>ie.right-wt&&(Ke+=j.x-ie.right+wt)));const Mt=Ge===true?0:Ge;typeof Mt=="number"&&(Te<ie.top&&(_e-=Te-ie.top-fe,j.y+ee<ie.top+Mt&&(_e+=j.y-ie.top+ee-Mt)),Ce>ie.bottom&&(_e-=Ce-ie.bottom-fe,j.y>ie.bottom-Mt&&(_e+=j.y-ie.bottom+Mt)));const Bt=U.x+Ke,En=Bt+Y,Ht=U.y+_e,Pe=Ht+z,Ue=j.x,ct=Ue+J,Rt=j.y,_t=Rt+ee,en=Math.max(Bt,Ue),dn=Math.min(En,ct),lr=(en+dn)/2-Bt,lo=Math.max(Ht,Rt),In=Math.min(Pe,_t),Hr=(lo+In)/2-Ht;a?.(t,Oe);let xo=ue.right-U.x-(Ke+U.width),_o=ue.bottom-U.y-(_e+U.height);Se===1&&(Ke=Math.floor(Ke),xo=Math.floor(xo)),ye===1&&(_e=Math.floor(_e),_o=Math.floor(_o));const em={ready:true,offsetX:Ke/Se,offsetY:_e/ye,offsetR:xo/Se,offsetB:_o/ye,arrowX:lr/Se,arrowY:Hr/ye,scaleX:Se,scaleY:ye,align:Oe};d(em);}}),S=()=>{m.current+=1;const w=m.current;Promise.resolve().then(()=>{m.current===w&&y();});},C=()=>{d(w=>({...w,ready:false}));};return An(C,[r]),An(()=>{e||C();},[e]),[u.ready,u.offsetX,u.offsetY,u.offsetR,u.offsetB,u.arrowX,u.arrowY,u.scaleX,u.scaleY,u.align,S]}function nk(){const e=f.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.useEffect(()=>()=>{t();},[]),n}function vne(e,t,n,r,o){An(()=>{if(e&&t&&n){let p=function(){r(),o();};const i=t,a=n,l=F2(i),u=F2(a),d=Yp(a),m=new Set([d,...l,...u]);return m.forEach(g=>{g.addEventListener("scroll",p,{passive:true});}),d.addEventListener("resize",p,{passive:true}),r(),()=>{m.forEach(g=>{g.removeEventListener("scroll",p),d.removeEventListener("resize",p);});}}},[e,t,n]);}function bne(e,t,n,r,o,i,a,l){const u=f.useRef(e);u.current=e;const d=f.useRef(false);f.useEffect(()=>{if(t&&r&&(!o||i)){const p=()=>{d.current=false;},g=S=>{u.current&&!a(S.composedPath?.()?.[0]||S.target)&&!d.current&&l(false);},b=Yp(r);b.addEventListener("pointerdown",p,true),b.addEventListener("mousedown",g,true),b.addEventListener("contextmenu",g,true);const y=I0(n);return y&&(y.addEventListener("mousedown",g,true),y.addEventListener("contextmenu",g,true)),()=>{b.removeEventListener("pointerdown",p,true),b.removeEventListener("mousedown",g,true),b.removeEventListener("contextmenu",g,true),y&&(y.removeEventListener("mousedown",g,true),y.removeEventListener("contextmenu",g,true));}}},[t,n,r,o,i]);function m(){d.current=true;}return m}function yne(){const[e,t]=G.useState(null),[n,r]=G.useState(false),[o,i]=G.useState(false),a=G.useRef(null),l=Et(d=>{d===false?(a.current=null,r(false)):o&&n?a.current=d:(r(true),t(d),a.current=null,n||i(true));}),u=Et(d=>{d?(i(false),a.current&&(t(a.current),a.current=null)):(i(false),a.current=null);});return [l,n,e,u]}function H2(){return H2=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},H2.apply(this,arguments)}const Sne=e=>{const{prefixCls:t,isMobile:n,ready:r,open:o,align:i,offsetR:a,offsetB:l,offsetX:u,offsetY:d,arrowPos:m,popupSize:p,motion:g,uniqueContainerClassName:b,uniqueContainerStyle:y}=e,S=`${t}-unique-container`,[C,w]=G.useState(false),$=QB(n,r,o,i,a,l,u,d),M=G.useRef($);r&&(M.current=$);const T={};return p&&(T.width=p.width,T.height=p.height),G.createElement(So,H2({motionAppear:true,motionEnter:true,motionLeave:true,removeOnLeave:false,leavedClassName:`${S}-hidden`},g,{visible:o,onVisibleChanged:R=>{w(R);}}),({className:R,style:I})=>{const N=X(S,R,b,{[`${S}-visible`]:C});return G.createElement("div",{className:N,style:{"--arrow-x":`${m?.x||0}px`,"--arrow-y":`${m?.y||0}px`,...M.current,...T,...I,...y}})})},Cne=({children:e,postTriggerProps:t})=>{const[n,r,o,i]=yne(),a=f.useMemo(()=>!o||!t?o:t(o),[o,t]),[l,u]=f.useState(null),[d,m]=f.useState(null),p=f.useRef(null),g=Et(W=>{p.current=W,tf(W)&&l!==W&&u(W);}),b=f.useRef(null),y=nk(),S=Et((W,K)=>{b.current=K,y(()=>{n(W);},W.delay);}),C=W=>{y(()=>{b.current?.()||n(false);},W);},w=Et(W=>{i(W);}),[$,M,T,R,I,N,P,,,O,_]=tk(r,l,a?.target,a?.popupPlacement,a?.builtinPlacements||{},a?.popupAlign,void 0,false),L=f.useMemo(()=>{if(!a)return "";const W=ek(a.builtinPlacements||{},a.prefixCls||"",O,false);return X(W,a.getPopupClassNameFromAlign?.(O))},[O,a?.getPopupClassNameFromAlign,a?.builtinPlacements,a?.prefixCls]),j=f.useMemo(()=>({show:S,hide:C}),[]);f.useEffect(()=>{_();},[a?.target]);const U=Et(()=>(_(),Promise.resolve())),q=f.useRef({}),V=f.useContext(O0),B=f.useMemo(()=>({registerSubPopup:(W,K)=>{q.current[W]=K,V?.registerSubPopup(W,K);}}),[V]),F=a?.prefixCls;return f.createElement(JB.Provider,{value:j},e,a&&f.createElement(O0.Provider,{value:B},f.createElement(ZB,{ref:g,portal:Qy,onEsc:a.onEsc,prefixCls:F,popup:a.popup,className:X(a.popupClassName,L,`${F}-unique-controlled`),style:a.popupStyle,target:a.target,open:r,keepDom:true,fresh:true,autoDestroy:false,onVisibleChanged:w,ready:$,offsetX:M,offsetY:T,offsetR:R,offsetB:I,onAlign:_,onPrepare:U,onResize:W=>m({width:W.offsetWidth,height:W.offsetHeight}),arrowPos:{x:N,y:P},align:O,zIndex:a.zIndex,mask:a.mask,arrow:a.arrow,motion:a.popupMotion,maskMotion:a.maskMotion,getPopupContainer:a.getPopupContainer},f.createElement(Sne,{prefixCls:F,isMobile:false,ready:$,open:r,align:O,offsetR:R,offsetB:I,offsetX:M,offsetY:T,arrowPos:{x:N,y:P},popupSize:d,motion:a.popupMotion,uniqueContainerClassName:X(a.uniqueContainerClassName,L),uniqueContainerStyle:a.uniqueContainerStyle}))))};function xne(e=Qy){return f.forwardRef((n,r)=>{const{prefixCls:o="rc-trigger-popup",children:i,action:a="hover",showAction:l,hideAction:u,popupVisible:d,defaultPopupVisible:m,onOpenChange:p,afterOpenChange:g,onPopupVisibleChange:b,afterPopupVisibleChange:y,mouseEnterDelay:S,mouseLeaveDelay:C=.1,focusDelay:w,blurDelay:$,mask:M,maskClosable:T=true,getPopupContainer:R,forceRender:I,autoDestroy:N,popup:P,popupClassName:O,uniqueContainerClassName:_,uniqueContainerStyle:L,popupStyle:j,popupPlacement:U,builtinPlacements:q={},popupAlign:V,zIndex:B,stretch:F,getPopupClassNameFromAlign:W,fresh:K,unique:Q,alignPoint:D,onPopupClick:z,onPopupAlign:Y,arrow:ee,popupMotion:J,maskMotion:te,mobile:ne,...se}=n,ae=N||false,re=d===void 0,de=!!ne,ge=f.useRef({}),ie=f.useContext(O0),Ee=f.useMemo(()=>({registerSubPopup:(ht,Vt)=>{ge.current[ht]=Vt,ie?.registerSubPopup(ht,Vt);}}),[ie]),le=f.useContext(JB),ue=Ql(),[Se,ye]=f.useState(null),Be=f.useRef(null),je=Et(ht=>{Be.current=ht,tf(ht)&&Se!==ht&&ye(ht),ie?.registerSubPopup(ue,ht);}),[Ne,fe]=f.useState(null),be=f.useRef(null),Re=Et(ht=>{const Vt=nf(ht);tf(Vt)&&Ne!==Vt&&(fe(Vt),be.current=Vt);}),qe={},Qe=Et(ht=>{const Vt=Ne;return Vt?.contains(ht)||I0(Vt)?.host===ht||ht===Vt||Se?.contains(ht)||I0(Se)?.host===ht||ht===Se||Object.values(ge.current).some(js=>js?.contains(ht)||ht===js)}),We=ee?{...ee!==true?ee:{}}:null,[tt,rt]=hn(m||false,d),Ze=tt||false,Oe=f.useMemo(()=>{const ht=typeof i=="function"?i({open:Ze}):i;return f.Children.only(ht)},[i,Ze]),Ye=Oe?.props||{},Ke=Et(()=>Ze),_e=Et((ht=0)=>({popup:P,target:Ne,delay:ht,prefixCls:o,popupClassName:O,uniqueContainerClassName:_,uniqueContainerStyle:L,popupStyle:j,popupPlacement:U,builtinPlacements:q,popupAlign:V,zIndex:B,mask:M,maskClosable:T,popupMotion:J,maskMotion:te,arrow:We,getPopupContainer:R,getPopupClassNameFromAlign:W,id:ue,onEsc:Dt}));An(()=>{le&&Q&&Ne&&!re&&!ie&&(Ze?le.show(_e(S),Ke):le.hide(C));},[Ze,Ne]);const ke=f.useRef(Ze);ke.current=Ze;const lt=Et(ht=>{Eo.flushSync(()=>{Ze!==ht&&(rt(ht),p?.(ht),b?.(ht));});}),At=nk(),dt=(ht,Vt=0)=>{if(d!==void 0){At(()=>{lt(ht);},Vt);return}if(le&&Q&&re&&!ie){ht?le.show(_e(Vt),Ke):le.hide(Vt);return}At(()=>{lt(ht);},Vt);};function Dt({top:ht}){ht&&dt(false);}const[Tt,xt]=f.useState(false);An(ht=>{(!ht||Ze)&&xt(true);},[Ze]);const[gt,ft]=f.useState(null),[st,He]=f.useState(null),Ge=ht=>{He([ht.clientX,ht.clientY]);},[ve,Te,Ce,he,Ie,we,Le,Xe,it,mt,wt]=tk(Ze,Se,D&&st!==null?st:Ne,U,q,V,Y,de),[Mt,Bt]=pne(a,l,u),En=Mt.has("click"),Ht=Bt.has("click")||Bt.has("contextMenu"),Pe=Et(()=>{Tt||wt();});vne(Ze,Ne,Se,Pe,()=>{ke.current&&D&&Ht&&dt(false);}),An(()=>{Pe();},[st,U]),An(()=>{Ze&&!q?.[U]&&Pe();},[JSON.stringify(V)]);const ct=f.useMemo(()=>{const ht=ek(q,o,mt,D);return X(ht,W?.(mt))},[mt,W,q,o,D]);f.useImperativeHandle(r,()=>({nativeElement:be.current,popupElement:Be.current,forceAlign:Pe}));const[Rt,_t]=f.useState(0),[en,dn]=f.useState(0),yn=()=>{if(F&&Ne){const ht=Ne.getBoundingClientRect();_t(ht.width),dn(ht.height);}},lr=()=>{yn(),Pe();},lo=ht=>{xt(false),wt(),g?.(ht),y?.(ht);},In=()=>new Promise(ht=>{yn(),ft(()=>ht);});An(()=>{gt&&(wt(),gt(),ft(null));},[gt]);function Ei(ht,Vt,js,Lg,Pu){qe[ht]=(Qa,...zg)=>{(!Pu||!Pu())&&(Lg?.(Qa),dt(Vt,js)),Ye[ht]?.(Qa,...zg);};}const Hr=Mt.has("touch"),xo=Bt.has("touch"),_o=f.useRef(false);(Hr||xo)&&(qe.onTouchStart=(...ht)=>{_o.current=true,ke.current&&xo?dt(false):!ke.current&&Hr&&dt(true),Ye.onTouchStart?.(...ht);}),(En||Ht)&&(qe.onClick=(ht,...Vt)=>{ke.current&&Ht?dt(false):!ke.current&&En&&(Ge(ht),dt(true)),Ye.onClick?.(ht,...Vt),_o.current=false;});const em=bne(Ze,Ht||xo,Ne,Se,M,T,Qe,dt),kt=Mt.has("hover"),Pr=Bt.has("hover");let Ir,Ra;const Mi=()=>_o.current;if(kt){const ht=Vt=>{Ge(Vt);};Ei("onMouseEnter",true,S,ht,Mi),Ei("onPointerEnter",true,S,ht,Mi),Ir=Vt=>{(Ze||Tt)&&Se?.contains(Vt.target)&&dt(true,S);},D&&(qe.onMouseMove=Vt=>{Ye.onMouseMove?.(Vt);});}Pr&&(Ei("onMouseLeave",false,C,void 0,Mi),Ei("onPointerLeave",false,C,void 0,Mi),Ra=()=>{dt(false,C);}),Mt.has("focus")&&Ei("onFocus",true,w),Bt.has("focus")&&Ei("onBlur",false,$),Mt.has("contextMenu")&&(qe.onContextMenu=(ht,...Vt)=>{ke.current&&Bt.has("contextMenu")?dt(false):(Ge(ht),dt(true)),ht.preventDefault(),Ye.onContextMenu?.(ht,...Vt);});const Lo=f.useRef(false);Lo.current||=I||Ze||Tt;const Vr={...Ye,...qe},sc={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach(ht=>{se[ht]&&(sc[ht]=(...Vt)=>{Vr[ht]?.(...Vt),se[ht](...Vt);});});const lc={x:we,y:Le};Hz(Ze,Ne,lr);const Au=Yl(Re,Xl(Oe)),Nu=f.cloneElement(Oe,{...Vr,...sc,ref:Au});return f.createElement(f.Fragment,null,Nu,Lo.current&&(!le||!Q)&&f.createElement(O0.Provider,{value:Ee},f.createElement(ZB,{portal:e,ref:je,prefixCls:o,popup:P,className:X(O,!de&&ct),style:j,target:Ne,onMouseEnter:Ir,onMouseLeave:Ra,onPointerEnter:Ir,zIndex:B,open:Ze,keepDom:Tt,fresh:K,onClick:z,onPointerDownCapture:em,mask:M,motion:J,maskMotion:te,onVisibleChanged:lo,onPrepare:In,forceRender:I,autoDestroy:ae,getPopupContainer:R,onEsc:Dt,align:mt,arrow:We,arrowPos:lc,ready:ve,offsetX:Te,offsetY:Ce,offsetR:he,offsetB:Ie,onAlign:Pe,stretch:F,targetWidth:Rt/Xe,targetHeight:en/it,mobile:ne})))})}const Zy=xne(Qy);function rk(e){return e&&G.isValidElement(e)&&e.type===G.Fragment}const ok=(e,t,n)=>G.isValidElement(e)?G.cloneElement(e,typeof n=="function"?n(e.props||{}):n):t;function kr(e,t){return ok(e,e,t)}const wne=({children:e})=>{const{getPrefixCls:t}=G.useContext(Ct),n=t();return G.isValidElement(e)?G.createElement(So,{visible:true,motionName:`${n}-fade`,motionAppear:true,motionEnter:true,motionLeave:false,removeOnLeave:false},({style:r,className:o})=>kr(e,i=>({className:X(i.className,o),style:{...i.style,...r}}))):e},ob=[null,null];function $ne(e){if(ob[0]!==e){const t={};Object.keys(e).forEach(n=>{t[n]={...e[n],dynamicInset:false};}),ob[0]=e,ob[1]=t;}return ob[1]}const ik=({children:e})=>{const t=n=>{const{id:r,builtinPlacements:o,popup:i}=n,a=typeof i=="function"?i():i,l=$ne(o);return {...n,getPopupContainer:null,arrow:false,popup:G.createElement(wne,{key:r},a),builtinPlacements:l}};return G.createElement(Cne,{postTriggerProps:t},e)},to=f.createContext(false),ak=({children:e,disabled:t})=>{const n=f.useContext(to);return f.createElement(to.Provider,{value:t??n},e)},af=f.createContext(void 0),Ene=({children:e,size:t})=>{const n=f.useContext(af);return f.createElement(af.Provider,{value:t||n},e)};function Mne(){const e=f.useContext(to),t=f.useContext(af);return {componentDisabled:e,componentSize:t}}function Rne(e,t,n){const r=e||{},o=r.inherit===false||!t?{...lp,hashed:t?.hashed??lp.hashed,cssVar:t?.cssVar}:t,i=f.useId();return Mf(()=>{if(!e)return t;const a={...o.components};Object.keys(e.components||{}).forEach(d=>{a[d]={...a[d],...e.components[d]};});const l=`css-var-${i.replace(/:/g,"")}`,u={prefix:n?.prefixCls,...o.cssVar,...r.cssVar,key:r.cssVar?.key||l};return {...o,...r,token:{...o.token,...r.token},components:a,cssVar:u}},[r,o],(a,l)=>a.some((u,d)=>{const m=l[d];return !Dl(u,m,true)}))}const _I=f.createContext(true);function Tne(e){const t=f.useContext(_I),{children:n}=e,[,r]=Fr(),{motion:o}=r,i=f.useRef(false);return i.current||(i.current=t!==o),i.current?f.createElement(_I.Provider,{value:o},f.createElement(cte,{motion:o},n)):n}const Ane=()=>null,Nne=({iconPrefixCls:e,csp:t})=>(Uee(e,t),null),Pne=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let D0,sk,lk,ck;function Nx(){return D0||tp}function Ine(){return sk||Vy}const One=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:o}=e;t!==void 0&&(D0=t),n!==void 0&&(sk=n),"holderRender"in e&&(ck=o),r&&(lk=r);},eR=()=>({getPrefixCls:(e,t)=>t||(e?`${Nx()}-${e}`:Nx()),getIconPrefixCls:Ine,getRootPrefixCls:()=>D0||Nx(),getTheme:()=>lk,holderRender:ck}),Dne=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,alert:o,affix:i,anchor:a,form:l,locale:u,componentSize:d,direction:m,space:p,splitter:g,virtual:b,dropdownMatchSelectWidth:y,popupMatchSelectWidth:S,popupOverflow:C,legacyLocale:w,parentContext:$,iconPrefixCls:M,theme:T,componentDisabled:R,segmented:I,statistic:N,spin:P,calendar:O,carousel:_,cascader:L,collapse:j,typography:U,checkbox:q,descriptions:V,divider:B,drawer:F,skeleton:W,steps:K,image:Q,layout:D,list:z,mentions:Y,modal:ee,progress:J,result:te,slider:ne,breadcrumb:se,masonry:ae,menu:re,pagination:de,input:ge,textArea:ie,otp:Ee,empty:le,badge:ue,radio:Se,rate:ye,ribbon:Be,switch:je,transfer:Ne,avatar:fe,message:be,tag:Re,table:qe,card:Qe,cardMeta:We,tabs:tt,timeline:rt,timePicker:Ze,upload:Oe,notification:Ye,tree:Ke,colorPicker:_e,datePicker:ke,rangePicker:lt,flex:At,wave:dt,dropdown:Dt,warning:Tt,tour:xt,tooltip:gt,popover:ft,popconfirm:st,qrcode:He,floatButton:Ge,floatButtonGroup:ve,variant:Te,inputNumber:Ce,treeSelect:he,watermark:Ie}=e,we=f.useCallback((ct,Rt)=>{const{prefixCls:_t}=e;if(Rt)return Rt;const en=_t||$.getPrefixCls("");return ct?`${en}-${ct}`:en},[$.getPrefixCls,e.prefixCls]),Le=M||$.iconPrefixCls||Vy,Xe=n||$.csp,it=Rne(T,$.theme,{prefixCls:we("")}),mt={csp:Xe,autoInsertSpaceInButton:r,alert:o,affix:i,anchor:a,locale:u||w,direction:m,space:p,splitter:g,virtual:b,popupMatchSelectWidth:S??y,popupOverflow:C,getPrefixCls:we,iconPrefixCls:Le,theme:it,segmented:I,statistic:N,spin:P,calendar:O,carousel:_,cascader:L,collapse:j,typography:U,checkbox:q,descriptions:V,divider:B,drawer:F,skeleton:W,steps:K,image:Q,input:ge,textArea:ie,otp:Ee,layout:D,list:z,mentions:Y,modal:ee,progress:J,result:te,slider:ne,breadcrumb:se,masonry:ae,menu:re,pagination:de,empty:le,badge:ue,radio:Se,rate:ye,ribbon:Be,switch:je,transfer:Ne,avatar:fe,message:be,tag:Re,table:qe,card:Qe,cardMeta:We,tabs:tt,timeline:rt,timePicker:Ze,upload:Oe,notification:Ye,tree:Ke,colorPicker:_e,datePicker:ke,rangePicker:lt,flex:At,wave:dt,dropdown:Dt,warning:Tt,tour:xt,tooltip:gt,popover:ft,popconfirm:st,qrcode:He,floatButton:Ge,floatButtonGroup:ve,variant:Te,inputNumber:Ce,treeSelect:he,watermark:Ie},wt={...$};Object.keys(mt).forEach(ct=>{mt[ct]!==void 0&&(wt[ct]=mt[ct]);}),Pne.forEach(ct=>{const Rt=e[ct];Rt&&(wt[ct]=Rt);}),typeof r<"u"&&(wt.button={autoInsertSpace:r,...wt.button});const Mt=Mf(()=>wt,wt,(ct,Rt)=>{const _t=Object.keys(ct),en=Object.keys(Rt);return _t.length!==en.length||_t.some(dn=>ct[dn]!==Rt[dn])}),{layer:Bt}=f.useContext(su),En=f.useMemo(()=>({prefixCls:Le,csp:Xe,layer:Bt?"antd":void 0}),[Le,Xe,Bt]);let Ht=f.createElement(f.Fragment,null,f.createElement(Nne,{iconPrefixCls:Le,csp:Xe}),f.createElement(Ane,{dropdownMatchSelectWidth:y}),t);const Pe=f.useMemo(()=>Nd(ya.Form?.defaultValidateMessages||{},Mt.locale?.Form?.defaultValidateMessages||{},Mt.form?.validateMessages||{},l?.validateMessages||{}),[Mt,l?.validateMessages]);Object.keys(Pe).length>0&&(Ht=f.createElement(Qte.Provider,{value:Pe},Ht)),u&&(Ht=f.createElement(kte,{locale:u,_ANT_MARK__:Bte},Ht)),Ht=f.createElement(UM.Provider,{value:En},Ht),d&&(Ht=f.createElement(Ene,{size:d},Ht)),Ht=f.createElement(Tne,null,Ht),gt?.unique&&(Ht=f.createElement(ik,null,Ht));const Ue=f.useMemo(()=>{const{algorithm:ct,token:Rt,components:_t,cssVar:en,...dn}=it||{},yn=ct&&(!Array.isArray(ct)||ct.length>0)?A0(ct):VM,lr={};Object.entries(_t||{}).forEach(([In,Ei])=>{const Hr={...Ei};"algorithm"in Hr&&(Hr.algorithm===true?Hr.theme=yn:(Array.isArray(Hr.algorithm)||typeof Hr.algorithm=="function")&&(Hr.theme=A0(Hr.algorithm)),delete Hr.algorithm),lr[In]=Hr;});const lo={...of,...Rt};return {...dn,theme:yn,token:lo,components:lr,override:{override:lo,...lr},cssVar:en}},[it]);return T&&(Ht=f.createElement(jM.Provider,{value:Ue},Ht)),Mt.warning&&(Ht=f.createElement(nJ.Provider,{value:Mt.warning},Ht)),R!==void 0&&(Ht=f.createElement(ak,{disabled:R},Ht)),f.createElement(Ct.Provider,{value:Mt},Ht)},Do=e=>{const t=f.useContext(Ct),n=f.useContext(YM);return f.createElement(Dne,{parentContext:t,legacyLocale:n,...e})};Do.ConfigContext=Ct;Do.SizeContext=af;Do.config=One;Do.useConfig=Mne;Object.defineProperty(Do,"SizeContext",{get:()=>af});const ot={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};function _0(){return _0=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},_0.apply(this,arguments)}const tR=f.forwardRef((e,t)=>{const{prefixCls:n,style:r,className:o,duration:i=4.5,showProgress:a,pauseOnHover:l=true,eventKey:u,content:d,closable:m,props:p,onClick:g,onNoticeClose:b,times:y,hovering:S}=e,[C,w]=f.useState(false),[$,M]=f.useState(0),[T,R]=f.useState(0),I=S||C,N=typeof i=="number"?i:0,P=N>0&&a,O=()=>{b(u);},_=V=>{(V.key==="Enter"||V.code==="Enter"||V.keyCode===ot.ENTER)&&O();};f.useEffect(()=>{if(!I&&N>0){const V=Date.now()-T,B=setTimeout(()=>{O();},N*1e3-T);return ()=>{l&&clearTimeout(B),R(Date.now()-V);}}},[N,I,y]),f.useEffect(()=>{if(!I&&P&&(l||T===0)){const V=performance.now();let B;const F=()=>{cancelAnimationFrame(B),B=requestAnimationFrame(W=>{const K=W+T-V,Q=Math.min(K/(N*1e3),1);M(Q*100),Q<1&&F();});};return F(),()=>{l&&cancelAnimationFrame(B);}}},[N,T,I,P,y]);const L=f.useMemo(()=>typeof m=="object"&&m!==null?m:{},[m]),j=bo(L,true),U=100-(!$||$<0?0:$>100?100:$),q=`${n}-notice`;return f.createElement("div",_0({},p,{ref:t,className:X(q,o,{[`${q}-closable`]:m}),style:r,onMouseEnter:V=>{w(true),p?.onMouseEnter?.(V);},onMouseLeave:V=>{w(false),p?.onMouseLeave?.(V);},onClick:g}),f.createElement("div",{className:`${q}-content`},d),m&&f.createElement("button",_0({className:`${q}-close`,onKeyDown:_,"aria-label":"Close"},j,{onClick:V=>{V.preventDefault(),V.stopPropagation(),O();}}),L.closeIcon??"x"),P&&f.createElement("progress",{className:`${q}-progress`,max:"100",value:U},U+"%"))}),uk=G.createContext({}),dk=({children:e,classNames:t})=>G.createElement(uk.Provider,{value:{classNames:t}},e),LI=8,zI=3,BI=16,_ne=e=>{const t={offset:LI,threshold:zI,gap:BI};return e&&typeof e=="object"&&(t.offset=e.offset??LI,t.threshold=e.threshold??zI,t.gap=e.gap??BI),[!!e,t]};function L0(){return L0=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},L0.apply(this,arguments)}const Lne=e=>{const{configList:t,placement:n,prefixCls:r,className:o,style:i,motion:a,onAllNoticeRemoved:l,onNoticeClose:u,stack:d}=e,{classNames:m}=f.useContext(uk),p=f.useRef({}),[g,b]=f.useState(null),[y,S]=f.useState([]),C=t.map(N=>({config:N,key:String(N.key)})),[w,{offset:$,threshold:M,gap:T}]=_ne(d),R=w&&(y.length>0||C.length<=M),I=typeof a=="function"?a(n):a;return f.useEffect(()=>{w&&y.length>1&&S(N=>N.filter(P=>C.some(({key:O})=>P===O)));},[y,C,w]),f.useEffect(()=>{w&&p.current[C[C.length-1]?.key]&&b(p.current[C[C.length-1]?.key]);},[C,w]),G.createElement(Mte,L0({key:n,className:X(r,`${r}-${n}`,m?.list,o,{[`${r}-stack`]:!!w,[`${r}-stack-expanded`]:R}),style:i,keys:C,motionAppear:true},I,{onAllRemoved:()=>{l(n);}}),({config:N,className:P,style:O,index:_},L)=>{const{key:j,times:U}=N,q=String(j),{className:V,style:B,classNames:F,styles:W,...K}=N,Q=C.findIndex(z=>z.key===q),D={};if(w){const z=C.length-1-(Q>-1?Q:_-1),Y=n==="top"||n==="bottom"?"-50%":"0";if(z>0){D.height=R?p.current[q]?.offsetHeight:g?.offsetHeight;let ee=0;for(let ne=0;ne<z;ne++)ee+=p.current[C[C.length-1-ne].key]?.offsetHeight+T;const J=(R?ee:z*$)*(n.startsWith("top")?1:-1),te=!R&&g?.offsetWidth&&p.current[q]?.offsetWidth?(g?.offsetWidth-$*2*(z<3?z:3))/p.current[q]?.offsetWidth:1;D.transform=`translate3d(${Y}, ${J}px, 0) scaleX(${te})`;}else D.transform=`translate3d(${Y}, 0, 0)`;}return G.createElement("div",{ref:L,className:X(`${r}-notice-wrapper`,P,F?.wrapper),style:{...O,...D,...W?.wrapper},onMouseEnter:()=>S(z=>z.includes(q)?z:[...z,q]),onMouseLeave:()=>S(z=>z.filter(Y=>Y!==q))},G.createElement(tR,L0({},K,{ref:z=>{Q>-1?p.current[q]=z:delete p.current[q];},prefixCls:r,classNames:F,styles:W,className:X(V,m?.notice),style:B,times:U,key:j,eventKey:j,onNoticeClose:u,hovering:w&&y.length>0})))})},zne=f.forwardRef((e,t)=>{const{prefixCls:n="rc-notification",container:r,motion:o,maxCount:i,className:a,style:l,onAllRemoved:u,stack:d,renderNotifications:m}=e,[p,g]=f.useState([]),b=M=>{const T=p.find(P=>P.key===M),R=T?.closable,I=R&&typeof R=="object"?R:{},{onClose:N}=I;N?.(),T?.onClose?.(),g(P=>P.filter(O=>O.key!==M));};f.useImperativeHandle(t,()=>({open:M=>{g(T=>{let R=[...T];const I=R.findIndex(P=>P.key===M.key),N={...M};return I>=0?(N.times=(T[I]?.times||0)+1,R[I]=N):(N.times=0,R.push(N)),i>0&&R.length>i&&(R=R.slice(-i)),R});},close:M=>{b(M);},destroy:()=>{g([]);}}));const[y,S]=f.useState({});f.useEffect(()=>{const M={};p.forEach(T=>{const{placement:R="topRight"}=T;R&&(M[R]=M[R]||[],M[R].push(T));}),Object.keys(y).forEach(T=>{M[T]=M[T]||[];}),S(M);},[p]);const C=M=>{S(T=>{const R={...T};return (R[M]||[]).length||delete R[M],R});},w=f.useRef(false);if(f.useEffect(()=>{Object.keys(y).length>0?w.current=true:w.current&&(u?.(),w.current=false);},[y]),!r)return null;const $=Object.keys(y);return Eo.createPortal(f.createElement(f.Fragment,null,$.map(M=>{const T=y[M],R=f.createElement(Lne,{key:M,configList:T,placement:M,prefixCls:n,className:a?.(M),style:l?.(M),motion:o,onNoticeClose:b,onAllNoticeRemoved:C,stack:d});return m?m(R,{prefixCls:n,key:M}):R})),r)}),Bne=()=>document.body;let kI=0;function kne(...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 fk(e={}){const{getContainer:t=Bne,motion:n,prefixCls:r,maxCount:o,className:i,style:a,onAllRemoved:l,stack:u,renderNotifications:d,...m}=e,[p,g]=f.useState(),b=f.useRef(),y=f.createElement(zne,{container:p,ref:b,prefixCls:r,motion:n,maxCount:o,className:i,style:a,onAllRemoved:l,stack:u,renderNotifications:d}),[S,C]=f.useState([]),w=Et(M=>{const T=kne(m,M);(T.key===null||T.key===void 0)&&(T.key=`rc-notification-${kI}`,kI+=1),C(R=>[...R,{type:"open",config:T}]);}),$=f.useMemo(()=>({open:w,close:M=>{C(T=>[...T,{type:"close",key:M}]);},destroy:()=>{C(M=>[...M,{type:"destroy"}]);}}),[]);return f.useEffect(()=>{g(t());}),f.useEffect(()=>{if(b.current&&S.length){S.forEach(R=>{switch(R.type){case "open":b.current.open(R.config);break;case "close":b.current.close(R.key);break;case "destroy":b.current.destroy();break}});let M,T;C(R=>((M!==R||!T)&&(M=R,T=R.filter(I=>!S.includes(I))),T));}},[S]),[$,y]}var Fne={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 V2(){return V2=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},V2.apply(this,arguments)}const Hne=(e,t)=>f.createElement(Kn,V2({},e,{ref:t,icon:Fne})),Jy=f.forwardRef(Hne),Vne=e=>{const{componentCls:t,iconCls:n,boxShadow:r,colorText:o,colorSuccess:i,colorError:a,colorWarning:l,colorInfo:u,fontSizeLG:d,motionEaseInOutCirc:m,motionDurationSlow:p,marginXS:g,paddingXS:b,borderRadiusLG:y,zIndexPopup:S,contentPadding:C,contentBg:w}=e,$=`${t}-notice`,M=new zt("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:b,transform:"translateY(0)",opacity:1}}),T=new zt("MessageMoveOut",{"0%":{maxHeight:e.height,padding:b,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}}),R={padding:b,textAlign:"center",[`${t}-custom-content`]:{display:"flex",alignItems:"center"},[`${t}-custom-content > ${n}`]:{marginInlineEnd:g,fontSize:d},[`${$}-content`]:{display:"inline-block",padding:C,background:w,borderRadius:y,boxShadow:r,pointerEvents:"all"},[`${t}-success > ${n}`]:{color:i},[`${t}-error > ${n}`]:{color:a},[`${t}-warning > ${n}`]:{color:l},[`${t}-info > ${n},
${t}-loading > ${n}`]:{color:u}};return [{[t]:{...un(e),color:o,position:"fixed",top:g,width:"100%",pointerEvents:"none",zIndex:S,[`${t}-move-up`]:{animationFillMode:"forwards"},[`
${t}-move-up-appear,
${t}-move-up-enter
`]:{animationName:M,animationDuration:p,animationPlayState:"paused",animationTimingFunction:m},[`
${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:T,animationDuration:p,animationPlayState:"paused",animationTimingFunction:m},[`${t}-move-up-leave${t}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}}},{[t]:{[`${$}-wrapper`]:{...R}}},{[`${t}-notice-pure-panel`]:{...R,padding:0,textAlign:"start"}}]},jne=e=>({zIndexPopup:e.zIndexPopupBase+ZM+10,contentBg:e.colorBgElevated,contentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`}),mk=qt("Message",e=>{const t=Ft(e,{height:150});return Vne(t)},jne),Une={info:f.createElement(WM,null),success:f.createElement(qM,null),error:f.createElement(Gp,null),warning:f.createElement(Kp,null),loading:f.createElement(Jy,null)},hk=e=>{const{prefixCls:t,type:n,icon:r,children:o,classNames:i,styles:a}=e,l=r||n&&Une[n],u=kr(l,d=>{const m={...d?.style,...a?.icon};return {className:X(d.className,i?.icon),style:m}});return f.createElement("div",{className:X(`${t}-custom-content`,`${t}-${n}`)},u,f.createElement("span",{className:i?.content,style:a?.content},o))},qne=e=>{const{prefixCls:t,className:n,style:r,type:o,icon:i,content:a,classNames:l,styles:u,...d}=e,{getPrefixCls:m,className:p,style:g,classNames:b,styles:y}=Gt("message"),S=t||m("message"),C=Yn(S),[w,$]=mk(S,C),[M,T]=Xt([b,l],[y,u],{props:e});return f.createElement(tR,{...d,prefixCls:S,className:X(p,M.root,n,w,`${S}-notice-pure-panel`,$,C),style:{...T.root,...g,...r},eventKey:"pure",duration:null,content:f.createElement(hk,{prefixCls:S,type:o,icon:i,classNames:M,styles:T},a)})};function Wne(e,t){return {motionName:t??`${e}-move-up`}}function nR(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 Gne=8,Kne=3,Yne=({children:e,prefixCls:t})=>{const n=Yn(t),[r,o]=mk(t,n);return f.createElement(dk,{classNames:{list:X(r,o,n)}},e)},Xne=(e,{prefixCls:t,key:n})=>f.createElement(Yne,{prefixCls:t,key:n},e),Qne=f.forwardRef((e,t)=>{const{top:n,prefixCls:r,getContainer:o,maxCount:i,duration:a=Kne,rtl:l,transitionName:u,onAllRemoved:d,pauseOnHover:m=true}=e,{getPrefixCls:p,direction:g,getPopupContainer:b}=Gt("message"),{message:y}=f.useContext(Ct),S=r||p("message"),C=()=>({left:"50%",transform:"translateX(-50%)",top:n??Gne}),w=()=>X({[`${S}-rtl`]:l??g==="rtl"}),$=()=>Wne(S,u),[M,T]=Xt([e?.classNames,y?.classNames],[e?.styles,y?.styles],{props:e}),[R,I]=fk({prefixCls:S,style:C,className:w,motion:$,closable:false,duration:a,getContainer:()=>o?.()||b?.()||document.body,maxCount:i,onAllRemoved:d,renderNotifications:Xne,pauseOnHover:m});return f.useImperativeHandle(t,()=>({...R,prefixCls:S,message:y,classNames:M,styles:T})),I});let FI=0;function pk(e){const t=f.useRef(null);return [f.useMemo(()=>{const r=u=>{t.current?.close(u);},o=u=>{if(!t.current){const D=()=>{};return D.then=()=>{},D}const{open:d,prefixCls:m,message:p,classNames:g,styles:b}=t.current,y=p?.className||{},S=p?.style||{},C=p?.classNames||{},w=p?.styles||{},$=`${m}-notice`,{content:M,icon:T,type:R,key:I,className:N,style:P,onClose:O,classNames:_={},styles:L={},...j}=u;let U=I;Qr(U)||(FI+=1,U=`antd-message-${FI}`);const q={...e,...u},V=Rl(C,{props:q}),B=Rl(_,{props:q}),F=Rl(w,{props:q}),W=Rl(L,{props:q}),K=Yy(void 0,V,B,g),Q=QM(F,W,b);return nR(D=>(d({...j,key:U,content:f.createElement(hk,{prefixCls:m,type:R,icon:T,classNames:K,styles:Q},M),placement:"top",className:X({[`${$}-${R}`]:R},N,y,K.root),style:{...Q.root,...S,...P},onClose:()=>{O?.(),D();}}),()=>{r(U);}))},a={open:o,destroy:u=>{u!==void 0?r(u):t.current?.destroy();}};return ["info","success","warning","error","loading"].forEach(u=>{const d=(m,p,g)=>{let b;m&&typeof m=="object"&&"content"in m?b=m:b={content:m};let y,S;typeof p=="function"?S=p:(y=p,S=g);const C={onClose:S,duration:y,...b,type:u};return o(C)};a[u]=d;}),a},[]),f.createElement(Qne,{key:"message-holder",...e,ref:t})]}function gk(e){return pk(e)}var Px={exports:{}},Gm={},Ix={exports:{}},Ox={};var HI;function Zne(){return HI||(HI=1,(function(e){function t(B,F){var W=B.length;B.push(F);e:for(;0<W;){var K=W-1>>>1,Q=B[K];if(0<o(Q,F))B[K]=F,B[W]=Q,W=K;else break e}}function n(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var F=B[0],W=B.pop();if(W!==F){B[0]=W;e:for(var K=0,Q=B.length,D=Q>>>1;K<D;){var z=2*(K+1)-1,Y=B[z],ee=z+1,J=B[ee];if(0>o(Y,W))ee<Q&&0>o(J,Y)?(B[K]=J,B[ee]=W,K=ee):(B[K]=Y,B[z]=W,K=z);else if(ee<Q&&0>o(J,W))B[K]=J,B[ee]=W,K=ee;else break e}}return F}function o(B,F){var W=B.sortIndex-F.sortIndex;return W!==0?W:B.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()};}else {var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l};}var u=[],d=[],m=1,p=null,g=3,b=false,y=false,S=false,C=false,w=typeof setTimeout=="function"?setTimeout:null,$=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function T(B){for(var F=n(d);F!==null;){if(F.callback===null)r(d);else if(F.startTime<=B)r(d),F.sortIndex=F.expirationTime,t(u,F);else break;F=n(d);}}function R(B){if(S=false,T(B),!y)if(n(u)!==null)y=true,I||(I=true,j());else {var F=n(d);F!==null&&V(R,F.startTime-B);}}var I=false,N=-1,P=5,O=-1;function _(){return C?true:!(e.unstable_now()-O<P)}function L(){if(C=false,I){var B=e.unstable_now();O=B;var F=true;try{e:{y=!1,S&&(S=!1,$(N),N=-1),b=!0;var W=g;try{t:{for(T(B),p=n(u);p!==null&&!(p.expirationTime>B&&_());){var K=p.callback;if(typeof K=="function"){p.callback=null,g=p.priorityLevel;var Q=K(p.expirationTime<=B);if(B=e.unstable_now(),typeof Q=="function"){p.callback=Q,T(B),F=!0;break t}p===n(u)&&r(u),T(B);}else r(u);p=n(u);}if(p!==null)F=!0;else {var D=n(d);D!==null&&V(R,D.startTime-B),F=!1;}}break e}finally{p=null,g=W,b=!1;}F=void 0;}}finally{F?j():I=false;}}}var j;if(typeof M=="function")j=function(){M(L);};else if(typeof MessageChannel<"u"){var U=new MessageChannel,q=U.port2;U.port1.onmessage=L,j=function(){q.postMessage(null);};}else j=function(){w(L,0);};function V(B,F){N=w(function(){B(e.unstable_now());},F);}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(B){B.callback=null;},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<B?Math.floor(1e3/B):5;},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(B){switch(g){case 1:case 2:case 3:var F=3;break;default:F=g;}var W=g;g=F;try{return B()}finally{g=W;}},e.unstable_requestPaint=function(){C=true;},e.unstable_runWithPriority=function(B,F){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3;}var W=g;g=B;try{return F()}finally{g=W;}},e.unstable_scheduleCallback=function(B,F,W){var K=e.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?K+W:K):W=K,B){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3;}return Q=W+Q,B={id:m++,callback:F,priorityLevel:B,startTime:W,expirationTime:Q,sortIndex:-1},W>K?(B.sortIndex=W,t(d,B),n(u)===null&&B===n(d)&&(S?($(N),N=-1):S=true,V(R,W-K))):(B.sortIndex=Q,t(u,B),y||b||(y=true,I||(I=true,j()))),B},e.unstable_shouldYield=_,e.unstable_wrapCallback=function(B){var F=g;return function(){var W=g;g=F;try{return B.apply(this,arguments)}finally{g=W;}}};})(Ox)),Ox}var VI;function Jne(){return VI||(VI=1,Ix.exports=Zne()),Ix.exports}var jI;function ere(){if(jI)return Gm;jI=1;var e=Jne(),t=Kl(),n=WB();function r(s){var c="https://react.dev/errors/"+s;if(1<arguments.length){c+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)c+="&args[]="+encodeURIComponent(arguments[h]);}return "Minified React error #"+s+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(s){return !(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function i(s){var c=s,h=s;if(s.alternate)for(;c.return;)c=c.return;else {s=c;do c=s,(c.flags&4098)!==0&&(h=c.return),s=c.return;while(s)}return c.tag===3?h:null}function a(s){if(s.tag===13){var c=s.memoizedState;if(c===null&&(s=s.alternate,s!==null&&(c=s.memoizedState)),c!==null)return c.dehydrated}return null}function l(s){if(s.tag===31){var c=s.memoizedState;if(c===null&&(s=s.alternate,s!==null&&(c=s.memoizedState)),c!==null)return c.dehydrated}return null}function u(s){if(i(s)!==s)throw Error(r(188))}function d(s){var c=s.alternate;if(!c){if(c=i(s),c===null)throw Error(r(188));return c!==s?null:s}for(var h=s,v=c;;){var E=h.return;if(E===null)break;var A=E.alternate;if(A===null){if(v=E.return,v!==null){h=v;continue}break}if(E.child===A.child){for(A=E.child;A;){if(A===h)return u(E),s;if(A===v)return u(E),c;A=A.sibling;}throw Error(r(188))}if(h.return!==v.return)h=E,v=A;else {for(var k=false,Z=E.child;Z;){if(Z===h){k=true,h=E,v=A;break}if(Z===v){k=true,v=E,h=A;break}Z=Z.sibling;}if(!k){for(Z=A.child;Z;){if(Z===h){k=true,h=A,v=E;break}if(Z===v){k=true,v=A,h=E;break}Z=Z.sibling;}if(!k)throw Error(r(189))}}if(h.alternate!==v)throw Error(r(190))}if(h.tag!==3)throw Error(r(188));return h.stateNode.current===h?s:c}function m(s){var c=s.tag;if(c===5||c===26||c===27||c===6)return s;for(s=s.child;s!==null;){if(c=m(s),c!==null)return c;s=s.sibling;}return null}var p=Object.assign,g=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),M=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),O=Symbol.for("react.activity"),_=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function j(s){return s===null||typeof s!="object"?null:(s=L&&s[L]||s["@@iterator"],typeof s=="function"?s:null)}var U=Symbol.for("react.client.reference");function q(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===U?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case S:return "Fragment";case w:return "Profiler";case C:return "StrictMode";case R:return "Suspense";case I:return "SuspenseList";case O:return "Activity"}if(typeof s=="object")switch(s.$$typeof){case y:return "Portal";case M:return s.displayName||"Context";case $:return (s._context.displayName||"Context")+".Consumer";case T:var c=s.render;return s=s.displayName,s||(s=c.displayName||c.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case N:return c=s.displayName||null,c!==null?c:q(s.type)||"Memo";case P:c=s._payload,s=s._init;try{return q(s(c))}catch{}}return null}var V=Array.isArray,B=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:false,data:null,method:null,action:null},K=[],Q=-1;function D(s){return {current:s}}function z(s){0>Q||(s.current=K[Q],K[Q]=null,Q--);}function Y(s,c){Q++,K[Q]=s.current,s.current=c;}var ee=D(null),J=D(null),te=D(null),ne=D(null);function se(s,c){switch(Y(te,c),Y(J,s),Y(ee,null),c.nodeType){case 9:case 11:s=(s=c.documentElement)&&(s=s.namespaceURI)?$4(s):0;break;default:if(s=c.tagName,c=c.namespaceURI)c=$4(c),s=E4(c,s);else switch(s){case "svg":s=1;break;case "math":s=2;break;default:s=0;}}z(ee),Y(ee,s);}function ae(){z(ee),z(J),z(te);}function re(s){s.memoizedState!==null&&Y(ne,s);var c=ee.current,h=E4(c,s.type);c!==h&&(Y(J,s),Y(ee,h));}function de(s){J.current===s&&(z(ee),z(J)),ne.current===s&&(z(ne),Bm._currentValue=W);}var ge,ie;function Ee(s){if(ge===void 0)try{throw Error()}catch(h){var c=h.stack.trim().match(/\n( *(at )?)/);ge=c&&c[1]||"",ie=-1<h.stack.indexOf(`
at`)?" (<anonymous>)":-1<h.stack.indexOf("@")?"@unknown:0:0":"";}return `
`+ge+s+ie}var le=false;function ue(s,c){if(!s||le)return "";le=true;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var v={DetermineComponentFrameRoot:function(){try{if(c){var Ve=function(){throw Error()};if(Object.defineProperty(Ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ve,[]);}catch(Ae){var Me=Ae;}Reflect.construct(s,[],Ve);}else {try{Ve.call();}catch(Ae){Me=Ae;}s.call(Ve.prototype);}}else {try{throw Error()}catch(Ae){Me=Ae;}(Ve=s())&&typeof Ve.catch=="function"&&Ve.catch(function(){});}}catch(Ae){if(Ae&&Me&&typeof Ae.stack=="string")return [Ae.stack,Me.stack]}return [null,null]}};v.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var E=Object.getOwnPropertyDescriptor(v.DetermineComponentFrameRoot,"name");E&&E.configurable&&Object.defineProperty(v.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var A=v.DetermineComponentFrameRoot(),k=A[0],Z=A[1];if(k&&Z){var ce=k.split(`
`),$e=Z.split(`
`);for(E=v=0;v<ce.length&&!ce[v].includes("DetermineComponentFrameRoot");)v++;for(;E<$e.length&&!$e[E].includes("DetermineComponentFrameRoot");)E++;if(v===ce.length||E===$e.length)for(v=ce.length-1,E=$e.length-1;1<=v&&0<=E&&ce[v]!==$e[E];)E--;for(;1<=v&&0<=E;v--,E--)if(ce[v]!==$e[E]){if(v!==1||E!==1)do if(v--,E--,0>E||ce[v]!==$e[E]){var De=`
`+ce[v].replace(" at new "," at ");return s.displayName&&De.includes("<anonymous>")&&(De=De.replace("<anonymous>",s.displayName)),De}while(1<=v&&0<=E);break}}}finally{le=false,Error.prepareStackTrace=h;}return (h=s?s.displayName||s.name:"")?Ee(h):""}function Se(s,c){switch(s.tag){case 26:case 27:case 5:return Ee(s.type);case 16:return Ee("Lazy");case 13:return s.child!==c&&c!==null?Ee("Suspense Fallback"):Ee("Suspense");case 19:return Ee("SuspenseList");case 0:case 15:return ue(s.type,false);case 11:return ue(s.type.render,false);case 1:return ue(s.type,true);case 31:return Ee("Activity");default:return ""}}function ye(s){try{var c="",h=null;do c+=Se(s,h),h=s,s=s.return;while(s);return c}catch(v){return `
Error generating stack: `+v.message+`
`+v.stack}}var Be=Object.prototype.hasOwnProperty,je=e.unstable_scheduleCallback,Ne=e.unstable_cancelCallback,fe=e.unstable_shouldYield,be=e.unstable_requestPaint,Re=e.unstable_now,qe=e.unstable_getCurrentPriorityLevel,Qe=e.unstable_ImmediatePriority,We=e.unstable_UserBlockingPriority,tt=e.unstable_NormalPriority,rt=e.unstable_LowPriority,Ze=e.unstable_IdlePriority,Oe=e.log,Ye=e.unstable_setDisableYieldValue,Ke=null,_e=null;function ke(s){if(typeof Oe=="function"&&Ye(s),_e&&typeof _e.setStrictMode=="function")try{_e.setStrictMode(Ke,s);}catch{}}var lt=Math.clz32?Math.clz32:Dt,At=Math.log,dt=Math.LN2;function Dt(s){return s>>>=0,s===0?32:31-(At(s)/dt|0)|0}var Tt=256,xt=262144,gt=4194304;function ft(s){var c=s&42;if(c!==0)return c;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function st(s,c,h){var v=s.pendingLanes;if(v===0)return 0;var E=0,A=s.suspendedLanes,k=s.pingedLanes;s=s.warmLanes;var Z=v&134217727;return Z!==0?(v=Z&~A,v!==0?E=ft(v):(k&=Z,k!==0?E=ft(k):h||(h=Z&~s,h!==0&&(E=ft(h))))):(Z=v&~A,Z!==0?E=ft(Z):k!==0?E=ft(k):h||(h=v&~s,h!==0&&(E=ft(h)))),E===0?0:c!==0&&c!==E&&(c&A)===0&&(A=E&-E,h=c&-c,A>=h||A===32&&(h&4194048)!==0)?c:E}function He(s,c){return (s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&c)===0}function Ge(s,c){switch(s){case 1:case 2:case 4:case 8:case 64:return c+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return c+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return -1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return -1;default:return -1}}function ve(){var s=gt;return gt<<=1,(gt&62914560)===0&&(gt=4194304),s}function Te(s){for(var c=[],h=0;31>h;h++)c.push(s);return c}function Ce(s,c){s.pendingLanes|=c,c!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0);}function he(s,c,h,v,E,A){var k=s.pendingLanes;s.pendingLanes=h,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=h,s.entangledLanes&=h,s.errorRecoveryDisabledLanes&=h,s.shellSuspendCounter=0;var Z=s.entanglements,ce=s.expirationTimes,$e=s.hiddenUpdates;for(h=k&~h;0<h;){var De=31-lt(h),Ve=1<<De;Z[De]=0,ce[De]=-1;var Me=$e[De];if(Me!==null)for($e[De]=null,De=0;De<Me.length;De++){var Ae=Me[De];Ae!==null&&(Ae.lane&=-536870913);}h&=~Ve;}v!==0&&Ie(s,v,0),A!==0&&E===0&&s.tag!==0&&(s.suspendedLanes|=A&~(k&~c));}function Ie(s,c,h){s.pendingLanes|=c,s.suspendedLanes&=~c;var v=31-lt(c);s.entangledLanes|=c,s.entanglements[v]=s.entanglements[v]|1073741824|h&261930;}function we(s,c){var h=s.entangledLanes|=c;for(s=s.entanglements;h;){var v=31-lt(h),E=1<<v;E&c|s[v]&c&&(s[v]|=c),h&=~E;}}function Le(s,c){var h=c&-c;return h=(h&42)!==0?1:Xe(h),(h&(s.suspendedLanes|c))!==0?0:h}function Xe(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:s=128;break;case 268435456:s=134217728;break;default:s=0;}return s}function it(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function mt(){var s=F.p;return s!==0?s:(s=window.event,s===void 0?32:K4(s.type))}function wt(s,c){var h=F.p;try{return F.p=s,c()}finally{F.p=h;}}var Mt=Math.random().toString(36).slice(2),Bt="__reactFiber$"+Mt,En="__reactProps$"+Mt,Ht="__reactContainer$"+Mt,Pe="__reactEvents$"+Mt,Ue="__reactListeners$"+Mt,ct="__reactHandles$"+Mt,Rt="__reactResources$"+Mt,_t="__reactMarker$"+Mt;function en(s){delete s[Bt],delete s[En],delete s[Pe],delete s[Ue],delete s[ct];}function dn(s){var c=s[Bt];if(c)return c;for(var h=s.parentNode;h;){if(c=h[Ht]||h[Bt]){if(h=c.alternate,c.child!==null||h!==null&&h.child!==null)for(s=I4(s);s!==null;){if(h=s[Bt])return h;s=I4(s);}return c}s=h,h=s.parentNode;}return null}function yn(s){if(s=s[Bt]||s[Ht]){var c=s.tag;if(c===5||c===6||c===13||c===31||c===26||c===27||c===3)return s}return null}function lr(s){var c=s.tag;if(c===5||c===26||c===27||c===6)return s.stateNode;throw Error(r(33))}function lo(s){var c=s[Rt];return c||(c=s[Rt]={hoistableStyles:new Map,hoistableScripts:new Map}),c}function In(s){s[_t]=true;}var Ei=new Set,Hr={};function xo(s,c){_o(s,c),_o(s+"Capture",c);}function _o(s,c){for(Hr[s]=c,s=0;s<c.length;s++)Ei.add(c[s]);}var em=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),kt={},Pr={};function Ir(s){return Be.call(Pr,s)?true:Be.call(kt,s)?false:em.test(s)?Pr[s]=true:(kt[s]=true,false)}function Ra(s,c,h){if(Ir(c))if(h===null)s.removeAttribute(c);else {switch(typeof h){case "undefined":case "function":case "symbol":s.removeAttribute(c);return;case "boolean":var v=c.toLowerCase().slice(0,5);if(v!=="data-"&&v!=="aria-"){s.removeAttribute(c);return}}s.setAttribute(c,""+h);}}function Mi(s,c,h){if(h===null)s.removeAttribute(c);else {switch(typeof h){case "undefined":case "function":case "symbol":case "boolean":s.removeAttribute(c);return}s.setAttribute(c,""+h);}}function Lo(s,c,h,v){if(v===null)s.removeAttribute(h);else {switch(typeof v){case "undefined":case "function":case "symbol":case "boolean":s.removeAttribute(h);return}s.setAttributeNS(c,h,""+v);}}function Vr(s){switch(typeof s){case "bigint":case "boolean":case "number":case "string":case "undefined":return s;case "object":return s;default:return ""}}function sc(s){var c=s.type;return (s=s.nodeName)&&s.toLowerCase()==="input"&&(c==="checkbox"||c==="radio")}function _g(s,c,h){var v=Object.getOwnPropertyDescriptor(s.constructor.prototype,c);if(!s.hasOwnProperty(c)&&typeof v<"u"&&typeof v.get=="function"&&typeof v.set=="function"){var E=v.get,A=v.set;return Object.defineProperty(s,c,{configurable:true,get:function(){return E.call(this)},set:function(k){h=""+k,A.call(this,k);}}),Object.defineProperty(s,c,{enumerable:v.enumerable}),{getValue:function(){return h},setValue:function(k){h=""+k;},stopTracking:function(){s._valueTracker=null,delete s[c];}}}}function lc(s){if(!s._valueTracker){var c=sc(s)?"checked":"value";s._valueTracker=_g(s,c,""+s[c]);}}function Au(s){if(!s)return false;var c=s._valueTracker;if(!c)return true;var h=c.getValue(),v="";return s&&(v=sc(s)?s.checked?"true":"false":s.value),s=v,s!==h?(c.setValue(s),true):false}function Nu(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var ht=/[\n"\\]/g;function Vt(s){return s.replace(ht,function(c){return "\\"+c.charCodeAt(0).toString(16)+" "})}function js(s,c,h,v,E,A,k,Z){s.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?s.type=k:s.removeAttribute("type"),c!=null?k==="number"?(c===0&&s.value===""||s.value!=c)&&(s.value=""+Vr(c)):s.value!==""+Vr(c)&&(s.value=""+Vr(c)):k!=="submit"&&k!=="reset"||s.removeAttribute("value"),c!=null?Pu(s,k,Vr(c)):h!=null?Pu(s,k,Vr(h)):v!=null&&s.removeAttribute("value"),E==null&&A!=null&&(s.defaultChecked=!!A),E!=null&&(s.checked=E&&typeof E!="function"&&typeof E!="symbol"),Z!=null&&typeof Z!="function"&&typeof Z!="symbol"&&typeof Z!="boolean"?s.name=""+Vr(Z):s.removeAttribute("name");}function Lg(s,c,h,v,E,A,k,Z){if(A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(s.type=A),c!=null||h!=null){if(!(A!=="submit"&&A!=="reset"||c!=null)){lc(s);return}h=h!=null?""+Vr(h):"",c=c!=null?""+Vr(c):h,Z||c===s.value||(s.value=c),s.defaultValue=c;}v=v??E,v=typeof v!="function"&&typeof v!="symbol"&&!!v,s.checked=Z?s.checked:!!v,s.defaultChecked=!!v,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(s.name=k),lc(s);}function Pu(s,c,h){c==="number"&&Nu(s.ownerDocument)===s||s.defaultValue===""+h||(s.defaultValue=""+h);}function Qa(s,c,h,v){if(s=s.options,c){c={};for(var E=0;E<h.length;E++)c["$"+h[E]]=true;for(h=0;h<s.length;h++)E=c.hasOwnProperty("$"+s[h].value),s[h].selected!==E&&(s[h].selected=E),E&&v&&(s[h].defaultSelected=true);}else {for(h=""+Vr(h),c=null,E=0;E<s.length;E++){if(s[E].value===h){s[E].selected=true,v&&(s[E].defaultSelected=true);return}c!==null||s[E].disabled||(c=s[E]);}c!==null&&(c.selected=true);}}function zg(s,c,h){if(c!=null&&(c=""+Vr(c),c!==s.value&&(s.value=c),h==null)){s.defaultValue!==c&&(s.defaultValue=c);return}s.defaultValue=h!=null?""+Vr(h):"";}function S6(s,c,h,v){if(c==null){if(v!=null){if(h!=null)throw Error(r(92));if(V(v)){if(1<v.length)throw Error(r(93));v=v[0];}h=v;}h==null&&(h=""),c=h;}h=Vr(c),s.defaultValue=h,v=s.textContent,v===h&&v!==""&&v!==null&&(s.value=v),lc(s);}function Iu(s,c){if(c){var h=s.firstChild;if(h&&h===s.lastChild&&h.nodeType===3){h.nodeValue=c;return}}s.textContent=c;}var CK=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function C6(s,c,h){var v=c.indexOf("--")===0;h==null||typeof h=="boolean"||h===""?v?s.setProperty(c,""):c==="float"?s.cssFloat="":s[c]="":v?s.setProperty(c,h):typeof h!="number"||h===0||CK.has(c)?c==="float"?s.cssFloat=h:s[c]=(""+h).trim():s[c]=h+"px";}function x6(s,c,h){if(c!=null&&typeof c!="object")throw Error(r(62));if(s=s.style,h!=null){for(var v in h)!h.hasOwnProperty(v)||c!=null&&c.hasOwnProperty(v)||(v.indexOf("--")===0?s.setProperty(v,""):v==="float"?s.cssFloat="":s[v]="");for(var E in c)v=c[E],c.hasOwnProperty(E)&&h[E]!==v&&C6(s,E,v);}else for(var A in c)c.hasOwnProperty(A)&&C6(s,A,c[A]);}function iS(s){if(s.indexOf("-")===-1)return false;switch(s){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return false;default:return true}}var xK=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),wK=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Bg(s){return wK.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function Za(){}var aS=null;function sS(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Ou=null,Du=null;function w6(s){var c=yn(s);if(c&&(s=c.stateNode)){var h=s[En]||null;e:switch(s=c.stateNode,c.type){case "input":if(js(s,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name),c=h.name,h.type==="radio"&&c!=null){for(h=s;h.parentNode;)h=h.parentNode;for(h=h.querySelectorAll('input[name="'+Vt(""+c)+'"][type="radio"]'),c=0;c<h.length;c++){var v=h[c];if(v!==s&&v.form===s.form){var E=v[En]||null;if(!E)throw Error(r(90));js(v,E.value,E.defaultValue,E.defaultValue,E.checked,E.defaultChecked,E.type,E.name);}}for(c=0;c<h.length;c++)v=h[c],v.form===s.form&&Au(v);}break e;case "textarea":zg(s,h.value,h.defaultValue);break e;case "select":c=h.value,c!=null&&Qa(s,!!h.multiple,c,false);}}}var lS=false;function $6(s,c,h){if(lS)return s(c,h);lS=true;try{var v=s(c);return v}finally{if(lS=false,(Ou!==null||Du!==null)&&(Ev(),Ou&&(c=Ou,s=Du,Du=Ou=null,w6(c),s)))for(c=0;c<s.length;c++)w6(s[c]);}}function tm(s,c){var h=s.stateNode;if(h===null)return null;var v=h[En]||null;if(v===null)return null;h=v[c];e:switch(c){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(v=!v.disabled)||(s=s.type,v=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!v;break e;default:s=false;}if(s)return null;if(h&&typeof h!="function")throw Error(r(231,c,typeof h));return h}var Ja=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cS=false;if(Ja)try{var nm={};Object.defineProperty(nm,"passive",{get:function(){cS=!0;}}),window.addEventListener("test",nm,nm),window.removeEventListener("test",nm,nm);}catch{cS=false;}var Us=null,uS=null,kg=null;function E6(){if(kg)return kg;var s,c=uS,h=c.length,v,E="value"in Us?Us.value:Us.textContent,A=E.length;for(s=0;s<h&&c[s]===E[s];s++);var k=h-s;for(v=1;v<=k&&c[h-v]===E[A-v];v++);return kg=E.slice(s,1<v?1-v:void 0)}function Fg(s){var c=s.keyCode;return "charCode"in s?(s=s.charCode,s===0&&c===13&&(s=13)):s=c,s===10&&(s=13),32<=s||s===13?s:0}function Hg(){return true}function M6(){return false}function zo(s){function c(h,v,E,A,k){this._reactName=h,this._targetInst=E,this.type=v,this.nativeEvent=A,this.target=k,this.currentTarget=null;for(var Z in s)s.hasOwnProperty(Z)&&(h=s[Z],this[Z]=h?h(A):A[Z]);return this.isDefaultPrevented=(A.defaultPrevented!=null?A.defaultPrevented:A.returnValue===false)?Hg:M6,this.isPropagationStopped=M6,this}return p(c.prototype,{preventDefault:function(){this.defaultPrevented=true;var h=this.nativeEvent;h&&(h.preventDefault?h.preventDefault():typeof h.returnValue!="unknown"&&(h.returnValue=false),this.isDefaultPrevented=Hg);},stopPropagation:function(){var h=this.nativeEvent;h&&(h.stopPropagation?h.stopPropagation():typeof h.cancelBubble!="unknown"&&(h.cancelBubble=true),this.isPropagationStopped=Hg);},persist:function(){},isPersistent:Hg}),c}var cc={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vg=zo(cc),rm=p({},cc,{view:0,detail:0}),$K=zo(rm),dS,fS,om,jg=p({},rm,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hS,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return "movementX"in s?s.movementX:(s!==om&&(om&&s.type==="mousemove"?(dS=s.screenX-om.screenX,fS=s.screenY-om.screenY):fS=dS=0,om=s),dS)},movementY:function(s){return "movementY"in s?s.movementY:fS}}),R6=zo(jg),EK=p({},jg,{dataTransfer:0}),MK=zo(EK),RK=p({},rm,{relatedTarget:0}),mS=zo(RK),TK=p({},cc,{animationName:0,elapsedTime:0,pseudoElement:0}),AK=zo(TK),NK=p({},cc,{clipboardData:function(s){return "clipboardData"in s?s.clipboardData:window.clipboardData}}),PK=zo(NK),IK=p({},cc,{data:0}),T6=zo(IK),OK={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},DK={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},_K={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function LK(s){var c=this.nativeEvent;return c.getModifierState?c.getModifierState(s):(s=_K[s])?!!c[s]:false}function hS(){return LK}var zK=p({},rm,{key:function(s){if(s.key){var c=OK[s.key]||s.key;if(c!=="Unidentified")return c}return s.type==="keypress"?(s=Fg(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?DK[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hS,charCode:function(s){return s.type==="keypress"?Fg(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?Fg(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),BK=zo(zK),kK=p({},jg,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),A6=zo(kK),FK=p({},rm,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hS}),HK=zo(FK),VK=p({},cc,{propertyName:0,elapsedTime:0,pseudoElement:0}),jK=zo(VK),UK=p({},jg,{deltaX:function(s){return "deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return "deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),qK=zo(UK),WK=p({},cc,{newState:0,oldState:0}),GK=zo(WK),KK=[9,13,27,32],pS=Ja&&"CompositionEvent"in window,im=null;Ja&&"documentMode"in document&&(im=document.documentMode);var YK=Ja&&"TextEvent"in window&&!im,N6=Ja&&(!pS||im&&8<im&&11>=im),P6=" ",I6=false;function O6(s,c){switch(s){case "keyup":return KK.indexOf(c.keyCode)!==-1;case "keydown":return c.keyCode!==229;case "keypress":case "mousedown":case "focusout":return true;default:return false}}function D6(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var _u=false;function XK(s,c){switch(s){case "compositionend":return D6(c);case "keypress":return c.which!==32?null:(I6=true,P6);case "textInput":return s=c.data,s===P6&&I6?null:s;default:return null}}function QK(s,c){if(_u)return s==="compositionend"||!pS&&O6(s,c)?(s=E6(),kg=uS=Us=null,_u=false,s):null;switch(s){case "paste":return null;case "keypress":if(!(c.ctrlKey||c.altKey||c.metaKey)||c.ctrlKey&&c.altKey){if(c.char&&1<c.char.length)return c.char;if(c.which)return String.fromCharCode(c.which)}return null;case "compositionend":return N6&&c.locale!=="ko"?null:c.data;default:return null}}var ZK={color:true,date:true,datetime:true,"datetime-local":true,email:true,month:true,number:true,password:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true};function _6(s){var c=s&&s.nodeName&&s.nodeName.toLowerCase();return c==="input"?!!ZK[s.type]:c==="textarea"}function L6(s,c,h,v){Ou?Du?Du.push(v):Du=[v]:Ou=v,c=Iv(c,"onChange"),0<c.length&&(h=new Vg("onChange","change",null,h,v),s.push({event:h,listeners:c}));}var am=null,sm=null;function JK(s){b4(s,0);}function Ug(s){var c=lr(s);if(Au(c))return s}function z6(s,c){if(s==="change")return c}var B6=false;if(Ja){var gS;if(Ja){var vS="oninput"in document;if(!vS){var k6=document.createElement("div");k6.setAttribute("oninput","return;"),vS=typeof k6.oninput=="function";}gS=vS;}else gS=false;B6=gS&&(!document.documentMode||9<document.documentMode);}function F6(){am&&(am.detachEvent("onpropertychange",H6),sm=am=null);}function H6(s){if(s.propertyName==="value"&&Ug(sm)){var c=[];L6(c,sm,s,sS(s)),$6(JK,c);}}function eY(s,c,h){s==="focusin"?(F6(),am=c,sm=h,am.attachEvent("onpropertychange",H6)):s==="focusout"&&F6();}function tY(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return Ug(sm)}function nY(s,c){if(s==="click")return Ug(c)}function rY(s,c){if(s==="input"||s==="change")return Ug(c)}function oY(s,c){return s===c&&(s!==0||1/s===1/c)||s!==s&&c!==c}var ti=typeof Object.is=="function"?Object.is:oY;function lm(s,c){if(ti(s,c))return true;if(typeof s!="object"||s===null||typeof c!="object"||c===null)return false;var h=Object.keys(s),v=Object.keys(c);if(h.length!==v.length)return false;for(v=0;v<h.length;v++){var E=h[v];if(!Be.call(c,E)||!ti(s[E],c[E]))return false}return true}function V6(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function j6(s,c){var h=V6(s);s=0;for(var v;h;){if(h.nodeType===3){if(v=s+h.textContent.length,s<=c&&v>=c)return {node:h,offset:c-s};s=v;}e:{for(;h;){if(h.nextSibling){h=h.nextSibling;break e}h=h.parentNode;}h=void 0;}h=V6(h);}}function U6(s,c){return s&&c?s===c?true:s&&s.nodeType===3?false:c&&c.nodeType===3?U6(s,c.parentNode):"contains"in s?s.contains(c):s.compareDocumentPosition?!!(s.compareDocumentPosition(c)&16):false:false}function q6(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var c=Nu(s.document);c instanceof s.HTMLIFrameElement;){try{var h=typeof c.contentWindow.location.href=="string";}catch{h=false;}if(h)s=c.contentWindow;else break;c=Nu(s.document);}return c}function bS(s){var c=s&&s.nodeName&&s.nodeName.toLowerCase();return c&&(c==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||c==="textarea"||s.contentEditable==="true")}var iY=Ja&&"documentMode"in document&&11>=document.documentMode,Lu=null,yS=null,cm=null,SS=false;function W6(s,c,h){var v=h.window===h?h.document:h.nodeType===9?h:h.ownerDocument;SS||Lu==null||Lu!==Nu(v)||(v=Lu,"selectionStart"in v&&bS(v)?v={start:v.selectionStart,end:v.selectionEnd}:(v=(v.ownerDocument&&v.ownerDocument.defaultView||window).getSelection(),v={anchorNode:v.anchorNode,anchorOffset:v.anchorOffset,focusNode:v.focusNode,focusOffset:v.focusOffset}),cm&&lm(cm,v)||(cm=v,v=Iv(yS,"onSelect"),0<v.length&&(c=new Vg("onSelect","select",null,c,h),s.push({event:c,listeners:v}),c.target=Lu)));}function uc(s,c){var h={};return h[s.toLowerCase()]=c.toLowerCase(),h["Webkit"+s]="webkit"+c,h["Moz"+s]="moz"+c,h}var zu={animationend:uc("Animation","AnimationEnd"),animationiteration:uc("Animation","AnimationIteration"),animationstart:uc("Animation","AnimationStart"),transitionrun:uc("Transition","TransitionRun"),transitionstart:uc("Transition","TransitionStart"),transitioncancel:uc("Transition","TransitionCancel"),transitionend:uc("Transition","TransitionEnd")},CS={},G6={};Ja&&(G6=document.createElement("div").style,"AnimationEvent"in window||(delete zu.animationend.animation,delete zu.animationiteration.animation,delete zu.animationstart.animation),"TransitionEvent"in window||delete zu.transitionend.transition);function dc(s){if(CS[s])return CS[s];if(!zu[s])return s;var c=zu[s],h;for(h in c)if(c.hasOwnProperty(h)&&h in G6)return CS[s]=c[h];return s}var K6=dc("animationend"),Y6=dc("animationiteration"),X6=dc("animationstart"),aY=dc("transitionrun"),sY=dc("transitionstart"),lY=dc("transitioncancel"),Q6=dc("transitionend"),Z6=new Map,xS="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");xS.push("scrollEnd");function Ji(s,c){Z6.set(s,c),xo(c,[s]);}var qg=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var c=new window.ErrorEvent("error",{bubbles:true,cancelable:true,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(c))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s);},Ri=[],Bu=0,wS=0;function Wg(){for(var s=Bu,c=wS=Bu=0;c<s;){var h=Ri[c];Ri[c++]=null;var v=Ri[c];Ri[c++]=null;var E=Ri[c];Ri[c++]=null;var A=Ri[c];if(Ri[c++]=null,v!==null&&E!==null){var k=v.pending;k===null?E.next=E:(E.next=k.next,k.next=E),v.pending=E;}A!==0&&J6(h,E,A);}}function Gg(s,c,h,v){Ri[Bu++]=s,Ri[Bu++]=c,Ri[Bu++]=h,Ri[Bu++]=v,wS|=v,s.lanes|=v,s=s.alternate,s!==null&&(s.lanes|=v);}function $S(s,c,h,v){return Gg(s,c,h,v),Kg(s)}function fc(s,c){return Gg(s,null,null,c),Kg(s)}function J6(s,c,h){s.lanes|=h;var v=s.alternate;v!==null&&(v.lanes|=h);for(var E=false,A=s.return;A!==null;)A.childLanes|=h,v=A.alternate,v!==null&&(v.childLanes|=h),A.tag===22&&(s=A.stateNode,s===null||s._visibility&1||(E=true)),s=A,A=A.return;return s.tag===3?(A=s.stateNode,E&&c!==null&&(E=31-lt(h),s=A.hiddenUpdates,v=s[E],v===null?s[E]=[c]:v.push(c),c.lane=h|536870912),A):null}function Kg(s){if(50<Pm)throw Pm=0,OC=null,Error(r(185));for(var c=s.return;c!==null;)s=c,c=s.return;return s.tag===3?s.stateNode:null}var ku={};function cY(s,c,h,v){this.tag=s,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=c,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=v,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null;}function ni(s,c,h,v){return new cY(s,c,h,v)}function ES(s){return s=s.prototype,!(!s||!s.isReactComponent)}function es(s,c){var h=s.alternate;return h===null?(h=ni(s.tag,c,s.key,s.mode),h.elementType=s.elementType,h.type=s.type,h.stateNode=s.stateNode,h.alternate=s,s.alternate=h):(h.pendingProps=c,h.type=s.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=s.flags&65011712,h.childLanes=s.childLanes,h.lanes=s.lanes,h.child=s.child,h.memoizedProps=s.memoizedProps,h.memoizedState=s.memoizedState,h.updateQueue=s.updateQueue,c=s.dependencies,h.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},h.sibling=s.sibling,h.index=s.index,h.ref=s.ref,h.refCleanup=s.refCleanup,h}function eN(s,c){s.flags&=65011714;var h=s.alternate;return h===null?(s.childLanes=0,s.lanes=c,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=h.childLanes,s.lanes=h.lanes,s.child=h.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=h.memoizedProps,s.memoizedState=h.memoizedState,s.updateQueue=h.updateQueue,s.type=h.type,c=h.dependencies,s.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext}),s}function Yg(s,c,h,v,E,A){var k=0;if(v=s,typeof s=="function")ES(s)&&(k=1);else if(typeof s=="string")k=hX(s,h,ee.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case O:return s=ni(31,h,c,E),s.elementType=O,s.lanes=A,s;case S:return mc(h.children,E,A,c);case C:k=8,E|=24;break;case w:return s=ni(12,h,c,E|2),s.elementType=w,s.lanes=A,s;case R:return s=ni(13,h,c,E),s.elementType=R,s.lanes=A,s;case I:return s=ni(19,h,c,E),s.elementType=I,s.lanes=A,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case M:k=10;break e;case $:k=9;break e;case T:k=11;break e;case N:k=14;break e;case P:k=16,v=null;break e}k=29,h=Error(r(130,s===null?"null":typeof s,"")),v=null;}return c=ni(k,h,c,E),c.elementType=s,c.type=v,c.lanes=A,c}function mc(s,c,h,v){return s=ni(7,s,v,c),s.lanes=h,s}function MS(s,c,h){return s=ni(6,s,null,c),s.lanes=h,s}function tN(s){var c=ni(18,null,null,0);return c.stateNode=s,c}function RS(s,c,h){return c=ni(4,s.children!==null?s.children:[],s.key,c),c.lanes=h,c.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},c}var nN=new WeakMap;function Ti(s,c){if(typeof s=="object"&&s!==null){var h=nN.get(s);return h!==void 0?h:(c={value:s,source:c,stack:ye(c)},nN.set(s,c),c)}return {value:s,source:c,stack:ye(c)}}var Fu=[],Hu=0,Xg=null,um=0,Ai=[],Ni=0,qs=null,Ta=1,Aa="";function ts(s,c){Fu[Hu++]=um,Fu[Hu++]=Xg,Xg=s,um=c;}function rN(s,c,h){Ai[Ni++]=Ta,Ai[Ni++]=Aa,Ai[Ni++]=qs,qs=s;var v=Ta;s=Aa;var E=32-lt(v)-1;v&=~(1<<E),h+=1;var A=32-lt(c)+E;if(30<A){var k=E-E%5;A=(v&(1<<k)-1).toString(32),v>>=k,E-=k,Ta=1<<32-lt(c)+E|h<<E|v,Aa=A+s;}else Ta=1<<A|h<<E|v,Aa=s;}function TS(s){s.return!==null&&(ts(s,1),rN(s,1,0));}function AS(s){for(;s===Xg;)Xg=Fu[--Hu],Fu[Hu]=null,um=Fu[--Hu],Fu[Hu]=null;for(;s===qs;)qs=Ai[--Ni],Ai[Ni]=null,Aa=Ai[--Ni],Ai[Ni]=null,Ta=Ai[--Ni],Ai[Ni]=null;}function oN(s,c){Ai[Ni++]=Ta,Ai[Ni++]=Aa,Ai[Ni++]=qs,Ta=c.id,Aa=c.overflow,qs=s;}var jr=null,Un=null,fn=false,Ws=null,Pi=false,NS=Error(r(519));function Gs(s){var c=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw dm(Ti(c,s)),NS}function iN(s){var c=s.stateNode,h=s.type,v=s.memoizedProps;switch(c[Bt]=s,c[En]=v,h){case "dialog":nn("cancel",c),nn("close",c);break;case "iframe":case "object":case "embed":nn("load",c);break;case "video":case "audio":for(h=0;h<Om.length;h++)nn(Om[h],c);break;case "source":nn("error",c);break;case "img":case "image":case "link":nn("error",c),nn("load",c);break;case "details":nn("toggle",c);break;case "input":nn("invalid",c),Lg(c,v.value,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name,true);break;case "select":nn("invalid",c);break;case "textarea":nn("invalid",c),S6(c,v.value,v.defaultValue,v.children);}h=v.children,typeof h!="string"&&typeof h!="number"&&typeof h!="bigint"||c.textContent===""+h||v.suppressHydrationWarning===true||x4(c.textContent,h)?(v.popover!=null&&(nn("beforetoggle",c),nn("toggle",c)),v.onScroll!=null&&nn("scroll",c),v.onScrollEnd!=null&&nn("scrollend",c),v.onClick!=null&&(c.onclick=Za),c=true):c=false,c||Gs(s,true);}function aN(s){for(jr=s.return;jr;)switch(jr.tag){case 5:case 31:case 13:Pi=false;return;case 27:case 3:Pi=true;return;default:jr=jr.return;}}function Vu(s){if(s!==jr)return false;if(!fn)return aN(s),fn=true,false;var c=s.tag,h;if((h=c!==3&&c!==27)&&((h=c===5)&&(h=s.type,h=!(h!=="form"&&h!=="button")||KC(s.type,s.memoizedProps)),h=!h),h&&Un&&Gs(s),aN(s),c===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));Un=P4(s);}else if(c===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));Un=P4(s);}else c===27?(c=Un,sl(s.type)?(s=JC,JC=null,Un=s):Un=c):Un=jr?Oi(s.stateNode.nextSibling):null;return true}function hc(){Un=jr=null,fn=false;}function PS(){var s=Ws;return s!==null&&(Ho===null?Ho=s:Ho.push.apply(Ho,s),Ws=null),s}function dm(s){Ws===null?Ws=[s]:Ws.push(s);}var IS=D(null),pc=null,ns=null;function Ks(s,c,h){Y(IS,c._currentValue),c._currentValue=h;}function rs(s){s._currentValue=IS.current,z(IS);}function OS(s,c,h){for(;s!==null;){var v=s.alternate;if((s.childLanes&c)!==c?(s.childLanes|=c,v!==null&&(v.childLanes|=c)):v!==null&&(v.childLanes&c)!==c&&(v.childLanes|=c),s===h)break;s=s.return;}}function DS(s,c,h,v){var E=s.child;for(E!==null&&(E.return=s);E!==null;){var A=E.dependencies;if(A!==null){var k=E.child;A=A.firstContext;e:for(;A!==null;){var Z=A;A=E;for(var ce=0;ce<c.length;ce++)if(Z.context===c[ce]){A.lanes|=h,Z=A.alternate,Z!==null&&(Z.lanes|=h),OS(A.return,h,s),v||(k=null);break e}A=Z.next;}}else if(E.tag===18){if(k=E.return,k===null)throw Error(r(341));k.lanes|=h,A=k.alternate,A!==null&&(A.lanes|=h),OS(k,h,s),k=null;}else k=E.child;if(k!==null)k.return=E;else for(k=E;k!==null;){if(k===s){k=null;break}if(E=k.sibling,E!==null){E.return=k.return,k=E;break}k=k.return;}E=k;}}function ju(s,c,h,v){s=null;for(var E=c,A=false;E!==null;){if(!A){if((E.flags&524288)!==0)A=true;else if((E.flags&262144)!==0)break}if(E.tag===10){var k=E.alternate;if(k===null)throw Error(r(387));if(k=k.memoizedProps,k!==null){var Z=E.type;ti(E.pendingProps.value,k.value)||(s!==null?s.push(Z):s=[Z]);}}else if(E===ne.current){if(k=E.alternate,k===null)throw Error(r(387));k.memoizedState.memoizedState!==E.memoizedState.memoizedState&&(s!==null?s.push(Bm):s=[Bm]);}E=E.return;}s!==null&&DS(c,s,h,v),c.flags|=262144;}function Qg(s){for(s=s.firstContext;s!==null;){if(!ti(s.context._currentValue,s.memoizedValue))return true;s=s.next;}return false}function gc(s){pc=s,ns=null,s=s.dependencies,s!==null&&(s.firstContext=null);}function Ur(s){return sN(pc,s)}function Zg(s,c){return pc===null&&gc(s),sN(s,c)}function sN(s,c){var h=c._currentValue;if(c={context:c,memoizedValue:h,next:null},ns===null){if(s===null)throw Error(r(308));ns=c,s.dependencies={lanes:0,firstContext:c},s.flags|=524288;}else ns=ns.next=c;return h}var uY=typeof AbortController<"u"?AbortController:function(){var s=[],c=this.signal={aborted:false,addEventListener:function(h,v){s.push(v);}};this.abort=function(){c.aborted=true,s.forEach(function(h){return h()});};},dY=e.unstable_scheduleCallback,fY=e.unstable_NormalPriority,hr={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function _S(){return {controller:new uY,data:new Map,refCount:0}}function fm(s){s.refCount--,s.refCount===0&&dY(fY,function(){s.controller.abort();});}var mm=null,LS=0,Uu=0,qu=null;function mY(s,c){if(mm===null){var h=mm=[];LS=0,Uu=kC(),qu={status:"pending",value:void 0,then:function(v){h.push(v);}};}return LS++,c.then(lN,lN),c}function lN(){if(--LS===0&&mm!==null){qu!==null&&(qu.status="fulfilled");var s=mm;mm=null,Uu=0,qu=null;for(var c=0;c<s.length;c++)(0, s[c])();}}function hY(s,c){var h=[],v={status:"pending",value:null,reason:null,then:function(E){h.push(E);}};return s.then(function(){v.status="fulfilled",v.value=c;for(var E=0;E<h.length;E++)(0, h[E])(c);},function(E){for(v.status="rejected",v.reason=E,E=0;E<h.length;E++)(0, h[E])(void 0);}),v}var cN=B.S;B.S=function(s,c){WP=Re(),typeof c=="object"&&c!==null&&typeof c.then=="function"&&mY(s,c),cN!==null&&cN(s,c);};var vc=D(null);function zS(){var s=vc.current;return s!==null?s:Fn.pooledCache}function Jg(s,c){c===null?Y(vc,vc.current):Y(vc,c.pool);}function uN(){var s=zS();return s===null?null:{parent:hr._currentValue,pool:s}}var Wu=Error(r(460)),BS=Error(r(474)),ev=Error(r(542)),tv={then:function(){}};function dN(s){return s=s.status,s==="fulfilled"||s==="rejected"}function fN(s,c,h){switch(h=s[h],h===void 0?s.push(c):h!==c&&(c.then(Za,Za),c=h),c.status){case "fulfilled":return c.value;case "rejected":throw s=c.reason,hN(s),s;default:if(typeof c.status=="string")c.then(Za,Za);else {if(s=Fn,s!==null&&100<s.shellSuspendCounter)throw Error(r(482));s=c,s.status="pending",s.then(function(v){if(c.status==="pending"){var E=c;E.status="fulfilled",E.value=v;}},function(v){if(c.status==="pending"){var E=c;E.status="rejected",E.reason=v;}});}switch(c.status){case "fulfilled":return c.value;case "rejected":throw s=c.reason,hN(s),s}throw yc=c,Wu}}function bc(s){try{var c=s._init;return c(s._payload)}catch(h){throw h!==null&&typeof h=="object"&&typeof h.then=="function"?(yc=h,Wu):h}}var yc=null;function mN(){if(yc===null)throw Error(r(459));var s=yc;return yc=null,s}function hN(s){if(s===Wu||s===ev)throw Error(r(483))}var Gu=null,hm=0;function nv(s){var c=hm;return hm+=1,Gu===null&&(Gu=[]),fN(Gu,s,c)}function pm(s,c){c=c.props.ref,s.ref=c!==void 0?c:null;}function rv(s,c){throw c.$$typeof===g?Error(r(525)):(s=Object.prototype.toString.call(c),Error(r(31,s==="[object Object]"?"object with keys {"+Object.keys(c).join(", ")+"}":s)))}function pN(s){function c(pe,me){if(s){var xe=pe.deletions;xe===null?(pe.deletions=[me],pe.flags|=16):xe.push(me);}}function h(pe,me){if(!s)return null;for(;me!==null;)c(pe,me),me=me.sibling;return null}function v(pe){for(var me=new Map;pe!==null;)pe.key!==null?me.set(pe.key,pe):me.set(pe.index,pe),pe=pe.sibling;return me}function E(pe,me){return pe=es(pe,me),pe.index=0,pe.sibling=null,pe}function A(pe,me,xe){return pe.index=xe,s?(xe=pe.alternate,xe!==null?(xe=xe.index,xe<me?(pe.flags|=67108866,me):xe):(pe.flags|=67108866,me)):(pe.flags|=1048576,me)}function k(pe){return s&&pe.alternate===null&&(pe.flags|=67108866),pe}function Z(pe,me,xe,Fe){return me===null||me.tag!==6?(me=MS(xe,pe.mode,Fe),me.return=pe,me):(me=E(me,xe),me.return=pe,me)}function ce(pe,me,xe,Fe){var $t=xe.type;return $t===S?De(pe,me,xe.props.children,Fe,xe.key):me!==null&&(me.elementType===$t||typeof $t=="object"&&$t!==null&&$t.$$typeof===P&&bc($t)===me.type)?(me=E(me,xe.props),pm(me,xe),me.return=pe,me):(me=Yg(xe.type,xe.key,xe.props,null,pe.mode,Fe),pm(me,xe),me.return=pe,me)}function $e(pe,me,xe,Fe){return me===null||me.tag!==4||me.stateNode.containerInfo!==xe.containerInfo||me.stateNode.implementation!==xe.implementation?(me=RS(xe,pe.mode,Fe),me.return=pe,me):(me=E(me,xe.children||[]),me.return=pe,me)}function De(pe,me,xe,Fe,$t){return me===null||me.tag!==7?(me=mc(xe,pe.mode,Fe,$t),me.return=pe,me):(me=E(me,xe),me.return=pe,me)}function Ve(pe,me,xe){if(typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint")return me=MS(""+me,pe.mode,xe),me.return=pe,me;if(typeof me=="object"&&me!==null){switch(me.$$typeof){case b:return xe=Yg(me.type,me.key,me.props,null,pe.mode,xe),pm(xe,me),xe.return=pe,xe;case y:return me=RS(me,pe.mode,xe),me.return=pe,me;case P:return me=bc(me),Ve(pe,me,xe)}if(V(me)||j(me))return me=mc(me,pe.mode,xe,null),me.return=pe,me;if(typeof me.then=="function")return Ve(pe,nv(me),xe);if(me.$$typeof===M)return Ve(pe,Zg(pe,me),xe);rv(pe,me);}return null}function Me(pe,me,xe,Fe){var $t=me!==null?me.key:null;if(typeof xe=="string"&&xe!==""||typeof xe=="number"||typeof xe=="bigint")return $t!==null?null:Z(pe,me,""+xe,Fe);if(typeof xe=="object"&&xe!==null){switch(xe.$$typeof){case b:return xe.key===$t?ce(pe,me,xe,Fe):null;case y:return xe.key===$t?$e(pe,me,xe,Fe):null;case P:return xe=bc(xe),Me(pe,me,xe,Fe)}if(V(xe)||j(xe))return $t!==null?null:De(pe,me,xe,Fe,null);if(typeof xe.then=="function")return Me(pe,me,nv(xe),Fe);if(xe.$$typeof===M)return Me(pe,me,Zg(pe,xe),Fe);rv(pe,xe);}return null}function Ae(pe,me,xe,Fe,$t){if(typeof Fe=="string"&&Fe!==""||typeof Fe=="number"||typeof Fe=="bigint")return pe=pe.get(xe)||null,Z(me,pe,""+Fe,$t);if(typeof Fe=="object"&&Fe!==null){switch(Fe.$$typeof){case b:return pe=pe.get(Fe.key===null?xe:Fe.key)||null,ce(me,pe,Fe,$t);case y:return pe=pe.get(Fe.key===null?xe:Fe.key)||null,$e(me,pe,Fe,$t);case P:return Fe=bc(Fe),Ae(pe,me,xe,Fe,$t)}if(V(Fe)||j(Fe))return pe=pe.get(xe)||null,De(me,pe,Fe,$t,null);if(typeof Fe.then=="function")return Ae(pe,me,xe,nv(Fe),$t);if(Fe.$$typeof===M)return Ae(pe,me,xe,Zg(me,Fe),$t);rv(me,Fe);}return null}function pt(pe,me,xe,Fe){for(var $t=null,vn=null,yt=me,Kt=me=0,an=null;yt!==null&&Kt<xe.length;Kt++){yt.index>Kt?(an=yt,yt=null):an=yt.sibling;var bn=Me(pe,yt,xe[Kt],Fe);if(bn===null){yt===null&&(yt=an);break}s&&yt&&bn.alternate===null&&c(pe,yt),me=A(bn,me,Kt),vn===null?$t=bn:vn.sibling=bn,vn=bn,yt=an;}if(Kt===xe.length)return h(pe,yt),fn&&ts(pe,Kt),$t;if(yt===null){for(;Kt<xe.length;Kt++)yt=Ve(pe,xe[Kt],Fe),yt!==null&&(me=A(yt,me,Kt),vn===null?$t=yt:vn.sibling=yt,vn=yt);return fn&&ts(pe,Kt),$t}for(yt=v(yt);Kt<xe.length;Kt++)an=Ae(yt,pe,Kt,xe[Kt],Fe),an!==null&&(s&&an.alternate!==null&&yt.delete(an.key===null?Kt:an.key),me=A(an,me,Kt),vn===null?$t=an:vn.sibling=an,vn=an);return s&&yt.forEach(function(fl){return c(pe,fl)}),fn&&ts(pe,Kt),$t}function Nt(pe,me,xe,Fe){if(xe==null)throw Error(r(151));for(var $t=null,vn=null,yt=me,Kt=me=0,an=null,bn=xe.next();yt!==null&&!bn.done;Kt++,bn=xe.next()){yt.index>Kt?(an=yt,yt=null):an=yt.sibling;var fl=Me(pe,yt,bn.value,Fe);if(fl===null){yt===null&&(yt=an);break}s&&yt&&fl.alternate===null&&c(pe,yt),me=A(fl,me,Kt),vn===null?$t=fl:vn.sibling=fl,vn=fl,yt=an;}if(bn.done)return h(pe,yt),fn&&ts(pe,Kt),$t;if(yt===null){for(;!bn.done;Kt++,bn=xe.next())bn=Ve(pe,bn.value,Fe),bn!==null&&(me=A(bn,me,Kt),vn===null?$t=bn:vn.sibling=bn,vn=bn);return fn&&ts(pe,Kt),$t}for(yt=v(yt);!bn.done;Kt++,bn=xe.next())bn=Ae(yt,pe,Kt,bn.value,Fe),bn!==null&&(s&&bn.alternate!==null&&yt.delete(bn.key===null?Kt:bn.key),me=A(bn,me,Kt),vn===null?$t=bn:vn.sibling=bn,vn=bn);return s&&yt.forEach(function(EX){return c(pe,EX)}),fn&&ts(pe,Kt),$t}function _n(pe,me,xe,Fe){if(typeof xe=="object"&&xe!==null&&xe.type===S&&xe.key===null&&(xe=xe.props.children),typeof xe=="object"&&xe!==null){switch(xe.$$typeof){case b:e:{for(var $t=xe.key;me!==null;){if(me.key===$t){if($t=xe.type,$t===S){if(me.tag===7){h(pe,me.sibling),Fe=E(me,xe.props.children),Fe.return=pe,pe=Fe;break e}}else if(me.elementType===$t||typeof $t=="object"&&$t!==null&&$t.$$typeof===P&&bc($t)===me.type){h(pe,me.sibling),Fe=E(me,xe.props),pm(Fe,xe),Fe.return=pe,pe=Fe;break e}h(pe,me);break}else c(pe,me);me=me.sibling;}xe.type===S?(Fe=mc(xe.props.children,pe.mode,Fe,xe.key),Fe.return=pe,pe=Fe):(Fe=Yg(xe.type,xe.key,xe.props,null,pe.mode,Fe),pm(Fe,xe),Fe.return=pe,pe=Fe);}return k(pe);case y:e:{for($t=xe.key;me!==null;){if(me.key===$t)if(me.tag===4&&me.stateNode.containerInfo===xe.containerInfo&&me.stateNode.implementation===xe.implementation){h(pe,me.sibling),Fe=E(me,xe.children||[]),Fe.return=pe,pe=Fe;break e}else {h(pe,me);break}else c(pe,me);me=me.sibling;}Fe=RS(xe,pe.mode,Fe),Fe.return=pe,pe=Fe;}return k(pe);case P:return xe=bc(xe),_n(pe,me,xe,Fe)}if(V(xe))return pt(pe,me,xe,Fe);if(j(xe)){if($t=j(xe),typeof $t!="function")throw Error(r(150));return xe=$t.call(xe),Nt(pe,me,xe,Fe)}if(typeof xe.then=="function")return _n(pe,me,nv(xe),Fe);if(xe.$$typeof===M)return _n(pe,me,Zg(pe,xe),Fe);rv(pe,xe);}return typeof xe=="string"&&xe!==""||typeof xe=="number"||typeof xe=="bigint"?(xe=""+xe,me!==null&&me.tag===6?(h(pe,me.sibling),Fe=E(me,xe),Fe.return=pe,pe=Fe):(h(pe,me),Fe=MS(xe,pe.mode,Fe),Fe.return=pe,pe=Fe),k(pe)):h(pe,me)}return function(pe,me,xe,Fe){try{hm=0;var $t=_n(pe,me,xe,Fe);return Gu=null,$t}catch(yt){if(yt===Wu||yt===ev)throw yt;var vn=ni(29,yt,null,pe.mode);return vn.lanes=Fe,vn.return=pe,vn}}}var Sc=pN(true),gN=pN(false),Ys=false;function kS(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null};}function FS(s,c){s=s.updateQueue,c.updateQueue===s&&(c.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null});}function Xs(s){return {lane:s,tag:0,payload:null,callback:null,next:null}}function Qs(s,c,h){var v=s.updateQueue;if(v===null)return null;if(v=v.shared,(Sn&2)!==0){var E=v.pending;return E===null?c.next=c:(c.next=E.next,E.next=c),v.pending=c,c=Kg(s),J6(s,null,h),c}return Gg(s,v,c,h),Kg(s)}function gm(s,c,h){if(c=c.updateQueue,c!==null&&(c=c.shared,(h&4194048)!==0)){var v=c.lanes;v&=s.pendingLanes,h|=v,c.lanes=h,we(s,h);}}function HS(s,c){var h=s.updateQueue,v=s.alternate;if(v!==null&&(v=v.updateQueue,h===v)){var E=null,A=null;if(h=h.firstBaseUpdate,h!==null){do{var k={lane:h.lane,tag:h.tag,payload:h.payload,callback:null,next:null};A===null?E=A=k:A=A.next=k,h=h.next;}while(h!==null);A===null?E=A=c:A=A.next=c;}else E=A=c;h={baseState:v.baseState,firstBaseUpdate:E,lastBaseUpdate:A,shared:v.shared,callbacks:v.callbacks},s.updateQueue=h;return}s=h.lastBaseUpdate,s===null?h.firstBaseUpdate=c:s.next=c,h.lastBaseUpdate=c;}var VS=false;function vm(){if(VS){var s=qu;if(s!==null)throw s}}function bm(s,c,h,v){VS=false;var E=s.updateQueue;Ys=false;var A=E.firstBaseUpdate,k=E.lastBaseUpdate,Z=E.shared.pending;if(Z!==null){E.shared.pending=null;var ce=Z,$e=ce.next;ce.next=null,k===null?A=$e:k.next=$e,k=ce;var De=s.alternate;De!==null&&(De=De.updateQueue,Z=De.lastBaseUpdate,Z!==k&&(Z===null?De.firstBaseUpdate=$e:Z.next=$e,De.lastBaseUpdate=ce));}if(A!==null){var Ve=E.baseState;k=0,De=$e=ce=null,Z=A;do{var Me=Z.lane&-536870913,Ae=Me!==Z.lane;if(Ae?(on&Me)===Me:(v&Me)===Me){Me!==0&&Me===Uu&&(VS=true),De!==null&&(De=De.next={lane:0,tag:Z.tag,payload:Z.payload,callback:null,next:null});e:{var pt=s,Nt=Z;Me=c;var _n=h;switch(Nt.tag){case 1:if(pt=Nt.payload,typeof pt=="function"){Ve=pt.call(_n,Ve,Me);break e}Ve=pt;break e;case 3:pt.flags=pt.flags&-65537|128;case 0:if(pt=Nt.payload,Me=typeof pt=="function"?pt.call(_n,Ve,Me):pt,Me==null)break e;Ve=p({},Ve,Me);break e;case 2:Ys=true;}}Me=Z.callback,Me!==null&&(s.flags|=64,Ae&&(s.flags|=8192),Ae=E.callbacks,Ae===null?E.callbacks=[Me]:Ae.push(Me));}else Ae={lane:Me,tag:Z.tag,payload:Z.payload,callback:Z.callback,next:null},De===null?($e=De=Ae,ce=Ve):De=De.next=Ae,k|=Me;if(Z=Z.next,Z===null){if(Z=E.shared.pending,Z===null)break;Ae=Z,Z=Ae.next,Ae.next=null,E.lastBaseUpdate=Ae,E.shared.pending=null;}}while(true);De===null&&(ce=Ve),E.baseState=ce,E.firstBaseUpdate=$e,E.lastBaseUpdate=De,A===null&&(E.shared.lanes=0),nl|=k,s.lanes=k,s.memoizedState=Ve;}}function vN(s,c){if(typeof s!="function")throw Error(r(191,s));s.call(c);}function bN(s,c){var h=s.callbacks;if(h!==null)for(s.callbacks=null,s=0;s<h.length;s++)vN(h[s],c);}var Ku=D(null),ov=D(0);function yN(s,c){s=fs,Y(ov,s),Y(Ku,c),fs=s|c.baseLanes;}function jS(){Y(ov,fs),Y(Ku,Ku.current);}function US(){fs=ov.current,z(Ku),z(ov);}var ri=D(null),Ii=null;function Zs(s){var c=s.alternate;Y(cr,cr.current&1),Y(ri,s),Ii===null&&(c===null||Ku.current!==null||c.memoizedState!==null)&&(Ii=s);}function qS(s){Y(cr,cr.current),Y(ri,s),Ii===null&&(Ii=s);}function SN(s){s.tag===22?(Y(cr,cr.current),Y(ri,s),Ii===null&&(Ii=s)):Js();}function Js(){Y(cr,cr.current),Y(ri,ri.current);}function oi(s){z(ri),Ii===s&&(Ii=null),z(cr);}var cr=D(0);function iv(s){for(var c=s;c!==null;){if(c.tag===13){var h=c.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||QC(h)||ZC(h)))return c}else if(c.tag===19&&(c.memoizedProps.revealOrder==="forwards"||c.memoizedProps.revealOrder==="backwards"||c.memoizedProps.revealOrder==="unstable_legacy-backwards"||c.memoizedProps.revealOrder==="together")){if((c.flags&128)!==0)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return null;c=c.return;}c.sibling.return=c.return,c=c.sibling;}return null}var os=0,Wt=null,On=null,pr=null,av=false,Yu=false,Cc=false,sv=0,ym=0,Xu=null,pY=0;function er(){throw Error(r(321))}function WS(s,c){if(c===null)return false;for(var h=0;h<c.length&&h<s.length;h++)if(!ti(s[h],c[h]))return false;return true}function GS(s,c,h,v,E,A){return os=A,Wt=c,c.memoizedState=null,c.updateQueue=null,c.lanes=0,B.H=s===null||s.memoizedState===null?rP:lC,Cc=false,A=h(v,E),Cc=false,Yu&&(A=xN(c,h,v,E)),CN(s),A}function CN(s){B.H=xm;var c=On!==null&&On.next!==null;if(os=0,pr=On=Wt=null,av=false,ym=0,Xu=null,c)throw Error(r(300));s===null||gr||(s=s.dependencies,s!==null&&Qg(s)&&(gr=true));}function xN(s,c,h,v){Wt=s;var E=0;do{if(Yu&&(Xu=null),ym=0,Yu=false,25<=E)throw Error(r(301));if(E+=1,pr=On=null,s.updateQueue!=null){var A=s.updateQueue;A.lastEffect=null,A.events=null,A.stores=null,A.memoCache!=null&&(A.memoCache.index=0);}B.H=oP,A=c(h,v);}while(Yu);return A}function gY(){var s=B.H,c=s.useState()[0];return c=typeof c.then=="function"?Sm(c):c,s=s.useState()[0],(On!==null?On.memoizedState:null)!==s&&(Wt.flags|=1024),c}function KS(){var s=sv!==0;return sv=0,s}function YS(s,c,h){c.updateQueue=s.updateQueue,c.flags&=-2053,s.lanes&=~h;}function XS(s){if(av){for(s=s.memoizedState;s!==null;){var c=s.queue;c!==null&&(c.pending=null),s=s.next;}av=false;}os=0,pr=On=Wt=null,Yu=false,ym=sv=0,Xu=null;}function wo(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pr===null?Wt.memoizedState=pr=s:pr=pr.next=s,pr}function ur(){if(On===null){var s=Wt.alternate;s=s!==null?s.memoizedState:null;}else s=On.next;var c=pr===null?Wt.memoizedState:pr.next;if(c!==null)pr=c,On=s;else {if(s===null)throw Wt.alternate===null?Error(r(467)):Error(r(310));On=s,s={memoizedState:On.memoizedState,baseState:On.baseState,baseQueue:On.baseQueue,queue:On.queue,next:null},pr===null?Wt.memoizedState=pr=s:pr=pr.next=s;}return pr}function lv(){return {lastEffect:null,events:null,stores:null,memoCache:null}}function Sm(s){var c=ym;return ym+=1,Xu===null&&(Xu=[]),s=fN(Xu,s,c),c=Wt,(pr===null?c.memoizedState:pr.next)===null&&(c=c.alternate,B.H=c===null||c.memoizedState===null?rP:lC),s}function cv(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return Sm(s);if(s.$$typeof===M)return Ur(s)}throw Error(r(438,String(s)))}function QS(s){var c=null,h=Wt.updateQueue;if(h!==null&&(c=h.memoCache),c==null){var v=Wt.alternate;v!==null&&(v=v.updateQueue,v!==null&&(v=v.memoCache,v!=null&&(c={data:v.data.map(function(E){return E.slice()}),index:0})));}if(c==null&&(c={data:[],index:0}),h===null&&(h=lv(),Wt.updateQueue=h),h.memoCache=c,h=c.data[c.index],h===void 0)for(h=c.data[c.index]=Array(s),v=0;v<s;v++)h[v]=_;return c.index++,h}function is(s,c){return typeof c=="function"?c(s):c}function uv(s){var c=ur();return ZS(c,On,s)}function ZS(s,c,h){var v=s.queue;if(v===null)throw Error(r(311));v.lastRenderedReducer=h;var E=s.baseQueue,A=v.pending;if(A!==null){if(E!==null){var k=E.next;E.next=A.next,A.next=k;}c.baseQueue=E=A,v.pending=null;}if(A=s.baseState,E===null)s.memoizedState=A;else {c=E.next;var Z=k=null,ce=null,$e=c,De=false;do{var Ve=$e.lane&-536870913;if(Ve!==$e.lane?(on&Ve)===Ve:(os&Ve)===Ve){var Me=$e.revertLane;if(Me===0)ce!==null&&(ce=ce.next={lane:0,revertLane:0,gesture:null,action:$e.action,hasEagerState:$e.hasEagerState,eagerState:$e.eagerState,next:null}),Ve===Uu&&(De=true);else if((os&Me)===Me){$e=$e.next,Me===Uu&&(De=true);continue}else Ve={lane:0,revertLane:$e.revertLane,gesture:null,action:$e.action,hasEagerState:$e.hasEagerState,eagerState:$e.eagerState,next:null},ce===null?(Z=ce=Ve,k=A):ce=ce.next=Ve,Wt.lanes|=Me,nl|=Me;Ve=$e.action,Cc&&h(A,Ve),A=$e.hasEagerState?$e.eagerState:h(A,Ve);}else Me={lane:Ve,revertLane:$e.revertLane,gesture:$e.gesture,action:$e.action,hasEagerState:$e.hasEagerState,eagerState:$e.eagerState,next:null},ce===null?(Z=ce=Me,k=A):ce=ce.next=Me,Wt.lanes|=Ve,nl|=Ve;$e=$e.next;}while($e!==null&&$e!==c);if(ce===null?k=A:ce.next=Z,!ti(A,s.memoizedState)&&(gr=true,De&&(h=qu,h!==null)))throw h;s.memoizedState=A,s.baseState=k,s.baseQueue=ce,v.lastRenderedState=A;}return E===null&&(v.lanes=0),[s.memoizedState,v.dispatch]}function JS(s){var c=ur(),h=c.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=s;var v=h.dispatch,E=h.pending,A=c.memoizedState;if(E!==null){h.pending=null;var k=E=E.next;do A=s(A,k.action),k=k.next;while(k!==E);ti(A,c.memoizedState)||(gr=true),c.memoizedState=A,c.baseQueue===null&&(c.baseState=A),h.lastRenderedState=A;}return [A,v]}function wN(s,c,h){var v=Wt,E=ur(),A=fn;if(A){if(h===void 0)throw Error(r(407));h=h();}else h=c();var k=!ti((On||E).memoizedState,h);if(k&&(E.memoizedState=h,gr=true),E=E.queue,nC(MN.bind(null,v,E,s),[s]),E.getSnapshot!==c||k||pr!==null&&pr.memoizedState.tag&1){if(v.flags|=2048,Qu(9,{destroy:void 0},EN.bind(null,v,E,h,c),null),Fn===null)throw Error(r(349));A||(os&127)!==0||$N(v,c,h);}return h}function $N(s,c,h){s.flags|=16384,s={getSnapshot:c,value:h},c=Wt.updateQueue,c===null?(c=lv(),Wt.updateQueue=c,c.stores=[s]):(h=c.stores,h===null?c.stores=[s]:h.push(s));}function EN(s,c,h,v){c.value=h,c.getSnapshot=v,RN(c)&&TN(s);}function MN(s,c,h){return h(function(){RN(c)&&TN(s);})}function RN(s){var c=s.getSnapshot;s=s.value;try{var h=c();return !ti(s,h)}catch{return true}}function TN(s){var c=fc(s,2);c!==null&&Vo(c,s,2);}function eC(s){var c=wo();if(typeof s=="function"){var h=s;if(s=h(),Cc){ke(true);try{h();}finally{ke(false);}}}return c.memoizedState=c.baseState=s,c.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:s},c}function AN(s,c,h,v){return s.baseState=h,ZS(s,On,typeof v=="function"?v:is)}function vY(s,c,h,v,E){if(mv(s))throw Error(r(485));if(s=c.action,s!==null){var A={payload:E,action:s,next:null,isTransition:true,status:"pending",value:null,reason:null,listeners:[],then:function(k){A.listeners.push(k);}};B.T!==null?h(true):A.isTransition=false,v(A),h=c.pending,h===null?(A.next=c.pending=A,NN(c,A)):(A.next=h.next,c.pending=h.next=A);}}function NN(s,c){var h=c.action,v=c.payload,E=s.state;if(c.isTransition){var A=B.T,k={};B.T=k;try{var Z=h(E,v),ce=B.S;ce!==null&&ce(k,Z),PN(s,c,Z);}catch($e){tC(s,c,$e);}finally{A!==null&&k.types!==null&&(A.types=k.types),B.T=A;}}else try{A=h(E,v),PN(s,c,A);}catch($e){tC(s,c,$e);}}function PN(s,c,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(v){IN(s,c,v);},function(v){return tC(s,c,v)}):IN(s,c,h);}function IN(s,c,h){c.status="fulfilled",c.value=h,ON(c),s.state=h,c=s.pending,c!==null&&(h=c.next,h===c?s.pending=null:(h=h.next,c.next=h,NN(s,h)));}function tC(s,c,h){var v=s.pending;if(s.pending=null,v!==null){v=v.next;do c.status="rejected",c.reason=h,ON(c),c=c.next;while(c!==v)}s.action=null;}function ON(s){s=s.listeners;for(var c=0;c<s.length;c++)(0, s[c])();}function DN(s,c){return c}function _N(s,c){if(fn){var h=Fn.formState;if(h!==null){e:{var v=Wt;if(fn){if(Un){t:{for(var E=Un,A=Pi;E.nodeType!==8;){if(!A){E=null;break t}if(E=Oi(E.nextSibling),E===null){E=null;break t}}A=E.data,E=A==="F!"||A==="F"?E:null;}if(E){Un=Oi(E.nextSibling),v=E.data==="F!";break e}}Gs(v);}v=false;}v&&(c=h[0]);}}return h=wo(),h.memoizedState=h.baseState=c,v={pending:null,lanes:0,dispatch:null,lastRenderedReducer:DN,lastRenderedState:c},h.queue=v,h=eP.bind(null,Wt,v),v.dispatch=h,v=eC(false),A=sC.bind(null,Wt,false,v.queue),v=wo(),E={state:c,dispatch:null,action:s,pending:null},v.queue=E,h=vY.bind(null,Wt,E,A,h),E.dispatch=h,v.memoizedState=s,[c,h,false]}function LN(s){var c=ur();return zN(c,On,s)}function zN(s,c,h){if(c=ZS(s,c,DN)[0],s=uv(is)[0],typeof c=="object"&&c!==null&&typeof c.then=="function")try{var v=Sm(c);}catch(k){throw k===Wu?ev:k}else v=c;c=ur();var E=c.queue,A=E.dispatch;return h!==c.memoizedState&&(Wt.flags|=2048,Qu(9,{destroy:void 0},bY.bind(null,E,h),null)),[v,A,s]}function bY(s,c){s.action=c;}function BN(s){var c=ur(),h=On;if(h!==null)return zN(c,h,s);ur(),c=c.memoizedState,h=ur();var v=h.queue.dispatch;return h.memoizedState=s,[c,v,false]}function Qu(s,c,h,v){return s={tag:s,create:h,deps:v,inst:c,next:null},c=Wt.updateQueue,c===null&&(c=lv(),Wt.updateQueue=c),h=c.lastEffect,h===null?c.lastEffect=s.next=s:(v=h.next,h.next=s,s.next=v,c.lastEffect=s),s}function kN(){return ur().memoizedState}function dv(s,c,h,v){var E=wo();Wt.flags|=s,E.memoizedState=Qu(1|c,{destroy:void 0},h,v===void 0?null:v);}function fv(s,c,h,v){var E=ur();v=v===void 0?null:v;var A=E.memoizedState.inst;On!==null&&v!==null&&WS(v,On.memoizedState.deps)?E.memoizedState=Qu(c,A,h,v):(Wt.flags|=s,E.memoizedState=Qu(1|c,A,h,v));}function FN(s,c){dv(8390656,8,s,c);}function nC(s,c){fv(2048,8,s,c);}function yY(s){Wt.flags|=4;var c=Wt.updateQueue;if(c===null)c=lv(),Wt.updateQueue=c,c.events=[s];else {var h=c.events;h===null?c.events=[s]:h.push(s);}}function HN(s){var c=ur().memoizedState;return yY({ref:c,nextImpl:s}),function(){if((Sn&2)!==0)throw Error(r(440));return c.impl.apply(void 0,arguments)}}function VN(s,c){return fv(4,2,s,c)}function jN(s,c){return fv(4,4,s,c)}function UN(s,c){if(typeof c=="function"){s=s();var h=c(s);return function(){typeof h=="function"?h():c(null);}}if(c!=null)return s=s(),c.current=s,function(){c.current=null;}}function qN(s,c,h){h=h!=null?h.concat([s]):null,fv(4,4,UN.bind(null,c,s),h);}function rC(){}function WN(s,c){var h=ur();c=c===void 0?null:c;var v=h.memoizedState;return c!==null&&WS(c,v[1])?v[0]:(h.memoizedState=[s,c],s)}function GN(s,c){var h=ur();c=c===void 0?null:c;var v=h.memoizedState;if(c!==null&&WS(c,v[1]))return v[0];if(v=s(),Cc){ke(true);try{s();}finally{ke(false);}}return h.memoizedState=[v,c],v}function oC(s,c,h){return h===void 0||(os&1073741824)!==0&&(on&261930)===0?s.memoizedState=c:(s.memoizedState=h,s=KP(),Wt.lanes|=s,nl|=s,h)}function KN(s,c,h,v){return ti(h,c)?h:Ku.current!==null?(s=oC(s,h,v),ti(s,c)||(gr=true),s):(os&42)===0||(os&1073741824)!==0&&(on&261930)===0?(gr=true,s.memoizedState=h):(s=KP(),Wt.lanes|=s,nl|=s,c)}function YN(s,c,h,v,E){var A=F.p;F.p=A!==0&&8>A?A:8;var k=B.T,Z={};B.T=Z,sC(s,false,c,h);try{var ce=E(),$e=B.S;if($e!==null&&$e(Z,ce),ce!==null&&typeof ce=="object"&&typeof ce.then=="function"){var De=hY(ce,v);Cm(s,c,De,si(s));}else Cm(s,c,v,si(s));}catch(Ve){Cm(s,c,{then:function(){},status:"rejected",reason:Ve},si());}finally{F.p=A,k!==null&&Z.types!==null&&(k.types=Z.types),B.T=k;}}function SY(){}function iC(s,c,h,v){if(s.tag!==5)throw Error(r(476));var E=XN(s).queue;YN(s,E,c,W,h===null?SY:function(){return QN(s),h(v)});}function XN(s){var c=s.memoizedState;if(c!==null)return c;c={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:W},next:null};var h={};return c.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:h},next:null},s.memoizedState=c,s=s.alternate,s!==null&&(s.memoizedState=c),c}function QN(s){var c=XN(s);c.next===null&&(c=s.alternate.memoizedState),Cm(s,c.next.queue,{},si());}function aC(){return Ur(Bm)}function ZN(){return ur().memoizedState}function JN(){return ur().memoizedState}function CY(s){for(var c=s.return;c!==null;){switch(c.tag){case 24:case 3:var h=si();s=Xs(h);var v=Qs(c,s,h);v!==null&&(Vo(v,c,h),gm(v,c,h)),c={cache:_S()},s.payload=c;return}c=c.return;}}function xY(s,c,h){var v=si();h={lane:v,revertLane:0,gesture:null,action:h,hasEagerState:false,eagerState:null,next:null},mv(s)?tP(c,h):(h=$S(s,c,h,v),h!==null&&(Vo(h,s,v),nP(h,c,v)));}function eP(s,c,h){var v=si();Cm(s,c,h,v);}function Cm(s,c,h,v){var E={lane:v,revertLane:0,gesture:null,action:h,hasEagerState:false,eagerState:null,next:null};if(mv(s))tP(c,E);else {var A=s.alternate;if(s.lanes===0&&(A===null||A.lanes===0)&&(A=c.lastRenderedReducer,A!==null))try{var k=c.lastRenderedState,Z=A(k,h);if(E.hasEagerState=!0,E.eagerState=Z,ti(Z,k))return Gg(s,c,E,0),Fn===null&&Wg(),!1}catch{}if(h=$S(s,c,E,v),h!==null)return Vo(h,s,v),nP(h,c,v),true}return false}function sC(s,c,h,v){if(v={lane:2,revertLane:kC(),gesture:null,action:v,hasEagerState:false,eagerState:null,next:null},mv(s)){if(c)throw Error(r(479))}else c=$S(s,h,v,2),c!==null&&Vo(c,s,2);}function mv(s){var c=s.alternate;return s===Wt||c!==null&&c===Wt}function tP(s,c){Yu=av=true;var h=s.pending;h===null?c.next=c:(c.next=h.next,h.next=c),s.pending=c;}function nP(s,c,h){if((h&4194048)!==0){var v=c.lanes;v&=s.pendingLanes,h|=v,c.lanes=h,we(s,h);}}var xm={readContext:Ur,use:cv,useCallback:er,useContext:er,useEffect:er,useImperativeHandle:er,useLayoutEffect:er,useInsertionEffect:er,useMemo:er,useReducer:er,useRef:er,useState:er,useDebugValue:er,useDeferredValue:er,useTransition:er,useSyncExternalStore:er,useId:er,useHostTransitionStatus:er,useFormState:er,useActionState:er,useOptimistic:er,useMemoCache:er,useCacheRefresh:er};xm.useEffectEvent=er;var rP={readContext:Ur,use:cv,useCallback:function(s,c){return wo().memoizedState=[s,c===void 0?null:c],s},useContext:Ur,useEffect:FN,useImperativeHandle:function(s,c,h){h=h!=null?h.concat([s]):null,dv(4194308,4,UN.bind(null,c,s),h);},useLayoutEffect:function(s,c){return dv(4194308,4,s,c)},useInsertionEffect:function(s,c){dv(4,2,s,c);},useMemo:function(s,c){var h=wo();c=c===void 0?null:c;var v=s();if(Cc){ke(true);try{s();}finally{ke(false);}}return h.memoizedState=[v,c],v},useReducer:function(s,c,h){var v=wo();if(h!==void 0){var E=h(c);if(Cc){ke(true);try{h(c);}finally{ke(false);}}}else E=c;return v.memoizedState=v.baseState=E,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:E},v.queue=s,s=s.dispatch=xY.bind(null,Wt,s),[v.memoizedState,s]},useRef:function(s){var c=wo();return s={current:s},c.memoizedState=s},useState:function(s){s=eC(s);var c=s.queue,h=eP.bind(null,Wt,c);return c.dispatch=h,[s.memoizedState,h]},useDebugValue:rC,useDeferredValue:function(s,c){var h=wo();return oC(h,s,c)},useTransition:function(){var s=eC(false);return s=YN.bind(null,Wt,s.queue,true,false),wo().memoizedState=s,[false,s]},useSyncExternalStore:function(s,c,h){var v=Wt,E=wo();if(fn){if(h===void 0)throw Error(r(407));h=h();}else {if(h=c(),Fn===null)throw Error(r(349));(on&127)!==0||$N(v,c,h);}E.memoizedState=h;var A={value:h,getSnapshot:c};return E.queue=A,FN(MN.bind(null,v,A,s),[s]),v.flags|=2048,Qu(9,{destroy:void 0},EN.bind(null,v,A,h,c),null),h},useId:function(){var s=wo(),c=Fn.identifierPrefix;if(fn){var h=Aa,v=Ta;h=(v&~(1<<32-lt(v)-1)).toString(32)+h,c="_"+c+"R_"+h,h=sv++,0<h&&(c+="H"+h.toString(32)),c+="_";}else h=pY++,c="_"+c+"r_"+h.toString(32)+"_";return s.memoizedState=c},useHostTransitionStatus:aC,useFormState:_N,useActionState:_N,useOptimistic:function(s){var c=wo();c.memoizedState=c.baseState=s;var h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return c.queue=h,c=sC.bind(null,Wt,true,h),h.dispatch=c,[s,c]},useMemoCache:QS,useCacheRefresh:function(){return wo().memoizedState=CY.bind(null,Wt)},useEffectEvent:function(s){var c=wo(),h={impl:s};return c.memoizedState=h,function(){if((Sn&2)!==0)throw Error(r(440));return h.impl.apply(void 0,arguments)}}},lC={readContext:Ur,use:cv,useCallback:WN,useContext:Ur,useEffect:nC,useImperativeHandle:qN,useInsertionEffect:VN,useLayoutEffect:jN,useMemo:GN,useReducer:uv,useRef:kN,useState:function(){return uv(is)},useDebugValue:rC,useDeferredValue:function(s,c){var h=ur();return KN(h,On.memoizedState,s,c)},useTransition:function(){var s=uv(is)[0],c=ur().memoizedState;return [typeof s=="boolean"?s:Sm(s),c]},useSyncExternalStore:wN,useId:ZN,useHostTransitionStatus:aC,useFormState:LN,useActionState:LN,useOptimistic:function(s,c){var h=ur();return AN(h,On,s,c)},useMemoCache:QS,useCacheRefresh:JN};lC.useEffectEvent=HN;var oP={readContext:Ur,use:cv,useCallback:WN,useContext:Ur,useEffect:nC,useImperativeHandle:qN,useInsertionEffect:VN,useLayoutEffect:jN,useMemo:GN,useReducer:JS,useRef:kN,useState:function(){return JS(is)},useDebugValue:rC,useDeferredValue:function(s,c){var h=ur();return On===null?oC(h,s,c):KN(h,On.memoizedState,s,c)},useTransition:function(){var s=JS(is)[0],c=ur().memoizedState;return [typeof s=="boolean"?s:Sm(s),c]},useSyncExternalStore:wN,useId:ZN,useHostTransitionStatus:aC,useFormState:BN,useActionState:BN,useOptimistic:function(s,c){var h=ur();return On!==null?AN(h,On,s,c):(h.baseState=s,[s,h.queue.dispatch])},useMemoCache:QS,useCacheRefresh:JN};oP.useEffectEvent=HN;function cC(s,c,h,v){c=s.memoizedState,h=h(v,c),h=h==null?c:p({},c,h),s.memoizedState=h,s.lanes===0&&(s.updateQueue.baseState=h);}var uC={enqueueSetState:function(s,c,h){s=s._reactInternals;var v=si(),E=Xs(v);E.payload=c,h!=null&&(E.callback=h),c=Qs(s,E,v),c!==null&&(Vo(c,s,v),gm(c,s,v));},enqueueReplaceState:function(s,c,h){s=s._reactInternals;var v=si(),E=Xs(v);E.tag=1,E.payload=c,h!=null&&(E.callback=h),c=Qs(s,E,v),c!==null&&(Vo(c,s,v),gm(c,s,v));},enqueueForceUpdate:function(s,c){s=s._reactInternals;var h=si(),v=Xs(h);v.tag=2,c!=null&&(v.callback=c),c=Qs(s,v,h),c!==null&&(Vo(c,s,h),gm(c,s,h));}};function iP(s,c,h,v,E,A,k){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(v,A,k):c.prototype&&c.prototype.isPureReactComponent?!lm(h,v)||!lm(E,A):true}function aP(s,c,h,v){s=c.state,typeof c.componentWillReceiveProps=="function"&&c.componentWillReceiveProps(h,v),typeof c.UNSAFE_componentWillReceiveProps=="function"&&c.UNSAFE_componentWillReceiveProps(h,v),c.state!==s&&uC.enqueueReplaceState(c,c.state,null);}function xc(s,c){var h=c;if("ref"in c){h={};for(var v in c)v!=="ref"&&(h[v]=c[v]);}if(s=s.defaultProps){h===c&&(h=p({},h));for(var E in s)h[E]===void 0&&(h[E]=s[E]);}return h}function sP(s){qg(s);}function lP(s){console.error(s);}function cP(s){qg(s);}function hv(s,c){try{var h=s.onUncaughtError;h(c.value,{componentStack:c.stack});}catch(v){setTimeout(function(){throw v});}}function uP(s,c,h){try{var v=s.onCaughtError;v(h.value,{componentStack:h.stack,errorBoundary:c.tag===1?c.stateNode:null});}catch(E){setTimeout(function(){throw E});}}function dC(s,c,h){return h=Xs(h),h.tag=3,h.payload={element:null},h.callback=function(){hv(s,c);},h}function dP(s){return s=Xs(s),s.tag=3,s}function fP(s,c,h,v){var E=h.type.getDerivedStateFromError;if(typeof E=="function"){var A=v.value;s.payload=function(){return E(A)},s.callback=function(){uP(c,h,v);};}var k=h.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(s.callback=function(){uP(c,h,v),typeof E!="function"&&(rl===null?rl=new Set([this]):rl.add(this));var Z=v.stack;this.componentDidCatch(v.value,{componentStack:Z!==null?Z:""});});}function wY(s,c,h,v,E){if(h.flags|=32768,v!==null&&typeof v=="object"&&typeof v.then=="function"){if(c=h.alternate,c!==null&&ju(c,h,E,true),h=ri.current,h!==null){switch(h.tag){case 31:case 13:return Ii===null?Mv():h.alternate===null&&tr===0&&(tr=3),h.flags&=-257,h.flags|=65536,h.lanes=E,v===tv?h.flags|=16384:(c=h.updateQueue,c===null?h.updateQueue=new Set([v]):c.add(v),LC(s,v,E)),false;case 22:return h.flags|=65536,v===tv?h.flags|=16384:(c=h.updateQueue,c===null?(c={transitions:null,markerInstances:null,retryQueue:new Set([v])},h.updateQueue=c):(h=c.retryQueue,h===null?c.retryQueue=new Set([v]):h.add(v)),LC(s,v,E)),false}throw Error(r(435,h.tag))}return LC(s,v,E),Mv(),false}if(fn)return c=ri.current,c!==null?((c.flags&65536)===0&&(c.flags|=256),c.flags|=65536,c.lanes=E,v!==NS&&(s=Error(r(422),{cause:v}),dm(Ti(s,h)))):(v!==NS&&(c=Error(r(423),{cause:v}),dm(Ti(c,h))),s=s.current.alternate,s.flags|=65536,E&=-E,s.lanes|=E,v=Ti(v,h),E=dC(s.stateNode,v,E),HS(s,E),tr!==4&&(tr=2)),false;var A=Error(r(520),{cause:v});if(A=Ti(A,h),Nm===null?Nm=[A]:Nm.push(A),tr!==4&&(tr=2),c===null)return true;v=Ti(v,h),h=c;do{switch(h.tag){case 3:return h.flags|=65536,s=E&-E,h.lanes|=s,s=dC(h.stateNode,v,s),HS(h,s),false;case 1:if(c=h.type,A=h.stateNode,(h.flags&128)===0&&(typeof c.getDerivedStateFromError=="function"||A!==null&&typeof A.componentDidCatch=="function"&&(rl===null||!rl.has(A))))return h.flags|=65536,E&=-E,h.lanes|=E,E=dP(E),fP(E,s,h,v),HS(h,E),false}h=h.return;}while(h!==null);return false}var fC=Error(r(461)),gr=false;function qr(s,c,h,v){c.child=s===null?gN(c,null,h,v):Sc(c,s.child,h,v);}function mP(s,c,h,v,E){h=h.render;var A=c.ref;if("ref"in v){var k={};for(var Z in v)Z!=="ref"&&(k[Z]=v[Z]);}else k=v;return gc(c),v=GS(s,c,h,k,A,E),Z=KS(),s!==null&&!gr?(YS(s,c,E),as(s,c,E)):(fn&&Z&&TS(c),c.flags|=1,qr(s,c,v,E),c.child)}function hP(s,c,h,v,E){if(s===null){var A=h.type;return typeof A=="function"&&!ES(A)&&A.defaultProps===void 0&&h.compare===null?(c.tag=15,c.type=A,pP(s,c,A,v,E)):(s=Yg(h.type,null,v,c,c.mode,E),s.ref=c.ref,s.return=c,c.child=s)}if(A=s.child,!SC(s,E)){var k=A.memoizedProps;if(h=h.compare,h=h!==null?h:lm,h(k,v)&&s.ref===c.ref)return as(s,c,E)}return c.flags|=1,s=es(A,v),s.ref=c.ref,s.return=c,c.child=s}function pP(s,c,h,v,E){if(s!==null){var A=s.memoizedProps;if(lm(A,v)&&s.ref===c.ref)if(gr=false,c.pendingProps=v=A,SC(s,E))(s.flags&131072)!==0&&(gr=true);else return c.lanes=s.lanes,as(s,c,E)}return mC(s,c,h,v,E)}function gP(s,c,h,v){var E=v.children,A=s!==null?s.memoizedState:null;if(s===null&&c.stateNode===null&&(c.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),v.mode==="hidden"){if((c.flags&128)!==0){if(A=A!==null?A.baseLanes|h:h,s!==null){for(v=c.child=s.child,E=0;v!==null;)E=E|v.lanes|v.childLanes,v=v.sibling;v=E&~A;}else v=0,c.child=null;return vP(s,c,A,h,v)}if((h&536870912)!==0)c.memoizedState={baseLanes:0,cachePool:null},s!==null&&Jg(c,A!==null?A.cachePool:null),A!==null?yN(c,A):jS(),SN(c);else return v=c.lanes=536870912,vP(s,c,A!==null?A.baseLanes|h:h,h,v)}else A!==null?(Jg(c,A.cachePool),yN(c,A),Js(),c.memoizedState=null):(s!==null&&Jg(c,null),jS(),Js());return qr(s,c,E,h),c.child}function wm(s,c){return s!==null&&s.tag===22||c.stateNode!==null||(c.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.sibling}function vP(s,c,h,v,E){var A=zS();return A=A===null?null:{parent:hr._currentValue,pool:A},c.memoizedState={baseLanes:h,cachePool:A},s!==null&&Jg(c,null),jS(),SN(c),s!==null&&ju(s,c,v,true),c.childLanes=E,null}function pv(s,c){return c=vv({mode:c.mode,children:c.children},s.mode),c.ref=s.ref,s.child=c,c.return=s,c}function bP(s,c,h){return Sc(c,s.child,null,h),s=pv(c,c.pendingProps),s.flags|=2,oi(c),c.memoizedState=null,s}function $Y(s,c,h){var v=c.pendingProps,E=(c.flags&128)!==0;if(c.flags&=-129,s===null){if(fn){if(v.mode==="hidden")return s=pv(c,v),c.lanes=536870912,wm(null,s);if(qS(c),(s=Un)?(s=N4(s,Pi),s=s!==null&&s.data==="&"?s:null,s!==null&&(c.memoizedState={dehydrated:s,treeContext:qs!==null?{id:Ta,overflow:Aa}:null,retryLane:536870912,hydrationErrors:null},h=tN(s),h.return=c,c.child=h,jr=c,Un=null)):s=null,s===null)throw Gs(c);return c.lanes=536870912,null}return pv(c,v)}var A=s.memoizedState;if(A!==null){var k=A.dehydrated;if(qS(c),E)if(c.flags&256)c.flags&=-257,c=bP(s,c,h);else if(c.memoizedState!==null)c.child=s.child,c.flags|=128,c=null;else throw Error(r(558));else if(gr||ju(s,c,h,false),E=(h&s.childLanes)!==0,gr||E){if(v=Fn,v!==null&&(k=Le(v,h),k!==0&&k!==A.retryLane))throw A.retryLane=k,fc(s,k),Vo(v,s,k),fC;Mv(),c=bP(s,c,h);}else s=A.treeContext,Un=Oi(k.nextSibling),jr=c,fn=true,Ws=null,Pi=false,s!==null&&oN(c,s),c=pv(c,v),c.flags|=4096;return c}return s=es(s.child,{mode:v.mode,children:v.children}),s.ref=c.ref,c.child=s,s.return=c,s}function gv(s,c){var h=c.ref;if(h===null)s!==null&&s.ref!==null&&(c.flags|=4194816);else {if(typeof h!="function"&&typeof h!="object")throw Error(r(284));(s===null||s.ref!==h)&&(c.flags|=4194816);}}function mC(s,c,h,v,E){return gc(c),h=GS(s,c,h,v,void 0,E),v=KS(),s!==null&&!gr?(YS(s,c,E),as(s,c,E)):(fn&&v&&TS(c),c.flags|=1,qr(s,c,h,E),c.child)}function yP(s,c,h,v,E,A){return gc(c),c.updateQueue=null,h=xN(c,v,h,E),CN(s),v=KS(),s!==null&&!gr?(YS(s,c,A),as(s,c,A)):(fn&&v&&TS(c),c.flags|=1,qr(s,c,h,A),c.child)}function SP(s,c,h,v,E){if(gc(c),c.stateNode===null){var A=ku,k=h.contextType;typeof k=="object"&&k!==null&&(A=Ur(k)),A=new h(v,A),c.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,A.updater=uC,c.stateNode=A,A._reactInternals=c,A=c.stateNode,A.props=v,A.state=c.memoizedState,A.refs={},kS(c),k=h.contextType,A.context=typeof k=="object"&&k!==null?Ur(k):ku,A.state=c.memoizedState,k=h.getDerivedStateFromProps,typeof k=="function"&&(cC(c,h,k,v),A.state=c.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof A.getSnapshotBeforeUpdate=="function"||typeof A.UNSAFE_componentWillMount!="function"&&typeof A.componentWillMount!="function"||(k=A.state,typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount(),k!==A.state&&uC.enqueueReplaceState(A,A.state,null),bm(c,v,A,E),vm(),A.state=c.memoizedState),typeof A.componentDidMount=="function"&&(c.flags|=4194308),v=true;}else if(s===null){A=c.stateNode;var Z=c.memoizedProps,ce=xc(h,Z);A.props=ce;var $e=A.context,De=h.contextType;k=ku,typeof De=="object"&&De!==null&&(k=Ur(De));var Ve=h.getDerivedStateFromProps;De=typeof Ve=="function"||typeof A.getSnapshotBeforeUpdate=="function",Z=c.pendingProps!==Z,De||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||(Z||$e!==k)&&aP(c,A,v,k),Ys=false;var Me=c.memoizedState;A.state=Me,bm(c,v,A,E),vm(),$e=c.memoizedState,Z||Me!==$e||Ys?(typeof Ve=="function"&&(cC(c,h,Ve,v),$e=c.memoizedState),(ce=Ys||iP(c,h,ce,v,Me,$e,k))?(De||typeof A.UNSAFE_componentWillMount!="function"&&typeof A.componentWillMount!="function"||(typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount()),typeof A.componentDidMount=="function"&&(c.flags|=4194308)):(typeof A.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=v,c.memoizedState=$e),A.props=v,A.state=$e,A.context=k,v=ce):(typeof A.componentDidMount=="function"&&(c.flags|=4194308),v=false);}else {A=c.stateNode,FS(s,c),k=c.memoizedProps,De=xc(h,k),A.props=De,Ve=c.pendingProps,Me=A.context,$e=h.contextType,ce=ku,typeof $e=="object"&&$e!==null&&(ce=Ur($e)),Z=h.getDerivedStateFromProps,($e=typeof Z=="function"||typeof A.getSnapshotBeforeUpdate=="function")||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||(k!==Ve||Me!==ce)&&aP(c,A,v,ce),Ys=false,Me=c.memoizedState,A.state=Me,bm(c,v,A,E),vm();var Ae=c.memoizedState;k!==Ve||Me!==Ae||Ys||s!==null&&s.dependencies!==null&&Qg(s.dependencies)?(typeof Z=="function"&&(cC(c,h,Z,v),Ae=c.memoizedState),(De=Ys||iP(c,h,De,v,Me,Ae,ce)||s!==null&&s.dependencies!==null&&Qg(s.dependencies))?($e||typeof A.UNSAFE_componentWillUpdate!="function"&&typeof A.componentWillUpdate!="function"||(typeof A.componentWillUpdate=="function"&&A.componentWillUpdate(v,Ae,ce),typeof A.UNSAFE_componentWillUpdate=="function"&&A.UNSAFE_componentWillUpdate(v,Ae,ce)),typeof A.componentDidUpdate=="function"&&(c.flags|=4),typeof A.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof A.componentDidUpdate!="function"||k===s.memoizedProps&&Me===s.memoizedState||(c.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||k===s.memoizedProps&&Me===s.memoizedState||(c.flags|=1024),c.memoizedProps=v,c.memoizedState=Ae),A.props=v,A.state=Ae,A.context=ce,v=De):(typeof A.componentDidUpdate!="function"||k===s.memoizedProps&&Me===s.memoizedState||(c.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||k===s.memoizedProps&&Me===s.memoizedState||(c.flags|=1024),v=false);}return A=v,gv(s,c),v=(c.flags&128)!==0,A||v?(A=c.stateNode,h=v&&typeof h.getDerivedStateFromError!="function"?null:A.render(),c.flags|=1,s!==null&&v?(c.child=Sc(c,s.child,null,E),c.child=Sc(c,null,h,E)):qr(s,c,h,E),c.memoizedState=A.state,s=c.child):s=as(s,c,E),s}function CP(s,c,h,v){return hc(),c.flags|=256,qr(s,c,h,v),c.child}var hC={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function pC(s){return {baseLanes:s,cachePool:uN()}}function gC(s,c,h){return s=s!==null?s.childLanes&~h:0,c&&(s|=ai),s}function xP(s,c,h){var v=c.pendingProps,E=false,A=(c.flags&128)!==0,k;if((k=A)||(k=s!==null&&s.memoizedState===null?false:(cr.current&2)!==0),k&&(E=true,c.flags&=-129),k=(c.flags&32)!==0,c.flags&=-33,s===null){if(fn){if(E?Zs(c):Js(),(s=Un)?(s=N4(s,Pi),s=s!==null&&s.data!=="&"?s:null,s!==null&&(c.memoizedState={dehydrated:s,treeContext:qs!==null?{id:Ta,overflow:Aa}:null,retryLane:536870912,hydrationErrors:null},h=tN(s),h.return=c,c.child=h,jr=c,Un=null)):s=null,s===null)throw Gs(c);return ZC(s)?c.lanes=32:c.lanes=536870912,null}var Z=v.children;return v=v.fallback,E?(Js(),E=c.mode,Z=vv({mode:"hidden",children:Z},E),v=mc(v,E,h,null),Z.return=c,v.return=c,Z.sibling=v,c.child=Z,v=c.child,v.memoizedState=pC(h),v.childLanes=gC(s,k,h),c.memoizedState=hC,wm(null,v)):(Zs(c),vC(c,Z))}var ce=s.memoizedState;if(ce!==null&&(Z=ce.dehydrated,Z!==null)){if(A)c.flags&256?(Zs(c),c.flags&=-257,c=bC(s,c,h)):c.memoizedState!==null?(Js(),c.child=s.child,c.flags|=128,c=null):(Js(),Z=v.fallback,E=c.mode,v=vv({mode:"visible",children:v.children},E),Z=mc(Z,E,h,null),Z.flags|=2,v.return=c,Z.return=c,v.sibling=Z,c.child=v,Sc(c,s.child,null,h),v=c.child,v.memoizedState=pC(h),v.childLanes=gC(s,k,h),c.memoizedState=hC,c=wm(null,v));else if(Zs(c),ZC(Z)){if(k=Z.nextSibling&&Z.nextSibling.dataset,k)var $e=k.dgst;k=$e,v=Error(r(419)),v.stack="",v.digest=k,dm({value:v,source:null,stack:null}),c=bC(s,c,h);}else if(gr||ju(s,c,h,false),k=(h&s.childLanes)!==0,gr||k){if(k=Fn,k!==null&&(v=Le(k,h),v!==0&&v!==ce.retryLane))throw ce.retryLane=v,fc(s,v),Vo(k,s,v),fC;QC(Z)||Mv(),c=bC(s,c,h);}else QC(Z)?(c.flags|=192,c.child=s.child,c=null):(s=ce.treeContext,Un=Oi(Z.nextSibling),jr=c,fn=true,Ws=null,Pi=false,s!==null&&oN(c,s),c=vC(c,v.children),c.flags|=4096);return c}return E?(Js(),Z=v.fallback,E=c.mode,ce=s.child,$e=ce.sibling,v=es(ce,{mode:"hidden",children:v.children}),v.subtreeFlags=ce.subtreeFlags&65011712,$e!==null?Z=es($e,Z):(Z=mc(Z,E,h,null),Z.flags|=2),Z.return=c,v.return=c,v.sibling=Z,c.child=v,wm(null,v),v=c.child,Z=s.child.memoizedState,Z===null?Z=pC(h):(E=Z.cachePool,E!==null?(ce=hr._currentValue,E=E.parent!==ce?{parent:ce,pool:ce}:E):E=uN(),Z={baseLanes:Z.baseLanes|h,cachePool:E}),v.memoizedState=Z,v.childLanes=gC(s,k,h),c.memoizedState=hC,wm(s.child,v)):(Zs(c),h=s.child,s=h.sibling,h=es(h,{mode:"visible",children:v.children}),h.return=c,h.sibling=null,s!==null&&(k=c.deletions,k===null?(c.deletions=[s],c.flags|=16):k.push(s)),c.child=h,c.memoizedState=null,h)}function vC(s,c){return c=vv({mode:"visible",children:c},s.mode),c.return=s,s.child=c}function vv(s,c){return s=ni(22,s,null,c),s.lanes=0,s}function bC(s,c,h){return Sc(c,s.child,null,h),s=vC(c,c.pendingProps.children),s.flags|=2,c.memoizedState=null,s}function wP(s,c,h){s.lanes|=c;var v=s.alternate;v!==null&&(v.lanes|=c),OS(s.return,c,h);}function yC(s,c,h,v,E,A){var k=s.memoizedState;k===null?s.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:v,tail:h,tailMode:E,treeForkCount:A}:(k.isBackwards=c,k.rendering=null,k.renderingStartTime=0,k.last=v,k.tail=h,k.tailMode=E,k.treeForkCount=A);}function $P(s,c,h){var v=c.pendingProps,E=v.revealOrder,A=v.tail;v=v.children;var k=cr.current,Z=(k&2)!==0;if(Z?(k=k&1|2,c.flags|=128):k&=1,Y(cr,k),qr(s,c,v,h),v=fn?um:0,!Z&&s!==null&&(s.flags&128)!==0)e:for(s=c.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&wP(s,h,c);else if(s.tag===19)wP(s,h,c);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===c)break e;for(;s.sibling===null;){if(s.return===null||s.return===c)break e;s=s.return;}s.sibling.return=s.return,s=s.sibling;}switch(E){case "forwards":for(h=c.child,E=null;h!==null;)s=h.alternate,s!==null&&iv(s)===null&&(E=h),h=h.sibling;h=E,h===null?(E=c.child,c.child=null):(E=h.sibling,h.sibling=null),yC(c,false,E,h,A,v);break;case "backwards":case "unstable_legacy-backwards":for(h=null,E=c.child,c.child=null;E!==null;){if(s=E.alternate,s!==null&&iv(s)===null){c.child=E;break}s=E.sibling,E.sibling=h,h=E,E=s;}yC(c,true,h,null,A,v);break;case "together":yC(c,false,null,null,void 0,v);break;default:c.memoizedState=null;}return c.child}function as(s,c,h){if(s!==null&&(c.dependencies=s.dependencies),nl|=c.lanes,(h&c.childLanes)===0)if(s!==null){if(ju(s,c,h,false),(h&c.childLanes)===0)return null}else return null;if(s!==null&&c.child!==s.child)throw Error(r(153));if(c.child!==null){for(s=c.child,h=es(s,s.pendingProps),c.child=h,h.return=c;s.sibling!==null;)s=s.sibling,h=h.sibling=es(s,s.pendingProps),h.return=c;h.sibling=null;}return c.child}function SC(s,c){return (s.lanes&c)!==0?true:(s=s.dependencies,!!(s!==null&&Qg(s)))}function EY(s,c,h){switch(c.tag){case 3:se(c,c.stateNode.containerInfo),Ks(c,hr,s.memoizedState.cache),hc();break;case 27:case 5:re(c);break;case 4:se(c,c.stateNode.containerInfo);break;case 10:Ks(c,c.type,c.memoizedProps.value);break;case 31:if(c.memoizedState!==null)return c.flags|=128,qS(c),null;break;case 13:var v=c.memoizedState;if(v!==null)return v.dehydrated!==null?(Zs(c),c.flags|=128,null):(h&c.child.childLanes)!==0?xP(s,c,h):(Zs(c),s=as(s,c,h),s!==null?s.sibling:null);Zs(c);break;case 19:var E=(s.flags&128)!==0;if(v=(h&c.childLanes)!==0,v||(ju(s,c,h,false),v=(h&c.childLanes)!==0),E){if(v)return $P(s,c,h);c.flags|=128;}if(E=c.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),Y(cr,cr.current),v)break;return null;case 22:return c.lanes=0,gP(s,c,h,c.pendingProps);case 24:Ks(c,hr,s.memoizedState.cache);}return as(s,c,h)}function EP(s,c,h){if(s!==null)if(s.memoizedProps!==c.pendingProps)gr=true;else {if(!SC(s,h)&&(c.flags&128)===0)return gr=false,EY(s,c,h);gr=(s.flags&131072)!==0;}else gr=false,fn&&(c.flags&1048576)!==0&&rN(c,um,c.index);switch(c.lanes=0,c.tag){case 16:e:{var v=c.pendingProps;if(s=bc(c.elementType),c.type=s,typeof s=="function")ES(s)?(v=xc(s,v),c.tag=1,c=SP(null,c,s,v,h)):(c.tag=0,c=mC(null,c,s,v,h));else {if(s!=null){var E=s.$$typeof;if(E===T){c.tag=11,c=mP(null,c,s,v,h);break e}else if(E===N){c.tag=14,c=hP(null,c,s,v,h);break e}}throw c=q(s)||s,Error(r(306,c,""))}}return c;case 0:return mC(s,c,c.type,c.pendingProps,h);case 1:return v=c.type,E=xc(v,c.pendingProps),SP(s,c,v,E,h);case 3:e:{if(se(c,c.stateNode.containerInfo),s===null)throw Error(r(387));v=c.pendingProps;var A=c.memoizedState;E=A.element,FS(s,c),bm(c,v,null,h);var k=c.memoizedState;if(v=k.cache,Ks(c,hr,v),v!==A.cache&&DS(c,[hr],h,true),vm(),v=k.element,A.isDehydrated)if(A={element:v,isDehydrated:false,cache:k.cache},c.updateQueue.baseState=A,c.memoizedState=A,c.flags&256){c=CP(s,c,v,h);break e}else if(v!==E){E=Ti(Error(r(424)),c),dm(E),c=CP(s,c,v,h);break e}else for(s=c.stateNode.containerInfo,s.nodeType===9?s=s.body:s=s.nodeName==="HTML"?s.ownerDocument.body:s,Un=Oi(s.firstChild),jr=c,fn=true,Ws=null,Pi=true,h=gN(c,null,v,h),c.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling;else {if(hc(),v===E){c=as(s,c,h);break e}qr(s,c,v,h);}c=c.child;}return c;case 26:return gv(s,c),s===null?(h=L4(c.type,null,c.pendingProps,null))?c.memoizedState=h:fn||(h=c.type,s=c.pendingProps,v=Ov(te.current).createElement(h),v[Bt]=c,v[En]=s,Wr(v,h,s),In(v),c.stateNode=v):c.memoizedState=L4(c.type,s.memoizedProps,c.pendingProps,s.memoizedState),null;case 27:return re(c),s===null&&fn&&(v=c.stateNode=O4(c.type,c.pendingProps,te.current),jr=c,Pi=true,E=Un,sl(c.type)?(JC=E,Un=Oi(v.firstChild)):Un=E),qr(s,c,c.pendingProps.children,h),gv(s,c),s===null&&(c.flags|=4194304),c.child;case 5:return s===null&&fn&&((E=v=Un)&&(v=tX(v,c.type,c.pendingProps,Pi),v!==null?(c.stateNode=v,jr=c,Un=Oi(v.firstChild),Pi=false,E=true):E=false),E||Gs(c)),re(c),E=c.type,A=c.pendingProps,k=s!==null?s.memoizedProps:null,v=A.children,KC(E,A)?v=null:k!==null&&KC(E,k)&&(c.flags|=32),c.memoizedState!==null&&(E=GS(s,c,gY,null,null,h),Bm._currentValue=E),gv(s,c),qr(s,c,v,h),c.child;case 6:return s===null&&fn&&((s=h=Un)&&(h=nX(h,c.pendingProps,Pi),h!==null?(c.stateNode=h,jr=c,Un=null,s=true):s=false),s||Gs(c)),null;case 13:return xP(s,c,h);case 4:return se(c,c.stateNode.containerInfo),v=c.pendingProps,s===null?c.child=Sc(c,null,v,h):qr(s,c,v,h),c.child;case 11:return mP(s,c,c.type,c.pendingProps,h);case 7:return qr(s,c,c.pendingProps,h),c.child;case 8:return qr(s,c,c.pendingProps.children,h),c.child;case 12:return qr(s,c,c.pendingProps.children,h),c.child;case 10:return v=c.pendingProps,Ks(c,c.type,v.value),qr(s,c,v.children,h),c.child;case 9:return E=c.type._context,v=c.pendingProps.children,gc(c),E=Ur(E),v=v(E),c.flags|=1,qr(s,c,v,h),c.child;case 14:return hP(s,c,c.type,c.pendingProps,h);case 15:return pP(s,c,c.type,c.pendingProps,h);case 19:return $P(s,c,h);case 31:return $Y(s,c,h);case 22:return gP(s,c,h,c.pendingProps);case 24:return gc(c),v=Ur(hr),s===null?(E=zS(),E===null&&(E=Fn,A=_S(),E.pooledCache=A,A.refCount++,A!==null&&(E.pooledCacheLanes|=h),E=A),c.memoizedState={parent:v,cache:E},kS(c),Ks(c,hr,E)):((s.lanes&h)!==0&&(FS(s,c),bm(c,null,null,h),vm()),E=s.memoizedState,A=c.memoizedState,E.parent!==v?(E={parent:v,cache:v},c.memoizedState=E,c.lanes===0&&(c.memoizedState=c.updateQueue.baseState=E),Ks(c,hr,v)):(v=A.cache,Ks(c,hr,v),v!==E.cache&&DS(c,[hr],h,true))),qr(s,c,c.pendingProps.children,h),c.child;case 29:throw c.pendingProps}throw Error(r(156,c.tag))}function ss(s){s.flags|=4;}function CC(s,c,h,v,E){if((c=(s.mode&32)!==0)&&(c=false),c){if(s.flags|=16777216,(E&335544128)===E)if(s.stateNode.complete)s.flags|=8192;else if(ZP())s.flags|=8192;else throw yc=tv,BS}else s.flags&=-16777217;}function MP(s,c){if(c.type!=="stylesheet"||(c.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!H4(c))if(ZP())s.flags|=8192;else throw yc=tv,BS}function bv(s,c){c!==null&&(s.flags|=4),s.flags&16384&&(c=s.tag!==22?ve():536870912,s.lanes|=c,td|=c);}function $m(s,c){if(!fn)switch(s.tailMode){case "hidden":c=s.tail;for(var h=null;c!==null;)c.alternate!==null&&(h=c),c=c.sibling;h===null?s.tail=null:h.sibling=null;break;case "collapsed":h=s.tail;for(var v=null;h!==null;)h.alternate!==null&&(v=h),h=h.sibling;v===null?c||s.tail===null?s.tail=null:s.tail.sibling=null:v.sibling=null;}}function qn(s){var c=s.alternate!==null&&s.alternate.child===s.child,h=0,v=0;if(c)for(var E=s.child;E!==null;)h|=E.lanes|E.childLanes,v|=E.subtreeFlags&65011712,v|=E.flags&65011712,E.return=s,E=E.sibling;else for(E=s.child;E!==null;)h|=E.lanes|E.childLanes,v|=E.subtreeFlags,v|=E.flags,E.return=s,E=E.sibling;return s.subtreeFlags|=v,s.childLanes=h,c}function MY(s,c,h){var v=c.pendingProps;switch(AS(c),c.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qn(c),null;case 1:return qn(c),null;case 3:return h=c.stateNode,v=null,s!==null&&(v=s.memoizedState.cache),c.memoizedState.cache!==v&&(c.flags|=2048),rs(hr),ae(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(s===null||s.child===null)&&(Vu(c)?ss(c):s===null||s.memoizedState.isDehydrated&&(c.flags&256)===0||(c.flags|=1024,PS())),qn(c),null;case 26:var E=c.type,A=c.memoizedState;return s===null?(ss(c),A!==null?(qn(c),MP(c,A)):(qn(c),CC(c,E,null,v,h))):A?A!==s.memoizedState?(ss(c),qn(c),MP(c,A)):(qn(c),c.flags&=-16777217):(s=s.memoizedProps,s!==v&&ss(c),qn(c),CC(c,E,s,v,h)),null;case 27:if(de(c),h=te.current,E=c.type,s!==null&&c.stateNode!=null)s.memoizedProps!==v&&ss(c);else {if(!v){if(c.stateNode===null)throw Error(r(166));return qn(c),null}s=ee.current,Vu(c)?iN(c):(s=O4(E,v,h),c.stateNode=s,ss(c));}return qn(c),null;case 5:if(de(c),E=c.type,s!==null&&c.stateNode!=null)s.memoizedProps!==v&&ss(c);else {if(!v){if(c.stateNode===null)throw Error(r(166));return qn(c),null}if(A=ee.current,Vu(c))iN(c);else {var k=Ov(te.current);switch(A){case 1:A=k.createElementNS("http://www.w3.org/2000/svg",E);break;case 2:A=k.createElementNS("http://www.w3.org/1998/Math/MathML",E);break;default:switch(E){case "svg":A=k.createElementNS("http://www.w3.org/2000/svg",E);break;case "math":A=k.createElementNS("http://www.w3.org/1998/Math/MathML",E);break;case "script":A=k.createElement("div"),A.innerHTML="<script><\/script>",A=A.removeChild(A.firstChild);break;case "select":A=typeof v.is=="string"?k.createElement("select",{is:v.is}):k.createElement("select"),v.multiple?A.multiple=true:v.size&&(A.size=v.size);break;default:A=typeof v.is=="string"?k.createElement(E,{is:v.is}):k.createElement(E);}}A[Bt]=c,A[En]=v;e:for(k=c.child;k!==null;){if(k.tag===5||k.tag===6)A.appendChild(k.stateNode);else if(k.tag!==4&&k.tag!==27&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===c)break e;for(;k.sibling===null;){if(k.return===null||k.return===c)break e;k=k.return;}k.sibling.return=k.return,k=k.sibling;}c.stateNode=A;e:switch(Wr(A,E,v),E){case "button":case "input":case "select":case "textarea":v=!!v.autoFocus;break e;case "img":v=true;break e;default:v=false;}v&&ss(c);}}return qn(c),CC(c,c.type,s===null?null:s.memoizedProps,c.pendingProps,h),null;case 6:if(s&&c.stateNode!=null)s.memoizedProps!==v&&ss(c);else {if(typeof v!="string"&&c.stateNode===null)throw Error(r(166));if(s=te.current,Vu(c)){if(s=c.stateNode,h=c.memoizedProps,v=null,E=jr,E!==null)switch(E.tag){case 27:case 5:v=E.memoizedProps;}s[Bt]=c,s=!!(s.nodeValue===h||v!==null&&v.suppressHydrationWarning===true||x4(s.nodeValue,h)),s||Gs(c,true);}else s=Ov(s).createTextNode(v),s[Bt]=c,c.stateNode=s;}return qn(c),null;case 31:if(h=c.memoizedState,s===null||s.memoizedState!==null){if(v=Vu(c),h!==null){if(s===null){if(!v)throw Error(r(318));if(s=c.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(557));s[Bt]=c;}else hc(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;qn(c),s=false;}else h=PS(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=h),s=true;if(!s)return c.flags&256?(oi(c),c):(oi(c),null);if((c.flags&128)!==0)throw Error(r(558))}return qn(c),null;case 13:if(v=c.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(E=Vu(c),v!==null&&v.dehydrated!==null){if(s===null){if(!E)throw Error(r(318));if(E=c.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(r(317));E[Bt]=c;}else hc(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;qn(c),E=false;}else E=PS(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=E),E=true;if(!E)return c.flags&256?(oi(c),c):(oi(c),null)}return oi(c),(c.flags&128)!==0?(c.lanes=h,c):(h=v!==null,s=s!==null&&s.memoizedState!==null,h&&(v=c.child,E=null,v.alternate!==null&&v.alternate.memoizedState!==null&&v.alternate.memoizedState.cachePool!==null&&(E=v.alternate.memoizedState.cachePool.pool),A=null,v.memoizedState!==null&&v.memoizedState.cachePool!==null&&(A=v.memoizedState.cachePool.pool),A!==E&&(v.flags|=2048)),h!==s&&h&&(c.child.flags|=8192),bv(c,c.updateQueue),qn(c),null);case 4:return ae(),s===null&&jC(c.stateNode.containerInfo),qn(c),null;case 10:return rs(c.type),qn(c),null;case 19:if(z(cr),v=c.memoizedState,v===null)return qn(c),null;if(E=(c.flags&128)!==0,A=v.rendering,A===null)if(E)$m(v,false);else {if(tr!==0||s!==null&&(s.flags&128)!==0)for(s=c.child;s!==null;){if(A=iv(s),A!==null){for(c.flags|=128,$m(v,false),s=A.updateQueue,c.updateQueue=s,bv(c,s),c.subtreeFlags=0,s=h,h=c.child;h!==null;)eN(h,s),h=h.sibling;return Y(cr,cr.current&1|2),fn&&ts(c,v.treeForkCount),c.child}s=s.sibling;}v.tail!==null&&Re()>wv&&(c.flags|=128,E=true,$m(v,false),c.lanes=4194304);}else {if(!E)if(s=iv(A),s!==null){if(c.flags|=128,E=true,s=s.updateQueue,c.updateQueue=s,bv(c,s),$m(v,true),v.tail===null&&v.tailMode==="hidden"&&!A.alternate&&!fn)return qn(c),null}else 2*Re()-v.renderingStartTime>wv&&h!==536870912&&(c.flags|=128,E=true,$m(v,false),c.lanes=4194304);v.isBackwards?(A.sibling=c.child,c.child=A):(s=v.last,s!==null?s.sibling=A:c.child=A,v.last=A);}return v.tail!==null?(s=v.tail,v.rendering=s,v.tail=s.sibling,v.renderingStartTime=Re(),s.sibling=null,h=cr.current,Y(cr,E?h&1|2:h&1),fn&&ts(c,v.treeForkCount),s):(qn(c),null);case 22:case 23:return oi(c),US(),v=c.memoizedState!==null,s!==null?s.memoizedState!==null!==v&&(c.flags|=8192):v&&(c.flags|=8192),v?(h&536870912)!==0&&(c.flags&128)===0&&(qn(c),c.subtreeFlags&6&&(c.flags|=8192)):qn(c),h=c.updateQueue,h!==null&&bv(c,h.retryQueue),h=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),v=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(v=c.memoizedState.cachePool.pool),v!==h&&(c.flags|=2048),s!==null&&z(vc),null;case 24:return h=null,s!==null&&(h=s.memoizedState.cache),c.memoizedState.cache!==h&&(c.flags|=2048),rs(hr),qn(c),null;case 25:return null;case 30:return null}throw Error(r(156,c.tag))}function RY(s,c){switch(AS(c),c.tag){case 1:return s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 3:return rs(hr),ae(),s=c.flags,(s&65536)!==0&&(s&128)===0?(c.flags=s&-65537|128,c):null;case 26:case 27:case 5:return de(c),null;case 31:if(c.memoizedState!==null){if(oi(c),c.alternate===null)throw Error(r(340));hc();}return s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 13:if(oi(c),s=c.memoizedState,s!==null&&s.dehydrated!==null){if(c.alternate===null)throw Error(r(340));hc();}return s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 19:return z(cr),null;case 4:return ae(),null;case 10:return rs(c.type),null;case 22:case 23:return oi(c),US(),s!==null&&z(vc),s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 24:return rs(hr),null;case 25:return null;default:return null}}function RP(s,c){switch(AS(c),c.tag){case 3:rs(hr),ae();break;case 26:case 27:case 5:de(c);break;case 4:ae();break;case 31:c.memoizedState!==null&&oi(c);break;case 13:oi(c);break;case 19:z(cr);break;case 10:rs(c.type);break;case 22:case 23:oi(c),US(),s!==null&&z(vc);break;case 24:rs(hr);}}function Em(s,c){try{var h=c.updateQueue,v=h!==null?h.lastEffect:null;if(v!==null){var E=v.next;h=E;do{if((h.tag&s)===s){v=void 0;var A=h.create,k=h.inst;v=A(),k.destroy=v;}h=h.next;}while(h!==E)}}catch(Z){Pn(c,c.return,Z);}}function el(s,c,h){try{var v=c.updateQueue,E=v!==null?v.lastEffect:null;if(E!==null){var A=E.next;v=A;do{if((v.tag&s)===s){var k=v.inst,Z=k.destroy;if(Z!==void 0){k.destroy=void 0,E=c;var ce=h,$e=Z;try{$e();}catch(De){Pn(E,ce,De);}}}v=v.next;}while(v!==A)}}catch(De){Pn(c,c.return,De);}}function TP(s){var c=s.updateQueue;if(c!==null){var h=s.stateNode;try{bN(c,h);}catch(v){Pn(s,s.return,v);}}}function AP(s,c,h){h.props=xc(s.type,s.memoizedProps),h.state=s.memoizedState;try{h.componentWillUnmount();}catch(v){Pn(s,c,v);}}function Mm(s,c){try{var h=s.ref;if(h!==null){switch(s.tag){case 26:case 27:case 5:var v=s.stateNode;break;case 30:v=s.stateNode;break;default:v=s.stateNode;}typeof h=="function"?s.refCleanup=h(v):h.current=v;}}catch(E){Pn(s,c,E);}}function Na(s,c){var h=s.ref,v=s.refCleanup;if(h!==null)if(typeof v=="function")try{v();}catch(E){Pn(s,c,E);}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null);}else if(typeof h=="function")try{h(null);}catch(E){Pn(s,c,E);}else h.current=null;}function NP(s){var c=s.type,h=s.memoizedProps,v=s.stateNode;try{e:switch(c){case "button":case "input":case "select":case "textarea":h.autoFocus&&v.focus();break e;case "img":h.src?v.src=h.src:h.srcSet&&(v.srcset=h.srcSet);}}catch(E){Pn(s,s.return,E);}}function xC(s,c,h){try{var v=s.stateNode;YY(v,s.type,h,c),v[En]=c;}catch(E){Pn(s,s.return,E);}}function PP(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&sl(s.type)||s.tag===4}function wC(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||PP(s.return))return null;s=s.return;}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&sl(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child;}if(!(s.flags&2))return s.stateNode}}function $C(s,c,h){var v=s.tag;if(v===5||v===6)s=s.stateNode,c?(h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h).insertBefore(s,c):(c=h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h,c.appendChild(s),h=h._reactRootContainer,h!=null||c.onclick!==null||(c.onclick=Za));else if(v!==4&&(v===27&&sl(s.type)&&(h=s.stateNode,c=null),s=s.child,s!==null))for($C(s,c,h),s=s.sibling;s!==null;)$C(s,c,h),s=s.sibling;}function yv(s,c,h){var v=s.tag;if(v===5||v===6)s=s.stateNode,c?h.insertBefore(s,c):h.appendChild(s);else if(v!==4&&(v===27&&sl(s.type)&&(h=s.stateNode),s=s.child,s!==null))for(yv(s,c,h),s=s.sibling;s!==null;)yv(s,c,h),s=s.sibling;}function IP(s){var c=s.stateNode,h=s.memoizedProps;try{for(var v=s.type,E=c.attributes;E.length;)c.removeAttributeNode(E[0]);Wr(c,v,h),c[Bt]=s,c[En]=h;}catch(A){Pn(s,s.return,A);}}var ls=false,vr=false,EC=false,OP=typeof WeakSet=="function"?WeakSet:Set,Or=null;function TY(s,c){if(s=s.containerInfo,WC=Fv,s=q6(s),bS(s)){if("selectionStart"in s)var h={start:s.selectionStart,end:s.selectionEnd};else e:{h=(h=s.ownerDocument)&&h.defaultView||window;var v=h.getSelection&&h.getSelection();if(v&&v.rangeCount!==0){h=v.anchorNode;var E=v.anchorOffset,A=v.focusNode;v=v.focusOffset;try{h.nodeType,A.nodeType;}catch{h=null;break e}var k=0,Z=-1,ce=-1,$e=0,De=0,Ve=s,Me=null;t:for(;;){for(var Ae;Ve!==h||E!==0&&Ve.nodeType!==3||(Z=k+E),Ve!==A||v!==0&&Ve.nodeType!==3||(ce=k+v),Ve.nodeType===3&&(k+=Ve.nodeValue.length),(Ae=Ve.firstChild)!==null;)Me=Ve,Ve=Ae;for(;;){if(Ve===s)break t;if(Me===h&&++$e===E&&(Z=k),Me===A&&++De===v&&(ce=k),(Ae=Ve.nextSibling)!==null)break;Ve=Me,Me=Ve.parentNode;}Ve=Ae;}h=Z===-1||ce===-1?null:{start:Z,end:ce};}else h=null;}h=h||{start:0,end:0};}else h=null;for(GC={focusedElem:s,selectionRange:h},Fv=false,Or=c;Or!==null;)if(c=Or,s=c.child,(c.subtreeFlags&1028)!==0&&s!==null)s.return=c,Or=s;else for(;Or!==null;){switch(c=Or,A=c.alternate,s=c.flags,c.tag){case 0:if((s&4)!==0&&(s=c.updateQueue,s=s!==null?s.events:null,s!==null))for(h=0;h<s.length;h++)E=s[h],E.ref.impl=E.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&A!==null){s=void 0,h=c,E=A.memoizedProps,A=A.memoizedState,v=h.stateNode;try{var pt=xc(h.type,E);s=v.getSnapshotBeforeUpdate(pt,A),v.__reactInternalSnapshotBeforeUpdate=s;}catch(Nt){Pn(h,h.return,Nt);}}break;case 3:if((s&1024)!==0){if(s=c.stateNode.containerInfo,h=s.nodeType,h===9)XC(s);else if(h===1)switch(s.nodeName){case "HEAD":case "HTML":case "BODY":XC(s);break;default:s.textContent="";}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(r(163))}if(s=c.sibling,s!==null){s.return=c.return,Or=s;break}Or=c.return;}}function DP(s,c,h){var v=h.flags;switch(h.tag){case 0:case 11:case 15:us(s,h),v&4&&Em(5,h);break;case 1:if(us(s,h),v&4)if(s=h.stateNode,c===null)try{s.componentDidMount();}catch(k){Pn(h,h.return,k);}else {var E=xc(h.type,c.memoizedProps);c=c.memoizedState;try{s.componentDidUpdate(E,c,s.__reactInternalSnapshotBeforeUpdate);}catch(k){Pn(h,h.return,k);}}v&64&&TP(h),v&512&&Mm(h,h.return);break;case 3:if(us(s,h),v&64&&(s=h.updateQueue,s!==null)){if(c=null,h.child!==null)switch(h.child.tag){case 27:case 5:c=h.child.stateNode;break;case 1:c=h.child.stateNode;}try{bN(s,c);}catch(k){Pn(h,h.return,k);}}break;case 27:c===null&&v&4&&IP(h);case 26:case 5:us(s,h),c===null&&v&4&&NP(h),v&512&&Mm(h,h.return);break;case 12:us(s,h);break;case 31:us(s,h),v&4&&zP(s,h);break;case 13:us(s,h),v&4&&BP(s,h),v&64&&(s=h.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(h=zY.bind(null,h),rX(s,h))));break;case 22:if(v=h.memoizedState!==null||ls,!v){c=c!==null&&c.memoizedState!==null||vr,E=ls;var A=vr;ls=v,(vr=c)&&!A?ds(s,h,(h.subtreeFlags&8772)!==0):us(s,h),ls=E,vr=A;}break;case 30:break;default:us(s,h);}}function _P(s){var c=s.alternate;c!==null&&(s.alternate=null,_P(c)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(c=s.stateNode,c!==null&&en(c)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null;}var Xn=null,Bo=false;function cs(s,c,h){for(h=h.child;h!==null;)LP(s,c,h),h=h.sibling;}function LP(s,c,h){if(_e&&typeof _e.onCommitFiberUnmount=="function")try{_e.onCommitFiberUnmount(Ke,h);}catch{}switch(h.tag){case 26:vr||Na(h,c),cs(s,c,h),h.memoizedState?h.memoizedState.count--:h.stateNode&&(h=h.stateNode,h.parentNode.removeChild(h));break;case 27:vr||Na(h,c);var v=Xn,E=Bo;sl(h.type)&&(Xn=h.stateNode,Bo=false),cs(s,c,h),_m(h.stateNode),Xn=v,Bo=E;break;case 5:vr||Na(h,c);case 6:if(v=Xn,E=Bo,Xn=null,cs(s,c,h),Xn=v,Bo=E,Xn!==null)if(Bo)try{(Xn.nodeType===9?Xn.body:Xn.nodeName==="HTML"?Xn.ownerDocument.body:Xn).removeChild(h.stateNode);}catch(A){Pn(h,c,A);}else try{Xn.removeChild(h.stateNode);}catch(A){Pn(h,c,A);}break;case 18:Xn!==null&&(Bo?(s=Xn,T4(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,h.stateNode),cd(s)):T4(Xn,h.stateNode));break;case 4:v=Xn,E=Bo,Xn=h.stateNode.containerInfo,Bo=true,cs(s,c,h),Xn=v,Bo=E;break;case 0:case 11:case 14:case 15:el(2,h,c),vr||el(4,h,c),cs(s,c,h);break;case 1:vr||(Na(h,c),v=h.stateNode,typeof v.componentWillUnmount=="function"&&AP(h,c,v)),cs(s,c,h);break;case 21:cs(s,c,h);break;case 22:vr=(v=vr)||h.memoizedState!==null,cs(s,c,h),vr=v;break;default:cs(s,c,h);}}function zP(s,c){if(c.memoizedState===null&&(s=c.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{cd(s);}catch(h){Pn(c,c.return,h);}}}function BP(s,c){if(c.memoizedState===null&&(s=c.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{cd(s);}catch(h){Pn(c,c.return,h);}}function AY(s){switch(s.tag){case 31:case 13:case 19:var c=s.stateNode;return c===null&&(c=s.stateNode=new OP),c;case 22:return s=s.stateNode,c=s._retryCache,c===null&&(c=s._retryCache=new OP),c;default:throw Error(r(435,s.tag))}}function Sv(s,c){var h=AY(s);c.forEach(function(v){if(!h.has(v)){h.add(v);var E=BY.bind(null,s,v);v.then(E,E);}});}function ko(s,c){var h=c.deletions;if(h!==null)for(var v=0;v<h.length;v++){var E=h[v],A=s,k=c,Z=k;e:for(;Z!==null;){switch(Z.tag){case 27:if(sl(Z.type)){Xn=Z.stateNode,Bo=false;break e}break;case 5:Xn=Z.stateNode,Bo=false;break e;case 3:case 4:Xn=Z.stateNode.containerInfo,Bo=true;break e}Z=Z.return;}if(Xn===null)throw Error(r(160));LP(A,k,E),Xn=null,Bo=false,A=E.alternate,A!==null&&(A.return=null),E.return=null;}if(c.subtreeFlags&13886)for(c=c.child;c!==null;)kP(c,s),c=c.sibling;}var ea=null;function kP(s,c){var h=s.alternate,v=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:ko(c,s),Fo(s),v&4&&(el(3,s,s.return),Em(3,s),el(5,s,s.return));break;case 1:ko(c,s),Fo(s),v&512&&(vr||h===null||Na(h,h.return)),v&64&&ls&&(s=s.updateQueue,s!==null&&(v=s.callbacks,v!==null&&(h=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=h===null?v:h.concat(v))));break;case 26:var E=ea;if(ko(c,s),Fo(s),v&512&&(vr||h===null||Na(h,h.return)),v&4){var A=h!==null?h.memoizedState:null;if(v=s.memoizedState,h===null)if(v===null)if(s.stateNode===null){e:{v=s.type,h=s.memoizedProps,E=E.ownerDocument||E;t:switch(v){case "title":A=E.getElementsByTagName("title")[0],(!A||A[_t]||A[Bt]||A.namespaceURI==="http://www.w3.org/2000/svg"||A.hasAttribute("itemprop"))&&(A=E.createElement(v),E.head.insertBefore(A,E.querySelector("head > title"))),Wr(A,v,h),A[Bt]=s,In(A),v=A;break e;case "link":var k=k4("link","href",E).get(v+(h.href||""));if(k){for(var Z=0;Z<k.length;Z++)if(A=k[Z],A.getAttribute("href")===(h.href==null||h.href===""?null:h.href)&&A.getAttribute("rel")===(h.rel==null?null:h.rel)&&A.getAttribute("title")===(h.title==null?null:h.title)&&A.getAttribute("crossorigin")===(h.crossOrigin==null?null:h.crossOrigin)){k.splice(Z,1);break t}}A=E.createElement(v),Wr(A,v,h),E.head.appendChild(A);break;case "meta":if(k=k4("meta","content",E).get(v+(h.content||""))){for(Z=0;Z<k.length;Z++)if(A=k[Z],A.getAttribute("content")===(h.content==null?null:""+h.content)&&A.getAttribute("name")===(h.name==null?null:h.name)&&A.getAttribute("property")===(h.property==null?null:h.property)&&A.getAttribute("http-equiv")===(h.httpEquiv==null?null:h.httpEquiv)&&A.getAttribute("charset")===(h.charSet==null?null:h.charSet)){k.splice(Z,1);break t}}A=E.createElement(v),Wr(A,v,h),E.head.appendChild(A);break;default:throw Error(r(468,v))}A[Bt]=s,In(A),v=A;}s.stateNode=v;}else F4(E,s.type,s.stateNode);else s.stateNode=B4(E,v,s.memoizedProps);else A!==v?(A===null?h.stateNode!==null&&(h=h.stateNode,h.parentNode.removeChild(h)):A.count--,v===null?F4(E,s.type,s.stateNode):B4(E,v,s.memoizedProps)):v===null&&s.stateNode!==null&&xC(s,s.memoizedProps,h.memoizedProps);}break;case 27:ko(c,s),Fo(s),v&512&&(vr||h===null||Na(h,h.return)),h!==null&&v&4&&xC(s,s.memoizedProps,h.memoizedProps);break;case 5:if(ko(c,s),Fo(s),v&512&&(vr||h===null||Na(h,h.return)),s.flags&32){E=s.stateNode;try{Iu(E,"");}catch(pt){Pn(s,s.return,pt);}}v&4&&s.stateNode!=null&&(E=s.memoizedProps,xC(s,E,h!==null?h.memoizedProps:E)),v&1024&&(EC=true);break;case 6:if(ko(c,s),Fo(s),v&4){if(s.stateNode===null)throw Error(r(162));v=s.memoizedProps,h=s.stateNode;try{h.nodeValue=v;}catch(pt){Pn(s,s.return,pt);}}break;case 3:if(Lv=null,E=ea,ea=Dv(c.containerInfo),ko(c,s),ea=E,Fo(s),v&4&&h!==null&&h.memoizedState.isDehydrated)try{cd(c.containerInfo);}catch(pt){Pn(s,s.return,pt);}EC&&(EC=false,FP(s));break;case 4:v=ea,ea=Dv(s.stateNode.containerInfo),ko(c,s),Fo(s),ea=v;break;case 12:ko(c,s),Fo(s);break;case 31:ko(c,s),Fo(s),v&4&&(v=s.updateQueue,v!==null&&(s.updateQueue=null,Sv(s,v)));break;case 13:ko(c,s),Fo(s),s.child.flags&8192&&s.memoizedState!==null!=(h!==null&&h.memoizedState!==null)&&(xv=Re()),v&4&&(v=s.updateQueue,v!==null&&(s.updateQueue=null,Sv(s,v)));break;case 22:E=s.memoizedState!==null;var ce=h!==null&&h.memoizedState!==null,$e=ls,De=vr;if(ls=$e||E,vr=De||ce,ko(c,s),vr=De,ls=$e,Fo(s),v&8192)e:for(c=s.stateNode,c._visibility=E?c._visibility&-2:c._visibility|1,E&&(h===null||ce||ls||vr||wc(s)),h=null,c=s;;){if(c.tag===5||c.tag===26){if(h===null){ce=h=c;try{if(A=ce.stateNode,E)k=A.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else {Z=ce.stateNode;var Ve=ce.memoizedProps.style,Me=Ve!=null&&Ve.hasOwnProperty("display")?Ve.display:null;Z.style.display=Me==null||typeof Me=="boolean"?"":(""+Me).trim();}}catch(pt){Pn(ce,ce.return,pt);}}}else if(c.tag===6){if(h===null){ce=c;try{ce.stateNode.nodeValue=E?"":ce.memoizedProps;}catch(pt){Pn(ce,ce.return,pt);}}}else if(c.tag===18){if(h===null){ce=c;try{var Ae=ce.stateNode;E?A4(Ae,!0):A4(ce.stateNode,!1);}catch(pt){Pn(ce,ce.return,pt);}}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===s)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break e;for(;c.sibling===null;){if(c.return===null||c.return===s)break e;h===c&&(h=null),c=c.return;}h===c&&(h=null),c.sibling.return=c.return,c=c.sibling;}v&4&&(v=s.updateQueue,v!==null&&(h=v.retryQueue,h!==null&&(v.retryQueue=null,Sv(s,h))));break;case 19:ko(c,s),Fo(s),v&4&&(v=s.updateQueue,v!==null&&(s.updateQueue=null,Sv(s,v)));break;case 30:break;case 21:break;default:ko(c,s),Fo(s);}}function Fo(s){var c=s.flags;if(c&2){try{for(var h,v=s.return;v!==null;){if(PP(v)){h=v;break}v=v.return;}if(h==null)throw Error(r(160));switch(h.tag){case 27:var E=h.stateNode,A=wC(s);yv(s,A,E);break;case 5:var k=h.stateNode;h.flags&32&&(Iu(k,""),h.flags&=-33);var Z=wC(s);yv(s,Z,k);break;case 3:case 4:var ce=h.stateNode.containerInfo,$e=wC(s);$C(s,$e,ce);break;default:throw Error(r(161))}}catch(De){Pn(s,s.return,De);}s.flags&=-3;}c&4096&&(s.flags&=-4097);}function FP(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var c=s;FP(c),c.tag===5&&c.flags&1024&&c.stateNode.reset(),s=s.sibling;}}function us(s,c){if(c.subtreeFlags&8772)for(c=c.child;c!==null;)DP(s,c.alternate,c),c=c.sibling;}function wc(s){for(s=s.child;s!==null;){var c=s;switch(c.tag){case 0:case 11:case 14:case 15:el(4,c,c.return),wc(c);break;case 1:Na(c,c.return);var h=c.stateNode;typeof h.componentWillUnmount=="function"&&AP(c,c.return,h),wc(c);break;case 27:_m(c.stateNode);case 26:case 5:Na(c,c.return),wc(c);break;case 22:c.memoizedState===null&&wc(c);break;case 30:wc(c);break;default:wc(c);}s=s.sibling;}}function ds(s,c,h){for(h=h&&(c.subtreeFlags&8772)!==0,c=c.child;c!==null;){var v=c.alternate,E=s,A=c,k=A.flags;switch(A.tag){case 0:case 11:case 15:ds(E,A,h),Em(4,A);break;case 1:if(ds(E,A,h),v=A,E=v.stateNode,typeof E.componentDidMount=="function")try{E.componentDidMount();}catch($e){Pn(v,v.return,$e);}if(v=A,E=v.updateQueue,E!==null){var Z=v.stateNode;try{var ce=E.shared.hiddenCallbacks;if(ce!==null)for(E.shared.hiddenCallbacks=null,E=0;E<ce.length;E++)vN(ce[E],Z);}catch($e){Pn(v,v.return,$e);}}h&&k&64&&TP(A),Mm(A,A.return);break;case 27:IP(A);case 26:case 5:ds(E,A,h),h&&v===null&&k&4&&NP(A),Mm(A,A.return);break;case 12:ds(E,A,h);break;case 31:ds(E,A,h),h&&k&4&&zP(E,A);break;case 13:ds(E,A,h),h&&k&4&&BP(E,A);break;case 22:A.memoizedState===null&&ds(E,A,h),Mm(A,A.return);break;case 30:break;default:ds(E,A,h);}c=c.sibling;}}function MC(s,c){var h=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),s=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(s=c.memoizedState.cachePool.pool),s!==h&&(s!=null&&s.refCount++,h!=null&&fm(h));}function RC(s,c){s=null,c.alternate!==null&&(s=c.alternate.memoizedState.cache),c=c.memoizedState.cache,c!==s&&(c.refCount++,s!=null&&fm(s));}function ta(s,c,h,v){if(c.subtreeFlags&10256)for(c=c.child;c!==null;)HP(s,c,h,v),c=c.sibling;}function HP(s,c,h,v){var E=c.flags;switch(c.tag){case 0:case 11:case 15:ta(s,c,h,v),E&2048&&Em(9,c);break;case 1:ta(s,c,h,v);break;case 3:ta(s,c,h,v),E&2048&&(s=null,c.alternate!==null&&(s=c.alternate.memoizedState.cache),c=c.memoizedState.cache,c!==s&&(c.refCount++,s!=null&&fm(s)));break;case 12:if(E&2048){ta(s,c,h,v),s=c.stateNode;try{var A=c.memoizedProps,k=A.id,Z=A.onPostCommit;typeof Z=="function"&&Z(k,c.alternate===null?"mount":"update",s.passiveEffectDuration,-0);}catch(ce){Pn(c,c.return,ce);}}else ta(s,c,h,v);break;case 31:ta(s,c,h,v);break;case 13:ta(s,c,h,v);break;case 23:break;case 22:A=c.stateNode,k=c.alternate,c.memoizedState!==null?A._visibility&2?ta(s,c,h,v):Rm(s,c):A._visibility&2?ta(s,c,h,v):(A._visibility|=2,Zu(s,c,h,v,(c.subtreeFlags&10256)!==0||false)),E&2048&&MC(k,c);break;case 24:ta(s,c,h,v),E&2048&&RC(c.alternate,c);break;default:ta(s,c,h,v);}}function Zu(s,c,h,v,E){for(E=E&&((c.subtreeFlags&10256)!==0||false),c=c.child;c!==null;){var A=s,k=c,Z=h,ce=v,$e=k.flags;switch(k.tag){case 0:case 11:case 15:Zu(A,k,Z,ce,E),Em(8,k);break;case 23:break;case 22:var De=k.stateNode;k.memoizedState!==null?De._visibility&2?Zu(A,k,Z,ce,E):Rm(A,k):(De._visibility|=2,Zu(A,k,Z,ce,E)),E&&$e&2048&&MC(k.alternate,k);break;case 24:Zu(A,k,Z,ce,E),E&&$e&2048&&RC(k.alternate,k);break;default:Zu(A,k,Z,ce,E);}c=c.sibling;}}function Rm(s,c){if(c.subtreeFlags&10256)for(c=c.child;c!==null;){var h=s,v=c,E=v.flags;switch(v.tag){case 22:Rm(h,v),E&2048&&MC(v.alternate,v);break;case 24:Rm(h,v),E&2048&&RC(v.alternate,v);break;default:Rm(h,v);}c=c.sibling;}}var Tm=8192;function Ju(s,c,h){if(s.subtreeFlags&Tm)for(s=s.child;s!==null;)VP(s,c,h),s=s.sibling;}function VP(s,c,h){switch(s.tag){case 26:Ju(s,c,h),s.flags&Tm&&s.memoizedState!==null&&pX(h,ea,s.memoizedState,s.memoizedProps);break;case 5:Ju(s,c,h);break;case 3:case 4:var v=ea;ea=Dv(s.stateNode.containerInfo),Ju(s,c,h),ea=v;break;case 22:s.memoizedState===null&&(v=s.alternate,v!==null&&v.memoizedState!==null?(v=Tm,Tm=16777216,Ju(s,c,h),Tm=v):Ju(s,c,h));break;default:Ju(s,c,h);}}function jP(s){var c=s.alternate;if(c!==null&&(s=c.child,s!==null)){c.child=null;do c=s.sibling,s.sibling=null,s=c;while(s!==null)}}function Am(s){var c=s.deletions;if((s.flags&16)!==0){if(c!==null)for(var h=0;h<c.length;h++){var v=c[h];Or=v,qP(v,s);}jP(s);}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)UP(s),s=s.sibling;}function UP(s){switch(s.tag){case 0:case 11:case 15:Am(s),s.flags&2048&&el(9,s,s.return);break;case 3:Am(s);break;case 12:Am(s);break;case 22:var c=s.stateNode;s.memoizedState!==null&&c._visibility&2&&(s.return===null||s.return.tag!==13)?(c._visibility&=-3,Cv(s)):Am(s);break;default:Am(s);}}function Cv(s){var c=s.deletions;if((s.flags&16)!==0){if(c!==null)for(var h=0;h<c.length;h++){var v=c[h];Or=v,qP(v,s);}jP(s);}for(s=s.child;s!==null;){switch(c=s,c.tag){case 0:case 11:case 15:el(8,c,c.return),Cv(c);break;case 22:h=c.stateNode,h._visibility&2&&(h._visibility&=-3,Cv(c));break;default:Cv(c);}s=s.sibling;}}function qP(s,c){for(;Or!==null;){var h=Or;switch(h.tag){case 0:case 11:case 15:el(8,h,c);break;case 23:case 22:if(h.memoizedState!==null&&h.memoizedState.cachePool!==null){var v=h.memoizedState.cachePool.pool;v!=null&&v.refCount++;}break;case 24:fm(h.memoizedState.cache);}if(v=h.child,v!==null)v.return=h,Or=v;else e:for(h=s;Or!==null;){v=Or;var E=v.sibling,A=v.return;if(_P(v),v===h){Or=null;break e}if(E!==null){E.return=A,Or=E;break e}Or=A;}}}var NY={getCacheForType:function(s){var c=Ur(hr),h=c.data.get(s);return h===void 0&&(h=s(),c.data.set(s,h)),h},cacheSignal:function(){return Ur(hr).controller.signal}},PY=typeof WeakMap=="function"?WeakMap:Map,Sn=0,Fn=null,tn=null,on=0,Nn=0,ii=null,tl=false,ed=false,TC=false,fs=0,tr=0,nl=0,$c=0,AC=0,ai=0,td=0,Nm=null,Ho=null,NC=false,xv=0,WP=0,wv=1/0,$v=null,rl=null,$r=0,ol=null,nd=null,ms=0,PC=0,IC=null,GP=null,Pm=0,OC=null;function si(){return (Sn&2)!==0&&on!==0?on&-on:B.T!==null?kC():mt()}function KP(){if(ai===0)if((on&536870912)===0||fn){var s=xt;xt<<=1,(xt&3932160)===0&&(xt=262144),ai=s;}else ai=536870912;return s=ri.current,s!==null&&(s.flags|=32),ai}function Vo(s,c,h){(s===Fn&&(Nn===2||Nn===9)||s.cancelPendingCommit!==null)&&(rd(s,0),il(s,on,ai,false)),Ce(s,h),((Sn&2)===0||s!==Fn)&&(s===Fn&&((Sn&2)===0&&($c|=h),tr===4&&il(s,on,ai,false)),Pa(s));}function YP(s,c,h){if((Sn&6)!==0)throw Error(r(327));var v=!h&&(c&127)===0&&(c&s.expiredLanes)===0||He(s,c),E=v?DY(s,c):_C(s,c,true),A=v;do{if(E===0){ed&&!v&&il(s,c,0,false);break}else {if(h=s.current.alternate,A&&!IY(h)){E=_C(s,c,false),A=false;continue}if(E===2){if(A=c,s.errorRecoveryDisabledLanes&A)var k=0;else k=s.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){c=k;e:{var Z=s;E=Nm;var ce=Z.current.memoizedState.isDehydrated;if(ce&&(rd(Z,k).flags|=256),k=_C(Z,k,false),k!==2){if(TC&&!ce){Z.errorRecoveryDisabledLanes|=A,$c|=A,E=4;break e}A=Ho,Ho=E,A!==null&&(Ho===null?Ho=A:Ho.push.apply(Ho,A));}E=k;}if(A=false,E!==2)continue}}if(E===1){rd(s,0),il(s,c,0,true);break}e:{switch(v=s,A=E,A){case 0:case 1:throw Error(r(345));case 4:if((c&4194048)!==c)break;case 6:il(v,c,ai,!tl);break e;case 2:Ho=null;break;case 3:case 5:break;default:throw Error(r(329))}if((c&62914560)===c&&(E=xv+300-Re(),10<E)){if(il(v,c,ai,!tl),st(v,0,true)!==0)break e;ms=c,v.timeoutHandle=M4(XP.bind(null,v,h,Ho,$v,NC,c,ai,$c,td,tl,A,"Throttled",-0,0),E);break e}XP(v,h,Ho,$v,NC,c,ai,$c,td,tl,A,null,-0,0);}}break}while(true);Pa(s);}function XP(s,c,h,v,E,A,k,Z,ce,$e,De,Ve,Me,Ae){if(s.timeoutHandle=-1,Ve=c.subtreeFlags,Ve&8192||(Ve&16785408)===16785408){Ve={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:true,waitingForViewTransition:false,unsuspend:Za},VP(c,A,Ve);var pt=(A&62914560)===A?xv-Re():(A&4194048)===A?WP-Re():0;if(pt=gX(Ve,pt),pt!==null){ms=A,s.cancelPendingCommit=pt(o4.bind(null,s,c,A,h,v,E,k,Z,ce,De,Ve,null,Me,Ae)),il(s,A,k,!$e);return}}o4(s,c,A,h,v,E,k,Z,ce);}function IY(s){for(var c=s;;){var h=c.tag;if((h===0||h===11||h===15)&&c.flags&16384&&(h=c.updateQueue,h!==null&&(h=h.stores,h!==null)))for(var v=0;v<h.length;v++){var E=h[v],A=E.getSnapshot;E=E.value;try{if(!ti(A(),E))return !1}catch{return false}}if(h=c.child,c.subtreeFlags&16384&&h!==null)h.return=c,c=h;else {if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return true;c=c.return;}c.sibling.return=c.return,c=c.sibling;}}return true}function il(s,c,h,v){c&=~AC,c&=~$c,s.suspendedLanes|=c,s.pingedLanes&=~c,v&&(s.warmLanes|=c),v=s.expirationTimes;for(var E=c;0<E;){var A=31-lt(E),k=1<<A;v[A]=-1,E&=~k;}h!==0&&Ie(s,h,c);}function Ev(){return (Sn&6)===0?(Im(0),false):true}function DC(){if(tn!==null){if(Nn===0)var s=tn.return;else s=tn,ns=pc=null,XS(s),Gu=null,hm=0,s=tn;for(;s!==null;)RP(s.alternate,s),s=s.return;tn=null;}}function rd(s,c){var h=s.timeoutHandle;h!==-1&&(s.timeoutHandle=-1,ZY(h)),h=s.cancelPendingCommit,h!==null&&(s.cancelPendingCommit=null,h()),ms=0,DC(),Fn=s,tn=h=es(s.current,null),on=c,Nn=0,ii=null,tl=false,ed=He(s,c),TC=false,td=ai=AC=$c=nl=tr=0,Ho=Nm=null,NC=false,(c&8)!==0&&(c|=c&32);var v=s.entangledLanes;if(v!==0)for(s=s.entanglements,v&=c;0<v;){var E=31-lt(v),A=1<<E;c|=s[E],v&=~A;}return fs=c,Wg(),h}function QP(s,c){Wt=null,B.H=xm,c===Wu||c===ev?(c=mN(),Nn=3):c===BS?(c=mN(),Nn=4):Nn=c===fC?8:c!==null&&typeof c=="object"&&typeof c.then=="function"?6:1,ii=c,tn===null&&(tr=1,hv(s,Ti(c,s.current)));}function ZP(){var s=ri.current;return s===null?true:(on&4194048)===on?Ii===null:(on&62914560)===on||(on&536870912)!==0?s===Ii:false}function JP(){var s=B.H;return B.H=xm,s===null?xm:s}function e4(){var s=B.A;return B.A=NY,s}function Mv(){tr=4,tl||(on&4194048)!==on&&ri.current!==null||(ed=true),(nl&134217727)===0&&($c&134217727)===0||Fn===null||il(Fn,on,ai,false);}function _C(s,c,h){var v=Sn;Sn|=2;var E=JP(),A=e4();(Fn!==s||on!==c)&&($v=null,rd(s,c)),c=false;var k=tr;e:do try{if(Nn!==0&&tn!==null){var Z=tn,ce=ii;switch(Nn){case 8:DC(),k=6;break e;case 3:case 2:case 9:case 6:ri.current===null&&(c=!0);var $e=Nn;if(Nn=0,ii=null,od(s,Z,ce,$e),h&&ed){k=0;break e}break;default:$e=Nn,Nn=0,ii=null,od(s,Z,ce,$e);}}OY(),k=tr;break}catch(De){QP(s,De);}while(true);return c&&s.shellSuspendCounter++,ns=pc=null,Sn=v,B.H=E,B.A=A,tn===null&&(Fn=null,on=0,Wg()),k}function OY(){for(;tn!==null;)t4(tn);}function DY(s,c){var h=Sn;Sn|=2;var v=JP(),E=e4();Fn!==s||on!==c?($v=null,wv=Re()+500,rd(s,c)):ed=He(s,c);e:do try{if(Nn!==0&&tn!==null){c=tn;var A=ii;t:switch(Nn){case 1:Nn=0,ii=null,od(s,c,A,1);break;case 2:case 9:if(dN(A)){Nn=0,ii=null,n4(c);break}c=function(){Nn!==2&&Nn!==9||Fn!==s||(Nn=7),Pa(s);},A.then(c,c);break e;case 3:Nn=7;break e;case 4:Nn=5;break e;case 7:dN(A)?(Nn=0,ii=null,n4(c)):(Nn=0,ii=null,od(s,c,A,7));break;case 5:var k=null;switch(tn.tag){case 26:k=tn.memoizedState;case 5:case 27:var Z=tn;if(k?H4(k):Z.stateNode.complete){Nn=0,ii=null;var ce=Z.sibling;if(ce!==null)tn=ce;else {var $e=Z.return;$e!==null?(tn=$e,Rv($e)):tn=null;}break t}}Nn=0,ii=null,od(s,c,A,5);break;case 6:Nn=0,ii=null,od(s,c,A,6);break;case 8:DC(),tr=6;break e;default:throw Error(r(462))}}_Y();break}catch(De){QP(s,De);}while(true);return ns=pc=null,B.H=v,B.A=E,Sn=h,tn!==null?0:(Fn=null,on=0,Wg(),tr)}function _Y(){for(;tn!==null&&!fe();)t4(tn);}function t4(s){var c=EP(s.alternate,s,fs);s.memoizedProps=s.pendingProps,c===null?Rv(s):tn=c;}function n4(s){var c=s,h=c.alternate;switch(c.tag){case 15:case 0:c=yP(h,c,c.pendingProps,c.type,void 0,on);break;case 11:c=yP(h,c,c.pendingProps,c.type.render,c.ref,on);break;case 5:XS(c);default:RP(h,c),c=tn=eN(c,fs),c=EP(h,c,fs);}s.memoizedProps=s.pendingProps,c===null?Rv(s):tn=c;}function od(s,c,h,v){ns=pc=null,XS(c),Gu=null,hm=0;var E=c.return;try{if(wY(s,E,c,h,on)){tr=1,hv(s,Ti(h,s.current)),tn=null;return}}catch(A){if(E!==null)throw tn=E,A;tr=1,hv(s,Ti(h,s.current)),tn=null;return}c.flags&32768?(fn||v===1?s=true:ed||(on&536870912)!==0?s=false:(tl=s=true,(v===2||v===9||v===3||v===6)&&(v=ri.current,v!==null&&v.tag===13&&(v.flags|=16384))),r4(c,s)):Rv(c);}function Rv(s){var c=s;do{if((c.flags&32768)!==0){r4(c,tl);return}s=c.return;var h=MY(c.alternate,c,fs);if(h!==null){tn=h;return}if(c=c.sibling,c!==null){tn=c;return}tn=c=s;}while(c!==null);tr===0&&(tr=5);}function r4(s,c){do{var h=RY(s.alternate,s);if(h!==null){h.flags&=32767,tn=h;return}if(h=s.return,h!==null&&(h.flags|=32768,h.subtreeFlags=0,h.deletions=null),!c&&(s=s.sibling,s!==null)){tn=s;return}tn=s=h;}while(s!==null);tr=6,tn=null;}function o4(s,c,h,v,E,A,k,Z,ce){s.cancelPendingCommit=null;do Tv();while($r!==0);if((Sn&6)!==0)throw Error(r(327));if(c!==null){if(c===s.current)throw Error(r(177));if(A=c.lanes|c.childLanes,A|=wS,he(s,h,A,k,Z,ce),s===Fn&&(tn=Fn=null,on=0),nd=c,ol=s,ms=h,PC=A,IC=E,GP=v,(c.subtreeFlags&10256)!==0||(c.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,kY(tt,function(){return c4(),null})):(s.callbackNode=null,s.callbackPriority=0),v=(c.flags&13878)!==0,(c.subtreeFlags&13878)!==0||v){v=B.T,B.T=null,E=F.p,F.p=2,k=Sn,Sn|=4;try{TY(s,c,h);}finally{Sn=k,F.p=E,B.T=v;}}$r=1,i4(),a4(),s4();}}function i4(){if($r===1){$r=0;var s=ol,c=nd,h=(c.flags&13878)!==0;if((c.subtreeFlags&13878)!==0||h){h=B.T,B.T=null;var v=F.p;F.p=2;var E=Sn;Sn|=4;try{kP(c,s);var A=GC,k=q6(s.containerInfo),Z=A.focusedElem,ce=A.selectionRange;if(k!==Z&&Z&&Z.ownerDocument&&U6(Z.ownerDocument.documentElement,Z)){if(ce!==null&&bS(Z)){var $e=ce.start,De=ce.end;if(De===void 0&&(De=$e),"selectionStart"in Z)Z.selectionStart=$e,Z.selectionEnd=Math.min(De,Z.value.length);else {var Ve=Z.ownerDocument||document,Me=Ve&&Ve.defaultView||window;if(Me.getSelection){var Ae=Me.getSelection(),pt=Z.textContent.length,Nt=Math.min(ce.start,pt),_n=ce.end===void 0?Nt:Math.min(ce.end,pt);!Ae.extend&&Nt>_n&&(k=_n,_n=Nt,Nt=k);var pe=j6(Z,Nt),me=j6(Z,_n);if(pe&&me&&(Ae.rangeCount!==1||Ae.anchorNode!==pe.node||Ae.anchorOffset!==pe.offset||Ae.focusNode!==me.node||Ae.focusOffset!==me.offset)){var xe=Ve.createRange();xe.setStart(pe.node,pe.offset),Ae.removeAllRanges(),Nt>_n?(Ae.addRange(xe),Ae.extend(me.node,me.offset)):(xe.setEnd(me.node,me.offset),Ae.addRange(xe));}}}}for(Ve=[],Ae=Z;Ae=Ae.parentNode;)Ae.nodeType===1&&Ve.push({element:Ae,left:Ae.scrollLeft,top:Ae.scrollTop});for(typeof Z.focus=="function"&&Z.focus(),Z=0;Z<Ve.length;Z++){var Fe=Ve[Z];Fe.element.scrollLeft=Fe.left,Fe.element.scrollTop=Fe.top;}}Fv=!!WC,GC=WC=null;}finally{Sn=E,F.p=v,B.T=h;}}s.current=c,$r=2;}}function a4(){if($r===2){$r=0;var s=ol,c=nd,h=(c.flags&8772)!==0;if((c.subtreeFlags&8772)!==0||h){h=B.T,B.T=null;var v=F.p;F.p=2;var E=Sn;Sn|=4;try{DP(s,c.alternate,c);}finally{Sn=E,F.p=v,B.T=h;}}$r=3;}}function s4(){if($r===4||$r===3){$r=0,be();var s=ol,c=nd,h=ms,v=GP;(c.subtreeFlags&10256)!==0||(c.flags&10256)!==0?$r=5:($r=0,nd=ol=null,l4(s,s.pendingLanes));var E=s.pendingLanes;if(E===0&&(rl=null),it(h),c=c.stateNode,_e&&typeof _e.onCommitFiberRoot=="function")try{_e.onCommitFiberRoot(Ke,c,void 0,(c.current.flags&128)===128);}catch{}if(v!==null){c=B.T,E=F.p,F.p=2,B.T=null;try{for(var A=s.onRecoverableError,k=0;k<v.length;k++){var Z=v[k];A(Z.value,{componentStack:Z.stack});}}finally{B.T=c,F.p=E;}}(ms&3)!==0&&Tv(),Pa(s),E=s.pendingLanes,(h&261930)!==0&&(E&42)!==0?s===OC?Pm++:(Pm=0,OC=s):Pm=0,Im(0);}}function l4(s,c){(s.pooledCacheLanes&=c)===0&&(c=s.pooledCache,c!=null&&(s.pooledCache=null,fm(c)));}function Tv(){return i4(),a4(),s4(),c4()}function c4(){if($r!==5)return false;var s=ol,c=PC;PC=0;var h=it(ms),v=B.T,E=F.p;try{F.p=32>h?32:h,B.T=null,h=IC,IC=null;var A=ol,k=ms;if($r=0,nd=ol=null,ms=0,(Sn&6)!==0)throw Error(r(331));var Z=Sn;if(Sn|=4,UP(A.current),HP(A,A.current,k,h),Sn=Z,Im(0,!1),_e&&typeof _e.onPostCommitFiberRoot=="function")try{_e.onPostCommitFiberRoot(Ke,A);}catch{}return !0}finally{F.p=E,B.T=v,l4(s,c);}}function u4(s,c,h){c=Ti(h,c),c=dC(s.stateNode,c,2),s=Qs(s,c,2),s!==null&&(Ce(s,2),Pa(s));}function Pn(s,c,h){if(s.tag===3)u4(s,s,h);else for(;c!==null;){if(c.tag===3){u4(c,s,h);break}else if(c.tag===1){var v=c.stateNode;if(typeof c.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&(rl===null||!rl.has(v))){s=Ti(h,s),h=dP(2),v=Qs(c,h,2),v!==null&&(fP(h,v,c,s),Ce(v,2),Pa(v));break}}c=c.return;}}function LC(s,c,h){var v=s.pingCache;if(v===null){v=s.pingCache=new PY;var E=new Set;v.set(c,E);}else E=v.get(c),E===void 0&&(E=new Set,v.set(c,E));E.has(h)||(TC=true,E.add(h),s=LY.bind(null,s,c,h),c.then(s,s));}function LY(s,c,h){var v=s.pingCache;v!==null&&v.delete(c),s.pingedLanes|=s.suspendedLanes&h,s.warmLanes&=~h,Fn===s&&(on&h)===h&&(tr===4||tr===3&&(on&62914560)===on&&300>Re()-xv?(Sn&2)===0&&rd(s,0):AC|=h,td===on&&(td=0)),Pa(s);}function d4(s,c){c===0&&(c=ve()),s=fc(s,c),s!==null&&(Ce(s,c),Pa(s));}function zY(s){var c=s.memoizedState,h=0;c!==null&&(h=c.retryLane),d4(s,h);}function BY(s,c){var h=0;switch(s.tag){case 31:case 13:var v=s.stateNode,E=s.memoizedState;E!==null&&(h=E.retryLane);break;case 19:v=s.stateNode;break;case 22:v=s.stateNode._retryCache;break;default:throw Error(r(314))}v!==null&&v.delete(c),d4(s,h);}function kY(s,c){return je(s,c)}var Av=null,id=null,zC=false,Nv=false,BC=false,al=0;function Pa(s){s!==id&&s.next===null&&(id===null?Av=id=s:id=id.next=s),Nv=true,zC||(zC=true,HY());}function Im(s,c){if(!BC&&Nv){BC=true;do for(var h=false,v=Av;v!==null;){if(s!==0){var E=v.pendingLanes;if(E===0)var A=0;else {var k=v.suspendedLanes,Z=v.pingedLanes;A=(1<<31-lt(42|s)+1)-1,A&=E&~(k&~Z),A=A&201326741?A&201326741|1:A?A|2:0;}A!==0&&(h=true,p4(v,A));}else A=on,A=st(v,v===Fn?A:0,v.cancelPendingCommit!==null||v.timeoutHandle!==-1),(A&3)===0||He(v,A)||(h=true,p4(v,A));v=v.next;}while(h);BC=false;}}function FY(){f4();}function f4(){Nv=zC=false;var s=0;al!==0&&QY()&&(s=al);for(var c=Re(),h=null,v=Av;v!==null;){var E=v.next,A=m4(v,c);A===0?(v.next=null,h===null?Av=E:h.next=E,E===null&&(id=h)):(h=v,(s!==0||(A&3)!==0)&&(Nv=true)),v=E;}$r!==0&&$r!==5||Im(s),al!==0&&(al=0);}function m4(s,c){for(var h=s.suspendedLanes,v=s.pingedLanes,E=s.expirationTimes,A=s.pendingLanes&-62914561;0<A;){var k=31-lt(A),Z=1<<k,ce=E[k];ce===-1?((Z&h)===0||(Z&v)!==0)&&(E[k]=Ge(Z,c)):ce<=c&&(s.expiredLanes|=Z),A&=~Z;}if(c=Fn,h=on,h=st(s,s===c?h:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),v=s.callbackNode,h===0||s===c&&(Nn===2||Nn===9)||s.cancelPendingCommit!==null)return v!==null&&v!==null&&Ne(v),s.callbackNode=null,s.callbackPriority=0;if((h&3)===0||He(s,h)){if(c=h&-h,c===s.callbackPriority)return c;switch(v!==null&&Ne(v),it(h)){case 2:case 8:h=We;break;case 32:h=tt;break;case 268435456:h=Ze;break;default:h=tt;}return v=h4.bind(null,s),h=je(h,v),s.callbackPriority=c,s.callbackNode=h,c}return v!==null&&v!==null&&Ne(v),s.callbackPriority=2,s.callbackNode=null,2}function h4(s,c){if($r!==0&&$r!==5)return s.callbackNode=null,s.callbackPriority=0,null;var h=s.callbackNode;if(Tv()&&s.callbackNode!==h)return null;var v=on;return v=st(s,s===Fn?v:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),v===0?null:(YP(s,v,c),m4(s,Re()),s.callbackNode!=null&&s.callbackNode===h?h4.bind(null,s):null)}function p4(s,c){if(Tv())return null;YP(s,c,true);}function HY(){JY(function(){(Sn&6)!==0?je(Qe,FY):f4();});}function kC(){if(al===0){var s=Uu;s===0&&(s=Tt,Tt<<=1,(Tt&261888)===0&&(Tt=256)),al=s;}return al}function g4(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:Bg(""+s)}function v4(s,c){var h=c.ownerDocument.createElement("input");return h.name=c.name,h.value=c.value,s.id&&h.setAttribute("form",s.id),c.parentNode.insertBefore(h,c),s=new FormData(s),h.parentNode.removeChild(h),s}function VY(s,c,h,v,E){if(c==="submit"&&h&&h.stateNode===E){var A=g4((E[En]||null).action),k=v.submitter;k&&(c=(c=k[En]||null)?g4(c.formAction):k.getAttribute("formAction"),c!==null&&(A=c,k=null));var Z=new Vg("action","action",null,v,E);s.push({event:Z,listeners:[{instance:null,listener:function(){if(v.defaultPrevented){if(al!==0){var ce=k?v4(E,k):new FormData(E);iC(h,{pending:true,data:ce,method:E.method,action:A},null,ce);}}else typeof A=="function"&&(Z.preventDefault(),ce=k?v4(E,k):new FormData(E),iC(h,{pending:true,data:ce,method:E.method,action:A},A,ce));},currentTarget:E}]});}}for(var FC=0;FC<xS.length;FC++){var HC=xS[FC],jY=HC.toLowerCase(),UY=HC[0].toUpperCase()+HC.slice(1);Ji(jY,"on"+UY);}Ji(K6,"onAnimationEnd"),Ji(Y6,"onAnimationIteration"),Ji(X6,"onAnimationStart"),Ji("dblclick","onDoubleClick"),Ji("focusin","onFocus"),Ji("focusout","onBlur"),Ji(aY,"onTransitionRun"),Ji(sY,"onTransitionStart"),Ji(lY,"onTransitionCancel"),Ji(Q6,"onTransitionEnd"),_o("onMouseEnter",["mouseout","mouseover"]),_o("onMouseLeave",["mouseout","mouseover"]),_o("onPointerEnter",["pointerout","pointerover"]),_o("onPointerLeave",["pointerout","pointerover"]),xo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),xo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),xo("onBeforeInput",["compositionend","keypress","textInput","paste"]),xo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),xo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),xo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Om="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),qY=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Om));function b4(s,c){c=(c&4)!==0;for(var h=0;h<s.length;h++){var v=s[h],E=v.event;v=v.listeners;e:{var A=void 0;if(c)for(var k=v.length-1;0<=k;k--){var Z=v[k],ce=Z.instance,$e=Z.currentTarget;if(Z=Z.listener,ce!==A&&E.isPropagationStopped())break e;A=Z,E.currentTarget=$e;try{A(E);}catch(De){qg(De);}E.currentTarget=null,A=ce;}else for(k=0;k<v.length;k++){if(Z=v[k],ce=Z.instance,$e=Z.currentTarget,Z=Z.listener,ce!==A&&E.isPropagationStopped())break e;A=Z,E.currentTarget=$e;try{A(E);}catch(De){qg(De);}E.currentTarget=null,A=ce;}}}}function nn(s,c){var h=c[Pe];h===void 0&&(h=c[Pe]=new Set);var v=s+"__bubble";h.has(v)||(y4(c,s,2,false),h.add(v));}function VC(s,c,h){var v=0;c&&(v|=4),y4(h,s,v,c);}var Pv="_reactListening"+Math.random().toString(36).slice(2);function jC(s){if(!s[Pv]){s[Pv]=true,Ei.forEach(function(h){h!=="selectionchange"&&(qY.has(h)||VC(h,false,s),VC(h,true,s));});var c=s.nodeType===9?s:s.ownerDocument;c===null||c[Pv]||(c[Pv]=true,VC("selectionchange",false,c));}}function y4(s,c,h,v){switch(K4(c)){case 2:var E=yX;break;case 8:E=SX;break;default:E=ox;}h=E.bind(null,c,h,s),E=void 0,!cS||c!=="touchstart"&&c!=="touchmove"&&c!=="wheel"||(E=true),v?E!==void 0?s.addEventListener(c,h,{capture:true,passive:E}):s.addEventListener(c,h,true):E!==void 0?s.addEventListener(c,h,{passive:E}):s.addEventListener(c,h,false);}function UC(s,c,h,v,E){var A=v;if((c&1)===0&&(c&2)===0&&v!==null)e:for(;;){if(v===null)return;var k=v.tag;if(k===3||k===4){var Z=v.stateNode.containerInfo;if(Z===E)break;if(k===4)for(k=v.return;k!==null;){var ce=k.tag;if((ce===3||ce===4)&&k.stateNode.containerInfo===E)return;k=k.return;}for(;Z!==null;){if(k=dn(Z),k===null)return;if(ce=k.tag,ce===5||ce===6||ce===26||ce===27){v=A=k;continue e}Z=Z.parentNode;}}v=v.return;}$6(function(){var $e=A,De=sS(h),Ve=[];e:{var Me=Z6.get(s);if(Me!==void 0){var Ae=Vg,pt=s;switch(s){case "keypress":if(Fg(h)===0)break e;case "keydown":case "keyup":Ae=BK;break;case "focusin":pt="focus",Ae=mS;break;case "focusout":pt="blur",Ae=mS;break;case "beforeblur":case "afterblur":Ae=mS;break;case "click":if(h.button===2)break e;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":Ae=R6;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":Ae=MK;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":Ae=HK;break;case K6:case Y6:case X6:Ae=AK;break;case Q6:Ae=jK;break;case "scroll":case "scrollend":Ae=$K;break;case "wheel":Ae=qK;break;case "copy":case "cut":case "paste":Ae=PK;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":Ae=A6;break;case "toggle":case "beforetoggle":Ae=GK;}var Nt=(c&4)!==0,_n=!Nt&&(s==="scroll"||s==="scrollend"),pe=Nt?Me!==null?Me+"Capture":null:Me;Nt=[];for(var me=$e,xe;me!==null;){var Fe=me;if(xe=Fe.stateNode,Fe=Fe.tag,Fe!==5&&Fe!==26&&Fe!==27||xe===null||pe===null||(Fe=tm(me,pe),Fe!=null&&Nt.push(Dm(me,Fe,xe))),_n)break;me=me.return;}0<Nt.length&&(Me=new Ae(Me,pt,null,h,De),Ve.push({event:Me,listeners:Nt}));}}if((c&7)===0){e:{if(Me=s==="mouseover"||s==="pointerover",Ae=s==="mouseout"||s==="pointerout",Me&&h!==aS&&(pt=h.relatedTarget||h.fromElement)&&(dn(pt)||pt[Ht]))break e;if((Ae||Me)&&(Me=De.window===De?De:(Me=De.ownerDocument)?Me.defaultView||Me.parentWindow:window,Ae?(pt=h.relatedTarget||h.toElement,Ae=$e,pt=pt?dn(pt):null,pt!==null&&(_n=i(pt),Nt=pt.tag,pt!==_n||Nt!==5&&Nt!==27&&Nt!==6)&&(pt=null)):(Ae=null,pt=$e),Ae!==pt)){if(Nt=R6,Fe="onMouseLeave",pe="onMouseEnter",me="mouse",(s==="pointerout"||s==="pointerover")&&(Nt=A6,Fe="onPointerLeave",pe="onPointerEnter",me="pointer"),_n=Ae==null?Me:lr(Ae),xe=pt==null?Me:lr(pt),Me=new Nt(Fe,me+"leave",Ae,h,De),Me.target=_n,Me.relatedTarget=xe,Fe=null,dn(De)===$e&&(Nt=new Nt(pe,me+"enter",pt,h,De),Nt.target=xe,Nt.relatedTarget=_n,Fe=Nt),_n=Fe,Ae&&pt)t:{for(Nt=WY,pe=Ae,me=pt,xe=0,Fe=pe;Fe;Fe=Nt(Fe))xe++;Fe=0;for(var $t=me;$t;$t=Nt($t))Fe++;for(;0<xe-Fe;)pe=Nt(pe),xe--;for(;0<Fe-xe;)me=Nt(me),Fe--;for(;xe--;){if(pe===me||me!==null&&pe===me.alternate){Nt=pe;break t}pe=Nt(pe),me=Nt(me);}Nt=null;}else Nt=null;Ae!==null&&S4(Ve,Me,Ae,Nt,!1),pt!==null&&_n!==null&&S4(Ve,_n,pt,Nt,!0);}}e:{if(Me=$e?lr($e):window,Ae=Me.nodeName&&Me.nodeName.toLowerCase(),Ae==="select"||Ae==="input"&&Me.type==="file")var vn=z6;else if(_6(Me))if(B6)vn=rY;else {vn=tY;var yt=eY;}else Ae=Me.nodeName,!Ae||Ae.toLowerCase()!=="input"||Me.type!=="checkbox"&&Me.type!=="radio"?$e&&iS($e.elementType)&&(vn=z6):vn=nY;if(vn&&(vn=vn(s,$e))){L6(Ve,vn,h,De);break e}yt&&yt(s,Me,$e),s==="focusout"&&$e&&Me.type==="number"&&$e.memoizedProps.value!=null&&Pu(Me,"number",Me.value);}switch(yt=$e?lr($e):window,s){case "focusin":(_6(yt)||yt.contentEditable==="true")&&(Lu=yt,yS=$e,cm=null);break;case "focusout":cm=yS=Lu=null;break;case "mousedown":SS=!0;break;case "contextmenu":case "mouseup":case "dragend":SS=!1,W6(Ve,h,De);break;case "selectionchange":if(iY)break;case "keydown":case "keyup":W6(Ve,h,De);}var Kt;if(pS)e:{switch(s){case "compositionstart":var an="onCompositionStart";break e;case "compositionend":an="onCompositionEnd";break e;case "compositionupdate":an="onCompositionUpdate";break e}an=void 0;}else _u?O6(s,h)&&(an="onCompositionEnd"):s==="keydown"&&h.keyCode===229&&(an="onCompositionStart");an&&(N6&&h.locale!=="ko"&&(_u||an!=="onCompositionStart"?an==="onCompositionEnd"&&_u&&(Kt=E6()):(Us=De,uS="value"in Us?Us.value:Us.textContent,_u=!0)),yt=Iv($e,an),0<yt.length&&(an=new T6(an,s,null,h,De),Ve.push({event:an,listeners:yt}),Kt?an.data=Kt:(Kt=D6(h),Kt!==null&&(an.data=Kt)))),(Kt=YK?XK(s,h):QK(s,h))&&(an=Iv($e,"onBeforeInput"),0<an.length&&(yt=new T6("onBeforeInput","beforeinput",null,h,De),Ve.push({event:yt,listeners:an}),yt.data=Kt)),VY(Ve,s,$e,h,De);}b4(Ve,c);});}function Dm(s,c,h){return {instance:s,listener:c,currentTarget:h}}function Iv(s,c){for(var h=c+"Capture",v=[];s!==null;){var E=s,A=E.stateNode;if(E=E.tag,E!==5&&E!==26&&E!==27||A===null||(E=tm(s,h),E!=null&&v.unshift(Dm(s,E,A)),E=tm(s,c),E!=null&&v.push(Dm(s,E,A))),s.tag===3)return v;s=s.return;}return []}function WY(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function S4(s,c,h,v,E){for(var A=c._reactName,k=[];h!==null&&h!==v;){var Z=h,ce=Z.alternate,$e=Z.stateNode;if(Z=Z.tag,ce!==null&&ce===v)break;Z!==5&&Z!==26&&Z!==27||$e===null||(ce=$e,E?($e=tm(h,A),$e!=null&&k.unshift(Dm(h,$e,ce))):E||($e=tm(h,A),$e!=null&&k.push(Dm(h,$e,ce)))),h=h.return;}k.length!==0&&s.push({event:c,listeners:k});}var GY=/\r\n?/g,KY=/\u0000|\uFFFD/g;function C4(s){return (typeof s=="string"?s:""+s).replace(GY,`
`).replace(KY,"")}function x4(s,c){return c=C4(c),C4(s)===c}function Dn(s,c,h,v,E,A){switch(h){case "children":typeof v=="string"?c==="body"||c==="textarea"&&v===""||Iu(s,v):(typeof v=="number"||typeof v=="bigint")&&c!=="body"&&Iu(s,""+v);break;case "className":Mi(s,"class",v);break;case "tabIndex":Mi(s,"tabindex",v);break;case "dir":case "role":case "viewBox":case "width":case "height":Mi(s,h,v);break;case "style":x6(s,v,A);break;case "data":if(c!=="object"){Mi(s,"data",v);break}case "src":case "href":if(v===""&&(c!=="a"||h!=="href")){s.removeAttribute(h);break}if(v==null||typeof v=="function"||typeof v=="symbol"||typeof v=="boolean"){s.removeAttribute(h);break}v=Bg(""+v),s.setAttribute(h,v);break;case "action":case "formAction":if(typeof v=="function"){s.setAttribute(h,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof A=="function"&&(h==="formAction"?(c!=="input"&&Dn(s,c,"name",E.name,E,null),Dn(s,c,"formEncType",E.formEncType,E,null),Dn(s,c,"formMethod",E.formMethod,E,null),Dn(s,c,"formTarget",E.formTarget,E,null)):(Dn(s,c,"encType",E.encType,E,null),Dn(s,c,"method",E.method,E,null),Dn(s,c,"target",E.target,E,null)));if(v==null||typeof v=="symbol"||typeof v=="boolean"){s.removeAttribute(h);break}v=Bg(""+v),s.setAttribute(h,v);break;case "onClick":v!=null&&(s.onclick=Za);break;case "onScroll":v!=null&&nn("scroll",s);break;case "onScrollEnd":v!=null&&nn("scrollend",s);break;case "dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(r(61));if(h=v.__html,h!=null){if(E.children!=null)throw Error(r(60));s.innerHTML=h;}}break;case "multiple":s.multiple=v&&typeof v!="function"&&typeof v!="symbol";break;case "muted":s.muted=v&&typeof v!="function"&&typeof v!="symbol";break;case "suppressContentEditableWarning":case "suppressHydrationWarning":case "defaultValue":case "defaultChecked":case "innerHTML":case "ref":break;case "autoFocus":break;case "xlinkHref":if(v==null||typeof v=="function"||typeof v=="boolean"||typeof v=="symbol"){s.removeAttribute("xlink:href");break}h=Bg(""+v),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",h);break;case "contentEditable":case "spellCheck":case "draggable":case "value":case "autoReverse":case "externalResourcesRequired":case "focusable":case "preserveAlpha":v!=null&&typeof v!="function"&&typeof v!="symbol"?s.setAttribute(h,""+v):s.removeAttribute(h);break;case "inert":case "allowFullScreen":case "async":case "autoPlay":case "controls":case "default":case "defer":case "disabled":case "disablePictureInPicture":case "disableRemotePlayback":case "formNoValidate":case "hidden":case "loop":case "noModule":case "noValidate":case "open":case "playsInline":case "readOnly":case "required":case "reversed":case "scoped":case "seamless":case "itemScope":v&&typeof v!="function"&&typeof v!="symbol"?s.setAttribute(h,""):s.removeAttribute(h);break;case "capture":case "download":v===true?s.setAttribute(h,""):v!==false&&v!=null&&typeof v!="function"&&typeof v!="symbol"?s.setAttribute(h,v):s.removeAttribute(h);break;case "cols":case "rows":case "size":case "span":v!=null&&typeof v!="function"&&typeof v!="symbol"&&!isNaN(v)&&1<=v?s.setAttribute(h,v):s.removeAttribute(h);break;case "rowSpan":case "start":v==null||typeof v=="function"||typeof v=="symbol"||isNaN(v)?s.removeAttribute(h):s.setAttribute(h,v);break;case "popover":nn("beforetoggle",s),nn("toggle",s),Ra(s,"popover",v);break;case "xlinkActuate":Lo(s,"http://www.w3.org/1999/xlink","xlink:actuate",v);break;case "xlinkArcrole":Lo(s,"http://www.w3.org/1999/xlink","xlink:arcrole",v);break;case "xlinkRole":Lo(s,"http://www.w3.org/1999/xlink","xlink:role",v);break;case "xlinkShow":Lo(s,"http://www.w3.org/1999/xlink","xlink:show",v);break;case "xlinkTitle":Lo(s,"http://www.w3.org/1999/xlink","xlink:title",v);break;case "xlinkType":Lo(s,"http://www.w3.org/1999/xlink","xlink:type",v);break;case "xmlBase":Lo(s,"http://www.w3.org/XML/1998/namespace","xml:base",v);break;case "xmlLang":Lo(s,"http://www.w3.org/XML/1998/namespace","xml:lang",v);break;case "xmlSpace":Lo(s,"http://www.w3.org/XML/1998/namespace","xml:space",v);break;case "is":Ra(s,"is",v);break;case "innerText":case "textContent":break;default:(!(2<h.length)||h[0]!=="o"&&h[0]!=="O"||h[1]!=="n"&&h[1]!=="N")&&(h=xK.get(h)||h,Ra(s,h,v));}}function qC(s,c,h,v,E,A){switch(h){case "style":x6(s,v,A);break;case "dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(r(61));if(h=v.__html,h!=null){if(E.children!=null)throw Error(r(60));s.innerHTML=h;}}break;case "children":typeof v=="string"?Iu(s,v):(typeof v=="number"||typeof v=="bigint")&&Iu(s,""+v);break;case "onScroll":v!=null&&nn("scroll",s);break;case "onScrollEnd":v!=null&&nn("scrollend",s);break;case "onClick":v!=null&&(s.onclick=Za);break;case "suppressContentEditableWarning":case "suppressHydrationWarning":case "innerHTML":case "ref":break;case "innerText":case "textContent":break;default:if(!Hr.hasOwnProperty(h))e:{if(h[0]==="o"&&h[1]==="n"&&(E=h.endsWith("Capture"),c=h.slice(2,E?h.length-7:void 0),A=s[En]||null,A=A!=null?A[h]:null,typeof A=="function"&&s.removeEventListener(c,A,E),typeof v=="function")){typeof A!="function"&&A!==null&&(h in s?s[h]=null:s.hasAttribute(h)&&s.removeAttribute(h)),s.addEventListener(c,v,E);break e}h in s?s[h]=v:v===true?s.setAttribute(h,""):Ra(s,h,v);}}}function Wr(s,c,h){switch(c){case "div":case "span":case "svg":case "path":case "a":case "g":case "p":case "li":break;case "img":nn("error",s),nn("load",s);var v=false,E=false,A;for(A in h)if(h.hasOwnProperty(A)){var k=h[A];if(k!=null)switch(A){case "src":v=true;break;case "srcSet":E=true;break;case "children":case "dangerouslySetInnerHTML":throw Error(r(137,c));default:Dn(s,c,A,k,h,null);}}E&&Dn(s,c,"srcSet",h.srcSet,h,null),v&&Dn(s,c,"src",h.src,h,null);return;case "input":nn("invalid",s);var Z=A=k=E=null,ce=null,$e=null;for(v in h)if(h.hasOwnProperty(v)){var De=h[v];if(De!=null)switch(v){case "name":E=De;break;case "type":k=De;break;case "checked":ce=De;break;case "defaultChecked":$e=De;break;case "value":A=De;break;case "defaultValue":Z=De;break;case "children":case "dangerouslySetInnerHTML":if(De!=null)throw Error(r(137,c));break;default:Dn(s,c,v,De,h,null);}}Lg(s,A,Z,ce,$e,k,E,false);return;case "select":nn("invalid",s),v=k=A=null;for(E in h)if(h.hasOwnProperty(E)&&(Z=h[E],Z!=null))switch(E){case "value":A=Z;break;case "defaultValue":k=Z;break;case "multiple":v=Z;default:Dn(s,c,E,Z,h,null);}c=A,h=k,s.multiple=!!v,c!=null?Qa(s,!!v,c,false):h!=null&&Qa(s,!!v,h,true);return;case "textarea":nn("invalid",s),A=E=v=null;for(k in h)if(h.hasOwnProperty(k)&&(Z=h[k],Z!=null))switch(k){case "value":v=Z;break;case "defaultValue":E=Z;break;case "children":A=Z;break;case "dangerouslySetInnerHTML":if(Z!=null)throw Error(r(91));break;default:Dn(s,c,k,Z,h,null);}S6(s,v,E,A);return;case "option":for(ce in h)h.hasOwnProperty(ce)&&(v=h[ce],v!=null)&&(ce==="selected"?s.selected=v&&typeof v!="function"&&typeof v!="symbol":Dn(s,c,ce,v,h,null));return;case "dialog":nn("beforetoggle",s),nn("toggle",s),nn("cancel",s),nn("close",s);break;case "iframe":case "object":nn("load",s);break;case "video":case "audio":for(v=0;v<Om.length;v++)nn(Om[v],s);break;case "image":nn("error",s),nn("load",s);break;case "details":nn("toggle",s);break;case "embed":case "source":case "link":nn("error",s),nn("load",s);case "area":case "base":case "br":case "col":case "hr":case "keygen":case "meta":case "param":case "track":case "wbr":case "menuitem":for($e in h)if(h.hasOwnProperty($e)&&(v=h[$e],v!=null))switch($e){case "children":case "dangerouslySetInnerHTML":throw Error(r(137,c));default:Dn(s,c,$e,v,h,null);}return;default:if(iS(c)){for(De in h)h.hasOwnProperty(De)&&(v=h[De],v!==void 0&&qC(s,c,De,v,h,void 0));return}}for(Z in h)h.hasOwnProperty(Z)&&(v=h[Z],v!=null&&Dn(s,c,Z,v,h,null));}function YY(s,c,h,v){switch(c){case "div":case "span":case "svg":case "path":case "a":case "g":case "p":case "li":break;case "input":var E=null,A=null,k=null,Z=null,ce=null,$e=null,De=null;for(Ae in h){var Ve=h[Ae];if(h.hasOwnProperty(Ae)&&Ve!=null)switch(Ae){case "checked":break;case "value":break;case "defaultValue":ce=Ve;default:v.hasOwnProperty(Ae)||Dn(s,c,Ae,null,v,Ve);}}for(var Me in v){var Ae=v[Me];if(Ve=h[Me],v.hasOwnProperty(Me)&&(Ae!=null||Ve!=null))switch(Me){case "type":A=Ae;break;case "name":E=Ae;break;case "checked":$e=Ae;break;case "defaultChecked":De=Ae;break;case "value":k=Ae;break;case "defaultValue":Z=Ae;break;case "children":case "dangerouslySetInnerHTML":if(Ae!=null)throw Error(r(137,c));break;default:Ae!==Ve&&Dn(s,c,Me,Ae,v,Ve);}}js(s,k,Z,ce,$e,De,A,E);return;case "select":Ae=k=Z=Me=null;for(A in h)if(ce=h[A],h.hasOwnProperty(A)&&ce!=null)switch(A){case "value":break;case "multiple":Ae=ce;default:v.hasOwnProperty(A)||Dn(s,c,A,null,v,ce);}for(E in v)if(A=v[E],ce=h[E],v.hasOwnProperty(E)&&(A!=null||ce!=null))switch(E){case "value":Me=A;break;case "defaultValue":Z=A;break;case "multiple":k=A;default:A!==ce&&Dn(s,c,E,A,v,ce);}c=Z,h=k,v=Ae,Me!=null?Qa(s,!!h,Me,false):!!v!=!!h&&(c!=null?Qa(s,!!h,c,true):Qa(s,!!h,h?[]:"",false));return;case "textarea":Ae=Me=null;for(Z in h)if(E=h[Z],h.hasOwnProperty(Z)&&E!=null&&!v.hasOwnProperty(Z))switch(Z){case "value":break;case "children":break;default:Dn(s,c,Z,null,v,E);}for(k in v)if(E=v[k],A=h[k],v.hasOwnProperty(k)&&(E!=null||A!=null))switch(k){case "value":Me=E;break;case "defaultValue":Ae=E;break;case "children":break;case "dangerouslySetInnerHTML":if(E!=null)throw Error(r(91));break;default:E!==A&&Dn(s,c,k,E,v,A);}zg(s,Me,Ae);return;case "option":for(var pt in h)Me=h[pt],h.hasOwnProperty(pt)&&Me!=null&&!v.hasOwnProperty(pt)&&(pt==="selected"?s.selected=false:Dn(s,c,pt,null,v,Me));for(ce in v)Me=v[ce],Ae=h[ce],v.hasOwnProperty(ce)&&Me!==Ae&&(Me!=null||Ae!=null)&&(ce==="selected"?s.selected=Me&&typeof Me!="function"&&typeof Me!="symbol":Dn(s,c,ce,Me,v,Ae));return;case "img":case "link":case "area":case "base":case "br":case "col":case "embed":case "hr":case "keygen":case "meta":case "param":case "source":case "track":case "wbr":case "menuitem":for(var Nt in h)Me=h[Nt],h.hasOwnProperty(Nt)&&Me!=null&&!v.hasOwnProperty(Nt)&&Dn(s,c,Nt,null,v,Me);for($e in v)if(Me=v[$e],Ae=h[$e],v.hasOwnProperty($e)&&Me!==Ae&&(Me!=null||Ae!=null))switch($e){case "children":case "dangerouslySetInnerHTML":if(Me!=null)throw Error(r(137,c));break;default:Dn(s,c,$e,Me,v,Ae);}return;default:if(iS(c)){for(var _n in h)Me=h[_n],h.hasOwnProperty(_n)&&Me!==void 0&&!v.hasOwnProperty(_n)&&qC(s,c,_n,void 0,v,Me);for(De in v)Me=v[De],Ae=h[De],!v.hasOwnProperty(De)||Me===Ae||Me===void 0&&Ae===void 0||qC(s,c,De,Me,v,Ae);return}}for(var pe in h)Me=h[pe],h.hasOwnProperty(pe)&&Me!=null&&!v.hasOwnProperty(pe)&&Dn(s,c,pe,null,v,Me);for(Ve in v)Me=v[Ve],Ae=h[Ve],!v.hasOwnProperty(Ve)||Me===Ae||Me==null&&Ae==null||Dn(s,c,Ve,Me,v,Ae);}function w4(s){switch(s){case "css":case "script":case "font":case "img":case "image":case "input":case "link":return true;default:return false}}function XY(){if(typeof performance.getEntriesByType=="function"){for(var s=0,c=0,h=performance.getEntriesByType("resource"),v=0;v<h.length;v++){var E=h[v],A=E.transferSize,k=E.initiatorType,Z=E.duration;if(A&&Z&&w4(k)){for(k=0,Z=E.responseEnd,v+=1;v<h.length;v++){var ce=h[v],$e=ce.startTime;if($e>Z)break;var De=ce.transferSize,Ve=ce.initiatorType;De&&w4(Ve)&&(ce=ce.responseEnd,k+=De*(ce<Z?1:(Z-$e)/(ce-$e)));}if(--v,c+=8*(A+k)/(E.duration/1e3),s++,10<s)break}}if(0<s)return c/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var WC=null,GC=null;function Ov(s){return s.nodeType===9?s:s.ownerDocument}function $4(s){switch(s){case "http://www.w3.org/2000/svg":return 1;case "http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function E4(s,c){if(s===0)switch(c){case "svg":return 1;case "math":return 2;default:return 0}return s===1&&c==="foreignObject"?0:s}function KC(s,c){return s==="textarea"||s==="noscript"||typeof c.children=="string"||typeof c.children=="number"||typeof c.children=="bigint"||typeof c.dangerouslySetInnerHTML=="object"&&c.dangerouslySetInnerHTML!==null&&c.dangerouslySetInnerHTML.__html!=null}var YC=null;function QY(){var s=window.event;return s&&s.type==="popstate"?s===YC?false:(YC=s,true):(YC=null,false)}var M4=typeof setTimeout=="function"?setTimeout:void 0,ZY=typeof clearTimeout=="function"?clearTimeout:void 0,R4=typeof Promise=="function"?Promise:void 0,JY=typeof queueMicrotask=="function"?queueMicrotask:typeof R4<"u"?function(s){return R4.resolve(null).then(s).catch(eX)}:M4;function eX(s){setTimeout(function(){throw s});}function sl(s){return s==="head"}function T4(s,c){var h=c,v=0;do{var E=h.nextSibling;if(s.removeChild(h),E&&E.nodeType===8)if(h=E.data,h==="/$"||h==="/&"){if(v===0){s.removeChild(E),cd(c);return}v--;}else if(h==="$"||h==="$?"||h==="$~"||h==="$!"||h==="&")v++;else if(h==="html")_m(s.ownerDocument.documentElement);else if(h==="head"){h=s.ownerDocument.head,_m(h);for(var A=h.firstChild;A;){var k=A.nextSibling,Z=A.nodeName;A[_t]||Z==="SCRIPT"||Z==="STYLE"||Z==="LINK"&&A.rel.toLowerCase()==="stylesheet"||h.removeChild(A),A=k;}}else h==="body"&&_m(s.ownerDocument.body);h=E;}while(h);cd(c);}function A4(s,c){var h=s;s=0;do{var v=h.nextSibling;if(h.nodeType===1?c?(h._stashedDisplay=h.style.display,h.style.display="none"):(h.style.display=h._stashedDisplay||"",h.getAttribute("style")===""&&h.removeAttribute("style")):h.nodeType===3&&(c?(h._stashedText=h.nodeValue,h.nodeValue=""):h.nodeValue=h._stashedText||""),v&&v.nodeType===8)if(h=v.data,h==="/$"){if(s===0)break;s--;}else h!=="$"&&h!=="$?"&&h!=="$~"&&h!=="$!"||s++;h=v;}while(h)}function XC(s){var c=s.firstChild;for(c&&c.nodeType===10&&(c=c.nextSibling);c;){var h=c;switch(c=c.nextSibling,h.nodeName){case "HTML":case "HEAD":case "BODY":XC(h),en(h);continue;case "SCRIPT":case "STYLE":continue;case "LINK":if(h.rel.toLowerCase()==="stylesheet")continue}s.removeChild(h);}}function tX(s,c,h,v){for(;s.nodeType===1;){var E=h;if(s.nodeName.toLowerCase()!==c.toLowerCase()){if(!v&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(v){if(!s[_t])switch(c){case "meta":if(!s.hasAttribute("itemprop"))break;return s;case "link":if(A=s.getAttribute("rel"),A==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(A!==E.rel||s.getAttribute("href")!==(E.href==null||E.href===""?null:E.href)||s.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin)||s.getAttribute("title")!==(E.title==null?null:E.title))break;return s;case "style":if(s.hasAttribute("data-precedence"))break;return s;case "script":if(A=s.getAttribute("src"),(A!==(E.src==null?null:E.src)||s.getAttribute("type")!==(E.type==null?null:E.type)||s.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin))&&A&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(c==="input"&&s.type==="hidden"){var A=E.name==null?null:""+E.name;if(E.type==="hidden"&&s.getAttribute("name")===A)return s}else return s;if(s=Oi(s.nextSibling),s===null)break}return null}function nX(s,c,h){if(c==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!h||(s=Oi(s.nextSibling),s===null))return null;return s}function N4(s,c){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!c||(s=Oi(s.nextSibling),s===null))return null;return s}function QC(s){return s.data==="$?"||s.data==="$~"}function ZC(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function rX(s,c){var h=s.ownerDocument;if(s.data==="$~")s._reactRetry=c;else if(s.data!=="$?"||h.readyState!=="loading")c();else {var v=function(){c(),h.removeEventListener("DOMContentLoaded",v);};h.addEventListener("DOMContentLoaded",v),s._reactRetry=v;}}function Oi(s){for(;s!=null;s=s.nextSibling){var c=s.nodeType;if(c===1||c===3)break;if(c===8){if(c=s.data,c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"||c==="F!"||c==="F")break;if(c==="/$"||c==="/&")return null}}return s}var JC=null;function P4(s){s=s.nextSibling;for(var c=0;s;){if(s.nodeType===8){var h=s.data;if(h==="/$"||h==="/&"){if(c===0)return Oi(s.nextSibling);c--;}else h!=="$"&&h!=="$!"&&h!=="$?"&&h!=="$~"&&h!=="&"||c++;}s=s.nextSibling;}return null}function I4(s){s=s.previousSibling;for(var c=0;s;){if(s.nodeType===8){var h=s.data;if(h==="$"||h==="$!"||h==="$?"||h==="$~"||h==="&"){if(c===0)return s;c--;}else h!=="/$"&&h!=="/&"||c++;}s=s.previousSibling;}return null}function O4(s,c,h){switch(c=Ov(h),s){case "html":if(s=c.documentElement,!s)throw Error(r(452));return s;case "head":if(s=c.head,!s)throw Error(r(453));return s;case "body":if(s=c.body,!s)throw Error(r(454));return s;default:throw Error(r(451))}}function _m(s){for(var c=s.attributes;c.length;)s.removeAttributeNode(c[0]);en(s);}var Di=new Map,D4=new Set;function Dv(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var hs=F.d;F.d={f:oX,r:iX,D:aX,C:sX,L:lX,m:cX,X:dX,S:uX,M:fX};function oX(){var s=hs.f(),c=Ev();return s||c}function iX(s){var c=yn(s);c!==null&&c.tag===5&&c.type==="form"?QN(c):hs.r(s);}var ad=typeof document>"u"?null:document;function _4(s,c,h){var v=ad;if(v&&typeof c=="string"&&c){var E=Vt(c);E='link[rel="'+s+'"][href="'+E+'"]',typeof h=="string"&&(E+='[crossorigin="'+h+'"]'),D4.has(E)||(D4.add(E),s={rel:s,crossOrigin:h,href:c},v.querySelector(E)===null&&(c=v.createElement("link"),Wr(c,"link",s),In(c),v.head.appendChild(c)));}}function aX(s){hs.D(s),_4("dns-prefetch",s,null);}function sX(s,c){hs.C(s,c),_4("preconnect",s,c);}function lX(s,c,h){hs.L(s,c,h);var v=ad;if(v&&s&&c){var E='link[rel="preload"][as="'+Vt(c)+'"]';c==="image"&&h&&h.imageSrcSet?(E+='[imagesrcset="'+Vt(h.imageSrcSet)+'"]',typeof h.imageSizes=="string"&&(E+='[imagesizes="'+Vt(h.imageSizes)+'"]')):E+='[href="'+Vt(s)+'"]';var A=E;switch(c){case "style":A=sd(s);break;case "script":A=ld(s);}Di.has(A)||(s=p({rel:"preload",href:c==="image"&&h&&h.imageSrcSet?void 0:s,as:c},h),Di.set(A,s),v.querySelector(E)!==null||c==="style"&&v.querySelector(Lm(A))||c==="script"&&v.querySelector(zm(A))||(c=v.createElement("link"),Wr(c,"link",s),In(c),v.head.appendChild(c)));}}function cX(s,c){hs.m(s,c);var h=ad;if(h&&s){var v=c&&typeof c.as=="string"?c.as:"script",E='link[rel="modulepreload"][as="'+Vt(v)+'"][href="'+Vt(s)+'"]',A=E;switch(v){case "audioworklet":case "paintworklet":case "serviceworker":case "sharedworker":case "worker":case "script":A=ld(s);}if(!Di.has(A)&&(s=p({rel:"modulepreload",href:s},c),Di.set(A,s),h.querySelector(E)===null)){switch(v){case "audioworklet":case "paintworklet":case "serviceworker":case "sharedworker":case "worker":case "script":if(h.querySelector(zm(A)))return}v=h.createElement("link"),Wr(v,"link",s),In(v),h.head.appendChild(v);}}}function uX(s,c,h){hs.S(s,c,h);var v=ad;if(v&&s){var E=lo(v).hoistableStyles,A=sd(s);c=c||"default";var k=E.get(A);if(!k){var Z={loading:0,preload:null};if(k=v.querySelector(Lm(A)))Z.loading=5;else {s=p({rel:"stylesheet",href:s,"data-precedence":c},h),(h=Di.get(A))&&ex(s,h);var ce=k=v.createElement("link");In(ce),Wr(ce,"link",s),ce._p=new Promise(function($e,De){ce.onload=$e,ce.onerror=De;}),ce.addEventListener("load",function(){Z.loading|=1;}),ce.addEventListener("error",function(){Z.loading|=2;}),Z.loading|=4,_v(k,c,v);}k={type:"stylesheet",instance:k,count:1,state:Z},E.set(A,k);}}}function dX(s,c){hs.X(s,c);var h=ad;if(h&&s){var v=lo(h).hoistableScripts,E=ld(s),A=v.get(E);A||(A=h.querySelector(zm(E)),A||(s=p({src:s,async:true},c),(c=Di.get(E))&&tx(s,c),A=h.createElement("script"),In(A),Wr(A,"link",s),h.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},v.set(E,A));}}function fX(s,c){hs.M(s,c);var h=ad;if(h&&s){var v=lo(h).hoistableScripts,E=ld(s),A=v.get(E);A||(A=h.querySelector(zm(E)),A||(s=p({src:s,async:true,type:"module"},c),(c=Di.get(E))&&tx(s,c),A=h.createElement("script"),In(A),Wr(A,"link",s),h.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},v.set(E,A));}}function L4(s,c,h,v){var E=(E=te.current)?Dv(E):null;if(!E)throw Error(r(446));switch(s){case "meta":case "title":return null;case "style":return typeof h.precedence=="string"&&typeof h.href=="string"?(c=sd(h.href),h=lo(E).hoistableStyles,v=h.get(c),v||(v={type:"style",instance:null,count:0,state:null},h.set(c,v)),v):{type:"void",instance:null,count:0,state:null};case "link":if(h.rel==="stylesheet"&&typeof h.href=="string"&&typeof h.precedence=="string"){s=sd(h.href);var A=lo(E).hoistableStyles,k=A.get(s);if(k||(E=E.ownerDocument||E,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},A.set(s,k),(A=E.querySelector(Lm(s)))&&!A._p&&(k.instance=A,k.state.loading=5),Di.has(s)||(h={rel:"preload",as:"style",href:h.href,crossOrigin:h.crossOrigin,integrity:h.integrity,media:h.media,hrefLang:h.hrefLang,referrerPolicy:h.referrerPolicy},Di.set(s,h),A||mX(E,s,h,k.state))),c&&v===null)throw Error(r(528,""));return k}if(c&&v!==null)throw Error(r(529,""));return null;case "script":return c=h.async,h=h.src,typeof h=="string"&&c&&typeof c!="function"&&typeof c!="symbol"?(c=ld(h),h=lo(E).hoistableScripts,v=h.get(c),v||(v={type:"script",instance:null,count:0,state:null},h.set(c,v)),v):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,s))}}function sd(s){return 'href="'+Vt(s)+'"'}function Lm(s){return 'link[rel="stylesheet"]['+s+"]"}function z4(s){return p({},s,{"data-precedence":s.precedence,precedence:null})}function mX(s,c,h,v){s.querySelector('link[rel="preload"][as="style"]['+c+"]")?v.loading=1:(c=s.createElement("link"),v.preload=c,c.addEventListener("load",function(){return v.loading|=1}),c.addEventListener("error",function(){return v.loading|=2}),Wr(c,"link",h),In(c),s.head.appendChild(c));}function ld(s){return '[src="'+Vt(s)+'"]'}function zm(s){return "script[async]"+s}function B4(s,c,h){if(c.count++,c.instance===null)switch(c.type){case "style":var v=s.querySelector('style[data-href~="'+Vt(h.href)+'"]');if(v)return c.instance=v,In(v),v;var E=p({},h,{"data-href":h.href,"data-precedence":h.precedence,href:null,precedence:null});return v=(s.ownerDocument||s).createElement("style"),In(v),Wr(v,"style",E),_v(v,h.precedence,s),c.instance=v;case "stylesheet":E=sd(h.href);var A=s.querySelector(Lm(E));if(A)return c.state.loading|=4,c.instance=A,In(A),A;v=z4(h),(E=Di.get(E))&&ex(v,E),A=(s.ownerDocument||s).createElement("link"),In(A);var k=A;return k._p=new Promise(function(Z,ce){k.onload=Z,k.onerror=ce;}),Wr(A,"link",v),c.state.loading|=4,_v(A,h.precedence,s),c.instance=A;case "script":return A=ld(h.src),(E=s.querySelector(zm(A)))?(c.instance=E,In(E),E):(v=h,(E=Di.get(A))&&(v=p({},h),tx(v,E)),s=s.ownerDocument||s,E=s.createElement("script"),In(E),Wr(E,"link",v),s.head.appendChild(E),c.instance=E);case "void":return null;default:throw Error(r(443,c.type))}else c.type==="stylesheet"&&(c.state.loading&4)===0&&(v=c.instance,c.state.loading|=4,_v(v,h.precedence,s));return c.instance}function _v(s,c,h){for(var v=h.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),E=v.length?v[v.length-1]:null,A=E,k=0;k<v.length;k++){var Z=v[k];if(Z.dataset.precedence===c)A=Z;else if(A!==E)break}A?A.parentNode.insertBefore(s,A.nextSibling):(c=h.nodeType===9?h.head:h,c.insertBefore(s,c.firstChild));}function ex(s,c){s.crossOrigin==null&&(s.crossOrigin=c.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=c.referrerPolicy),s.title==null&&(s.title=c.title);}function tx(s,c){s.crossOrigin==null&&(s.crossOrigin=c.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=c.referrerPolicy),s.integrity==null&&(s.integrity=c.integrity);}var Lv=null;function k4(s,c,h){if(Lv===null){var v=new Map,E=Lv=new Map;E.set(h,v);}else E=Lv,v=E.get(h),v||(v=new Map,E.set(h,v));if(v.has(s))return v;for(v.set(s,null),h=h.getElementsByTagName(s),E=0;E<h.length;E++){var A=h[E];if(!(A[_t]||A[Bt]||s==="link"&&A.getAttribute("rel")==="stylesheet")&&A.namespaceURI!=="http://www.w3.org/2000/svg"){var k=A.getAttribute(c)||"";k=s+k;var Z=v.get(k);Z?Z.push(A):v.set(k,[A]);}}return v}function F4(s,c,h){s=s.ownerDocument||s,s.head.insertBefore(h,c==="title"?s.querySelector("head > title"):null);}function hX(s,c,h){if(h===1||c.itemProp!=null)return false;switch(s){case "meta":case "title":return true;case "style":if(typeof c.precedence!="string"||typeof c.href!="string"||c.href==="")break;return true;case "link":if(typeof c.rel!="string"||typeof c.href!="string"||c.href===""||c.onLoad||c.onError)break;return c.rel==="stylesheet"?(s=c.disabled,typeof c.precedence=="string"&&s==null):true;case "script":if(c.async&&typeof c.async!="function"&&typeof c.async!="symbol"&&!c.onLoad&&!c.onError&&c.src&&typeof c.src=="string")return true}return false}function H4(s){return !(s.type==="stylesheet"&&(s.state.loading&3)===0)}function pX(s,c,h,v){if(h.type==="stylesheet"&&(typeof v.media!="string"||matchMedia(v.media).matches!==false)&&(h.state.loading&4)===0){if(h.instance===null){var E=sd(v.href),A=c.querySelector(Lm(E));if(A){c=A._p,c!==null&&typeof c=="object"&&typeof c.then=="function"&&(s.count++,s=zv.bind(s),c.then(s,s)),h.state.loading|=4,h.instance=A,In(A);return}A=c.ownerDocument||c,v=z4(v),(E=Di.get(E))&&ex(v,E),A=A.createElement("link"),In(A);var k=A;k._p=new Promise(function(Z,ce){k.onload=Z,k.onerror=ce;}),Wr(A,"link",v),h.instance=A;}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(h,c),(c=h.state.preload)&&(h.state.loading&3)===0&&(s.count++,h=zv.bind(s),c.addEventListener("load",h),c.addEventListener("error",h));}}var nx=0;function gX(s,c){return s.stylesheets&&s.count===0&&kv(s,s.stylesheets),0<s.count||0<s.imgCount?function(h){var v=setTimeout(function(){if(s.stylesheets&&kv(s,s.stylesheets),s.unsuspend){var A=s.unsuspend;s.unsuspend=null,A();}},6e4+c);0<s.imgBytes&&nx===0&&(nx=62500*XY());var E=setTimeout(function(){if(s.waitingForImages=false,s.count===0&&(s.stylesheets&&kv(s,s.stylesheets),s.unsuspend)){var A=s.unsuspend;s.unsuspend=null,A();}},(s.imgBytes>nx?50:800)+c);return s.unsuspend=h,function(){s.unsuspend=null,clearTimeout(v),clearTimeout(E);}}:null}function zv(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)kv(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s();}}}var Bv=null;function kv(s,c){s.stylesheets=null,s.unsuspend!==null&&(s.count++,Bv=new Map,c.forEach(vX,s),Bv=null,zv.call(s));}function vX(s,c){if(!(c.state.loading&4)){var h=Bv.get(s);if(h)var v=h.get(null);else {h=new Map,Bv.set(s,h);for(var E=s.querySelectorAll("link[data-precedence],style[data-precedence]"),A=0;A<E.length;A++){var k=E[A];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(h.set(k.dataset.precedence,k),v=k);}v&&h.set(null,v);}E=c.instance,k=E.getAttribute("data-precedence"),A=h.get(k)||v,A===v&&h.set(null,E),h.set(k,E),this.count++,v=zv.bind(this),E.addEventListener("load",v),E.addEventListener("error",v),A?A.parentNode.insertBefore(E,A.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(E,s.firstChild)),c.state.loading|=4;}}var Bm={$$typeof:M,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function bX(s,c,h,v,E,A,k,Z,ce){this.tag=1,this.containerInfo=s,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Te(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Te(0),this.hiddenUpdates=Te(null),this.identifierPrefix=v,this.onUncaughtError=E,this.onCaughtError=A,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ce,this.incompleteTransitions=new Map;}function V4(s,c,h,v,E,A,k,Z,ce,$e,De,Ve){return s=new bX(s,c,h,k,ce,$e,De,Ve,Z),c=1,A===true&&(c|=24),A=ni(3,null,null,c),s.current=A,A.stateNode=s,c=_S(),c.refCount++,s.pooledCache=c,c.refCount++,A.memoizedState={element:v,isDehydrated:h,cache:c},kS(A),s}function j4(s){return s?(s=ku,s):ku}function U4(s,c,h,v,E,A){E=j4(E),v.context===null?v.context=E:v.pendingContext=E,v=Xs(c),v.payload={element:h},A=A===void 0?null:A,A!==null&&(v.callback=A),h=Qs(s,v,c),h!==null&&(Vo(h,s,c),gm(h,s,c));}function q4(s,c){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var h=s.retryLane;s.retryLane=h!==0&&h<c?h:c;}}function rx(s,c){q4(s,c),(s=s.alternate)&&q4(s,c);}function W4(s){if(s.tag===13||s.tag===31){var c=fc(s,67108864);c!==null&&Vo(c,s,67108864),rx(s,67108864);}}function G4(s){if(s.tag===13||s.tag===31){var c=si();c=Xe(c);var h=fc(s,c);h!==null&&Vo(h,s,c),rx(s,c);}}var Fv=true;function yX(s,c,h,v){var E=B.T;B.T=null;var A=F.p;try{F.p=2,ox(s,c,h,v);}finally{F.p=A,B.T=E;}}function SX(s,c,h,v){var E=B.T;B.T=null;var A=F.p;try{F.p=8,ox(s,c,h,v);}finally{F.p=A,B.T=E;}}function ox(s,c,h,v){if(Fv){var E=ix(v);if(E===null)UC(s,c,v,Hv,h),Y4(s,v);else if(xX(E,s,c,h,v))v.stopPropagation();else if(Y4(s,v),c&4&&-1<CX.indexOf(s)){for(;E!==null;){var A=yn(E);if(A!==null)switch(A.tag){case 3:if(A=A.stateNode,A.current.memoizedState.isDehydrated){var k=ft(A.pendingLanes);if(k!==0){var Z=A;for(Z.pendingLanes|=2,Z.entangledLanes|=2;k;){var ce=1<<31-lt(k);Z.entanglements[1]|=ce,k&=~ce;}Pa(A),(Sn&6)===0&&(wv=Re()+500,Im(0));}}break;case 31:case 13:Z=fc(A,2),Z!==null&&Vo(Z,A,2),Ev(),rx(A,2);}if(A=ix(v),A===null&&UC(s,c,v,Hv,h),A===E)break;E=A;}E!==null&&v.stopPropagation();}else UC(s,c,v,null,h);}}function ix(s){return s=sS(s),ax(s)}var Hv=null;function ax(s){if(Hv=null,s=dn(s),s!==null){var c=i(s);if(c===null)s=null;else {var h=c.tag;if(h===13){if(s=a(c),s!==null)return s;s=null;}else if(h===31){if(s=l(c),s!==null)return s;s=null;}else if(h===3){if(c.stateNode.current.memoizedState.isDehydrated)return c.tag===3?c.stateNode.containerInfo:null;s=null;}else c!==s&&(s=null);}}return Hv=s,null}function K4(s){switch(s){case "beforetoggle":case "cancel":case "click":case "close":case "contextmenu":case "copy":case "cut":case "auxclick":case "dblclick":case "dragend":case "dragstart":case "drop":case "focusin":case "focusout":case "input":case "invalid":case "keydown":case "keypress":case "keyup":case "mousedown":case "mouseup":case "paste":case "pause":case "play":case "pointercancel":case "pointerdown":case "pointerup":case "ratechange":case "reset":case "resize":case "seeked":case "submit":case "toggle":case "touchcancel":case "touchend":case "touchstart":case "volumechange":case "change":case "selectionchange":case "textInput":case "compositionstart":case "compositionend":case "compositionupdate":case "beforeblur":case "afterblur":case "beforeinput":case "blur":case "fullscreenchange":case "focus":case "hashchange":case "popstate":case "select":case "selectstart":return 2;case "drag":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "mousemove":case "mouseout":case "mouseover":case "pointermove":case "pointerout":case "pointerover":case "scroll":case "touchmove":case "wheel":case "mouseenter":case "mouseleave":case "pointerenter":case "pointerleave":return 8;case "message":switch(qe()){case Qe:return 2;case We:return 8;case tt:case rt:return 32;case Ze:return 268435456;default:return 32}default:return 32}}var sx=false,ll=null,cl=null,ul=null,km=new Map,Fm=new Map,dl=[],CX="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Y4(s,c){switch(s){case "focusin":case "focusout":ll=null;break;case "dragenter":case "dragleave":cl=null;break;case "mouseover":case "mouseout":ul=null;break;case "pointerover":case "pointerout":km.delete(c.pointerId);break;case "gotpointercapture":case "lostpointercapture":Fm.delete(c.pointerId);}}function Hm(s,c,h,v,E,A){return s===null||s.nativeEvent!==A?(s={blockedOn:c,domEventName:h,eventSystemFlags:v,nativeEvent:A,targetContainers:[E]},c!==null&&(c=yn(c),c!==null&&W4(c)),s):(s.eventSystemFlags|=v,c=s.targetContainers,E!==null&&c.indexOf(E)===-1&&c.push(E),s)}function xX(s,c,h,v,E){switch(c){case "focusin":return ll=Hm(ll,s,c,h,v,E),true;case "dragenter":return cl=Hm(cl,s,c,h,v,E),true;case "mouseover":return ul=Hm(ul,s,c,h,v,E),true;case "pointerover":var A=E.pointerId;return km.set(A,Hm(km.get(A)||null,s,c,h,v,E)),true;case "gotpointercapture":return A=E.pointerId,Fm.set(A,Hm(Fm.get(A)||null,s,c,h,v,E)),true}return false}function X4(s){var c=dn(s.target);if(c!==null){var h=i(c);if(h!==null){if(c=h.tag,c===13){if(c=a(h),c!==null){s.blockedOn=c,wt(s.priority,function(){G4(h);});return}}else if(c===31){if(c=l(h),c!==null){s.blockedOn=c,wt(s.priority,function(){G4(h);});return}}else if(c===3&&h.stateNode.current.memoizedState.isDehydrated){s.blockedOn=h.tag===3?h.stateNode.containerInfo:null;return}}}s.blockedOn=null;}function Vv(s){if(s.blockedOn!==null)return false;for(var c=s.targetContainers;0<c.length;){var h=ix(s.nativeEvent);if(h===null){h=s.nativeEvent;var v=new h.constructor(h.type,h);aS=v,h.target.dispatchEvent(v),aS=null;}else return c=yn(h),c!==null&&W4(c),s.blockedOn=h,false;c.shift();}return true}function Q4(s,c,h){Vv(s)&&h.delete(c);}function wX(){sx=false,ll!==null&&Vv(ll)&&(ll=null),cl!==null&&Vv(cl)&&(cl=null),ul!==null&&Vv(ul)&&(ul=null),km.forEach(Q4),Fm.forEach(Q4);}function jv(s,c){s.blockedOn===c&&(s.blockedOn=null,sx||(sx=true,e.unstable_scheduleCallback(e.unstable_NormalPriority,wX)));}var Uv=null;function Z4(s){Uv!==s&&(Uv=s,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Uv===s&&(Uv=null);for(var c=0;c<s.length;c+=3){var h=s[c],v=s[c+1],E=s[c+2];if(typeof v!="function"){if(ax(v||h)===null)continue;break}var A=yn(h);A!==null&&(s.splice(c,3),c-=3,iC(A,{pending:true,data:E,method:h.method,action:v},v,E));}}));}function cd(s){function c(ce){return jv(ce,s)}ll!==null&&jv(ll,s),cl!==null&&jv(cl,s),ul!==null&&jv(ul,s),km.forEach(c),Fm.forEach(c);for(var h=0;h<dl.length;h++){var v=dl[h];v.blockedOn===s&&(v.blockedOn=null);}for(;0<dl.length&&(h=dl[0],h.blockedOn===null);)X4(h),h.blockedOn===null&&dl.shift();if(h=(s.ownerDocument||s).$$reactFormReplay,h!=null)for(v=0;v<h.length;v+=3){var E=h[v],A=h[v+1],k=E[En]||null;if(typeof A=="function")k||Z4(h);else if(k){var Z=null;if(A&&A.hasAttribute("formAction")){if(E=A,k=A[En]||null)Z=k.formAction;else if(ax(E)!==null)continue}else Z=k.action;typeof Z=="function"?h[v+1]=Z:(h.splice(v,3),v-=3),Z4(h);}}}function J4(){function s(A){A.canIntercept&&A.info==="react-transition"&&A.intercept({handler:function(){return new Promise(function(k){return E=k})},focusReset:"manual",scroll:"manual"});}function c(){E!==null&&(E(),E=null),v||setTimeout(h,20);}function h(){if(!v&&!navigation.transition){var A=navigation.currentEntry;A&&A.url!=null&&navigation.navigate(A.url,{state:A.getState(),info:"react-transition",history:"replace"});}}if(typeof navigation=="object"){var v=false,E=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",c),navigation.addEventListener("navigateerror",c),setTimeout(h,100),function(){v=true,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",c),navigation.removeEventListener("navigateerror",c),E!==null&&(E(),E=null);}}}function lx(s){this._internalRoot=s;}qv.prototype.render=lx.prototype.render=function(s){var c=this._internalRoot;if(c===null)throw Error(r(409));var h=c.current,v=si();U4(h,v,s,c,null,null);},qv.prototype.unmount=lx.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var c=s.containerInfo;U4(s.current,2,null,s,null,null),Ev(),c[Ht]=null;}};function qv(s){this._internalRoot=s;}qv.prototype.unstable_scheduleHydration=function(s){if(s){var c=mt();s={blockedOn:null,target:s,priority:c};for(var h=0;h<dl.length&&c!==0&&c<dl[h].priority;h++);dl.splice(h,0,s),h===0&&X4(s);}};var e5=t.version;if(e5!=="19.2.4")throw Error(r(527,e5,"19.2.4"));F.findDOMNode=function(s){var c=s._reactInternals;if(c===void 0)throw typeof s.render=="function"?Error(r(188)):(s=Object.keys(s).join(","),Error(r(268,s)));return s=d(c),s=s!==null?m(s):null,s=s===null?null:s.stateNode,s};var $X={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Wv=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wv.isDisabled&&Wv.supportsFiber)try{Ke=Wv.inject($X),_e=Wv;}catch{}}return Gm.createRoot=function(s,c){if(!o(s))throw Error(r(299));var h=false,v="",E=sP,A=lP,k=cP;return c!=null&&(c.unstable_strictMode===true&&(h=true),c.identifierPrefix!==void 0&&(v=c.identifierPrefix),c.onUncaughtError!==void 0&&(E=c.onUncaughtError),c.onCaughtError!==void 0&&(A=c.onCaughtError),c.onRecoverableError!==void 0&&(k=c.onRecoverableError)),c=V4(s,1,false,null,null,h,v,null,E,A,k,J4),s[Ht]=c.current,jC(s),new lx(c)},Gm.hydrateRoot=function(s,c,h){if(!o(s))throw Error(r(299));var v=false,E="",A=sP,k=lP,Z=cP,ce=null;return h!=null&&(h.unstable_strictMode===true&&(v=true),h.identifierPrefix!==void 0&&(E=h.identifierPrefix),h.onUncaughtError!==void 0&&(A=h.onUncaughtError),h.onCaughtError!==void 0&&(k=h.onCaughtError),h.onRecoverableError!==void 0&&(Z=h.onRecoverableError),h.formState!==void 0&&(ce=h.formState)),c=V4(s,1,true,c,h??null,v,E,ce,A,k,Z,J4),c.context=j4(null),h=c.current,v=si(),v=Xe(v),E=Xs(v),E.callback=null,Qs(h,E,v),h=v,c.current.lanes=h,Ce(c,h),Pa(c),s[Ht]=c.current,jC(s),new qv(c)},Gm.version="19.2.4",Gm}var UI;function tre(){if(UI)return Px.exports;UI=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e);}catch(t){console.error(t);}}return e(),Px.exports=ere(),Px.exports}var Xa=tre();const z0="__rc_react_root__";function e1(e,t){const n=t[z0]||Xa.createRoot(t);n.render(e),t[z0]=n;}async function vk(e){return Promise.resolve().then(()=>{e[z0]?.unmount(),delete e[z0];})}const Dx=()=>({height:0,opacity:0}),qI=e=>{const{scrollHeight:t}=e;return {height:t,opacity:1}},nre=e=>({height:e?e.offsetHeight:0}),_x=(e,t)=>t?.deadline===true||t.propertyName==="height",bk=(e=tp)=>({motionName:`${e}-motion-collapse`,onAppearStart:Dx,onEnterStart:Dx,onAppearActive:qI,onEnterActive:qI,onLeaveStart:nre,onLeaveActive:Dx,onAppearEnd:_x,onEnterEnd:_x,onLeaveEnd:_x,motionDeadline:500}),zl=(e,t,n)=>n!==void 0?n:`${e}-${t}`,rre=e=>{const{componentCls:t,colorPrimary:n,antCls:r}=e,[,o]=ar(r,"wave");return {[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:o("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(",")}}}}},ore=jee("Wave",rre),t1=`${tp}-wave-target`;function WI(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 ire(e,t=null){const n=getComputedStyle(e),{borderTopColor:r,borderColor:o,backgroundColor:i}=n;return t&&WI(n[t])?n[t]:[r,o,i].find(WI)??null}function Lx(e){return Number.isNaN(e)?0:e}const are=e=>{const{className:t,target:n,component:r,colorSource:o}=e,i=f.useRef(null),{getPrefixCls:a}=f.useContext(Ct),l=a(),[u]=ar(l,"wave"),[d,m]=f.useState(null),[p,g]=f.useState([]),[b,y]=f.useState(0),[S,C]=f.useState(0),[w,$]=f.useState(0),[M,T]=f.useState(0),[R,I]=f.useState(false),N={left:b,top:S,width:w,height:M,borderRadius:p.map(_=>`${_}px`).join(" ")};d&&(N[u("color")]=d);function P(){const _=getComputedStyle(n);m(ire(n,o));const L=_.position==="static",{borderLeftWidth:j,borderTopWidth:U}=_;y(L?n.offsetLeft:Lx(-Number.parseFloat(j))),C(L?n.offsetTop:Lx(-Number.parseFloat(U))),$(n.offsetWidth),T(n.offsetHeight);const{borderTopLeftRadius:q,borderTopRightRadius:V,borderBottomLeftRadius:B,borderBottomRightRadius:F}=_;g([q,V,F,B].map(W=>Lx(Number.parseFloat(W))));}if(f.useEffect(()=>{if(n){const _=Lt(()=>{P(),I(true);});let L;return typeof ResizeObserver<"u"&&(L=new ResizeObserver(P),L.observe(n)),()=>{Lt.cancel(_),L?.disconnect();}}},[n]),!R)return null;const O=(r==="Checkbox"||r==="Radio")&&n?.classList.contains(t1);return f.createElement(So,{visible:true,motionAppear:true,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(_,L)=>{if(L.deadline||L.propertyName==="opacity"){const j=i.current?.parentElement;vk(j).then(()=>{j?.remove();});}return false}},({className:_},L)=>f.createElement("div",{ref:Nr(i,L),className:X(t,_,{"wave-quick":O}),style:N}))},sre=(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),e1(f.createElement(are,{...t,target:e}),r);},lre=(e,t,n,r)=>{const{wave:o}=f.useContext(Ct),[,i,a]=Fr(),l=Et(m=>{const p=e.current;if(o?.disabled||!p)return;const g=p.querySelector(`.${t1}`)||p,{showEffect:b}=o||{};(b||sre)(g,{className:t,token:i,component:n,event:m,hashId:a,colorSource:r});}),u=f.useRef(null);return f.useEffect(()=>()=>{Lt.cancel(u.current);},[]),m=>{Lt.cancel(u.current),u.current=Lt(()=>{l(m);});}},Xp=e=>{const{children:t,disabled:n,component:r,colorSource:o}=e,{getPrefixCls:i}=f.useContext(Ct),a=f.useRef(null),l=i("wave"),u=ore(l),d=lre(a,X(l,u),r,o);if(G.useEffect(()=>{const p=a.current;if(!p||p.nodeType!==window.Node.ELEMENT_NODE||n)return;const g=b=>{!JM(b.target)||!p.getAttribute||p.getAttribute("disabled")||p.disabled||p.className.includes("disabled")&&!p.className.includes("disabled:")||p.getAttribute("aria-disabled")==="true"||p.className.includes("-leave")||d(b);};return p.addEventListener("click",g,true),()=>{p.removeEventListener("click",g,true);}},[n]),!G.isValidElement(t))return t??null;const m=yu(t)?Nr(Xl(t),a):a;return kr(t,{ref:m})},ao=e=>{const t=G.useContext(af);return G.useMemo(()=>e?typeof e=="string"?e??t:typeof e=="function"?e(t):t:t,[e,t])},cre=e=>{const{componentCls:t}=e;return {[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"}}}},ure=qt(["Space","Compact"],e=>[cre(e)],()=>({}),{resetStyle:false}),n1=f.createContext(null),_s=(e,t)=>{const n=f.useContext(n1),r=f.useMemo(()=>{if(!n)return "";const{compactDirection:o,isFirstItem:i,isLastItem:a}=n,l=o==="vertical"?"-vertical-":"-";return X(`${e}-compact${l}item`,{[`${e}-compact${l}first-item`]:i,[`${e}-compact${l}last-item`]:a,[`${e}-compact${l}item-rtl`]:t==="rtl"})},[e,t,n]);return {compactSize:n?.compactSize,compactDirection:n?.compactDirection,compactItemClassnames:r}},dre=e=>{const{children:t}=e;return f.createElement(n1.Provider,{value:null},t)},fre=e=>{const{children:t,...n}=e;return f.createElement(n1.Provider,{value:f.useMemo(()=>n,[n])},t)},rR=e=>{const{getPrefixCls:t,direction:n}=f.useContext(Ct),{size:r,direction:o,orientation:i,block:a,prefixCls:l,className:u,rootClassName:d,children:m,vertical:p,...g}=e,[b,y]=Cu(i,p,o),S=ao(I=>r??I),C=t("space-compact",l),[w]=ure(C),$=X(C,w,{[`${C}-rtl`]:n==="rtl",[`${C}-block`]:a,[`${C}-vertical`]:y},u,d),M=f.useContext(n1),T=Qo(m),R=f.useMemo(()=>T.map((I,N)=>{const P=I?.key||`${C}-item-${N}`;return f.createElement(fre,{key:P,compactSize:S,compactDirection:b,isFirstItem:N===0&&(!M||M?.isFirstItem),isLastItem:N===T.length-1&&(!M||M?.isLastItem)},I)}),[T,M,b,S,C]);return T.length===0?null:f.createElement("div",{className:$,...g},R)},yk=f.createContext(void 0),mre=e=>{const{getPrefixCls:t,direction:n}=f.useContext(Ct),{prefixCls:r,size:o,className:i,...a}=e,l=t("btn-group",r),[,,u]=Fr(),d=f.useMemo(()=>{switch(o){case "large":return "lg";case "small":return "sm";default:return ""}},[o]),m=X(l,{[`${l}-${d}`]:d,[`${l}-rtl`]:n==="rtl"},i,u);return f.createElement(yk.Provider,{value:o},f.createElement("div",{...a,className:m}))},GI=/^[\u4E00-\u9FA5]{2}$/,j2=GI.test.bind(GI);function oR(e){return e==="danger"?{danger:true}:{type:e}}function KI(e){return typeof e=="string"}function zx(e){return e==="text"||e==="link"}function hre(e,t,n,r){if(!Qr(e)||e==="")return;const o=t?" ":"";return typeof e!="string"&&typeof e!="number"&&KI(e.type)&&j2(e.props.children)?kr(e,i=>{const a=X(i.className,r)||void 0,l={...n,...i.style};return {...i,children:i.children.split("").join(o),className:a,style:l}}):KI(e)?G.createElement("span",{className:r,style:n},j2(e)?e.split("").join(o):e):rk(e)?G.createElement("span",{className:r,style:n},e):kr(e,i=>({...i,className:X(i.className,r)||void 0,style:{...i.style,...n}}))}function pre(e,t,n,r){let o=false;const i=[];return G.Children.forEach(e,a=>{const l=typeof a,u=l==="string"||l==="number";if(o&&u){const d=i.length-1,m=i[d];i[d]=`${m}${a}`;}else i.push(a);o=u;}),G.Children.map(i,a=>hre(a,t,n,r))}["default","primary","danger"].concat(Yt(_l));const Sk=f.forwardRef((e,t)=>{const{className:n,style:r,children:o,prefixCls:i}=e,a=X(`${i}-icon`,n);return G.createElement("span",{ref:t,className:a,style:r},o)}),YI=f.forwardRef((e,t)=>{const{prefixCls:n,className:r,style:o,iconClassName:i}=e,a=X(`${n}-loading-icon`,r);return G.createElement(Sk,{prefixCls:n,className:a,style:o,ref:t},G.createElement(Jy,{className:i}))}),Bx=()=>({width:0,opacity:0,transform:"scale(0)"}),kx=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),gre=e=>{const{prefixCls:t,loading:n,existIcon:r,className:o,style:i,mount:a}=e,l=!!n;return r?G.createElement(YI,{prefixCls:t,className:o,style:i}):G.createElement(So,{visible:l,motionName:`${t}-loading-icon-motion`,motionAppear:!a,motionEnter:!a,motionLeave:!a,removeOnLeave:true,onAppearStart:Bx,onAppearActive:kx,onEnterStart:Bx,onEnterActive:kx,onLeaveStart:kx,onLeaveActive:Bx},({className:u,style:d},m)=>{const p={...i,...d};return G.createElement(YI,{prefixCls:t,className:X(o,u),style:p,ref:m})})},XI=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),vre=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}},XI(`${t}-primary`,o),XI(`${t}-danger`,i)]}},Fx=e=>Math.round(Number(e||0)),bre=e=>{if(e instanceof cn)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 Sa extends cn{constructor(t){super(bre(t));}toHsbString(){const t=this.toHsb(),n=Fx(t.s*100),r=Fx(t.b*100),o=Fx(t.h),i=t.a,a=`hsb(${o}, ${n}%, ${r}%)`,l=`hsba(${o}, ${n}%, ${r}%, ${i.toFixed(i===0?0:2)})`;return i===1?a:l}toHsb(){const{v:t,...n}=this.toHsv();return {...n,b:t,a:this.a}}}const yre="rc-color-picker",Ud=e=>e instanceof Sa?e:new Sa(e),Sre=Ud("#1677ff"),Ck=e=>{const{offset:t,targetRef:n,containerRef:r,color:o,type:i}=e,{width:a,height:l}=r.current.getBoundingClientRect(),{width:u,height:d}=n.current.getBoundingClientRect(),m=u/2,p=d/2,g=(t.x+m)/a,b=1-(t.y+p)/l,y=o.toHsb(),S=g,C=(t.x+m)/a*360;if(i)switch(i){case "hue":return Ud({...y,h:C<=0?0:C});case "alpha":return Ud({...y,a:S<=0?0:S})}return Ud({h:y.h,s:g<=0?0:g,b:b>=1?1:b,a:y.a})},xk=(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}}},iR=({color:e,prefixCls:t,className:n,style:r,onClick:o})=>{const i=`${t}-color-block`;return G.createElement("div",{className:X(i,n),style:r,onClick:o},G.createElement("div",{className:`${i}-inner`,style:{background:e}}))};function Cre(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 wk(e){const{targetRef:t,containerRef:n,direction:r,onDragChange:o,onDragChangeComplete:i,calculate:a,color:l,disabledDrag:u}=e,[d,m]=f.useState({x:0,y:0}),p=f.useRef(null),g=f.useRef(null);f.useEffect(()=>{m(a());},[l]),f.useEffect(()=>()=>{document.removeEventListener("mousemove",p.current),document.removeEventListener("mouseup",g.current),document.removeEventListener("touchmove",p.current),document.removeEventListener("touchend",g.current),p.current=null,g.current=null;},[]);const b=w=>{const{pageX:$,pageY:M}=Cre(w),{x:T,y:R,width:I,height:N}=n.current.getBoundingClientRect(),{width:P,height:O}=t.current.getBoundingClientRect(),_=P/2,L=O/2,j=Math.max(0,Math.min($-T,I))-_,U=Math.max(0,Math.min(M-R,N))-L,q={x:j,y:r==="x"?d.y:U};if(P===0&&O===0||P!==O)return false;o?.(q);},y=w=>{w.preventDefault(),b(w);},S=w=>{w.preventDefault(),document.removeEventListener("mousemove",p.current),document.removeEventListener("mouseup",g.current),document.removeEventListener("touchmove",p.current),document.removeEventListener("touchend",g.current),p.current=null,g.current=null,i?.();};return [d,w=>{document.removeEventListener("mousemove",p.current),document.removeEventListener("mouseup",g.current),!u&&(b(w),document.addEventListener("mousemove",y),document.addEventListener("mouseup",S),document.addEventListener("touchmove",y),document.addEventListener("touchend",S),p.current=y,g.current=S);}]}const $k=({size:e="default",color:t,prefixCls:n})=>G.createElement("div",{className:X(`${n}-handler`,{[`${n}-handler-sm`]:e==="small"}),style:{backgroundColor:t}}),Ek=({children:e,style:t,prefixCls:n})=>G.createElement("div",{className:`${n}-palette`,style:{position:"relative",...t}},e),Mk=f.forwardRef((e,t)=>{const{children:n,x:r,y:o}=e;return G.createElement("div",{ref:t,style:{position:"absolute",left:`${r}%`,top:`${o}%`,zIndex:1,transform:"translate(-50%, -50%)"}},n)}),xre=({color:e,onChange:t,prefixCls:n,onChangeComplete:r,disabled:o})=>{const i=f.useRef(),a=f.useRef(),l=f.useRef(e),u=Et(p=>{const g=Ck({offset:p,targetRef:a,containerRef:i,color:e});l.current=g,t(g);}),[d,m]=wk({color:e,containerRef:i,targetRef:a,calculate:()=>xk(e),onDragChange:u,onDragChangeComplete:()=>r?.(l.current),disabledDrag:o});return G.createElement("div",{ref:i,className:`${n}-select`,onMouseDown:m,onTouchStart:m},G.createElement(Ek,{prefixCls:n},G.createElement(Mk,{x:d.x,y:d.y,ref:a},G.createElement($k,{color:e.toRgbString(),prefixCls:n})),G.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))"}})))},wre=(e,t)=>{const[n,r]=hn(e,t);return [f.useMemo(()=>Ud(n),[n]),r]},$re=({colors:e,children:t,direction:n="to right",type:r,prefixCls:o})=>{const i=f.useMemo(()=>e.map((a,l)=>{let u=Ud(a);return r==="alpha"&&l===e.length-1&&(u=new Sa(u.setA(1))),u.toRgbString()}).join(","),[e,r]);return G.createElement("div",{className:`${o}-gradient`,style:{position:"absolute",inset:0,background:`linear-gradient(${n}, ${i})`}},t)},Ere=e=>{const{prefixCls:t,colors:n,disabled:r,onChange:o,onChangeComplete:i,color:a,type:l}=e,u=f.useRef(null),d=f.useRef(null),m=f.useRef(a),p=w=>l==="hue"?w.getHue():w.a*100,g=Et(w=>{const $=Ck({offset:w,targetRef:d,containerRef:u,color:a,type:l});m.current=$,o(p($));}),[b,y]=wk({color:a,targetRef:d,containerRef:u,calculate:()=>xk(a,l),onDragChange:g,onDragChangeComplete(){i(p(m.current));},direction:"x",disabledDrag:r}),S=G.useMemo(()=>{if(l==="hue"){const w=a.toHsb();return w.s=1,w.b=1,w.a=1,new Sa(w)}return a},[a,l]),C=G.useMemo(()=>n.map(w=>`${w.color} ${w.percent}%`),[n]);return G.createElement("div",{ref:u,className:X(`${t}-slider`,`${t}-slider-${l}`),onMouseDown:y,onTouchStart:y},G.createElement(Ek,{prefixCls:t},G.createElement(Mk,{x:b.x,y:b.y,ref:d},G.createElement($k,{size:"small",color:S.toHexString(),prefixCls:t})),G.createElement($re,{colors:C,type:l,prefixCls:t})))};function Mre(e){return f.useMemo(()=>{const{slider:t}=e||{};return [t||Ere]},[e])}function Nh(){return Nh=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},Nh.apply(this,arguments)}const Rre=[{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}],Tre=f.forwardRef((e,t)=>{const{value:n,defaultValue:r,prefixCls:o=yre,onChange:i,onChangeComplete:a,className:l,style:u,panelRender:d,disabledAlpha:m=false,disabled:p=false,components:g}=e,[b]=Mre(g),[y,S]=wre(r||Sre,n),C=f.useMemo(()=>y.setA(1).toRgbString(),[y]),w=(L,j)=>{n||S(L),i?.(L,j);},$=L=>new Sa(y.setHue(L)),M=L=>new Sa(y.setA(L/100)),T=L=>{w($(L),{type:"hue",value:L});},R=L=>{w(M(L),{type:"alpha",value:L});},I=L=>{a&&a($(L));},N=L=>{a&&a(M(L));},P=X(`${o}-panel`,l,{[`${o}-panel-disabled`]:p}),O={prefixCls:o,disabled:p,color:y},_=G.createElement(G.Fragment,null,G.createElement(xre,Nh({onChange:w},O,{onChangeComplete:a})),G.createElement("div",{className:`${o}-slider-container`},G.createElement("div",{className:X(`${o}-slider-group`,{[`${o}-slider-group-disabled-alpha`]:m})},G.createElement(b,Nh({},O,{type:"hue",colors:Rre,min:0,max:359,value:y.getHue(),onChange:T,onChangeComplete:I})),!m&&G.createElement(b,Nh({},O,{type:"alpha",colors:[{percent:0,color:"rgba(255, 0, 4, 0)"},{percent:100,color:C}],min:0,max:100,value:y.a*100,onChange:R,onChangeComplete:N}))),G.createElement(iR,{color:y.toRgbString(),prefixCls:o})));return G.createElement("div",{className:P,style:u,ref:t},typeof d=="function"?d(_):_)}),vh=(e,t)=>e?.replace(/[^0-9a-f]/gi,"").slice(0,t?8:6)||"",Are=(e,t)=>e?vh(e,t):"";let Wo=(function(){function e(t){if(Qi(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 Sa(this.colors[0].color.metaColor)):this.metaColor=new Sa(n?"":t),(!t||n&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=true);}return Zi(e,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return Are(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()}}])})();var Nre={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 U2(){return U2=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},U2.apply(this,arguments)}const Pre=(e,t)=>f.createElement(Kn,U2({},e,{ref:t,icon:Nre})),sf=f.forwardRef(Pre),Ire=G.forwardRef((e,t)=>{const{prefixCls:n,forceRender:r,className:o,style:i,children:a,isActive:l,role:u,classNames:d,styles:m}=e,[p,g]=G.useState(l||r);return G.useEffect(()=>{(r||l)&&g(true);},[r,l]),p?G.createElement("div",{ref:t,className:X(`${n}-panel`,{[`${n}-panel-active`]:l,[`${n}-panel-inactive`]:!l},o),style:i,role:u},G.createElement("div",{className:X(`${n}-body`,d?.body),style:m?.body},a)):null}),Rk=G.forwardRef((e,t)=>{const{showArrow:n=true,headerClass:r,isActive:o,onItemClick:i,forceRender:a,className:l,classNames:u={},styles:d={},prefixCls:m,collapsible:p,accordion:g,panelKey:b,extra:y,header:S,expandIcon:C,openMotion:w,destroyOnHidden:$,children:M,...T}=e,R=p==="disabled",I=y!=null&&typeof y!="boolean",N={onClick:()=>{i?.(b);},onKeyDown:U=>{(U.key==="Enter"||U.keyCode===ot.ENTER||U.which===ot.ENTER)&&i?.(b);},role:g?"tab":"button","aria-expanded":o,"aria-disabled":R,tabIndex:R?-1:0},P=typeof C=="function"?C(e):G.createElement("i",{className:"arrow"}),O=P&&G.createElement("div",ir({className:X(`${m}-expand-icon`,u?.icon),style:d?.icon},["header","icon"].includes(p)?N:{}),P),_=X(`${m}-item`,{[`${m}-item-active`]:o,[`${m}-item-disabled`]:R},l),j={className:X(r,`${m}-header`,{[`${m}-collapsible-${p}`]:!!p},u?.header),style:d?.header,...["header","icon"].includes(p)?{}:N};return G.createElement("div",ir({},T,{ref:t,className:_}),G.createElement("div",j,n&&O,G.createElement("span",ir({className:X(`${m}-title`,u?.title),style:d?.title},p==="header"?N:{}),S),I&&G.createElement("div",{className:`${m}-extra`},y)),G.createElement(So,ir({visible:o,leavedClassName:`${m}-panel-hidden`},w,{forceRender:a,removeOnLeave:$}),({className:U,style:q},V)=>G.createElement(Ire,{ref:V,prefixCls:m,className:U,classNames:u,style:q,styles:d,isActive:o,forceRender:a,role:g?"tabpanel":void 0},M)))});function Tk(e,t,n){if(!e||!t)return e||t;const r=Array.from(new Set([...Object.keys(e),...Object.keys(t)])),o={};return r.forEach(i=>{o[i]=n(e[i],t[i]);}),o}function Ore(e,t){return Tk(e,t,(n,r)=>X(n,r))}function Dre(e,t){return Tk(e,t,(n,r)=>({...n,...r}))}const _re=(e,t)=>{const{prefixCls:n,accordion:r,collapsible:o,destroyOnHidden:i,onItemClick:a,activeKey:l,openMotion:u,expandIcon:d,classNames:m,styles:p}=t;return e.map((g,b)=>{const{children:y,label:S,key:C,collapsible:w,onItemClick:$,destroyOnHidden:M,classNames:T,styles:R,...I}=g,N=String(C??b),P=w??o,O=M??i,_=j=>{P!=="disabled"&&(a(j),$?.(j));};let L=false;return r?L=l[0]===N:L=l.indexOf(N)>-1,G.createElement(Rk,ir({},I,{classNames:Ore(m,T),styles:Dre(p,R),prefixCls:n,key:N,panelKey:N,isActive:L,accordion:r,openMotion:u,expandIcon:d,header:S,collapsible:P,onItemClick:_,destroyOnHidden:O}),y)})},Lre=(e,t,n)=>{if(!e)return null;const{prefixCls:r,accordion:o,collapsible:i,destroyOnHidden:a,onItemClick:l,activeKey:u,openMotion:d,expandIcon:m,classNames:p,styles:g}=n,b=e.key||String(t),{header:y,headerClass:S,destroyOnHidden:C,collapsible:w,onItemClick:$}=e.props;let M=false;o?M=u[0]===b:M=u.indexOf(b)>-1;const T=w??i,R=N=>{T!=="disabled"&&(l(N),$?.(N));},I={key:b,panelKey:b,header:y,headerClass:S,classNames:p,styles:g,isActive:M,prefixCls:r,destroyOnHidden:C??a,openMotion:d,accordion:o,children:e.props.children,onItemClick:R,expandIcon:m,collapsible:T};return typeof e.type=="string"?e:(Object.keys(I).forEach(N=>{typeof I[N]>"u"&&delete I[N];}),G.cloneElement(e,I))};function zre(e,t,n){return Array.isArray(e)?_re(e,n):Qo(t).map((r,o)=>Lre(r,o,n))}function QI(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 Bre=G.forwardRef((e,t)=>{const{prefixCls:n="rc-collapse",destroyOnHidden:r=false,style:o,accordion:i,className:a,children:l,collapsible:u,openMotion:d,expandIcon:m,activeKey:p,defaultActiveKey:g,onChange:b,items:y,classNames:S,styles:C}=e,w=X(n,a),[$,M]=hn(g,p),T=QI($),R=Et(P=>{const O=QI(P);M(O),b?.(O);}),I=P=>{R(i?T[0]===P?[]:[P]:T.includes(P)?T.filter(O=>O!==P):[...T,P]);};wr(!l,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");const N=zre(y,l,{prefixCls:n,accordion:i,openMotion:d,expandIcon:m,collapsible:u,destroyOnHidden:r,onItemClick:I,activeKey:T,classNames:S,styles:C});return G.createElement("div",ir({ref:t,className:w,style:o,role:i?"tablist":void 0},bo(e,{aria:true,data:true})),N)}),aR=Object.assign(Bre,{Panel:Rk}),{Panel:T4e}=aR,kre=f.forwardRef((e,t)=>{const{getPrefixCls:n}=f.useContext(Ct),{prefixCls:r,className:o,showArrow:i=true}=e,a=n("collapse",r),l=X({[`${a}-no-arrow`]:!i},o);return f.createElement(aR.Panel,{ref:t,...e,prefixCls:a,className:l})}),Ak=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`}}}),Fre=e=>({animationDuration:e,animationFillMode:"both"}),Hre=e=>({animationDuration:e,animationFillMode:"both"}),r1=(e,t,n,r,o=false)=>{const i=o?"&":"";return {[`
${i}${e}-enter,
${i}${e}-appear
`]:{...Fre(r),animationPlayState:"paused"},[`${i}${e}-leave`]:{...Hre(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"}}},Vre=new zt("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),jre=new zt("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),sR=(e,t=false)=>{const{antCls:n}=e,r=`${n}-fade`,o=t?"&":"";return [r1(r,Vre,jre,e.motionDurationMid,t),{[`
${o}${r}-enter,
${o}${r}-appear
`]:{opacity:0,animationTimingFunction:"linear"},[`${o}${r}-leave`]:{animationTimingFunction:"linear"}}]},Ure=new zt("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),qre=new zt("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),Wre=new zt("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Gre=new zt("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),Kre=new zt("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Yre=new zt("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),Xre=new zt("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Qre=new zt("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),Zre={"move-up":{inKeyframes:Xre,outKeyframes:Qre},"move-down":{inKeyframes:Ure,outKeyframes:qre},"move-left":{inKeyframes:Wre,outKeyframes:Gre},"move-right":{inKeyframes:Kre,outKeyframes:Yre}},B0=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=Zre[t];return [r1(r,o,i,e.motionDurationMid),{[`
${r}-enter,
${r}-appear
`]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},lR=new zt("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),cR=new zt("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),uR=new zt("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),dR=new zt("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),Jre=new zt("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),eoe=new zt("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),toe=new zt("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),noe=new zt("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),roe={"slide-up":{inKeyframes:lR,outKeyframes:cR},"slide-down":{inKeyframes:uR,outKeyframes:dR},"slide-left":{inKeyframes:Jre,outKeyframes:eoe},"slide-right":{inKeyframes:toe,outKeyframes:noe}},Bl=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=roe[t];return [r1(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}}]},ooe=new zt("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),ioe=new zt("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),ZI=new zt("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),JI=new zt("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),aoe=new zt("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),soe=new zt("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),loe=new zt("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),coe=new zt("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),uoe=new zt("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),doe=new zt("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),foe=new zt("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),moe=new zt("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),hoe={zoom:{inKeyframes:ooe,outKeyframes:ioe},"zoom-big":{inKeyframes:ZI,outKeyframes:JI},"zoom-big-fast":{inKeyframes:ZI,outKeyframes:JI},"zoom-left":{inKeyframes:loe,outKeyframes:coe},"zoom-right":{inKeyframes:uoe,outKeyframes:doe},"zoom-up":{inKeyframes:aoe,outKeyframes:soe},"zoom-down":{inKeyframes:foe,outKeyframes:moe}},Qp=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=hoe[t];return [r1(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}}]},poe=e=>{const{componentCls:t,contentBg:n,padding:r,headerBg:o,headerPadding:i,collapseHeaderPaddingSM:a,collapseHeaderPaddingLG:l,collapsePanelBorderRadius:u,lineWidth:d,lineType:m,colorBorder:p,colorText:g,colorTextHeading:b,colorTextDisabled:y,fontSizeLG:S,lineHeight:C,lineHeightLG:w,marginSM:$,paddingSM:M,paddingLG:T,paddingXS:R,motionDurationSlow:I,fontSizeIcon:N,contentPadding:P,fontHeight:O,fontHeightLG:_}=e,L=`${oe(d)} ${m} ${p}`;return {[t]:{...un(e),backgroundColor:o,border:L,borderRadius:u,"&-rtl":{direction:"rtl"},[`& > ${t}-item`]:{borderBottom:L,"&:first-child":{[`
&,
& > ${t}-header`]:{borderRadius:`${oe(u)} ${oe(u)} 0 0`}},"&:last-child":{[`
&,
& > ${t}-header`]:{borderRadius:`0 0 ${oe(u)} ${oe(u)}`}},[`> ${t}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:i,color:b,lineHeight:C,cursor:"pointer",transition:`all ${I}, visibility 0s`,...$i(e),[`> ${t}-title`]:{flex:"auto"},[`${t}-expand-icon`]:{height:O,display:"flex",alignItems:"center",marginInlineEnd:$},[`${t}-arrow`]:{...Su(),fontSize:N,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:g,backgroundColor:n,borderTop:L,[`& > ${t}-body`]:{padding:P},"&-hidden":{display:"none"}},"&-small":{[`> ${t}-item`]:{[`> ${t}-header`]:{padding:a,paddingInlineStart:R,[`> ${t}-expand-icon`]:{marginInlineStart:e.calc(M).sub(R).equal()}},[`> ${t}-panel > ${t}-body`]:{padding:M}}},"&-large":{[`> ${t}-item`]:{fontSize:S,lineHeight:w,[`> ${t}-header`]:{padding:l,paddingInlineStart:r,[`> ${t}-expand-icon`]:{height:_,marginInlineStart:e.calc(T).sub(r).equal()}},[`> ${t}-panel > ${t}-body`]:{padding:T}}},[`${t}-item:last-child`]:{borderBottom:0,[`> ${t}-panel`]:{borderRadius:`0 0 ${oe(u)} ${oe(u)}`}},[`& ${t}-item-disabled > ${t}-header`]:{"\n &,\n & > .arrow\n ":{color:y,cursor:"not-allowed"}},[`&${t}-icon-placement-end`]:{[`& > ${t}-item`]:{[`> ${t}-header`]:{[`${t}-expand-icon`]:{order:1,marginInlineEnd:0,marginInlineStart:$}}}}}}},goe=e=>{const{componentCls:t}=e,n=`> ${t}-item > ${t}-header ${t}-arrow`;return {[`${t}-rtl`]:{[n]:{transform:"rotate(180deg)"}}}},voe=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}}}},boe=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}}}}}},yoe=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"}),Soe=qt("Collapse",e=>{const t=Ft(e,{collapseHeaderPaddingSM:`${oe(e.paddingXS)} ${oe(e.paddingSM)}`,collapseHeaderPaddingLG:`${oe(e.padding)} ${oe(e.paddingLG)}`,collapsePanelBorderRadius:e.borderRadiusLG});return [poe(t),voe(t),boe(t),goe(t),Ak(t)]},yoe),Coe=f.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r,expandIcon:o,className:i,style:a,classNames:l,styles:u}=Gt("collapse"),{prefixCls:d,className:m,rootClassName:p,style:g,bordered:b=true,ghost:y,size:S,expandIconPlacement:C,expandIconPosition:w,children:$,destroyInactivePanel:M,destroyOnHidden:T,expandIcon:R,classNames:I,styles:N}=e,P=ao(z=>S??z??"middle"),O=n("collapse",d),_=n(),[L,j]=Soe(O),U=C??w??"start",q={...e,size:P,bordered:b,expandIconPlacement:U},[V,B]=Xt([l,I],[u,N],{props:q}),F=R??o,W=f.useCallback((z={})=>{const Y=typeof F=="function"?F(z):f.createElement(sf,{rotate:z.isActive?r==="rtl"?-90:90:void 0,"aria-label":z.isActive?"expanded":"collapsed"});return kr(Y,ee=>({className:X(ee.className,`${O}-arrow`)}))},[F,O,r]),K=X(`${O}-icon-placement-${U}`,{[`${O}-borderless`]:!b,[`${O}-rtl`]:r==="rtl",[`${O}-ghost`]:!!y,[`${O}-${P}`]:P!=="middle"},i,m,p,L,j,V.root),Q=f.useMemo(()=>({...bk(_),motionAppear:false,leavedClassName:`${O}-panel-hidden`}),[_,O]),D=f.useMemo(()=>$?Qo($).map(z=>z):null,[$]);return f.createElement(aR,{ref:t,openMotion:Q,...Bn(e,["rootClassName"]),expandIcon:W,prefixCls:O,className:K,style:{...B.root,...a,...g},classNames:V,styles:B,destroyOnHidden:T??M},D)}),Nk=Object.assign(Coe,{Panel:kre}),no=e=>e instanceof Wo?e:new Wo(e),Ub=e=>Math.round(Number(e||0)),fR=e=>Ub(e.toHsb().a*100),qb=(e,t)=>{const n=e.toRgb();if(!n.r&&!n.g&&!n.b){const r=e.toHsb();return r.a=1,no(r)}return n.a=1,no(n)},Pk=(e,t)=>{const n=[{percent:0,color:e[0].color}].concat(Yt(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,a=n[r].color,l=n[r+1].color;if(o<=t&&t<=i){const u=i-o;if(u===0)return a;const d=(t-o)/u*100,m=new Sa(a),p=new Sa(l);return m.mix(p,d).toRgbString()}}return ""},xoe=e=>e.map(t=>(t.colors=t.colors.map(no),t)),mR=(e,t)=>{const{r:n,g:r,b:o,a:i}=e.toRgb(),a=new Sa(e.toRgbString()).onBackground(t).toHsv();return i<=.5?a.v>.5:n*.299+r*.587+o*.114>192},eO=(e,t)=>`panel-${e.key??t}`,woe=({prefixCls:e,presets:t,value:n,onChange:r})=>{const[o]=Oo("ColorPicker"),[,i]=Fr(),a=f.useMemo(()=>xoe(t),[t]),l=`${e}-presets`,u=f.useMemo(()=>a.reduce((p,g,b)=>{const{defaultOpen:y=true}=g;return y&&p.push(eO(g,b)),p},[]),[a]),d=p=>{r?.(p);},m=a.map((p,g)=>({key:eO(p,g),label:G.createElement("div",{className:`${l}-label`},p?.label),children:G.createElement("div",{className:`${l}-items`},Array.isArray(p?.colors)&&p.colors?.length>0?p.colors.map((b,y)=>{const S=no(b);return G.createElement(iR,{key:`preset-${y}-${b.toHexString()}`,color:S.toCssString(),prefixCls:e,className:X(`${l}-color`,{[`${l}-color-checked`]:b.toCssString()===n?.toCssString(),[`${l}-color-bright`]:mR(b,i.colorBgElevated)}),onClick:()=>d(b)})}):G.createElement("span",{className:`${l}-empty`},o.presetEmpty))}));return G.createElement("div",{className:l},G.createElement(Nk,{defaultActiveKey:u,ghost:true,items:m}))},Ik=e=>{const{paddingInline:t,onlyIconSize:n,borderColorDisabled:r}=e;return Ft(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:n,colorBorderDisabled:r})},Ok=e=>{const t=e.contentFontSize??e.fontSize,n=e.contentFontSizeSM??e.fontSize,r=e.contentFontSizeLG??e.fontSizeLG,o=e.contentLineHeight??Hb(t),i=e.contentLineHeightSM??Hb(n),a=e.contentLineHeightLG??Hb(r),l=mR(new Wo(e.colorBgSolid),"#fff")?"#000":"#fff",u=_l.reduce((p,g)=>({...p,[`${g}ShadowColor`]:`0 ${oe(e.controlOutlineWidth)} 0 ${gh(e[`${g}1`],e.colorBgContainer)}`}),{}),d=e.colorBgContainerDisabled,m=e.colorBgContainerDisabled;return {...u,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:l,contentFontSize:t,contentFontSizeSM:n,contentFontSizeLG:r,contentLineHeight:o,contentLineHeightSM:i,contentLineHeightLG:a,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*a)/2-e.lineWidth,0),defaultBgDisabled:d,dashedBgDisabled:m}},$oe=e=>{const{componentCls:t,antCls:n}=e,[r,o]=ar(n,"btn");return {[t]:[{[r("border-width")]:"1px",[r("border-color")]:"#000",[r("border-color-hover")]:o("border-color"),[r("border-color-active")]:o("border-color"),[r("border-color-disabled")]:o("border-color"),[r("border-style")]:"solid",[r("text-color")]:"#000",[r("text-color-hover")]:o("text-color"),[r("text-color-active")]:o("text-color"),[r("text-color-disabled")]:o("text-color"),[r("bg-color")]:"#ddd",[r("bg-color-hover")]:o("bg-color"),[r("bg-color-active")]:o("bg-color"),[r("bg-color-disabled")]:e.colorBgContainerDisabled,[r("bg-color-container")]:e.colorBgContainer,[r("shadow")]:"none"},{border:[o("border-width"),o("border-style"),o("border-color")].join(" "),color:o("text-color"),backgroundColor:o("bg-color"),[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":{border:[o("border-width"),o("border-style"),o("border-color-hover")].join(" "),color:o("text-color-hover"),backgroundColor:o("bg-color-hover")},"&:active":{border:[o("border-width"),o("border-style"),o("border-color-active")].join(" "),color:o("text-color-active"),backgroundColor:o("bg-color-active")}}},{[`&${t}-variant-solid`]:{[r("solid-bg-color")]:o("color-base"),[r("solid-bg-color-hover")]:o("color-hover"),[r("solid-bg-color-active")]:o("color-active"),[r("border-color")]:"transparent",[r("text-color")]:e.colorTextLightSolid,[r("bg-color")]:o("solid-bg-color"),[r("bg-color-hover")]:o("solid-bg-color-hover"),[r("bg-color-active")]:o("solid-bg-color-active"),boxShadow:o("shadow")},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[r("border-color")]:o("color-base"),[r("border-color-hover")]:o("color-hover"),[r("border-color-active")]:o("color-active"),[r("bg-color")]:o("bg-color-container"),[r("text-color")]:o("color-base"),[r("text-color-hover")]:o("color-hover"),[r("text-color-active")]:o("color-active"),boxShadow:o("shadow")},[`&${t}-variant-dashed`]:{[r("border-style")]:"dashed",[r("bg-color-disabled")]:e.dashedBgDisabled},[`&${t}-variant-filled`]:{[r("border-color")]:"transparent",[r("text-color")]:o("color-base"),[r("bg-color")]:o("color-light"),[r("bg-color-hover")]:o("color-light-hover"),[r("bg-color-active")]:o("color-light-active")},[`&${t}-variant-text, &${t}-variant-link`]:{[r("border-color")]:"transparent",[r("text-color")]:o("color-base"),[r("text-color-hover")]:o("color-hover"),[r("text-color-active")]:o("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")]:o("color-light"),[r("bg-color-active")]:o("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")]:o("text-color"),[r("text-color-active")]:o("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")]:o("text-color"),[r("text-color-active")]:o("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.defaultColor,[r("text-color-hover")]:e.defaultHoverColor,[r("text-color-active")]:e.defaultActiveColor,[r("shadow")]:e.defaultShadow,[`&${t}-variant-solid`]:{[r("text-color")]:e.solidTextColor,[r("text-color-hover")]:o("text-color"),[r("text-color-active")]:o("text-color")},[`&${t}-variant-filled, &${t}-variant-text`]:{[r("text-color-hover")]:o("text-color"),[r("text-color-active")]:o("text-color")},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[r("text-color")]:e.defaultColor,[r("text-color-hover")]:e.defaultHoverColor,[r("text-color-active")]:e.defaultActiveColor,[r("bg-color-container")]:e.defaultBg,[r("bg-color-hover")]:e.defaultHoverBg,[r("bg-color-active")]:e.defaultActiveBg},[`&${t}-variant-text`]:{[r("text-color")]:e.textTextColor,[r("text-color-hover")]:e.textTextHoverColor,[r("text-color-active")]:e.textTextActiveColor,[r("bg-color-hover")]:e.textHoverBg},[`&${t}-background-ghost`]:{[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[r("text-color")]:e.defaultGhostColor,[r("border-color")]:e.defaultGhostBorderColor}}}},_l.map(i=>{const a=e[`${i}6`],l=e[`${i}1`],u=e[`${i}5`],d=e[`${i}2`],m=e[`${i}3`],p=e[`${i}7`],g=e[`${i}ShadowColor`];return {[`&${t}-color-${i}`]:{[r("color-base")]:a,[r("color-hover")]:u,[r("color-active")]:p,[r("color-light")]:l,[r("color-light-hover")]:d,[r("color-light-active")]:m,[r("shadow")]:g}}}),{[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",borderColor:e.colorBorderDisabled,background:o("bg-color-disabled"),color:e.colorTextDisabled,boxShadow:"none"}},{[`&${t}-background-ghost`]:{[r("bg-color")]:"transparent",[r("shadow")]:"none"}}]}},Eoe=e=>{const{componentCls:t,iconCls:n,fontWeight:r,opacityLoading:o,motionDurationSlow:i,motionEaseInOut:a,iconGap:l,calc:u}=e;return {[t]:{outline:"none",position:"relative",display:"inline-flex",gap:l,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`]:Su(),"> a":{color:"currentColor"},"&:not(:disabled)":$i(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(d=>`${d} ${i} ${a}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:u(l).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:u(l).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:u(l).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:u(l).mul(-1).equal()}}}}}},Moe=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:"50%"}),hR=(e,t="")=>{const{componentCls:n,controlHeight:r,fontSize:o,borderRadius:i,buttonPaddingHorizontal:a,iconCls:l,buttonPaddingVertical:u,buttonIconOnlyFontSize:d}=e;return [{[t]:{fontSize:o,height:r,padding:`${oe(u)} ${oe(a)}`,borderRadius:i,[`&${n}-icon-only`]:{width:r,[l]:{fontSize:d}}}},{[`${n}${n}-circle${t}`]:Moe(e)},{[`${n}${n}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${n}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},Roe=e=>{const t=Ft(e,{fontSize:e.contentFontSize});return hR(t,e.componentCls)},Toe=e=>{const t=Ft(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return hR(t,`${e.componentCls}-sm`)},Aoe=e=>{const t=Ft(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return hR(t,`${e.componentCls}-lg`)},Noe=e=>{const{componentCls:t}=e;return {[t]:{[`&${t}-block`]:{width:"100%"}}}},Poe=qt("Button",e=>{const t=Ik(e);return [Eoe(t),Roe(t),Toe(t),Aoe(t),Noe(t),$oe(t),vre(t)]},Ok,{unitless:{fontWeight:true,contentLineHeight:true,contentLineHeightSM:true,contentLineHeightLG:true}});function Ioe(e,t,n,r){const{focusElCls:o,focus:i,borderElCls:a}=n,l=a?"> *":"",u=["hover",i?"focus":null,"active"].filter(Boolean).map(d=>`&:${d} ${l}`).join(",");return {[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":{[u]:{zIndex:3},...o?{[`&${o}`]:{zIndex:3}}:{},[`&[disabled] ${l}`]:{zIndex:0}}}}function Ooe(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 Nf(e,t={focus:true}){const{componentCls:n}=e,{componentCls:r}=t,o=r||n,i=`${o}-compact`;return {[i]:{...Ioe(e,i,t,o),...Ooe(o,i,t)}}}function Doe(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 _oe(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 Loe(e){const t=`${e.componentCls}-compact-vertical`;return {[t]:{...Doe(e,t,e.componentCls),..._oe(e.componentCls,t)}}}const zoe=e=>{const{antCls:t,componentCls:n,lineWidth:r,calc:o,colorBgContainer:i}=e,a=`${n}-variant-solid:not([disabled])`,l=o(r).mul(-1).equal(),[u,d]=ar(t,"btn"),m=p=>({[`${n}-compact${p?"-vertical":""}-item`]:{[u("compact-connect-border-color")]:d("bg-color-hover"),[`&${a}`]:{transition:"none",[`& + ${a}:before`]:[{position:"absolute",backgroundColor:d("compact-connect-border-color"),content:'""'},p?{top:l,insetInline:l,height:r}:{insetBlock:l,insetInlineStart:l,width:r}],"&:hover:before":{display:"none"}}}});return [m(),m(true),{[`${a}${n}-color-default`]:{[u("compact-connect-border-color")]:`color-mix(in srgb, ${d("bg-color-hover")} 75%, ${i})`}}]},Boe=Tf(["Button","compact"],e=>{const t=Ik(e);return [Nf(t),Loe(t),zoe(t)]},Ok);function koe(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 Foe={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},Hoe=G.forwardRef((e,t)=>{const{_skipSemantic:n,loading:r=false,prefixCls:o,color:i,variant:a,type:l,danger:u=false,shape:d,size:m,disabled:p,className:g,rootClassName:b,children:y,icon:S,iconPosition:C,iconPlacement:w,ghost:$=false,block:M=false,htmlType:T="button",classNames:R,styles:I,style:N,autoInsertSpace:P,autoFocus:O,..._}=e,L=Qo(y),j=l||"default",{button:U}=G.useContext(Ct),q=d||U?.shape||"default",[V,B]=f.useMemo(()=>{if(i&&a)return [i,a];if(l||u){const st=Foe[j]||[];return u?["danger",st[1]]:st}return U?.color&&U?.variant?[U.color,U.variant]:["default","outlined"]},[i,a,l,u,U?.color,U?.variant,j]),[F,W]=f.useMemo(()=>$&&B==="solid"?[V,"outlined"]:[V,B],[V,B,$]),K=F==="danger",Q=K?"dangerous":F,{getPrefixCls:D,direction:z,autoInsertSpace:Y,className:ee,style:J,classNames:te,styles:ne}=Gt("button"),se=P??Y??true,ae=D("btn",o),[re,de]=Poe(ae),ge=f.useContext(to),ie=p??ge,Ee=f.useContext(yk),le=f.useMemo(()=>koe(r),[r]),[ue,Se]=f.useState(le.loading),[ye,Be]=f.useState(false),je=f.useRef(null),Ne=Yl(t,je),fe=L.length===1&&!S&&!zx(W),be=f.useRef(true);G.useEffect(()=>(be.current=false,()=>{be.current=true;}),[]),An(()=>{let st=null;le.delay>0?st=setTimeout(()=>{st=null,Se(true);},le.delay):Se(le.loading);function He(){st&&(clearTimeout(st),st=null);}return He},[le.delay,le.loading]),f.useEffect(()=>{if(!je.current||!se)return;const st=je.current.textContent||"";fe&&j2(st)?ye||Be(true):ye&&Be(false);}),f.useEffect(()=>{O&&je.current&&je.current.focus();},[]);const Re=G.useCallback(st=>{if(ue||ie){st.preventDefault();return}e.onClick?.((st));},[e.onClick,ue,ie]),{compactSize:qe,compactItemClassnames:Qe}=_s(ae,z),We={large:"lg",small:"sm",middle:void 0},tt=ao(st=>m??qe??Ee??st),rt=tt?We[tt]??"":"",Ze=ue?"loading":S,Oe=w??C??"start",Ye=Bn(_,["navigate"]),Ke={...e,type:j,color:F,variant:W,danger:K,shape:q,size:tt,disabled:ie,loading:ue,iconPlacement:Oe},[_e,ke]=Xt([n?void 0:te,R],[n?void 0:ne,I],{props:Ke}),lt=X(ae,re,de,{[`${ae}-${q}`]:q!=="default"&&q!=="square"&&q,[`${ae}-${j}`]:j,[`${ae}-dangerous`]:u,[`${ae}-color-${Q}`]:Q,[`${ae}-variant-${W}`]:W,[`${ae}-${rt}`]:rt,[`${ae}-icon-only`]:!y&&y!==0&&!!Ze,[`${ae}-background-ghost`]:$&&!zx(W),[`${ae}-loading`]:ue,[`${ae}-two-chinese-chars`]:ye&&se&&!ue,[`${ae}-block`]:M,[`${ae}-rtl`]:z==="rtl",[`${ae}-icon-end`]:Oe==="end"},Qe,g,b,ee,_e.root),At={...ke.root,...J,...N},dt={className:_e.icon,style:ke.icon},Dt=st=>G.createElement(Sk,{prefixCls:ae,...dt},st),Tt=G.createElement(gre,{existIcon:!!S,prefixCls:ae,loading:ue,mount:be.current,...dt});let xt;S&&!ue?xt=Dt(S):r&&typeof r=="object"&&r.icon?xt=Dt(r.icon):xt=Tt;const gt=Qr(y)?pre(y,fe&&se,ke.content,_e.content):null;if(Ye.href!==void 0)return G.createElement("a",{...Ye,className:X(lt,{[`${ae}-disabled`]:ie}),href:ie?void 0:Ye.href,style:At,onClick:Re,ref:Ne,tabIndex:ie?-1:0,"aria-disabled":ie},xt,gt);let ft=G.createElement("button",{..._,type:T,className:lt,style:At,onClick:Re,disabled:ie,ref:Ne},xt,gt,Qe&&G.createElement(Boe,{prefixCls:ae}));return zx(W)||(ft=G.createElement(Xp,{component:"Button",disabled:ue},ft)),ft}),ut=Hoe;ut.Group=mre;ut.__ANT_BUTTON=true;const Hx=e=>typeof e?.then=="function",pR=e=>{const{type:t,children:n,prefixCls:r,buttonProps:o,close:i,autoFocus:a,emitEvent:l,isSilent:u,quitOnNullishReturnValue:d,actionFn:m}=e,p=f.useRef(false),g=f.useRef(null),[b,y]=R0(false),S=(...$)=>{i?.(...$);};f.useEffect(()=>{let $=null;return a&&($=setTimeout(()=>{g.current?.focus({preventScroll:true});})),()=>{$&&clearTimeout($);}},[a]);const C=$=>{Hx($)&&(y(true),$.then((...M)=>{y(false,true),S.apply(void 0,M),p.current=false;},M=>{if(y(false,true),p.current=false,!u?.())return Promise.reject(M)}));},w=$=>{if(p.current)return;if(p.current=true,!m){S();return}let M;if(l){if(M=m($),d&&!Hx(M)){p.current=false,S($);return}}else if(m.length)M=m(i),p.current=false;else if(M=m(),!Hx(M)){S();return}C(M);};return f.createElement(ut,{...oR(t),onClick:w,loading:b,prefixCls:r,...o,ref:g},n)},Zp=G.createContext({}),{Provider:Dk}=Zp,tO=()=>{const{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:n,isSilent:r,mergedOkCancel:o,rootPrefixCls:i,close:a,onCancel:l,onConfirm:u,onClose:d}=f.useContext(Zp);return o?G.createElement(pR,{isSilent:r,actionFn:l,close:(...m)=>{a?.(...m),u?.(false),d?.();},autoFocus:e==="cancel",buttonProps:t,prefixCls:`${i}-btn`},n):null},nO=()=>{const{autoFocusButton:e,close:t,isSilent:n,okButtonProps:r,rootPrefixCls:o,okTextLocale:i,okType:a,onConfirm:l,onOk:u,onClose:d}=f.useContext(Zp);return G.createElement(pR,{isSilent:n,type:a||"primary",actionFn:u,close:(...m)=>{t?.(...m),l?.(true),d?.();},autoFocus:e==="ok",buttonProps:r,prefixCls:`${o}-btn`},i)},_k=f.createContext({});function rO(e,t,n){let r=t;return !r&&n&&(r=`${e}-${n}`),r}function oO(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 Voe(e){const t=e.getBoundingClientRect(),n={left:t.left,top:t.top},r=e.ownerDocument,o=r.defaultView||r.parentWindow;return n.left+=oO(o),n.top+=oO(o,true),n}function iO(e,t=false){if(JM(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 a=null;return o&&!Number.isNaN(i)?a=i:r&&a===null&&(a=0),r&&e.disabled&&(a=null),a!==null&&(a>=0||t&&a<0)}return false}function gR(e,t=false){const n=[...e.querySelectorAll("*")].filter(r=>iO(r,t));return iO(e,t)&&n.unshift(e),n}function vR(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);}}}let qd=null,Sl=[];function Lk(){return Sl[Sl.length-1]}function joe(e){const{activeElement:t}=document;return e===t||e.contains(t)}function Vx(){const e=Lk(),{activeElement:t}=document;if(e&&!joe(e)){const n=gR(e);(n.includes(qd)?qd:n[0])?.focus({preventScroll:true});}else qd=t;}function aO(e){if(e.key==="Tab"){const{activeElement:t}=document,n=Lk(),r=gR(n),o=r[r.length-1];e.shiftKey&&t===r[0]?qd=o:!e.shiftKey&&t===o&&(qd=r[0]);}}function Uoe(e){return e&&(Sl=Sl.filter(t=>t!==e),Sl.push(e),window.addEventListener("focusin",Vx),window.addEventListener("keydown",aO,true),Vx()),()=>{qd=null,Sl=Sl.filter(t=>t!==e),Sl.length===0&&(window.removeEventListener("focusin",Vx),window.removeEventListener("keydown",aO,true));}}function qoe(e,t){f.useEffect(()=>{if(e){const n=t();if(n)return Uoe(n)}},[e]);}const Woe=f.memo(({children:e})=>e,(e,{shouldUpdate:t})=>!t);function k0(){return k0=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},k0.apply(this,arguments)}const zk=G.forwardRef((e,t)=>{const{prefixCls:n,className:r,style:o,title:i,ariaId:a,footer:l,closable:u,closeIcon:d,onClose:m,children:p,bodyStyle:g,bodyProps:b,modalRender:y,onMouseDown:S,onMouseUp:C,holderRef:w,visible:$,forceRender:M,width:T,height:R,classNames:I,styles:N,isFixedPos:P,focusTrap:O}=e,{panel:_}=G.useContext(_k),L=f.useRef(null),j=Yl(w,_,L);qoe($&&P&&O!==false,()=>L.current),G.useImperativeHandle(t,()=>({focus:()=>{L.current?.focus({preventScroll:true});}}));const U={};T!==void 0&&(U.width=T),R!==void 0&&(U.height=R);const q=l?G.createElement("div",{className:X(`${n}-footer`,I?.footer),style:{...N?.footer}},l):null,V=i?G.createElement("div",{className:X(`${n}-header`,I?.header),style:{...N?.header}},G.createElement("div",{className:X(`${n}-title`,I?.title),id:a,style:{...N?.title}},i)):null,B=f.useMemo(()=>typeof u=="object"&&u!==null?u:u?{closeIcon:d??G.createElement("span",{className:`${n}-close-x`})}:{},[u,d,n]),F=bo(B,true),W=typeof u=="object"&&u.disabled,K=u?G.createElement("button",k0({type:"button",onClick:m,"aria-label":"Close"},F,{className:`${n}-close`,disabled:W}),B.closeIcon):null,Q=G.createElement("div",{className:X(`${n}-container`,I?.container),style:N?.container},K,V,G.createElement("div",k0({className:X(`${n}-body`,I?.body),style:{...g,...N?.body}},b),p),q);return G.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":i?a:null,"aria-modal":"true",ref:j,style:{...o,...U},className:X(n,r),onMouseDown:S,onMouseUp:C,tabIndex:-1},G.createElement(Woe,{shouldUpdate:$||M},y?y(Q):Q))});function q2(){return q2=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},q2.apply(this,arguments)}const Goe=f.forwardRef((e,t)=>{const{prefixCls:n,title:r,style:o,className:i,visible:a,forceRender:l,destroyOnHidden:u,motionName:d,ariaId:m,onVisibleChanged:p,mousePosition:g}=e,b=f.useRef(null),y=f.useRef(null);f.useImperativeHandle(t,()=>({...y.current,inMotion:b.current.inMotion,enableMotion:b.current.enableMotion}));const[S,C]=f.useState(),w={};S&&(w.transformOrigin=S);function $(){if(!b.current?.nativeElement)return;const M=Voe(b.current.nativeElement);C(g&&(g.x||g.y)?`${g.x-M.left}px ${g.y-M.top}px`:"");}return f.createElement(So,{visible:a,onVisibleChanged:p,onAppearPrepare:$,onEnterPrepare:$,forceRender:l,motionName:d,removeOnLeave:u,ref:b},({className:M,style:T},R)=>f.createElement(zk,q2({},e,{ref:y,title:r,ariaId:m,prefixCls:n,holderRef:R,style:{...T,...o,...w},className:X(i,M)})))});function W2(){return W2=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},W2.apply(this,arguments)}const Koe=e=>{const{prefixCls:t,style:n,visible:r,maskProps:o,motionName:i,className:a}=e;return f.createElement(So,{key:"mask",visible:r,motionName:i,leavedClassName:`${t}-mask-hidden`},({className:l,style:u},d)=>f.createElement("div",W2({ref:d,style:{...u,...n},className:X(`${t}-mask`,l,a)},o)))};function Ph(){return Ph=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},Ph.apply(this,arguments)}const Yoe=e=>{const{prefixCls:t="rc-dialog",zIndex:n,visible:r=false,focusTriggerAfterClose:o=true,wrapStyle:i,wrapClassName:a,wrapProps:l,onClose:u,afterOpenChange:d,afterClose:m,transitionName:p,animation:g,closable:b=true,mask:y=true,maskTransitionName:S,maskAnimation:C,maskClosable:w=true,maskStyle:$,maskProps:M,rootClassName:T,rootStyle:R,classNames:I,styles:N}=e,P=f.useRef(null),O=f.useRef(null),_=f.useRef(null),[L,j]=f.useState(r),[U,q]=f.useState(false),V=Ql();function B(){r2(O.current,document.activeElement)||(P.current=document.activeElement);}function F(){r2(O.current,document.activeElement)||_.current?.focus();}function W(){if(j(false),y&&P.current&&o){try{P.current.focus({preventScroll:!0});}catch{}P.current=null;}L&&m?.();}function K(J){J?F():W(),d?.(J);}function Q(J){u?.(J);}const D=f.useRef(false);let z=null;w&&(z=J=>{O.current===J.target&&D.current&&Q(J);});function Y(J){D.current=J.target===O.current;}f.useEffect(()=>{if(r){if(D.current=false,j(true),B(),O.current){const J=getComputedStyle(O.current);q(J.position==="fixed");}}else L&&_.current.enableMotion()&&!_.current.inMotion()&&W();},[r]);const ee={zIndex:n,...i,...N?.wrapper,display:L?null:"none"};return f.createElement("div",Ph({className:X(`${t}-root`,T),style:R},bo(e,{data:true})),f.createElement(Koe,{prefixCls:t,visible:y&&r,motionName:rO(t,S,C),style:{zIndex:n,...$,...N?.mask},maskProps:M,className:I?.mask}),f.createElement("div",Ph({className:X(`${t}-wrap`,a,I?.wrapper),ref:O,onClick:z,onMouseDown:Y,style:ee},l),f.createElement(Goe,Ph({},e,{isFixedPos:U,ref:_,closable:b,ariaId:V,prefixCls:t,visible:r&&L,onClose:Q,onVisibleChanged:K,motionName:rO(t,p,g)}))))};function G2(){return G2=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},G2.apply(this,arguments)}const Xoe=e=>{const{visible:t,getContainer:n,forceRender:r,destroyOnHidden:o=false,afterClose:i,closable:a,panelRef:l,keyboard:u=true,onClose:d}=e,[m,p]=f.useState(t),g=f.useMemo(()=>({panel:l}),[l]),b=({top:y,event:S})=>{if(y&&u){S.stopPropagation(),d?.(S);return}};return f.useEffect(()=>{t&&p(true);},[t]),!r&&o&&!m?null:f.createElement(_k.Provider,{value:g},f.createElement(Qy,{open:t||r||m,onEsc:b,autoDestroy:false,getContainer:n,autoLock:t||m},f.createElement(Yoe,G2({},e,{destroyOnHidden:o,afterClose:()=>{const y=a&&typeof a=="object"?a:{},{afterClose:S}=y||{};S?.(),i?.(),p(false);}}))))},Fc="RC_FORM_INTERNAL_HOOKS",Ln=()=>{wr(false,"Can not find FormContext. Please make sure you wrap Field under Form.");},lf=f.createContext({getFieldValue:Ln,getFieldsValue:Ln,getFieldError:Ln,getFieldWarning:Ln,getFieldsError:Ln,isFieldsTouched:Ln,isFieldTouched:Ln,isFieldValidating:Ln,isFieldsValidating:Ln,resetFields:Ln,setFields:Ln,setFieldValue:Ln,setFieldsValue:Ln,validateFields:Ln,submit:Ln,getInternalHooks:()=>(Ln(),{dispatch:Ln,initEntityValue:Ln,registerField:Ln,useSubscribe:Ln,setInitialValues:Ln,destroyForm:Ln,setCallbacks:Ln,registerWatch:Ln,getFields:Ln,setValidateMessages:Ln,setPreserve:Ln,getInitialValue:Ln})}),F0=f.createContext(null);function K2(e){return e==null?[]:Array.isArray(e)?e:[e]}function Qoe(e){return e&&!!e._init}function Y2(){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",tel:"%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 X2=Y2();function Zoe(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function Joe(e,t,n){if(FM())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&ap(o,n.prototype),o}function Q2(e){var t=typeof Map=="function"?new Map:void 0;return Q2=function(r){if(r===null||!Zoe(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 Joe(r,arguments,sp(this).constructor)}return o.prototype=Object.create(r.prototype,{constructor:{value:o,enumerable:false,writable:true,configurable:true}}),ap(o,r)},Q2(e)}var eie=/%[sdj%]/g,tie=function(){};function Z2(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 bi(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 a=e.replace(eie,function(l){if(l==="%%")return "%";if(o>=i)return l;switch(l){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 l}});return a}return e}function nie(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"||e==="tel"}function Ar(e,t){return !!(e==null||t==="array"&&Array.isArray(e)&&!e.length||nie(t)&&typeof e=="string"&&!e)}function rie(e,t,n){var r=[],o=0,i=e.length;function a(l){r.push.apply(r,Yt(l||[])),o++,o===i&&n(r);}e.forEach(function(l){t(l,a);});}function sO(e,t,n){var r=0,o=e.length;function i(a){if(a&&a.length){n(a);return}var l=r;r=r+1,l<o?t(e[l],i):n([]);}i([]);}function oie(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,Yt(e[n]||[]));}),t}var lO=(function(e){fB(n,e);var t=mB(n);function n(r,o){var i;return Qi(this,n),i=t.call(this,"Async Validation Error"),St(jd(i),"errors",void 0),St(jd(i),"fields",void 0),i.errors=r,i.fields=o,i}return Zi(n)})(Q2(Error));function iie(e,t,n,r,o){if(t.first){var i=new Promise(function(g,b){var y=function(w){return r(w),w.length?b(new lO(w,Z2(w))):g(o)},S=oie(e);sO(S,n,y);});return i.catch(function(g){return g}),i}var a=t.firstFields===true?Object.keys(e):t.firstFields||[],l=Object.keys(e),u=l.length,d=0,m=[],p=new Promise(function(g,b){var y=function(C){if(m.push.apply(m,C),d++,d===u)return r(m),m.length?b(new lO(m,Z2(m))):g(o)};l.length||(r(m),g(o)),l.forEach(function(S){var C=e[S];a.indexOf(S)!==-1?sO(C,n,y):rie(C,n,y);});});return p.catch(function(g){return g}),p}function aie(e){return !!(e&&e.message!==void 0)}function sie(e,t){for(var n=e,r=0;r<t.length;r++){if(n==null)return n;n=n[t[r]];}return n}function cO(e,t){return function(n){var r;return e.fullFields?r=sie(t,e.fullFields):r=t[n.field||e.fullField],aie(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 uO(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];xr(r)==="object"&&xr(e[n])==="object"?e[n]=Jn(Jn({},e[n]),r):e[n]=r;}}return e}var gd="enum",lie=function(t,n,r,o,i){t[gd]=Array.isArray(t[gd])?t[gd]:[],t[gd].indexOf(n)===-1&&o.push(bi(i.messages[gd],t.fullField,t[gd].join(", ")));},cie=function(t,n,r,o,i){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||o.push(bi(i.messages.pattern.mismatch,t.fullField,n,t.pattern));else if(typeof t.pattern=="string"){var a=new RegExp(t.pattern);a.test(n)||o.push(bi(i.messages.pattern.mismatch,t.fullField,n,t.pattern));}}},uie=function(t,n,r,o,i){var a=typeof t.len=="number",l=typeof t.min=="number",u=typeof t.max=="number",d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,m=n,p=null,g=typeof n=="number",b=typeof n=="string",y=Array.isArray(n);if(g?p="number":b?p="string":y&&(p="array"),!p)return false;y&&(m=n.length),b&&(m=n.replace(d,"_").length),a?m!==t.len&&o.push(bi(i.messages[p].len,t.fullField,t.len)):l&&!u&&m<t.min?o.push(bi(i.messages[p].min,t.fullField,t.min)):u&&!l&&m>t.max?o.push(bi(i.messages[p].max,t.fullField,t.max)):l&&u&&(m<t.min||m>t.max)&&o.push(bi(i.messages[p].range,t.fullField,t.min,t.max));},Bk=function(t,n,r,o,i,a){t.required&&(!r.hasOwnProperty(t.field)||Ar(n,a||t.type))&&o.push(bi(i.messages.required,t.fullField));},ib;const die=(function(){if(ib)return ib;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,})?",a="(?:".concat(o.join("|"),")").concat(i),l=new RegExp("(?:^".concat(n,"$)|(?:^").concat(a,"$)")),u=new RegExp("^".concat(n,"$")),d=new RegExp("^".concat(a,"$")),m=function(I){return I&&I.exact?l:new RegExp("(?:".concat(t(I)).concat(n).concat(t(I),")|(?:").concat(t(I)).concat(a).concat(t(I),")"),"g")};m.v4=function(R){return R&&R.exact?u:new RegExp("".concat(t(R)).concat(n).concat(t(R)),"g")},m.v6=function(R){return R&&R.exact?d:new RegExp("".concat(t(R)).concat(a).concat(t(R)),"g")};var p="(?:(?:[a-z]+:)?//)",g="(?:\\S+(?::\\S*)?@)?",b=m.v4().source,y=m.v6().source,S="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",C="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",w="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",$="(?::\\d{2,5})?",M='(?:[/?#][^\\s"]*)?',T="(?:".concat(p,"|www\\.)").concat(g,"(?:localhost|").concat(b,"|").concat(y,"|").concat(S).concat(C).concat(w,")").concat($).concat(M);return ib=new RegExp("(?:^".concat(T,"$)"),"i"),ib});var jx={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,}))$/,tel:/^(\+[0-9]{1,3}[-\s\u2011]?)?(\([0-9]{1,4}\)[-\s\u2011]?)?([0-9]+[-\s\u2011]?)*[0-9]+$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},bh={integer:function(t){return bh.number(t)&&parseInt(t,10)===t},float:function(t){return bh.number(t)&&!bh.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 xr(t)==="object"&&!bh.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(jx.email)},tel:function(t){return typeof t=="string"&&t.length<=32&&!!t.match(jx.tel)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(die())},hex:function(t){return typeof t=="string"&&!!t.match(jx.hex)}},fie=function(t,n,r,o,i){if(t.required&&n===void 0){Bk(t,n,r,o,i);return}var a=["integer","float","array","regexp","object","method","email","tel","number","date","url","hex"],l=t.type;a.indexOf(l)>-1?bh[l](n)||o.push(bi(i.messages.types[l],t.fullField,t.type)):l&&xr(n)!==t.type&&o.push(bi(i.messages.types[l],t.fullField,t.type));},mie=function(t,n,r,o,i){(/^\s+$/.test(n)||n==="")&&o.push(bi(i.messages.whitespace,t.fullField));};const sn={required:Bk,whitespace:mie,type:fie,range:uie,enum:lie,pattern:cie};var hie=function(t,n,r,o,i){var a=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(Ar(n)&&!t.required)return r();sn.required(t,n,o,a,i);}r(a);},pie=function(t,n,r,o,i){var a=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(n==null&&!t.required)return r();sn.required(t,n,o,a,i,"array"),n!=null&&(sn.type(t,n,o,a,i),sn.range(t,n,o,a,i));}r(a);},gie=function(t,n,r,o,i){var a=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(Ar(n)&&!t.required)return r();sn.required(t,n,o,a,i),n!==void 0&&sn.type(t,n,o,a,i);}r(a);},vie=function(t,n,r,o,i){var a=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(Ar(n,"date")&&!t.required)return r();if(sn.required(t,n,o,a,i),!Ar(n,"date")){var u;n instanceof Date?u=n:u=new Date(n),sn.type(t,u,o,a,i),u&&sn.range(t,u.getTime(),o,a,i);}}r(a);},bie="enum",yie=function(t,n,r,o,i){var a=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(Ar(n)&&!t.required)return r();sn.required(t,n,o,a,i),n!==void 0&&sn[bie](t,n,o,a,i);}r(a);},Sie=function(t,n,r,o,i){var a=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(Ar(n)&&!t.required)return r();sn.required(t,n,o,a,i),n!==void 0&&(sn.type(t,n,o,a,i),sn.range(t,n,o,a,i));}r(a);},Cie=function(t,n,r,o,i){var a=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(Ar(n)&&!t.required)return r();sn.required(t,n,o,a,i),n!==void 0&&(sn.type(t,n,o,a,i),sn.range(t,n,o,a,i));}r(a);},xie=function(t,n,r,o,i){var a=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(Ar(n)&&!t.required)return r();sn.required(t,n,o,a,i),n!==void 0&&sn.type(t,n,o,a,i);}r(a);},wie=function(t,n,r,o,i){var a=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(n===""&&(n=void 0),Ar(n)&&!t.required)return r();sn.required(t,n,o,a,i),n!==void 0&&(sn.type(t,n,o,a,i),sn.range(t,n,o,a,i));}r(a);},$ie=function(t,n,r,o,i){var a=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(Ar(n)&&!t.required)return r();sn.required(t,n,o,a,i),n!==void 0&&sn.type(t,n,o,a,i);}r(a);},Eie=function(t,n,r,o,i){var a=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(Ar(n,"string")&&!t.required)return r();sn.required(t,n,o,a,i),Ar(n,"string")||sn.pattern(t,n,o,a,i);}r(a);},Mie=function(t,n,r,o,i){var a=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(Ar(n)&&!t.required)return r();sn.required(t,n,o,a,i),Ar(n)||sn.type(t,n,o,a,i);}r(a);},Rie=function(t,n,r,o,i){var a=[],l=Array.isArray(n)?"array":xr(n);sn.required(t,n,o,a,i,l),r(a);},Tie=function(t,n,r,o,i){var a=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(Ar(n,"string")&&!t.required)return r();sn.required(t,n,o,a,i,"string"),Ar(n,"string")||(sn.type(t,n,o,a,i),sn.range(t,n,o,a,i),sn.pattern(t,n,o,a,i),t.whitespace===true&&sn.whitespace(t,n,o,a,i));}r(a);},ab=function(t,n,r,o,i){var a=t.type,l=[],u=t.required||!t.required&&o.hasOwnProperty(t.field);if(u){if(Ar(n,a)&&!t.required)return r();sn.required(t,n,o,l,i,a),Ar(n,a)||sn.type(t,n,o,l,i);}r(l);};const Ih={string:Tie,method:xie,number:wie,boolean:gie,regexp:Mie,integer:Cie,float:Sie,array:pie,object:$ie,enum:yie,pattern:Eie,date:vie,url:ab,hex:ab,email:ab,tel:ab,required:Rie,any:hie};var Jp=(function(){function e(t){Qi(this,e),St(this,"rules",null),St(this,"_messages",X2),this.define(t);}return Zi(e,[{key:"define",value:function(n){var r=this;if(!n)throw new Error("Cannot configure a schema with no rules");if(xr(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=uO(Y2(),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(){},a=n,l=o,u=i;if(typeof l=="function"&&(u=l,l={}),!this.rules||Object.keys(this.rules).length===0)return u&&u(null,a),Promise.resolve(a);function d(y){var S=[],C={};function w(M){if(Array.isArray(M)){var T;S=(T=S).concat.apply(T,Yt(M));}else S.push(M);}for(var $=0;$<y.length;$++)w(y[$]);S.length?(C=Z2(S),u(S,C)):u(null,a);}if(l.messages){var m=this.messages();m===X2&&(m=Y2()),uO(m,l.messages),l.messages=m;}else l.messages=this.messages();var p={},g=l.keys||Object.keys(this.rules);g.forEach(function(y){var S=r.rules[y],C=a[y];S.forEach(function(w){var $=w;typeof $.transform=="function"&&(a===n&&(a=Jn({},a)),C=a[y]=$.transform(C),C!=null&&($.type=$.type||(Array.isArray(C)?"array":xr(C)))),typeof $=="function"?$={validator:$}:$=Jn({},$),$.validator=r.getValidationMethod($),$.validator&&($.field=y,$.fullField=$.fullField||y,$.type=r.getType($),p[y]=p[y]||[],p[y].push({rule:$,value:C,source:a,field:y}));});});var b={};return iie(p,l,function(y,S){var C=y.rule,w=(C.type==="object"||C.type==="array")&&(xr(C.fields)==="object"||xr(C.defaultField)==="object");w=w&&(C.required||!C.required&&y.value),C.field=y.field;function $(N,P){return Jn(Jn({},P),{},{fullField:"".concat(C.fullField,".").concat(N),fullFields:C.fullFields?[].concat(Yt(C.fullFields),[N]):[N]})}function M(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],P=Array.isArray(N)?N:[N];!l.suppressWarning&&P.length&&e.warning("async-validator:",P),P.length&&C.message!==void 0&&C.message!==null&&(P=[].concat(C.message));var O=P.map(cO(C,a));if(l.first&&O.length)return b[C.field]=1,S(O);if(!w)S(O);else {if(C.required&&!y.value)return C.message!==void 0?O=[].concat(C.message).map(cO(C,a)):l.error&&(O=[l.error(C,bi(l.messages.required,C.field))]),S(O);var _={};C.defaultField&&Object.keys(y.value).map(function(U){_[U]=C.defaultField;}),_=Jn(Jn({},_),y.rule.fields);var L={};Object.keys(_).forEach(function(U){var q=_[U],V=Array.isArray(q)?q:[q];L[U]=V.map($.bind(null,U));});var j=new e(L);j.messages(l.messages),y.rule.options&&(y.rule.options.messages=l.messages,y.rule.options.error=l.error),j.validate(y.value,y.rule.options||l,function(U){var q=[];O&&O.length&&q.push.apply(q,Yt(O)),U&&U.length&&q.push.apply(q,Yt(U)),S(q.length?q:null);});}}var T;if(C.asyncValidator)T=C.asyncValidator(C,y.value,M,y.source,l);else if(C.validator){try{T=C.validator(C,y.value,M,y.source,l);}catch(N){var R,I;(R=(I=console).error)===null||R===void 0||R.call(I,N),l.suppressValidatorError||setTimeout(function(){throw N},0),M(N.message);}T===true?M():T===false?M(typeof C.message=="function"?C.message(C.fullField||C.field):C.message||"".concat(C.fullField||C.field," fails")):T instanceof Array?M(T):T instanceof Error&&M(T.message);}T&&T.then&&T.then(function(){return M()},function(N){return M(N)});},function(y){d(y);},a)}},{key:"getType",value:function(n){if(n.type===void 0&&n.pattern instanceof RegExp&&(n.type="pattern"),typeof n.validator!="function"&&n.type&&!Ih.hasOwnProperty(n.type))throw new Error(bi("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"?Ih.required:Ih[this.getType(n)]||void 0}}]),e})();St(Jp,"register",function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");Ih[t]=n;});St(Jp,"warning",tie);St(Jp,"messages",X2);St(Jp,"validators",Ih);const jo="'${name}' is not a valid ${type}",kk={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:jo,method:jo,array:jo,object:jo,number:jo,date:jo,boolean:jo,integer:jo,float:jo,regexp:jo,email:jo,tel:jo,url:jo,hex:jo},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}"}},dO=Jp;function Aie(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 fO="CODE_LOGIC_ERROR";async function J2(e,t,n,r,o){const i={...n};if(delete i.ruleIndex,dO.warning=()=>{},i.validator){const g=i.validator;i.validator=(...b)=>{try{return g(...b)}catch(y){return console.error(y),Promise.reject(fO)}};}let a=null;i&&i.type==="array"&&i.defaultField&&(a=i.defaultField,delete i.defaultField);const l=new dO({[e]:[i]}),u=Nd(kk,r.validateMessages);l.messages(u);let d=[];try{await Promise.resolve(l.validate({[e]:t},{...r}));}catch(g){g.errors&&(d=g.errors.map(({message:b},y)=>{const S=b===fO?u.default:b;return f.isValidElement(S)?f.cloneElement(S,{key:`error_${y}`}):S}));}if(!d.length&&a&&Array.isArray(t)&&t.length>0)return (await Promise.all(t.map((b,y)=>J2(`${e}.${y}`,b,a,r,o)))).reduce((b,y)=>[...b,...y],[]);const m={...n,name:e,enum:(n.enum||[]).join(", "),...o};return d.map(g=>typeof g=="string"?Aie(g,m):g)}function Nie(e,t,n,r,o,i){const a=e.join("."),l=n.map((d,m)=>{const p=d.validator,g={...d,ruleIndex:m};return p&&(g.validator=(b,y,S)=>{let C=false;const $=p(b,y,(...M)=>{Promise.resolve().then(()=>{wr(!C,"Your validator function has already return a promise. `callback` will be ignored."),C||S(...M);});});C=$&&typeof $.then=="function"&&typeof $.catch=="function",wr(C,"`callback` is deprecated. Please return a promise instead."),C&&$.then(()=>{S();}).catch(M=>{S(M||" ");});}),g}).sort(({warningOnly:d,ruleIndex:m},{warningOnly:p,ruleIndex:g})=>!!d==!!p?m-g:d?1:-1);let u;if(o===true)u=new Promise(async(d,m)=>{for(let p=0;p<l.length;p+=1){const g=l[p],b=await J2(a,t,g,r,i);if(b.length){m([{errors:b,rule:g}]);return}}d([]);});else {const d=l.map(m=>J2(a,t,m,r,i).then(p=>({errors:p,rule:m})));u=(o?Iie(d):Pie(d)).then(m=>Promise.reject(m));}return u.catch(d=>d),u}async function Pie(e){return Promise.all(e).then(t=>[].concat(...t))}async function Iie(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 nr(e){return K2(e)}function mO(e,t){let n={};return t.forEach(r=>{const o=ca(e,r);n=ki(n,r,o);}),n}function Wd(e,t,n=false){return e&&e.some(r=>H0(t,r,n))}function H0(e,t,n=false){return !e||!t||!n&&e.length!==t.length?false:t.every((r,o)=>e[o]===r)}function Oie(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 a=e[i],l=t[i];return typeof a=="function"&&typeof l=="function"?true:a===l})}function Die(e,...t){const n=t[0];return n&&n.target&&typeof n.target=="object"&&e in n.target?n.target[e]:n}function hO(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 eE(){return eE=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},eE.apply(this,arguments)}const Ec=[],Km=[];function Ux(e,t,n,r,o,i){return typeof e=="function"?e(t,n,"source"in i?{source:i.source}:{}):r!==o}class _ie extends f.Component{static contextType=lf;state={resetCount:0};cancelRegisterFunc=null;mounted=false;touched=false;dirty=false;validatePromise;prevValidating;errors=Ec;warnings=Km;constructor(t){if(super(t),t.fieldContext){const{getInternalHooks:n}=t.fieldContext,{initEntityValue:r}=n(Fc);r(this);}}componentDidMount(){const{shouldUpdate:t,fieldContext:n}=this.props;if(this.mounted=true,n){const{getInternalHooks:r}=n,{registerField:o}=r(Fc);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,nr(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};Dl(this.metaCache,r)||n(r),this.metaCache=r;}else this.metaCache=null;};onStoreChange=(t,n,r)=>{const{shouldUpdate:o,dependencies:i=[],onReset:a}=this.props,{store:l}=r,u=this.getNamePath(),d=this.getValue(t),m=this.getValue(l),p=n&&Wd(n,u);switch(r.type==="valueUpdate"&&r.source==="external"&&!Dl(d,m)&&(this.touched=true,this.dirty=true,this.validatePromise=null,this.errors=Ec,this.warnings=Km,this.triggerMetaEvent()),r.type){case "reset":if(!n||p){this.touched=false,this.dirty=false,this.validatePromise=void 0,this.errors=Ec,this.warnings=Km,this.triggerMetaEvent(),a?.(),this.refresh();return}break;case "remove":{if(o&&Ux(o,t,l,d,m,r)){this.reRender();return}break}case "setField":{const{data:g}=r;if(p){"touched"in g&&(this.touched=g.touched),"validating"in g&&!("originRCField"in g)&&(this.validatePromise=g.validating?Promise.resolve([]):null),"errors"in g&&(this.errors=g.errors||Ec),"warnings"in g&&(this.warnings=g.warnings||Km),this.dirty=true,this.triggerMetaEvent(),this.reRender();return}else if("value"in g&&Wd(n,u,true)){this.reRender();return}if(o&&!u.length&&Ux(o,t,l,d,m,r)){this.reRender();return}break}case "dependenciesUpdate":{if(i.map(nr).some(b=>Wd(r.relatedFields,b))){this.reRender();return}break}default:if(p||(!i.length||u.length||o)&&Ux(o,t,l,d,m,r)){this.reRender();return}break}o===true&&this.reRender();};validateRules=t=>{const n=this.getNamePath(),r=this.getValue(),{triggerName:o,validateOnly:i=false}=t||{},a=Promise.resolve().then(async()=>{if(!this.mounted)return [];const{validateFirst:l=false,messageVariables:u,validateDebounce:d}=this.props;let m=this.getRules();if(o&&(m=m.filter(g=>g).filter(g=>{const{validateTrigger:b}=g;return b?K2(b).includes(o):true})),d&&o&&(await new Promise(g=>{setTimeout(g,d);}),this.validatePromise!==a))return [];const p=Nie(n,r,m,t,l,u);return p.catch(g=>g).then((g=Ec)=>{if(this.validatePromise===a){this.validatePromise=null;const b=[],y=[];g.forEach?.(({rule:{warningOnly:S},errors:C=Ec})=>{S?y.push(...C):b.push(...C);}),this.errors=b,this.warnings=y,this.triggerMetaEvent(),this.reRender();}}),p});return i||(this.validatePromise=a,this.dirty=true,this.errors=Ec,this.warnings=Km,this.triggerMetaEvent(),this.reRender()),a};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(Fc);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=Qo(t);return n.length!==1||!f.isValidElement(n[0])?{child:n,isFunction:false}:{child:n[0],isFunction:false}};getValue=t=>{const{getFieldsValue:n}=this.props.fieldContext,r=this.getNamePath();return ca(t||n(true),r)};getControlled=(t={})=>{const{name:n,trigger:r="onChange",validateTrigger:o,getValueFromEvent:i,normalize:a,valuePropName:l="value",getValueProps:u,fieldContext:d}=this.props,m=o!==void 0?o:d.validateTrigger,p=this.getNamePath(),{getInternalHooks:g,getFieldsValue:b}=d,{dispatch:y}=g(Fc),S=this.getValue(),C=u||(R=>({[l]:R})),w=t[r],$=n!==void 0?C(S):{},M={...t,...$};return M[r]=(...R)=>{this.touched=true,this.dirty=true,this.triggerMetaEvent();let I;i?I=i(...R):I=Die(l,...R),a&&(I=a(I,S,b(true))),I!==S&&y({type:"updateValue",namePath:p,value:I}),w&&w(...R);},K2(m||[]).forEach(R=>{const I=M[R];M[R]=(...N)=>{I&&I(...N);const{rules:P}=this.props;P&&P.length&&y({type:"validateField",namePath:p,triggerName:R});};}),M};render(){const{resetCount:t}=this.state,{children:n}=this.props,{child:r,isFunction:o}=this.getOnlyChild(n);let i;return o?i=r:f.isValidElement(r)?i=f.cloneElement(r,this.getControlled(r.props)):(wr(!r,"`children` of Field is not validate ReactElement."),i=r),f.createElement(f.Fragment,{key:t},i)}}function Fk({name:e,...t}){const n=f.useContext(lf),r=f.useContext(F0),o=e!==void 0?nr(e):void 0,i=t.isListField??!!r;let a="keep";return i||(a=`_${(o||[]).join("_")}`),f.createElement(_ie,eE({key:a,name:o,isListField:i},t,{fieldContext:n}))}function Lie({name:e,initialValue:t,children:n,rules:r,validateTrigger:o,isListField:i}){const a=f.useContext(lf),l=f.useContext(F0),d=f.useRef({keys:[],id:0}).current,m=f.useMemo(()=>[...nr(a.prefixName)||[],...nr(e)],[a.prefixName,e]),p=f.useMemo(()=>({...a,prefixName:m}),[a,m]),g=f.useMemo(()=>({getKey:y=>{const S=m.length,C=y[S];return [d.keys[C],y.slice(S+1)]}}),[d,m]);if(typeof n!="function")return wr(false,"Form.List only accepts function as children."),null;const b=(y,S,{source:C})=>C==="internal"?false:y!==S;return f.createElement(F0.Provider,{value:g},f.createElement(lf.Provider,{value:p},f.createElement(Fk,{name:[],shouldUpdate:b,rules:r,validateTrigger:o,initialValue:t,isList:true,isListField:i??!!l},({value:y=[],onChange:S},C)=>{const{getFieldValue:w}=a,$=()=>w(m||[])||[],M={add:(R,I)=>{const N=$();I>=0&&I<=N.length?(d.keys=[...d.keys.slice(0,I),d.id,...d.keys.slice(I)],S([...N.slice(0,I),R,...N.slice(I)])):(d.keys=[...d.keys,d.id],S([...N,R])),d.id+=1;},remove:R=>{const I=$(),N=new Set(Array.isArray(R)?R:[R]);N.size<=0||(d.keys=d.keys.filter((P,O)=>!N.has(O)),S(I.filter((P,O)=>!N.has(O))));},move(R,I){if(R===I)return;const N=$();R<0||R>=N.length||I<0||I>=N.length||(d.keys=hO(d.keys,R,I),S(hO(N,R,I)));}};let T=y||[];return Array.isArray(T)||(T=[]),n(T.map((R,I)=>{let N=d.keys[I];return N===void 0&&(d.keys[I]=d.id,N=d.keys[I],d.id+=1),{name:I,key:N,isListField:true}}),M,C)})))}function zie(e){let t=false,n=e.length;const r=[];return e.length?new Promise((o,i)=>{e.forEach((a,l)=>{a.catch(u=>(t=true,u)).then(u=>{n-=1,r[l]=u,!(n>0)&&(t&&i(r),o(r));});});}):Promise.resolve([])}const tE="__@field_split__";function sb(e){return e.map(t=>`${typeof t}:${t}`).join(tE)}class vd{kvs=new Map;set(t,n){this.kvs.set(sb(t),n);}get(t){return this.kvs.get(sb(t))}getAsPrefix(t){const n=sb(t),r=n+tE,o=[],i=this.kvs.get(n);return i!==void 0&&o.push(i),this.kvs.forEach((a,l)=>{l.startsWith(r)&&o.push(a);}),o}update(t,n){const r=this.get(t),o=n(r);o?this.set(t,o):this.delete(t);}delete(t){this.kvs.delete(sb(t));}map(t){return [...this.kvs.entries()].map(([n,r])=>{const o=n.split(tE);return t({key:o.map(i=>{const[,a,l]=i.match(/^([^:]*):(.*)$/);return a==="number"?Number(l):l}),value:r})})}toJSON(){const t={};return this.map(({key:n,value:r})=>(t[n.join(".")]=r,null)),t}}const Bie=e=>{const t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null);};class kie{namePathList=[];taskId=0;watcherList=new Set;form;constructor(t){this.form=t;}register(t){return this.watcherList.add(t),()=>{this.watcherList.delete(t);}}notify(t){t.forEach(n=>{this.namePathList.every(r=>!H0(r,n))&&this.namePathList.push(n);}),this.doBatch();}doBatch(){this.taskId+=1;const t=this.taskId;Bie(()=>{if(t===this.taskId&&this.watcherList.size){const n=this.form.getForm(),r=n.getFieldsValue(),o=n.getFieldsValue(true);this.watcherList.forEach(i=>{i(r,o,this.namePathList);}),this.namePathList=[];}});}}class Fie{formHooked=false;forceRootUpdate;subscribable=true;store={};fieldEntities=[];initialValues={};callbacks={};validateMessages=null;preserve=null;lastValidatePromise=null;watcherCenter=new kie(this);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===Fc?(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}):(wr(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=Nd(t,this.store);this.prevWithoutPreserves?.map(({key:o})=>{r=ki(r,o,ca(t,o));}),this.prevWithoutPreserves=null,this.updateStore(r);}};destroyForm=t=>{if(t)this.updateStore({});else {const n=new vd;this.getFieldEntities(true).forEach(r=>{this.isMergedPreserve(r.isPreserve())||n.set(r.getNamePath(),true);}),this.prevWithoutPreserves=n;}};getInitialValue=t=>{const n=ca(this.initialValues,t);return t.length?Nd(n):n};setCallbacks=t=>{this.callbacks=t;};setValidateMessages=t=>{this.validateMessages=t;};setPreserve=t=>{this.preserve=t;};registerWatch=t=>this.watcherCenter.register(t);notifyWatch=(t=[])=>{this.watcherCenter.notify(t);};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 vd;return this.getFieldEntities(t).forEach(r=>{const o=r.getNamePath();n.set(o,r);}),n};getFieldEntitiesForNamePathList=(t,n=false)=>{if(!t)return this.getFieldEntities(true);const r=this.getFieldsMap(true);return n?t.flatMap(o=>{const i=nr(o),a=r.getAsPrefix(i);return a.length?a:[{INVALIDATE_NAME_PATH:i}]}):t.map(o=>{const i=nr(o);return r.get(i)||{INVALIDATE_NAME_PATH:nr(o)}})};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,true),a=[],l=[];i.forEach(d=>{const m=d.INVALIDATE_NAME_PATH||d.getNamePath();if(d.isList?.()){l.push(m);return}if(!o)a.push(m);else {const p="getMeta"in d?d.getMeta():null;o(p)&&a.push(m);}});let u=mO(this.store,a.map(nr));return l.forEach(d=>{ca(u,d)||(u=ki(u,d,[]));}),u};getFieldValue=t=>{this.warningUnhooked();const n=nr(t);return ca(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:nr(t[o]),errors:[],warnings:[]}));getFieldError=t=>{this.warningUnhooked();const n=nr(t);return this.getFieldsError([n])[0].errors};getFieldWarning=t=>{this.warningUnhooked();const n=nr(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(nr),i=false):(o=null,i=n):(o=n.map(nr),i=r);const a=this.getFieldEntities(true),l=p=>p.isFieldTouched();if(!o)return i?a.every(p=>l(p)||p.isList()):a.some(l);const u=new vd;o.forEach(p=>{u.set(p,[]);}),a.forEach(p=>{const g=p.getNamePath();o.forEach(b=>{b.every((y,S)=>g[S]===y)&&u.update(b,y=>[...y,p]);});});const d=p=>p.some(l),m=u.map(({value:p})=>p);return i?m.every(d):m.some(d)};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(nr);return n.some(o=>{const i=o.getNamePath();return Wd(r,i)&&o.isFieldValidating()})};isFieldValidating=t=>(this.warningUnhooked(),this.isFieldsValidating([t]));resetWithFieldInitialValue=(t={})=>{const n=new vd,r=this.getFieldEntities(true);r.forEach(a=>{const{initialValue:l}=a.props,u=a.getNamePath();if(l!==void 0){const d=n.get(u)||new Set;d.add({entity:a,value:l}),n.set(u,d);}});const o=a=>{a.forEach(l=>{const{initialValue:u}=l.props;if(u!==void 0){const d=l.getNamePath();if(this.getInitialValue(d)!==void 0)wr(false,`Form already set 'initialValues' with path '${d.join(".")}'. Field can not overwrite it.`);else {const p=n.get(d);if(p&&p.size>1)wr(false,`Multiple Field with path '${d.join(".")}' set 'initialValue'. Can not decide which one to pick.`);else if(p){const g=this.getFieldValue(d);!l.isListField()&&(!t.skipExist||g===void 0)&&this.updateStore(ki(this.store,d,[...p][0].value));}}}});};let i;t.entities?i=t.entities:t.namePathList?(i=[],t.namePathList.forEach(a=>{const l=n.get(a);l&&i.push(...[...l].map(u=>u.entity));})):i=r,o(i);};resetFields=t=>{this.warningUnhooked();const n=this.store;if(!t){this.updateStore(Nd(this.initialValues)),this.resetWithFieldInitialValue(),this.notifyObservers(n,null,{type:"reset"}),this.notifyWatch();return}const r=t.map(nr);r.forEach(o=>{const i=this.getInitialValue(o);this.updateStore(ki(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,...a}=o,l=nr(i);r.push(l),"value"in a&&this.updateStore(ki(this.store,l,a.value)),this.notifyObservers(n,[l],{type:"setField",data:o});}),this.notifyWatch(r);};getFields=()=>this.getFieldEntities(true).map(r=>{const o=r.getNamePath(),a={...r.getMeta(),name:o,value:this.getFieldValue(o)};return Object.defineProperty(a,"originRCField",{value:true}),a});initEntityValue=t=>{const{initialValue:n}=t.props;if(n!==void 0){const r=t.getNamePath();ca(this.store,r)===void 0&&this.updateStore(ki(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.notifyWatch([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(a=>a!==t),!this.isMergedPreserve(o)&&(!r||i.length>1)){const a=r?void 0:this.getInitialValue(n);if(n.length&&this.getFieldValue(n)!==a&&this.fieldEntities.every(l=>!H0(l.getNamePath(),n))){const l=this.store;this.updateStore(ki(l,n,a,true)),this.notifyObservers(l,[n],{type:"remove"}),this.triggerDependenciesUpdate(l,n);}}this.notifyWatch([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=nr(t),o=this.store;this.updateStore(ki(this.store,r,n)),this.notifyObservers(o,[r],{type:"valueUpdate",source:"internal"}),this.notifyWatch([r]);const i=this.triggerDependenciesUpdate(o,r),{onValuesChange:a}=this.callbacks;if(a){const l=this.getFieldsMap(true).get(r),u=mO(this.store,[r]),d=this.getFieldsValue(),m=Bz([d,u],{prepareArray:p=>l?.isList()?[]:[...p||[]]});a(u,m);}this.triggerOnFieldsChange([r,...i]);};setFieldsValue=t=>{this.warningUnhooked();const n=this.store;if(t){const r=Nd(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 vd;this.getFieldEntities().forEach(a=>{const{dependencies:l}=a.props;(l||[]).forEach(u=>{const d=nr(u);o.update(d,(m=new Set)=>(m.add(a),m));});});const i=a=>{(o.get(a)||new Set).forEach(u=>{if(!n.has(u)){n.add(u);const d=u.getNamePath();u.isFieldDirty()&&d.length&&(r.push(d),i(d));}});};return i(t),r};triggerOnFieldsChange=(t,n)=>{const{onFieldsChange:r}=this.callbacks;if(r){const o=this.getFields();if(n){const a=new vd;n.forEach(({name:l,errors:u})=>{a.set(l,u);}),o.forEach(l=>{l.errors=a.get(l.name)||l.errors;});}const i=o.filter(({name:a})=>Wd(t,a));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,a=i?r.map(nr):[],l=[...a],u=[],d=String(Date.now()),m=new Set,{recursive:p,dirty:g}=o||{};this.getFieldEntities(true).forEach(C=>{const w=C.getNamePath();if(i||((!C.isList()||!a.some($=>H0($,w,true)))&&l.push(w),a.push(w)),!(!C.props.rules||!C.props.rules.length)&&!(g&&!C.isFieldDirty())&&(m.add(w.join(d)),!i||Wd(a,w,p))){const $=C.validateRules({validateMessages:{...kk,...this.validateMessages},...o});u.push($.then(()=>({name:w,errors:[],warnings:[]})).catch(M=>{const T=[],R=[];return M.forEach?.(({rule:{warningOnly:I},errors:N})=>{I?R.push(...N):T.push(...N);}),T.length?Promise.reject({name:w,errors:T,warnings:R}):{name:w,errors:T,warnings:R}}));}});const b=zie(u);this.lastValidatePromise=b,b.catch(C=>C).then(C=>{const w=C.map(({name:$})=>$);this.notifyObservers(this.store,w,{type:"validateFinish"}),this.triggerOnFieldsChange(w,C);});const y=b.then(()=>this.lastValidatePromise===b?Promise.resolve(this.getFieldsValue(l)):Promise.reject([])).catch(C=>{const w=C.filter(M=>M&&M.errors.length),$=w[0]?.errors?.[0];return Promise.reject({message:$,values:this.getFieldsValue(a),errorFields:w,outOfDate:this.lastValidatePromise!==b})});y.catch(C=>C);const S=a.filter(C=>m.has(C.join(d)));return this.triggerOnFieldsChange(S),y};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 Hk(e){const t=f.useRef(null),[,n]=f.useState({});if(!t.current)if(e)t.current=e;else {const r=()=>{n({});},o=new Fie(r);t.current=o.getForm();}return [t.current]}const nE=f.createContext({triggerFormChange:()=>{},triggerFormFinish:()=>{},registerForm:()=>{},unregisterForm:()=>{}}),Hie=({validateMessages:e,onFormChange:t,onFormFinish:n,children:r})=>{const o=f.useContext(nE),i=f.useRef({});return f.createElement(nE.Provider,{value:{...o,validateMessages:{...o.validateMessages,...e},triggerFormChange:(a,l)=>{t&&t(a,{changedFields:l,forms:i.current}),o.triggerFormChange(a,l);},triggerFormFinish:(a,l)=>{n&&n(a,{values:l,forms:i.current}),o.triggerFormFinish(a,l);},registerForm:(a,l)=>{a&&(i.current={...i.current,[a]:l}),o.registerForm(a,l);},unregisterForm:a=>{const l={...i.current};delete l[a],i.current=l,o.unregisterForm(a);}}},r)};function rE(){return rE=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},rE.apply(this,arguments)}const Vie=({name:e,initialValues:t,fields:n,form:r,preserve:o,children:i,component:a="form",validateMessages:l,validateTrigger:u="onChange",onValuesChange:d,onFieldsChange:m,onFinish:p,onFinishFailed:g,clearOnDestroy:b,...y},S)=>{const C=f.useRef(null),w=f.useContext(nE),[$]=Hk(r),{useSubscribe:M,setInitialValues:T,setCallbacks:R,setValidateMessages:I,setPreserve:N,destroyForm:P}=$.getInternalHooks(Fc);f.useImperativeHandle(S,()=>({...$,nativeElement:C.current})),f.useEffect(()=>(w.registerForm(e,$),()=>{w.unregisterForm(e);}),[w,$,e]),I({...w.validateMessages,...l}),R({onValuesChange:d,onFieldsChange:(V,...B)=>{w.triggerFormChange(e,V),m&&m(V,...B);},onFinish:V=>{w.triggerFormFinish(e,V),p&&p(V);},onFinishFailed:g}),N(o);const O=f.useRef(null);T(t,!O.current),O.current||(O.current=true),f.useEffect(()=>()=>P(b),[]);let _;const L=typeof i=="function";if(L){const V=$.getFieldsValue(true);_=i(V,$);}else _=i;M(!L);const j=f.useRef(null);f.useEffect(()=>{Oie(j.current||[],n||[])||$.setFields(n||[]),j.current=n;},[n,$]);const U=f.useMemo(()=>({...$,validateTrigger:u}),[$,u]),q=f.createElement(F0.Provider,{value:null},f.createElement(lf.Provider,{value:U},_));return a===false?q:f.createElement(a,rE({},y,{ref:C,onSubmit:V=>{V.preventDefault(),V.stopPropagation(),$.submit();},onReset:V=>{V.preventDefault(),$.resetFields(),y.onReset?.(V);}}),q)};function qx(e){try{return JSON.stringify(e)}catch{return Math.random()}}function jie(...e){const[t,n={}]=e,r=Qoe(n)?{form:n}:n,o=r.form,[i,a]=f.useState(()=>typeof t=="function"?t({}):void 0),l=f.useMemo(()=>qx(i),[i]),u=f.useRef(l);u.current=l;const d=f.useContext(lf),m=o||d,p=m&&m._init,{getFieldsValue:g,getInternalHooks:b}=m,{registerWatch:y}=b(Fc),S=Et((w,$)=>{const M=r.preserve?$??g(true):w??g(),T=typeof t=="function"?t(M):ca(M,nr(t));qx(i)!==qx(T)&&a(T);}),C=typeof t=="function"?t:JSON.stringify(t);return f.useEffect(()=>{p&&S();},[p,C]),f.useEffect(()=>p?y(($,M)=>{S($,M);}):void 0,[p]),i}const Uie=f.forwardRef(Vie),eg=Uie;eg.FormProvider=Hie;eg.Field=Fk;eg.List=Lie;eg.useForm=Hk;eg.useWatch=jie;const yo=f.createContext({}),qie=({children:e,status:t,override:n})=>{const r=f.useContext(yo),o=f.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.createElement(yo.Provider,{value:o},e)},Wie=f.createContext(void 0),kl=e=>{const{space:t,form:n,children:r}=e;if(!Qr(r))return null;let o=r;return n&&(o=G.createElement(qie,{override:true,status:true},o)),t&&(o=G.createElement(dre,null,o)),o},Gie=()=>wi()&&window.document.documentElement;function Kie(e,t,n){return f.useMemo(()=>({...{trap:t??true,focusTriggerAfterClose:n??true},...e}),[e,t,n])}const o1=e=>{const{prefixCls:t,className:n,style:r,size:o,shape:i}=e,a=X({[`${t}-lg`]:o==="large",[`${t}-sm`]:o==="small"}),l=X({[`${t}-circle`]:i==="circle",[`${t}-square`]:i==="square",[`${t}-round`]:i==="round"}),u=f.useMemo(()=>typeof o=="number"?{width:o,height:o,lineHeight:`${o}px`}:{},[o]);return f.createElement("span",{className:X(t,a,l,n),style:{...u,...r}})},Yie=new zt("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),bR=e=>({height:e,lineHeight:oe(e)}),Il=e=>({width:e,...bR(e)}),Xie=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:Yie,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),Wx=(e,t)=>({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal(),...bR(e)}),Qie=e=>{const{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:r,controlHeightLG:o,controlHeightSM:i}=e;return {[t]:{display:"inline-block",verticalAlign:"top",background:n,...Il(r)},[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:{...Il(o)},[`${t}${t}-sm`]:{...Il(i)}}},Zie=e=>{const{controlHeight:t,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:o,controlHeightSM:i,gradientFromColor:a,calc:l}=e;return {[r]:{display:"inline-block",verticalAlign:"top",background:a,borderRadius:n,...Wx(t,l)},[`${r}-lg`]:{...Wx(o,l)},[`${r}-sm`]:{...Wx(i,l)}}},Vk=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,...Il(o(r).mul(2).equal())}},Jie=e=>({[e.skeletonNodeCls]:{...Vk(e)}}),eae=e=>{const{skeletonImageCls:t,imageSizeBase:n,calc:r}=e;return {[t]:{...Vk(e),[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:{...Il(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%"}}},Gx=(e,t,n)=>{const{skeletonButtonCls:r}=e;return {[`${n}${r}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${n}${r}-round`]:{borderRadius:t}}},Kx=(e,t)=>({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal(),...bR(e)}),tae=e=>{const{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:r,controlHeightLG:o,controlHeightSM:i,gradientFromColor:a,calc:l}=e;return {[n]:{display:"inline-block",verticalAlign:"top",background:a,borderRadius:t,width:l(r).mul(2).equal(),minWidth:l(r).mul(2).equal(),...Kx(r,l)},...Gx(e,r,n),[`${n}-lg`]:{...Kx(o,l)},...Gx(e,o,`${n}-lg`),[`${n}-sm`]:{...Kx(i,l)},...Gx(e,i,`${n}-sm`)}},nae=e=>{const{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:o,skeletonButtonCls:i,skeletonInputCls:a,skeletonNodeCls:l,skeletonImageCls:u,controlHeight:d,controlHeightLG:m,controlHeightSM:p,gradientFromColor:g,padding:b,marginSM:y,borderRadius:S,titleHeight:C,blockRadius:w,paragraphLiHeight:$,controlHeightXS:M,paragraphMarginTop:T}=e;return {[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:b,verticalAlign:"top",[n]:{display:"inline-block",verticalAlign:"top",background:g,...Il(d)},[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:{...Il(m)},[`${n}-sm`]:{...Il(p)}},[`${t}-section`]:{display:"table-cell",width:"100%",verticalAlign:"top",[r]:{width:"100%",height:C,background:g,borderRadius:w,[`+ ${o}`]:{marginBlockStart:p}},[o]:{padding:0,"> li":{width:"100%",height:$,listStyle:"none",background:g,borderRadius:w,"+ li":{marginBlockStart:M}}},[`${o}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-section`]:{[`${r}, ${o} > li`]:{borderRadius:S}}},[`${t}-with-avatar ${t}-section`]:{[r]:{marginBlockStart:y,[`+ ${o}`]:{marginBlockStart:T}}},[`${t}${t}-element`]:{display:"inline-block",width:"auto",...tae(e),...Qie(e),...Zie(e),...Jie(e),...eae(e)},[`${t}${t}-block`]:{width:"100%",[i]:{width:"100%"},[a]:{width:"100%"}},[`${t}${t}-active`]:{[`
${r},
${o} > li,
${n},
${i},
${a},
${l},
${u}
`]:{...Xie(e)}}}},rae=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}},tg=qt("Skeleton",e=>{const{componentCls:t,calc:n}=e,r=Ft(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 nae(r)},rae,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),oae=e=>{const{prefixCls:t,className:n,classNames:r,rootClassName:o,active:i,style:a,styles:l,shape:u="circle",size:d="default",...m}=e,{getPrefixCls:p}=f.useContext(Ct),g=p("skeleton",t),[b,y]=tg(g),S=X(g,`${g}-element`,{[`${g}-active`]:i},r?.root,n,o,b,y);return f.createElement("div",{className:S,style:l?.root},f.createElement(o1,{prefixCls:`${g}-avatar`,className:r?.content,style:{...l?.content,...a},shape:u,size:d,...m}))},iae=e=>{const{prefixCls:t,className:n,rootClassName:r,classNames:o,active:i,style:a,styles:l,block:u=false,size:d="default",...m}=e,{getPrefixCls:p}=f.useContext(Ct),g=p("skeleton",t),[b,y]=tg(g),S=X(g,`${g}-element`,{[`${g}-active`]:i,[`${g}-block`]:u},o?.root,n,r,b,y);return f.createElement("div",{className:S,style:l?.root},f.createElement(o1,{prefixCls:`${g}-button`,className:o?.content,style:{...l?.content,...a},size:d,...m}))},jk=e=>{const{prefixCls:t,className:n,classNames:r,rootClassName:o,internalClassName:i,style:a,styles:l,active:u,children:d}=e,{getPrefixCls:m}=f.useContext(Ct),p=m("skeleton",t),[g,b]=tg(p),y=X(p,`${p}-element`,{[`${p}-active`]:u},g,r?.root,n,o,b);return f.createElement("div",{className:y,style:l?.root},f.createElement("div",{className:X(r?.content,i||`${p}-node`),style:{...l?.content,...a}},d))},aae=e=>{const{getPrefixCls:t}=f.useContext(Ct),n=t("skeleton",e.prefixCls);return f.createElement(jk,{...e,internalClassName:`${n}-image`},f.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${n}-image-svg`},f.createElement("title",null,"Image placeholder"),f.createElement("path",{d:"M365.7 329.1q0 45.8-32 77.7t-77.7 32-77.7-32-32-77.7 32-77.6 77.7-32 77.7 32 32 77.6M951 548.6v256H146.3V694.9L329 512l91.5 91.4L713 311zm54.8-402.3H91.4q-7.4 0-12.8 5.4T73 164.6v694.8q0 7.5 5.5 12.9t12.8 5.4h914.3q7.5 0 12.9-5.4t5.4-12.9V164.6q0-7.5-5.4-12.9t-12.9-5.4m91.4 18.3v694.8q0 37.8-26.8 64.6t-64.6 26.9H91.4q-37.7 0-64.6-26.9T0 859.4V164.6q0-37.8 26.8-64.6T91.4 73h914.3q37.8 0 64.6 26.9t26.8 64.6",className:`${n}-image-path`})))},sae=e=>{const{prefixCls:t,className:n,classNames:r,rootClassName:o,active:i,block:a,style:l,styles:u,size:d="default",...m}=e,{getPrefixCls:p}=f.useContext(Ct),g=p("skeleton",t),[b,y]=tg(g),S=X(g,`${g}-element`,{[`${g}-active`]:i,[`${g}-block`]:a},r?.root,n,o,b,y);return f.createElement("div",{className:S,style:u?.root},f.createElement(o1,{prefixCls:`${g}-input`,className:r?.content,style:{...u?.content,...l},size:d,...m}))},lae=(e,t)=>{const{width:n,rows:r=2}=t;if(Array.isArray(n))return n[e];if(r-1===e)return n},cae=e=>{const{prefixCls:t,className:n,style:r,rows:o=0}=e,i=Array.from({length:o}).map((a,l)=>f.createElement("li",{key:l,style:{width:lae(l,e)}}));return f.createElement("ul",{className:X(t,n),style:r},i)},uae=({prefixCls:e,className:t,width:n,style:r})=>f.createElement("h3",{className:X(e,t),style:{width:n,...r}});function Yx(e){return e&&typeof e=="object"?e:{}}function dae(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function fae(e,t){return !e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}function mae(e,t){const n={};return (!e||!t)&&(n.width="61%"),!e&&t?n.rows=3:n.rows=2,n}const Pf=e=>{const{prefixCls:t,loading:n,className:r,rootClassName:o,classNames:i,style:a,styles:l,children:u,avatar:d=false,title:m=true,paragraph:p=true,active:g,round:b}=e,{getPrefixCls:y,direction:S,className:C,style:w,classNames:$,styles:M}=Gt("skeleton"),T=y("skeleton",t),[R,I]=tg(T),N={...e,avatar:d,title:m,paragraph:p},[P,O]=Xt([$,i],[M,l],{props:N});if(n||!("loading"in e)){const _=!!d,L=!!m,j=!!p;let U;if(_){const B={className:P.avatar,prefixCls:`${T}-avatar`,...dae(L,j),...Yx(d),style:O.avatar};U=f.createElement("div",{className:X(P.header,`${T}-header`),style:O.header},f.createElement(o1,{...B}));}let q;if(L||j){let B;if(L){const W={className:P.title,prefixCls:`${T}-title`,...fae(_,j),...Yx(m),style:O.title};B=f.createElement(uae,{...W});}let F;if(j){const W={className:P.paragraph,prefixCls:`${T}-paragraph`,...mae(_,L),...Yx(p),style:O.paragraph};F=f.createElement(cae,{...W});}q=f.createElement("div",{className:X(P.section,`${T}-section`),style:O.section},B,F);}const V=X(T,{[`${T}-with-avatar`]:_,[`${T}-active`]:g,[`${T}-rtl`]:S==="rtl",[`${T}-round`]:b},P.root,C,r,o,R,I);return f.createElement("div",{className:V,style:{...O.root,...w,...a}},U,q)}return u??null};Pf.Button=iae;Pf.Avatar=oae;Pf.Input=sae;Pf.Image=aae;Pf.Node=jk;function pO(){}const hae=f.createContext({add:pO,remove:pO});function pae(e){const t=f.useContext(hae),n=f.useRef(null);return Et(o=>{if(o){const i=e?o.querySelector(e):o;i&&(t.add(i),n.current=i);}else t.remove(n.current);})}const gO=()=>{const{cancelButtonProps:e,cancelTextLocale:t,onCancel:n}=f.useContext(Zp);return G.createElement(ut,{onClick:n,...e},t)},vO=()=>{const{confirmLoading:e,okButtonProps:t,okType:n,okTextLocale:r,onOk:o}=f.useContext(Zp);return G.createElement(ut,{...oR(n),loading:e,onClick:o,...t},r)};function Uk(e,t){return G.createElement("span",{className:`${e}-close-x`},t||G.createElement(Ds,{className:`${e}-close-icon`}))}const qk=e=>{const{okText:t,okType:n="primary",cancelText:r,confirmLoading:o,onOk:i,onCancel:a,okButtonProps:l,cancelButtonProps:u,footer:d}=e,[m]=Oo("Modal",FB()),p=t||m?.okText,g=r||m?.cancelText,b=G.useMemo(()=>({confirmLoading:o,okButtonProps:l,cancelButtonProps:u,okTextLocale:p,cancelTextLocale:g,okType:n,onOk:i,onCancel:a}),[o,l,u,p,g,n,i,a]);let y;return typeof d=="function"||typeof d>"u"?(y=G.createElement(G.Fragment,null,G.createElement(gO,null),G.createElement(vO,null)),typeof d=="function"&&(y=d(y,{OkBtn:vO,CancelBtn:gO})),y=G.createElement(Dk,{value:b},y)):y=d,G.createElement(ak,{disabled:false},y)},gae=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"}}}},vae=e=>{const{componentCls:t}=e;return {[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},bae=(e,t)=>{const{componentCls:n,gridColumns:r,antCls:o}=e,[i,a]=ar(o,"grid"),[,l]=ar(o,"col"),u={};for(let d=r;d>=0;d--)d===0?(u[`${n}${t}-${d}`]={display:"none"},u[`${n}-push-${d}`]={insetInlineStart:"auto"},u[`${n}-pull-${d}`]={insetInlineEnd:"auto"},u[`${n}${t}-push-${d}`]={insetInlineStart:"auto"},u[`${n}${t}-pull-${d}`]={insetInlineEnd:"auto"},u[`${n}${t}-offset-${d}`]={marginInlineStart:0},u[`${n}${t}-order-${d}`]={order:0}):(u[`${n}${t}-${d}`]=[{[i("display")]:"block",display:"block"},{display:a("display"),flex:`0 0 ${d/r*100}%`,maxWidth:`${d/r*100}%`}],u[`${n}${t}-push-${d}`]={insetInlineStart:`${d/r*100}%`},u[`${n}${t}-pull-${d}`]={insetInlineEnd:`${d/r*100}%`},u[`${n}${t}-offset-${d}`]={marginInlineStart:`${d/r*100}%`},u[`${n}${t}-order-${d}`]={order:d});return u[`${n}${t}-flex`]={flex:l(`${t.replace(/-/,"")}-flex`)},u},oE=(e,t)=>bae(e,t),yae=(e,t,n)=>({[`@media (min-width: ${oe(t)})`]:{...oE(e,n)}}),Sae=()=>({}),Cae=()=>({});qt("Grid",gae,Sae);const Wk=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin});qt("Grid",e=>{const t=Ft(e,{gridColumns:24}),n=Wk(t);return delete n.xs,[vae(t),oE(t,""),oE(t,"-xs"),Object.keys(n).map(r=>yae(t,n[r],`-${r}`)).reduce((r,o)=>({...r,...o}),{})]},Cae);function bO(e){return {position:e,inset:0}}const xae=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`]:{...bO("fixed"),zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,pointerEvents:"none",[`&${t}-mask-blur`]:{backdropFilter:"blur(4px)"},[`${t}-hidden`]:{display:"none"}},[`${t}-wrap`]:{...bO("fixed"),zIndex:e.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"}}},{[`${t}-root`]:sR(e)}]},wae=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:`${oe(e.marginXS)} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:{...un(e),pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${oe(e.calc(e.margin).mul(2).equal())})`,margin:"0 auto","&:focus-visible":{borderRadius:e.borderRadiusLG,...ba(e)},[`${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:oe(e.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:e.modalCloseIconHoverColor,backgroundColor:e.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:e.colorBgTextActive},...$i(e)},[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${oe(e.borderRadiusLG)} ${oe(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:`${oe(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"}}}]},$ae=e=>{const{componentCls:t}=e;return {[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl",[`${t}-confirm-body`]:{direction:"rtl"}}}}},Eae=e=>{const{componentCls:t}=e,n=Wk(e),r={...n};delete r.xs;const o=`--${t.replace(".","")}-`,i=Object.keys(r).map(a=>({[`@media (min-width: ${oe(r[a])})`]:{width:`var(${o}${a}-width)`}}));return {[`${t}-root`]:{[t]:[].concat(Yt(Object.keys(n).map((a,l)=>{const u=Object.keys(n)[l-1];return u?{[`${o}${a}-width`]:`var(${o}${u}-width)`}:null})),[{width:`var(${o}xs-width)`}],Yt(i))}}},Gk=e=>{const t=e.padding,n=e.fontSizeHeading5,r=e.lineHeightHeading5;return Ft(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()})},Kk=e=>({footerBg:"transparent",headerBg:"transparent",titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${oe(e.paddingMD)} ${oe(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${oe(e.padding)} ${oe(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${oe(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${oe(e.paddingXS)} ${oe(e.padding)}`:0,footerBorderTop:e.wireframe?`${oe(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",footerBorderRadius:e.wireframe?`0 0 ${oe(e.borderRadiusLG)} ${oe(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${oe(e.padding*2)} ${oe(e.padding*2)} ${oe(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM,mask:true}),Yk=qt("Modal",e=>{const t=Gk(e);return [wae(t),$ae(t),xae(t),Qp(t,"zoom"),Eae(t)]},Kk,{unitless:{titleLineHeight:true}});let iE;const Mae=e=>{iE={x:e.pageX,y:e.pageY},setTimeout(()=>{iE=null;},100);};Gie()&&document.documentElement.addEventListener("click",Mae,true);const Xk=e=>{const{prefixCls:t,className:n,rootClassName:r,open:o,wrapClassName:i,centered:a,getContainer:l,style:u,width:d=520,footer:m,classNames:p,styles:g,children:b,loading:y,confirmLoading:S,zIndex:C,mousePosition:w,onOk:$,onCancel:M,okButtonProps:T,cancelButtonProps:R,destroyOnHidden:I,destroyOnClose:N,panelRef:P=null,closable:O,mask:_,modalRender:L,focusTriggerAfterClose:j,focusable:U,...q}=e,{getPopupContainer:V,getPrefixCls:B,direction:F,className:W,style:K,classNames:Q,styles:D,centered:z,cancelButtonProps:Y,okButtonProps:ee,mask:J}=Gt("modal"),{modal:te}=f.useContext(Ct),[ne,se]=f.useMemo(()=>typeof O=="boolean"?[void 0,void 0]:[O?.afterClose,O?.onClose],[O]),ae=B("modal",t),re=B(),[de,ge]=Vte(_,J,ae),ie=Kie(U,de,j),Ee=dt=>{S||(M?.(dt),se?.());},le=dt=>{$?.(dt),se?.();},ue=Yn(ae),[Se,ye]=Yk(ae,ue),Be=X(i,{[`${ae}-centered`]:a??z,[`${ae}-wrap-rtl`]:F==="rtl"}),je=m!==null&&!y?f.createElement(qk,{...e,okButtonProps:{...ee,...T},onOk:le,cancelButtonProps:{...Y,...R},onCancel:Ee}):null,[Ne,fe,be,Re]=XM(Ll(e),Ll(te),{closable:true,closeIcon:f.createElement(Ds,{className:`${ae}-close-icon`}),closeIconRender:dt=>Uk(ae,dt)}),qe=Ne?{disabled:be,closeIcon:fe,afterClose:ne,...Re}:false,Qe=L?dt=>f.createElement("div",{className:`${ae}-render`},L(dt)):void 0,We=`.${ae}-${L?"render":"container"}`,tt=pae(We),rt=Nr(P,tt),[Ze,Oe]=xu("Modal",C),Ye={...e,width:d,panelRef:P,focusTriggerAfterClose:ie.focusTriggerAfterClose,focusable:ie,mask:de,zIndex:Ze},[Ke,_e]=Xt([Q,p,ge],[D,g],{props:Ye}),[ke,lt]=f.useMemo(()=>d&&typeof d=="object"?[void 0,d]:[d,void 0],[d]),At=f.useMemo(()=>{const dt={};return lt&&Object.keys(lt).forEach(Dt=>{const Tt=lt[Dt];Tt!==void 0&&(dt[`--${ae}-${Dt}-width`]=typeof Tt=="number"?`${Tt}px`:Tt);}),dt},[ae,lt]);return f.createElement(kl,{form:true,space:true},f.createElement(Xy.Provider,{value:Oe},f.createElement(Xoe,{width:ke,...q,zIndex:Ze,getContainer:l===void 0?V:l,prefixCls:ae,rootClassName:X(Se,r,ye,ue,Ke.root),rootStyle:_e.root,footer:je,visible:o,mousePosition:w??iE,onClose:Ee,closable:qe,closeIcon:fe,transitionName:zl(re,"zoom",e.transitionName),maskTransitionName:zl(re,"fade",e.maskTransitionName),mask:de,className:X(Se,n,W),style:{...K,...u,...At},classNames:{...Ke,wrapper:X(Ke.wrapper,Be)},styles:_e,panelRef:rt,destroyOnHidden:I??N,modalRender:Qe,focusTriggerAfterClose:ie.focusTriggerAfterClose,focusTrap:ie.trap},y?f.createElement(Pf,{active:true,title:false,paragraph:{rows:4},className:`${ae}-body-skeleton`}):b)))},Rae=e=>{const{componentCls:t,titleFontSize:n,titleLineHeight:r,modalConfirmIconSize:o,fontSize:i,lineHeight:a,modalTitleHeight:l,fontHeight:u,confirmBodyPadding:d}=e,m=`${t}-confirm`;return {[m]:{"&-rtl":{direction:"rtl"},[`${e.antCls}-modal-header`]:{display:"none"},[`${m}-body-wrapper`]:{...P0()},[`&${t} ${t}-body`]:{padding:d},[`${m}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e.iconCls}`]:{flex:"none",fontSize:o,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(u).sub(o).equal()).div(2).equal()},[`&-has-title > ${e.iconCls}`]:{marginTop:e.calc(e.calc(l).sub(o).equal()).div(2).equal()}},[`${m}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:e.marginXS,maxWidth:`calc(100% - ${oe(e.marginSM)})`},[`${e.iconCls} + ${m}-paragraph`]:{maxWidth:`calc(100% - ${oe(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`},[`${m}-title`]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:n,lineHeight:r},[`${m}-container`]:{color:e.colorText,fontSize:i,lineHeight:a},[`${m}-btns`]:{textAlign:"end",marginTop:e.confirmBtnsMarginTop,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${m}-error ${m}-body > ${e.iconCls}`]:{color:e.colorError},[`${m}-warning ${m}-body > ${e.iconCls},
${m}-confirm ${m}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${m}-info ${m}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${m}-success ${m}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},Tae=Tf(["Modal","confirm"],e=>{const t=Gk(e);return Rae(t)},Kk,{order:-1e3}),Qk=e=>{const{prefixCls:t,icon:n,okText:r,cancelText:o,confirmPrefixCls:i,type:a,okCancel:l,footer:u,locale:d,autoFocusButton:m,focusable:p,...g}=e;let b=n;if(!n&&n!==null)switch(a){case "info":b=f.createElement(WM,null);break;case "success":b=f.createElement(qM,null);break;case "error":b=f.createElement(Gp,null);break;default:b=f.createElement(Kp,null);}const y=l??a==="confirm",S=f.useMemo(()=>{const _=p?.autoFocusButton||m;return _||_===null?_:"ok"},[m,p?.autoFocusButton]),[C]=Oo("Modal"),w=d||C,$=r||(y?w?.okText:w?.justOkText),M=o||w?.cancelText,{closable:T}=g,{onClose:R}=T&&typeof T=="object"?T:{},I=f.useMemo(()=>({autoFocusButton:S,cancelTextLocale:M,okTextLocale:$,mergedOkCancel:y,onClose:R,...g}),[S,M,$,y,R,g]),N=f.createElement(f.Fragment,null,f.createElement(tO,null),f.createElement(nO,null)),P=e.title!==void 0&&e.title!==null,O=`${i}-body`;return f.createElement("div",{className:`${i}-body-wrapper`},f.createElement("div",{className:X(O,{[`${O}-has-title`]:P})},b,f.createElement("div",{className:`${i}-paragraph`},P&&f.createElement("span",{className:`${i}-title`},e.title),f.createElement("div",{className:`${i}-content`},e.content))),u===void 0||typeof u=="function"?f.createElement(Dk,{value:I},f.createElement("div",{className:`${i}-btns`},typeof u=="function"?u(N,{OkBtn:nO,CancelBtn:tO}):N)):u,f.createElement(Tae,{prefixCls:t}))},Aae=e=>{const{close:t,zIndex:n,maskStyle:r,direction:o,prefixCls:i,wrapClassName:a,rootPrefixCls:l,bodyStyle:u,closable:d=false,onConfirm:m,styles:p,title:g,okButtonProps:b,cancelButtonProps:y}=e,{cancelButtonProps:S,okButtonProps:C}=Gt("modal"),w=`${i}-confirm`,$=e.width||416,M=e.style||{},T=X(w,`${w}-${e.type}`,{[`${w}-rtl`]:o==="rtl"},e.className),R=e.maskClosable===void 0?false:e.maskClosable,[,I]=Fr(),N=f.useMemo(()=>n!==void 0?n:I.zIndexPopupBase+ZM,[n,I]);return f.createElement(Xk,{...e,className:T,wrapClassName:X({[`${w}-centered`]:!!e.centered},a),onCancel:()=>{t?.({triggerCancel:true}),m?.(false);},title:g,footer:null,transitionName:zl(l||"","zoom",e.transitionName),maskTransitionName:zl(l||"","fade",e.maskTransitionName),maskClosable:R,style:M,styles:{body:u,mask:r,...p},width:$,zIndex:N,closable:d},f.createElement(Qk,{...e,confirmPrefixCls:w,okButtonProps:{...C,...b},cancelButtonProps:{...S,...y}}))},Zk=e=>{const{rootPrefixCls:t,iconPrefixCls:n,direction:r,theme:o}=e;return f.createElement(Do,{prefixCls:t,iconPrefixCls:n,direction:r,theme:o},f.createElement(Aae,{...e}))},Hc=[];let Jk="";function e7(){return Jk}const Nae=e=>{const{prefixCls:t,getContainer:n,direction:r}=e,o=FB(),i=f.useContext(Ct),a=e7()||i.getPrefixCls(),l=t||`${a}-modal`;let u=n;return u===false&&(u=void 0),G.createElement(Zk,{...e,rootPrefixCls:a,prefixCls:l,iconPrefixCls:i.iconPrefixCls,theme:i.theme,direction:r??i.direction,locale:i.locale?.Modal??o,getContainer:u})};function ng(e){const t=eR(),n=document.createDocumentFragment();let r={...e,close:l,open:true},o;function i(...d){d.some(p=>p?.triggerCancel)&&e.onCancel?.(()=>{},...d.slice(1));for(let p=0;p<Hc.length;p++)if(Hc[p]===l){Hc.splice(p,1);break}vk(n).then(()=>{});}const a=d=>{clearTimeout(o),o=setTimeout(()=>{const m=t.getPrefixCls(void 0,e7()),p=t.getIconPrefixCls(),g=t.getTheme(),b=G.createElement(Nae,{...d});e1(G.createElement(Do,{prefixCls:m,iconPrefixCls:p,theme:g},typeof t.holderRender=="function"?t.holderRender(b):b),n);});};function l(...d){r={...r,open:false,afterClose:()=>{typeof e.afterClose=="function"&&e.afterClose(),i.apply(this,d);}},a(r);}function u(d){typeof d=="function"?r=d(r):r={...r,...d},a(r);}return a(r),Hc.push(l),{destroy:l,update:u}}function t7(e){return {...e,type:"warning"}}function n7(e){return {...e,type:"info"}}function r7(e){return {...e,type:"success"}}function o7(e){return {...e,type:"error"}}function i7(e){return {...e,type:"confirm"}}function Pae({rootPrefixCls:e}){Jk=e;}const Iae=({afterClose:e,config:t,...n},r)=>{const[o,i]=f.useState(true),[a,l]=f.useState(t),{direction:u,getPrefixCls:d}=f.useContext(Ct),m=d("modal"),p=d(),g=()=>{e(),a.afterClose?.();},b=(...C)=>{i(false),C.some($=>$?.triggerCancel)&&a.onCancel?.(()=>{},...C.slice(1));};f.useImperativeHandle(r,()=>({destroy:b,update:C=>{l(w=>{const $=typeof C=="function"?C(w):C;return {...w,...$}});}}));const y=a.okCancel??a.type==="confirm",[S]=Oo("Modal",ya.Modal);return f.createElement(Zk,{prefixCls:m,rootPrefixCls:p,...a,close:b,open:o,afterClose:g,okText:a.okText||(y?S?.okText:S?.justOkText),direction:a.direction||u,cancelText:a.cancelText||S?.cancelText,...n})},Oae=f.forwardRef(Iae);let yO=0;const Dae=f.memo(f.forwardRef((e,t)=>{const[n,r]=qte();return f.useImperativeHandle(t,()=>({patchElement:r}),[r]),f.createElement(f.Fragment,null,n)}));function a7(){const e=f.useRef(null),[t,n]=f.useState([]);f.useEffect(()=>{t.length&&(Yt(t).forEach(a=>{a();}),n([]));},[t]);const r=f.useCallback(i=>function(l){yO+=1;const u=f.createRef();let d;const m=new Promise(S=>{d=S;});let p=false,g;const b=f.createElement(Oae,{key:`modal-${yO}`,config:i(l),ref:u,afterClose:()=>{g?.();},isSilent:()=>p,onConfirm:S=>{d(S);}});return g=e.current?.patchElement(b),g&&Hc.push(g),{destroy:()=>{function S(){u.current?.destroy();}u.current?S():n(C=>[].concat(Yt(C),[S]));},update:S=>{function C(){u.current?.update(S);}u.current?C():n(w=>[].concat(Yt(w),[C]));},then:S=>(p=true,m.then(S))}},[]);return [f.useMemo(()=>({info:r(n7),success:r(r7),error:r(o7),warning:r(t7),confirm:r(i7)}),[r]),f.createElement(Dae,{key:"modal-holder",ref:e})]}const _ae=e=>{const{componentCls:t,notificationMarginEdge:n,animationMaxHeight:r}=e,o=`${t}-notice`,i=new zt("antNotificationFadeIn",{"0%":{transform:"translate3d(100%, 0, 0)",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",opacity:1}}),a=new zt("antNotificationTopFadeIn",{"0%":{top:-r,opacity:0},"100%":{top:0,opacity:1}}),l=new zt("antNotificationBottomFadeIn",{"0%":{bottom:e.calc(r).mul(-1).equal(),opacity:0},"100%":{bottom:0,opacity:1}}),u=new zt("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:a}},[`&${t}-bottom`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:l}},[`&${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:u}}}}},Lae=["top","topLeft","topRight","bottom","bottomLeft","bottomRight"],zae={topLeft:"left",topRight:"right",bottomLeft:"left",bottomRight:"right",top:"left",bottom:"left"},Bae=(e,t)=>{const{componentCls:n}=e;return {[`${n}-${t}`]:{[`&${n}-stack > ${n}-notice-wrapper`]:{[t.startsWith("top")?"top":"bottom"]:0,[zae[t]]:{value:0,_skip_check_:true}}}}},kae=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}},Fae=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}},Hae=e=>{const{componentCls:t}=e;return {[`${t}-stack`]:{[`& > ${t}-notice-wrapper`]:{transition:`transform ${e.motionDurationSlow}, backdrop-filter 0s`,willChange:"transform, opacity",position:"absolute",...kae(e)}},[`${t}-stack:not(${t}-stack-expanded)`]:{[`& > ${t}-notice-wrapper`]:{...Fae(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"}}},...Lae.map(n=>Bae(e,n)).reduce((n,r)=>({...n,...r}),{})}},s7=e=>{const{iconCls:t,componentCls:n,boxShadow:r,fontSizeLG:o,notificationMarginBottom:i,borderRadiusLG:a,colorSuccess:l,colorInfo:u,colorWarning:d,colorError:m,colorTextHeading:p,notificationBg:g,notificationPadding:b,notificationMarginEdge:y,progressBg:S,notificationProgressHeight:C,fontSize:w,lineHeight:$,width:M,notificationIconSize:T,colorText:R,colorSuccessBg:I,colorErrorBg:N,colorInfoBg:P,colorWarningBg:O}=e,_=`${n}-notice`;return {position:"relative",marginBottom:i,marginInlineStart:"auto",background:g,borderRadius:a,boxShadow:r,[_]:{padding:b,width:M,maxWidth:`calc(100vw - ${oe(e.calc(y).mul(2).equal())})`,lineHeight:$,wordWrap:"break-word",borderRadius:a,overflow:"hidden","&-success":I?{background:I}:{},"&-error":N?{background:N}:{},"&-info":P?{background:P}:{},"&-warning":O?{background:O}:{}},[`${_}-title`]:{marginBottom:e.marginXS,color:p,fontSize:o,lineHeight:e.lineHeightLG},[`${_}-description`]:{fontSize:w,color:R,marginTop:e.marginXS},[`${_}-closable ${_}-title`]:{paddingInlineEnd:e.paddingLG},[`${_}-with-icon ${_}-title`]:{marginBottom:e.marginXS,marginInlineStart:e.calc(e.marginSM).add(T).equal(),fontSize:o},[`${_}-with-icon ${_}-description`]:{marginInlineStart:e.calc(e.marginSM).add(T).equal(),fontSize:w},[`${_}-icon`]:{position:"absolute",fontSize:T,lineHeight:1,[`&-success${t}`]:{color:l},[`&-info${t}`]:{color:u},[`&-warning${t}`]:{color:d},[`&-error${t}`]:{color: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},...$i(e)},[`${_}-progress`]:{position:"absolute",display:"block",appearance:"none",inlineSize:`calc(100% - ${oe(a)} * 2)`,left:{_skip_check_:true,value:a},right:{_skip_check_:true,value:a},bottom:0,blockSize:C,border:0,"&, &::-webkit-progress-bar":{borderRadius:a,backgroundColor:"rgba(0, 0, 0, 0.04)"},"&::-moz-progress-bar":{background:S},"&::-webkit-progress-value":{borderRadius:a,background:S}},[`${_}-actions`]:{float:"right",marginTop:e.marginSM}}},Vae=e=>{const{componentCls:t,notificationMarginBottom:n,notificationMarginEdge:r,motionDurationMid:o,motionEaseInOut:i}=e,a=`${t}-notice`,l=new zt("antNotificationFadeOut",{"0%":{maxHeight:e.animationMaxHeight,marginBottom:n},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return [{[t]:{...un(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:l,animationPlayState:"running"},"&-rtl":{direction:"rtl",[`${a}-actions`]:{float:"left"}}}},{[t]:{[`${a}-wrapper`]:s7(e)}}]},l7=e=>({zIndexPopup:e.zIndexPopupBase+ZM+50,width:384,progressBg:`linear-gradient(90deg, ${e.colorPrimaryBorderHover}, ${e.colorPrimary})`,colorSuccessBg:void 0,colorErrorBg:void 0,colorInfoBg:void 0,colorWarningBg:void 0}),c7=e=>{const t=e.paddingMD,n=e.paddingLG;return Ft(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:`${oe(e.paddingMD)} ${oe(e.paddingContentHorizontalLG)}`,notificationMarginEdge:e.marginLG,animationMaxHeight:150,notificationStackLayer:3,notificationProgressHeight:2})},u7=qt("Notification",e=>{const t=c7(e);return [Vae(t),_ae(t),Hae(t)]},l7),jae=Tf(["Notification","PurePanel"],e=>{const t=`${e.componentCls}-notice`,n=c7(e);return {[`${t}-pure-panel`]:{...s7(n),width:n.width,maxWidth:`calc(100vw - ${oe(e.calc(n.notificationMarginEdge).mul(2).equal())})`,margin:0}}},l7);function yR(e,t){return t===null||t===false?null:t||f.createElement(Ds,{className:`${e}-close-icon`})}const Uae={success:qM,info:WM,error:Gp,warning:Kp},d7=e=>{const{prefixCls:t,icon:n,type:r,title:o,description:i,actions:a,role:l="alert",styles:u,classNames:d}=e;let m=null;return n?m=f.createElement("span",{className:X(`${t}-icon`,d.icon),style:u.icon},n):r&&(m=f.createElement(Uae[r]||null,{className:X(`${t}-icon`,d.icon,`${t}-icon-${r}`),style:u.icon})),f.createElement("div",{className:X({[`${t}-with-icon`]:m}),role:l},m,f.createElement("div",{className:X(`${t}-title`,d.title),style:u.title},o),i&&f.createElement("div",{className:X(`${t}-description`,d.description),style:u.description},i),a&&f.createElement("div",{className:X(`${t}-actions`,d.actions),style:u.actions},a))},qae=e=>{const{prefixCls:t,icon:n,type:r,message:o,title:i,description:a,btn:l,actions:u,closeIcon:d,className:m,style:p,styles:g,classNames:b,closable:y,...S}=e,{getPrefixCls:C,className:w,style:$,classNames:M,styles:T}=Gt("notification"),[R,I]=Xt([M,b],[T,g],{props:e}),{notification:N}=f.useContext(Ct),P=u??l,O=i??o,_=t||C("notification"),L=`${_}-notice`,j=Yn(_),[U,q]=u7(_,j),[V,B,,F]=XM(Ll(e),Ll(N),{closable:true,closeIcon:f.createElement(Ds,{className:`${_}-close-icon`}),closeIconRender:K=>yR(_,K)}),W=V?{onClose:y&&typeof y=="object"?y?.onClose:void 0,closeIcon:B,...F}:false;return f.createElement("div",{className:X(`${L}-pure-panel`,U,m,q,j,R.root),style:I.root},f.createElement(jae,{prefixCls:_}),f.createElement(tR,{style:{...$,...p},...S,prefixCls:_,eventKey:"pure",duration:null,closable:W,className:X(m,w),content:f.createElement(d7,{classNames:R,styles:I,prefixCls:L,icon:n,type:r,title:O,description:a,actions:P})}))};function Wae(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 Gae(e){return {motionName:`${e}-fade`}}function Kae(e,t,n){return typeof e<"u"?e:typeof t?.closeIcon<"u"?t.closeIcon:n?.closeIcon}const SO=24,Yae=4.5,Xae="topRight",Qae=({children:e,prefixCls:t})=>{const n=Yn(t),[r,o]=u7(t,n);return G.createElement(dk,{classNames:{list:X(r,o,n)}},e)},Zae=(e,{prefixCls:t,key:n})=>G.createElement(Qae,{prefixCls:t,key:n},e),Jae=G.forwardRef((e,t)=>{const{top:n,bottom:r,prefixCls:o,getContainer:i,maxCount:a,rtl:l,onAllRemoved:u,stack:d,duration:m=Yae,pauseOnHover:p=true,showProgress:g}=e,{getPrefixCls:b,getPopupContainer:y,direction:S}=Gt("notification"),{notification:C}=f.useContext(Ct),[,w]=Fr(),$=o||b("notification"),M=f.useMemo(()=>typeof m=="number"&&m>0?m:false,[m]),T=L=>Wae(L,n??SO,r??SO),R=()=>X({[`${$}-rtl`]:l??S==="rtl"}),I=()=>Gae($),[N,P]=fk({prefixCls:$,style:T,className:R,motion:I,closable:{closeIcon:yR($)},duration:M,getContainer:()=>i?.()||y?.()||document.body,maxCount:a,pauseOnHover:p,showProgress:g,onAllRemoved:u,renderNotifications:Zae,stack:d===false?false:{threshold:typeof d=="object"?d?.threshold:void 0,offset:8,gap:w.margin}}),[O,_]=Xt([C?.classNames,e?.classNames],[C?.styles,e?.styles],{props:e});return G.useImperativeHandle(t,()=>({...N,prefixCls:$,notification:C,classNames:O,styles:_})),P});function f7(e){const t=G.useRef(null),{notification:n}=G.useContext(Ct);return [G.useMemo(()=>{const o=u=>{if(!t.current)return;const{open:d,prefixCls:m,notification:p,classNames:g,styles:b}=t.current,y=p?.className||{},S=p?.style||{},C=`${m}-notice`,{title:w,message:$,description:M,icon:T,type:R,btn:I,actions:N,className:P,style:O,role:_="alert",closeIcon:L,closable:j,classNames:U={},styles:q={},...V}=u,B=w??$,F=N??I,W=yR(C,Kae(L,e,p)),[K,Q,,D]=VB(Ll({...e||{},...u}),Ll(n),{closable:true,closeIcon:W}),z=K?{onClose:j&&typeof j=="object"?j.onClose:void 0,closeIcon:Q,...D}:false,Y=Rl(U,{props:u}),ee=Rl(q,{props:u}),J=Yy(void 0,g,Y),te=QM(b,ee);return d({placement:e?.placement??Xae,...V,content:G.createElement(d7,{prefixCls:C,icon:T,type:R,title:B,description:M,actions:F,role:_,classNames:J,styles:te}),className:X({[`${C}-${R}`]:R},P,y,J.root),style:{...S,...te.root,...O},closable:z})},a={open:o,destroy:u=>{u!==void 0?t.current?.close(u):t.current?.destroy();}};return ["success","info","warning","error"].forEach(u=>{a[u]=d=>o({...d,type:u});}),a},[e,n]),G.createElement(Jae,{key:"notification-holder",...e,ref:t})]}function m7(e){return f7(e)}const V0=G.createContext({}),h7=G.createContext({message:{},notification:{},modal:{}}),ese=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"}}}},tse=()=>({}),nse=qt("App",ese,tse),rse=e=>{const{prefixCls:t,children:n,className:r,rootClassName:o,message:i,notification:a,style:l,component:u="div"}=e,{direction:d,getPrefixCls:m}=f.useContext(Ct),p=m("app",t),[g,b]=nse(p),y=X(g,p,r,o,b,{[`${p}-rtl`]:d==="rtl"}),S=f.useContext(V0),C=G.useMemo(()=>({message:{...S.message,...i},notification:{...S.notification,...a}}),[i,a,S.message,S.notification]),[w,$]=gk(C.message),[M,T]=m7(C.notification),[R,I]=a7(),N=G.useMemo(()=>({message:w,notification:M,modal:R}),[w,M,R]),P=u===false?G.Fragment:u,O={className:y,style:l};return G.createElement(h7.Provider,{value:N},G.createElement(V0.Provider,{value:C},G.createElement(P,{...u===false?void 0:O},I,$,T,n)))},ose=()=>G.useContext(h7),rg=rse;rg.useApp=ose;function p7(e){return t=>f.createElement(Do,{theme:{token:{motion:false,zIndexPopupBase:0}}},f.createElement(e,{...t}))}const SR=(e,t,n,r,o)=>p7(a=>{const{prefixCls:l,style:u}=a,d=f.useRef(null),[m,p]=f.useState(0),[g,b]=f.useState(0),[y,S]=hn(false,a.open),{getPrefixCls:C}=f.useContext(Ct),w=C(r||"select",l);f.useEffect(()=>{if(S(true),typeof ResizeObserver<"u"){const T=new ResizeObserver(I=>{const N=I[0].target;p(N.offsetHeight+8),b(N.offsetWidth);}),R=setInterval(()=>{const I=o?`.${o(w)}`:`.${w}-dropdown`,N=d.current?.querySelector(I);N&&(clearInterval(R),T.observe(N));},10);return ()=>{clearInterval(R),T.disconnect();}}},[w]);let $={...a,style:{...u,margin:0},open:y,getPopupContainer:()=>d.current};n&&($=n($)),t&&Object.assign($,{[t]:{overflow:{adjustX:false,adjustY:false}}});const M={paddingBottom:m,position:"relative",minWidth:g};return f.createElement("div",{ref:d,style:M},f.createElement(e,{...$}))}),ise=(e,t,n,r,o=false,i,a)=>{const l=f.useMemo(()=>typeof n=="boolean"?{allowClear:n}:n&&typeof n=="object"?n:{allowClear:false},[n]);return f.useMemo(()=>{const u=!o&&l.allowClear!==false&&(t.length||i)&&!(a==="combobox"&&i==="");return {allowClear:u,clearIcon:u?l.clearIcon||r||"×":null}},[l,r,o,t.length,i,a])},g7=f.createContext(null);function wu(){return f.useContext(g7)}function ase(e=250){const t=f.useRef(null),n=f.useRef(null);f.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 v7(e,t){return e.filter(n=>n).some(n=>n.contains(t)||n===t)}function sse(e,t,n,r){const o=Et(i=>{if(r)return;let a=i.target;a.shadowRoot&&i.composed&&(a=i.composedPath()[0]||a),i._ori_target&&(a=i._ori_target),t&&!v7(e(),a)&&n(false);});f.useEffect(()=>(window.addEventListener("mousedown",o),()=>window.removeEventListener("mousedown",o)),[o]);}function aE(){return aE=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},aE.apply(this,arguments)}const lse=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"}}},cse=(e,t)=>{const{prefixCls:n,disabled:r,visible:o,children:i,popupElement:a,animation:l,transitionName:u,popupStyle:d,popupClassName:m,direction:p="ltr",placement:g,builtinPlacements:b,popupMatchSelectWidth:y,popupRender:S,popupAlign:C,getPopupContainer:w,empty:$,onPopupVisibleChange:M,onPopupMouseEnter:T,onPopupMouseDown:R,onPopupBlur:I,...N}=e,P=`${n}-dropdown`;let O=a;S&&(O=S(a));const _=f.useMemo(()=>b||lse(y),[b,y]),L=l?`${P}-${l}`:u,j=typeof y=="number",U=f.useMemo(()=>j?null:y===false?"minWidth":"width",[y,j]);let q=d;j&&(q={...d,width:y});const V=f.useRef(null);return f.useImperativeHandle(t,()=>({getPopupElement:()=>V.current?.popupElement})),f.createElement(Zy,aE({},N,{showAction:M?["click"]:[],hideAction:M?["click"]:[],popupPlacement:g||(p==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:_,prefixCls:P,popupMotion:{motionName:L},popup:f.createElement("div",{onMouseEnter:T,onMouseDown:R,onBlur:I},O),ref:V,stretch:U,popupAlign:C,popupVisible:o,getPopupContainer:w,popupClassName:X(m,{[`${P}-empty`]:$}),popupStyle:q,onPopupVisibleChange:M}),i)},use=f.forwardRef(cse);function CO(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 sE(e){return typeof e<"u"&&!Number.isNaN(e)}function b7(e,t){const{label:n,value:r,options:o,groupLabel:i}=e||{},a=n||(t?"children":"label");return {label:a,value:r||"value",options:o||"options",groupLabel:i||a}}function dse(e,{fieldNames:t,childrenAsData:n}={}){const r=[],{label:o,value:i,options:a,groupLabel:l}=b7(t,false);function u(d,m){Array.isArray(d)&&d.forEach(p=>{if(m||!(a in p)){const g=p[i];r.push({key:CO(p,r.length),groupOption:m,data:p,label:p[o],value:g});}else {let g=p[l];g===void 0&&n&&(g=p.label),r.push({key:CO(p,r.length),group:true,data:p,label:g}),u(p[a],true);}});}return u(e,false),r}function lE(e){const t={...e};return "props"in t||Object.defineProperty(t,"props",{get(){return wr(false,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}const fse=(e,t,n)=>{if(!t||!t.length)return null;let r=false;const o=(a,[l,...u])=>{if(!l)return [a];const d=a.split(l);return r=r||d.length>1,d.reduce((m,p)=>[...m,...o(p,u)],[]).filter(Boolean)},i=o(e,t);return r?typeof n<"u"?i.slice(0,n):i:null};function mse(e){const{visible:t,values:n}=e;if(!t)return null;const r=50;return f.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 hse=e=>{const t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null);},CR=(e,t=1)=>{if(t<=0){e();return}hse(()=>{CR(e,t-1);});};function pse(e,t,n,r){const[o,i]=f.useState(false);f.useEffect(()=>{i(true);},[]);const[a,l]=hn(e,t),[u,d]=f.useState(false),p=r(o?a:false),g=f.useRef(0),b=Et(S=>{n&&p!==S&&n(S),l(S);}),y=Et((S,C={})=>{const{cancelFun:w}=C;g.current+=1;const $=g.current,M=typeof S=="boolean"?S:!p;d(!M);function T(){$===g.current&&!w?.()&&(b(M),d(false));}M?T():CR(()=>{T();});});return [p,y,u]}function Xx(e){const{children:t,...n}=e;return t?f.createElement("div",n,t):null}const y7=f.createContext(null);function og(){return f.useContext(y7)}const S7=f.forwardRef((e,t)=>{const{onChange:n,onKeyDown:r,onBlur:o,style:i,syncWidth:a,value:l,className:u,autoComplete:d,...m}=e,{prefixCls:p,mode:g,onSearch:b,onSearchSubmit:y,onInputBlur:S,autoFocus:C,tokenWithEnter:w,placeholder:$,components:{input:M="input"}}=og(),{id:T,classNames:R,styles:I,open:N,activeDescendantId:P,role:O,disabled:_}=wu()||{},L=X(`${p}-input`,R?.input,u),j=f.useRef(false),U=f.useRef(null),q=f.useRef(null);f.useImperativeHandle(t,()=>q.current);const V=J=>{let{value:te}=J.target;if(w&&U.current&&/[\r\n]/.test(U.current)){const ne=U.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");te=te.replace(ne,U.current);}U.current=null,b&&b(te,true,j.current),n?.(J);},B=J=>{const{key:te}=J,{value:ne}=J.currentTarget;te==="Enter"&&g==="tags"&&!j.current&&y&&y(ne),r?.(J);},F=J=>{S?.(),o?.(J);},W=()=>{j.current=true;},K=J=>{if(j.current=false,g!=="combobox"){const{value:te}=J.currentTarget;b?.(te,true,false);}},Q=J=>{const{clipboardData:te}=J,ne=te?.getData("text");U.current=ne||"";},[D,z]=f.useState(void 0);An(()=>{const J=q.current;if(a&&J){J.style.width="0px";const te=J.scrollWidth;z(te),J.style.width="";}},[a,l]);const Y={id:T,type:g==="combobox"?"text":"search",...m,ref:q,style:{...I?.input,...i,"--select-input-width":D},autoFocus:C,autoComplete:d||"off",className:L,disabled:_,value:l||"",onChange:V,onKeyDown:B,onBlur:F,onPaste:Q,onCompositionStart:W,onCompositionEnd:K,role:O||"combobox","aria-expanded":N||false,"aria-haspopup":"listbox","aria-owns":N?`${T}_list`:void 0,"aria-autocomplete":"list","aria-controls":N?`${T}_list`:void 0,"aria-activedescendant":N?P:void 0};if(f.isValidElement(M)){const J=M.props||{},te={placeholder:e.placeholder||$,...Y,...J};return Object.keys(J).forEach(ne=>{const se=J[ne];typeof se=="function"&&(te[ne]=(...ae)=>{se(...ae),Y[ne]?.(...ae);});}),te.ref=Nr(M.ref,Y.ref),f.cloneElement(M,te)}const ee=M;return f.createElement(ee,Y)});function C7(e){const{prefixCls:t,placeholder:n,displayValues:r}=og(),{classNames:o,styles:i}=wu(),{show:a=true}=e;return r.length?null:f.createElement("div",{className:X(`${t}-placeholder`,o?.placeholder),style:{visibility:a?"visible":"hidden",...i?.placeholder}},n)}const xR=f.createContext(null);function x7(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function gse(e){return e!=null}function vse(e){return !e&&e!==0}function xO(e){return ["string","number"].includes(typeof e)}function cE(e){let t;return e&&(xO(e.title)?t=e.title.toString():xO(e.label)&&(t=e.label.toString())),t}function uE(){return uE=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},uE.apply(this,arguments)}const bse=f.forwardRef(({inputProps:e},t)=>{const{prefixCls:n,searchValue:r,activeValue:o,displayValues:i,maxLength:a,mode:l}=og(),{triggerOpen:u,title:d,showSearch:m,classNames:p,styles:g}=wu(),b=f.useContext(xR),[y,S]=f.useState(false),C=l==="combobox",w=i[0],$=f.useMemo(()=>C&&o&&!y&&u?o:m?r:"",[C,o,y,u,r,m]),M=f.useMemo(()=>{const T={className:`${n}-content-value`,style:$?{visibility:"hidden"}:{}};if(w&&b?.flattenOptions){const R=b.flattenOptions.find(I=>I.value===w.value);if(R?.data){const{className:I,style:N}=R.data;Object.assign(T,{title:cE(R.data),className:X(T.className,I),style:{...T.style,...N}});}}return w&&!T.title&&(T.title=cE(w)),d!==void 0&&(T.title=d),T},[w,b?.flattenOptions,n,$,d]);return f.useEffect(()=>{C&&S(false);},[C,o]),f.createElement("div",{className:X(`${n}-content`,p?.content),style:g?.content},w?f.createElement("div",M,w.label):f.createElement(C7,{show:!$}),f.createElement(S7,uE({ref:t},e,{value:$,maxLength:l==="combobox"?a:void 0,onChange:T=>{S(true),e.onChange?.(T);}})))}),bd=void 0;function yse(e,t){const{prefixCls:n,invalidate:r,item:o,renderItem:i,responsive:a,responsiveDisabled:l,registerSize:u,itemKey:d,className:m,style:p,children:g,display:b,order:y,component:S="div",...C}=e,w=a&&!b;function $(N){u(d,N);}f.useEffect(()=>()=>{$(null);},[]);const M=i&&o!==bd?i(o,{index:y}):g;let T;r||(T={opacity:w?0:1,height:w?0:bd,overflowY:w?"hidden":bd,order:a?y:bd,pointerEvents:w?"none":bd,position:w?"absolute":bd});const R={};w&&(R["aria-hidden"]=true);let I=f.createElement(S,ir({className:X(!r&&n,m),style:{...T,...p}},R,C,{ref:t}),M);return a&&(I=f.createElement(ha,{onResize:({offsetWidth:N})=>{$(N);},disabled:l},I)),I}const yh=f.forwardRef(yse);function Sse(e){if(typeof MessageChannel>"u")Lt(e);else {const t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(void 0);}}function Cse(){const e=f.useRef(null);return n=>{e.current||(e.current=[],Sse(()=>{Eo.unstable_batchedUpdates(()=>{e.current.forEach(r=>{r();}),e.current=null;});})),e.current.push(n);}}function yd(e,t){const[n,r]=f.useState(t),o=Et(i=>{e(()=>{r(i);});});return [n,o]}const j0=G.createContext(null),xse=(e,t)=>{const n=f.useContext(j0);if(!n){const{component:l="div",...u}=e;return f.createElement(l,ir({},u,{ref:t}))}const{className:r,...o}=n,{className:i,...a}=e;return f.createElement(j0.Provider,{value:null},f.createElement(yh,ir({ref:t,className:X(r,i)},o,a)))},wse=f.forwardRef(xse),w7="responsive",$7="invalidate";function $se(e){return `+ ${e.length} ...`}function Ese(e,t){const{prefixCls:n="rc-overflow",data:r=[],renderItem:o,renderRawItem:i,itemKey:a,itemWidth:l=10,ssr:u,style:d,className:m,maxCount:p,renderRest:g,renderRawRest:b,prefix:y,suffix:S,component:C="div",itemComponent:w,onVisibleChange:$,...M}=e,T=u==="full",R=Cse(),[I,N]=yd(R,null),P=I||0,[O,_]=yd(R,new Map),[L,j]=yd(R,0),[U,q]=yd(R,0),[V,B]=yd(R,0),[F,W]=yd(R,0),[K,Q]=f.useState(null),[D,z]=f.useState(null),Y=f.useMemo(()=>D===null&&T?Number.MAX_SAFE_INTEGER:D||0,[D,I]),[ee,J]=f.useState(false),te=`${n}-item`,ne=Math.max(L,U),se=p===w7,ae=r.length&&se,re=p===$7,de=ae||typeof p=="number"&&r.length>p,ge=f.useMemo(()=>{let Oe=r;return ae?I===null&&T?Oe=r:Oe=r.slice(0,Math.min(r.length,P/l)):typeof p=="number"&&(Oe=r.slice(0,p)),Oe},[r,l,I,p,ae]),ie=f.useMemo(()=>ae?r.slice(Y+1):r.slice(ge.length),[r,ge,ae,Y]),Ee=f.useCallback((Oe,Ye)=>typeof a=="function"?a(Oe):(a&&Oe?.[a])??Ye,[a]),le=f.useCallback(o||(Oe=>Oe),[o]);function ue(Oe,Ye,Ke){D===Oe&&(Ye===void 0||Ye===K)||(z(Oe),Ke||(J(Oe<r.length-1),$?.(Oe)),Ye!==void 0&&Q(Ye));}function Se(Oe,Ye){N(Ye.clientWidth);}function ye(Oe,Ye){_(Ke=>{const _e=new Map(Ke);return Ye===null?_e.delete(Oe):_e.set(Oe,Ye),_e});}function Be(Oe,Ye){q(Ye),j(U);}function je(Oe,Ye){B(Ye);}function Ne(Oe,Ye){W(Ye);}function fe(Oe){return O.get(Ee(ge[Oe],Oe))}An(()=>{if(P&&typeof ne=="number"&&ge){let Oe=V+F;const Ye=ge.length,Ke=Ye-1;if(!Ye){ue(0,null);return}for(let _e=0;_e<Ye;_e+=1){let ke=fe(_e);if(T&&(ke=ke||0),ke===void 0){ue(_e-1,void 0,true);break}if(Oe+=ke,Ke===0&&Oe<=P||_e===Ke-1&&Oe+fe(Ke)<=P){ue(Ke,null);break}else if(Oe+ne>P){ue(_e-1,Oe-ke-F+U);break}}S&&fe(0)+F>P&&Q(null);}},[P,O,U,V,F,Ee,ge]);const be=ee&&!!ie.length;let Re={};K!==null&&ae&&(Re={position:"absolute",left:K,top:0});const qe={prefixCls:te,responsive:ae,component:w,invalidate:re},Qe=i?(Oe,Ye)=>{const Ke=Ee(Oe,Ye);return f.createElement(j0.Provider,{key:Ke,value:{...qe,order:Ye,item:Oe,itemKey:Ke,registerSize:ye,display:Ye<=Y}},i(Oe,Ye))}:(Oe,Ye)=>{const Ke=Ee(Oe,Ye);return f.createElement(yh,ir({},qe,{order:Ye,key:Ke,item:Oe,renderItem:le,itemKey:Ke,registerSize:ye,display:Ye<=Y}))},We={order:be?Y:Number.MAX_SAFE_INTEGER,className:`${te}-rest`,registerSize:Be,display:be},tt=g||$se,rt=b?f.createElement(j0.Provider,{value:{...qe,...We}},b(ie)):f.createElement(yh,ir({},qe,We),typeof tt=="function"?tt(ie):tt),Ze=f.createElement(C,ir({className:X(!re&&n,m),style:d,ref:t},M),y&&f.createElement(yh,ir({},qe,{responsive:se,responsiveDisabled:!ae,order:-1,className:`${te}-prefix`,registerSize:je,display:true}),y),ge.map(Qe),de?rt:null,S&&f.createElement(yh,ir({},qe,{responsive:se,responsiveDisabled:!ae,order:Y,className:`${te}-suffix`,registerSize:Ne,display:true,style:Re}),S));return se?f.createElement(ha,{onResize:Se,disabled:!ae},Ze):Ze}const Ms=f.forwardRef(Ese);Ms.Item=wse;Ms.RESPONSIVE=w7;Ms.INVALIDATE=$7;const E7=e=>{const{className:t,style:n,customizeIcon:r,customizeIconProps:o,children:i,onMouseDown:a,onClick:l}=e,u=typeof r=="function"?r(o):r;return f.createElement("span",{className:t,onMouseDown:d=>{d.preventDefault(),a?.(d);},style:{userSelect:"none",WebkitUserSelect:"none",...n},unselectable:"on",onClick:l,"aria-hidden":true},u!==void 0?u:f.createElement("span",{className:X(t.split(/\s+/).map(d=>`${d}-icon`))},i))};function dE(){return dE=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},dE.apply(this,arguments)}function Mse(e){return e.key??e.value}const wO=e=>{e.preventDefault(),e.stopPropagation();},Rse=f.forwardRef(function({inputProps:t},n){const{prefixCls:r,displayValues:o,searchValue:i,mode:a,onSelectorRemove:l,removeIcon:u}=og(),{disabled:d,showSearch:m,triggerOpen:p,toggleOpen:g,autoClearSearchValue:b,tagRender:y,maxTagPlaceholder:S,maxTagTextLength:C,maxTagCount:w,classNames:$,styles:M}=wu(),T=`${r}-selection-item`;let R=i;!p&&a==="multiple"&&b!==false&&(R="");const I=m&&R||"",N=m&&!d,P=u??"×",O=S??(F=>`+ ${F.length} ...`),_=y,L=F=>{g(F);},j=F=>{l?.(F);},U=(F,W,K,Q,D)=>f.createElement("span",{title:cE(F),className:X(T,{[`${T}-disabled`]:K},$?.item),style:M?.item},f.createElement("span",{className:X(`${T}-content`,$?.itemContent),style:M?.itemContent},W),Q&&f.createElement(E7,{className:X(`${T}-remove`,$?.itemRemove),style:M?.itemRemove,onMouseDown:wO,onClick:D,customizeIcon:P},"×")),q=(F,W,K,Q,D,z,Y)=>{const ee=J=>{wO(J),L(!p);};return f.createElement("span",{onMouseDown:ee},_({label:W,value:F,index:Y?.index,disabled:K,closable:Q,onClose:D,isMaxTag:!!z}))},V=(F,W)=>{const{disabled:K,label:Q,value:D}=F,z=!d&&!K;let Y=Q;if(typeof C=="number"&&(typeof Q=="string"||typeof Q=="number")){const J=String(Y);J.length>C&&(Y=`${J.slice(0,C)}...`);}const ee=J=>{J&&J.stopPropagation(),j(F);};return typeof _=="function"?q(D,Y,K,z,ee,void 0,W):U(F,Y,K,z,ee)},B=F=>{if(!o.length)return null;const W=typeof O=="function"?O(F):O;return typeof _=="function"?q(void 0,W,false,false,void 0,true):U({title:W},W,false)};return f.createElement(Ms,{prefixCls:`${r}-content`,className:$?.content,style:M?.content,prefix:!o.length&&!I&&f.createElement(C7,null),data:o,renderItem:V,renderRest:B,suffix:f.createElement(S7,dE({ref:n,disabled:d,readOnly:!N},t,{value:I||"",syncWidth:true})),itemKey:Mse,maxCount:w})}),Tse=f.forwardRef(function(t,n){const{multiple:r,onInputKeyDown:o,tabIndex:i}=og(),a=wu(),{showSearch:l}=a,d={...bo(a,{aria:true}),onKeyDown:o,readOnly:!l,tabIndex:i};return r?f.createElement(Rse,{ref:n,inputProps:d}):f.createElement(bse,{ref:n,inputProps:d})});function Ase(e){return e&&![ot.ESC,ot.SHIFT,ot.BACKSPACE,ot.TAB,ot.WIN_KEY,ot.ALT,ot.META,ot.WIN_KEY_RIGHT,ot.CTRL,ot.SEMICOLON,ot.EQUALS,ot.CAPS_LOCK,ot.CONTEXT_MENU,ot.UP,ot.LEFT,ot.RIGHT,ot.F1,ot.F2,ot.F3,ot.F4,ot.F5,ot.F6,ot.F7,ot.F8,ot.F9,ot.F10,ot.F11,ot.F12].includes(e)}function U0(){return U0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e},U0.apply(this,arguments)}const Nse=["value","onChange","removeIcon","placeholder","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex","activeValue","onSelectorRemove","focused"],Pse=f.forwardRef(function(t,n){const{prefixCls:r,className:o,style:i,prefix:a,suffix:l,clearIcon:u,children:d,multiple:m,displayValues:p,placeholder:g,mode:b,searchValue:y,onSearch:S,onSearchSubmit:C,onInputBlur:w,maxLength:$,autoFocus:M,onMouseDown:T,onClearMouseDown:R,onInputKeyDown:I,onSelectorRemove:N,tokenWithEnter:P,components:O,..._}=t,{triggerOpen:L,toggleOpen:j,showSearch:U,disabled:q,loading:V,classNames:B,styles:F}=wu(),W=f.useRef(null),K=f.useRef(null),Q=Et(ne=>{const{which:se}=ne,ae=K.current instanceof HTMLTextAreaElement;if(!ae&&L&&(se===ot.UP||se===ot.DOWN)&&ne.preventDefault(),I&&I(ne),ae&&!L&&~[ot.UP,ot.DOWN,ot.LEFT,ot.RIGHT].indexOf(se))return;!(ne.ctrlKey||ne.altKey||ne.metaKey)&&Ase(se)&&j(true);});f.useImperativeHandle(n,()=>({focus:ne=>{(K.current||W.current).focus?.(ne);},blur:()=>{(K.current||W.current).blur?.();},nativeElement:W.current}));const D=Et(ne=>{if(!q){const se=nf(K.current);ne.nativeEvent._ori_target=se,se&&ne.target!==se&&!se.contains(ne.target)&&ne.preventDefault();const ae=L&&!m&&(b==="combobox"||U);ne.nativeEvent._select_lazy?L&&j(false):(K.current?.focus(),ae||j());}T?.(ne);}),{root:z}=O,Y=Bn(_,Nse),ee=bo(Y,{aria:true}),J=Object.keys(ee),te={...t,onInputKeyDown:Q};return z?f.isValidElement(z)?f.cloneElement(z,{...Y,ref:Nr(z.ref,W)}):f.createElement(z,U0({},Y,{ref:W})):f.createElement(y7.Provider,{value:te},f.createElement("div",U0({},Bn(Y,J),{ref:W,className:o,style:i,onMouseDown:D}),f.createElement(Xx,{className:X(`${r}-prefix`,B?.prefix),style:F?.prefix},a),f.createElement(Tse,{ref:K}),f.createElement(Xx,{className:X(`${r}-suffix`,{[`${r}-suffix-loading`]:V},B?.suffix),style:F?.suffix},l),u&&f.createElement(Xx,{className:X(`${r}-clear`,B?.clear),style:F?.clear,onMouseDown:ne=>{ne.nativeEvent._select_lazy=true,R?.(ne);}},u),d))});function Ise(e,t,n){return f.useMemo(()=>{let{root:r,input:o}=e||{};return n&&(r=n()),t&&(o=t()),{root:r,input:o}},[e,t,n])}function fE(){return fE=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},fE.apply(this,arguments)}const mE=e=>e==="tags"||e==="multiple",Ose=f.forwardRef((e,t)=>{const{id:n,prefixCls:r,className:o,styles:i,classNames:a,showSearch:l,tagRender:u,showScrollBar:d="optional",direction:m,omitDomProps:p,displayValues:g,onDisplayValuesChange:b,emptyOptions:y,notFoundContent:S="Not Found",onClear:C,maxCount:w,placeholder:$,mode:M,disabled:T,loading:R,getInputElement:I,getRawInputElement:N,open:P,defaultOpen:O,onPopupVisibleChange:_,activeValue:L,onActiveValueChange:j,activeDescendantId:U,searchValue:q,autoClearSearchValue:V,onSearch:B,onSearchSplit:F,tokenSeparators:W,allowClear:K,prefix:Q,suffix:D,suffixIcon:z,clearIcon:Y,OptionList:ee,animation:J,transitionName:te,popupStyle:ne,popupClassName:se,popupMatchSelectWidth:ae,popupRender:re,popupAlign:de,placement:ge,builtinPlacements:ie,getPopupContainer:Ee,showAction:le=[],onFocus:ue,onBlur:Se,onKeyUp:ye,onKeyDown:Be,onMouseDown:je,components:Ne,...fe}=e,be=mE(M),Re=f.useRef(null),qe=f.useRef(null),Qe=f.useRef(null),[We,tt]=f.useState(false);f.useImperativeHandle(t,()=>({focus:Re.current?.focus,blur:Re.current?.blur,scrollTo:Ue=>Qe.current?.scrollTo(Ue),nativeElement:nf(Re.current)}));const rt=Ise(Ne,I,N),Ze=f.useMemo(()=>{if(M!=="combobox")return q;const Ue=g[0]?.value;return typeof Ue=="string"||typeof Ue=="number"?String(Ue):""},[q,M,g]),Oe=M==="combobox"&&typeof I=="function"&&I()||null,Ye=!S&&y,[Ke,_e,ke]=pse(O||false,P,_,Ue=>T||Ye?false:Ue),lt=f.useMemo(()=>(W||[]).some(Ue=>[`
`,`\r
`].includes(Ue)),[W]),At=(Ue,ct,Rt)=>{if(be&&sE(w)&&g.length>=w)return;let _t=true,en=Ue;j?.(null);const dn=fse(Ue,W,sE(w)?w-g.length:void 0),yn=Rt?null:dn;return M!=="combobox"&&yn&&(en="",F?.(yn),_e(false),_t=false),B&&Ze!==en&&B(en,{source:ct?"typing":"effect"}),Ue&&ct&&_t&&_e(true),_t},dt=Ue=>{!Ue||!Ue.trim()||B(Ue,{source:"submit"});};f.useEffect(()=>{!Ke&&!be&&M!=="combobox"&&At("",false,false);},[Ke]),f.useEffect(()=>{T&&(_e(false),tt(false));},[T,Ke]);const[Dt,Tt]=ase(),xt=f.useRef(false),gt=Ue=>{const ct=Dt(),{key:Rt}=Ue,_t=Rt==="Enter";if(_t&&(M!=="combobox"&&Ue.preventDefault(),Ke||_e(true)),Tt(!!Ze),Rt==="Backspace"&&!ct&&be&&!Ze&&g.length){const en=[...g];let dn=null;for(let yn=en.length-1;yn>=0;yn-=1){const lr=en[yn];if(!lr.disabled){en.splice(yn,1),dn=lr;break}}dn&&b(en,{type:"remove",values:[dn]});}Ke&&(!_t||!xt.current)&&(_t&&(xt.current=true),Qe.current?.onKeyDown(Ue)),Be?.(Ue);},ft=(Ue,...ct)=>{Ke&&Qe.current?.onKeyUp(Ue,...ct),Ue.key==="Enter"&&(xt.current=false),ye?.(Ue,...ct);},st=Et(Ue=>{const ct=g.filter(Rt=>Rt!==Ue);b(ct,{type:"remove",values:[Ue]});}),He=()=>{xt.current=false;},Ge=()=>[nf(Re.current),qe.current?.getPopupElement()];sse(Ge,Ke,_e,!!rt.root);const ve=f.useRef(false),Te=Ue=>{tt(true),T||(le.includes("focus")&&_e(true),ue?.(Ue));},Ce=()=>{Ke&&!ve.current&&_e(false,{cancelFun:()=>v7(Ge(),document.activeElement)});},he=Ue=>{tt(false),Ze&&(M==="tags"?B(Ze,{source:"submit"}):M==="multiple"&&B("",{source:"blur"})),Ce(),T||Se?.(Ue);},Ie=(Ue,...ct)=>{const{target:Rt}=Ue;qe.current?.getPopupElement()?.contains(Rt)&&_e&&_e(true),je?.(Ue,...ct),ve.current=true,CR(()=>{ve.current=false;});},[,we]=f.useState({});function Le(){we({});}let Xe;rt.root&&(Xe=Ue=>{_e(Ue);});const it=f.useMemo(()=>({...e,notFoundContent:S,open:Ke,triggerOpen:Ke,id:n,showSearch:l,multiple:be,toggleOpen:_e,showScrollBar:d,styles:i,classNames:a,lockOptions:ke}),[e,S,_e,n,l,be,Ke,d,i,a,ke]),mt=f.useMemo(()=>{const Ue=D??z;return typeof Ue=="function"?Ue({searchValue:Ze,open:Ke,focused:We,showSearch:l,loading:R}):Ue},[D,z,Ze,Ke,We,l,R]),wt=()=>{C?.(),Re.current?.focus(),b([],{type:"clear",values:g}),At("",false,false);},{allowClear:Mt,clearIcon:Bt}=ise(r,g,K,Y,T,Ze,M),En=f.createElement(ee,{ref:Qe}),Ht=X(r,o,{[`${r}-focused`]:We,[`${r}-multiple`]:be,[`${r}-single`]:!be,[`${r}-allow-clear`]:Mt,[`${r}-show-arrow`]:mt!=null,[`${r}-disabled`]:T,[`${r}-loading`]:R,[`${r}-open`]:Ke,[`${r}-customize-input`]:Oe,[`${r}-show-search`]:l});let Pe=f.createElement(Pse,fE({},fe,{ref:Re,prefixCls:r,className:Ht,focused:We,prefix:Q,suffix:mt,clearIcon:Bt,multiple:be,mode:M,displayValues:g,placeholder:$,searchValue:Ze,activeValue:L,onSearch:At,onSearchSubmit:dt,onInputBlur:He,onFocus:Te,onBlur:he,onClearMouseDown:wt,onKeyDown:gt,onKeyUp:ft,onSelectorRemove:st,tokenWithEnter:lt,onMouseDown:Ie,components:rt}));return Pe=f.createElement(use,{ref:qe,disabled:T,prefixCls:r,visible:Ke,popupElement:En,animation:J,transitionName:te,popupStyle:ne,popupClassName:se,direction:m,popupMatchSelectWidth:ae,popupRender:re,popupAlign:de,placement:ge,builtinPlacements:ie,getPopupContainer:Ee,empty:y,onPopupVisibleChange:Xe,onPopupMouseEnter:Le,onPopupMouseDown:Ie,onPopupBlur:Ce},Pe),f.createElement(g7.Provider,{value:it},f.createElement(mse,{visible:We&&!Ke,values:g}),Pe)}),wR=()=>null;wR.isSelectOptGroup=true;const $R=()=>null;$R.isSelectOption=true;const M7=f.forwardRef(({height:e,offsetY:t,offsetX:n,children:r,prefixCls:o,onInnerResize:i,innerProps:a,rtl:l,extra:u},d)=>{let m={},p={display:"flex",flexDirection:"column"};return t!==void 0&&(m={height:e,position:"relative",overflow:"hidden"},p={...p,transform:`translateY(${t}px)`,[l?"marginRight":"marginLeft"]:-n,position:"absolute",left:0,right:0,top:0}),f.createElement("div",{style:m},f.createElement(ha,{onResize:({offsetHeight:g})=>{g&&i&&i();}},f.createElement("div",ir({style:p,className:X({[`${o}-holder-inner`]:o}),ref:d},a),r,u)))});M7.displayName="Filler";function Dse({children:e,setRef:t}){const n=f.useCallback(r=>{t(r);},[]);return f.cloneElement(e,{ref:n})}function _se(e,t,n,r,o,i,a,{getKey:l}){return e.slice(t,n+1).map((u,d)=>{const m=t+d,p=a(u,m,{style:{width:r},offsetX:o}),g=l(u);return f.createElement(Dse,{key:g,setRef:b=>i(u,b)},p)})}function Lse(e,t,n){const r=e.length,o=t.length;let i,a;if(r===0&&o===0)return null;r<o?(i=e,a=t):(i=t,a=e);const l={__EMPTY_ITEM__:true};function u(p){return p!==void 0?n(p):l}let d=null,m=Math.abs(r-o)!==1;for(let p=0;p<a.length;p+=1){const g=u(i[p]),b=u(a[p]);if(g!==b){d=p,m=m||g!==u(a[p+1]);break}}return d===null?null:{index:d,multiple:m}}function zse(e,t,n){const[r,o]=f.useState(e),[i,a]=f.useState(null);return f.useEffect(()=>{const l=Lse(r||[],e||[],t);l?.index!==void 0&&a(e[l.index]),o(e);},[e]),[i]}const $O=typeof navigator=="object"&&/Firefox/i.test(navigator.userAgent),R7=((e,t,n,r)=>{const o=f.useRef(false),i=f.useRef(null);function a(){clearTimeout(i.current),o.current=true,i.current=setTimeout(()=>{o.current=false;},50);}const l=f.useRef({top:e,bottom:t,left:n,right:r});return l.current.top=e,l.current.bottom=t,l.current.left=n,l.current.right=r,(u,d,m=false)=>{const p=u?d<0&&l.current.left||d>0&&l.current.right:d<0&&l.current.top||d>0&&l.current.bottom;return m&&p?(clearTimeout(i.current),o.current=false):(!p||o.current)&&a(),!o.current&&p}});function Bse(e,t,n,r,o,i,a){const l=f.useRef(0),u=f.useRef(null),d=f.useRef(null),m=f.useRef(false),p=R7(t,n,r,o);function g($,M){if(Lt.cancel(u.current),p(false,M))return;const T=$;if(!T._virtualHandled)T._virtualHandled=true;else return;l.current+=M,d.current=M,$O||T.preventDefault(),u.current=Lt(()=>{const R=m.current?10:1;a(l.current*R,false),l.current=0;});}function b($,M){a(M,true),$O||$.preventDefault();}const y=f.useRef(null),S=f.useRef(null);function C($){if(!e)return;Lt.cancel(S.current),S.current=Lt(()=>{y.current=null;},2);const{deltaX:M,deltaY:T,shiftKey:R}=$;let I=M,N=T;(y.current==="sx"||!y.current&&R&&T&&!M)&&(I=T,N=0,y.current="sx");const P=Math.abs(I),O=Math.abs(N);y.current===null&&(y.current=i&&P>O?"x":"y"),y.current==="y"?g($,N):b($,I);}function w($){e&&(m.current=$.detail===d.current);}return [C,w]}function kse(e,t,n,r){const[o,i]=f.useMemo(()=>[new Map,[]],[e,n.id,r]);return (l,u=l)=>{let d=o.get(l),m=o.get(u);if(d===void 0||m===void 0){const p=e.length;for(let g=i.length;g<p;g+=1){const b=e[g],y=t(b);o.set(y,g);const S=n.get(y)??r;if(i[g]=(i[g-1]||0)+S,y===l&&(d=g),y===u&&(m=g),d!==void 0&&m!==void 0)break}}return {top:i[d-1]||0,bottom:i[m]}}}class Fse{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 EO(e){const t=parseFloat(e);return isNaN(t)?0:t}function Hse(e,t,n){const[r,o]=f.useState(0),i=f.useRef(new Map),a=f.useRef(new Fse),l=f.useRef(0);function u(){l.current+=1;}function d(p=false){u();const g=()=>{let b=false;i.current.forEach((y,S)=>{if(y&&y.offsetParent){const{offsetHeight:C}=y,{marginTop:w,marginBottom:$}=getComputedStyle(y),M=EO(w),T=EO($),R=C+M+T;a.current.get(S)!==R&&(a.current.set(S,R),b=true);}}),b&&o(y=>y+1);};if(p)g();else {l.current+=1;const b=l.current;Promise.resolve().then(()=>{b===l.current&&g();});}}function m(p,g){const b=e(p);i.current.get(b),g?(i.current.set(b,g),d()):i.current.delete(b);}return f.useEffect(()=>u,[]),[m,d,a.current,r]}const MO=14/15;function Vse(e,t,n){const r=f.useRef(false),o=f.useRef(0),i=f.useRef(0),a=f.useRef(null),l=f.useRef(null);let u;const d=g=>{if(r.current){const b=Math.ceil(g.touches[0].pageX),y=Math.ceil(g.touches[0].pageY);let S=o.current-b,C=i.current-y;const w=Math.abs(S)>Math.abs(C);w?o.current=b:i.current=y;const $=n(w,w?S:C,false,g);$&&g.preventDefault(),clearInterval(l.current),$&&(l.current=setInterval(()=>{w?S*=MO:C*=MO;const M=Math.floor(w?S:C);(!n(w,M,true)||Math.abs(M)<=.1)&&clearInterval(l.current);},16));}},m=()=>{r.current=false,u();},p=g=>{u(),g.touches.length===1&&!r.current&&(r.current=true,o.current=Math.ceil(g.touches[0].pageX),i.current=Math.ceil(g.touches[0].pageY),a.current=g.target,a.current.addEventListener("touchmove",d,{passive:false}),a.current.addEventListener("touchend",m,{passive:true}));};u=()=>{a.current&&(a.current.removeEventListener("touchmove",d),a.current.removeEventListener("touchend",m));},An(()=>(e&&t.current.addEventListener("touchstart",p,{passive:true}),()=>{t.current?.removeEventListener("touchstart",p),u(),clearInterval(l.current);}),[e]);}function RO(e){return Math.floor(e**.5)}function hE(e,t){return ("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}function jse(e,t,n){f.useEffect(()=>{const r=t.current;if(e&&r){let o=false,i,a;const l=()=>{Lt.cancel(i);},u=()=>{l(),i=Lt(()=>{n(a),u();});},d=()=>{o=false,l();},m=g=>{if(g.target.draggable||g.button!==0)return;const b=g;b._virtualHandled||(b._virtualHandled=true,o=true);},p=g=>{if(o){const b=hE(g,false),{top:y,bottom:S}=r.getBoundingClientRect();if(b<=y){const C=y-b;a=-RO(C),u();}else if(b>=S){const C=b-S;a=RO(C),u();}else l();}};return r.addEventListener("mousedown",m),r.ownerDocument.addEventListener("mouseup",d),r.ownerDocument.addEventListener("mousemove",p),r.ownerDocument.addEventListener("dragend",d),()=>{r.removeEventListener("mousedown",m),r.ownerDocument.removeEventListener("mouseup",d),r.ownerDocument.removeEventListener("mousemove",p),r.ownerDocument.removeEventListener("dragend",d),l();}}},[e]);}const Use=10;function qse(e,t,n,r,o,i,a,l){const u=f.useRef(),[d,m]=f.useState(null);return An(()=>{if(d&&d.times<Use){if(!e.current){m(M=>({...M}));return}i();const{targetAlign:p,originAlign:g,index:b,offset:y}=d,S=e.current.clientHeight;let C=false,w=p,$=null;if(S){const M=p||g;let T=0,R=0,I=0;const N=Math.min(t.length-1,b);for(let O=0;O<=N;O+=1){const _=o(t[O]);R=T;const L=n.get(_);I=R+(L===void 0?r:L),T=I;}let P=M==="top"?y:S-y;for(let O=N;O>=0;O-=1){const _=o(t[O]),L=n.get(_);if(L===void 0){C=true;break}if(P-=L,P<=0)break}switch(M){case "top":$=R-y;break;case "bottom":$=I-S+y;break;default:{const{scrollTop:O}=e.current,_=O+S;R<O?w="top":I>_&&(w="bottom");}}$!==null&&a($),$!==d.lastTop&&(C=true);}C&&m({...d,times:d.times+1,targetAlign:w,lastTop:$});}},[d,e.current]),p=>{if(p==null){l();return}if(Lt.cancel(u.current),typeof p=="number")a(p);else if(p&&typeof p=="object"){let g;const{align:b}=p;"index"in p?{index:g}=p:g=t.findIndex(S=>o(S)===p.key);const{offset:y=0}=p;m({times:0,index:g,offset:y,originAlign:b});}}}const TO=f.forwardRef((e,t)=>{const{prefixCls:n,rtl:r,scrollOffset:o,scrollRange:i,onStartMove:a,onStopMove:l,onScroll:u,horizontal:d,spinSize:m,containerSize:p,style:g,thumbStyle:b,showScrollBar:y}=e,[S,C]=f.useState(false),[w,$]=f.useState(null),[M,T]=f.useState(null),R=!r,I=f.useRef(),N=f.useRef(),[P,O]=f.useState(y),_=f.useRef(),L=()=>{y===true||y===false||(clearTimeout(_.current),O(true),_.current=setTimeout(()=>{O(false);},3e3));},j=i-p||0,U=p-m||0,q=f.useMemo(()=>o===0||j===0?0:o/j*U,[o,j,U]),V=Y=>{Y.stopPropagation(),Y.preventDefault();},B=f.useRef({top:q,dragging:S,pageY:w,startTop:M});B.current={top:q,dragging:S,pageY:w,startTop:M};const F=Y=>{C(true),$(hE(Y,d)),T(B.current.top),a(),Y.stopPropagation(),Y.preventDefault();};f.useEffect(()=>{const Y=te=>{te.preventDefault();},ee=I.current,J=N.current;return ee.addEventListener("touchstart",Y,{passive:false}),J.addEventListener("touchstart",F,{passive:false}),()=>{ee.removeEventListener("touchstart",Y),J.removeEventListener("touchstart",F);}},[]);const W=f.useRef();W.current=j;const K=f.useRef();K.current=U,f.useEffect(()=>{if(S){let Y;const ee=te=>{const{dragging:ne,pageY:se,startTop:ae}=B.current;Lt.cancel(Y);const re=I.current.getBoundingClientRect(),de=p/(d?re.width:re.height);if(ne){const ge=(hE(te,d)-se)*de;let ie=ae;!R&&d?ie-=ge:ie+=ge;const Ee=W.current,le=K.current,ue=le?ie/le:0;let Se=Math.ceil(ue*Ee);Se=Math.max(Se,0),Se=Math.min(Se,Ee),Y=Lt(()=>{u(Se,d);});}},J=()=>{C(false),l();};return window.addEventListener("mousemove",ee,{passive:true}),window.addEventListener("touchmove",ee,{passive:true}),window.addEventListener("mouseup",J,{passive:true}),window.addEventListener("touchend",J,{passive:true}),()=>{window.removeEventListener("mousemove",ee),window.removeEventListener("touchmove",ee),window.removeEventListener("mouseup",J),window.removeEventListener("touchend",J),Lt.cancel(Y);}}},[S]),f.useEffect(()=>(L(),()=>{clearTimeout(_.current);}),[o]),f.useImperativeHandle(t,()=>({delayHidden:L}));const Q=`${n}-scrollbar`,D={position:"absolute",visibility:P?null:"hidden"},z={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return d?(Object.assign(D,{height:8,left:0,right:0,bottom:0}),Object.assign(z,{height:"100%",width:m,[R?"left":"right"]:q})):(Object.assign(D,{width:8,top:0,bottom:0,[R?"right":"left"]:0}),Object.assign(z,{width:"100%",height:m,top:q})),f.createElement("div",{ref:I,className:X(Q,{[`${Q}-horizontal`]:d,[`${Q}-vertical`]:!d,[`${Q}-visible`]:P}),style:{...D,...g},onMouseDown:V,onMouseMove:L},f.createElement("div",{ref:N,className:X(`${Q}-thumb`,{[`${Q}-thumb-moving`]:S}),style:{...z,...b},onMouseDown:F}))}),Wse=20;function AO(e=0,t=0){let n=e/t*e;return isNaN(n)&&(n=0),n=Math.max(n,Wse),Math.floor(n)}const Gse=[],Kse={overflowY:"auto",overflowAnchor:"none"};function Yse(e,t){const{prefixCls:n="rc-virtual-list",className:r,height:o,itemHeight:i,fullHeight:a=true,style:l,data:u,children:d,itemKey:m,virtual:p,direction:g,scrollWidth:b,component:y="div",onScroll:S,onVirtualScroll:C,onVisibleChange:w,innerProps:$,extraRender:M,styles:T,showScrollBar:R="optional",...I}=e,N=f.useCallback(Ce=>typeof m=="function"?m(Ce):Ce?.[m],[m]),[P,O,_,L]=Hse(N),j=!!(p!==false&&o&&i),U=f.useMemo(()=>Object.values(_.maps).reduce((Ce,he)=>Ce+he,0),[_.id,_.maps]),q=j&&u&&(Math.max(i*u.length,U)>o||!!b),V=g==="rtl",B=X(n,{[`${n}-rtl`]:V},r),F=u||Gse,W=f.useRef(),K=f.useRef(),Q=f.useRef(),[D,z]=f.useState(0),[Y,ee]=f.useState(0),[J,te]=f.useState(false),ne=()=>{te(true);},se=()=>{te(false);},ae={getKey:N};function re(Ce){z(he=>{let Ie;typeof Ce=="function"?Ie=Ce(he):Ie=Ce;const we=We(Ie);return W.current.scrollTop=we,we});}const de=f.useRef({start:0,end:F.length}),ge=f.useRef(),[ie]=zse(F,N);ge.current=ie;const{scrollHeight:Ee,start:le,end:ue,offset:Se}=f.useMemo(()=>{if(!j)return {scrollHeight:void 0,start:0,end:F.length-1,offset:void 0};if(!q)return {scrollHeight:K.current?.offsetHeight||0,start:0,end:F.length-1,offset:void 0};let Ce=0,he,Ie,we;const Le=F.length;for(let Xe=0;Xe<Le;Xe+=1){const it=F[Xe],mt=N(it),wt=_.get(mt),Mt=Ce+(wt===void 0?i:wt);Mt>=D&&he===void 0&&(he=Xe,Ie=Ce),Mt>D+o&&we===void 0&&(we=Xe),Ce=Mt;}return he===void 0&&(he=0,Ie=0,we=Math.ceil(o/i)),we===void 0&&(we=F.length-1),we=Math.min(we+1,F.length-1),{scrollHeight:Ce,start:he,end:we,offset:Ie}},[q,j,D,F,L,o]);de.current.start=le,de.current.end=ue,f.useLayoutEffect(()=>{const Ce=_.getRecord();if(Ce.size===1){const he=Array.from(Ce.keys())[0],Ie=Ce.get(he),we=F[le];if(we&&Ie===void 0&&N(we)===he){const it=_.get(he)-i;re(mt=>mt+it);}}_.resetRecord();},[Ee]);const[ye,Be]=f.useState({width:0,height:o}),je=Ce=>{Be({width:Ce.offsetWidth,height:Ce.offsetHeight});},Ne=f.useRef(),fe=f.useRef(),be=f.useMemo(()=>AO(ye.width,b),[ye.width,b]),Re=f.useMemo(()=>AO(ye.height,Ee),[ye.height,Ee]),qe=Ee-o,Qe=f.useRef(qe);Qe.current=qe;function We(Ce){let he=Ce;return Number.isNaN(Qe.current)||(he=Math.min(he,Qe.current)),he=Math.max(he,0),he}const tt=D<=0,rt=D>=qe,Ze=Y<=0,Oe=Y>=b,Ye=R7(tt,rt,Ze,Oe),Ke=()=>({x:V?-Y:Y,y:D}),_e=f.useRef(Ke()),ke=Et(Ce=>{if(C){const he={...Ke(),...Ce};(_e.current.x!==he.x||_e.current.y!==he.y)&&(C(he),_e.current=he);}});function lt(Ce,he){const Ie=Ce;he?(Eo.flushSync(()=>{ee(Ie);}),ke()):re(Ie);}function At(Ce){const{scrollTop:he}=Ce.currentTarget;he!==D&&re(he),S?.(Ce),ke();}const dt=Ce=>{let he=Ce;const Ie=b?b-ye.width:0;return he=Math.max(he,0),he=Math.min(he,Ie),he},Dt=Et((Ce,he)=>{he?(Eo.flushSync(()=>{ee(Ie=>{const we=Ie+(V?-Ce:Ce);return dt(we)});}),ke()):re(Ie=>Ie+Ce);}),[Tt,xt]=Bse(j,tt,rt,Ze,Oe,!!b,Dt);Vse(j,W,(Ce,he,Ie,we)=>{const Le=we;return Ye(Ce,he,Ie)?false:!Le||!Le._virtualHandled?(Le&&(Le._virtualHandled=true),Tt({preventDefault(){},deltaX:Ce?he:0,deltaY:Ce?0:he}),true):false}),jse(q,W,Ce=>{re(he=>he+Ce);}),An(()=>{function Ce(Ie){const we=tt&&Ie.detail<0,Le=rt&&Ie.detail>0;j&&!we&&!Le&&Ie.preventDefault();}const he=W.current;return he.addEventListener("wheel",Tt,{passive:false}),he.addEventListener("DOMMouseScroll",xt,{passive:true}),he.addEventListener("MozMousePixelScroll",Ce,{passive:false}),()=>{he.removeEventListener("wheel",Tt),he.removeEventListener("DOMMouseScroll",xt),he.removeEventListener("MozMousePixelScroll",Ce);}},[j,tt,rt]),An(()=>{if(b){const Ce=dt(Y);ee(Ce),ke({x:Ce});}},[ye.width,b]);const gt=()=>{Ne.current?.delayHidden(),fe.current?.delayHidden();},ft=qse(W,F,_,i,N,()=>O(true),re,gt);f.useImperativeHandle(t,()=>({nativeElement:Q.current,getScrollInfo:Ke,scrollTo:Ce=>{function he(Ie){return Ie&&typeof Ie=="object"&&("left"in Ie||"top"in Ie)}he(Ce)?(Ce.left!==void 0&&ee(dt(Ce.left)),ft(Ce.top)):ft(Ce);}})),An(()=>{if(w){const Ce=F.slice(le,ue+1);w(Ce,F);}},[le,ue,F]);const st=kse(F,N,_,i),He=M?.({start:le,end:ue,virtual:q,offsetX:Y,offsetY:Se,rtl:V,getSize:st}),Ge=_se(F,le,ue,b,Y,P,d,ae);let ve=null;o&&(ve={[a?"height":"maxHeight"]:o,...Kse},j&&(ve.overflowY="hidden",b&&(ve.overflowX="hidden"),J&&(ve.pointerEvents="none")));const Te={};return V&&(Te.dir="rtl"),f.createElement("div",ir({ref:Q,style:{...l,position:"relative"},className:B},Te,I),f.createElement(ha,{onResize:je},f.createElement(y,{className:`${n}-holder`,style:ve,ref:W,onScroll:At,onMouseEnter:gt},f.createElement(M7,{prefixCls:n,height:Ee,offsetX:Y,offsetY:Se,scrollWidth:b,onInnerResize:O,ref:K,innerProps:$,rtl:V,extra:He},Ge))),q&&Ee>o&&f.createElement(TO,{ref:Ne,prefixCls:n,scrollOffset:D,scrollRange:Ee,rtl:V,onScroll:lt,onStartMove:ne,onStopMove:se,spinSize:Re,containerSize:ye.height,style:T?.verticalScrollBar,thumbStyle:T?.verticalScrollBarThumb,showScrollBar:R}),q&&b>ye.width&&f.createElement(TO,{ref:fe,prefixCls:n,scrollOffset:Y,scrollRange:b,rtl:V,onScroll:lt,onStartMove:ne,onStopMove:se,spinSize:be,containerSize:ye.width,horizontal:true,style:T?.horizontalScrollBar,thumbStyle:T?.horizontalScrollBarThumb,showScrollBar:R}))}const T7=f.forwardRef(Yse);T7.displayName="List";function Xse(){return /(mac\sos|macintosh)/i.test(navigator.appVersion)}function Oh(){return Oh=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},Oh.apply(this,arguments)}function NO(e){return typeof e=="string"||typeof e=="number"}const Qse=(e,t)=>{const{prefixCls:n,id:r,open:o,multiple:i,mode:a,searchValue:l,toggleOpen:u,notFoundContent:d,onPopupScroll:m,showScrollBar:p,lockOptions:g}=wu(),{maxCount:b,flattenOptions:y,onActiveValue:S,defaultActiveFirstOption:C,onSelect:w,menuItemSelectedIcon:$,rawValues:M,fieldNames:T,virtual:R,direction:I,listHeight:N,listItemHeight:P,optionRender:O,classNames:_,styles:L}=f.useContext(xR),j=`${n}-item`,U=Mf(()=>y,[o,g],(re,de)=>de[0]&&!de[1]),q=f.useRef(null),V=f.useMemo(()=>i&&sE(b)&&M?.size>=b,[i,b,M?.size]),B=re=>{re.preventDefault();},F=re=>{q.current?.scrollTo(typeof re=="number"?{index:re}:re);},W=f.useCallback(re=>a==="combobox"?false:M.has(re),[a,[...M].toString(),M.size]),K=(re,de=1)=>{const ge=U.length;for(let ie=0;ie<ge;ie+=1){const Ee=(re+ie*de+ge)%ge,{group:le,data:ue}=U[Ee]||{};if(!le&&!ue?.disabled&&(W(ue.value)||!V))return Ee}return -1},[Q,D]=f.useState(()=>K(0)),z=(re,de=false)=>{D(re);const ge={source:de?"keyboard":"mouse"},ie=U[re];if(!ie){S(null,-1,ge);return}S(ie.value,re,ge);};f.useEffect(()=>{z(C!==false?K(0):-1);},[U.length,l]);const Y=f.useCallback(re=>a==="combobox"?String(re).toLowerCase()===l.toLowerCase():M.has(re),[a,l,[...M].toString(),M.size]);f.useEffect(()=>{let re;if(!i&&o&&M.size===1){const de=Array.from(M)[0],ge=U.findIndex(({data:ie})=>l?String(ie.value).startsWith(l):ie.value===de);ge!==-1&&(z(ge),re=setTimeout(()=>{F(ge);}));}return o&&q.current?.scrollTo(void 0),()=>clearTimeout(re)},[o,l]);const ee=re=>{re!==void 0&&w(re,{selected:!M.has(re)}),i||u(false);};if(f.useImperativeHandle(t,()=>({onKeyDown:re=>{const{which:de,ctrlKey:ge}=re;switch(de){case ot.N:case ot.P:case ot.UP:case ot.DOWN:{let ie=0;if(de===ot.UP?ie=-1:de===ot.DOWN?ie=1:Xse()&&ge&&(de===ot.N?ie=1:de===ot.P&&(ie=-1)),ie!==0){const Ee=K(Q+ie,ie);F(Ee),z(Ee,true);}break}case ot.TAB:case ot.ENTER:{const ie=U[Q];if(!ie||ie.data.disabled)return ee(void 0);!V||M.has(ie.value)?ee(ie.value):ee(void 0),o&&re.preventDefault();break}case ot.ESC:u(false),o&&re.stopPropagation();}},onKeyUp:()=>{},scrollTo:re=>{F(re);}})),U.length===0)return f.createElement("div",{role:"listbox",id:`${r}_list`,className:`${j}-empty`,onMouseDown:B},d);const J=Object.keys(T).map(re=>T[re]),te=re=>re.label;function ne(re,de){const{group:ge}=re;return {role:ge?"presentation":"option",id:`${r}_list_${de}`}}const se=re=>{const de=U[re];if(!de)return null;const ge=de.data||{},{value:ie}=ge,{group:Ee}=de,le=bo(ge,true),ue=te(de);return de?f.createElement("div",Oh({"aria-label":typeof ue=="string"&&!Ee?ue:null},le,{key:re},ne(de,re),{"aria-selected":Y(ie)}),ie):null},ae={role:"listbox",id:`${r}_list`};return f.createElement(f.Fragment,null,R&&f.createElement("div",Oh({},ae,{style:{height:0,width:0,overflow:"hidden"}}),se(Q-1),se(Q),se(Q+1)),f.createElement(T7,{itemKey:"key",ref:q,data:U,height:N,itemHeight:P,fullHeight:false,onMouseDown:B,onScroll:m,virtual:R,direction:I,innerProps:R?null:ae,showScrollBar:p,className:_?.popup?.list,style:L?.popup?.list},(re,de)=>{const{group:ge,groupOption:ie,data:Ee,label:le,value:ue}=re,{key:Se}=Ee;if(ge){const Ke=Ee.title??(NO(le)?le.toString():void 0);return f.createElement("div",{className:X(j,`${j}-group`,Ee.className),title:Ke},le!==void 0?le:Se)}const{disabled:ye,title:Be,children:je,style:Ne,className:fe,...be}=Ee,Re=Bn(be,J),qe=W(ue),Qe=ye||!qe&&V,We=`${j}-option`,tt=X(j,We,fe,_?.popup?.listItem,{[`${We}-grouped`]:ie,[`${We}-active`]:Q===de&&!Qe,[`${We}-disabled`]:Qe,[`${We}-selected`]:qe}),rt=te(re),Ze=!$||typeof $=="function"||qe,Oe=typeof rt=="number"?rt:rt||ue;let Ye=NO(Oe)?Oe.toString():void 0;return Be!==void 0&&(Ye=Be),f.createElement("div",Oh({},bo(Re),R?{}:ne(re,de),{"aria-selected":R?void 0:Y(ue),className:tt,title:Ye,onMouseMove:()=>{Q===de||Qe||z(de);},onClick:()=>{Qe||ee(ue);},style:{...L?.popup?.listItem,...Ne}}),f.createElement("div",{className:`${We}-content`},typeof O=="function"?O(re,{index:de}):Oe),f.isValidElement($)||qe,Ze&&f.createElement(E7,{className:`${j}-option-state`,customizeIcon:$,customizeIconProps:{value:ue,disabled:Qe,isSelected:qe}},qe?"✓":null))}))},Zse=f.forwardRef(Qse),Jse=((e,t)=>{const n=f.useRef({values:new Map,options:new Map}),r=f.useMemo(()=>{const{values:i,options:a}=n.current,l=e.map(m=>m.label===void 0?{...m,label:i.get(m.value)?.label}:m),u=new Map,d=new Map;return l.forEach(m=>{u.set(m.value,m),d.set(m.value,t.get(m.value)||a.get(m.value));}),n.current.values=u,n.current.options=d,l},[e,t]),o=f.useCallback(i=>t.get(i)||n.current.options.get(i),[t]);return [r,o]});function Qx(e,t){return x7(e).join("").toUpperCase().includes(t)}const ele=((e,t,n,r,o)=>f.useMemo(()=>{if(!n||r===false)return e;const{options:i,label:a,value:l}=t,u=[],d=typeof r=="function",m=n.toUpperCase(),p=d?r:(b,y)=>o&&o.length?o.some(S=>Qx(y[S],m)):y[i]?Qx(y[a!=="children"?a:"label"],m):Qx(y[l],m),g=d?b=>lE(b):b=>b;return e.forEach(b=>{if(b[i]){if(p(n,g(b)))u.push(b);else {const S=b[i].filter(C=>p(n,g(C)));S.length&&u.push({...b,[i]:S});}return}p(n,g(b))&&u.push(b);}),u},[e,r,o,n,t]));function tle(e){const{key:t,props:{children:n,value:r,...o}}=e;return {key:t,value:r!==void 0?r:t,children:n,...o}}function A7(e,t=false){return Qo(e).map((n,r)=>{if(!f.isValidElement(n)||!n.type)return null;const{type:{isSelectOptGroup:o},key:i,props:{children:a,...l}}=n;return t||!o?tle(n):{key:`__RC_SELECT_GRP__${i===null?r:i}__`,label:i,...l,options:A7(a)}}).filter(n=>n)}const nle=(e,t,n,r,o)=>f.useMemo(()=>{let i=e;!e&&(i=A7(t));const l=new Map,u=new Map,d=(p,g,b)=>{b&&typeof b=="string"&&p.set(g[b],g);},m=(p,g=false)=>{for(let b=0;b<p.length;b+=1){const y=p[b];!y[n.options]||g?(l.set(y[n.value],y),d(u,y,n.label),r.forEach(S=>{d(u,y,S);}),d(u,y,o)):m(y[n.options],true);}};return m(i),{options:i,valueOptions:l,labelOptions:u}},[e,t,n,r,o]);function PO(e){const t=f.useRef();return t.current=e,f.useCallback((...r)=>t.current(...r),[])}function rle(e,t,n){const{filterOption:r,searchValue:o,optionFilterProp:i,filterSort:a,onSearch:l,autoClearSearchValue:u}=t;return f.useMemo(()=>{const d=typeof e=="object",m={filterOption:r,searchValue:o,optionFilterProp:i,filterSort:a,onSearch:l,autoClearSearchValue:u,...d?e:{}};return [d||n==="combobox"||n==="tags"||n==="multiple"&&e===void 0?true:e,m]},[n,e,r,o,i,a,l,u])}function pE(){return pE=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},pE.apply(this,arguments)}const ole=["inputValue"];function ile(e){return !e||typeof e!="object"}const ale=f.forwardRef((e,t)=>{const{id:n,mode:r,prefixCls:o="rc-select",backfill:i,fieldNames:a,showSearch:l,searchValue:u,onSearch:d,autoClearSearchValue:m,filterOption:p,optionFilterProp:g,filterSort:b,onSelect:y,onDeselect:S,onActive:C,popupMatchSelectWidth:w=true,optionLabelProp:$,options:M,optionRender:T,children:R,defaultActiveFirstOption:I,menuItemSelectedIcon:N,virtual:P,direction:O,listHeight:_=200,listItemHeight:L=20,labelRender:j,value:U,defaultValue:q,labelInValue:V,onChange:B,maxCount:F,classNames:W,styles:K,...Q}=e,D={searchValue:u,onSearch:d,autoClearSearchValue:m,filterOption:p,optionFilterProp:g,filterSort:b},[z,Y]=rle(l,D,r),{filterOption:ee,searchValue:J,optionFilterProp:te,filterSort:ne,onSearch:se,autoClearSearchValue:ae=true}=Y,re=f.useMemo(()=>te?Array.isArray(te)?te:[te]:[],[te]),de=Ql(n),ge=mE(r),ie=!!(!M&&R),Ee=f.useMemo(()=>ee===void 0&&r==="combobox"?false:ee,[ee,r]),le=f.useMemo(()=>b7(a,ie),[JSON.stringify(a),ie]),[ue,Se]=hn("",J),ye=ue||"",Be=nle(M,R,le,re,$),{valueOptions:je,labelOptions:Ne,options:fe}=Be,be=f.useCallback(we=>x7(we).map(Xe=>{let it,mt,wt,Mt;ile(Xe)?it=Xe:(mt=Xe.label,it=Xe.value);const Bt=je.get(it);return Bt&&(mt===void 0&&(mt=Bt?.[$||le.label]),wt=Bt?.disabled,Mt=Bt?.title),{label:mt,value:it,key:it,disabled:wt,title:Mt}}),[le,$,je]),[Re,qe]=hn(q,U),Qe=f.useMemo(()=>{const Le=be(ge&&Re===null?[]:Re);return r==="combobox"&&vse(Le[0]?.value)?[]:Le},[Re,be,r,ge]),[We,tt]=Jse(Qe,je),rt=f.useMemo(()=>{if(!r&&We.length===1){const we=We[0];if(we.value===null&&(we.label===null||we.label===void 0))return []}return We.map(we=>({...we,label:(typeof j=="function"?j(we):we.label)??we.value}))},[r,We,j]),Ze=f.useMemo(()=>new Set(We.map(we=>we.value)),[We]);f.useEffect(()=>{if(r==="combobox"){const we=We[0]?.value;Se(gse(we)?String(we):"");}},[We]);const Oe=PO((we,Le)=>{const Xe=Le??we;return {[le.value]:we,[le.label]:Xe}}),Ye=f.useMemo(()=>{if(r!=="tags")return fe;const we=[...fe],Le=Xe=>je.has(Xe);return [...We].sort((Xe,it)=>Xe.value<it.value?-1:1).forEach(Xe=>{const it=Xe.value;Le(it)||we.push(Oe(it,Xe.label));}),we},[Oe,fe,je,We,r]),Ke=ele(Ye,le,ye,Ee,re),_e=f.useMemo(()=>{const we=Le=>re.length?re.some(Xe=>Le?.[Xe]===ye):Le?.value===ye;return r!=="tags"||!ye||Ke.some(Le=>we(Le))||Ke.some(Le=>Le[le.value]===ye)?Ke:[Oe(ye),...Ke]},[Oe,re,r,Ke,ye,le]),ke=we=>[...we].sort((Xe,it)=>ne(Xe,it,{searchValue:ye})).map(Xe=>Array.isArray(Xe.options)?{...Xe,options:Xe.options.length>0?ke(Xe.options):Xe.options}:Xe),lt=f.useMemo(()=>ne?ke(_e):_e,[_e,ne,ye]),At=f.useMemo(()=>dse(lt,{fieldNames:le,childrenAsData:ie}),[lt,le,ie]),dt=we=>{const Le=be(we);if(qe(Le),B&&(Le.length!==We.length||Le.some((Xe,it)=>We[it]?.value!==Xe?.value))){const Xe=V?Le.map(({label:mt,value:wt})=>({label:mt,value:wt})):Le.map(mt=>mt.value),it=Le.map(mt=>lE(tt(mt.value)));B(ge?Xe:Xe[0],ge?it:it[0]);}},[Dt,Tt]=f.useState(null),[xt,gt]=f.useState(0),ft=I!==void 0?I:r!=="combobox",st=f.useRef(),He=f.useCallback((we,Le,{source:Xe="keyboard"}={})=>{gt(Le),i&&r==="combobox"&&we!==null&&Xe==="keyboard"&&Tt(String(we));const it=Promise.resolve().then(()=>{st.current===it&&C?.(we);});st.current=it;},[i,r,C]),Ge=(we,Le,Xe)=>{const it=()=>{const mt=tt(we);return [V?{label:mt?.[le.label],value:we}:we,lE(mt)]};if(Le&&y){const[mt,wt]=it();y(mt,wt);}else if(!Le&&S&&Xe!=="clear"){const[mt,wt]=it();S(mt,wt);}},ve=PO((we,Le)=>{let Xe;const it=ge?Le.selected:true;it?Xe=ge?[...We,we]:[we]:Xe=We.filter(mt=>mt.value!==we),dt(Xe),Ge(we,it),r==="combobox"?Tt(""):(!mE||ae)&&(Se(""),Tt(""));}),Te=(we,Le)=>{dt(we);const{type:Xe,values:it}=Le;(Xe==="remove"||Xe==="clear")&&it.forEach(mt=>{Ge(mt.value,false,Xe);});},Ce=(we,Le)=>{if(Se(we),Tt(null),Le.source==="submit"){const Xe=(we||"").trim();if(Xe){const it=Array.from(new Set([...Ze,Xe]));dt(it),Ge(Xe,true),Se("");}return}Le.source!=="blur"&&(r==="combobox"&&dt(we),se?.(we));},he=we=>{let Le=we;r!=="tags"&&(Le=we.map(it=>Ne.get(it)?.value).filter(it=>it!==void 0));const Xe=Array.from(new Set([...Ze,...Le]));dt(Xe),Xe.forEach(it=>{Ge(it,true);});},Ie=f.useMemo(()=>({...Be,flattenOptions:At,onActiveValue:He,defaultActiveFirstOption:ft,onSelect:ve,menuItemSelectedIcon:N,rawValues:Ze,fieldNames:le,virtual:P!==false&&w!==false,direction:O,listHeight:_,listItemHeight:L,childrenAsData:ie,maxCount:F,optionRender:T,classNames:W,styles:K}),[F,Be,At,He,ft,ve,N,Ze,le,P,w,O,_,L,ie,T,W,K]);return f.createElement(xR.Provider,{value:Ie},f.createElement(Ose,pE({},Q,{id:de,prefixCls:o,ref:t,omitDomProps:ole,mode:r,classNames:W,styles:K,displayValues:rt,onDisplayValuesChange:Te,maxCount:F,direction:O,showSearch:z,searchValue:ye,onSearch:Ce,autoClearSearchValue:ae,onSearchSplit:he,popupMatchSelectWidth:w,OptionList:Zse,emptyOptions:!At.length,activeValue:Dt,activeDescendantId:`${de}_list_${xt}`})))}),ER=ale;ER.Option=$R;ER.OptGroup=wR;const Fl=(e,t,n)=>X({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:n}),If=(e,t)=>t||e,sle=()=>{const[,e]=Fr(),[t]=Oo("Empty"),r=new cn(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return f.createElement("svg",{style:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},f.createElement("title",null,t?.description||"Empty"),f.createElement("g",{fill:"none",fillRule:"evenodd"},f.createElement("g",{transform:"translate(24 31.7)"},f.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.8",cy:"106.9",rx:"67.8",ry:"12.7"}),f.createElement("path",{fill:"#aeb8c2",d:"M122 69.7 98.1 40.2a6 6 0 0 0-4.6-2.2H42.1a6 6 0 0 0-4.6 2.2l-24 29.5V85H122z"}),f.createElement("path",{fill:"#f5f5f7",d:"M33.8 0h68a4 4 0 0 1 4 4v93.3a4 4 0 0 1-4 4h-68a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4"}),f.createElement("path",{fill:"#dce0e6",d:"M42.7 10h50.2a2 2 0 0 1 2 2v25a2 2 0 0 1-2 2H42.7a2 2 0 0 1-2-2V12a2 2 0 0 1 2-2m.2 39.8h49.8a2.3 2.3 0 1 1 0 4.5H42.9a2.3 2.3 0 0 1 0-4.5m0 11.7h49.8a2.3 2.3 0 1 1 0 4.6H42.9a2.3 2.3 0 0 1 0-4.6m79 43.5a7 7 0 0 1-6.8 5.4H20.5a7 7 0 0 1-6.7-5.4l-.2-1.8V69.7h26.3c2.9 0 5.2 2.4 5.2 5.4s2.4 5.4 5.3 5.4h34.8c2.9 0 5.3-2.4 5.3-5.4s2.3-5.4 5.2-5.4H122v33.5q0 1-.2 1.8"})),f.createElement("path",{fill:"#dce0e6",d:"m149.1 33.3-6.8 2.6a1 1 0 0 1-1.3-1.2l2-6.2q-4.1-4.5-4.2-10.4c0-10 10.1-18.1 22.6-18.1S184 8.1 184 18.1s-10.1 18-22.6 18q-6.8 0-12.3-2.8"}),f.createElement("g",{fill:"#fff",transform:"translate(149.7 15.4)"},f.createElement("circle",{cx:"20.7",cy:"3.2",r:"2.8"}),f.createElement("path",{d:"M5.7 5.6H0L2.9.7zM9.3.7h5v5h-5z"}))))},lle=()=>{const[,e]=Fr(),[t]=Oo("Empty"),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:o,colorBgContainer:i}=e,{borderColor:a,shadowColor:l,contentColor:u}=f.useMemo(()=>({borderColor:new cn(n).onBackground(i).toHexString(),shadowColor:new cn(r).onBackground(i).toHexString(),contentColor:new cn(o).onBackground(i).toHexString()}),[n,r,o,i]);return f.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},f.createElement("title",null,t?.description||"Empty"),f.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},f.createElement("ellipse",{fill:l,cx:"32",cy:"33",rx:"32",ry:"7"}),f.createElement("g",{fillRule:"nonzero",stroke:a},f.createElement("path",{d:"M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"}),f.createElement("path",{d:"M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3",fill:u}))))},cle=e=>{const{componentCls:t,margin:n,marginXS:r,marginXL:o,fontSize:i,lineHeight:a}=e;return {[t]:{marginInline:r,fontSize:i,lineHeight:a,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}}}}},ule=qt("Empty",e=>{const{componentCls:t,controlHeightLG:n,calc:r}=e,o=Ft(e,{emptyImgCls:`${t}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()});return cle(o)}),N7=f.createElement(sle,null),P7=f.createElement(lle,null),Vi=e=>{const{className:t,rootClassName:n,prefixCls:r,image:o,description:i,children:a,imageStyle:l,style:u,classNames:d,styles:m,...p}=e,{getPrefixCls:g,direction:b,className:y,style:S,classNames:C,styles:w,image:$}=Gt("empty"),M=g("empty",r),[T,R]=ule(M),[I,N]=Xt([C,d],[w,m],{props:e}),[P]=Oo("Empty"),O=typeof i<"u"?i:P?.description,_=typeof O=="string"?O:"empty",L=o??$??N7;let j=null;return typeof L=="string"?j=f.createElement("img",{draggable:false,alt:_,src:L}):j=L,f.createElement("div",{className:X(T,R,M,y,{[`${M}-normal`]:L===P7,[`${M}-rtl`]:b==="rtl"},t,n,I.root),style:{...N.root,...S,...u},...p},f.createElement("div",{className:X(`${M}-image`,I.image),style:{...l,...N.image}},j),O&&f.createElement("div",{className:X(`${M}-description`,I.description),style:N.description},O),a&&f.createElement("div",{className:X(`${M}-footer`,I.footer),style:N.footer},a))};Vi.PRESENTED_IMAGE_DEFAULT=N7;Vi.PRESENTED_IMAGE_SIMPLE=P7;const I7=e=>{const{componentName:t}=e,{getPrefixCls:n}=f.useContext(Ct),r=n("empty");switch(t){case "Table":case "List":return G.createElement(Vi,{image:Vi.PRESENTED_IMAGE_SIMPLE});case "Select":case "TreeSelect":case "Cascader":case "Transfer":case "Mentions":return G.createElement(Vi,{image:Vi.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case "Table.filter":return null;default:return G.createElement(Vi,null)}},i1=(e,t,n)=>{const{variant:r,[e]:o}=f.useContext(Ct),i=f.useContext(Wie),a=o?.variant;let l;typeof t<"u"?l=t:n===false?l="borderless":l=i??a??r??"outlined";const u=pJ.includes(l);return [l,u]},dle=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 fle(e,t){return e||dle(t)}const IO=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"}},mle=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`,a=`&${t}-slide-up-leave${t}-slide-up-leave-active`,l=`${n}-dropdown-placement-`,u=`${r}-option-selected`;return [{[`${n}-dropdown`]:{...un(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}${l}bottomLeft,
${i}${l}bottomLeft
`]:{animationName:lR},[`
${o}${l}topLeft,
${i}${l}topLeft,
${o}${l}topRight,
${i}${l}topRight
`]:{animationName:uR},[`${a}${l}bottomLeft`]:{animationName:cR},[`
${a}${l}topLeft,
${a}${l}topRight
`]:{animationName:dR},"&-hidden":{display:"none"},[r]:{...IO(e),cursor:"pointer",transition:`background-color ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":{flex:"auto",...qa},"&-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":{...IO(e),color:e.colorTextDisabled}},[`${u}:has(+ ${u})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${u}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}}},Bl(e,"slide-up"),Bl(e,"slide-down"),B0(e,"move-up"),B0(e,"move-down")]},hle=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"}}}}},OO=4,ple=e=>{const{componentCls:t,calc:n,iconCls:r,paddingXS:o,paddingXXS:i,INTERNAL_FIXED_ITEM_MARGIN:a,lineWidth:l,colorIcon:u,colorIconHover:d,inputPaddingHorizontalBase:m,antCls:p}=e,[g,b]=ar(p,"select");return {"&-multiple":{[g("multi-item-background")]:e.multipleItemBg,[g("multi-item-border-color")]:"transparent",[g("multi-item-border-radius")]:e.borderRadiusSM,[g("multi-item-height")]:e.multipleItemHeight,[g("multi-padding-base")]:`calc((${b("height")} - ${b("multi-item-height")}) / 2)`,[g("multi-padding-vertical")]:`calc(${b("multi-padding-base")} - ${a} - ${l})`,[g("multi-item-padding-horizontal")]:`calc(${m} - ${b("multi-padding-vertical")} - ${l} * 2)`,paddingBlock:b("multi-padding-vertical"),paddingInlineStart:`calc(${b("multi-padding-base")} - ${l})`,[`${t}-prefix`]:{marginInlineStart:b("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:b("line-height"),insetInlineStart:b("multi-item-padding-horizontal"),width:`calc(100% - ${b("multi-item-padding-horizontal")})`,top:"50%",transform:"translateY(-50%)"},[`${t}-content`]:{flexWrap:"wrap",alignItems:"center",lineHeight:1,"&-item-prefix":{height:b("font-size")},"&-item":{lineHeight:1,maxWidth:`calc(100% - ${OO}px)`},[`${t}-content-item-prefix + ${t}-content-item-suffix,
${t}-content-item-suffix:first-child`]:{marginInlineStart:b("multi-item-padding-horizontal")},[`${t}-selection-item`]:{lineHeight:`calc(${b("multi-item-height")} - ${l} * 2)`,border:`${l} solid ${b("multi-item-border-color")}`,display:"flex",marginBlock:a,marginInlineEnd:n(a).mul(2).equal(),background:b("multi-item-background"),borderRadius:b("multi-item-border-radius"),paddingInlineStart:o,paddingInlineEnd:i,transition:["height","line-height","padding"].map(y=>`${y} ${e.motionDurationSlow}`).join(","),"&-content":{...qa,marginInlineEnd:i},"&-remove":{...Su(),display:"inline-flex",alignItems:"center",color:u,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${r}`]:{verticalAlign:"-0.2em"},"&:hover":{color:d}}},[`${t}-input`]:{lineHeight:n(a).mul(2).add(b("multi-item-height")).equal(),width:"calc(var(--select-input-width, 0) * 1px)",minWidth:OO,maxWidth:"100%",transition:`line-height ${e.motionDurationSlow}`}},[`&${t}-sm`]:{[g("multi-item-height")]:e.multipleItemHeightSM,[g("multi-item-border-radius")]:e.borderRadiusXS},[`&${t}-lg`]:{[g("multi-item-height")]:e.multipleItemHeightLG,[g("multi-item-border-radius")]:e.borderRadius},[`&${t}-filled`]:{[g("multi-item-border-color")]:e.colorSplit,[g("multi-item-background")]:e.colorBgContainer,[`&${t}-disabled`]:{[g("multi-item-border-color")]:"transparent"}}}}},Zx=(e,t)=>{const{componentCls:n,antCls:r}=e,[o]=ar(r,"select"),{border:i,borderHover:a,borderActive:l,borderOutline:u}=t,d=t.background||e.selectorBg||e.colorBgContainer;return {[o("border-color")]:i,[o("background-color")]:d,[o("color")]:t.color||e.colorText,[`&:not(${n}-disabled)`]:{"&:hover":{[o("border-color")]:a,[o("background-color")]:t.backgroundHover||d},[`&${n}-focused`]:{[o("border-color")]:l,[o("background-color")]:t.backgroundActive||d,boxShadow:`0 0 0 ${oe(e.controlOutlineWidth)} ${u}`}},[`&${n}-disabled`]:{[o("border-color")]:t.borderDisabled||t.border,[o("background-color")]:t.backgroundDisabled||t.background}}},lb=(e,t,n,r={},o={},i)=>{const{componentCls:a}=e;return {[`&${a}-${t}`]:[Zx(e,n),{[`&${a}-status-error`]:Zx(e,{...n,color:r.color||e.colorError,...r}),[`&${a}-status-warning`]:Zx(e,{...n,color:o.color||e.colorWarning,...o})},i]}},gle=e=>{const{componentCls:t,fontHeight:n,controlHeight:r,iconCls:o,antCls:i,calc:a}=e,[l,u]=ar(i,"select");return {[t]:[{[l("border-radius")]:e.borderRadius,[l("border-color")]:"#000",[l("border-size")]:e.lineWidth,[l("background-color")]:e.colorBgContainer,[l("font-size")]:e.fontSize,[l("line-height")]:e.lineHeight,[l("font-height")]:n,[l("color")]:e.colorText,[l("height")]:r,[l("padding-horizontal")]:a(e.paddingSM).sub(e.lineWidth).equal(),[l("padding-vertical")]:`calc((${u("height")} - ${u("font-height")}) / 2 - ${u("border-size")})`,...un(e,true),display:"inline-flex",flexWrap:"nowrap",position:"relative",transition:`all ${e.motionDurationSlow}`,alignItems:"flex-start",outline:0,cursor:"pointer",borderRadius:u("border-radius"),borderWidth:u("border-size"),borderStyle:e.lineType,borderColor:u("border-color"),background:u("background-color"),fontSize:u("font-size"),lineHeight:u("line-height"),color:u("color"),paddingInline:u("padding-horizontal"),paddingBlock:u("padding-vertical"),[`${t}-prefix`]:{flex:"none",lineHeight:1},[`${t}-placeholder`]:{...qa,color:e.colorTextPlaceholder,pointerEvents:"none",zIndex:1},[`${t}-content`]:{flex:"auto",minWidth:0,position:"relative",display:"flex",marginInlineEnd:a(e.paddingXXS).mul(1.5).equal(),"&:before":{content:'"\\a0"',width:0,overflow:"hidden"},"&-value":{...qa,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",[o]:{verticalAlign:"top"}},"&-disabled":{background:e.colorBgContainerDisabled,color:e.colorTextDisabled,cursor:"not-allowed",input:{cursor:"not-allowed"}},"&-sm":{[l("height")]:e.controlHeightSM,[l("padding-horizontal")]:a(e.paddingXS).sub(e.lineWidth).equal(),[l("border-radius")]:e.borderRadiusSM,[`${t}-clear`]:{insetInlineEnd:u("padding-horizontal")}},"&-lg":{[l("height")]:e.controlHeightLG,[l("font-size")]:e.fontSizeLG,[l("line-height")]:e.lineHeightLG,[l("font-height")]:e.fontHeightLG,[l("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(${u("padding-vertical")} * -1)`,lineHeight:`calc(${u("font-height")} + ${u("padding-vertical")} * 2)`},[`${t}-content`]:{alignSelf:"center"}}},{[`&-show-search:not(${t}-customize-input):not(${t}-disabled)`]:{cursor:"text"}},ple(e),lb(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}),lb(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}),lb(e,"borderless",{border:"transparent",borderHover:"transparent",borderActive:"transparent",borderOutline:"transparent",background:"transparent"}),lb(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"}),hle(e)]}},vle=e=>{const{fontSize:t,lineHeight:n,lineWidth:r,controlHeight:o,controlHeightSM:i,controlHeightLG:a,paddingXXS:l,controlPaddingHorizontal:u,zIndexPopupBase:d,colorText:m,fontWeightStrong:p,controlItemBgActive:g,controlItemBgHover:b,colorBgContainer:y,colorFillSecondary:S,colorBgContainerDisabled:C,colorTextDisabled:w,colorPrimaryHover:$,colorPrimary:M,controlOutline:T}=e,R=l*2,I=r*2,N=Math.min(o-R,o-I),P=Math.min(i-R,i-I),O=Math.min(a-R,a-I);return {INTERNAL_FIXED_ITEM_MARGIN:Math.floor(l/2),zIndexPopup:d+50,optionSelectedColor:m,optionSelectedFontWeight:p,optionSelectedBg:g,optionActiveBg:b,optionPadding:`${(o-t*n)/2}px ${u}px`,optionFontSize:t,optionLineHeight:n,optionHeight:o,selectorBg:y,clearBg:y,singleItemHeightLG:a,multipleItemBg:S,multipleItemBorderColor:"transparent",multipleItemHeight:N,multipleItemHeightSM:P,multipleItemHeightLG:O,multipleSelectorBgDisabled:C,multipleItemColorDisabled:w,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:$,activeBorderColor:M,activeOutlineColor:T,selectAffixPadding:l}},ble=e=>{const{antCls:t,componentCls:n,inputPaddingHorizontalBase:r}=e,o={[`${n}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:"50%"}};return {[n]:{...un(e),[`${n}-selection-item`]:{flex:1,fontWeight:"normal",position:"relative",userSelect:"none",...qa,[`> ${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()}}}}}},yle=e=>{const{componentCls:t}=e;return [{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},ble(e),mle(e),{[`${t}-rtl`]:{direction:"rtl"}},Nf(e,{focusElCls:`${t}-focused`})]},Sle=qt("Select",(e,{rootPrefixCls:t})=>{const n=Ft(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(e.lineWidth).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return [yle(n),gle(n)]},vle,{unitless:{optionLineHeight:true,optionSelectedFontWeight:true}});var Cle={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 gE(){return gE=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},gE.apply(this,arguments)}const xle=(e,t)=>f.createElement(Kn,gE({},e,{ref:t,icon:Cle})),wle=f.forwardRef(xle);var $le={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 vE(){return vE=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},vE.apply(this,arguments)}const Ele=(e,t)=>f.createElement(Kn,vE({},e,{ref:t,icon:$le})),MR=f.forwardRef(Ele);var Mle={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 bE(){return bE=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},bE.apply(this,arguments)}const Rle=(e,t)=>f.createElement(Kn,bE({},e,{ref:t,icon:Mle})),RR=f.forwardRef(Rle);function Tle({suffixIcon:e,clearIcon:t,menuItemSelectedIcon:n,removeIcon:r,loading:o,multiple:i,hasFeedback:a,showSuffixIcon:l,feedbackIcon:u,showArrow:d,componentName:m}){const p=t??f.createElement(Gp,null),g=C=>e===null&&!a&&!d?null:f.createElement(f.Fragment,null,l!==false&&C,a&&u);let b=null;e!==void 0?b=g(e):o?b=g(f.createElement(Jy,{spin:true})):b=({open:C,showSearch:w})=>g(C&&w?f.createElement(RR,null):f.createElement(MR,null));let y=null;n!==void 0?y=n:i?y=f.createElement(wle,null):y=null;let S=null;return r!==void 0?S=r:S=f.createElement(Ds,null),{clearIcon:p,suffixIcon:b,itemIcon:y,removeIcon:S}}function Ale(e){return G.useMemo(()=>{if(e)return (...t)=>G.createElement(kl,{space:true},e.apply(void 0,t))},[e])}function Nle(e,t){return t!==void 0?t:e!==null}const O7="SECRET_COMBOBOX_MODE_DO_NOT_USE",Ple=(e,t)=>{const{prefixCls:n,bordered:r,className:o,rootClassName:i,getPopupContainer:a,popupClassName:l,dropdownClassName:u,listHeight:d=256,placement:m,listItemHeight:p,size:g,disabled:b,notFoundContent:y,status:S,builtinPlacements:C,dropdownMatchSelectWidth:w,popupMatchSelectWidth:$,direction:M,style:T,allowClear:R,variant:I,popupStyle:N,dropdownStyle:P,transitionName:O,tagRender:_,maxCount:L,prefix:j,dropdownRender:U,popupRender:q,onDropdownVisibleChange:V,onOpenChange:B,styles:F,classNames:W,...K}=e,{getPopupContainer:Q,getPrefixCls:D,renderEmpty:z,direction:Y,virtual:ee,popupMatchSelectWidth:J,popupOverflow:te}=f.useContext(Ct),{showSearch:ne,style:se,styles:ae,className:re,classNames:de}=Gt("select"),[,ge]=Fr(),ie=p??ge?.controlHeight,Ee=D("select",n),le=D(),ue=M??Y,{compactSize:Se,compactItemClassnames:ye}=_s(Ee,ue),[Be,je]=i1("select",I,r),Ne=Yn(Ee),[fe,be]=Sle(Ee,Ne),Re=f.useMemo(()=>{const{mode:Le}=e;if(Le!=="combobox")return Le===O7?"combobox":Le},[e.mode]),qe=Re==="multiple"||Re==="tags",Qe=Nle(e.suffixIcon,e.showArrow),We=$??w??J,tt=Ale(q||U),rt=B||V,{status:Ze,hasFeedback:Oe,isFormItemInput:Ye,feedbackIcon:Ke}=f.useContext(yo),_e=If(Ze,S);let ke;y!==void 0?ke=y:Re==="combobox"?ke=null:ke=z?.("Select")||f.createElement(I7,{componentName:"Select"});const{suffixIcon:lt,itemIcon:At,removeIcon:dt,clearIcon:Dt}=Tle({...K,multiple:qe,hasFeedback:Oe,feedbackIcon:Ke,showSuffixIcon:Qe,componentName:"Select"}),Tt=R===true?{clearIcon:Dt}:R,xt=Bn(K,["suffixIcon","itemIcon"]),gt=ao(Le=>g??Se??Le),ft=f.useContext(to),st=b??ft,He={...e,variant:Be,status:_e,disabled:st,size:gt},[Ge,ve]=Xt([de,W],[ae,F],{props:He},{popup:{_default:"root"}}),Te=X(Ge.popup?.root,l,u,{[`${Ee}-dropdown-${ue}`]:ue==="rtl"},i,be,Ne,fe),Ce={...ve.popup?.root,...N??P},he=X({[`${Ee}-lg`]:gt==="large",[`${Ee}-sm`]:gt==="small",[`${Ee}-rtl`]:ue==="rtl",[`${Ee}-${Be}`]:je,[`${Ee}-in-form-item`]:Ye},Fl(Ee,_e,Oe),ye,re,o,Ge.root,i,be,Ne,fe),Ie=f.useMemo(()=>m!==void 0?m:ue==="rtl"?"bottomRight":"bottomLeft",[m,ue]),[we]=xu("SelectLike",ve.popup?.root?.zIndex??Ce?.zIndex);return f.createElement(ER,{ref:t,virtual:ee,classNames:Ge,styles:ve,showSearch:ne,...xt,style:{...ve.root,...se,...T},popupMatchSelectWidth:We,transitionName:zl(le,"slide-up",O),builtinPlacements:fle(C,te),listHeight:d,listItemHeight:ie,mode:Re,prefixCls:Ee,placement:Ie,direction:ue,prefix:j,suffixIcon:lt,menuItemSelectedIcon:At,removeIcon:dt,allowClear:Tt,notFoundContent:ke,className:he,getPopupContainer:a||Q,popupClassName:Te,disabled:st,popupStyle:{...ve.popup?.root,...Ce,zIndex:we},maxCount:qe?L:void 0,tagRender:qe?_:void 0,popupRender:tt,onPopupVisibleChange:rt})},Zl=f.forwardRef(Ple),Ile=SR(Zl,"popupAlign");Zl.SECRET_COMBOBOX_MODE_DO_NOT_USE=O7;Zl.Option=$R;Zl.OptGroup=wR;Zl._InternalPanelDoNotUseOrYouWillBeFired=Ile;const D7=["xxl","xl","lg","md","sm","xs"],Ole=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)`}),Dle=e=>{const t=e,n=[].concat(D7).reverse();return n.forEach((r,o)=>{const i=r.toUpperCase(),a=`screen${i}Min`,l=`screen${i}`;if(!(t[a]<=t[l]))throw new Error(`${a}<=${l} fails : !(${t[a]}<=${t[l]})`);if(o<n.length-1){const u=`screen${i}Max`;if(!(t[l]<=t[u]))throw new Error(`${l}<=${u} fails : !(${t[l]}<=${t[u]})`);const m=`screen${n[o+1].toUpperCase()}Min`;if(!(t[u]<=t[m]))throw new Error(`${u}<=${m} fails : !(${t[u]}<=${t[m]})`)}}),e},_le=()=>{const[,e]=Fr(),t=Ole(Dle(e));return G.useMemo(()=>{const n=new Map;let r=-1,o={};return {responsiveMap:t,matchHandlers:{},dispatch(i){return o=i,n.forEach(a=>a(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,a])=>{const l=({matches:d})=>{this.dispatch({...o,[i]:d});},u=window.matchMedia(a);typeof u?.addEventListener=="function"&&u.addEventListener("change",l),this.matchHandlers[a]={mql:u,listener:l},l(u);});},unregister(){Object.values(t).forEach(i=>{const a=this.matchHandlers[i];typeof a?.mql?.removeEventListener=="function"&&a.mql.removeEventListener("change",a?.listener);}),n.clear();}}},[t])};function _7(e=true,t={}){const n=f.useRef(t),[,r]=jB(),o=_le();return An(()=>{const i=o.subscribe(a=>{n.current=a,e&&r();});return ()=>o.unsubscribe(i)},[]),n.current}const yE=f.createContext({}),Lle=e=>{const{antCls:t,componentCls:n,iconCls:r,avatarBg:o,avatarColor:i,containerSize:a,containerSizeLG:l,containerSizeSM:u,textFontSize:d,textFontSizeLG:m,textFontSizeSM:p,iconFontSize:g,iconFontSizeLG:b,iconFontSizeSM:y,borderRadius:S,borderRadiusLG:C,borderRadiusSM:w,lineWidth:$,lineType:M}=e,T=(R,I,N,P)=>({width:R,height:R,borderRadius:"50%",fontSize:I,[`&${n}-square`]:{borderRadius:P},[`&${n}-icon`]:{fontSize:N,[`> ${r}`]:{margin:0}}});return {[n]:{...un(e),position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",overflow:"hidden",color:i,whiteSpace:"nowrap",textAlign:"center",verticalAlign:"middle",background:o,border:`${oe($)} ${M} transparent`,"&-image":{background:"transparent"},[`${t}-image-img`]:{display:"block"},...T(a,d,g,S),"&-lg":{...T(l,m,b,C)},"&-sm":{...T(u,p,y,w)},"> img":{display:"block",width:"100%",height:"100%",objectFit:"cover"}}}},zle=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}}}},Ble=e=>{const{controlHeight:t,controlHeightLG:n,controlHeightSM:r,fontSize:o,fontSizeLG:i,fontSizeXL:a,fontSizeHeading3:l,marginXS:u,marginXXS:d,colorBorderBg:m}=e;return {containerSize:t,containerSizeLG:n,containerSizeSM:r,textFontSize:o,textFontSizeLG:o,textFontSizeSM:o,iconFontSize:Math.round((i+a)/2),iconFontSizeLG:l,iconFontSizeSM:o,groupSpace:d,groupOverlapping:-u,groupBorderColor:m}},L7=qt("Avatar",e=>{const{colorTextLightSolid:t,colorTextPlaceholder:n}=e,r=Ft(e,{avatarBg:n,avatarColor:t});return [Lle(r),zle(r)]},Ble),z7=f.forwardRef((e,t)=>{const{prefixCls:n,shape:r,size:o,src:i,srcSet:a,icon:l,className:u,rootClassName:d,style:m,alt:p,draggable:g,children:b,crossOrigin:y,gap:S=4,onError:C,...w}=e,[$,M]=f.useState(1),[T,R]=f.useState(false),[I,N]=f.useState(true),P=f.useRef(null),O=f.useRef(null),_=Nr(t,P),{getPrefixCls:L,className:j,style:U}=Gt("avatar"),q=f.useContext(yE),V=()=>{if(!O.current||!P.current)return;const de=O.current.offsetWidth,ge=P.current.offsetWidth;de!==0&&ge!==0&&S*2<ge&&M(ge-S*2<de?(ge-S*2)/de:1);};f.useEffect(()=>{R(true);},[]),f.useEffect(()=>{N(true),M(1);},[i]),f.useEffect(V,[S]);const B=()=>{C?.()!==false&&N(false);},F=ao(de=>o??q?.size??de??"default"),W=Object.keys(typeof F=="object"?F||{}:{}).some(de=>["xs","sm","md","lg","xl","xxl"].includes(de)),K=_7(W),Q=f.useMemo(()=>{if(typeof F!="object")return {};const de=D7.find(ie=>K[ie]),ge=F[de];return ge?{width:ge,height:ge,fontSize:ge&&(l||b)?ge/2:18}:{}},[K,F,l,b]),D=L("avatar",n),z=Yn(D),[Y,ee]=L7(D,z),J=X({[`${D}-lg`]:F==="large",[`${D}-sm`]:F==="small"}),te=f.isValidElement(i),ne=r||q?.shape||"circle",se=X(D,J,j,`${D}-${ne}`,{[`${D}-image`]:te||i&&I,[`${D}-icon`]:!!l},ee,z,u,d,Y),ae=typeof F=="number"?{width:F,height:F,fontSize:l?F/2:18}:{};let re;if(typeof i=="string"&&I)re=f.createElement("img",{src:i,draggable:g,srcSet:a,onError:B,alt:p,crossOrigin:y});else if(te)re=i;else if(l)re=l;else if(T||$!==1){const de=`scale(${$})`,ge={msTransform:de,WebkitTransform:de,transform:de};re=f.createElement(ha,{onResize:V},f.createElement("span",{className:`${D}-string`,ref:O,style:ge},b));}else re=f.createElement("span",{className:`${D}-string`,style:{opacity:0},ref:O},b);return f.createElement("span",{...w,style:{...ae,...Q,...U,...m},className:se,ref:_},re)}),cf=e=>e?typeof e=="function"?e():e:null,TR=e=>{const{children:t,prefixCls:n,id:r,classNames:o,styles:i,className:a,style:l}=e;return f.createElement("div",{id:r,className:X(`${n}-container`,o?.container,a),style:{...i?.container,...l},role:"tooltip"},typeof t=="function"?t():t)},Sd={shiftX:64,adjustY:1},Cd={adjustX:1,shiftY:true},Li=[0,0],kle={left:{points:["cr","cl"],overflow:Cd,offset:[-4,0],targetOffset:Li},right:{points:["cl","cr"],overflow:Cd,offset:[4,0],targetOffset:Li},top:{points:["bc","tc"],overflow:Sd,offset:[0,-4],targetOffset:Li},bottom:{points:["tc","bc"],overflow:Sd,offset:[0,4],targetOffset:Li},topLeft:{points:["bl","tl"],overflow:Sd,offset:[0,-4],targetOffset:Li},leftTop:{points:["tr","tl"],overflow:Cd,offset:[-4,0],targetOffset:Li},topRight:{points:["br","tr"],overflow:Sd,offset:[0,-4],targetOffset:Li},rightTop:{points:["tl","tr"],overflow:Cd,offset:[4,0],targetOffset:Li},bottomRight:{points:["tr","br"],overflow:Sd,offset:[0,4],targetOffset:Li},rightBottom:{points:["bl","br"],overflow:Cd,offset:[4,0],targetOffset:Li},bottomLeft:{points:["tl","bl"],overflow:Sd,offset:[0,4],targetOffset:Li},leftBottom:{points:["br","bl"],overflow:Cd,offset:[-4,0],targetOffset:Li}};function SE(){return SE=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},SE.apply(this,arguments)}const Fle=f.forwardRef((e,t)=>{const{trigger:n=["hover"],mouseEnterDelay:r=0,mouseLeaveDelay:o=.1,prefixCls:i="rc-tooltip",children:a,onVisibleChange:l,afterVisibleChange:u,motion:d,placement:m="right",align:p={},destroyOnHidden:g=false,defaultVisible:b,getTooltipContainer:y,arrowContent:S,overlay:C,id:w,showArrow:$=true,classNames:M,styles:T,...R}=e,I=Ql(w),N=f.useRef(null);f.useImperativeHandle(t,()=>N.current);const P={...R};"visible"in e&&(P.popupVisible=e.visible);const O=f.useMemo(()=>{if(!$)return false;const L=$===true?{}:$;return {...L,className:X(L.className,M?.arrow),style:{...L.style,...T?.arrow},content:L.content??S}},[$,M?.arrow,T?.arrow,S]),_=({open:L})=>{const j=f.Children.only(a),U={"aria-describedby":C&&L?I:void 0};return f.cloneElement(j,U)};return f.createElement(Zy,SE({popupClassName:M?.root,prefixCls:i,popup:f.createElement(TR,{key:"content",prefixCls:i,id:I,classNames:M,styles:T},C),action:n,builtinPlacements:kle,popupPlacement:m,ref:N,popupAlign:p,getPopupContainer:y,onOpenChange:l,afterOpenChange:u,popupMotion:d,defaultPopupVisible:b,autoDestroy:g,mouseLeaveDelay:o,popupStyle:T?.root,mouseEnterDelay:r,arrow:O,uniqueContainerClassName:M?.uniqueContainer,uniqueContainerStyle:T?.uniqueContainer},P),_)});function AR(e){const{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,o=t/2,i=0,a=o,l=r*1/Math.sqrt(2),u=o-r*(1-1/Math.sqrt(2)),d=o-n*(1/Math.sqrt(2)),m=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),p=2*o-d,g=m,b=2*o-l,y=u,S=2*o-i,C=a,w=o*Math.sqrt(2)+r*(Math.sqrt(2)-2),$=r*(Math.sqrt(2)-1),M=`polygon(${$}px 100%, 50% ${$}px, ${2*o-$}px 100%, ${$}px 100%)`,T=`path('M ${i} ${a} A ${r} ${r} 0 0 0 ${l} ${u} L ${d} ${m} A ${n} ${n} 0 0 1 ${p} ${g} L ${b} ${y} A ${r} ${r} 0 0 0 ${S} ${C} Z')`;return {arrowShadowWidth:w,arrowPath:T,arrowPolygon:M}}const Hle=(e,t,n)=>{const{sizePopupArrow:r,arrowPolygon:o,arrowPath:i,arrowShadowWidth:a,borderRadiusXS:l,calc:u}=e;return {pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:u(r).div(2).equal(),background:t,clipPath:{_multi_value_:true,value:[o,i]},content:'""'},"&::after":{content:'""',position:"absolute",width:a,height:a,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:true,value:`0 0 ${oe(l)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}},B7=8;function a1(e){const{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return {arrowOffsetHorizontal:r,arrowOffsetVertical:n?B7:r}}function cb(e,t){return e?t:{}}const NR=(e,t,n)=>{const{componentCls:r,boxShadowPopoverArrow:o,arrowOffsetVertical:i,arrowOffsetHorizontal:a,antCls:l}=e,[u]=ar(l,"tooltip"),{arrowDistance:d=0,arrowPlacement:m={left:true,right:true,top:true,bottom:true}}=n||{};return {[r]:{[`${r}-arrow`]:[{position:"absolute",zIndex:1,display:"block",...Hle(e,t,o),"&:before":{background:t}}],...cb(!!m.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(",")]:{bottom:d,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:true,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{[u("arrow-offset-horizontal")]:a,[`> ${r}-arrow`]:{left:{_skip_check_:true,value:a}}},"&-placement-topRight":{[u("arrow-offset-horizontal")]:`calc(100% - ${oe(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:true,value:a}}}}),...cb(!!m.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(",")]:{top:d,transform:"translateY(-100%)"},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:true,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{[u("arrow-offset-horizontal")]:a,[`> ${r}-arrow`]:{left:{_skip_check_:true,value:a}}},"&-placement-bottomRight":{[u("arrow-offset-horizontal")]:`calc(100% - ${oe(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:true,value:a}}}}),...cb(!!m.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(",")]:{right:{_skip_check_:true,value:d},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}}),...cb(!!m.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(",")]:{left:{_skip_check_:true,value:d},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 Vle(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 a={...i,...o};return a.shiftX||(a.adjustX=true),a.shiftY||(a.adjustY=true),a}const DO={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"]}},jle={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"]}},Ule=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function k7(e){const{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:o,borderRadius:i,visibleFirst:a}=e,l=t/2,u={},d=a1({contentRadius:i,limitVerticalRadius:true});return Object.keys(DO).forEach(m=>{const g={...r&&jle[m]||DO[m],offset:[0,0],dynamicInset:true};switch(u[m]=g,Ule.has(m)&&(g.autoArrow=false),m){case "top":case "topLeft":case "topRight":g.offset[1]=-l-o;break;case "bottom":case "bottomLeft":case "bottomRight":g.offset[1]=l+o;break;case "left":case "leftTop":case "leftBottom":g.offset[0]=-l-o;break;case "right":case "rightTop":case "rightBottom":g.offset[0]=l+o;break}if(r)switch(m){case "topLeft":case "bottomLeft":g.offset[0]=-d.arrowOffsetHorizontal-l;break;case "topRight":case "bottomRight":g.offset[0]=d.arrowOffsetHorizontal+l;break;case "leftTop":case "rightTop":g.offset[1]=-d.arrowOffsetHorizontal*2+l;break;case "leftBottom":case "rightBottom":g.offset[1]=d.arrowOffsetHorizontal*2-l;break}g.overflow=Vle(m,d,t,n),a&&(g.htmlRegion="visibleFirst");}),u}const PR=(e,t)=>{const n=r=>typeof r=="boolean"?{show:r}:r||{};return G.useMemo(()=>{const r=n(e),o=n(t);return {...o,...r,show:r.show??o.show??true}},[e,t])},_O="50%",qle=e=>{const{calc:t,componentCls:n,tooltipMaxWidth:r,tooltipColor:o,tooltipBg:i,tooltipBorderRadius:a,zIndexPopup:l,controlHeight:u,boxShadowSecondary:d,paddingSM:m,paddingXS:p,arrowOffsetHorizontal:g,sizePopupArrow:b,antCls:y}=e,[S,C]=ar(y,"tooltip"),w=t(a).add(b).add(g).equal(),M={minWidth:t(a).mul(2).add(b).equal(),minHeight:u,padding:`${oe(e.calc(m).div(2).equal())} ${oe(p)}`,color:C("overlay-color",o),textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:a,boxShadow:d,boxSizing:"border-box"},T={[S("valid-offset-x")]:C("arrow-offset-horizontal","var(--arrow-x)"),transformOrigin:[C("valid-offset-x",_O),`var(--arrow-y, ${_O})`].join(" ")};return [{[n]:{...un(e),position:"absolute",zIndex:l,display:"block",width:"max-content",maxWidth:r,visibility:"visible",...T,"&-hidden":{display:"none"},[S("arrow-background-color")]:i,[`${n}-container`]:[M,sR(e,true)],[`&:has(~ ${n}-unique-container)`]:{[`${n}-container`]:{border:"none",background:"transparent",boxShadow:"none"}},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:w},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:e.min(a,B7)}},[`${n}-content`]:{position:"relative"},...Ky(e,(R,{darkColor:I})=>({[`&${n}-${R}`]:{[`${n}-container`]:{backgroundColor:I},[`${n}-arrow`]:{[S("arrow-background-color")]:I}}})),"&-rtl":{direction:"rtl"}}},NR(e,C("arrow-background-color")),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}},{[`${n}-unique-container`]:{...M,...T,position:"absolute",zIndex:t(l).sub(1).equal(),"&-hidden":{display:"none"},"&-visible":{transition:`all ${e.motionDurationSlow}`}}}]},Wle=e=>({zIndexPopup:e.zIndexPopupBase+70,maxWidth:250,...a1({contentRadius:e.borderRadius,limitVerticalRadius:true}),...AR(Ft(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))}),F7=(e,t,n=true)=>qt("Tooltip",o=>{const{borderRadius:i,colorTextLightSolid:a,colorBgSpotlight:l,maxWidth:u}=o,d=Ft(o,{tooltipMaxWidth:u,tooltipColor:a,tooltipBorderRadius:i,tooltipBg:l});return [qle(d),Qp(o,"zoom-big-fast")]},Wle,{resetStyle:false,injectStyle:n})(e,t),Gle=_l.map(e=>`${e}-inverse`),Kle=["success","processing","error","default","warning"];function s1(e,t=true){return t?[].concat(Yt(Gle),Yt(_l)).includes(e):_l.includes(e)}function Yle(e){return Kle.includes(e)}const H7=(e,t,n)=>{const r=s1(n),[o]=ar(e,"tooltip"),i=X({[`${t}-${n}`]:n&&r}),a={},l={},u=no(n).toRgb(),m=(.299*u.r+.587*u.g+.114*u.b)/255<.5?"#FFF":"#000";return n&&!r&&(a.background=n,a[o("overlay-color")]=m,l[o("arrow-background-color")]=n),{className:i,overlayStyle:a,arrowStyle:l}},Xle=e=>{const{prefixCls:t,className:n,placement:r="top",title:o,color:i,overlayInnerStyle:a,classNames:l,styles:u}=e,{getPrefixCls:d}=f.useContext(Ct),m=d("tooltip",t),p=d(),g=Yn(m),[b,y]=F7(m,g),S=H7(p,m,i),C=S.arrowStyle,w=f.useMemo(()=>({container:{...a,...S.overlayStyle}}),[a,S.overlayStyle]),$={...e,placement:r},[M,T]=Xt([l],[w,u],{props:$}),R=X(g,b,y,m,`${m}-pure`,`${m}-placement-${r}`,n,S.className);return f.createElement("div",{className:R,style:C},f.createElement("div",{className:`${m}-arrow`}),f.createElement(TR,{...e,className:b,prefixCls:m,classNames:M,styles:T},o))},Qle=f.forwardRef((e,t)=>{const{prefixCls:n,openClassName:r,getTooltipContainer:o,color:i,children:a,afterOpenChange:l,arrow:u,destroyTooltipOnHide:d,destroyOnHidden:m,title:p,overlay:g,trigger:b,builtinPlacements:y,autoAdjustOverflow:S=true,motion:C,getPopupContainer:w,placement:$="top",mouseEnterDelay:M=.1,mouseLeaveDelay:T=.1,rootClassName:R,styles:I,classNames:N,onOpenChange:P,overlayInnerStyle:O,overlayStyle:_,overlayClassName:L,...j}=e,[,U]=Fr(),{getPopupContainer:q,getPrefixCls:V,direction:B,className:F,style:W,classNames:K,styles:Q,arrow:D,trigger:z}=Gt("tooltip"),Y=PR(u,D),ee=Y.show,J=b||z||"hover",te=f.useRef(null),ne=()=>{te.current?.forceAlign();};f.useImperativeHandle(t,()=>({forceAlign:ne,nativeElement:te.current?.nativeElement,popupElement:te.current?.popupElement}));const[se,ae]=hn(e.defaultOpen??false,e.open),re=!p&&!g&&p!==0,de=lt=>{ae(re?false:lt),!re&&P&&P(lt);},ge=f.useMemo(()=>y||k7({arrowPointAtCenter:Y?.pointAtCenter??false,autoAdjustOverflow:S,arrowWidth:ee?U.sizePopupArrow:0,borderRadius:U.borderRadius,offset:U.marginXXS,visibleFirst:true}),[Y,y,U,ee,S]),ie=f.useMemo(()=>p===0?p:g||p||"",[g,p]),Ee=f.createElement(kl,{space:true,form:true},typeof ie=="function"?ie():ie),le={...e,trigger:J,color:i,placement:$,builtinPlacements:y,openClassName:r,arrow:u,autoAdjustOverflow:S,getPopupContainer:w,children:a,destroyTooltipOnHide:d,destroyOnHidden:m},[ue,Se]=Xt([K,N],[Q,I],{props:le}),ye=V("tooltip",n),Be=V(),je=e["data-popover-inject"];let Ne=se;!("open"in e)&&re&&(Ne=false);const fe=f.isValidElement(a)&&!rk(a)?a:f.createElement("span",null,a),be=fe.props,Re=!be.className||typeof be.className=="string"?X(be.className,r||`${ye}-open`):be.className,qe=Yn(ye),[Qe,We]=F7(ye,qe,!je),tt=H7(Be,ye,i),rt=tt.arrowStyle,Ze=X(qe,Qe,We),Oe=X(L,{[`${ye}-rtl`]:B==="rtl"},tt.className,R,Ze,F,ue.root),[Ye,Ke]=xu("Tooltip",j.zIndex),_e={...Se.container,...O,...tt.overlayStyle},ke=f.createElement(Fle,{unique:true,...j,trigger:J,zIndex:Ye,showArrow:ee,placement:$,mouseEnterDelay:M,mouseLeaveDelay:T,prefixCls:ye,classNames:{root:Oe,container:ue.container,arrow:ue.arrow,uniqueContainer:X(Ze,ue.container)},styles:{root:{...rt,...Se.root,...W,..._},container:_e,uniqueContainer:_e,arrow:Se.arrow},getTooltipContainer:w||o||q,ref:te,builtinPlacements:ge,overlay:Ee,visible:Ne,onVisibleChange:de,afterVisibleChange:l,arrowContent:f.createElement("span",{className:`${ye}-arrow-content`}),motion:{motionName:zl(Be,"zoom-big-fast",typeof C?.motionName=="string"?C?.motionName:void 0),motionDeadline:1e3},destroyOnHidden:m??!!d},Ne?kr(fe,{className:Re}):fe);return f.createElement(Xy.Provider,{value:Ke},ke)}),Jl=Qle;Jl._InternalPanelDoNotUseOrYouWillBeFired=Xle;Jl.UniqueProvider=ik;const LO="50%",Zle=e=>{const{componentCls:t,popoverColor:n,titleMinWidth:r,fontWeightStrong:o,innerPadding:i,boxShadowSecondary:a,colorTextHeading:l,borderRadiusLG:u,zIndexPopup:d,titleMarginBottom:m,colorBgElevated:p,popoverBg:g,titleBorderBottom:b,innerContentPadding:y,titlePadding:S,antCls:C}=e,[w,$]=ar(C,"tooltip");return [{[t]:{...un(e),position:"absolute",top:0,left:{_skip_check_:true,value:0},zIndex:d,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",[w("valid-offset-x")]:$("arrow-offset-horizontal","var(--arrow-x)"),transformOrigin:[$("valid-offset-x",LO),`var(--arrow-y, ${LO})`].join(" "),[w("arrow-background-color")]:p,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-container`]:{backgroundColor:g,backgroundClip:"padding-box",borderRadius:u,boxShadow:a,padding:i},[`${t}-title`]:{minWidth:r,marginBottom:m,color:l,fontWeight:o,borderBottom:b,padding:S},[`${t}-content`]:{color:n,padding:y}}},NR(e,$("arrow-background-color")),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block"}}]},Jle=e=>{const{componentCls:t,antCls:n}=e,[r]=ar(n,"tooltip");return {[t]:_l.map(o=>{const i=e[`${o}6`];return {[`&${t}-${o}`]:{[r("arrow-background-color")]:i,[`${t}-inner`]:{backgroundColor:i},[`${t}-arrow`]:{background:"transparent"}}}})}},ece=e=>{const{lineWidth:t,controlHeight:n,fontHeight:r,padding:o,wireframe:i,zIndexPopupBase:a,borderRadiusLG:l,marginXS:u,lineType:d,colorSplit:m,paddingSM:p}=e,g=n-r,b=g/2,y=g/2-t,S=o;return {titleMinWidth:177,zIndexPopup:a+30,...AR(e),...a1({contentRadius:l,limitVerticalRadius:true}),innerPadding:i?0:12,titleMarginBottom:i?0:u,titlePadding:i?`${b}px ${S}px ${y}px`:0,titleBorderBottom:i?`${t}px ${d} ${m}`:"none",innerContentPadding:i?`${p}px ${S}px`:0}},V7=qt("Popover",e=>{const{colorBgElevated:t,colorText:n}=e,r=Ft(e,{popoverBg:t,popoverColor:n});return [Zle(r),Jle(r),Qp(r,"zoom-big")]},ece,{resetStyle:false,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]}),j7=e=>{const{title:t,content:n,prefixCls:r,classNames:o,styles:i}=e;return !t&&!n?null:f.createElement(f.Fragment,null,t&&f.createElement("div",{className:X(`${r}-title`,o?.title),style:i?.title},t),n&&f.createElement("div",{className:X(`${r}-content`,o?.content),style:i?.content},n))},tce=e=>{const{hashId:t,prefixCls:n,className:r,style:o,placement:i="top",title:a,content:l,children:u,classNames:d,styles:m}=e,p=cf(a),g=cf(l),b={...e,placement:i},[y,S]=Xt([d],[m],{props:b}),C=X(t,n,`${n}-pure`,`${n}-placement-${i}`,r);return f.createElement("div",{className:C,style:o},f.createElement("div",{className:`${n}-arrow`}),f.createElement(TR,{...e,className:t,prefixCls:n,classNames:y,styles:S},u||f.createElement(j7,{prefixCls:n,title:p,content:g,classNames:y,styles:S})))},U7=e=>{const{prefixCls:t,className:n,...r}=e,{getPrefixCls:o}=f.useContext(Ct),i=o("popover",t),[a,l]=V7(i);return f.createElement(tce,{...r,prefixCls:i,hashId:a,className:X(n,l)})},nce=f.forwardRef((e,t)=>{const{prefixCls:n,title:r,content:o,overlayClassName:i,placement:a="top",trigger:l,children:u,mouseEnterDelay:d=.1,mouseLeaveDelay:m=.1,onOpenChange:p,overlayStyle:g={},styles:b,classNames:y,motion:S,arrow:C,...w}=e,{getPrefixCls:$,className:M,style:T,classNames:R,styles:I,arrow:N,trigger:P}=Gt("popover"),O=$("popover",n),[_,L]=V7(O),j=$(),U=PR(C,N),q=l||P||"hover",V={...e,placement:a,trigger:q,mouseEnterDelay:d,mouseLeaveDelay:m,overlayStyle:g,styles:b,classNames:y},[B,F]=Xt([R,y],[I,b],{props:V}),W=X(i,_,L,M,B.root),[K,Q]=hn(e.defaultOpen??false,e.open),D=ee=>{Q(ee),p?.(ee);},z=cf(r),Y=cf(o);return f.createElement(Jl,{unique:false,arrow:U,placement:a,trigger:q,mouseEnterDelay:d,mouseLeaveDelay:m,...w,prefixCls:O,classNames:{root:W,container:B.container,arrow:B.arrow},styles:{root:{...F.root,...T,...g},container:F.container,arrow:F.arrow},ref:t,open:K,onOpenChange:D,overlay:z||Y?f.createElement(j7,{prefixCls:O,title:z,content:Y,classNames:B,styles:F}):null,motion:{motionName:zl(j,"zoom-big",typeof S?.motionName=="string"?S?.motionName:void 0)},"data-popover-inject":true},u)}),Zo=nce;Zo._InternalPanelDoNotUseOrYouWillBeFired=U7;const zO=e=>{const{size:t,shape:n}=f.useContext(yE),r=f.useMemo(()=>({size:e.size||t,shape:e.shape||n}),[e.size,e.shape,t,n]);return f.createElement(yE.Provider,{value:r},e.children)},rce=e=>{const{getPrefixCls:t,direction:n}=f.useContext(Ct),{prefixCls:r,className:o,rootClassName:i,style:a,maxCount:l,maxStyle:u,size:d,shape:m,maxPopoverPlacement:p,maxPopoverTrigger:g,children:b,max:y}=e,S=t("avatar",r),C=`${S}-group`,w=Yn(S),[$,M]=L7(S,w),T=X(C,{[`${C}-rtl`]:n==="rtl"},M,w,o,i,$),R=Qo(b).map((P,O)=>kr(P,{key:`avatar-key-${O}`})),I=y?.count||l,N=R.length;if(I&&I<N){const P=R.slice(0,I),O=R.slice(I,N),_=y?.style||u,L=y?.popover?.trigger||g||"hover",j=y?.popover?.placement||p||"top",U={content:O,...y?.popover,placement:j,trigger:L,rootClassName:X(`${C}-popover`,y?.popover?.rootClassName)};return P.push(f.createElement(Zo,{key:"avatar-popover-key",destroyOnHidden:true,...U},f.createElement(z7,{style:_},`+${N-I}`))),f.createElement(zO,{shape:m,size:d},f.createElement("div",{className:T,style:a},P))}return f.createElement(zO,{shape:m,size:d},f.createElement("div",{className:T,style:a},R))},Yc=z7;Yc.Group=rce;var oce={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 CE(){return CE=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},CE.apply(this,arguments)}const ice=(e,t)=>f.createElement(Kn,CE({},e,{ref:t,icon:oce})),ace=f.forwardRef(ice),BO=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.createElement("span",{style:i,className:X(`${t}-only-unit`,{current:r})},n)};function sce(e,t,n){let r=e,o=0;for(;(r+10)%10!==t;)r+=n,o+=n;return o}const lce=e=>{const{prefixCls:t,count:n,value:r}=e,o=Number(r),i=Math.abs(n),[a,l]=f.useState(o),[u,d]=f.useState(i),m=()=>{l(o),d(i);};f.useEffect(()=>{const b=setTimeout(m,1e3);return ()=>clearTimeout(b)},[o]);let p,g;if(a===o||Number.isNaN(o)||Number.isNaN(a))p=[f.createElement(BO,{...e,key:o,current:true})],g={transition:"none"};else {p=[];const b=o+10,y=[];for(let $=o;$<=b;$+=1)y.push($);const S=u<i?1:-1,C=y.findIndex($=>$%10===a);p=(S<0?y.slice(0,C+1):y.slice(C)).map(($,M)=>{const T=$%10;return f.createElement(BO,{...e,key:$,value:T,offset:S<0?M-C:M,current:M===C})}),g={transform:`translateY(${-sce(a,o,S)}00%)`};}return f.createElement("span",{className:`${t}-only`,style:g,onTransitionEnd:m},p)},cce=f.forwardRef((e,t)=>{const{prefixCls:n,count:r,className:o,motionClassName:i,style:a,title:l,show:u,component:d="sup",children:m,...p}=e,{getPrefixCls:g}=f.useContext(Ct),b=g("scroll-number",n),y={...p,"data-show":u,style:a,className:X(b,o,i),title:l};let S=r;if(r&&Number(r)%1===0){const C=String(r).split("");S=f.createElement("bdi",null,C.map((w,$)=>f.createElement(lce,{prefixCls:b,count:Number(r),value:w,key:C.length-$})));}return a?.borderColor&&(y.style={...a,boxShadow:`0 0 0 1px ${a.borderColor} inset`}),m?kr(m,C=>({className:X(`${b}-custom-component`,C?.className,i)})):f.createElement(d,{...y,ref:t},S)}),uce=new zt("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),dce=new zt("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),fce=new zt("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),mce=new zt("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),hce=new zt("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),pce=new zt("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),gce=e=>{const{componentCls:t,iconCls:n,antCls:r,badgeShadowSize:o,textFontSize:i,textFontSizeSM:a,statusSize:l,dotSize:u,textFontWeight:d,indicatorHeight:m,indicatorHeightSM:p,marginXS:g,calc:b}=e,y=`${r}-scroll-number`,S=Ky(e,(C,{darkColor:w})=>({[`&${t} ${t}-color-${C}`]:{background:w,[`&:not(${t}-count)`]:{color:w},"a:hover &":{background:w}}}));return {[t]:{...un(e),position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${t}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:e.indicatorZIndex,minWidth:m,height:m,color:e.badgeTextColor,fontWeight:d,fontSize:i,lineHeight:oe(m),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:b(m).div(2).equal(),boxShadow:`0 0 0 ${oe(o)} ${e.badgeShadowColor}`,transition:`background-color ${e.motionDurationMid}`,a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},[`${t}-count-sm`]:{minWidth:p,height:p,fontSize:a,lineHeight:oe(p),borderRadius:b(p).div(2).equal()},[`${t}-multiple-words`]:{padding:`0 ${oe(e.paddingXS)}`,bdi:{unicodeBidi:"plaintext"}},[`${t}-dot`]:{zIndex:e.indicatorZIndex,width:u,minWidth:u,height:u,background:e.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${oe(o)} ${e.badgeShadowColor}`},[`${t}-count, ${t}-dot, ${y}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${n}-spin`]:{animationName:pce,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${t}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${t}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:l,height:l,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:uce,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:g,color:e.colorText,fontSize:e.fontSize}},...S,[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:dce,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`${t}-zoom-leave`]:{animationName:fce,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:mce,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:hce,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`&:not(${t}-status)`]:{verticalAlign:"middle"},[`${y}-custom-component, ${t}-count`]:{transform:"none"},[`${y}-custom-component, ${y}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[y]:{overflow:"hidden",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack}`,[`${y}-only`]:{position:"relative",display:"inline-block",height:m,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${y}-only-unit`]:{height:m,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${y}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${t}-count, ${t}-dot, ${y}-custom-component`]:{transform:"translate(-50%, -50%)"}}}}},q7=e=>{const{fontHeight:t,lineWidth:n,marginXS:r,colorBorderBg:o}=e,i=t,a=n,l=e.colorTextLightSolid,u=e.colorError,d=e.colorErrorHover;return Ft(e,{badgeFontHeight:i,badgeShadowSize:a,badgeTextColor:l,badgeColor:u,badgeColorHover:d,badgeShadowColor:o,badgeProcessingDuration:"1.2s",badgeRibbonOffset:r,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},W7=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}},vce=qt("Badge",e=>{const t=q7(e);return gce(t)},W7),bce=f.forwardRef((e,t)=>{const{prefixCls:n,scrollNumberPrefixCls:r,children:o,status:i,text:a,color:l,count:u=null,overflowCount:d=99,dot:m=false,size:p="default",title:g,offset:b,style:y,className:S,rootClassName:C,classNames:w,styles:$,showZero:M=false,...T}=e,{getPrefixCls:R,direction:I,className:N,style:P,classNames:O,styles:_}=Gt("badge"),L=R("badge",n),[j,U]=vce(L),q={...e,overflowCount:d,size:p,dot:m,showZero:M},[V,B]=Xt([O,w],[_,$],{props:q}),F=u>d?`${d}+`:u,W=F==="0"||F===0||a==="0"||a===0,K=u===null||W&&!M,Q=(Qr(i)||Qr(l))&&K,D=Qr(i)||!W,z=m&&!W,Y=z?"":F,ee=f.useMemo(()=>((!Qr(Y)||Y==="")&&(!Qr(a)||a==="")||W&&!M)&&!z,[Y,W,M,z,a]),J=f.useRef(u);ee||(J.current=u);const te=J.current,ne=f.useRef(Y);ee||(ne.current=Y);const se=ne.current,ae=f.useRef(z);ee||(ae.current=z);const re=f.useMemo(()=>{if(!b)return {...P,...y};const Be=Number.parseInt(b[0],10);return {...{marginTop:b[1],insetInlineEnd:-Be},...P,...y}},[b,y,P]),de=g??(typeof te=="string"||typeof te=="number"?te:void 0),ge=!ee&&(a===0?M:!!a&&a!==true),ie=ge?f.createElement("span",{className:`${L}-status-text`},a):null,Ee=!te||typeof te!="object"?void 0:kr(te,Be=>({style:{...re,...Be.style}})),le=s1(l,false),ue=X(V.indicator,{[`${L}-status-dot`]:Q,[`${L}-status-${i}`]:!!i,[`${L}-color-${l}`]:le}),Se={};l&&!le&&(Se.color=l,Se.background=l);const ye=X(L,{[`${L}-status`]:Q,[`${L}-not-a-wrapper`]:!o,[`${L}-rtl`]:I==="rtl"},S,C,N,V.root,j,U);if(!o&&Q&&(a||D||!K)){const Be=re.color;return f.createElement("span",{ref:t,...T,className:ye,style:{...B.root,...re}},f.createElement("span",{className:ue,style:{...B.indicator,...Se}}),ge&&f.createElement("span",{style:{color:Be},className:`${L}-status-text`},a))}return f.createElement("span",{ref:t,...T,className:ye,style:B.root},o,f.createElement(So,{visible:!ee,motionName:`${L}-zoom`,motionAppear:false,motionDeadline:1e3},({className:Be})=>{const je=R("scroll-number",r),Ne=ae.current,fe=X(V.indicator,{[`${L}-dot`]:Ne,[`${L}-count`]:!Ne,[`${L}-count-sm`]:p==="small",[`${L}-multiple-words`]:!Ne&&se&&se.toString().length>1,[`${L}-status-${i}`]:!!i,[`${L}-color-${l}`]:le});let be={...B.indicator,...re};return l&&!le&&(be=be||{},be.background=l),f.createElement(cce,{prefixCls:je,show:!ee,motionClassName:Be,className:fe,count:se,title:de,style:be,key:"scrollNumber"},Ee)}),ie)}),yce=e=>{const{antCls:t,badgeFontHeight:n,marginXS:r,badgeRibbonOffset:o,calc:i}=e,a=`${t}-ribbon`,l=`${t}-ribbon-wrapper`,u=Ky(e,(d,{darkColor:m})=>({[`&${a}-color-${d}`]:{background:m,color:m}}));return {[l]:{position:"relative"},[a]:{...un(e),position:"absolute",top:r,padding:`0 ${oe(e.paddingXS)}`,color:e.colorPrimary,lineHeight:oe(n),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,[`${a}-content`]:{color:e.badgeTextColor},[`${a}-corner`]:{position:"absolute",top:"100%",width:o,height:o,color:"currentcolor",border:`${oe(i(o).div(2).equal())} solid`,transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter},...u,[`&${a}-placement-end`]:{insetInlineEnd:i(o).mul(-1).equal(),borderEndEndRadius:0,[`${a}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${a}-placement-start`]:{insetInlineStart:i(o).mul(-1).equal(),borderEndStartRadius:0,[`${a}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}}}},Sce=qt(["Badge","Ribbon"],e=>{const t=q7(e);return yce(t)},W7),Cce=e=>{const{className:t,prefixCls:n,style:r,color:o,children:i,text:a,placement:l="end",rootClassName:u,styles:d,classNames:m}=e,{getPrefixCls:p,direction:g,className:b,style:y,classNames:S,styles:C}=Gt("ribbon"),w=p("ribbon",n),$=`${w}-wrapper`,[M,T]=Sce(w,$),R={...e,placement:l},[I,N]=Xt([S,m],[C,d],{props:R}),P=s1(o,false),O=X(w,`${w}-placement-${l}`,{[`${w}-rtl`]:g==="rtl",[`${w}-color-${o}`]:P},t,b,I.indicator),_={},L={};return o&&!P&&(_.background=o,L.color=o),f.createElement("div",{className:X($,u,M,T,I.root),style:N.root},i,f.createElement("div",{className:X(O,M),style:{..._,...N.indicator,...y,...r}},f.createElement("span",{className:X(`${w}-content`,I.content),style:N.content},a),f.createElement("div",{className:`${w}-corner`,style:L})))},l1=bce;l1.Ribbon=Cce;var xce={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 xE(){return xE=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},xE.apply(this,arguments)}const wce=(e,t)=>f.createElement(Kn,xE({},e,{ref:t,icon:xce})),dp=f.forwardRef(wce),{ESC:$ce,TAB:Ece}=ot;function Mce({visible:e,triggerRef:t,onVisibleChange:n,autoFocus:r,overlayRef:o}){const i=f.useRef(false),a=()=>{e&&(t.current?.focus?.(),n?.(false));},l=()=>o.current?.focus?(o.current.focus(),i.current=true,true):false,u=d=>{switch(d.keyCode){case $ce:a();break;case Ece:{let m=false;i.current||(m=l()),m?d.preventDefault():a();break}}};f.useEffect(()=>e?(window.addEventListener("keydown",u),r&&Lt(l,3),()=>{window.removeEventListener("keydown",u),i.current=false;}):()=>{i.current=false;},[e]);}const Rce=f.forwardRef((e,t)=>{const{overlay:n,arrow:r,prefixCls:o}=e,i=f.useMemo(()=>{let l;return typeof n=="function"?l=n():l=n,l},[n]),a=Nr(t,Xl(i));return G.createElement(G.Fragment,null,r&&G.createElement("div",{className:`${o}-arrow`}),G.cloneElement(i,{ref:yu(i)?a:void 0}))}),xd={adjustX:1,adjustY:1},wd=[0,0],Tce={topLeft:{points:["bl","tl"],overflow:xd,offset:[0,-4],targetOffset:wd},top:{points:["bc","tc"],overflow:xd,offset:[0,-4],targetOffset:wd},topRight:{points:["br","tr"],overflow:xd,offset:[0,-4],targetOffset:wd},bottomLeft:{points:["tl","bl"],overflow:xd,offset:[0,4],targetOffset:wd},bottom:{points:["tc","bc"],overflow:xd,offset:[0,4],targetOffset:wd},bottomRight:{points:["tr","br"],overflow:xd,offset:[0,4],targetOffset:wd}};function wE(){return wE=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},wE.apply(this,arguments)}const G7=G.forwardRef((e,t)=>{const{arrow:n=false,prefixCls:r="rc-dropdown",transitionName:o,animation:i,align:a,placement:l="bottomLeft",placements:u=Tce,getPopupContainer:d,showAction:m,hideAction:p,overlayClassName:g,overlayStyle:b,visible:y,trigger:S=["hover"],autoFocus:C,overlay:w,children:$,onVisibleChange:M,...T}=e,[R,I]=G.useState(),N="visible"in e?y:R,P=i?`${r}-${i}`:o,O=G.useRef(null),_=G.useRef(null),L=G.useRef(null);G.useImperativeHandle(t,()=>O.current);const j=Q=>{I(Q),M?.(Q);};Mce({visible:N,triggerRef:L,onVisibleChange:j,autoFocus:C,overlayRef:_});const U=Q=>{const{onOverlayClick:D}=e;I(false),D&&D(Q);},q=()=>G.createElement(Rce,{ref:_,overlay:w,prefixCls:r,arrow:n}),V=()=>typeof w=="function"?q:q(),B=()=>{const{minOverlayWidthMatchTrigger:Q,alignPoint:D}=e;return "minOverlayWidthMatchTrigger"in e?Q:!D},F=()=>{const{openClassName:Q}=e;return Q!==void 0?Q:`${r}-open`},W=G.cloneElement($,{className:X($.props?.className,N&&F()),ref:yu($)?Nr(L,Xl($)):void 0});let K=p;return !K&&S.indexOf("contextMenu")!==-1&&(K=["click"]),G.createElement(Zy,wE({builtinPlacements:u},T,{prefixCls:r,ref:O,popupClassName:X(g,{[`${r}-show-arrow`]:n}),popupStyle:b,action:S,showAction:m,hideAction:K,popupPlacement:l,popupAlign:a,popupMotion:{motionName:P},popupVisible:N,stretch:B()?"minWidth":"",popup:V(),onOpenChange:j,onPopupClick:U,getPopupContainer:d}),W)}),Ace=e=>typeof e!="object"&&typeof e!="function"||e===null,K7=f.createContext(null);function Y7(e,t){return `${e}-${t}`}function X7(e){const t=f.useContext(K7);return Y7(t,e)}const Ca=f.createContext(null);function Nce(e,t){const n={...e};return Object.keys(t).forEach(r=>{const o=t[r];o!==void 0&&(n[r]=o);}),n}function fp({children:e,locked:t,...n}){const r=f.useContext(Ca),o=Mf(()=>Nce(r,n),[r,n],(i,a)=>!t&&(i[0]!==a[0]||!Dl(i[1],a[1],true)));return f.createElement(Ca.Provider,{value:o},e)}const Pce=[],Q7=f.createContext(null);function c1(){return f.useContext(Q7)}const Z7=f.createContext(Pce);function Of(e){const t=f.useContext(Z7);return f.useMemo(()=>e!==void 0?[...t,e]:t,[t,e])}const J7=f.createContext(null),IR=f.createContext({}),{LEFT:$E,RIGHT:EE,UP:ME,DOWN:Wb,ENTER:Gb,ESC:eF,HOME:Ym,END:Xm}=ot,kO=[ME,Wb,$E,EE];function Ice(e,t,n,r){const o="prev",i="next",a="children",l="parent";if(e==="inline"&&r===Gb)return {inlineTrigger:true};const u={[ME]:o,[Wb]:i},d={[$E]:n?i:o,[EE]:n?o:i,[Wb]:a,[Gb]:a},m={[ME]:o,[Wb]:i,[Gb]:a,[eF]:l,[$E]:n?a:l,[EE]:n?l:a};switch({inline:u,horizontal:d,vertical:m,inlineSub:u,horizontalSub:m,verticalSub:m}[`${e}${t?"":"Sub"}`]?.[r]){case o:return {offset:-1,sibling:true};case i:return {offset:1,sibling:true};case l:return {offset:-1,sibling:false};case a:return {offset:1,sibling:false};default:return null}}function Oce(e){let t=e;for(;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement;}return null}function Dce(e,t){let n=e||document.activeElement;for(;n;){if(t.has(n))return n;n=n.parentElement;}return null}function OR(e,t){return gR(e,true).filter(r=>t.has(r))}function FO(e,t,n,r=1){if(!e)return null;const o=OR(e,t),i=o.length;let a=o.findIndex(l=>n===l);return r<0?a===-1?a=i-1:a-=1:r>0&&(a+=1),a=(a+i)%i,o[a]}const q0=(e,t)=>{const n=new Set,r=new Map,o=new Map;return e.forEach(i=>{const a=document.querySelector(`[data-menu-id='${Y7(t,i)}']`);a&&(n.add(a),o.set(a,i),r.set(i,a));}),{elements:n,key2element:r,element2key:o}};function _ce(e,t,n,r,o,i,a,l,u,d){const m=f.useRef(),p=f.useRef();p.current=t;const g=()=>{Lt.cancel(m.current);};return f.useEffect(()=>()=>{g();},[]),b=>{const{which:y}=b;if([...kO,Gb,eF,Ym,Xm].includes(y)){const S=i();let C=q0(S,r);const{elements:w,key2element:$,element2key:M}=C,T=$.get(t),R=Dce(T,w),I=M.get(R),N=Ice(e,a(I,true).length===1,n,y);if(!N&&y!==Ym&&y!==Xm)return;(kO.includes(y)||[Ym,Xm].includes(y))&&b.preventDefault();const P=O=>{if(O){let _=O;const L=O.querySelector("a");L?.getAttribute("href")&&(_=L);const j=M.get(O);l(j),g(),m.current=Lt(()=>{p.current===j&&_.focus();});}};if([Ym,Xm].includes(y)||N.sibling||!R){let O;!R||e==="inline"?O=o.current:O=Oce(R);let _;const L=OR(O,w);y===Ym?_=L[0]:y===Xm?_=L[L.length-1]:_=FO(O,w,R,N.offset),P(_);}else if(N.inlineTrigger)u(I);else if(N.offset>0)u(I,true),g(),m.current=Lt(()=>{C=q0(S,r);const O=R.getAttribute("aria-controls"),_=document.getElementById(O),L=FO(_,C.elements);P(L);},5);else if(N.offset<0){const O=a(I,true),_=O[O.length-2],L=$.get(_);u(_,false),P(L);}}d?.(b);}}function Lce(e){Promise.resolve().then(e);}const DR="__RC_UTIL_PATH_SPLIT__",HO=e=>e.join(DR),zce=e=>e.split(DR),RE="rc-menu-more";function Bce(){const[,e]=f.useState({}),t=f.useRef(new Map),n=f.useRef(new Map),[r,o]=f.useState([]),i=f.useRef(0),a=f.useRef(false),l=()=>{a.current||e({});},u=f.useCallback((S,C)=>{const w=HO(C);n.current.set(w,S),t.current.set(S,w),i.current+=1;const $=i.current;Lce(()=>{$===i.current&&l();});},[]),d=f.useCallback((S,C)=>{const w=HO(C);n.current.delete(w),t.current.delete(S);},[]),m=f.useCallback(S=>{o(S);},[]),p=f.useCallback((S,C)=>{const w=t.current.get(S)||"",$=zce(w);return C&&r.includes($[0])&&$.unshift(RE),$},[r]),g=f.useCallback((S,C)=>S.filter(w=>w!==void 0).some(w=>p(w,true).includes(C)),[p]),b=()=>{const S=[...t.current.keys()];return r.length&&S.push(RE),S},y=f.useCallback(S=>{const C=`${t.current.get(S)}${DR}`,w=new Set;return [...n.current.keys()].forEach($=>{$.startsWith(C)&&w.add(n.current.get($));}),w},[]);return f.useEffect(()=>()=>{a.current=true;},[]),{registerPath:u,unregisterPath:d,refreshOverflowKeys:m,isSubPathKey:g,getKeyPath:p,getKeys:b,getSubPathKeys:y}}function Sh(e){const t=f.useRef(e);t.current=e;const n=f.useCallback((...r)=>t.current?.(...r),[]);return e?n:void 0}function tF(e,t,n,r){const{activeKey:o,onActive:i,onInactive:a}=f.useContext(Ca),l={active:o===e};return t||(l.onMouseEnter=u=>{n?.({key:e,domEvent:u}),i(e);},l.onMouseLeave=u=>{r?.({key:e,domEvent:u}),a(e);}),l}function nF(e){const{mode:t,rtl:n,inlineIndent:r}=f.useContext(Ca);if(t!=="inline")return null;const o=e;return n?{paddingRight:o*r}:{paddingLeft:o*r}}function rF({icon:e,props:t,children:n}){let r;return e===null||e===false?null:(typeof e=="function"?r=f.createElement(e,{...t}):typeof e!="boolean"&&(r=e),r||n||null)}function W0({item:e,...t}){return Object.defineProperty(t,"item",{get:()=>(wr(false,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e)}),t}function mp(){return mp=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},mp.apply(this,arguments)}class kce extends f.Component{render(){const{title:t,attribute:n,elementRef:r,...o}=this.props,i=Bn(o,["eventKey","popupClassName","popupOffset","onTitleClick"]);return wr(!n,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),f.createElement(Ms.Item,mp({},n,{title:typeof t=="string"?t:void 0},i,{ref:r}))}}const Fce=f.forwardRef((e,t)=>{const{style:n,className:r,eventKey:o,warnKey:i,disabled:a,itemIcon:l,children:u,role:d,onMouseEnter:m,onMouseLeave:p,onClick:g,onKeyDown:b,onFocus:y,...S}=e,C=X7(o),{prefixCls:w,onItemClick:$,disabled:M,overflowDisabled:T,itemIcon:R,selectedKeys:I,onActive:N}=f.useContext(Ca),{_internalRenderMenuItem:P}=f.useContext(IR),O=`${w}-item`,_=f.useRef(),L=f.useRef(),j=M||a,U=Yl(t,L),q=Of(o),V=te=>({key:o,keyPath:[...q].reverse(),item:_.current,domEvent:te}),B=l||R,{active:F,...W}=tF(o,j,m,p),K=I.includes(o),Q=nF(q.length),D=te=>{if(j)return;const ne=V(te);g?.(W0(ne)),$(ne);},z=te=>{if(b?.(te),te.which===ot.ENTER){const ne=V(te);g?.(W0(ne)),$(ne);}},Y=te=>{N(o),y?.(te);},ee={};e.role==="option"&&(ee["aria-selected"]=K);let J=f.createElement(kce,mp({ref:_,elementRef:U,role:d===null?"none":d||"menuitem",tabIndex:a?null:-1,"data-menu-id":T&&C?null:C},Bn(S,["extra"]),W,ee,{component:"li","aria-disabled":a,style:{...Q,...n},className:X(O,{[`${O}-active`]:F,[`${O}-selected`]:K,[`${O}-disabled`]:j},r),onClick:D,onKeyDown:z,onFocus:Y}),u,f.createElement(rF,{props:{...e,isSelected:K},icon:B}));return P&&(J=P(J,e,{selected:K})),J});function Hce(e,t){const{eventKey:n}=e,r=c1(),o=Of(n);return f.useEffect(()=>{if(r)return r.registerPath(n,o),()=>{r.unregisterPath(n,o);}},[o]),r?null:f.createElement(Fce,mp({},e,{ref:t}))}const ig=f.forwardRef(Hce);function TE(){return TE=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},TE.apply(this,arguments)}const Vce=({className:e,children:t,...n},r)=>{const{prefixCls:o,mode:i,rtl:a}=f.useContext(Ca);return f.createElement("ul",TE({className:X(o,a&&`${o}-rtl`,`${o}-sub`,`${o}-${i==="inline"?"inline":"vertical"}`,e),role:"menu"},n,{"data-menu-list":true,ref:r}),t)},oF=f.forwardRef(Vce);function _R(e,t){return Qo(e).map((n,r)=>{if(f.isValidElement(n)){const{key:o}=n;let i=n.props?.eventKey??o;i==null&&(i=`tmp_key-${[...t,r].join("-")}`);const l={key:i,eventKey:i};return f.cloneElement(n,l)}return n})}const ho={adjustX:1,adjustY:1},jce={topLeft:{points:["bl","tl"],overflow:ho},topRight:{points:["br","tr"],overflow:ho},bottomLeft:{points:["tl","bl"],overflow:ho},bottomRight:{points:["tr","br"],overflow:ho},leftTop:{points:["tr","tl"],overflow:ho},leftBottom:{points:["br","bl"],overflow:ho},rightTop:{points:["tl","tr"],overflow:ho},rightBottom:{points:["bl","br"],overflow:ho}},Uce={topLeft:{points:["bl","tl"],overflow:ho},topRight:{points:["br","tr"],overflow:ho},bottomLeft:{points:["tl","bl"],overflow:ho},bottomRight:{points:["tr","br"],overflow:ho},rightTop:{points:["tr","tl"],overflow:ho},rightBottom:{points:["br","bl"],overflow:ho},leftTop:{points:["tl","tr"],overflow:ho},leftBottom:{points:["bl","br"],overflow:ho}};function iF(e,t,n){if(t)return t;if(n)return n[e]||n.other}const qce={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Wce({prefixCls:e,visible:t,children:n,popup:r,popupStyle:o,popupClassName:i,popupOffset:a,disabled:l,mode:u,onVisibleChange:d}){const{getPopupContainer:m,rtl:p,subMenuOpenDelay:g,subMenuCloseDelay:b,builtinPlacements:y,triggerSubMenuAction:S,forceSubMenuRender:C,rootClassName:w,motion:$,defaultMotions:M}=f.useContext(Ca),[T,R]=f.useState(false),I=p?{...Uce,...y}:{...jce,...y},N=qce[u],P=iF(u,$,M),O=f.useRef(P);u!=="inline"&&(O.current=P);const _={...O.current,leavedClassName:`${e}-hidden`,removeOnLeave:false,motionAppear:true},L=f.useRef();return f.useEffect(()=>(L.current=Lt(()=>{R(t);}),()=>{Lt.cancel(L.current);}),[t]),f.createElement(Zy,{prefixCls:e,popupClassName:X(`${e}-popup`,{[`${e}-rtl`]:p},i,w),stretch:u==="horizontal"?"minWidth":null,getPopupContainer:m,builtinPlacements:I,popupPlacement:N,popupVisible:T,popup:r,popupStyle:o,popupAlign:a&&{offset:a},action:l?[]:[S],mouseEnterDelay:g,mouseLeaveDelay:b,onPopupVisibleChange:d,forceRender:C,popupMotion:_,fresh:true},n)}function AE(){return AE=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},AE.apply(this,arguments)}function Gce({id:e,open:t,keyPath:n,children:r}){const o="inline",{prefixCls:i,forceSubMenuRender:a,motion:l,defaultMotions:u,mode:d}=f.useContext(Ca),m=f.useRef(false);m.current=d===o;const[p,g]=f.useState(!m.current),b=m.current?t:false;f.useEffect(()=>{m.current&&g(false);},[d]);const y={...iF(o,l,u)};n.length>1&&(y.motionAppear=false);const S=y.onVisibleChanged;return y.onVisibleChanged=C=>(!m.current&&!C&&g(true),S?.(C)),p?null:f.createElement(fp,{mode:o,locked:!m.current},f.createElement(So,AE({visible:b},y,{forceRender:a,removeOnLeave:false,leavedClassName:`${i}-hidden`}),({className:C,style:w})=>f.createElement(oF,{id:e,className:C,style:w},r)))}function hp(){return hp=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},hp.apply(this,arguments)}const Kce=f.forwardRef((e,t)=>{const{style:n,className:r,styles:o,classNames:i,title:a,eventKey:l,warnKey:u,disabled:d,internalPopupClose:m,children:p,itemIcon:g,expandIcon:b,popupClassName:y,popupOffset:S,popupStyle:C,onClick:w,onMouseEnter:$,onMouseLeave:M,onTitleClick:T,onTitleMouseEnter:R,onTitleMouseLeave:I,popupRender:N,...P}=e,O=X7(l),{prefixCls:_,mode:L,openKeys:j,disabled:U,overflowDisabled:q,activeKey:V,selectedKeys:B,itemIcon:F,expandIcon:W,onItemClick:K,onOpenChange:Q,onActive:D,popupRender:z}=f.useContext(Ca),{_internalRenderSubMenuItem:Y}=f.useContext(IR),{isSubPathKey:ee}=f.useContext(J7),J=Of(),te=`${_}-submenu`,ne=U||d,se=f.useRef(),ae=f.useRef(),re=g??F,de=b??W,ge=j.includes(l),ie=!q&&ge,Ee=ee(B,l),{active:le,...ue}=tF(l,ne,R,I),[Se,ye]=f.useState(false),Be=ke=>{ne||ye(ke);},je=ke=>{Be(true),$?.({key:l,domEvent:ke});},Ne=ke=>{Be(false),M?.({key:l,domEvent:ke});},fe=f.useMemo(()=>le||(L!=="inline"?Se||ee([V],l):false),[L,le,V,Se,l,ee]),be=nF(J.length),Re=ke=>{ne||(T?.({key:l,domEvent:ke}),L==="inline"&&Q(l,!ge));},qe=Sh(ke=>{w?.(W0(ke)),K(ke);}),Qe=ke=>{L!=="inline"&&Q(l,ke);},We=()=>{D(l);},tt=O&&`${O}-popup`,rt=f.useMemo(()=>f.createElement(rF,{icon:L!=="horizontal"?de:void 0,props:{...e,isOpen:ie,isSubMenu:true}},f.createElement("i",{className:`${te}-arrow`})),[L,de,e,ie,te]);let Ze=f.createElement("div",hp({role:"menuitem",style:be,className:`${te}-title`,tabIndex:ne?null:-1,ref:se,title:typeof a=="string"?a:null,"data-menu-id":q&&O?null:O,"aria-expanded":ie,"aria-haspopup":true,"aria-controls":tt,"aria-disabled":ne,onClick:Re,onFocus:We},ue),a,rt);const Oe=f.useRef(L);L!=="inline"&&J.length>1?Oe.current="vertical":Oe.current=L;const Ye=Oe.current,Ke=f.useMemo(()=>{const ke=f.createElement(fp,{classNames:i,styles:o,mode:Ye==="horizontal"?"vertical":Ye},f.createElement(oF,{id:tt,ref:ae},p)),lt=N||z;return lt?lt(ke,{item:e,keys:J}):ke},[N,z,J,tt,p,e,Ye]);if(!q){const ke=Oe.current;Ze=f.createElement(Wce,{mode:ke,prefixCls:te,visible:!m&&ie&&L!=="inline",popupClassName:y,popupOffset:S,popupStyle:C,popup:Ke,disabled:ne,onVisibleChange:Qe},Ze);}let _e=f.createElement(Ms.Item,hp({ref:t,role:"none"},P,{component:"li",style:n,className:X(te,`${te}-${L}`,r,{[`${te}-open`]:ie,[`${te}-active`]:fe,[`${te}-selected`]:Ee,[`${te}-disabled`]:ne}),onMouseEnter:je,onMouseLeave:Ne}),Ze,!q&&f.createElement(Gce,{id:tt,open:ie,keyPath:J},p));return Y&&(_e=Y(_e,e,{selected:Ee,active:fe,open:ie,disabled:ne})),f.createElement(fp,{classNames:i,styles:o,onItemClick:qe,mode:L==="horizontal"?"vertical":L,itemIcon:re,expandIcon:de},_e)}),u1=f.forwardRef((e,t)=>{const{eventKey:n,children:r}=e,o=Of(n),i=_R(r,o),a=c1();f.useEffect(()=>{if(a)return a.registerPath(n,o),()=>{a.unregisterPath(n,o);}},[o]);let l;return a?l=i:l=f.createElement(Kce,hp({ref:t},e),i),f.createElement(Z7.Provider,{value:o},l)});function LR({className:e,style:t}){const{prefixCls:n}=f.useContext(Ca);return c1()?null:f.createElement("li",{role:"separator",className:X(`${n}-item-divider`,e),style:t})}function G0(){return G0=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},G0.apply(this,arguments)}const Yce=f.forwardRef((e,t)=>{const{className:n,title:r,eventKey:o,children:i,...a}=e,{prefixCls:l,classNames:u,styles:d}=f.useContext(Ca),m=`${l}-item-group`;return f.createElement("li",G0({ref:t,role:"presentation"},a,{onClick:p=>p.stopPropagation(),className:X(m,n)}),f.createElement("div",{role:"presentation",className:X(`${m}-title`,u?.listTitle),style:d?.listTitle,title:typeof r=="string"?r:void 0},r),f.createElement("ul",{role:"group",className:X(`${m}-list`,u?.list),style:d?.list},i))}),zR=f.forwardRef((e,t)=>{const{eventKey:n,children:r}=e,o=Of(n),i=_R(r,o);return c1()?i:f.createElement(Yce,G0({ref:t},Bn(e,["warnKey"])),i)});function Od(){return Od=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},Od.apply(this,arguments)}function NE(e,t,n){const{item:r,group:o,submenu:i,divider:a}=t;return (e||[]).map((l,u)=>{if(l&&typeof l=="object"){const{label:d,children:m,key:p,type:g,extra:b,...y}=l,S=p??`tmp-${u}`;return m||g==="group"?g==="group"?f.createElement(o,Od({key:S},y,{title:d}),NE(m,t,n)):f.createElement(i,Od({key:S},y,{title:d}),NE(m,t,n)):g==="divider"?f.createElement(a,Od({key:S},y)):f.createElement(r,Od({key:S},y,{extra:b}),d,(!!b||b===0)&&f.createElement("span",{className:`${n}-item-extra`},b))}return null}).filter(l=>l)}function VO(e,t,n,r,o){let i=e;const a={divider:LR,item:ig,group:zR,submenu:u1,...r};return t&&(i=NE(t,a,o)),_R(i,n)}function PE(){return PE=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},PE.apply(this,arguments)}const Mc=[],Xce=f.forwardRef((e,t)=>{const{prefixCls:n="rc-menu",rootClassName:r,style:o,className:i,styles:a,classNames:l,tabIndex:u=0,items:d,children:m,direction:p,id:g,mode:b="vertical",inlineCollapsed:y,disabled:S,disabledOverflow:C,subMenuOpenDelay:w=.1,subMenuCloseDelay:$=.1,forceSubMenuRender:M,defaultOpenKeys:T,openKeys:R,activeKey:I,defaultActiveFirst:N,selectable:P=true,multiple:O=false,defaultSelectedKeys:_,selectedKeys:L,onSelect:j,onDeselect:U,inlineIndent:q=24,motion:V,defaultMotions:B,triggerSubMenuAction:F="hover",builtinPlacements:W,itemIcon:K,expandIcon:Q,overflowedIndicator:D="...",overflowedIndicatorPopupClassName:z,getPopupContainer:Y,onClick:ee,onOpenChange:J,onKeyDown:te,openAnimation:ne,openTransitionName:se,_internalRenderMenuItem:ae,_internalRenderSubMenuItem:re,_internalComponents:de,popupRender:ge,...ie}=e,[Ee,le]=f.useMemo(()=>[VO(m,d,Mc,de,n),VO(m,d,Mc,{},n)],[m,d,de]),[ue,Se]=f.useState(false),ye=f.useRef(),Be=Ql(g?`rc-menu-uuid-${g}`:"rc-menu-uuid"),je=p==="rtl",[Ne,fe]=hn(T,R),be=Ne||Mc,Re=(Pe,Ue=false)=>{function ct(){fe(Pe),J?.(Pe);}Ue?Eo.flushSync(ct):ct();},[qe,Qe]=f.useState(be),We=f.useRef(false),[tt,rt]=f.useMemo(()=>(b==="inline"||b==="vertical")&&y?["vertical",y]:[b,false],[b,y]),Ze=tt==="inline",[Oe,Ye]=f.useState(tt),[Ke,_e]=f.useState(rt);f.useEffect(()=>{Ye(tt),_e(rt),We.current&&(Ze?fe(qe):Re(Mc));},[tt,rt]);const[ke,lt]=f.useState(0),At=ke>=Ee.length-1||Oe!=="horizontal"||C;f.useEffect(()=>{Ze&&Qe(be);},[be]),f.useEffect(()=>(We.current=true,()=>{We.current=false;}),[]);const{registerPath:dt,unregisterPath:Dt,refreshOverflowKeys:Tt,isSubPathKey:xt,getKeyPath:gt,getKeys:ft,getSubPathKeys:st}=Bce(),He=f.useMemo(()=>({registerPath:dt,unregisterPath:Dt}),[dt,Dt]),Ge=f.useMemo(()=>({isSubPathKey:xt}),[xt]);f.useEffect(()=>{Tt(At?Mc:Ee.slice(ke+1).map(Pe=>Pe.key));},[ke,At]);const[ve,Te]=hn(I||N&&Ee[0]?.key,I),Ce=Sh(Pe=>{Te(Pe);}),he=Sh(()=>{Te(void 0);});f.useImperativeHandle(t,()=>({list:ye.current,focus:Pe=>{const Ue=ft(),{elements:ct,key2element:Rt,element2key:_t}=q0(Ue,Be),en=OR(ye.current,ct);let dn;ve&&Ue.includes(ve)?dn=ve:dn=en[0]?_t.get(en[0]):Ee.find(lr=>!lr.props.disabled)?.key;const yn=Rt.get(dn);dn&&yn&&yn?.focus?.(Pe);},findItem:({key:Pe})=>{const Ue=ft(),{key2element:ct}=q0(Ue,Be);return ct.get(Pe)||null}}));const[Ie,we]=hn(_||[],L),Le=f.useMemo(()=>Array.isArray(Ie)?Ie:Ie==null?Mc:[Ie],[Ie]),Xe=Pe=>{if(P){const{key:Ue}=Pe,ct=Le.includes(Ue);let Rt;O?ct?Rt=Le.filter(en=>en!==Ue):Rt=[...Le,Ue]:Rt=[Ue],we(Rt);const _t={...Pe,selectedKeys:Rt};ct?U?.(_t):j?.(_t);}!O&&be.length&&Oe!=="inline"&&Re(Mc);},it=Sh(Pe=>{ee?.(W0(Pe)),Xe(Pe);}),mt=Sh((Pe,Ue)=>{let ct=be.filter(Rt=>Rt!==Pe);if(Ue)ct.push(Pe);else if(Oe!=="inline"){const Rt=st(Pe);ct=ct.filter(_t=>!Rt.has(_t));}Dl(be,ct,true)||Re(ct,true);}),Mt=_ce(Oe,ve,je,Be,ye,ft,gt,Te,(Pe,Ue)=>{const ct=Ue??!be.includes(Pe);mt(Pe,ct);},te);f.useEffect(()=>{Se(true);},[]);const Bt=f.useMemo(()=>({_internalRenderMenuItem:ae,_internalRenderSubMenuItem:re}),[ae,re]),En=Oe!=="horizontal"||C?Ee:Ee.map((Pe,Ue)=>f.createElement(fp,{key:Pe.key,overflowDisabled:Ue>ke,classNames:l,styles:a},Pe)),Ht=f.createElement(Ms,PE({id:g,ref:ye,prefixCls:`${n}-overflow`,component:"ul",itemComponent:ig,className:X(n,`${n}-root`,`${n}-${Oe}`,i,{[`${n}-inline-collapsed`]:Ke,[`${n}-rtl`]:je},r),dir:p,style:o,role:"menu",tabIndex:u,data:En,renderRawItem:Pe=>Pe,renderRawRest:Pe=>{const Ue=Pe.length,ct=Ue?Ee.slice(-Ue):null;return f.createElement(u1,{eventKey:RE,title:D,disabled:At,internalPopupClose:Ue===0,popupClassName:z},ct)},maxCount:Oe!=="horizontal"||C?Ms.INVALIDATE:Ms.RESPONSIVE,ssr:"full","data-menu-list":true,onVisibleChange:Pe=>{lt(Pe);},onKeyDown:Mt},ie));return f.createElement(IR.Provider,{value:Bt},f.createElement(K7.Provider,{value:Be},f.createElement(fp,{prefixCls:n,rootClassName:r,classNames:l,styles:a,mode:Oe,openKeys:be,rtl:je,disabled:S,motion:ue?V:null,defaultMotions:ue?B:null,activeKey:ve,onActive:Ce,onInactive:he,selectedKeys:Le,inlineIndent:q,subMenuOpenDelay:w,subMenuCloseDelay:$,forceSubMenuRender:M,builtinPlacements:W,triggerSubMenuAction:F,getPopupContainer:Y,itemIcon:K,expandIcon:Q,onItemClick:it,onOpenChange:mt,popupRender:ge},f.createElement(J7.Provider,{value:Ge},Ht),f.createElement("div",{style:{display:"none"},"aria-hidden":true},f.createElement(Q7.Provider,{value:He},le)))))}),Df=Xce;Df.Item=ig;Df.SubMenu=u1;Df.ItemGroup=zR;Df.Divider=LR;const aF=f.createContext({});var Qce={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 IE(){return IE=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},IE.apply(this,arguments)}const Zce=(e,t)=>f.createElement(Kn,IE({},e,{ref:t,icon:Qce})),BR=f.forwardRef(Zce),K0=f.createContext({prefixCls:"",firstLevel:true,inlineCollapsed:false,styles:null,classNames:null}),sF=e=>{const{prefixCls:t,className:n,dashed:r,...o}=e,{getPrefixCls:i}=f.useContext(Ct),a=i("menu",t),l=X({[`${a}-item-divider-dashed`]:!!r},n);return f.createElement(LR,{className:l,...o})},lF=e=>{const{className:t,children:n,icon:r,title:o,danger:i,extra:a}=e,{prefixCls:l,firstLevel:u,direction:d,disableMenuItemTitleTooltip:m,inlineCollapsed:p,styles:g,classNames:b}=f.useContext(K0),y=T=>{const R=n?.[0],I=f.createElement("span",{className:X(`${l}-title-content`,u?b?.itemContent:b?.subMenu?.itemContent,{[`${l}-title-content-with-extra`]:!!a||a===0}),style:u?g?.itemContent:g?.subMenu?.itemContent},n);return (!r||f.isValidElement(n)&&n.type==="span")&&n&&T&&u&&typeof R=="string"?f.createElement("div",{className:`${l}-inline-collapsed-noicon`},R.charAt(0)):I},{siderCollapsed:S}=f.useContext(aF);let C=o;typeof o>"u"?C=u?n:"":o===false&&(C="");const w={title:C};!S&&!p&&(w.title=null,w.open=false);const $=Qo(n).length;let M=f.createElement(ig,{...Bn(e,["title","icon","danger"]),className:X(u?b?.item:b?.subMenu?.item,{[`${l}-item-danger`]:i,[`${l}-item-only-child`]:(r?$+1:$)===1},t),style:{...u?g?.item:g?.subMenu?.item,...e.style},title:typeof o=="string"?o:void 0},kr(r,T=>({className:X(`${l}-item-icon`,u?b?.itemIcon:b?.subMenu?.itemIcon,T.className),style:{...u?g?.itemIcon:g?.subMenu?.itemIcon,...T.style}})),y(p));return m||(M=f.createElement(Jl,{...w,placement:d==="rtl"?"left":"right",classNames:{root:`${l}-inline-collapsed-tooltip`}},M)),M},Y0=f.createContext(null),Jce=f.forwardRef((e,t)=>{const{children:n,...r}=e,o=f.useContext(Y0),i=f.useMemo(()=>({...o,...r}),[o,r.prefixCls,r.mode,r.selectable,r.rootClassName]),a=KZ(n),l=Yl(t,a?Xl(n):null);return f.createElement(Y0.Provider,{value:i},f.createElement(kl,{space:true},a?f.cloneElement(n,{ref:l}):n))}),eue=e=>{const{componentCls:t,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:o,lineWidth:i,lineType:a,itemPaddingInline:l}=e;return {[`${t}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${oe(i)} ${a} ${o}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:l},[`> ${t}-item:hover,
> ${t}-item-active,
> ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color ${n}`,`background-color ${n}`].join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},tue=({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(${oe(n(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${oe(t)})`}}}}),jO=e=>ba(e),UO=(e,t)=>{const{componentCls:n,itemColor:r,itemSelectedColor:o,subMenuItemSelectedColor:i,groupTitleColor:a,itemBg:l,subMenuItemBg:u,itemSelectedBg:d,activeBarHeight:m,activeBarWidth:p,activeBarBorderWidth:g,motionDurationSlow:b,motionEaseInOut:y,motionEaseOut:S,itemPaddingInline:C,motionDurationMid:w,itemHoverColor:$,lineType:M,colorSplit:T,itemDisabledColor:R,dangerItemColor:I,dangerItemHoverColor:N,dangerItemSelectedColor:P,dangerItemActiveBg:O,dangerItemSelectedBg:_,popupBg:L,itemHoverBg:j,itemActiveBg:U,menuSubMenuBg:q,horizontalItemSelectedColor:V,horizontalItemSelectedBg:B,horizontalItemBorderRadius:F,horizontalItemHoverBg:W}=e;return {[`${n}-${t}, ${n}-${t} > ${n}`]:{color:r,background:l,[`&${n}-root:focus-visible`]:{...jO(e)},[`${n}-item`]:{"&-group-title, &-extra":{color:a}},[`${n}-submenu-selected > ${n}-submenu-title`]:{color:i},[`${n}-item, ${n}-submenu-title`]:{color:r,[`&:not(${n}-item-disabled):focus-visible`]:{...jO(e)}},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${R} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:$}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:j},"&:active":{backgroundColor:U}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:j},"&:active":{backgroundColor:U}}},[`${n}-item-danger`]:{color:I,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:N}},[`&${n}-item:active`]:{background:O}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:o,[`&${n}-item-danger`]:{color:P},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:d,[`&${n}-item-danger`]:{backgroundColor:_}},[`&${n}-submenu > ${n}`]:{backgroundColor:q},[`&${n}-popup > ${n}`]:{backgroundColor:L},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:L},[`&${n}-horizontal`]:{...t==="dark"?{borderBottom:0}:{},[`> ${n}-item, > ${n}-submenu`]:{top:g,marginTop:e.calc(g).mul(-1).equal(),marginBottom:0,borderRadius:F,"&::after":{position:"absolute",insetInline:C,bottom:0,borderBottom:`${oe(m)} solid transparent`,transition:`border-color ${b} ${y}`,content:'""'},"&:hover, &-active, &-open":{background:W,"&::after":{borderBottomWidth:m,borderBottomColor:V}},"&-selected":{color:V,backgroundColor:B,"&:hover":{backgroundColor:B},"&::after":{borderBottomWidth:m,borderBottomColor:V}}}},[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${oe(g)} ${M} ${T}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:u},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${oe(p)} solid ${o}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${w} ${S}`,`opacity ${w} ${S}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:P}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${w} ${y}`,`opacity ${w} ${y}`].join(",")}}}}}},qO=e=>{const{componentCls:t,itemHeight:n,itemMarginInline:r,padding:o,menuArrowSize:i,marginXS:a,itemMarginBlock:l,itemWidth:u,itemPaddingInline:d}=e,m=e.calc(i).add(o).add(a).equal();return {[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:n,lineHeight:oe(n),paddingInline:d,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:l,width:u},[`> ${t}-item,
> ${t}-submenu > ${t}-submenu-title`]:{height:n,lineHeight:oe(n)},[`${t}-item-group-list ${t}-submenu-title,
${t}-submenu-title`]:{paddingInlineEnd:m}}},nue=e=>{const{componentCls:t,iconCls:n,itemHeight:r,colorTextLightSolid:o,dropdownWidth:i,controlHeightLG:a,motionEaseOut:l,paddingXL:u,itemMarginInline:d,fontSizeLG:m,motionDurationFast:p,motionDurationSlow:g,paddingXS:b,boxShadowSecondary:y,collapsedWidth:S,collapsedIconSize:C}=e,w={height:r,lineHeight:oe(r),listStylePosition:"inside",listStyleType:"disc"};return [{[t]:{"&-inline, &-vertical":{[`&${t}-root`]:{boxShadow:"none"},...qO(e)}},[`${t}-submenu-popup`]:{[`${t}-vertical`]:{...qO(e),boxShadow:y}}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:i,maxHeight:`calc(100vh - ${oe(e.calc(a).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 ${g}`,`background-color ${g}`,`padding ${p} ${l}`].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`]:w,[`& ${t}-item-group-title`]:{paddingInlineStart:u}},[`${t}-item`]:w}},{[`${t}-inline-collapsed`]:{width:S,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:m,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% - ${oe(e.calc(C).div(2).equal())} - ${oe(d)})`,textOverflow:"clip",[`
${t}-submenu-arrow,
${t}-submenu-expand-icon
`]:{opacity:0},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:C,lineHeight:oe(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`]:{...qa,paddingInline:b}}}]},WO=e=>{const{componentCls:t,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:o,motionEaseOut:i,iconCls:a,iconSize:l,iconMarginInlineEnd:u}=e;return {[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${n}`,`background-color ${n}`,`padding calc(${n} + 0.1s) ${o}`].join(","),[`${t}-item-icon, ${a}`]:{minWidth:l,fontSize:l,transition:[`font-size ${r} ${i}`,`margin ${n} ${o}`,`color ${n}`].join(","),"+ span":{marginInlineStart:u,opacity:1,transition:[`opacity ${n} ${o}`,`margin ${n}`,`color ${n}`].join(",")}},[`${t}-item-icon`]:{...Su()},[`&${t}-item-only-child`]:{[`> ${a}, > ${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"}}}},GO=e=>{const{componentCls:t,motionDurationSlow:n,motionEaseInOut:r,borderRadius:o,menuArrowSize:i,menuArrowOffset:a}=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-color ${n} ${r}`,`transform ${n} ${r}`,`top ${n} ${r}`,`color ${n} ${r}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${oe(e.calc(a).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${oe(a)})`}}}}},rue=e=>{const{antCls:t,componentCls:n,fontSize:r,motionDurationSlow:o,motionDurationMid:i,motionEaseInOut:a,paddingXS:l,padding:u,colorSplit:d,lineWidth:m,zIndexPopup:p,borderRadiusLG:g,subMenuItemBorderRadius:b,menuArrowSize:y,menuArrowOffset:S,lineType:C,groupTitleLineHeight:w,groupTitleFontSize:$}=e;return [{"":{[n]:{...P0(),"&-hidden":{display:"none"}}},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:{...un(e),...P0(),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:`${oe(l)} ${oe(u)}`,fontSize:$,lineHeight:w,transition:`all ${o}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color ${o} ${a}`,`background-color ${o} ${a}`].join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${o} ${a}`,`background-color ${o} ${a}`,`padding ${i} ${a}`].join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:[`background-color ${o} ${a}`,`padding ${o} ${a}`].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:d,borderStyle:C,borderWidth:0,borderTopWidth:m,marginBlock:m,padding:0,"&-dashed":{borderStyle:"dashed"}},...WO(e),[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${oe(e.calc(r).mul(2).equal())} ${oe(u)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:p,borderRadius:g,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:g,...WO(e),...GO(e),[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:b},[`${n}-submenu-title::after`]:{transition:`transform ${o} ${a}`}}},"\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}},...GO(e),[`&-inline-collapsed ${n}-submenu-arrow,
&-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${oe(S)})`},"&::after":{transform:`rotate(45deg) translateX(${oe(e.calc(S).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${oe(e.calc(y).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${oe(e.calc(S).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${oe(S)})`}}}},{[`${t}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},oue=e=>{const{colorPrimary:t,colorError:n,colorTextDisabled:r,colorErrorBg:o,colorText:i,colorTextDescription:a,colorBgContainer:l,colorFillAlter:u,colorFillContent:d,lineWidth:m,lineWidthBold:p,controlItemBgActive:g,colorBgTextHover:b,controlHeightLG:y,lineHeight:S,colorBgElevated:C,marginXXS:w,padding:$,fontSize:M,controlHeightSM:T,fontSizeLG:R,colorTextLightSolid:I,colorErrorHover:N}=e,P=e.activeBarWidth??0,O=e.activeBarBorderWidth??m,_=e.itemMarginInline??e.marginXXS,L=new cn(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:a,groupTitleColor:a,colorItemTextSelected:t,itemSelectedColor:t,subMenuItemSelectedColor:t,colorItemTextSelectedHorizontal:t,horizontalItemSelectedColor:t,colorItemBg:l,itemBg:l,colorItemBgHover:b,itemHoverBg:b,colorItemBgActive:d,itemActiveBg:g,colorSubItemBg:u,subMenuItemBg:u,colorItemBgSelected:g,itemSelectedBg:g,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:P,colorActiveBarHeight:p,activeBarHeight:p,colorActiveBarBorderSize:m,activeBarBorderWidth:O,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:_,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:y,groupTitleLineHeight:S,collapsedWidth:y*2,popupBg:C,itemMarginBlock:w,itemPaddingInline:$,horizontalLineHeight:`${y*1.15}px`,iconSize:M,iconMarginInlineEnd:T-M,collapsedIconSize:R,groupTitleFontSize:M,darkItemDisabledColor:new cn(I).setA(.25).toRgbString(),darkItemColor:L,darkDangerItemColor:n,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:I,darkItemSelectedBg:t,darkDangerItemSelectedBg:n,darkItemHoverBg:"transparent",darkGroupTitleColor:L,darkItemHoverColor:I,darkDangerItemHoverColor:N,darkDangerItemSelectedColor:I,darkDangerItemActiveBg:n,itemWidth:P?`calc(100% + ${O}px)`:`calc(100% - ${_*2}px)`}},iue=(e,t=e,n=true)=>qt("Menu",o=>{const{colorBgElevated:i,controlHeightLG:a,fontSize:l,darkItemColor:u,darkDangerItemColor:d,darkItemBg:m,darkSubMenuItemBg:p,darkItemSelectedColor:g,darkItemSelectedBg:b,darkDangerItemSelectedBg:y,darkItemHoverBg:S,darkGroupTitleColor:C,darkItemHoverColor:w,darkItemDisabledColor:$,darkDangerItemHoverColor:M,darkDangerItemSelectedColor:T,darkDangerItemActiveBg:R,popupBg:I,darkPopupBg:N}=o,P=o.calc(l).div(7).mul(5).equal(),O=Ft(o,{menuArrowSize:P,menuHorizontalHeight:o.calc(a).mul(1.15).equal(),menuArrowOffset:o.calc(P).mul(.25).equal(),menuSubMenuBg:i,calc:o.calc,popupBg:I}),_=Ft(O,{itemColor:u,itemHoverColor:w,groupTitleColor:C,itemSelectedColor:g,subMenuItemSelectedColor:g,itemBg:m,popupBg:N,subMenuItemBg:p,itemActiveBg:"transparent",itemSelectedBg:b,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:S,itemDisabledColor:$,dangerItemColor:d,dangerItemHoverColor:M,dangerItemSelectedColor:T,dangerItemActiveBg:R,dangerItemSelectedBg:y,menuSubMenuBg:p,horizontalItemSelectedColor:g,horizontalItemSelectedBg:b});return [rue(O),eue(O),nue(O),UO(O,"light"),UO(_,"dark"),tue(O),Ak(O),Bl(O,"slide-up"),Bl(O,"slide-down"),Qp(O,"zoom-big")]},oue,{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),cF=e=>{const{popupClassName:t,icon:n,title:r,theme:o}=e,i=f.useContext(K0),{prefixCls:a,inlineCollapsed:l,theme:u,classNames:d,styles:m}=i,p=Of();let g;if(!n)g=l&&!p.length&&r&&typeof r=="string"?f.createElement("div",{className:`${a}-inline-collapsed-noicon`},r.charAt(0)):f.createElement("span",{className:`${a}-title-content`},r);else {const S=f.isValidElement(r)&&r.type==="span";g=f.createElement(f.Fragment,null,kr(n,C=>({className:X(C.className,`${a}-item-icon`,d?.itemIcon),style:{...C.style,...m?.itemIcon}})),S?r:f.createElement("span",{className:`${a}-title-content`},r));}const b=f.useMemo(()=>({...i,firstLevel:false}),[i]),[y]=xu("Menu");return f.createElement(K0.Provider,{value:b},f.createElement(u1,{...Bn(e,["icon"]),title:g,classNames:{list:d?.subMenu?.list,listTitle:d?.subMenu?.itemTitle},styles:{list:m?.subMenu?.list,listTitle:m?.subMenu?.itemTitle},popupClassName:X(a,t,d?.popup?.root,`${a}-${o||u}`),popupStyle:{zIndex:y,...e.popupStyle,...m?.popup?.root}}))};function Jx(e){return e===null||e===false}const aue={item:lF,submenu:cF,divider:sF},sue=f.forwardRef((e,t)=>{const n=f.useContext(Y0),r=n||{},{prefixCls:o,className:i,style:a,theme:l="light",expandIcon:u,_internalDisableMenuItemTitleTooltip:d,inlineCollapsed:m,siderCollapsed:p,rootClassName:g,mode:b,selectable:y,onClick:S,overflowedIndicatorPopupClassName:C,classNames:w,styles:$,...M}=e,{menu:T}=f.useContext(Ct),{getPrefixCls:R,getPopupContainer:I,direction:N,className:P,style:O,classNames:_,styles:L}=Gt("menu"),j=R(),U=Bn(M,["collapsedWidth"]);r.validator?.({mode:b});const q=Et((...ae)=>{S?.(...ae),r.onClick?.();}),V=r.mode||b,B=y??r.selectable,F=m??p,W={...e,mode:V,inlineCollapsed:F,selectable:B,theme:l},[K,Q]=Xt([_,w],[L,$],{props:W},{popup:{_default:"root"},subMenu:{_default:"item"}}),D={horizontal:{motionName:`${j}-slide-up`},inline:bk(j),other:{motionName:`${j}-zoom-big`}},z=R("menu",o||r.prefixCls),Y=Yn(z),[ee,J]=iue(z,Y,!n),te=X(`${z}-${l}`,P,i),ne=f.useMemo(()=>{if(typeof u=="function"||Jx(u))return u||null;if(typeof r.expandIcon=="function"||Jx(r.expandIcon))return r.expandIcon||null;if(typeof T?.expandIcon=="function"||Jx(T?.expandIcon))return T?.expandIcon||null;const ae=u??r?.expandIcon??T?.expandIcon;return kr(ae,{className:X(`${z}-submenu-expand-icon`,f.isValidElement(ae)?ae.props?.className:void 0)})},[u,r?.expandIcon,T?.expandIcon,z]),se=f.useMemo(()=>({prefixCls:z,inlineCollapsed:F||false,direction:N,firstLevel:true,theme:l,mode:V,disableMenuItemTitleTooltip:d,classNames:K,styles:Q}),[z,F,N,d,l,V,K,Q]);return f.createElement(Y0.Provider,{value:null},f.createElement(K0.Provider,{value:se},f.createElement(Df,{getPopupContainer:I,overflowedIndicator:f.createElement(BR,null),overflowedIndicatorPopupClassName:X(z,`${z}-${l}`,C),classNames:{list:K.list,listTitle:K.itemTitle},styles:{list:Q.list,listTitle:Q.itemTitle},mode:V,selectable:B,onClick:q,...U,inlineCollapsed:F,style:{...Q.root,...O,...a},className:te,prefixCls:z,direction:N,defaultMotions:D,expandIcon:ne,ref:t,rootClassName:X(g,ee,r.rootClassName,J,Y,K.root),_internalComponents:aue})))}),ec=f.forwardRef((e,t)=>{const n=f.useRef(null),r=f.useContext(aF);return f.useImperativeHandle(t,()=>({menu:n.current,focus:o=>{n.current?.focus(o);}})),f.createElement(sue,{ref:n,...e,...r})});ec.Item=lF;ec.SubMenu=cF;ec.Divider=sF;ec.ItemGroup=zR;const lue=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}}}}}},cue=e=>{const{componentCls:t,menuCls:n,zIndexPopup:r,dropdownArrowDistance:o,sizePopupArrow:i,antCls:a,iconCls:l,motionDurationMid:u,paddingBlock:d,fontSize:m,dropdownEdgeChildPadding:p,colorTextDisabled:g,fontSizeIcon:b,controlPaddingHorizontal:y,colorBgElevated:S}=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${a}-btn`]:{[`& > ${l}-down, & > ${a}-btn-icon > ${l}-down`]:{fontSize:b}},[`${t}-wrap`]:{position:"relative",[`${a}-btn > ${l}-down`]:{fontSize:b},[`${l}-down::before`]:{transition:`transform ${u}`}},[`${t}-wrap-open`]:{[`${l}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottomLeft,
&${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomLeft,
&${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottom,
&${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottom,
&${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottomRight,
&${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:lR},[`&${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-topLeft,
&${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-topLeft,
&${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-top,
&${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-top,
&${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-topRight,
&${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-topRight`]:{animationName:uR},[`&${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottomLeft,
&${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottom,
&${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:cR},[`&${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-topLeft,
&${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-top,
&${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-topRight`]:{animationName:dR}}},NR(e,S,{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`]:{...un(e),[n]:{padding:p,listStyleType:"none",backgroundColor:S,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,...$i(e),"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${oe(d)} ${oe(y)}`,color:e.colorTextDescription,transition:`all ${u}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${n}-item-icon`]:{minWidth:m,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 ${u}`,"&: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:`${oe(d)} ${oe(y)}`,color:e.colorText,fontWeight:"normal",fontSize:m,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${u}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover},...$i(e),"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:g,cursor:"not-allowed","&:hover":{color:g,backgroundColor:S,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${oe(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:b,fontStyle:"normal"}}},[`${n}-item-group-list`]:{margin:`0 ${oe(e.marginXS)}`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(y).add(e.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:g,backgroundColor:S,cursor:"not-allowed"}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}}}},[Bl(e,"slide-up"),Bl(e,"slide-down"),B0(e,"move-up"),B0(e,"move-down"),Qp(e,"zoom-big")]]},uue=e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...a1({contentRadius:e.borderRadiusLG,limitVerticalRadius:true}),...AR(e)}),due=qt("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:o}=e,i=Ft(e,{menuCls:`${o}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return [cue(i),lue(i)]},uue,{resetStyle:false}),d1=e=>{const{menu:t,arrow:n,prefixCls:r,children:o,trigger:i,disabled:a,dropdownRender:l,popupRender:u,getPopupContainer:d,overlayClassName:m,rootClassName:p,overlayStyle:g,open:b,onOpenChange:y,mouseEnterDelay:S=.15,mouseLeaveDelay:C=.1,autoAdjustOverflow:w=true,placement:$="",transitionName:M,classNames:T,styles:R,destroyPopupOnHide:I,destroyOnHidden:N}=e,{getPrefixCls:P,direction:O,getPopupContainer:_,className:L,style:j,classNames:U,styles:q}=Gt("dropdown"),V={...e,mouseEnterDelay:S,mouseLeaveDelay:C,autoAdjustOverflow:w},[B,F]=Xt([U,T],[q,R],{props:V}),W={...j,...g,...F.root},K=u||l,Q=f.useMemo(()=>{const Ne=P();return M!==void 0?M:$.includes("top")?`${Ne}-slide-down`:`${Ne}-slide-up`},[P,$,M]),D=f.useMemo(()=>$?$.includes("Center")?$.slice(0,$.indexOf("Center")):$:O==="rtl"?"bottomRight":"bottomLeft",[$,O]),z=P("dropdown",r),Y=Yn(z),[ee,J]=due(z,Y),[,te]=Fr(),ne=f.Children.only(Ace(o)?f.createElement("span",null,o):o),se=kr(ne,{className:X(`${z}-trigger`,{[`${z}-rtl`]:O==="rtl"},ne.props.className),disabled:ne.props.disabled??a}),ae=a?[]:i,re=!!ae?.includes("contextMenu"),[de,ge]=hn(false,b),ie=Et(Ne=>{y?.(Ne,{source:"trigger"}),ge(Ne);}),Ee=X(m,p,ee,J,Y,L,B.root,{[`${z}-rtl`]:O==="rtl"}),le=k7({arrowPointAtCenter:typeof n=="object"&&n.pointAtCenter,autoAdjustOverflow:w,offset:te.marginXXS,arrowWidth:n?te.sizePopupArrow:0,borderRadius:te.borderRadius}),ue=Et(()=>{t?.selectable&&t?.multiple||(y?.(false,{source:"menu"}),ge(false));}),Se=()=>{const Ne=Bn(B,["root"]),fe=Bn(F,["root"]);let be;return t?.items&&(be=f.createElement(ec,{...t,classNames:{...Ne,subMenu:{...Ne}},styles:{...fe,subMenu:{...fe}}})),K&&(be=K(be)),be=f.Children.only(typeof be=="string"?f.createElement("span",null,be):be),f.createElement(Jce,{prefixCls:`${z}-menu`,rootClassName:X(J,Y),expandIcon:f.createElement("span",{className:`${z}-menu-submenu-arrow`},O==="rtl"?f.createElement(dp,{className:`${z}-menu-submenu-arrow-icon`}):f.createElement(sf,{className:`${z}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:false,onClick:ue,validator:({mode:Re})=>{}},be)},[ye,Be]=xu("Dropdown",W.zIndex);let je=f.createElement(G7,{alignPoint:re,...Bn(e,["rootClassName","onOpenChange"]),mouseEnterDelay:S,mouseLeaveDelay:C,visible:de,builtinPlacements:le,arrow:!!n,overlayClassName:Ee,prefixCls:z,getPopupContainer:d||_,transitionName:Q,trigger:ae,overlay:Se,placement:D,onVisibleChange:ie,overlayStyle:{...W,zIndex:ye},autoDestroy:N??I},se);return ye&&(je=f.createElement(Xy.Provider,{value:Be},je)),je},fue=SR(d1,"align",void 0,"dropdown",e=>e),mue=e=>f.createElement(fue,{...e},f.createElement("span",null));d1._InternalPanelDoNotUseOrYouWillBeFired=mue;var Kb={exports:{}},hue=Kb.exports,KO;function pue(){return KO||(KO=1,(function(e,t){(function(n,r){e.exports=r();})(hue,(function(){var n=1e3,r=6e4,o=36e5,i="millisecond",a="second",l="minute",u="hour",d="day",m="week",p="month",g="quarter",b="year",y="date",S="Invalid Date",C=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,$={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(q){var V=["th","st","nd","rd"],B=q%100;return "["+q+(V[(B-20)%10]||V[B]||V[0])+"]"}},M=function(q,V,B){var F=String(q);return !F||F.length>=V?q:""+Array(V+1-F.length).join(B)+q},T={s:M,z:function(q){var V=-q.utcOffset(),B=Math.abs(V),F=Math.floor(B/60),W=B%60;return (V<=0?"+":"-")+M(F,2,"0")+":"+M(W,2,"0")},m:function q(V,B){if(V.date()<B.date())return -q(B,V);var F=12*(B.year()-V.year())+(B.month()-V.month()),W=V.clone().add(F,p),K=B-W<0,Q=V.clone().add(F+(K?-1:1),p);return +(-(F+(B-W)/(K?W-Q:Q-W))||0)},a:function(q){return q<0?Math.ceil(q)||0:Math.floor(q)},p:function(q){return {M:p,y:b,w:m,d,D:y,h:u,m:l,s:a,ms:i,Q:g}[q]||String(q||"").toLowerCase().replace(/s$/,"")},u:function(q){return q===void 0}},R="en",I={};I[R]=$;var N="$isDayjsObject",P=function(q){return q instanceof j||!(!q||!q[N])},O=function q(V,B,F){var W;if(!V)return R;if(typeof V=="string"){var K=V.toLowerCase();I[K]&&(W=K),B&&(I[K]=B,W=K);var Q=V.split("-");if(!W&&Q.length>1)return q(Q[0])}else {var D=V.name;I[D]=V,W=D;}return !F&&W&&(R=W),W||!F&&R},_=function(q,V){if(P(q))return q.clone();var B=typeof V=="object"?V:{};return B.date=q,B.args=arguments,new j(B)},L=T;L.l=O,L.i=P,L.w=function(q,V){return _(q,{locale:V.$L,utc:V.$u,x:V.$x,$offset:V.$offset})};var j=(function(){function q(B){this.$L=O(B.locale,null,true),this.parse(B),this.$x=this.$x||B.x||{},this[N]=true;}var V=q.prototype;return V.parse=function(B){this.$d=(function(F){var W=F.date,K=F.utc;if(W===null)return new Date(NaN);if(L.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var Q=W.match(C);if(Q){var D=Q[2]-1||0,z=(Q[7]||"0").substring(0,3);return K?new Date(Date.UTC(Q[1],D,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,z)):new Date(Q[1],D,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,z)}}return new Date(W)})(B),this.init();},V.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds();},V.$utils=function(){return L},V.isValid=function(){return this.$d.toString()!==S},V.isSame=function(B,F){var W=_(B);return this.startOf(F)<=W&&W<=this.endOf(F)},V.isAfter=function(B,F){return _(B)<this.startOf(F)},V.isBefore=function(B,F){return this.endOf(F)<_(B)},V.$g=function(B,F,W){return L.u(B)?this[F]:this.set(W,B)},V.unix=function(){return Math.floor(this.valueOf()/1e3)},V.valueOf=function(){return this.$d.getTime()},V.startOf=function(B,F){var W=this,K=!!L.u(F)||F,Q=L.p(B),D=function(ae,re){var de=L.w(W.$u?Date.UTC(W.$y,re,ae):new Date(W.$y,re,ae),W);return K?de:de.endOf(d)},z=function(ae,re){return L.w(W.toDate()[ae].apply(W.toDate("s"),(K?[0,0,0,0]:[23,59,59,999]).slice(re)),W)},Y=this.$W,ee=this.$M,J=this.$D,te="set"+(this.$u?"UTC":"");switch(Q){case b:return K?D(1,0):D(31,11);case p:return K?D(1,ee):D(0,ee+1);case m:var ne=this.$locale().weekStart||0,se=(Y<ne?Y+7:Y)-ne;return D(K?J-se:J+(6-se),ee);case d:case y:return z(te+"Hours",0);case u:return z(te+"Minutes",1);case l:return z(te+"Seconds",2);case a:return z(te+"Milliseconds",3);default:return this.clone()}},V.endOf=function(B){return this.startOf(B,false)},V.$set=function(B,F){var W,K=L.p(B),Q="set"+(this.$u?"UTC":""),D=(W={},W[d]=Q+"Date",W[y]=Q+"Date",W[p]=Q+"Month",W[b]=Q+"FullYear",W[u]=Q+"Hours",W[l]=Q+"Minutes",W[a]=Q+"Seconds",W[i]=Q+"Milliseconds",W)[K],z=K===d?this.$D+(F-this.$W):F;if(K===p||K===b){var Y=this.clone().set(y,1);Y.$d[D](z),Y.init(),this.$d=Y.set(y,Math.min(this.$D,Y.daysInMonth())).$d;}else D&&this.$d[D](z);return this.init(),this},V.set=function(B,F){return this.clone().$set(B,F)},V.get=function(B){return this[L.p(B)]()},V.add=function(B,F){var W,K=this;B=Number(B);var Q=L.p(F),D=function(ee){var J=_(K);return L.w(J.date(J.date()+Math.round(ee*B)),K)};if(Q===p)return this.set(p,this.$M+B);if(Q===b)return this.set(b,this.$y+B);if(Q===d)return D(1);if(Q===m)return D(7);var z=(W={},W[l]=r,W[u]=o,W[a]=n,W)[Q]||1,Y=this.$d.getTime()+B*z;return L.w(Y,this)},V.subtract=function(B,F){return this.add(-1*B,F)},V.format=function(B){var F=this,W=this.$locale();if(!this.isValid())return W.invalidDate||S;var K=B||"YYYY-MM-DDTHH:mm:ssZ",Q=L.z(this),D=this.$H,z=this.$m,Y=this.$M,ee=W.weekdays,J=W.months,te=W.meridiem,ne=function(re,de,ge,ie){return re&&(re[de]||re(F,K))||ge[de].slice(0,ie)},se=function(re){return L.s(D%12||12,re,"0")},ae=te||function(re,de,ge){var ie=re<12?"AM":"PM";return ge?ie.toLowerCase():ie};return K.replace(w,(function(re,de){return de||(function(ge){switch(ge){case "YY":return String(F.$y).slice(-2);case "YYYY":return L.s(F.$y,4,"0");case "M":return Y+1;case "MM":return L.s(Y+1,2,"0");case "MMM":return ne(W.monthsShort,Y,J,3);case "MMMM":return ne(J,Y);case "D":return F.$D;case "DD":return L.s(F.$D,2,"0");case "d":return String(F.$W);case "dd":return ne(W.weekdaysMin,F.$W,ee,2);case "ddd":return ne(W.weekdaysShort,F.$W,ee,3);case "dddd":return ee[F.$W];case "H":return String(D);case "HH":return L.s(D,2,"0");case "h":return se(1);case "hh":return se(2);case "a":return ae(D,z,true);case "A":return ae(D,z,false);case "m":return String(z);case "mm":return L.s(z,2,"0");case "s":return String(F.$s);case "ss":return L.s(F.$s,2,"0");case "SSS":return L.s(F.$ms,3,"0");case "Z":return Q}return null})(re)||Q.replace(":","")}))},V.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},V.diff=function(B,F,W){var K,Q=this,D=L.p(F),z=_(B),Y=(z.utcOffset()-this.utcOffset())*r,ee=this-z,J=function(){return L.m(Q,z)};switch(D){case b:K=J()/12;break;case p:K=J();break;case g:K=J()/3;break;case m:K=(ee-Y)/6048e5;break;case d:K=(ee-Y)/864e5;break;case u:K=ee/o;break;case l:K=ee/r;break;case a:K=ee/n;break;default:K=ee;}return W?K:L.a(K)},V.daysInMonth=function(){return this.endOf(p).$D},V.$locale=function(){return I[this.$L]},V.locale=function(B,F){if(!B)return this.$L;var W=this.clone(),K=O(B,F,true);return K&&(W.$L=K),W},V.clone=function(){return L.w(this.$d,this)},V.toDate=function(){return new Date(this.valueOf())},V.toJSON=function(){return this.isValid()?this.toISOString():null},V.toISOString=function(){return this.$d.toISOString()},V.toString=function(){return this.$d.toUTCString()},q})(),U=j.prototype;return _.prototype=U,[["$ms",i],["$s",a],["$m",l],["$H",u],["$W",d],["$M",p],["$y",b],["$D",y]].forEach((function(q){U[q[1]]=function(V){return this.$g(V,q[0],q[1])};})),_.extend=function(q,V){return q.$i||(q(V,j,_),q.$i=true),_},_.locale=O,_.isDayjs=P,_.unix=function(q){return _(1e3*q)},_.en=I[R],_.Ls=I,_.p={},_}));})(Kb)),Kb.exports}var gue=pue();const Gn=Io(gue);function vue(e){return e===void 0||e===false?[]:Array.isArray(e)?e:[e]}function bue(e){return vue(e).join("_")}const uF=f.createContext(void 0),yue=uF.Provider,dF=f.createContext(void 0),Sue=dF.Provider;function OE(){return OE=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},OE.apply(this,arguments)}const fF=f.forwardRef((e,t)=>{const{prefixCls:n="rc-checkbox",className:r,style:o,checked:i,disabled:a,defaultChecked:l=false,type:u="checkbox",title:d,onChange:m,...p}=e,g=f.useRef(null),b=f.useRef(null),[y,S]=hn(l,i);f.useImperativeHandle(t,()=>({focus:$=>{g.current?.focus($);},blur:()=>{g.current?.blur();},input:g.current,nativeElement:b.current}));const C=X(n,r,{[`${n}-checked`]:y,[`${n}-disabled`]:a}),w=$=>{a||("checked"in e||S($.target.checked),m?.({target:{...e,type:u,checked:$.target.checked},stopPropagation(){$.stopPropagation();},preventDefault(){$.preventDefault();},nativeEvent:$.nativeEvent}));};return f.createElement("span",{className:C,title:d,style:o,ref:b},f.createElement("input",OE({},p,{className:`${n}-input`,ref:g,onChange:w,disabled:a,checked:!!y,type:u})),f.createElement("span",{className:`${n}-inner`}))});function mF(e){const t=G.useRef(null),n=()=>{Lt.cancel(t.current),t.current=null;};return [()=>{n(),t.current=Lt(()=>{t.current=null;});},i=>{t.current&&(i.stopPropagation(),n()),e?.(i);}]}const Cue=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-group`;return {[r]:{...un(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}}}},xue=e=>{const{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:r,radioSize:o,motionDurationSlow:i,motionDurationMid:a,motionEaseInOutCirc:l,colorBgContainer:u,colorBorder:d,lineWidth:m,colorBgContainerDisabled:p,colorTextDisabled:g,paddingXS:b,dotColorDisabled:y,lineType:S,radioColor:C,radioBgColor:w,calc:$}=e,M=`${t}-inner`,R=$(o).sub($(4).mul(2)),I=$(1).mul(o).equal({unit:true});return {[`${t}-wrapper`]:{...un(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:`${oe(m)} ${S} ${r}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[t]:{...un(e),position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"},[`${t}-wrapper:hover &,
&:hover ${M}`]:{borderColor:r},[`${t}-input:focus-visible + ${M}`]:ba(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:$(1).mul(o).div(-2).equal({unit:true}),marginInlineStart:$(1).mul(o).div(-2).equal({unit:true}),backgroundColor:C,borderBlockStart:0,borderInlineStart:0,borderRadius:I,transform:"scale(0)",opacity:0,transition:`all ${i} ${l}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:I,height:I,backgroundColor:u,borderColor:d,borderStyle:"solid",borderWidth:m,borderRadius:"50%",transition:`all ${a}`},[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${t}-checked`]:{[M]:{borderColor:r,backgroundColor:w,"&::after":{transform:`scale(${e.calc(e.dotSize).div(o).equal()})`,opacity:1,transition:`all ${i} ${l}`}}},[`${t}-disabled`]:{cursor:"not-allowed",[M]:{backgroundColor:p,borderColor:d,cursor:"not-allowed","&::after":{backgroundColor:y}},[`${t}-input`]:{cursor:"not-allowed"},[`${t}-disabled + span`]:{color:g,cursor:"not-allowed"},[`&${t}-checked`]:{[M]:{"&::after":{transform:`scale(${$(R).div(o).equal()})`}}}},[`span${t} + *`]:{paddingInlineStart:b,paddingInlineEnd:b}}}},wue=e=>{const{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:o,lineType:i,colorBorder:a,motionDurationMid:l,buttonPaddingInline:u,fontSize:d,buttonBg:m,fontSizeLG:p,controlHeightLG:g,controlHeightSM:b,paddingXS:y,borderRadius:S,borderRadiusSM:C,borderRadiusLG:w,buttonCheckedBg:$,buttonSolidCheckedColor:M,colorTextDisabled:T,colorBgContainerDisabled:R,buttonCheckedBgDisabled:I,buttonCheckedColorDisabled:N,colorPrimary:P,colorPrimaryHover:O,colorPrimaryActive:_,buttonSolidCheckedBg:L,buttonSolidCheckedHoverBg:j,buttonSolidCheckedActiveBg:U,calc:q}=e;return {[`${r}-button-wrapper`]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:u,paddingBlock:0,color:t,fontSize:d,lineHeight:oe(q(n).sub(q(o).mul(2)).equal()),background:m,border:`${oe(o)} ${i} ${a}`,borderBlockStartWidth:q(o).add(.02).equal(),borderInlineEndWidth:o,cursor:"pointer",transition:[`color ${l}`,`background-color ${l}`,`box-shadow ${l}`].join(","),a:{color:t},[`> ${r}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:last-child)":{marginInlineEnd:q(o).mul(-1).equal()},"&:first-child":{borderInlineStart:`${oe(o)} ${i} ${a}`,borderStartStartRadius:S,borderEndStartRadius:S},"&:last-child":{borderStartEndRadius:S,borderEndEndRadius:S},"&:first-child:last-child":{borderRadius:S},[`${r}-group-large &`]:{height:g,fontSize:p,lineHeight:oe(q(g).sub(q(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:w,borderEndStartRadius:w},"&:last-child":{borderStartEndRadius:w,borderEndEndRadius:w}},[`${r}-group-small &`]:{height:b,paddingInline:q(y).sub(o).equal(),paddingBlock:0,lineHeight:oe(q(b).sub(q(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:C,borderEndStartRadius:C},"&:last-child":{borderStartEndRadius:C,borderEndEndRadius:C}},"&:hover":{position:"relative",color:P},"&:has(:focus-visible)":ba(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:P,background:$,borderColor:P,"&::before":{backgroundColor:P},"&:first-child":{borderColor:P},"&:hover":{color:O,borderColor:O,"&::before":{backgroundColor:O}},"&:active":{color:_,borderColor:_,"&::before":{backgroundColor:_}}},[`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]:{color:M,background:L,borderColor:L,"&:hover":{color:M,background:j,borderColor:j},"&:active":{color:M,background:U,borderColor:U}},"&-disabled":{color:T,backgroundColor:R,borderColor:a,cursor:"not-allowed","&:first-child, &:hover":{color:T,backgroundColor:R,borderColor:a}},[`&-disabled${r}-button-wrapper-checked`]:{color:N,backgroundColor:I,borderColor:a,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},$ue=e=>{const{wireframe:t,padding:n,marginXS:r,lineWidth:o,fontSizeLG:i,colorText:a,colorBgContainer:l,colorTextDisabled:u,controlItemBgActiveDisabled:d,colorTextLightSolid:m,colorPrimary:p,colorPrimaryHover:g,colorPrimaryActive:b,colorWhite:y}=e,S=4,C=i,w=t?C-S*2:C-(S+o)*2;return {radioSize:C,dotSize:w,dotColorDisabled:u,buttonSolidCheckedColor:m,buttonSolidCheckedBg:p,buttonSolidCheckedHoverBg:g,buttonSolidCheckedActiveBg:b,buttonBg:l,buttonCheckedBg:l,buttonColor:a,buttonCheckedBgDisabled:d,buttonCheckedColorDisabled:u,buttonPaddingInline:n-o,wrapperMarginInlineEnd:r,radioColor:t?p:y,radioBgColor:t?l:p}},hF=qt("Radio",e=>{const{controlOutline:t,controlOutlineWidth:n}=e,r=`0 0 0 ${oe(n)} ${t}`,i=Ft(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return [Cue(i),xue(i),wue(i)]},$ue,{unitless:{radioSize:true,dotSize:true}}),Eue=(e,t)=>{const n=f.useContext(uF),r=f.useContext(dF),{getPrefixCls:o,direction:i,className:a,style:l,classNames:u,styles:d}=Gt("radio"),m=f.useRef(null),p=Nr(t,m),{isFormItemInput:g}=f.useContext(yo),b=D=>{e.onChange?.(D),n?.onChange?.(D);},{prefixCls:y,className:S,rootClassName:C,children:w,style:$,title:M,classNames:T,styles:R,...I}=e,N=o("radio",y),P=(n?.optionType||r)==="button",O=P?`${N}-button`:N,_=Yn(N),[L,j]=hF(N,_),U={...I},q=f.useContext(to);n&&(U.name=n.name,U.onChange=b,U.checked=e.value===n.value,U.disabled=U.disabled??n.disabled),U.disabled=U.disabled??q;const V={...e,...U},[B,F]=Xt([u,T],[d,R],{props:V}),W=X(`${O}-wrapper`,{[`${O}-wrapper-checked`]:U.checked,[`${O}-wrapper-disabled`]:U.disabled,[`${O}-wrapper-rtl`]:i==="rtl",[`${O}-wrapper-in-form-item`]:g,[`${O}-wrapper-block`]:!!n?.block},a,S,C,B.root,L,j,_),[K,Q]=mF(U.onClick);return f.createElement(Xp,{component:"Radio",disabled:U.disabled},f.createElement("label",{className:W,style:{...F.root,...l,...$},onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:M,onClick:K},f.createElement(fF,{...U,className:X(B.icon,{[t1]:!P}),style:F.icon,type:"radio",prefixCls:O,ref:p,onClick:Q}),w!==void 0?f.createElement("span",{className:X(`${O}-label`,B.label),style:F.label},w):null))},X0=f.forwardRef(Eue),Mue=f.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r}=f.useContext(Ct),{name:o}=f.useContext(yo),i=Ql(bue(o)),{prefixCls:a,className:l,rootClassName:u,options:d,buttonStyle:m="outline",disabled:p,children:g,size:b,style:y,id:S,optionType:C,name:w=i,defaultValue:$,value:M,block:T=false,onChange:R,onMouseEnter:I,onMouseLeave:N,onFocus:P,onBlur:O,orientation:_,vertical:L,role:j="radiogroup"}=e,[U,q]=hn($,M),V=f.useCallback(te=>{const ne=U,se=te.target.value;"value"in e||q(se),se!==ne&&R?.(te);},[U,q,R]),B=n("radio",a),F=`${B}-group`,W=Yn(B),[K,Q]=hF(B,W);let D=g;d&&d.length>0&&(D=d.map(te=>typeof te=="string"||typeof te=="number"?f.createElement(X0,{key:te.toString(),prefixCls:B,disabled:p,value:te,checked:U===te},te):f.createElement(X0,{key:`radio-group-value-options-${te.value}`,prefixCls:B,disabled:te.disabled||p,value:te.value,checked:U===te.value,title:te.title,style:te.style,className:te.className,id:te.id,required:te.required},te.label)));const z=ao(b),[,Y]=Cu(_,L),ee=X(F,`${F}-${m}`,{[`${F}-${z}`]:z,[`${F}-rtl`]:r==="rtl",[`${F}-block`]:T},l,u,K,Q,W),J=f.useMemo(()=>({onChange:V,value:U,disabled:p,name:w,optionType:C,block:T}),[V,U,p,w,C,T]);return f.createElement("div",{...bo(e,{aria:true,data:true}),role:j,className:X(ee,{[`${B}-group-vertical`]:Y}),style:y,onMouseEnter:I,onMouseLeave:N,onFocus:P,onBlur:O,id:S,ref:t},f.createElement(yue,{value:J},D))}),Rue=f.memo(Mue),Tue=(e,t)=>{const{getPrefixCls:n}=f.useContext(Ct),{prefixCls:r,...o}=e,i=n("radio",r);return f.createElement(Sue,{value:"button"},f.createElement(X0,{prefixCls:i,...o,type:"radio",ref:t}))},Aue=f.forwardRef(Tue),Jr=X0;Jr.Button=Aue;Jr.Group=Rue;Jr.__ANT_RADIO=true;function _f(e){return Ft(e,{inputAffixPadding:e.paddingXXS})}const Lf=e=>{const{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:o,controlHeightSM:i,controlHeightLG:a,fontSizeLG:l,lineHeightLG:u,paddingSM:d,controlPaddingHorizontalSM:m,controlPaddingHorizontal:p,colorFillAlter:g,colorPrimaryHover:b,colorPrimary:y,controlOutlineWidth:S,controlOutline:C,colorErrorOutline:w,colorWarningOutline:$,colorBgContainer:M,inputFontSize:T,inputFontSizeLG:R,inputFontSizeSM:I}=e,N=T||n,P=I||N,O=R||l,_=Math.round((t-N*r)/2*10)/10-o,L=Math.round((i-P*r)/2*10)/10-o,j=Math.ceil((a-O*u)/2*10)/10-o;return {paddingBlock:Math.max(_,0),paddingBlockSM:Math.max(L,0),paddingBlockLG:Math.max(j,0),paddingInline:d-o,paddingInlineSM:m-o,paddingInlineLG:p-o,addonBg:g,activeBorderColor:y,hoverBorderColor:b,activeShadow:`0 0 0 ${S}px ${C}`,errorActiveShadow:`0 0 0 ${S}px ${w}`,warningActiveShadow:`0 0 0 ${S}px ${$}`,hoverBg:M,activeBg:M,inputFontSize:N,inputFontSizeLG:O,inputFontSizeSM:P}},Nue=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),f1=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])":{...Nue(Ft(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled}))}}),kR=(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}}),YO=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...kR(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),pF=(e,t)=>({"&-outlined":{...kR(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...f1(e)},...YO(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...YO(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),XO=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),Pue=e=>({"&-outlined":{[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${oe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},...XO(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...XO(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...f1(e)}}}}),gF=(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}}},vF=(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}}),QO=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...vF(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),bF=(e,t)=>({"&-filled":{...vF(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...f1(e)},...QO(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError}),...QO(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning}),...t}}),ZO=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),Iue=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}},...ZO(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...ZO(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:`${oe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${oe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${oe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${oe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${oe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${oe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}}}),yF=(e,t)=>({background:e.colorBgContainer,borderWidth:`${oe(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}}),JO=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...yF(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`}}),SF=(e,t)=>({"&-underlined":{...yF(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"},...JO(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...JO(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),CF=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),FR=e=>{const{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:o}=e;return {padding:`${oe(t)} ${oe(o)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},HR=e=>({padding:`${oe(e.paddingBlockSM)} ${oe(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),m1=(e,t={})=>({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${oe(e.paddingBlock)} ${oe(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...CF(e.colorTextPlaceholder),"&-lg":{...FR(e),...t.largeStyle},"&-sm":{...HR(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:"rtl"}}),Oue=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`]:{...FR(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{...HR(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 ${oe(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${oe(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${oe(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{backgroundColor:"inherit",border:`${oe(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}},[`${n}-cascader-picker`]:{margin:`-9px ${oe(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",...P0(),[`${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`]:{}}}}},Due=e=>{const{componentCls:t,controlHeightSM:n,lineWidth:r,calc:o}=e,a=o(n).sub(o(r).mul(2)).sub(16).div(2).equal();return {[t]:{...un(e),...m1(e),...pF(e),...bF(e),...gF(e),...SF(e),'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}}}},_ue=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 ${oe(e.inputAffixPadding)}`}}}},Lue=e=>{const{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:o,colorIcon:i,colorIconHover:a,iconCls:l}=e,u=`${t}-affix-wrapper`,d=`${t}-affix-wrapper-disabled`;return {[u]:{...m1(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}},..._ue(e),[`${l}${t}-password-icon`]:{color:i,cursor:"pointer",transition:`all ${o}`,"&:hover":{color:a}}},[`${t}-underlined`]:{borderRadius:0},[d]:{[`${l}${t}-password-icon`]:{color:i,cursor:"not-allowed","&:hover":{color:i}}}}},zue=e=>{const{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return {[`${t}-group`]:{...un(e),...Oue(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}},...Pue(e),...Iue(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}}}}}},Bue=e=>{const{componentCls:t}=e;return {[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},xF=qt(["Input","Shared"],e=>{const t=Ft(e,_f(e));return [Due(t),Lue(t)]},Lf,{resetFont:false}),wF=qt(["Input","Component"],e=>{const t=Ft(e,_f(e));return [zue(t),Bue(t),Nf(t,{focus:true,focusElCls:`${t.componentCls}-affix-wrapper-focused`})]},Lf,{resetFont:false});var kue={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 DE(){return DE=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},DE.apply(this,arguments)}const Fue=(e,t)=>f.createElement(Kn,DE({},e,{ref:t,icon:kue})),$F=f.forwardRef(Fue);var Qm={exports:{}},e8;function Hue(){if(e8)return Qm.exports;e8=1,Qm.exports=r,Qm.exports.isMobile=r,Qm.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 a=e.test(i)&&!t.test(i)||!!o.tablet&&n.test(i);return !a&&o.tablet&&o.featureDetect&&navigator&&navigator.maxTouchPoints>1&&i.indexOf("Macintosh")!==-1&&i.indexOf("Safari")!==-1&&(a=true),a}return Qm.exports}var Vue=Hue();const jue=Io(Vue);let ew;const Uue=(()=>(typeof ew>"u"&&(ew=jue()),ew)),VR=f.createContext(null),que=e=>{const{activeTabOffset:t,horizontal:n,rtl:r,indicator:o={}}=e,{size:i,align:a="center"}=o,[l,u]=f.useState(),d=f.useRef(),m=G.useCallback(g=>typeof i=="function"?i(g):typeof i=="number"?i:g,[i]);function p(){Lt.cancel(d.current);}return f.useEffect(()=>{const g={};if(t)if(n){g.width=m(t.width);const b=r?"right":"left";a==="start"&&(g[b]=t[b]),a==="center"&&(g[b]=t[b]+t.width/2,g.transform=r?"translateX(50%)":"translateX(-50%)"),a==="end"&&(g[b]=t[b]+t.width,g.transform="translateX(-100%)");}else g.height=m(t.height),a==="start"&&(g.top=t.top),a==="center"&&(g.top=t.top+t.height/2,g.transform="translateY(-50%)"),a==="end"&&(g.top=t.top+t.height,g.transform="translateY(-100%)");return p(),d.current=Lt(()=>{l&&g&&Object.keys(g).every(y=>{const S=g[y],C=l[y];return typeof S=="number"&&typeof C=="number"?Math.round(S)===Math.round(C):S===C})||u(g);}),p},[JSON.stringify(t),n,r,a,m]),{style:l}},t8={width:0,height:0,left:0,top:0};function Wue(e,t,n){return f.useMemo(()=>{const r=new Map,o=t.get(e[0]?.key)||t8,i=o.left+o.width;for(let a=0;a<e.length;a+=1){const{key:l}=e[a];let u=t.get(l);u||(u=t.get(e[a-1]?.key)||t8);const d=r.get(l)||{...u};d.right=i-d.left-d.width,r.set(l,d);}return r},[e.map(r=>r.key).join("_"),t,n])}function n8(e,t){const n=f.useRef(e),[,r]=f.useState({});function o(i){const a=typeof i=="function"?i(n.current):i;a!==n.current&&t(a,n.current),n.current=a,r({});}return [n.current,o]}const Gue=.1,r8=.01,Yb=20,o8=.995**Yb;function Kue(e,t){const[n,r]=f.useState(),[o,i]=f.useState(0),[a,l]=f.useState(0),[u,d]=f.useState(),m=f.useRef();function p(w){const{screenX:$,screenY:M}=w.touches[0];r({x:$,y:M}),window.clearInterval(m.current);}function g(w){if(!n)return;const{screenX:$,screenY:M}=w.touches[0];r({x:$,y:M});const T=$-n.x,R=M-n.y;t(T,R);const I=Date.now();i(I),l(I-o),d({x:T,y:R});}function b(){if(n&&(r(null),d(null),u)){const w=u.x/a,$=u.y/a,M=Math.abs(w),T=Math.abs($);if(Math.max(M,T)<Gue)return;let R=w,I=$;m.current=window.setInterval(()=>{if(Math.abs(R)<r8&&Math.abs(I)<r8){window.clearInterval(m.current);return}R*=o8,I*=o8,t(R*Yb,I*Yb);},Yb);}}const y=f.useRef();function S(w){const{deltaX:$,deltaY:M}=w;let T=0;const R=Math.abs($),I=Math.abs(M);R===I?T=y.current==="x"?$:M:R>I?(T=$,y.current="x"):(T=M,y.current="y"),t(-T,-T)&&w.preventDefault();}const C=f.useRef(null);C.current={onTouchStart:p,onTouchMove:g,onTouchEnd:b,onWheel:S},f.useEffect(()=>{function w(R){C.current.onTouchStart(R);}function $(R){C.current.onTouchMove(R);}function M(R){C.current.onTouchEnd(R);}function T(R){C.current.onWheel(R);}return document.addEventListener("touchmove",$,{passive:false}),document.addEventListener("touchend",M,{passive:true}),e.current.addEventListener("touchstart",w,{passive:true}),e.current.addEventListener("wheel",T,{passive:false}),()=>{document.removeEventListener("touchmove",$),document.removeEventListener("touchend",M);}},[]);}function EF(e){const[t,n]=f.useState(0),r=f.useRef(0),o=f.useRef();return o.current=e,Lb(()=>{o.current?.();},[t]),()=>{r.current===t&&(r.current+=1,n(r.current));}}function Yue(e){const t=f.useRef([]),[,n]=f.useState({}),r=f.useRef(typeof e=="function"?e():e),o=EF(()=>{let a=r.current;t.current.forEach(l=>{a=l(a);}),t.current=[],r.current=a,n({});});function i(a){t.current.push(a),o();}return [r.current,i]}const i8={width:0,height:0,left:0,top:0,right:0};function Xue(e,t,n,r,o,i,{tabs:a,tabPosition:l,rtl:u}){let d,m,p;return ["top","bottom"].includes(l)?(d="width",m=u?"right":"left",p=Math.abs(n)):(d="height",m="top",p=-n),f.useMemo(()=>{if(!a.length)return [0,0];const g=a.length;let b=g;for(let S=0;S<g;S+=1){const C=e.get(a[S].key)||i8;if(Math.floor(C[m]+C[d])>Math.floor(p+t)){b=S-1;break}}let y=0;for(let S=g-1;S>=0;S-=1)if((e.get(a[S].key)||i8)[m]<p){y=S+1;break}return y>b?[0,-1]:[y,b]},[e,t,r,o,i,p,l,a.map(g=>g.key).join("_"),u])}function a8(e){let t;return e instanceof Map?(t={},e.forEach((n,r)=>{t[r]=n;})):t=e,JSON.stringify(t)}const Que="TABS_DQ";function MF(e){return String(e).replace(/"/g,Que)}function jR(e,t,n,r){return !(!n||r||e===false||e===void 0&&(t===false||t===null))}const RF=f.forwardRef((e,t)=>{const{prefixCls:n,editable:r,locale:o,style:i}=e;return !r||r.showAdd===false?null:f.createElement("button",{ref:t,type:"button",className:`${n}-nav-add`,style:i,"aria-label":o?.addAriaLabel||"Add tab",onClick:a=>{r.onEdit("add",{event:a});}},r.addIcon||"+")}),s8=f.forwardRef((e,t)=>{const{position:n,prefixCls:r,extra:o}=e;if(!o)return null;let i,a={};return typeof o=="object"&&!f.isValidElement(o)?a=o:a.right=o,n==="right"&&(i=a.right),n==="left"&&(i=a.left),i?f.createElement("div",{className:`${r}-extra-content`,ref:t},i):null});function _E(){return _E=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},_E.apply(this,arguments)}const Zue=f.forwardRef((e,t)=>{const{prefixCls:n,id:r,tabs:o,locale:i,mobile:a,more:l={},style:u,className:d,editable:m,tabBarGutter:p,rtl:g,removeAriaLabel:b,onTabClick:y,getPopupContainer:S,popupClassName:C,popupStyle:w}=e,[$,M]=f.useState(false),[T,R]=f.useState(null),{icon:I="More"}=l,N=`${r}-more-popup`,P=`${n}-dropdown`,O=T!==null?`${N}-${T}`:null,_=i?.dropdownAriaLabel;function L(W,K){W.preventDefault(),W.stopPropagation(),m.onEdit("remove",{key:K,event:W});}const j=f.createElement(Df,{onClick:({key:W,domEvent:K})=>{y(W,K),M(false);},prefixCls:`${P}-menu`,id:N,tabIndex:-1,role:"listbox","aria-activedescendant":O,selectedKeys:[T],"aria-label":_!==void 0?_:"expanded dropdown"},o.map(W=>{const{closable:K,disabled:Q,closeIcon:D,key:z,label:Y}=W,ee=jR(K,D,m,Q);return f.createElement(ig,{key:z,id:`${N}-${z}`,role:"option","aria-controls":r&&`${r}-panel-${z}`,disabled:Q},f.createElement("span",null,Y),ee&&f.createElement("button",{type:"button","aria-label":b||"remove",tabIndex:0,className:`${P}-menu-item-remove`,onClick:J=>{J.stopPropagation(),L(J,z);}},D||m.removeIcon||"×"))}));function U(W){const K=o.filter(z=>!z.disabled);let Q=K.findIndex(z=>z.key===T)||0;const D=K.length;for(let z=0;z<D;z+=1){Q=(Q+W+D)%D;const Y=K[Q];if(!Y.disabled){R(Y.key);return}}}function q(W){const{which:K}=W;if(!$){[ot.DOWN,ot.SPACE,ot.ENTER].includes(K)&&(M(true),W.preventDefault());return}switch(K){case ot.UP:U(-1),W.preventDefault();break;case ot.DOWN:U(1),W.preventDefault();break;case ot.ESC:M(false);break;case ot.SPACE:case ot.ENTER:T!==null&&y(T,W);break}}f.useEffect(()=>{const W=document.getElementById(O);W?.scrollIntoView&&W.scrollIntoView(false);},[O,T]),f.useEffect(()=>{$||R(null);},[$]);const V={marginInlineStart:p};o.length||(V.visibility="hidden",V.order=1);const B=X(C,{[`${P}-rtl`]:g}),F=a?null:f.createElement(G7,_E({prefixCls:P,overlay:j,visible:o.length?$:false,onVisibleChange:M,overlayClassName:B,overlayStyle:w,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:S},l),f.createElement("button",{type:"button",className:`${n}-nav-more`,style:V,"aria-haspopup":"listbox","aria-controls":N,id:`${r}-more`,"aria-expanded":$,onKeyDown:q},I));return f.createElement("div",{className:X(`${n}-nav-operations`,d),style:u,ref:t},F,f.createElement(RF,{prefixCls:n,locale:i,editable:m}))}),Jue=f.memo(Zue,(e,t)=>t.tabMoving),ede=e=>{const{prefixCls:t,id:n,active:r,focus:o,tab:{key:i,label:a,disabled:l,closeIcon:u,icon:d},closable:m,renderWrapper:p,removeAriaLabel:g,editable:b,onClick:y,onFocus:S,onBlur:C,onKeyDown:w,onMouseDown:$,onMouseUp:M,style:T,className:R,tabCount:I,currentPosition:N}=e,P=`${t}-tab`,O=jR(m,u,b,l);function _(V){l||y(V);}function L(V){V.preventDefault(),V.stopPropagation(),b.onEdit("remove",{key:i,event:V});}const j=f.useMemo(()=>d&&typeof a=="string"?f.createElement("span",null,a):a,[a,d]),U=f.useRef(null);f.useEffect(()=>{o&&U.current&&U.current.focus();},[o]);const q=f.createElement("div",{key:i,"data-node-key":MF(i),className:X(P,R,{[`${P}-with-remove`]:O,[`${P}-active`]:r,[`${P}-disabled`]:l,[`${P}-focus`]:o}),style:T,onClick:_},f.createElement("div",{ref:U,role:"tab","aria-selected":r,id:n&&`${n}-tab-${i}`,className:`${P}-btn`,"aria-controls":n&&`${n}-panel-${i}`,"aria-disabled":l,tabIndex:l?null:r?0:-1,onClick:V=>{V.stopPropagation(),_(V);},onKeyDown:w,onMouseDown:$,onMouseUp:M,onFocus:S,onBlur:C},o&&f.createElement("div",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},`Tab ${N} of ${I}`),d&&f.createElement("span",{className:`${P}-icon`},d),a&&j),O&&f.createElement("button",{type:"button","aria-label":g||"remove",tabIndex:r?0:-1,className:`${P}-remove`,onClick:V=>{V.stopPropagation(),L(V);}},u||b.removeIcon||"×"));return p?p(q):q};function LE(){return LE=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},LE.apply(this,arguments)}const tde=(e,t)=>{const{offsetWidth:n,offsetHeight:r,offsetTop:o,offsetLeft:i}=e,{width:a,height:l,left:u,top:d}=e.getBoundingClientRect();return Math.abs(a-n)<1?[a,l,u-t.left,d-t.top]:[n,r,i,o]},$d=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]},ub=(e,t)=>e[t?0:1],l8=f.forwardRef((e,t)=>{const{className:n,style:r,id:o,animated:i,activeKey:a,rtl:l,extra:u,editable:d,locale:m,tabPosition:p,tabBarGutter:g,children:b,onTabClick:y,onTabScroll:S,indicator:C,classNames:w,styles:$}=e,{prefixCls:M,tabs:T}=f.useContext(VR),R=f.useRef(null),I=f.useRef(null),N=f.useRef(null),P=f.useRef(null),O=f.useRef(null),_=f.useRef(null),L=f.useRef(null),j=p==="top"||p==="bottom",[U,q]=n8(0,(he,Ie)=>{j&&S&&S({direction:he>Ie?"left":"right"});}),[V,B]=n8(0,(he,Ie)=>{!j&&S&&S({direction:he>Ie?"top":"bottom"});}),[F,W]=f.useState([0,0]),[K,Q]=f.useState([0,0]),[D,z]=f.useState([0,0]),[Y,ee]=f.useState([0,0]),[J,te]=Yue(new Map),ne=Wue(T,J,K[0]),se=ub(F,j),ae=ub(K,j),re=ub(D,j),de=ub(Y,j),ge=Math.floor(se)<Math.floor(ae+re),ie=ge?se-de:se-re,Ee=`${M}-nav-operations-hidden`;let le=0,ue=0;j&&l?(le=0,ue=Math.max(0,ae-ie)):(le=Math.min(0,ie-ae),ue=0);function Se(he){return he<le?le:he>ue?ue:he}const ye=f.useRef(null),[Be,je]=f.useState();function Ne(){je(Date.now());}function fe(){ye.current&&clearTimeout(ye.current);}Kue(P,(he,Ie)=>{function we(Le,Xe){Le(it=>Se(it+Xe));}return ge?(j?we(q,he):we(B,Ie),fe(),Ne(),true):false}),f.useEffect(()=>(fe(),Be&&(ye.current=setTimeout(()=>{je(0);},100)),fe),[Be]);const[be,Re]=Xue(ne,ie,j?U:V,ae,re,de,{...e,tabs:T}),qe=Et((he=a)=>{const Ie=ne.get(he)||{width:0,height:0,left:0,right:0,top:0};if(j){let we=U;l?Ie.right<U?we=Ie.right:Ie.right+Ie.width>U+ie&&(we=Ie.right+Ie.width-ie):Ie.left<-U?we=-Ie.left:Ie.left+Ie.width>-U+ie&&(we=-(Ie.left+Ie.width-ie)),B(0),q(Se(we));}else {let we=V;Ie.top<-V?we=-Ie.top:Ie.top+Ie.height>-V+ie&&(we=-(Ie.top+Ie.height-ie)),q(0),B(Se(we));}}),[Qe,We]=f.useState(),[tt,rt]=f.useState(false),Ze=T.filter(he=>!he.disabled).map(he=>he.key),Oe=he=>{const Ie=Ze.indexOf(Qe||a),we=Ze.length,Le=(Ie+he+we)%we,Xe=Ze[Le];We(Xe);},Ye=(he,Ie)=>{const we=Ze.indexOf(he),Le=T.find(it=>it.key===he);jR(Le?.closable,Le?.closeIcon,d,Le?.disabled)&&(Ie.preventDefault(),Ie.stopPropagation(),d.onEdit("remove",{key:he,event:Ie}),we===Ze.length-1?Oe(-1):Oe(1));},Ke=(he,Ie)=>{rt(true),Ie.button===1&&Ye(he,Ie);},_e=he=>{const{code:Ie}=he,we=l&&j,Le=Ze[0],Xe=Ze[Ze.length-1];switch(Ie){case "ArrowLeft":{j&&Oe(we?1:-1);break}case "ArrowRight":{j&&Oe(we?-1:1);break}case "ArrowUp":{he.preventDefault(),j||Oe(-1);break}case "ArrowDown":{he.preventDefault(),j||Oe(1);break}case "Home":{he.preventDefault(),We(Le);break}case "End":{he.preventDefault(),We(Xe);break}case "Enter":case "Space":{he.preventDefault(),y(Qe??a,he);break}case "Backspace":case "Delete":{Ye(Qe,he);break}}},ke={};j?ke.marginInlineStart=g:ke.marginTop=g;const lt=T.map((he,Ie)=>{const{key:we}=he;return f.createElement(ede,{id:o,prefixCls:M,key:we,tab:he,className:w?.item,style:Ie===0?$?.item:{...ke,...$?.item},closable:he.closable,editable:d,active:we===a,focus:we===Qe,renderWrapper:b,removeAriaLabel:m?.removeAriaLabel,tabCount:Ze.length,currentPosition:Ie+1,onClick:Le=>{y(we,Le);},onKeyDown:_e,onFocus:()=>{tt||We(we),qe(we),Ne(),P.current&&(l||(P.current.scrollLeft=0),P.current.scrollTop=0);},onBlur:()=>{We(void 0);},onMouseDown:Le=>Ke(we,Le),onMouseUp:()=>{rt(false);}})}),At=()=>te(()=>{const he=new Map,Ie=O.current?.getBoundingClientRect();return T.forEach(({key:we})=>{const Le=O.current?.querySelector(`[data-node-key="${MF(we)}"]`);if(Le){const[Xe,it,mt,wt]=tde(Le,Ie);he.set(we,{width:Xe,height:it,left:mt,top:wt});}}),he});f.useEffect(()=>{At();},[T.map(he=>he.key).join("_")]);const dt=EF(()=>{const he=$d(R),Ie=$d(I),we=$d(N);W([he[0]-Ie[0]-we[0],he[1]-Ie[1]-we[1]]);const Le=$d(L);z(Le);const Xe=$d(_);ee(Xe);const it=$d(O);Q([it[0]-Le[0],it[1]-Le[1]]),At();}),Dt=T.slice(0,be),Tt=T.slice(Re+1),xt=[...Dt,...Tt],gt=ne.get(a),{style:ft}=que({activeTabOffset:gt,horizontal:j,indicator:C,rtl:l});f.useEffect(()=>{qe();},[a,le,ue,a8(gt),a8(ne),j]),f.useEffect(()=>{dt();},[l]);const st=!!xt.length,He=`${M}-nav-wrap`;let Ge,ve,Te,Ce;return j?l?(ve=U>0,Ge=U!==ue):(Ge=U<0,ve=U!==le):(Te=V<0,Ce=V!==le),f.createElement(ha,{onResize:dt},f.createElement("div",{ref:Yl(t,R),role:"tablist","aria-orientation":j?"horizontal":"vertical",className:X(`${M}-nav`,n,w?.header),style:{...$?.header,...r},onKeyDown:()=>{Ne();}},f.createElement(s8,{ref:I,position:"left",extra:u,prefixCls:M}),f.createElement(ha,{onResize:dt},f.createElement("div",{className:X(He,{[`${He}-ping-left`]:Ge,[`${He}-ping-right`]:ve,[`${He}-ping-top`]:Te,[`${He}-ping-bottom`]:Ce}),ref:P},f.createElement(ha,{onResize:dt},f.createElement("div",{ref:O,className:`${M}-nav-list`,style:{transform:`translate(${U}px, ${V}px)`,transition:Be?"none":void 0}},lt,f.createElement(RF,{ref:L,prefixCls:M,locale:m,editable:d,style:{...lt.length===0?void 0:ke,visibility:st?"hidden":null}}),f.createElement("div",{className:X(`${M}-ink-bar`,w?.indicator,{[`${M}-ink-bar-animated`]:i.inkBar}),style:{...ft,...$?.indicator}}))))),f.createElement(Jue,LE({},e,{removeAriaLabel:m?.removeAriaLabel,ref:_,prefixCls:M,tabs:xt,className:!st&&Ee,popupStyle:$?.popup,tabMoving:!!Be})),f.createElement(s8,{ref:N,position:"right",extra:u,prefixCls:M})))}),nde=({renderTabBar:e,...t})=>e?e(t,l8):f.createElement(l8,t),rde=f.forwardRef((e,t)=>{const{prefixCls:n,className:r,style:o,id:i,active:a,tabKey:l,children:u}=e,d=f.Children.count(u)>0;return f.createElement("div",{id:i&&`${i}-panel-${l}`,role:"tabpanel",tabIndex:a&&d?0:-1,"aria-labelledby":i&&`${i}-tab-${l}`,"aria-hidden":!a,style:o,className:X(n,a&&`${n}-active`,r),ref:t},u)});function Q0(){return Q0=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},Q0.apply(this,arguments)}const ode=e=>{const{id:t,activeKey:n,animated:r,tabPosition:o,destroyOnHidden:i,contentStyle:a,contentClassName:l}=e,{prefixCls:u,tabs:d}=f.useContext(VR),m=r.tabPane,p=`${u}-tabpane`;return f.createElement("div",{className:X(`${u}-content-holder`)},f.createElement("div",{className:X(`${u}-content`,`${u}-content-${o}`,{[`${u}-content-animated`]:m})},d.map(g=>{const{key:b,forceRender:y,style:S,className:C,destroyOnHidden:w,...$}=g,M=b===n;return f.createElement(So,Q0({key:b,visible:M,forceRender:y,removeOnLeave:!!(i??w),leavedClassName:`${p}-hidden`},r.tabPaneMotion),({style:T,className:R},I)=>f.createElement(rde,Q0({},$,{prefixCls:p,id:t,tabKey:b,animated:m,active:M,style:{...a,...S,...T},className:X(l,C,R),ref:I})))})))};function ide(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 Dh(){return Dh=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},Dh.apply(this,arguments)}let c8=0;const ade=f.forwardRef((e,t)=>{const{id:n,prefixCls:r="rc-tabs",className:o,items:i,direction:a,activeKey:l,defaultActiveKey:u,editable:d,animated:m,tabPosition:p="top",tabBarGutter:g,tabBarStyle:b,tabBarExtraContent:y,locale:S,more:C,destroyOnHidden:w,renderTabBar:$,onChange:M,onTabClick:T,onTabScroll:R,getPopupContainer:I,popupClassName:N,indicator:P,classNames:O,styles:_,...L}=e,j=f.useMemo(()=>(i||[]).filter(ne=>ne&&typeof ne=="object"&&"key"in ne),[i]),U=a==="rtl",q=ide(m),[V,B]=f.useState(false);f.useEffect(()=>{B(Uue());},[]);const[F,W]=hn(u??j[0]?.key,l),[K,Q]=f.useState(()=>j.findIndex(ne=>ne.key===F));f.useEffect(()=>{let ne=j.findIndex(se=>se.key===F);ne===-1&&(ne=Math.max(0,Math.min(K,j.length-1)),W(j[ne]?.key)),Q(ne);},[j.map(ne=>ne.key).join("_"),F,K]);const[D,z]=hn(null,n);f.useEffect(()=>{n||(z(`rc-tabs-${c8}`),c8+=1);},[]);function Y(ne,se){T?.(ne,se);const ae=ne!==F;W(ne),ae&&M?.(ne);}const ee={id:D,activeKey:F,animated:q,tabPosition:p,rtl:U,mobile:V},J={...ee,editable:d,locale:S,more:C,tabBarGutter:g,onTabClick:Y,onTabScroll:R,extra:y,style:b,getPopupContainer:I,popupClassName:X(N,O?.popup),indicator:P,styles:_,classNames:O},te=f.useMemo(()=>({tabs:j,prefixCls:r}),[j,r]);return f.createElement(VR.Provider,{value:te},f.createElement("div",Dh({ref:t,id:n,className:X(r,`${r}-${p}`,{[`${r}-mobile`]:V,[`${r}-editable`]:d,[`${r}-rtl`]:U},o)},L),f.createElement(nde,Dh({},J,{renderTabBar:$})),f.createElement(ode,Dh({destroyOnHidden:w},ee,{contentStyle:_?.content,contentClassName:O?.content,animated:q}))))}),sde={motionAppear:false,motionEnter:true,motionLeave:true};function lde(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={...sde,motionName:zl(e,"switch")}),n}function cde(e){return e.filter(t=>t)}function ude(e,t){if(e)return e.map(r=>({...r,destroyOnHidden:r.destroyOnHidden??r.destroyInactiveTabPane}));const n=Qo(t).map(r=>{if(f.isValidElement(r)){const{key:o,props:i}=r,{tab:a,...l}=i||{};return {key:String(o),...l,label:a}}return null});return cde(n)}const dde=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}`}}}}},[Bl(e,"slide-up"),Bl(e,"slide-down")]]},fde=e=>{const{componentCls:t,tabsCardPadding:n,cardBg:r,cardGutter:o,colorBorderSecondary:i,itemSelectedColor:a}=e;return {[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:r,border:`${oe(e.lineWidth)} ${e.lineType} ${i}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:a,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:ba(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:oe(o)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${oe(e.borderRadiusLG)} ${oe(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${oe(e.borderRadiusLG)} ${oe(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:oe(o)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:true,value:`${oe(e.borderRadiusLG)} 0 0 ${oe(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 ${oe(e.borderRadiusLG)} ${oe(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:true,value:e.colorBgContainer}}}}}}},mde=e=>{const{componentCls:t,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=e;return {[`${t}-dropdown`]:{...un(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:`${oe(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":{...qa,display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${oe(e.paddingXXS)} ${oe(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"}}}}}}},hde=e=>{const{componentCls:t,margin:n,colorBorderSecondary:r,horizontalMargin:o,verticalItemPadding:i,verticalItemMargin:a,calc:l}=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:`${oe(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:l(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:i,textAlign:"center"},[`${t}-tab + ${t}-tab`]:{margin:a},[`${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:oe(l(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:true,value:`${oe(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:l(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:true,value:`${oe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:true,value:e.paddingLG}}}}}},pde=e=>{const{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:o,cardHeightLG:i,horizontalItemPaddingSM:a,horizontalItemPaddingLG:l}=e;return {[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:a,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:l,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 ${oe(e.borderRadius)} ${oe(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${oe(e.borderRadius)} ${oe(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:true,value:`0 ${oe(e.borderRadius)} ${oe(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:true,value:`${oe(e.borderRadius)} 0 0 ${oe(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:i,minHeight:i}}}}}},gde=e=>{const{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:o,tabsHorizontalItemMargin:i,horizontalItemPadding:a,itemSelectedColor:l,itemColor:u}=e,d=`${t}-tab`;return {[d]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:a,fontSize:e.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:u,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:"none",transition:`all ${e.motionDurationSlow}`,[`${d}-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},...$i(e)},"&:hover":{color:r},[`&${d}-active ${d}-btn`]:{color:l},[`&${d}-focus ${d}-btn:focus-visible`]:ba(e),[`&${d}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${d}-disabled ${d}-btn, &${d}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${d}-remove ${o}`]:{margin:0,verticalAlign:"middle"},[`${o}:not(:last-child)`]:{marginRight:{_skip_check_:true,value:e.marginSM}}},[`${d} + ${d}`]:{margin:{_skip_check_:true,value:i}}}},vde=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:oe(e.marginSM)}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:true,value:oe(e.marginXS)},marginLeft:{_skip_check_:true,value:oe(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"}}}}},bde=e=>{const{componentCls:t,tabsCardPadding:n,cardHeight:r,cardGutter:o,itemHoverColor:i,itemActiveColor:a,colorBorderSecondary:l}=e;return {[t]:{...un(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:`${oe(e.lineWidth)} ${e.lineType} ${l}`,borderRadius:`${oe(e.borderRadiusLG)} ${oe(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:a},...$i(e,-3)}},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.inkBarColor,pointerEvents:"none"},...gde(e),[`${t}-content`]:{position:"relative",width:"100%"},[`${t}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-tabpane`]:{...$i(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"}}}}}},yde=e=>{const{cardHeight:t,cardHeightSM:n,cardHeightLG:r,controlHeight:o,controlHeightLG:i}=e,a=t||i,l=n||o,u=r||i+8;return {zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:a,cardHeightSM:l,cardHeightLG:u,cardPadding:`${(a-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(l-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(u-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}},Sde=qt("Tabs",e=>{const t=Ft(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${oe(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${oe(e.horizontalItemGutter)}`});return [pde(t),vde(t),hde(t),mde(t),fde(t),bde(t),dde(t)]},yde),Cde=()=>null,xde=f.forwardRef((e,t)=>{const{type:n,className:r,rootClassName:o,size:i,onEdit:a,hideAdd:l,centered:u,addIcon:d,removeIcon:m,moreIcon:p,more:g,popupClassName:b,children:y,items:S,animated:C,style:w,indicatorSize:$,indicator:M,classNames:T,styles:R,destroyInactiveTabPane:I,destroyOnHidden:N,tabPlacement:P,tabPosition:O,..._}=e,{prefixCls:L}=_,{getPrefixCls:j,direction:U,getPopupContainer:q,className:V,style:B,classNames:F,styles:W}=Gt("tabs"),{tabs:K}=f.useContext(Ct),Q=j("tabs",L),D=Yn(Q),[z,Y]=Sde(Q,D),ee=f.useRef(null);f.useImperativeHandle(t,()=>({nativeElement:ee.current}));let J;n==="editable-card"&&(J={onEdit:(le,{key:ue,event:Se})=>{a?.(le==="add"?Se:ue,le);},removeIcon:m??K?.removeIcon??f.createElement(Ds,null),addIcon:(d??K?.addIcon)||f.createElement($F,null),showAdd:l!==true});const te=j(),ne=ao(i),se=ude(S,y),ae=lde(Q,C),re={align:M?.align??K?.indicator?.align,size:M?.size??$??K?.indicator?.size??K?.indicatorSize},de=f.useMemo(()=>{const le=P??O??void 0,ue=U==="rtl";switch(le){case "start":return ue?"right":"left";case "end":return ue?"left":"right";default:return le}},[P,O,U]),ge={...e,size:ne,tabPlacement:de,items:se},[ie,Ee]=Xt([F,T],[W,R],{props:ge},{popup:{_default:"root"}});return f.createElement(ade,{ref:ee,direction:U,getPopupContainer:q,..._,items:se,className:X({[`${Q}-${ne}`]:ne,[`${Q}-card`]:["card","editable-card"].includes(n),[`${Q}-editable-card`]:n==="editable-card",[`${Q}-centered`]:u},V,r,o,ie.root,z,Y,D),classNames:{...ie,popup:X(b,z,Y,D,ie.popup?.root)},styles:Ee,style:{...Ee.root,...B,...w},editable:J,more:{icon:K?.more?.icon??K?.moreIcon??p??f.createElement(BR,null),transitionName:`${te}-slide-up`,...g},prefixCls:Q,animated:ae,indicator:re,destroyOnHidden:N??I,tabPosition:de})}),UR=xde;UR.TabPane=Cde;function wde(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 TF(e,t){if(e==null)return {};var n,r,o=wde(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}function $de(e,t,n){var r=n||{},o=r.noTrailing,i=o===void 0?false:o,a=r.noLeading,l=a===void 0?false:a,u=r.debounceMode,d=u===void 0?void 0:u,m,p=false,g=0;function b(){m&&clearTimeout(m);}function y(C){var w=C||{},$=w.upcomingOnly,M=$===void 0?false:$;b(),p=!M;}function S(){for(var C=arguments.length,w=new Array(C),$=0;$<C;$++)w[$]=arguments[$];var M=this,T=Date.now()-g;if(p)return;function R(){g=Date.now(),t.apply(M,w);}function I(){m=void 0;}!l&&d&&!m&&R(),b(),d===void 0&&T>e?l?(g=Date.now(),i||(m=setTimeout(d?I:R,e))):R():i!==true&&(m=setTimeout(d?I:R,d===void 0?e-T:e));}return S.cancel=y,S}function Ede(e,t,n){var r={},o=r.atBegin,i=o===void 0?false:o;return $de(e,t,{debounceMode:i!==false})}const Mde=e=>{const{checkboxCls:t}=e,n=`${t}-wrapper`;return [{[`${t}-group`]:{...un(e),display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}},[n]:{...un(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]:{...un(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`]:ba(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${oe(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:`${oe(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 Rde(e,t){const n=Ft(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return Mde(n)}const AF=qt("Checkbox",(e,{prefixCls:t})=>[Rde(t,e)]),NF=G.createContext(null),Tde=(e,t)=>{const{prefixCls:n,className:r,rootClassName:o,children:i,indeterminate:a=false,style:l,onMouseEnter:u,onMouseLeave:d,skipGroup:m=false,disabled:p,classNames:g,styles:b,...y}=e,{getPrefixCls:S,direction:C,className:w,style:$,classNames:M,styles:T}=Gt("checkbox"),R=f.useContext(NF),{isFormItemInput:I}=f.useContext(yo),N=f.useContext(to),P=(R?.disabled||p)??N,O={...e,indeterminate:a,disabled:P},[_,L]=Xt([M,g],[T,b],{props:O}),j=f.useRef(y.value),U=f.useRef(null),q=Nr(t,U);f.useEffect(()=>{R?.registerValue(y.value);},[]),f.useEffect(()=>{if(!m)return y.value!==j.current&&(R?.cancelValue(j.current),R?.registerValue(y.value),j.current=y.value),()=>R?.cancelValue(y.value)},[y.value]),f.useEffect(()=>{U.current?.input&&(U.current.input.indeterminate=a);},[a]);const V=S("checkbox",n),B=Yn(V),[F,W]=AF(V,B),K={...y};R&&!m&&(K.onChange=(...ee)=>{y.onChange&&y.onChange.apply(y,ee),R.toggleOption&&R.toggleOption({label:i,value:y.value});},K.name=R.name,K.checked=R.value.includes(y.value));const Q=X(`${V}-wrapper`,{[`${V}-rtl`]:C==="rtl",[`${V}-wrapper-checked`]:K.checked,[`${V}-wrapper-disabled`]:P,[`${V}-wrapper-in-form-item`]:I},w,r,_.root,o,W,B,F),D=X(_.icon,{[`${V}-indeterminate`]:a},t1,F),[z,Y]=mF(K.onClick);return f.createElement(Xp,{component:"Checkbox",disabled:P},f.createElement("label",{className:Q,style:{...L.root,...$,...l},onMouseEnter:u,onMouseLeave:d,onClick:z},f.createElement(fF,{...K,onClick:Y,prefixCls:V,className:D,style:L.icon,disabled:P,ref:q}),Qr(i)&&f.createElement("span",{className:X(`${V}-label`,_.label),style:L.label},i)))},PF=f.forwardRef(Tde),Ade=f.forwardRef((e,t)=>{const{defaultValue:n,children:r,options:o=[],prefixCls:i,className:a,rootClassName:l,style:u,onChange:d,role:m="group",...p}=e,{getPrefixCls:g,direction:b}=f.useContext(Ct),[y,S]=f.useState(p.value||n||[]),[C,w]=f.useState([]);f.useEffect(()=>{"value"in p&&S(p.value||[]);},[p.value]);const $=f.useMemo(()=>o.map(V=>typeof V=="string"||typeof V=="number"?{label:V,value:V}:V),[o]),M=V=>{w(B=>B.filter(F=>F!==V));},T=V=>{w(B=>[].concat(Yt(B),[V]));},R=V=>{const B=y.indexOf(V.value),F=Yt(y);B===-1?F.push(V.value):F.splice(B,1),"value"in p||S(F),d?.(F.filter(W=>C.includes(W)).sort((W,K)=>{const Q=$.findIndex(z=>z.value===W),D=$.findIndex(z=>z.value===K);return Q-D}));},I=g("checkbox",i),N=`${I}-group`,P=Yn(I),[O,_]=AF(I,P),L=Bn(p,["value","disabled"]),j=o.length?$.map(V=>f.createElement(PF,{prefixCls:I,key:V.value.toString(),disabled:"disabled"in V?V.disabled:p.disabled,value:V.value,checked:y.includes(V.value),onChange:V.onChange,className:X(`${N}-item`,V.className),style:V.style,title:V.title,id:V.id,required:V.required},V.label)):r,U=f.useMemo(()=>({toggleOption:R,value:y,disabled:p.disabled,name:p.name,registerValue:T,cancelValue:M}),[R,y,p.disabled,p.name,T,M]),q=X(N,{[`${N}-rtl`]:b==="rtl"},a,l,_,P,O);return f.createElement("div",{className:q,style:u,role:m,...L,ref:t},f.createElement(NF.Provider,{value:U},j))}),Ki=PF;Ki.Group=Ade;Ki.__ANT_CHECKBOX=true;const Nde=e=>{const{componentCls:t}=e;return {[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}},Pde=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:o,textPaddingInline:i,orientationMargin:a,verticalMarginInline:l}=e,u=`${t}-rail`;return {[t]:{...un(e),borderBlockStart:`${oe(o)} solid ${r}`,[u]:{borderBlockStart:`${oe(o)} solid ${r}`},"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:l,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${oe(o)} solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${oe(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${oe(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,[`${u}-start, ${u}-end`]:{width:"50%",borderBlockStartColor:"inherit",borderBlockEnd:0,content:"''"}},[`&-horizontal${t}-with-text-start`]:{[`${u}-start`]:{width:`calc(${a} * 100%)`},[`${u}-end`]:{width:`calc(100% - ${a} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{[`${u}-start`]:{width:`calc(100% - ${a} * 100%)`},[`${u}-end`]:{width:`calc(${a} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:i},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${oe(o)} 0 0`,[u]:{borderBlockStart:`${oe(o)} dashed ${r}`}},[`&-horizontal${t}-with-text${t}-dashed`]:{[`${u}-start, ${u}-end`]:{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:o,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:r,borderStyle:"dotted",borderWidth:`${oe(o)} 0 0`,[u]:{borderBlockStart:`${oe(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`]:{[`${u}-start`]:{width:0},[`${u}-end`]:{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{[`${u}-start`]:{width:"100%"},[`${u}-end`]:{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}}}},Ide=e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),Ode=qt("Divider",e=>{const t=Ft(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return [Pde(t),Nde(t)]},Ide,{unitless:{orientationMargin:true}}),Dde=["left","right","center","start","end"],_de={small:"sm",middle:"md"},Hl=e=>{const{getPrefixCls:t,direction:n,className:r,style:o,classNames:i,styles:a}=Gt("divider"),{prefixCls:l,type:u,orientation:d,vertical:m,titlePlacement:p,orientationMargin:g,className:b,rootClassName:y,children:S,dashed:C,variant:w="solid",plain:$,style:M,size:T,classNames:R,styles:I,...N}=e,P=t("divider",l),O=`${P}-rail`,[_,L]=Ode(P),j=ao(T),U=_de[j],q=!!S,V=Dde.includes(d||""),B=f.useMemo(()=>{const ne=p??(V?d:"center");return ne==="left"?n==="rtl"?"end":"start":ne==="right"?n==="rtl"?"start":"end":ne},[n,d,p,V]),F=B==="start"&&g!=null,W=B==="end"&&g!=null,[K,Q]=Cu(d,m,u),D={...e,orientation:K,titlePlacement:B,size:j},[z,Y]=Xt([i,R],[a,I],{props:D}),ee=X(P,r,_,L,`${P}-${K}`,{[`${P}-with-text`]:q,[`${P}-with-text-${B}`]:q,[`${P}-dashed`]:!!C,[`${P}-${w}`]:w!=="solid",[`${P}-plain`]:!!$,[`${P}-rtl`]:n==="rtl",[`${P}-no-default-orientation-margin-start`]:F,[`${P}-no-default-orientation-margin-end`]:W,[`${P}-${U}`]:!!U,[O]:!S,[z.rail]:z.rail&&!S},b,y,z.root),J=f.useMemo(()=>typeof g=="number"?g:/^\d+$/.test(g)?Number(g):g,[g]),te={marginInlineStart:F?J:void 0,marginInlineEnd:W?J:void 0};return f.createElement("div",{className:ee,style:{...o,...Y.root,...S?{}:Y.rail,...M},...N,role:"separator"},S&&!Q&&f.createElement(f.Fragment,null,f.createElement("div",{className:X(O,`${O}-start`,z.rail),style:Y.rail}),f.createElement("span",{className:X(`${P}-inner-text`,z.content),style:{...te,...Y.content}},S),f.createElement("div",{className:X(O,`${O}-end`,z.rail),style:Y.rail})))},u8=(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}},Ia=e=>e!==void 0?`${e}px`:void 0;function Lde(e){const{prefixCls:t,containerRef:n,value:r,getValueIndex:o,motionName:i,onMotionStart:a,onMotionEnd:l,direction:u,vertical:d=false}=e,m=f.useRef(null),[p,g]=f.useState(r),b=N=>{const P=o(N),O=n.current?.querySelectorAll(`.${t}-item`)[P];return O?.offsetParent&&O},[y,S]=f.useState(null),[C,w]=f.useState(null);An(()=>{if(p!==r){const N=b(p),P=b(r),O=u8(N,d),_=u8(P,d);g(r),S(O),w(_),N&&P?a():l();}},[r]);const $=f.useMemo(()=>Ia(d?y?.top??0:u==="rtl"?-y?.right:y?.left),[d,u,y]),M=f.useMemo(()=>Ia(d?C?.top??0:u==="rtl"?-C?.right:C?.left),[d,u,C]),T=()=>d?{transform:"translateY(var(--thumb-start-top))",height:"var(--thumb-start-height)"}:{transform:"translateX(var(--thumb-start-left))",width:"var(--thumb-start-width)"},R=()=>d?{transform:"translateY(var(--thumb-active-top))",height:"var(--thumb-active-height)"}:{transform:"translateX(var(--thumb-active-left))",width:"var(--thumb-active-width)"},I=()=>{S(null),w(null),l();};return !y||!C?null:f.createElement(So,{visible:true,motionName:i,motionAppear:true,onAppearStart:T,onAppearActive:R,onVisibleChanged:I},({className:N,style:P},O)=>{const _={...P,"--thumb-start-left":$,"--thumb-start-width":Ia(y?.width),"--thumb-active-left":M,"--thumb-active-width":Ia(C?.width),"--thumb-start-top":$,"--thumb-start-height":Ia(y?.height),"--thumb-active-top":M,"--thumb-active-height":Ia(C?.height)},L={ref:Nr(m,O),style:_,className:X(`${t}-thumb`,N)};return f.createElement("div",L)})}function zde(e){if(typeof e.title<"u")return e.title;if(typeof e.label!="object")return e.label?.toString()}function Bde(e){return e.map(t=>{if(typeof t=="object"&&t!==null){const n=zde(t);return {...t,title:n}}return {label:t?.toString(),title:t?.toString(),value:t}})}const kde=({prefixCls:e,className:t,style:n,styles:r,classNames:o,data:i,disabled:a,checked:l,label:u,title:d,value:m,name:p,onChange:g,onFocus:b,onBlur:y,onKeyDown:S,onKeyUp:C,onMouseDown:w,itemRender:$=M=>M})=>{const M=R=>{a||g(R,m);},T=f.createElement("label",{className:X(t,{[`${e}-item-disabled`]:a}),style:n,onMouseDown:w},f.createElement("input",{name:p,className:`${e}-item-input`,type:"radio",disabled:a,checked:l,onChange:M,onFocus:b,onBlur:y,onKeyDown:S,onKeyUp:C}),f.createElement("div",{className:X(`${e}-item-label`,o?.label),title:d,style:r?.label},u));return $(T,{item:i})},Fde=f.forwardRef((e,t)=>{const{prefixCls:n="rc-segmented",direction:r,vertical:o,options:i=[],disabled:a,defaultValue:l,value:u,name:d,onChange:m,className:p="",style:g,styles:b,classNames:y,motionName:S="thumb-motion",itemRender:C,...w}=e,$=f.useRef(null),M=f.useMemo(()=>Nr($,t),[$,t]),T=f.useMemo(()=>Bde(i),[i]),[R,I]=hn(l??T[0]?.value,u),[N,P]=f.useState(false),O=(z,Y)=>{I(Y),m?.(Y);},_=Bn(w,["children"]),[L,j]=f.useState(false),[U,q]=f.useState(false),V=()=>{q(true);},B=()=>{q(false);},F=()=>{j(false);},W=z=>{z.key==="Tab"&&j(true);},K=z=>{const Y=T.findIndex(ne=>ne.value===R),ee=T.length,J=(Y+z+ee)%ee,te=T[J];te&&(I(te.value),m?.(te.value));},Q=z=>{switch(z.key){case "ArrowLeft":case "ArrowUp":K(-1);break;case "ArrowRight":case "ArrowDown":K(1);break}},D=z=>{const{value:Y,disabled:ee}=z;return f.createElement(kde,ir({},z,{name:d,data:z,itemRender:C,key:Y,prefixCls:n,className:X(z.className,`${n}-item`,y?.item,{[`${n}-item-selected`]:Y===R&&!N,[`${n}-item-focused`]:U&&L&&Y===R}),style:b?.item,classNames:y,styles:b,checked:Y===R,onChange:O,onFocus:V,onBlur:B,onKeyDown:Q,onKeyUp:W,onMouseDown:F,disabled:!!a||!!ee}))};return f.createElement("div",ir({role:"radiogroup","aria-label":"segmented control",tabIndex:a?void 0:0,"aria-orientation":o?"vertical":"horizontal",style:g},_,{className:X(n,{[`${n}-rtl`]:r==="rtl",[`${n}-disabled`]:a,[`${n}-vertical`]:o},p),ref:M}),f.createElement("div",{className:`${n}-group`},f.createElement(Lde,{vertical:o,prefixCls:n,value:R,containerRef:$,motionName:`${n}-${S}`,direction:r,getValueIndex:z=>T.findIndex(Y=>Y.value===z),onMotionStart:()=>{P(true);},onMotionEnd:()=>{P(false);}}),T.map(D)))}),Hde=Fde;function d8(e,t){return {[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}function f8(e){return {background:e.itemSelectedBg,boxShadow:e.boxShadowTertiary}}const Vde={overflow:"hidden",...qa},jde=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]:{...un(e),display:"inline-block",padding:e.trackPadding,color:e.itemColor,background:e.trackBg,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...$i(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 ${oe(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":{...f8(e),color:e.itemSelectedColor},"&-focused":ba(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:oe(n),padding:`0 ${oe(e.segmentedPaddingHorizontal)}`,...Vde},"&-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`]:{...f8(e),position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${oe(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:oe(r),padding:`0 ${oe(e.segmentedPaddingHorizontal)}`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:o,lineHeight:oe(o),padding:`0 ${oe(e.segmentedPaddingHorizontalSM)}`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}},...d8(`&-disabled ${t}-item`,e),...d8(`${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}}}}},Ude=e=>{const{colorTextLabel:t,colorText:n,colorFillSecondary:r,colorBgElevated:o,colorFill:i,lineWidthBold:a,colorBgLayout:l}=e;return {trackPadding:a,trackBg:l,itemColor:t,itemHoverColor:n,itemHoverBg:r,itemSelectedBg:o,itemActiveBg:i,itemSelectedColor:n}},qde=qt("Segmented",e=>{const{lineWidth:t,calc:n}=e,r=Ft(e,{segmentedPaddingHorizontal:n(e.controlPaddingHorizontal).sub(t).equal(),segmentedPaddingHorizontalSM:n(e.controlPaddingHorizontalSM).sub(t).equal()});return jde(r)},Ude);function Wde(e){return typeof e=="object"&&!!e?.icon}const Gde=f.forwardRef((e,t)=>{const n=Ql(),{prefixCls:r,className:o,rootClassName:i,block:a,options:l=[],size:u="middle",style:d,vertical:m,orientation:p,shape:g="default",name:b=n,styles:y,classNames:S,...C}=e,{getPrefixCls:w,direction:$,className:M,style:T,classNames:R,styles:I}=Gt("segmented"),N={...e,options:l,size:u,shape:g},[P,O]=Xt([R,S],[I,y],{props:N}),_=w("segmented",r),[L,j]=qde(_),U=ao(u),q=f.useMemo(()=>l.map(K=>{if(Wde(K)){const{icon:Q,label:D,...z}=K;return {...z,label:f.createElement(f.Fragment,null,f.createElement("span",{className:X(`${_}-item-icon`,P.icon),style:O.icon},Q),D&&f.createElement("span",null,D))}}return K}),[l,_,P.icon,O.icon]),[,V]=Cu(p,m),B=X(o,i,M,P.root,{[`${_}-block`]:a,[`${_}-sm`]:U==="small",[`${_}-lg`]:U==="large",[`${_}-vertical`]:V,[`${_}-shape-${g}`]:g==="round"},L,j),F={...O.root,...T,...d},W=(K,{item:Q})=>{if(!Q.tooltip)return K;const D=typeof Q.tooltip=="object"?Q.tooltip:{title:Q.tooltip};return f.createElement(Jl,{...D},K)};return f.createElement(Hde,{...C,name:b,className:B,style:F,classNames:P,styles:O,itemRender:W,options:q,ref:t,prefixCls:_,direction:$,vertical:V})}),qR=Gde,IF=G.createContext({}),OF=G.createContext({}),DF=({prefixCls:e,value:t,onChange:n})=>{const r=()=>{if(n&&t&&!t.cleared){const o=t.toHsb();o.a=0;const i=no(o);i.cleared=true,n(i);}};return G.createElement("div",{className:`${e}-clear`,onClick:r})},_F="hex",LF="rgb",zF="hsb";var Kde={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 zE(){return zE=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},zE.apply(this,arguments)}const Yde=(e,t)=>f.createElement(Kn,zE({},e,{ref:t,icon:Kde})),Xde=f.forwardRef(Yde);var Qde={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 BE(){return BE=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},BE.apply(this,arguments)}const Zde=(e,t)=>f.createElement(Kn,BE({},e,{ref:t,icon:Qde})),Jde=f.forwardRef(Zde);function kE(){return typeof BigInt=="function"}function BF(e){return !e&&e!==0&&!Number.isNaN(e)||!String(e).trim()}function Xc(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",a=o[1]||"0";i==="0"&&a==="0"&&(n=false);var l=n?"-":"";return {negative:n,negativeStr:l,trimStr:r,integerStr:i,decimalStr:a,fullStr:"".concat(l).concat(r)}}function WR(e){var t=String(e);return !Number.isNaN(Number(t))&&t.includes("e")}function Vc(e){var t=String(e);if(WR(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(".")&&GR(t)?t.length-t.indexOf(".")-1:0}function h1(e){var t=String(e);if(WR(e)){if(e>Number.MAX_SAFE_INTEGER)return String(kE()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(e<Number.MIN_SAFE_INTEGER)return String(kE()?BigInt(e).toString():Number.MIN_SAFE_INTEGER);t=e.toFixed(Vc(t));}return Xc(t).fullStr}function GR(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 efe=(function(){function e(t){if(Qi(this,e),St(this,"origin",""),St(this,"negative",void 0),St(this,"integer",void 0),St(this,"decimal",void 0),St(this,"decimalLen",void 0),St(this,"empty",void 0),St(this,"nan",void 0),BF(t)){this.empty=true;return}if(this.origin=String(t),t==="-"||Number.isNaN(t)){this.nan=true;return}var n=t;if(WR(n)&&(n=Number(n)),n=typeof n=="string"?n:h1(n),GR(n)){var r=Xc(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 Zi(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),a=this.alignDecimal(i),l=n.alignDecimal(i),u=r(a,l).toString(),d=o(i),m=Xc(u),p=m.negativeStr,g=m.trimStr,b="".concat(p).concat(g.padStart(d+1,"0"));return new e("".concat(b.slice(0,-d),".").concat(b.slice(-d)))}},{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()?"":Xc("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),e})(),tfe=(function(){function e(t){if(Qi(this,e),St(this,"origin",""),St(this,"number",void 0),St(this,"empty",void 0),BF(t)){this.empty=true;return}this.origin=String(t),this.number=Number(t);}return Zi(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(Vc(this.number),Vc(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(Vc(this.number),Vc(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()?"":h1(this.number):this.origin}}]),e})();function ia(e){return kE()?new efe(e):new tfe(e)}function Xb(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:false;if(e==="")return "";var o=Xc(e),i=o.negativeStr,a=o.integerStr,l=o.decimalStr,u="".concat(t).concat(l),d="".concat(i).concat(a);if(n>=0){var m=Number(l[n]);if(m>=5&&!r){var p=ia(e).add("".concat(i,"0.").concat("0".repeat(n)).concat(10-m));return Xb(p.toString(),t,n,r)}return n===0?d:"".concat(d).concat(t).concat(l.padEnd(n,"0").slice(0,n))}return u===".0"?d:"".concat(d).concat(u)}function nfe(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 rfe(e,t){const n=f.useRef(null);function r(){try{const{selectionStart:i,selectionEnd:a,value:l}=e,u=l.substring(0,i),d=l.substring(a);n.current={start:i,end:a,value:l,beforeTxt:u,afterTxt:d};}catch{}}function o(){if(e&&n.current&&t)try{const{value:i}=e,{beforeTxt:a,afterTxt:l,start:u}=n.current;let d=i.length;if(i.startsWith(a))d=a.length;else if(i.endsWith(l))d=i.length-n.current.afterTxt.length;else {const m=a[u-1],p=i.indexOf(m,u-1);p!==-1&&(d=p+1);}e.setSelectionRange(d,d);}catch(i){wr(false,`Something warning of cursor restore. Please fire issue about this: ${i.message}`);}}return [r,o]}const ofe=200,ife=600;function m8({prefixCls:e,action:t,children:n,disabled:r,className:o,style:i,onStep:a}){const l=t==="up",u=f.useRef(),d=f.useRef([]),m=()=>{clearTimeout(u.current);},p=S=>{S.preventDefault(),m(),a(l,"handler");function C(){a(l,"handler"),u.current=setTimeout(C,ofe);}u.current=setTimeout(C,ife);};f.useEffect(()=>()=>{m(),d.current.forEach(S=>{Lt.cancel(S);});},[]);const g=`${e}-action`,b=X(g,`${g}-${t}`,{[`${g}-${t}-disabled`]:r},o),y=()=>d.current.push(Lt(m));return f.createElement("span",{unselectable:"on",role:"button",onMouseUp:y,onMouseLeave:y,onMouseDown:S=>{p(S);},"aria-label":l?"Increase Value":"Decrease Value","aria-disabled":r,className:b,style:i},n||f.createElement("span",{unselectable:"on",className:`${e}-action-${t}-inner`}))}function h8(e){const t=typeof e=="number"?h1(e):Xc(e).fullStr;return t.includes(".")?Xc(t.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:e+"0"}const afe=(()=>{const e=f.useRef(0),t=()=>{Lt.cancel(e.current);};return f.useEffect(()=>t,[]),n=>{t(),e.current=Lt(()=>{n();});}});function _h(){return _h=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},_h.apply(this,arguments)}const p8=(e,t)=>e||t.isEmpty()?t.toString():t.toNumber(),g8=e=>{const t=ia(e);return t.isInvalidate()?null:t},sfe=f.forwardRef((e,t)=>{const{mode:n="input",prefixCls:r="rc-input-number",className:o,style:i,classNames:a,styles:l,min:u,max:d,step:m=1,defaultValue:p,value:g,disabled:b,readOnly:y,upHandler:S,downHandler:C,keyboard:w,changeOnWheel:$=false,controls:M=true,prefix:T,suffix:R,stringMode:I,parser:N,formatter:P,precision:O,decimalSeparator:_,onChange:L,onInput:j,onPressEnter:U,onStep:q,onMouseDown:V,onClick:B,onMouseUp:F,onMouseLeave:W,onMouseMove:K,onMouseEnter:Q,onMouseOut:D,changeOnBlur:z=true,...Y}=e,[ee,J]=f.useState(false),te=f.useRef(false),ne=f.useRef(false),se=f.useRef(false),ae=f.useRef(null),re=f.useRef(null);f.useImperativeHandle(t,()=>nfe(re.current,{focus:He=>{vR(re.current,He);},blur:()=>{re.current?.blur();},nativeElement:ae.current}));const[de,ge]=f.useState(()=>ia(g??p));function ie(He){g===void 0&&ge(He);}const Ee=f.useCallback((He,Ge)=>{if(!Ge)return O>=0?O:Math.max(Vc(He),Vc(m))},[O,m]),le=f.useCallback(He=>{const Ge=String(He);if(N)return N(Ge);let ve=Ge;return _&&(ve=ve.replace(_,".")),ve.replace(/[^\w.-]+/g,"")},[N,_]),ue=f.useRef(""),Se=f.useCallback((He,Ge)=>{if(P)return P(He,{userTyping:Ge,input:String(ue.current)});let ve=typeof He=="number"?h1(He):He;if(!Ge){const Te=Ee(ve,Ge);GR(ve)&&(_||Te>=0)&&(ve=Xb(ve,_||".",Te));}return ve},[P,Ee,_]),[ye,Be]=f.useState(()=>{const He=p??g;return de.isInvalidate()&&["string","number"].includes(typeof He)?Number.isNaN(He)?"":He:Se(de.toString(),false)});ue.current=ye;function je(He,Ge){Be(Se(He.isInvalidate()?He.toString(false):He.toString(!Ge),Ge));}const Ne=f.useMemo(()=>g8(d),[d,O]),fe=f.useMemo(()=>g8(u),[u,O]),be=f.useMemo(()=>!Ne||!de||de.isInvalidate()?false:Ne.lessEquals(de),[Ne,de]),Re=f.useMemo(()=>!fe||!de||de.isInvalidate()?false:de.lessEquals(fe),[fe,de]),[qe,Qe]=rfe(re.current,ee),We=He=>Ne&&!He.lessEquals(Ne)?Ne:fe&&!fe.lessEquals(He)?fe:null,tt=He=>!We(He),rt=(He,Ge)=>{let ve=He,Te=tt(ve)||ve.isEmpty();if(!ve.isEmpty()&&!Ge&&(ve=We(ve)||ve,Te=true),!y&&!b&&Te){const Ce=ve.toString(),he=Ee(Ce,Ge);return he>=0&&(ve=ia(Xb(Ce,".",he)),tt(ve)||(ve=ia(Xb(Ce,".",he,true)))),ve.equals(de)||(ie(ve),L?.(ve.isEmpty()?null:p8(I,ve)),g===void 0&&je(ve,Ge)),ve}return de},Ze=afe(),Oe=He=>{if(qe(),ue.current=He,Be(He),!ne.current){const Ge=le(He),ve=ia(Ge);ve.isNaN()||rt(ve,true);}j?.(He),Ze(()=>{let Ge=He;N||(Ge=He.replace(/。/g,".")),Ge!==He&&Oe(Ge);});},Ye=()=>{ne.current=true;},Ke=()=>{ne.current=false,Oe(re.current.value);},_e=He=>{Oe(He.target.value);},ke=Et((He,Ge)=>{if(He&&be||!He&&Re)return;te.current=false;let ve=ia(se.current?h8(m):m);He||(ve=ve.negate());const Te=(de||ia(0)).add(ve.toString()),Ce=rt(Te,false);q?.(p8(I,Ce),{offset:se.current?h8(m):m,type:He?"up":"down",emitter:Ge}),re.current?.focus();}),lt=He=>{const Ge=ia(le(ye));let ve;Ge.isNaN()?ve=rt(de,He):ve=rt(Ge,He),g!==void 0?je(de,false):ve.isNaN()||je(ve,false);},At=()=>{te.current=true;},dt=He=>{const{key:Ge,shiftKey:ve}=He;te.current=true,se.current=ve,Ge==="Enter"&&(ne.current||(te.current=false),lt(false),U?.(He)),w!==false&&!ne.current&&["Up","ArrowUp","Down","ArrowDown"].includes(Ge)&&(ke(Ge==="Up"||Ge==="ArrowUp","keyboard"),He.preventDefault());},Dt=()=>{te.current=false,se.current=false;};f.useEffect(()=>{if($&&ee){const He=ve=>{ke(ve.deltaY<0,"wheel"),ve.preventDefault();},Ge=re.current;if(Ge)return Ge.addEventListener("wheel",He,{passive:false}),()=>Ge.removeEventListener("wheel",He)}});const Tt=()=>{z&<(false),J(false),te.current=false;},xt=He=>{re.current&&He.target!==re.current&&(re.current.focus(),He.preventDefault()),V?.(He);};Lb(()=>{de.isInvalidate()||je(de,false);},[O,P]),Lb(()=>{const He=ia(g);ge(He);const Ge=ia(le(ye));(!He.equals(Ge)||!te.current||P)&&je(He,te.current);},[g]),Lb(()=>{P&&Qe();},[ye]);const gt={prefixCls:r,onStep:ke,className:a?.action,style:l?.action},ft=f.createElement(m8,_h({},gt,{action:"up",disabled:be}),S),st=f.createElement(m8,_h({},gt,{action:"down",disabled:Re}),C);return f.createElement("div",{ref:ae,className:X(r,`${r}-mode-${n}`,o,a?.root,{[`${r}-focused`]:ee,[`${r}-disabled`]:b,[`${r}-readonly`]:y,[`${r}-not-a-number`]:de.isNaN(),[`${r}-out-of-range`]:!de.isInvalidate()&&!tt(de)}),style:{...l?.root,...i},onMouseDown:xt,onMouseUp:F,onMouseLeave:W,onMouseMove:K,onMouseEnter:Q,onMouseOut:D,onClick:B,onFocus:()=>{J(true);},onBlur:Tt,onKeyDown:dt,onKeyUp:Dt,onCompositionStart:Ye,onCompositionEnd:Ke,onBeforeInput:At},n==="spinner"&&M&&st,T!==void 0&&f.createElement("div",{className:X(`${r}-prefix`,a?.prefix),style:l?.prefix},T),f.createElement("input",_h({autoComplete:"off",role:"spinbutton","aria-valuemin":u,"aria-valuemax":d,"aria-valuenow":de.isInvalidate()?null:de.toString(),step:m,ref:re,className:X(`${r}-input`,a?.input),style:l?.input,value:ye,onChange:_e,disabled:b,readOnly:y},Y)),R!==void 0&&f.createElement("div",{className:X(`${r}-suffix`,a?.suffix),style:l?.suffix},R),n==="spinner"&&M&&ft,n==="input"&&M&&f.createElement("div",{className:X(`${r}-actions`,a?.actions),style:l?.actions},ft,st))}),lfe=e=>{const{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:o,paddingXS:i,fontSizeLG:a,fontSizeSM:l,borderRadiusLG:u,borderRadiusSM:d,colorBgContainerDisabled:m,lineWidth:p,antCls:g}=e,[b,y]=ar(g,"space");return {[t]:[{display:"inline-flex",alignItems:"center",gap:0,paddingInline:r,margin:0,borderWidth:p,borderStyle:"solid",borderRadius:n,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:a,borderRadius:u},"&-small":{paddingInline:i,borderRadius:d,fontSize:l},"&-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}},{[b("addon-border-color")]:o,[b("addon-background")]:m,[b("addon-border-color-outlined")]:o,[b("addon-background-filled")]:m,borderColor:y("addon-border-color"),background:y("addon-background"),"&-variant-outlined":{[b("addon-border-color")]:y("addon-border-color-outlined")},"&-variant-filled":{[b("addon-border-color")]:"transparent",[b("addon-background")]:y("addon-background-filled"),[`&${t}-disabled`]:{[b("addon-border-color")]:o,[b("addon-background")]:m}},"&-variant-borderless":{border:"none",background:"transparent"},"&-variant-underlined":{border:"none",background:"transparent"}},{"&-status-error":{[b("addon-border-color-outlined")]:e.colorError,[b("addon-background-filled")]:e.colorErrorBg,color:e.colorError},"&-status-warning":{[b("addon-border-color-outlined")]:e.colorWarning,[b("addon-background-filled")]:e.colorWarningBg,color:e.colorWarning}}]}},cfe=qt(["Space","Addon"],e=>[lfe(e),Nf(e,{focus:false})]),kF=G.forwardRef((e,t)=>{const{className:n,children:r,style:o,prefixCls:i,variant:a="outlined",disabled:l,status:u,...d}=e,{getPrefixCls:m,direction:p}=G.useContext(Ct),g=m("space-addon",i),[b,y]=cfe(g),{compactItemClassnames:S,compactSize:C}=_s(g,p),w=Fl(g,u),$=X(g,b,S,y,`${g}-variant-${a}`,w,{[`${g}-${C}`]:C,[`${g}-disabled`]:l},n);return G.createElement("div",{ref:t,className:$,style:o,...d},r)}),ufe=e=>{const t=e.handleVisible??"auto",n=e.controlHeightSM-e.lineWidth*2;return {...Lf(e),controlWidth:90,handleWidth:n,handleFontSize:e.fontSize/2,handleVisible:t,handleActiveBg:e.colorFillAlter,handleBg:e.colorBgContainer,filledHandleBg:new cn(e.colorFillSecondary).onBackground(e.colorBgContainer).toHexString(),handleHoverColor:e.colorPrimary,handleBorderColor:e.colorBorder,handleOpacity:t===true?1:0,handleVisibleWidth:t===true?n:0}},dfe=e=>{const{componentCls:t,lineWidth:n,lineType:r,borderRadius:o,inputFontSizeSM:i,inputFontSizeLG:a,colorError:l,paddingInlineSM:u,paddingBlockSM:d,paddingBlockLG:m,paddingInlineLG:p,colorIcon:g,motionDurationMid:b,handleHoverColor:y,handleOpacity:S,paddingInline:C,paddingBlock:w,handleBg:$,handleActiveBg:M,inputAffixPadding:T,borderRadiusSM:R,controlWidth:I,handleBorderColor:N,filledHandleBg:P,lineHeightLG:O,antCls:_}=e,L=`${oe(n)} ${r} ${N}`,[j,U]=ar(_,"input-number");return [{[t]:{...un(e),...m1(e),[j("input-padding-block")]:oe(w),[j("input-padding-inline")]:oe(C),display:"inline-flex",width:I,margin:0,paddingBlock:0,borderRadius:o,...pF(e,{[`${t}-actions`]:{background:$,[`${t}-action-down`]:{borderBlockStart:L}}}),...bF(e,{[`${t}-actions`]:{background:P,[`${t}-action-down`]:{borderBlockStart:L}},"&:focus-within":{[`${t}-actions`]:{background:$}}}),...SF(e,{[`${t}-actions`]:{background:$,[`${t}-action-down`]:{borderBlockStart:L}}}),...gF(e),"&-rtl":{direction:"rtl",[`${t}-input`]:{direction:"rtl"}},[`&${t}-out-of-range`]:{[`${t}-input`]:{color:l}},[`${t}-input`]:{...un(e),width:"100%",paddingBlock:U("input-padding-block"),textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:o,outline:0,transition:`all ${b} linear`,appearance:"textfield",fontSize:"inherit",lineHeight:"inherit",...CF(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`]:{...Su(),userSelect:"none",overflow:"hidden",fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",transition:`all ${b} linear`,"&:active":{background:M},"&:hover":{color:y}},"&-mode-input":{overflow:"hidden",[`${t}-actions`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:e.handleVisibleWidth,opacity:S,height:"100%",borderRadius:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`all ${b}`,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:g,height:"50%",borderInlineStart:L,"&:hover":{height:"60%"}},[`&${t}-disabled, &${t}-readonly`]:{[`${t}-actions`]:{display:"none"}}},[`&${t}-mode-spinner`]:{padding:0,width:"auto",[`${t}-action`]:{flex:"none",paddingInline:U("input-padding-inline"),"&-up":{borderInlineStart:L},"&-down":{borderInlineEnd:L}},[`${t}-input`]:{textAlign:"center",paddingInline:U("input-padding-inline")}}}},{[t]:{"&-lg":{[j("input-padding-block")]:oe(m),[j("input-padding-inline")]:oe(p),paddingBlock:0,fontSize:a,lineHeight:O},"&-sm":{[j("input-padding-block")]:oe(d),[j("input-padding-inline")]:oe(u),paddingBlock:0,fontSize:i,borderRadius:R}}},{[t]:{[`${t}-prefix, ${t}-suffix`]:{display:"flex",flex:"none",alignItems:"center",alignSelf:"center",pointerEvents:"none"},[`${t}-prefix`]:{marginInlineEnd:T},[`${t}-suffix`]:{height:"100%",marginInlineStart:T,transition:`margin ${b}`},[`&:hover:not(${t}-without-controls)`]:{[`${t}-suffix`]:{marginInlineEnd:e.handleWidth}}}}]},ffe=e=>{const{componentCls:t,antCls:n}=e;return {[`${t}-addon`]:{[`&:has(${n}-select)`]:{border:0,padding:0}}}},mfe=qt("InputNumber",e=>{const t=Ft(e,_f(e));return [dfe(t),ffe(t),Nf(t)]},ufe,{unitless:{handleOpacity:true},resetFont:false}),hfe=f.forwardRef((e,t)=>{const n=f.useRef(null);f.useImperativeHandle(t,()=>n.current);const{rootClassName:r,size:o,disabled:i,prefixCls:a,addonBefore:l,addonAfter:u,prefix:d,suffix:m,bordered:p,readOnly:g,status:b,controls:y=true,variant:S,className:C,style:w,classNames:$,styles:M,mode:T,...R}=e,{direction:I,className:N,style:P,styles:O,classNames:_}=Gt("inputNumber"),L=f.useContext(to),j=i??L,U=f.useMemo(()=>!y||j||g?false:y,[y,j,g]),{compactSize:q,compactItemClassnames:V}=_s(a,I);let B=T==="spinner"?f.createElement($F,null):f.createElement(Jde,null),F=T==="spinner"?f.createElement(Xde,null):f.createElement(MR,null);const W=typeof U=="boolean"?U:void 0;typeof U=="object"&&(B=U.upIcon||B,F=U.downIcon||F);const{hasFeedback:K,isFormItemInput:Q,feedbackIcon:D}=f.useContext(yo),z=ao(ae=>o??q??ae),[Y,ee]=i1("inputNumber",S,p),J=K&&f.createElement(f.Fragment,null,D),te={...e,size:z,disabled:j,controls:U},[ne,se]=Xt([_,$],[O,M],{props:te});return f.createElement(sfe,{ref:n,mode:T,disabled:j,className:X(C,r,ne.root,N,V,Fl(a,b,K),{[`${a}-${Y}`]:ee,[`${a}-lg`]:z==="large",[`${a}-sm`]:z==="small",[`${a}-rtl`]:I==="rtl",[`${a}-in-form-item`]:Q,[`${a}-without-controls`]:!U}),style:{...se.root,...P,...w},upHandler:B,downHandler:F,prefixCls:a,readOnly:g,controls:W,prefix:d,suffix:J||m,classNames:ne,styles:se,...R})}),FF=f.forwardRef((e,t)=>{const{addonBefore:n,addonAfter:r,prefixCls:o,className:i,status:a,rootClassName:l,...u}=e,{getPrefixCls:d}=Gt("inputNumber"),m=d("input-number",o),{status:p}=f.useContext(yo),g=If(p,a),b=Yn(m),[y,S]=mfe(m,b),C=n||r,w=f.createElement(hfe,{ref:t,...u,prefixCls:m,status:g,className:X(S,b,y,i),rootClassName:C?void 0:l});if(C){const $=R=>R?f.createElement(kF,{className:X(`${m}-addon`,S,y),variant:e.variant,disabled:e.disabled,status:g},f.createElement(kl,{form:true},R)):null,M=$(n),T=$(r);return f.createElement(rR,{rootClassName:l},M,w,T)}return w}),Qc=FF,pfe=e=>f.createElement(Do,{theme:{components:{InputNumber:{handleVisible:true}}}},f.createElement(FF,{...e}));Qc._InternalPanelDoNotUseOrYouWillBeFired=pfe;const Zc=({prefixCls:e,min:t=0,max:n=100,value:r,onChange:o,className:i,formatter:a})=>{const l=`${e}-steppers`,[u,d]=f.useState(0),m=Number.isNaN(r)?u:r;return G.createElement(Qc,{className:X(l,i),min:t,max:n,value:m,formatter:a,size:"small",onChange:p=>{d(p||0),o?.(p);}})},gfe=({prefixCls:e,value:t,onChange:n})=>{const r=`${e}-alpha-input`,[o,i]=f.useState(()=>no(t||"#000")),a=t||o,l=u=>{const d=a.toHsb();d.a=(u||0)/100;const m=no(d);i(m),n?.(m);};return G.createElement(Zc,{value:fR(a),prefixCls:e,formatter:u=>`${u}%`,className:r,onChange:l})};function vfe(e){return !!(e.addonBefore||e.addonAfter)}function bfe(e){return !!(e.prefix||e.suffix||e.allowClear)}function v8(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 Z0(e,t,n,r){if(!n)return;let o=t;if(t.type==="click"){o=v8(t,e,""),n(o);return}if(e.type!=="file"&&r!==void 0){o=v8(t,e,r),n(o);return}n(o);}function FE(){return FE=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},FE.apply(this,arguments)}const HF=G.forwardRef((e,t)=>{const{inputElement:n,children:r,prefixCls:o,prefix:i,suffix:a,addonBefore:l,addonAfter:u,className:d,style:m,disabled:p,readOnly:g,focused:b,triggerFocus:y,allowClear:S,value:C,handleReset:w,hidden:$,classes:M,classNames:T,dataAttrs:R,styles:I,components:N,onClear:P}=e,O=r??n,_=N?.affixWrapper||"span",L=N?.groupWrapper||"span",j=N?.wrapper||"span",U=N?.groupAddon||"span",q=f.useRef(null),V=K=>{q.current?.contains(K.target)&&y?.();},B=bfe(e);let F=f.cloneElement(O,{value:C,className:X(O.props?.className,!B&&T?.variant)||null});const W=f.useRef(null);if(G.useImperativeHandle(t,()=>({nativeElement:W.current||q.current})),B){let K=null;if(S){const Y=!p&&!g&&C,ee=`${o}-clear-icon`,J=typeof S=="object"&&S?.clearIcon?S.clearIcon:"✖";K=G.createElement("button",{type:"button",tabIndex:-1,onClick:te=>{w?.(te),P?.();},onMouseDown:te=>te.preventDefault(),className:X(ee,{[`${ee}-hidden`]:!Y,[`${ee}-has-suffix`]:!!a})},J);}const Q=`${o}-affix-wrapper`,D=X(Q,{[`${o}-disabled`]:p,[`${Q}-disabled`]:p,[`${Q}-focused`]:b,[`${Q}-readonly`]:g,[`${Q}-input-with-clear-btn`]:a&&S&&C},M?.affixWrapper,T?.affixWrapper,T?.variant),z=(a||S)&&G.createElement("span",{className:X(`${o}-suffix`,T?.suffix),style:I?.suffix},K,a);F=G.createElement(_,FE({className:D,style:I?.affixWrapper,onClick:V},R?.affixWrapper,{ref:q}),i&&G.createElement("span",{className:X(`${o}-prefix`,T?.prefix),style:I?.prefix},i),F,z);}if(vfe(e)){const K=`${o}-group`,Q=`${K}-addon`,D=`${K}-wrapper`,z=X(`${o}-wrapper`,K,M?.wrapper,T?.wrapper),Y=X(D,{[`${D}-disabled`]:p},M?.group,T?.groupWrapper);F=G.createElement(L,{className:Y,ref:W},G.createElement(j,{className:z},l&&G.createElement(U,{className:Q},l),F,u&&G.createElement(U,{className:Q},u)));}return G.cloneElement(F,{className:X(F.props?.className,d)||null,style:{...F.props?.style,...m},hidden:$})});function VF(e,t){return f.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 J0(){return J0=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},J0.apply(this,arguments)}const yfe=f.forwardRef((e,t)=>{const{autoComplete:n,onChange:r,onFocus:o,onBlur:i,onPressEnter:a,onKeyDown:l,onKeyUp:u,prefixCls:d="rc-input",disabled:m,htmlSize:p,className:g,maxLength:b,suffix:y,showCount:S,count:C,type:w="text",classes:$,classNames:M,styles:T,onCompositionStart:R,onCompositionEnd:I,...N}=e,[P,O]=f.useState(false),_=f.useRef(false),L=f.useRef(false),j=f.useRef(null),U=f.useRef(null),q=le=>{j.current&&vR(j.current,le);},[V,B]=hn(e.defaultValue,e.value),F=V==null?"":String(V),[W,K]=f.useState(null),Q=VF(C,S),D=Q.max||b,z=Q.strategy(F),Y=!!D&&z>D;f.useImperativeHandle(t,()=>({focus:q,blur:()=>{j.current?.blur();},setSelectionRange:(le,ue,Se)=>{j.current?.setSelectionRange(le,ue,Se);},select:()=>{j.current?.select();},input:j.current,nativeElement:U.current?.nativeElement||j.current})),f.useEffect(()=>{L.current&&(L.current=false),O(le=>le&&m?false:le);},[m]);const ee=(le,ue,Se)=>{let ye=ue;if(!_.current&&Q.exceedFormatter&&Q.max&&Q.strategy(ue)>Q.max)ye=Q.exceedFormatter(ue,{max:Q.max}),ue!==ye&&K([j.current?.selectionStart||0,j.current?.selectionEnd||0]);else if(Se.source==="compositionEnd")return;B(ye),j.current&&Z0(j.current,le,r,ye);};f.useEffect(()=>{W&&j.current?.setSelectionRange(...W);},[W]);const J=le=>{ee(le,le.target.value,{source:"change"});},te=le=>{_.current=false,ee(le,le.currentTarget.value,{source:"compositionEnd"}),I?.(le);},ne=le=>{a&&le.key==="Enter"&&!L.current&&!le.nativeEvent.isComposing&&(L.current=true,a(le)),l?.(le);},se=le=>{le.key==="Enter"&&(L.current=false),u?.(le);},ae=le=>{O(true),o?.(le);},re=le=>{L.current&&(L.current=false),O(false),i?.(le);},de=le=>{B(""),q(),j.current&&Z0(j.current,le,r);},ge=Y&&`${d}-out-of-range`,ie=()=>{const le=Bn(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return G.createElement("input",J0({autoComplete:n},le,{onChange:J,onFocus:ae,onBlur:re,onKeyDown:ne,onKeyUp:se,className:X(d,{[`${d}-disabled`]:m},M?.input),style:T?.input,ref:j,size:p,type:w,onCompositionStart:ue=>{_.current=true,R?.(ue);},onCompositionEnd:te}))},Ee=()=>{const le=Number(D)>0;if(y||Q.show){const ue=Q.showFormatter?Q.showFormatter({value:F,count:z,maxLength:D}):`${z}${le?` / ${D}`:""}`;return G.createElement(G.Fragment,null,Q.show&&G.createElement("span",{className:X(`${d}-show-count-suffix`,{[`${d}-show-count-has-suffix`]:!!y},M?.count),style:{...T?.count}},ue),y)}return null};return G.createElement(HF,J0({},N,{prefixCls:d,className:X(g,ge),handleReset:de,value:F,focused:P,triggerFocus:q,suffix:Ee(),disabled:m,classes:$,classNames:M,styles:T,ref:U}),ie())}),jF=e=>{let t;return typeof e=="object"&&e?.clearIcon?t=e:e&&(t={clearIcon:G.createElement(Gp,null)}),t};function UF(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 Sfe(e){return !!(e.prefix||e.suffix||e.allowClear||e.showCount)}const zf=f.forwardRef((e,t)=>{const{prefixCls:n,bordered:r=true,status:o,size:i,disabled:a,onBlur:l,onFocus:u,suffix:d,allowClear:m,addonAfter:p,addonBefore:g,className:b,style:y,styles:S,rootClassName:C,onChange:w,classNames:$,variant:M,...T}=e,{getPrefixCls:R,direction:I,allowClear:N,autoComplete:P,className:O,style:_,classNames:L,styles:j}=Gt("input"),U=R("input",n),q=f.useRef(null),V=Yn(U),[B,F]=xF(U,C);wF(U,V);const{compactSize:W,compactItemClassnames:K}=_s(U,I),Q=ao(Be=>i??W??Be),D=G.useContext(to),z=a??D,Y={...e,size:Q,disabled:z},[ee,J]=Xt([L,$],[j,S],{props:Y}),{status:te,hasFeedback:ne,feedbackIcon:se}=f.useContext(yo),ae=If(te,o),re=Sfe(e)||!!ne;f.useRef(re);const de=UF(q,true),ge=Be=>{de(),l?.(Be);},ie=Be=>{de(),u?.(Be);},Ee=Be=>{de(),w?.(Be);},le=(ne||d)&&G.createElement(G.Fragment,null,d,ne&&se),ue=jF(m??N),[Se,ye]=i1("input",M,r);return G.createElement(yfe,{ref:Nr(t,q),prefixCls:U,autoComplete:P,...T,disabled:z,onBlur:ge,onFocus:ie,style:{...J.root,..._,...y},styles:J,suffix:le,allowClear:ue,className:X(b,C,F,V,K,O,ee.root),onChange:Ee,addonBefore:g&&G.createElement(kl,{form:true,space:true},g),addonAfter:p&&G.createElement(kl,{form:true,space:true},p),classNames:{...ee,input:X({[`${U}-sm`]:Q==="small",[`${U}-lg`]:Q==="large",[`${U}-rtl`]:I==="rtl"},ee.input,B),variant:X({[`${U}-${Se}`]:ye},Fl(U,ae)),affixWrapper:X({[`${U}-affix-wrapper-sm`]:Q==="small",[`${U}-affix-wrapper-lg`]:Q==="large",[`${U}-affix-wrapper-rtl`]:I==="rtl"},B),wrapper:X({[`${U}-group-rtl`]:I==="rtl"},B),groupWrapper:X({[`${U}-group-wrapper-sm`]:Q==="small",[`${U}-group-wrapper-lg`]:Q==="large",[`${U}-group-wrapper-rtl`]:I==="rtl",[`${U}-group-wrapper-${Se}`]:ye},Fl(`${U}-group-wrapper`,ae,ne),B)}})}),Cfe=/(^#[\da-f]{6}$)|(^#[\da-f]{8}$)/i,xfe=e=>Cfe.test(`#${e}`),wfe=({prefixCls:e,value:t,onChange:n})=>{const r=`${e}-hex-input`,[o,i]=f.useState(()=>t?vh(t.toHexString()):void 0);f.useEffect(()=>{t&&i(vh(t.toHexString()));},[t]);const a=l=>{const u=l.target.value;i(vh(u)),xfe(vh(u,true))&&n?.(no(u));};return G.createElement(zf,{className:r,value:o,prefix:"#",onChange:a,size:"small"})},$fe=({prefixCls:e,value:t,onChange:n})=>{const r=`${e}-hsb-input`,[o,i]=f.useState(()=>no(t||"#000")),a=t||o,l=(u,d)=>{const m=a.toHsb();m[d]=d==="h"?u:(u||0)/100;const p=no(m);i(p),n?.(p);};return G.createElement("div",{className:r},G.createElement(Zc,{max:360,min:0,value:Number(a.toHsb().h),prefixCls:e,className:r,formatter:u=>Ub(u||0).toString(),onChange:u=>l(Number(u),"h")}),G.createElement(Zc,{max:100,min:0,value:Number(a.toHsb().s)*100,prefixCls:e,className:r,formatter:u=>`${Ub(u||0)}%`,onChange:u=>l(Number(u),"s")}),G.createElement(Zc,{max:100,min:0,value:Number(a.toHsb().b)*100,prefixCls:e,className:r,formatter:u=>`${Ub(u||0)}%`,onChange:u=>l(Number(u),"b")}))},Efe=({prefixCls:e,value:t,onChange:n})=>{const r=`${e}-rgb-input`,[o,i]=f.useState(()=>no(t||"#000")),a=t||o,l=(u,d)=>{const m=a.toRgb();m[d]=u||0;const p=no(m);i(p),n?.(p);};return G.createElement("div",{className:r},G.createElement(Zc,{max:255,min:0,value:Number(a.toRgb().r),prefixCls:e,className:r,onChange:u=>l(Number(u),"r")}),G.createElement(Zc,{max:255,min:0,value:Number(a.toRgb().g),prefixCls:e,className:r,onChange:u=>l(Number(u),"g")}),G.createElement(Zc,{max:255,min:0,value:Number(a.toRgb().b),prefixCls:e,className:r,onChange:u=>l(Number(u),"b")}))},Mfe=[_F,zF,LF].map(e=>({value:e,label:e.toUpperCase()})),Rfe=e=>{const{prefixCls:t,format:n,value:r,disabledAlpha:o,onFormatChange:i,onChange:a,disabledFormat:l}=e,[u,d]=hn(_F,n),m=`${t}-input`,p=b=>{d(b),i?.(b);},g=f.useMemo(()=>{const b={value:r,prefixCls:t,onChange:a};switch(u){case zF:return G.createElement($fe,{...b});case LF:return G.createElement(Efe,{...b});default:return G.createElement(wfe,{...b})}},[u,t,r,a]);return G.createElement("div",{className:`${m}-container`},!l&&G.createElement(Zl,{value:u,variant:"borderless",getPopupContainer:b=>b,popupMatchSelectWidth:68,placement:"bottomRight",onChange:p,className:`${t}-format-select`,size:"small",options:Mfe}),G.createElement("div",{className:m},g),!o&&G.createElement(gfe,{prefixCls:t,value:r,onChange:a}))};function HE(e,t,n){return (e-t)/(n-t)}function KR(e,t,n,r){const o=HE(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 zc(e,t){return Array.isArray(e)?e[t]:e}const $u=f.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:true,styles:{},classNames:{}}),qF=f.createContext({});function VE(){return VE=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},VE.apply(this,arguments)}const b8=f.forwardRef((e,t)=>{const{prefixCls:n,value:r,valueIndex:o,onStartMove:i,onDelete:a,style:l,render:u,dragging:d,draggingDelete:m,onOffsetChange:p,onChangeComplete:g,onFocus:b,onMouseEnter:y,...S}=e,{min:C,max:w,direction:$,disabled:M,keyboard:T,range:R,tabIndex:I,ariaLabelForHandle:N,ariaLabelledByForHandle:P,ariaRequired:O,ariaValueTextFormatterForHandle:_,styles:L,classNames:j}=f.useContext($u),U=`${n}-handle`,q=z=>{M||i(z,o);},V=z=>{b?.(z,o);},B=z=>{y(z,o);},F=z=>{if(!M&&T){let Y=null;switch(z.which||z.keyCode){case ot.LEFT:Y=$==="ltr"||$==="btt"?-1:1;break;case ot.RIGHT:Y=$==="ltr"||$==="btt"?1:-1;break;case ot.UP:Y=$!=="ttb"?1:-1;break;case ot.DOWN:Y=$!=="ttb"?-1:1;break;case ot.HOME:Y="min";break;case ot.END:Y="max";break;case ot.PAGE_UP:Y=2;break;case ot.PAGE_DOWN:Y=-2;break;case ot.BACKSPACE:case ot.DELETE:a?.(o);break}Y!==null&&(z.preventDefault(),p(Y,o));}},W=z=>{switch(z.which||z.keyCode){case ot.LEFT:case ot.RIGHT:case ot.UP:case ot.DOWN:case ot.HOME:case ot.END:case ot.PAGE_UP:case ot.PAGE_DOWN:g?.();break}},K=KR($,r,C,w);let Q={};o!==null&&(Q={tabIndex:M?null:zc(I,o),role:"slider","aria-valuemin":C,"aria-valuemax":w,"aria-valuenow":r,"aria-disabled":M,"aria-label":zc(N,o),"aria-labelledby":zc(P,o),"aria-required":zc(O,o),"aria-valuetext":zc(_,o)?.(r),"aria-orientation":$==="ltr"||$==="rtl"?"horizontal":"vertical",onMouseDown:q,onTouchStart:q,onFocus:V,onMouseEnter:B,onKeyDown:F,onKeyUp:W});let D=f.createElement("div",VE({ref:t,className:X(U,{[`${U}-${o+1}`]:o!==null&&R,[`${U}-dragging`]:d,[`${U}-dragging-delete`]:m},j.handle),style:{...K,...l,...L.handle}},Q,S));return u&&(D=u(D,{index:o,prefixCls:n,value:r,dragging:d,draggingDelete:m})),D});function ey(){return ey=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},ey.apply(this,arguments)}const Tfe=f.forwardRef((e,t)=>{const{prefixCls:n,style:r,onStartMove:o,onOffsetChange:i,values:a,handleRender:l,activeHandleRender:u,draggingIndex:d,draggingDelete:m,onFocus:p,...g}=e,b=f.useRef({}),[y,S]=f.useState(false),[C,w]=f.useState(-1),$=I=>{w(I),S(true);},M=(I,N)=>{$(N),p?.(I);},T=(I,N)=>{$(N);};f.useImperativeHandle(t,()=>({focus:I=>{b.current[I]?.focus();},hideHelp:()=>{Eo.flushSync(()=>{S(false);});}}));const R={prefixCls:n,onStartMove:o,onOffsetChange:i,render:l,onFocus:M,onMouseEnter:T,...g};return f.createElement(f.Fragment,null,a.map((I,N)=>{const P=d===N;return f.createElement(b8,ey({ref:O=>{O?b.current[N]=O:delete b.current[N];},dragging:P,draggingDelete:P&&m,style:zc(r,N),key:N,value:I,valueIndex:N},R))}),u&&y&&f.createElement(b8,ey({key:"a11y"},R,{value:a[C],valueIndex:null,dragging:d!==-1,draggingDelete:m,render:u,style:{pointerEvents:"none"},tabIndex:null,"aria-hidden":true})))}),Afe=e=>{const{prefixCls:t,style:n,children:r,value:o,onClick:i}=e,{min:a,max:l,direction:u,includedStart:d,includedEnd:m,included:p}=f.useContext($u),g=`${t}-text`,b=KR(u,o,a,l);return f.createElement("span",{className:X(g,{[`${g}-active`]:p&&d<=o&&o<=m}),style:{...b,...n},onMouseDown:y=>{y.stopPropagation();},onClick:()=>{i(o);}},r)},Nfe=e=>{const{prefixCls:t,marks:n,onClick:r}=e,o=`${t}-mark`;return n.length?f.createElement("div",{className:o},n.map(({value:i,style:a,label:l})=>f.createElement(Afe,{key:i,prefixCls:o,style:a,value:i,onClick:r},l))):null},Pfe=e=>{const{prefixCls:t,value:n,style:r,activeStyle:o}=e,{min:i,max:a,direction:l,included:u,includedStart:d,includedEnd:m}=f.useContext($u),p=`${t}-dot`,g=u&&d<=n&&n<=m;let b={...KR(l,n,i,a),...typeof r=="function"?r(n):r};return g&&(b={...b,...typeof o=="function"?o(n):o}),f.createElement("span",{className:X(p,{[`${p}-active`]:g}),style:b})},Ife=e=>{const{prefixCls:t,marks:n,dots:r,style:o,activeStyle:i}=e,{min:a,max:l,step:u}=f.useContext($u),d=f.useMemo(()=>{const m=new Set;if(n.forEach(p=>{m.add(p.value);}),r&&u!==null){let p=a;for(;p<=l;)m.add(p),p+=u;}return Array.from(m)},[a,l,u,r,n]);return f.createElement("div",{className:`${t}-step`},d.map(m=>f.createElement(Pfe,{prefixCls:t,key:m,value:m,style:o,activeStyle:i})))},y8=e=>{const{prefixCls:t,style:n,start:r,end:o,index:i,onStartMove:a,replaceCls:l}=e,{direction:u,min:d,max:m,disabled:p,range:g,classNames:b}=f.useContext($u),y=`${t}-track`,S=HE(r,d,m),C=HE(o,d,m),w=T=>{!p&&a&&a(T,-1);},$={};switch(u){case "rtl":$.right=`${S*100}%`,$.width=`${C*100-S*100}%`;break;case "btt":$.bottom=`${S*100}%`,$.height=`${C*100-S*100}%`;break;case "ttb":$.top=`${S*100}%`,$.height=`${C*100-S*100}%`;break;default:$.left=`${S*100}%`,$.width=`${C*100-S*100}%`;}const M=l||X(y,{[`${y}-${i+1}`]:i!==null&&g,[`${t}-track-draggable`]:a},b.track);return f.createElement("div",{className:M,style:{...$,...n},onMouseDown:w,onTouchStart:w})},Ofe=e=>{const{prefixCls:t,style:n,values:r,startPoint:o,onStartMove:i}=e,{included:a,range:l,min:u,styles:d,classNames:m}=f.useContext($u),p=f.useMemo(()=>{if(!l){if(r.length===0)return [];const y=o??u,S=r[0];return [{start:Math.min(y,S),end:Math.max(y,S)}]}const b=[];for(let y=0;y<r.length-1;y+=1)b.push({start:r[y],end:r[y+1]});return b},[r,l,o,u]);if(!a)return null;const g=p?.length&&(m.tracks||d.tracks)?f.createElement(y8,{index:null,prefixCls:t,start:p[0].start,end:p[p.length-1].end,replaceCls:X(m.tracks,`${t}-tracks`),style:d.tracks}):null;return f.createElement(f.Fragment,null,g,p.map(({start:b,end:y},S)=>f.createElement(y8,{index:S,prefixCls:t,style:{...zc(n,S),...d.track},start:b,end:y,key:S,onStartMove:i})))},Dfe=130;function S8(e){const t="targetTouches"in e?e.targetTouches[0]:e;return {pageX:t.pageX,pageY:t.pageY}}function _fe(e,t,n,r,o,i,a,l,u,d,m){const[p,g]=f.useState(null),[b,y]=f.useState(-1),[S,C]=f.useState(false),[w,$]=f.useState(n),[M,T]=f.useState(n),R=f.useRef(null),I=f.useRef(null),N=f.useRef(null),{onDragStart:P,onDragChange:O}=f.useContext(qF);An(()=>{b===-1&&$(n);},[n,b]),f.useEffect(()=>()=>{document.removeEventListener("mousemove",R.current),document.removeEventListener("mouseup",I.current),N.current&&(N.current.removeEventListener("touchmove",R.current),N.current.removeEventListener("touchend",I.current));},[]);const _=(q,V,B)=>{V!==void 0&&g(V),$(q);let F=q;B&&(F=q.filter((W,K)=>K!==b)),a(F),O&&O({rawValues:q,deleteIndex:B?b:-1,draggingIndex:b,draggingValue:V});},L=Et((q,V,B)=>{if(q===-1){const F=M[0],W=M[M.length-1],K=r-F,Q=o-W;let D=V*(o-r);D=Math.max(D,K),D=Math.min(D,Q),D=i(F+D)-F;const Y=M.map(ee=>ee+D);_(Y);}else {const F=(o-r)*V,W=[...w];W[q]=M[q];const K=u(W,F,q,"dist");_(K.values,K.value,B);}}),j=(q,V,B)=>{q.stopPropagation();const F=B||n,W=F[V];y(V),g(W),T(F),$(F),C(false);const{pageX:K,pageY:Q}=S8(q);let D=false;P&&P({rawValues:F,draggingIndex:V,draggingValue:W});const z=ee=>{ee.preventDefault();const{pageX:J,pageY:te}=S8(ee),ne=J-K,se=te-Q,{width:ae,height:re}=e.current.getBoundingClientRect();let de,ge;switch(t){case "btt":de=-se/re,ge=ne;break;case "ttb":de=se/re,ge=ne;break;case "rtl":de=-ne/ae,ge=se;break;default:de=ne/ae,ge=se;}D=d?Math.abs(ge)>Dfe&&m<w.length:false,C(D),L(V,de,D);},Y=ee=>{ee.preventDefault(),document.removeEventListener("mouseup",Y),document.removeEventListener("mousemove",z),N.current&&(N.current.removeEventListener("touchmove",R.current),N.current.removeEventListener("touchend",I.current)),R.current=null,I.current=null,N.current=null,l(D),y(-1),C(false);};document.addEventListener("mouseup",Y),document.addEventListener("mousemove",z),q.currentTarget.addEventListener("touchend",Y),q.currentTarget.addEventListener("touchmove",z),R.current=z,I.current=Y,N.current=q.currentTarget;},U=f.useMemo(()=>{const q=[...n].sort((K,Q)=>K-Q),V=[...w].sort((K,Q)=>K-Q),B={};V.forEach(K=>{B[K]=(B[K]||0)+1;}),q.forEach(K=>{B[K]=(B[K]||0)-1;});const F=d?1:0;return Object.values(B).reduce((K,Q)=>K+Math.abs(Q),0)<=F?w:n},[n,w,d]);return [b,p,S,U,j]}function Lfe(e,t,n,r,o,i){const a=f.useCallback(b=>Math.max(e,Math.min(t,b)),[e,t]),l=f.useCallback(b=>{if(n!==null){const y=e+Math.round((a(b)-e)/n)*n,S=$=>(String($).split(".")[1]||"").length,C=Math.max(S(n),S(t),S(e)),w=Number(y.toFixed(C));return e<=w&&w<=t?w:null}return null},[n,e,t,a]),u=f.useCallback(b=>{const y=a(b),S=r.map($=>$.value);n!==null&&S.push(l(b)),S.push(e,t);let C=S[0],w=t-e;return S.forEach($=>{const M=Math.abs(y-$);M<=w&&(C=$,w=M);}),C},[e,t,r,n,a,l]),d=(b,y,S,C="unit")=>{if(typeof y=="number"){let w;const $=b[S],M=$+y;let T=[];r.forEach(P=>{T.push(P.value);}),T.push(e,t),T.push(l($));const R=y>0?1:-1;C==="unit"?T.push(l($+R*n)):T.push(l(M)),T=T.filter(P=>P!==null).filter(P=>y<0?P<=$:P>=$),C==="unit"&&(T=T.filter(P=>P!==$));const I=C==="unit"?$:M;w=T[0];let N=Math.abs(w-I);if(T.forEach(P=>{const O=Math.abs(P-I);O<N&&(w=P,N=O);}),w===void 0)return y<0?e:t;if(C==="dist")return w;if(Math.abs(y)>1){const P=[...b];return P[S]=w,d(P,y-R,S,C)}return w}else {if(y==="min")return e;if(y==="max")return t}},m=(b,y,S,C="unit")=>{const w=b[S],$=d(b,y,S,C);return {value:$,changed:$!==w}},p=b=>i===null&&b===0||typeof i=="number"&&b<i;return [u,(b,y,S,C="unit")=>{const w=b.map(u),$=w[S],M=d(w,y,S,C);if(w[S]=M,o===false){const T=i||0;S>0&&w[S-1]!==$&&(w[S]=Math.max(w[S],w[S-1]+T)),S<w.length-1&&w[S+1]!==$&&(w[S]=Math.min(w[S],w[S+1]-T));}else if(typeof i=="number"||i===null){for(let T=S+1;T<w.length;T+=1){let R=true;for(;p(w[T]-w[T-1])&&R;)({value:w[T],changed:R}=m(w,1,T));}for(let T=S;T>0;T-=1){let R=true;for(;p(w[T]-w[T-1])&&R;)({value:w[T-1],changed:R}=m(w,-1,T-1));}for(let T=w.length-1;T>0;T-=1){let R=true;for(;p(w[T]-w[T-1])&&R;)({value:w[T-1],changed:R}=m(w,-1,T-1));}for(let T=0;T<w.length-1;T+=1){let R=true;for(;p(w[T+1]-w[T])&&R;)({value:w[T+1],changed:R}=m(w,1,T+1));}}return {value:w[S],values:w}}]}function zfe(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 Bfe=f.forwardRef((e,t)=>{const{prefixCls:n="rc-slider",className:r,style:o,classNames:i,styles:a,id:l,disabled:u=false,keyboard:d=true,autoFocus:m,onFocus:p,onBlur:g,min:b=0,max:y=100,step:S=1,value:C,defaultValue:w,range:$,count:M,onChange:T,onBeforeChange:R,onAfterChange:I,onChangeComplete:N,allowCross:P=true,pushable:O=false,reverse:_,vertical:L,included:j=true,startPoint:U,trackStyle:q,handleStyle:V,railStyle:B,dotStyle:F,activeDotStyle:W,marks:K,dots:Q,handleRender:D,activeHandleRender:z,track:Y,tabIndex:ee=0,ariaLabelForHandle:J,ariaLabelledByForHandle:te,ariaRequired:ne,ariaValueTextFormatterForHandle:se}=e,ae=f.useRef(null),re=f.useRef(null),de=f.useMemo(()=>L?_?"ttb":"btt":_?"rtl":"ltr",[_,L]),[ge,ie,Ee,le,ue]=zfe($),Se=f.useMemo(()=>isFinite(b)?b:0,[b]),ye=f.useMemo(()=>isFinite(y)?y:100,[y]),Be=f.useMemo(()=>S!==null&&S<=0?1:S,[S]),je=f.useMemo(()=>typeof O=="boolean"?O?Be:false:O>=0?O:false,[O,Be]),Ne=f.useMemo(()=>Object.keys(K||{}).map(Te=>{const Ce=K[Te],he={value:Number(Te)};return Ce&&typeof Ce=="object"&&!f.isValidElement(Ce)&&("label"in Ce||"style"in Ce)?(he.style=Ce.style,he.label=Ce.label):he.label=Ce,he}).filter(({label:Te})=>Te||typeof Te=="number").sort((Te,Ce)=>Te.value-Ce.value),[K]),[fe,be]=Lfe(Se,ye,Be,Ne,P,je),[Re,qe]=hn(w,C),Qe=f.useMemo(()=>{const Te=Re==null?[]:Array.isArray(Re)?Re:[Re],[Ce=Se]=Te;let he=Re===null?[]:[Ce];if(ge){if(he=[...Te],M||Re===void 0){const Ie=M>=0?M+1:2;for(he=he.slice(0,Ie);he.length<Ie;)he.push(he[he.length-1]??Se);}he.sort((Ie,we)=>Ie-we);}return he.forEach((Ie,we)=>{he[we]=fe(Ie);}),he},[Re,ge,Se,M,fe]),We=Te=>ge?Te:Te[0],tt=Et(Te=>{const Ce=[...Te].sort((he,Ie)=>he-Ie);T&&!Dl(Ce,Qe,true)&&T(We(Ce)),qe(Ce);}),rt=Et(Te=>{Te&&ae.current.hideHelp();const Ce=We(Qe);I?.(Ce),wr(!I,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),N?.(Ce);}),Ze=Te=>{if(u||!ie||Qe.length<=le)return;const Ce=[...Qe];Ce.splice(Te,1),R?.(We(Ce)),tt(Ce);const he=Math.max(0,Te-1);ae.current.hideHelp(),ae.current.focus(he);},[Oe,Ye,Ke,_e,ke]=_fe(re,de,Qe,Se,ye,fe,tt,rt,be,ie,le),lt=(Te,Ce)=>{if(!u){const he=[...Qe];let Ie=0,we=0,Le=ye-Se;Qe.forEach((mt,wt)=>{const Mt=Math.abs(Te-mt);Mt<=Le&&(Le=Mt,Ie=wt),mt<Te&&(we=wt);});let Xe=Ie;ie&&Le!==0&&(!ue||Qe.length<ue)?(he.splice(we+1,0,Te),Xe=we+1):he[Ie]=Te,ge&&!Qe.length&&M===void 0&&he.push(Te);const it=We(he);R?.(it),tt(he),Ce?(document.activeElement?.blur?.(),ae.current.focus(Xe),ke(Ce,Xe,he)):(I?.(it),wr(!I,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),N?.(it));}},At=Te=>{Te.preventDefault();const{width:Ce,height:he,left:Ie,top:we,bottom:Le,right:Xe}=re.current.getBoundingClientRect(),{clientX:it,clientY:mt}=Te;let wt;switch(de){case "btt":wt=(Le-mt)/he;break;case "ttb":wt=(mt-we)/he;break;case "rtl":wt=(Xe-it)/Ce;break;default:wt=(it-Ie)/Ce;}const Mt=Se+wt*(ye-Se);lt(fe(Mt),Te);},[dt,Dt]=f.useState(null),Tt=(Te,Ce)=>{if(!u){const he=be(Qe,Te,Ce);R?.(We(Qe)),tt(he.values),Dt(he.value);}};f.useEffect(()=>{if(dt!==null){const Te=Qe.indexOf(dt);Te>=0&&ae.current.focus(Te);}Dt(null);},[dt]);const xt=f.useMemo(()=>Ee&&Be===null?false:Ee,[Ee,Be]),gt=Et((Te,Ce)=>{ke(Te,Ce),R?.(We(Qe));}),ft=Oe!==-1;f.useEffect(()=>{if(!ft){const Te=Qe.lastIndexOf(Ye);ae.current.focus(Te);}},[ft]);const st=f.useMemo(()=>[..._e].sort((Te,Ce)=>Te-Ce),[_e]),[He,Ge]=f.useMemo(()=>ge?[st[0],st[st.length-1]]:[Se,st[0]],[st,ge,Se]);f.useImperativeHandle(t,()=>({focus:()=>{ae.current.focus(0);},blur:()=>{const{activeElement:Te}=document;re.current?.contains(Te)&&Te?.blur();}})),f.useEffect(()=>{m&&ae.current.focus(0);},[]);const ve=f.useMemo(()=>({min:Se,max:ye,direction:de,disabled:u,keyboard:d,step:Be,included:j,includedStart:He,includedEnd:Ge,range:ge,tabIndex:ee,ariaLabelForHandle:J,ariaLabelledByForHandle:te,ariaRequired:ne,ariaValueTextFormatterForHandle:se,styles:a||{},classNames:i||{}}),[Se,ye,de,u,d,Be,j,He,Ge,ge,ee,J,te,ne,se,a,i]);return f.createElement($u.Provider,{value:ve},f.createElement("div",{ref:re,className:X(n,r,{[`${n}-disabled`]:u,[`${n}-vertical`]:L,[`${n}-horizontal`]:!L,[`${n}-with-marks`]:Ne.length}),style:o,onMouseDown:At,id:l},f.createElement("div",{className:X(`${n}-rail`,i?.rail),style:{...B,...a?.rail}}),Y!==false&&f.createElement(Ofe,{prefixCls:n,style:q,values:Qe,startPoint:U,onStartMove:xt?gt:void 0}),f.createElement(Ife,{prefixCls:n,marks:Ne,dots:Q,style:F,activeStyle:W}),f.createElement(Tfe,{ref:ae,prefixCls:n,style:V,values:_e,draggingIndex:Oe,draggingDelete:Ke,onStartMove:gt,onOffsetChange:Tt,onFocus:p,onBlur:g,handleRender:D,activeHandleRender:z,onChangeComplete:rt,onDelete:ie?Ze:void 0}),f.createElement(Nfe,{prefixCls:n,marks:Ne,onClick:lt})))}),WF=f.createContext({}),C8=f.forwardRef((e,t)=>{const{open:n,draggingDelete:r,value:o}=e,i=f.useRef(null),a=n&&!r,l=f.useRef(null);function u(){Lt.cancel(l.current),l.current=null;}function d(){l.current=Lt(()=>{i.current?.forceAlign(),l.current=null;});}return f.useEffect(()=>(a?d():u(),u),[a,e.title,o]),f.createElement(Jl,{ref:Nr(i,t),...e,open:a})}),kfe=e=>{const{componentCls:t,antCls:n,controlSize:r,dotSize:o,marginFull:i,marginPart:a,colorFillContentHover:l,handleColorDisabled:u,calc:d,handleSize:m,handleSizeHover:p,handleActiveColor:g,handleActiveOutlineColor:b,handleLineWidth:y,handleLineWidthHover:S,motionDurationMid:C}=e;return {[t]:{...un(e),position:"relative",height:r,margin:`${oe(a)} ${oe(i)}`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${oe(i)} ${oe(a)}`},[`${t}-rail`]:{position:"absolute",backgroundColor:e.railBg,borderRadius:e.borderRadiusXS,transition:`background-color ${C}`},[`${t}-track,${t}-tracks`]:{position:"absolute",transition:`background-color ${C}`},[`${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:l},[`${t}-handle::after`]:{boxShadow:`0 0 0 ${oe(y)} ${e.colorPrimaryBorderHover}`},[`${t}-dot-active`]:{borderColor:e.dotActiveBorderColor}},[`${t}-handle`]:{position:"absolute",width:m,height:m,outline:"none",userSelect:"none","&-dragging-delete":{opacity:0},"&::before":{content:'""',position:"absolute",insetInlineStart:d(y).mul(-1).equal(),insetBlockStart:d(y).mul(-1).equal(),width:d(m).add(d(y).mul(2)).equal(),height:d(m).add(d(y).mul(2)).equal(),backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:m,height:m,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${oe(y)} ${e.handleColor}`,outline:"0px solid transparent",borderRadius:"50%",cursor:"pointer",transition:`
inset-inline-start ${C},
inset-block-start ${C},
width ${C},
height ${C},
box-shadow ${C},
outline ${C}
`},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:d(p).sub(m).div(2).add(S).mul(-1).equal(),insetBlockStart:d(p).sub(m).div(2).add(S).mul(-1).equal(),width:d(p).add(d(S).mul(2)).equal(),height:d(p).add(d(S).mul(2)).equal()},"&::after":{boxShadow:`0 0 0 ${oe(S)} ${g}`,outline:`6px solid ${b}`,width:p,height:p,insetInlineStart:e.calc(m).sub(p).div(2).equal(),insetBlockStart:e.calc(m).sub(p).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:`${oe(y)} 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:m,height:m,boxShadow:`0 0 0 ${oe(y)} ${u}`,insetInlineStart:0,insetBlockStart:0},[`
${t}-mark-text,
${t}-dot
`]:{cursor:"not-allowed !important"}},[`&-tooltip ${n}-tooltip-container`]:{minWidth:"unset"}}}},GF=(e,t)=>{const{componentCls:n,railSize:r,handleSize:o,dotSize:i,marginFull:a,calc:l}=e,u=t?"paddingBlock":"paddingInline",d=t?"width":"height",m=t?"height":"width",p=t?"insetBlockStart":"insetInlineStart",g=t?"top":"insetInlineStart",b=l(r).mul(3).sub(o).div(2).equal(),y=l(o).sub(r).div(2).equal(),S=t?{borderWidth:`${oe(y)} 0`,transform:`translateY(${oe(l(y).mul(-1).equal())})`}:{borderWidth:`0 ${oe(y)}`,transform:`translateX(${oe(e.calc(y).mul(-1).equal())})`};return {[u]:r,[m]:l(r).mul(3).equal(),[`${n}-rail`]:{[d]:"100%",[m]:r},[`${n}-track,${n}-tracks`]:{[m]:r},[`${n}-track-draggable`]:{...S},[`${n}-handle`]:{[p]:b},[`${n}-mark`]:{insetInlineStart:0,top:0,[g]:l(r).mul(3).add(t?0:a).equal(),[d]:"100%"},[`${n}-step`]:{insetInlineStart:0,top:0,[g]:r,[d]:"100%",[m]:r},[`${n}-dot`]:{position:"absolute",[p]:l(r).sub(i).div(2).equal()}}},Ffe=e=>{const{componentCls:t,marginPartWithMark:n}=e;return {[`${t}-horizontal`]:{...GF(e,true),[`&${t}-with-marks`]:{marginBottom:n}}}},Hfe=e=>{const{componentCls:t}=e;return {[`${t}-vertical`]:{...GF(e,false),height:"100%"}}},Vfe=e=>{const n=e.controlHeightLG/4,r=e.controlHeightSM/2,o=e.lineWidth+1,i=e.lineWidth+1*1.5,a=e.colorPrimary,l=new cn(a).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:a,handleActiveOutlineColor:l,handleColorDisabled:new cn(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexString(),dotBorderColor:e.colorBorderSecondary,dotActiveBorderColor:e.colorPrimaryBorder,trackBgDisabled:e.colorBgContainerDisabled}},jfe=qt("Slider",e=>{const t=Ft(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 [kfe(t),Ffe(t),Hfe(t)]},Vfe);function tw(){const[e,t]=f.useState(false),n=f.useRef(null),r=()=>{Lt.cancel(n.current);},o=i=>{r(),i?t(i):n.current=Lt(()=>{t(i);});};return f.useEffect(()=>r,[]),[e,o]}function Ufe(e){return e||e===null?e:t=>typeof t=="number"?t.toString():""}const YR=G.forwardRef((e,t)=>{const{prefixCls:n,range:r,className:o,rootClassName:i,style:a,disabled:l,tooltip:u={},onChangeComplete:d,classNames:m,styles:p,vertical:g,orientation:b,...y}=e,[,S]=Cu(b,g),{getPrefixCls:C,direction:w,className:$,style:M,classNames:T,styles:R,getPopupContainer:I}=Gt("slider"),N=G.useContext(to),P=l??N,O={...e,disabled:P,vertical:S},[_,L]=Xt([T,m],[R,p],{props:O}),{handleRender:j,direction:U}=G.useContext(WF),V=(U||w)==="rtl",[B,F]=tw(),[W,K]=tw(),Q={...u},{open:D,placement:z,getPopupContainer:Y,prefixCls:ee,formatter:J}=Q,te=D,ne=(B||W)&&te!==false,se=Ufe(J),[ae,re]=tw(),de=Ne=>{d?.(Ne),re(false);},ge=(Ne,fe)=>Ne||(fe?V?"left":"right":"top"),ie=C("slider",n),[Ee,le]=jfe(ie),ue=X(o,$,_.root,i,{[`${ie}-rtl`]:V,[`${ie}-lock`]:ae},Ee,le);V&&!S&&(y.reverse=!y.reverse),G.useEffect(()=>{const Ne=()=>{Lt(()=>{K(false);},1);};return document.addEventListener("mouseup",Ne),()=>{document.removeEventListener("mouseup",Ne);}},[]);const Se=r&&!te,ye=j||((Ne,fe)=>{const{index:be}=fe,Re=Ne.props;function qe(rt,Ze,Oe){Oe&&y[rt]?.(Ze),Re[rt]?.(Ze);}const Qe={...Re,onMouseEnter:rt=>{F(true),qe("onMouseEnter",rt);},onMouseLeave:rt=>{F(false),qe("onMouseLeave",rt);},onMouseDown:rt=>{K(true),re(true),qe("onMouseDown",rt);},onFocus:rt=>{K(true),y.onFocus?.(rt),qe("onFocus",rt,true);},onBlur:rt=>{K(false),y.onBlur?.(rt),qe("onBlur",rt,true);}},We=G.cloneElement(Ne,Qe),tt=(!!te||ne)&&se!==null;return Se?We:G.createElement(C8,{...Q,prefixCls:C("tooltip",ee),title:se?se(fe.value):"",value:fe.value,open:tt,placement:ge(z,S),key:be,classNames:{root:`${ie}-tooltip`},getPopupContainer:Y||I},We)}),Be=Se?(Ne,fe)=>{const be=G.cloneElement(Ne,{style:{...Ne.props.style,visibility:"hidden"}});return G.createElement(C8,{...Q,prefixCls:C("tooltip",ee),title:se?se(fe.value):"",open:se!==null&&ne,placement:ge(z,S),key:"tooltip",classNames:{root:`${ie}-tooltip`},getPopupContainer:Y||I,draggingDelete:fe.draggingDelete},be)}:void 0,je={...L.root,...M,...a};return G.createElement(Bfe,{...y,classNames:_,styles:L,step:y.step,range:r,className:ue,style:je,disabled:P,vertical:S,ref:t,prefixCls:ie,handleRender:ye,activeHandleRender:Be,onChangeComplete:de})}),KF=e=>{const{prefixCls:t,colors:n,type:r,color:o,range:i=false,className:a,activeIndex:l,onActive:u,onDragStart:d,onDragChange:m,onKeyDelete:p,...g}=e,b={...g,track:false},y=f.useMemo(()=>`linear-gradient(90deg, ${n.map(I=>`${I.color} ${I.percent}%`).join(", ")})`,[n]),S=f.useMemo(()=>!o||!r?null:r==="alpha"?o.toRgbString():`hsl(${o.toHsb().h}, 100%, 50%)`,[o,r]),C=Et(d),w=Et(m),$=f.useMemo(()=>({onDragStart:C,onDragChange:w}),[]),M=Et((R,I)=>{const{onFocus:N,style:P,className:O,onKeyDown:_}=R.props,L={...P};return r==="gradient"&&(L.background=Pk(n,I.value)),f.cloneElement(R,{onFocus:j=>{u?.(I.index),N?.(j);},style:L,className:X(O,{[`${t}-slider-handle-active`]:l===I.index}),onKeyDown:j=>{(j.key==="Delete"||j.key==="Backspace")&&p&&p(I.index),_?.(j);}})}),T=f.useMemo(()=>({direction:"ltr",handleRender:M}),[]);return f.createElement(WF.Provider,{value:T},f.createElement(qF.Provider,{value:$},f.createElement(YR,{...b,className:X(a,`${t}-slider`),tooltip:{open:false},range:{editable:i,minCount:2},styles:{rail:{background:y},handle:S?{background:S}:{}},classNames:{rail:`${t}-slider-rail`,handle:`${t}-slider-handle`}})))},qfe=e=>{const{value:t,onChange:n,onChangeComplete:r}=e,o=a=>n(a[0]),i=a=>r(a[0]);return f.createElement(KF,{...e,value:[t],onChange:o,onChangeComplete:i})};function x8(e){return Yt(e).sort((t,n)=>t.percent-n.percent)}const Wfe=e=>{const{prefixCls:t,mode:n,onChange:r,onChangeComplete:o,onActive:i,activeIndex:a,onGradientDragging:l,colors:u}=e,d=n==="gradient",m=f.useMemo(()=>u.map(w=>({percent:w.percent,color:w.color.toRgbString()})),[u]),p=f.useMemo(()=>m.map(w=>w.percent),[m]),g=f.useRef(m),b=({rawValues:w,draggingIndex:$,draggingValue:M})=>{if(w.length>m.length){const T=Pk(m,M),R=Yt(m);R.splice($,0,{percent:M,color:T}),g.current=R;}else g.current=m;l(true),r(new Wo(x8(g.current)),true);},y=({deleteIndex:w,draggingIndex:$,draggingValue:M})=>{let T=Yt(g.current);w!==-1?T.splice(w,1):(T[$]={...T[$],percent:M},T=x8(T)),r(new Wo(T),true);},S=w=>{const $=Yt(m);$.splice(w,1);const M=new Wo($);r(M),o(M);},C=w=>{o(new Wo(m)),a>=w.length&&i(w.length-1),l(false);};return d?f.createElement(KF,{min:0,max:100,prefixCls:t,className:`${t}-gradient-slider`,colors:m,color:null,value:p,range:true,onChangeComplete:C,disabled:false,type:"gradient",activeIndex:a,onActive:i,onDragStart:b,onDragChange:y,onKeyDelete:S}):null},Gfe=f.memo(Wfe),Kfe={slider:qfe},w8=()=>{const e=f.useContext(IF),{mode:t,onModeChange:n,modeOptions:r,prefixCls:o,allowClear:i,value:a,disabledAlpha:l,onChange:u,onClear:d,onChangeComplete:m,activeIndex:p,gradientDragging:g,...b}=e,y=G.useMemo(()=>a.cleared?[{percent:0,color:new Wo("")},{percent:100,color:new Wo("")}]:a.getColors(),[a]),S=!a.isGradient(),[C,w]=G.useState(a);An(()=>{S||w(y[p]?.color);},[S,y,g,p]);const $=G.useMemo(()=>S?a:g?C:y[p]?.color,[y,a,p,S,C,g]),[M,T]=G.useState($),[R,I]=jB(),N=M?.equals($)?$:M;An(()=>{T($);},[R,$?.toHexString()]);const P=(q,V)=>{let B=no(q);if(a.cleared){const W=B.toRgb();if(!W.r&&!W.g&&!W.b&&V){const{type:K,value:Q=0}=V;B=new Wo({h:K==="hue"?Q:0,s:1,b:1,a:K==="alpha"?Q/100:1});}else B=qb(B);}if(t==="single")return B;const F=Yt(y);return F[p]={...F[p],color:B},new Wo(F)},O=(q,V,B)=>{const F=P(q,B);T(F.isGradient()?F.getColors()[p].color:F),u(F,V);},_=(q,V)=>{m(P(q,V)),I();},L=q=>{u(P(q));};let j=null;const U=r.length>1;return (i||U)&&(j=G.createElement("div",{className:`${o}-operation`},U&&G.createElement(qR,{size:"small",options:r,value:t,onChange:n}),G.createElement(DF,{prefixCls:o,value:a,onChange:q=>{u(q),d?.();},...b}))),G.createElement(G.Fragment,null,j,G.createElement(Gfe,{...e,colors:y}),G.createElement(Tre,{prefixCls:o,value:N?.toHsb(),disabledAlpha:l,onChange:(q,V)=>{O(q,true,V);},onChangeComplete:(q,V)=>{_(q,V);},components:Kfe}),G.createElement(Rfe,{value:$,onChange:L,prefixCls:o,disabledAlpha:l,...b}))},$8=()=>{const{prefixCls:e,value:t,presets:n,onChange:r}=f.useContext(OF);return Array.isArray(n)?G.createElement(woe,{value:t,presets:n,prefixCls:e,onChange:r}):null},Yfe=e=>{const{prefixCls:t,presets:n,panelRender:r,value:o,onChange:i,onClear:a,allowClear:l,disabledAlpha:u,mode:d,onModeChange:m,modeOptions:p,onChangeComplete:g,activeIndex:b,onActive:y,format:S,onFormatChange:C,gradientDragging:w,onGradientDragging:$,disabledFormat:M}=e,T=`${t}-inner`,R=G.useMemo(()=>({prefixCls:t,value:o,onChange:i,onClear:a,allowClear:l,disabledAlpha:u,mode:d,onModeChange:m,modeOptions:p,onChangeComplete:g,activeIndex:b,onActive:y,format:S,onFormatChange:C,gradientDragging:w,onGradientDragging:$,disabledFormat:M}),[t,o,i,a,l,u,d,m,p,g,b,y,S,C,w,$,M]),I=G.useMemo(()=>({prefixCls:t,value:o,presets:n,onChange:i}),[t,o,n,i]),N=G.createElement("div",{className:`${T}-content`},G.createElement(w8,null),Array.isArray(n)&&G.createElement(Hl,null),G.createElement($8,null));return G.createElement(IF.Provider,{value:R},G.createElement(OF.Provider,{value:I},G.createElement("div",{className:T},typeof r=="function"?r(N,{components:{Picker:w8,Presets:$8}}):N)))},Xfe=f.forwardRef((e,t)=>{const{color:n,prefixCls:r,open:o,disabled:i,format:a,className:l,showText:u,activeIndex:d,...m}=e,p=`${r}-trigger`,g=`${p}-text`,b=`${g}-cell`,[y]=Oo("ColorPicker"),S=G.useMemo(()=>{if(!u)return "";if(typeof u=="function")return u(n);if(n.cleared)return y.transparent;if(n.isGradient())return n.getColors().map((M,T)=>{const R=d!==-1&&d!==T;return G.createElement("span",{key:T,className:X(b,R&&`${b}-inactive`)},M.color.toRgbString()," ",M.percent,"%")});const w=n.toHexString().toUpperCase(),$=fR(n);switch(a){case "rgb":return n.toRgbString();case "hsb":return n.toHsbString();default:return $<100?`${w.slice(0,7)},${$}%`:w}},[n,a,u,d,y.transparent,b]),C=f.useMemo(()=>n.cleared?G.createElement(DF,{prefixCls:r}):G.createElement(iR,{prefixCls:r,color:n.toCssString()}),[n,r]);return G.createElement("div",{ref:t,className:X(p,l,{[`${p}-active`]:o,[`${p}-disabled`]:i}),...bo(m)},C,u&&G.createElement("div",{className:g},S))});function Qfe(e,t,n){const[r]=Oo("ColorPicker"),[o,i]=hn(e,t),[a,l]=f.useState("single"),[u,d]=f.useMemo(()=>{const S=(Array.isArray(n)?n:[n]).filter(M=>M);S.length||S.push("single");const C=new Set(S),w=[],$=(M,T)=>{C.has(M)&&w.push({label:T,value:M});};return $("single",r.singleColor),$("gradient",r.gradientColor),[w,C]},[n,r.singleColor,r.gradientColor]),[m,p]=f.useState(null),g=Et(S=>{p(S),i(S);}),b=f.useMemo(()=>{const S=no(o||"");return S.equals(m)?m:S},[o,m]),y=f.useMemo(()=>d.has(a)?a:u[0]?.value,[d,a,u]);return f.useEffect(()=>{l(b.isGradient()?"gradient":"single");},[b]),[b,g,y,l,u]}const YF=(e,t)=>({backgroundImage:`conic-gradient(${t} 25%, transparent 25% 50%, ${t} 50% 75%, transparent 75% 100%)`,backgroundSize:`${e} ${e}`}),E8=(e,t)=>{const{componentCls:n,borderRadiusSM:r,colorPickerInsetShadow:o,lineWidth:i,colorFillSecondary:a}=e;return {[`${n}-color-block`]:{position:"relative",borderRadius:r,width:t,height:t,boxShadow:o,flex:"none",...YF("50%",e.colorFillSecondary),[`${n}-color-block-inner`]:{width:"100%",height:"100%",boxShadow:`inset 0 0 0 ${oe(i)} ${a}`,borderRadius:"inherit"}}}},Zfe=e=>{const{componentCls:t,antCls:n,fontSizeSM:r,lineHeightSM:o,colorPickerAlphaInputWidth:i,marginXXS:a,paddingXXS:l,controlHeightSM:u,marginXS:d,fontSizeIcon:m,paddingXS:p,colorTextPlaceholder:g,colorPickerInputNumberHandleWidth:b,lineWidth:y}=e;return {[`${t}-input-container`]:{display:"flex",[`${t}-steppers${n}-input-number`]:{fontSize:r,lineHeight:o,padding:0,[`${n}-input-number-input`]:{paddingInlineStart:l,paddingInlineEnd:0},[`${n}-input-number-handler-wrap`]:{width:b}},[`${t}-steppers${t}-alpha-input`]:{flex:`0 0 ${oe(i)}`,marginInlineStart:a},[`${t}-format-select${n}-select`]:{marginInlineEnd:d,width:"auto","&-single":{[`${n}-select-selector`]:{padding:0,border:0},[`${n}-select-arrow`]:{insetInlineEnd:0},[`${n}-select-selection-item`]:{paddingInlineEnd:e.calc(m).add(a).equal(),fontSize:r,lineHeight:oe(u)},[`${n}-select-item-option-content`]:{fontSize:r,lineHeight:o},[`${n}-select-dropdown`]:{[`${n}-select-item`]:{minHeight:"auto"}}}},[`${t}-input`]:{gap:a,alignItems:"center",flex:1,width:0,[`${t}-hsb-input,${t}-rgb-input`]:{height:u,display:"flex",gap:a,alignItems:"center"},[`${t}-steppers`]:{flex:1},[`${t}-hex-input${n}-input-affix-wrapper`]:{flex:1,padding:`0 ${oe(p)}`,[`${n}-input`]:{fontSize:r,textTransform:"uppercase",lineHeight:oe(e.calc(u).sub(e.calc(y).mul(2)).equal())},[`${n}-input-prefix`]:{color:g}}}}}},Jfe=e=>{const{componentCls:t,controlHeightLG:n,borderRadiusSM:r,colorPickerInsetShadow:o,marginSM:i,colorBgElevated:a,colorFillSecondary:l,lineWidthBold:u,colorPickerHandlerSize:d}=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:d,height:d,border:`${oe(u)} solid ${a}`,position:"relative",borderRadius:"50%",cursor:"pointer",boxShadow:`${o}, 0 0 0 1px ${l}`}}},eme=e=>{const{componentCls:t,antCls:n,colorTextQuaternary:r,paddingXXS:o,colorPickerPresetColorSize:i,fontSizeSM:a,colorText:l,lineHeightSM:u,lineWidth:d,borderRadius:m,colorFill:p,colorWhite:g,marginXXS:b,paddingXS:y,fontHeightSM:S}=e;return {[`${t}-presets`]:{[`${n}-collapse-item > ${n}-collapse-header`]:{padding:0,[`${n}-collapse-expand-icon`]:{height:S,color:r,paddingInlineEnd:o}},[`${n}-collapse`]:{display:"flex",flexDirection:"column",gap:b},[`${n}-collapse-item > ${n}-collapse-panel > ${n}-collapse-body`]:{padding:`${oe(y)} 0`},"&-label":{fontSize:a,color:l,lineHeight:u},"&-items":{display:"flex",flexWrap:"wrap",gap:e.calc(b).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(d).mul(4)).equal(),height:e.calc(i).add(e.calc(d).mul(4)).equal(),position:"absolute",top:e.calc(d).mul(-2).equal(),insetInlineStart:e.calc(d).mul(-2).equal(),borderRadius:m,border:`${oe(d)} solid transparent`,transition:`border-color ${e.motionDurationMid} ${e.motionEaseInBack}`},"&:hover::before":{borderColor:p},"&::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:`${oe(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:g,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:a,color:r}}}},tme=e=>{const{componentCls:t,colorPickerInsetShadow:n,colorBgElevated:r,colorFillSecondary:o,lineWidthBold:i,colorPickerHandlerSizeSM:a,colorPickerSliderHeight:l,marginSM:u,marginXS:d}=e,m=e.calc(a).sub(e.calc(i).mul(2).equal()).equal(),p=e.calc(a).add(e.calc(i).mul(2).equal()).equal(),g={"&:after":{transform:"scale(1)",boxShadow:`${n}, 0 0 0 1px ${e.colorPrimaryActive}`}};return {[`${t}-slider`]:[YF(oe(l),e.colorFillSecondary),{margin:0,padding:0,height:l,borderRadius:e.calc(l).div(2).equal(),"&-rail":{height:l,borderRadius:e.calc(l).div(2).equal(),boxShadow:n},[`& ${t}-slider-handle`]:{width:m,height:m,top:0,borderRadius:"100%","&:before":{display:"block",position:"absolute",background:"transparent",left:{_skip_check_:true,value:"50%"},top:"50%",transform:"translate(-50%, -50%)",width:p,height:p,borderRadius:"100%"},"&:after":{width:a,height:a,border:`${oe(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":g}}],[`${t}-slider-container`]:{display:"flex",gap:u,marginBottom:u,[`${t}-slider-group`]:{flex:1,flexDirection:"column",justifyContent:"space-between",display:"flex","&-disabled-alpha":{justifyContent:"center"}}},[`${t}-gradient-slider`]:{marginBottom:d,[`& ${t}-slider-handle`]:{"&:after":{transform:"scale(0.8)"},"&-active, &:focus":g}}}},jE=(e,t,n)=>({borderInlineEndWidth:e.lineWidth,borderColor:t,boxShadow:`0 0 0 ${oe(e.controlOutlineWidth)} ${n}`,outline:0}),nme=e=>{const{componentCls:t}=e;return {"&-rtl":{[`${t}-presets-color`]:{"&::after":{direction:"ltr"}},[`${t}-clear`]:{"&::after":{direction:"ltr"}}}}},M8=(e,t,n)=>{const{componentCls:r,borderRadiusSM:o,lineWidth:i,colorSplit:a,colorBorder:l,red6:u}=e;return {[`${r}-clear`]:{width:t,height:t,borderRadius:o,border:`${oe(i)} solid ${a}`,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:u},"&:hover":{borderColor:l}}}},rme=e=>{const{componentCls:t,colorError:n,colorWarning:r,colorErrorHover:o,colorWarningHover:i,colorErrorOutline:a,colorWarningOutline:l}=e;return {[`&${t}-status-error`]:{borderColor:n,"&:hover":{borderColor:o},[`&${t}-trigger-active`]:{...jE(e,n,a)}},[`&${t}-status-warning`]:{borderColor:r,"&:hover":{borderColor:i},[`&${t}-trigger-active`]:{...jE(e,r,l)}}}},ome=e=>{const{componentCls:t,controlHeightLG:n,controlHeightSM:r,controlHeight:o,controlHeightXS:i,borderRadius:a,borderRadiusSM:l,borderRadiusXS:u,borderRadiusLG:d,fontSizeLG:m}=e;return {[`&${t}-lg`]:{minWidth:n,minHeight:n,borderRadius:d,[`${t}-color-block, ${t}-clear`]:{width:o,height:o,borderRadius:a},[`${t}-trigger-text`]:{fontSize:m}},[`&${t}-sm`]:{minWidth:r,minHeight:r,borderRadius:l,[`${t}-color-block, ${t}-clear`]:{width:i,height:i,borderRadius:u},[`${t}-trigger-text`]:{lineHeight:oe(i)}}}},ime=e=>{const{antCls:t,componentCls:n,colorPickerWidth:r,colorPrimary:o,motionDurationMid:i,colorBgElevated:a,colorTextDisabled:l,colorText:u,colorBgContainerDisabled:d,borderRadius:m,marginXS:p,marginSM:g,controlHeight:b,controlHeightSM:y,colorBgTextActive:S,colorPickerPresetColorSize:C,colorPickerPreviewSize:w,lineWidth:$,colorBorder:M,paddingXXS:T,fontSize:R,colorPrimaryHover:I,controlOutline:N}=e;return [{[n]:{[`${n}-inner`]:{"&-content":{display:"flex",flexDirection:"column",width:r,[`& > ${t}-divider`]:{margin:`${oe(g)} 0 ${oe(p)}`}},[`${n}-panel`]:{...Jfe(e)},...tme(e),...E8(e,w),...Zfe(e),...eme(e),...M8(e,C,{marginInlineStart:"auto"}),[`${n}-operation`]:{display:"flex",justifyContent:"space-between",marginBottom:p}},"&-trigger":{minWidth:b,minHeight:b,borderRadius:m,border:`${oe($)} solid ${M}`,cursor:"pointer",display:"inline-flex",alignItems:"flex-start",justifyContent:"center",transition:`all ${i}`,background:a,padding:e.calc(T).sub($).equal(),[`${n}-trigger-text`]:{marginInlineStart:p,marginInlineEnd:e.calc(p).sub(e.calc(T).sub($)).equal(),fontSize:R,color:u,alignSelf:"center","&-cell":{"&:not(:last-child):after":{content:'", "'},"&-inactive":{color:l}}},"&:hover":{borderColor:I},[`&${n}-trigger-active`]:{...jE(e,o,N)},"&-disabled":{color:l,background:d,cursor:"not-allowed","&:hover":{borderColor:S},[`${n}-trigger-text`]:{color:l}},...M8(e,y),...E8(e,y),...rme(e),...ome(e)},...nme(e)}},Nf(e,{focusElCls:`${n}-trigger-active`})]},ame=qt("ColorPicker",e=>{const{colorTextQuaternary:t,marginSM:n}=e,r=8,o=Ft(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 ime(o)}),XR=e=>{const{mode:t,value:n,defaultValue:r,format:o,defaultFormat:i,allowClear:a=false,presets:l,children:u,trigger:d="click",open:m,disabled:p,placement:g="bottomLeft",arrow:b=true,panelRender:y,showText:S,style:C,className:w,size:$,rootClassName:M,prefixCls:T,styles:R,classNames:I,disabledAlpha:N=false,onFormatChange:P,onChange:O,onClear:_,onOpenChange:L,onChangeComplete:j,getPopupContainer:U,autoAdjustOverflow:q=true,destroyTooltipOnHide:V,destroyOnHidden:B,disabledFormat:F,...W}=e,{getPrefixCls:K,direction:Q,className:D,style:z,classNames:Y,styles:ee}=Gt("colorPicker"),J=f.useContext(to),te=p??J,ne=K("color-picker",T),{compactSize:se,compactItemClassnames:ae}=_s(ne,Q),re=ao(Ge=>$??se??Ge),de={...e,trigger:d,allowClear:a,autoAdjustOverflow:q,disabledAlpha:N,arrow:b,placement:g,disabled:te,size:re},[ge,ie]=Xt([Y,I],[ee,R],{props:de},{popup:{_default:"root"}}),[Ee,le]=hn(false,m),ue=!te&&Ee,[Se,ye]=hn(i,o),Be=Ge=>{ye(Ge),Se!==Ge&&P?.(Ge);},je=Ge=>{(!Ge||!te)&&(le(Ge),L?.(Ge));},[Ne,fe,be,Re,qe]=Qfe(r,n,t),Qe=f.useMemo(()=>fR(Ne)<100,[Ne]),[We,tt]=G.useState(null),rt=Ge=>{if(j){let ve=no(Ge);N&&Qe&&(ve=qb(Ge)),j(ve);}},Ze=(Ge,ve)=>{let Te=no(Ge);N&&Qe&&(Te=qb(Te)),fe(Te),tt(null),O&&O(Te,Te.toCssString()),ve||rt(Te);},[Oe,Ye]=G.useState(0),[Ke,_e]=G.useState(false),ke=Ge=>{if(Re(Ge),Ge==="single"&&Ne.isGradient())Ye(0),Ze(new Wo(Ne.getColors()[0].color)),tt(Ne);else if(Ge==="gradient"&&!Ne.isGradient()){const ve=Qe?qb(Ne):Ne;Ze(new Wo(We||[{percent:0,color:ve},{percent:100,color:ve}]));}},{status:lt}=G.useContext(yo),At=Yn(ne),[dt,Dt]=ame(ne,At),Tt={[`${ne}-rtl`]:Q},xt=X(ge.root,M,Dt,At,Tt),gt=X(Fl(ne,lt),{[`${ne}-sm`]:re==="small",[`${ne}-lg`]:re==="large"},ae,D,xt,w,dt),ft=X(ne,xt,ge.popup?.root),st={open:ue,trigger:d,placement:g,arrow:b,rootClassName:M,getPopupContainer:U,autoAdjustOverflow:q,destroyOnHidden:B??!!V},He={...ie.root,...z,...C};return G.createElement(Zo,{classNames:{root:ft},styles:{root:ie.popup?.root,container:R?.popupOverlayInner},onOpenChange:je,content:G.createElement(kl,{form:true},G.createElement(Yfe,{mode:be,onModeChange:ke,modeOptions:qe,prefixCls:ne,value:Ne,allowClear:a,disabled:te,disabledAlpha:N,presets:l,panelRender:y,format:Se,onFormatChange:Be,onChange:Ze,onChangeComplete:rt,onClear:_,activeIndex:Oe,onActive:Ye,gradientDragging:Ke,onGradientDragging:_e,disabledFormat:F})),...st},u||G.createElement(Xfe,{activeIndex:ue?Oe:-1,open:ue,className:gt,style:He,prefixCls:ne,disabled:te,showText:S,format:Se,...W,color:Ne}))},sme=SR(XR,void 0,e=>({...e,placement:"bottom",autoAdjustOverflow:false}),"color-picker",e=>e);XR._InternalPanelDoNotUseOrYouWillBeFired=sme;function ty(e){return ["small","middle","large"].includes(e)}function R8(e){return e?typeof e=="number"&&!Number.isNaN(e):false}const XF=G.createContext({latestIndex:0}),lme=XF.Provider,cme=e=>{const{className:t,prefix:n,index:r,children:o,separator:i,style:a,classNames:l,styles:u}=e,{latestIndex:d}=f.useContext(XF);return Qr(o)?f.createElement(f.Fragment,null,f.createElement("div",{className:t,style:a},o),r<d&&i&&f.createElement("span",{className:X(`${n}-item-separator`,l?.separator),style:u?.separator},i)):null},ume=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"}}}},dme=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}}}},fme=qt("Space",e=>{const t=Ft(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return [ume(t),dme(t)]},()=>({}),{resetStyle:false}),mme=f.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r,size:o,className:i,style:a,classNames:l,styles:u}=Gt("space"),{size:d=o??"small",align:m,className:p,rootClassName:g,children:b,direction:y,orientation:S,prefixCls:C,split:w,separator:$,style:M,vertical:T,wrap:R=false,classNames:I,styles:N,...P}=e,[O,_]=Array.isArray(d)?d:[d,d],L=ty(_),j=ty(O),U=R8(_),q=R8(O),V=Qo(b,{keepEmpty:true}),[B,F]=Cu(S,T,y),W=m===void 0&&!F?"center":m,K=$??w,Q=n("space",C),[D,z]=fme(Q),Y={...e,size:d,orientation:B,align:W},[ee,J]=Xt([l,I],[u,N],{props:Y}),te=X(Q,i,D,`${Q}-${B}`,{[`${Q}-rtl`]:r==="rtl",[`${Q}-align-${W}`]:W,[`${Q}-gap-row-${_}`]:L,[`${Q}-gap-col-${O}`]:j},p,g,z,ee.root),ne=X(`${Q}-item`,ee.item),se=V.map((de,ge)=>{const ie=de?.key||`${ne}-${ge}`;return f.createElement(cme,{prefix:Q,classNames:ee,styles:J,className:ne,key:ie,index:ge,separator:K,style:J.item},de)}),ae=f.useMemo(()=>({latestIndex:V.reduce((ge,ie,Ee)=>Qr(ie)?Ee:ge,0)}),[V]);if(V.length===0)return null;const re={};return R&&(re.flexWrap="wrap"),!j&&q&&(re.columnGap=O),!L&&U&&(re.rowGap=_),f.createElement("div",{ref:t,className:te,style:{...re,...J.root,...a,...M},...P},f.createElement(lme,{value:ae},se))}),Xr=mme;Xr.Compact=rR;Xr.Addon=kF;const QF=e=>{const{getPopupContainer:t,getPrefixCls:n,direction:r}=f.useContext(Ct),{prefixCls:o,type:i="default",danger:a,disabled:l,loading:u,onClick:d,htmlType:m,children:p,className:g,menu:b,arrow:y,autoFocus:S,trigger:C,align:w,open:$,onOpenChange:M,placement:T,getPopupContainer:R,href:I,icon:N=f.createElement(BR,null),title:P,buttonsRender:O=re=>re,mouseEnterDelay:_,mouseLeaveDelay:L,overlayClassName:j,overlayStyle:U,destroyOnHidden:q,destroyPopupOnHide:V,dropdownRender:B,popupRender:F,...W}=e,K=n("dropdown",o),Q=`${K}-button`,z={menu:b,arrow:y,autoFocus:S,align:w,disabled:l,trigger:l?[]:C,onOpenChange:M,getPopupContainer:R||t,mouseEnterDelay:_,mouseLeaveDelay:L,classNames:{root:j},styles:{root:U},destroyOnHidden:q,popupRender:F||B},{compactSize:Y,compactItemClassnames:ee}=_s(K,r),J=X(Q,ee,g);"destroyPopupOnHide"in e&&(z.destroyPopupOnHide=V),"open"in e&&(z.open=$),"placement"in e?z.placement=T:z.placement=r==="rtl"?"bottomLeft":"bottomRight";const te=f.createElement(ut,{type:i,danger:a,disabled:l,loading:u,onClick:d,htmlType:m,href:I,title:P},p),ne=f.createElement(ut,{type:i,danger:a,icon:N}),[se,ae]=O([te,ne]);return f.createElement(Xr.Compact,{className:J,size:Y,block:true,...W},se,f.createElement(d1,{...z},ae))};QF.__ANT_BUTTON=true;const tc=d1;tc.Button=QF;const ZF=["wrap","nowrap","wrap-reverse"],JF=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],eH=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],hme=(e,t)=>{const n=t.wrap===true?"wrap":t.wrap;return {[`${e}-wrap-${n}`]:n&&ZF.includes(n)}},pme=(e,t)=>{const n={};return eH.forEach(r=>{n[`${e}-align-${r}`]=t.align===r;}),n[`${e}-align-stretch`]=!t.align&&!!t.vertical,n},gme=(e,t)=>{const n={};return JF.forEach(r=>{n[`${e}-justify-${r}`]=t.justify===r;}),n},vme=(e,t)=>X({...hme(e,t),...pme(e,t),...gme(e,t)}),bme=e=>{const{componentCls:t}=e;return {[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},yme=e=>{const{componentCls:t}=e;return {[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},Sme=e=>{const{componentCls:t}=e,n={};return ZF.forEach(r=>{n[`${t}-wrap-${r}`]={flexWrap:r};}),n},Cme=e=>{const{componentCls:t}=e,n={};return eH.forEach(r=>{n[`${t}-align-${r}`]={alignItems:r};}),n},xme=e=>{const{componentCls:t}=e,n={};return JF.forEach(r=>{n[`${t}-justify-${r}`]={justifyContent:r};}),n},wme=()=>({}),$me=qt("Flex",e=>{const{paddingXS:t,padding:n,paddingLG:r}=e,o=Ft(e,{flexGapSM:t,flexGap:n,flexGapLG:r});return [bme(o),yme(o),Sme(o),Cme(o),xme(o)]},wme,{resetStyle:false}),Eme=G.forwardRef((e,t)=>{const{prefixCls:n,rootClassName:r,className:o,style:i,flex:a,gap:l,vertical:u,orientation:d,component:m="div",children:p,...g}=e,{flex:b,direction:y,getPrefixCls:S}=G.useContext(Ct),C=S("flex",n),[w,$]=$me(C),[,M]=Cu(d,u??b?.vertical),T=X(o,r,b?.className,C,w,$,vme(C,{...e,vertical:M}),{[`${C}-rtl`]:y==="rtl",[`${C}-gap-${l}`]:ty(l),[`${C}-vertical`]:M}),R={...b?.style,...i};return Qr(a)&&(R.flex=a),Qr(l)&&!ty(l)&&(R.gap=l),G.createElement(m,{ref:t,className:T,style:R,...Bn(g,["justify","wrap","align"])},p)}),ny=G.createContext(null);var Mme={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 UE(){return UE=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},UE.apply(this,arguments)}const Rme=(e,t)=>f.createElement(Kn,UE({},e,{ref:t,icon:Mme})),tH=f.forwardRef(Rme),Tme=e=>Qr(e)?typeof e=="object"&&!f.isValidElement(e)?e:{title:e}:null,Ame=e=>{const{componentCls:t,floatButtonSize:n,iconCls:r,antCls:o,floatButtonIconSize:i}=e,[a,l]=ar(o,"float-btn"),u=`${t}-badge`,d=Math.SQRT2,m=(d-1)/d,p=e.calc(e.borderRadius).mul(m).equal(),g=e.calc(e.controlHeight).div(2).mul(m).equal();return {[t]:[{[a("size")]:oe(n)},{flexDirection:"column",margin:0,padding:`${oe(e.paddingXXS)} 0`,width:l("size"),minHeight:l("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},[u]:{position:"absolute",top:0,insetInlineEnd:0,[`&:not(${u}-dot)`]:{transform:"translate(50%, -50%)"}},[`&-rtl ${u}:not(${u}-dot)`]:{transform:"translate(-50%, -50%)"},"&-square":{[`${u}-dot`]:{marginTop:p,marginInlineEnd:p}},"&-circle":{[u]:{marginTop:g,marginInlineEnd:g}}}]}},Nme=e=>{const{componentCls:t,antCls:n,floatButtonSize:r,padding:o}=e,i=`${t}-group`,a=`${i}-list`,[l,u]=ar(n,"float-btn");return {[i]:[{[l("list-transform-start")]:`translate(0,${oe(r)})`,[l("list-trigger-offset")]:`calc(${oe(r)} + ${oe(o)})`},{...un(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) ${a}`]:{boxShadow:e.boxShadowSecondary},[`&${i}-individual ${a}`]:{gap:o},[`&-menu-mode ${a}`]:{position:"absolute"},[a]:{borderRadius:e.borderRadiusLG,"&-motion":{transition:`all ${e.motionDurationSlow}`,"&-enter, &-appear":{opacity:0,transform:u("list-transform-start"),"&-active":{opacity:1,transform:"translate(0, 0)"}},"&-leave":{"&-active":{opacity:0,transform:u("list-transform-start")}}}},"&-top":{[a]:{bottom:u("list-trigger-offset")}},"&-bottom":{[a]:{[l("list-transform-start")]:`translate(0, calc(${oe(r)} * -1))`,top:u("list-trigger-offset")}},"&-left":{[a]:{[l("list-transform-start")]:`translate(${oe(r)}, 0)`,right:u("list-trigger-offset")}},"&-right":{[a]:{[l("list-transform-start")]:`translate(calc(${oe(r)} * -1), 0)`,left:u("list-trigger-offset")}}}]}},Pme=()=>({}),nH=qt("FloatButton",e=>{const{controlHeightLG:t,marginXXL:n,marginLG:r,fontSizeIcon:o,calc:i}=e,a=Ft(e,{floatButtonIconSize:i(o).mul(1.5).equal(),floatButtonSize:t,floatButtonInsetBlockEnd:n,floatButtonInsetInlineEnd:r});return [Ame(a),Nme(a),sR(e)]},Pme,{order:-998}),p1="float-btn",Ime=G.forwardRef((e,t)=>{const{prefixCls:n,className:r,rootClassName:o,style:i,type:a="default",shape:l="circle",icon:u,description:d,content:m,tooltip:p,badge:g={},classNames:b,styles:y,...S}=e,{getPrefixCls:C,direction:w}=G.useContext(Ct),$=G.useContext(ny),M=C(p1,n),T=Yn(M),{shape:R,individual:I,classNames:N,styles:P}=$||{},O=R||l,_=I??true,L=m??d,j={...e,type:a,shape:O},[U,q]=nH(M,T),V=G.useMemo(()=>({icon:`${M}-icon`,content:`${M}-content`}),[M]),[B,F]=Xt([V,N,b],[P,y],{props:j}),W=!L&&!u?G.createElement(tH,null):u,[K]=xu("FloatButton",i?.zIndex),Q={...i,zIndex:K},D=Bn(g,["title","children","status","text"]),z="badge"in e&&G.createElement(l1,{...D,className:X(D.className,`${M}-badge`,{[`${M}-badge-dot`]:D.dot})}),Y=Tme(p);let ee=G.createElement(ut,{...S,ref:t,className:X(U,q,T,M,r,o,`${M}-${a}`,`${M}-${O}`,{[`${M}-rtl`]:w==="rtl",[`${M}-individual`]:_,[`${M}-icon-only`]:!L}),classNames:B,styles:F,style:Q,shape:O,type:a,size:"large",icon:W,_skipSemantic:true},L,z);return Y&&(ee=G.createElement(Jl,{...Y},ee)),ee}),Eu=Ime,Ome=G.createElement(ace,null),rH=G.forwardRef((e,t)=>{const{backTopIcon:n}=Gt("floatButton"),{prefixCls:r,className:o,type:i="default",shape:a="circle",visibilityHeight:l=400,icon:u,target:d,onClick:m,duration:p=450,...g}=e,b=u??n??Ome,[y,S]=f.useState(l===0),C=G.useRef(null);G.useImperativeHandle(t,()=>({nativeElement:C.current}));const w=()=>C.current?.ownerDocument||window,$=hJ(_=>{const L=qB(_.target);S(L>=l);});f.useEffect(()=>{const L=(d||w)();return $({target:L}),L?.addEventListener("scroll",$),()=>{$.cancel(),L?.removeEventListener("scroll",$);}},[d]);const M=_=>{Xte(0,{getContainer:d||w,duration:p}),m?.(_);},{getPrefixCls:T}=f.useContext(Ct),R=T(p1,r),I=T(),P=f.useContext(ny)?.shape||a,O={prefixCls:R,icon:b,type:i,shape:P,...g};return G.createElement(So,{visible:y,motionName:`${I}-fade`},({className:_},L)=>G.createElement(Eu,{ref:Nr(C,L),...O,onClick:M,className:X(o,_)}))}),oH=e=>{const{prefixCls:t,className:n,style:r,classNames:o,styles:i,rootClassName:a,shape:l="circle",type:u="default",placement:d,icon:m=G.createElement(tH,null),closeIcon:p,trigger:g,children:b,onOpenChange:y,open:S,onClick:C,...w}=e,{direction:$,getPrefixCls:M,closeIcon:T,classNames:R,styles:I,className:N,style:P}=Gt("floatButtonGroup"),O=p??T??G.createElement(Ds,null),_=M(p1,t),L=Yn(_),[j,U]=nH(_,L),q=`${_}-group`,V=g&&["click","hover"].includes(g),[B]=xu("FloatButton",r?.zIndex),F=G.useRef(null),W=["top","left","right","bottom"].includes(d)?d:"top",[K,Q]=hn(false,S),D=g==="hover",z=g==="click",Y=Et(ue=>{K!==ue&&(Q(ue),y?.(ue));}),ee=()=>{D&&Y(true);},J=()=>{D&&Y(false);},te=ue=>{z&&Y(!K),C?.(ue);};G.useEffect(()=>{if(z){const ue=Se=>{F.current?.contains(Se.target)||Y(false);};return document.addEventListener("click",ue,{capture:true}),()=>document.removeEventListener("click",ue,{capture:true})}},[z]);const ne=l==="circle",se={...e,shape:l,type:u,placement:W},[ae,re]=Xt([R,o],[I,i],{props:se}),de=G.useMemo(()=>({shape:l,individual:ne,classNames:{root:ae.item,icon:ae.itemIcon,content:ae.itemContent},styles:{root:re.item,icon:re.itemIcon,content:re.itemContent}}),[l,ne,ae,re]),ge=G.useMemo(()=>({...de,individual:true,classNames:{root:ae.trigger,icon:ae.triggerIcon,content:ae.triggerContent},styles:{root:re.trigger,icon:re.triggerIcon,content:re.triggerContent}}),[de,ae,re]);let ie;const Ee=`${q}-list`,le=ue=>{const Se=W==="top"||W==="bottom",ye={className:X(Ee,ae.list,ue),style:re.list};return ne?ie=G.createElement(Eme,{vertical:Se,...ye},b):ie=G.createElement(Xr.Compact,{vertical:Se,...ye},b),ie};return G.createElement(ny.Provider,{value:de},G.createElement("div",{className:X(q,j,U,L,N,ae.root,n,a,{[`${q}-rtl`]:$==="rtl",[`${q}-individual`]:ne,[`${q}-${W}`]:V,[`${q}-menu-mode`]:V}),style:{...P,zIndex:B,...re.root,...r},ref:F,onMouseEnter:ee,onMouseLeave:J},V?G.createElement(So,{visible:K,motionName:`${Ee}-motion`},({className:ue})=>le(ue)):le(),V&&G.createElement(ny.Provider,{value:ge},G.createElement(Eu,{type:u,icon:K?O:m,"aria-label":e["aria-label"],className:`${q}-trigger`,onClick:te,...w}))))},T8=({backTop:e,...t})=>e?f.createElement(rH,{...t,visibilityHeight:0}):f.createElement(Eu,{...t}),Dme=({className:e,items:t,classNames:n,styles:r,prefixCls:o,...i})=>{const{getPrefixCls:a}=f.useContext(Ct),u=`${a(p1,o)}-pure`;return t?f.createElement(oH,{className:X(e,u),classNames:n,styles:r,...i},t.map((d,m)=>f.createElement(T8,{key:m,...d}))):f.createElement(T8,{className:X(e,u),classNames:n,styles:r,...i})};Eu.BackTop=rH;Eu.Group=oH;Eu._InternalPanelDoNotUseOrYouWillBeFired=Dme;const _me=e=>{const{getPrefixCls:t,direction:n}=f.useContext(Ct),{prefixCls:r,className:o}=e,i=t("input-group",r),a=t("input"),[l,u]=wF(a),d=X(i,u,{[`${i}-lg`]:e.size==="large",[`${i}-sm`]:e.size==="small",[`${i}-compact`]:e.compact,[`${i}-rtl`]:n==="rtl"},l,o),m=f.useContext(yo),p=f.useMemo(()=>({...m,isFormItemInput:false}),[m]);return f.createElement(yo.Provider,{value:p},f.createElement(Xr.Compact,{className:d,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},e.children))},Lme=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}}}},zme=qt(["Input","OTP"],e=>{const t=Ft(e,_f(e));return Lme(t)},Lf),Bme=f.forwardRef((e,t)=>{const{className:n,value:r,onChange:o,onActiveChange:i,index:a,mask:l,onFocus:u,...d}=e,{getPrefixCls:m}=f.useContext(Ct),p=m("otp"),g=typeof l=="string"?l:r,b=f.useRef(null);f.useImperativeHandle(t,()=>b.current);const y=$=>{o(a,$.target.value);},S=()=>{Lt(()=>{const $=b.current?.input;document.activeElement===$&&$&&$.select();});},C=$=>{u?.($),S();},w=$=>{const{key:M,ctrlKey:T,metaKey:R}=$;M==="ArrowLeft"?i(a-1):M==="ArrowRight"?i(a+1):M==="z"&&(T||R)?$.preventDefault():M==="Backspace"&&!r&&i(a-1),S();};return f.createElement("span",{className:`${p}-input-wrapper`,role:"presentation"},l&&r!==""&&r!==void 0&&f.createElement("span",{className:`${p}-mask-icon`,"aria-hidden":"true"},g),f.createElement(zf,{"aria-label":`OTP Input ${a+1}`,type:l===true?"password":"text",...d,ref:b,value:r,onInput:y,onFocus:C,onKeyDown:w,onMouseDown:S,onMouseUp:S,className:X(n,{[`${p}-mask-input`]:l})}))});function db(e){return (e||"").split("")}const kme=e=>{const{index:t,prefixCls:n,separator:r,className:o,style:i}=e,a=typeof r=="function"?r(t):r;return a?f.createElement("span",{className:X(`${n}-separator`,o),style:i},a):null},Fme=f.forwardRef((e,t)=>{const{prefixCls:n,length:r=6,size:o,defaultValue:i,value:a,onChange:l,formatter:u,separator:d,variant:m,disabled:p,status:g,autoFocus:b,mask:y,type:S,onInput:C,onFocus:w,inputMode:$,classNames:M,styles:T,className:R,style:I,...N}=e,{classNames:P,styles:O,getPrefixCls:_,direction:L,style:j,className:U}=Gt("otp"),q=_("otp",n),V={...e,length:r},[B,F]=Xt([P,M],[O,T],{props:V}),W=bo(N,{aria:true,data:true,attr:true}),[K,Q]=zme(q),D=ao(ue=>o??ue),z=f.useContext(yo),Y=If(z.status,g),ee=f.useMemo(()=>({...z,status:Y,hasFeedback:false,feedbackIcon:null}),[z,Y]),J=f.useRef(null),te=f.useRef({});f.useImperativeHandle(t,()=>({focus:()=>{te.current[0]?.focus();},blur:()=>{for(let ue=0;ue<r;ue+=1)te.current[ue]?.blur();},nativeElement:J.current}));const ne=ue=>u?u(ue):ue,[se,ae]=f.useState(()=>db(ne(i||"")));f.useEffect(()=>{a!==void 0&&ae(db(a));},[a]);const re=Et(ue=>{ae(ue),C&&C(ue),l&&ue.length===r&&ue.every(Se=>Se)&&ue.some((Se,ye)=>se[ye]!==Se)&&l(ue.join(""));}),de=Et((ue,Se)=>{let ye=Yt(se);for(let je=0;je<ue;je+=1)ye[je]||(ye[je]="");Se.length<=1?ye[ue]=Se:ye=ye.slice(0,ue).concat(db(Se)),ye=ye.slice(0,r);for(let je=ye.length-1;je>=0&&!ye[je];je-=1)ye.pop();const Be=ne(ye.map(je=>je||" ").join(""));return ye=db(Be).map((je,Ne)=>je===" "&&!ye[Ne]?ye[Ne]:je),ye}),ge=(ue,Se)=>{const ye=de(ue,Se),Be=Math.min(ue+Se.length,r-1);Be!==ue&&ye[ue]!==void 0&&te.current[Be]?.focus(),re(ye);},ie=ue=>{te.current[ue]?.focus();},Ee=(ue,Se)=>{for(let ye=0;ye<Se;ye+=1)if(!te.current[ye]?.input?.value){te.current[ye]?.focus();break}w?.(ue);},le={variant:m,disabled:p,status:Y,mask:y,type:S,inputMode:$};return f.createElement("div",{...W,ref:J,className:X(R,q,{[`${q}-sm`]:D==="small",[`${q}-lg`]:D==="large",[`${q}-rtl`]:L==="rtl"},Q,K,U,B.root),style:{...F.root,...j,...I},role:"group"},f.createElement(yo.Provider,{value:ee},Array.from({length:r}).map((ue,Se)=>{const ye=`otp-${Se}`,Be=se[Se]||"";return f.createElement(f.Fragment,{key:ye},f.createElement(Bme,{ref:je=>{te.current[Se]=je;},index:Se,size:D,htmlSize:1,className:X(B.input,`${q}-input`),style:F.input,onChange:ge,value:Be,onActiveChange:ie,autoFocus:Se===0&&b,onFocus:je=>Ee(je,Se),...le}),Se<r-1&&f.createElement(kme,{separator:d,index:Se,prefixCls:q,className:X(B.separator),style:F.separator}))})))});var Hme={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 qE(){return qE=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},qE.apply(this,arguments)}const Vme=(e,t)=>f.createElement(Kn,qE({},e,{ref:t,icon:Hme})),jme=f.forwardRef(Vme);var Ume={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 WE(){return WE=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},WE.apply(this,arguments)}const qme=(e,t)=>f.createElement(Kn,WE({},e,{ref:t,icon:Ume})),Wme=f.forwardRef(qme),Gme=e=>e?f.createElement(Wme,null):f.createElement(jme,null),Kme={click:"onClick",hover:"onMouseOver"},Yme=f.forwardRef((e,t)=>{const{disabled:n,action:r="click",visibilityToggle:o=true,iconRender:i=Gme,suffix:a}=e,l=f.useContext(to),u=n??l,d=typeof o=="object"&&o.visible!==void 0,[m,p]=f.useState(()=>d?o.visible:false),g=f.useRef(null);f.useEffect(()=>{d&&p(o.visible);},[d,o]);const b=UF(g),y=()=>{if(u)return;m&&b();const L=!m;p(L),typeof o=="object"&&o.onVisibleChange?.(L);},S=L=>{const j=Kme[r]||"",U=i(m),q={[j]:y,className:`${L}-icon`,key:"passwordIcon",onMouseDown:V=>{V.preventDefault();},onMouseUp:V=>{V.preventDefault();}};return f.cloneElement(f.isValidElement(U)?U:f.createElement("span",null,U),q)},{className:C,prefixCls:w,inputPrefixCls:$,size:M,...T}=e,{getPrefixCls:R}=f.useContext(Ct),I=R("input",$),N=R("input-password",w),P=o&&S(N),O=X(N,C,{[`${N}-${M}`]:!!M}),_={...Bn(T,["suffix","iconRender","visibilityToggle"]),type:m?"text":"password",className:O,prefixCls:I,suffix:f.createElement(f.Fragment,null,P,a)};return M&&(_.size=M),f.createElement(zf,{ref:Nr(t,g),..._})}),Xme=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}}}}}}},Qme=qt(["Input","Search"],e=>[Xme(e)]),Zme=f.forwardRef((e,t)=>{const{prefixCls:n,inputPrefixCls:r,className:o,size:i,style:a,enterButton:l=false,addonAfter:u,loading:d,disabled:m,onSearch:p,onChange:g,onCompositionStart:b,onCompositionEnd:y,variant:S,onPressEnter:C,classNames:w,styles:$,hidden:M,...T}=e,{direction:R,getPrefixCls:I,classNames:N,styles:P}=Gt("inputSearch"),O={...e,enterButton:l},[_,L]=Xt([N,w],[P,$],{props:O},{button:{_default:"root"}}),j=f.useRef(false),U=I("input-search",n),q=I("input",r),[V,B]=Qme(U),{compactSize:F}=_s(U,R),W=ao(le=>i??F??le),K=f.useRef(null),Q=le=>{le?.target&&le.type==="click"&&p&&p(le.target.value,le,{source:"clear"}),g?.(le);},D=le=>{document.activeElement===K.current?.input&&le.preventDefault();},z=le=>{p&&p(K.current?.input?.value,le,{source:"input"});},Y=le=>{j.current||d||(C?.(le),z(le));},ee=typeof l=="boolean"?f.createElement(RR,null):null,J=`${U}-btn`,te=X(J,{[`${J}-${S}`]:S});let ne;const se=l||{},ae=se.type&&se.type.__ANT_BUTTON===true;ae||se.type==="button"?ne=kr(se,{onMouseDown:D,onClick:le=>{se?.props?.onClick?.(le),z(le);},key:"enterButton",...ae?{className:te,size:W}:{}}):ne=f.createElement(ut,{classNames:_.button,styles:L.button,className:te,color:l?"primary":"default",size:W,disabled:m,key:"enterButton",onMouseDown:D,onClick:z,loading:d,icon:ee,variant:S==="borderless"||S==="filled"||S==="underlined"?"text":l?"solid":void 0},l),u&&(ne=[ne,kr(u,{key:"addonAfter"})]);const re=X(U,B,{[`${U}-rtl`]:R==="rtl",[`${U}-${W}`]:!!W,[`${U}-with-button`]:!!l},o,V,_.root),de=le=>{j.current=true,b?.(le);},ge=le=>{j.current=false,y?.(le);},ie=bo(T,{data:true}),Ee=Bn({...T,classNames:Bn(_,["button","root"]),styles:Bn(L,["button","root"]),prefixCls:q,type:"search",size:W,variant:S,onPressEnter:Y,onCompositionStart:de,onCompositionEnd:ge,onChange:Q,disabled:m},Object.keys(ie));return f.createElement(rR,{className:re,style:{...a,...L.root},...ie,hidden:M},f.createElement(zf,{ref:Nr(K,t),...Ee}),ne)}),Jme=`
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;
`,ehe=["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"],nw={};let ci;function the(e,t=false){const n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&nw[n])return nw[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")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),u={sizingStyle:ehe.map(d=>`${d}:${r.getPropertyValue(d)}`).join(";"),paddingSize:i,borderSize:a,boxSizing:o};return t&&n&&(nw[n]=u),u}function nhe(e,t=false,n=null,r=null){ci||(ci=document.createElement("textarea"),ci.setAttribute("tab-index","-1"),ci.setAttribute("aria-hidden","true"),ci.setAttribute("name","hiddenTextarea"),document.body.appendChild(ci)),e.getAttribute("wrap")?ci.setAttribute("wrap",e.getAttribute("wrap")):ci.removeAttribute("wrap");const{paddingSize:o,borderSize:i,boxSizing:a,sizingStyle:l}=the(e,t);ci.setAttribute("style",`${l};${Jme}`),ci.value=e.value||e.placeholder||"";let u,d,m,p=ci.scrollHeight;if(a==="border-box"?p+=i:a==="content-box"&&(p-=o),n!==null||r!==null){ci.value=" ";const b=ci.scrollHeight-o;n!==null&&(u=b*n,a==="border-box"&&(u=u+o+i),p=Math.max(u,p)),r!==null&&(d=b*r,a==="border-box"&&(d=d+o+i),m=p>d?"":"hidden",p=Math.min(d,p));}const g={height:p,overflowY:m,resize:"none"};return u&&(g.minHeight=u),d&&(g.maxHeight=d),g}function GE(){return GE=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},GE.apply(this,arguments)}const rw=0,ow=1,iw=2,rhe=f.forwardRef((e,t)=>{const{prefixCls:n,defaultValue:r,value:o,autoSize:i,onResize:a,className:l,style:u,disabled:d,onChange:m,onInternalAutoSize:p,...g}=e,[b,y]=hn(r,o),S=b??"",C=V=>{y(V.target.value),m?.(V);},w=f.useRef();f.useImperativeHandle(t,()=>({textArea:w.current}));const[$,M]=f.useMemo(()=>i&&typeof i=="object"?[i.minRows,i.maxRows]:[],[i]),T=!!i,[R,I]=f.useState(iw),[N,P]=f.useState(),O=()=>{I(rw);};An(()=>{T&&O();},[o,$,M,T]),An(()=>{if(R===rw)I(ow);else if(R===ow){const V=nhe(w.current,false,$,M);I(iw),P(V);}},[R]);const _=f.useRef(),L=()=>{Lt.cancel(_.current);},j=V=>{R===iw&&(a?.(V),i&&(L(),_.current=Lt(()=>{O();})));};f.useEffect(()=>L,[]);const q={...u,...T?N:null};return (R===rw||R===ow)&&(q.overflowY="hidden",q.overflowX="hidden"),f.createElement(ha,{onResize:j,disabled:!(i||a)},f.createElement("textarea",GE({},g,{ref:w,style:q,className:X(n,l,{[`${n}-disabled`]:d}),disabled:d,value:S,onChange:C})))});function KE(){return KE=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},KE.apply(this,arguments)}const ohe=G.forwardRef(({defaultValue:e,value:t,onFocus:n,onBlur:r,onChange:o,allowClear:i,maxLength:a,onCompositionStart:l,onCompositionEnd:u,suffix:d,prefixCls:m="rc-textarea",showCount:p,count:g,className:b,style:y,disabled:S,hidden:C,classNames:w,styles:$,onResize:M,onClear:T,onPressEnter:R,readOnly:I,autoSize:N,onKeyDown:P,...O},_)=>{const[L,j]=hn(e,t),U=L==null?"":String(L),[q,V]=G.useState(false),B=G.useRef(false),[F,W]=G.useState(null),K=f.useRef(null),Q=f.useRef(null),D=()=>Q.current?.textArea,z=()=>{D().focus();};f.useImperativeHandle(_,()=>({resizableTextArea:Q.current,focus:z,blur:()=>{D().blur();},nativeElement:K.current?.nativeElement||D()})),f.useEffect(()=>{V(fe=>!S&&fe);},[S]);const[Y,ee]=G.useState(null);G.useEffect(()=>{Y&&D().setSelectionRange(...Y);},[Y]);const J=VF(g,p),te=J.max??a,ne=Number(te)>0,se=J.strategy(U),ae=!!te&&se>te,re=(fe,be)=>{let Re=be;!B.current&&J.exceedFormatter&&J.max&&J.strategy(be)>J.max&&(Re=J.exceedFormatter(be,{max:J.max}),be!==Re&&ee([D().selectionStart||0,D().selectionEnd||0])),j(Re),Z0(fe.currentTarget,fe,o,Re);},de=fe=>{B.current=true,l?.(fe);},ge=fe=>{B.current=false,re(fe,fe.currentTarget.value),u?.(fe);},ie=fe=>{re(fe,fe.target.value);},Ee=fe=>{fe.key==="Enter"&&R&&!fe.nativeEvent.isComposing&&R(fe),P?.(fe);},le=fe=>{V(true),n?.(fe);},ue=fe=>{V(false),r?.(fe);},Se=fe=>{j(""),z(),Z0(D(),fe,o);};let ye=d,Be;J.show&&(J.showFormatter?Be=J.showFormatter({value:U,count:se,maxLength:te}):Be=`${se}${ne?` / ${te}`:""}`,ye=G.createElement(G.Fragment,null,ye,G.createElement("span",{className:X(`${m}-data-count`,w?.count),style:$?.count},Be)));const je=fe=>{M?.(fe),D()?.style.height&&W(true);},Ne=!N&&!p&&!i;return G.createElement(HF,{ref:K,value:U,allowClear:i,handleReset:Se,suffix:ye,prefixCls:m,classNames:{...w,affixWrapper:X(w?.affixWrapper,{[`${m}-show-count`]:p,[`${m}-textarea-allow-clear`]:i})},disabled:S,focused:q,className:X(b,ae&&`${m}-out-of-range`),style:{...y,...F&&!Ne?{height:"auto"}:{}},dataAttrs:{affixWrapper:{"data-count":typeof Be=="string"?Be:void 0}},hidden:C,readOnly:I,onClear:T},G.createElement(rhe,KE({},O,{autoSize:N,maxLength:a,onKeyDown:Ee,onChange:ie,onFocus:le,onBlur:ue,onCompositionStart:de,onCompositionEnd:ge,className:X(w?.textarea),style:{resize:y?.resize,...$?.textarea},disabled:S,prefixCls:m,onResize:je,ref:Q,readOnly:I})))}),ihe=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}}}}}},ahe=qt(["Input","TextArea"],e=>{const t=Ft(e,_f(e));return ihe(t)},Lf,{resetFont:false}),she=f.forwardRef((e,t)=>{const{prefixCls:n,bordered:r=true,size:o,disabled:i,status:a,allowClear:l,classNames:u,rootClassName:d,className:m,style:p,styles:g,variant:b,showCount:y,onMouseDown:S,onResize:C,...w}=e,{getPrefixCls:$,direction:M,allowClear:T,autoComplete:R,className:I,style:N,classNames:P,styles:O}=Gt("textArea"),_=f.useContext(to),L=i??_,{status:j,hasFeedback:U,feedbackIcon:q}=f.useContext(yo),V=If(j,a),[B,F]=Xt([P,u],[O,g],{props:e}),W=f.useRef(null);f.useImperativeHandle(t,()=>({resizableTextArea:W.current?.resizableTextArea,focus:le=>{vR(W.current?.resizableTextArea?.textArea,le);},blur:()=>W.current?.blur(),nativeElement:W.current?.nativeElement||null}));const K=$("input",n),Q=Yn(K),[D,z]=xF(K,d);ahe(K,Q);const{compactSize:Y,compactItemClassnames:ee}=_s(K,M),J=ao(le=>o??Y??le),[te,ne]=i1("textArea",b,r),se=jF(l??T),[ae,re]=f.useState(false),[de,ge]=f.useState(false),ie=le=>{re(true),S?.(le);const ue=()=>{re(false),document.removeEventListener("mouseup",ue);};document.addEventListener("mouseup",ue);},Ee=le=>{if(C?.(le),ae&&typeof getComputedStyle=="function"){const ue=W.current?.nativeElement?.querySelector("textarea");ue&&getComputedStyle(ue).resize==="both"&&ge(true);}};return f.createElement(ohe,{autoComplete:R,...w,style:{...F.root,...N,...p},styles:F,disabled:L,allowClear:se,className:X(z,Q,m,d,ee,I,B.root,{[`${K}-textarea-affix-wrapper-resize-dirty`]:de}),classNames:{...B,textarea:X({[`${K}-sm`]:J==="small",[`${K}-lg`]:J==="large"},D,B.textarea,ae&&`${K}-mouse-active`),variant:X({[`${K}-${te}`]:ne},Fl(K,V)),affixWrapper:X(`${K}-textarea-affix-wrapper`,{[`${K}-affix-wrapper-rtl`]:M==="rtl",[`${K}-affix-wrapper-sm`]:J==="small",[`${K}-affix-wrapper-lg`]:J==="large",[`${K}-textarea-show-count`]:y||e.count?.show},D)},prefixCls:K,suffix:U&&f.createElement("span",{className:`${K}-textarea-suffix`},q),showCount:y,ref:W,onResize:Ee,onMouseDown:ie})}),Yi=zf;Yi.Group=_me;Yi.Search=Zme;Yi.TextArea=she;Yi.Password=Yme;Yi.OTP=Fme;var lhe={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 YE(){return YE=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},YE.apply(this,arguments)}const che=(e,t)=>f.createElement(Kn,YE({},e,{ref:t,icon:lhe})),A8=f.forwardRef(che);var uhe={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 XE(){return XE=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},XE.apply(this,arguments)}const dhe=(e,t)=>f.createElement(Kn,XE({},e,{ref:t,icon:uhe})),N8=f.forwardRef(dhe),fhe={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:"页码"},mhe=[10,20,50,100],hhe=e=>{const{pageSizeOptions:t=mhe,locale:n,changeSize:r,pageSize:o,goButton:i,quickGo:a,rootPrefixCls:l,disabled:u,buildOptionText:d,showSizeChanger:m,sizeChangerRender:p}=e,[g,b]=G.useState(""),y=G.useMemo(()=>!g||Number.isNaN(g)?void 0:Number(g),[g]),S=typeof d=="function"?d:P=>`${P} ${n.items_per_page}`,C=P=>{const O=P.target.value;/^\d*$/.test(O)&&b(O);},w=P=>{i||g===""||(b(""),!(P.relatedTarget&&(P.relatedTarget.className.includes(`${l}-item-link`)||P.relatedTarget.className.includes(`${l}-item`)))&&a?.(y));},$=P=>{g!==""&&(P.keyCode===ot.ENTER||P.type==="click")&&(b(""),a?.(y));},M=()=>t.some(P=>P.toString()===o.toString())?t:t.concat([o]).sort((P,O)=>{const _=Number.isNaN(Number(P))?0:Number(P),L=Number.isNaN(Number(O))?0:Number(O);return _-L}),T=`${l}-options`;if(!m&&!a)return null;let R=null,I=null,N=null;return m&&p&&(R=p({disabled:u,size:o,onSizeChange:P=>{r?.(Number(P));},"aria-label":n.page_size,className:`${T}-size-changer`,options:M().map(P=>({label:S(P),value:P}))})),a&&(i&&(N=typeof i=="boolean"?G.createElement("button",{type:"button",onClick:$,onKeyUp:$,disabled:u,className:`${T}-quick-jumper-button`},n.jump_to_confirm):G.createElement("span",{onClick:$,onKeyUp:$},i)),I=G.createElement("div",{className:`${T}-quick-jumper`},n.jump_to,G.createElement("input",{disabled:u,type:"text",value:g,onChange:C,onKeyUp:$,onBlur:w,"aria-label":n.page}),n.page,N)),G.createElement("li",{className:T},R,I)},Zm=e=>{const{rootPrefixCls:t,page:n,active:r,className:o,style:i,showTitle:a,onClick:l,onKeyPress:u,itemRender:d}=e,m=`${t}-item`,p=X(m,`${m}-${n}`,{[`${m}-active`]:r,[`${m}-disabled`]:!n},o),g=()=>{l(n);},b=S=>{u(S,l,n);},y=d(n,"page",G.createElement("a",{rel:"nofollow"},n));return y?G.createElement("li",{title:a?String(n):null,className:p,style:i,onClick:g,onKeyDown:b,tabIndex:0},y):null};function Cl(){return Cl=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},Cl.apply(this,arguments)}const phe=(e,t,n)=>n;function P8(){}function I8(e){const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function Rc(e,t,n){const r=typeof e>"u"?t:e;return Math.floor((n-1)/r)+1}const ghe=e=>{const{prefixCls:t="rc-pagination",selectPrefixCls:n="rc-select",className:r,classNames:o,styles:i,current:a,defaultCurrent:l=1,total:u=0,pageSize:d,defaultPageSize:m=10,onChange:p=P8,hideOnSinglePage:g,align:b,showPrevNextJumpers:y=true,showQuickJumper:S,showLessItems:C,showTitle:w=true,onShowSizeChange:$=P8,locale:M=fhe,style:T,totalBoundaryShowSizeChanger:R=50,disabled:I,simple:N,showTotal:P,showSizeChanger:O=u>R,sizeChangerRender:_,pageSizeOptions:L,itemRender:j=phe,jumpPrevIcon:U,jumpNextIcon:q,prevIcon:V,nextIcon:B}=e,F=G.useRef(null),[W,K]=hn(m,d),[Q,D]=hn(l,a),z=Math.max(1,Math.min(Q,Rc(void 0,W,u))),[Y,ee]=G.useState(z);f.useEffect(()=>{ee(z);},[z]);const J=Math.max(1,z-(C?3:5)),te=Math.min(Rc(void 0,W,u),z+(C?3:5));function ne(ve,Te){let Ce=ve||G.createElement("button",{type:"button","aria-label":Te,className:`${t}-item-link`});return typeof ve=="function"&&(Ce=G.createElement(ve,e)),Ce}function se(ve){const Te=ve.target.value,Ce=Rc(void 0,W,u);let he;return Te===""?he=Te:Number.isNaN(Number(Te))?he=Y:Te>=Ce?he=Ce:he=Number(Te),he}function ae(ve){return I8(ve)&&ve!==z&&I8(u)&&u>0}const re=u>W?S:false;function de(ve){(ve.keyCode===ot.UP||ve.keyCode===ot.DOWN)&&ve.preventDefault();}function ge(ve){const Te=se(ve);switch(Te!==Y&&ee(Te),ve.keyCode){case ot.ENTER:le(Te);break;case ot.UP:le(Te-1);break;case ot.DOWN:le(Te+1);break}}function ie(ve){le(se(ve));}function Ee(ve){const Te=Rc(ve,W,u),Ce=z>Te&&Te!==0?Te:z;K(ve),ee(Ce),$?.(z,ve),D(Ce),p?.(Ce,ve);}function le(ve){if(ae(ve)&&!I){const Te=Rc(void 0,W,u);let Ce=ve;return ve>Te?Ce=Te:ve<1&&(Ce=1),Ce!==Y&&ee(Ce),D(Ce),p?.(Ce,W),Ce}return z}const ue=z>1,Se=z<Rc(void 0,W,u);function ye(){ue&&le(z-1);}function Be(){Se&&le(z+1);}function je(){le(J);}function Ne(){le(te);}function fe(ve,Te,...Ce){(ve.key==="Enter"||ve.charCode===ot.ENTER||ve.keyCode===ot.ENTER)&&Te(...Ce);}function be(ve){fe(ve,ye);}function Re(ve){fe(ve,Be);}function qe(ve){fe(ve,je);}function Qe(ve){fe(ve,Ne);}function We(ve){const Te=j(ve,"prev",ne(V,"prev page"));return G.isValidElement(Te)?G.cloneElement(Te,{disabled:!ue}):Te}function tt(ve){const Te=j(ve,"next",ne(B,"next page"));return G.isValidElement(Te)?G.cloneElement(Te,{disabled:!Se}):Te}function rt(ve){(ve.type==="click"||ve.keyCode===ot.ENTER)&&le(Y);}let Ze=null;const Oe=bo(e,{aria:true,data:true}),Ye=P&&G.createElement("li",{className:`${t}-total-text`},P(u,[u===0?0:(z-1)*W+1,z*W>u?u:z*W]));let Ke=null;const _e=Rc(void 0,W,u);if(g&&u<=W)return null;const ke=[],lt={rootPrefixCls:t,onClick:le,onKeyPress:fe,showTitle:w,itemRender:j,page:-1,className:o?.item,style:i?.item},At=z-1>0?z-1:0,dt=z+1<_e?z+1:_e,Dt=S&&S.goButton,Tt=typeof N=="object"?N.readOnly:!N;let xt=Dt,gt=null;N&&(Dt&&(typeof Dt=="boolean"?xt=G.createElement("button",{type:"button",onClick:rt,onKeyUp:rt},M.jump_to_confirm):xt=G.createElement("span",{onClick:rt,onKeyUp:rt},Dt),xt=G.createElement("li",{title:w?`${M.jump_to}${z}/${_e}`:null,className:`${t}-simple-pager`},xt)),gt=G.createElement("li",{title:w?`${z}/${_e}`:null,className:X(`${t}-simple-pager`,o?.item),style:i?.item},Tt?Y:G.createElement("input",{type:"text","aria-label":M.jump_to,value:Y,disabled:I,onKeyDown:de,onKeyUp:ge,onChange:ge,onBlur:ie,size:3}),G.createElement("span",{className:`${t}-slash`},"/"),_e));const ft=C?1:2;if(_e<=3+ft*2){_e||ke.push(G.createElement(Zm,Cl({},lt,{key:"noPager",page:1,className:`${t}-item-disabled`})));for(let ve=1;ve<=_e;ve+=1)ke.push(G.createElement(Zm,Cl({},lt,{key:ve,page:ve,active:z===ve})));}else {const ve=C?M.prev_3:M.prev_5,Te=C?M.next_3:M.next_5,Ce=j(J,"jump-prev",ne(U,"prev page")),he=j(te,"jump-next",ne(q,"next page"));y&&(Ze=Ce?G.createElement("li",{title:w?ve:null,key:"prev",onClick:je,tabIndex:0,onKeyDown:qe,className:X(`${t}-jump-prev`,{[`${t}-jump-prev-custom-icon`]:!!U})},Ce):null,Ke=he?G.createElement("li",{title:w?Te:null,key:"next",onClick:Ne,tabIndex:0,onKeyDown:Qe,className:X(`${t}-jump-next`,{[`${t}-jump-next-custom-icon`]:!!q})},he):null);let Ie=Math.max(1,z-ft),we=Math.min(z+ft,_e);z-1<=ft&&(we=1+ft*2),_e-z<=ft&&(Ie=_e-ft*2);for(let Le=Ie;Le<=we;Le+=1)ke.push(G.createElement(Zm,Cl({},lt,{key:Le,page:Le,active:z===Le})));if(z-1>=ft*2&&z!==3&&(ke[0]=G.cloneElement(ke[0],{className:X(`${t}-item-after-jump-prev`,ke[0].props.className)}),ke.unshift(Ze)),_e-z>=ft*2&&z!==_e-2){const Le=ke[ke.length-1];ke[ke.length-1]=G.cloneElement(Le,{className:X(`${t}-item-before-jump-next`,Le.props.className)}),ke.push(Ke);}Ie!==1&&ke.unshift(G.createElement(Zm,Cl({},lt,{key:1,page:1}))),we!==_e&&ke.push(G.createElement(Zm,Cl({},lt,{key:_e,page:_e})));}let st=We(At);if(st){const ve=!ue||!_e;st=G.createElement("li",{title:w?M.prev_page:null,onClick:ye,tabIndex:ve?null:0,onKeyDown:be,className:X(`${t}-prev`,o?.item,{[`${t}-disabled`]:ve}),style:i?.item,"aria-disabled":ve},st);}let He=tt(dt);if(He){let ve,Te;N?(ve=!Se,Te=ue?0:null):(ve=!Se||!_e,Te=ve?null:0),He=G.createElement("li",{title:w?M.next_page:null,onClick:Be,tabIndex:Te,onKeyDown:Re,className:X(`${t}-next`,o?.item,{[`${t}-disabled`]:ve}),style:i?.item,"aria-disabled":ve},He);}const Ge=X(t,r,{[`${t}-start`]:b==="start",[`${t}-center`]:b==="center",[`${t}-end`]:b==="end",[`${t}-simple`]:N,[`${t}-disabled`]:I});return G.createElement("ul",Cl({className:Ge,style:T,ref:F},Oe),Ye,st,N?gt:ke,He,G.createElement(hhe,{locale:M,rootPrefixCls:t,disabled:I,selectPrefixCls:n,changeSize:Ee,pageSize:W,pageSizeOptions:L,quickGo:re?le:null,goButton:xt,showSizeChanger:O,sizeChangerRender:_}))},vhe=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}}}}},bhe=e=>{const{componentCls:t}=e;return {[`&${t}-small ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-quick-jumper":{input:{...HR(e),width:e.paginationMiniQuickJumperInputWidth}}}}},yhe=e=>{const{componentCls:t}=e;return {[`&${t}-large ${t}-options`]:{"&-quick-jumper":{input:{...FR(e)}}}}},She=e=>{const{componentCls:t,antCls:n}=e,[,r]=ar(n,"pagination");return {[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{height:r("item-size-actual"),lineHeight:r("item-size-actual"),verticalAlign:"top",[`${t}-item-link`]:{height:r("item-size-actual"),backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:r("item-size-actual"),lineHeight:r("item-size-actual")}}},[`${t}-simple-pager`]:{display:"inline-flex",alignItems:"center",height:r("item-size-actual"),marginInlineEnd:r("item-spacing-actual"),input:{boxSizing:"border-box",height:"100%",width:e.quickJumperInputWidth,padding:`0 ${oe(e.paginationItemPaddingInline)}`,textAlign:"center",backgroundColor:e.itemInputBg,border:`${oe(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:`${oe(e.inputOutlineOffset)} 0 ${oe(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}-small`]:{[`${t}-simple-pager`]:{input:{width:e.paginationMiniQuickJumperInputWidth}}}}}},Che=e=>{const{componentCls:t,antCls:n}=e,[,r]=ar(n,"pagination");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:r("item-spacing-actual")},[`
${t}-prev,
${t}-next,
${t}-jump-prev,
${t}-jump-next
`]:{display:"inline-block",minWidth:r("item-size-actual"),height:r("item-size-actual"),color:e.colorText,fontFamily:e.fontFamily,lineHeight:r("item-size-actual"),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:`${oe(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:r("item-size-actual"),marginInlineStart:e.marginXS,lineHeight:r("item-size-actual"),verticalAlign:"baseline",input:{...m1(e),...kR(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow}),"&[disabled]":{...f1(e)},width:e.quickJumperInputWidth,height:r("item-size-actual"),boxSizing:"border-box",margin:0,marginInlineStart:r("item-spacing-actual"),marginInlineEnd:r("item-spacing-actual")}}}}},xhe=e=>{const{componentCls:t,antCls:n}=e,[,r]=ar(n,"pagination");return {[`${t}-item`]:{display:"inline-block",minWidth:r("item-size-actual"),height:r("item-size-actual"),marginInlineEnd:r("item-spacing-actual"),fontFamily:e.fontFamily,lineHeight:oe(e.calc(r("item-size-actual")).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:e.itemBg,border:`${oe(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${oe(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}}}}},whe=e=>{const{componentCls:t,antCls:n}=e,[r,o]=ar(n,"pagination");return {[t]:{[r("item-size-actual")]:oe(e.itemSize),[r("item-spacing-actual")]:oe(e.marginXS),"&-small":{[r("item-size-actual")]:oe(e.itemSizeSM),[r("item-spacing-actual")]:oe(e.marginXXS)},"&-large":{[r("item-size-actual")]:oe(e.itemSizeLG),[r("item-spacing-actual")]:oe(e.marginSM)},...un(e),display:"flex",alignItems:"center","&-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:o("item-size-actual"),marginInlineEnd:o("item-spacing-actual"),lineHeight:oe(e.calc(o("item-size-actual")).sub(2).equal()),verticalAlign:"middle"},...xhe(e),...Che(e),...She(e),...bhe(e),...yhe(e),...vhe(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"}}},$he=e=>{const{componentCls:t}=e;return {[`${t}:not(${t}-disabled)`]:{[`${t}-item`]:{...$i(e)},[`${t}-jump-prev, ${t}-jump-next`]:{"&:focus-visible":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0},...ba(e)}},[`${t}-prev, ${t}-next`]:{[`&:focus-visible ${t}-item-link`]:ba(e)}}}},iH=e=>({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemSizeLG:e.controlHeightLG,itemActiveBg:e.colorBgContainer,itemActiveColor:e.colorPrimary,itemActiveColorHover:e.colorPrimaryHover,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0,...Lf(e)}),aH=e=>Ft(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"},_f(e)),Ehe=qt("Pagination",e=>{const t=aH(e);return [whe(t),$he(t)]},iH),Mhe=e=>{const{componentCls:t}=e;return {[`${t}${t}-bordered${t}-disabled`]:{"&, &: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`]:{[`${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:`${oe(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}}}}},Rhe=Tf(["Pagination","bordered"],e=>{const t=aH(e);return Mhe(t)},iH);function O8(e){return f.useMemo(()=>typeof e=="boolean"?[e,{}]:e&&typeof e=="object"?[true,e]:[void 0,void 0],[e])}const The=e=>{const{align:t,prefixCls:n,selectPrefixCls:r,className:o,rootClassName:i,style:a,size:l,locale:u,responsive:d,showSizeChanger:m,selectComponentClass:p,pageSizeOptions:g,styles:b,classNames:y,...S}=e,{xs:C}=_7(d),[,w]=Fr(),{getPrefixCls:$,direction:M,showSizeChanger:T,className:R,style:I,classNames:N,styles:P,totalBoundaryShowSizeChanger:O}=Gt("pagination"),_=$("pagination",n),[L,j]=Ehe(_),U=ao(l),q=U==="small"||!!(C&&!U&&d),V={...e,size:U},[B,F]=Xt([N,y],[P,b],{props:V}),[W]=Oo("Pagination",BB),K={...W,...u},[Q,D]=O8(m),[z,Y]=O8(T),ee=Q??z,J=D??Y,te=p||Zl,ne=f.useMemo(()=>g?g.map(ie=>Number(ie)):void 0,[g]),se=ie=>{const{disabled:Ee,size:le,onSizeChange:ue,"aria-label":Se,className:ye,options:Be}=ie,{className:je,onChange:Ne}=J||{},fe=Be.find(be=>String(be.value)===String(le))?.value;return f.createElement(te,{disabled:Ee,showSearch:true,popupMatchSelectWidth:false,getPopupContainer:be=>be.parentNode,"aria-label":Se,options:Be,...J,value:fe,onChange:(be,Re)=>{ue?.(be),Ne?.(be,Re);},size:U,className:X(ye,je)})},ae=f.useMemo(()=>{const ie=f.createElement("span",{className:`${_}-item-ellipsis`},"•••"),Ee=f.createElement("button",{className:`${_}-item-link`,type:"button",tabIndex:-1},M==="rtl"?f.createElement(sf,null):f.createElement(dp,null)),le=f.createElement("button",{className:`${_}-item-link`,type:"button",tabIndex:-1},M==="rtl"?f.createElement(dp,null):f.createElement(sf,null)),ue=f.createElement("a",{className:`${_}-item-link`},f.createElement("div",{className:`${_}-item-container`},M==="rtl"?f.createElement(N8,{className:`${_}-item-link-icon`}):f.createElement(A8,{className:`${_}-item-link-icon`}),ie)),Se=f.createElement("a",{className:`${_}-item-link`},f.createElement("div",{className:`${_}-item-container`},M==="rtl"?f.createElement(A8,{className:`${_}-item-link-icon`}):f.createElement(N8,{className:`${_}-item-link-icon`}),ie));return {prevIcon:Ee,nextIcon:le,jumpPrevIcon:ue,jumpNextIcon:Se}},[M,_]),re=$("select",r),de=X({[`${_}-${t}`]:!!t,[`${_}-${U}`]:U,[`${_}-mini`]:q,[`${_}-rtl`]:M==="rtl",[`${_}-bordered`]:w.wireframe},R,o,i,B.root,L,j),ge={...F.root,...I,...a};return f.createElement(f.Fragment,null,w.wireframe&&f.createElement(Rhe,{prefixCls:_}),f.createElement(ghe,{...ae,...S,styles:F,classNames:B,style:ge,prefixCls:_,selectPrefixCls:re,className:de,locale:K,pageSizeOptions:ne,showSizeChanger:ee,totalBoundaryShowSizeChanger:S.totalBoundaryShowSizeChanger??O,sizeChangerRender:se}))},ry=100,sH=ry/5,lH=ry/2-sH/2,aw=lH*2*Math.PI,D8=50,_8=e=>{const{dotClassName:t,style:n,hasCircleCls:r}=e;return f.createElement("circle",{className:X(`${t}-circle`,{[`${t}-circle-bg`]:r}),r:lH,cx:D8,cy:D8,strokeWidth:sH,style:n})},Ahe=({percent:e,prefixCls:t})=>{const n=`${t}-dot`,r=`${n}-holder`,o=`${r}-hidden`,[i,a]=f.useState(false);An(()=>{e!==0&&a(true);},[e!==0]);const l=Math.max(Math.min(e,100),0);if(!i)return null;const u={strokeDashoffset:`${aw/4}`,strokeDasharray:`${aw*l/100} ${aw*(100-l)/100}`};return f.createElement("span",{className:X(r,`${n}-progress`,l<=0&&o)},f.createElement("svg",{viewBox:`0 0 ${ry} ${ry}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":l},f.createElement(_8,{dotClassName:n,hasCircleCls:true}),f.createElement(_8,{dotClassName:n,style:u})))};function Nhe(e){const{prefixCls:t,percent:n=0,className:r,style:o}=e,i=`${t}-dot`,a=`${i}-holder`,l=`${a}-hidden`;return f.createElement(f.Fragment,null,f.createElement("span",{className:X(a,r,n>0&&l),style:o},f.createElement("span",{className:X(i,`${t}-dot-spin`)},[1,2,3,4].map(u=>f.createElement("i",{className:`${t}-dot-item`,key:u})))),f.createElement(Ahe,{prefixCls:t,percent:n}))}function Phe(e){const{prefixCls:t,indicator:n,percent:r,className:o,style:i}=e,a=`${t}-dot`;return n&&f.isValidElement(n)?kr(n,l=>({className:X(l.className,a,o),style:{...l.style,...i},percent:r})):f.createElement(Nhe,{prefixCls:t,percent:r,className:o,style:i})}const Ihe=new zt("antSpinMove",{to:{opacity:1}}),Ohe=new zt("antRotate",{to:{transform:"rotate(405deg)"}}),Dhe=e=>{const{componentCls:t,calc:n}=e;return {[t]:{...un(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:Ihe,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:Ohe,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"}}}},_he=e=>{const{controlHeightLG:t,controlHeight:n}=e;return {contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:n}},Lhe=qt("Spin",e=>{const t=Ft(e,{spinDotDefault:e.colorTextDescription});return Dhe(t)},_he),zhe=200,L8=[[30,.05],[70,.03],[96,.01]];function Bhe(e,t){const[n,r]=f.useState(0),o=f.useRef(null),i=t==="auto";return f.useEffect(()=>(i&&e&&(r(0),o.current=setInterval(()=>{r(a=>{const l=100-a;for(let u=0;u<L8.length;u+=1){const[d,m]=L8[u];if(a<=d)return a+l*m}return a});},zhe)),()=>{o.current&&(clearInterval(o.current),o.current=null);}),[i,e]),i?n:t}let cH;function khe(e,t){return !!e&&!!t&&!Number.isNaN(Number(t))}const g1=e=>{const{prefixCls:t,spinning:n=true,delay:r=0,className:o,rootClassName:i,size:a="default",tip:l,wrapperClassName:u,style:d,children:m,fullscreen:p=false,indicator:g,percent:b,classNames:y,styles:S,...C}=e,{getPrefixCls:w,direction:$,indicator:M,className:T,style:R,classNames:I,styles:N}=Gt("spin"),P=w("spin",t),[O,_]=Lhe(P),[L,j]=f.useState(()=>n&&!khe(n,r)),U=Bhe(L,b);f.useEffect(()=>{if(n){const Y=Ede(r,()=>{j(true);});return Y(),()=>{Y?.cancel?.();}}j(false);},[r,n]);const q=f.useMemo(()=>typeof m<"u"&&!p,[m,p]),V={...e,size:a,spinning:L,tip:l,fullscreen:p,children:m,percent:U},[B,F]=Xt([I,y],[N,S],{props:V}),W=X(P,T,{[`${P}-sm`]:a==="small",[`${P}-lg`]:a==="large",[`${P}-spinning`]:L,[`${P}-show-text`]:!!l,[`${P}-rtl`]:$==="rtl"},o,!p&&i,!p&&B.root,O,_),K=X(`${P}-container`,{[`${P}-blur`]:L}),Q=g??M??cH,D={...R,...d},z=f.createElement("div",{...C,style:p?D:{...F.root,...D},className:W,"aria-live":"polite","aria-busy":L},f.createElement(Phe,{className:B.indicator,style:F.indicator,prefixCls:P,indicator:Q,percent:U}),l&&(q||p)?f.createElement("div",{className:X(`${P}-text`,B.tip),style:F.tip},l):null);return q?f.createElement("div",{...C,className:X(`${P}-nested-loading`,u,B.wrapper,O,_),style:F.wrapper},L&&f.createElement("div",{key:"loading"},z),f.createElement("div",{className:K,key:"container"},m)):p?f.createElement("div",{className:X(`${P}-fullscreen`,{[`${P}-fullscreen-show`]:L},i,O,_,B.mask),style:F.mask},z):z};g1.setDefaultIndicator=e=>{cH=e;};let Dc=null,jc=e=>e(),pp=[],gp={};function z8(){const{getContainer:e,duration:t,rtl:n,maxCount:r,top:o}=gp,i=e?.()||document.body;return {getContainer:()=>i,duration:t,rtl:n,maxCount:r,top:o}}const Fhe=G.forwardRef((e,t)=>{const{messageConfig:n,sync:r}=e,{getPrefixCls:o}=f.useContext(Ct),i=gp.prefixCls||o("message"),a=f.useContext(V0),[l,u]=pk({...n,prefixCls:i,...a.message});return G.useImperativeHandle(t,()=>{const d={...l};return Object.keys(d).forEach(m=>{d[m]=(...p)=>(r(),l[m].apply(l,p));}),{instance:d,sync:r}}),u}),Hhe=G.forwardRef((e,t)=>{const[n,r]=G.useState(z8),o=()=>{r(z8);};G.useEffect(o,[]);const i=eR(),a=i.getRootPrefixCls(),l=i.getIconPrefixCls(),u=i.getTheme(),d=G.createElement(Fhe,{ref:t,sync:o,messageConfig:n});return G.createElement(Do,{prefixCls:a,iconPrefixCls:l,theme:u},i.holderRender?i.holderRender(d):d)}),v1=()=>{if(!Dc){const e=document.createDocumentFragment(),t={fragment:e};Dc=t,jc(()=>{e1(G.createElement(Hhe,{ref:n=>{const{instance:r,sync:o}=n||{};Promise.resolve().then(()=>{!t.instance&&r&&(t.instance=r,t.sync=o,v1());});}}),e);});return}Dc.instance&&(pp.forEach(e=>{const{type:t,skipped:n}=e;if(!n)switch(t){case "open":{jc(()=>{const r=Dc.instance.open({...gp,...e.config});r?.then(e.resolve),e.setCloseFn(r);});break}case "destroy":jc(()=>{Dc?.instance.destroy(e.key);});break;default:jc(()=>{var r;const o=(r=Dc.instance)[t].apply(r,Yt(e.args));o?.then(e.resolve),e.setCloseFn(o);});}}),pp=[]);};function Vhe(e){gp={...gp,...e},jc(()=>{Dc?.sync?.();});}function jhe(e){const t=nR(n=>{let r;const o={type:"open",config:e,resolve:n,setCloseFn:i=>{r=i;}};return pp.push(o),()=>{r?jc(()=>{r();}):o.skipped=true;}});return v1(),t}function Uhe(e,t){const n=nR(r=>{let o;const i={type:e,args:t,resolve:r,setCloseFn:a=>{o=a;}};return pp.push(i),()=>{o?jc(()=>{o();}):i.skipped=true;}});return v1(),n}const qhe=e=>{pp.push({type:"destroy",key:e}),v1();},Whe=["success","info","warning","error","loading"],Ghe={open:jhe,destroy:qhe,config:Vhe,useMessage:gk,_InternalPanelDoNotUseOrYouWillBeFired:qne},QR=Ghe;Whe.forEach(e=>{QR[e]=(...t)=>Uhe(e,t);});const Khe=e=>{const{prefixCls:t,className:n,closeIcon:r,closable:o,type:i,title:a,children:l,footer:u,...d}=e,{getPrefixCls:m}=f.useContext(Ct),p=m(),g=t||m("modal"),b=Yn(p),[y,S]=Yk(g,b),C=`${g}-confirm`;let w={};return i?w={closable:o??false,title:"",footer:"",children:f.createElement(Qk,{...e,prefixCls:g,confirmPrefixCls:C,rootPrefixCls:p,content:l})}:w={closable:o??true,title:a,footer:u!==null&&f.createElement(qk,{...e}),children:l},f.createElement(zk,{prefixCls:g,className:X(y,`${g}-pure-panel`,i&&C,i&&`${C}-${i}`,n,S,b),...d,closeIcon:Uk(g,r),closable:o,...w})},Yhe=p7(Khe);function uH(e){return ng(t7(e))}const Ea=Xk;Ea.useModal=a7;Ea.info=function(t){return ng(n7(t))};Ea.success=function(t){return ng(r7(t))};Ea.error=function(t){return ng(o7(t))};Ea.warning=uH;Ea.warn=uH;Ea.confirm=function(t){return ng(i7(t))};Ea.destroyAll=function(){for(;Hc.length;){const t=Hc.pop();t&&t();}};Ea.config=Pae;Ea._InternalPanelDoNotUseOrYouWillBeFired=Yhe;let Rd=null,Qb=e=>e(),oy=[],vp={};function B8(){const{getContainer:e,rtl:t,maxCount:n,top:r,bottom:o,showProgress:i,pauseOnHover:a}=vp,l=e?.()||document.body;return {getContainer:()=>l,rtl:t,maxCount:n,top:r,bottom:o,showProgress:i,pauseOnHover:a}}const Xhe=G.forwardRef((e,t)=>{const{notificationConfig:n,sync:r}=e,{getPrefixCls:o}=f.useContext(Ct),i=vp.prefixCls||o("notification"),a=f.useContext(V0),[l,u]=f7({...n,prefixCls:i,...a.notification});return G.useEffect(r,[]),G.useImperativeHandle(t,()=>{const d={...l};return Object.keys(d).forEach(m=>{d[m]=(...p)=>(r(),l[m].apply(l,p));}),{instance:d,sync:r}}),u}),Qhe=G.forwardRef((e,t)=>{const[n,r]=G.useState(B8),o=()=>{r(B8);};G.useEffect(o,[]);const i=eR(),a=i.getRootPrefixCls(),l=i.getIconPrefixCls(),u=i.getTheme(),d=G.createElement(Xhe,{ref:t,sync:o,notificationConfig:n});return G.createElement(Do,{prefixCls:a,iconPrefixCls:l,theme:u},i.holderRender?i.holderRender(d):d)}),ZR=()=>{if(!Rd){const e=document.createDocumentFragment(),t={fragment:e};Rd=t,Qb(()=>{e1(G.createElement(Qhe,{ref:n=>{const{instance:r,sync:o}=n||{};Promise.resolve().then(()=>{!t.instance&&r&&(t.instance=r,t.sync=o,ZR());});}}),e);});return}Rd.instance&&(oy.forEach(e=>{switch(e.type){case "open":{Qb(()=>{Rd.instance.open({...vp,...e.config});});break}case "destroy":Qb(()=>{Rd?.instance?.destroy(e.key);});break}}),oy=[]);};function Zhe(e){vp={...vp,...e},Qb(()=>{Rd?.sync?.();});}function dH(e){oy.push({type:"open",config:e}),ZR();}const Jhe=e=>{oy.push({type:"destroy",key:e}),ZR();},epe=["success","info","warning","error"],tpe={open:dH,destroy:Jhe,config:Zhe,useNotification:m7,_InternalPanelDoNotUseOrYouWillBeFired:qae},fH=tpe;epe.forEach(e=>{fH[e]=t=>dH({...t,type:e});});const npe=e=>{const{componentCls:t,iconCls:n,antCls:r,zIndexPopup:o,colorText:i,colorWarning:a,marginXXS:l,marginXS:u,fontSize:d,fontWeightStrong:m,colorTextHeading:p}=e;return {[t]:{zIndex:o,[`&${r}-popover`]:{fontSize:d},[`${t}-message`]:{marginBottom:u,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t}-message-icon ${n}`]:{color:a,fontSize:d,lineHeight:1,marginInlineEnd:u},[`${t}-title`]:{fontWeight:m,color:p,"&:only-child":{fontWeight:"normal"}},[`${t}-description`]:{marginTop:l,color:i}},[`${t}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:u}}}}},rpe=e=>{const{zIndexPopupBase:t}=e;return {zIndexPopup:t+60}},mH=qt("Popconfirm",e=>npe(e),rpe,{resetStyle:false}),hH=e=>{const{prefixCls:t,okButtonProps:n,cancelButtonProps:r,title:o,description:i,cancelText:a,okText:l,okType:u="primary",icon:d=f.createElement(Kp,null),showCancel:m=true,close:p,onConfirm:g,onCancel:b,onPopupClick:y,classNames:S,styles:C}=e,{getPrefixCls:w}=f.useContext(Ct),[$]=Oo("Popconfirm",ya.Popconfirm),M=cf(o),T=cf(i);return f.createElement("div",{className:`${t}-inner-content`,onClick:y},f.createElement("div",{className:`${t}-message`},d&&f.createElement("span",{className:`${t}-message-icon`},d),f.createElement("div",{className:`${t}-message-text`},M&&f.createElement("div",{className:X(`${t}-title`,S?.title),style:C?.title},M),T&&f.createElement("div",{className:X(`${t}-description`,S?.content),style:C?.content},T))),f.createElement("div",{className:`${t}-buttons`},m&&f.createElement(ut,{onClick:b,size:"small",...r},a||$?.cancelText),f.createElement(pR,{buttonProps:{size:"small",...oR(u),...n},actionFn:g,close:p,prefixCls:w("btn"),quitOnNullishReturnValue:true,emitEvent:true},l||$?.okText)))},ope=e=>{const{prefixCls:t,placement:n,className:r,style:o,...i}=e,{getPrefixCls:a}=f.useContext(Ct),l=a("popconfirm",t);return mH(l),f.createElement(U7,{placement:n,className:X(l,r),style:o,content:f.createElement(hH,{prefixCls:l,...i})})},ipe=f.forwardRef((e,t)=>{const{prefixCls:n,placement:r="top",trigger:o,okType:i="primary",icon:a=f.createElement(Kp,null),children:l,overlayClassName:u,onOpenChange:d,overlayStyle:m,styles:p,arrow:g,classNames:b,...y}=e,{getPrefixCls:S,className:C,style:w,classNames:$,styles:M,arrow:T,trigger:R}=Gt("popconfirm"),[I,N]=hn(e.defaultOpen??false,e.open),P=PR(g,T),O=o||R||"click",_=Q=>{N(Q),d?.(Q);},L=()=>{_(false);},j=Q=>e.onConfirm?.call(void 0,Q),U=Q=>{_(false),e.onCancel?.call(void 0,Q);},q=Q=>{const{disabled:D=false}=e;D||_(Q);},V=S("popconfirm",n),B={...e,placement:r,trigger:O,okType:i,overlayStyle:m,styles:p,classNames:b},[F,W]=Xt([$,b],[M,p],{props:B}),K=X(V,C,u,F.root);return mH(V),f.createElement(Zo,{arrow:P,...Bn(y,["title"]),trigger:O,placement:r,onOpenChange:q,open:I,ref:t,classNames:{root:K,container:F.container,arrow:F.arrow},styles:{root:{...w,...W.root,...m},container:W.container,arrow:W.arrow},content:f.createElement(hH,{okType:i,icon:a,...e,prefixCls:V,close:L,onConfirm:j,onCancel:U,classNames:F,styles:W}),"data-popover-inject":true},l)}),bp=ipe;bp._InternalPanelDoNotUseOrYouWillBeFired=ope;function Dd(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=PM(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(d){throw d},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,a=true,l=false;return {s:function(){n=n.call(e);},n:function(){var d=n.next();return a=d.done,d},e:function(d){l=true,i=d;},f:function(){try{a||n.return==null||n.return();}finally{if(l)throw i}}}}var Bf,ag;function Uo(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 ps(e,t){return (e>>>t&1)!=0}function ui(e){if(!e)throw new Error("Assertion error")}var za=(function(){function e(t,n){Qi(this,e),St(this,"modeBits",void 0),St(this,"numBitsCharCount",void 0),this.modeBits=t,this.numBitsCharCount=n;}return Zi(e,[{key:"numCharCountBits",value:function(n){return this.numBitsCharCount[Math.floor((n+7)/17)]}}]),e})();Bf=za;St(za,"NUMERIC",new Bf(1,[10,12,14]));St(za,"ALPHANUMERIC",new Bf(2,[9,11,13]));St(za,"BYTE",new Bf(4,[8,16,16]));St(za,"KANJI",new Bf(8,[8,10,12]));St(za,"ECI",new Bf(7,[0,0,0]));var ji=Zi(function e(t,n){Qi(this,e),St(this,"ordinal",void 0),St(this,"formatBits",void 0),this.ordinal=t,this.formatBits=n;});ag=ji;St(ji,"LOW",new ag(0,1));St(ji,"MEDIUM",new ag(1,0));St(ji,"QUARTILE",new ag(2,3));St(ji,"HIGH",new ag(3,2));var Jc=(function(){function e(t,n,r){if(Qi(this,e),St(this,"mode",void 0),St(this,"numChars",void 0),St(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 Zi(e,[{key:"getData",value:function(){return this.bitData.slice()}}],[{key:"makeBytes",value:function(n){var r=[],o=Dd(n),i;try{for(o.s();!(i=o.n()).done;){var a=i.value;Uo(a,8,r);}}catch(l){o.e(l);}finally{o.f();}return new e(za.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);Uo(parseInt(n.substring(o,o+i),10),i*3+1,r),o+=i;}return new e(za.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)),Uo(i,11,r);}return o<n.length&&Uo(e.ALPHANUMERIC_CHARSET.indexOf(n.charAt(o)),6,r),new e(za.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)Uo(n,8,r);else if(n<16384)Uo(2,2,r),Uo(n,14,r);else if(n<1e6)Uo(6,3,r),Uo(n,21,r);else throw new RangeError("ECI assignment value out of range");return new e(za.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=Dd(n),a;try{for(i.s();!(a=i.n()).done;){var l=a.value,u=l.mode.numCharCountBits(r);if(l.numChars>=1<<u)return 1/0;o+=4+u+l.bitData.length;}}catch(d){i.e(d);}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})();St(Jc,"NUMERIC_REGEX",/^[0-9]*$/);St(Jc,"ALPHANUMERIC_REGEX",/^[A-Z0-9 $%*+.\/:-]*$/);St(Jc,"ALPHANUMERIC_CHARSET","0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:");var Ls=(function(){function e(t,n,r,o){Qi(this,e),St(this,"size",void 0),St(this,"mask",void 0),St(this,"modules",[]),St(this,"isFunction",[]),St(this,"version",void 0),St(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 a=[],l=0;l<this.size;l++)a.push(false);for(var u=0;u<this.size;u++)this.modules.push(a.slice()),this.isFunction.push(a.slice());this.drawFunctionPatterns();var d=this.addEccAndInterleave(r);if(this.drawCodewords(d),i==-1)for(var m=1e9,p=0;p<8;p++){this.applyMask(p),this.drawFormatBits(p);var g=this.getPenaltyScore();g<m&&(i=p,m=g),this.applyMask(p);}ui(0<=i&&i<=7),this.mask=i,this.applyMask(i),this.drawFormatBits(i),this.isFunction=[];}return Zi(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 a=0;a<o;a++)i==0&&a==0||i==0&&a==o-1||i==o-1&&a==0||this.drawAlignmentPattern(r[i],r[a]);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 a=(r<<10|o)^21522;ui(a>>>15==0);for(var l=0;l<=5;l++)this.setFunctionModule(8,l,ps(a,l));this.setFunctionModule(8,7,ps(a,6)),this.setFunctionModule(8,8,ps(a,7)),this.setFunctionModule(7,8,ps(a,8));for(var u=9;u<15;u++)this.setFunctionModule(14-u,8,ps(a,u));for(var d=0;d<8;d++)this.setFunctionModule(this.size-1-d,8,ps(a,d));for(var m=8;m<15;m++)this.setFunctionModule(8,this.size-15+m,ps(a,m));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;ui(o>>>18==0);for(var i=0;i<18;i++){var a=ps(o,i),l=this.size-11+i%3,u=Math.floor(i/3);this.setFunctionModule(l,u,a),this.setFunctionModule(u,l,a);}}}},{key:"drawFinderPattern",value:function(n,r){for(var o=-4;o<=4;o++)for(var i=-4;i<=4;i++){var a=Math.max(Math.abs(i),Math.abs(o)),l=n+i,u=r+o;0<=l&&l<this.size&&0<=u&&u<this.size&&this.setFunctionModule(l,u,a!=2&&a!=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],a=e.ECC_CODEWORDS_PER_BLOCK[o.ordinal][r],l=Math.floor(e.getNumRawDataModules(r)/8),u=i-l%i,d=Math.floor(l/i),m=[],p=e.reedSolomonComputeDivisor(a),g=0,b=0;g<i;g++){var y=n.slice(b,b+d-a+(g<u?0:1));b+=y.length;var S=e.reedSolomonComputeRemainder(y,p);g<u&&y.push(0),m.push(y.concat(S));}for(var C=[],w=function(T){m.forEach(function(R,I){(T!=d-a||I>=u)&&C.push(R[T]);});},$=0;$<m[0].length;$++)w($);return ui(C.length==l),C}},{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 a=0;a<2;a++){var l=o-a,u=(o+1&2)==0,d=u?this.size-1-i:i;!this.isFunction[d][l]&&r<n.length*8&&(this.modules[d][l]=ps(n[r>>>3],7-(r&7)),r++);}}ui(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,a=[0,0,0,0,0,0,0],l=0;l<this.size;l++)this.modules[r][l]==o?(i++,i==5?n+=e.PENALTY_N1:i>5&&n++):(this.finderPenaltyAddHistory(i,a),o||(n+=this.finderPenaltyCountPatterns(a)*e.PENALTY_N3),o=this.modules[r][l],i=1);n+=this.finderPenaltyTerminateAndCount(o,i,a)*e.PENALTY_N3;}for(var u=0;u<this.size;u++){for(var d=false,m=0,p=[0,0,0,0,0,0,0],g=0;g<this.size;g++)this.modules[g][u]==d?(m++,m==5?n+=e.PENALTY_N1:m>5&&n++):(this.finderPenaltyAddHistory(m,p),d||(n+=this.finderPenaltyCountPatterns(p)*e.PENALTY_N3),d=this.modules[g][u],m=1);n+=this.finderPenaltyTerminateAndCount(d,m,p)*e.PENALTY_N3;}for(var b=0;b<this.size-1;b++)for(var y=0;y<this.size-1;y++){var S=this.modules[b][y];S==this.modules[b][y+1]&&S==this.modules[b+1][y]&&S==this.modules[b+1][y+1]&&(n+=e.PENALTY_N2);}var C=0,w=Dd(this.modules),$;try{for(w.s();!($=w.n()).done;){var M=$.value;C=M.reduce(function(I,N){return I+(N?1:0)},C);}}catch(I){w.e(I);}finally{w.f();}var T=this.size*this.size,R=Math.ceil(Math.abs(C*20-T*10)/T)-1;return ui(0<=R&&R<=9),n+=R*e.PENALTY_N4,ui(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];ui(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=Jc.makeSegments(n);return e.encodeSegments(o,r)}},{key:"encodeBinary",value:function(n,r){var o=Jc.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,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1,l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:true;if(!(e.MIN_VERSION<=o&&o<=i&&i<=e.MAX_VERSION)||a<-1||a>7)throw new RangeError("Invalid value");var u,d;for(u=o;;u++){var m=e.getNumDataCodewords(u,r)*8,p=Jc.getTotalBits(n,u);if(p<=m){d=p;break}if(u>=i)throw new RangeError("Data too long")}for(var g=r,b=0,y=[ji.MEDIUM,ji.QUARTILE,ji.HIGH];b<y.length;b++){var S=y[b];l&&d<=e.getNumDataCodewords(u,S)*8&&(g=S);}var C=[],w=Dd(n),$;try{for(w.s();!($=w.n()).done;){var M=$.value;Uo(M.mode.modeBits,4,C),Uo(M.numChars,M.mode.numCharCountBits(u),C);var T=Dd(M.getData()),R;try{for(T.s();!(R=T.n()).done;){var I=R.value;C.push(I);}}catch(_){T.e(_);}finally{T.f();}}}catch(_){w.e(_);}finally{w.f();}ui(C.length==d);var N=e.getNumDataCodewords(u,g)*8;ui(C.length<=N),Uo(0,Math.min(4,N-C.length),C),Uo(0,(8-C.length%8)%8,C),ui(C.length%8==0);for(var P=236;C.length<N;P^=253)Uo(P,8,C);for(var O=[];O.length*8<C.length;)O.push(0);return C.forEach(function(_,L){O[L>>>3]|=_<<7-(L&7);}),new e(u,g,O,a)}},{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 ui(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,a=0;a<n;a++){for(var l=0;l<r.length;l++)r[l]=e.reedSolomonMultiply(r[l],i),l+1<r.length&&(r[l]^=r[l+1]);i=e.reedSolomonMultiply(i,2);}return r}},{key:"reedSolomonComputeRemainder",value:function(n,r){var o=r.map(function(){return 0}),i=Dd(n),a;try{var l=function(){var d=a.value,m=d^o.shift();o.push(0),r.forEach(function(p,g){o[g]^=e.reedSolomonMultiply(p,m);});};for(i.s();!(a=i.n()).done;)l();}catch(u){i.e(u);}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 ui(o>>>8==0),o}}]),e})();St(Ls,"MIN_VERSION",1);St(Ls,"MAX_VERSION",40);St(Ls,"PENALTY_N1",3);St(Ls,"PENALTY_N2",3);St(Ls,"PENALTY_N3",40);St(Ls,"PENALTY_N4",10);St(Ls,"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]]);St(Ls,"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 ape={L:ji.LOW,M:ji.MEDIUM,Q:ji.QUARTILE,H:ji.HIGH},pH=128,gH="L",vH="#FFFFFF",bH="#000000",yH=false,SH=1,spe=4,lpe=0,cpe=.1,CH=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=[];return t.forEach(function(o,i){var a=null;o.forEach(function(l,u){if(!l&&a!==null){r.push("M".concat(a+n," ").concat(i+n,"h").concat(u-a,"v1H").concat(a+n,"z")),a=null;return}if(u===o.length-1){if(!l)return;a===null?r.push("M".concat(u+n,",").concat(i+n," h1v1H").concat(u+n,"z")):r.push("M".concat(a+n,",").concat(i+n," h").concat(u+1-a,"v1H").concat(a+n,"z"));return}l&&a===null&&(a=u);});}),r.join("")},xH=function(t,n){return t.slice().map(function(r,o){return o<n.y||o>=n.y+n.h?r:r.map(function(i,a){return a<n.x||a>=n.x+n.w?i:false})})},upe=function(t,n,r,o){if(o==null)return null;var i=t.length+r*2,a=Math.floor(n*cpe),l=i/n,u=(o.width||a)*l,d=(o.height||a)*l,m=o.x==null?t.length/2-u/2:o.x*l,p=o.y==null?t.length/2-d/2:o.y*l,g=o.opacity==null?1:o.opacity,b=null;if(o.excavate){var y=Math.floor(m),S=Math.floor(p),C=Math.ceil(u+m-y),w=Math.ceil(d+p-S);b={x:y,y:S,w:C,h:w};}var $=o.crossOrigin;return {x:m,y:p,h:d,w:u,excavation:b,opacity:g,crossOrigin:$}},dpe=function(t,n){return n!=null?Math.max(Math.floor(n),0):t?spe:lpe},fpe=(function(){try{new Path2D().addPath(new Path2D);}catch{return false}return true})(),wH=function(t){var n=t.value,r=t.level,o=t.minVersion,i=t.includeMargin,a=t.marginSize,l=t.imageSettings,u=t.size,d=t.boostLevel,m=G.useMemo(function(){var p=Array.isArray(n)?n:[n],g=p.reduce(function(b,y){return b.push.apply(b,Yt(Jc.makeSegments(y))),b},[]);return Ls.encodeSegments(g,ape[r],o,void 0,void 0,d)},[n,r,o,d]);return G.useMemo(function(){var p=m.getModules(),g=dpe(i,a),b=p.length+g*2,y=upe(p,u,g,l);return {cells:p,margin:g,numCells:b,calculatedImageSettings:y,qrcode:m}},[m,u,l,i,a])},mpe=["value","size","level","bgColor","fgColor","includeMargin","minVersion","marginSize","style","imageSettings","boostLevel"],hpe=G.forwardRef(function(e,t){var n=e.value,r=e.size,o=r===void 0?pH:r,i=e.level,a=i===void 0?gH:i,l=e.bgColor,u=l===void 0?vH:l,d=e.fgColor,m=d===void 0?bH:d,p=e.includeMargin,g=p===void 0?yH:p,b=e.minVersion,y=b===void 0?SH:b,S=e.marginSize,C=e.style,w=e.imageSettings,$=e.boostLevel,M=TF(e,mpe),T=w?.src,R=G.useRef(null),I=G.useRef(null),N=G.useCallback(function(W){R.current=W,typeof t=="function"?t(W):t&&(t.current=W);},[t]),P=G.useState(false),O=kM(P,2),_=O[1],L=wH({value:n,level:a,minVersion:y,includeMargin:g,marginSize:S,imageSettings:w,size:o,boostLevel:$}),j=L.margin,U=L.cells,q=L.numCells,V=L.calculatedImageSettings;G.useEffect(function(){if(R.current){var W=R.current,K=W.getContext("2d");if(!K)return;var Q=U,D=I.current,z=V!=null&&D!==null&&D.complete&&D.naturalHeight!==0&&D.naturalWidth!==0;z&&V.excavation!=null&&(Q=xH(U,V.excavation));var Y=window.devicePixelRatio||1;W.height=W.width=o*Y;var ee=o/q*Y;K.scale(ee,ee),K.fillStyle=u,K.fillRect(0,0,q,q),K.fillStyle=m,fpe?K.fill(new Path2D(CH(Q,j))):U.forEach(function(J,te){J.forEach(function(ne,se){ne&&K.fillRect(se+j,te+j,1,1);});}),V&&(K.globalAlpha=V.opacity),z&&K.drawImage(D,V.x+j,V.y+j,V.w,V.h);}}),G.useEffect(function(){_(false);},[T]);var B=Jn({height:o,width:o},C),F=null;return T!=null&&(F=G.createElement("img",{alt:"QR-Code",src:T,key:T,style:{display:"none"},onLoad:function(){_(true);},ref:I,crossOrigin:V?.crossOrigin})),G.createElement(G.Fragment,null,G.createElement("canvas",ir({style:B,height:o,width:o,ref:N,role:"img"},M)),F)}),ppe=["value","size","level","bgColor","fgColor","includeMargin","minVersion","title","marginSize","imageSettings","boostLevel"],gpe=G.forwardRef(function(e,t){var n=e.value,r=e.size,o=r===void 0?pH:r,i=e.level,a=i===void 0?gH:i,l=e.bgColor,u=l===void 0?vH:l,d=e.fgColor,m=d===void 0?bH:d,p=e.includeMargin,g=p===void 0?yH:p,b=e.minVersion,y=b===void 0?SH:b,S=e.title,C=e.marginSize,w=e.imageSettings,$=e.boostLevel,M=TF(e,ppe),T=wH({value:n,level:a,minVersion:y,includeMargin:g,marginSize:C,imageSettings:w,size:o,boostLevel:$}),R=T.margin,I=T.cells,N=T.numCells,P=T.calculatedImageSettings,O=I,_=null;w!=null&&P!=null&&(P.excavation!=null&&(O=xH(I,P.excavation)),_=G.createElement("image",{href:w.src,height:P.h,width:P.w,x:P.x+R,y:P.y+R,preserveAspectRatio:"none",opacity:P.opacity,crossOrigin:P.crossOrigin}));var L=CH(O,R);return G.createElement("svg",ir({height:o,width:o,viewBox:"0 0 ".concat(N," ").concat(N),ref:t,role:"img"},M),!!S&&G.createElement("title",null,S),G.createElement("path",{fill:u,d:"M0,0 h".concat(N,"v").concat(N,"H0z"),shapeRendering:"crispEdges"}),G.createElement("path",{fill:m,d:L,shapeRendering:"crispEdges"}),_)}),vpe={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 QE(){return QE=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},QE.apply(this,arguments)}const bpe=(e,t)=>f.createElement(Kn,QE({},e,{ref:t,icon:vpe})),ype=f.forwardRef(bpe),Spe=G.createElement(g1,null);function Cpe({prefixCls:e,locale:t,onRefresh:n,statusRender:r,status:o}){const i=G.createElement(G.Fragment,null,G.createElement("p",{className:`${e}-expired`},t?.expired),n&&G.createElement(ut,{type:"link",icon:G.createElement(ype,null),onClick:n},t?.refresh)),a=G.createElement("p",{className:`${e}-scanned`},t?.scanned),l={expired:i,loading:Spe,scanned:a};return (r??(m=>l[m.status]))({status:o,locale:t,onRefresh:n})}const xpe=e=>{const{componentCls:t,lineWidth:n,lineType:r,colorSplit:o}=e;return {[t]:{...un(e),display:"flex",justifyContent:"center",alignItems:"center",padding:e.paddingSM,backgroundColor:e.colorWhite,borderRadius:e.borderRadiusLG,border:`${oe(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}}},wpe=e=>({QRCodeCoverBackgroundColor:new cn(e.colorBgContainer).setA(.96).toRgbString()}),$pe=qt("QRCode",e=>{const t=Ft(e,{QRCodeTextColor:e.colorText});return xpe(t)},wpe),Epe=e=>{const[,t]=Fr(),{value:n,type:r="canvas",icon:o="",size:i=160,iconSize:a,color:l=t.colorText,errorLevel:u="M",status:d="active",bordered:m=true,onRefresh:p,style:g,className:b,rootClassName:y,prefixCls:S,bgColor:C="transparent",marginSize:w,statusRender:$,classNames:M,styles:T,boostLevel:R,...I}=e,{getPrefixCls:N,className:P,style:O,classNames:_,styles:L}=Gt("qrcode"),j={...e,bgColor:C,type:r,size:i,status:d,bordered:m,errorLevel:u},[U,q]=Xt([_,M],[L,T],{props:j}),V=N("qrcode",S),[B,F]=$pe(V),W={src:o,x:void 0,y:void 0,height:typeof a=="number"?a:a?.height??40,width:typeof a=="number"?a:a?.width??40,excavate:true,crossOrigin:"anonymous"},K=bo(I,true),Q=Bn(I,Object.keys(K)),D={value:n,size:i,level:u,bgColor:C,fgColor:l,style:{width:g?.width,height:g?.height},imageSettings:o?W:void 0,marginSize:w,boostLevel:R,...K},[z]=Oo("QRCode");if(!n)return null;const Y=X(V,b,y,B,F,P,U.root,{[`${V}-borderless`]:!m}),ee={backgroundColor:C,...q.root,...O,...g,width:g?.width??i,height:g?.height??i};return G.createElement("div",{...Q,className:Y,style:ee},d!=="active"&&G.createElement("div",{className:X(`${V}-cover`,U.cover),style:q.cover},G.createElement(Cpe,{prefixCls:V,locale:z,status:d,onRefresh:p,statusRender:$})),r==="canvas"?G.createElement(hpe,{...D}):G.createElement(gpe,{...D}))};function ZE(){return ZE=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},ZE.apply(this,arguments)}const $H=f.forwardRef(({prefixCls:e="rc-switch",className:t,checked:n,defaultChecked:r,disabled:o,loadingIcon:i,checkedChildren:a,unCheckedChildren:l,onClick:u,onChange:d,onKeyDown:m,styles:p,classNames:g,...b},y)=>{const[S,C]=hn(r??false,n);function w(R,I){let N=S;return o||(N=R,C(N),d?.(N,I)),N}function $(R){R.which===ot.LEFT?w(false,R):R.which===ot.RIGHT&&w(true,R),m?.(R);}function M(R){const I=w(!S,R);u?.(I,R);}const T=X(e,t,{[`${e}-checked`]:S,[`${e}-disabled`]:o});return f.createElement("button",ZE({},b,{type:"button",role:"switch","aria-checked":S,disabled:o,className:T,ref:y,onKeyDown:$,onClick:M}),i,f.createElement("span",{className:`${e}-inner`},f.createElement("span",{className:X(`${e}-inner-checked`,g?.content),style:p?.content},a),f.createElement("span",{className:X(`${e}-inner-unchecked`,g?.content),style:p?.content},l)))});$H.displayName="Switch";const Mpe=e=>{const{componentCls:t,trackHeightSM:n,trackPadding:r,trackMinWidthSM:o,innerMinMarginSM:i,innerMaxMarginSM:a,handleSizeSM:l,calc:u}=e,d=`${t}-inner`,m=oe(u(l).add(u(r).mul(2)).equal()),p=oe(u(a).mul(2).equal());return {[t]:{[`&${t}-small`]:{minWidth:o,height:n,lineHeight:oe(n),[`${t}-inner`]:{paddingInlineStart:a,paddingInlineEnd:i,[`${d}-checked, ${d}-unchecked`]:{minHeight:n},[`${d}-checked`]:{marginInlineStart:`calc(-100% + ${m} - ${p})`,marginInlineEnd:`calc(100% - ${m} + ${p})`},[`${d}-unchecked`]:{marginTop:u(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:l,height:l},[`${t}-loading-icon`]:{top:u(u(l).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:i,paddingInlineEnd:a,[`${d}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${d}-unchecked`]:{marginInlineStart:`calc(100% - ${m} + ${p})`,marginInlineEnd:`calc(-100% + ${m} - ${p})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${oe(u(l).add(r).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${d}`]:{[`${d}-unchecked`]:{marginInlineStart:u(e.marginXXS).div(2).equal(),marginInlineEnd:u(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${d}`]:{[`${d}-checked`]:{marginInlineStart:u(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:u(e.marginXXS).div(2).equal()}}}}}}},Rpe=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}}}},Tpe=e=>{const{componentCls:t,trackPadding:n,handleBg:r,handleShadow:o,handleSize:i,calc:a}=e,l=`${t}-handle`;return {[t]:{[l]:{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:a(i).div(2).equal(),boxShadow:o,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${l}`]:{insetInlineStart:`calc(100% - ${oe(a(i).add(n).equal())})`},[`&:not(${t}-disabled):active`]:{[`${l}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${l}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},Ape=e=>{const{componentCls:t,trackHeight:n,trackPadding:r,innerMinMargin:o,innerMaxMargin:i,handleSize:a,calc:l}=e,u=`${t}-inner`,d=oe(l(a).add(l(r).mul(2)).equal()),m=oe(l(i).mul(2).equal());return {[t]:{[u]:{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`,[`${u}-checked, ${u}-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},[`${u}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${m})`,marginInlineEnd:`calc(100% - ${d} + ${m})`},[`${u}-unchecked`]:{marginTop:l(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${u}`]:{paddingInlineStart:o,paddingInlineEnd:i,[`${u}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${u}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${m})`,marginInlineEnd:`calc(-100% + ${d} - ${m})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${u}`]:{[`${u}-unchecked`]:{marginInlineStart:l(r).mul(2).equal(),marginInlineEnd:l(r).mul(-1).mul(2).equal()}},[`&${t}-checked ${u}`]:{[`${u}-checked`]:{marginInlineStart:l(r).mul(-1).mul(2).equal(),marginInlineEnd:l(r).mul(2).equal()}}}}}},Npe=e=>{const{componentCls:t,trackHeight:n,trackMinWidth:r}=e;return {[t]:{...un(e),position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:r,height:n,lineHeight:oe(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},...$i(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"}}}},Ppe=e=>{const{fontSize:t,lineHeight:n,controlHeight:r,colorWhite:o}=e,i=t*n,a=r/2,l=2,u=i-l*2,d=a-l*2;return {trackHeight:i,trackHeightSM:a,trackMinWidth:u*2+l*4,trackMinWidthSM:d*2+l*2,trackPadding:l,handleBg:o,handleSize:u,handleSizeSM:d,handleShadow:`0 2px 4px 0 ${new cn("#00230b").setA(.2).toRgbString()}`,innerMinMargin:u/2,innerMaxMargin:u+l+l*2,innerMinMarginSM:d/2,innerMaxMarginSM:d+l+l*2}},Ipe=qt("Switch",e=>{const t=Ft(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 [Npe(t),Ape(t),Tpe(t),Rpe(t),Mpe(t)]},Ppe),Ope=f.forwardRef((e,t)=>{const{prefixCls:n,size:r,disabled:o,loading:i,className:a,rootClassName:l,style:u,checked:d,value:m,defaultChecked:p,defaultValue:g,onChange:b,styles:y,classNames:S,...C}=e,[w,$]=hn(p??g??false,d??m),{getPrefixCls:M,direction:T,className:R,style:I,classNames:N,styles:P}=Gt("switch"),O=f.useContext(to),_=(o??O)||i,L=M("switch",n),j=f.createElement("div",{className:`${L}-handle`},i&&f.createElement(Jy,{className:`${L}-loading-icon`})),[U,q]=Ipe(L),V=ao(r),B={...e,size:V,disabled:_},[F,W]=Xt([N,S],[P,y],{props:B}),K=X(R,{[`${L}-small`]:V==="small",[`${L}-loading`]:i,[`${L}-rtl`]:T==="rtl"},a,l,F.root,U,q),Q={...W.root,...I,...u},D=(...z)=>{$(z[0]),b?.(...z);};return f.createElement(Xp,{component:"Switch",disabled:_},f.createElement($H,{...C,classNames:F,styles:W,checked:w,onChange:D,prefixCls:L,className:K,style:Q,disabled:_,ref:t,loadingIcon:j}))}),EH=Ope;EH.__ANT_SWITCH=true;const Dpe=e=>{const{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:o,calc:i}=e,a=i(r).sub(n).equal(),l=i(t).sub(n).equal();return {[o]:{...un(e),display:"inline-block",height:"auto",paddingInline:a,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",backgroundColor:e.defaultBg,border:`${oe(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:l,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:a}},[`&${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}}}}},JR=e=>{const{lineWidth:t,fontSizeIcon:n,calc:r}=e,o=e.fontSizeSM;return Ft(e,{tagFontSize:o,tagLineHeight:oe(r(e.lineHeightSM).mul(o).equal()),tagIconSize:r(n).sub(r(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},eT=e=>{const t=mR(new Wo(e.colorBgSolid),"#fff")?"#000":"#fff";return {defaultBg:new cn(e.colorFillTertiary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText,solidTextColor:t}},tT=qt("Tag",e=>{const t=JR(e);return Dpe(t)},eT),MH=f.forwardRef((e,t)=>{const{prefixCls:n,style:r,className:o,checked:i,children:a,icon:l,onChange:u,onClick:d,disabled:m,...p}=e,{getPrefixCls:g,tag:b}=f.useContext(Ct),y=f.useContext(to),S=m??y,C=R=>{S||(u?.(!i),d?.(R));},w=g("tag",n),[$,M]=tT(w),T=X(w,`${w}-checkable`,{[`${w}-checkable-checked`]:i,[`${w}-checkable-disabled`]:S},b?.className,o,$,M);return f.createElement("span",{...p,ref:t,style:{...r,...b?.style},className:T,onClick:C},l,f.createElement("span",null,a))});function _pe(e,t){const{id:n,prefixCls:r,rootClassName:o,className:i,style:a,classNames:l,styles:u,disabled:d,options:m,value:p,defaultValue:g,onChange:b,multiple:y,...S}=e,{getPrefixCls:C,direction:w,className:$,style:M,classNames:T,styles:R}=Gt("tag"),I=C("tag",r),N=`${I}-checkable-group`,P=Yn(I),[O,_]=tT(I,P),[L,j]=Xt([T,l],[R,u],{props:e}),U=f.useMemo(()=>(m||[]).map(K=>K&&typeof K=="object"?K:{value:K,label:K}),[m]),[q,V]=hn(g,p),B=(K,Q)=>{let D=null;if(y){const z=q||[];D=K?[].concat(Yt(z),[Q.value]):z.filter(Y=>Y!==Q.value);}else D=K?Q.value:null;V(D),b?.(D);},F=G.useRef(null);f.useImperativeHandle(t,()=>({nativeElement:F.current}));const W=bo(S,{aria:true,data:true});return G.createElement("div",{...W,className:X(N,$,o,{[`${N}-disabled`]:d,[`${N}-rtl`]:w==="rtl"},O,_,i,L.root),style:{...M,...j.root,...a},id:n,ref:F},U.map(K=>G.createElement(MH,{key:K.value,className:X(`${N}-item`,L.item),style:j.item,checked:y?(q||[]).includes(K.value):q===K.value,onChange:Q=>B(Q,K),disabled:d},K.label)))}const Lpe=G.forwardRef(_pe);function zpe(e,t){const{color:n,variant:r,bordered:o}=e;return f.useMemo(()=>{const i=n?.endsWith("-inverse");let a;r?a=r:i?a="solid":o===false?a="filled":a=t||"filled";const l=i?n?.replace("-inverse",""):n,u=s1(n),d=Yle(n),m={};if(!u&&!d&&l)if(a==="solid")m.backgroundColor=n;else {const p=new cn(l).toHsl();p.l=.95,m.backgroundColor=new cn(p).toHexString(),m.color=n,a==="outlined"&&(m.borderColor=n);}return [a,l,u,d,m]},[n,r,o,t])}const Bpe=e=>Ky(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}}})),kpe=Tf(["Tag","preset"],e=>{const t=JR(e);return Bpe(t)},eT);function Fpe(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const fb=(e,t,n)=>{const r=Fpe(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}`]}}}},Hpe=Tf(["Tag","status"],e=>{const t=JR(e);return [fb(t,"success","Success"),fb(t,"processing","Info"),fb(t,"error","Error"),fb(t,"warning","Warning")]},eT),Vpe=f.forwardRef((e,t)=>{const{prefixCls:n,className:r,rootClassName:o,style:i,children:a,icon:l,color:u,variant:d,onClose:m,bordered:p,disabled:g,href:b,target:y,styles:S,classNames:C,...w}=e,{getPrefixCls:$,direction:M,className:T,variant:R,style:I,classNames:N,styles:P}=Gt("tag"),[O,_,L,j,U]=zpe(e,R),q=L||j,V=f.useContext(to),B=g??V,{tag:F}=f.useContext(Ct),[W,K]=f.useState(true),Q=Bn(w,["closeIcon","closable"]),D={...e,color:_,variant:O,disabled:B,href:b,target:y,icon:l},[z,Y]=Xt([N,C],[P,S],{props:D}),ee=f.useMemo(()=>{let ue={...Y.root,...I,...i};return B||(ue={...U,...ue}),ue},[Y.root,I,i,U,B]),J=$("tag",n),[te,ne]=tT(J),se=X(J,T,z.root,`${J}-${O}`,{[`${J}-${_}`]:q,[`${J}-hidden`]:!W,[`${J}-rtl`]:M==="rtl",[`${J}-disabled`]:B},r,o,te,ne),ae=ue=>{B||(ue.stopPropagation(),m?.(ue),!ue.defaultPrevented&&K(false));},[,re]=XM(Ll(e),Ll(F),{closable:false,closeIconRender:ue=>{const Se=f.createElement("span",{className:`${J}-close-icon`,onClick:ae},ue);return ok(ue,Se,ye=>({onClick:Be=>{ye?.onClick?.(Be),ae(Be);},className:X(ye?.className,`${J}-close-icon`)}))}}),de=typeof w.onClick=="function"||a&&a.type==="a",ge=kr(l,{className:X(f.isValidElement(l)?l.props?.className:"",z.icon),style:Y.icon}),ie=ge?f.createElement(f.Fragment,null,ge,a&&f.createElement("span",{className:z.content,style:Y.content},a)):a,Ee=b?"a":"span",le=f.createElement(Ee,{...Q,ref:t,className:se,style:ee,href:B?void 0:b,target:y,onClick:B?void 0:Q.onClick,...b&&B?{"aria-disabled":true}:{}},ie,re,L&&f.createElement(kpe,{key:"preset",prefixCls:J}),j&&f.createElement(Hpe,{key:"status",prefixCls:J}));return de?f.createElement(Xp,{component:"Tag"},le):le}),go=Vpe;go.CheckableTag=MH;go.CheckableTagGroup=Lpe;const jpe=e=>{const t=e?.algorithm?A0(e.algorithm):VM,n={...of,...e?.token};return Jz(n,{override:e?.token},t,CB)};function Upe(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 qpe=(e,t)=>{const n=t??Gy(e),r=n.fontSizeSM,o=n.controlHeight-4;return {...n,...Upe(t??e),...SB(r),controlHeight:o,...yB({...n,controlHeight:o})}},zi=(e,t)=>new cn(e).setA(t).toRgbString(),Tc=(e,t)=>new cn(e).lighten(t).toHexString(),Wpe=e=>{const t=Wp(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]}},Gpe=(e,t)=>{const n=e||"#000",r=t||"#fff";return {colorBgBase:n,colorTextBase:r,colorText:zi(r,.85),colorTextSecondary:zi(r,.65),colorTextTertiary:zi(r,.45),colorTextQuaternary:zi(r,.25),colorFill:zi(r,.18),colorFillSecondary:zi(r,.12),colorFillTertiary:zi(r,.08),colorFillQuaternary:zi(r,.04),colorBgSolid:zi(r,.95),colorBgSolidHover:zi(r,1),colorBgSolidActive:zi(r,.9),colorBgElevated:Tc(n,12),colorBgContainer:Tc(n,8),colorBgLayout:Tc(n,0),colorBgSpotlight:Tc(n,26),colorBgBlur:zi(r,.04),colorBorder:Tc(n,26),colorBorderDisabled:Tc(n,26),colorBorderSecondary:Tc(n,19)}},Kpe=(e,t)=>{const n=Object.keys(HM).map(i=>{const a=Wp(e[i],{theme:"dark"});return Array.from({length:10},()=>1).reduce((l,u,d)=>(l[`${i}-${d+1}`]=a[d],l[`${i}${d+1}`]=a[d],l),{})}).reduce((i,a)=>(i={...i,...a},i),{}),r=t??Gy(e),o=bB(e,{generateColorPalettes:Wpe,generateNeutralColorPalettes:Gpe});return {...r,...n,...o,colorPrimaryBg:o.colorPrimaryBorder,colorPrimaryBgHover:o.colorPrimaryBorderHover}};function Ype(){const[e,t,n,r]=Fr();return {theme:e,token:t,hashId:n,cssVar:r}}const iy={defaultSeed:lp.token,useToken:Ype,defaultAlgorithm:Gy,darkAlgorithm:Kpe,compactAlgorithm:qpe,getDesignToken:jpe,defaultConfig:lp,_internalContext:jM},ay=e=>{const t=new Map;return e.forEach((n,r)=>{t.set(n,r);}),t},Xpe=e=>{const t=new Map;return e.forEach(({disabled:n,key:r},o)=>{n&&t.set(r,o);}),t};function Qpe(e,t){const n=e==="right";return t!=="rtl"?n?G.createElement(sf,null):G.createElement(dp,null):n?G.createElement(dp,null):G.createElement(sf,null)}const k8=({type:e,actions:t,moveToLeft:n,moveToRight:r,leftActive:o,rightActive:i,direction:a,disabled:l})=>{const u=e==="right",d=u?t[0]:t[1],m=u?r:n,p=u?i:o,g=Qpe(e,a);if(G.isValidElement(d)){const b=d,y=S=>{b?.props?.onClick?.(S),m?.(S);};return G.cloneElement(b,{disabled:l||!p,onClick:y})}return G.createElement(ut,{type:"primary",size:"small",disabled:l||!p,onClick:b=>m?.(b),icon:g},d)},RH=e=>{const{className:t,style:n,oneWay:r,actions:o,...i}=e;return G.createElement("div",{className:t,style:n},G.createElement(k8,{type:"right",actions:o,...i}),!r&&G.createElement(k8,{type:"left",actions:o,...i}),o.slice(r?1:2))},Zpe=(e,t,n)=>{const r=f.useMemo(()=>(e||[]).map(a=>t?{...a,key:t(a)}:a),[e,t]),[o,i]=f.useMemo(()=>{const a=[],l=Array.from({length:n?.length??0}),u=ay(n||[]);return r.forEach(d=>{if(u.has(d.key)){const m=u.get(d.key);l[m]=d;}else a.push(d);}),[a,l]},[r,n]);return [r,o.filter(Boolean),i.filter(Boolean)]},Jpe=[];function mb(e,t){const n=e.filter(r=>t.has(r));return e.length===n.length?e:n}function F8(e){return Array.from(e).join(";")}function ege(e,t,n){const[r,o]=f.useMemo(()=>[new Set(e.map(p=>p?.key)),new Set(t.map(p=>p?.key))],[e,t]),[i,a]=hn(Jpe,n),l=f.useMemo(()=>mb(i,r),[i,r]),u=f.useMemo(()=>mb(i,o),[i,o]);f.useEffect(()=>{a([].concat(Yt(mb(i,r)),Yt(mb(i,o))));},[F8(r),F8(o)]);const d=Et(p=>{a([].concat(Yt(p),Yt(u)));}),m=Et(p=>{a([].concat(Yt(l),Yt(p)));});return [l,u,d,m]}const TH=e=>{const{placeholder:t="",value:n,prefixCls:r,disabled:o,onChange:i,handleClear:a}=e,l=f.useCallback(u=>{i?.(u),u.target.value===""&&a?.();},[i]);return f.createElement(zf,{placeholder:t,className:r,value:n,onChange:l,disabled:o,allowClear:true,prefix:f.createElement(RR,null)})};var tge={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 JE(){return JE=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},JE.apply(this,arguments)}const nge=(e,t)=>f.createElement(Kn,JE({},e,{ref:t,icon:tge})),rge=f.forwardRef(nge),oge=e=>{const{prefixCls:t,classNames:n,styles:r,renderedText:o,renderedEl:i,item:a,checked:l,disabled:u,onClick:d,onRemove:m,showRemove:p}=e,g=u||a?.disabled,b=X(`${t}-content-item`,n.item,{[`${t}-content-item-disabled`]:g,[`${t}-content-item-checked`]:l&&!g});let y;(typeof o=="string"||typeof o=="number")&&(y=String(o));const[S]=Oo("Transfer",ya.Transfer),C={className:b,style:r.item,title:y},w=f.createElement("span",{className:X(`${t}-content-item-text`,n.itemContent),style:r.itemContent},i);return p?f.createElement("li",{...C},w,f.createElement("button",{type:"button",disabled:g,className:`${t}-content-item-remove`,"aria-label":S?.remove,onClick:()=>m?.(a)},f.createElement(rge,null))):(C.onClick=g?void 0:$=>d(a,$),f.createElement("li",{...C},f.createElement(Ki,{className:X(`${t}-checkbox`,n.itemIcon),style:r.itemIcon,checked:l,disabled:g}),w))},ige=f.memo(oge),age=["handleFilter","handleClear","checkedKeys"],sge=e=>({...{simple:true,showSizeChanger:false,showLessItems:false},...e}),lge=(e,t)=>{const{prefixCls:n,classNames:r,styles:o,filteredRenderItems:i,selectedKeys:a,disabled:l,showRemove:u,pagination:d,onScroll:m,onItemSelect:p,onItemRemove:g}=e,[b,y]=f.useState(1),S=f.useMemo(()=>d?sge(typeof d=="object"?d:{}):null,[d]),[C,w]=hn(10,S?.pageSize);f.useEffect(()=>{if(S){const P=Math.ceil(i.length/C);y(Math.min(b,P));}},[i,S,C]);const $=(P,O)=>{p(P.key,!a.includes(P.key),O);},M=P=>{g?.([P.key]);},T=P=>{y(P);},R=(P,O)=>{y(P),w(O);},I=f.useMemo(()=>S?i.slice((b-1)*C,b*C):i,[b,i,S,C]);f.useImperativeHandle(t,()=>({items:I}));const N=S?f.createElement(The,{size:"small",disabled:l,simple:S.simple,pageSize:C,showLessItems:S.showLessItems,showSizeChanger:S.showSizeChanger,className:`${n}-pagination`,total:i.length,current:b,onChange:T,onShowSizeChange:R}):null;return f.createElement(f.Fragment,null,f.createElement("ul",{className:X(`${n}-content`,r.list,{[`${n}-content-show-remove`]:u}),style:o.list,onScroll:m},(I||[]).map(({renderedEl:P,renderedText:O,item:_})=>f.createElement(ige,{key:_.key,prefixCls:n,classNames:r,styles:o,item:_,renderedText:O,renderedEl:P,showRemove:u,onClick:$,onRemove:M,checked:a.includes(_.key),disabled:l}))),N)},cge=f.forwardRef(lge),uge=()=>null;function dge(e){return !!(e&&!G.isValidElement(e)&&Object.prototype.toString.call(e)==="[object Object]")}function Jm(e){return e.filter(t=>!t.disabled).map(t=>t.key)}const fge=e=>e!==void 0,mge=e=>e&&typeof e=="object"?{...e,defaultValue:e.defaultValue||""}:{defaultValue:"",placeholder:""},e3=e=>{const{prefixCls:t,style:n,classNames:r,styles:o,dataSource:i=[],titleText:a="",checkedKeys:l,disabled:u,showSearch:d=false,searchPlaceholder:m,notFoundContent:p,selectAll:g,deselectAll:b,selectCurrent:y,selectInvert:S,removeAll:C,removeCurrent:w,showSelectAll:$=true,showRemove:M,pagination:T,direction:R,itemsUnit:I,itemUnit:N,selectAllLabel:P,selectionsIcon:O,footer:_,renderList:L,onItemSelectAll:j,onItemRemove:U,handleFilter:q,handleClear:V,filterOption:B,render:F=uge}=e,W=`${t}-section`,K=`${t}-list`,Q=mge(d),[D,z]=f.useState(Q.defaultValue),Y=f.useRef({}),ee=fe=>{z(fe.target.value),q(fe);},J=()=>{z(""),V();},te=(fe,be)=>typeof B=="function"?B(D,be,R):fe.includes(D),ne=fe=>{let be=L?L({...fe,onItemSelect:(qe,Qe)=>fe.onItemSelect(qe,Qe)}):null;const Re=!!be;return Re||(be=G.createElement(cge,{ref:Y,...fe,prefixCls:K})),{customize:Re,bodyContent:be}},se=fe=>{const be=F(fe),Re=dge(be);return {item:fe,renderedEl:Re?be.label:be,renderedText:Re?be.value:be}},ae=f.useMemo(()=>Array.isArray(p)?p[R==="left"?0:1]:p,[p,R]),[re,de]=f.useMemo(()=>{const fe=[],be=[];return i.forEach(Re=>{const qe=se(Re);D&&!te(qe.renderedText,Re)||(fe.push(Re),be.push(qe));}),[fe,be]},[i,D]),ge=f.useMemo(()=>re.filter(fe=>l.includes(fe.key)&&!fe.disabled),[l,re]),ie=f.useMemo(()=>{if(ge.length===0)return "none";const fe=ay(l);return re.every(be=>fe.has(be.key)||!!be.disabled)?"all":"part"},[ge.length,l,re]),Ee=()=>{const fe=d?G.createElement("div",{className:`${K}-body-search-wrapper`},G.createElement(TH,{prefixCls:`${K}-search`,onChange:ee,handleClear:J,placeholder:Q.placeholder||m,value:D,disabled:u})):null,{customize:be,bodyContent:Re}=ne({...Bn(e,age),filteredItems:re,filteredRenderItems:de,selectedKeys:l,classNames:r,styles:o});let qe;return be?qe=G.createElement("div",{className:`${K}-body-customize-wrapper`},Re):qe=re.length?Re:G.createElement("div",{className:`${K}-body-not-found`},ae),G.createElement("div",{className:X(`${K}-body`,{[`${K}-body-with-search`]:d},r.body),style:o.body},fe,qe)},le=G.createElement(Ki,{disabled:i.filter(fe=>!fe.disabled).length===0||u,checked:ie==="all",indeterminate:ie==="part",className:`${K}-checkbox`,onChange:()=>{j?.(re.filter(fe=>!fe.disabled).map(({key:fe})=>fe),ie!=="all");}}),ue=(fe,be)=>{if(P)return typeof P=="function"?P({selectedCount:fe,totalCount:be}):P;const Re=be>1?I:N;return G.createElement(G.Fragment,null,(fe>0?`${fe}/`:"")+be," ",Re)},Se=_&&(_.length<2?_(e):_(e,{direction:R})),ye=Se?G.createElement("div",{className:X(`${K}-footer`,r.footer),style:o.footer},Se):null,Be=!M&&!T&≤let je;M?je=[T?{key:"removeCurrent",label:w,onClick(){const fe=Jm((Y.current?.items||[]).map(be=>be.item));U?.(fe);}}:null,{key:"removeAll",label:C,onClick(){U?.(Jm(re));}}].filter(Boolean):je=[{key:"selectAll",label:ie==="all"?b:g,onClick(){const fe=Jm(re);j?.(fe,fe.length!==l.length);}},T?{key:"selectCurrent",label:y,onClick(){const fe=Y.current?.items||[];j?.(Jm(fe.map(be=>be.item)),true);}}:null,{key:"selectInvert",label:S,onClick(){const fe=Jm((Y.current?.items||[]).map(qe=>qe.item)),be=new Set(l),Re=new Set(be);fe.forEach(qe=>{be.has(qe)?Re.delete(qe):Re.add(qe);}),j?.(Array.from(Re),"replace");}}];const Ne=G.createElement(tc,{className:`${K}-header-dropdown`,menu:{items:je},disabled:u},fge(O)?O:G.createElement(MR,null));return G.createElement("div",{className:X(W,r.section,{[`${W}-with-pagination`]:!!T,[`${W}-with-footer`]:!!Se}),style:{...n,...o.section}},G.createElement("div",{className:X(`${K}-header`,r.header),style:o.header},$?G.createElement(G.Fragment,null,Be,Ne):null,G.createElement("span",{className:`${K}-header-selected`},ue(ge.length,re.length)),G.createElement("span",{className:X(`${K}-header-title`,r.title),style:o.title},a)),Ee(),ye)},hge=e=>{const{antCls:t,componentCls:n,listHeight:r,controlHeightLG:o}=e,i=`${t}-table`,a=`${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}},[`${a}[disabled]`]:{backgroundColor:"transparent"}}}},H8=(e,t)=>{const{componentCls:n,colorBorder:r}=e;return {[`${n}-section`]:{borderColor:t,[`${n}-list-search:not([disabled])`]:{borderColor:r}}}},pge=e=>{const{componentCls:t}=e;return {[`${t}-status-error`]:{...H8(e,e.colorError)},[`${t}-status-warning`]:{...H8(e,e.colorWarning)}}},gge=e=>{const{componentCls:t,colorBorder:n,colorSplit:r,lineWidth:o,itemHeight:i,headerHeight:a,transferHeaderVerticalPadding:l,itemPaddingBlock:u,controlItemBgActive:d,colorTextDisabled:m,colorTextSecondary:p,listHeight:g,listWidth:b,listWidthLG:y,fontSizeIcon:S,marginXS:C,paddingSM:w,lineType:$,antCls:M,iconCls:T,motionDurationSlow:R,controlItemBgHover:I,borderRadiusLG:N,colorBgContainer:P,colorText:O,controlItemBgActiveHover:_}=e,L=oe(e.calc(N).sub(o).equal());return {display:"flex",flexDirection:"column",width:b,height:g,border:`${oe(o)} ${$} ${n}`,borderRadius:e.borderRadiusLG,"&-with-pagination":{width:y,height:"auto"},[`${t}-list`]:{"&-search":{[`${T}-search`]:{color:m}},"&-header":{display:"flex",flex:"none",alignItems:"center",height:a,padding:`${oe(e.calc(l).sub(o).equal())} ${oe(w)} ${oe(l)}`,color:O,background:P,borderBottom:`${oe(o)} ${$} ${r}`,borderRadius:`${oe(N)} ${oe(N)} 0 0`,"> *:not(:last-child)":{marginInlineEnd:4},"> *":{flex:"none"},"&-title":{...qa,flex:"0 1 auto",textAlign:"end",marginInlineStart:"auto"},"&-dropdown":{...Su(),fontSize:S,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:w}},"&-content":{flex:"auto",margin:0,padding:0,overflow:"auto",listStyle:"none",borderRadius:`0 0 ${L} ${L}`,"&-item":{display:"flex",alignItems:"center",minHeight:i,padding:`${oe(u)} ${oe(w)}`,transition:`all ${R}`,"> *:not(:last-child)":{marginInlineEnd:C},"> *":{flex:"none"},"&-text":{...qa,flex:"auto"},"&-remove":{...Vee(e),color:n,"&:hover, &:focus":{color:p}},[`&:not(${t}-list-content-item-disabled)`]:{"&:hover":{backgroundColor:I,cursor:"pointer"},[`&${t}-list-content-item-checked:hover`]:{backgroundColor:_}},"&-checked":{backgroundColor:d},"&-disabled":{color:m,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:`${oe(o)} ${$} ${r}`,[`${M}-pagination-options`]:{paddingInlineEnd:e.paddingXS}},"&-body-not-found":{flex:"none",width:"100%",margin:"auto 0",color:m,textAlign:"center"},"&-footer":{borderTop:`${oe(o)} ${$} ${r}`},"&-checkbox":{lineHeight:1}}}},vge=e=>{const{antCls:t,iconCls:n,componentCls:r,marginXS:o,marginXXS:i,fontSizeIcon:a,colorBgContainerDisabled:l}=e;return {[r]:{...un(e),position:"relative",display:"flex",alignItems:"stretch",[`${r}-disabled`]:{[`${r}-section`]:{background:l}},[`${r}-section`]:gge(e),[`${r}-actions`]:{display:"flex",flex:"none",flexDirection:"column",alignSelf:"center",margin:`0 ${oe(o)}`,verticalAlign:"middle",gap:i,[`${t}-btn ${n}`]:{fontSize:a}}}}},bge=e=>{const{componentCls:t}=e;return {[`${t}-rtl`]:{direction:"rtl"}}},yge=e=>{const{fontSize:t,lineHeight:n,controlHeight:r,controlHeightLG:o,lineWidth:i}=e,a=Math.round(t*n);return {listWidth:180,listHeight:200,listWidthLG:250,headerHeight:o,itemHeight:r,itemPaddingBlock:(r-a)/2,transferHeaderVerticalPadding:Math.ceil((o-i-a)/2)}},Sge=qt("Transfer",e=>{const t=Ft(e);return [vge(t),hge(t),pge(t),bge(t)]},yge),b1=e=>{const{prefixCls:t,className:n,rootClassName:r,classNames:o,styles:i,style:a,listStyle:l,operationStyle:u,operations:d,actions:m,dataSource:p,targetKeys:g=[],selectedKeys:b,selectAllLabels:y=[],locale:S={},titles:C,disabled:w,showSearch:$=false,showSelectAll:M,oneWay:T,pagination:R,status:I,selectionsIcon:N,filterOption:P,render:O,footer:_,children:L,rowKey:j,onScroll:U,onChange:q,onSearch:V,onSelectChange:B}=e,{getPrefixCls:F,renderEmpty:W,direction:K,className:Q,style:D,classNames:z,styles:Y,selectionsIcon:ee}=Gt("transfer"),J=f.useContext(to),te=w??J,ne={...e,disabled:te},se=F("transfer",t),[ae,re]=Sge(se),de=m||d||[],[ge,ie,Ee]=Zpe(p,j,g),[le,ue,Se,ye]=ege(ie,Ee,b),[Be,je]=SI(Pe=>Pe.key),[Ne,fe]=SI(Pe=>Pe.key),be=f.useCallback((Pe,Ue)=>{if(Pe==="left"){const ct=typeof Ue=="function"?Ue(le||[]):Ue;Se(ct);}else {const ct=typeof Ue=="function"?Ue(ue||[]):Ue;ye(ct);}},[le,ue]),Re=(Pe,Ue)=>{(Pe==="left"?je:fe)(Ue);},qe=f.useCallback((Pe,Ue)=>{Pe==="left"?B?.(Ue,ue):B?.(le,Ue);},[le,ue]),Qe=Pe=>C??Pe.titles??[],We=Pe=>{U?.("left",Pe);},tt=Pe=>{U?.("right",Pe);},rt=Pe=>{const Ue=Pe==="right"?le:ue,ct=Xpe(ge),Rt=Ue.filter(yn=>!ct.has(yn)),_t=ay(Rt),en=Pe==="right"?Rt.concat(g):g.filter(yn=>!_t.has(yn)),dn=Pe==="right"?"left":"right";be(dn,[]),qe(dn,[]),q?.(en,Pe,Rt);},Ze=()=>{rt("left"),Re("left",null);},Oe=()=>{rt("right"),Re("right",null);},Ye=(Pe,Ue,ct)=>{be(Pe,Rt=>{let _t=[];if(ct==="replace")_t=Ue;else if(ct)_t=Array.from(new Set([].concat(Yt(Rt),Yt(Ue))));else {const en=ay(Ue);_t=Rt.filter(dn=>!en.has(dn));}return qe(Pe,_t),_t}),Re(Pe,null);},Ke=(Pe,Ue)=>{Ye("left",Pe,Ue);},_e=(Pe,Ue)=>{Ye("right",Pe,Ue);},ke=Pe=>V?.("left",Pe.target.value),lt=Pe=>V?.("right",Pe.target.value),At=()=>V?.("left",""),dt=()=>V?.("right",""),Dt=(Pe,Ue,ct,Rt,_t)=>{Ue.has(ct)&&(Ue.delete(ct),Re(Pe,null)),Rt&&(Ue.add(ct),Re(Pe,_t));},Tt=(Pe,Ue,ct,Rt)=>{(Pe==="left"?Be:Ne)(Rt,Ue,ct);},xt=(Pe,Ue,ct,Rt)=>{const _t=Pe==="left",en=Yt(_t?le:ue),dn=new Set(en),yn=Yt(_t?ie:Ee).filter(In=>!In?.disabled),lr=yn.findIndex(In=>In.key===Ue);Rt&&en.length>0?Tt(Pe,yn,dn,lr):Dt(Pe,dn,Ue,ct,lr);const lo=Array.from(dn);qe(Pe,lo),e.selectedKeys||be(Pe,lo);},gt=(Pe,Ue,ct)=>{xt("left",Pe,Ue,ct?.shiftKey);},ft=(Pe,Ue,ct)=>{xt("right",Pe,Ue,ct?.shiftKey);},st=Pe=>{be("right",[]),q?.(g.filter(Ue=>!Pe.includes(Ue)),"left",Yt(Pe));},He=Pe=>typeof l=="function"?l({direction:Pe}):l||{},Ge=f.useContext(yo),{hasFeedback:ve,status:Te}=Ge,Ce=Pe=>({...Pe,notFoundContent:W?.("Transfer")||G.createElement(I7,{componentName:"Transfer"}),...S}),he=If(Te,I),Ie=!L&&R,we=Ee.filter(Pe=>ue.includes(Pe.key)&&!Pe.disabled).length>0,Le=ie.filter(Pe=>le.includes(Pe.key)&&!Pe.disabled).length>0,[Xe,it]=Xt([z,o],[Y,i],{props:ne}),mt=X(se,{[`${se}-disabled`]:te,[`${se}-customize-list`]:!!L,[`${se}-rtl`]:K==="rtl"},Fl(se,he,ve),Q,n,r,ae,re,Xe.root),[wt]=Oo("Transfer",ya.Transfer),Mt=Ce(wt),[Bt,En]=Qe(Mt),Ht=N??ee;return G.createElement("div",{className:mt,style:{...D,...it.root,...a}},G.createElement(e3,{prefixCls:se,style:He("left"),classNames:Xe,styles:it,titleText:Bt,dataSource:ie,filterOption:P,checkedKeys:le,handleFilter:ke,handleClear:At,onItemSelect:gt,onItemSelectAll:Ke,render:O,showSearch:$,renderList:L,footer:_,onScroll:We,disabled:te,direction:K==="rtl"?"right":"left",showSelectAll:M,selectAllLabel:y[0],pagination:Ie,selectionsIcon:Ht,...Mt}),G.createElement(RH,{className:X(`${se}-actions`,Xe.actions),rightActive:Le,moveToRight:Oe,leftActive:we,actions:de,moveToLeft:Ze,style:{...u,...it.actions},disabled:te,direction:K,oneWay:T}),G.createElement(e3,{prefixCls:se,style:He("right"),classNames:Xe,styles:it,titleText:En,dataSource:Ee,filterOption:P,checkedKeys:ue,handleFilter:lt,handleClear:dt,onItemSelect:ft,onItemSelectAll:_e,onItemRemove:st,render:O,showSearch:$,renderList:L,footer:_,onScroll:tt,disabled:te,direction:K==="rtl"?"left":"right",showSelectAll:M,selectAllLabel:y[1],showRemove:T,pagination:Ie,selectionsIcon:Ht,...Mt}))};b1.List=e3;b1.Search=TH;b1.Operation=RH;const{proxyStateMap:Cge}=yM(),xge=e=>Cge.has(e),t3=new Set;CQ("createHandler",e=>(...t)=>{const n=e(...t),r=n.get||((o,i,a)=>Reflect.get(o,i,a));return n.get=(o,i,a)=>{for(const l of t3)l(o,i,a);return r(o,i,a)},n});const sw=[],wge=e=>{sw.length?sw[sw.length-1].add(e):e();};function $ge(e){const t=new Map,n=new Map,r=(u,d)=>Array.from(d).some(([m,p])=>{const g=u[m],b=n.get(g);if(b)return r(g,b);if(!Object.is(g,p[0]))return true;const y=a5(g),S=p[1];return typeof y=="number"&&typeof S=="number"?y!==S:false}),o=()=>{Array.from(n).some(([u,d])=>r(u,d))&&a();},i=()=>{for(const[u,d]of t)n.has(u)||(d(),t.delete(u));for(const u of n.keys())if(!t.has(u)){const d=Ya(u,()=>wge(o),true);t.set(u,d);}},a=()=>{n.clear();const u=(d,m,p)=>{if(!xge(p))return;let g=n.get(p);g||(g=new Map,n.set(p,g));const b=Reflect.get(d,m,p);g.set(m,[b,a5(b)]);};t3.add(u);try{e();}finally{t3.delete(u),i();}};return a(),()=>{for(const u of t.values())u();t.clear(),n.clear();}}function Ege(e,t){const n=$ge(e);return ()=>{n();}}function uf(e,t,n){return e<t?t:e>n?n:e}function Mge(e){return e.value}var nT=class AH{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(a=>a&&a.toString().trim()).filter(Boolean).join("."));return new AH(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=Mge(n);try{return await t(r)}finally{this.idleState.set(n,true),setTimeout(()=>this.replenish(n));}}};async function Vl(e,t,n){if(!e.length)return [];n=Math.min(n,e.length);const r=nT.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 rT(e){const t=nT.fromConcurrency(e,"pLimit");return function(r,...o){return t.dispatch(()=>r(...o))}}var NH=Rge;function Rge(e,t){const n=nT.fromConcurrency(t,"createLimitedVersionOfFn");return function(...o){return n.dispatch(()=>e(...o))}}function oT(e,t,n,r){let o=e[t];return Ya(e,()=>{const i=e[t];Object.is(o,i)||n(o=i);},r)}const{proxyStateMap:Tge,snapCache:Age}=yM(),hb=e=>Tge.has(e);function PH(e){const t=[];let n=0;const r=new Map,o=new WeakMap,i=()=>{const d=Age.get(l),m=d?.[1];if(m&&!o.has(m)){const p=new Map(r);o.set(m,p);}},a=d=>o.get(d)||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[d,m]of e)r.set(d,n),t[n++]=m;}const l={data:t,index:n,epoch:0,get size(){return hb(this)||i(),a(this).size},get(d){const p=a(this).get(d);if(p===void 0){this.epoch;return}return this.data[p]},has(d){const m=a(this);return this.epoch,m.has(d)},set(d,m){if(!hb(this))throw new Error("Cannot perform mutations on a snapshot");const p=r.get(d);return p===void 0?(r.set(d,this.index),this.data[this.index++]=m):this.data[p]=m,this.epoch++,this},delete(d){if(!hb(this))throw new Error("Cannot perform mutations on a snapshot");const m=r.get(d);return m===void 0?false:(delete this.data[m],r.delete(d),this.epoch++,true)},clear(){if(!hb(this))throw new Error("Cannot perform mutations on a snapshot");this.data.length=0,this.index=0,this.epoch++,r.clear();},forEach(d){this.epoch,a(this).forEach((p,g)=>{d(this.data[p],g,this);});},*entries(){this.epoch;const d=a(this);for(const[m,p]of d)yield [m,this.data[p]];},*keys(){this.epoch;const d=a(this);for(const m of d.keys())yield m;},*values(){this.epoch;const d=a(this);for(const m of d.values())yield this.data[m];},[Symbol.iterator](){return this.entries()},get[Symbol.toStringTag](){return "Map"},toJSON(){return new Map(this.entries())}},u=kn(l);return Object.defineProperties(u,{size:{enumerable:false},index:{enumerable:false},epoch:{enumerable:false},data:{enumerable:false},toJSON:{enumerable:false}}),Object.seal(u),u}const{proxyStateMap:Nge,snapCache:Pge}=yM(),pb=e=>typeof e=="object"?kn({x:e}).x:e,gb=e=>Nge.has(e);function Er(e){const t=[],n=new Map;let r=0;const o=new WeakMap,i=()=>{const C=Pge.get(y),w=C?.[1];if(w&&!o.has(w)){const $=new Map(n);o.set(w,$);}},a=C=>o.get(C)||n;if(e){if(typeof e[Symbol.iterator]!="function")throw new TypeError("not iterable");for(const C of e)if(!n.has(C)){const w=pb(C);n.set(w,r),t[r++]=w;}}const l=C=>typeof C=="object"&&C!==null&&Symbol.iterator in C,u=C=>typeof C.forEach=="function",d=C=>{if(l(C))return C;if(u(C)){const w=[];return C.forEach($=>w.push($)),w}throw new TypeError("Expected an iterable")};function m(C){this.epoch;const w=Er(d(C)),$=Er();for(const M of this.values())w.has(M)&&$.add(M);return Er($)}function p(C){this.epoch;const w=Er(d(C)),$=Er();for(const M of this.values())$.add(M);for(const M of w.values())$.add(M);return Er($)}function g(C){this.epoch;const w=Er(d(C)),$=Er();for(const M of this.values())w.has(M)||$.add(M);return Er($)}function b(C){this.epoch;const w=Er(d(C)),$=Er();for(const M of this.values())w.has(M)||$.add(M);for(const M of w.values())this.has(M)||$.add(M);return Er($)}const y={data:t,index:r,epoch:0,get size(){return gb(this)||i(),n.size},has(C){const w=a(this),$=pb(C);return this.epoch,w.has($)},add(C){if(!gb(this))throw new Error("Cannot perform mutations on a snapshot");const w=pb(C);return n.has(w)||(n.set(w,this.index),this.data[this.index++]=w,this.epoch++),this},delete(C){if(!gb(this))throw new Error("Cannot perform mutations on a snapshot");const w=pb(C),$=n.get(w);return $===void 0?false:(delete this.data[$],n.delete(w),this.epoch++,true)},clear(){if(!gb(this))throw new Error("Cannot perform mutations on a snapshot");this.data.length=0,this.index=0,this.epoch++,n.clear();},forEach(C){this.epoch,a(this).forEach($=>{C(this.data[$],this.data[$],this);});},*values(){this.epoch;const C=a(this);for(const w of C.values())yield this.data[w];},keys(){return this.epoch,this.values()},*entries(){this.epoch;const C=a(this);for(const w of C.values()){const $=this.data[w];yield [$,$];}},toJSON(){return new Set(this.values())},[Symbol.iterator](){return this.values()},get[Symbol.toStringTag](){return "Set"},intersection:m,union:p,difference:g,symmetricDifference:b,isSubsetOf(C){this.epoch;for(const w of this.values())if(!C.has(w))return false;return true},isSupersetOf(C){this.epoch;const w=d(C);for(const $ of w)if(!this.has($))return false;return true},isDisjointFrom(C){this.epoch;for(const w of this.values())if(C.has(w))return false;return true}},S=kn(y);return Object.defineProperties(S,{size:{enumerable:false},data:{enumerable:false},index:{enumerable:false},epoch:{enumerable:false},toJSON:{enumerable:false}}),Object.seal(S),S}const Ige=typeof GM_info<"u"&&GM_info.scriptHandler==="Userscripts";function fi(e,t=true){if(e.startsWith("/")&&(e=location.origin+e),Ige){GM.openInTab(e,!t);return}GM.openInTab(e,{active:t,insert:true,setParent:true});}function iT({storageKey:e,onUpdate:t,setPersist:n}){if(typeof GM_addValueChangeListener>"u")return;const r=rT(1);GM_addValueChangeListener(e,(o,i,a,l)=>{l&&a&&r(async()=>{n(false);try{t(a);}finally{await Promise.resolve().then(()=>{n(true);});}});});}function nc(e){const t=kn({value:e()});function n(){return bt(t).value}function r(){return t.value}function o(){return t.value=e()}const i=Gl(o,100,{edges:["leading","trailing"]});return {state:t,use:n,get:r,update:o,updateThrottled:i}}function IH(e,t,n){let r=au(eo(e),t);Ya(e,()=>{const o=eo(e),i=au(o,t);ma(r,i)||n(o),r=i;});}function aT(e,t){t.startsWith(Ao)||(t=`${oo}:${t}`);const n=Object.keys(e),[r,o]=Cf(()=>{const a=localStorage.getItem(t);if(!a)return;const l=JSON.parse(a);return au(l,n)});r&&Ko("failed to load from localStorage key=",t,"error=",r);const i=kn({...e,...o});return setTimeout(()=>{Ya(i,()=>{const a=eo(i);localStorage.setItem(t,JSON.stringify(a));});}),i}async function sT(e,t){async function n(){const o=Object.keys(e);return au(await GM.getValue(t)||{},o)}const r=kn({...e,...await n()});return setTimeout(()=>{const o=rT(1);Ya(r,()=>o(async()=>{const i=await n(),a=ZX(i,eo(r));GM.setValue(t,a);}));}),r}async function OH(e){const n=Er(await(async()=>await GM.getValue(e)||[])()),r=a=>{const l=new Set(a);for(const u of [...n,...l])l.has(u)?n.add(u):n.delete(u);};setTimeout(i);let o=true;function i(){Ya(n,()=>{o&&GM.setValue(e,Array.from(eo(n)));}),iT({storageKey:e,setPersist:a=>o=a,onUpdate:r});}return {set:n,replaceAllWith:r}}async function DH(e,t){const r=PH(await(async()=>await GM.getValue(e)||[])()),o=l=>{const u=new Map(l);for(const[d,m]of [...r,...u])u.has(d)?r.set(d,m):r.delete(d);};setTimeout(a);let i=true;function a(){Ya(r,()=>{if(!i)return;let l=Array.from(eo(r));GM.setValue(e,l);}),iT({storageKey:e,setPersist:l=>i=l,onUpdate:o});}return {map:r,replaceAllWith:o}}const Oge=()=>document.querySelector(".bili-header__bar"),lT=nc(_H);function _H(){const e=Oge();return !!(e&&window.getComputedStyle(e).display==="none")}const cu=nc(function(){if(!_H())return 64;if(!document.body.classList.contains("fixed-navbar"))return 0;const n=document.documentElement.style.getPropertyValue("--navbar-height");if(!n)return 50;const r=Number(n.replace("px",""));return Number.isNaN(r)?50:r}),cT=nc(function(){const t=document.documentElement.style.getPropertyValue("--navbar-bounds-padding");return !t||!/^\d+%$/.test(t)?void 0:100-uf(Number(t.replace("%","")),2,10)*2});function Dge(){const e=cT.use(),{pureRecommend:t,grid:{useCustomGrid:n}}=Ut();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 sg=nc(function(){return window.getComputedStyle(document.documentElement).getPropertyValue("--theme-color")}),LH=`${oo}:evolved-theme-color-hex`;Ege(()=>{const e=sg.get();e&&localStorage.setItem(LH,e);});function zH(){return localStorage.getItem(LH)||$f.Pink}function _ge(){lT.updateThrottled(),cu.updateThrottled(),cT.updateThrottled(),sg.updateThrottled();}const BH=new MutationObserver(()=>_ge());BH.observe(document.documentElement,{attributes:true,attributeFilter:["style"]});BH.observe(document.body,{attributes:true,attributeFilter:["class"]});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(sg.updateThrottled,1e3);},{capture:true,passive:true});const kH={maxCount:5,top:cu.get()-4};QR.config(kH);function Lge(){const e=cu.use();return x(rg,{message:{...kH,top:e-4},children:x(zge,{})})}let vb,Ot=QR,ua=fH,uT=Ea;function zge(){return vb=rg.useApp(),Ot=vb.message,ua=vb.notification,uT=vb.modal,null}function gi(e){return e.filter(Boolean).filter(t=>t.test===void 0?true:typeof t.test=="boolean"?t.test:t.test()).map(t=>rz(t,["test"]))}const Bge=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("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"}),x("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"})]}),kge=f.forwardRef(Bge);function lg(e){return t=>e({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:"1em",height:"1em",...t})}const Fge=lg(e=>x("svg",{viewBox:"0 0 1024 1024",fill:"currentColor",...e,children:x("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"})})),Hge=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{children:[x("rect",{width:2,height:5,x:11,y:1,fill:"currentColor",opacity:.14}),x("rect",{width:2,height:5,x:11,y:1,fill:"currentColor",opacity:.29,transform:"rotate(30 12 12)"}),x("rect",{width:2,height:5,x:11,y:1,fill:"currentColor",opacity:.43,transform:"rotate(60 12 12)"}),x("rect",{width:2,height:5,x:11,y:1,fill:"currentColor",opacity:.57,transform:"rotate(90 12 12)"}),x("rect",{width:2,height:5,x:11,y:1,fill:"currentColor",opacity:.71,transform:"rotate(120 12 12)"}),x("rect",{width:2,height:5,x:11,y:1,fill:"currentColor",opacity:.86,transform:"rotate(150 12 12)"}),x("rect",{width:2,height:5,x:11,y:1,fill:"currentColor",transform:"rotate(180 12 12)"}),x("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"})]})]}),dT=f.forwardRef(Hge),Vge=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 256 256",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"currentColor",children:[x("path",{d:"M80 104v104H32a8 8 0 0 1-8-8v-88a8 8 0 0 1 8-8Z",opacity:.2}),x("path",{d:"M234 80.12A24 24 0 0 0 216 72h-56V56a40 40 0 0 0-40-40a8 8 0 0 0-7.16 4.42L75.06 96H32a16 16 0 0 0-16 16v88a16 16 0 0 0 16 16h172a24 24 0 0 0 23.82-21l12-96A24 24 0 0 0 234 80.12M32 112h40v88H32Zm191.94-15l-12 96a8 8 0 0 1-7.94 7H88v-94.11l36.71-73.43A24 24 0 0 1 144 56v24a8 8 0 0 0 8 8h64a8 8 0 0 1 7.94 9"})]})]}),jge=f.forwardRef(Vge),Uge=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 256 256",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"currentColor",children:[x("path",{d:"M80 48v104H32a8 8 0 0 1-8-8V56a8 8 0 0 1 8-8Z",opacity:.2}),x("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"})]})]}),qge=f.forwardRef(Uge),Wge=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,children:[x("path",{d:"m24 4l-6 6h-8v8l-6 6l6 6v8h8l6 6l6-6h8v-8l6-6l-6-6v-8h-8z"}),x("path",{d:"M24 30a6 6 0 1 0 0-12a6 6 0 0 0 0 12Z"})]})]}),Gge=f.forwardRef(Wge),Kge=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,children:[x("rect",{width:36,height:36,x:6,y:6,strokeLinecap:"round",rx:3}),x("path",{d:"M18.5 24v-7.794l6.75 3.897L32 24l-6.75 3.897l-6.75 3.897z"})]})]}),Yge=f.forwardRef(Kge),Xge=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("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"})]}),Qge=f.forwardRef(Xge),Zge=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M18 7h-3l4-4l4 4h-3v14h-2zM8 5c-3.86 0-7 3.13-7 7s3.13 7 7 7c3.86 0 7-3.13 7-7s-3.13-7-7-7m2.19 9.53L7 12.69V9h1.5v2.82l2.44 1.41z"})]}),Jge=f.forwardRef(Zge),eve=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M20 17h3l-4 4l-4-4h3V3h2zM8 5c-3.86 0-7 3.13-7 7s3.13 7 7 7c3.86 0 7-3.13 7-7s-3.13-7-7-7m2.19 9.53L7 12.69V9h1.5v2.82l2.44 1.41z"})]}),tve=f.forwardRef(eve),nve=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h7m-7 6h7m-7 6h9m2-9l3-3l3 3m-3-3v12"})]}),rve=f.forwardRef(nve),ove=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h9m-9 6h7m-7 6h7m4-3l3 3l3-3m-3-9v12"})]}),ive=f.forwardRef(ove),ave=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",children:[x("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"}),x("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"}),x("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,d:"M24.5 34V20h-2M21 34h7"})]})]}),sve=f.forwardRef(ave),lve=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M16 4.5V7H5v2h11v2.5L19.5 8M16 12.5V15H5v2h11v2.5l3.5-3.5"})]}),cve=f.forwardRef(lve),uve=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,children:[x("path",{d:"M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4S4 12.954 4 24s8.954 20 20 20Z"}),x("path",{strokeLinecap:"round",d:"M24.008 12v12.01l8.479 8.48"})]})]}),dve=f.forwardRef(uve),fve=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",strokeWidth:4,children:[x("rect",{width:26,height:40,x:11,y:4,rx:3}),x("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M22 10h4m-6 28h8"})]})]}),mve=f.forwardRef(fve),hve=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",strokeWidth:4,children:[x("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 32h10v9H19z"}),x("rect",{width:38,height:24,x:5,y:8,rx:2}),x("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M22 27h4M14 41h20"})]})]}),pve=f.forwardRef(hve),gve=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",children:[x("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"}),x("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"})]})]}),vve=f.forwardRef(gve),bve=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("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"})]}),yve=f.forwardRef(bve),Sve=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("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"})]}),Cve=f.forwardRef(Sve),xve=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("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"})]}),wve=f.forwardRef(xve),$ve=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[x("path",{strokeDasharray:32,d:"M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9",children:x("animate",{fill:"freeze",attributeName:"stroke-dashoffset",dur:"0.6s",values:"32;0"})}),H("path",{strokeDasharray:"2 4",strokeDashoffset:6,d:"M12 21c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9",opacity:0,children:[x("set",{fill:"freeze",attributeName:"opacity",begin:"0.45s",to:1}),x("animateTransform",{fill:"freeze",attributeName:"transform",begin:"0.45s",dur:"0.6s",type:"rotate",values:"-180 12 12;0 12 12"}),x("animate",{attributeName:"stroke-dashoffset",begin:"0.85s",dur:"0.6s",repeatCount:"indefinite",to:0})]}),x("path",{strokeDasharray:10,strokeDashoffset:10,d:"M12 16v-7.5",children:x("animate",{fill:"freeze",attributeName:"stroke-dashoffset",begin:"0.85s",dur:"0.2s",to:0})}),x("path",{strokeDasharray:8,strokeDashoffset:8,d:"M12 8.5l3.5 3.5M12 8.5l-3.5 3.5",children:x("animate",{fill:"freeze",attributeName:"stroke-dashoffset",begin:"1.05s",dur:"0.2s",to:0})})]})]}),Eve=f.forwardRef($ve),Mve=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,children:[x("path",{d:"M19 20a7 7 0 1 0 0-14a7 7 0 0 0 0 14Z"}),x("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"})]})]}),Rve=f.forwardRef(Mve),Tve=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,children:[x("path",{d:"m13 8l-7 6l7 7"}),x("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"})]})]}),FH=f.forwardRef(Tve),Ave=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,children:[x("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"}),x("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"})]})]}),Nve=f.forwardRef(Ave),Pve=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("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"})]}),Ive=f.forwardRef(Pve),Ove=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,d:"m10 8l-6 6l6 6m28 8l6 6l-6 6M4 14h40M4 34h40"})]}),HH=f.forwardRef(Ove),Dve=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,children:[x("path",{d:"M5.325 43.5h8.485l31.113-31.113l-8.486-8.485L5.325 35.015z"}),x("path",{strokeLinecap:"round",d:"m27.952 12.387l8.485 8.485"})]})]}),_ve=f.forwardRef(Dve),Lve=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M16 20v-7h4v7zm-6 0V4h4v16zm-6 0V9h4v11z"})]}),zve=f.forwardRef(Lve),fT=f.createContext({});function y1(e){const t=f.useRef(null);return t.current===null&&(t.current=e()),t.current}const VH=typeof window<"u",jH=VH?f.useLayoutEffect:f.useEffect,S1=f.createContext(null);function mT(e,t){e.indexOf(t)===-1&&e.push(t);}function cg(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1);}const Wa=(e,t,n)=>n>t?t:n<e?e:n;let hT=()=>{};const Ts={},UH=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function qH(e){return typeof e=="object"&&e!==null}const WH=e=>/^0[^.\s]+$/u.test(e);function pT(e){let t;return ()=>(t===void 0&&(t=e()),t)}const Wi=e=>e,Bve=(e,t)=>n=>t(e(n)),ug=(...e)=>e.reduce(Bve),df=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class gT{constructor(){this.subscriptions=[];}add(t){return mT(this.subscriptions,t),()=>cg(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const a=this.subscriptions[i];a&&a(t,n,r);}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0;}}const Va=e=>e*1e3,Ui=e=>e/1e3;function GH(e,t){return t?e*(1e3/t):0}const kve=(e,t,n)=>{const r=t-e;return ((n-e)%r+r)%r+e},KH=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Fve=1e-7,Hve=12;function Vve(e,t,n,r,o){let i,a,l=0;do a=t+(n-t)/2,i=KH(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>Fve&&++l<Hve);return a}function dg(e,t,n,r){if(e===t&&n===r)return Wi;const o=i=>Vve(i,0,1,e,n);return i=>i===0||i===1?i:KH(o(i),t,r)}const YH=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,XH=e=>t=>1-e(1-t),QH=dg(.33,1.53,.69,.99),vT=XH(QH),ZH=YH(vT),JH=e=>(e*=2)<1?.5*vT(e):.5*(2-Math.pow(2,-10*(e-1))),bT=e=>1-Math.sin(Math.acos(e)),eV=XH(bT),tV=YH(bT),jve=dg(.42,0,1,1),Uve=dg(0,0,.58,1),nV=dg(.42,0,.58,1),rV=e=>Array.isArray(e)&&typeof e[0]!="number";function oV(e,t){return rV(e)?e[kve(0,e.length,t)]:e}const iV=e=>Array.isArray(e)&&typeof e[0]=="number",qve={linear:Wi,easeIn:jve,easeInOut:nV,easeOut:Uve,circIn:bT,circInOut:tV,circOut:eV,backIn:vT,backInOut:ZH,backOut:QH,anticipate:JH},Wve=e=>typeof e=="string",V8=e=>{if(iV(e)){hT(e.length===4);const[t,n,r,o]=e;return dg(t,n,r,o)}else if(Wve(e))return qve[e];return e},bb=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Gve(e,t){let n=new Set,r=new Set,o=false,i=false;const a=new WeakSet;let l={delta:0,timestamp:0,isProcessing:false};function u(m){a.has(m)&&(d.schedule(m),e()),m(l);}const d={schedule:(m,p=false,g=false)=>{const y=g&&o?n:r;return p&&a.add(m),y.has(m)||y.add(m),m},cancel:m=>{r.delete(m),a.delete(m);},process:m=>{if(l=m,o){i=true;return}o=true,[n,r]=[r,n],n.forEach(u),n.clear(),o=false,i&&(i=false,d.process(m));}};return d}const Kve=40;function aV(e,t){let n=false,r=true;const o={delta:0,timestamp:0,isProcessing:false},i=()=>n=true,a=bb.reduce((M,T)=>(M[T]=Gve(i),M),{}),{setup:l,read:u,resolveKeyframes:d,preUpdate:m,update:p,preRender:g,render:b,postRender:y}=a,S=()=>{const M=Ts.useManualTiming?o.timestamp:performance.now();n=false,Ts.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(M-o.timestamp,Kve),1)),o.timestamp=M,o.isProcessing=true,l.process(o),u.process(o),d.process(o),m.process(o),p.process(o),g.process(o),b.process(o),y.process(o),o.isProcessing=false,n&&t&&(r=false,e(S));},C=()=>{n=true,r=true,o.isProcessing||e(S);};return {schedule:bb.reduce((M,T)=>{const R=a[T];return M[T]=(I,N=false,P=false)=>(n||C(),R.schedule(I,N,P)),M},{}),cancel:M=>{for(let T=0;T<bb.length;T++)a[bb[T]].cancel(M);},state:o,steps:a}}const{schedule:Vn,cancel:jl,state:Kr,steps:lw}=aV(typeof requestAnimationFrame<"u"?requestAnimationFrame:Wi,true);let Zb;function Yve(){Zb=void 0;}const Mo={now:()=>(Zb===void 0&&Mo.set(Kr.isProcessing||Ts.useManualTiming?Kr.timestamp:performance.now()),Zb),set:e=>{Zb=e,queueMicrotask(Yve);}},sV=e=>t=>typeof t=="string"&&t.startsWith(e),lV=sV("--"),Xve=sV("var(--"),yT=e=>Xve(e)?Qve.test(e.split("/*")[0].trim()):false,Qve=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function j8(e){return typeof e!="string"?false:e.split("/*")[0].includes("var(--")}const kf={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},yp={...kf,transform:e=>Wa(0,1,e)},yb={...kf,default:1},Lh=e=>Math.round(e*1e5)/1e5,ST=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Zve(e){return e==null}const Jve=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,CT=(e,t)=>n=>!!(typeof n=="string"&&Jve.test(n)&&n.startsWith(e)||t&&!Zve(n)&&Object.prototype.hasOwnProperty.call(n,t)),cV=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,l]=r.match(ST);return {[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:l!==void 0?parseFloat(l):1}},ebe=e=>Wa(0,255,e),cw={...kf,transform:e=>Math.round(ebe(e))},Uc={test:CT("rgb","red"),parse:cV("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+cw.transform(e)+", "+cw.transform(t)+", "+cw.transform(n)+", "+Lh(yp.transform(r))+")"};function tbe(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const n3={test:CT("#"),parse:tbe,transform:Uc.transform},fg=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),yl=fg("deg"),ja=fg("%"),vt=fg("px"),nbe=fg("vh"),rbe=fg("vw"),U8={...ja,parse:e=>ja.parse(e)/100,transform:e=>ja.transform(e*100)},_d={test:CT("hsl","hue"),parse:cV("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ja.transform(Lh(t))+", "+ja.transform(Lh(n))+", "+Lh(yp.transform(r))+")"},yr={test:e=>Uc.test(e)||n3.test(e)||_d.test(e),parse:e=>Uc.test(e)?Uc.parse(e):_d.test(e)?_d.parse(e):n3.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Uc.transform(e):_d.transform(e),getAnimatableNone:e=>{const t=yr.parse(e);return t.alpha=0,yr.transform(t)}},obe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ibe(e){return isNaN(e)&&typeof e=="string"&&(e.match(ST)?.length||0)+(e.match(obe)?.length||0)>0}const uV="number",dV="color",abe="var",sbe="var(",q8="${}",lbe=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Sp(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const l=t.replace(lbe,u=>(yr.test(u)?(r.color.push(i),o.push(dV),n.push(yr.parse(u))):u.startsWith(sbe)?(r.var.push(i),o.push(abe),n.push(u)):(r.number.push(i),o.push(uV),n.push(parseFloat(u))),++i,q8)).split(q8);return {values:n,split:l,indexes:r,types:o}}function fV(e){return Sp(e).values}function mV(e){const{split:t,types:n}=Sp(e),r=t.length;return o=>{let i="";for(let a=0;a<r;a++)if(i+=t[a],o[a]!==void 0){const l=n[a];l===uV?i+=Lh(o[a]):l===dV?i+=yr.transform(o[a]):i+=o[a];}return i}}const cbe=e=>typeof e=="number"?0:yr.test(e)?yr.getAnimatableNone(e):e;function ube(e){const t=fV(e);return mV(e)(t.map(cbe))}const Ul={test:ibe,parse:fV,createTransformer:mV,getAnimatableNone:ube};function uw(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function dbe({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,a=0;if(!t)o=i=a=n;else {const l=n<.5?n*(1+t):n+t-n*t,u=2*n-l;o=uw(u,l,e+1/3),i=uw(u,l,e),a=uw(u,l,e-1/3);}return {red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function sy(e,t){return n=>n>0?t:e}const Zn=(e,t,n)=>e+(t-e)*n,dw=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},fbe=[n3,Uc,_d],mbe=e=>fbe.find(t=>t.test(e));function W8(e){const t=mbe(e);if(!t)return false;let n=t.parse(e);return t===_d&&(n=dbe(n)),n}const G8=(e,t)=>{const n=W8(e),r=W8(t);if(!n||!r)return sy(e,t);const o={...n};return i=>(o.red=dw(n.red,r.red,i),o.green=dw(n.green,r.green,i),o.blue=dw(n.blue,r.blue,i),o.alpha=Zn(n.alpha,r.alpha,i),Uc.transform(o))},r3=new Set(["none","hidden"]);function hbe(e,t){return r3.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function pbe(e,t){return n=>Zn(e,t,n)}function xT(e){return typeof e=="number"?pbe:typeof e=="string"?yT(e)?sy:yr.test(e)?G8:bbe:Array.isArray(e)?hV:typeof e=="object"?yr.test(e)?G8:gbe:sy}function hV(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>xT(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function gbe(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=xT(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function vbe(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],a=e.indexes[i][r[i]],l=e.values[a]??0;n[o]=l,r[i]++;}return n}const bbe=(e,t)=>{const n=Ul.createTransformer(t),r=Sp(e),o=Sp(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?r3.has(e)&&!o.values.length||r3.has(t)&&!r.values.length?hbe(e,t):ug(hV(vbe(r,o),o.values),n):sy(e,t)};function pV(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Zn(e,t,n):xT(e)(e,t)}const ybe=e=>{const t=({timestamp:n})=>e(n);return {start:(n=true)=>Vn.update(t,n),stop:()=>jl(t),now:()=>Kr.isProcessing?Kr.timestamp:Mo.now()}},gV=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=Math.round(e(i/(o-1))*1e4)/1e4+", ";return `linear(${r.substring(0,r.length-2)})`},ly=2e4;function wT(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ly;)t+=n,r=e.next(t);return t>=ly?1/0:t}function vV(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(wT(r),ly);return {type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Ui(o)}}const Sbe=5;function bV(e,t,n){const r=Math.max(t-Sbe,0);return GH(n-e(r),t-r)}const or={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},fw=.001;function Cbe({duration:e=or.duration,bounce:t=or.bounce,velocity:n=or.velocity,mass:r=or.mass}){let o,i,a=1-t;a=Wa(or.minDamping,or.maxDamping,a),e=Wa(or.minDuration,or.maxDuration,Ui(e)),a<1?(o=d=>{const m=d*a,p=m*e,g=m-n,b=o3(d,a),y=Math.exp(-p);return fw-g/b*y},i=d=>{const p=d*a*e,g=p*n+n,b=Math.pow(a,2)*Math.pow(d,2)*e,y=Math.exp(-p),S=o3(Math.pow(d,2),a);return (-o(d)+fw>0?-1:1)*((g-b)*y)/S}):(o=d=>{const m=Math.exp(-d*e),p=(d-n)*e+1;return -fw+m*p},i=d=>{const m=Math.exp(-d*e),p=(n-d)*(e*e);return m*p});const l=5/e,u=wbe(o,i,l);if(e=Va(e),isNaN(u))return {stiffness:or.stiffness,damping:or.damping,duration:e};{const d=Math.pow(u,2)*r;return {stiffness:d,damping:a*2*Math.sqrt(r*d),duration:e}}}const xbe=12;function wbe(e,t,n){let r=n;for(let o=1;o<xbe;o++)r=r-e(r)/t(r);return r}function o3(e,t){return e*Math.sqrt(1-t*t)}const $be=["duration","bounce"],Ebe=["stiffness","damping","mass"];function K8(e,t){return t.some(n=>e[n]!==void 0)}function Mbe(e){let t={velocity:or.velocity,stiffness:or.stiffness,damping:or.damping,mass:or.mass,isResolvedFromDuration:false,...e};if(!K8(e,Ebe)&&K8(e,$be))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Wa(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:or.mass,stiffness:o,damping:i};}else {const n=Cbe(e);t={...t,...n,mass:or.mass},t.isResolvedFromDuration=true;}return t}function Cp(e=or.visualDuration,t=or.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:false,value:i},{stiffness:u,damping:d,mass:m,duration:p,velocity:g,isResolvedFromDuration:b}=Mbe({...n,velocity:-Ui(n.velocity||0)}),y=g||0,S=d/(2*Math.sqrt(u*m)),C=a-i,w=Ui(Math.sqrt(u/m)),$=Math.abs(C)<5;r||(r=$?or.restSpeed.granular:or.restSpeed.default),o||(o=$?or.restDelta.granular:or.restDelta.default);let M;if(S<1){const R=o3(w,S);M=I=>{const N=Math.exp(-S*w*I);return a-N*((y+S*w*C)/R*Math.sin(R*I)+C*Math.cos(R*I))};}else if(S===1)M=R=>a-Math.exp(-w*R)*(C+(y+w*C)*R);else {const R=w*Math.sqrt(S*S-1);M=I=>{const N=Math.exp(-S*w*I),P=Math.min(R*I,300);return a-N*((y+S*w*C)*Math.sinh(P)+R*C*Math.cosh(P))/R};}const T={calculatedDuration:b&&p||null,next:R=>{const I=M(R);if(b)l.done=R>=p;else {let N=R===0?y:0;S<1&&(N=R===0?Va(y):bV(M,R,I));const P=Math.abs(N)<=r,O=Math.abs(a-I)<=o;l.done=P&&O;}return l.value=l.done?a:I,l},toString:()=>{const R=Math.min(wT(T),ly),I=gV(N=>T.next(R*N).value,R,30);return R+"ms "+I},toTransition:()=>{}};return T}Cp.applyToOptions=e=>{const t=vV(e,100,Cp);return e.ease=t.ease,e.duration=Va(t.duration),e.type="keyframes",e};function i3({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:l,max:u,restDelta:d=.5,restSpeed:m}){const p=e[0],g={done:false,value:p},b=P=>l!==void 0&&P<l||u!==void 0&&P>u,y=P=>l===void 0?u:u===void 0||Math.abs(l-P)<Math.abs(u-P)?l:u;let S=n*t;const C=p+S,w=a===void 0?C:a(C);w!==C&&(S=w-p);const $=P=>-S*Math.exp(-P/r),M=P=>w+$(P),T=P=>{const O=$(P),_=M(P);g.done=Math.abs(O)<=d,g.value=g.done?w:_;};let R,I;const N=P=>{b(g.value)&&(R=P,I=Cp({keyframes:[g.value,y(g.value)],velocity:bV(M,P,g.value),damping:o,stiffness:i,restDelta:d,restSpeed:m}));};return N(0),{calculatedDuration:null,next:P=>{let O=false;return !I&&R===void 0&&(O=true,T(P),N(P)),R!==void 0&&P>=R?I.next(P-R):(!O&&T(P),g)}}}function Rbe(e,t,n){const r=[],o=n||Ts.mix||pV,i=e.length-1;for(let a=0;a<i;a++){let l=o(e[a],e[a+1]);if(t){const u=Array.isArray(t)?t[a]||Wi:t;l=ug(u,l);}r.push(l);}return r}function Tbe(e,t,{clamp:n=true,ease:r,mixer:o}={}){const i=e.length;if(hT(i===t.length),i===1)return ()=>t[0];if(i===2&&t[0]===t[1])return ()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=Rbe(t,r,o),u=l.length,d=m=>{if(a&&m<e[0])return t[0];let p=0;if(u>1)for(;p<e.length-2&&!(m<e[p+1]);p++);const g=df(e[p],e[p+1],m);return l[p](g)};return n?m=>d(Wa(e[0],e[i-1],m)):d}function yV(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=df(0,t,r);e.push(Zn(n,1,o));}}function SV(e){const t=[0];return yV(t,e.length-1),t}function Abe(e,t){return e.map(n=>n*t)}function Nbe(e,t){return e.map(()=>t||nV).splice(0,e.length-1)}function zh({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=rV(r)?r.map(V8):V8(r),i={done:false,value:t[0]},a=Abe(n&&n.length===t.length?n:SV(t),e),l=Tbe(a,t,{ease:Array.isArray(o)?o:Nbe(t,o)});return {calculatedDuration:e,next:u=>(i.value=l(u),i.done=u>=e,i)}}const Pbe=e=>e!==null;function $T(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(Pbe),l=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return !l||r===void 0?i[l]:r}const Ibe={decay:i3,inertia:i3,tween:zh,keyframes:zh,spring:Cp};function CV(e){typeof e.type=="string"&&(e.type=Ibe[e.type]);}class ET{constructor(){this.updateFinished();}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t;});}notifyFinished(){this.resolve();}then(t,n){return this.finished.then(t,n)}}const Obe=e=>e/100;class MT extends ET{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=false,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Mo.now()&&this.tick(Mo.now()),this.isStopped=true,this.state!=="idle"&&(this.teardown(),this.options.onStop?.());},this.options=t,this.initAnimation(),this.play(),t.autoplay===false&&this.pause();}initAnimation(){const{options:t}=this;CV(t);const{type:n=zh,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=t;let{keyframes:l}=t;const u=n||zh;u!==zh&&typeof l[0]!="number"&&(this.mixKeyframes=ug(Obe,pV(l[0],l[1])),l=[0,100]);const d=u({...t,keyframes:l});i==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...l].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=wT(d));const{calculatedDuration:m}=d;this.calculatedDuration=m,this.resolvedDuration=m+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=d;}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n;}tick(t,n=false){const{generator:r,totalDuration:o,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:l,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:d=0,keyframes:m,repeat:p,repeatType:g,repeatDelay:b,type:y,onUpdate:S,finalKeyframe:C}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const w=this.currentTime-d*(this.playbackSpeed>=0?1:-1),$=this.playbackSpeed>=0?w<0:w>o;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let M=this.currentTime,T=r;if(p){const P=Math.min(this.currentTime,o)/l;let O=Math.floor(P),_=P%1;!_&&P>=1&&(_=1),_===1&&O--,O=Math.min(O,p+1),O%2&&(g==="reverse"?(_=1-_,b&&(_-=b/l)):g==="mirror"&&(T=a)),M=Wa(0,1,_)*l;}const R=$?{done:false,value:m[0]}:T.next(M);i&&(R.value=i(R.value));let{done:I}=R;!$&&u!==null&&(I=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return N&&y!==i3&&(R.value=$T(m,this.options,C,this.speed)),S&&S(R.value),N&&this.finish(),R}then(t,n){return this.finished.then(t,n)}get duration(){return Ui(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ui(t)}get time(){return Ui(this.currentTime)}set time(t){t=Va(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(false);}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Mo.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ui(this.currentTime));}play(){if(this.isStopped)return;const{driver:t=ybe,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start();}pause(){this.state="paused",this.updateTime(Mo.now()),this.holdTime=this.currentTime;}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null;}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.();}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.();}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null;}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0);}sample(t){return this.startTime=0,this.tick(t,true)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Dbe(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1]);}const qc=e=>e*180/Math.PI,a3=e=>{const t=qc(Math.atan2(e[1],e[0]));return s3(t)},_be={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:a3,rotateZ:a3,skewX:e=>qc(Math.atan(e[1])),skewY:e=>qc(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},s3=e=>(e=e%360,e<0&&(e+=360),e),Y8=a3,X8=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Q8=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Lbe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:X8,scaleY:Q8,scale:e=>(X8(e)+Q8(e))/2,rotateX:e=>s3(qc(Math.atan2(e[6],e[5]))),rotateY:e=>s3(qc(Math.atan2(-e[2],e[0]))),rotateZ:Y8,rotate:Y8,skewX:e=>qc(Math.atan(e[4])),skewY:e=>qc(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function l3(e){return e.includes("scale")?1:0}function c3(e,t){if(!e||e==="none")return l3(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=Lbe,o=n;else {const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=_be,o=l;}if(!o)return l3(t);const i=r[t],a=o[1].split(",").map(Bbe);return typeof i=="function"?i(a):a[i]}const zbe=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return c3(n,t)};function Bbe(e){return parseFloat(e.trim())}const Ff=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Hf=new Set(Ff),Z8=e=>e===kf||e===vt,kbe=new Set(["x","y","z"]),Fbe=Ff.filter(e=>!kbe.has(e));function Hbe(e){const t=[];return Fbe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0));}),t}const Tl={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>c3(t,"x"),y:(e,{transform:t})=>c3(t,"y")};Tl.translateX=Tl.x;Tl.translateY=Tl.y;const eu=new Set;let u3=false,d3=false,f3=false;function xV(){if(d3){const e=Array.from(eu).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=Hbe(r);o.length&&(n.set(r,o),r.render());}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,a])=>{r.getValue(i)?.set(a);});}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY);});}d3=false,u3=false,eu.forEach(e=>e.complete(f3)),eu.clear();}function wV(){eu.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(d3=true);});}function Vbe(){f3=true,wV(),xV(),f3=false;}class RT{constructor(t,n,r,o,i,a=false){this.state="pending",this.isAsync=false,this.needsMeasurement=false,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a;}scheduleResolve(){this.state="scheduled",this.isAsync?(eu.add(this),u3||(u3=true,Vn.read(wV),Vn.resolveKeyframes(xV))):(this.readKeyframes(),this.complete());}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const i=o?.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l);}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0]);}Dbe(t);}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=false){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),eu.delete(this);}cancel(){this.state==="scheduled"&&(eu.delete(this),this.state="pending");}resume(){this.state==="pending"&&this.scheduleResolve();}}const jbe=e=>e.startsWith("--");function Ube(e,t,n){jbe(t)?e.style.setProperty(t,n):e.style[t]=n;}const qbe=pT(()=>window.ScrollTimeline!==void 0),Wbe={};function Gbe(e,t){const n=pT(e);return ()=>Wbe[t]??n()}const $V=Gbe(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"});}catch{return false}return true},"linearEasing"),Ch=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,J8={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ch([0,.65,.55,1]),circOut:Ch([.55,0,1,.45]),backIn:Ch([.31,.01,.66,-0.59]),backOut:Ch([.33,1.53,.69,.99])};function EV(e,t){if(e)return typeof e=="function"?$V()?gV(e,t):"ease-out":iV(e)?Ch(e):Array.isArray(e)?e.map(n=>EV(n,t)||J8.easeOut):J8[e]}function Kbe(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:l="easeOut",times:u}={},d=void 0){const m={[t]:n};u&&(m.offset=u);const p=EV(l,o);Array.isArray(p)&&(m.easing=p);const g={delay:r,duration:o,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return d&&(g.pseudoElement=d),e.animate(m,g)}function TT(e){return typeof e=="function"&&"applyToOptions"in e}function Ybe({type:e,...t}){return TT(e)&&$V()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Xbe extends ET{constructor(t){if(super(),this.finishedTime=null,this.isStopped=false,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:i,allowFlatten:a=false,finalKeyframe:l,onComplete:u}=t;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=t,hT(typeof t.type!="string");const d=Ybe(t);this.animation=Kbe(n,r,o,d,i),d.autoplay===false&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const m=$T(o,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(m):Ube(n,r,m),this.animation.cancel();}u?.(),this.notifyFinished();};}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished());}pause(){this.animation.pause();}complete(){this.animation.finish?.();}cancel(){try{this.animation.cancel();}catch{}}stop(){if(this.isStopped)return;this.isStopped=true;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel());}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.();}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Ui(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ui(t)}get time(){return Ui(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Va(t);}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t;}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t;}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&qbe()?(this.animation.timeline=t,Wi):n(this)}}const MV={anticipate:JH,backInOut:ZH,circInOut:tV};function Qbe(e){return e in MV}function Zbe(e){typeof e.ease=="string"&&Qbe(e.ease)&&(e.ease=MV[e.ease]);}const mw=10;class Jbe extends Xbe{constructor(t){Zbe(t),CV(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t;}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:i,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new MT({...a,autoplay:false}),u=Math.max(mw,Mo.now()-this.startTime),d=Wa(0,mw,u-mw);n.setWithVelocity(l.sample(Math.max(0,u-d)).value,l.sample(u).value,d),l.stop();}}const eD=(e,t)=>t==="zIndex"?false:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ul.test(e)||e==="0")&&!e.startsWith("url("));function e0e(e){const t=e[0];if(e.length===1)return true;for(let n=0;n<e.length;n++)if(e[n]!==t)return true}function t0e(e,t,n,r){const o=e[0];if(o===null)return false;if(t==="display"||t==="visibility")return true;const i=e[e.length-1],a=eD(o,t),l=eD(i,t);return !a||!l?false:e0e(e)||(n==="spring"||TT(n))&&r}function m3(e){e.duration=0,e.type="keyframes";}const n0e=new Set(["opacity","clipPath","filter","transform"]),r0e=pT(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function o0e(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return false;const{onUpdate:u,transformTemplate:d}=t.owner.getProps();return r0e()&&n&&n0e.has(n)&&(n!=="transform"||!d)&&!u&&!r&&o!=="mirror"&&i!==0&&a!=="inertia"}const i0e=40;class a0e extends ET{constructor({autoplay:t=true,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",keyframes:l,name:u,motionValue:d,element:m,...p}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel();},this.createdAt=Mo.now();const g={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,name:u,motionValue:d,element:m,...p},b=m?.KeyframeResolver||RT;this.keyframeResolver=new b(l,(y,S,C)=>this.onKeyframesResolved(y,S,g,!C),u,d,m),this.keyframeResolver?.scheduleResolve();}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:i,type:a,velocity:l,delay:u,isHandoff:d,onUpdate:m}=r;this.resolvedAt=Mo.now(),t0e(t,i,a,l)||((Ts.instantAnimations||!u)&&m?.($T(t,r,n)),t[0]=t[t.length-1],m3(r),r.repeat=0);const g={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>i0e?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},b=!d&&o0e(g),y=g.motionValue?.owner?.current,S=b?new Jbe({...g,element:y}):new MT(g);S.finished.then(()=>{this.notifyFinished();}).catch(Wi),this.pendingTimeline&&(this.stopTimeline=S.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=S;}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Vbe()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t;}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t;}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play();}pause(){this.animation.pause();}complete(){this.animation.complete();}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel();}}class s0e{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean);}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n;}attachTimeline(t){const n=this.animations.map(r=>r.attachTimeline(t));return ()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop();});}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t);}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t);}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return tD(this.animations,"duration")}get iterationDuration(){return tD(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(n=>n[t]());}play(){this.runAll("play");}pause(){this.runAll("pause");}cancel(){this.runAll("cancel");}complete(){this.runAll("complete");}}function tD(e,t){let n=0;for(let r=0;r<e.length;r++){const o=e[r][t];o!==null&&o>n&&(n=o);}return n}class l0e extends s0e{then(t,n){return this.finished.finally(t).then(()=>{})}}function RV(e,t,n,r=0,o=1){const i=Array.from(e).sort((d,m)=>d.sortNodePosition(m)).indexOf(t),a=e.size,l=(a-1)*r;return typeof n=="function"?n(i,a):o===1?i*r:l-i*r}const c0e=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function u0e(e){const t=c0e.exec(e);if(!t)return [,];const[,n,r,o]=t;return [`--${n??r}`,o]}function TV(e,t,n=1){const[r,o]=u0e(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return UH(a)?parseFloat(a):a}return yT(o)?TV(o,t,n+1):o}const d0e={type:"spring",stiffness:500,damping:25,restSpeed:10},f0e=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),m0e={type:"keyframes",duration:.8},h0e={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},p0e=(e,{keyframes:t})=>t.length>2?m0e:Hf.has(e)?e.startsWith("scale")?f0e(t[1]):d0e:h0e,g0e=e=>e!==null;function v0e(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(g0e),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}function AT(e,t){return e?.[t]??e?.default??e}function b0e({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:l,from:u,elapsed:d,...m}){return !!Object.keys(m).length}const NT=(e,t,n,r={},o,i)=>a=>{const l=AT(r,e)||{},u=l.delay||r.delay||0;let{elapsed:d=0}=r;d=d-Va(u);const m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-d,onUpdate:g=>{t.set(g),l.onUpdate&&l.onUpdate(g);},onComplete:()=>{a(),l.onComplete&&l.onComplete();},name:e,motionValue:t,element:i?void 0:o};b0e(l)||Object.assign(m,p0e(e,m)),m.duration&&(m.duration=Va(m.duration)),m.repeatDelay&&(m.repeatDelay=Va(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let p=false;if((m.type===false||m.duration===0&&!m.repeatDelay)&&(m3(m),m.delay===0&&(p=true)),(Ts.instantAnimations||Ts.skipAnimations||o?.shouldSkipAnimations)&&(p=true,m3(m),m.delay=0),m.allowFlatten=!l.type&&!l.ease,p&&!i&&t.get()!==void 0){const g=v0e(m.keyframes,l);if(g!==void 0){Vn.update(()=>{m.onUpdate(g),m.onComplete();});return}}return l.isSync?new MT(m):new a0e(m)};function nD(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity();}),t}function PT(e,t,n,r){if(typeof t=="function"){const[o,i]=nD(r);t=t(n!==void 0?n:e.custom,o,i);}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=nD(r);t=t(n!==void 0?n:e.custom,o,i);}return t}function Gd(e,t,n){const r=e.getProps();return PT(r,t,n!==void 0?n:r.custom,e)}const AV=new Set(["width","height","top","left","right","bottom",...Ff]),rD=30,y0e=e=>!isNaN(parseFloat(e));class S0e{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=Mo.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty();},this.hasAnimated=false,this.setCurrent(t),this.owner=n.owner;}setCurrent(t){this.current=t,this.updatedAt=Mo.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=y0e(this.current));}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt;}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new gT);const r=this.events[t].add(n);return t==="change"?()=>{r(),Vn.read(()=>{this.events.change.getSize()||this.stop();});}:r}clearListeners(){for(const t in this.events)this.events[t].clear();}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n;}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t);}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r;}jump(t,n=true){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect();}dirty(){this.events.change?.notify(this.current);}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t);}removeDependent(t){this.dependents&&this.dependents.delete(t);}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Mo.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>rD)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,rD);return GH(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=true,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify();}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation();})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation();}isAnimating(){return !!this.animation}clearAnimation(){delete this.animation;}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect();}}function uu(e,t){return new S0e(e,t)}const h3=e=>Array.isArray(e);function C0e(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,uu(n));}function x0e(e){return h3(e)?e[e.length-1]||0:e}function w0e(e,t){const n=Gd(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const l=x0e(i[a]);C0e(e,a,l);}}const zr=e=>!!(e&&e.getVelocity);function $0e(e){return !!(zr(e)&&e.add)}function p3(e,t){const n=e.getValue("willChange");if($0e(n))return n.add(t);if(!n&&Ts.WillChange){const r=new Ts.WillChange("auto");e.addValue("willChange",r),r.add(t);}}function IT(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const E0e="framerAppearId",NV="data-"+IT(E0e);function PV(e){return e.props[NV]}function M0e({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==true;return t[n]=false,r}function OT(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;const u=i?.reduceMotion;r&&(i=r);const d=[],m=o&&e.animationState&&e.animationState.getState()[o];for(const p in l){const g=e.getValue(p,e.latestValues[p]??null),b=l[p];if(b===void 0||m&&M0e(m,p))continue;const y={delay:n,...AT(i||{},p)},S=g.get();if(S!==void 0&&!g.isAnimating&&!Array.isArray(b)&&b===S&&!y.velocity)continue;let C=false;if(window.MotionHandoffAnimation){const M=PV(e);if(M){const T=window.MotionHandoffAnimation(M,p,Vn);T!==null&&(y.startTime=T,C=true);}}p3(e,p);const w=u??e.shouldReduceMotion;g.start(NT(p,g,b,w&&AV.has(p)?{type:false}:y,e,C));const $=g.animation;$&&d.push($);}return a&&Promise.all(d).then(()=>{Vn.update(()=>{a&&w0e(e,a);});}),d}function g3(e,t,n={}){const r=Gd(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(OT(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:m,staggerDirection:p}=o;return R0e(e,t,u,d,m,p,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,d]=l==="beforeChildren"?[i,a]:[a,i];return u().then(()=>d())}else return Promise.all([i(),a(n.delay)])}function R0e(e,t,n=0,r=0,o=0,i=1,a){const l=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),l.push(g3(u,t,{...a,delay:n+(typeof r=="function"?0:r)+RV(e.variantChildren,u,r,o,i)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(l)}function T0e(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>g3(e,i,n));r=Promise.all(o);}else if(typeof t=="string")r=g3(e,t,n);else {const o=typeof t=="function"?Gd(e,t,n.custom):t;r=Promise.all(OT(e,o,n));}return r.then(()=>{e.notify("AnimationComplete",t);})}const A0e={test:e=>e==="auto",parse:e=>e},IV=e=>t=>t.test(e),OV=[kf,vt,ja,yl,rbe,nbe,A0e],oD=e=>OV.find(IV(e));function N0e(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||WH(e):true}const P0e=new Set(["brightness","contrast","saturate","opacity"]);function I0e(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ST)||[];if(!r)return e;const o=n.replace(r,"");let i=P0e.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const O0e=/\b([a-z-]*)\(.*?\)/gu,v3={...Ul,getAnimatableNone:e=>{const t=e.match(O0e);return t?t.map(I0e).join(" "):e}},iD={...kf,transform:Math.round},D0e={rotate:yl,rotateX:yl,rotateY:yl,rotateZ:yl,scale:yb,scaleX:yb,scaleY:yb,scaleZ:yb,skew:yl,skewX:yl,skewY:yl,distance:vt,translateX:vt,translateY:vt,translateZ:vt,x:vt,y:vt,z:vt,perspective:vt,transformPerspective:vt,opacity:yp,originX:U8,originY:U8,originZ:vt},DT={borderWidth:vt,borderTopWidth:vt,borderRightWidth:vt,borderBottomWidth:vt,borderLeftWidth:vt,borderRadius:vt,borderTopLeftRadius:vt,borderTopRightRadius:vt,borderBottomRightRadius:vt,borderBottomLeftRadius:vt,width:vt,maxWidth:vt,height:vt,maxHeight:vt,top:vt,right:vt,bottom:vt,left:vt,inset:vt,insetBlock:vt,insetBlockStart:vt,insetBlockEnd:vt,insetInline:vt,insetInlineStart:vt,insetInlineEnd:vt,padding:vt,paddingTop:vt,paddingRight:vt,paddingBottom:vt,paddingLeft:vt,paddingBlock:vt,paddingBlockStart:vt,paddingBlockEnd:vt,paddingInline:vt,paddingInlineStart:vt,paddingInlineEnd:vt,margin:vt,marginTop:vt,marginRight:vt,marginBottom:vt,marginLeft:vt,marginBlock:vt,marginBlockStart:vt,marginBlockEnd:vt,marginInline:vt,marginInlineStart:vt,marginInlineEnd:vt,fontSize:vt,backgroundPositionX:vt,backgroundPositionY:vt,...D0e,zIndex:iD,fillOpacity:yp,strokeOpacity:yp,numOctaves:iD},_0e={...DT,color:yr,backgroundColor:yr,outlineColor:yr,fill:yr,stroke:yr,borderColor:yr,borderTopColor:yr,borderRightColor:yr,borderBottomColor:yr,borderLeftColor:yr,filter:v3,WebkitFilter:v3},DV=e=>_0e[e];function _V(e,t){let n=DV(e);return n!==v3&&(n=Ul),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const L0e=new Set(["auto","none","0"]);function z0e(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!L0e.has(i)&&Sp(i).values.length&&(o=e[r]),r++;}if(o&&n)for(const i of t)e[i]=_V(n,o);}class B0e extends RT{constructor(t,n,r,o,i){super(t,n,r,o,i,true);}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let m=0;m<t.length;m++){let p=t[m];if(typeof p=="string"&&(p=p.trim(),yT(p))){const g=TV(p,n.current);g!==void 0&&(t[m]=g),m===t.length-1&&(this.finalKeyframe=p);}}if(this.resolveNoneKeyframes(),!AV.has(r)||t.length!==2)return;const[o,i]=t,a=oD(o),l=oD(i),u=j8(o),d=j8(i);if(u!==d&&Tl[r]){this.needsMeasurement=true;return}if(a!==l)if(Z8(a)&&Z8(l))for(let m=0;m<t.length;m++){const p=t[m];typeof p=="string"&&(t[m]=parseFloat(p));}else Tl[r]&&(this.needsMeasurement=true);}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||N0e(t[o]))&&r.push(o);r.length&&z0e(t,r,n);}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Tl[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,false);}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,false);const i=r.length-1,a=r[i];r[i]=Tl[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([l,u])=>{t.getValue(l).set(u);}),this.resolveNoneKeyframes();}}function _T(e,t,n){if(e==null)return [];if(e instanceof EventTarget)return [e];if(typeof e=="string"){let r=document;t&&(r=t.current);const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(r=>r!=null)}const LV=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function b3(e){return qH(e)&&"offsetHeight"in e}const{schedule:LT}=aV(queueMicrotask,false),aa={x:false,y:false};function zV(){return aa.x||aa.y}function k0e(e){return e==="x"||e==="y"?aa[e]?null:(aa[e]=true,()=>{aa[e]=false;}):aa.x||aa.y?null:(aa.x=aa.y=true,()=>{aa.x=aa.y=false;})}function BV(e,t){const n=_T(e),r=new AbortController,o={passive:true,...t,signal:r.signal};return [n,o,()=>r.abort()]}function F0e(e){return !(e.pointerType==="touch"||zV())}function H0e(e,t,n={}){const[r,o,i]=BV(e,n);return r.forEach(a=>{let l=false,u=false,d;const m=()=>{a.removeEventListener("pointerleave",y);},p=C=>{d&&(d(C),d=void 0),m();},g=C=>{l=false,window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",g),u&&(u=false,p(C));},b=()=>{l=true,window.addEventListener("pointerup",g,o),window.addEventListener("pointercancel",g,o);},y=C=>{if(C.pointerType!=="touch"){if(l){u=true;return}p(C);}},S=C=>{if(!F0e(C))return;u=false;const w=t(a,C);typeof w=="function"&&(d=w,a.addEventListener("pointerleave",y,o));};a.addEventListener("pointerenter",S,o),a.addEventListener("pointerdown",b,o);}),i}const kV=(e,t)=>t?e===t?true:kV(e,t.parentElement):false,zT=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==false,V0e=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function j0e(e){return V0e.has(e.tagName)||e.isContentEditable===true}const U0e=new Set(["INPUT","SELECT","TEXTAREA"]);function q0e(e){return U0e.has(e.tagName)||e.isContentEditable===true}const Jb=new WeakSet;function aD(e){return t=>{t.key==="Enter"&&e(t);}}function hw(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:true,bubbles:true}));}const W0e=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=aD(()=>{if(Jb.has(n))return;hw(n,"down");const o=aD(()=>{hw(n,"up");}),i=()=>hw(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t);});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t);};function sD(e){return zT(e)&&!zV()}function G0e(e,t,n={}){const[r,o,i]=BV(e,n),a=l=>{const u=l.currentTarget;if(!sD(l))return;Jb.add(u);const d=t(u,l),m=(b,y)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",g),Jb.has(u)&&Jb.delete(u),sD(b)&&typeof d=="function"&&d(b,{success:y});},p=b=>{m(b,u===window||u===document||n.useGlobalTarget||kV(u,b.target));},g=b=>{m(b,false);};window.addEventListener("pointerup",p,o),window.addEventListener("pointercancel",g,o);};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",a,o),b3(l)&&(l.addEventListener("focus",d=>W0e(d,o)),!j0e(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0));}),i}function C1(e){return qH(e)&&"ownerSVGElement"in e}const e0=new WeakMap;let t0;const FV=(e,t,n)=>(r,o)=>o&&o[0]?o[0][e+"Size"]:C1(r)&&"getBBox"in r?r.getBBox()[t]:r[n],K0e=FV("inline","width","offsetWidth"),Y0e=FV("block","height","offsetHeight");function X0e({target:e,borderBoxSize:t}){e0.get(e)?.forEach(n=>{n(e,{get width(){return K0e(e,t)},get height(){return Y0e(e,t)}});});}function Q0e(e){e.forEach(X0e);}function Z0e(){typeof ResizeObserver>"u"||(t0=new ResizeObserver(Q0e));}function J0e(e,t){t0||Z0e();const n=_T(e);return n.forEach(r=>{let o=e0.get(r);o||(o=new Set,e0.set(r,o)),o.add(t),t0?.observe(r);}),()=>{n.forEach(r=>{const o=e0.get(r);o?.delete(t),o?.size||t0?.unobserve(r);});}}const n0=new Set;let Ld;function eye(){Ld=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};n0.forEach(t=>t(e));},window.addEventListener("resize",Ld);}function tye(e){return n0.add(e),Ld||eye(),()=>{n0.delete(e),!n0.size&&typeof Ld=="function"&&(window.removeEventListener("resize",Ld),Ld=void 0);}}function lD(e,t){return typeof e=="function"?tye(e):J0e(e,t)}function HV(e){return C1(e)&&e.tagName==="svg"}const nye=[...OV,yr,Ul],rye=e=>nye.find(IV(e)),cD=()=>({translate:0,scale:1,origin:0,originPoint:0}),zd=()=>({x:cD(),y:cD()}),uD=()=>({min:0,max:0}),br=()=>({x:uD(),y:uD()}),cy={current:null},BT={current:false},oye=typeof window<"u";function VV(){if(BT.current=true,!!oye)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>cy.current=e.matches;e.addEventListener("change",t),t();}else cy.current=false;}const xp=new WeakMap;function x1(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function wp(e){return typeof e=="string"||Array.isArray(e)}const kT=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],FT=["initial",...kT];function w1(e){return x1(e.animate)||FT.some(t=>wp(e[t]))}function jV(e){return !!(w1(e)||e.variants)}function iye(e,t,n){for(const r in t){const o=t[r],i=n[r];if(zr(o))e.addValue(r,o);else if(zr(i))e.addValue(r,uu(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===true?a.jump(o):a.hasAnimated||a.set(o);}else {const a=e.getStaticValue(r);e.addValue(r,uu(a!==void 0?a:o,{owner:e}));}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const dD=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let uy={};function UV(e){uy=e;}function aye(){return uy}class qV{scrapeMotionValuesFromProps(t,n,r){return {}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,skipAnimations:i,blockInitialAnimation:a,visualState:l},u={}){this.current=null,this.children=new Set,this.isVariantNode=false,this.isControllingVariants=false,this.shouldReduceMotion=null,this.shouldSkipAnimations=false,this.values=new Map,this.KeyframeResolver=RT,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection));},this.renderScheduledAt=0,this.scheduleRender=()=>{const b=Mo.now();this.renderScheduledAt<b&&(this.renderScheduledAt=b,Vn.render(this.render,false,true));};const{latestValues:d,renderState:m}=l;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=m,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.skipAnimationsConfig=i,this.options=u,this.blockInitialAnimation=!!a,this.isControllingVariants=w1(n),this.isVariantNode=jV(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...g}=this.scrapeMotionValuesFromProps(n,{},this);for(const b in g){const y=g[b];d[b]!==void 0&&zr(y)&&y.set(d[b]);}}mount(t){this.current=t,xp.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=false:this.reducedMotionConfig==="always"?this.shouldReduceMotion=true:(BT.current||VV(),this.shouldReduceMotion=cy.current),this.shouldSkipAnimations=this.skipAnimationsConfig??false,this.parent?.addChild(this),this.update(this.props,this.presenceContext);}unmount(){this.projection&&this.projection.unmount(),jl(this.notifyUpdate),jl(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=false);}this.current=null;}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t);}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t);}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Hf.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Vn.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=true),this.scheduleRender();});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i&&i(),n.owner&&n.stop();});}sortNodePosition(t){return !this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in uy){const n=uy[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=true);}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props);}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):br()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n;}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<dD.length;r++){const o=dD[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,a=t[i];a&&(this.propEventSubscriptions[o]=this.on(o,a));}this.prevMotionValues=iye(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue();}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get());}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState);}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=uu(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(UH(r)||WH(r))?r=parseFloat(r):!rye(r)&&Ul.test(n)&&(r=_V(t,n)),this.setBaseTarget(t,zr(r)?r.get():r)),zr(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n;}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=PT(this.props,n,this.presenceContext?.custom);i&&(r=i[t]);}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!zr(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new gT),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n);}scheduleRenderMicrotask(){LT.render(this.render);}}class WV extends qV{constructor(){super(...arguments),this.KeyframeResolver=B0e;}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t];}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;zr(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`);}));}}class rc{constructor(t){this.isMounted=false,this.node=t;}update(){}}function GV({top:e,left:t,right:n,bottom:r}){return {x:{min:t,max:n},y:{min:e,max:r}}}function sye({x:e,y:t}){return {top:t.min,right:e.max,bottom:t.max,left:e.min}}function lye(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return {top:n.y,left:n.x,bottom:r.y,right:r.x}}function pw(e){return e===void 0||e===1}function y3({scale:e,scaleX:t,scaleY:n}){return !pw(e)||!pw(t)||!pw(n)}function _c(e){return y3(e)||KV(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function KV(e){return fD(e.x)||fD(e.y)}function fD(e){return e&&e!=="0%"}function dy(e,t,n){const r=e-n,o=t*r;return n+o}function mD(e,t,n,r,o){return o!==void 0&&(e=dy(e,o,r)),dy(e,n,r)+t}function S3(e,t=0,n=1,r,o){e.min=mD(e.min,t,n,r,o),e.max=mD(e.max,t,n,r,o);}function YV(e,{x:t,y:n}){S3(e.x,t.translate,t.scale,t.originPoint),S3(e.y,n.translate,n.scale,n.originPoint);}const hD=.999999999999,pD=1.0000000000001;function cye(e,t,n,r=false){const o=n.length;if(!o)return;t.x=t.y=1;let i,a;for(let l=0;l<o;l++){i=n[l],a=i.projectionDelta;const{visualElement:u}=i.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&kd(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,YV(e,a)),r&&_c(i.latestValues)&&kd(e,i.latestValues));}t.x<pD&&t.x>hD&&(t.x=1),t.y<pD&&t.y>hD&&(t.y=1);}function Bd(e,t){e.min=e.min+t,e.max=e.max+t;}function gD(e,t,n,r,o=.5){const i=Zn(e.min,e.max,o);S3(e,t,n,i,r);}function kd(e,t){gD(e.x,t.x,t.scaleX,t.scale,t.originX),gD(e.y,t.y,t.scaleY,t.scale,t.originY);}function XV(e,t){return GV(lye(e.getBoundingClientRect(),t))}function uye(e,t,n){const r=XV(e,n),{scroll:o}=t;return o&&(Bd(r.x,o.offset.x),Bd(r.y,o.offset.y)),r}const dye={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},fye=Ff.length;function mye(e,t,n){let r="",o=true;for(let i=0;i<fye;i++){const a=Ff[i],l=e[a];if(l===void 0)continue;let u=true;if(typeof l=="number")u=l===(a.startsWith("scale")?1:0);else {const d=parseFloat(l);u=a.startsWith("scale")?d===1:d===0;}if(!u||n){const d=LV(l,DT[a]);if(!u){o=false;const m=dye[a]||a;r+=`${m}(${d}) `;}n&&(t[a]=d);}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function HT(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=false,l=false;for(const u in t){const d=t[u];if(Hf.has(u)){a=true;continue}else if(lV(u)){o[u]=d;continue}else {const m=LV(d,DT[u]);u.startsWith("origin")?(l=true,i[u]=m):r[u]=m;}}if(t.transform||(a||n?r.transform=mye(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:d="50%",originZ:m=0}=i;r.transformOrigin=`${u} ${d} ${m}`;}}function QV(e,{style:t,vars:n},r,o){const i=e.style;let a;for(a in t)i[a]=t[a];o?.applyProjectionStyles(i,r);for(a in n)i.setProperty(a,n[a]);}function vD(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const eh={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(vt.test(e))e=parseFloat(e);else return e;const n=vD(e,t.target.x),r=vD(e,t.target.y);return `${n}% ${r}%`}},hye={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Ul.parse(e);if(o.length>5)return r;const i=Ul.createTransformer(e),a=typeof o[0]!="number"?1:0,l=n.x.scale*t.x,u=n.y.scale*t.y;o[0+a]/=l,o[1+a]/=u;const d=Zn(l,u,.5);return typeof o[2+a]=="number"&&(o[2+a]/=d),typeof o[3+a]=="number"&&(o[3+a]/=d),i(o)}},C3={borderRadius:{...eh,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:eh,borderTopRightRadius:eh,borderBottomLeftRadius:eh,borderBottomRightRadius:eh,boxShadow:hye};function ZV(e,{layout:t,layoutId:n}){return Hf.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!C3[e]||e==="opacity")}function VT(e,t,n){const r=e.style,o=t?.style,i={};if(!r)return i;for(const a in r)(zr(r[a])||o&&zr(o[a])||ZV(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}function pye(e){return window.getComputedStyle(e)}class JV extends WV{constructor(){super(...arguments),this.type="html",this.renderInstance=QV;}readValueFromInstance(t,n){if(Hf.has(n))return this.projection?.isProjecting?l3(n):zbe(t,n);{const r=pye(t),o=(lV(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return XV(t,n)}build(t,n,r){HT(t,n,r.transformTemplate);}scrapeMotionValuesFromProps(t,n,r){return VT(t,n,r)}}function gye(e,t){return e in t}class vye extends qV{constructor(){super(...arguments),this.type="object";}readValueFromInstance(t,n){if(gye(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t];}measureInstanceViewportBox(){return br()}build(t,n){Object.assign(t.output,n);}renderInstance(t,{output:n}){Object.assign(t,n);}sortInstanceNodePosition(){return 0}}const bye={offset:"stroke-dashoffset",array:"stroke-dasharray"},yye={offset:"strokeDashoffset",array:"strokeDasharray"};function Sye(e,t,n=1,r=0,o=true){e.pathLength=1;const i=o?bye:yye;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`;}const Cye=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function ej(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:a=0,...l},u,d,m){if(HT(e,l,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:g}=e;p.transform&&(g.transform=p.transform,delete p.transform),(g.transform||p.transformOrigin)&&(g.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),g.transform&&(g.transformBox=m?.transformBox??"fill-box",delete p.transformBox);for(const b of Cye)p[b]!==void 0&&(g[b]=p[b],delete p[b]);t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),o!==void 0&&Sye(p,o,i,a,false);}const tj=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),nj=e=>typeof e=="string"&&e.toLowerCase()==="svg";function xye(e,t,n,r){QV(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(tj.has(o)?o:IT(o),t.attrs[o]);}function rj(e,t,n){const r=VT(e,t,n);for(const o in e)if(zr(e[o])||zr(t[o])){const i=Ff.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o];}return r}class oj extends WV{constructor(){super(...arguments),this.type="svg",this.isSVGTag=false,this.measureInstanceViewportBox=br;}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Hf.has(n)){const r=DV(n);return r&&r.default||0}return n=tj.has(n)?n:IT(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return rj(t,n,r)}build(t,n,r){ej(t,n,this.isSVGTag,r.transformTemplate,r.style);}renderInstance(t,n,r,o){xye(t,n,r,o);}mount(t){this.isSVGTag=nj(t.tagName),super.mount(t);}}const wye=FT.length;function ij(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?ij(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<wye;n++){const r=FT[n],o=e.props[r];(wp(o)||o===false)&&(t[r]=o);}return t}function aj(e,t){if(!Array.isArray(t))return false;const n=t.length;if(n!==e.length)return false;for(let r=0;r<n;r++)if(t[r]!==e[r])return false;return true}const $ye=[...kT].reverse(),Eye=kT.length;function Mye(e){return t=>Promise.all(t.map(({animation:n,options:r})=>T0e(e,n,r)))}function Rye(e){let t=Mye(e),n=bD(),r=true;const o=u=>(d,m)=>{const p=Gd(e,m,u==="exit"?e.presenceContext?.custom:void 0);if(p){const{transition:g,transitionEnd:b,...y}=p;d={...d,...y,...b};}return d};function i(u){t=u(e);}function a(u){const{props:d}=e,m=ij(e.parent)||{},p=[],g=new Set;let b={},y=1/0;for(let C=0;C<Eye;C++){const w=$ye[C],$=n[w],M=d[w]!==void 0?d[w]:m[w],T=wp(M),R=w===u?$.isActive:null;R===false&&(y=C);let I=M===m[w]&&M!==d[w]&&T;if(I&&r&&e.manuallyAnimateOnMount&&(I=false),$.protectedKeys={...b},!$.isActive&&R===null||!M&&!$.prevProp||x1(M)||typeof M=="boolean")continue;const N=Tye($.prevProp,M);let P=N||w===u&&$.isActive&&!I&&T||C>y&&T,O=false;const _=Array.isArray(M)?M:[M];let L=_.reduce(o(w),{});R===false&&(L={});const{prevResolvedValues:j={}}=$,U={...j,...L},q=F=>{P=true,g.has(F)&&(O=true,g.delete(F)),$.needsAnimating[F]=true;const W=e.getValue(F);W&&(W.liveStyle=false);};for(const F in U){const W=L[F],K=j[F];if(b.hasOwnProperty(F))continue;let Q=false;h3(W)&&h3(K)?Q=!aj(W,K):Q=W!==K,Q?W!=null?q(F):g.add(F):W!==void 0&&g.has(F)?q(F):$.protectedKeys[F]=true;}$.prevProp=M,$.prevResolvedValues=L,$.isActive&&(b={...b,...L}),r&&e.blockInitialAnimation&&(P=false);const V=I&&N;P&&(!V||O)&&p.push(..._.map(F=>{const W={type:w};if(typeof F=="string"&&r&&!V&&e.manuallyAnimateOnMount&&e.parent){const{parent:K}=e,Q=Gd(K,F);if(K.enteringChildren&&Q){const{delayChildren:D}=Q.transition||{};W.delay=RV(K.enteringChildren,e,D);}}return {animation:F,options:W}}));}if(g.size){const C={};if(typeof d.initial!="boolean"){const w=Gd(e,Array.isArray(d.initial)?d.initial[0]:d.initial);w&&w.transition&&(C.transition=w.transition);}g.forEach(w=>{const $=e.getBaseTarget(w),M=e.getValue(w);M&&(M.liveStyle=true),C[w]=$??null;}),p.push({animation:C});}let S=!!p.length;return r&&(d.initial===false||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(S=false),r=false,S?t(p):Promise.resolve()}function l(u,d){if(n[u].isActive===d)return Promise.resolve();e.variantChildren?.forEach(p=>p.animationState?.setActive(u,d)),n[u].isActive=d;const m=a(u);for(const p in n)n[p].protectedKeys={};return m}return {animateChanges:a,setActive:l,setAnimateFunction:i,getState:()=>n,reset:()=>{n=bD();}}}function Tye(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!aj(t,e):false}function Ac(e=false){return {isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function bD(){return {animate:Ac(true),whileInView:Ac(),whileHover:Ac(),whileTap:Ac(),whileDrag:Ac(),whileFocus:Ac(),exit:Ac()}}function yD(e,t){e.min=t.min,e.max=t.max;}function na(e,t){yD(e.x,t.x),yD(e.y,t.y);}function SD(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin;}const sj=1e-4,Aye=1-sj,Nye=1+sj,lj=.01,Pye=0-lj,Iye=0+lj;function Ro(e){return e.max-e.min}function Oye(e,t,n){return Math.abs(e-t)<=n}function CD(e,t,n,r=.5){e.origin=r,e.originPoint=Zn(t.min,t.max,e.origin),e.scale=Ro(n)/Ro(t),e.translate=Zn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Aye&&e.scale<=Nye||isNaN(e.scale))&&(e.scale=1),(e.translate>=Pye&&e.translate<=Iye||isNaN(e.translate))&&(e.translate=0);}function Bh(e,t,n,r){CD(e.x,t.x,n.x,r?r.originX:void 0),CD(e.y,t.y,n.y,r?r.originY:void 0);}function xD(e,t,n){e.min=n.min+t.min,e.max=e.min+Ro(t);}function Dye(e,t,n){xD(e.x,t.x,n.x),xD(e.y,t.y,n.y);}function wD(e,t,n){e.min=t.min-n.min,e.max=e.min+Ro(t);}function fy(e,t,n){wD(e.x,t.x,n.x),wD(e.y,t.y,n.y);}function $D(e,t,n,r,o){return e-=t,e=dy(e,1/n,r),o!==void 0&&(e=dy(e,1/o,r)),e}function _ye(e,t=0,n=1,r=.5,o,i=e,a=e){if(ja.test(t)&&(t=parseFloat(t),t=Zn(a.min,a.max,t/100)-a.min),typeof t!="number")return;let l=Zn(i.min,i.max,r);e===i&&(l-=t),e.min=$D(e.min,t,n,l,o),e.max=$D(e.max,t,n,l,o);}function ED(e,t,[n,r,o],i,a){_ye(e,t[n],t[r],t[o],t.scale,i,a);}const Lye=["x","scaleX","originX"],zye=["y","scaleY","originY"];function MD(e,t,n,r){ED(e.x,t,Lye,n?n.x:void 0,r?r.x:void 0),ED(e.y,t,zye,n?n.y:void 0,r?r.y:void 0);}function RD(e){return e.translate===0&&e.scale===1}function cj(e){return RD(e.x)&&RD(e.y)}function TD(e,t){return e.min===t.min&&e.max===t.max}function Bye(e,t){return TD(e.x,t.x)&&TD(e.y,t.y)}function AD(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function uj(e,t){return AD(e.x,t.x)&&AD(e.y,t.y)}function ND(e){return Ro(e.x)/Ro(e.y)}function PD(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Bi(e){return [e("x"),e("y")]}function kye(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=n?.z||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:m,rotateX:p,rotateY:g,skewX:b,skewY:y}=n;d&&(r=`perspective(${d}px) ${r}`),m&&(r+=`rotate(${m}deg) `),p&&(r+=`rotateX(${p}deg) `),g&&(r+=`rotateY(${g}deg) `),b&&(r+=`skewX(${b}deg) `),y&&(r+=`skewY(${y}deg) `);}const l=e.x.scale*t.x,u=e.y.scale*t.y;return (l!==1||u!==1)&&(r+=`scale(${l}, ${u})`),r||"none"}const dj=["TopLeft","TopRight","BottomLeft","BottomRight"],Fye=dj.length,ID=e=>typeof e=="string"?parseFloat(e):e,OD=e=>typeof e=="number"||vt.test(e);function Hye(e,t,n,r,o,i){o?(e.opacity=Zn(0,n.opacity??1,Vye(r)),e.opacityExit=Zn(t.opacity??1,0,jye(r))):i&&(e.opacity=Zn(t.opacity??1,n.opacity??1,r));for(let a=0;a<Fye;a++){const l=`border${dj[a]}Radius`;let u=DD(t,l),d=DD(n,l);if(u===void 0&&d===void 0)continue;u||(u=0),d||(d=0),u===0||d===0||OD(u)===OD(d)?(e[l]=Math.max(Zn(ID(u),ID(d),r),0),(ja.test(d)||ja.test(u))&&(e[l]+="%")):e[l]=d;}(t.rotate||n.rotate)&&(e.rotate=Zn(t.rotate||0,n.rotate||0,r));}function DD(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Vye=fj(0,.5,eV),jye=fj(.5,.95,Wi);function fj(e,t,n){return r=>r<e?0:r>t?1:n(df(e,t,r))}function mj(e,t,n){const r=zr(e)?e:uu(e);return r.start(NT("",r,t,n)),r.animation}function $p(e,t,n,r={passive:true}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Uye=(e,t)=>e.depth-t.depth;class qye{constructor(){this.children=[],this.isDirty=false;}add(t){mT(this.children,t),this.isDirty=true;}remove(t){cg(this.children,t),this.isDirty=true;}forEach(t){this.isDirty&&this.children.sort(Uye),this.isDirty=false,this.children.forEach(t);}}function Wye(e,t){const n=Mo.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(jl(r),e(i-t));};return Vn.setup(r,true),()=>jl(r)}function r0(e){return zr(e)?e.get():e}class Gye{constructor(){this.members=[];}add(t){mT(this.members,t),t.scheduleRender();}remove(t){if(cg(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n);}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return false;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==false){r=i;break}}return r?(this.promote(r),true):false}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender();const o=r.options.layoutDependency,i=t.options.layoutDependency;o!==void 0&&i!==void 0&&o===i||(t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=true),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=true));const{crossfade:l}=t.options;l===false&&r.hide();}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete();});}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(false);});}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0);}}const o0={hasAnimatedSinceResize:true,hasEverUpdated:false},gw=["","X","Y","Z"],Kye=1e3;let Yye=0;function vw(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0));}function hj(e){if(e.hasCheckedOptimisedAppear=true,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=PV(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Vn,!(o||i));}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&hj(r);}function pj({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},l=t?.()){this.id=Yye++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=false,this.isAnimationBlocked=false,this.isLayoutDirty=false,this.isProjectionDirty=false,this.isSharedProjectionDirty=false,this.isTransformDirty=false,this.updateManuallyBlocked=false,this.updateBlockedByResize=false,this.isUpdating=false,this.isSVG=false,this.needsReset=false,this.shouldResetTransform=false,this.hasCheckedOptimisedAppear=false,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=false,this.layoutVersion=0,this.updateScheduled=false,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=false,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=false,this.clearAllSnapshots());},this.updateProjection=()=>{this.projectionUpdateScheduled=false,this.nodes.forEach(Zye),this.nodes.forEach(n1e),this.nodes.forEach(r1e),this.nodes.forEach(Jye);},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=false,this.isVisible=true,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=true;this.root===this&&(this.nodes=new qye);}addEventListener(a,l){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new gT),this.eventHandlers.get(a).add(l)}notifyListeners(a,...l){const u=this.eventHandlers.get(a);u&&u.notify(...l);}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=C1(a)&&!HV(a),this.instance=a;const{layoutId:l,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||l)&&(this.isLayoutDirty=true),e){let m,p=0;const g=()=>this.root.updateBlockedByResize=false;Vn.read(()=>{p=window.innerWidth;}),e(a,()=>{const b=window.innerWidth;b!==p&&(p=b,this.root.updateBlockedByResize=true,m&&m(),m=Wye(g,250),o0.hasAnimatedSinceResize&&(o0.hasAnimatedSinceResize=false,this.nodes.forEach(zD)));});}l&&this.root.registerSharedNode(l,this),this.options.animate!==false&&d&&(l||u)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:p,hasRelativeLayoutChanged:g,layout:b})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||d.getDefaultTransition()||l1e,{onLayoutAnimationStart:S,onLayoutAnimationComplete:C}=d.getProps(),w=!this.targetLayout||!uj(this.targetLayout,b),$=!p&&g;if(this.options.layoutRoot||this.resumeFrom||$||p&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const M={...AT(y,"layout"),onPlay:S,onComplete:C};(d.shouldReduceMotion||this.options.layoutRoot)&&(M.delay=0,M.type=false),this.startAnimation(M),this.setAnimationOrigin(m,$);}else p||zD(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=b;});}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),jl(this.updateProjection);}blockUpdate(){this.updateManuallyBlocked=true;}unblockUpdate(){this.updateManuallyBlocked=false;}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||false}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=true,this.nodes&&this.nodes.forEach(o1e),this.animationId++);}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=true){if(this.root.hasTreeAnimated=true,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&hj(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=true;for(let m=0;m<this.path.length;m++){const p=this.path[m];p.shouldResetTransform=true,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(false);}const{layoutId:l,layout:u}=this.options;if(l===void 0&&!u)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate");}update(){if(this.updateScheduled=false,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(_D);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(LD);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=false,this.nodes.forEach(t1e),this.nodes.forEach(Xye),this.nodes.forEach(Qye)):this.nodes.forEach(LD),this.clearAllSnapshots();const l=Mo.now();Kr.delta=Wa(0,1e3/60,l-Kr.timestamp),Kr.timestamp=l,Kr.isProcessing=true,lw.update.process(Kr),lw.preRender.process(Kr),lw.render.process(Kr),Kr.isProcessing=false;}didUpdate(){this.updateScheduled||(this.updateScheduled=true,LT.read(this.scheduleUpdate));}clearAllSnapshots(){this.nodes.forEach(e1e),this.sharedNodes.forEach(i1e);}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=true,Vn.preRender(this.updateProjection,false,true));}scheduleCheckAfterUnmount(){Vn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed();});}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ro(this.snapshot.measuredBox.x)&&!Ro(this.snapshot.measuredBox.y)&&(this.snapshot=void 0));}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const a=this.layout;this.layout=this.measure(false),this.layoutVersion++,this.layoutCorrected=br(),this.isLayoutDirty=false,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0);}updateScroll(a="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(l=false),l&&this.instance){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u};}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!cj(this.projectionDelta),u=this.getTransformTemplate(),d=u?u(this.latestValues,""):void 0,m=d!==this.prevTransformTemplateValue;a&&this.instance&&(l||_c(this.latestValues)||m)&&(o(this.instance,d),this.shouldResetTransform=false,this.scheduleRender());}measure(a=true){const l=this.measurePageBox();let u=this.removeElementScroll(l);return a&&(u=this.removeTransform(u)),c1e(u),{animationId:this.root.animationId,measuredBox:l,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return br();const l=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(u1e))){const{scroll:d}=this.root;d&&(Bd(l.x,d.offset.x),Bd(l.y,d.offset.y));}return l}removeElementScroll(a){const l=br();if(na(l,a),this.scroll?.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:m,options:p}=d;d!==this.root&&m&&p.layoutScroll&&(m.wasRoot&&na(l,a),Bd(l.x,m.offset.x),Bd(l.y,m.offset.y));}return l}applyTransform(a,l=false){const u=br();na(u,a);for(let d=0;d<this.path.length;d++){const m=this.path[d];!l&&m.options.layoutScroll&&m.scroll&&m!==m.root&&kd(u,{x:-m.scroll.offset.x,y:-m.scroll.offset.y}),_c(m.latestValues)&&kd(u,m.latestValues);}return _c(this.latestValues)&&kd(u,this.latestValues),u}removeTransform(a){const l=br();na(l,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!d.instance||!_c(d.latestValues))continue;y3(d.latestValues)&&d.updateSnapshot();const m=br(),p=d.measurePageBox();na(m,p),MD(l,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,m);}return _c(this.latestValues)&&MD(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=true;}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:true};}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=false;}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Kr.timestamp&&this.relativeParent.resolveTargetDelta(true);}resolveTargetDelta(a=false){const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(a||u&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:p}=this.options;if(!this.layout||!(m||p))return;this.resolvedRelativeTargetAt=Kr.timestamp;const g=this.getClosestProjectingParent();g&&this.linkedParentVersion!==g.layoutVersion&&!g.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(g&&g.layout?this.createRelativeTarget(g,this.layout.layoutBox,g.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=br(),this.targetWithTransforms=br()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Dye(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):na(this.target,this.layout.layoutBox),YV(this.target,this.targetDelta)):na(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=false,g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?this.createRelativeTarget(g,this.target,g.target):this.relativeParent=this.relativeTarget=void 0));}getClosestProjectingParent(){if(!(!this.parent||y3(this.parent.latestValues)||KV(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return !!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,l,u){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=br(),this.relativeTargetOrigin=br(),fy(this.relativeTargetOrigin,l,u),na(this.relativeTarget,this.relativeTargetOrigin);}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0;}calcProjection(){const a=this.getLead(),l=!!this.resumingFrom||this!==a;let u=true;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(u=false),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=false),this.resolvedRelativeTargetAt===Kr.timestamp&&(u=false),u)return;const{layout:d,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||m))return;na(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,g=this.treeScale.y;cye(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=br());const{target:b}=a;if(!b){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(SD(this.prevProjectionDelta.x,this.projectionDelta.x),SD(this.prevProjectionDelta.y,this.projectionDelta.y)),Bh(this.projectionDelta,this.layoutCorrected,b,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==g||!PD(this.projectionDelta.x,this.prevProjectionDelta.x)||!PD(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=true,this.scheduleRender(),this.notifyListeners("projectionUpdate",b));}hide(){this.isVisible=false;}show(){this.isVisible=true;}scheduleRender(a=true){if(this.options.visualElement?.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender();}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0);}createProjectionDeltas(){this.prevProjectionDelta=zd(),this.projectionDelta=zd(),this.projectionDeltaWithTransform=zd();}setAnimationOrigin(a,l=false){const u=this.snapshot,d=u?u.latestValues:{},m={...this.latestValues},p=zd();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const g=br(),b=u?u.source:void 0,y=this.layout?this.layout.source:void 0,S=b!==y,C=this.getStack(),w=!C||C.members.length<=1,$=!!(S&&!w&&this.options.crossfade===true&&!this.path.some(s1e));this.animationProgress=0;let M;this.mixTargetDelta=T=>{const R=T/1e3;BD(p.x,a.x,R),BD(p.y,a.y,R),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(fy(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),a1e(this.relativeTarget,this.relativeTargetOrigin,g,R),M&&Bye(this.relativeTarget,M)&&(this.isProjectionDirty=false),M||(M=br()),na(M,this.relativeTarget)),S&&(this.animationValues=m,Hye(m,d,this.latestValues,R,$,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=R;},this.mixTargetDelta(this.options.layoutRoot?1e3:0);}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(jl(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Vn.update(()=>{o0.hasAnimatedSinceResize=true,this.motionValue||(this.motionValue=uu(0)),this.currentAnimation=mj(this.motionValue,[0,1e3],{...a,velocity:0,isSync:true,onUpdate:l=>{this.mixTargetDelta(l),a.onUpdate&&a.onUpdate(l);},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation();}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0;});}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete");}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Kye),this.currentAnimation.stop()),this.completeAnimation();}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:l,target:u,layout:d,latestValues:m}=a;if(!(!l||!u||!d)){if(this!==a&&this.layout&&d&&gj(this.options.animationType,this.layout.layoutBox,d.layoutBox)){u=this.target||br();const p=Ro(this.layout.layoutBox.x);u.x.min=a.target.x.min,u.x.max=u.x.min+p;const g=Ro(this.layout.layoutBox.y);u.y.min=a.target.y.min,u.y.max=u.y.min+g;}na(l,u),kd(l,m),Bh(this.projectionDeltaWithTransform,this.layoutCorrected,l,m);}}registerSharedNode(a,l){this.sharedNodes.has(a)||this.sharedNodes.set(a,new Gye),this.sharedNodes.get(a).add(l);const d=l.options.initialPromotionConfig;l.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(l):void 0});}isLead(){const a=this.getStack();return a?a.lead===this:true}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:l,preserveFollowOpacity:u}={}){const d=this.getStack();d&&d.promote(this,u),a&&(this.projectionDelta=void 0,this.needsReset=true),l&&this.setOptions({transition:l});}relegate(){const a=this.getStack();return a?a.relegate(this):false}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let l=false;const{latestValues:u}=a;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(l=true),!l)return;const d={};u.z&&vw("z",a,d,this.animationValues);for(let m=0;m<gw.length;m++)vw(`rotate${gw[m]}`,a,d,this.animationValues),vw(`skew${gw[m]}`,a,d,this.animationValues);a.render();for(const m in d)a.setStaticValue(m,d[m]),this.animationValues&&(this.animationValues[m]=d[m]);a.scheduleRender();}applyProjectionStyles(a,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=false,a.visibility="",a.opacity="",a.pointerEvents=r0(l?.pointerEvents)||"",a.transform=u?u(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=r0(l?.pointerEvents)||""),this.hasProjected&&!_c(this.latestValues)&&(a.transform=u?u({},""):"none",this.hasProjected=false);return}a.visibility="";const m=d.animationValues||d.latestValues;this.applyTransformsToTarget();let p=kye(this.projectionDeltaWithTransform,this.treeScale,m);u&&(p=u(m,p)),a.transform=p;const{x:g,y:b}=this.projectionDelta;a.transformOrigin=`${g.origin*100}% ${b.origin*100}% 0`,d.animationValues?a.opacity=d===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:a.opacity=d===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const y in C3){if(m[y]===void 0)continue;const{correct:S,applyTo:C,isCSSVariable:w}=C3[y],$=p==="none"?m[y]:S(m[y],d);if(C){const M=C.length;for(let T=0;T<M;T++)a[C[T]]=$;}else w?this.options.visualElement.renderState.vars[y]=$:a[y]=$;}this.options.layoutId&&(a.pointerEvents=d===this?r0(l?.pointerEvents)||"":"none");}clearSnapshot(){this.resumeFrom=this.snapshot=void 0;}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(_D),this.root.sharedNodes.clear();}}}function Xye(e){e.updateLayout();}function Qye(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;o==="size"?Bi(m=>{const p=i?t.measuredBox[m]:t.layoutBox[m],g=Ro(p);p.min=n[m].min,p.max=p.min+g;}):gj(o,t.layoutBox,n)&&Bi(m=>{const p=i?t.measuredBox[m]:t.layoutBox[m],g=Ro(n[m]);p.max=p.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=true,e.relativeTarget[m].max=e.relativeTarget[m].min+g);});const a=zd();Bh(a,n,t.layoutBox);const l=zd();i?Bh(l,e.applyTransform(r,true),t.measuredBox):Bh(l,n,t.layoutBox);const u=!cj(a);let d=false;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:p,layout:g}=m;if(p&&g){const b=br();fy(b,t.layoutBox,p.layoutBox);const y=br();fy(y,n,g.layoutBox),uj(b,y)||(d=true),m.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=b,e.relativeParent=m);}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:d});}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n();}e.options.transition=void 0;}function Zye(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty));}function Jye(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=false;}function e1e(e){e.clearSnapshot();}function _D(e){e.clearMeasurements();}function LD(e){e.isLayoutDirty=false;}function t1e(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform();}function zD(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=true;}function n1e(e){e.resolveTargetDelta();}function r1e(e){e.calcProjection();}function o1e(e){e.resetSkewAndRotation();}function i1e(e){e.removeLeadSnapshot();}function BD(e,t,n){e.translate=Zn(t.translate,0,n),e.scale=Zn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint;}function kD(e,t,n,r){e.min=Zn(t.min,n.min,r),e.max=Zn(t.max,n.max,r);}function a1e(e,t,n,r){kD(e.x,t.x,n.x,r),kD(e.y,t.y,n.y,r);}function s1e(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const l1e={duration:.45,ease:[.4,0,.1,1]},FD=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),HD=FD("applewebkit/")&&!FD("chrome/")?Math.round:Wi;function VD(e){e.min=HD(e.min),e.max=HD(e.max);}function c1e(e){VD(e.x),VD(e.y);}function gj(e,t,n){return e==="position"||e==="preserve-aspect"&&!Oye(ND(t),ND(n),.2)}function u1e(e){return e!==e.root&&e.scroll?.wasRoot}const d1e=pj({attachResizeListener:(e,t)=>$p(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>true}),bw={current:void 0},vj=pj({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!bw.current){const e=new d1e({});e.mount(window),e.setOptions({layoutScroll:true}),bw.current=e;}return bw.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none";},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),$1=f.createContext({transformPagePoint:e=>e,isStatic:false,reducedMotion:"never"});function jD(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t);}function f1e(...e){return t=>{let n=false;const r=e.map(o=>{const i=jD(o,t);return !n&&typeof i=="function"&&(n=true),i});if(n)return ()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():jD(e[o],null);}}}}function m1e(...e){return f.useCallback(f1e(...e),e)}class h1e extends f.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent&&this.props.pop!==false){const r=n.offsetParent,o=b3(r)&&r.offsetWidth||0,i=b3(r)&&r.offsetHeight||0,a=this.props.sizeRef.current;a.height=n.offsetHeight||0,a.width=n.offsetWidth||0,a.top=n.offsetTop,a.left=n.offsetLeft,a.right=o-a.width-a.left,a.bottom=i-a.height-a.top;}return null}componentDidUpdate(){}render(){return this.props.children}}function p1e({children:e,isPresent:t,anchorX:n,anchorY:r,root:o,pop:i}){const a=f.useId(),l=f.useRef(null),u=f.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=f.useContext($1),m=e.props?.ref??e?.ref,p=m1e(l,m);return f.useInsertionEffect(()=>{const{width:g,height:b,top:y,left:S,right:C,bottom:w}=u.current;if(t||i===false||!l.current||!g||!b)return;const $=n==="left"?`left: ${S}`:`right: ${C}`,M=r==="bottom"?`bottom: ${w}`:`top: ${y}`;l.current.dataset.motionPopId=a;const T=document.createElement("style");d&&(T.nonce=d);const R=o??document.head;return R.appendChild(T),T.sheet&&T.sheet.insertRule(`
[data-motion-pop-id="${a}"] {
position: absolute !important;
width: ${g}px !important;
height: ${b}px !important;
${$}px !important;
${M}px !important;
}
`),()=>{R.contains(T)&&R.removeChild(T);}},[t]),Go.jsx(h1e,{isPresent:t,childRef:l,sizeRef:u,pop:i,children:i===false?e:f.cloneElement(e,{ref:p})})}const g1e=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:l,anchorY:u,root:d})=>{const m=y1(v1e),p=f.useId();let g=true,b=f.useMemo(()=>(g=false,{id:p,initial:t,isPresent:n,custom:o,onExitComplete:y=>{m.set(y,true);for(const S of m.values())if(!S)return;r&&r();},register:y=>(m.set(y,false),()=>m.delete(y))}),[n,m,r]);return i&&g&&(b={...b}),f.useMemo(()=>{m.forEach((y,S)=>m.set(S,false));},[n]),f.useEffect(()=>{!n&&!m.size&&r&&r();},[n]),e=Go.jsx(p1e,{pop:a==="popLayout",isPresent:n,anchorX:l,anchorY:u,root:d,children:e}),Go.jsx(S1.Provider,{value:b,children:e})};function v1e(){return new Map}function bj(e=true){const t=f.useContext(S1);if(t===null)return [true,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=f.useId();f.useEffect(()=>{if(e)return o(i)},[e]);const a=f.useCallback(()=>e&&r&&r(i),[i,r,e]);return !n&&r?[false,a]:[true]}const Sb=e=>e.key||"";function UD(e){const t=[];return f.Children.forEach(e,n=>{f.isValidElement(n)&&t.push(n);}),t}const b1e=({children:e,custom:t,initial:n=true,onExitComplete:r,presenceAffectsLayout:o=true,mode:i="sync",propagate:a=false,anchorX:l="left",anchorY:u="top",root:d})=>{const[m,p]=bj(a),g=f.useMemo(()=>UD(e),[e]),b=a&&!m?[]:g.map(Sb),y=f.useRef(true),S=f.useRef(g),C=y1(()=>new Map),w=f.useRef(new Set),[$,M]=f.useState(g),[T,R]=f.useState(g);jH(()=>{y.current=false,S.current=g;for(let P=0;P<T.length;P++){const O=Sb(T[P]);b.includes(O)?(C.delete(O),w.current.delete(O)):C.get(O)!==true&&C.set(O,false);}},[T,b.length,b.join("-")]);const I=[];if(g!==$){let P=[...g];for(let O=0;O<T.length;O++){const _=T[O],L=Sb(_);b.includes(L)||(P.splice(O,0,_),I.push(_));}return i==="wait"&&I.length&&(P=I),R(UD(P)),M(g),null}const{forceRender:N}=f.useContext(fT);return Go.jsx(Go.Fragment,{children:T.map(P=>{const O=Sb(P),_=a&&!m?false:g===T||b.includes(O),L=()=>{if(w.current.has(O))return;if(w.current.add(O),C.has(O))C.set(O,true);else return;let j=true;C.forEach(U=>{U||(j=false);}),j&&(N?.(),R(S.current),a&&p?.(),r&&r());};return Go.jsx(g1e,{isPresent:_,initial:!y.current||n?void 0:false,custom:t,presenceAffectsLayout:o,mode:i,root:d,onExitComplete:_?void 0:L,anchorX:l,anchorY:u,children:P},O)})})},yj=f.createContext({strict:false}),qD={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let WD=false;function y1e(){if(WD)return;const e={};for(const t in qD)e[t]={isEnabled:n=>qD[t].some(r=>!!n[r])};UV(e),WD=true;}function Sj(){return y1e(),aye()}function S1e(e){const t=Sj();for(const n in e)t[n]={...t[n],...e[n]};UV(t);}const C1e=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function my(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||C1e.has(e)}let Cj=e=>!my(e);function x1e(e){typeof e=="function"&&(Cj=t=>t.startsWith("on")?!my(t):e(t));}try{x1e(require("@emotion/is-prop-valid").default);}catch{}function w1e(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Cj(o)||n===true&&my(o)||!t&&!my(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const E1=f.createContext({});function $1e(e,t){if(w1(e)){const{initial:n,animate:r}=e;return {initial:n===false||wp(n)?n:void 0,animate:wp(r)?r:void 0}}return e.inherit!==false?t:{}}function E1e(e){const{initial:t,animate:n}=$1e(e,f.useContext(E1));return f.useMemo(()=>({initial:t,animate:n}),[GD(t),GD(n)])}function GD(e){return Array.isArray(e)?e.join(" "):e}const jT=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function xj(e,t,n){for(const r in t)!zr(t[r])&&!ZV(r,n)&&(e[r]=t[r]);}function M1e({transformTemplate:e},t){return f.useMemo(()=>{const n=jT();return HT(n,t,e),Object.assign({},n.vars,n.style)},[t])}function R1e(e,t){const n=e.style||{},r={};return xj(r,n,e),Object.assign(r,M1e(e,t)),r}function T1e(e,t){const n={},r=R1e(e,t);return e.drag&&e.dragListener!==false&&(n.draggable=false,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===true?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const wj=()=>({...jT(),attrs:{}});function A1e(e,t,n,r){const o=f.useMemo(()=>{const i=wj();return ej(i,t,nj(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};xj(i,e.style,e),o.style={...i,...o.style};}return o}const N1e=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function UT(e){return typeof e!="string"||e.includes("-")?false:!!(N1e.indexOf(e)>-1||/[A-Z]/u.test(e))}function P1e(e,t,n,{latestValues:r},o,i=false,a){const u=(a??UT(e)?A1e:T1e)(t,r,o,e),d=w1e(t,typeof e=="string",i),m=e!==f.Fragment?{...d,...u,ref:n}:{},{children:p}=t,g=f.useMemo(()=>zr(p)?p.get():p,[p]);return f.createElement(e,{...m,children:g})}function I1e({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return {latestValues:O1e(n,r,o,e),renderState:t()}}function O1e(e,t,n,r){const o={},i=r(e,{});for(const g in i)o[g]=r0(i[g]);let{initial:a,animate:l}=e;const u=w1(e),d=jV(e);t&&d&&!u&&e.inherit!==false&&(a===void 0&&(a=t.initial),l===void 0&&(l=t.animate));let m=n?n.initial===false:false;m=m||a===false;const p=m?l:a;if(p&&typeof p!="boolean"&&!x1(p)){const g=Array.isArray(p)?p:[p];for(let b=0;b<g.length;b++){const y=PT(e,g[b]);if(y){const{transitionEnd:S,transition:C,...w}=y;for(const $ in w){let M=w[$];if(Array.isArray(M)){const T=m?M.length-1:0;M=M[T];}M!==null&&(o[$]=M);}for(const $ in S)o[$]=S[$];}}}return o}const $j=e=>(t,n)=>{const r=f.useContext(E1),o=f.useContext(S1),i=()=>I1e(e,t,r,o);return n?i():y1(i)},D1e=$j({scrapeMotionValuesFromProps:VT,createRenderState:jT}),_1e=$j({scrapeMotionValuesFromProps:rj,createRenderState:wj}),L1e=Symbol.for("motionComponentSymbol");function z1e(e,t,n){const r=f.useRef(n);f.useInsertionEffect(()=>{r.current=n;});const o=f.useRef(null);return f.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const a=r.current;if(typeof a=="function")if(i){const l=a(i);typeof l=="function"&&(o.current=l);}else o.current?(o.current(),o.current=null):a(i);else a&&(a.current=i);},[t])}const Ej=f.createContext({});function Td(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function B1e(e,t,n,r,o,i){const{visualElement:a}=f.useContext(E1),l=f.useContext(yj),u=f.useContext(S1),d=f.useContext($1),m=d.reducedMotion,p=d.skipAnimations,g=f.useRef(null),b=f.useRef(false);r=r||l.renderer,!g.current&&r&&(g.current=r(e,{visualState:t,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===false:false,reducedMotionConfig:m,skipAnimations:p,isSVG:i}),b.current&&g.current&&(g.current.manuallyAnimateOnMount=true));const y=g.current,S=f.useContext(Ej);y&&!y.projection&&o&&(y.type==="html"||y.type==="svg")&&k1e(g.current,n,o,S);const C=f.useRef(false);f.useInsertionEffect(()=>{y&&C.current&&y.update(n,u);});const w=n[NV],$=f.useRef(!!w&&!window.MotionHandoffIsComplete?.(w)&&window.MotionHasOptimisedAnimation?.(w));return jH(()=>{b.current=true,y&&(C.current=true,window.MotionIsMounted=true,y.updateFeatures(),y.scheduleRenderMicrotask(),$.current&&y.animationState&&y.animationState.animateChanges());}),f.useEffect(()=>{y&&(!$.current&&y.animationState&&y.animationState.animateChanges(),$.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(w);}),$.current=false),y.enteringChildren=void 0);}),y}function k1e(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:l,layoutScroll:u,layoutRoot:d,layoutCrossfade:m}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Mj(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||l&&Td(l),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:m,layoutScroll:u,layoutRoot:d});}function Mj(e){if(e)return e.options.allowProjection!==false?e.projection:Mj(e.parent)}function yw(e,{forwardMotionProps:t=false,type:n}={},r,o){r&&S1e(r);const i=n?n==="svg":UT(e),a=i?_1e:D1e;function l(d,m){let p;const g={...f.useContext($1),...d,layoutId:F1e(d)},{isStatic:b}=g,y=E1e(d),S=a(d,b);if(!b&&VH){H1e();const C=V1e(g);p=C.MeasureLayout,y.visualElement=B1e(e,S,g,o,C.ProjectionNode,i);}return Go.jsxs(E1.Provider,{value:y,children:[p&&y.visualElement?Go.jsx(p,{visualElement:y.visualElement,...g}):null,P1e(e,d,z1e(S,y.visualElement,m),S,b,t,i)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=f.forwardRef(l);return u[L1e]=e,u}function F1e({layoutId:e}){const t=f.useContext(fT).id;return t&&e!==void 0?t+"-"+e:e}function H1e(e,t){f.useContext(yj).strict;}function V1e(e){const t=Sj(),{drag:n,layout:r}=t;if(!n&&!r)return {};const o={...n,...r};return {MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function j1e(e,t){if(typeof Proxy>"u")return yw;const n=new Map,r=(i,a)=>yw(i,a,e,t),o=(i,a)=>r(i,a);return new Proxy(o,{get:(i,a)=>a==="create"?r:(n.has(a)||n.set(a,yw(a,void 0,e,t)),n.get(a))})}const U1e=(e,t)=>t.isSVG??UT(e)?new oj(t):new JV(t,{allowProjection:e!==f.Fragment});class q1e extends rc{constructor(t){super(t),t.animationState||(t.animationState=Rye(t));}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();x1(t)&&(this.unmountControls=t.subscribe(this.node));}mount(){this.updateAnimationControlsSubscription();}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription();}unmount(){this.node.animationState.reset(),this.unmountControls?.();}}let W1e=0;class G1e extends rc{constructor(){super(...arguments),this.id=W1e++;}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id);});}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id));}unmount(){}}const K1e={animation:{Feature:q1e},exit:{Feature:G1e}};function mg(e){return {point:{x:e.pageX,y:e.pageY}}}const Y1e=e=>t=>zT(t)&&e(t,mg(t));function kh(e,t,n,r){return $p(e,t,Y1e(n),r)}const Rj=({current:e})=>e?e.ownerDocument.defaultView:null,KD=(e,t)=>Math.abs(e-t);function X1e(e,t){const n=KD(e.x,t.x),r=KD(e.y,t.y);return Math.sqrt(n**2+r**2)}const YD=new Set(["auto","scroll"]);class Tj{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:i=false,distanceThreshold:a=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=b=>{this.handleScroll(b.target);},this.onWindowScroll=()=>{this.handleScroll(window);},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Cw(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,S=X1e(b.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!S)return;const{point:C}=b,{timestamp:w}=Kr;this.history.push({...C,timestamp:w});const{onStart:$,onMove:M}=this.handlers;y||($&&$(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),M&&M(this.lastMoveEvent,b);},this.handlePointerMove=(b,y)=>{this.lastMoveEvent=b,this.lastMoveEventInfo=Sw(y,this.transformPagePoint),Vn.update(this.updatePoint,true);},this.handlePointerUp=(b,y)=>{this.end();const{onEnd:S,onSessionEnd:C,resumeAnimation:w}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const $=Cw(b.type==="pointercancel"?this.lastMoveEventInfo:Sw(y,this.transformPagePoint),this.history);this.startEvent&&S&&S(b,$),C&&C(b,$);},!zT(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=o||window;const u=mg(t),d=Sw(u,this.transformPagePoint),{point:m}=d,{timestamp:p}=Kr;this.history=[{...m,timestamp:p}];const{onSessionStart:g}=n;g&&g(t,Cw(d,this.history)),this.removeListeners=ug(kh(this.contextWindow,"pointermove",this.handlePointerMove),kh(this.contextWindow,"pointerup",this.handlePointerUp),kh(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l);}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(YD.has(r.overflowX)||YD.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement;}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:true,passive:true}),window.addEventListener("scroll",this.onWindowScroll,{passive:true}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:true}),window.removeEventListener("scroll",this.onWindowScroll);};}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-n.x,y:o.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),Vn.update(this.updatePoint,true));}updateHandlers(t){this.handlers=t;}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),jl(this.updatePoint);}}function Sw(e,t){return t?{point:t(e.point)}:e}function XD(e,t){return {x:e.x-t.x,y:e.y-t.y}}function Cw({point:e},t){return {point:e,delta:XD(e,Aj(t)),offset:XD(e,Q1e(t)),velocity:Z1e(t,.1)}}function Q1e(e){return e[0]}function Aj(e){return e[e.length-1]}function Z1e(e,t){if(e.length<2)return {x:0,y:0};let n=e.length-1,r=null;const o=Aj(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Va(t)));)n--;if(!r)return {x:0,y:0};const i=Ui(o.timestamp-r.timestamp);if(i===0)return {x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function J1e(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Zn(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Zn(n,e,r.max):Math.min(e,n)),e}function QD(e,t,n){return {min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function eSe(e,{top:t,left:n,bottom:r,right:o}){return {x:QD(e.x,n,o),y:QD(e.y,t,r)}}function ZD(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function tSe(e,t){return {x:ZD(e.x,t.x),y:ZD(e.y,t.y)}}function nSe(e,t){let n=.5;const r=Ro(e),o=Ro(t);return o>r?n=df(t.min,t.max-r,e.min):r>o&&(n=df(e.min,e.max-o,t.min)),Wa(0,1,n)}function rSe(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const x3=.35;function oSe(e=x3){return e===false?e=0:e===true&&(e=x3),{x:JD(e,"left","right"),y:JD(e,"top","bottom")}}function JD(e,t,n){return {min:e_(e,t),max:e_(e,n)}}function e_(e,t){return typeof e=="number"?e:e[t]||0}const iSe=new WeakMap;class aSe{constructor(t){this.openDragLock=null,this.isDragging=false,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=false,this.hasMutatedConstraints=false,this.elastic=br(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t;}start(t,{snapToCursor:n=false,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===false)return;const i=p=>{n?(this.stopAnimation(),this.snapToCursor(mg(p).point)):this.pauseAnimation();},a=(p,g)=>{this.stopAnimation();const{drag:b,dragPropagation:y,onDragStart:S}=this.getProps();if(b&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=k0e(b),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=g,this.isDragging=true,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=true,this.visualElement.projection.target=void 0),Bi(w=>{let $=this.getAxisMotionValue(w).get()||0;if(ja.test($)){const{projection:M}=this.visualElement;if(M&&M.layout){const T=M.layout.layoutBox[w];T&&($=Ro(T)*(parseFloat($)/100));}}this.originPoint[w]=$;}),S&&Vn.update(()=>S(p,g),false,true),p3(this.visualElement,"transform");const{animationState:C}=this.visualElement;C&&C.setActive("whileDrag",true);},l=(p,g)=>{this.latestPointerEvent=p,this.latestPanInfo=g;const{dragPropagation:b,dragDirectionLock:y,onDirectionLock:S,onDrag:C}=this.getProps();if(!b&&!this.openDragLock)return;const{offset:w}=g;if(y&&this.currentDirection===null){this.currentDirection=lSe(w),this.currentDirection!==null&&S&&S(this.currentDirection);return}this.updateAxis("x",g.point,w),this.updateAxis("y",g.point,w),this.visualElement.render(),C&&Vn.update(()=>C(p,g),false,true);},u=(p,g)=>{this.latestPointerEvent=p,this.latestPanInfo=g,this.stop(p,g),this.latestPointerEvent=null,this.latestPanInfo=null;},d=()=>Bi(p=>this.getAnimationState(p)==="paused"&&this.getAxisMotionValue(p).animation?.play()),{dragSnapToOrigin:m}=this.getProps();this.panSession=new Tj(t,{onSessionStart:i,onStart:a,onMove:l,onSessionEnd:u,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:r,contextWindow:Rj(this.visualElement),element:this.visualElement.current});}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!r)return;const{velocity:a}=o;this.startAnimation(a);const{onDragEnd:l}=this.getProps();l&&Vn.postRender(()=>l(r,o));}cancel(){this.isDragging=false;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=false),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",false);}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0;}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Cb(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=J1e(a,this.constraints[t],this.elastic[t])),i.set(a);}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(false):this.visualElement.projection?.layout,o=this.constraints;t&&Td(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=eSe(r.layoutBox,t):this.constraints=false,this.elastic=oSe(n),o!==this.constraints&&!Td(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Bi(i=>{this.constraints!==false&&this.getAxisMotionValue(i)&&(this.constraints[i]=rSe(r.layoutBox[i],this.constraints[i]));});}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Td(t))return false;const r=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return false;const i=uye(r,o.root,this.visualElement.getTransformPagePoint());let a=tSe(o.layout.layoutBox,i);if(n){const l=n(sye(a));this.hasMutatedConstraints=!!l,l&&(a=GV(l));}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),u=this.constraints||{},d=Bi(m=>{if(!Cb(m,n,this.currentDirection))return;let p=u&&u[m]||{};a&&(p={min:0,max:0});const g=o?200:1e6,b=o?40:1e7,y={type:"inertia",velocity:r?t[m]:0,bounceStiffness:g,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...i,...p};return this.startAxisValueAnimation(m,y)});return Promise.all(d).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return p3(this.visualElement,t),r.start(NT(t,r,0,n,this.visualElement,false))}stopAnimation(){Bi(t=>this.getAxisMotionValue(t).stop());}pauseAnimation(){Bi(t=>this.getAxisMotionValue(t).animation?.pause());}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Bi(n=>{const{drag:r}=this.getProps();if(!Cb(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:l}=o.layout.layoutBox[n],u=i.get()||0;i.set(t[n]-Zn(a,l,.5)+u);}});}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Td(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Bi(a=>{const l=this.getAxisMotionValue(a);if(l&&this.constraints!==false){const u=l.get();o[a]=nSe({min:u,max:u},this.constraints[a]);}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=false,this.resolveConstraints(),Bi(a=>{if(!Cb(a,t,null))return;const l=this.getAxisMotionValue(a),{min:u,max:d}=this.constraints[a];l.set(Zn(u,d,o[a]));}),this.visualElement.render();}addListeners(){if(!this.visualElement.current)return;iSe.set(this.visualElement,this);const t=this.visualElement.current,n=kh(t,"pointerdown",d=>{const{drag:m,dragListener:p=true}=this.getProps(),g=d.target,b=g!==t&&q0e(g);m&&p&&!b&&this.start(d);});let r;const o=()=>{const{dragConstraints:d}=this.getProps();Td(d)&&d.current&&(this.constraints=this.resolveRefConstraints(),r||(r=sSe(t,d.current,()=>this.scalePositionWithinConstraints())));},{projection:i}=this.visualElement,a=i.addEventListener("measure",o);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Vn.read(o);const l=$p(window,"resize",()=>this.scalePositionWithinConstraints()),u=i.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:m})=>{this.isDragging&&m&&(Bi(p=>{const g=this.getAxisMotionValue(p);g&&(this.originPoint[p]+=d[p].translate,g.set(g.get()+d[p].translate));}),this.visualElement.render());}));return ()=>{l(),n(),a(),u&&u(),r&&r();}}getProps(){const t=this.visualElement.getProps(),{drag:n=false,dragDirectionLock:r=false,dragPropagation:o=false,dragConstraints:i=false,dragElastic:a=x3,dragMomentum:l=true}=t;return {...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:l}}}function t_(e){let t=true;return ()=>{if(t){t=false;return}e();}}function sSe(e,t,n){const r=lD(e,t_(n)),o=lD(t,t_(n));return ()=>{r(),o();}}function Cb(e,t,n){return (t===true||t===e)&&(n===null||n===e)}function lSe(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class cSe extends rc{constructor(t){super(t),this.removeGroupControls=Wi,this.removeListeners=Wi,this.controls=new aSe(t);}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Wi;}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)));}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession();}}const xw=e=>(t,n)=>{e&&Vn.update(()=>e(t,n),false,true);};class uSe extends rc{constructor(){super(...arguments),this.removePointerDownListener=Wi;}onPointerDown(t){this.session=new Tj(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Rj(this.node)});}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return {onSessionStart:xw(t),onStart:xw(n),onMove:xw(r),onEnd:(i,a)=>{delete this.session,o&&Vn.postRender(()=>o(i,a));}}}mount(){this.removePointerDownListener=kh(this.node.current,"pointerdown",t=>this.onPointerDown(t));}update(){this.session&&this.session.updateHandlers(this.createPanHandlers());}unmount(){this.removePointerDownListener(),this.session&&this.session.end();}}let ww=false;class dSe extends f.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),ww&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove();}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),o0.hasEverUpdated=true;}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,t.layoutDependency!==n&&a.setOptions({...a.options,layoutDependency:n}),ww=true,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||Vn.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove();}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),LT.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove();}));}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;ww=true,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o));}safeToRemove(){const{safeToRemove:t}=this.props;t&&t();}render(){return null}}function Nj(e){const[t,n]=bj(),r=f.useContext(fT);return Go.jsx(dSe,{...e,layoutGroup:r,switchLayoutGroup:f.useContext(Ej),isPresent:t,safeToRemove:n})}const fSe={pan:{Feature:uSe},drag:{Feature:cSe,ProjectionNode:vj,MeasureLayout:Nj}};function n_(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&Vn.postRender(()=>i(t,mg(t)));}class mSe extends rc{mount(){const{current:t}=this.node;t&&(this.unmount=H0e(t,(n,r)=>(n_(this.node,r,"Start"),o=>n_(this.node,o,"End"))));}unmount(){}}class hSe extends rc{constructor(){super(...arguments),this.isActive=false;}onFocus(){let t=false;try{t=this.node.current.matches(":focus-visible");}catch{t=true;}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",true),this.isActive=true);}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",false),this.isActive=false);}mount(){this.unmount=ug($p(this.node.current,"focus",()=>this.onFocus()),$p(this.node.current,"blur",()=>this.onBlur()));}unmount(){}}function r_(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&Vn.postRender(()=>i(t,mg(t)));}class pSe extends rc{mount(){const{current:t}=this.node;t&&(this.unmount=G0e(t,(n,r)=>(r_(this.node,r,"Start"),(o,{success:i})=>r_(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}));}unmount(){}}const w3=new WeakMap,$w=new WeakMap,gSe=e=>{const t=w3.get(e.target);t&&t(e);},vSe=e=>{e.forEach(gSe);};function bSe({root:e,...t}){const n=e||document;$w.has(n)||$w.set(n,{});const r=$w.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(vSe,{root:e,...t})),r[o]}function ySe(e,t,n){const r=bSe(t);return w3.set(e,n),r.observe(e),()=>{w3.delete(e),r.unobserve(e);}}const SSe={some:0,all:1};class CSe extends rc{constructor(){super(...arguments),this.hasEnteredView=false,this.isInView=false;}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:SSe[o]},l=u=>{const{isIntersecting:d}=u;if(this.isInView===d||(this.isInView=d,i&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=true),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:m,onViewportLeave:p}=this.node.getProps(),g=d?m:p;g&&g(u);};return ySe(this.node.current,a,l)}mount(){this.startObserver();}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(xSe(t,n))&&this.startObserver();}unmount(){}}function xSe({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const wSe={inView:{Feature:CSe},tap:{Feature:pSe},focus:{Feature:hSe},hover:{Feature:mSe}},$Se={layout:{ProjectionNode:vj,MeasureLayout:Nj}},ESe={...K1e,...wSe,...fSe,...$Se},qT=j1e(ESe,U1e);function MSe(e){return f.useEffect(()=>()=>e(),[])}function RSe(){!BT.current&&VV();const[e]=f.useState(cy.current);return e}function TSe(){const e=RSe(),{reducedMotion:t}=f.useContext($1);return t==="never"?false:t==="always"?true:e}function WT(e){return typeof e=="object"&&!Array.isArray(e)}function Pj(e,t,n,r){return e==null?[]:typeof e=="string"&&WT(t)?_T(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(o=>o!=null):[e]}function ASe(e,t,n){return e*(t+1)}function o_(e,t,n,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function NSe(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(cg(e,o),r--);}}function PSe(e,t,n,r,o,i){NSe(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:Zn(o,i,r[a]),easing:oV(n,a)});}function ISe(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1);}function OSe(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const DSe="easeInOut";function _Se(e,{defaultTransition:t={},...n}={},r,o){const i=t.duration||.3,a=new Map,l=new Map,u={},d=new Map;let m=0,p=0,g=0;for(let b=0;b<e.length;b++){const y=e[b];if(typeof y=="string"){d.set(y,p);continue}else if(!Array.isArray(y)){d.set(y.name,o_(p,y.at,m,d));continue}let[S,C,w={}]=y;w.at!==void 0&&(p=o_(p,w.at,m,d));let $=0;const M=(T,R,I,N=0,P=0)=>{const O=LSe(T),{delay:_=0,times:L=SV(O),type:j=t.type||"keyframes",repeat:U,repeatType:q,repeatDelay:V=0,...B}=R;let{ease:F=t.ease||"easeOut",duration:W}=R;const K=typeof _=="function"?_(N,P):_,Q=O.length,D=TT(j)?j:o?.[j||"keyframes"];if(Q<=2&&D){let J=100;if(Q===2&&kSe(O)){const se=O[1]-O[0];J=Math.abs(se);}const te={...t,...B};W!==void 0&&(te.duration=Va(W));const ne=vV(te,J,D);F=ne.ease,W=ne.duration;}W??(W=i);const z=p+K;L.length===1&&L[0]===0&&(L[1]=1);const Y=L.length-O.length;if(Y>0&&yV(L,Y),O.length===1&&O.unshift(null),U){W=ASe(W,U);const J=[...O],te=[...L];F=Array.isArray(F)?[...F]:[F];const ne=[...F];for(let se=0;se<U;se++){O.push(...J);for(let ae=0;ae<J.length;ae++)L.push(te[ae]+(se+1)),F.push(ae===0?"linear":oV(ne,ae-1));}ISe(L,U);}const ee=z+W;PSe(I,O,F,L,z,ee),$=Math.max(K+W,$),g=Math.max(ee,g);};if(zr(S)){const T=i_(S,l);M(C,w,a_("default",T));}else {const T=Pj(S,C,r,u),R=T.length;for(let I=0;I<R;I++){C=C,w=w;const N=T[I],P=i_(N,l);for(const O in C)M(C[O],zSe(w,O),a_(O,P),I,R);}}m=p,p+=$;}return l.forEach((b,y)=>{for(const S in b){const C=b[S];C.sort(OSe);const w=[],$=[],M=[];for(let N=0;N<C.length;N++){const{at:P,value:O,easing:_}=C[N];w.push(O),$.push(df(0,g,P)),M.push(_||"easeOut");}$[0]!==0&&($.unshift(0),w.unshift(w[0]),M.unshift(DSe)),$[$.length-1]!==1&&($.push(1),w.push(null)),a.has(y)||a.set(y,{keyframes:{},transition:{}});const T=a.get(y);T.keyframes[S]=w;const{type:R,...I}=t;T.transition[S]={...I,duration:g,ease:M,times:$,...n};}}),a}function i_(e,t){return !t.has(e)&&t.set(e,{}),t.get(e)}function a_(e,t){return t[e]||(t[e]=[]),t[e]}function LSe(e){return Array.isArray(e)?e:[e]}function zSe(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const BSe=e=>typeof e=="number",kSe=e=>e.every(BSe);function FSe(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=C1(e)&&!HV(e)?new oj(t):new JV(t);n.mount(e),xp.set(e,n);}function HSe(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new vye(t);n.mount(e),xp.set(e,n);}function VSe(e,t){return zr(e)||typeof e=="number"||typeof e=="string"&&!WT(t)}function Ij(e,t,n,r){const o=[];if(VSe(e,t))o.push(mj(e,WT(t)&&t.default||t,n&&(n.default||n)));else {if(e==null)return o;const i=Pj(e,t,r),a=i.length;for(let l=0;l<a;l++){const u=i[l],d=u instanceof Element?FSe:HSe;xp.has(u)||d(u);const m=xp.get(u),p={...n};"delay"in p&&typeof p.delay=="function"&&(p.delay=p.delay(l,a)),o.push(...OT(m,{...t,transition:p},{}));}}return o}function jSe(e,t,n){const r=[],o=e.map(a=>{if(Array.isArray(a)&&typeof a[0]=="function"){const l=a[0],u=uu(0);return u.on("change",l),a.length===1?[u,[0,1]]:a.length===2?[u,[0,1],a[1]]:[u,a[1],a[2]]}return a});return _Se(o,t,n,{spring:Cp}).forEach(({keyframes:a,transition:l},u)=>{r.push(...Ij(u,a,l));}),r}function USe(e){return Array.isArray(e)&&e.some(Array.isArray)}function Oj(e={}){const{scope:t,reduceMotion:n}=e;function r(o,i,a){let l=[],u;if(USe(o))l=jSe(o,n!==void 0?{reduceMotion:n,...i}:i,t);else {const{onComplete:m,...p}=a||{};typeof m=="function"&&(u=m),l=Ij(o,i,n!==void 0?{reduceMotion:n,...p}:p,t);}const d=new l0e(l);return u&&d.finished.then(u),t&&(t.animations.push(d),d.finished.then(()=>{cg(t.animations,d);})),d}return r}Oj();function qSe(){const e=y1(()=>({current:null,animations:[]})),t=TSe()??void 0,n=f.useMemo(()=>Oj({scope:e,reduceMotion:t}),[e,t]);return MSe(()=>{e.animations.forEach(r=>r.stop()),e.animations.length=0;}),[e,n]}function Ep({size:e=18,useAnimation:t=false,color:n="currentColor",...r}){return x("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:e,...r,children:x(qT.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"}}})})}const Dj=jge,GT=qge,KT=Gge,hg=Yge,No=Qge,$3=Jge,E3=tve,WSe=rve,s_=ive,_j=sve,GSe=cve,Lj=kge,KSe=dve,YSe=mve,XSe=pve,QSe=vve,hy=Fge,ff=yve,ZSe=Cve,JSe=wve,py=Eve,M3=Rve,gy=FH,tu=Nve,zj=dT,Vf=Ive,eCe=HH,YT=_ve,tCe="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 XT({active:e=false,...t}){return e?x("img",{...t,src:tCe}):x(zve,{...t})}const QT=lg(e=>H("svg",{viewBox:"0 0 20 20",fill:"currentColor",...e,children:[x("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"}),x("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"}),x("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"})]})),Bj=RX(),ZT=Bj.os.name?.toLowerCase()==="mac os",nCe=Bj.browser.name||"",JT=e=>new RegExp(String.raw`\b${e}\b`,"i").test(nCe),pg=JT("safari");JT("firefox");JT("edge");const rCe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("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"})]}),oCe=f.forwardRef(rCe),iCe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M16 3h6v6h-2V5h-4zM2 3h6v2H4v4H2zm18 16v-4h2v6h-6v-2zM4 19h4v2H2v-6h2z"})]}),aCe=f.forwardRef(iCe),sCe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[x("rect",{width:20,height:16,x:2,y:4,rx:2}),x("rect",{width:9,height:7,x:13,y:13,rx:2})]})]}),lCe=f.forwardRef(sCe),cCe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M6 3h8.99v1.5H6zM2.99 6h1.5v1.5h-1.5zm0-3h1.5v1.5h-1.5zm0 6.01H4.5v1.5H2.99z"}),x("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"}),x("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"})]}),uCe=f.forwardRef(cCe),l_="0";function nu(e,t){GM.setClipboard(e),Ot.success(`已复制: ${e}`,t);}var ql=(e=>(e.PlayerScreenMode=`${d5}-player-screen-mode`,e.ForceAutoPlay=`${d5}-force-auto-play`,e))(ql||{}),$l=(e=>(e.Normal="normal",e.Wide="wide",e.WebFullscreen="web",e.Fullscreen="full",e))($l||{}),eA=(e=>(e.ON="on",e.OFF="off",e))(eA||{}),rr=(e=>(e.Normal="Normal",e.CurrentPage="CurrentPage",e.NormalWebFullscreen="NormalWebFullscreen",e.Popup="Popup",e.Background="Background",e.Iina="Iina",e))(rr||{});const c_=Object.entries(rr).reduce((e,[t,n])=>({...e,[n]:`LinkOpenMode.${t}`}),{}),di={Normal:{icon:x(No,{className:"size-16px"}),label:"打开",desc:"默认在新标签页中打开"},CurrentPage:{icon:x(oCe,{className:"size-16px"}),label:"当前页中打开",desc:"不打开新标签页, 使用当前标签页打开, 适用于将网站作为应用安装场景"},NormalWebFullscreen:{icon:x(aCe,{className:"size-15px"}),label:"打开-网页全屏",desc:x(ze,{children:"默认在新标签页中打开, 打开后自动网页全屏"})},Popup:{icon:x(lCe,{className:"size-15px"}),label:"小窗打开",desc:H(ze,{children:["当"," ",x("a",{href:"https://developer.chrome.com/docs/web-platform/document-picture-in-picture",target:"_blank",children:"「文档画中画」API"})," ","可用时, 会使用「文档画中画」的形式: 窗口置顶 + 播放页网页全屏.",x("br",{}),"当该 API 不可用时, 会使用 popup window + 播放页网页全屏 的形式."]})},Background:{icon:x(uCe,{className:"size-15px"}),label:"后台打开"},Iina:{icon:x(hg,{className:"size-15px"}),label:"在 IINA 中打开",enabled:ZT,desc:x(ze,{children:x("a",{href:"https://github.com/magicdawn/Bilibili-Gate/blob/main/notes/iina.md",target:"_blank",children:"macOS IINA 设置教程"})})}};function dCe(){return new Xo}const kj=dCe(),R3={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"}},fCe="z-2",mCe="z-3",hCe="z-4",pCe="z-5",gCe="z-6";var Br=(e=>(e.NormalGrid="grid",e.List="list",e.TwoColumnGrid="two-column-grid",e.CenterEmptyGrid="center-empty-grid",e))(Br||{}),ru=(e=>(e.Center="center",e.Left="left",e.Right="right",e))(ru||{}),mf=(e=>(e.Left="left",e.Right="right",e))(mf||{}),vo=(e=>(e.AddTimeDesc="add-time-desc",e.AddTimeAsc="add-time-asc",e.Shuffle="shuffle",e))(vo||{});function Fj(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)&&Fj(o,i,n);}return [...new Set(n)]}function Hj(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(...Hj(o,i)));}return [...new Set(n)]}function vCe(e){const t=Fj(e),n=Hj(e);return t.filter(r=>!n.includes(r))}function bCe(e){return [...new Set(e)]}function yCe(e,t){if(!e)throw Error(t)}const Vj=String.raw,Nc=(e,...t)=>new RegExp(Vj(e,...t)),u_=Vj`(\d+(\.\d+)?)?(xs|sm|md|lg|xl)`,xb="(solid|dashed|dotted|double|none|hidden)";function dr(e,t){return yCe(e.endsWith("-"),"prefix must end with `-`"),t.map(n=>e+n)}const SCe=[[[...["block","flex","grid","table"].flatMap(e=>[e,`inline-${e}`]),"inline","flow-root","contents","list-item","hidden",...dr("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"],[dr("flex-",["row","row-reverse","col","col-reverse"]),"flex-direction"],[dr("flex-",["wrap","wrap-reverse","nowrap"]),"flex-wrap"],[dr("object-",["contain","cover","fill","none","scale-down"]),"object-fit"],[dr("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"],[dr("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"],[Nc`^(text|text-size|font-size)-(\d+|${u_}$)`,"font-size"],[/^(leading|line-height)-/,"line-height"],[dr("list-",["inside","outside"]),"list-style-position"],[dr("list-",["none","disc","decimal"]),"list-style-type"],[dr("text-",["left","center","right","justify","start","end"]),"text-align"],[["underline","overline","line-through","no-underline"],"text-decoration-line"],[dr("decoration-",["solid","double","dotted","dashed","wavy"]),"text-decoration-style"],[/^decoration-(\d+|(auto|from-font)$)/,"text-decoration-thickness"],[["truncate","text-ellipsis","text-clip"],"text-overflow"],[dr("text-",["wrap","nowrap","balance","pretty"]),"text-wrap"],[dr("bg-",["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"]),"background-position"],[/^bg(-no)?-repeat($|-)/,"background-repeat"],[dr("bg-",["auto","cover","contain"]),"background-size"],[["bg-none",/^bg-gradient-to-/],"background-image"],[/^(?:border-|b-)?(?:rounded|rd)(?:-(.+))?$/,"rounded"],[Nc`^b(?:order)?-${xb}$`,"border-style"],[Nc`^b(?:order)?-([tblrxyse])-${xb}$`,(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",Nc`^outline-${xb}$`],"outline-style"],[Nc`^divide-${xb}$`,"divide-style"],[/^divide-(x|y)($|-\d+)/,(e,t)=>`divide-${t?.[1]}-width`],[["ring",/^ring-\d+/],"ring-width"],[[/^ring-offset-\d+/],"ring-offset-width"],[["shadow",...dr("shadow-",["inner","none"]),Nc`^shadow-${u_}$`],"box-shadow"],[dr("border-",["collapse","separate"]),"border-collapse"],[dr("table-",["auto","fixed"]),"table-layout"],[dr("caption-",["top","bottom"]),"caption-side"],[dr("scroll-",["auto","smooth"]),"scroll-behavior"],[dr("snap-",["start","end","center","align-none"]),"scroll-snap-align"],[dr("snap-",["normal","always"]),"scroll-snap-stop"],[dr("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"],[/^(flex-)?basis-(.+)$/,"flex-basis"],[/^flex-(initial|auto|none|\d+)$/,"flex"],[/^col-start-/,"grid-column-start"],[/^col-end-/,"grid-column-end"],[[/^col-/,/^col-span-/],"grid-column"],[/^row-start-/,"grid-row-start"],[/^row-end-/,"grid-row-end"],[[/^row-/,/^row-span-/],"grid-row"],["transition-none","transition-none"],[/^transition-delay-(.+)$/,"transition-delay"],[/^transition-ease(?:-(.+))?$/,"transition-timing-function"],[/^transition(-duration)?-\d+(m?s)?$/,"transition-duration"],[/^transition-(all$|\w+)/,"transition-property"],...["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=>[Nc`^${e}($|-)`,e])],T3=new Map,jj=new Map;for(let[e,t]of SCe){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 a=typeof t=="string"?t:t(i);T3.set(i,a);}),o.forEach(i=>{jj.set(i,t);});}function CCe(e){if(T3.has(e))return T3.get(e);for(let[t,n]of jj.entries())if(t.test(e)){let r=t.exec(e);return typeof n=="string"?n:n(e,r)}}function xCe(e){return wCe.map(t=>typeof t=="string"?[t,t]:t).find(([t,n])=>e.startsWith(`${t}-`))}const wCe=["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"],d_=new Map(Object.entries({flex:["flex-grow","flex-shrink","flex-basis"],"transiton-none":["transition-duration","transition-delay","transition-timing-function","transition-property"],m:["mt","mb","ml","mr","mx","my"],mx:["ml","mr"],my:["mt","mb"],p:["pt","pb","pl","pr","px","py"],px:["pl","pr"],py:["pt","pb"]}));function $Ce(e){return (e||"").split(" ").map(t=>t.trim()).filter(Boolean)}function Uj(...e){let t=new Map;return $Ce(X(...e)).filter(Boolean).forEach(n=>ECe(n,t)),bCe(Array.from(t.values())).join(" ")}function ECe(e,t){let n=e,r;function o(p){[p].flat().forEach(g=>{d_.has(g)&&[d_.get(g)].flat().filter(b=>b!==void 0).forEach(b=>{t.delete(r?r+b:b);}),t.set(r?r+g:g,n);});}function i(){let p=CCe(e);if(p)return o(p),true}function a(){let p=xCe(e);if(!p)return;let[g,b]=p;return o(b),true}function l(){let p=e,g=/(\[[\w,()/-]+\])$/;g.test(e)&&(p=e.replace(g,function(y,S){return "*".repeat(S.length)})),p=p.replaceAll(/--(?=\d)/g,"-*");let b=p.lastIndexOf("-");if(b!==-1)return o(e.slice(0,b)),true}function u(){return o(e)}function d(){let p=/^(?:(?:[\w-]+|\[\S+\]):)+/.exec(e);p&&(r=p[0].split(new RegExp("(?<=:)(?:\\b|$)")).filter(Boolean).sort().join(""),e=e.slice(r.length));}function m(){if(e.startsWith("!")){e="important:"+e.slice(1);return}if(e.endsWith("!")){e="important:"+e.slice(0,-1);return}}i()||a()||(m(),d(),i()||a()||l()||u());}function sr(...e){let t=f.useMemo(()=>X(...e),[...e]);return f.useMemo(()=>Uj(t),[t])}const du="inline-block cursor-pointer rounded bg-gate-primary-lv-3 px-6px text-white line-height-tight font-mono";function f_({className:e,...t}){return x("kbd",{...t,className:sr(du,e)})}const qj=x(dT,{className:"text-gate-primary [.ant-spin_.ant-spin-dot&]:size-25px"}),Wj="flex items-center gap-x-1 [&.ant-btn:not(:disabled):focus-visible]:outline-0";function m_(e){if(/^z-\d+$/.test(e))return Number.parseInt(e.slice(2))}const MCe="z-1001",RCe="z-10004",TCe="z-10005",h_="z-11000",ACe="z-11200",NCe="z-11300",PCe="z-90000",p_={default:X("fixed left-50% top-50% 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",PCe),singleLine:"text-center"};function rn(e,t=2e3,n=document.body){const r=document.createElement("div");r.textContent=e;const o=!e.includes(`
`)&&!e.includes("<br");r.className=X($a,p_.default,o&&p_.singleLine),n.appendChild(r),setTimeout(()=>r.remove(),t);}function Gj(){return rn(wf)}var Ew,g_;function ICe(){if(g_)return Ew;g_=1;var e=1e3,t=e*60,n=t*60,r=n*24,o=r*7,i=r*365.25;Ew=function(m,p){p=p||{};var g=typeof m;if(g==="string"&&m.length>0)return a(m);if(g==="number"&&isFinite(m))return p.long?u(m):l(m);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(m))};function a(m){if(m=String(m),!(m.length>100)){var p=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(m);if(p){var g=parseFloat(p[1]),b=(p[2]||"ms").toLowerCase();switch(b){case "years":case "year":case "yrs":case "yr":case "y":return g*i;case "weeks":case "week":case "w":return g*o;case "days":case "day":case "d":return g*r;case "hours":case "hour":case "hrs":case "hr":case "h":return g*n;case "minutes":case "minute":case "mins":case "min":case "m":return g*t;case "seconds":case "second":case "secs":case "sec":case "s":return g*e;case "milliseconds":case "millisecond":case "msecs":case "msec":case "ms":return g;default:return}}}}function l(m){var p=Math.abs(m);return p>=r?Math.round(m/r)+"d":p>=n?Math.round(m/n)+"h":p>=t?Math.round(m/t)+"m":p>=e?Math.round(m/e)+"s":m+"ms"}function u(m){var p=Math.abs(m);return p>=r?d(m,p,r,"day"):p>=n?d(m,p,n,"hour"):p>=t?d(m,p,t,"minute"):p>=e?d(m,p,e,"second"):m+" ms"}function d(m,p,g,b){var y=p>=g*1.5;return Math.round(m/g)+" "+b+(y?"s":"")}return Ew}var OCe=ICe();const so=Io(OCe);var Mw,v_;function DCe(){return v_||(v_=1,Mw=function(t){return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}),Mw}var Rw,b_;function _Ce(){return b_||(b_=1,Rw=function(t,n){return n?t.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):t}),Rw}var Tw,y_;function LCe(){if(y_)return Tw;y_=1;var e=DCe(),t=_Ce();return Tw=function(r,o,i){var a=!e(o);return r&&(a||i===false)?t(r,o):o},Tw}var zCe=LCe();const BCe=Io(zCe);var Aw,S_;function kCe(){return S_||(S_=1,Aw=function(t,n){return function(){return t.apply(n,arguments)}}),Aw}var Nw,C_;function gg(){if(C_)return Nw;C_=1;var e=kCe(),t=Object.prototype.toString,n=(function(D){return function(z){var Y=t.call(z);return D[Y]||(D[Y]=Y.slice(8,-1).toLowerCase())}})(Object.create(null));function r(D){return D=D.toLowerCase(),function(Y){return n(Y)===D}}function o(D){return Array.isArray(D)}function i(D){return typeof D>"u"}function a(D){return D!==null&&!i(D)&&D.constructor!==null&&!i(D.constructor)&&typeof D.constructor.isBuffer=="function"&&D.constructor.isBuffer(D)}var l=r("ArrayBuffer");function u(D){var z;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?z=ArrayBuffer.isView(D):z=D&&D.buffer&&l(D.buffer),z}function d(D){return typeof D=="string"}function m(D){return typeof D=="number"}function p(D){return D!==null&&typeof D=="object"}function g(D){if(n(D)!=="object")return false;var z=Object.getPrototypeOf(D);return z===null||z===Object.prototype}function b(D){return D&&Object.keys(D).length===0&&Object.getPrototypeOf(D)===Object.prototype}var y=r("Date"),S=r("File"),C=r("Blob"),w=r("FileList");function $(D){return t.call(D)==="[object Function]"}function M(D){return p(D)&&$(D.pipe)}function T(D){var z="[object FormData]";return D&&(typeof FormData=="function"&&D instanceof FormData||t.call(D)===z||$(D.toString)&&D.toString()===z)}var R=r("URLSearchParams");function I(D){return D.trim?D.trim():D.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function N(){var D;return typeof navigator<"u"&&((D=navigator.product)==="ReactNative"||D==="NativeScript"||D==="NS")?false:typeof window<"u"&&typeof document<"u"}function P(D,z){if(!(D===null||typeof D>"u"))if(typeof D!="object"&&(D=[D]),o(D))for(var Y=0,ee=D.length;Y<ee;Y++)z.call(null,D[Y],Y,D);else for(var J in D)Object.prototype.hasOwnProperty.call(D,J)&&z.call(null,D[J],J,D);}function O(){var D={};function z(J,te){g(D[te])&&g(J)?D[te]=O(D[te],J):g(J)?D[te]=O({},J):o(J)?D[te]=J.slice():D[te]=J;}for(var Y=0,ee=arguments.length;Y<ee;Y++)P(arguments[Y],z);return D}function _(D,z,Y){return P(z,function(J,te){Y&&typeof J=="function"?D[te]=e(J,Y):D[te]=J;}),D}function L(D){return D.charCodeAt(0)===65279&&(D=D.slice(1)),D}function j(D,z,Y,ee){D.prototype=Object.create(z.prototype,ee),D.prototype.constructor=D,Y&&Object.assign(D.prototype,Y);}function U(D,z,Y,ee){var J,te,ne,se={};if(z=z||{},D==null)return z;do{for(J=Object.getOwnPropertyNames(D),te=J.length;te-- >0;)ne=J[te],(!ee||ee(ne,D,z))&&!se[ne]&&(z[ne]=D[ne],se[ne]=true);D=Y!==false&&Object.getPrototypeOf(D);}while(D&&(!Y||Y(D,z))&&D!==Object.prototype);return z}function q(D,z,Y){D=String(D),(Y===void 0||Y>D.length)&&(Y=D.length),Y-=z.length;var ee=D.indexOf(z,Y);return ee!==-1&&ee===Y}function V(D){if(!D)return null;if(o(D))return D;var z=D.length;if(!m(z))return null;for(var Y=new Array(z);z-- >0;)Y[z]=D[z];return Y}var B=(function(D){return function(z){return D&&z instanceof D}})(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array));function F(D,z){for(var Y=D&&D[Symbol.iterator],ee=Y.call(D),J;(J=ee.next())&&!J.done;){var te=J.value;z.call(D,te[0],te[1]);}}function W(D,z){for(var Y,ee=[];(Y=D.exec(z))!==null;)ee.push(Y);return ee}var K=r("HTMLFormElement"),Q=(function(z){return function(Y,ee){return z.call(Y,ee)}})(Object.prototype.hasOwnProperty);return Nw={isArray:o,isArrayBuffer:l,isBuffer:a,isFormData:T,isArrayBufferView:u,isString:d,isNumber:m,isObject:p,isPlainObject:g,isEmptyObject:b,isUndefined:i,isDate:y,isFile:S,isBlob:C,isFunction:$,isStream:M,isURLSearchParams:R,isStandardBrowserEnv:N,forEach:P,merge:O,extend:_,trim:I,stripBOM:L,inherits:j,toFlatObject:U,kindOf:n,kindOfTest:r,endsWith:q,toArray:V,isTypedArray:B,isFileList:w,forEachEntry:F,matchAll:W,isHTMLForm:K,hasOwnProperty:Q},Nw}var Pw,x_;function Kj(){if(x_)return Pw;x_=1;var e=gg();function t(o,i,a,l,u){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),a&&(this.config=a),l&&(this.request=l),u&&(this.response=u);}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,a,l,u,d){var m=Object.create(n);return e.toFlatObject(o,m,function(g){return g!==Error.prototype}),t.call(m,o.message,i,a,l,u),m.cause=o,m.name=o.name,d&&Object.assign(m,d),m},Pw=t,Pw}var Iw,w_;function FCe(){if(w_)return Iw;w_=1;var e=Kj();return Iw=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));},Iw}var HCe=FCe();const VCe=Io(HCe);var Ow,$_;function jCe(){return $_||($_=1,Ow=typeof self=="object"?self.FormData:window.FormData),Ow}var Dw,E_;function UCe(){return E_||(E_=1,Dw=jCe()),Dw}var _w,M_;function qCe(){if(M_)return _w;M_=1;var e=gg(),t=Kj(),n=UCe();function r(m){return e.isPlainObject(m)||e.isArray(m)}function o(m){return e.endsWith(m,"[]")?m.slice(0,-2):m}function i(m,p,g){return m?m.concat(p).map(function(y,S){return y=o(y),!g&&S?"["+y+"]":y}).join(g?".":""):p}function a(m){return e.isArray(m)&&!m.some(r)}var l=e.toFlatObject(e,{},null,function(p){return /^is[A-Z]/.test(p)});function u(m){return m&&e.isFunction(m.append)&&m[Symbol.toStringTag]==="FormData"&&m[Symbol.iterator]}function d(m,p,g){if(!e.isObject(m))throw new TypeError("target must be an object");p=p||new(n||FormData),g=e.toFlatObject(g,{metaTokens:true,dots:false,indexes:false},false,function(O,_){return !e.isUndefined(_[O])});var b=g.metaTokens,y=g.visitor||T,S=g.dots,C=g.indexes,w=g.Blob||typeof Blob<"u"&&Blob,$=w&&u(p);if(!e.isFunction(y))throw new TypeError("visitor must be a function");function M(P){if(P===null)return "";if(e.isDate(P))return P.toISOString();if(!$&&e.isBlob(P))throw new t("Blob is not supported. Use a Buffer instead.");return e.isArrayBuffer(P)||e.isTypedArray(P)?$&&typeof Blob=="function"?new Blob([P]):Buffer.from(P):P}function T(P,O,_){var L=P;if(P&&!_&&typeof P=="object"){if(e.endsWith(O,"{}"))O=b?O:O.slice(0,-2),P=JSON.stringify(P);else if(e.isArray(P)&&a(P)||e.isFileList(P)||e.endsWith(O,"[]")&&(L=e.toArray(P)))return O=o(O),L.forEach(function(U,q){!(e.isUndefined(U)||U===null)&&p.append(C===true?i([O],q,S):C===null?O:O+"[]",M(U));}),false}return r(P)?true:(p.append(i(_,O,S),M(P)),false)}var R=[],I=Object.assign(l,{defaultVisitor:T,convertValue:M,isVisitable:r});function N(P,O){if(!e.isUndefined(P)){if(R.indexOf(P)!==-1)throw Error("Circular reference detected in "+O.join("."));R.push(P),e.forEach(P,function(L,j){var U=!(e.isUndefined(L)||L===null)&&y.call(p,L,e.isString(j)?j.trim():j,O,I);U===true&&N(L,O?O.concat(j):[j]);}),R.pop();}}if(!e.isObject(m))throw new TypeError("data must be an object");return N(m),p}return _w=d,_w}var Lw,R_;function WCe(){if(R_)return Lw;R_=1;var e=qCe();function t(o){var i={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(o).replace(/[!'\(\)~]|%20|%00/g,function(l){return i[l]})}function n(o,i){this._pairs=[],o&&e(o,this,i);}var r=n.prototype;return r.append=function(i,a){this._pairs.push([i,a]);},r.toString=function(i){var a=i?function(l){return i.call(this,l,t)}:t;return this._pairs.map(function(u){return a(u[0])+"="+a(u[1])},"").join("&")},Lw=n,Lw}var zw,T_;function GCe(){if(T_)return zw;T_=1;var e=gg(),t=WCe();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 zw=function(o,i,a){if(!i)return o;var l=o.indexOf("#");l!==-1&&(o=o.slice(0,l));var u=a&&a.encode||n,d=a&&a.serialize,m;return d?m=d(i,a):m=e.isURLSearchParams(i)?i.toString():new t(i,a).toString(u),m&&(o+=(o.indexOf("?")===-1?"?":"&")+m),o},zw}var KCe=GCe();const YCe=Io(KCe);var Bw,A_;function XCe(){if(A_)return Bw;A_=1;var e=gg(),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 Bw=function(r){var o={},i,a,l;return r&&e.forEach(r.split(`
`),function(d){if(l=d.indexOf(":"),i=e.trim(d.slice(0,l)).toLowerCase(),a=e.trim(d.slice(l+1)),i){if(o[i]&&t.indexOf(i)>=0)return;i==="set-cookie"?o[i]=(o[i]?o[i]:[]).concat([a]):o[i]=o[i]?o[i]+", "+a:a;}}),o},Bw}var QCe=XCe();const ZCe=Io(QCe);var JCe=gg();const N_=Io(JCe);function exe(e){return new Promise((t,n)=>{let r=e.data;const o=e.headers??{};if(N_.isFormData(r)&&delete o["Content-Type"],e.auth){const m=e.auth.username||"",p=e.auth.password||"";o.Authorization="Basic "+Buffer.from(m+":"+p).toString("base64");}const i=function(){n(new uM.AxiosError("Network Error",uM.AxiosError.ERR_NETWORK,e));},a=function(){n(new uM.AxiosError("timeout of "+e.timeout+"ms exceeded",uM.AxiosError.ECONNABORTED,e));};N_.forEach(o,function(p,g){typeof r>"u"&&g.toLowerCase()==="content-type"&&delete o[g];}),r===void 0&&(r=null);const l=function(p){const g="responseHeaders"in p?ZCe(p.responseHeaders):{},y={data:!e.responseType||e.responseType==="text"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:g,config:e,request:{responseURL:p.finalUrl,status:p.status,statusText:p.statusText,responseXML:null}};VCe(t,n,y);};e.cancelToken&&e.cancelToken.promise.then(function(p){n(p);});let u;e.responseType&&e.responseType!=="json"&&(u=e.responseType);const d=e.method.toUpperCase();d==="UNLINK"||d==="PURGE"||d==="LINK"?n(new uM.AxiosError(`${d} is not a supported method by GM.xmlHttpRequest`)):GM.xmlHttpRequest({method:d,url:YCe(BCe(e.baseURL,e.url),e.params,e.paramsSerializer),headers:Object.fromEntries(Object.entries(o).map(([m,p])=>[m,p.toString()])),responseType:u,data:r,timeout:e.timeout,ontimeout:a,onload:l,onerror:i});})}const kw=()=>Gn().format("YYYY-MM-DD");function Yj(e){async function t(){const n=kw();(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}:${kw()}`,n);},get(){return t(),GM.getValue(`${e}:${kw()}`)}}}const txe=(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);!nxe(o,i)&&r||Object.defineProperty(e,n,i);},nxe=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)},rxe=(e,t)=>{const n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n);},oxe=(e,t)=>`/* Wrapped ${e}*/
${t}`,ixe=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),axe=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),sxe=(e,t,n)=>{const r=n===""?"":`with ${n.trim()}() `,o=oxe.bind(null,r,t.toString());Object.defineProperty(o,"name",axe);const{writable:i,enumerable:a,configurable:l}=ixe;Object.defineProperty(e,"toString",{value:o,writable:i,enumerable:a,configurable:l});};function lxe(e,t,{ignoreNonConfigurable:n=false}={}){const{name:r}=e;for(const o of Reflect.ownKeys(t))txe(e,t,o,n);return rxe(e,t),sxe(e,t,r),e}const cxe=new WeakMap;function tA(e,t){const n=([l])=>l,{cacheKey:r=n,cache:o=new Map}=t??{},i=new Map,a=function(...l){const u=r(l);if(i.has(u))return i.get(u);const d=(async()=>{try{if(o&&await o.has(u))return await o.get(u);const p=await e.apply(this,l);try{return p}finally{o&&(!t?.shouldCache||await t.shouldCache(p,{key:u,argumentsList:l}))&&await o.set(u,p);}}finally{i.delete(u);}})();return i.set(u,d),d};return lxe(a,e,{ignoreNonConfigurable:true}),cxe.set(a,o),a}function zs(e,t){return t??=(...n)=>JSON.stringify(n),tA(e,{cache:false,cacheKey(n){return t(...n)}})}async function M1(e){const{img_key:t,sub_key:n}=await uxe(),r=mxe(t+n),o=Math.round(Date.now()/1e3),i={...e,wts:o},a=/[!'()*]/g,l=Object.keys(i).sort().map(d=>`${encodeURIComponent(d)}=${encodeURIComponent(i[d].toString().replaceAll(a,""))}`).join("&"),u=sparkMd5.hash(l+r);return {...i,wts:o,w_rid:u}}const Xj=Yj("wbi-keys"),uxe=zs(async function(){const e=await Xj.get();return e?.val&&e?.ts&&Date.now()-e.ts<=so("6h")?e.val:dxe()});async function dxe(){const t=(await uM.get("/x/web-interface/nav",{baseURL:gz})).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 Xj.set({val:o,ts:Date.now()}),o}const fxe=[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 mxe(e){return fxe.map(t=>e[t]).join("").slice(0,32)}function Qj(e,t,n){e.appkey=t;const r=new URLSearchParams(e);return r.sort(),sparkMd5.hash(r.toString()+n)}const hxe={platform:"ios",mobi_app:"ipad",device:"pad",build:"37300100",c_locale:"zh-Hans_CN",s_locale:"zh-Hans_CN"};class nA extends Error{constructor(t,n){t||="需要有效的 access_key",super(t,{cause:n}),this.name="NeedValidAccessKeyError";}}const Zt=uM.create({baseURL:gz,withCredentials:true});Zt.interceptors.request.use(async function(e){return e.params||={},e.url?.includes("/wbi/")&&!(e.params.w_rid||e.params.wts)&&(e.params=await M1(e.params)),e});function jn(e){return e?.code===0&&["0","success","ok"].includes(e?.message?.toLowerCase())}class pxe extends Error{constructor(t){const n="WebApiError: "+t.message;super(n),this.json=t,this.name="WebApiError";}}const vg=uM.create({adapter:exe});vg.interceptors.request.use(function(e){if(!e.params?.sign){const{appkey:t,appsec:n}=Xh;e.params={appkey:t,access_key:at.accessKey||"",...rz(e.params,["sign"])},e.params.sign=Qj(e.params,t,n);}return e});vg.interceptors.response.use(e=>{if(e.config.responseType==="json"&&e.data&&e.data instanceof ArrayBuffer){Ko("response data is ArrayBuffer");const t=new TextDecoder,n=new Uint8Array(e.data),r=t.decode(n);e.data=r;try{e.data=JSON.parse(r);}catch{}}return e});function rA(){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 oc(){const e=rA().bili_jct;if(!e)throw rn("找不到 csrf token, 请检查是否登录"),new Error("找不到 csrf token, 请检查是否登录");return e}function Jo(){return rA().DedeUserID}function R1(){return !!rA().DedeUserID}const A3=nc(()=>({cookie:document.cookie,logined:R1()}));function Zj(){return A3.update(),A3.state.value.logined}function oA(){return A3.use().logined}async function P_(){return (await Zt.get("https://member.bilibili.com/x/web/draft/list")).data.artlist?.drafts||[]}async function Fw(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:oc(),...e}),n=(await Zt.post("/x/article/creative/draft/addupdate",t)).data,r=n?.data?.aid?.toString(),o=jn(n);return o||rn(n.message||"addupdate error"),{success:o,aid:r}}async function gxe(e){return (await Zt.get("/x/article/creative/draft/view",{params:{aid:e}})).data?.data?.content||""}class vxe{title;constructor(t){this.title=t;}getData=async()=>{const{title:t}=this,r=(await P_()).find(u=>u.title===t);if(!r){const{success:u,aid:d}=await Fw({title:t});return}const o=await gxe(r.id),l=(new DOMParser().parseFromString(o,"text/html").body.textContent||"").trim();if(l)try{return JSON.parse(l)}catch{return}};_aid;setData=async t=>{const{title:n}=this;if(!this._aid){const a=(await P_()).find(l=>l.title===n);if(a)this._aid=a.id.toString();else {const{success:l,aid:u}=await Fw({title:n});if(!l)return false;this._aid=u;}}const r=JSON.stringify(t),{success:o}=await Fw({aid:this._aid,title:n,content:`<p>${r}</p>`,words:r.length.toString()});return o}}const bxe=io.extend("settings"),Jj=new vxe(Ao),eU=["accessKey","accessKeyExpireAt"],yxe=()=>[...eU,...vy,"backupSettingsToArticleDraft","fav.addSeparator","watchlaterAddSeparator","watchlaterItemsOrder","popularWeeklyUseShuffle","popularGeneralUseAnonymous"],Sxe=[...eU,"backupSettingsToArticleDraft"];let tU=false;function nU(e){tU=e;}let Hw;const Cxe=Gl(Jj.setData,so("5s"));async function xxe(e){if(!e.backupSettingsToArticleDraft||tU)return;const{pickedSettings:t}=jf(e,ic,yxe());if(!Hw||!ma(Hw,t))try{await Cxe(t),Hw=t,bxe("backup to article draft complete");}catch(r){console.error(r.stack||r);}}const wxe=io.extend("settings"),bg={accessKey:"",accessKeyExpireAt:0,pureRecommend:true,appRecommend:{addOtherTabContents:false},modalFeedFullScreen:false,grid:{useCustomGrid:true,gridDisplayMode:Br.NormalGrid,twoColumnModeAlign:ru.Center,enableForceColumn:false,forceColumnCount:4,cardMinWidth:320},videoCard:{actions:{openInPipWindow:false,showLargePreview:true},videoPreview:{useMp4:true,useScale:false,useVideoCardAsTrigger:false,usePreferredCdn:true,addTo:{searchPage:true}},imgPreview:{enabled:true,autoPreviewWhenKeyboardSelect:false,autoPreviewWhenHover:true,disableWhenMultiSelecting:true}},autoPreviewUpdateInterval:700,useDelayForHover:false,enableSidebar:true,sidebarAlign:mf.Right,dynamicFeed:{showLive:true,videoOnly:false,followGroup:{enabled:true,forceUseMergeTimelineIds:[]},whenViewAll:{enableHideSomeContents:false,hideIds:[]},advancedFilter:false,__internal:{cacheAllItemsEntry:false,cacheAllItemsUpMids:[],externalFilterInput:false}},watchlaterAddSeparator:true,watchlaterItemsOrder:vo.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:[]},dfByTitle:{enabled:false,keywords:[]},dfHideOpusMids:{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:rr.Normal,pipWindow:{defaultLocked:true,autoWebFullscreen:true},hidingTabKeys:[et.KeepFollowOnly,et.Live,et.Liked],customTabKeysOrder:[],multiSelect:{clearWhenExit:true,showIcon:true},__internalEnableCopyBvidInfo:false,__internalAddTabbarCopyBvidButton:false,__internalHotSubUseDropdown:false,__internalRecTabRenderAsSegments:false},at=kn(Zd(bg)),ic=vCe(bg),vy=ic.filter(e=>e.includes("__internal")&&typeof To(bg,e)=="boolean");wxe("allowedLeafSettingsPaths = %O, internalBooleanPaths = %O",ic,vy);function Ut(e){return bt(at,e)}function yg(){return eo(at)}const iA="settings";async function rU(){const e=await GM.getValue(iA);return !e||typeof e!="object"?{}:(aA(e),jf(e,ic).pickedSettings)}async function $xe(){const e=await rU();Ga(e),Ya(at,()=>{Exe();}),iT({storageKey:iA,setPersist(t){oU=t;},onUpdate(t){Ga(t);}});}async function Exe(){const e=Zd(eo(at));await Mxe(e),await xxe(e);}let oU=true;async function Mxe(e){oU&&await GM.setValue(iA,e);}function Ga(e){const{pickedPaths:t}=jf(e,ic);for(const n of t){const r=To(e,n);xf(at,n,r);}}function Rxe(){return Ga(bg)}function aA(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"],["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"],["grid.enableForceColumn","grid.enableForceCoumn"],["dynamicFeed.advancedFilter","dynamicFeedAdvancedSearch"],["dynamicFeed.advancedFilter","dynamicFeed.advancedSearch"]];for(const[n,r]of t){const o=i=>!Fa(i);o(To(e,n))||o(To(e,r))&&xf(e,n,To(e,r));}}function jf(e,t,n=[]){const r={},o=t.filter(i=>ic.includes(i)&&!n.includes(i)&&!Fa(To(e,i)));return o.forEach(i=>{const a=To(e,i);xf(r,i,a);}),{pickedPaths:o,pickedSettings:r}}function iU(e){const t=Ut();return To(t,e)}async function T1(e){const t=await rU();return To(t,e)||To(yg(),e)}function Txe(e,t){xf(at,e,t);}async function Ua(e,{add:t,remove:n}){const r=await T1(e),o=new Set(r);for(const i of t??[])o.add(i);for(const i of n??[])o.delete(i);Txe(e,Array.from(o));}await( $xe());Os&&at.accessKey&&at.accessKeyExpireAt&&Date.now()>=at.accessKeyExpireAt&&rn("access_key 已过期, 请重新获取 !!!");var i0={exports:{}},Axe=i0.exports,I_;function Nxe(){return I_||(I_=1,(function(e,t){(function(n,r){e.exports=r();})(Axe,(function(){var n,r,o=1e3,i=6e4,a=36e5,l=864e5,u=/\[([^\]]+)]|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,d=31536e6,m=2628e6,p=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,g={years:d,months:m,days:l,hours:a,minutes:i,seconds:o,milliseconds:1,weeks:6048e5},b=function(I){return I instanceof T},y=function(I,N,P){return new T(I,P,N.$l)},S=function(I){return r.p(I)+"s"},C=function(I){return I<0},w=function(I){return C(I)?Math.ceil(I):Math.floor(I)},$=function(I){return Math.abs(I)},M=function(I,N){return I?C(I)?{negative:true,format:""+$(I)+N}:{negative:false,format:""+I+N}:{negative:false,format:""}},T=(function(){function I(P,O,_){var L=this;if(this.$d={},this.$l=_,P===void 0&&(this.$ms=0,this.parseFromMilliseconds()),O)return y(P*g[S(O)],this);if(typeof P=="number")return this.$ms=P,this.parseFromMilliseconds(),this;if(typeof P=="object")return Object.keys(P).forEach((function(q){L.$d[S(q)]=P[q];})),this.calMilliseconds(),this;if(typeof P=="string"){var j=P.match(p);if(j){var U=j.slice(2).map((function(q){return q!=null?Number(q):0}));return this.$d.years=U[0],this.$d.months=U[1],this.$d.weeks=U[2],this.$d.days=U[3],this.$d.hours=U[4],this.$d.minutes=U[5],this.$d.seconds=U[6],this.calMilliseconds(),this}}return this}var N=I.prototype;return N.calMilliseconds=function(){var P=this;this.$ms=Object.keys(this.$d).reduce((function(O,_){return O+(P.$d[_]||0)*g[_]}),0);},N.parseFromMilliseconds=function(){var P=this.$ms;this.$d.years=w(P/d),P%=d,this.$d.months=w(P/m),P%=m,this.$d.days=w(P/l),P%=l,this.$d.hours=w(P/a),P%=a,this.$d.minutes=w(P/i),P%=i,this.$d.seconds=w(P/o),P%=o,this.$d.milliseconds=P;},N.toISOString=function(){var P=M(this.$d.years,"Y"),O=M(this.$d.months,"M"),_=+this.$d.days||0;this.$d.weeks&&(_+=7*this.$d.weeks);var L=M(_,"D"),j=M(this.$d.hours,"H"),U=M(this.$d.minutes,"M"),q=this.$d.seconds||0;this.$d.milliseconds&&(q+=this.$d.milliseconds/1e3,q=Math.round(1e3*q)/1e3);var V=M(q,"S"),B=P.negative||O.negative||L.negative||j.negative||U.negative||V.negative,F=j.format||U.format||V.format?"T":"",W=(B?"-":"")+"P"+P.format+O.format+L.format+F+j.format+U.format+V.format;return W==="P"||W==="-P"?"P0D":W},N.toJSON=function(){return this.toISOString()},N.format=function(P){var O=P||"YYYY-MM-DDTHH:mm:ss",_={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 O.replace(u,(function(L,j){return j||String(_[L])}))},N.as=function(P){return this.$ms/g[S(P)]},N.get=function(P){var O=this.$ms,_=S(P);return _==="milliseconds"?O%=1e3:O=_==="weeks"?w(O/g[_]):this.$d[_],O||0},N.add=function(P,O,_){var L;return L=O?P*g[S(O)]:b(P)?P.$ms:y(P,this).$ms,y(this.$ms+L*(_?-1:1),this)},N.subtract=function(P,O){return this.add(P,O,true)},N.locale=function(P){var O=this.clone();return O.$l=P,O},N.clone=function(){return y(this.$ms,this)},N.humanize=function(P){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!P)},N.valueOf=function(){return this.asMilliseconds()},N.milliseconds=function(){return this.get("milliseconds")},N.asMilliseconds=function(){return this.as("milliseconds")},N.seconds=function(){return this.get("seconds")},N.asSeconds=function(){return this.as("seconds")},N.minutes=function(){return this.get("minutes")},N.asMinutes=function(){return this.as("minutes")},N.hours=function(){return this.get("hours")},N.asHours=function(){return this.as("hours")},N.days=function(){return this.get("days")},N.asDays=function(){return this.as("days")},N.weeks=function(){return this.get("weeks")},N.asWeeks=function(){return this.as("weeks")},N.months=function(){return this.get("months")},N.asMonths=function(){return this.as("months")},N.years=function(){return this.get("years")},N.asYears=function(){return this.as("years")},I})(),R=function(I,N,P){return I.add(N.years()*P,"y").add(N.months()*P,"M").add(N.days()*P,"d").add(N.hours()*P,"h").add(N.minutes()*P,"m").add(N.seconds()*P,"s").add(N.milliseconds()*P,"ms")};return function(I,N,P){n=P,r=P().$utils(),P.duration=function(L,j){var U=P.locale();return y(L,{$l:U},j)},P.isDuration=b;var O=N.prototype.add,_=N.prototype.subtract;N.prototype.add=function(L,j){return b(L)?R(this,L,1):O.bind(this)(L,j)},N.prototype.subtract=function(L,j){return b(L)?R(this,L,-1):_.bind(this)(L,j)};}}));})(i0)),i0.exports}var Pxe=Nxe();const Ixe=Io(Pxe);function O_(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,true)}function D_(e,t,n){var r=[],o=MM(e,r,n);return r.length<2?n:o+t(r)}var aU=function(t){var n=Az(t);n.sheet.speedy=function(l){this.isSpeedy=l;},n.compat=true;var r=function(){for(var u=arguments.length,d=new Array(u),m=0;m<u;m++)d[m]=arguments[m];var p=Vd(d,n.registered,void 0);return RM(n,p,false),n.key+"-"+p.name},o=function(){for(var u=arguments.length,d=new Array(u),m=0;m<u;m++)d[m]=arguments[m];var p=Vd(d,n.registered),g="animation-"+p.name;return O_(n,{name:p.name,styles:"@keyframes "+g+"{"+p.styles+"}"}),g},i=function(){for(var u=arguments.length,d=new Array(u),m=0;m<u;m++)d[m]=arguments[m];var p=Vd(d,n.registered);O_(n,p);},a=function(){for(var u=arguments.length,d=new Array(u),m=0;m<u;m++)d[m]=arguments[m];return D_(n.registered,r,Oxe(d))};return {css:r,cx:a,injectGlobal:i,keyframes:o,hydrate:function(u){u.forEach(function(d){n.inserted[d]=true;});},flush:function(){n.registered={},n.inserted={},n.sheet.flush();},sheet:n.sheet,cache:n,getRegisteredStyles:MM.bind(null,n.registered),merge:D_.bind(null,n.registered,r)}},Oxe=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 a in o)o[a]&&a&&(i&&(i+=" "),i+=a);}break}default:i=o;}i&&(n&&(n+=" "),n+=i);}}return n},__=function(t,n){var r=arguments;if(n==null||!qp.call(n,"css"))return f.createElement.apply(void 0,r);var o=r.length,i=new Array(o);i[0]=AM,i[1]=TM(t,n);for(var a=2;a<o;a++)i[a]=r[a];return f.createElement.apply(null,i)};(function(e){var t;t||(t=e.JSX||(e.JSX={}));})(__||(__={}));var sA=Dz(function(e,t){var n=e.styles,r=Vd([n],void 0,f.useContext(_z)),o=f.useRef();return $5(function(){var i=t.key+"-global",a=new t.sheet.constructor({key:i,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),l=false,u=document.querySelector('style[data-emotion="'+i+" "+r.name+'"]');return t.sheet.tags.length&&(a.before=t.sheet.tags[0]),u!==null&&(l=true,u.setAttribute("data-emotion",i),a.hydrate([u])),o.current=[a,l],function(){a.flush();}},[t]),$5(function(){var i=o.current,a=i[0],l=i[1];if(l){i[1]=false;return}if(r.next!==void 0&&RM(t,r.next,true),a.tags.length){var u=a.tags[a.tags.length-1].nextElementSibling;a.before=u,a.flush();}t.insert("",r,a,false);},[t,r.name]),null});function ln(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Vd(t)}var th={},Vw={exports:{}},L_;function Ma(){return L_||(L_=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;})(Vw)),Vw.exports}var nh={},z_;function Dxe(){if(z_)return nh;z_=1,Object.defineProperty(nh,"__esModule",{value:true}),nh.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 nh.default=e,nh}var rh={},oh={},ih={},ah={},B_;function _xe(){return B_||(B_=1,Object.defineProperty(ah,"__esModule",{value:true}),ah.commonLocale=void 0,ah.commonLocale={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:true}),ah}var k_;function Lxe(){if(k_)return ih;k_=1,Object.defineProperty(ih,"__esModule",{value:true}),ih.default=void 0;var e=_xe();function t(u){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},t(u)}function n(u,d){var m=Object.keys(u);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(u);d&&(p=p.filter(function(g){return Object.getOwnPropertyDescriptor(u,g).enumerable})),m.push.apply(m,p);}return m}function r(u){for(var d=1;d<arguments.length;d++){var m=arguments[d]!=null?arguments[d]:{};d%2?n(Object(m),true).forEach(function(p){o(u,p,m[p]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(m)):n(Object(m)).forEach(function(p){Object.defineProperty(u,p,Object.getOwnPropertyDescriptor(m,p));});}return u}function o(u,d,m){return d=i(d),d in u?Object.defineProperty(u,d,{value:m,enumerable:true,configurable:true,writable:true}):u[d]=m,u}function i(u){var d=a(u,"string");return t(d)=="symbol"?d:String(d)}function a(u,d){if(t(u)!="object"||!u)return u;var m=u[Symbol.toPrimitive];if(m!==void 0){var p=m.call(u,d);if(t(p)!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return (d==="string"?String:Number)(u)}var l=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 ih.default=l,ih}var sh={},F_;function sU(){if(F_)return sh;F_=1,Object.defineProperty(sh,"__esModule",{value:true}),sh.default=void 0;const e={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]};return sh.default=e,sh}var H_;function lU(){if(H_)return oh;H_=1;var e=Ma().default;Object.defineProperty(oh,"__esModule",{value:true}),oh.default=void 0;var t=e(Lxe()),n=e(sU());const r={lang:{placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"],...t.default},timePickerLocale:{...n.default}};return r.lang.ok="确定",oh.default=r,oh}var V_;function zxe(){if(V_)return rh;V_=1;var e=Ma().default;Object.defineProperty(rh,"__esModule",{value:true}),rh.default=void 0;var t=e(lU());return rh.default=t.default,rh}var j_;function Bxe(){if(j_)return th;j_=1;var e=Ma().default;Object.defineProperty(th,"__esModule",{value:true}),th.default=void 0;var t=e(Dxe()),n=e(zxe()),r=e(lU()),o=e(sU());const i="${label}不是一个有效的${type}",a={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 th.default=a,th}var jw,U_;function kxe(){return U_||(U_=1,jw=Bxe()),jw}var Fxe=kxe();const Hxe=Io(Fxe),Vxe="--bilibili-gate--font",jxe="--bilibili-gate--video-card--border-radius",cU="--bilibili-gate--primary-color",Uxe="--bilibili-gate--border-color",uU="--bilibili-gate--text-color",dU="--bilibili-gate--bg",qxe="--bilibili-gate--primary-color--lv1",Wxe="--bilibili-gate--primary-color--lv2",Gxe="--bilibili-gate--primary-color--lv3",Kxe="--bilibili-gate--bg--lv1",Yxe="--bilibili-gate--bg--lv2",Xxe="--bilibili-gate--bg--lv3",Qxe="#ff6699",Zxe='"Alibaba PuHuiTi 3.0", "PingFang SC", "HarmonyOS_Regular", "Helvetica Neue", "Microsoft YaHei", sans-serif',fU="var(--custom-font-family--options--font-family, var(--bilibili-gate--font))",Jxe="bilibili-gate-root",mU="bilibili-gate-using-dark",hU="bilibili-gate-using-light",pU="html.bilibili-gate-using-dark",ewe="html.bilibili-gate-using-light",Bs={appCustomFontId:Vxe,appVideoCardBorderRadiusId:jxe,appPrimaryColorId:cU,appBorderColorId:Uxe,appTextColorId:uU,appBgId:dU,appPrimaryColorLv1Id:qxe,appPrimaryColorLv2Id:Wxe,appPrimaryColorLv3Id:Gxe,appBgLv1Id:Kxe,appBgLv2Id:Yxe,appBgLv3Id:Xxe,biliPink:Qxe,appCustomFontValue:Zxe,appUsingFont:fU,appClsRoot:Jxe,appClsDark:mU,appClsLight:hU,appClsDarkSelector:pU,appClsLightSelector:ewe},q_=io.extend("utility:dom"),gU=10*1e3,vU=200;async function Sg(e,t){const n=t?.interval??vU;let r=t?.timeout??gU;r===0&&(r=1/0);const o=t?.validate??(l=>!Fa(l)),i=performance.now();let a=e();for(;!o(a)&&performance.now()-i<r;)await pn(n),a=e();return a}async function A1(e,t,n){const r=n?.pollTimeout??gU,o=n?.pollInterval??vU,i=n?.selectorPredicate,a=n?.warnOnTimeout??false,l=await Sg(()=>{let u=Array.from(document.querySelectorAll(e));if(i&&(u=u.filter(i)),u.length)return u},{timeout:r,interval:o});if(!l?.length){q_("tryAction: timeout for selector = `%s`",e),a&&Ko("tryAction timeout, selector = `%s`",e);return}q_("tryAction: selector=`%s` count=%s",e,l.length);for(const u of l)await Promise.resolve(t(u));}async function Fh(e,t,n){return A1(e,r=>r.remove(),{selectorPredicate:t,warnOnTimeout:false})}function ks(){const e=document.activeElement?.tagName?.toLowerCase()??"";return !!(["input","textarea"].includes(e)||document.querySelector(".center-search__bar.is-focus"))}function twe(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 N1(e){return new Promise(t=>{typeof requestIdleCallback=="function"?requestIdleCallback(()=>t(),e):setTimeout(t);})}let Uw="";function lA(e){Uw||(Uw=document.title),document.title=`${e} - ${Uw}`;}function N3(...e){return e.map(t=>t.trim()).filter(Boolean).map(t=>t.startsWith(".")?t:`.${t}`).join(",")}const Mp={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}}},W_=e=>{const t=e.getDetectEl();return t?e.detect(t):false},hf=nc(()=>W_(Mp.Bili)||W_(Mp.Evolved)||document.body.classList.contains("bilibili-helper-dark-mode")||document.documentElement.classList.contains("dark"));function P1(){return hf.use()}const bU=()=>{document.documentElement.classList.toggle(mU,hf.get()),document.documentElement.classList.toggle(hU,!hf.get());};bU();Ya(hf.state,bU);const cA=new MutationObserver(async()=>{await pn(0),hf.updateThrottled();});cA.observe(document.body,{attributes:true,attributeFilter:["class"]});cA.observe(document.documentElement,{attributes:true,attributeFilter:["data-darkreader-scheme"]});nwe();async function nwe(){const e=await Sg(Mp.Bili.getDetectEl);e&&cA.observe(e,{attributes:true});}document.addEventListener("click",rwe,{passive:true});async function rwe(e){const t=e.target;(Mp.Bili.isTrigger(t)||t.closest(Mp.Evolved.trigger))&&(await pn(0),hf.updateThrottled());}const owe=io.extend("components:css-vars");owe(":export = %O",Bs);const ac=e=>(e.startsWith("--")||(e=`--${e}`),`var(${e})`),uA=ac(Bs.appVideoCardBorderRadiusId),xa=ac(Bs.appPrimaryColorId),yU=ac(Bs.appBorderColorId);ac(Bs.appTextColorId);const P3=ac(Bs.appBgId),by=ac(Bs.appBgLv1Id),iwe=ac(Bs.appBgLv2Id);ac(Bs.appBgLv3Id);const Uf={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 awe(){return iy.useToken().token.colorPrimaryHover}function qf(){const{popoverBorderColorUseColorPrimary:e}=bt(at.style.general),t=awe();return e?t:yU}function swe(){const e=qf();return f.useMemo(()=>({border:`1px solid ${e}`}),[e])}function lwe(){const{colorLink:e,colorLinkActive:t,colorLinkHover:n}=iy.useToken().token;return f.useMemo(()=>ln("color:",e,";&:visited{color:",e,";}&:hover{color:",n,";}&:active{color:",t,";}",""),[e,t,n])}const SU=`${oo}--use-ant-link-color`;function cwe(){const e=lwe();return ln(":root .",SU,"{",e,";}","")}var CU=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);}},I3=function(e,t){return I3=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r;}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o]);},I3(e,t)};function xU(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");I3(e,t);function n(){this.constructor=e;}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n);}var hi=function(){return hi=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},hi.apply(this,arguments)};function I1(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 wU(e,t,n,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,r);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(i=(o<3?a(i):o>3?a(t,n,i):a(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i}function $U(e,t){return function(n,r){t(n,r,e);}}function EU(e,t,n,r,o,i){function a(w){if(w!==void 0&&typeof w!="function")throw new TypeError("Function expected");return w}for(var l=r.kind,u=l==="getter"?"get":l==="setter"?"set":"value",d=!t&&e?r.static?e:e.prototype:null,m=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),p,g=false,b=n.length-1;b>=0;b--){var y={};for(var S in r)y[S]=S==="access"?{}:r[S];for(var S in r.access)y.access[S]=r.access[S];y.addInitializer=function(w){if(g)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(w||null));};var C=(0, n[b])(l==="accessor"?{get:m.get,set:m.set}:m[u],y);if(l==="accessor"){if(C===void 0)continue;if(C===null||typeof C!="object")throw new TypeError("Object expected");(p=a(C.get))&&(m.get=p),(p=a(C.set))&&(m.set=p),(p=a(C.init))&&o.unshift(p);}else (p=a(C))&&(l==="field"?o.unshift(p):m[u]=p);}d&&Object.defineProperty(d,r.name,m),g=true;}function MU(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0}function RU(e){return typeof e=="symbol"?e:"".concat(e)}function TU(e,t,n){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:true,value:n?"".concat(n," ",t):t})}function AU(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function O1(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i);})}return new(n||(n=Promise))(function(i,a){function l(m){try{d(r.next(m));}catch(p){a(p);}}function u(m){try{d(r.throw(m));}catch(p){a(p);}}function d(m){m.done?i(m.value):o(m.value).then(l,u);}d((r=r.apply(e,t||[])).next());})}function D1(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=l(0),a.throw=l(1),a.return=l(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(d){return function(m){return u([d,m])}}function u(d){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,d[0]&&(n=0)),n;)try{if(r=1,o&&(i=d[0]&2?o.return:d[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,d[1])).done)return i;switch(o=0,i&&(d=[d[0]&2,i.value]),d[0]){case 0:case 1:i=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,o=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!i||d[1]>i[0]&&d[1]<i[3])){n.label=d[1];break}if(d[0]===6&&n.label<i[1]){n.label=i[1],i=d;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(d);break}i[2]&&n.ops.pop(),n.trys.pop();continue}d=t.call(e,n);}catch(m){d=[6,m],o=0;}finally{r=i=0;}if(d[0]&5)throw d[1];return {value:d[0]?d[1]:void 0,done:true}}}var _1=Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:true,get:function(){return t[n]}}),Object.defineProperty(e,r,o);}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n];});function NU(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&_1(t,e,n);}function fu(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 Qn(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value);}catch(l){a={error:l};}finally{try{o&&!o.done&&(n=r.return)&&n.call(r);}finally{if(a)throw a.error}}return i}function PU(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Qn(arguments[t]));return e}function IU(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;t<n;t++)for(var i=arguments[t],a=0,l=i.length;a<l;a++,o++)r[o]=i[a];return r}function Tr(e,t,n){if(n||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))}function pf(e){return this instanceof pf?(this.v=e,this):new pf(e)}function OU(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),o,i=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),l("next"),l("throw"),l("return",a),o[Symbol.asyncIterator]=function(){return this},o;function a(b){return function(y){return Promise.resolve(y).then(b,p)}}function l(b,y){r[b]&&(o[b]=function(S){return new Promise(function(C,w){i.push([b,S,C,w])>1||u(b,S);})},y&&(o[b]=y(o[b])));}function u(b,y){try{d(r[b](y));}catch(S){g(i[0][3],S);}}function d(b){b.value instanceof pf?Promise.resolve(b.value.v).then(m,p):g(i[0][2],b);}function m(b){u("next",b);}function p(b){u("throw",b);}function g(b,y){b(y),i.shift(),i.length&&u(i[0][0],i[0][1]);}}function DU(e){var t,n;return t={},r("next"),r("throw",function(o){throw o}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(o,i){t[o]=e[o]?function(a){return (n=!n)?{value:pf(e[o](a)),done:false}:i?i(a):a}:i;}}function _U(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof fu=="function"?fu(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(i){n[i]=e[i]&&function(a){return new Promise(function(l,u){a=e[i](a),o(l,u,a.done,a.value);})};}function o(i,a,l,u){Promise.resolve(u).then(function(d){i({value:d,done:l});},a);}}function LU(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var uwe=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t});}):function(e,t){e.default=t;},O3=function(e){return O3=Object.getOwnPropertyNames||function(t){var n=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[n.length]=r);return n},O3(e)};function zU(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=O3(e),r=0;r<n.length;r++)n[r]!=="default"&&_1(t,e,n[r]);return uwe(t,e),t}function BU(e){return e&&e.__esModule?e:{default:e}}function kU(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function FU(e,t,n,r,o){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?o.call(e,n):o?o.value=n:t.set(e,n),n}function HU(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function VU(e,t,n){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var r,o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose];}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(o=r);}if(typeof r!="function")throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this);}catch(i){return Promise.reject(i)}}),e.stack.push({value:t,dispose:r,async:n});}else n&&e.stack.push({async:true});return t}var dwe=typeof SuppressedError=="function"?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function jU(e){function t(i){e.error=e.hasError?new dwe(i,e.error,"An error was suppressed during disposal."):i,e.hasError=true;}var n,r=0;function o(){for(;n=e.stack.pop();)try{if(!n.async&&r===1)return r=0,e.stack.push(n),Promise.resolve().then(o);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(i).then(o,function(a){return t(a),o()})}else r|=1;}catch(a){t(a);}if(r===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return o()}function UU(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(n,r,o,i,a){return r?t?".jsx":".js":o&&(!i||!a)?n:o+i+"."+a.toLowerCase()+"js"}):e}const fwe={__extends:xU,__assign:hi,__rest:I1,__decorate:wU,__param:$U,__esDecorate:EU,__runInitializers:MU,__propKey:RU,__setFunctionName:TU,__metadata:AU,__awaiter:O1,__generator:D1,__createBinding:_1,__exportStar:NU,__values:fu,__read:Qn,__spread:PU,__spreadArrays:IU,__spreadArray:Tr,__await:pf,__asyncGenerator:OU,__asyncDelegator:DU,__asyncValues:_U,__makeTemplateObject:LU,__importStar:zU,__importDefault:BU,__classPrivateFieldGet:kU,__classPrivateFieldSet:FU,__classPrivateFieldIn:HU,__addDisposableResource:VU,__disposeResources:jU,__rewriteRelativeImportExtension:UU},mwe=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:VU,get __assign(){return hi},__asyncDelegator:DU,__asyncGenerator:OU,__asyncValues:_U,__await:pf,__awaiter:O1,__classPrivateFieldGet:kU,__classPrivateFieldIn:HU,__classPrivateFieldSet:FU,__createBinding:_1,__decorate:wU,__disposeResources:jU,__esDecorate:EU,__exportStar:NU,__extends:xU,__generator:D1,__importDefault:BU,__importStar:zU,__makeTemplateObject:LU,__metadata:AU,__param:$U,__propKey:RU,__read:Qn,__rest:I1,__rewriteRelativeImportExtension:UU,__runInitializers:MU,__setFunctionName:TU,__spread:PU,__spreadArray:Tr,__spreadArrays:IU,__values:fu,default:fwe},Symbol.toStringTag,{value:"Module"}));var dA=function(e){return typeof e=="function"},hwe=function(e){return typeof e=="string"},qU=function(e){return typeof e=="number"},nt=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 As=CU(f.useEffect);var WU=function(e,t){var n=t.manual,r=t.ready,o=r===void 0?true:r,i=t.defaultParams,a=i===void 0?[]:i,l=t.refreshDeps,u=l===void 0?[]:l,d=t.refreshDepsAction,m=f.useRef(false);return m.current=false,As(function(){!n&&o&&(m.current=true,e.run.apply(e,Tr([],Qn(a),false)));},[o]),As(function(){m.current||n||(m.current=true,d?d():e.refresh());},Tr([],Qn(u),false)),{onBefore:function(){if(!o)return {stopNow:true}}}};WU.onInit=function(e){var t=e.ready,n=t===void 0?true:t,r=e.manual;return {loading:!r&&n}};function D3(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 L1=function(e,t){var n=f.useRef({deps:t,obj:void 0,initialized:false}).current;return (n.initialized===false||!D3(n.deps,t))&&(n.deps=t,n.obj=e(),n.initialized=true),n.obj};function mu(e){var t=f.useRef(e);return t.current=e,t}var Wf=function(e){var t=mu(e);f.useEffect(function(){return function(){t.current();}},[]);},a0=new Map,pwe=function(e,t,n){var r=a0.get(e);r?.timer&&clearTimeout(r.timer);var o=void 0;t>-1&&(o=setTimeout(function(){a0.delete(e);},t)),a0.set(e,hi(hi({},n),{timer:o}));},gwe=function(e){return a0.get(e)},s0=new Map,vwe=function(e){return s0.get(e)},bwe=function(e,t){s0.set(e,t),t.then(function(n){return s0.delete(e),n}).catch(function(){s0.delete(e);});},Bc={},ywe=function(e,t){Bc[e]&&Bc[e].forEach(function(n){return n(t)});},qw=function(e,t){return Bc[e]||(Bc[e]=[]),Bc[e].push(t),function(){var r=Bc[e].indexOf(t);Bc[e].splice(r,1);}},Swe=function(e,t){var n=t.cacheKey,r=t.cacheTime,o=r===void 0?300*1e3:r,i=t.staleTime,a=i===void 0?0:i,l=t.setCache,u=t.getCache,d=f.useRef(void 0),m=f.useRef(void 0),p=function(b,y){l?l(y):pwe(b,o,y),ywe(b,y.data);},g=function(b,y){return y===void 0&&(y=[]),u?u(y):gwe(b)};return L1(function(){if(n){var b=g(n);b&&Object.hasOwnProperty.call(b,"data")&&(e.state.data=b.data,e.state.params=b.params,(a===-1||Date.now()-b.time<=a)&&(e.state.loading=false)),d.current=qw(n,function(y){e.setState({data:y});});}},[]),Wf(function(){var b;(b=d.current)===null||b===void 0||b.call(d);}),n?{onBefore:function(b){var y=g(n,b);return !y||!Object.hasOwnProperty.call(y,"data")?{}:a===-1||Date.now()-y.time<=a?{loading:false,data:y?.data,error:void 0,returnNow:true}:{data:y?.data,error:void 0}},onRequest:function(b,y){var S=vwe(n);return S&&S!==m.current?{servicePromise:S}:(S=b.apply(void 0,Tr([],Qn(y),false)),m.current=S,bwe(n,S),{servicePromise:S})},onSuccess:function(b,y){var S;n&&((S=d.current)===null||S===void 0||S.call(d),p(n,{data:b,params:y,time:Date.now()}),d.current=qw(n,function(C){e.setState({data:C});}));},onMutate:function(b){var y;n&&((y=d.current)===null||y===void 0||y.call(d),p(n,{data:b,params:e.state.params,time:Date.now()}),d.current=qw(n,function(S){e.setState({data:S});}));}}:{}},Ww,G_;function fA(){if(G_)return Ww;G_=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Ww=e,Ww}var Gw,K_;function Cwe(){if(K_)return Gw;K_=1;var e=typeof Gv=="object"&&Gv&&Gv.Object===Object&&Gv;return Gw=e,Gw}var Kw,Y_;function GU(){if(Y_)return Kw;Y_=1;var e=Cwe(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Kw=n,Kw}var Yw,X_;function xwe(){if(X_)return Yw;X_=1;var e=GU(),t=function(){return e.Date.now()};return Yw=t,Yw}var Xw,Q_;function wwe(){if(Q_)return Xw;Q_=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return Xw=t,Xw}var Qw,Z_;function $we(){if(Z_)return Qw;Z_=1;var e=wwe(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return Qw=n,Qw}var Zw,J_;function KU(){if(J_)return Zw;J_=1;var e=GU(),t=e.Symbol;return Zw=t,Zw}var Jw,e9;function Ewe(){if(e9)return Jw;e9=1;var e=KU(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;function i(a){var l=n.call(a,o),u=a[o];try{a[o]=void 0;var d=!0;}catch{}var m=r.call(a);return d&&(l?a[o]=u:delete a[o]),m}return Jw=i,Jw}var e$,t9;function Mwe(){if(t9)return e$;t9=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return e$=n,e$}var t$,n9;function Rwe(){if(n9)return t$;n9=1;var e=KU(),t=Ewe(),n=Mwe(),r="[object Null]",o="[object Undefined]",i=e?e.toStringTag:void 0;function a(l){return l==null?l===void 0?o:r:i&&i in Object(l)?t(l):n(l)}return t$=a,t$}var n$,r9;function Twe(){if(r9)return n$;r9=1;function e(t){return t!=null&&typeof t=="object"}return n$=e,n$}var r$,o9;function Awe(){if(o9)return r$;o9=1;var e=Rwe(),t=Twe(),n="[object Symbol]";function r(o){return typeof o=="symbol"||t(o)&&e(o)==n}return r$=r,r$}var o$,i9;function Nwe(){if(i9)return o$;i9=1;var e=$we(),t=fA(),n=Awe(),r=NaN,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,l=parseInt;function u(d){if(typeof d=="number")return d;if(n(d))return r;if(t(d)){var m=typeof d.valueOf=="function"?d.valueOf():d;d=t(m)?m+"":m;}if(typeof d!="string")return d===0?d:+d;d=e(d);var p=i.test(d);return p||a.test(d)?l(d.slice(2),p?2:8):o.test(d)?r:+d}return o$=u,o$}var i$,a9;function YU(){if(a9)return i$;a9=1;var e=fA(),t=xwe(),n=Nwe(),r="Expected a function",o=Math.max,i=Math.min;function a(l,u,d){var m,p,g,b,y,S,C=0,w=false,$=false,M=true;if(typeof l!="function")throw new TypeError(r);u=n(u)||0,e(d)&&(w=!!d.leading,$="maxWait"in d,g=$?o(n(d.maxWait)||0,u):g,M="trailing"in d?!!d.trailing:M);function T(U){var q=m,V=p;return m=p=void 0,C=U,b=l.apply(V,q),b}function R(U){return C=U,y=setTimeout(P,u),w?T(U):b}function I(U){var q=U-S,V=U-C,B=u-q;return $?i(B,g-V):B}function N(U){var q=U-S,V=U-C;return S===void 0||q>=u||q<0||$&&V>=g}function P(){var U=t();if(N(U))return O(U);y=setTimeout(P,I(U));}function O(U){return y=void 0,M&&m?T(U):(m=p=void 0,b)}function _(){y!==void 0&&clearTimeout(y),C=0,m=S=p=y=void 0;}function L(){return y===void 0?b:O(t())}function j(){var U=t(),q=N(U);if(m=arguments,p=this,S=U,q){if(y===void 0)return R(S);if($)return clearTimeout(y),y=setTimeout(P,u),T(S)}return y===void 0&&(y=setTimeout(P,u)),b}return j.cancel=_,j.flush=L,j}return i$=a,i$}var Pwe=YU();const Iwe=Io(Pwe);var Owe=function(e,t){var n=t.debounceWait,r=t.debounceLeading,o=t.debounceTrailing,i=t.debounceMaxWait,a=f.useRef(void 0),l=f.useMemo(function(){var u={};return r!==void 0&&(u.leading=r),o!==void 0&&(u.trailing=o),i!==void 0&&(u.maxWait=i),u},[r,o,i]);return f.useEffect(function(){if(n){var u=e.runAsync.bind(e);return a.current=Iwe(function(d){d();},n,l),e.runAsync=function(){for(var d=[],m=0;m<arguments.length;m++)d[m]=arguments[m];return new Promise(function(p,g){var b;(b=a.current)===null||b===void 0||b.call(a,function(){u.apply(void 0,Tr([],Qn(d),false)).then(p).catch(g);});})},function(){var d;(d=a.current)===null||d===void 0||d.cancel(),e.runAsync=u;}}},[n,l]),n?{onCancel:function(){var u;(u=a.current)===null||u===void 0||u.cancel();}}:{}},Dwe=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();}}},Cg=!!(typeof window<"u"&&window.document&&window.document.createElement);function mA(){return Cg?document.visibilityState!=="hidden":true}var l0=new Set;function _we(e){return l0.add(e),function(){l0.has(e)&&l0.delete(e);}}if(Cg){var Lwe=function(){mA()&&l0.forEach(function(e){return e()});};window.addEventListener("visibilitychange",Lwe,false);}var zwe=function(e,t){var n=t.pollingInterval,r=t.pollingWhenHidden,o=r===void 0?true:r,i=t.pollingErrorRetryCount,a=i===void 0?-1:i,l=f.useRef(void 0),u=f.useRef(void 0),d=f.useRef(0),m=function(){var p;l.current&&clearTimeout(l.current),(p=u.current)===null||p===void 0||p.call(u);};return As(function(){n||m();},[n]),n?{onBefore:function(){m();},onError:function(){d.current+=1;},onSuccess:function(){d.current=0;},onFinally:function(){a===-1||a!==-1&&d.current<=a?l.current=setTimeout(function(){!o&&!mA()?u.current=_we(function(){e.refresh();}):e.refresh();},n):d.current=0;},onCancel:function(){m();}}:{}};function Bwe(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,Tr([],Qn(r),false)),setTimeout(function(){n=false;},t));}}var kwe=function(){return Cg&&typeof navigator.onLine<"u"?navigator.onLine:true},c0=new Set;function Fwe(e){return c0.add(e),function(){c0.has(e)&&c0.delete(e);}}if(Cg){var s9=function(){!mA()||!kwe()||c0.forEach(function(e){return e()});};window.addEventListener("visibilitychange",s9,false),window.addEventListener("focus",s9,false);}var Hwe=function(e,t){var n=t.refreshOnWindowFocus,r=t.focusTimespan,o=r===void 0?5e3:r,i=f.useRef(void 0),a=function(){var l;(l=i.current)===null||l===void 0||l.call(i);};return f.useEffect(function(){if(n){var l=Bwe(e.refresh.bind(e),o);i.current=Fwe(function(){l();});}return function(){a();}},[n,o]),Wf(function(){a();}),{}},Vwe=function(e,t){var n=t.retryInterval,r=t.retryCount,o=f.useRef(void 0),i=f.useRef(0),a=f.useRef(false);return r?{onBefore:function(){a.current||(i.current=0),a.current=false,o.current&&clearTimeout(o.current);},onSuccess:function(){i.current=0;},onError:function(){if(i.current+=1,r===-1||i.current<=r){var l=n??Math.min(1e3*Math.pow(2,i.current),3e4);o.current=setTimeout(function(){a.current=true,e.refresh();},l);}else i.current=0;},onCancel:function(){i.current=0,o.current&&clearTimeout(o.current);}}:{}},a$,l9;function jwe(){if(l9)return a$;l9=1;var e=YU(),t=fA(),n="Expected a function";function r(o,i,a){var l=true,u=true;if(typeof o!="function")throw new TypeError(n);return t(a)&&(l="leading"in a?!!a.leading:l,u="trailing"in a?!!a.trailing:u),e(o,i,{leading:l,maxWait:i,trailing:u})}return a$=r,a$}var Uwe=jwe();const qwe=Io(Uwe);var Wwe=function(e,t){var n=t.throttleWait,r=t.throttleLeading,o=t.throttleTrailing,i=f.useRef(void 0),a={};return r!==void 0&&(a.leading=r),o!==void 0&&(a.trailing=o),f.useEffect(function(){if(n){var l=e.runAsync.bind(e);return i.current=qwe(function(u){u();},n,a),e.runAsync=function(){for(var u=[],d=0;d<arguments.length;d++)u[d]=arguments[d];return new Promise(function(m,p){var g;(g=i.current)===null||g===void 0||g.call(i,function(){l.apply(void 0,Tr([],Qn(u),false)).then(m).catch(p);});})},function(){var u;e.runAsync=l,(u=i.current)===null||u===void 0||u.cancel();}}},[n,r,o]),n?{onCancel:function(){var l;(l=i.current)===null||l===void 0||l.cancel();}}:{}},ro=function(e){f.useEffect(function(){var t=e?.();if(!(t&&typeof t=="object"&&typeof t.then=="function"))return t},[]);},Gwe=function(){var e=Qn(f.useState({}),2),t=e[1];return f.useCallback(function(){return t({})},[])},Kwe=(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=hi(hi(hi({},this.state),{loading:!n.manual}),o);}return e.prototype.setState=function(t){t===void 0&&(t={}),this.state=hi(hi({},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 a;return (a=i[t])===null||a===void 0?void 0:a.call.apply(a,Tr([i],Qn(n),false))}).filter(Boolean);return Object.assign.apply(Object,Tr([{}],Qn(o),false))},e.prototype.runAsync=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return O1(this,void 0,void 0,function(){var r,o,i,a,l,u,d,m,p,g,b,y,S,C,w,$,M,T,R,I,N;return D1(this,function(P){switch(P.label){case 0:if(this.count+=1,r=this.count,o=this.runPluginHandler("onBefore",t),i=o.stopNow,a=i===void 0?false:i,l=o.returnNow,u=l===void 0?false:l,d=I1(o,["stopNow","returnNow"]),a)return [2,new Promise(function(){})];if(this.setState(hi({loading:true,params:t},d)),u)return [2,Promise.resolve(d.data)];(S=(y=this.options).onBefore)===null||S===void 0||S.call(y,t),P.label=1;case 1:return P.trys.push([1,3,,4]),m=this.runPluginHandler("onRequest",this.serviceRef.current,t).servicePromise,m||(m=(b=this.serviceRef).current.apply(b,Tr([],Qn(t),false))),[4,m];case 2:return p=P.sent(),r!==this.count?[2,new Promise(function(){})]:(this.setState({data:p,error:void 0,loading:false}),(w=(C=this.options).onSuccess)===null||w===void 0||w.call(C,p,t),this.runPluginHandler("onSuccess",p,t),(M=($=this.options).onFinally)===null||M===void 0||M.call($,t,p,void 0),r===this.count&&this.runPluginHandler("onFinally",t,p,void 0),[2,p]);case 3:if(g=P.sent(),r!==this.count)return [2,new Promise(function(){})];throw this.setState({error:g,loading:false}),(R=(T=this.options).onError)===null||R===void 0||R.call(T,g,t),this.runPluginHandler("onError",g,t),(N=(I=this.options).onFinally)===null||N===void 0||N.call(I,t,void 0,g),r===this.count&&this.runPluginHandler("onFinally",t,void 0,g),g;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,Tr([],Qn(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,Tr([],Qn(this.state.params||[]),false));},e.prototype.refreshAsync=function(){return this.runAsync.apply(this,Tr([],Qn(this.state.params||[]),false))},e.prototype.mutate=function(t){var n=dA(t)?t(this.state.data):t;this.runPluginHandler("onMutate",n),this.setState({data:n});},e})();function Ywe(e,t,n){t===void 0&&(t={}),n===void 0&&(n=[]);var r=t.manual,o=r===void 0?false:r,i=t.ready,a=i===void 0?true:i,l=I1(t,["manual","ready"]),u=hi({manual:o,ready:a},l),d=mu(e),m=Gwe(),p=L1(function(){var g=n.map(function(b){var y;return (y=b?.onInit)===null||y===void 0?void 0:y.call(b,u)}).filter(Boolean);return new Kwe(d,u,m,Object.assign.apply(Object,Tr([{}],Qn(g),false)))},[]);return p.options=u,p.pluginImpls=n.map(function(g){return g(p,u)}),ro(function(){if(!o&&a){var g=p.state.params||t.defaultParams||[];p.run.apply(p,Tr([],Qn(g),false));}}),Wf(function(){p.cancel();}),{loading:p.state.loading,data:p.state.data,error:p.state.error,params:p.state.params||[],cancel:nt(p.cancel.bind(p)),refresh:nt(p.refresh.bind(p)),refreshAsync:nt(p.refreshAsync.bind(p)),run:nt(p.run.bind(p)),runAsync:nt(p.runAsync.bind(p)),mutate:nt(p.mutate.bind(p))}}function ga(e,t,n){return Ywe(e,t,Tr(Tr([],Qn([]),false),[Owe,Dwe,zwe,Hwe,Wwe,WU,Swe,Vwe],false))}function XU(e,t){e===void 0&&(e=false);var n=Qn(f.useState(e),2),r=n[0],o=n[1],i=f.useMemo(function(){var a=!e,l=function(){return o(function(p){return p===e?a:e})},u=function(p){return o(p)},d=function(){return o(e)},m=function(){return o(a)};return {toggle:l,set:u,setLeft:d,setRight:m}},[]);return [r,i]}function Xwe(e){var t=Qn(XU(false),2),n=t[0],r=t[1],o=r.toggle,i=r.set,a=f.useMemo(function(){var l=function(){return i(true)},u=function(){return i(false)};return {toggle:o,set:function(d){return i(!!d)},setTrue:l,setFalse:u}},[]);return [n,a]}function Gf(e,t){if(Cg){if(!e)return t;var n;return dA(e)?n=e():"current"in e?n=e.current:n=e,n}}var Qwe=function(e){return e.every(function(t){var n=Gf(t);return n?n.getRootNode()instanceof ShadowRoot:false})},Zwe=function(e){return e?e.getRootNode():document},Jwe=function(e){if(!e||!document.getRootNode)return document;var t=Array.isArray(e)?e:[e];return Qwe(t)?Zwe(Gf(t[0])):document},e$e=function(e){var t=function(n,r,o){var i=f.useRef(false),a=f.useRef([]),l=f.useRef([]),u=f.useRef(void 0);e(function(){var d,m=Array.isArray(o)?o:[o],p=m.map(function(g){return Gf(g)});if(!i.current){i.current=true,a.current=p,l.current=r,u.current=n();return}(p.length!==a.current.length||!D3(a.current,p)||!D3(l.current,r))&&((d=u.current)===null||d===void 0||d.call(u),a.current=p,l.current=r,u.current=n());}),Wf(function(){var d;(d=u.current)===null||d===void 0||d.call(u),i.current=false;});};return t},hA=e$e(f.useEffect);function t$e(e,t,n){n===void 0&&(n="click");var r=mu(e);hA(function(){var o=function(l){var u=Array.isArray(t)?t:[t];u.some(function(d){var m=Gf(d);return !m||m.contains(l.target)})||r.current(l);},i=Jwe(t),a=Array.isArray(n)?n:[n];return a.forEach(function(l){return i.addEventListener(l,o)}),function(){a.forEach(function(l){return i.removeEventListener(l,o)});}},Array.isArray(n)?n:[n],t);}var s$,c9;function QU(){if(c9)return s$;c9=1;var e=typeof Element<"u",t=typeof Map=="function",n=typeof Set=="function",r=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function o(i,a){if(i===a)return true;if(i&&a&&typeof i=="object"&&typeof a=="object"){if(i.constructor!==a.constructor)return false;var l,u,d;if(Array.isArray(i)){if(l=i.length,l!=a.length)return false;for(u=l;u--!==0;)if(!o(i[u],a[u]))return false;return true}var m;if(t&&i instanceof Map&&a instanceof Map){if(i.size!==a.size)return false;for(m=i.entries();!(u=m.next()).done;)if(!a.has(u.value[0]))return false;for(m=i.entries();!(u=m.next()).done;)if(!o(u.value[1],a.get(u.value[0])))return false;return true}if(n&&i instanceof Set&&a instanceof Set){if(i.size!==a.size)return false;for(m=i.entries();!(u=m.next()).done;)if(!a.has(u.value[0]))return false;return true}if(r&&ArrayBuffer.isView(i)&&ArrayBuffer.isView(a)){if(l=i.length,l!=a.length)return false;for(u=l;u--!==0;)if(i[u]!==a[u])return false;return true}if(i.constructor===RegExp)return i.source===a.source&&i.flags===a.flags;if(i.valueOf!==Object.prototype.valueOf&&typeof i.valueOf=="function"&&typeof a.valueOf=="function")return i.valueOf()===a.valueOf();if(i.toString!==Object.prototype.toString&&typeof i.toString=="function"&&typeof a.toString=="function")return i.toString()===a.toString();if(d=Object.keys(i),l=d.length,l!==Object.keys(a).length)return false;for(u=l;u--!==0;)if(!Object.prototype.hasOwnProperty.call(a,d[u]))return false;if(e&&i instanceof Element)return false;for(u=l;u--!==0;)if(!((d[u]==="_owner"||d[u]==="__v"||d[u]==="__o")&&i.$$typeof)&&!o(i[d[u]],a[d[u]]))return false;return true}return i!==i&&a!==a}return s$=function(a,l){try{return o(a,l)}catch(u){if((u.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),false;throw u}},s$}var n$e=QU();const r$e=Io(n$e);var o$e=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),r$e(e,t)};function va(e,t,n){n===void 0&&(n={});var r=n.enable,o=r===void 0?true:r,i=mu(t);hA(function(){if(o){var a=Gf(n.target,window);if(a?.addEventListener){var l=function(d){return i.current(d)},u=Array.isArray(e)?e:[e];return u.forEach(function(d){a.addEventListener(d,l,{capture:n.capture,once:n.once,passive:n.passive});}),function(){u.forEach(function(d){a.removeEventListener(d,l,{capture:n.capture});});}}}},[e,n.capture,n.once,n.passive,o],n.target);}const z1=(function(e,t){var n={},r=n.onEnter,o=n.onLeave,i=n.onChange,a=Qn(Xwe(),2),l=a[0],u=a[1],d=u.setTrue,m=u.setFalse;return va("mouseenter",function(){r?.(),d(),i?.(true);},{target:e}),va("mouseleave",function(){o?.(),m(),i?.(false);},{target:e}),l});var i$e=function(e,t,n){var r=f.useRef(void 0),o=f.useRef(0);o$e(t,r.current)||(o.current+=1),r.current=t,hA(e,[o.current],n);},a$e=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<"u"?navigator?.platform:""),ZU={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:a$e?[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},_3={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"?ZU.meta.includes(e.keyCode):e.metaKey}};function JU(e){return hwe(e)||qU(e)}function s$e(e){var t=Object.keys(_3).reduce(function(n,r){return _3[r](e)?n+1:n},0);return [16,17,18,91,92].includes(e.keyCode)?t:t+1}function u9(e,t,n){var r,o;if(!e.key)return false;if(qU(t))return e.keyCode===t?t:false;var i=t.split("."),a=0;try{for(var l=fu(i),u=l.next();!u.done;u=l.next()){var d=u.value,m=_3[d],p=ZU[d.toLowerCase()];(m&&m(e)||p&&p===e.keyCode)&&a++;}}catch(g){r={error:g};}finally{try{u&&!u.done&&(o=l.return)&&o.call(l);}finally{if(r)throw r.error}}return n?a===i.length&&s$e(e)===i.length?t:false:a===i.length?t:false}function l$e(e,t){return dA(e)?e:JU(e)?function(n){return u9(n,e,t)}:Array.isArray(e)?function(n){return e.find(function(r){return u9(n,r,t)})}:function(){return !!e}}var c$e=["keydown"];function da(e,t,n){var r=n||{},o=r.events,i=o===void 0?c$e:o,a=r.target,l=r.exactMatch,u=l===void 0?false:l,d=r.useCapture,m=d===void 0?false:d,p=mu(t),g=mu(e);i$e(function(){var b,y,S,C=Gf(a,window);if(C){var w=function(R){var I,N=R,P=l$e(g.current,u),O=P(N),_=JU(O)?O:N.key;if(O)return (I=p.current)===null||I===void 0?void 0:I.call(p,N,_)};try{for(var $=fu(i),M=$.next();!M.done;M=$.next()){var T=M.value;(S=C?.addEventListener)===null||S===void 0||S.call(C,T,w,m);}}catch(R){b={error:R};}finally{try{M&&!M.done&&(y=$.return)&&y.call($);}finally{if(b)throw b.error}}return function(){var R,I,N;try{for(var P=fu(i),O=P.next();!O.done;O=P.next()){var _=O.value;(N=C?.removeEventListener)===null||N===void 0||N.call(C,_,w,m);}}catch(L){R={error:L};}finally{try{O&&!O.done&&(I=P.return)&&I.call(P);}finally{if(R)throw R.error}}}}},[i],a);}function xg(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 O1(t,void 0,void 0,function(){var i,a;return D1(this,function(l){switch(l.label){case 0:if(n.current)return [2];n.current=true,l.label=1;case 1:return l.trys.push([1,3,4,5]),[4,e.apply(void 0,Tr([],Qn(r),false))];case 2:return i=l.sent(),[2,i];case 3:throw a=l.sent(),a;case 4:return n.current=false,[7];case 5:return [2]}})})},[e])}function d9(e){var t=f.useRef(0),n=Qn(f.useState(e),2),r=n[0],o=n[1],i=f.useCallback(function(a){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){o(a);});},[]);return Wf(function(){cancelAnimationFrame(t.current);}),[r,i]}var u$e=function(e,t){return !Object.is(e,t)};function pA(e,t){t===void 0&&(t=u$e);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 eq=function(){var e=f.useRef(false);return f.useEffect(function(){return e.current=false,function(){e.current=true;}},[]),e};const d$e=CU(f.useLayoutEffect),f$e=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"m12 13.4l-4.9 4.9q-.275.275-.7.275t-.7-.275t-.275-.7t.275-.7l4.9-4.9l-4.9-4.9q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l4.9 4.9l4.9-4.9q.275-.275.7-.275t.7.275t.275.7t-.275.7L13.4 12l4.9 4.9q.275.275.275.7t-.275.7t-.7.275t-.7-.275z"})]}),m$e=f.forwardRef(f$e),Po={modalMask:X("fixed inset-0 flex items-center justify-center bg-black/50",TCe),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"},tq=`${oo}-modal-visible`,h$e=ln("body:has(.",tq,"){overflow-y:hidden;}","");function wg({show:e,onHide:t,children:n,clsModalMask:r,clsModal:o,width:i,hideWhenMaskOnClick:a=false,hideWhenEsc:l=false}){const u=f.useRef(null),d=nt(g=>{const b=g.target;if(u.current?.contains(b))return;const y=['.ant-tooltip-container[role="tooltip"]','.ant-popover-container[role="tooltip"]',".ant-select-dropdown"];b.closest(y.join(","))||a&&t();});da("esc",g=>{e&&l&&(g.preventDefault(),g.stopImmediatePropagation(),setTimeout(t));},{exactMatch:true});const m=sr(Po.modalMask,r),p=sr(Po.modal,o);return e?Eo.createPortal(x("div",{className:X($a,{[tq]:e}),"data-role":"base-modal",children:x("div",{className:m,onClick:d,children:x("div",{className:p,style:{width:i},ref:u,children:n})})}),document.body):null}const $g=({className:e,...t})=>{const n=sr("ml-10px size-24px cursor-pointer transition-duration-150 transition-ease transition-property-transform hover:rotate-90 hover:scale-105%",e);return x(m$e,{...t,className:n})};let uo=(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 p$e=[{name:"Lavender",nameZh:"薰衣草",hex:uo.Lavender,desc:"淡紫偏粉"},{name:"Thistle",nameZh:"蓟紫色",hex:uo.Thistle,desc:"带灰调"},{name:"Plum",nameZh:"李子紫",hex:uo.Plum,desc:"柔和温暖"},{name:"Mauve",nameZh:"淡紫色",hex:uo.Mauve,desc:"烟粉色调"},{name:"Wisteria",nameZh:"紫藤色",hex:uo.Wisteria,desc:"温柔浅紫"},{name:"Orchid",nameZh:"兰花紫",hex:uo.Orchid,desc:"偏红亮紫"},{name:"Medium Orchid",nameZh:"中兰花紫",hex:uo.MediumOrchid,desc:"稍深更艳"},{name:"Medium Purple",nameZh:"中紫色",hex:uo.MediumPurple,desc:"柔和略蓝"},{name:"Amethyst",nameZh:"紫水晶色",hex:uo.Amethyst,desc:"经典冷紫"},{name:"Blue Violet",nameZh:"蓝紫色",hex:uo.BlueViolet,desc:"较冷"},{name:"Purple",nameZh:"标准紫色",hex:uo.Purple,desc:"饱和且暗"},{name:"Violet",nameZh:"紫罗兰",hex:uo.Violet,desc:"更偏蓝光谱"},{name:"Magenta",nameZh:"洋红色",hex:uo.Magenta,desc:"红紫交界"},{name:"Grape",nameZh:"葡萄紫",hex:uo.Grape,desc:"饱和深紫"},{name:"Indigo",nameZh:"靛青色",hex:uo.Indigo,desc:"蓝紫之间"},{name:"Eggplant",nameZh:"茄子紫",hex:uo.Eggplant,desc:"极深紫红"}],g$e=[{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)"}],yy={id:"default-bili-pink",name:"B站粉",colorPrimary:$f.Pink,tooltip:"B站品牌色"},nq={id:"color-picker",name:"自定义",isCustom:true,colorPrimary:$f.Pink};function v$e(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 gA="UP长期洗涤",b$e=v$e(gA,`
#0545b2 理想之蓝
#f4cd00 柠檬黄
#ef2729 石榴红
#f89c00 鹿箭
#233728 黛绿
#f2b9b7 和熙粉
#f3cc91 芝士黄
#6b4c68 葡萄紫
#ff7227 落日橙
#004d62 碧海天
#23909b 洗碧空
#aeb400 芥丝绿
#425a17 箬叶青
#002fa7 克莱因蓝
#003153 普鲁士蓝
#01847f 马尔斯绿
#fbd26a 申布伦黄
#470024 勃艮第红
#492d22 凡戴克棕
`),rq="bilibili-evolved-sync",oq=[{name:"预设",themes:[yy,{id:"bilibili-blue",name:"B站蓝",colorPrimary:$f.Blue,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:rq,name:"B-Evolved",colorPrimary:`var(--theme-color,${zH()})`,tooltip:H(ze,{children:["使用 Bilibili-Evolved 的主题色",x("br",{}),"在 Bilibili-Evolved 设置中修改主题色后可能需要刷新页面同步"]})},nq]},{name:"LX Themes",themes:g$e,tooltip:H(ze,{children:["提取自"," ",x("a",{target:"_blank",href:"https://github.com/lyswhut/lx-music-desktop/",children:"lx-music-desktop"}),x("br",{}),"Apache License 2.0"]})},{name:gA,themes:b$e,tooltip:H(ze,{children:["提取自"," ",x("a",{target:"_blank",href:"https://www.bilibili.com/video/BV1g3411u7Lg/",children:"BV1g3411u7Lg"})," ","&"," ",x("a",{target:"_blank",href:"https://www.bilibili.com/video/BV1xu411q7sU/",children:"BV1xu411q7sU"})]})},{name:"紫定能行",themes:p$e.map(e=>({id:`purple-colors-${e.name}`,name:e.nameZh,colorPrimary:e.hex,tooltip:H(ze,{children:[e.name," ",e.nameZh," ",x("br",{}),e.desc]})})),tooltip:H(ze,{children:["提取自"," ",x("a",{target:"_blank",href:"https://magicdawn.github.io/purple-colors/",children:"purple-colors"})," "]})}],y$e=oq.map(e=>e.themes).flat(),f9={[`${gA}:马尔斯绿`]:H(ze,{children:["马尔斯绿 MARRS GREEN ",x("br",{}),"2017年英国的百年造纸商G.F SMITH和英国城市文化节联合发起了「选出全世界最受欢迎的颜色」的活动, ",x("br",{}),"在为期半年由来自100多个约3万名用户的投票后,由来自苏格兰的联合国教科文组织工作人员 ",x("br",{}),"安妮•马尔斯(ANNIE MARRS)提交的一种蓝绿色当选。 ",x("br",{}),"马尔斯绿也因此由ANNIE MARRS的姓氏和主色调组合而得名。 ",x("br",{}),"马尔斯绿的灵感来源于ANNIE家乡苏格兰的泰勒河畔自然景观的一种蓝绿色调。 ",x("br",{})]})};function iq(){let{theme:e,colorPickerThemeSelectedColor:t}=Ut();return e||=yy.id,f.useMemo(()=>{const n=y$e.find(r=>r.id===e)||yy;return n.id===nq.id&&t?{...n,colorPrimary:t}:n},[e,t])}function aq(){const e=iq(),t=sg.use();let n=e.colorPrimary;return e.id===rq&&(n=t||zH()),n}function S$e(e,t){return e||t?"--bg1":"--bg2"}function C$e(){const e=aq(),t=P1(),n=cwe(),{style:{pureRecommend:{useWhiteBackground:r}}}=Ut(),o=f.useMemo(()=>({bgSrc:S$e(t,r),bgFallback:t?"#17181a":r?"#fff":"#f6f7f8",text:t?"#fff":"#333"}),[t,r]);return x(sA,{styles:[n,h$e,ln`
:root {
${cU}: ${e};
${dU}: var(${o.bgSrc}, ${o.bgFallback});
${uU}: var(--text1, ${o.text});
}
`,"",""]})}var x$e={name:"1ughwg6",styles:".bili-feed4 .bili-header{min-height:64px!important;}"},w$e={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 $$e(){const{grid:{useCustomGrid:e},style:{pureRecommend:{useWhiteBackground:t,hideTopChannel:n}}}=Ut(),r=P1(),o=Dge(),i=lT.use(),a=cT.use()??90,l="0 10px";if(Os)return x(sA,{styles:[w$e,e&&ln("#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:",a,"%;padding:",l,";}",""),e&&typeof o=="number"&&ln(".",$a,"{--back-top-right:",o,"px;}",""),ln("body{background-color:",P3,"!important;}.large-header,#i_cecream,body>#app,.bili-header.large-header,.bili-header.large-header .bili-header__channel{background-color:",P3,";}",""),!r&&!t&&ln(".bili-header .bili-header__channel .channel-entry-more__link,.bili-header .bili-header__channel .channel-link{background-color:",by,";}",""),n&&ln(".bili-header__channel,.bili-header__banner{display:none!important;}",!i&&x$e," .bili-feed4 .bili-header .bili-header__bar{&.slide-down,&:not(.slide-down){animation:headerSlideDown 0.3s linear forwards!important;box-shadow:0 2px 4px ",r?"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;}",""),"",""]})}function E$e(...e){return function(t){return e.reduceRight((n,r)=>r?r(n):n,t)}}function Fs({children:e,cssInsertContainer:t,cssInsertContainerEmotionKey:n}){t&&qi(n,"cssInsertContainerEmotionKey is required when cssInsertContainer is provided");const r=f.useMemo(()=>{if(t)return aU({key:n,container:t}).cache},[t,n]),o=P1(),i=aq();return E$e(!!r&&(l=>x(LZ,{value:r,children:l})),!!t&&(l=>x(wJ,{container:t,children:l})),l=>x(Do,{locale:Hxe,button:{autoInsertSpace:false},getPopupContainer:u=>u?.closest("."+$a)??document.body,theme:{algorithm:o?iy.darkAlgorithm:iy.defaultAlgorithm,token:{colorPrimary:i,colorBgSpotlight:i,zIndexPopupBase:m_(h_),fontFamily:fU},components:{Notification:{zIndexPopup:m_(h_)},Button:{defaultShadow:"none",primaryShadow:"none"},Dropdown:{}}},children:l}))(e)}function B1({antd:e,baseGlobalStyle:t,homePageGlobalStyle:n}){return H(ze,{children:[e&&x(Lge,{}),t&&x(C$e,{}),n&&x($$e,{})]})}function M$e(){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 k1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Kf(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function vA(e){return "nodeType"in e}function ei(e){var t,n;return e?Kf(e)?e:vA(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function bA(e){const{Document:t}=ei(e);return e instanceof t}function Eg(e){return Kf(e)?false:e instanceof ei(e).HTMLElement}function sq(e){return e instanceof ei(e).SVGElement}function Yf(e){return e?Kf(e)?e.document:vA(e)?bA(e)?e:Eg(e)||sq(e)?e.ownerDocument:document:document:document}const Ka=k1?f.useLayoutEffect:f.useEffect;function yA(e){const t=f.useRef(e);return Ka(()=>{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 R$e(){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 Rp(e,t){t===void 0&&(t=[e]);const n=f.useRef(e);return Ka(()=>{n.current!==e&&(n.current=e);},t),n}function Mg(e,t){const n=f.useRef();return f.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Sy(e){const t=yA(e),n=f.useRef(null),r=f.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o;},[]);return [n,r]}function L3(e){const t=f.useRef();return f.useEffect(()=>{t.current=e;},[e]),t.current}let l$={};function Rg(e,t){return f.useMemo(()=>{if(t)return t;const n=l$[e]==null?0:l$[e]+1;return l$[e]=n,e+"-"+n},[e,t])}function lq(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,a)=>{const l=Object.entries(a);for(const[u,d]of l){const m=i[u];m!=null&&(i[u]=m+e*d);}return i},{...t})}}const Kd=lq(1),Cy=lq(-1);function T$e(e){return "clientX"in e&&"clientY"in e}function SA(e){if(!e)return false;const{KeyboardEvent:t}=ei(e.target);return t&&e instanceof t}function A$e(e){if(!e)return false;const{TouchEvent:t}=ei(e.target);return t&&e instanceof t}function z3(e){if(A$e(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 T$e(e)?{x:e.clientX,y:e.clientY}:null}const gf=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 [gf.Translate.toString(e),gf.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),m9="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function N$e(e){return e.matches(m9)?e:e.querySelector(m9)}const P$e={display:"none"};function I$e(e){let{id:t,value:n}=e;return G.createElement("div",{id:t,style:P$e},n)}function O$e(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 G.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":true},n)}function D$e(){const[e,t]=f.useState("");return {announce:f.useCallback(r=>{r!=null&&t(r);},[]),announcement:e}}const cq=f.createContext(null);function uq(e){const t=f.useContext(cq);f.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t]);}function _$e(){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(a=>{var l;return (l=a[o])==null?void 0:l.call(a,i)});},[e]),t]}const L$e={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.
`},z$e={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 B$e(e){let{announcements:t=z$e,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=L$e}=e;const{announce:i,announcement:a}=D$e(),l=Rg("DndLiveRegion"),[u,d]=f.useState(false);if(f.useEffect(()=>{d(true);},[]),uq(f.useMemo(()=>({onDragStart(p){let{active:g}=p;i(t.onDragStart({active:g}));},onDragMove(p){let{active:g,over:b}=p;t.onDragMove&&i(t.onDragMove({active:g,over:b}));},onDragOver(p){let{active:g,over:b}=p;i(t.onDragOver({active:g,over:b}));},onDragEnd(p){let{active:g,over:b}=p;i(t.onDragEnd({active:g,over:b}));},onDragCancel(p){let{active:g,over:b}=p;i(t.onDragCancel({active:g,over:b}));}}),[i,t])),!u)return null;const m=G.createElement(G.Fragment,null,G.createElement(I$e,{id:r,value:o.draggable}),G.createElement(O$e,{id:l,announcement:a}));return n?Eo.createPortal(m,n):m}var Rr;(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";})(Rr||(Rr={}));function xy(){}function k$e(e,t){return f.useMemo(()=>({sensor:e,options:{}}),[e,t])}function F$e(){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 wa=Object.freeze({x:0,y:0});function H$e(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function V$e(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function j$e(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function U$e(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function h9(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 q$e=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=h9(t,t.left,t.top),i=[];for(const a of r){const{id:l}=a,u=n.get(l);if(u){const d=H$e(h9(u),o);i.push({id:l,data:{droppableContainer:a,value:d}});}}return i.sort(V$e)};function W$e(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),a=o-r,l=i-n;if(r<o&&n<i){const u=t.width*t.height,d=e.width*e.height,m=a*l,p=m/(u+d-m);return Number(p.toFixed(4))}return 0}const G$e=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const i of r){const{id:a}=i,l=n.get(a);if(l){const u=W$e(l,t);u>0&&o.push({id:a,data:{droppableContainer:i,value:u}});}}return o.sort(j$e)};function K$e(e,t,n){return {...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function dq(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:wa}function Y$e(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((a,l)=>({...a,top:a.top+e*l.y,bottom:a.bottom+e*l.y,left:a.left+e*l.x,right:a.right+e*l.x}),{...n})}}const X$e=Y$e(1);function Q$e(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 Z$e(e,t,n){const r=Q$e(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:l}=r,u=e.left-a-(1-o)*parseFloat(n),d=e.top-l-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),m=o?e.width/o:e.width,p=i?e.height/i:e.height;return {width:m,height:p,top:d,right:u+m,bottom:d+p,left:u}}const J$e={ignoreTransform:false};function Xf(e,t){t===void 0&&(t=J$e);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:d,transformOrigin:m}=ei(e).getComputedStyle(e);d&&(n=Z$e(n,d,m));}const{top:r,left:o,width:i,height:a,bottom:l,right:u}=n;return {top:r,left:o,width:i,height:a,bottom:l,right:u}}function p9(e){return Xf(e,{ignoreTransform:true})}function e2e(e){const t=e.innerWidth,n=e.innerHeight;return {top:0,left:0,right:t,bottom:n,width:t,height:n}}function t2e(e,t){return t===void 0&&(t=ei(e).getComputedStyle(e)),t.position==="fixed"}function n2e(e,t){t===void 0&&(t=ei(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 CA(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(bA(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!Eg(o)||sq(o)||n.includes(o))return n;const i=ei(e).getComputedStyle(o);return o!==e&&n2e(o,i)&&n.push(o),t2e(o,i)?n:r(o.parentNode)}return e?r(e):n}function fq(e){const[t]=CA(e,1);return t??null}function c$(e){return !k1||!e?null:Kf(e)?e:vA(e)?bA(e)||e===Yf(e).scrollingElement?window:Eg(e)?e:null:null}function mq(e){return Kf(e)?e.scrollX:e.scrollLeft}function hq(e){return Kf(e)?e.scrollY:e.scrollTop}function B3(e){return {x:mq(e),y:hq(e)}}var Lr;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward";})(Lr||(Lr={}));function pq(e){return !k1||!e?false:e===document.scrollingElement}function gq(e){const t={x:0,y:0},n=pq(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,a=e.scrollTop>=r.y,l=e.scrollLeft>=r.x;return {isTop:o,isLeft:i,isBottom:a,isRight:l,maxScroll:r,minScroll:t}}const r2e={x:.2,y:.2};function o2e(e,t,n,r,o){let{top:i,left:a,right:l,bottom:u}=n;r===void 0&&(r=10),o===void 0&&(o=r2e);const{isTop:d,isBottom:m,isLeft:p,isRight:g}=gq(e),b={x:0,y:0},y={x:0,y:0},S={height:t.height*o.y,width:t.width*o.x};return !d&&i<=t.top+S.height?(b.y=Lr.Backward,y.y=r*Math.abs((t.top+S.height-i)/S.height)):!m&&u>=t.bottom-S.height&&(b.y=Lr.Forward,y.y=r*Math.abs((t.bottom-S.height-u)/S.height)),!g&&l>=t.right-S.width?(b.x=Lr.Forward,y.x=r*Math.abs((t.right-S.width-l)/S.width)):!p&&a<=t.left+S.width&&(b.x=Lr.Backward,y.x=r*Math.abs((t.left+S.width-a)/S.width)),{direction:b,speed:y}}function i2e(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:a}=window;return {top:0,left:0,right:i,bottom:a,width:i,height:a}}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 vq(e){return e.reduce((t,n)=>Kd(t,B3(n)),wa)}function a2e(e){return e.reduce((t,n)=>t+mq(n),0)}function s2e(e){return e.reduce((t,n)=>t+hq(n),0)}function l2e(e,t){if(t===void 0&&(t=Xf),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);fq(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"});}const c2e=[["x",["left","right"],a2e],["y",["top","bottom"],s2e]];class xA{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=CA(n),o=vq(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,a,l]of c2e)for(const u of a)Object.defineProperty(this,u,{get:()=>{const d=l(r),m=o[i]-d;return this.rect[u]+m},enumerable:true});Object.defineProperty(this,"rect",{enumerable:false});}}class Hh{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 u2e(e){const{EventTarget:t}=ei(e);return e instanceof t?e:Yf(e)}function u$(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 Fi;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange";})(Fi||(Fi={}));function g9(e){e.preventDefault();}function d2e(e){e.stopPropagation();}var $n;(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";})($n||($n={}));const bq={start:[$n.Space,$n.Enter],cancel:[$n.Esc],end:[$n.Space,$n.Enter,$n.Tab]},f2e=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case $n.Right:return {...n,x:n.x+25};case $n.Left:return {...n,x:n.x-25};case $n.Down:return {...n,y:n.y+25};case $n.Up:return {...n,y:n.y-25}}};class yq{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 Hh(Yf(n)),this.windowListeners=new Hh(ei(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach();}attach(){this.handleStart(),this.windowListeners.add(Fi.Resize,this.handleCancel),this.windowListeners.add(Fi.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Fi.Keydown,this.handleKeyDown));}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&l2e(r),n(wa);}handleKeyDown(t){if(SA(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:i=bq,coordinateGetter:a=f2e,scrollBehavior:l="smooth"}=o,{code:u}=t;if(i.end.includes(u)){this.handleEnd(t);return}if(i.cancel.includes(u)){this.handleCancel(t);return}const{collisionRect:d}=r.current,m=d?{x:d.left,y:d.top}:wa;this.referenceCoordinates||(this.referenceCoordinates=m);const p=a(t,{active:n,context:r.current,currentCoordinates:m});if(p){const g=Cy(p,m),b={x:0,y:0},{scrollableAncestors:y}=r.current;for(const S of y){const C=t.code,{isTop:w,isRight:$,isLeft:M,isBottom:T,maxScroll:R,minScroll:I}=gq(S),N=i2e(S),P={x:Math.min(C===$n.Right?N.right-N.width/2:N.right,Math.max(C===$n.Right?N.left:N.left+N.width/2,p.x)),y:Math.min(C===$n.Down?N.bottom-N.height/2:N.bottom,Math.max(C===$n.Down?N.top:N.top+N.height/2,p.y))},O=C===$n.Right&&!$||C===$n.Left&&!M,_=C===$n.Down&&!T||C===$n.Up&&!w;if(O&&P.x!==p.x){const L=S.scrollLeft+g.x,j=C===$n.Right&&L<=R.x||C===$n.Left&&L>=I.x;if(j&&!g.y){S.scrollTo({left:L,behavior:l});return}j?b.x=S.scrollLeft-L:b.x=C===$n.Right?S.scrollLeft-R.x:S.scrollLeft-I.x,b.x&&S.scrollBy({left:-b.x,behavior:l});break}else if(_&&P.y!==p.y){const L=S.scrollTop+g.y,j=C===$n.Down&&L<=R.y||C===$n.Up&&L>=I.y;if(j&&!g.x){S.scrollTo({top:L,behavior:l});return}j?b.y=S.scrollTop-L:b.y=C===$n.Down?S.scrollTop-R.y:S.scrollTop-I.y,b.y&&S.scrollBy({top:-b.y,behavior:l});break}}this.handleMove(t,Kd(Cy(p,this.referenceCoordinates),b));}}}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();}}yq.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=bq,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const l=i.activatorNode.current;return l&&e.target!==l?false:(e.preventDefault(),o?.({event:e.nativeEvent}),true)}return false}}];function v9(e){return !!(e&&"distance"in e)}function b9(e){return !!(e&&"delay"in e)}class wA{constructor(t,n,r){var o;r===void 0&&(r=u2e(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:a}=i;this.props=t,this.events=n,this.document=Yf(a),this.documentListeners=new Hh(this.document),this.listeners=new Hh(r),this.windowListeners=new Hh(ei(a)),this.initialCoordinates=(o=z3(i))!=null?o:wa,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(Fi.Resize,this.handleCancel),this.windowListeners.add(Fi.DragStart,g9),this.windowListeners.add(Fi.VisibilityChange,this.handleCancel),this.windowListeners.add(Fi.ContextMenu,g9),this.documentListeners.add(Fi.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(b9(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(v9(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(Fi.Click,d2e,{capture:true}),this.removeTextSelection(),this.documentListeners.add(Fi.SelectionChange,this.removeTextSelection),n(t));}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:i}=this,{onMove:a,options:{activationConstraint:l}}=i;if(!o)return;const u=(n=z3(t))!=null?n:wa,d=Cy(o,u);if(!r&&l){if(v9(l)){if(l.tolerance!=null&&u$(d,l.tolerance))return this.handleCancel();if(u$(d,l.distance))return this.handleStart()}if(b9(l)&&u$(d,l.tolerance))return this.handleCancel();this.handlePending(l,d);return}t.cancelable&&t.preventDefault(),a(u);}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===$n.Esc&&this.handleCancel();}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges();}}const m2e={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class $A extends wA{constructor(t){const{event:n}=t,r=Yf(n.target);super(t,m2e,r);}}$A.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 h2e={move:{name:"mousemove"},end:{name:"mouseup"}};var k3;(function(e){e[e.RightClick=2]="RightClick";})(k3||(k3={}));class p2e extends wA{constructor(t){super(t,h2e,Yf(t.event.target));}}p2e.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===k3.RightClick?false:(r?.({event:n}),true)}}];const d$={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class g2e extends wA{constructor(t){super(t,d$);}static setup(){return window.addEventListener(d$.move.name,t,{capture:false,passive:false}),function(){window.removeEventListener(d$.move.name,t);};function t(){}}}g2e.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 Vh;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect";})(Vh||(Vh={}));var wy;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder";})(wy||(wy={}));function v2e(e){let{acceleration:t,activator:n=Vh.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:a=5,order:l=wy.TreeOrder,pointerCoordinates:u,scrollableAncestors:d,scrollableAncestorRects:m,delta:p,threshold:g}=e;const b=y2e({delta:p,disabled:!i}),[y,S]=R$e(),C=f.useRef({x:0,y:0}),w=f.useRef({x:0,y:0}),$=f.useMemo(()=>{switch(n){case Vh.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case Vh.DraggableRect:return o}},[n,o,u]),M=f.useRef(null),T=f.useCallback(()=>{const I=M.current;if(!I)return;const N=C.current.x*w.current.x,P=C.current.y*w.current.y;I.scrollBy(N,P);},[]),R=f.useMemo(()=>l===wy.TreeOrder?[...d].reverse():d,[l,d]);f.useEffect(()=>{if(!i||!d.length||!$){S();return}for(const I of R){if(r?.(I)===false)continue;const N=d.indexOf(I),P=m[N];if(!P)continue;const{direction:O,speed:_}=o2e(I,P,$,t,g);for(const L of ["x","y"])b[L][O[L]]||(_[L]=0,O[L]=0);if(_.x>0||_.y>0){S(),M.current=I,y(T,a),C.current=_,w.current=O;return}}C.current={x:0,y:0},w.current={x:0,y:0},S();},[t,T,r,S,i,a,JSON.stringify($),JSON.stringify(b),y,d,R,m,JSON.stringify(g)]);}const b2e={x:{[Lr.Backward]:false,[Lr.Forward]:false},y:{[Lr.Backward]:false,[Lr.Forward]:false}};function y2e(e){let{delta:t,disabled:n}=e;const r=L3(t);return Mg(o=>{if(n||!r||!o)return b2e;const i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return {x:{[Lr.Backward]:o.x[Lr.Backward]||i.x===-1,[Lr.Forward]:o.x[Lr.Forward]||i.x===1},y:{[Lr.Backward]:o.y[Lr.Backward]||i.y===-1,[Lr.Forward]:o.y[Lr.Forward]||i.y===1}}},[n,t,r])}function S2e(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return Mg(o=>{var i;return t==null?null:(i=r??o)!=null?i:null},[r,t])}function C2e(e,t){return f.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,i=o.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,r)}));return [...n,...i]},[]),[e,t])}var Tp;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging";})(Tp||(Tp={}));var F3;(function(e){e.Optimized="optimized";})(F3||(F3={}));const y9=new Map;function x2e(e,t){let{dragging:n,dependencies:r,config:o}=t;const[i,a]=f.useState(null),{frequency:l,measure:u,strategy:d}=o,m=f.useRef(e),p=C(),g=Rp(p),b=f.useCallback(function(w){w===void 0&&(w=[]),!g.current&&a($=>$===null?w:$.concat(w.filter(M=>!$.includes(M))));},[g]),y=f.useRef(null),S=Mg(w=>{if(p&&!n)return y9;if(!w||w===y9||m.current!==e||i!=null){const $=new Map;for(let M of e){if(!M)continue;if(i&&i.length>0&&!i.includes(M.id)&&M.rect.current){$.set(M.id,M.rect.current);continue}const T=M.node.current,R=T?new xA(u(T),T):null;M.rect.current=R,R&&$.set(M.id,R);}return $}return w},[e,i,n,p,u]);return f.useEffect(()=>{m.current=e;},[e]),f.useEffect(()=>{p||b();},[n,p]),f.useEffect(()=>{i&&i.length>0&&a(null);},[JSON.stringify(i)]),f.useEffect(()=>{p||typeof l!="number"||y.current!==null||(y.current=setTimeout(()=>{b(),y.current=null;},l));},[l,p,b,...r]),{droppableRects:S,measureDroppableContainers:b,measuringScheduled:i!=null};function C(){switch(d){case Tp.Always:return false;case Tp.BeforeDragging:return n;default:return !n}}}function Sq(e,t){return Mg(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function w2e(e,t){return Sq(e,t)}function $2e(e){let{callback:t,disabled:n}=e;const r=yA(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 F1(e){let{callback:t,disabled:n}=e;const r=yA(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 E2e(e){return new xA(Xf(e),e)}function S9(e,t,n){t===void 0&&(t=E2e);const[r,o]=f.useState(null);function i(){o(u=>{if(!e)return null;if(e.isConnected===false){var d;return (d=u??n)!=null?d:null}const m=t(e);return JSON.stringify(u)===JSON.stringify(m)?u:m});}const a=$2e({callback(u){if(e)for(const d of u){const{type:m,target:p}=d;if(m==="childList"&&p instanceof HTMLElement&&p.contains(e)){i();break}}}}),l=F1({callback:i});return Ka(()=>{i(),e?(l?.observe(e),a?.observe(document.body,{childList:true,subtree:true})):(l?.disconnect(),a?.disconnect());},[e]),r}function M2e(e){const t=Sq(e);return dq(e,t)}const C9=[];function R2e(e){const t=f.useRef(e),n=Mg(r=>e?r&&r!==C9&&e&&t.current&&e.parentNode===t.current.parentNode?r:CA(e):C9,[e]);return f.useEffect(()=>{t.current=e;},[e]),n}function T2e(e){const[t,n]=f.useState(null),r=f.useRef(e),o=f.useCallback(i=>{const a=c$(i.target);a&&n(l=>l?(l.set(a,B3(a)),new Map(l)):null);},[]);return f.useEffect(()=>{const i=r.current;if(e!==i){a(i);const l=e.map(u=>{const d=c$(u);return d?(d.addEventListener("scroll",o,{passive:true}),[d,B3(d)]):null}).filter(u=>u!=null);n(l.length?new Map(l):null),r.current=e;}return ()=>{a(e),a(i);};function a(l){l.forEach(u=>{const d=c$(u);d?.removeEventListener("scroll",o);});}},[o,e]),f.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,a)=>Kd(i,a),wa):vq(e):wa,[e,t])}function x9(e,t){t===void 0&&(t=[]);const n=f.useRef(null);return f.useEffect(()=>{n.current=null;},t),f.useEffect(()=>{const r=e!==wa;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null);},[e]),n.current?Cy(e,n.current):wa}function A2e(e){f.useEffect(()=>{if(!k1)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 N2e(e,t){return f.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:i}=r;return n[o]=a=>{i(a,t);},n},{}),[e,t])}function Cq(e){return f.useMemo(()=>e?e2e(e):null,[e])}const w9=[];function P2e(e,t){t===void 0&&(t=Xf);const[n]=e,r=Cq(n?ei(n):null),[o,i]=f.useState(w9);function a(){i(()=>e.length?e.map(u=>pq(u)?r:new xA(t(u),u)):w9);}const l=F1({callback:a});return Ka(()=>{l?.disconnect(),a(),e.forEach(u=>l?.observe(u));},[e]),o}function I2e(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Eg(t)?t:e}function O2e(e){let{measure:t}=e;const[n,r]=f.useState(null),o=f.useCallback(d=>{for(const{target:m}of d)if(Eg(m)){r(p=>{const g=t(m);return p?{...p,width:g.width,height:g.height}:g});break}},[t]),i=F1({callback:o}),a=f.useCallback(d=>{const m=I2e(d);i?.disconnect(),m&&i?.observe(m),r(m?t(m):null);},[t,i]),[l,u]=Sy(a);return f.useMemo(()=>({nodeRef:l,rect:n,setRef:u}),[n,l,u])}const D2e=[{sensor:$A,options:{}},{sensor:yq,options:{}}],_2e={current:{}},u0={draggable:{measure:p9},droppable:{measure:p9,strategy:Tp.WhileDragging,frequency:F3.Optimized},dragOverlay:{measure:Xf}};class jh 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 L2e={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new jh,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:xy},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:u0,measureDroppableContainers:xy,windowRect:null,measuringScheduled:false},z2e={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:xy,draggableNodes:new Map,over:null,measureDroppableContainers:xy},H1=f.createContext(z2e),xq=f.createContext(L2e);function B2e(){return {draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new jh}}}function k2e(e,t){switch(t.type){case Rr.DragStart:return {...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Rr.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 Rr.DragEnd:case Rr.DragCancel:return {...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Rr.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new jh(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case Rr.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new jh(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case Rr.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new jh(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function F2e(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=f.useContext(H1),i=L3(r),a=L3(n?.id);return f.useEffect(()=>{if(!t&&!r&&i&&a!=null){if(!SA(i)||document.activeElement===i.target)return;const l=o.get(a);if(!l)return;const{activatorNode:u,node:d}=l;if(!u.current&&!d.current)return;requestAnimationFrame(()=>{for(const m of [u.current,d.current]){if(!m)continue;const p=N$e(m);if(p){p.focus();break}}});}},[r,t,o,a,i]),null}function H2e(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,i)=>i({transform:o,...r}),n):n}function V2e(e){return f.useMemo(()=>({draggable:{...u0.draggable,...e?.draggable},droppable:{...u0.droppable,...e?.droppable},dragOverlay:{...u0.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function j2e(e){let{activeNode:t,measure:n,initialRect:r,config:o=true}=e;const i=f.useRef(false),{x:a,y:l}=typeof o=="boolean"?{x:o,y:o}:o;Ka(()=>{if(!a&&!l||!t){i.current=false;return}if(i.current||!r)return;const d=t?.node.current;if(!d||d.isConnected===false)return;const m=n(d),p=dq(m,r);if(a||(p.x=0),l||(p.y=0),i.current=true,Math.abs(p.x)>0||Math.abs(p.y)>0){const g=fq(d);g&&g.scrollBy({top:p.y,left:p.x});}},[t,a,l,r,n]);}const wq=f.createContext({...wa,scaleX:1,scaleY:1});var xl;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized";})(xl||(xl={}));const $q=f.memo(function(t){var n,r,o,i;let{id:a,accessibility:l,autoScroll:u=true,children:d,sensors:m=D2e,collisionDetection:p=G$e,measuring:g,modifiers:b,...y}=t;const S=f.useReducer(k2e,void 0,B2e),[C,w]=S,[$,M]=_$e(),[T,R]=f.useState(xl.Uninitialized),I=T===xl.Initialized,{draggable:{active:N,nodes:P,translate:O},droppable:{containers:_}}=C,L=N!=null?P.get(N):null,j=f.useRef({initial:null,translated:null}),U=f.useMemo(()=>{var gt;return N!=null?{id:N,data:(gt=L?.data)!=null?gt:_2e,rect:j}:null},[N,L]),q=f.useRef(null),[V,B]=f.useState(null),[F,W]=f.useState(null),K=Rp(y,Object.values(y)),Q=Rg("DndDescribedBy",a),D=f.useMemo(()=>_.getEnabled(),[_]),z=V2e(g),{droppableRects:Y,measureDroppableContainers:ee,measuringScheduled:J}=x2e(D,{dragging:I,dependencies:[O.x,O.y],config:z.droppable}),te=S2e(P,N),ne=f.useMemo(()=>F?z3(F):null,[F]),se=xt(),ae=w2e(te,z.draggable.measure);j2e({activeNode:N!=null?P.get(N):null,config:se.layoutShiftCompensation,initialRect:ae,measure:z.draggable.measure});const re=S9(te,z.draggable.measure,ae),de=S9(te?te.parentElement:null),ge=f.useRef({activatorEvent:null,active:null,activeNode:te,collisionRect:null,collisions:null,droppableRects:Y,draggableNodes:P,draggingNode:null,draggingNodeRect:null,droppableContainers:_,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ie=_.getNodeFor((n=ge.current.over)==null?void 0:n.id),Ee=O2e({measure:z.dragOverlay.measure}),le=(r=Ee.nodeRef.current)!=null?r:te,ue=I?(o=Ee.rect)!=null?o:re:null,Se=!!(Ee.nodeRef.current&&Ee.rect),ye=M2e(Se?null:re),Be=Cq(le?ei(le):null),je=R2e(I?ie??te:null),Ne=P2e(je),fe=H2e(b,{transform:{x:O.x-ye.x,y:O.y-ye.y,scaleX:1,scaleY:1},activatorEvent:F,active:U,activeNodeRect:re,containerNodeRect:de,draggingNodeRect:ue,over:ge.current.over,overlayNodeRect:Ee.rect,scrollableAncestors:je,scrollableAncestorRects:Ne,windowRect:Be}),be=ne?Kd(ne,O):null,Re=T2e(je),qe=x9(Re),Qe=x9(Re,[re]),We=Kd(fe,qe),tt=ue?X$e(ue,fe):null,rt=U&&tt?p({active:U,collisionRect:tt,droppableRects:Y,droppableContainers:D,pointerCoordinates:be}):null,Ze=U$e(rt,"id"),[Oe,Ye]=f.useState(null),Ke=Se?fe:Kd(fe,Qe),_e=K$e(Ke,(i=Oe?.rect)!=null?i:null,re),ke=f.useRef(null),lt=f.useCallback((gt,ft)=>{let{sensor:st,options:He}=ft;if(q.current==null)return;const Ge=P.get(q.current);if(!Ge)return;const ve=gt.nativeEvent,Te=new st({active:q.current,activeNode:Ge,event:ve,options:He,context:ge,onAbort(he){if(!P.get(he))return;const{onDragAbort:we}=K.current,Le={id:he};we?.(Le),$({type:"onDragAbort",event:Le});},onPending(he,Ie,we,Le){if(!P.get(he))return;const{onDragPending:it}=K.current,mt={id:he,constraint:Ie,initialCoordinates:we,offset:Le};it?.(mt),$({type:"onDragPending",event:mt});},onStart(he){const Ie=q.current;if(Ie==null)return;const we=P.get(Ie);if(!we)return;const{onDragStart:Le}=K.current,Xe={activatorEvent:ve,active:{id:Ie,data:we.data,rect:j}};Eo.unstable_batchedUpdates(()=>{Le?.(Xe),R(xl.Initializing),w({type:Rr.DragStart,initialCoordinates:he,active:Ie}),$({type:"onDragStart",event:Xe}),B(ke.current),W(ve);});},onMove(he){w({type:Rr.DragMove,coordinates:he});},onEnd:Ce(Rr.DragEnd),onCancel:Ce(Rr.DragCancel)});ke.current=Te;function Ce(he){return async function(){const{active:we,collisions:Le,over:Xe,scrollAdjustedTranslate:it}=ge.current;let mt=null;if(we&&it){const{cancelDrop:wt}=K.current;mt={activatorEvent:ve,active:we,collisions:Le,delta:it,over:Xe},he===Rr.DragEnd&&typeof wt=="function"&&await Promise.resolve(wt(mt))&&(he=Rr.DragCancel);}q.current=null,Eo.unstable_batchedUpdates(()=>{w({type:he}),R(xl.Uninitialized),Ye(null),B(null),W(null),ke.current=null;const wt=he===Rr.DragEnd?"onDragEnd":"onDragCancel";if(mt){const Mt=K.current[wt];Mt?.(mt),$({type:wt,event:mt});}});}}},[P]),At=f.useCallback((gt,ft)=>(st,He)=>{const Ge=st.nativeEvent,ve=P.get(He);if(q.current!==null||!ve||Ge.dndKit||Ge.defaultPrevented)return;const Te={active:ve};gt(st,ft.options,Te)===true&&(Ge.dndKit={capturedBy:ft.sensor},q.current=He,lt(st,ft));},[P,lt]),dt=C2e(m,At);A2e(m),Ka(()=>{re&&T===xl.Initializing&&R(xl.Initialized);},[re,T]),f.useEffect(()=>{const{onDragMove:gt}=K.current,{active:ft,activatorEvent:st,collisions:He,over:Ge}=ge.current;if(!ft||!st)return;const ve={active:ft,activatorEvent:st,collisions:He,delta:{x:We.x,y:We.y},over:Ge};Eo.unstable_batchedUpdates(()=>{gt?.(ve),$({type:"onDragMove",event:ve});});},[We.x,We.y]),f.useEffect(()=>{const{active:gt,activatorEvent:ft,collisions:st,droppableContainers:He,scrollAdjustedTranslate:Ge}=ge.current;if(!gt||q.current==null||!ft||!Ge)return;const{onDragOver:ve}=K.current,Te=He.get(Ze),Ce=Te&&Te.rect.current?{id:Te.id,rect:Te.rect.current,data:Te.data,disabled:Te.disabled}:null,he={active:gt,activatorEvent:ft,collisions:st,delta:{x:Ge.x,y:Ge.y},over:Ce};Eo.unstable_batchedUpdates(()=>{Ye(Ce),ve?.(he),$({type:"onDragOver",event:he});});},[Ze]),Ka(()=>{ge.current={activatorEvent:F,active:U,activeNode:te,collisionRect:tt,collisions:rt,droppableRects:Y,draggableNodes:P,draggingNode:le,draggingNodeRect:ue,droppableContainers:_,over:Oe,scrollableAncestors:je,scrollAdjustedTranslate:We},j.current={initial:ue,translated:tt};},[U,te,rt,tt,P,le,ue,Y,_,Oe,je,We]),v2e({...se,delta:O,draggingRect:tt,pointerCoordinates:be,scrollableAncestors:je,scrollableAncestorRects:Ne});const Dt=f.useMemo(()=>({active:U,activeNode:te,activeNodeRect:re,activatorEvent:F,collisions:rt,containerNodeRect:de,dragOverlay:Ee,draggableNodes:P,droppableContainers:_,droppableRects:Y,over:Oe,measureDroppableContainers:ee,scrollableAncestors:je,scrollableAncestorRects:Ne,measuringConfiguration:z,measuringScheduled:J,windowRect:Be}),[U,te,re,F,rt,de,Ee,P,_,Y,Oe,ee,je,Ne,z,J,Be]),Tt=f.useMemo(()=>({activatorEvent:F,activators:dt,active:U,activeNodeRect:re,ariaDescribedById:{draggable:Q},dispatch:w,draggableNodes:P,over:Oe,measureDroppableContainers:ee}),[F,dt,U,re,w,Q,P,Oe,ee]);return G.createElement(cq.Provider,{value:M},G.createElement(H1.Provider,{value:Tt},G.createElement(xq.Provider,{value:Dt},G.createElement(wq.Provider,{value:_e},d)),G.createElement(F2e,{disabled:l?.restoreFocus===false})),G.createElement(B$e,{...l,hiddenTextDescribedById:Q}));function xt(){const gt=V?.autoScrollEnabled===false,ft=typeof u=="object"?u.enabled===false:u===false,st=I&&!gt&&!ft;return typeof u=="object"?{...u,enabled:st}:{enabled:st}}}),U2e=f.createContext(null),$9="button",q2e="Draggable";function Eq(e){let{id:t,data:n,disabled:r=false,attributes:o}=e;const i=Rg(q2e),{activators:a,activatorEvent:l,active:u,activeNodeRect:d,ariaDescribedById:m,draggableNodes:p,over:g}=f.useContext(H1),{role:b=$9,roleDescription:y="draggable",tabIndex:S=0}=o??{},C=u?.id===t,w=f.useContext(C?wq:U2e),[$,M]=Sy(),[T,R]=Sy(),I=N2e(a,t),N=Rp(n);Ka(()=>(p.set(t,{id:t,key:i,node:$,activatorNode:T,data:N}),()=>{const O=p.get(t);O&&O.key===i&&p.delete(t);}),[p,t]);const P=f.useMemo(()=>({role:b,tabIndex:S,"aria-disabled":r,"aria-pressed":C&&b===$9?true:void 0,"aria-roledescription":y,"aria-describedby":m.draggable}),[r,b,S,C,y,m.draggable]);return {active:u,activatorEvent:l,activeNodeRect:d,attributes:P,isDragging:C,listeners:r?void 0:I,node:$,over:g,setNodeRef:M,setActivatorNodeRef:R,transform:w}}function W2e(){return f.useContext(xq)}const G2e="Droppable",K2e={timeout:25};function Y2e(e){let{data:t,disabled:n=false,id:r,resizeObserverConfig:o}=e;const i=Rg(G2e),{active:a,dispatch:l,over:u,measureDroppableContainers:d}=f.useContext(H1),m=f.useRef({disabled:n}),p=f.useRef(false),g=f.useRef(null),b=f.useRef(null),{disabled:y,updateMeasurementsFor:S,timeout:C}={...K2e,...o},w=Rp(S??r),$=f.useCallback(()=>{if(!p.current){p.current=true;return}b.current!=null&&clearTimeout(b.current),b.current=setTimeout(()=>{d(Array.isArray(w.current)?w.current:[w.current]),b.current=null;},C);},[C]),M=F1({callback:$,disabled:y||!a}),T=f.useCallback((P,O)=>{M&&(O&&(M.unobserve(O),p.current=false),P&&M.observe(P));},[M]),[R,I]=Sy(T),N=Rp(t);return f.useEffect(()=>{!M||!R.current||(M.disconnect(),p.current=false,M.observe(R.current));},[R,M]),f.useEffect(()=>(l({type:Rr.RegisterDroppable,element:{id:r,key:i,disabled:n,node:R,rect:g,data:N}}),()=>l({type:Rr.UnregisterDroppable,key:i,id:r})),[r]),f.useEffect(()=>{n!==m.current.disabled&&(l({type:Rr.SetDroppableDisabled,id:r,key:i,disabled:n}),m.current.disabled=n);},[r,i,n,l]),{active:a,rect:g,isOver:u?.id===r,node:R,over:u,setNodeRef:I}}function X2e(e,t){Fa(e)||(typeof e=="function"?e(t):e.current=t);}function V1(...e){const t=f.useRef(null);return f.useMemo(()=>({get current(){return t.current},set current(n){t.current=n,e.forEach(r=>r&&X2e(r,n));}}),[t,...e])}const Yd=nc(()=>({width:window.innerWidth,height:window.innerHeight}));document.addEventListener("resize",Yd.updateThrottled);document.addEventListener("orientationchange",Yd.updateThrottled);document.addEventListener("scroll",Gl(Yd.update,1e3));function Q2e({expanded:e,children:t,...n}){return x("div",{...n,"data-classname":"wrapper",css:ln("transition:grid-template-rows 0.2s ease-out;display:grid;grid-template-rows:",e?1:0,"fr;",""),children:x("div",{"data-classname":"inner",className:"overflow-hidden",children:t})})}function gn(e){return x(Jl,{...e,styles:{...e.styles,root:{width:"max-content",maxWidth:"50vw",...e.styles?.root}},children:e.children})}const Z2e=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,children:[x("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"}),x("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"})]})]}),J2e=f.forwardRef(Z2e),eEe=J2e,Mq="rgb(0 0 0 / 0.85)";function mr({children:e,tooltipProps:t,IconComponent:n,className:r,useBlackBg:o,...i}){n??=eEe;const a=x(n,{...i,className:sr("ml-4px size-16px cursor-pointer",r)});return !!e&&x(gn,{color:o?Mq:void 0,...t,title:e,children:a})}function tEe(e,t){const n=Ut(),r=!!To(n,e,false),o=f.useCallback(l=>{xf(at,e,l),t?.(l);},[]),i=f.useCallback(l=>{o(l.target.checked);},[]),a=f.useCallback(()=>{o(!To(at,e,false));},[]);return {checked:r,onChange:o,checkboxOnChange:i,onToggle:a}}function Rq({configPath:e,label:t,extraAction:n,tooltip:r,tooltipProps:o,as:i,checkboxProps:a,switchProps:l,ref:u}){const{checked:d,onChange:m,checkboxOnChange:p}=tEe(e,n),g=y=>r?x(gn,{...o,title:r,children:y}):y;let b;if(typeof t=="function"?b=t(d):b=(t??e)||null,i==="checkbox"){let y=x("span",{style:{userSelect:"none"},children:b});return r&&(y=g(y)),x(Ki,{...a,ref:u,checked:d,onChange:p,styles:{label:{paddingInline:6}},children:y})}if(i==="switch"){let y=x(EH,{...l,checked:d,onChange:m,ref:u});return r&&(y=g(y)),y}}const Pt=function({configPath:e,label:t,extraAction:n,tooltip:r,tooltipProps:o,ref:i,...a}){return x(Rq,{ref:i,configPath:e,label:t,extraAction:n,tooltip:r,tooltipProps:o,as:"checkbox",checkboxProps:a})};function hu({configPath:e,extraAction:t,tooltip:n,tooltipProps:r,ref:o,...i}){return x(Rq,{ref:o,configPath:e,extraAction:t,tooltip:n,tooltipProps:r,as:"switch",switchProps:i})}async function j1(e="即将刷新网页!"){Ot.info(e),await pn(500),location.reload();}function _r(e,t){return H(ze,{children:[H("div",{className:"flex items-center",children:["✅: ",e]}),H("div",{className:"flex items-center",children:["❎: ",t]})]})}let lh;function nEe(){Cf(()=>{lh&&URL.revokeObjectURL(lh),lh=void 0;});const e=yg(),t=JSON.stringify(e,null,2),n=new Blob([t],{type:"application/json"});return lh=URL.createObjectURL(n),lh}function rEe(){const e=nEe(),t=`${Ao}-settings ${Gn().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 oEe(){const e=await iEe();if(!e)return;const t=await e.text();if(!t)return rn("文件内容为空!");let n;try{n=JSON.parse(t);}catch{return rn("无法解析文件内容!")}aA(n);const{pickedPaths:r,pickedSettings:o}=jf(n,ic);return r.length?(nU(true),Ga(o),Ot.success("导入成功!"),j1()):rn("没有有效的设置!")}function iEe(){return aEe({accept:".json",multiple:false})}function aEe(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 zn={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:"flex items-center text-1.25em",settingsLine:"flex flex-row flex-wrap items-center gap-x-10px gap-y-1"};function Zr({children:e,title:t,titleClassName:n,contentClassName:r,resetSettingPaths:o,...i}){const a=!!o?.length;return H("div",{className:zn.settingsGroup,"data-role":"settings-group",...i,children:[H("div",{"data-role":"settings-group-title",className:sr(zn.settingsGroupTitle,a&&"justify-between",n),children:[a?x("div",{className:"flex items-center",children:t}):t,o&&x(Tq,{paths:o})]}),x("div",{"data-role":"settings-group-content",className:sr("flex flex-col gap-y-1",r),children:e})]})}function sEe(e){const{pickedSettings:t}=jf(bg,e);Ga(t);}function Tq({paths:e,className:t}){return x(bp,{title:"确定重置下面的设置项?",onConfirm:()=>sEe(e),children:H(ut,{className:X("gap-x-4px",t),children:[x(FH,{className:"mt--1px size-12px"}),x("span",{children:"重置"})]})})}const lEe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[x("path",{d:"M3.06 13a9 9 0 1 0 .49-4.087"}),x("path",{d:"M3 4.001v5h5M11 12a1 1 0 1 0 2 0a1 1 0 1 0-2 0"})]})]}),E9=f.forwardRef(lEe),cEe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[x("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),x("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"})]})]}),Ap=f.forwardRef(cEe),uEe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[x("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),x("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"})]})]}),Np=f.forwardRef(uEe),dEe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("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"})]}),fEe=f.forwardRef(dEe),mEe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,children:[x("path",{d:"M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4S4 12.954 4 24s8.954 20 20 20Z"}),x("path",{strokeLinecap:"round",d:"m33 21l-9 9l-9-9"})]})]}),hEe=f.forwardRef(mEe);function pEe(){return Rxe(),j1()}async function gEe(){const e=await Jj.getData();aA(e);const{pickedPaths:t,pickedSettings:n}=jf(e,ic,Sxe);return t.length?(nU(true),Ga(n),j1()):Ot.error("备份不存在或没有有效的配置")}function vEe(){const[e,t]=f.useState(false);return H("div",{className:zn.tabPane,children:[x(Zr,{title:"设置项",children:H(Xr,{size:20,children:[x(bp,{title:"确定",description:"确定恢复默认设置? 此操作不可逆!",onConfirm:pEe,children:H(ut,{danger:true,type:"primary",children:[x(E9,{}),"恢复默认设置"]})}),H(Xr,{size:5,children:[x(gn,{title:"导出所有设置项到文件中, 包含 access_key 等数据, 请妥善保存",children:H(ut,{onClick:()=>rEe(),children:[x(Ap,{}),"导出设置"]})}),x(gn,{title:"从文件中导入设置项, 将覆盖当前设置, 此操作不可逆!",children:H(ut,{onClick:()=>oEe(),children:[x(Np,{}),"导入设置"]})})]})]})}),x(Zr,{title:H(ze,{children:[x(fEe,{className:"mr-4px size-28px"}),"备份"]}),children:H("div",{className:"flex items-center gap-x-40px",children:[H("span",{className:"flex items-center gap-x-8px",children:[x(Pt,{configPath:"backupSettingsToArticleDraft",label:"备份设置到专栏草稿箱中",tooltip:`专栏 - 草稿箱 - ${Ao}`}),H("a",{className:"inline-flex items-center",href:"https://member.bilibili.com/platform/upload/text/draft",target:"_blank",children:[x(No,{className:"mr-4px size-16px"}),"去草稿箱浏览"]})]}),x(bp,{title:"确定",description:"将覆盖本地设置? 此操作不可逆!",onConfirm:gEe,children:H(ut,{danger:true,type:"primary",children:[x(E9,{}),"从专栏草稿箱中恢复"]})})]})}),x(Zr,{title:H(ze,{children:["其他",x(mr,{children:"这里是一些作者不愿意解释的设置项 😬"}),x(ut,{onClick:()=>t(n=>!n),className:"ml-10px inline-icon-only-round-button",css:e&&Uf,children:x(hEe,{className:X("size-16px transition-300 transition-transform",e?"rotate-180":"rotate-0")})})]}),children:x(Q2e,{expanded:e,children:H("div",{className:"w-full flex gap-x-20px b-1px b-gate-border rounded-6px b-solid p-10px",children:[x(Tq,{paths:vy,className:"flex-none"}),x("div",{className:"flex flex-1 flex-wrap items-start gap-x-20px gap-y-10px",children:vy.map(n=>x(Pt,{configPath:n,tooltip:H(ze,{children:[n,M9[n]&&H(ze,{children:[x("br",{}),M9[n]]})]}),label:eQ(n.startsWith("__internal")?n.slice(10):n.replaceAll("__internal.",""))},n))})]})})})]})}const M9={};function Aq(e,{l:t,c:n,h:r,alpha:o,deltaL:i,deltaC:a,deltaH:l,deltaAlpha:u}={}){const d=t??(i?`calc(l + ${i})`:"l"),m=n??(a?`calc(c + ${a})`:"c"),p=r??(l?`calc(h + ${l})`:"h"),g=o??(u?`calc(alpha + ${u})`:"alpha");return `oklch(from ${e} ${d} ${m} ${p} / ${g})`}function bEe(e,t){return Aq(e,{deltaL:t})}function H3({className:e,...t}){return x(Hl,{variant:"solid",...t,className:sr("my-7px",e),css:ln("border-top-color:",Aq(xa,{l:.9}),";","")})}const Nq=e=>{const t=Qj(e,Xh.appkey,Xh.appsec);return new URLSearchParams({...e,sign:t})};async function yEe(){const t=(await Zt.post("https://passport.bilibili.com/x/passport-tv-login/qrcode/auth_code",Nq({appkey:Xh.appkey,local_id:"0",ts:"0"}))).data;if(!jn(t)){rn(t?.message||"获取 auth_code 失败");return}return t.data}async function SEe(e){const n=(await Zt.post("https://passport.bilibili.com/x/passport-tv-login/qrcode/poll",Nq({appkey:Xh.appkey,auth_code:e,local_id:"0",ts:"0"}))).data,r={0:"成功","-3":"API校验密匙错误","-400":"请求错误","-404":"啥都木有",86038:"二维码已失效",86039:"二维码尚未确认",86090:"二维码已扫码未确认"};if(!jn(n)){const a=n.code.toString(),l=n.message||r[a]||"未知错误";return a==="86038"?{success:false,message:l,action:"refresh"}:a==="86039"||a==="86090"?{success:false,message:l,action:"wait"}:{success:false,message:l,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}}const EA={show:false,qrcodeUrl:"",auth_code:"",message:""},wl=kn({...EA});function Uh(e){$Ee(),Object.assign(wl,e);}function CEe(e){Uh({...EA,...e,show:true});}const Pq=new Xo;function Iq(){Uh({...EA}),Pq.emit("hide");}function xEe(){return Pq.once("hide")}function wEe(){const{qrcodeUrl:e,show:t,message:n}=bt(wl),r=Iq;return H(wg,{show:t,onHide:r,hideWhenMaskOnClick:false,hideWhenEsc:false,clsModalMask:"backdrop-blur-10px",clsModal:"aspect-ratio-10/16",width:260,children:[H("div",{className:Po.modalHeader,children:[x("div",{className:Po.modalTitle}),x($g,{onClick:r})]}),H("div",{className:X(Po.modalBody,"flex flex-col items-center justify-center text-center"),children:[x("div",{className:"mb-2px min-h-25px flex-center text-size-14px",children:n||""}),e&&x(Epe,{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"}),H("div",{className:"footnote text-size-13px",children:["打开「哔哩哔哩」或「bilibili」App ",x("br",{}),"扫码获取 access_key"]})]})]})}const $Ee=Sf(function(){const t=document.createElement("div");t.classList.add("modal-tv-qrcode-auth",$a),document.body.appendChild(t),Xa.createRoot(t).render(x(Fs,{children:x(wEe,{})}));});async function R9(){const e=await yEe();if(e)return CEe({qrcodeUrl:e.url,auth_code:e.auth_code}),true}async function EEe(){if(!await R9())return;let t,n=wl.auth_code;function r(){if(!wl.show||!wl.auth_code||n!==wl.auth_code)return true}function o(){return !r()}for(;o();){const i=pn(1500),a=xEe();if(await Promise.race([i,a]),a.off(),r())return;t=await SEe(wl.auth_code);const{success:l,accessKey:u,accessKeyExpireAt:d,message:m,action:p}=t;if(r())return;if(Uh({message:m}),l)return await pn(1e3),Iq(),{accessKey:u,accessKeyExpireAt:d};if(p==="refresh"){if(await pn(2e3),r())return;await R9(),n=wl.auth_code,Uh({message:"已刷新二维码"});continue}if(p!=="wait"){Uh({message:m}),rn(m);return}}}async function MEe(){const{accessKey:e,accessKeyExpireAt:t}=await EEe()||{};!e||!t||(at.accessKey=e,at.accessKeyExpireAt=t,rn("获取成功"));}function REe(){at.accessKey="",at.accessKeyExpireAt=0,rn("已删除 access_key");}const T9=x(ut,{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 MA({style:e,className:t}){const{runAsync:n,loading:r}=ga(MEe,{manual:true}),{accessKey:o}=Ut();return x(Xr,{size:"small",style:e,className:t,children:o?H(ze,{children:[x(ut,{onClick:n,loading:r,children:"重新获取 access_key"}),x(bp,{onConfirm:REe,title:"确定删除 access_key?",children:x(ut,{children:"删除 access_key"})}),T9]}):H(ze,{children:[x(ut,{onClick:n,loading:r,children:"获取 access_key"}),T9]})})}const TEe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M2 22V2h2v20zm4-5v-3h10v3zm0-7V7h16v3z"})]}),Oq=f.forwardRef(TEe),AEe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M11 22v-5H6v-3h5v-4H3V7h8V2h2v5h8v3h-8v4h5v3h-5v5z"})]}),NEe=f.forwardRef(AEe),PEe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M20 22V2h2v20zM8 17v-3h10v3zm-6-7V7h16v3z"})]}),Dq=f.forwardRef(PEe),_q="w-720px",IEe=(e,t)=>{switch(e){case ru.Left:return t==="flex"?"justify-left":"ml-0 mr-auto";case ru.Right:return t==="flex"?"justify-right":"ml-auto mr-0";default:return t==="flex"?"justify-center":"mx-auto"}};function OEe({className:e}){const{grid:{gridDisplayMode:t,twoColumnModeAlign:n}}=Ut();return H(Jr.Group,{className:e,disabled:t!==Br.TwoColumnGrid,buttonStyle:"solid",size:"small",value:n,onChange:r=>{at.grid.twoColumnModeAlign=r.target.value;},children:[x(Jr.Button,{value:ru.Left,className:"inline-flex-center",children:x(Oq,{className:"size-16px"})}),x(Jr.Button,{value:ru.Center,className:"inline-flex-center",children:x(NEe,{className:"size-16px"})}),x(Jr.Button,{value:ru.Right,className:"inline-flex-center",children:x(Dq,{className:"size-16px"})})]})}const DEe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("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"})]}),_Ee=f.forwardRef(DEe),LEe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("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"})]}),zEe=f.forwardRef(LEe);function Lq(e){return {usingListMode:e===Br.List,usingTwoColumnMode:e===Br.TwoColumnGrid,usingCenterEmptyMode:e===Br.CenterEmptyGrid}}function zq(){const{gridDisplayMode:e}=bt(at.grid);return Lq(e)}function RA(e){return e===Br.List}function BEe(){return bt(at.grid).gridDisplayMode===Br.List}function kEe({className:e}){const{gridDisplayMode:t}=bt(at.grid),o=sr("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 x(Jr.Group,{size:"large",className:o,value:t,onChange:i=>{at.grid.gridDisplayMode=i.target.value;},options:[{value:Br.NormalGrid,label:x(gn,{title:"这个是默认的网格模式",children:H("span",{className:"inline-flex-center",children:[x(_Ee,{className:"mx-4px size-16px cursor-pointer"}),"网格"]})})},{value:Br.List,label:H(ze,{children:[x(zEe,{className:"mx-4px size-16px cursor-pointer"}),"列表"]})},{value:Br.TwoColumnGrid,label:H(ze,{children:["双列模式",x(OEe,{className:"ml-5px"})]})},{value:Br.CenterEmptyGrid,label:x(ze,{children:x(gn,{title:"网格中间不显示卡片",children:"中空模式"})})}]})}const Bq=Cz&&["/video/","/list/watchlater","/bangumi/play/"].some(e=>location.pathname.startsWith(e)),FEe=[["/video/",()=>/^\/video\/(?<bvid>BV\w+)\//.exec(location.pathname)?.groups?.bvid],["/list/watchlater",()=>new URLSearchParams(location.search).get("bvid")||void 0],["/bangumi/play/",()=>{}]];function kq(){return FEe.find(([t])=>location.pathname.startsWith(t))?.[1]()}function TA(e,t=21){return `https://space.bilibili.com/${Jo()}/favlist?fid=${e}&ftype=create`}function Fq(e,t=21){return `https://space.bilibili.com/${Jo()}/favlist?fid=${e}&ftype=collect&ctype=${t}`}function HEe(e){return `https://www.bilibili.com/list/ml${e}`}function VEe(e){return `https://www.bilibili.com/video/${e}`}function AA(e){return e.toString(2).at(-2)==="0"}function U1(e){return e.toString(2).at(-1)==="1"}async function Hq({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:oc()}),i=(await Zt.post("/x/v3/fav/resource/deal",r)).data,a=jn(i);return a||rn(i?.message||"fav deal api fail"),a}const pu={getVideoFavState:qEe,addFav:WEe,removeFavs:jEe,moveFavs:UEe,modifyFav:KEe};async function jEe(e,t){const n=new URLSearchParams({resources:[t].flat().join(","),media_id:e.toString(),platform:"web",csrf:oc()}),o=(await Zt.post("/x/v3/fav/resource/batch-del",n)).data,i=jn(o);return i||rn(o.message||jp),i}async function UEe(e,t,n){const r=new URLSearchParams({resources:[e].flat().join(","),src_media_id:t.toString(),tar_media_id:n.toString(),mid:Jo(),platform:"web",csrf:oc()}),i=(await Zt.post("/x/v3/fav/resource/move",r)).data,a=jn(i);return a||rn(i?.message||"fav deal api fail"),a}async function qEe(e){if(!R1())return;const r=(await Zt.get("/x/v3/fav/folder/created/list-all",{params:{up_mid:Jo(),type:2,rid:e}})).data.data.list.filter(l=>l.fav_state>0),o=r.map(l=>l.title),i=r.map(l=>TA(l.id)),a=r.map(l=>l.id);return {favFolders:r,favFolderNames:o,favFolderUrls:i,favFolderIds:a}}let f$,V3;async function WEe(e,t){if(!t&&(!f$||!V3)){await _A();const{folders:n}=mn,r=n.find(o=>AA(o.attr))??n[0];if(!r)return rn("没有找到默认收藏夹!");f$=r.id,V3=r.title;}return t||=f$,t?await Hq({avid:e,add_media_ids:t.toString()}):rn("没有找到默认收藏夹!")}async function GEe(){return (await Zt.get("/x/v3/fav/folder/created/list-all",{params:{up_mid:Jo()}})).data.data.list}async function KEe(e,t,n){const r=(t??[]).filter(u=>u!==void 0),o=[n].filter(u=>u!==void 0),i=g0(r,o),a=g0(o,r);return await Hq({avid:e,del_media_ids:i.length?i.join(","):void 0,add_media_ids:a.length?a.join(","):void 0})}async function YEe(e){const n=(await Zt.get("/x/v3/fav/folder/info",{params:{media_id:e,web_location:"0.0"}})).data;if(!jn(n))throw new pxe(n);return n.data}async function XEe(e,t){const n=await YEe(e);if(!n)return;const r=new URLSearchParams({media_id:e.toString(),title:t,intro:n.intro,cover:n.cover,privacy:U1(n.attr)?"1":"0",csrf:oc()}),i=(await Zt.post("/x/v3/fav/folder/edit",r)).data,a=jn(i);if(!a){const l=i.message||"编辑收藏夹失败";rn(l);}return a}async function QEe(e){return (await Zt.get("/x/v3/fav/folder/collected/list",{params:{up_mid:Jo(),platform:"web",ps:20,pn:e}})).data.data}async function ZEe(){let e=1,t=true,n=[];for(;t;){const r=await QEe(e);n.push(...r.list),t=r.has_more,e++;}return n=n.filter(r=>!(r.title==="该合集已失效"&&r.upper.mid===0)),n=Wl(n,r=>r.id),n}async function JEe(e,t){return (await Zt.get("/x/space/fav/season/list",{params:{season_id:e,ps:20,pn:t}})).data.data}var It=(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))(It||{});function j3(e,t){return t==="initial"?e:t==="shuffle"?Si(e):t==="pub-time-desc"||t==="pub-time-asc"?Ss(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")?Ss(e,[r=>r.fav_time],[t==="fav-time-desc"?"desc":"asc"]):t==="play-count-desc"?Ss(e,[n=>n.cnt_info.play],["desc"]):t==="collect-count-desc"?Ss(e,[n=>n.cnt_info.collect],["desc"]):e}const Vq=new Xo;class jq{constructor(t){this.insideModal=t;}recSharedEmitter=new Xo;servicesRegistry={};store=kn({refreshing:false,refreshingTab:void 0,tabbarView:void 0,sidebarView:void 0});get refreshing(){return this.store.refreshing}get refreshingTab(){return this.store.refreshingTab}useStore=()=>bt(this.store);setStore=t=>{const n=["tabbarView","sidebarView"];for(const r of n){const o=t[r];typeof o=="object"&&o!==null&&(t[r]=hz(o));}Object.assign(this.store,t);}}const NA=f.createContext(new jq);function Uq(...e){return L1(()=>new jq(...e),[])}function Xi(){return f.useContext(NA)}function Co(){const{recSharedEmitter:e}=Xi();return xg(t=>e.emit("refresh",t))}class Hs{qs;constructor(t){this.qs=new q1(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 q1{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 Mu(){const e=f.useRef(null),t=f.useCallback(()=>e.current?.closest(`.${Sz}`)?.parentElement||document.body,[]);return {ref:e,getPopupContainer:t}}const PA=function({value:e,onChange:t,disabled:n,list:r,listDisplayConfig:o,dropdownProps:i,extraHelpInfo:a,$ref:l}){const{icon:u,label:d}=o[e],m=nt(S=>{const C=r.filter(T=>T!=="divider"),w=C.indexOf(e);if(w===-1)return;const $=(w+(S.shiftKey?-1:1)+C.length)%C.length,M=C[$];t(M);}),p=f.useMemo(()=>gi(r.map(S=>{if(S==="divider")return {type:"divider"};const{icon:C,label:w}=o[S];return {key:S,icon:C,label:w,onClick:()=>t(S)}})),[r,o,t]),[g,b]=f.useState(false),y=swe();return H("span",{className:"inline-flex items-center",ref:l,children:[x(tc,{open:g,onOpenChange:b,disabled:n,menu:{items:p,selectedKeys:[e.toString()],styles:{root:y}},placement:"bottomRight",classNames:{root:"text-13px",item:"justify-start",itemContent:"flex-shrink-0"},...i,children:H(ut,{className:X(Wj,"px-3"),css:[g&&Uf,"",""],disabled:n,onClick:m,children:[u,d]})}),H(mr,{children:[a,a&&x(H3,{}),"操作说明: ",x("br",{}),"1. 点击/下拉切换 ",x("br",{}),"2. 按住 ",x("kbd",{className:du,children:"Shift"})," 键点击逆序切换 ",x("br",{})]})]})},gl="size-16px",e3e={[It.Initial]:{icon:x(GSe,{className:gl}),label:"初始顺序"},[It.Shuffle]:{icon:x(Lj,{className:gl}),label:"随机顺序"},[It.PubTimeDesc]:{icon:x(E3,{className:gl}),label:"最新投稿"},[It.PubTimeAsc]:{icon:x($3,{className:gl}),label:"最早投稿"},[It.PlayCountDesc]:{icon:x(hg,{className:gl}),label:"最多播放"},[It.CollectCountDesc]:{icon:x(ff,{className:X(gl)}),label:"最多收藏"},[It.FavTimeDesc]:{icon:x(E3,{className:X(gl)}),label:"最近收藏"},[It.FavTimeAsc]:{icon:x($3,{className:X(gl)}),label:"最早收藏"}},t3e={all:[It.Initial,It.Shuffle],"fav-folder":[It.FavTimeDesc,It.PubTimeDesc,It.PlayCountDesc,It.CollectCountDesc,"divider",It.FavTimeAsc,It.PubTimeAsc,"divider",It.Shuffle],"fav-collection":[It.Initial,It.PubTimeDesc,It.PlayCountDesc,It.CollectCountDesc,"divider",It.PubTimeAsc,"divider",It.Shuffle]};function qq(e){return e.split(":")[0]}function Wq(e){const t=qq(e);return t3e[t]||Object.values(It)}function A9(e){const t=qq(e);return t==="fav-folder"?It.FavTimeDesc:t==="fav-collection"?It.PubTimeDesc:It.Initial}function IA(e,t){const n=Wq(e).filter(o=>o!=="divider"),r=t.get(e)||A9(e);return n.includes(r)?r:A9(e)}function n3e(e,t){return f.useMemo(()=>IA(e,t),[t,e])}function OA(){const e=Co(),{ref:t,getPopupContainer:n}=Mu(),{selectedKey:r,savedOrderMap:o}=bt(mn),i=n3e(r,o),a=f.useMemo(()=>Wq(r),[r]);return x(PA,{value:i,onChange:async l=>{mn.savedOrderMap.set(r,l),await pn(100),e();},list:a,listDisplayConfig:e3e,$ref:t,dropdownProps:{getPopupContainer:n}})}const r3e=io.extend("modules:rec-services:fav:store");var $y=(e=>(e.CollectionIdFull="fav-collection-id",e.CollectionId="fav-cid",e.FolderIdFull="fav-folder-id",e.FolderId="fav-fid",e))($y||{});const Gq=e=>{if(!e)return;const t=Number(e);if(!Number.isNaN(t))return t},Ey=new URLSearchParams(location.search),Kq=Gq(Ey.get("fav-collection-id")??Ey.get("fav-cid")),Yq=Gq(Ey.get("fav-folder-id")??Ey.get("fav-fid")),My=Os&&(typeof Yq=="number"||typeof Kq=="number"),mn=kn({folders:[],foldersUpdateAt:0,selectedFavFolderId:Yq,get selectedFavFolder(){if(typeof this.selectedFavFolderId=="number")return this.folders.find(e=>e.id===this.selectedFavFolderId)},collections:[],collectionsUpdateAt:0,selectedFavCollectionId:Kq,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( DH("fav-saved-order"))).map,get usingShuffle(){return IA(this.selectedKey,this.savedOrderMap)===It.Shuffle},get viewingAll(){return this.selectedKey==="all"},get viewingSomeFolder(){return typeof this.selectedFavFolderId=="number"},get viewingSomeCollection(){return typeof this.selectedFavCollectionId=="number"}});function Xq(e,t){const n=mn.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,r3e("update folder(id=%s title=%s) media_count to %s",n.id,n.title,r));}function DA(e=false){return Promise.all([_A(e),a3e(e)])}const o3e=zs(async()=>{const e=await GEe();mn.folders=e,mn.foldersUpdateAt=Date.now();});async function _A(e=false){if(!e){const{folders:t,foldersUpdateAt:n}=mn;if(t.length&&n&&Date.now()-n<so("5min"))return}return o3e()}const i3e=zs(async()=>{const e=await ZEe();mn.collections=e,mn.collectionsUpdateAt=Date.now();});async function a3e(e=false){if(!e){const{collections:t,collectionsUpdateAt:n}=mn;if(t.length&&n&&Date.now()-n<so("5min"))return}return i3e()}My&&oT(mn,"selectedLabel",()=>{mn.selectedLabel&&lA(mn.selectedLabel);});s3e();async function s3e(){if(!(Os||Bq)||My)return;const e="fav-store",t=["selectedFavFolderId","selectedFavCollectionId","folders"],n=await GM.getValue(e);if(n)for(const o of t)Fa(n[o])||(mn[o]=n[o]);const r=rT(1);IH(mn,t,o=>{if(My)return;const i=au(o,t);r(async()=>{await GM.setValue(e,i);});});}var Je=(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.Liked="liked",e))(Je||{});class l3e{constructor(t){this.anonymous=t;}hasMore=true;page=1;tabbarView=x(c3e,{});async loadMore(){if(!this.hasMore)return;const n=(await Zt.get("/x/web-interface/popular",{params:{ps:20,pn:this.page},withCredentials:!this.anonymous})).data;return jn(n)?(this.page++,this.hasMore=!n.data.no_more,(n.data.list||[]).map(o=>({...o,api:Je.PopularGeneral,uniqId:`${Je.PopularGeneral}:${o.bvid}`}))):(rn(n.message||wf),void 0)}}function c3e(){const e=Co();return x(Pt,{configPath:"popularGeneralUseAnonymous",tooltip:x(ze,{children:"✅ 匿名访问: 使用游客身份访问"}),label:"匿名访问",extraAction:async()=>{await pn(100),e();}})}function u3e(){const t=localStorage.getItem("bpx_player_profile");if(t)try{return JSON.parse(t)}catch{return}}function Qq(){return !!u3e()?.media.autoplay}function Qf(e){const t=t5.createInstance({driver:t5.INDEXEDDB,name:oo,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 Ru({fn:e,generateKey:t,tableName:n,ttl:r,concurrency:o,autoCleanUp:i=true}){const a=typeof n=="string"?Qf(n):n,l=Gl(()=>{a.db.iterate((g,b)=>{u(g)||a.db.removeItem(b);});},1e3);i&&N1().then(l);function u(g){return !!(g&&g.val&&g.ts&&Date.now()-g.ts<=r)}async function d(...g){const b=t(...g),y=await a.get(b);if(y&&u(y))return y.val}const m=o&&o>0?NH(e,o):e,p=tA(m,{cacheKey(g){return t(...g)},cache:{async has(g){const b=await a.get(g);return u(b)},async get(g){const b=await a.get(g);if(b&&u(b))return b.val},async set(g,b){Fa(b)||await a.set(g,{val:b,ts:Date.now()});},async delete(g){await a.delete(g);}}});return Object.defineProperties(p,{cache:{value:a},cleanUp:{value:l},generateKey:{value:t},shouldReuseCached:{value:u},queryCache:{value:d}}),p}async function d3e(e){return (await Zt.get("/x/web-interface/view",{params:{bvid:e}})).data.data}const Zq=Ru({fn:d3e,generateKey:e=>e,tableName:"video-detail",ttl:so("3M"),concurrency:3});async function f3e(e){return (await Zt.get("/x/player/pagelist",{params:{bvid:e}})).data?.data||[]}const Jq=Ru({fn:f3e,generateKey:e=>e,tableName:"video-page-list",ttl:so("3M"),concurrency:3});async function m3e({appKey:e,nscode:t,versionId:n}){const r={appKey:e,nscode:t,versionId:n};return (await Zt.get("/x/kv-frontend/namespace/data",{params:r})).data}function eW({appKey:e,nscode:t}){return new URLSearchParams([["appKey",e],["nscode",t.toString()]]).toString()}const N9=Qf("kv-latest-version"),h3e=zs(async({appKey:e,nscode:t})=>{const n=eW({appKey:e,nscode:t}),r=await N9.get(n);let o="0";r&&r.versionId&&r.data&&Object.keys(r.data).length&&(o=r.versionId);const i=await m3e({appKey:e,nscode:t,versionId:o});return r?.data&&i.code===-304&&i.message==="Not Modified"?r.data:(await N9.set(n,i.data),i.data.data)}),p3e=Ru({fn:h3e,tableName:"get-kv-data",generateKey:({appKey:e,nscode:t})=>eW({appKey:e,nscode:t}),ttl:so("1h")});function g3e(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 P9=[{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"}],LA={name:"全站",tid:0,slug:"all"};async function v3e(){try{return await b3e()||P9}catch(e){return WQ("parseRankTabsConfig failed",e),P9}}async function b3e(){const e=await p3e({appKey:"333.1339",nscode:10}),t=g3e(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 a=JSON.parse(t[i]);o(a);}return Wl(r,i=>i.slug)}var d0=(e=>(e.Normal="normal",e.PgcSeason="pgc/season",e.PgcWeb="pgc/web",e))(d0||{});function tW(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 zA(e){return e.from==="normal"}function y3e(e){return e.from==="pgc/season"}function S3e(e){return e.from==="pgc/web"}const Pp={top:e=>X("absolute top-8px",e==="left"?"left-8px":"right-8px",e==="left"?pCe:gCe),topContainer:e=>X(Pp.top(e),"flex items-center gap-x-5px",e==="left"?"flex-row":"flex-row-reverse"),tooltip:e=>X("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")},Ba=f.memo(function({inlinePosition:t,icon:n,tooltip:r,visible:o=true,active:i=false,className:a,useMotion:l=false,motionProps:u,ref:d,...m}){const{triggerRef:p,tooltipEl:g}=W1({inlinePosition:t,tooltip:r}),b=f.useMemo(()=>Uj("action-button","relative size-28px cursor-pointer rounded-6px bg-[rgb(33_33_33_/_0.7)] color-white","b-1px b-solid",i?"b-gate-primary":"b-#444","hover:b-gate-primary",l||o?"inline-flex":"hidden","items-center justify-center","[&_svg]:pointer-events-none [&_svg]:select-none",a),[i,a,o,l]),y=V1(p,d),S={...m,className:b,ref:y,children:H(ze,{children:[n,g]})};return l?x(b1e,{children:o&&x(qT.div,{...S,...u},"action-button")}):x("div",{...S})});function W1({inlinePosition:e,tooltip:t,tooltipClassName:n}){const r=f.useRef(null),o=z1(r),i=sr(Pp.tooltip(e),n,o?"block":"hidden");return {triggerRef:r,tooltipEl:t?x("span",{className:i,children:t}):void 0}}function C3e(e,t,n=true){let r=0,o=t;return (...i)=>{if(r++,r===o)return r=0,n&&o++,e(...i)}}function nW(e,t,n=true){const r=nt(e);return f.useMemo(()=>C3e(r,t,n),[r,t,n])}const x3e=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 15 15",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("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"})]}),rW=f.forwardRef(x3e),w3e=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 15 15",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("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"})]}),$3e=f.forwardRef(w3e),E3e=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 15 15",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("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"})]}),oW=f.forwardRef(E3e),M3e=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 15 15",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("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"})]}),R3e=f.forwardRef(M3e);function T3e(e,t){const n=t.document.head;aU({key:"pip-window",container:n}),Array.from(document.querySelectorAll("style")).filter(i=>[oo,"ant","rc"].some(a=>i.textContent.includes(a))).forEach(i=>{const a=t.document.createElement("style");a.textContent=i.textContent,t.document.head.appendChild(a);});const r=document.createElement("div");r.classList.add($a),r.style.lineHeight="0",t.document.body.appendChild(r),Xa.createRoot(r).render(x(Fs,{cssInsertContainer:n,cssInsertContainerEmotionKey:"pip-window",children:x(Do,{getPopupContainer:()=>t.document.body,getTargetContainer:()=>t,children:H(rg,{message:{getContainer:()=>t.document.body},children:[x(B1,{baseGlobalStyle:true}),x(N3e,{newHref:e,pipWindow:t})]})})}));}var A3e={name:"pb1257",styles:"*{box-sizing:border-box;}:root,body,iframe{margin:0;padding:0;overscroll-behavior:none;}"};function N3e({newHref:e,pipWindow:t}){const n=z1(t.document.documentElement),[r,o]=f.useState(()=>at.pipWindow.defaultLocked);return H(ze,{children:[x(sA,{styles:[A3e,"",""]}),x("iframe",{src:e,className:"block h-100vh w-full border-none"}),x(P3e,{locked:r,setLocked:o,pipWindow:t}),H("div",{className:X("fixed right-10px top-10px z-9999 flex-row-reverse items-center gap-x-6px",n?"flex":"hidden"),children:[x(I3e,{pipWindow:t,newHref:e}),x(O3e,{locked:r,setLocked:o})]})]})}const iW="size-30px [&_svg]:size-16px";function P3e({locked:e,setLocked:t,pipWindow:n}){const{message:r}=rg.useApp(),o=nW(()=>{r.info("请先点击右上角「🔓解锁按钮」解锁");},3);return f.useMemo(()=>gi([{key:"unlock",label:"解锁",icon:x(oW,{}),onClick(){t(false);}}]),[]),e&&x("div",{className:X("locked-overlay","fixed inset-0 z-9999 select-none bg-transparent"),onClick:o})}function I3e({newHref:e,pipWindow:t}){return x(Ba,{inlinePosition:"right",icon:x(rW,{}),tooltip:"新窗口打开",onClick:()=>{t.close();const r=new URL(e);r.searchParams.delete(ql.PlayerScreenMode),r.searchParams.delete(ql.ForceAutoPlay),fi(r.href);},className:iW})}function O3e({locked:e,setLocked:t}){const[n,r]=e?["锁定","解锁"]:["解锁","锁定"];return x(Ba,{inlinePosition:"right",icon:e?x(R3e,{}):x(oW,{}),tooltip:`已${n}, 点击${r}`,className:iW,onClick:()=>t(o=>!o)})}const aW=io.extend("VideoCard:useOpenRelated");function D3e({href:e,item:t,cardData:n,actionButtonVisible:r,hasOpenInPopupActionButton:o,getLargePreviewCurrentTime:i,hideLargePreview:a,shouldUseLargePreviewCurrentTime:l}){const{videoLinkOpenMode:u}=Ut();function d($){const M=new URL(e,location.href);return $?.(M),M.href}const m=nt($=>{$.stopPropagation(),$.preventDefault(),p(void 0,$);}),p=nt(($,M)=>{$||=at.videoLinkOpenMode;const T=d(P=>{if(($===rr.NormalWebFullscreen||$===rr.Popup&&at.pipWindow.autoWebFullscreen)&&(P.searchParams.set(ql.PlayerScreenMode,$l.WebFullscreen),$===rr.Popup&&!Qq()&&P.searchParams.set(ql.ForceAutoPlay,eA.ON)),l()){const O=i();O&&(a(),P.searchParams.set("t",O.toString()));}}),R=()=>{const O=!($===rr.Background||!!(M?.metaKey||M?.ctrlKey));fi(T,O);},I=()=>{location.href=T;};({[rr.Normal]:R,[rr.Background]:R,[rr.CurrentPage]:I,[rr.NormalWebFullscreen]:R,[rr.Popup]:()=>g(T),[rr.Iina]:b})[$]?.();});function g($){const{width:M,height:T}=BA({item:t});return sW($,n.bvid,M,T)}function b(){let $=e;t.api===Je.Watchlater&&($=`/video/${t.bvid}`);const M=new URL($,location.href).href,T=`iina://open?url=${encodeURIComponent(M)}`;window.open(T,"_self");}const y=f.useMemo(()=>Object.values(rr).filter($=>di[$].enabled===void 0).map($=>({key:c_[$],label:di[$].label,icon:di[$].icon,onClick:()=>p($)})),[]),S=f.useMemo(()=>Object.values(rr).filter($=>typeof di[$].enabled=="boolean"&&di[$].enabled).length?Object.values(rr).filter($=>typeof di[$].enabled=="boolean"&&di[$].enabled).map($=>({key:c_[$],label:di[$].label,icon:di[$].icon,onClick:()=>p($)})):[],[]),C=f.useMemo(()=>{if(u!==rr.Popup&&t.api!==Je.Live&&kA&&o)return x(Ba,{visible:r,inlinePosition:"right",icon:di.Popup.icon,tooltip:di.Popup.label,onClick:$=>{$.preventDefault(),$.stopPropagation(),p(rr.Popup);}})},[u,r]),w=nt(()=>{p(rr.Popup);});return {onOpenWithMode:p,handleVideoLinkClick:m,consistentOpenMenus:y,conditionalOpenMenus:S,openInPopupActionButtonEl:C,onOpenInPopup:w}}function BA({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===Je.AppRecommend&&e.uri?.startsWith("bilibili://")){const i=new URL(e.uri).searchParams,a=Number(i.get("player_width")||0),l=Number(i.get("player_height")||0),u=Number(i.get("player_rotate")||0);a&&l&&!Number.isNaN(a)&&!Number.isNaN(l)&&([n,r]=[a,l],u===1&&([n,r]=[r,n]),o=n/r);}else if(e?.api===Je.Rank&&zA(e)){const i=e.dimension.width,a=e.dimension.height,l=e.dimension.rotate;i&&a&&!Number.isNaN(i)&&!Number.isNaN(a)&&([n,r]=[i,a],l===1&&([n,r]=[r,n]),o=n/r);}return {width:n,height:r,aspectRatio:o}}const kA=!!window.documentPictureInPicture?.requestWindow;async function sW(e,t,n,r){let o=1e3,i=Math.ceil(o/16*9);const a=200;if((!n||!r)&&t){const u=await Promise.race([Jq(t),pn(a)]);if(u?.[0]?.dimension){const{dimension:d}=u[0];n=d.width,r=d.height;}}if(n&&r&&n<r){const u=Math.min(Math.floor(window.screen.availHeight*.8),1e3),d=Math.floor(u/r*n);o=Math.min(720,d),i=Math.floor(o/n*r);}aW("openInPipOrPopup newHref=%s size=%sx%s",e,o,i);let l;if(kA)try{l=await window.documentPictureInPicture?.requestWindow({width:o,height:i,disallowReturnToOpener:!0});}catch{}l?T3e(e,l):_3e(e,o,i);}function _3e(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(",");aW("openInPopup: features -> %s",i),window.open(e,"_blank",i);}function lW(){const{videoLinkOpenMode:e}=Ut();return e!==rr.CurrentPage}function G1(){return lW()?"_blank":"_self"}function f0(){return at.videoLinkOpenMode!==rr.CurrentPage?"_blank":"_self"}function Ip(e){const t=G1();return x("a",{...e,target:t,children:e.children})}let wb=[],m$="";function I9(){const e=Gn();return [e.format("YYYYMMDD"),e.hour()<18?"lt-18":"gte-18"].join("_")}async function L3e(){return wb.length&&m$&&m$===I9()||(wb=(await Zt.get("/x/web-interface/popular/series/list")).data.data.list,m$=I9()),wb}class Ry{constructor(t){this.useShuffle=t;}static PAGE_SIZE=20;episodesLoaded=false;episodes=[];qs=new q1(Ry.PAGE_SIZE);get hasMore(){return this.episodesLoaded?!!this.qs.bufferQueue.length||!!this.episodes.length:true}async loadMore(){if(this.episodesLoaded||(this.episodes=await L3e(),this.episodesLoaded=true,this.useShuffle&&(this.episodes=Si(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 O9(r);return this.qs.bufferQueue.push({api:Je.Separator,uniqId:`${Je.PopularWeekly}:separator:${r}`,content:x(Ip,{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<Ry.PAGE_SIZE*t&&this.episodes.length;){this.episodes=Si(this.episodes);const n=this.episodes.slice(0,t);this.episodes=this.episodes.slice(t);const r=await Vl(n.map(o=>o.number),o=>O9(o),2);this.qs.bufferQueue=Si([...this.qs.bufferQueue,...r.flat()]);}return this.qs.sliceFromQueue()}get tabbarView(){return x(z3e,{})}}const h$={};async function O9(e){if(!h$[e]?.length){const o=((await Zt.get("/x/web-interface/popular/series/one",{params:{number:e}})).data.data.list||[]).map(i=>({...i,api:Je.PopularWeekly,uniqId:`${Je.PopularWeekly}:${i.bvid}`}));h$[e]=o;}return h$[e]}function z3e(){const e=Co();return x(ze,{children:x(hu,{configPath:"popularWeeklyUseShuffle",checkedChildren:"随机顺序: 开",unCheckedChildren:"随机顺序: 关",extraAction:async()=>{await pn(100),e();}})})}const cW="rank-store-slug",B3e=await( GM.getValue(cW))||LA.slug,xi=kn({slug:B3e,tabs:[],get currentTab(){return this.tabs.find(e=>e.slug===this.slug)||LA}}),k3e=zs(async()=>{if(xi.tabs.length)return;const e=await v3e();xi.tabs=e;});oT(xi,"slug",()=>{GM.setValue(cW,xi.slug);});class uW{constructor(t){this.slug=t;}loaded=false;qs=new q1(20);tabbarView=x(F3e,{});sidebarView=x(H3e,{});get hasMore(){return this.loaded?!!this.qs.bufferQueue.length:true}get rankTab(){return eo(xi).tabs.find(t=>t.slug===this.slug)||LA}async loadMore(t){if(this.hasMore){if(!this.loaded){await k3e();const{url:n,apiType:r}=tW(this.rankTab),i=(await Zt.get(n,{signal:t})).data;if(this.loaded=true,!jn(i)){rn(i.message||wf);return}const l=(i?.data?.list||i?.result?.list||[]).map((u,d)=>{const m=d+1;return {...u,api:Je.Rank,uniqId:`${Je.Rank}:${this.rankTab.slug}:rankingNo-${m}`,rankingNo:m,slug:this.rankTab.slug,rankTab:this.rankTab,from:r}});this.qs.bufferQueue=l;}return this.qs.sliceFromQueue()}}}function dW(){const{tabs:e}=bt(xi),{normalList:t,pgcList:n}=f.useMemo(()=>{const r=e.map(a=>({...a,apiType:tW(a).apiType})),o=r.filter(a=>[d0.PgcSeason,d0.PgcWeb].includes(a.apiType));return {normalList:r.filter(a=>a.apiType===d0.Normal),pgcList:o}},[e]);return {normalList:t,pgcList:n}}function F3e(){const{enableSidebar:e}=Ut(),{ref:t,getPopupContainer:n}=Mu(),r=Co(),{slug:o,currentTab:i}=bt(xi),{normalList:a,pgcList:l}=dW(),u=(y,S,C)=>y.length?H("div",{className:"mt-15px max-w-350px first:mt-0",children:[H("p",{className:"mb-5px flex-v-center rounded-5px bg-gate-primary py-5px pl-6px text-white",children:[S,!!C&&x(mr,{children:C})]}),x("div",{className:"grid grid-cols-4 gap-x-10px gap-y-8px px-2px",children:y.map(w=>{const $=w.slug===o;return x(ut,{className:X({"b-gate-primary":$,"color-gate-primary":$}),onClick:M=>{g(false),xi.slug=w.slug,r();},children:x("span",{children:w.name})},w.slug)})})]}):null,d=nt(y=>{const S=[...a,...l];if(!S.length)return;const C=S.findIndex(M=>M.slug===o);if(C===-1)return;const w=y.shiftKey?-1:1,$=(C+w+S.length)%S.length;xi.slug=S[$].slug,r();}),m=H(ze,{children:[u(a,"视频"),u(l,"PGC内容","不能提供预览")]}),[p,g]=f.useState(false),b=x(Zo,{arrow:false,open:p,onOpenChange:g,placement:"bottomLeft",getPopupContainer:n,content:m,styles:{container:{border:`1px solid ${qf()}`}},children:x(ut,{css:[p&&Uf,"",""],onClick:d,className:"outline-none!",children:i.name})});if(!e)return x("div",{ref:t,children:b})}function H3e(){const{slug:e}=bt(xi),{normalList:t,pgcList:n}=dW(),r=Co(),o=nt(a=>{xi.slug=a,r();}),i=f.useMemo(()=>{const a={type:"group",label:"视频",children:t.map(u=>({key:u.slug,label:u.name,onClick:()=>o(u.slug)}))},l={type:"group",label:"PGC内容",children:n.map(u=>({key:u.slug,label:u.name,onClick:()=>o(u.slug)}))};return [a,l]},[t,n]);return x(ec,{items:i,selectedKeys:[e],mode:"inline",inlineIndent:10})}const V3e={[fr.PopularGeneral]:()=>new l3e(at.popularGeneralUseAnonymous),[fr.PopularWeekly]:()=>new Ry(at.popularWeeklyUseShuffle),[fr.Rank]:()=>new uW(xi.slug)};function fW(e){const{subtab:t}=qo;return e??=at.popularWeeklyUseShuffle,t===fr.PopularWeekly&&e}const p$=e=>x("img",{src:e,alt:"",className:"size-18px"}),g$={[fr.PopularGeneral]:{icon:p$("https://s1.hdslb.com/bfs/static/jinkela/popular/assets/icon_popular.png"),label:"综合热门",desc:"各个领域中新奇好玩的优质内容都在这里~",swr:true,anonymousUsage:true},[fr.PopularWeekly]:{icon:p$("https://s1.hdslb.com/bfs/static/jinkela/popular/assets/icon_weekly.png"),label:"每周必看",desc:"每周五晚 18:00 更新",anonymousUsage:true},[fr.Rank]:{icon:p$("https://s1.hdslb.com/bfs/static/jinkela/popular/assets/icon_rank.png"),label:"排行榜",desc:"排行榜根据稿件内容质量,近期的数据综合展示,动态更新",anonymousUsage:true,swr:true}};class j3e extends Hs{subtab;service;constructor(){super(20),this.subtab=qo.subtab,this.service=V3e[qo.subtab]();}get tabbarView(){return x(U3e,{children:this.service.tabbarView})}get sidebarView(){return this.service.sidebarView}get hasMoreExceptQueue(){return this.service.hasMore}fetchMore(t){return this.service.loadMore(t)}}const qo=await( sT({subtab:fr.PopularGeneral},"hot-store"));Object.values(fr).includes(qo.subtab)||(qo.subtab=fr.PopularGeneral);function U3e({children:e}){const{subtab:t}=bt(qo),{icon:n,label:r}=g$[t],o=Co(),{ref:i,getPopupContainer:a}=Mu(),{__internalHotSubUseDropdown:l}=Ut(),u=f.useMemo(()=>[fr.PopularGeneral,fr.PopularWeekly,fr.Rank].map((p,g)=>{const b=g$[p],y=p===t;return [g>0&&{type:"divider"},{key:p,label:x("span",{className:X({"color-gate-primary":y}),children:b.label}),icon:b.icon,onClick(){p!==qo.subtab&&(qo.subtab=p,o());}}].filter(Boolean)}).flat(),[t]),d=x(tc,{menu:{items:u},getPopupContainer:a,rootClassName:'![&_[role="separator"]]:mx-0 ![&_[role="separator"]]:my-2px',children:H(ut,{ref:i,className:"w-114px flex items-center justify-start gap-0 pl-16px",children:[n,x("span",{className:"ml-8px",children:r})]})}),m=f.useMemo(()=>x(Xr.Compact,{children:[fr.PopularGeneral,fr.PopularWeekly,fr.Rank].map((p,g)=>{const{icon:b,label:y,desc:S}=g$[p],C=p===t;return x(gn,{title:H(ze,{children:[y,": ",S]}),children:x(ut,{className:"[&_.ant-btn-icon]:line-height-0",icon:b,variant:C?"solid":"outlined",color:C?"primary":"default",onClick:()=>{p!==qo.subtab&&(qo.subtab=p,o());},children:y})},p)})}),[t]);return H(ze,{children:[l?d:m,e]})}const mW=H(ze,{children:["1. 可以使用多个过滤词, 用空格分隔, 逻辑关系为且 (AND) ",x("br",{}),'2. 可以使用引号包裹过滤词, 如 "word or sentence" ',x("br",{}),'3. 可以使用 -"word or sentence" 排除; 必须使用引号(单引号 或 双引号) ',x("br",{})]});function hW(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,a="";if(e[r]==="-"){const l=e[r+1];(l==='"'||l==="'")&&(i=true,r++);}if(e[r]==='"'||e[r]==="'"){const l=e[r];r++;let u=false;for(;r<o;){const d=e[r];if(u){a+=d,u=false,r++;continue}if(d==="\\"){const m=e[r+1];if(m==='"'||m==="'"){u=true,r++;continue}a+=d,r++;continue}if(d===l){r++;break}a+=d,r++;}}else for(;r<o&&e[r]!==" ";){if(e[r]==="\\"){r++,r<o&&(a+=e[r],r++);continue}a+=e[r],r++;}a&&(i?n.push(a):t.push(a));}return {includes:t,excludes:n}}const Zf={[et.AppRecommend]:{icon:x(YSe,{className:"size-18px"}),label:"推荐",desc:"使用 Bilibili App 端推荐 API",anonymousUsage:true},[et.PcRecommend]:{icon:x(XSe,{className:"size-18px"}),label:"推荐",desc:"使用新版首页顶部推荐 API",anonymousUsage:true},[et.KeepFollowOnly]:{icon:x(QSe,{className:"size-18px"}),label:"已关注",desc:"从PC端推荐中筛选出「已关注」,可能比较慢; 关注的UP更新在动态~"},[et.DynamicFeed]:{icon:x(hy,{className:"size-18px"}),label:"动态",desc:"视频投稿动态",swr:true},[et.Watchlater]:{icon:x(QT,{className:"size-17px [&_.circle]:stroke-current"}),label:"稍后再看",desc:"「我」的稍后再看",swr:true},[et.Fav]:{icon:x(ff,{className:"mt--1px size-16px"}),label:"收藏",desc:"「我」的收藏",get swr(){return !mn.usingShuffle}},[et.Hot]:{icon:x(JSe,{className:"size-16px"}),label:"热门",desc:"各个领域中新奇好玩的优质内容都在这里~",anonymousUsage:true,get swr(){return !fW()}},[et.Live]:{icon:x(XT,{className:"size-16px"}),label:"直播",desc:"直播~",swr:true},[et.SpaceUpload]:{icon:x(py,{className:"size-16px"}),label:"投稿",desc:"UP 视频投稿",anonymousUsage:true,extraHelpInfo:H("div",{className:"ml-20px",children:["搜索词: 搜索相关作品 ",x("br",{}),"本地过滤词: 本地过滤搜索结果; 本地过滤词支持高级规则:",x("div",{className:"ml-20px",children:mW})]})},[et.Liked]:{icon:x(Dj,{className:"size-16px"}),label:"赞",desc:"「我」的点赞. 使用 App 端个人空间 API, 需要 access_key"}};function yi({tabKey:e,active:t,className:n}){const{icon:r}=Zf[e],o=r.props,i={...o,className:sr(o.className,n),active:e===et.Live?t:void 0};return f.cloneElement(r,i)}const pW="你需要登录B站后使用该功能! 如已完成登录, 请刷新网页重试~";function gW(){return rn(pW)}const q3e=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",children:[x("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"}),x("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,d:"M24 28.625v-4a6 6 0 1 0-6-6"}),x("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"})]})]}),W3e=f.forwardRef(q3e),G3e=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[x("path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0-4 0"}),x("path",{d:"M12 18q-.492 0-.97-.05Q6.271 17.452 3 12q3.6-6 9-6q5.197 0 8.727 5.558M15 18a3 3 0 1 0 6 0a3 3 0 1 0-6 0m5.2 2.2L22 22"})]})]}),K3e=f.forwardRef(G3e);function Y3e(){const{grid:{useCustomGrid:e,enableForceColumn:t,forceColumnCount:n,cardMinWidth:r},style:o,enableSidebar:i,sidebarAlign:a}=Ut();ro(()=>oT(at,"pureRecommend",async m=>{await pn(0),j1();}));const l=nt(()=>{const m="v0.34.11";GM.setClipboard(m),Ot.success(`已复制当前版本: ${m}`);}),u=f.useRef(null),d=z1(u);return H("div",{className:zn.tabPane,children:[x(Zr,{title:H(ze,{children:[x(yi,{tabKey:et.AppRecommend,className:"mr-5px mt-2px size-30px"}),"access_key",H(mr,{className:"ml-5px mt-6px size-18px",IconComponent:W3e,tooltipProps:{classNames:{root:"text-14px"}},children:["App 端登录凭证, 使用情况: ",x("br",{}),x(H3,{}),H("div",{className:"group flex items-start",children:[H("div",{className:"w-55px flex flex-none items-center",children:[x(yi,{tabKey:et.AppRecommend,className:"mr-1"})," 推荐"]}),H("ul",{className:"flex-1 list-disc pl-20px",children:[x("li",{className:"w-max",children:"获取推荐"}),x("li",{className:"w-max",children:"提交不喜欢"})]})]}),x(H3,{}),H("div",{className:"group flex items-start",children:[H("div",{className:"w-55px flex flex-none items-center",children:[x(yi,{tabKey:et.Liked,className:"mr-1"}),"赞"]}),x("ul",{className:"w-max flex-1 list-disc pl-20px",children:x("li",{className:"w-max",children:"获取点赞列表"})})]})]})]}),children:x(MA,{})}),x(Zr,{title:"开关",resetSettingPaths:["pureRecommend","multiSelect.showIcon"],children:H("div",{className:zn.settingsLine,children:[x(Pt,{configPath:"pureRecommend",label:"覆盖默认推荐",tooltip:H(ze,{children:[_r("覆盖默认推荐内容",`保留默认首页; 你可以从屏幕边缘找到入口面板, 使用 ${Ao} 的功能.`),"P.S 需要刷新网页"]})}),x(Pt,{configPath:"multiSelect.showIcon",label:"「多选」按钮",tooltip:"是否显示「多选」按钮"})]})}),H(Zr,{title:H(ze,{children:["布局",x(gn,{title:"透视",children:x(K3e,{ref:u,title:"透视",className:X("ml-1.5 size-1em cursor-pointer b-1px b-transparent rounded-md b-solid p-2px hover:b-gate-primary",{peeking:d})})})]}),resetSettingPaths:["grid.useCustomGrid","grid.cardMinWidth","grid.enableForceColumn","grid.forceColumnCount","enableSidebar","sidebarAlign","grid.gridDisplayMode","grid.twoColumnModeAlign"],children:[H("div",{className:zn.settingsLine,children:[x(Pt,{configPath:"grid.useCustomGrid",label:"使用自定义网格配置",tooltip:H(ze,{children:["网格配置指: 网格宽度, 间距, 列数等. ",x("br",{}),_r(H(ze,{children:["使用 ",Ao," 自定义网格配置: 宽度为90%; 可跟随 Bilibili-Evolved 自定义顶栏配置"]}),x(ze,{children:"使用 bili-feed4 版本B站首页默认的网格配置"}))]})}),H("div",{className:"flex items-center gap-x-1 px-6px",children:[x(gn,{title:H(ze,{children:["如果期望显示更多的列, 可以调小这个值; ",x("br",{}),"如果期望显示更少的列, 可以调大这个值; ",x("br",{}),"手动设置列数时, 这个值不起作用. ",x("br",{}),x(f_,{children:"Alt / Opt"})," + ",x(f_,{children:"上下键"}),"可调整"]}),children:x("span",{className:"cursor-pointer",children:"视频卡片最小宽度"})}),x(Qc,{disabled:!e||t,value:r,onChange:m=>{m&&(at.grid.cardMinWidth=m);},min:150,max:450,step:10,size:"small",className:"w-75px"})]}),H("div",{className:"flex items-center px-6px",children:[x(Pt,{disabled:!e,configPath:"grid.enableForceColumn",label:"手动设置列数",tooltip:x(ze,{children:"手动设置列数"})}),e&&t&&x(Qc,{value:n,onChange:m=>{m&&(at.grid.forceColumnCount=m);},min:0,max:10,step:1,size:"small",className:"w-50px"})]})]}),H("div",{className:"flex items-center gap-x-4px",children:[x(Pt,{configPath:"enableSidebar",label:"使用侧边栏",tooltip:_r("使用侧边栏(如动态 分组/UP 选择)","使用下拉面板")}),H(Jr.Group,{disabled:!i,buttonStyle:"solid",size:"small",value:a,onChange:m=>{at.sidebarAlign=m.target.value;},children:[x(Jr.Button,{value:mf.Left,className:"inline-flex-center",children:x(Oq,{className:"size-16px"})}),x(Jr.Button,{value:mf.Right,className:"inline-flex-center",children:x(Dq,{className:"size-16px"})})]})]}),H("div",{className:"flex items-center",children:["网格显示模式",x(kEe,{className:"ml-xl"})]})]}),H(Zr,{title:"样式",resetSettingPaths:["style.general.popoverBorderColorUseColorPrimary","style.pureRecommend.useStickyTabbar","style.pureRecommend.stickyTabbarShadow","grid.useCustomGrid","style.pureRecommend.useWhiteBackground","style.pureRecommend.hideTopChannel"],children:[x("div",{className:zn.settingsLine,children:x(Pt,{configPath:"style.general.popoverBorderColorUseColorPrimary",label:"下拉面板使用主题色边框"})}),H("div",{children:[x("div",{className:"flex items-center text-1.2em",children:"全屏推荐"}),H("div",{className:zn.settingsLine,children:[x(Pt,{configPath:"style.pureRecommend.useStickyTabbar",label:"固定 Tab 栏",tooltip:_r("Tab 栏会吸附在顶栏下方","Tab 栏会随页面一起滚动")}),x(Pt,{disabled:!o.pureRecommend.useStickyTabbar,configPath:"style.pureRecommend.stickyTabbarShadow",label:"固定 Tab 栏时添加边框 & 阴影",tooltip:_r("Tab 栏在吸附状态下: 加宽, 添加边框 & 阴影","不改变")}),x(Pt,{configPath:"style.pureRecommend.useWhiteBackground",label:"使用纯白背景",tooltip:H(ze,{children:[_r("纯白背景","浅灰色背景"),"仅影响白色/浅色模式"]})}),x(Pt,{configPath:"style.pureRecommend.hideTopChannel",label:"隐藏顶部分区和Banner"})]})]})]}),x(Zr,{title:H(ze,{children:["帮助",H("span",{className:"relative top-4px ml-8px mr-4px inline-flex items-center text-size-14px",children:["当前版本",H(go,{color:"green",className:"mx-4px cursor-pointer",onClick:l,children:[Ao," v","0.34.11"]}),x(tu,{className:"size-16px cursor-pointer",onClick:l})]})]}),children:H("div",{className:zn.settingsLine,children:[x(gn,{title:"来个 Star 支持一下",children:x(ut,{href:"https://github.com/magicdawn/Bilibili-Gate",target:"_blank",children:"GitHub 主页"})}),x(ut,{href:"https://afdian.com/a/magicdawn",target:"_blank",children:"「爱发电」支持"}),x(ut,{href:"http://greasyfork.icu/zh-CN/scripts/443530-bilibili-gate",target:"_blank",children:"GreasyFork 主页"}),x(ut,{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:"查看可用的快捷键"}),x(ut,{href:"https://github.com/magicdawn/Bilibili-Gate/releases",target:"_blank",children:"更新日志"})]})})]})}const X3e=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 15 15",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("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"})]}),vW=f.forwardRef(X3e),Q3e=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("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"})]}),Z3e=f.forwardRef(Q3e),J3e=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 5v14m-7-7h14"})]}),eMe=f.forwardRef(J3e),bW=vW,yW=Z3e,Op=eMe;function SW(e){return `https://space.bilibili.com/${Jo()}/fans/follow?tagid=${e}`}function Tg(e){return `https://space.bilibili.com/${e}`}const CW=Yj("w_webid"),xW=zs(async()=>{const e=await CW.get();return e||tMe()});async function tMe(){const e=Jo();if(!e)return;const t=Tg(e),r=(await Zt.get(t,{responseType:"text",withCredentials:true})).data,i=new DOMParser().parseFromString(r,"text/html"),a=decodeURIComponent(i.getElementById("__RENDER_DATA__")?.textContent?.trim()||"");if(!a)return;const l=JSON.parse(a)?.access_id;return l&&await CW.set(l),l}async function nMe(e){const n=(await Zt.get("/x/space/wbi/acc/info",{params:{mid:e,w_webid:await xW()||""}})).data;if(!jn(n)){Ko("space acc info error for %s: %o",e,n);return}return n.data}const FA=Ru({fn:nMe,generateKey:e=>e.toString(),tableName:"space-acc-info",ttl:so("10d"),concurrency:2});async function rMe(e){return (await FA(e))?.name}const Ag=Ru({fn:rMe,generateKey:e=>e.toString(),tableName:"user-nickname",ttl:so("10d")});async function v$(e,t){await Ag.cache.set(e.toString(),{val:t,ts:Date.now()});}function oMe(){return K1("filter.byAuthor.keywords")}function iMe(){return Y1("filter.byAuthor.keywords")}function aMe(){return K1("filter.byTitle.keywords")}function sMe(){return Y1("filter.byTitle.keywords")}function lMe(){return K1("filter.dfByTitle.keywords")}function cMe(){return Y1("filter.dfByTitle.keywords")}function uMe(){return K1("filter.dfHideOpusMids.keywords")}function dMe(){return Y1("filter.dfHideOpusMids.keywords")}function wW(e){return `__${Ao}:${e}__`}async function K1(e){const t=wW(e),n=await T1(e);if(!n?.length)return Ot.error("没有可导出数据!");GM.setClipboard(JSON.stringify({[t]:n},null,2)),Ot.success("已复制到剪贴板!");}async function Y1(e){const[t,n]=await Hp(()=>navigator.clipboard.readText());if(t)return Ot.error("读取剪贴板失败!");if(!n)return Ot.error("剪贴板内容为空!");const[r,o]=Cf(()=>JSON.parse(n));if(r)return Ot.error("无法解析剪贴板内容!");if(!o)return Ot.error("剪贴板内容为空!");const i=wW(e),a=o?.[i];if(!a?.length)return Ot.error("没有符合条件的数据!");const l=await T1(e),u=g0(a,l);if(!u.length)return Ot.warning("没有可导入内容, 已全部存在!");Ua(e,{add:u}),Ot.success(`已导入 ${u.length} 条数据!`);}const D9=/^(?<mid>\d+)\((?<remark>[\S ]+)\)$/,fMe=/^\d+$/;function X1(e){if(D9.test(e)){const t=D9.exec(e)?.groups,n=t?.mid,r=t?.remark;return {mid:n,remark:r}}return fMe.test(e)?{mid:e,remark:void 0}:{}}function U3(e){const t=new Set,n=new Set;return e.forEach(r=>{const{mid:o}=X1(r);o?t.add(o):n.add(r);}),{blockUpMids:t,blockUpNames:n}}function _9(e){const t=[],n=[];e.forEach(o=>{if(o.startsWith("/")&&o.endsWith("/")){const i=new RegExp(o.slice(1,-1),"i");t.push(i);}else n.push(o);});function r(o){return n.some(i=>o.includes(i))||t.some(i=>i.test(o))}return {titleKeywordList:n,titleRegexList:t,test:r}}const mMe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,d:"m14 14l20 20m-20 0l20-20"})]}),hMe=f.forwardRef(mMe),{Search:pMe}=Yi;var gMe={name:"1mzc5hv",styles:"color:var(--ant-color-text-disabled);background-color:var(--ant-color-bg-container-disabled);box-shadow:none;opacity:1;pointer-events:none;cursor:not-allowed"};function Ty({configPath:e,searchProps:t,disabled:n,className:r,inputClassName:o,listClassName:i,renderHeader:a=IL}){const l=iU(e),u=f.useMemo(()=>By(l).toReversed(),[l]),d=["filter.byAuthor.keywords","filter.dfHideOpusMids.keywords"].includes(e),m=x(pMe,{className:X("my-5px",o),enterButton:"添加",allowClear:true,disabled:n,size:"middle",...t,onSearch:async(S,C)=>{if(!S)return;if(new Set(await T1(e)).has(S)){Ot.warning(`${S} 已存在`);return}await Ua(e,{add:[S]}),C?.target&&C.target.closest(".ant-input-wrapper")?.querySelector(".ant-input-clear-icon")?.click();}}),p=!!u.length,g=!p,b=sr(g?"rounded-lg":["max-h-250px flex flex-wrap items-start gap-x-10px gap-y-5px overflow-y-auto pr-10px",i]),y=H("div",{className:b,css:n&&gMe,children:[g&&x(Vi,{image:Vi.PRESENTED_IMAGE_SIMPLE,description:"空空如也",className:"[&.ant-empty-normal]:my-1 [&.ant-empty-normal]:py-5px"}),p&&u.map(S=>x($W,{tag:S.toString(),TagComponent:d?vMe:void 0,onDelete:C=>Ua(e,{remove:[C]})},S))]});return H(ze,{children:[a(m),y]})}const $W=f.memo(function({tag:e,renderTag:t,TagComponent:n,onDelete:r,className:o,...i}){const a=f.useMemo(()=>n?x(n,{tag:e}):(t??=IL,t(e)),[n,t,e]);return H("div",{...i,className:X("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",o),children:[a,x(hMe,{className:"ml-2px size-16px cursor-pointer text-size-12px",onClick:()=>r?.(e)})]})}),vMe=f.memo(function({tag:e}){const{mid:t,remark:n}=f.useMemo(()=>X1(e),[e]),[r,o]=f.useState(void 0);f.useEffect(()=>{(async()=>{if(!t)return;const l=await Ag(t);l&&o(l);})();},[t]);const i=t?r||n||t:e;return x(ze,{children:x(gn,{title:H(ze,{children:[!!t&&H(ze,{children:["mid: ",t," ",x("br",{})]}),!!n&&H(ze,{children:["备注: ",n," ",x("br",{}),n===r&&H(ze,{children:['P.S "备注" 与 "用户昵称" 相同, 是之前的数据, 现在你只需要填写 mid, 会自动获取昵称 ',x("br",{})]})]}),!t&&H(ze,{children:["使用用户名过滤: 用户可能改名, 建议使用 mid 过滤 ",x("br",{})]})]}),children:H("span",{className:X("inline-flex items-center justify-center",t?"cursor-pointer":"cursor-[edit]"),children:[t&&x(vW,{className:"mr-2px size-12px"}),t?x("a",{href:Tg(t),target:"_blank",style:{color:"inherit"},children:i}):i]})})})}),Ay={blockContainer:"b-1px b-gate-border rounded-lg b-solid p-x-2 p-y-1 light:hover:b-gate-primary"};function bMe(){return x("div",{className:X(zn.tabPane,"pr-15px"),children:x(Zr,{title:H(ze,{children:["内容过滤",x(hu,{configPath:"filter.enabled",className:"ml-10px"})]}),children:x(UR,{items:[{key:"recommend",label:H("span",{className:"inline-flex-center gap-x-1",children:[x(yi,{tabKey:et.AppRecommend}),"推荐 / 热门",H(mr,{className:"ml-1",children:["生效范围: ",x("br",{}),"视频/图文/影视: 推荐类 Tab ",x("br",{}),"UP/标题: 推荐类、热门 Tab ",x("br",{})]})]}),children:x(yMe,{})},{key:"dynamic-feed",label:H("span",{className:"inline-flex-center gap-x-1",children:[x(yi,{tabKey:et.DynamicFeed}),"动态",H(mr,{className:"ml-1",children:["使用场景: 关注的 UP 发布的部分内容 ",x("br",{}),H("ol",{children:[x("li",{children:"如果有规律可以按标题关键字过滤"}),x("li",{children:"没有规律可以屏蔽 UP 发布的全部图文动态"})]})]})]}),children:x(SMe,{})}]})})})}function yMe(){const{enabled:e,minDuration:t,minPlayCount:n,minDanmakuCount:r,hideGotoTypeBangumi:o,hideGotoTypePicture:i,byAuthor:a,byTitle:l}=Ut().filter,u=d=>({label:"「已关注」豁免",tooltipProps:{color:Mq},tooltip:H(ze,{children:["「已关注」内容不考虑过滤条件, 总是展示",x("br",{}),'"豁免" 一词来源'," ",x("a",{target:"_blank",href:"https://github.com/magicdawn/Bilibili-Gate/issues/1#issuecomment-2197868587",children:"pilipala"})]})});return x(ze,{children:H("div",{className:"grid grid-cols-2 gap-15px",children:[H("div",{children:[x("div",{className:zn.settingsGroupSubTitle,children:"视频"}),H("div",{className:"flex flex-col gap-y-1",children:[H("div",{className:"flex items-center",children:[x(Pt,{configPath:"filter.minDuration.enabled",label:"按视频时长过滤",tooltip:x(ze,{children:"不显示短视频"}),disabled:!e,className:"min-w-130px"}),H(Xr.Compact,{children:[x(Qc,{className:"w-130px",size:"small",min:1,step:10,value:t.value,onChange:d=>!Fa(d)&&(at.filter.minDuration.value=d),disabled:!e||!t.enabled}),x(Xr.Addon,{children:"秒"})]})]}),H("div",{className:"flex items-center",children:[x(Pt,{disabled:!e,configPath:"filter.minPlayCount.enabled",label:"按播放次数过滤",tooltip:x(ze,{children:"不显示播放次数很少的视频"}),className:"min-w-130px"}),H(Xr.Compact,{children:[x(Qc,{className:"w-130px",size:"small",min:1,step:1e3,value:n.value,onChange:d=>!Fa(d)&&(at.filter.minPlayCount.value=d),disabled:!e||!n.enabled}),x(Xr.Addon,{children:"次"})]})]}),H("div",{className:"flex items-center",children:[x(Pt,{disabled:!e,configPath:"filter.minDanmakuCount.enabled",label:"按弹幕条数过滤",tooltip:x(ze,{children:"不显示弹幕条数很少的视频"}),className:"min-w-130px"}),H(Xr.Compact,{children:[x(Qc,{className:"w-130px",size:"small",min:1,step:100,value:r.value,onChange:d=>!Fa(d)&&(at.filter.minDanmakuCount.value=d),disabled:!e||!r.enabled}),x(Xr.Addon,{children:"条"})]})]}),x(Pt,{configPath:"filter.exemptForFollowed.video",disabled:!e,...u()})]})]}),H("div",{children:[x("div",{className:zn.settingsGroupSubTitle,children:"图文"}),x(Pt,{configPath:"filter.hideGotoTypePicture",label:"过滤图文类型推荐",disabled:!e,className:"flex",tooltip:H(ze,{children:["过滤 ",x("kbd",{children:"goto = picture"})," 的内容: 包括 (动态 & 专栏) 等"]})}),x(Pt,{className:"flex",disabled:!e||!i,configPath:"filter.exemptForFollowed.picture",...u()}),x("div",{className:X(zn.settingsGroupSubTitle,"mt-2"),children:"影视"}),x(Pt,{configPath:"filter.hideGotoTypeBangumi",label:"过滤影视类型推荐",tooltip:H(ze,{children:["过滤 ",x("kbd",{children:"goto = bangumi"})," 的内容: 包括 (番剧 / 电影 / 国创 / 纪录片) 等"]}),disabled:!e})]}),H("div",{className:X(Ay.blockContainer,"col-span-full"),children:[H("div",{className:zn.settingsGroupSubTitle,children:["UP",H(mr,{children:["根据 UP 过滤视频 ",x("br",{}),"使用 mid 屏蔽时支持备注, 格式: ",x(go,{color:"success",children:"mid(备注)"})," 如"," ",x(go,{color:"success",children:"8047632(B站官方)"}),x("br",{}),H("div",{className:"mt-4px flex items-start",children:[x(_j,{className:"mt-3px"}),H("div",{className:"ml-8px flex-1",children:["B站官方支持黑名单, 对于不喜欢的 UP 可以直接拉黑 ",x("br",{}),"此脚本会拉取官方黑名单, 并无视此页开关, 总是会过滤掉 ",x("br",{}),"这里是客户端过滤, 与黑名单功能重复, 优先使用黑名单功能 ",x("br",{})]})]})]}),x(hu,{configPath:"filter.byAuthor.enabled",disabled:!e,className:"ml-10px"}),x("div",{className:"flex-1"}),x(Zo,{placement:"left",content:H("div",{className:"flex flex-col gap-x-10px gap-y-5px",children:[H(ut,{onClick:CMe,children:[x(Vf,{}),"清理无效备注数据"]}),H(ut,{onClick:oMe,disabled:!a.keywords.length,children:[x(Ap,{}),"导出"]}),H(ut,{onClick:iMe,children:[x(Np,{}),"导入"]})]}),children:x(ut,{className:"icon-only-round-button size-26px",children:x(Op,{className:"size-16px"})})})]}),x(Ty,{configPath:"filter.byAuthor.keywords",searchProps:{placeholder:"添加UP: 全名 / mid / mid(备注)"},disabled:!e||!a.enabled,className:"mt-2",listClassName:"max-h-130px"})]}),H("div",{className:X(Ay.blockContainer,"col-span-full"),children:[H("div",{className:X(zn.settingsGroupSubTitle),children:[x("span",{children:"标题"}),H(mr,{children:["根据标题关键词过滤视频 ",x("br",{}),"支持普通关键字和正则(i), 语法:",x(go,{color:"success",variant:"solid",children:"/abc|\\d+/"})]}),x(hu,{configPath:"filter.byTitle.enabled",disabled:!e,className:"ml-10px"}),x("div",{className:"flex-1"}),x(Zo,{placement:"left",content:H("div",{className:"flex flex-col gap-x-10px gap-y-5px",children:[H(ut,{onClick:aMe,disabled:!l.keywords.length,children:[x(Ap,{}),"导出"]}),H(ut,{onClick:sMe,children:[x(Np,{}),"导入"]})]}),children:x(ut,{className:"icon-only-round-button size-26px",children:x(Op,{className:"size-16px"})})})]}),x(Ty,{configPath:"filter.byTitle.keywords",searchProps:{placeholder:"添加过滤关键词"},disabled:!e||!l.enabled,listClassName:"max-h-130px"})]})]})})}function SMe(){const{filter:{enabled:e,dfByTitle:t,dfHideOpusMids:n}}=Ut();return H("div",{className:"flex flex-col gap-y-15px",children:[H("div",{className:Ay.blockContainer,children:[H("div",{className:zn.settingsGroupSubTitle,children:[x("span",{children:"标题"}),H(mr,{children:["支持普通关键字和正则(i), 语法:",x(go,{color:"success",variant:"solid",children:"/abc|\\d+/"}),x("br",{}),"作用范围: 支持的动态类型: 视频 / 图文"]}),x(hu,{configPath:"filter.dfByTitle.enabled",disabled:!e,className:"ml-10px"}),x("div",{className:"flex-1"}),x(Zo,{placement:"left",content:H("div",{className:"flex flex-col gap-x-10px gap-y-5px",children:[H(ut,{onClick:lMe,disabled:!t.keywords.length,children:[x(Ap,{}),"导出"]}),H(ut,{onClick:cMe,children:[x(Np,{}),"导入"]})]}),children:x(ut,{className:"icon-only-round-button size-26px",children:x(Op,{className:"size-16px"})})})]}),x(Ty,{configPath:"filter.dfByTitle.keywords",searchProps:{placeholder:"添加过滤关键词"},disabled:!e||!t.enabled})]}),H("div",{className:Ay.blockContainer,children:[H("div",{className:zn.settingsGroupSubTitle,children:[x("span",{children:"屏蔽 UP 的图文动态"}),H(mr,{children:["支持 mid 或 mid(备注) ",x("br",{}),"右键图文动态可快速添加"]}),x(hu,{configPath:"filter.dfHideOpusMids.enabled",disabled:!e,className:"ml-10px"}),x("div",{className:"flex-1"}),x(Zo,{placement:"left",content:H("div",{className:"flex flex-col gap-x-10px gap-y-5px",children:[H(ut,{onClick:uMe,disabled:!n.keywords.length,children:[x(Ap,{}),"导出"]}),H(ut,{onClick:dMe,children:[x(Np,{}),"导入"]})]}),children:x(ut,{className:"icon-only-round-button size-26px",children:x(Op,{className:"size-16px"})})})]}),x(Ty,{configPath:"filter.dfHideOpusMids.keywords",searchProps:{placeholder:"添加 UP: mid / mid(备注)"},disabled:!e||!n.enabled,listClassName:"max-h-130px"})]})]})}async function CMe(){const e=at.filter.byAuthor.keywords,t=await Vl(e,async n=>{const{mid:r,remark:o}=X1(n);return !r||!o||await Ag(r)!==o?n:r},1/0);return ma(t,e)?Ot.warning("没有「无效备注」数据!"):(at.filter.byAuthor.keywords=t,Ot.success("已清理「无效备注」数据!"))}function xMe(){return H("div",{className:zn.tabPane,children:[x(Zr,{title:"视频播放页",children:x(Pt,{configPath:"fav.useCustomFavPicker.onPlayPage",label:"使用自定义收藏弹窗",tooltip:H(ze,{children:["使用「",Ao,"」提供的选择收藏夹弹窗 ",x("br",{}),H("ul",{className:"ml-20px list-circle",children:[x("li",{children:"支持拼音搜索, 帮你快速找到收藏夹"}),x("li",{children:H("span",{className:"flex-v-center",children:["支持从收藏夹图标 或 快捷键",x("kbd",{className:X(du,"mx-1 h-14px py-0 line-height-14px"),children:"e"}),"触发"]})})]})]})})}),x(Zr,{title:"搜索页",children:x(Pt,{configPath:"videoCard.videoPreview.addTo.searchPage",label:"浮动预览: 添加到「搜索页」",tooltip:x(ze,{children:"在搜索页的视频也添加「浮动预览」"})})})]})}function wMe(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 $Me=e=>{let{containerNodeRect:t,draggingNodeRect:n,transform:r}=e;return !n||!t?r:wMe(r,n,t)},EMe=e=>{let{transform:t}=e;return {...t,x:0}};function Dp(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function MMe(e,t){return e.reduce((n,r,o)=>{const i=t.get(r);return i&&(n[o]=i),n},Array(e.length))}function $b(e){return e!==null&&e>=0}function RMe(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 TMe(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const EW=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=Dp(t,r,n),a=t[o],l=i[o];return !l||!a?null:{x:l.left-a.left,y:l.top-a.top,scaleX:l.width/a.width,scaleY:l.height/a.height}},Eb={scaleX:1,scaleY:1},AMe=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:i,overIndex:a}=e;const l=(t=i[n])!=null?t:r;if(!l)return null;if(o===n){const d=i[a];return d?{x:0,y:n<a?d.top+d.height-(l.top+l.height):d.top-l.top,...Eb}:null}const u=NMe(i,o,n);return o>n&&o<=a?{x:0,y:-l.height-u,...Eb}:o<n&&o>=a?{x:0,y:l.height+u,...Eb}:{x:0,y:0,...Eb}};function NMe(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 MW="Sortable",RW=G.createContext({activeIndex:-1,containerId:MW,disableTransforms:false,items:[],overIndex:-1,useDragOverlay:false,sortedRects:[],strategy:EW,disabled:{draggable:false,droppable:false}});function PMe(e){let{children:t,id:n,items:r,strategy:o=EW,disabled:i=false}=e;const{active:a,dragOverlay:l,droppableRects:u,over:d,measureDroppableContainers:m}=W2e(),p=Rg(MW,n),g=l.rect!==null,b=f.useMemo(()=>r.map(I=>typeof I=="object"&&"id"in I?I.id:I),[r]),y=a!=null,S=a?b.indexOf(a.id):-1,C=d?b.indexOf(d.id):-1,w=f.useRef(b),$=!RMe(b,w.current),M=C!==-1&&S===-1||$,T=TMe(i);Ka(()=>{$&&y&&m(b);},[$,b,y,m]),f.useEffect(()=>{w.current=b;},[b]);const R=f.useMemo(()=>({activeIndex:S,containerId:p,disabled:T,disableTransforms:M,items:b,overIndex:C,useDragOverlay:g,sortedRects:MMe(b,u),strategy:o}),[S,p,T.draggable,T.droppable,M,b,C,u,g,o]);return G.createElement(RW.Provider,{value:R},t)}const IMe=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return Dp(n,r,o).indexOf(t)},OMe=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:a,previousItems:l,previousContainerId:u,transition:d}=e;return !d||!r||l!==i&&o===a?false:n?true:a!==o&&t===u},DMe={duration:200,easing:"ease"},TW="transform",_Me=gf.Transition.toString({property:TW,duration:0,easing:"linear"}),LMe={roleDescription:"sortable"};function zMe(e){let{disabled:t,index:n,node:r,rect:o}=e;const[i,a]=f.useState(null),l=f.useRef(n);return Ka(()=>{if(!t&&n!==l.current&&r.current){const u=o.current;if(u){const d=Xf(r.current,{ignoreTransform:true}),m={x:u.left-d.left,y:u.top-d.top,scaleX:u.width/d.width,scaleY:u.height/d.height};(m.x||m.y)&&a(m);}}n!==l.current&&(l.current=n);},[t,n,r,o]),f.useEffect(()=>{i&&a(null);},[i]),i}function BMe(e){let{animateLayoutChanges:t=OMe,attributes:n,disabled:r,data:o,getNewIndex:i=IMe,id:a,strategy:l,resizeObserverConfig:u,transition:d=DMe}=e;const{items:m,containerId:p,activeIndex:g,disabled:b,disableTransforms:y,sortedRects:S,overIndex:C,useDragOverlay:w,strategy:$}=f.useContext(RW),M=kMe(r,b),T=m.indexOf(a),R=f.useMemo(()=>({sortable:{containerId:p,index:T,items:m},...o}),[p,o,T,m]),I=f.useMemo(()=>m.slice(m.indexOf(a)),[m,a]),{rect:N,node:P,isOver:O,setNodeRef:_}=Y2e({id:a,data:R,disabled:M.droppable,resizeObserverConfig:{updateMeasurementsFor:I,...u}}),{active:L,activatorEvent:j,activeNodeRect:U,attributes:q,setNodeRef:V,listeners:B,isDragging:F,over:W,setActivatorNodeRef:K,transform:Q}=Eq({id:a,data:R,attributes:{...LMe,...n},disabled:M.draggable}),D=M$e(_,V),z=!!L,Y=z&&!y&&$b(g)&&$b(C),ee=!w&&F,J=ee&&Y?Q:null,ne=Y?J??(l??$)({rects:S,activeNodeRect:U,activeIndex:g,overIndex:C,index:T}):null,se=$b(g)&&$b(C)?i({id:a,items:m,activeIndex:g,overIndex:C}):T,ae=L?.id,re=f.useRef({activeId:ae,items:m,newIndex:se,containerId:p}),de=m!==re.current.items,ge=t({active:L,containerId:p,isDragging:F,isSorting:z,id:a,index:T,items:m,newIndex:re.current.newIndex,previousItems:re.current.items,previousContainerId:re.current.containerId,transition:d,wasDragging:re.current.activeId!=null}),ie=zMe({disabled:!ge,index:T,node:P,rect:N});return f.useEffect(()=>{z&&re.current.newIndex!==se&&(re.current.newIndex=se),p!==re.current.containerId&&(re.current.containerId=p),m!==re.current.items&&(re.current.items=m);},[z,se,p,m]),f.useEffect(()=>{if(ae===re.current.activeId)return;if(ae!=null&&re.current.activeId==null){re.current.activeId=ae;return}const le=setTimeout(()=>{re.current.activeId=ae;},50);return ()=>clearTimeout(le)},[ae]),{active:L,activeIndex:g,attributes:q,data:R,rect:N,index:T,newIndex:se,items:m,isOver:O,isSorting:z,isDragging:F,listeners:B,node:P,overIndex:C,over:W,setNodeRef:D,setActivatorNodeRef:K,setDroppableNodeRef:_,setDraggableNodeRef:V,transform:ie??ne,transition:Ee()};function Ee(){if(ie||de&&re.current.newIndex===T)return _Me;if(!(ee&&!SA(j)||!d)&&(z||ge))return gf.Transition.toString({...d,property:TW})}}function kMe(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}}$n.Down,$n.Right,$n.Up,$n.Left;async function AW({removeEmpty:e=true}={}){const t=await M1({web_location:"0.0",w_webid:await xW()||""}),o=(await Zt.get("/x/relation/tags",{params:t})).data.data||[];return e?o.filter(i=>!!i.count):o}async function q3(e){const n=async l=>(await Zt.get("/x/relation/tag",{params:{mid:Jo(),tagid:e,pn:l,ps:20}})).data.data||[];let r=1,o=[],i=[];do i=await n(r),o=o.concat(i),r++;while(i.length===20);return By(o.map(l=>l.mid))}async function FMe(){return (await Zt.get("/x/polymer/web-dynamic/v1/portal")).data?.data?.up_list||[]}var pi=(e=>(e.Mid="dyn-mid",e.GroupId="dyn-group-id",e.FilterTextFull="dyn-filter-text",e.FilterTextShort="dyn-filter",e.Offset="dyn-offset",e.MinId="dyn-min-id",e.MinTs="dyn-min-ts",e))(pi||{});const Ns=new URLSearchParams(location.search),Ps=Ns.get("dyn-mid")?.trim(),W3=Ns.get("dyn-group-id")?.trim()?Number(Ns.get("dyn-group-id").trim()):void 0,HMe=Ns.get("dyn-offset")||void 0,NW=Ps&&(Ns.get("dyn-filter-text")||Ns.get("dyn-filter"))||void 0,G3=Ps?Ns.get("dyn-min-id"):void 0,L9=G3?Ns.get("dyn-min-ts"):void 0,HA=Os&&(!!Ps||W3!==void 0);let K3,PW,IW;HA&&(Ps?(K3=Ps,PW=Ns.get("dyn-name")??K3?.toString()??void 0):W3!==void 0&&(IW=W3));var _a=(e=>(e.All="all",e.UploadOnly="upload-only",e.DynamicOnly="dynamic-only",e))(_a||{}),fa=(e=>(e.Upload="投稿视频",e.Dynamic="动态视频",e.ChargeOnly="充电专属",e))(fa||{});const VMe={all:"全部","upload-only":"仅投稿视频","dynamic-only":"仅动态视频"};var ou=(e=>(e.All="all",e._5m="5min",e._2m="2min",e._1m="1min",e._30s="30s",e._10s="10s",e))(ou||{});const OW={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}},_p="all",vf="up:",gu="group:",jMe=(await( OH("dynamic-feed:hide-charge-only-videos-for-keys"))).set,UMe=(await( DH("dynamic-feed:add-separators"))).map,Jt=DW();function DW(){return kn({upMid:K3,upName:PW,upFace:void 0,upList:[],upListUpdatedAt:0,groups:[],groupsUpdatedAt:0,selectedGroupId:IW,get selectedGroup(){if(typeof this.selectedGroupId=="number")return this.groups.find(e=>e.tagid===this.selectedGroupId)},dynamicFeedVideoType:"all",filterText:NW??void 0,get viewingAll(){return this.selectedKey===_p},get viewingSomeUp(){return !!this.upMid},get viewingSomeGroup(){return typeof this.selectedGroupId=="number"},get selectedKey(){return this.upMid?`${vf}${this.upMid}`:this.selectedGroupId!==void 0?`${gu}${this.selectedGroupId}`:_p},hideChargeOnlyVideosForKeysSet:jMe,get hideChargeOnlyVideos(){return this.hideChargeOnlyVideosForKeysSet.has(this.selectedKey)},addSeparatorsMap:UMe,get addSeparators(){return this.addSeparatorsMap.get("global")??false},filterMinDuration:"all",get filterMinDurationValue(){return OW[this.filterMinDuration].duration},updateUpList:_W,updateGroups:LW})}kn({followGroupInfo:{}});async function _W(e=false){if(!e&&Jt.upList.length&&Jt.upListUpdatedAt&&Jt.upListUpdatedAt-Date.now()<so("5min"))return;const n=await FMe();Jt.upList=n,Jt.upListUpdatedAt=Date.now();}async function LW(e=false){{const{followGroup:n,whenViewAll:r}=at.dynamicFeed;if(!(n.enabled||!!r.hideIds.filter(i=>i.startsWith(gu)).length))return}!e&&Jt.groups.length&&Jt.groupsUpdatedAt&&Jt.groupsUpdatedAt-Date.now()<so("1h")||(Jt.groups=await AW({removeEmpty:true}),Jt.groupsUpdatedAt=Date.now());}function zW(){if(Jo())return Promise.all([_W(),LW()])}(async()=>Os&&(await pn(5e3),(!Jt.upList.length||!Jt.groups.length)&&(await N1(),zW())))();Ps&&IH(Jt,["upName","filterText","selectedGroup","viewingSomeUp","viewingAll"],({upName:e,filterText:t,selectedGroup:n,viewingSomeUp:r,viewingAll:o})=>{let i=o?"动态":r?`「${e}」的动态`:`「${n?.name}」分组动态`;t&&(i=`🔍【${t}】 - ${i}`),lA(i);});const qMe=Object.prototype.toString,WMe=e=>qMe.call(e)==="[object Error]",GMe=new Set(["network error","Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed","terminated"," A network error occurred.","Network connection lost"]);function KMe(e){if(!(e&&WMe(e)&&e.name==="TypeError"&&typeof e.message=="string"))return false;const{message:n,stack:r}=e;return n==="Load failed"?r===void 0||"__sentry_captured__"in e:n.startsWith("error sending request for url")?true:GMe.has(n)}function YMe(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 Mb(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 XMe 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 QMe(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 z9(e,t){return Number.isFinite(t)?t-(performance.now()-e):t}async function ZMe({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 XMe)throw i.originalError;const a=Number.isFinite(o.retries)?Math.max(0,o.retries-n):o.retries,l=o.maxRetryTime??Number.POSITIVE_INFINITY,u=Object.freeze({error:i,attemptNumber:t,retriesLeft:a,retriesConsumed:n});if(await o.onFailedAttempt(u),z9(r,l)<=0)throw i;const d=await o.shouldConsumeRetry(u),m=z9(r,l);if(m<=0||a<=0)throw i;if(i instanceof TypeError&&!KMe(i)){if(d)throw i;return o.signal?.throwIfAborted(),false}if(!await o.shouldRetry(u))throw i;if(!d)return o.signal?.throwIfAborted(),false;const p=QMe(n,o),g=Math.min(p,m);return o.signal?.throwIfAborted(),g>0&&await new Promise((b,y)=>{const S=()=>{clearTimeout(C),o.signal?.removeEventListener("abort",S),y(o.signal.reason);},C=setTimeout(()=>{o.signal?.removeEventListener("abort",S),b();},g);o.unref&&C.unref?.(),o.signal?.addEventListener("abort",S,{once:true});}),o.signal?.throwIfAborted(),true}async function BW(e,t={}){if(t={...t},YMe(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,Mb("factor",t.factor,{min:0,allowInfinity:false}),Mb("minTimeout",t.minTimeout,{min:0,allowInfinity:false}),Mb("maxTimeout",t.maxTimeout,{min:0,allowInfinity:true}),Mb("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 ZMe({error:i,attemptNumber:n,retriesConsumed:r,startTime:o,options:t})&&r++;}}throw new Error("Retry attempts exhausted without throwing an error.")}var Cs=(e=>(e.Latest="pubdate",e.View="click",e.Fav="stow",e))(Cs||{});const JMe={pubdate:{icon:x(KSe,{}),label:"最新发布"},click:{icon:x(hg,{}),label:"最多播放"},stow:{icon:x(ff,{}),label:"最多收藏"}},eRe=40;async function tRe({mid:e,order:t="pubdate",keyword:n="",pagenum:r=1}){const i=(await Zt.get("/x/space/wbi/arc/search",{params:{mid:e,order:t,keyword:n,ps:eRe,pn:r}})).data;if(!jn(i))throw new Error(`request json error: ${i.message}`||jp);const a=i.data.list.vlist||[],l=i.data.page.count;let u,d;{const{count:m,pn:p,ps:g}=i.data.page;u=p*g<m,d=m-(p-1)*g;}return {items:a,hasMore:u,count:l,endVol:d}}async function nRe(...e){return await BW(()=>tRe(...e),{retries:5,factor:1.5,onFailedAttempt:t=>console.error(t)})}var ka=(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))(ka||{});const Ng=new URLSearchParams(location.search),rRe=Ng.get("space-mid")||void 0,B9=Ng.get("space-group-id")||void 0,oRe=Ng.get("space-search-text")||void 0,iRe=Ng.get("space-filter-text")||void 0,k9=Ng.get("space-initial-page")||void 0,kW=(rRe||"").split(/[,_-]/).map(e=>e.trim()).filter(Boolean).filter(e=>/^\d+$/.test(e)),FW=B9?Number(B9):void 0,Y3=!!kW.length||FW!==void 0,oa=kn({mids:kW,groupId:FW,order:Cs.Latest,searchText:oRe,filterText:iRe,get isMultipleTraget(){return this.mids.length>1||this.groupId!==void 0},get allowedOrders(){return [Cs.Latest,Cs.View,!this.isMultipleTraget&&Cs.Fav].filter(Boolean)},get usingOrder(){return this.allowedOrders.includes(this.order)?this.order:this.allowedOrders[0]}});function Q1(){if(HA)return et.DynamicFeed;if(My)return et.Fav;if(Y3)return et.SpaceUpload;if(X3.get("gate-tab"))return X3.get("gate-tab")}var HW=(e=>(e.MainSwitch="gate",e.Tab="gate-tab",e))(HW||{});const X3=new URL(location.href).searchParams;function aRe(){return X3.has("gate")}function sRe(){const e=new URL(location.href);return e.search="",e.searchParams.set("gate","1"),e.href}const VA=await( sT({value:et.AppRecommend},"video-source-tab"));{const e=Q1();e&&(VA.value=e);}function VW(e){return xM.slice().sort((t,n)=>{let r=e.indexOf(t),o=e.indexOf(n);return r===-1&&(r=Y$.indexOf(t)),o===-1&&(o=Y$.indexOf(n)),r-o})}function jA(e){const{customTabKeysOrder:t}=Ut(e);return f.useMemo(()=>VW(t),[t])}function jW(){const{hidingTabKeys:e,customTabKeysOrder:t}=Ut(),n=oA(),r=f.useMemo(Q1,[]),o=f.useMemo(()=>VW(t).filter(a=>a===et.AppRecommend&&!n?true:!e.includes(a)),[e,t,n]);return r?[r]:o}function lRe(){const e=jW();return f.useMemo(()=>e.map(t=>({key:t,...Zf[t]})),[e])}function Z1(){const e=bt(VA).value,t=jW(),n=oA(),r=et.AppRecommend;return !t.includes(e)||!n&&!Zf[e].anonymousUsage?r:e}function UW(){const e=f.useDeferredValue(Z1()),t=pA(e),n=jA(),r=f.useMemo(()=>t?n.indexOf(e)>n.indexOf(t)?"right":"left":void 0,[n,e]);return {tab:e,prevTab:t,direction:r}}const cRe={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 qW({className:e}){const t=oA(),n=Z1(),r=lRe(),{__internalRecTabRenderAsSegments:o}=Ut(),i=nt(u=>{if(!t&&!Zf[u].anonymousUsage&&!Zj())return gW();VA.value=u;}),a=x(Jr.Group,{optionType:"button",buttonStyle:"solid",size:"middle",value:n,className:X("inline-flex items-center",e),onFocus:u=>{u.target.blur();},onChange:u=>{const d=u.target.value;i(d);},children:r.map(({key:u,label:d})=>x(Jr.Button,{css:cRe,className:"video-source-tab",tabIndex:-1,value:u,children:H("span",{className:"h-full flex items-center line-height-unset",children:[x(yi,{tabKey:u,className:"mr-4px",active:u===n}),d]})},u))});let l;{const u=f.useMemo(()=>r.map(({key:d,label:m})=>({value:d,label:H("div",{className:"flex items-center gap-x-6px",children:[x(yi,{tabKey:d,active:d===n}),m]})})),[r,n]);l=x(qR,{size:"middle",options:u,value:n,onChange:i});}return H("div",{className:"flex-v-center",children:[o?l:a,x(mr,{className:"ml-6px size-16px",children:x(ze,{children:r.map(({key:u,label:d,desc:m,extraHelpInfo:p})=>H(f.Fragment,{children:[H("div",{className:"h-22px flex items-center",children:[x(yi,{tabKey:u,className:"mr-4px",active:true}),d,": ",m]}),!!p&&p]},u))})})]})}function bf(e){return e.api===Je.AppRecommend}function J1(e){return e.api===Je.PcRecommend}function Fd(e){return e.api===Je.DynamicFeed}function WW(e){return e.api===Je.Watchlater}function vu(e){return e.api===Je.Fav}function GW(e){return e.api===Je.Rank}function Lp(e){return e.api===Je.Live}function Q3(e){return e.api===Je.SpaceUpload}async function KW(e,t){const n=Jo(),r=oc(),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:uRe()}),csrf:r}),a=(await Zt.post("/x/relation/modify",o)).data,l=jn(a);return l||rn(a.message||"未知错误"),l}function uRe(){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 dRe=io.extend("service:user:relations:blacklist"),fRe=XW("follow"),mRe=XW("remove"),YW={add:fRe,remove:mRe},{set:qh,replaceAllWith:hRe}=await( OH("blacklist-mids"));function pRe(e){const t=bt(qh);return !!e&&t.has(e)}function XW(e){const t=e==="follow"?5:6;return async function(r){const o=await KW(r,t);if(o){const i=qh;e==="follow"?i.add(r):e==="remove"&&i.delete(r);}return o}}async function gRe(){const t=async a=>{const u=(await Zt.get("/x/relation/blacks",{params:{re_version:0,ps:20,pn:a}})).data;if(!jn(u))return;const d=u.data.total,m=u.data.list.map(p=>p.mid);return {total:d,mids:m}},n=await t(1);if(!n)return;const{total:r,mids:o=[]}=n;let i=o;if(r){const a=Math.ceil(r/20);for(let l=2;l<=a;l++){const{mids:u=[]}=await t(l)||{};i=i.concat(u);}}return i}(async()=>{if(!Os)return;await N1();const e=await gRe();dRe("user blocklist fetched: %o",e),e&&hRe(e.map(t=>t.toString()));})();var mi;(e=>{(t=>{t.Av="DYNAMIC_TYPE_AV",t.Draw="DYNAMIC_TYPE_DRAW",t.PgcUnion="DYNAMIC_TYPE_PGC_UNION",t.UgcSeason="DYNAMIC_TYPE_UGC_SEASON",t.Forward="DYNAMIC_TYPE_FORWARD",t.Article="DYNAMIC_TYPE_ARTICLE",t.LiveRcmd="DYNAMIC_TYPE_LIVE_RCMD";})(e.ItemType||(e.ItemType={})),(t=>{t.Normal="AUTHOR_TYPE_NORMAL",t.Pgc="AUTHOR_TYPE_PGC",t.UgcSeason="AUTHOR_TYPE_UGC_SEASON";})(e.AuthorType||(e.AuthorType={})),(t=>{t.Archive="MAJOR_TYPE_ARCHIVE",t.Opus="MAJOR_TYPE_OPUS",t.Pgc="MAJOR_TYPE_PGC",t.UgcSeason="MAJOR_TYPE_UGC_SEASON",t.LiveRcmd="MAJOR_TYPE_LIVE_RCMD";})(e.MajorType||(e.MajorType={})),(t=>{t.Goods="ADDITIONAL_TYPE_GOODS",t.Reserve="ADDITIONAL_TYPE_RESERVE";})(e.AdditionalType||(e.AdditionalType={}));})(mi||(mi={}));function ch(e){const t=e.modules.module_dynamic.major;if(t?.type==="MAJOR_TYPE_ARCHIVE")return t.archive}const QW=23442827791579n,vRe=2251799813685247n,bRe=1n<<51n,Z3=58n,ZW="FcwAPNKTMug3GV5Lj7EJnHpWsx4tb8haYeviqBz6rkCy12mUSDQX9RdoZf";function UA(e){const t=["B","V","1","0","0","0","0","0","0","0","0","0"];let n=t.length-1,r=(bRe|BigInt(e))^QW;for(;r>0;)t[n]=ZW[Number(r%BigInt(Z3))],r=r/Z3,n-=1;return [t[3],t[9]]=[t[9],t[3]],[t[4],t[7]]=[t[7],t[4]],t.join("")}function yRe(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*Z3+BigInt(ZW.indexOf(o)),0n);return Number(n&vRe^QW)}const SRe=lg(e=>H("svg",{viewBox:"0 0 24 24",fill:"currentColor",...e,children:[x("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"}),x("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"})]})),CRe=lg(e=>H("svg",{viewBox:"0 0 24 24",fill:"currentColor",...e,children:[x("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"}),x("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"}),x("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"}),x("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"}),x("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"})]})),xRe=lg(function(e){return H("svg",{viewBox:"0 0 16 16",fill:"currentColor",...e,children:[x("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"}),x("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"}),x("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 Ny(e){if(!e)return 0;const t=[1,60,360];return e.split(":").map(Number).reverse().reduce((o,i,a)=>o+i*t[a],0)}function Vs(e){return e||=0,Gn.duration(e||0,"seconds").format(e>=3600?"HH:mm:ss":"mm:ss")}function wRe(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 Wc(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 $Re=Gn().format("YYYY");function m0(e,t=false){if(!e)return "";const n=Gn.unix(e),r=t?" HH:mm":"";return n.format("YYYY")===$Re?n.format(`M-D${r}`):n.format(`YY-M-D${r}`)}function ERe(e){const t=Gn().subtract(1,"day").startOf("day").unix();return e>=t}function MRe(e,t){if(!e)return;const n=Gn.unix(e),r=n.format("YYYY-MM-DD")===Gn().format("YYYY-MM-DD"),o=r&&Date.now()-e*1e3<=so("12h"),i=n.format("YYYY-MM-DD")===Gn().subtract(1,"day").format("YYYY-MM-DD"),a=n.format("YYYY")===Gn().format("YYYY");if(o){const l=Gn().diff(n,"minutes"),u=Gn().diff(n,"hours");return l<1?"刚刚":l<60?`${l}分钟前`:`${u}小时前`}return r?n.format("今天 HH:mm"):i?n.format("昨天 HH:mm"):a?n.format("M月D日"):n.format("YYYY年M月D日")}const RRe={1:"橙色通过",0:"开放浏览","-1":"待审","-2":"被打回","-3":"网警锁定","-4":"被锁定","-5":"管理员锁定","-6":"修复待审","-7":"暂缓审核","-8":"补档待审","-9":"等待转码","-10":"延迟审核","-11":"视频源待修","-12":"转储失败","-13":"允许评论待审","-14":"临时回收站","-15":"分发中","-16":"转码失败","-20":"创建未提交","-30":"创建已提交","-40":"定时发布","-100":"用户删除"};function TRe(e){if(e!==void 0&&!(e>=0))return RRe[e]}const ARe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("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"})]}),NRe=f.forwardRef(ARe),PRe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("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"})]}),IRe=f.forwardRef(PRe),ORe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[x("path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0m6 0h6m-6 3h6M9 8l3 4.5"}),x("path",{d:"m15 8l-3 4.5V17"})]})]}),DRe=f.forwardRef(ORe),_Re=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,children:[x("path",{d:"M24 36c11.046 0 20-12 20-12s-8.954-12-20-12S4 24 4 24s8.954 12 20 12Z"}),x("path",{d:"M24 29a5 5 0 1 0 0-10a5 5 0 0 0 0 10Z"})]})]}),LRe=f.forwardRef(_Re),zRe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m3 20l1.3-3.9C1.976 12.663 2.874 8.228 6.4 5.726c3.526-2.501 8.59-2.296 11.845.48c3.255 2.777 3.695 7.266 1.029 10.501S11.659 20.922 7.7 19z"})]}),BRe=f.forwardRef(zRe),kRe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[x("path",{d:"m15 14l4-4l-4-4"}),x("path",{d:"M19 10H8a4 4 0 1 0 0 8h1"})]})]}),FRe=f.forwardRef(kRe);const F9="size-18px",Pc="size-16px",HRe={play:x(SRe,{className:F9}),danmaku:x(CRe,{className:F9}),like:x(NRe,{className:Pc}),"bangumi:follow":x(IRe,{className:Pc}),favorite:x(ff,{className:Pc}),coin:x(DRe,{className:Pc}),"live:viewed-by":x(LRe,{className:Pc}),"dynamic-feed:comment":x(BRe,{className:Pc}),"dynamic-feed:forward":x(FRe,{className:Pc})},VRe=f.memo(function({field:e,value:t}){const n=f.useMemo(()=>typeof t=="number"||t&&/^\d+$/.test(t)?wRe(Number(t))??l_:t??l_,[t]),r=HRe[e];return H("span",{"data-field":e,className:"bili-video-card__stats--item gap-x-2px mr-0!",children:[r,x("span",{className:X("bili-video-card__stats--text line-height-18px"),children:n})]})});var xs=(e=>(e.AV="av",e.Ad="ad",e.Live="live",e))(xs||{});function jRe(e){const{major:t,additional:n}=e.modules.module_dynamic;if(n?.type===mi.AdditionalType.Goods)return true;if(t?.type===mi.MajorType.Opus){const r=t.opus.title||"";if(["B站密令","大红包"].some(o=>r.includes(o)))return true}return false}function JW(e){if(jRe(e))return;const t=e.modules.module_dynamic.major;if(!t)return;const n=e.modules.module_author,r=e.modules.module_dynamic.additional,o=t.type,i={authorName:n.name,authorFace:n.face,authorMid:n.mid.toString(),followed:n.following,pubts:n.pub_ts,statItems:[{field:"like",value:e.modules.module_stat.like.count},{field:"dynamic-feed:comment",value:e.modules.module_stat.comment.count},{field:"dynamic-feed:forward",value:e.modules.module_stat.forward.count}],recommendReason:n.pub_action};if(o===mi.MajorType.Archive&&t.archive){const a=t.archive;return {...i,avid:a.aid,bvid:a.bvid,goto:"av",href:`/video/${a.bvid}/`,title:a.title,cover:a.cover,duration:Ny(a.duration_text)||0,durationStr:a.duration_text,recommendReason:a.badge.text===fa.Upload?a.badge.text:void 0,topMarkIcon:a.badge.text===fa.Upload?void 0:a.badge.icon_url??void 0,topMarkText:a.badge.text===fa.Upload?void 0:a.badge.text,statItems:[{field:"play",value:a.stat.play},{field:"danmaku",value:a.stat.danmaku}],play:Wc(a.stat.play),danmaku:Wc(a.stat.danmaku)}}if(o===mi.MajorType.Opus&&t.opus){const{opus:a}=t,l=!!a.pics?.length,u=r?.type===mi.AdditionalType.Reserve,d=u&&/直播预告/.test(r.reserve.title),m=(()=>{if(d)return "直播预告";if(u)return r.reserve.title?.split(":")[0]||"预约";if(e.type===mi.ItemType.Draw)return l?"图片":"文字动态";if(e.type===mi.ItemType.Article)return "专栏"})();return {...i,goto:"opus",href:a.jump_url,cover:a.pics?.[0]?.url,title:a.title||a.summary?.text||"",topMarkText:m}}if(o===mi.MajorType.Pgc&&t.pgc){const{pgc:a}=t;return {...i,cover:a.cover,goto:"bangumi",href:a.jump_url,title:a.title,statItems:[{field:"play",value:a.stat.play},{field:"danmaku",value:a.stat.danmaku}],topMarkText:n.label,pubts:n.pub_ts,pubdateDisplay:n.pub_time}}if(o===mi.MajorType.UgcSeason&&t.ugc_season){const{ugc_season:a}=t;return {...i,bvid:a.bvid,avid:a.aid.toString(),goto:"av",duration:Ny(a.duration_text),durationStr:a.duration_text,cover:a.cover,href:`/video/${a.bvid}/`,title:a.title,statItems:[{field:"play",value:a.stat.play},{field:"danmaku",value:a.stat.danmaku}],play:Wc(a.stat.play),danmaku:Wc(a.stat.danmaku),recommendReason:n.pub_action,topMarkText:"合集",authorMid:void 0}}}var eG=function(e){return function(t,n,r){return e(t,n,r)*r}},J3=function(e,t){if(e)throw Error("Invalid sort config: "+t)},tG=function(e){var t=e||{},n=t.asc,r=t.desc,o=n?1:-1,i=n||r;J3(!i,"Expected `asc` or `desc` property"),J3(n&&r,"Ambiguous object with `asc` and `desc` config properties");var a=e.comparer&&eG(e.comparer);return {order:o,sortBy:i,comparer:a}},URe=function(e){return function t(n,r,o,i,a,l,u){var d,m;if(typeof n=="string")d=l[n],m=u[n];else if(typeof n=="function")d=n(l),m=n(u);else {var p=tG(n);return t(p.sortBy,r,o,p.order,p.comparer||e,l,u)}var g=a(d,m,i);return (g===0||d==null&&m==null)&&r.length>o?t(r[o],r,o+1,i,a,l,u):g}};function nG(e,t,n){if(e===void 0||e===true)return function(i,a){return t(i,a,n)};if(typeof e=="string")return J3(e.includes("."),"String syntax not allowed for nested properties."),function(i,a){return t(i[e],a[e],n)};if(typeof e=="function")return function(i,a){return t(e(i),e(a),n)};if(Array.isArray(e)){var r=URe(t);return function(i,a){return r(e[0],e,1,n,t,i,a)}}var o=tG(e);return nG(o.sortBy,o.comparer||t,o.order)}var b$=function(e,t,n,r){var o;return Array.isArray(t)?(Array.isArray(n)&&n.length<2&&(o=n,n=o[0]),t.sort(nG(n,r,e))):t};function rG(e){var t=eG(e.comparer);return function(n){var r=Array.isArray(n)&&!e.inPlaceSorting?n.slice():n;return {asc:function(o){return b$(1,r,o,t)},desc:function(o){return b$(-1,r,o,t)},by:function(o){return b$(1,r,o,t)}}}}var oG=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},iG=rG({comparer:oG});rG({comparer:oG,inPlaceSorting:true});function eM(e,t,n){if(t.length!==n.length)throw new Error("props & orders length not match");const r=t.map((o,i)=>{const a=n[i];return a==="asc"?{asc:o}:a==="desc"?{desc:o}:{asc:o,comparer:a}});return iG(e).by(r)}function Py(e,t){const n=t.map(({order:r,prop:o})=>r==="asc"?{asc:o}:r==="desc"?{desc:o}:{asc:o,comparer:r});return iG(e).by(n)}function qA(e){return e.replace(/([A-Z])/,"999999$1").replace(/([a-z])/,"999998$1")}function WA(e,t){return e.localeCompare(t,"zh-CN")}function H9(e,t){return Py(e,[{prop:n=>{const r=typeof t=="function"?t(n):n[t];return qA(r)},order:WA}])}function qRe(e){throw new Error(`Unexpected object: ${e}`)}function WRe(e){return e=e.replace(new RegExp("^[\\s\\p{RGI_Emoji}]+","v"),""),e=qA(e),e}function aG(e,t){const n={prop:i=>AA(i.attr)?1:0,order:"desc"},r={prop:i=>WRe(i.title),order:WA},o={prop:"media_count",order:"desc"};if(t==="default")return e;if(t==="name")return Py(e,[n,r]);if(t==="count")return Py(e,[n,o,r]);qRe(t);}function sG(e){return x(qR,{size:"middle",options:[{label:"默认",value:"default"},{label:"名称",value:"name"},{label:"数量",value:"count"}],...e})}const lG=x(Hl,{className:"[&.ant-divider-horizontal.ant-divider-with-text]:my-5px [&.ant-divider-horizontal.ant-divider-with-text]:text-14px",children:"底线"});function GA(e){const{enableSidebar:t}=Ut(),{usingTwoColumnMode:n}=zq(),r=bt(qo).subtab,{insideModal:o}=Xi();return f.useMemo(()=>!t||o&&n?false:e===et.DynamicFeed?!Ps:e===et.Hot?r===fr.Rank:e===et.Fav,[e,t,r,o,n])}function cG(e,t){const n=f.useRef(null),r=nt(a=>{if(a||=t,!a)return;const l=n.current?.menu?.findItem({key:a});if(l)return l.scrollIntoViewIfNeeded?l.scrollIntoViewIfNeeded():l.scrollIntoView(),true}),o=f.useRef(false),i=nt(()=>{if(o.current)return;r()&&(o.current=true);});return ro(()=>i()),As(()=>i(),[e]),{menuRef:n,revealSelected:r}}const Hn=kn({multiSelecting:false,selectedIdSet:Er(),shiftMultiSelectAnchorUniqId:void 0});function GRe(){const{multiSelecting:e}=bt(Hn);return e}function KRe(e){const{multiSelecting:t,selectedIdSet:n}=bt(Hn);return t&&!!e&&n.has(e)}const Iy=[];function Is(){return Iy.at(-1)?.items??[]}function YRe(e){const t=Iy.at(-1);t&&(t.items=e);}function XRe(){ro(()=>(Iy.push({items:[]}),()=>{Iy.pop();}));}function eS(){const{multiSelecting:e,selectedIdSet:t}=Hn;return e?Is().filter(n=>t.has(n.uniqId)):[]}function QRe(){return eS().map(Jf)}function KA(){const{multiSelecting:e}=Hn;let t=e?eS():Is();return e&&!t.length&&(t=Is()),t.map(Jf).toReversed()}function YA(){const t=KA().map(n=>n.bvid).join(" ");nu(t,1);}function XA(e){let{bvid:t,authorName:n,pubts:r,title:o}=e;const i=Gn.unix(r??0).format("YYYY-MM-DD");return o=o.replaceAll(/\n+/g," "),`${t} ;; [${n}] ${i} ${o}`}function QA(){const t=KA().map(XA).join(`
`);nu(t,1);}function ZRe(){const t=QRe().map(n=>{let r=n.href;if(r)return r.startsWith("/")&&(r=new URL(r,location.href).href),r}).filter(Boolean).join(`
`);nu(t);}function JRe(e,t){const{multiSelecting:n,selectedIdSet:r}=Hn;if(!n||!e||!t||e===t)return;const o=Is(),i=o.findIndex(g=>g.uniqId===e),a=o.findIndex(g=>g.uniqId===t),l=g=>g>=0&&g<=o.length-1;if(!l(i)||!l(a))return;const u=[i,a],[d,m]=eM(u,[g=>g],["asc"]),p=r.has(e);for(let g=d;g<=m;g++){const b=Is()[g].uniqId;p?r.add(b):r.delete(b);}}const eTe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 16 16",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("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"})]}),tTe=f.forwardRef(eTe),nTe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 16 16",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("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"})]}),rTe=f.forwardRef(nTe),oTe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"currentColor",d:"M6.99 11L3 15l3.99 4v-3H14v-2H6.99zM21 9l-3.99-4v3H10v2h7.01v3z"})]}),iTe=f.forwardRef(oTe),aTe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 512 512",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("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"})]}),sTe=f.forwardRef(aTe);function uG({iconOnly:e,addCopyActions:t=false}){const{multiSelecting:n}=bt(Hn),r=qf(),o=nt(()=>{Hn.multiSelecting||(Hn.shiftMultiSelectAnchorUniqId=void 0,at.multiSelect.clearWhenExit&&Hn.selectedIdSet.clear());}),i=H(ut,{type:n?"primary":"default",className:X(e?"icon-only-round-button":"inline-flex-center"),onClick:()=>{Hn.multiSelecting=!Hn.multiSelecting,o();},children:[x(tTe,{className:"size-12px"}),!e&&H(ze,{children:["多选",Hn.multiSelecting?"中":""]})]}),a=l=>x(Zo,{styles:{container:{border:`1px solid ${r}`}},content:H("div",{className:"max-w-288px",children:[H("div",{className:"flex items-start gap-x-6px",children:[x(_j,{className:"mt-1 size-14px"}),H("div",{className:"flex-1 break-all",children:["使用 ",x("kbd",{className:X(du,"mx-1"),children:"Shift"})," 键扩选: 切换选中状态后, 按住"," ",x("kbd",{className:X(du,"mx-1"),children:"Shift"}),"键再选择区间终点, 整个区间会与起点选中状态同步."]})]}),x(Hl,{variant:"solid",className:"my-7px"}),H("div",{className:"flex flex-wrap items-center gap-x-15px gap-y-2px",children:[H(ut,{className:"inline-flex items-center",onClick:()=>Hn.selectedIdSet.clear(),children:[x(Vf,{className:"size-18px"}),"清空"]}),H(ut,{className:"inline-flex items-center",onClick:()=>{const u=Is().map(d=>d.uniqId);Hn.selectedIdSet=Er(u);},children:[x(rTe,{className:"size-18px"}),"全选"]}),H(ut,{className:"inline-flex items-center",onClick:()=>{const u=Is().filter(d=>!Hn.selectedIdSet.has(d.uniqId)).map(d=>d.uniqId);Hn.selectedIdSet=Er(u);},children:[x(iTe,{className:"size-18px"}),"反选"]}),x("div",{className:"flex-basis-100%"}),H(ut,{className:"inline-flex items-center",onClick:()=>{Hn.multiSelecting=false,o();},children:[x(sTe,{className:"size-18px"}),"退出"]}),x(Pt,{configPath:"multiSelect.clearWhenExit",label:"退出时清空",tooltip:"退出多选时, 清空所有已选择项"})]}),t&&H(ze,{children:[x(Hl,{variant:"solid",className:"my-7px"}),x("div",{className:"flex flex-wrap gap-x-10px gap-y-5px",children:x(dG,{showCopyBvidInfo:true})})]})]}),children:l});return n?a(i):e?x(gn,{title:"多选",arrow:false,children:i}):i}const lTe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[H("path",{strokeDasharray:20,d:"M12 4h2v6h2.5l-4.5 4.5M12 4h-2v6h-2.5l4.5 4.5",children:[x("animate",{attributeName:"d",dur:"1.5s",keyTimes:"0;0.5;1",repeatCount:"indefinite",values:"M12 4h2v6h2.5l-4.5 4.5M12 4h-2v6h-2.5l4.5 4.5;M12 4h2v3h2.5l-4.5 4.5M12 4h-2v3h-2.5l4.5 4.5;M12 4h2v6h2.5l-4.5 4.5M12 4h-2v6h-2.5l4.5 4.5"}),x("animate",{fill:"freeze",attributeName:"stroke-dashoffset",dur:"0.5s",values:"20;0"})]}),x("path",{strokeDasharray:14,strokeDashoffset:14,d:"M6 19h12",children:x("animate",{fill:"freeze",attributeName:"stroke-dashoffset",begin:"0.5s",dur:"0.2s",to:0})})]})]}),cTe=f.forwardRef(lTe);function dG({showCopyBvidInfo:e}){const{__internalEnableCopyBvidInfo:t}=Ut();return H(ze,{children:[H(ut,{onClick:YA,className:"inline-flex-center",children:[x(tu,{})," 复制 BVID"]}),(e??t)&&H(ut,{onClick:QA,className:"inline-flex-center",children:[x(tu,{})," 复制 BVID 信息"]})]})}function Pg(){const{__internalAddTabbarCopyBvidButton:e}=Ut();return e?x("div",{className:"flex items-center gap-x-2",children:H(Do,{theme:{components:{Button:{paddingInline:6}}},children:[x(uTe,{}),x(uG,{iconOnly:false}),x(dG,{})]})}):null}function uTe(){const e=f.useMemo(fG,[]),{recSharedEmitter:t}=Xi(),n=ga(()=>t.emit("load-to-end"),{manual:true});return e&&H(ut,{className:"flex items-center gap-x-1",loading:n.loading,onClick:()=>n.run(),children:[!n.loading&&x(cTe,{className:"size-18px"}),"加载全部"]})}function fG(){const e=Q1();return !!e&&[et.DynamicFeed,et.SpaceUpload].includes(e)}const mG={overscrollBehavior:"contain",maxHeight:"60vh",overflowY:"scroll",scrollbarWidth:"thin",paddingRight:"12px"},dTe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 5h.01M3 12h.01M3 19h.01M8 5h13M8 12h13M8 19h13"})]}),fTe=f.forwardRef(dTe),mTe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[x("rect",{width:8,height:5,x:14,y:17,rx:1}),x("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"}),x("path",{d:"M20 17v-2a2 2 0 1 0-4 0v2"})]})]}),hTe=f.forwardRef(mTe),pTe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("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"})]}),gTe=f.forwardRef(pTe),vTe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 512 512",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("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"}),x("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"})]}),bTe=f.forwardRef(vTe),hG=fTe,ZA=hTe,JA=gTe,tS=bTe,V9=aT({sidebarFavFolderOrder:"default"},"fav-rec-service:view");function pG(e,t){const{folders:n,collections:r,selectedKey:o}=bt(mn),{sidebarFavFolderOrder:i}=bt(V9),a=Co();return {menuItems:f.useMemo(()=>{let u;{let m=n,p;e==="sidebarView"&&(p=x(sG,{value:i,onChange:b=>V9.sidebarFavFolderOrder=b,className:"ml-4"}),m=aG(n,i));const g=m.map(b=>{AA(b.attr);const y=U1(b.attr),S=`fav-folder:${b.id}`,C=y?x(ZA,{}):x(JA,{}),w=`${b.title} (${b.media_count})`;return {key:S,icon:C,label:w,async onClick(){mn.selectedFavFolderId=b.id,mn.selectedFavCollectionId=void 0,t?.(),await pn(100),a();}}});u=!!m.length&&{type:"group",label:H("div",{className:"flex items-center justify-between line-height-snug",children:["收藏夹",p]}),children:g};}let d;{const m=_X(r,b=>b.upper.name);let p=Object.entries(m).map(([b,y])=>({upName:b,collections:H9(y,"title")}));p=H9(p,"upName");const g=[];for(const{upName:b,collections:y}of p){const S=y[0]?.upper.mid,C=S?Tg(S):"#";g.push(...gi([{type:"group",label:H("span",{className:"flex items-center gap-x-2px",children:[x(No,{className:"mt-2px size-15px flex-none"}),H("a",{target:"_blank",href:C,children:["@",b]})]}),children:y.map(w=>{const $=`fav-collection:${w.id}`,M=H("span",{className:"ml-8px flex items-center gap-x-2px",children:[x(tS,{className:"size-15px flex-none"}),w.title," (",w.media_count,")"]});return {key:$,label:M,title:`${w.title} (${w.media_count})`,async onClick(){mn.selectedFavFolderId=void 0,mn.selectedFavCollectionId=w.id,t?.(),await pn(100),a();}}})}]));}d=!!r.length&&{type:"group",label:"合集",children:g};}return gi([{key:"all",icon:x(hG,{}),label:"全部",async onClick(){mn.selectedFavFolderId=void 0,mn.selectedFavCollectionId=void 0,t?.(),await pn(100),a();}},u,d])},[n,r,e,i,a]),selectedKey:o}}function yTe({extraContent:e}){const{fav:t,enableSidebar:n}=Ut(),{selectedFavFolder:r,selectedFavCollection:o,selectedLabel:i,selectedKey:a}=bt(mn),l=Co(),{ref:u,getPopupContainer:d}=Mu();ro(()=>{DA();}),As(()=>{(async()=>(await pn(100),l()))();},[t.addSeparator]);const[m,p]=f.useState(false),{menuItems:g}=pG("tabbarView",()=>{p(false);}),b="relative top-[-0.5px] size-15px",y=r?U1(r.attr)?x(ZA,{className:b}):x(JA,{className:b}):o?x(tS,{className:b}):x(hG,{className:b}),S=i,C=x(tc,{open:m,onOpenChange:p,placement:"bottomLeft",getPopupContainer:d,menu:{items:g,style:{...mG,border:`1px solid ${qf()}`},selectedKeys:[a]},children:x(ut,{css:[m&&Uf,"",""],children:H("span",{className:"h-full flex items-center gap-x-4px",children:[y,S]})})});return H("div",{ref:u,className:"flex items-center gap-x-10px",children:[!n&&C,e,x(Pg,{})]})}function STe({allFavFolderServices:e,state:t}){const{fav:n}=Ut(),r=Co(),{ref:o,getPopupContainer:i}=Mu(),{totalCountInFavFolders:a}=bt(t),[l,u]=f.useState(false),d=nt((g,b,y)=>{u(true),at.fav.excludedFolderIds=g.map(S=>S.toString());}),m=f.useMemo(()=>e.filter(g=>!n.excludedFolderIds.includes(g.entry.id.toString())).length,[e,n.excludedFolderIds]),p=nt(g=>{g?u(false):l&&r();});return x(Zo,{getTooltipContainer:i,trigger:"click",placement:"bottom",onOpenChange:p,getPopupContainer:g=>g.parentElement||document.body,content:x(ze,{children:x(b1,{dataSource:e,rowKey:g=>g.entry.id.toString(),titles:["收藏夹","忽略"],targetKeys:n.excludedFolderIds,onChange:d,render:g=>g.entry.title,oneWay:true,style:{marginBottom:10}})}),children:H(go,{ref:o,color:"success",className:"mx-0 cursor-pointer text-size-12px",children:["收藏夹(",m,") 收藏(",a,")"]})})}function CTe(){const{menuItems:e,selectedKey:t}=pG("sidebarView"),{menuRef:n}=cG(e,t);return H(ze,{children:[x(ec,{ref:n,items:e,selectedKeys:[t],mode:"inline",inlineIndent:10}),lG]})}var La=(e=>(e[e.Offline=0]="Offline",e[e.Streaming=1]="Streaming",e[e.Rolling=2]="Rolling",e))(La||{});class e6 extends Map{#n=0;#e=new Map;#t=new Map;#o;#a;#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.#a=t.maxAge||Number.POSITIVE_INFINITY,this.#i=t.onEviction;}get __oldCache(){return this.#t}#s(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.#s(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.#a}={}){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.#s(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.#s(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.#a}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 xTe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("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"})]}),wTe=f.forwardRef(xTe);function $Te(e){return e instanceof Error&&e.name==="AxiosError"}function uh(e){return e&&x("p",{className:"mt-10px",children:e})}function gG(e){if(!(e&&e instanceof Error))return uh(JSON.stringify(e));const t=!!e.message&&H(ze,{children:["Error Message: ",e.message]}),n=!!e.stack&&H(ze,{children:["Error Stack: ",x("br",{}),e.stack]});let r,o;if(e.cause&&(r=H(ze,{children:["Error Cause: ",gG(e.cause)]})),$Te(e)){const i=Zd(e);i.config?.params?.access_key&&(i.config.params.access_key="*".repeat(i.config.params.access_key.length)),o=H(ze,{children:["axios config: ",JSON.stringify(i.config,null,2)]});}return H(ze,{children:[uh(t),uh(n),uh(r),uh(o)]})}function ETe(e){return e&&e instanceof vG&&e.message||e&&e instanceof nA?e.message:"出错了, 请刷新重试!"}class vG extends Error{constructor(t){super(t),this.name="ShowMessageError";}}function MTe({err:e,tab:t}){const n=G1(),r=f.useMemo(()=>ETe(e),[e]),o=f.useMemo(()=>gG(e),[e]);return H("div",{className:"flex flex-col items-center gap-y-0.5em p-20px text-center text-size-20px",children:[x(gn,{title:H("div",{className:"py-10px",children:[x("h3",{children:"错误详情"}),x("div",{className:"max-h-50vh overflow-hidden overflow-y-auto whitespace-pre-wrap break-normal",children:o})]}),children:H("p",{className:"flex cursor-pointer items-center justify-center",children:[x(wTe,{className:"mr-4px"}),r]})}),t===et.Hot&&qo.subtab===fr.PopularWeekly&&H("p",{className:"mt-8px flex items-center justify-center",children:["可能需手动输入验证码",x(No,{className:"ml-12px"}),x("a",{href:"https://www.bilibili.com/v/popular/weekly",target:n,className:"ml-2px",children:"每周必看"})]}),t===et.Liked&&e instanceof nA&&x(MA,{className:"mt-0.5em"})]})}function bG(e){const t=e==="follow"?1:2;return async function(r){return await KW(r,t)}}const RTe=bG("follow"),TTe=bG("unfollow"),ATe={follow:RTe,unfollow:TTe};function NTe(e){return [1,2,6].includes(e.attribute)}async function PTe(e){return (await Zt.get("/x/relation",{params:{fid:e}})).data.data}const ITe=tA(PTe,{cacheKey:([e])=>e.toString()});function OTe(e){return !!(e.elec_arc_type===1||!e.elec_arc_type&&e.is_charging_arc||e.elec_arc_type===2)}function DTe(){const{searchText:e,filterText:t}=bt(oa,{sync:true}),{allowedOrders:n,usingOrder:r}=bt(oa),{spaceUpload:{useSyncFilterTextFromSearchText:o}}=Ut(),i=Co(),{recSharedEmitter:a}=Xi(),l=nt(()=>{u();const{searchText:d,filterText:m}=oa,p=location.href,g=new URL(p);d?g.searchParams.set(ka.SearchText,d):g.searchParams.delete(ka.SearchText),m?g.searchParams.set(ka.FilterText,m):g.searchParams.delete(ka.FilterText),g.href!==p&&history.replaceState({},"",g.href);}),u=nt(()=>{at.spaceUpload.useSyncFilterTextFromSearchText&&(oa.filterText=oa.searchText);});return ro(l),H("div",{className:"flex items-center gap-x-10px",children:[x(PA,{value:r,list:n,listDisplayConfig:JMe,onChange:d=>{oa.order=d,i();}}),x(Yi.Search,{style:{width:200},placeholder:"搜索词",allowClear:true,value:e,onChange:d=>oa.searchText=d.target.value,onSearch:d=>{oa.searchText=d,l(),i();}}),H(Xr.Compact,{children:[x(Xr.Addon,{children:x(gn,{title:x(ze,{children:"精准搜索: 自动将搜索词同步到过滤词"}),children:x(Pt,{className:"[&>.ant-checkbox-label]:hidden",configPath:"spaceUpload.useSyncFilterTextFromSearchText",extraAction:d=>{d&&(l(),i());}})})}),x(Yi.Search,{style:{width:200},placeholder:"本地过滤词",allowClear:true,value:t,disabled:o,onChange:d=>oa.filterText=d.target.value,onSearch:d=>{oa.filterText=d,l(),i();}})]}),x(Pt,{configPath:"spaceUpload.showVol",label:"显示序号",className:"flex-none"}),x(Pg,{})]})}const yG=new e6({maxSize:100}),Oy=Er();async function _Te(e){if(Oy.has(e))return;const t=await ITe(e);NTe(t)&&Oy.add(e);}function SG(){const e=eo(oa);return {mids:e.mids,groupId:e.groupId,order:e.usingOrder,searchText:e.searchText,filterText:e.filterText,initialPage:k9?Number(k9):void 0}}class t6 extends Hs{constructor(t){if(super(t6.PAGE_SIZE),this.config=t,Object.assign(this,t),this.mids=t.mids,this.order=t.order,qi(this.mids.length||this.groupId!==void 0,"mid & groupId can not both be empty"),this.searchText=this.searchText?.trim(),this.initialPage&&(this.groupId!==void 0||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=x(DTe,{});get hasMoreExceptQueue(){return this.service?this.service.hasMore:true}async fetchAvatars(t){await Promise.all(t.map(async n=>{const r=await FA(n);r&&yG.set(n,r.face);}));}async fetchFollowState(t){await Vl(t,_Te,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 Vl(this.mids,Ag,3)).map(i=>i?.trim()).filter(Boolean).map(i=>`「${i}」`).join("、");else {const i=(await AW()).find(a=>a.tagid===this.groupId)?.name||"";n=i?`「${i}」`:"";}const r=[t.join(""),`${n}的投稿`].map(o=>o.trim()).filter(Boolean).join(" - ");lA(r),this.pageTitleSet=true;}singleUpService;mergeTimelineService;async setupServices(){if(!(this.singleUpService||this.mergeTimelineService)){if(this.mids.length===1){this.singleUpService=new CG(this.mids[0],this.order,this.searchText,this.initialPage);return}if(this.mids.length){this.mergeTimelineService=new j9(this.mids,this.order,this.searchText);return}if(this.groupId!==void 0){const t=await q3(this.groupId);if(t.forEach(n=>Oy.add(n)),!t.length)throw new Error("Group is Empty!");this.mergeTimelineService=new j9(t.map(n=>n.toString()),this.order,this.searchText);return}}}get service(){return this.singleUpService||this.mergeTimelineService}warnNeedLoginOnce=Sf(gW);async fetchMore(t){if(!Zj())throw this.warnNeedLoginOnce(),new vG(pW);this.setPageTitle(),await this.setupServices(),qi(this.service,"this.service should exist 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,a)=>({...i,api:Je.SpaceUpload,uniqId:`${Je.SpaceUpload}:${i.bvid}`,groupId:this.groupId,vol:r-a,page:this.singleUpService?this.singleUpService.page-1:void 0}));if(o=o.filter(i=>!OTe(i)),this.filterText){const{includes:i,excludes:a}=hW(this.filterText);o=o.filter(l=>i.every(u=>l.title.includes(u))&&a.every(u=>!l.title.includes(u)));}{const i=By(o.filter(a=>a.author.trim()!=="账号已注销")).map(a=>a.mid).filter(Boolean);await Promise.all([this.fetchAvatars(i),this.fetchFollowState(i)]);}return o}}class j9{constructor(t,n,r){this.mids=t,this.order=n,this.searchText=r,qi(this.mids.length===1||this.mids.length>1&&this.order!==Cs.Fav,"SpaceUploadItem.Fav not supported when merging"),this.singleUpServices=t.map(o=>new CG(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 Vl(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(l=>l.bufferQueue.length>0),i=Ss(o.map(l=>{const u=l.bufferQueue[0],d={[Cs.Latest]:u.created,[Cs.View]:u.play,[Cs.Fav]:u.play}[this.order];return {service:l,item:u,valueForSort:d}}),["valueForSort"],["desc"]).map(l=>l.service)[0];if(!i)break;const a=i.bufferQueue[0];i.bufferQueue=i.bufferQueue.slice(1),n.push(a);}return n}}class CG{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 nRe({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 U9=e=>(e||"").replace(/^http:\/\//,"https://"),n6="·";function LTe(e,t){const n=e.api,r=t[n];return r(e)}function zTe(){const t=new WeakMap;return t.clear??=OL,t.size=0,t}const Jf=UX(e=>{const t=LTe(e,{[Je.AppRecommend]:BTe,[Je.PcRecommend]:FTe,[Je.DynamicFeed]:HTe,[Je.Watchlater]:VTe,[Je.Fav]:jTe,[Je.PopularGeneral]:UTe,[Je.PopularWeekly]:qTe,[Je.Rank]:WTe,[Je.Live]:GTe,[Je.SpaceUpload]:KTe,[Je.Liked]:YTe});return t.authorFace&&(t.authorFace=U9(t.authorFace)),t.cover&&(t.cover=U9(t.cover)),t},{cache:zTe(),getCacheKey:e=>e});function BTe(e){return kTe(e)}function kTe(e){const t=C=>{const{cover_left_text_1:w,cover_left_text_2:$,cover_left_text_3:M}=e,T=[w,$,M].filter(Boolean);if(C==="play"){const R=T.find(N=>/观看|播放$/.test(N));if(!R)return;const I=R.replace(/观看|播放$/,"");return Wc(I)}if(C==="danmaku"){const R=T.find(N=>N.endsWith("弹幕"));if(!R)return;const I=R.replace(/弹幕$/,"");return Wc(I)}if(C==="bangumi:follow"){const R=T.find(N=>/追[剧番]$/.test(N));if(!R)return;const I=R.replace(/追[剧番]$/,"");return Wc(I)}},n=e.param,r=e.bvid||UA(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 Ko("bangumi uri should not starts with 'bilibili://': %s",e.uri),e.uri;if(e.goto==="picture"){const C=/^bilibili:\/\/article\/(\d+)$/.exec(e.uri)?.[1];return C?`/read/cv${C}`:e.uri}return e.uri})(),a=t("play"),l=void 0,u=void 0,d=t("danmaku"),m=void 0,p=t("bangumi:follow"),g=[{field:"play",value:a},typeof d=="number"?{field:"danmaku",value:d}:{field:"bangumi:follow",value:p}],b=e.desc||"",[y=void 0,S=void 0]=b.split(n6);return {avid:n,bvid:r,cid:o,goto:e.goto,href:i,title:e.title,cover:e.cover,pubts:void 0,pubdateDisplay:S,duration:e.player_args?.duration||0,durationStr:Vs(e.player_args?.duration),recommendReason:e.bottom_rcmd_reason||e.top_rcmd_reason,play:a,like:l,coin:u,danmaku:d,favorite:m,bangumiFollow:p,statItems:g,authorName:e.args.up_name||y,authorFace:e.avatar.cover,authorMid:String(e.args.up_id||""),appBadge:e.cover_badge,appBadgeDesc:e.desc}}function FTe(e){e.goto,xs.AV;const t=e.goto===xs.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:Vs(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 HTe(e){return JW(e)}function VTe(e){const t=TRe(e.state),n=e.progress>0,r=`${n?"【已观看】· ":""}${e.title}`,o=t?x(gn,{title:H(ze,{children:["视频已失效, 原因: ",t]}),align:{offset:[0,-5]},placement:"topLeft",children:H("del",{children:[n?"【已观看】· ":"",e.title,"`"]})}):void 0,{watchlaterUseNormalVideoUrl:i,watchlaterItemsOrder:a}=yg(),l=(()=>{if(i)return `https://www.bilibili.com/video/${e.bvid}/`;let u=`https://www.bilibili.com/list/watchlater?bvid=${e.bvid}&oid=${e.aid}`;return a===vo.AddTimeAsc&&(u+="&desc=0"),u})();return {avid:String(e.aid),bvid:e.bvid,cid:e.cid,goto:"av",href:l,title:r,titleRender:o,cover:e.pic,pubts:e.pubdate,pubdateDisplayForTitleAttr:`${m0(e.pubdate,true)} 发布, ${m0(e.add_at,true)} 添加稍后再看`,duration:e.duration,durationStr:Vs(e.duration),recommendReason:`${m0(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 jTe(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"?U1(e.folder.attr)?x(ZA,{className:X("size-15px",r),style:n}):x(JA,{className:X("size-15px",r),style:n}):x(tS,{className:X("size-15px",r),style:n});return {avid:String(e.id),bvid:e.bvid,goto:"av",href:`/video/${e.bvid}/`,title:`【${t}】· ${e.title}`,titleRender:H(ze,{children:["【",o,t,"】· ",e.title]}),cover:e.cover,pubts:e.pubtime,duration:e.duration,durationStr:Vs(e.duration),recommendReason:e.from==="fav-folder"?`${m0(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 UTe(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:Vs(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 qTe(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:Vs(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 WTe(e){if(S3e(e)||y3e(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:Vs(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 GTe(e){const t=`${e.area_name_v2}`,n=e.live_status===La.Streaming?"":`${n6}${o(e.record_live_time)} 直播过`,r="https://s1.hdslb.com/bfs/static/blive/blfe-link-center/static/img/average-backimg.e65973e.png";function o(i){const a=Gn().format("YYYYMMDD"),l=Gn().subtract(1,"day").format("YYYYMMDD"),u=Gn.unix(i);return u.format("YYYYMMDD")===a?u.format("HH:mm"):u.format("YYYYMMDD")===l?`昨天 ${u.format("HH:mm")}`:u.format("MM-DD HH:mm")}return {goto:"live",href:`https://live.bilibili.com/${e.roomid}`,title:e.title,cover:e.room_cover||r,recommendReason:t,liveExtraDesc:n,statItems:[{field:"live:viewed-by",value:e.text_small}],authorName:e.uname,authorFace:e.face,authorMid:String(e.uid)}}function KTe(e){const t=Ny(e.length),n=Vs(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:yG.get(e.mid),authorMid:e.mid.toString(),followed:Oy.has(e.mid)}}function YTe(e){const{videoDetail:t}=e,n=e.param,r=UA(Number(n));return {avid:n,bvid:r,cid:void 0,goto:"av",href:`/video/${r}/`,title:e.title,cover:e.cover,pubts:t?.pubdate??e.ctime,duration:e.duration,durationStr:Vs(e.duration),recommendReason:void 0,play:e.play,danmaku:e.danmaku,like:void 0,coin:void 0,favorite:void 0,statItems:[{field:"play",value:e.play},{field:"danmaku",value:e.danmaku}],authorName:e.author,authorFace:t?.owner.face,authorMid:t?.owner.mid?.toString()}}const ra=io.extend("modules:filter");function r6(e){return !!e&&["已关注","新关注"].includes(e)}function xG(e){return [Je.AppRecommend,Je.PcRecommend,Je.Rank,Je.PopularGeneral,Je.PopularWeekly].includes(e)}function tM(e,t){if(!at.filter.enabled&&!qh.size)return e;const n=yg().filter,{minDuration:r,minPlayCount:o,minDanmakuCount:i,byAuthor:a,byTitle:l,dfByTitle:u,dfHideOpusMids:d}=n,{blockUpMids:m,blockUpNames:p}=U3(a.keywords),{test:g}=_9(l.keywords),{test:b}=_9(u.keywords),{blockUpMids:y}=U3(d.keywords);return e.filter(S=>{if(S.api===Je.Separator)return true;const{play:C,duration:w,danmaku:$,recommendReason:M,goto:T,authorName:R,authorMid:I,title:N,bvid:P,href:O}=Jf(S),_=r6(M);if(t==="keep-follow-only"&&!_)return false;function L(){if(I&&qh.size&&qh.has(I))return ra("filter out by blacklist-rule: %s %o",I,{bvid:P,title:N}),false;if(n.enabled&&a.enabled&&(m.size||p.size)&&(R||I)&&(R&&p.has(R)||I&&m.has(I)))return ra("filter out by author-rule: %o",{authorName:R,authorMid:I,rules:a.keywords,blockUpMids:m,blockUpNames:p,bvid:P,title:N}),false;let V=[N];if(S.api===Je.Rank&&zA(S)&&S.desc&&V.push(S.desc),V=V.filter(Boolean),n.enabled&&l.enabled&&l.keywords.length&&V.length&&V.some(g))return ra("filter out by title-rule: %o",{possibleTitles:V,rules:l.keywords,bvid:P}),false}if(xG(S.api)&&L()===false)return false;if((S.api===Je.AppRecommend||S.api===Je.PcRecommend)&&n.enabled){const V=T==="av",B=T==="picture",F=T==="bangumi";if(V)return j();if(B)return U();if(F)return q()}function j(){return _&&n.exemptForFollowed.video?true:M==="关注了你"?(ra("filter out by recommendReason-rule: %s %o",M,{bvid:P,title:N}),false):r.enabled&&r.value&&w&&w<r.value?(ra("filter out by min-duration-rule: %s < %s %o",w,r.value,{bvid:P,title:N}),false):o.enabled&&o.value&&typeof C=="number"&&C<o.value?(ra("filter out by min-play-count-rule: %s < %s, %o",C,o.value,{bvid:P,title:N}),false):i.enabled&&i.value&&typeof $=="number"&&$<i.value?(ra("filter out by min-danmaku-count-rule: %s < %s, %o",$,i.value,{bvid:P,title:N}),false):true}function U(){return n.hideGotoTypePicture?_&&n.exemptForFollowed.picture?true:(ra("filter out by goto-type-picture-rule: %s %o",T,{bvid:P,title:N}),false):true}function q(){return n.hideGotoTypeBangumi?(ra("filter out by goto-type-bangumi-rule: %s %o",T,{title:N,href:O}),false):true}if(Fd(S)&&n.enabled){const{major:V}=S.modules.module_dynamic,B=V?.type===mi.MajorType.Opus;if(at.filter.dfByTitle.enabled&&at.filter.dfByTitle.keywords.length){let F=[N];if(B&&F.push(V.opus.summary?.text||""),F=By(F.filter(Boolean)),F.some(b))return ra("filter out by df-title-rule: %o",{possibleTitles:F,rules:u.keywords,uniqId:S.uniqId,item:S}),false}if(B&&d.enabled&&d.keywords.length&&I&&y.has(I))return ra("filter out by df-hide-opus-mids-rule: %o",{dfHideOpusMids:d,authorMid:I,title:N,uniqId:S.uniqId}),false}return true})}async function XTe(e){return (await Zt.get("https://api.live.bilibili.com/xlive/web-ucenter/user/following",{params:{page:e,page_size:Ig.PAGE_SIZE,ignoreRecord:1,hit_ab:true}})).data}class Ig extends Hs{constructor(t=false){super(Ig.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 XTe(this.page);jn(n)||(rn(n.message||wf),this.hasMoreExceptQueue=false),this.page++;const{count:r,live_count:o,totalPage:i}=n.data;this.totalPage=i,this.liveCount=o;const a=n.data.list.map(m=>({...m,api:Je.Live,uniqId:`${Je.Live}:${m.roomid}`})),l=a.at(-1),u=Gn().subtract(2,"weeks").unix();if(l){const m=l.live_status,p=l.record_live_time;m!==La.Streaming&&p&&p<u&&(this.hasMoreExceptQueue=false);}let d=a;if(!this.streamingOnly&&!this.separatorAdded&&a.some(m=>m.live_status!==La.Streaming)){this.separatorAdded=true;const m=a.findIndex(p=>p.live_status!==La.Streaming);d.splice(m,0,{api:Je.Separator,uniqId:`${Je.Live}:separator:recent`,content:"最近直播过"});}return this.streamingOnly&&a.some(m=>m.live_status!==La.Streaming)&&(this.hasMoreExceptQueue=false,d=a.filter(m=>m.live_status===La.Streaming)),d}}const QTe=io.extend("modules:rec-services:dynamic-feed:api");async function Og({videoOnly:e,offset:t,page:n,upMid:r,abortSignal:o}){const i={timezone_offset:"-480",type:e?"video":"all",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:n};t&&(i.offset=t);const a="/x/polymer/web-dynamic/v1/feed/all";r&&(i.host_mid=r);const u=(await Zt.get(a,{signal:o,params:i})).data;if(!jn(u)){const m=u.message||wf;throw rn(m),new Error(m,{cause:u})}const d=u.data;return d?.items?.length&&(d.items=d.items.filter(m=>{const p=!!JW(m);return p||QTe("dynamic-feed filter out: %o",{type:m.type,majorType:m.modules.module_dynamic.major?.type,additionalType:m.modules.module_dynamic.additional?.type,item:m}),p})),d}const Dy=Qf("dynamic-feed-items"),Dg=Qf("dynamic-feed-items-info");async function nS(e){return !!(await Dg.get(e))?.count}function ZTe(e,t){const n=a=>`update-filter-cache:${a}`,o=Gl((a,l)=>{ua.info({icon:x(dT,{className:"size-16px"}),key:n(e),title:"过滤缓存更新中...",description:`「${t}」更新中: Page(${a}) Total(${l})`,duration:false});},200);return {notifyOnProgress:o,notifyOnSuccess:()=>{o.flush(),ua.success({key:n(e),title:"缓存更新成功",description:`「${t}」的过滤缓存更新成功`,duration:false});}}}async function JTe(e,t){await nS(e)?await wG(e):await tAe(e,void 0,t);}async function eAe(e,t=false){const n=await Dg.get(e);if(!(!t&&n&&n.count&&n.updatedAt&&Date.now()-n.updatedAt<60*1e3))return wG(e)}async function wG(e){if(!await nS(e))return;const t=await Dy.get(e)||[],n=new Set(t.map(u=>u.id_str));let r=1,o="",i=true,a=[];for(;i;){const u=await Og({upMid:e,page:r,offset:o,videoOnly:true}),d=u.items;a=[...a,...d],o=u.offset,i=u.has_more,r++,i&&n.size&&d.every(p=>n.has(p.id_str))&&(i=false);}const l=Wl([...a,...t],u=>u.id_str);await Dy.set(e,l),await Dg.set(e,{count:l.length,updatedAt:Date.now()});}const y$=Qf("dynamic-feed-items-in-progress");async function tAe(e,t=false,n){const r=t?void 0:await y$.get(e);let o=r?.page??1,i=r?.offset??"",a=r?.items??[],l=true;for(;l;){const d=await Og({upMid:e,page:o,offset:i,videoOnly:true}),m=d.items;a=[...a,...m],i=d.offset,l=d.has_more,o++,await y$.set(e,{page:o,offset:i,items:a}),n?.(o,a.length);}const u=Wl(a,d=>d.id_str);await Dy.set(e,u),await Dg.set(e,{count:u.length,updatedAt:Date.now()}),await y$.delete(e);}const $G=Ru({fn:Og,generateKey:({upMid:e,videoOnly:t})=>`upMid=${e}&videoOnly=${t}`,tableName:"dynamic-feed-newest-items",ttl:300*1e3});class nAe{constructor(t,n,r=false){this.upMid=t,this.videoOnly=n,this.enableHeadCache=r;}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?$G:Og)({videoOnly:this.videoOnly,upMid:this.upMid,page:this.page,offset:this.offset});return this.offset=r.offset,this.hasMoreForApi=r.has_more,this.page++,ma(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 ws{constructor(t,n){this.upMids=t,this.videoOnly=n;const r=t.length>ws.ENABLE_HEAD_CACHE_UPMID_COUNT_THRESHOLD;this.upServices=t.map(o=>new nAe(o,n,r));}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 Vl(this.upServices,a=>a.fillQueue(1,t),5);},r=[],o=10;for(;this.hasMore&&r.length<o;){await n();const i=this.upServices.filter(u=>u.hasMore),a=Ss(i.map(u=>{const d=u.bufferQueue[0],m=BigInt(d.id_str);return {service:u,item:d,id:m}}),["id"],["desc"]).map(u=>u.service)[0];if(!a)break;const l=a.bufferQueue[0];a.bufferQueue=a.bufferQueue.slice(1),r.push(l);}return r}}function po(e,t,n){const r=nt(n);f.useEffect(()=>(e.on(t,r),()=>{e.off(t,r);}),[e,t,r]);}function rAe(){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 oAe=!pg&&await( rAe());function o6(e){return `${e}@96w_96h_1c_1s_!web-avatar${oAe?".avif":".webp"}`}function q9(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>t(true),n.onerror=()=>t(false);})}function iAe({externalFilterInput:e,onRefresh:t,getPopupContainer:n}){const{upMid:r,dynamicFeedVideoType:o,filterMinDuration:i,filterText:a,hideChargeOnlyVideos:l}=bt(Jt),u=x(Yi.Search,{style:{width:e?"250px":void 0},placeholder:"按标题关键字过滤",type:"search",autoCorrect:"off",autoCapitalize:"off",name:`filterText_${r}`,variant:"outlined",defaultValue:Jt.filterText,autoComplete:"off",allowClear:true,onChange:S=>{lAe({filterText:S.target.value,upMid:r,onRefresh:t});},onSearch:async S=>{Jt.filterText=S||void 0,await pn(100),t();}}),d=x(aAe,{externalFilterInput:e,filterInput:u,refresh:t}),[m,p]=f.useState(false),g=p,b=f.useMemo(()=>!!(o!==_a.All||l||a||i!==ou.All),[o,l,a,i]),y=x(Zo,{open:m,onOpenChange:g,arrow:false,placement:"bottomLeft",getPopupContainer:n,content:d,styles:{container:{border:`1px solid ${qf()}`}},children:x(l1,{dot:b,color:xa,offset:[-5,5],children:x(ut,{className:"icon-only-round-button",css:m&&Uf,children:x(Op,{className:"ml-1px"})})})});return {filterInput:u,popoverContent:d,popoverTrigger:y}}const Gr={wrapper:"max-w-350px",section:"mt-10px min-w-300px first:mt-0px",sectionTilte:"flex items-center pb-2px pl-2px text-20px",sectionContent:"flex flex-col items-start gap-x-10px gap-y-6px"};function aAe({externalFilterInput:e,filterInput:t,refresh:n}){const{viewingSomeUp:r,selectedGroup:o,viewingSomeGroup:i,selectedKey:a,dynamicFeedVideoType:l,filterMinDuration:u,hideChargeOnlyVideos:d,addSeparators:m,filterText:p}=bt(Jt);let g;{const b=HA&&!!p,y=p===NW,{href:S}=f.useMemo(()=>{const C=new URL(location.href);return C.searchParams.has(pi.FilterTextFull)?C.searchParams.set(pi.FilterTextFull,p||""):C.searchParams.has(pi.FilterTextShort)?C.searchParams.set(pi.FilterTextShort,p||""):C.searchParams.set(pi.FilterTextFull,p||""),{href:C.href,path:`${C.pathname}?${C.search}`}},[p]);g=b&&x(gn,{title:S,children:H(ut,{disabled:y,href:S,children:["转到过滤词为「",p||"空","」的链接"]})});}return H("div",{className:Gr.wrapper,children:[H("div",{className:Gr.section,children:[H("div",{className:Gr.sectionTilte,children:["视频类型",H(mr,{children:["「",fa.ChargeOnly,"」在此程序中归类为「投稿视频」",x("br",{}),"「动态视频」时长通常较短"]})]}),x("div",{children:x(Jr.Group,{buttonStyle:"solid",value:l,onChange:async b=>{Jt.dynamicFeedVideoType=b.target.value,await pn(100),n?.();},children:Object.values(_a).map(b=>x(Jr.Button,{value:b,children:VMe[b]},b))})})]}),l!==_a.DynamicOnly&&H("div",{className:Gr.section,children:[x("div",{className:Gr.sectionTilte,children:"充电专属"}),x("div",{className:Gr.sectionContent,children:x(Ki,{className:"ml-5px",checked:d,onChange:async b=>{const y=b.target.checked,S=Jt.hideChargeOnlyVideosForKeysSet;y?S.add(a):S.delete(a),await pn(100),n?.();},children:x(gn,{title:H(ze,{children:["隐藏「",fa.ChargeOnly,"」视频 ",x("br",{}),"仅对当前 UP 或 分组生效"]}),children:H("span",{style:{userSelect:"none"},children:["隐藏「",fa.ChargeOnly,"」"]})})})})]}),H("div",{className:Gr.section,children:[x("div",{className:Gr.sectionTilte,children:"最短时长"}),x("div",{children:x(Jr.Group,{className:"overflow-hidden [&_.ant-radio-button-wrapper]:px-10px",buttonStyle:"solid",value:u,onChange:async b=>{Jt.filterMinDuration=b.target.value,await pn(100),n?.();},children:Object.values(ou).map(b=>{const{label:y}=OW[b];return x(Jr.Button,{value:b,children:y},b)})})})]}),(!e||g)&&H("div",{className:Gr.section,children:[x("div",{className:Gr.sectionTilte,children:"过滤"}),H("div",{className:Gr.sectionContent,children:[!e&&t,g]})]}),x(sAe,{}),H("div",{className:Gr.section,children:[H("div",{className:Gr.sectionTilte,children:[i?"分组":r?"UP":"全部",H(mr,{children:["当前",i?"分组":r?"UP":"范围","的一些操作~"]}),i&&o&&H("span",{className:"ml-15px inline-flex items-center text-size-14px",children:["(",H("a",{href:SW(o?.tagid||""),target:"_blank",className:`mx-4px inline-flex items-center text-size-16px ${SU}`,children:[x(No,{className:"mr-2px size-18px"}),o?.name]}),")"]})]}),H("div",{className:Gr.sectionContent,children:[x(Ki,{checked:m,onChange:async b=>{Jt.addSeparatorsMap.set("global",b.target.checked),await pn(100),n?.();},children:x(gn,{title:H(ze,{children:["添加今日/更早分割线 ",x("br",{}),"当前实现为全局共享此设置"]}),children:"添加分割线"})}),i&&!!o&&x(cAe,{followGroup:o,refresh:n})]})]})]})}function sAe(){const{cacheAllItemsEntry:e,cacheAllItemsUpMids:t}=Ut().dynamicFeed.__internal,{viewingSomeUp:n,upMid:r,upName:o}=bt(Jt),i=ga(async(u,d)=>{const{notifyOnProgress:m,notifyOnSuccess:p}=ZTe(u,d);await JTe(u,m),p();},{manual:true}),a=f.useMemo(()=>!!r&&t.includes(r.toString()),[r,t]),l=f.useCallback(async u=>{if(!r)return;const m=u.target.checked?{add:[r]}:{remove:[r]};await Ua("dynamicFeed.__internal.cacheAllItemsUpMids",m);},[]);return x(ze,{children:e&&n&&r&&o&&H("div",{className:Gr.section,children:[H("div",{className:Gr.sectionTilte,children:["过滤缓存",H(mr,{children:["开启过滤缓存后, 会加载并缓存 UP 所有的动态 ",x("br",{}),"当本地有缓存且总条数 <= 5000时, 过滤框成为及时过滤, 无需点击过滤按钮"]})]}),H("div",{className:Gr.sectionContent,children:[H("div",{className:"flex flex-wrap items-center gap-x-10px gap-y-3px",children:[x(Ki,{className:"inline-flex items-center",checked:a,onChange:l,children:x(gn,{title:"只有开启此项, 过滤时才会使用缓存",children:H("span",{children:["为「",o,"」开启"]})})}),x(ut,{loading:i.loading,onClick:async()=>{await i.runAsync(r,o);},children:"更新缓存"})]}),x(Pt,{configPath:"dynamicFeed.advancedFilter",label:"使用高级过滤",tooltip:mW})]})]})})}const lAe=Gl(async function({filterText:e,upMid:t,onRefresh:n}){if(!t||!(e||!e&&Jt.filterText)||!at.dynamicFeed.__internal.cacheAllItemsEntry||!at.dynamicFeed.__internal.cacheAllItemsUpMids.includes(t.toString())||!await nS(t))return;const r=await Dg.get(t);!r||!r.count||r.count>=5e3||(Jt.filterText=e,await pn(0),n());},100);function EG(){return H(ze,{children:[x("p",{children:"机制介绍:"}),H("ul",{className:"text-13px",children:[H("li",{className:"flex items-start gap-x-10px",children:[x("div",{children:"「从全部过滤」:"}),x("div",{children:'基于全部动态 + 分组UP过滤, 速度可能巨慢, 且过滤后的数量取决于B站记录的"全部"动态范围'})]}),H("li",{className:"flex items-start gap-x-10px",children:[x("div",{children:"「拼接时间线」:"}),H("div",{children:["可以理解为: 去看一遍分组所有 UP 的动态, 然后将它们拼接起来 ",x("br",{}),"启动慢, 但可以加载所有动态; 且分组 UP 越多, 启动越慢 ",x("br",{}),"默认分组 UP 数量不超过 ",ws.ENABLE_MERGE_TIMELINE_UPMID_COUNT_THRESHOLD," ","时会使用「拼接时间线」 ",x("br",{}),"详见",x("a",{className:"mx-5px",href:"https://magicdawn.fun/2024/12/01/bilibili-gate-dynamic-feed-merge-timeline/",target:"_blank",children:"介绍博客"})]})]})]})]})}function cAe({followGroup:e,refresh:t}){const{whenViewAll:n}=bt(at.dynamicFeed),r=e.count;let o;const i=W9(e.tagid,"dynamicFeed.followGroup.forceUseMergeTimelineIds");{const{checked:u,onChange:d}=i,m=r<=ws.ENABLE_MERGE_TIMELINE_UPMID_COUNT_THRESHOLD;o=x(Ki,{checked:u,onChange:p=>{d(p),t?.();},disabled:m,children:x(gn,{title:H(ze,{children:[x(EG,{}),m&&H("p",{className:"text-yellow-400 italic",children:["当前分组 UP 数量: ",r,", 无需设置"]})]}),children:"分组动态: 强制使用「拼接时间线」"})});}let a;a=(r<=ws.ENABLE_MERGE_TIMELINE_UPMID_COUNT_THRESHOLD||i.checked)&&r>ws.ENABLE_HEAD_CACHE_UPMID_COUNT_THRESHOLD&&x(gn,{title:H(ze,{children:["当分组 UP 数量"," > ",ws.ENABLE_HEAD_CACHE_UPMID_COUNT_THRESHOLD,"时, 「拼接时间线」功能会缓存每个 UP 的最新动态5分钟. ",x("br",{}),"这里可以手动清除缓存"]}),children:x(ut,{onClick:()=>{$G.cache.db.clear(),Ot.success("已清除缓存");},children:"清除「拼接时间线」- 队头缓存"})});let l;{const{checked:u,onChange:d}=W9(`${gu}${e.tagid}`,"dynamicFeed.whenViewAll.hideIds");l=n.enableHideSomeContents&&x(Ki,{checked:u,onChange:d,children:x(gn,{title:H(ze,{children:["在「全部」动态中隐藏来自此 ",e.name," 的动态"]}),children:"在「全部」动态中隐藏来自此分组的动态"})});}return H(ze,{children:[l,o,a]})}function W9(e,t){const n=iU(t),r=f.useMemo(()=>n.includes(e),[n]),o=nt(async a=>{await Ua(t,a?{add:[e]}:{remove:[e]});}),i=f.useCallback(a=>{o(a.target.checked);},[]);return {checked:r,setChecked:o,onChange:i}}function uAe(e){if(Object.assign(Jt,e),e.upMid){const t=Jt.upList.find(n=>n.mid.toString()===e.upMid);t&&(t.has_update=false);}}const S$={upMid:void 0,upName:void 0,upFace:void 0,filterText:void 0,selectedGroupId:void 0,dynamicFeedVideoType:_a.All,filterMinDuration:ou.All};function MG(e){const{upList:t,groups:n,selectedKey:r}=bt(Jt),o=Co(),{followGroup:{enabled:i}}=Ut().dynamicFeed,{recSharedEmitter:a}=Xi(),l=nt(async m=>{uAe(m),await pn(100),o();}),u=nt(()=>{l({...S$}),a.emit("dynamic-feed:clear");});return {menuItems:f.useMemo(()=>{const m={key:"all",icon:x(Yc,{size:"small",children:"全"}),label:"全部",title:"全部",onClick:u};let p=[];i&&(p=n.map(y=>({key:`group:${y.tagid}`,icon:x(Yc,{size:"small",children:y.name[0]||"组"}),label:`${y.name} (${y.count})`,title:`${y.name} (${y.count})`,onClick:()=>l({...S$,selectedGroupId:y.tagid})})));let g=t;e==="dropdown"&&(g=Py(t,[{prop:y=>y.has_update?1:0,order:"desc"},{prop:y=>qA(y.uname),order:WA}]));const b=g.map(y=>{let S=x(Yc,{size:"small",src:o6(y.face)});return y.has_update&&(S=x(l1,{dot:true,children:S})),{key:`up:${y.mid}`,icon:S,label:x("span",{title:y.uname,className:"block max-w-130px overflow-hidden text-ellipsis whitespace-nowrap",children:y.uname}),title:y.uname,onClick(){l({...S$,upMid:y.mid.toString(),upName:y.uname,upFace:y.face});}}});return [m,...p,...b]},[t,i,n,e]),selectedKey:r,onClear:u,onSelect:l}}function dAe(){const{dynamicFeed:{__internal:{externalFilterInput:e}}}=Ut(),{viewingSomeUp:t,upName:n,upFace:r,selectedGroup:o}=bt(Jt),i=Co(),{ref:a,getPopupContainer:l}=Mu(),u=GA(et.DynamicFeed),{menuItems:d,selectedKey:m,onClear:p}=MG("dropdown");ro(()=>{zW();});const g=o?.count,b=x(bW,{className:"mt--2px size-14px"}),y=r?x(Yc,{size:20,src:o6(r)}):void 0,S=t?y||b:o?x(yW,{className:"size-18px"}):void 0,C=t?n:o?o.name+(g?` (${g})`:""):"全部",[w,$]=f.useState(false),M=x(tc,{open:w,onOpenChange:$,placement:"bottomLeft",getPopupContainer:l,menu:{items:d,style:{...mG,border:`1px solid ${qf()}`},selectedKeys:[m]},children:x(ut,{icon:S,className:"gap-4px",css:[w&&Uf,"",""],children:C})}),{popoverTrigger:T,filterInput:R}=iAe({externalFilterInput:e,onRefresh:i,getPopupContainer:l});return H("div",{ref:a,className:"inline-flex items-center gap-x-8px",children:[!u&&M,u?H(ut,{onClick:p,className:"gap-0",disabled:!(t||o),children:[x(gy,{className:"mr-5px size-14px"}),x("span",{children:"清除"})]}):(t||o)&&H(ut,{onClick:p,className:"gap-0",children:[x(gy,{className:"mr-5px size-14px"}),x("span",{children:"清除"})]}),T,e&&R,x(Pg,{})]})}function fAe(){const e=GA(et.DynamicFeed),{menuItems:t,selectedKey:n}=MG("sidebar"),{menuRef:r,revealSelected:o}=cG(t,n),{recSharedEmitter:i}=Xi();if(po(i,"dynamic-feed:clear",()=>{o(_p);}),!!e)return H(ze,{children:[x(ec,{ref:r,items:t,selectedKeys:[n],mode:"inline",inlineIndent:10}),lG]})}function i6(e=Jt){const t=eo(e);return {upMid:t.upMid,groupId:t.selectedGroupId,filterText:t.filterText,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:at.dynamicFeed.showLive,videoOnly:at.dynamicFeed.videoOnly,whenViewAllEnableHideSomeContents:at.dynamicFeed.whenViewAll.enableHideSomeContents,whenViewAllHideIds:new Set(at.dynamicFeed.whenViewAll.hideIds),advancedFilter:at.dynamicFeed.advancedFilter,filterCacheEnabled:!!t.upMid&&at.dynamicFeed.__internal.cacheAllItemsEntry&&at.dynamicFeed.__internal.cacheAllItemsUpMids.includes(t.upMid.toString()),forceUseMergeTime:!!t.selectedGroup&&at.dynamicFeed.followGroup.forceUseMergeTimelineIds.includes(t.selectedGroup.tagid),startingOffset:HMe,minId:G9(G3)?BigInt(G3):void 0,minTs:G9(L9)?Number(L9):void 0}}function G9(e){return !!e&&/^\d+$/.test(e)}const mAe=io.extend("modules:rec-services:dynamic-feed");class rS extends Hs{constructor(t){super(rS.PAGE_SIZE),this.config=t,this.config.showLiveInDynamicFeed&&!this.upMid&&this.groupId===void 0&&!this.filterText&&this.dynamicFeedVideoType===_a.All&&this.filterMinDuration===ou.All&&(this.liveRecService=new Ig(true)),this.config.startingOffset&&(this.offset=this.config.startingOffset);}static PAGE_SIZE=15;tabbarView=x(dAe,{});sidebarView=x(fAe,{});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.filterText||this.dynamicFeedVideoType===_a.DynamicOnly||this.filterMinDuration!==ou.All)}get upMid(){return this.config.upMid}get groupId(){return this.config.groupId}get filterText(){return this.config.filterText}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<=ws.ENABLE_MERGE_TIMELINE_UPMID_COUNT_THRESHOLD}groupMergeTimelineService;groupMids=new Set;groupMidsLoaded=false;async loadGroupMids(){if(this.groupId!==void 0&&!this.groupMidsLoaded)try{const t=await q3(this.groupId);this.groupMids=new Set(t),this.shouldEnableMergeTimeline(t.length)&&(this.groupMergeTimelineService=new ws(t.map(n=>n.toString()),this.config.videoOnly));}finally{this.groupMidsLoaded=true;}}get viewingAll(){return this.config.viewingAll}viewingAllHideMids=new Set;viewingAllHideMidsLoaded=false;async loadViewingAllHideMids(){if(!this.viewingAll||!this.config.whenViewAllEnableHideSomeContents||!this.config.whenViewAllHideIds.size||this.viewingAllHideMidsLoaded)return;const t=Array.from(this.config.whenViewAllHideIds).filter(i=>i.startsWith(vf)).map(i=>i.slice(vf.length)),n=Array.from(this.config.whenViewAllHideIds).filter(i=>i.startsWith(gu)).map(i=>i.slice(gu.length)),r=this.viewingAllHideMids;t.forEach(i=>r.add(i)),(await Vl(n,i=>q3(i),3)).flat().forEach(i=>r.add(i.toString())),this.viewingAllHideMidsLoaded=true;}async fetchMore(t){const n=await this._fetchMore(t);return this.handleAddSeparators(n)}liveRecService;_queueForFilterCache;offset="";page=0;async _fetchMore(t){if(this.liveRecService?.hasMore)return (await this.liveRecService.loadMore(t)||[]).filter(p=>p.api!==Je.Separator);let n;this.viewingSomeGroup&&await this.loadGroupMids(),this.viewingAll&&(await this.loadViewingAllHideMids(),mAe("viewingAll: hide-mids = %o",this.viewingAllHideMids));const r=!!(this.upMid&&this.filterText&&this.config.filterCacheEnabled&&await nS(this.upMid)),o=r&&this.config.advancedFilter,i=o?hW((this.filterText||"").toLowerCase()):void 0;if(r)this._queueForFilterCache||(await eAe(this.upMid),this._queueForFilterCache=new q1(20),this._queueForFilterCache.bufferQueue=(await Dy.get(this.upMid)||[]).filter(m=>{const p=ch(m);if(!p)return false;const g=p.title;return l({filterText:this.filterText,title:g,useAdvancedFilter:o,useAdvancedFilterParsed:i})})),n=this._queueForFilterCache.sliceFromQueue(this.page+1)||[],this.page++,this.hasMoreExceptQueue=!!this._queueForFilterCache.bufferQueue.length;else if(this.viewingSomeGroup&&this.groupMergeTimelineService)n=await this.groupMergeTimelineService.loadMore(t);else {const m=await Og({videoOnly:this.config.videoOnly,abortSignal:t,page:this.page+1,offset:this.offset,upMid:this.upMid});if(this.page++,this.hasMoreExceptQueue=m.has_more,this.offset=m.offset,n=m.items,this.config.minId){const p=this.config.minId,g=n.findIndex(b=>BigInt(b.id_str)<=p);g!==-1&&(this.hasMoreExceptQueue=false,n=n.slice(0,g+1));}if(this.config.minTs){const p=this.config.minTs,g=n.findIndex(b=>b.modules.module_author.pub_ts<=p);g!==-1&&(this.hasMoreExceptQueue=false,n=n.slice(0,g+1));}}const a=n.filter(m=>{if(!this.viewingSomeGroup||this.groupMergeTimelineService||!this.groupMids.size)return true;const p=m.modules.module_author.mid;return this.groupMids.has(p)}).filter(m=>{if(this.dynamicFeedVideoType===_a.All)return true;const p=ch(m);if(!p)return false;const g=p.badge.text;return this.dynamicFeedVideoType===_a.DynamicOnly?g===fa.Dynamic:this.dynamicFeedVideoType===_a.UploadOnly?g===fa.Upload||g===fa.ChargeOnly:false}).filter(m=>{if(!this.hideChargeOnlyVideos)return true;const p=ch(m);return p?!(p.badge.text===fa.ChargeOnly):true}).filter(m=>{if(this.filterMinDuration===ou.All)return true;const p=ch(m);return p?Ny(p.duration_text)>=this.filterMinDurationValue:false}).filter(m=>{if(!this.filterText)return true;const p=ch(m);if(!p)return false;const g=p.title||"";return l({filterText:this.filterText,title:g,useAdvancedFilter:o,useAdvancedFilterParsed:i})}).filter(m=>{if(this.config.selectedKey!==_p)return true;const p=this.viewingAllHideMids;if(!p.size)return true;const g=m.modules.module_author.mid;return !p.has(g.toString())}).map(m=>({...m,api:Je.DynamicFeed,uniqId:`${Je.DynamicFeed}:${m.id_str||crypto.randomUUID()}`,groupId:this.viewingSomeGroup?this.groupId:void 0}));function l({title:m,filterText:p,useAdvancedFilter:g,useAdvancedFilterParsed:b}){return m=m.toLowerCase(),p=p.toLowerCase(),g?(b?.includes??[]).every(C=>m.includes(C))&&(b?.excludes??[]).every(C=>!m.includes(C)):m.includes(p)}const{upMid:u,upName:d}=Jt;if(Ps&&u&&d&&d===u.toString()&&a[0]){const m=a[0].modules.module_author.name,p=a[0].modules.module_author.face;Jt.upName=m,Jt.upFace=p;}if(this.viewingSomeGroup&&Jt.groups.length){const m=Jt.groups.find(p=>p.tagid===this.groupId);m&&(m.count=this.groupMids.size);}return a}separatorsConfig={today:{added:false,content:"今日",getInsertIndex:hAe},earlier:{added:false,content:"更早",getInsertIndex:RG(-1/0,Gn().startOf("day").unix())}};handleAddSeparators(t){if(!this.config.addSeparators)return t;const n=t;{const r=this.separatorsConfig.today,{getInsertIndex:o,content:i,added:a}=r;if(!a){const l=o(t);l!==-1&&(n.splice(l,0,{api:Je.Separator,uniqId:`${Je.DynamicFeed}:separator:today`,content:i}),r.added=true);}}{const r=this.separatorsConfig.earlier,{getInsertIndex:o,content:i,added:a}=r;if(!a){const l=o(t);l!==-1&&(n.splice(l,0,{api:Je.Separator,uniqId:`${Je.DynamicFeed}:separator:earlier`,content:i}),r.added=true);}}return n}}function RG(e,t){return n=>n.findIndex(r=>{if(r.api!==Je.DynamicFeed)return false;const o=r.modules.module_author.pub_ts;return o>=e&&o<t})}function hAe(e){const t=e.findIndex(r=>r.api===Je.Live&&r.live_status===La.Streaming);return t!==-1?t:RG(Gn().startOf("day").unix(),Gn().endOf("day").unix())(e)}const $s=20,Wh="ml-30px inline-flex items-center text-15px [&_svg]:mr-5px [&_svg]:mt--1px first:ml-0";class TG{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:Je.Separator,uniqId:`${Je.Fav}:collection:separator:${this.collectionId}`,content:x(pAe,{service:this})}}state=kn({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 JEe(this.collectionId,1),o=r?.medias||[],i=r?.info;await Hp(()=>this.loadUserAvatarFromSpaceAccInfo(o,t));let a=o.map(u=>({...u,api:Je.Fav,uniqId:`${Je.Fav}:collection:${this.collectionId}:${u.bvid}`,collection:r.info,from:"fav-collection"}));[It.PubTimeDesc,It.PubTimeAsc,It.Shuffle].includes(this.itemsOrder)&&(a=j3(a,It.PubTimeDesc),a.forEach((u,d,m)=>{u.vol=m.length-d,u.volTooltip=H(ze,{children:["按投稿时间 Vol.",u.vol]});})),a=j3(a,this.itemsOrder),this.bufferQueue=a,this.loaded=true,this.state.firstBvid=a[0]?.bvid,this.state.info=Zd(i),mn.selectedFavCollectionDetailInfo=Zd(i);}this.itemsOrder===It.Shuffle&&(this.bufferQueue=Si(this.bufferQueue));let n;return [n,this.bufferQueue]=[this.bufferQueue.slice(0,$s),this.bufferQueue.slice($s)],n}async loadUserAvatarFromSpaceAccInfo(t,n){if(!t.length)return;const r=DX(t,a=>a.upper.mid),o=Object.entries(r).map(([a,l])=>({mid:a,count:l})),i=Ss(o,[a=>a.count],["desc"]).slice(0,3).map(a=>a.mid);await Promise.all(i.map(async a=>{if(n?.aborted)return;const u=(await FA(a))?.face;u&&t.filter(d=>d.upper.mid.toString()===a).forEach(d=>{d.upper.face||=u;});}));}get extraTabbarView(){return x(OA,{})}}function pAe({service:e}){const{firstBvid:t,info:n}=bt(e.state);return H(ze,{children:[x(gn,{title:H(ze,{children:["UP: ",n?.upper.name," ",x("br",{}),"简介: ",n?.intro||"无"]}),children:H(Ip,{href:Fq(e.collectionId),className:Wh,children:[x(No,{className:"size-16px"}),"去个人空间查看合集: ",n?.title]})}),t&&H(Ip,{href:VEe(t),className:Wh,children:[x(hg,{className:"size-16px"}),"播放全部"]})]})}function gAe({folderId:e,currentFolderTitle:t,onClosePopover:n}){const r=ga(l=>XEe(e,l),{manual:true}),[o,i]=f.useState(t),a=nt(async()=>{const l=o.trim();if(!l)return rn("收藏夹名称不能为空!");if(l===t)return rn("无变更!");if(!await r.runAsync(l))return;n();const d=mn.folders.find(m=>m.id===e);d&&(d.title=o);});return H("div",{className:"flex flex-col gap-y-2",children:[x("div",{children:"重命名收藏夹"}),x(Yi,{placeholder:"收藏夹名称",value:o,onChange:l=>i(l.target.value),onPressEnter:a}),H("div",{className:"flex justify-end gap-x-2",children:[x(ut,{onClick:n,children:"取消"}),x(ut,{type:"primary",loading:r.loading,onClick:a,disabled:!o||o===t,children:"确定"})]})]})}function vAe({service:e}){const[t,n]=f.useState(false),{viewingSomeFolder:r}=bt(mn),{id:o,attr:i,title:a}=e.entry,l=bt(mn.folders).find(d=>d.id===o)?.title??a,u="size-16px";return H(ze,{children:[H(Ip,{href:TA(o,i),className:Wh,children:[x(No,{className:u}),"去个人空间查看收藏夹: ",l]}),H(Ip,{href:HEe(o),className:Wh,children:[x(hg,{className:u}),"播放全部"]}),r&&x(Zo,{open:t,onOpenChange:n,trigger:"click",content:x(gAe,{folderId:o,currentFolderTitle:l,onClosePopover:()=>n(false)}),children:H(ut,{className:X(Wh,"gap-x-1 px-0 text-15px!"),type:"link",children:[x(YT,{className:u}),"重命名"]})})]})}const bAe=[It.FavTimeDesc,It.PlayCountDesc,It.PubTimeDesc];function K9(e){return bAe.includes(e)}const AG=Qf("fav-folder-all-items");async function h0(e){await AG.delete(e);}class NG{constructor(t,n,r){if(this.folderId=t,this.addSeparator=n,this.itemsOrder=r,this.itemsOrder===It.Initial)throw new Error("this should not happen!");K9(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:Je.Separator,uniqId:`${Je.Fav}:folder:separator:${this.folderId}`,content:x(vAe,{service:this.innerService})}}entry;innerService;assertInnerService(){qi(this.innerService,"this.innerService should not be undefined"),qi(this.entry,"this.entry should not be undefined");}async createService(){if(this.innerService)return;await DA();const t=eo(mn.folders).find(n=>n.id===this.folderId);qi(t,`favStore.favFolders should have this entry[fid=${this.folderId}]`),this.entry=t,K9(this.itemsOrder)?this.innerService=new Xd(t,this.itemsOrder):this.innerService=new Xd(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===It.Shuffle&&(this.bufferQueue=Si(this.bufferQueue));const n=this.bufferQueue.slice(0,$s);return this.bufferQueue=this.bufferQueue.slice($s),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=j3(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=Ru({fn:this._fetchAllItems,tableName:AG,generateKey:()=>`${this.folderId}`,ttl:so("5min")});fetchAllItems=t=>(this.assertInnerService(),this.entry.media_count>Xd.PAGE_SIZE*3?this._fetchAllItemsWithCache(t):this._fetchAllItems(t));runSideEffects(){this.assertInnerService(),typeof this.innerService.info?.media_count=="number"&&Xq(this.folderId,this.innerService.info.media_count);}get extraTabbarView(){return x(OA,{})}}class Xd{constructor(t,n=It.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={[It.FavTimeDesc]:"mtime",[It.PlayCountDesc]:"view",[It.PubTimeDesc]:"pubtime"}[this.itemsOrder],o=(await Zt.get("/x/v3/fav/resource/list",{params:{media_id:this.entry.id,pn:this.page+1,ps:Xd.PAGE_SIZE,keyword:"",order:n,type:"0",tid:"0",platform:"web"}})).data;if(!jn(o)){rn(o.message||wf);return}this.page++,this.hasMore=o.data.has_more,this.info=o.data.info;let i=o.data.medias||[];return i=i.filter(a=>a.title!=="已失效视频"),i.map(a=>({...a,from:"fav-folder",folder:this.info,api:Je.Fav,uniqId:`${Je.Fav}:folder:${this.info?.id||this.entry.id}:${a.bvid}`}))}}class yAe{constructor(t,n,r){if(this.addSeparator=t,this.itemsOrder=n,this.excludedFolderIds=r,![It.Initial,It.Shuffle].includes(this.itemsOrder))throw new Error("invalid items order")}get useShuffle(){return this.itemsOrder===It.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 H(ze,{children:[x(OA,{}),x(STe,{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<$s)for(;this.hasMoreInService&&this.shuffleBufferQueue.length<$s*3;){const i=this.allServices.filter(u=>u.hasMore),a=Si(i).slice(0,6),l=(await Vl(a,async u=>await u.loadMore(t)||[],2)).flat().filter(u=>u.api!==Je.Separator);this.shuffleBufferQueue=Si([...this.shuffleBufferQueue,...Si(l)]);}const n=this.shuffleBufferQueue.slice(0,$s);return this.shuffleBufferQueue=this.shuffleBufferQueue.slice($s),n}allFolderServices=[];state=kn({totalCountInFavFolders:0});serviceCreated=false;allServices=[];async createServices(){await DA();const{folders:t,collections:n}=Zd(eo(mn));this.allFolderServices=t.map(r=>new Xd(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===It.Initial&&(o=It.FavTimeDesc),this.allServices.push(...r.map(i=>new NG(i.id,this.addSeparator,o)));}this.allServices.push(...n.map(r=>new TG(r.id,this.addSeparator,this.itemsOrder))),this.serviceCreated=true;}}function a6(){const e=eo(mn);return {selectedKey:e.selectedKey,viewingAll:e.viewingAll,viewingSomeFolder:e.viewingSomeFolder,viewingSomeCollection:e.viewingSomeCollection,itemsOrder:IA(e.selectedKey,e.savedOrderMap),selectedFavFolderId:e.selectedFavFolderId,selectedFavCollectionId:e.selectedFavCollectionId,addSeparator:at.fav.addSeparator,excludedFolderIds:at.fav.excludedFolderIds}}class oS extends Hs{constructor(t){super(oS.PAGE_SIZE),this.config=t;const{viewingAll:n,viewingSomeFolder:r,viewingSomeCollection:o}=this.config;if(n)this.innerService=new yAe(this.config.addSeparator,this.config.itemsOrder,this.config.excludedFolderIds);else if(r)this.innerService=new NG(this.config.selectedFavFolderId,this.config.addSeparator,this.config.itemsOrder);else if(o)this.innerService=new TG(this.config.selectedFavCollectionId,this.config.addSeparator,this.config.itemsOrder);else throw new Error("unexpected case!")}static PAGE_SIZE=$s;innerService;get tabbarView(){const{tabbarView:t,extraTabbarView:n}=this.innerService;return t||x(yTe,{extraContent:n})}sidebarView=x(CTe,{});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?Xq(this.config.selectedFavFolderId,t=>t-1):this.config.viewingSomeCollection&&this.config.selectedFavCollectionId;}}async function s6({asc:e=false,searchText:t="",abortSignal:n,extraParams:r}={}){const i=(await Zt.get("/x/v2/history/toview/web",{signal:n,params:await M1({asc:e,key:t,viewed:0,web_location:333.881,...r})})).data;return jn(i)?{total:i.data.count,items:SAe(i.data.list||[])}:(Ko("getAllWatchlaterItems error %s, fulljson %o",i.message,i),{err:i.message})}function SAe(e){return e.filter(t=>!(t.title==="以下为更早添加的视频"&&t.aid===0&&t.bvid===""&&t.add_at===0))}async function CAe(e){const t=new FormData;t.append("resources",e.join(",")),t.append("csrf",oc());const n=await M1({}),o=(await Zt.post("/x/v2/history/toview/v2/dels",t,{params:n})).data;return jn(o)?true:(rn(o?.message||"出错了"),false)}const PG=()=>Gn().subtract(2,"days").unix(),IG="最近 48 小时内",nM={api:Je.Separator,uniqId:`${Je.Watchlater}:separator:recent`,content:H(ze,{children:["近期",x(mr,{children:IG})]})},rM={api:Je.Separator,uniqId:`${Je.Watchlater}:separator:earlier`,content:"更早"},Gh=kn({searchText:void 0});function xAe({service:e}){const{watchlaterAddSeparator:t,watchlaterItemsOrder:n,watchlaterUseNormalVideoUrl:r}=Ut(),o=Co(),{searchText:i}=bt(Gh,{sync:true}),a=GRe(),{recSharedEmitter:l}=Xi();As(()=>{(async()=>(await pn(100),o()))();},[t,n,r]);const{total:u}=bt(e.state),d=i?`共 ${u} 条搜索结果`:`共 ${u} 个视频`,m=typeof u=="number"&&x(go,{color:"success",style:{marginRight:0,marginTop:1,cursor:"pointer"},title:d,onClick:()=>{rn(`稍后再看: ${d}`);},children:u});return H("div",{className:"flex items-center gap-x-12px",children:[x($Ae,{}),x(Yi.Search,{allowClear:true,placeholder:"搜索稍后再看",style:{width:180},value:i,onChange:p=>Gh.searchText=p.target.value,onSearch:p=>{Gh.searchText=p,o();}}),m,a&&x(gn,{arrow:false,title:"移除稍后再看 (多选)",children:x(ut,{className:"icon-only-round-button",onClick:()=>TAe(l),children:x(Vf,{})})}),x(Pg,{})]})}const OG={[vo.AddTimeDesc]:{icon:x(E3,{}),label:"最近添加",helpInfo:"按添加时间倒序"},[vo.AddTimeAsc]:{icon:x($3,{}),label:"最早添加",helpInfo:"按添加时间增序"},[vo.Shuffle]:{icon:x(Lj,{}),label:"随机顺序",helpInfo:`随机但不包括近期添加的稍后再看, 近期指: ${IG}`}},DG=Object.values(vo),wAe=x("div",{className:"grid grid-cols-[repeat(2,max-content)] gap-x-1 gap-y-0 line-height-normal",children:DG.map(e=>{const{icon:t,label:n,helpInfo:r}=OG[e];return H(ze,{children:[H("div",{className:"flex-center gap-x-1",children:[t,n,": "]}),x("div",{children:r})]})})});function $Ae(){const e=Co(),{ref:t,getPopupContainer:n}=Mu(),{watchlaterItemsOrder:r}=Ut(),{searchText:o}=bt(Gh),i=!!o;return x(PA,{disabled:i,value:i?vo.AddTimeDesc:r,onChange:a=>{at.watchlaterItemsOrder=a,e();},list:DG,listDisplayConfig:OG,$ref:t,dropdownProps:{getPopupContainer:n},extraHelpInfo:wAe})}const bu=kn({updatedAt:0,bvidSet:Er()});function EAe(e){const t=bt(bu).bvidSet;return !!e&&t.has(e)}function _G(e){bu.updatedAt=Date.now(),bu.bvidSet=Er(e);}function MAe(e,t){bu.updatedAt&&bu.bvidSet.add(t);}async function RAe(){if(!R1()||!Jo())return;const{items:e=[]}=await s6();e.length&&_G(e.map(t=>t.bvid));}Os&&(async()=>(await N1(),await BW(RAe,{retries:3,onFailedAttempt(e){Ko(`Try updateWatchlaterState ${e.attemptNumber} failed. There are ${e.retriesLeft} retries left`);}})))();async function TAe(e){const t=eS().map(a=>({item:a,cardData:Jf(a)})).filter(a=>a.cardData.avid).map(a=>[a.cardData.avid,a.item.uniqId,a.cardData.title]).filter(Boolean),n=t.map(a=>a[0]),r=t.map(a=>a[1]),o=t.map(a=>a[2]);if(!n.length)return rn("没有选中的视频");await CAe(n)&&e.emit("remove-cards",[r,o]);}class zp extends Hs{constructor(t,n,r,o){super(zp.PAGE_SIZE),this.searchText=o,this.innerService=t===vo.Shuffle&&!this.searchText?new Y9(n,r):new AAe(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 x(xAe,{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 Y9?this.innerService.currentBvidIndexMap:void 0}}}function LG(e){return {...e,api:Je.Watchlater,uniqId:`${Je.Watchlater}:${e.bvid}`}}function zG(e){throw rn(`获取稍后再看失败: ${e}`),new Error(`获取稍后再看失败: ${e}`,{cause:e})}class Y9{constructor(t,n){this.addSeparator=t,n?.size?(this.keepOrder=true,this.prevBvidIndexMap=n):this.keepOrder=false;}hasMore=true;state=kn({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 s6({asc:false,searchText:void 0,abortSignal:t});r!==void 0&&zG(r),_G(n.map(u=>u.bvid).filter(Boolean));const o=n.map(LG),i=PG(),a=o.findIndex(u=>u.add_at<i);let l=o;if(a!==-1){const u=o.slice(0,a);let d=o.slice(a);this.keepOrder&&this.prevBvidIndexMap?.size?d=Ss(d,[m=>this.prevBvidIndexMap?.get(m.bvid)??-1],["asc"]):d=Si(d),l=[!!u.length&&this.addSeparator&&nM,...u,!!d.length&&this.addSeparator&&rM,...d].filter(Boolean);}return this.state.total=n.length,this.currentBvidIndexMap=new Map(l.filter(u=>u.api!==Je.Separator).map((u,d)=>[u.bvid,d])),l}}class AAe{constructor(t,n,r){this.order=t,this.addSeparator=n,this.searchText=r,this.searchText||qi(t!==vo.Shuffle,"shuffle not supported in NormalOrderService");}firstPageLoaded=false;state=kn({total:void 0});hasMore=true;page=1;async loadMore(){if(!this.hasMore)return;const t=await s6({asc:this.order===vo.AddTimeAsc,searchText:this.searchText,extraParams:{need_split:"true",ps:20,pn:this.page}});if(t.err!==void 0){this.hasMore=false,zG(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(a=>{a.bvid&&MAe("add",a.bvid);});const i=n.map(LG);return this.insertSeparator(i)}recentSeparatorInserted=false;earlierSeparatorInserted=false;insertSeparator(t){if(!this.addSeparator)return t;let n=[...t];const r=PG(),o=t.some(a=>a.add_at<r),i=t.some(a=>a.add_at>=r);if(this.order===vo.AddTimeAsc){if(!this.earlierSeparatorInserted&&o&&(n=[rM,...n],this.earlierSeparatorInserted=true),!this.recentSeparatorInserted&&i){const a=n.findIndex(l=>l.api===Je.Watchlater&&l.add_at>=r);n=[...n.slice(0,a),nM,...n.slice(a)],this.recentSeparatorInserted=true;}}else if(!this.recentSeparatorInserted&&i&&(n=[nM,...t],this.recentSeparatorInserted=true),!this.earlierSeparatorInserted&&o){const a=n.findIndex(l=>l.api===Je.Watchlater&&l.add_at<r);n=[...n.slice(0,a),rM,...n.slice(a)],this.earlierSeparatorInserted=true;}return n}}function NAe(){return {addOtherTabContents:yg().appRecommend.addOtherTabContents}}const BG=e=>x(Pt,{configPath:"appRecommend.addOtherTabContents",label:"显示来自其他 Tab 的内容",tooltip:H(ze,{children:["显示来自其他 Tab 的内容 ",x("br",{}),"如动态 / 收藏 / 稍后再看 ",x("br",{}),"但是: 刷新时间会更长"]}),extraAction:async()=>{await pn(100),e?.();}});function PAe(){const e=Co(),{hidingTabKeys:t}=Ut(),n=t.includes(et.Liked);return H("div",{className:"flex items-center gap-x-10px",children:[BG(e),n&&x(gn,{title:"查看「我」点赞的视频",children:x("a",{href:`/?${HW.Tab}=${et.Liked}`,target:"_blank",children:x(Dj,{className:"size-18px align-top"})})})]})}class Bp extends Hs{constructor(t){super(Bp.PAGE_SIZE),this.config=t,this.innerService=new IAe,this.allServices=[this.innerService],this.initOtherTabServices();}static PAGE_SIZE=20;tabbarView=x(PAe,{});sidebarView=void 0;innerService;allServices=[];otherTabServices=[];initOtherTabServices(){if(!R1()||!this.config.addOtherTabContents)return;let t,n,r;{const a=DW();a.upMid=void 0,a.selectedGroupId=void 0;const l=i6(a);Object.assign(l,{showLiveInDynamicFeed:true,whenViewAllEnableHideSomeContents:false,filterCacheEnabled:false}),t=new rS(l);}{const a=Object.assign(a6(),{selectedKey:"all",itemsOrder:It.Shuffle,selectedFavFolderId:void 0,selectedFavCollectionId:void 0,addSeparator:false});n=new oS(a);}r=new zp(vo.AddTimeDesc,false),this.otherTabServices=[t,n,r];const o=[],i=7/3;o.push(...this.otherTabServices),uQ(Math.round(i*this.otherTabServices.length),()=>o.push(this.innerService)),this.allServices=Si(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<Bp.PAGE_SIZE*3;){const n=this.allServices.filter(i=>i.hasMore);if(!n.length)break;const r=Si(n).slice(0,3),o=(await Promise.all(r.map(async i=>await i.loadMore(t)||[]))).flat().filter(i=>i.api!==Je.Separator);this.qs.bufferQueue.push(...o),this.qs.bufferQueue=Si(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 IAe{static PAGE_SIZE=16;hasMore=true;async getRecommend(){const t=await vg.get(`${vz}/x/v2/feed/index`,{timeout:2e4,responseType:"json",params:{build:"1",mobi_app:"iphone",device:"pad",idx:Math.floor(Date.now()/1e3)+BX(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(DL(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=Wl(r,i=>i.param),r.map(i=>({...i,api:Je.AppRecommend,uniqId:`${Je.AppRecommend}:${i.param}`}))}}async function OAe(e,t){const{bvid:n,goto:r,recommendReason:o}=t,i=r==="av";return bf(e)&&i&&!!n&&r6(o)?(await Zq(n))?.pubdate:void 0}const DAe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("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"})]}),kG=f.forwardRef(DAe);function _Ae(){const{dynamicFeed:e}=Ut(),t=jA(),n=r=>({order:t.indexOf(r)+1});return x("div",{className:zn.tabPane,children:H("div",{className:"grid grid-cols-[250px_1fr] gap-x-50px",children:[x(Zr,{title:H(ze,{children:["Tab 设置",x(mr,{className:"ml-5px",children:"勾选显示, 拖动排序"})]}),resetSettingPaths:["hidingTabKeys","customTabKeysOrder"],children:x(zAe,{})}),H(Zr,{title:"更多设置",contentClassName:"gap-y-15px",children:[H("div",{style:n(et.Watchlater),children:[H("div",{className:"flex items-center text-size-1.3em",children:[x(yi,{tabKey:et.Watchlater,className:"mr-5px mt--1px"}),"稍后再看"]}),H("div",{className:zn.settingsLine,children:[x(Pt,{configPath:"watchlaterAddSeparator",label:"添加分割线",tooltip:"添加「近期」「更早」分割线"}),x(Pt,{configPath:"watchlaterUseNormalVideoUrl",label:"使用普通视频链接",tooltip:_r("使用普通视频链接","使用「稍后再看」自动列表链接")})]})]}),H("div",{style:n(et.Fav),children:[H("div",{className:"flex items-center text-size-1.3em",children:[x(yi,{tabKey:et.Fav,className:"mr-5px mt--2px"}),"收藏"]}),x("div",{className:zn.settingsLine,children:x(Pt,{configPath:"fav.addSeparator",label:"添加分割线",tooltip:"顺序显示时, 按收藏夹添加分割线"})})]}),H("div",{style:n(et.DynamicFeed),children:[H("div",{className:"flex items-center text-size-1.3em",children:[x(yi,{tabKey:et.DynamicFeed,className:"mr-5px mt--2px"}),"动态"]}),H("div",{className:zn.settingsLine,children:[x(Pt,{configPath:"dynamicFeed.followGroup.enabled",label:"启用分组筛选",tooltip:H(ze,{children:["动态 Tab 启用分组筛选 ",x("br",{}),x(EG,{})]})}),x(Pt,{configPath:"dynamicFeed.showLive",label:"在动态中显示直播",tooltip:H(ze,{children:["动态里显示正在直播的 UP",x("br",{}),"P.S 仅在选择「全部」时展示"]})}),x(Pt,{configPath:"dynamicFeed.videoOnly",label:"只显示视频",tooltip:_r("只获取视频动态: 投稿视频 / 动态视频","获取全部动态: 包含视频 / 图片 / 文章等")}),x(Pt,{configPath:"dynamicFeed.whenViewAll.enableHideSomeContents",label:"「全部」动态过滤",tooltip:H(ze,{children:["查看「全部」动态时 ",x("br",{}),_r("将添加右键菜单, 点击可添加到「全部」动态的过滤列表","关闭此功能")]})}),e.whenViewAll.enableHideSomeContents&&x(Nk,{size:"small",className:"w-full",items:[{key:"1",label:"在「全部」动态中隐藏 UP/分组 的动态",children:x(kAe,{})}]})]})]}),H("div",{style:n(et.AppRecommend),children:[H("div",{className:"flex items-center text-size-1.3em",children:[x(yi,{tabKey:et.AppRecommend,className:"mr-5px"}),"App 推荐"]}),x("div",{className:zn.settingsLine,children:x("div",{className:"flex items-center",children:BG()})})]})]})]})})}function LAe(){const{hidingTabKeys:e}=Ut();return f.useMemo(()=>xM.filter(t=>!e.includes(t)),[e])}function zAe({className:e,style:t}){const n=LAe(),r=jA({sync:true}),o=F$e(k$e($A)),i=nt(a=>{const{over:l,active:u}=a;if(!l?.id||l.id===u.id)return;const d=r.indexOf(u.id.toString()),m=r.indexOf(l.id.toString()),p=Dp(r,d,m);at.customTabKeysOrder=p;});return x("div",{className:e,style:t,children:x(Ki.Group,{className:"block line-height-[unset]",value:n,onChange:a=>{if(!a.length)return Ot.error("至少选择一项!");Ga({hidingTabKeys:xM.filter(l=>!a.includes(l))});},children:x($q,{sensors:o,collisionDetection:q$e,onDragEnd:i,modifiers:[EMe,$Me],children:x(PMe,{items:r,strategy:AMe,children:r.map(a=>x(BAe,{id:a},a))})})})})}function BAe({id:e}){const{label:t,desc:n}=Zf[e],{attributes:r,listeners:o,setNodeRef:i,transform:a,transition:l,setActivatorNodeRef:u}=BMe({id:e}),d={transform:gf.Transform.toString(a),transition:l};return H("div",{ref:i,style:d,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",children:[H(Ki,{value:e,className:"inline-flex items-center [&_.ant-checkbox-label]:inline-flex [&_.ant-checkbox-label]:select-none [&_.ant-checkbox-label]:items-center",children:[x(yi,{tabKey:e,className:"mr-5px"}),x(gn,{align:{offset:[0,-6]},title:n,children:t})]}),x("div",{...o,...r,ref:u,className:"cursor-grab rounded-5px px-5px py-3px text-size-0 hover:bg-gate-bg-lv-3",children:x(kG,{className:"size-18px"})})]},e)}function kAe(){const{hideIds:e}=bt(at.dynamicFeed.whenViewAll),t=nt(async o=>{await Ua("dynamicFeed.whenViewAll.hideIds",{remove:[o]});}),{groups:n}=bt(Jt);return ro(()=>{Jt.updateGroups();}),e.length?x("div",{className:"max-h-250px flex flex-wrap gap-10px overflow-y-auto",children:e.map(o=>x($W,{tag:o,onDelete:t,renderTag:i=>x(FAe,{tag:i,followGroups:n})},o))}):x("div",{className:"flex items-center justify-center",children:x(Vi,{})})}function FAe({tag:e,followGroups:t}){let n,r;e.startsWith(vf)?n=e.slice(vf.length):e.startsWith(gu)&&(r=e.slice(gu.length));const[o,i]=f.useState(void 0);ro(async()=>{if(!n)return;const g=await Ag(n);g&&i(g);});const[a,l]=f.useState(void 0);ro(()=>{if(!r)return;const g=t?.find(b=>b.tagid.toString()===r)?.name;g&&l(g);});const u=f.useMemo(()=>n?o||n:r?a||r:"无效数据",[n,o,r,a]),d=f.useMemo(()=>n?`mid: ${n}`:r?`分组: ${r}`:`Tag: ${e}`,[n,r,e]),m=f.useMemo(()=>n?x(bW,{className:"mr-2px size-12px"}):r?x(yW,{className:"mr-2px size-16px"}):void 0,[n,r]),p=f.useMemo(()=>n?Tg(n):r?SW(r):void 0,[n,r]);return x(ze,{children:x(gn,{title:d,children:H("span",{className:X("inline-flex items-center",n?"cursor-pointer":"cursor-text"),children:[m,p?x("a",{href:p,target:"_blank",children:u}):u]})})})}const C$=[{useBorder:false},{useBorder:true,useBorderOnlyOnHover:true},{useBorder:true,useBorderOnlyOnHover:false}],FG=["「卡片边框」: 禁用","「卡片边框」: 仅在悬浮时显示","「卡片边框」: 总是显示"];function HAe(){return da(["shift.b"],e=>{if(ks())return;const t=au(at.style.videoCard,["useBorder","useBorderOnlyOnHover"]),n=C$.findIndex(a=>ma(a,au(t,Object.keys(a))));if(n===-1)throw new Error("unexpected curIndex = -1");const r=(n+1)%C$.length,o=C$[r];Object.assign(at.style.videoCard,o);const i=FG[r];Ot.success(i);},{exactMatch:true})}function VAe(){const{videoCard:{actions:{showLargePreview:e,openInPipWindow:t},imgPreview:{enabled:n}},videoLinkOpenMode:r,style:o,autoPreviewUpdateInterval:i}=Ut(),a=f.useMemo(()=>Object.values(rr).filter(l=>di[l].enabled??true).map(l=>{const u=di[l];return {config:u,value:l,label:H("span",{className:"flex-v-center gap-x-8px",children:[u.icon,x("span",{children:u.label})]})}}),[]);return H("div",{className:zn.tabPane,children:[x(Zr,{title:"视频链接",resetSettingPaths:["videoLinkOpenMode"],children:H("div",{className:"flex-v-center",children:["打开方式",H(mr,{useBlackBg:true,children:["选择点击视频(封面图片 或 标题)时打开的模式 ",x("br",{}),a.map(({value:l,config:u})=>!!u.desc&&H("div",{className:"mt-10px flex items-start first:mt-0",children:[H("span",{className:"inline-flex items-center",children:[u.icon,x("span",{className:"ml-4px mr-10px min-w-95px",children:u.label})]}),x("span",{className:"desc",children:u.desc})]},l))]}),x(Zl,{className:"ml-8px w-160px",options:a,value:r,onChange:l=>{Ga({videoLinkOpenMode:l});}})]})}),x(Zr,{title:"边框样式",resetSettingPaths:["style.videoCard.useBorder","style.videoCard.useBorderOnlyOnHover","style.videoCard.useBoxShadow"],children:H("div",{className:zn.settingsLine,children:[x(Pt,{configPath:"style.videoCard.useBorder",label:"使用卡片边框",tooltip:H(ze,{children:["勾选后, 视频卡片会有边框包裹, 更像是一个卡片~ ",x("br",{}),"整个卡片区域可点击 / 可触发预览 / 可使用右键菜单 ",x("br",{}),"否则只是封面区域可以 ",x("br",{}),"使用快捷键 ",x(go,{color:"green",children:"shift+b"})," 切换状态 ",x("br",{}),FG.map(l=>x(go,{color:"success",className:"mx-1",children:l},l))]})}),x(Pt,{configPath:"style.videoCard.useBorderOnlyOnHover",label:"仅在悬浮时显示",disabled:!o.videoCard.useBorder,tooltip:_r("仅在悬浮时显示","常驻显示")}),x(Pt,{configPath:"style.videoCard.useBoxShadow",disabled:!o.videoCard.useBorder,label:"悬浮卡片时使用发光效果",tooltip:x(ze,{children:"悬浮卡片时使用发光效果, 看起来比较花哨~"})})]})}),H(Zr,{title:H(ze,{children:["快照预览",x(hu,{configPath:"videoCard.imgPreview.enabled",tooltip:"关闭此功能",className:"ml-3"})]}),resetSettingPaths:["videoCard.imgPreview.enabled","videoCard.imgPreview.autoPreviewWhenKeyboardSelect","videoCard.imgPreview.autoPreviewWhenHover","videoCard.imgPreview.disableWhenMultiSelecting","useDelayForHover","autoPreviewUpdateInterval"],children:[H("div",{className:zn.settingsLine,children:[x(Pt,{disabled:!n,configPath:"videoCard.imgPreview.autoPreviewWhenHover",label:"鼠标悬浮后自动开始",tooltip:H(ze,{children:[_r("鼠标悬浮后自动开始预览, 不跟随鼠标位置","预览进度跟随鼠标位置(百分比)"),"切换设置快捷键: ",x(go,{color:"green",children:"shift+m"})]})}),x(Pt,{disabled:!n,configPath:"videoCard.imgPreview.disableWhenMultiSelecting",label:"多选时禁用",tooltip:_r("多选开启时, 禁用快照预览","不禁用")}),x(Pt,{disabled:!n,configPath:"useDelayForHover",label:"延迟悬浮预览",tooltip:"延迟悬浮预览"}),x(Pt,{disabled:!n,configPath:"videoCard.imgPreview.autoPreviewWhenKeyboardSelect",label:"键盘选中后自动开始",tooltip:H(ze,{children:["手动预览快捷键: ",x(go,{color:"green",children:"."})," or ",x(go,{color:"green",children:"p"})," ",x("br",{}),"切换设置快捷键: ",x(go,{color:"green",children:"shift+p"})]})})]}),H("div",{className:zn.settingsLine,children:["自动预览更新间隔",x(YR,{disabled:!n,className:"w-500px",min:0,max:1e3,keyboard:true,onChange:l=>at.autoPreviewUpdateInterval=l,value:i}),H("span",{style:{width:"65px"},children:["(",i,"ms)"]})]})]}),x(Zr,{title:H(ze,{children:["操作按钮",H(mr,{children:["视频卡片右上角「稍后再看」按钮旁 ",x("br",{}),"「稍后再看」因其通用性不提供关闭选项"]})]}),resetSettingPaths:["videoCard.actions.showLargePreview","videoCard.actions.openInPipWindow","videoCard.videoPreview.useMp4","videoCard.videoPreview.usePreferredCdn","videoCard.videoPreview.useScale","videoCard.videoPreview.useVideoCardAsTrigger","pipWindow.defaultLocked","pipWindow.autoWebFullscreen"],children:H("div",{className:"grid grid-cols-[repeat(2,max-content)_1fr] items-start gap-x-20px",children:[x(Pt,{configPath:"videoCard.actions.showLargePreview",label:"浮动预览",tooltip:H(ze,{children:["创意来源「浮图秀」, 但使用视频预览 ",x("br",{}),"操作说明: ",x("br",{}),"1. 鼠标悬浮打开 「浮动预览」, 离开关闭 ",x("br",{}),"2. 点击固定「浮动预览」, 固定指: 不再随鼠标移出关闭预览 ",x("br",{}),"3. 可使用以下方式关闭固定的「浮动预览」",H("ul",{className:"ml-30px list-circle",children:[x("li",{children:"再次点击视频卡片按钮"}),x("li",{children:"点击预览视频右上方的「关闭」按钮"}),x("li",{children:"触发其他卡片的「浮动预览」"}),x("li",{children:"Esc键"}),x("li",{children:"点击页面空白处"})]})]})}),x(Pt,{configPath:"videoCard.actions.openInPipWindow",label:"小窗打开",tooltip:x(ze,{children:"仅当「文档画中画」API 可用时, 勾选生效"})}),x(Hl,{className:"grid-col-span-full my-2px py-0"}),H("div",{className:"flex flex-col",children:[x(Pt,{configPath:"videoCard.videoPreview.useMp4",disabled:!e,label:"浮动预览: 使用 mp4",tooltip:_r("使用 mp4, 最高 720p, 有声音","使用 dash, 最高 1080p, 无声音, 理论上更快")}),x(Pt,{configPath:"videoCard.videoPreview.usePreferredCdn",disabled:!e,label:"浮动预览: 使用优选 CDN",tooltip:_r("使用优选 CDN (降低 MCDN & PCDN 优先级)","使用默认 CDN")}),x(Pt,{configPath:"videoCard.videoPreview.useScale",disabled:!e,label:"浮动预览: 使用放大效果",tooltip:_r("浮动预览面板: 放大展开 (类似浮图秀)","浮动预览面板: 滑动展开")}),x(Pt,{configPath:"videoCard.videoPreview.useVideoCardAsTrigger",label:"浮动预览: 使用视频卡片作为触发器",tooltip:H(ze,{children:[_r("使用「视频卡片」作为触发器","使用「视频卡片右上角按钮」作为触发器, 悬浮视频卡片 1 秒后展开"),x(Hl,{className:"my-1"}),x("ul",{className:"ml-25px list-circle",children:x("li",{children:"与上面「浮动预览」开关独立"})})]})})]}),H("div",{className:"flex flex-col",children:[x(Pt,{configPath:"pipWindow.defaultLocked",disabled:!t,label:"小窗: 默认锁定",tooltip:_r("小窗打开时: 默认锁定","小窗打开时: 不锁定")}),x(Pt,{configPath:"pipWindow.autoWebFullscreen",disabled:!t,label:"小窗: 自动网页全屏",tooltip:_r("自动网页全屏","不启用")})]})]})})]})}function jAe(){const e=iq().id,t=pA(e),{colorPickerThemeSelectedColor:n}=Ut(),[r,o]=f.useState(n||$f.Pink),i=f.useMemo(()=>typeof r=="string"?r:r.toHexString(),[r]);return ro(()=>{sg.updateThrottled();}),x("div",{children:oq.map(({name:a,themes:l,tooltip:u})=>H(f.Fragment,{children:[H("div",{className:"mt-2 flex items-center text-size-1.5em",children:[a,x(mr,{className:"size-16px",useBlackBg:true,children:u})]}),x("div",{className:"flex flex-wrap gap-x-5px gap-y-2px",children:l.map(d=>{const m=e===d.id,p=d.isCustom,g=!!t&&t!==d.id,b=28,y=b+8;let S=x("div",{"data-role":"preview-wrapper",style:{width:y},className:X("mx-auto my-0 aspect-1 b-2px rounded-full b-solid",m?"b-gate-primary":"b-transparent","flex items-center justify-center text-size-0"),children:x("div",{"data-role":"preview",className:"aspect-1 flex items-center justify-center rounded-full text-white",css:ln("width:",b,"px;background-color:",p?i:d.colorPrimary,";",""),children:m&&x(Ep,{size:18,useAnimation:g})})});d.isCustom&&(S=x(XR,{value:r,onChange:w=>o(w),onOpenChange:w=>{w||Ga({colorPickerThemeSelectedColor:i});},children:S}));let C=H("div",{className:"min-w-60px cursor-pointer text-center",onClick:w=>{Ga({theme:d.id});},children:[S,d.name]});return (d.tooltip||f9[d.id])&&(C=x(gn,{title:H(ze,{children:[d.tooltip,f9[d.id]]}),color:d.colorPrimary,children:C})),C=x(f.Fragment,{children:C},d.id),C})})]},a))})}function X9(e,t,n){return da(e,r=>{if(ks())return;const i=!!!To(at,t);xf(at,t,i),Ot.success(`已${i?"启用":"禁用"}「${n}」`);},{exactMatch:true})}const UAe="basic",Q9=kn({tab:UAe});function qAe(){return X9(["shift.p"],"videoCard.imgPreview.autoPreviewWhenKeyboardSelect","键盘选中后自动开始预览"),X9(["shift.m"],"videoCard.imgPreview.autoPreviewWhenHover","鼠标悬浮后自动开始预览"),HAe(),null}const WAe={name:"4k370z",styles:"&.ant-tabs{.ant-tabs-tab{justify-content:end;padding-inline:5px 15px;}.ant-tabs-nav-operations{display:none;}}"};function GAe({show:e,onHide:t}){const{tab:n}=bt(Q9);return H(wg,{show:e,onHide:t,hideWhenMaskOnClick:true,hideWhenEsc:true,width:900,clsModalMask:"[&:has(svg.peeking)]:bg-transparent",clsModal:"max-h-unset [&:has(svg.peeking)]:opacity-10",children:[H("div",{className:Po.modalHeader,children:[H("div",{className:Po.modalTitle,children:[x(KT,{className:"mr-4px mt--2px size-26px"}),"设置"]}),x($g,{onClick:t})]}),x("main",{className:Po.modalBody,style:{overflow:"hidden"},children:x(UR,{tabPlacement:"start",size:"middle",css:WAe,activeKey:n,onChange:r=>Q9.tab=r,items:[{label:"常规设置",key:"basic",children:x(Y3e,{})},{label:"视频卡片",key:"video-card",children:x(VAe,{})},{label:"内容过滤",key:"filter",children:x(bMe,{})},{label:"主题选择",key:"theme-select",children:x("div",{className:zn.tabPane,children:x(jAe,{})})},{label:"Tab 设置",key:"video-source-tab-config",children:x(_Ae,{})},{label:"其他页面",key:"other-pages",children:x(xMe,{})},{label:"高级设置",key:"advance",children:x(vEe,{})}]})})]})}const KAe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,d:"m19 12l12 12l-12 12"})]}),HG=f.forwardRef(KAe);function YAe({children:e,initialOpen:t=false,ref:n}){const[r,o]=XU(t);f.useImperativeHandle(n,()=>o,[o]);const i=x(ut,{onClick:o.toggle,className:"icon-only-round-button",children:x(HG,{className:X("size-13px",r?"rotate-z-0":"rotate-z-180deg")})});return H(ze,{children:[i,r&&e]})}function VG({Component:e,defaultProps:t,containerClassName:n}){const r=kn(t);function o(){const u=bt(r);return x(e,{...u})}const i=Sf(()=>{const u=document.createElement("div");u.className=X($a,n),document.body.appendChild(u),Xa.createRoot(u).render(x(Fs,{children:x(o,{})}));});function a(u){return (...d)=>(i(),u(...d))}const l=a(u=>{Object.assign(r,u);});return {WrappedComponent:o,proxyProps:r,mount:i,wrapAction:a,updateProps:l}}const _y=PH();function XAe(){return bt(_y)}function QAe(e){const t=XAe();return e?t.get(e):void 0}function ZAe(e){_y.delete(e);}const JAe={show:false,reasons:[],onHide:t6e,okAction:void 0},{proxyProps:e6e,updateProps:jG}=VG({Component:r6e,containerClassName:"show-dislike-container",defaultProps:JAe}),UG=new Xo;function t6e(){UG.emit("modal-close"),jG({show:false,reasons:[],okAction:void 0});}async function n6e(e,t){jG({show:true,reasons:e,okAction:t}),await UG.once("modal-close");}const qG=function(){return bt(e6e).show};function r6e({show:e,reasons:t,onHide:n,okAction:r}){const o=f.useRef(null),i=()=>!!e&&!!t?.length,a=ga(async b=>r?.(b),{manual:true}),l=a.loading,[u,d]=f.useState(t.length-1);d$e(()=>{d(t.length-1);},[t]);const m=["1","2","3","4","5","6"];da(m,b=>{if(!i()||!m.includes(b.key)||!t?.length)return;const y=Number(b.key)-1;y>=0&&y<t.length&&d(y);});const p=nt(b=>{if(!i()||ks())return;const y=t.length;let S=u+b;S<0&&(S=S%y+y),S>y-1&&(S=S%y),d(S);});da("uparrow",()=>p(-1),{exactMatch:true}),da("downarrow",()=>p(1),{exactMatch:true});const g=xg(async b=>{if(!i()||u<0||u>t.length-1)return;const y=t[u];if(!y)return;b.preventDefault(),b.stopPropagation(),await a.runAsync(y)&&n();});return da("enter",g,{exactMatch:true}),H(wg,{show:e,onHide:n,hideWhenMaskOnClick:true,hideWhenEsc:true,width:350,clsModal:"rounded-15px",children:[H("div",{className:Po.modalHeader,children:[H("div",{className:Po.modalTitle,children:[x(GT,{className:"size-25px"}),x("span",{className:"ml-5px",children:"我不想看"}),H(mr,{children:["选择后将减少相似内容推荐 ",x("br",{}),"操作说明: ",x("br",{}),H("div",{className:"ml-10px",children:["1. 使用删除键打开弹窗, Esc 关闭 ",x("br",{}),"2. 数字键 或 方向键选择 ",x("br",{}),"3. 回车键 或 确定按钮提交 ",x("br",{})]})]})]}),x($g,{onClick:n})]}),x("div",{className:Po.modalBody,ref:o,children:x(g1,{spinning:l,indicator:qj,children:x("div",{className:"reason-list mb-20px mt-20px flex flex-col gap-y-10px",children:t.map((b,y)=>{const S=y===u;return H("button",{"data-id":b.id,className:X("reason",{active:S},"relative flex cursor-pointer items-center b-2px rounded-6px b-solid bg-transparent px-6px py-12px",S?"b-gate-primary":"b-gate-border"),disabled:l,onClick:()=>{d(y);},children:[x("span",{"data-cls":"reason-no",className:"size-20px flex flex-none items-center justify-center rounded-full bg-gate-primary text-13px color-white",children:y+1}),x("span",{className:"flex-1 px-4px text-14px",children:b.name}),x("span",{className:"size-20px flex-none",children:S&&x(Ep,{className:"h-100% w-100% color-gate-primary",useAnimation:true})})]},b.id)})})})}),H("div",{className:"mt-2 flex items-center justify-end gap-x-10px",children:[x(ut,{onClick:n,children:"取消"}),x(ut,{type:"primary",onClick:g,loading:l,children:"确定"})]})]})}const WG={modalWidth:60,favFolderOrder:"default"},xh=aT({...WG},"modal-fav-manager");function o6e(){const{modalWidth:e,favFolderOrder:t}=bt(xh),n="text-1.5em",r="text-1.2em";return H("div",{className:"flex flex-col gap-y-10px",children:[H("div",{className:"flex items-center justify-between",children:[x("div",{className:n,children:"窗口设置"}),x(ut,{className:"icon-only-round-button size-24px",onClick:()=>Object.assign(xh,WG),children:x(gy,{})})]}),H("div",{children:[H("div",{className:r,children:["窗口宽度 ",e,"%"]}),x(YR,{className:"mt-0",value:e,min:30,max:90,onChange:o=>{xh.modalWidth=o;}})]}),H("div",{children:[x("div",{className:r,children:"收藏夹排序"}),x(sG,{value:t,onChange:o=>xh.favFolderOrder=o})]})]})}function i6e({show:e,onHide:t,mode:n,pickOkAction:r,modifyInitialSelectedIds:o,modifyAllowEmpty:i,modifyOkAction:a}){const{modalWidth:l,favFolderOrder:u}=bt(xh),[d,m]=f.useState(void 0),[p,g]=f.useState(void 0),b=ga(_A,{manual:true}),y=ga(async _=>r?.(_),{manual:true}),S=ga(async _=>a?.(_),{manual:true}),{folders:C}=bt(mn),w=f.useMemo(()=>{const _=C.map((q,V)=>({...q,vol:V+1}));if(!p)return _;const L=_.filter(q=>q.title.includes(p)),j=_.filter(q=>q.title.toLowerCase().includes(p.toLowerCase())),U=_.filter(q=>TX.match(q.title,p));return Wl([...L,...j,...U],q=>q.id)},[C,p]),M=f.useMemo(()=>aG(w,u),[w,u]),T=f.useMemo(()=>new Set([o].flat().filter(_=>typeof _=="number")),[o]),R=a6e(),I=n==="modify"&&i,N=f.useMemo(()=>!I&&!d||n==="modify"&&ma(Array.from(T),[d]),[I,d,n,T]);da("r",()=>{e&&(ks()||b.run(true));},{exactMatch:true});const P=nt(async()=>{let _;if(d&&(_=C.find(L=>L.id===d)),!I&&!_)return Ot.error("请选择一个收藏夹");n==="pick"&&(qi(_,"selectedFolder should not be empty when mode=pick"),await y.runAsync(_)&&t()),n==="modify"&&await S.runAsync(_)&&t();}),O=nt(()=>{if(!(!e||n!=="modify"||!T.size)&&(!d||!T.has(d))){const _=Array.from(T)[0];m(_);}});return f.useEffect(()=>{e&&(b.run(),O());},[e]),As(()=>{if(e&&(!d||!T.has(d))){const _=Array.from(T)[0];m(_);}},[T]),H(wg,{show:e,onHide:t,hideWhenMaskOnClick:true,hideWhenEsc:true,width:`${l}vw`,clsModal:"rounded-15px",children:[H("div",{className:Po.modalHeader,children:[H("div",{className:"flex flex-wrap items-center gap-x-10px gap-y-1",children:[H("div",{className:Po.modalTitle,children:[n==="pick"?x(eCe,{className:"size-25px"}):x(YT,{className:"size-25px"}),x("span",{className:"ml-5px",children:n==="pick"?"选择目标收藏夹":"修改收藏"})]}),x(Yi,{className:"w-215px",allowClear:true,placeholder:"过滤: 支持拼音 / 拼音首字母",value:p,onChange:_=>g(_.target.value),spellCheck:false}),!!p&&H("span",{className:"ml-5px",children:[x("span",{className:X({"text-red":C.length&&!M.length}),children:M.length})," ","/ ",x("span",{children:C.length})]}),H(mr,{className:"ml-5px size-1.3em",children:["1. 使用 ",x("kbd",{className:X(du,"mx-2px"),children:"r"})," 刷新收藏夹 ",x("br",{}),"2. 使用 ",x("kbd",{className:X(du,"mx-2px"),children:"esc"})," 取消操作, 关闭窗口 ",x("br",{}),"3. 使用 拼音 / 拼音首字母 过滤收藏夹标题 ",x("br",{})]}),x(Zo,{trigger:"click",title:x(o6e,{}),children:x(KT,{className:"size-1.3em cursor-pointer"})})]}),x($g,{onClick:t})]}),x("div",{className:X(Po.modalBody),children:x(g1,{spinning:b.loading||y.loading||S.loading,indicator:qj,children:x("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(225px,1fr))] mb-10px min-h-100px content-start items-center gap-10px pr-18px",children:M.length?M.map(_=>{const L=n==="modify"&&T.has(_.id),j=_.id===d;return H("button",{"data-id":_.id,className:X({active:j},"relative min-h-40px flex cursor-pointer items-center b-2px b-gate-border rounded-20px b-solid bg-transparent px-4px line-height-[1.2] hover:bg-gate-bg-lv1",j&&"b-gate-primary color-white bg-gate-primary! hover:bg-gate-primary-lv1!"),onClick:()=>{if(j&&I)return m(void 0);m(_.id);},children:[L&&x(gn,{title:"源收藏夹",placement:"left",children:x("span",{className:X("absolute left-2 top-50% size-2.5 flex-center translate-y--50% rounded-full",R)})}),H("span",{className:"flex-1 px-4px text-14px",children:[_.title," (",_.media_count,")"]}),x("span",{className:"mr-2px size-20px flex-none",children:j&&x(Ep,{className:"size-full color-white",useAnimation:true})})]},_.id)}):x(Vi,{className:"grid-col-span-full",image:Vi.PRESENTED_IMAGE_SIMPLE,description:"未找到收藏夹",children:"无过滤结果, 请检查过滤词 !"})})})}),H("div",{className:"mt-2 flex items-center justify-between",children:[x("div",{className:"flex-v-center gap-x-10px",children:H("a",{href:`https://space.bilibili.com/${Jo()}/favlist`,target:"_blank",className:"flex-v-center gap-x-1",children:[x(No,{className:"size-1.1em"}),"去个人空间新建收藏夹"]})}),H("div",{className:"flex-v-center gap-x-10px",children:[x(ut,{onClick:t,children:"取消"}),x(ut,{type:"primary",onClick:P,loading:y.loading||S.loading,disabled:N,children:"确定"})]})]})]})}function a6e(){const{theme:e}=Ut();return e===yy.id?"bg-$brand_blue":"bg-$brand_pink"}const s6e={onHide:c6e,show:false,mode:"pick",pickOkAction:void 0,modifyInitialSelectedIds:void 0,modifyOkAction:void 0},{proxyProps:l6e,updateProps:l6}=VG({Component:i6e,containerClassName:"ModalFavManager",defaultProps:s6e}),c6=new Xo;function c6e(){l6({show:false}),c6.emit("modal-close");}function GG(){return bt(l6e).show}async function u6e(e){l6({show:true,mode:"pick",pickOkAction:e}),await c6.once("modal-close");}async function Ly(e,t,n=true){l6({show:true,mode:"modify",modifyInitialSelectedIds:e,modifyOkAction:t,modifyAllowEmpty:n}),await c6.once("modal-close");}async function u6(e,t,n){if(ma(t,[n?.id]))return Ot.warning("请选择不同的收藏夹!"),false;if(!await pu.modifyFav(e,t,n?.id))return false;[...t??[],n?.id].filter(a=>a!==void 0).forEach(a=>h0(a));let i;return n?i=`${t?.length?"已移动收藏到":"已加入收藏"}「${n.title}」`:i="已取消收藏",Ot.success(i),true}var oM=new Map,Rb=new WeakMap,Z9=0,d6e;function f6e(e){return e?(Rb.has(e)||(Z9+=1,Rb.set(e,Z9.toString())),Rb.get(e)):"0"}function m6e(e){return Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>`${t}_${t==="root"?f6e(e.root):e[t]}`).toString()}function h6e(e){const t=m6e(e);let n=oM.get(t);if(!n){const r=new Map;let o;const i=new IntersectionObserver(a=>{a.forEach(l=>{var u;const d=l.isIntersecting&&o.some(m=>l.intersectionRatio>=m);e.trackVisibility&&typeof l.isVisible>"u"&&(l.isVisible=d),(u=r.get(l.target))==null||u.forEach(m=>{m(d,l);});});},e);o=i.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:i,elements:r},oM.set(t,n);}return n}function p6e(e,t,n={},r=d6e){if(typeof window.IntersectionObserver>"u"&&r!==void 0){const u=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:u,intersectionRect:u,rootBounds:u}),()=>{}}const{id:o,observer:i,elements:a}=h6e(n),l=a.get(e)||[];return a.has(e)||a.set(e,l),l.push(t),i.observe(e),function(){l.splice(l.indexOf(t),1),l.length===0&&(a.delete(e),i.unobserve(e)),a.size===0&&(i.disconnect(),oM.delete(o));}}function g6e({threshold:e,delay:t,trackVisibility:n,rootMargin:r,root:o,triggerOnce:i,skip:a,initialInView:l,fallbackInView:u,onChange:d}={}){var m;const[p,g]=f.useState(null),b=f.useRef(d),y=f.useRef(l),[S,C]=f.useState({inView:!!l,entry:void 0});b.current=d,f.useEffect(()=>{if(y.current===void 0&&(y.current=l),a||!p)return;let T;return T=p6e(p,(R,I)=>{const N=y.current;y.current=R,!(N===void 0&&!R)&&(C({inView:R,entry:I}),b.current&&b.current(R,I),I.isIntersecting&&i&&T&&(T(),T=void 0));},{root:o,rootMargin:r,threshold:e,trackVisibility:n,delay:t},u),()=>{T&&T();}},[Array.isArray(e)?e.toString():e,p,o,r,i,a,n,u,t]);const w=(m=S.entry)==null?void 0:m.target,$=f.useRef(void 0);!p&&w&&!i&&!a&&$.current!==w&&($.current=w,C({inView:!!l,entry:void 0}),y.current=l);const M=[g,S.inView,S.entry];return M.ref=M[0],M.inView=M[1],M.entry=M[2],M}function J9(e){return !f.Children.toArray(e.props?.children).length}function v6e(e){const[t,n]=f.useState(e),r=f.useRef(t),o=f.useCallback(a=>{const l=typeof a=="function"?a(r.current):a;r.current=l,n(l);},[n]),i=f.useCallback(()=>r.current,[]);return [t,o,i]}function Al(e){const[t,n,r]=v6e(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 iM(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 KG({src:e,avif:t,webp:n,imgProps:r,className:o,...i}){return t??=!pg,n??=true,H("picture",{className:sr("h-full w-full object-cover",o),...i,children:[t&&x("source",{srcSet:`${e}.avif`,type:"image/avif"}),n&&x("source",{srcSet:`${e}.webp`,type:"image/webp"}),x("img",{src:e,loading:"lazy",className:"block h-full w-full",...r})]})}const b6e=typeof unsafeWindow<"u"?unsafeWindow:globalThis,d6=(e,t)=>{Cf(()=>b6e[e]=t);},y6e=`${SM}_gridItems`;function S6e(e){const t=e.filter(n=>n.api!==Je.Separator);YRe(t),d6(y6e,t);}const C6e={getGenericCardDatas:KA,copyBvidsSingleLine:YA,copyBvidInfos:QA};setTimeout(()=>{Object.entries(C6e).forEach(([e,t])=>{d6(`${SM}_${e}`,t);});});function x6e(e){const{enabled:t,keywords:n}=bt(at.filter.byAuthor),{blockUpMids:r}=f.useMemo(()=>U3(n),[n]);return e?t&&r.has(e):false}var Tb={},$o={},x$={exports:{}},eL;function YG(){return eL||(eL=1,(function(e){function t(n){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},e.exports.__esModule=true,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=true,e.exports.default=e.exports;})(x$)),x$.exports}var tL;function f6(){if(tL)return $o;tL=1;var e=Ma();Object.defineProperty($o,"__esModule",{value:true}),$o.isUndef=$o.isString=$o.isObject=$o.isNumber=$o.isFunction=$o.isBoolean=void 0;var t=e(YG());return $o.isObject=function(r){return r!==null&&(0, t.default)(r)==="object"},$o.isFunction=function(r){return typeof r=="function"},$o.isString=function(r){return typeof r=="string"},$o.isBoolean=function(r){return typeof r=="boolean"},$o.isNumber=function(r){return typeof r=="number"},$o.isUndef=function(r){return typeof r>"u"},$o}var w$={},nL;function w6e(){return nL||(nL=1,(function(e){Object.defineProperty(e,"__esModule",{value:true}),e.default=void 0;var t=!!(typeof window<"u"&&window.document&&window.document.createElement);e.default=t;})(w$)),w$}var rL;function m6(){if(rL)return Tb;rL=1;var e=Ma();Object.defineProperty(Tb,"__esModule",{value:true}),Tb.getTargetElement=r;var t=f6(),n=e(w6e());function r(o,i){if(n.default){if(!o)return i;var a;return (0, t.isFunction)(o)?a=o():"current"in o?a=o.current:a=o,a}}return Tb}var XG=m6();async function $6e(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 l=(await Zt.get("/x/player/wbi/playurl",{params:o})).data;function u(p){return eM(p,[g=>E6e(g,r)],["desc"])}if(l?.data?.durl){const p=(l.data.durl||[]).map(g=>[g.url,...g.backup_url||[]]).flat().filter(Boolean);if(p.length)return u(p)}return eM(l.data?.dash?.video||[],["id","codecid"],["desc","desc"]).map(p=>u([p.baseUrl,...p.backupUrl||[]])[0]).filter(Boolean)}function E6e(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 h6(e){return !!(e?.image?.length&&e?.index?.length)}function oL(e){return jn(e)?h6(e.data):true}async function M6e(e){const n=(await Zt.get("/x/player/videoshot",{params:{bvid:e,index:"1"}})).data;return jn(n)||Ko("videoshot error for %s: %o",e,n),h6(n.data)||Ko("videoshot data invalid bvid=%s: %o",e,n.data),n}const $$=new e6({maxSize:1e4}),R6e=zs(async e=>{if($$.has(e)){const a=$$.get(e);if(a)return a}const t=5,n=200;let r=0,o;do{if(r++,o=await M6e(e),oL(o))break;await pn(n);}while(r<t);oL(o)&&$$.set(e,o);const i=o.data;if(at.videoCard.imgPreview.autoPreviewWhenHover){const a=i?.image||[];await q9(a[0]),(async()=>{for(const l of a.slice(1))await q9(l);})();}return o}),T6e=io.extend("VideoCard:services");function QG(e){return async function(n){const r=new URLSearchParams({aid:n,csrf:oc()}),i=(await Zt.post(`/x/v2/history/toview/${e}`,r)).data,a=jn(i);return a||rn(i?.message||"出错了"),a}}const aM=QG("add"),A6e=QG("del"),ZG=e=>{const t={dislike:"/x/feed/dislike",cancel:"/x/feed/dislike/cancel"}[e];return async function(n,r){const i=(await vg.get(vz+t,{responseType:"json",params:{goto:n.goto,id:n.param,reason_id:r,build:"1",mobi_app:"android",idx:(Date.now()/1e3).toFixed(0)}})).data,a=jn(i);let l=i.message;return a||(l||=jp,l+=`(code ${i.code})`,l+=`
请重新获取 access_key 后重试`),{success:a,json:i,message:l}}},N6e=ZG("dislike"),P6e=ZG("cancel");async function I6e(e){return {videoshotJson:await R6e(e)}}function O6e(e){return h6(e?.videoshotJson?.data)}const D6e=e=>!!e?.playUrls?.length,iL=new e6({maxSize:1e4,maxAge:so("1h")}),_6e=zs(async({bvid:e,cid:t,useMp4:n,usePreferredCdn:r,aspectRatioFromItem:o})=>{const i=JSON.stringify([e,n,r]),a=iL.get(i);if(a)return a;let l;if(t===void 0||o===void 0){const m=await Jq(e);if(t=m[0]?.cid,l=m[0]?.dimension,t===void 0)throw new TypeError(`can not get cid by bvid=${e}`)}const[u,d]=await Hp(()=>$6e(e,t,n,r));if(T6e("playUrl: bvid=%s cid=%s %s",e,t,d),u)throw ua.error({title:"获取视频播放地址失败",description:u.message||u}),u;return d?.length&&iL.set(i,{playUrls:d,dimension:l}),{playUrls:d??void 0,dimension:l}}),L6e=io.extend("VideoCard:LargePreview"),JG={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"}},fo={border:40,card:10};function z6e(e){return e?.closest(N3(Nl,"bili-video-card"))?.querySelector(N3(yz,"bili-video-card__image"))?.getBoundingClientRect()}const B6e=f.memo(function({children:t,aspectRatio:n=1.7777777777777777,cardDescendantTarget:r,ref:o,...i}){const a=V1(o),[l,u]=f.useState(false),[d,m]=f.useState(void 0),p=nt(()=>{u(false),m(void 0);}),g=nt(()=>{const $=z6e(XG.getTargetElement(r)??void 0);if(!$)return p();const[M,T]=[document.documentElement.clientWidth,document.documentElement.clientHeight],R=40;if($.top>T-R||$.bottom<0+R||$.left>M-R||$.right<0+R)return p();const I={top:{x:0,y:0,width:M,height:$.top},bottom:{x:0,y:$.bottom,width:M,height:T-$.bottom},left:{x:0,y:0,width:$.left,height:T},right:{x:$.right,y:0,width:M-$.right,height:T}},N=Y=>{const ee=n,J=1,te=Y.width/ee,ne=Y.height/J;return {scale:Math.min(te,ne),scaleLimit:te>ne?"height":"width"}},P=Ss(Object.entries(I).map(([Y,ee])=>({direction:Y,bbox:ee,...N(ee)})),["scale",Y=>{switch(Y.direction){case "top":return $.top;case "bottom":return T-$.bottom;case "left":return $.left;case "right":return M-$.right}}],["desc","desc"])[0];L6e("picked direction",P);const{direction:O,bbox:_,scale:L,scaleLimit:j}=P;let U,q;if(j==="width")U=Math.floor(_.width-(fo.card+fo.border)),q=U/n;else if(j==="height")q=Math.floor(_.height-(fo.card+fo.border)),U=q*n;else throw new Error("unexpected scaleLimit");let V=0,B=0,F=0,W=0;const K=()=>{F=$.y+$.height/2-B;},Q=()=>{W=$.x+$.width/2-V;},D=()=>{if(V<fo.border){V=fo.border;return}if(V+U>M-fo.border){V=M-fo.border-U;return}},z=()=>{if(B<fo.border){B=fo.border;return}if(B+q>T-fo.border){B=T-fo.border-q;return}};switch(O){case "top":V=$.x+$.width/2-U/2,B=$.top-fo.card-q,D(),Q();break;case "bottom":V=$.x+$.width/2-U/2,B=$.bottom+fo.card,D(),Q();break;case "right":V=$.right+fo.card,B=$.y+$.height/2-q/2,z(),K();break;case "left":V=$.left-fo.card-U,B=$.y+$.height/2-q/2,z(),K();break}V=Math.floor(V),B=Math.floor(B),u(true),m({direction:O,elWidth:U,elHeight:q,elPosX:V,elPosY:B,arrowTop:F,arrowLeft:W});}),b=f.useMemo(()=>Gl(g,100),[g]);ro(b),va("resize",b,{target:window}),va("scroll",b,{target:window});const{useScale:y}=Ut().videoCard.videoPreview,S=y?.2:.3,C=f.useMemo(()=>{const $=d?.direction;if(!$)return;const{axis:M,multiplier:T,reverse:R}=JG[$];if(y)return M==="x"?{scale:.5,transformOrigin:`${R} ${d.arrowTop}px`}:{scale:.5,transformOrigin:`${d.arrowLeft}px ${R}`};{let I=30;return $==="top"&&(I=20),M==="x"?{x:-T*I,y:0}:{x:0,y:-T*I}}},[d,y]);return x("div",{...i,ref:a,className:X("fixed",ACe,l?"block":"hidden"),css:d&&ln("width:",d.elWidth,"px;height:",d.elHeight,"px;top:",d.elPosY,"px;left:",d.elPosX,"px;",""),children:l&&H(qT.div,{className:"relative h-100%",initial:{opacity:0,...C},animate:{opacity:1,x:0,y:0,scale:1},transition:{bounce:0,duration:S},children:[d?.direction&&x(k6e,{size:7,direction:d.direction,arrowTop:d.arrowTop,arrowLeft:d.arrowLeft}),x("div",{className:"h-full overflow-hidden rounded-20px bg-white/50% backdrop-blur-10px",css:ln("box-shadow:0px 0px 1px 1px ",xa,";",""),children:t})]})})});function k6e({size:e,direction:t,arrowTop:n,arrowLeft:r}){const{axis:o,multiplier:i,reverse:a}=JG[t],l=f.useMemo(()=>o==="x"?ln`
${t}: 100%;
margin-${t}: -1px;
top: ${n}px;
margin-top: -${e/2}px;
`:ln`
${t}: 100%;
margin-${t}: -1px;
left: ${r}px;
margin-left: -${e/2}px;
`,[e,t,o,n,r]);return x("div",{className:"absolute box-content h-0 w-0",css:[ln("border:",e,"px solid transparent;",""),l,ln`
border-${t}-color: ${xa};
`,"",""]})}const Ed=await( sT({volume:void 0,muted:void 0},"large-preview-store")),F6e=function({currentTimeRef:e,ref:t,...n}){const r=V1(t),o=f.useRef(false);ro(()=>{r.current&&(typeof e.current=="number"&&(r.current.currentTime=e.current),typeof Ed.volume=="number"&&(r.current.volume=Ed.volume),typeof Ed.muted=="boolean"&&(r.current.muted=Ed.muted)),o.current=true;});const i=nt(()=>{o.current&&(e.current=r.current?.currentTime);}),a=nt(()=>{o.current&&r.current&&(Ed.volume=r.current.volume,Ed.muted=r.current.muted);});return x("video",{ref:r,...n,onTimeUpdate:i,onVolumeChange:a})},H6e=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("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"})]}),V6e=f.forwardRef(H6e),j6e=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,children:[x("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"}),x("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"})]})]}),U6e=f.forwardRef(j6e);function aL(e){e.current!==void 0&&(clearTimeout(e.current),e.current=void 0);}function eK({shouldFetchPreviewData:e,hasLargePreviewActionButton:t,actionButtonVisible:n,actionButtonProps:r,actionButtonCss:o,bvid:i,cid:a,uniqId:l,recSharedEmitter:u,cardTarget:d,aspectRatioFromItem:m,cover:p,videoCardAsTriggerRef:g}){const{useMp4:b,useVideoCardAsTrigger:y,usePreferredCdn:S}=bt(at.videoCard.videoPreview),C=Al(void 0),w=xg(async()=>{if(!e||D6e(C.val))return;const re=await _6e({bvid:i,cid:a,useMp4:b,usePreferredCdn:S,aspectRatioFromItem:m});C.set(re);});As(()=>{C.set(void 0);},[b,S]);const $=ga(w,{manual:true,loadingDelay:100}),[M,T]=f.useState(false),R=Al(void 0),I=Al(void 0),N=Al(void 0),P=iM({}),O=nt(()=>N.val?Date.now()-N.val<1200:false),_=f.useRef(void 0),L=f.useRef(void 0),j=nt(()=>{aL(_),aL(L);}),U=nt((re,de)=>{T(true),R.set(re),I.set(de),u.emit("show-large-preview",l),N.set(void 0);}),q=nt(()=>{T(false),R.set(void 0),I.set(void 0),N.set(Date.now());});po(u,"show-large-preview",re=>{re!==l&&(j(),q());});const V=nt(re=>{if(P.set({...P.val,[re]:true}),R.val==="click")return;$.run(),j();let de=0;re==="video-card-action-button"&&(de=200),re==="video-card"&&(de=1e3),de?_.current=setTimeout(()=>U("hover",re),de):U("hover",re);}),B=nt(re=>{if(P.set({...P.val,[re]:false}),R.val==="click")return;const de=()=>{P.val.popover||P.val["video-card-action-button"]||q();};j(),re==="video-card-action-button"||re==="video-card"||re==="popover"?L.current=setTimeout(de,250):de();}),F=nt(re=>{j(),R.val==="click"?q():U("click",re);}),W=nt(()=>{if(Y.current)return Math.floor(Y.current)}),K=nt(()=>!!(M||O())),Q=nt(()=>{if(!i)return;const re=new URL(`https://${Ol.Main}/video/${i}`),de=W();de&&re.searchParams.set("t",de.toString()),fi(re.href),z.current?.pause(),q();}),D=f.useMemo(()=>BA({dimensionFromApi:C.state?.dimension})?.aspectRatio??m,[C.state?.dimension]),z=f.useRef(null),Y=f.useRef(void 0),ee=f.useRef(null),J=M&&!!C.state?.playUrls?.length,te=J&&H(B6e,{ref:ee,aspectRatio:D,onMouseEnter:re=>V("popover"),onMouseLeave:re=>B("popover"),cardDescendantTarget:d,children:[x(F6e,{ref:z,currentTimeRef:Y,autoPlay:true,controls:true,loop:true,poster:p,className:"size-full object-contain",children:C.state?.playUrls?.map((re,de)=>x("source",{src:re},de))}),H("div",{className:"absolute right-10px top-10px flex flex-row-reverse items-center justify-start gap-x-5px",children:[R.state==="click"?x(Ba,{inlinePosition:"right",icon:x($3e,{className:"size-14px"}),tooltip:"关闭",onClick:re=>{re.preventDefault(),re.stopPropagation(),q();}}):x(Ba,{inlinePosition:"right",icon:x(V6e,{className:"size-14px"}),tooltip:"固定",onClick:re=>{re.preventDefault(),re.stopPropagation(),F("popover-action-button");}}),x(Ba,{inlinePosition:"right",icon:x(rW,{className:"size-14px"}),tooltip:"新窗口打开",onClick:re=>{re.preventDefault(),re.stopPropagation(),Q();}})]})]}),ne=t&&e&&x(Ba,{css:o,...r,visible:n,active:J,inlinePosition:"right",icon:$.loading?x(zj,{className:"size-16px"}):x(U6e,{className:"size-15px"}),tooltip:R.state==="click"&&M?"关闭浮动预览":"浮动预览",onMouseEnter:re=>V("video-card-action-button"),onMouseLeave:re=>B("video-card-action-button"),onClick:re=>{re.preventDefault(),re.stopPropagation(),F("video-card-action-button");}},"video-card-action-button");da("esc",()=>{ks()||q();},{exactMatch:true}),t$e(()=>q(),[ee,()=>XG.getTargetElement(d)?.closest(N3(Nl,"bili-video-card"))]),va("fullscreenchange",()=>{document.fullscreenElement&&(!M||R.val==="click"||document.fullscreenElement===z.current&&U("click","popover-video-fullscreen-button"));},{target:document});const se=f.useRef(null),ae=g||se;return va("mouseenter",()=>{!y||!g||V("video-card");},{target:ae}),va("mouseleave",()=>{!y||!g||B("video-card");},{target:ae}),{largePreviewActionButtonEl:ne,largePreviewEl:te,getLargePreviewCurrentTime:W,shouldUseLargePreviewCurrentTime:K,largePreviewVisible:M,hideLargePreview:q}}const q6e=bEe(xa,.1),Hi={normalBorder:ln("border-color:",yU,";",""),activeBorder:ln("border-color:",xa,";box-shadow:0px 0px 9px 4px ",q6e,";",""),rounded:ln("border-radius:",uA,";",""),bgLv1:ln("background-color:",by,";",""),coverZoomEffect:{name:"dj03ws",styles:".bili-video-card__cover{transform-origin:center center;transition:transform 0.2s ease-out;transform:scale(1.05);}"}},W6e=ln(Hi.activeBorder," &:hover{",Hi.activeBorder,";}","");function G6e(e){const t=`--${oo}--separator-color`;return f.useMemo(()=>{if(e)return ln`
${Hi.rounded}
${Hi.normalBorder}
background-color: ${P3};
${t}: ${by};
&:hover {
background-color: ${by};
${t}: ${iwe};
}
/* disable padding */
margin-inline: 0;
.bili-video-card__wrap {
padding: 0;
}
`},[e])}var K6e={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 Y6e(){const{useDelayForHover:e,style:{videoCard:{useBorder:t,useBorderOnlyOnHover:n,useBoxShadow:r}}}=Ut(),{multiSelecting:o}=bt(Hn),i=BEe();return f.useMemo(()=>[K6e,(o||t&&!i)&&[ln("cursor:pointer;",Hi.rounded," &:hover{",Hi.bgLv1," ",Hi.normalBorder," ",r&&Hi.activeBorder," ",e&&Hi.coverZoomEffect,";}",""),(o||!n)&&Hi.normalBorder]],[t,n,r,e,i,o])}function X6e(e){return e&&[Hi.rounded,Hi.activeBorder]}const Q6e="_skeleton-active_wlycr_12";function Z6e(e,t){const[n,r]=f.useState(void 0),[o,i]=f.useState(void 0),[a,l]=f.useState(void 0),u=nt(async()=>{if(!t)return;const{enable:d}=tK(e.api);if(!(d||vu(e)&&e.from==="fav-folder"))return;const m=await pu.getVideoFavState(t);m&&(r(m.favFolderNames),i(m.favFolderUrls),l(m.favFolderIds));});return f.useMemo(()=>({folderNames:n,folderUrls:o,folderIds:a,updateFavFolderNames:u}),[n,o,a,u])}function tK(e){const t=![Je.Separator,Je.Live,Je.Fav].includes(e),n=e===Je.Watchlater||e===Je.Liked;return {enable:t,enableDetailMenu:n}}function J6e(e,t,n){if(!n)return;const{enable:r,enableDetailMenu:o}=tK(t.api);if(!r)return;const i=e.folderNames??[],a=e.folderUrls??[],l=e.folderIds??[],u=gi([{key:"quick-fav:faved:modify-fav",icon:x(ZSe,{className:X(Tn,"color-gate-primary")}),label:`已收藏在 ${(i||[]).map(p=>`「${p}」`).join("")}`,async onClick(){qi(l.length,"folderIds.length should not be empty"),await Ly(l,p=>u6(n,l,p));}},{test:o,key:"quick-fav:faved:browse-fav-folder-in-self-space",icon:x(No,{className:Tn}),label:"去个人空间查看收藏夹",onClick(){a.forEach(p=>{window.open(p,f0());});}}]),d=gi([{key:"quick-fav:unfaved:add-fav",icon:x(ff,{className:Tn}),label:"收藏到",async onClick(){await u6e(async p=>{const g=await pu.addFav(n,p.id);return g&&Ot.success(`已加入收藏夹「${p.title}」`),g});}},{test:o,key:"quick-fav:unfaved:add-fav-to-default-folder",icon:x(ff,{className:Tn}),label:"收藏到「默认收藏夹」",async onClick(){await pu.addFav(n)&&Ot.success(`已加入收藏夹「${V3}」`);}}]);return !!i.length?u:d}function eNe({ctx:e,item:t,cardData:n,tab:r,multiSelecting:o,multiSelectingAppendix:i,onRemoveCurrent:a,recSharedEmitter:l}){if(!vu(t))return [];const{avid:u}=n;e.folderNames,e.folderUrls;const d=e.folderIds??[];if(t.from==="fav-folder"){const m=o?[{key:"fav:batch-move-fav",label:`移动到其他收藏夹${i}`,icon:x(HH,{className:Tn}),async onClick(){if(!Hn.multiSelecting)return;const p=eS().filter(w=>vu(w)&&w.from==="fav-folder").toReversed(),g=new Set(p.map(w=>w.folder.id));if(!g.size)return rn("至少选择一项视频");if(g.size>1)return rn("多选移动: 只能批量移动同一源收藏夹下的视频");const b=p[0].folder.id,y=p.map(w=>`${w.id}:${w.type}`),S=p.map(w=>w.uniqId),C=p.map(w=>w.title);await Ly([t.folder.id],async w=>{qi(w,"targetFolder should not be empty");const $=await pu.moveFavs(y,b,w.id);if($)return h0(t.folder.id),h0(w.id),l.emit("remove-cards",[S,C,true]),Ot.success(`已移动 ${S.length} 个视频到「${w.title}」收藏夹`),$},false);}}]:[];return gi([{key:"fav:browse-fav-folder-in-self-space",label:"去个人空间查看收藏夹",icon:x(No,{className:Tn}),onClick(){const{id:p}=t.folder,g=TA(p);window.open(g,f0());}},{key:"fav:view-fav-in-new-window",label:"在新窗口中查看收藏夹",icon:x(No,{className:Tn}),onClick(){const{id:p}=t.folder,g=`/?${$y.FolderIdFull}=${p}`;window.open(g,f0());}},{test:!!u,key:"modify-fav",icon:x(YT,{className:Tn}),label:"编辑收藏",async onClick(){await Ly(d,async p=>{const g=await u6(u,d,p);return g&&p?.id!==t.folder.id&&a?.(t,n,true),g},false);}},{key:"remove-fav",label:"移除收藏",icon:x(Vf,{className:Tn}),async onClick(){if(!await uT.confirm({centered:true,title:"移除收藏",content:H(ze,{children:["确定将视频「",t.title,"」",x("br",{}),"从收藏夹「",t.folder.title,"」中移除?"]})}))return;const g=`${t.id}:${t.type}`;await pu.removeFavs(t.folder.id,g)&&(h0(t.folder.id),a?.(t,n));}},...m])}return t.from==="fav-collection"?gi([{key:"open-fav-collection",label:"浏览合集",icon:x(No,{className:Tn}),onClick(){const{id:m}=t.collection,p=r!==et.Fav||mn.selectedKey==="all"&&mn.usingShuffle?`/?${$y.CollectionIdFull}=${m}`:Fq(m);window.open(p,f0());}}]):[]}const tNe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:4,children:[x("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"}),x("path",{strokeLinejoin:"round",d:"M31 30h12m-28-8l7 7l19-18m-4 13v12"})]})]}),nNe=f.forwardRef(tNe),rNe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",children:[x("path",{stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,d:"M19 20a7 7 0 1 0 0-14a7 7 0 0 0 0 14Z"}),x("path",{d:"M30 35h12z",clipRule:"evenodd"}),x("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"})]})]}),oNe=f.forwardRef(rNe),iNe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",children:[x("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"}),x("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"}),x("path",{stroke:"currentColor",strokeWidth:2,d:"m5 2l16 16"})]})]}),sL=f.forwardRef(iNe),Tn="size-16px";function aNe(e){const{item:t,cardData:n,tab:r,favContext:o,watchlaterContext:i,hasDislikeEntry:a,onTriggerDislike:l,onRemoveCurrent:u,consistentOpenMenus:d,conditionalOpenMenus:m,multiSelecting:p}=e,{avid:g,bvid:b,cover:y,href:S,recommendReason:C,authorName:w,authorMid:$}=n,{watchlaterItemsOrder:M,filter:{dfHideOpusMids:{enabled:T}},dynamicFeed:{whenViewAll:{enableHideSomeContents:R}}}=Ut(),I=M===vo.AddTimeAsc?"end":"start",N=M===vo.AddTimeAsc?"移到最后":"移到最前",{recSharedEmitter:P}=Xi(),O=nt(()=>{let ie=S;S.startsWith("/")&&(ie=new URL(S,location.href).href),nu(ie);}),_=!!$&&xG(t.api)&&r!==et.KeepFollowOnly,L=nt(async()=>{if(!$)return Ot.error("UP mid 为空!");await YW.add($)&&Ot.success(`已加入黑名单: ${w}`);}),j=nt(async()=>{if(!$)return Ot.error("UP mid 为空!");const ie=`${$}`;if(at.filter.byAuthor.keywords.includes(ie))return rn(`已在过滤名单中: ${ie}`);await Ua("filter.byAuthor.keywords",{add:[ie]}),w&&v$($,w),Ot.success(`已加入过滤名单: ${w||$}`);}),U=Fa(n.followed)?r===et.DynamicFeed&&Lp(t)||r===et.Live&&Lp(t)?true:bf(t)||J1(t)?r6(C):false:n.followed,q=U,V=nt(async()=>{if(!$||!await uT.confirm({centered:true,title:"取消关注",content:H(ze,{children:["确定取消关注「",w,"」?"]})}))return;await ATe.unfollow($)&&Ot.success("已取消关注");}),B=!!$&&!!w,F=nt(()=>{$&&fi(`/?${pi.Mid}=${$}`);}),W=nt(()=>{$&&fi(`/?${ka.Mid}=${$}`);}),K=R&&Fd(t)&&Jt.selectedKey===_p&&!!$,Q=nt(async()=>{K&&(await Ua("dynamicFeed.whenViewAll.hideIds",{add:[vf+$]}),v$($,w||""),Ot.success(`在「全部」动态中隐藏【${w}】的动态`));}),D=T&&Fd(t)&&t.modules.module_dynamic.major?.type===mi.MajorType.Opus&&!!$,z=nt(async()=>{if(!$)return Ot.error("UP mid 为空!");const ie=`${$}`;if(at.filter.dfHideOpusMids.keywords.includes(ie))return rn(`已在过滤名单中: ${ie}`);await Ua("filter.dfHideOpusMids.keywords",{add:[ie]}),w&&v$($,w),Ot.success(`已屏蔽【${w||$}】的图文动态`);}),Y=!!(Fd(t)&&Ps&&Jt.viewingSomeUp&&$),ee=f.useMemo(()=>Y&&{label:"动态: 从此项开始查看",key:"动态: 从此项开始查看",icon:x(s_,{className:Tn}),onClick(){const ie=new URL("/",location.href);ie.searchParams.set(pi.Mid,$);const Ee=Is().findIndex(ue=>ue.api===Je.DynamicFeed&&ue.id_str===t.id_str),le=Is()[Ee-1]?.id_str||t.id_str;ie.searchParams.set(pi.Offset,le),fi(ie.href);}},[Y,t,$]),J=f.useMemo(()=>Y&&{icon:x(WSe,{className:Tn}),label:"动态: 从此项开始截止",key:"动态: 从此项开始截止",onClick(){const ie=new URL("/",location.href);ie.searchParams.set(pi.Mid,$),ie.searchParams.set(pi.MinId,t.id_str),fi(ie.href);}},[Y,t,$]),te=f.useMemo(()=>Y3&&Q3(t)&&!!t.page&&{key:"space-upload-view-start-from-here",label:`投稿: 从此页开始查看 (当前第${t.page}页)`,icon:x(s_,{className:Tn}),onClick(){const ie=new URL(location.href);ie.searchParams.set(ka.InitialPage,t.page.toString()),fi(ie.href);}},[Y3,t]),ne=Fd(t)||Q3(t)?t.groupId:void 0,se=ne!==void 0,ae=bt(Jt.groups),re=ne!==void 0?ae.find(ie=>ie.tagid===ne):void 0,de=re?.name,ge=re?.count;return f.useMemo(()=>{const{watchlaterAdded:ie,hasWatchlaterEntry:Ee,onToggleWatchlater:le}=i,ue={type:"divider"},Se=p?" (多选)":"",ye=gi([{key:"copy-link",label:`复制视频链接${Se}`,icon:x(tu,{className:Tn}),onClick(){Hn.multiSelecting?ZRe():O();}},{test:!!b,key:"copy-bvid",label:`复制 BVID${Se}`,icon:x(tu,{className:Tn}),onClick(){Hn.multiSelecting?YA():nu(b);}},{test:!!b&&at.__internalEnableCopyBvidInfo,key:"copy-bvid-info",label:`复制 BVID 信息${Se}`,icon:x(tu,{className:Tn}),onClick(){Hn.multiSelecting?QA():nu(XA(n));}},{test:!!y,key:"view-cover",label:"查看封面",icon:x(No,{className:Tn}),onClick(){if(!y)return;fi(y);}}]),Be=gi([{test:B&&U,key:"查看「投稿」与「动态」的区别",label:"查看「投稿」与「动态」的区别",icon:x(No,{className:Tn}),onClick:()=>fi("https://github.com/magicdawn/Bilibili-Gate?tab=readme-ov-file#%E5%8F%B3%E9%94%AE%E8%8F%9C%E5%8D%95-%E6%9F%A5%E7%9C%8B-up-%E7%9A%84%E6%8A%95%E7%A8%BF--%E6%9F%A5%E7%9C%8B-up-%E7%9A%84%E5%8A%A8%E6%80%81")},{test:B,key:"查看 UP 的投稿",label:"查看 UP 的投稿",icon:x(py,{className:Tn}),onClick:W},te,{test:B&&U,key:"查看 UP 的动态",label:"查看 UP 的动态",icon:x(hy,{className:Tn}),onClick:F},J,ee,...B&&se?gi([{type:"divider"},{test:B&&se&&(ge===void 0||ge<=30),key:"查看分组的投稿",label:"查看分组的投稿",icon:x(py,{className:Tn}),onClick:()=>fi(`/?${ka.GroupId}=${ne}`)},{test:B&&se,key:"查看分组的动态",label:"查看分组的动态",icon:x(hy,{className:Tn}),onClick:()=>fi(`/?${pi.GroupId}=${ne}`)},{type:"divider"}]):[],{test:Ee,key:"watchlater",label:ie?"移除稍后再看":"稍后再看",icon:ie?x(Vf,{className:Tn}):x(QT,{className:Tn}),onClick(){le();}},{test:Ee&&ie,key:"watchlater-readd",label:`重新添加稍候再看${r===et.Watchlater?` (${N})`:""}`,icon:x(nNe,{className:Tn}),async onClick(){const{success:be}=await le(void 0,aM);be&&(Ot.success("已重新添加"),r===et.Watchlater&&P.emit("move-card-to",[t.uniqId,I]));}},...J6e(o,t,g)??[]]),je=gi([{test:a,key:"dislike",label:"我不想看",icon:x(GT,{width:15,height:15}),onClick(){l();}},{test:q,key:"unfollow-up",label:"取消关注",icon:x(oNe,{className:Tn}),onClick:V},{test:K,key:"hasEntry_addMidTo_dynamicFeedWhenViewAllHideIds",label:"在「全部」动态中隐藏 UP 的动态",icon:x(sL,{className:Tn}),onClick:Q},{test:D,key:"hide-up-opus-dynamic",label:"屏蔽此 UP 的图文动态",icon:x(sL,{className:Tn}),onClick:z},{test:_,key:"blacklist-up",label:"将 UP 加入黑名单",icon:x(M3,{className:Tn}),onClick:L},{test:_,key:"add-up-to-filterlist",label:"将 UP 加入过滤列表",icon:x(M3,{className:Tn}),onClick:j}]),Ne=eNe({ctx:o,item:t,cardData:n,tab:r,multiSelecting:p,multiSelectingAppendix:Se,onRemoveCurrent:u,recSharedEmitter:P});return gi([...d,!!ye.length&&ue,...ye,!!Be.length&&ue,...Be,!!je.length&&ue,...je,!!Ne.length&&ue,...Ne,!!m.length&&ue,...m])},[t,n,r,i,o,a,q,_,B,K,D,d,m,p,ne,se,de,ge,P,u])}function wh(e){if(e.altKey)return e.stopPropagation(),true}const kp=nc(()=>Date.now()),sNe=(Gn().add(1,"minute").startOf("minute").valueOf()-kp.get())%3e4;setTimeout(()=>{kp.update(),setInterval(kp.update,3e4);},sNe);document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&kp.update();});const lNe=f.memo(function({ts:t}){return t?ERe(t)?x(cNe,{ts:t}):x(nK,{ts:t}):null});function nK({ts:e}){return f.useMemo(()=>MRe(e),[e])}function cNe({ts:e}){const t=kp.use();return x(nK,{ts:e},t)}const uNe=X(VQ,"max-w-[calc(100%-6px)] w-max cursor-default overflow-hidden text-ellipsis whitespace-nowrap b-1px b-gate-border rounded-9px b-solid px-8px py-0 text-12px color-gate-primary line-height-17px"),dNe=X("line-clamp-2 mt-10px h-auto whitespace-normal"),fNe=ln("background-color:oklch(from ",xa," calc(l * 0.1 + 0.88) calc(c * 0.25) h);",pU," &{background-color:oklch(from ",xa," calc(l * 0.3 + 0.175) calc(c * 0.25) h);}",""),mNe=ln("color:",xa,";border-radius:2px;border:1px ",xa," solid;line-height:20px;padding:0 10px;transform:scale(0.8);transform-origin:center left;",""),Ab={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 hNe={name:"15xw6zv",styles:"display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;overflow:hidden;text-overflow:ellipsis;max-width:100%"},pNe={name:"feo88y",styles:".bili-video-card .bili-video-card__info--tit>a&{font-family:inherit;font-weight:initial;}"},gNe={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 rK=f.memo(function({item:e,cardData:t,handleVideoLinkClick:n,className:r,gridDisplayMode:o}){const{useBorder:i}=bt(at.style.videoCard),a=G1(),l=RA(o),{goto:u,href:d,title:m,titleRender:p,pubts:g,pubdateDisplay:b,pubdateDisplayForTitleAttr:y,recommendReason:S,authorName:C,authorFace:w,authorMid:$,appBadge:M,appBadgeDesc:T,rankingDesc:R,liveExtraDesc:I}=t,N=u==="av",P=$?Tg($):d,O=e.api===Je.Live&&e.live_status===La.Streaming,{data:_}=ga(()=>OAe(e,t),{refreshDeps:[e,t]}),L=f.useMemo(()=>{if(N&&(C||g||_||b||y)){let q;return g||_?q=Gn.unix(g||_).format("YYYY年M月D日 HH:mm"):q=b,[C,y||q].filter(Boolean).join(" · ")}},[N,C,g,_,b,y]),j=sr(uNe,l&&dNe);return H("div",{className:X(l?"pt-5px":"pt-15px","flex gap-x-5px overflow-hidden px-5px",i?"mb-10px":"mb-5px",r),children:[!!$&&H("a",{href:P,target:a,className:X("relative flex-center self-start rounded-full p-1px ring-1px",O?"ring-gate-primary":"ring-gate-border"),children:[w?x(Yc,{src:o6(w)}):x(Yc,{children:C?.[0]||T?.[0]||""}),O&&x(XT,{active:true,className:"absolute bottom-0 right-0 size-12px rounded-full bg-gate-primary"})]}),H("div",{className:"ml-5px flex flex-1 flex-col gap-y-4px overflow-hidden",children:[x("h3",{className:"bili-video-card__info--tit",title:m,css:gNe,children:x("a",{onClick:n,onContextMenu:wh,href:d,target:a,rel:"noopener",css:pNe,children:p??m})}),U()]})]});function U(){const q=!!S&&x("div",{title:S,css:fNe,className:j,children:S}),V=()=>{let B;return g||_?B=x(lNe,{ts:g||_}):b&&(B=b),H(ze,{children:[H("a",{className:"bili-video-card__info--owner",href:P,target:a,title:L,css:Ab,onContextMenu:wh,children:[x("span",{className:"bili-video-card__info--author",children:C}),!!B&&H("span",{className:"bili-video-card__info--date",children:[n6,B]})]}),q]})};return N?V():M||T?H("a",{className:"bili-video-card__info--owner",css:Ab,href:d,target:a,onContextMenu:wh,children:[!!M&&x("span",{css:mNe,children:M}),!!T&&x("span",{children:T})]}):GW(e)&&R?x("div",{css:Ab,children:R}):Lp(e)||J1(e)&&e.goto===xs.Live?H(ze,{children:[H("a",{css:[Ab,hNe,"",""],href:P,target:a,title:(C||"")+(I||""),onContextMenu:wh,children:[C,I&&x("span",{className:"ml-4px",children:I})]}),q]}):V()}}),vNe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,children:[x("path",{d:"M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4S4 12.954 4 24s8.954 20 20 20Z"}),x("path",{strokeLinecap:"round",d:"M24 29c5 0 7 4 7 4H17s2-4 7-4m8-12l-3 3l3 3m-16-6l3 3l-3 3"})]})]}),bNe=f.forwardRef(vNe),yNe=f.memo(function({loading:t}){return H("div",{className:X("bili-video-card__skeleton",{hide:!t,[Q6e]:t}),children:[x("div",{className:"bili-video-card__skeleton--cover",style:{borderRadius:uA}}),H("div",{className:"bili-video-card__skeleton--info px-5px",children:[x("div",{className:"bili-video-card__skeleton--avatar size-32px rounded-full"}),H("div",{className:"bili-video-card__skeleton--right ml-10px flex-1",children:[x("p",{className:"bili-video-card__skeleton--text"}),x("p",{className:"bili-video-card__skeleton--text short"}),x("p",{className:"bili-video-card__skeleton--light"}),x("p",{className:"bili-video-card__skeleton--text tiny"})]})]})]})}),vi={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 gap-y-2",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-$bilibili-gate--separator-color b-t-solid transition-duration-300 transition-property-[border-color]",actionButton:"flex cursor-pointer items-center rounded-lg bg-transparent p-15px text-16px color-inherit"},SNe=f.memo(function({item:t,cardData:n,dislikedReason:r,emitter:o=kj}){const i=nt(async()=>{if(!r?.id)return;let a=false,l="",u;try{({success:a,message:l}=await P6e(t,r.id));}catch(d){u=d;}if(u)return console.error(u.stack||u),Gj();a?(Ot.success("已撤销"),ZAe(t.param)):Ot.error(l||jp);});return po(o,"cancel-dislike",i),H("div",{className:vi.wrapper,children:[x("div",{className:vi.cover,children:H("div",{className:vi.coverInner,children:[x(bNe,{className:"size-32px"}),x("div",{className:vi.dislikeReason,children:r?.name}),x("div",{className:vi.dislikeDesc,children:r?.toast||"将减少此类内容推荐"})]})}),x(oK,{item:t,cardData:n,onClick:i})]})});function oK({item:e,cardData:t,onClick:n}){return H("div",{className:vi.action,children:[x(rK,{item:e,cardData:t,className:"invisible"}),x("div",{className:vi.actionInner,children:H("button",{className:vi.actionButton,onClick:n,children:[x(gy,{className:"mr-4px mt--2px size-16px"}),"撤销"]})})]})}const lL=f.memo(function({item:t,cardData:n,blockType:r}){const{authorMid:o,authorName:i}=n,a=r==="blacklist"?"已拉黑":"已加入过滤列表",l=nt(()=>r==="blacklist"?u():d()),u=nt(async()=>{if(!o)return;await YW.remove(o)&&Ot.success(`已移出黑名单: ${i}`);}),d=nt(()=>{if(!o)return;const m=at.filter.byAuthor.keywords.filter(p=>X1(p).mid===o);Ua("filter.byAuthor.keywords",{remove:m}),Ot.success(`已移出过滤列表: ${i}`);});return H("div",{className:vi.wrapper,children:[x("div",{className:vi.cover,children:H("div",{className:vi.coverInner,children:[x(M3,{className:"size-32px"}),x("div",{className:vi.dislikeReason,children:a}),H("div",{className:vi.dislikeDesc,children:["UP: ",i]})]})}),x(oK,{item:t,cardData:n,onClick:l})]})}),CNe=X("pointer-events-none absolute inset-0 overflow-hidden",mCe,"rounded-b-none rounded-t-gate-video-card"),xNe=f.memo(function({videoDuration:t,pvideo:n,progress:r,t:o,className:i,ref:a,...l}){const u=f.useRef(null),[d,m]=f.useState(()=>({width:0,height:0}));ro(()=>{const S=u.current?.getBoundingClientRect();S&&m({width:S.width,height:S.height});});const p=f.useMemo(()=>{function S(){return typeof r=="number"&&!Number.isNaN(r)?r:0}return uf(S()??0,0,1)},[r]),g=f.useMemo(()=>o??Math.floor((t||0)*p),[o,t,p]),b=nt(()=>g);f.useImperativeHandle(a,()=>({getT:b}),[b]);const y={progress:p,t:g,pvideo:n,elWidth:d.width,elHeight:d.height};return x("div",{...l,ref:u,className:X(CNe,i),children:!!(n&&d.width&&d.height&&p)&&x(wNe,{...y})})}),wNe=f.memo(function({t,progress:n,pvideo:r,elWidth:o,elHeight:i}){let a=f.useMemo(()=>$Ne(r?.index||[],t)??0,[r,t]);const{img_x_len:l,img_y_len:u,img_x_size:d,img_y_size:m}=r,p=u*l;a=a+1;const g=Math.floor(a/p),b=a-g*p,y=r.image?.[g]||"",S=Math.floor(b/l)+1,C=b-(S-1)*l,w=o*l,$=i*u,M=(S-1)*i,T=(C-1)*o;return x("div",{className:"size-full",style:{backgroundColor:"black",backgroundImage:`url(${y})`,backgroundPosition:`-${T}px -${M}px`,backgroundSize:`${w}px ${$}px`},children:x(iK,{progress:n})})});function iK({progress:e,className:t,...n}){return x("div",{...n,"data-role":"track",className:X("absolute inset-x-0 bottom-0 h-2px bg-gate-bg-lv1",t),children:x("div",{"data-role":"bar",className:"h-full bg-gate-primary",style:{width:`${e*100}%`}})})}function $Ne(e,t){let n=ENe(e,t);if(n!==-1)return n;t>e.at(-1)&&(n=e.length-1);}function ENe(e,t){let n=0,r=e.length-1,o=-1;for(;n<=r;){const l=Math.floor((n+r)/2),u=e[l];if(t===u)return l;u<t?(n=l+1,o=l):r=l-1;}if(o===-1)return -1;const i=e[o],a=e[o+1]??0;return i<t&&t<a?o:-1}const MNe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 256 256",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("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"})]}),RNe=f.forwardRef(MNe),TNe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("circle",{cx:12,cy:24,r:3,fill:"currentColor"}),x("circle",{cx:24,cy:24,r:3,fill:"currentColor"}),x("circle",{cx:36,cy:24,r:3,fill:"currentColor"})]}),ANe=f.forwardRef(TNe),aK="pointer-events-none h-19px flex-center whitespace-nowrap rounded-2px bg-gate-primary px-4px text-center text-12px color-white";function sK({children:e,className:t}){return x("span",{className:sr(aK,t),children:e})}function lK(e){const{topMarkIcon:t,topMarkText:n}=e;return !!(t||n)}function NNe({cardData:e}){if(!lK(e))return;const{topMarkIcon:t,topMarkText:n}=e,r=!!t;return H(sK,{className:X("min-w-32px",r?"pl-4px pr-6px":"px-4px"),children:[r&&x(KG,{src:`${t}@!web-dynamic`,className:"h-16px w-16px"}),n]})}function PNe(e){return ["#FFD700","#C0C0C0","#B36700"][e-1]??xa}function INe({item:e}){const t=e.rankingNo<=3,n=x(RNe,{});let r=false,o=[];zA(e)&&e.others?.length&&(r=true,o=e.others);const i=`「${e.rankTab.name}」排行第 ${e.rankingNo} 名`,{triggerRef:a,tooltipEl:l}=W1({inlinePosition:"left",tooltip:i,tooltipClassName:"left--2px"}),u="relative size-28px flex-center whitespace-nowrap rounded-full text-14px color-white",d=f.useMemo(()=>({backgroundColor:PNe(e.rankingNo)}),[e.rankingNo]),m=lW();return H(ze,{children:[H("div",{ref:a,className:u,style:d,children:[t?n:x("span",{style:{marginLeft:-1},children:e.rankingNo}),l]}),r&&x(tc,{placement:"bottomLeft",menu:{items:[{type:"group",label:"「其他上榜视频」",children:o.map(p=>({key:p.bvid,label:p.title,onClick(){const g=new URL(`/video/${p.bvid}`,location.href).href;m?fi(g):location.href=g;}}))}]},children:x("div",{className:u,style:d,children:x(ANe,{})})})]})}function ONe(){return H(sK,{children:[x(XT,{active:true,className:"size-14px"}),"直播中"]})}function DNe({item:e}){const t=f.useMemo(()=>Fd(e)?"动态":WW(e)?"稍后再看":vu(e)?e.from==="fav-folder"?"收藏夹":"合集":e.api,[e]),n=f.useMemo(()=>{if(vu(e)&&e.from==="fav-collection")return e.volTooltip},[e]),{triggerRef:r,tooltipEl:o}=W1({inlinePosition:"left",tooltip:n});return H("span",{ref:r,className:sr(aK,"pointer-events-auto"),children:[t,o]})}function _Ne({vol:e,volTooltip:t}){const{triggerRef:n,tooltipEl:r}=W1({inlinePosition:"left",tooltip:t,tooltipClassName:"left--2px"});return H("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 LNe=x(GT,{className:"size-16px"});function zNe({item:e,authed:t,actionButtonVisible:n}){const r=bf(e)&&!!e.three_point?.dislike_reasons?.length,o=nt(async l=>{if(l?.preventDefault(),l?.stopPropagation(),!r)return e.api!==Je.AppRecommend?Ot.error("当前视频不支持提交「我不想看」"):void 0;if(!t)return rn("请先获取 access_key !");e?.param&&_y.has(e.param)||await n6e(e.three_point?.dislike_reasons||[],i);}),i=xg(async l=>{if(!bf(e))return;let u=false,d="",m;try{({success:u,message:d}=await N6e(e,l.id));}catch(p){m=p;}return m?(console.error(m.stack||m),Gj()):(u?(Ot.success("已标记不想看"),_y.set(e.param,{...l})):Ot.error(d||jp),u)});return {dislikeButtonEl:r&&x(Ba,{visible:n,inlinePosition:"left",icon:LNe,tooltip:"我不想看",onClick:o}),hasDislikeEntry:r,onTriggerDislike:o}}const BNe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,x("circle",{cx:12,cy:12,r:10,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2})]}),kNe=f.forwardRef(BNe),FNe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[x("circle",{cx:12,cy:12,r:10}),x("path",{d:"m9 12l2 2l4-4"})]})]}),HNe=f.forwardRef(FNe),VNe=kNe,jNe=HNe;function UNe({multiSelecting:e,multiSelected:t,uniqId:n}){const r=nt(l=>{const{selectedIdSet:u,multiSelecting:d}=Hn;if(!d)return;l?.preventDefault(),l?.stopPropagation();const m=!!l?.shiftKey;Hn.shiftMultiSelectAnchorUniqId??=n,m||(Hn.shiftMultiSelectAnchorUniqId=n),m?JRe(Hn.shiftMultiSelectAnchorUniqId,n):t?u.delete(n):u.add(n);}),o=e&&x("div",{onClick:r,className:X("absolute inset-0 flex items-center justify-center bg-black/10",hCe)}),a=e&&x(t?jNe:VNe,{onClick:r,className:X("size-30px cursor-pointer text-white [&_g]:fill-inherit",t?"fill-gate-primary":"fill-none")});return {toggleMultiSelect:r,multiSelectBgEl:o,multiSelectEl:a}}function qNe(...e){}function WNe({uniqId:e,recSharedEmitter:t,title:n,active:r,videoDuration:o,tryFetchImagePreviewData:i,imagePreviewDataBox:a,autoPreviewWhenHover:l,videoPreviewWrapperRef:u}){const d=nt(()=>{const z=a.val?.videoshotJson?.data;return !!(z?.index?.length&&z?.image?.length)}),[m,p]=f.useState(false),[g,b]=d9(),[y,S]=d9(),C=nt(()=>g||0),[w,$]=f.useState(false),M=Al(false),T=Al(false),R=iM(false),[I,N]=f.useState(void 0),P=z=>{const Y=u.current?.getBoundingClientRect();if(!Y)return;const{x:ee,width:J}=Y,te=z.pageX-window.scrollX-ee;N(te/J);};va("mouseenter",async z=>{t.emit("mouseenter",e),M.set(true),P(z);const Y=i(),ee=800;let J;at.useDelayForHover&&(J=pn(ee)),await Promise.all([Y,J].filter(Boolean)),M.val&&(T.set(true),l&&!_.val&&d()&&q(true));},{target:u});const O=nt(()=>{M.set(false),T.set(false);});va("mouseleave",O,{target:u}),po(t,"mouseenter",z=>{z!==e&&O();}),va("mousemove",z=>{$(true),M.val&&(!T.val||!l)&&P(z),l||j.stop();},{target:u});const _=iM(void 0),L=f.useRef(void 0),j=GNe({startByHoverBox:R,isHoveringBox:M,active:r,mouseMoved:w,idBox:_,autoPreviewWhenHover:l,setAutoPreviewing:p,setPreviewT:S,setPreviewProgress:b,onResume(){L.current?.();}}),U=nt(async()=>{if(!_.val){await i(),d()&&q(false);return}j.togglePaused();}),q=nt(z=>{R.set(z),$(false),j.reset(),j.stop(true),p(true),b(ne=>ne===void 0?0:ne),S(void 0);const Y=8e3;let ee=performance.now(),J=0;L.current=()=>{ee=performance.now()-C()*Y;};function te(ne){if(j.shouldStop())return j.stop();if(!j.paused){const se=performance.now(),ae=se-ee,re=uf(ae%Y/Y,0,1);if(b(re),(!J||se-J>=at.autoPreviewUpdateInterval)&&(b(re),J=se,o)){const de=uf(Math.round(re*o),0,o);S(de);}}_.val=requestAnimationFrame(te);}_.val=requestAnimationFrame(te);}),V=M.state,B=T.state,F=a.state?.videoshotJson?.data,W=!!F?.image?.length&&!!o&&(B||r)&&(l?m:true),K=f.useRef(null);let Q,D;if(W){const z={videoDuration:o,pvideo:F};l?Q={...z,progress:g,t:y}:Q={...z,progress:I},D=x(xNe,{ref:K,...Q});}return {onHotkeyPreviewAnimation:U,onStartPreviewAnimation:q,autoPreviewing:m,mouseProgress:I,previewProgress:g,previewT:y,isHovering:V,isHoveringAfterDelay:B,shouldShowPreview:W,previewImageRef:K,previewImgProps:Q,previewImageEl:D}}function GNe({startByHoverBox:e,isHoveringBox:t,idBox:n,active:r,mouseMoved:o,autoPreviewWhenHover:i,setAutoPreviewing:a,setPreviewT:l,setPreviewProgress:u,onResume:d}){const m=eq(),p=nt(()=>{if(m.current)return true;if(e.val){if(!t.val)return true}else if(!r||o)return true;return false}),g=nt((S=false)=>{S||qNe("stopAnimation: %o",{autoPreviewWhenHover:i,unmounted:m.current,isHovering:t.val,active:r,mouseMoved:o}),n.val&&cancelAnimationFrame(n.val),n.val=void 0,a(false),u(void 0),l(void 0),y.reset();}),b=f.useRef(false),y=f.useMemo(()=>({shouldStop:p,stop:g,get paused(){return b.current},set paused(S){b.current=S;},togglePaused(){const S=this.paused;this.paused=!this.paused,S&&d?.();},reset(){this.paused=false;}}),[p,g,b,d]);return y}function KNe({item:e,cardData:t,onRemoveCurrent:n,actionButtonVisible:r,watchlaterAdded:o}){const{avid:i,bvid:a}=t,l=f.useMemo(()=>bf(e)||J1(e)?e.goto==="av":e.api===Je.Rank?t.goto==="av":e.api===Je.Live?false:!!a,[e,t]),u=ga((C,w)=>C(w),{manual:true}),d=pA(o),m=nt(async(C,w)=>{if(C?.preventDefault(),C?.stopPropagation(),u.loading)return {success:false};if(!i||!a)return {success:false};w??=o?A6e:aM;const $=await u.runAsync(w,i),M=w===aM;return $&&(M?bu.bvidSet.add(a):bu.bvidSet.delete(a),e.api===Je.Watchlater?M||(await pn(250),n?.(e,t)):Ot.success(`已${M?"添加":"移除"}稍后再看`)),{success:$,targetState:M}}),p=18,g=u.loading?x(zj,{className:"size-16px"}):e.api===Je.Watchlater?o?x(Vf,{className:"size-16px"}):x(Ep,{size:p,useAnimation:d===true}):o?x(Ep,{size:p,useAnimation:d===false}):x(QT,{className:"size-20px"}),b=e.api===Je.Watchlater?o?"已添加稍后再看, 点击移除":"已移除稍后再看":o?"已添加稍后再看, 点击移除":"稍后再看",y=l&&x(Ba,{visible:r,inlinePosition:"right",icon:g,tooltip:b,onClick:m});return {context:f.useMemo(()=>({watchlaterAdded:o,hasWatchlaterEntry:l,onToggleWatchlater:m}),[m,o,l]),watchlaterButtonEl:y}}const cL=f.memo(function({style:t,className:n,item:r,loading:o,active:i,onRemoveCurrent:a,emitter:l,recSharedEmitter:u,tab:d,baseCss:m,gridDisplayMode:p,multiSelecting:g,...b}){o=o??!r;const y=f.useMemo(()=>r&&Jf(r),[r]),S=QAe(r?.api===Je.AppRecommend?r.param:void 0),C=pRe(y?.authorMid),w=x6e(y?.authorMid),$=EAe(y?.bvid),M=KRe(r?.uniqId),T=!!S,R=C,I=w,P=G6e(T||R||I),O=X("bili-video-card",Nl,{[bz]:i},"relative",n),_=[m,P,RA(p)&&R3.card,g&&M&&W6e];return x("div",{"data-bvid":y?.bvid,style:t,className:O,css:_,...b,children:o?x(yNe,{loading:o}):r&&y&&(T?x(SNe,{item:r,cardData:y,emitter:l,dislikedReason:S}):R?x(lL,{item:r,cardData:y,blockType:"blacklist"}):I?x(lL,{item:r,cardData:y,blockType:"filter"}):x(XNe,{item:r,cardData:y,active:i,emitter:l,recSharedEmitter:u,tab:d,onRemoveCurrent:a,watchlaterAdded:$,gridDisplayMode:p,multiSelecting:g,multiSelected:M}))})});var YNe={name:"vpmszz",styles:"background-color:unset;position:static;height:100%"};const XNe=f.memo(function({item:t,cardData:n,tab:r,active:o=false,onRemoveCurrent:i,emitter:a=kj,recSharedEmitter:l=Vq,watchlaterAdded:u,gridDisplayMode:d,multiSelecting:m=false,multiSelected:p}){const{accessKey:g,style:{videoCard:{useBorder:b,useBorderOnlyOnHover:y}},videoCard:{actions:S,imgPreview:{enabled:C,autoPreviewWhenHover:w,disableWhenMultiSelecting:$}},spaceUpload:{showVol:M},__internalEnableCopyBvidInfo:T}=Ut(),{avid:R,bvid:I,cid:N,goto:P,href:O,title:_,cover:L,duration:j,durationStr:U,recommendReason:q,statItems:V,authorName:B,authorMid:F}=n,W=!!g,K=P==="av",Q=["av","bangumi","picture","live","opus"];Q.includes(P)||Ko(`none (${Q.join(",")}) goto type %s`,P,t);const D=RA(d),z=f.useMemo(()=>BA({item:t})?.aspectRatio,[t]),Y=f.useMemo(()=>!(!I||!I.startsWith("BV")||P!=="av"),[I,P]),ee=!(!C||$&&m),J=Al(void 0),te=xg(async()=>{if(!Y||!ee||O6e(J.val))return;const Pe=await I6e(I);J.set(Pe),jn(Pe.videoshotJson)||ne(Pe.videoshotJson);}),ne=nW(Pe=>{ua.warning({title:`${Pe.message} (code: ${Pe.code})`,description:`${_} (${I})`,duration:2});},3,false),se=f.useRef(null),ae=f.useRef(null),re=b&&!D?se:ae,{onStartPreviewAnimation:de,onHotkeyPreviewAnimation:ge,isHovering:ie,previewImageEl:Ee}=WNe({uniqId:t.uniqId,recSharedEmitter:l,title:_,active:o,videoDuration:j,tryFetchImagePreviewData:te,imagePreviewDataBox:J,autoPreviewWhenHover:w,videoPreviewWrapperRef:re});As(()=>{o&&(d6(`${SM}_activeItem`,t),at.videoCard.imgPreview.autoPreviewWhenKeyboardSelect&&te().then(()=>{de(false);}));},[o]);const le=o||ie,{watchlaterButtonEl:ue,context:Se}=KNe({item:t,cardData:n,onRemoveCurrent:i,actionButtonVisible:le,watchlaterAdded:u}),{dislikeButtonEl:ye,hasDislikeEntry:Be,onTriggerDislike:je}=zNe({item:t,authed:W,actionButtonVisible:le}),{largePreviewActionButtonEl:Ne,largePreviewEl:fe,shouldUseLargePreviewCurrentTime:be,getLargePreviewCurrentTime:Re,largePreviewVisible:qe,hideLargePreview:Qe}=eK({shouldFetchPreviewData:Y,actionButtonVisible:le,hasLargePreviewActionButton:S.showLargePreview,bvid:I,cid:N,uniqId:t.uniqId,recSharedEmitter:l,cardTarget:se,aspectRatioFromItem:z,cover:L,videoCardAsTriggerRef:re}),We=Z6e(t,R),{onOpenWithMode:tt,handleVideoLinkClick:rt,consistentOpenMenus:Ze,conditionalOpenMenus:Oe,openInPopupActionButtonEl:Ye,onOpenInPopup:Ke}=D3e({href:O,item:t,cardData:n,actionButtonVisible:le,hasOpenInPopupActionButton:S.openInPipWindow,getLargePreviewCurrentTime:Re,hideLargePreview:Qe,shouldUseLargePreviewCurrentTime:be}),{multiSelectBgEl:_e,multiSelectEl:ke,toggleMultiSelect:lt}=UNe({multiSelecting:m,multiSelected:p,uniqId:t.uniqId}),At=nt(Pe=>{b&&(Pe.target.closest(".ant-dropdown-menu")||Pe.target.closest("a")||tt());});po(a,"open",()=>tt()),po(a,"open-in-popup",Ke),po(a,"open-with-large-preview-visible",()=>{qe&&(Qe(),tt());}),po(a,"toggle-watch-later",()=>{Se.onToggleWatchlater();}),po(a,"trigger-dislike",()=>{je();}),po(a,"start-preview-animation",de),po(a,"hotkey-preview-animation",ge);const dt=aNe({item:t,cardData:n,tab:r,watchlaterContext:Se,favContext:We,hasDislikeEntry:Be,onTriggerDislike:je,onRemoveCurrent:i,consistentOpenMenus:Ze,conditionalOpenMenus:Oe,multiSelecting:m}),Dt=nt(Pe=>{Pe&&We.updateFavFolderNames();}),Tt=lK(n),xt=GW(t),gt=Lp(t)&&t.live_status===La.Streaming||J1(t)&&t.goto===xs.Live,ft=r===et.AppRecommend&&!bf(t)&&!Lp(t),st=Q3(t)&&M||vu(t)&&!!t.vol&&!ft,He=T&&I&&x(Ba,{visible:le,inlinePosition:"right",icon:x(tu,{className:"size-14px"}),tooltip:"复制 BVID 信息",onClick:Pe=>{Pe.stopPropagation(),Pe.preventDefault(),nu(XA(n));}}),Ge=H(ze,{children:[m&&ke,ye,Tt&&x(NNe,{cardData:n}),xt&&x(INe,{item:t}),gt&&x(ONe,{}),ft&&x(DNe,{item:t}),st&&!!t.vol&&x(_Ne,{vol:t.vol,volTooltip:vu(t)?t.volTooltip:void 0})]}),ve=H(ze,{children:[ue,He,Ye,Ne]}),Te=!J9(Ge),Ce=!J9(ve),he=sr("left-top-marks",Pp.topContainer("left"),m&&"gap-x-10px"),Ie=WW(t)&&t.progress>0?x(iK,{progress:t.progress/t.duration,className:X("h-3px",fCe)}):void 0,we=`.${$a} .${Nl}`,Le=f.useMemo(()=>[ln(we," &{overflow:hidden;border-radius:",uA,";transition:border-radius 0.2s ease;}",""),!D&&[(o||m||b&&!y)&&ln(we," &{border-bottom-left-radius:0;border-bottom-right-radius:0;}",""),b&&ln(we,":hover &{border-bottom-left-radius:0;border-bottom-right-radius:0;}","")]],[D,o,m,b,y]),Xe=f.useMemo(()=>b&&!y||m?false:!b||b&&y&&!ie,[b,y,ie,m]),it=G1(),mt=H("a",{ref:ae,href:O,target:it,className:X(yz,"relative isolate block overflow-hidden",Xe&&"ring-1px ring-gate-border"),css:[Le,D&&R3.cover,"",""],onClick:rt,onContextMenu:Pe=>{wh(Pe)||Pe.preventDefault();},children:[x("div",{className:"bili-video-card__image",style:{aspectRatio:"16 / 9"},children:L?x("div",{className:"bili-video-card__image--wrap",children:x(KG,{src:`${L}@672w_378h_1c_!web-home-common-cover`,className:"bili-video-card__cover v-img",style:{borderRadius:0},imgProps:{alt:_}})}):x("div",{className:"size-full flex-center",children:x("div",{className:"line-clamp-3 my-auto px-4 py-2 text-center text-1.2em line-height-snug",children:_})})}),H("div",{className:"bili-video-card__stats",css:ln(we," &{pointer-events:none;border-radius:0;}",""),children:[x("div",{className:"bili-video-card__stats--left gap-x-4px xl:gap-x-8px",children:V.map(({field:Pe,value:Ue})=>x(VRe,{field:Pe,value:Ue},Pe))}),x("span",{className:"bili-video-card__stats__duration relative top-0.5px",children:K&&U})]}),Ie,ee&&Ee,_e,Te&&x("div",{className:he,children:Ge}),Ce&&x("div",{className:X("right-actions",Pp.topContainer("right")),children:ve})]}),wt=x(rK,{item:t,cardData:n,gridDisplayMode:d,handleVideoLinkClick:m?lt:rt}),Mt=x(ze,{children:fe});function Bt(Pe){return x(tc,{trigger:["contextMenu"],onOpenChange:Dt,getPopupContainer:()=>se.current?.closest(`.${Nl}`)??document.body,rootClassName:X(NCe,IX),menu:{items:dt,className:"w-max"},children:Pe})}function En(Pe){return x("div",{className:"bili-video-card__wrap",ref:se,css:[YNe,D&&R3.cardWrap,"",""],onClick:m?lt:At,onContextMenu:Ue=>{b&&Ue.preventDefault();},children:Pe})}const Ht=b&&!D?Bt(En(H(ze,{children:[mt,wt]}))):En(H(ze,{children:[Bt(mt),wt]}));return H(ze,{children:[Ht,Mt]})});var E$={};const QNe=xQ(mwe);var M$={},uL;function cK(){return uL||(uL=1,(function(e){Object.defineProperty(e,"__esModule",{value:true}),e.default=void 0;var t=Kl();function n(r){var o=(0, t.useRef)(r);return o.current=r,o}e.default=n;})(M$)),M$}var R$={},T$={},A$={},N$={},P$={},dL;function ZNe(){return dL||(dL=1,(function(e){Object.defineProperty(e,"__esModule",{value:true}),e.default=void 0;var t=false;e.default=t;})(P$)),P$}var fL;function JNe(){return fL||(fL=1,(function(e){var t=Ma();Object.defineProperty(e,"__esModule",{value:true}),e.default=void 0;var n=t(YG()),r=Kl(),o=t(cK()),i=f6(),a=t(ZNe()),l=function(d){a.default&&((0, i.isFunction)(d)||console.error("useUnmount expected parameter is a function, got ".concat((0, n.default)(d))));var m=(0, o.default)(d);(0, r.useEffect)(function(){return function(){m.current();}},[]);};e.default=l;})(N$)),N$}var I$={},mL;function ePe(){return mL||(mL=1,(function(e){Object.defineProperty(e,"__esModule",{value:true}),e.default=void 0;function t(n,r){if(n===r)return true;for(var o=0;o<n.length;o++)if(!Object.is(n[o],r[o]))return false;return true}e.default=t;})(I$)),I$}var hL;function tPe(){return hL||(hL=1,(function(e){var t=Ma();Object.defineProperty(e,"__esModule",{value:true}),e.default=void 0;var n=Kl(),r=t(JNe()),o=t(ePe()),i=m6(),a=function(u){var d=function(p,g,b){var y=(0, n.useRef)(false),S=(0, n.useRef)([]),C=(0, n.useRef)([]),w=(0, n.useRef)(void 0);u(function(){var $,M=Array.isArray(b)?b:[b],T=M.map(function(R){return (0, i.getTargetElement)(R)});if(!y.current){y.current=true,S.current=T,C.current=g,w.current=p();return}(T.length!==S.current.length||!(0, o.default)(S.current,T)||!(0, o.default)(C.current,g))&&(($=w.current)===null||$===void 0||$.call(w),S.current=T,C.current=g,w.current=p());}),(0, r.default)(function(){var $;($=w.current)===null||$===void 0||$.call(w),y.current=false;});};return d};e.default=a;})(A$)),A$}var pL;function nPe(){return pL||(pL=1,(function(e){var t=Ma();Object.defineProperty(e,"__esModule",{value:true}),e.default=void 0;var n=Kl(),r=t(tPe()),o=(0, r.default)(n.useEffect);e.default=o;})(T$)),T$}var dh={},gL;function rPe(){if(gL)return dh;gL=1;var e=Ma();Object.defineProperty(dh,"__esModule",{value:true}),dh.depsEqual=void 0;var t=e(QU());return dh.depsEqual=function(r,o){return r===void 0&&(r=[]),o===void 0&&(o=[]),(0, t.default)(r,o)},dh}var vL;function oPe(){return vL||(vL=1,(function(e){var t=Ma();Object.defineProperty(e,"__esModule",{value:true}),e.default=void 0;var n=Kl(),r=t(nPe()),o=rPe(),i=function(l,u,d){var m=(0, n.useRef)(void 0),p=(0, n.useRef)(0);(0, o.depsEqual)(u,m.current)||(p.current+=1),m.current=u,(0, r.default)(l,[p.current],d);};e.default=i;})(R$)),R$}var O$={},bL;function iPe(){return bL||(bL=1,(function(e){Object.defineProperty(e,"__esModule",{value:true}),e.default=void 0;var t=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<"u"?navigator?.platform:"");e.default=t;})(O$)),O$}var yL;function aPe(){return yL||(yL=1,(function(e){var t=Ma();Object.defineProperty(e,"__esModule",{value:true}),e.default=void 0;var n=QNe,r=t(cK()),o=f6(),i=m6(),a=t(oPe()),l=t(iPe()),u={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:l.default?[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},d={ctrl:function(w){return w.ctrlKey},shift:function(w){return w.shiftKey},alt:function(w){return w.altKey},meta:function(w){return w.type==="keyup"?u.meta.includes(w.keyCode):w.metaKey}};function m(C){return (0, o.isString)(C)||(0, o.isNumber)(C)}function p(C){var w=Object.keys(d).reduce(function($,M){return d[M](C)?$+1:$},0);return [16,17,18,91,92].includes(C.keyCode)?w:w+1}function g(C,w,$){var M,T;if(!C.key)return false;if((0, o.isNumber)(w))return C.keyCode===w?w:false;var R=w.split("."),I=0;try{for(var N=(0,n.__values)(R),P=N.next();!P.done;P=N.next()){var O=P.value,_=d[O],L=u[O.toLowerCase()];(_&&_(C)||L&&L===C.keyCode)&&I++;}}catch(j){M={error:j};}finally{try{P&&!P.done&&(T=N.return)&&T.call(N);}finally{if(M)throw M.error}}return $?I===R.length&&p(C)===R.length?w:false:I===R.length?w:false}function b(C,w){return (0, o.isFunction)(C)?C:m(C)?function($){return g($,C,w)}:Array.isArray(C)?function($){return C.find(function(M){return g($,M,w)})}:function(){return !!C}}var y=["keydown"];function S(C,w,$){var M=$||{},T=M.events,R=T===void 0?y:T,I=M.target,N=M.exactMatch,P=N===void 0?false:N,O=M.useCapture,_=O===void 0?false:O,L=(0, r.default)(w),j=(0, r.default)(C);(0, a.default)(function(){var U,q,V,B=(0, i.getTargetElement)(I,window);if(B){var F=function(z){var Y,ee=z,J=b(j.current,P),te=J(ee),ne=m(te)?te:ee.key;if(te)return (Y=L.current)===null||Y===void 0?void 0:Y.call(L,ee,ne)};try{for(var W=(0,n.__values)(R),K=W.next();!K.done;K=W.next()){var Q=K.value;(V=B?.addEventListener)===null||V===void 0||V.call(B,Q,F,_);}}catch(D){U={error:D};}finally{try{K&&!K.done&&(q=W.return)&&q.call(W);}finally{if(U)throw U.error}}return function(){var D,z,Y;try{for(var ee=(0,n.__values)(R),J=ee.next();!J.done;J=ee.next()){var te=J.value;(Y=B?.removeEventListener)===null||Y===void 0||Y.call(B,te,F,_);}}catch(ne){D={error:ne};}finally{try{J&&!J.done&&(z=ee.return)&&z.call(ee);}finally{if(D)throw D.error}}}}},[R],I);}e.default=S;})(E$)),E$}var sPe=aPe();const lPe=Io(sPe);function cPe({enabled:e,refresh:t,minIndex:n=0,maxIndex:r,gridRef:o,getScrollerRect:i,changeScrollY:a,videoCardEmitters:l,activeLargePreviewItemIndex:u}){const[d,m]=f.useState(void 0),p=nt(()=>!(!e||ks())),g=nt(()=>{if(typeof d!="number"||!o.current)return false;const N=i(),P=o.current.querySelector(`.${Nl}.${bz}`)?.getBoundingClientRect();return !(!N||!P||P.top-N.top<-(N.height+P.height)||P.top-N.top>N.height*2+P.height)});function b(N){const P=R(d),O=P.getBoundingClientRect().left,_=q=>Math.abs(O-q)<1;{const q=uK(o.current),V=N==="down"?q:-q,B=R(d+V);if(B){const F=B.getBoundingClientRect().left;if(_(F))return V}}let L=0,j=P;const U=()=>N==="down"?j.nextElementSibling:j.previousElementSibling;for(;U();){if(j=U(),!j.classList.contains(Nl))continue;N==="down"?L++:L--;const q=j.getBoundingClientRect().left;if(_(q))return L}return 0}const y=N=>P=>{if(!p())return;P?.preventDefault();let O;if(g()){const _=typeof N=="number"?N:b(N);O=d+_;}else O=$();if(O<n){I(n);return}if(O>r){I(r);return}m(O),I(O);},S=(N,P)=>{lPe(N,(O,_)=>{p()&&P(O,_);},{exactMatch:true});};S("leftarrow",y(-1)),S("rightarrow",y(1)),S("tab",y(1)),S("shift.tab",y(-1)),S("uparrow",y("up")),S("downarrow",y("down"));const C=()=>{p()&&m(void 0);},w=()=>{if(!(!p()||typeof d!="number"))return l[d]};S("esc",C),S("enter",N=>{if(p()){if(typeof d=="number")return N.preventDefault(),l[d]?.emit("open");if(typeof u=="number")return N.preventDefault(),l[u]?.emit("open-with-large-preview-visible")}}),S("x",()=>w()?.emit("open-in-popup")),S("backspace",()=>w()?.emit("trigger-dislike")),S(["s","w"],()=>w()?.emit("toggle-watch-later")),S(["period","p"],()=>w()?.emit("hotkey-preview-animation"));function $(){const N=i();if(!N)return 0;const P=T();for(const[O,_]of P.entries())if(_.getBoundingClientRect().top>=N.top)return O;return 0}const M=`.${Nl}`;function T(){return [...o.current?.querySelectorAll(M)||[]]}function R(N){return T()[N]}function I(N){const P=R(N);P?.scrollIntoViewIfNeeded?.(false);const O=i(),_=P.getBoundingClientRect();if(!(!O||!_)){if(_.top<=O.top){const L=-(O.top-_.top+10);a?.({offset:L});return}if(O.bottom-_.bottom<20){const L=20-(O.bottom-_.bottom);a?.({offset:L});return}}}return {activeIndex:d,clearActiveIndex:C}}const uPe=new Map,dPe=new Map;function uK(e,t=true){const{gridDisplayMode:n,useCustomGrid:r,enableForceColumn:o,forceColumnCount:i,cardMinWidth:a}=at.grid;if(n===Br.List)return 1;if(t&&n===Br.TwoColumnGrid)return 2;if(r&&o&&i)return i;if(e||=document.querySelector(`.${dM}`),!e)return Ko("getColumnCount(): gridEl not found"),0;const l=r?uPe:dPe,u=new URLSearchParams({width:Math.round(e.clientWidth).toString(),cardMinWidth:r?a.toString():""}).toString();{const p=l.get(u);if(p)return p}const d=window.getComputedStyle(e);if(d.display!=="grid")return Ko('getColumnCount(): gridEl.style.display !== "grid"'),0;const m=d.gridTemplateColumns.split(" ").length;return l.set(u,m),m}const fPe=io.extend("modules:rec-services:pc");class yf extends Hs{constructor(t){super(yf.PAGE_SIZE),this.isKeepFollowOnly=t;}static PAGE_SIZE=30;tabbarView=void 0;sidebarView=void 0;hasMoreExceptQueue=true;fetchMore(t){const n=this.isKeepFollowOnly?5:2;return this.getRecommendTimes(n,t)}async loadMoreBatch(t,n){if(this.hasMore)return this.qs.bufferQueue.length?this.qs.sliceFromQueue(t):this.qs.doReturnItems(await this.getRecommendTimes(t,n))}async getRecommendTimes(t,n){let r=(await Promise.all(DL(t).map(()=>this.getRecommend(n)))).flat();const o=new Set([xs.AV,xs.Live,xs.Ad]);r.forEach(l=>{o.has(l.goto)||fPe("uknown goto from API: %s %o",l.goto,l);});const i=new Set([xs.AV]);return r=r.filter(l=>i.has(l.goto)),r=Wl(r,l=>l.id),r.forEach(l=>{l.rcmd_reason?.reason_type===1&&(l.rcmd_reason.content||="已关注");}),r.map(l=>({...l,uniqId:`${Je.PcRecommend}:${l.bvid||l.room_info?.room_id||crypto.randomUUID()}`,api:Je.PcRecommend}))}page=0;async getRecommend(t){const n=++this.page,r="/x/web-interface/wbi/index/top/feed/rcmd",o={fresh_type:8,fresh_idx_1h:n,fresh_idx:n,ps:yf.PAGE_SIZE,web_location:1430650,feed_version:"V8",homepage_ver:1},a=(await Zt.get(r,{signal:t,params:o})).data;return !jn(a)&&a.code===-62011&&a.message==="暂时没有更多内容了"?(this.hasMoreExceptQueue=false,[]):(a.data?.item||rn(a.message||"API 请求没有返回结果"),a.data?.item||[])}}async function mPe(e=20,t=1){const n=Jo();return (await vg.get(`https://app.bilibili.com/x/v2/space/likearc?mid=${n}`,{responseType:"json",params:{...hxe,vmid:n,ps:e,pn:t}})).data}function hPe({service:e}){const{count:t}=e.useStore();return Number.isFinite(t)?H(ze,{children:[x(gn,{title:`共 ${t} 个视频`,children:x(go,{color:"success",variant:"outlined",className:"cursor-pointer",children:t})}),x(Pg,{})]}):null}class zy extends Hs{static PAGE_SIZE=20;constructor(){super(zy.PAGE_SIZE);}tabbarView=x(hPe,{service:this});sidebarView;get hasMoreExceptQueue(){return this.errorJson?false:zy.PAGE_SIZE*this.pn<this.store.count}pn=0;errorJson=void 0;store=kn({count:1/0});useStore=()=>bt(this.store);showErrorNotification(t){ua.error({key:"LikedRecService:error",title:"获取喜欢列表失败",...t});}async fetchMore(t){if(!at.accessKey)throw new nA;ua.destroy("LikedRecService:error");const n=await mPe(this.qs.ps,this.pn+1);if(!jn(n))throw this.errorJson=n,this.showErrorNotification({title:"获取喜欢列表失败",description:n.message}),new Error("Request fail with none invalid json",{cause:n});const{count:r,item:o}=n.data,[i,a]=await Hp(()=>Promise.all(o.map(u=>u.state?Zq(UA(u.param)):void 0))),l=o.map((u,d)=>({...u,api:Je.Liked,uniqId:`${Je.Liked}:${u.param}`,videoDetail:a?.[d]}));return this.pn++,this.store.count=r,l}}const pPe=[et.KeepFollowOnly,et.PcRecommend,et.AppRecommend],gPe={[et.AppRecommend]:()=>new Bp(NAe()),[et.PcRecommend]:()=>new yf(false),[et.KeepFollowOnly]:()=>new yf(true),[et.DynamicFeed]:()=>new rS(i6()),[et.Watchlater]:({existingService:e})=>{const{watchlaterAddSeparator:t,watchlaterItemsOrder:n}=at,r=e&&e instanceof zp?e.getServiceSnapshot().bvidIndexMap:void 0;return new zp(n,t,r,eo(Gh).searchText)},[et.Fav]:()=>new oS(a6()),[et.Hot]:()=>new j3e,[et.Live]:()=>new Ig,[et.SpaceUpload]:()=>new t6(SG()),[et.Liked]:()=>new zy};function Qd(e,t){const n=e[t];return qi(n,`servicesRegistry[tab=${t}] should not be nil`),n}const Nb=io.extend("service"),vPe=e=>e.api===Je.Separator?e.uniqId:Jf(e).bvid??e.uniqId;function sM(e,t){return Wl([...e,...t],vPe)}const SL=e=>e===et.PcRecommend||e===et.KeepFollowOnly;async function bPe(e,t,n=5){const{tab:r,abortSignal:o,servicesRegistry:i}=t;let a=[],l=true;const u=async d=>{let m=[];if(!pPe.includes(r)){const g=Qd(i,r);m=await g.loadMore(o)??[],l=g.hasMore,m=tM(m,r),a=sM(a,m);return}let p;if(r===et.KeepFollowOnly)p=8,Nb("getMinCount: addMore(restCount = %s) times=%s",d,p);else {const g=SL(r)?yf.PAGE_SIZE:Bp.PAGE_SIZE,y=(()=>{const{enabled:S,byAuthor:C,byTitle:w,minDuration:$,minPlayCount:M,minDanmakuCount:T}=at.filter;return S||C.enabled||w.enabled||$.enabled||M.enabled||T.enabled})()?n:1.2;p=Math.ceil(d*y/g),Nb("getMinCount: addMore(restCount = %s) multipler=%s pagesize=%s times=%s",d,y,g,p);}if(SL(r)){const g=Qd(i,r);m=await g.loadMoreBatch(p,o)||[],l=g.hasMore;}else {const g=Qd(i,et.AppRecommend);m=await(g.config.addOtherTabContents?g.loadMore(o):g.loadMoreBatch(o,p))||[],l=g.hasMore;}m=tM(m,r),a=sM(a,m);};for(await u(e);;){if(o?.aborted){Nb("getMinCount: break for abortSignal");break}if(!l){Nb("getMinCount: break for tab=%s hasMore=false",r);break}if(a.filter(m=>m.api!==Je.Separator).length>=e)break;await u(e-a.length);}return a}const p6=()=>uK()*4;async function yPe(e){let t=p6();return e.tab===et.DynamicFeed&&await Qd(e.servicesRegistry,et.DynamicFeed).shouldReduceMinCount()&&(t=1),bPe(t,e,5)}function SPe(e,t){let n;switch(e){case et.DynamicFeed:return n=t[et.DynamicFeed],!ma(n?.config,i6());case et.Fav:return n=t[et.Fav],!ma(n?.config,a6());case et.Hot:return n=t[et.Hot],n?.subtab!==qo.subtab||n.subtab===fr.Rank&&n.service instanceof uW&&n.service.rankTab.slug!==xi.slug;case et.SpaceUpload:return n=t[et.SpaceUpload],!ma(n?.config,SG());default:return false}}function CPe({tab:e,debug:t,fetcher:n,preAction:r,postAction:o,updateViewFromService:i,self:a}){const l=Xi(),{servicesRegistry:u}=l;ro(()=>{d(true);}),Wf(()=>{a.abortController.abort();});const d=nt(async(p=false)=>{if(l.refreshing&&l.refreshingTab===e)if(SPe(e,u))t("refresh(): tab=%s [start], current refreshing, sametab but conditions change, abort existing",e),a.abortController.abort();else {t("refresh() tab=%s [start], current refreshing, prevent same tab refresh()",e);return}else t("refresh(): tab=%s [start]",e);const b=performance.now();l.setStore({refreshing:true,refreshingTab:e}),a.setStore({refreshError:void 0,hasMore:true,items:[],refreshTs:Date.now()});const y=new AbortController,{signal:S}=y;a.abortController=y,await r?.();function C(){l.setStore({refreshing:false,refreshingTab:void 0}),a.setStore({showSkeleton:false});}function w(N){C(),a.setStore({refreshError:N}),console.error(N);}function $(){C(),a.setStore({hasMore:Qd(u,e).hasMore});}async function M(){const[N,P]=await Hp(()=>n({tab:e,abortSignal:S,servicesRegistry:u}));return S.aborted?t("refresh(): tab=%s [aborted], ignoring rest code",e):N?w(N):(a.setStore({items:P??[]}),true)}let T;const R=p?u[e]:void 0;if(R?(R.restore(),a.setStore({items:R.qs.bufferQueue.slice(0,p6())}),T=!!await M()&&!!Zf[e].swr):(a.setStore({showSkeleton:true}),T=true),T){const[N,P]=Cf(()=>gPe[e]({existingService:R}));if(N)return w(N);if(u[e]=P,i?.(),!await M())return}$(),await o?.();const I=performance.now()-b;t("refresh(): tab=%s [success] cost %s ms",e,I.toFixed(0));}),{recSharedEmitter:m}=Xi();return po(m,"refresh",d),{refresh:d}}const xPe=({title:e,titleId:t,...n},r)=>H("svg",{viewBox:"0 0 48 48",width:"1.2em",height:"1.2em",ref:r,"aria-labelledby":t,...n,children:[e?x("title",{id:t,children:e}):null,H("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,children:[x("path",{d:"M4 24c0 11.046 8.954 20 20 20v0c11.046 0 20-8.954 20-20S35.046 4 24 4"}),x("path",{d:"M36 24c0-6.627-5.373-12-12-12s-12 5.373-12 12s5.373 12 12 12v0"})]})]}),wPe=f.forwardRef(xPe),fh=io.extend("components:RecGrid"),CL="grid-col-span-full";class $Pe{store=kn({refreshTs:-1,showSkeleton:false,hasMore:true,refreshError:void 0,items:[]});useStore=()=>bt(this.store);setStore=t=>{const n=["items","refreshError"];for(const r of n)typeof t[r]=="object"&&(t[r]=hz(t[r]));Object.assign(this.store,t);};loadedPage=0;abortController=new AbortController;loadMoreLocker={};isLocked=t=>!!this.loadMoreLocker[t];lock=t=>{this.loadMoreLocker={[t]:true};};unlock=t=>{this.loadMoreLocker[t]=false;};get loadMoreRunning(){return this.isLocked(this.store.refreshTs)}}const dK=f.memo(function({className:t,containerClassName:n,shortcutEnabled:r,tab:o,infiniteScrollUseWindow:i,onScrollToTop:a,scrollerRef:l,ref:u}){const d=Xi(),{servicesRegistry:m,recSharedEmitter:p}=d,{refreshing:g}=d.useStore(),b=L1(()=>new $Pe,[]),{useCustomGrid:y,gridDisplayMode:S,enableForceColumn:C,forceColumnCount:w,cardMinWidth:$}=bt(at.grid),{multiSelecting:M}=bt(Hn),T=eq();XRe();const R=nt(()=>{T.current||d.setStore({tabbarView:m[o]?.tabbarView,sidebarView:m[o]?.sidebarView});});ro(R);const I=nt(()=>{ae(),R(),a?.();}),N=nt(()=>{ae(),R(),b.loadedPage=1,V();}),{refresh:P}=CPe({tab:o,debug:fh,fetcher:yPe,preAction:I,postAction:N,updateViewFromService:R,self:b});f.useImperativeHandle(u,()=>({refresh:P}),[P]);const{items:O,hasMore:_,refreshError:L,refreshTs:j,showSkeleton:U}=b.useStore();f.useEffect(()=>S6e(O),[O]);const q=f.useRef(void 0);va("visibilitychange",fe=>{if(!(document.visibilityState==="visible")){q.current=Date.now();return}d.refreshing||b.loadMoreRunning||o===et.Watchlater&&q.current&&Date.now()-q.current>so("1h")&&P(true);},{target:document});const V=nt(async()=>{if(await pn(pg?100:0),fh("checkShouldLoadMore(): footerInViewRef = %s",le.current),le.current)return F()}),B=nt(()=>!(T.current||d.refreshing||b.abortController.signal.aborted||b.loadMoreRunning||b.store.refreshTs<0||b.store.refreshError||!b.store.hasMore)),F=nt(async()=>{if(!B())return;const fe=b.store.refreshTs;b.lock(fe);let be=b.store.items,Re=true,qe;try{const Qe=Qd(m,o);let We=await Qe.loadMore(b.abortController.signal)||[];We=tM(We,o),be=sM(be,We),Re=Qe.hasMore;}catch(Qe){qe=Qe;}if(qe)throw b.unlock(fe),ua.error({title:"加载失败",description:qe.message||qe.stack}),qe;{const Qe=b.store.refreshTs;if(fe!==Qe){fh("loadMore: skip update for mismatch refreshTs, %o != %o",fe,Qe),b.unlock(fe);return}}b.loadedPage++,fh("loadMore: loadedPage(%s) len(%s -> %s)",b.loadedPage,b.store.items.length,be.length),b.setStore({hasMore:Re,items:be}),b.unlock(fe),V();}),W=nt(async()=>{const be={key:"RecGrid:loadToEnd"+":error",title:"加载全部",duration:15},Re={title:"加载全部"},qe=Qe=>{throw ua.error({...be,description:Qe}),new Error("loadToEnd error",{cause:Qe})};if(!fG())return qe("当前 Tab 不支持加载全部");if(b.store.refreshError)return qe("预检查失败: 先前错误");if(!b.store.hasMore)return ua.success({...Re,description:"没有更多了"});for(;!B();)await pn(500);for(;B();)await F();ua.success({...Re,description:"已完成"});});po(p,"load-to-end",W);const K=O,Q=f.useMemo(()=>K.filter(fe=>fe.api!==Je.Separator),[K]),D=f.useRef(null),z=nt(()=>{if(i){const fe=cu.get()+50;return new DOMRect(0,fe,window.innerWidth,window.innerHeight-fe)}else return l?.current?.getBoundingClientRect()}),Y=f.useMemo(()=>new Map,[j]),ee=f.useMemo(()=>Q.map(({uniqId:fe})=>{const be=fe;return Y.get(be)||(()=>{const Re=new Xo;return Y.set(be,Re),Re})()}),[Q]),[J,te]=f.useState(void 0);po(p,"show-large-preview",te);const ne=f.useMemo(()=>{if(J)return Q.findIndex(fe=>fe.uniqId===J)},[K,J]),{activeIndex:se,clearActiveIndex:ae}=cPe({enabled:r,refresh:P,maxIndex:Q.length-1,gridRef:D,getScrollerRect:z,videoCardEmitters:ee,activeLargePreviewItemIndex:ne,changeScrollY:i?function({offset:fe,absolute:be}){const Re=document.documentElement;if(typeof fe=="number"){Re.scrollTop+=fe;return}if(typeof be=="number"){Re.scrollTop=be;return}}:void 0}),re=nt(fe=>{const be=b.store.items;b.setStore({items:fe(be)??be});}),de=nt((fe,be,Re)=>{re(qe=>{const Qe=qe.slice(),We=[];for(const[tt,rt]of fe.entries()){const Ze=Qe.findIndex(Ye=>Ye.uniqId===rt);if(Ze===-1)continue;Qe.splice(Ze,1);const Oe=be?.[tt];Oe&&We.push(Oe),o===et.Watchlater&&m[o]?.decreaseTotal(),o===et.Fav&&m[o]?.decreaseTotal();}return !Re&&We.length&&(We.length<=3?We.forEach(tt=>Ot.success(`已移除: ${We.join(", ")}`)):Ot.success(`已移除: ${We.length}个视频`)),Qe});}),ge=nt((fe,be)=>{re(Re=>{const qe=Re.findIndex(Qe=>Qe.uniqId===fe);if(qe!==-1){if(be==="start"){const Qe=Re.findIndex(We=>We.api!==Je.Separator);return Dp(Re,qe,Qe)}else if(be==="end")return Dp(Re,qe,Re.length-1)}});});po(p,"remove-cards",fe=>de(...fe)),po(p,"move-card-to",fe=>ge(...fe));const{ref:ie,inView:Ee}=g6e({root:i?null:l?.current||null,rootMargin:`0px 0px ${window.innerHeight}px 0px`,onChange(fe){fe&&(fh("footerInView change to visible"),Cf(()=>le.current=!0),V());}}),le=mu(Ee),ue=x("div",{ref:ie,className:X(CL,"flex items-center justify-center py-30px text-size-120%"),children:!g&&x(ze,{children:_?H(ze,{children:[x(wPe,{className:"mr-10px size-40px animate-spin color-gate-primary"}),"加载中~"]}):x(ze,{children:"没有更多了~"})})}),Se=X("min-h-100vh @container-inline-size",n),ye=f.useMemo(()=>{const{videoGrid:fe,videoGridBiliFeed4:be,videoGridCustom:Re,videoGridAddonCenterEmpty:qe,gridTemplateColumnsUsingVarCol:Qe,gridTemplateColumnsUsingCardMinWidth:We,narrowMode:tt}=n5,rt=y&&!(C&&w)&&S!==Br.TwoColumnGrid?We:Qe,Ze=[HQ,fe,rt,y?Re:be],Oe=(...Ye)=>X(Ze,...Ye,t);return S===Br.TwoColumnGrid?{className:Oe(tt)}:(S===Br.CenterEmptyGrid&&Ze.push(qe),y?C&&w?{className:Oe(),style:{"--col":w.toString()}}:{className:Oe(),style:{"--card-min-width":`${$}px`}}:{className:Oe()})},[n5,y,S,C,w,$,t]),Be=Y6e(),je=({gridChildren:fe,gridSiblings:be}={})=>H("div",{"data-tab":o,className:Se,children:[x("div",{"data-tab":o,ref:D,...ye,children:fe}),be]});if(L)return console.error("RecGrid.refresh error:",L.stack||L),je({gridSiblings:x(MTe,{tab:o,err:L})});if(g&&U){const fe=p6();return je({gridChildren:Array.from({length:fe}).fill(0).map((be,Re)=>x(cL,{loading:true,tab:o},Re))})}const Ne=fe=>{if(fe.api===Je.Separator)return x(Hl,{className:X(CL,PX),orientation:"horizontal",titlePlacement:"left",children:fe.content},fe.uniqId);{const be=Q.findIndex(qe=>qe.uniqId===fe.uniqId),Re=be===se;return x(cL,{baseCss:[Be,X6e(Re)],tab:o,item:fe,active:Re,onRemoveCurrent:(qe,Qe,We)=>de([qe.uniqId],[Qe.title],We),emitter:ee[be],recSharedEmitter:p,gridDisplayMode:S,multiSelecting:M},fe.uniqId)}};return je({gridChildren:H(ze,{children:[K.map(Ne),ue]})})});function fK({className:e="",style:t,refreshHotkeyEnabled:n,ref:r}){n??=true;const{refreshing:o}=Xi().useStore(),i=Co(),a=f.useRef(null),l=nt(()=>{a.current&&(a.current.disabled||a.current.click());});f.useImperativeHandle(r,()=>({click:l}),[]),da("r",()=>{ks()||n&&l();},{exactMatch:true});const u=Z1(),{watchlaterItemsOrder:d,popularWeeklyUseShuffle:m}=Ut(),{usingShuffle:p}=bt(mn),g=u===et.AppRecommend||u===et.PcRecommend||u===et.KeepFollowOnly||u===et.Watchlater&&d===vo.Shuffle||u===et.Fav&&p||u===et.Hot&&fW(m)?"换一换":"刷新",[b,y]=qSe(),S=nt(C=>{y(b.current,{rotate:[0,360]},{duration:.5,type:"tween"}),i();});return H(ut,{ref:a,style:t,className:X(Wj,"[&:disabled]:cursor-wait",e),disabled:o,onClick:S,children:[x(xRe,{ref:b,className:"size-14px"}),g]})}const EPe={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 MPe(e){const t=bt(qo).subtab;if(e===et.Fav)return "max-w-300px";if(e===et.DynamicFeed)return "min-w-200px";if(e===et.Hot&&t===fr.Rank)return "min-w-130px"}function mK({className:e,style:t,sidebarView:n,tab:r}){const o=GA(r),i=sr("h-fit max-w-250px w-max flex-none overflow-x-hidden overflow-y-auto b-1px b-gate-border rounded-15px b-solid",MPe(r),e);return o&&n&&x("div",{className:i,css:EPe,style:t,children:x(Do,{theme:{components:{Menu:{itemHeight:30}}},children:n})})}const RPe=f.memo(function({show:t,onHide:n}){const{grid:{gridDisplayMode:r},modalFeedFullScreen:o,sidebarAlign:i}=Ut(),{usingTwoColumnMode:a}=Lq(r),l=!a&&o,u=f.useRef(null),d=f.useMemo(()=>X(l?"b-5px":"b-1px","b-gate-primary b-solid"),[l]),m=nt(()=>{u.current&&(u.current.scrollTop=0);}),{modalSettingsVisible:p}=g6(),g=[t,!p,!qG(),!GG()].every(Boolean),b=Uq(true),{tabbarView:y,sidebarView:S}=b.useStore(),{tab:C,direction:w}=UW(),$=()=>H("div",{className:X(Po.modalHeader,"gap-x-15px pr-15px"),children:[H("div",{className:"left flex flex-shrink-1 flex-wrap items-center gap-x-15px gap-y-4px",children:[x(qW,{}),y]}),H("div",{className:"right flex flex-shrink-0 items-center gap-x-8px",children:[r===Br.TwoColumnGrid?null:x(YAe,{initialOpen:true,children:x(TPe,{})}),x(fK,{refreshHotkeyEnabled:g}),x($g,{onClick:n,className:"ml-5px"})]})]}),M=X(a&&"bg-black/90%"),I=X("h-[calc(100vh-30px)] max-h-unset w-[calc(100vw-30px)] pr-0",l&&"h-full w-full",a&&_q,d);return x(NA.Provider,{value:b,children:H(wg,{show:t,onHide:n,clsModalMask:M,clsModal:I,children:[$(),H("div",{"data-role":"modal-body",className:X("flex flex-1 gap-x-25px overflow-hidden",i===mf.Right&&"flex-row-reverse"),children:[x(mK,{tab:C,sidebarView:S,className:"max-h-full"}),x("div",{className:"h-full flex-1 overflow-y-auto pr-15px",ref:u,children:x(dK,{tab:C,direction:w,shortcutEnabled:g,onScrollToTop:m,infiniteScrollUseWindow:false,scrollerRef:u},C)})]})]})})});function TPe(){return x(ze,{children:x(Pt,{configPath:"modalFeedFullScreen",label:"全屏",tooltip:"世界清净了~"})})}const Tu=kn({modalFeedVisible:false,modalSettingsVisible:false});function g6(){return bt(Tu)}function APe(){Tu.modalFeedVisible?hK():NPe();}function NPe(){vK(),Tu.modalFeedVisible=true;}function hK(){Tu.modalFeedVisible=false;}function PPe(){Tu.modalSettingsVisible?pK():v6();}function v6(){vK(),Tu.modalSettingsVisible=true;}function pK(){Tu.modalSettingsVisible=false;}function gK(){GM.registerMenuCommand?.("⚙️ 设置",v6);}const vK=Sf(function(){const t=document.createElement("div");t.classList.add("modals-container",$a),document.body.appendChild(t),Xa.createRoot(t).render(x(Fs,{children:x(IPe,{})}));});function IPe(){const{modalFeedVisible:e,modalSettingsVisible:t}=g6();return H(ze,{children:[x(RPe,{show:e,onHide:hK}),x(GAe,{show:t,onHide:pK})]})}const Ic=aT({align:"right",top:100},"float-entry"),D$={wrapperInner:"flex flex-col items-center gap-y-8px b-1px b-gate-primary rounded-18px b-solid bg-gate-bg p-4px",buttonIcon:"size-18px"};function OPe(){return x($q,{children:x(DPe,{})})}function DPe(){const{align:e,top:t}=bt(Ic,{sync:true}),n=f.useMemo(()=>({arrow:false,placement:e==="right"?"left":"right",align:{offset:[10*(e==="right"?-1:1),0]}}),[e]),r=f.useMemo(sRe,[]),{attributes:o,listeners:i,setNodeRef:a,setActivatorNodeRef:l,transform:u}=Eq({id:"GateFloatEntry"});uq({onDragEnd(b){if(b.active.id==="GateFloatEntry"){Yd.update();const y=d.current?.getBoundingClientRect();if(!y)return;const S=uf(Math.round(y.top),0,window.innerHeight-y.height);let C=Ic.align;(Ic.align==="right"&&y.left<window.innerWidth/4||Ic.align==="left"&&y.right>window.innerWidth/4*3)&&(C=Ic.align==="right"?"left":"right"),qQ("new pos",{align:C,top:S}),Ic.align=C,Ic.top=S,d.current?.animate([{transform:C==="right"?`translateX(-${window.innerWidth-y.right}px)`:`translateX(${y.left}px)`},{transform:"translateX(0)"}],{duration:200,easing:"ease-in-out"});}}});const d=V1(a),m=sr("fixed transition-200 transition-ease-in-out transition-property-right,left",RCe,e==="right"&&"right--30px pr-6px hover:right-0",e==="left"&&"left--30px pl-6px hover:left-0");ro(Yd.updateThrottled);const{height:p}=Yd.use(),g=f.useMemo(()=>uf(t,0,p-150),[t,p]);return x("div",{ref:d,className:m,style:{top:`${g}px`,transform:gf.Transform.toString(u)},children:H("div",{className:D$.wrapperInner,children:[x(gn,{title:H(ze,{children:[Ao,": 在新窗口打开"]}),...n,children:x(ut,{className:"icon-only-round-button",href:r,target:"_blank",children:x(No,{className:D$.buttonIcon})})}),x(gn,{title:H(ze,{children:[Ao,": 弹窗打开"]}),...n,children:x(ut,{className:"icon-only-round-button",onClick:APe,children:x(HG,{className:D$.buttonIcon})})}),x(ut,{className:"icon-only-round-button cursor-move",...i,...o,ref:l,children:x(kG,{className:"size-14px"})})]})})}function _Pe(e,t,n){const r=nt(t),o=Al(n);return f.useEffect(()=>{const i=new ResizeObserver(a=>{for(const l of a)if(l.target===e&&l.contentRect){const u=r(l);ma(o.val,u)||o.set(u);}});return i.observe(e),()=>{i.disconnect();}},[e,r]),o.state}function LPe(){const e=f.useRef(null),[t,n]=f.useState(false);return f.useEffect(()=>{const r=Gl(()=>{if(!e.current)return;const o=Math.trunc(e.current.getBoundingClientRect().top*10)/10,i=Number.parseInt(getComputedStyle(e.current).top),a=o<=i;n(a);},16);return r(),document.addEventListener("scroll",r),window.addEventListener("resize",r),window.addEventListener("orientationchange",r),()=>{document.removeEventListener("scroll",r),window.removeEventListener("resize",r),window.removeEventListener("orientationchange",r);}},[t]),[e,t]}const zPe=io.extend("RecHeader");function BPe({leftSlot:e,rightSlot:t,shortcutEnabled:n,ref:r}){const{pureRecommend:o,multiSelect:{showIcon:i},style:{pureRecommend:{useStickyTabbar:a,stickyTabbarShadow:l,useWhiteBackground:u}}}=Ut();da(["shift.comma"],T=>{ks()||PPe();},{exactMatch:true,useCapture:true});const[d,m]=LPe(),p=nt(()=>{if(!o)return;const T=d.current?.parentElement;if(!T)return;const R=T.getBoundingClientRect(),I=cu.get();if(R.top<I){const N=twe(T).top;zPe("[refresh:scroll] rect.top = %s, headerHeight = %s",R.top,I),document.documentElement.scrollTop=N-I+2;}});f.useImperativeHandle(r,()=>({scrollToTop:p}));const g=cu.use(),b=FPe(),y=lT.use(),S=P1(),C=kPe(),w=(()=>{let T;return y?T=S?"rgba(0, 0, 0, 26%) 0px 2px 10px 1px":"rgba(0, 0, 0, 13%) 0 1px 10px 1px;":T=`0 2px 4px ${S?"rgb(255 255 255 / 5%)":"rgb(0 0 0 / 8%)"}`,ln("box-shadow:",T,";","")})(),$=sr(o&&a&&["sticky mb-10px b-b-1px b-b-transparent b-b-solid",MCe,m&&["bg-gate-bg","b-b-gate-bg-lv1"]],m&&"sticky-state-on"),M=f.useMemo(()=>{if(!(o&&a))return;const R=[ln("top:",g-1,"px;","")];return l&&m&&R.push(w,C),R},[o,a,l,m,g,w,C]);return x("div",{ref:d,"data-role":"tab-bar-wrapper",className:$,css:M,children:H("div",{"data-role":"tab-bar",className:X(Sz,"relative mb-0 h-auto flex flex-row items-center justify-between gap-x-15px px-0 py-8px"),children:[H("div",{"data-class-name":"left",className:"h-full flex flex-wrap items-center gap-x-15px gap-y-8px",children:[x(qW,{className:"flex-none"}),e]}),H("div",{"data-class-name":"right",className:"h-full min-w-180px flex flex-row-reverse flex-wrap items-center justify-right gap-x-8px gap-y-8px",children:[x(fK,{refreshHotkeyEnabled:n}),x(gn,{title:"设置",arrow:false,children:H(ut,{onClick:v6,className:"icon-only-round-button",children:[x(qAe,{}),x(KT,{className:"size-14px"})]})}),i&&x(uG,{iconOnly:true,addCopyActions:true}),b&&x(MA,{style:{marginLeft:5}}),t]})]})})}function kPe(){const{xScrolling:e,bodyWidth:t}=_Pe(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 ln("margin-inline:calc((100% - ",n,"px) / 2);padding-inline:calc((",n,"px - 100%) / 2);","")}else {const n=ZT||pg?"0px":"20px";return ln("margin-inline:calc((100% - 100vw + ",n,") / 2);padding-inline:calc((100vw - ",n," - 100%) / 2);","")}},[e,t])}function FPe(){const{accessKey:e}=Ut(),t=Z1();return !e&&[et.AppRecommend,et.Liked].includes(t)}function HPe(){const{modalFeedVisible:e,modalSettingsVisible:t}=g6();return [e,t,qG(),GG()].every(r=>r===false)}function VPe(){const{grid:{twoColumnModeAlign:e},sidebarAlign:t}=Ut(),{usingTwoColumnMode:n}=zq(),r=HPe(),o=Uq(),{tabbarView:i,sidebarView:a}=o.useStore(),{tab:l,direction:u}=UW(),d=f.useRef(null),m=nt(()=>d.current?.scrollToTop()),p=cu.use(),g=f.useMemo(()=>ln("position:sticky;top:",p+55,"px;max-height:calc(100vh - ",p+55+20,"px);",""),[p]);let b,y,S;return b=X("flex gap-x-25px",t===mf.Right&&"flex-row-reverse"),y="flex-1",S=X(n&&[_q,IEe(e,"margin")]),H(NA.Provider,{value:o,children:[x(BPe,{ref:d,leftSlot:i,shortcutEnabled:r}),H("div",{className:b,children:[x(mK,{css:g,tab:l,sidebarView:a}),x(dK,{tab:l,direction:u,containerClassName:y,className:S,shortcutEnabled:r,infiniteScrollUseWindow:true,onScrollToTop:m},l)]})]})}const bK="html.bewly-design:not(:has(#i_cecream,#app))";function jPe(){return !!document.querySelector(bK)}function UPe(){return A1(bK,()=>{Ko("unmount for using bewly-design"),Fp?.unmount();},{pollTimeout:5e3,warnOnTimeout:false})}let Fp;async function qPe(){if(Fh(".adblock-tips"),Fh(".vip-login-tip"),A1("html.gray",t=>t.classList.remove("gray")),gK(),jPe())return Ko("quit for using bewly-design");at.pureRecommend||aRe()||Q1()?(await GPe(),UPe()):WPe();}function WPe(){const e=document.createElement("section");e.classList.add($a),document.body.append(e),Fp=Xa.createRoot(e),Fp.render(H(Fs,{children:[x(B1,{antd:true,baseGlobalStyle:true}),x(OPe,{})]}));}async function GPe(){pg&&await pn(500),Fh("#i_cecream .bili-feed4-layout, body > #app .bili-feed4-layout"),Fh(".bili-feed4 .header-channel"),Fh(".palette-button-wrap");const e=document.createElement("div");e.classList.add("bili-feed4-layout","pure-recommend",$a),await Sg(()=>document.querySelector(".bili-feed4 .bili-header"),{interval:20,timeout:2e3}),document.body.append(e);const t=document.createElement("div");e.append(t),Fp=Xa.createRoot(t),Fp.render(H(Fs,{children:[x(B1,{antd:true,baseGlobalStyle:true,homePageGlobalStyle:true}),x(VPe,{}),x(Eu.BackTop,{style:{insetInlineEnd:"var(--back-top-right, 24px)"}})]}));}function b6(){YPe(),gK();}const KPe=Sf(()=>{const e=document.createElement("div");document.body.appendChild(e),Xa.createRoot(e).render(x(Fs,{children:x(B1,{antd:true,baseGlobalStyle:true})}));});function YPe(){KPe();}function XPe(){try{return globalThis.self!==window.top}catch{return true}}const y6=new Xo,QPe=Sf(()=>{window.navigation?.addEventListener?.("navigatesuccess",()=>{y6.emit("navigate-success");});});queueMicrotask(QPe);function ZPe(){XPe()||(b6(),at.videoCard.videoPreview.addTo.searchPage&&JPe());}function JPe(){const e=NH(()=>{const r=Array.from(document.querySelectorAll(".video-list-item:has(> .bili-video-card),div:has(> .bili-video-card)"));for(const o of r)e4e(o);},1);e(),new MutationObserver(()=>e()).observe(document.body,{childList:true,subtree:true});}const xL=new WeakSet,wL=`${oo}-add-large-preview-processed`;function e4e(e){if(xL.has(e)||e.getAttribute(wL))return;const t=e.querySelector(".bili-watch-later--wrap");if(!t)return;const n=document.createElement("div");t.after(n),xL.add(e),e.setAttribute(wL,"true"),Xa.createRoot(n).render(x(Fs,{children:x(t4e,{el:e})}));}function t4e({el:e}){const{bvid:t="",cover:n}=f.useMemo(()=>n4e(e),[e]),r=f.useMemo(()=>e.querySelector(".bili-video-card")??e,[e]),o=f.useMemo(()=>r.querySelector(".bili-video-card__wrap > a"),[e]),i=z1(r),a=f.useRef(o),{largePreviewActionButtonEl:l,largePreviewEl:u}=eK({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:Vq,cardTarget:r,cover:n,videoCardAsTriggerRef:a});return H(ze,{children:[x("div",{className:sr(Pp.top("right"),"right-[calc(8px+28px+5px)]"),children:l}),Eo.createPortal(u,r)]})}function n4e(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}}const r4e=`${oo}-${crypto.randomUUID()}`;async function o4e(){if(!iu.mid)return;const e=".h-action",t=".upinfo .operations";await A1([e,t].join(","),n=>{iu.href=location.href,iu.usingNewSpacePage=n.matches(t),yK();const r=document.createElement("span");r.id=r4e,r.classList.add("mr-24px"),n.prepend(r),Xa.createRoot(r).render(x(Fs,{children:x(i4e,{})}));},{pollTimeout:1e4,pollInterval:1e3});}const iu=kn({href:location.href,usingNewSpacePage:false,followed:false,get mid(){return a4e(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()}}),yK=zs(async()=>{const e=await Sg(()=>{if(Array.from(document.querySelectorAll(".space-follow-btn")).filter(n=>n.textContent?.trim()==="已关注").length>0)return true},{interval:100,timeout:5e3});iu.followed=!!e;});y6.on("navigate-success",()=>{iu.href=location.href,yK();});function i4e(){const{mid:e,collectionId:t,followed:n,isSearching:r,searchKeyword:o}=bt(iu);if(!e)return;const i="w-34px b-white/33% rounded-full hover:b-gate-primary hover:bg-gate-primary",a="size-17px";let l;{let m=`https://www.bilibili.com/?${ka.Mid}=${e}`;r&&o&&(m+=`&${ka.SearchText}=${o}`),l=x(_$,{className:i,href:m,tooltip:`在「${Ao}」中查看 UP 的投稿`,children:x(py,{className:a})},"btnSpaceUpload");}let u;if(n){const m=`https://www.bilibili.com/?${pi.Mid}=${e}`;u=x(_$,{className:i,href:m,tooltip:`在「${Ao}」中查看 UP 的动态`,children:x(hy,{className:a})},"btnDynamicFeed");}let d;return typeof t=="number"&&(d=x(_$,{className:i,href:`https://www.bilibili.com/?${$y.CollectionIdFull}=${t}`,target:"_blank",tooltip:`在「${Ao}」中查看合集`,children:x(tS,{className:a})},"btnViewCollection")),H("span",{className:"inline-flex items-center gap-x-8px",children:[d,l,u]})}function _$({href:e,children:t,className:n,style:r,tooltip:o,...i}){const{usingNewSpacePage:a}=bt(iu),l=sr("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),u=a?x("a",{...i,href:e,className:l,style:r,children:t}):x("a",{href:e,className:X("h-f-btn",n),style:{width:"auto",paddingInline:"15px",...r},...i,children:t});return o?x(gn,{title:o,children:u}):u}function a4e(e=location.href){const n=new URL(e).pathname.split("/").map(r=>r.trim()).find(Boolean);if(!(!n||!/^\d+$/.test(n)))return n}function s4e(){y6.on("navigate-success",l4e);}function l4e(){const e=new URL(location.href);if(e.hostname!=="space.bilibili.com")return;const t=/^\/(?<mid>\d+)\/lists\?sid=(?<sid>\d+)$/.exec(e.pathname+e.search);if(!t)return;const n=new URL(`/${t.groups?.mid}/lists/${t.groups?.sid}`,location.href).href;location.href=n;}function c4e(){b6(),s4e(),o4e();}function lM(){if(!(typeof unsafeWindow>"u"))return unsafeWindow.player}const p0=io.extend("main:video-play-page");async function u4e(){b6(),d4e(),y4e(),await h4e(),await p4e();}function d4e(){f4e(),m4e(),b4e();}function f4e(){kA&&GM.registerMenuCommand?.("🎦 小窗打开",()=>{SK(),g4e();});}function m4e(){ZT&&GM.registerMenuCommand?.("▶️ IINA 打开",()=>{SK(),v4e();});}async function h4e(){const e=new URL(location.href).searchParams.get(ql.PlayerScreenMode);if(p0("targetMode=%s",e),!(e===$l.WebFullscreen||e===$l.Fullscreen))return;let n;e===$l.WebFullscreen&&(n=()=>document.querySelector('[role="button"][aria-label="网页全屏"]')?.click()),e===$l.Fullscreen&&(n=()=>document.querySelector('[role="button"][aria-label="全屏"]')?.click());const r=()=>document.querySelector("#bilibili-player .bpx-player-container")?.dataset.screen||$l.Normal,o=Date.now()+so("30s");for(;r()!==e&&Date.now()<=o;)p0("current mode: %s",r()),n?.(),await pn(100);p0("handleFullscreen to %s complete",e);}async function p4e(){if(Qq()||!(new URL(location.href).searchParams.get(ql.ForceAutoPlay)===eA.ON))return;const t=()=>{const r=lM();return !!r&&!r.isPaused()},n=Date.now()+so("30s");for(;Date.now()<=n&&!t();)lM()?.play(),await pn(1e3);p0("handleForceAutoPlay complete, playing = %s",t());}function SK(){const e=lM();e&&!e.isPaused()&&e.pause();}function g4e(){const e=new URL(location.href);e.searchParams.set(ql.PlayerScreenMode,$l.WebFullscreen);const t=e.href;sW(t,"");}function v4e(){const e=`iina://open?url=${encodeURIComponent(location.href)}`;window.open(e,"_self");}function b4e(){GM.registerMenuCommand?.("⭐️ 加入收藏",()=>cM());}async function y4e(){if(!at.fav.useCustomFavPicker.onPlayPage||!kq())return;document.addEventListener("keydown",t=>{t.key!=="e"||ks()||t.target.closest("bili-comments")||(t.stopImmediatePropagation(),t.preventDefault(),cM());},{capture:true}),(await Sg(()=>document.querySelector(".video-fav.video-toolbar-left-item"),{interval:100,timeout:5e3}))?.addEventListener("click",t=>{t.stopImmediatePropagation(),t.preventDefault(),cM();},{capture:true});}async function cM(e){const t=kq();if(!t)return Ot.error("无法解析视频 BVID !");const n=yRe(t);if(e===void 0){const r=await pu.getVideoFavState(n);r&&(e=r.favFolderIds);}await Ly(e,async r=>{if(!await u6(n,e,r))return;const i=!!r;return document.querySelector(".video-fav.video-toolbar-left-item")?.classList.toggle("on",i),true});}Gn.extend(Ixe);(function(){if(Os)return qPe();if(Bq)return u4e();if(jQ)return c4e();if(UQ)return ZPe()})();
})(UAParser, axios, SparkMD5, localforage, PinyinMatch);