cc-viewer 1.4.3 → 1.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,617 @@
1
+ var gT=Object.defineProperty;var vT=(e,t,n)=>t in e?gT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var kt=(e,t,n)=>vT(e,typeof t!="symbol"?t+"":t,n);function y2(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function ju(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qp={exports:{}},Bc={},Zp={exports:{}},rn={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var JS;function yT(){if(JS)return rn;JS=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),m=Symbol.iterator;function g(D){return D===null||typeof D!="object"?null:(D=m&&D[m]||D["@@iterator"],typeof D=="function"?D:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,S={};function _(D,U,Y){this.props=D,this.context=U,this.refs=S,this.updater=Y||v}_.prototype.isReactComponent={},_.prototype.setState=function(D,U){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,U,"setState")},_.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function C(){}C.prototype=_.prototype;function E(D,U,Y){this.props=D,this.context=U,this.refs=S,this.updater=Y||v}var k=E.prototype=new C;k.constructor=E,y(k,_.prototype),k.isPureReactComponent=!0;var $=Array.isArray,P=Object.prototype.hasOwnProperty,T={current:null},O={key:!0,ref:!0,__self:!0,__source:!0};function N(D,U,Y){var Z,ee={},re=null,he=null;if(U!=null)for(Z in U.ref!==void 0&&(he=U.ref),U.key!==void 0&&(re=""+U.key),U)P.call(U,Z)&&!O.hasOwnProperty(Z)&&(ee[Z]=U[Z]);var fe=arguments.length-2;if(fe===1)ee.children=Y;else if(1<fe){for(var ue=Array(fe),Se=0;Se<fe;Se++)ue[Se]=arguments[Se+2];ee.children=ue}if(D&&D.defaultProps)for(Z in fe=D.defaultProps,fe)ee[Z]===void 0&&(ee[Z]=fe[Z]);return{$$typeof:e,type:D,key:re,ref:he,props:ee,_owner:T.current}}function I(D,U){return{$$typeof:e,type:D.type,key:U,ref:D.ref,props:D.props,_owner:D._owner}}function z(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function L(D){var U={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(Y){return U[Y]})}var M=/\/+/g;function j(D,U){return typeof D=="object"&&D!==null&&D.key!=null?L(""+D.key):U.toString(36)}function B(D,U,Y,Z,ee){var re=typeof D;(re==="undefined"||re==="boolean")&&(D=null);var he=!1;if(D===null)he=!0;else switch(re){case"string":case"number":he=!0;break;case"object":switch(D.$$typeof){case e:case t:he=!0}}if(he)return he=D,ee=ee(he),D=Z===""?"."+j(he,0):Z,$(ee)?(Y="",D!=null&&(Y=D.replace(M,"$&/")+"/"),B(ee,U,Y,"",function(Se){return Se})):ee!=null&&(z(ee)&&(ee=I(ee,Y+(!ee.key||he&&he.key===ee.key?"":(""+ee.key).replace(M,"$&/")+"/")+D)),U.push(ee)),1;if(he=0,Z=Z===""?".":Z+":",$(D))for(var fe=0;fe<D.length;fe++){re=D[fe];var ue=Z+j(re,fe);he+=B(re,U,Y,ue,ee)}else if(ue=g(D),typeof ue=="function")for(D=ue.call(D),fe=0;!(re=D.next()).done;)re=re.value,ue=Z+j(re,fe++),he+=B(re,U,Y,ue,ee);else if(re==="object")throw U=String(D),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.");return he}function H(D,U,Y){if(D==null)return D;var Z=[],ee=0;return B(D,Z,"","",function(re){return U.call(Y,re,ee++)}),Z}function W(D){if(D._status===-1){var U=D._result;U=U(),U.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=U)}if(D._status===1)return D._result.default;throw D._result}var V={current:null},A={transition:null},G={ReactCurrentDispatcher:V,ReactCurrentBatchConfig:A,ReactCurrentOwner:T};function q(){throw Error("act(...) is not supported in production builds of React.")}return rn.Children={map:H,forEach:function(D,U,Y){H(D,function(){U.apply(this,arguments)},Y)},count:function(D){var U=0;return H(D,function(){U++}),U},toArray:function(D){return H(D,function(U){return U})||[]},only:function(D){if(!z(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},rn.Component=_,rn.Fragment=n,rn.Profiler=i,rn.PureComponent=E,rn.StrictMode=r,rn.Suspense=u,rn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=G,rn.act=q,rn.cloneElement=function(D,U,Y){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var Z=y({},D.props),ee=D.key,re=D.ref,he=D._owner;if(U!=null){if(U.ref!==void 0&&(re=U.ref,he=T.current),U.key!==void 0&&(ee=""+U.key),D.type&&D.type.defaultProps)var fe=D.type.defaultProps;for(ue in U)P.call(U,ue)&&!O.hasOwnProperty(ue)&&(Z[ue]=U[ue]===void 0&&fe!==void 0?fe[ue]:U[ue])}var ue=arguments.length-2;if(ue===1)Z.children=Y;else if(1<ue){fe=Array(ue);for(var Se=0;Se<ue;Se++)fe[Se]=arguments[Se+2];Z.children=fe}return{$$typeof:e,type:D.type,key:ee,ref:re,props:Z,_owner:he}},rn.createContext=function(D){return D={$$typeof:a,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:o,_context:D},D.Consumer=D},rn.createElement=N,rn.createFactory=function(D){var U=N.bind(null,D);return U.type=D,U},rn.createRef=function(){return{current:null}},rn.forwardRef=function(D){return{$$typeof:c,render:D}},rn.isValidElement=z,rn.lazy=function(D){return{$$typeof:f,_payload:{_status:-1,_result:D},_init:W}},rn.memo=function(D,U){return{$$typeof:d,type:D,compare:U===void 0?null:U}},rn.startTransition=function(D){var U=A.transition;A.transition={};try{D()}finally{A.transition=U}},rn.unstable_act=q,rn.useCallback=function(D,U){return V.current.useCallback(D,U)},rn.useContext=function(D){return V.current.useContext(D)},rn.useDebugValue=function(){},rn.useDeferredValue=function(D){return V.current.useDeferredValue(D)},rn.useEffect=function(D,U){return V.current.useEffect(D,U)},rn.useId=function(){return V.current.useId()},rn.useImperativeHandle=function(D,U,Y){return V.current.useImperativeHandle(D,U,Y)},rn.useInsertionEffect=function(D,U){return V.current.useInsertionEffect(D,U)},rn.useLayoutEffect=function(D,U){return V.current.useLayoutEffect(D,U)},rn.useMemo=function(D,U){return V.current.useMemo(D,U)},rn.useReducer=function(D,U,Y){return V.current.useReducer(D,U,Y)},rn.useRef=function(D){return V.current.useRef(D)},rn.useState=function(D){return V.current.useState(D)},rn.useSyncExternalStore=function(D,U,Y){return V.current.useSyncExternalStore(D,U,Y)},rn.useTransition=function(){return V.current.useTransition()},rn.version="18.3.1",rn}var QS;function uy(){return QS||(QS=1,Zp.exports=yT()),Zp.exports}/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var ZS;function bT(){if(ZS)return Bc;ZS=1;var e=uy(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(c,u,d){var f,m={},g=null,v=null;d!==void 0&&(g=""+d),u.key!==void 0&&(g=""+u.key),u.ref!==void 0&&(v=u.ref);for(f in u)r.call(u,f)&&!o.hasOwnProperty(f)&&(m[f]=u[f]);if(c&&c.defaultProps)for(f in u=c.defaultProps,u)m[f]===void 0&&(m[f]=u[f]);return{$$typeof:t,type:c,key:g,ref:v,props:m,_owner:i.current}}return Bc.Fragment=n,Bc.jsx=a,Bc.jsxs=a,Bc}var e1;function _T(){return e1||(e1=1,Qp.exports=bT()),Qp.exports}var x=_T(),h=uy();const J=ju(h),Nf=y2({__proto__:null,default:J},[h]);var nh={},eg={exports:{}},ki={},tg={exports:{}},ng={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var t1;function ST(){return t1||(t1=1,(function(e){function t(A,G){var q=A.length;A.push(G);e:for(;0<q;){var D=q-1>>>1,U=A[D];if(0<i(U,G))A[D]=G,A[q]=U,q=D;else break e}}function n(A){return A.length===0?null:A[0]}function r(A){if(A.length===0)return null;var G=A[0],q=A.pop();if(q!==G){A[0]=q;e:for(var D=0,U=A.length,Y=U>>>1;D<Y;){var Z=2*(D+1)-1,ee=A[Z],re=Z+1,he=A[re];if(0>i(ee,q))re<U&&0>i(he,ee)?(A[D]=he,A[re]=q,D=re):(A[D]=ee,A[Z]=q,D=Z);else if(re<U&&0>i(he,q))A[D]=he,A[re]=q,D=re;else break e}}return G}function i(A,G){var q=A.sortIndex-G.sortIndex;return q!==0?q:A.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,c=a.now();e.unstable_now=function(){return a.now()-c}}var u=[],d=[],f=1,m=null,g=3,v=!1,y=!1,S=!1,_=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(A){for(var G=n(d);G!==null;){if(G.callback===null)r(d);else if(G.startTime<=A)r(d),G.sortIndex=G.expirationTime,t(u,G);else break;G=n(d)}}function $(A){if(S=!1,k(A),!y)if(n(u)!==null)y=!0,W(P);else{var G=n(d);G!==null&&V($,G.startTime-A)}}function P(A,G){y=!1,S&&(S=!1,C(N),N=-1),v=!0;var q=g;try{for(k(G),m=n(u);m!==null&&(!(m.expirationTime>G)||A&&!L());){var D=m.callback;if(typeof D=="function"){m.callback=null,g=m.priorityLevel;var U=D(m.expirationTime<=G);G=e.unstable_now(),typeof U=="function"?m.callback=U:m===n(u)&&r(u),k(G)}else r(u);m=n(u)}if(m!==null)var Y=!0;else{var Z=n(d);Z!==null&&V($,Z.startTime-G),Y=!1}return Y}finally{m=null,g=q,v=!1}}var T=!1,O=null,N=-1,I=5,z=-1;function L(){return!(e.unstable_now()-z<I)}function M(){if(O!==null){var A=e.unstable_now();z=A;var G=!0;try{G=O(!0,A)}finally{G?j():(T=!1,O=null)}}else T=!1}var j;if(typeof E=="function")j=function(){E(M)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,H=B.port2;B.port1.onmessage=M,j=function(){H.postMessage(null)}}else j=function(){_(M,0)};function W(A){O=A,T||(T=!0,j())}function V(A,G){N=_(function(){A(e.unstable_now())},G)}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(A){A.callback=null},e.unstable_continueExecution=function(){y||v||(y=!0,W(P))},e.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<A?Math.floor(1e3/A):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(A){switch(g){case 1:case 2:case 3:var G=3;break;default:G=g}var q=g;g=G;try{return A()}finally{g=q}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(A,G){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var q=g;g=A;try{return G()}finally{g=q}},e.unstable_scheduleCallback=function(A,G,q){var D=e.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?D+q:D):q=D,A){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=q+U,A={id:f++,callback:G,priorityLevel:A,startTime:q,expirationTime:U,sortIndex:-1},q>D?(A.sortIndex=q,t(d,A),n(u)===null&&A===n(d)&&(S?(C(N),N=-1):S=!0,V($,q-D))):(A.sortIndex=U,t(u,A),y||v||(y=!0,W(P))),A},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(A){var G=g;return function(){var q=g;g=G;try{return A.apply(this,arguments)}finally{g=q}}}})(ng)),ng}var n1;function CT(){return n1||(n1=1,tg.exports=ST()),tg.exports}/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var r1;function wT(){if(r1)return ki;r1=1;var e=uy(),t=CT();function n(s){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+s,p=1;p<arguments.length;p++)l+="&args[]="+encodeURIComponent(arguments[p]);return"Minified React error #"+s+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function o(s,l){a(s,l),a(s+"Capture",l)}function a(s,l){for(i[s]=l,s=0;s<l.length;s++)r.add(l[s])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u=Object.prototype.hasOwnProperty,d=/^[: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]*$/,f={},m={};function g(s){return u.call(m,s)?!0:u.call(f,s)?!1:d.test(s)?m[s]=!0:(f[s]=!0,!1)}function v(s,l,p,b){if(p!==null&&p.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return b?!1:p!==null?!p.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function y(s,l,p,b){if(l===null||typeof l>"u"||v(s,l,p,b))return!0;if(b)return!1;if(p!==null)switch(p.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function S(s,l,p,b,w,R,F){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=b,this.attributeNamespace=w,this.mustUseProperty=p,this.propertyName=s,this.type=l,this.sanitizeURL=R,this.removeEmptyString=F}var _={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){_[s]=new S(s,0,!1,s,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var l=s[0];_[l]=new S(l,1,!1,s[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(s){_[s]=new S(s,2,!1,s.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){_[s]=new S(s,2,!1,s,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(s){_[s]=new S(s,3,!1,s.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(s){_[s]=new S(s,3,!0,s,null,!1,!1)}),["capture","download"].forEach(function(s){_[s]=new S(s,4,!1,s,null,!1,!1)}),["cols","rows","size","span"].forEach(function(s){_[s]=new S(s,6,!1,s,null,!1,!1)}),["rowSpan","start"].forEach(function(s){_[s]=new S(s,5,!1,s.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function E(s){return s[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(s){var l=s.replace(C,E);_[l]=new S(l,1,!1,s,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var l=s.replace(C,E);_[l]=new S(l,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(s){var l=s.replace(C,E);_[l]=new S(l,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(s){_[s]=new S(s,1,!1,s.toLowerCase(),null,!1,!1)}),_.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(s){_[s]=new S(s,1,!1,s.toLowerCase(),null,!0,!0)});function k(s,l,p,b){var w=_.hasOwnProperty(l)?_[l]:null;(w!==null?w.type!==0:b||!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(y(l,p,w,b)&&(p=null),b||w===null?g(l)&&(p===null?s.removeAttribute(l):s.setAttribute(l,""+p)):w.mustUseProperty?s[w.propertyName]=p===null?w.type===3?!1:"":p:(l=w.attributeName,b=w.attributeNamespace,p===null?s.removeAttribute(l):(w=w.type,p=w===3||w===4&&p===!0?"":""+p,b?s.setAttributeNS(b,l,p):s.setAttribute(l,p))))}var $=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,P=Symbol.for("react.element"),T=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),L=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),V=Symbol.for("react.offscreen"),A=Symbol.iterator;function G(s){return s===null||typeof s!="object"?null:(s=A&&s[A]||s["@@iterator"],typeof s=="function"?s:null)}var q=Object.assign,D;function U(s){if(D===void 0)try{throw Error()}catch(p){var l=p.stack.trim().match(/\n( *(at )?)/);D=l&&l[1]||""}return`
34
+ `+D+s}var Y=!1;function Z(s,l){if(!s||Y)return"";Y=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(l)if(l=function(){throw Error()},Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(_e){var b=_e}Reflect.construct(s,[],l)}else{try{l.call()}catch(_e){b=_e}s.call(l.prototype)}else{try{throw Error()}catch(_e){b=_e}s()}}catch(_e){if(_e&&b&&typeof _e.stack=="string"){for(var w=_e.stack.split(`
35
+ `),R=b.stack.split(`
36
+ `),F=w.length-1,Q=R.length-1;1<=F&&0<=Q&&w[F]!==R[Q];)Q--;for(;1<=F&&0<=Q;F--,Q--)if(w[F]!==R[Q]){if(F!==1||Q!==1)do if(F--,Q--,0>Q||w[F]!==R[Q]){var ie=`
37
+ `+w[F].replace(" at new "," at ");return s.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",s.displayName)),ie}while(1<=F&&0<=Q);break}}}finally{Y=!1,Error.prepareStackTrace=p}return(s=s?s.displayName||s.name:"")?U(s):""}function ee(s){switch(s.tag){case 5:return U(s.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return s=Z(s.type,!1),s;case 11:return s=Z(s.type.render,!1),s;case 1:return s=Z(s.type,!0),s;default:return""}}function re(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case O:return"Fragment";case T:return"Portal";case I:return"Profiler";case N:return"StrictMode";case j:return"Suspense";case B:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case L:return(s.displayName||"Context")+".Consumer";case z:return(s._context.displayName||"Context")+".Provider";case M:var l=s.render;return s=s.displayName,s||(s=l.displayName||l.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case H:return l=s.displayName||null,l!==null?l:re(s.type)||"Memo";case W:l=s._payload,s=s._init;try{return re(s(l))}catch{}}return null}function he(s){var l=s.type;switch(s.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=l.render,s=s.displayName||s.name||"",l.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return re(l);case 8:return l===N?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function fe(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function ue(s){var l=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function Se(s){var l=ue(s)?"checked":"value",p=Object.getOwnPropertyDescriptor(s.constructor.prototype,l),b=""+s[l];if(!s.hasOwnProperty(l)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var w=p.get,R=p.set;return Object.defineProperty(s,l,{configurable:!0,get:function(){return w.call(this)},set:function(F){b=""+F,R.call(this,F)}}),Object.defineProperty(s,l,{enumerable:p.enumerable}),{getValue:function(){return b},setValue:function(F){b=""+F},stopTracking:function(){s._valueTracker=null,delete s[l]}}}}function ae(s){s._valueTracker||(s._valueTracker=Se(s))}function le(s){if(!s)return!1;var l=s._valueTracker;if(!l)return!0;var p=l.getValue(),b="";return s&&(b=ue(s)?s.checked?"true":"false":s.value),s=b,s!==p?(l.setValue(s),!0):!1}function ce(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}}function ye(s,l){var p=l.checked;return q({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:p??s._wrapperState.initialChecked})}function me(s,l){var p=l.defaultValue==null?"":l.defaultValue,b=l.checked!=null?l.checked:l.defaultChecked;p=fe(l.value!=null?l.value:p),s._wrapperState={initialChecked:b,initialValue:p,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function de(s,l){l=l.checked,l!=null&&k(s,"checked",l,!1)}function be(s,l){de(s,l);var p=fe(l.value),b=l.type;if(p!=null)b==="number"?(p===0&&s.value===""||s.value!=p)&&(s.value=""+p):s.value!==""+p&&(s.value=""+p);else if(b==="submit"||b==="reset"){s.removeAttribute("value");return}l.hasOwnProperty("value")?Te(s,l.type,p):l.hasOwnProperty("defaultValue")&&Te(s,l.type,fe(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(s.defaultChecked=!!l.defaultChecked)}function we(s,l,p){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var b=l.type;if(!(b!=="submit"&&b!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+s._wrapperState.initialValue,p||l===s.value||(s.value=l),s.defaultValue=l}p=s.name,p!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,p!==""&&(s.name=p)}function Te(s,l,p){(l!=="number"||ce(s.ownerDocument)!==s)&&(p==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+p&&(s.defaultValue=""+p))}var ze=Array.isArray;function Ee(s,l,p,b){if(s=s.options,l){l={};for(var w=0;w<p.length;w++)l["$"+p[w]]=!0;for(p=0;p<s.length;p++)w=l.hasOwnProperty("$"+s[p].value),s[p].selected!==w&&(s[p].selected=w),w&&b&&(s[p].defaultSelected=!0)}else{for(p=""+fe(p),l=null,w=0;w<s.length;w++){if(s[w].value===p){s[w].selected=!0,b&&(s[w].defaultSelected=!0);return}l!==null||s[w].disabled||(l=s[w])}l!==null&&(l.selected=!0)}}function ke(s,l){if(l.dangerouslySetInnerHTML!=null)throw Error(n(91));return q({},l,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function je(s,l){var p=l.value;if(p==null){if(p=l.children,l=l.defaultValue,p!=null){if(l!=null)throw Error(n(92));if(ze(p)){if(1<p.length)throw Error(n(93));p=p[0]}l=p}l==null&&(l=""),p=l}s._wrapperState={initialValue:fe(p)}}function Oe(s,l){var p=fe(l.value),b=fe(l.defaultValue);p!=null&&(p=""+p,p!==s.value&&(s.value=p),l.defaultValue==null&&s.defaultValue!==p&&(s.defaultValue=p)),b!=null&&(s.defaultValue=""+b)}function Qe(s){var l=s.textContent;l===s._wrapperState.initialValue&&l!==""&&l!==null&&(s.value=l)}function at(s){switch(s){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function $t(s,l){return s==null||s==="http://www.w3.org/1999/xhtml"?at(l):s==="http://www.w3.org/2000/svg"&&l==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var pt,Je=(function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(l,p,b,w){MSApp.execUnsafeLocalFunction(function(){return s(l,p,b,w)})}:s})(function(s,l){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=l;else{for(pt=pt||document.createElement("div"),pt.innerHTML="<svg>"+l.valueOf().toString()+"</svg>",l=pt.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;l.firstChild;)s.appendChild(l.firstChild)}});function ft(s,l){if(l){var p=s.firstChild;if(p&&p===s.lastChild&&p.nodeType===3){p.nodeValue=l;return}}s.textContent=l}var Xe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},yt=["Webkit","ms","Moz","O"];Object.keys(Xe).forEach(function(s){yt.forEach(function(l){l=l+s.charAt(0).toUpperCase()+s.substring(1),Xe[l]=Xe[s]})});function tt(s,l,p){return l==null||typeof l=="boolean"||l===""?"":p||typeof l!="number"||l===0||Xe.hasOwnProperty(s)&&Xe[s]?(""+l).trim():l+"px"}function Le(s,l){s=s.style;for(var p in l)if(l.hasOwnProperty(p)){var b=p.indexOf("--")===0,w=tt(p,l[p],b);p==="float"&&(p="cssFloat"),b?s.setProperty(p,w):s[p]=w}}var rt=q({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Me(s,l){if(l){if(rt[s]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(n(137,s));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(n(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(n(61))}if(l.style!=null&&typeof l.style!="object")throw Error(n(62))}}function qe(s,l){if(s.indexOf("-")===-1)return typeof l.is=="string";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!1;default:return!0}}var It=null;function St(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var nn=null,Jt=null,_n=null;function In(s){if(s=Cc(s)){if(typeof nn!="function")throw Error(n(280));var l=s.stateNode;l&&(l=vd(l),nn(s.stateNode,s.type,l))}}function on(s){Jt?_n?_n.push(s):_n=[s]:Jt=s}function Ht(){if(Jt){var s=Jt,l=_n;if(_n=Jt=null,In(s),l)for(s=0;s<l.length;s++)In(l[s])}}function Rt(s,l){return s(l)}function sn(){}var Xt=!1;function ot(s,l,p){if(Xt)return s(l,p);Xt=!0;try{return Rt(s,l,p)}finally{Xt=!1,(Jt!==null||_n!==null)&&(sn(),Ht())}}function Et(s,l){var p=s.stateNode;if(p===null)return null;var b=vd(p);if(b===null)return null;p=b[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(b=!b.disabled)||(s=s.type,b=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!b;break e;default:s=!1}if(s)return null;if(p&&typeof p!="function")throw Error(n(231,l,typeof p));return p}var mt=!1;if(c)try{var Ie={};Object.defineProperty(Ie,"passive",{get:function(){mt=!0}}),window.addEventListener("test",Ie,Ie),window.removeEventListener("test",Ie,Ie)}catch{mt=!1}function $e(s,l,p,b,w,R,F,Q,ie){var _e=Array.prototype.slice.call(arguments,3);try{l.apply(p,_e)}catch(Be){this.onError(Be)}}var xe=!1,Ae=null,et=!1,nt=null,Ft={onError:function(s){xe=!0,Ae=s}};function Kt(s,l,p,b,w,R,F,Q,ie){xe=!1,Ae=null,$e.apply(Ft,arguments)}function Bt(s,l,p,b,w,R,F,Q,ie){if(Kt.apply(this,arguments),xe){if(xe){var _e=Ae;xe=!1,Ae=null}else throw Error(n(198));et||(et=!0,nt=_e)}}function At(s){var l=s,p=s;if(s.alternate)for(;l.return;)l=l.return;else{s=l;do l=s,(l.flags&4098)!==0&&(p=l.return),s=l.return;while(s)}return l.tag===3?p:null}function Pn(s){if(s.tag===13){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function kn(s){if(At(s)!==s)throw Error(n(188))}function Nn(s){var l=s.alternate;if(!l){if(l=At(s),l===null)throw Error(n(188));return l!==s?null:s}for(var p=s,b=l;;){var w=p.return;if(w===null)break;var R=w.alternate;if(R===null){if(b=w.return,b!==null){p=b;continue}break}if(w.child===R.child){for(R=w.child;R;){if(R===p)return kn(w),s;if(R===b)return kn(w),l;R=R.sibling}throw Error(n(188))}if(p.return!==b.return)p=w,b=R;else{for(var F=!1,Q=w.child;Q;){if(Q===p){F=!0,p=w,b=R;break}if(Q===b){F=!0,b=w,p=R;break}Q=Q.sibling}if(!F){for(Q=R.child;Q;){if(Q===p){F=!0,p=R,b=w;break}if(Q===b){F=!0,b=R,p=w;break}Q=Q.sibling}if(!F)throw Error(n(189))}}if(p.alternate!==b)throw Error(n(190))}if(p.tag!==3)throw Error(n(188));return p.stateNode.current===p?s:l}function Hn(s){return s=Nn(s),s!==null?cn(s):null}function cn(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var l=cn(s);if(l!==null)return l;s=s.sibling}return null}var mn=t.unstable_scheduleCallback,He=t.unstable_cancelCallback,Ye=t.unstable_shouldYield,Pt=t.unstable_requestPaint,gt=t.unstable_now,lt=t.unstable_getCurrentPriorityLevel,Ze=t.unstable_ImmediatePriority,Tt=t.unstable_UserBlockingPriority,Gt=t.unstable_NormalPriority,Ke=t.unstable_LowPriority,vt=t.unstable_IdlePriority,Nt=null,gn=null;function sr(s){if(gn&&typeof gn.onCommitFiberRoot=="function")try{gn.onCommitFiberRoot(Nt,s,void 0,(s.current.flags&128)===128)}catch{}}var Ln=Math.clz32?Math.clz32:Yr,Xr=Math.log,_r=Math.LN2;function Yr(s){return s>>>=0,s===0?32:31-(Xr(s)/_r|0)|0}var Sr=64,Hr=4194304;function Jr(s){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: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 s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function dn(s,l){var p=s.pendingLanes;if(p===0)return 0;var b=0,w=s.suspendedLanes,R=s.pingedLanes,F=p&268435455;if(F!==0){var Q=F&~w;Q!==0?b=Jr(Q):(R&=F,R!==0&&(b=Jr(R)))}else F=p&~w,F!==0?b=Jr(F):R!==0&&(b=Jr(R));if(b===0)return 0;if(l!==0&&l!==b&&(l&w)===0&&(w=b&-b,R=l&-l,w>=R||w===16&&(R&4194240)!==0))return l;if((b&4)!==0&&(b|=p&16),l=s.entangledLanes,l!==0)for(s=s.entanglements,l&=b;0<l;)p=31-Ln(l),w=1<<p,b|=s[p],l&=~w;return b}function ut(s,l){switch(s){case 1:case 2:case 4:return l+250;case 8:case 16:case 32:case 64: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 l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function st(s,l){for(var p=s.suspendedLanes,b=s.pingedLanes,w=s.expirationTimes,R=s.pendingLanes;0<R;){var F=31-Ln(R),Q=1<<F,ie=w[F];ie===-1?((Q&p)===0||(Q&b)!==0)&&(w[F]=ut(Q,l)):ie<=l&&(s.expiredLanes|=Q),R&=~Q}}function an(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function hn(){var s=Sr;return Sr<<=1,(Sr&4194240)===0&&(Sr=64),s}function Sn(s){for(var l=[],p=0;31>p;p++)l.push(s);return l}function xn(s,l,p){s.pendingLanes|=l,l!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,l=31-Ln(l),s[l]=p}function Fr(s,l){var p=s.pendingLanes&~l;s.pendingLanes=l,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=l,s.mutableReadLanes&=l,s.entangledLanes&=l,l=s.entanglements;var b=s.eventTimes;for(s=s.expirationTimes;0<p;){var w=31-Ln(p),R=1<<w;l[w]=0,b[w]=-1,s[w]=-1,p&=~R}}function ar(s,l){var p=s.entangledLanes|=l;for(s=s.entanglements;p;){var b=31-Ln(p),w=1<<b;w&l|s[b]&l&&(s[b]|=l),p&=~w}}var Ut=0;function Cr(s){return s&=-s,1<s?4<s?(s&268435455)!==0?16:536870912:4:1}var Tr,bi,Pr,Ss,Ua,qa=!1,es=[],Gn=null,Qr=null,li=null,_i=new Map,Gi=new Map,Ii=[],Ka="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 submit".split(" ");function Ga(s,l){switch(s){case"focusin":case"focusout":Gn=null;break;case"dragenter":case"dragleave":Qr=null;break;case"mouseover":case"mouseout":li=null;break;case"pointerover":case"pointerout":_i.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gi.delete(l.pointerId)}}function dt(s,l,p,b,w,R){return s===null||s.nativeEvent!==R?(s={blockedOn:l,domEventName:p,eventSystemFlags:b,nativeEvent:R,targetContainers:[w]},l!==null&&(l=Cc(l),l!==null&&bi(l)),s):(s.eventSystemFlags|=b,l=s.targetContainers,w!==null&&l.indexOf(w)===-1&&l.push(w),s)}function Dt(s,l,p,b,w){switch(l){case"focusin":return Gn=dt(Gn,s,l,p,b,w),!0;case"dragenter":return Qr=dt(Qr,s,l,p,b,w),!0;case"mouseover":return li=dt(li,s,l,p,b,w),!0;case"pointerover":var R=w.pointerId;return _i.set(R,dt(_i.get(R)||null,s,l,p,b,w)),!0;case"gotpointercapture":return R=w.pointerId,Gi.set(R,dt(Gi.get(R)||null,s,l,p,b,w)),!0}return!1}function jn(s){var l=ia(s.target);if(l!==null){var p=At(l);if(p!==null){if(l=p.tag,l===13){if(l=Pn(p),l!==null){s.blockedOn=l,Ua(s.priority,function(){Pr(p)});return}}else if(l===3&&p.stateNode.current.memoizedState.isDehydrated){s.blockedOn=p.tag===3?p.stateNode.containerInfo:null;return}}}s.blockedOn=null}function An(s){if(s.blockedOn!==null)return!1;for(var l=s.targetContainers;0<l.length;){var p=Em(s.domEventName,s.eventSystemFlags,l[0],s.nativeEvent);if(p===null){p=s.nativeEvent;var b=new p.constructor(p.type,p);It=b,p.target.dispatchEvent(b),It=null}else return l=Cc(p),l!==null&&bi(l),s.blockedOn=p,!1;l.shift()}return!0}function Bn(s,l,p){An(s)&&p.delete(l)}function Xa(){qa=!1,Gn!==null&&An(Gn)&&(Gn=null),Qr!==null&&An(Qr)&&(Qr=null),li!==null&&An(li)&&(li=null),_i.forEach(Bn),Gi.forEach(Bn)}function ts(s,l){s.blockedOn===l&&(s.blockedOn=null,qa||(qa=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Xa)))}function Cs(s){function l(w){return ts(w,s)}if(0<es.length){ts(es[0],s);for(var p=1;p<es.length;p++){var b=es[p];b.blockedOn===s&&(b.blockedOn=null)}}for(Gn!==null&&ts(Gn,s),Qr!==null&&ts(Qr,s),li!==null&&ts(li,s),_i.forEach(l),Gi.forEach(l),p=0;p<Ii.length;p++)b=Ii[p],b.blockedOn===s&&(b.blockedOn=null);for(;0<Ii.length&&(p=Ii[0],p.blockedOn===null);)jn(p),p.blockedOn===null&&Ii.shift()}var po=$.ReactCurrentBatchConfig,id=!0;function H4(s,l,p,b){var w=Ut,R=po.transition;po.transition=null;try{Ut=1,xm(s,l,p,b)}finally{Ut=w,po.transition=R}}function F4(s,l,p,b){var w=Ut,R=po.transition;po.transition=null;try{Ut=4,xm(s,l,p,b)}finally{Ut=w,po.transition=R}}function xm(s,l,p,b){if(id){var w=Em(s,l,p,b);if(w===null)Fm(s,l,b,od,p),Ga(s,b);else if(Dt(w,s,l,p,b))b.stopPropagation();else if(Ga(s,b),l&4&&-1<Ka.indexOf(s)){for(;w!==null;){var R=Cc(w);if(R!==null&&Tr(R),R=Em(s,l,p,b),R===null&&Fm(s,l,b,od,p),R===w)break;w=R}w!==null&&b.stopPropagation()}else Fm(s,l,b,null,p)}}var od=null;function Em(s,l,p,b){if(od=null,s=St(b),s=ia(s),s!==null)if(l=At(s),l===null)s=null;else if(p=l.tag,p===13){if(s=Pn(l),s!==null)return s;s=null}else if(p===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;s=null}else l!==s&&(s=null);return od=s,null}function Bb(s){switch(s){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(lt()){case Ze:return 1;case Tt:return 4;case Gt:case Ke:return 16;case vt:return 536870912;default:return 16}default:return 16}}var ws=null,km=null,sd=null;function Lb(){if(sd)return sd;var s,l=km,p=l.length,b,w="value"in ws?ws.value:ws.textContent,R=w.length;for(s=0;s<p&&l[s]===w[s];s++);var F=p-s;for(b=1;b<=F&&l[p-b]===w[R-b];b++);return sd=w.slice(s,1<b?1-b:void 0)}function ad(s){var l=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&l===13&&(s=13)):s=l,s===10&&(s=13),32<=s||s===13?s:0}function ld(){return!0}function Ab(){return!1}function Ni(s){function l(p,b,w,R,F){this._reactName=p,this._targetInst=w,this.type=b,this.nativeEvent=R,this.target=F,this.currentTarget=null;for(var Q in s)s.hasOwnProperty(Q)&&(p=s[Q],this[Q]=p?p(R):R[Q]);return this.isDefaultPrevented=(R.defaultPrevented!=null?R.defaultPrevented:R.returnValue===!1)?ld:Ab,this.isPropagationStopped=Ab,this}return q(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var p=this.nativeEvent;p&&(p.preventDefault?p.preventDefault():typeof p.returnValue!="unknown"&&(p.returnValue=!1),this.isDefaultPrevented=ld)},stopPropagation:function(){var p=this.nativeEvent;p&&(p.stopPropagation?p.stopPropagation():typeof p.cancelBubble!="unknown"&&(p.cancelBubble=!0),this.isPropagationStopped=ld)},persist:function(){},isPersistent:ld}),l}var Ya={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$m=Ni(Ya),dc=q({},Ya,{view:0,detail:0}),W4=Ni(dc),Rm,Tm,hc,cd=q({},dc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Om,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!==hc&&(hc&&s.type==="mousemove"?(Rm=s.screenX-hc.screenX,Tm=s.screenY-hc.screenY):Tm=Rm=0,hc=s),Rm)},movementY:function(s){return"movementY"in s?s.movementY:Tm}}),Db=Ni(cd),V4=q({},cd,{dataTransfer:0}),U4=Ni(V4),q4=q({},dc,{relatedTarget:0}),Pm=Ni(q4),K4=q({},Ya,{animationName:0,elapsedTime:0,pseudoElement:0}),G4=Ni(K4),X4=q({},Ya,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),Y4=Ni(X4),J4=q({},Ya,{data:0}),Hb=Ni(J4),Q4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Z4={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"},eR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tR(s){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(s):(s=eR[s])?!!l[s]:!1}function Om(){return tR}var nR=q({},dc,{key:function(s){if(s.key){var l=Q4[s.key]||s.key;if(l!=="Unidentified")return l}return s.type==="keypress"?(s=ad(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?Z4[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Om,charCode:function(s){return s.type==="keypress"?ad(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?ad(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),rR=Ni(nR),iR=q({},cd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Fb=Ni(iR),oR=q({},dc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Om}),sR=Ni(oR),aR=q({},Ya,{propertyName:0,elapsedTime:0,pseudoElement:0}),lR=Ni(aR),cR=q({},cd,{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}),uR=Ni(cR),dR=[9,13,27,32],Im=c&&"CompositionEvent"in window,fc=null;c&&"documentMode"in document&&(fc=document.documentMode);var hR=c&&"TextEvent"in window&&!fc,Wb=c&&(!Im||fc&&8<fc&&11>=fc),Vb=" ",Ub=!1;function qb(s,l){switch(s){case"keyup":return dR.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Kb(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Ja=!1;function fR(s,l){switch(s){case"compositionend":return Kb(l);case"keypress":return l.which!==32?null:(Ub=!0,Vb);case"textInput":return s=l.data,s===Vb&&Ub?null:s;default:return null}}function mR(s,l){if(Ja)return s==="compositionend"||!Im&&qb(s,l)?(s=Lb(),sd=km=ws=null,Ja=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return Wb&&l.locale!=="ko"?null:l.data;default:return null}}var pR={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Gb(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l==="input"?!!pR[s.type]:l==="textarea"}function Xb(s,l,p,b){on(b),l=md(l,"onChange"),0<l.length&&(p=new $m("onChange","change",null,p,b),s.push({event:p,listeners:l}))}var mc=null,pc=null;function gR(s){f_(s,0)}function ud(s){var l=nl(s);if(le(l))return s}function vR(s,l){if(s==="change")return l}var Yb=!1;if(c){var Nm;if(c){var Mm="oninput"in document;if(!Mm){var Jb=document.createElement("div");Jb.setAttribute("oninput","return;"),Mm=typeof Jb.oninput=="function"}Nm=Mm}else Nm=!1;Yb=Nm&&(!document.documentMode||9<document.documentMode)}function Qb(){mc&&(mc.detachEvent("onpropertychange",Zb),pc=mc=null)}function Zb(s){if(s.propertyName==="value"&&ud(pc)){var l=[];Xb(l,pc,s,St(s)),ot(gR,l)}}function yR(s,l,p){s==="focusin"?(Qb(),mc=l,pc=p,mc.attachEvent("onpropertychange",Zb)):s==="focusout"&&Qb()}function bR(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return ud(pc)}function _R(s,l){if(s==="click")return ud(l)}function SR(s,l){if(s==="input"||s==="change")return ud(l)}function CR(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}var go=typeof Object.is=="function"?Object.is:CR;function gc(s,l){if(go(s,l))return!0;if(typeof s!="object"||s===null||typeof l!="object"||l===null)return!1;var p=Object.keys(s),b=Object.keys(l);if(p.length!==b.length)return!1;for(b=0;b<p.length;b++){var w=p[b];if(!u.call(l,w)||!go(s[w],l[w]))return!1}return!0}function e_(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function t_(s,l){var p=e_(s);s=0;for(var b;p;){if(p.nodeType===3){if(b=s+p.textContent.length,s<=l&&b>=l)return{node:p,offset:l-s};s=b}e:{for(;p;){if(p.nextSibling){p=p.nextSibling;break e}p=p.parentNode}p=void 0}p=e_(p)}}function n_(s,l){return s&&l?s===l?!0:s&&s.nodeType===3?!1:l&&l.nodeType===3?n_(s,l.parentNode):"contains"in s?s.contains(l):s.compareDocumentPosition?!!(s.compareDocumentPosition(l)&16):!1:!1}function r_(){for(var s=window,l=ce();l instanceof s.HTMLIFrameElement;){try{var p=typeof l.contentWindow.location.href=="string"}catch{p=!1}if(p)s=l.contentWindow;else break;l=ce(s.document)}return l}function zm(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l&&(l==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||l==="textarea"||s.contentEditable==="true")}function wR(s){var l=r_(),p=s.focusedElem,b=s.selectionRange;if(l!==p&&p&&p.ownerDocument&&n_(p.ownerDocument.documentElement,p)){if(b!==null&&zm(p)){if(l=b.start,s=b.end,s===void 0&&(s=l),"selectionStart"in p)p.selectionStart=l,p.selectionEnd=Math.min(s,p.value.length);else if(s=(l=p.ownerDocument||document)&&l.defaultView||window,s.getSelection){s=s.getSelection();var w=p.textContent.length,R=Math.min(b.start,w);b=b.end===void 0?R:Math.min(b.end,w),!s.extend&&R>b&&(w=b,b=R,R=w),w=t_(p,R);var F=t_(p,b);w&&F&&(s.rangeCount!==1||s.anchorNode!==w.node||s.anchorOffset!==w.offset||s.focusNode!==F.node||s.focusOffset!==F.offset)&&(l=l.createRange(),l.setStart(w.node,w.offset),s.removeAllRanges(),R>b?(s.addRange(l),s.extend(F.node,F.offset)):(l.setEnd(F.node,F.offset),s.addRange(l)))}}for(l=[],s=p;s=s.parentNode;)s.nodeType===1&&l.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<l.length;p++)s=l[p],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var xR=c&&"documentMode"in document&&11>=document.documentMode,Qa=null,jm=null,vc=null,Bm=!1;function i_(s,l,p){var b=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;Bm||Qa==null||Qa!==ce(b)||(b=Qa,"selectionStart"in b&&zm(b)?b={start:b.selectionStart,end:b.selectionEnd}:(b=(b.ownerDocument&&b.ownerDocument.defaultView||window).getSelection(),b={anchorNode:b.anchorNode,anchorOffset:b.anchorOffset,focusNode:b.focusNode,focusOffset:b.focusOffset}),vc&&gc(vc,b)||(vc=b,b=md(jm,"onSelect"),0<b.length&&(l=new $m("onSelect","select",null,l,p),s.push({event:l,listeners:b}),l.target=Qa)))}function dd(s,l){var p={};return p[s.toLowerCase()]=l.toLowerCase(),p["Webkit"+s]="webkit"+l,p["Moz"+s]="moz"+l,p}var Za={animationend:dd("Animation","AnimationEnd"),animationiteration:dd("Animation","AnimationIteration"),animationstart:dd("Animation","AnimationStart"),transitionend:dd("Transition","TransitionEnd")},Lm={},o_={};c&&(o_=document.createElement("div").style,"AnimationEvent"in window||(delete Za.animationend.animation,delete Za.animationiteration.animation,delete Za.animationstart.animation),"TransitionEvent"in window||delete Za.transitionend.transition);function hd(s){if(Lm[s])return Lm[s];if(!Za[s])return s;var l=Za[s],p;for(p in l)if(l.hasOwnProperty(p)&&p in o_)return Lm[s]=l[p];return s}var s_=hd("animationend"),a_=hd("animationiteration"),l_=hd("animationstart"),c_=hd("transitionend"),u_=new Map,d_="abort auxClick 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(" ");function xs(s,l){u_.set(s,l),o(l,[s])}for(var Am=0;Am<d_.length;Am++){var Dm=d_[Am],ER=Dm.toLowerCase(),kR=Dm[0].toUpperCase()+Dm.slice(1);xs(ER,"on"+kR)}xs(s_,"onAnimationEnd"),xs(a_,"onAnimationIteration"),xs(l_,"onAnimationStart"),xs("dblclick","onDoubleClick"),xs("focusin","onFocus"),xs("focusout","onBlur"),xs(c_,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var yc="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(" "),$R=new Set("cancel close invalid load scroll toggle".split(" ").concat(yc));function h_(s,l,p){var b=s.type||"unknown-event";s.currentTarget=p,Bt(b,l,void 0,s),s.currentTarget=null}function f_(s,l){l=(l&4)!==0;for(var p=0;p<s.length;p++){var b=s[p],w=b.event;b=b.listeners;e:{var R=void 0;if(l)for(var F=b.length-1;0<=F;F--){var Q=b[F],ie=Q.instance,_e=Q.currentTarget;if(Q=Q.listener,ie!==R&&w.isPropagationStopped())break e;h_(w,Q,_e),R=ie}else for(F=0;F<b.length;F++){if(Q=b[F],ie=Q.instance,_e=Q.currentTarget,Q=Q.listener,ie!==R&&w.isPropagationStopped())break e;h_(w,Q,_e),R=ie}}}if(et)throw s=nt,et=!1,nt=null,s}function Fn(s,l){var p=l[Gm];p===void 0&&(p=l[Gm]=new Set);var b=s+"__bubble";p.has(b)||(m_(l,s,2,!1),p.add(b))}function Hm(s,l,p){var b=0;l&&(b|=4),m_(p,s,b,l)}var fd="_reactListening"+Math.random().toString(36).slice(2);function bc(s){if(!s[fd]){s[fd]=!0,r.forEach(function(p){p!=="selectionchange"&&($R.has(p)||Hm(p,!1,s),Hm(p,!0,s))});var l=s.nodeType===9?s:s.ownerDocument;l===null||l[fd]||(l[fd]=!0,Hm("selectionchange",!1,l))}}function m_(s,l,p,b){switch(Bb(l)){case 1:var w=H4;break;case 4:w=F4;break;default:w=xm}p=w.bind(null,l,p,s),w=void 0,!mt||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(w=!0),b?w!==void 0?s.addEventListener(l,p,{capture:!0,passive:w}):s.addEventListener(l,p,!0):w!==void 0?s.addEventListener(l,p,{passive:w}):s.addEventListener(l,p,!1)}function Fm(s,l,p,b,w){var R=b;if((l&1)===0&&(l&2)===0&&b!==null)e:for(;;){if(b===null)return;var F=b.tag;if(F===3||F===4){var Q=b.stateNode.containerInfo;if(Q===w||Q.nodeType===8&&Q.parentNode===w)break;if(F===4)for(F=b.return;F!==null;){var ie=F.tag;if((ie===3||ie===4)&&(ie=F.stateNode.containerInfo,ie===w||ie.nodeType===8&&ie.parentNode===w))return;F=F.return}for(;Q!==null;){if(F=ia(Q),F===null)return;if(ie=F.tag,ie===5||ie===6){b=R=F;continue e}Q=Q.parentNode}}b=b.return}ot(function(){var _e=R,Be=St(p),Fe=[];e:{var Ne=u_.get(s);if(Ne!==void 0){var ht=$m,Ct=s;switch(s){case"keypress":if(ad(p)===0)break e;case"keydown":case"keyup":ht=rR;break;case"focusin":Ct="focus",ht=Pm;break;case"focusout":Ct="blur",ht=Pm;break;case"beforeblur":case"afterblur":ht=Pm;break;case"click":if(p.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ht=Db;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ht=U4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ht=sR;break;case s_:case a_:case l_:ht=G4;break;case c_:ht=lR;break;case"scroll":ht=W4;break;case"wheel":ht=uR;break;case"copy":case"cut":case"paste":ht=Y4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ht=Fb}var wt=(l&4)!==0,lr=!wt&&s==="scroll",pe=wt?Ne!==null?Ne+"Capture":null:Ne;wt=[];for(var oe=_e,ve;oe!==null;){ve=oe;var Ve=ve.stateNode;if(ve.tag===5&&Ve!==null&&(ve=Ve,pe!==null&&(Ve=Et(oe,pe),Ve!=null&&wt.push(_c(oe,Ve,ve)))),lr)break;oe=oe.return}0<wt.length&&(Ne=new ht(Ne,Ct,null,p,Be),Fe.push({event:Ne,listeners:wt}))}}if((l&7)===0){e:{if(Ne=s==="mouseover"||s==="pointerover",ht=s==="mouseout"||s==="pointerout",Ne&&p!==It&&(Ct=p.relatedTarget||p.fromElement)&&(ia(Ct)||Ct[ns]))break e;if((ht||Ne)&&(Ne=Be.window===Be?Be:(Ne=Be.ownerDocument)?Ne.defaultView||Ne.parentWindow:window,ht?(Ct=p.relatedTarget||p.toElement,ht=_e,Ct=Ct?ia(Ct):null,Ct!==null&&(lr=At(Ct),Ct!==lr||Ct.tag!==5&&Ct.tag!==6)&&(Ct=null)):(ht=null,Ct=_e),ht!==Ct)){if(wt=Db,Ve="onMouseLeave",pe="onMouseEnter",oe="mouse",(s==="pointerout"||s==="pointerover")&&(wt=Fb,Ve="onPointerLeave",pe="onPointerEnter",oe="pointer"),lr=ht==null?Ne:nl(ht),ve=Ct==null?Ne:nl(Ct),Ne=new wt(Ve,oe+"leave",ht,p,Be),Ne.target=lr,Ne.relatedTarget=ve,Ve=null,ia(Be)===_e&&(wt=new wt(pe,oe+"enter",Ct,p,Be),wt.target=ve,wt.relatedTarget=lr,Ve=wt),lr=Ve,ht&&Ct)t:{for(wt=ht,pe=Ct,oe=0,ve=wt;ve;ve=el(ve))oe++;for(ve=0,Ve=pe;Ve;Ve=el(Ve))ve++;for(;0<oe-ve;)wt=el(wt),oe--;for(;0<ve-oe;)pe=el(pe),ve--;for(;oe--;){if(wt===pe||pe!==null&&wt===pe.alternate)break t;wt=el(wt),pe=el(pe)}wt=null}else wt=null;ht!==null&&p_(Fe,Ne,ht,wt,!1),Ct!==null&&lr!==null&&p_(Fe,lr,Ct,wt,!0)}}e:{if(Ne=_e?nl(_e):window,ht=Ne.nodeName&&Ne.nodeName.toLowerCase(),ht==="select"||ht==="input"&&Ne.type==="file")var xt=vR;else if(Gb(Ne))if(Yb)xt=SR;else{xt=bR;var Mt=yR}else(ht=Ne.nodeName)&&ht.toLowerCase()==="input"&&(Ne.type==="checkbox"||Ne.type==="radio")&&(xt=_R);if(xt&&(xt=xt(s,_e))){Xb(Fe,xt,p,Be);break e}Mt&&Mt(s,Ne,_e),s==="focusout"&&(Mt=Ne._wrapperState)&&Mt.controlled&&Ne.type==="number"&&Te(Ne,"number",Ne.value)}switch(Mt=_e?nl(_e):window,s){case"focusin":(Gb(Mt)||Mt.contentEditable==="true")&&(Qa=Mt,jm=_e,vc=null);break;case"focusout":vc=jm=Qa=null;break;case"mousedown":Bm=!0;break;case"contextmenu":case"mouseup":case"dragend":Bm=!1,i_(Fe,p,Be);break;case"selectionchange":if(xR)break;case"keydown":case"keyup":i_(Fe,p,Be)}var zt;if(Im)e:{switch(s){case"compositionstart":var Wt="onCompositionStart";break e;case"compositionend":Wt="onCompositionEnd";break e;case"compositionupdate":Wt="onCompositionUpdate";break e}Wt=void 0}else Ja?qb(s,p)&&(Wt="onCompositionEnd"):s==="keydown"&&p.keyCode===229&&(Wt="onCompositionStart");Wt&&(Wb&&p.locale!=="ko"&&(Ja||Wt!=="onCompositionStart"?Wt==="onCompositionEnd"&&Ja&&(zt=Lb()):(ws=Be,km="value"in ws?ws.value:ws.textContent,Ja=!0)),Mt=md(_e,Wt),0<Mt.length&&(Wt=new Hb(Wt,s,null,p,Be),Fe.push({event:Wt,listeners:Mt}),zt?Wt.data=zt:(zt=Kb(p),zt!==null&&(Wt.data=zt)))),(zt=hR?fR(s,p):mR(s,p))&&(_e=md(_e,"onBeforeInput"),0<_e.length&&(Be=new Hb("onBeforeInput","beforeinput",null,p,Be),Fe.push({event:Be,listeners:_e}),Be.data=zt))}f_(Fe,l)})}function _c(s,l,p){return{instance:s,listener:l,currentTarget:p}}function md(s,l){for(var p=l+"Capture",b=[];s!==null;){var w=s,R=w.stateNode;w.tag===5&&R!==null&&(w=R,R=Et(s,p),R!=null&&b.unshift(_c(s,R,w)),R=Et(s,l),R!=null&&b.push(_c(s,R,w))),s=s.return}return b}function el(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function p_(s,l,p,b,w){for(var R=l._reactName,F=[];p!==null&&p!==b;){var Q=p,ie=Q.alternate,_e=Q.stateNode;if(ie!==null&&ie===b)break;Q.tag===5&&_e!==null&&(Q=_e,w?(ie=Et(p,R),ie!=null&&F.unshift(_c(p,ie,Q))):w||(ie=Et(p,R),ie!=null&&F.push(_c(p,ie,Q)))),p=p.return}F.length!==0&&s.push({event:l,listeners:F})}var RR=/\r\n?/g,TR=/\u0000|\uFFFD/g;function g_(s){return(typeof s=="string"?s:""+s).replace(RR,`
38
+ `).replace(TR,"")}function pd(s,l,p){if(l=g_(l),g_(s)!==l&&p)throw Error(n(425))}function gd(){}var Wm=null,Vm=null;function Um(s,l){return s==="textarea"||s==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var qm=typeof setTimeout=="function"?setTimeout:void 0,PR=typeof clearTimeout=="function"?clearTimeout:void 0,v_=typeof Promise=="function"?Promise:void 0,OR=typeof queueMicrotask=="function"?queueMicrotask:typeof v_<"u"?function(s){return v_.resolve(null).then(s).catch(IR)}:qm;function IR(s){setTimeout(function(){throw s})}function Km(s,l){var p=l,b=0;do{var w=p.nextSibling;if(s.removeChild(p),w&&w.nodeType===8)if(p=w.data,p==="/$"){if(b===0){s.removeChild(w),Cs(l);return}b--}else p!=="$"&&p!=="$?"&&p!=="$!"||b++;p=w}while(p);Cs(l)}function Es(s){for(;s!=null;s=s.nextSibling){var l=s.nodeType;if(l===1||l===3)break;if(l===8){if(l=s.data,l==="$"||l==="$!"||l==="$?")break;if(l==="/$")return null}}return s}function y_(s){s=s.previousSibling;for(var l=0;s;){if(s.nodeType===8){var p=s.data;if(p==="$"||p==="$!"||p==="$?"){if(l===0)return s;l--}else p==="/$"&&l++}s=s.previousSibling}return null}var tl=Math.random().toString(36).slice(2),Mo="__reactFiber$"+tl,Sc="__reactProps$"+tl,ns="__reactContainer$"+tl,Gm="__reactEvents$"+tl,NR="__reactListeners$"+tl,MR="__reactHandles$"+tl;function ia(s){var l=s[Mo];if(l)return l;for(var p=s.parentNode;p;){if(l=p[ns]||p[Mo]){if(p=l.alternate,l.child!==null||p!==null&&p.child!==null)for(s=y_(s);s!==null;){if(p=s[Mo])return p;s=y_(s)}return l}s=p,p=s.parentNode}return null}function Cc(s){return s=s[Mo]||s[ns],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function nl(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(n(33))}function vd(s){return s[Sc]||null}var Xm=[],rl=-1;function ks(s){return{current:s}}function Wn(s){0>rl||(s.current=Xm[rl],Xm[rl]=null,rl--)}function Dn(s,l){rl++,Xm[rl]=s.current,s.current=l}var $s={},Zr=ks($s),Si=ks(!1),oa=$s;function il(s,l){var p=s.type.contextTypes;if(!p)return $s;var b=s.stateNode;if(b&&b.__reactInternalMemoizedUnmaskedChildContext===l)return b.__reactInternalMemoizedMaskedChildContext;var w={},R;for(R in p)w[R]=l[R];return b&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=l,s.__reactInternalMemoizedMaskedChildContext=w),w}function Ci(s){return s=s.childContextTypes,s!=null}function yd(){Wn(Si),Wn(Zr)}function b_(s,l,p){if(Zr.current!==$s)throw Error(n(168));Dn(Zr,l),Dn(Si,p)}function __(s,l,p){var b=s.stateNode;if(l=l.childContextTypes,typeof b.getChildContext!="function")return p;b=b.getChildContext();for(var w in b)if(!(w in l))throw Error(n(108,he(s)||"Unknown",w));return q({},p,b)}function bd(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||$s,oa=Zr.current,Dn(Zr,s),Dn(Si,Si.current),!0}function S_(s,l,p){var b=s.stateNode;if(!b)throw Error(n(169));p?(s=__(s,l,oa),b.__reactInternalMemoizedMergedChildContext=s,Wn(Si),Wn(Zr),Dn(Zr,s)):Wn(Si),Dn(Si,p)}var rs=null,_d=!1,Ym=!1;function C_(s){rs===null?rs=[s]:rs.push(s)}function zR(s){_d=!0,C_(s)}function Rs(){if(!Ym&&rs!==null){Ym=!0;var s=0,l=Ut;try{var p=rs;for(Ut=1;s<p.length;s++){var b=p[s];do b=b(!0);while(b!==null)}rs=null,_d=!1}catch(w){throw rs!==null&&(rs=rs.slice(s+1)),mn(Ze,Rs),w}finally{Ut=l,Ym=!1}}return null}var ol=[],sl=0,Sd=null,Cd=0,Xi=[],Yi=0,sa=null,is=1,os="";function aa(s,l){ol[sl++]=Cd,ol[sl++]=Sd,Sd=s,Cd=l}function w_(s,l,p){Xi[Yi++]=is,Xi[Yi++]=os,Xi[Yi++]=sa,sa=s;var b=is;s=os;var w=32-Ln(b)-1;b&=~(1<<w),p+=1;var R=32-Ln(l)+w;if(30<R){var F=w-w%5;R=(b&(1<<F)-1).toString(32),b>>=F,w-=F,is=1<<32-Ln(l)+w|p<<w|b,os=R+s}else is=1<<R|p<<w|b,os=s}function Jm(s){s.return!==null&&(aa(s,1),w_(s,1,0))}function Qm(s){for(;s===Sd;)Sd=ol[--sl],ol[sl]=null,Cd=ol[--sl],ol[sl]=null;for(;s===sa;)sa=Xi[--Yi],Xi[Yi]=null,os=Xi[--Yi],Xi[Yi]=null,is=Xi[--Yi],Xi[Yi]=null}var Mi=null,zi=null,qn=!1,vo=null;function x_(s,l){var p=eo(5,null,null,0);p.elementType="DELETED",p.stateNode=l,p.return=s,l=s.deletions,l===null?(s.deletions=[p],s.flags|=16):l.push(p)}function E_(s,l){switch(s.tag){case 5:var p=s.type;return l=l.nodeType!==1||p.toLowerCase()!==l.nodeName.toLowerCase()?null:l,l!==null?(s.stateNode=l,Mi=s,zi=Es(l.firstChild),!0):!1;case 6:return l=s.pendingProps===""||l.nodeType!==3?null:l,l!==null?(s.stateNode=l,Mi=s,zi=null,!0):!1;case 13:return l=l.nodeType!==8?null:l,l!==null?(p=sa!==null?{id:is,overflow:os}:null,s.memoizedState={dehydrated:l,treeContext:p,retryLane:1073741824},p=eo(18,null,null,0),p.stateNode=l,p.return=s,s.child=p,Mi=s,zi=null,!0):!1;default:return!1}}function Zm(s){return(s.mode&1)!==0&&(s.flags&128)===0}function ep(s){if(qn){var l=zi;if(l){var p=l;if(!E_(s,l)){if(Zm(s))throw Error(n(418));l=Es(p.nextSibling);var b=Mi;l&&E_(s,l)?x_(b,p):(s.flags=s.flags&-4097|2,qn=!1,Mi=s)}}else{if(Zm(s))throw Error(n(418));s.flags=s.flags&-4097|2,qn=!1,Mi=s}}}function k_(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;Mi=s}function wd(s){if(s!==Mi)return!1;if(!qn)return k_(s),qn=!0,!1;var l;if((l=s.tag!==3)&&!(l=s.tag!==5)&&(l=s.type,l=l!=="head"&&l!=="body"&&!Um(s.type,s.memoizedProps)),l&&(l=zi)){if(Zm(s))throw $_(),Error(n(418));for(;l;)x_(s,l),l=Es(l.nextSibling)}if(k_(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));e:{for(s=s.nextSibling,l=0;s;){if(s.nodeType===8){var p=s.data;if(p==="/$"){if(l===0){zi=Es(s.nextSibling);break e}l--}else p!=="$"&&p!=="$!"&&p!=="$?"||l++}s=s.nextSibling}zi=null}}else zi=Mi?Es(s.stateNode.nextSibling):null;return!0}function $_(){for(var s=zi;s;)s=Es(s.nextSibling)}function al(){zi=Mi=null,qn=!1}function tp(s){vo===null?vo=[s]:vo.push(s)}var jR=$.ReactCurrentBatchConfig;function wc(s,l,p){if(s=p.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(p._owner){if(p=p._owner,p){if(p.tag!==1)throw Error(n(309));var b=p.stateNode}if(!b)throw Error(n(147,s));var w=b,R=""+s;return l!==null&&l.ref!==null&&typeof l.ref=="function"&&l.ref._stringRef===R?l.ref:(l=function(F){var Q=w.refs;F===null?delete Q[R]:Q[R]=F},l._stringRef=R,l)}if(typeof s!="string")throw Error(n(284));if(!p._owner)throw Error(n(290,s))}return s}function xd(s,l){throw s=Object.prototype.toString.call(l),Error(n(31,s==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":s))}function R_(s){var l=s._init;return l(s._payload)}function T_(s){function l(pe,oe){if(s){var ve=pe.deletions;ve===null?(pe.deletions=[oe],pe.flags|=16):ve.push(oe)}}function p(pe,oe){if(!s)return null;for(;oe!==null;)l(pe,oe),oe=oe.sibling;return null}function b(pe,oe){for(pe=new Map;oe!==null;)oe.key!==null?pe.set(oe.key,oe):pe.set(oe.index,oe),oe=oe.sibling;return pe}function w(pe,oe){return pe=js(pe,oe),pe.index=0,pe.sibling=null,pe}function R(pe,oe,ve){return pe.index=ve,s?(ve=pe.alternate,ve!==null?(ve=ve.index,ve<oe?(pe.flags|=2,oe):ve):(pe.flags|=2,oe)):(pe.flags|=1048576,oe)}function F(pe){return s&&pe.alternate===null&&(pe.flags|=2),pe}function Q(pe,oe,ve,Ve){return oe===null||oe.tag!==6?(oe=qp(ve,pe.mode,Ve),oe.return=pe,oe):(oe=w(oe,ve),oe.return=pe,oe)}function ie(pe,oe,ve,Ve){var xt=ve.type;return xt===O?Be(pe,oe,ve.props.children,Ve,ve.key):oe!==null&&(oe.elementType===xt||typeof xt=="object"&&xt!==null&&xt.$$typeof===W&&R_(xt)===oe.type)?(Ve=w(oe,ve.props),Ve.ref=wc(pe,oe,ve),Ve.return=pe,Ve):(Ve=Gd(ve.type,ve.key,ve.props,null,pe.mode,Ve),Ve.ref=wc(pe,oe,ve),Ve.return=pe,Ve)}function _e(pe,oe,ve,Ve){return oe===null||oe.tag!==4||oe.stateNode.containerInfo!==ve.containerInfo||oe.stateNode.implementation!==ve.implementation?(oe=Kp(ve,pe.mode,Ve),oe.return=pe,oe):(oe=w(oe,ve.children||[]),oe.return=pe,oe)}function Be(pe,oe,ve,Ve,xt){return oe===null||oe.tag!==7?(oe=pa(ve,pe.mode,Ve,xt),oe.return=pe,oe):(oe=w(oe,ve),oe.return=pe,oe)}function Fe(pe,oe,ve){if(typeof oe=="string"&&oe!==""||typeof oe=="number")return oe=qp(""+oe,pe.mode,ve),oe.return=pe,oe;if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case P:return ve=Gd(oe.type,oe.key,oe.props,null,pe.mode,ve),ve.ref=wc(pe,null,oe),ve.return=pe,ve;case T:return oe=Kp(oe,pe.mode,ve),oe.return=pe,oe;case W:var Ve=oe._init;return Fe(pe,Ve(oe._payload),ve)}if(ze(oe)||G(oe))return oe=pa(oe,pe.mode,ve,null),oe.return=pe,oe;xd(pe,oe)}return null}function Ne(pe,oe,ve,Ve){var xt=oe!==null?oe.key:null;if(typeof ve=="string"&&ve!==""||typeof ve=="number")return xt!==null?null:Q(pe,oe,""+ve,Ve);if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case P:return ve.key===xt?ie(pe,oe,ve,Ve):null;case T:return ve.key===xt?_e(pe,oe,ve,Ve):null;case W:return xt=ve._init,Ne(pe,oe,xt(ve._payload),Ve)}if(ze(ve)||G(ve))return xt!==null?null:Be(pe,oe,ve,Ve,null);xd(pe,ve)}return null}function ht(pe,oe,ve,Ve,xt){if(typeof Ve=="string"&&Ve!==""||typeof Ve=="number")return pe=pe.get(ve)||null,Q(oe,pe,""+Ve,xt);if(typeof Ve=="object"&&Ve!==null){switch(Ve.$$typeof){case P:return pe=pe.get(Ve.key===null?ve:Ve.key)||null,ie(oe,pe,Ve,xt);case T:return pe=pe.get(Ve.key===null?ve:Ve.key)||null,_e(oe,pe,Ve,xt);case W:var Mt=Ve._init;return ht(pe,oe,ve,Mt(Ve._payload),xt)}if(ze(Ve)||G(Ve))return pe=pe.get(ve)||null,Be(oe,pe,Ve,xt,null);xd(oe,Ve)}return null}function Ct(pe,oe,ve,Ve){for(var xt=null,Mt=null,zt=oe,Wt=oe=0,Nr=null;zt!==null&&Wt<ve.length;Wt++){zt.index>Wt?(Nr=zt,zt=null):Nr=zt.sibling;var Cn=Ne(pe,zt,ve[Wt],Ve);if(Cn===null){zt===null&&(zt=Nr);break}s&&zt&&Cn.alternate===null&&l(pe,zt),oe=R(Cn,oe,Wt),Mt===null?xt=Cn:Mt.sibling=Cn,Mt=Cn,zt=Nr}if(Wt===ve.length)return p(pe,zt),qn&&aa(pe,Wt),xt;if(zt===null){for(;Wt<ve.length;Wt++)zt=Fe(pe,ve[Wt],Ve),zt!==null&&(oe=R(zt,oe,Wt),Mt===null?xt=zt:Mt.sibling=zt,Mt=zt);return qn&&aa(pe,Wt),xt}for(zt=b(pe,zt);Wt<ve.length;Wt++)Nr=ht(zt,pe,Wt,ve[Wt],Ve),Nr!==null&&(s&&Nr.alternate!==null&&zt.delete(Nr.key===null?Wt:Nr.key),oe=R(Nr,oe,Wt),Mt===null?xt=Nr:Mt.sibling=Nr,Mt=Nr);return s&&zt.forEach(function(Bs){return l(pe,Bs)}),qn&&aa(pe,Wt),xt}function wt(pe,oe,ve,Ve){var xt=G(ve);if(typeof xt!="function")throw Error(n(150));if(ve=xt.call(ve),ve==null)throw Error(n(151));for(var Mt=xt=null,zt=oe,Wt=oe=0,Nr=null,Cn=ve.next();zt!==null&&!Cn.done;Wt++,Cn=ve.next()){zt.index>Wt?(Nr=zt,zt=null):Nr=zt.sibling;var Bs=Ne(pe,zt,Cn.value,Ve);if(Bs===null){zt===null&&(zt=Nr);break}s&&zt&&Bs.alternate===null&&l(pe,zt),oe=R(Bs,oe,Wt),Mt===null?xt=Bs:Mt.sibling=Bs,Mt=Bs,zt=Nr}if(Cn.done)return p(pe,zt),qn&&aa(pe,Wt),xt;if(zt===null){for(;!Cn.done;Wt++,Cn=ve.next())Cn=Fe(pe,Cn.value,Ve),Cn!==null&&(oe=R(Cn,oe,Wt),Mt===null?xt=Cn:Mt.sibling=Cn,Mt=Cn);return qn&&aa(pe,Wt),xt}for(zt=b(pe,zt);!Cn.done;Wt++,Cn=ve.next())Cn=ht(zt,pe,Wt,Cn.value,Ve),Cn!==null&&(s&&Cn.alternate!==null&&zt.delete(Cn.key===null?Wt:Cn.key),oe=R(Cn,oe,Wt),Mt===null?xt=Cn:Mt.sibling=Cn,Mt=Cn);return s&&zt.forEach(function(pT){return l(pe,pT)}),qn&&aa(pe,Wt),xt}function lr(pe,oe,ve,Ve){if(typeof ve=="object"&&ve!==null&&ve.type===O&&ve.key===null&&(ve=ve.props.children),typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case P:e:{for(var xt=ve.key,Mt=oe;Mt!==null;){if(Mt.key===xt){if(xt=ve.type,xt===O){if(Mt.tag===7){p(pe,Mt.sibling),oe=w(Mt,ve.props.children),oe.return=pe,pe=oe;break e}}else if(Mt.elementType===xt||typeof xt=="object"&&xt!==null&&xt.$$typeof===W&&R_(xt)===Mt.type){p(pe,Mt.sibling),oe=w(Mt,ve.props),oe.ref=wc(pe,Mt,ve),oe.return=pe,pe=oe;break e}p(pe,Mt);break}else l(pe,Mt);Mt=Mt.sibling}ve.type===O?(oe=pa(ve.props.children,pe.mode,Ve,ve.key),oe.return=pe,pe=oe):(Ve=Gd(ve.type,ve.key,ve.props,null,pe.mode,Ve),Ve.ref=wc(pe,oe,ve),Ve.return=pe,pe=Ve)}return F(pe);case T:e:{for(Mt=ve.key;oe!==null;){if(oe.key===Mt)if(oe.tag===4&&oe.stateNode.containerInfo===ve.containerInfo&&oe.stateNode.implementation===ve.implementation){p(pe,oe.sibling),oe=w(oe,ve.children||[]),oe.return=pe,pe=oe;break e}else{p(pe,oe);break}else l(pe,oe);oe=oe.sibling}oe=Kp(ve,pe.mode,Ve),oe.return=pe,pe=oe}return F(pe);case W:return Mt=ve._init,lr(pe,oe,Mt(ve._payload),Ve)}if(ze(ve))return Ct(pe,oe,ve,Ve);if(G(ve))return wt(pe,oe,ve,Ve);xd(pe,ve)}return typeof ve=="string"&&ve!==""||typeof ve=="number"?(ve=""+ve,oe!==null&&oe.tag===6?(p(pe,oe.sibling),oe=w(oe,ve),oe.return=pe,pe=oe):(p(pe,oe),oe=qp(ve,pe.mode,Ve),oe.return=pe,pe=oe),F(pe)):p(pe,oe)}return lr}var ll=T_(!0),P_=T_(!1),Ed=ks(null),kd=null,cl=null,np=null;function rp(){np=cl=kd=null}function ip(s){var l=Ed.current;Wn(Ed),s._currentValue=l}function op(s,l,p){for(;s!==null;){var b=s.alternate;if((s.childLanes&l)!==l?(s.childLanes|=l,b!==null&&(b.childLanes|=l)):b!==null&&(b.childLanes&l)!==l&&(b.childLanes|=l),s===p)break;s=s.return}}function ul(s,l){kd=s,np=cl=null,s=s.dependencies,s!==null&&s.firstContext!==null&&((s.lanes&l)!==0&&(wi=!0),s.firstContext=null)}function Ji(s){var l=s._currentValue;if(np!==s)if(s={context:s,memoizedValue:l,next:null},cl===null){if(kd===null)throw Error(n(308));cl=s,kd.dependencies={lanes:0,firstContext:s}}else cl=cl.next=s;return l}var la=null;function sp(s){la===null?la=[s]:la.push(s)}function O_(s,l,p,b){var w=l.interleaved;return w===null?(p.next=p,sp(l)):(p.next=w.next,w.next=p),l.interleaved=p,ss(s,b)}function ss(s,l){s.lanes|=l;var p=s.alternate;for(p!==null&&(p.lanes|=l),p=s,s=s.return;s!==null;)s.childLanes|=l,p=s.alternate,p!==null&&(p.childLanes|=l),p=s,s=s.return;return p.tag===3?p.stateNode:null}var Ts=!1;function ap(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function I_(s,l){s=s.updateQueue,l.updateQueue===s&&(l.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function as(s,l){return{eventTime:s,lane:l,tag:0,payload:null,callback:null,next:null}}function Ps(s,l,p){var b=s.updateQueue;if(b===null)return null;if(b=b.shared,(vn&2)!==0){var w=b.pending;return w===null?l.next=l:(l.next=w.next,w.next=l),b.pending=l,ss(s,p)}return w=b.interleaved,w===null?(l.next=l,sp(b)):(l.next=w.next,w.next=l),b.interleaved=l,ss(s,p)}function $d(s,l,p){if(l=l.updateQueue,l!==null&&(l=l.shared,(p&4194240)!==0)){var b=l.lanes;b&=s.pendingLanes,p|=b,l.lanes=p,ar(s,p)}}function N_(s,l){var p=s.updateQueue,b=s.alternate;if(b!==null&&(b=b.updateQueue,p===b)){var w=null,R=null;if(p=p.firstBaseUpdate,p!==null){do{var F={eventTime:p.eventTime,lane:p.lane,tag:p.tag,payload:p.payload,callback:p.callback,next:null};R===null?w=R=F:R=R.next=F,p=p.next}while(p!==null);R===null?w=R=l:R=R.next=l}else w=R=l;p={baseState:b.baseState,firstBaseUpdate:w,lastBaseUpdate:R,shared:b.shared,effects:b.effects},s.updateQueue=p;return}s=p.lastBaseUpdate,s===null?p.firstBaseUpdate=l:s.next=l,p.lastBaseUpdate=l}function Rd(s,l,p,b){var w=s.updateQueue;Ts=!1;var R=w.firstBaseUpdate,F=w.lastBaseUpdate,Q=w.shared.pending;if(Q!==null){w.shared.pending=null;var ie=Q,_e=ie.next;ie.next=null,F===null?R=_e:F.next=_e,F=ie;var Be=s.alternate;Be!==null&&(Be=Be.updateQueue,Q=Be.lastBaseUpdate,Q!==F&&(Q===null?Be.firstBaseUpdate=_e:Q.next=_e,Be.lastBaseUpdate=ie))}if(R!==null){var Fe=w.baseState;F=0,Be=_e=ie=null,Q=R;do{var Ne=Q.lane,ht=Q.eventTime;if((b&Ne)===Ne){Be!==null&&(Be=Be.next={eventTime:ht,lane:0,tag:Q.tag,payload:Q.payload,callback:Q.callback,next:null});e:{var Ct=s,wt=Q;switch(Ne=l,ht=p,wt.tag){case 1:if(Ct=wt.payload,typeof Ct=="function"){Fe=Ct.call(ht,Fe,Ne);break e}Fe=Ct;break e;case 3:Ct.flags=Ct.flags&-65537|128;case 0:if(Ct=wt.payload,Ne=typeof Ct=="function"?Ct.call(ht,Fe,Ne):Ct,Ne==null)break e;Fe=q({},Fe,Ne);break e;case 2:Ts=!0}}Q.callback!==null&&Q.lane!==0&&(s.flags|=64,Ne=w.effects,Ne===null?w.effects=[Q]:Ne.push(Q))}else ht={eventTime:ht,lane:Ne,tag:Q.tag,payload:Q.payload,callback:Q.callback,next:null},Be===null?(_e=Be=ht,ie=Fe):Be=Be.next=ht,F|=Ne;if(Q=Q.next,Q===null){if(Q=w.shared.pending,Q===null)break;Ne=Q,Q=Ne.next,Ne.next=null,w.lastBaseUpdate=Ne,w.shared.pending=null}}while(!0);if(Be===null&&(ie=Fe),w.baseState=ie,w.firstBaseUpdate=_e,w.lastBaseUpdate=Be,l=w.shared.interleaved,l!==null){w=l;do F|=w.lane,w=w.next;while(w!==l)}else R===null&&(w.shared.lanes=0);da|=F,s.lanes=F,s.memoizedState=Fe}}function M_(s,l,p){if(s=l.effects,l.effects=null,s!==null)for(l=0;l<s.length;l++){var b=s[l],w=b.callback;if(w!==null){if(b.callback=null,b=p,typeof w!="function")throw Error(n(191,w));w.call(b)}}}var xc={},zo=ks(xc),Ec=ks(xc),kc=ks(xc);function ca(s){if(s===xc)throw Error(n(174));return s}function lp(s,l){switch(Dn(kc,l),Dn(Ec,s),Dn(zo,xc),s=l.nodeType,s){case 9:case 11:l=(l=l.documentElement)?l.namespaceURI:$t(null,"");break;default:s=s===8?l.parentNode:l,l=s.namespaceURI||null,s=s.tagName,l=$t(l,s)}Wn(zo),Dn(zo,l)}function dl(){Wn(zo),Wn(Ec),Wn(kc)}function z_(s){ca(kc.current);var l=ca(zo.current),p=$t(l,s.type);l!==p&&(Dn(Ec,s),Dn(zo,p))}function cp(s){Ec.current===s&&(Wn(zo),Wn(Ec))}var Xn=ks(0);function Td(s){for(var l=s;l!==null;){if(l.tag===13){var p=l.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||p.data==="$?"||p.data==="$!"))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var up=[];function dp(){for(var s=0;s<up.length;s++)up[s]._workInProgressVersionPrimary=null;up.length=0}var Pd=$.ReactCurrentDispatcher,hp=$.ReactCurrentBatchConfig,ua=0,Yn=null,wr=null,Or=null,Od=!1,$c=!1,Rc=0,BR=0;function ei(){throw Error(n(321))}function fp(s,l){if(l===null)return!1;for(var p=0;p<l.length&&p<s.length;p++)if(!go(s[p],l[p]))return!1;return!0}function mp(s,l,p,b,w,R){if(ua=R,Yn=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,Pd.current=s===null||s.memoizedState===null?HR:FR,s=p(b,w),$c){R=0;do{if($c=!1,Rc=0,25<=R)throw Error(n(301));R+=1,Or=wr=null,l.updateQueue=null,Pd.current=WR,s=p(b,w)}while($c)}if(Pd.current=Md,l=wr!==null&&wr.next!==null,ua=0,Or=wr=Yn=null,Od=!1,l)throw Error(n(300));return s}function pp(){var s=Rc!==0;return Rc=0,s}function jo(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Or===null?Yn.memoizedState=Or=s:Or=Or.next=s,Or}function Qi(){if(wr===null){var s=Yn.alternate;s=s!==null?s.memoizedState:null}else s=wr.next;var l=Or===null?Yn.memoizedState:Or.next;if(l!==null)Or=l,wr=s;else{if(s===null)throw Error(n(310));wr=s,s={memoizedState:wr.memoizedState,baseState:wr.baseState,baseQueue:wr.baseQueue,queue:wr.queue,next:null},Or===null?Yn.memoizedState=Or=s:Or=Or.next=s}return Or}function Tc(s,l){return typeof l=="function"?l(s):l}function gp(s){var l=Qi(),p=l.queue;if(p===null)throw Error(n(311));p.lastRenderedReducer=s;var b=wr,w=b.baseQueue,R=p.pending;if(R!==null){if(w!==null){var F=w.next;w.next=R.next,R.next=F}b.baseQueue=w=R,p.pending=null}if(w!==null){R=w.next,b=b.baseState;var Q=F=null,ie=null,_e=R;do{var Be=_e.lane;if((ua&Be)===Be)ie!==null&&(ie=ie.next={lane:0,action:_e.action,hasEagerState:_e.hasEagerState,eagerState:_e.eagerState,next:null}),b=_e.hasEagerState?_e.eagerState:s(b,_e.action);else{var Fe={lane:Be,action:_e.action,hasEagerState:_e.hasEagerState,eagerState:_e.eagerState,next:null};ie===null?(Q=ie=Fe,F=b):ie=ie.next=Fe,Yn.lanes|=Be,da|=Be}_e=_e.next}while(_e!==null&&_e!==R);ie===null?F=b:ie.next=Q,go(b,l.memoizedState)||(wi=!0),l.memoizedState=b,l.baseState=F,l.baseQueue=ie,p.lastRenderedState=b}if(s=p.interleaved,s!==null){w=s;do R=w.lane,Yn.lanes|=R,da|=R,w=w.next;while(w!==s)}else w===null&&(p.lanes=0);return[l.memoizedState,p.dispatch]}function vp(s){var l=Qi(),p=l.queue;if(p===null)throw Error(n(311));p.lastRenderedReducer=s;var b=p.dispatch,w=p.pending,R=l.memoizedState;if(w!==null){p.pending=null;var F=w=w.next;do R=s(R,F.action),F=F.next;while(F!==w);go(R,l.memoizedState)||(wi=!0),l.memoizedState=R,l.baseQueue===null&&(l.baseState=R),p.lastRenderedState=R}return[R,b]}function j_(){}function B_(s,l){var p=Yn,b=Qi(),w=l(),R=!go(b.memoizedState,w);if(R&&(b.memoizedState=w,wi=!0),b=b.queue,yp(D_.bind(null,p,b,s),[s]),b.getSnapshot!==l||R||Or!==null&&Or.memoizedState.tag&1){if(p.flags|=2048,Pc(9,A_.bind(null,p,b,w,l),void 0,null),Ir===null)throw Error(n(349));(ua&30)!==0||L_(p,l,w)}return w}function L_(s,l,p){s.flags|=16384,s={getSnapshot:l,value:p},l=Yn.updateQueue,l===null?(l={lastEffect:null,stores:null},Yn.updateQueue=l,l.stores=[s]):(p=l.stores,p===null?l.stores=[s]:p.push(s))}function A_(s,l,p,b){l.value=p,l.getSnapshot=b,H_(l)&&F_(s)}function D_(s,l,p){return p(function(){H_(l)&&F_(s)})}function H_(s){var l=s.getSnapshot;s=s.value;try{var p=l();return!go(s,p)}catch{return!0}}function F_(s){var l=ss(s,1);l!==null&&So(l,s,1,-1)}function W_(s){var l=jo();return typeof s=="function"&&(s=s()),l.memoizedState=l.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Tc,lastRenderedState:s},l.queue=s,s=s.dispatch=DR.bind(null,Yn,s),[l.memoizedState,s]}function Pc(s,l,p,b){return s={tag:s,create:l,destroy:p,deps:b,next:null},l=Yn.updateQueue,l===null?(l={lastEffect:null,stores:null},Yn.updateQueue=l,l.lastEffect=s.next=s):(p=l.lastEffect,p===null?l.lastEffect=s.next=s:(b=p.next,p.next=s,s.next=b,l.lastEffect=s)),s}function V_(){return Qi().memoizedState}function Id(s,l,p,b){var w=jo();Yn.flags|=s,w.memoizedState=Pc(1|l,p,void 0,b===void 0?null:b)}function Nd(s,l,p,b){var w=Qi();b=b===void 0?null:b;var R=void 0;if(wr!==null){var F=wr.memoizedState;if(R=F.destroy,b!==null&&fp(b,F.deps)){w.memoizedState=Pc(l,p,R,b);return}}Yn.flags|=s,w.memoizedState=Pc(1|l,p,R,b)}function U_(s,l){return Id(8390656,8,s,l)}function yp(s,l){return Nd(2048,8,s,l)}function q_(s,l){return Nd(4,2,s,l)}function K_(s,l){return Nd(4,4,s,l)}function G_(s,l){if(typeof l=="function")return s=s(),l(s),function(){l(null)};if(l!=null)return s=s(),l.current=s,function(){l.current=null}}function X_(s,l,p){return p=p!=null?p.concat([s]):null,Nd(4,4,G_.bind(null,l,s),p)}function bp(){}function Y_(s,l){var p=Qi();l=l===void 0?null:l;var b=p.memoizedState;return b!==null&&l!==null&&fp(l,b[1])?b[0]:(p.memoizedState=[s,l],s)}function J_(s,l){var p=Qi();l=l===void 0?null:l;var b=p.memoizedState;return b!==null&&l!==null&&fp(l,b[1])?b[0]:(s=s(),p.memoizedState=[s,l],s)}function Q_(s,l,p){return(ua&21)===0?(s.baseState&&(s.baseState=!1,wi=!0),s.memoizedState=p):(go(p,l)||(p=hn(),Yn.lanes|=p,da|=p,s.baseState=!0),l)}function LR(s,l){var p=Ut;Ut=p!==0&&4>p?p:4,s(!0);var b=hp.transition;hp.transition={};try{s(!1),l()}finally{Ut=p,hp.transition=b}}function Z_(){return Qi().memoizedState}function AR(s,l,p){var b=Ms(s);if(p={lane:b,action:p,hasEagerState:!1,eagerState:null,next:null},eS(s))tS(l,p);else if(p=O_(s,l,p,b),p!==null){var w=ui();So(p,s,b,w),nS(p,l,b)}}function DR(s,l,p){var b=Ms(s),w={lane:b,action:p,hasEagerState:!1,eagerState:null,next:null};if(eS(s))tS(l,w);else{var R=s.alternate;if(s.lanes===0&&(R===null||R.lanes===0)&&(R=l.lastRenderedReducer,R!==null))try{var F=l.lastRenderedState,Q=R(F,p);if(w.hasEagerState=!0,w.eagerState=Q,go(Q,F)){var ie=l.interleaved;ie===null?(w.next=w,sp(l)):(w.next=ie.next,ie.next=w),l.interleaved=w;return}}catch{}finally{}p=O_(s,l,w,b),p!==null&&(w=ui(),So(p,s,b,w),nS(p,l,b))}}function eS(s){var l=s.alternate;return s===Yn||l!==null&&l===Yn}function tS(s,l){$c=Od=!0;var p=s.pending;p===null?l.next=l:(l.next=p.next,p.next=l),s.pending=l}function nS(s,l,p){if((p&4194240)!==0){var b=l.lanes;b&=s.pendingLanes,p|=b,l.lanes=p,ar(s,p)}}var Md={readContext:Ji,useCallback:ei,useContext:ei,useEffect:ei,useImperativeHandle:ei,useInsertionEffect:ei,useLayoutEffect:ei,useMemo:ei,useReducer:ei,useRef:ei,useState:ei,useDebugValue:ei,useDeferredValue:ei,useTransition:ei,useMutableSource:ei,useSyncExternalStore:ei,useId:ei,unstable_isNewReconciler:!1},HR={readContext:Ji,useCallback:function(s,l){return jo().memoizedState=[s,l===void 0?null:l],s},useContext:Ji,useEffect:U_,useImperativeHandle:function(s,l,p){return p=p!=null?p.concat([s]):null,Id(4194308,4,G_.bind(null,l,s),p)},useLayoutEffect:function(s,l){return Id(4194308,4,s,l)},useInsertionEffect:function(s,l){return Id(4,2,s,l)},useMemo:function(s,l){var p=jo();return l=l===void 0?null:l,s=s(),p.memoizedState=[s,l],s},useReducer:function(s,l,p){var b=jo();return l=p!==void 0?p(l):l,b.memoizedState=b.baseState=l,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:l},b.queue=s,s=s.dispatch=AR.bind(null,Yn,s),[b.memoizedState,s]},useRef:function(s){var l=jo();return s={current:s},l.memoizedState=s},useState:W_,useDebugValue:bp,useDeferredValue:function(s){return jo().memoizedState=s},useTransition:function(){var s=W_(!1),l=s[0];return s=LR.bind(null,s[1]),jo().memoizedState=s,[l,s]},useMutableSource:function(){},useSyncExternalStore:function(s,l,p){var b=Yn,w=jo();if(qn){if(p===void 0)throw Error(n(407));p=p()}else{if(p=l(),Ir===null)throw Error(n(349));(ua&30)!==0||L_(b,l,p)}w.memoizedState=p;var R={value:p,getSnapshot:l};return w.queue=R,U_(D_.bind(null,b,R,s),[s]),b.flags|=2048,Pc(9,A_.bind(null,b,R,p,l),void 0,null),p},useId:function(){var s=jo(),l=Ir.identifierPrefix;if(qn){var p=os,b=is;p=(b&~(1<<32-Ln(b)-1)).toString(32)+p,l=":"+l+"R"+p,p=Rc++,0<p&&(l+="H"+p.toString(32)),l+=":"}else p=BR++,l=":"+l+"r"+p.toString(32)+":";return s.memoizedState=l},unstable_isNewReconciler:!1},FR={readContext:Ji,useCallback:Y_,useContext:Ji,useEffect:yp,useImperativeHandle:X_,useInsertionEffect:q_,useLayoutEffect:K_,useMemo:J_,useReducer:gp,useRef:V_,useState:function(){return gp(Tc)},useDebugValue:bp,useDeferredValue:function(s){var l=Qi();return Q_(l,wr.memoizedState,s)},useTransition:function(){var s=gp(Tc)[0],l=Qi().memoizedState;return[s,l]},useMutableSource:j_,useSyncExternalStore:B_,useId:Z_,unstable_isNewReconciler:!1},WR={readContext:Ji,useCallback:Y_,useContext:Ji,useEffect:yp,useImperativeHandle:X_,useInsertionEffect:q_,useLayoutEffect:K_,useMemo:J_,useReducer:vp,useRef:V_,useState:function(){return vp(Tc)},useDebugValue:bp,useDeferredValue:function(s){var l=Qi();return wr===null?l.memoizedState=s:Q_(l,wr.memoizedState,s)},useTransition:function(){var s=vp(Tc)[0],l=Qi().memoizedState;return[s,l]},useMutableSource:j_,useSyncExternalStore:B_,useId:Z_,unstable_isNewReconciler:!1};function yo(s,l){if(s&&s.defaultProps){l=q({},l),s=s.defaultProps;for(var p in s)l[p]===void 0&&(l[p]=s[p]);return l}return l}function _p(s,l,p,b){l=s.memoizedState,p=p(b,l),p=p==null?l:q({},l,p),s.memoizedState=p,s.lanes===0&&(s.updateQueue.baseState=p)}var zd={isMounted:function(s){return(s=s._reactInternals)?At(s)===s:!1},enqueueSetState:function(s,l,p){s=s._reactInternals;var b=ui(),w=Ms(s),R=as(b,w);R.payload=l,p!=null&&(R.callback=p),l=Ps(s,R,w),l!==null&&(So(l,s,w,b),$d(l,s,w))},enqueueReplaceState:function(s,l,p){s=s._reactInternals;var b=ui(),w=Ms(s),R=as(b,w);R.tag=1,R.payload=l,p!=null&&(R.callback=p),l=Ps(s,R,w),l!==null&&(So(l,s,w,b),$d(l,s,w))},enqueueForceUpdate:function(s,l){s=s._reactInternals;var p=ui(),b=Ms(s),w=as(p,b);w.tag=2,l!=null&&(w.callback=l),l=Ps(s,w,b),l!==null&&(So(l,s,b,p),$d(l,s,b))}};function rS(s,l,p,b,w,R,F){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(b,R,F):l.prototype&&l.prototype.isPureReactComponent?!gc(p,b)||!gc(w,R):!0}function iS(s,l,p){var b=!1,w=$s,R=l.contextType;return typeof R=="object"&&R!==null?R=Ji(R):(w=Ci(l)?oa:Zr.current,b=l.contextTypes,R=(b=b!=null)?il(s,w):$s),l=new l(p,R),s.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=zd,s.stateNode=l,l._reactInternals=s,b&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=w,s.__reactInternalMemoizedMaskedChildContext=R),l}function oS(s,l,p,b){s=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(p,b),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(p,b),l.state!==s&&zd.enqueueReplaceState(l,l.state,null)}function Sp(s,l,p,b){var w=s.stateNode;w.props=p,w.state=s.memoizedState,w.refs={},ap(s);var R=l.contextType;typeof R=="object"&&R!==null?w.context=Ji(R):(R=Ci(l)?oa:Zr.current,w.context=il(s,R)),w.state=s.memoizedState,R=l.getDerivedStateFromProps,typeof R=="function"&&(_p(s,l,R,p),w.state=s.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(l=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),l!==w.state&&zd.enqueueReplaceState(w,w.state,null),Rd(s,p,w,b),w.state=s.memoizedState),typeof w.componentDidMount=="function"&&(s.flags|=4194308)}function hl(s,l){try{var p="",b=l;do p+=ee(b),b=b.return;while(b);var w=p}catch(R){w=`
39
+ Error generating stack: `+R.message+`
40
+ `+R.stack}return{value:s,source:l,stack:w,digest:null}}function Cp(s,l,p){return{value:s,source:null,stack:p??null,digest:l??null}}function wp(s,l){try{console.error(l.value)}catch(p){setTimeout(function(){throw p})}}var VR=typeof WeakMap=="function"?WeakMap:Map;function sS(s,l,p){p=as(-1,p),p.tag=3,p.payload={element:null};var b=l.value;return p.callback=function(){Fd||(Fd=!0,Lp=b),wp(s,l)},p}function aS(s,l,p){p=as(-1,p),p.tag=3;var b=s.type.getDerivedStateFromError;if(typeof b=="function"){var w=l.value;p.payload=function(){return b(w)},p.callback=function(){wp(s,l)}}var R=s.stateNode;return R!==null&&typeof R.componentDidCatch=="function"&&(p.callback=function(){wp(s,l),typeof b!="function"&&(Is===null?Is=new Set([this]):Is.add(this));var F=l.stack;this.componentDidCatch(l.value,{componentStack:F!==null?F:""})}),p}function lS(s,l,p){var b=s.pingCache;if(b===null){b=s.pingCache=new VR;var w=new Set;b.set(l,w)}else w=b.get(l),w===void 0&&(w=new Set,b.set(l,w));w.has(p)||(w.add(p),s=iT.bind(null,s,l,p),l.then(s,s))}function cS(s){do{var l;if((l=s.tag===13)&&(l=s.memoizedState,l=l!==null?l.dehydrated!==null:!0),l)return s;s=s.return}while(s!==null);return null}function uS(s,l,p,b,w){return(s.mode&1)===0?(s===l?s.flags|=65536:(s.flags|=128,p.flags|=131072,p.flags&=-52805,p.tag===1&&(p.alternate===null?p.tag=17:(l=as(-1,1),l.tag=2,Ps(p,l,1))),p.lanes|=1),s):(s.flags|=65536,s.lanes=w,s)}var UR=$.ReactCurrentOwner,wi=!1;function ci(s,l,p,b){l.child=s===null?P_(l,null,p,b):ll(l,s.child,p,b)}function dS(s,l,p,b,w){p=p.render;var R=l.ref;return ul(l,w),b=mp(s,l,p,b,R,w),p=pp(),s!==null&&!wi?(l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~w,ls(s,l,w)):(qn&&p&&Jm(l),l.flags|=1,ci(s,l,b,w),l.child)}function hS(s,l,p,b,w){if(s===null){var R=p.type;return typeof R=="function"&&!Up(R)&&R.defaultProps===void 0&&p.compare===null&&p.defaultProps===void 0?(l.tag=15,l.type=R,fS(s,l,R,b,w)):(s=Gd(p.type,null,b,l,l.mode,w),s.ref=l.ref,s.return=l,l.child=s)}if(R=s.child,(s.lanes&w)===0){var F=R.memoizedProps;if(p=p.compare,p=p!==null?p:gc,p(F,b)&&s.ref===l.ref)return ls(s,l,w)}return l.flags|=1,s=js(R,b),s.ref=l.ref,s.return=l,l.child=s}function fS(s,l,p,b,w){if(s!==null){var R=s.memoizedProps;if(gc(R,b)&&s.ref===l.ref)if(wi=!1,l.pendingProps=b=R,(s.lanes&w)!==0)(s.flags&131072)!==0&&(wi=!0);else return l.lanes=s.lanes,ls(s,l,w)}return xp(s,l,p,b,w)}function mS(s,l,p){var b=l.pendingProps,w=b.children,R=s!==null?s.memoizedState:null;if(b.mode==="hidden")if((l.mode&1)===0)l.memoizedState={baseLanes:0,cachePool:null,transitions:null},Dn(ml,ji),ji|=p;else{if((p&1073741824)===0)return s=R!==null?R.baseLanes|p:p,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:s,cachePool:null,transitions:null},l.updateQueue=null,Dn(ml,ji),ji|=s,null;l.memoizedState={baseLanes:0,cachePool:null,transitions:null},b=R!==null?R.baseLanes:p,Dn(ml,ji),ji|=b}else R!==null?(b=R.baseLanes|p,l.memoizedState=null):b=p,Dn(ml,ji),ji|=b;return ci(s,l,w,p),l.child}function pS(s,l){var p=l.ref;(s===null&&p!==null||s!==null&&s.ref!==p)&&(l.flags|=512,l.flags|=2097152)}function xp(s,l,p,b,w){var R=Ci(p)?oa:Zr.current;return R=il(l,R),ul(l,w),p=mp(s,l,p,b,R,w),b=pp(),s!==null&&!wi?(l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~w,ls(s,l,w)):(qn&&b&&Jm(l),l.flags|=1,ci(s,l,p,w),l.child)}function gS(s,l,p,b,w){if(Ci(p)){var R=!0;bd(l)}else R=!1;if(ul(l,w),l.stateNode===null)Bd(s,l),iS(l,p,b),Sp(l,p,b,w),b=!0;else if(s===null){var F=l.stateNode,Q=l.memoizedProps;F.props=Q;var ie=F.context,_e=p.contextType;typeof _e=="object"&&_e!==null?_e=Ji(_e):(_e=Ci(p)?oa:Zr.current,_e=il(l,_e));var Be=p.getDerivedStateFromProps,Fe=typeof Be=="function"||typeof F.getSnapshotBeforeUpdate=="function";Fe||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||(Q!==b||ie!==_e)&&oS(l,F,b,_e),Ts=!1;var Ne=l.memoizedState;F.state=Ne,Rd(l,b,F,w),ie=l.memoizedState,Q!==b||Ne!==ie||Si.current||Ts?(typeof Be=="function"&&(_p(l,p,Be,b),ie=l.memoizedState),(Q=Ts||rS(l,p,Q,b,Ne,ie,_e))?(Fe||typeof F.UNSAFE_componentWillMount!="function"&&typeof F.componentWillMount!="function"||(typeof F.componentWillMount=="function"&&F.componentWillMount(),typeof F.UNSAFE_componentWillMount=="function"&&F.UNSAFE_componentWillMount()),typeof F.componentDidMount=="function"&&(l.flags|=4194308)):(typeof F.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=b,l.memoizedState=ie),F.props=b,F.state=ie,F.context=_e,b=Q):(typeof F.componentDidMount=="function"&&(l.flags|=4194308),b=!1)}else{F=l.stateNode,I_(s,l),Q=l.memoizedProps,_e=l.type===l.elementType?Q:yo(l.type,Q),F.props=_e,Fe=l.pendingProps,Ne=F.context,ie=p.contextType,typeof ie=="object"&&ie!==null?ie=Ji(ie):(ie=Ci(p)?oa:Zr.current,ie=il(l,ie));var ht=p.getDerivedStateFromProps;(Be=typeof ht=="function"||typeof F.getSnapshotBeforeUpdate=="function")||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||(Q!==Fe||Ne!==ie)&&oS(l,F,b,ie),Ts=!1,Ne=l.memoizedState,F.state=Ne,Rd(l,b,F,w);var Ct=l.memoizedState;Q!==Fe||Ne!==Ct||Si.current||Ts?(typeof ht=="function"&&(_p(l,p,ht,b),Ct=l.memoizedState),(_e=Ts||rS(l,p,_e,b,Ne,Ct,ie)||!1)?(Be||typeof F.UNSAFE_componentWillUpdate!="function"&&typeof F.componentWillUpdate!="function"||(typeof F.componentWillUpdate=="function"&&F.componentWillUpdate(b,Ct,ie),typeof F.UNSAFE_componentWillUpdate=="function"&&F.UNSAFE_componentWillUpdate(b,Ct,ie)),typeof F.componentDidUpdate=="function"&&(l.flags|=4),typeof F.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof F.componentDidUpdate!="function"||Q===s.memoizedProps&&Ne===s.memoizedState||(l.flags|=4),typeof F.getSnapshotBeforeUpdate!="function"||Q===s.memoizedProps&&Ne===s.memoizedState||(l.flags|=1024),l.memoizedProps=b,l.memoizedState=Ct),F.props=b,F.state=Ct,F.context=ie,b=_e):(typeof F.componentDidUpdate!="function"||Q===s.memoizedProps&&Ne===s.memoizedState||(l.flags|=4),typeof F.getSnapshotBeforeUpdate!="function"||Q===s.memoizedProps&&Ne===s.memoizedState||(l.flags|=1024),b=!1)}return Ep(s,l,p,b,R,w)}function Ep(s,l,p,b,w,R){pS(s,l);var F=(l.flags&128)!==0;if(!b&&!F)return w&&S_(l,p,!1),ls(s,l,R);b=l.stateNode,UR.current=l;var Q=F&&typeof p.getDerivedStateFromError!="function"?null:b.render();return l.flags|=1,s!==null&&F?(l.child=ll(l,s.child,null,R),l.child=ll(l,null,Q,R)):ci(s,l,Q,R),l.memoizedState=b.state,w&&S_(l,p,!0),l.child}function vS(s){var l=s.stateNode;l.pendingContext?b_(s,l.pendingContext,l.pendingContext!==l.context):l.context&&b_(s,l.context,!1),lp(s,l.containerInfo)}function yS(s,l,p,b,w){return al(),tp(w),l.flags|=256,ci(s,l,p,b),l.child}var kp={dehydrated:null,treeContext:null,retryLane:0};function $p(s){return{baseLanes:s,cachePool:null,transitions:null}}function bS(s,l,p){var b=l.pendingProps,w=Xn.current,R=!1,F=(l.flags&128)!==0,Q;if((Q=F)||(Q=s!==null&&s.memoizedState===null?!1:(w&2)!==0),Q?(R=!0,l.flags&=-129):(s===null||s.memoizedState!==null)&&(w|=1),Dn(Xn,w&1),s===null)return ep(l),s=l.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((l.mode&1)===0?l.lanes=1:s.data==="$!"?l.lanes=8:l.lanes=1073741824,null):(F=b.children,s=b.fallback,R?(b=l.mode,R=l.child,F={mode:"hidden",children:F},(b&1)===0&&R!==null?(R.childLanes=0,R.pendingProps=F):R=Xd(F,b,0,null),s=pa(s,b,p,null),R.return=l,s.return=l,R.sibling=s,l.child=R,l.child.memoizedState=$p(p),l.memoizedState=kp,s):Rp(l,F));if(w=s.memoizedState,w!==null&&(Q=w.dehydrated,Q!==null))return qR(s,l,F,b,Q,w,p);if(R){R=b.fallback,F=l.mode,w=s.child,Q=w.sibling;var ie={mode:"hidden",children:b.children};return(F&1)===0&&l.child!==w?(b=l.child,b.childLanes=0,b.pendingProps=ie,l.deletions=null):(b=js(w,ie),b.subtreeFlags=w.subtreeFlags&14680064),Q!==null?R=js(Q,R):(R=pa(R,F,p,null),R.flags|=2),R.return=l,b.return=l,b.sibling=R,l.child=b,b=R,R=l.child,F=s.child.memoizedState,F=F===null?$p(p):{baseLanes:F.baseLanes|p,cachePool:null,transitions:F.transitions},R.memoizedState=F,R.childLanes=s.childLanes&~p,l.memoizedState=kp,b}return R=s.child,s=R.sibling,b=js(R,{mode:"visible",children:b.children}),(l.mode&1)===0&&(b.lanes=p),b.return=l,b.sibling=null,s!==null&&(p=l.deletions,p===null?(l.deletions=[s],l.flags|=16):p.push(s)),l.child=b,l.memoizedState=null,b}function Rp(s,l){return l=Xd({mode:"visible",children:l},s.mode,0,null),l.return=s,s.child=l}function jd(s,l,p,b){return b!==null&&tp(b),ll(l,s.child,null,p),s=Rp(l,l.pendingProps.children),s.flags|=2,l.memoizedState=null,s}function qR(s,l,p,b,w,R,F){if(p)return l.flags&256?(l.flags&=-257,b=Cp(Error(n(422))),jd(s,l,F,b)):l.memoizedState!==null?(l.child=s.child,l.flags|=128,null):(R=b.fallback,w=l.mode,b=Xd({mode:"visible",children:b.children},w,0,null),R=pa(R,w,F,null),R.flags|=2,b.return=l,R.return=l,b.sibling=R,l.child=b,(l.mode&1)!==0&&ll(l,s.child,null,F),l.child.memoizedState=$p(F),l.memoizedState=kp,R);if((l.mode&1)===0)return jd(s,l,F,null);if(w.data==="$!"){if(b=w.nextSibling&&w.nextSibling.dataset,b)var Q=b.dgst;return b=Q,R=Error(n(419)),b=Cp(R,b,void 0),jd(s,l,F,b)}if(Q=(F&s.childLanes)!==0,wi||Q){if(b=Ir,b!==null){switch(F&-F){case 4:w=2;break;case 16:w=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:w=32;break;case 536870912:w=268435456;break;default:w=0}w=(w&(b.suspendedLanes|F))!==0?0:w,w!==0&&w!==R.retryLane&&(R.retryLane=w,ss(s,w),So(b,s,w,-1))}return Vp(),b=Cp(Error(n(421))),jd(s,l,F,b)}return w.data==="$?"?(l.flags|=128,l.child=s.child,l=oT.bind(null,s),w._reactRetry=l,null):(s=R.treeContext,zi=Es(w.nextSibling),Mi=l,qn=!0,vo=null,s!==null&&(Xi[Yi++]=is,Xi[Yi++]=os,Xi[Yi++]=sa,is=s.id,os=s.overflow,sa=l),l=Rp(l,b.children),l.flags|=4096,l)}function _S(s,l,p){s.lanes|=l;var b=s.alternate;b!==null&&(b.lanes|=l),op(s.return,l,p)}function Tp(s,l,p,b,w){var R=s.memoizedState;R===null?s.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:b,tail:p,tailMode:w}:(R.isBackwards=l,R.rendering=null,R.renderingStartTime=0,R.last=b,R.tail=p,R.tailMode=w)}function SS(s,l,p){var b=l.pendingProps,w=b.revealOrder,R=b.tail;if(ci(s,l,b.children,p),b=Xn.current,(b&2)!==0)b=b&1|2,l.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=l.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&_S(s,p,l);else if(s.tag===19)_S(s,p,l);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===l)break e;for(;s.sibling===null;){if(s.return===null||s.return===l)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}b&=1}if(Dn(Xn,b),(l.mode&1)===0)l.memoizedState=null;else switch(w){case"forwards":for(p=l.child,w=null;p!==null;)s=p.alternate,s!==null&&Td(s)===null&&(w=p),p=p.sibling;p=w,p===null?(w=l.child,l.child=null):(w=p.sibling,p.sibling=null),Tp(l,!1,w,p,R);break;case"backwards":for(p=null,w=l.child,l.child=null;w!==null;){if(s=w.alternate,s!==null&&Td(s)===null){l.child=w;break}s=w.sibling,w.sibling=p,p=w,w=s}Tp(l,!0,p,null,R);break;case"together":Tp(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function Bd(s,l){(l.mode&1)===0&&s!==null&&(s.alternate=null,l.alternate=null,l.flags|=2)}function ls(s,l,p){if(s!==null&&(l.dependencies=s.dependencies),da|=l.lanes,(p&l.childLanes)===0)return null;if(s!==null&&l.child!==s.child)throw Error(n(153));if(l.child!==null){for(s=l.child,p=js(s,s.pendingProps),l.child=p,p.return=l;s.sibling!==null;)s=s.sibling,p=p.sibling=js(s,s.pendingProps),p.return=l;p.sibling=null}return l.child}function KR(s,l,p){switch(l.tag){case 3:vS(l),al();break;case 5:z_(l);break;case 1:Ci(l.type)&&bd(l);break;case 4:lp(l,l.stateNode.containerInfo);break;case 10:var b=l.type._context,w=l.memoizedProps.value;Dn(Ed,b._currentValue),b._currentValue=w;break;case 13:if(b=l.memoizedState,b!==null)return b.dehydrated!==null?(Dn(Xn,Xn.current&1),l.flags|=128,null):(p&l.child.childLanes)!==0?bS(s,l,p):(Dn(Xn,Xn.current&1),s=ls(s,l,p),s!==null?s.sibling:null);Dn(Xn,Xn.current&1);break;case 19:if(b=(p&l.childLanes)!==0,(s.flags&128)!==0){if(b)return SS(s,l,p);l.flags|=128}if(w=l.memoizedState,w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),Dn(Xn,Xn.current),b)break;return null;case 22:case 23:return l.lanes=0,mS(s,l,p)}return ls(s,l,p)}var CS,Pp,wS,xS;CS=function(s,l){for(var p=l.child;p!==null;){if(p.tag===5||p.tag===6)s.appendChild(p.stateNode);else if(p.tag!==4&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===l)break;for(;p.sibling===null;){if(p.return===null||p.return===l)return;p=p.return}p.sibling.return=p.return,p=p.sibling}},Pp=function(){},wS=function(s,l,p,b){var w=s.memoizedProps;if(w!==b){s=l.stateNode,ca(zo.current);var R=null;switch(p){case"input":w=ye(s,w),b=ye(s,b),R=[];break;case"select":w=q({},w,{value:void 0}),b=q({},b,{value:void 0}),R=[];break;case"textarea":w=ke(s,w),b=ke(s,b),R=[];break;default:typeof w.onClick!="function"&&typeof b.onClick=="function"&&(s.onclick=gd)}Me(p,b);var F;p=null;for(_e in w)if(!b.hasOwnProperty(_e)&&w.hasOwnProperty(_e)&&w[_e]!=null)if(_e==="style"){var Q=w[_e];for(F in Q)Q.hasOwnProperty(F)&&(p||(p={}),p[F]="")}else _e!=="dangerouslySetInnerHTML"&&_e!=="children"&&_e!=="suppressContentEditableWarning"&&_e!=="suppressHydrationWarning"&&_e!=="autoFocus"&&(i.hasOwnProperty(_e)?R||(R=[]):(R=R||[]).push(_e,null));for(_e in b){var ie=b[_e];if(Q=w!=null?w[_e]:void 0,b.hasOwnProperty(_e)&&ie!==Q&&(ie!=null||Q!=null))if(_e==="style")if(Q){for(F in Q)!Q.hasOwnProperty(F)||ie&&ie.hasOwnProperty(F)||(p||(p={}),p[F]="");for(F in ie)ie.hasOwnProperty(F)&&Q[F]!==ie[F]&&(p||(p={}),p[F]=ie[F])}else p||(R||(R=[]),R.push(_e,p)),p=ie;else _e==="dangerouslySetInnerHTML"?(ie=ie?ie.__html:void 0,Q=Q?Q.__html:void 0,ie!=null&&Q!==ie&&(R=R||[]).push(_e,ie)):_e==="children"?typeof ie!="string"&&typeof ie!="number"||(R=R||[]).push(_e,""+ie):_e!=="suppressContentEditableWarning"&&_e!=="suppressHydrationWarning"&&(i.hasOwnProperty(_e)?(ie!=null&&_e==="onScroll"&&Fn("scroll",s),R||Q===ie||(R=[])):(R=R||[]).push(_e,ie))}p&&(R=R||[]).push("style",p);var _e=R;(l.updateQueue=_e)&&(l.flags|=4)}},xS=function(s,l,p,b){p!==b&&(l.flags|=4)};function Oc(s,l){if(!qn)switch(s.tailMode){case"hidden":l=s.tail;for(var p=null;l!==null;)l.alternate!==null&&(p=l),l=l.sibling;p===null?s.tail=null:p.sibling=null;break;case"collapsed":p=s.tail;for(var b=null;p!==null;)p.alternate!==null&&(b=p),p=p.sibling;b===null?l||s.tail===null?s.tail=null:s.tail.sibling=null:b.sibling=null}}function ti(s){var l=s.alternate!==null&&s.alternate.child===s.child,p=0,b=0;if(l)for(var w=s.child;w!==null;)p|=w.lanes|w.childLanes,b|=w.subtreeFlags&14680064,b|=w.flags&14680064,w.return=s,w=w.sibling;else for(w=s.child;w!==null;)p|=w.lanes|w.childLanes,b|=w.subtreeFlags,b|=w.flags,w.return=s,w=w.sibling;return s.subtreeFlags|=b,s.childLanes=p,l}function GR(s,l,p){var b=l.pendingProps;switch(Qm(l),l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ti(l),null;case 1:return Ci(l.type)&&yd(),ti(l),null;case 3:return b=l.stateNode,dl(),Wn(Si),Wn(Zr),dp(),b.pendingContext&&(b.context=b.pendingContext,b.pendingContext=null),(s===null||s.child===null)&&(wd(l)?l.flags|=4:s===null||s.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,vo!==null&&(Hp(vo),vo=null))),Pp(s,l),ti(l),null;case 5:cp(l);var w=ca(kc.current);if(p=l.type,s!==null&&l.stateNode!=null)wS(s,l,p,b,w),s.ref!==l.ref&&(l.flags|=512,l.flags|=2097152);else{if(!b){if(l.stateNode===null)throw Error(n(166));return ti(l),null}if(s=ca(zo.current),wd(l)){b=l.stateNode,p=l.type;var R=l.memoizedProps;switch(b[Mo]=l,b[Sc]=R,s=(l.mode&1)!==0,p){case"dialog":Fn("cancel",b),Fn("close",b);break;case"iframe":case"object":case"embed":Fn("load",b);break;case"video":case"audio":for(w=0;w<yc.length;w++)Fn(yc[w],b);break;case"source":Fn("error",b);break;case"img":case"image":case"link":Fn("error",b),Fn("load",b);break;case"details":Fn("toggle",b);break;case"input":me(b,R),Fn("invalid",b);break;case"select":b._wrapperState={wasMultiple:!!R.multiple},Fn("invalid",b);break;case"textarea":je(b,R),Fn("invalid",b)}Me(p,R),w=null;for(var F in R)if(R.hasOwnProperty(F)){var Q=R[F];F==="children"?typeof Q=="string"?b.textContent!==Q&&(R.suppressHydrationWarning!==!0&&pd(b.textContent,Q,s),w=["children",Q]):typeof Q=="number"&&b.textContent!==""+Q&&(R.suppressHydrationWarning!==!0&&pd(b.textContent,Q,s),w=["children",""+Q]):i.hasOwnProperty(F)&&Q!=null&&F==="onScroll"&&Fn("scroll",b)}switch(p){case"input":ae(b),we(b,R,!0);break;case"textarea":ae(b),Qe(b);break;case"select":case"option":break;default:typeof R.onClick=="function"&&(b.onclick=gd)}b=w,l.updateQueue=b,b!==null&&(l.flags|=4)}else{F=w.nodeType===9?w:w.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=at(p)),s==="http://www.w3.org/1999/xhtml"?p==="script"?(s=F.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof b.is=="string"?s=F.createElement(p,{is:b.is}):(s=F.createElement(p),p==="select"&&(F=s,b.multiple?F.multiple=!0:b.size&&(F.size=b.size))):s=F.createElementNS(s,p),s[Mo]=l,s[Sc]=b,CS(s,l,!1,!1),l.stateNode=s;e:{switch(F=qe(p,b),p){case"dialog":Fn("cancel",s),Fn("close",s),w=b;break;case"iframe":case"object":case"embed":Fn("load",s),w=b;break;case"video":case"audio":for(w=0;w<yc.length;w++)Fn(yc[w],s);w=b;break;case"source":Fn("error",s),w=b;break;case"img":case"image":case"link":Fn("error",s),Fn("load",s),w=b;break;case"details":Fn("toggle",s),w=b;break;case"input":me(s,b),w=ye(s,b),Fn("invalid",s);break;case"option":w=b;break;case"select":s._wrapperState={wasMultiple:!!b.multiple},w=q({},b,{value:void 0}),Fn("invalid",s);break;case"textarea":je(s,b),w=ke(s,b),Fn("invalid",s);break;default:w=b}Me(p,w),Q=w;for(R in Q)if(Q.hasOwnProperty(R)){var ie=Q[R];R==="style"?Le(s,ie):R==="dangerouslySetInnerHTML"?(ie=ie?ie.__html:void 0,ie!=null&&Je(s,ie)):R==="children"?typeof ie=="string"?(p!=="textarea"||ie!=="")&&ft(s,ie):typeof ie=="number"&&ft(s,""+ie):R!=="suppressContentEditableWarning"&&R!=="suppressHydrationWarning"&&R!=="autoFocus"&&(i.hasOwnProperty(R)?ie!=null&&R==="onScroll"&&Fn("scroll",s):ie!=null&&k(s,R,ie,F))}switch(p){case"input":ae(s),we(s,b,!1);break;case"textarea":ae(s),Qe(s);break;case"option":b.value!=null&&s.setAttribute("value",""+fe(b.value));break;case"select":s.multiple=!!b.multiple,R=b.value,R!=null?Ee(s,!!b.multiple,R,!1):b.defaultValue!=null&&Ee(s,!!b.multiple,b.defaultValue,!0);break;default:typeof w.onClick=="function"&&(s.onclick=gd)}switch(p){case"button":case"input":case"select":case"textarea":b=!!b.autoFocus;break e;case"img":b=!0;break e;default:b=!1}}b&&(l.flags|=4)}l.ref!==null&&(l.flags|=512,l.flags|=2097152)}return ti(l),null;case 6:if(s&&l.stateNode!=null)xS(s,l,s.memoizedProps,b);else{if(typeof b!="string"&&l.stateNode===null)throw Error(n(166));if(p=ca(kc.current),ca(zo.current),wd(l)){if(b=l.stateNode,p=l.memoizedProps,b[Mo]=l,(R=b.nodeValue!==p)&&(s=Mi,s!==null))switch(s.tag){case 3:pd(b.nodeValue,p,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&pd(b.nodeValue,p,(s.mode&1)!==0)}R&&(l.flags|=4)}else b=(p.nodeType===9?p:p.ownerDocument).createTextNode(b),b[Mo]=l,l.stateNode=b}return ti(l),null;case 13:if(Wn(Xn),b=l.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(qn&&zi!==null&&(l.mode&1)!==0&&(l.flags&128)===0)$_(),al(),l.flags|=98560,R=!1;else if(R=wd(l),b!==null&&b.dehydrated!==null){if(s===null){if(!R)throw Error(n(318));if(R=l.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(n(317));R[Mo]=l}else al(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;ti(l),R=!1}else vo!==null&&(Hp(vo),vo=null),R=!0;if(!R)return l.flags&65536?l:null}return(l.flags&128)!==0?(l.lanes=p,l):(b=b!==null,b!==(s!==null&&s.memoizedState!==null)&&b&&(l.child.flags|=8192,(l.mode&1)!==0&&(s===null||(Xn.current&1)!==0?xr===0&&(xr=3):Vp())),l.updateQueue!==null&&(l.flags|=4),ti(l),null);case 4:return dl(),Pp(s,l),s===null&&bc(l.stateNode.containerInfo),ti(l),null;case 10:return ip(l.type._context),ti(l),null;case 17:return Ci(l.type)&&yd(),ti(l),null;case 19:if(Wn(Xn),R=l.memoizedState,R===null)return ti(l),null;if(b=(l.flags&128)!==0,F=R.rendering,F===null)if(b)Oc(R,!1);else{if(xr!==0||s!==null&&(s.flags&128)!==0)for(s=l.child;s!==null;){if(F=Td(s),F!==null){for(l.flags|=128,Oc(R,!1),b=F.updateQueue,b!==null&&(l.updateQueue=b,l.flags|=4),l.subtreeFlags=0,b=p,p=l.child;p!==null;)R=p,s=b,R.flags&=14680066,F=R.alternate,F===null?(R.childLanes=0,R.lanes=s,R.child=null,R.subtreeFlags=0,R.memoizedProps=null,R.memoizedState=null,R.updateQueue=null,R.dependencies=null,R.stateNode=null):(R.childLanes=F.childLanes,R.lanes=F.lanes,R.child=F.child,R.subtreeFlags=0,R.deletions=null,R.memoizedProps=F.memoizedProps,R.memoizedState=F.memoizedState,R.updateQueue=F.updateQueue,R.type=F.type,s=F.dependencies,R.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),p=p.sibling;return Dn(Xn,Xn.current&1|2),l.child}s=s.sibling}R.tail!==null&&gt()>pl&&(l.flags|=128,b=!0,Oc(R,!1),l.lanes=4194304)}else{if(!b)if(s=Td(F),s!==null){if(l.flags|=128,b=!0,p=s.updateQueue,p!==null&&(l.updateQueue=p,l.flags|=4),Oc(R,!0),R.tail===null&&R.tailMode==="hidden"&&!F.alternate&&!qn)return ti(l),null}else 2*gt()-R.renderingStartTime>pl&&p!==1073741824&&(l.flags|=128,b=!0,Oc(R,!1),l.lanes=4194304);R.isBackwards?(F.sibling=l.child,l.child=F):(p=R.last,p!==null?p.sibling=F:l.child=F,R.last=F)}return R.tail!==null?(l=R.tail,R.rendering=l,R.tail=l.sibling,R.renderingStartTime=gt(),l.sibling=null,p=Xn.current,Dn(Xn,b?p&1|2:p&1),l):(ti(l),null);case 22:case 23:return Wp(),b=l.memoizedState!==null,s!==null&&s.memoizedState!==null!==b&&(l.flags|=8192),b&&(l.mode&1)!==0?(ji&1073741824)!==0&&(ti(l),l.subtreeFlags&6&&(l.flags|=8192)):ti(l),null;case 24:return null;case 25:return null}throw Error(n(156,l.tag))}function XR(s,l){switch(Qm(l),l.tag){case 1:return Ci(l.type)&&yd(),s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return dl(),Wn(Si),Wn(Zr),dp(),s=l.flags,(s&65536)!==0&&(s&128)===0?(l.flags=s&-65537|128,l):null;case 5:return cp(l),null;case 13:if(Wn(Xn),s=l.memoizedState,s!==null&&s.dehydrated!==null){if(l.alternate===null)throw Error(n(340));al()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 19:return Wn(Xn),null;case 4:return dl(),null;case 10:return ip(l.type._context),null;case 22:case 23:return Wp(),null;case 24:return null;default:return null}}var Ld=!1,ni=!1,YR=typeof WeakSet=="function"?WeakSet:Set,bt=null;function fl(s,l){var p=s.ref;if(p!==null)if(typeof p=="function")try{p(null)}catch(b){nr(s,l,b)}else p.current=null}function Op(s,l,p){try{p()}catch(b){nr(s,l,b)}}var ES=!1;function JR(s,l){if(Wm=id,s=r_(),zm(s)){if("selectionStart"in s)var p={start:s.selectionStart,end:s.selectionEnd};else e:{p=(p=s.ownerDocument)&&p.defaultView||window;var b=p.getSelection&&p.getSelection();if(b&&b.rangeCount!==0){p=b.anchorNode;var w=b.anchorOffset,R=b.focusNode;b=b.focusOffset;try{p.nodeType,R.nodeType}catch{p=null;break e}var F=0,Q=-1,ie=-1,_e=0,Be=0,Fe=s,Ne=null;t:for(;;){for(var ht;Fe!==p||w!==0&&Fe.nodeType!==3||(Q=F+w),Fe!==R||b!==0&&Fe.nodeType!==3||(ie=F+b),Fe.nodeType===3&&(F+=Fe.nodeValue.length),(ht=Fe.firstChild)!==null;)Ne=Fe,Fe=ht;for(;;){if(Fe===s)break t;if(Ne===p&&++_e===w&&(Q=F),Ne===R&&++Be===b&&(ie=F),(ht=Fe.nextSibling)!==null)break;Fe=Ne,Ne=Fe.parentNode}Fe=ht}p=Q===-1||ie===-1?null:{start:Q,end:ie}}else p=null}p=p||{start:0,end:0}}else p=null;for(Vm={focusedElem:s,selectionRange:p},id=!1,bt=l;bt!==null;)if(l=bt,s=l.child,(l.subtreeFlags&1028)!==0&&s!==null)s.return=l,bt=s;else for(;bt!==null;){l=bt;try{var Ct=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(Ct!==null){var wt=Ct.memoizedProps,lr=Ct.memoizedState,pe=l.stateNode,oe=pe.getSnapshotBeforeUpdate(l.elementType===l.type?wt:yo(l.type,wt),lr);pe.__reactInternalSnapshotBeforeUpdate=oe}break;case 3:var ve=l.stateNode.containerInfo;ve.nodeType===1?ve.textContent="":ve.nodeType===9&&ve.documentElement&&ve.removeChild(ve.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Ve){nr(l,l.return,Ve)}if(s=l.sibling,s!==null){s.return=l.return,bt=s;break}bt=l.return}return Ct=ES,ES=!1,Ct}function Ic(s,l,p){var b=l.updateQueue;if(b=b!==null?b.lastEffect:null,b!==null){var w=b=b.next;do{if((w.tag&s)===s){var R=w.destroy;w.destroy=void 0,R!==void 0&&Op(l,p,R)}w=w.next}while(w!==b)}}function Ad(s,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var p=l=l.next;do{if((p.tag&s)===s){var b=p.create;p.destroy=b()}p=p.next}while(p!==l)}}function Ip(s){var l=s.ref;if(l!==null){var p=s.stateNode;switch(s.tag){case 5:s=p;break;default:s=p}typeof l=="function"?l(s):l.current=s}}function kS(s){var l=s.alternate;l!==null&&(s.alternate=null,kS(l)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(l=s.stateNode,l!==null&&(delete l[Mo],delete l[Sc],delete l[Gm],delete l[NR],delete l[MR])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function $S(s){return s.tag===5||s.tag===3||s.tag===4}function RS(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||$S(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.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 Np(s,l,p){var b=s.tag;if(b===5||b===6)s=s.stateNode,l?p.nodeType===8?p.parentNode.insertBefore(s,l):p.insertBefore(s,l):(p.nodeType===8?(l=p.parentNode,l.insertBefore(s,p)):(l=p,l.appendChild(s)),p=p._reactRootContainer,p!=null||l.onclick!==null||(l.onclick=gd));else if(b!==4&&(s=s.child,s!==null))for(Np(s,l,p),s=s.sibling;s!==null;)Np(s,l,p),s=s.sibling}function Mp(s,l,p){var b=s.tag;if(b===5||b===6)s=s.stateNode,l?p.insertBefore(s,l):p.appendChild(s);else if(b!==4&&(s=s.child,s!==null))for(Mp(s,l,p),s=s.sibling;s!==null;)Mp(s,l,p),s=s.sibling}var Wr=null,bo=!1;function Os(s,l,p){for(p=p.child;p!==null;)TS(s,l,p),p=p.sibling}function TS(s,l,p){if(gn&&typeof gn.onCommitFiberUnmount=="function")try{gn.onCommitFiberUnmount(Nt,p)}catch{}switch(p.tag){case 5:ni||fl(p,l);case 6:var b=Wr,w=bo;Wr=null,Os(s,l,p),Wr=b,bo=w,Wr!==null&&(bo?(s=Wr,p=p.stateNode,s.nodeType===8?s.parentNode.removeChild(p):s.removeChild(p)):Wr.removeChild(p.stateNode));break;case 18:Wr!==null&&(bo?(s=Wr,p=p.stateNode,s.nodeType===8?Km(s.parentNode,p):s.nodeType===1&&Km(s,p),Cs(s)):Km(Wr,p.stateNode));break;case 4:b=Wr,w=bo,Wr=p.stateNode.containerInfo,bo=!0,Os(s,l,p),Wr=b,bo=w;break;case 0:case 11:case 14:case 15:if(!ni&&(b=p.updateQueue,b!==null&&(b=b.lastEffect,b!==null))){w=b=b.next;do{var R=w,F=R.destroy;R=R.tag,F!==void 0&&((R&2)!==0||(R&4)!==0)&&Op(p,l,F),w=w.next}while(w!==b)}Os(s,l,p);break;case 1:if(!ni&&(fl(p,l),b=p.stateNode,typeof b.componentWillUnmount=="function"))try{b.props=p.memoizedProps,b.state=p.memoizedState,b.componentWillUnmount()}catch(Q){nr(p,l,Q)}Os(s,l,p);break;case 21:Os(s,l,p);break;case 22:p.mode&1?(ni=(b=ni)||p.memoizedState!==null,Os(s,l,p),ni=b):Os(s,l,p);break;default:Os(s,l,p)}}function PS(s){var l=s.updateQueue;if(l!==null){s.updateQueue=null;var p=s.stateNode;p===null&&(p=s.stateNode=new YR),l.forEach(function(b){var w=sT.bind(null,s,b);p.has(b)||(p.add(b),b.then(w,w))})}}function _o(s,l){var p=l.deletions;if(p!==null)for(var b=0;b<p.length;b++){var w=p[b];try{var R=s,F=l,Q=F;e:for(;Q!==null;){switch(Q.tag){case 5:Wr=Q.stateNode,bo=!1;break e;case 3:Wr=Q.stateNode.containerInfo,bo=!0;break e;case 4:Wr=Q.stateNode.containerInfo,bo=!0;break e}Q=Q.return}if(Wr===null)throw Error(n(160));TS(R,F,w),Wr=null,bo=!1;var ie=w.alternate;ie!==null&&(ie.return=null),w.return=null}catch(_e){nr(w,l,_e)}}if(l.subtreeFlags&12854)for(l=l.child;l!==null;)OS(l,s),l=l.sibling}function OS(s,l){var p=s.alternate,b=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(_o(l,s),Bo(s),b&4){try{Ic(3,s,s.return),Ad(3,s)}catch(wt){nr(s,s.return,wt)}try{Ic(5,s,s.return)}catch(wt){nr(s,s.return,wt)}}break;case 1:_o(l,s),Bo(s),b&512&&p!==null&&fl(p,p.return);break;case 5:if(_o(l,s),Bo(s),b&512&&p!==null&&fl(p,p.return),s.flags&32){var w=s.stateNode;try{ft(w,"")}catch(wt){nr(s,s.return,wt)}}if(b&4&&(w=s.stateNode,w!=null)){var R=s.memoizedProps,F=p!==null?p.memoizedProps:R,Q=s.type,ie=s.updateQueue;if(s.updateQueue=null,ie!==null)try{Q==="input"&&R.type==="radio"&&R.name!=null&&de(w,R),qe(Q,F);var _e=qe(Q,R);for(F=0;F<ie.length;F+=2){var Be=ie[F],Fe=ie[F+1];Be==="style"?Le(w,Fe):Be==="dangerouslySetInnerHTML"?Je(w,Fe):Be==="children"?ft(w,Fe):k(w,Be,Fe,_e)}switch(Q){case"input":be(w,R);break;case"textarea":Oe(w,R);break;case"select":var Ne=w._wrapperState.wasMultiple;w._wrapperState.wasMultiple=!!R.multiple;var ht=R.value;ht!=null?Ee(w,!!R.multiple,ht,!1):Ne!==!!R.multiple&&(R.defaultValue!=null?Ee(w,!!R.multiple,R.defaultValue,!0):Ee(w,!!R.multiple,R.multiple?[]:"",!1))}w[Sc]=R}catch(wt){nr(s,s.return,wt)}}break;case 6:if(_o(l,s),Bo(s),b&4){if(s.stateNode===null)throw Error(n(162));w=s.stateNode,R=s.memoizedProps;try{w.nodeValue=R}catch(wt){nr(s,s.return,wt)}}break;case 3:if(_o(l,s),Bo(s),b&4&&p!==null&&p.memoizedState.isDehydrated)try{Cs(l.containerInfo)}catch(wt){nr(s,s.return,wt)}break;case 4:_o(l,s),Bo(s);break;case 13:_o(l,s),Bo(s),w=s.child,w.flags&8192&&(R=w.memoizedState!==null,w.stateNode.isHidden=R,!R||w.alternate!==null&&w.alternate.memoizedState!==null||(Bp=gt())),b&4&&PS(s);break;case 22:if(Be=p!==null&&p.memoizedState!==null,s.mode&1?(ni=(_e=ni)||Be,_o(l,s),ni=_e):_o(l,s),Bo(s),b&8192){if(_e=s.memoizedState!==null,(s.stateNode.isHidden=_e)&&!Be&&(s.mode&1)!==0)for(bt=s,Be=s.child;Be!==null;){for(Fe=bt=Be;bt!==null;){switch(Ne=bt,ht=Ne.child,Ne.tag){case 0:case 11:case 14:case 15:Ic(4,Ne,Ne.return);break;case 1:fl(Ne,Ne.return);var Ct=Ne.stateNode;if(typeof Ct.componentWillUnmount=="function"){b=Ne,p=Ne.return;try{l=b,Ct.props=l.memoizedProps,Ct.state=l.memoizedState,Ct.componentWillUnmount()}catch(wt){nr(b,p,wt)}}break;case 5:fl(Ne,Ne.return);break;case 22:if(Ne.memoizedState!==null){MS(Fe);continue}}ht!==null?(ht.return=Ne,bt=ht):MS(Fe)}Be=Be.sibling}e:for(Be=null,Fe=s;;){if(Fe.tag===5){if(Be===null){Be=Fe;try{w=Fe.stateNode,_e?(R=w.style,typeof R.setProperty=="function"?R.setProperty("display","none","important"):R.display="none"):(Q=Fe.stateNode,ie=Fe.memoizedProps.style,F=ie!=null&&ie.hasOwnProperty("display")?ie.display:null,Q.style.display=tt("display",F))}catch(wt){nr(s,s.return,wt)}}}else if(Fe.tag===6){if(Be===null)try{Fe.stateNode.nodeValue=_e?"":Fe.memoizedProps}catch(wt){nr(s,s.return,wt)}}else if((Fe.tag!==22&&Fe.tag!==23||Fe.memoizedState===null||Fe===s)&&Fe.child!==null){Fe.child.return=Fe,Fe=Fe.child;continue}if(Fe===s)break e;for(;Fe.sibling===null;){if(Fe.return===null||Fe.return===s)break e;Be===Fe&&(Be=null),Fe=Fe.return}Be===Fe&&(Be=null),Fe.sibling.return=Fe.return,Fe=Fe.sibling}}break;case 19:_o(l,s),Bo(s),b&4&&PS(s);break;case 21:break;default:_o(l,s),Bo(s)}}function Bo(s){var l=s.flags;if(l&2){try{e:{for(var p=s.return;p!==null;){if($S(p)){var b=p;break e}p=p.return}throw Error(n(160))}switch(b.tag){case 5:var w=b.stateNode;b.flags&32&&(ft(w,""),b.flags&=-33);var R=RS(s);Mp(s,R,w);break;case 3:case 4:var F=b.stateNode.containerInfo,Q=RS(s);Np(s,Q,F);break;default:throw Error(n(161))}}catch(ie){nr(s,s.return,ie)}s.flags&=-3}l&4096&&(s.flags&=-4097)}function QR(s,l,p){bt=s,IS(s)}function IS(s,l,p){for(var b=(s.mode&1)!==0;bt!==null;){var w=bt,R=w.child;if(w.tag===22&&b){var F=w.memoizedState!==null||Ld;if(!F){var Q=w.alternate,ie=Q!==null&&Q.memoizedState!==null||ni;Q=Ld;var _e=ni;if(Ld=F,(ni=ie)&&!_e)for(bt=w;bt!==null;)F=bt,ie=F.child,F.tag===22&&F.memoizedState!==null?zS(w):ie!==null?(ie.return=F,bt=ie):zS(w);for(;R!==null;)bt=R,IS(R),R=R.sibling;bt=w,Ld=Q,ni=_e}NS(s)}else(w.subtreeFlags&8772)!==0&&R!==null?(R.return=w,bt=R):NS(s)}}function NS(s){for(;bt!==null;){var l=bt;if((l.flags&8772)!==0){var p=l.alternate;try{if((l.flags&8772)!==0)switch(l.tag){case 0:case 11:case 15:ni||Ad(5,l);break;case 1:var b=l.stateNode;if(l.flags&4&&!ni)if(p===null)b.componentDidMount();else{var w=l.elementType===l.type?p.memoizedProps:yo(l.type,p.memoizedProps);b.componentDidUpdate(w,p.memoizedState,b.__reactInternalSnapshotBeforeUpdate)}var R=l.updateQueue;R!==null&&M_(l,R,b);break;case 3:var F=l.updateQueue;if(F!==null){if(p=null,l.child!==null)switch(l.child.tag){case 5:p=l.child.stateNode;break;case 1:p=l.child.stateNode}M_(l,F,p)}break;case 5:var Q=l.stateNode;if(p===null&&l.flags&4){p=Q;var ie=l.memoizedProps;switch(l.type){case"button":case"input":case"select":case"textarea":ie.autoFocus&&p.focus();break;case"img":ie.src&&(p.src=ie.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(l.memoizedState===null){var _e=l.alternate;if(_e!==null){var Be=_e.memoizedState;if(Be!==null){var Fe=Be.dehydrated;Fe!==null&&Cs(Fe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}ni||l.flags&512&&Ip(l)}catch(Ne){nr(l,l.return,Ne)}}if(l===s){bt=null;break}if(p=l.sibling,p!==null){p.return=l.return,bt=p;break}bt=l.return}}function MS(s){for(;bt!==null;){var l=bt;if(l===s){bt=null;break}var p=l.sibling;if(p!==null){p.return=l.return,bt=p;break}bt=l.return}}function zS(s){for(;bt!==null;){var l=bt;try{switch(l.tag){case 0:case 11:case 15:var p=l.return;try{Ad(4,l)}catch(ie){nr(l,p,ie)}break;case 1:var b=l.stateNode;if(typeof b.componentDidMount=="function"){var w=l.return;try{b.componentDidMount()}catch(ie){nr(l,w,ie)}}var R=l.return;try{Ip(l)}catch(ie){nr(l,R,ie)}break;case 5:var F=l.return;try{Ip(l)}catch(ie){nr(l,F,ie)}}}catch(ie){nr(l,l.return,ie)}if(l===s){bt=null;break}var Q=l.sibling;if(Q!==null){Q.return=l.return,bt=Q;break}bt=l.return}}var ZR=Math.ceil,Dd=$.ReactCurrentDispatcher,zp=$.ReactCurrentOwner,Zi=$.ReactCurrentBatchConfig,vn=0,Ir=null,mr=null,Vr=0,ji=0,ml=ks(0),xr=0,Nc=null,da=0,Hd=0,jp=0,Mc=null,xi=null,Bp=0,pl=1/0,cs=null,Fd=!1,Lp=null,Is=null,Wd=!1,Ns=null,Vd=0,zc=0,Ap=null,Ud=-1,qd=0;function ui(){return(vn&6)!==0?gt():Ud!==-1?Ud:Ud=gt()}function Ms(s){return(s.mode&1)===0?1:(vn&2)!==0&&Vr!==0?Vr&-Vr:jR.transition!==null?(qd===0&&(qd=hn()),qd):(s=Ut,s!==0||(s=window.event,s=s===void 0?16:Bb(s.type)),s)}function So(s,l,p,b){if(50<zc)throw zc=0,Ap=null,Error(n(185));xn(s,p,b),((vn&2)===0||s!==Ir)&&(s===Ir&&((vn&2)===0&&(Hd|=p),xr===4&&zs(s,Vr)),Ei(s,b),p===1&&vn===0&&(l.mode&1)===0&&(pl=gt()+500,_d&&Rs()))}function Ei(s,l){var p=s.callbackNode;st(s,l);var b=dn(s,s===Ir?Vr:0);if(b===0)p!==null&&He(p),s.callbackNode=null,s.callbackPriority=0;else if(l=b&-b,s.callbackPriority!==l){if(p!=null&&He(p),l===1)s.tag===0?zR(BS.bind(null,s)):C_(BS.bind(null,s)),OR(function(){(vn&6)===0&&Rs()}),p=null;else{switch(Cr(b)){case 1:p=Ze;break;case 4:p=Tt;break;case 16:p=Gt;break;case 536870912:p=vt;break;default:p=Gt}p=US(p,jS.bind(null,s))}s.callbackPriority=l,s.callbackNode=p}}function jS(s,l){if(Ud=-1,qd=0,(vn&6)!==0)throw Error(n(327));var p=s.callbackNode;if(gl()&&s.callbackNode!==p)return null;var b=dn(s,s===Ir?Vr:0);if(b===0)return null;if((b&30)!==0||(b&s.expiredLanes)!==0||l)l=Kd(s,b);else{l=b;var w=vn;vn|=2;var R=AS();(Ir!==s||Vr!==l)&&(cs=null,pl=gt()+500,fa(s,l));do try{nT();break}catch(Q){LS(s,Q)}while(!0);rp(),Dd.current=R,vn=w,mr!==null?l=0:(Ir=null,Vr=0,l=xr)}if(l!==0){if(l===2&&(w=an(s),w!==0&&(b=w,l=Dp(s,w))),l===1)throw p=Nc,fa(s,0),zs(s,b),Ei(s,gt()),p;if(l===6)zs(s,b);else{if(w=s.current.alternate,(b&30)===0&&!eT(w)&&(l=Kd(s,b),l===2&&(R=an(s),R!==0&&(b=R,l=Dp(s,R))),l===1))throw p=Nc,fa(s,0),zs(s,b),Ei(s,gt()),p;switch(s.finishedWork=w,s.finishedLanes=b,l){case 0:case 1:throw Error(n(345));case 2:ma(s,xi,cs);break;case 3:if(zs(s,b),(b&130023424)===b&&(l=Bp+500-gt(),10<l)){if(dn(s,0)!==0)break;if(w=s.suspendedLanes,(w&b)!==b){ui(),s.pingedLanes|=s.suspendedLanes&w;break}s.timeoutHandle=qm(ma.bind(null,s,xi,cs),l);break}ma(s,xi,cs);break;case 4:if(zs(s,b),(b&4194240)===b)break;for(l=s.eventTimes,w=-1;0<b;){var F=31-Ln(b);R=1<<F,F=l[F],F>w&&(w=F),b&=~R}if(b=w,b=gt()-b,b=(120>b?120:480>b?480:1080>b?1080:1920>b?1920:3e3>b?3e3:4320>b?4320:1960*ZR(b/1960))-b,10<b){s.timeoutHandle=qm(ma.bind(null,s,xi,cs),b);break}ma(s,xi,cs);break;case 5:ma(s,xi,cs);break;default:throw Error(n(329))}}}return Ei(s,gt()),s.callbackNode===p?jS.bind(null,s):null}function Dp(s,l){var p=Mc;return s.current.memoizedState.isDehydrated&&(fa(s,l).flags|=256),s=Kd(s,l),s!==2&&(l=xi,xi=p,l!==null&&Hp(l)),s}function Hp(s){xi===null?xi=s:xi.push.apply(xi,s)}function eT(s){for(var l=s;;){if(l.flags&16384){var p=l.updateQueue;if(p!==null&&(p=p.stores,p!==null))for(var b=0;b<p.length;b++){var w=p[b],R=w.getSnapshot;w=w.value;try{if(!go(R(),w))return!1}catch{return!1}}}if(p=l.child,l.subtreeFlags&16384&&p!==null)p.return=l,l=p;else{if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function zs(s,l){for(l&=~jp,l&=~Hd,s.suspendedLanes|=l,s.pingedLanes&=~l,s=s.expirationTimes;0<l;){var p=31-Ln(l),b=1<<p;s[p]=-1,l&=~b}}function BS(s){if((vn&6)!==0)throw Error(n(327));gl();var l=dn(s,0);if((l&1)===0)return Ei(s,gt()),null;var p=Kd(s,l);if(s.tag!==0&&p===2){var b=an(s);b!==0&&(l=b,p=Dp(s,b))}if(p===1)throw p=Nc,fa(s,0),zs(s,l),Ei(s,gt()),p;if(p===6)throw Error(n(345));return s.finishedWork=s.current.alternate,s.finishedLanes=l,ma(s,xi,cs),Ei(s,gt()),null}function Fp(s,l){var p=vn;vn|=1;try{return s(l)}finally{vn=p,vn===0&&(pl=gt()+500,_d&&Rs())}}function ha(s){Ns!==null&&Ns.tag===0&&(vn&6)===0&&gl();var l=vn;vn|=1;var p=Zi.transition,b=Ut;try{if(Zi.transition=null,Ut=1,s)return s()}finally{Ut=b,Zi.transition=p,vn=l,(vn&6)===0&&Rs()}}function Wp(){ji=ml.current,Wn(ml)}function fa(s,l){s.finishedWork=null,s.finishedLanes=0;var p=s.timeoutHandle;if(p!==-1&&(s.timeoutHandle=-1,PR(p)),mr!==null)for(p=mr.return;p!==null;){var b=p;switch(Qm(b),b.tag){case 1:b=b.type.childContextTypes,b!=null&&yd();break;case 3:dl(),Wn(Si),Wn(Zr),dp();break;case 5:cp(b);break;case 4:dl();break;case 13:Wn(Xn);break;case 19:Wn(Xn);break;case 10:ip(b.type._context);break;case 22:case 23:Wp()}p=p.return}if(Ir=s,mr=s=js(s.current,null),Vr=ji=l,xr=0,Nc=null,jp=Hd=da=0,xi=Mc=null,la!==null){for(l=0;l<la.length;l++)if(p=la[l],b=p.interleaved,b!==null){p.interleaved=null;var w=b.next,R=p.pending;if(R!==null){var F=R.next;R.next=w,b.next=F}p.pending=b}la=null}return s}function LS(s,l){do{var p=mr;try{if(rp(),Pd.current=Md,Od){for(var b=Yn.memoizedState;b!==null;){var w=b.queue;w!==null&&(w.pending=null),b=b.next}Od=!1}if(ua=0,Or=wr=Yn=null,$c=!1,Rc=0,zp.current=null,p===null||p.return===null){xr=1,Nc=l,mr=null;break}e:{var R=s,F=p.return,Q=p,ie=l;if(l=Vr,Q.flags|=32768,ie!==null&&typeof ie=="object"&&typeof ie.then=="function"){var _e=ie,Be=Q,Fe=Be.tag;if((Be.mode&1)===0&&(Fe===0||Fe===11||Fe===15)){var Ne=Be.alternate;Ne?(Be.updateQueue=Ne.updateQueue,Be.memoizedState=Ne.memoizedState,Be.lanes=Ne.lanes):(Be.updateQueue=null,Be.memoizedState=null)}var ht=cS(F);if(ht!==null){ht.flags&=-257,uS(ht,F,Q,R,l),ht.mode&1&&lS(R,_e,l),l=ht,ie=_e;var Ct=l.updateQueue;if(Ct===null){var wt=new Set;wt.add(ie),l.updateQueue=wt}else Ct.add(ie);break e}else{if((l&1)===0){lS(R,_e,l),Vp();break e}ie=Error(n(426))}}else if(qn&&Q.mode&1){var lr=cS(F);if(lr!==null){(lr.flags&65536)===0&&(lr.flags|=256),uS(lr,F,Q,R,l),tp(hl(ie,Q));break e}}R=ie=hl(ie,Q),xr!==4&&(xr=2),Mc===null?Mc=[R]:Mc.push(R),R=F;do{switch(R.tag){case 3:R.flags|=65536,l&=-l,R.lanes|=l;var pe=sS(R,ie,l);N_(R,pe);break e;case 1:Q=ie;var oe=R.type,ve=R.stateNode;if((R.flags&128)===0&&(typeof oe.getDerivedStateFromError=="function"||ve!==null&&typeof ve.componentDidCatch=="function"&&(Is===null||!Is.has(ve)))){R.flags|=65536,l&=-l,R.lanes|=l;var Ve=aS(R,Q,l);N_(R,Ve);break e}}R=R.return}while(R!==null)}HS(p)}catch(xt){l=xt,mr===p&&p!==null&&(mr=p=p.return);continue}break}while(!0)}function AS(){var s=Dd.current;return Dd.current=Md,s===null?Md:s}function Vp(){(xr===0||xr===3||xr===2)&&(xr=4),Ir===null||(da&268435455)===0&&(Hd&268435455)===0||zs(Ir,Vr)}function Kd(s,l){var p=vn;vn|=2;var b=AS();(Ir!==s||Vr!==l)&&(cs=null,fa(s,l));do try{tT();break}catch(w){LS(s,w)}while(!0);if(rp(),vn=p,Dd.current=b,mr!==null)throw Error(n(261));return Ir=null,Vr=0,xr}function tT(){for(;mr!==null;)DS(mr)}function nT(){for(;mr!==null&&!Ye();)DS(mr)}function DS(s){var l=VS(s.alternate,s,ji);s.memoizedProps=s.pendingProps,l===null?HS(s):mr=l,zp.current=null}function HS(s){var l=s;do{var p=l.alternate;if(s=l.return,(l.flags&32768)===0){if(p=GR(p,l,ji),p!==null){mr=p;return}}else{if(p=XR(p,l),p!==null){p.flags&=32767,mr=p;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{xr=6,mr=null;return}}if(l=l.sibling,l!==null){mr=l;return}mr=l=s}while(l!==null);xr===0&&(xr=5)}function ma(s,l,p){var b=Ut,w=Zi.transition;try{Zi.transition=null,Ut=1,rT(s,l,p,b)}finally{Zi.transition=w,Ut=b}return null}function rT(s,l,p,b){do gl();while(Ns!==null);if((vn&6)!==0)throw Error(n(327));p=s.finishedWork;var w=s.finishedLanes;if(p===null)return null;if(s.finishedWork=null,s.finishedLanes=0,p===s.current)throw Error(n(177));s.callbackNode=null,s.callbackPriority=0;var R=p.lanes|p.childLanes;if(Fr(s,R),s===Ir&&(mr=Ir=null,Vr=0),(p.subtreeFlags&2064)===0&&(p.flags&2064)===0||Wd||(Wd=!0,US(Gt,function(){return gl(),null})),R=(p.flags&15990)!==0,(p.subtreeFlags&15990)!==0||R){R=Zi.transition,Zi.transition=null;var F=Ut;Ut=1;var Q=vn;vn|=4,zp.current=null,JR(s,p),OS(p,s),wR(Vm),id=!!Wm,Vm=Wm=null,s.current=p,QR(p),Pt(),vn=Q,Ut=F,Zi.transition=R}else s.current=p;if(Wd&&(Wd=!1,Ns=s,Vd=w),R=s.pendingLanes,R===0&&(Is=null),sr(p.stateNode),Ei(s,gt()),l!==null)for(b=s.onRecoverableError,p=0;p<l.length;p++)w=l[p],b(w.value,{componentStack:w.stack,digest:w.digest});if(Fd)throw Fd=!1,s=Lp,Lp=null,s;return(Vd&1)!==0&&s.tag!==0&&gl(),R=s.pendingLanes,(R&1)!==0?s===Ap?zc++:(zc=0,Ap=s):zc=0,Rs(),null}function gl(){if(Ns!==null){var s=Cr(Vd),l=Zi.transition,p=Ut;try{if(Zi.transition=null,Ut=16>s?16:s,Ns===null)var b=!1;else{if(s=Ns,Ns=null,Vd=0,(vn&6)!==0)throw Error(n(331));var w=vn;for(vn|=4,bt=s.current;bt!==null;){var R=bt,F=R.child;if((bt.flags&16)!==0){var Q=R.deletions;if(Q!==null){for(var ie=0;ie<Q.length;ie++){var _e=Q[ie];for(bt=_e;bt!==null;){var Be=bt;switch(Be.tag){case 0:case 11:case 15:Ic(8,Be,R)}var Fe=Be.child;if(Fe!==null)Fe.return=Be,bt=Fe;else for(;bt!==null;){Be=bt;var Ne=Be.sibling,ht=Be.return;if(kS(Be),Be===_e){bt=null;break}if(Ne!==null){Ne.return=ht,bt=Ne;break}bt=ht}}}var Ct=R.alternate;if(Ct!==null){var wt=Ct.child;if(wt!==null){Ct.child=null;do{var lr=wt.sibling;wt.sibling=null,wt=lr}while(wt!==null)}}bt=R}}if((R.subtreeFlags&2064)!==0&&F!==null)F.return=R,bt=F;else e:for(;bt!==null;){if(R=bt,(R.flags&2048)!==0)switch(R.tag){case 0:case 11:case 15:Ic(9,R,R.return)}var pe=R.sibling;if(pe!==null){pe.return=R.return,bt=pe;break e}bt=R.return}}var oe=s.current;for(bt=oe;bt!==null;){F=bt;var ve=F.child;if((F.subtreeFlags&2064)!==0&&ve!==null)ve.return=F,bt=ve;else e:for(F=oe;bt!==null;){if(Q=bt,(Q.flags&2048)!==0)try{switch(Q.tag){case 0:case 11:case 15:Ad(9,Q)}}catch(xt){nr(Q,Q.return,xt)}if(Q===F){bt=null;break e}var Ve=Q.sibling;if(Ve!==null){Ve.return=Q.return,bt=Ve;break e}bt=Q.return}}if(vn=w,Rs(),gn&&typeof gn.onPostCommitFiberRoot=="function")try{gn.onPostCommitFiberRoot(Nt,s)}catch{}b=!0}return b}finally{Ut=p,Zi.transition=l}}return!1}function FS(s,l,p){l=hl(p,l),l=sS(s,l,1),s=Ps(s,l,1),l=ui(),s!==null&&(xn(s,1,l),Ei(s,l))}function nr(s,l,p){if(s.tag===3)FS(s,s,p);else for(;l!==null;){if(l.tag===3){FS(l,s,p);break}else if(l.tag===1){var b=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof b.componentDidCatch=="function"&&(Is===null||!Is.has(b))){s=hl(p,s),s=aS(l,s,1),l=Ps(l,s,1),s=ui(),l!==null&&(xn(l,1,s),Ei(l,s));break}}l=l.return}}function iT(s,l,p){var b=s.pingCache;b!==null&&b.delete(l),l=ui(),s.pingedLanes|=s.suspendedLanes&p,Ir===s&&(Vr&p)===p&&(xr===4||xr===3&&(Vr&130023424)===Vr&&500>gt()-Bp?fa(s,0):jp|=p),Ei(s,l)}function WS(s,l){l===0&&((s.mode&1)===0?l=1:(l=Hr,Hr<<=1,(Hr&130023424)===0&&(Hr=4194304)));var p=ui();s=ss(s,l),s!==null&&(xn(s,l,p),Ei(s,p))}function oT(s){var l=s.memoizedState,p=0;l!==null&&(p=l.retryLane),WS(s,p)}function sT(s,l){var p=0;switch(s.tag){case 13:var b=s.stateNode,w=s.memoizedState;w!==null&&(p=w.retryLane);break;case 19:b=s.stateNode;break;default:throw Error(n(314))}b!==null&&b.delete(l),WS(s,p)}var VS;VS=function(s,l,p){if(s!==null)if(s.memoizedProps!==l.pendingProps||Si.current)wi=!0;else{if((s.lanes&p)===0&&(l.flags&128)===0)return wi=!1,KR(s,l,p);wi=(s.flags&131072)!==0}else wi=!1,qn&&(l.flags&1048576)!==0&&w_(l,Cd,l.index);switch(l.lanes=0,l.tag){case 2:var b=l.type;Bd(s,l),s=l.pendingProps;var w=il(l,Zr.current);ul(l,p),w=mp(null,l,b,s,w,p);var R=pp();return l.flags|=1,typeof w=="object"&&w!==null&&typeof w.render=="function"&&w.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,Ci(b)?(R=!0,bd(l)):R=!1,l.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,ap(l),w.updater=zd,l.stateNode=w,w._reactInternals=l,Sp(l,b,s,p),l=Ep(null,l,b,!0,R,p)):(l.tag=0,qn&&R&&Jm(l),ci(null,l,w,p),l=l.child),l;case 16:b=l.elementType;e:{switch(Bd(s,l),s=l.pendingProps,w=b._init,b=w(b._payload),l.type=b,w=l.tag=lT(b),s=yo(b,s),w){case 0:l=xp(null,l,b,s,p);break e;case 1:l=gS(null,l,b,s,p);break e;case 11:l=dS(null,l,b,s,p);break e;case 14:l=hS(null,l,b,yo(b.type,s),p);break e}throw Error(n(306,b,""))}return l;case 0:return b=l.type,w=l.pendingProps,w=l.elementType===b?w:yo(b,w),xp(s,l,b,w,p);case 1:return b=l.type,w=l.pendingProps,w=l.elementType===b?w:yo(b,w),gS(s,l,b,w,p);case 3:e:{if(vS(l),s===null)throw Error(n(387));b=l.pendingProps,R=l.memoizedState,w=R.element,I_(s,l),Rd(l,b,null,p);var F=l.memoizedState;if(b=F.element,R.isDehydrated)if(R={element:b,isDehydrated:!1,cache:F.cache,pendingSuspenseBoundaries:F.pendingSuspenseBoundaries,transitions:F.transitions},l.updateQueue.baseState=R,l.memoizedState=R,l.flags&256){w=hl(Error(n(423)),l),l=yS(s,l,b,p,w);break e}else if(b!==w){w=hl(Error(n(424)),l),l=yS(s,l,b,p,w);break e}else for(zi=Es(l.stateNode.containerInfo.firstChild),Mi=l,qn=!0,vo=null,p=P_(l,null,b,p),l.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling;else{if(al(),b===w){l=ls(s,l,p);break e}ci(s,l,b,p)}l=l.child}return l;case 5:return z_(l),s===null&&ep(l),b=l.type,w=l.pendingProps,R=s!==null?s.memoizedProps:null,F=w.children,Um(b,w)?F=null:R!==null&&Um(b,R)&&(l.flags|=32),pS(s,l),ci(s,l,F,p),l.child;case 6:return s===null&&ep(l),null;case 13:return bS(s,l,p);case 4:return lp(l,l.stateNode.containerInfo),b=l.pendingProps,s===null?l.child=ll(l,null,b,p):ci(s,l,b,p),l.child;case 11:return b=l.type,w=l.pendingProps,w=l.elementType===b?w:yo(b,w),dS(s,l,b,w,p);case 7:return ci(s,l,l.pendingProps,p),l.child;case 8:return ci(s,l,l.pendingProps.children,p),l.child;case 12:return ci(s,l,l.pendingProps.children,p),l.child;case 10:e:{if(b=l.type._context,w=l.pendingProps,R=l.memoizedProps,F=w.value,Dn(Ed,b._currentValue),b._currentValue=F,R!==null)if(go(R.value,F)){if(R.children===w.children&&!Si.current){l=ls(s,l,p);break e}}else for(R=l.child,R!==null&&(R.return=l);R!==null;){var Q=R.dependencies;if(Q!==null){F=R.child;for(var ie=Q.firstContext;ie!==null;){if(ie.context===b){if(R.tag===1){ie=as(-1,p&-p),ie.tag=2;var _e=R.updateQueue;if(_e!==null){_e=_e.shared;var Be=_e.pending;Be===null?ie.next=ie:(ie.next=Be.next,Be.next=ie),_e.pending=ie}}R.lanes|=p,ie=R.alternate,ie!==null&&(ie.lanes|=p),op(R.return,p,l),Q.lanes|=p;break}ie=ie.next}}else if(R.tag===10)F=R.type===l.type?null:R.child;else if(R.tag===18){if(F=R.return,F===null)throw Error(n(341));F.lanes|=p,Q=F.alternate,Q!==null&&(Q.lanes|=p),op(F,p,l),F=R.sibling}else F=R.child;if(F!==null)F.return=R;else for(F=R;F!==null;){if(F===l){F=null;break}if(R=F.sibling,R!==null){R.return=F.return,F=R;break}F=F.return}R=F}ci(s,l,w.children,p),l=l.child}return l;case 9:return w=l.type,b=l.pendingProps.children,ul(l,p),w=Ji(w),b=b(w),l.flags|=1,ci(s,l,b,p),l.child;case 14:return b=l.type,w=yo(b,l.pendingProps),w=yo(b.type,w),hS(s,l,b,w,p);case 15:return fS(s,l,l.type,l.pendingProps,p);case 17:return b=l.type,w=l.pendingProps,w=l.elementType===b?w:yo(b,w),Bd(s,l),l.tag=1,Ci(b)?(s=!0,bd(l)):s=!1,ul(l,p),iS(l,b,w),Sp(l,b,w,p),Ep(null,l,b,!0,s,p);case 19:return SS(s,l,p);case 22:return mS(s,l,p)}throw Error(n(156,l.tag))};function US(s,l){return mn(s,l)}function aT(s,l,p,b){this.tag=s,this.key=p,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=b,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function eo(s,l,p,b){return new aT(s,l,p,b)}function Up(s){return s=s.prototype,!(!s||!s.isReactComponent)}function lT(s){if(typeof s=="function")return Up(s)?1:0;if(s!=null){if(s=s.$$typeof,s===M)return 11;if(s===H)return 14}return 2}function js(s,l){var p=s.alternate;return p===null?(p=eo(s.tag,l,s.key,s.mode),p.elementType=s.elementType,p.type=s.type,p.stateNode=s.stateNode,p.alternate=s,s.alternate=p):(p.pendingProps=l,p.type=s.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=s.flags&14680064,p.childLanes=s.childLanes,p.lanes=s.lanes,p.child=s.child,p.memoizedProps=s.memoizedProps,p.memoizedState=s.memoizedState,p.updateQueue=s.updateQueue,l=s.dependencies,p.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},p.sibling=s.sibling,p.index=s.index,p.ref=s.ref,p}function Gd(s,l,p,b,w,R){var F=2;if(b=s,typeof s=="function")Up(s)&&(F=1);else if(typeof s=="string")F=5;else e:switch(s){case O:return pa(p.children,w,R,l);case N:F=8,w|=8;break;case I:return s=eo(12,p,l,w|2),s.elementType=I,s.lanes=R,s;case j:return s=eo(13,p,l,w),s.elementType=j,s.lanes=R,s;case B:return s=eo(19,p,l,w),s.elementType=B,s.lanes=R,s;case V:return Xd(p,w,R,l);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case z:F=10;break e;case L:F=9;break e;case M:F=11;break e;case H:F=14;break e;case W:F=16,b=null;break e}throw Error(n(130,s==null?s:typeof s,""))}return l=eo(F,p,l,w),l.elementType=s,l.type=b,l.lanes=R,l}function pa(s,l,p,b){return s=eo(7,s,b,l),s.lanes=p,s}function Xd(s,l,p,b){return s=eo(22,s,b,l),s.elementType=V,s.lanes=p,s.stateNode={isHidden:!1},s}function qp(s,l,p){return s=eo(6,s,null,l),s.lanes=p,s}function Kp(s,l,p){return l=eo(4,s.children!==null?s.children:[],s.key,l),l.lanes=p,l.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},l}function cT(s,l,p,b,w){this.tag=l,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Sn(0),this.expirationTimes=Sn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sn(0),this.identifierPrefix=b,this.onRecoverableError=w,this.mutableSourceEagerHydrationData=null}function Gp(s,l,p,b,w,R,F,Q,ie){return s=new cT(s,l,p,Q,ie),l===1?(l=1,R===!0&&(l|=8)):l=0,R=eo(3,null,null,l),s.current=R,R.stateNode=s,R.memoizedState={element:b,isDehydrated:p,cache:null,transitions:null,pendingSuspenseBoundaries:null},ap(R),s}function uT(s,l,p){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:T,key:b==null?null:""+b,children:s,containerInfo:l,implementation:p}}function qS(s){if(!s)return $s;s=s._reactInternals;e:{if(At(s)!==s||s.tag!==1)throw Error(n(170));var l=s;do{switch(l.tag){case 3:l=l.stateNode.context;break e;case 1:if(Ci(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}}l=l.return}while(l!==null);throw Error(n(171))}if(s.tag===1){var p=s.type;if(Ci(p))return __(s,p,l)}return l}function KS(s,l,p,b,w,R,F,Q,ie){return s=Gp(p,b,!0,s,w,R,F,Q,ie),s.context=qS(null),p=s.current,b=ui(),w=Ms(p),R=as(b,w),R.callback=l??null,Ps(p,R,w),s.current.lanes=w,xn(s,w,b),Ei(s,b),s}function Yd(s,l,p,b){var w=l.current,R=ui(),F=Ms(w);return p=qS(p),l.context===null?l.context=p:l.pendingContext=p,l=as(R,F),l.payload={element:s},b=b===void 0?null:b,b!==null&&(l.callback=b),s=Ps(w,l,F),s!==null&&(So(s,w,F,R),$d(s,w,F)),F}function Jd(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function GS(s,l){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var p=s.retryLane;s.retryLane=p!==0&&p<l?p:l}}function Xp(s,l){GS(s,l),(s=s.alternate)&&GS(s,l)}function dT(){return null}var XS=typeof reportError=="function"?reportError:function(s){console.error(s)};function Yp(s){this._internalRoot=s}Qd.prototype.render=Yp.prototype.render=function(s){var l=this._internalRoot;if(l===null)throw Error(n(409));Yd(s,l,null,null)},Qd.prototype.unmount=Yp.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var l=s.containerInfo;ha(function(){Yd(null,s,null,null)}),l[ns]=null}};function Qd(s){this._internalRoot=s}Qd.prototype.unstable_scheduleHydration=function(s){if(s){var l=Ss();s={blockedOn:null,target:s,priority:l};for(var p=0;p<Ii.length&&l!==0&&l<Ii[p].priority;p++);Ii.splice(p,0,s),p===0&&jn(s)}};function Jp(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function Zd(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function YS(){}function hT(s,l,p,b,w){if(w){if(typeof b=="function"){var R=b;b=function(){var _e=Jd(F);R.call(_e)}}var F=KS(l,b,s,0,null,!1,!1,"",YS);return s._reactRootContainer=F,s[ns]=F.current,bc(s.nodeType===8?s.parentNode:s),ha(),F}for(;w=s.lastChild;)s.removeChild(w);if(typeof b=="function"){var Q=b;b=function(){var _e=Jd(ie);Q.call(_e)}}var ie=Gp(s,0,!1,null,null,!1,!1,"",YS);return s._reactRootContainer=ie,s[ns]=ie.current,bc(s.nodeType===8?s.parentNode:s),ha(function(){Yd(l,ie,p,b)}),ie}function eh(s,l,p,b,w){var R=p._reactRootContainer;if(R){var F=R;if(typeof w=="function"){var Q=w;w=function(){var ie=Jd(F);Q.call(ie)}}Yd(l,F,s,w)}else F=hT(p,l,s,w,b);return Jd(F)}Tr=function(s){switch(s.tag){case 3:var l=s.stateNode;if(l.current.memoizedState.isDehydrated){var p=Jr(l.pendingLanes);p!==0&&(ar(l,p|1),Ei(l,gt()),(vn&6)===0&&(pl=gt()+500,Rs()))}break;case 13:ha(function(){var b=ss(s,1);if(b!==null){var w=ui();So(b,s,1,w)}}),Xp(s,1)}},bi=function(s){if(s.tag===13){var l=ss(s,134217728);if(l!==null){var p=ui();So(l,s,134217728,p)}Xp(s,134217728)}},Pr=function(s){if(s.tag===13){var l=Ms(s),p=ss(s,l);if(p!==null){var b=ui();So(p,s,l,b)}Xp(s,l)}},Ss=function(){return Ut},Ua=function(s,l){var p=Ut;try{return Ut=s,l()}finally{Ut=p}},nn=function(s,l,p){switch(l){case"input":if(be(s,p),l=p.name,p.type==="radio"&&l!=null){for(p=s;p.parentNode;)p=p.parentNode;for(p=p.querySelectorAll("input[name="+JSON.stringify(""+l)+'][type="radio"]'),l=0;l<p.length;l++){var b=p[l];if(b!==s&&b.form===s.form){var w=vd(b);if(!w)throw Error(n(90));le(b),be(b,w)}}}break;case"textarea":Oe(s,p);break;case"select":l=p.value,l!=null&&Ee(s,!!p.multiple,l,!1)}},Rt=Fp,sn=ha;var fT={usingClientEntryPoint:!1,Events:[Cc,nl,vd,on,Ht,Fp]},jc={findFiberByHostInstance:ia,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},mT={bundleType:jc.bundleType,version:jc.version,rendererPackageName:jc.rendererPackageName,rendererConfig:jc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:$.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=Hn(s),s===null?null:s.stateNode},findFiberByHostInstance:jc.findFiberByHostInstance||dT,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var th=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!th.isDisabled&&th.supportsFiber)try{Nt=th.inject(mT),gn=th}catch{}}return ki.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fT,ki.createPortal=function(s,l){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Jp(l))throw Error(n(200));return uT(s,l,null,p)},ki.createRoot=function(s,l){if(!Jp(s))throw Error(n(299));var p=!1,b="",w=XS;return l!=null&&(l.unstable_strictMode===!0&&(p=!0),l.identifierPrefix!==void 0&&(b=l.identifierPrefix),l.onRecoverableError!==void 0&&(w=l.onRecoverableError)),l=Gp(s,1,!1,null,null,p,!1,b,w),s[ns]=l.current,bc(s.nodeType===8?s.parentNode:s),new Yp(l)},ki.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var l=s._reactInternals;if(l===void 0)throw typeof s.render=="function"?Error(n(188)):(s=Object.keys(s).join(","),Error(n(268,s)));return s=Hn(l),s=s===null?null:s.stateNode,s},ki.flushSync=function(s){return ha(s)},ki.hydrate=function(s,l,p){if(!Zd(l))throw Error(n(200));return eh(null,s,l,!0,p)},ki.hydrateRoot=function(s,l,p){if(!Jp(s))throw Error(n(405));var b=p!=null&&p.hydratedSources||null,w=!1,R="",F=XS;if(p!=null&&(p.unstable_strictMode===!0&&(w=!0),p.identifierPrefix!==void 0&&(R=p.identifierPrefix),p.onRecoverableError!==void 0&&(F=p.onRecoverableError)),l=KS(l,null,s,1,p??null,w,!1,R,F),s[ns]=l.current,bc(s),b)for(s=0;s<b.length;s++)p=b[s],w=p._getVersion,w=w(p._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[p,w]:l.mutableSourceEagerHydrationData.push(p,w);return new Qd(l)},ki.render=function(s,l,p){if(!Zd(l))throw Error(n(200));return eh(null,s,l,!1,p)},ki.unmountComponentAtNode=function(s){if(!Zd(s))throw Error(n(40));return s._reactRootContainer?(ha(function(){eh(null,null,s,!1,function(){s._reactRootContainer=null,s[ns]=null})}),!0):!1},ki.unstable_batchedUpdates=Fp,ki.unstable_renderSubtreeIntoContainer=function(s,l,p,b){if(!Zd(p))throw Error(n(200));if(s==null||s._reactInternals===void 0)throw Error(n(38));return eh(s,l,p,!1,b)},ki.version="18.3.1-next-f1338f8080-20240426",ki}var i1;function b2(){if(i1)return eg.exports;i1=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(),eg.exports=wT(),eg.exports}var o1;function xT(){if(o1)return nh;o1=1;var e=b2();return nh.createRoot=e.createRoot,nh.hydrateRoot=e.hydrateRoot,nh}var ET=xT();const kT=ju(ET);var rg={exports:{}};/*!
41
+ Copyright (c) 2018 Jed Watson.
42
+ Licensed under the MIT License (MIT), see
43
+ http://jedwatson.github.io/classnames
44
+ */var s1;function $T(){return s1||(s1=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",a=0;a<arguments.length;a++){var c=arguments[a];c&&(o=i(o,r(c)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var a="";for(var c in o)t.call(o,c)&&o[c]&&(a=i(a,c));return a}function i(o,a){return a?o?o+" "+a:o+a:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(rg)),rg.exports}var RT=$T();const ne=ju(RT);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)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Re.apply(null,arguments)}function _t(e){"@babel/helpers - typeof";return _t=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},_t(e)}var TT=Symbol.for("react.element"),PT=Symbol.for("react.transitional.element"),OT=Symbol.for("react.fragment");function _2(e){return e&&_t(e)==="object"&&(e.$$typeof===TT||e.$$typeof===PT)&&e.type===OT}function mi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[];return J.Children.forEach(e,function(r){r==null&&!t.keepEmpty||(Array.isArray(r)?n=n.concat(mi(r)):_2(r)&&r.props?n=n.concat(mi(r.props.children,t)):n.push(r))}),n}var uv={},IT=function(t){};function NT(e,t){}function MT(e,t){}function zT(){uv={}}function S2(e,t,n){!t&&!uv[n]&&(e(!1,n),uv[n]=!0)}function Ar(e,t){S2(NT,e,t)}function jT(e,t){S2(MT,e,t)}Ar.preMessage=IT;Ar.resetWarned=zT;Ar.noteOnce=jT;function BT(e,t){if(_t(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_t(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function C2(e){var t=BT(e,"string");return _t(t)=="symbol"?t:t+""}function K(e,t,n){return(t=C2(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function X(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?a1(Object(n),!0).forEach(function(r){K(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Js=b2();const dv=ju(Js),LT=y2({__proto__:null,default:dv},[Js]);function pu(e){return e instanceof HTMLElement||e instanceof SVGElement}function AT(e){return e&&_t(e)==="object"&&pu(e.nativeElement)?e.nativeElement:pu(e)?e:null}function $h(e){var t=AT(e);if(t)return t;if(e instanceof J.Component){var n;return(n=dv.findDOMNode)===null||n===void 0?void 0:n.call(dv,e)}return null}var ig={exports:{}},$n={};/**
45
+ * @license React
46
+ * react-is.production.min.js
47
+ *
48
+ * Copyright (c) Facebook, Inc. and its affiliates.
49
+ *
50
+ * This source code is licensed under the MIT license found in the
51
+ * LICENSE file in the root directory of this source tree.
52
+ */var l1;function DT(){if(l1)return $n;l1=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),y;y=Symbol.for("react.module.reference");function S(_){if(typeof _=="object"&&_!==null){var C=_.$$typeof;switch(C){case e:switch(_=_.type,_){case n:case i:case r:case d:case f:return _;default:switch(_=_&&_.$$typeof,_){case c:case a:case u:case g:case m:case o:return _;default:return C}}case t:return C}}}return $n.ContextConsumer=a,$n.ContextProvider=o,$n.Element=e,$n.ForwardRef=u,$n.Fragment=n,$n.Lazy=g,$n.Memo=m,$n.Portal=t,$n.Profiler=i,$n.StrictMode=r,$n.Suspense=d,$n.SuspenseList=f,$n.isAsyncMode=function(){return!1},$n.isConcurrentMode=function(){return!1},$n.isContextConsumer=function(_){return S(_)===a},$n.isContextProvider=function(_){return S(_)===o},$n.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===e},$n.isForwardRef=function(_){return S(_)===u},$n.isFragment=function(_){return S(_)===n},$n.isLazy=function(_){return S(_)===g},$n.isMemo=function(_){return S(_)===m},$n.isPortal=function(_){return S(_)===t},$n.isProfiler=function(_){return S(_)===i},$n.isStrictMode=function(_){return S(_)===r},$n.isSuspense=function(_){return S(_)===d},$n.isSuspenseList=function(_){return S(_)===f},$n.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===n||_===i||_===r||_===d||_===f||_===v||typeof _=="object"&&_!==null&&(_.$$typeof===g||_.$$typeof===m||_.$$typeof===o||_.$$typeof===a||_.$$typeof===u||_.$$typeof===y||_.getModuleId!==void 0)},$n.typeOf=S,$n}var c1;function HT(){return c1||(c1=1,ig.exports=DT()),ig.exports}var og=HT();function Bu(e,t,n){var r=h.useRef({});return(!("value"in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}var FT=Number(h.version.split(".")[0]),dy=function(t,n){typeof t=="function"?t(n):_t(t)==="object"&&t&&"current"in t&&(t.current=n)},mo=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.filter(Boolean);return i.length<=1?i[0]:function(o){n.forEach(function(a){dy(a,o)})}},Jo=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Bu(function(){return mo.apply(void 0,n)},n,function(i,o){return i.length!==o.length||i.every(function(a,c){return a!==o[c]})})},ra=function(t){var n,r;if(!t)return!1;if(hy(t)&&FT>=19)return!0;var i=og.isMemo(t)?t.type.type:t.type;return!(typeof i=="function"&&!((n=i.prototype)!==null&&n!==void 0&&n.render)&&i.$$typeof!==og.ForwardRef||typeof t=="function"&&!((r=t.prototype)!==null&&r!==void 0&&r.render)&&t.$$typeof!==og.ForwardRef)};function hy(e){return h.isValidElement(e)&&!_2(e)}var WT=function(t){return hy(t)&&ra(t)},Aa=function(t){if(t&&hy(t)){var n=t;return n.props.propertyIsEnumerable("ref")?n.props.ref:n.ref}return null},hv=h.createContext(null);function VT(e){var t=e.children,n=e.onBatchResize,r=h.useRef(0),i=h.useRef([]),o=h.useContext(hv),a=h.useCallback(function(c,u,d){r.current+=1;var f=r.current;i.current.push({size:c,element:u,data:d}),Promise.resolve().then(function(){f===r.current&&(n==null||n(i.current),i.current=[])}),o==null||o(c,u,d)},[n,o]);return h.createElement(hv.Provider,{value:a},t)}var w2=(function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(i,o){return i[0]===n?(r=o,!0):!1}),r}return(function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var r=e(this.__entries__,n),i=this.__entries__[r];return i&&i[1]},t.prototype.set=function(n,r){var i=e(this.__entries__,n);~i?this.__entries__[i][1]=r:this.__entries__.push([n,r])},t.prototype.delete=function(n){var r=this.__entries__,i=e(r,n);~i&&r.splice(i,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var i=0,o=this.__entries__;i<o.length;i++){var a=o[i];n.call(r,a[1],a[0])}},t})()})(),fv=typeof window<"u"&&typeof document<"u"&&window.document===document,Xh=(function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()})(),UT=(function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Xh):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}})(),qT=2;function KT(e,t){var n=!1,r=!1,i=0;function o(){n&&(n=!1,e()),r&&c()}function a(){UT(o)}function c(){var u=Date.now();if(n){if(u-i<qT)return;r=!0}else n=!0,r=!1,setTimeout(a,t);i=u}return c}var GT=20,XT=["top","right","bottom","left","width","height","size","weight"],YT=typeof MutationObserver<"u",JT=(function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=KT(this.refresh.bind(this),GT)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var n=this.observers_,r=n.indexOf(t);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return t.forEach(function(n){return n.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!fv||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),YT?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!fv||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,r=n===void 0?"":n,i=XT.some(function(o){return!!~r.indexOf(o)});i&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e})(),x2=(function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e}),ql=(function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||Xh}),E2=Mf(0,0,0,0);function Yh(e){return parseFloat(e)||0}function u1(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(r,i){var o=e["border-"+i+"-width"];return r+Yh(o)},0)}function QT(e){for(var t=["top","right","bottom","left"],n={},r=0,i=t;r<i.length;r++){var o=i[r],a=e["padding-"+o];n[o]=Yh(a)}return n}function ZT(e){var t=e.getBBox();return Mf(0,0,t.width,t.height)}function e5(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return E2;var r=ql(e).getComputedStyle(e),i=QT(r),o=i.left+i.right,a=i.top+i.bottom,c=Yh(r.width),u=Yh(r.height);if(r.boxSizing==="border-box"&&(Math.round(c+o)!==t&&(c-=u1(r,"left","right")+o),Math.round(u+a)!==n&&(u-=u1(r,"top","bottom")+a)),!n5(e)){var d=Math.round(c+o)-t,f=Math.round(u+a)-n;Math.abs(d)!==1&&(c-=d),Math.abs(f)!==1&&(u-=f)}return Mf(i.left,i.top,c,u)}var t5=(function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof ql(e).SVGGraphicsElement}:function(e){return e instanceof ql(e).SVGElement&&typeof e.getBBox=="function"}})();function n5(e){return e===ql(e).document.documentElement}function r5(e){return fv?t5(e)?ZT(e):e5(e):E2}function i5(e){var t=e.x,n=e.y,r=e.width,i=e.height,o=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,a=Object.create(o.prototype);return x2(a,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),a}function Mf(e,t,n,r){return{x:e,y:t,width:n,height:r}}var o5=(function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Mf(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=r5(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e})(),s5=(function(){function e(t,n){var r=i5(n);x2(this,{target:t,contentRect:r})}return e})(),a5=(function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new w2,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=r}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof ql(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new o5(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof ql(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new s5(r.target,r.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e})(),k2=typeof WeakMap<"u"?new WeakMap:new w2,$2=(function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=JT.getInstance(),r=new a5(t,n,this);k2.set(this,r)}return e})();["observe","unobserve","disconnect"].forEach(function(e){$2.prototype[e]=function(){var t;return(t=k2.get(this))[e].apply(t,arguments)}});var l5=(function(){return typeof Xh.ResizeObserver<"u"?Xh.ResizeObserver:$2})(),Us=new Map;function c5(e){e.forEach(function(t){var n,r=t.target;(n=Us.get(r))===null||n===void 0||n.forEach(function(i){return i(r)})})}var R2=new l5(c5);function u5(e,t){Us.has(e)||(Us.set(e,new Set),R2.observe(e)),Us.get(e).add(t)}function d5(e,t){Us.has(e)&&(Us.get(e).delete(t),Us.get(e).size||(R2.unobserve(e),Us.delete(e)))}function yr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d1(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,C2(r.key),r)}}function br(e,t,n){return t&&d1(e.prototype,t),n&&d1(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function gu(e,t){return gu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},gu(e,t)}function gs(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:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gu(e,t)}function vu(e){return vu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},vu(e)}function fy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fy=function(){return!!e})()}function Zt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h5(e,t){if(t&&(_t(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Zt(e)}function vs(e){var t=fy();return function(){var n,r=vu(e);if(t){var i=vu(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h5(this,n)}}var f5=(function(e){gs(n,e);var t=vs(n);function n(){return yr(this,n),t.apply(this,arguments)}return br(n,[{key:"render",value:function(){return this.props.children}}]),n})(h.Component);function m5(e,t){var n=e.children,r=e.disabled,i=h.useRef(null),o=h.useRef(null),a=h.useContext(hv),c=typeof n=="function",u=c?n(i):n,d=h.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),f=!c&&h.isValidElement(u)&&ra(u),m=f?Aa(u):null,g=Jo(m,i),v=function(){var C;return $h(i.current)||(i.current&&_t(i.current)==="object"?$h((C=i.current)===null||C===void 0?void 0:C.nativeElement):null)||$h(o.current)};h.useImperativeHandle(t,function(){return v()});var y=h.useRef(e);y.current=e;var S=h.useCallback(function(_){var C=y.current,E=C.onResize,k=C.data,$=_.getBoundingClientRect(),P=$.width,T=$.height,O=_.offsetWidth,N=_.offsetHeight,I=Math.floor(P),z=Math.floor(T);if(d.current.width!==I||d.current.height!==z||d.current.offsetWidth!==O||d.current.offsetHeight!==N){var L={width:I,height:z,offsetWidth:O,offsetHeight:N};d.current=L;var M=O===Math.round(P)?P:O,j=N===Math.round(T)?T:N,B=X(X({},L),{},{offsetWidth:M,offsetHeight:j});a==null||a(B,_,k),E&&Promise.resolve().then(function(){E(B,_)})}},[]);return h.useEffect(function(){var _=v();return _&&!r&&u5(_,S),function(){return d5(_,S)}},[i.current,r]),h.createElement(f5,{ref:o},f?h.cloneElement(u,{ref:g}):u)}var p5=h.forwardRef(m5),g5="rc-observer-key";function v5(e,t){var n=e.children,r=typeof n=="function"?[n]:mi(n);return r.map(function(i,o){var a=(i==null?void 0:i.key)||"".concat(g5,"-").concat(o);return h.createElement(p5,Re({},e,{key:a,ref:o===0?t:void 0}),i)})}var co=h.forwardRef(v5);co.Collection=VT;function mv(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 y5(e){if(Array.isArray(e))return mv(e)}function T2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function my(e,t){if(e){if(typeof e=="string")return mv(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)?mv(e,t):void 0}}function b5(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
53
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function We(e){return y5(e)||T2(e)||my(e)||b5()}var P2=function(t){return+setTimeout(t,16)},O2=function(t){return clearTimeout(t)};typeof window<"u"&&"requestAnimationFrame"in window&&(P2=function(t){return window.requestAnimationFrame(t)},O2=function(t){return window.cancelAnimationFrame(t)});var h1=0,py=new Map;function I2(e){py.delete(e)}var Tn=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;h1+=1;var r=h1;function i(o){if(o===0)I2(r),t();else{var a=P2(function(){i(o-1)});py.set(r,a)}}return i(n),r};Tn.cancel=function(e){var t=py.get(e);return I2(e),O2(t)};function N2(e){if(Array.isArray(e))return e}function _5(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,a,c=[],u=!0,d=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);u=!0);}catch(f){d=!0,i=f}finally{try{if(!u&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw i}}return c}}function M2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
54
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function se(e,t){return N2(e)||_5(e,t)||my(e,t)||M2()}function yu(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=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(i){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 si(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function pv(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}var f1="data-rc-order",m1="data-rc-priority",S5="rc-util-key",gv=new Map;function z2(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):S5}function zf(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function C5(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function gy(e){return Array.from((gv.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function j2(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!si())return null;var n=t.csp,r=t.prepend,i=t.priority,o=i===void 0?0:i,a=C5(r),c=a==="prependQueue",u=document.createElement("style");u.setAttribute(f1,a),c&&o&&u.setAttribute(m1,"".concat(o)),n!=null&&n.nonce&&(u.nonce=n==null?void 0:n.nonce),u.innerHTML=e;var d=zf(t),f=d.firstChild;if(r){if(c){var m=(t.styles||gy(d)).filter(function(g){if(!["prepend","prependQueue"].includes(g.getAttribute(f1)))return!1;var v=Number(g.getAttribute(m1)||0);return o>=v});if(m.length)return d.insertBefore(u,m[m.length-1].nextSibling),u}d.insertBefore(u,f)}else d.appendChild(u);return u}function B2(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=zf(t);return(t.styles||gy(n)).find(function(r){return r.getAttribute(z2(t))===e})}function bu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=B2(e,t);if(n){var r=zf(t);r.removeChild(n)}}function w5(e,t){var n=gv.get(e);if(!n||!pv(document,n)){var r=j2("",t),i=r.parentNode;gv.set(e,i),e.removeChild(r)}}function ps(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=zf(n),i=gy(r),o=X(X({},n),{},{styles:i});w5(r,o);var a=B2(t,o);if(a){var c,u;if((c=o.csp)!==null&&c!==void 0&&c.nonce&&a.nonce!==((u=o.csp)===null||u===void 0?void 0:u.nonce)){var d;a.nonce=(d=o.csp)===null||d===void 0?void 0:d.nonce}return a.innerHTML!==e&&(a.innerHTML=e),a}var f=j2(e,o);return f.setAttribute(z2(o),t),f}function x5(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 Lt(e,t){if(e==null)return{};var n,r,i=x5(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _u(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=new Set;function i(o,a){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,u=r.has(o);if(Ar(!u,"Warning: There may be circular references"),u)return!1;if(o===a)return!0;if(n&&c>1)return!1;r.add(o);var d=c+1;if(Array.isArray(o)){if(!Array.isArray(a)||o.length!==a.length)return!1;for(var f=0;f<o.length;f++)if(!i(o[f],a[f],d))return!1;return!0}if(o&&a&&_t(o)==="object"&&_t(a)==="object"){var m=Object.keys(o);return m.length!==Object.keys(a).length?!1:m.every(function(g){return i(o[g],a[g],d)})}return!1}return i(e,t)}var E5="%";function vv(e){return e.join(E5)}var k5=(function(){function e(t){yr(this,e),K(this,"instanceId",void 0),K(this,"cache",new Map),K(this,"extracted",new Set),this.instanceId=t}return br(e,[{key:"get",value:function(n){return this.opGet(vv(n))}},{key:"opGet",value:function(n){return this.cache.get(n)||null}},{key:"update",value:function(n,r){return this.opUpdate(vv(n),r)}},{key:"opUpdate",value:function(n,r){var i=this.cache.get(n),o=r(i);o===null?this.cache.delete(n):this.cache.set(n,o)}}]),e})(),Kl="data-token-hash",To="data-css-hash",qs="__cssinjs_instance__";function $5(){var e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(To,"]"))||[],n=document.head.firstChild;Array.from(t).forEach(function(i){i[qs]=i[qs]||e,i[qs]===e&&document.head.insertBefore(i,n)});var r={};Array.from(document.querySelectorAll("style[".concat(To,"]"))).forEach(function(i){var o=i.getAttribute(To);if(r[o]){if(i[qs]===e){var a;(a=i.parentNode)===null||a===void 0||a.removeChild(i)}}else r[o]=!0})}return new k5(e)}var Lu=h.createContext({hashPriority:"low",cache:$5(),defaultCache:!0});function R5(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var vy=(function(){function e(){yr(this,e),K(this,"cache",void 0),K(this,"keys",void 0),K(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return br(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(n){var r,i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a={map:this.cache};return n.forEach(function(c){if(!a)a=void 0;else{var u;a=(u=a)===null||u===void 0||(u=u.map)===null||u===void 0?void 0:u.get(c)}}),(r=a)!==null&&r!==void 0&&r.value&&o&&(a.value[1]=this.cacheCallTimes++),(i=a)===null||i===void 0?void 0:i.value}},{key:"get",value:function(n){var r;return(r=this.internalGet(n,!0))===null||r===void 0?void 0:r[0]}},{key:"has",value:function(n){return!!this.internalGet(n)}},{key:"set",value:function(n,r){var i=this;if(!this.has(n)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var o=this.keys.reduce(function(d,f){var m=se(d,2),g=m[1];return i.internalGet(f)[1]<g?[f,i.internalGet(f)[1]]:d},[this.keys[0],this.cacheCallTimes]),a=se(o,1),c=a[0];this.delete(c)}this.keys.push(n)}var u=this.cache;n.forEach(function(d,f){if(f===n.length-1)u.set(d,{value:[r,i.cacheCallTimes++]});else{var m=u.get(d);m?m.map||(m.map=new Map):u.set(d,{map:new Map}),u=u.get(d).map}})}},{key:"deleteByPath",value:function(n,r){var i=n.get(r[0]);if(r.length===1){var o;return i.map?n.set(r[0],{map:i.map}):n.delete(r[0]),(o=i.value)===null||o===void 0?void 0:o[0]}var a=this.deleteByPath(i.map,r.slice(1));return(!i.map||i.map.size===0)&&!i.value&&n.delete(r[0]),a}},{key:"delete",value:function(n){if(this.has(n))return this.keys=this.keys.filter(function(r){return!R5(r,n)}),this.deleteByPath(this.cache,n)}}]),e})();K(vy,"MAX_CACHE_SIZE",20);K(vy,"MAX_CACHE_OFFSET",5);var p1=0,L2=(function(){function e(t){yr(this,e),K(this,"derivatives",void 0),K(this,"id",void 0),this.derivatives=Array.isArray(t)?t:[t],this.id=p1,t.length===0&&(t.length>0,void 0),p1+=1}return br(e,[{key:"getDerivativeToken",value:function(n){return this.derivatives.reduce(function(r,i){return i(n,r)},void 0)}}]),e})(),sg=new vy;function yv(e){var t=Array.isArray(e)?e:[e];return sg.has(t)||sg.set(t,new L2(t)),sg.get(t)}var T5=new WeakMap,ag={};function P5(e,t){for(var n=T5,r=0;r<t.length;r+=1){var i=t[r];n.has(i)||n.set(i,new WeakMap),n=n.get(i)}return n.has(ag)||n.set(ag,e()),n.get(ag)}var g1=new WeakMap;function uu(e){var t=g1.get(e)||"";return t||(Object.keys(e).forEach(function(n){var r=e[n];t+=n,r instanceof L2?t+=r.id:r&&_t(r)==="object"?t+=uu(r):t+=r}),t=yu(t),g1.set(e,t)),t}function v1(e,t){return yu("".concat(t,"_").concat(uu(e)))}var bv=si();function te(e){return typeof e=="number"?"".concat(e,"px"):e}function Jh(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(i)return e;var o=X(X({},r),{},K(K({},Kl,t),To,n)),a=Object.keys(o).map(function(c){var u=o[c];return u?"".concat(c,'="').concat(u,'"'):null}).filter(function(c){return c}).join(" ");return"<style ".concat(a,">").concat(e,"</style>")}var Rh=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"--".concat(n?"".concat(n,"-"):"").concat(t).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()},O5=function(t,n,r){return Object.keys(t).length?".".concat(n).concat(r!=null&&r.scope?".".concat(r.scope):"","{").concat(Object.entries(t).map(function(i){var o=se(i,2),a=o[0],c=o[1];return"".concat(a,":").concat(c,";")}).join(""),"}"):""},A2=function(t,n,r){var i={},o={};return Object.entries(t).forEach(function(a){var c,u,d=se(a,2),f=d[0],m=d[1];if(r!=null&&(c=r.preserve)!==null&&c!==void 0&&c[f])o[f]=m;else if((typeof m=="string"||typeof m=="number")&&!(r!=null&&(u=r.ignore)!==null&&u!==void 0&&u[f])){var g,v=Rh(f,r==null?void 0:r.prefix);i[v]=typeof m=="number"&&!(r!=null&&(g=r.unitless)!==null&&g!==void 0&&g[f])?"".concat(m,"px"):String(m),o[f]="var(".concat(v,")")}}),[o,O5(i,n,{scope:r==null?void 0:r.scope})]},y1=si()?h.useLayoutEffect:h.useEffect,fn=function(t,n){var r=h.useRef(!0);y1(function(){return t(r.current)},n),y1(function(){return r.current=!1,function(){r.current=!0}},[])},_v=function(t,n){fn(function(r){if(!r)return t()},n)},I5=X({},Nf),b1=I5.useInsertionEffect,N5=function(t,n,r){h.useMemo(t,r),fn(function(){return n(!0)},r)},M5=b1?function(e,t,n){return b1(function(){return e(),t()},n)}:N5,z5=X({},Nf),j5=z5.useInsertionEffect,B5=function(t){var n=[],r=!1;function i(o){r||n.push(o)}return h.useEffect(function(){return r=!1,function(){r=!0,n.length&&n.forEach(function(o){return o()})}},t),i},L5=function(){return function(t){t()}},A5=typeof j5<"u"?B5:L5;function yy(e,t,n,r,i){var o=h.useContext(Lu),a=o.cache,c=[e].concat(We(t)),u=vv(c),d=A5([u]),f=function(y){a.opUpdate(u,function(S){var _=S||[void 0,void 0],C=se(_,2),E=C[0],k=E===void 0?0:E,$=C[1],P=$,T=P||n(),O=[k,T];return y?y(O):O})};h.useMemo(function(){f()},[u]);var m=a.opGet(u),g=m[1];return M5(function(){i==null||i(g)},function(v){return f(function(y){var S=se(y,2),_=S[0],C=S[1];return v&&_===0&&(i==null||i(g)),[_+1,C]}),function(){a.opUpdate(u,function(y){var S=y||[],_=se(S,2),C=_[0],E=C===void 0?0:C,k=_[1],$=E-1;return $===0?(d(function(){(v||!a.opGet(u))&&(r==null||r(k,!1))}),null):[E-1,k]})}},[u]),g}var D5={},H5="css",Sa=new Map;function F5(e){Sa.set(e,(Sa.get(e)||0)+1)}function W5(e,t){if(typeof document<"u"){var n=document.querySelectorAll("style[".concat(Kl,'="').concat(e,'"]'));n.forEach(function(r){if(r[qs]===t){var i;(i=r.parentNode)===null||i===void 0||i.removeChild(r)}})}}var V5=0;function U5(e,t){Sa.set(e,(Sa.get(e)||0)-1);var n=new Set;Sa.forEach(function(r,i){r<=0&&n.add(i)}),Sa.size-n.size>V5&&n.forEach(function(r){W5(r,t),Sa.delete(r)})}var q5=function(t,n,r,i){var o=r.getDerivativeToken(t),a=X(X({},o),n);return i&&(a=i(a)),a},D2="token";function K5(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=h.useContext(Lu),i=r.cache.instanceId,o=r.container,a=n.salt,c=a===void 0?"":a,u=n.override,d=u===void 0?D5:u,f=n.formatToken,m=n.getComputedToken,g=n.cssVar,v=P5(function(){return Object.assign.apply(Object,[{}].concat(We(t)))},t),y=uu(v),S=uu(d),_=g?uu(g):"",C=yy(D2,[c,e.id,y,S,_],function(){var E,k=m?m(v,d,e):q5(v,d,e,f),$=X({},k),P="";if(g){var T=A2(k,g.key,{prefix:g.prefix,ignore:g.ignore,unitless:g.unitless,preserve:g.preserve}),O=se(T,2);k=O[0],P=O[1]}var N=v1(k,c);k._tokenKey=N,$._tokenKey=v1($,c);var I=(E=g==null?void 0:g.key)!==null&&E!==void 0?E:N;k._themeKey=I,F5(I);var z="".concat(H5,"-").concat(yu(N));return k._hashId=z,[k,z,$,P,(g==null?void 0:g.key)||""]},function(E){U5(E[0]._themeKey,i)},function(E){var k=se(E,4),$=k[0],P=k[3];if(g&&P){var T=ps(P,yu("css-variables-".concat($._themeKey)),{mark:To,prepend:"queue",attachTo:o,priority:-999});T[qs]=i,T.setAttribute(Kl,$._themeKey)}});return C}var G5=function(t,n,r){var i=se(t,5),o=i[2],a=i[3],c=i[4],u=r||{},d=u.plain;if(!a)return null;var f=o._tokenKey,m=-999,g={"data-rc-order":"prependQueue","data-rc-priority":"".concat(m)},v=Jh(a,c,f,g,d);return[m,f,v]},X5={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},H2="comm",F2="rule",W2="decl",Y5="@import",J5="@namespace",Q5="@keyframes",Z5="@layer",V2=Math.abs,by=String.fromCharCode;function U2(e){return e.trim()}function Th(e,t,n){return e.replace(t,n)}function eP(e,t,n){return e.indexOf(t,n)}function Hl(e,t){return e.charCodeAt(t)|0}function Gl(e,t,n){return e.slice(t,n)}function Fo(e){return e.length}function tP(e){return e.length}function rh(e,t){return t.push(e),e}var jf=1,Xl=1,q2=0,ho=0,gr=0,nc="";function _y(e,t,n,r,i,o,a,c){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:jf,column:Xl,length:a,return:"",siblings:c}}function nP(){return gr}function rP(){return gr=ho>0?Hl(nc,--ho):0,Xl--,gr===10&&(Xl=1,jf--),gr}function Po(){return gr=ho<q2?Hl(nc,ho++):0,Xl++,gr===10&&(Xl=1,jf++),gr}function Ks(){return Hl(nc,ho)}function Ph(){return ho}function Bf(e,t){return Gl(nc,e,t)}function Su(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 iP(e){return jf=Xl=1,q2=Fo(nc=e),ho=0,[]}function oP(e){return nc="",e}function lg(e){return U2(Bf(ho-1,Sv(e===91?e+2:e===40?e+1:e)))}function sP(e){for(;(gr=Ks())&&gr<33;)Po();return Su(e)>2||Su(gr)>3?"":" "}function aP(e,t){for(;--t&&Po()&&!(gr<48||gr>102||gr>57&&gr<65||gr>70&&gr<97););return Bf(e,Ph()+(t<6&&Ks()==32&&Po()==32))}function Sv(e){for(;Po();)switch(gr){case e:return ho;case 34:case 39:e!==34&&e!==39&&Sv(gr);break;case 40:e===41&&Sv(e);break;case 92:Po();break}return ho}function lP(e,t){for(;Po()&&e+gr!==57;)if(e+gr===84&&Ks()===47)break;return"/*"+Bf(t,ho-1)+"*"+by(e===47?e:Po())}function cP(e){for(;!Su(Ks());)Po();return Bf(e,ho)}function uP(e){return oP(Oh("",null,null,null,[""],e=iP(e),0,[0],e))}function Oh(e,t,n,r,i,o,a,c,u){for(var d=0,f=0,m=a,g=0,v=0,y=0,S=1,_=1,C=1,E=0,k="",$=i,P=o,T=r,O=k;_;)switch(y=E,E=Po()){case 40:if(y!=108&&Hl(O,m-1)==58){eP(O+=Th(lg(E),"&","&\f"),"&\f",V2(d?c[d-1]:0))!=-1&&(C=-1);break}case 34:case 39:case 91:O+=lg(E);break;case 9:case 10:case 13:case 32:O+=sP(y);break;case 92:O+=aP(Ph()-1,7);continue;case 47:switch(Ks()){case 42:case 47:rh(dP(lP(Po(),Ph()),t,n,u),u),(Su(y||1)==5||Su(Ks()||1)==5)&&Fo(O)&&Gl(O,-1,void 0)!==" "&&(O+=" ");break;default:O+="/"}break;case 123*S:c[d++]=Fo(O)*C;case 125*S:case 59:case 0:switch(E){case 0:case 125:_=0;case 59+f:C==-1&&(O=Th(O,/\f/g,"")),v>0&&(Fo(O)-m||S===0&&y===47)&&rh(v>32?S1(O+";",r,n,m-1,u):S1(Th(O," ","")+";",r,n,m-2,u),u);break;case 59:O+=";";default:if(rh(T=_1(O,t,n,d,f,i,c,k,$=[],P=[],m,o),o),E===123)if(f===0)Oh(O,t,T,T,$,o,m,c,P);else{switch(g){case 99:if(Hl(O,3)===110)break;case 108:if(Hl(O,2)===97)break;default:f=0;case 100:case 109:case 115:}f?Oh(e,T,T,r&&rh(_1(e,T,T,0,0,i,c,k,i,$=[],m,P),P),i,P,m,c,r?$:P):Oh(O,T,T,T,[""],P,0,c,P)}}d=f=v=0,S=C=1,k=O="",m=a;break;case 58:m=1+Fo(O),v=y;default:if(S<1){if(E==123)--S;else if(E==125&&S++==0&&rP()==125)continue}switch(O+=by(E),E*S){case 38:C=f>0?1:(O+="\f",-1);break;case 44:c[d++]=(Fo(O)-1)*C,C=1;break;case 64:Ks()===45&&(O+=lg(Po())),g=Ks(),f=m=Fo(k=O+=cP(Ph())),E++;break;case 45:y===45&&Fo(O)==2&&(S=0)}}return o}function _1(e,t,n,r,i,o,a,c,u,d,f,m){for(var g=i-1,v=i===0?o:[""],y=tP(v),S=0,_=0,C=0;S<r;++S)for(var E=0,k=Gl(e,g+1,g=V2(_=a[S])),$=e;E<y;++E)($=U2(_>0?v[E]+" "+k:Th(k,/&\f/g,v[E])))&&(u[C++]=$);return _y(e,t,n,i===0?F2:c,u,d,f,m)}function dP(e,t,n,r){return _y(e,t,n,H2,by(nP()),Gl(e,2,-2),0,r)}function S1(e,t,n,r,i){return _y(e,t,n,W2,Gl(e,0,r),Gl(e,r+1,-1),r,i)}function Cv(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function hP(e,t,n,r){switch(e.type){case Z5:if(e.children.length)break;case Y5:case J5:case W2:return e.return=e.return||e.value;case H2:return"";case Q5:return e.return=e.value+"{"+Cv(e.children,r)+"}";case F2:if(!Fo(e.value=e.props.join(",")))return""}return Fo(n=Cv(e.children,r))?e.return=e.value+"{"+n+"}":""}var C1="data-ant-cssinjs-cache-path",K2="_FILE_STYLE__",$a,G2=!0;function fP(){if(!$a&&($a={},si())){var e=document.createElement("div");e.className=C1,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);var t=getComputedStyle(e).content||"";t=t.replace(/^"/,"").replace(/"$/,""),t.split(";").forEach(function(i){var o=i.split(":"),a=se(o,2),c=a[0],u=a[1];$a[c]=u});var n=document.querySelector("style[".concat(C1,"]"));if(n){var r;G2=!1,(r=n.parentNode)===null||r===void 0||r.removeChild(n)}document.body.removeChild(e)}}function mP(e){return fP(),!!$a[e]}function pP(e){var t=$a[e],n=null;if(t&&si())if(G2)n=K2;else{var r=document.querySelector("style[".concat(To,'="').concat($a[e],'"]'));r?n=r.innerHTML:delete $a[e]}return[n,t]}var gP="_skip_check_",X2="_multi_value_";function Ih(e){var t=Cv(uP(e),hP);return t.replace(/\{%%%\:[^;];}/g,";")}function vP(e){return _t(e)==="object"&&e&&(gP in e||X2 in e)}function w1(e,t,n){if(!t)return e;var r=".".concat(t),i=n==="low"?":where(".concat(r,")"):r,o=e.split(",").map(function(a){var c,u=a.trim().split(/\s+/),d=u[0]||"",f=((c=d.match(/^\w+/))===null||c===void 0?void 0:c[0])||"";return d="".concat(f).concat(i).concat(d.slice(f.length)),[d].concat(We(u.slice(1))).join(" ")});return o.join(",")}var yP=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},i=r.root,o=r.injectHash,a=r.parentSelectors,c=n.hashId,u=n.layer;n.path;var d=n.hashPriority,f=n.transformers,m=f===void 0?[]:f;n.linters;var g="",v={};function y(C){var E=C.getName(c);if(!v[E]){var k=e(C.style,n,{root:!1,parentSelectors:a}),$=se(k,1),P=$[0];v[E]="@keyframes ".concat(C.getName(c)).concat(P)}}function S(C){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return C.forEach(function(k){Array.isArray(k)?S(k,E):k&&E.push(k)}),E}var _=S(Array.isArray(t)?t:[t]);return _.forEach(function(C){var E=typeof C=="string"&&!i?{}:C;if(typeof E=="string")g+="".concat(E,`
55
+ `);else if(E._keyframe)y(E);else{var k=m.reduce(function($,P){var T;return(P==null||(T=P.visit)===null||T===void 0?void 0:T.call(P,$))||$},E);Object.keys(k).forEach(function($){var P=k[$];if(_t(P)==="object"&&P&&($!=="animationName"||!P._keyframe)&&!vP(P)){var T=!1,O=$.trim(),N=!1;(i||o)&&c?O.startsWith("@")?T=!0:O==="&"?O=w1("",c,d):O=w1($,c,d):i&&!c&&(O==="&"||O==="")&&(O="",N=!0);var I=e(P,n,{root:N,injectHash:T,parentSelectors:[].concat(We(a),[O])}),z=se(I,2),L=z[0],M=z[1];v=X(X({},v),M),g+="".concat(O).concat(L)}else{let H=function(W,V){var A=W.replace(/[A-Z]/g,function(q){return"-".concat(q.toLowerCase())}),G=V;!X5[W]&&typeof G=="number"&&G!==0&&(G="".concat(G,"px")),W==="animationName"&&V!==null&&V!==void 0&&V._keyframe&&(y(V),G=V.getName(c)),g+="".concat(A,":").concat(G,";")};var j,B=(j=P==null?void 0:P.value)!==null&&j!==void 0?j:P;_t(P)==="object"&&P!==null&&P!==void 0&&P[X2]&&Array.isArray(B)?B.forEach(function(W){H($,W)}):H($,B)}})}}),i?u&&(g&&(g="@layer ".concat(u.name," {").concat(g,"}")),u.dependencies&&(v["@layer ".concat(u.name)]=u.dependencies.map(function(C){return"@layer ".concat(C,", ").concat(u.name,";")}).join(`
56
+ `))):g="{".concat(g,"}"),[g,v]};function Y2(e,t){return yu("".concat(e.join("%")).concat(t))}function bP(){return null}var J2="style";function wv(e,t){var n=e.token,r=e.path,i=e.hashId,o=e.layer,a=e.nonce,c=e.clientOnly,u=e.order,d=u===void 0?0:u,f=h.useContext(Lu),m=f.autoClear;f.mock;var g=f.defaultCache,v=f.hashPriority,y=f.container,S=f.ssrInline,_=f.transformers,C=f.linters,E=f.cache,k=f.layer,$=n._tokenKey,P=[$];k&&P.push("layer"),P.push.apply(P,We(r));var T=bv,O=yy(J2,P,function(){var M=P.join("|");if(mP(M)){var j=pP(M),B=se(j,2),H=B[0],W=B[1];if(H)return[H,$,W,{},c,d]}var V=t(),A=yP(V,{hashId:i,hashPriority:v,layer:k?o:void 0,path:r.join("-"),transformers:_,linters:C}),G=se(A,2),q=G[0],D=G[1],U=Ih(q),Y=Y2(P,U);return[U,$,Y,D,c,d]},function(M,j){var B=se(M,3),H=B[2];(j||m)&&bv&&bu(H,{mark:To,attachTo:y})},function(M){var j=se(M,4),B=j[0];j[1];var H=j[2],W=j[3];if(T&&B!==K2){var V={mark:To,prepend:k?!1:"queue",attachTo:y,priority:d},A=typeof a=="function"?a():a;A&&(V.csp={nonce:A});var G=[],q=[];Object.keys(W).forEach(function(U){U.startsWith("@layer")?G.push(U):q.push(U)}),G.forEach(function(U){ps(Ih(W[U]),"_layer-".concat(U),X(X({},V),{},{prepend:!0}))});var D=ps(B,H,V);D[qs]=E.instanceId,D.setAttribute(Kl,$),q.forEach(function(U){ps(Ih(W[U]),"_effect-".concat(U),V)})}}),N=se(O,3),I=N[0],z=N[1],L=N[2];return function(M){var j;return!S||T||!g?j=h.createElement(bP,null):j=h.createElement("style",Re({},K(K({},Kl,z),To,L),{dangerouslySetInnerHTML:{__html:I}})),h.createElement(h.Fragment,null,j,M)}}var _P=function(t,n,r){var i=se(t,6),o=i[0],a=i[1],c=i[2],u=i[3],d=i[4],f=i[5],m=r||{},g=m.plain;if(d)return null;var v=o,y={"data-rc-order":"prependQueue","data-rc-priority":"".concat(f)};return v=Jh(o,a,c,y,g),u&&Object.keys(u).forEach(function(S){if(!n[S]){n[S]=!0;var _=Ih(u[S]),C=Jh(_,a,"_effect-".concat(S),y,g);S.startsWith("@layer")?v=C+v:v+=C}}),[f,c,v]},Q2="cssVar",SP=function(t,n){var r=t.key,i=t.prefix,o=t.unitless,a=t.ignore,c=t.token,u=t.scope,d=u===void 0?"":u,f=h.useContext(Lu),m=f.cache.instanceId,g=f.container,v=c._tokenKey,y=[].concat(We(t.path),[r,d,v]),S=yy(Q2,y,function(){var _=n(),C=A2(_,r,{prefix:i,unitless:o,ignore:a,scope:d}),E=se(C,2),k=E[0],$=E[1],P=Y2(y,$);return[k,$,P,r]},function(_){var C=se(_,3),E=C[2];bv&&bu(E,{mark:To,attachTo:g})},function(_){var C=se(_,3),E=C[1],k=C[2];if(E){var $=ps(E,k,{mark:To,prepend:"queue",attachTo:g,priority:-999});$[qs]=m,$.setAttribute(Kl,r)}});return S},CP=function(t,n,r){var i=se(t,4),o=i[1],a=i[2],c=i[3],u=r||{},d=u.plain;if(!o)return null;var f=-999,m={"data-rc-order":"prependQueue","data-rc-priority":"".concat(f)},g=Jh(o,c,a,m,d);return[f,a,g]};K(K(K({},J2,_P),D2,G5),Q2,CP);var Yt=(function(){function e(t,n){yr(this,e),K(this,"name",void 0),K(this,"style",void 0),K(this,"_keyframe",!0),this.name=t,this.style=n}return br(e,[{key:"getName",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return n?"".concat(n,"-").concat(this.name):this.name}}]),e})();function vl(e){return e.notSplit=!0,e}vl(["borderTop","borderBottom"]),vl(["borderTop"]),vl(["borderBottom"]),vl(["borderLeft","borderRight"]),vl(["borderLeft"]),vl(["borderRight"]);var Sy=h.createContext({});function Z2(e){return N2(e)||T2(e)||my(e)||M2()}function Wo(e,t){for(var n=e,r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}function eE(e,t,n,r){if(!t.length)return n;var i=Z2(t),o=i[0],a=i.slice(1),c;return!e&&typeof o=="number"?c=[]:Array.isArray(e)?c=We(e):c=X({},e),r&&n===void 0&&a.length===1?delete c[o][a[0]]:c[o]=eE(c[o],a,n,r),c}function xo(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&r&&n===void 0&&!Wo(e,t.slice(0,-1))?e:eE(e,t,n,r)}function wP(e){return _t(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function x1(e){return Array.isArray(e)?[]:{}}var xP=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function Ml(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=x1(t[0]);return t.forEach(function(i){function o(a,c){var u=new Set(c),d=Wo(i,a),f=Array.isArray(d);if(f||wP(d)){if(!u.has(d)){u.add(d);var m=Wo(r,a);f?r=xo(r,a,[]):(!m||_t(m)!=="object")&&(r=xo(r,a,x1(d))),xP(d).forEach(function(g){o([].concat(We(a),[g]),u)})}}else r=xo(r,a,d)}o([])}),r}function EP(){}const kP=h.createContext({}),Lf=()=>{const e=()=>{};return e.deprecated=EP,e},$P=h.createContext(void 0);var tE={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"},RP={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},TP=X(X({},RP),{},{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",dateFormat:"M/D/YYYY",dateTimeFormat:"M/D/YYYY HH:mm:ss",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 nE={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},E1={lang:Object.assign({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"]},TP),timePickerLocale:Object.assign({},nE)},Bi="${label} is not a valid ${type}",Qs={locale:"en",Pagination:tE,DatePicker:E1,TimePicker:nE,Calendar:E1,global:{placeholder:"Please select",close:"Close"},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:Bi,method:Bi,array:Bi,object:Bi,number:Bi,date:Bi,boolean:Bi,integer:Bi,float:Bi,regexp:Bi,email:Bi,url:Bi,hex:Bi},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}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};let Nh=Object.assign({},Qs.Modal),Mh=[];const k1=()=>Mh.reduce((e,t)=>Object.assign(Object.assign({},e),t),Qs.Modal);function PP(e){if(e){const t=Object.assign({},e);return Mh.push(t),Nh=k1(),()=>{Mh=Mh.filter(n=>n!==t),Nh=k1()}}Nh=Object.assign({},Qs.Modal)}function rE(){return Nh}const Cy=h.createContext(void 0),ys=(e,t)=>{const n=h.useContext(Cy),r=h.useMemo(()=>{var o;const a=t||Qs[e],c=(o=n==null?void 0:n[e])!==null&&o!==void 0?o:{};return Object.assign(Object.assign({},typeof a=="function"?a():a),c||{})},[e,t,n]),i=h.useMemo(()=>{const o=n==null?void 0:n.locale;return n!=null&&n.exist&&!o?Qs.locale:o},[n]);return[r,i]},OP="internalMark",IP=e=>{const{locale:t={},children:n,_ANT_MARK__:r}=e;h.useEffect(()=>PP(t==null?void 0:t.Modal),[t]);const i=h.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return h.createElement(Cy.Provider,{value:i},n)},wy={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"},Cu=Object.assign(Object.assign({},wy),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
57
+ 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
58
+ '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:!1,motion:!0}),Mr=Math.round;function cg(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(i=>parseFloat(i));for(let i=0;i<3;i+=1)r[i]=t(r[i]||0,n[i]||"",i);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const $1=(e,t,n)=>n===0?e:e/100;function Lc(e,t){const n=t||255;return e>n?n:e<0?0:e}class yn{constructor(t){K(this,"isValid",!0),K(this,"r",0),K(this,"g",0),K(this,"b",0),K(this,"a",1),K(this,"_h",void 0),K(this,"_s",void 0),K(this,"_l",void 0),K(this,"_v",void 0),K(this,"_max",void 0),K(this,"_min",void 0),K(this,"_brightness",void 0);function n(i){return i[0]in t&&i[1]in t&&i[2]in t}if(t)if(typeof t=="string"){let o=function(a){return i.startsWith(a)};var r=o;const i=t.trim();/^#?[A-F\d]{3,8}$/i.test(i)?this.fromHexString(i):o("rgb")?this.fromRgbString(i):o("hsl")?this.fromHslString(i):(o("hsv")||o("hsb"))&&this.fromHsvString(i)}else if(t instanceof yn)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(n("rgb"))this.r=Lc(t.r),this.g=Lc(t.g),this.b=Lc(t.b),this.a=typeof t.a=="number"?Lc(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(o){const a=o/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}const n=t(this.r),r=t(this.g),i=t(this.b);return .2126*n+.7152*r+.0722*i}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=Mr(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const n=this.getHue(),r=this.getSaturation();let i=this.getLightness()-t/100;return i<0&&(i=0),this._c({h:n,s:r,l:i,a:this.a})}lighten(t=10){const n=this.getHue(),r=this.getSaturation();let i=this.getLightness()+t/100;return i>1&&(i=1),this._c({h:n,s:r,l:i,a:this.a})}mix(t,n=50){const r=this._c(t),i=n/100,o=c=>(r[c]-this[c])*i+this[c],a={r:Mr(o("r")),g:Mr(o("g")),b:Mr(o("b")),a:Mr(o("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),i=o=>Mr((this[o]*this.a+n[o]*n.a*(1-this.a))/r);return this._c({r:i("r"),g:i("g"),b:i("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 i=(this.b||0).toString(16);if(t+=i.length===2?i:"0"+i,typeof this.a=="number"&&this.a>=0&&this.a<1){const o=Mr(this.a*255).toString(16);t+=o.length===2?o:"0"+o}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),n=Mr(this.getSaturation()*100),r=Mr(this.getLightness()*100);return this.a!==1?`hsla(${t},${n}%,${r}%,${this.a})`:`hsl(${t},${n}%,${r}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,n,r){const i=this.clone();return i[t]=Lc(n,r),i}_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(i,o){return parseInt(n[i]+n[o||i],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:i}){if(this._h=t%360,this._s=n,this._l=r,this.a=typeof i=="number"?i:1,n<=0){const g=Mr(r*255);this.r=g,this.g=g,this.b=g}let o=0,a=0,c=0;const u=t/60,d=(1-Math.abs(2*r-1))*n,f=d*(1-Math.abs(u%2-1));u>=0&&u<1?(o=d,a=f):u>=1&&u<2?(o=f,a=d):u>=2&&u<3?(a=d,c=f):u>=3&&u<4?(a=f,c=d):u>=4&&u<5?(o=f,c=d):u>=5&&u<6&&(o=d,c=f);const m=r-d/2;this.r=Mr((o+m)*255),this.g=Mr((a+m)*255),this.b=Mr((c+m)*255)}fromHsv({h:t,s:n,v:r,a:i}){this._h=t%360,this._s=n,this._v=r,this.a=typeof i=="number"?i:1;const o=Mr(r*255);if(this.r=o,this.g=o,this.b=o,n<=0)return;const a=t/60,c=Math.floor(a),u=a-c,d=Mr(r*(1-n)*255),f=Mr(r*(1-n*u)*255),m=Mr(r*(1-n*(1-u))*255);switch(c){case 0:this.g=m,this.b=d;break;case 1:this.r=f,this.b=d;break;case 2:this.r=d,this.b=m;break;case 3:this.r=d,this.g=f;break;case 4:this.r=m,this.g=d;break;case 5:default:this.g=d,this.b=f;break}}fromHsvString(t){const n=cg(t,$1);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(t){const n=cg(t,$1);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(t){const n=cg(t,(r,i)=>i.includes("%")?Mr(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}var ih=2,R1=.16,NP=.05,MP=.05,zP=.15,iE=5,oE=4,jP=[{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 T1(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-ih*t:Math.round(e.h)+ih*t:r=n?Math.round(e.h)+ih*t:Math.round(e.h)-ih*t,r<0?r+=360:r>=360&&(r-=360),r}function P1(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-R1*t:t===oE?r=e.s+R1:r=e.s+NP*t,r>1&&(r=1),n&&t===iE&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function O1(e,t,n){var r;return n?r=e.v+MP*t:r=e.v-zP*t,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function Pa(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=new yn(e),i=r.toHsv(),o=iE;o>0;o-=1){var a=new yn({h:T1(i,o,!0),s:P1(i,o,!0),v:O1(i,o,!0)});n.push(a)}n.push(r);for(var c=1;c<=oE;c+=1){var u=new yn({h:T1(i,c),s:P1(i,c),v:O1(i,c)});n.push(u)}return t.theme==="dark"?jP.map(function(d){var f=d.index,m=d.amount;return new yn(t.backgroundColor||"#141414").mix(n[f],m).toHexString()}):n.map(function(d){return d.toHexString()})}var ug={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"},xv=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];xv.primary=xv[5];var Ev=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];Ev.primary=Ev[5];var kv=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];kv.primary=kv[5];var Qh=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];Qh.primary=Qh[5];var $v=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];$v.primary=$v[5];var Rv=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];Rv.primary=Rv[5];var Tv=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];Tv.primary=Tv[5];var Pv=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];Pv.primary=Pv[5];var Zh=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Zh.primary=Zh[5];var Ov=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];Ov.primary=Ov[5];var Iv=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];Iv.primary=Iv[5];var Nv=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];Nv.primary=Nv[5];var Mv=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];Mv.primary=Mv[5];var dg={red:xv,volcano:Ev,orange:kv,gold:Qh,yellow:$v,lime:Rv,green:Tv,cyan:Pv,blue:Zh,geekblue:Ov,purple:Iv,magenta:Nv,grey:Mv};function sE(e,{generateColorPalettes:t,generateNeutralColorPalettes:n}){const{colorSuccess:r,colorWarning:i,colorError:o,colorInfo:a,colorPrimary:c,colorBgBase:u,colorTextBase:d}=e,f=t(c),m=t(r),g=t(i),v=t(o),y=t(a),S=n(u,d),_=e.colorLink||e.colorInfo,C=t(_),E=new yn(v[1]).mix(new yn(v[3]),50).toHexString();return Object.assign(Object.assign({},S),{colorPrimaryBg:f[1],colorPrimaryBgHover:f[2],colorPrimaryBorder:f[3],colorPrimaryBorderHover:f[4],colorPrimaryHover:f[5],colorPrimary:f[6],colorPrimaryActive:f[7],colorPrimaryTextHover:f[8],colorPrimaryText:f[9],colorPrimaryTextActive:f[10],colorSuccessBg:m[1],colorSuccessBgHover:m[2],colorSuccessBorder:m[3],colorSuccessBorderHover:m[4],colorSuccessHover:m[4],colorSuccess:m[6],colorSuccessActive:m[7],colorSuccessTextHover:m[8],colorSuccessText:m[9],colorSuccessTextActive:m[10],colorErrorBg:v[1],colorErrorBgHover:v[2],colorErrorBgFilledHover:E,colorErrorBgActive:v[3],colorErrorBorder:v[3],colorErrorBorderHover:v[4],colorErrorHover:v[5],colorError:v[6],colorErrorActive:v[7],colorErrorTextHover:v[8],colorErrorText:v[9],colorErrorTextActive:v[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:C[4],colorLink:C[6],colorLinkActive:C[7],colorBgMask:new yn("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}const BP=e=>{let t=e,n=e,r=e,i=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?i=4:e>=8&&(i=6),{borderRadius:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:i}};function LP(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:i}=e;return Object.assign({motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:i+1},BP(r))}const AP=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}};function zh(e){return(e+8)/e}function DP(e){const t=Array.from({length:10}).map((n,r)=>{const i=r-1,o=e*Math.pow(Math.E,i/5),a=r>1?Math.floor(o):Math.ceil(o);return Math.floor(a/2)*2});return t[1]=e,t.map(n=>({size:n,lineHeight:zh(n)}))}const HP=e=>{const t=DP(e),n=t.map(f=>f.size),r=t.map(f=>f.lineHeight),i=n[1],o=n[0],a=n[2],c=r[1],u=r[0],d=r[2];return{fontSizeSM:o,fontSize:i,fontSizeLG:a,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:c,lineHeightLG:d,lineHeightSM:u,fontHeight:Math.round(c*i),fontHeightLG:Math.round(d*a),fontHeightSM:Math.round(u*o),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function FP(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 to=(e,t)=>new yn(e).setA(t).toRgbString(),Ac=(e,t)=>new yn(e).darken(t).toHexString(),WP=e=>{const t=Pa(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]}},VP=(e,t)=>{const n=e||"#fff",r=t||"#000";return{colorBgBase:n,colorTextBase:r,colorText:to(r,.88),colorTextSecondary:to(r,.65),colorTextTertiary:to(r,.45),colorTextQuaternary:to(r,.25),colorFill:to(r,.15),colorFillSecondary:to(r,.06),colorFillTertiary:to(r,.04),colorFillQuaternary:to(r,.02),colorBgSolid:to(r,1),colorBgSolidHover:to(r,.75),colorBgSolidActive:to(r,.95),colorBgLayout:Ac(n,4),colorBgContainer:Ac(n,0),colorBgElevated:Ac(n,0),colorBgSpotlight:to(r,.85),colorBgBlur:"transparent",colorBorder:Ac(n,15),colorBorderSecondary:Ac(n,6)}};function aE(e){ug.pink=ug.magenta,dg.pink=dg.magenta;const t=Object.keys(wy).map(n=>{const r=e[n]===ug[n]?dg[n]:Pa(e[n]);return Array.from({length:10},()=>1).reduce((i,o,a)=>(i[`${n}-${a+1}`]=r[a],i[`${n}${a+1}`]=r[a],i),{})}).reduce((n,r)=>(n=Object.assign(Object.assign({},n),r),n),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),sE(e,{generateColorPalettes:WP,generateNeutralColorPalettes:VP})),HP(e.fontSize)),FP(e)),AP(e)),LP(e))}const lE=yv(aE),ef={token:Cu,override:{override:Cu},hashed:!0},cE=J.createContext(ef),wu="ant",Af="anticon",UP=["outlined","borderless","filled","underlined"],qP=(e,t)=>t||(e?`${wu}-${e}`:wu),Ot=h.createContext({getPrefixCls:qP,iconPrefixCls:Af}),{Consumer:ZZ}=Ot,I1={};function Gr(e){const t=h.useContext(Ot),{getPrefixCls:n,direction:r,getPopupContainer:i}=t,o=t[e];return Object.assign(Object.assign({classNames:I1,styles:I1},o),{getPrefixCls:n,direction:r,getPopupContainer:i})}const KP=`-ant-${Date.now()}-${Math.random()}`;function GP(e,t){const n={},r=(a,c)=>{let u=a.clone();return u=(c==null?void 0:c(u))||u,u.toRgbString()},i=(a,c)=>{const u=new yn(a),d=Pa(u.toRgbString());n[`${c}-color`]=r(u),n[`${c}-color-disabled`]=d[1],n[`${c}-color-hover`]=d[4],n[`${c}-color-active`]=d[6],n[`${c}-color-outline`]=u.clone().setA(.2).toRgbString(),n[`${c}-color-deprecated-bg`]=d[0],n[`${c}-color-deprecated-border`]=d[2]};if(t.primaryColor){i(t.primaryColor,"primary");const a=new yn(t.primaryColor),c=Pa(a.toRgbString());c.forEach((d,f)=>{n[`primary-${f+1}`]=d}),n["primary-color-deprecated-l-35"]=r(a,d=>d.lighten(35)),n["primary-color-deprecated-l-20"]=r(a,d=>d.lighten(20)),n["primary-color-deprecated-t-20"]=r(a,d=>d.tint(20)),n["primary-color-deprecated-t-50"]=r(a,d=>d.tint(50)),n["primary-color-deprecated-f-12"]=r(a,d=>d.setA(d.a*.12));const u=new yn(c[0]);n["primary-color-active-deprecated-f-30"]=r(u,d=>d.setA(d.a*.3)),n["primary-color-active-deprecated-d-02"]=r(u,d=>d.darken(2))}return t.successColor&&i(t.successColor,"success"),t.warningColor&&i(t.warningColor,"warning"),t.errorColor&&i(t.errorColor,"error"),t.infoColor&&i(t.infoColor,"info"),`
59
+ :root {
60
+ ${Object.keys(n).map(a=>`--${e}-${a}: ${n[a]};`).join(`
61
+ `)}
62
+ }
63
+ `.trim()}function XP(e,t){const n=GP(e,t);si()&&ps(n,`${KP}-dynamic-theme`)}const Zs=h.createContext(!1),uE=({children:e,disabled:t})=>{const n=h.useContext(Zs);return h.createElement(Zs.Provider,{value:t??n},e)},Yl=h.createContext(void 0),YP=({children:e,size:t})=>{const n=h.useContext(Yl);return h.createElement(Yl.Provider,{value:t||n},e)};function JP(){const e=h.useContext(Zs),t=h.useContext(Yl);return{componentDisabled:e,componentSize:t}}var dE=br(function e(){yr(this,e)}),hE="CALC_UNIT",QP=new RegExp(hE,"g");function hg(e){return typeof e=="number"?"".concat(e).concat(hE):e}var ZP=(function(e){gs(n,e);var t=vs(n);function n(r,i){var o;yr(this,n),o=t.call(this),K(Zt(o),"result",""),K(Zt(o),"unitlessCssVar",void 0),K(Zt(o),"lowPriority",void 0);var a=_t(r);return o.unitlessCssVar=i,r instanceof n?o.result="(".concat(r.result,")"):a==="number"?o.result=hg(r):a==="string"&&(o.result=r),o}return br(n,[{key:"add",value:function(i){return i instanceof n?this.result="".concat(this.result," + ").concat(i.getResult()):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," + ").concat(hg(i))),this.lowPriority=!0,this}},{key:"sub",value:function(i){return i instanceof n?this.result="".concat(this.result," - ").concat(i.getResult()):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," - ").concat(hg(i))),this.lowPriority=!0,this}},{key:"mul",value:function(i){return this.lowPriority&&(this.result="(".concat(this.result,")")),i instanceof n?this.result="".concat(this.result," * ").concat(i.getResult(!0)):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," * ").concat(i)),this.lowPriority=!1,this}},{key:"div",value:function(i){return this.lowPriority&&(this.result="(".concat(this.result,")")),i instanceof n?this.result="".concat(this.result," / ").concat(i.getResult(!0)):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," / ").concat(i)),this.lowPriority=!1,this}},{key:"getResult",value:function(i){return this.lowPriority||i?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(i){var o=this,a=i||{},c=a.unit,u=!0;return typeof c=="boolean"?u=c:Array.from(this.unitlessCssVar).some(function(d){return o.result.includes(d)})&&(u=!1),this.result=this.result.replace(QP,u?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),n})(dE),eO=(function(e){gs(n,e);var t=vs(n);function n(r){var i;return yr(this,n),i=t.call(this),K(Zt(i),"result",0),r instanceof n?i.result=r.result:typeof r=="number"&&(i.result=r),i}return br(n,[{key:"add",value:function(i){return i instanceof n?this.result+=i.result:typeof i=="number"&&(this.result+=i),this}},{key:"sub",value:function(i){return i instanceof n?this.result-=i.result:typeof i=="number"&&(this.result-=i),this}},{key:"mul",value:function(i){return i instanceof n?this.result*=i.result:typeof i=="number"&&(this.result*=i),this}},{key:"div",value:function(i){return i instanceof n?this.result/=i.result:typeof i=="number"&&(this.result/=i),this}},{key:"equal",value:function(){return this.result}}]),n})(dE),tO=function(t,n){var r=t==="css"?ZP:eO;return function(i){return new r(i,n)}},N1=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 er(e){var t=h.useRef();t.current=e;var n=h.useCallback(function(){for(var r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return(r=t.current)===null||r===void 0?void 0:r.call.apply(r,[t].concat(o))},[]);return n}function Jl(e){var t=h.useRef(!1),n=h.useState(e),r=se(n,2),i=r[0],o=r[1];h.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]);function a(c,u){u&&t.current||o(c)}return[i,a]}function fg(e){return e!==void 0}function tr(e,t){var n=t||{},r=n.defaultValue,i=n.value,o=n.onChange,a=n.postState,c=Jl(function(){return fg(i)?i:fg(r)?typeof r=="function"?r():r:typeof e=="function"?e():e}),u=se(c,2),d=u[0],f=u[1],m=i!==void 0?i:d,g=a?a(m):m,v=er(o),y=Jl([m]),S=se(y,2),_=S[0],C=S[1];_v(function(){var k=_[0];d!==k&&v(d,k)},[_]),_v(function(){fg(i)||f(i)},[i]);var E=er(function(k,$){f(k,$),C([m],$)});return[g,E]}function M1(e,t,n,r){var i=X({},t[e]);if(r!=null&&r.deprecatedTokens){var o=r.deprecatedTokens;o.forEach(function(c){var u=se(c,2),d=u[0],f=u[1];if(i!=null&&i[d]||i!=null&&i[f]){var m;(m=i[f])!==null&&m!==void 0||(i[f]=i==null?void 0:i[d])}})}var a=X(X({},n),i);return Object.keys(a).forEach(function(c){a[c]===t[c]&&delete a[c]}),a}var fE=typeof CSSINJS_STATISTIC<"u",zv=!0;function tn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!fE)return Object.assign.apply(Object,[{}].concat(t));zv=!1;var r={};return t.forEach(function(i){if(_t(i)==="object"){var o=Object.keys(i);o.forEach(function(a){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){return i[a]}})})}}),zv=!0,r}var z1={};function nO(){}var rO=function(t){var n,r=t,i=nO;return fE&&typeof Proxy<"u"&&(n=new Set,r=new Proxy(t,{get:function(a,c){if(zv){var u;(u=n)===null||u===void 0||u.add(c)}return a[c]}}),i=function(a,c){var u;z1[a]={global:Array.from(n),component:X(X({},(u=z1[a])===null||u===void 0?void 0:u.component),c)}}),{token:r,keys:n,flush:i}};function j1(e,t,n){if(typeof n=="function"){var r;return n(tn(t,(r=t[e])!==null&&r!==void 0?r:{}))}return n??{}}function iO(e){return e==="js"?{max:Math.max,min:Math.min}:{max:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return"max(".concat(r.map(function(o){return te(o)}).join(","),")")},min:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return"min(".concat(r.map(function(o){return te(o)}).join(","),")")}}}var oO=1e3*60*10,sO=(function(){function e(){yr(this,e),K(this,"map",new Map),K(this,"objectIDMap",new WeakMap),K(this,"nextID",0),K(this,"lastAccessBeat",new Map),K(this,"accessBeat",0)}return br(e,[{key:"set",value:function(n,r){this.clear();var i=this.getCompositeKey(n);this.map.set(i,r),this.lastAccessBeat.set(i,Date.now())}},{key:"get",value:function(n){var r=this.getCompositeKey(n),i=this.map.get(r);return this.lastAccessBeat.set(r,Date.now()),this.accessBeat+=1,i}},{key:"getCompositeKey",value:function(n){var r=this,i=n.map(function(o){return o&&_t(o)==="object"?"obj_".concat(r.getObjectID(o)):"".concat(_t(o),"_").concat(o)});return i.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(i,o){r-i>oO&&(n.map.delete(o),n.lastAccessBeat.delete(o))}),this.accessBeat=0}}}]),e})(),B1=new sO;function aO(e,t){return J.useMemo(function(){var n=B1.get(t);if(n)return n;var r=e();return B1.set(t,r),r},t)}var lO=function(){return{}};function cO(e){var t=e.useCSP,n=t===void 0?lO:t,r=e.useToken,i=e.usePrefix,o=e.getResetStyles,a=e.getCommonStyle,c=e.getCompUnitless;function u(g,v,y,S){var _=Array.isArray(g)?g[0]:g;function C(N){return"".concat(String(_)).concat(N.slice(0,1).toUpperCase()).concat(N.slice(1))}var E=(S==null?void 0:S.unitless)||{},k=typeof c=="function"?c(g):{},$=X(X({},k),{},K({},C("zIndexPopup"),!0));Object.keys(E).forEach(function(N){$[C(N)]=E[N]});var P=X(X({},S),{},{unitless:$,prefixToken:C}),T=f(g,v,y,P),O=d(_,y,P);return function(N){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:N,z=T(N,I),L=se(z,2),M=L[1],j=O(I),B=se(j,2),H=B[0],W=B[1];return[H,M,W]}}function d(g,v,y){var S=y.unitless,_=y.injectStyle,C=_===void 0?!0:_,E=y.prefixToken,k=y.ignore,$=function(O){var N=O.rootCls,I=O.cssVar,z=I===void 0?{}:I,L=r(),M=L.realToken;return SP({path:[g],prefix:z.prefix,key:z.key,unitless:S,ignore:k,token:M,scope:N},function(){var j=j1(g,M,v),B=M1(g,M,j,{deprecatedTokens:y==null?void 0:y.deprecatedTokens});return Object.keys(j).forEach(function(H){B[E(H)]=B[H],delete B[H]}),B}),null},P=function(O){var N=r(),I=N.cssVar;return[function(z){return C&&I?J.createElement(J.Fragment,null,J.createElement($,{rootCls:O,cssVar:I,component:g}),z):z},I==null?void 0:I.key]};return P}function f(g,v,y){var S=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},_=Array.isArray(g)?g:[g,g],C=se(_,1),E=C[0],k=_.join("-"),$=e.layer||{name:"antd"};return function(P){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:P,O=r(),N=O.theme,I=O.realToken,z=O.hashId,L=O.token,M=O.cssVar,j=i(),B=j.rootPrefixCls,H=j.iconPrefixCls,W=n(),V=M?"css":"js",A=aO(function(){var Z=new Set;return M&&Object.keys(S.unitless||{}).forEach(function(ee){Z.add(Rh(ee,M.prefix)),Z.add(Rh(ee,N1(E,M.prefix)))}),tO(V,Z)},[V,E,M==null?void 0:M.prefix]),G=iO(V),q=G.max,D=G.min,U={theme:N,token:L,hashId:z,nonce:function(){return W.nonce},clientOnly:S.clientOnly,layer:$,order:S.order||-999};typeof o=="function"&&wv(X(X({},U),{},{clientOnly:!1,path:["Shared",B]}),function(){return o(L,{prefix:{rootPrefixCls:B,iconPrefixCls:H},csp:W})});var Y=wv(X(X({},U),{},{path:[k,P,H]}),function(){if(S.injectStyle===!1)return[];var Z=rO(L),ee=Z.token,re=Z.flush,he=j1(E,I,y),fe=".".concat(P),ue=M1(E,I,he,{deprecatedTokens:S.deprecatedTokens});M&&he&&_t(he)==="object"&&Object.keys(he).forEach(function(ce){he[ce]="var(".concat(Rh(ce,N1(E,M.prefix)),")")});var Se=tn(ee,{componentCls:fe,prefixCls:P,iconCls:".".concat(H),antCls:".".concat(B),calc:A,max:q,min:D},M?he:ue),ae=v(Se,{hashId:z,prefixCls:P,rootPrefixCls:B,iconPrefixCls:H});re(E,ue);var le=typeof a=="function"?a(Se,P,T,S.resetFont):null;return[S.resetStyle===!1?null:le,ae]});return[Y,z]}}function m(g,v,y){var S=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},_=f(g,v,y,X({resetStyle:!1,order:-998},S)),C=function(k){var $=k.prefixCls,P=k.rootCls,T=P===void 0?$:P;return _($,T),null};return C}return{genStyleHooks:u,genSubStyleComponent:m,genComponentStyleHook:f}}const ea=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"],uO="5.29.3";function mg(e){return e>=0&&e<=255}function Zc(e,t){const{r:n,g:r,b:i,a:o}=new yn(e).toRgb();if(o<1)return e;const{r:a,g:c,b:u}=new yn(t).toRgb();for(let d=.01;d<=1;d+=.01){const f=Math.round((n-a*(1-d))/d),m=Math.round((r-c*(1-d))/d),g=Math.round((i-u*(1-d))/d);if(mg(f)&&mg(m)&&mg(g))return new yn({r:f,g:m,b:g,a:Math.round(d*100)/100}).toRgbString()}return new yn({r:n,g:r,b:i,a:1}).toRgbString()}var dO=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function mE(e){const{override:t}=e,n=dO(e,["override"]),r=Object.assign({},t);Object.keys(Cu).forEach(g=>{delete r[g]});const i=Object.assign(Object.assign({},n),r),o=480,a=576,c=768,u=992,d=1200,f=1600;return i.motion===!1&&(i.motionDurationFast="0s",i.motionDurationMid="0s",i.motionDurationSlow="0s"),Object.assign(Object.assign(Object.assign({},i),{colorFillContent:i.colorFillSecondary,colorFillContentHover:i.colorFill,colorFillAlter:i.colorFillQuaternary,colorBgContainerDisabled:i.colorFillTertiary,colorBorderBg:i.colorBgContainer,colorSplit:Zc(i.colorBorderSecondary,i.colorBgContainer),colorTextPlaceholder:i.colorTextQuaternary,colorTextDisabled:i.colorTextQuaternary,colorTextHeading:i.colorText,colorTextLabel:i.colorTextSecondary,colorTextDescription:i.colorTextTertiary,colorTextLightSolid:i.colorWhite,colorHighlight:i.colorError,colorBgTextHover:i.colorFillSecondary,colorBgTextActive:i.colorFill,colorIcon:i.colorTextTertiary,colorIconHover:i.colorText,colorErrorOutline:Zc(i.colorErrorBg,i.colorBgContainer),colorWarningOutline:Zc(i.colorWarningBg,i.colorBgContainer),fontSizeIcon:i.fontSizeSM,lineWidthFocus:i.lineWidth*3,lineWidth:i.lineWidth,controlOutlineWidth:i.lineWidth*2,controlInteractiveSize:i.controlHeight/2,controlItemBgHover:i.colorFillTertiary,controlItemBgActive:i.colorPrimaryBg,controlItemBgActiveHover:i.colorPrimaryBgHover,controlItemBgActiveDisabled:i.colorFill,controlTmpOutline:i.colorFillQuaternary,controlOutline:Zc(i.colorPrimaryBg,i.colorBgContainer),lineType:i.lineType,borderRadius:i.borderRadius,borderRadiusXS:i.borderRadiusXS,borderRadiusSM:i.borderRadiusSM,borderRadiusLG:i.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:i.sizeXXS,paddingXS:i.sizeXS,paddingSM:i.sizeSM,padding:i.size,paddingMD:i.sizeMD,paddingLG:i.sizeLG,paddingXL:i.sizeXL,paddingContentHorizontalLG:i.sizeLG,paddingContentVerticalLG:i.sizeMS,paddingContentHorizontal:i.sizeMS,paddingContentVertical:i.sizeSM,paddingContentHorizontalSM:i.size,paddingContentVerticalSM:i.sizeXS,marginXXS:i.sizeXXS,marginXS:i.sizeXS,marginSM:i.sizeSM,margin:i.size,marginMD:i.sizeMD,marginLG:i.sizeLG,marginXL:i.sizeXL,marginXXL:i.sizeXXL,boxShadow:`
64
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08),
65
+ 0 3px 6px -4px rgba(0, 0, 0, 0.12),
66
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05)
67
+ `,boxShadowSecondary:`
68
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08),
69
+ 0 3px 6px -4px rgba(0, 0, 0, 0.12),
70
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05)
71
+ `,boxShadowTertiary:`
72
+ 0 1px 2px 0 rgba(0, 0, 0, 0.03),
73
+ 0 1px 6px -1px rgba(0, 0, 0, 0.02),
74
+ 0 2px 4px 0 rgba(0, 0, 0, 0.02)
75
+ `,screenXS:o,screenXSMin:o,screenXSMax:a-1,screenSM:a,screenSMMin:a,screenSMMax:c-1,screenMD:c,screenMDMin:c,screenMDMax:u-1,screenLG:u,screenLGMin:u,screenLGMax:d-1,screenXL:d,screenXLMin:d,screenXLMax:f-1,screenXXL:f,screenXXLMin:f,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:`
76
+ 0 1px 2px -2px ${new yn("rgba(0, 0, 0, 0.16)").toRgbString()},
77
+ 0 3px 6px 0 ${new yn("rgba(0, 0, 0, 0.12)").toRgbString()},
78
+ 0 5px 12px 4px ${new yn("rgba(0, 0, 0, 0.09)").toRgbString()}
79
+ `,boxShadowDrawerRight:`
80
+ -6px 0 16px 0 rgba(0, 0, 0, 0.08),
81
+ -3px 0 6px -4px rgba(0, 0, 0, 0.12),
82
+ -9px 0 28px 8px rgba(0, 0, 0, 0.05)
83
+ `,boxShadowDrawerLeft:`
84
+ 6px 0 16px 0 rgba(0, 0, 0, 0.08),
85
+ 3px 0 6px -4px rgba(0, 0, 0, 0.12),
86
+ 9px 0 28px 8px rgba(0, 0, 0, 0.05)
87
+ `,boxShadowDrawerUp:`
88
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08),
89
+ 0 3px 6px -4px rgba(0, 0, 0, 0.12),
90
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05)
91
+ `,boxShadowDrawerDown:`
92
+ 0 -6px 16px 0 rgba(0, 0, 0, 0.08),
93
+ 0 -3px 6px -4px rgba(0, 0, 0, 0.12),
94
+ 0 -9px 28px 8px rgba(0, 0, 0, 0.05)
95
+ `,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)}var L1=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const pE={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},hO={motionBase:!0,motionUnit:!0},fO={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},gE=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:i}=t,o=L1(t,["override"]);let a=Object.assign(Object.assign({},r),{override:i});return a=mE(a),o&&Object.entries(o).forEach(([c,u])=>{const{theme:d}=u,f=L1(u,["theme"]);let m=f;d&&(m=gE(Object.assign(Object.assign({},a),f),{override:f},d)),a[c]=m}),a};function gi(){const{token:e,hashed:t,theme:n,override:r,cssVar:i}=J.useContext(cE),o=`${uO}-${t||""}`,a=n||lE,[c,u,d]=K5(a,[Cu,e],{salt:o,override:r,getComputedToken:gE,formatToken:mE,cssVar:i&&{prefix:i.prefix,key:i.key,unitless:pE,ignore:hO,preserve:fO}});return[a,d,t?u:"",c,i]}const xu={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},Un=(e,t=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}),rc=()=>({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"}}),tf=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),mO=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"}}}),pO=(e,t,n,r)=>{const i=`[class^="${t}"], [class*=" ${t}"]`,o=n?`.${n}`:i,a={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let c={};return r!==!1&&(c={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[o]:Object.assign(Object.assign(Object.assign({},c),a),{[i]:a})}},Oa=(e,t)=>({outline:`${te(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:"outline-offset 0s, outline 0s"}),fo=(e,t)=>({"&:focus-visible":Oa(e,t)}),vE=e=>({[`.${e}`]:Object.assign(Object.assign({},rc()),{[`.${e} .${e}-icon`]:{display:"block"}})}),yE=e=>Object.assign(Object.assign({color:e.colorLink,textDecoration:e.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none"},fo(e)),{"&:hover":{color:e.colorLinkHover,textDecoration:e.linkHoverDecoration},"&:focus":{color:e.colorLinkHover,textDecoration:e.linkFocusDecoration},"&:active":{color:e.colorLinkActive,textDecoration:e.linkHoverDecoration}}),{genStyleHooks:bn,genComponentStyleHook:gO,genSubStyleComponent:Au}=cO({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=h.useContext(Ot);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{const[e,t,n,r,i]=gi();return{theme:e,realToken:t,hashId:n,token:r,cssVar:i}},useCSP:()=>{const{csp:e}=h.useContext(Ot);return e??{}},getResetStyles:(e,t)=>{var n;const r=mO(e);return[r,{"&":r},vE((n=t==null?void 0:t.prefix.iconPrefixCls)!==null&&n!==void 0?n:Af)]},getCommonStyle:pO,getCompUnitless:()=>pE});function Df(e,t){return ea.reduce((n,r)=>{const i=e[`${r}1`],o=e[`${r}3`],a=e[`${r}6`],c=e[`${r}7`];return Object.assign(Object.assign({},n),t(r,{lightColor:i,lightBorderColor:o,darkColor:a,textColor:c}))},{})}const vO=(e,t)=>{const[n,r]=gi();return wv({token:r,hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce,layer:{name:"antd"}},()=>vE(e))},yO=Object.assign({},Nf),{useId:A1}=yO,bO=()=>"",_O=typeof A1>"u"?bO:A1;function SO(e,t,n){var r;Lf();const i=e||{},o=i.inherit===!1||!t?Object.assign(Object.assign({},ef),{hashed:(r=t==null?void 0:t.hashed)!==null&&r!==void 0?r:ef.hashed,cssVar:t==null?void 0:t.cssVar}):t,a=_O();return Bu(()=>{var c,u;if(!e)return t;const d=Object.assign({},o.components);Object.keys(e.components||{}).forEach(g=>{d[g]=Object.assign(Object.assign({},d[g]),e.components[g])});const f=`css-var-${a.replace(/:/g,"")}`,m=((c=i.cssVar)!==null&&c!==void 0?c:o.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:n==null?void 0:n.prefixCls},typeof o.cssVar=="object"?o.cssVar:{}),typeof i.cssVar=="object"?i.cssVar:{}),{key:typeof i.cssVar=="object"&&((u=i.cssVar)===null||u===void 0?void 0:u.key)||f});return Object.assign(Object.assign(Object.assign({},o),i),{token:Object.assign(Object.assign({},o.token),i.token),components:d,cssVar:m})},[i,o],(c,u)=>c.some((d,f)=>{const m=u[f];return!_u(d,m,!0)}))}var CO=["children"],bE=h.createContext({});function wO(e){var t=e.children,n=Lt(e,CO);return h.createElement(bE.Provider,{value:n},t)}var xO=(function(e){gs(n,e);var t=vs(n);function n(){return yr(this,n),t.apply(this,arguments)}return br(n,[{key:"render",value:function(){return this.props.children}}]),n})(h.Component);function EO(e){var t=h.useReducer(function(c){return c+1},0),n=se(t,2),r=n[1],i=h.useRef(e),o=er(function(){return i.current}),a=er(function(c){i.current=typeof c=="function"?c(i.current):c,r()});return[o,a]}var Fs="none",oh="appear",sh="enter",ah="leave",D1="none",Eo="prepare",zl="start",jl="active",xy="end",_E="prepared";function H1(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}function kO(e,t){var n={animationend:H1("Animation","AnimationEnd"),transitionend:H1("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}var $O=kO(si(),typeof window<"u"?window:{}),SE={};if(si()){var RO=document.createElement("div");SE=RO.style}var lh={};function CE(e){if(lh[e])return lh[e];var t=$O[e];if(t)for(var n=Object.keys(t),r=n.length,i=0;i<r;i+=1){var o=n[i];if(Object.prototype.hasOwnProperty.call(t,o)&&o in SE)return lh[e]=t[o],lh[e]}return""}var wE=CE("animationend"),xE=CE("transitionend"),EE=!!(wE&&xE),F1=wE||"animationend",W1=xE||"transitionend";function V1(e,t){if(!e)return null;if(_t(e)==="object"){var n=t.replace(/-\w/g,function(r){return r[1].toUpperCase()});return e[n]}return"".concat(e,"-").concat(t)}const TO=(function(e){var t=h.useRef();function n(i){i&&(i.removeEventListener(W1,e),i.removeEventListener(F1,e))}function r(i){t.current&&t.current!==i&&n(t.current),i&&i!==t.current&&(i.addEventListener(W1,e),i.addEventListener(F1,e),t.current=i)}return h.useEffect(function(){return function(){n(t.current)}},[]),[r,n]});var kE=si()?h.useLayoutEffect:h.useEffect;const PO=(function(){var e=h.useRef(null);function t(){Tn.cancel(e.current)}function n(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var o=Tn(function(){i<=1?r({isCanceled:function(){return o!==e.current}}):n(r,i-1)});e.current=o}return h.useEffect(function(){return function(){t()}},[]),[n,t]});var OO=[Eo,zl,jl,xy],IO=[Eo,_E],$E=!1,NO=!0;function RE(e){return e===jl||e===xy}const MO=(function(e,t,n){var r=Jl(D1),i=se(r,2),o=i[0],a=i[1],c=PO(),u=se(c,2),d=u[0],f=u[1];function m(){a(Eo,!0)}var g=t?IO:OO;return kE(function(){if(o!==D1&&o!==xy){var v=g.indexOf(o),y=g[v+1],S=n(o);S===$E?a(y,!0):y&&d(function(_){function C(){_.isCanceled()||a(y,!0)}S===!0?C():Promise.resolve(S).then(C)})}},[e,o]),h.useEffect(function(){return function(){f()}},[]),[m,o]});function zO(e,t,n,r){var i=r.motionEnter,o=i===void 0?!0:i,a=r.motionAppear,c=a===void 0?!0:a,u=r.motionLeave,d=u===void 0?!0:u,f=r.motionDeadline,m=r.motionLeaveImmediately,g=r.onAppearPrepare,v=r.onEnterPrepare,y=r.onLeavePrepare,S=r.onAppearStart,_=r.onEnterStart,C=r.onLeaveStart,E=r.onAppearActive,k=r.onEnterActive,$=r.onLeaveActive,P=r.onAppearEnd,T=r.onEnterEnd,O=r.onLeaveEnd,N=r.onVisibleChanged,I=Jl(),z=se(I,2),L=z[0],M=z[1],j=EO(Fs),B=se(j,2),H=B[0],W=B[1],V=Jl(null),A=se(V,2),G=A[0],q=A[1],D=H(),U=h.useRef(!1),Y=h.useRef(null);function Z(){return n()}var ee=h.useRef(!1);function re(){W(Fs),q(null,!0)}var he=er(function(Ee){var ke=H();if(ke!==Fs){var je=Z();if(!(Ee&&!Ee.deadline&&Ee.target!==je)){var Oe=ee.current,Qe;ke===oh&&Oe?Qe=P==null?void 0:P(je,Ee):ke===sh&&Oe?Qe=T==null?void 0:T(je,Ee):ke===ah&&Oe&&(Qe=O==null?void 0:O(je,Ee)),Oe&&Qe!==!1&&re()}}}),fe=TO(he),ue=se(fe,1),Se=ue[0],ae=function(ke){switch(ke){case oh:return K(K(K({},Eo,g),zl,S),jl,E);case sh:return K(K(K({},Eo,v),zl,_),jl,k);case ah:return K(K(K({},Eo,y),zl,C),jl,$);default:return{}}},le=h.useMemo(function(){return ae(D)},[D]),ce=MO(D,!e,function(Ee){if(Ee===Eo){var ke=le[Eo];return ke?ke(Z()):$E}if(de in le){var je;q(((je=le[de])===null||je===void 0?void 0:je.call(le,Z(),null))||null)}return de===jl&&D!==Fs&&(Se(Z()),f>0&&(clearTimeout(Y.current),Y.current=setTimeout(function(){he({deadline:!0})},f))),de===_E&&re(),NO}),ye=se(ce,2),me=ye[0],de=ye[1],be=RE(de);ee.current=be;var we=h.useRef(null);kE(function(){if(!(U.current&&we.current===t)){M(t);var Ee=U.current;U.current=!0;var ke;!Ee&&t&&c&&(ke=oh),Ee&&t&&o&&(ke=sh),(Ee&&!t&&d||!Ee&&m&&!t&&d)&&(ke=ah);var je=ae(ke);ke&&(e||je[Eo])?(W(ke),me()):W(Fs),we.current=t}},[t]),h.useEffect(function(){(D===oh&&!c||D===sh&&!o||D===ah&&!d)&&W(Fs)},[c,o,d]),h.useEffect(function(){return function(){U.current=!1,clearTimeout(Y.current)}},[]);var Te=h.useRef(!1);h.useEffect(function(){L&&(Te.current=!0),L!==void 0&&D===Fs&&((Te.current||L)&&(N==null||N(L)),Te.current=!0)},[L,D]);var ze=G;return le[Eo]&&de===zl&&(ze=X({transition:"none"},ze)),[D,de,ze,L??t]}function jO(e){var t=e;_t(e)==="object"&&(t=e.transitionSupport);function n(i,o){return!!(i.motionName&&t&&o!==!1)}var r=h.forwardRef(function(i,o){var a=i.visible,c=a===void 0?!0:a,u=i.removeOnLeave,d=u===void 0?!0:u,f=i.forceRender,m=i.children,g=i.motionName,v=i.leavedClassName,y=i.eventProps,S=h.useContext(bE),_=S.motion,C=n(i,_),E=h.useRef(),k=h.useRef();function $(){try{return E.current instanceof HTMLElement?E.current:$h(k.current)}catch{return null}}var P=zO(C,c,$,i),T=se(P,4),O=T[0],N=T[1],I=T[2],z=T[3],L=h.useRef(z);z&&(L.current=!0);var M=h.useCallback(function(A){E.current=A,dy(o,A)},[o]),j,B=X(X({},y),{},{visible:c});if(!m)j=null;else if(O===Fs)z?j=m(X({},B),M):!d&&L.current&&v?j=m(X(X({},B),{},{className:v}),M):f||!d&&!v?j=m(X(X({},B),{},{style:{display:"none"}}),M):j=null;else{var H;N===Eo?H="prepare":RE(N)?H="active":N===zl&&(H="start");var W=V1(g,"".concat(O,"-").concat(H));j=m(X(X({},B),{},{className:ne(V1(g,O),K(K({},W,W&&H),g,typeof g=="string")),style:I}),M)}if(h.isValidElement(j)&&ra(j)){var V=Aa(j);V||(j=h.cloneElement(j,{ref:M}))}return h.createElement(xO,{ref:k},j)});return r.displayName="CSSMotion",r}const qi=jO(EE);var jv="add",Bv="keep",Lv="remove",pg="removed";function BO(e){var t;return e&&_t(e)==="object"&&"key"in e?t=e:t={key:e},X(X({},t),{},{key:String(t.key)})}function Av(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(BO)}function LO(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,i=t.length,o=Av(e),a=Av(t);o.forEach(function(d){for(var f=!1,m=r;m<i;m+=1){var g=a[m];if(g.key===d.key){r<m&&(n=n.concat(a.slice(r,m).map(function(v){return X(X({},v),{},{status:jv})})),r=m),n.push(X(X({},g),{},{status:Bv})),r+=1,f=!0;break}}f||n.push(X(X({},d),{},{status:Lv}))}),r<i&&(n=n.concat(a.slice(r).map(function(d){return X(X({},d),{},{status:jv})})));var c={};n.forEach(function(d){var f=d.key;c[f]=(c[f]||0)+1});var u=Object.keys(c).filter(function(d){return c[d]>1});return u.forEach(function(d){n=n.filter(function(f){var m=f.key,g=f.status;return m!==d||g!==Lv}),n.forEach(function(f){f.key===d&&(f.status=Bv)})}),n}var AO=["component","children","onVisibleChanged","onAllRemoved"],DO=["status"],HO=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function FO(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qi,n=(function(r){gs(o,r);var i=vs(o);function o(){var a;yr(this,o);for(var c=arguments.length,u=new Array(c),d=0;d<c;d++)u[d]=arguments[d];return a=i.call.apply(i,[this].concat(u)),K(Zt(a),"state",{keyEntities:[]}),K(Zt(a),"removeKey",function(f){a.setState(function(m){var g=m.keyEntities.map(function(v){return v.key!==f?v:X(X({},v),{},{status:pg})});return{keyEntities:g}},function(){var m=a.state.keyEntities,g=m.filter(function(v){var y=v.status;return y!==pg}).length;g===0&&a.props.onAllRemoved&&a.props.onAllRemoved()})}),a}return br(o,[{key:"render",value:function(){var c=this,u=this.state.keyEntities,d=this.props,f=d.component,m=d.children,g=d.onVisibleChanged;d.onAllRemoved;var v=Lt(d,AO),y=f||h.Fragment,S={};return HO.forEach(function(_){S[_]=v[_],delete v[_]}),delete v.keys,h.createElement(y,v,u.map(function(_,C){var E=_.status,k=Lt(_,DO),$=E===jv||E===Bv;return h.createElement(t,Re({},S,{key:k.key,visible:$,eventProps:k,onVisibleChanged:function(T){g==null||g(T,{key:k.key}),T||c.removeKey(k.key)}}),function(P,T){return m(X(X({},P),{},{index:C}),T)})}))}}],[{key:"getDerivedStateFromProps",value:function(c,u){var d=c.keys,f=u.keyEntities,m=Av(d),g=LO(f,m);return{keyEntities:g.filter(function(v){var y=f.find(function(S){var _=S.key;return v.key===_});return!(y&&y.status===pg&&v.status===Lv)})}}}]),o})(h.Component);return K(n,"defaultProps",{component:"div"}),n}const WO=FO(EE),U1=h.createContext(!0);function VO(e){const t=h.useContext(U1),{children:n}=e,[,r]=gi(),{motion:i}=r,o=h.useRef(!1);return o.current||(o.current=t!==i),o.current?h.createElement(U1.Provider,{value:i},h.createElement(wO,{motion:i},n)):n}const UO=()=>null;var qO=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const KO=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let nf,TE,PE,OE;function jh(){return nf||wu}function GO(){return TE||Af}function XO(e){return Object.keys(e).some(t=>t.endsWith("Color"))}const YO=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:i}=e;t!==void 0&&(nf=t),n!==void 0&&(TE=n),"holderRender"in e&&(OE=i),r&&(XO(r)?XP(jh(),r):PE=r)},IE=()=>({getPrefixCls:(e,t)=>t||(e?`${jh()}-${e}`:jh()),getIconPrefixCls:GO,getRootPrefixCls:()=>nf||jh(),getTheme:()=>PE,holderRender:OE}),JO=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,alert:i,anchor:o,form:a,locale:c,componentSize:u,direction:d,space:f,splitter:m,virtual:g,dropdownMatchSelectWidth:v,popupMatchSelectWidth:y,popupOverflow:S,legacyLocale:_,parentContext:C,iconPrefixCls:E,theme:k,componentDisabled:$,segmented:P,statistic:T,spin:O,calendar:N,carousel:I,cascader:z,collapse:L,typography:M,checkbox:j,descriptions:B,divider:H,drawer:W,skeleton:V,steps:A,image:G,layout:q,list:D,mentions:U,modal:Y,progress:Z,result:ee,slider:re,breadcrumb:he,menu:fe,pagination:ue,input:Se,textArea:ae,empty:le,badge:ce,radio:ye,rate:me,switch:de,transfer:be,avatar:we,message:Te,tag:ze,table:Ee,card:ke,tabs:je,timeline:Oe,timePicker:Qe,upload:at,notification:$t,tree:pt,colorPicker:Je,datePicker:ft,rangePicker:Xe,flex:yt,wave:tt,dropdown:Le,warning:rt,tour:Me,tooltip:qe,popover:It,popconfirm:St,floatButton:nn,floatButtonGroup:Jt,variant:_n,inputNumber:In,treeSelect:on}=e,Ht=h.useCallback((nt,Ft)=>{const{prefixCls:Kt}=e;if(Ft)return Ft;const Bt=Kt||C.getPrefixCls("");return nt?`${Bt}-${nt}`:Bt},[C.getPrefixCls,e.prefixCls]),Rt=E||C.iconPrefixCls||Af,sn=n||C.csp;vO(Rt,sn);const Xt=SO(k,C.theme,{prefixCls:Ht("")}),ot={csp:sn,autoInsertSpaceInButton:r,alert:i,anchor:o,locale:c||_,direction:d,space:f,splitter:m,virtual:g,popupMatchSelectWidth:y??v,popupOverflow:S,getPrefixCls:Ht,iconPrefixCls:Rt,theme:Xt,segmented:P,statistic:T,spin:O,calendar:N,carousel:I,cascader:z,collapse:L,typography:M,checkbox:j,descriptions:B,divider:H,drawer:W,skeleton:V,steps:A,image:G,input:Se,textArea:ae,layout:q,list:D,mentions:U,modal:Y,progress:Z,result:ee,slider:re,breadcrumb:he,menu:fe,pagination:ue,empty:le,badge:ce,radio:ye,rate:me,switch:de,transfer:be,avatar:we,message:Te,tag:ze,table:Ee,card:ke,tabs:je,timeline:Oe,timePicker:Qe,upload:at,notification:$t,tree:pt,colorPicker:Je,datePicker:ft,rangePicker:Xe,flex:yt,wave:tt,dropdown:Le,warning:rt,tour:Me,tooltip:qe,popover:It,popconfirm:St,floatButton:nn,floatButtonGroup:Jt,variant:_n,inputNumber:In,treeSelect:on},Et=Object.assign({},C);Object.keys(ot).forEach(nt=>{ot[nt]!==void 0&&(Et[nt]=ot[nt])}),KO.forEach(nt=>{const Ft=e[nt];Ft&&(Et[nt]=Ft)}),typeof r<"u"&&(Et.button=Object.assign({autoInsertSpace:r},Et.button));const mt=Bu(()=>Et,Et,(nt,Ft)=>{const Kt=Object.keys(nt),Bt=Object.keys(Ft);return Kt.length!==Bt.length||Kt.some(At=>nt[At]!==Ft[At])}),{layer:Ie}=h.useContext(Lu),$e=h.useMemo(()=>({prefixCls:Rt,csp:sn,layer:Ie?"antd":void 0}),[Rt,sn,Ie]);let xe=h.createElement(h.Fragment,null,h.createElement(UO,{dropdownMatchSelectWidth:v}),t);const Ae=h.useMemo(()=>{var nt,Ft,Kt,Bt;return Ml(((nt=Qs.Form)===null||nt===void 0?void 0:nt.defaultValidateMessages)||{},((Kt=(Ft=mt.locale)===null||Ft===void 0?void 0:Ft.Form)===null||Kt===void 0?void 0:Kt.defaultValidateMessages)||{},((Bt=mt.form)===null||Bt===void 0?void 0:Bt.validateMessages)||{},(a==null?void 0:a.validateMessages)||{})},[mt,a==null?void 0:a.validateMessages]);Object.keys(Ae).length>0&&(xe=h.createElement($P.Provider,{value:Ae},xe)),c&&(xe=h.createElement(IP,{locale:c,_ANT_MARK__:OP},xe)),xe=h.createElement(Sy.Provider,{value:$e},xe),u&&(xe=h.createElement(YP,{size:u},xe)),xe=h.createElement(VO,null,xe);const et=h.useMemo(()=>{const nt=Xt||{},{algorithm:Ft,token:Kt,components:Bt,cssVar:At}=nt,Pn=qO(nt,["algorithm","token","components","cssVar"]),kn=Ft&&(!Array.isArray(Ft)||Ft.length>0)?yv(Ft):lE,Nn={};Object.entries(Bt||{}).forEach(([cn,mn])=>{const He=Object.assign({},mn);"algorithm"in He&&(He.algorithm===!0?He.theme=kn:(Array.isArray(He.algorithm)||typeof He.algorithm=="function")&&(He.theme=yv(He.algorithm)),delete He.algorithm),Nn[cn]=He});const Hn=Object.assign(Object.assign({},Cu),Kt);return Object.assign(Object.assign({},Pn),{theme:kn,token:Hn,components:Nn,override:Object.assign({override:Hn},Nn),cssVar:At})},[Xt]);return k&&(xe=h.createElement(cE.Provider,{value:et},xe)),mt.warning&&(xe=h.createElement(kP.Provider,{value:mt.warning},xe)),$!==void 0&&(xe=h.createElement(uE,{disabled:$},xe)),h.createElement(Ot.Provider,{value:mt},xe)},Qo=e=>{const t=h.useContext(Ot),n=h.useContext(Cy);return h.createElement(JO,Object.assign({parentContext:t,legacyLocale:n},e))};Qo.ConfigContext=Ot;Qo.SizeContext=Yl;Qo.config=YO;Qo.useConfig=JP;Object.defineProperty(Qo,"SizeContext",{get:()=>Yl});var QO={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};function NE(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function ZO(e){return NE(e)instanceof ShadowRoot}function rf(e){return ZO(e)?NE(e):null}function eI(e){return e.replace(/-(.)/g,function(t,n){return n.toUpperCase()})}function tI(e,t){Ar(e,"[@ant-design/icons] ".concat(t))}function q1(e){return _t(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(_t(e.icon)==="object"||typeof e.icon=="function")}function K1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:delete t[n],t[eI(n)]=r}return t},{})}function Dv(e,t,n){return n?J.createElement(e.tag,X(X({key:t},K1(e.attrs)),n),(e.children||[]).map(function(r,i){return Dv(r,"".concat(t,"-").concat(e.tag,"-").concat(i))})):J.createElement(e.tag,X({key:t},K1(e.attrs)),(e.children||[]).map(function(r,i){return Dv(r,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function ME(e){return Pa(e)[0]}function zE(e){return e?Array.isArray(e)?e:[e]:[]}var nI=`
96
+ .anticon {
97
+ display: inline-flex;
98
+ align-items: center;
99
+ color: inherit;
100
+ font-style: normal;
101
+ line-height: 0;
102
+ text-align: center;
103
+ text-transform: none;
104
+ vertical-align: -0.125em;
105
+ text-rendering: optimizeLegibility;
106
+ -webkit-font-smoothing: antialiased;
107
+ -moz-osx-font-smoothing: grayscale;
108
+ }
109
+
110
+ .anticon > * {
111
+ line-height: 1;
112
+ }
113
+
114
+ .anticon svg {
115
+ display: inline-block;
116
+ }
117
+
118
+ .anticon::before {
119
+ display: none;
120
+ }
121
+
122
+ .anticon .anticon-icon {
123
+ display: block;
124
+ }
125
+
126
+ .anticon[tabindex] {
127
+ cursor: pointer;
128
+ }
129
+
130
+ .anticon-spin::before,
131
+ .anticon-spin {
132
+ display: inline-block;
133
+ -webkit-animation: loadingCircle 1s infinite linear;
134
+ animation: loadingCircle 1s infinite linear;
135
+ }
136
+
137
+ @-webkit-keyframes loadingCircle {
138
+ 100% {
139
+ -webkit-transform: rotate(360deg);
140
+ transform: rotate(360deg);
141
+ }
142
+ }
143
+
144
+ @keyframes loadingCircle {
145
+ 100% {
146
+ -webkit-transform: rotate(360deg);
147
+ transform: rotate(360deg);
148
+ }
149
+ }
150
+ `,rI=function(t){var n=h.useContext(Sy),r=n.csp,i=n.prefixCls,o=n.layer,a=nI;i&&(a=a.replace(/anticon/g,i)),o&&(a="@layer ".concat(o,` {
151
+ `).concat(a,`
152
+ }`)),h.useEffect(function(){var c=t.current,u=rf(c);ps(a,"@ant-design-icons",{prepend:!o,csp:r,attachTo:u})},[])},iI=["icon","className","onClick","style","primaryColor","secondaryColor"],du={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function oI(e){var t=e.primaryColor,n=e.secondaryColor;du.primaryColor=t,du.secondaryColor=n||ME(t),du.calculated=!!n}function sI(){return X({},du)}var ic=function(t){var n=t.icon,r=t.className,i=t.onClick,o=t.style,a=t.primaryColor,c=t.secondaryColor,u=Lt(t,iI),d=h.useRef(),f=du;if(a&&(f={primaryColor:a,secondaryColor:c||ME(a)}),rI(d),tI(q1(n),"icon should be icon definiton, but got ".concat(n)),!q1(n))return null;var m=n;return m&&typeof m.icon=="function"&&(m=X(X({},m),{},{icon:m.icon(f.primaryColor,f.secondaryColor)})),Dv(m.icon,"svg-".concat(m.name),X(X({className:r,onClick:i,style:o,"data-icon":m.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},u),{},{ref:d}))};ic.displayName="IconReact";ic.getTwoToneColors=sI;ic.setTwoToneColors=oI;function jE(e){var t=zE(e),n=se(t,2),r=n[0],i=n[1];return ic.setTwoToneColors({primaryColor:r,secondaryColor:i})}function aI(){var e=ic.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var lI=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];jE(Zh.primary);var wn=h.forwardRef(function(e,t){var n=e.className,r=e.icon,i=e.spin,o=e.rotate,a=e.tabIndex,c=e.onClick,u=e.twoToneColor,d=Lt(e,lI),f=h.useContext(Sy),m=f.prefixCls,g=m===void 0?"anticon":m,v=f.rootClassName,y=ne(v,g,K(K({},"".concat(g,"-").concat(r.name),!!r.name),"".concat(g,"-spin"),!!i||r.name==="loading"),n),S=a;S===void 0&&c&&(S=-1);var _=o?{msTransform:"rotate(".concat(o,"deg)"),transform:"rotate(".concat(o,"deg)")}:void 0,C=zE(u),E=se(C,2),k=E[0],$=E[1];return h.createElement("span",Re({role:"img","aria-label":r.name},d,{ref:t,tabIndex:S,onClick:c,className:y}),h.createElement(ic,{icon:r,primaryColor:k,secondaryColor:$,style:_}))});wn.displayName="AntdIcon";wn.getTwoToneColor=aI;wn.setTwoToneColor=jE;var cI=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:QO}))},BE=h.forwardRef(cI),uI={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"},dI=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:uI}))},Hf=h.forwardRef(dI),hI={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"},fI=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:hI}))},ta=h.forwardRef(fI),mI={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"},pI=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:mI}))},LE=h.forwardRef(pI),gI={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"},vI=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:gI}))},AE=h.forwardRef(vI),yI=`accept acceptCharset accessKey action allowFullScreen allowTransparency
153
+ alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
154
+ charSet checked classID className colSpan cols content contentEditable contextMenu
155
+ controls coords crossOrigin data dateTime default defer dir disabled download draggable
156
+ encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
157
+ headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
158
+ is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
159
+ mediaGroup method min minLength multiple muted name noValidate nonce open
160
+ optimum pattern placeholder poster preload radioGroup readOnly rel required
161
+ reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
162
+ shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
163
+ summary tabIndex target title type useMap value width wmode wrap`,bI=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
164
+ onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
165
+ onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
166
+ onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
167
+ onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
168
+ onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
169
+ onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,_I="".concat(yI," ").concat(bI).split(/[\s\n]+/),SI="aria-",CI="data-";function G1(e,t){return e.indexOf(t)===0}function Ki(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;t===!1?n={aria:!0,data:!0,attr:!0}:t===!0?n={aria:!0}:n=X({},t);var r={};return Object.keys(e).forEach(function(i){(n.aria&&(i==="role"||G1(i,SI))||n.data&&G1(i,CI)||n.attr&&_I.includes(i))&&(r[i]=e[i])}),r}function DE(e){return e&&J.isValidElement(e)&&e.type===J.Fragment}const HE=(e,t,n)=>J.isValidElement(e)?J.cloneElement(e,typeof n=="function"?n(e.props||{}):n):t;function pi(e,t){return HE(e,e,t)}const Io=e=>{const[,,,,t]=gi();return t?`${e}-css-var`:""};var Ge={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,CAPS_LOCK:20,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,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},FE=h.forwardRef(function(e,t){var n=e.prefixCls,r=e.style,i=e.className,o=e.duration,a=o===void 0?4.5:o,c=e.showProgress,u=e.pauseOnHover,d=u===void 0?!0:u,f=e.eventKey,m=e.content,g=e.closable,v=e.closeIcon,y=v===void 0?"x":v,S=e.props,_=e.onClick,C=e.onNoticeClose,E=e.times,k=e.hovering,$=h.useState(!1),P=se($,2),T=P[0],O=P[1],N=h.useState(0),I=se(N,2),z=I[0],L=I[1],M=h.useState(0),j=se(M,2),B=j[0],H=j[1],W=k||T,V=a>0&&c,A=function(){C(f)},G=function(ee){(ee.key==="Enter"||ee.code==="Enter"||ee.keyCode===Ge.ENTER)&&A()};h.useEffect(function(){if(!W&&a>0){var Z=Date.now()-B,ee=setTimeout(function(){A()},a*1e3-B);return function(){d&&clearTimeout(ee),H(Date.now()-Z)}}},[a,W,E]),h.useEffect(function(){if(!W&&V&&(d||B===0)){var Z=performance.now(),ee,re=function he(){cancelAnimationFrame(ee),ee=requestAnimationFrame(function(fe){var ue=fe+B-Z,Se=Math.min(ue/(a*1e3),1);L(Se*100),Se<1&&he()})};return re(),function(){d&&cancelAnimationFrame(ee)}}},[a,B,W,V,E]);var q=h.useMemo(function(){return _t(g)==="object"&&g!==null?g:g?{closeIcon:y}:{}},[g,y]),D=Ki(q,!0),U=100-(!z||z<0?0:z>100?100:z),Y="".concat(n,"-notice");return h.createElement("div",Re({},S,{ref:t,className:ne(Y,i,K({},"".concat(Y,"-closable"),g)),style:r,onMouseEnter:function(ee){var re;O(!0),S==null||(re=S.onMouseEnter)===null||re===void 0||re.call(S,ee)},onMouseLeave:function(ee){var re;O(!1),S==null||(re=S.onMouseLeave)===null||re===void 0||re.call(S,ee)},onClick:_}),h.createElement("div",{className:"".concat(Y,"-content")},m),g&&h.createElement("a",Re({tabIndex:0,className:"".concat(Y,"-close"),onKeyDown:G,"aria-label":"Close"},D,{onClick:function(ee){ee.preventDefault(),ee.stopPropagation(),A()}}),q.closeIcon),V&&h.createElement("progress",{className:"".concat(Y,"-progress"),max:"100",value:U},U+"%"))}),WE=J.createContext({}),wI=function(t){var n=t.children,r=t.classNames;return J.createElement(WE.Provider,{value:{classNames:r}},n)},X1=8,Y1=3,J1=16,xI=function(t){var n={offset:X1,threshold:Y1,gap:J1};if(t&&_t(t)==="object"){var r,i,o;n.offset=(r=t.offset)!==null&&r!==void 0?r:X1,n.threshold=(i=t.threshold)!==null&&i!==void 0?i:Y1,n.gap=(o=t.gap)!==null&&o!==void 0?o:J1}return[!!t,n]},EI=["className","style","classNames","styles"],kI=function(t){var n=t.configList,r=t.placement,i=t.prefixCls,o=t.className,a=t.style,c=t.motion,u=t.onAllNoticeRemoved,d=t.onNoticeClose,f=t.stack,m=h.useContext(WE),g=m.classNames,v=h.useRef({}),y=h.useState(null),S=se(y,2),_=S[0],C=S[1],E=h.useState([]),k=se(E,2),$=k[0],P=k[1],T=n.map(function(W){return{config:W,key:String(W.key)}}),O=xI(f),N=se(O,2),I=N[0],z=N[1],L=z.offset,M=z.threshold,j=z.gap,B=I&&($.length>0||T.length<=M),H=typeof c=="function"?c(r):c;return h.useEffect(function(){I&&$.length>1&&P(function(W){return W.filter(function(V){return T.some(function(A){var G=A.key;return V===G})})})},[$,T,I]),h.useEffect(function(){var W;if(I&&v.current[(W=T[T.length-1])===null||W===void 0?void 0:W.key]){var V;C(v.current[(V=T[T.length-1])===null||V===void 0?void 0:V.key])}},[T,I]),J.createElement(WO,Re({key:r,className:ne(i,"".concat(i,"-").concat(r),g==null?void 0:g.list,o,K(K({},"".concat(i,"-stack"),!!I),"".concat(i,"-stack-expanded"),B)),style:a,keys:T,motionAppear:!0},H,{onAllRemoved:function(){u(r)}}),function(W,V){var A=W.config,G=W.className,q=W.style,D=W.index,U=A,Y=U.key,Z=U.times,ee=String(Y),re=A,he=re.className,fe=re.style,ue=re.classNames,Se=re.styles,ae=Lt(re,EI),le=T.findIndex(function(Oe){return Oe.key===ee}),ce={};if(I){var ye=T.length-1-(le>-1?le:D-1),me=r==="top"||r==="bottom"?"-50%":"0";if(ye>0){var de,be,we;ce.height=B?(de=v.current[ee])===null||de===void 0?void 0:de.offsetHeight:_==null?void 0:_.offsetHeight;for(var Te=0,ze=0;ze<ye;ze++){var Ee;Te+=((Ee=v.current[T[T.length-1-ze].key])===null||Ee===void 0?void 0:Ee.offsetHeight)+j}var ke=(B?Te:ye*L)*(r.startsWith("top")?1:-1),je=!B&&_!==null&&_!==void 0&&_.offsetWidth&&(be=v.current[ee])!==null&&be!==void 0&&be.offsetWidth?((_==null?void 0:_.offsetWidth)-L*2*(ye<3?ye:3))/((we=v.current[ee])===null||we===void 0?void 0:we.offsetWidth):1;ce.transform="translate3d(".concat(me,", ").concat(ke,"px, 0) scaleX(").concat(je,")")}else ce.transform="translate3d(".concat(me,", 0, 0)")}return J.createElement("div",{ref:V,className:ne("".concat(i,"-notice-wrapper"),G,ue==null?void 0:ue.wrapper),style:X(X(X({},q),ce),Se==null?void 0:Se.wrapper),onMouseEnter:function(){return P(function(Qe){return Qe.includes(ee)?Qe:[].concat(We(Qe),[ee])})},onMouseLeave:function(){return P(function(Qe){return Qe.filter(function(at){return at!==ee})})}},J.createElement(FE,Re({},ae,{ref:function(Qe){le>-1?v.current[ee]=Qe:delete v.current[ee]},prefixCls:i,classNames:ue,styles:Se,className:ne(he,g==null?void 0:g.notice),style:fe,times:Z,key:Y,eventKey:Y,onNoticeClose:d,hovering:I&&$.length>0})))})},$I=h.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-notification":n,i=e.container,o=e.motion,a=e.maxCount,c=e.className,u=e.style,d=e.onAllRemoved,f=e.stack,m=e.renderNotifications,g=h.useState([]),v=se(g,2),y=v[0],S=v[1],_=function(I){var z,L=y.find(function(M){return M.key===I});L==null||(z=L.onClose)===null||z===void 0||z.call(L),S(function(M){return M.filter(function(j){return j.key!==I})})};h.useImperativeHandle(t,function(){return{open:function(I){S(function(z){var L=We(z),M=L.findIndex(function(H){return H.key===I.key}),j=X({},I);if(M>=0){var B;j.times=(((B=z[M])===null||B===void 0?void 0:B.times)||0)+1,L[M]=j}else j.times=0,L.push(j);return a>0&&L.length>a&&(L=L.slice(-a)),L})},close:function(I){_(I)},destroy:function(){S([])}}});var C=h.useState({}),E=se(C,2),k=E[0],$=E[1];h.useEffect(function(){var N={};y.forEach(function(I){var z=I.placement,L=z===void 0?"topRight":z;L&&(N[L]=N[L]||[],N[L].push(I))}),Object.keys(k).forEach(function(I){N[I]=N[I]||[]}),$(N)},[y]);var P=function(I){$(function(z){var L=X({},z),M=L[I]||[];return M.length||delete L[I],L})},T=h.useRef(!1);if(h.useEffect(function(){Object.keys(k).length>0?T.current=!0:T.current&&(d==null||d(),T.current=!1)},[k]),!i)return null;var O=Object.keys(k);return Js.createPortal(h.createElement(h.Fragment,null,O.map(function(N){var I=k[N],z=h.createElement(kI,{key:N,configList:I,placement:N,prefixCls:r,className:c==null?void 0:c(N),style:u==null?void 0:u(N),motion:o,onNoticeClose:_,onAllNoticeRemoved:P,stack:f});return m?m(z,{prefixCls:r,key:N}):z})),i)}),RI=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],TI=function(){return document.body},Q1=0;function PI(){for(var e={},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(i){i&&Object.keys(i).forEach(function(o){var a=i[o];a!==void 0&&(e[o]=a)})}),e}function OI(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.getContainer,n=t===void 0?TI:t,r=e.motion,i=e.prefixCls,o=e.maxCount,a=e.className,c=e.style,u=e.onAllRemoved,d=e.stack,f=e.renderNotifications,m=Lt(e,RI),g=h.useState(),v=se(g,2),y=v[0],S=v[1],_=h.useRef(),C=h.createElement($I,{container:y,ref:_,prefixCls:i,motion:r,maxCount:o,className:a,style:c,onAllRemoved:u,stack:d,renderNotifications:f}),E=h.useState([]),k=se(E,2),$=k[0],P=k[1],T=er(function(N){var I=PI(m,N);(I.key===null||I.key===void 0)&&(I.key="rc-notification-".concat(Q1),Q1+=1),P(function(z){return[].concat(We(z),[{type:"open",config:I}])})}),O=h.useMemo(function(){return{open:T,close:function(I){P(function(z){return[].concat(We(z),[{type:"close",key:I}])})},destroy:function(){P(function(I){return[].concat(We(I),[{type:"destroy"}])})}}},[]);return h.useEffect(function(){S(n())}),h.useEffect(function(){if(_.current&&$.length){$.forEach(function(z){switch(z.type){case"open":_.current.open(z.config);break;case"close":_.current.close(z.key);break;case"destroy":_.current.destroy();break}});var N,I;P(function(z){return(N!==z||!I)&&(N=z,I=z.filter(function(L){return!$.includes(L)})),I})}},[$]),[O,C]}var II={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"},NI=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:II}))},Du=h.forwardRef(NI);function Hv(...e){const t={};return e.forEach(n=>{n&&Object.keys(n).forEach(r=>{n[r]!==void 0&&(t[r]=n[r])})}),t}function Ql(e){if(!e)return;const{closable:t,closeIcon:n}=e;return{closable:t,closeIcon:n}}function Z1(e){const{closable:t,closeIcon:n}=e||{};return J.useMemo(()=>{if(!t&&(t===!1||n===!1||n===null))return!1;if(t===void 0&&n===void 0)return null;let r={closeIcon:typeof n!="boolean"&&n!==null?n:void 0};return t&&typeof t=="object"&&(r=Object.assign(Object.assign({},r),t)),r},[t,n])}const MI={},Ey=(e,t,n=MI)=>{const r=Z1(e),i=Z1(t),[o]=ys("global",Qs.global),a=typeof r!="boolean"?!!(r!=null&&r.disabled):!1,c=J.useMemo(()=>Object.assign({closeIcon:J.createElement(ta,null)},n),[n]),u=J.useMemo(()=>r===!1?!1:r?Hv(c,i,r):i===!1?!1:i?Hv(c,i):c.closable?c:!1,[r,i,c]);return J.useMemo(()=>{var d,f;if(u===!1)return[!1,null,a,{}];const{closeIconRender:m}=c,{closeIcon:g}=u;let v=g;const y=Ki(u,!0);return v!=null&&(m&&(v=m(g)),v=J.isValidElement(v)?J.cloneElement(v,Object.assign(Object.assign(Object.assign({},v.props),{"aria-label":(f=(d=v.props)===null||d===void 0?void 0:d["aria-label"])!==null&&f!==void 0?f:o.close}),y)):J.createElement("span",Object.assign({"aria-label":o.close},y),v)),[!0,v,a,y]},[a,o.close,u,c])},zI=()=>J.useReducer(e=>e+1,0),jI=()=>{const[e,t]=h.useState([]),n=h.useCallback(r=>(t(i=>[].concat(We(i),[r])),()=>{t(i=>i.filter(o=>o!==r))}),[]);return[e,n]},Hu=J.createContext(void 0),Ws=100,BI=10,VE=Ws*BI,UE={Modal:Ws,Drawer:Ws,Popover:Ws,Popconfirm:Ws,Tooltip:Ws,Tour:Ws,FloatButton:Ws},LI={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function AI(e){return e in UE}const oc=(e,t)=>{const[,n]=gi(),r=J.useContext(Hu),i=AI(e);let o;if(t!==void 0)o=[t,t];else{let a=r??0;i?a+=(r?0:n.zIndexPopupBase)+UE[e]:a+=LI[e],o=[r===void 0?t:a,a]}return o},DI=e=>{const{componentCls:t,iconCls:n,boxShadow:r,colorText:i,colorSuccess:o,colorError:a,colorWarning:c,colorInfo:u,fontSizeLG:d,motionEaseInOutCirc:f,motionDurationSlow:m,marginXS:g,paddingXS:v,borderRadiusLG:y,zIndexPopup:S,contentPadding:_,contentBg:C}=e,E=`${t}-notice`,k=new Yt("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:v,transform:"translateY(0)",opacity:1}}),$=new Yt("MessageMoveOut",{"0%":{maxHeight:e.height,padding:v,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}}),P={padding:v,textAlign:"center",[`${t}-custom-content`]:{display:"flex",alignItems:"center"},[`${t}-custom-content > ${n}`]:{marginInlineEnd:g,fontSize:d},[`${E}-content`]:{display:"inline-block",padding:_,background:C,borderRadius:y,boxShadow:r,pointerEvents:"all"},[`${t}-success > ${n}`]:{color:o},[`${t}-error > ${n}`]:{color:a},[`${t}-warning > ${n}`]:{color:c},[`${t}-info > ${n},
170
+ ${t}-loading > ${n}`]:{color:u}};return[{[t]:Object.assign(Object.assign({},Un(e)),{color:i,position:"fixed",top:g,width:"100%",pointerEvents:"none",zIndex:S,[`${t}-move-up`]:{animationFillMode:"forwards"},[`
171
+ ${t}-move-up-appear,
172
+ ${t}-move-up-enter
173
+ `]:{animationName:k,animationDuration:m,animationPlayState:"paused",animationTimingFunction:f},[`
174
+ ${t}-move-up-appear${t}-move-up-appear-active,
175
+ ${t}-move-up-enter${t}-move-up-enter-active
176
+ `]:{animationPlayState:"running"},[`${t}-move-up-leave`]:{animationName:$,animationDuration:m,animationPlayState:"paused",animationTimingFunction:f},[`${t}-move-up-leave${t}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[t]:{[`${E}-wrapper`]:Object.assign({},P)}},{[`${t}-notice-pure-panel`]:Object.assign(Object.assign({},P),{padding:0,textAlign:"start"})}]},HI=e=>({zIndexPopup:e.zIndexPopupBase+VE+10,contentBg:e.colorBgElevated,contentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`}),qE=bn("Message",e=>{const t=tn(e,{height:150});return DI(t)},HI);var FI=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const WI={info:h.createElement(AE,null),success:h.createElement(BE,null),error:h.createElement(Hf,null),warning:h.createElement(LE,null),loading:h.createElement(Du,null)},KE=({prefixCls:e,type:t,icon:n,children:r})=>h.createElement("div",{className:ne(`${e}-custom-content`,`${e}-${t}`)},n||WI[t],h.createElement("span",null,r)),VI=e=>{const{prefixCls:t,className:n,type:r,icon:i,content:o}=e,a=FI(e,["prefixCls","className","type","icon","content"]),{getPrefixCls:c}=h.useContext(Ot),u=t||c("message"),d=Io(u),[f,m,g]=qE(u,d);return f(h.createElement(FE,Object.assign({},a,{prefixCls:u,className:ne(n,m,`${u}-notice-pure-panel`,g,d),eventKey:"pure",duration:null,content:h.createElement(KE,{prefixCls:u,type:r,icon:i},o)})))};function UI(e,t){return{motionName:t??`${e}-move-up`}}function ky(e){let t;const n=new Promise(i=>{t=e(()=>{i(!0)})}),r=()=>{t==null||t()};return r.then=(i,o)=>n.then(i,o),r.promise=n,r}var qI=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const KI=8,GI=3,XI=({children:e,prefixCls:t})=>{const n=Io(t),[r,i,o]=qE(t,n);return r(h.createElement(wI,{classNames:{list:ne(i,o,n)}},e))},YI=(e,{prefixCls:t,key:n})=>h.createElement(XI,{prefixCls:t,key:n},e),JI=h.forwardRef((e,t)=>{const{top:n,prefixCls:r,getContainer:i,maxCount:o,duration:a=GI,rtl:c,transitionName:u,onAllRemoved:d}=e,{getPrefixCls:f,getPopupContainer:m,message:g,direction:v}=h.useContext(Ot),y=r||f("message"),S=()=>({left:"50%",transform:"translateX(-50%)",top:n??KI}),_=()=>ne({[`${y}-rtl`]:c??v==="rtl"}),C=()=>UI(y,u),E=h.createElement("span",{className:`${y}-close-x`},h.createElement(ta,{className:`${y}-close-icon`})),[k,$]=OI({prefixCls:y,style:S,className:_,motion:C,closable:!1,closeIcon:E,duration:a,getContainer:()=>(i==null?void 0:i())||(m==null?void 0:m())||document.body,maxCount:o,onAllRemoved:d,renderNotifications:YI});return h.useImperativeHandle(t,()=>Object.assign(Object.assign({},k),{prefixCls:y,message:g})),$});let eC=0;function GE(e){const t=h.useRef(null);return Lf(),[h.useMemo(()=>{const r=u=>{var d;(d=t.current)===null||d===void 0||d.close(u)},i=u=>{if(!t.current){const T=()=>{};return T.then=()=>{},T}const{open:d,prefixCls:f,message:m}=t.current,g=`${f}-notice`,{content:v,icon:y,type:S,key:_,className:C,style:E,onClose:k}=u,$=qI(u,["content","icon","type","key","className","style","onClose"]);let P=_;return P==null&&(eC+=1,P=`antd-message-${eC}`),ky(T=>(d(Object.assign(Object.assign({},$),{key:P,content:h.createElement(KE,{prefixCls:f,type:S,icon:y},v),placement:"top",className:ne(S&&`${g}-${S}`,C,m==null?void 0:m.className),style:Object.assign(Object.assign({},m==null?void 0:m.style),E),onClose:()=>{k==null||k(),T()}})),()=>{r(P)}))},a={open:i,destroy:u=>{var d;u!==void 0?r(u):(d=t.current)===null||d===void 0||d.destroy()}};return["info","success","warning","error","loading"].forEach(u=>{const d=(f,m,g)=>{let v;f&&typeof f=="object"&&"content"in f?v=f:v={content:f};let y,S;typeof m=="function"?S=m:(y=m,S=g);const _=Object.assign(Object.assign({onClose:S,duration:y},v),{type:u});return i(_)};a[u]=d}),a},[]),h.createElement(JI,Object.assign({key:"message-holder"},e,{ref:t}))]}function QI(e){return GE(e)}function XE(e,t){this.v=e,this.k=t}function ii(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}ii=function(a,c,u,d){function f(m,g){ii(a,m,function(v){return this._invoke(m,g,v)})}c?i?i(a,c,{value:u,enumerable:!d,configurable:!d,writable:!d}):a[c]=u:(f("next",0),f("throw",1),f("return",2))},ii(e,t,n,r)}function $y(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(v,y,S,_){var C=y&&y.prototype instanceof c?y:c,E=Object.create(C.prototype);return ii(E,"_invoke",(function(k,$,P){var T,O,N,I=0,z=P||[],L=!1,M={p:0,n:0,v:e,a:j,f:j.bind(e,4),d:function(H,W){return T=H,O=0,N=e,M.n=W,a}};function j(B,H){for(O=B,N=H,t=0;!L&&I&&!W&&t<z.length;t++){var W,V=z[t],A=M.p,G=V[2];B>3?(W=G===H)&&(N=V[(O=V[4])?5:(O=3,3)],V[4]=V[5]=e):V[0]<=A&&((W=B<2&&A<V[1])?(O=0,M.v=H,M.n=V[1]):A<G&&(W=B<3||V[0]>H||H>G)&&(V[4]=B,V[5]=H,M.n=G,O=0))}if(W||B>1)return a;throw L=!0,H}return function(B,H,W){if(I>1)throw TypeError("Generator is already running");for(L&&H===1&&j(H,W),O=H,N=W;(t=O<2?e:N)||!L;){T||(O?O<3?(O>1&&(M.n=-1),j(O,N)):M.n=N:M.v=N);try{if(I=2,T){if(O||(B="next"),t=T[B]){if(!(t=t.call(T,N)))throw TypeError("iterator result is not an object");if(!t.done)return t;N=t.value,O<2&&(O=0)}else O===1&&(t=T.return)&&t.call(T),O<2&&(N=TypeError("The iterator does not provide a '"+B+"' method"),O=1);T=e}else if((t=(L=M.n<0)?N:k.call($,M))!==a)break}catch(V){T=e,O=1,N=V}finally{I=1}}return{value:t,done:L}}})(v,S,_),!0),E}var a={};function c(){}function u(){}function d(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(ii(t={},r,function(){return this}),t),m=d.prototype=c.prototype=Object.create(f);function g(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,d):(v.__proto__=d,ii(v,i,"GeneratorFunction")),v.prototype=Object.create(m),v}return u.prototype=d,ii(m,"constructor",d),ii(d,"constructor",u),u.displayName="GeneratorFunction",ii(d,i,"GeneratorFunction"),ii(m),ii(m,i,"Generator"),ii(m,r,function(){return this}),ii(m,"toString",function(){return"[object Generator]"}),($y=function(){return{w:o,m:g}})()}function of(e,t){function n(i,o,a,c){try{var u=e[i](o),d=u.value;return d instanceof XE?t.resolve(d.v).then(function(f){n("next",f,a,c)},function(f){n("throw",f,a,c)}):t.resolve(d).then(function(f){u.value=f,a(u)},function(f){return n("throw",f,a,c)})}catch(f){c(f)}}var r;this.next||(ii(of.prototype),ii(of.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),ii(this,"_invoke",function(i,o,a){function c(){return new t(function(u,d){n(i,a,u,d)})}return r=r?r.then(c,c):c()},!0)}function YE(e,t,n,r,i){return new of($y().w(e,t,n,r),i||Promise)}function ZI(e,t,n,r,i){var o=YE(e,t,n,r,i);return o.next().then(function(a){return a.done?a.value:o.next()})}function eN(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function i(){for(;n.length;)if((r=n.pop())in t)return i.value=r,i.done=!1,i;return i.done=!0,i}}function tC(e){if(e!=null){var t=e[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(_t(e)+" is not iterable")}function ai(){var e=$y(),t=e.m(ai),n=(Object.getPrototypeOf?Object.getPrototypeOf(t):t.__proto__).constructor;function r(a){var c=typeof a=="function"&&a.constructor;return!!c&&(c===n||(c.displayName||c.name)==="GeneratorFunction")}var i={throw:1,return:2,break:3,continue:3};function o(a){var c,u;return function(d){c||(c={stop:function(){return u(d.a,2)},catch:function(){return d.v},abrupt:function(m,g){return u(d.a,i[m],g)},delegateYield:function(m,g,v){return c.resultName=g,u(d.d,tC(m),v)},finish:function(m){return u(d.f,m)}},u=function(m,g,v){d.p=c.prev,d.n=c.next;try{return m(g,v)}finally{c.next=d.n}}),c.resultName&&(c[c.resultName]=d.v,c.resultName=void 0),c.sent=d.v,c.next=d.n;try{return a.call(this,c)}finally{d.p=c.prev,d.n=c.next}}}return(ai=function(){return{wrap:function(u,d,f,m){return e.w(o(u),d,f,m&&m.reverse())},isGeneratorFunction:r,mark:e.m,awrap:function(u,d){return new XE(u,d)},AsyncIterator:of,async:function(u,d,f,m,g){return(r(d)?YE:ZI)(o(u),d,f,m,g)},keys:eN,values:tC}})()}function nC(e,t,n,r,i,o,a){try{var c=e[o](a),u=c.value}catch(d){return void n(d)}c.done?t(u):Promise.resolve(u).then(r,i)}function Da(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(u){nC(o,r,i,a,c,"next",u)}function c(u){nC(o,r,i,a,c,"throw",u)}a(void 0)})}}var Fu=X({},LT),tN=Fu.version,gg=Fu.render,nN=Fu.unmountComponentAtNode,Ff;try{var rN=Number((tN||"").split(".")[0]);rN>=18&&(Ff=Fu.createRoot)}catch{}function rC(e){var t=Fu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&_t(t)==="object"&&(t.usingClientEntryPoint=e)}var sf="__rc_react_root__";function iN(e,t){rC(!0);var n=t[sf]||Ff(t);rC(!1),n.render(e),t[sf]=n}function oN(e,t){gg==null||gg(e,t)}function sN(e,t){if(Ff){iN(e,t);return}oN(e,t)}function aN(e){return Fv.apply(this,arguments)}function Fv(){return Fv=Da(ai().mark(function e(t){return ai().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.resolve().then(function(){var i;(i=t[sf])===null||i===void 0||i.unmount(),delete t[sf]}));case 1:case"end":return r.stop()}},e)})),Fv.apply(this,arguments)}function lN(e){nN(e)}function cN(e){return Wv.apply(this,arguments)}function Wv(){return Wv=Da(ai().mark(function e(t){return ai().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(Ff===void 0){r.next=2;break}return r.abrupt("return",aN(t));case 2:lN(t);case 3:case"end":return r.stop()}},e)})),Wv.apply(this,arguments)}const uN=(e,t)=>(sN(e,t),()=>cN(t));let dN=uN;function Ry(e){return dN}const vg=()=>({height:0,opacity:0}),iC=e=>{const{scrollHeight:t}=e;return{height:t,opacity:1}},hN=e=>({height:e?e.offsetHeight:0}),yg=(e,t)=>(t==null?void 0:t.deadline)===!0||t.propertyName==="height",JE=(e=wu)=>({motionName:`${e}-motion-collapse`,onAppearStart:vg,onEnterStart:vg,onAppearActive:iC,onEnterActive:iC,onLeaveStart:hN,onLeaveActive:vg,onAppearEnd:yg,onEnterEnd:yg,onLeaveEnd:yg,motionDeadline:500}),Ko=(e,t,n)=>n!==void 0?n:`${e}-${t}`;function fr(e,t){var n=Object.assign({},e);return Array.isArray(t)&&t.forEach(function(r){delete n[r]}),n}const Ty=(function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),n=t.width,r=t.height;if(n||r)return!0}if(e.getBoundingClientRect){var i=e.getBoundingClientRect(),o=i.width,a=i.height;if(o||a)return!0}}return!1}),fN=e=>{const{componentCls:t,colorPrimary:n}=e;return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${n})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow ${e.motionDurationSlow} ${e.motionEaseInOut}`,`opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`].join(",")}}}}},mN=gO("Wave",fN),Py=`${wu}-wave-target`;function pN(e){return e&&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 gN(e){var t;const{borderTopColor:n,borderColor:r,backgroundColor:i}=getComputedStyle(e);return(t=[n,r,i].find(pN))!==null&&t!==void 0?t:null}function bg(e){return Number.isNaN(e)?0:e}const vN=e=>{const{className:t,target:n,component:r,registerUnmount:i}=e,o=h.useRef(null),a=h.useRef(null);h.useEffect(()=>{a.current=i()},[]);const[c,u]=h.useState(null),[d,f]=h.useState([]),[m,g]=h.useState(0),[v,y]=h.useState(0),[S,_]=h.useState(0),[C,E]=h.useState(0),[k,$]=h.useState(!1),P={left:m,top:v,width:S,height:C,borderRadius:d.map(N=>`${N}px`).join(" ")};c&&(P["--wave-color"]=c);function T(){const N=getComputedStyle(n);u(gN(n));const I=N.position==="static",{borderLeftWidth:z,borderTopWidth:L}=N;g(I?n.offsetLeft:bg(-Number.parseFloat(z))),y(I?n.offsetTop:bg(-Number.parseFloat(L))),_(n.offsetWidth),E(n.offsetHeight);const{borderTopLeftRadius:M,borderTopRightRadius:j,borderBottomLeftRadius:B,borderBottomRightRadius:H}=N;f([M,j,H,B].map(W=>bg(Number.parseFloat(W))))}if(h.useEffect(()=>{if(n){const N=Tn(()=>{T(),$(!0)});let I;return typeof ResizeObserver<"u"&&(I=new ResizeObserver(T),I.observe(n)),()=>{Tn.cancel(N),I==null||I.disconnect()}}},[n]),!k)return null;const O=(r==="Checkbox"||r==="Radio")&&(n==null?void 0:n.classList.contains(Py));return h.createElement(qi,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(N,I)=>{var z,L;if(I.deadline||I.propertyName==="opacity"){const M=(z=o.current)===null||z===void 0?void 0:z.parentElement;(L=a.current)===null||L===void 0||L.call(a).then(()=>{M==null||M.remove()})}return!1}},({className:N},I)=>h.createElement("div",{ref:mo(o,I),className:ne(t,N,{"wave-quick":O}),style:P}))},yN=(e,t)=>{var n;const{component:r}=t;if(r==="Checkbox"&&!(!((n=e.querySelector("input"))===null||n===void 0)&&n.checked))return;const i=document.createElement("div");i.style.position="absolute",i.style.left="0px",i.style.top="0px",e==null||e.insertBefore(i,e==null?void 0:e.firstChild);const o=Ry();let a=null;function c(){return a}a=o(h.createElement(vN,Object.assign({},t,{target:e,registerUnmount:c})),i)},bN=(e,t,n)=>{const{wave:r}=h.useContext(Ot),[,i,o]=gi(),a=er(d=>{const f=e.current;if(r!=null&&r.disabled||!f)return;const m=f.querySelector(`.${Py}`)||f,{showEffect:g}=r||{};(g||yN)(m,{className:t,token:i,component:n,event:d,hashId:o})}),c=h.useRef(null);return d=>{Tn.cancel(c.current),c.current=Tn(()=>{a(d)})}},Wf=e=>{const{children:t,disabled:n,component:r}=e,{getPrefixCls:i}=h.useContext(Ot),o=h.useRef(null),a=i("wave"),[,c]=mN(a),u=bN(o,ne(a,c),r);if(J.useEffect(()=>{const f=o.current;if(!f||f.nodeType!==window.Node.ELEMENT_NODE||n)return;const m=g=>{!Ty(g.target)||!f.getAttribute||f.getAttribute("disabled")||f.disabled||f.className.includes("disabled")&&!f.className.includes("disabled:")||f.getAttribute("aria-disabled")==="true"||f.className.includes("-leave")||u(g)};return f.addEventListener("click",m,!0),()=>{f.removeEventListener("click",m,!0)}},[n]),!J.isValidElement(t))return t??null;const d=ra(t)?mo(Aa(t),o):o;return pi(t,{ref:d})},Zo=e=>{const t=J.useContext(Yl);return J.useMemo(()=>e?typeof e=="string"?e??t:typeof e=="function"?e(t):t:t,[e,t])},_N=e=>{const{componentCls:t}=e;return{[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"}}}},SN=bn(["Space","Compact"],e=>[_N(e)],()=>({}),{resetStyle:!1});var QE=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Vf=h.createContext(null),Wu=(e,t)=>{const n=h.useContext(Vf),r=h.useMemo(()=>{if(!n)return"";const{compactDirection:i,isFirstItem:o,isLastItem:a}=n,c=i==="vertical"?"-vertical-":"-";return ne(`${e}-compact${c}item`,{[`${e}-compact${c}first-item`]:o,[`${e}-compact${c}last-item`]:a,[`${e}-compact${c}item-rtl`]:t==="rtl"})},[e,t,n]);return{compactSize:n==null?void 0:n.compactSize,compactDirection:n==null?void 0:n.compactDirection,compactItemClassnames:r}},CN=e=>{const{children:t}=e;return h.createElement(Vf.Provider,{value:null},t)},wN=e=>{const{children:t}=e,n=QE(e,["children"]);return h.createElement(Vf.Provider,{value:h.useMemo(()=>n,[n])},t)},xN=e=>{const{getPrefixCls:t,direction:n}=h.useContext(Ot),{size:r,direction:i,block:o,prefixCls:a,className:c,rootClassName:u,children:d}=e,f=QE(e,["size","direction","block","prefixCls","className","rootClassName","children"]),m=Zo(k=>r??k),g=t("space-compact",a),[v,y]=SN(g),S=ne(g,y,{[`${g}-rtl`]:n==="rtl",[`${g}-block`]:o,[`${g}-vertical`]:i==="vertical"},c,u),_=h.useContext(Vf),C=mi(d),E=h.useMemo(()=>C.map((k,$)=>{const P=(k==null?void 0:k.key)||`${g}-item-${$}`;return h.createElement(wN,{key:P,compactSize:m,compactDirection:i,isFirstItem:$===0&&(!_||(_==null?void 0:_.isFirstItem)),isLastItem:$===C.length-1&&(!_||(_==null?void 0:_.isLastItem))},k)}),[C,_,i,m,g]);return C.length===0?null:v(h.createElement("div",Object.assign({className:S},f),E))};var EN=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const ZE=h.createContext(void 0),kN=e=>{const{getPrefixCls:t,direction:n}=h.useContext(Ot),{prefixCls:r,size:i,className:o}=e,a=EN(e,["prefixCls","size","className"]),c=t("btn-group",r),[,,u]=gi(),d=h.useMemo(()=>{switch(i){case"large":return"lg";case"small":return"sm";default:return""}},[i]),f=ne(c,{[`${c}-${d}`]:d,[`${c}-rtl`]:n==="rtl"},o,u);return h.createElement(ZE.Provider,{value:i},h.createElement("div",Object.assign({},a,{className:f})))},oC=/^[\u4E00-\u9FA5]{2}$/,Vv=oC.test.bind(oC);function ek(e){return e==="danger"?{danger:!0}:{type:e}}function sC(e){return typeof e=="string"}function _g(e){return e==="text"||e==="link"}function $N(e,t){if(e==null)return;const n=t?" ":"";return typeof e!="string"&&typeof e!="number"&&sC(e.type)&&Vv(e.props.children)?pi(e,{children:e.props.children.split("").join(n)}):sC(e)?Vv(e)?J.createElement("span",null,e.split("").join(n)):J.createElement("span",null,e):DE(e)?J.createElement("span",null,e):e}function RN(e,t){let n=!1;const r=[];return J.Children.forEach(e,i=>{const o=typeof i,a=o==="string"||o==="number";if(n&&a){const c=r.length-1,u=r[c];r[c]=`${u}${i}`}else r.push(i);n=a}),J.Children.map(r,i=>$N(i,t))}["default","primary","danger"].concat(We(ea));const tk=h.forwardRef((e,t)=>{const{className:n,style:r,children:i,prefixCls:o}=e,a=ne(`${o}-icon`,n);return J.createElement("span",{ref:t,className:a,style:r},i)}),aC=h.forwardRef((e,t)=>{const{prefixCls:n,className:r,style:i,iconClassName:o}=e,a=ne(`${n}-loading-icon`,r);return J.createElement(tk,{prefixCls:n,className:a,style:i,ref:t},J.createElement(Du,{className:o}))}),Sg=()=>({width:0,opacity:0,transform:"scale(0)"}),Cg=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),TN=e=>{const{prefixCls:t,loading:n,existIcon:r,className:i,style:o,mount:a}=e,c=!!n;return r?J.createElement(aC,{prefixCls:t,className:i,style:o}):J.createElement(qi,{visible:c,motionName:`${t}-loading-icon-motion`,motionAppear:!a,motionEnter:!a,motionLeave:!a,removeOnLeave:!0,onAppearStart:Sg,onAppearActive:Cg,onEnterStart:Sg,onEnterActive:Cg,onLeaveStart:Cg,onLeaveActive:Sg},({className:u,style:d},f)=>{const m=Object.assign(Object.assign({},o),d);return J.createElement(aC,{prefixCls:t,className:ne(i,u),style:m,ref:f})})},lC=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),PN=e=>{const{componentCls:t,fontSize:n,lineWidth:r,groupBorderColor:i,colorErrorHover:o}=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}},lC(`${t}-primary`,i),lC(`${t}-danger`,o)]}};var ON=["b"],IN=["v"],wg=function(t){return Math.round(Number(t||0))},NN=function(t){if(t instanceof yn)return t;if(t&&_t(t)==="object"&&"h"in t&&"b"in t){var n=t,r=n.b,i=Lt(n,ON);return X(X({},i),{},{v:r})}return typeof t=="string"&&/hsb/.test(t)?t.replace(/hsb/,"hsv"):t},Eu=(function(e){gs(n,e);var t=vs(n);function n(r){return yr(this,n),t.call(this,NN(r))}return br(n,[{key:"toHsbString",value:function(){var i=this.toHsb(),o=wg(i.s*100),a=wg(i.b*100),c=wg(i.h),u=i.a,d="hsb(".concat(c,", ").concat(o,"%, ").concat(a,"%)"),f="hsba(".concat(c,", ").concat(o,"%, ").concat(a,"%, ").concat(u.toFixed(u===0?0:2),")");return u===1?d:f}},{key:"toHsb",value:function(){var i=this.toHsv(),o=i.v,a=Lt(i,IN);return X(X({},a),{},{b:o,a:this.a})}}]),n})(yn),MN=function(t){return t instanceof Eu?t:new Eu(t)};MN("#1677ff");const zN=(e,t)=>(e==null?void 0:e.replace(/[^\w/]/g,"").slice(0,t?8:6))||"",jN=(e,t)=>e?zN(e,t):"";let Uv=(function(){function e(t){yr(this,e);var n;if(this.cleared=!1,t instanceof e){this.metaColor=t.metaColor.clone(),this.colors=(n=t.colors)===null||n===void 0?void 0:n.map(i=>({color:new e(i.color),percent:i.percent})),this.cleared=t.cleared;return}const r=Array.isArray(t);r&&t.length?(this.colors=t.map(({color:i,percent:o})=>({color:new e(i),percent:o})),this.metaColor=new Eu(this.colors[0].color.metaColor)):this.metaColor=new Eu(r?"":t),(!t||r&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return br(e,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return jN(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(i=>`${i.color.toRgbString()} ${i.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(n){return!n||this.isGradient()!==n.isGradient()?!1:this.isGradient()?this.colors.length===n.colors.length&&this.colors.every((r,i)=>{const o=n.colors[i];return r.percent===o.percent&&r.color.equals(o.color)}):this.toHexString()===n.toHexString()}}])})();var BN={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"},LN=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:BN}))},Wi=h.forwardRef(LN),nk=J.forwardRef(function(e,t){var n=e.prefixCls,r=e.forceRender,i=e.className,o=e.style,a=e.children,c=e.isActive,u=e.role,d=e.classNames,f=e.styles,m=J.useState(c||r),g=se(m,2),v=g[0],y=g[1];return J.useEffect(function(){(r||c)&&y(!0)},[r,c]),v?J.createElement("div",{ref:t,className:ne("".concat(n,"-content"),K(K({},"".concat(n,"-content-active"),c),"".concat(n,"-content-inactive"),!c),i),style:o,role:u},J.createElement("div",{className:ne("".concat(n,"-content-box"),d==null?void 0:d.body),style:f==null?void 0:f.body},a)):null});nk.displayName="PanelContent";var AN=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],rk=J.forwardRef(function(e,t){var n=e.showArrow,r=n===void 0?!0:n,i=e.headerClass,o=e.isActive,a=e.onItemClick,c=e.forceRender,u=e.className,d=e.classNames,f=d===void 0?{}:d,m=e.styles,g=m===void 0?{}:m,v=e.prefixCls,y=e.collapsible,S=e.accordion,_=e.panelKey,C=e.extra,E=e.header,k=e.expandIcon,$=e.openMotion,P=e.destroyInactivePanel,T=e.children,O=Lt(e,AN),N=y==="disabled",I=C!=null&&typeof C!="boolean",z=K(K(K({onClick:function(){a==null||a(_)},onKeyDown:function(V){(V.key==="Enter"||V.keyCode===Ge.ENTER||V.which===Ge.ENTER)&&(a==null||a(_))},role:S?"tab":"button"},"aria-expanded",o),"aria-disabled",N),"tabIndex",N?-1:0),L=typeof k=="function"?k(e):J.createElement("i",{className:"arrow"}),M=L&&J.createElement("div",Re({className:"".concat(v,"-expand-icon")},["header","icon"].includes(y)?z:{}),L),j=ne("".concat(v,"-item"),K(K({},"".concat(v,"-item-active"),o),"".concat(v,"-item-disabled"),N),u),B=ne(i,"".concat(v,"-header"),K({},"".concat(v,"-collapsible-").concat(y),!!y),f.header),H=X({className:B,style:g.header},["header","icon"].includes(y)?{}:z);return J.createElement("div",Re({},O,{ref:t,className:j}),J.createElement("div",H,r&&M,J.createElement("span",Re({className:"".concat(v,"-header-text")},y==="header"?z:{}),E),I&&J.createElement("div",{className:"".concat(v,"-extra")},C)),J.createElement(qi,Re({visible:o,leavedClassName:"".concat(v,"-content-hidden")},$,{forceRender:c,removeOnLeave:P}),function(W,V){var A=W.className,G=W.style;return J.createElement(nk,{ref:V,prefixCls:v,className:A,classNames:f,style:G,styles:g,isActive:o,forceRender:c,role:S?"tabpanel":void 0},T)}))}),DN=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],HN=function(t,n){var r=n.prefixCls,i=n.accordion,o=n.collapsible,a=n.destroyInactivePanel,c=n.onItemClick,u=n.activeKey,d=n.openMotion,f=n.expandIcon;return t.map(function(m,g){var v=m.children,y=m.label,S=m.key,_=m.collapsible,C=m.onItemClick,E=m.destroyInactivePanel,k=Lt(m,DN),$=String(S??g),P=_??o,T=E??a,O=function(z){P!=="disabled"&&(c(z),C==null||C(z))},N=!1;return i?N=u[0]===$:N=u.indexOf($)>-1,J.createElement(rk,Re({},k,{prefixCls:r,key:$,panelKey:$,isActive:N,accordion:i,openMotion:d,expandIcon:f,header:y,collapsible:P,onItemClick:O,destroyInactivePanel:T}),v)})},FN=function(t,n,r){if(!t)return null;var i=r.prefixCls,o=r.accordion,a=r.collapsible,c=r.destroyInactivePanel,u=r.onItemClick,d=r.activeKey,f=r.openMotion,m=r.expandIcon,g=t.key||String(n),v=t.props,y=v.header,S=v.headerClass,_=v.destroyInactivePanel,C=v.collapsible,E=v.onItemClick,k=!1;o?k=d[0]===g:k=d.indexOf(g)>-1;var $=C??a,P=function(N){$!=="disabled"&&(u(N),E==null||E(N))},T={key:g,panelKey:g,header:y,headerClass:S,isActive:k,prefixCls:i,destroyInactivePanel:_??c,openMotion:f,accordion:o,children:t.props.children,onItemClick:P,expandIcon:m,collapsible:$};return typeof t.type=="string"?t:(Object.keys(T).forEach(function(O){typeof T[O]>"u"&&delete T[O]}),J.cloneElement(t,T))};function WN(e,t,n){return Array.isArray(e)?HN(e,n):mi(t).map(function(r,i){return FN(r,i,n)})}function VN(e){var t=e;if(!Array.isArray(t)){var n=_t(t);t=n==="number"||n==="string"?[t]:[]}return t.map(function(r){return String(r)})}var UN=J.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-collapse":n,i=e.destroyInactivePanel,o=i===void 0?!1:i,a=e.style,c=e.accordion,u=e.className,d=e.children,f=e.collapsible,m=e.openMotion,g=e.expandIcon,v=e.activeKey,y=e.defaultActiveKey,S=e.onChange,_=e.items,C=ne(r,u),E=tr([],{value:v,onChange:function(I){return S==null?void 0:S(I)},defaultValue:y,postState:VN}),k=se(E,2),$=k[0],P=k[1],T=function(I){return P(function(){if(c)return $[0]===I?[]:[I];var z=$.indexOf(I),L=z>-1;return L?$.filter(function(M){return M!==I}):[].concat(We($),[I])})};Ar(!d,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var O=WN(_,d,{prefixCls:r,accordion:c,openMotion:m,expandIcon:g,collapsible:f,destroyInactivePanel:o,onItemClick:T,activeKey:$});return J.createElement("div",Re({ref:t,className:C,style:a,role:c?"tablist":void 0},Ki(e,{aria:!0,data:!0})),O)});const Oy=Object.assign(UN,{Panel:rk});Oy.Panel;const qN=h.forwardRef((e,t)=>{const{getPrefixCls:n}=h.useContext(Ot),{prefixCls:r,className:i,showArrow:o=!0}=e,a=n("collapse",r),c=ne({[`${a}-no-arrow`]:!o},i);return h.createElement(Oy.Panel,Object.assign({ref:t},e,{prefixCls:a,className:c}))}),ik=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
177
+ opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
178
+ opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),KN=e=>({animationDuration:e,animationFillMode:"both"}),GN=e=>({animationDuration:e,animationFillMode:"both"}),Uf=(e,t,n,r,i=!1)=>{const o=i?"&":"";return{[`
179
+ ${o}${e}-enter,
180
+ ${o}${e}-appear
181
+ `]:Object.assign(Object.assign({},KN(r)),{animationPlayState:"paused"}),[`${o}${e}-leave`]:Object.assign(Object.assign({},GN(r)),{animationPlayState:"paused"}),[`
182
+ ${o}${e}-enter${e}-enter-active,
183
+ ${o}${e}-appear${e}-appear-active
184
+ `]:{animationName:t,animationPlayState:"running"},[`${o}${e}-leave${e}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},XN=new Yt("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),YN=new Yt("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),JN=(e,t=!1)=>{const{antCls:n}=e,r=`${n}-fade`,i=t?"&":"";return[Uf(r,XN,YN,e.motionDurationMid,t),{[`
185
+ ${i}${r}-enter,
186
+ ${i}${r}-appear
187
+ `]:{opacity:0,animationTimingFunction:"linear"},[`${i}${r}-leave`]:{animationTimingFunction:"linear"}}]},QN=new Yt("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ZN=new Yt("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),e6=new Yt("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),t6=new Yt("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),n6=new Yt("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),r6=new Yt("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),i6=new Yt("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),o6=new Yt("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),s6={"move-up":{inKeyframes:i6,outKeyframes:o6},"move-down":{inKeyframes:QN,outKeyframes:ZN},"move-left":{inKeyframes:e6,outKeyframes:t6},"move-right":{inKeyframes:n6,outKeyframes:r6}},af=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:i,outKeyframes:o}=s6[t];return[Uf(r,i,o,e.motionDurationMid),{[`
188
+ ${r}-enter,
189
+ ${r}-appear
190
+ `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},Iy=new Yt("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Ny=new Yt("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),My=new Yt("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),zy=new Yt("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),a6=new Yt("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),l6=new Yt("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),c6=new Yt("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),u6=new Yt("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),d6={"slide-up":{inKeyframes:Iy,outKeyframes:Ny},"slide-down":{inKeyframes:My,outKeyframes:zy},"slide-left":{inKeyframes:a6,outKeyframes:l6},"slide-right":{inKeyframes:c6,outKeyframes:u6}},na=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:i,outKeyframes:o}=d6[t];return[Uf(r,i,o,e.motionDurationMid),{[`
191
+ ${r}-enter,
192
+ ${r}-appear
193
+ `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},h6=new Yt("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),f6=new Yt("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),cC=new Yt("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),uC=new Yt("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),m6=new Yt("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),p6=new Yt("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),g6=new Yt("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),v6=new Yt("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),y6=new Yt("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),b6=new Yt("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),_6=new Yt("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),S6=new Yt("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),C6={zoom:{inKeyframes:h6,outKeyframes:f6},"zoom-big":{inKeyframes:cC,outKeyframes:uC},"zoom-big-fast":{inKeyframes:cC,outKeyframes:uC},"zoom-left":{inKeyframes:g6,outKeyframes:v6},"zoom-right":{inKeyframes:y6,outKeyframes:b6},"zoom-up":{inKeyframes:m6,outKeyframes:p6},"zoom-down":{inKeyframes:_6,outKeyframes:S6}},Vu=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:i,outKeyframes:o}=C6[t];return[Uf(r,i,o,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[`
194
+ ${r}-enter,
195
+ ${r}-appear
196
+ `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},w6=e=>{const{componentCls:t,contentBg:n,padding:r,headerBg:i,headerPadding:o,collapseHeaderPaddingSM:a,collapseHeaderPaddingLG:c,collapsePanelBorderRadius:u,lineWidth:d,lineType:f,colorBorder:m,colorText:g,colorTextHeading:v,colorTextDisabled:y,fontSizeLG:S,lineHeight:_,lineHeightLG:C,marginSM:E,paddingSM:k,paddingLG:$,paddingXS:P,motionDurationSlow:T,fontSizeIcon:O,contentPadding:N,fontHeight:I,fontHeightLG:z}=e,L=`${te(d)} ${f} ${m}`;return{[t]:Object.assign(Object.assign({},Un(e)),{backgroundColor:i,border:L,borderRadius:u,"&-rtl":{direction:"rtl"},[`& > ${t}-item`]:{borderBottom:L,"&:first-child":{[`
197
+ &,
198
+ & > ${t}-header`]:{borderRadius:`${te(u)} ${te(u)} 0 0`}},"&:last-child":{[`
199
+ &,
200
+ & > ${t}-header`]:{borderRadius:`0 0 ${te(u)} ${te(u)}`}},[`> ${t}-header`]:Object.assign(Object.assign({position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:o,color:v,lineHeight:_,cursor:"pointer",transition:`all ${T}, visibility 0s`},fo(e)),{[`> ${t}-header-text`]:{flex:"auto"},[`${t}-expand-icon`]:{height:I,display:"flex",alignItems:"center",paddingInlineEnd:E},[`${t}-arrow`]:Object.assign(Object.assign({},rc()),{fontSize:O,transition:`transform ${T}`,svg:{transition:`transform ${T}`}}),[`${t}-header-text`]:{marginInlineEnd:"auto"}}),[`${t}-collapsible-header`]:{cursor:"default",[`${t}-header-text`]:{flex:"none",cursor:"pointer"},[`${t}-expand-icon`]:{cursor:"pointer"}},[`${t}-collapsible-icon`]:{cursor:"unset",[`${t}-expand-icon`]:{cursor:"pointer"}}},[`${t}-content`]:{color:g,backgroundColor:n,borderTop:L,[`& > ${t}-content-box`]:{padding:N},"&-hidden":{display:"none"}},"&-small":{[`> ${t}-item`]:{[`> ${t}-header`]:{padding:a,paddingInlineStart:P,[`> ${t}-expand-icon`]:{marginInlineStart:e.calc(k).sub(P).equal()}},[`> ${t}-content > ${t}-content-box`]:{padding:k}}},"&-large":{[`> ${t}-item`]:{fontSize:S,lineHeight:C,[`> ${t}-header`]:{padding:c,paddingInlineStart:r,[`> ${t}-expand-icon`]:{height:z,marginInlineStart:e.calc($).sub(r).equal()}},[`> ${t}-content > ${t}-content-box`]:{padding:$}}},[`${t}-item:last-child`]:{borderBottom:0,[`> ${t}-content`]:{borderRadius:`0 0 ${te(u)} ${te(u)}`}},[`& ${t}-item-disabled > ${t}-header`]:{"\n &,\n & > .arrow\n ":{color:y,cursor:"not-allowed"}},[`&${t}-icon-position-end`]:{[`& > ${t}-item`]:{[`> ${t}-header`]:{[`${t}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:E}}}}})}},x6=e=>{const{componentCls:t}=e,n=`> ${t}-item > ${t}-header ${t}-arrow`;return{[`${t}-rtl`]:{[n]:{transform:"rotate(180deg)"}}}},E6=e=>{const{componentCls:t,headerBg:n,borderlessContentPadding:r,borderlessContentBg:i,colorBorder:o}=e;return{[`${t}-borderless`]:{backgroundColor:n,border:0,[`> ${t}-item`]:{borderBottom:`1px solid ${o}`},[`
201
+ > ${t}-item:last-child,
202
+ > ${t}-item:last-child ${t}-header
203
+ `]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-content`]:{backgroundColor:i,borderTop:0},[`> ${t}-item > ${t}-content > ${t}-content-box`]:{padding:r}}}},k6=e=>{const{componentCls:t,paddingSM:n}=e;return{[`${t}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-content`]:{backgroundColor:"transparent",border:0,[`> ${t}-content-box`]:{paddingBlock:n}}}}}},$6=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"}),R6=bn("Collapse",e=>{const t=tn(e,{collapseHeaderPaddingSM:`${te(e.paddingXS)} ${te(e.paddingSM)}`,collapseHeaderPaddingLG:`${te(e.padding)} ${te(e.paddingLG)}`,collapsePanelBorderRadius:e.borderRadiusLG});return[w6(t),E6(t),k6(t),x6(t),ik(t)]},$6),T6=h.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r,expandIcon:i,className:o,style:a}=Gr("collapse"),{prefixCls:c,className:u,rootClassName:d,style:f,bordered:m=!0,ghost:g,size:v,expandIconPosition:y="start",children:S,destroyInactivePanel:_,destroyOnHidden:C,expandIcon:E}=e,k=Zo(H=>{var W;return(W=v??H)!==null&&W!==void 0?W:"middle"}),$=n("collapse",c),P=n(),[T,O,N]=R6($),I=h.useMemo(()=>y==="left"?"start":y==="right"?"end":y,[y]),z=E??i,L=h.useCallback((H={})=>{const W=typeof z=="function"?z(H):h.createElement(Wi,{rotate:H.isActive?r==="rtl"?-90:90:void 0,"aria-label":H.isActive?"expanded":"collapsed"});return pi(W,()=>{var V;return{className:ne((V=W.props)===null||V===void 0?void 0:V.className,`${$}-arrow`)}})},[z,$,r]),M=ne(`${$}-icon-position-${I}`,{[`${$}-borderless`]:!m,[`${$}-rtl`]:r==="rtl",[`${$}-ghost`]:!!g,[`${$}-${k}`]:k!=="middle"},o,u,d,O,N),j=h.useMemo(()=>Object.assign(Object.assign({},JE(P)),{motionAppear:!1,leavedClassName:`${$}-content-hidden`}),[P,$]),B=h.useMemo(()=>S?mi(S).map((H,W)=>{var V,A;const G=H.props;if(G!=null&&G.disabled){const q=(V=H.key)!==null&&V!==void 0?V:String(W),D=Object.assign(Object.assign({},fr(H.props,["disabled"])),{key:q,collapsible:(A=G.collapsible)!==null&&A!==void 0?A:"disabled"});return pi(H,D)}return H}):null,[S]);return T(h.createElement(Oy,Object.assign({ref:t,openMotion:j},fr(e,["rootClassName"]),{expandIcon:L,prefixCls:$,className:M,style:Object.assign(Object.assign({},a),f),destroyInactivePanel:C??_}),B))}),eu=Object.assign(T6,{Panel:qN}),P6=e=>e instanceof Uv?e:new Uv(e),O6=(e,t)=>{const{r:n,g:r,b:i,a:o}=e.toRgb(),a=new Eu(e.toRgbString()).onBackground(t).toHsv();return o<=.5?a.v>.5:n*.299+r*.587+i*.114>192},ok=e=>{const{paddingInline:t,onlyIconSize:n}=e;return tn(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:n})},sk=e=>{var t,n,r,i,o,a;const c=(t=e.contentFontSize)!==null&&t!==void 0?t:e.fontSize,u=(n=e.contentFontSizeSM)!==null&&n!==void 0?n:e.fontSize,d=(r=e.contentFontSizeLG)!==null&&r!==void 0?r:e.fontSizeLG,f=(i=e.contentLineHeight)!==null&&i!==void 0?i:zh(c),m=(o=e.contentLineHeightSM)!==null&&o!==void 0?o:zh(u),g=(a=e.contentLineHeightLG)!==null&&a!==void 0?a:zh(d),v=O6(new Uv(e.colorBgSolid),"#fff")?"#000":"#fff",y=ea.reduce((S,_)=>Object.assign(Object.assign({},S),{[`${_}ShadowColor`]:`0 ${te(e.controlOutlineWidth)} 0 ${Zc(e[`${_}1`],e.colorBgContainer)}`}),{});return Object.assign(Object.assign({},y),{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.colorBorder,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:v,contentFontSize:c,contentFontSizeSM:u,contentFontSizeLG:d,contentLineHeight:f,contentLineHeightSM:m,contentLineHeightLG:g,paddingBlock:Math.max((e.controlHeight-c*f)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-u*m)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-d*g)/2-e.lineWidth,0)})},I6=e=>{const{componentCls:t,iconCls:n,fontWeight:r,opacityLoading:i,motionDurationSlow:o,motionEaseInOut:a,iconGap:c,calc:u}=e;return{[t]:{outline:"none",position:"relative",display:"inline-flex",gap:c,alignItems:"center",justifyContent:"center",fontWeight:r,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:`${te(e.lineWidth)} ${e.lineType} transparent`,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",color:e.colorText,"&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:rc(),"> a":{color:"currentColor"},"&:not(:disabled)":fo(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:i,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map(d=>`${d} ${o} ${a}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:u(c).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:u(c).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:u(c).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:u(c).mul(-1).equal()}}}}}},ak=(e,t,n)=>({[`&:not(:disabled):not(${e}-disabled)`]:{"&:hover":t,"&:active":n}}),N6=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:"50%"}),M6=e=>({cursor:"not-allowed",borderColor:e.borderColorDisabled,color:e.colorTextDisabled,background:e.colorBgContainerDisabled,boxShadow:"none"}),qf=(e,t,n,r,i,o,a,c)=>({[`&${e}-background-ghost`]:Object.assign(Object.assign({color:n||void 0,background:t,borderColor:r||void 0,boxShadow:"none"},ak(e,Object.assign({background:t},a),Object.assign({background:t},c))),{"&:disabled":{cursor:"not-allowed",color:i||void 0,borderColor:o||void 0}})}),z6=e=>({[`&:disabled, &${e.componentCls}-disabled`]:Object.assign({},M6(e))}),j6=e=>({[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",color:e.colorTextDisabled}}),Kf=(e,t,n,r)=>{const o=r&&["link","text"].includes(r)?j6:z6;return Object.assign(Object.assign({},o(e)),ak(e.componentCls,t,n))},Gf=(e,t,n,r,i)=>({[`&${e.componentCls}-variant-solid`]:Object.assign({color:t,background:n},Kf(e,r,i))}),Xf=(e,t,n,r,i)=>({[`&${e.componentCls}-variant-outlined, &${e.componentCls}-variant-dashed`]:Object.assign({borderColor:t,background:n},Kf(e,r,i))}),Yf=e=>({[`&${e.componentCls}-variant-dashed`]:{borderStyle:"dashed"}}),Jf=(e,t,n,r)=>({[`&${e.componentCls}-variant-filled`]:Object.assign({boxShadow:"none",background:t},Kf(e,n,r))}),Go=(e,t,n,r,i)=>({[`&${e.componentCls}-variant-${n}`]:Object.assign({color:t,boxShadow:"none"},Kf(e,r,i,n))}),B6=e=>{const{componentCls:t}=e;return ea.reduce((n,r)=>{const i=e[`${r}6`],o=e[`${r}1`],a=e[`${r}5`],c=e[`${r}2`],u=e[`${r}3`],d=e[`${r}7`];return Object.assign(Object.assign({},n),{[`&${t}-color-${r}`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:i,boxShadow:e[`${r}ShadowColor`]},Gf(e,e.colorTextLightSolid,i,{background:a},{background:d})),Xf(e,i,e.colorBgContainer,{color:a,borderColor:a,background:e.colorBgContainer},{color:d,borderColor:d,background:e.colorBgContainer})),Yf(e)),Jf(e,o,{color:i,background:c},{color:i,background:u})),Go(e,i,"link",{color:a},{color:d})),Go(e,i,"text",{color:a,background:o},{color:d,background:u}))})},{})},L6=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.defaultColor,boxShadow:e.defaultShadow},Gf(e,e.solidTextColor,e.colorBgSolid,{color:e.solidTextColor,background:e.colorBgSolidHover},{color:e.solidTextColor,background:e.colorBgSolidActive})),Yf(e)),Jf(e,e.colorFillTertiary,{color:e.defaultColor,background:e.colorFillSecondary},{color:e.defaultColor,background:e.colorFill})),qf(e.componentCls,e.ghostBg,e.defaultGhostColor,e.defaultGhostBorderColor,e.colorTextDisabled,e.colorBorder)),Go(e,e.textTextColor,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),A6=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorPrimary,boxShadow:e.primaryShadow},Xf(e,e.colorPrimary,e.colorBgContainer,{color:e.colorPrimaryTextHover,borderColor:e.colorPrimaryHover,background:e.colorBgContainer},{color:e.colorPrimaryTextActive,borderColor:e.colorPrimaryActive,background:e.colorBgContainer})),Yf(e)),Jf(e,e.colorPrimaryBg,{color:e.colorPrimary,background:e.colorPrimaryBgHover},{color:e.colorPrimary,background:e.colorPrimaryBorder})),Go(e,e.colorPrimaryText,"text",{color:e.colorPrimaryTextHover,background:e.colorPrimaryBg},{color:e.colorPrimaryTextActive,background:e.colorPrimaryBorder})),Go(e,e.colorPrimaryText,"link",{color:e.colorPrimaryTextHover,background:e.linkHoverBg},{color:e.colorPrimaryTextActive})),qf(e.componentCls,e.ghostBg,e.colorPrimary,e.colorPrimary,e.colorTextDisabled,e.colorBorder,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),D6=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorError,boxShadow:e.dangerShadow},Gf(e,e.dangerColor,e.colorError,{background:e.colorErrorHover},{background:e.colorErrorActive})),Xf(e,e.colorError,e.colorBgContainer,{color:e.colorErrorHover,borderColor:e.colorErrorBorderHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),Yf(e)),Jf(e,e.colorErrorBg,{color:e.colorError,background:e.colorErrorBgFilledHover},{color:e.colorError,background:e.colorErrorBgActive})),Go(e,e.colorError,"text",{color:e.colorErrorHover,background:e.colorErrorBg},{color:e.colorErrorHover,background:e.colorErrorBgActive})),Go(e,e.colorError,"link",{color:e.colorErrorHover},{color:e.colorErrorActive})),qf(e.componentCls,e.ghostBg,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder,{color:e.colorErrorHover,borderColor:e.colorErrorHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),H6=e=>Object.assign(Object.assign({},Go(e,e.colorLink,"link",{color:e.colorLinkHover},{color:e.colorLinkActive})),qf(e.componentCls,e.ghostBg,e.colorInfo,e.colorInfo,e.colorTextDisabled,e.colorBorder,{color:e.colorInfoHover,borderColor:e.colorInfoHover},{color:e.colorInfoActive,borderColor:e.colorInfoActive})),F6=e=>{const{componentCls:t}=e;return Object.assign({[`${t}-color-default`]:L6(e),[`${t}-color-primary`]:A6(e),[`${t}-color-dangerous`]:D6(e),[`${t}-color-link`]:H6(e)},B6(e))},W6=e=>Object.assign(Object.assign(Object.assign(Object.assign({},Xf(e,e.defaultBorderColor,e.defaultBg,{color:e.defaultHoverColor,borderColor:e.defaultHoverBorderColor,background:e.defaultHoverBg},{color:e.defaultActiveColor,borderColor:e.defaultActiveBorderColor,background:e.defaultActiveBg})),Go(e,e.textTextColor,"text",{color:e.textTextHoverColor,background:e.textHoverBg},{color:e.textTextActiveColor,background:e.colorBgTextActive})),Gf(e,e.primaryColor,e.colorPrimary,{background:e.colorPrimaryHover,color:e.primaryColor},{background:e.colorPrimaryActive,color:e.primaryColor})),Go(e,e.colorLink,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),jy=(e,t="")=>{const{componentCls:n,controlHeight:r,fontSize:i,borderRadius:o,buttonPaddingHorizontal:a,iconCls:c,buttonPaddingVertical:u,buttonIconOnlyFontSize:d}=e;return[{[t]:{fontSize:i,height:r,padding:`${te(u)} ${te(a)}`,borderRadius:o,[`&${n}-icon-only`]:{width:r,[c]:{fontSize:d}}}},{[`${n}${n}-circle${t}`]:N6(e)},{[`${n}${n}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${n}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},V6=e=>{const t=tn(e,{fontSize:e.contentFontSize});return jy(t,e.componentCls)},U6=e=>{const t=tn(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return jy(t,`${e.componentCls}-sm`)},q6=e=>{const t=tn(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return jy(t,`${e.componentCls}-lg`)},K6=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},G6=bn("Button",e=>{const t=ok(e);return[I6(t),V6(t),U6(t),q6(t),K6(t),F6(t),W6(t),PN(t)]},sk,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function X6(e,t,n,r){const{focusElCls:i,focus:o,borderElCls:a}=n,c=a?"> *":"",u=["hover",o?"focus":null,"active"].filter(Boolean).map(d=>`&:${d} ${c}`).join(",");return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":Object.assign(Object.assign({[u]:{zIndex:3}},i?{[`&${i}`]:{zIndex:3}}:{}),{[`&[disabled] ${c}`]:{zIndex:0}})}}function Y6(e,t,n){const{borderElCls:r}=n,i=r?`> ${r}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${i}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function Qf(e,t={focus:!0}){const{componentCls:n}=e,{componentCls:r}=t,i=r||n,o=`${i}-compact`;return{[o]:Object.assign(Object.assign({},X6(e,o,t,i)),Y6(i,o,t))}}function J6(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 Q6(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 Z6(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:Object.assign(Object.assign({},J6(e,t,e.componentCls)),Q6(e.componentCls,t))}}const eM=e=>{const{componentCls:t,colorPrimaryHover:n,lineWidth:r,calc:i}=e,o=i(r).mul(-1).equal(),a=c=>{const u=`${t}-compact${c?"-vertical":""}-item${t}-primary:not([disabled])`;return{[`${u} + ${u}::before`]:{position:"absolute",top:c?o:0,insetInlineStart:c?0:o,backgroundColor:n,content:'""',width:c?"100%":r,height:c?r:"100%"}}};return Object.assign(Object.assign({},a()),a(!0))},tM=Au(["Button","compact"],e=>{const t=ok(e);return[Qf(t),Z6(t),eM(t)]},sk);var nM=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function rM(e){if(typeof e=="object"&&e){let t=e==null?void 0:e.delay;return t=!Number.isNaN(t)&&typeof t=="number"?t:0,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}const iM={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},oM=J.forwardRef((e,t)=>{var n,r;const{loading:i=!1,prefixCls:o,color:a,variant:c,type:u,danger:d=!1,shape:f,size:m,styles:g,disabled:v,className:y,rootClassName:S,children:_,icon:C,iconPosition:E="start",ghost:k=!1,block:$=!1,htmlType:P="button",classNames:T,style:O={},autoInsertSpace:N,autoFocus:I}=e,z=nM(e,["loading","prefixCls","color","variant","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","iconPosition","ghost","block","htmlType","classNames","style","autoInsertSpace","autoFocus"]),L=u||"default",{button:M}=J.useContext(Ot),j=f||(M==null?void 0:M.shape)||"default",[B,H]=h.useMemo(()=>{if(a&&c)return[a,c];if(u||d){const St=iM[L]||[];return d?["danger",St[1]]:St}return M!=null&&M.color&&(M!=null&&M.variant)?[M.color,M.variant]:["default","outlined"]},[a,c,u,d,M==null?void 0:M.color,M==null?void 0:M.variant,L]),V=B==="danger"?"dangerous":B,{getPrefixCls:A,direction:G,autoInsertSpace:q,className:D,style:U,classNames:Y,styles:Z}=Gr("button"),ee=(n=N??q)!==null&&n!==void 0?n:!0,re=A("btn",o),[he,fe,ue]=G6(re),Se=h.useContext(Zs),ae=v??Se,le=h.useContext(ZE),ce=h.useMemo(()=>rM(i),[i]),[ye,me]=h.useState(ce.loading),[de,be]=h.useState(!1),we=h.useRef(null),Te=Jo(t,we),ze=h.Children.count(_)===1&&!C&&!_g(H),Ee=h.useRef(!0);J.useEffect(()=>(Ee.current=!1,()=>{Ee.current=!0}),[]),fn(()=>{let St=null;ce.delay>0?St=setTimeout(()=>{St=null,me(!0)},ce.delay):me(ce.loading);function nn(){St&&(clearTimeout(St),St=null)}return nn},[ce.delay,ce.loading]),h.useEffect(()=>{if(!we.current||!ee)return;const St=we.current.textContent||"";ze&&Vv(St)?de||be(!0):de&&be(!1)}),h.useEffect(()=>{I&&we.current&&we.current.focus()},[]);const ke=J.useCallback(St=>{var nn;if(ye||ae){St.preventDefault();return}(nn=e.onClick)===null||nn===void 0||nn.call(e,("href"in e,St))},[e.onClick,ye,ae]),{compactSize:je,compactItemClassnames:Oe}=Wu(re,G),Qe={large:"lg",small:"sm",middle:void 0},at=Zo(St=>{var nn,Jt;return(Jt=(nn=m??je)!==null&&nn!==void 0?nn:le)!==null&&Jt!==void 0?Jt:St}),$t=at&&(r=Qe[at])!==null&&r!==void 0?r:"",pt=ye?"loading":C,Je=fr(z,["navigate"]),ft=ne(re,fe,ue,{[`${re}-${j}`]:j!=="default"&&j,[`${re}-${L}`]:L,[`${re}-dangerous`]:d,[`${re}-color-${V}`]:V,[`${re}-variant-${H}`]:H,[`${re}-${$t}`]:$t,[`${re}-icon-only`]:!_&&_!==0&&!!pt,[`${re}-background-ghost`]:k&&!_g(H),[`${re}-loading`]:ye,[`${re}-two-chinese-chars`]:de&&ee&&!ye,[`${re}-block`]:$,[`${re}-rtl`]:G==="rtl",[`${re}-icon-end`]:E==="end"},Oe,y,S,D),Xe=Object.assign(Object.assign({},U),O),yt=ne(T==null?void 0:T.icon,Y.icon),tt=Object.assign(Object.assign({},(g==null?void 0:g.icon)||{}),Z.icon||{}),Le=St=>J.createElement(tk,{prefixCls:re,className:yt,style:tt},St),rt=()=>J.createElement(TN,{existIcon:!!C,prefixCls:re,loading:ye,mount:Ee.current});let Me;C&&!ye?Me=Le(C):i&&typeof i=="object"&&i.icon?Me=Le(i.icon):Me=rt();const qe=_||_===0?RN(_,ze&&ee):null;if(Je.href!==void 0)return he(J.createElement("a",Object.assign({},Je,{className:ne(ft,{[`${re}-disabled`]:ae}),href:ae?void 0:Je.href,style:Xe,onClick:ke,ref:Te,tabIndex:ae?-1:0,"aria-disabled":ae}),Me,qe));let It=J.createElement("button",Object.assign({},z,{type:P,className:ft,style:Xe,onClick:ke,disabled:ae,ref:Te}),Me,qe,Oe&&J.createElement(tM,{prefixCls:re}));return _g(H)||(It=J.createElement(Wf,{component:"Button",disabled:ye},It)),he(It)}),hr=oM;hr.Group=kN;hr.__ANT_BUTTON=!0;const xg=e=>typeof(e==null?void 0:e.then)=="function",lk=e=>{const{type:t,children:n,prefixCls:r,buttonProps:i,close:o,autoFocus:a,emitEvent:c,isSilent:u,quitOnNullishReturnValue:d,actionFn:f}=e,m=h.useRef(!1),g=h.useRef(null),[v,y]=Jl(!1),S=(...E)=>{o==null||o.apply(void 0,E)};h.useEffect(()=>{let E=null;return a&&(E=setTimeout(()=>{var k;(k=g.current)===null||k===void 0||k.focus({preventScroll:!0})})),()=>{E&&clearTimeout(E)}},[a]);const _=E=>{xg(E)&&(y(!0),E.then((...k)=>{y(!1,!0),S.apply(void 0,k),m.current=!1},k=>{if(y(!1,!0),m.current=!1,!(u!=null&&u()))return Promise.reject(k)}))},C=E=>{if(m.current)return;if(m.current=!0,!f){S();return}let k;if(c){if(k=f(E),d&&!xg(k)){m.current=!1,S(E);return}}else if(f.length)k=f(o),m.current=!1;else if(k=f(),!xg(k)){S();return}_(k)};return h.createElement(hr,Object.assign({},ek(t),{onClick:C,loading:v,prefixCls:r},i,{ref:g}),n)},Uu=J.createContext({}),{Provider:ck}=Uu,dC=()=>{const{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:n,isSilent:r,mergedOkCancel:i,rootPrefixCls:o,close:a,onCancel:c,onConfirm:u}=h.useContext(Uu);return i?J.createElement(lk,{isSilent:r,actionFn:c,close:(...d)=>{a==null||a.apply(void 0,d),u==null||u(!1)},autoFocus:e==="cancel",buttonProps:t,prefixCls:`${o}-btn`},n):null},hC=()=>{const{autoFocusButton:e,close:t,isSilent:n,okButtonProps:r,rootPrefixCls:i,okTextLocale:o,okType:a,onConfirm:c,onOk:u}=h.useContext(Uu);return J.createElement(lk,{isSilent:n,type:a||"primary",actionFn:u,close:(...d)=>{t==null||t.apply(void 0,d),c==null||c(!0)},autoFocus:e==="ok",buttonProps:r,prefixCls:`${i}-btn`},o)};var uk=h.createContext(null),fC=[];function sM(e,t){var n=h.useState(function(){if(!si())return null;var y=document.createElement("div");return y}),r=se(n,1),i=r[0],o=h.useRef(!1),a=h.useContext(uk),c=h.useState(fC),u=se(c,2),d=u[0],f=u[1],m=a||(o.current?void 0:function(y){f(function(S){var _=[y].concat(We(S));return _})});function g(){i.parentElement||document.body.appendChild(i),o.current=!0}function v(){var y;(y=i.parentElement)===null||y===void 0||y.removeChild(i),o.current=!1}return fn(function(){return e?a?a(g):g():v(),v},[e]),fn(function(){d.length&&(d.forEach(function(y){return y()}),f(fC))},[d]),[i,m]}function aM(e){var t="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),n=document.createElement("div");n.id=t;var r=n.style;r.position="absolute",r.left="0",r.top="0",r.width="100px",r.height="100px",r.overflow="scroll";var i,o;if(e){var a=getComputedStyle(e);r.scrollbarColor=a.scrollbarColor,r.scrollbarWidth=a.scrollbarWidth;var c=getComputedStyle(e,"::-webkit-scrollbar"),u=parseInt(c.width,10),d=parseInt(c.height,10);try{var f=u?"width: ".concat(c.width,";"):"",m=d?"height: ".concat(c.height,";"):"";ps(`
204
+ #`.concat(t,`::-webkit-scrollbar {
205
+ `).concat(f,`
206
+ `).concat(m,`
207
+ }`),t)}catch(y){console.error(y),i=u,o=d}}document.body.appendChild(n);var g=e&&i&&!isNaN(i)?i:n.offsetWidth-n.clientWidth,v=e&&o&&!isNaN(o)?o:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),bu(t),{width:g,height:v}}function lM(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:aM(e)}function cM(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var uM="rc-util-locker-".concat(Date.now()),mC=0;function dM(e){var t=!!e,n=h.useState(function(){return mC+=1,"".concat(uM,"_").concat(mC)}),r=se(n,1),i=r[0];fn(function(){if(t){var o=lM(document.body).width,a=cM();ps(`
208
+ html body {
209
+ overflow-y: hidden;
210
+ `.concat(a?"width: calc(100% - ".concat(o,"px);"):"",`
211
+ }`),i)}else bu(i);return function(){bu(i)}},[t,i])}var hM=!1;function fM(e){return hM}var pC=function(t){return t===!1?!1:!si()||!t?null:typeof t=="string"?document.querySelector(t):typeof t=="function"?t():t},Zf=h.forwardRef(function(e,t){var n=e.open,r=e.autoLock,i=e.getContainer;e.debug;var o=e.autoDestroy,a=o===void 0?!0:o,c=e.children,u=h.useState(n),d=se(u,2),f=d[0],m=d[1],g=f||n;h.useEffect(function(){(a||n)&&m(n)},[n,a]);var v=h.useState(function(){return pC(i)}),y=se(v,2),S=y[0],_=y[1];h.useEffect(function(){var L=pC(i);_(L??null)});var C=sM(g&&!S),E=se(C,2),k=E[0],$=E[1],P=S??k;dM(r&&n&&si()&&(P===k||P===document.body));var T=null;if(c&&ra(c)&&t){var O=c;T=O.ref}var N=Jo(T,t);if(!g||!si()||S===void 0)return null;var I=P===!1||fM(),z=c;return t&&(z=h.cloneElement(c,{ref:N})),h.createElement(uk.Provider,{value:$},I?z:Js.createPortal(z,P))}),dk=h.createContext({});function mM(){var e=X({},Nf);return e.useId}var gC=0,vC=mM();const em=vC?(function(t){var n=vC();return t||n}):(function(t){var n=h.useState("ssr-id"),r=se(n,2),i=r[0],o=r[1];return h.useEffect(function(){var a=gC;gC+=1,o("rc_unique_".concat(a))},[]),t||i});function yC(e,t,n){var r=t;return!r&&n&&(r="".concat(e,"-").concat(n)),r}function bC(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if(typeof n!="number"){var i=e.document;n=i.documentElement[r],typeof n!="number"&&(n=i.body[r])}return n}function pM(e){var t=e.getBoundingClientRect(),n={left:t.left,top:t.top},r=e.ownerDocument,i=r.defaultView||r.parentWindow;return n.left+=bC(i),n.top+=bC(i,!0),n}const gM=h.memo(function(e){var t=e.children;return t},function(e,t){var n=t.shouldUpdate;return!n});var vM={width:0,height:0,overflow:"hidden",outline:"none"},yM={outline:"none"},hk=J.forwardRef(function(e,t){var n=e.prefixCls,r=e.className,i=e.style,o=e.title,a=e.ariaId,c=e.footer,u=e.closable,d=e.closeIcon,f=e.onClose,m=e.children,g=e.bodyStyle,v=e.bodyProps,y=e.modalRender,S=e.onMouseDown,_=e.onMouseUp,C=e.holderRef,E=e.visible,k=e.forceRender,$=e.width,P=e.height,T=e.classNames,O=e.styles,N=J.useContext(dk),I=N.panel,z=Jo(C,I),L=h.useRef(),M=h.useRef();J.useImperativeHandle(t,function(){return{focus:function(){var U;(U=L.current)===null||U===void 0||U.focus({preventScroll:!0})},changeActive:function(U){var Y=document,Z=Y.activeElement;U&&Z===M.current?L.current.focus({preventScroll:!0}):!U&&Z===L.current&&M.current.focus({preventScroll:!0})}}});var j={};$!==void 0&&(j.width=$),P!==void 0&&(j.height=P);var B=c?J.createElement("div",{className:ne("".concat(n,"-footer"),T==null?void 0:T.footer),style:X({},O==null?void 0:O.footer)},c):null,H=o?J.createElement("div",{className:ne("".concat(n,"-header"),T==null?void 0:T.header),style:X({},O==null?void 0:O.header)},J.createElement("div",{className:"".concat(n,"-title"),id:a},o)):null,W=h.useMemo(function(){return _t(u)==="object"&&u!==null?u:u?{closeIcon:d??J.createElement("span",{className:"".concat(n,"-close-x")})}:{}},[u,d,n]),V=Ki(W,!0),A=_t(u)==="object"&&u.disabled,G=u?J.createElement("button",Re({type:"button",onClick:f,"aria-label":"Close"},V,{className:"".concat(n,"-close"),disabled:A}),W.closeIcon):null,q=J.createElement("div",{className:ne("".concat(n,"-content"),T==null?void 0:T.content),style:O==null?void 0:O.content},G,H,J.createElement("div",Re({className:ne("".concat(n,"-body"),T==null?void 0:T.body),style:X(X({},g),O==null?void 0:O.body)},v),m),B);return J.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":o?a:null,"aria-modal":"true",ref:z,style:X(X({},i),j),className:ne(n,r),onMouseDown:S,onMouseUp:_},J.createElement("div",{ref:L,tabIndex:0,style:yM},J.createElement(gM,{shouldUpdate:E||k},y?y(q):q)),J.createElement("div",{tabIndex:0,ref:M,style:vM}))}),fk=h.forwardRef(function(e,t){var n=e.prefixCls,r=e.title,i=e.style,o=e.className,a=e.visible,c=e.forceRender,u=e.destroyOnClose,d=e.motionName,f=e.ariaId,m=e.onVisibleChanged,g=e.mousePosition,v=h.useRef(),y=h.useState(),S=se(y,2),_=S[0],C=S[1],E={};_&&(E.transformOrigin=_);function k(){var $=pM(v.current);C(g&&(g.x||g.y)?"".concat(g.x-$.left,"px ").concat(g.y-$.top,"px"):"")}return h.createElement(qi,{visible:a,onVisibleChanged:m,onAppearPrepare:k,onEnterPrepare:k,forceRender:c,motionName:d,removeOnLeave:u,ref:v},function($,P){var T=$.className,O=$.style;return h.createElement(hk,Re({},e,{ref:t,title:r,ariaId:f,prefixCls:n,holderRef:P,style:X(X(X({},O),i),E),className:ne(o,T)}))})});fk.displayName="Content";var bM=function(t){var n=t.prefixCls,r=t.style,i=t.visible,o=t.maskProps,a=t.motionName,c=t.className;return h.createElement(qi,{key:"mask",visible:i,motionName:a,leavedClassName:"".concat(n,"-mask-hidden")},function(u,d){var f=u.className,m=u.style;return h.createElement("div",Re({ref:d,style:X(X({},m),r),className:ne("".concat(n,"-mask"),f,c)},o))})},_M=function(t){var n=t.prefixCls,r=n===void 0?"rc-dialog":n,i=t.zIndex,o=t.visible,a=o===void 0?!1:o,c=t.keyboard,u=c===void 0?!0:c,d=t.focusTriggerAfterClose,f=d===void 0?!0:d,m=t.wrapStyle,g=t.wrapClassName,v=t.wrapProps,y=t.onClose,S=t.afterOpenChange,_=t.afterClose,C=t.transitionName,E=t.animation,k=t.closable,$=k===void 0?!0:k,P=t.mask,T=P===void 0?!0:P,O=t.maskTransitionName,N=t.maskAnimation,I=t.maskClosable,z=I===void 0?!0:I,L=t.maskStyle,M=t.maskProps,j=t.rootClassName,B=t.classNames,H=t.styles,W=h.useRef(),V=h.useRef(),A=h.useRef(),G=h.useState(a),q=se(G,2),D=q[0],U=q[1],Y=em();function Z(){pv(V.current,document.activeElement)||(W.current=document.activeElement)}function ee(){if(!pv(V.current,document.activeElement)){var me;(me=A.current)===null||me===void 0||me.focus()}}function re(me){if(me)ee();else{if(U(!1),T&&W.current&&f){try{W.current.focus({preventScroll:!0})}catch{}W.current=null}D&&(_==null||_())}S==null||S(me)}function he(me){y==null||y(me)}var fe=h.useRef(!1),ue=h.useRef(),Se=function(){clearTimeout(ue.current),fe.current=!0},ae=function(){ue.current=setTimeout(function(){fe.current=!1})},le=null;z&&(le=function(de){fe.current?fe.current=!1:V.current===de.target&&he(de)});function ce(me){if(u&&me.keyCode===Ge.ESC){me.stopPropagation(),he(me);return}a&&me.keyCode===Ge.TAB&&A.current.changeActive(!me.shiftKey)}h.useEffect(function(){a&&(U(!0),Z())},[a]),h.useEffect(function(){return function(){clearTimeout(ue.current)}},[]);var ye=X(X(X({zIndex:i},m),H==null?void 0:H.wrapper),{},{display:D?null:"none"});return h.createElement("div",Re({className:ne("".concat(r,"-root"),j)},Ki(t,{data:!0})),h.createElement(bM,{prefixCls:r,visible:T&&a,motionName:yC(r,O,N),style:X(X({zIndex:i},L),H==null?void 0:H.mask),maskProps:M,className:B==null?void 0:B.mask}),h.createElement("div",Re({tabIndex:-1,onKeyDown:ce,className:ne("".concat(r,"-wrap"),g,B==null?void 0:B.wrapper),ref:V,onClick:le,style:ye},v),h.createElement(fk,Re({},t,{onMouseDown:Se,onMouseUp:ae,ref:A,closable:$,ariaId:Y,prefixCls:r,visible:a&&D,onClose:he,onVisibleChanged:re,motionName:yC(r,C,E)}))))},mk=function(t){var n=t.visible,r=t.getContainer,i=t.forceRender,o=t.destroyOnClose,a=o===void 0?!1:o,c=t.afterClose,u=t.panelRef,d=h.useState(n),f=se(d,2),m=f[0],g=f[1],v=h.useMemo(function(){return{panel:u}},[u]);return h.useEffect(function(){n&&g(!0)},[n]),!i&&a&&!m?null:h.createElement(dk.Provider,{value:v},h.createElement(Zf,{open:n||i||m,autoDestroy:!1,getContainer:r,autoLock:n||m},h.createElement(_M,Re({},t,{destroyOnClose:a,afterClose:function(){c==null||c(),g(!1)}}))))};mk.displayName="Dialog";var wa="RC_FORM_INTERNAL_HOOKS",Mn=function(){Ar(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},Zl=h.createContext({getFieldValue:Mn,getFieldsValue:Mn,getFieldError:Mn,getFieldWarning:Mn,getFieldsError:Mn,isFieldsTouched:Mn,isFieldTouched:Mn,isFieldValidating:Mn,isFieldsValidating:Mn,resetFields:Mn,setFields:Mn,setFieldValue:Mn,setFieldsValue:Mn,validateFields:Mn,submit:Mn,getInternalHooks:function(){return Mn(),{dispatch:Mn,initEntityValue:Mn,registerField:Mn,useSubscribe:Mn,setInitialValues:Mn,destroyForm:Mn,setCallbacks:Mn,registerWatch:Mn,getFields:Mn,setValidateMessages:Mn,setPreserve:Mn,getInitialValue:Mn}}}),lf=h.createContext(null);function qv(e){return e==null?[]:Array.isArray(e)?e:[e]}function SM(e){return e&&!!e._init}function Kv(){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 Gv=Kv();function CM(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function wM(e,t,n){if(fy())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&gu(i,n.prototype),i}function Xv(e){var t=typeof Map=="function"?new Map:void 0;return Xv=function(r){if(r===null||!CM(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,i)}function i(){return wM(r,arguments,vu(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),gu(i,r)},Xv(e)}var xM=/%[sdj%]/g,EM=function(){};function Yv(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 Vi(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 i=0,o=n.length;if(typeof e=="function")return e.apply(null,n);if(typeof e=="string"){var a=e.replace(xM,function(c){if(c==="%%")return"%";if(i>=o)return c;switch(c){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}break;default:return c}});return a}return e}function kM(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"||e==="tel"}function $r(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||kM(t)&&typeof e=="string"&&!e)}function $M(e,t,n){var r=[],i=0,o=e.length;function a(c){r.push.apply(r,We(c||[])),i++,i===o&&n(r)}e.forEach(function(c){t(c,a)})}function _C(e,t,n){var r=0,i=e.length;function o(a){if(a&&a.length){n(a);return}var c=r;r=r+1,c<i?t(e[c],o):n([])}o([])}function RM(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,We(e[n]||[]))}),t}var SC=(function(e){gs(n,e);var t=vs(n);function n(r,i){var o;return yr(this,n),o=t.call(this,"Async Validation Error"),K(Zt(o),"errors",void 0),K(Zt(o),"fields",void 0),o.errors=r,o.fields=i,o}return br(n)})(Xv(Error));function TM(e,t,n,r,i){if(t.first){var o=new Promise(function(g,v){var y=function(C){return r(C),C.length?v(new SC(C,Yv(C))):g(i)},S=RM(e);_C(S,n,y)});return o.catch(function(g){return g}),o}var a=t.firstFields===!0?Object.keys(e):t.firstFields||[],c=Object.keys(e),u=c.length,d=0,f=[],m=new Promise(function(g,v){var y=function(_){if(f.push.apply(f,_),d++,d===u)return r(f),f.length?v(new SC(f,Yv(f))):g(i)};c.length||(r(f),g(i)),c.forEach(function(S){var _=e[S];a.indexOf(S)!==-1?_C(_,n,y):$M(_,n,y)})});return m.catch(function(g){return g}),m}function PM(e){return!!(e&&e.message!==void 0)}function OM(e,t){for(var n=e,r=0;r<t.length;r++){if(n==null)return n;n=n[t[r]]}return n}function CC(e,t){return function(n){var r;return e.fullFields?r=OM(t,e.fullFields):r=t[n.field||e.fullField],PM(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 wC(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];_t(r)==="object"&&_t(e[n])==="object"?e[n]=X(X({},e[n]),r):e[n]=r}}return e}var yl="enum",IM=function(t,n,r,i,o){t[yl]=Array.isArray(t[yl])?t[yl]:[],t[yl].indexOf(n)===-1&&i.push(Vi(o.messages[yl],t.fullField,t[yl].join(", ")))},NM=function(t,n,r,i,o){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||i.push(Vi(o.messages.pattern.mismatch,t.fullField,n,t.pattern));else if(typeof t.pattern=="string"){var a=new RegExp(t.pattern);a.test(n)||i.push(Vi(o.messages.pattern.mismatch,t.fullField,n,t.pattern))}}},MM=function(t,n,r,i,o){var a=typeof t.len=="number",c=typeof t.min=="number",u=typeof t.max=="number",d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=n,m=null,g=typeof n=="number",v=typeof n=="string",y=Array.isArray(n);if(g?m="number":v?m="string":y&&(m="array"),!m)return!1;y&&(f=n.length),v&&(f=n.replace(d,"_").length),a?f!==t.len&&i.push(Vi(o.messages[m].len,t.fullField,t.len)):c&&!u&&f<t.min?i.push(Vi(o.messages[m].min,t.fullField,t.min)):u&&!c&&f>t.max?i.push(Vi(o.messages[m].max,t.fullField,t.max)):c&&u&&(f<t.min||f>t.max)&&i.push(Vi(o.messages[m].range,t.fullField,t.min,t.max))},pk=function(t,n,r,i,o,a){t.required&&(!r.hasOwnProperty(t.field)||$r(n,a||t.type))&&i.push(Vi(o.messages.required,t.fullField))},ch;const zM=(function(){if(ch)return ch;var e="[a-fA-F\\d:]",t=function(T){return T&&T.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}",i=["(?:".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}|:))")],o="(?:%[0-9a-zA-Z]{1,})?",a="(?:".concat(i.join("|"),")").concat(o),c=new RegExp("(?:^".concat(n,"$)|(?:^").concat(a,"$)")),u=new RegExp("^".concat(n,"$")),d=new RegExp("^".concat(a,"$")),f=function(T){return T&&T.exact?c:new RegExp("(?:".concat(t(T)).concat(n).concat(t(T),")|(?:").concat(t(T)).concat(a).concat(t(T),")"),"g")};f.v4=function(P){return P&&P.exact?u:new RegExp("".concat(t(P)).concat(n).concat(t(P)),"g")},f.v6=function(P){return P&&P.exact?d:new RegExp("".concat(t(P)).concat(a).concat(t(P)),"g")};var m="(?:(?:[a-z]+:)?//)",g="(?:\\S+(?::\\S*)?@)?",v=f.v4().source,y=f.v6().source,S="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",_="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",C="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",E="(?::\\d{2,5})?",k='(?:[/?#][^\\s"]*)?',$="(?:".concat(m,"|www\\.)").concat(g,"(?:localhost|").concat(v,"|").concat(y,"|").concat(S).concat(_).concat(C,")").concat(E).concat(k);return ch=new RegExp("(?:^".concat($,"$)"),"i"),ch});var Eg={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},tu={integer:function(t){return tu.number(t)&&parseInt(t,10)===t},float:function(t){return tu.number(t)&&!tu.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},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)?!1:typeof t=="number"},object:function(t){return _t(t)==="object"&&!tu.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(Eg.email)},tel:function(t){return typeof t=="string"&&t.length<=32&&!!t.match(Eg.tel)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(zM())},hex:function(t){return typeof t=="string"&&!!t.match(Eg.hex)}},jM=function(t,n,r,i,o){if(t.required&&n===void 0){pk(t,n,r,i,o);return}var a=["integer","float","array","regexp","object","method","email","tel","number","date","url","hex"],c=t.type;a.indexOf(c)>-1?tu[c](n)||i.push(Vi(o.messages.types[c],t.fullField,t.type)):c&&_t(n)!==t.type&&i.push(Vi(o.messages.types[c],t.fullField,t.type))},BM=function(t,n,r,i,o){(/^\s+$/.test(n)||n==="")&&i.push(Vi(o.messages.whitespace,t.fullField))};const un={required:pk,whitespace:BM,type:jM,range:MM,enum:IM,pattern:NM};var LM=function(t,n,r,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if($r(n)&&!t.required)return r();un.required(t,n,i,a,o)}r(a)},AM=function(t,n,r,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(n==null&&!t.required)return r();un.required(t,n,i,a,o,"array"),n!=null&&(un.type(t,n,i,a,o),un.range(t,n,i,a,o))}r(a)},DM=function(t,n,r,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if($r(n)&&!t.required)return r();un.required(t,n,i,a,o),n!==void 0&&un.type(t,n,i,a,o)}r(a)},HM=function(t,n,r,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if($r(n,"date")&&!t.required)return r();if(un.required(t,n,i,a,o),!$r(n,"date")){var u;n instanceof Date?u=n:u=new Date(n),un.type(t,u,i,a,o),u&&un.range(t,u.getTime(),i,a,o)}}r(a)},FM="enum",WM=function(t,n,r,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if($r(n)&&!t.required)return r();un.required(t,n,i,a,o),n!==void 0&&un[FM](t,n,i,a,o)}r(a)},VM=function(t,n,r,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if($r(n)&&!t.required)return r();un.required(t,n,i,a,o),n!==void 0&&(un.type(t,n,i,a,o),un.range(t,n,i,a,o))}r(a)},UM=function(t,n,r,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if($r(n)&&!t.required)return r();un.required(t,n,i,a,o),n!==void 0&&(un.type(t,n,i,a,o),un.range(t,n,i,a,o))}r(a)},qM=function(t,n,r,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if($r(n)&&!t.required)return r();un.required(t,n,i,a,o),n!==void 0&&un.type(t,n,i,a,o)}r(a)},KM=function(t,n,r,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(n===""&&(n=void 0),$r(n)&&!t.required)return r();un.required(t,n,i,a,o),n!==void 0&&(un.type(t,n,i,a,o),un.range(t,n,i,a,o))}r(a)},GM=function(t,n,r,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if($r(n)&&!t.required)return r();un.required(t,n,i,a,o),n!==void 0&&un.type(t,n,i,a,o)}r(a)},XM=function(t,n,r,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if($r(n,"string")&&!t.required)return r();un.required(t,n,i,a,o),$r(n,"string")||un.pattern(t,n,i,a,o)}r(a)},YM=function(t,n,r,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if($r(n)&&!t.required)return r();un.required(t,n,i,a,o),$r(n)||un.type(t,n,i,a,o)}r(a)},JM=function(t,n,r,i,o){var a=[],c=Array.isArray(n)?"array":_t(n);un.required(t,n,i,a,o,c),r(a)},QM=function(t,n,r,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if($r(n,"string")&&!t.required)return r();un.required(t,n,i,a,o,"string"),$r(n,"string")||(un.type(t,n,i,a,o),un.range(t,n,i,a,o),un.pattern(t,n,i,a,o),t.whitespace===!0&&un.whitespace(t,n,i,a,o))}r(a)},uh=function(t,n,r,i,o){var a=t.type,c=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if($r(n,a)&&!t.required)return r();un.required(t,n,i,c,o,a),$r(n,a)||un.type(t,n,i,c,o)}r(c)};const hu={string:QM,method:qM,number:KM,boolean:DM,regexp:YM,integer:UM,float:VM,array:AM,object:GM,enum:WM,pattern:XM,date:HM,url:uh,hex:uh,email:uh,tel:uh,required:JM,any:LM};var qu=(function(){function e(t){yr(this,e),K(this,"rules",null),K(this,"_messages",Gv),this.define(t)}return br(e,[{key:"define",value:function(n){var r=this;if(!n)throw new Error("Cannot configure a schema with no rules");if(_t(n)!=="object"||Array.isArray(n))throw new Error("Rules must be an object");this.rules={},Object.keys(n).forEach(function(i){var o=n[i];r.rules[i]=Array.isArray(o)?o:[o]})}},{key:"messages",value:function(n){return n&&(this._messages=wC(Kv(),n)),this._messages}},{key:"validate",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},a=n,c=i,u=o;if(typeof c=="function"&&(u=c,c={}),!this.rules||Object.keys(this.rules).length===0)return u&&u(null,a),Promise.resolve(a);function d(y){var S=[],_={};function C(k){if(Array.isArray(k)){var $;S=($=S).concat.apply($,We(k))}else S.push(k)}for(var E=0;E<y.length;E++)C(y[E]);S.length?(_=Yv(S),u(S,_)):u(null,a)}if(c.messages){var f=this.messages();f===Gv&&(f=Kv()),wC(f,c.messages),c.messages=f}else c.messages=this.messages();var m={},g=c.keys||Object.keys(this.rules);g.forEach(function(y){var S=r.rules[y],_=a[y];S.forEach(function(C){var E=C;typeof E.transform=="function"&&(a===n&&(a=X({},a)),_=a[y]=E.transform(_),_!=null&&(E.type=E.type||(Array.isArray(_)?"array":_t(_)))),typeof E=="function"?E={validator:E}:E=X({},E),E.validator=r.getValidationMethod(E),E.validator&&(E.field=y,E.fullField=E.fullField||y,E.type=r.getType(E),m[y]=m[y]||[],m[y].push({rule:E,value:_,source:a,field:y}))})});var v={};return TM(m,c,function(y,S){var _=y.rule,C=(_.type==="object"||_.type==="array")&&(_t(_.fields)==="object"||_t(_.defaultField)==="object");C=C&&(_.required||!_.required&&y.value),_.field=y.field;function E(O,N){return X(X({},N),{},{fullField:"".concat(_.fullField,".").concat(O),fullFields:_.fullFields?[].concat(We(_.fullFields),[O]):[O]})}function k(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],N=Array.isArray(O)?O:[O];!c.suppressWarning&&N.length&&e.warning("async-validator:",N),N.length&&_.message!==void 0&&_.message!==null&&(N=[].concat(_.message));var I=N.map(CC(_,a));if(c.first&&I.length)return v[_.field]=1,S(I);if(!C)S(I);else{if(_.required&&!y.value)return _.message!==void 0?I=[].concat(_.message).map(CC(_,a)):c.error&&(I=[c.error(_,Vi(c.messages.required,_.field))]),S(I);var z={};_.defaultField&&Object.keys(y.value).map(function(j){z[j]=_.defaultField}),z=X(X({},z),y.rule.fields);var L={};Object.keys(z).forEach(function(j){var B=z[j],H=Array.isArray(B)?B:[B];L[j]=H.map(E.bind(null,j))});var M=new e(L);M.messages(c.messages),y.rule.options&&(y.rule.options.messages=c.messages,y.rule.options.error=c.error),M.validate(y.value,y.rule.options||c,function(j){var B=[];I&&I.length&&B.push.apply(B,We(I)),j&&j.length&&B.push.apply(B,We(j)),S(B.length?B:null)})}}var $;if(_.asyncValidator)$=_.asyncValidator(_,y.value,k,y.source,c);else if(_.validator){try{$=_.validator(_,y.value,k,y.source,c)}catch(O){var P,T;(P=(T=console).error)===null||P===void 0||P.call(T,O),c.suppressValidatorError||setTimeout(function(){throw O},0),k(O.message)}$===!0?k():$===!1?k(typeof _.message=="function"?_.message(_.fullField||_.field):_.message||"".concat(_.fullField||_.field," fails")):$ instanceof Array?k($):$ instanceof Error&&k($.message)}$&&$.then&&$.then(function(){return k()},function(O){return k(O)})},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&&!hu.hasOwnProperty(n.type))throw new Error(Vi("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),i=r.indexOf("message");return i!==-1&&r.splice(i,1),r.length===1&&r[0]==="required"?hu.required:hu[this.getType(n)]||void 0}}]),e})();K(qu,"register",function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");hu[t]=n});K(qu,"warning",EM);K(qu,"messages",Gv);K(qu,"validators",hu);var Li="'${name}' is not a valid ${type}",gk={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: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:"'${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}"}},xC=qu;function ZM(e,t){return e.replace(/\\?\$\{\w+\}/g,function(n){if(n.startsWith("\\"))return n.slice(1);var r=n.slice(2,-1);return t[r]})}var EC="CODE_LOGIC_ERROR";function Jv(e,t,n,r,i){return Qv.apply(this,arguments)}function Qv(){return Qv=Da(ai().mark(function e(t,n,r,i,o){var a,c,u,d,f,m,g,v,y;return ai().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return a=X({},r),delete a.ruleIndex,xC.warning=function(){},a.validator&&(c=a.validator,a.validator=function(){try{return c.apply(void 0,arguments)}catch(C){return console.error(C),Promise.reject(EC)}}),u=null,a&&a.type==="array"&&a.defaultField&&(u=a.defaultField,delete a.defaultField),d=new xC(K({},t,[a])),f=Ml(gk,i.validateMessages),d.messages(f),m=[],_.prev=10,_.next=13,Promise.resolve(d.validate(K({},t,n),X({},i)));case 13:_.next=18;break;case 15:_.prev=15,_.t0=_.catch(10),_.t0.errors&&(m=_.t0.errors.map(function(C,E){var k=C.message,$=k===EC?f.default:k;return h.isValidElement($)?h.cloneElement($,{key:"error_".concat(E)}):$}));case 18:if(!(!m.length&&u&&Array.isArray(n)&&n.length>0)){_.next=23;break}return _.next=21,Promise.all(n.map(function(C,E){return Jv("".concat(t,".").concat(E),C,u,i,o)}));case 21:return g=_.sent,_.abrupt("return",g.reduce(function(C,E){return[].concat(We(C),We(E))},[]));case 23:return v=X(X({},r),{},{name:t,enum:(r.enum||[]).join(", ")},o),y=m.map(function(C){return typeof C=="string"?ZM(C,v):C}),_.abrupt("return",y);case 26:case"end":return _.stop()}},e,null,[[10,15]])})),Qv.apply(this,arguments)}function e8(e,t,n,r,i,o){var a=e.join("."),c=n.map(function(f,m){var g=f.validator,v=X(X({},f),{},{ruleIndex:m});return g&&(v.validator=function(y,S,_){var C=!1,E=function(){for(var P=arguments.length,T=new Array(P),O=0;O<P;O++)T[O]=arguments[O];Promise.resolve().then(function(){Ar(!C,"Your validator function has already return a promise. `callback` will be ignored."),C||_.apply(void 0,T)})},k=g(y,S,E);C=k&&typeof k.then=="function"&&typeof k.catch=="function",Ar(C,"`callback` is deprecated. Please return a promise instead."),C&&k.then(function(){_()}).catch(function($){_($||" ")})}),v}).sort(function(f,m){var g=f.warningOnly,v=f.ruleIndex,y=m.warningOnly,S=m.ruleIndex;return!!g==!!y?v-S:g?1:-1}),u;if(i===!0)u=new Promise((function(){var f=Da(ai().mark(function m(g,v){var y,S,_;return ai().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:y=0;case 1:if(!(y<c.length)){E.next=12;break}return S=c[y],E.next=5,Jv(a,t,S,r,o);case 5:if(_=E.sent,!_.length){E.next=9;break}return v([{errors:_,rule:S}]),E.abrupt("return");case 9:y+=1,E.next=1;break;case 12:g([]);case 13:case"end":return E.stop()}},m)}));return function(m,g){return f.apply(this,arguments)}})());else{var d=c.map(function(f){return Jv(a,t,f,r,o).then(function(m){return{errors:m,rule:f}})});u=(i?n8(d):t8(d)).then(function(f){return Promise.reject(f)})}return u.catch(function(f){return f}),u}function t8(e){return Zv.apply(this,arguments)}function Zv(){return Zv=Da(ai().mark(function e(t){return ai().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.all(t).then(function(i){var o,a=(o=[]).concat.apply(o,We(i));return a}));case 1:case"end":return r.stop()}},e)})),Zv.apply(this,arguments)}function n8(e){return e0.apply(this,arguments)}function e0(){return e0=Da(ai().mark(function e(t){var n;return ai().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return n=0,i.abrupt("return",new Promise(function(o){t.forEach(function(a){a.then(function(c){c.errors.length&&o([c]),n+=1,n===t.length&&o([])})})}));case 2:case"end":return i.stop()}},e)})),e0.apply(this,arguments)}function ur(e){return qv(e)}function kC(e,t){var n={};return t.forEach(function(r){var i=Wo(e,r);n=xo(n,r,i)}),n}function Fl(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return e&&e.some(function(r){return vk(t,r,n)})}function vk(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!e||!t||!n&&e.length!==t.length?!1:t.every(function(r,i){return e[i]===r})}function r8(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||_t(e)!=="object"||_t(t)!=="object")return!1;var n=Object.keys(e),r=Object.keys(t),i=new Set([].concat(n,r));return We(i).every(function(o){var a=e[o],c=t[o];return typeof a=="function"&&typeof c=="function"?!0:a===c})}function i8(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&_t(t.target)==="object"&&e in t.target?t.target[e]:t}function $C(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var i=e[t],o=t-n;return o>0?[].concat(We(e.slice(0,n)),[i],We(e.slice(n,t)),We(e.slice(t+1,r))):o<0?[].concat(We(e.slice(0,t)),We(e.slice(t+1,n+1)),[i],We(e.slice(n+1,r))):e}var o8=["name"],no=[];function kg(e,t,n,r,i,o){return typeof e=="function"?e(t,n,"source"in o?{source:o.source}:{}):r!==i}var By=(function(e){gs(n,e);var t=vs(n);function n(r){var i;if(yr(this,n),i=t.call(this,r),K(Zt(i),"state",{resetCount:0}),K(Zt(i),"cancelRegisterFunc",null),K(Zt(i),"mounted",!1),K(Zt(i),"touched",!1),K(Zt(i),"dirty",!1),K(Zt(i),"validatePromise",void 0),K(Zt(i),"prevValidating",void 0),K(Zt(i),"errors",no),K(Zt(i),"warnings",no),K(Zt(i),"cancelRegister",function(){var u=i.props,d=u.preserve,f=u.isListField,m=u.name;i.cancelRegisterFunc&&i.cancelRegisterFunc(f,d,ur(m)),i.cancelRegisterFunc=null}),K(Zt(i),"getNamePath",function(){var u=i.props,d=u.name,f=u.fieldContext,m=f.prefixName,g=m===void 0?[]:m;return d!==void 0?[].concat(We(g),We(d)):[]}),K(Zt(i),"getRules",function(){var u=i.props,d=u.rules,f=d===void 0?[]:d,m=u.fieldContext;return f.map(function(g){return typeof g=="function"?g(m):g})}),K(Zt(i),"refresh",function(){i.mounted&&i.setState(function(u){var d=u.resetCount;return{resetCount:d+1}})}),K(Zt(i),"metaCache",null),K(Zt(i),"triggerMetaEvent",function(u){var d=i.props.onMetaChange;if(d){var f=X(X({},i.getMeta()),{},{destroy:u});_u(i.metaCache,f)||d(f),i.metaCache=f}else i.metaCache=null}),K(Zt(i),"onStoreChange",function(u,d,f){var m=i.props,g=m.shouldUpdate,v=m.dependencies,y=v===void 0?[]:v,S=m.onReset,_=f.store,C=i.getNamePath(),E=i.getValue(u),k=i.getValue(_),$=d&&Fl(d,C);switch(f.type==="valueUpdate"&&f.source==="external"&&!_u(E,k)&&(i.touched=!0,i.dirty=!0,i.validatePromise=null,i.errors=no,i.warnings=no,i.triggerMetaEvent()),f.type){case"reset":if(!d||$){i.touched=!1,i.dirty=!1,i.validatePromise=void 0,i.errors=no,i.warnings=no,i.triggerMetaEvent(),S==null||S(),i.refresh();return}break;case"remove":{if(g&&kg(g,u,_,E,k,f)){i.reRender();return}break}case"setField":{var P=f.data;if($){"touched"in P&&(i.touched=P.touched),"validating"in P&&!("originRCField"in P)&&(i.validatePromise=P.validating?Promise.resolve([]):null),"errors"in P&&(i.errors=P.errors||no),"warnings"in P&&(i.warnings=P.warnings||no),i.dirty=!0,i.triggerMetaEvent(),i.reRender();return}else if("value"in P&&Fl(d,C,!0)){i.reRender();return}if(g&&!C.length&&kg(g,u,_,E,k,f)){i.reRender();return}break}case"dependenciesUpdate":{var T=y.map(ur);if(T.some(function(O){return Fl(f.relatedFields,O)})){i.reRender();return}break}default:if($||(!y.length||C.length||g)&&kg(g,u,_,E,k,f)){i.reRender();return}break}g===!0&&i.reRender()}),K(Zt(i),"validateRules",function(u){var d=i.getNamePath(),f=i.getValue(),m=u||{},g=m.triggerName,v=m.validateOnly,y=v===void 0?!1:v,S=Promise.resolve().then(Da(ai().mark(function _(){var C,E,k,$,P,T,O;return ai().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:if(i.mounted){I.next=2;break}return I.abrupt("return",[]);case 2:if(C=i.props,E=C.validateFirst,k=E===void 0?!1:E,$=C.messageVariables,P=C.validateDebounce,T=i.getRules(),g&&(T=T.filter(function(z){return z}).filter(function(z){var L=z.validateTrigger;if(!L)return!0;var M=qv(L);return M.includes(g)})),!(P&&g)){I.next=10;break}return I.next=8,new Promise(function(z){setTimeout(z,P)});case 8:if(i.validatePromise===S){I.next=10;break}return I.abrupt("return",[]);case 10:return O=e8(d,f,T,u,k,$),O.catch(function(z){return z}).then(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:no;if(i.validatePromise===S){var L;i.validatePromise=null;var M=[],j=[];(L=z.forEach)===null||L===void 0||L.call(z,function(B){var H=B.rule.warningOnly,W=B.errors,V=W===void 0?no:W;H?j.push.apply(j,We(V)):M.push.apply(M,We(V))}),i.errors=M,i.warnings=j,i.triggerMetaEvent(),i.reRender()}}),I.abrupt("return",O);case 13:case"end":return I.stop()}},_)})));return y||(i.validatePromise=S,i.dirty=!0,i.errors=no,i.warnings=no,i.triggerMetaEvent(),i.reRender()),S}),K(Zt(i),"isFieldValidating",function(){return!!i.validatePromise}),K(Zt(i),"isFieldTouched",function(){return i.touched}),K(Zt(i),"isFieldDirty",function(){if(i.dirty||i.props.initialValue!==void 0)return!0;var u=i.props.fieldContext,d=u.getInternalHooks(wa),f=d.getInitialValue;return f(i.getNamePath())!==void 0}),K(Zt(i),"getErrors",function(){return i.errors}),K(Zt(i),"getWarnings",function(){return i.warnings}),K(Zt(i),"isListField",function(){return i.props.isListField}),K(Zt(i),"isList",function(){return i.props.isList}),K(Zt(i),"isPreserve",function(){return i.props.preserve}),K(Zt(i),"getMeta",function(){i.prevValidating=i.isFieldValidating();var u={touched:i.isFieldTouched(),validating:i.prevValidating,errors:i.errors,warnings:i.warnings,name:i.getNamePath(),validated:i.validatePromise===null};return u}),K(Zt(i),"getOnlyChild",function(u){if(typeof u=="function"){var d=i.getMeta();return X(X({},i.getOnlyChild(u(i.getControlled(),d,i.props.fieldContext))),{},{isFunction:!0})}var f=mi(u);return f.length!==1||!h.isValidElement(f[0])?{child:f,isFunction:!1}:{child:f[0],isFunction:!1}}),K(Zt(i),"getValue",function(u){var d=i.props.fieldContext.getFieldsValue,f=i.getNamePath();return Wo(u||d(!0),f)}),K(Zt(i),"getControlled",function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=i.props,f=d.name,m=d.trigger,g=d.validateTrigger,v=d.getValueFromEvent,y=d.normalize,S=d.valuePropName,_=d.getValueProps,C=d.fieldContext,E=g!==void 0?g:C.validateTrigger,k=i.getNamePath(),$=C.getInternalHooks,P=C.getFieldsValue,T=$(wa),O=T.dispatch,N=i.getValue(),I=_||function(B){return K({},S,B)},z=u[m],L=f!==void 0?I(N):{},M=X(X({},u),L);M[m]=function(){i.touched=!0,i.dirty=!0,i.triggerMetaEvent();for(var B,H=arguments.length,W=new Array(H),V=0;V<H;V++)W[V]=arguments[V];v?B=v.apply(void 0,W):B=i8.apply(void 0,[S].concat(W)),y&&(B=y(B,N,P(!0))),B!==N&&O({type:"updateValue",namePath:k,value:B}),z&&z.apply(void 0,W)};var j=qv(E||[]);return j.forEach(function(B){var H=M[B];M[B]=function(){H&&H.apply(void 0,arguments);var W=i.props.rules;W&&W.length&&O({type:"validateField",namePath:k,triggerName:B})}}),M}),r.fieldContext){var o=r.fieldContext.getInternalHooks,a=o(wa),c=a.initEntityValue;c(Zt(i))}return i}return br(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.shouldUpdate,a=i.fieldContext;if(this.mounted=!0,a){var c=a.getInternalHooks,u=c(wa),d=u.registerField;this.cancelRegisterFunc=d(this)}o===!0&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var i=this.state.resetCount,o=this.props.children,a=this.getOnlyChild(o),c=a.child,u=a.isFunction,d;return u?d=c:h.isValidElement(c)?d=h.cloneElement(c,this.getControlled(c.props)):(Ar(!c,"`children` of Field is not validate ReactElement."),d=c),h.createElement(h.Fragment,{key:i},d)}}]),n})(h.Component);K(By,"contextType",Zl);K(By,"defaultProps",{trigger:"onChange",valuePropName:"value"});function yk(e){var t,n=e.name,r=Lt(e,o8),i=h.useContext(Zl),o=h.useContext(lf),a=n!==void 0?ur(n):void 0,c=(t=r.isListField)!==null&&t!==void 0?t:!!o,u="keep";return c||(u="_".concat((a||[]).join("_"))),h.createElement(By,Re({key:u,name:a,isListField:c},r,{fieldContext:i}))}function s8(e){var t=e.name,n=e.initialValue,r=e.children,i=e.rules,o=e.validateTrigger,a=e.isListField,c=h.useContext(Zl),u=h.useContext(lf),d=h.useRef({keys:[],id:0}),f=d.current,m=h.useMemo(function(){var S=ur(c.prefixName)||[];return[].concat(We(S),We(ur(t)))},[c.prefixName,t]),g=h.useMemo(function(){return X(X({},c),{},{prefixName:m})},[c,m]),v=h.useMemo(function(){return{getKey:function(_){var C=m.length,E=_[C];return[f.keys[E],_.slice(C+1)]}}},[m]);if(typeof r!="function")return Ar(!1,"Form.List only accepts function as children."),null;var y=function(_,C,E){var k=E.source;return k==="internal"?!1:_!==C};return h.createElement(lf.Provider,{value:v},h.createElement(Zl.Provider,{value:g},h.createElement(yk,{name:[],shouldUpdate:y,rules:i,validateTrigger:o,initialValue:n,isList:!0,isListField:a??!!u},function(S,_){var C=S.value,E=C===void 0?[]:C,k=S.onChange,$=c.getFieldValue,P=function(){var I=$(m||[]);return I||[]},T={add:function(I,z){var L=P();z>=0&&z<=L.length?(f.keys=[].concat(We(f.keys.slice(0,z)),[f.id],We(f.keys.slice(z))),k([].concat(We(L.slice(0,z)),[I],We(L.slice(z))))):(f.keys=[].concat(We(f.keys),[f.id]),k([].concat(We(L),[I]))),f.id+=1},remove:function(I){var z=P(),L=new Set(Array.isArray(I)?I:[I]);L.size<=0||(f.keys=f.keys.filter(function(M,j){return!L.has(j)}),k(z.filter(function(M,j){return!L.has(j)})))},move:function(I,z){if(I!==z){var L=P();I<0||I>=L.length||z<0||z>=L.length||(f.keys=$C(f.keys,I,z),k($C(L,I,z)))}}},O=E||[];return Array.isArray(O)||(O=[]),r(O.map(function(N,I){var z=f.keys[I];return z===void 0&&(f.keys[I]=f.id,z=f.keys[I],f.id+=1),{name:I,key:z,isListField:!0}}),T,_)})))}function a8(e){var t=!1,n=e.length,r=[];return e.length?new Promise(function(i,o){e.forEach(function(a,c){a.catch(function(u){return t=!0,u}).then(function(u){n-=1,r[c]=u,!(n>0)&&(t&&o(r),i(r))})})}):Promise.resolve([])}var bk="__@field_split__";function $g(e){return e.map(function(t){return"".concat(_t(t),":").concat(t)}).join(bk)}var bl=(function(){function e(){yr(this,e),K(this,"kvs",new Map)}return br(e,[{key:"set",value:function(n,r){this.kvs.set($g(n),r)}},{key:"get",value:function(n){return this.kvs.get($g(n))}},{key:"update",value:function(n,r){var i=this.get(n),o=r(i);o?this.set(n,o):this.delete(n)}},{key:"delete",value:function(n){this.kvs.delete($g(n))}},{key:"map",value:function(n){return We(this.kvs.entries()).map(function(r){var i=se(r,2),o=i[0],a=i[1],c=o.split(bk);return n({key:c.map(function(u){var d=u.match(/^([^:]*):(.*)$/),f=se(d,3),m=f[1],g=f[2];return m==="number"?Number(g):g}),value:a})})}},{key:"toJSON",value:function(){var n={};return this.map(function(r){var i=r.key,o=r.value;return n[i.join(".")]=o,null}),n}}]),e})(),l8=["name"],c8=br(function e(t){var n=this;yr(this,e),K(this,"formHooked",!1),K(this,"forceRootUpdate",void 0),K(this,"subscribable",!0),K(this,"store",{}),K(this,"fieldEntities",[]),K(this,"initialValues",{}),K(this,"callbacks",{}),K(this,"validateMessages",null),K(this,"preserve",null),K(this,"lastValidatePromise",null),K(this,"getForm",function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}}),K(this,"getInternalHooks",function(r){return r===wa?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):(Ar(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),K(this,"useSubscribe",function(r){n.subscribable=r}),K(this,"prevWithoutPreserves",null),K(this,"setInitialValues",function(r,i){if(n.initialValues=r||{},i){var o,a=Ml(r,n.store);(o=n.prevWithoutPreserves)===null||o===void 0||o.map(function(c){var u=c.key;a=xo(a,u,Wo(r,u))}),n.prevWithoutPreserves=null,n.updateStore(a)}}),K(this,"destroyForm",function(r){if(r)n.updateStore({});else{var i=new bl;n.getFieldEntities(!0).forEach(function(o){n.isMergedPreserve(o.isPreserve())||i.set(o.getNamePath(),!0)}),n.prevWithoutPreserves=i}}),K(this,"getInitialValue",function(r){var i=Wo(n.initialValues,r);return r.length?Ml(i):i}),K(this,"setCallbacks",function(r){n.callbacks=r}),K(this,"setValidateMessages",function(r){n.validateMessages=r}),K(this,"setPreserve",function(r){n.preserve=r}),K(this,"watchList",[]),K(this,"registerWatch",function(r){return n.watchList.push(r),function(){n.watchList=n.watchList.filter(function(i){return i!==r})}}),K(this,"notifyWatch",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(n.watchList.length){var i=n.getFieldsValue(),o=n.getFieldsValue(!0);n.watchList.forEach(function(a){a(i,o,r)})}}),K(this,"timeoutId",null),K(this,"warningUnhooked",function(){}),K(this,"updateStore",function(r){n.store=r}),K(this,"getFieldEntities",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return r?n.fieldEntities.filter(function(i){return i.getNamePath().length}):n.fieldEntities}),K(this,"getFieldsMap",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=new bl;return n.getFieldEntities(r).forEach(function(o){var a=o.getNamePath();i.set(a,o)}),i}),K(this,"getFieldEntitiesForNamePathList",function(r){if(!r)return n.getFieldEntities(!0);var i=n.getFieldsMap(!0);return r.map(function(o){var a=ur(o);return i.get(a)||{INVALIDATE_NAME_PATH:ur(o)}})}),K(this,"getFieldsValue",function(r,i){n.warningUnhooked();var o,a,c;if(r===!0||Array.isArray(r)?(o=r,a=i):r&&_t(r)==="object"&&(c=r.strict,a=r.filter),o===!0&&!a)return n.store;var u=n.getFieldEntitiesForNamePathList(Array.isArray(o)?o:null),d=[];return u.forEach(function(f){var m,g,v="INVALIDATE_NAME_PATH"in f?f.INVALIDATE_NAME_PATH:f.getNamePath();if(c){var y,S;if((y=(S=f).isList)!==null&&y!==void 0&&y.call(S))return}else if(!o&&(m=(g=f).isListField)!==null&&m!==void 0&&m.call(g))return;if(!a)d.push(v);else{var _="getMeta"in f?f.getMeta():null;a(_)&&d.push(v)}}),kC(n.store,d.map(ur))}),K(this,"getFieldValue",function(r){n.warningUnhooked();var i=ur(r);return Wo(n.store,i)}),K(this,"getFieldsError",function(r){n.warningUnhooked();var i=n.getFieldEntitiesForNamePathList(r);return i.map(function(o,a){return o&&!("INVALIDATE_NAME_PATH"in o)?{name:o.getNamePath(),errors:o.getErrors(),warnings:o.getWarnings()}:{name:ur(r[a]),errors:[],warnings:[]}})}),K(this,"getFieldError",function(r){n.warningUnhooked();var i=ur(r),o=n.getFieldsError([i])[0];return o.errors}),K(this,"getFieldWarning",function(r){n.warningUnhooked();var i=ur(r),o=n.getFieldsError([i])[0];return o.warnings}),K(this,"isFieldsTouched",function(){n.warningUnhooked();for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=i[0],c=i[1],u,d=!1;i.length===0?u=null:i.length===1?Array.isArray(a)?(u=a.map(ur),d=!1):(u=null,d=a):(u=a.map(ur),d=c);var f=n.getFieldEntities(!0),m=function(_){return _.isFieldTouched()};if(!u)return d?f.every(function(S){return m(S)||S.isList()}):f.some(m);var g=new bl;u.forEach(function(S){g.set(S,[])}),f.forEach(function(S){var _=S.getNamePath();u.forEach(function(C){C.every(function(E,k){return _[k]===E})&&g.update(C,function(E){return[].concat(We(E),[S])})})});var v=function(_){return _.some(m)},y=g.map(function(S){var _=S.value;return _});return d?y.every(v):y.some(v)}),K(this,"isFieldTouched",function(r){return n.warningUnhooked(),n.isFieldsTouched([r])}),K(this,"isFieldsValidating",function(r){n.warningUnhooked();var i=n.getFieldEntities();if(!r)return i.some(function(a){return a.isFieldValidating()});var o=r.map(ur);return i.some(function(a){var c=a.getNamePath();return Fl(o,c)&&a.isFieldValidating()})}),K(this,"isFieldValidating",function(r){return n.warningUnhooked(),n.isFieldsValidating([r])}),K(this,"resetWithFieldInitialValue",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=new bl,o=n.getFieldEntities(!0);o.forEach(function(u){var d=u.props.initialValue,f=u.getNamePath();if(d!==void 0){var m=i.get(f)||new Set;m.add({entity:u,value:d}),i.set(f,m)}});var a=function(d){d.forEach(function(f){var m=f.props.initialValue;if(m!==void 0){var g=f.getNamePath(),v=n.getInitialValue(g);if(v!==void 0)Ar(!1,"Form already set 'initialValues' with path '".concat(g.join("."),"'. Field can not overwrite it."));else{var y=i.get(g);if(y&&y.size>1)Ar(!1,"Multiple Field with path '".concat(g.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(y){var S=n.getFieldValue(g),_=f.isListField();!_&&(!r.skipExist||S===void 0)&&n.updateStore(xo(n.store,g,We(y)[0].value))}}}})},c;r.entities?c=r.entities:r.namePathList?(c=[],r.namePathList.forEach(function(u){var d=i.get(u);if(d){var f;(f=c).push.apply(f,We(We(d).map(function(m){return m.entity})))}})):c=o,a(c)}),K(this,"resetFields",function(r){n.warningUnhooked();var i=n.store;if(!r){n.updateStore(Ml(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(i,null,{type:"reset"}),n.notifyWatch();return}var o=r.map(ur);o.forEach(function(a){var c=n.getInitialValue(a);n.updateStore(xo(n.store,a,c))}),n.resetWithFieldInitialValue({namePathList:o}),n.notifyObservers(i,o,{type:"reset"}),n.notifyWatch(o)}),K(this,"setFields",function(r){n.warningUnhooked();var i=n.store,o=[];r.forEach(function(a){var c=a.name,u=Lt(a,l8),d=ur(c);o.push(d),"value"in u&&n.updateStore(xo(n.store,d,u.value)),n.notifyObservers(i,[d],{type:"setField",data:a})}),n.notifyWatch(o)}),K(this,"getFields",function(){var r=n.getFieldEntities(!0),i=r.map(function(o){var a=o.getNamePath(),c=o.getMeta(),u=X(X({},c),{},{name:a,value:n.getFieldValue(a)});return Object.defineProperty(u,"originRCField",{value:!0}),u});return i}),K(this,"initEntityValue",function(r){var i=r.props.initialValue;if(i!==void 0){var o=r.getNamePath(),a=Wo(n.store,o);a===void 0&&n.updateStore(xo(n.store,o,i))}}),K(this,"isMergedPreserve",function(r){var i=r!==void 0?r:n.preserve;return i??!0}),K(this,"registerField",function(r){n.fieldEntities.push(r);var i=r.getNamePath();if(n.notifyWatch([i]),r.props.initialValue!==void 0){var o=n.store;n.resetWithFieldInitialValue({entities:[r],skipExist:!0}),n.notifyObservers(o,[r.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(a,c){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter(function(m){return m!==r}),!n.isMergedPreserve(c)&&(!a||u.length>1)){var d=a?void 0:n.getInitialValue(i);if(i.length&&n.getFieldValue(i)!==d&&n.fieldEntities.every(function(m){return!vk(m.getNamePath(),i)})){var f=n.store;n.updateStore(xo(f,i,d,!0)),n.notifyObservers(f,[i],{type:"remove"}),n.triggerDependenciesUpdate(f,i)}}n.notifyWatch([i])}}),K(this,"dispatch",function(r){switch(r.type){case"updateValue":{var i=r.namePath,o=r.value;n.updateValue(i,o);break}case"validateField":{var a=r.namePath,c=r.triggerName;n.validateFields([a],{triggerName:c});break}}}),K(this,"notifyObservers",function(r,i,o){if(n.subscribable){var a=X(X({},o),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach(function(c){var u=c.onStoreChange;u(r,i,a)})}else n.forceRootUpdate()}),K(this,"triggerDependenciesUpdate",function(r,i){var o=n.getDependencyChildrenFields(i);return o.length&&n.validateFields(o),n.notifyObservers(r,o,{type:"dependenciesUpdate",relatedFields:[i].concat(We(o))}),o}),K(this,"updateValue",function(r,i){var o=ur(r),a=n.store;n.updateStore(xo(n.store,o,i)),n.notifyObservers(a,[o],{type:"valueUpdate",source:"internal"}),n.notifyWatch([o]);var c=n.triggerDependenciesUpdate(a,o),u=n.callbacks.onValuesChange;if(u){var d=kC(n.store,[o]);u(d,n.getFieldsValue())}n.triggerOnFieldsChange([o].concat(We(c)))}),K(this,"setFieldsValue",function(r){n.warningUnhooked();var i=n.store;if(r){var o=Ml(n.store,r);n.updateStore(o)}n.notifyObservers(i,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()}),K(this,"setFieldValue",function(r,i){n.setFields([{name:r,value:i,errors:[],warnings:[]}])}),K(this,"getDependencyChildrenFields",function(r){var i=new Set,o=[],a=new bl;n.getFieldEntities().forEach(function(u){var d=u.props.dependencies;(d||[]).forEach(function(f){var m=ur(f);a.update(m,function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return g.add(u),g})})});var c=function u(d){var f=a.get(d)||new Set;f.forEach(function(m){if(!i.has(m)){i.add(m);var g=m.getNamePath();m.isFieldDirty()&&g.length&&(o.push(g),u(g))}})};return c(r),o}),K(this,"triggerOnFieldsChange",function(r,i){var o=n.callbacks.onFieldsChange;if(o){var a=n.getFields();if(i){var c=new bl;i.forEach(function(d){var f=d.name,m=d.errors;c.set(f,m)}),a.forEach(function(d){d.errors=c.get(d.name)||d.errors})}var u=a.filter(function(d){var f=d.name;return Fl(r,f)});u.length&&o(u,a)}}),K(this,"validateFields",function(r,i){n.warningUnhooked();var o,a;Array.isArray(r)||typeof r=="string"||typeof i=="string"?(o=r,a=i):a=r;var c=!!o,u=c?o.map(ur):[],d=[],f=String(Date.now()),m=new Set,g=a||{},v=g.recursive,y=g.dirty;n.getFieldEntities(!0).forEach(function(E){if(c||u.push(E.getNamePath()),!(!E.props.rules||!E.props.rules.length)&&!(y&&!E.isFieldDirty())){var k=E.getNamePath();if(m.add(k.join(f)),!c||Fl(u,k,v)){var $=E.validateRules(X({validateMessages:X(X({},gk),n.validateMessages)},a));d.push($.then(function(){return{name:k,errors:[],warnings:[]}}).catch(function(P){var T,O=[],N=[];return(T=P.forEach)===null||T===void 0||T.call(P,function(I){var z=I.rule.warningOnly,L=I.errors;z?N.push.apply(N,We(L)):O.push.apply(O,We(L))}),O.length?Promise.reject({name:k,errors:O,warnings:N}):{name:k,errors:O,warnings:N}}))}}});var S=a8(d);n.lastValidatePromise=S,S.catch(function(E){return E}).then(function(E){var k=E.map(function($){var P=$.name;return P});n.notifyObservers(n.store,k,{type:"validateFinish"}),n.triggerOnFieldsChange(k,E)});var _=S.then(function(){return n.lastValidatePromise===S?Promise.resolve(n.getFieldsValue(u)):Promise.reject([])}).catch(function(E){var k=E.filter(function($){return $&&$.errors.length});return Promise.reject({values:n.getFieldsValue(u),errorFields:k,outOfDate:n.lastValidatePromise!==S})});_.catch(function(E){return E});var C=u.filter(function(E){return m.has(E.join(f))});return n.triggerOnFieldsChange(C),_}),K(this,"submit",function(){n.warningUnhooked(),n.validateFields().then(function(r){var i=n.callbacks.onFinish;if(i)try{i(r)}catch(o){console.error(o)}}).catch(function(r){var i=n.callbacks.onFinishFailed;i&&i(r)})}),this.forceRootUpdate=t});function _k(e){var t=h.useRef(),n=h.useState({}),r=se(n,2),i=r[1];if(!t.current)if(e)t.current=e;else{var o=function(){i({})},a=new c8(o);t.current=a.getForm()}return[t.current]}var t0=h.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),u8=function(t){var n=t.validateMessages,r=t.onFormChange,i=t.onFormFinish,o=t.children,a=h.useContext(t0),c=h.useRef({});return h.createElement(t0.Provider,{value:X(X({},a),{},{validateMessages:X(X({},a.validateMessages),n),triggerFormChange:function(d,f){r&&r(d,{changedFields:f,forms:c.current}),a.triggerFormChange(d,f)},triggerFormFinish:function(d,f){i&&i(d,{values:f,forms:c.current}),a.triggerFormFinish(d,f)},registerForm:function(d,f){d&&(c.current=X(X({},c.current),{},K({},d,f))),a.registerForm(d,f)},unregisterForm:function(d){var f=X({},c.current);delete f[d],c.current=f,a.unregisterForm(d)}})},o)},d8=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],h8=function(t,n){var r=t.name,i=t.initialValues,o=t.fields,a=t.form,c=t.preserve,u=t.children,d=t.component,f=d===void 0?"form":d,m=t.validateMessages,g=t.validateTrigger,v=g===void 0?"onChange":g,y=t.onValuesChange,S=t.onFieldsChange,_=t.onFinish,C=t.onFinishFailed,E=t.clearOnDestroy,k=Lt(t,d8),$=h.useRef(null),P=h.useContext(t0),T=_k(a),O=se(T,1),N=O[0],I=N.getInternalHooks(wa),z=I.useSubscribe,L=I.setInitialValues,M=I.setCallbacks,j=I.setValidateMessages,B=I.setPreserve,H=I.destroyForm;h.useImperativeHandle(n,function(){return X(X({},N),{},{nativeElement:$.current})}),h.useEffect(function(){return P.registerForm(r,N),function(){P.unregisterForm(r)}},[P,N,r]),j(X(X({},P.validateMessages),m)),M({onValuesChange:y,onFieldsChange:function(Z){if(P.triggerFormChange(r,Z),S){for(var ee=arguments.length,re=new Array(ee>1?ee-1:0),he=1;he<ee;he++)re[he-1]=arguments[he];S.apply(void 0,[Z].concat(re))}},onFinish:function(Z){P.triggerFormFinish(r,Z),_&&_(Z)},onFinishFailed:C}),B(c);var W=h.useRef(null);L(i,!W.current),W.current||(W.current=!0),h.useEffect(function(){return function(){return H(E)}},[]);var V,A=typeof u=="function";if(A){var G=N.getFieldsValue(!0);V=u(G,N)}else V=u;z(!A);var q=h.useRef();h.useEffect(function(){r8(q.current||[],o||[])||N.setFields(o||[]),q.current=o},[o,N]);var D=h.useMemo(function(){return X(X({},N),{},{validateTrigger:v})},[N,v]),U=h.createElement(lf.Provider,{value:null},h.createElement(Zl.Provider,{value:D},V));return f===!1?U:h.createElement(f,Re({},k,{ref:$,onSubmit:function(Z){Z.preventDefault(),Z.stopPropagation(),N.submit()},onReset:function(Z){var ee;Z.preventDefault(),N.resetFields(),(ee=k.onReset)===null||ee===void 0||ee.call(k,Z)}}),U)};function RC(e){try{return JSON.stringify(e)}catch{return Math.random()}}function f8(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],i=t[1],o=i===void 0?{}:i,a=SM(o)?{form:o}:o,c=a.form,u=h.useState(),d=se(u,2),f=d[0],m=d[1],g=h.useMemo(function(){return RC(f)},[f]),v=h.useRef(g);v.current=g;var y=h.useContext(Zl),S=c||y,_=S&&S._init,C=ur(r),E=h.useRef(C);return E.current=C,h.useEffect(function(){if(_){var k=S.getFieldsValue,$=S.getInternalHooks,P=$(wa),T=P.registerWatch,O=function(L,M){var j=a.preserve?M:L;return typeof r=="function"?r(j):Wo(j,E.current)},N=T(function(z,L){var M=O(z,L),j=RC(M);v.current!==j&&(v.current=j,m(M))}),I=O(k(),k(!0));return f!==I&&m(I),N}},[_]),f}var m8=h.forwardRef(h8),Ku=m8;Ku.FormProvider=u8;Ku.Field=yk;Ku.List=s8;Ku.useForm=_k;Ku.useWatch=f8;const ku=h.createContext({}),p8=({children:e,status:t,override:n})=>{const r=h.useContext(ku),i=h.useMemo(()=>{const o=Object.assign({},r);return n&&delete o.isFormItemInput,t&&(delete o.status,delete o.hasFeedback,delete o.feedbackIcon),o},[t,n,r]);return h.createElement(ku.Provider,{value:i},e)},g8=h.createContext(void 0),Gu=e=>{const{space:t,form:n,children:r}=e;if(r==null)return null;let i=r;return n&&(i=J.createElement(p8,{override:!0,status:!0},i)),t&&(i=J.createElement(CN,null,i)),i};var v8=function(t){if(si()&&window.document.documentElement){var n=Array.isArray(t)?t:[t],r=window.document.documentElement;return n.some(function(i){return i in r.style})}return!1};function TC(e,t){return v8(e)}const y8=()=>si()&&window.document.documentElement,tm=e=>{const{prefixCls:t,className:n,style:r,size:i,shape:o}=e,a=ne({[`${t}-lg`]:i==="large",[`${t}-sm`]:i==="small"}),c=ne({[`${t}-circle`]:o==="circle",[`${t}-square`]:o==="square",[`${t}-round`]:o==="round"}),u=h.useMemo(()=>typeof i=="number"?{width:i,height:i,lineHeight:`${i}px`}:{},[i]);return h.createElement("span",{className:ne(t,a,c,n),style:Object.assign(Object.assign({},u),r)})},b8=new Yt("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),nm=e=>({height:e,lineHeight:te(e)}),Wl=e=>Object.assign({width:e},nm(e)),_8=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:b8,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),Rg=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},nm(e)),S8=e=>{const{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:r,controlHeightLG:i,controlHeightSM:o}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},Wl(r)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},Wl(i)),[`${t}${t}-sm`]:Object.assign({},Wl(o))}},C8=e=>{const{controlHeight:t,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:i,controlHeightSM:o,gradientFromColor:a,calc:c}=e;return{[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:n},Rg(t,c)),[`${r}-lg`]:Object.assign({},Rg(i,c)),[`${r}-sm`]:Object.assign({},Rg(o,c))}},PC=e=>Object.assign({width:e},nm(e)),w8=e=>{const{skeletonImageCls:t,imageSizeBase:n,gradientFromColor:r,borderRadiusSM:i,calc:o}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:r,borderRadius:i},PC(o(n).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},PC(n)),{maxWidth:o(n).mul(4).equal(),maxHeight:o(n).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}},Tg=(e,t,n)=>{const{skeletonButtonCls:r}=e;return{[`${n}${r}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${n}${r}-round`]:{borderRadius:t}}},Pg=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},nm(e)),x8=e=>{const{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:r,controlHeightLG:i,controlHeightSM:o,gradientFromColor:a,calc:c}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:t,width:c(r).mul(2).equal(),minWidth:c(r).mul(2).equal()},Pg(r,c))},Tg(e,r,n)),{[`${n}-lg`]:Object.assign({},Pg(i,c))}),Tg(e,i,`${n}-lg`)),{[`${n}-sm`]:Object.assign({},Pg(o,c))}),Tg(e,o,`${n}-sm`))},E8=e=>{const{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:i,skeletonButtonCls:o,skeletonInputCls:a,skeletonImageCls:c,controlHeight:u,controlHeightLG:d,controlHeightSM:f,gradientFromColor:m,padding:g,marginSM:v,borderRadius:y,titleHeight:S,blockRadius:_,paragraphLiHeight:C,controlHeightXS:E,paragraphMarginTop:k}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:g,verticalAlign:"top",[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:m},Wl(u)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:Object.assign({},Wl(d)),[`${n}-sm`]:Object.assign({},Wl(f))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[r]:{width:"100%",height:S,background:m,borderRadius:_,[`+ ${i}`]:{marginBlockStart:f}},[i]:{padding:0,"> li":{width:"100%",height:C,listStyle:"none",background:m,borderRadius:_,"+ li":{marginBlockStart:E}}},[`${i}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${r}, ${i} > li`]:{borderRadius:y}}},[`${t}-with-avatar ${t}-content`]:{[r]:{marginBlockStart:v,[`+ ${i}`]:{marginBlockStart:k}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},x8(e)),S8(e)),C8(e)),w8(e)),[`${t}${t}-block`]:{width:"100%",[o]:{width:"100%"},[a]:{width:"100%"}},[`${t}${t}-active`]:{[`
212
+ ${r},
213
+ ${i} > li,
214
+ ${n},
215
+ ${o},
216
+ ${a},
217
+ ${c}
218
+ `]:Object.assign({},_8(e))}}},k8=e=>{const{colorFillContent:t,colorFill:n}=e,r=t,i=n;return{color:r,colorGradientEnd:i,gradientFromColor:r,gradientToColor:i,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},sc=bn("Skeleton",e=>{const{componentCls:t,calc:n}=e,r=tn(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,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 E8(r)},k8,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),$8=e=>{const{prefixCls:t,className:n,rootClassName:r,active:i,shape:o="circle",size:a="default"}=e,{getPrefixCls:c}=h.useContext(Ot),u=c("skeleton",t),[d,f,m]=sc(u),g=fr(e,["prefixCls","className"]),v=ne(u,`${u}-element`,{[`${u}-active`]:i},n,r,f,m);return d(h.createElement("div",{className:v},h.createElement(tm,Object.assign({prefixCls:`${u}-avatar`,shape:o,size:a},g))))},R8=e=>{const{prefixCls:t,className:n,rootClassName:r,active:i,block:o=!1,size:a="default"}=e,{getPrefixCls:c}=h.useContext(Ot),u=c("skeleton",t),[d,f,m]=sc(u),g=fr(e,["prefixCls"]),v=ne(u,`${u}-element`,{[`${u}-active`]:i,[`${u}-block`]:o},n,r,f,m);return d(h.createElement("div",{className:v},h.createElement(tm,Object.assign({prefixCls:`${u}-button`,size:a},g))))},T8="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",P8=e=>{const{prefixCls:t,className:n,rootClassName:r,style:i,active:o}=e,{getPrefixCls:a}=h.useContext(Ot),c=a("skeleton",t),[u,d,f]=sc(c),m=ne(c,`${c}-element`,{[`${c}-active`]:o},n,r,d,f);return u(h.createElement("div",{className:m},h.createElement("div",{className:ne(`${c}-image`,n),style:i},h.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${c}-image-svg`},h.createElement("title",null,"Image placeholder"),h.createElement("path",{d:T8,className:`${c}-image-path`})))))},O8=e=>{const{prefixCls:t,className:n,rootClassName:r,active:i,block:o,size:a="default"}=e,{getPrefixCls:c}=h.useContext(Ot),u=c("skeleton",t),[d,f,m]=sc(u),g=fr(e,["prefixCls"]),v=ne(u,`${u}-element`,{[`${u}-active`]:i,[`${u}-block`]:o},n,r,f,m);return d(h.createElement("div",{className:v},h.createElement(tm,Object.assign({prefixCls:`${u}-input`,size:a},g))))},I8=e=>{const{prefixCls:t,className:n,rootClassName:r,style:i,active:o,children:a}=e,{getPrefixCls:c}=h.useContext(Ot),u=c("skeleton",t),[d,f,m]=sc(u),g=ne(u,`${u}-element`,{[`${u}-active`]:o},f,n,r,m);return d(h.createElement("div",{className:g},h.createElement("div",{className:ne(`${u}-image`,n),style:i},a)))},N8=(e,t)=>{const{width:n,rows:r=2}=t;if(Array.isArray(n))return n[e];if(r-1===e)return n},M8=e=>{const{prefixCls:t,className:n,style:r,rows:i=0}=e,o=Array.from({length:i}).map((a,c)=>h.createElement("li",{key:c,style:{width:N8(c,e)}}));return h.createElement("ul",{className:ne(t,n),style:r},o)},z8=({prefixCls:e,className:t,width:n,style:r})=>h.createElement("h3",{className:ne(e,t),style:Object.assign({width:n},r)});function Og(e){return e&&typeof e=="object"?e:{}}function j8(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function B8(e,t){return!e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}function L8(e,t){const n={};return(!e||!t)&&(n.width="61%"),!e&&t?n.rows=3:n.rows=2,n}const Ha=e=>{const{prefixCls:t,loading:n,className:r,rootClassName:i,style:o,children:a,avatar:c=!1,title:u=!0,paragraph:d=!0,active:f,round:m}=e,{getPrefixCls:g,direction:v,className:y,style:S}=Gr("skeleton"),_=g("skeleton",t),[C,E,k]=sc(_);if(n||!("loading"in e)){const $=!!c,P=!!u,T=!!d;let O;if($){const z=Object.assign(Object.assign({prefixCls:`${_}-avatar`},j8(P,T)),Og(c));O=h.createElement("div",{className:`${_}-header`},h.createElement(tm,Object.assign({},z)))}let N;if(P||T){let z;if(P){const M=Object.assign(Object.assign({prefixCls:`${_}-title`},B8($,T)),Og(u));z=h.createElement(z8,Object.assign({},M))}let L;if(T){const M=Object.assign(Object.assign({prefixCls:`${_}-paragraph`},L8($,P)),Og(d));L=h.createElement(M8,Object.assign({},M))}N=h.createElement("div",{className:`${_}-content`},z,L)}const I=ne(_,{[`${_}-with-avatar`]:$,[`${_}-active`]:f,[`${_}-rtl`]:v==="rtl",[`${_}-round`]:m},y,r,i,E,k);return C(h.createElement("div",{className:I,style:Object.assign(Object.assign({},S),o)},O,N))}return a??null};Ha.Button=R8;Ha.Avatar=$8;Ha.Input=O8;Ha.Image=P8;Ha.Node=I8;function OC(){}const A8=h.createContext({add:OC,remove:OC});function Sk(e){const t=h.useContext(A8),n=h.useRef(null);return er(i=>{if(i){const o=e?i.querySelector(e):i;o&&(t.add(o),n.current=o)}else t.remove(n.current)})}const IC=()=>{const{cancelButtonProps:e,cancelTextLocale:t,onCancel:n}=h.useContext(Uu);return J.createElement(hr,Object.assign({onClick:n},e),t)},NC=()=>{const{confirmLoading:e,okButtonProps:t,okType:n,okTextLocale:r,onOk:i}=h.useContext(Uu);return J.createElement(hr,Object.assign({},ek(n),{loading:e,onClick:i},t),r)};function Ck(e,t){return J.createElement("span",{className:`${e}-close-x`},t||J.createElement(ta,{className:`${e}-close-icon`}))}const wk=e=>{const{okText:t,okType:n="primary",cancelText:r,confirmLoading:i,onOk:o,onCancel:a,okButtonProps:c,cancelButtonProps:u,footer:d}=e,[f]=ys("Modal",rE()),m=t||(f==null?void 0:f.okText),g=r||(f==null?void 0:f.cancelText),v=J.useMemo(()=>({confirmLoading:i,okButtonProps:c,cancelButtonProps:u,okTextLocale:m,cancelTextLocale:g,okType:n,onOk:o,onCancel:a}),[i,c,u,m,g,n,o,a]);let y;return typeof d=="function"||typeof d>"u"?(y=J.createElement(J.Fragment,null,J.createElement(IC,null),J.createElement(NC,null)),typeof d=="function"&&(y=d(y,{OkBtn:NC,CancelBtn:IC})),y=J.createElement(ck,{value:v},y)):y=d,J.createElement(uE,{disabled:!1},y)},D8=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"}}}},H8=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},F8=(e,t)=>{const{prefixCls:n,componentCls:r,gridColumns:i}=e,o={};for(let a=i;a>=0;a--)a===0?(o[`${r}${t}-${a}`]={display:"none"},o[`${r}-push-${a}`]={insetInlineStart:"auto"},o[`${r}-pull-${a}`]={insetInlineEnd:"auto"},o[`${r}${t}-push-${a}`]={insetInlineStart:"auto"},o[`${r}${t}-pull-${a}`]={insetInlineEnd:"auto"},o[`${r}${t}-offset-${a}`]={marginInlineStart:0},o[`${r}${t}-order-${a}`]={order:0}):(o[`${r}${t}-${a}`]=[{"--ant-display":"block",display:"block"},{display:"var(--ant-display)",flex:`0 0 ${a/i*100}%`,maxWidth:`${a/i*100}%`}],o[`${r}${t}-push-${a}`]={insetInlineStart:`${a/i*100}%`},o[`${r}${t}-pull-${a}`]={insetInlineEnd:`${a/i*100}%`},o[`${r}${t}-offset-${a}`]={marginInlineStart:`${a/i*100}%`},o[`${r}${t}-order-${a}`]={order:a});return o[`${r}${t}-flex`]={flex:`var(--${n}${t}-flex)`},o},n0=(e,t)=>F8(e,t),W8=(e,t,n)=>({[`@media (min-width: ${te(t)})`]:Object.assign({},n0(e,n))}),V8=()=>({}),U8=()=>({}),q8=bn("Grid",D8,V8),xk=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin}),K8=bn("Grid",e=>{const t=tn(e,{gridColumns:24}),n=xk(t);return delete n.xs,[H8(t),n0(t,""),n0(t,"-xs"),Object.keys(n).map(r=>W8(t,n[r],`-${r}`)).reduce((r,i)=>Object.assign(Object.assign({},r),i),{})]},U8);function MC(e){return{position:e,inset:0}}const G8=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}-content`]:{pointerEvents:"none"},[`${t}-mask`]:Object.assign(Object.assign({},MC("fixed")),{zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,pointerEvents:"none",[`${t}-hidden`]:{display:"none"}}),[`${t}-wrap`]:Object.assign(Object.assign({},MC("fixed")),{zIndex:e.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${t}-root`]:JN(e)}]},X8=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:`${te(e.marginXS)} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:Object.assign(Object.assign({},Un(e)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${te(e.calc(e.margin).mul(2).equal())})`,margin:"0 auto",paddingBottom:e.paddingLG,[`${t}-title`]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:"break-word"},[`${t}-content`]:{position:"relative",backgroundColor:e.contentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:"auto",padding:e.contentPadding},[`${t}-close`]:Object.assign({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:te(e.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:e.modalCloseIconHoverColor,backgroundColor:e.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:e.colorBgTextActive}},fo(e)),[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${te(e.borderRadiusLG)} ${te(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:`${te(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}-content,
219
+ ${t}-body,
220
+ ${t}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${t}-confirm-body`]:{marginBottom:"auto"}}}]},Y8=e=>{const{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl",[`${t}-confirm-body`]:{direction:"rtl"}}}}},J8=e=>{const{componentCls:t}=e,n=xk(e),r=Object.assign({},n);delete r.xs;const i=`--${t.replace(".","")}-`,o=Object.keys(r).map(a=>({[`@media (min-width: ${te(r[a])})`]:{width:`var(${i}${a}-width)`}}));return{[`${t}-root`]:{[t]:[].concat(We(Object.keys(n).map((a,c)=>{const u=Object.keys(n)[c-1];return u?{[`${i}${a}-width`]:`var(${i}${u}-width)`}:null})),[{width:`var(${i}xs-width)`}],We(o))}}},Ek=e=>{const t=e.padding,n=e.fontSizeHeading5,r=e.lineHeightHeading5;return tn(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:e.colorBgElevated,titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${te(e.paddingMD)} ${te(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${te(e.padding)} ${te(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${te(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${te(e.paddingXS)} ${te(e.padding)}`:0,footerBorderTop:e.wireframe?`${te(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",footerBorderRadius:e.wireframe?`0 0 ${te(e.borderRadiusLG)} ${te(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${te(e.padding*2)} ${te(e.padding*2)} ${te(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM}),$k=bn("Modal",e=>{const t=Ek(e);return[X8(t),Y8(t),G8(t),Vu(t,"zoom"),J8(t)]},kk,{unitless:{titleLineHeight:!0}});var Q8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};let r0;const Z8=e=>{r0={x:e.pageX,y:e.pageY},setTimeout(()=>{r0=null},100)};y8()&&document.documentElement.addEventListener("click",Z8,!0);const Rk=e=>{const{prefixCls:t,className:n,rootClassName:r,open:i,wrapClassName:o,centered:a,getContainer:c,focusTriggerAfterClose:u=!0,style:d,visible:f,width:m=520,footer:g,classNames:v,styles:y,children:S,loading:_,confirmLoading:C,zIndex:E,mousePosition:k,onOk:$,onCancel:P,destroyOnHidden:T,destroyOnClose:O,panelRef:N=null,modalRender:I}=e,z=Q8(e,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","focusTriggerAfterClose","style","visible","width","footer","classNames","styles","children","loading","confirmLoading","zIndex","mousePosition","onOk","onCancel","destroyOnHidden","destroyOnClose","panelRef","modalRender"]),{getPopupContainer:L,getPrefixCls:M,direction:j,modal:B}=h.useContext(Ot),H=we=>{C||P==null||P(we)},W=we=>{$==null||$(we)},V=M("modal",t),A=M(),G=Io(V),[q,D,U]=$k(V,G),Y=ne(o,{[`${V}-centered`]:a??(B==null?void 0:B.centered),[`${V}-wrap-rtl`]:j==="rtl"}),Z=g!==null&&!_?h.createElement(wk,Object.assign({},e,{onOk:W,onCancel:H})):null,[ee,re,he,fe]=Ey(Ql(e),Ql(B),{closable:!0,closeIcon:h.createElement(ta,{className:`${V}-close-icon`}),closeIconRender:we=>Ck(V,we)}),ue=I?we=>h.createElement("div",{className:`${V}-render`},I(we)):void 0,Se=`.${V}-${I?"render":"content"}`,ae=Sk(Se),le=mo(N,ae),[ce,ye]=oc("Modal",E),[me,de]=h.useMemo(()=>m&&typeof m=="object"?[void 0,m]:[m,void 0],[m]),be=h.useMemo(()=>{const we={};return de&&Object.keys(de).forEach(Te=>{const ze=de[Te];ze!==void 0&&(we[`--${V}-${Te}-width`]=typeof ze=="number"?`${ze}px`:ze)}),we},[V,de]);return q(h.createElement(Gu,{form:!0,space:!0},h.createElement(Hu.Provider,{value:ye},h.createElement(mk,Object.assign({width:me},z,{zIndex:ce,getContainer:c===void 0?L:c,prefixCls:V,rootClassName:ne(D,r,U,G),footer:Z,visible:i??f,mousePosition:k??r0,onClose:H,closable:ee&&Object.assign({disabled:he,closeIcon:re},fe),closeIcon:re,focusTriggerAfterClose:u,transitionName:Ko(A,"zoom",e.transitionName),maskTransitionName:Ko(A,"fade",e.maskTransitionName),className:ne(D,n,B==null?void 0:B.className),style:Object.assign(Object.assign(Object.assign({},B==null?void 0:B.style),d),be),classNames:Object.assign(Object.assign(Object.assign({},B==null?void 0:B.classNames),v),{wrapper:ne(Y,v==null?void 0:v.wrapper)}),styles:Object.assign(Object.assign({},B==null?void 0:B.styles),y),panelRef:le,destroyOnClose:T??O,modalRender:ue}),_?h.createElement(Ha,{active:!0,title:!1,paragraph:{rows:4},className:`${V}-body-skeleton`}):S))))},ez=e=>{const{componentCls:t,titleFontSize:n,titleLineHeight:r,modalConfirmIconSize:i,fontSize:o,lineHeight:a,modalTitleHeight:c,fontHeight:u,confirmBodyPadding:d}=e,f=`${t}-confirm`;return{[f]:{"&-rtl":{direction:"rtl"},[`${e.antCls}-modal-header`]:{display:"none"},[`${f}-body-wrapper`]:Object.assign({},tf()),[`&${t} ${t}-body`]:{padding:d},[`${f}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e.iconCls}`]:{flex:"none",fontSize:i,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(u).sub(i).equal()).div(2).equal()},[`&-has-title > ${e.iconCls}`]:{marginTop:e.calc(e.calc(c).sub(i).equal()).div(2).equal()}},[`${f}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:e.marginXS,maxWidth:`calc(100% - ${te(e.marginSM)})`},[`${e.iconCls} + ${f}-paragraph`]:{maxWidth:`calc(100% - ${te(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`},[`${f}-title`]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:n,lineHeight:r},[`${f}-content`]:{color:e.colorText,fontSize:o,lineHeight:a},[`${f}-btns`]:{textAlign:"end",marginTop:e.confirmBtnsMarginTop,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${f}-error ${f}-body > ${e.iconCls}`]:{color:e.colorError},[`${f}-warning ${f}-body > ${e.iconCls},
221
+ ${f}-confirm ${f}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${f}-info ${f}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${f}-success ${f}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},tz=Au(["Modal","confirm"],e=>{const t=Ek(e);return ez(t)},kk,{order:-1e3});var nz=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Tk=e=>{const{prefixCls:t,icon:n,okText:r,cancelText:i,confirmPrefixCls:o,type:a,okCancel:c,footer:u,locale:d}=e,f=nz(e,["prefixCls","icon","okText","cancelText","confirmPrefixCls","type","okCancel","footer","locale"]);let m=n;if(!n&&n!==null)switch(a){case"info":m=h.createElement(AE,null);break;case"success":m=h.createElement(BE,null);break;case"error":m=h.createElement(Hf,null);break;default:m=h.createElement(LE,null)}const g=c??a==="confirm",v=e.autoFocusButton===null?!1:e.autoFocusButton||"ok",[y]=ys("Modal"),S=d||y,_=r||(g?S==null?void 0:S.okText:S==null?void 0:S.justOkText),C=i||(S==null?void 0:S.cancelText),E=h.useMemo(()=>Object.assign({autoFocusButton:v,cancelTextLocale:C,okTextLocale:_,mergedOkCancel:g},f),[v,C,_,g,f]),k=h.createElement(h.Fragment,null,h.createElement(dC,null),h.createElement(hC,null)),$=e.title!==void 0&&e.title!==null,P=`${o}-body`;return h.createElement("div",{className:`${o}-body-wrapper`},h.createElement("div",{className:ne(P,{[`${P}-has-title`]:$})},m,h.createElement("div",{className:`${o}-paragraph`},$&&h.createElement("span",{className:`${o}-title`},e.title),h.createElement("div",{className:`${o}-content`},e.content))),u===void 0||typeof u=="function"?h.createElement(ck,{value:E},h.createElement("div",{className:`${o}-btns`},typeof u=="function"?u(k,{OkBtn:hC,CancelBtn:dC}):k)):u,h.createElement(tz,{prefixCls:t}))},rz=e=>{const{close:t,zIndex:n,maskStyle:r,direction:i,prefixCls:o,wrapClassName:a,rootPrefixCls:c,bodyStyle:u,closable:d=!1,onConfirm:f,styles:m,title:g}=e,v=`${o}-confirm`,y=e.width||416,S=e.style||{},_=e.mask===void 0?!0:e.mask,C=e.maskClosable===void 0?!1:e.maskClosable,E=ne(v,`${v}-${e.type}`,{[`${v}-rtl`]:i==="rtl"},e.className),[,k]=gi(),$=h.useMemo(()=>n!==void 0?n:k.zIndexPopupBase+VE,[n,k]);return h.createElement(Rk,Object.assign({},e,{className:E,wrapClassName:ne({[`${v}-centered`]:!!e.centered},a),onCancel:()=>{t==null||t({triggerCancel:!0}),f==null||f(!1)},title:g,footer:null,transitionName:Ko(c||"","zoom",e.transitionName),maskTransitionName:Ko(c||"","fade",e.maskTransitionName),mask:_,maskClosable:C,style:S,styles:Object.assign({body:u,mask:r},m),width:y,zIndex:$,closable:d}),h.createElement(Tk,Object.assign({},e,{confirmPrefixCls:v})))},Pk=e=>{const{rootPrefixCls:t,iconPrefixCls:n,direction:r,theme:i}=e;return h.createElement(Qo,{prefixCls:t,iconPrefixCls:n,direction:r,theme:i},h.createElement(rz,Object.assign({},e)))},xa=[];let Ok="";function Ik(){return Ok}const iz=e=>{var t,n;const{prefixCls:r,getContainer:i,direction:o}=e,a=rE(),c=h.useContext(Ot),u=Ik()||c.getPrefixCls(),d=r||`${u}-modal`;let f=i;return f===!1&&(f=void 0),J.createElement(Pk,Object.assign({},e,{rootPrefixCls:u,prefixCls:d,iconPrefixCls:c.iconPrefixCls,theme:c.theme,direction:o??c.direction,locale:(n=(t=c.locale)===null||t===void 0?void 0:t.Modal)!==null&&n!==void 0?n:a,getContainer:f}))};function Xu(e){const t=IE(),n=document.createDocumentFragment();let r=Object.assign(Object.assign({},e),{close:u,open:!0}),i,o;function a(...f){var m;if(f.some(y=>y==null?void 0:y.triggerCancel)){var v;(m=e.onCancel)===null||m===void 0||(v=m).call.apply(v,[e,()=>{}].concat(We(f.slice(1))))}for(let y=0;y<xa.length;y++)if(xa[y]===u){xa.splice(y,1);break}o()}const c=f=>{clearTimeout(i),i=setTimeout(()=>{const m=t.getPrefixCls(void 0,Ik()),g=t.getIconPrefixCls(),v=t.getTheme(),y=J.createElement(iz,Object.assign({},f));o=Ry()(J.createElement(Qo,{prefixCls:m,iconPrefixCls:g,theme:v},typeof t.holderRender=="function"?t.holderRender(y):y),n)})};function u(...f){r=Object.assign(Object.assign({},r),{open:!1,afterClose:()=>{typeof e.afterClose=="function"&&e.afterClose(),a.apply(this,f)}}),r.visible&&delete r.visible,c(r)}function d(f){typeof f=="function"?r=f(r):r=Object.assign(Object.assign({},r),f),c(r)}return c(r),xa.push(u),{destroy:u,update:d}}function Nk(e){return Object.assign(Object.assign({},e),{type:"warning"})}function Mk(e){return Object.assign(Object.assign({},e),{type:"info"})}function zk(e){return Object.assign(Object.assign({},e),{type:"success"})}function jk(e){return Object.assign(Object.assign({},e),{type:"error"})}function Bk(e){return Object.assign(Object.assign({},e),{type:"confirm"})}function oz({rootPrefixCls:e}){Ok=e}var sz=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const az=(e,t)=>{var n,{afterClose:r,config:i}=e,o=sz(e,["afterClose","config"]);const[a,c]=h.useState(!0),[u,d]=h.useState(i),{direction:f,getPrefixCls:m}=h.useContext(Ot),g=m("modal"),v=m(),y=()=>{var E;r(),(E=u.afterClose)===null||E===void 0||E.call(u)},S=(...E)=>{var k;if(c(!1),E.some(T=>T==null?void 0:T.triggerCancel)){var P;(k=u.onCancel)===null||k===void 0||(P=k).call.apply(P,[u,()=>{}].concat(We(E.slice(1))))}};h.useImperativeHandle(t,()=>({destroy:S,update:E=>{d(k=>{const $=typeof E=="function"?E(k):E;return Object.assign(Object.assign({},k),$)})}}));const _=(n=u.okCancel)!==null&&n!==void 0?n:u.type==="confirm",[C]=ys("Modal",Qs.Modal);return h.createElement(Pk,Object.assign({prefixCls:g,rootPrefixCls:v},u,{close:S,open:a,afterClose:y,okText:u.okText||(_?C==null?void 0:C.okText:C==null?void 0:C.justOkText),direction:u.direction||f,cancelText:u.cancelText||(C==null?void 0:C.cancelText)},o))},lz=h.forwardRef(az);let zC=0;const cz=h.memo(h.forwardRef((e,t)=>{const[n,r]=jI();return h.useImperativeHandle(t,()=>({patchElement:r}),[r]),h.createElement(h.Fragment,null,n)}));function uz(){const e=h.useRef(null),[t,n]=h.useState([]);h.useEffect(()=>{t.length&&(We(t).forEach(a=>{a()}),n([]))},[t]);const r=h.useCallback(o=>function(c){var u;zC+=1;const d=h.createRef();let f;const m=new Promise(_=>{f=_});let g=!1,v;const y=h.createElement(lz,{key:`modal-${zC}`,config:o(c),ref:d,afterClose:()=>{v==null||v()},isSilent:()=>g,onConfirm:_=>{f(_)}});return v=(u=e.current)===null||u===void 0?void 0:u.patchElement(y),v&&xa.push(v),{destroy:()=>{function _(){var C;(C=d.current)===null||C===void 0||C.destroy()}d.current?_():n(C=>[].concat(We(C),[_]))},update:_=>{function C(){var E;(E=d.current)===null||E===void 0||E.update(_)}d.current?C():n(E=>[].concat(We(E),[C]))},then:_=>(g=!0,m.then(_))}},[]);return[h.useMemo(()=>({info:r(Mk),success:r(zk),error:r(jk),warning:r(Nk),confirm:r(Bk)}),[r]),h.createElement(cz,{key:"modal-holder",ref:e})]}const dz=J.createContext({});function Lk(e){return t=>h.createElement(Qo,{theme:{token:{motion:!1,zIndexPopupBase:0}}},h.createElement(e,Object.assign({},t)))}const Ak=(e,t,n,r,i)=>Lk(a=>{const{prefixCls:c,style:u}=a,d=h.useRef(null),[f,m]=h.useState(0),[g,v]=h.useState(0),[y,S]=tr(!1,{value:a.open}),{getPrefixCls:_}=h.useContext(Ot),C=_(r||"select",c);h.useEffect(()=>{if(S(!0),typeof ResizeObserver<"u"){const $=new ResizeObserver(T=>{const O=T[0].target;m(O.offsetHeight+8),v(O.offsetWidth)}),P=setInterval(()=>{var T;const O=i?`.${i(C)}`:`.${C}-dropdown`,N=(T=d.current)===null||T===void 0?void 0:T.querySelector(O);N&&(clearInterval(P),$.observe(N))},10);return()=>{clearInterval(P),$.disconnect()}}},[C]);let E=Object.assign(Object.assign({},a),{style:Object.assign(Object.assign({},u),{margin:0}),open:y,visible:y,getPopupContainer:()=>d.current});t&&Object.assign(E,{[t]:{overflow:{adjustX:!1,adjustY:!1}}});const k={paddingBottom:f,position:"relative",minWidth:g};return h.createElement("div",{ref:d,style:k},h.createElement(e,Object.assign({},E)))}),Ly=(function(){if(typeof navigator>"u"||typeof window>"u")return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|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|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e==null?void 0:e.substr(0,4))});var rm=function(t){var n=t.className,r=t.customizeIcon,i=t.customizeIconProps,o=t.children,a=t.onMouseDown,c=t.onClick,u=typeof r=="function"?r(i):r;return h.createElement("span",{className:n,onMouseDown:function(f){f.preventDefault(),a==null||a(f)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:c,"aria-hidden":!0},u!==void 0?u:h.createElement("span",{className:ne(n.split(/\s+/).map(function(d){return"".concat(d,"-icon")}))},o))},hz=function(t,n,r,i,o){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,c=arguments.length>6?arguments[6]:void 0,u=arguments.length>7?arguments[7]:void 0,d=J.useMemo(function(){if(_t(i)==="object")return i.clearIcon;if(o)return o},[i,o]),f=J.useMemo(function(){return!!(!a&&i&&(r.length||c)&&!(u==="combobox"&&c===""))},[i,a,r.length,c,u]);return{allowClear:f,clearIcon:J.createElement(rm,{className:"".concat(t,"-clear"),onMouseDown:n,customizeIcon:d},"×")}},Dk=h.createContext(null);function fz(){return h.useContext(Dk)}function mz(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,t=h.useState(!1),n=se(t,2),r=n[0],i=n[1],o=h.useRef(null),a=function(){window.clearTimeout(o.current)};h.useEffect(function(){return a},[]);var c=function(d,f){a(),o.current=window.setTimeout(function(){i(d),f&&f()},e)};return[r,c,a]}function Hk(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=h.useRef(null),n=h.useRef(null);h.useEffect(function(){return function(){window.clearTimeout(n.current)}},[]);function r(i){(i||t.current===null)&&(t.current=i),window.clearTimeout(n.current),n.current=window.setTimeout(function(){t.current=null},e)}return[function(){return t.current},r]}function pz(e,t,n,r){var i=h.useRef(null);i.current={open:t,triggerOpen:n,customizedTrigger:r},h.useEffect(function(){function o(a){var c;if(!((c=i.current)!==null&&c!==void 0&&c.customizedTrigger)){var u=a.target;u.shadowRoot&&a.composed&&(u=a.composedPath()[0]||u),i.current.open&&e().filter(function(d){return d}).every(function(d){return!d.contains(u)&&d!==u})&&i.current.triggerOpen(!1)}}return window.addEventListener("mousedown",o),function(){return window.removeEventListener("mousedown",o)}},[])}function gz(e){return e&&![Ge.ESC,Ge.SHIFT,Ge.BACKSPACE,Ge.TAB,Ge.WIN_KEY,Ge.ALT,Ge.META,Ge.WIN_KEY_RIGHT,Ge.CTRL,Ge.SEMICOLON,Ge.EQUALS,Ge.CAPS_LOCK,Ge.CONTEXT_MENU,Ge.F1,Ge.F2,Ge.F3,Ge.F4,Ge.F5,Ge.F6,Ge.F7,Ge.F8,Ge.F9,Ge.F10,Ge.F11,Ge.F12].includes(e)}var vz=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],_l=void 0;function yz(e,t){var n=e.prefixCls,r=e.invalidate,i=e.item,o=e.renderItem,a=e.responsive,c=e.responsiveDisabled,u=e.registerSize,d=e.itemKey,f=e.className,m=e.style,g=e.children,v=e.display,y=e.order,S=e.component,_=S===void 0?"div":S,C=Lt(e,vz),E=a&&!v;function k(N){u(d,N)}h.useEffect(function(){return function(){k(null)}},[]);var $=o&&i!==_l?o(i,{index:y}):g,P;r||(P={opacity:E?0:1,height:E?0:_l,overflowY:E?"hidden":_l,order:a?y:_l,pointerEvents:E?"none":_l,position:E?"absolute":_l});var T={};E&&(T["aria-hidden"]=!0);var O=h.createElement(_,Re({className:ne(!r&&n,f),style:X(X({},P),m)},T,C,{ref:t}),$);return a&&(O=h.createElement(co,{onResize:function(I){var z=I.offsetWidth;k(z)},disabled:c},O)),O}var Bl=h.forwardRef(yz);Bl.displayName="Item";function bz(e){if(typeof MessageChannel>"u")Tn(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}function _z(){var e=h.useRef(null),t=function(r){e.current||(e.current=[],bz(function(){Js.unstable_batchedUpdates(function(){e.current.forEach(function(i){i()}),e.current=null})})),e.current.push(r)};return t}function Sl(e,t){var n=h.useState(t),r=se(n,2),i=r[0],o=r[1],a=er(function(c){e(function(){o(c)})});return[i,a]}var cf=J.createContext(null),Sz=["component"],Cz=["className"],wz=["className"],xz=function(t,n){var r=h.useContext(cf);if(!r){var i=t.component,o=i===void 0?"div":i,a=Lt(t,Sz);return h.createElement(o,Re({},a,{ref:n}))}var c=r.className,u=Lt(r,Cz),d=t.className,f=Lt(t,wz);return h.createElement(cf.Provider,{value:null},h.createElement(Bl,Re({ref:n,className:ne(c,d)},u,f)))},Fk=h.forwardRef(xz);Fk.displayName="RawItem";var Ez=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","prefix","suffix","component","itemComponent","onVisibleChange"],Wk="responsive",Vk="invalidate";function kz(e){return"+ ".concat(e.length," ...")}function $z(e,t){var n=e.prefixCls,r=n===void 0?"rc-overflow":n,i=e.data,o=i===void 0?[]:i,a=e.renderItem,c=e.renderRawItem,u=e.itemKey,d=e.itemWidth,f=d===void 0?10:d,m=e.ssr,g=e.style,v=e.className,y=e.maxCount,S=e.renderRest,_=e.renderRawRest,C=e.prefix,E=e.suffix,k=e.component,$=k===void 0?"div":k,P=e.itemComponent,T=e.onVisibleChange,O=Lt(e,Ez),N=m==="full",I=_z(),z=Sl(I,null),L=se(z,2),M=L[0],j=L[1],B=M||0,H=Sl(I,new Map),W=se(H,2),V=W[0],A=W[1],G=Sl(I,0),q=se(G,2),D=q[0],U=q[1],Y=Sl(I,0),Z=se(Y,2),ee=Z[0],re=Z[1],he=Sl(I,0),fe=se(he,2),ue=fe[0],Se=fe[1],ae=Sl(I,0),le=se(ae,2),ce=le[0],ye=le[1],me=h.useState(null),de=se(me,2),be=de[0],we=de[1],Te=h.useState(null),ze=se(Te,2),Ee=ze[0],ke=ze[1],je=h.useMemo(function(){return Ee===null&&N?Number.MAX_SAFE_INTEGER:Ee||0},[Ee,M]),Oe=h.useState(!1),Qe=se(Oe,2),at=Qe[0],$t=Qe[1],pt="".concat(r,"-item"),Je=Math.max(D,ee),ft=y===Wk,Xe=o.length&&ft,yt=y===Vk,tt=Xe||typeof y=="number"&&o.length>y,Le=h.useMemo(function(){var $e=o;return Xe?M===null&&N?$e=o:$e=o.slice(0,Math.min(o.length,B/f)):typeof y=="number"&&($e=o.slice(0,y)),$e},[o,f,M,y,Xe]),rt=h.useMemo(function(){return Xe?o.slice(je+1):o.slice(Le.length)},[o,Le,Xe,je]),Me=h.useCallback(function($e,xe){var Ae;return typeof u=="function"?u($e):(Ae=u&&($e==null?void 0:$e[u]))!==null&&Ae!==void 0?Ae:xe},[u]),qe=h.useCallback(a||function($e){return $e},[a]);function It($e,xe,Ae){Ee===$e&&(xe===void 0||xe===be)||(ke($e),Ae||($t($e<o.length-1),T==null||T($e)),xe!==void 0&&we(xe))}function St($e,xe){j(xe.clientWidth)}function nn($e,xe){A(function(Ae){var et=new Map(Ae);return xe===null?et.delete($e):et.set($e,xe),et})}function Jt($e,xe){re(xe),U(ee)}function _n($e,xe){Se(xe)}function In($e,xe){ye(xe)}function on($e){return V.get(Me(Le[$e],$e))}fn(function(){if(B&&typeof Je=="number"&&Le){var $e=ue+ce,xe=Le.length,Ae=xe-1;if(!xe){It(0,null);return}for(var et=0;et<xe;et+=1){var nt=on(et);if(N&&(nt=nt||0),nt===void 0){It(et-1,void 0,!0);break}if($e+=nt,Ae===0&&$e<=B||et===Ae-1&&$e+on(Ae)<=B){It(Ae,null);break}else if($e+Je>B){It(et-1,$e-nt-ce+ee);break}}E&&on(0)+ce>B&&we(null)}},[B,V,ee,ue,ce,Me,Le]);var Ht=at&&!!rt.length,Rt={};be!==null&&Xe&&(Rt={position:"absolute",left:be,top:0});var sn={prefixCls:pt,responsive:Xe,component:P,invalidate:yt},Xt=c?function($e,xe){var Ae=Me($e,xe);return h.createElement(cf.Provider,{key:Ae,value:X(X({},sn),{},{order:xe,item:$e,itemKey:Ae,registerSize:nn,display:xe<=je})},c($e,xe))}:function($e,xe){var Ae=Me($e,xe);return h.createElement(Bl,Re({},sn,{order:xe,key:Ae,item:$e,renderItem:qe,itemKey:Ae,registerSize:nn,display:xe<=je}))},ot={order:Ht?je:Number.MAX_SAFE_INTEGER,className:"".concat(pt,"-rest"),registerSize:Jt,display:Ht},Et=S||kz,mt=_?h.createElement(cf.Provider,{value:X(X({},sn),ot)},_(rt)):h.createElement(Bl,Re({},sn,ot),typeof Et=="function"?Et(rt):Et),Ie=h.createElement($,Re({className:ne(!yt&&r,v),style:g,ref:t},O),C&&h.createElement(Bl,Re({},sn,{responsive:ft,responsiveDisabled:!Xe,order:-1,className:"".concat(pt,"-prefix"),registerSize:_n,display:!0}),C),Le.map(Xt),tt?mt:null,E&&h.createElement(Bl,Re({},sn,{responsive:ft,responsiveDisabled:!Xe,order:je,className:"".concat(pt,"-suffix"),registerSize:In,display:!0,style:Rt}),E));return ft?h.createElement(co,{onResize:St,disabled:!Xe},Ie):Ie}var Uo=h.forwardRef($z);Uo.displayName="Overflow";Uo.Item=Fk;Uo.RESPONSIVE=Wk;Uo.INVALIDATE=Vk;function Rz(e,t,n){var r=X(X({},e),t);return Object.keys(t).forEach(function(i){var o=t[i];typeof o=="function"&&(r[i]=function(){for(var a,c=arguments.length,u=new Array(c),d=0;d<c;d++)u[d]=arguments[d];return o.apply(void 0,u),(a=e[i])===null||a===void 0?void 0:a.call.apply(a,[e].concat(u))})}),r}var Tz=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Pz=function(t,n){var r=t.prefixCls,i=t.id,o=t.inputElement,a=t.autoFocus,c=t.autoComplete,u=t.editable,d=t.activeDescendantId,f=t.value,m=t.open,g=t.attrs,v=Lt(t,Tz),y=o||h.createElement("input",null),S=y,_=S.ref,C=S.props;return"maxLength"in y.props,y=h.cloneElement(y,X(X(X({type:"search"},Rz(v,C)),{},{id:i,ref:mo(n,_),autoComplete:c||"off",autoFocus:a,className:ne("".concat(r,"-selection-search-input"),C==null?void 0:C.className),role:"combobox","aria-expanded":m||!1,"aria-haspopup":"listbox","aria-owns":"".concat(i,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(i,"_list"),"aria-activedescendant":m?d:void 0},g),{},{value:u?f:"",readOnly:!u,unselectable:u?null:"on",style:X(X({},C.style),{},{opacity:u?null:0})})),y},Uk=h.forwardRef(Pz);function qk(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}var Oz=typeof window<"u"&&window.document&&window.document.documentElement,Iz=Oz;function Nz(e){return e!=null}function Mz(e){return!e&&e!==0}function jC(e){return["string","number"].includes(_t(e))}function Kk(e){var t=void 0;return e&&(jC(e.title)?t=e.title.toString():jC(e.label)&&(t=e.label.toString())),t}function zz(e,t){Iz?h.useLayoutEffect(e,t):h.useEffect(e,t)}function jz(e){var t;return(t=e.key)!==null&&t!==void 0?t:e.value}var BC=function(t){t.preventDefault(),t.stopPropagation()},Bz=function(t){var n=t.id,r=t.prefixCls,i=t.values,o=t.open,a=t.searchValue,c=t.autoClearSearchValue,u=t.inputRef,d=t.placeholder,f=t.disabled,m=t.mode,g=t.showSearch,v=t.autoFocus,y=t.autoComplete,S=t.activeDescendantId,_=t.tabIndex,C=t.removeIcon,E=t.maxTagCount,k=t.maxTagTextLength,$=t.maxTagPlaceholder,P=$===void 0?function(ye){return"+ ".concat(ye.length," ...")}:$,T=t.tagRender,O=t.onToggleOpen,N=t.onRemove,I=t.onInputChange,z=t.onInputPaste,L=t.onInputKeyDown,M=t.onInputMouseDown,j=t.onInputCompositionStart,B=t.onInputCompositionEnd,H=t.onInputBlur,W=h.useRef(null),V=h.useState(0),A=se(V,2),G=A[0],q=A[1],D=h.useState(!1),U=se(D,2),Y=U[0],Z=U[1],ee="".concat(r,"-selection"),re=o||m==="multiple"&&c===!1||m==="tags"?a:"",he=m==="tags"||m==="multiple"&&c===!1||g&&(o||Y);zz(function(){q(W.current.scrollWidth)},[re]);var fe=function(me,de,be,we,Te){return h.createElement("span",{title:Kk(me),className:ne("".concat(ee,"-item"),K({},"".concat(ee,"-item-disabled"),be))},h.createElement("span",{className:"".concat(ee,"-item-content")},de),we&&h.createElement(rm,{className:"".concat(ee,"-item-remove"),onMouseDown:BC,onClick:Te,customizeIcon:C},"×"))},ue=function(me,de,be,we,Te,ze){var Ee=function(je){BC(je),O(!o)};return h.createElement("span",{onMouseDown:Ee},T({label:de,value:me,disabled:be,closable:we,onClose:Te,isMaxTag:!!ze}))},Se=function(me){var de=me.disabled,be=me.label,we=me.value,Te=!f&&!de,ze=be;if(typeof k=="number"&&(typeof be=="string"||typeof be=="number")){var Ee=String(ze);Ee.length>k&&(ze="".concat(Ee.slice(0,k),"..."))}var ke=function(Oe){Oe&&Oe.stopPropagation(),N(me)};return typeof T=="function"?ue(we,ze,de,Te,ke):fe(me,ze,de,Te,ke)},ae=function(me){if(!i.length)return null;var de=typeof P=="function"?P(me):P;return typeof T=="function"?ue(void 0,de,!1,!1,void 0,!0):fe({title:de},de,!1)},le=h.createElement("div",{className:"".concat(ee,"-search"),style:{width:G},onFocus:function(){Z(!0)},onBlur:function(){Z(!1)}},h.createElement(Uk,{ref:u,open:o,prefixCls:r,id:n,inputElement:null,disabled:f,autoFocus:v,autoComplete:y,editable:he,activeDescendantId:S,value:re,onKeyDown:L,onMouseDown:M,onChange:I,onPaste:z,onCompositionStart:j,onCompositionEnd:B,onBlur:H,tabIndex:_,attrs:Ki(t,!0)}),h.createElement("span",{ref:W,className:"".concat(ee,"-search-mirror"),"aria-hidden":!0},re," ")),ce=h.createElement(Uo,{prefixCls:"".concat(ee,"-overflow"),data:i,renderItem:Se,renderRest:ae,suffix:le,itemKey:jz,maxCount:E});return h.createElement("span",{className:"".concat(ee,"-wrap")},ce,!i.length&&!re&&h.createElement("span",{className:"".concat(ee,"-placeholder")},d))},Lz=function(t){var n=t.inputElement,r=t.prefixCls,i=t.id,o=t.inputRef,a=t.disabled,c=t.autoFocus,u=t.autoComplete,d=t.activeDescendantId,f=t.mode,m=t.open,g=t.values,v=t.placeholder,y=t.tabIndex,S=t.showSearch,_=t.searchValue,C=t.activeValue,E=t.maxLength,k=t.onInputKeyDown,$=t.onInputMouseDown,P=t.onInputChange,T=t.onInputPaste,O=t.onInputCompositionStart,N=t.onInputCompositionEnd,I=t.onInputBlur,z=t.title,L=h.useState(!1),M=se(L,2),j=M[0],B=M[1],H=f==="combobox",W=H||S,V=g[0],A=_||"";H&&C&&!j&&(A=C),h.useEffect(function(){H&&B(!1)},[H,C]);var G=f!=="combobox"&&!m&&!S?!1:!!A,q=z===void 0?Kk(V):z,D=h.useMemo(function(){return V?null:h.createElement("span",{className:"".concat(r,"-selection-placeholder"),style:G?{visibility:"hidden"}:void 0},v)},[V,G,v,r]);return h.createElement("span",{className:"".concat(r,"-selection-wrap")},h.createElement("span",{className:"".concat(r,"-selection-search")},h.createElement(Uk,{ref:o,prefixCls:r,id:i,open:m,inputElement:n,disabled:a,autoFocus:c,autoComplete:u,editable:W,activeDescendantId:d,value:A,onKeyDown:k,onMouseDown:$,onChange:function(Y){B(!0),P(Y)},onPaste:T,onCompositionStart:O,onCompositionEnd:N,onBlur:I,tabIndex:y,attrs:Ki(t,!0),maxLength:H?E:void 0})),!H&&V?h.createElement("span",{className:"".concat(r,"-selection-item"),title:q,style:G?{visibility:"hidden"}:void 0},V.label):null,D)},Az=function(t,n){var r=h.useRef(null),i=h.useRef(!1),o=t.prefixCls,a=t.open,c=t.mode,u=t.showSearch,d=t.tokenWithEnter,f=t.disabled,m=t.prefix,g=t.autoClearSearchValue,v=t.onSearch,y=t.onSearchSubmit,S=t.onToggleOpen,_=t.onInputKeyDown,C=t.onInputBlur,E=t.domRef;h.useImperativeHandle(n,function(){return{focus:function(q){r.current.focus(q)},blur:function(){r.current.blur()}}});var k=Hk(0),$=se(k,2),P=$[0],T=$[1],O=function(q){var D=q.which,U=r.current instanceof HTMLTextAreaElement;!U&&a&&(D===Ge.UP||D===Ge.DOWN)&&q.preventDefault(),_&&_(q),D===Ge.ENTER&&c==="tags"&&!i.current&&!a&&(y==null||y(q.target.value)),!(U&&!a&&~[Ge.UP,Ge.DOWN,Ge.LEFT,Ge.RIGHT].indexOf(D))&&gz(D)&&S(!0)},N=function(){T(!0)},I=h.useRef(null),z=function(q){v(q,!0,i.current)!==!1&&S(!0)},L=function(){i.current=!0},M=function(q){i.current=!1,c!=="combobox"&&z(q.target.value)},j=function(q){var D=q.target.value;if(d&&I.current&&/[\r\n]/.test(I.current)){var U=I.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");D=D.replace(U,I.current)}I.current=null,z(D)},B=function(q){var D=q.clipboardData,U=D==null?void 0:D.getData("text");I.current=U||""},H=function(q){var D=q.target;if(D!==r.current){var U=document.body.style.msTouchAction!==void 0;U?setTimeout(function(){r.current.focus()}):r.current.focus()}},W=function(q){var D=P();q.target!==r.current&&!D&&!(c==="combobox"&&f)&&q.preventDefault(),(c!=="combobox"&&(!u||!D)||!a)&&(a&&g!==!1&&v("",!0,!1),S())},V={inputRef:r,onInputKeyDown:O,onInputMouseDown:N,onInputChange:j,onInputPaste:B,onInputCompositionStart:L,onInputCompositionEnd:M,onInputBlur:C},A=c==="multiple"||c==="tags"?h.createElement(Bz,Re({},t,V)):h.createElement(Lz,Re({},t,V));return h.createElement("div",{ref:E,className:"".concat(o,"-selector"),onClick:H,onMouseDown:W},m&&h.createElement("div",{className:"".concat(o,"-prefix")},m),A)},Dz=h.forwardRef(Az);function Hz(e){var t=e.prefixCls,n=e.align,r=e.arrow,i=e.arrowPos,o=r||{},a=o.className,c=o.content,u=i.x,d=u===void 0?0:u,f=i.y,m=f===void 0?0:f,g=h.useRef();if(!n||!n.points)return null;var v={position:"absolute"};if(n.autoArrow!==!1){var y=n.points[0],S=n.points[1],_=y[0],C=y[1],E=S[0],k=S[1];_===E||!["t","b"].includes(_)?v.top=m:_==="t"?v.top=0:v.bottom=0,C===k||!["l","r"].includes(C)?v.left=d:C==="l"?v.left=0:v.right=0}return h.createElement("div",{ref:g,className:ne("".concat(t,"-arrow"),a),style:v},c)}function Fz(e){var t=e.prefixCls,n=e.open,r=e.zIndex,i=e.mask,o=e.motion;return i?h.createElement(qi,Re({},o,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(a){var c=a.className;return h.createElement("div",{style:{zIndex:r},className:ne("".concat(t,"-mask"),c)})}):null}var Wz=h.memo(function(e){var t=e.children;return t},function(e,t){return t.cache}),Vz=h.forwardRef(function(e,t){var n=e.popup,r=e.className,i=e.prefixCls,o=e.style,a=e.target,c=e.onVisibleChanged,u=e.open,d=e.keepDom,f=e.fresh,m=e.onClick,g=e.mask,v=e.arrow,y=e.arrowPos,S=e.align,_=e.motion,C=e.maskMotion,E=e.forceRender,k=e.getPopupContainer,$=e.autoDestroy,P=e.portal,T=e.zIndex,O=e.onMouseEnter,N=e.onMouseLeave,I=e.onPointerEnter,z=e.onPointerDownCapture,L=e.ready,M=e.offsetX,j=e.offsetY,B=e.offsetR,H=e.offsetB,W=e.onAlign,V=e.onPrepare,A=e.stretch,G=e.targetWidth,q=e.targetHeight,D=typeof n=="function"?n():n,U=u||d,Y=(k==null?void 0:k.length)>0,Z=h.useState(!k||!Y),ee=se(Z,2),re=ee[0],he=ee[1];if(fn(function(){!re&&Y&&a&&he(!0)},[re,Y,a]),!re)return null;var fe="auto",ue={left:"-1000vw",top:"-1000vh",right:fe,bottom:fe};if(L||!u){var Se,ae=S.points,le=S.dynamicInset||((Se=S._experimental)===null||Se===void 0?void 0:Se.dynamicInset),ce=le&&ae[0][1]==="r",ye=le&&ae[0][0]==="b";ce?(ue.right=B,ue.left=fe):(ue.left=M,ue.right=fe),ye?(ue.bottom=H,ue.top=fe):(ue.top=j,ue.bottom=fe)}var me={};return A&&(A.includes("height")&&q?me.height=q:A.includes("minHeight")&&q&&(me.minHeight=q),A.includes("width")&&G?me.width=G:A.includes("minWidth")&&G&&(me.minWidth=G)),u||(me.pointerEvents="none"),h.createElement(P,{open:E||U,getContainer:k&&function(){return k(a)},autoDestroy:$},h.createElement(Fz,{prefixCls:i,open:u,zIndex:T,mask:g,motion:C}),h.createElement(co,{onResize:W,disabled:!u},function(de){return h.createElement(qi,Re({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:E,leavedClassName:"".concat(i,"-hidden")},_,{onAppearPrepare:V,onEnterPrepare:V,visible:u,onVisibleChanged:function(we){var Te;_==null||(Te=_.onVisibleChanged)===null||Te===void 0||Te.call(_,we),c(we)}}),function(be,we){var Te=be.className,ze=be.style,Ee=ne(i,Te,r);return h.createElement("div",{ref:mo(de,t,we),className:Ee,style:X(X(X(X({"--arrow-x":"".concat(y.x||0,"px"),"--arrow-y":"".concat(y.y||0,"px")},ue),me),ze),{},{boxSizing:"border-box",zIndex:T},o),onMouseEnter:O,onMouseLeave:N,onPointerEnter:I,onClick:m,onPointerDownCapture:z},v&&h.createElement(Hz,{prefixCls:i,arrow:v,arrowPos:y,align:S}),h.createElement(Wz,{cache:!u&&!f},D))})}))}),Uz=h.forwardRef(function(e,t){var n=e.children,r=e.getTriggerDOMNode,i=ra(n),o=h.useCallback(function(c){dy(t,r?r(c):c)},[r]),a=Jo(o,Aa(n));return i?h.cloneElement(n,{ref:a}):n}),LC=h.createContext(null);function AC(e){return e?Array.isArray(e)?e:[e]:[]}function qz(e,t,n,r){return h.useMemo(function(){var i=AC(n??t),o=AC(r??t),a=new Set(i),c=new Set(o);return e&&(a.has("hover")&&(a.delete("hover"),a.add("click")),c.has("hover")&&(c.delete("hover"),c.add("click"))),[a,c]},[e,t,n,r])}function Kz(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function Gz(e,t,n,r){for(var i=n.points,o=Object.keys(e),a=0;a<o.length;a+=1){var c,u=o[a];if(Kz((c=e[u])===null||c===void 0?void 0:c.points,i,r))return"".concat(t,"-placement-").concat(u)}return""}function DC(e,t,n,r){return t||(n?{motionName:"".concat(e,"-").concat(n)}:r?{motionName:r}:null)}function Yu(e){return e.ownerDocument.defaultView}function i0(e){for(var t=[],n=e==null?void 0:e.parentElement,r=["hidden","scroll","clip","auto"];n;){var i=Yu(n).getComputedStyle(n),o=i.overflowX,a=i.overflowY,c=i.overflow;[o,a,c].some(function(u){return r.includes(u)})&&t.push(n),n=n.parentElement}return t}function $u(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(e)?t:e}function Dc(e){return $u(parseFloat(e),0)}function HC(e,t){var n=X({},e);return(t||[]).forEach(function(r){if(!(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)){var i=Yu(r).getComputedStyle(r),o=i.overflow,a=i.overflowClipMargin,c=i.borderTopWidth,u=i.borderBottomWidth,d=i.borderLeftWidth,f=i.borderRightWidth,m=r.getBoundingClientRect(),g=r.offsetHeight,v=r.clientHeight,y=r.offsetWidth,S=r.clientWidth,_=Dc(c),C=Dc(u),E=Dc(d),k=Dc(f),$=$u(Math.round(m.width/y*1e3)/1e3),P=$u(Math.round(m.height/g*1e3)/1e3),T=(y-S-E-k)*$,O=(g-v-_-C)*P,N=_*P,I=C*P,z=E*$,L=k*$,M=0,j=0;if(o==="clip"){var B=Dc(a);M=B*$,j=B*P}var H=m.x+z-M,W=m.y+N-j,V=H+m.width+2*M-z-L-T,A=W+m.height+2*j-N-I-O;n.left=Math.max(n.left,H),n.top=Math.max(n.top,W),n.right=Math.min(n.right,V),n.bottom=Math.min(n.bottom,A)}}),n}function FC(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n="".concat(t),r=n.match(/^(.*)\%$/);return r?e*(parseFloat(r[1])/100):parseFloat(n)}function WC(e,t){var n=t||[],r=se(n,2),i=r[0],o=r[1];return[FC(e.width,i),FC(e.height,o)]}function VC(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[e[0],e[1]]}function Cl(e,t){var n=t[0],r=t[1],i,o;return n==="t"?o=e.y:n==="b"?o=e.y+e.height:o=e.y+e.height/2,r==="l"?i=e.x:r==="r"?i=e.x+e.width:i=e.x+e.width/2,{x:i,y:o}}function Ls(e,t){var n={t:"b",b:"t",l:"r",r:"l"};return e.map(function(r,i){return i===t?n[r]||"c":r}).join("")}function Xz(e,t,n,r,i,o,a){var c=h.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[r]||{}}),u=se(c,2),d=u[0],f=u[1],m=h.useRef(0),g=h.useMemo(function(){return t?i0(t):[]},[t]),v=h.useRef({}),y=function(){v.current={}};e||y();var S=er(function(){if(t&&n&&e){let Gn=function(li,_i){var Gi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Qe,Ii=U.x+li,Ka=U.y+_i,Ga=Ii+ye,dt=Ka+ce,Dt=Math.max(Ii,Gi.left),jn=Math.max(Ka,Gi.top),An=Math.min(Ga,Gi.right),Bn=Math.min(dt,Gi.bottom);return Math.max(0,(An-Dt)*(Bn-jn))},Qr=function(){kn=U.y+Et,Nn=kn+ce,Hn=U.x+ot,cn=Hn+ye};var qa=Gn,es=Qr,E,k,$,P,T=t,O=T.ownerDocument,N=Yu(T),I=N.getComputedStyle(T),z=I.position,L=T.style.left,M=T.style.top,j=T.style.right,B=T.style.bottom,H=T.style.overflow,W=X(X({},i[r]),o),V=O.createElement("div");(E=T.parentElement)===null||E===void 0||E.appendChild(V),V.style.left="".concat(T.offsetLeft,"px"),V.style.top="".concat(T.offsetTop,"px"),V.style.position=z,V.style.height="".concat(T.offsetHeight,"px"),V.style.width="".concat(T.offsetWidth,"px"),T.style.left="0",T.style.top="0",T.style.right="auto",T.style.bottom="auto",T.style.overflow="hidden";var A;if(Array.isArray(n))A={x:n[0],y:n[1],width:0,height:0};else{var G,q,D=n.getBoundingClientRect();D.x=(G=D.x)!==null&&G!==void 0?G:D.left,D.y=(q=D.y)!==null&&q!==void 0?q:D.top,A={x:D.x,y:D.y,width:D.width,height:D.height}}var U=T.getBoundingClientRect(),Y=N.getComputedStyle(T),Z=Y.height,ee=Y.width;U.x=(k=U.x)!==null&&k!==void 0?k:U.left,U.y=($=U.y)!==null&&$!==void 0?$:U.top;var re=O.documentElement,he=re.clientWidth,fe=re.clientHeight,ue=re.scrollWidth,Se=re.scrollHeight,ae=re.scrollTop,le=re.scrollLeft,ce=U.height,ye=U.width,me=A.height,de=A.width,be={left:0,top:0,right:he,bottom:fe},we={left:-le,top:-ae,right:ue-le,bottom:Se-ae},Te=W.htmlRegion,ze="visible",Ee="visibleFirst";Te!=="scroll"&&Te!==Ee&&(Te=ze);var ke=Te===Ee,je=HC(we,g),Oe=HC(be,g),Qe=Te===ze?Oe:je,at=ke?Oe:Qe;T.style.left="auto",T.style.top="auto",T.style.right="0",T.style.bottom="0";var $t=T.getBoundingClientRect();T.style.left=L,T.style.top=M,T.style.right=j,T.style.bottom=B,T.style.overflow=H,(P=T.parentElement)===null||P===void 0||P.removeChild(V);var pt=$u(Math.round(ye/parseFloat(ee)*1e3)/1e3),Je=$u(Math.round(ce/parseFloat(Z)*1e3)/1e3);if(pt===0||Je===0||pu(n)&&!Ty(n))return;var ft=W.offset,Xe=W.targetOffset,yt=WC(U,ft),tt=se(yt,2),Le=tt[0],rt=tt[1],Me=WC(A,Xe),qe=se(Me,2),It=qe[0],St=qe[1];A.x-=It,A.y-=St;var nn=W.points||[],Jt=se(nn,2),_n=Jt[0],In=Jt[1],on=VC(In),Ht=VC(_n),Rt=Cl(A,on),sn=Cl(U,Ht),Xt=X({},W),ot=Rt.x-sn.x+Le,Et=Rt.y-sn.y+rt,mt=Gn(ot,Et),Ie=Gn(ot,Et,Oe),$e=Cl(A,["t","l"]),xe=Cl(U,["t","l"]),Ae=Cl(A,["b","r"]),et=Cl(U,["b","r"]),nt=W.overflow||{},Ft=nt.adjustX,Kt=nt.adjustY,Bt=nt.shiftX,At=nt.shiftY,Pn=function(_i){return typeof _i=="boolean"?_i:_i>=0},kn,Nn,Hn,cn;Qr();var mn=Pn(Kt),He=Ht[0]===on[0];if(mn&&Ht[0]==="t"&&(Nn>at.bottom||v.current.bt)){var Ye=Et;He?Ye-=ce-me:Ye=$e.y-et.y-rt;var Pt=Gn(ot,Ye),gt=Gn(ot,Ye,Oe);Pt>mt||Pt===mt&&(!ke||gt>=Ie)?(v.current.bt=!0,Et=Ye,rt=-rt,Xt.points=[Ls(Ht,0),Ls(on,0)]):v.current.bt=!1}if(mn&&Ht[0]==="b"&&(kn<at.top||v.current.tb)){var lt=Et;He?lt+=ce-me:lt=Ae.y-xe.y-rt;var Ze=Gn(ot,lt),Tt=Gn(ot,lt,Oe);Ze>mt||Ze===mt&&(!ke||Tt>=Ie)?(v.current.tb=!0,Et=lt,rt=-rt,Xt.points=[Ls(Ht,0),Ls(on,0)]):v.current.tb=!1}var Gt=Pn(Ft),Ke=Ht[1]===on[1];if(Gt&&Ht[1]==="l"&&(cn>at.right||v.current.rl)){var vt=ot;Ke?vt-=ye-de:vt=$e.x-et.x-Le;var Nt=Gn(vt,Et),gn=Gn(vt,Et,Oe);Nt>mt||Nt===mt&&(!ke||gn>=Ie)?(v.current.rl=!0,ot=vt,Le=-Le,Xt.points=[Ls(Ht,1),Ls(on,1)]):v.current.rl=!1}if(Gt&&Ht[1]==="r"&&(Hn<at.left||v.current.lr)){var sr=ot;Ke?sr+=ye-de:sr=Ae.x-xe.x-Le;var Ln=Gn(sr,Et),Xr=Gn(sr,Et,Oe);Ln>mt||Ln===mt&&(!ke||Xr>=Ie)?(v.current.lr=!0,ot=sr,Le=-Le,Xt.points=[Ls(Ht,1),Ls(on,1)]):v.current.lr=!1}Qr();var _r=Bt===!0?0:Bt;typeof _r=="number"&&(Hn<Oe.left&&(ot-=Hn-Oe.left-Le,A.x+de<Oe.left+_r&&(ot+=A.x-Oe.left+de-_r)),cn>Oe.right&&(ot-=cn-Oe.right-Le,A.x>Oe.right-_r&&(ot+=A.x-Oe.right+_r)));var Yr=At===!0?0:At;typeof Yr=="number"&&(kn<Oe.top&&(Et-=kn-Oe.top-rt,A.y+me<Oe.top+Yr&&(Et+=A.y-Oe.top+me-Yr)),Nn>Oe.bottom&&(Et-=Nn-Oe.bottom-rt,A.y>Oe.bottom-Yr&&(Et+=A.y-Oe.bottom+Yr)));var Sr=U.x+ot,Hr=Sr+ye,Jr=U.y+Et,dn=Jr+ce,ut=A.x,st=ut+de,an=A.y,hn=an+me,Sn=Math.max(Sr,ut),xn=Math.min(Hr,st),Fr=(Sn+xn)/2,ar=Fr-Sr,Ut=Math.max(Jr,an),Cr=Math.min(dn,hn),Tr=(Ut+Cr)/2,bi=Tr-Jr;a==null||a(t,Xt);var Pr=$t.right-U.x-(ot+U.width),Ss=$t.bottom-U.y-(Et+U.height);pt===1&&(ot=Math.floor(ot),Pr=Math.floor(Pr)),Je===1&&(Et=Math.floor(Et),Ss=Math.floor(Ss));var Ua={ready:!0,offsetX:ot/pt,offsetY:Et/Je,offsetR:Pr/pt,offsetB:Ss/Je,arrowX:ar/pt,arrowY:bi/Je,scaleX:pt,scaleY:Je,align:Xt};f(Ua)}}),_=function(){m.current+=1;var k=m.current;Promise.resolve().then(function(){m.current===k&&S()})},C=function(){f(function(k){return X(X({},k),{},{ready:!1})})};return fn(C,[r]),fn(function(){e||C()},[e]),[d.ready,d.offsetX,d.offsetY,d.offsetR,d.offsetB,d.arrowX,d.arrowY,d.scaleX,d.scaleY,d.align,_]}function Yz(e,t,n,r,i){fn(function(){if(e&&t&&n){let g=function(){r(),i()};var m=g,o=t,a=n,c=i0(o),u=i0(a),d=Yu(a),f=new Set([d].concat(We(c),We(u)));return f.forEach(function(v){v.addEventListener("scroll",g,{passive:!0})}),d.addEventListener("resize",g,{passive:!0}),r(),function(){f.forEach(function(v){v.removeEventListener("scroll",g),d.removeEventListener("resize",g)})}}},[e,t,n])}function Jz(e,t,n,r,i,o,a,c){var u=h.useRef(e);u.current=e;var d=h.useRef(!1);h.useEffect(function(){if(t&&r&&(!i||o)){var m=function(){d.current=!1},g=function(_){var C;u.current&&!a(((C=_.composedPath)===null||C===void 0||(C=C.call(_))===null||C===void 0?void 0:C[0])||_.target)&&!d.current&&c(!1)},v=Yu(r);v.addEventListener("pointerdown",m,!0),v.addEventListener("mousedown",g,!0),v.addEventListener("contextmenu",g,!0);var y=rf(n);return y&&(y.addEventListener("mousedown",g,!0),y.addEventListener("contextmenu",g,!0)),function(){v.removeEventListener("pointerdown",m,!0),v.removeEventListener("mousedown",g,!0),v.removeEventListener("contextmenu",g,!0),y&&(y.removeEventListener("mousedown",g,!0),y.removeEventListener("contextmenu",g,!0))}}},[t,n,r,i,o]);function f(){d.current=!0}return f}var Qz=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function Zz(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Zf,t=h.forwardRef(function(n,r){var i=n.prefixCls,o=i===void 0?"rc-trigger-popup":i,a=n.children,c=n.action,u=c===void 0?"hover":c,d=n.showAction,f=n.hideAction,m=n.popupVisible,g=n.defaultPopupVisible,v=n.onPopupVisibleChange,y=n.afterPopupVisibleChange,S=n.mouseEnterDelay,_=n.mouseLeaveDelay,C=_===void 0?.1:_,E=n.focusDelay,k=n.blurDelay,$=n.mask,P=n.maskClosable,T=P===void 0?!0:P,O=n.getPopupContainer,N=n.forceRender,I=n.autoDestroy,z=n.destroyPopupOnHide,L=n.popup,M=n.popupClassName,j=n.popupStyle,B=n.popupPlacement,H=n.builtinPlacements,W=H===void 0?{}:H,V=n.popupAlign,A=n.zIndex,G=n.stretch,q=n.getPopupClassNameFromAlign,D=n.fresh,U=n.alignPoint,Y=n.onPopupClick,Z=n.onPopupAlign,ee=n.arrow,re=n.popupMotion,he=n.maskMotion,fe=n.popupTransitionName,ue=n.popupAnimation,Se=n.maskTransitionName,ae=n.maskAnimation,le=n.className,ce=n.getTriggerDOMNode,ye=Lt(n,Qz),me=I||z||!1,de=h.useState(!1),be=se(de,2),we=be[0],Te=be[1];fn(function(){Te(Ly())},[]);var ze=h.useRef({}),Ee=h.useContext(LC),ke=h.useMemo(function(){return{registerSubPopup:function(Dt,jn){ze.current[Dt]=jn,Ee==null||Ee.registerSubPopup(Dt,jn)}}},[Ee]),je=em(),Oe=h.useState(null),Qe=se(Oe,2),at=Qe[0],$t=Qe[1],pt=h.useRef(null),Je=er(function(dt){pt.current=dt,pu(dt)&&at!==dt&&$t(dt),Ee==null||Ee.registerSubPopup(je,dt)}),ft=h.useState(null),Xe=se(ft,2),yt=Xe[0],tt=Xe[1],Le=h.useRef(null),rt=er(function(dt){pu(dt)&&yt!==dt&&(tt(dt),Le.current=dt)}),Me=h.Children.only(a),qe=(Me==null?void 0:Me.props)||{},It={},St=er(function(dt){var Dt,jn,An=yt;return(An==null?void 0:An.contains(dt))||((Dt=rf(An))===null||Dt===void 0?void 0:Dt.host)===dt||dt===An||(at==null?void 0:at.contains(dt))||((jn=rf(at))===null||jn===void 0?void 0:jn.host)===dt||dt===at||Object.values(ze.current).some(function(Bn){return(Bn==null?void 0:Bn.contains(dt))||dt===Bn})}),nn=DC(o,re,ue,fe),Jt=DC(o,he,ae,Se),_n=h.useState(g||!1),In=se(_n,2),on=In[0],Ht=In[1],Rt=m??on,sn=er(function(dt){m===void 0&&Ht(dt)});fn(function(){Ht(m||!1)},[m]);var Xt=h.useRef(Rt);Xt.current=Rt;var ot=h.useRef([]);ot.current=[];var Et=er(function(dt){var Dt;sn(dt),((Dt=ot.current[ot.current.length-1])!==null&&Dt!==void 0?Dt:Rt)!==dt&&(ot.current.push(dt),v==null||v(dt))}),mt=h.useRef(),Ie=function(){clearTimeout(mt.current)},$e=function(Dt){var jn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Ie(),jn===0?Et(Dt):mt.current=setTimeout(function(){Et(Dt)},jn*1e3)};h.useEffect(function(){return Ie},[]);var xe=h.useState(!1),Ae=se(xe,2),et=Ae[0],nt=Ae[1];fn(function(dt){(!dt||Rt)&&nt(!0)},[Rt]);var Ft=h.useState(null),Kt=se(Ft,2),Bt=Kt[0],At=Kt[1],Pn=h.useState(null),kn=se(Pn,2),Nn=kn[0],Hn=kn[1],cn=function(Dt){Hn([Dt.clientX,Dt.clientY])},mn=Xz(Rt,at,U&&Nn!==null?Nn:yt,B,W,V,Z),He=se(mn,11),Ye=He[0],Pt=He[1],gt=He[2],lt=He[3],Ze=He[4],Tt=He[5],Gt=He[6],Ke=He[7],vt=He[8],Nt=He[9],gn=He[10],sr=qz(we,u,d,f),Ln=se(sr,2),Xr=Ln[0],_r=Ln[1],Yr=Xr.has("click"),Sr=_r.has("click")||_r.has("contextMenu"),Hr=er(function(){et||gn()}),Jr=function(){Xt.current&&U&&Sr&&$e(!1)};Yz(Rt,yt,at,Hr,Jr),fn(function(){Hr()},[Nn,B]),fn(function(){Rt&&!(W!=null&&W[B])&&Hr()},[JSON.stringify(V)]);var dn=h.useMemo(function(){var dt=Gz(W,o,Nt,U);return ne(dt,q==null?void 0:q(Nt))},[Nt,q,W,o,U]);h.useImperativeHandle(r,function(){return{nativeElement:Le.current,popupElement:pt.current,forceAlign:Hr}});var ut=h.useState(0),st=se(ut,2),an=st[0],hn=st[1],Sn=h.useState(0),xn=se(Sn,2),Fr=xn[0],ar=xn[1],Ut=function(){if(G&&yt){var Dt=yt.getBoundingClientRect();hn(Dt.width),ar(Dt.height)}},Cr=function(){Ut(),Hr()},Tr=function(Dt){nt(!1),gn(),y==null||y(Dt)},bi=function(){return new Promise(function(Dt){Ut(),At(function(){return Dt})})};fn(function(){Bt&&(gn(),Bt(),At(null))},[Bt]);function Pr(dt,Dt,jn,An){It[dt]=function(Bn){var Xa;An==null||An(Bn),$e(Dt,jn);for(var ts=arguments.length,Cs=new Array(ts>1?ts-1:0),po=1;po<ts;po++)Cs[po-1]=arguments[po];(Xa=qe[dt])===null||Xa===void 0||Xa.call.apply(Xa,[qe,Bn].concat(Cs))}}(Yr||Sr)&&(It.onClick=function(dt){var Dt;Xt.current&&Sr?$e(!1):!Xt.current&&Yr&&(cn(dt),$e(!0));for(var jn=arguments.length,An=new Array(jn>1?jn-1:0),Bn=1;Bn<jn;Bn++)An[Bn-1]=arguments[Bn];(Dt=qe.onClick)===null||Dt===void 0||Dt.call.apply(Dt,[qe,dt].concat(An))});var Ss=Jz(Rt,Sr,yt,at,$,T,St,$e),Ua=Xr.has("hover"),qa=_r.has("hover"),es,Gn;Ua&&(Pr("onMouseEnter",!0,S,function(dt){cn(dt)}),Pr("onPointerEnter",!0,S,function(dt){cn(dt)}),es=function(Dt){(Rt||et)&&at!==null&&at!==void 0&&at.contains(Dt.target)&&$e(!0,S)},U&&(It.onMouseMove=function(dt){var Dt;(Dt=qe.onMouseMove)===null||Dt===void 0||Dt.call(qe,dt)})),qa&&(Pr("onMouseLeave",!1,C),Pr("onPointerLeave",!1,C),Gn=function(){$e(!1,C)}),Xr.has("focus")&&Pr("onFocus",!0,E),_r.has("focus")&&Pr("onBlur",!1,k),Xr.has("contextMenu")&&(It.onContextMenu=function(dt){var Dt;Xt.current&&_r.has("contextMenu")?$e(!1):(cn(dt),$e(!0)),dt.preventDefault();for(var jn=arguments.length,An=new Array(jn>1?jn-1:0),Bn=1;Bn<jn;Bn++)An[Bn-1]=arguments[Bn];(Dt=qe.onContextMenu)===null||Dt===void 0||Dt.call.apply(Dt,[qe,dt].concat(An))}),le&&(It.className=ne(qe.className,le));var Qr=h.useRef(!1);Qr.current||(Qr.current=N||Rt||et);var li=X(X({},qe),It),_i={},Gi=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Gi.forEach(function(dt){ye[dt]&&(_i[dt]=function(){for(var Dt,jn=arguments.length,An=new Array(jn),Bn=0;Bn<jn;Bn++)An[Bn]=arguments[Bn];(Dt=li[dt])===null||Dt===void 0||Dt.call.apply(Dt,[li].concat(An)),ye[dt].apply(ye,An)})});var Ii=h.cloneElement(Me,X(X({},li),_i)),Ka={x:Tt,y:Gt},Ga=ee?X({},ee!==!0?ee:{}):null;return h.createElement(h.Fragment,null,h.createElement(co,{disabled:!Rt,ref:rt,onResize:Cr},h.createElement(Uz,{getTriggerDOMNode:ce},Ii)),Qr.current&&h.createElement(LC.Provider,{value:ke},h.createElement(Vz,{portal:e,ref:Je,prefixCls:o,popup:L,className:ne(M,dn),style:j,target:yt,onMouseEnter:es,onMouseLeave:Gn,onPointerEnter:es,zIndex:A,open:Rt,keepDom:et,fresh:D,onClick:Y,onPointerDownCapture:Ss,mask:$,motion:nn,maskMotion:Jt,onVisibleChanged:Tr,onPrepare:bi,forceRender:N,autoDestroy:me,getPopupContainer:O,align:Nt,arrow:Ga,arrowPos:Ka,ready:Ye,offsetX:Pt,offsetY:gt,offsetR:lt,offsetB:Ze,onAlign:Hr,stretch:G,targetWidth:an/Ke,targetHeight:Fr/vt})))});return t}const im=Zz(Zf);var ej=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],tj=function(t){var n=t===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"}}},nj=function(t,n){var r=t.prefixCls;t.disabled;var i=t.visible,o=t.children,a=t.popupElement,c=t.animation,u=t.transitionName,d=t.dropdownStyle,f=t.dropdownClassName,m=t.direction,g=m===void 0?"ltr":m,v=t.placement,y=t.builtinPlacements,S=t.dropdownMatchSelectWidth,_=t.dropdownRender,C=t.dropdownAlign,E=t.getPopupContainer,k=t.empty,$=t.getTriggerDOMNode,P=t.onPopupVisibleChange,T=t.onPopupMouseEnter,O=Lt(t,ej),N="".concat(r,"-dropdown"),I=a;_&&(I=_(a));var z=h.useMemo(function(){return y||tj(S)},[y,S]),L=c?"".concat(N,"-").concat(c):u,M=typeof S=="number",j=h.useMemo(function(){return M?null:S===!1?"minWidth":"width"},[S,M]),B=d;M&&(B=X(X({},B),{},{width:S}));var H=h.useRef(null);return h.useImperativeHandle(n,function(){return{getPopupElement:function(){var V;return(V=H.current)===null||V===void 0?void 0:V.popupElement}}}),h.createElement(im,Re({},O,{showAction:P?["click"]:[],hideAction:P?["click"]:[],popupPlacement:v||(g==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:z,prefixCls:N,popupTransitionName:L,popup:h.createElement("div",{onMouseEnter:T},I),ref:H,stretch:j,popupAlign:C,popupVisible:i,getPopupContainer:E,popupClassName:ne(f,K({},"".concat(N,"-empty"),k)),popupStyle:B,getTriggerDOMNode:$,onPopupVisibleChange:P}),o)},rj=h.forwardRef(nj);function UC(e,t){var n=e.key,r;return"value"in e&&(r=e.value),n??(r!==void 0?r:"rc-index-key-".concat(t))}function o0(e){return typeof e<"u"&&!Number.isNaN(e)}function Gk(e,t){var n=e||{},r=n.label,i=n.value,o=n.options,a=n.groupLabel,c=r||(t?"children":"label");return{label:c,value:i||"value",options:o||"options",groupLabel:a||c}}function ij(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.fieldNames,r=t.childrenAsData,i=[],o=Gk(n,!1),a=o.label,c=o.value,u=o.options,d=o.groupLabel;function f(m,g){Array.isArray(m)&&m.forEach(function(v){if(g||!(u in v)){var y=v[c];i.push({key:UC(v,i.length),groupOption:g,data:v,label:v[a],value:y})}else{var S=v[d];S===void 0&&r&&(S=v.label),i.push({key:UC(v,i.length),group:!0,data:v,label:S}),f(v[u],!0)}})}return f(e,!1),i}function s0(e){var t=X({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return Ar(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var oj=function(t,n,r){if(!n||!n.length)return null;var i=!1,o=function c(u,d){var f=Z2(d),m=f[0],g=f.slice(1);if(!m)return[u];var v=u.split(m);return i=i||v.length>1,v.reduce(function(y,S){return[].concat(We(y),We(c(S,g)))},[]).filter(Boolean)},a=o(t,n);return i?typeof r<"u"?a.slice(0,r):a:null},Ay=h.createContext(null);function sj(e){var t=e.visible,n=e.values;if(!t)return null;var r=50;return h.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(n.slice(0,r).map(function(i){var o=i.label,a=i.value;return["number","string"].includes(_t(o))?o:a}).join(", ")),n.length>r?", ...":null)}var aj=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],lj=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],a0=function(t){return t==="tags"||t==="multiple"},cj=h.forwardRef(function(e,t){var n,r=e.id,i=e.prefixCls,o=e.className,a=e.showSearch,c=e.tagRender,u=e.direction,d=e.omitDomProps,f=e.displayValues,m=e.onDisplayValuesChange,g=e.emptyOptions,v=e.notFoundContent,y=v===void 0?"Not Found":v,S=e.onClear,_=e.mode,C=e.disabled,E=e.loading,k=e.getInputElement,$=e.getRawInputElement,P=e.open,T=e.defaultOpen,O=e.onDropdownVisibleChange,N=e.activeValue,I=e.onActiveValueChange,z=e.activeDescendantId,L=e.searchValue,M=e.autoClearSearchValue,j=e.onSearch,B=e.onSearchSplit,H=e.tokenSeparators,W=e.allowClear,V=e.prefix,A=e.suffixIcon,G=e.clearIcon,q=e.OptionList,D=e.animation,U=e.transitionName,Y=e.dropdownStyle,Z=e.dropdownClassName,ee=e.dropdownMatchSelectWidth,re=e.dropdownRender,he=e.dropdownAlign,fe=e.placement,ue=e.builtinPlacements,Se=e.getPopupContainer,ae=e.showAction,le=ae===void 0?[]:ae,ce=e.onFocus,ye=e.onBlur,me=e.onKeyUp,de=e.onKeyDown,be=e.onMouseDown,we=Lt(e,aj),Te=a0(_),ze=(a!==void 0?a:Te)||_==="combobox",Ee=X({},we);lj.forEach(function(ut){delete Ee[ut]}),d==null||d.forEach(function(ut){delete Ee[ut]});var ke=h.useState(!1),je=se(ke,2),Oe=je[0],Qe=je[1];h.useEffect(function(){Qe(Ly())},[]);var at=h.useRef(null),$t=h.useRef(null),pt=h.useRef(null),Je=h.useRef(null),ft=h.useRef(null),Xe=h.useRef(!1),yt=mz(),tt=se(yt,3),Le=tt[0],rt=tt[1],Me=tt[2];h.useImperativeHandle(t,function(){var ut,st;return{focus:(ut=Je.current)===null||ut===void 0?void 0:ut.focus,blur:(st=Je.current)===null||st===void 0?void 0:st.blur,scrollTo:function(hn){var Sn;return(Sn=ft.current)===null||Sn===void 0?void 0:Sn.scrollTo(hn)},nativeElement:at.current||$t.current}});var qe=h.useMemo(function(){var ut;if(_!=="combobox")return L;var st=(ut=f[0])===null||ut===void 0?void 0:ut.value;return typeof st=="string"||typeof st=="number"?String(st):""},[L,_,f]),It=_==="combobox"&&typeof k=="function"&&k()||null,St=typeof $=="function"&&$(),nn=Jo($t,St==null||(n=St.props)===null||n===void 0?void 0:n.ref),Jt=h.useState(!1),_n=se(Jt,2),In=_n[0],on=_n[1];fn(function(){on(!0)},[]);var Ht=tr(!1,{defaultValue:T,value:P}),Rt=se(Ht,2),sn=Rt[0],Xt=Rt[1],ot=In?sn:!1,Et=!y&&g;(C||Et&&ot&&_==="combobox")&&(ot=!1);var mt=Et?!1:ot,Ie=h.useCallback(function(ut){var st=ut!==void 0?ut:!ot;C||(Xt(st),ot!==st&&(O==null||O(st)))},[C,ot,Xt,O]),$e=h.useMemo(function(){return(H||[]).some(function(ut){return[`
222
+ `,`\r
223
+ `].includes(ut)})},[H]),xe=h.useContext(Ay)||{},Ae=xe.maxCount,et=xe.rawValues,nt=function(st,an,hn){if(!(Te&&o0(Ae)&&(et==null?void 0:et.size)>=Ae)){var Sn=!0,xn=st;I==null||I(null);var Fr=oj(st,H,o0(Ae)?Ae-et.size:void 0),ar=hn?null:Fr;return _!=="combobox"&&ar&&(xn="",B==null||B(ar),Ie(!1),Sn=!1),j&&qe!==xn&&j(xn,{source:an?"typing":"effect"}),Sn}},Ft=function(st){!st||!st.trim()||j(st,{source:"submit"})};h.useEffect(function(){!ot&&!Te&&_!=="combobox"&&nt("",!1,!1)},[ot]),h.useEffect(function(){sn&&C&&Xt(!1),C&&!Xe.current&&rt(!1)},[C]);var Kt=Hk(),Bt=se(Kt,2),At=Bt[0],Pn=Bt[1],kn=h.useRef(!1),Nn=function(st){var an=At(),hn=st.key,Sn=hn==="Enter";if(Sn&&(_!=="combobox"&&st.preventDefault(),ot||Ie(!0)),Pn(!!qe),hn==="Backspace"&&!an&&Te&&!qe&&f.length){for(var xn=We(f),Fr=null,ar=xn.length-1;ar>=0;ar-=1){var Ut=xn[ar];if(!Ut.disabled){xn.splice(ar,1),Fr=Ut;break}}Fr&&m(xn,{type:"remove",values:[Fr]})}for(var Cr=arguments.length,Tr=new Array(Cr>1?Cr-1:0),bi=1;bi<Cr;bi++)Tr[bi-1]=arguments[bi];if(ot&&(!Sn||!kn.current)){var Pr;Sn&&(kn.current=!0),(Pr=ft.current)===null||Pr===void 0||Pr.onKeyDown.apply(Pr,[st].concat(Tr))}de==null||de.apply(void 0,[st].concat(Tr))},Hn=function(st){for(var an=arguments.length,hn=new Array(an>1?an-1:0),Sn=1;Sn<an;Sn++)hn[Sn-1]=arguments[Sn];if(ot){var xn;(xn=ft.current)===null||xn===void 0||xn.onKeyUp.apply(xn,[st].concat(hn))}st.key==="Enter"&&(kn.current=!1),me==null||me.apply(void 0,[st].concat(hn))},cn=function(st){var an=f.filter(function(hn){return hn!==st});m(an,{type:"remove",values:[st]})},mn=function(){kn.current=!1},He=h.useRef(!1),Ye=function(){rt(!0),C||(ce&&!He.current&&ce.apply(void 0,arguments),le.includes("focus")&&Ie(!0)),He.current=!0},Pt=function(){Xe.current=!0,rt(!1,function(){He.current=!1,Xe.current=!1,Ie(!1)}),!C&&(qe&&(_==="tags"?j(qe,{source:"submit"}):_==="multiple"&&j("",{source:"blur"})),ye&&ye.apply(void 0,arguments))},gt=[];h.useEffect(function(){return function(){gt.forEach(function(ut){return clearTimeout(ut)}),gt.splice(0,gt.length)}},[]);var lt=function(st){var an,hn=st.target,Sn=(an=pt.current)===null||an===void 0?void 0:an.getPopupElement();if(Sn&&Sn.contains(hn)){var xn=setTimeout(function(){var Cr=gt.indexOf(xn);if(Cr!==-1&&gt.splice(Cr,1),Me(),!Oe&&!Sn.contains(document.activeElement)){var Tr;(Tr=Je.current)===null||Tr===void 0||Tr.focus()}});gt.push(xn)}for(var Fr=arguments.length,ar=new Array(Fr>1?Fr-1:0),Ut=1;Ut<Fr;Ut++)ar[Ut-1]=arguments[Ut];be==null||be.apply(void 0,[st].concat(ar))},Ze=h.useState({}),Tt=se(Ze,2),Gt=Tt[1];function Ke(){Gt({})}var vt;St&&(vt=function(st){Ie(st)}),pz(function(){var ut;return[at.current,(ut=pt.current)===null||ut===void 0?void 0:ut.getPopupElement()]},mt,Ie,!!St);var Nt=h.useMemo(function(){return X(X({},e),{},{notFoundContent:y,open:ot,triggerOpen:mt,id:r,showSearch:ze,multiple:Te,toggleOpen:Ie})},[e,y,mt,ot,r,ze,Te,Ie]),gn=!!A||E,sr;gn&&(sr=h.createElement(rm,{className:ne("".concat(i,"-arrow"),K({},"".concat(i,"-arrow-loading"),E)),customizeIcon:A,customizeIconProps:{loading:E,searchValue:qe,open:ot,focused:Le,showSearch:ze}}));var Ln=function(){var st;S==null||S(),(st=Je.current)===null||st===void 0||st.focus(),m([],{type:"clear",values:f}),nt("",!1,!1)},Xr=hz(i,Ln,f,W,G,C,qe,_),_r=Xr.allowClear,Yr=Xr.clearIcon,Sr=h.createElement(q,{ref:ft}),Hr=ne(i,o,K(K(K(K(K(K(K(K(K(K({},"".concat(i,"-focused"),Le),"".concat(i,"-multiple"),Te),"".concat(i,"-single"),!Te),"".concat(i,"-allow-clear"),W),"".concat(i,"-show-arrow"),gn),"".concat(i,"-disabled"),C),"".concat(i,"-loading"),E),"".concat(i,"-open"),ot),"".concat(i,"-customize-input"),It),"".concat(i,"-show-search"),ze)),Jr=h.createElement(rj,{ref:pt,disabled:C,prefixCls:i,visible:mt,popupElement:Sr,animation:D,transitionName:U,dropdownStyle:Y,dropdownClassName:Z,direction:u,dropdownMatchSelectWidth:ee,dropdownRender:re,dropdownAlign:he,placement:fe,builtinPlacements:ue,getPopupContainer:Se,empty:g,getTriggerDOMNode:function(st){return $t.current||st},onPopupVisibleChange:vt,onPopupMouseEnter:Ke},St?h.cloneElement(St,{ref:nn}):h.createElement(Dz,Re({},e,{domRef:$t,prefixCls:i,inputElement:It,ref:Je,id:r,prefix:V,showSearch:ze,autoClearSearchValue:M,mode:_,activeDescendantId:z,tagRender:c,values:f,open:ot,onToggleOpen:Ie,activeValue:N,searchValue:qe,onSearch:nt,onSearchSubmit:Ft,onRemove:cn,tokenWithEnter:$e,onInputBlur:mn}))),dn;return St?dn=Jr:dn=h.createElement("div",Re({className:Hr},Ee,{ref:at,onMouseDown:lt,onKeyDown:Nn,onKeyUp:Hn,onFocus:Ye,onBlur:Pt}),h.createElement(sj,{visible:Le&&!ot,values:f}),Jr,sr,_r&&Yr),h.createElement(Dk.Provider,{value:Nt},dn)}),Dy=function(){return null};Dy.isSelectOptGroup=!0;var Hy=function(){return null};Hy.isSelectOption=!0;var Xk=h.forwardRef(function(e,t){var n=e.height,r=e.offsetY,i=e.offsetX,o=e.children,a=e.prefixCls,c=e.onInnerResize,u=e.innerProps,d=e.rtl,f=e.extra,m={},g={display:"flex",flexDirection:"column"};return r!==void 0&&(m={height:n,position:"relative",overflow:"hidden"},g=X(X({},g),{},K(K(K(K(K({transform:"translateY(".concat(r,"px)")},d?"marginRight":"marginLeft",-i),"position","absolute"),"left",0),"right",0),"top",0))),h.createElement("div",{style:m},h.createElement(co,{onResize:function(y){var S=y.offsetHeight;S&&c&&c()}},h.createElement("div",Re({style:g,className:ne(K({},"".concat(a,"-holder-inner"),a)),ref:t},u),o,f)))});Xk.displayName="Filler";function uj(e){var t=e.children,n=e.setRef,r=h.useCallback(function(i){n(i)},[]);return h.cloneElement(t,{ref:r})}function dj(e,t,n,r,i,o,a,c){var u=c.getKey;return e.slice(t,n+1).map(function(d,f){var m=t+f,g=a(d,m,{style:{width:r},offsetX:i}),v=u(d);return h.createElement(uj,{key:v,setRef:function(S){return o(d,S)}},g)})}function hj(e,t,n){var r=e.length,i=t.length,o,a;if(r===0&&i===0)return null;r<i?(o=e,a=t):(o=t,a=e);var c={__EMPTY_ITEM__:!0};function u(y){return y!==void 0?n(y):c}for(var d=null,f=Math.abs(r-i)!==1,m=0;m<a.length;m+=1){var g=u(o[m]),v=u(a[m]);if(g!==v){d=m,f=f||g!==u(a[m+1]);break}}return d===null?null:{index:d,multiple:f}}function fj(e,t,n){var r=h.useState(e),i=se(r,2),o=i[0],a=i[1],c=h.useState(null),u=se(c,2),d=u[0],f=u[1];return h.useEffect(function(){var m=hj(o||[],e||[],t);(m==null?void 0:m.index)!==void 0&&f(e[m.index]),a(e)},[e]),[d]}var qC=(typeof navigator>"u"?"undefined":_t(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const Yk=(function(e,t,n,r){var i=h.useRef(!1),o=h.useRef(null);function a(){clearTimeout(o.current),i.current=!0,o.current=setTimeout(function(){i.current=!1},50)}var c=h.useRef({top:e,bottom:t,left:n,right:r});return c.current.top=e,c.current.bottom=t,c.current.left=n,c.current.right=r,function(u,d){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,m=u?d<0&&c.current.left||d>0&&c.current.right:d<0&&c.current.top||d>0&&c.current.bottom;return f&&m?(clearTimeout(o.current),i.current=!1):(!m||i.current)&&a(),!i.current&&m}});function mj(e,t,n,r,i,o,a){var c=h.useRef(0),u=h.useRef(null),d=h.useRef(null),f=h.useRef(!1),m=Yk(t,n,r,i);function g(E,k){if(Tn.cancel(u.current),!m(!1,k)){var $=E;if(!$._virtualHandled)$._virtualHandled=!0;else return;c.current+=k,d.current=k,qC||$.preventDefault(),u.current=Tn(function(){var P=f.current?10:1;a(c.current*P,!1),c.current=0})}}function v(E,k){a(k,!0),qC||E.preventDefault()}var y=h.useRef(null),S=h.useRef(null);function _(E){if(e){Tn.cancel(S.current),S.current=Tn(function(){y.current=null},2);var k=E.deltaX,$=E.deltaY,P=E.shiftKey,T=k,O=$;(y.current==="sx"||!y.current&&P&&$&&!k)&&(T=$,O=0,y.current="sx");var N=Math.abs(T),I=Math.abs(O);y.current===null&&(y.current=o&&N>I?"x":"y"),y.current==="y"?g(E,O):v(E,T)}}function C(E){e&&(f.current=E.detail===d.current)}return[_,C]}function pj(e,t,n,r){var i=h.useMemo(function(){return[new Map,[]]},[e,n.id,r]),o=se(i,2),a=o[0],c=o[1],u=function(f){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f,g=a.get(f),v=a.get(m);if(g===void 0||v===void 0)for(var y=e.length,S=c.length;S<y;S+=1){var _,C=e[S],E=t(C);a.set(E,S);var k=(_=n.get(E))!==null&&_!==void 0?_:r;if(c[S]=(c[S-1]||0)+k,E===f&&(g=S),E===m&&(v=S),g!==void 0&&v!==void 0)break}return{top:c[g-1]||0,bottom:c[v]}};return u}var gj=(function(){function e(){yr(this,e),K(this,"maps",void 0),K(this,"id",0),K(this,"diffRecords",new Map),this.maps=Object.create(null)}return br(e,[{key:"set",value:function(n,r){this.diffRecords.set(n,this.maps[n]),this.maps[n]=r,this.id+=1}},{key:"get",value:function(n){return this.maps[n]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),e})();function KC(e){var t=parseFloat(e);return isNaN(t)?0:t}function vj(e,t,n){var r=h.useState(0),i=se(r,2),o=i[0],a=i[1],c=h.useRef(new Map),u=h.useRef(new gj),d=h.useRef(0);function f(){d.current+=1}function m(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;f();var y=function(){var C=!1;c.current.forEach(function(E,k){if(E&&E.offsetParent){var $=E.offsetHeight,P=getComputedStyle(E),T=P.marginTop,O=P.marginBottom,N=KC(T),I=KC(O),z=$+N+I;u.current.get(k)!==z&&(u.current.set(k,z),C=!0)}}),C&&a(function(E){return E+1})};if(v)y();else{d.current+=1;var S=d.current;Promise.resolve().then(function(){S===d.current&&y()})}}function g(v,y){var S=e(v);c.current.get(S),y?(c.current.set(S,y),m()):c.current.delete(S)}return h.useEffect(function(){return f},[]),[g,m,u.current,o]}var GC=14/15;function yj(e,t,n){var r=h.useRef(!1),i=h.useRef(0),o=h.useRef(0),a=h.useRef(null),c=h.useRef(null),u,d=function(v){if(r.current){var y=Math.ceil(v.touches[0].pageX),S=Math.ceil(v.touches[0].pageY),_=i.current-y,C=o.current-S,E=Math.abs(_)>Math.abs(C);E?i.current=y:o.current=S;var k=n(E,E?_:C,!1,v);k&&v.preventDefault(),clearInterval(c.current),k&&(c.current=setInterval(function(){E?_*=GC:C*=GC;var $=Math.floor(E?_:C);(!n(E,$,!0)||Math.abs($)<=.1)&&clearInterval(c.current)},16))}},f=function(){r.current=!1,u()},m=function(v){u(),v.touches.length===1&&!r.current&&(r.current=!0,i.current=Math.ceil(v.touches[0].pageX),o.current=Math.ceil(v.touches[0].pageY),a.current=v.target,a.current.addEventListener("touchmove",d,{passive:!1}),a.current.addEventListener("touchend",f,{passive:!0}))};u=function(){a.current&&(a.current.removeEventListener("touchmove",d),a.current.removeEventListener("touchend",f))},fn(function(){return e&&t.current.addEventListener("touchstart",m,{passive:!0}),function(){var g;(g=t.current)===null||g===void 0||g.removeEventListener("touchstart",m),u(),clearInterval(c.current)}},[e])}function XC(e){return Math.floor(Math.pow(e,.5))}function l0(e,t){var n="touches"in e?e.touches[0]:e;return n[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}function bj(e,t,n){h.useEffect(function(){var r=t.current;if(e&&r){var i=!1,o,a,c=function(){Tn.cancel(o)},u=function g(){c(),o=Tn(function(){n(a),g()})},d=function(){i=!1,c()},f=function(v){if(!(v.target.draggable||v.button!==0)){var y=v;y._virtualHandled||(y._virtualHandled=!0,i=!0)}},m=function(v){if(i){var y=l0(v,!1),S=r.getBoundingClientRect(),_=S.top,C=S.bottom;if(y<=_){var E=_-y;a=-XC(E),u()}else if(y>=C){var k=y-C;a=XC(k),u()}else c()}};return r.addEventListener("mousedown",f),r.ownerDocument.addEventListener("mouseup",d),r.ownerDocument.addEventListener("mousemove",m),r.ownerDocument.addEventListener("dragend",d),function(){r.removeEventListener("mousedown",f),r.ownerDocument.removeEventListener("mouseup",d),r.ownerDocument.removeEventListener("mousemove",m),r.ownerDocument.removeEventListener("dragend",d),c()}}},[e])}var _j=10;function Sj(e,t,n,r,i,o,a,c){var u=h.useRef(),d=h.useState(null),f=se(d,2),m=f[0],g=f[1];return fn(function(){if(m&&m.times<_j){if(!e.current){g(function(G){return X({},G)});return}o();var v=m.targetAlign,y=m.originAlign,S=m.index,_=m.offset,C=e.current.clientHeight,E=!1,k=v,$=null;if(C){for(var P=v||y,T=0,O=0,N=0,I=Math.min(t.length-1,S),z=0;z<=I;z+=1){var L=i(t[z]);O=T;var M=n.get(L);N=O+(M===void 0?r:M),T=N}for(var j=P==="top"?_:C-_,B=I;B>=0;B-=1){var H=i(t[B]),W=n.get(H);if(W===void 0){E=!0;break}if(j-=W,j<=0)break}switch(P){case"top":$=O-_;break;case"bottom":$=N-C+_;break;default:{var V=e.current.scrollTop,A=V+C;O<V?k="top":N>A&&(k="bottom")}}$!==null&&a($),$!==m.lastTop&&(E=!0)}E&&g(X(X({},m),{},{times:m.times+1,targetAlign:k,lastTop:$}))}},[m,e.current]),function(v){if(v==null){c();return}if(Tn.cancel(u.current),typeof v=="number")a(v);else if(v&&_t(v)==="object"){var y,S=v.align;"index"in v?y=v.index:y=t.findIndex(function(E){return i(E)===v.key});var _=v.offset,C=_===void 0?0:_;g({times:0,index:y,offset:C,originAlign:S})}}}var YC=h.forwardRef(function(e,t){var n=e.prefixCls,r=e.rtl,i=e.scrollOffset,o=e.scrollRange,a=e.onStartMove,c=e.onStopMove,u=e.onScroll,d=e.horizontal,f=e.spinSize,m=e.containerSize,g=e.style,v=e.thumbStyle,y=e.showScrollBar,S=h.useState(!1),_=se(S,2),C=_[0],E=_[1],k=h.useState(null),$=se(k,2),P=$[0],T=$[1],O=h.useState(null),N=se(O,2),I=N[0],z=N[1],L=!r,M=h.useRef(),j=h.useRef(),B=h.useState(y),H=se(B,2),W=H[0],V=H[1],A=h.useRef(),G=function(){y===!0||y===!1||(clearTimeout(A.current),V(!0),A.current=setTimeout(function(){V(!1)},3e3))},q=o-m||0,D=m-f||0,U=h.useMemo(function(){if(i===0||q===0)return 0;var ae=i/q;return ae*D},[i,q,D]),Y=function(le){le.stopPropagation(),le.preventDefault()},Z=h.useRef({top:U,dragging:C,pageY:P,startTop:I});Z.current={top:U,dragging:C,pageY:P,startTop:I};var ee=function(le){E(!0),T(l0(le,d)),z(Z.current.top),a(),le.stopPropagation(),le.preventDefault()};h.useEffect(function(){var ae=function(me){me.preventDefault()},le=M.current,ce=j.current;return le.addEventListener("touchstart",ae,{passive:!1}),ce.addEventListener("touchstart",ee,{passive:!1}),function(){le.removeEventListener("touchstart",ae),ce.removeEventListener("touchstart",ee)}},[]);var re=h.useRef();re.current=q;var he=h.useRef();he.current=D,h.useEffect(function(){if(C){var ae,le=function(me){var de=Z.current,be=de.dragging,we=de.pageY,Te=de.startTop;Tn.cancel(ae);var ze=M.current.getBoundingClientRect(),Ee=m/(d?ze.width:ze.height);if(be){var ke=(l0(me,d)-we)*Ee,je=Te;!L&&d?je-=ke:je+=ke;var Oe=re.current,Qe=he.current,at=Qe?je/Qe:0,$t=Math.ceil(at*Oe);$t=Math.max($t,0),$t=Math.min($t,Oe),ae=Tn(function(){u($t,d)})}},ce=function(){E(!1),c()};return window.addEventListener("mousemove",le,{passive:!0}),window.addEventListener("touchmove",le,{passive:!0}),window.addEventListener("mouseup",ce,{passive:!0}),window.addEventListener("touchend",ce,{passive:!0}),function(){window.removeEventListener("mousemove",le),window.removeEventListener("touchmove",le),window.removeEventListener("mouseup",ce),window.removeEventListener("touchend",ce),Tn.cancel(ae)}}},[C]),h.useEffect(function(){return G(),function(){clearTimeout(A.current)}},[i]),h.useImperativeHandle(t,function(){return{delayHidden:G}});var fe="".concat(n,"-scrollbar"),ue={position:"absolute",visibility:W?null:"hidden"},Se={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(ue,{height:8,left:0,right:0,bottom:0}),Object.assign(Se,K({height:"100%",width:f},L?"left":"right",U))):(Object.assign(ue,K({width:8,top:0,bottom:0},L?"right":"left",0)),Object.assign(Se,{width:"100%",height:f,top:U})),h.createElement("div",{ref:M,className:ne(fe,K(K(K({},"".concat(fe,"-horizontal"),d),"".concat(fe,"-vertical"),!d),"".concat(fe,"-visible"),W)),style:X(X({},ue),g),onMouseDown:Y,onMouseMove:G},h.createElement("div",{ref:j,className:ne("".concat(fe,"-thumb"),K({},"".concat(fe,"-thumb-moving"),C)),style:X(X({},Se),v),onMouseDown:ee}))}),Cj=20;function JC(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=e/t*e;return isNaN(n)&&(n=0),n=Math.max(n,Cj),Math.floor(n)}var wj=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],xj=[],Ej={overflowY:"auto",overflowAnchor:"none"};function kj(e,t){var n=e.prefixCls,r=n===void 0?"rc-virtual-list":n,i=e.className,o=e.height,a=e.itemHeight,c=e.fullHeight,u=c===void 0?!0:c,d=e.style,f=e.data,m=e.children,g=e.itemKey,v=e.virtual,y=e.direction,S=e.scrollWidth,_=e.component,C=_===void 0?"div":_,E=e.onScroll,k=e.onVirtualScroll,$=e.onVisibleChange,P=e.innerProps,T=e.extraRender,O=e.styles,N=e.showScrollBar,I=N===void 0?"optional":N,z=Lt(e,wj),L=h.useCallback(function(He){return typeof g=="function"?g(He):He==null?void 0:He[g]},[g]),M=vj(L),j=se(M,4),B=j[0],H=j[1],W=j[2],V=j[3],A=!!(v!==!1&&o&&a),G=h.useMemo(function(){return Object.values(W.maps).reduce(function(He,Ye){return He+Ye},0)},[W.id,W.maps]),q=A&&f&&(Math.max(a*f.length,G)>o||!!S),D=y==="rtl",U=ne(r,K({},"".concat(r,"-rtl"),D),i),Y=f||xj,Z=h.useRef(),ee=h.useRef(),re=h.useRef(),he=h.useState(0),fe=se(he,2),ue=fe[0],Se=fe[1],ae=h.useState(0),le=se(ae,2),ce=le[0],ye=le[1],me=h.useState(!1),de=se(me,2),be=de[0],we=de[1],Te=function(){we(!0)},ze=function(){we(!1)},Ee={getKey:L};function ke(He){Se(function(Ye){var Pt;typeof He=="function"?Pt=He(Ye):Pt=He;var gt=on(Pt);return Z.current.scrollTop=gt,gt})}var je=h.useRef({start:0,end:Y.length}),Oe=h.useRef(),Qe=fj(Y,L),at=se(Qe,1),$t=at[0];Oe.current=$t;var pt=h.useMemo(function(){if(!A)return{scrollHeight:void 0,start:0,end:Y.length-1,offset:void 0};if(!q){var He;return{scrollHeight:((He=ee.current)===null||He===void 0?void 0:He.offsetHeight)||0,start:0,end:Y.length-1,offset:void 0}}for(var Ye=0,Pt,gt,lt,Ze=Y.length,Tt=0;Tt<Ze;Tt+=1){var Gt=Y[Tt],Ke=L(Gt),vt=W.get(Ke),Nt=Ye+(vt===void 0?a:vt);Nt>=ue&&Pt===void 0&&(Pt=Tt,gt=Ye),Nt>ue+o&&lt===void 0&&(lt=Tt),Ye=Nt}return Pt===void 0&&(Pt=0,gt=0,lt=Math.ceil(o/a)),lt===void 0&&(lt=Y.length-1),lt=Math.min(lt+1,Y.length-1),{scrollHeight:Ye,start:Pt,end:lt,offset:gt}},[q,A,ue,Y,V,o]),Je=pt.scrollHeight,ft=pt.start,Xe=pt.end,yt=pt.offset;je.current.start=ft,je.current.end=Xe,h.useLayoutEffect(function(){var He=W.getRecord();if(He.size===1){var Ye=Array.from(He.keys())[0],Pt=He.get(Ye),gt=Y[ft];if(gt&&Pt===void 0){var lt=L(gt);if(lt===Ye){var Ze=W.get(Ye),Tt=Ze-a;ke(function(Gt){return Gt+Tt})}}}W.resetRecord()},[Je]);var tt=h.useState({width:0,height:o}),Le=se(tt,2),rt=Le[0],Me=Le[1],qe=function(Ye){Me({width:Ye.offsetWidth,height:Ye.offsetHeight})},It=h.useRef(),St=h.useRef(),nn=h.useMemo(function(){return JC(rt.width,S)},[rt.width,S]),Jt=h.useMemo(function(){return JC(rt.height,Je)},[rt.height,Je]),_n=Je-o,In=h.useRef(_n);In.current=_n;function on(He){var Ye=He;return Number.isNaN(In.current)||(Ye=Math.min(Ye,In.current)),Ye=Math.max(Ye,0),Ye}var Ht=ue<=0,Rt=ue>=_n,sn=ce<=0,Xt=ce>=S,ot=Yk(Ht,Rt,sn,Xt),Et=function(){return{x:D?-ce:ce,y:ue}},mt=h.useRef(Et()),Ie=er(function(He){if(k){var Ye=X(X({},Et()),He);(mt.current.x!==Ye.x||mt.current.y!==Ye.y)&&(k(Ye),mt.current=Ye)}});function $e(He,Ye){var Pt=He;Ye?(Js.flushSync(function(){ye(Pt)}),Ie()):ke(Pt)}function xe(He){var Ye=He.currentTarget.scrollTop;Ye!==ue&&ke(Ye),E==null||E(He),Ie()}var Ae=function(Ye){var Pt=Ye,gt=S?S-rt.width:0;return Pt=Math.max(Pt,0),Pt=Math.min(Pt,gt),Pt},et=er(function(He,Ye){Ye?(Js.flushSync(function(){ye(function(Pt){var gt=Pt+(D?-He:He);return Ae(gt)})}),Ie()):ke(function(Pt){var gt=Pt+He;return gt})}),nt=mj(A,Ht,Rt,sn,Xt,!!S,et),Ft=se(nt,2),Kt=Ft[0],Bt=Ft[1];yj(A,Z,function(He,Ye,Pt,gt){var lt=gt;return ot(He,Ye,Pt)?!1:!lt||!lt._virtualHandled?(lt&&(lt._virtualHandled=!0),Kt({preventDefault:function(){},deltaX:He?Ye:0,deltaY:He?0:Ye}),!0):!1}),bj(q,Z,function(He){ke(function(Ye){return Ye+He})}),fn(function(){function He(Pt){var gt=Ht&&Pt.detail<0,lt=Rt&&Pt.detail>0;A&&!gt&&!lt&&Pt.preventDefault()}var Ye=Z.current;return Ye.addEventListener("wheel",Kt,{passive:!1}),Ye.addEventListener("DOMMouseScroll",Bt,{passive:!0}),Ye.addEventListener("MozMousePixelScroll",He,{passive:!1}),function(){Ye.removeEventListener("wheel",Kt),Ye.removeEventListener("DOMMouseScroll",Bt),Ye.removeEventListener("MozMousePixelScroll",He)}},[A,Ht,Rt]),fn(function(){if(S){var He=Ae(ce);ye(He),Ie({x:He})}},[rt.width,S]);var At=function(){var Ye,Pt;(Ye=It.current)===null||Ye===void 0||Ye.delayHidden(),(Pt=St.current)===null||Pt===void 0||Pt.delayHidden()},Pn=Sj(Z,Y,W,a,L,function(){return H(!0)},ke,At);h.useImperativeHandle(t,function(){return{nativeElement:re.current,getScrollInfo:Et,scrollTo:function(Ye){function Pt(gt){return gt&&_t(gt)==="object"&&("left"in gt||"top"in gt)}Pt(Ye)?(Ye.left!==void 0&&ye(Ae(Ye.left)),Pn(Ye.top)):Pn(Ye)}}}),fn(function(){if($){var He=Y.slice(ft,Xe+1);$(He,Y)}},[ft,Xe,Y]);var kn=pj(Y,L,W,a),Nn=T==null?void 0:T({start:ft,end:Xe,virtual:q,offsetX:ce,offsetY:yt,rtl:D,getSize:kn}),Hn=dj(Y,ft,Xe,S,ce,B,m,Ee),cn=null;o&&(cn=X(K({},u?"height":"maxHeight",o),Ej),A&&(cn.overflowY="hidden",S&&(cn.overflowX="hidden"),be&&(cn.pointerEvents="none")));var mn={};return D&&(mn.dir="rtl"),h.createElement("div",Re({ref:re,style:X(X({},d),{},{position:"relative"}),className:U},mn,z),h.createElement(co,{onResize:qe},h.createElement(C,{className:"".concat(r,"-holder"),style:cn,ref:Z,onScroll:xe,onMouseEnter:At},h.createElement(Xk,{prefixCls:r,height:Je,offsetX:ce,offsetY:yt,scrollWidth:S,onInnerResize:H,ref:ee,innerProps:P,rtl:D,extra:Nn},Hn))),q&&Je>o&&h.createElement(YC,{ref:It,prefixCls:r,scrollOffset:ue,scrollRange:Je,rtl:D,onScroll:$e,onStartMove:Te,onStopMove:ze,spinSize:Jt,containerSize:rt.height,style:O==null?void 0:O.verticalScrollBar,thumbStyle:O==null?void 0:O.verticalScrollBarThumb,showScrollBar:I}),q&&S>rt.width&&h.createElement(YC,{ref:St,prefixCls:r,scrollOffset:ce,scrollRange:S,rtl:D,onScroll:$e,onStartMove:Te,onStopMove:ze,spinSize:nn,containerSize:rt.width,horizontal:!0,style:O==null?void 0:O.horizontalScrollBar,thumbStyle:O==null?void 0:O.horizontalScrollBarThumb,showScrollBar:I}))}var Jk=h.forwardRef(kj);Jk.displayName="List";function $j(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Rj=["disabled","title","children","style","className"];function QC(e){return typeof e=="string"||typeof e=="number"}var Tj=function(t,n){var r=fz(),i=r.prefixCls,o=r.id,a=r.open,c=r.multiple,u=r.mode,d=r.searchValue,f=r.toggleOpen,m=r.notFoundContent,g=r.onPopupScroll,v=h.useContext(Ay),y=v.maxCount,S=v.flattenOptions,_=v.onActiveValue,C=v.defaultActiveFirstOption,E=v.onSelect,k=v.menuItemSelectedIcon,$=v.rawValues,P=v.fieldNames,T=v.virtual,O=v.direction,N=v.listHeight,I=v.listItemHeight,z=v.optionRender,L="".concat(i,"-item"),M=Bu(function(){return S},[a,S],function(ae,le){return le[0]&&ae[1]!==le[1]}),j=h.useRef(null),B=h.useMemo(function(){return c&&o0(y)&&($==null?void 0:$.size)>=y},[c,y,$==null?void 0:$.size]),H=function(le){le.preventDefault()},W=function(le){var ce;(ce=j.current)===null||ce===void 0||ce.scrollTo(typeof le=="number"?{index:le}:le)},V=h.useCallback(function(ae){return u==="combobox"?!1:$.has(ae)},[u,We($).toString(),$.size]),A=function(le){for(var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ye=M.length,me=0;me<ye;me+=1){var de=(le+me*ce+ye)%ye,be=M[de]||{},we=be.group,Te=be.data;if(!we&&!(Te!=null&&Te.disabled)&&(V(Te.value)||!B))return de}return-1},G=h.useState(function(){return A(0)}),q=se(G,2),D=q[0],U=q[1],Y=function(le){var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;U(le);var ye={source:ce?"keyboard":"mouse"},me=M[le];if(!me){_(null,-1,ye);return}_(me.value,le,ye)};h.useEffect(function(){Y(C!==!1?A(0):-1)},[M.length,d]);var Z=h.useCallback(function(ae){return u==="combobox"?String(ae).toLowerCase()===d.toLowerCase():$.has(ae)},[u,d,We($).toString(),$.size]);h.useEffect(function(){var ae=setTimeout(function(){if(!c&&a&&$.size===1){var ce=Array.from($)[0],ye=M.findIndex(function(me){var de=me.data;return d?String(de.value).startsWith(d):de.value===ce});ye!==-1&&(Y(ye),W(ye))}});if(a){var le;(le=j.current)===null||le===void 0||le.scrollTo(void 0)}return function(){return clearTimeout(ae)}},[a,d]);var ee=function(le){le!==void 0&&E(le,{selected:!$.has(le)}),c||f(!1)};if(h.useImperativeHandle(n,function(){return{onKeyDown:function(le){var ce=le.which,ye=le.ctrlKey;switch(ce){case Ge.N:case Ge.P:case Ge.UP:case Ge.DOWN:{var me=0;if(ce===Ge.UP?me=-1:ce===Ge.DOWN?me=1:$j()&&ye&&(ce===Ge.N?me=1:ce===Ge.P&&(me=-1)),me!==0){var de=A(D+me,me);W(de),Y(de,!0)}break}case Ge.TAB:case Ge.ENTER:{var be,we=M[D];we&&!(we!=null&&(be=we.data)!==null&&be!==void 0&&be.disabled)&&!B?ee(we.value):ee(void 0),a&&le.preventDefault();break}case Ge.ESC:f(!1),a&&le.stopPropagation()}},onKeyUp:function(){},scrollTo:function(le){W(le)}}}),M.length===0)return h.createElement("div",{role:"listbox",id:"".concat(o,"_list"),className:"".concat(L,"-empty"),onMouseDown:H},m);var re=Object.keys(P).map(function(ae){return P[ae]}),he=function(le){return le.label};function fe(ae,le){var ce=ae.group;return{role:ce?"presentation":"option",id:"".concat(o,"_list_").concat(le)}}var ue=function(le){var ce=M[le];if(!ce)return null;var ye=ce.data||{},me=ye.value,de=ce.group,be=Ki(ye,!0),we=he(ce);return ce?h.createElement("div",Re({"aria-label":typeof we=="string"&&!de?we:null},be,{key:le},fe(ce,le),{"aria-selected":Z(me)}),me):null},Se={role:"listbox",id:"".concat(o,"_list")};return h.createElement(h.Fragment,null,T&&h.createElement("div",Re({},Se,{style:{height:0,width:0,overflow:"hidden"}}),ue(D-1),ue(D),ue(D+1)),h.createElement(Jk,{itemKey:"key",ref:j,data:M,height:N,itemHeight:I,fullHeight:!1,onMouseDown:H,onScroll:g,virtual:T,direction:O,innerProps:T?null:Se},function(ae,le){var ce=ae.group,ye=ae.groupOption,me=ae.data,de=ae.label,be=ae.value,we=me.key;if(ce){var Te,ze=(Te=me.title)!==null&&Te!==void 0?Te:QC(de)?de.toString():void 0;return h.createElement("div",{className:ne(L,"".concat(L,"-group"),me.className),title:ze},de!==void 0?de:we)}var Ee=me.disabled,ke=me.title;me.children;var je=me.style,Oe=me.className,Qe=Lt(me,Rj),at=fr(Qe,re),$t=V(be),pt=Ee||!$t&&B,Je="".concat(L,"-option"),ft=ne(L,Je,Oe,K(K(K(K({},"".concat(Je,"-grouped"),ye),"".concat(Je,"-active"),D===le&&!pt),"".concat(Je,"-disabled"),pt),"".concat(Je,"-selected"),$t)),Xe=he(ae),yt=!k||typeof k=="function"||$t,tt=typeof Xe=="number"?Xe:Xe||be,Le=QC(tt)?tt.toString():void 0;return ke!==void 0&&(Le=ke),h.createElement("div",Re({},Ki(at),T?{}:fe(ae,le),{"aria-selected":Z(be),className:ft,title:Le,onMouseMove:function(){D===le||pt||Y(le)},onClick:function(){pt||ee(be)},style:je}),h.createElement("div",{className:"".concat(Je,"-content")},typeof z=="function"?z(ae,{index:le}):tt),h.isValidElement(k)||$t,yt&&h.createElement(rm,{className:"".concat(L,"-option-state"),customizeIcon:k,customizeIconProps:{value:be,disabled:pt,isSelected:$t}},$t?"✓":null))}))},Pj=h.forwardRef(Tj);const Oj=(function(e,t){var n=h.useRef({values:new Map,options:new Map}),r=h.useMemo(function(){var o=n.current,a=o.values,c=o.options,u=e.map(function(m){if(m.label===void 0){var g;return X(X({},m),{},{label:(g=a.get(m.value))===null||g===void 0?void 0:g.label})}return m}),d=new Map,f=new Map;return u.forEach(function(m){d.set(m.value,m),f.set(m.value,t.get(m.value)||c.get(m.value))}),n.current.values=d,n.current.options=f,u},[e,t]),i=h.useCallback(function(o){return t.get(o)||n.current.options.get(o)},[t]);return[r,i]});function Ig(e,t){return qk(e).join("").toUpperCase().includes(t)}const Ij=(function(e,t,n,r,i){return h.useMemo(function(){if(!n||r===!1)return e;var o=t.options,a=t.label,c=t.value,u=[],d=typeof r=="function",f=n.toUpperCase(),m=d?r:function(v,y){return i?Ig(y[i],f):y[o]?Ig(y[a!=="children"?a:"label"],f):Ig(y[c],f)},g=d?function(v){return s0(v)}:function(v){return v};return e.forEach(function(v){if(v[o]){var y=m(n,g(v));if(y)u.push(v);else{var S=v[o].filter(function(_){return m(n,g(_))});S.length&&u.push(X(X({},v),{},K({},o,S)))}return}m(n,g(v))&&u.push(v)}),u},[e,r,i,n,t])});var ZC=0,Nj=si();function Mj(){var e;return Nj?(e=ZC,ZC+=1):e="TEST_OR_SSR",e}function zj(e){var t=h.useState(),n=se(t,2),r=n[0],i=n[1];return h.useEffect(function(){i("rc_select_".concat(Mj()))},[]),e||r}var jj=["children","value"],Bj=["children"];function Lj(e){var t=e,n=t.key,r=t.props,i=r.children,o=r.value,a=Lt(r,jj);return X({key:n,value:o!==void 0?o:n,children:i},a)}function Qk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return mi(e).map(function(n,r){if(!h.isValidElement(n)||!n.type)return null;var i=n,o=i.type.isSelectOptGroup,a=i.key,c=i.props,u=c.children,d=Lt(c,Bj);return t||!o?Lj(n):X(X({key:"__RC_SELECT_GRP__".concat(a===null?r:a,"__"),label:a},d),{},{options:Qk(u)})}).filter(function(n){return n})}var Aj=function(t,n,r,i,o){return h.useMemo(function(){var a=t,c=!t;c&&(a=Qk(n));var u=new Map,d=new Map,f=function(v,y,S){S&&typeof S=="string"&&v.set(y[S],y)},m=function g(v){for(var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,S=0;S<v.length;S+=1){var _=v[S];!_[r.options]||y?(u.set(_[r.value],_),f(d,_,r.label),f(d,_,i),f(d,_,o)):g(_[r.options],!0)}};return m(a),{options:a,valueOptions:u,labelOptions:d}},[t,n,r,i,o])};function ew(e){var t=h.useRef();t.current=e;var n=h.useCallback(function(){return t.current.apply(t,arguments)},[]);return n}var Dj=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],Hj=["inputValue"];function Fj(e){return!e||_t(e)!=="object"}var Wj=h.forwardRef(function(e,t){var n=e.id,r=e.mode,i=e.prefixCls,o=i===void 0?"rc-select":i,a=e.backfill,c=e.fieldNames,u=e.inputValue,d=e.searchValue,f=e.onSearch,m=e.autoClearSearchValue,g=m===void 0?!0:m,v=e.onSelect,y=e.onDeselect,S=e.dropdownMatchSelectWidth,_=S===void 0?!0:S,C=e.filterOption,E=e.filterSort,k=e.optionFilterProp,$=e.optionLabelProp,P=e.options,T=e.optionRender,O=e.children,N=e.defaultActiveFirstOption,I=e.menuItemSelectedIcon,z=e.virtual,L=e.direction,M=e.listHeight,j=M===void 0?200:M,B=e.listItemHeight,H=B===void 0?20:B,W=e.labelRender,V=e.value,A=e.defaultValue,G=e.labelInValue,q=e.onChange,D=e.maxCount,U=Lt(e,Dj),Y=zj(n),Z=a0(r),ee=!!(!P&&O),re=h.useMemo(function(){return C===void 0&&r==="combobox"?!1:C},[C,r]),he=h.useMemo(function(){return Gk(c,ee)},[JSON.stringify(c),ee]),fe=tr("",{value:d!==void 0?d:u,postState:function($e){return $e||""}}),ue=se(fe,2),Se=ue[0],ae=ue[1],le=Aj(P,O,he,k,$),ce=le.valueOptions,ye=le.labelOptions,me=le.options,de=h.useCallback(function(Ie){var $e=qk(Ie);return $e.map(function(xe){var Ae,et,nt,Ft,Kt;if(Fj(xe))Ae=xe;else{var Bt;nt=xe.key,et=xe.label,Ae=(Bt=xe.value)!==null&&Bt!==void 0?Bt:nt}var At=ce.get(Ae);if(At){var Pn;et===void 0&&(et=At==null?void 0:At[$||he.label]),nt===void 0&&(nt=(Pn=At==null?void 0:At.key)!==null&&Pn!==void 0?Pn:Ae),Ft=At==null?void 0:At.disabled,Kt=At==null?void 0:At.title}return{label:et,value:Ae,key:nt,disabled:Ft,title:Kt}})},[he,$,ce]),be=tr(A,{value:V}),we=se(be,2),Te=we[0],ze=we[1],Ee=h.useMemo(function(){var Ie,$e=Z&&Te===null?[]:Te,xe=de($e);return r==="combobox"&&Mz((Ie=xe[0])===null||Ie===void 0?void 0:Ie.value)?[]:xe},[Te,de,r,Z]),ke=Oj(Ee,ce),je=se(ke,2),Oe=je[0],Qe=je[1],at=h.useMemo(function(){if(!r&&Oe.length===1){var Ie=Oe[0];if(Ie.value===null&&(Ie.label===null||Ie.label===void 0))return[]}return Oe.map(function($e){var xe;return X(X({},$e),{},{label:(xe=typeof W=="function"?W($e):$e.label)!==null&&xe!==void 0?xe:$e.value})})},[r,Oe,W]),$t=h.useMemo(function(){return new Set(Oe.map(function(Ie){return Ie.value}))},[Oe]);h.useEffect(function(){if(r==="combobox"){var Ie,$e=(Ie=Oe[0])===null||Ie===void 0?void 0:Ie.value;ae(Nz($e)?String($e):"")}},[Oe]);var pt=ew(function(Ie,$e){var xe=$e??Ie;return K(K({},he.value,Ie),he.label,xe)}),Je=h.useMemo(function(){if(r!=="tags")return me;var Ie=We(me),$e=function(Ae){return ce.has(Ae)};return We(Oe).sort(function(xe,Ae){return xe.value<Ae.value?-1:1}).forEach(function(xe){var Ae=xe.value;$e(Ae)||Ie.push(pt(Ae,xe.label))}),Ie},[pt,me,ce,Oe,r]),ft=Ij(Je,he,Se,re,k),Xe=h.useMemo(function(){return r!=="tags"||!Se||ft.some(function(Ie){return Ie[k||"value"]===Se})||ft.some(function(Ie){return Ie[he.value]===Se})?ft:[pt(Se)].concat(We(ft))},[pt,k,r,ft,Se,he]),yt=function Ie($e){var xe=We($e).sort(function(Ae,et){return E(Ae,et,{searchValue:Se})});return xe.map(function(Ae){return Array.isArray(Ae.options)?X(X({},Ae),{},{options:Ae.options.length>0?Ie(Ae.options):Ae.options}):Ae})},tt=h.useMemo(function(){return E?yt(Xe):Xe},[Xe,E,Se]),Le=h.useMemo(function(){return ij(tt,{fieldNames:he,childrenAsData:ee})},[tt,he,ee]),rt=function($e){var xe=de($e);if(ze(xe),q&&(xe.length!==Oe.length||xe.some(function(nt,Ft){var Kt;return((Kt=Oe[Ft])===null||Kt===void 0?void 0:Kt.value)!==(nt==null?void 0:nt.value)}))){var Ae=G?xe:xe.map(function(nt){return nt.value}),et=xe.map(function(nt){return s0(Qe(nt.value))});q(Z?Ae:Ae[0],Z?et:et[0])}},Me=h.useState(null),qe=se(Me,2),It=qe[0],St=qe[1],nn=h.useState(0),Jt=se(nn,2),_n=Jt[0],In=Jt[1],on=N!==void 0?N:r!=="combobox",Ht=h.useCallback(function(Ie,$e){var xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ae=xe.source,et=Ae===void 0?"keyboard":Ae;In($e),a&&r==="combobox"&&Ie!==null&&et==="keyboard"&&St(String(Ie))},[a,r]),Rt=function($e,xe,Ae){var et=function(){var cn,mn=Qe($e);return[G?{label:mn==null?void 0:mn[he.label],value:$e,key:(cn=mn==null?void 0:mn.key)!==null&&cn!==void 0?cn:$e}:$e,s0(mn)]};if(xe&&v){var nt=et(),Ft=se(nt,2),Kt=Ft[0],Bt=Ft[1];v(Kt,Bt)}else if(!xe&&y&&Ae!=="clear"){var At=et(),Pn=se(At,2),kn=Pn[0],Nn=Pn[1];y(kn,Nn)}},sn=ew(function(Ie,$e){var xe,Ae=Z?$e.selected:!0;Ae?xe=Z?[].concat(We(Oe),[Ie]):[Ie]:xe=Oe.filter(function(et){return et.value!==Ie}),rt(xe),Rt(Ie,Ae),r==="combobox"?St(""):(!a0||g)&&(ae(""),St(""))}),Xt=function($e,xe){rt($e);var Ae=xe.type,et=xe.values;(Ae==="remove"||Ae==="clear")&&et.forEach(function(nt){Rt(nt.value,!1,Ae)})},ot=function($e,xe){if(ae($e),St(null),xe.source==="submit"){var Ae=($e||"").trim();if(Ae){var et=Array.from(new Set([].concat(We($t),[Ae])));rt(et),Rt(Ae,!0),ae("")}return}xe.source!=="blur"&&(r==="combobox"&&rt($e),f==null||f($e))},Et=function($e){var xe=$e;r!=="tags"&&(xe=$e.map(function(et){var nt=ye.get(et);return nt==null?void 0:nt.value}).filter(function(et){return et!==void 0}));var Ae=Array.from(new Set([].concat(We($t),We(xe))));rt(Ae),Ae.forEach(function(et){Rt(et,!0)})},mt=h.useMemo(function(){var Ie=z!==!1&&_!==!1;return X(X({},le),{},{flattenOptions:Le,onActiveValue:Ht,defaultActiveFirstOption:on,onSelect:sn,menuItemSelectedIcon:I,rawValues:$t,fieldNames:he,virtual:Ie,direction:L,listHeight:j,listItemHeight:H,childrenAsData:ee,maxCount:D,optionRender:T})},[D,le,Le,Ht,on,sn,I,$t,he,z,_,L,j,H,ee,T]);return h.createElement(Ay.Provider,{value:mt},h.createElement(cj,Re({},U,{id:Y,prefixCls:o,ref:t,omitDomProps:Hj,mode:r,displayValues:at,onDisplayValuesChange:Xt,direction:L,searchValue:Se,onSearch:ot,autoClearSearchValue:g,onSearchSplit:Et,dropdownMatchSelectWidth:_,OptionList:Pj,emptyOptions:!Le.length,activeValue:It,activeDescendantId:"".concat(Y,"_list_").concat(_n)})))}),Fy=Wj;Fy.Option=Hy;Fy.OptGroup=Dy;function Zk(e,t,n){return ne({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:n})}const e$=(e,t)=>t||e,Vj=()=>{const[,e]=gi(),[t]=ys("Empty"),r=new yn(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return h.createElement("svg",{style:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},h.createElement("title",null,(t==null?void 0:t.description)||"Empty"),h.createElement("g",{fill:"none",fillRule:"evenodd"},h.createElement("g",{transform:"translate(24 31.67)"},h.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),h.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),h.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),h.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),h.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),h.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),h.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},h.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),h.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},Uj=()=>{const[,e]=gi(),[t]=ys("Empty"),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:i,colorBgContainer:o}=e,{borderColor:a,shadowColor:c,contentColor:u}=h.useMemo(()=>({borderColor:new yn(n).onBackground(o).toHexString(),shadowColor:new yn(r).onBackground(o).toHexString(),contentColor:new yn(i).onBackground(o).toHexString()}),[n,r,i,o]);return h.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},h.createElement("title",null,(t==null?void 0:t.description)||"Empty"),h.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},h.createElement("ellipse",{fill:c,cx:"32",cy:"33",rx:"32",ry:"7"}),h.createElement("g",{fillRule:"nonzero",stroke:a},h.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),h.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:u}))))},qj=e=>{const{componentCls:t,margin:n,marginXS:r,marginXL:i,fontSize:o,lineHeight:a}=e;return{[t]:{marginInline:r,fontSize:o,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:i,color:e.colorTextDescription,[`${t}-description`]:{color:e.colorTextDescription},[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:r,color:e.colorTextDescription,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},Kj=bn("Empty",e=>{const{componentCls:t,controlHeightLG:n,calc:r}=e,i=tn(e,{emptyImgCls:`${t}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()});return qj(i)});var Gj=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const t$=h.createElement(Vj,null),n$=h.createElement(Uj,null),Pi=e=>{var t;const{className:n,rootClassName:r,prefixCls:i,image:o,description:a,children:c,imageStyle:u,style:d,classNames:f,styles:m}=e,g=Gj(e,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:v,direction:y,className:S,style:_,classNames:C,styles:E,image:k}=Gr("empty"),$=v("empty",i),[P,T,O]=Kj($),[N]=ys("Empty"),I=typeof a<"u"?a:N==null?void 0:N.description,z=typeof I=="string"?I:"empty",L=(t=o??k)!==null&&t!==void 0?t:t$;let M=null;return typeof L=="string"?M=h.createElement("img",{draggable:!1,alt:z,src:L}):M=L,P(h.createElement("div",Object.assign({className:ne(T,O,$,S,{[`${$}-normal`]:L===n$,[`${$}-rtl`]:y==="rtl"},n,r,C.root,f==null?void 0:f.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},E.root),_),m==null?void 0:m.root),d)},g),h.createElement("div",{className:ne(`${$}-image`,C.image,f==null?void 0:f.image),style:Object.assign(Object.assign(Object.assign({},u),E.image),m==null?void 0:m.image)},M),I&&h.createElement("div",{className:ne(`${$}-description`,C.description,f==null?void 0:f.description),style:Object.assign(Object.assign({},E.description),m==null?void 0:m.description)},I),c&&h.createElement("div",{className:ne(`${$}-footer`,C.footer,f==null?void 0:f.footer),style:Object.assign(Object.assign({},E.footer),m==null?void 0:m.footer)},c)))};Pi.PRESENTED_IMAGE_DEFAULT=t$;Pi.PRESENTED_IMAGE_SIMPLE=n$;const r$=e=>{const{componentName:t}=e,{getPrefixCls:n}=h.useContext(Ot),r=n("empty");switch(t){case"Table":case"List":return J.createElement(Pi,{image:Pi.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return J.createElement(Pi,{image:Pi.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case"Table.filter":return null;default:return J.createElement(Pi,null)}},i$=(e,t,n)=>{var r,i;const{variant:o,[e]:a}=h.useContext(Ot),c=h.useContext(g8),u=a==null?void 0:a.variant;let d;typeof t<"u"?d=t:n===!1?d="borderless":d=(i=(r=c??u)!==null&&r!==void 0?r:o)!==null&&i!==void 0?i:"outlined";const f=UP.includes(d);return[d,f]},Xj=e=>{const n={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:e==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},n),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},n),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},n),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},n),{points:["br","tr"],offset:[0,-4]})}};function Yj(e,t){return e||Xj(t)}const tw=e=>{const{optionHeight:t,optionFontSize:n,optionLineHeight:r,optionPadding:i}=e;return{position:"relative",display:"block",minHeight:t,padding:i,color:e.colorText,fontWeight:"normal",fontSize:n,lineHeight:r,boxSizing:"border-box"}},Jj=e=>{const{antCls:t,componentCls:n}=e,r=`${n}-item`,i=`&${t}-slide-up-enter${t}-slide-up-enter-active`,o=`&${t}-slide-up-appear${t}-slide-up-appear-active`,a=`&${t}-slide-up-leave${t}-slide-up-leave-active`,c=`${n}-dropdown-placement-`,u=`${r}-option-selected`;return[{[`${n}-dropdown`]:Object.assign(Object.assign({},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,[`
224
+ ${i}${c}bottomLeft,
225
+ ${o}${c}bottomLeft
226
+ `]:{animationName:Iy},[`
227
+ ${i}${c}topLeft,
228
+ ${o}${c}topLeft,
229
+ ${i}${c}topRight,
230
+ ${o}${c}topRight
231
+ `]:{animationName:My},[`${a}${c}bottomLeft`]:{animationName:Ny},[`
232
+ ${a}${c}topLeft,
233
+ ${a}${c}topRight
234
+ `]:{animationName:zy},"&-hidden":{display:"none"},[r]:Object.assign(Object.assign({},tw(e)),{cursor:"pointer",transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},xu),"&-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":Object.assign(Object.assign({},tw(e)),{color:e.colorTextDisabled})}),[`${u}:has(+ ${u})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${u}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},na(e,"slide-up"),na(e,"slide-down"),af(e,"move-up"),af(e,"move-down")]},Qj=e=>{const{multipleSelectItemHeight:t,paddingXXS:n,lineWidth:r,INTERNAL_FIXED_ITEM_MARGIN:i}=e,o=e.max(e.calc(n).sub(r).equal(),0),a=e.max(e.calc(o).sub(i).equal(),0);return{basePadding:o,containerPadding:a,itemHeight:te(t),itemLineHeight:te(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())}},Zj=e=>{const{multipleSelectItemHeight:t,selectHeight:n,lineWidth:r}=e;return e.calc(n).sub(t).div(2).sub(r).equal()},eB=e=>{const{componentCls:t,iconCls:n,borderRadiusSM:r,motionDurationSlow:i,paddingXS:o,multipleItemColorDisabled:a,multipleItemBorderColorDisabled:c,colorIcon:u,colorIconHover:d,INTERNAL_FIXED_ITEM_MARGIN:f}=e;return{[`${t}-selection-overflow`]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"calc(100% - 4px)",display:"inline-flex"},[`${t}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:f,borderRadius:r,cursor:"default",transition:`font-size ${i}, line-height ${i}, height ${i}`,marginInlineEnd:e.calc(f).mul(2).equal(),paddingInlineStart:o,paddingInlineEnd:e.calc(o).div(2).equal(),[`${t}-disabled&`]:{color:a,borderColor:c,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:e.calc(o).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},rc()),{display:"inline-flex",alignItems:"center",color:u,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${n}`]:{verticalAlign:"-0.2em"},"&:hover":{color:d}})}}}},tB=(e,t)=>{const{componentCls:n,INTERNAL_FIXED_ITEM_MARGIN:r}=e,i=`${n}-selection-overflow`,o=e.multipleSelectItemHeight,a=Zj(e),c=t?`${n}-${t}`:"",u=Qj(e);return{[`${n}-multiple${c}`]:Object.assign(Object.assign({},eB(e)),{[`${n}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:u.basePadding,paddingBlock:u.containerPadding,borderRadius:e.borderRadius,[`${n}-disabled&`]:{background:e.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${te(r)} 0`,lineHeight:te(o),visibility:"hidden",content:'"\\a0"'}},[`${n}-selection-item`]:{height:u.itemHeight,lineHeight:te(u.itemLineHeight)},[`${n}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:te(o),marginBlock:r}},[`${n}-prefix`]:{marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(u.basePadding).equal()},[`${i}-item + ${i}-item,
235
+ ${n}-prefix + ${n}-selection-wrap
236
+ `]:{[`${n}-selection-search`]:{marginInlineStart:0},[`${n}-selection-placeholder`]:{insetInlineStart:0}},[`${i}-item-suffix`]:{minHeight:u.itemHeight,marginBlock:r},[`${n}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(a).equal(),"\n &-input,\n &-mirror\n ":{height:o,fontFamily:e.fontFamily,lineHeight:te(o),transition:`all ${e.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${n}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(u.basePadding).equal(),insetInlineEnd:e.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${e.motionDurationSlow}`}})}};function Ng(e,t){const{componentCls:n}=e,r=t?`${n}-${t}`:"",i={[`${n}-multiple${r}`]:{fontSize:e.fontSize,[`${n}-selector`]:{[`${n}-show-search&`]:{cursor:"text"}},[`
237
+ &${n}-show-arrow ${n}-selector,
238
+ &${n}-allow-clear ${n}-selector
239
+ `]:{paddingInlineEnd:e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()}}};return[tB(e,t),i]}const nB=e=>{const{componentCls:t}=e,n=tn(e,{selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),r=tn(e,{fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius});return[Ng(e),Ng(n,"sm"),{[`${t}-multiple${t}-sm`]:{[`${t}-selection-placeholder`]:{insetInline:e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()},[`${t}-selection-search`]:{marginInlineStart:2}}},Ng(r,"lg")]};function Mg(e,t){const{componentCls:n,inputPaddingHorizontalBase:r,borderRadius:i}=e,o=e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),a=t?`${n}-${t}`:"";return{[`${n}-single${a}`]:{fontSize:e.fontSize,height:e.controlHeight,[`${n}-selector`]:Object.assign(Object.assign({},Un(e,!0)),{display:"flex",borderRadius:i,flex:"1 1 auto",[`${n}-selection-wrap:after`]:{lineHeight:te(o)},[`${n}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[`
240
+ ${n}-selection-item,
241
+ ${n}-selection-placeholder
242
+ `]:{display:"block",padding:0,lineHeight:te(o),transition:`all ${e.motionDurationSlow}, visibility 0s`,alignSelf:"center"},[`${n}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${n}-selection-item:empty:after`,`${n}-selection-placeholder:empty:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
243
+ &${n}-show-arrow ${n}-selection-item,
244
+ &${n}-show-arrow ${n}-selection-search,
245
+ &${n}-show-arrow ${n}-selection-placeholder
246
+ `]:{paddingInlineEnd:e.showArrowPaddingInlineEnd},[`&${n}-open ${n}-selection-item`]:{color:e.colorTextPlaceholder},[`&:not(${n}-customize-input)`]:{[`${n}-selector`]:{width:"100%",height:"100%",alignItems:"center",padding:`0 ${te(r)}`,[`${n}-selection-search-input`]:{height:o,fontSize:e.fontSize},"&:after":{lineHeight:te(o)}}},[`&${n}-customize-input`]:{[`${n}-selector`]:{"&:after":{display:"none"},[`${n}-selection-search`]:{position:"static",width:"100%"},[`${n}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${te(r)}`,"&:after":{display:"none"}}}}}}}function rB(e){const{componentCls:t}=e,n=e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();return[Mg(e),Mg(tn(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),"sm"),{[`${t}-single${t}-sm`]:{[`&:not(${t}-customize-input)`]:{[`${t}-selector`]:{padding:`0 ${te(n)}`},[`&${t}-show-arrow ${t}-selection-search`]:{insetInlineEnd:e.calc(n).add(e.calc(e.fontSize).mul(1.5)).equal()},[`
247
+ &${t}-show-arrow ${t}-selection-item,
248
+ &${t}-show-arrow ${t}-selection-placeholder
249
+ `]:{paddingInlineEnd:e.calc(e.fontSize).mul(1.5).equal()}}}},Mg(tn(e,{controlHeight:e.singleItemHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}const iB=e=>{const{fontSize:t,lineHeight:n,lineWidth:r,controlHeight:i,controlHeightSM:o,controlHeightLG:a,paddingXXS:c,controlPaddingHorizontal:u,zIndexPopupBase:d,colorText:f,fontWeightStrong:m,controlItemBgActive:g,controlItemBgHover:v,colorBgContainer:y,colorFillSecondary:S,colorBgContainerDisabled:_,colorTextDisabled:C,colorPrimaryHover:E,colorPrimary:k,controlOutline:$}=e,P=c*2,T=r*2,O=Math.min(i-P,i-T),N=Math.min(o-P,o-T),I=Math.min(a-P,a-T);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(c/2),zIndexPopup:d+50,optionSelectedColor:f,optionSelectedFontWeight:m,optionSelectedBg:g,optionActiveBg:v,optionPadding:`${(i-t*n)/2}px ${u}px`,optionFontSize:t,optionLineHeight:n,optionHeight:i,selectorBg:y,clearBg:y,singleItemHeightLG:a,multipleItemBg:S,multipleItemBorderColor:"transparent",multipleItemHeight:O,multipleItemHeightSM:N,multipleItemHeightLG:I,multipleSelectorBgDisabled:_,multipleItemColorDisabled:C,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:E,activeBorderColor:k,activeOutlineColor:$,selectAffixPadding:c}},o$=(e,t)=>{const{componentCls:n,antCls:r,controlOutlineWidth:i}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{border:`${te(e.lineWidth)} ${e.lineType} ${t.borderColor}`,background:e.selectorBg},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:t.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:t.activeBorderColor,boxShadow:`0 0 0 ${te(i)} ${t.activeOutlineColor}`,outline:0},[`${n}-prefix`]:{color:t.color}}}},nw=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},o$(e,t))}),oB=e=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},o$(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),nw(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),nw(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${te(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),s$=(e,t)=>{const{componentCls:n,antCls:r}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{background:t.bg,border:`${te(e.lineWidth)} ${e.lineType} transparent`,color:t.color},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{background:t.hoverBg},[`${n}-focused& ${n}-selector`]:{background:e.selectorBg,borderColor:t.activeBorderColor,outline:0}}}},rw=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},s$(e,t))}),sB=e=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},s$(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,color:e.colorText})),rw(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,color:e.colorError})),rw(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{borderColor:e.colorBorder,background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.colorBgContainer,border:`${te(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}})}),aB=e=>({"&-borderless":{[`${e.componentCls}-selector`]:{background:"transparent",border:`${te(e.lineWidth)} ${e.lineType} transparent`},[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${te(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`},[`&${e.componentCls}-status-error`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorError}},[`&${e.componentCls}-status-warning`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorWarning}}}}),a$=(e,t)=>{const{componentCls:n,antCls:r}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{borderWidth:`${te(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,background:e.selectorBg,borderRadius:0},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:`transparent transparent ${t.hoverBorderHover} transparent`},[`${n}-focused& ${n}-selector`]:{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0},[`${n}-prefix`]:{color:t.color}}}},iw=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},a$(e,t))}),lB=e=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},a$(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),iw(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),iw(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${te(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),cB=e=>({[e.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},oB(e)),sB(e)),aB(e)),lB(e))}),uB=e=>{const{componentCls:t}=e;return{position:"relative",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,input:{cursor:"pointer"},[`${t}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${t}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},dB=e=>{const{componentCls:t}=e;return{[`${t}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},hB=e=>{const{antCls:t,componentCls:n,inputPaddingHorizontalBase:r,iconCls:i}=e,o={[`${n}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:"50%"}};return{[n]:Object.assign(Object.assign({},Un(e)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${n}-customize-input) ${n}-selector`]:Object.assign(Object.assign({},uB(e)),dB(e)),[`${n}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},xu),{[`> ${t}-typography`]:{display:"inline"}}),[`${n}-selection-placeholder`]:Object.assign(Object.assign({},xu),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}),[`${n}-arrow`]:Object.assign(Object.assign({},rc()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${e.motionDurationSlow} ease`,[i]:{verticalAlign:"top",transition:`transform ${e.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${n}-suffix)`]:{pointerEvents:"auto"}},[`${n}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${n}-selection-wrap`]:{display:"flex",width:"100%",position:"relative",minWidth:0,"&:after":{content:'"\\a0"',width:0,overflow:"hidden"}},[`${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()}}}}}},fB=e=>{const{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},hB(e),rB(e),nB(e),Jj(e),{[`${t}-rtl`]:{direction:"rtl"}},Qf(e,{borderElCls:`${t}-selector`,focusElCls:`${t}-focused`})]},mB=bn("Select",(e,{rootPrefixCls:t})=>{const n=tn(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[fB(n),cB(n)]},iB,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var pB={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"},gB=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:pB}))},l$=h.forwardRef(gB),vB={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"},yB=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:vB}))},hs=h.forwardRef(yB),bB={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"},_B=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:bB}))},SB=h.forwardRef(_B);function CB({suffixIcon:e,clearIcon:t,menuItemSelectedIcon:n,removeIcon:r,loading:i,multiple:o,hasFeedback:a,prefixCls:c,showSuffixIcon:u,feedbackIcon:d,showArrow:f,componentName:m}){const g=t??h.createElement(Hf,null),v=C=>e===null&&!a&&!f?null:h.createElement(h.Fragment,null,u!==!1&&C,a&&d);let y=null;if(e!==void 0)y=v(e);else if(i)y=v(h.createElement(Du,{spin:!0}));else{const C=`${c}-suffix`;y=({open:E,showSearch:k})=>v(E&&k?h.createElement(SB,{className:C}):h.createElement(hs,{className:C}))}let S=null;n!==void 0?S=n:o?S=h.createElement(l$,null):S=null;let _=null;return r!==void 0?_=r:_=h.createElement(ta,null),{clearIcon:g,suffixIcon:y,itemIcon:S,removeIcon:_}}function wB(e){return J.useMemo(()=>{if(e)return(...t)=>J.createElement(Gu,{space:!0},e.apply(void 0,t))},[e])}function xB(e,t){return t!==void 0?t:e!==null}var EB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const c$="SECRET_COMBOBOX_MODE_DO_NOT_USE",kB=(e,t)=>{var n,r,i,o,a;const{prefixCls:c,bordered:u,className:d,rootClassName:f,getPopupContainer:m,popupClassName:g,dropdownClassName:v,listHeight:y=256,placement:S,listItemHeight:_,size:C,disabled:E,notFoundContent:k,status:$,builtinPlacements:P,dropdownMatchSelectWidth:T,popupMatchSelectWidth:O,direction:N,style:I,allowClear:z,variant:L,dropdownStyle:M,transitionName:j,tagRender:B,maxCount:H,prefix:W,dropdownRender:V,popupRender:A,onDropdownVisibleChange:G,onOpenChange:q,styles:D,classNames:U}=e,Y=EB(e,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix","dropdownRender","popupRender","onDropdownVisibleChange","onOpenChange","styles","classNames"]),{getPopupContainer:Z,getPrefixCls:ee,renderEmpty:re,direction:he,virtual:fe,popupMatchSelectWidth:ue,popupOverflow:Se}=h.useContext(Ot),{showSearch:ae,style:le,styles:ce,className:ye,classNames:me}=Gr("select"),[,de]=gi(),be=_??(de==null?void 0:de.controlHeight),we=ee("select",c),Te=ee(),ze=N??he,{compactSize:Ee,compactItemClassnames:ke}=Wu(we,ze),[je,Oe]=i$("select",L,u),Qe=Io(we),[at,$t,pt]=mB(we,Qe),Je=h.useMemo(()=>{const{mode:Ae}=e;if(Ae!=="combobox")return Ae===c$?"combobox":Ae},[e.mode]),ft=Je==="multiple"||Je==="tags",Xe=xB(e.suffixIcon,e.showArrow),yt=(n=O??T)!==null&&n!==void 0?n:ue,tt=((r=D==null?void 0:D.popup)===null||r===void 0?void 0:r.root)||((i=ce.popup)===null||i===void 0?void 0:i.root)||M,Le=wB(A||V),rt=q||G,{status:Me,hasFeedback:qe,isFormItemInput:It,feedbackIcon:St}=h.useContext(ku),nn=e$(Me,$);let Jt;k!==void 0?Jt=k:Je==="combobox"?Jt=null:Jt=(re==null?void 0:re("Select"))||h.createElement(r$,{componentName:"Select"});const{suffixIcon:_n,itemIcon:In,removeIcon:on,clearIcon:Ht}=CB(Object.assign(Object.assign({},Y),{multiple:ft,hasFeedback:qe,feedbackIcon:St,showSuffixIcon:Xe,prefixCls:we,componentName:"Select"})),Rt=z===!0?{clearIcon:Ht}:z,sn=fr(Y,["suffixIcon","itemIcon"]),Xt=ne(((o=U==null?void 0:U.popup)===null||o===void 0?void 0:o.root)||((a=me==null?void 0:me.popup)===null||a===void 0?void 0:a.root)||g||v,{[`${we}-dropdown-${ze}`]:ze==="rtl"},f,me.root,U==null?void 0:U.root,pt,Qe,$t),ot=Zo(Ae=>{var et;return(et=C??Ee)!==null&&et!==void 0?et:Ae}),Et=h.useContext(Zs),mt=E??Et,Ie=ne({[`${we}-lg`]:ot==="large",[`${we}-sm`]:ot==="small",[`${we}-rtl`]:ze==="rtl",[`${we}-${je}`]:Oe,[`${we}-in-form-item`]:It},Zk(we,nn,qe),ke,ye,d,me.root,U==null?void 0:U.root,f,pt,Qe,$t),$e=h.useMemo(()=>S!==void 0?S:ze==="rtl"?"bottomRight":"bottomLeft",[S,ze]),[xe]=oc("SelectLike",tt==null?void 0:tt.zIndex);return at(h.createElement(Fy,Object.assign({ref:t,virtual:fe,showSearch:ae},sn,{style:Object.assign(Object.assign(Object.assign(Object.assign({},ce.root),D==null?void 0:D.root),le),I),dropdownMatchSelectWidth:yt,transitionName:Ko(Te,"slide-up",j),builtinPlacements:Yj(P,Se),listHeight:y,listItemHeight:be,mode:Je,prefixCls:we,placement:$e,direction:ze,prefix:W,suffixIcon:_n,menuItemSelectedIcon:In,removeIcon:on,allowClear:Rt,notFoundContent:Jt,className:Ie,getPopupContainer:m||Z,dropdownClassName:Xt,disabled:mt,dropdownStyle:Object.assign(Object.assign({},tt),{zIndex:xe}),maxCount:ft?H:void 0,tagRender:ft?B:void 0,dropdownRender:Le,onDropdownVisibleChange:rt})))},Fa=h.forwardRef(kB),$B=Ak(Fa,"dropdownAlign");Fa.SECRET_COMBOBOX_MODE_DO_NOT_USE=c$;Fa.Option=Hy;Fa.OptGroup=Dy;Fa._InternalPanelDoNotUseOrYouWillBeFired=$B;const u$=(e,t)=>{typeof(e==null?void 0:e.addEventListener)<"u"?e.addEventListener("change",t):typeof(e==null?void 0:e.addListener)<"u"&&e.addListener(t)},d$=(e,t)=>{typeof(e==null?void 0:e.removeEventListener)<"u"?e.removeEventListener("change",t):typeof(e==null?void 0:e.removeListener)<"u"&&e.removeListener(t)},Ia=["xxl","xl","lg","md","sm","xs"],RB=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)`}),TB=e=>{const t=e,n=[].concat(Ia).reverse();return n.forEach((r,i)=>{const o=r.toUpperCase(),a=`screen${o}Min`,c=`screen${o}`;if(!(t[a]<=t[c]))throw new Error(`${a}<=${c} fails : !(${t[a]}<=${t[c]})`);if(i<n.length-1){const u=`screen${o}Max`;if(!(t[c]<=t[u]))throw new Error(`${c}<=${u} fails : !(${t[c]}<=${t[u]})`);const f=`screen${n[i+1].toUpperCase()}Min`;if(!(t[u]<=t[f]))throw new Error(`${u}<=${f} fails : !(${t[u]}<=${t[f]})`)}}),e},PB=()=>{const[,e]=gi(),t=RB(TB(e));return J.useMemo(()=>{const n=new Map;let r=-1,i={};return{responsiveMap:t,matchHandlers:{},dispatch(o){return i=o,n.forEach(a=>a(i)),n.size>=1},subscribe(o){return n.size||this.register(),r+=1,n.set(r,o),o(i),r},unsubscribe(o){n.delete(o),n.size||this.unregister()},register(){Object.entries(t).forEach(([o,a])=>{const c=({matches:d})=>{this.dispatch(Object.assign(Object.assign({},i),{[o]:d}))},u=window.matchMedia(a);u$(u,c),this.matchHandlers[a]={mql:u,listener:c},c(u)})},unregister(){Object.values(t).forEach(o=>{const a=this.matchHandlers[o];d$(a==null?void 0:a.mql,a==null?void 0:a.listener)}),n.clear()}}},[t])};function Wy(e=!0,t={}){const n=h.useRef(t),[,r]=zI(),i=PB();return fn(()=>{const o=i.subscribe(a=>{n.current=a,e&&r()});return()=>i.unsubscribe(o)},[]),n.current}const uf=e=>e?typeof e=="function"?e():e:null;function Vy(e){var t=e.children,n=e.prefixCls,r=e.id,i=e.overlayInnerStyle,o=e.bodyClassName,a=e.className,c=e.style;return h.createElement("div",{className:ne("".concat(n,"-content"),a),style:c},h.createElement("div",{className:ne("".concat(n,"-inner"),o),id:r,role:"tooltip",style:i},typeof t=="function"?t():t))}var wl={shiftX:64,adjustY:1},xl={adjustX:1,shiftY:!0},ro=[0,0],OB={left:{points:["cr","cl"],overflow:xl,offset:[-4,0],targetOffset:ro},right:{points:["cl","cr"],overflow:xl,offset:[4,0],targetOffset:ro},top:{points:["bc","tc"],overflow:wl,offset:[0,-4],targetOffset:ro},bottom:{points:["tc","bc"],overflow:wl,offset:[0,4],targetOffset:ro},topLeft:{points:["bl","tl"],overflow:wl,offset:[0,-4],targetOffset:ro},leftTop:{points:["tr","tl"],overflow:xl,offset:[-4,0],targetOffset:ro},topRight:{points:["br","tr"],overflow:wl,offset:[0,-4],targetOffset:ro},rightTop:{points:["tl","tr"],overflow:xl,offset:[4,0],targetOffset:ro},bottomRight:{points:["tr","br"],overflow:wl,offset:[0,4],targetOffset:ro},rightBottom:{points:["bl","br"],overflow:xl,offset:[4,0],targetOffset:ro},bottomLeft:{points:["tl","bl"],overflow:wl,offset:[0,4],targetOffset:ro},leftBottom:{points:["br","bl"],overflow:xl,offset:[-4,0],targetOffset:ro}},IB=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],NB=function(t,n){var r=t.overlayClassName,i=t.trigger,o=i===void 0?["hover"]:i,a=t.mouseEnterDelay,c=a===void 0?0:a,u=t.mouseLeaveDelay,d=u===void 0?.1:u,f=t.overlayStyle,m=t.prefixCls,g=m===void 0?"rc-tooltip":m,v=t.children,y=t.onVisibleChange,S=t.afterVisibleChange,_=t.transitionName,C=t.animation,E=t.motion,k=t.placement,$=k===void 0?"right":k,P=t.align,T=P===void 0?{}:P,O=t.destroyTooltipOnHide,N=O===void 0?!1:O,I=t.defaultVisible,z=t.getTooltipContainer,L=t.overlayInnerStyle;t.arrowContent;var M=t.overlay,j=t.id,B=t.showArrow,H=B===void 0?!0:B,W=t.classNames,V=t.styles,A=Lt(t,IB),G=em(j),q=h.useRef(null);h.useImperativeHandle(n,function(){return q.current});var D=X({},A);"visible"in t&&(D.popupVisible=t.visible);var U=function(){return h.createElement(Vy,{key:"content",prefixCls:g,id:G,bodyClassName:W==null?void 0:W.body,overlayInnerStyle:X(X({},L),V==null?void 0:V.body)},M)},Y=function(){var ee=h.Children.only(v),re=(ee==null?void 0:ee.props)||{},he=X(X({},re),{},{"aria-describedby":M?G:null});return h.cloneElement(v,he)};return h.createElement(im,Re({popupClassName:ne(r,W==null?void 0:W.root),prefixCls:g,popup:U,action:o,builtinPlacements:OB,popupPlacement:$,ref:q,popupAlign:T,getPopupContainer:z,onPopupVisibleChange:y,afterPopupVisibleChange:S,popupTransitionName:_,popupAnimation:C,popupMotion:E,defaultPopupVisible:I,autoDestroy:N,mouseLeaveDelay:d,popupStyle:X(X({},f),V==null?void 0:V.root),mouseEnterDelay:c,arrow:H},D),Y())};const MB=h.forwardRef(NB);function Uy(e){const{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,i=t/2,o=0,a=i,c=r*1/Math.sqrt(2),u=i-r*(1-1/Math.sqrt(2)),d=i-n*(1/Math.sqrt(2)),f=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),m=2*i-d,g=f,v=2*i-c,y=u,S=2*i-o,_=a,C=i*Math.sqrt(2)+r*(Math.sqrt(2)-2),E=r*(Math.sqrt(2)-1),k=`polygon(${E}px 100%, 50% ${E}px, ${2*i-E}px 100%, ${E}px 100%)`,$=`path('M ${o} ${a} A ${r} ${r} 0 0 0 ${c} ${u} L ${d} ${f} A ${n} ${n} 0 0 1 ${m} ${g} L ${v} ${y} A ${r} ${r} 0 0 0 ${S} ${_} Z')`;return{arrowShadowWidth:C,arrowPath:$,arrowPolygon:k}}const zB=(e,t,n)=>{const{sizePopupArrow:r,arrowPolygon:i,arrowPath:o,arrowShadowWidth:a,borderRadiusXS:c,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_:!0,value:[i,o]},content:'""'},"&::after":{content:'""',position:"absolute",width:a,height:a,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${te(c)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}},h$=8;function om(e){const{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?h$:r}}function dh(e,t){return e?t:{}}function qy(e,t,n){const{componentCls:r,boxShadowPopoverArrow:i,arrowOffsetVertical:o,arrowOffsetHorizontal:a}=e,{arrowDistance:c=0,arrowPlacement:u={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[r]:Object.assign(Object.assign(Object.assign(Object.assign({[`${r}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},zB(e,t,i)),{"&:before":{background:t}})]},dh(!!u.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(",")]:{bottom:c,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${te(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),dh(!!u.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(",")]:{top:c,transform:"translateY(-100%)"},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${te(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),dh(!!u.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(",")]:{right:{_skip_check_:!0,value:c},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${r}-arrow`]:{top:o},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:o}})),dh(!!u.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(",")]:{left:{_skip_check_:!0,value:c},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${r}-arrow`]:{top:o},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:o}}))}}function jB(e,t,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};const i=r&&typeof r=="object"?r:{},o={};switch(e){case"top":case"bottom":o.shiftX=t.arrowOffsetHorizontal*2+n,o.shiftY=!0,o.adjustY=!0;break;case"left":case"right":o.shiftY=t.arrowOffsetVertical*2+n,o.shiftX=!0,o.adjustX=!0;break}const a=Object.assign(Object.assign({},o),i);return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}const ow={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"]}},BB={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"]}},LB=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function f$(e){const{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:i,borderRadius:o,visibleFirst:a}=e,c=t/2,u={},d=om({contentRadius:o,limitVerticalRadius:!0});return Object.keys(ow).forEach(f=>{const m=r&&BB[f]||ow[f],g=Object.assign(Object.assign({},m),{offset:[0,0],dynamicInset:!0});switch(u[f]=g,LB.has(f)&&(g.autoArrow=!1),f){case"top":case"topLeft":case"topRight":g.offset[1]=-c-i;break;case"bottom":case"bottomLeft":case"bottomRight":g.offset[1]=c+i;break;case"left":case"leftTop":case"leftBottom":g.offset[0]=-c-i;break;case"right":case"rightTop":case"rightBottom":g.offset[0]=c+i;break}if(r)switch(f){case"topLeft":case"bottomLeft":g.offset[0]=-d.arrowOffsetHorizontal-c;break;case"topRight":case"bottomRight":g.offset[0]=d.arrowOffsetHorizontal+c;break;case"leftTop":case"rightTop":g.offset[1]=-d.arrowOffsetHorizontal*2+c;break;case"leftBottom":case"rightBottom":g.offset[1]=d.arrowOffsetHorizontal*2-c;break}g.overflow=jB(f,d,t,n),a&&(g.htmlRegion="visibleFirst")}),u}const AB=e=>{const{calc:t,componentCls:n,tooltipMaxWidth:r,tooltipColor:i,tooltipBg:o,tooltipBorderRadius:a,zIndexPopup:c,controlHeight:u,boxShadowSecondary:d,paddingSM:f,paddingXS:m,arrowOffsetHorizontal:g,sizePopupArrow:v}=e,y=t(a).add(v).add(g).equal(),S=t(a).mul(2).add(v).equal();return[{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},Un(e)),{position:"absolute",zIndex:c,display:"block",width:"max-content",maxWidth:r,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":o,[`${n}-inner`]:{minWidth:S,minHeight:u,padding:`${te(e.calc(f).div(2).equal())} ${te(m)}`,color:`var(--ant-tooltip-color, ${i})`,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:o,borderRadius:a,boxShadow:d,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:y},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:e.min(a,h$)}},[`${n}-content`]:{position:"relative"}}),Df(e,(_,{darkColor:C})=>({[`&${n}-${_}`]:{[`${n}-inner`]:{backgroundColor:C},[`${n}-arrow`]:{"--antd-arrow-background-color":C}}}))),{"&-rtl":{direction:"rtl"}})},qy(e,"var(--antd-arrow-background-color)"),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},DB=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},om({contentRadius:e.borderRadius,limitVerticalRadius:!0})),Uy(tn(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),m$=(e,t=!0)=>bn("Tooltip",r=>{const{borderRadius:i,colorTextLightSolid:o,colorBgSpotlight:a}=r,c=tn(r,{tooltipMaxWidth:250,tooltipColor:o,tooltipBorderRadius:i,tooltipBg:a});return[AB(c),Vu(r,"zoom-big-fast")]},DB,{resetStyle:!1,injectStyle:t})(e),HB=ea.map(e=>`${e}-inverse`),FB=["success","processing","error","default","warning"];function sm(e,t=!0){return t?[].concat(We(HB),We(ea)).includes(e):ea.includes(e)}function WB(e){return FB.includes(e)}function p$(e,t){const n=sm(t),r=ne({[`${e}-${t}`]:t&&n}),i={},o={},a=P6(t).toRgb(),u=(.299*a.r+.587*a.g+.114*a.b)/255<.5?"#FFF":"#000";return t&&!n&&(i.background=t,i["--ant-tooltip-color"]=u,o["--antd-arrow-background-color"]=t),{className:r,overlayStyle:i,arrowStyle:o}}const VB=e=>{const{prefixCls:t,className:n,placement:r="top",title:i,color:o,overlayInnerStyle:a}=e,{getPrefixCls:c}=h.useContext(Ot),u=c("tooltip",t),[d,f,m]=m$(u),g=p$(u,o),v=g.arrowStyle,y=Object.assign(Object.assign({},a),g.overlayStyle),S=ne(f,m,u,`${u}-pure`,`${u}-placement-${r}`,n,g.className);return d(h.createElement("div",{className:S,style:v},h.createElement("div",{className:`${u}-arrow`}),h.createElement(Vy,Object.assign({},e,{className:f,prefixCls:u,overlayInnerStyle:y}),i)))};var UB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const qB=h.forwardRef((e,t)=>{var n,r;const{prefixCls:i,openClassName:o,getTooltipContainer:a,color:c,overlayInnerStyle:u,children:d,afterOpenChange:f,afterVisibleChange:m,destroyTooltipOnHide:g,destroyOnHidden:v,arrow:y=!0,title:S,overlay:_,builtinPlacements:C,arrowPointAtCenter:E=!1,autoAdjustOverflow:k=!0,motion:$,getPopupContainer:P,placement:T="top",mouseEnterDelay:O=.1,mouseLeaveDelay:N=.1,overlayStyle:I,rootClassName:z,overlayClassName:L,styles:M,classNames:j}=e,B=UB(e,["prefixCls","openClassName","getTooltipContainer","color","overlayInnerStyle","children","afterOpenChange","afterVisibleChange","destroyTooltipOnHide","destroyOnHidden","arrow","title","overlay","builtinPlacements","arrowPointAtCenter","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),H=!!y,[,W]=gi(),{getPopupContainer:V,getPrefixCls:A,direction:G,className:q,style:D,classNames:U,styles:Y}=Gr("tooltip"),Z=Lf(),ee=h.useRef(null),re=()=>{var Xe;(Xe=ee.current)===null||Xe===void 0||Xe.forceAlign()};h.useImperativeHandle(t,()=>{var Xe,yt;return{forceAlign:re,forcePopupAlign:()=>{Z.deprecated(!1,"forcePopupAlign","forceAlign"),re()},nativeElement:(Xe=ee.current)===null||Xe===void 0?void 0:Xe.nativeElement,popupElement:(yt=ee.current)===null||yt===void 0?void 0:yt.popupElement}});const[he,fe]=tr(!1,{value:(n=e.open)!==null&&n!==void 0?n:e.visible,defaultValue:(r=e.defaultOpen)!==null&&r!==void 0?r:e.defaultVisible}),ue=!S&&!_&&S!==0,Se=Xe=>{var yt,tt;fe(ue?!1:Xe),ue||((yt=e.onOpenChange)===null||yt===void 0||yt.call(e,Xe),(tt=e.onVisibleChange)===null||tt===void 0||tt.call(e,Xe))},ae=h.useMemo(()=>{var Xe,yt;let tt=E;return typeof y=="object"&&(tt=(yt=(Xe=y.pointAtCenter)!==null&&Xe!==void 0?Xe:y.arrowPointAtCenter)!==null&&yt!==void 0?yt:E),C||f$({arrowPointAtCenter:tt,autoAdjustOverflow:k,arrowWidth:H?W.sizePopupArrow:0,borderRadius:W.borderRadius,offset:W.marginXXS,visibleFirst:!0})},[E,y,C,W]),le=h.useMemo(()=>S===0?S:_||S||"",[_,S]),ce=h.createElement(Gu,{space:!0},typeof le=="function"?le():le),ye=A("tooltip",i),me=A(),de=e["data-popover-inject"];let be=he;!("open"in e)&&!("visible"in e)&&ue&&(be=!1);const we=h.isValidElement(d)&&!DE(d)?d:h.createElement("span",null,d),Te=we.props,ze=!Te.className||typeof Te.className=="string"?ne(Te.className,o||`${ye}-open`):Te.className,[Ee,ke,je]=m$(ye,!de),Oe=p$(ye,c),Qe=Oe.arrowStyle,at=ne(L,{[`${ye}-rtl`]:G==="rtl"},Oe.className,z,ke,je,q,U.root,j==null?void 0:j.root),$t=ne(U.body,j==null?void 0:j.body),[pt,Je]=oc("Tooltip",B.zIndex),ft=h.createElement(MB,Object.assign({},B,{zIndex:pt,showArrow:H,placement:T,mouseEnterDelay:O,mouseLeaveDelay:N,prefixCls:ye,classNames:{root:at,body:$t},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Qe),Y.root),D),I),M==null?void 0:M.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},Y.body),u),M==null?void 0:M.body),Oe.overlayStyle)},getTooltipContainer:P||a||V,ref:ee,builtinPlacements:ae,overlay:ce,visible:be,onVisibleChange:Se,afterVisibleChange:f??m,arrowContent:h.createElement("span",{className:`${ye}-arrow-content`}),motion:{motionName:Ko(me,"zoom-big-fast",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:v??!!g}),be?pi(we,{className:ze}):we);return Ee(h.createElement(Hu.Provider,{value:Je},ft))}),Xo=qB;Xo._InternalPanelDoNotUseOrYouWillBeFired=VB;const KB=e=>{const{componentCls:t,popoverColor:n,titleMinWidth:r,fontWeightStrong:i,innerPadding:o,boxShadowSecondary:a,colorTextHeading:c,borderRadiusLG:u,zIndexPopup:d,titleMarginBottom:f,colorBgElevated:m,popoverBg:g,titleBorderBottom:v,innerContentPadding:y,titlePadding:S}=e;return[{[t]:Object.assign(Object.assign({},Un(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:d,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"--antd-arrow-background-color":m,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:g,backgroundClip:"padding-box",borderRadius:u,boxShadow:a,padding:o},[`${t}-title`]:{minWidth:r,marginBottom:f,color:c,fontWeight:i,borderBottom:v,padding:S},[`${t}-inner-content`]:{color:n,padding:y}})},qy(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]},GB=e=>{const{componentCls:t}=e;return{[t]:ea.map(n=>{const r=e[`${n}6`];return{[`&${t}-${n}`]:{"--antd-arrow-background-color":r,[`${t}-inner`]:{backgroundColor:r},[`${t}-arrow`]:{background:"transparent"}}}})}},XB=e=>{const{lineWidth:t,controlHeight:n,fontHeight:r,padding:i,wireframe:o,zIndexPopupBase:a,borderRadiusLG:c,marginXS:u,lineType:d,colorSplit:f,paddingSM:m}=e,g=n-r,v=g/2,y=g/2-t,S=i;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:a+30},Uy(e)),om({contentRadius:c,limitVerticalRadius:!0})),{innerPadding:o?0:12,titleMarginBottom:o?0:u,titlePadding:o?`${v}px ${S}px ${y}px`:0,titleBorderBottom:o?`${t}px ${d} ${f}`:"none",innerContentPadding:o?`${m}px ${S}px`:0})},g$=bn("Popover",e=>{const{colorBgElevated:t,colorText:n}=e,r=tn(e,{popoverBg:t,popoverColor:n});return[KB(r),GB(r),Vu(r,"zoom-big")]},XB,{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var YB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const v$=({title:e,content:t,prefixCls:n})=>!e&&!t?null:h.createElement(h.Fragment,null,e&&h.createElement("div",{className:`${n}-title`},e),t&&h.createElement("div",{className:`${n}-inner-content`},t)),JB=e=>{const{hashId:t,prefixCls:n,className:r,style:i,placement:o="top",title:a,content:c,children:u}=e,d=uf(a),f=uf(c),m=ne(t,n,`${n}-pure`,`${n}-placement-${o}`,r);return h.createElement("div",{className:m,style:i},h.createElement("div",{className:`${n}-arrow`}),h.createElement(Vy,Object.assign({},e,{className:t,prefixCls:n}),u||h.createElement(v$,{prefixCls:n,title:d,content:f})))},QB=e=>{const{prefixCls:t,className:n}=e,r=YB(e,["prefixCls","className"]),{getPrefixCls:i}=h.useContext(Ot),o=i("popover",t),[a,c,u]=g$(o);return a(h.createElement(JB,Object.assign({},r,{prefixCls:o,hashId:c,className:ne(n,u)})))};var ZB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const eL=h.forwardRef((e,t)=>{var n,r;const{prefixCls:i,title:o,content:a,overlayClassName:c,placement:u="top",trigger:d="hover",children:f,mouseEnterDelay:m=.1,mouseLeaveDelay:g=.1,onOpenChange:v,overlayStyle:y={},styles:S,classNames:_}=e,C=ZB(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:E,className:k,style:$,classNames:P,styles:T}=Gr("popover"),O=E("popover",i),[N,I,z]=g$(O),L=E(),M=ne(c,I,z,k,P.root,_==null?void 0:_.root),j=ne(P.body,_==null?void 0:_.body),[B,H]=tr(!1,{value:(n=e.open)!==null&&n!==void 0?n:e.visible,defaultValue:(r=e.defaultOpen)!==null&&r!==void 0?r:e.defaultVisible}),W=(D,U)=>{H(D,!0),v==null||v(D,U)},V=D=>{D.keyCode===Ge.ESC&&W(!1,D)},A=D=>{W(D)},G=uf(o),q=uf(a);return N(h.createElement(Xo,Object.assign({placement:u,trigger:d,mouseEnterDelay:m,mouseLeaveDelay:g},C,{prefixCls:O,classNames:{root:M,body:j},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},T.root),$),y),S==null?void 0:S.root),body:Object.assign(Object.assign({},T.body),S==null?void 0:S.body)},ref:t,open:B,onOpenChange:A,overlay:G||q?h.createElement(v$,{prefixCls:O,title:G,content:q}):null,transitionName:Ko(L,"zoom-big",C.transitionName),"data-popover-inject":!0}),pi(f,{onKeyDown:D=>{var U,Y;h.isValidElement(f)&&((Y=f==null?void 0:(U=f.props).onKeyDown)===null||Y===void 0||Y.call(U,D)),V(D)}})))}),c0=eL;c0._InternalPanelDoNotUseOrYouWillBeFired=QB;const tL=new Yt("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),nL=new Yt("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),rL=new Yt("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),iL=new Yt("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),oL=new Yt("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),sL=new Yt("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),aL=e=>{const{componentCls:t,iconCls:n,antCls:r,badgeShadowSize:i,textFontSize:o,textFontSizeSM:a,statusSize:c,dotSize:u,textFontWeight:d,indicatorHeight:f,indicatorHeightSM:m,marginXS:g,calc:v}=e,y=`${r}-scroll-number`,S=Df(e,(_,{darkColor:C})=>({[`&${t} ${t}-color-${_}`]:{background:C,[`&:not(${t}-count)`]:{color:C},"a:hover &":{background:C}}}));return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},Un(e)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${t}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:e.indicatorZIndex,minWidth:f,height:f,color:e.badgeTextColor,fontWeight:d,fontSize:o,lineHeight:te(f),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:v(f).div(2).equal(),boxShadow:`0 0 0 ${te(i)} ${e.badgeShadowColor}`,transition:`background ${e.motionDurationMid}`,a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},[`${t}-count-sm`]:{minWidth:m,height:m,fontSize:a,lineHeight:te(m),borderRadius:v(m).div(2).equal()},[`${t}-multiple-words`]:{padding:`0 ${te(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 ${te(i)} ${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:sL,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${t}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${t}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:c,height:c,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:i,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:tL,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:nL,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`${t}-zoom-leave`]:{animationName:rL,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:iL,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:oL,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:f,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${y}-only-unit`]:{height:f,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%)"}}})}},y$=e=>{const{fontHeight:t,lineWidth:n,marginXS:r,colorBorderBg:i}=e,o=t,a=n,c=e.colorTextLightSolid,u=e.colorError,d=e.colorErrorHover;return tn(e,{badgeFontHeight:o,badgeShadowSize:a,badgeTextColor:c,badgeColor:u,badgeColorHover:d,badgeShadowColor:i,badgeProcessingDuration:"1.2s",badgeRibbonOffset:r,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},b$=e=>{const{fontSize:t,lineHeight:n,fontSizeSM:r,lineWidth:i}=e;return{indicatorZIndex:"auto",indicatorHeight:Math.round(t*n)-2*i,indicatorHeightSM:t,dotSize:r/2,textFontSize:r,textFontSizeSM:r,textFontWeight:"normal",statusSize:r/2}},lL=bn("Badge",e=>{const t=y$(e);return aL(t)},b$),cL=e=>{const{antCls:t,badgeFontHeight:n,marginXS:r,badgeRibbonOffset:i,calc:o}=e,a=`${t}-ribbon`,c=`${t}-ribbon-wrapper`,u=Df(e,(d,{darkColor:f})=>({[`&${a}-color-${d}`]:{background:f,color:f}}));return{[c]:{position:"relative"},[a]:Object.assign(Object.assign(Object.assign(Object.assign({},Un(e)),{position:"absolute",top:r,padding:`0 ${te(e.paddingXS)}`,color:e.colorPrimary,lineHeight:te(n),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,[`${a}-text`]:{color:e.badgeTextColor},[`${a}-corner`]:{position:"absolute",top:"100%",width:i,height:i,color:"currentcolor",border:`${te(o(i).div(2).equal())} solid`,transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}}),u),{[`&${a}-placement-end`]:{insetInlineEnd:o(i).mul(-1).equal(),borderEndEndRadius:0,[`${a}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${a}-placement-start`]:{insetInlineStart:o(i).mul(-1).equal(),borderEndStartRadius:0,[`${a}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},uL=bn(["Badge","Ribbon"],e=>{const t=y$(e);return cL(t)},b$),dL=e=>{const{className:t,prefixCls:n,style:r,color:i,children:o,text:a,placement:c="end",rootClassName:u}=e,{getPrefixCls:d,direction:f}=h.useContext(Ot),m=d("ribbon",n),g=`${m}-wrapper`,[v,y,S]=uL(m,g),_=sm(i,!1),C=ne(m,`${m}-placement-${c}`,{[`${m}-rtl`]:f==="rtl",[`${m}-color-${i}`]:_},t),E={},k={};return i&&!_&&(E.background=i,k.color=i),v(h.createElement("div",{className:ne(g,u,y,S)},o,h.createElement("div",{className:ne(C,y),style:Object.assign(Object.assign({},E),r)},h.createElement("span",{className:`${m}-text`},a),h.createElement("div",{className:`${m}-corner`,style:k}))))},sw=e=>{const{prefixCls:t,value:n,current:r,offset:i=0}=e;let o;return i&&(o={position:"absolute",top:`${i}00%`,left:0}),h.createElement("span",{style:o,className:ne(`${t}-only-unit`,{current:r})},n)};function hL(e,t,n){let r=e,i=0;for(;(r+10)%10!==t;)r+=n,i+=n;return i}const fL=e=>{const{prefixCls:t,count:n,value:r}=e,i=Number(r),o=Math.abs(n),[a,c]=h.useState(i),[u,d]=h.useState(o),f=()=>{c(i),d(o)};h.useEffect(()=>{const v=setTimeout(f,1e3);return()=>clearTimeout(v)},[i]);let m,g;if(a===i||Number.isNaN(i)||Number.isNaN(a))m=[h.createElement(sw,Object.assign({},e,{key:i,current:!0}))],g={transition:"none"};else{m=[];const v=i+10,y=[];for(let E=i;E<=v;E+=1)y.push(E);const S=u<o?1:-1,_=y.findIndex(E=>E%10===a);m=(S<0?y.slice(0,_+1):y.slice(_)).map((E,k)=>{const $=E%10;return h.createElement(sw,Object.assign({},e,{key:E,value:$,offset:S<0?k-_:k,current:k===_}))}),g={transform:`translateY(${-hL(a,i,S)}00%)`}}return h.createElement("span",{className:`${t}-only`,style:g,onTransitionEnd:f},m)};var mL=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const pL=h.forwardRef((e,t)=>{const{prefixCls:n,count:r,className:i,motionClassName:o,style:a,title:c,show:u,component:d="sup",children:f}=e,m=mL(e,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:g}=h.useContext(Ot),v=g("scroll-number",n),y=Object.assign(Object.assign({},m),{"data-show":u,style:a,className:ne(v,i,o),title:c});let S=r;if(r&&Number(r)%1===0){const _=String(r).split("");S=h.createElement("bdi",null,_.map((C,E)=>h.createElement(fL,{prefixCls:v,count:Number(r),value:C,key:_.length-E})))}return a!=null&&a.borderColor&&(y.style=Object.assign(Object.assign({},a),{boxShadow:`0 0 0 1px ${a.borderColor} inset`})),f?pi(f,_=>({className:ne(`${v}-custom-component`,_==null?void 0:_.className,o)})):h.createElement(d,Object.assign({},y,{ref:t}),S)});var gL=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const vL=h.forwardRef((e,t)=>{var n,r,i,o,a;const{prefixCls:c,scrollNumberPrefixCls:u,children:d,status:f,text:m,color:g,count:v=null,overflowCount:y=99,dot:S=!1,size:_="default",title:C,offset:E,style:k,className:$,rootClassName:P,classNames:T,styles:O,showZero:N=!1}=e,I=gL(e,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:z,direction:L,badge:M}=h.useContext(Ot),j=z("badge",c),[B,H,W]=lL(j),V=v>y?`${y}+`:v,A=V==="0"||V===0||m==="0"||m===0,G=v===null||A&&!N,q=(f!=null||g!=null)&&G,D=f!=null||!A,U=S&&!A,Y=U?"":V,Z=h.useMemo(()=>((Y==null||Y==="")&&(m==null||m==="")||A&&!N)&&!U,[Y,A,N,U,m]),ee=h.useRef(v);Z||(ee.current=v);const re=ee.current,he=h.useRef(Y);Z||(he.current=Y);const fe=he.current,ue=h.useRef(U);Z||(ue.current=U);const Se=h.useMemo(()=>{if(!E)return Object.assign(Object.assign({},M==null?void 0:M.style),k);const Te={marginTop:E[1]};return L==="rtl"?Te.left=Number.parseInt(E[0],10):Te.right=-Number.parseInt(E[0],10),Object.assign(Object.assign(Object.assign({},Te),M==null?void 0:M.style),k)},[L,E,k,M==null?void 0:M.style]),ae=C??(typeof re=="string"||typeof re=="number"?re:void 0),le=!Z&&(m===0?N:!!m&&m!==!0),ce=le?h.createElement("span",{className:`${j}-status-text`},m):null,ye=!re||typeof re!="object"?void 0:pi(re,Te=>({style:Object.assign(Object.assign({},Se),Te.style)})),me=sm(g,!1),de=ne(T==null?void 0:T.indicator,(n=M==null?void 0:M.classNames)===null||n===void 0?void 0:n.indicator,{[`${j}-status-dot`]:q,[`${j}-status-${f}`]:!!f,[`${j}-color-${g}`]:me}),be={};g&&!me&&(be.color=g,be.background=g);const we=ne(j,{[`${j}-status`]:q,[`${j}-not-a-wrapper`]:!d,[`${j}-rtl`]:L==="rtl"},$,P,M==null?void 0:M.className,(r=M==null?void 0:M.classNames)===null||r===void 0?void 0:r.root,T==null?void 0:T.root,H,W);if(!d&&q&&(m||D||!G)){const Te=Se.color;return B(h.createElement("span",Object.assign({},I,{className:we,style:Object.assign(Object.assign(Object.assign({},O==null?void 0:O.root),(i=M==null?void 0:M.styles)===null||i===void 0?void 0:i.root),Se)}),h.createElement("span",{className:de,style:Object.assign(Object.assign(Object.assign({},O==null?void 0:O.indicator),(o=M==null?void 0:M.styles)===null||o===void 0?void 0:o.indicator),be)}),le&&h.createElement("span",{style:{color:Te},className:`${j}-status-text`},m)))}return B(h.createElement("span",Object.assign({ref:t},I,{className:we,style:Object.assign(Object.assign({},(a=M==null?void 0:M.styles)===null||a===void 0?void 0:a.root),O==null?void 0:O.root)}),d,h.createElement(qi,{visible:!Z,motionName:`${j}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:Te})=>{var ze,Ee;const ke=z("scroll-number",u),je=ue.current,Oe=ne(T==null?void 0:T.indicator,(ze=M==null?void 0:M.classNames)===null||ze===void 0?void 0:ze.indicator,{[`${j}-dot`]:je,[`${j}-count`]:!je,[`${j}-count-sm`]:_==="small",[`${j}-multiple-words`]:!je&&fe&&fe.toString().length>1,[`${j}-status-${f}`]:!!f,[`${j}-color-${g}`]:me});let Qe=Object.assign(Object.assign(Object.assign({},O==null?void 0:O.indicator),(Ee=M==null?void 0:M.styles)===null||Ee===void 0?void 0:Ee.indicator),Se);return g&&!me&&(Qe=Qe||{},Qe.background=g),h.createElement(pL,{prefixCls:ke,show:!Z,motionClassName:Te,className:Oe,count:fe,title:ae,style:Qe,key:"scrollNumber"},ye)}),ce))}),Ky=vL;Ky.Ribbon=dL;var yL={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"},bL=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:yL}))},Ru=h.forwardRef(bL),_L=Ge.ESC,SL=Ge.TAB;function CL(e){var t=e.visible,n=e.triggerRef,r=e.onVisibleChange,i=e.autoFocus,o=e.overlayRef,a=h.useRef(!1),c=function(){if(t){var m,g;(m=n.current)===null||m===void 0||(g=m.focus)===null||g===void 0||g.call(m),r==null||r(!1)}},u=function(){var m;return(m=o.current)!==null&&m!==void 0&&m.focus?(o.current.focus(),a.current=!0,!0):!1},d=function(m){switch(m.keyCode){case _L:c();break;case SL:{var g=!1;a.current||(g=u()),g?m.preventDefault():c();break}}};h.useEffect(function(){return t?(window.addEventListener("keydown",d),i&&Tn(u,3),function(){window.removeEventListener("keydown",d),a.current=!1}):function(){a.current=!1}},[t])}var wL=h.forwardRef(function(e,t){var n=e.overlay,r=e.arrow,i=e.prefixCls,o=h.useMemo(function(){var c;return typeof n=="function"?c=n():c=n,c},[n]),a=mo(t,Aa(o));return J.createElement(J.Fragment,null,r&&J.createElement("div",{className:"".concat(i,"-arrow")}),J.cloneElement(o,{ref:ra(o)?a:void 0}))}),El={adjustX:1,adjustY:1},kl=[0,0],xL={topLeft:{points:["bl","tl"],overflow:El,offset:[0,-4],targetOffset:kl},top:{points:["bc","tc"],overflow:El,offset:[0,-4],targetOffset:kl},topRight:{points:["br","tr"],overflow:El,offset:[0,-4],targetOffset:kl},bottomLeft:{points:["tl","bl"],overflow:El,offset:[0,4],targetOffset:kl},bottom:{points:["tc","bc"],overflow:El,offset:[0,4],targetOffset:kl},bottomRight:{points:["tr","br"],overflow:El,offset:[0,4],targetOffset:kl}},EL=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function kL(e,t){var n,r=e.arrow,i=r===void 0?!1:r,o=e.prefixCls,a=o===void 0?"rc-dropdown":o,c=e.transitionName,u=e.animation,d=e.align,f=e.placement,m=f===void 0?"bottomLeft":f,g=e.placements,v=g===void 0?xL:g,y=e.getPopupContainer,S=e.showAction,_=e.hideAction,C=e.overlayClassName,E=e.overlayStyle,k=e.visible,$=e.trigger,P=$===void 0?["hover"]:$,T=e.autoFocus,O=e.overlay,N=e.children,I=e.onVisibleChange,z=Lt(e,EL),L=J.useState(),M=se(L,2),j=M[0],B=M[1],H="visible"in e?k:j,W=J.useRef(null),V=J.useRef(null),A=J.useRef(null);J.useImperativeHandle(t,function(){return W.current});var G=function(fe){B(fe),I==null||I(fe)};CL({visible:H,triggerRef:A,onVisibleChange:G,autoFocus:T,overlayRef:V});var q=function(fe){var ue=e.onOverlayClick;B(!1),ue&&ue(fe)},D=function(){return J.createElement(wL,{ref:V,overlay:O,prefixCls:a,arrow:i})},U=function(){return typeof O=="function"?D:D()},Y=function(){var fe=e.minOverlayWidthMatchTrigger,ue=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?fe:!ue},Z=function(){var fe=e.openClassName;return fe!==void 0?fe:"".concat(a,"-open")},ee=J.cloneElement(N,{className:ne((n=N.props)===null||n===void 0?void 0:n.className,H&&Z()),ref:ra(N)?mo(A,Aa(N)):void 0}),re=_;return!re&&P.indexOf("contextMenu")!==-1&&(re=["click"]),J.createElement(im,Re({builtinPlacements:v},z,{prefixCls:a,ref:W,popupClassName:ne(C,K({},"".concat(a,"-show-arrow"),i)),popupStyle:E,action:P,showAction:S,hideAction:re,popupPlacement:m,popupAlign:d,popupTransitionName:c,popupAnimation:u,popupVisible:H,stretch:Y()?"minWidth":"",popup:U(),onPopupVisibleChange:G,onPopupClick:q,getPopupContainer:y}),ee)}const _$=J.forwardRef(kL),$L=e=>typeof e!="object"&&typeof e!="function"||e===null;var S$=h.createContext(null);function C$(e,t){return e===void 0?null:"".concat(e,"-").concat(t)}function w$(e){var t=h.useContext(S$);return C$(t,e)}var RL=["children","locked"],Oo=h.createContext(null);function TL(e,t){var n=X({},e);return Object.keys(t).forEach(function(r){var i=t[r];i!==void 0&&(n[r]=i)}),n}function Tu(e){var t=e.children,n=e.locked,r=Lt(e,RL),i=h.useContext(Oo),o=Bu(function(){return TL(i,r)},[i,r],function(a,c){return!n&&(a[0]!==c[0]||!_u(a[1],c[1],!0))});return h.createElement(Oo.Provider,{value:o},t)}var PL=[],x$=h.createContext(null);function am(){return h.useContext(x$)}var E$=h.createContext(PL);function ac(e){var t=h.useContext(E$);return h.useMemo(function(){return e!==void 0?[].concat(We(t),[e]):t},[t,e])}var k$=h.createContext(null),Gy=h.createContext({});function aw(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Ty(e)){var n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||n==="a"&&!!e.getAttribute("href"),i=e.getAttribute("tabindex"),o=Number(i),a=null;return i&&!Number.isNaN(o)?a=o:r&&a===null&&(a=0),r&&e.disabled&&(a=null),a!==null&&(a>=0||t&&a<0)}return!1}function OL(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=We(e.querySelectorAll("*")).filter(function(r){return aw(r,t)});return aw(e,t)&&n.unshift(e),n}var u0=Ge.LEFT,d0=Ge.RIGHT,h0=Ge.UP,Bh=Ge.DOWN,Lh=Ge.ENTER,$$=Ge.ESC,Hc=Ge.HOME,Fc=Ge.END,lw=[h0,Bh,u0,d0];function IL(e,t,n,r){var i,o="prev",a="next",c="children",u="parent";if(e==="inline"&&r===Lh)return{inlineTrigger:!0};var d=K(K({},h0,o),Bh,a),f=K(K(K(K({},u0,n?a:o),d0,n?o:a),Bh,c),Lh,c),m=K(K(K(K(K(K({},h0,o),Bh,a),Lh,c),$$,u),u0,n?c:u),d0,n?u:c),g={inline:d,horizontal:f,vertical:m,inlineSub:d,horizontalSub:m,verticalSub:m},v=(i=g["".concat(e).concat(t?"":"Sub")])===null||i===void 0?void 0:i[r];switch(v){case o:return{offset:-1,sibling:!0};case a:return{offset:1,sibling:!0};case u:return{offset:-1,sibling:!1};case c:return{offset:1,sibling:!1};default:return null}}function NL(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function ML(e,t){for(var n=e||document.activeElement;n;){if(t.has(n))return n;n=n.parentElement}return null}function Xy(e,t){var n=OL(e,!0);return n.filter(function(r){return t.has(r)})}function cw(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var i=Xy(e,t),o=i.length,a=i.findIndex(function(c){return n===c});return r<0?a===-1?a=o-1:a-=1:r>0&&(a+=1),a=(a+o)%o,i[a]}var f0=function(t,n){var r=new Set,i=new Map,o=new Map;return t.forEach(function(a){var c=document.querySelector("[data-menu-id='".concat(C$(n,a),"']"));c&&(r.add(c),o.set(c,a),i.set(a,c))}),{elements:r,key2element:i,element2key:o}};function zL(e,t,n,r,i,o,a,c,u,d){var f=h.useRef(),m=h.useRef();m.current=t;var g=function(){Tn.cancel(f.current)};return h.useEffect(function(){return function(){g()}},[]),function(v){var y=v.which;if([].concat(lw,[Lh,$$,Hc,Fc]).includes(y)){var S=o(),_=f0(S,r),C=_,E=C.elements,k=C.key2element,$=C.element2key,P=k.get(t),T=ML(P,E),O=$.get(T),N=IL(e,a(O,!0).length===1,n,y);if(!N&&y!==Hc&&y!==Fc)return;(lw.includes(y)||[Hc,Fc].includes(y))&&v.preventDefault();var I=function(V){if(V){var A=V,G=V.querySelector("a");G!=null&&G.getAttribute("href")&&(A=G);var q=$.get(V);c(q),g(),f.current=Tn(function(){m.current===q&&A.focus()})}};if([Hc,Fc].includes(y)||N.sibling||!T){var z;!T||e==="inline"?z=i.current:z=NL(T);var L,M=Xy(z,E);y===Hc?L=M[0]:y===Fc?L=M[M.length-1]:L=cw(z,E,T,N.offset),I(L)}else if(N.inlineTrigger)u(O);else if(N.offset>0)u(O,!0),g(),f.current=Tn(function(){_=f0(S,r);var W=T.getAttribute("aria-controls"),V=document.getElementById(W),A=cw(V,_.elements);I(A)},5);else if(N.offset<0){var j=a(O,!0),B=j[j.length-2],H=k.get(B);u(B,!1),I(H)}}d==null||d(v)}}function jL(e){Promise.resolve().then(e)}var Yy="__RC_UTIL_PATH_SPLIT__",uw=function(t){return t.join(Yy)},BL=function(t){return t.split(Yy)},m0="rc-menu-more";function LL(){var e=h.useState({}),t=se(e,2),n=t[1],r=h.useRef(new Map),i=h.useRef(new Map),o=h.useState([]),a=se(o,2),c=a[0],u=a[1],d=h.useRef(0),f=h.useRef(!1),m=function(){f.current||n({})},g=h.useCallback(function(k,$){var P=uw($);i.current.set(P,k),r.current.set(k,P),d.current+=1;var T=d.current;jL(function(){T===d.current&&m()})},[]),v=h.useCallback(function(k,$){var P=uw($);i.current.delete(P),r.current.delete(k)},[]),y=h.useCallback(function(k){u(k)},[]),S=h.useCallback(function(k,$){var P=r.current.get(k)||"",T=BL(P);return $&&c.includes(T[0])&&T.unshift(m0),T},[c]),_=h.useCallback(function(k,$){return k.filter(function(P){return P!==void 0}).some(function(P){var T=S(P,!0);return T.includes($)})},[S]),C=function(){var $=We(r.current.keys());return c.length&&$.push(m0),$},E=h.useCallback(function(k){var $="".concat(r.current.get(k)).concat(Yy),P=new Set;return We(i.current.keys()).forEach(function(T){T.startsWith($)&&P.add(i.current.get(T))}),P},[]);return h.useEffect(function(){return function(){f.current=!0}},[]),{registerPath:g,unregisterPath:v,refreshOverflowKeys:y,isSubPathKey:_,getKeyPath:S,getKeys:C,getSubPathKeys:E}}function nu(e){var t=h.useRef(e);t.current=e;var n=h.useCallback(function(){for(var r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return(r=t.current)===null||r===void 0?void 0:r.call.apply(r,[t].concat(o))},[]);return e?n:void 0}var AL=Math.random().toFixed(5).toString().slice(2),dw=0;function DL(e){var t=tr(e,{value:e}),n=se(t,2),r=n[0],i=n[1];return h.useEffect(function(){dw+=1;var o="".concat(AL,"-").concat(dw);i("rc-menu-uuid-".concat(o))},[]),r}function R$(e,t,n,r){var i=h.useContext(Oo),o=i.activeKey,a=i.onActive,c=i.onInactive,u={active:o===e};return t||(u.onMouseEnter=function(d){n==null||n({key:e,domEvent:d}),a(e)},u.onMouseLeave=function(d){r==null||r({key:e,domEvent:d}),c(e)}),u}function T$(e){var t=h.useContext(Oo),n=t.mode,r=t.rtl,i=t.inlineIndent;if(n!=="inline")return null;var o=e;return r?{paddingRight:o*i}:{paddingLeft:o*i}}function P$(e){var t=e.icon,n=e.props,r=e.children,i;return t===null||t===!1?null:(typeof t=="function"?i=h.createElement(t,X({},n)):typeof t!="boolean"&&(i=t),i||r||null)}var HL=["item"];function df(e){var t=e.item,n=Lt(e,HL);return Object.defineProperty(n,"item",{get:function(){return Ar(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),n}var FL=["title","attribute","elementRef"],WL=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],VL=["active"],UL=(function(e){gs(n,e);var t=vs(n);function n(){return yr(this,n),t.apply(this,arguments)}return br(n,[{key:"render",value:function(){var i=this.props,o=i.title,a=i.attribute,c=i.elementRef,u=Lt(i,FL),d=fr(u,["eventKey","popupClassName","popupOffset","onTitleClick"]);return Ar(!a,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),h.createElement(Uo.Item,Re({},a,{title:typeof o=="string"?o:void 0},d,{ref:c}))}}]),n})(h.Component),qL=h.forwardRef(function(e,t){var n=e.style,r=e.className,i=e.eventKey;e.warnKey;var o=e.disabled,a=e.itemIcon,c=e.children,u=e.role,d=e.onMouseEnter,f=e.onMouseLeave,m=e.onClick,g=e.onKeyDown,v=e.onFocus,y=Lt(e,WL),S=w$(i),_=h.useContext(Oo),C=_.prefixCls,E=_.onItemClick,k=_.disabled,$=_.overflowDisabled,P=_.itemIcon,T=_.selectedKeys,O=_.onActive,N=h.useContext(Gy),I=N._internalRenderMenuItem,z="".concat(C,"-item"),L=h.useRef(),M=h.useRef(),j=k||o,B=Jo(t,M),H=ac(i),W=function(ue){return{key:i,keyPath:We(H).reverse(),item:L.current,domEvent:ue}},V=a||P,A=R$(i,j,d,f),G=A.active,q=Lt(A,VL),D=T.includes(i),U=T$(H.length),Y=function(ue){if(!j){var Se=W(ue);m==null||m(df(Se)),E(Se)}},Z=function(ue){if(g==null||g(ue),ue.which===Ge.ENTER){var Se=W(ue);m==null||m(df(Se)),E(Se)}},ee=function(ue){O(i),v==null||v(ue)},re={};e.role==="option"&&(re["aria-selected"]=D);var he=h.createElement(UL,Re({ref:L,elementRef:B,role:u===null?"none":u||"menuitem",tabIndex:o?null:-1,"data-menu-id":$&&S?null:S},fr(y,["extra"]),q,re,{component:"li","aria-disabled":o,style:X(X({},U),n),className:ne(z,K(K(K({},"".concat(z,"-active"),G),"".concat(z,"-selected"),D),"".concat(z,"-disabled"),j),r),onClick:Y,onKeyDown:Z,onFocus:ee}),c,h.createElement(P$,{props:X(X({},e),{},{isSelected:D}),icon:V}));return I&&(he=I(he,e,{selected:D})),he});function KL(e,t){var n=e.eventKey,r=am(),i=ac(n);return h.useEffect(function(){if(r)return r.registerPath(n,i),function(){r.unregisterPath(n,i)}},[i]),r?null:h.createElement(qL,Re({},e,{ref:t}))}const Ju=h.forwardRef(KL);var GL=["className","children"],XL=function(t,n){var r=t.className,i=t.children,o=Lt(t,GL),a=h.useContext(Oo),c=a.prefixCls,u=a.mode,d=a.rtl;return h.createElement("ul",Re({className:ne(c,d&&"".concat(c,"-rtl"),"".concat(c,"-sub"),"".concat(c,"-").concat(u==="inline"?"inline":"vertical"),r),role:"menu"},o,{"data-menu-list":!0,ref:n}),i)},Jy=h.forwardRef(XL);Jy.displayName="SubMenuList";function Qy(e,t){return mi(e).map(function(n,r){if(h.isValidElement(n)){var i,o,a=n.key,c=(i=(o=n.props)===null||o===void 0?void 0:o.eventKey)!==null&&i!==void 0?i:a,u=c==null;u&&(c="tmp_key-".concat([].concat(We(t),[r]).join("-")));var d={key:c,eventKey:c};return h.cloneElement(n,d)}return n})}var oi={adjustX:1,adjustY:1},YL={topLeft:{points:["bl","tl"],overflow:oi},topRight:{points:["br","tr"],overflow:oi},bottomLeft:{points:["tl","bl"],overflow:oi},bottomRight:{points:["tr","br"],overflow:oi},leftTop:{points:["tr","tl"],overflow:oi},leftBottom:{points:["br","bl"],overflow:oi},rightTop:{points:["tl","tr"],overflow:oi},rightBottom:{points:["bl","br"],overflow:oi}},JL={topLeft:{points:["bl","tl"],overflow:oi},topRight:{points:["br","tr"],overflow:oi},bottomLeft:{points:["tl","bl"],overflow:oi},bottomRight:{points:["tr","br"],overflow:oi},rightTop:{points:["tr","tl"],overflow:oi},rightBottom:{points:["br","bl"],overflow:oi},leftTop:{points:["tl","tr"],overflow:oi},leftBottom:{points:["bl","br"],overflow:oi}};function O$(e,t,n){if(t)return t;if(n)return n[e]||n.other}var QL={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function ZL(e){var t=e.prefixCls,n=e.visible,r=e.children,i=e.popup,o=e.popupStyle,a=e.popupClassName,c=e.popupOffset,u=e.disabled,d=e.mode,f=e.onVisibleChange,m=h.useContext(Oo),g=m.getPopupContainer,v=m.rtl,y=m.subMenuOpenDelay,S=m.subMenuCloseDelay,_=m.builtinPlacements,C=m.triggerSubMenuAction,E=m.forceSubMenuRender,k=m.rootClassName,$=m.motion,P=m.defaultMotions,T=h.useState(!1),O=se(T,2),N=O[0],I=O[1],z=X(v?X({},JL):X({},YL),_),L=QL[d],M=O$(d,$,P),j=h.useRef(M);d!=="inline"&&(j.current=M);var B=X(X({},j.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),H=h.useRef();return h.useEffect(function(){return H.current=Tn(function(){I(n)}),function(){Tn.cancel(H.current)}},[n]),h.createElement(im,{prefixCls:t,popupClassName:ne("".concat(t,"-popup"),K({},"".concat(t,"-rtl"),v),a,k),stretch:d==="horizontal"?"minWidth":null,getPopupContainer:g,builtinPlacements:z,popupPlacement:L,popupVisible:N,popup:i,popupStyle:o,popupAlign:c&&{offset:c},action:u?[]:[C],mouseEnterDelay:y,mouseLeaveDelay:S,onPopupVisibleChange:f,forceRender:E,popupMotion:B,fresh:!0},r)}function e7(e){var t=e.id,n=e.open,r=e.keyPath,i=e.children,o="inline",a=h.useContext(Oo),c=a.prefixCls,u=a.forceSubMenuRender,d=a.motion,f=a.defaultMotions,m=a.mode,g=h.useRef(!1);g.current=m===o;var v=h.useState(!g.current),y=se(v,2),S=y[0],_=y[1],C=g.current?n:!1;h.useEffect(function(){g.current&&_(!1)},[m]);var E=X({},O$(o,d,f));r.length>1&&(E.motionAppear=!1);var k=E.onVisibleChanged;return E.onVisibleChanged=function($){return!g.current&&!$&&_(!0),k==null?void 0:k($)},S?null:h.createElement(Tu,{mode:o,locked:!g.current},h.createElement(qi,Re({visible:C},E,{forceRender:u,removeOnLeave:!1,leavedClassName:"".concat(c,"-hidden")}),function($){var P=$.className,T=$.style;return h.createElement(Jy,{id:t,className:P,style:T},i)}))}var t7=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],n7=["active"],r7=h.forwardRef(function(e,t){var n=e.style,r=e.className,i=e.title,o=e.eventKey;e.warnKey;var a=e.disabled,c=e.internalPopupClose,u=e.children,d=e.itemIcon,f=e.expandIcon,m=e.popupClassName,g=e.popupOffset,v=e.popupStyle,y=e.onClick,S=e.onMouseEnter,_=e.onMouseLeave,C=e.onTitleClick,E=e.onTitleMouseEnter,k=e.onTitleMouseLeave,$=Lt(e,t7),P=w$(o),T=h.useContext(Oo),O=T.prefixCls,N=T.mode,I=T.openKeys,z=T.disabled,L=T.overflowDisabled,M=T.activeKey,j=T.selectedKeys,B=T.itemIcon,H=T.expandIcon,W=T.onItemClick,V=T.onOpenChange,A=T.onActive,G=h.useContext(Gy),q=G._internalRenderSubMenuItem,D=h.useContext(k$),U=D.isSubPathKey,Y=ac(),Z="".concat(O,"-submenu"),ee=z||a,re=h.useRef(),he=h.useRef(),fe=d??B,ue=f??H,Se=I.includes(o),ae=!L&&Se,le=U(j,o),ce=R$(o,ee,E,k),ye=ce.active,me=Lt(ce,n7),de=h.useState(!1),be=se(de,2),we=be[0],Te=be[1],ze=function(Me){ee||Te(Me)},Ee=function(Me){ze(!0),S==null||S({key:o,domEvent:Me})},ke=function(Me){ze(!1),_==null||_({key:o,domEvent:Me})},je=h.useMemo(function(){return ye||(N!=="inline"?we||U([M],o):!1)},[N,ye,M,we,o,U]),Oe=T$(Y.length),Qe=function(Me){ee||(C==null||C({key:o,domEvent:Me}),N==="inline"&&V(o,!Se))},at=nu(function(rt){y==null||y(df(rt)),W(rt)}),$t=function(Me){N!=="inline"&&V(o,Me)},pt=function(){A(o)},Je=P&&"".concat(P,"-popup"),ft=h.useMemo(function(){return h.createElement(P$,{icon:N!=="horizontal"?ue:void 0,props:X(X({},e),{},{isOpen:ae,isSubMenu:!0})},h.createElement("i",{className:"".concat(Z,"-arrow")}))},[N,ue,e,ae,Z]),Xe=h.createElement("div",Re({role:"menuitem",style:Oe,className:"".concat(Z,"-title"),tabIndex:ee?null:-1,ref:re,title:typeof i=="string"?i:null,"data-menu-id":L&&P?null:P,"aria-expanded":ae,"aria-haspopup":!0,"aria-controls":Je,"aria-disabled":ee,onClick:Qe,onFocus:pt},me),i,ft),yt=h.useRef(N);if(N!=="inline"&&Y.length>1?yt.current="vertical":yt.current=N,!L){var tt=yt.current;Xe=h.createElement(ZL,{mode:tt,prefixCls:Z,visible:!c&&ae&&N!=="inline",popupClassName:m,popupOffset:g,popupStyle:v,popup:h.createElement(Tu,{mode:tt==="horizontal"?"vertical":tt},h.createElement(Jy,{id:Je,ref:he},u)),disabled:ee,onVisibleChange:$t},Xe)}var Le=h.createElement(Uo.Item,Re({ref:t,role:"none"},$,{component:"li",style:n,className:ne(Z,"".concat(Z,"-").concat(N),r,K(K(K(K({},"".concat(Z,"-open"),ae),"".concat(Z,"-active"),je),"".concat(Z,"-selected"),le),"".concat(Z,"-disabled"),ee)),onMouseEnter:Ee,onMouseLeave:ke}),Xe,!L&&h.createElement(e7,{id:Je,open:ae,keyPath:Y},u));return q&&(Le=q(Le,e,{selected:le,active:je,open:ae,disabled:ee})),h.createElement(Tu,{onItemClick:at,mode:N==="horizontal"?"vertical":N,itemIcon:fe,expandIcon:ue},Le)}),lm=h.forwardRef(function(e,t){var n=e.eventKey,r=e.children,i=ac(n),o=Qy(r,i),a=am();h.useEffect(function(){if(a)return a.registerPath(n,i),function(){a.unregisterPath(n,i)}},[i]);var c;return a?c=o:c=h.createElement(r7,Re({ref:t},e),o),h.createElement(E$.Provider,{value:i},c)});function Zy(e){var t=e.className,n=e.style,r=h.useContext(Oo),i=r.prefixCls,o=am();return o?null:h.createElement("li",{role:"separator",className:ne("".concat(i,"-item-divider"),t),style:n})}var i7=["className","title","eventKey","children"],o7=h.forwardRef(function(e,t){var n=e.className,r=e.title;e.eventKey;var i=e.children,o=Lt(e,i7),a=h.useContext(Oo),c=a.prefixCls,u="".concat(c,"-item-group");return h.createElement("li",Re({ref:t,role:"presentation"},o,{onClick:function(f){return f.stopPropagation()},className:ne(u,n)}),h.createElement("div",{role:"presentation",className:"".concat(u,"-title"),title:typeof r=="string"?r:void 0},r),h.createElement("ul",{role:"group",className:"".concat(u,"-list")},i))}),eb=h.forwardRef(function(e,t){var n=e.eventKey,r=e.children,i=ac(n),o=Qy(r,i),a=am();return a?o:h.createElement(o7,Re({ref:t},fr(e,["warnKey"])),o)}),s7=["label","children","key","type","extra"];function p0(e,t,n){var r=t.item,i=t.group,o=t.submenu,a=t.divider;return(e||[]).map(function(c,u){if(c&&_t(c)==="object"){var d=c,f=d.label,m=d.children,g=d.key,v=d.type,y=d.extra,S=Lt(d,s7),_=g??"tmp-".concat(u);return m||v==="group"?v==="group"?h.createElement(i,Re({key:_},S,{title:f}),p0(m,t,n)):h.createElement(o,Re({key:_},S,{title:f}),p0(m,t,n)):v==="divider"?h.createElement(a,Re({key:_},S)):h.createElement(r,Re({key:_},S,{extra:y}),f,(!!y||y===0)&&h.createElement("span",{className:"".concat(n,"-item-extra")},y))}return null}).filter(function(c){return c})}function hw(e,t,n,r,i){var o=e,a=X({divider:Zy,item:Ju,group:eb,submenu:lm},r);return t&&(o=p0(t,a,i)),Qy(o,n)}var a7=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],ga=[],l7=h.forwardRef(function(e,t){var n,r=e,i=r.prefixCls,o=i===void 0?"rc-menu":i,a=r.rootClassName,c=r.style,u=r.className,d=r.tabIndex,f=d===void 0?0:d,m=r.items,g=r.children,v=r.direction,y=r.id,S=r.mode,_=S===void 0?"vertical":S,C=r.inlineCollapsed,E=r.disabled,k=r.disabledOverflow,$=r.subMenuOpenDelay,P=$===void 0?.1:$,T=r.subMenuCloseDelay,O=T===void 0?.1:T,N=r.forceSubMenuRender,I=r.defaultOpenKeys,z=r.openKeys,L=r.activeKey,M=r.defaultActiveFirst,j=r.selectable,B=j===void 0?!0:j,H=r.multiple,W=H===void 0?!1:H,V=r.defaultSelectedKeys,A=r.selectedKeys,G=r.onSelect,q=r.onDeselect,D=r.inlineIndent,U=D===void 0?24:D,Y=r.motion,Z=r.defaultMotions,ee=r.triggerSubMenuAction,re=ee===void 0?"hover":ee,he=r.builtinPlacements,fe=r.itemIcon,ue=r.expandIcon,Se=r.overflowedIndicator,ae=Se===void 0?"...":Se,le=r.overflowedIndicatorPopupClassName,ce=r.getPopupContainer,ye=r.onClick,me=r.onOpenChange,de=r.onKeyDown;r.openAnimation,r.openTransitionName;var be=r._internalRenderMenuItem,we=r._internalRenderSubMenuItem,Te=r._internalComponents,ze=Lt(r,a7),Ee=h.useMemo(function(){return[hw(g,m,ga,Te,o),hw(g,m,ga,{},o)]},[g,m,Te]),ke=se(Ee,2),je=ke[0],Oe=ke[1],Qe=h.useState(!1),at=se(Qe,2),$t=at[0],pt=at[1],Je=h.useRef(),ft=DL(y),Xe=v==="rtl",yt=tr(I,{value:z,postState:function(ut){return ut||ga}}),tt=se(yt,2),Le=tt[0],rt=tt[1],Me=function(ut){var st=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function an(){rt(ut),me==null||me(ut)}st?Js.flushSync(an):an()},qe=h.useState(Le),It=se(qe,2),St=It[0],nn=It[1],Jt=h.useRef(!1),_n=h.useMemo(function(){return(_==="inline"||_==="vertical")&&C?["vertical",C]:[_,!1]},[_,C]),In=se(_n,2),on=In[0],Ht=In[1],Rt=on==="inline",sn=h.useState(on),Xt=se(sn,2),ot=Xt[0],Et=Xt[1],mt=h.useState(Ht),Ie=se(mt,2),$e=Ie[0],xe=Ie[1];h.useEffect(function(){Et(on),xe(Ht),Jt.current&&(Rt?rt(St):Me(ga))},[on,Ht]);var Ae=h.useState(0),et=se(Ae,2),nt=et[0],Ft=et[1],Kt=nt>=je.length-1||ot!=="horizontal"||k;h.useEffect(function(){Rt&&nn(Le)},[Le]),h.useEffect(function(){return Jt.current=!0,function(){Jt.current=!1}},[]);var Bt=LL(),At=Bt.registerPath,Pn=Bt.unregisterPath,kn=Bt.refreshOverflowKeys,Nn=Bt.isSubPathKey,Hn=Bt.getKeyPath,cn=Bt.getKeys,mn=Bt.getSubPathKeys,He=h.useMemo(function(){return{registerPath:At,unregisterPath:Pn}},[At,Pn]),Ye=h.useMemo(function(){return{isSubPathKey:Nn}},[Nn]);h.useEffect(function(){kn(Kt?ga:je.slice(nt+1).map(function(dn){return dn.key}))},[nt,Kt]);var Pt=tr(L||M&&((n=je[0])===null||n===void 0?void 0:n.key),{value:L}),gt=se(Pt,2),lt=gt[0],Ze=gt[1],Tt=nu(function(dn){Ze(dn)}),Gt=nu(function(){Ze(void 0)});h.useImperativeHandle(t,function(){return{list:Je.current,focus:function(ut){var st,an=cn(),hn=f0(an,ft),Sn=hn.elements,xn=hn.key2element,Fr=hn.element2key,ar=Xy(Je.current,Sn),Ut=lt??(ar[0]?Fr.get(ar[0]):(st=je.find(function(bi){return!bi.props.disabled}))===null||st===void 0?void 0:st.key),Cr=xn.get(Ut);if(Ut&&Cr){var Tr;Cr==null||(Tr=Cr.focus)===null||Tr===void 0||Tr.call(Cr,ut)}}}});var Ke=tr(V||[],{value:A,postState:function(ut){return Array.isArray(ut)?ut:ut==null?ga:[ut]}}),vt=se(Ke,2),Nt=vt[0],gn=vt[1],sr=function(ut){if(B){var st=ut.key,an=Nt.includes(st),hn;W?an?hn=Nt.filter(function(xn){return xn!==st}):hn=[].concat(We(Nt),[st]):hn=[st],gn(hn);var Sn=X(X({},ut),{},{selectedKeys:hn});an?q==null||q(Sn):G==null||G(Sn)}!W&&Le.length&&ot!=="inline"&&Me(ga)},Ln=nu(function(dn){ye==null||ye(df(dn)),sr(dn)}),Xr=nu(function(dn,ut){var st=Le.filter(function(hn){return hn!==dn});if(ut)st.push(dn);else if(ot!=="inline"){var an=mn(dn);st=st.filter(function(hn){return!an.has(hn)})}_u(Le,st,!0)||Me(st,!0)}),_r=function(ut,st){var an=st??!Le.includes(ut);Xr(ut,an)},Yr=zL(ot,lt,Xe,ft,Je,cn,Hn,Ze,_r,de);h.useEffect(function(){pt(!0)},[]);var Sr=h.useMemo(function(){return{_internalRenderMenuItem:be,_internalRenderSubMenuItem:we}},[be,we]),Hr=ot!=="horizontal"||k?je:je.map(function(dn,ut){return h.createElement(Tu,{key:dn.key,overflowDisabled:ut>nt},dn)}),Jr=h.createElement(Uo,Re({id:y,ref:Je,prefixCls:"".concat(o,"-overflow"),component:"ul",itemComponent:Ju,className:ne(o,"".concat(o,"-root"),"".concat(o,"-").concat(ot),u,K(K({},"".concat(o,"-inline-collapsed"),$e),"".concat(o,"-rtl"),Xe),a),dir:v,style:c,role:"menu",tabIndex:f,data:Hr,renderRawItem:function(ut){return ut},renderRawRest:function(ut){var st=ut.length,an=st?je.slice(-st):null;return h.createElement(lm,{eventKey:m0,title:ae,disabled:Kt,internalPopupClose:st===0,popupClassName:le},an)},maxCount:ot!=="horizontal"||k?Uo.INVALIDATE:Uo.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(ut){Ft(ut)},onKeyDown:Yr},ze));return h.createElement(Gy.Provider,{value:Sr},h.createElement(S$.Provider,{value:ft},h.createElement(Tu,{prefixCls:o,rootClassName:a,mode:ot,openKeys:Le,rtl:Xe,disabled:E,motion:$t?Y:null,defaultMotions:$t?Z:null,activeKey:lt,onActive:Tt,onInactive:Gt,selectedKeys:Nt,inlineIndent:U,subMenuOpenDelay:P,subMenuCloseDelay:O,forceSubMenuRender:N,builtinPlacements:he,triggerSubMenuAction:re,getPopupContainer:ce,itemIcon:fe,expandIcon:ue,onItemClick:Ln,onOpenChange:Xr},h.createElement(k$.Provider,{value:Ye},Jr),h.createElement("div",{style:{display:"none"},"aria-hidden":!0},h.createElement(x$.Provider,{value:He},Oe)))))}),lc=l7;lc.Item=Ju;lc.SubMenu=lm;lc.ItemGroup=eb;lc.Divider=Zy;var c7={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},u7=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:c7}))},d7=h.forwardRef(u7);const I$=h.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),h7=e=>{const{antCls:t,componentCls:n,colorText:r,footerBg:i,headerHeight:o,headerPadding:a,headerColor:c,footerPadding:u,fontSize:d,bodyBg:f,headerBg:m}=e;return{[n]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:f,"&, *":{boxSizing:"border-box"},[`&${n}-has-sider`]:{flexDirection:"row",[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${n}-header`]:{height:o,padding:a,color:c,lineHeight:te(o),background:m,[`${t}-menu`]:{lineHeight:"inherit"}},[`${n}-footer`]:{padding:u,color:r,fontSize:d,background:i},[`${n}-content`]:{flex:"auto",color:r,minHeight:0}}},N$=e=>{const{colorBgLayout:t,controlHeight:n,controlHeightLG:r,colorText:i,controlHeightSM:o,marginXXS:a,colorTextLightSolid:c,colorBgContainer:u}=e,d=r*1.25;return{colorBgHeader:"#001529",colorBgBody:t,colorBgTrigger:"#002140",bodyBg:t,headerBg:"#001529",headerHeight:n*2,headerPadding:`0 ${d}px`,headerColor:i,footerPadding:`${o}px ${d}px`,footerBg:t,siderBg:"#001529",triggerHeight:r+a*2,triggerBg:"#002140",triggerColor:c,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:u,lightTriggerBg:u,lightTriggerColor:i}},M$=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]],z$=bn("Layout",h7,N$,{deprecatedTokens:M$}),f7=e=>{const{componentCls:t,siderBg:n,motionDurationMid:r,motionDurationSlow:i,antCls:o,triggerHeight:a,triggerColor:c,triggerBg:u,headerHeight:d,zeroTriggerWidth:f,zeroTriggerHeight:m,borderRadiusLG:g,lightSiderBg:v,lightTriggerColor:y,lightTriggerBg:S,bodyBg:_}=e;return{[t]:{position:"relative",minWidth:0,background:n,transition:`all ${r}, background 0s`,"&-has-trigger":{paddingBottom:a},"&-right":{order:1},[`${t}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${o}-menu${o}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${t}-children`]:{overflow:"hidden"},[`${t}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:a,color:c,lineHeight:te(a),textAlign:"center",background:u,cursor:"pointer",transition:`all ${r}`},[`${t}-zero-width-trigger`]:{position:"absolute",top:d,insetInlineEnd:e.calc(f).mul(-1).equal(),zIndex:1,width:f,height:m,color:c,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:n,borderRadius:`0 ${te(g)} ${te(g)} 0`,cursor:"pointer",transition:`background ${i} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${i}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:e.calc(f).mul(-1).equal(),borderRadius:`${te(g)} 0 0 ${te(g)}`}},"&-light":{background:v,[`${t}-trigger`]:{color:y,background:S},[`${t}-zero-width-trigger`]:{color:y,background:S,border:`1px solid ${_}`,borderInlineStart:0}}}}},m7=bn(["Layout","Sider"],f7,N$,{deprecatedTokens:M$});var p7=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const fw={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},g7=e=>!Number.isNaN(Number.parseFloat(e))&&Number.isFinite(Number(e)),cm=h.createContext({}),v7=(()=>{let e=0;return(t="")=>(e+=1,`${t}${e}`)})(),j$=h.forwardRef((e,t)=>{const{prefixCls:n,className:r,trigger:i,children:o,defaultCollapsed:a=!1,theme:c="dark",style:u={},collapsible:d=!1,reverseArrow:f=!1,width:m=200,collapsedWidth:g=80,zeroWidthTriggerStyle:v,breakpoint:y,onCollapse:S,onBreakpoint:_}=e,C=p7(e,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:E}=h.useContext(I$),[k,$]=h.useState("collapsed"in e?e.collapsed:a),[P,T]=h.useState(!1);h.useEffect(()=>{"collapsed"in e&&$(e.collapsed)},[e.collapsed]);const O=(fe,ue)=>{"collapsed"in e||$(fe),S==null||S(fe,ue)},{getPrefixCls:N,direction:I}=h.useContext(Ot),z=N("layout-sider",n),[L,M,j]=m7(z),B=h.useRef(null);B.current=fe=>{T(fe.matches),_==null||_(fe.matches),k!==fe.matches&&O(fe.matches,"responsive")},h.useEffect(()=>{function fe(Se){var ae;return(ae=B.current)===null||ae===void 0?void 0:ae.call(B,Se)}let ue;return typeof(window==null?void 0:window.matchMedia)<"u"&&y&&y in fw&&(ue=window.matchMedia(`screen and (max-width: ${fw[y]})`),u$(ue,fe),fe(ue)),()=>{d$(ue,fe)}},[y]),h.useEffect(()=>{const fe=v7("ant-sider-");return E.addSider(fe),()=>E.removeSider(fe)},[]);const H=()=>{O(!k,"clickTrigger")},W=fr(C,["collapsed"]),V=k?g:m,A=g7(V)?`${V}px`:String(V),G=Number.parseFloat(String(g||0))===0?h.createElement("span",{onClick:H,className:ne(`${z}-zero-width-trigger`,`${z}-zero-width-trigger-${f?"right":"left"}`),style:v},i||h.createElement(d7,null)):null,q=I==="rtl"==!f,Y={expanded:q?h.createElement(Wi,null):h.createElement(Ru,null),collapsed:q?h.createElement(Ru,null):h.createElement(Wi,null)}[k?"collapsed":"expanded"],Z=i!==null?G||h.createElement("div",{className:`${z}-trigger`,onClick:H,style:{width:A}},i||Y):null,ee=Object.assign(Object.assign({},u),{flex:`0 0 ${A}`,maxWidth:A,minWidth:A,width:A}),re=ne(z,`${z}-${c}`,{[`${z}-collapsed`]:!!k,[`${z}-has-trigger`]:d&&i!==null&&!G,[`${z}-below`]:!!P,[`${z}-zero-width`]:Number.parseFloat(A)===0},r,M,j),he=h.useMemo(()=>({siderCollapsed:k}),[k]);return L(h.createElement(cm.Provider,{value:he},h.createElement("aside",Object.assign({className:re},W,{style:ee,ref:t}),h.createElement("div",{className:`${z}-children`},o),d||P&&G?Z:null)))});var y7={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"},b7=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:y7}))},tb=h.forwardRef(b7);const hf=h.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var _7=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const B$=e=>{const{prefixCls:t,className:n,dashed:r}=e,i=_7(e,["prefixCls","className","dashed"]),{getPrefixCls:o}=h.useContext(Ot),a=o("menu",t),c=ne({[`${a}-item-divider-dashed`]:!!r},n);return h.createElement(Zy,Object.assign({className:c},i))},L$=e=>{var t;const{className:n,children:r,icon:i,title:o,danger:a,extra:c}=e,{prefixCls:u,firstLevel:d,direction:f,disableMenuItemTitleTooltip:m,inlineCollapsed:g}=h.useContext(hf),v=k=>{const $=r==null?void 0:r[0],P=h.createElement("span",{className:ne(`${u}-title-content`,{[`${u}-title-content-with-extra`]:!!c||c===0})},r);return(!i||h.isValidElement(r)&&r.type==="span")&&r&&k&&d&&typeof $=="string"?h.createElement("div",{className:`${u}-inline-collapsed-noicon`},$.charAt(0)):P},{siderCollapsed:y}=h.useContext(cm);let S=o;typeof o>"u"?S=d?r:"":o===!1&&(S="");const _={title:S};!y&&!g&&(_.title=null,_.open=!1);const C=mi(r).length;let E=h.createElement(Ju,Object.assign({},fr(e,["title","icon","danger"]),{className:ne({[`${u}-item-danger`]:a,[`${u}-item-only-child`]:(i?C+1:C)===1},n),title:typeof o=="string"?o:void 0}),pi(i,{className:ne(h.isValidElement(i)?(t=i.props)===null||t===void 0?void 0:t.className:void 0,`${u}-item-icon`)}),v(g));return m||(E=h.createElement(Xo,Object.assign({},_,{placement:f==="rtl"?"left":"right",classNames:{root:`${u}-inline-collapsed-tooltip`}}),E)),E};var S7=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const ff=h.createContext(null),C7=h.forwardRef((e,t)=>{const{children:n}=e,r=S7(e,["children"]),i=h.useContext(ff),o=h.useMemo(()=>Object.assign(Object.assign({},i),r),[i,r.prefixCls,r.mode,r.selectable,r.rootClassName]),a=WT(n),c=Jo(t,a?Aa(n):null);return h.createElement(ff.Provider,{value:o},h.createElement(Gu,{space:!0},a?h.cloneElement(n,{ref:c}):n))}),w7=e=>{const{componentCls:t,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:i,lineWidth:o,lineType:a,itemPaddingInline:c}=e;return{[`${t}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${te(o)} ${a} ${i}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:c},[`> ${t}-item:hover,
250
+ > ${t}-item-active,
251
+ > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color ${n}`,`background ${n}`].join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},x7=({componentCls:e,menuArrowOffset:t,calc:n})=>({[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical,
252
+ ${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${te(n(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${te(t)})`}}}}),mw=e=>Oa(e),pw=(e,t)=>{const{componentCls:n,itemColor:r,itemSelectedColor:i,subMenuItemSelectedColor:o,groupTitleColor:a,itemBg:c,subMenuItemBg:u,itemSelectedBg:d,activeBarHeight:f,activeBarWidth:m,activeBarBorderWidth:g,motionDurationSlow:v,motionEaseInOut:y,motionEaseOut:S,itemPaddingInline:_,motionDurationMid:C,itemHoverColor:E,lineType:k,colorSplit:$,itemDisabledColor:P,dangerItemColor:T,dangerItemHoverColor:O,dangerItemSelectedColor:N,dangerItemActiveBg:I,dangerItemSelectedBg:z,popupBg:L,itemHoverBg:M,itemActiveBg:j,menuSubMenuBg:B,horizontalItemSelectedColor:H,horizontalItemSelectedBg:W,horizontalItemBorderRadius:V,horizontalItemHoverBg:A}=e;return{[`${n}-${t}, ${n}-${t} > ${n}`]:{color:r,background:c,[`&${n}-root:focus-visible`]:Object.assign({},mw(e)),[`${n}-item`]:{"&-group-title, &-extra":{color:a}},[`${n}-submenu-selected > ${n}-submenu-title`]:{color:o},[`${n}-item, ${n}-submenu-title`]:{color:r,[`&:not(${n}-item-disabled):focus-visible`]:Object.assign({},mw(e))},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${P} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:E}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:M},"&:active":{backgroundColor:j}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:M},"&:active":{backgroundColor:j}}},[`${n}-item-danger`]:{color:T,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:O}},[`&${n}-item:active`]:{background:I}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:i,[`&${n}-item-danger`]:{color:N},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:d,[`&${n}-item-danger`]:{backgroundColor:z}},[`&${n}-submenu > ${n}`]:{backgroundColor:B},[`&${n}-popup > ${n}`]:{backgroundColor:L},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:L},[`&${n}-horizontal`]:Object.assign(Object.assign({},t==="dark"?{borderBottom:0}:{}),{[`> ${n}-item, > ${n}-submenu`]:{top:g,marginTop:e.calc(g).mul(-1).equal(),marginBottom:0,borderRadius:V,"&::after":{position:"absolute",insetInline:_,bottom:0,borderBottom:`${te(f)} solid transparent`,transition:`border-color ${v} ${y}`,content:'""'},"&:hover, &-active, &-open":{background:A,"&::after":{borderBottomWidth:f,borderBottomColor:H}},"&-selected":{color:H,backgroundColor:W,"&:hover":{backgroundColor:W},"&::after":{borderBottomWidth:f,borderBottomColor:H}}}}),[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${te(g)} ${k} ${$}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:u},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${te(m)} solid ${i}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${C} ${S}`,`opacity ${C} ${S}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:N}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${C} ${y}`,`opacity ${C} ${y}`].join(",")}}}}}},gw=e=>{const{componentCls:t,itemHeight:n,itemMarginInline:r,padding:i,menuArrowSize:o,marginXS:a,itemMarginBlock:c,itemWidth:u,itemPaddingInline:d}=e,f=e.calc(o).add(i).add(a).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:n,lineHeight:te(n),paddingInline:d,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:c,width:u},[`> ${t}-item,
253
+ > ${t}-submenu > ${t}-submenu-title`]:{height:n,lineHeight:te(n)},[`${t}-item-group-list ${t}-submenu-title,
254
+ ${t}-submenu-title`]:{paddingInlineEnd:f}}},E7=e=>{const{componentCls:t,iconCls:n,itemHeight:r,colorTextLightSolid:i,dropdownWidth:o,controlHeightLG:a,motionEaseOut:c,paddingXL:u,itemMarginInline:d,fontSizeLG:f,motionDurationFast:m,motionDurationSlow:g,paddingXS:v,boxShadowSecondary:y,collapsedWidth:S,collapsedIconSize:_}=e,C={height:r,lineHeight:te(r),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":Object.assign({[`&${t}-root`]:{boxShadow:"none"}},gw(e))},[`${t}-submenu-popup`]:{[`${t}-vertical`]:Object.assign(Object.assign({},gw(e)),{boxShadow:y})}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:o,maxHeight:`calc(100vh - ${te(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 ${g}`,`padding ${m} ${c}`].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`]:C,[`& ${t}-item-group-title`]:{paddingInlineStart:u}},[`${t}-item`]:C}},{[`${t}-inline-collapsed`]:{width:S,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:f,textAlign:"center"}}},[`> ${t}-item,
255
+ > ${t}-item-group > ${t}-item-group-list > ${t}-item,
256
+ > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,
257
+ > ${t}-submenu > ${t}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${te(e.calc(_).div(2).equal())} - ${te(d)})`,textOverflow:"clip",[`
258
+ ${t}-submenu-arrow,
259
+ ${t}-submenu-expand-icon
260
+ `]:{opacity:0},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:_,lineHeight:te(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:i}},[`${t}-item-group-title`]:Object.assign(Object.assign({},xu),{paddingInline:v})}}]},vw=e=>{const{componentCls:t,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:i,motionEaseOut:o,iconCls:a,iconSize:c,iconMarginInlineEnd:u}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${n}`,`background ${n}`,`padding calc(${n} + 0.1s) ${i}`].join(","),[`${t}-item-icon, ${a}`]:{minWidth:c,fontSize:c,transition:[`font-size ${r} ${o}`,`margin ${n} ${i}`,`color ${n}`].join(","),"+ span":{marginInlineStart:u,opacity:1,transition:[`opacity ${n} ${i}`,`margin ${n}`,`color ${n}`].join(",")}},[`${t}-item-icon`]:Object.assign({},rc()),[`&${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"}}}},yw=e=>{const{componentCls:t,motionDurationSlow:n,motionEaseInOut:r,borderRadius:i,menuArrowSize:o,menuArrowOffset:a}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:o,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${n} ${r}, opacity ${n}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(o).mul(.6).equal(),height:e.calc(o).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:i,transition:[`background ${n} ${r}`,`transform ${n} ${r}`,`top ${n} ${r}`,`color ${n} ${r}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${te(e.calc(a).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${te(a)})`}}}}},k7=e=>{const{antCls:t,componentCls:n,fontSize:r,motionDurationSlow:i,motionDurationMid:o,motionEaseInOut:a,paddingXS:c,padding:u,colorSplit:d,lineWidth:f,zIndexPopup:m,borderRadiusLG:g,subMenuItemBorderRadius:v,menuArrowSize:y,menuArrowOffset:S,lineType:_,groupTitleLineHeight:C,groupTitleFontSize:E}=e;return[{"":{[n]:Object.assign(Object.assign({},tf()),{"&-hidden":{display:"none"}})},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Un(e)),tf()),{marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${i} 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:`${te(c)} ${te(u)}`,fontSize:E,lineHeight:C,transition:`all ${i}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color ${i} ${a}`,`background ${i} ${a}`].join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${i} ${a}`,`background ${i} ${a}`,`padding ${o} ${a}`].join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:[`background ${i} ${a}`,`padding ${i} ${a}`].join(",")},[`${n}-title-content`]:{transition:`color ${i}`,"&-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:_,borderWidth:0,borderTopWidth:f,marginBlock:f,padding:0,"&-dashed":{borderStyle:"dashed"}}}),vw(e)),{[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${te(e.calc(r).mul(2).equal())} ${te(u)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:m,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}`]:Object.assign(Object.assign(Object.assign({borderRadius:g},vw(e)),yw(e)),{[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:v},[`${n}-submenu-title::after`]:{transition:`transform ${i} ${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}}}),yw(e)),{[`&-inline-collapsed ${n}-submenu-arrow,
261
+ &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${te(S)})`},"&::after":{transform:`rotate(45deg) translateX(${te(e.calc(S).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${te(e.calc(y).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${te(e.calc(S).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${te(S)})`}}})},{[`${t}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},$7=e=>{var t,n,r;const{colorPrimary:i,colorError:o,colorTextDisabled:a,colorErrorBg:c,colorText:u,colorTextDescription:d,colorBgContainer:f,colorFillAlter:m,colorFillContent:g,lineWidth:v,lineWidthBold:y,controlItemBgActive:S,colorBgTextHover:_,controlHeightLG:C,lineHeight:E,colorBgElevated:k,marginXXS:$,padding:P,fontSize:T,controlHeightSM:O,fontSizeLG:N,colorTextLightSolid:I,colorErrorHover:z}=e,L=(t=e.activeBarWidth)!==null&&t!==void 0?t:0,M=(n=e.activeBarBorderWidth)!==null&&n!==void 0?n:v,j=(r=e.itemMarginInline)!==null&&r!==void 0?r:e.marginXXS,B=new yn(I).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:u,itemColor:u,colorItemTextHover:u,itemHoverColor:u,colorItemTextHoverHorizontal:i,horizontalItemHoverColor:i,colorGroupTitle:d,groupTitleColor:d,colorItemTextSelected:i,itemSelectedColor:i,subMenuItemSelectedColor:i,colorItemTextSelectedHorizontal:i,horizontalItemSelectedColor:i,colorItemBg:f,itemBg:f,colorItemBgHover:_,itemHoverBg:_,colorItemBgActive:g,itemActiveBg:S,colorSubItemBg:m,subMenuItemBg:m,colorItemBgSelected:S,itemSelectedBg:S,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:L,colorActiveBarHeight:y,activeBarHeight:y,colorActiveBarBorderSize:v,activeBarBorderWidth:M,colorItemTextDisabled:a,itemDisabledColor:a,colorDangerItemText:o,dangerItemColor:o,colorDangerItemTextHover:o,dangerItemHoverColor:o,colorDangerItemTextSelected:o,dangerItemSelectedColor:o,colorDangerItemBgActive:c,dangerItemActiveBg:c,colorDangerItemBgSelected:c,dangerItemSelectedBg:c,itemMarginInline:j,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:C,groupTitleLineHeight:E,collapsedWidth:C*2,popupBg:k,itemMarginBlock:$,itemPaddingInline:P,horizontalLineHeight:`${C*1.15}px`,iconSize:T,iconMarginInlineEnd:O-T,collapsedIconSize:N,groupTitleFontSize:T,darkItemDisabledColor:new yn(I).setA(.25).toRgbString(),darkItemColor:B,darkDangerItemColor:o,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:I,darkItemSelectedBg:i,darkDangerItemSelectedBg:o,darkItemHoverBg:"transparent",darkGroupTitleColor:B,darkItemHoverColor:I,darkDangerItemHoverColor:z,darkDangerItemSelectedColor:I,darkDangerItemActiveBg:o,itemWidth:L?`calc(100% + ${M}px)`:`calc(100% - ${j*2}px)`}},R7=(e,t=e,n=!0)=>bn("Menu",i=>{const{colorBgElevated:o,controlHeightLG:a,fontSize:c,darkItemColor:u,darkDangerItemColor:d,darkItemBg:f,darkSubMenuItemBg:m,darkItemSelectedColor:g,darkItemSelectedBg:v,darkDangerItemSelectedBg:y,darkItemHoverBg:S,darkGroupTitleColor:_,darkItemHoverColor:C,darkItemDisabledColor:E,darkDangerItemHoverColor:k,darkDangerItemSelectedColor:$,darkDangerItemActiveBg:P,popupBg:T,darkPopupBg:O}=i,N=i.calc(c).div(7).mul(5).equal(),I=tn(i,{menuArrowSize:N,menuHorizontalHeight:i.calc(a).mul(1.15).equal(),menuArrowOffset:i.calc(N).mul(.25).equal(),menuSubMenuBg:o,calc:i.calc,popupBg:T}),z=tn(I,{itemColor:u,itemHoverColor:C,groupTitleColor:_,itemSelectedColor:g,subMenuItemSelectedColor:g,itemBg:f,popupBg:O,subMenuItemBg:m,itemActiveBg:"transparent",itemSelectedBg:v,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:S,itemDisabledColor:E,dangerItemColor:d,dangerItemHoverColor:k,dangerItemSelectedColor:$,dangerItemActiveBg:P,dangerItemSelectedBg:y,menuSubMenuBg:m,horizontalItemSelectedColor:g,horizontalItemSelectedBg:v});return[k7(I),w7(I),E7(I),pw(I,"light"),pw(z,"dark"),x7(I),ik(I),na(I,"slide-up"),na(I,"slide-down"),Vu(I,"zoom-big")]},$7,{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:!0}})(e,t),A$=e=>{var t;const{popupClassName:n,icon:r,title:i,theme:o}=e,a=h.useContext(hf),{prefixCls:c,inlineCollapsed:u,theme:d}=a,f=ac();let m;if(!r)m=u&&!f.length&&i&&typeof i=="string"?h.createElement("div",{className:`${c}-inline-collapsed-noicon`},i.charAt(0)):h.createElement("span",{className:`${c}-title-content`},i);else{const y=h.isValidElement(i)&&i.type==="span";m=h.createElement(h.Fragment,null,pi(r,{className:ne(h.isValidElement(r)?(t=r.props)===null||t===void 0?void 0:t.className:void 0,`${c}-item-icon`)}),y?i:h.createElement("span",{className:`${c}-title-content`},i))}const g=h.useMemo(()=>Object.assign(Object.assign({},a),{firstLevel:!1}),[a]),[v]=oc("Menu");return h.createElement(hf.Provider,{value:g},h.createElement(lm,Object.assign({},fr(e,["icon"]),{title:m,popupClassName:ne(c,n,`${c}-${o||d}`),popupStyle:Object.assign({zIndex:v},e.popupStyle)})))};var T7=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function zg(e){return e===null||e===!1}const P7={item:L$,submenu:A$,divider:B$},O7=h.forwardRef((e,t)=>{var n;const r=h.useContext(ff),i=r||{},{getPrefixCls:o,getPopupContainer:a,direction:c,menu:u}=h.useContext(Ot),d=o(),{prefixCls:f,className:m,style:g,theme:v="light",expandIcon:y,_internalDisableMenuItemTitleTooltip:S,inlineCollapsed:_,siderCollapsed:C,rootClassName:E,mode:k,selectable:$,onClick:P,overflowedIndicatorPopupClassName:T}=e,O=T7(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),N=fr(O,["collapsedWidth"]);(n=i.validator)===null||n===void 0||n.call(i,{mode:k});const I=er((...U)=>{var Y;P==null||P.apply(void 0,U),(Y=i.onClick)===null||Y===void 0||Y.call(i)}),z=i.mode||k,L=$??i.selectable,M=_??C,j={horizontal:{motionName:`${d}-slide-up`},inline:JE(d),other:{motionName:`${d}-zoom-big`}},B=o("menu",f||i.prefixCls),H=Io(B),[W,V,A]=R7(B,H,!r),G=ne(`${B}-${v}`,u==null?void 0:u.className,m),q=h.useMemo(()=>{var U,Y;if(typeof y=="function"||zg(y))return y||null;if(typeof i.expandIcon=="function"||zg(i.expandIcon))return i.expandIcon||null;if(typeof(u==null?void 0:u.expandIcon)=="function"||zg(u==null?void 0:u.expandIcon))return(u==null?void 0:u.expandIcon)||null;const Z=(U=y??(i==null?void 0:i.expandIcon))!==null&&U!==void 0?U:u==null?void 0:u.expandIcon;return pi(Z,{className:ne(`${B}-submenu-expand-icon`,h.isValidElement(Z)?(Y=Z.props)===null||Y===void 0?void 0:Y.className:void 0)})},[y,i==null?void 0:i.expandIcon,u==null?void 0:u.expandIcon,B]),D=h.useMemo(()=>({prefixCls:B,inlineCollapsed:M||!1,direction:c,firstLevel:!0,theme:v,mode:z,disableMenuItemTitleTooltip:S}),[B,M,c,S,v]);return W(h.createElement(ff.Provider,{value:null},h.createElement(hf.Provider,{value:D},h.createElement(lc,Object.assign({getPopupContainer:a,overflowedIndicator:h.createElement(tb,null),overflowedIndicatorPopupClassName:ne(B,`${B}-${v}`,T),mode:z,selectable:L,onClick:I},N,{inlineCollapsed:M,style:Object.assign(Object.assign({},u==null?void 0:u.style),g),className:G,prefixCls:B,direction:c,defaultMotions:j,expandIcon:q,ref:t,rootClassName:ne(E,V,i.rootClassName,A,H),_internalComponents:P7})))))}),Qu=h.forwardRef((e,t)=>{const n=h.useRef(null),r=h.useContext(cm);return h.useImperativeHandle(t,()=>({menu:n.current,focus:i=>{var o;(o=n.current)===null||o===void 0||o.focus(i)}})),h.createElement(O7,Object.assign({ref:n},e,r))});Qu.Item=L$;Qu.SubMenu=A$;Qu.Divider=B$;Qu.ItemGroup=eb;const I7=e=>{const{componentCls:t,menuCls:n,colorError:r,colorTextLightSolid:i}=e,o=`${n}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${n} ${o}`]:{[`&${o}-danger:not(${o}-disabled)`]:{color:r,"&:hover":{color:i,backgroundColor:r}}}}}},N7=e=>{const{componentCls:t,menuCls:n,zIndexPopup:r,dropdownArrowDistance:i,sizePopupArrow:o,antCls:a,iconCls:c,motionDurationMid:u,paddingBlock:d,fontSize:f,dropdownEdgeChildPadding:m,colorTextDisabled:g,fontSizeIcon:v,controlPaddingHorizontal:y,colorBgElevated:S}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:"block","&::before":{position:"absolute",insetBlock:e.calc(o).div(2).sub(i).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${a}-btn`]:{[`& > ${c}-down, & > ${a}-btn-icon > ${c}-down`]:{fontSize:v}},[`${t}-wrap`]:{position:"relative",[`${a}-btn > ${c}-down`]:{fontSize:v},[`${c}-down::before`]:{transition:`transform ${u}`}},[`${t}-wrap-open`]:{[`${c}-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,
262
+ &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomLeft,
263
+ &${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottom,
264
+ &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottom,
265
+ &${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottomRight,
266
+ &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:Iy},[`&${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-topLeft,
267
+ &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-topLeft,
268
+ &${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-top,
269
+ &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-top,
270
+ &${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-topRight,
271
+ &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-topRight`]:{animationName:My},[`&${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottomLeft,
272
+ &${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottom,
273
+ &${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:Ny},[`&${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-topLeft,
274
+ &${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-top,
275
+ &${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-topRight`]:{animationName:zy}}},qy(e,S,{arrowPlacement:{top:!0,bottom:!0}}),{[`${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`]:Object.assign(Object.assign({},Un(e)),{[n]:Object.assign(Object.assign({padding:m,listStyleType:"none",backgroundColor:S,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},fo(e)),{"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${te(d)} ${te(y)}`,color:e.colorTextDescription,transition:`all ${u}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${n}-item-icon`]:{minWidth:f,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`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${te(d)} ${te(y)}`,color:e.colorText,fontWeight:"normal",fontSize:f,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${u}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},fo(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:`${te(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:v,fontStyle:"normal"}}}),[`${n}-item-group-list`]:{margin:`0 ${te(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}})})},[na(e,"slide-up"),na(e,"slide-down"),af(e,"move-up"),af(e,"move-down"),Vu(e,"zoom-big")]]},M7=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},om({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),Uy(e)),z7=bn("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:i}=e,o=tn(e,{menuCls:`${i}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return[N7(o),I7(o)]},M7,{resetStyle:!1}),um=e=>{var t;const{menu:n,arrow:r,prefixCls:i,children:o,trigger:a,disabled:c,dropdownRender:u,popupRender:d,getPopupContainer:f,overlayClassName:m,rootClassName:g,overlayStyle:v,open:y,onOpenChange:S,visible:_,onVisibleChange:C,mouseEnterDelay:E=.15,mouseLeaveDelay:k=.1,autoAdjustOverflow:$=!0,placement:P="",overlay:T,transitionName:O,destroyOnHidden:N,destroyPopupOnHide:I}=e,{getPopupContainer:z,getPrefixCls:L,direction:M,dropdown:j}=h.useContext(Ot),B=d||u;Lf();const H=h.useMemo(()=>{const be=L();return O!==void 0?O:P.includes("top")?`${be}-slide-down`:`${be}-slide-up`},[L,P,O]),W=h.useMemo(()=>P?P.includes("Center")?P.slice(0,P.indexOf("Center")):P:M==="rtl"?"bottomRight":"bottomLeft",[P,M]),V=L("dropdown",i),A=Io(V),[G,q,D]=z7(V,A),[,U]=gi(),Y=h.Children.only($L(o)?h.createElement("span",null,o):o),Z=pi(Y,{className:ne(`${V}-trigger`,{[`${V}-rtl`]:M==="rtl"},Y.props.className),disabled:(t=Y.props.disabled)!==null&&t!==void 0?t:c}),ee=c?[]:a,re=!!(ee!=null&&ee.includes("contextMenu")),[he,fe]=tr(!1,{value:y??_}),ue=er(be=>{S==null||S(be,{source:"trigger"}),C==null||C(be),fe(be)}),Se=ne(m,g,q,D,A,j==null?void 0:j.className,{[`${V}-rtl`]:M==="rtl"}),ae=f$({arrowPointAtCenter:typeof r=="object"&&r.pointAtCenter,autoAdjustOverflow:$,offset:U.marginXXS,arrowWidth:r?U.sizePopupArrow:0,borderRadius:U.borderRadius}),le=er(()=>{n!=null&&n.selectable&&(n!=null&&n.multiple)||(S==null||S(!1,{source:"menu"}),fe(!1))}),ce=()=>{let be;return n!=null&&n.items?be=h.createElement(Qu,Object.assign({},n)):typeof T=="function"?be=T():be=T,B&&(be=B(be)),be=h.Children.only(typeof be=="string"?h.createElement("span",null,be):be),h.createElement(C7,{prefixCls:`${V}-menu`,rootClassName:ne(D,A),expandIcon:h.createElement("span",{className:`${V}-menu-submenu-arrow`},M==="rtl"?h.createElement(Ru,{className:`${V}-menu-submenu-arrow-icon`}):h.createElement(Wi,{className:`${V}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:le,validator:({mode:we})=>{}},be)},[ye,me]=oc("Dropdown",v==null?void 0:v.zIndex);let de=h.createElement(_$,Object.assign({alignPoint:re},fr(e,["rootClassName"]),{mouseEnterDelay:E,mouseLeaveDelay:k,visible:he,builtinPlacements:ae,arrow:!!r,overlayClassName:Se,prefixCls:V,getPopupContainer:f||z,transitionName:H,trigger:ee,overlay:ce,placement:W,onVisibleChange:ue,overlayStyle:Object.assign(Object.assign(Object.assign({},j==null?void 0:j.style),v),{zIndex:ye}),autoDestroy:N??I}),Z);return ye&&(de=h.createElement(Hu.Provider,{value:me},de)),G(de)},j7=Ak(um,"align",void 0,"dropdown",e=>e),B7=e=>h.createElement(j7,Object.assign({},e),h.createElement("span",null));um._InternalPanelDoNotUseOrYouWillBeFired=B7;var L7=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],A7=h.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-checkbox":n,i=e.className,o=e.style,a=e.checked,c=e.disabled,u=e.defaultChecked,d=u===void 0?!1:u,f=e.type,m=f===void 0?"checkbox":f,g=e.title,v=e.onChange,y=Lt(e,L7),S=h.useRef(null),_=h.useRef(null),C=tr(d,{value:a}),E=se(C,2),k=E[0],$=E[1];h.useImperativeHandle(t,function(){return{focus:function(N){var I;(I=S.current)===null||I===void 0||I.focus(N)},blur:function(){var N;(N=S.current)===null||N===void 0||N.blur()},input:S.current,nativeElement:_.current}});var P=ne(r,i,K(K({},"".concat(r,"-checked"),k),"".concat(r,"-disabled"),c)),T=function(N){c||("checked"in e||$(N.target.checked),v==null||v({target:X(X({},e),{},{type:m,checked:N.target.checked}),stopPropagation:function(){N.stopPropagation()},preventDefault:function(){N.preventDefault()},nativeEvent:N.nativeEvent}))};return h.createElement("span",{className:P,title:g,style:o,ref:_},h.createElement("input",Re({},y,{className:"".concat(r,"-input"),ref:S,onChange:T,disabled:c,checked:!!k,type:m})),h.createElement("span",{className:"".concat(r,"-inner")}))});function D7(e){const t=J.useRef(null),n=()=>{Tn.cancel(t.current),t.current=null};return[()=>{n(),t.current=Tn(()=>{t.current=null})},o=>{t.current&&(o.stopPropagation(),n()),e==null||e(o)}]}function dm(e){return tn(e,{inputAffixPadding:e.paddingXXS})}const hm=e=>{const{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:i,controlHeightSM:o,controlHeightLG:a,fontSizeLG:c,lineHeightLG:u,paddingSM:d,controlPaddingHorizontalSM:f,controlPaddingHorizontal:m,colorFillAlter:g,colorPrimaryHover:v,colorPrimary:y,controlOutlineWidth:S,controlOutline:_,colorErrorOutline:C,colorWarningOutline:E,colorBgContainer:k,inputFontSize:$,inputFontSizeLG:P,inputFontSizeSM:T}=e,O=$||n,N=T||O,I=P||c,z=Math.round((t-O*r)/2*10)/10-i,L=Math.round((o-N*r)/2*10)/10-i,M=Math.ceil((a-I*u)/2*10)/10-i;return{paddingBlock:Math.max(z,0),paddingBlockSM:Math.max(L,0),paddingBlockLG:Math.max(M,0),paddingInline:d-i,paddingInlineSM:f-i,paddingInlineLG:m-i,addonBg:g,activeBorderColor:y,hoverBorderColor:v,activeShadow:`0 0 0 ${S}px ${_}`,errorActiveShadow:`0 0 0 ${S}px ${C}`,warningActiveShadow:`0 0 0 ${S}px ${E}`,hoverBg:k,activeBg:k,inputFontSize:O,inputFontSizeLG:I,inputFontSizeSM:N}},H7=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),fm=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])":Object.assign({},H7(tn(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),nb=(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}}),bw=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},nb(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),F7=(e,t)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},nb(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},fm(e))}),bw(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),bw(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),_w=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),W7=e=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},_w(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText})),_w(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:Object.assign({},fm(e))}})}),V7=(e,t)=>{const{componentCls:n}=e;return{"&-borderless":Object.assign({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)}},D$=(e,t)=>{var n;return{background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(n=t==null?void 0:t.inputColor)!==null&&n!==void 0?n:"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}},Sw=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},D$(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}})}),U7=(e,t)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},D$(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},fm(e))}),Sw(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),Sw(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),Cw=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),q7=e=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}}},Cw(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),Cw(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:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}})}),H$=(e,t)=>({background:e.colorBgContainer,borderWidth:`${te(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}}),ww=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},H$(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`}}),K7=(e,t)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},H$(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"}}),ww(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),ww(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),G7=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),F$=e=>{const{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:i}=e;return{padding:`${te(t)} ${te(i)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},rb=e=>({padding:`${te(e.paddingBlockSM)} ${te(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),ib=e=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${te(e.paddingBlock)} ${te(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},G7(e.colorTextPlaceholder)),{"&-lg":Object.assign({},F$(e)),"&-sm":Object.assign({},rb(e)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),X7=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`]:Object.assign({},F$(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},rb(e)),[`&-lg ${n}-select-single ${n}-select-selector`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single ${n}-select-selector`]:{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 ${te(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${te(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${te(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{[`${n}-select-selector`]:{backgroundColor:"inherit",border:`${te(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}}},[`${n}-cascader-picker`]:{margin:`-9px ${te(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}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{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 ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:Object.assign(Object.assign({display:"block"},tf()),{[`${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},[`
276
+ & > ${t}-affix-wrapper,
277
+ & > ${t}-number-affix-wrapper,
278
+ & > ${n}-picker-range
279
+ `]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:"none"},[`& > ${n}-select > ${n}-select-selector,
280
+ & > ${n}-select-auto-complete ${t},
281
+ & > ${n}-cascader-picker ${t},
282
+ & > ${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,
283
+ & > ${n}-select:first-child > ${n}-select-selector,
284
+ & > ${n}-select-auto-complete:first-child ${t},
285
+ & > ${n}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child,
286
+ & > ${n}-select:last-child > ${n}-select-selector,
287
+ & > ${n}-cascader-picker:last-child ${t},
288
+ & > ${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`]:{borderRadius:0}},[`${t}-group-wrapper:not(:last-child)`]:{[`&${t}-search > ${t}-group`]:{[`& > ${t}-group-addon > ${t}-search-button`]:{borderRadius:0},[`& > ${t}`]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}})}},Y7=e=>{const{componentCls:t,controlHeightSM:n,lineWidth:r,calc:i}=e,a=i(n).sub(i(r).mul(2)).sub(16).div(2).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Un(e)),ib(e)),F7(e)),U7(e)),V7(e)),K7(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"}})}},J7=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 ${te(e.inputAffixPadding)}`}}}},Q7=e=>{const{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:i,colorIcon:o,colorIconHover:a,iconCls:c}=e,u=`${t}-affix-wrapper`,d=`${t}-affix-wrapper-disabled`;return{[u]:Object.assign(Object.assign(Object.assign(Object.assign({},ib(e)),{display:"inline-flex",[`&:not(${t}-disabled):hover`]:{zIndex:1,[`${t}-search-with-button &`]:{zIndex:0}},"&-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}}}),J7(e)),{[`${c}${t}-password-icon`]:{color:o,cursor:"pointer",transition:`all ${i}`,"&:hover":{color:a}}}),[`${t}-underlined`]:{borderRadius:0},[d]:{[`${c}${t}-password-icon`]:{color:o,cursor:"not-allowed","&:hover":{color:o}}}}},Z7=e=>{const{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{[`${t}-group`]:Object.assign(Object.assign(Object.assign({},Un(e)),X7(e)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({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}}},W7(e)),q7(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}}})})}},eA=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-search`;return{[r]:{[t]:{"&:not([disabled]):hover, &:not([disabled]):focus":{[`+ ${t}-group-addon ${r}-button:not(${n}-btn-color-primary):not(${n}-btn-variant-text)`]:{borderInlineStartColor:e.colorPrimaryHover}}},[`${t}-affix-wrapper`]:{height:e.controlHeight,borderRadius:0},[`${t}-lg`]:{lineHeight:e.calc(e.lineHeightLG).sub(2e-4).equal()},[`> ${t}-group`]:{[`> ${t}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${r}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${r}-button:not(${n}-btn-color-primary)`]:{color:e.colorTextDescription,"&:not([disabled]):hover":{color:e.colorPrimaryHover},"&:active":{color:e.colorPrimaryActive},[`&${n}-btn-loading::before`]:{inset:0}}}},[`${r}-button`]:{height:e.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${t}-affix-wrapper, ${r}-button`]:{height:e.controlHeightLG}},"&-small":{[`${t}-affix-wrapper, ${r}-button`]:{height:e.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${t}-compact-item`]:{[`&:not(${t}-compact-last-item)`]:{[`${t}-group-addon`]:{[`${t}-search-button`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${t}-compact-first-item)`]:{[`${t},${t}-affix-wrapper`]:{borderRadius:0}},[`> ${t}-group-addon ${t}-search-button,
289
+ > ${t},
290
+ ${t}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${t}-affix-wrapper-focused`]:{zIndex:2}}}}},tA=e=>{const{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},nA=bn(["Input","Shared"],e=>{const t=tn(e,dm(e));return[Y7(t),Q7(t)]},hm,{resetFont:!1});bn(["Input","Component"],e=>{const t=tn(e,dm(e));return[Z7(t),eA(t),tA(t),Qf(t)]},hm,{resetFont:!1});var rA={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"},iA=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:rA}))},oA=h.forwardRef(iA);const mm=h.createContext(null);var sA=function(t){var n=t.activeTabOffset,r=t.horizontal,i=t.rtl,o=t.indicator,a=o===void 0?{}:o,c=a.size,u=a.align,d=u===void 0?"center":u,f=h.useState(),m=se(f,2),g=m[0],v=m[1],y=h.useRef(),S=J.useCallback(function(C){return typeof c=="function"?c(C):typeof c=="number"?c:C},[c]);function _(){Tn.cancel(y.current)}return h.useEffect(function(){var C={};if(n)if(r){C.width=S(n.width);var E=i?"right":"left";d==="start"&&(C[E]=n[E]),d==="center"&&(C[E]=n[E]+n.width/2,C.transform=i?"translateX(50%)":"translateX(-50%)"),d==="end"&&(C[E]=n[E]+n.width,C.transform="translateX(-100%)")}else C.height=S(n.height),d==="start"&&(C.top=n.top),d==="center"&&(C.top=n.top+n.height/2,C.transform="translateY(-50%)"),d==="end"&&(C.top=n.top+n.height,C.transform="translateY(-100%)");return _(),y.current=Tn(function(){var k=g&&C&&Object.keys(C).every(function($){var P=C[$],T=g[$];return typeof P=="number"&&typeof T=="number"?Math.round(P)===Math.round(T):P===T});k||v(C)}),_},[JSON.stringify(n),r,i,d,S]),{style:g}},xw={width:0,height:0,left:0,top:0};function aA(e,t,n){return h.useMemo(function(){for(var r,i=new Map,o=t.get((r=e[0])===null||r===void 0?void 0:r.key)||xw,a=o.left+o.width,c=0;c<e.length;c+=1){var u=e[c].key,d=t.get(u);if(!d){var f;d=t.get((f=e[c-1])===null||f===void 0?void 0:f.key)||xw}var m=i.get(u)||X({},d);m.right=a-m.left-m.width,i.set(u,m)}return i},[e.map(function(r){return r.key}).join("_"),t,n])}function Ew(e,t){var n=h.useRef(e),r=h.useState({}),i=se(r,2),o=i[1];function a(c){var u=typeof c=="function"?c(n.current):c;u!==n.current&&t(u,n.current),n.current=u,o({})}return[n.current,a]}var lA=.1,kw=.01,Ah=20,$w=Math.pow(.995,Ah);function cA(e,t){var n=h.useState(),r=se(n,2),i=r[0],o=r[1],a=h.useState(0),c=se(a,2),u=c[0],d=c[1],f=h.useState(0),m=se(f,2),g=m[0],v=m[1],y=h.useState(),S=se(y,2),_=S[0],C=S[1],E=h.useRef();function k(I){var z=I.touches[0],L=z.screenX,M=z.screenY;o({x:L,y:M}),window.clearInterval(E.current)}function $(I){if(i){var z=I.touches[0],L=z.screenX,M=z.screenY;o({x:L,y:M});var j=L-i.x,B=M-i.y;t(j,B);var H=Date.now();d(H),v(H-u),C({x:j,y:B})}}function P(){if(i&&(o(null),C(null),_)){var I=_.x/g,z=_.y/g,L=Math.abs(I),M=Math.abs(z);if(Math.max(L,M)<lA)return;var j=I,B=z;E.current=window.setInterval(function(){if(Math.abs(j)<kw&&Math.abs(B)<kw){window.clearInterval(E.current);return}j*=$w,B*=$w,t(j*Ah,B*Ah)},Ah)}}var T=h.useRef();function O(I){var z=I.deltaX,L=I.deltaY,M=0,j=Math.abs(z),B=Math.abs(L);j===B?M=T.current==="x"?z:L:j>B?(M=z,T.current="x"):(M=L,T.current="y"),t(-M,-M)&&I.preventDefault()}var N=h.useRef(null);N.current={onTouchStart:k,onTouchMove:$,onTouchEnd:P,onWheel:O},h.useEffect(function(){function I(j){N.current.onTouchStart(j)}function z(j){N.current.onTouchMove(j)}function L(j){N.current.onTouchEnd(j)}function M(j){N.current.onWheel(j)}return document.addEventListener("touchmove",z,{passive:!1}),document.addEventListener("touchend",L,{passive:!0}),e.current.addEventListener("touchstart",I,{passive:!0}),e.current.addEventListener("wheel",M,{passive:!1}),function(){document.removeEventListener("touchmove",z),document.removeEventListener("touchend",L)}},[])}function W$(e){var t=h.useState(0),n=se(t,2),r=n[0],i=n[1],o=h.useRef(0),a=h.useRef();return a.current=e,_v(function(){var c;(c=a.current)===null||c===void 0||c.call(a)},[r]),function(){o.current===r&&(o.current+=1,i(o.current))}}function uA(e){var t=h.useRef([]),n=h.useState({}),r=se(n,2),i=r[1],o=h.useRef(typeof e=="function"?e():e),a=W$(function(){var u=o.current;t.current.forEach(function(d){u=d(u)}),t.current=[],o.current=u,i({})});function c(u){t.current.push(u),a()}return[o.current,c]}var Rw={width:0,height:0,left:0,top:0,right:0};function dA(e,t,n,r,i,o,a){var c=a.tabs,u=a.tabPosition,d=a.rtl,f,m,g;return["top","bottom"].includes(u)?(f="width",m=d?"right":"left",g=Math.abs(n)):(f="height",m="top",g=-n),h.useMemo(function(){if(!c.length)return[0,0];for(var v=c.length,y=v,S=0;S<v;S+=1){var _=e.get(c[S].key)||Rw;if(Math.floor(_[m]+_[f])>Math.floor(g+t)){y=S-1;break}}for(var C=0,E=v-1;E>=0;E-=1){var k=e.get(c[E].key)||Rw;if(k[m]<g){C=E+1;break}}return C>y?[0,-1]:[C,y]},[e,t,r,i,o,g,u,c.map(function(v){return v.key}).join("_"),d])}function Tw(e){var t;return e instanceof Map?(t={},e.forEach(function(n,r){t[r]=n})):t=e,JSON.stringify(t)}var hA="TABS_DQ";function V$(e){return String(e).replace(/"/g,hA)}function ob(e,t,n,r){return!(!n||r||e===!1||e===void 0&&(t===!1||t===null))}var U$=h.forwardRef(function(e,t){var n=e.prefixCls,r=e.editable,i=e.locale,o=e.style;return!r||r.showAdd===!1?null:h.createElement("button",{ref:t,type:"button",className:"".concat(n,"-nav-add"),style:o,"aria-label":(i==null?void 0:i.addAriaLabel)||"Add tab",onClick:function(c){r.onEdit("add",{event:c})}},r.addIcon||"+")}),Pw=h.forwardRef(function(e,t){var n=e.position,r=e.prefixCls,i=e.extra;if(!i)return null;var o,a={};return _t(i)==="object"&&!h.isValidElement(i)?a=i:a.right=i,n==="right"&&(o=a.right),n==="left"&&(o=a.left),o?h.createElement("div",{className:"".concat(r,"-extra-content"),ref:t},o):null}),fA=h.forwardRef(function(e,t){var n=e.prefixCls,r=e.id,i=e.tabs,o=e.locale,a=e.mobile,c=e.more,u=c===void 0?{}:c,d=e.style,f=e.className,m=e.editable,g=e.tabBarGutter,v=e.rtl,y=e.removeAriaLabel,S=e.onTabClick,_=e.getPopupContainer,C=e.popupClassName,E=h.useState(!1),k=se(E,2),$=k[0],P=k[1],T=h.useState(null),O=se(T,2),N=O[0],I=O[1],z=u.icon,L=z===void 0?"More":z,M="".concat(r,"-more-popup"),j="".concat(n,"-dropdown"),B=N!==null?"".concat(M,"-").concat(N):null,H=o==null?void 0:o.dropdownAriaLabel;function W(Y,Z){Y.preventDefault(),Y.stopPropagation(),m.onEdit("remove",{key:Z,event:Y})}var V=h.createElement(lc,{onClick:function(Z){var ee=Z.key,re=Z.domEvent;S(ee,re),P(!1)},prefixCls:"".concat(j,"-menu"),id:M,tabIndex:-1,role:"listbox","aria-activedescendant":B,selectedKeys:[N],"aria-label":H!==void 0?H:"expanded dropdown"},i.map(function(Y){var Z=Y.closable,ee=Y.disabled,re=Y.closeIcon,he=Y.key,fe=Y.label,ue=ob(Z,re,m,ee);return h.createElement(Ju,{key:he,id:"".concat(M,"-").concat(he),role:"option","aria-controls":r&&"".concat(r,"-panel-").concat(he),disabled:ee},h.createElement("span",null,fe),ue&&h.createElement("button",{type:"button","aria-label":y||"remove",tabIndex:0,className:"".concat(j,"-menu-item-remove"),onClick:function(ae){ae.stopPropagation(),W(ae,he)}},re||m.removeIcon||"×"))}));function A(Y){for(var Z=i.filter(function(ue){return!ue.disabled}),ee=Z.findIndex(function(ue){return ue.key===N})||0,re=Z.length,he=0;he<re;he+=1){ee=(ee+Y+re)%re;var fe=Z[ee];if(!fe.disabled){I(fe.key);return}}}function G(Y){var Z=Y.which;if(!$){[Ge.DOWN,Ge.SPACE,Ge.ENTER].includes(Z)&&(P(!0),Y.preventDefault());return}switch(Z){case Ge.UP:A(-1),Y.preventDefault();break;case Ge.DOWN:A(1),Y.preventDefault();break;case Ge.ESC:P(!1);break;case Ge.SPACE:case Ge.ENTER:N!==null&&S(N,Y);break}}h.useEffect(function(){var Y=document.getElementById(B);Y&&Y.scrollIntoView&&Y.scrollIntoView(!1)},[N]),h.useEffect(function(){$||I(null)},[$]);var q=K({},v?"marginRight":"marginLeft",g);i.length||(q.visibility="hidden",q.order=1);var D=ne(K({},"".concat(j,"-rtl"),v)),U=a?null:h.createElement(_$,Re({prefixCls:j,overlay:V,visible:i.length?$:!1,onVisibleChange:P,overlayClassName:ne(D,C),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:_},u),h.createElement("button",{type:"button",className:"".concat(n,"-nav-more"),style:q,"aria-haspopup":"listbox","aria-controls":M,id:"".concat(r,"-more"),"aria-expanded":$,onKeyDown:G},L));return h.createElement("div",{className:ne("".concat(n,"-nav-operations"),f),style:d,ref:t},U,h.createElement(U$,{prefixCls:n,locale:o,editable:m}))});const mA=h.memo(fA,function(e,t){return t.tabMoving});var pA=function(t){var n=t.prefixCls,r=t.id,i=t.active,o=t.focus,a=t.tab,c=a.key,u=a.label,d=a.disabled,f=a.closeIcon,m=a.icon,g=t.closable,v=t.renderWrapper,y=t.removeAriaLabel,S=t.editable,_=t.onClick,C=t.onFocus,E=t.onBlur,k=t.onKeyDown,$=t.onMouseDown,P=t.onMouseUp,T=t.style,O=t.tabCount,N=t.currentPosition,I="".concat(n,"-tab"),z=ob(g,f,S,d);function L(W){d||_(W)}function M(W){W.preventDefault(),W.stopPropagation(),S.onEdit("remove",{key:c,event:W})}var j=h.useMemo(function(){return m&&typeof u=="string"?h.createElement("span",null,u):u},[u,m]),B=h.useRef(null);h.useEffect(function(){o&&B.current&&B.current.focus()},[o]);var H=h.createElement("div",{key:c,"data-node-key":V$(c),className:ne(I,K(K(K(K({},"".concat(I,"-with-remove"),z),"".concat(I,"-active"),i),"".concat(I,"-disabled"),d),"".concat(I,"-focus"),o)),style:T,onClick:L},h.createElement("div",{ref:B,role:"tab","aria-selected":i,id:r&&"".concat(r,"-tab-").concat(c),className:"".concat(I,"-btn"),"aria-controls":r&&"".concat(r,"-panel-").concat(c),"aria-disabled":d,tabIndex:d?null:i?0:-1,onClick:function(V){V.stopPropagation(),L(V)},onKeyDown:k,onMouseDown:$,onMouseUp:P,onFocus:C,onBlur:E},o&&h.createElement("div",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"Tab ".concat(N," of ").concat(O)),m&&h.createElement("span",{className:"".concat(I,"-icon")},m),u&&j),z&&h.createElement("button",{type:"button",role:"tab","aria-label":y||"remove",tabIndex:i?0:-1,className:"".concat(I,"-remove"),onClick:function(V){V.stopPropagation(),M(V)}},f||S.removeIcon||"×"));return v?v(H):H},gA=function(t,n){var r=t.offsetWidth,i=t.offsetHeight,o=t.offsetTop,a=t.offsetLeft,c=t.getBoundingClientRect(),u=c.width,d=c.height,f=c.left,m=c.top;return Math.abs(u-r)<1?[u,d,f-n.left,m-n.top]:[r,i,a,o]},$l=function(t){var n=t.current||{},r=n.offsetWidth,i=r===void 0?0:r,o=n.offsetHeight,a=o===void 0?0:o;if(t.current){var c=t.current.getBoundingClientRect(),u=c.width,d=c.height;if(Math.abs(u-i)<1)return[u,d]}return[i,a]},hh=function(t,n){return t[n?0:1]},Ow=h.forwardRef(function(e,t){var n=e.className,r=e.style,i=e.id,o=e.animated,a=e.activeKey,c=e.rtl,u=e.extra,d=e.editable,f=e.locale,m=e.tabPosition,g=e.tabBarGutter,v=e.children,y=e.onTabClick,S=e.onTabScroll,_=e.indicator,C=h.useContext(mm),E=C.prefixCls,k=C.tabs,$=h.useRef(null),P=h.useRef(null),T=h.useRef(null),O=h.useRef(null),N=h.useRef(null),I=h.useRef(null),z=h.useRef(null),L=m==="top"||m==="bottom",M=Ew(0,function(lt,Ze){L&&S&&S({direction:lt>Ze?"left":"right"})}),j=se(M,2),B=j[0],H=j[1],W=Ew(0,function(lt,Ze){!L&&S&&S({direction:lt>Ze?"top":"bottom"})}),V=se(W,2),A=V[0],G=V[1],q=h.useState([0,0]),D=se(q,2),U=D[0],Y=D[1],Z=h.useState([0,0]),ee=se(Z,2),re=ee[0],he=ee[1],fe=h.useState([0,0]),ue=se(fe,2),Se=ue[0],ae=ue[1],le=h.useState([0,0]),ce=se(le,2),ye=ce[0],me=ce[1],de=uA(new Map),be=se(de,2),we=be[0],Te=be[1],ze=aA(k,we,re[0]),Ee=hh(U,L),ke=hh(re,L),je=hh(Se,L),Oe=hh(ye,L),Qe=Math.floor(Ee)<Math.floor(ke+je),at=Qe?Ee-Oe:Ee-je,$t="".concat(E,"-nav-operations-hidden"),pt=0,Je=0;L&&c?(pt=0,Je=Math.max(0,ke-at)):(pt=Math.min(0,at-ke),Je=0);function ft(lt){return lt<pt?pt:lt>Je?Je:lt}var Xe=h.useRef(null),yt=h.useState(),tt=se(yt,2),Le=tt[0],rt=tt[1];function Me(){rt(Date.now())}function qe(){Xe.current&&clearTimeout(Xe.current)}cA(O,function(lt,Ze){function Tt(Gt,Ke){Gt(function(vt){var Nt=ft(vt+Ke);return Nt})}return Qe?(L?Tt(H,lt):Tt(G,Ze),qe(),Me(),!0):!1}),h.useEffect(function(){return qe(),Le&&(Xe.current=setTimeout(function(){rt(0)},100)),qe},[Le]);var It=dA(ze,at,L?B:A,ke,je,Oe,X(X({},e),{},{tabs:k})),St=se(It,2),nn=St[0],Jt=St[1],_n=er(function(){var lt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a,Ze=ze.get(lt)||{width:0,height:0,left:0,right:0,top:0};if(L){var Tt=B;c?Ze.right<B?Tt=Ze.right:Ze.right+Ze.width>B+at&&(Tt=Ze.right+Ze.width-at):Ze.left<-B?Tt=-Ze.left:Ze.left+Ze.width>-B+at&&(Tt=-(Ze.left+Ze.width-at)),G(0),H(ft(Tt))}else{var Gt=A;Ze.top<-A?Gt=-Ze.top:Ze.top+Ze.height>-A+at&&(Gt=-(Ze.top+Ze.height-at)),H(0),G(ft(Gt))}}),In=h.useState(),on=se(In,2),Ht=on[0],Rt=on[1],sn=h.useState(!1),Xt=se(sn,2),ot=Xt[0],Et=Xt[1],mt=k.filter(function(lt){return!lt.disabled}).map(function(lt){return lt.key}),Ie=function(Ze){var Tt=mt.indexOf(Ht||a),Gt=mt.length,Ke=(Tt+Ze+Gt)%Gt,vt=mt[Ke];Rt(vt)},$e=function(Ze,Tt){var Gt=mt.indexOf(Ze),Ke=k.find(function(Nt){return Nt.key===Ze}),vt=ob(Ke==null?void 0:Ke.closable,Ke==null?void 0:Ke.closeIcon,d,Ke==null?void 0:Ke.disabled);vt&&(Tt.preventDefault(),Tt.stopPropagation(),d.onEdit("remove",{key:Ze,event:Tt}),Gt===mt.length-1?Ie(-1):Ie(1))},xe=function(Ze,Tt){Et(!0),Tt.button===1&&$e(Ze,Tt)},Ae=function(Ze){var Tt=Ze.code,Gt=c&&L,Ke=mt[0],vt=mt[mt.length-1];switch(Tt){case"ArrowLeft":{L&&Ie(Gt?1:-1);break}case"ArrowRight":{L&&Ie(Gt?-1:1);break}case"ArrowUp":{Ze.preventDefault(),L||Ie(-1);break}case"ArrowDown":{Ze.preventDefault(),L||Ie(1);break}case"Home":{Ze.preventDefault(),Rt(Ke);break}case"End":{Ze.preventDefault(),Rt(vt);break}case"Enter":case"Space":{Ze.preventDefault(),y(Ht??a,Ze);break}case"Backspace":case"Delete":{$e(Ht,Ze);break}}},et={};L?et[c?"marginRight":"marginLeft"]=g:et.marginTop=g;var nt=k.map(function(lt,Ze){var Tt=lt.key;return h.createElement(pA,{id:i,prefixCls:E,key:Tt,tab:lt,style:Ze===0?void 0:et,closable:lt.closable,editable:d,active:Tt===a,focus:Tt===Ht,renderWrapper:v,removeAriaLabel:f==null?void 0:f.removeAriaLabel,tabCount:mt.length,currentPosition:Ze+1,onClick:function(Ke){y(Tt,Ke)},onKeyDown:Ae,onFocus:function(){ot||Rt(Tt),_n(Tt),Me(),O.current&&(c||(O.current.scrollLeft=0),O.current.scrollTop=0)},onBlur:function(){Rt(void 0)},onMouseDown:function(Ke){return xe(Tt,Ke)},onMouseUp:function(){Et(!1)}})}),Ft=function(){return Te(function(){var Ze,Tt=new Map,Gt=(Ze=N.current)===null||Ze===void 0?void 0:Ze.getBoundingClientRect();return k.forEach(function(Ke){var vt,Nt=Ke.key,gn=(vt=N.current)===null||vt===void 0?void 0:vt.querySelector('[data-node-key="'.concat(V$(Nt),'"]'));if(gn){var sr=gA(gn,Gt),Ln=se(sr,4),Xr=Ln[0],_r=Ln[1],Yr=Ln[2],Sr=Ln[3];Tt.set(Nt,{width:Xr,height:_r,left:Yr,top:Sr})}}),Tt})};h.useEffect(function(){Ft()},[k.map(function(lt){return lt.key}).join("_")]);var Kt=W$(function(){var lt=$l($),Ze=$l(P),Tt=$l(T);Y([lt[0]-Ze[0]-Tt[0],lt[1]-Ze[1]-Tt[1]]);var Gt=$l(z);ae(Gt);var Ke=$l(I);me(Ke);var vt=$l(N);he([vt[0]-Gt[0],vt[1]-Gt[1]]),Ft()}),Bt=k.slice(0,nn),At=k.slice(Jt+1),Pn=[].concat(We(Bt),We(At)),kn=ze.get(a),Nn=sA({activeTabOffset:kn,horizontal:L,indicator:_,rtl:c}),Hn=Nn.style;h.useEffect(function(){_n()},[a,pt,Je,Tw(kn),Tw(ze),L]),h.useEffect(function(){Kt()},[c]);var cn=!!Pn.length,mn="".concat(E,"-nav-wrap"),He,Ye,Pt,gt;return L?c?(Ye=B>0,He=B!==Je):(He=B<0,Ye=B!==pt):(Pt=A<0,gt=A!==pt),h.createElement(co,{onResize:Kt},h.createElement("div",{ref:Jo(t,$),role:"tablist","aria-orientation":L?"horizontal":"vertical",className:ne("".concat(E,"-nav"),n),style:r,onKeyDown:function(){Me()}},h.createElement(Pw,{ref:P,position:"left",extra:u,prefixCls:E}),h.createElement(co,{onResize:Kt},h.createElement("div",{className:ne(mn,K(K(K(K({},"".concat(mn,"-ping-left"),He),"".concat(mn,"-ping-right"),Ye),"".concat(mn,"-ping-top"),Pt),"".concat(mn,"-ping-bottom"),gt)),ref:O},h.createElement(co,{onResize:Kt},h.createElement("div",{ref:N,className:"".concat(E,"-nav-list"),style:{transform:"translate(".concat(B,"px, ").concat(A,"px)"),transition:Le?"none":void 0}},nt,h.createElement(U$,{ref:z,prefixCls:E,locale:f,editable:d,style:X(X({},nt.length===0?void 0:et),{},{visibility:cn?"hidden":null})}),h.createElement("div",{className:ne("".concat(E,"-ink-bar"),K({},"".concat(E,"-ink-bar-animated"),o.inkBar)),style:Hn}))))),h.createElement(mA,Re({},e,{removeAriaLabel:f==null?void 0:f.removeAriaLabel,ref:I,prefixCls:E,tabs:Pn,className:!cn&&$t,tabMoving:!!Le})),h.createElement(Pw,{ref:T,position:"right",extra:u,prefixCls:E})))}),q$=h.forwardRef(function(e,t){var n=e.prefixCls,r=e.className,i=e.style,o=e.id,a=e.active,c=e.tabKey,u=e.children;return h.createElement("div",{id:o&&"".concat(o,"-panel-").concat(c),role:"tabpanel",tabIndex:a?0:-1,"aria-labelledby":o&&"".concat(o,"-tab-").concat(c),"aria-hidden":!a,style:i,className:ne(n,a&&"".concat(n,"-active"),r),ref:t},u)}),vA=["renderTabBar"],yA=["label","key"],bA=function(t){var n=t.renderTabBar,r=Lt(t,vA),i=h.useContext(mm),o=i.tabs;if(n){var a=X(X({},r),{},{panes:o.map(function(c){var u=c.label,d=c.key,f=Lt(c,yA);return h.createElement(q$,Re({tab:u,key:d,tabKey:d},f))})});return n(a,Ow)}return h.createElement(Ow,r)},_A=["key","forceRender","style","className","destroyInactiveTabPane"],SA=function(t){var n=t.id,r=t.activeKey,i=t.animated,o=t.tabPosition,a=t.destroyInactiveTabPane,c=h.useContext(mm),u=c.prefixCls,d=c.tabs,f=i.tabPane,m="".concat(u,"-tabpane");return h.createElement("div",{className:ne("".concat(u,"-content-holder"))},h.createElement("div",{className:ne("".concat(u,"-content"),"".concat(u,"-content-").concat(o),K({},"".concat(u,"-content-animated"),f))},d.map(function(g){var v=g.key,y=g.forceRender,S=g.style,_=g.className,C=g.destroyInactiveTabPane,E=Lt(g,_A),k=v===r;return h.createElement(qi,Re({key:v,visible:k,forceRender:y,removeOnLeave:!!(a||C),leavedClassName:"".concat(m,"-hidden")},i.tabPaneMotion),function($,P){var T=$.style,O=$.className;return h.createElement(q$,Re({},E,{prefixCls:m,id:n,tabKey:v,animated:f,active:k,style:X(X({},S),T),className:ne(_,O),ref:P}))})})))};function CA(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},t;return e===!1?t={inkBar:!1,tabPane:!1}:e===!0?t={inkBar:!0,tabPane:!1}:t=X({inkBar:!0},_t(e)==="object"?e:{}),t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}var wA=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","more","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicator"],Iw=0,xA=h.forwardRef(function(e,t){var n=e.id,r=e.prefixCls,i=r===void 0?"rc-tabs":r,o=e.className,a=e.items,c=e.direction,u=e.activeKey,d=e.defaultActiveKey,f=e.editable,m=e.animated,g=e.tabPosition,v=g===void 0?"top":g,y=e.tabBarGutter,S=e.tabBarStyle,_=e.tabBarExtraContent,C=e.locale,E=e.more,k=e.destroyInactiveTabPane,$=e.renderTabBar,P=e.onChange,T=e.onTabClick,O=e.onTabScroll,N=e.getPopupContainer,I=e.popupClassName,z=e.indicator,L=Lt(e,wA),M=h.useMemo(function(){return(a||[]).filter(function(ye){return ye&&_t(ye)==="object"&&"key"in ye})},[a]),j=c==="rtl",B=CA(m),H=h.useState(!1),W=se(H,2),V=W[0],A=W[1];h.useEffect(function(){A(Ly())},[]);var G=tr(function(){var ye;return(ye=M[0])===null||ye===void 0?void 0:ye.key},{value:u,defaultValue:d}),q=se(G,2),D=q[0],U=q[1],Y=h.useState(function(){return M.findIndex(function(ye){return ye.key===D})}),Z=se(Y,2),ee=Z[0],re=Z[1];h.useEffect(function(){var ye=M.findIndex(function(de){return de.key===D});if(ye===-1){var me;ye=Math.max(0,Math.min(ee,M.length-1)),U((me=M[ye])===null||me===void 0?void 0:me.key)}re(ye)},[M.map(function(ye){return ye.key}).join("_"),D,ee]);var he=tr(null,{value:n}),fe=se(he,2),ue=fe[0],Se=fe[1];h.useEffect(function(){n||(Se("rc-tabs-".concat(Iw)),Iw+=1)},[]);function ae(ye,me){T==null||T(ye,me);var de=ye!==D;U(ye),de&&(P==null||P(ye))}var le={id:ue,activeKey:D,animated:B,tabPosition:v,rtl:j,mobile:V},ce=X(X({},le),{},{editable:f,locale:C,more:E,tabBarGutter:y,onTabClick:ae,onTabScroll:O,extra:_,style:S,panes:null,getPopupContainer:N,popupClassName:I,indicator:z});return h.createElement(mm.Provider,{value:{tabs:M,prefixCls:i}},h.createElement("div",Re({ref:t,id:n,className:ne(i,"".concat(i,"-").concat(v),K(K(K({},"".concat(i,"-mobile"),V),"".concat(i,"-editable"),f),"".concat(i,"-rtl"),j),o)},L),h.createElement(bA,Re({},ce,{renderTabBar:$})),h.createElement(SA,Re({destroyInactiveTabPane:k},le,{animated:B}))))});const EA={motionAppear:!1,motionEnter:!0,motionLeave:!0};function kA(e,t={inkBar:!0,tabPane:!1}){let n;return t===!1?n={inkBar:!1,tabPane:!1}:t===!0?n={inkBar:!0,tabPane:!0}:n=Object.assign({inkBar:!0},typeof t=="object"?t:{}),n.tabPane&&(n.tabPaneMotion=Object.assign(Object.assign({},EA),{motionName:Ko(e,"switch")})),n}var $A=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function RA(e){return e.filter(t=>t)}function TA(e,t){if(e)return e.map(r=>{var i;const o=(i=r.destroyOnHidden)!==null&&i!==void 0?i:r.destroyInactiveTabPane;return Object.assign(Object.assign({},r),{destroyInactiveTabPane:o})});const n=mi(t).map(r=>{if(h.isValidElement(r)){const{key:i,props:o}=r,a=o||{},{tab:c}=a,u=$A(a,["tab"]);return Object.assign(Object.assign({key:String(i)},u),{label:c})}return null});return RA(n)}const PA=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}`}}}}},[na(e,"slide-up"),na(e,"slide-down")]]},OA=e=>{const{componentCls:t,tabsCardPadding:n,cardBg:r,cardGutter:i,colorBorderSecondary:o,itemSelectedColor:a}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:r,border:`${te(e.lineWidth)} ${e.lineType} ${o}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:a,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:Oa(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_:!0,value:te(i)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${te(e.borderRadiusLG)} ${te(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${te(e.borderRadiusLG)} ${te(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:te(i)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${te(e.borderRadiusLG)} 0 0 ${te(e.borderRadiusLG)}`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${te(e.borderRadiusLG)} ${te(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},IA=e=>{const{componentCls:t,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=e;return{[`${t}-dropdown`]:Object.assign(Object.assign({},Un(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${te(r)} 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":Object.assign(Object.assign({},xu),{display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${te(e.paddingXXS)} ${te(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_:!0,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"}}})}})}},NA=e=>{const{componentCls:t,margin:n,colorBorderSecondary:r,horizontalMargin:i,verticalItemPadding:o,verticalItemMargin:a,calc:c}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:"column",[`> ${t}-nav, > div > ${t}-nav`]:{margin:i,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${te(e.lineWidth)} ${e.lineType} ${r}`,content:"''"},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:`width ${e.motionDurationSlow}, left ${e.motionDurationSlow},
291
+ right ${e.motionDurationSlow}`}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,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,
292
+ > 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:c(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:o,textAlign:"center"},[`${t}-tab + ${t}-tab`]:{margin:a},[`${t}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,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_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:te(c(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:c(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},MA=e=>{const{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:i,cardHeightLG:o,horizontalItemPaddingSM:a,horizontalItemPaddingLG:c}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:a,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:c,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:i,minHeight:i}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${te(e.borderRadius)} ${te(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${te(e.borderRadius)} ${te(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${te(e.borderRadius)} ${te(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${te(e.borderRadius)} 0 0 ${te(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:o,minHeight:o}}}}}},zA=e=>{const{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:i,tabsHorizontalItemMargin:o,horizontalItemPadding:a,itemSelectedColor:c,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":Object.assign({flex:"none",lineHeight:1,marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,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}},fo(e)),"&:hover":{color:r},[`&${d}-active ${d}-btn`]:{color:c,textShadow:e.tabsActiveTextShadow},[`&${d}-focus ${d}-btn:focus-visible`]:Oa(e),[`&${d}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${d}-disabled ${d}-btn, &${d}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${d}-remove ${i}`]:{margin:0,verticalAlign:"middle"},[`${i}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${d} + ${d}`]:{margin:{_skip_check_:!0,value:o}}}},jA=e=>{const{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:i,calc:o}=e;return{[`${t}-rtl`]:{direction:"rtl",[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:n},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[r]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:te(e.marginSM)}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:te(e.marginXS)},marginLeft:{_skip_check_:!0,value:te(o(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_:!0,value:i},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:"rtl"},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},BA=e=>{const{componentCls:t,tabsCardPadding:n,cardHeight:r,cardGutter:i,itemHoverColor:o,itemActiveColor:a,colorBorderSecondary:c}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},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_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},[`${t}-nav-add`]:Object.assign({minWidth:r,minHeight:r,marginLeft:{_skip_check_:!0,value:i},background:"transparent",border:`${te(e.lineWidth)} ${e.lineType} ${c}`,borderRadius:`${te(e.borderRadiusLG)} ${te(e.borderRadiusLG)} 0 0`,outline:"none",cursor:"pointer",color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:o},"&:active, &:focus:not(:focus-visible)":{color:a}},fo(e,-3))},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.inkBarColor,pointerEvents:"none"}}),zA(e)),{[`${t}-content`]:{position:"relative",width:"100%"},[`${t}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-tabpane`]:Object.assign(Object.assign({},fo(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"}}}}}},LA=e=>{const{cardHeight:t,cardHeightSM:n,cardHeightLG:r,controlHeight:i,controlHeightLG:o}=e,a=t||o,c=n||i,u=r||o+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:a,cardHeightSM:c,cardHeightLG:u,cardPadding:`${(a-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(c-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}},AA=bn("Tabs",e=>{const t=tn(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${te(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${te(e.horizontalItemGutter)}`});return[MA(t),jA(t),NA(t),IA(t),OA(t),BA(t),PA(t)]},LA),DA=()=>null;var HA=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const FA=h.forwardRef((e,t)=>{var n,r,i,o,a,c,u,d,f,m,g;const{type:v,className:y,rootClassName:S,size:_,onEdit:C,hideAdd:E,centered:k,addIcon:$,removeIcon:P,moreIcon:T,more:O,popupClassName:N,children:I,items:z,animated:L,style:M,indicatorSize:j,indicator:B,destroyInactiveTabPane:H,destroyOnHidden:W}=e,V=HA(e,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","removeIcon","moreIcon","more","popupClassName","children","items","animated","style","indicatorSize","indicator","destroyInactiveTabPane","destroyOnHidden"]),{prefixCls:A}=V,{direction:G,tabs:q,getPrefixCls:D,getPopupContainer:U}=h.useContext(Ot),Y=D("tabs",A),Z=Io(Y),[ee,re,he]=AA(Y,Z),fe=h.useRef(null);h.useImperativeHandle(t,()=>({nativeElement:fe.current}));let ue;v==="editable-card"&&(ue={onEdit:(de,{key:be,event:we})=>{C==null||C(de==="add"?we:be,de)},removeIcon:(n=P??(q==null?void 0:q.removeIcon))!==null&&n!==void 0?n:h.createElement(ta,null),addIcon:($??(q==null?void 0:q.addIcon))||h.createElement(oA,null),showAdd:E!==!0});const Se=D(),ae=Zo(_),le=TA(z,I),ce=kA(Y,L),ye=Object.assign(Object.assign({},q==null?void 0:q.style),M),me={align:(r=B==null?void 0:B.align)!==null&&r!==void 0?r:(i=q==null?void 0:q.indicator)===null||i===void 0?void 0:i.align,size:(u=(a=(o=B==null?void 0:B.size)!==null&&o!==void 0?o:j)!==null&&a!==void 0?a:(c=q==null?void 0:q.indicator)===null||c===void 0?void 0:c.size)!==null&&u!==void 0?u:q==null?void 0:q.indicatorSize};return ee(h.createElement(xA,Object.assign({ref:fe,direction:G,getPopupContainer:U},V,{items:le,className:ne({[`${Y}-${ae}`]:ae,[`${Y}-card`]:["card","editable-card"].includes(v),[`${Y}-editable-card`]:v==="editable-card",[`${Y}-centered`]:k},q==null?void 0:q.className,y,S,re,he,Z),popupClassName:ne(N,re,he,Z),style:ye,editable:ue,more:Object.assign({icon:(g=(m=(f=(d=q==null?void 0:q.more)===null||d===void 0?void 0:d.icon)!==null&&f!==void 0?f:q==null?void 0:q.moreIcon)!==null&&m!==void 0?m:T)!==null&&g!==void 0?g:h.createElement(tb,null),transitionName:`${Se}-slide-up`},O),prefixCls:Y,animated:ce,indicator:me,destroyInactiveTabPane:W??H})))}),sb=FA;sb.TabPane=DA;function WA(e,t,n){var r=n||{},i=r.noTrailing,o=i===void 0?!1:i,a=r.noLeading,c=a===void 0?!1:a,u=r.debounceMode,d=u===void 0?void 0:u,f,m=!1,g=0;function v(){f&&clearTimeout(f)}function y(_){var C=_||{},E=C.upcomingOnly,k=E===void 0?!1:E;v(),m=!k}function S(){for(var _=arguments.length,C=new Array(_),E=0;E<_;E++)C[E]=arguments[E];var k=this,$=Date.now()-g;if(m)return;function P(){g=Date.now(),t.apply(k,C)}function T(){f=void 0}!c&&d&&!f&&P(),v(),d===void 0&&$>e?c?(g=Date.now(),o||(f=setTimeout(d?T:P,e))):P():o!==!0&&(f=setTimeout(d?T:P,d===void 0?e-$:e))}return S.cancel=y,S}function VA(e,t,n){var r={},i=r.atBegin,o=i===void 0?!1:i;return WA(e,t,{debounceMode:o!==!1})}const UA=e=>{const{checkboxCls:t}=e,n=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},Un(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[n]:Object.assign(Object.assign({},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]:Object.assign(Object.assign({},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`]:Oa(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${te(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:`${te(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}})},{[`
293
+ ${n}:not(${n}-disabled),
294
+ ${t}:not(${t}-disabled)
295
+ `]:{[`&: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}`}}},[`
296
+ ${n}-checked:not(${n}-disabled),
297
+ ${t}-checked:not(${t}-disabled)
298
+ `]:{[`&: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 qA(e,t){const n=tn(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return UA(n)}const K$=bn("Checkbox",(e,{prefixCls:t})=>[qA(t,e)]),G$=J.createContext(null);var KA=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const GA=(e,t)=>{var n;const{prefixCls:r,className:i,rootClassName:o,children:a,indeterminate:c=!1,style:u,onMouseEnter:d,onMouseLeave:f,skipGroup:m=!1,disabled:g}=e,v=KA(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:y,direction:S,checkbox:_}=h.useContext(Ot),C=h.useContext(G$),{isFormItemInput:E}=h.useContext(ku),k=h.useContext(Zs),$=(n=(C==null?void 0:C.disabled)||g)!==null&&n!==void 0?n:k,P=h.useRef(v.value),T=h.useRef(null),O=mo(t,T);h.useEffect(()=>{C==null||C.registerValue(v.value)},[]),h.useEffect(()=>{if(!m)return v.value!==P.current&&(C==null||C.cancelValue(P.current),C==null||C.registerValue(v.value),P.current=v.value),()=>C==null?void 0:C.cancelValue(v.value)},[v.value]),h.useEffect(()=>{var A;!((A=T.current)===null||A===void 0)&&A.input&&(T.current.input.indeterminate=c)},[c]);const N=y("checkbox",r),I=Io(N),[z,L,M]=K$(N,I),j=Object.assign({},v);C&&!m&&(j.onChange=(...A)=>{v.onChange&&v.onChange.apply(v,A),C.toggleOption&&C.toggleOption({label:a,value:v.value})},j.name=C.name,j.checked=C.value.includes(v.value));const B=ne(`${N}-wrapper`,{[`${N}-rtl`]:S==="rtl",[`${N}-wrapper-checked`]:j.checked,[`${N}-wrapper-disabled`]:$,[`${N}-wrapper-in-form-item`]:E},_==null?void 0:_.className,i,o,M,I,L),H=ne({[`${N}-indeterminate`]:c},Py,L),[W,V]=D7(j.onClick);return z(h.createElement(Wf,{component:"Checkbox",disabled:$},h.createElement("label",{className:B,style:Object.assign(Object.assign({},_==null?void 0:_.style),u),onMouseEnter:d,onMouseLeave:f,onClick:W},h.createElement(A7,Object.assign({},j,{onClick:V,prefixCls:N,className:H,disabled:$,ref:O})),a!=null&&h.createElement("span",{className:`${N}-label`},a))))},X$=h.forwardRef(GA);var XA=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const YA=h.forwardRef((e,t)=>{const{defaultValue:n,children:r,options:i=[],prefixCls:o,className:a,rootClassName:c,style:u,onChange:d}=e,f=XA(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:m,direction:g}=h.useContext(Ot),[v,y]=h.useState(f.value||n||[]),[S,_]=h.useState([]);h.useEffect(()=>{"value"in f&&y(f.value||[])},[f.value]);const C=h.useMemo(()=>i.map(H=>typeof H=="string"||typeof H=="number"?{label:H,value:H}:H),[i]),E=H=>{_(W=>W.filter(V=>V!==H))},k=H=>{_(W=>[].concat(We(W),[H]))},$=H=>{const W=v.indexOf(H.value),V=We(v);W===-1?V.push(H.value):V.splice(W,1),"value"in f||y(V),d==null||d(V.filter(A=>S.includes(A)).sort((A,G)=>{const q=C.findIndex(U=>U.value===A),D=C.findIndex(U=>U.value===G);return q-D}))},P=m("checkbox",o),T=`${P}-group`,O=Io(P),[N,I,z]=K$(P,O),L=fr(f,["value","disabled"]),M=i.length?C.map(H=>h.createElement(X$,{prefixCls:P,key:H.value.toString(),disabled:"disabled"in H?H.disabled:f.disabled,value:H.value,checked:v.includes(H.value),onChange:H.onChange,className:ne(`${T}-item`,H.className),style:H.style,title:H.title,id:H.id,required:H.required},H.label)):r,j=h.useMemo(()=>({toggleOption:$,value:v,disabled:f.disabled,name:f.name,registerValue:k,cancelValue:E}),[$,v,f.disabled,f.name,k,E]),B=ne(T,{[`${T}-rtl`]:g==="rtl"},a,c,z,O,I);return N(h.createElement("div",Object.assign({className:B,style:u},L,{ref:t}),h.createElement(G$.Provider,{value:j},M)))}),ab=X$;ab.Group=YA;ab.__ANT_CHECKBOX=!0;const Y$=h.createContext({});var JA=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Nw(e){return e==="auto"?"1 1 auto":typeof e=="number"?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}const QA=["xs","sm","md","lg","xl","xxl"],ZA=h.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r}=h.useContext(Ot),{gutter:i,wrap:o}=h.useContext(Y$),{prefixCls:a,span:c,order:u,offset:d,push:f,pull:m,className:g,children:v,flex:y,style:S}=e,_=JA(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),C=n("col",a),[E,k,$]=K8(C),P={};let T={};QA.forEach(I=>{let z={};const L=e[I];typeof L=="number"?z.span=L:typeof L=="object"&&(z=L||{}),delete _[I],T=Object.assign(Object.assign({},T),{[`${C}-${I}-${z.span}`]:z.span!==void 0,[`${C}-${I}-order-${z.order}`]:z.order||z.order===0,[`${C}-${I}-offset-${z.offset}`]:z.offset||z.offset===0,[`${C}-${I}-push-${z.push}`]:z.push||z.push===0,[`${C}-${I}-pull-${z.pull}`]:z.pull||z.pull===0,[`${C}-rtl`]:r==="rtl"}),z.flex&&(T[`${C}-${I}-flex`]=!0,P[`--${C}-${I}-flex`]=Nw(z.flex))});const O=ne(C,{[`${C}-${c}`]:c!==void 0,[`${C}-order-${u}`]:u,[`${C}-offset-${d}`]:d,[`${C}-push-${f}`]:f,[`${C}-pull-${m}`]:m},g,T,k,$),N={};if(i!=null&&i[0]){const I=typeof i[0]=="number"?`${i[0]/2}px`:`calc(${i[0]} / 2)`;N.paddingLeft=I,N.paddingRight=I}return y&&(N.flex=Nw(y),o===!1&&!N.minWidth&&(N.minWidth=0)),E(h.createElement("div",Object.assign({},_,{style:Object.assign(Object.assign(Object.assign({},N),S),P),className:O,ref:t}),v))});function e9(e,t){const n=[void 0,void 0],r=Array.isArray(e)?e:[e,void 0],i=t||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0};return r.forEach((o,a)=>{if(typeof o=="object"&&o!==null)for(let c=0;c<Ia.length;c++){const u=Ia[c];if(i[u]&&o[u]!==void 0){n[a]=o[u];break}}else n[a]=o}),n}var t9=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Mw(e,t){const[n,r]=h.useState(typeof e=="string"?e:""),i=()=>{if(typeof e=="string"&&r(e),typeof e=="object")for(let o=0;o<Ia.length;o++){const a=Ia[o];if(!t||!t[a])continue;const c=e[a];if(c!==void 0){r(c);return}}};return h.useEffect(()=>{i()},[JSON.stringify(e),t]),n}const n9=h.forwardRef((e,t)=>{const{prefixCls:n,justify:r,align:i,className:o,style:a,children:c,gutter:u=0,wrap:d}=e,f=t9(e,["prefixCls","justify","align","className","style","children","gutter","wrap"]),{getPrefixCls:m,direction:g}=h.useContext(Ot),v=Wy(!0,null),y=Mw(i,v),S=Mw(r,v),_=m("row",n),[C,E,k]=q8(_),$=e9(u,v),P=ne(_,{[`${_}-no-wrap`]:d===!1,[`${_}-${S}`]:S,[`${_}-${y}`]:y,[`${_}-rtl`]:g==="rtl"},o,E,k),T={};if($!=null&&$[0]){const z=typeof $[0]=="number"?`${$[0]/-2}px`:`calc(${$[0]} / -2)`;T.marginLeft=z,T.marginRight=z}const[O,N]=$;T.rowGap=N;const I=h.useMemo(()=>({gutter:[O,N],wrap:d}),[O,N,d]);return C(h.createElement(Y$.Provider,{value:I},h.createElement("div",Object.assign({},f,{className:P,style:Object.assign(Object.assign({},T),a),ref:t}),c)))}),r9=e=>{const{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}},i9=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:i,textPaddingInline:o,orientationMargin:a,verticalMarginInline:c}=e;return{[t]:Object.assign(Object.assign({},Un(e)),{borderBlockStart:`${te(i)} solid ${r}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:c,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${te(i)} solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${te(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${te(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${te(i)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-start`]:{"&::before":{width:`calc(${a} * 100%)`},"&::after":{width:`calc(100% - ${a} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{"&::before":{width:`calc(100% - ${a} * 100%)`},"&::after":{width:`calc(${a} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${te(i)} 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:r,borderStyle:"dotted",borderWidth:`${te(i)} 0 0`},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:i,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`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}})}},o9=e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),s9=bn("Divider",e=>{const t=tn(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[i9(t),r9(t)]},o9,{unitless:{orientationMargin:!0}});var a9=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const l9={small:"sm",middle:"md"},zw=e=>{const{getPrefixCls:t,direction:n,className:r,style:i}=Gr("divider"),{prefixCls:o,type:a="horizontal",orientation:c="center",orientationMargin:u,className:d,rootClassName:f,children:m,dashed:g,variant:v="solid",plain:y,style:S,size:_}=e,C=a9(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),E=t("divider",o),[k,$,P]=s9(E),T=Zo(_),O=l9[T],N=!!m,I=h.useMemo(()=>c==="left"?n==="rtl"?"end":"start":c==="right"?n==="rtl"?"start":"end":c,[n,c]),z=I==="start"&&u!=null,L=I==="end"&&u!=null,M=ne(E,r,$,P,`${E}-${a}`,{[`${E}-with-text`]:N,[`${E}-with-text-${I}`]:N,[`${E}-dashed`]:!!g,[`${E}-${v}`]:v!=="solid",[`${E}-plain`]:!!y,[`${E}-rtl`]:n==="rtl",[`${E}-no-default-orientation-margin-start`]:z,[`${E}-no-default-orientation-margin-end`]:L,[`${E}-${O}`]:!!O},d,f),j=h.useMemo(()=>typeof u=="number"?u:/^\d+$/.test(u)?Number(u):u,[u]),B={marginInlineStart:z?j:void 0,marginInlineEnd:L?j:void 0};return k(h.createElement("div",Object.assign({className:M,style:Object.assign(Object.assign({},i),S)},C,{role:"separator"}),m&&a!=="vertical"&&h.createElement("span",{className:`${E}-inner-text`,style:B},m)))};function c9(e){return!!(e.addonBefore||e.addonAfter)}function u9(e){return!!(e.prefix||e.suffix||e.allowClear)}function jw(e,t,n){var r=t.cloneNode(!0),i=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=function(){t.setSelectionRange.apply(t,arguments)},i}function Bw(e,t,n,r){if(n){var i=t;if(t.type==="click"){i=jw(t,e,""),n(i);return}if(e.type!=="file"&&r!==void 0){i=jw(t,e,r),n(i);return}n(i)}}function d9(e,t){if(e){e.focus(t);var n=t||{},r=n.cursor;if(r){var i=e.value.length;switch(r){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(i,i);break;default:e.setSelectionRange(0,i)}}}}var h9=J.forwardRef(function(e,t){var n,r,i,o=e.inputElement,a=e.children,c=e.prefixCls,u=e.prefix,d=e.suffix,f=e.addonBefore,m=e.addonAfter,g=e.className,v=e.style,y=e.disabled,S=e.readOnly,_=e.focused,C=e.triggerFocus,E=e.allowClear,k=e.value,$=e.handleReset,P=e.hidden,T=e.classes,O=e.classNames,N=e.dataAttrs,I=e.styles,z=e.components,L=e.onClear,M=a??o,j=(z==null?void 0:z.affixWrapper)||"span",B=(z==null?void 0:z.groupWrapper)||"span",H=(z==null?void 0:z.wrapper)||"span",W=(z==null?void 0:z.groupAddon)||"span",V=h.useRef(null),A=function(me){var de;(de=V.current)!==null&&de!==void 0&&de.contains(me.target)&&(C==null||C())},G=u9(e),q=h.cloneElement(M,{value:k,className:ne((n=M.props)===null||n===void 0?void 0:n.className,!G&&(O==null?void 0:O.variant))||null}),D=h.useRef(null);if(J.useImperativeHandle(t,function(){return{nativeElement:D.current||V.current}}),G){var U=null;if(E){var Y=!y&&!S&&k,Z="".concat(c,"-clear-icon"),ee=_t(E)==="object"&&E!==null&&E!==void 0&&E.clearIcon?E.clearIcon:"✖";U=J.createElement("button",{type:"button",tabIndex:-1,onClick:function(me){$==null||$(me),L==null||L()},onMouseDown:function(me){return me.preventDefault()},className:ne(Z,K(K({},"".concat(Z,"-hidden"),!Y),"".concat(Z,"-has-suffix"),!!d))},ee)}var re="".concat(c,"-affix-wrapper"),he=ne(re,K(K(K(K(K({},"".concat(c,"-disabled"),y),"".concat(re,"-disabled"),y),"".concat(re,"-focused"),_),"".concat(re,"-readonly"),S),"".concat(re,"-input-with-clear-btn"),d&&E&&k),T==null?void 0:T.affixWrapper,O==null?void 0:O.affixWrapper,O==null?void 0:O.variant),fe=(d||E)&&J.createElement("span",{className:ne("".concat(c,"-suffix"),O==null?void 0:O.suffix),style:I==null?void 0:I.suffix},U,d);q=J.createElement(j,Re({className:he,style:I==null?void 0:I.affixWrapper,onClick:A},N==null?void 0:N.affixWrapper,{ref:V}),u&&J.createElement("span",{className:ne("".concat(c,"-prefix"),O==null?void 0:O.prefix),style:I==null?void 0:I.prefix},u),q,fe)}if(c9(e)){var ue="".concat(c,"-group"),Se="".concat(ue,"-addon"),ae="".concat(ue,"-wrapper"),le=ne("".concat(c,"-wrapper"),ue,T==null?void 0:T.wrapper,O==null?void 0:O.wrapper),ce=ne(ae,K({},"".concat(ae,"-disabled"),y),T==null?void 0:T.group,O==null?void 0:O.groupWrapper);q=J.createElement(B,{className:ce,ref:D},J.createElement(H,{className:le},f&&J.createElement(W,{className:Se},f),q,m&&J.createElement(W,{className:Se},m)))}return J.cloneElement(q,{className:ne((r=q.props)===null||r===void 0?void 0:r.className,g)||null,style:X(X({},(i=q.props)===null||i===void 0?void 0:i.style),v),hidden:P})}),f9=["show"];function m9(e,t){return h.useMemo(function(){var n={};t&&(n.show=_t(t)==="object"&&t.formatter?t.formatter:!!t),n=X(X({},n),e);var r=n,i=r.show,o=Lt(r,f9);return X(X({},o),{},{show:!!i,showFormatter:typeof i=="function"?i:void 0,strategy:o.strategy||function(a){return a.length}})},[e,t])}const p9=e=>{let t;return typeof e=="object"&&(e!=null&&e.clearIcon)?t=e:e&&(t={clearIcon:J.createElement(Hf,null)}),t};var Lw=h.createContext(null),J$=h.createContext({}),g9=["prefixCls","className","containerRef"],v9=function(t){var n=t.prefixCls,r=t.className,i=t.containerRef,o=Lt(t,g9),a=h.useContext(J$),c=a.panel,u=Jo(c,i);return h.createElement("div",Re({className:ne("".concat(n,"-content"),r),role:"dialog",ref:u},Ki(t,{aria:!0}),{"aria-modal":"true"},o))};function Aw(e){return typeof e=="string"&&String(Number(e))===e?(Ar(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(e)):e}var Dw={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function y9(e,t){var n,r,i,o=e.prefixCls,a=e.open,c=e.placement,u=e.inline,d=e.push,f=e.forceRender,m=e.autoFocus,g=e.keyboard,v=e.classNames,y=e.rootClassName,S=e.rootStyle,_=e.zIndex,C=e.className,E=e.id,k=e.style,$=e.motion,P=e.width,T=e.height,O=e.children,N=e.mask,I=e.maskClosable,z=e.maskMotion,L=e.maskClassName,M=e.maskStyle,j=e.afterOpenChange,B=e.onClose,H=e.onMouseEnter,W=e.onMouseOver,V=e.onMouseLeave,A=e.onClick,G=e.onKeyDown,q=e.onKeyUp,D=e.styles,U=e.drawerRender,Y=h.useRef(),Z=h.useRef(),ee=h.useRef();h.useImperativeHandle(t,function(){return Y.current});var re=function(ke){var je=ke.keyCode,Oe=ke.shiftKey;switch(je){case Ge.TAB:{if(je===Ge.TAB){if(!Oe&&document.activeElement===ee.current){var Qe;(Qe=Z.current)===null||Qe===void 0||Qe.focus({preventScroll:!0})}else if(Oe&&document.activeElement===Z.current){var at;(at=ee.current)===null||at===void 0||at.focus({preventScroll:!0})}}break}case Ge.ESC:{B&&g&&(ke.stopPropagation(),B(ke));break}}};h.useEffect(function(){if(a&&m){var Ee;(Ee=Y.current)===null||Ee===void 0||Ee.focus({preventScroll:!0})}},[a]);var he=h.useState(!1),fe=se(he,2),ue=fe[0],Se=fe[1],ae=h.useContext(Lw),le;typeof d=="boolean"?le=d?{}:{distance:0}:le=d||{};var ce=(n=(r=(i=le)===null||i===void 0?void 0:i.distance)!==null&&r!==void 0?r:ae==null?void 0:ae.pushDistance)!==null&&n!==void 0?n:180,ye=h.useMemo(function(){return{pushDistance:ce,push:function(){Se(!0)},pull:function(){Se(!1)}}},[ce]);h.useEffect(function(){if(a){var Ee;ae==null||(Ee=ae.push)===null||Ee===void 0||Ee.call(ae)}else{var ke;ae==null||(ke=ae.pull)===null||ke===void 0||ke.call(ae)}},[a]),h.useEffect(function(){return function(){var Ee;ae==null||(Ee=ae.pull)===null||Ee===void 0||Ee.call(ae)}},[]);var me=h.createElement(qi,Re({key:"mask"},z,{visible:N&&a}),function(Ee,ke){var je=Ee.className,Oe=Ee.style;return h.createElement("div",{className:ne("".concat(o,"-mask"),je,v==null?void 0:v.mask,L),style:X(X(X({},Oe),M),D==null?void 0:D.mask),onClick:I&&a?B:void 0,ref:ke})}),de=typeof $=="function"?$(c):$,be={};if(ue&&ce)switch(c){case"top":be.transform="translateY(".concat(ce,"px)");break;case"bottom":be.transform="translateY(".concat(-ce,"px)");break;case"left":be.transform="translateX(".concat(ce,"px)");break;default:be.transform="translateX(".concat(-ce,"px)");break}c==="left"||c==="right"?be.width=Aw(P):be.height=Aw(T);var we={onMouseEnter:H,onMouseOver:W,onMouseLeave:V,onClick:A,onKeyDown:G,onKeyUp:q},Te=h.createElement(qi,Re({key:"panel"},de,{visible:a,forceRender:f,onVisibleChanged:function(ke){j==null||j(ke)},removeOnLeave:!1,leavedClassName:"".concat(o,"-content-wrapper-hidden")}),function(Ee,ke){var je=Ee.className,Oe=Ee.style,Qe=h.createElement(v9,Re({id:E,containerRef:ke,prefixCls:o,className:ne(C,v==null?void 0:v.content),style:X(X({},k),D==null?void 0:D.content)},Ki(e,{aria:!0}),we),O);return h.createElement("div",Re({className:ne("".concat(o,"-content-wrapper"),v==null?void 0:v.wrapper,je),style:X(X(X({},be),Oe),D==null?void 0:D.wrapper)},Ki(e,{data:!0})),U?U(Qe):Qe)}),ze=X({},S);return _&&(ze.zIndex=_),h.createElement(Lw.Provider,{value:ye},h.createElement("div",{className:ne(o,"".concat(o,"-").concat(c),y,K(K({},"".concat(o,"-open"),a),"".concat(o,"-inline"),u)),style:ze,tabIndex:-1,ref:Y,onKeyDown:re},me,h.createElement("div",{tabIndex:0,ref:Z,style:Dw,"aria-hidden":"true","data-sentinel":"start"}),Te,h.createElement("div",{tabIndex:0,ref:ee,style:Dw,"aria-hidden":"true","data-sentinel":"end"})))}var b9=h.forwardRef(y9),_9=function(t){var n=t.open,r=n===void 0?!1:n,i=t.prefixCls,o=i===void 0?"rc-drawer":i,a=t.placement,c=a===void 0?"right":a,u=t.autoFocus,d=u===void 0?!0:u,f=t.keyboard,m=f===void 0?!0:f,g=t.width,v=g===void 0?378:g,y=t.mask,S=y===void 0?!0:y,_=t.maskClosable,C=_===void 0?!0:_,E=t.getContainer,k=t.forceRender,$=t.afterOpenChange,P=t.destroyOnClose,T=t.onMouseEnter,O=t.onMouseOver,N=t.onMouseLeave,I=t.onClick,z=t.onKeyDown,L=t.onKeyUp,M=t.panelRef,j=h.useState(!1),B=se(j,2),H=B[0],W=B[1],V=h.useState(!1),A=se(V,2),G=A[0],q=A[1];fn(function(){q(!0)},[]);var D=G?r:!1,U=h.useRef(),Y=h.useRef();fn(function(){D&&(Y.current=document.activeElement)},[D]);var Z=function(ue){var Se;if(W(ue),$==null||$(ue),!ue&&Y.current&&!((Se=U.current)!==null&&Se!==void 0&&Se.contains(Y.current))){var ae;(ae=Y.current)===null||ae===void 0||ae.focus({preventScroll:!0})}},ee=h.useMemo(function(){return{panel:M}},[M]);if(!k&&!H&&!D&&P)return null;var re={onMouseEnter:T,onMouseOver:O,onMouseLeave:N,onClick:I,onKeyDown:z,onKeyUp:L},he=X(X({},t),{},{open:D,prefixCls:o,placement:c,autoFocus:d,keyboard:m,width:v,mask:S,maskClosable:C,inline:E===!1,afterOpenChange:Z,ref:U},re);return h.createElement(J$.Provider,{value:ee},h.createElement(Zf,{open:D||k||H,autoDestroy:!1,getContainer:E,autoLock:S&&(D||H)},h.createElement(b9,he)))};const Q$=e=>{var t,n;const{prefixCls:r,ariaId:i,title:o,footer:a,extra:c,closable:u,loading:d,onClose:f,headerStyle:m,bodyStyle:g,footerStyle:v,children:y,classNames:S,styles:_}=e,C=Gr("drawer");let E;u===!1?E=void 0:u===void 0||u===!0?E="start":E=(u==null?void 0:u.placement)==="end"?"end":"start";const k=h.useCallback(N=>h.createElement("button",{type:"button",onClick:f,className:ne(`${r}-close`,{[`${r}-close-${E}`]:E==="end"})},N),[f,r,E]),[$,P]=Ey(Ql(e),Ql(C),{closable:!0,closeIconRender:k}),T=()=>{var N,I;return!o&&!$?null:h.createElement("div",{style:Object.assign(Object.assign(Object.assign({},(N=C.styles)===null||N===void 0?void 0:N.header),m),_==null?void 0:_.header),className:ne(`${r}-header`,{[`${r}-header-close-only`]:$&&!o&&!c},(I=C.classNames)===null||I===void 0?void 0:I.header,S==null?void 0:S.header)},h.createElement("div",{className:`${r}-header-title`},E==="start"&&P,o&&h.createElement("div",{className:`${r}-title`,id:i},o)),c&&h.createElement("div",{className:`${r}-extra`},c),E==="end"&&P)},O=()=>{var N,I;if(!a)return null;const z=`${r}-footer`;return h.createElement("div",{className:ne(z,(N=C.classNames)===null||N===void 0?void 0:N.footer,S==null?void 0:S.footer),style:Object.assign(Object.assign(Object.assign({},(I=C.styles)===null||I===void 0?void 0:I.footer),v),_==null?void 0:_.footer)},a)};return h.createElement(h.Fragment,null,T(),h.createElement("div",{className:ne(`${r}-body`,S==null?void 0:S.body,(t=C.classNames)===null||t===void 0?void 0:t.body),style:Object.assign(Object.assign(Object.assign({},(n=C.styles)===null||n===void 0?void 0:n.body),g),_==null?void 0:_.body)},d?h.createElement(Ha,{active:!0,title:!1,paragraph:{rows:5},className:`${r}-body-skeleton`}):y),O())},S9=e=>{const t="100%";return{left:`translateX(-${t})`,right:`translateX(${t})`,top:`translateY(-${t})`,bottom:`translateY(${t})`}[e]},Z$=(e,t)=>({"&-enter, &-appear":Object.assign(Object.assign({},e),{"&-active":t}),"&-leave":Object.assign(Object.assign({},t),{"&-active":e})}),e3=(e,t)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${t}`}}},Z$({opacity:e},{opacity:1})),C9=(e,t)=>[e3(.7,t),Z$({transform:S9(e)},{transform:"none"})],w9=e=>{const{componentCls:t,motionDurationSlow:n}=e;return{[t]:{[`${t}-mask-motion`]:e3(0,n),[`${t}-panel-motion`]:["left","right","top","bottom"].reduce((r,i)=>Object.assign(Object.assign({},r),{[`&-${i}`]:C9(i,n)}),{})}}},x9=e=>{const{borderRadiusSM:t,componentCls:n,zIndexPopup:r,colorBgMask:i,colorBgElevated:o,motionDurationSlow:a,motionDurationMid:c,paddingXS:u,padding:d,paddingLG:f,fontSizeLG:m,lineHeightLG:g,lineWidth:v,lineType:y,colorSplit:S,marginXS:_,colorIcon:C,colorIconHover:E,colorBgTextHover:k,colorBgTextActive:$,colorText:P,fontWeightStrong:T,footerPaddingBlock:O,footerPaddingInline:N,calc:I}=e,z=`${n}-content-wrapper`;return{[n]:{position:"fixed",inset:0,zIndex:r,pointerEvents:"none",color:P,"&-pure":{position:"relative",background:o,display:"flex",flexDirection:"column",[`&${n}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${n}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${n}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${n}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${n}-mask`]:{position:"absolute",inset:0,zIndex:r,background:i,pointerEvents:"auto"},[z]:{position:"absolute",zIndex:r,maxWidth:"100vw",transition:`all ${a}`,"&-hidden":{display:"none"}},[`&-left > ${z}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${z}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${z}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${z}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${n}-content`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:o,pointerEvents:"auto"},[`${n}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${te(d)} ${te(f)}`,fontSize:m,lineHeight:g,borderBottom:`${te(v)} ${y} ${S}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${n}-extra`]:{flex:"none"},[`${n}-close`]:Object.assign({display:"inline-flex",width:I(m).add(u).equal(),height:I(m).add(u).equal(),borderRadius:t,justifyContent:"center",alignItems:"center",color:C,fontWeight:T,fontSize:m,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:`all ${c}`,textRendering:"auto",[`&${n}-close-end`]:{marginInlineStart:_},[`&:not(${n}-close-end)`]:{marginInlineEnd:_},"&:hover":{color:E,backgroundColor:k,textDecoration:"none"},"&:active":{backgroundColor:$}},fo(e)),[`${n}-title`]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:m,lineHeight:g},[`${n}-body`]:{flex:1,minWidth:0,minHeight:0,padding:f,overflow:"auto",[`${n}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},[`${n}-footer`]:{flexShrink:0,padding:`${te(O)} ${te(N)}`,borderTop:`${te(v)} ${y} ${S}`},"&-rtl":{direction:"rtl"}}}},E9=e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding}),t3=bn("Drawer",e=>{const t=tn(e,{});return[x9(t),w9(t)]},E9);var n3=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const k9={distance:180},Dh=e=>{const{rootClassName:t,width:n,height:r,size:i="default",mask:o=!0,push:a=k9,open:c,afterOpenChange:u,onClose:d,prefixCls:f,getContainer:m,panelRef:g=null,style:v,className:y,"aria-labelledby":S,visible:_,afterVisibleChange:C,maskStyle:E,drawerStyle:k,contentWrapperStyle:$,destroyOnClose:P,destroyOnHidden:T}=e,O=n3(e,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","panelRef","style","className","aria-labelledby","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle","destroyOnClose","destroyOnHidden"]),N=em(),I=O.title?N:void 0,{getPopupContainer:z,getPrefixCls:L,direction:M,className:j,style:B,classNames:H,styles:W}=Gr("drawer"),V=L("drawer",f),[A,G,q]=t3(V),D=m===void 0&&z?()=>z(document.body):m,U=ne({"no-mask":!o,[`${V}-rtl`]:M==="rtl"},t,G,q),Y=h.useMemo(()=>n??(i==="large"?736:378),[n,i]),Z=h.useMemo(()=>r??(i==="large"?736:378),[r,i]),ee={motionName:Ko(V,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},re=ce=>({motionName:Ko(V,`panel-motion-${ce}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),he=Sk(),fe=mo(g,he),[ue,Se]=oc("Drawer",O.zIndex),{classNames:ae={},styles:le={}}=O;return A(h.createElement(Gu,{form:!0,space:!0},h.createElement(Hu.Provider,{value:Se},h.createElement(_9,Object.assign({prefixCls:V,onClose:d,maskMotion:ee,motion:re},O,{classNames:{mask:ne(ae.mask,H.mask),content:ne(ae.content,H.content),wrapper:ne(ae.wrapper,H.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},le.mask),E),W.mask),content:Object.assign(Object.assign(Object.assign({},le.content),k),W.content),wrapper:Object.assign(Object.assign(Object.assign({},le.wrapper),$),W.wrapper)},open:c??_,mask:o,push:a,width:Y,height:Z,style:Object.assign(Object.assign({},B),v),className:ne(j,y),rootClassName:U,getContainer:D,afterOpenChange:u??C,panelRef:fe,zIndex:ue,"aria-labelledby":S??I,destroyOnClose:T??P}),h.createElement(Q$,Object.assign({prefixCls:V},O,{ariaId:I,onClose:d}))))))},$9=e=>{const{prefixCls:t,style:n,className:r,placement:i="right"}=e,o=n3(e,["prefixCls","style","className","placement"]),{getPrefixCls:a}=h.useContext(Ot),c=a("drawer",t),[u,d,f]=t3(c),m=ne(c,`${c}-pure`,`${c}-${i}`,d,f,r);return u(h.createElement("div",{className:m,style:n},h.createElement(Q$,Object.assign({prefixCls:c},o))))};Dh._InternalPanelDoNotUseOrYouWillBeFired=$9;function Hw(e){return["small","middle","large"].includes(e)}function Fw(e){return e?typeof e=="number"&&!Number.isNaN(e):!1}const R9=e=>{const{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:i,paddingXS:o,fontSizeLG:a,fontSizeSM:c,borderRadiusLG:u,borderRadiusSM:d,colorBgContainerDisabled:f,lineWidth:m}=e;return{[t]:[{display:"inline-flex",alignItems:"center",gap:0,paddingInline:r,margin:0,background:f,borderWidth:m,borderStyle:"solid",borderColor:i,borderRadius:n,"&-large":{fontSize:a,borderRadius:u},"&-small":{paddingInline:o,borderRadius:d,fontSize:c},"&-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}},Qf(e,{focus:!1})]}},T9=bn(["Space","Addon"],e=>[R9(e)]);var P9=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const O9=J.forwardRef((e,t)=>{const{className:n,children:r,style:i,prefixCls:o}=e,a=P9(e,["className","children","style","prefixCls"]),{getPrefixCls:c,direction:u}=J.useContext(Ot),d=c("space-addon",o),[f,m,g]=T9(d),{compactItemClassnames:v,compactSize:y}=Wu(d,u),S=ne(d,m,v,g,{[`${d}-${y}`]:y},n);return f(J.createElement("div",Object.assign({ref:t,className:S,style:i},a),r))}),r3=J.createContext({latestIndex:0}),I9=r3.Provider,N9=({className:e,index:t,children:n,split:r,style:i})=>{const{latestIndex:o}=h.useContext(r3);return n==null?null:h.createElement(h.Fragment,null,h.createElement("div",{className:e,style:i},n),t<o&&r&&h.createElement("span",{className:`${e}-split`},r))},M9=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"}}}},z9=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}}}},j9=bn("Space",e=>{const t=tn(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[M9(t),z9(t)]},()=>({}),{resetStyle:!1});var B9=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const L9=h.forwardRef((e,t)=>{var n;const{getPrefixCls:r,direction:i,size:o,className:a,style:c,classNames:u,styles:d}=Gr("space"),{size:f=o??"small",align:m,className:g,rootClassName:v,children:y,direction:S="horizontal",prefixCls:_,split:C,style:E,wrap:k=!1,classNames:$,styles:P}=e,T=B9(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[O,N]=Array.isArray(f)?f:[f,f],I=Hw(N),z=Hw(O),L=Fw(N),M=Fw(O),j=mi(y,{keepEmpty:!0}),B=m===void 0&&S==="horizontal"?"center":m,H=r("space",_),[W,V,A]=j9(H),G=ne(H,a,V,`${H}-${S}`,{[`${H}-rtl`]:i==="rtl",[`${H}-align-${B}`]:B,[`${H}-gap-row-${N}`]:I,[`${H}-gap-col-${O}`]:z},g,v,A),q=ne(`${H}-item`,(n=$==null?void 0:$.item)!==null&&n!==void 0?n:u.item),D=Object.assign(Object.assign({},d.item),P==null?void 0:P.item),U=j.map((ee,re)=>{const he=(ee==null?void 0:ee.key)||`${q}-${re}`;return h.createElement(N9,{className:q,key:he,index:re,split:C,style:D},ee)}),Y=h.useMemo(()=>({latestIndex:j.reduce((re,he,fe)=>he!=null?fe:re,0)}),[j]);if(j.length===0)return null;const Z={};return k&&(Z.flexWrap="wrap"),!z&&M&&(Z.columnGap=O),!I&&L&&(Z.rowGap=N),W(h.createElement("div",Object.assign({ref:t,className:G,style:Object.assign(Object.assign(Object.assign({},Z),c),E)},T),h.createElement(I9,{value:Y},U)))}),fs=L9;fs.Compact=xN;fs.Addon=O9;var A9=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const i3=e=>{const{getPopupContainer:t,getPrefixCls:n,direction:r}=h.useContext(Ot),{prefixCls:i,type:o="default",danger:a,disabled:c,loading:u,onClick:d,htmlType:f,children:m,className:g,menu:v,arrow:y,autoFocus:S,overlay:_,trigger:C,align:E,open:k,onOpenChange:$,placement:P,getPopupContainer:T,href:O,icon:N=h.createElement(tb,null),title:I,buttonsRender:z=ae=>ae,mouseEnterDelay:L,mouseLeaveDelay:M,overlayClassName:j,overlayStyle:B,destroyOnHidden:H,destroyPopupOnHide:W,dropdownRender:V,popupRender:A}=e,G=A9(e,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyOnHidden","destroyPopupOnHide","dropdownRender","popupRender"]),q=n("dropdown",i),D=`${q}-button`,Y={menu:v,arrow:y,autoFocus:S,align:E,disabled:c,trigger:c?[]:C,onOpenChange:$,getPopupContainer:T||t,mouseEnterDelay:L,mouseLeaveDelay:M,overlayClassName:j,overlayStyle:B,destroyOnHidden:H,popupRender:A||V},{compactSize:Z,compactItemClassnames:ee}=Wu(q,r),re=ne(D,ee,g);"destroyPopupOnHide"in e&&(Y.destroyPopupOnHide=W),"overlay"in e&&(Y.overlay=_),"open"in e&&(Y.open=k),"placement"in e?Y.placement=P:Y.placement=r==="rtl"?"bottomLeft":"bottomRight";const he=h.createElement(hr,{type:o,danger:a,disabled:c,loading:u,onClick:d,htmlType:f,href:O,title:I},m),fe=h.createElement(hr,{type:o,danger:a,icon:N}),[ue,Se]=z([he,fe]);return h.createElement(fs.Compact,Object.assign({className:re,size:Z,block:!0},G),ue,h.createElement(um,Object.assign({},Y),Se))};i3.__ANT_BUTTON=!0;const g0=um;g0.Button=i3;var D9={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"},H9=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:D9}))},fu=h.forwardRef(H9),F9=`
299
+ min-height:0 !important;
300
+ max-height:none !important;
301
+ height:0 !important;
302
+ visibility:hidden !important;
303
+ overflow:hidden !important;
304
+ position:absolute !important;
305
+ z-index:-1000 !important;
306
+ top:0 !important;
307
+ right:0 !important;
308
+ pointer-events: none !important;
309
+ `,W9=["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"],jg={},Ai;function V9(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&jg[n])return jg[n];var r=window.getComputedStyle(e),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),o=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),c=W9.map(function(d){return"".concat(d,":").concat(r.getPropertyValue(d))}).join(";"),u={sizingStyle:c,paddingSize:o,borderSize:a,boxSizing:i};return t&&n&&(jg[n]=u),u}function U9(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Ai||(Ai=document.createElement("textarea"),Ai.setAttribute("tab-index","-1"),Ai.setAttribute("aria-hidden","true"),Ai.setAttribute("name","hiddenTextarea"),document.body.appendChild(Ai)),e.getAttribute("wrap")?Ai.setAttribute("wrap",e.getAttribute("wrap")):Ai.removeAttribute("wrap");var i=V9(e,t),o=i.paddingSize,a=i.borderSize,c=i.boxSizing,u=i.sizingStyle;Ai.setAttribute("style","".concat(u,";").concat(F9)),Ai.value=e.value||e.placeholder||"";var d=void 0,f=void 0,m,g=Ai.scrollHeight;if(c==="border-box"?g+=a:c==="content-box"&&(g-=o),n!==null||r!==null){Ai.value=" ";var v=Ai.scrollHeight-o;n!==null&&(d=v*n,c==="border-box"&&(d=d+o+a),g=Math.max(d,g)),r!==null&&(f=v*r,c==="border-box"&&(f=f+o+a),m=g>f?"":"hidden",g=Math.min(f,g))}var y={height:g,overflowY:m,resize:"none"};return d&&(y.minHeight=d),f&&(y.maxHeight=f),y}var q9=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Bg=0,Lg=1,Ag=2,K9=h.forwardRef(function(e,t){var n=e,r=n.prefixCls,i=n.defaultValue,o=n.value,a=n.autoSize,c=n.onResize,u=n.className,d=n.style,f=n.disabled,m=n.onChange;n.onInternalAutoSize;var g=Lt(n,q9),v=tr(i,{value:o,postState:function(Y){return Y??""}}),y=se(v,2),S=y[0],_=y[1],C=function(Y){_(Y.target.value),m==null||m(Y)},E=h.useRef();h.useImperativeHandle(t,function(){return{textArea:E.current}});var k=h.useMemo(function(){return a&&_t(a)==="object"?[a.minRows,a.maxRows]:[]},[a]),$=se(k,2),P=$[0],T=$[1],O=!!a,N=h.useState(Ag),I=se(N,2),z=I[0],L=I[1],M=h.useState(),j=se(M,2),B=j[0],H=j[1],W=function(){L(Bg)};fn(function(){O&&W()},[o,P,T,O]),fn(function(){if(z===Bg)L(Lg);else if(z===Lg){var U=U9(E.current,!1,P,T);L(Ag),H(U)}},[z]);var V=h.useRef(),A=function(){Tn.cancel(V.current)},G=function(Y){z===Ag&&(c==null||c(Y),a&&(A(),V.current=Tn(function(){W()})))};h.useEffect(function(){return A},[]);var q=O?B:null,D=X(X({},d),q);return(z===Bg||z===Lg)&&(D.overflowY="hidden",D.overflowX="hidden"),h.createElement(co,{onResize:G,disabled:!(a||c)},h.createElement("textarea",Re({},g,{ref:E,style:D,className:ne(r,u,K({},"".concat(r,"-disabled"),f)),disabled:f,value:S,onChange:C})))}),G9=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],X9=J.forwardRef(function(e,t){var n,r=e.defaultValue,i=e.value,o=e.onFocus,a=e.onBlur,c=e.onChange,u=e.allowClear,d=e.maxLength,f=e.onCompositionStart,m=e.onCompositionEnd,g=e.suffix,v=e.prefixCls,y=v===void 0?"rc-textarea":v,S=e.showCount,_=e.count,C=e.className,E=e.style,k=e.disabled,$=e.hidden,P=e.classNames,T=e.styles,O=e.onResize,N=e.onClear,I=e.onPressEnter,z=e.readOnly,L=e.autoSize,M=e.onKeyDown,j=Lt(e,G9),B=tr(r,{value:i,defaultValue:r}),H=se(B,2),W=H[0],V=H[1],A=W==null?"":String(W),G=J.useState(!1),q=se(G,2),D=q[0],U=q[1],Y=J.useRef(!1),Z=J.useState(null),ee=se(Z,2),re=ee[0],he=ee[1],fe=h.useRef(null),ue=h.useRef(null),Se=function(){var Le;return(Le=ue.current)===null||Le===void 0?void 0:Le.textArea},ae=function(){Se().focus()};h.useImperativeHandle(t,function(){var tt;return{resizableTextArea:ue.current,focus:ae,blur:function(){Se().blur()},nativeElement:((tt=fe.current)===null||tt===void 0?void 0:tt.nativeElement)||Se()}}),h.useEffect(function(){U(function(tt){return!k&&tt})},[k]);var le=J.useState(null),ce=se(le,2),ye=ce[0],me=ce[1];J.useEffect(function(){if(ye){var tt;(tt=Se()).setSelectionRange.apply(tt,We(ye))}},[ye]);var de=m9(_,S),be=(n=de.max)!==null&&n!==void 0?n:d,we=Number(be)>0,Te=de.strategy(A),ze=!!be&&Te>be,Ee=function(Le,rt){var Me=rt;!Y.current&&de.exceedFormatter&&de.max&&de.strategy(rt)>de.max&&(Me=de.exceedFormatter(rt,{max:de.max}),rt!==Me&&me([Se().selectionStart||0,Se().selectionEnd||0])),V(Me),Bw(Le.currentTarget,Le,c,Me)},ke=function(Le){Y.current=!0,f==null||f(Le)},je=function(Le){Y.current=!1,Ee(Le,Le.currentTarget.value),m==null||m(Le)},Oe=function(Le){Ee(Le,Le.target.value)},Qe=function(Le){Le.key==="Enter"&&I&&I(Le),M==null||M(Le)},at=function(Le){U(!0),o==null||o(Le)},$t=function(Le){U(!1),a==null||a(Le)},pt=function(Le){V(""),ae(),Bw(Se(),Le,c)},Je=g,ft;de.show&&(de.showFormatter?ft=de.showFormatter({value:A,count:Te,maxLength:be}):ft="".concat(Te).concat(we?" / ".concat(be):""),Je=J.createElement(J.Fragment,null,Je,J.createElement("span",{className:ne("".concat(y,"-data-count"),P==null?void 0:P.count),style:T==null?void 0:T.count},ft)));var Xe=function(Le){var rt;O==null||O(Le),(rt=Se())!==null&&rt!==void 0&&rt.style.height&&he(!0)},yt=!L&&!S&&!u;return J.createElement(h9,{ref:fe,value:A,allowClear:u,handleReset:pt,suffix:Je,prefixCls:y,classNames:X(X({},P),{},{affixWrapper:ne(P==null?void 0:P.affixWrapper,K(K({},"".concat(y,"-show-count"),S),"".concat(y,"-textarea-allow-clear"),u))}),disabled:k,focused:D,className:ne(C,ze&&"".concat(y,"-out-of-range")),style:X(X({},E),re&&!yt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof ft=="string"?ft:void 0}},hidden:$,readOnly:z,onClear:N},J.createElement(K9,Re({},j,{autoSize:L,maxLength:d,onKeyDown:Qe,onChange:Oe,onFocus:at,onBlur:$t,onCompositionStart:ke,onCompositionEnd:je,className:ne(P==null?void 0:P.textarea),style:X(X({},T==null?void 0:T.textarea),{},{resize:E==null?void 0:E.resize}),disabled:k,prefixCls:y,onResize:Xe,ref:ue,readOnly:z})))});const Y9=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"}},[`
310
+ &-allow-clear > ${t},
311
+ &-affix-wrapper${r}-has-feedback ${t}
312
+ `]:{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}}}}}},J9=bn(["Input","TextArea"],e=>{const t=tn(e,dm(e));return Y9(t)},hm,{resetFont:!1});var Q9=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Z9=h.forwardRef((e,t)=>{var n;const{prefixCls:r,bordered:i=!0,size:o,disabled:a,status:c,allowClear:u,classNames:d,rootClassName:f,className:m,style:g,styles:v,variant:y,showCount:S,onMouseDown:_,onResize:C}=e,E=Q9(e,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:k,direction:$,allowClear:P,autoComplete:T,className:O,style:N,classNames:I,styles:z}=Gr("textArea"),L=h.useContext(Zs),M=a??L,{status:j,hasFeedback:B,feedbackIcon:H}=h.useContext(ku),W=e$(j,c),V=h.useRef(null);h.useImperativeHandle(t,()=>{var de;return{resizableTextArea:(de=V.current)===null||de===void 0?void 0:de.resizableTextArea,focus:be=>{var we,Te;d9((Te=(we=V.current)===null||we===void 0?void 0:we.resizableTextArea)===null||Te===void 0?void 0:Te.textArea,be)},blur:()=>{var be;return(be=V.current)===null||be===void 0?void 0:be.blur()}}});const A=k("input",r),G=Io(A),[q,D,U]=nA(A,f),[Y]=J9(A,G),{compactSize:Z,compactItemClassnames:ee}=Wu(A,$),re=Zo(de=>{var be;return(be=o??Z)!==null&&be!==void 0?be:de}),[he,fe]=i$("textArea",y,i),ue=p9(u??P),[Se,ae]=h.useState(!1),[le,ce]=h.useState(!1),ye=de=>{ae(!0),_==null||_(de);const be=()=>{ae(!1),document.removeEventListener("mouseup",be)};document.addEventListener("mouseup",be)},me=de=>{var be,we;if(C==null||C(de),Se&&typeof getComputedStyle=="function"){const Te=(we=(be=V.current)===null||be===void 0?void 0:be.nativeElement)===null||we===void 0?void 0:we.querySelector("textarea");Te&&getComputedStyle(Te).resize==="both"&&ce(!0)}};return q(Y(h.createElement(X9,Object.assign({autoComplete:T},E,{style:Object.assign(Object.assign({},N),g),styles:Object.assign(Object.assign({},z),v),disabled:M,allowClear:ue,className:ne(U,G,m,f,ee,O,le&&`${A}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},d),I),{textarea:ne({[`${A}-sm`]:re==="small",[`${A}-lg`]:re==="large"},D,d==null?void 0:d.textarea,I.textarea,Se&&`${A}-mouse-active`),variant:ne({[`${A}-${he}`]:fe},Zk(A,W)),affixWrapper:ne(`${A}-textarea-affix-wrapper`,{[`${A}-affix-wrapper-rtl`]:$==="rtl",[`${A}-affix-wrapper-sm`]:re==="small",[`${A}-affix-wrapper-lg`]:re==="large",[`${A}-textarea-show-count`]:S||((n=e.count)===null||n===void 0?void 0:n.show)},D)}),prefixCls:A,suffix:B&&h.createElement("span",{className:`${A}-textarea-suffix`},H),showCount:S,ref:V,onResize:me,onMouseDown:ye}))))});function eD(e,t,n){return typeof n=="boolean"?n:e.length?!0:mi(t).some(i=>i.type===j$)}var o3=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function pm({suffixCls:e,tagName:t,displayName:n}){return r=>h.forwardRef((o,a)=>h.createElement(r,Object.assign({ref:a,suffixCls:e,tagName:t},o)))}const lb=h.forwardRef((e,t)=>{const{prefixCls:n,suffixCls:r,className:i,tagName:o}=e,a=o3(e,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:c}=h.useContext(Ot),u=c("layout",n),[d,f,m]=z$(u),g=r?`${u}-${r}`:u;return d(h.createElement(o,Object.assign({className:ne(n||g,i,f,m),ref:t},a)))}),tD=h.forwardRef((e,t)=>{const{direction:n}=h.useContext(Ot),[r,i]=h.useState([]),{prefixCls:o,className:a,rootClassName:c,children:u,hasSider:d,tagName:f,style:m}=e,g=o3(e,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),v=fr(g,["suffixCls"]),{getPrefixCls:y,className:S,style:_}=Gr("layout"),C=y("layout",o),E=eD(r,u,d),[k,$,P]=z$(C),T=ne(C,{[`${C}-has-sider`]:E,[`${C}-rtl`]:n==="rtl"},S,a,c,$,P),O=h.useMemo(()=>({siderHook:{addSider:N=>{i(I=>[].concat(We(I),[N]))},removeSider:N=>{i(I=>I.filter(z=>z!==N))}}}),[]);return k(h.createElement(I$.Provider,{value:O},h.createElement(f,Object.assign({ref:t,className:T,style:Object.assign(Object.assign({},_),m)},v),u)))}),nD=pm({tagName:"div",displayName:"Layout"})(tD),rD=pm({suffixCls:"header",tagName:"header",displayName:"Header"})(lb),iD=pm({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(lb),oD=pm({suffixCls:"content",tagName:"main",displayName:"Content"})(lb),Xs=nD;Xs.Header=rD;Xs.Footer=iD;Xs.Content=oD;Xs.Sider=j$;Xs._InternalSiderContext=cm;var sD={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"},aD=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:sD}))},Ww=h.forwardRef(aD),lD={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"},cD=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:lD}))},Vw=h.forwardRef(cD),uD={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:"页码"},dD=[10,20,50,100],hD=function(t){var n=t.pageSizeOptions,r=n===void 0?dD:n,i=t.locale,o=t.changeSize,a=t.pageSize,c=t.goButton,u=t.quickGo,d=t.rootPrefixCls,f=t.disabled,m=t.buildOptionText,g=t.showSizeChanger,v=t.sizeChangerRender,y=J.useState(""),S=se(y,2),_=S[0],C=S[1],E=function(){return!_||Number.isNaN(_)?void 0:Number(_)},k=typeof m=="function"?m:function(M){return"".concat(M," ").concat(i.items_per_page)},$=function(j){C(j.target.value)},P=function(j){c||_===""||(C(""),!(j.relatedTarget&&(j.relatedTarget.className.indexOf("".concat(d,"-item-link"))>=0||j.relatedTarget.className.indexOf("".concat(d,"-item"))>=0))&&(u==null||u(E())))},T=function(j){_!==""&&(j.keyCode===Ge.ENTER||j.type==="click")&&(C(""),u==null||u(E()))},O=function(){return r.some(function(j){return j.toString()===a.toString()})?r:r.concat([a]).sort(function(j,B){var H=Number.isNaN(Number(j))?0:Number(j),W=Number.isNaN(Number(B))?0:Number(B);return H-W})},N="".concat(d,"-options");if(!g&&!u)return null;var I=null,z=null,L=null;return g&&v&&(I=v({disabled:f,size:a,onSizeChange:function(j){o==null||o(Number(j))},"aria-label":i.page_size,className:"".concat(N,"-size-changer"),options:O().map(function(M){return{label:k(M),value:M}})})),u&&(c&&(L=typeof c=="boolean"?J.createElement("button",{type:"button",onClick:T,onKeyUp:T,disabled:f,className:"".concat(N,"-quick-jumper-button")},i.jump_to_confirm):J.createElement("span",{onClick:T,onKeyUp:T},c)),z=J.createElement("div",{className:"".concat(N,"-quick-jumper")},i.jump_to,J.createElement("input",{disabled:f,type:"text",value:_,onChange:$,onKeyUp:T,onBlur:P,"aria-label":i.page}),i.page,L)),J.createElement("li",{className:N},I,z)},Wc=function(t){var n=t.rootPrefixCls,r=t.page,i=t.active,o=t.className,a=t.showTitle,c=t.onClick,u=t.onKeyPress,d=t.itemRender,f="".concat(n,"-item"),m=ne(f,"".concat(f,"-").concat(r),K(K({},"".concat(f,"-active"),i),"".concat(f,"-disabled"),!r),o),g=function(){c(r)},v=function(_){u(_,c,r)},y=d(r,"page",J.createElement("a",{rel:"nofollow"},r));return y?J.createElement("li",{title:a?String(r):null,className:m,onClick:g,onKeyDown:v,tabIndex:0},y):null},fD=function(t,n,r){return r};function Uw(){}function qw(e){var t=Number(e);return typeof t=="number"&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function va(e,t,n){var r=typeof e>"u"?t:e;return Math.floor((n-1)/r)+1}var mD=function(t){var n=t.prefixCls,r=n===void 0?"rc-pagination":n,i=t.selectPrefixCls,o=i===void 0?"rc-select":i,a=t.className,c=t.current,u=t.defaultCurrent,d=u===void 0?1:u,f=t.total,m=f===void 0?0:f,g=t.pageSize,v=t.defaultPageSize,y=v===void 0?10:v,S=t.onChange,_=S===void 0?Uw:S,C=t.hideOnSinglePage,E=t.align,k=t.showPrevNextJumpers,$=k===void 0?!0:k,P=t.showQuickJumper,T=t.showLessItems,O=t.showTitle,N=O===void 0?!0:O,I=t.onShowSizeChange,z=I===void 0?Uw:I,L=t.locale,M=L===void 0?uD:L,j=t.style,B=t.totalBoundaryShowSizeChanger,H=B===void 0?50:B,W=t.disabled,V=t.simple,A=t.showTotal,G=t.showSizeChanger,q=G===void 0?m>H:G,D=t.sizeChangerRender,U=t.pageSizeOptions,Y=t.itemRender,Z=Y===void 0?fD:Y,ee=t.jumpPrevIcon,re=t.jumpNextIcon,he=t.prevIcon,fe=t.nextIcon,ue=J.useRef(null),Se=tr(10,{value:g,defaultValue:y}),ae=se(Se,2),le=ae[0],ce=ae[1],ye=tr(1,{value:c,defaultValue:d,postState:function(vt){return Math.max(1,Math.min(vt,va(void 0,le,m)))}}),me=se(ye,2),de=me[0],be=me[1],we=J.useState(de),Te=se(we,2),ze=Te[0],Ee=Te[1];h.useEffect(function(){Ee(de)},[de]);var ke=Math.max(1,de-(T?3:5)),je=Math.min(va(void 0,le,m),de+(T?3:5));function Oe(Ke,vt){var Nt=Ke||J.createElement("button",{type:"button","aria-label":vt,className:"".concat(r,"-item-link")});return typeof Ke=="function"&&(Nt=J.createElement(Ke,X({},t))),Nt}function Qe(Ke){var vt=Ke.target.value,Nt=va(void 0,le,m),gn;return vt===""?gn=vt:Number.isNaN(Number(vt))?gn=ze:vt>=Nt?gn=Nt:gn=Number(vt),gn}function at(Ke){return qw(Ke)&&Ke!==de&&qw(m)&&m>0}var $t=m>le?P:!1;function pt(Ke){(Ke.keyCode===Ge.UP||Ke.keyCode===Ge.DOWN)&&Ke.preventDefault()}function Je(Ke){var vt=Qe(Ke);switch(vt!==ze&&Ee(vt),Ke.keyCode){case Ge.ENTER:yt(vt);break;case Ge.UP:yt(vt-1);break;case Ge.DOWN:yt(vt+1);break}}function ft(Ke){yt(Qe(Ke))}function Xe(Ke){var vt=va(Ke,le,m),Nt=de>vt&&vt!==0?vt:de;ce(Ke),Ee(Nt),z==null||z(de,Ke),be(Nt),_==null||_(Nt,Ke)}function yt(Ke){if(at(Ke)&&!W){var vt=va(void 0,le,m),Nt=Ke;return Ke>vt?Nt=vt:Ke<1&&(Nt=1),Nt!==ze&&Ee(Nt),be(Nt),_==null||_(Nt,le),Nt}return de}var tt=de>1,Le=de<va(void 0,le,m);function rt(){tt&&yt(de-1)}function Me(){Le&&yt(de+1)}function qe(){yt(ke)}function It(){yt(je)}function St(Ke,vt){if(Ke.key==="Enter"||Ke.charCode===Ge.ENTER||Ke.keyCode===Ge.ENTER){for(var Nt=arguments.length,gn=new Array(Nt>2?Nt-2:0),sr=2;sr<Nt;sr++)gn[sr-2]=arguments[sr];vt.apply(void 0,gn)}}function nn(Ke){St(Ke,rt)}function Jt(Ke){St(Ke,Me)}function _n(Ke){St(Ke,qe)}function In(Ke){St(Ke,It)}function on(Ke){var vt=Z(Ke,"prev",Oe(he,"prev page"));return J.isValidElement(vt)?J.cloneElement(vt,{disabled:!tt}):vt}function Ht(Ke){var vt=Z(Ke,"next",Oe(fe,"next page"));return J.isValidElement(vt)?J.cloneElement(vt,{disabled:!Le}):vt}function Rt(Ke){(Ke.type==="click"||Ke.keyCode===Ge.ENTER)&&yt(ze)}var sn=null,Xt=Ki(t,{aria:!0,data:!0}),ot=A&&J.createElement("li",{className:"".concat(r,"-total-text")},A(m,[m===0?0:(de-1)*le+1,de*le>m?m:de*le])),Et=null,mt=va(void 0,le,m);if(C&&m<=le)return null;var Ie=[],$e={rootPrefixCls:r,onClick:yt,onKeyPress:St,showTitle:N,itemRender:Z,page:-1},xe=de-1>0?de-1:0,Ae=de+1<mt?de+1:mt,et=P&&P.goButton,nt=_t(V)==="object"?V.readOnly:!V,Ft=et,Kt=null;V&&(et&&(typeof et=="boolean"?Ft=J.createElement("button",{type:"button",onClick:Rt,onKeyUp:Rt},M.jump_to_confirm):Ft=J.createElement("span",{onClick:Rt,onKeyUp:Rt},et),Ft=J.createElement("li",{title:N?"".concat(M.jump_to).concat(de,"/").concat(mt):null,className:"".concat(r,"-simple-pager")},Ft)),Kt=J.createElement("li",{title:N?"".concat(de,"/").concat(mt):null,className:"".concat(r,"-simple-pager")},nt?ze:J.createElement("input",{type:"text","aria-label":M.jump_to,value:ze,disabled:W,onKeyDown:pt,onKeyUp:Je,onChange:Je,onBlur:ft,size:3}),J.createElement("span",{className:"".concat(r,"-slash")},"/"),mt));var Bt=T?1:2;if(mt<=3+Bt*2){mt||Ie.push(J.createElement(Wc,Re({},$e,{key:"noPager",page:1,className:"".concat(r,"-item-disabled")})));for(var At=1;At<=mt;At+=1)Ie.push(J.createElement(Wc,Re({},$e,{key:At,page:At,active:de===At})))}else{var Pn=T?M.prev_3:M.prev_5,kn=T?M.next_3:M.next_5,Nn=Z(ke,"jump-prev",Oe(ee,"prev page")),Hn=Z(je,"jump-next",Oe(re,"next page"));$&&(sn=Nn?J.createElement("li",{title:N?Pn:null,key:"prev",onClick:qe,tabIndex:0,onKeyDown:_n,className:ne("".concat(r,"-jump-prev"),K({},"".concat(r,"-jump-prev-custom-icon"),!!ee))},Nn):null,Et=Hn?J.createElement("li",{title:N?kn:null,key:"next",onClick:It,tabIndex:0,onKeyDown:In,className:ne("".concat(r,"-jump-next"),K({},"".concat(r,"-jump-next-custom-icon"),!!re))},Hn):null);var cn=Math.max(1,de-Bt),mn=Math.min(de+Bt,mt);de-1<=Bt&&(mn=1+Bt*2),mt-de<=Bt&&(cn=mt-Bt*2);for(var He=cn;He<=mn;He+=1)Ie.push(J.createElement(Wc,Re({},$e,{key:He,page:He,active:de===He})));if(de-1>=Bt*2&&de!==3&&(Ie[0]=J.cloneElement(Ie[0],{className:ne("".concat(r,"-item-after-jump-prev"),Ie[0].props.className)}),Ie.unshift(sn)),mt-de>=Bt*2&&de!==mt-2){var Ye=Ie[Ie.length-1];Ie[Ie.length-1]=J.cloneElement(Ye,{className:ne("".concat(r,"-item-before-jump-next"),Ye.props.className)}),Ie.push(Et)}cn!==1&&Ie.unshift(J.createElement(Wc,Re({},$e,{key:1,page:1}))),mn!==mt&&Ie.push(J.createElement(Wc,Re({},$e,{key:mt,page:mt})))}var Pt=on(xe);if(Pt){var gt=!tt||!mt;Pt=J.createElement("li",{title:N?M.prev_page:null,onClick:rt,tabIndex:gt?null:0,onKeyDown:nn,className:ne("".concat(r,"-prev"),K({},"".concat(r,"-disabled"),gt)),"aria-disabled":gt},Pt)}var lt=Ht(Ae);if(lt){var Ze,Tt;V?(Ze=!Le,Tt=tt?0:null):(Ze=!Le||!mt,Tt=Ze?null:0),lt=J.createElement("li",{title:N?M.next_page:null,onClick:Me,tabIndex:Tt,onKeyDown:Jt,className:ne("".concat(r,"-next"),K({},"".concat(r,"-disabled"),Ze)),"aria-disabled":Ze},lt)}var Gt=ne(r,a,K(K(K(K(K({},"".concat(r,"-start"),E==="start"),"".concat(r,"-center"),E==="center"),"".concat(r,"-end"),E==="end"),"".concat(r,"-simple"),V),"".concat(r,"-disabled"),W));return J.createElement("ul",Re({className:Gt,style:j,ref:ue},Xt),ot,Pt,V?Kt:Ie,lt,J.createElement(hD,{locale:M,rootPrefixCls:r,disabled:W,selectPrefixCls:o,changeSize:Xe,pageSize:le,pageSizeOptions:U,quickGo:$t?yt:null,goButton:Ft,showSizeChanger:q,sizeChangerRender:D}))};const pD=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}}}}},gD=e=>{const{componentCls:t}=e;return{[`&${t}-mini ${t}-total-text, &${t}-mini ${t}-simple-pager`]:{height:e.itemSizeSM,lineHeight:te(e.itemSizeSM)},[`&${t}-mini ${t}-item`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:te(e.calc(e.itemSizeSM).sub(2).equal())},[`&${t}-mini ${t}-prev, &${t}-mini ${t}-next`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:te(e.itemSizeSM)},[`&${t}-mini:not(${t}-disabled)`]:{[`${t}-prev, ${t}-next`]:{[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover ${t}-item-link`]:{backgroundColor:"transparent"}}},[`
313
+ &${t}-mini ${t}-prev ${t}-item-link,
314
+ &${t}-mini ${t}-next ${t}-item-link
315
+ `]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:e.itemSizeSM,lineHeight:te(e.itemSizeSM)}},[`&${t}-mini ${t}-jump-prev, &${t}-mini ${t}-jump-next`]:{height:e.itemSizeSM,marginInlineEnd:0,lineHeight:te(e.itemSizeSM)},[`&${t}-mini ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:e.miniOptionsSizeChangerTop},"&-quick-jumper":{height:e.itemSizeSM,lineHeight:te(e.itemSizeSM),input:Object.assign(Object.assign({},rb(e)),{width:e.paginationMiniQuickJumperInputWidth,height:e.controlHeightSM})}}}},vD=e=>{const{componentCls:t}=e;return{[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{height:e.itemSize,lineHeight:te(e.itemSize),verticalAlign:"top",[`${t}-item-link`]:{height:e.itemSize,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:e.itemSize,lineHeight:te(e.itemSize)}}},[`${t}-simple-pager`]:{display:"inline-flex",alignItems:"center",height:e.itemSize,marginInlineEnd:e.marginXS,input:{boxSizing:"border-box",height:"100%",width:e.quickJumperInputWidth,padding:`0 ${te(e.paginationItemPaddingInline)}`,textAlign:"center",backgroundColor:e.itemInputBg,border:`${te(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:`${te(e.inputOutlineOffset)} 0 ${te(e.controlOutlineWidth)} ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:"not-allowed"}}},[`&${t}-disabled`]:{[`${t}-prev, ${t}-next`]:{[`${t}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}},[`&${t}-mini`]:{[`${t}-prev, ${t}-next`]:{height:e.itemSizeSM,lineHeight:te(e.itemSizeSM),[`${t}-item-link`]:{height:e.itemSizeSM,"&::after":{height:e.itemSizeSM,lineHeight:te(e.itemSizeSM)}}},[`${t}-simple-pager`]:{height:e.itemSizeSM,input:{width:e.paginationMiniQuickJumperInputWidth}}}}}},yD=e=>{const{componentCls:t}=e;return{[`${t}-jump-prev, ${t}-jump-next`]:{outline:0,[`${t}-item-container`]:{position:"relative",[`${t}-item-link-icon`]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:`all ${e.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${t}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:e.colorTextDisabled,letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:`all ${e.motionDurationMid}`}},"&:hover":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}}},[`
316
+ ${t}-prev,
317
+ ${t}-jump-prev,
318
+ ${t}-jump-next
319
+ `]:{marginInlineEnd:e.marginXS},[`
320
+ ${t}-prev,
321
+ ${t}-next,
322
+ ${t}-jump-prev,
323
+ ${t}-jump-next
324
+ `]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,color:e.colorText,fontFamily:e.fontFamily,lineHeight:te(e.itemSize),textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:e.borderRadius,cursor:"pointer",transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{outline:0,button:{color:e.colorText,cursor:"pointer",userSelect:"none"},[`${t}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:e.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${te(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":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:e.controlHeight,marginInlineStart:e.marginXS,lineHeight:te(e.controlHeight),verticalAlign:"top",input:Object.assign(Object.assign(Object.assign({},ib(e)),nb(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow})),{"&[disabled]":Object.assign({},fm(e)),width:e.quickJumperInputWidth,height:e.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:e.marginXS,marginInlineEnd:e.marginXS})}}}},bD=e=>{const{componentCls:t}=e;return{[`${t}-item`]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,marginInlineEnd:e.marginXS,fontFamily:e.fontFamily,lineHeight:te(e.calc(e.itemSize).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:e.itemBg,border:`${te(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${te(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}}}}},_D=e=>{const{componentCls:t}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Un(e)),{display:"flex",flexWrap:"wrap",rowGap:e.paddingXS,"&-start":{justifyContent:"start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"end"},"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${t}-total-text`]:{display:"inline-block",height:e.itemSize,marginInlineEnd:e.marginXS,lineHeight:te(e.calc(e.itemSize).sub(2).equal()),verticalAlign:"middle"}}),bD(e)),yD(e)),vD(e)),gD(e)),pD(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"}}},SD=e=>{const{componentCls:t}=e;return{[`${t}:not(${t}-disabled)`]:{[`${t}-item`]:Object.assign({},fo(e)),[`${t}-jump-prev, ${t}-jump-next`]:{"&:focus-visible":Object.assign({[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}},Oa(e))},[`${t}-prev, ${t}-next`]:{[`&:focus-visible ${t}-item-link`]:Oa(e)}}}},s3=e=>Object.assign({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemActiveBg:e.colorBgContainer,itemActiveColor:e.colorPrimary,itemActiveColorHover:e.colorPrimaryHover,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0},hm(e)),a3=e=>tn(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"},dm(e)),CD=bn("Pagination",e=>{const t=a3(e);return[_D(t),SD(t)]},s3),wD=e=>{const{componentCls:t}=e;return{[`${t}${t}-bordered${t}-disabled:not(${t}-mini)`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.itemActiveBgDisabled}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[`${t}${t}-bordered:not(${t}-mini)`]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.itemBg},[`${t}-item-link`]:{backgroundColor:e.itemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.itemBg,border:`${te(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}}}}},xD=Au(["Pagination","bordered"],e=>{const t=a3(e);return wD(t)},s3);function Kw(e){return h.useMemo(()=>typeof e=="boolean"?[e,{}]:e&&typeof e=="object"?[!0,e]:[void 0,void 0],[e])}var ED=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const kD=e=>{const{align:t,prefixCls:n,selectPrefixCls:r,className:i,rootClassName:o,style:a,size:c,locale:u,responsive:d,showSizeChanger:f,selectComponentClass:m,pageSizeOptions:g}=e,v=ED(e,["align","prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","responsive","showSizeChanger","selectComponentClass","pageSizeOptions"]),{xs:y}=Wy(d),[,S]=gi(),{getPrefixCls:_,direction:C,showSizeChanger:E,className:k,style:$}=Gr("pagination"),P=_("pagination",n),[T,O,N]=CD(P),I=Zo(c),z=I==="small"||!!(y&&!I&&d),[L]=ys("Pagination",tE),M=Object.assign(Object.assign({},L),u),[j,B]=Kw(f),[H,W]=Kw(E),V=j??H,A=B??W,G=m||Fa,q=h.useMemo(()=>g?g.map(re=>Number(re)):void 0,[g]),D=re=>{var he;const{disabled:fe,size:ue,onSizeChange:Se,"aria-label":ae,className:le,options:ce}=re,{className:ye,onChange:me}=A||{},de=(he=ce.find(be=>String(be.value)===String(ue)))===null||he===void 0?void 0:he.value;return h.createElement(G,Object.assign({disabled:fe,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:be=>be.parentNode,"aria-label":ae,options:ce},A,{value:de,onChange:(be,we)=>{Se==null||Se(be),me==null||me(be,we)},size:z?"small":"middle",className:ne(le,ye)}))},U=h.useMemo(()=>{const re=h.createElement("span",{className:`${P}-item-ellipsis`},"•••"),he=h.createElement("button",{className:`${P}-item-link`,type:"button",tabIndex:-1},C==="rtl"?h.createElement(Wi,null):h.createElement(Ru,null)),fe=h.createElement("button",{className:`${P}-item-link`,type:"button",tabIndex:-1},C==="rtl"?h.createElement(Ru,null):h.createElement(Wi,null)),ue=h.createElement("a",{className:`${P}-item-link`},h.createElement("div",{className:`${P}-item-container`},C==="rtl"?h.createElement(Vw,{className:`${P}-item-link-icon`}):h.createElement(Ww,{className:`${P}-item-link-icon`}),re)),Se=h.createElement("a",{className:`${P}-item-link`},h.createElement("div",{className:`${P}-item-container`},C==="rtl"?h.createElement(Ww,{className:`${P}-item-link-icon`}):h.createElement(Vw,{className:`${P}-item-link-icon`}),re));return{prevIcon:he,nextIcon:fe,jumpPrevIcon:ue,jumpNextIcon:Se}},[C,P]),Y=_("select",r),Z=ne({[`${P}-${t}`]:!!t,[`${P}-mini`]:z,[`${P}-rtl`]:C==="rtl",[`${P}-bordered`]:S.wireframe},k,i,o,O,N),ee=Object.assign(Object.assign({},$),a);return T(h.createElement(h.Fragment,null,S.wireframe&&h.createElement(xD,{prefixCls:P}),h.createElement(mD,Object.assign({},U,v,{style:ee,prefixCls:P,selectPrefixCls:Y,className:Z,locale:M,pageSizeOptions:q,showSizeChanger:V,sizeChangerRender:D}))))},mf=100,l3=mf/5,c3=mf/2-l3/2,Dg=c3*2*Math.PI,Gw=50,Xw=e=>{const{dotClassName:t,style:n,hasCircleCls:r}=e;return h.createElement("circle",{className:ne(`${t}-circle`,{[`${t}-circle-bg`]:r}),r:c3,cx:Gw,cy:Gw,strokeWidth:l3,style:n})},$D=({percent:e,prefixCls:t})=>{const n=`${t}-dot`,r=`${n}-holder`,i=`${r}-hidden`,[o,a]=h.useState(!1);fn(()=>{e!==0&&a(!0)},[e!==0]);const c=Math.max(Math.min(e,100),0);if(!o)return null;const u={strokeDashoffset:`${Dg/4}`,strokeDasharray:`${Dg*c/100} ${Dg*(100-c)/100}`};return h.createElement("span",{className:ne(r,`${n}-progress`,c<=0&&i)},h.createElement("svg",{viewBox:`0 0 ${mf} ${mf}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":c},h.createElement(Xw,{dotClassName:n,hasCircleCls:!0}),h.createElement(Xw,{dotClassName:n,style:u})))};function RD(e){const{prefixCls:t,percent:n=0}=e,r=`${t}-dot`,i=`${r}-holder`,o=`${i}-hidden`;return h.createElement(h.Fragment,null,h.createElement("span",{className:ne(i,n>0&&o)},h.createElement("span",{className:ne(r,`${t}-dot-spin`)},[1,2,3,4].map(a=>h.createElement("i",{className:`${t}-dot-item`,key:a})))),h.createElement($D,{prefixCls:t,percent:n}))}function TD(e){var t;const{prefixCls:n,indicator:r,percent:i}=e,o=`${n}-dot`;return r&&h.isValidElement(r)?pi(r,{className:ne((t=r.props)===null||t===void 0?void 0:t.className,o),percent:i}):h.createElement(RD,{prefixCls:n,percent:i})}const PD=new Yt("antSpinMove",{to:{opacity:1}}),OD=new Yt("antRotate",{to:{transform:"rotate(405deg)"}}),ID=e=>{const{componentCls:t,calc:n}=e;return{[t]:Object.assign(Object.assign({},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:PD,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:OD,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"}})}},ND=e=>{const{controlHeightLG:t,controlHeight:n}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:n}},MD=bn("Spin",e=>{const t=tn(e,{spinDotDefault:e.colorTextDescription});return ID(t)},ND),zD=200,Yw=[[30,.05],[70,.03],[96,.01]];function jD(e,t){const[n,r]=h.useState(0),i=h.useRef(null),o=t==="auto";return h.useEffect(()=>(o&&e&&(r(0),i.current=setInterval(()=>{r(a=>{const c=100-a;for(let u=0;u<Yw.length;u+=1){const[d,f]=Yw[u];if(a<=d)return a+c*f}return a})},zD)),()=>{i.current&&(clearInterval(i.current),i.current=null)}),[o,e]),o?n:t}var BD=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};let u3;function LD(e,t){return!!e&&!!t&&!Number.isNaN(Number(t))}const Na=e=>{var t;const{prefixCls:n,spinning:r=!0,delay:i=0,className:o,rootClassName:a,size:c="default",tip:u,wrapperClassName:d,style:f,children:m,fullscreen:g=!1,indicator:v,percent:y}=e,S=BD(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:_,direction:C,className:E,style:k,indicator:$}=Gr("spin"),P=_("spin",n),[T,O,N]=MD(P),[I,z]=h.useState(()=>r&&!LD(r,i)),L=jD(I,y);h.useEffect(()=>{if(r){const A=VA(i,()=>{z(!0)});return A(),()=>{var G;(G=A==null?void 0:A.cancel)===null||G===void 0||G.call(A)}}z(!1)},[i,r]);const M=h.useMemo(()=>typeof m<"u"&&!g,[m,g]),j=ne(P,E,{[`${P}-sm`]:c==="small",[`${P}-lg`]:c==="large",[`${P}-spinning`]:I,[`${P}-show-text`]:!!u,[`${P}-rtl`]:C==="rtl"},o,!g&&a,O,N),B=ne(`${P}-container`,{[`${P}-blur`]:I}),H=(t=v??$)!==null&&t!==void 0?t:u3,W=Object.assign(Object.assign({},k),f),V=h.createElement("div",Object.assign({},S,{style:W,className:j,"aria-live":"polite","aria-busy":I}),h.createElement(TD,{prefixCls:P,indicator:H,percent:L}),u&&(M||g)?h.createElement("div",{className:`${P}-text`},u):null);return T(M?h.createElement("div",Object.assign({},S,{className:ne(`${P}-nested-loading`,d,O,N)}),I&&h.createElement("div",{key:"loading"},V),h.createElement("div",{className:B,key:"container"},m)):g?h.createElement("div",{className:ne(`${P}-fullscreen`,{[`${P}-fullscreen-show`]:I},a,O,N)},V):V)};Na.setDefaultIndicator=e=>{u3=e};const cb=J.createContext({});cb.Consumer;var d3=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const AD=e=>{var{prefixCls:t,className:n,avatar:r,title:i,description:o}=e,a=d3(e,["prefixCls","className","avatar","title","description"]);const{getPrefixCls:c}=h.useContext(Ot),u=c("list",t),d=ne(`${u}-item-meta`,n),f=J.createElement("div",{className:`${u}-item-meta-content`},i&&J.createElement("h4",{className:`${u}-item-meta-title`},i),o&&J.createElement("div",{className:`${u}-item-meta-description`},o));return J.createElement("div",Object.assign({},a,{className:d}),r&&J.createElement("div",{className:`${u}-item-meta-avatar`},r),(i||o)&&f)},DD=J.forwardRef((e,t)=>{const{prefixCls:n,children:r,actions:i,extra:o,styles:a,className:c,classNames:u,colStyle:d}=e,f=d3(e,["prefixCls","children","actions","extra","styles","className","classNames","colStyle"]),{grid:m,itemLayout:g}=h.useContext(cb),{getPrefixCls:v,list:y}=h.useContext(Ot),S=O=>{var N,I;return ne((I=(N=y==null?void 0:y.item)===null||N===void 0?void 0:N.classNames)===null||I===void 0?void 0:I[O],u==null?void 0:u[O])},_=O=>{var N,I;return Object.assign(Object.assign({},(I=(N=y==null?void 0:y.item)===null||N===void 0?void 0:N.styles)===null||I===void 0?void 0:I[O]),a==null?void 0:a[O])},C=()=>{let O=!1;return h.Children.forEach(r,N=>{typeof N=="string"&&(O=!0)}),O&&h.Children.count(r)>1},E=()=>g==="vertical"?!!o:!C(),k=v("list",n),$=i&&i.length>0&&J.createElement("ul",{className:ne(`${k}-item-action`,S("actions")),key:"actions",style:_("actions")},i.map((O,N)=>J.createElement("li",{key:`${k}-item-action-${N}`},O,N!==i.length-1&&J.createElement("em",{className:`${k}-item-action-split`})))),P=m?"div":"li",T=J.createElement(P,Object.assign({},f,m?{}:{ref:t},{className:ne(`${k}-item`,{[`${k}-item-no-flex`]:!E()},c)}),g==="vertical"&&o?[J.createElement("div",{className:`${k}-item-main`,key:"content"},r,$),J.createElement("div",{className:ne(`${k}-item-extra`,S("extra")),key:"extra",style:_("extra")},o)]:[r,$,pi(o,{key:"extra"})]);return m?J.createElement(ZA,{ref:t,flex:1,style:d},T):T}),h3=DD;h3.Meta=AD;const HD=e=>{const{listBorderedCls:t,componentCls:n,paddingLG:r,margin:i,itemPaddingSM:o,itemPaddingLG:a,marginLG:c,borderRadiusLG:u}=e,d=te(e.calc(u).sub(e.lineWidth).equal());return{[t]:{border:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:u,[`${n}-header`]:{borderRadius:`${d} ${d} 0 0`},[`${n}-footer`]:{borderRadius:`0 0 ${d} ${d}`},[`${n}-header,${n}-footer,${n}-item`]:{paddingInline:r},[`${n}-pagination`]:{margin:`${te(i)} ${te(c)}`}},[`${t}${n}-sm`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:o}},[`${t}${n}-lg`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:a}}}},FD=e=>{const{componentCls:t,screenSM:n,screenMD:r,marginLG:i,marginSM:o,margin:a}=e;return{[`@media screen and (max-width:${r}px)`]:{[t]:{[`${t}-item`]:{[`${t}-item-action`]:{marginInlineStart:i}}},[`${t}-vertical`]:{[`${t}-item`]:{[`${t}-item-extra`]:{marginInlineStart:i}}}},[`@media screen and (max-width: ${n}px)`]:{[t]:{[`${t}-item`]:{flexWrap:"wrap",[`${t}-action`]:{marginInlineStart:o}}},[`${t}-vertical`]:{[`${t}-item`]:{flexWrap:"wrap-reverse",[`${t}-item-main`]:{minWidth:e.contentWidth},[`${t}-item-extra`]:{margin:`auto auto ${te(a)}`}}}}}},WD=e=>{const{componentCls:t,antCls:n,controlHeight:r,minHeight:i,paddingSM:o,marginLG:a,padding:c,itemPadding:u,colorPrimary:d,itemPaddingSM:f,itemPaddingLG:m,paddingXS:g,margin:v,colorText:y,colorTextDescription:S,motionDurationSlow:_,lineWidth:C,headerBg:E,footerBg:k,emptyTextPadding:$,metaMarginBottom:P,avatarMarginRight:T,titleMarginBottom:O,descriptionFontSize:N}=e;return{[t]:Object.assign(Object.assign({},Un(e)),{position:"relative","--rc-virtual-list-scrollbar-bg":e.colorSplit,"*":{outline:"none"},[`${t}-header`]:{background:E},[`${t}-footer`]:{background:k},[`${t}-header, ${t}-footer`]:{paddingBlock:o},[`${t}-pagination`]:{marginBlockStart:a,[`${n}-pagination-options`]:{textAlign:"start"}},[`${t}-spin`]:{minHeight:i,textAlign:"center"},[`${t}-items`]:{margin:0,padding:0,listStyle:"none"},[`${t}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:u,color:y,[`${t}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${t}-item-meta-avatar`]:{marginInlineEnd:T},[`${t}-item-meta-content`]:{flex:"1 0",width:0,color:y},[`${t}-item-meta-title`]:{margin:`0 0 ${te(e.marginXXS)} 0`,color:y,fontSize:e.fontSize,lineHeight:e.lineHeight,"> a":{color:y,transition:`all ${_}`,"&:hover":{color:d}}},[`${t}-item-meta-description`]:{color:S,fontSize:N,lineHeight:e.lineHeight}},[`${t}-item-action`]:{flex:"0 0 auto",marginInlineStart:e.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${te(g)}`,color:S,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${t}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:C,height:e.calc(e.fontHeight).sub(e.calc(e.marginXXS).mul(2)).equal(),transform:"translateY(-50%)",backgroundColor:e.colorSplit}}},[`${t}-empty`]:{padding:`${te(c)} 0`,color:S,fontSize:e.fontSizeSM,textAlign:"center"},[`${t}-empty-text`]:{padding:$,color:e.colorTextDisabled,fontSize:e.fontSize,textAlign:"center"},[`${t}-item-no-flex`]:{display:"block"}}),[`${t}-grid ${n}-col > ${t}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:v,paddingBlock:0,borderBlockEnd:"none"},[`${t}-vertical ${t}-item`]:{alignItems:"initial",[`${t}-item-main`]:{display:"block",flex:1},[`${t}-item-extra`]:{marginInlineStart:a},[`${t}-item-meta`]:{marginBlockEnd:P,[`${t}-item-meta-title`]:{marginBlockStart:0,marginBlockEnd:O,color:y,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}},[`${t}-item-action`]:{marginBlockStart:c,marginInlineStart:"auto","> li":{padding:`0 ${te(c)}`,"&:first-child":{paddingInlineStart:0}}}},[`${t}-split ${t}-item`]:{borderBlockEnd:`${te(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${t}-split ${t}-header`]:{borderBlockEnd:`${te(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-split${t}-empty ${t}-footer`]:{borderTop:`${te(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-loading ${t}-spin-nested-loading`]:{minHeight:r},[`${t}-split${t}-something-after-last-item ${n}-spin-container > ${t}-items > ${t}-item:last-child`]:{borderBlockEnd:`${te(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-lg ${t}-item`]:{padding:m},[`${t}-sm ${t}-item`]:{padding:f},[`${t}:not(${t}-vertical)`]:{[`${t}-item-no-flex`]:{[`${t}-item-action`]:{float:"right"}}}}},VD=e=>({contentWidth:220,itemPadding:`${te(e.paddingContentVertical)} 0`,itemPaddingSM:`${te(e.paddingContentVerticalSM)} ${te(e.paddingContentHorizontal)}`,itemPaddingLG:`${te(e.paddingContentVerticalLG)} ${te(e.paddingContentHorizontalLG)}`,headerBg:"transparent",footerBg:"transparent",emptyTextPadding:e.padding,metaMarginBottom:e.padding,avatarMarginRight:e.padding,titleMarginBottom:e.paddingSM,descriptionFontSize:e.fontSize}),UD=bn("List",e=>{const t=tn(e,{listBorderedCls:`${e.componentCls}-bordered`,minHeight:e.controlHeightLG});return[WD(t),HD(t),FD(t)]},VD);var qD=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function KD(e,t){const{pagination:n=!1,prefixCls:r,bordered:i=!1,split:o=!0,className:a,rootClassName:c,style:u,children:d,itemLayout:f,loadMore:m,grid:g,dataSource:v=[],size:y,header:S,footer:_,loading:C=!1,rowKey:E,renderItem:k,locale:$}=e,P=qD(e,["pagination","prefixCls","bordered","split","className","rootClassName","style","children","itemLayout","loadMore","grid","dataSource","size","header","footer","loading","rowKey","renderItem","locale"]),T=n&&typeof n=="object"?n:{},[O,N]=h.useState(T.defaultCurrent||1),[I,z]=h.useState(T.defaultPageSize||10),{getPrefixCls:L,direction:M,className:j,style:B}=Gr("list"),{renderEmpty:H}=h.useContext(Ot),W={current:1,total:0,position:"bottom"},V=ke=>(je,Oe)=>{var Qe;N(je),z(Oe),n&&((Qe=n==null?void 0:n[ke])===null||Qe===void 0||Qe.call(n,je,Oe))},A=V("onChange"),G=V("onShowSizeChange"),q=(ke,je)=>{if(!k)return null;let Oe;return typeof E=="function"?Oe=E(ke):E?Oe=ke[E]:Oe=ke.key,Oe||(Oe=`list-item-${je}`),h.createElement(h.Fragment,{key:Oe},k(ke,je))},D=!!(m||n||_),U=L("list",r),[Y,Z,ee]=UD(U);let re=C;typeof re=="boolean"&&(re={spinning:re});const he=!!(re!=null&&re.spinning),fe=Zo(y);let ue="";switch(fe){case"large":ue="lg";break;case"small":ue="sm";break}const Se=ne(U,{[`${U}-vertical`]:f==="vertical",[`${U}-${ue}`]:ue,[`${U}-split`]:o,[`${U}-bordered`]:i,[`${U}-loading`]:he,[`${U}-grid`]:!!g,[`${U}-something-after-last-item`]:D,[`${U}-rtl`]:M==="rtl"},j,a,c,Z,ee),ae=Hv(W,{total:v.length,current:O,pageSize:I},n||{}),le=Math.ceil(ae.total/ae.pageSize);ae.current=Math.min(ae.current,le);const ce=n&&h.createElement("div",{className:ne(`${U}-pagination`)},h.createElement(kD,Object.assign({align:"end"},ae,{onChange:A,onShowSizeChange:G})));let ye=We(v);n&&v.length>(ae.current-1)*ae.pageSize&&(ye=We(v).splice((ae.current-1)*ae.pageSize,ae.pageSize));const me=Object.keys(g||{}).some(ke=>["xs","sm","md","lg","xl","xxl"].includes(ke)),de=Wy(me),be=h.useMemo(()=>{for(let ke=0;ke<Ia.length;ke+=1){const je=Ia[ke];if(de[je])return je}},[de]),we=h.useMemo(()=>{if(!g)return;const ke=be&&g[be]?g[be]:g.column;if(ke)return{width:`${100/ke}%`,maxWidth:`${100/ke}%`}},[JSON.stringify(g),be]);let Te=he&&h.createElement("div",{style:{minHeight:53}});if(ye.length>0){const ke=ye.map(q);Te=g?h.createElement(n9,{gutter:g.gutter},h.Children.map(ke,je=>h.createElement("div",{key:je==null?void 0:je.key,style:we},je))):h.createElement("ul",{className:`${U}-items`},ke)}else!d&&!he&&(Te=h.createElement("div",{className:`${U}-empty-text`},($==null?void 0:$.emptyText)||(H==null?void 0:H("List"))||h.createElement(r$,{componentName:"List"})));const ze=ae.position,Ee=h.useMemo(()=>({grid:g,itemLayout:f}),[JSON.stringify(g),f]);return Y(h.createElement(cb.Provider,{value:Ee},h.createElement("div",Object.assign({ref:t,style:Object.assign(Object.assign({},B),u),className:Se},P),(ze==="top"||ze==="both")&&ce,S&&h.createElement("div",{className:`${U}-header`},S),h.createElement(Na,Object.assign({},re),Te,d),_&&h.createElement("div",{className:`${U}-footer`},_),m||(ze==="bottom"||ze==="both")&&ce)))}const GD=h.forwardRef(KD),Pu=GD;Pu.Item=h3;const XD=(e,t=!1)=>t&&e==null?[]:Array.isArray(e)?e:[e];let ao=null,Ea=e=>e(),Ou=[],Iu={};function Jw(){const{getContainer:e,duration:t,rtl:n,maxCount:r,top:i}=Iu,o=(e==null?void 0:e())||document.body;return{getContainer:()=>o,duration:t,rtl:n,maxCount:r,top:i}}const YD=J.forwardRef((e,t)=>{const{messageConfig:n,sync:r}=e,{getPrefixCls:i}=h.useContext(Ot),o=Iu.prefixCls||i("message"),a=h.useContext(dz),[c,u]=GE(Object.assign(Object.assign(Object.assign({},n),{prefixCls:o}),a.message));return J.useImperativeHandle(t,()=>{const d=Object.assign({},c);return Object.keys(d).forEach(f=>{d[f]=(...m)=>(r(),c[f].apply(c,m))}),{instance:d,sync:r}}),u}),JD=J.forwardRef((e,t)=>{const[n,r]=J.useState(Jw),i=()=>{r(Jw)};J.useEffect(i,[]);const o=IE(),a=o.getRootPrefixCls(),c=o.getIconPrefixCls(),u=o.getTheme(),d=J.createElement(YD,{ref:t,sync:i,messageConfig:n});return J.createElement(Qo,{prefixCls:a,iconPrefixCls:c,theme:u},o.holderRender?o.holderRender(d):d)}),gm=()=>{if(!ao){const e=document.createDocumentFragment(),t={fragment:e};ao=t,Ea(()=>{Ry()(J.createElement(JD,{ref:r=>{const{instance:i,sync:o}=r||{};Promise.resolve().then(()=>{!t.instance&&i&&(t.instance=i,t.sync=o,gm())})}}),e)});return}ao.instance&&(Ou.forEach(e=>{const{type:t,skipped:n}=e;if(!n)switch(t){case"open":{Ea(()=>{const r=ao.instance.open(Object.assign(Object.assign({},Iu),e.config));r==null||r.then(e.resolve),e.setCloseFn(r)});break}case"destroy":Ea(()=>{ao==null||ao.instance.destroy(e.key)});break;default:Ea(()=>{var r;const i=(r=ao.instance)[t].apply(r,We(e.args));i==null||i.then(e.resolve),e.setCloseFn(i)})}}),Ou=[])};function QD(e){Iu=Object.assign(Object.assign({},Iu),e),Ea(()=>{var t;(t=ao==null?void 0:ao.sync)===null||t===void 0||t.call(ao)})}function ZD(e){const t=ky(n=>{let r;const i={type:"open",config:e,resolve:n,setCloseFn:o=>{r=o}};return Ou.push(i),()=>{r?Ea(()=>{r()}):i.skipped=!0}});return gm(),t}function eH(e,t){const n=ky(r=>{let i;const o={type:e,args:t,resolve:r,setCloseFn:a=>{i=a}};return Ou.push(o),()=>{i?Ea(()=>{i()}):o.skipped=!0}});return gm(),n}const tH=e=>{Ou.push({type:"destroy",key:e}),gm()},nH=["success","info","warning","error","loading"],rH={open:ZD,destroy:tH,config:QD,useMessage:QI,_InternalPanelDoNotUseOrYouWillBeFired:VI},Fi=rH;nH.forEach(e=>{Fi[e]=(...t)=>eH(e,t)});var iH=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const oH=e=>{const{prefixCls:t,className:n,closeIcon:r,closable:i,type:o,title:a,children:c,footer:u}=e,d=iH(e,["prefixCls","className","closeIcon","closable","type","title","children","footer"]),{getPrefixCls:f}=h.useContext(Ot),m=f(),g=t||f("modal"),v=Io(m),[y,S,_]=$k(g,v),C=`${g}-confirm`;let E={};return o?E={closable:i??!1,title:"",footer:"",children:h.createElement(Tk,Object.assign({},e,{prefixCls:g,confirmPrefixCls:C,rootPrefixCls:m,content:c}))}:E={closable:i??!0,title:a,footer:u!==null&&h.createElement(wk,Object.assign({},e)),children:c},y(h.createElement(hk,Object.assign({prefixCls:g,className:ne(S,`${g}-pure-panel`,o&&C,o&&`${C}-${o}`,n,_,v)},d,{closeIcon:Ck(g,r),closable:i},E)))},sH=Lk(oH);function f3(e){return Xu(Nk(e))}const Oi=Rk;Oi.useModal=uz;Oi.info=function(t){return Xu(Mk(t))};Oi.success=function(t){return Xu(zk(t))};Oi.error=function(t){return Xu(jk(t))};Oi.warning=f3;Oi.warn=f3;Oi.confirm=function(t){return Xu(Bk(t))};Oi.destroyAll=function(){for(;xa.length;){const t=xa.pop();t&&t()}};Oi.config=oz;Oi._InternalPanelDoNotUseOrYouWillBeFired=sH;var aH=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],m3=h.forwardRef(function(e,t){var n,r=e.prefixCls,i=r===void 0?"rc-switch":r,o=e.className,a=e.checked,c=e.defaultChecked,u=e.disabled,d=e.loadingIcon,f=e.checkedChildren,m=e.unCheckedChildren,g=e.onClick,v=e.onChange,y=e.onKeyDown,S=Lt(e,aH),_=tr(!1,{value:a,defaultValue:c}),C=se(_,2),E=C[0],k=C[1];function $(N,I){var z=E;return u||(z=N,k(z),v==null||v(z,I)),z}function P(N){N.which===Ge.LEFT?$(!1,N):N.which===Ge.RIGHT&&$(!0,N),y==null||y(N)}function T(N){var I=$(!E,N);g==null||g(I,N)}var O=ne(i,o,(n={},K(n,"".concat(i,"-checked"),E),K(n,"".concat(i,"-disabled"),u),n));return h.createElement("button",Re({},S,{type:"button",role:"switch","aria-checked":E,disabled:u,className:O,ref:t,onKeyDown:P,onClick:T}),d,h.createElement("span",{className:"".concat(i,"-inner")},h.createElement("span",{className:"".concat(i,"-inner-checked")},f),h.createElement("span",{className:"".concat(i,"-inner-unchecked")},m)))});m3.displayName="Switch";const lH=e=>{const{componentCls:t,trackHeightSM:n,trackPadding:r,trackMinWidthSM:i,innerMinMarginSM:o,innerMaxMarginSM:a,handleSizeSM:c,calc:u}=e,d=`${t}-inner`,f=te(u(c).add(u(r).mul(2)).equal()),m=te(u(a).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:i,height:n,lineHeight:te(n),[`${t}-inner`]:{paddingInlineStart:a,paddingInlineEnd:o,[`${d}-checked, ${d}-unchecked`]:{minHeight:n},[`${d}-checked`]:{marginInlineStart:`calc(-100% + ${f} - ${m})`,marginInlineEnd:`calc(100% - ${f} + ${m})`},[`${d}-unchecked`]:{marginTop:u(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:c,height:c},[`${t}-loading-icon`]:{top:u(u(c).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:o,paddingInlineEnd:a,[`${d}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${d}-unchecked`]:{marginInlineStart:`calc(100% - ${f} + ${m})`,marginInlineEnd:`calc(-100% + ${f} - ${m})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${te(u(c).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()}}}}}}},cH=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}}}},uH=e=>{const{componentCls:t,trackPadding:n,handleBg:r,handleShadow:i,handleSize:o,calc:a}=e,c=`${t}-handle`;return{[t]:{[c]:{position:"absolute",top:n,insetInlineStart:n,width:o,height:o,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:a(o).div(2).equal(),boxShadow:i,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${c}`]:{insetInlineStart:`calc(100% - ${te(a(o).add(n).equal())})`},[`&:not(${t}-disabled):active`]:{[`${c}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${c}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},dH=e=>{const{componentCls:t,trackHeight:n,trackPadding:r,innerMinMargin:i,innerMaxMargin:o,handleSize:a,calc:c}=e,u=`${t}-inner`,d=te(c(a).add(c(r).mul(2)).equal()),f=te(c(o).mul(2).equal());return{[t]:{[u]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:o,paddingInlineEnd:i,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} - ${f})`,marginInlineEnd:`calc(100% - ${d} + ${f})`},[`${u}-unchecked`]:{marginTop:c(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${u}`]:{paddingInlineStart:i,paddingInlineEnd:o,[`${u}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${u}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${f})`,marginInlineEnd:`calc(-100% + ${d} - ${f})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${u}`]:{[`${u}-unchecked`]:{marginInlineStart:c(r).mul(2).equal(),marginInlineEnd:c(r).mul(-1).mul(2).equal()}},[`&${t}-checked ${u}`]:{[`${u}-checked`]:{marginInlineStart:c(r).mul(-1).mul(2).equal(),marginInlineEnd:c(r).mul(2).equal()}}}}}},hH=e=>{const{componentCls:t,trackHeight:n,trackMinWidth:r}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},Un(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:r,height:n,lineHeight:te(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}}),fo(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"}})}},fH=e=>{const{fontSize:t,lineHeight:n,controlHeight:r,colorWhite:i}=e,o=t*n,a=r/2,c=2,u=o-c*2,d=a-c*2;return{trackHeight:o,trackHeightSM:a,trackMinWidth:u*2+c*4,trackMinWidthSM:d*2+c*2,trackPadding:c,handleBg:i,handleSize:u,handleSizeSM:d,handleShadow:`0 2px 4px 0 ${new yn("#00230b").setA(.2).toRgbString()}`,innerMinMargin:u/2,innerMaxMargin:u+c+c*2,innerMinMarginSM:d/2,innerMaxMarginSM:d+c+c*2}},mH=bn("Switch",e=>{const t=tn(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[hH(t),dH(t),uH(t),cH(t),lH(t)]},fH);var pH=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const gH=h.forwardRef((e,t)=>{const{prefixCls:n,size:r,disabled:i,loading:o,className:a,rootClassName:c,style:u,checked:d,value:f,defaultChecked:m,defaultValue:g,onChange:v}=e,y=pH(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[S,_]=tr(!1,{value:d??f,defaultValue:m??g}),{getPrefixCls:C,direction:E,switch:k}=h.useContext(Ot),$=h.useContext(Zs),P=(i??$)||o,T=C("switch",n),O=h.createElement("div",{className:`${T}-handle`},o&&h.createElement(Du,{className:`${T}-loading-icon`})),[N,I,z]=mH(T),L=Zo(r),M=ne(k==null?void 0:k.className,{[`${T}-small`]:L==="small",[`${T}-loading`]:o,[`${T}-rtl`]:E==="rtl"},a,c,I,z),j=Object.assign(Object.assign({},k==null?void 0:k.style),u),B=(...H)=>{_(H[0]),v==null||v.apply(void 0,H)};return N(h.createElement(Wf,{component:"Switch",disabled:P},h.createElement(m3,Object.assign({},y,{checked:S,onChange:B,prefixCls:T,className:M,style:j,disabled:P,ref:t,loadingIcon:O}))))}),ru=gH;ru.__ANT_SWITCH=!0;const vH=e=>{const{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:i,calc:o}=e,a=o(r).sub(n).equal(),c=o(t).sub(n).equal();return{[i]:Object.assign(Object.assign({},Un(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:a,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${i}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${i}-close-icon`]:{marginInlineStart:c,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${i}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${i}-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}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:a}}),[`${i}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},ub=e=>{const{lineWidth:t,fontSizeIcon:n,calc:r}=e,i=e.fontSizeSM;return tn(e,{tagFontSize:i,tagLineHeight:te(r(e.lineHeightSM).mul(i).equal()),tagIconSize:r(n).sub(r(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},db=e=>({defaultBg:new yn(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),p3=bn("Tag",e=>{const t=ub(e);return vH(t)},db);var yH=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const bH=h.forwardRef((e,t)=>{const{prefixCls:n,style:r,className:i,checked:o,children:a,icon:c,onChange:u,onClick:d}=e,f=yH(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:m,tag:g}=h.useContext(Ot),v=k=>{u==null||u(!o),d==null||d(k)},y=m("tag",n),[S,_,C]=p3(y),E=ne(y,`${y}-checkable`,{[`${y}-checkable-checked`]:o},g==null?void 0:g.className,i,_,C);return S(h.createElement("span",Object.assign({},f,{ref:t,style:Object.assign(Object.assign({},r),g==null?void 0:g.style),className:E,onClick:v}),c,h.createElement("span",null,a)))}),_H=e=>Df(e,(t,{textColor:n,lightBorderColor:r,lightColor:i,darkColor:o})=>({[`${e.componentCls}${e.componentCls}-${t}`]:{color:n,background:i,borderColor:r,"&-inverse":{color:e.colorTextLightSolid,background:o,borderColor:o},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}})),SH=Au(["Tag","preset"],e=>{const t=ub(e);return _H(t)},db);function CH(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const fh=(e,t,n)=>{const r=CH(n);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${r}Bg`],borderColor:e[`color${r}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},wH=Au(["Tag","status"],e=>{const t=ub(e);return[fh(t,"success","Success"),fh(t,"processing","Info"),fh(t,"error","Error"),fh(t,"warning","Warning")]},db);var xH=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const EH=h.forwardRef((e,t)=>{const{prefixCls:n,className:r,rootClassName:i,style:o,children:a,icon:c,color:u,onClose:d,bordered:f=!0,visible:m}=e,g=xH(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:v,direction:y,tag:S}=h.useContext(Ot),[_,C]=h.useState(!0),E=fr(g,["closeIcon","closable"]);h.useEffect(()=>{m!==void 0&&C(m)},[m]);const k=sm(u),$=WB(u),P=k||$,T=Object.assign(Object.assign({backgroundColor:u&&!P?u:void 0},S==null?void 0:S.style),o),O=v("tag",n),[N,I,z]=p3(O),L=ne(O,S==null?void 0:S.className,{[`${O}-${u}`]:P,[`${O}-has-color`]:u&&!P,[`${O}-hidden`]:!_,[`${O}-rtl`]:y==="rtl",[`${O}-borderless`]:!f},r,i,I,z),M=A=>{A.stopPropagation(),d==null||d(A),!A.defaultPrevented&&C(!1)},[,j]=Ey(Ql(e),Ql(S),{closable:!1,closeIconRender:A=>{const G=h.createElement("span",{className:`${O}-close-icon`,onClick:M},A);return HE(A,G,q=>({onClick:D=>{var U;(U=q==null?void 0:q.onClick)===null||U===void 0||U.call(q,D),M(D)},className:ne(q==null?void 0:q.className,`${O}-close-icon`)}))}}),B=typeof g.onClick=="function"||a&&a.type==="a",H=c||null,W=H?h.createElement(h.Fragment,null,H,a&&h.createElement("span",null,a)):a,V=h.createElement("span",Object.assign({},E,{ref:t,className:L,style:T}),W,j,k&&h.createElement(SH,{key:"preset",prefixCls:O}),$&&h.createElement(wH,{key:"status",prefixCls:O}));return N(B?h.createElement(Wf,{component:"Tag"},V):V)}),Ui=EH;Ui.CheckableTag=bH;const io=(e,t)=>new yn(e).setA(t).toRgbString(),Rl=(e,t)=>new yn(e).lighten(t).toHexString(),kH=e=>{const t=Pa(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]}},$H=(e,t)=>{const n=e||"#000",r=t||"#fff";return{colorBgBase:n,colorTextBase:r,colorText:io(r,.85),colorTextSecondary:io(r,.65),colorTextTertiary:io(r,.45),colorTextQuaternary:io(r,.25),colorFill:io(r,.18),colorFillSecondary:io(r,.12),colorFillTertiary:io(r,.08),colorFillQuaternary:io(r,.04),colorBgSolid:io(r,.95),colorBgSolidHover:io(r,1),colorBgSolidActive:io(r,.9),colorBgElevated:Rl(n,12),colorBgContainer:Rl(n,8),colorBgLayout:Rl(n,0),colorBgSpotlight:Rl(n,26),colorBgBlur:io(r,.04),colorBorder:Rl(n,26),colorBorderSecondary:Rl(n,19)}},RH=(e,t)=>{const n=Object.keys(wy).map(o=>{const a=Pa(e[o],{theme:"dark"});return Array.from({length:10},()=>1).reduce((c,u,d)=>(c[`${o}-${d+1}`]=a[d],c[`${o}${d+1}`]=a[d],c),{})}).reduce((o,a)=>(o=Object.assign(Object.assign({},o),a),o),{}),r=t??aE(e),i=sE(e,{generateColorPalettes:kH,generateNeutralColorPalettes:$H});return Object.assign(Object.assign(Object.assign(Object.assign({},r),n),i),{colorPrimaryBg:i.colorPrimaryBorder,colorPrimaryBgHover:i.colorPrimaryBorderHover})},TH={defaultSeed:ef.token,darkAlgorithm:RH};var PH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},OH=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:PH}))},IH=h.forwardRef(OH),NH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"},MH=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:NH}))},zH=h.forwardRef(MH);const jH=(e,t,n,r)=>{const{titleMarginBottom:i,fontWeightStrong:o}=r;return{marginBottom:i,color:n,fontWeight:o,fontSize:e,lineHeight:t}},BH=e=>{const t=[1,2,3,4,5],n={};return t.forEach(r=>{n[`
325
+ h${r}&,
326
+ div&-h${r},
327
+ div&-h${r} > textarea,
328
+ h${r}
329
+ `]=jH(e[`fontSizeHeading${r}`],e[`lineHeightHeading${r}`],e.colorTextHeading,e)}),n},LH=e=>{const{componentCls:t}=e;return{"a&, a":Object.assign(Object.assign({},yE(e)),{userSelect:"text",[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:"none"}}})}},AH=e=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:Qh[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:e.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),DH=e=>{const{componentCls:t,paddingSM:n}=e,r=n;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),insetBlockStart:e.calc(r).div(-2).add(1).equal(),marginBottom:e.calc(r).div(2).sub(2).equal()},[`${t}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorIcon,fontWeight:"normal",fontSize:e.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}},HH=e=>({[`${e.componentCls}-copy-success`]:{"\n &,\n &:hover,\n &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),FH=()=>({"\n a&-ellipsis,\n span&-ellipsis\n ":{display:"inline-block",maxWidth:"100%"},"&-ellipsis-single-line":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"},"> code":{paddingBlock:0,maxWidth:"calc(100% - 1.2em)",display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",verticalAlign:"bottom",boxSizing:"content-box"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),WH=e=>{const{componentCls:t,titleMarginTop:n}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorText,wordBreak:"break-word",lineHeight:e.lineHeight,[`&${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success`]:{color:e.colorSuccessText},[`&${t}-warning`]:{color:e.colorWarningText},[`&${t}-danger`]:{color:e.colorErrorText,"a&:active, a&:focus":{color:e.colorErrorTextActive},"a&:hover":{color:e.colorErrorTextHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"\n div&,\n p\n ":{marginBottom:"1em"}},BH(e)),{[`
330
+ & + h1${t},
331
+ & + h2${t},
332
+ & + h3${t},
333
+ & + h4${t},
334
+ & + h5${t}
335
+ `]:{marginTop:n},"\n div,\n ul,\n li,\n p,\n h1,\n h2,\n h3,\n h4,\n h5":{"\n + h1,\n + h2,\n + h3,\n + h4,\n + h5\n ":{marginTop:n}}}),AH(e)),LH(e)),{[`
336
+ ${t}-expand,
337
+ ${t}-collapse,
338
+ ${t}-edit,
339
+ ${t}-copy
340
+ `]:Object.assign(Object.assign({},yE(e)),{marginInlineStart:e.marginXXS})}),DH(e)),HH(e)),FH()),{"&-rtl":{direction:"rtl"}})}},VH=()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"}),g3=bn("Typography",WH,VH),UH=e=>{const{prefixCls:t,"aria-label":n,className:r,style:i,direction:o,maxLength:a,autoSize:c=!0,value:u,onSave:d,onCancel:f,onEnd:m,component:g,enterIcon:v=h.createElement(zH,null)}=e,y=h.useRef(null),S=h.useRef(!1),_=h.useRef(null),[C,E]=h.useState(u);h.useEffect(()=>{E(u)},[u]),h.useEffect(()=>{var B;if(!((B=y.current)===null||B===void 0)&&B.resizableTextArea){const{textArea:H}=y.current.resizableTextArea;H.focus();const{length:W}=H.value;H.setSelectionRange(W,W)}},[]);const k=({target:B})=>{E(B.value.replace(/[\n\r]/g,""))},$=()=>{S.current=!0},P=()=>{S.current=!1},T=({keyCode:B})=>{S.current||(_.current=B)},O=()=>{d(C.trim())},N=({keyCode:B,ctrlKey:H,altKey:W,metaKey:V,shiftKey:A})=>{_.current!==B||S.current||H||W||V||A||(B===Ge.ENTER?(O(),m==null||m()):B===Ge.ESC&&f())},I=()=>{O()},[z,L,M]=g3(t),j=ne(t,`${t}-edit-content`,{[`${t}-rtl`]:o==="rtl",[`${t}-${g}`]:!!g},r,L,M);return z(h.createElement("div",{className:j,style:i},h.createElement(Z9,{ref:y,maxLength:a,value:C,onChange:k,onKeyDown:T,onKeyUp:N,onCompositionStart:$,onCompositionEnd:P,onBlur:I,"aria-label":n,rows:1,autoSize:c}),v!==null?pi(v,{className:`${t}-edit-content-confirm`}):null))};var Hg,Qw;function qH(){return Qw||(Qw=1,Hg=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(i){e.addRange(i)}),t&&t.focus()}}),Hg}var Fg,Zw;function KH(){if(Zw)return Fg;Zw=1;var e=qH(),t={"text/plain":"Text","text/html":"Url",default:"Text"},n="Copy to clipboard: #{key}, Enter";function r(o){var a=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return o.replace(/#{\s*key\s*}/g,a)}function i(o,a){var c,u,d,f,m,g,v=!1;a||(a={}),c=a.debug||!1;try{d=e(),f=document.createRange(),m=document.getSelection(),g=document.createElement("span"),g.textContent=o,g.ariaHidden="true",g.style.all="unset",g.style.position="fixed",g.style.top=0,g.style.clip="rect(0, 0, 0, 0)",g.style.whiteSpace="pre",g.style.webkitUserSelect="text",g.style.MozUserSelect="text",g.style.msUserSelect="text",g.style.userSelect="text",g.addEventListener("copy",function(S){if(S.stopPropagation(),a.format)if(S.preventDefault(),typeof S.clipboardData>"u"){c&&console.warn("unable to use e.clipboardData"),c&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var _=t[a.format]||t.default;window.clipboardData.setData(_,o)}else S.clipboardData.clearData(),S.clipboardData.setData(a.format,o);a.onCopy&&(S.preventDefault(),a.onCopy(S.clipboardData))}),document.body.appendChild(g),f.selectNodeContents(g),m.addRange(f);var y=document.execCommand("copy");if(!y)throw new Error("copy command was unsuccessful");v=!0}catch(S){c&&console.error("unable to copy using execCommand: ",S),c&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(a.format||"text",o),a.onCopy&&a.onCopy(window.clipboardData),v=!0}catch(_){c&&console.error("unable to copy using clipboardData: ",_),c&&console.error("falling back to prompt"),u=r("message"in a?a.message:n),window.prompt(u,o)}}finally{m&&(typeof m.removeRange=="function"?m.removeRange(f):m.removeAllRanges()),g&&document.body.removeChild(g),d()}return v}return Fg=i,Fg}var GH=KH();const XH=ju(GH);var YH=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function c(f){try{d(r.next(f))}catch(m){a(m)}}function u(f){try{d(r.throw(f))}catch(m){a(m)}}function d(f){f.done?o(f.value):i(f.value).then(c,u)}d((r=r.apply(e,t||[])).next())})};const JH=({copyConfig:e,children:t})=>{const[n,r]=h.useState(!1),[i,o]=h.useState(!1),a=h.useRef(null),c=()=>{a.current&&clearTimeout(a.current)},u={};e.format&&(u.format=e.format),h.useEffect(()=>c,[]);const d=er(f=>YH(void 0,void 0,void 0,function*(){var m;f==null||f.preventDefault(),f==null||f.stopPropagation(),o(!0);try{const g=typeof e.text=="function"?yield e.text():e.text;XH(g||XD(t,!0).join("")||"",u),o(!1),r(!0),c(),a.current=setTimeout(()=>{r(!1)},3e3),(m=e.onCopy)===null||m===void 0||m.call(e,f)}catch(g){throw o(!1),g}}));return{copied:n,copyLoading:i,onClick:d}};function Wg(e,t){return h.useMemo(()=>{const n=!!e;return[n,Object.assign(Object.assign({},t),n&&typeof e=="object"?e:null)]},[e])}const QH=e=>{const t=h.useRef(void 0);return h.useEffect(()=>{t.current=e}),t.current},ZH=(e,t,n)=>h.useMemo(()=>e===!0?{title:t??n}:h.isValidElement(e)?{title:e}:typeof e=="object"?Object.assign({title:t??n},e):{title:e},[e,t,n]);var eF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const v3=h.forwardRef((e,t)=>{const{prefixCls:n,component:r="article",className:i,rootClassName:o,setContentRef:a,children:c,direction:u,style:d}=e,f=eF(e,["prefixCls","component","className","rootClassName","setContentRef","children","direction","style"]),{getPrefixCls:m,direction:g,className:v,style:y}=Gr("typography"),S=u??g,_=a?mo(t,a):t,C=m("typography",n),[E,k,$]=g3(C),P=ne(C,v,{[`${C}-rtl`]:S==="rtl"},i,o,k,$),T=Object.assign(Object.assign({},y),d);return E(h.createElement(r,Object.assign({className:P,style:T,ref:_},f),c))});var tF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},nF=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:tF}))},Hh=h.forwardRef(nF);function ex(e){return e===!1?[!1,!1]:Array.isArray(e)?e:[e]}function Vg(e,t,n){return e===!0||e===void 0?t:e||n&&t}function rF(e){const t=document.createElement("em");e.appendChild(t);const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return e.removeChild(t),n.left>r.left||r.right>n.right||n.top>r.top||r.bottom>n.bottom}const hb=e=>["string","number"].includes(typeof e),iF=({prefixCls:e,copied:t,locale:n,iconOnly:r,tooltips:i,icon:o,tabIndex:a,onCopy:c,loading:u})=>{const d=ex(i),f=ex(o),{copied:m,copy:g}=n??{},v=t?m:g,y=Vg(d[t?1:0],v),S=typeof y=="string"?y:v;return h.createElement(Xo,{title:y},h.createElement("button",{type:"button",className:ne(`${e}-copy`,{[`${e}-copy-success`]:t,[`${e}-copy-icon-only`]:r}),onClick:c,"aria-label":S,tabIndex:a},t?Vg(f[1],h.createElement(l$,null),!0):Vg(f[0],u?h.createElement(Du,null):h.createElement(Hh,null),!0)))},mh=h.forwardRef(({style:e,children:t},n)=>{const r=h.useRef(null);return h.useImperativeHandle(n,()=>({isExceed:()=>{const i=r.current;return i.scrollHeight>i.clientHeight},getHeight:()=>r.current.clientHeight})),h.createElement("span",{"aria-hidden":!0,ref:r,style:Object.assign({position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)"},e)},t)}),oF=e=>e.reduce((t,n)=>t+(hb(n)?String(n).length:1),0);function tx(e,t){let n=0;const r=[];for(let i=0;i<e.length;i+=1){if(n===t)return r;const o=e[i],c=hb(o)?String(o).length:1,u=n+c;if(u>t){const d=t-n;return r.push(String(o).slice(0,d)),r}r.push(o),n=u}return e}const Ug=0,qg=1,Kg=2,Gg=3,nx=4,ph={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function sF(e){const{enableMeasure:t,width:n,text:r,children:i,rows:o,expanded:a,miscDeps:c,onEllipsis:u}=e,d=h.useMemo(()=>mi(r),[r]),f=h.useMemo(()=>oF(d),[r]),m=h.useMemo(()=>i(d,!1),[r]),[g,v]=h.useState(null),y=h.useRef(null),S=h.useRef(null),_=h.useRef(null),C=h.useRef(null),E=h.useRef(null),[k,$]=h.useState(!1),[P,T]=h.useState(Ug),[O,N]=h.useState(0),[I,z]=h.useState(null);fn(()=>{T(t&&n&&f?qg:Ug)},[n,r,o,t,d]),fn(()=>{var B,H,W,V;if(P===qg){T(Kg);const A=S.current&&getComputedStyle(S.current).whiteSpace;z(A)}else if(P===Kg){const A=!!(!((B=_.current)===null||B===void 0)&&B.isExceed());T(A?Gg:nx),v(A?[0,f]:null),$(A);const G=((H=_.current)===null||H===void 0?void 0:H.getHeight())||0,q=o===1?0:((W=C.current)===null||W===void 0?void 0:W.getHeight())||0,D=((V=E.current)===null||V===void 0?void 0:V.getHeight())||0,U=Math.max(G,q+D);N(U+1),u(A)}},[P]);const L=g?Math.ceil((g[0]+g[1])/2):0;fn(()=>{var B;const[H,W]=g||[0,0];if(H!==W){const A=(((B=y.current)===null||B===void 0?void 0:B.getHeight())||0)>O;let G=L;W-H===1&&(G=A?H:W),v(A?[H,G]:[G,W])}},[g,L]);const M=h.useMemo(()=>{if(!t)return i(d,!1);if(P!==Gg||!g||g[0]!==g[1]){const B=i(d,!1);return[nx,Ug].includes(P)?B:h.createElement("span",{style:Object.assign(Object.assign({},ph),{WebkitLineClamp:o})},B)}return i(a?d:tx(d,g[0]),k)},[a,P,g,d].concat(We(c))),j={width:n,margin:0,padding:0,whiteSpace:I==="nowrap"?"normal":"inherit"};return h.createElement(h.Fragment,null,M,P===Kg&&h.createElement(h.Fragment,null,h.createElement(mh,{style:Object.assign(Object.assign(Object.assign({},j),ph),{WebkitLineClamp:o}),ref:_},m),h.createElement(mh,{style:Object.assign(Object.assign(Object.assign({},j),ph),{WebkitLineClamp:o-1}),ref:C},m),h.createElement(mh,{style:Object.assign(Object.assign(Object.assign({},j),ph),{WebkitLineClamp:1}),ref:E},i([],!0))),P===Gg&&g&&g[0]!==g[1]&&h.createElement(mh,{style:Object.assign(Object.assign({},j),{top:400}),ref:y},i(tx(d,L),!0)),P===qg&&h.createElement("span",{style:{whiteSpace:"inherit"},ref:S}))}const aF=({enableEllipsis:e,isEllipsis:t,children:n,tooltipProps:r})=>!(r!=null&&r.title)||!e?n:h.createElement(Xo,Object.assign({open:t?void 0:!1},r),n);var lF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function cF({mark:e,code:t,underline:n,delete:r,strong:i,keyboard:o,italic:a},c){let u=c;function d(f,m){m&&(u=h.createElement(f,{},u))}return d("strong",i),d("u",n),d("del",r),d("code",t),d("mark",e),d("kbd",o),d("i",a),u}const uF="...",rx=["delete","mark","code","underline","strong","keyboard","italic"],vm=h.forwardRef((e,t)=>{var n;const{prefixCls:r,className:i,style:o,type:a,disabled:c,children:u,ellipsis:d,editable:f,copyable:m,component:g,title:v}=e,y=lF(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:S,direction:_}=h.useContext(Ot),[C]=ys("Text"),E=h.useRef(null),k=h.useRef(null),$=S("typography",r),P=fr(y,rx),[T,O]=Wg(f),[N,I]=tr(!1,{value:O.editing}),{triggerType:z=["icon"]}=O,L=Me=>{var qe;Me&&((qe=O.onStart)===null||qe===void 0||qe.call(O)),I(Me)},M=QH(N);fn(()=>{var Me;!N&&M&&((Me=k.current)===null||Me===void 0||Me.focus())},[N]);const j=Me=>{Me==null||Me.preventDefault(),L(!0)},B=Me=>{var qe;(qe=O.onChange)===null||qe===void 0||qe.call(O,Me),L(!1)},H=()=>{var Me;(Me=O.onCancel)===null||Me===void 0||Me.call(O),L(!1)},[W,V]=Wg(m),{copied:A,copyLoading:G,onClick:q}=JH({copyConfig:V,children:u}),[D,U]=h.useState(!1),[Y,Z]=h.useState(!1),[ee,re]=h.useState(!1),[he,fe]=h.useState(!1),[ue,Se]=h.useState(!0),[ae,le]=Wg(d,{expandable:!1,symbol:Me=>Me?C==null?void 0:C.collapse:C==null?void 0:C.expand}),[ce,ye]=tr(le.defaultExpanded||!1,{value:le.expanded}),me=ae&&(!ce||le.expandable==="collapsible"),{rows:de=1}=le,be=h.useMemo(()=>me&&(le.suffix!==void 0||le.onEllipsis||le.expandable||T||W),[me,le,T,W]);fn(()=>{ae&&!be&&(U(TC("webkitLineClamp")),Z(TC("textOverflow")))},[be,ae]);const[we,Te]=h.useState(me),ze=h.useMemo(()=>be?!1:de===1?Y:D,[be,Y,D]);fn(()=>{Te(ze&&me)},[ze,me]);const Ee=me&&(we?he:ee),ke=me&&de===1&&we,je=me&&de>1&&we,Oe=(Me,qe)=>{var It;ye(qe.expanded),(It=le.onExpand)===null||It===void 0||It.call(le,Me,qe)},[Qe,at]=h.useState(0),$t=({offsetWidth:Me})=>{at(Me)},pt=Me=>{var qe;re(Me),ee!==Me&&((qe=le.onEllipsis)===null||qe===void 0||qe.call(le,Me))};h.useEffect(()=>{const Me=E.current;if(ae&&we&&Me){const qe=rF(Me);he!==qe&&fe(qe)}},[ae,we,u,je,ue,Qe]),h.useEffect(()=>{const Me=E.current;if(typeof IntersectionObserver>"u"||!Me||!we||!me)return;const qe=new IntersectionObserver(()=>{Se(!!Me.offsetParent)});return qe.observe(Me),()=>{qe.disconnect()}},[we,me]);const Je=ZH(le.tooltip,O.text,u),ft=h.useMemo(()=>{if(!(!ae||we))return[O.text,u,v,Je.title].find(hb)},[ae,we,v,Je.title,Ee]);if(N)return h.createElement(UH,{value:(n=O.text)!==null&&n!==void 0?n:typeof u=="string"?u:"",onSave:B,onCancel:H,onEnd:O.onEnd,prefixCls:$,className:i,style:o,direction:_,component:g,maxLength:O.maxLength,autoSize:O.autoSize,enterIcon:O.enterIcon});const Xe=()=>{const{expandable:Me,symbol:qe}=le;return Me?h.createElement("button",{type:"button",key:"expand",className:`${$}-${ce?"collapse":"expand"}`,onClick:It=>Oe(It,{expanded:!ce}),"aria-label":ce?C.collapse:C==null?void 0:C.expand},typeof qe=="function"?qe(ce):qe):null},yt=()=>{if(!T)return;const{icon:Me,tooltip:qe,tabIndex:It}=O,St=mi(qe)[0]||(C==null?void 0:C.edit),nn=typeof St=="string"?St:"";return z.includes("icon")?h.createElement(Xo,{key:"edit",title:qe===!1?"":St},h.createElement("button",{type:"button",ref:k,className:`${$}-edit`,onClick:j,"aria-label":nn,tabIndex:It},Me||h.createElement(IH,{role:"button"}))):null},tt=()=>W?h.createElement(iF,Object.assign({key:"copy"},V,{prefixCls:$,copied:A,locale:C,onCopy:q,loading:G,iconOnly:u==null})):null,Le=Me=>[Me&&Xe(),yt(),tt()],rt=Me=>[Me&&!ce&&h.createElement("span",{"aria-hidden":!0,key:"ellipsis"},uF),le.suffix,Le(Me)];return h.createElement(co,{onResize:$t,disabled:!me},Me=>h.createElement(aF,{tooltipProps:Je,enableEllipsis:me,isEllipsis:Ee},h.createElement(v3,Object.assign({className:ne({[`${$}-${a}`]:a,[`${$}-disabled`]:c,[`${$}-ellipsis`]:ae,[`${$}-ellipsis-single-line`]:ke,[`${$}-ellipsis-multiple-line`]:je},i),prefixCls:r,style:Object.assign(Object.assign({},o),{WebkitLineClamp:je?de:void 0}),component:g,ref:mo(Me,E,t),direction:_,onClick:z.includes("text")?j:void 0,"aria-label":ft==null?void 0:ft.toString(),title:v},P),h.createElement(sF,{enableMeasure:me&&!we,text:u,rows:de,width:Qe,onEllipsis:pt,expanded:ce,miscDeps:[A,ce,G,T,W,C].concat(We(rx.map(qe=>e[qe])))},(qe,It)=>cF(e,h.createElement(h.Fragment,null,qe.length>0&&It&&!ce&&ft?h.createElement("span",{key:"show-content","aria-hidden":!0},qe):qe,rt(It)))))))});var dF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const hF=h.forwardRef((e,t)=>{const{ellipsis:n,rel:r,children:i,navigate:o}=e,a=dF(e,["ellipsis","rel","children","navigate"]),c=Object.assign(Object.assign({},a),{rel:r===void 0&&a.target==="_blank"?"noopener noreferrer":r});return h.createElement(vm,Object.assign({},c,{ref:t,ellipsis:!!n,component:"a"}),i)});var fF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const mF=h.forwardRef((e,t)=>{const{children:n}=e,r=fF(e,["children"]);return h.createElement(vm,Object.assign({ref:t},r,{component:"div"}),n)});var pF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const gF=(e,t)=>{const{ellipsis:n,children:r}=e,i=pF(e,["ellipsis","children"]),o=h.useMemo(()=>n&&typeof n=="object"?fr(n,["expandable","rows"]):n,[n]);return h.createElement(vm,Object.assign({ref:t},i,{ellipsis:o,component:"span"}),r)},vF=h.forwardRef(gF);var yF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const bF=[1,2,3,4,5],_F=h.forwardRef((e,t)=>{const{level:n=1,children:r}=e,i=yF(e,["level","children"]),o=bF.includes(n)?`h${n}`:"h1";return h.createElement(vm,Object.assign({ref:t},i,{component:o}),r)}),No=v3;No.Text=vF;No.Link=hF;No.Title=_F;No.Paragraph=mF;var SF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},CF=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:SF}))},wF=h.forwardRef(CF),xF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z"}}]},name:"bar-chart",theme:"outlined"},EF=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:xF}))},ix=h.forwardRef(EF),kF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"},$F=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:kF}))},Fh=h.forwardRef($F),RF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM761.4 836H262.6A371.12 371.12 0 01140 560c0-99.4 38.7-192.8 109-263 70.3-70.3 163.7-109 263-109 99.4 0 192.8 38.7 263 109 70.3 70.3 109 163.7 109 263 0 105.6-44.5 205.5-122.6 276zM623.5 421.5a8.03 8.03 0 00-11.3 0L527.7 506c-18.7-5-39.4-.2-54.1 14.5a55.95 55.95 0 000 79.2 55.95 55.95 0 0079.2 0 55.87 55.87 0 0014.5-54.1l84.5-84.5c3.1-3.1 3.1-8.2 0-11.3l-28.3-28.3zM490 320h44c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8h-44c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8zm260 218v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8zm12.7-197.2l-31.1-31.1a8.03 8.03 0 00-11.3 0l-56.6 56.6a8.03 8.03 0 000 11.3l31.1 31.1c3.1 3.1 8.2 3.1 11.3 0l56.6-56.6c3.1-3.1 3.1-8.2 0-11.3zm-458.6-31.1a8.03 8.03 0 00-11.3 0l-31.1 31.1a8.03 8.03 0 000 11.3l56.6 56.6c3.1 3.1 8.2 3.1 11.3 0l31.1-31.1c3.1-3.1 3.1-8.2 0-11.3l-56.6-56.6zM262 530h-80c-4.4 0-8 3.6-8 8v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8z"}}]},name:"dashboard",theme:"outlined"},TF=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:RF}))},PF=h.forwardRef(TF),OF={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"}}]},name:"export",theme:"outlined"},IF=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:OF}))},NF=h.forwardRef(IF),MF={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM653.3 424.6l52.2 52.2a8.01 8.01 0 01-4.7 13.6l-179.4 21c-5.1.6-9.5-3.7-8.9-8.9l21-179.4c.8-6.6 8.9-9.4 13.6-4.7l52.4 52.4 256.2-256.2c3.1-3.1 8.2-3.1 11.3 0l42.4 42.4c3.1 3.1 3.1 8.2 0 11.3L653.3 424.6z"}}]},name:"import",theme:"outlined"},zF=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:MF}))},jF=h.forwardRef(zF),BF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z"}}]},name:"message",theme:"outlined"},LF=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:BF}))},AF=h.forwardRef(LF),DF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},HF=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:DF}))},ox=h.forwardRef(HF),FF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},WF=function(t,n){return h.createElement(wn,Re({},t,{ref:n,icon:FF}))},VF=h.forwardRef(WF),UF=Object.defineProperty,pf=Object.getOwnPropertySymbols,y3=Object.prototype.hasOwnProperty,b3=Object.prototype.propertyIsEnumerable,sx=(e,t,n)=>t in e?UF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,v0=(e,t)=>{for(var n in t||(t={}))y3.call(t,n)&&sx(e,n,t[n]);if(pf)for(var n of pf(t))b3.call(t,n)&&sx(e,n,t[n]);return e},y0=(e,t)=>{var n={};for(var r in e)y3.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&pf)for(var r of pf(e))t.indexOf(r)<0&&b3.call(e,r)&&(n[r]=e[r]);return n};/**
341
+ * @license QR Code generator library (TypeScript)
342
+ * Copyright (c) Project Nayuki.
343
+ * SPDX-License-Identifier: MIT
344
+ */var Ma;(e=>{const t=class ln{constructor(u,d,f,m){if(this.version=u,this.errorCorrectionLevel=d,this.modules=[],this.isFunction=[],u<ln.MIN_VERSION||u>ln.MAX_VERSION)throw new RangeError("Version value out of range");if(m<-1||m>7)throw new RangeError("Mask value out of range");this.size=u*4+17;let g=[];for(let y=0;y<this.size;y++)g.push(!1);for(let y=0;y<this.size;y++)this.modules.push(g.slice()),this.isFunction.push(g.slice());this.drawFunctionPatterns();const v=this.addEccAndInterleave(f);if(this.drawCodewords(v),m==-1){let y=1e9;for(let S=0;S<8;S++){this.applyMask(S),this.drawFormatBits(S);const _=this.getPenaltyScore();_<y&&(m=S,y=_),this.applyMask(S)}}i(0<=m&&m<=7),this.mask=m,this.applyMask(m),this.drawFormatBits(m),this.isFunction=[]}static encodeText(u,d){const f=e.QrSegment.makeSegments(u);return ln.encodeSegments(f,d)}static encodeBinary(u,d){const f=e.QrSegment.makeBytes(u);return ln.encodeSegments([f],d)}static encodeSegments(u,d,f=1,m=40,g=-1,v=!0){if(!(ln.MIN_VERSION<=f&&f<=m&&m<=ln.MAX_VERSION)||g<-1||g>7)throw new RangeError("Invalid value");let y,S;for(y=f;;y++){const k=ln.getNumDataCodewords(y,d)*8,$=a.getTotalBits(u,y);if($<=k){S=$;break}if(y>=m)throw new RangeError("Data too long")}for(const k of[ln.Ecc.MEDIUM,ln.Ecc.QUARTILE,ln.Ecc.HIGH])v&&S<=ln.getNumDataCodewords(y,k)*8&&(d=k);let _=[];for(const k of u){n(k.mode.modeBits,4,_),n(k.numChars,k.mode.numCharCountBits(y),_);for(const $ of k.getData())_.push($)}i(_.length==S);const C=ln.getNumDataCodewords(y,d)*8;i(_.length<=C),n(0,Math.min(4,C-_.length),_),n(0,(8-_.length%8)%8,_),i(_.length%8==0);for(let k=236;_.length<C;k^=253)n(k,8,_);let E=[];for(;E.length*8<_.length;)E.push(0);return _.forEach((k,$)=>E[$>>>3]|=k<<7-($&7)),new ln(y,d,E,g)}getModule(u,d){return 0<=u&&u<this.size&&0<=d&&d<this.size&&this.modules[d][u]}getModules(){return this.modules}drawFunctionPatterns(){for(let f=0;f<this.size;f++)this.setFunctionModule(6,f,f%2==0),this.setFunctionModule(f,6,f%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const u=this.getAlignmentPatternPositions(),d=u.length;for(let f=0;f<d;f++)for(let m=0;m<d;m++)f==0&&m==0||f==0&&m==d-1||f==d-1&&m==0||this.drawAlignmentPattern(u[f],u[m]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(u){const d=this.errorCorrectionLevel.formatBits<<3|u;let f=d;for(let g=0;g<10;g++)f=f<<1^(f>>>9)*1335;const m=(d<<10|f)^21522;i(m>>>15==0);for(let g=0;g<=5;g++)this.setFunctionModule(8,g,r(m,g));this.setFunctionModule(8,7,r(m,6)),this.setFunctionModule(8,8,r(m,7)),this.setFunctionModule(7,8,r(m,8));for(let g=9;g<15;g++)this.setFunctionModule(14-g,8,r(m,g));for(let g=0;g<8;g++)this.setFunctionModule(this.size-1-g,8,r(m,g));for(let g=8;g<15;g++)this.setFunctionModule(8,this.size-15+g,r(m,g));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let u=this.version;for(let f=0;f<12;f++)u=u<<1^(u>>>11)*7973;const d=this.version<<12|u;i(d>>>18==0);for(let f=0;f<18;f++){const m=r(d,f),g=this.size-11+f%3,v=Math.floor(f/3);this.setFunctionModule(g,v,m),this.setFunctionModule(v,g,m)}}drawFinderPattern(u,d){for(let f=-4;f<=4;f++)for(let m=-4;m<=4;m++){const g=Math.max(Math.abs(m),Math.abs(f)),v=u+m,y=d+f;0<=v&&v<this.size&&0<=y&&y<this.size&&this.setFunctionModule(v,y,g!=2&&g!=4)}}drawAlignmentPattern(u,d){for(let f=-2;f<=2;f++)for(let m=-2;m<=2;m++)this.setFunctionModule(u+m,d+f,Math.max(Math.abs(m),Math.abs(f))!=1)}setFunctionModule(u,d,f){this.modules[d][u]=f,this.isFunction[d][u]=!0}addEccAndInterleave(u){const d=this.version,f=this.errorCorrectionLevel;if(u.length!=ln.getNumDataCodewords(d,f))throw new RangeError("Invalid argument");const m=ln.NUM_ERROR_CORRECTION_BLOCKS[f.ordinal][d],g=ln.ECC_CODEWORDS_PER_BLOCK[f.ordinal][d],v=Math.floor(ln.getNumRawDataModules(d)/8),y=m-v%m,S=Math.floor(v/m);let _=[];const C=ln.reedSolomonComputeDivisor(g);for(let k=0,$=0;k<m;k++){let P=u.slice($,$+S-g+(k<y?0:1));$+=P.length;const T=ln.reedSolomonComputeRemainder(P,C);k<y&&P.push(0),_.push(P.concat(T))}let E=[];for(let k=0;k<_[0].length;k++)_.forEach(($,P)=>{(k!=S-g||P>=y)&&E.push($[k])});return i(E.length==v),E}drawCodewords(u){if(u.length!=Math.floor(ln.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let d=0;for(let f=this.size-1;f>=1;f-=2){f==6&&(f=5);for(let m=0;m<this.size;m++)for(let g=0;g<2;g++){const v=f-g,S=(f+1&2)==0?this.size-1-m:m;!this.isFunction[S][v]&&d<u.length*8&&(this.modules[S][v]=r(u[d>>>3],7-(d&7)),d++)}}i(d==u.length*8)}applyMask(u){if(u<0||u>7)throw new RangeError("Mask value out of range");for(let d=0;d<this.size;d++)for(let f=0;f<this.size;f++){let m;switch(u){case 0:m=(f+d)%2==0;break;case 1:m=d%2==0;break;case 2:m=f%3==0;break;case 3:m=(f+d)%3==0;break;case 4:m=(Math.floor(f/3)+Math.floor(d/2))%2==0;break;case 5:m=f*d%2+f*d%3==0;break;case 6:m=(f*d%2+f*d%3)%2==0;break;case 7:m=((f+d)%2+f*d%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[d][f]&&m&&(this.modules[d][f]=!this.modules[d][f])}}getPenaltyScore(){let u=0;for(let g=0;g<this.size;g++){let v=!1,y=0,S=[0,0,0,0,0,0,0];for(let _=0;_<this.size;_++)this.modules[g][_]==v?(y++,y==5?u+=ln.PENALTY_N1:y>5&&u++):(this.finderPenaltyAddHistory(y,S),v||(u+=this.finderPenaltyCountPatterns(S)*ln.PENALTY_N3),v=this.modules[g][_],y=1);u+=this.finderPenaltyTerminateAndCount(v,y,S)*ln.PENALTY_N3}for(let g=0;g<this.size;g++){let v=!1,y=0,S=[0,0,0,0,0,0,0];for(let _=0;_<this.size;_++)this.modules[_][g]==v?(y++,y==5?u+=ln.PENALTY_N1:y>5&&u++):(this.finderPenaltyAddHistory(y,S),v||(u+=this.finderPenaltyCountPatterns(S)*ln.PENALTY_N3),v=this.modules[_][g],y=1);u+=this.finderPenaltyTerminateAndCount(v,y,S)*ln.PENALTY_N3}for(let g=0;g<this.size-1;g++)for(let v=0;v<this.size-1;v++){const y=this.modules[g][v];y==this.modules[g][v+1]&&y==this.modules[g+1][v]&&y==this.modules[g+1][v+1]&&(u+=ln.PENALTY_N2)}let d=0;for(const g of this.modules)d=g.reduce((v,y)=>v+(y?1:0),d);const f=this.size*this.size,m=Math.ceil(Math.abs(d*20-f*10)/f)-1;return i(0<=m&&m<=9),u+=m*ln.PENALTY_N4,i(0<=u&&u<=2568888),u}getAlignmentPatternPositions(){if(this.version==1)return[];{const u=Math.floor(this.version/7)+2,d=this.version==32?26:Math.ceil((this.version*4+4)/(u*2-2))*2;let f=[6];for(let m=this.size-7;f.length<u;m-=d)f.splice(1,0,m);return f}}static getNumRawDataModules(u){if(u<ln.MIN_VERSION||u>ln.MAX_VERSION)throw new RangeError("Version number out of range");let d=(16*u+128)*u+64;if(u>=2){const f=Math.floor(u/7)+2;d-=(25*f-10)*f-55,u>=7&&(d-=36)}return i(208<=d&&d<=29648),d}static getNumDataCodewords(u,d){return Math.floor(ln.getNumRawDataModules(u)/8)-ln.ECC_CODEWORDS_PER_BLOCK[d.ordinal][u]*ln.NUM_ERROR_CORRECTION_BLOCKS[d.ordinal][u]}static reedSolomonComputeDivisor(u){if(u<1||u>255)throw new RangeError("Degree out of range");let d=[];for(let m=0;m<u-1;m++)d.push(0);d.push(1);let f=1;for(let m=0;m<u;m++){for(let g=0;g<d.length;g++)d[g]=ln.reedSolomonMultiply(d[g],f),g+1<d.length&&(d[g]^=d[g+1]);f=ln.reedSolomonMultiply(f,2)}return d}static reedSolomonComputeRemainder(u,d){let f=d.map(m=>0);for(const m of u){const g=m^f.shift();f.push(0),d.forEach((v,y)=>f[y]^=ln.reedSolomonMultiply(v,g))}return f}static reedSolomonMultiply(u,d){if(u>>>8||d>>>8)throw new RangeError("Byte out of range");let f=0;for(let m=7;m>=0;m--)f=f<<1^(f>>>7)*285,f^=(d>>>m&1)*u;return i(f>>>8==0),f}finderPenaltyCountPatterns(u){const d=u[1];i(d<=this.size*3);const f=d>0&&u[2]==d&&u[3]==d*3&&u[4]==d&&u[5]==d;return(f&&u[0]>=d*4&&u[6]>=d?1:0)+(f&&u[6]>=d*4&&u[0]>=d?1:0)}finderPenaltyTerminateAndCount(u,d,f){return u&&(this.finderPenaltyAddHistory(d,f),d=0),d+=this.size,this.finderPenaltyAddHistory(d,f),this.finderPenaltyCountPatterns(f)}finderPenaltyAddHistory(u,d){d[0]==0&&(u+=this.size),d.pop(),d.unshift(u)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.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]],t.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]],e.QrCode=t;function n(c,u,d){if(u<0||u>31||c>>>u)throw new RangeError("Value out of range");for(let f=u-1;f>=0;f--)d.push(c>>>f&1)}function r(c,u){return(c>>>u&1)!=0}function i(c){if(!c)throw new Error("Assertion error")}const o=class rr{constructor(u,d,f){if(this.mode=u,this.numChars=d,this.bitData=f,d<0)throw new RangeError("Invalid argument");this.bitData=f.slice()}static makeBytes(u){let d=[];for(const f of u)n(f,8,d);return new rr(rr.Mode.BYTE,u.length,d)}static makeNumeric(u){if(!rr.isNumeric(u))throw new RangeError("String contains non-numeric characters");let d=[];for(let f=0;f<u.length;){const m=Math.min(u.length-f,3);n(parseInt(u.substring(f,f+m),10),m*3+1,d),f+=m}return new rr(rr.Mode.NUMERIC,u.length,d)}static makeAlphanumeric(u){if(!rr.isAlphanumeric(u))throw new RangeError("String contains unencodable characters in alphanumeric mode");let d=[],f;for(f=0;f+2<=u.length;f+=2){let m=rr.ALPHANUMERIC_CHARSET.indexOf(u.charAt(f))*45;m+=rr.ALPHANUMERIC_CHARSET.indexOf(u.charAt(f+1)),n(m,11,d)}return f<u.length&&n(rr.ALPHANUMERIC_CHARSET.indexOf(u.charAt(f)),6,d),new rr(rr.Mode.ALPHANUMERIC,u.length,d)}static makeSegments(u){return u==""?[]:rr.isNumeric(u)?[rr.makeNumeric(u)]:rr.isAlphanumeric(u)?[rr.makeAlphanumeric(u)]:[rr.makeBytes(rr.toUtf8ByteArray(u))]}static makeEci(u){let d=[];if(u<0)throw new RangeError("ECI assignment value out of range");if(u<128)n(u,8,d);else if(u<16384)n(2,2,d),n(u,14,d);else if(u<1e6)n(6,3,d),n(u,21,d);else throw new RangeError("ECI assignment value out of range");return new rr(rr.Mode.ECI,0,d)}static isNumeric(u){return rr.NUMERIC_REGEX.test(u)}static isAlphanumeric(u){return rr.ALPHANUMERIC_REGEX.test(u)}getData(){return this.bitData.slice()}static getTotalBits(u,d){let f=0;for(const m of u){const g=m.mode.numCharCountBits(d);if(m.numChars>=1<<g)return 1/0;f+=4+g+m.bitData.length}return f}static toUtf8ByteArray(u){u=encodeURI(u);let d=[];for(let f=0;f<u.length;f++)u.charAt(f)!="%"?d.push(u.charCodeAt(f)):(d.push(parseInt(u.substring(f+1,f+3),16)),f+=2);return d}};o.NUMERIC_REGEX=/^[0-9]*$/,o.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,o.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let a=o;e.QrSegment=o})(Ma||(Ma={}));(e=>{(t=>{const n=class{constructor(i,o){this.ordinal=i,this.formatBits=o}};n.LOW=new n(0,1),n.MEDIUM=new n(1,0),n.QUARTILE=new n(2,3),n.HIGH=new n(3,2),t.Ecc=n})(e.QrCode||(e.QrCode={}))})(Ma||(Ma={}));(e=>{(t=>{const n=class{constructor(i,o){this.modeBits=i,this.numBitsCharCount=o}numCharCountBits(i){return this.numBitsCharCount[Math.floor((i+7)/17)]}};n.NUMERIC=new n(1,[10,12,14]),n.ALPHANUMERIC=new n(2,[9,11,13]),n.BYTE=new n(4,[8,16,16]),n.KANJI=new n(8,[8,10,12]),n.ECI=new n(7,[0,0,0]),t.Mode=n})(e.QrSegment||(e.QrSegment={}))})(Ma||(Ma={}));var Ll=Ma;/**
345
+ * @license qrcode.react
346
+ * Copyright (c) Paul O'Shannessy
347
+ * SPDX-License-Identifier: ISC
348
+ */var qF={L:Ll.QrCode.Ecc.LOW,M:Ll.QrCode.Ecc.MEDIUM,Q:Ll.QrCode.Ecc.QUARTILE,H:Ll.QrCode.Ecc.HIGH},_3=128,S3="L",C3="#FFFFFF",w3="#000000",x3=!1,E3=1,KF=4,GF=0,XF=.1;function k3(e,t=0){const n=[];return e.forEach(function(r,i){let o=null;r.forEach(function(a,c){if(!a&&o!==null){n.push(`M${o+t} ${i+t}h${c-o}v1H${o+t}z`),o=null;return}if(c===r.length-1){if(!a)return;o===null?n.push(`M${c+t},${i+t} h1v1H${c+t}z`):n.push(`M${o+t},${i+t} h${c+1-o}v1H${o+t}z`);return}a&&o===null&&(o=c)})}),n.join("")}function $3(e,t){return e.slice().map((n,r)=>r<t.y||r>=t.y+t.h?n:n.map((i,o)=>o<t.x||o>=t.x+t.w?i:!1))}function YF(e,t,n,r){if(r==null)return null;const i=e.length+n*2,o=Math.floor(t*XF),a=i/t,c=(r.width||o)*a,u=(r.height||o)*a,d=r.x==null?e.length/2-c/2:r.x*a,f=r.y==null?e.length/2-u/2:r.y*a,m=r.opacity==null?1:r.opacity;let g=null;if(r.excavate){let y=Math.floor(d),S=Math.floor(f),_=Math.ceil(c+d-y),C=Math.ceil(u+f-S);g={x:y,y:S,w:_,h:C}}const v=r.crossOrigin;return{x:d,y:f,h:u,w:c,excavation:g,opacity:m,crossOrigin:v}}function JF(e,t){return t!=null?Math.max(Math.floor(t),0):e?KF:GF}function R3({value:e,level:t,minVersion:n,includeMargin:r,marginSize:i,imageSettings:o,size:a,boostLevel:c}){let u=J.useMemo(()=>{const y=(Array.isArray(e)?e:[e]).reduce((S,_)=>(S.push(...Ll.QrSegment.makeSegments(_)),S),[]);return Ll.QrCode.encodeSegments(y,qF[t],n,void 0,void 0,c)},[e,t,n,c]);const{cells:d,margin:f,numCells:m,calculatedImageSettings:g}=J.useMemo(()=>{let v=u.getModules();const y=JF(r,i),S=v.length+y*2,_=YF(v,a,y,o);return{cells:v,margin:y,numCells:S,calculatedImageSettings:_}},[u,a,o,r,i]);return{qrcode:u,margin:f,cells:d,numCells:m,calculatedImageSettings:g}}var QF=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),T3=J.forwardRef(function(t,n){const r=t,{value:i,size:o=_3,level:a=S3,bgColor:c=C3,fgColor:u=w3,includeMargin:d=x3,minVersion:f=E3,boostLevel:m,marginSize:g,imageSettings:v}=r,S=y0(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:_}=S,C=y0(S,["style"]),E=v==null?void 0:v.src,k=J.useRef(null),$=J.useRef(null),P=J.useCallback(B=>{k.current=B,typeof n=="function"?n(B):n&&(n.current=B)},[n]),[T,O]=J.useState(!1),{margin:N,cells:I,numCells:z,calculatedImageSettings:L}=R3({value:i,level:a,minVersion:f,boostLevel:m,includeMargin:d,marginSize:g,imageSettings:v,size:o});J.useEffect(()=>{if(k.current!=null){const B=k.current,H=B.getContext("2d");if(!H)return;let W=I;const V=$.current,A=L!=null&&V!==null&&V.complete&&V.naturalHeight!==0&&V.naturalWidth!==0;A&&L.excavation!=null&&(W=$3(I,L.excavation));const G=window.devicePixelRatio||1;B.height=B.width=o*G;const q=o/z*G;H.scale(q,q),H.fillStyle=c,H.fillRect(0,0,z,z),H.fillStyle=u,QF?H.fill(new Path2D(k3(W,N))):I.forEach(function(D,U){D.forEach(function(Y,Z){Y&&H.fillRect(Z+N,U+N,1,1)})}),L&&(H.globalAlpha=L.opacity),A&&H.drawImage(V,L.x+N,L.y+N,L.w,L.h)}}),J.useEffect(()=>{O(!1)},[E]);const M=v0({height:o,width:o},_);let j=null;return E!=null&&(j=J.createElement("img",{src:E,key:E,style:{display:"none"},onLoad:()=>{O(!0)},ref:$,crossOrigin:L==null?void 0:L.crossOrigin})),J.createElement(J.Fragment,null,J.createElement("canvas",v0({style:M,height:o,width:o,ref:P,role:"img"},C)),j)});T3.displayName="QRCodeCanvas";var ZF=J.forwardRef(function(t,n){const r=t,{value:i,size:o=_3,level:a=S3,bgColor:c=C3,fgColor:u=w3,includeMargin:d=x3,minVersion:f=E3,boostLevel:m,title:g,marginSize:v,imageSettings:y}=r,S=y0(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:_,cells:C,numCells:E,calculatedImageSettings:k}=R3({value:i,level:a,minVersion:f,boostLevel:m,includeMargin:d,marginSize:v,imageSettings:y,size:o});let $=C,P=null;y!=null&&k!=null&&(k.excavation!=null&&($=$3(C,k.excavation)),P=J.createElement("image",{href:y.src,height:k.h,width:k.w,x:k.x+_,y:k.y+_,preserveAspectRatio:"none",opacity:k.opacity,crossOrigin:k.crossOrigin}));const T=k3($,_);return J.createElement("svg",v0({height:o,width:o,viewBox:`0 0 ${E} ${E}`,ref:n,role:"img"},S),!!g&&J.createElement("title",null,g),J.createElement("path",{fill:c,d:`M0,0 h${E}v${E}H0z`,shapeRendering:"crispEdges"}),J.createElement("path",{fill:u,d:T,shapeRendering:"crispEdges"}),P)});ZF.displayName="QRCodeSVG";const ax=/command execution specialist|file search specialist|planning specialist|general-purpose agent/i;function gf(e){const t=e==null?void 0:e.system;return typeof t=="string"?t:Array.isArray(t)?t.map(n=>n&&n.text||"").join(""):""}function qr(e){if(!e)return!1;if(e.mainAgent){const r=gf(e.body||{});return!ax.test(r)}const t=e.body||{},n=t.tools;if(t.system&&Array.isArray(n)&&n.length>10){const r=n.some(a=>a.name==="Edit"),i=n.some(a=>a.name==="Bash"),o=n.some(a=>a.name==="Task"||a.name==="Agent");if(r&&i&&o){const a=gf(t);if(a.includes("You are Claude Code")&&!ax.test(a))return!0}}return!1}function b0(e){return e?/^Base directory for this skill:/i.test(e.trim()):!1}function fb(e){if(!e)return!0;const t=e.trim();return!!(!t||/^<[a-zA-Z_][\w-]*[\s>]/i.test(t)||/^\[SUGGESTION MODE:/i.test(t)||/^Your response was cut off because it exceeded the output token limit/i.test(t)||/^Base directory for this skill:/i.test(t))}function P3(e){if(!Array.isArray(e))return{commands:[],textBlocks:[],skillBlocks:[]};const t=e.some(o=>o.type==="text"&&/<command-message>/i.test(o.text||"")),n=[];if(t)for(const o of e){if(o.type!=="text")continue;const a=(o.text||"").match(/<command-name>\s*([^<]*)<\/command-name>/i);if(a){const c=a[1].trim();n.push(c.startsWith("/")?c:`/${c}`)}}let r=e.filter(o=>o.type==="text"&&!fb(o.text));t&&(r=r.filter(o=>!/<command-message>/i.test(o.text||"")));const i=r.filter(o=>b0(o.text));return i.length>0&&(r=r.filter(o=>!b0(o.text))),{commands:n,textBlocks:r,skillBlocks:i}}function O3(e,t){var v,y;const n=e[t];if(!qr(n))return null;const r=(y=(v=n.response)==null?void 0:v.body)==null?void 0:y.usage;if(!r)return null;const i=r.cache_creation_input_tokens||0,o=r.cache_read_input_tokens||0;if(i===0||i<=o)return null;let a=null;for(let S=t-1;S>=0;S--)if(qr(e[S])){a=e[S];break}if(!a)return null;if(n.timestamp-a.timestamp>300*1e3)return{reason:"ttl"};const u=Ra(a.body),d=Ra(n.body);if(!u||!d)return{reason:"key_change"};const f=[];u.model!==d.model&&f.push("model_change"),JSON.stringify(u.system)!==JSON.stringify(d.system)&&f.push("system_change"),JSON.stringify(u.tools)!==JSON.stringify(d.tools)&&f.push("tools_change");const m=u.messages||[],g=d.messages||[];if(g.length<m.length)f.push("msg_truncated");else{const S=Math.min(m.length,g.length);let _=!0;for(let C=0;C<S;C++)if(JSON.stringify(m[C])!==JSON.stringify(g[C])){_=!1;break}_||f.push("msg_modified")}return f.length===0?{reason:"key_change"}:{reason:f[0],reasons:f}}function vf(e){return e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):""}function I3(e){return e.content?typeof e.content=="string"?e.content:Array.isArray(e.content)?e.content.filter(t=>t.type==="text").map(t=>t.text).join(`
349
+ `):JSON.stringify(e.content):String(e.content??"")}const eW=[{match:/claude/i,name:"Claude",color:"#000000",svg:'<svg t="1771495509570" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1570" width="200" height="200"><path d="M198.4 678.4l198.4-115.2 6.4-12.8H243.2l-96-6.4-102.4-6.4-19.2-6.4-25.6-25.6v-12.8l19.2-12.8h32l64 6.4 96 6.4 70.4 6.4L384 512h19.2V492.8l-6.4-6.4-102.4-64-108.8-76.8-51.2-38.4-32-19.2-19.2-25.6-6.4-38.4 32-32h44.8l38.4 32 83.2 64L384 364.8l12.8 12.8 6.4-6.4-6.4-12.8L339.2 256l-64-108.8-25.6-38.4-6.4-25.6c0-12.8-6.4-19.2-6.4-32l32-44.8 19.2-6.4 44.8 6.4 19.2 12.8 25.6 57.6 44.8 96 64 128 19.2 38.4 6.4 38.4 6.4 12.8h6.4V384l6.4-70.4 12.8-89.6 12.8-115.2 6.4-32 19.2-38.4 32-19.2 25.6 12.8 19.2 32v19.2l-32 70.4-19.2 121.6-19.2 83.2h6.4l12.8-12.8 44.8-57.6 70.4-89.6 32-32 38.4-38.4 25.6-19.2h44.8l32 51.2-12.8 51.2-51.2 57.6-38.4 51.2-51.2 70.4-38.4 57.6v6.4h6.4l121.6-25.6 64-12.8 76.8-12.8 38.4 19.2 6.4 19.2-12.8 32-83.2 19.2-96 19.2-147.2 32 64 6.4h96l128 6.4 32 19.2 25.6 38.4-6.4 19.2-51.2 25.6-70.4-12.8-160-38.4-57.6-12.8h-6.4v6.4l44.8 44.8 83.2 76.8 108.8 102.4 6.4 25.6-12.8 19.2h-12.8l-96-70.4-38.4-32-83.2-70.4h-6.4v6.4l19.2 25.6 102.4 147.2 6.4 44.8-6.4 12.8-25.6 6.4-25.6-6.4-57.6-83.2-64-83.2-51.2-83.2-6.4 6.4-25.6 307.2-12.8 12.8-32 12.8-25.6-19.2-12.8-32 12.8-64 19.2-83.2 12.8-64 12.8-83.2 6.4-25.6h-6.4l-64 83.2-96 128-70.4 76.8-19.2 6.4-32-12.8v-25.6l19.2-25.6 102.4-128 64-83.2 38.4-51.2v-6.4l-268.8 172.8-51.2 12.8-19.2-19.2v-32l12.8-12.8 76.8-57.6z m0 0" fill="#D97757" p-id="1571"></path></svg>'},{match:/gpt|o1|o3|o4/i,name:"OpenAI",color:"#00000",svg:'<svg t="1771495569354" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2752" width="200" height="200"><path d="M565.265178 954.519092c-22.289934 0-48.400999-8.151747-67.952455-14.838727a103.425292 103.425292 0 0 1-26.875292-11.272338c-12.737105-7.769634-15.411897-8.342804-19.806198-24.773669 21.971506-5.158528 81.581157-41.905075 103.871091-55.342721 148.896757-89.159735 119.028246-10.444426 119.028246-364.981743 15.029784 3.566389 82.791182 32.415932 82.791182 57.316972 0 133.102747 20.570425 273.847757-52.604243 354.91943-22.799418 25.47421-91.834527 58.972796-138.388646 58.972796z m-433.061569-299.321966c258.626916 136.860193 184.369594 157.048504 357.721593 52.094759 44.579867-27.193719 90.433445-49.292596 132.593263-77.568969v101.896839c-95.528287 22.226248-272.319304 227.038896-419.050754 100.686815l-25.856323-25.155782c-37.319718-43.943012-45.344094-72.410442-45.344094-151.889977z m375.744596-19.105658c-19.933569-13.310275-79.479535-51.330533-101.896839-57.316972v-133.739602a1158.312326 1158.312326 0 0 0 101.896839-57.316973c43.943012 10.189684 70.690933 47.063603 114.633945 57.316973v127.371049c-17.831947 12.10025-95.846715 58.718054-114.633945 63.749211z m-426.693016-178.31947c0-63.685525-4.26693-90.306074 38.84817-145.776166 23.945757-30.88748 47.509402-39.612396 82.090641-57.953828v261.110652c44.134069 23.372588 83.873836 49.037854 129.345301 74.448379l131.765351 78.396881c-59.545966 15.921381-63.685525 61.32916-109.602788 33.753328-104.699003-62.730242-272.38299-129.345301-272.38299-243.91556z m866.123138 127.37105c0 79.543221-47.573087 161.188063-121.002497 178.31947v-165.582365c0-82.791182 9.743885-84.574377-48.910483-116.608196L565.265178 362.371082c15.79401-23.62733 22.608361-19.105657 48.146256-34.835982 41.714019-25.47421 39.039227-16.112438 117.053995 28.785857 94.190891 54.196382 216.849212 100.559444 216.849212 228.885777z m-541.326961-197.425127v-95.528287c43.751956-23.181531 90.688187-50.94842 133.357489-76.804743 82.154327-49.547338 95.528287-63.303412 185.006449-63.303412 48.464684 0 102.533695 36.746548 125.651541 65.405034 42.223503 52.22213 39.930824 92.662439 39.930824 151.125751-31.078536-16.494551-192.393971-121.002497-222.899337-121.002498s-229.650003 123.422547-261.110652 140.108155z m-50.94842 159.213812c-16.36718-10.95391-63.112355-39.99451-82.791183-44.579867 0-168.320842-33.880699-314.606493 67.952455-390.519639 56.043262-41.714019 113.169178-53.814269 181.376375-30.696423 25.47421 8.661231 35.536523 20.888852 56.36169 26.429493-11.781822 16.048752-80.68956 50.311565-102.278953 63.303412-154.564769 93.235608-120.620384 7.451206-120.620384 376.063024z m-292.953415 121.002498c0 169.148754 115.143429 280.853165 274.293556 273.847756 59.800708-2.674792 26.811606-7.705949 69.417222 25.47421 97.820966 76.741057 228.822091 73.747838 319.637649 1.018969a251.939936 251.939936 0 0 0 52.604244-55.661149c58.20857-85.274918-10.95391-45.598836 81.96327-83.619094 130.236898-53.241099 199.399378-217.358696 128.64476-355.428914-27.448461-53.559526-40.249252-28.849543-28.276373-104.699003 18.723544-118.582447-63.176041-230.032116-157.621674-269.771884-98.90362-41.586648-129.090559 12.737105-178.892639-37.574459A161.888604 161.888604 0 0 0 580.103905 28.913674C474.003821-27.766443 331.284559 1.528898 258.428319 93.681853c-81.326415 102.979494 9.489143 54.705866-92.407697 98.648878C15.149614 257.353652-33.251385 439.175825 41.579107 561.06992c56.807488 92.598753 20.570425 4.967471 20.570424 106.800625z" fill="#EFA474" p-id="2753"></path></svg>'},{match:/gemini/i,name:"Gemini",color:"#4285F4",svg:'<svg t="1771495622863" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4556" width="200" height="200"><path d="M960 512.896A477.248 477.248 0 0 0 512.896 960h-1.792A477.184 477.184 0 0 0 64 512.896v-1.792A477.184 477.184 0 0 0 511.104 64h1.792A477.248 477.248 0 0 0 960 511.104z" fill="#448AFF" p-id="4557"></path></svg>'},{match:/qwen/i,name:"Qwen",color:"#00000",svg:'<svg t="1771495640319" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5634" width="200" height="200"><path d="M537.782857 57.161143c16.749714 29.44 33.426286 58.953143 50.102857 88.502857a7.68 7.68 0 0 0 6.692572 3.913143h236.873143c7.424 0 13.750857 4.681143 19.017142 13.933714l62.061715 109.677714c8.082286 14.372571 10.24 20.370286 1.024 35.693715a2262.893714 2262.893714 0 0 0-32.438857 55.478857l-15.652572 28.086857c-4.534857 8.338286-9.508571 11.922286-1.718857 21.833143l113.152 197.851428c7.314286 12.8 4.754286 21.065143-1.828571 32.841143-18.651429 33.499429-37.632 66.742857-56.978286 99.84-6.765714 11.593143-14.994286 16.018286-29.001143 15.798857a1833.398857 1833.398857 0 0 0-99.291429 0.658286 4.242286 4.242286 0 0 0-3.437714 2.157714 24571.830857 24571.830857 0 0 1-115.419428 202.24c-7.204571 12.507429-16.201143 15.469714-30.939429 15.506286-42.532571 0.146286-85.430857 0.182857-128.731429 0.109714a22.930286 22.930286 0 0 1-19.821714-11.556571l-56.978286-99.108571a3.84 3.84 0 0 0-3.547428-2.121143h-218.331429a76.288 76.288 0 0 1-34.377143-3.913143l-68.388571-118.198857a23.149714 23.149714 0 0 1-0.073143-23.04l51.492572-90.441143a8.448 8.448 0 0 0 0-8.411429 23594.496 23594.496 0 0 1-80.018286-139.593143L47.542857 425.325714c-6.838857-13.202286-7.387429-21.138286 4.022857-41.179428 19.858286-34.669714 39.570286-69.302857 59.209143-103.936 5.632-9.984 12.946286-14.262857 24.905143-14.262857 36.827429-0.182857 73.654857-0.182857 110.445714-0.073143 1.901714 0 3.657143-1.024 4.571429-2.669715l119.734857-208.859428a20.845714 20.845714 0 0 1 17.993143-10.496c22.381714-0.036571 44.946286 0 67.547428-0.256l43.410286-0.987429c14.555429-0.109714 30.866286 1.389714 38.4 14.518857z m-146.432 17.188571a2.56 2.56 0 0 0-2.194286 1.28l-122.331428 213.942857a6.692571 6.692571 0 0 1-5.741714 3.364572H138.788571c-2.377143 0-2.962286 1.060571-1.755428 3.145143l247.917714 433.334857c1.060571 1.792 0.548571 2.633143-1.462857 2.669714l-119.222857 0.658286a9.289143 9.289143 0 0 0-8.557714 4.937143l-56.32 98.56c-1.865143 3.328-0.914286 5.046857 2.925714 5.046857l243.858286 0.365714c1.974857 0 3.401143 0.841143 4.425142 2.56l59.867429 104.704c1.974857 3.474286 3.913143 3.510857 5.924571 0l213.577143-373.76 33.426286-58.953143a2.340571 2.340571 0 0 1 4.096 0l60.745143 107.958857a5.193143 5.193143 0 0 0 4.571428 2.633143l117.906286-0.841143a1.718857 1.718857 0 0 0 1.462857-2.56l-123.721143-217.014857a4.608 4.608 0 0 1 0-4.827428l12.507429-21.613715 47.798857-84.370285c1.024-1.755429 0.512-2.633143-1.499428-2.633143H392.521143c-2.486857 0-3.108571-1.097143-1.828572-3.291429l61.184-106.861714a4.571429 4.571429 0 0 0 0-4.864l-58.258285-102.253714a2.56 2.56 0 0 0-2.267429-1.316572z m268.361143 342.198857c1.974857 0 2.486857 0.841143 1.462857 2.56l-35.474286 62.500572-111.542857 195.620571a2.377143 2.377143 0 0 1-2.121143 1.243429 2.486857 2.486857 0 0 1-2.121142-1.243429l-147.346286-257.353143c-0.841143-1.462857-0.402286-2.230857 1.206857-2.304l9.216-0.512 286.793143-0.512h-0.073143z" fill="#7D5DED" p-id="5635"></path></svg>'},{match:/kimi|moonshot/i,name:"Kimi",color:"#00000",svg:'<svg t="1771495664798" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6649" width="200" height="200"><path d="M731.062857 590.262857v318.317714h-148.589714V443.977143a146.285714 146.285714 0 0 1-146.285714 146.285714l-214.491429-0.036571v318.354285H73.142857V165.814857h148.553143v275.858286h180.882286l119.771428-275.858286h167.753143l-67.84 156.269714a255.524571 255.524571 0 0 1-106.678857 119.588572h66.925714a148.553143 148.553143 0 0 1 148.516572 148.589714z m120.758857-473.965714a99.035429 99.035429 0 0 1 0 198.070857h-99.035428V215.332571a99.035429 99.035429 0 0 1 99.035428-99.035428z" fill="#F4F4F4" p-id="6650"></path></svg>'},{match:/glm|chatglm/i,name:"GLM",color:"#00000",svg:'<svg data-name="glm" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 217.2 200"> <!-- Generator: Adobe Illustrator 29.8.2, SVG Export Plug-In . SVG Version: 2.1.1 Build 3) --> <defs> <style> .st0 { fill: #fff; } </style> </defs> <path class="st0" d="M86.8,190.4H0L131.3,4.8h85.8L86.8,190.4h0ZM212.8,190h-107.9l14.9-21.6c2.3-3.3,6-5.2,9.9-5.2h83.1v26.8h0ZM99.4,26.3c-2.3,3.3-6,5.2-9.9,5.2H6.4V4.8h107.9l-14.9,21.6Z"/> </svg>'},{match:/minimax|abab/i,name:"MiniMax",color:"#00000",svg:'<svg viewBox="0 0 24 24" fill="#fff"><path d="M4 8l4-4 4 4 4-4 4 4v8l-4 4-4-4-4 4-4-4z" fill="none" stroke="#fff" stroke-width="1.5" stroke-linejoin="round"/></svg>'},{match:/deepseek/i,name:"DeepSeek",color:"#00000",svg:'<svg t="1771495947541" class="icon" viewBox="0 0 1391 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11539" width="200" height="200"><path d="M1326.70201318 112.02090779c-12.94676356-6.47485468-18.53640721 5.86654827-26.0997327 12.13814316-2.57756953 2.02376031-4.77807747 4.65435413-6.9785854 7.08168819-18.91788751 20.63528526-41.02017805 34.19182812-69.92725218 32.57311444-42.23384508-2.42733405-78.29772513 11.12773591-110.16384908 44.10589703-6.77679853-40.66668282-29.28560862-64.94444203-63.55255448-80.52327231-17.95608583-8.09209545-36.06388005-16.1856638-48.63358202-33.78825438-8.74900746-12.5431898-11.12773591-26.50330641-15.52727888-40.26016327-2.7823022-8.29535522-5.56460442-16.79249731-14.92044538-18.20942411-10.19244639-1.61871367-14.16337637 7.08168818-18.15934561 14.36516325-15.93232553 29.74073376-22.12880269 62.51710799-21.49692994 95.69705596 1.36684831 74.65672404 32.27117059 134.13819156 93.62469006 176.42358804 6.9800583 4.8546681 8.77551959 9.71080912 6.57501165 16.79102439-4.17271686 14.56695011-9.18056624 28.7303265-13.55506995 43.29727663-2.78377509 9.30723537-6.95501906 11.32952278-16.74241882 7.28347507-33.66158524-14.36516325-62.745407-35.60875491-88.46513227-61.30196806-43.62425973-43.09548975-83.0772755-90.64060097-132.26613965-127.86659667a581.67054343 581.67054343 0 0 0-35.07703915-24.48101901c-50.20074429-49.77065841 6.57501167-90.63912807 19.72650789-95.49526908 13.73181759-5.05792788 4.77955037-22.4572587-39.65480265-22.25547181s-85.07599655 15.3770434-136.87041526 35.60875491c-7.58541892 3.03416756-15.55379103 5.25971475-23.69596499 7.08168819-47.03990759-9.10544849-95.84876434-11.12773591-146.8596019-5.26118765-96.02551195 10.92594905-172.73103555 57.25739323-229.12678412 136.36373875-67.72674425 95.09022244-83.68558192 203.13015422-64.13582165 315.82149435 20.48504978 118.76262107 79.88992666 217.09027084 171.13736114 293.97106918 94.6350973 79.71317902 203.61031862 118.76262107 327.93607117 111.27735913 75.51542292-4.45256725 159.57953934-14.77020989 254.41642354-96.71040901 23.92426399 12.13961607 49.03715574 16.99575708 90.66564019 20.63675815 32.09295007 3.03416756 62.97223311-1.61871367 86.87145788-6.67664152 37.45429471-8.09209545 34.84874013-43.49906349 21.31870939-49.97244528-109.7838417-52.19946535-85.68283009-30.95587367-107.58333373-48.15194474 55.78891504-67.37324899 139.85303146-137.3770918 172.73103555-364.17669887 2.60408167-18.00616433 0.40357375-29.33568711 0-43.90263724-0.20325977-8.90218873 1.76894914-12.34287584 11.75960867-13.35328309 27.49014733-3.23742733 54.19671351-10.92594905 78.70277179-24.68280588 71.11440706-39.65480265 99.81822142-104.80250446 106.59649284-182.89844271 1.01188015-11.9363563-0.20178686-24.27775924-12.56970195-30.54935413M706.87018452 814.87993343c-106.36966673-85.37941333-157.98733782-113.5014334-179.30604722-112.28776638-19.92829476 1.21366703-16.33737217 24.48101902-11.96286844 39.65480264 4.5777635 14.97199677 10.57098089 25.2896394 18.94145384 38.44113563 5.76786417 8.70040186 9.76383341 21.64863831-5.78995762 31.35944742-34.26841876 21.64863831-93.82647692-7.28347506-96.60730623-8.69892897-69.3454579-41.67856295-127.33635378-96.710409-168.1797842-171.97249368-39.45154288-72.43117687-62.33888747-150.1220685-66.13306983-233.07267483-1.01188015-20.02992464 4.77955037-27.11161282 24.27923214-30.75408682a235.19659216 235.19659216 0 0 1 77.91771774-2.02228741c108.59668681 16.18713669 201.05631542 65.75453531 278.54394728 144.25552022 44.23256614 44.71125762 77.69089163 98.12439001 112.1861365 150.32385536 36.64567431 55.43394691 76.0986901 108.24024576 126.29943438 151.53604947 17.72778682 15.17378365 31.86465106 26.7065662 45.41972102 35.20370829-40.84343042 4.65435413-108.99878765 5.66476139-155.60860936-31.96628094m51.00936468-334.83953883c0-8.90218873 6.9815312-15.98387693 15.75557791-15.98387693q2.98408908 0.05155138 5.36134463 1.01188017a15.85720779 15.85720779 0 0 1 10.16740714 14.97199676 15.78061715 15.78061715 0 0 1-15.73053865 15.98387691 15.60386953 15.60386953 0 0 1-15.55379103-15.98387691m158.39238446 82.95060635c-10.1423679 4.24930749-20.30830215 7.89178146-30.09570191 8.29535522-15.12370514 0.81009328-31.66286419-5.46150162-40.61513142-13.15002332-13.96011661-11.93782919-23.92573689-18.61447073-28.09845373-39.45301577-1.79546129-8.90218873-0.81009328-22.65904557 0.78505403-30.54935414 3.59092258-16.99575708-0.40504665-27.92023321-12.13961606-37.8343021-9.55910075-8.09356835-21.72522894-10.31911553-35.07703915-10.31911552-4.98281013 0-9.55910075-2.22407429-12.94823645-4.04604774a13.27669246 13.27669246 0 0 1-5.76639128-18.61299783c1.39041466-2.8323807 8.16868608-9.71228202 9.7623605-10.92594905 18.13136058-10.52090241 39.04649623-7.08021529 58.36795748 0.81009328 17.93104659 7.48526194 31.46107731 21.24359167 51.01083757 40.6666828 19.92829476 23.46913885 23.51921733 29.94399353 34.84874013 47.54511123 8.97877936 13.75685685 17.14746545 27.92023321 22.71206987 44.10442409 3.41270206 10.11732865-0.98684091 18.41121097-12.74644958 23.46913885" fill="#4D6BFE" p-id="11540"></path></svg>'}];function tW(e){if(!e)return null;for(const t of eW)if(t.match.test(e))return{name:e.replace(/^claude-/,"").replace(/-\d{8,}$/,""),provider:t.name,color:t.color,svg:t.svg};return{name:e,provider:e,color:"#065f46",svg:Nl("agent")}}function Nl(e){return e==="user"?'<svg viewBox="0 0 24 24"><path d="M12 12c2.7 0 4.8-2.1 4.8-4.8S14.7 2.4 12 2.4 7.2 4.5 7.2 7.2 9.3 12 12 12zm0 2.4c-3.2 0-9.6 1.6-9.6 4.8v2.4h19.2v-2.4c0-3.2-6.4-4.8-9.6-4.8z"/></svg>':e==="agent"?'<svg viewBox="0 0 24 24"><path d="M12 2a2 2 0 012 2c0 .74-.4 1.39-1 1.73V7h1a7 7 0 017 7h1a1 1 0 011 1v3a1 1 0 01-1 1h-1.17A7 7 0 0113 22h-2a7 7 0 01-6.83-3H3a1 1 0 01-1-1v-3a1 1 0 011-1h1a7 7 0 017-7h1V5.73c-.6-.34-1-.99-1-1.73a2 2 0 012-2zM9.5 13a1.5 1.5 0 100 3 1.5 1.5 0 000-3zm5 0a1.5 1.5 0 100 3 1.5 1.5 0 000-3z"/></svg>':'<svg viewBox="0 0 24 24"><path d="M12 15.5A3.5 3.5 0 018.5 12 3.5 3.5 0 0112 8.5a3.5 3.5 0 013.5 3.5 3.5 3.5 0 01-3.5 3.5m7.43-2.53c.04-.32.07-.64.07-.97s-.03-.66-.07-1l2.11-1.63c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65A.49.49 0 0014 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64L4.57 11c-.04.34-.07.67-.07 1s.03.65.07.97l-2.11 1.66c-.19.15-.25.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1.01c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.58 1.69-.98l2.49 1.01c.22.08.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.66z"/></svg>'}function dr(e){return e==null||e===0?"0":e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":String(e)}function Ra(e){if(Array.isArray(e))return e.map(Ra);if(e&&typeof e=="object"){const t={};for(const n of Object.keys(e))n.startsWith("_")||(t[n]=Ra(e[n]));return t}return e}function nW(e){var n,r,i;const t={};for(const o of e){const a=(r=(n=o.response)==null?void 0:n.body)==null?void 0:r.usage;if(!a)continue;const c=((i=o.body)==null?void 0:i.model)||"unknown";t[c]||(t[c]={input:0,output:0,cacheCreation:0,cacheRead:0});const u=t[c];u.input+=a.input_tokens||0,u.output+=a.output_tokens||0,u.cacheCreation+=a.cache_creation_input_tokens||0,u.cacheRead+=a.cache_read_input_tokens||0}return t}function rW(e){var n,r,i;const t={ttl:{count:0,cacheCreate:0},system_change:{count:0,cacheCreate:0},tools_change:{count:0,cacheCreate:0},model_change:{count:0,cacheCreate:0},msg_truncated:{count:0,cacheCreate:0},msg_modified:{count:0,cacheCreate:0},key_change:{count:0,cacheCreate:0}};for(let o=0;o<e.length;o++){const a=O3(e,o);if(!a)continue;const c=((i=(r=(n=e[o].response)==null?void 0:n.body)==null?void 0:r.usage)==null?void 0:i.cache_creation_input_tokens)||0,u=a.reasons||[a.reason];for(const d of u)t[d]&&(t[d].count++,t[d].cacheCreate+=c)}return t}function iW(e){var n,r;const t={};for(const i of e){const o=(r=(n=i.response)==null?void 0:n.body)==null?void 0:r.content;if(Array.isArray(o))for(const a of o)a.type==="tool_use"&&a.name&&(t[a.name]=(t[a.name]||0)+1)}return Object.entries(t).sort((i,o)=>o[1]-i[1])}function oW(e){var n;const t={};for(const r of e){const i=(n=r.body)==null?void 0:n.messages;if(Array.isArray(i))for(const o of i){if(o.role!=="user")continue;const a=o.content;if(Array.isArray(a))for(const c of a){if(c.type!=="text"||!b0(c.text))continue;const u=c.text.match(/^#\s+(.+)$/m),d=u?u[1]:"Skill";t[d]=(t[d]||0)+1}}}return Object.entries(t).sort((r,i)=>i[1]-r[1])}function yf(e){return typeof e!="string"?!1:e.includes("<system-reminder>")&&e.includes("# claudeMd")}function bf(e){return typeof e!="string"?!1:e.includes("<system-reminder>")&&e.includes("skills are available")}function sW(e){const t=e==null?void 0:e.messages;if(!Array.isArray(t))return!1;for(const n of t){const r=n==null?void 0:n.content;if(typeof r=="string"){if(yf(r))return!0}else if(Array.isArray(r)){for(const i of r)if(i.type==="text"&&yf(i.text))return!0}}return!1}function aW(e){const t=e==null?void 0:e.messages;if(!Array.isArray(t))return!1;for(const n of t){const r=n==null?void 0:n.content;if(typeof r=="string"){if(bf(r))return!0}else if(Array.isArray(r)){for(const i of r)if(i.type==="text"&&bf(i.text))return!0}}return!1}function lW(e){return e?e.replace(/^claude-/,"").replace(/-\d{8,}$/,""):null}function cW(e){const t=(e==null?void 0:e.url)||"";return!(e.isHeartbeat||e.isCountTokens||/\/api\/eval\/sdk-/.test(t)||/\/messages\/count_tokens/.test(t))}function us(e){return e.filter(cW)}function lx(e,t){for(let n=t-1;n>=0;n--)if(qr(e[n])&&e[n].timestamp)return e[n].timestamp;return null}function mb(e){const t=e==null?void 0:e.content;if(typeof t=="string")return t;if(Array.isArray(t)){for(const n of t)if((n==null?void 0:n.type)==="text"&&n.text)return n.text}return""}function uW(e){const t=e.body||{},n=gf(t);if(/Extract any file paths/i.test(n)||/process Bash commands/i.test(n)||/command execution specialist/i.test(n))return"Bash";if(/file search specialist/i.test(n))return"Search";if(/planning specialist/i.test(n))return"Plan";if(/general-purpose agent/i.test(n))return"General";const r=t.messages||[];for(let i=r.length-1;i>=0;i--){if(r[i].role!=="user")continue;const o=mb(r[i]);if(/^Command:/m.test(o))return"Bash";break}return null}function dW(e){var r;const t=(r=e.body)==null?void 0:r.messages;if(!Array.isArray(t)||t.length!==1)return!1;const n=t[0];return n.role==="user"&&n.content==="count"}function hW(e,t){var u;const n=e.body||{},r=n.tools,i=n.messages||[];if(Array.isArray(r)&&r.length>0||i.length!==1||i[0].role!=="user")return!1;const o=mb(i[0]);if(!o||o.trim()==="count")return!1;const a=o.trim();if(/^Command:/m.test(o)||/^<policy_spec>/i.test(a)||/^<task-notification>/i.test(a))return!1;const c=gf(n);if(!c.includes("Claude Code")||/process Bash commands/i.test(c)||/Extract any file paths/i.test(c))return!1;if(t){const d=((u=t.body)==null?void 0:u.messages)||[],f=o.slice(0,80);if(d.some(g=>{const v=g==null?void 0:g.content;return typeof v=="string"?v.includes(f):Array.isArray(v)?v.some(y=>(y==null?void 0:y.type)==="text"&&y.text&&y.text.includes(f)):!1}))return!0}return!1}function za(e,t){var r;if(qr(e))return{type:"MainAgent",subType:null};if(e.isCountTokens||dW(e))return{type:"Count",subType:null};if(hW(e,t)){const i=mb((((r=e.body)==null?void 0:r.messages)||[])[0]);return/^Implement the following plan:/i.test(i.trim())?{type:"Plan",subType:"Prompt"}:{type:"Preflight",subType:null}}return{type:"SubAgent",subType:uW(e)}}function _f(e,t){return e==="Plan"&&t?`Plan:${t}`:e==="SubAgent"&&t?`SubAgent:${t}`:e}const fW={"ui.guide.title":{zh:"欢迎使用 CC Viewer",en:"Welcome to CC Viewer","zh-TW":"歡迎使用 CC Viewer",ko:"CC Viewer에 오신 것을 환영합니다",ja:"CC Viewer へようこそ",de:"Willkommen bei CC Viewer",es:"Bienvenido a CC Viewer",fr:"Bienvenue sur CC Viewer",it:"Benvenuto in CC Viewer",da:"Velkommen til CC Viewer",pl:"Witamy w CC Viewer",ru:"Добро пожаловать в CC Viewer",ar:"مرحبًا بك في CC Viewer",no:"Velkommen til CC Viewer","pt-BR":"Bem-vindo ao CC Viewer",th:"ยินดีต้อนรับสู่ CC Viewer",tr:"CC Viewer'a hoş geldiniz",uk:"Ласкаво просимо до CC Viewer"},"ui.guide.step1":{zh:"你可以先尝试在 Claude 中发起一轮对话。不知道说什么?可以问问:",en:"Try starting a conversation in Claude. Not sure what to say? Try asking:","zh-TW":"你可以先嘗試在 Claude 中發起一輪對話。不知道說什麼?可以問問:",ko:"Claude에서 대화를 시작해 보세요. 무슨 말을 해야 할지 모르겠다면:",ja:"まず Claude で会話を始めてみましょう。何を言えばいいかわからない場合:",de:"Starten Sie ein Gespräch in Claude. Nicht sicher, was Sie sagen sollen? Fragen Sie:",es:"Intenta iniciar una conversación en Claude. ¿No sabes qué decir? Prueba preguntar:",fr:"Essayez de lancer une conversation dans Claude. Vous ne savez pas quoi dire ? Demandez :",it:"Prova ad avviare una conversazione in Claude. Non sai cosa dire? Prova a chiedere:",da:"Prøv at starte en samtale i Claude. Ikke sikker på hvad du skal sige? Prøv at spørge:",pl:"Spróbuj rozpocząć rozmowę w Claude. Nie wiesz co powiedzieć? Zapytaj:",ru:"Попробуйте начать разговор в Claude. Не знаете, что сказать? Спросите:",ar:"جرّب بدء محادثة في Claude. لا تعرف ماذا تقول؟ جرّب أن تسأل:",no:"Prøv å starte en samtale i Claude. Usikker på hva du skal si? Prøv å spørre:","pt-BR":"Tente iniciar uma conversa no Claude. Não sabe o que dizer? Pergunte:",th:"ลองเริ่มบทสนทนาใน Claude ไม่รู้จะพูดอะไร? ลองถามว่า:",tr:"Claude'da bir sohbet başlatmayı deneyin. Ne söyleyeceğinizi bilmiyor musunuz? Şunu sorun:",uk:"Спробуйте розпочати розмову в Claude. Не знаєте, що сказати? Запитайте:"},"ui.guide.exampleQuestion":{zh:"看看我现在有多少 skill",en:"How many skills do I have right now?","zh-TW":"看看我現在有多少 skill",ko:"지금 내가 가진 skill이 몇 개인지 확인해줘",ja:"今いくつの skill があるか見てみて",de:"Wie viele Skills habe ich gerade?",es:"¿Cuántos skills tengo ahora mismo?",fr:"Combien de skills ai-je en ce moment ?",it:"Quanti skill ho in questo momento?",da:"Hvor mange skills har jeg lige nu?",pl:"Ile mam teraz skills?",ru:"Сколько у меня сейчас skills?",ar:"كم عدد الـ skills لديّ الآن؟",no:"Hvor mange skills har jeg nå?","pt-BR":"Quantos skills eu tenho agora?",th:"ตอนนี้ฉันมีกี่ skill?",tr:"Şu anda kaç tane skill'im var?",uk:"Скільки у мене зараз skills?"},"ui.guide.step2":{zh:"你能看到这段文字,说明服务已经启动。如果 Claude 有响应但这里没有变化,可以让 Claude 帮你排查:",en:"If you can see this, the service is running. If Claude responds but nothing shows here, ask Claude to help troubleshoot:","zh-TW":"你能看到這段文字,說明服務已經啟動。如果 Claude 有回應但這裡沒有變化,可以讓 Claude 幫你排查:",ko:"이 텍스트가 보이면 서비스가 실행 중입니다. Claude가 응답하지만 여기에 변화가 없다면 Claude에게 문제 해결을 요청하세요:",ja:"このテキストが見えていればサービスは起動しています。Claude が応答しているのにここに変化がない場合、Claude にトラブルシューティングを依頼してください:",de:"Wenn Sie diesen Text sehen, läuft der Dienst. Wenn Claude antwortet, aber hier nichts angezeigt wird, bitten Sie Claude um Hilfe:",es:"Si puedes ver este texto, el servicio está funcionando. Si Claude responde pero aquí no cambia nada, pide a Claude que te ayude:",fr:"Si vous voyez ce texte, le service fonctionne. Si Claude répond mais rien ne s'affiche ici, demandez à Claude de vous aider :",it:"Se puoi vedere questo testo, il servizio è in esecuzione. Se Claude risponde ma qui non cambia nulla, chiedi a Claude di aiutarti:",da:"Hvis du kan se denne tekst, kører tjenesten. Hvis Claude svarer, men intet vises her, bed Claude om hjælp:",pl:"Jeśli widzisz ten tekst, usługa działa. Jeśli Claude odpowiada, ale tutaj nic się nie zmienia, poproś Claude o pomoc:",ru:"Если вы видите этот текст, сервис запущен. Если Claude отвечает, но здесь ничего не меняется, попросите Claude помочь:",ar:"إذا كنت ترى هذا النص، فالخدمة تعمل. إذا كان Claude يستجيب ولكن لا شيء يظهر هنا، اطلب من Claude المساعدة:",no:"Hvis du kan se denne teksten, kjører tjenesten. Hvis Claude svarer men ingenting vises her, be Claude om hjelp:","pt-BR":"Se você pode ver este texto, o serviço está rodando. Se o Claude responde mas nada aparece aqui, peça ao Claude para ajudar:",th:"ถ้าคุณเห็นข้อความนี้ แสดงว่าบริการกำลังทำงาน หาก Claude ตอบกลับแต่ที่นี่ไม่มีการเปลี่ยนแปลง ให้ขอให้ Claude ช่วยแก้ไข:",tr:"Bu metni görebiliyorsanız, hizmet çalışıyor. Claude yanıt veriyor ama burada bir değişiklik olmuyorsa, Claude'dan yardım isteyin:",uk:"Якщо ви бачите цей текст, сервіс працює. Якщо Claude відповідає, але тут нічого не змінюється, попросіть Claude допомогти:"},"ui.guide.troubleshootCmd":{zh:"我已经启动了 cc-viewer,但是无法看到 cc-viewer 的请求,检查 npm 包中 cc-viewer 的实现,检查问题,并修复",en:"I've started cc-viewer but can't see any requests. Check the cc-viewer npm package implementation, find the issue, and fix it","zh-TW":"我已經啟動了 cc-viewer,但是無法看到 cc-viewer 的請求,檢查 npm 包中 cc-viewer 的實現,檢查問題,並修復",ko:"cc-viewer를 시작했지만 요청을 볼 수 없습니다. cc-viewer npm 패키지 구현을 확인하고 문제를 찾아 수정해 주세요",ja:"cc-viewer を起動しましたがリクエストが表示されません。cc-viewer npm パッケージの実装を確認し、問題を見つけて修正してください",de:"Ich habe cc-viewer gestartet, kann aber keine Anfragen sehen. Überprüfen Sie die cc-viewer npm-Paket-Implementierung, finden Sie das Problem und beheben Sie es",es:"He iniciado cc-viewer pero no puedo ver las solicitudes. Revisa la implementación del paquete npm cc-viewer, encuentra el problema y corrígelo",fr:"J'ai démarré cc-viewer mais je ne vois aucune requête. Vérifiez l'implémentation du package npm cc-viewer, trouvez le problème et corrigez-le",it:"Ho avviato cc-viewer ma non riesco a vedere le richieste. Controlla l'implementazione del pacchetto npm cc-viewer, trova il problema e risolvilo",da:"Jeg har startet cc-viewer, men kan ikke se nogen forespørgsler. Tjek cc-viewer npm-pakkens implementering, find problemet og ret det",pl:"Uruchomiłem cc-viewer, ale nie widzę żadnych żądań. Sprawdź implementację pakietu npm cc-viewer, znajdź problem i napraw go",ru:"Я запустил cc-viewer, но не вижу запросов. Проверьте реализацию npm-пакета cc-viewer, найдите проблему и исправьте её",ar:"لقد قمت بتشغيل cc-viewer ولكن لا أستطيع رؤية أي طلبات. تحقق من تنفيذ حزمة npm الخاصة بـ cc-viewer، وابحث عن المشكلة وأصلحها",no:"Jeg har startet cc-viewer, men kan ikke se noen forespørsler. Sjekk cc-viewer npm-pakkens implementering, finn problemet og fiks det","pt-BR":"Iniciei o cc-viewer mas não consigo ver as requisições. Verifique a implementação do pacote npm cc-viewer, encontre o problema e corrija",th:"ฉันเริ่ม cc-viewer แล้วแต่ไม่เห็นคำขอใดๆ ตรวจสอบการใช้งานแพ็กเกจ npm ของ cc-viewer หาปัญหาและแก้ไข",tr:"cc-viewer'ı başlattım ama istekleri göremiyorum. cc-viewer npm paketinin uygulamasını kontrol edin, sorunu bulun ve düzeltin",uk:"Я запустив cc-viewer, але не бачу жодних запитів. Перевірте реалізацію npm-пакету cc-viewer, знайдіть проблему та виправте її"},"ui.guide.step3":{zh:"在极端情况下,native 版本的 Claude 无法拦截。你可以尝试切回 npm 版本:",en:"In extreme cases, the native version of Claude cannot be intercepted. You can try switching back to the npm version:","zh-TW":"在極端情況下,native 版本的 Claude 無法攔截。你可以嘗試切回 npm 版本:",ko:"극단적인 경우 native 버전의 Claude는 가로챌 수 없습니다. npm 버전으로 전환해 보세요:",ja:"極端な場合、ネイティブ版の Claude はインターセプトできません。npm 版に切り替えてみてください:",de:"In extremen Fällen kann die native Version von Claude nicht abgefangen werden. Versuchen Sie, zur npm-Version zu wechseln:",es:"En casos extremos, la versión nativa de Claude no puede ser interceptada. Puedes intentar volver a la versión npm:",fr:"Dans les cas extrêmes, la version native de Claude ne peut pas être interceptée. Essayez de revenir à la version npm :",it:"In casi estremi, la versione nativa di Claude non può essere intercettata. Puoi provare a tornare alla versione npm:",da:"I ekstreme tilfælde kan den native version af Claude ikke opsnappes. Du kan prøve at skifte tilbage til npm-versionen:",pl:"W skrajnych przypadkach natywna wersja Claude nie może być przechwycona. Możesz spróbować przełączyć się na wersję npm:",ru:"В крайних случаях нативная версия Claude не может быть перехвачена. Попробуйте переключиться на npm-версию:",ar:"في الحالات القصوى، لا يمكن اعتراض النسخة الأصلية من Claude. يمكنك محاولة العودة إلى نسخة npm:",no:"I ekstreme tilfeller kan den native versjonen av Claude ikke fanges opp. Du kan prøve å bytte tilbake til npm-versjonen:","pt-BR":"Em casos extremos, a versão nativa do Claude não pode ser interceptada. Você pode tentar voltar para a versão npm:",th:"ในกรณีสุดขีด เวอร์ชัน native ของ Claude ไม่สามารถดักจับได้ คุณสามารถลองเปลี่ยนกลับไปใช้เวอร์ชัน npm:",tr:"Aşırı durumlarda, Claude'un native sürümü yakalanamaz. npm sürümüne geri dönmeyi deneyebilirsiniz:",uk:"У крайніх випадках нативну версію Claude неможливо перехопити. Спробуйте переключитися на npm-версію:"},"cli.alreadyWorking":{zh:"CC Viewer 已经能工作了",en:"CC Viewer is already working","zh-TW":"CC Viewer 已經能工作了",ko:"CC Viewer가 이미 작동 중입니다",ja:"CC Viewer は既に動作しています",de:"CC Viewer funktioniert bereits",es:"CC Viewer ya está funcionando",fr:"CC Viewer fonctionne déjà",it:"CC Viewer è già funzionante",da:"CC Viewer fungerer allerede",pl:"CC Viewer już działa",ru:"CC Viewer уже работает",ar:"CC Viewer يعمل بالفعل",no:"CC Viewer fungerer allerede","pt-BR":"CC Viewer já está funcionando",th:"CC Viewer ทำงานอยู่แล้ว",tr:"CC Viewer zaten çalışıyor",uk:"CC Viewer вже працює"},"cli.inject.success":{zh:"CC Viewer 安装成功",en:"CC Viewer installed successfully","zh-TW":"CC Viewer 安裝成功",ko:"CC Viewer 설치 성공",ja:"CC Viewer インストール成功",de:"CC Viewer erfolgreich installiert",es:"CC Viewer instalado correctamente",fr:"CC Viewer installé avec succès",it:"CC Viewer installato con successo",da:"CC Viewer installeret",pl:"CC Viewer zainstalowany pomyślnie",ru:"CC Viewer успешно установлен",ar:"تم تثبيت CC Viewer بنجاح",no:"CC Viewer installert","pt-BR":"CC Viewer instalado com sucesso",th:"ติดตั้ง CC Viewer สำเร็จ",tr:"CC Viewer başarıyla kuruldu",uk:"CC Viewer успішно встановлено"},"cli.inject.exists":{zh:"CC Viewer 已安装,无需重复操作",en:"CC Viewer already installed, no action needed","zh-TW":"CC Viewer 已安裝,無需重複操作",ko:"CC Viewer 이미 설치됨, 추가 작업 불필요",ja:"CC Viewer は既にインストール済み、操作不要",de:"CC Viewer bereits installiert, keine Aktion nötig",es:"CC Viewer ya instalado, no se requiere acción",fr:"CC Viewer déjà installé, aucune action nécessaire",it:"CC Viewer già installato, nessuna azione necessaria",da:"CC Viewer allerede installeret, ingen handling nødvendig",pl:"CC Viewer już zainstalowany, nie wymaga działania",ru:"CC Viewer уже установлен, действий не требуется",ar:"CC Viewer مثبت بالفعل، لا حاجة لأي إجراء",no:"CC Viewer allerede installert, ingen handling nødvendig","pt-BR":"CC Viewer já instalado, nenhuma ação necessária",th:"CC Viewer ติดตั้งแล้ว ไม่ต้องดำเนินการ",tr:"CC Viewer zaten kurulu, işlem gerekmiyor",uk:"CC Viewer вже встановлено, дій не потрібно"},"cli.inject.fail":{zh:"❌ 安装失败: {error}",en:"❌ Installation failed: {error}","zh-TW":"❌ 安裝失敗: {error}",ko:"❌ 설치 실패: {error}",ja:"❌ インストール失敗: {error}",de:"❌ Installation fehlgeschlagen: {error}",es:"❌ Instalación fallida: {error}",fr:"❌ Échec de l'installation : {error}",it:"❌ Installazione fallita: {error}",da:"❌ Installation mislykkedes: {error}",pl:"❌ Instalacja nie powiodła się: {error}",ru:"❌ Ошибка установки: {error}",ar:"❌ فشل التثبيت: {error}",no:"❌ Installasjon mislyktes: {error}","pt-BR":"❌ Falha na instalação: {error}",th:"❌ ติดตั้งล้มเหลว: {error}",tr:"❌ Kurulum başarısız: {error}",uk:"❌ Помилка встановлення: {error}"},"cli.inject.notFound":{zh:"❌ 找不到 Claude Code cli.js: {path}",en:"❌ Claude Code cli.js not found: {path}","zh-TW":"❌ 找不到 Claude Code cli.js: {path}",ko:"❌ Claude Code cli.js를 찾을 수 없음: {path}",ja:"❌ Claude Code cli.js が見つかりません: {path}",de:"❌ Claude Code cli.js nicht gefunden: {path}",es:"❌ Claude Code cli.js no encontrado: {path}",fr:"❌ Claude Code cli.js introuvable : {path}",it:"❌ Claude Code cli.js non trovato: {path}",da:"❌ Claude Code cli.js ikke fundet: {path}",pl:"❌ Nie znaleziono Claude Code cli.js: {path}",ru:"❌ Claude Code cli.js не найден: {path}",ar:"❌ لم يتم العثور على Claude Code cli.js: {path}",no:"❌ Claude Code cli.js ikke funnet: {path}","pt-BR":"❌ Claude Code cli.js não encontrado: {path}",th:"❌ ไม่พบ Claude Code cli.js: {path}",tr:"❌ Claude Code cli.js bulunamadı: {path}",uk:"❌ Claude Code cli.js не знайдено: {path}"},"cli.inject.notFoundHint":{zh:" 请确认 @anthropic-ai/claude-code 已安装",en:" Please make sure @anthropic-ai/claude-code is installed","zh-TW":" 請確認 @anthropic-ai/claude-code 已安裝",ko:" @anthropic-ai/claude-code가 설치되어 있는지 확인하세요",ja:" @anthropic-ai/claude-code がインストールされていることを確認してください",de:" Bitte stellen Sie sicher, dass @anthropic-ai/claude-code installiert ist",es:" Asegúrese de que @anthropic-ai/claude-code esté instalado",fr:" Veuillez vérifier que @anthropic-ai/claude-code est installé",it:" Assicurati che @anthropic-ai/claude-code sia installato",da:" Sørg for at @anthropic-ai/claude-code er installeret",pl:" Upewnij się, że @anthropic-ai/claude-code jest zainstalowany",ru:" Убедитесь, что @anthropic-ai/claude-code установлен",ar:" يرجى التأكد من تثبيت @anthropic-ai/claude-code",no:" Sørg for at @anthropic-ai/claude-code er installert","pt-BR":" Certifique-se de que @anthropic-ai/claude-code está instalado",th:" กรุณาตรวจสอบว่า @anthropic-ai/claude-code ถูกติดตั้งแล้ว",tr:" @anthropic-ai/claude-code'un kurulu olduğundan emin olun",uk:" Переконайтеся, що @anthropic-ai/claude-code встановлено"},"cli.hook.exists":{zh:"自动修复 hook 已存在于 {path}",en:"Auto-repair hook already exists in {path}","zh-TW":"自動修復 hook 已存在於 {path}",ko:"자동 복구 hook이 이미 {path}에 존재함",ja:"自動修復 hook は既に {path} に存在します",de:"Auto-Reparatur-Hook existiert bereits in {path}",es:"Hook de auto-reparación ya existe en {path}",fr:"Hook de réparation auto déjà présent dans {path}",it:"Hook di auto-riparazione già presente in {path}",da:"Auto-reparations-hook findes allerede i {path}",pl:"Hook auto-naprawy już istnieje w {path}",ru:"Hook автовосстановления уже существует в {path}",ar:"hook الإصلاح التلقائي موجود بالفعل في {path}",no:"Auto-reparasjons-hook finnes allerede i {path}","pt-BR":"Hook de auto-reparo já existe em {path}",th:"hook ซ่อมอัตโนมัติมีอยู่แล้วใน {path}",tr:"Otomatik onarım hook'u zaten {path} dosyasında mevcut",uk:"Hook автовідновлення вже існує в {path}"},"cli.hook.fail":{zh:"⚠️ shell hook 写入失败: {error}",en:"⚠️ Failed to write shell hook: {error}","zh-TW":"⚠️ shell hook 寫入失敗: {error}",ko:"⚠️ shell hook 작성 실패: {error}",ja:"⚠️ shell hook の書き込みに失敗: {error}",de:"⚠️ Shell-Hook konnte nicht geschrieben werden: {error}",es:"⚠️ Error al escribir el shell hook: {error}",fr:"⚠️ Échec de l'écriture du shell hook : {error}",it:"⚠️ Impossibile scrivere il shell hook: {error}",da:"⚠️ Kunne ikke skrive shell hook: {error}",pl:"⚠️ Nie udało się zapisać shell hook: {error}",ru:"⚠️ Не удалось записать shell hook: {error}",ar:"⚠️ فشل كتابة shell hook: {error}",no:"⚠️ Kunne ikke skrive shell hook: {error}","pt-BR":"⚠️ Falha ao escrever shell hook: {error}",th:"⚠️ เขียน shell hook ล้มเหลว: {error}",tr:"⚠️ Shell hook yazılamadı: {error}",uk:"⚠️ Не вдалося записати shell hook: {error}"},"cli.usage.hint":{zh:`
350
+ 如需卸载,请运行: ccv --uninstall`,en:`
351
+ To uninstall, run: ccv --uninstall`,"zh-TW":`
352
+ 如需卸載,請執行: ccv --uninstall`,ko:`
353
+ 제거하려면 실행: ccv --uninstall`,ja:`
354
+ アンインストールするには: ccv --uninstall`,de:`
355
+ Zum Deinstallieren: ccv --uninstall`,es:`
356
+ Para desinstalar, ejecute: ccv --uninstall`,fr:`
357
+ Pour désinstaller, exécutez : ccv --uninstall`,it:`
358
+ Per disinstallare, esegui: ccv --uninstall`,da:`
359
+ For at afinstallere, kør: ccv --uninstall`,pl:`
360
+ Aby odinstalować, uruchom: ccv --uninstall`,ru:`
361
+ Для удаления выполните: ccv --uninstall`,ar:`
362
+ لإلغاء التثبيت، قم بتشغيل: ccv --uninstall`,no:`
363
+ For å avinstallere, kjør: ccv --uninstall`,"pt-BR":`
364
+ Para desinstalar, execute: ccv --uninstall`,th:`
365
+ หากต้องการถอนการติดตั้ง ให้เรียกใช้: ccv --uninstall`,tr:`
366
+ Kaldırmak için çalıştırın: ccv --uninstall`,uk:`
367
+ Для видалення виконайте: ccv --uninstall`},"cli.help":{zh:`CC Viewer CLI
368
+
369
+ 用法:
370
+ ccv [options]
371
+ ccv run -- <command> [args...]
372
+
373
+ 选项:
374
+ -h, --help 显示帮助
375
+ -v, --version 显示版本
376
+ --uninstall 移除 CC Viewer 集成
377
+
378
+ 说明:
379
+ 直接运行 ccv 将安装/修复 Claude Code 的集成 Hook。`,en:`CC Viewer CLI
380
+
381
+ Usage:
382
+ ccv [options]
383
+ ccv run -- <command> [args...]
384
+
385
+ Options:
386
+ -h, --help Show help
387
+ -v, --version Show version
388
+ --uninstall Remove CC Viewer integration
389
+
390
+ Notes:
391
+ Running ccv without arguments installs/repairs the Claude Code hook.`,"zh-TW":`CC Viewer CLI
392
+
393
+ 用法:
394
+ ccv [options]
395
+ ccv run -- <command> [args...]
396
+
397
+ 選項:
398
+ -h, --help 顯示說明
399
+ -v, --version 顯示版本
400
+ --uninstall 移除 CC Viewer 整合
401
+
402
+ 說明:
403
+ 直接執行 ccv 會安裝/修復 Claude Code 的整合 Hook。`},"cli.usage.uninstallHint":{zh:"",en:"","zh-TW":"",ko:"",ja:"",de:"",es:"",fr:"",it:"",da:"",pl:"",ru:"",ar:"",no:"","pt-BR":"",th:"",tr:"",uk:""},"cli.uninstall.cliCleaned":{zh:"✅ cli.js 已清理",en:"✅ cli.js cleaned","zh-TW":"✅ cli.js 已清理",ko:"✅ cli.js 정리 완료",ja:"✅ cli.js をクリーンアップしました",de:"✅ cli.js bereinigt",es:"✅ cli.js limpiado",fr:"✅ cli.js nettoyé",it:"✅ cli.js pulito",da:"✅ cli.js renset",pl:"✅ cli.js wyczyszczony",ru:"✅ cli.js очищен",ar:"✅ تم تنظيف cli.js",no:"✅ cli.js renset","pt-BR":"✅ cli.js limpo",th:"✅ ล้าง cli.js แล้ว",tr:"✅ cli.js temizlendi",uk:"✅ cli.js очищено"},"cli.uninstall.cliNotFound":{zh:"⚠️ 未找到 Claude Code cli.js,跳过",en:"⚠️ Claude Code cli.js not found, skipped","zh-TW":"⚠️ 未找到 Claude Code cli.js,跳過",ko:"⚠️ Claude Code cli.js를 찾을 수 없음, 건너뜀",ja:"⚠️ Claude Code cli.js が見つかりません、スキップ",de:"⚠️ Claude Code cli.js nicht gefunden, übersprungen",es:"⚠️ Claude Code cli.js no encontrado, omitido",fr:"⚠️ Claude Code cli.js introuvable, ignoré",it:"⚠️ Claude Code cli.js non trovato, saltato",da:"⚠️ Claude Code cli.js ikke fundet, sprunget over",pl:"⚠️ Nie znaleziono Claude Code cli.js, pominięto",ru:"⚠️ Claude Code cli.js не найден, пропущено",ar:"⚠️ لم يتم العثور على Claude Code cli.js، تم التخطي",no:"⚠️ Claude Code cli.js ikke funnet, hoppet over","pt-BR":"⚠️ Claude Code cli.js não encontrado, ignorado",th:"⚠️ ไม่พบ Claude Code cli.js ข้ามไป",tr:"⚠️ Claude Code cli.js bulunamadı, atlandı",uk:"⚠️ Claude Code cli.js не знайдено, пропущено"},"cli.uninstall.cliFail":{zh:"❌ cli.js 清理失败",en:"❌ Failed to clean cli.js","zh-TW":"❌ cli.js 清理失敗",ko:"❌ cli.js 정리 실패",ja:"❌ cli.js のクリーンアップに失敗",de:"❌ cli.js Bereinigung fehlgeschlagen",es:"❌ Fallo al limpiar cli.js",fr:"❌ Échec du nettoyage de cli.js",it:"❌ Pulizia cli.js fallita",da:"❌ Rensning af cli.js mislykkedes",pl:"❌ Czyszczenie cli.js nie powiodło się",ru:"❌ Ошибка очистки cli.js",ar:"❌ فشل تنظيف cli.js",no:"❌ Rensing av cli.js mislyktes","pt-BR":"❌ Falha ao limpar cli.js",th:"❌ ล้าง cli.js ล้มเหลว",tr:"❌ cli.js temizleme başarısız",uk:"❌ Помилка очищення cli.js"},"cli.uninstall.hookRemoved":{zh:"✅ shell hook 已从 {path} 移除",en:"✅ Shell hook removed from {path}","zh-TW":"✅ shell hook 已從 {path} 移除",ko:"✅ shell hook이 {path}에서 제거됨",ja:"✅ shell hook を {path} から削除しました",de:"✅ Shell-Hook aus {path} entfernt",es:"✅ Shell hook eliminado de {path}",fr:"✅ Shell hook supprimé de {path}",it:"✅ Shell hook rimosso da {path}",da:"✅ Shell hook fjernet fra {path}",pl:"✅ Shell hook usunięty z {path}",ru:"✅ Shell hook удалён из {path}",ar:"✅ تم إزالة shell hook من {path}",no:"✅ Shell hook fjernet fra {path}","pt-BR":"✅ Shell hook removido de {path}",th:"✅ Shell hook ถูกลบออกจาก {path}",tr:"✅ Shell hook {path} dosyasından kaldırıldı",uk:"✅ Shell hook видалено з {path}"},"cli.uninstall.hookClean":{zh:"✅ {path} 中无需清理",en:"✅ No cleanup needed in {path}","zh-TW":"✅ {path} 中無需清理",ko:"✅ {path}에서 정리할 항목 없음",ja:"✅ {path} のクリーンアップは不要です",de:"✅ Keine Bereinigung in {path} nötig",es:"✅ No se necesita limpieza en {path}",fr:"✅ Aucun nettoyage nécessaire dans {path}",it:"✅ Nessuna pulizia necessaria in {path}",da:"✅ Ingen oprydning nødvendig i {path}",pl:"✅ Brak potrzeby czyszczenia w {path}",ru:"✅ Очистка в {path} не требуется",ar:"✅ لا حاجة للتنظيف في {path}",no:"✅ Ingen opprydding nødvendig i {path}","pt-BR":"✅ Nenhuma limpeza necessária em {path}",th:"✅ ไม่จำเป็นต้องล้างใน {path}",tr:"✅ {path} dosyasında temizlik gerekmiyor",uk:"✅ Очищення в {path} не потрібне"},"cli.uninstall.hookFail":{zh:"❌ shell hook 清理失败: {error}",en:"❌ Failed to clean shell hook: {error}","zh-TW":"❌ shell hook 清理失敗: {error}",ko:"❌ shell hook 정리 실패: {error}",ja:"❌ shell hook のクリーンアップに失敗: {error}",de:"❌ Shell-Hook-Bereinigung fehlgeschlagen: {error}",es:"❌ Error al limpiar el shell hook: {error}",fr:"❌ Échec du nettoyage du shell hook : {error}",it:"❌ Pulizia shell hook fallita: {error}",da:"❌ Kunne ikke rense shell hook: {error}",pl:"❌ Nie udało się wyczyścić shell hook: {error}",ru:"❌ Не удалось очистить shell hook: {error}",ar:"❌ فشل تنظيف shell hook: {error}",no:"❌ Kunne ikke rense shell hook: {error}","pt-BR":"❌ Falha ao limpar shell hook: {error}",th:"❌ ล้าง shell hook ล้มเหลว: {error}",tr:"❌ Shell hook temizlenemedi: {error}",uk:"❌ Не вдалося очистити shell hook: {error}"},"cli.uninstall.done":{zh:`
404
+ 🗑️ CC Viewer 集成已移除 (运行 'npm uninstall -g cc-viewer' 以彻底删除命令)`,en:`
405
+ 🗑️ CC Viewer integration removed (Run 'npm uninstall -g cc-viewer' to remove command)`,"zh-TW":`
406
+ 🗑️ CC Viewer 集成已移除 (運行 'npm uninstall -g cc-viewer' 以徹底刪除命令)`,ko:`
407
+ 🗑️ CC Viewer 통합 제거됨 ('npm uninstall -g cc-viewer'를 실행하여 명령 삭제)`,ja:`
408
+ 🗑️ CC Viewer 統合を削除しました (コマンドを完全に削除するには 'npm uninstall -g cc-viewer' を実行)`,de:`
409
+ 🗑️ CC Viewer-Integration entfernt (Führen Sie 'npm uninstall -g cc-viewer' aus, um den Befehl zu entfernen)`,es:`
410
+ 🗑️ Integración de CC Viewer eliminada (Ejecute 'npm uninstall -g cc-viewer' para eliminar el comando)`,fr:`
411
+ 🗑️ Intégration CC Viewer supprimée (Exécutez 'npm uninstall -g cc-viewer' pour supprimer la commande)`,it:`
412
+ 🗑️ Integrazione CC Viewer rimossa (Esegui 'npm uninstall -g cc-viewer' per rimuovere il comando)`,da:`
413
+ 🗑️ CC Viewer integration fjernet (Kør 'npm uninstall -g cc-viewer' for at fjerne kommandoen)`,pl:`
414
+ 🗑️ Integracja CC Viewer usunięta (Uruchom 'npm uninstall -g cc-viewer', aby usunąć polecenie)`,ru:`
415
+ 🗑️ Интеграция CC Viewer удалена (Запустите 'npm uninstall -g cc-viewer' для удаления команды)`,ar:`
416
+ 🗑️ تمت إزالة تكامل CC Viewer (قم بتشغيل 'npm uninstall -g cc-viewer' لإزالة الأمر)`,no:`
417
+ 🗑️ CC Viewer-integrasjon fjernet (Kjør 'npm uninstall -g cc-viewer' for å fjerne kommandoen)`,"pt-BR":`
418
+ 🗑️ Integração do CC Viewer removida (Execute 'npm uninstall -g cc-viewer' para remover o comando)`,th:`
419
+ 🗑️ การรวม CC Viewer ถูกลบออก (เรียกใช้ 'npm uninstall -g cc-viewer' เพื่อลบคำสั่ง)`,tr:`
420
+ 🗑️ CC Viewer entegrasyonu kaldırıldı (Komutu kaldırmak için 'npm uninstall -g cc-viewer' çalıştırın)`,uk:`
421
+ 🗑️ Інтеграцію CC Viewer видалено (Запустіть 'npm uninstall -g cc-viewer', щоб видалити команду)`},"server.started":{zh:`
422
+ Claude 请求监控服务已启动: http://{host}:{port}
423
+ `,en:`
424
+ CC Viewer started: http://{host}:{port}
425
+ `,"zh-TW":`
426
+ Claude 請求監控服務已啟動: http://{host}:{port}
427
+ `,ko:`
428
+ CC Viewer 시작됨: http://{host}:{port}
429
+ `,ja:`
430
+ CC Viewer 起動: http://{host}:{port}
431
+ `,de:`
432
+ CC Viewer gestartet: http://{host}:{port}
433
+ `,es:`
434
+ CC Viewer iniciado: http://{host}:{port}
435
+ `,fr:`
436
+ CC Viewer démarré : http://{host}:{port}
437
+ `,it:`
438
+ CC Viewer avviato: http://{host}:{port}
439
+ `,da:`
440
+ CC Viewer startet: http://{host}:{port}
441
+ `,pl:`
442
+ CC Viewer uruchomiony: http://{host}:{port}
443
+ `,ru:`
444
+ CC Viewer запущен: http://{host}:{port}
445
+ `,ar:`
446
+ تم تشغيل CC Viewer: http://{host}:{port}
447
+ `,no:`
448
+ CC Viewer startet: http://{host}:{port}
449
+ `,"pt-BR":`
450
+ CC Viewer iniciado: http://{host}:{port}
451
+ `,th:`
452
+ CC Viewer เริ่มทำงาน: http://{host}:{port}
453
+ `,tr:`
454
+ CC Viewer başlatıldı: http://{host}:{port}
455
+ `,uk:`
456
+ CC Viewer запущено: http://{host}:{port}
457
+ `},"server.reuse":{zh:`
458
+ CC Viewer 已在运行: http://{host}:{port}
459
+ `,en:`
460
+ CC Viewer already running: http://{host}:{port}
461
+ `,"zh-TW":`
462
+ CC Viewer 已在運行: http://{host}:{port}
463
+ `,ko:`
464
+ CC Viewer 이미 실행 중: http://{host}:{port}
465
+ `,ja:`
466
+ CC Viewer は既に実行中: http://{host}:{port}
467
+ `,de:`
468
+ CC Viewer läuft bereits: http://{host}:{port}
469
+ `,es:`
470
+ CC Viewer ya en ejecución: http://{host}:{port}
471
+ `,fr:`
472
+ CC Viewer déjà en cours d'exécution : http://{host}:{port}
473
+ `,it:`
474
+ CC Viewer già in esecuzione: http://{host}:{port}
475
+ `,da:`
476
+ CC Viewer kører allerede: http://{host}:{port}
477
+ `,pl:`
478
+ CC Viewer już działa: http://{host}:{port}
479
+ `,ru:`
480
+ CC Viewer уже запущен: http://{host}:{port}
481
+ `,ar:`
482
+ CC Viewer يعمل بالفعل: http://{host}:{port}
483
+ `,no:`
484
+ CC Viewer kjører allerede: http://{host}:{port}
485
+ `,"pt-BR":`
486
+ CC Viewer já em execução: http://{host}:{port}
487
+ `,th:`
488
+ CC Viewer กำลังทำงานอยู่แล้ว: http://{host}:{port}
489
+ `,tr:`
490
+ CC Viewer zaten çalışıyor: http://{host}:{port}
491
+ `,uk:`
492
+ CC Viewer вже працює: http://{host}:{port}
493
+ `},"server.portsBusy":{zh:"⚠️ 端口 {start}-{end} 均被占用,请求监控服务未启动",en:"⚠️ Ports {start}-{end} are all in use, monitoring service not started","zh-TW":"⚠️ 端口 {start}-{end} 均被佔用,請求監控服務未啟動",ko:"⚠️ 포트 {start}-{end} 모두 사용 중, 모니터링 서비스 미시작",ja:"⚠️ ポート {start}-{end} はすべて使用中、監視サービスは起動されませんでした",de:"⚠️ Ports {start}-{end} sind alle belegt, Überwachungsdienst nicht gestartet",es:"⚠️ Puertos {start}-{end} están todos en uso, servicio de monitoreo no iniciado",fr:"⚠️ Ports {start}-{end} tous occupés, service de surveillance non démarré",it:"⚠️ Porte {start}-{end} tutte in uso, servizio di monitoraggio non avviato",da:"⚠️ Porte {start}-{end} er alle i brug, overvågningstjeneste ikke startet",pl:"⚠️ Porty {start}-{end} są wszystkie zajęte, usługa monitorowania nie uruchomiona",ru:"⚠️ Порты {start}-{end} все заняты, служба мониторинга не запущена",ar:"⚠️ المنافذ {start}-{end} كلها مشغولة، لم يتم تشغيل خدمة المراقبة",no:"⚠️ Porter {start}-{end} er alle i bruk, overvåkningstjeneste ikke startet","pt-BR":"⚠️ Portas {start}-{end} estão todas em uso, serviço de monitoramento não iniciado",th:"⚠️ พอร์ต {start}-{end} ถูกใช้งานทั้งหมด บริการตรวจสอบไม่ได้เริ่มทำงาน",tr:"⚠️ {start}-{end} portları kullanımda, izleme servisi başlatılamadı",uk:"⚠️ Порти {start}-{end} всі зайняті, служба моніторингу не запущена"},"ui.requestList":{zh:"请求列表",en:"Requests","zh-TW":"請求列表",ko:"요청 목록",ja:"リクエスト一覧",de:"Anfragen",es:"Solicitudes",fr:"Requêtes",it:"Richieste",da:"Forespørgsler",pl:"Żądania",ru:"Запросы",ar:"الطلبات",no:"Forespørsler","pt-BR":"Requisições",th:"รายการคำขอ",tr:"İstekler",uk:"Запити"},"ui.totalRequests":{zh:"总请求数: {count}",en:"Total: {count}","zh-TW":"總請求數: {count}",ko:"총 요청 수: {count}",ja:"合計: {count}",de:"Gesamt: {count}",es:"Total: {count}",fr:"Total : {count}",it:"Totale: {count}",da:"Total: {count}",pl:"Łącznie: {count}",ru:"Всего: {count}",ar:"الإجمالي: {count}",no:"Totalt: {count}","pt-BR":"Total: {count}",th:"ทั้งหมด: {count}",tr:"Toplam: {count}",uk:"Всього: {count}"},"ui.waitingRequests":{zh:"等待请求...",en:"Waiting for requests...","zh-TW":"等待請求...",ko:"요청 대기 중...",ja:"リクエスト待機中...",de:"Warte auf Anfragen...",es:"Esperando solicitudes...",fr:"En attente de requêtes...",it:"In attesa di richieste...",da:"Venter på forespørgsler...",pl:"Oczekiwanie na żądania...",ru:"Ожидание запросов...",ar:"في انتظار الطلبات...",no:"Venter på forespørsler...","pt-BR":"Aguardando requisições...",th:"รอคำขอ...",tr:"İstekler bekleniyor...",uk:"Очікування запитів..."},"ui.importLocalLogs":{zh:"日志管理工具",en:"Log Management","zh-TW":"日誌管理工具",ko:"로그 관리 도구",ja:"ログ管理ツール",de:"Log-Verwaltung",es:"Gestión de logs",fr:"Gestion des logs",it:"Gestione log",da:"Loghåndtering",pl:"Zarządzanie logami",ru:"Управление логами",ar:"إدارة السجلات",no:"Loggadministrasjon","pt-BR":"Gerenciamento de logs",th:"จัดการบันทึก",tr:"Log yönetimi",uk:"Керування логами"},"ui.loadLocalJsonl":{zh:"直接选择加载本地jsonl文件",en:"Load local JSONL file","zh-TW":"直接選擇載入本地jsonl檔案",ko:"로컬 JSONL 파일 선택",ja:"ローカルJSONLファイルを選択",de:"Lokale JSONL-Datei auswählen",es:"Seleccionar archivo JSONL local",fr:"Sélectionner un fichier JSONL local",it:"Seleziona file JSONL locale",da:"Vælg lokal JSONL-fil",pl:"Wybierz lokalny plik JSONL",ru:"Выбрать локальный JSONL файл",ar:"اختيار ملف JSONL محلي",no:"Velg lokal JSONL-fil","pt-BR":"Selecionar arquivo JSONL local",th:"เลือกไฟล์ JSONL ในเครื่อง",tr:"Yerel JSONL dosyası seç",uk:"Вибрати локальний JSONL файл"},"ui.fileTooLarge":{zh:"文件大小不能超过 500MB",en:"File size cannot exceed 500MB","zh-TW":"檔案大小不能超過 500MB",ko:"파일 크기는 500MB를 초과할 수 없습니다",ja:"ファイルサイズは500MBを超えることはできません",de:"Dateigröße darf 500MB nicht überschreiten",es:"El tamaño del archivo no puede superar 500MB",fr:"La taille du fichier ne peut pas dépasser 500 Mo",it:"La dimensione del file non può superare 500MB",da:"Filstørrelsen må ikke overstige 500MB",pl:"Rozmiar pliku nie może przekraczać 500MB",ru:"Размер файла не может превышать 500МБ",ar:"حجم الملف لا يمكن أن يتجاوز 500 ميجابايت",no:"Filstørrelsen kan ikke overstige 500MB","pt-BR":"O tamanho do arquivo não pode exceder 500MB",th:"ขนาดไฟล์ต้องไม่เกิน 500MB",tr:"Dosya boyutu 500MB'ı aşamaz",uk:"Розмір файлу не може перевищувати 500МБ"},"ui.saveLog":{zh:"下载当前日志",en:"Download current log","zh-TW":"下載當前日誌",ko:"현재 로그 다운로드",ja:"現在のログをダウンロード",de:"Aktuelles Log herunterladen",es:"Descargar log actual",fr:"Télécharger le log actuel",it:"Scarica log corrente",da:"Download nuværende log",pl:"Pobierz bieżący log",ru:"Скачать текущий лог",ar:"تحميل السجل الحالي",no:"Last ned gjeldende logg","pt-BR":"Baixar log atual",th:"ดาวน์โหลดล็อกปัจจุบัน",tr:"Mevcut günlüğü indir",uk:"Завантажити поточний лог"},"ui.exportPrompts":{zh:"查看用户 Prompt",en:"Export user prompts","zh-TW":"匯出用戶 Prompt",ko:"사용자 Prompt 내보내기",ja:"ユーザー Prompt をエクスポート",de:"Benutzer-Prompts exportieren",es:"Exportar prompts de usuario",fr:"Exporter les prompts utilisateur",it:"Esporta prompt utente",da:"Eksportér bruger-prompts",pl:"Eksportuj prompty użytkownika",ru:"Экспорт пользовательских Prompt",ar:"تصدير Prompt المستخدم",no:"Eksporter bruker-prompts","pt-BR":"Exportar prompts do usuário",th:"ส่งออก Prompt ผู้ใช้",tr:"Kullanıcı Prompt'larını dışa aktar",uk:"Експорт Prompt користувача"},"ui.exportPromptsTxt":{zh:"导出到本地 .txt",en:"Export to local .txt","zh-TW":"匯出到本地 .txt",ko:"로컬 .txt로 내보내기",ja:"ローカル .txt にエクスポート",de:"Als lokale .txt exportieren",es:"Exportar a .txt local",fr:"Exporter en .txt local",it:"Esporta in .txt locale",da:"Eksportér til lokal .txt",pl:"Eksportuj do lokalnego .txt",ru:"Экспорт в локальный .txt",ar:"تصدير إلى ملف .txt محلي",no:"Eksporter til lokal .txt","pt-BR":"Exportar para .txt local",th:"ส่งออกเป็นไฟล์ .txt ในเครื่อง",tr:"Yerel .txt olarak dışa aktar",uk:"Експорт у локальний .txt"},"ui.tokenStats":{zh:"数据统计",en:"Data Stats","zh-TW":"數據統計",ko:"데이터 통계",ja:"データ統計",de:"Datenstatistik",es:"Estadísticas de datos",fr:"Statistiques de données",it:"Statistiche dati",da:"Datastatistik",pl:"Statystyki danych",ru:"Статистика данных",ar:"إحصائيات البيانات",no:"Datastatistikk","pt-BR":"Estatísticas de dados",th:"สถิติข้อมูล",tr:"Veri İstatistikleri",uk:"Статистика даних"},"ui.liveMonitoring":{zh:"实时监控中",en:"Live","zh-TW":"即時監控中",ko:"실시간 모니터링",ja:"リアルタイム監視中",de:"Live",es:"En vivo",fr:"En direct",it:"Live",da:"Live",pl:"Na żywo",ru:"Мониторинг",ar:"مباشر",no:"Live","pt-BR":"Ao vivo",th:"สด",tr:"Canlı",uk:"Моніторинг"},"ui.inflightRequests":{zh:"在途请求",en:"Inflight Requests","zh-TW":"在途請求",ko:"진행 중인 요청",ja:"処理中のリクエスト",de:"Laufende Anfragen",es:"Solicitudes en curso",fr:"Requêtes en cours",it:"Richieste in corso",da:"Igangværende forespørgsler",pl:"Trwające żądania",ru:"Текущие запросы",ar:"الطلبات الجارية",no:"Pågående forespørsler","pt-BR":"Requisições em andamento",th:"คำขอที่กำลังดำเนินการ",tr:"Devam Eden İstekler",uk:"Поточні запити"},"ui.noInflightRequests":{zh:"暂无在途请求",en:"No inflight requests","zh-TW":"暫無在途請求",ko:"진행 중인 요청 없음",ja:"処理中のリクエストなし",de:"Keine laufenden Anfragen",es:"Sin solicitudes en curso",fr:"Aucune requête en cours",it:"Nessuna richiesta in corso",da:"Ingen igangværende forespørgsler",pl:"Brak trwających żądań",ru:"Нет текущих запросов",ar:"لا توجد طلبات جارية",no:"Ingen pågående forespørsler","pt-BR":"Nenhuma requisição em andamento",th:"ไม่มีคำขอที่กำลังดำเนินการ",tr:"Devam eden istek yok",uk:"Немає поточних запитів"},"ui.historyLog":{zh:"历史日志: {file}",en:"History: {file}","zh-TW":"歷史日誌: {file}",ko:"기록: {file}",ja:"履歴: {file}",de:"Verlauf: {file}",es:"Historial: {file}",fr:"Historique : {file}",it:"Cronologia: {file}",da:"Historik: {file}",pl:"Historia: {file}",ru:"История: {file}",ar:"السجل: {file}",no:"Historikk: {file}","pt-BR":"Histórico: {file}",th:"ประวัติ: {file}",tr:"Geçmiş: {file}",uk:"Історія: {file}"},"ui.chatMode":{zh:"对话模式",en:"Chat mode","zh-TW":"對話模式",ko:"대화 모드",ja:"チャットモード",de:"Chat-Modus",es:"Modo chat",fr:"Mode conversation",it:"Modalità chat",da:"Chat-tilstand",pl:"Tryb czatu",ru:"Режим чата",ar:"وضع المحادثة",no:"Chat-modus","pt-BR":"Modo chat",th:"โหมดแชท",tr:"Sohbet modu",uk:"Режим чату"},"ui.rawMode":{zh:"查看网络报文",en:"Network Packets","zh-TW":"查看網路封包",ko:"네트워크 패킷 보기",ja:"ネットワークパケット",de:"Netzwerkpakete",es:"Paquetes de red",fr:"Paquets réseau",it:"Pacchetti di rete",da:"Netværkspakker",pl:"Pakiety sieciowe",ru:"Сетевые пакеты",ar:"حزم الشبكة",no:"Nettverkspakker","pt-BR":"Pacotes de rede",th:"แพ็กเก็ตเครือข่าย",tr:"Ağ paketleri",uk:"Мережеві пакети"},"ui.viewRequest":{zh:"查看请求",en:"View Request","zh-TW":"查看請求",ko:"요청 보기",ja:"リクエストを表示",de:"Anfrage anzeigen",es:"Ver solicitud",fr:"Voir la requête",it:"Visualizza richiesta",da:"Vis forespørgsel",pl:"Zobacz żądanie",ru:"Просмотр запроса",ar:"عرض الطلب",no:"Vis forespørsel","pt-BR":"Ver requisição",th:"ดูคำขอ",tr:"İsteği görüntüle",uk:"Переглянути запит"},"ui.viewInChat":{zh:"在对话中查看",en:"View in chat","zh-TW":"在對話中查看",ko:"대화에서 보기",ja:"チャットで表示",de:"Im Chat anzeigen",es:"Ver en chat",fr:"Voir dans le chat",it:"Vedi nella chat",da:"Vis i chat",pl:"Zobacz w czacie",ru:"Посмотреть в чате",ar:"عرض في المحادثة",no:"Vis i chat","pt-BR":"Ver no chat",th:"ดูในแชท",tr:"Sohbette görüntüle",uk:"Переглянути в чаті"},"ui.cannotMap":{zh:"无法映射到对话",en:"Cannot map to conversation","zh-TW":"無法映射到對話",ko:"대화에 매핑할 수 없습니다",ja:"会話にマッピングできません",de:"Kann nicht zur Konversation zugeordnet werden",es:"No se puede mapear a la conversación",fr:"Impossible de mapper à la conversation",it:"Impossibile mappare alla conversazione",da:"Kan ikke mappe til samtale",pl:"Nie można zmapować do rozmowy",ru:"Невозможно сопоставить с диалогом",ar:"لا يمكن الربط بالمحادثة",no:"Kan ikke tilordne til samtale","pt-BR":"Não é possível mapear para a conversa",th:"ไม่สามารถแมปไปยังการสนทนาได้",tr:"Konuşmaya eşlenemedi",uk:"Неможливо зіставити з діалогом"},"ui.cacheExpired":{zh:"已失效",en:"Expired","zh-TW":"已失效",ko:"만료됨",ja:"期限切れ",de:"Abgelaufen",es:"Expirado",fr:"Expiré",it:"Scaduto",da:"Udløbet",pl:"Wygasło",ru:"Истёк",ar:"منتهي الصلاحية",no:"Utløpt","pt-BR":"Expirado",th:"หมดอายุ",tr:"Süresi doldu",uk:"Закінчився"},"ui.cacheCountdown":{zh:"MainAgent 缓存{type}失效倒计时:",en:"MainAgent cache{type} expires in: ","zh-TW":"MainAgent 快取{type}失效倒數:",ko:"MainAgent cache{type} 만료 카운트다운: ",ja:"MainAgent cache{type} 期限切れまで: ",de:"MainAgent Cache{type} läuft ab in: ",es:"Cache{type} de MainAgent expira en: ",fr:"Cache{type} MainAgent expire dans : ",it:"Cache{type} MainAgent scade tra: ",da:"MainAgent cache{type} udløber om: ",pl:"Cache{type} MainAgent wygasa za: ",ru:"Cache{type} MainAgent истекает через: ",ar:"ينتهي cache{type} لـ MainAgent خلال: ",no:"MainAgent cache{type} utløper om: ","pt-BR":"Cache{type} do MainAgent expira em: ",th:"Cache{type} ของ MainAgent หมดอายุใน: ",tr:"MainAgent cache{type} süresi doluyor: ",uk:"Cache{type} MainAgent закінчується через: "},"ui.minuteSecond":{zh:"{m}分{s}秒",en:"{m}m{s}s","zh-TW":"{m}分{s}秒",ko:"{m}분{s}초",ja:"{m}分{s}秒",de:"{m}m{s}s",es:"{m}m{s}s",fr:"{m}m{s}s",it:"{m}m{s}s",da:"{m}m{s}s",pl:"{m}m{s}s",ru:"{m}м{s}с",ar:"{m}د{s}ث",no:"{m}m{s}s","pt-BR":"{m}m{s}s",th:"{m}นาที{s}วินาที",tr:"{m}dk{s}sn",uk:"{m}хв{s}с"},"ui.second":{zh:"{s}秒",en:"{s}s","zh-TW":"{s}秒",ko:"{s}초",ja:"{s}秒",de:"{s}s",es:"{s}s",fr:"{s}s",it:"{s}s",da:"{s}s",pl:"{s}s",ru:"{s}с",ar:"{s}ث",no:"{s}s","pt-BR":"{s}s",th:"{s}วินาที",tr:"{s}sn",uk:"{s}с"},"ui.hitRate":{zh:"命中率",en:"Hit rate","zh-TW":"命中率",ko:"적중률",ja:"ヒット率",de:"Trefferquote",es:"Tasa de aciertos",fr:"Taux de succès",it:"Tasso di successo",da:"Hitrate",pl:"Współczynnik trafień",ru:"Процент попаданий",ar:"معدل الإصابة",no:"Treffrate","pt-BR":"Taxa de acerto",th:"อัตราการเข้าถึง",tr:"İsabet oranı",uk:"Відсоток влучень"},"ui.userPrompt":{zh:"用户 Prompt",en:"User Prompt","zh-TW":"用戶 Prompt",ko:"사용자 Prompt",ja:"ユーザー Prompt",de:"Benutzer-Prompt",es:"Prompt de usuario",fr:"Prompt utilisateur",it:"Prompt utente",da:"Bruger-Prompt",pl:"Prompt użytkownika",ru:"Prompt пользователя",ar:"Prompt المستخدم",no:"Bruker-Prompt","pt-BR":"Prompt do usuário",th:"Prompt ผู้ใช้",tr:"Kullanıcı Prompt",uk:"Prompt користувача"},"ui.noPrompt":{zh:"暂无用户 Prompt",en:"No user prompts yet","zh-TW":"暫無用戶 Prompt",ko:"사용자 Prompt 없음",ja:"ユーザー Prompt はまだありません",de:"Noch keine Benutzer-Prompts",es:"Sin prompts de usuario aún",fr:"Aucun prompt utilisateur",it:"Nessun prompt utente",da:"Ingen bruger-prompts endnu",pl:"Brak promptów użytkownika",ru:"Нет пользовательских Prompt",ar:"لا توجد Prompt للمستخدم بعد",no:"Ingen bruker-prompts ennå","pt-BR":"Nenhum prompt de usuário ainda",th:"ยังไม่มี Prompt ผู้ใช้",tr:"Henüz kullanıcı Prompt'u yok",uk:"Немає Prompt користувача"},"ui.promptCountUnit":{zh:"条",en:"","zh-TW":"條",ko:"개",ja:"件",de:"",es:"",fr:"",it:"",da:"",pl:"",ru:"",ar:"",no:"","pt-BR":"",th:"",tr:"",uk:""},"ui.promptModeOriginal":{zh:"原文模式",en:"Original"},"ui.promptModeContext":{zh:"上下文模式",en:"Context"},"ui.promptModeText":{zh:"Text模式",en:"Text"},"ui.unknownTime":{zh:"未知时间",en:"Unknown time","zh-TW":"未知時間",ko:"알 수 없는 시간",ja:"不明な時刻",de:"Unbekannte Zeit",es:"Hora desconocida",fr:"Heure inconnue",it:"Ora sconosciuta",da:"Ukendt tid",pl:"Nieznany czas",ru:"Неизвестное время",ar:"وقت غير معروف",no:"Ukjent tid","pt-BR":"Hora desconhecida",th:"เวลาไม่ทราบ",tr:"Bilinmeyen zaman",uk:"Невідомий час"},"ui.logCount":{zh:"{count} 个日志",en:"{count} logs","zh-TW":"{count} 個日誌",ko:"{count}개 로그",ja:"{count} 件のログ",de:"{count} Logs",es:"{count} logs",fr:"{count} logs",it:"{count} log",da:"{count} logs",pl:"{count} logów",ru:"{count} логов",ar:"{count} سجلات",no:"{count} logger","pt-BR":"{count} logs",th:"{count} บันทึก",tr:"{count} log",uk:"{count} логів"},"ui.noLogs":{zh:"暂无日志文件",en:"No log files","zh-TW":"暫無日誌檔案",ko:"로그 파일 없음",ja:"ログファイルなし",de:"Keine Log-Dateien",es:"Sin archivos de log",fr:"Aucun fichier de log",it:"Nessun file di log",da:"Ingen logfiler",pl:"Brak plików logów",ru:"Нет файлов логов",ar:"لا توجد ملفات سجلات",no:"Ingen loggfiler","pt-BR":"Nenhum arquivo de log",th:"ไม่มีไฟล์บันทึก",tr:"Log dosyası yok",uk:"Немає файлів логів"},"ui.footer.starRequest":{zh:"在此感谢各位GitHub大佬赏赐一个STAR",en:"Please give us a STAR on GitHub if you like it","zh-TW":"在此感謝各位GitHub大佬賞賜一個STAR",ko:"마음에 드시면 GitHub에서 STAR를 눌러주세요",ja:"よろしければGitHubでSTARをお願いします",de:"Bitte geben Sie uns einen STAR auf GitHub",es:"Por favor, danos una STAR en GitHub",fr:"Merci de nous donner une STAR sur GitHub",it:"Per favore, dacci una STAR su GitHub",da:"Giv os venligst en STAR på GitHub",pl:"Prosimy o STAR na GitHubie",ru:"Пожалуйста, поставьте нам STAR на GitHub",ar:"يرجى منحنا نجمة STAR على GitHub",no:"Vennligst gi oss en STAR på GitHub","pt-BR":"Por favor, nos dê uma STAR no GitHub",th:"กรุณาให้ STAR บน GitHub ด้วยนะครับ",tr:"Lütfen GitHub'da bize bir STAR verin",uk:"Будь ласка, поставте нам STAR на GitHub"},"ui.footer.contact":{zh:"如需帮助,请联系 @水映天辙(钉钉)",en:"Need help? Contact @水映天辙 (DingTalk)","zh-TW":"如需幫助,請聯繫 @水映天辙(釘釘)",ko:"도움이 필요하면 @水映天辙(DingTalk)에 연락하세요",ja:"ヘルプが必要な場合は @水映天辙(DingTalk) にご連絡ください",de:"Hilfe benötigt? Kontaktieren Sie @水映天辙 (DingTalk)",es:"¿Necesita ayuda? Contacte a @水映天辙 (DingTalk)",fr:"Besoin d'aide ? Contactez @水映天辙 (DingTalk)",it:"Hai bisogno di aiuto? Contatta @水映天辙 (DingTalk)",da:"Brug for hjælp? Kontakt @水映天辙 (DingTalk)",pl:"Potrzebujesz pomocy? Skontaktuj się z @水映天辙 (DingTalk)",ru:"Нужна помощь? Свяжитесь с @水映天辙 (DingTalk)",ar:"تحتاج مساعدة؟ تواصل مع @水映天辙 (DingTalk)",no:"Trenger du hjelp? Kontakt @水映天辙 (DingTalk)","pt-BR":"Precisa de ajuda? Entre em contato com @水映天辙 (DingTalk)",th:"ต้องการความช่วยเหลือ? ติดต่อ @水映天辙 (DingTalk)",tr:"Yardıma mı ihtiyacınız var? @水映天辙 (DingTalk) ile iletişime geçin",uk:"Потрібна допомога? Зв'яжіться з @水映天辙 (DingTalk)"},"ui.toolReturn":{zh:"工具返回",en:"Tool result","zh-TW":"工具返回",ko:"도구 결과",ja:"ツール結果",de:"Tool-Ergebnis",es:"Resultado de herramienta",fr:"Résultat d'outil",it:"Risultato strumento",da:"Værktøjsresultat",pl:"Wynik narzędzia",ru:"Результат инструмента",ar:"نتيجة الأداة",no:"Verktøyresultat","pt-BR":"Resultado da ferramenta",th:"ผลลัพธ์เครื่องมือ",tr:"Araç sonucu",uk:"Результат інструменту"},"ui.toolReturnNamed":{zh:"{name} 返回",en:"{name} result","zh-TW":"{name} 返回",ko:"{name} 결과",ja:"{name} 結果",de:"{name}-Ergebnis",es:"Resultado de {name}",fr:"Résultat de {name}",it:"Risultato di {name}",da:"{name}-resultat",pl:"Wynik {name}",ru:"Результат {name}",ar:"نتيجة {name}",no:"{name}-resultat","pt-BR":"Resultado de {name}",th:"ผลลัพธ์ {name}",tr:"{name} sonucu",uk:"Результат {name}"},"ui.lastResponse":{zh:"Last Response",en:"Last Response","zh-TW":"Last Response",ko:"Last Response",ja:"Last Response",de:"Last Response",es:"Last Response",fr:"Last Response",it:"Last Response",da:"Last Response",pl:"Last Response",ru:"Last Response",ar:"Last Response",no:"Last Response","pt-BR":"Last Response",th:"Last Response",tr:"Last Response",uk:"Last Response"},"ui.copySuccess":{zh:"复制成功",en:"Copied","zh-TW":"複製成功",ko:"복사됨",ja:"コピーしました",de:"Kopiert",es:"Copiado",fr:"Copié",it:"Copiato",da:"Kopieret",pl:"Skopiowano",ru:"Скопировано",ar:"تم النسخ",no:"Kopiert","pt-BR":"Copiado",th:"คัดลอกแล้ว",tr:"Kopyalandı",uk:"Скопійовано"},"ui.copy":{zh:"复制",en:"Copy","zh-TW":"複製",ko:"복사",ja:"コピー",de:"Kopieren",es:"Copiar",fr:"Copier",it:"Copia",da:"Kopiér",pl:"Kopiuj",ru:"Копировать",ar:"نسخ",no:"Kopier","pt-BR":"Copiar",th:"คัดลอก",tr:"Kopyala",uk:"Копіювати"},"ui.noHeaders":{zh:"无 Headers",en:"No Headers","zh-TW":"無 Headers",ko:"Headers 없음",ja:"Headers なし",de:"Keine Headers",es:"Sin Headers",fr:"Pas de Headers",it:"Nessun Header",da:"Ingen Headers",pl:"Brak Headers",ru:"Нет Headers",ar:"لا يوجد Headers",no:"Ingen Headers","pt-BR":"Sem Headers",th:"ไม่มี Headers",tr:"Header yok",uk:"Немає Headers"},"ui.noBody":{zh:"无 Body",en:"No Body","zh-TW":"無 Body",ko:"Body 없음",ja:"Body なし",de:"Kein Body",es:"Sin Body",fr:"Pas de Body",it:"Nessun Body",da:"Ingen Body",pl:"Brak Body",ru:"Нет Body",ar:"لا يوجد Body",no:"Ingen Body","pt-BR":"Sem Body",th:"ไม่มี Body",tr:"Body yok",uk:"Немає Body"},"ui.streamingResponse":{zh:"⚡ 流式响应 — 此请求使用了 SSE 流式传输,响应内容无法完整捕获。",en:"⚡ Streaming response — This request used SSE streaming, response content cannot be fully captured.","zh-TW":"⚡ 串流回應 — 此請求使用了 SSE 串流傳輸,回應內容無法完整擷取。",ko:"⚡ 스트리밍 응답 — 이 요청은 SSE 스트리밍을 사용하여 응답 내용을 완전히 캡처할 수 없습니다.",ja:"⚡ ストリーミングレスポンス — このリクエストは SSE ストリーミングを使用しており、レスポンス内容を完全にキャプチャできませんでした。",de:"⚡ Streaming-Antwort — Diese Anfrage nutzte SSE-Streaming, der Antwortinhalt konnte nicht vollständig erfasst werden.",es:"⚡ Respuesta en streaming — Esta solicitud usó streaming SSE, el contenido de la respuesta no se pudo capturar completamente.",fr:"⚡ Réponse en streaming — Cette requête a utilisé le streaming SSE, le contenu de la réponse n'a pas pu être entièrement capturé.",it:"⚡ Risposta in streaming — Questa richiesta ha utilizzato lo streaming SSE, il contenuto della risposta non può essere catturato completamente.",da:"⚡ Streaming-svar — Denne forespørgsel brugte SSE-streaming, svarindholdet kunne ikke fuldt indfanges.",pl:"⚡ Odpowiedź strumieniowa — To żądanie użyło strumieniowania SSE, treść odpowiedzi nie mogła zostać w pełni przechwycona.",ru:"⚡ Потоковый ответ — Этот запрос использовал SSE-потоковую передачу, содержимое ответа не может быть полностью захвачено.",ar:"⚡ استجابة متدفقة — استخدم هذا الطلب بث SSE، لا يمكن التقاط محتوى الاستجابة بالكامل.",no:"⚡ Strømmesvar — Denne forespørselen brukte SSE-strømming, svarinnholdet kunne ikke fanges fullstendig.","pt-BR":"⚡ Resposta em streaming — Esta requisição usou streaming SSE, o conteúdo da resposta não pôde ser totalmente capturado.",th:"⚡ การตอบกลับแบบสตรีม — คำขอนี้ใช้ SSE streaming เนื้อหาการตอบกลับไม่สามารถจับได้ทั้งหมด",tr:"⚡ Akış yanıtı — Bu istek SSE akışı kullandı, yanıt içeriği tam olarak yakalanamadı.",uk:"⚡ Потокова відповідь — Цей запит використовував SSE-потокову передачу, вміст відповіді не може бути повністю захоплений."},"ui.responseNotCaptured":{zh:"响应数据未捕获",en:"Response not captured","zh-TW":"回應資料未擷取",ko:"응답 데이터 미캡처",ja:"レスポンスデータ未キャプチャ",de:"Antwortdaten nicht erfasst",es:"Datos de respuesta no capturados",fr:"Données de réponse non capturées",it:"Dati di risposta non catturati",da:"Svardata ikke indfanget",pl:"Dane odpowiedzi nie przechwycone",ru:"Данные ответа не захвачены",ar:"لم يتم التقاط بيانات الاستجابة",no:"Svardata ikke fanget","pt-BR":"Dados de resposta não capturados",th:"ไม่ได้จับข้อมูลการตอบกลับ",tr:"Yanıt verileri yakalanamadı",uk:"Дані відповіді не захоплені"},"ui.expand":{zh:"▶ 展开",en:"▶ Expand","zh-TW":"▶ 展開",ko:"▶ 펼치기",ja:"▶ 展開",de:"▶ Aufklappen",es:"▶ Expandir",fr:"▶ Déplier",it:"▶ Espandi",da:"▶ Udvid",pl:"▶ Rozwiń",ru:"▶ Развернуть",ar:"▶ توسيع",no:"▶ Utvid","pt-BR":"▶ Expandir",th:"▶ ขยาย",tr:"▶ Genişlet",uk:"▶ Розгорнути"},"ui.collapse":{zh:"▼ 收起",en:"▼ Collapse","zh-TW":"▼ 收起",ko:"▼ 접기",ja:"▼ 折りたたむ",de:"▼ Zuklappen",es:"▼ Contraer",fr:"▼ Replier",it:"▼ Comprimi",da:"▼ Fold sammen",pl:"▼ Zwiń",ru:"▼ Свернуть",ar:"▼ طي",no:"▼ Skjul","pt-BR":"▼ Recolher",th:"▼ ย่อ",tr:"▼ Daralt",uk:"▼ Згорнути"},"ui.noChat":{zh:"暂无 MainAgent 对话数据",en:"No MainAgent conversation data","zh-TW":"暫無 MainAgent 對話資料",ko:"MainAgent 대화 데이터 없음",ja:"MainAgent の会話データがありません",de:"Keine MainAgent-Gesprächsdaten",es:"Sin datos de conversación de MainAgent",fr:"Aucune donnée de conversation MainAgent",it:"Nessun dato di conversazione MainAgent",da:"Ingen MainAgent samtaledata",pl:"Brak danych rozmowy MainAgent",ru:"Нет данных диалога MainAgent",ar:"لا توجد بيانات محادثة MainAgent",no:"Ingen MainAgent samtaledata","pt-BR":"Sem dados de conversa do MainAgent",th:"ไม่มีข้อมูลการสนทนา MainAgent",tr:"MainAgent konuşma verisi yok",uk:"Немає даних діалогу MainAgent"},"ui.terminal.exited":{zh:"[进程已退出,退出码: {code}]",en:"[Process exited with code {code}]","zh-TW":"[程序已退出,退出碼: {code}]",ko:"[프로세스가 코드 {code}(으)로 종료되었습니다]",ja:"[プロセスがコード {code} で終了しました]",de:"[Prozess mit Code {code} beendet]",es:"[Proceso finalizado con código {code}]",fr:"[Processus terminé avec le code {code}]",it:"[Processo terminato con codice {code}]",da:"[Proces afsluttet med kode {code}]",pl:"[Proces zakończony z kodem {code}]",ru:"[Процесс завершился с кодом {code}]",ar:"[انتهت العملية برمز {code}]",no:"[Prosess avsluttet med kode {code}]","pt-BR":"[Processo encerrado com código {code}]",th:"[กระบวนการออกด้วยรหัส {code}]",tr:"[İşlem {code} koduyla çıkış yaptı]",uk:"[Процес завершився з кодом {code}]"},"ui.diffWithPrev":{zh:"与上次请求的差异",en:"Diff with previous request","zh-TW":"與上次請求的差異",ko:"이전 요청과의 차이",ja:"前回リクエストとの差分",de:"Diff zur vorherigen Anfrage",es:"Diferencia con la solicitud anterior",fr:"Diff avec la requête précédente",it:"Diff con la richiesta precedente",da:"Diff med forrige anmodning",pl:"Różnica z poprzednim żądaniem",ru:"Отличия от предыдущего запроса",ar:"الفرق مع الطلب السابق",no:"Diff med forrige forespørsel","pt-BR":"Diff com a requisição anterior",th:"ความแตกต่างกับคำขอก่อนหน้า",tr:"Önceki istekle fark",uk:"Відмінності від попереднього запиту"},"ui.diffSessionChanged":{zh:"请求体大小减小,可能使用了 /clear、/compact 或 session 发生了变化",en:"Request body size decreased, possibly due to /clear, /compact, or session change","zh-TW":"請求體大小減小,可能使用了 /clear、/compact 或 session 發生了變化",ko:"요청 본문 크기가 줄었습니다. /clear, /compact 또는 세션 변경이 있었을 수 있습니다",ja:"リクエストボディのサイズが減少しました。/clear、/compact、またはセッション変更の可能性があります",de:"Anfragekörper wurde kleiner, möglicherweise durch /clear, /compact oder Sitzungswechsel",es:"El tamaño del cuerpo de la solicitud disminuyó, posiblemente debido a /clear, /compact o cambio de sesión",fr:"La taille du corps de la requête a diminué, possiblement dû à /clear, /compact ou un changement de session",it:"La dimensione del corpo della richiesta è diminuita, probabilmente a causa di /clear, /compact o cambio di sessione",da:"Anmodningens størrelse er reduceret, muligvis på grund af /clear, /compact eller sessionsændring",pl:"Rozmiar treści żądania zmniejszył się, prawdopodobnie z powodu /clear, /compact lub zmiany sesji",ru:"Размер тела запроса уменьшился, возможно из-за /clear, /compact или смены сессии",ar:"حجم نص الطلب انخفض، ربما بسبب /clear أو /compact أو تغيير الجلسة",no:"Forespørselens størrelse ble redusert, muligens på grunn av /clear, /compact eller sesjonsendring","pt-BR":"O tamanho do corpo da requisição diminuiu, possivelmente devido a /clear, /compact ou mudança de sessão",th:"ขนาดเนื้อหาคำขอลดลง อาจเกิดจาก /clear, /compact หรือการเปลี่ยนเซสชัน",tr:"İstek gövdesi boyutu küçüldü, muhtemelen /clear, /compact veya oturum değişikliği nedeniyle",uk:"Розмір тіла запиту зменшився, можливо через /clear, /compact або зміну сесії"},"ui.diffTooltip":{zh:"为了避免看冗长的全文,所以为大家简化展示了 MainAgent 的增量部分,通常只有 message 增加",en:"To avoid reading lengthy full text, only the incremental parts of MainAgent are shown — typically just new messages","zh-TW":"為了避免閱讀冗長的全文,簡化展示了 MainAgent 的增量部分,通常只有 message 增加",ko:"긴 전체 텍스트를 읽지 않도록 MainAgent의 증분 부분만 간략히 표시합니다. 일반적으로 message 추가만 있습니다",ja:"MainAgent の増分部分のみを簡略表示しています。長い全文を読む手間を省くため、通常は message の追加のみです",de:"Um das Lesen langer Volltexte zu vermeiden, werden nur die inkrementellen Teile des MainAgent angezeigt — in der Regel nur neue Nachrichten",es:"Para evitar leer textos completos extensos, solo se muestran las partes incrementales del MainAgent — normalmente solo mensajes nuevos",fr:"Pour éviter de lire de longs textes complets, seules les parties incrémentales du MainAgent sont affichées — généralement uniquement les nouveaux messages",it:"Per evitare di leggere lunghi testi completi, vengono mostrate solo le parti incrementali del MainAgent — di solito solo nuovi messaggi",da:"For at undgå at læse lange fuldtekster vises kun de inkrementelle dele af MainAgent — typisk kun nye beskeder",pl:"Aby uniknąć czytania długich pełnych tekstów, wyświetlane są tylko przyrostowe części MainAgent — zwykle tylko nowe wiadomości",ru:"Чтобы не читать длинный полный текст, отображаются только инкрементальные части MainAgent — обычно только новые сообщения",ar:"لتجنب قراءة النص الكامل الطويل، يتم عرض الأجزاء التزايدية فقط من MainAgent — عادةً فقط الرسائل الجديدة",no:"For å unngå å lese lange fulltekster vises kun de inkrementelle delene av MainAgent — vanligvis bare nye meldinger","pt-BR":"Para evitar ler textos completos longos, apenas as partes incrementais do MainAgent são exibidas — geralmente apenas novas mensagens",th:"เพื่อหลีกเลี่ยงการอ่านข้อความเต็มที่ยาว จึงแสดงเฉพาะส่วนที่เพิ่มขึ้นของ MainAgent เท่านั้น — โดยปกติจะมีเพียง message ใหม่",tr:"Uzun tam metinleri okumaktan kaçınmak için yalnızca MainAgent'ın artımlı kısımları gösterilir — genellikle yalnızca yeni mesajlar",uk:"Щоб не читати довгий повний текст, відображаються лише інкрементальні частини MainAgent — зазвичай лише нові повідомлення"},"cli.resume.prompt":{zh:"检测到1小时内的日志: {file}",en:"Recent log found (within 1 hour): {file}","zh-TW":"偵測到1小時內的日誌: {file}",ko:"1시간 이내 로그 감지: {file}",ja:"1時間以内のログを検出: {file}",de:"Kürzliches Log gefunden (innerhalb 1 Stunde): {file}",es:"Log reciente encontrado (dentro de 1 hora): {file}",fr:"Log récent trouvé (moins d'1 heure): {file}",it:"Log recente trovato (entro 1 ora): {file}",da:"Nylig log fundet (inden for 1 time): {file}",pl:"Znaleziono ostatni log (w ciągu 1 godziny): {file}",ru:"Обнаружен недавний лог (менее 1 часа): {file}",ar:"تم العثور على سجل حديث (خلال ساعة واحدة): {file}",no:"Nylig logg funnet (innen 1 time): {file}","pt-BR":"Log recente encontrado (dentro de 1 hora): {file}",th:"พบล็อกล่าสุด (ภายใน 1 ชั่วโมง): {file}",tr:"Son günlük bulundu (1 saat içinde): {file}",uk:"Знайдено нещодавній лог (менше 1 години): {file}"},"cli.resume.continue":{zh:"继续",en:"Continue","zh-TW":"繼續",ko:"계속",ja:"続行",de:"Fortsetzen",es:"Continuar",fr:"Continuer",it:"Continua",da:"Fortsæt",pl:"Kontynuuj",ru:"Продолжить",ar:"متابعة",no:"Fortsett","pt-BR":"Continuar",th:"ดำเนินการต่อ",tr:"Devam",uk:"Продовжити"},"cli.resume.new":{zh:"新开",en:"New","zh-TW":"新開",ko:"새로 시작",ja:"新規",de:"Neu",es:"Nuevo",fr:"Nouveau",it:"Nuovo",da:"Ny",pl:"Nowy",ru:"Новый",ar:"جديد",no:"Ny","pt-BR":"Novo",th:"ใหม่",tr:"Yeni",uk:"Новий"},"ui.resume.title":{zh:"检测到近期日志",en:"Recent Log Detected","zh-TW":"偵測到近期日誌",ko:"최근 로그 감지됨",ja:"最近のログを検出",de:"Kürzliches Log erkannt",es:"Log reciente detectado",fr:"Log récent détecté",it:"Log recente rilevato",da:"Nylig log fundet",pl:"Wykryto ostatni log",ru:"Обнаружен недавний лог",ar:"تم اكتشاف سجل حديث",no:"Nylig logg oppdaget","pt-BR":"Log recente detectado",th:"ตรวจพบล็อกล่าสุด",tr:"Son günlük tespit edildi",uk:"Виявлено нещодавній лог"},"ui.resume.message":{zh:"检测到1小时内的日志: {file},是否继续?",en:"Recent log found (within 1 hour): {file}. Continue?","zh-TW":"偵測到1小時內的日誌: {file},是否繼續?",ko:"1시간 이내 로그 감지: {file}. 계속하시겠습니까?",ja:"1時間以内のログを検出: {file}。続行しますか?",de:"Kürzliches Log gefunden (innerhalb 1 Stunde): {file}. Fortsetzen?",es:"Log reciente encontrado (dentro de 1 hora): {file}. ¿Continuar?",fr:"Log récent trouvé (moins d'1 heure): {file}. Continuer ?",it:"Log recente trovato (entro 1 ora): {file}. Continuare?",da:"Nylig log fundet (inden for 1 time): {file}. Fortsæt?",pl:"Znaleziono ostatni log (w ciągu 1 godziny): {file}. Kontynuować?",ru:"Обнаружен недавний лог (менее 1 часа): {file}. Продолжить?",ar:"تم العثور على سجل حديث (خلال ساعة واحدة): {file}. هل تريد المتابعة؟",no:"Nylig logg funnet (innen 1 time): {file}. Fortsette?","pt-BR":"Log recente encontrado (dentro de 1 hora): {file}. Continuar?",th:"พบล็อกล่าสุด (ภายใน 1 ชั่วโมง): {file} ต้องการดำเนินการต่อหรือไม่?",tr:"Son günlük bulundu (1 saat içinde): {file}. Devam edilsin mi?",uk:"Знайдено нещодавній лог (менше 1 години): {file}. Продовжити?"},"ui.resume.continue":{zh:"继续上次",en:"Continue","zh-TW":"繼續上次",ko:"이어서 계속",ja:"前回の続き",de:"Fortsetzen",es:"Continuar",fr:"Continuer",it:"Continua",da:"Fortsæt",pl:"Kontynuuj",ru:"Продолжить",ar:"متابعة",no:"Fortsett","pt-BR":"Continuar",th:"ดำเนินการต่อ",tr:"Devam et",uk:"Продовжити"},"ui.resume.new":{zh:"新开日志",en:"Start New","zh-TW":"新開日誌",ko:"새 로그 시작",ja:"新規ログ",de:"Neues Log",es:"Nuevo log",fr:"Nouveau log",it:"Nuovo log",da:"Ny log",pl:"Nowy log",ru:"Новый лог",ar:"سجل جديد",no:"Ny logg","pt-BR":"Novo log",th:"ล็อกใหม่",tr:"Yeni günlük",uk:"Новий лог"},"ui.settings":{zh:"展示设置",en:"Display Settings","zh-TW":"顯示設定",ko:"표시 설정",ja:"表示設定",de:"Anzeigeeinstellungen",es:"Configuración de visualización",fr:"Paramètres d'affichage",it:"Impostazioni di visualizzazione",da:"Visningsindstillinger",pl:"Ustawienia wyświetlania",ru:"Настройки отображения",ar:"إعدادات العرض",no:"Visningsinnstillinger","pt-BR":"Configurações de exibição",th:"ตั้งค่าการแสดงผล",tr:"Görüntüleme ayarları",uk:"Налаштування відображення"},"ui.collapseToolResults":{zh:"折叠工具返回内容",en:"Collapse tool results","zh-TW":"摺疊工具回傳內容",ko:"도구 결과 접기",ja:"ツール結果を折りたたむ",de:"Werkzeugergebnisse einklappen",es:"Contraer resultados de herramientas",fr:"Réduire les résultats des outils",it:"Comprimi risultati strumenti",da:"Skjul værktøjsresultater",pl:"Zwiń wyniki narzędzi",ru:"Свернуть результаты инструментов",ar:"طي نتائج الأدوات",no:"Skjul verktøyresultater","pt-BR":"Recolher resultados de ferramentas",th:"ย่อผลลัพธ์เครื่องมือ",tr:"Araç sonuçlarını daralt",uk:"Згорнути результати інструментів"},"ui.expandThinking":{zh:'展开"思考过程"',en:'Expand "Thinking"',"zh-TW":'展開"思考過程"',ko:'"사고 과정" 펼치기',ja:'"思考プロセス"を展開',de:'"Denkprozess" aufklappen',es:'Expandir "Proceso de pensamiento"',fr:'Développer "Processus de réflexion"',it:'Espandi "Processo di pensiero"',da:'Udvid "Tænkeproces"',pl:'Rozwiń "Proces myślenia"',ru:'Развернуть "Процесс мышления"',ar:'توسيع "عملية التفكير"',no:'Utvid "Tenkeprosess"',"pt-BR":'Expandir "Processo de pensamento"',th:'ขยาย "กระบวนการคิด"',tr:'"Düşünce süreci"ni genişlet',uk:'Розгорнути "Процес мислення"'},"ui.expandDiff":{zh:"默认展开 Body Diff JSON",en:"Expand Body Diff JSON by default","zh-TW":"預設展開 Body Diff JSON",ko:"Body Diff JSON 기본 펼치기",ja:"Body Diff JSON をデフォルトで展開",de:"Body Diff JSON standardmäßig aufklappen",es:"Expandir Body Diff JSON por defecto",fr:"Développer Body Diff JSON par défaut",it:"Espandi Body Diff JSON per impostazione predefinita",da:"Udvid Body Diff JSON som standard",pl:"Domyślnie rozwiń Body Diff JSON",ru:"Разворачивать Body Diff JSON по умолчанию",ar:"توسيع Body Diff JSON افتراضيًا",no:"Utvid Body Diff JSON som standard","pt-BR":"Expandir Body Diff JSON por padrão",th:"ขยาย Body Diff JSON เป็นค่าเริ่มต้น",tr:"Body Diff JSON'u varsayılan olarak genişlet",uk:"Розгортати Body Diff JSON за замовчуванням"},"ui.globalSettings":{zh:"全局设置",en:"Global Settings","zh-TW":"全域設定",ko:"전역 설정",ja:"グローバル設定",de:"Globale Einstellungen",es:"Configuración global",fr:"Paramètres globaux",it:"Impostazioni globali",da:"Globale indstillinger",pl:"Ustawienia globalne",ru:"Глобальные настройки",ar:"الإعدادات العامة",no:"Globale innstillinger","pt-BR":"Configurações globais",th:"ตั้งค่าทั่วไป",tr:"Genel ayarlar",uk:"Глобальні налаштування"},"ui.filterIrrelevant":{zh:"过滤无关请求",en:"Filter irrelevant requests","zh-TW":"過濾無關請求",ko:"무관한 요청 필터링",ja:"無関係なリクエストをフィルタ",de:"Irrelevante Anfragen filtern",es:"Filtrar solicitudes irrelevantes",fr:"Filtrer les requêtes non pertinentes",it:"Filtra richieste irrilevanti",da:"Filtrer irrelevante forespørgsler",pl:"Filtruj nieistotne żądania",ru:"Фильтровать нерелевантные запросы",ar:"تصفية الطلبات غير ذات الصلة",no:"Filtrer irrelevante forespørsler","pt-BR":"Filtrar solicitações irrelevantes",th:"กรองคำขอที่ไม่เกี่ยวข้อง",tr:"İlgisiz istekleri filtrele",uk:"Фільтрувати нерелевантні запити"},"ui.thinking":{zh:"思考过程",en:"Thinking","zh-TW":"思考過程",ko:"사고 과정",ja:"思考プロセス",de:"Denkprozess",es:"Proceso de pensamiento",fr:"Processus de réflexion",it:"Processo di pensiero",da:"Tænkeproces",pl:"Proces myślenia",ru:"Процесс мышления",ar:"عملية التفكير",no:"Tenkeprosess","pt-BR":"Processo de pensamento",th:"กระบวนการคิด",tr:"Düşünce süreci",uk:"Процес мислення"},"ui.translate":{zh:"翻译",en:"Translate","zh-TW":"翻譯",ko:"번역",ja:"翻訳",de:"Übersetzen",es:"Traducir",fr:"Traduire",it:"Traduci",da:"Oversæt",pl:"Tłumacz",ru:"Перевести",ar:"ترجمة",no:"Oversett","pt-BR":"Traduzir",th:"แปล",tr:"Çevir",uk:"Перекласти"},"ui.translating":{zh:"翻译中…",en:"Translating…","zh-TW":"翻譯中…",ko:"번역 중…",ja:"翻訳中…",de:"Übersetze…",es:"Traduciendo…",fr:"Traduction…",it:"Traduzione…",da:"Oversætter…",pl:"Tłumaczenie…",ru:"Перевод…",ar:"جارٍ الترجمة…",no:"Oversetter…","pt-BR":"Traduzindo…",th:"กำลังแปล…",tr:"Çevriliyor…",uk:"Переклад…"},"ui.skillLoaded":{zh:"Skill 已加载",en:"Skill Loaded","zh-TW":"Skill 已載入",ko:"Skill 로드됨",ja:"Skill 読み込み済み",de:"Skill geladen",es:"Skill cargado",fr:"Skill chargé",it:"Skill caricato",da:"Skill indlæst",pl:"Skill załadowany",ru:"Skill загружен",ar:"تم تحميل Skill",no:"Skill lastet","pt-BR":"Skill carregado",th:"โหลด Skill แล้ว",tr:"Skill yüklendi",uk:"Skill завантажено"},"ui.cacheLoss.ttl":{zh:"缓存丢失:距上次 MainAgent 请求超过 5 分钟,缓存已过期",en:"Cache miss: over 5 minutes since last MainAgent request, cache expired","zh-TW":"快取遺失:距上次 MainAgent 請求超過 5 分鐘,快取已過期",ko:"캐시 손실: 마지막 MainAgent 요청 후 5분 초과, 캐시 만료",ja:"キャッシュミス:前回の MainAgent リクエストから5分以上経過、キャッシュ期限切れ",de:"Cache-Verlust: Über 5 Minuten seit letzter MainAgent-Anfrage, Cache abgelaufen",es:"Pérdida de caché: más de 5 minutos desde la última solicitud MainAgent, caché expirada",fr:"Perte de cache : plus de 5 minutes depuis la dernière requête MainAgent, cache expiré",it:"Cache persa: oltre 5 minuti dall'ultima richiesta MainAgent, cache scaduta",da:"Cache-tab: over 5 minutter siden sidste MainAgent-forespørgsel, cache udløbet",pl:"Utrata cache: ponad 5 minut od ostatniego żądania MainAgent, cache wygasł",ru:"Потеря кэша: прошло более 5 минут с последнего запроса MainAgent, кэш истёк",ar:"فقدان التخزين المؤقت: مرور أكثر من 5 دقائق منذ آخر طلب MainAgent، انتهت صلاحية التخزين المؤقت",no:"Cache-tap: over 5 minutter siden siste MainAgent-forespørsel, cache utløpt","pt-BR":"Perda de cache: mais de 5 minutos desde a última requisição MainAgent, cache expirado",th:"แคชหาย: เกิน 5 นาทีจากคำขอ MainAgent ล่าสุด แคชหมดอายุ",tr:"Önbellek kaybı: Son MainAgent isteğinden 5 dakikadan fazla geçti, önbellek süresi doldu",uk:"Втрата кешу: минуло понад 5 хвилин з останнього запиту MainAgent, кеш закінчився"},"ui.cacheLoss.systemChange":{zh:"缓存重建:system prompt 发生变更",en:"Cache rebuild: system prompt changed","zh-TW":"快取重建:system prompt 發生變更",ko:"캐시 재생성: 시스템 프롬프트 변경",ja:"キャッシュ再構築:システムプロンプトが変更されました",de:"Cache-Neuaufbau: System-Prompt geändert",es:"Reconstrucción de caché: el prompt del sistema cambió",fr:"Reconstruction du cache : le prompt système a changé",it:"Ricostruzione cache: il prompt di sistema è cambiato",da:"Cache-genopbygning: systemprompt ændret",pl:"Odbudowa cache: prompt systemowy zmieniony",ru:"Перестройка кэша: системный промпт изменён",ar:"إعادة بناء التخزين المؤقت: تم تغيير موجه النظام",no:"Cache-gjenoppbygging: systemprompt endret","pt-BR":"Reconstrução de cache: prompt do sistema alterado",th:"สร้างแคชใหม่: system prompt เปลี่ยนแปลง",tr:"Önbellek yeniden oluşturma: sistem istemi değişti",uk:"Перебудова кешу: системний промпт змінено"},"ui.cacheLoss.toolsChange":{zh:"缓存重建:工具定义发生变更",en:"Cache rebuild: tool definitions changed","zh-TW":"快取重建:工具定義發生變更",ko:"캐시 재생성: 도구 정의 변경",ja:"キャッシュ再構築:ツール定義が変更されました",de:"Cache-Neuaufbau: Tool-Definitionen geändert",es:"Reconstrucción de caché: las definiciones de herramientas cambiaron",fr:"Reconstruction du cache : les définitions d'outils ont changé",it:"Ricostruzione cache: le definizioni degli strumenti sono cambiate",da:"Cache-genopbygning: værktøjsdefinitioner ændret",pl:"Odbudowa cache: definicje narzędzi zmienione",ru:"Перестройка кэша: определения инструментов изменены",ar:"إعادة بناء التخزين المؤقت: تم تغيير تعريفات الأدوات",no:"Cache-gjenoppbygging: verktøydefinisjoner endret","pt-BR":"Reconstrução de cache: definições de ferramentas alteradas",th:"สร้างแคชใหม่: คำจำกัดความเครื่องมือเปลี่ยนแปลง",tr:"Önbellek yeniden oluşturma: araç tanımları değişti",uk:"Перебудова кешу: визначення інструментів змінено"},"ui.cacheLoss.modelChange":{zh:"缓存重建:模型切换",en:"Cache rebuild: model switched","zh-TW":"快取重建:模型切換",ko:"캐시 재생성: 모델 전환",ja:"キャッシュ再構築:モデルが切り替わりました",de:"Cache-Neuaufbau: Modell gewechselt",es:"Reconstrucción de caché: modelo cambiado",fr:"Reconstruction du cache : modèle changé",it:"Ricostruzione cache: modello cambiato",da:"Cache-genopbygning: model skiftet",pl:"Odbudowa cache: model zmieniony",ru:"Перестройка кэша: модель переключена",ar:"إعادة بناء التخزين المؤقت: تم تبديل النموذج",no:"Cache-gjenoppbygging: modell byttet","pt-BR":"Reconstrução de cache: modelo alterado",th:"สร้างแคชใหม่: เปลี่ยนโมเดล",tr:"Önbellek yeniden oluşturma: model değiştirildi",uk:"Перебудова кешу: модель переключено"},"ui.cacheLoss.msgTruncated":{zh:"缓存重建:消息栈被截断(上下文窗口溢出)",en:"Cache rebuild: message stack truncated (context window overflow)","zh-TW":"快取重建:訊息堆疊被截斷(上下文視窗溢出)",ko:"캐시 재생성: 메시지 스택 잘림 (컨텍스트 윈도우 오버플로)",ja:"キャッシュ再構築:メッセージスタックが切り詰められました(コンテキストウィンドウオーバーフロー)",de:"Cache-Neuaufbau: Nachrichtenstapel gekürzt (Kontextfenster-Überlauf)",es:"Reconstrucción de caché: pila de mensajes truncada (desbordamiento de ventana de contexto)",fr:"Reconstruction du cache : pile de messages tronquée (dépassement de la fenêtre de contexte)",it:"Ricostruzione cache: stack messaggi troncato (overflow finestra di contesto)",da:"Cache-genopbygning: beskedstakken afkortet (kontekstvindue-overløb)",pl:"Odbudowa cache: stos wiadomości obcięty (przepełnienie okna kontekstu)",ru:"Перестройка кэша: стек сообщений усечён (переполнение контекстного окна)",ar:"إعادة بناء التخزين المؤقت: تم اقتطاع مكدس الرسائل (تجاوز نافذة السياق)",no:"Cache-gjenoppbygging: meldingsstakken avkortet (kontekstvindu-overflyt)","pt-BR":"Reconstrução de cache: pilha de mensagens truncada (estouro da janela de contexto)",th:"สร้างแคชใหม่: สแต็กข้อความถูกตัด (context window ล้น)",tr:"Önbellek yeniden oluşturma: mesaj yığını kesildi (bağlam penceresi taşması)",uk:"Перебудова кешу: стек повідомлень обрізано (переповнення контекстного вікна)"},"ui.cacheLoss.msgModified":{zh:"缓存重建:历史消息内容被修改",en:"Cache rebuild: historical message content modified","zh-TW":"快取重建:歷史訊息內容被修改",ko:"캐시 재생성: 이전 메시지 내용 수정됨",ja:"キャッシュ再構築:過去のメッセージ内容が変更されました",de:"Cache-Neuaufbau: Historische Nachrichteninhalte geändert",es:"Reconstrucción de caché: contenido de mensajes históricos modificado",fr:"Reconstruction du cache : contenu des messages historiques modifié",it:"Ricostruzione cache: contenuto dei messaggi storici modificato",da:"Cache-genopbygning: historisk beskedindhold ændret",pl:"Odbudowa cache: treść historycznych wiadomości zmodyfikowana",ru:"Перестройка кэша: содержимое исторических сообщений изменено",ar:"إعادة بناء التخزين المؤقت: تم تعديل محتوى الرسائل السابقة",no:"Cache-gjenoppbygging: historisk meldingsinnhold endret","pt-BR":"Reconstrução de cache: conteúdo de mensagens históricas modificado",th:"สร้างแคชใหม่: เนื้อหาข้อความในประวัติถูกแก้ไข",tr:"Önbellek yeniden oluşturma: geçmiş mesaj içeriği değiştirildi",uk:"Перебудова кешу: вміст історичних повідомлень змінено"},"ui.cacheLoss.keyChange":{zh:"缓存重建:缓存键变更(原因未知)",en:"Cache rebuild: cache key changed (unknown reason)","zh-TW":"快取重建:快取鍵變更(原因未知)",ko:"캐시 재생성: 캐시 키 변경 (원인 불명)",ja:"キャッシュ再構築:キャッシュキーが変更されました(原因不明)",de:"Cache-Neuaufbau: Cache-Schlüssel geändert (Grund unbekannt)",es:"Reconstrucción de caché: clave de caché cambiada (razón desconocida)",fr:"Reconstruction du cache : clé de cache modifiée (raison inconnue)",it:"Ricostruzione cache: chiave cache cambiata (motivo sconosciuto)",da:"Cache-genopbygning: cache-nøgle ændret (ukendt årsag)",pl:"Odbudowa cache: klucz cache zmieniony (nieznana przyczyna)",ru:"Перестройка кэша: ключ кэша изменён (причина неизвестна)",ar:"إعادة بناء التخزين المؤقت: تم تغيير مفتاح التخزين المؤقت (سبب غير معروف)",no:"Cache-gjenoppbygging: cache-nøkkel endret (ukjent årsak)","pt-BR":"Reconstrução de cache: chave de cache alterada (motivo desconhecido)",th:"สร้างแคชใหม่: คีย์แคชเปลี่ยนแปลง (ไม่ทราบสาเหตุ)",tr:"Önbellek yeniden oluşturma: önbellek anahtarı değişti (bilinmeyen neden)",uk:"Перебудова кешу: ключ кешу змінено (причина невідома)"},"ui.cacheRebuildStats":{zh:"缓存重建统计",en:"Cache Rebuild Stats","zh-TW":"快取重建統計",ko:"캐시 재구축 통계",ja:"キャッシュ再構築統計",de:"Cache-Neuaufbau-Statistik",es:"Estadísticas de reconstrucción de caché",fr:"Statistiques de reconstruction du cache",it:"Statistiche ricostruzione cache",da:"Cache-genopbygningsstatistik",pl:"Statystyki przebudowy cache",ru:"Статистика перестройки кеша",ar:"إحصائيات إعادة بناء ذاكرة التخزين المؤقت",no:"Cache-gjenoppbyggingsstatistikk","pt-BR":"Estatísticas de reconstrução de cache",th:"สถิติการสร้างแคชใหม่",tr:"Önbellek Yeniden Oluşturma İstatistikleri",uk:"Статистика перебудови кешу"},"ui.cacheRebuild.reason":{zh:"原因",en:"Reason","zh-TW":"原因",ko:"원인",ja:"原因",de:"Ursache",es:"Razón",fr:"Raison",it:"Motivo",da:"Årsag",pl:"Przyczyna",ru:"Причина",ar:"السبب",no:"Årsak","pt-BR":"Razão",th:"สาเหตุ",tr:"Neden",uk:"Причина"},"ui.cacheRebuild.count":{zh:"次数",en:"Count","zh-TW":"次數",ko:"횟수",ja:"回数",de:"Anzahl",es:"Veces",fr:"Nombre",it:"Volte",da:"Antal",pl:"Liczba",ru:"Кол-во",ar:"العدد",no:"Antall","pt-BR":"Vezes",th:"จำนวน",tr:"Sayı",uk:"Кількість"},"ui.cacheRebuild.cacheCreate":{zh:"重建缓存量",en:"Cache Created","zh-TW":"重建快取量",ko:"재구축 캐시량",ja:"再構築キャッシュ量",de:"Cache erstellt",es:"Caché creado",fr:"Cache créé",it:"Cache creata",da:"Cache oprettet",pl:"Utworzony cache",ru:"Создано кеша",ar:"الذاكرة المؤقتة المُنشأة",no:"Cache opprettet","pt-BR":"Cache criado",th:"แคชที่สร้าง",tr:"Oluşturulan önbellek",uk:"Створено кешу"},"ui.cacheRebuild.ttl":{zh:"缓存过期",en:"Cache Expired","zh-TW":"快取過期",ko:"캐시 만료",ja:"キャッシュ期限切れ",de:"Cache abgelaufen",es:"Caché expirado",fr:"Cache expiré",it:"Cache scaduta",da:"Cache udløbet",pl:"Cache wygasł",ru:"Кеш истёк",ar:"انتهاء صلاحية الذاكرة المؤقتة",no:"Cache utløpt","pt-BR":"Cache expirado",th:"แคชหมดอายุ",tr:"Önbellek süresi doldu",uk:"Кеш закінчився"},"ui.cacheRebuild.systemChange":{zh:"System Prompt 变更",en:"System Prompt Changed","zh-TW":"System Prompt 變更",ko:"System Prompt 변경",ja:"System Prompt 変更",de:"System Prompt geändert",es:"System Prompt cambiado",fr:"System Prompt modifié",it:"System Prompt modificato",da:"System Prompt ændret",pl:"System Prompt zmieniony",ru:"System Prompt изменён",ar:"تغيير System Prompt",no:"System Prompt endret","pt-BR":"System Prompt alterado",th:"System Prompt เปลี่ยนแปลง",tr:"System Prompt değişti",uk:"System Prompt змінено"},"ui.cacheRebuild.toolsChange":{zh:"工具定义变更",en:"Tools Changed","zh-TW":"工具定義變更",ko:"도구 정의 변경",ja:"ツール定義変更",de:"Tools geändert",es:"Herramientas cambiadas",fr:"Outils modifiés",it:"Strumenti modificati",da:"Værktøjer ændret",pl:"Narzędzia zmienione",ru:"Инструменты изменены",ar:"تغيير الأدوات",no:"Verktøy endret","pt-BR":"Ferramentas alteradas",th:"เครื่องมือเปลี่ยนแปลง",tr:"Araçlar değişti",uk:"Інструменти змінено"},"ui.cacheRebuild.modelChange":{zh:"模型切换",en:"Model Switched","zh-TW":"模型切換",ko:"모델 전환",ja:"モデル切替",de:"Modell gewechselt",es:"Modelo cambiado",fr:"Modèle changé",it:"Modello cambiato",da:"Model skiftet",pl:"Model zmieniony",ru:"Модель переключена",ar:"تبديل النموذج",no:"Modell byttet","pt-BR":"Modelo alterado",th:"เปลี่ยนโมเดล",tr:"Model değiştirildi",uk:"Модель переключено"},"ui.cacheRebuild.msgTruncated":{zh:"消息栈被截断",en:"Messages Truncated","zh-TW":"訊息堆疊被截斷",ko:"메시지 스택 잘림",ja:"メッセージスタック切り詰め",de:"Nachrichten abgeschnitten",es:"Mensajes truncados",fr:"Messages tronqués",it:"Messaggi troncati",da:"Beskeder afkortet",pl:"Wiadomości obcięte",ru:"Сообщения обрезаны",ar:"اقتطاع الرسائل",no:"Meldinger avkortet","pt-BR":"Mensagens truncadas",th:"ข้อความถูกตัด",tr:"Mesajlar kesildi",uk:"Повідомлення обрізано"},"ui.cacheRebuild.msgModified":{zh:"历史消息修改",en:"Messages Modified","zh-TW":"歷史訊息修改",ko:"기록 메시지 수정",ja:"履歴メッセージ変更",de:"Nachrichten geändert",es:"Mensajes modificados",fr:"Messages modifiés",it:"Messaggi modificati",da:"Beskeder ændret",pl:"Wiadomości zmodyfikowane",ru:"Сообщения изменены",ar:"تعديل الرسائل",no:"Meldinger endret","pt-BR":"Mensagens modificadas",th:"ข้อความถูกแก้ไข",tr:"Mesajlar değiştirildi",uk:"Повідомлення змінено"},"ui.cacheRebuild.keyChange":{zh:"未知键变更",en:"Unknown Key Change","zh-TW":"未知鍵變更",ko:"알 수 없는 키 변경",ja:"不明なキー変更",de:"Unbekannte Schlüsseländerung",es:"Cambio de clave desconocido",fr:"Changement de clé inconnu",it:"Modifica chiave sconosciuta",da:"Ukendt nøgleændring",pl:"Nieznana zmiana klucza",ru:"Неизвестное изменение ключа",ar:"تغيير مفتاح غير معروف",no:"Ukjent nøkkelendring","pt-BR":"Alteração de chave desconhecida",th:"การเปลี่ยนแปลงคีย์ที่ไม่ทราบ",tr:"Bilinmeyen anahtar değişikliği",uk:"Невідома зміна ключа"},"ui.skillUsageStats":{zh:"Skill 使用统计",en:"Skill Usage Stats","zh-TW":"Skill 使用統計",ko:"Skill 사용 통계",ja:"Skill 使用統計",de:"Skill-Nutzungsstatistik",es:"Estadísticas de uso de Skills",fr:"Statistiques d'utilisation des Skills",it:"Statistiche utilizzo Skill",da:"Skill-brugsstatistik",pl:"Statystyki użycia Skill",ru:"Статистика использования Skill",ar:"إحصائيات استخدام Skill",no:"Skill-bruksstatistikk","pt-BR":"Estatísticas de uso de Skills",th:"สถิติการใช้ Skill",tr:"Skill Kullanım İstatistikleri",uk:"Статистика використання Skill"},"ui.toolUsageStats":{zh:"工具使用统计",en:"Tool Usage Stats","zh-TW":"工具使用統計",ko:"도구 사용 통계",ja:"ツール使用統計",de:"Tool-Nutzungsstatistik",es:"Estadísticas de uso de herramientas",fr:"Statistiques d'utilisation des outils",it:"Statistiche utilizzo strumenti",da:"Værktøjsbrugsstatistik",pl:"Statystyki użycia narzędzi",ru:"Статистика использования инструментов",ar:"إحصائيات استخدام الأدوات",no:"Verktøybruksstatistikk","pt-BR":"Estatísticas de uso de ferramentas",th:"สถิติการใช้เครื่องมือ",tr:"Araç Kullanım İstatistikleri",uk:"Статистика використання інструментів"},"ui.subAgentStats":{zh:"SubAgent 调用统计",en:"SubAgent Call Stats","zh-TW":"SubAgent 調用統計",ko:"SubAgent 호출 통계",ja:"SubAgent 呼び出し統計",de:"SubAgent-Aufrufstatistik",es:"Estadísticas de llamadas SubAgent",fr:"Statistiques d'appels SubAgent",it:"Statistiche chiamate SubAgent",da:"SubAgent-kaldsstatistik",pl:"Statystyki wywołań SubAgent",ru:"Статистика вызовов SubAgent",ar:"إحصائيات استدعاء SubAgent",no:"SubAgent-anropsstatistikk","pt-BR":"Estatísticas de chamadas SubAgent",th:"สถิติการเรียก SubAgent",tr:"SubAgent Çağrı İstatistikleri",uk:"Статистика викликів SubAgent"},"ui.mergeLogs":{zh:"合并日志",en:"Merge Logs","zh-TW":"合併日誌",ko:"로그 병합",ja:"ログを結合",de:"Logs zusammenführen",es:"Fusionar logs",fr:"Fusionner les logs",it:"Unisci log",da:"Flet logs",pl:"Scal logi",ru:"Объединить логи",ar:"دمج السجلات",no:"Slå sammen logger","pt-BR":"Mesclar logs",th:"รวมบันทึก",tr:"Logları birleştir",uk:"Об'єднати логи"},"ui.openLog":{zh:"打开",en:"Open","zh-TW":"開啟",ko:"열기",ja:"開く",de:"Öffnen",es:"Abrir",fr:"Ouvrir",it:"Apri",da:"Åbn",pl:"Otwórz",ru:"Открыть",ar:"فتح",no:"Åpne","pt-BR":"Abrir",th:"เปิด",tr:"Aç",uk:"Відкрити"},"ui.turns":{zh:"轮",en:"turns","zh-TW":"輪",ko:"턴",ja:"ターン",de:"Runden",es:"turnos",fr:"tours",it:"turni",da:"runder",pl:"tur",ru:"ходов",ar:"جولات",no:"runder","pt-BR":"turnos",th:"รอบ",tr:"tur",uk:"ходів"},"ui.mergeNotConsecutive":{zh:"请选择连续的日志文件",en:"Please select consecutive log files","zh-TW":"請選擇連續的日誌檔案",ko:"연속된 로그 파일을 선택하세요",ja:"連続したログファイルを選択してください",de:"Bitte wählen Sie aufeinanderfolgende Log-Dateien",es:"Seleccione archivos de log consecutivos",fr:"Veuillez sélectionner des fichiers de log consécutifs",it:"Seleziona file di log consecutivi",da:"Vælg venligst sammenhængende logfiler",pl:"Wybierz kolejne pliki logów",ru:"Выберите последовательные файлы логов",ar:"يرجى اختيار ملفات سجلات متتالية",no:"Velg sammenhengende loggfiler","pt-BR":"Selecione arquivos de log consecutivos",th:"กรุณาเลือกไฟล์บันทึกที่ต่อเนื่องกัน",tr:"Lütfen ardışık log dosyalarını seçin",uk:"Виберіть послідовні файли логів"},"ui.mergeTooLarge":{zh:"选中的日志文件总大小超过 500MB",en:"Selected log files exceed 500MB","zh-TW":"選中的日誌檔案總大小超過 500MB",ko:"선택한 로그 파일의 총 크기가 500MB를 초과합니다",ja:"選択したログファイルの合計サイズが 500MB を超えています",de:"Ausgewählte Log-Dateien überschreiten 500MB",es:"Los archivos de log seleccionados superan los 500MB",fr:"Les fichiers de log sélectionnés dépassent 500 Mo",it:"I file di log selezionati superano i 500MB",da:"Valgte logfiler overstiger 500MB",pl:"Wybrane pliki logów przekraczają 500MB",ru:"Выбранные файлы логов превышают 500МБ",ar:"ملفات السجلات المحددة تتجاوز 500 ميجابايت",no:"Valgte loggfiler overstiger 500MB","pt-BR":"Arquivos de log selecionados excedem 500MB",th:"ไฟล์บันทึกที่เลือกมีขนาดรวมเกิน 500MB",tr:"Seçilen log dosyaları 500MB'ı aşıyor",uk:"Вибрані файли логів перевищують 500МБ"},"ui.mergeSuccess":{zh:"日志合并成功",en:"Logs merged successfully","zh-TW":"日誌合併成功",ko:"로그 병합 성공",ja:"ログの結合に成功しました",de:"Logs erfolgreich zusammengeführt",es:"Logs fusionados correctamente",fr:"Logs fusionnés avec succès",it:"Log uniti con successo",da:"Logs flettet",pl:"Logi scalone pomyślnie",ru:"Логи успешно объединены",ar:"تم دمج السجلات بنجاح",no:"Logger slått sammen","pt-BR":"Logs mesclados com sucesso",th:"รวมบันทึกสำเร็จ",tr:"Loglar başarıyla birleştirildi",uk:"Логи успішно об'єднано"},"ui.mergeLatestNotAllowed":{zh:"最新的日志文件不允许被合并,以避免当前窗口日志丢失",en:"The latest log file cannot be merged to avoid losing the current session","zh-TW":"最新的日誌檔案不允許被合併,以避免當前視窗日誌遺失",ko:"현재 세션 손실을 방지하기 위해 최신 로그 파일은 병합할 수 없습니다",ja:"現在のセッションの損失を防ぐため、最新のログファイルは結合できません",de:"Die neueste Logdatei kann nicht zusammengeführt werden, um den Verlust der aktuellen Sitzung zu vermeiden",es:"El archivo de log más reciente no se puede fusionar para evitar perder la sesión actual",fr:"Le fichier de log le plus récent ne peut pas être fusionné pour éviter la perte de la session en cours",it:"Il file di log più recente non può essere unito per evitare la perdita della sessione corrente",da:"Den nyeste logfil kan ikke flettes for at undgå tab af den aktuelle session",pl:"Najnowszy plik logów nie może być scalony, aby uniknąć utraty bieżącej sesji",ru:"Последний файл логов не может быть объединён, чтобы избежать потери текущей сессии",ar:"لا يمكن دمج أحدث ملف سجل لتجنب فقدان الجلسة الحالية",no:"Den nyeste loggfilen kan ikke slås sammen for å unngå tap av gjeldende økt","pt-BR":"O arquivo de log mais recente não pode ser mesclado para evitar perda da sessão atual",th:"ไม่สามารถรวมไฟล์บันทึกล่าสุดเพื่อหลีกเลี่ยงการสูญเสียเซสชันปัจจุบัน",tr:"Mevcut oturumun kaybını önlemek için en son günlük dosyası birleştirilemez",uk:"Найновіший файл логів не може бути об'єднаний, щоб уникнути втрати поточної сесії"},"ui.projectStats":{zh:"项目统计",en:"Project Stats","zh-TW":"專案統計",ko:"프로젝트 통계",ja:"プロジェクト統計",de:"Projektstatistik",es:"Estadísticas del proyecto",fr:"Statistiques du projet",it:"Statistiche progetto",da:"Projektstatistik",pl:"Statystyki projektu",ru:"Статистика проекта",ar:"إحصائيات المشروع",no:"Prosjektstatistikk","pt-BR":"Estatísticas do projeto",th:"สถิติโปรเจกต์",tr:"Proje İstatistikleri",uk:"Статистика проєкту"},"ui.projectStats.totalRequests":{zh:"总请求数",en:"Total Requests","zh-TW":"總請求數",ko:"총 요청 수",ja:"リクエスト総数",de:"Gesamtanfragen",es:"Total de solicitudes",fr:"Total des requêtes",it:"Richieste totali",da:"Samlede forespørgsler",pl:"Łączna liczba żądań",ru:"Всего запросов",ar:"إجمالي الطلبات",no:"Totale forespørsler","pt-BR":"Total de requisições",th:"คำขอทั้งหมด",tr:"Toplam İstekler",uk:"Всього запитів"},"ui.projectStats.sessionCount":{zh:"会话轮次",en:"Sessions","zh-TW":"會話輪次",ko:"세션 수",ja:"セッション数",de:"Sitzungen",es:"Sesiones",fr:"Sessions",it:"Sessioni",da:"Sessioner",pl:"Sesje",ru:"Сессий",ar:"الجلسات",no:"Sesjoner","pt-BR":"Sessões",th:"เซสชัน",tr:"Oturumlar",uk:"Сесії"},"ui.projectStats.totalFiles":{zh:"会话文件数",en:"Session Files","zh-TW":"會話檔案數",ko:"세션 파일 수",ja:"セッションファイル数",de:"Sitzungsdateien",es:"Archivos de sesión",fr:"Fichiers de session",it:"File di sessione",da:"Sessionsfiler",pl:"Pliki sesji",ru:"Файлов сессий",ar:"ملفات الجلسات",no:"Sesjonsfiler","pt-BR":"Arquivos de sessão",th:"ไฟล์เซสชัน",tr:"Oturum Dosyaları",uk:"Файли сесій"},"ui.projectStats.modelUsage":{zh:"模型使用统计",en:"Model Usage","zh-TW":"模型使用統計",ko:"모델 사용 통계",ja:"モデル使用統計",de:"Modellnutzung",es:"Uso de modelos",fr:"Utilisation des modèles",it:"Utilizzo modelli",da:"Modelbrug",pl:"Użycie modeli",ru:"Использование моделей",ar:"استخدام النماذج",no:"Modellbruk","pt-BR":"Uso de modelos",th:"การใช้โมเดล",tr:"Model Kullanımı",uk:"Використання моделей"},"ui.projectStats.noData":{zh:"暂无统计数据",en:"No stats available","zh-TW":"暫無統計資料",ko:"통계 데이터 없음",ja:"統計データなし",de:"Keine Statistiken verfügbar",es:"Sin estadísticas disponibles",fr:"Aucune statistique disponible",it:"Nessuna statistica disponibile",da:"Ingen statistik tilgængelig",pl:"Brak dostępnych statystyk",ru:"Статистика недоступна",ar:"لا توجد إحصائيات متاحة",no:"Ingen statistikk tilgjengelig","pt-BR":"Sem estatísticas disponíveis",th:"ไม่มีข้อมูลสถิติ",tr:"İstatistik mevcut değil",uk:"Статистика недоступна"},"ui.projectStats.updatedAt":{zh:"更新于 {time}",en:"Updated at {time}","zh-TW":"更新於 {time}",ko:"{time}에 업데이트됨",ja:"{time} に更新",de:"Aktualisiert um {time}",es:"Actualizado a las {time}",fr:"Mis à jour à {time}",it:"Aggiornato alle {time}",da:"Opdateret {time}",pl:"Zaktualizowano {time}",ru:"Обновлено в {time}",ar:"تم التحديث في {time}",no:"Oppdatert {time}","pt-BR":"Atualizado em {time}",th:"อัปเดตเมื่อ {time}",tr:"{time} tarihinde güncellendi",uk:"Оновлено о {time}"},"ui.update.completed":{zh:"已更新到 v{version},下次启动生效",en:"Updated to v{version}, effective on next restart","zh-TW":"已更新到 v{version},下次啟動生效",ko:"v{version}으로 업데이트됨, 다음 시작 시 적용",ja:"v{version} に更新済み、次回起動時に有効",de:"Auf v{version} aktualisiert, wirksam beim nächsten Neustart",es:"Actualizado a v{version}, efectivo en el próximo reinicio",fr:"Mis à jour vers v{version}, effectif au prochain redémarrage",it:"Aggiornato a v{version}, effettivo al prossimo riavvio",da:"Opdateret til v{version}, træder i kraft ved næste genstart",pl:"Zaktualizowano do v{version}, obowiązuje po ponownym uruchomieniu",ru:"Обновлено до v{version}, вступит в силу при следующем запуске",ar:"تم التحديث إلى v{version}، سيسري عند إعادة التشغيل التالية",no:"Oppdatert til v{version}, trer i kraft ved neste omstart","pt-BR":"Atualizado para v{version}, efetivo na próxima reinicialização",th:"อัปเดตเป็น v{version} แล้ว มีผลเมื่อเริ่มใหม่",tr:"v{version} sürümüne güncellendi, bir sonraki başlatmada geçerli",uk:"Оновлено до v{version}, набуде чинності при наступному запуску"},"ui.update.majorAvailable":{zh:"新大版本 v{version} 可用,请手动更新: npm i -g cc-viewer@latest",en:"Major version v{version} available, update manually: npm i -g cc-viewer@latest","zh-TW":"新大版本 v{version} 可用,請手動更新: npm i -g cc-viewer@latest",ko:"새 메이저 버전 v{version} 사용 가능, 수동 업데이트: npm i -g cc-viewer@latest",ja:"メジャーバージョン v{version} が利用可能、手動更新: npm i -g cc-viewer@latest",de:"Hauptversion v{version} verfügbar, manuell aktualisieren: npm i -g cc-viewer@latest",es:"Versión principal v{version} disponible, actualice: npm i -g cc-viewer@latest",fr:"Version majeure v{version} disponible, mettez à jour : npm i -g cc-viewer@latest",it:"Versione principale v{version} disponibile, aggiornare: npm i -g cc-viewer@latest",da:"Hovedversion v{version} tilgængelig, opdater manuelt: npm i -g cc-viewer@latest",pl:"Główna wersja v{version} dostępna, zaktualizuj: npm i -g cc-viewer@latest",ru:"Доступна основная версия v{version}, обновите: npm i -g cc-viewer@latest",ar:"الإصدار الرئيسي v{version} متاح، حدّث يدويًا: npm i -g cc-viewer@latest",no:"Hovedversjon v{version} tilgjengelig, oppdater manuelt: npm i -g cc-viewer@latest","pt-BR":"Versão principal v{version} disponível, atualize: npm i -g cc-viewer@latest",th:"เวอร์ชันหลัก v{version} พร้อมใช้งาน อัปเดตด้วยตนเอง: npm i -g cc-viewer@latest",tr:"Ana sürüm v{version} mevcut, manuel güncelleyin: npm i -g cc-viewer@latest",uk:"Доступна основна версія v{version}, оновіть: npm i -g cc-viewer@latest"},"ui.chatInput.placeholder":{zh:"输入消息发送给 Claude...",en:"Type a message to Claude...","zh-TW":"輸入訊息傳送給 Claude...",ko:"Claude에게 메시지를 입력하세요...",ja:"Claudeにメッセージを入力...",de:"Nachricht an Claude eingeben...",es:"Escribe un mensaje para Claude...",fr:"Tapez un message pour Claude...",it:"Scrivi un messaggio per Claude...",da:"Skriv en besked til Claude...",pl:"Wpisz wiadomość do Claude...",ru:"Введите сообщение для Claude...",ar:"اكتب رسالة إلى Claude...",no:"Skriv en melding til Claude...","pt-BR":"Digite uma mensagem para o Claude...",th:"พิมพ์ข้อความถึง Claude...",tr:"Claude'a mesaj yazın...",uk:"Введіть повідомлення для Claude..."},"ui.chatInput.send":{zh:"发送",en:"Send","zh-TW":"傳送",ko:"보내기",ja:"送信",de:"Senden",es:"Enviar",fr:"Envoyer",it:"Invia",da:"Send",pl:"Wyślij",ru:"Отправить",ar:"إرسال",no:"Send","pt-BR":"Enviar",th:"ส่ง",tr:"Gönder",uk:"Надіслати"},"ui.chatInput.hintEnter":{zh:"Enter 发送,Shift+Enter 换行",en:"Enter to send, Shift+Enter for new line","zh-TW":"Enter 傳送,Shift+Enter 換行",ko:"Enter로 전송, Shift+Enter로 줄바꿈",ja:"Enterで送信、Shift+Enterで改行",de:"Enter zum Senden, Shift+Enter für neue Zeile",es:"Enter para enviar, Shift+Enter para nueva línea",fr:"Entrée pour envoyer, Shift+Entrée pour nouvelle ligne",it:"Invio per inviare, Shift+Invio per nuova riga",da:"Enter for at sende, Shift+Enter for ny linje",pl:"Enter aby wysłać, Shift+Enter nowa linia",ru:"Enter — отправить, Shift+Enter — новая строка",ar:"Enter للإرسال، Shift+Enter لسطر جديد",no:"Enter for å sende, Shift+Enter for ny linje","pt-BR":"Enter para enviar, Shift+Enter para nova linha",th:"Enter ส่ง, Shift+Enter ขึ้นบรรทัดใหม่",tr:"Enter gönder, Shift+Enter yeni satır",uk:"Enter — надіслати, Shift+Enter — новий рядок"},"ui.chatInput.hintTab":{zh:"Tab 接受建议",en:"Tab to accept suggestion","zh-TW":"Tab 接受建議",ko:"Tab으로 제안 수락",ja:"Tabで提案を受け入れ",de:"Tab zum Akzeptieren des Vorschlags",es:"Tab para aceptar sugerencia",fr:"Tab pour accepter la suggestion",it:"Tab per accettare il suggerimento",da:"Tab for at acceptere forslag",pl:"Tab aby zaakceptować sugestię",ru:"Tab — принять предложение",ar:"Tab لقبول الاقتراح",no:"Tab for å akseptere forslag","pt-BR":"Tab para aceitar sugestão",th:"Tab ยอมรับคำแนะนำ",tr:"Tab ile öneriyi kabul et",uk:"Tab — прийняти пропозицію"},"ui.terminal":{zh:"终端",en:"Terminal","zh-TW":"終端機",ko:"터미널",ja:"ターミナル",de:"Terminal",es:"Terminal",fr:"Terminal",it:"Terminale",da:"Terminal",pl:"Terminal",ru:"Терминал",ar:"طرفية",no:"Terminal","pt-BR":"Terminal",th:"เทอร์มินัล",tr:"Terminal",uk:"Термінал"},"ui.stickyBottom":{zh:"保持吸底",en:"Stick to bottom","zh-TW":"保持置底",ko:"하단 고정",ja:"下部に固定",de:"Unten fixieren",es:"Fijar al fondo",fr:"Fixer en bas",it:"Fissa in basso",da:"Fastgør i bunden",pl:"Przypnij na dole",ru:"Прикрепить внизу",ar:"تثبيت في الأسفل",no:"Fest til bunnen","pt-BR":"Fixar no fundo",th:"ตรึงด้านล่าง",tr:"Alta sabitle",uk:"Закріпити внизу"},"ui.askQuestion":{zh:"提问",en:"Question","zh-TW":"提問",ko:"질문",ja:"質問",de:"Frage",es:"Pregunta",fr:"Question",it:"Domanda",da:"Spørgsmål",pl:"Pytanie",ru:"Вопрос",ar:"سؤال",no:"Spørsmål","pt-BR":"Pergunta",th:"คำถาม",tr:"Soru",uk:"Питання"},"ui.enterPlanMode":{zh:"进入计划模式",en:"Entering Plan Mode","zh-TW":"進入計劃模式",ko:"계획 모드 진입",ja:"プランモードに入ります",de:"Planungsmodus wird gestartet",es:"Entrando en modo de planificación",fr:"Entrée en mode planification",it:"Accesso alla modalità pianificazione",da:"Går ind i planlægningstilstand",pl:"Wchodzenie w tryb planowania",ru:"Вход в режим планирования",ar:"الدخول في وضع التخطيط",no:"Går inn i planleggingsmodus","pt-BR":"Entrando no modo de planejamento",th:"เข้าสู่โหมดวางแผน",tr:"Plan moduna giriliyor",uk:"Вхід у режим планування"},"ui.exitPlanMode":{zh:"计划就绪,等待审批",en:"Plan Ready for Approval","zh-TW":"計劃就緒,等待審批",ko:"계획 준비 완료, 승인 대기",ja:"プラン準備完了、承認待ち",de:"Plan bereit zur Genehmigung",es:"Plan listo para aprobación",fr:"Plan prêt pour approbation",it:"Piano pronto per l'approvazione",da:"Plan klar til godkendelse",pl:"Plan gotowy do zatwierdzenia",ru:"План готов к утверждению",ar:"الخطة جاهزة للموافقة",no:"Plan klar for godkjenning","pt-BR":"Plano pronto para aprovação",th:"แผนพร้อมรอการอนุมัติ",tr:"Plan onaya hazır",uk:"План готовий до затвердження"},"ui.allowedPrompts":{zh:"请求的权限",en:"Requested Permissions","zh-TW":"請求的權限",ko:"요청된 권한",ja:"要求された権限",de:"Angeforderte Berechtigungen",es:"Permisos solicitados",fr:"Permissions demandées",it:"Permessi richiesti",da:"Anmodede tilladelser",pl:"Żądane uprawnienia",ru:"Запрошенные разрешения",ar:"الأذونات المطلوبة",no:"Forespurte tillatelser","pt-BR":"Permissões solicitadas",th:"สิทธิ์ที่ร้องขอ",tr:"İstenen izinler",uk:"Запитані дозволи"},"ui.context.systemPrompt":{zh:"系统提示词",en:"System Prompt","zh-TW":"系統提示詞",ko:"시스템 프롬프트",ja:"システムプロンプト",de:"System-Prompt",es:"Prompt del sistema",fr:"Prompt système",it:"Prompt di sistema",da:"System-prompt",pl:"Prompt systemowy",ru:"Системный промпт",ar:"موجه النظام",no:"System-prompt","pt-BR":"Prompt do sistema",th:"System Prompt",tr:"Sistem Prompt'u",uk:"Системний промпт"},"ui.context.messages":{zh:"消息",en:"Messages","zh-TW":"訊息",ko:"메시지",ja:"メッセージ",de:"Nachrichten",es:"Mensajes",fr:"Messages",it:"Messaggi",da:"Beskeder",pl:"Wiadomości",ru:"Сообщения",ar:"الرسائل",no:"Meldinger","pt-BR":"Mensagens",th:"ข้อความ",tr:"Mesajlar",uk:"Повідомлення"},"ui.context.tools":{zh:"工具",en:"Tools","zh-TW":"工具",ko:"도구",ja:"ツール",de:"Tools",es:"Herramientas",fr:"Outils",it:"Strumenti",da:"Værktøjer",pl:"Narzędzia",ru:"Инструменты",ar:"الأدوات",no:"Verktøy","pt-BR":"Ferramentas",th:"เครื่องมือ",tr:"Araçlar",uk:"Інструменти"},"ui.context.noData":{zh:"暂无 Context 数据",en:"No context data","zh-TW":"暫無 Context 資料",ko:"컨텍스트 데이터 없음",ja:"コンテキストデータなし",de:"Keine Kontextdaten",es:"Sin datos de contexto",fr:"Aucune donnée de contexte",it:"Nessun dato di contesto",da:"Ingen kontekstdata",pl:"Brak danych kontekstu",ru:"Нет данных контекста",ar:"لا توجد بيانات سياق",no:"Ingen kontekstdata","pt-BR":"Sem dados de contexto",th:"ไม่มีข้อมูล Context",tr:"Bağlam verisi yok",uk:"Немає даних контексту"},"ui.context.noFields":{zh:"Request body 中未找到 messages / system / tools",en:"No messages / system / tools found in request body","zh-TW":"Request body 中未找到 messages / system / tools",ko:"요청 본문에서 messages / system / tools를 찾을 수 없음",ja:"リクエストボディに messages / system / tools が見つかりません",de:"Keine messages / system / tools im Request-Body gefunden",es:"No se encontraron messages / system / tools en el cuerpo de la solicitud",fr:"Aucun messages / system / tools dans le corps de la requête",it:"Nessun messages / system / tools trovato nel corpo della richiesta",da:"Ingen messages / system / tools fundet i request body",pl:"Nie znaleziono messages / system / tools w treści żądania",ru:"В теле запроса не найдено messages / system / tools",ar:"لم يتم العثور على messages / system / tools في جسم الطلب",no:"Ingen messages / system / tools funnet i request body","pt-BR":"Nenhum messages / system / tools encontrado no corpo da requisição",th:"ไม่พบ messages / system / tools ใน request body",tr:"İstek gövdesinde messages / system / tools bulunamadı",uk:"У тілі запиту не знайдено messages / system / tools"},"ui.context.selectPrompt":{zh:"请在左侧选择一个要查看的内容",en:"Select an item on the left to view","zh-TW":"請在左側選擇一個要查看的內容",ko:"왼쪽에서 항목을 선택하세요",ja:"左側から項目を選択してください",de:"Wählen Sie links einen Eintrag aus",es:"Seleccione un elemento a la izquierda",fr:"Sélectionnez un élément à gauche",it:"Seleziona un elemento a sinistra",da:"Vælg et element til venstre",pl:"Wybierz element po lewej stronie",ru:"Выберите элемент слева",ar:"اختر عنصرًا على اليسار",no:"Velg et element til venstre","pt-BR":"Selecione um item à esquerda",th:"เลือกรายการทางซ้าย",tr:"Soldan bir öğe seçin",uk:"Виберіть елемент ліворуч"},"ui.context.history":{zh:"历史",en:"History","zh-TW":"歷史",ko:"기록",ja:"履歴",de:"Verlauf",es:"Historial",fr:"Historique",it:"Cronologia",da:"Historik",pl:"Historia",ru:"История",ar:"التاريخ",no:"Historikk","pt-BR":"Histórico",th:"ประวัติ",tr:"Geçmiş",uk:"Історія"},"ui.context.currentTurn":{zh:"当前轮次",en:"Current Turn","zh-TW":"當前輪次",ko:"현재 턴",ja:"現在のターン",de:"Aktueller Durchgang",es:"Turno actual",fr:"Tour actuel",it:"Turno corrente",da:"Aktuel tur",pl:"Bieżąca tura",ru:"Текущий ход",ar:"الدور الحالي",no:"Gjeldende tur","pt-BR":"Turno atual",th:"รอบปัจจุบัน",tr:"Mevcut tur",uk:"Поточний хід"},"ui.context.historyTurnNoTime":{zh:"历史轮次 {n}",en:"Turn {n}","zh-TW":"歷史輪次 {n}",ko:"턴 {n}",ja:"ターン {n}",de:"Runde {n}",es:"Turno {n}",fr:"Tour {n}",it:"Turno {n}",da:"Tur {n}",pl:"Tura {n}",ru:"Ход {n}",ar:"الدور {n}",no:"Tur {n}","pt-BR":"Turno {n}",th:"รอบ {n}",tr:"Tur {n}",uk:"Хід {n}"}},Vl={};for(const[e,t]of Object.entries(fW))for(const[n,r]of Object.entries(t))Vl[n]||(Vl[n]={}),Vl[n][e]=r;let pb="zh";const gh={zh:"zh","zh-cn":"zh","zh-hans":"zh","zh-tw":"zh-TW","zh-hk":"zh-TW","zh-hant":"zh-TW",en:"en",ko:"ko",de:"de",es:"es",fr:"fr",it:"it",da:"da",ja:"ja",pl:"pl",ru:"ru",ar:"ar",no:"no",nb:"no",nn:"no",pt:"pt-BR","pt-br":"pt-BR",th:"th",tr:"tr",uk:"uk"};function mW(e){if(!e)return"en";const t=e.toLowerCase().replace(/_/g,"-");if(gh[t])return gh[t];const n=t.split("-")[0];return gh[n]?gh[n]:"en"}function pW(){return typeof navigator<"u"&&navigator.language?mW(navigator.language):"en"}function gb(e){pb=Vl[e]?e:"en"}function ec(){return pb}function Ce(e,t){var r;let n=((r=Vl[pb])==null?void 0:r[e])||Vl.en[e]||e;if(t)for(const[i,o]of Object.entries(t))n=n.replaceAll(`{${i}}`,o);return n}gb(pW());function vb(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Wa=vb();function N3(e){Wa=e}var Ca={exec:()=>null};function pn(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,o)=>{let a=typeof o=="string"?o:o.source;return a=a.replace(fi.caret,"$1"),n=n.replace(i,a),r},getRegex:()=>new RegExp(n,t)};return r}var gW=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),fi={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},vW=/^(?:[ \t]*(?:\n|$))+/,yW=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,bW=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Zu=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,_W=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,yb=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,M3=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,z3=pn(M3).replace(/bull/g,yb).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),SW=pn(M3).replace(/bull/g,yb).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),bb=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,CW=/^[^\n]+/,_b=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,wW=pn(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",_b).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),xW=pn(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,yb).getRegex(),ym="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Sb=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,EW=pn("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Sb).replace("tag",ym).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),j3=pn(bb).replace("hr",Zu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ym).getRegex(),kW=pn(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",j3).getRegex(),Cb={blockquote:kW,code:yW,def:wW,fences:bW,heading:_W,hr:Zu,html:EW,lheading:z3,list:xW,newline:vW,paragraph:j3,table:Ca,text:CW},cx=pn("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Zu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ym).getRegex(),$W={...Cb,lheading:SW,table:cx,paragraph:pn(bb).replace("hr",Zu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",cx).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ym).getRegex()},RW={...Cb,html:pn(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Sb).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ca,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:pn(bb).replace("hr",Zu).replace("heading",` *#{1,6} *[^
494
+ ]`).replace("lheading",z3).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},TW=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,PW=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,B3=/^( {2,}|\\)\n(?!\s*$)/,OW=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,bm=/[\p{P}\p{S}]/u,wb=/[\s\p{P}\p{S}]/u,L3=/[^\s\p{P}\p{S}]/u,IW=pn(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,wb).getRegex(),A3=/(?!~)[\p{P}\p{S}]/u,NW=/(?!~)[\s\p{P}\p{S}]/u,MW=/(?:[^\s\p{P}\p{S}]|~)/u,D3=/(?![*_])[\p{P}\p{S}]/u,zW=/(?![*_])[\s\p{P}\p{S}]/u,jW=/(?:[^\s\p{P}\p{S}]|[*_])/u,BW=pn(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",gW?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),H3=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,LW=pn(H3,"u").replace(/punct/g,bm).getRegex(),AW=pn(H3,"u").replace(/punct/g,A3).getRegex(),F3="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",DW=pn(F3,"gu").replace(/notPunctSpace/g,L3).replace(/punctSpace/g,wb).replace(/punct/g,bm).getRegex(),HW=pn(F3,"gu").replace(/notPunctSpace/g,MW).replace(/punctSpace/g,NW).replace(/punct/g,A3).getRegex(),FW=pn("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,L3).replace(/punctSpace/g,wb).replace(/punct/g,bm).getRegex(),WW=pn(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,D3).getRegex(),VW="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",UW=pn(VW,"gu").replace(/notPunctSpace/g,jW).replace(/punctSpace/g,zW).replace(/punct/g,D3).getRegex(),qW=pn(/\\(punct)/,"gu").replace(/punct/g,bm).getRegex(),KW=pn(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),GW=pn(Sb).replace("(?:-->|$)","-->").getRegex(),XW=pn("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",GW).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Sf=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,YW=pn(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Sf).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),W3=pn(/^!?\[(label)\]\[(ref)\]/).replace("label",Sf).replace("ref",_b).getRegex(),V3=pn(/^!?\[(ref)\](?:\[\])?/).replace("ref",_b).getRegex(),JW=pn("reflink|nolink(?!\\()","g").replace("reflink",W3).replace("nolink",V3).getRegex(),ux=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,xb={_backpedal:Ca,anyPunctuation:qW,autolink:KW,blockSkip:BW,br:B3,code:PW,del:Ca,delLDelim:Ca,delRDelim:Ca,emStrongLDelim:LW,emStrongRDelimAst:DW,emStrongRDelimUnd:FW,escape:TW,link:YW,nolink:V3,punctuation:IW,reflink:W3,reflinkSearch:JW,tag:XW,text:OW,url:Ca},QW={...xb,link:pn(/^!?\[(label)\]\((.*?)\)/).replace("label",Sf).getRegex(),reflink:pn(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Sf).getRegex()},_0={...xb,emStrongRDelimAst:HW,emStrongLDelim:AW,delLDelim:WW,delRDelim:UW,url:pn(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ux).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:pn(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ux).getRegex()},ZW={..._0,br:pn(B3).replace("{2,}","*").getRegex(),text:pn(_0.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},vh={normal:Cb,gfm:$W,pedantic:RW},Vc={normal:xb,gfm:_0,breaks:ZW,pedantic:QW},eV={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},dx=e=>eV[e];function Do(e,t){if(t){if(fi.escapeTest.test(e))return e.replace(fi.escapeReplace,dx)}else if(fi.escapeTestNoEncode.test(e))return e.replace(fi.escapeReplaceNoEncode,dx);return e}function hx(e){try{e=encodeURI(e).replace(fi.percentDecode,"%")}catch{return null}return e}function fx(e,t){var o;let n=e.replace(fi.findPipe,(a,c,u)=>{let d=!1,f=c;for(;--f>=0&&u[f]==="\\";)d=!d;return d?"|":" |"}),r=n.split(fi.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!((o=r.at(-1))!=null&&o.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(fi.slashPipe,"|");return r}function Uc(e,t,n){let r=e.length;if(r===0)return"";let i=0;for(;i<r&&e.charAt(r-i-1)===t;)i++;return e.slice(0,r-i)}function tV(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function nV(e,t=0){let n=t,r="";for(let i of e)if(i===" "){let o=4-n%4;r+=" ".repeat(o),n+=o}else r+=i,n++;return r}function mx(e,t,n,r,i){let o=t.href,a=t.title||null,c=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let u={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:o,title:a,text:c,tokens:r.inlineTokens(c)};return r.state.inLink=!1,u}function rV(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
495
+ `).map(o=>{let a=o.match(n.other.beginningSpace);if(a===null)return o;let[c]=a;return c.length>=i.length?o.slice(i.length):o}).join(`
496
+ `)}var Cf=class{constructor(e){kt(this,"options");kt(this,"rules");kt(this,"lexer");this.options=e||Wa}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Uc(n,`
497
+ `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=rV(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=Uc(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Uc(t[0],`
498
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Uc(t[0],`
499
+ `).split(`
500
+ `),r="",i="",o=[];for(;n.length>0;){let a=!1,c=[],u;for(u=0;u<n.length;u++)if(this.rules.other.blockquoteStart.test(n[u]))c.push(n[u]),a=!0;else if(!a)c.push(n[u]);else break;n=n.slice(u);let d=c.join(`
501
+ `),f=d.replace(this.rules.other.blockquoteSetextReplace,`
502
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
503
+ ${d}`:d,i=i?`${i}
504
+ ${f}`:f;let m=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,o,!0),this.lexer.state.top=m,n.length===0)break;let g=o.at(-1);if((g==null?void 0:g.type)==="code")break;if((g==null?void 0:g.type)==="blockquote"){let v=g,y=v.raw+`
505
+ `+n.join(`
506
+ `),S=this.blockquote(y);o[o.length-1]=S,r=r.substring(0,r.length-v.raw.length)+S.raw,i=i.substring(0,i.length-v.text.length)+S.text;break}else if((g==null?void 0:g.type)==="list"){let v=g,y=v.raw+`
507
+ `+n.join(`
508
+ `),S=this.list(y);o[o.length-1]=S,r=r.substring(0,r.length-g.raw.length)+S.raw,i=i.substring(0,i.length-v.raw.length)+S.raw,n=y.substring(o.at(-1).raw.length).split(`
509
+ `);continue}}return{type:"blockquote",raw:r,tokens:o,text:i}}}list(e){var n,r;let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim(),o=i.length>1,a={type:"list",raw:"",ordered:o,start:o?+i.slice(0,-1):"",loose:!1,items:[]};i=o?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=o?i:"[*+-]");let c=this.rules.other.listItemRegex(i),u=!1;for(;e;){let f=!1,m="",g="";if(!(t=c.exec(e))||this.rules.block.hr.test(e))break;m=t[0],e=e.substring(m.length);let v=nV(t[2].split(`
510
+ `,1)[0],t[1].length),y=e.split(`
511
+ `,1)[0],S=!v.trim(),_=0;if(this.options.pedantic?(_=2,g=v.trimStart()):S?_=t[1].length+1:(_=v.search(this.rules.other.nonSpaceChar),_=_>4?1:_,g=v.slice(_),_+=t[1].length),S&&this.rules.other.blankLine.test(y)&&(m+=y+`
512
+ `,e=e.substring(y.length+1),f=!0),!f){let C=this.rules.other.nextBulletRegex(_),E=this.rules.other.hrRegex(_),k=this.rules.other.fencesBeginRegex(_),$=this.rules.other.headingBeginRegex(_),P=this.rules.other.htmlBeginRegex(_),T=this.rules.other.blockquoteBeginRegex(_);for(;e;){let O=e.split(`
513
+ `,1)[0],N;if(y=O,this.options.pedantic?(y=y.replace(this.rules.other.listReplaceNesting," "),N=y):N=y.replace(this.rules.other.tabCharGlobal," "),k.test(y)||$.test(y)||P.test(y)||T.test(y)||C.test(y)||E.test(y))break;if(N.search(this.rules.other.nonSpaceChar)>=_||!y.trim())g+=`
514
+ `+N.slice(_);else{if(S||v.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||k.test(v)||$.test(v)||E.test(v))break;g+=`
515
+ `+y}S=!y.trim(),m+=O+`
516
+ `,e=e.substring(O.length+1),v=N.slice(_)}}a.loose||(u?a.loose=!0:this.rules.other.doubleBlankLine.test(m)&&(u=!0)),a.items.push({type:"list_item",raw:m,task:!!this.options.gfm&&this.rules.other.listIsTask.test(g),loose:!1,text:g,tokens:[]}),a.raw+=m}let d=a.items.at(-1);if(d)d.raw=d.raw.trimEnd(),d.text=d.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let f of a.items){if(this.lexer.state.top=!1,f.tokens=this.lexer.blockTokens(f.text,[]),f.task){if(f.text=f.text.replace(this.rules.other.listReplaceTask,""),((n=f.tokens[0])==null?void 0:n.type)==="text"||((r=f.tokens[0])==null?void 0:r.type)==="paragraph"){f.tokens[0].raw=f.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),f.tokens[0].text=f.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let g=this.lexer.inlineQueue.length-1;g>=0;g--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[g].src)){this.lexer.inlineQueue[g].src=this.lexer.inlineQueue[g].src.replace(this.rules.other.listReplaceTask,"");break}}let m=this.rules.other.listTaskCheckbox.exec(f.raw);if(m){let g={type:"checkbox",raw:m[0]+" ",checked:m[0]!=="[ ]"};f.checked=g.checked,a.loose?f.tokens[0]&&["paragraph","text"].includes(f.tokens[0].type)&&"tokens"in f.tokens[0]&&f.tokens[0].tokens?(f.tokens[0].raw=g.raw+f.tokens[0].raw,f.tokens[0].text=g.raw+f.tokens[0].text,f.tokens[0].tokens.unshift(g)):f.tokens.unshift({type:"paragraph",raw:g.raw,text:g.raw,tokens:[g]}):f.tokens.unshift(g)}}if(!a.loose){let m=f.tokens.filter(v=>v.type==="space"),g=m.length>0&&m.some(v=>this.rules.other.anyLine.test(v.raw));a.loose=g}}if(a.loose)for(let f of a.items){f.loose=!0;for(let m of f.tokens)m.type==="text"&&(m.type="paragraph")}return a}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:i}}}table(e){var a;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=fx(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(a=t[3])!=null&&a.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
517
+ `):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let c of r)this.rules.other.tableAlignRight.test(c)?o.align.push("right"):this.rules.other.tableAlignCenter.test(c)?o.align.push("center"):this.rules.other.tableAlignLeft.test(c)?o.align.push("left"):o.align.push(null);for(let c=0;c<n.length;c++)o.header.push({text:n[c],tokens:this.lexer.inline(n[c]),header:!0,align:o.align[c]});for(let c of i)o.rows.push(fx(c,o.header.length).map((u,d)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:o.align[d]})));return o}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
518
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let o=Uc(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{let o=tV(t[2],"()");if(o===-2)return;if(o>-1){let a=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(r);o&&(r=o[1],i=o[3])}else i=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),mx(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[r.toLowerCase()];if(!i){let o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return mx(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,o,a,c=i,u=0,d=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+i);(r=d.exec(t))!=null;){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(a=[...o].length,r[3]||r[4]){c+=a;continue}else if((r[5]||r[6])&&i%3&&!((i+a)%3)){u+=a;continue}if(c-=a,c>0)continue;a=Math.min(a,a+c+u);let f=[...r[0]][0].length,m=e.slice(0,i+r.index+f+a);if(Math.min(i,a)%2){let v=m.slice(1,-1);return{type:"em",raw:m,text:v,tokens:this.lexer.inlineTokens(v)}}let g=m.slice(2,-2);return{type:"strong",raw:m,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,o,a,c=i,u=this.rules.inline.delRDelim;for(u.lastIndex=0,t=t.slice(-1*e.length+i);(r=u.exec(t))!=null;){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o||(a=[...o].length,a!==i))continue;if(r[3]||r[4]){c+=a;continue}if(c-=a,c>0)continue;a=Math.min(a,a+c);let d=[...r[0]][0].length,f=e.slice(0,i+r.index+d+a),m=f.slice(i,-i);return{type:"del",raw:f,text:m,tokens:this.lexer.inlineTokens(m)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let r,i;if(t[2]==="@")r=t[0],i="mailto:"+r;else{let o;do o=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(o!==t[0]);r=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},ko=class S0{constructor(t){kt(this,"tokens");kt(this,"options");kt(this,"state");kt(this,"inlineQueue");kt(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Wa,this.options.tokenizer=this.options.tokenizer||new Cf,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:fi,block:vh.normal,inline:Vc.normal};this.options.pedantic?(n.block=vh.pedantic,n.inline=Vc.pedantic):this.options.gfm&&(n.block=vh.gfm,this.options.breaks?n.inline=Vc.breaks:n.inline=Vc.gfm),this.tokenizer.rules=n}static get rules(){return{block:vh,inline:Vc}}static lex(t,n){return new S0(n).lex(t)}static lexInline(t,n){return new S0(n).inlineTokens(t)}lex(t){t=t.replace(fi.carriageReturn,`
519
+ `),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){var i,o,a;for(this.options.pedantic&&(t=t.replace(fi.tabCharGlobal," ").replace(fi.spaceLine,""));t;){let c;if((o=(i=this.options.extensions)==null?void 0:i.block)!=null&&o.some(d=>(c=d.call({lexer:this},t,n))?(t=t.substring(c.raw.length),n.push(c),!0):!1))continue;if(c=this.tokenizer.space(t)){t=t.substring(c.raw.length);let d=n.at(-1);c.raw.length===1&&d!==void 0?d.raw+=`
520
+ `:n.push(c);continue}if(c=this.tokenizer.code(t)){t=t.substring(c.raw.length);let d=n.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
521
+ `)?"":`
522
+ `)+c.raw,d.text+=`
523
+ `+c.text,this.inlineQueue.at(-1).src=d.text):n.push(c);continue}if(c=this.tokenizer.fences(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.heading(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.hr(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.blockquote(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.list(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.html(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.def(t)){t=t.substring(c.raw.length);let d=n.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
524
+ `)?"":`
525
+ `)+c.raw,d.text+=`
526
+ `+c.raw,this.inlineQueue.at(-1).src=d.text):this.tokens.links[c.tag]||(this.tokens.links[c.tag]={href:c.href,title:c.title},n.push(c));continue}if(c=this.tokenizer.table(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.lheading(t)){t=t.substring(c.raw.length),n.push(c);continue}let u=t;if((a=this.options.extensions)!=null&&a.startBlock){let d=1/0,f=t.slice(1),m;this.options.extensions.startBlock.forEach(g=>{m=g.call({lexer:this},f),typeof m=="number"&&m>=0&&(d=Math.min(d,m))}),d<1/0&&d>=0&&(u=t.substring(0,d+1))}if(this.state.top&&(c=this.tokenizer.paragraph(u))){let d=n.at(-1);r&&(d==null?void 0:d.type)==="paragraph"?(d.raw+=(d.raw.endsWith(`
527
+ `)?"":`
528
+ `)+c.raw,d.text+=`
529
+ `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):n.push(c),r=u.length!==t.length,t=t.substring(c.raw.length);continue}if(c=this.tokenizer.text(t)){t=t.substring(c.raw.length);let d=n.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
530
+ `)?"":`
531
+ `)+c.raw,d.text+=`
532
+ `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):n.push(c);continue}if(t){let d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var u,d,f,m,g;let r=t,i=null;if(this.tokens.links){let v=Object.keys(this.tokens.links);if(v.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)v.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)o=i[2]?i[2].length:0,r=r.slice(0,i.index+o)+"["+"a".repeat(i[0].length-o-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=((d=(u=this.options.hooks)==null?void 0:u.emStrongMask)==null?void 0:d.call({lexer:this},r))??r;let a=!1,c="";for(;t;){a||(c=""),a=!1;let v;if((m=(f=this.options.extensions)==null?void 0:f.inline)!=null&&m.some(S=>(v=S.call({lexer:this},t,n))?(t=t.substring(v.raw.length),n.push(v),!0):!1))continue;if(v=this.tokenizer.escape(t)){t=t.substring(v.raw.length),n.push(v);continue}if(v=this.tokenizer.tag(t)){t=t.substring(v.raw.length),n.push(v);continue}if(v=this.tokenizer.link(t)){t=t.substring(v.raw.length),n.push(v);continue}if(v=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(v.raw.length);let S=n.at(-1);v.type==="text"&&(S==null?void 0:S.type)==="text"?(S.raw+=v.raw,S.text+=v.text):n.push(v);continue}if(v=this.tokenizer.emStrong(t,r,c)){t=t.substring(v.raw.length),n.push(v);continue}if(v=this.tokenizer.codespan(t)){t=t.substring(v.raw.length),n.push(v);continue}if(v=this.tokenizer.br(t)){t=t.substring(v.raw.length),n.push(v);continue}if(v=this.tokenizer.del(t,r,c)){t=t.substring(v.raw.length),n.push(v);continue}if(v=this.tokenizer.autolink(t)){t=t.substring(v.raw.length),n.push(v);continue}if(!this.state.inLink&&(v=this.tokenizer.url(t))){t=t.substring(v.raw.length),n.push(v);continue}let y=t;if((g=this.options.extensions)!=null&&g.startInline){let S=1/0,_=t.slice(1),C;this.options.extensions.startInline.forEach(E=>{C=E.call({lexer:this},_),typeof C=="number"&&C>=0&&(S=Math.min(S,C))}),S<1/0&&S>=0&&(y=t.substring(0,S+1))}if(v=this.tokenizer.inlineText(y)){t=t.substring(v.raw.length),v.raw.slice(-1)!=="_"&&(c=v.raw.slice(-1)),a=!0;let S=n.at(-1);(S==null?void 0:S.type)==="text"?(S.raw+=v.raw,S.text+=v.text):n.push(v);continue}if(t){let S="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(S);break}else throw new Error(S)}}return n}},wf=class{constructor(e){kt(this,"options");kt(this,"parser");this.options=e||Wa}space(e){return""}code({text:e,lang:t,escaped:n}){var o;let r=(o=(t||"").match(fi.notSpaceStart))==null?void 0:o[0],i=e.replace(fi.endingNewline,"")+`
533
+ `;return r?'<pre><code class="language-'+Do(r)+'">'+(n?i:Do(i,!0))+`</code></pre>
534
+ `:"<pre><code>"+(n?i:Do(i,!0))+`</code></pre>
535
+ `}blockquote({tokens:e}){return`<blockquote>
536
+ ${this.parser.parse(e)}</blockquote>
537
+ `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
538
+ `}hr(e){return`<hr>
539
+ `}list(e){let t=e.ordered,n=e.start,r="";for(let a=0;a<e.items.length;a++){let c=e.items[a];r+=this.listitem(c)}let i=t?"ol":"ul",o=t&&n!==1?' start="'+n+'"':"";return"<"+i+o+`>
540
+ `+r+"</"+i+`>
541
+ `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
542
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
543
+ `}table(e){let t="",n="";for(let i=0;i<e.header.length;i++)n+=this.tablecell(e.header[i]);t+=this.tablerow({text:n});let r="";for(let i=0;i<e.rows.length;i++){let o=e.rows[i];n="";for(let a=0;a<o.length;a++)n+=this.tablecell(o[a]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
544
+ <thead>
545
+ `+t+`</thead>
546
+ `+r+`</table>
547
+ `}tablerow({text:e}){return`<tr>
548
+ ${e}</tr>
549
+ `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
550
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Do(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=hx(e);if(i===null)return r;e=i;let o='<a href="'+e+'"';return t&&(o+=' title="'+Do(t)+'"'),o+=">"+r+"</a>",o}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=hx(e);if(i===null)return Do(n);e=i;let o=`<img src="${e}" alt="${Do(n)}"`;return t&&(o+=` title="${Do(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Do(e.text)}},Eb=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},$o=class C0{constructor(t){kt(this,"options");kt(this,"renderer");kt(this,"textRenderer");this.options=t||Wa,this.options.renderer=this.options.renderer||new wf,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Eb}static parse(t,n){return new C0(n).parse(t)}static parseInline(t,n){return new C0(n).parseInline(t)}parse(t){var r,i;let n="";for(let o=0;o<t.length;o++){let a=t[o];if((i=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&i[a.type]){let u=a,d=this.options.extensions.renderers[u.type].call({parser:this},u);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(u.type)){n+=d||"";continue}}let c=a;switch(c.type){case"space":{n+=this.renderer.space(c);break}case"hr":{n+=this.renderer.hr(c);break}case"heading":{n+=this.renderer.heading(c);break}case"code":{n+=this.renderer.code(c);break}case"table":{n+=this.renderer.table(c);break}case"blockquote":{n+=this.renderer.blockquote(c);break}case"list":{n+=this.renderer.list(c);break}case"checkbox":{n+=this.renderer.checkbox(c);break}case"html":{n+=this.renderer.html(c);break}case"def":{n+=this.renderer.def(c);break}case"paragraph":{n+=this.renderer.paragraph(c);break}case"text":{n+=this.renderer.text(c);break}default:{let u='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return n}parseInline(t,n=this.renderer){var i,o;let r="";for(let a=0;a<t.length;a++){let c=t[a];if((o=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&o[c.type]){let d=this.options.extensions.renderers[c.type].call({parser:this},c);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){r+=d||"";continue}}let u=c;switch(u.type){case"escape":{r+=n.text(u);break}case"html":{r+=n.html(u);break}case"link":{r+=n.link(u);break}case"image":{r+=n.image(u);break}case"checkbox":{r+=n.checkbox(u);break}case"strong":{r+=n.strong(u);break}case"em":{r+=n.em(u);break}case"codespan":{r+=n.codespan(u);break}case"br":{r+=n.br(u);break}case"del":{r+=n.del(u);break}case"text":{r+=n.text(u);break}default:{let d='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return r}},kh,iu=(kh=class{constructor(e){kt(this,"options");kt(this,"block");this.options=e||Wa}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?ko.lex:ko.lexInline}provideParser(){return this.block?$o.parse:$o.parseInline}},kt(kh,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),kt(kh,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),kh),iV=class{constructor(...t){kt(this,"defaults",vb());kt(this,"options",this.setOptions);kt(this,"parse",this.parseMarkdown(!0));kt(this,"parseInline",this.parseMarkdown(!1));kt(this,"Parser",$o);kt(this,"Renderer",wf);kt(this,"TextRenderer",Eb);kt(this,"Lexer",ko);kt(this,"Tokenizer",Cf);kt(this,"Hooks",iu);this.use(...t)}walkTokens(t,n){var i,o;let r=[];for(let a of t)switch(r=r.concat(n.call(this,a)),a.type){case"table":{let c=a;for(let u of c.header)r=r.concat(this.walkTokens(u.tokens,n));for(let u of c.rows)for(let d of u)r=r.concat(this.walkTokens(d.tokens,n));break}case"list":{let c=a;r=r.concat(this.walkTokens(c.items,n));break}default:{let c=a;(o=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&o[c.type]?this.defaults.extensions.childTokens[c.type].forEach(u=>{let d=c[u].flat(1/0);r=r.concat(this.walkTokens(d,n))}):c.tokens&&(r=r.concat(this.walkTokens(c.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let a=n.renderers[o.name];a?n.renderers[o.name]=function(...c){let u=o.renderer.apply(this,c);return u===!1&&(u=a.apply(this,c)),u}:n.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=n[o.level];a?a.unshift(o.tokenizer):n[o.level]=[o.tokenizer],o.start&&(o.level==="block"?n.startBlock?n.startBlock.push(o.start):n.startBlock=[o.start]:o.level==="inline"&&(n.startInline?n.startInline.push(o.start):n.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(n.childTokens[o.name]=o.childTokens)}),i.extensions=n),r.renderer){let o=this.defaults.renderer||new wf(this.defaults);for(let a in r.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let c=a,u=r.renderer[c],d=o[c];o[c]=(...f)=>{let m=u.apply(o,f);return m===!1&&(m=d.apply(o,f)),m||""}}i.renderer=o}if(r.tokenizer){let o=this.defaults.tokenizer||new Cf(this.defaults);for(let a in r.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let c=a,u=r.tokenizer[c],d=o[c];o[c]=(...f)=>{let m=u.apply(o,f);return m===!1&&(m=d.apply(o,f)),m}}i.tokenizer=o}if(r.hooks){let o=this.defaults.hooks||new iu;for(let a in r.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let c=a,u=r.hooks[c],d=o[c];iu.passThroughHooks.has(a)?o[c]=f=>{if(this.defaults.async&&iu.passThroughHooksRespectAsync.has(a))return(async()=>{let g=await u.call(o,f);return d.call(o,g)})();let m=u.call(o,f);return d.call(o,m)}:o[c]=(...f)=>{if(this.defaults.async)return(async()=>{let g=await u.apply(o,f);return g===!1&&(g=await d.apply(o,f)),g})();let m=u.apply(o,f);return m===!1&&(m=d.apply(o,f)),m}}i.hooks=o}if(r.walkTokens){let o=this.defaults.walkTokens,a=r.walkTokens;i.walkTokens=function(c){let u=[];return u.push(a.call(this,c)),o&&(u=u.concat(o.call(this,c))),u}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return ko.lex(t,n??this.defaults)}parser(t,n){return $o.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let i={...r},o={...this.defaults,...i},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&i.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let c=o.hooks?await o.hooks.preprocess(n):n,u=await(o.hooks?await o.hooks.provideLexer():t?ko.lex:ko.lexInline)(c,o),d=o.hooks?await o.hooks.processAllTokens(u):u;o.walkTokens&&await Promise.all(this.walkTokens(d,o.walkTokens));let f=await(o.hooks?await o.hooks.provideParser():t?$o.parse:$o.parseInline)(d,o);return o.hooks?await o.hooks.postprocess(f):f})().catch(a);try{o.hooks&&(n=o.hooks.preprocess(n));let c=(o.hooks?o.hooks.provideLexer():t?ko.lex:ko.lexInline)(n,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let u=(o.hooks?o.hooks.provideParser():t?$o.parse:$o.parseInline)(c,o);return o.hooks&&(u=o.hooks.postprocess(u)),u}catch(c){return a(c)}}}onError(t,n){return r=>{if(r.message+=`
551
+ Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+Do(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}},ja=new iV;function On(e,t){return ja.parse(e,t)}On.options=On.setOptions=function(e){return ja.setOptions(e),On.defaults=ja.defaults,N3(On.defaults),On};On.getDefaults=vb;On.defaults=Wa;On.use=function(...e){return ja.use(...e),On.defaults=ja.defaults,N3(On.defaults),On};On.walkTokens=function(e,t){return ja.walkTokens(e,t)};On.parseInline=ja.parseInline;On.Parser=$o;On.parser=$o.parse;On.Renderer=wf;On.TextRenderer=Eb;On.Lexer=ko;On.lexer=ko.lex;On.Tokenizer=Cf;On.Hooks=iu;On.parse=On;On.options;On.setOptions;On.use;On.walkTokens;On.parseInline;$o.parse;ko.lex;function Ro(e){if(!e)return"";try{return On.parse(e,{breaks:!0})}catch{return vf(e)}}const oV="_helpBtn_cvsqb_1",sV="_modalBody_cvsqb_24",aV="_spinWrap_cvsqb_54",Xg={helpBtn:oV,modalBody:sV,spinWrap:aV},lV=new Set(["Tool-Bash","Tool-Read","Tool-Edit","Tool-Write","Tool-Glob","Tool-Grep","Tool-NotebookEdit","Tool-WebFetch","Tool-WebSearch","Tool-Task","Tool-Agent","Tool-TaskOutput","Tool-TaskStop","Tool-TaskCreate","Tool-TaskGet","Tool-TaskUpdate","Tool-TaskList","Tool-EnterPlanMode","Tool-ExitPlanMode","Tool-AskUserQuestion","Tool-Skill","Tool-getDiagnostics","Tool-executeCode","MainAgent","Tools","CacheRebuild","BodyDiffJSON","TranslateContextPollution"]);function Ul({doc:e}){const[t,n]=h.useState(!1),[r,i]=h.useState(!1),[o,a]=h.useState(""),[c,u]=h.useState("");if(!e||!lV.has(e))return null;const d=h.useCallback(async()=>{n(!0),i(!0),a(""),u(e);const f=ec();let m=null;try{const g=await fetch(`/api/concept?lang=${f}&doc=${encodeURIComponent(e)}`);g.ok&&(m=await g.text())}catch{}if(m){const g=m.match(/^#\s+(.+)/m);g&&u(g[1]),a(Ro(m))}else a("<p>Document not found.</p>");i(!1)},[e]);return x.jsxs(x.Fragment,{children:[x.jsx("span",{className:Xg.helpBtn,onClick:f=>{f.stopPropagation(),d()},children:"?"}),x.jsx(Oi,{title:c,open:t,onCancel:()=>n(!1),footer:null,width:640,styles:{header:{background:"#1a1a1a"},body:{background:"#111",padding:"16px 24px 24px"},content:{background:"#1a1a1a",padding:"12px 20px"}},children:r?x.jsx("div",{className:Xg.spinWrap,children:x.jsx(Na,{})}):x.jsx("div",{className:Xg.modalBody,dangerouslySetInnerHTML:{__html:o}})})]})}const cV="_headerBar_17fk3_2",uV="_titleText_17fk3_11",dV="_logoImage_17fk3_17",hV="_titleArrow_17fk3_25",fV="_tokenStatsTag_17fk3_31",mV="_tokenStatsIcon_17fk3_39",pV="_liveTag_17fk3_44",gV="_liveDotWrap_17fk3_48",vV="_liveSpinner_17fk3_70",yV="_liveSpinnerDiag_17fk3_75",bV="_inflightList_17fk3_90",_V="_inflightItem_17fk3_94",SV="_inflightTag_17fk3_106",CV="_inflightModel_17fk3_112",wV="_inflightTime_17fk3_117",xV="_liveTagHistory_17fk3_123",EV="_liveTagText_17fk3_129",kV="_countdownStrong_17fk3_134",$V="_langSelector_17fk3_139",RV="_settingsBtn_17fk3_150",TV="_qrcodeSection_17fk3_166",PV="_qrcodeUrl_17fk3_175",OV="_settingsItem_17fk3_184",IV="_settingsLabel_17fk3_191",NV="_tokenStatsEmpty_17fk3_196",MV="_tokenStatsContainer_17fk3_203",zV="_tokenStatsColumn_17fk3_209",jV="_toolStatsColumn_17fk3_213",BV="_modelCard_17fk3_218",LV="_modelCardSpaced_17fk3_225 _modelCard_17fk3_218",AV="_modelName_17fk3_231",DV="_statsTable_17fk3_241",HV="_th_17fk3_246",FV="_td_17fk3_256",WV="_label_17fk3_265",VV="_rowBorder_17fk3_275",UV="_rebuildTotalRow_17fk3_287",qV="_promptExportBar_17fk3_296",KV="_promptScrollArea_17fk3_300",GV="_promptEmpty_17fk3_305",XV="_promptTimestamp_17fk3_311",YV="_textPromptCard_17fk3_319",JV="_preText_17fk3_328",QV="_systemCollapse_17fk3_338",ZV="_systemLabel_17fk3_345",eU="_preSys_17fk3_350",tU="_promptTextarea_17fk3_360",nU="_projectStatsCenter_17fk3_376",rU="_projectStatsEmpty_17fk3_382",iU="_projectStatsContent_17fk3_389",oU="_projectStatsUpdated_17fk3_395",sU="_projectStatsSummary_17fk3_401",aU="_projectStatCard_17fk3_407",lU="_projectStatValue_17fk3_415",cU="_projectStatLabel_17fk3_423",uU="_projectStatsSection_17fk3_429",dU="_projectStatsSectionTitle_17fk3_435",hU="_projectStatsModelCard_17fk3_443",fU="_projectStatsModelHeader_17fk3_450",mU="_projectStatsModelName_17fk3_459",pU="_projectStatsModelCount_17fk3_465",ge={headerBar:cV,titleText:uV,logoImage:dV,titleArrow:hV,tokenStatsTag:fV,tokenStatsIcon:mV,liveTag:pV,liveDotWrap:gV,liveSpinner:vV,liveSpinnerDiag:yV,inflightList:bV,inflightItem:_V,inflightTag:SV,inflightModel:CV,inflightTime:wV,liveTagHistory:xV,liveTagText:EV,countdownStrong:kV,langSelector:$V,settingsBtn:RV,qrcodeSection:TV,qrcodeUrl:PV,settingsItem:OV,settingsLabel:IV,tokenStatsEmpty:NV,tokenStatsContainer:MV,tokenStatsColumn:zV,toolStatsColumn:jV,modelCard:BV,modelCardSpaced:LV,modelName:AV,statsTable:DV,th:HV,td:FV,label:WV,rowBorder:VV,rebuildTotalRow:UV,promptExportBar:qV,promptScrollArea:KV,promptEmpty:GV,promptTimestamp:XV,textPromptCard:YV,preText:JV,systemCollapse:QV,systemLabel:ZV,preSys:eU,promptTextarea:tU,projectStatsCenter:nU,projectStatsEmpty:rU,projectStatsContent:iU,projectStatsUpdated:oU,projectStatsSummary:sU,projectStatCard:aU,projectStatValue:lU,projectStatLabel:cU,projectStatsSection:uU,projectStatsSectionTitle:dU,projectStatsModelCard:hU,projectStatsModelHeader:fU,projectStatsModelName:mU,projectStatsModelCount:pU},px=[{value:"zh",short:"zh",label:"简体中文"},{value:"en",short:"en",label:"English"},{value:"zh-TW",short:"zh-TW",label:"繁體中文"},{value:"ko",short:"ko",label:"한국어"},{value:"ja",short:"ja",label:"日本語"},{value:"de",short:"de",label:"Deutsch"},{value:"es",short:"es",label:"Español"},{value:"fr",short:"fr",label:"Français"},{value:"it",short:"it",label:"Italiano"},{value:"da",short:"da",label:"Dansk"},{value:"pl",short:"pl",label:"Polski"},{value:"ru",short:"ru",label:"Русский"},{value:"ar",short:"ar",label:"العربية"},{value:"no",short:"no",label:"Norsk"},{value:"pt-BR",short:"pt-BR",label:"Português (Brasil)"},{value:"th",short:"th",label:"ไทย"},{value:"tr",short:"tr",label:"Türkçe"},{value:"uk",short:"uk",label:"Українська"}],{Text:gU}=No,Dl=class Dl extends J.Component{constructor(n){super(n);kt(this,"handleShowPrompts",()=>{this.setState({promptModalVisible:!0,promptData:this.extractUserPrompts()})});kt(this,"handleExportPromptsTxt",()=>{const n=this.state.promptData;if(!n||n.length===0)return;const r=[];for(const c of n){const u=[],d=c.timestamp?new Date(c.timestamp).toLocaleString():"";d&&u.push(`${d}:
552
+ `);const f=(c.segments||[]).filter(m=>m.type==="text").map(m=>m.content);f.length>0&&u.push(f.join(`
553
+ `)),r.push(u.join(`
554
+ `))}if(r.length===0)return;const i=new Blob([r.join(`
555
+
556
+
557
+
558
+ `)],{type:"text/plain;charset=utf-8"}),o=URL.createObjectURL(i),a=document.createElement("a");a.href=o,a.download=`user-prompts-${new Date().toISOString().slice(0,10)}.txt`,a.click(),URL.revokeObjectURL(o)});kt(this,"handleShowProjectStats",()=>{this.setState({projectStatsVisible:!0,projectStatsLoading:!0}),fetch("/api/project-stats").then(n=>{if(!n.ok)throw new Error("not found");return n.json()}).then(n=>this.setState({projectStats:n,projectStatsLoading:!1})).catch(()=>this.setState({projectStats:null,projectStatsLoading:!1}))});this.state={countdownText:"",promptModalVisible:!1,promptData:[],promptViewMode:"original",settingsDrawerVisible:!1,globalSettingsVisible:!1,projectStatsVisible:!1,projectStats:null,projectStatsLoading:!1,localUrl:""},this._rafId=null,this._expiredTimer=null,this.updateCountdown=this.updateCountdown.bind(this)}componentDidMount(){this.startCountdown(),fetch("/api/local-url").then(n=>n.json()).then(n=>{n.url&&this.setState({localUrl:n.url})}).catch(()=>{})}componentDidUpdate(n){n.cacheExpireAt!==this.props.cacheExpireAt&&this.startCountdown()}componentWillUnmount(){this._rafId&&cancelAnimationFrame(this._rafId),this._expiredTimer&&clearTimeout(this._expiredTimer)}startCountdown(){if(this._rafId&&cancelAnimationFrame(this._rafId),this._expiredTimer&&clearTimeout(this._expiredTimer),!this.props.cacheExpireAt){this.setState({countdownText:""});return}this._rafId=requestAnimationFrame(this.updateCountdown)}updateCountdown(){const{cacheExpireAt:n}=this.props;if(!n){this.setState({countdownText:""});return}const r=Math.max(0,n-Date.now());if(r<=0){this.setState({countdownText:Ce("ui.cacheExpired")}),this._expiredTimer=setTimeout(()=>{this.setState({countdownText:""})},5e3);return}const i=Math.ceil(r/1e3);let o;if(i>=60){const a=Math.floor(i/60),c=i%60;o=Ce("ui.minuteSecond",{m:a,s:String(c).padStart(2,"0")})}else o=Ce("ui.second",{s:i});this.setState({countdownText:o}),this._rafId=requestAnimationFrame(this.updateCountdown)}static parseSegments(n){const r=[],i=/<([a-zA-Z_][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>/g;let o=0,a;for(;(a=i.exec(n))!==null;){const u=n.slice(o,a.index).trim();u&&r.push({type:"text",content:u});const d=a[1];if(o=a.index+a[0].length,Dl.COMMAND_TAGS.has(d))continue;const f=new RegExp(`^<${d}(?:\\s[^>]*)?>([\\s\\S]*)<\\/${d}>$`),m=a[0].match(f),g=m?m[1].trim():a[0].trim();r.push({type:"system",content:g,label:d})}const c=n.slice(o).trim();return c&&r.push({type:"text",content:c}),r}static extractUserTexts(n){const r=[],i=[];let o=null;for(const a of n)if(a.role==="user"){if(typeof a.content=="string"){const c=a.content.trim();if(!c)continue;if(!fb(c)){if(/^Implement the following plan:/i.test(c))continue;r.push(c),i.push(c)}}else if(Array.isArray(a.content)){const{commands:c,textBlocks:u}=P3(a.content);c.length>0&&(o=c[c.length-1]);const d=[];for(const m of u)/^Implement the following plan:/i.test((m.text||"").trim())||d.push(m.text.trim());const f=a.content.filter(m=>{var g;return m.type==="text"&&((g=m.text)==null?void 0:g.trim())}).map(m=>m.text.trim());d.length>0&&(r.push(d.join(`
559
+ `)),i.push(f.join(`
560
+ `)))}}return{userMsgs:r,fullTexts:i,slashCmd:o}}extractUserPrompts(){var c;const{requests:n=[]}=this.props,r=[],i=new Set;let o=null;const a=n.filter(u=>qr(u));for(let u=0;u<a.length;u++){const d=a[u],f=((c=d.body)==null?void 0:c.messages)||[],m=d.timestamp||"",{userMsgs:g,fullTexts:v,slashCmd:y}=Dl.extractUserTexts(f);y&&y!=="/compact"&&y!==o&&r.push({type:"prompt",segments:[{type:"text",content:y}],timestamp:m}),o=y;for(let S=0;S<g.length;S++){const _=g[S];if(i.has(_))continue;i.add(_);const C=v[S]||_;r.push({type:"prompt",segments:Dl.parseSegments(C),timestamp:m})}}return r}renderTokenStats(){const{requests:n=[]}=this.props,r=nW(n),i=Object.keys(r),o=iW(n),a=oW(n);if(i.length===0&&o.length===0)return x.jsx("div",{className:ge.tokenStatsEmpty,children:"暂无 token 数据"});const c=x.jsx("div",{className:ge.tokenStatsColumn,children:i.map(m=>{const g=r[m],v=g.input+g.cacheCreation+g.cacheRead,y=v>0?(g.cacheRead/v*100).toFixed(1):"0.0";return x.jsxs("div",{className:i.length>1?ge.modelCardSpaced:ge.modelCard,children:[x.jsx("div",{className:ge.modelName,children:m}),x.jsx("table",{className:ge.statsTable,children:x.jsxs("tbody",{children:[x.jsxs("tr",{children:[x.jsx("td",{className:ge.label,children:"Token"}),x.jsx("td",{className:ge.th,children:"input"}),x.jsx("td",{className:ge.th,children:"output"})]}),x.jsxs("tr",{className:ge.rowBorder,children:[x.jsx("td",{className:ge.label}),x.jsx("td",{className:ge.td,children:dr(v)}),x.jsx("td",{className:ge.td,children:dr(g.output)})]}),x.jsxs("tr",{children:[x.jsx("td",{className:ge.label,children:"Cache"}),x.jsx("td",{className:ge.th,children:"create"}),x.jsx("td",{className:ge.th,children:"read"})]}),x.jsxs("tr",{className:ge.rowBorder,children:[x.jsx("td",{className:ge.label}),x.jsx("td",{className:ge.td,children:dr(g.cacheCreation)}),x.jsx("td",{className:ge.td,children:dr(g.cacheRead)})]}),x.jsxs("tr",{children:[x.jsx("td",{className:ge.label,children:Ce("ui.hitRate")}),x.jsxs("td",{colSpan:2,className:ge.td,children:[y,"%"]})]})]})})]},m)})}),u=this.renderCacheRebuildStats(),d=o.length>0?x.jsx("div",{className:ge.toolStatsColumn,children:x.jsxs("div",{className:ge.modelCard,children:[x.jsx("div",{className:ge.modelName,children:Ce("ui.toolUsageStats")}),x.jsxs("table",{className:ge.statsTable,children:[x.jsx("thead",{children:x.jsxs("tr",{children:[x.jsx("td",{className:ge.th,style:{textAlign:"left"},children:"Tool"}),x.jsx("td",{className:ge.th,children:Ce("ui.cacheRebuild.count")})]})}),x.jsxs("tbody",{children:[o.map(([m,g])=>x.jsxs("tr",{className:ge.rowBorder,children:[x.jsxs("td",{className:ge.label,children:[m," ",x.jsx(Ul,{doc:`Tool-${m}`})]}),x.jsx("td",{className:ge.td,children:g})]},m)),o.length>1&&x.jsxs("tr",{className:ge.rebuildTotalRow,children:[x.jsx("td",{className:ge.label,children:"Total"}),x.jsx("td",{className:ge.td,children:o.reduce((m,g)=>m+g[1],0)})]})]})]})]})}):null,f=a.length>0?x.jsx("div",{className:ge.toolStatsColumn,children:x.jsxs("div",{className:ge.modelCard,children:[x.jsx("div",{className:ge.modelName,children:Ce("ui.skillUsageStats")}),x.jsxs("table",{className:ge.statsTable,children:[x.jsx("thead",{children:x.jsxs("tr",{children:[x.jsx("td",{className:ge.th,style:{textAlign:"left"},children:"Skill"}),x.jsx("td",{className:ge.th,children:Ce("ui.cacheRebuild.count")})]})}),x.jsxs("tbody",{children:[a.map(([m,g])=>x.jsxs("tr",{className:ge.rowBorder,children:[x.jsx("td",{className:ge.label,children:m}),x.jsx("td",{className:ge.td,children:g})]},m)),a.length>1&&x.jsxs("tr",{className:ge.rebuildTotalRow,children:[x.jsx("td",{className:ge.label,children:"Total"}),x.jsx("td",{className:ge.td,children:a.reduce((m,g)=>m+g[1],0)})]})]})]})]})}):null;return x.jsxs("div",{className:ge.tokenStatsContainer,children:[c,u,d,f]})}renderCacheRebuildStats(){const{requests:n=[]}=this.props,r=rW(n),i=["ttl","system_change","tools_change","model_change","msg_truncated","msg_modified","key_change"],o={ttl:"ttl",system_change:"systemChange",tools_change:"toolsChange",model_change:"modelChange",msg_truncated:"msgTruncated",msg_modified:"msgModified",key_change:"keyChange"},a=i.filter(v=>r[v].count>0),c=a.reduce((v,y)=>v+r[y].count,0),u=a.reduce((v,y)=>v+r[y].cacheCreate,0),d={};for(let v=0;v<n.length;v++){const y=za(n[v],n[v+1]);if(y.type==="SubAgent"){const S=y.subType||"Other";d[S]=(d[S]||0)+1}}const f=Object.entries(d).sort((v,y)=>y[1]-v[1]),m=a.length>0,g=f.length>0;return!m&&!g?null:x.jsxs("div",{className:ge.toolStatsColumn,children:[m&&x.jsxs("div",{className:g?ge.modelCardSpaced:ge.modelCard,children:[x.jsxs("div",{className:ge.modelName,children:["MainAgent",x.jsx(Ul,{doc:"MainAgent"})," ",Ce("ui.cacheRebuildStats"),x.jsx(Ul,{doc:"CacheRebuild"})]}),x.jsxs("table",{className:ge.statsTable,children:[x.jsx("thead",{children:x.jsxs("tr",{children:[x.jsx("td",{className:ge.th,style:{textAlign:"left"},children:Ce("ui.cacheRebuild.reason")}),x.jsx("td",{className:ge.th,children:Ce("ui.cacheRebuild.count")}),x.jsx("td",{className:ge.th,children:Ce("ui.cacheRebuild.cacheCreate")})]})}),x.jsxs("tbody",{children:[a.map(v=>x.jsxs("tr",{className:ge.rowBorder,children:[x.jsx("td",{className:ge.label,children:Ce(`ui.cacheRebuild.${o[v]}`)}),x.jsx("td",{className:ge.td,children:r[v].count}),x.jsx("td",{className:ge.td,children:dr(r[v].cacheCreate)})]},v)),a.length>1&&x.jsxs("tr",{className:ge.rebuildTotalRow,children:[x.jsx("td",{className:ge.label,children:"Total"}),x.jsx("td",{className:ge.td,children:c}),x.jsx("td",{className:ge.td,children:dr(u)})]})]})]})]}),g&&x.jsxs("div",{className:ge.modelCard,children:[x.jsx("div",{className:ge.modelName,children:Ce("ui.subAgentStats")}),x.jsxs("table",{className:ge.statsTable,children:[x.jsx("thead",{children:x.jsxs("tr",{children:[x.jsx("td",{className:ge.th,style:{textAlign:"left"},children:"SubAgent"}),x.jsx("td",{className:ge.th,children:Ce("ui.cacheRebuild.count")})]})}),x.jsxs("tbody",{children:[f.map(([v,y])=>x.jsxs("tr",{className:ge.rowBorder,children:[x.jsx("td",{className:ge.label,children:v}),x.jsx("td",{className:ge.td,children:y})]},v)),f.length>1&&x.jsxs("tr",{className:ge.rebuildTotalRow,children:[x.jsx("td",{className:ge.label,children:"Total"}),x.jsx("td",{className:ge.td,children:f.reduce((v,y)=>v+y[1],0)})]})]})]})]})]})}renderTextPrompt(n){return x.jsx("div",{className:ge.textPromptCard,children:n.segments.map((r,i)=>r.type==="text"?x.jsx("pre",{className:ge.preText,children:r.content},i):x.jsx(eu,{size:"small",className:ge.systemCollapse,items:[{key:`sys-${i}`,label:x.jsx("span",{className:ge.systemLabel,children:r.label}),children:x.jsx("pre",{className:ge.preSys,children:r.content})}]},i))})}renderOriginalPrompt(n){const r=n.segments.filter(i=>i.type==="text");return r.length===0?null:x.jsx("div",{className:ge.textPromptCard,children:r.map((i,o)=>x.jsx("pre",{className:ge.preText,children:i.content},o))})}buildTextModeContent(){const{promptData:n}=this.state,r=[];for(const i of n){const o=(i.segments||[]).filter(a=>a.type==="text").map(a=>a.content);o.length>0&&r.push(o.join(`
561
+ `))}return r.join(`
562
+
563
+
564
+ `)}renderProjectStatsContent(){const{projectStats:n,projectStatsLoading:r}=this.state;if(r)return x.jsx("div",{className:ge.projectStatsCenter,children:x.jsx(Na,{})});if(!n)return x.jsx("div",{className:ge.projectStatsEmpty,children:Ce("ui.projectStats.noData")});const{summary:i,models:o,updatedAt:a}=n;o&&Object.entries(o).sort((d,f)=>f[1]-d[1]);const c={};if(n.files){for(const d of Object.values(n.files))if(d.models)for(const[f,m]of Object.entries(d.models))c[f]||(c[f]={input:0,output:0,cacheRead:0,cacheCreation:0,count:0}),c[f].input+=m.input_tokens||0,c[f].output+=m.output_tokens||0,c[f].cacheRead+=m.cache_read_input_tokens||0,c[f].cacheCreation+=m.cache_creation_input_tokens||0,c[f].count+=m.count||0}const u=Object.entries(c).sort((d,f)=>f[1].count-d[1].count);return x.jsxs("div",{className:ge.projectStatsContent,children:[a&&x.jsx("div",{className:ge.projectStatsUpdated,children:Ce("ui.projectStats.updatedAt",{time:new Date(a).toLocaleString()})}),x.jsxs("div",{className:ge.projectStatsSummary,children:[x.jsxs("div",{className:ge.projectStatCard,children:[x.jsx("div",{className:ge.projectStatValue,children:(i==null?void 0:i.requestCount)??0}),x.jsx("div",{className:ge.projectStatLabel,children:Ce("ui.projectStats.totalRequests")})]}),x.jsxs("div",{className:ge.projectStatCard,children:[x.jsx("div",{className:ge.projectStatValue,children:(i==null?void 0:i.sessionCount)??0}),x.jsx("div",{className:ge.projectStatLabel,children:Ce("ui.projectStats.sessionCount")})]}),x.jsxs("div",{className:ge.projectStatCard,children:[x.jsx("div",{className:ge.projectStatValue,children:(i==null?void 0:i.fileCount)??0}),x.jsx("div",{className:ge.projectStatLabel,children:Ce("ui.projectStats.totalFiles")})]}),x.jsxs("div",{className:ge.projectStatCard,children:[x.jsx("div",{className:ge.projectStatValue,children:dr(i==null?void 0:i.input_tokens)}),x.jsx("div",{className:ge.projectStatLabel,children:"Input Tokens"})]}),x.jsxs("div",{className:ge.projectStatCard,children:[x.jsx("div",{className:ge.projectStatValue,children:dr(i==null?void 0:i.output_tokens)}),x.jsx("div",{className:ge.projectStatLabel,children:"Output Tokens"})]})]}),u.length>0&&x.jsxs("div",{className:ge.projectStatsSection,children:[x.jsx("div",{className:ge.projectStatsSectionTitle,children:Ce("ui.projectStats.modelUsage")}),u.map(([d,f])=>{const m=f.input+f.cacheRead+f.cacheCreation,g=m>0?(f.cacheRead/m*100).toFixed(1):"0.0";return x.jsxs("div",{className:ge.projectStatsModelCard,children:[x.jsxs("div",{className:ge.projectStatsModelHeader,children:[x.jsx("span",{className:ge.projectStatsModelName,children:d}),x.jsxs("span",{className:ge.projectStatsModelCount,children:[f.count," reqs"]})]}),x.jsx("table",{className:ge.statsTable,children:x.jsxs("tbody",{children:[x.jsxs("tr",{children:[x.jsx("td",{className:ge.label,children:"Token"}),x.jsx("td",{className:ge.th,children:"input"}),x.jsx("td",{className:ge.th,children:"output"})]}),x.jsxs("tr",{className:ge.rowBorder,children:[x.jsx("td",{className:ge.label}),x.jsx("td",{className:ge.td,children:dr(m)}),x.jsx("td",{className:ge.td,children:dr(f.output)})]}),x.jsxs("tr",{children:[x.jsx("td",{className:ge.label,children:"Cache"}),x.jsx("td",{className:ge.th,children:"create"}),x.jsx("td",{className:ge.th,children:"read"})]}),x.jsxs("tr",{className:ge.rowBorder,children:[x.jsx("td",{className:ge.label}),x.jsx("td",{className:ge.td,children:dr(f.cacheCreation)}),x.jsx("td",{className:ge.td,children:dr(f.cacheRead)})]}),x.jsxs("tr",{children:[x.jsx("td",{className:ge.label,children:Ce("ui.hitRate")}),x.jsxs("td",{colSpan:2,className:ge.td,children:[g,"%"]})]})]})})]},d)})]})]})}render(){var L;const{requestCount:n,requests:r=[],viewMode:i,cacheType:o,onToggleViewMode:a,onImportLocalLogs:c,onLangChange:u,isLocalLog:d,localLogFile:f,projectName:m,collapseToolResults:g,onCollapseToolResultsChange:v,expandThinking:y,onExpandThinkingChange:S,expandDiff:_,onExpandDiffChange:C,filterIrrelevant:E,onFilterIrrelevantChange:k,updateInfo:$,onDismissUpdate:P,cliMode:T,terminalVisible:O,onToggleTerminal:N}=this.props,{countdownText:I}=this.state,z=[{key:"import-local",icon:x.jsx(jF,{}),label:Ce("ui.importLocalLogs"),onClick:c},{key:"export-prompts",icon:x.jsx(NF,{}),label:Ce("ui.exportPrompts"),onClick:this.handleShowPrompts},{type:"divider"},{key:"project-stats",icon:x.jsx(ix,{}),label:Ce("ui.projectStats"),onClick:this.handleShowProjectStats},{key:"global-settings",icon:x.jsx(ox,{}),label:Ce("ui.globalSettings"),onClick:()=>this.setState({globalSettingsVisible:!0})}];return x.jsxs("div",{className:ge.headerBar,children:[x.jsxs(fs,{size:"middle",children:[x.jsx(g0,{menu:{items:z},trigger:["hover"],children:x.jsxs(gU,{strong:!0,className:ge.titleText,children:[x.jsx("img",{src:"/favicon.ico",alt:"Logo",className:ge.logoImage}),"CC-Viewer ",x.jsx(hs,{className:ge.titleArrow})]})}),x.jsx(c0,{content:this.renderTokenStats(),trigger:"hover",placement:"bottomLeft",overlayInnerStyle:{background:"#1e1e1e",border:"1px solid #3a3a3a",borderRadius:8,padding:"8px 8px"},children:x.jsxs(Ui,{className:ge.tokenStatsTag,children:[x.jsx(PF,{className:ge.tokenStatsIcon}),Ce("ui.tokenStats")]})}),(()=>{const j=Date.now(),B=d?[]:(r||[]).filter(q=>!q.response&&j-new Date(q.timestamp).getTime()<3e5),H=B.length>0,W=d?null:H?x.jsxs("svg",{className:ge.liveSpinner,width:"10",height:"10",viewBox:"0 0 10 10",children:[x.jsx("line",{x1:"5",y1:"1",x2:"5",y2:"9",stroke:"#52c41a",strokeWidth:"1.5",strokeLinecap:"round"}),x.jsx("line",{x1:"1",y1:"5",x2:"9",y2:"5",stroke:"#52c41a",strokeWidth:"1.5",strokeLinecap:"round"}),x.jsx("line",{x1:"2.2",y1:"2.2",x2:"7.8",y2:"7.8",stroke:"#52c41a",strokeWidth:"1.5",strokeLinecap:"round",className:ge.liveSpinnerDiag}),x.jsx("line",{x1:"7.8",y1:"2.2",x2:"2.2",y2:"7.8",stroke:"#52c41a",strokeWidth:"1.5",strokeLinecap:"round",className:ge.liveSpinnerDiag})]}):x.jsx(Ky,{status:"processing",color:"green"}),V=!d&&!H,A=W&&x.jsx("span",{className:ge.liveDotWrap,children:V?x.jsx(Xo,{title:Ce("ui.noInflightRequests"),placement:"bottom",children:W}):W}),G=x.jsxs(Ui,{color:d?void 0:"green",className:`${ge.liveTag} ${d?ge.liveTagHistory:""}`,children:[A,x.jsx("span",{className:ge.liveTagText,children:d?Ce("ui.historyLog",{file:f}):Ce("ui.liveMonitoring")+(m?`:${m}`:"")})]});if(H){const q=x.jsx("div",{className:ge.inflightList,children:B.map((D,U)=>{var fe;const Y=za(D),Z=_f(Y.type,Y.subType),ee=((fe=D.body)==null?void 0:fe.model)||"",re=ee.includes("-")?ee.split("-").slice(0,2).join("-"):ee,he=new Date(D.timestamp).toLocaleTimeString("zh-CN");return x.jsxs("div",{className:ge.inflightItem,children:[x.jsx("span",{className:ge.inflightTag,children:Z}),x.jsx("span",{className:ge.inflightModel,children:re}),x.jsx("span",{className:ge.inflightTime,children:he})]},U)})});return x.jsx(c0,{content:q,title:Ce("ui.inflightRequests"),placement:"bottom",children:G})}return G})(),$&&x.jsx(Ui,{color:$.type==="completed"?"green":"orange",closable:!0,onClose:()=>P&&P(),children:$.type==="completed"?Ce("ui.update.completed",{version:$.version}):Ce("ui.update.majorAvailable",{version:$.version})})]}),x.jsxs(fs,{size:"middle",children:[I&&x.jsxs(Ui,{color:I===Ce("ui.cacheExpired")?"red":"green",children:[Ce("ui.cacheCountdown",{type:o?`(${o})`:""}),x.jsx("strong",{className:ge.countdownStrong,children:I})]}),i==="chat"&&x.jsxs("span",{className:ge.settingsBtn,onClick:()=>this.setState({settingsDrawerVisible:!0}),children:[x.jsx(ox,{})," ",Ce("ui.settings")]}),x.jsx(g0,{trigger:["hover"],placement:"bottom",menu:{items:px.map(M=>({key:M.value,label:M.label,style:M.value===ec()?{color:"#3b82f6"}:{}})),onClick:({key:M})=>{gb(M),u&&u()}},children:x.jsx("span",{className:ge.langSelector,children:((L=px.find(M=>M.value===ec()))==null?void 0:L.label)||"简体中文"})}),T&&i==="chat"&&x.jsx(hr,{type:O?"primary":"default",ghost:O,icon:x.jsx(Fh,{}),onClick:N,children:Ce("ui.terminal")}),x.jsx(hr,{type:i==="raw"?"primary":"default",icon:i==="raw"?x.jsx(AF,{}):x.jsx(fu,{}),onClick:a,children:Ce(i==="raw"?"ui.chatMode":"ui.rawMode")})]}),x.jsxs(Oi,{title:`${Ce("ui.userPrompt")} (${this.state.promptData.length}${Ce("ui.promptCountUnit")})`,open:this.state.promptModalVisible,onCancel:()=>this.setState({promptModalVisible:!1}),footer:null,width:700,children:[x.jsx("div",{className:ge.promptExportBar,children:x.jsx(hr,{icon:x.jsx(wF,{}),onClick:this.handleExportPromptsTxt,children:Ce("ui.exportPromptsTxt")})}),x.jsx(sb,{activeKey:this.state.promptViewMode,onChange:M=>this.setState({promptViewMode:M}),size:"small",items:[{key:"original",label:Ce("ui.promptModeOriginal")},{key:"context",label:Ce("ui.promptModeContext")},{key:"text",label:Ce("ui.promptModeText")}]}),this.state.promptViewMode==="text"?x.jsx("textarea",{readOnly:!0,className:ge.promptTextarea,value:this.buildTextModeContent()}):x.jsxs("div",{className:ge.promptScrollArea,children:[this.state.promptData.length===0&&x.jsx("div",{className:ge.promptEmpty,children:Ce("ui.noPrompt")}),this.state.promptData.map((M,j)=>{const B=M.timestamp?new Date(M.timestamp).toLocaleString():Ce("ui.unknownTime");return x.jsxs("div",{children:[x.jsxs("div",{className:ge.promptTimestamp,children:[B,":"]}),this.state.promptViewMode==="original"?this.renderOriginalPrompt(M):this.renderTextPrompt(M)]},j)})]})]}),x.jsxs(Dh,{title:Ce("ui.settings"),placement:"right",width:320,open:this.state.settingsDrawerVisible,onClose:()=>this.setState({settingsDrawerVisible:!1}),children:[this.state.localUrl&&x.jsxs("div",{className:ge.qrcodeSection,children:[x.jsx(T3,{value:this.state.localUrl,size:160,bgColor:"#141414",fgColor:"#d9d9d9",level:"M"}),x.jsx("div",{className:ge.qrcodeUrl,children:this.state.localUrl})]}),x.jsxs("div",{className:ge.settingsItem,children:[x.jsx("span",{className:ge.settingsLabel,children:Ce("ui.collapseToolResults")}),x.jsx(ru,{checked:!!g,onChange:M=>v&&v(M)})]}),x.jsxs("div",{className:ge.settingsItem,children:[x.jsx("span",{className:ge.settingsLabel,children:Ce("ui.expandThinking")}),x.jsx(ru,{checked:!!y,onChange:M=>S&&S(M)})]})]}),x.jsxs(Dh,{title:Ce("ui.globalSettings"),placement:"left",width:400,open:this.state.globalSettingsVisible,onClose:()=>this.setState({globalSettingsVisible:!1}),children:[x.jsxs("div",{className:ge.settingsItem,children:[x.jsx("span",{className:ge.settingsLabel,children:Ce("ui.filterIrrelevant")}),x.jsx(ru,{checked:!!E,onChange:M=>k&&k(M)})]}),x.jsxs("div",{className:ge.settingsItem,children:[x.jsx("span",{className:ge.settingsLabel,children:Ce("ui.expandDiff")}),x.jsx(ru,{checked:!!_,onChange:M=>C&&C(M)})]})]}),x.jsx(Dh,{title:x.jsxs("span",{children:[x.jsx(ix,{style:{marginRight:8}}),Ce("ui.projectStats")]}),placement:"left",width:400,open:this.state.projectStatsVisible,onClose:()=>this.setState({projectStatsVisible:!1}),children:this.renderProjectStatsContent()})]})}};kt(Dl,"COMMAND_TAGS",new Set(["command-name","command-message","command-args","local-command-caveat","local-command-stdout"]));let w0=Dl;const vU="_centerEmpty_ckz8l_1",yU="_scrollContainer_ckz8l_8",bU="_listItem_ckz8l_13",_U="_listItemActive_ckz8l_25",SU="_itemContent_ckz8l_34",CU="_itemHeader_ckz8l_39",wU="_tagNoMargin_ckz8l_47",xU="_modelName_ckz8l_52",EU="_time_ckz8l_56",kU="_detailRow_ckz8l_62",$U="_urlText_ckz8l_69",RU="_duration_ckz8l_78",TU="_statusOk_ckz8l_83",PU="_statusErr_ckz8l_89",OU="_statusDefault_ckz8l_94",IU="_usageBox_ckz8l_99",NU="_cacheDot_ckz8l_109",MU="_cacheDotLoss_ckz8l_118",zU="_cacheDotNormal_ckz8l_123",Jn={centerEmpty:vU,scrollContainer:yU,listItem:bU,listItemActive:_U,itemContent:SU,itemHeader:CU,tagNoMargin:wU,modelName:xU,time:EU,detailRow:kU,urlText:$U,duration:RU,statusOk:TU,statusErr:PU,statusDefault:OU,usageBox:IU,cacheDot:NU,cacheDotLoss:MU,cacheDotNormal:zU};class jU extends J.Component{constructor(t){super(t),this.activeItemRef=J.createRef()}componentDidMount(){this.scrollToSelected(!0)}componentDidUpdate(t){this.props.scrollCenter&&t.selectedIndex!==this.props.selectedIndex?this.scrollToSelected(!0):t.requests!==this.props.requests&&this.scrollToSelected(!1)}scrollToSelected(t){this.activeItemRef.current&&(this.activeItemRef.current.scrollIntoView({block:t?"center":"nearest",behavior:"instant"}),t&&this.props.onScrollDone&&this.props.onScrollDone())}render(){const{requests:t,selectedIndex:n,onSelect:r}=this.props;return t.length===0?x.jsx("div",{className:Jn.centerEmpty,children:x.jsx(Pi,{description:Ce("ui.waitingRequests")})}):x.jsx("div",{className:Jn.scrollContainer,children:x.jsx(Pu,{dataSource:t,size:"small",split:!1,renderItem:(i,o)=>{var $,P,T;const a=new Date(i.timestamp).toLocaleTimeString("zh-CN"),c=o===n,u=i.response&&i.response.status<400,d=i.response&&i.response.status>=400,f=lW(($=i.body)==null?void 0:$.model),m=o+1<t.length?t[o+1]:null,{type:g,subType:v}=za(i,m),y=(T=(P=i.response)==null?void 0:P.body)==null?void 0:T.usage,S=y?(y.input_tokens||0)+(y.cache_read_input_tokens||0)+(y.cache_creation_input_tokens||0):null,_=(y==null?void 0:y.output_tokens)||null,C=(y==null?void 0:y.cache_read_input_tokens)||0,E=(y==null?void 0:y.cache_creation_input_tokens)||0;let k=i.url;try{const O=new URL(i.url);k=O.host+O.pathname}catch{}return x.jsx(Pu.Item,{ref:c?this.activeItemRef:void 0,onClick:()=>r(o),className:`${Jn.listItem} ${c?Jn.listItemActive:""}`,children:x.jsxs("div",{className:Jn.itemContent,children:[x.jsxs("div",{className:Jn.itemHeader,children:[g==="MainAgent"?x.jsx(Ui,{color:"orange",className:Jn.tagNoMargin,children:"MainAgent"}):g==="Plan"?x.jsx(Ui,{className:Jn.tagNoMargin,style:{color:"#a33",borderColor:"#a33",backgroundColor:"#000"},children:_f(g,v)}):g==="Count"||g==="Preflight"?x.jsx(Ui,{className:Jn.tagNoMargin,style:{color:"#666",borderColor:"#444",backgroundColor:"#000"},children:g}):x.jsx(Ui,{className:Jn.tagNoMargin,children:_f(g,v)}),f&&x.jsx("span",{className:Jn.modelName,style:{color:g==="MainAgent"?"#d4822d":"#8c8c8c"},children:f}),x.jsx("span",{className:Jn.time,children:a})]}),x.jsxs("div",{className:Jn.detailRow,children:[x.jsx("span",{className:Jn.urlText,title:i.url,children:k}),i.duration&&x.jsxs("span",{className:Jn.duration,children:[i.duration,"ms"]}),i.response&&x.jsx("span",{className:u?Jn.statusOk:d?Jn.statusErr:Jn.statusDefault,children:i.response.status})]}),y&&x.jsxs("div",{className:Jn.usageBox,children:[x.jsxs("div",{children:["token: output:",dr(_)||0,", input: ",dr(S)||0]}),(C>0||E>0)&&x.jsx("div",{children:(()=>{const O=O3(t,o),N={ttl:"ui.cacheLoss.ttl",system_change:"ui.cacheLoss.systemChange",tools_change:"ui.cacheLoss.toolsChange",model_change:"ui.cacheLoss.modelChange",msg_truncated:"ui.cacheLoss.msgTruncated",msg_modified:"ui.cacheLoss.msgModified",key_change:"ui.cacheLoss.keyChange"};let I;if(O){const L=(O.reasons||[O.reason]).map(M=>Ce(N[M]||N.key_change)).join(`
565
+ `);I=x.jsx(Xo,{title:x.jsx("span",{style:{whiteSpace:"pre-line"},children:L}),children:x.jsx("span",{className:`${Jn.cacheDot} ${Jn.cacheDotLoss}`})})}else I=x.jsx("span",{className:`${Jn.cacheDot} ${Jn.cacheDotNormal}`});return x.jsxs(x.Fragment,{children:["cache",I,": ",C>0?`read:${dr(C)}`:"",C>0&&E>0?", ":"",E>0?`create:${dr(E)}`:""]})})()})]})]})})}})})}}const BU=e=>typeof e=="boolean"||e instanceof Boolean,LU=e=>typeof e=="number"||e instanceof Number,AU=e=>typeof e=="bigint"||e instanceof BigInt,U3=e=>!!e&&e instanceof Date,DU=e=>typeof e=="string"||e instanceof String,HU=e=>Array.isArray(e),q3=e=>typeof e=="object"&&e!==null,K3=e=>!!e&&e instanceof Object&&typeof e=="function";function xf(e,t){return t===void 0&&(t=!1),!e||t?`"${e}"`:e}function FU(e,t,n){return n?JSON.stringify(e):t?`"${e}"`:e}function G3(e){let{field:t,value:n,data:r,lastElement:i,openBracket:o,closeBracket:a,level:c,style:u,shouldExpandNode:d,clickToExpandNode:f,outerRef:m,beforeExpandChange:g}=e;const v=h.useRef(!1),[y,S]=h.useState(()=>d(c,n,t)),_=h.useRef(null);h.useEffect(()=>{v.current?S(d(c,n,t)):v.current=!0},[d]);const C=h.useId();if(r.length===0)return WU({field:t,openBracket:o,closeBracket:a,lastElement:i,style:u});const E=y?u.collapseIcon:u.expandIcon,k=y?u.ariaLables.collapseJson:u.ariaLables.expandJson,$=c+1,P=r.length-1,T=I=>{y!==I&&(!g||g({level:c,value:n,field:t,newExpandValue:I}))&&S(I)},O=I=>{if(I.key==="ArrowRight"||I.key==="ArrowLeft")I.preventDefault(),T(I.key==="ArrowRight");else if(I.key==="ArrowUp"||I.key==="ArrowDown"){I.preventDefault();const z=I.key==="ArrowUp"?-1:1;if(!m.current)return;const L=m.current.querySelectorAll("[role=button]");let M=-1;for(let B=0;B<L.length;B++)if(L[B].tabIndex===0){M=B;break}if(M<0)return;const j=(M+z+L.length)%L.length;L[M].tabIndex=-1,L[j].tabIndex=0,L[j].focus()}},N=()=>{var I;T(!y);const z=_.current;if(!z)return;const L=(I=m.current)===null||I===void 0?void 0:I.querySelector('[role=button][tabindex="0"]');L&&(L.tabIndex=-1),z.tabIndex=0,z.focus()};return h.createElement("div",{className:u.basicChildStyle,role:"treeitem","aria-expanded":y,"aria-selected":void 0},h.createElement("span",{className:E,onClick:N,onKeyDown:O,role:"button","aria-label":k,"aria-expanded":y,"aria-controls":y?C:void 0,ref:_,tabIndex:c===0?0:-1}),(t||t==="")&&(f?h.createElement("span",{className:u.clickableLabel,onClick:N,onKeyDown:O},xf(t,u.quotesForFieldNames),":"):h.createElement("span",{className:u.label},xf(t,u.quotesForFieldNames),":")),h.createElement("span",{className:u.punctuation},o),y?h.createElement("ul",{id:C,role:"group",className:u.childFieldsContainer},r.map((I,z)=>h.createElement(x0,{key:I[0]||z,field:I[0],value:I[1],style:u,lastElement:z===P,level:$,shouldExpandNode:d,clickToExpandNode:f,beforeExpandChange:g,outerRef:m}))):h.createElement("span",{className:u.collapsedContent,onClick:N,onKeyDown:O}),h.createElement("span",{className:u.punctuation},a),!i&&h.createElement("span",{className:u.punctuation},","))}function WU(e){let{field:t,openBracket:n,closeBracket:r,lastElement:i,style:o}=e;return h.createElement("div",{className:o.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&h.createElement("span",{className:o.label},xf(t,o.quotesForFieldNames),":"),h.createElement("span",{className:o.punctuation},n),h.createElement("span",{className:o.punctuation},r),!i&&h.createElement("span",{className:o.punctuation},","))}function VU(e){let{field:t,value:n,style:r,lastElement:i,shouldExpandNode:o,clickToExpandNode:a,level:c,outerRef:u,beforeExpandChange:d}=e;return G3({field:t,value:n,lastElement:i||!1,level:c,openBracket:"{",closeBracket:"}",style:r,shouldExpandNode:o,clickToExpandNode:a,data:Object.keys(n).map(f=>[f,n[f]]),outerRef:u,beforeExpandChange:d})}function UU(e){let{field:t,value:n,style:r,lastElement:i,level:o,shouldExpandNode:a,clickToExpandNode:c,outerRef:u,beforeExpandChange:d}=e;return G3({field:t,value:n,lastElement:i||!1,level:o,openBracket:"[",closeBracket:"]",style:r,shouldExpandNode:a,clickToExpandNode:c,data:n.map(f=>[void 0,f]),outerRef:u,beforeExpandChange:d})}function qU(e){let{field:t,value:n,style:r,lastElement:i}=e,o,a=r.otherValue;return n===null?(o="null",a=r.nullValue):n===void 0?(o="undefined",a=r.undefinedValue):DU(n)?(o=FU(n,!r.noQuotesForStringValues,r.stringifyStringValues),a=r.stringValue):BU(n)?(o=n?"true":"false",a=r.booleanValue):LU(n)?(o=n.toString(),a=r.numberValue):AU(n)?(o=`${n.toString()}n`,a=r.numberValue):U3(n)?o=n.toISOString():K3(n)?o="function() { }":o=n.toString(),h.createElement("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&h.createElement("span",{className:r.label},xf(t,r.quotesForFieldNames),":"),h.createElement("span",{className:a},o),!i&&h.createElement("span",{className:r.punctuation},","))}function x0(e){const t=e.value;return HU(t)?h.createElement(UU,Object.assign({},e)):q3(t)&&!U3(t)&&!K3(t)?h.createElement(VU,Object.assign({},e)):h.createElement(qU,Object.assign({},e))}var Rn={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti","container-dark":"_11RoI _GzYRV","expand-icon-dark":"_17H2C _f10Tu _1MFti _1UmXx","collapse-icon-dark":"_3QHg2 _f10Tu _1MFti _1LId0","collapsed-content-dark":"_3fDAz _1pNG9 _1MFti","label-dark":"_2bSDX","clickable-label-dark":"_1RQEj _2bSDX _1MFti","punctuation-dark":"_gsbQL _3eOF8","value-null-dark":"_LaAZe","value-undefined-dark":"_GTKgm","value-string-dark":"_Chy1W","value-number-dark":"_2bveF","value-boolean-dark":"_2vRm-","value-other-dark":"_1prJR"};const X3={collapseJson:"collapse JSON",expandJson:"expand JSON"},Yg={container:Rn["container-light"],basicChildStyle:Rn["basic-element-style"],childFieldsContainer:Rn["child-fields-container"],label:Rn["label-light"],clickableLabel:Rn["clickable-label-light"],nullValue:Rn["value-null-light"],undefinedValue:Rn["value-undefined-light"],stringValue:Rn["value-string-light"],booleanValue:Rn["value-boolean-light"],numberValue:Rn["value-number-light"],otherValue:Rn["value-other-light"],punctuation:Rn["punctuation-light"],collapseIcon:Rn["collapse-icon-light"],expandIcon:Rn["expand-icon-light"],collapsedContent:Rn["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:X3,stringifyStringValues:!1},KU={container:Rn["container-dark"],basicChildStyle:Rn["basic-element-style"],childFieldsContainer:Rn["child-fields-container"],label:Rn["label-dark"],clickableLabel:Rn["clickable-label-dark"],nullValue:Rn["value-null-dark"],undefinedValue:Rn["value-undefined-dark"],stringValue:Rn["value-string-dark"],booleanValue:Rn["value-boolean-dark"],numberValue:Rn["value-number-dark"],otherValue:Rn["value-other-dark"],punctuation:Rn["punctuation-dark"],collapseIcon:Rn["collapse-icon-dark"],expandIcon:Rn["expand-icon-dark"],collapsedContent:Rn["collapsed-content-dark"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:X3,stringifyStringValues:!1},GU=()=>!0,XU=e=>{let{data:t,style:n=Yg,shouldExpandNode:r=GU,clickToExpandNode:i=!1,beforeExpandChange:o,compactTopLevel:a,...c}=e;const u=h.useRef(null);return h.createElement("div",Object.assign({"aria-label":"JSON view"},c,{className:n.container,ref:u,role:"tree"}),a&&q3(t)?Object.entries(t).map(d=>{let[f,m]=d;return h.createElement(x0,{key:f,field:f,value:m,style:{...Yg,...n},lastElement:!0,level:1,shouldExpandNode:r,clickToExpandNode:i,beforeExpandChange:o,outerRef:u})}):h.createElement(x0,{value:t,style:{...Yg,...n},lastElement:!0,level:0,shouldExpandNode:r,clickToExpandNode:i,outerRef:u,beforeExpandChange:o}))},YU="_container_1h2lr_1",JU={container:YU},QU={...KU,container:"rjv-container"};class Ef extends J.Component{shouldComponentUpdate(t){return t.data!==this.props.data||t.defaultExpand!==this.props.defaultExpand||t.expandNode!==this.props.expandNode}render(){const{data:t,defaultExpand:n,expandNode:r}=this.props;if(t==null)return null;const i=typeof r=="function"?r:n==="all"?()=>!0:n==="root"?o=>o<2:o=>o<1;return x.jsx("div",{className:JU.container,children:x.jsx(XU,{data:t,shouldExpandNode:i,style:QU})})}}const ZU="_tag_17wfp_1",eq="_tagActive_17wfp_22",tq="_tagLoading_17wfp_27",nq="_spinner_17wfp_32",yh={tag:ZU,tagActive:eq,tagLoading:tq,spinner:nq};function kb({text:e,onTranslated:t}){const[n,r]=h.useState("idle"),i=h.useRef(null),o=h.useCallback(c=>{if(c.stopPropagation(),n==="loading")return;if(n==="done"){r("idle"),t==null||t(null);return}if(i.current){r("done"),t==null||t(i.current);return}r("loading");const u=window.location.port||"7008",d=`${window.location.protocol}//${window.location.hostname}:${u}`;fetch(`${d}/api/translate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:e,to:ec()})}).then(f=>{if(!f.ok)throw new Error(`HTTP ${f.status}`);return f.json()}).then(f=>{const m=f.text||"";i.current=m,r("done"),t==null||t(m)}).catch(()=>{r("idle")})},[n,e,t]),a=Ce(n==="loading"?"ui.translating":"ui.translate");return x.jsxs("span",{className:`${yh.tag} ${n==="done"?yh.tagActive:""} ${n==="loading"?yh.tagLoading:""}`,onClick:o,children:[n==="loading"&&x.jsx("span",{className:yh.spinner}),a]})}const rq="_root_13xe8_1",iq="_sidebar_13xe8_9",oq="_section_13xe8_17",sq="_sectionHeader_13xe8_21",aq="_arrow_13xe8_37",lq="_sectionTitle_13xe8_43",cq="_sectionCount_13xe8_51",uq="_sectionBody_13xe8_60",dq="_historyToggle_13xe8_65",hq="_historyToggleLabel_13xe8_81",fq="_item_13xe8_86",mq="_itemActive_13xe8_102",pq="_itemContent_13xe8_112",gq="_itemLabel_13xe8_118",vq="_itemSublabel_13xe8_126",yq="_itemTime_13xe8_135",bq="_content_13xe8_144",_q="_contentEmpty_13xe8_151",Sq="_contentInner_13xe8_158",Cq="_emptyWrap_13xe8_162",wq="_roleHeader_13xe8_170",xq="_roleBadge_13xe8_178",Eq="_role_user_13xe8_187",kq="_role_assistant_13xe8_193",$q="_roleLabel_13xe8_199",Rq="_contentTime_13xe8_206",Tq="_turnDivider_13xe8_214",Pq="_textBlock_13xe8_221",Oq="_textBlockBar_13xe8_228",Iq="_textBlockBody_13xe8_237",Nq="_textBlockCompact_13xe8_245",Mq="_textBlockCompactFloat_13xe8_252",zq="_thinkingBlock_13xe8_259",jq="_thinkingHeader_13xe8_267",Bq="_thinkingPreview_13xe8_282",Lq="_thinkingBody_13xe8_292",Aq="_toolBlock_13xe8_298",Dq="_toolBlockResult_13xe8_305",Hq="_toolBlockError_13xe8_309",Fq="_toolBlockHeader_13xe8_313",Wq="_toolBlockBody_13xe8_324",Vq="_toolName_13xe8_329",Uq="_toolId_13xe8_335",qq="_errorLabel_13xe8_342",Kq="_blockTag_13xe8_352",Gq="_blockTagText_13xe8_365",Xq="_blockTagThinking_13xe8_371",Yq="_blockTagResult_13xe8_377",Jq="_blockTagError_13xe8_383",Qq="_jsonBlock_13xe8_390",Zq="_jsonBlockLabel_13xe8_397",eK="_blockSeparator_13xe8_407",tK="_markdownBody_13xe8_414",it={root:rq,sidebar:iq,section:oq,sectionHeader:sq,arrow:aq,sectionTitle:lq,sectionCount:cq,sectionBody:uq,historyToggle:dq,historyToggleLabel:hq,item:fq,itemActive:mq,itemContent:pq,itemLabel:gq,itemSublabel:vq,itemTime:yq,content:bq,contentEmpty:_q,contentInner:Sq,emptyWrap:Cq,roleHeader:wq,roleBadge:xq,role_user:Eq,role_assistant:kq,roleLabel:$q,contentTime:Rq,turnDivider:Tq,textBlock:Pq,textBlockBar:Oq,textBlockBody:Iq,textBlockCompact:Nq,textBlockCompactFloat:Mq,thinkingBlock:zq,thinkingHeader:jq,thinkingPreview:Bq,thinkingBody:Lq,toolBlock:Aq,toolBlockResult:Dq,toolBlockError:Hq,toolBlockHeader:Fq,toolBlockBody:Wq,toolName:Vq,toolId:Uq,errorLabel:qq,blockTag:Kq,blockTagText:Gq,blockTagThinking:Xq,blockTagResult:Yq,blockTagError:Jq,jsonBlock:Qq,jsonBlockLabel:Zq,blockSeparator:eK,markdownBody:tK},{Text:nK}=No;function E0(e){if(e==null)return[];if(typeof e=="string"){const t=e.trim();return t?[{type:"markdown",text:t}]:[]}if(Array.isArray(e)){const t=[];for(const n of e)if(n)if(n.type==="text"){const r=(n.text||"").trim();r&&t.push({type:"markdown",text:r})}else if(n.type==="tool_use")t.push({type:"tool_use",name:n.name||"unknown",id:n.id||"",input:n.input??{}});else if(n.type==="tool_result"){const r=rK(n.content);t.push({type:"tool_result",tool_use_id:n.tool_use_id||"",is_error:n.is_error,content:r})}else if(n.type==="thinking"){const r=n.thinking||"";r.trim()&&t.push({type:"thinking",text:r})}else n.type==="image"?t.push({type:"json",label:"image",data:n}):t.push({type:"json",label:n.type||"block",data:n});return t}return[{type:"json",label:"content",data:e}]}function rK(e){if(e==null)return[];if(typeof e=="string"){const t=e.trim();return t?[{type:"markdown",text:t}]:[]}return Array.isArray(e)?e.flatMap(t=>{if(!t)return[];if(t.type==="text"){const n=(t.text||"").trim();return n?[{type:"markdown",text:n}]:[]}return[{type:"json",label:t.type||"block",data:t}]}):[{type:"json",label:"content",data:e}]}function iK(e){if(!e)return null;if(typeof e=="string")return[{type:"markdown",text:e}];if(Array.isArray(e)){const t=[];return e.forEach((n,r)=>{r>0&&t.push({type:"separator"}),n&&(typeof n=="string"?t.push({type:"markdown",text:n}):n.type==="text"?t.push({type:"markdown",text:n.text||""}):t.push({type:"json",label:n.type||"item",data:n}))}),t}return[{type:"json",label:"system",data:e}]}function oK(e){const t=[],n=(e==null?void 0:e.name)||"unknown",r=(e==null?void 0:e.description)||"";let i=`### ${n}
566
+
567
+ `;r&&(i+=`${r}
568
+
569
+ `),t.push({type:"markdown",text:i});const o=(e==null?void 0:e.input_schema)||(e==null?void 0:e.parameters)||null;return o&&t.push({type:"json",label:"Parameters",data:o}),t}function sK(e){var t;if(typeof e=="string")return e.slice(0,60).replace(/\n/g," ");if(Array.isArray(e)){for(const n of e)if((n==null?void 0:n.type)==="text"&&((t=n.text)!=null&&t.trim()))return n.text.trim().slice(0,60).replace(/\n/g," ")}return""}function aK(e){var r;const t=[];let n=0;for(;n<e.length;){const i=e[n];if((i==null?void 0:i.role)!=="user"){n++;continue}const o=((r=e[n+1])==null?void 0:r.role)==="assistant"?e[n+1]:null;t.push({id:`turn__${n}`,isTurn:!0,turnIndex:t.length,timestamp:i._timestamp||null,assistantTimestamp:(o==null?void 0:o._timestamp)||null,userBlocks:E0(i==null?void 0:i.content),assistantBlocks:o?E0(o.content):null,preview:sK(i==null?void 0:i.content)}),n+=o?2:1}return t}function k0(e){try{return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}catch{return null}}function lK({text:e,compact:t}){const[n,r]=h.useState(null),i=n||Ro(e),o=x.jsx(kb,{text:e,onTranslated:a=>r(a?Ro(a):null)});return t?x.jsxs("div",{className:it.textBlockCompact,children:[x.jsx("span",{className:it.textBlockCompactFloat,children:o}),x.jsx("div",{className:`chat-md ${it.markdownBody}`,dangerouslySetInnerHTML:{__html:i}})]}):x.jsxs("div",{className:it.textBlock,children:[x.jsxs("div",{className:it.textBlockBar,children:[x.jsx("span",{className:`${it.blockTag} ${it.blockTagText}`,children:"text"}),o]}),x.jsx("div",{className:`chat-md ${it.textBlockBody}`,dangerouslySetInnerHTML:{__html:i}})]})}function cK({block:e}){const[t,n]=h.useState(!0),[r,i]=h.useState(null),o=e.text.length>60?e.text.slice(0,60).replace(/\n/g," ")+"…":e.text.replace(/\n/g," "),a=r||Ro(e.text);return x.jsxs("div",{className:it.thinkingBlock,children:[x.jsxs("div",{className:it.thinkingHeader,onClick:()=>n(c=>!c),children:[t?x.jsx(hs,{className:it.arrow}):x.jsx(Wi,{className:it.arrow}),x.jsx("span",{className:`${it.blockTag} ${it.blockTagThinking}`,children:"thinking"}),!t&&x.jsx("span",{className:it.thinkingPreview,children:o}),t&&x.jsx("span",{onClick:c=>c.stopPropagation(),children:x.jsx(kb,{text:e.text,onTranslated:c=>i(c?Ro(c):null)})})]}),t&&x.jsx("div",{className:it.thinkingBody,children:x.jsx("div",{className:`chat-md ${it.markdownBody}`,dangerouslySetInnerHTML:{__html:a}})})]})}function kf({blocks:e,compact:t}){return!e||e.length===0?null:x.jsx(x.Fragment,{children:e.map((n,r)=>x.jsx(uK,{block:n,compact:t},r))})}function uK({block:e,compact:t}){var n;return e.type==="separator"?x.jsx("hr",{className:it.blockSeparator}):e.type==="markdown"?(n=e.text)!=null&&n.trim()?x.jsx(lK,{text:e.text,compact:t}):null:e.type==="thinking"?x.jsx(cK,{block:e}):e.type==="tool_use"?x.jsxs("div",{className:it.toolBlock,children:[x.jsxs("div",{className:it.toolBlockHeader,children:[x.jsx("span",{className:it.blockTag,children:"tool_use"}),x.jsx("span",{className:it.toolName,children:e.name}),e.id&&x.jsx("span",{className:it.toolId,children:e.id})]}),x.jsx("div",{className:it.toolBlockBody,children:x.jsx(Ef,{data:e.input,defaultExpand:"root"})})]}):e.type==="tool_result"?x.jsxs("div",{className:`${it.toolBlock} ${e.is_error?it.toolBlockError:it.toolBlockResult}`,children:[x.jsxs("div",{className:it.toolBlockHeader,children:[x.jsx("span",{className:`${it.blockTag} ${e.is_error?it.blockTagError:it.blockTagResult}`,children:"tool_result"}),e.tool_use_id&&x.jsx("span",{className:it.toolId,children:e.tool_use_id}),e.is_error&&x.jsx("span",{className:it.errorLabel,children:"error"})]}),x.jsx("div",{className:it.toolBlockBody,children:x.jsx(kf,{blocks:e.content,compact:!0})})]}):e.type==="json"?x.jsxs("div",{className:it.jsonBlock,children:[e.label&&x.jsx("div",{className:it.jsonBlockLabel,children:e.label}),x.jsx(Ef,{data:e.data,defaultExpand:"root"})]}):null}function dK({turn:e}){const t=e.timestamp?k0(e.timestamp):null,n=e.assistantTimestamp?k0(e.assistantTimestamp):null;return x.jsxs("div",{children:[x.jsxs("div",{className:it.roleHeader,children:[x.jsx("span",{className:`${it.roleBadge} ${it.role_user}`,children:"user"}),x.jsx("span",{className:it.roleLabel,children:`Turn ${e.turnIndex+1}`}),t&&x.jsx("span",{className:it.contentTime,children:t})]}),x.jsx(kf,{blocks:e.userBlocks}),e.assistantBlocks&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:it.turnDivider}),x.jsxs("div",{className:it.roleHeader,children:[x.jsx("span",{className:`${it.roleBadge} ${it.role_assistant}`,children:"assistant"}),n&&x.jsx("span",{className:it.contentTime,children:n})]}),x.jsx(kf,{blocks:e.assistantBlocks})]})]})}function hK({title:e,items:t,historyItems:n,onSelect:r,selectedId:i}){const[o,a]=h.useState(!0),[c,u]=h.useState(!1),d=t.length+((n==null?void 0:n.length)||0);function f(m){const g=i===m.id;return x.jsxs("div",{className:`${it.item} ${g?it.itemActive:""}`,onClick:()=>r(m),children:[x.jsxs("div",{className:it.itemContent,children:[x.jsx("span",{className:it.itemLabel,children:m.label}),m.sublabel&&!g&&x.jsx("div",{className:it.itemSublabel,children:m.sublabel})]}),m.time&&x.jsx("span",{className:it.itemTime,children:m.time})]},m.id)}return x.jsxs("div",{className:it.section,children:[x.jsxs("div",{className:it.sectionHeader,onClick:()=>a(m=>!m),children:[o?x.jsx(hs,{className:it.arrow}):x.jsx(Wi,{className:it.arrow}),x.jsx("span",{className:it.sectionTitle,children:e}),x.jsx("span",{className:it.sectionCount,children:d})]}),o&&x.jsxs("div",{className:it.sectionBody,children:[n&&n.length>0&&x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:it.historyToggle,onClick:()=>u(m=>!m),children:[c?x.jsx(hs,{className:it.arrow}):x.jsx(Wi,{className:it.arrow}),x.jsxs("span",{className:it.historyToggleLabel,children:[Ce("ui.context.history")," (",n.length,")"]})]}),c&&n.map(f)]}),t.map(f)]})]})}function fK({body:e,response:t}){const[n,r]=h.useState(null),i=h.useMemo(()=>{if(!Array.isArray(e==null?void 0:e.messages))return[];const u=aK(e.messages);if(u.length===0)return u;const d=u[u.length-1],f=t!=null&&t.content?E0(t.content):null;return[...u.slice(0,-1),{...d,assistantBlocks:f??d.assistantBlocks}]},[e,t]);if(h.useEffect(()=>{i.length>0?r(i[i.length-1]):r(null)},[e,t]),!e||typeof e!="object")return x.jsx("div",{className:it.emptyWrap,children:x.jsx(Pi,{description:Ce("ui.context.noData")})});const o=[],a=iK(e.system);if(a!=null&&o.push({key:"system",title:Ce("ui.context.systemPrompt"),items:[{id:"system__0",label:Ce("ui.context.systemPrompt"),blocks:a}]}),i.length>0){const u=g=>({...g,label:Ce("ui.context.historyTurnNoTime",{n:g.turnIndex+1}),time:g.timestamp?k0(g.timestamp):null,sublabel:g.preview||void 0}),d=g=>({...g,label:Ce("ui.context.currentTurn"),sublabel:g.preview||void 0}),f=i.slice(0,-1).map(u),m=d(i[i.length-1]);o.push({key:"messages",title:Ce("ui.context.messages"),historyItems:f.length>0?f:void 0,items:[m]})}if(Array.isArray(e.tools)&&e.tools.length>0&&o.push({key:"tools",title:Ce("ui.context.tools"),items:e.tools.map((u,d)=>({id:`tool__${d}`,label:(u==null?void 0:u.name)||`Tool ${d}`,blocks:oK(u)}))}),o.length===0)return x.jsx("div",{className:it.emptyWrap,children:x.jsx(Pi,{description:Ce("ui.context.noFields")})});const c=n!=null&&n.isTurn?i.find(u=>u.id===n.id)??null:n;return x.jsxs("div",{className:it.root,children:[x.jsx("div",{className:it.sidebar,children:o.map(u=>x.jsx(hK,{title:u.title,items:u.items,historyItems:u.historyItems,selectedId:c==null?void 0:c.id,onSelect:d=>r(d)},u.key))}),x.jsx("div",{className:it.content,children:c==null?x.jsx("div",{className:it.contentEmpty,children:x.jsx(nK,{type:"secondary",children:Ce("ui.context.selectPrompt")})}):x.jsx("div",{className:it.contentInner,children:c.isTurn?x.jsx(dK,{turn:c}):x.jsxs(x.Fragment,{children:[c.role&&x.jsxs("div",{className:it.roleHeader,children:[x.jsx("span",{className:`${it.roleBadge} ${it[`role_${c.role}`]||""}`,children:c.role}),x.jsx("span",{className:it.roleLabel,children:c.label})]}),x.jsx(kf,{blocks:c.blocks})]})},c.id)})]})}const mK="_container_y3z3z_1",pK="_emptyState_y3z3z_7",gK="_urlSection_y3z3z_14",vK="_urlLeft_y3z3z_21",yK="_tokenStatsBox_y3z3z_26",bK="_tokenGrid_y3z3z_33",_K="_tokenRows_y3z3z_43",SK="_tokenRow_y3z3z_43",CK="_tokenRowBorder_y3z3z_51",wK="_tokenLabel_y3z3z_55",xK="_tokenTd_y3z3z_62",EK="_tokenHitRate_y3z3z_71",kK="_tokenHitRateLabel_y3z3z_84",$K="_urlText_y3z3z_94",RK="_metaText_y3z3z_101",TK="_headersContainer_y3z3z_105",PK="_headerRow_y3z3z_109",OK="_headerKey_y3z3z_115",IK="_headerValue_y3z3z_120",NK="_streamingBox_y3z3z_125",MK="_rawTextPre_y3z3z_138",zK="_tabContent_y3z3z_151",jK="_bodyLabel_y3z3z_159",BK="_bodyHeader_y3z3z_163",LK="_diffSection_y3z3z_170",AK="_diffToggle_y3z3z_174",DK="_diffIcon_y3z3z_180",HK="_reminderSelect_y3z3z_206",jt={container:mK,emptyState:pK,urlSection:gK,urlLeft:vK,tokenStatsBox:yK,tokenGrid:bK,tokenRows:_K,tokenRow:SK,tokenRowBorder:CK,tokenLabel:wK,tokenTd:xK,tokenHitRate:EK,tokenHitRateLabel:kK,urlText:$K,metaText:RK,headersContainer:TK,headerRow:PK,headerKey:OK,headerValue:IK,streamingBox:NK,rawTextPre:MK,tabContent:zK,bodyLabel:jK,bodyHeader:BK,diffSection:LK,diffToggle:AK,diffIcon:DK,reminderSelect:HK},{Text:$i,Paragraph:FK}=No;class WK extends J.Component{constructor(t){super(t),this.state={bodyViewMode:{request:"json",response:"json",diff:"json"},diffExpanded:!1,requestHeadersExpanded:!1,responseHeadersExpanded:!1,diffTooltipDismissed:!1,reminderFilters:null}}componentDidMount(){fetch("/api/preferences").then(t=>t.json()).then(t=>{t.diffTooltipDismissed&&this.setState({diffTooltipDismissed:!0})}).catch(()=>{})}dismissDiffTooltip(){this.setState({diffTooltipDismissed:!0}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({diffTooltipDismissed:!0})}).catch(()=>{})}shouldComponentUpdate(t,n){if(t.request!==this.props.request){const r=qr(t.request);this.setState({diffExpanded:r&&!!t.expandDiff,requestHeadersExpanded:!1,responseHeadersExpanded:!1,reminderFilters:null})}return t.request!==this.props.request||t.currentTab!==this.props.currentTab||t.onTabChange!==this.props.onTabChange||t.selectedIndex!==this.props.selectedIndex||t.expandDiff!==this.props.expandDiff||n.bodyViewMode!==this.state.bodyViewMode||n.diffExpanded!==this.state.diffExpanded||n.requestHeadersExpanded!==this.state.requestHeadersExpanded||n.responseHeadersExpanded!==this.state.responseHeadersExpanded||n.diffTooltipDismissed!==this.state.diffTooltipDismissed||n.reminderFilters!==this.state.reminderFilters}toggleBodyViewMode(t){this.setState(n=>({bodyViewMode:{...n.bodyViewMode,[t]:n.bodyViewMode[t]==="json"?"text":"json"}}))}copyBody(t){var a;const{request:n}=this.props;if(!n)return;let r;if(t==="diff"?r=this._lastDiffResult:r=t==="request"?n.body:(a=n.response)==null?void 0:a.body,r==null)return;const i=typeof r=="object"?Ra(r):r,o=typeof i=="string"?i:JSON.stringify(i,null,2);navigator.clipboard.writeText(o).then(()=>Fi.success(Ce("ui.copySuccess")))}renderHeaders(t){return!t||Object.keys(t).length===0?x.jsx($i,{type:"secondary",children:Ce("ui.noHeaders")}):x.jsx("div",{className:jt.headersContainer,children:Object.entries(t).map(([n,r])=>x.jsxs("div",{className:jt.headerRow,children:[x.jsx($i,{code:!0,className:jt.headerKey,children:n}),n==="authorization"&&x.jsx(Ul,{doc:"TranslateContextPollution"}),x.jsx($i,{type:"secondary",className:jt.headerValue,children:String(r)})]},n))})}getRequestExpandNode(t,n){if(n!=="request"||!t||typeof t!="object")return;const{request:r,requests:i,selectedIndex:o}=this.props;if(!r)return;const a=i&&o!=null?i[o+1]:null,{type:c}=za(r,a);let u=null;if(this.state.reminderFilters==="claudeMd"&&Array.isArray(t.messages)){u=new Set,u.add(t.messages);for(const m of t.messages){if(!m||typeof m!="object")continue;const g=m.content;if(typeof g=="string")yf(g)&&u.add(m);else if(Array.isArray(g)){let v=!1;for(const y of g)y&&y.type==="text"&&yf(y.text)&&(u.add(y),v=!0);v&&(u.add(m),u.add(g))}}}let d=null;if(this.state.reminderFilters==="skills"&&Array.isArray(t.messages)){d=new Set,d.add(t.messages);for(const m of t.messages){if(!m||typeof m!="object")continue;const g=m.content;if(typeof g=="string")bf(g)&&d.add(m);else if(Array.isArray(g)){let v=!1;for(const y of g)y&&y.type==="text"&&bf(y.text)&&(d.add(y),v=!0);v&&(d.add(m),d.add(g))}}}const f=u||d;if(c==="Preflight"){const m=new Set,g=v=>{v&&typeof v=="object"&&(m.add(v),Array.isArray(v)?v.forEach(g):Object.values(v).forEach(g))};return Array.isArray(t.messages)&&g(t.messages),Array.isArray(t.system)&&t.system.length>=3&&g(t.system[2]),(v,y,S)=>!!(v<2||m.has(y)||f&&f.has(y)||v===1&&S==="system")}if(c==="MainAgent"&&Array.isArray(t.messages)&&t.messages.length===1){const m=t.messages[0],g=m&&Array.isArray(m.content)?m.content:null,v=g&&g.length>0?g[g.length-1]:null,y=new Set,S=_=>{_&&typeof _=="object"&&(y.add(_),Array.isArray(_)?_.forEach(S):Object.values(_).forEach(S))};return v&&S(v),y.add(t.messages),m&&typeof m=="object"&&y.add(m),g&&y.add(g),(_,C,E)=>!!(_<2||y.has(C)||f&&f.has(C))}if(f)return(m,g,v)=>!!(m<2||f.has(g))}renderBody(t,n){const{bodyViewMode:r}=this.state;if(t==null)return x.jsx($i,{type:"secondary",children:Ce("ui.noBody")});if(typeof t=="string"&&t.includes("Streaming Response"))return x.jsx("div",{className:jt.streamingBox,children:x.jsx($i,{type:"secondary",children:Ce("ui.streamingResponse")})});const i=typeof t=="object"?Ra(t):t,o=r[n]==="json",a=this.getRequestExpandNode(i,n);return x.jsx("div",{children:o?x.jsx(Ef,{data:i,defaultExpand:n==="response"?"all":"root",expandNode:a}):x.jsx("pre",{className:jt.rawTextPre,children:typeof i=="string"?i:JSON.stringify(i,null,2)})})}getPrevMainAgentRequest(){const{requests:t,selectedIndex:n}=this.props;if(!t||n==null)return null;for(let r=n-1;r>=0;r--)if(qr(t[r]))return t[r];return null}computeDiff(t,n){if(t==null||n==null||typeof t!="object"||typeof n!="object")return null;const r={},i=new Set([...Object.keys(t),...Object.keys(n)]);for(const o of i)if(!o.startsWith("_"))if(!(o in t))r[o]=n[o];else if(o in n){const a=JSON.stringify(t[o]),c=JSON.stringify(n[o]);a!==c&&(o==="messages"&&Array.isArray(t[o])&&Array.isArray(n[o])&&n[o].length>t[o].length?r[o]=n[o].slice(t[o].length):r[o]=n[o])}else continue;return Object.keys(r).length?r:null}render(){var g,v,y;const{request:t,currentTab:n,onTabChange:r}=this.props;if(!t)return x.jsx("div",{className:jt.emptyState,children:x.jsx(Pi,{description:"选择一个请求查看详情"})});const i=new Date(t.timestamp).toLocaleString("zh-CN"),o=t.response&&t.response.status<400;let a=null;if(qr(t)){const S=this.getPrevMainAgentRequest();if(S){const _=JSON.stringify(t.body).length,C=JSON.stringify(S.body).length;if(_<C)a=x.jsxs("div",{className:jt.diffSection,children:[x.jsxs(Xo,{title:this.state.diffTooltipDismissed?null:x.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:8},children:[x.jsx("span",{style:{flex:1},children:Ce("ui.diffTooltip")}),x.jsx(ta,{style:{cursor:"pointer",fontSize:10,marginTop:2,flexShrink:0},onClick:k=>{k.stopPropagation(),this.dismissDiffTooltip()}})]}),placement:"top",color:"#000",overlayStyle:{maxWidth:340},overlayInnerStyle:{fontSize:12,color:"#999"},children:[" ",x.jsxs($i,{strong:!0,className:jt.diffToggle,onClick:()=>this.setState(k=>({diffExpanded:!k.diffExpanded})),children:["Body Diff JSON ",x.jsx(Ul,{doc:"BodyDiffJSON"})," ",this.state.diffExpanded?x.jsx(hs,{className:jt.diffIcon}):x.jsx(Wi,{className:jt.diffIcon})]})]}),this.state.diffExpanded&&x.jsx($i,{type:"secondary",children:Ce("ui.diffSessionChanged")})]});else{const k=Ra(this.computeDiff(S.body,t.body));k&&(this._lastDiffResult=k,a=x.jsxs("div",{className:jt.diffSection,children:[x.jsxs(Xo,{title:this.state.diffTooltipDismissed?null:x.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:8},children:[x.jsx("span",{style:{flex:1},children:Ce("ui.diffTooltip")}),x.jsx(ta,{style:{cursor:"pointer",fontSize:10,marginTop:2,flexShrink:0},onClick:$=>{$.stopPropagation(),this.dismissDiffTooltip()}})]}),placement:"top",color:"#000",overlayStyle:{maxWidth:340},overlayInnerStyle:{fontSize:12,color:"#999"},children:[" ",x.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[x.jsxs($i,{strong:!0,className:jt.diffToggle,onClick:()=>this.setState($=>({diffExpanded:!$.diffExpanded})),children:["Body Diff JSON ",x.jsx(Ul,{doc:"BodyDiffJSON"})," ",this.state.diffExpanded?x.jsx(hs,{className:jt.diffIcon}):x.jsx(Wi,{className:jt.diffIcon})]}),this.state.diffExpanded&&x.jsxs(fs,{size:"small",style:{marginLeft:"auto"},children:[x.jsx(hr,{size:"small",icon:this.state.bodyViewMode.diff==="json"?x.jsx(fu,{}):x.jsx(Fh,{}),onClick:()=>this.toggleBodyViewMode("diff"),children:this.state.bodyViewMode.diff==="json"?"Text":"JSON"}),x.jsx(hr,{size:"small",icon:x.jsx(Hh,{}),onClick:()=>this.copyBody("diff"),children:Ce("ui.copy")})]})]})]}),this.state.diffExpanded&&x.jsx(x.Fragment,{children:this.state.bodyViewMode.diff==="json"?x.jsx(Ef,{data:k,defaultExpand:"all"}):x.jsx("pre",{className:jt.rawTextPre,children:JSON.stringify(k,null,2)})})]}))}}}const c=sW(t.body),u=aW(t.body),d=[{key:"request",label:"Request",children:x.jsxs("div",{className:jt.tabContent,children:[x.jsxs("div",{className:jt.diffSection,children:[x.jsxs($i,{strong:!0,className:jt.diffToggle,onClick:()=>this.setState(S=>({requestHeadersExpanded:!S.requestHeadersExpanded})),children:["Headers ",this.state.requestHeadersExpanded?x.jsx(hs,{className:jt.diffIcon}):x.jsx(Wi,{className:jt.diffIcon})]}),this.state.requestHeadersExpanded&&this.renderHeaders(t.headers)]}),a,x.jsxs("div",{children:[x.jsxs("div",{className:jt.bodyHeader,children:[x.jsx($i,{strong:!0,className:jt.bodyLabel,children:"Body"}),x.jsxs(fs,{size:"small",children:[(c||u)&&x.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4},children:[x.jsx("span",{style:{color:"#888",fontSize:12,fontFamily:"monospace"},children:"system-reminder:"}),x.jsx(Fa,{size:"small",className:jt.reminderSelect,placeholder:"filter",value:this.state.reminderFilters||void 0,onChange:S=>this.setState({reminderFilters:S||null}),options:[{label:"CLAUDE.md",value:"claudeMd",disabled:!c},{label:"Skills",value:"skills",disabled:!u}],popupMatchSelectWidth:!1,allowClear:!0})]}),x.jsx(hr,{size:"small",icon:this.state.bodyViewMode.request==="json"?x.jsx(fu,{}):x.jsx(Fh,{}),onClick:()=>this.toggleBodyViewMode("request"),children:this.state.bodyViewMode.request==="json"?"Text":"JSON"}),x.jsx(hr,{size:"small",icon:x.jsx(Hh,{}),onClick:()=>this.copyBody("request"),children:Ce("ui.copy")})]})]}),this.renderBody(t.body,"request")]})]})},{key:"response",label:"Response",children:x.jsx("div",{className:jt.tabContent,children:t.response?x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:jt.diffSection,children:[x.jsxs($i,{strong:!0,className:jt.diffToggle,onClick:()=>this.setState(S=>({responseHeadersExpanded:!S.responseHeadersExpanded})),children:["Headers ",this.state.responseHeadersExpanded?x.jsx(hs,{className:jt.diffIcon}):x.jsx(Wi,{className:jt.diffIcon})]}),this.state.responseHeadersExpanded&&this.renderHeaders(t.response.headers)]}),x.jsxs("div",{children:[x.jsxs("div",{className:jt.bodyHeader,children:[x.jsx($i,{strong:!0,className:jt.bodyLabel,children:"Body"}),x.jsxs(fs,{size:"small",children:[x.jsx(hr,{size:"small",icon:this.state.bodyViewMode.response==="json"?x.jsx(fu,{}):x.jsx(Fh,{}),onClick:()=>this.toggleBodyViewMode("response"),children:this.state.bodyViewMode.response==="json"?"Text":"JSON"}),x.jsx(hr,{size:"small",icon:x.jsx(Hh,{}),onClick:()=>this.copyBody("response"),children:Ce("ui.copy")})]})]}),this.renderBody(t.response.body,"response")]})]}):x.jsx(Pi,{description:Ce("ui.responseNotCaptured")})})},{key:"context",label:"Context",children:x.jsx("div",{className:jt.tabContent,style:{height:"calc(100vh - 220px)",minHeight:400},children:x.jsx(fK,{body:t.body,response:(g=t.response)==null?void 0:g.body})})}],f=(y=(v=t.response)==null?void 0:v.body)==null?void 0:y.usage,m=f?(()=>{const S=f.input_tokens||0,_=f.output_tokens||0,C=f.cache_creation_input_tokens||0,E=f.cache_read_input_tokens||0,k=S+C+E,$=k>0?(E/k*100).toFixed(1):"0.0";return{input:S,output:_,cacheCreate:C,cacheRead:E,hitRate:$}})():null;return x.jsxs("div",{className:jt.container,children:[x.jsxs("div",{className:jt.urlSection,children:[x.jsxs("div",{className:jt.urlLeft,children:[x.jsx(FK,{className:jt.urlText,ellipsis:{rows:2,expandable:!0},children:t.url}),x.jsxs(fs,{size:"small",wrap:!0,children:[x.jsx(Ui,{color:t.method==="POST"?"blue":"green",children:t.method}),x.jsxs($i,{type:"secondary",className:jt.metaText,children:["🕐 ",i]}),t.duration&&x.jsxs($i,{type:"secondary",className:jt.metaText,children:["⏱️ ",t.duration,"ms"]}),t.response&&x.jsxs(Ui,{color:o?"success":"error",children:["HTTP ",t.response.status]})]})]}),m&&x.jsx("div",{className:jt.tokenStatsBox,children:x.jsxs("div",{className:jt.tokenGrid,children:[x.jsxs("div",{className:jt.tokenRows,children:[x.jsxs("div",{className:jt.tokenRow,children:[x.jsx("span",{className:jt.tokenLabel,children:"Token"}),x.jsxs("span",{className:jt.tokenTd,children:["input: ",dr(m.input)]}),x.jsxs("span",{className:jt.tokenTd,children:["output: ",dr(m.output)]})]}),x.jsxs("div",{className:`${jt.tokenRow} ${jt.tokenRowBorder}`,children:[x.jsx("span",{className:jt.tokenLabel,children:"Cache"}),x.jsxs("span",{className:jt.tokenTd,children:["create: ",dr(m.cacheCreate)]}),x.jsxs("span",{className:jt.tokenTd,children:["read: ",dr(m.cacheRead)]})]})]}),x.jsxs("div",{className:jt.tokenHitRate,children:[x.jsxs("div",{children:[m.hitRate,"%"]}),x.jsx("div",{className:jt.tokenHitRateLabel,children:Ce("ui.hitRate")})]})]})})]}),x.jsx(sb,{activeKey:n,onChange:r,items:d,size:"small"})]})}}const VK=["system-reminder","local-command-caveat","project-reminder","important-instruction-reminders","file-modified-reminder","todo-reminder","user-prompt-submit-hook","local-command-stdout","command-name","task-notification","environment_details","context"];function UK(e){if(!e)return{segments:[]};const t=new RegExp("<("+VK.join("|")+")\\b[^>]*>([\\s\\S]*?)</\\1>","gi"),n=[];let r=0,i;for(;(i=t.exec(e))!==null;){if(i.index>r){const o=e.slice(r,i.index).trim();o&&n.push({type:"text",content:o})}n.push({type:"system-tag",tag:i[1],content:i[2].trim()}),r=i.index+i[0].length}if(r<e.length){const o=e.slice(r).trim();o&&n.push({type:"text",content:o})}return{segments:n}}function qK(e){const{segments:t}=UK(e);return t.length===0?{segments:[]}:{segments:t}}const KK="_wrapper_1o255_1",GK="_header_1o255_5",XK="_filePath_1o255_12",YK="_toggle_1o255_18",JK="_code_1o255_25",qc={wrapper:KK,header:GK,filePath:XK,toggle:YK,code:JK},{Text:gx}=No;function QK({file_path:e,old_string:t,new_string:n}){const[r,i]=h.useState(!1),o=t.split(`
570
+ `),a=n.split(`
571
+ `),c=[];return o.forEach(u=>{c.push({type:"del",text:u})}),a.forEach(u=>{c.push({type:"add",text:u})}),x.jsxs("div",{className:`diff-view ${qc.wrapper}`,children:[x.jsxs("div",{className:qc.header,children:[x.jsxs(gx,{className:qc.filePath,children:["Edit: ",e]}),x.jsx(gx,{className:qc.toggle,onClick:()=>i(u=>!u),children:Ce(r?"ui.expand":"ui.collapse")})]}),!r&&x.jsx("pre",{className:qc.code,children:c.map((u,d)=>x.jsxs("div",{className:u.type==="del"?"diff-line-del":"diff-line-add",children:[u.type==="del"?"- ":"+ ",u.text]},d))})]})}const ZK="_plainResult_1uh60_1",eG="_plainTitle_1uh60_7",tG="_plainPre_1uh60_11",nG="_codeResult_1uh60_20",rG="_codeHeader_1uh60_27",iG="_codeTitle_1uh60_36",oG="_codeToggle_1uh60_41",sG="_codePre_1uh60_48",aG="_markdownBody_1uh60_57",di={plainResult:ZK,plainTitle:eG,plainPre:tG,codeResult:nG,codeHeader:rG,codeTitle:iG,codeToggle:oG,codePre:sG,markdownBody:aG},{Text:Tl}=No,Pl={js:"javascript",jsx:"javascript",ts:"typescript",tsx:"typescript",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",c:"c",cpp:"cpp",h:"c",hpp:"cpp",css:"css",scss:"css",less:"css",html:"html",htm:"html",xml:"xml",svg:"xml",json:"json",yaml:"yaml",yml:"yaml",toml:"toml",sh:"shell",bash:"shell",zsh:"shell",md:"markdown",sql:"sql"},lG=["Read","Grep","Glob","Bash","Write","Edit"];function cG(e,t,n){if(!t)return null;const r=t.file_path||"";if(r){const i=r.split(".").pop().toLowerCase();if(Pl[i])return Pl[i]}if(e==="Bash")return"shell-output";if(e==="Glob")return"file-list";if(e==="Grep"){const i=t.glob||"";if(i){const o=i.replace(/[{}*]/g,",").split(",").filter(Boolean);for(const a of o){const c=a.replace(/^\./,"").toLowerCase();if(Pl[c])return Pl[c]}}if(t.output_mode==="files_with_matches"||!t.output_mode)return"file-list";if(t.output_mode==="content"&&n){const o=n.match(/^[\w/.~-]+\.([\w]+):\d+/m);if(o&&Pl[o[1].toLowerCase()])return Pl[o[1].toLowerCase()]}return"shell-output"}return n?uG(n):null}function uG(e){const t=e.substring(0,2e3);return/^\s*[\[{]/.test(t)&&/[}\]]\s*$/.test(t.trimEnd())?"json":/^\s*<!DOCTYPE|^\s*<html|^\s*<\?xml/i.test(t)?"html":/^#!.*python/m.test(t)||/\bdef\s+\w+\s*\(.*\)\s*:/m.test(t)||/\bclass\s+\w+.*:/m.test(t)||/^\s*(from\s+\w+\s+import|import\s+\w+)/m.test(t)&&/:$/.test(t)?"python":/\bfn\s+\w+\s*\(/.test(t)&&/\blet\s+(mut\s+)?\w+/.test(t)?"rust":/^package\s+\w+/m.test(t)&&/\bfunc\s+/.test(t)?"go":/\bpublic\s+(class|interface|static)\b/.test(t)?"java":/\bdef\s+\w+/.test(t)&&/\bend\b/.test(t)&&!/;/.test(t)?"ruby":/^#!.*\b(bash|sh|zsh)\b/m.test(t)?"shell":/\b(const|let|var)\s+\w+\s*=/.test(t)&&(/=>/.test(t)||/\brequire\s*\(/.test(t))||/^\s*import\s+.*\s+from\s+['"]/.test(t)||/^\s*export\s+(default\s+)?(function|class|const)\b/m.test(t)?"javascript":/[.#][\w-]+\s*\{[\s\S]*?:\s*[\w#]/.test(t)?"css":/^[\w-]+\s*:(\s+\S|$)/m.test(t)&&!/[{;]/.test(t)?"yaml":/\b(SELECT|INSERT|UPDATE|DELETE|CREATE\s+TABLE)\b/i.test(t)?"sql":null}const dG={javascript:[{pattern:/(\/\/.*$)/gm,cls:"hl-comment"},{pattern:/(\/\*[\s\S]*?\*\/)/g,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*`)/g,cls:"hl-string"},{pattern:/\b(const|let|var|function|return|if|else|for|while|class|import|export|from|default|new|this|async|await|try|catch|throw|switch|case|break|continue|typeof|instanceof|in|of|null|undefined|true|false)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],typescript:null,python:[{pattern:/(#.*$)/gm,cls:"hl-comment"},{pattern:/('''[\s\S]*?'''|"""[\s\S]*?"""|'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(def|class|return|if|elif|else|for|while|import|from|as|try|except|finally|raise|with|yield|lambda|pass|break|continue|and|or|not|in|is|None|True|False|self|async|await)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],go:[{pattern:/(\/\/.*$)/gm,cls:"hl-comment"},{pattern:/(\/\*[\s\S]*?\*\/)/g,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`[^`]*`)/g,cls:"hl-string"},{pattern:/\b(func|return|if|else|for|range|switch|case|default|break|continue|go|defer|select|chan|map|struct|interface|package|import|var|const|type|nil|true|false|make|new|append|len|cap)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],rust:[{pattern:/(\/\/.*$)/gm,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(fn|let|mut|return|if|else|for|while|loop|match|struct|enum|impl|trait|pub|use|mod|crate|self|super|where|async|await|move|ref|true|false|Some|None|Ok|Err)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],java:[{pattern:/(\/\/.*$)/gm,cls:"hl-comment"},{pattern:/(\/\*[\s\S]*?\*\/)/g,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(public|private|protected|class|interface|extends|implements|return|if|else|for|while|switch|case|break|continue|new|this|super|static|final|void|int|long|double|float|boolean|char|String|import|package|try|catch|throw|throws|null|true|false)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*[fFdDlL]?)\b/g,cls:"hl-number"}],ruby:[{pattern:/(#.*$)/gm,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(def|end|class|module|return|if|elsif|else|unless|for|while|do|begin|rescue|ensure|raise|yield|block_given\?|nil|true|false|self|require|include|attr_accessor|attr_reader)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],css:[{pattern:/(\/\*[\s\S]*?\*\/)/g,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,cls:"hl-string"},{pattern:/([.#][\w-]+)/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*(px|em|rem|%|vh|vw|s|ms)?)\b/g,cls:"hl-number"}],json:[{pattern:/("(?:[^"\\]|\\.)*")\s*:/g,cls:"hl-keyword"},{pattern:/:\s*("(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(true|false|null)\b/g,cls:"hl-keyword"},{pattern:/\b(-?\d+\.?\d*([eE][+-]?\d+)?)\b/g,cls:"hl-number"}],shell:[{pattern:/(#.*$)/gm,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(if|then|else|elif|fi|for|while|do|done|case|esac|function|return|exit|export|source|alias|cd|ls|grep|find|echo|cat|mkdir|rm|cp|mv|chmod|sudo|apt|npm|pip|git)\b/g,cls:"hl-keyword"}],sql:[{pattern:/(--.*$)/gm,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*')/g,cls:"hl-string"},{pattern:/\b(SELECT|FROM|WHERE|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER|TABLE|INDEX|JOIN|LEFT|RIGHT|INNER|OUTER|ON|AND|OR|NOT|IN|IS|NULL|AS|ORDER|BY|GROUP|HAVING|LIMIT|OFFSET|UNION|SET|VALUES|INTO|DISTINCT|COUNT|SUM|AVG|MAX|MIN|LIKE|BETWEEN|EXISTS|CASE|WHEN|THEN|ELSE|END)\b/gi,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],html:[{pattern:/(<!--[\s\S]*?-->)/g,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,cls:"hl-string"},{pattern:/(<\/?[\w-]+|\/?>)/g,cls:"hl-keyword"}],xml:null,yaml:[{pattern:/(#.*$)/gm,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,cls:"hl-string"},{pattern:/^([\w.-]+)\s*:/gm,cls:"hl-keyword"},{pattern:/\b(true|false|null|yes|no)\b/gi,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],markdown:[{pattern:/^(#{1,6}\s.*$)/gm,cls:"hl-keyword"},{pattern:/(`[^`]+`)/g,cls:"hl-string"},{pattern:/(\*\*[^*]+\*\*|__[^_]+__)/g,cls:"hl-keyword"},{pattern:/(\[[^\]]+\]\([^)]+\))/g,cls:"hl-string"}],toml:[{pattern:/(#.*$)/gm,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,cls:"hl-string"},{pattern:/^([\w.-]+)\s*=/gm,cls:"hl-keyword"},{pattern:/(\[[\w.-]+\])/g,cls:"hl-keyword"},{pattern:/\b(true|false)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}]},hG=[{pattern:/(\/\/.*$|#.*$)/gm,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*`)/g,cls:"hl-string"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],fG=[{pattern:/^([\w/.~-]+:\d+[:-])/gm,cls:"hl-keyword"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],mG=[{pattern:/^(.*\.(jsx?|tsx?|mjs|cjs))$/gm,cls:"hl-string"},{pattern:/^(.*\.(py|rb|go|rs|java|c|cpp|h))$/gm,cls:"hl-keyword"},{pattern:/^(.*\.(json|ya?ml|toml|xml|html?|css|scss|less|md))$/gm,cls:"hl-number"},{pattern:/^(.*\.(log|txt|csv|jsonl))$/gm,cls:"hl-comment"}];function pG(e,t){let n=t;n==="typescript"&&(n="javascript"),n==="xml"&&(n="html"),(n==="c"||n==="cpp")&&(n="javascript");let r;n==="shell-output"?r=fG:n==="file-list"?r=mG:r=dG[n]||hG;const i=/^(\s*\d+→)/gm,o=[];let a=e.replace(i,f=>{const m=o.length;return o.push(f),`L${m}`});const c=vf(a),u=[];let d=c;for(const f of r)f.pattern.lastIndex=0,d=d.replace(f.pattern,m=>{const g=u.length;return u.push(`<span class="${f.cls}">${m}</span>`),`P${g}`});return d=d.replace(/\x02P(\d+)\x02/g,(f,m)=>u[parseInt(m)]),d=d.replace(/\x01L(\d+)\x01/g,(f,m)=>`<span class="hl-linenum">${vf(o[parseInt(m)])}</span>`),d}function vx({toolName:e,toolInput:t,resultText:n,defaultCollapsed:r}){const[i,o]=h.useState(r??!1);h.useEffect(()=>{o(r??!1)},[r]);const a=lG.includes(e),c=a?cG(e,t,n):null,u=n.length>5e3?n.substring(0,5e3)+`
572
+ ... (truncated)`:n;let d=e?Ce("ui.toolReturnNamed",{name:e}):"Result";if(t){const m=t.file_path||t.path||"";if(m){const g=m.split("/");d=`${e}: ${g[g.length-1]}`}}if(!a)return e==="Task"?x.jsxs("div",{className:di.plainResult,children:[x.jsxs("div",{className:di.codeHeader,children:[x.jsx(Tl,{type:"secondary",className:di.plainTitle,children:d}),x.jsx(Tl,{className:di.codeToggle,onClick:()=>o(m=>!m),children:Ce(i?"ui.expand":"ui.collapse")})]}),!i&&x.jsx("div",{className:`chat-md ${di.markdownBody}`,dangerouslySetInnerHTML:{__html:Ro(u)}})]}):x.jsxs("div",{className:di.plainResult,children:[x.jsxs("div",{className:di.codeHeader,children:[x.jsx(Tl,{type:"secondary",className:di.plainTitle,children:d}),x.jsx(Tl,{className:di.codeToggle,onClick:()=>o(m=>!m),children:Ce(i?"ui.expand":"ui.collapse")})]}),!i&&x.jsx("pre",{className:di.plainPre,children:u})]});const f=pG(u,c||"fallback");return x.jsxs("div",{className:`tool-result-code ${di.codeResult}`,children:[x.jsxs("div",{className:di.codeHeader,children:[x.jsxs(Tl,{className:di.codeTitle,children:[d,c?` (${c})`:""]}),x.jsx(Tl,{className:di.codeToggle,onClick:()=>o(m=>!m),children:Ce(i?"ui.expand":"ui.collapse")})]}),!i&&x.jsx("pre",{className:`code-highlight ${di.codePre}`,dangerouslySetInnerHTML:{__html:f}})]})}const gG="_avatar_w9l4s_3",vG="_avatarImg_w9l4s_13",yG="_messageRow_w9l4s_32",bG="_messageRowEnd_w9l4s_38",_G="_contentCol_w9l4s_47",SG="_contentColLimited_w9l4s_52",CG="_labelRow_w9l4s_60",wG="_labelRowEnd_w9l4s_67",xG="_labelRight_w9l4s_74",EG="_labelText_w9l4s_82",kG="_timeText_w9l4s_86",$G="_timeTextNoMargin_w9l4s_92",RG="_labelTextRight_w9l4s_98",TG="_bubbleUser_w9l4s_105 _bubble_w9l4s_21",PG="_bubbleAssistant_w9l4s_111 _bubble_w9l4s_21",OG="_bubbleHighlight_w9l4s_119",IG="_bubbleHighlightFading_w9l4s_123",NG="_borderSvg_w9l4s_128",MG="_borderSvgFading_w9l4s_137",zG="_borderRect_w9l4s_142",jG="_bubblePlan_w9l4s_151 _bubble_w9l4s_21",BG="_bubbleSubAgent_w9l4s_159 _bubble_w9l4s_21",LG="_bubbleSelection_w9l4s_165 _bubble_w9l4s_21",AG="_systemTagLabel_w9l4s_173",DG="_skillLabel_w9l4s_177",HG="_systemTagPre_w9l4s_182",FG="_collapseMargin_w9l4s_190",WG="_collapseNoMargin_w9l4s_194",VG="_thinkingLabel_w9l4s_200",UG="_toolBox_w9l4s_206",qG="_toolLabel_w9l4s_215",KG="_codePre_w9l4s_221",GG="_pathTag_w9l4s_233",XG="_descSpan_w9l4s_240",YG="_secondarySpan_w9l4s_245",JG="_patternSpan_w9l4s_249",QG="_kvContainer_w9l4s_255",ZG="_kvItem_w9l4s_260",eX="_kvKey_w9l4s_264",tX="_kvValue_w9l4s_268",nX="_toolResult_w9l4s_274",rX="_toolResultLabel_w9l4s_283",iX="_compactLabel_w9l4s_289",oX="_compactPre_w9l4s_294",sX="_viewRequestBtn_w9l4s_304",aX="_optionList_w9l4s_318",lX="_optionDesc_w9l4s_322",cX="_questionText_w9l4s_330",uX="_questionSpacing_w9l4s_336",dX="_option_w9l4s_318",hX="_askQuestionBox_w9l4s_349",fX="_askQuestionHeader_w9l4s_358",mX="_askQuestionText_w9l4s_369",pX="_askOptionItem_w9l4s_375",gX="_planModeBox_w9l4s_383",vX="_planModeLabel_w9l4s_392",yX="_planModePermissions_w9l4s_397",bX="_planModePermLabel_w9l4s_403",De={avatar:gG,avatarImg:vG,messageRow:yG,messageRowEnd:bG,contentCol:_G,contentColLimited:SG,labelRow:CG,labelRowEnd:wG,labelRight:xG,labelText:EG,timeText:kG,timeTextNoMargin:$G,labelTextRight:RG,bubbleUser:TG,bubbleAssistant:PG,bubbleHighlight:OG,bubbleHighlightFading:IG,borderSvg:NG,borderSvgFading:MG,borderRect:zG,bubblePlan:jG,bubbleSubAgent:BG,bubbleSelection:LG,systemTagLabel:AG,skillLabel:DG,systemTagPre:HG,collapseMargin:FG,collapseNoMargin:WG,thinkingLabel:VG,toolBox:UG,toolLabel:qG,codePre:KG,pathTag:GG,descSpan:XG,secondarySpan:YG,patternSpan:JG,kvContainer:QG,kvItem:ZG,kvKey:eX,kvValue:tX,toolResult:nX,toolResultLabel:rX,compactLabel:iX,compactPre:oX,viewRequestBtn:sX,optionList:aX,optionDesc:lX,questionText:cX,questionSpacing:uX,option:dX,askQuestionBox:hX,askQuestionHeader:fX,askQuestionText:mX,askOptionItem:pX,planModeBox:gX,planModeLabel:vX,planModePermissions:yX,planModePermLabel:bX},{Text:Ri}=No;class Co extends J.Component{constructor(n){super(n);kt(this,"handleThinkingTranslated",(n,r)=>{this.setState(i=>({thinkingTranslated:{...i.thinkingTranslated,[n]:r?Ro(r):null}}))});this.state={thinkingTranslated:{}}}formatTime(n){if(!n)return null;try{const r=new Date(n),i=o=>String(o).padStart(2,"0");return`${i(r.getMonth()+1)}-${i(r.getDate())} ${i(r.getHours())}:${i(r.getMinutes())}:${i(r.getSeconds())}`}catch{return null}}renderViewRequestBtn(){const{requestIndex:n,onViewRequest:r}=this.props;return n==null||!r?null:x.jsx("span",{className:De.viewRequestBtn,onClick:i=>{i.stopPropagation(),r(n)},children:Ce("ui.viewRequest")})}renderLabel(n,r){const{timestamp:i}=this.props,o=this.formatTime(i);return x.jsxs("div",{className:De.labelRow,children:[x.jsxs(Ri,{type:"secondary",className:De.labelText,children:[n,r||""]}),x.jsxs("span",{className:De.labelRight,children:[this.renderViewRequestBtn(),o&&x.jsx(Ri,{className:De.timeText,children:o})]})]})}renderUserAvatar(n){const{userProfile:r}=this.props;return r!=null&&r.avatar?x.jsx("img",{src:r.avatar,className:De.avatarImg,alt:r.name||"User"}):x.jsx("div",{className:De.avatar,style:{background:n},dangerouslySetInnerHTML:{__html:Nl("user")}})}getUserName(){const{userProfile:n}=this.props;return(n==null?void 0:n.name)||"User"}renderSegments(n){return n.map((r,i)=>r.type==="system-tag"?x.jsx(eu,{ghost:!0,size:"small",items:[{key:"1",label:x.jsx(Ri,{type:"secondary",className:De.systemTagLabel,children:r.tag}),children:x.jsx("pre",{className:De.systemTagPre,children:r.content})}],className:De.collapseMargin},i):x.jsx("div",{className:"chat-md",dangerouslySetInnerHTML:{__html:Ro(r.content)}},i))}renderToolCall(n){if(typeof n.input=="string")try{const f=n.input.replace(/^\[object Object\]/,"");n={...n,input:JSON.parse(f)}}catch{}if(n.name==="Edit"&&n.input&&n.input.old_string!=null&&n.input.new_string!=null)return x.jsx(QK,{file_path:n.input.file_path||"",old_string:n.input.old_string,new_string:n.input.new_string},n.id);const r=n.input&&typeof n.input=="object"?n.input:{},i=(f,m)=>x.jsxs("div",{className:De.toolBox,children:[x.jsx(Ri,{strong:!0,className:De.toolLabel,children:f}),m]},n.id),o=(f,m)=>x.jsx("pre",{className:De.codePre,style:{color:m},children:f}),a=f=>x.jsx("span",{className:De.pathTag,children:f});if(n.name==="Bash"){const f=r.command||"",m=r.description||"";return i(x.jsxs(x.Fragment,{children:["Bash",m?x.jsxs("span",{className:De.descSpan,children:[" — ",m]}):""]}),o(f,"#c9d1d9"))}if(n.name==="Read"){const f=r.file_path||"",m=[];r.offset&&m.push(`offset: ${r.offset}`),r.limit&&m.push(`limit: ${r.limit}`);const g=m.length?` (${m.join(", ")})`:"";return i(x.jsxs(x.Fragment,{children:["Read: ",a(f),x.jsx("span",{className:De.secondarySpan,children:g})]}),null)}if(n.name==="Write"){const f=r.file_path||"",m=r.content||"",g=m.split(`
573
+ `),v=g.length>20?g.slice(0,20).join(`
574
+ `)+`
575
+ ... (${g.length} lines total)`:m;return i(x.jsxs(x.Fragment,{children:["Write: ",a(f)," ",x.jsxs("span",{className:De.secondarySpan,children:["(",g.length," lines)"]})]}),o(v,"#c9d1d9"))}if(n.name==="Glob"){const f=r.pattern||"",m=r.path||"";return i(x.jsxs(x.Fragment,{children:["Glob: ",x.jsx("span",{className:De.patternSpan,children:f}),m?x.jsxs("span",{className:De.secondarySpan,children:[" in ",m]}):""]}),null)}if(n.name==="Grep"){const f=r.pattern||"",m=r.path||"",g=[];r.glob&&g.push(`glob: ${r.glob}`),r.output_mode&&g.push(`mode: ${r.output_mode}`),r.head_limit&&g.push(`limit: ${r.head_limit}`);const v=g.length?` (${g.join(", ")})`:"";return i(x.jsxs(x.Fragment,{children:["Grep: ",x.jsxs("span",{className:De.patternSpan,children:["/",f,"/"]}),m?x.jsxs("span",{className:De.secondarySpan,children:[" in ",m]}):"",x.jsx("span",{className:De.secondarySpan,children:v})]}),null)}if(n.name==="Task"){const f=r.subagent_type||"",m=r.description||"";return i(x.jsxs(x.Fragment,{children:["Task(",f,m?": "+m:"",")"]}),null)}if(n.name==="AskUserQuestion"){const f=r.questions||[];return x.jsx("div",{className:De.askQuestionBox,children:f.map((m,g)=>x.jsxs("div",{className:g<f.length-1?De.questionSpacing:void 0,children:[m.header&&x.jsx("span",{className:De.askQuestionHeader,children:m.header}),x.jsx("div",{className:De.askQuestionText,children:m.question}),x.jsx("div",{className:De.optionList,children:m.options&&m.options.map((v,y)=>x.jsxs("div",{className:De.askOptionItem,children:["○ ",v.label,v.description&&x.jsxs("span",{className:De.optionDesc,children:["— ",v.description]})]},y))})]},g))},n.id)}if(n.name==="EnterPlanMode")return x.jsx("div",{className:De.planModeBox,children:x.jsx("span",{className:De.planModeLabel,children:Ce("ui.enterPlanMode")})},n.id);if(n.name==="ExitPlanMode"){const f=r.allowedPrompts||[];return x.jsxs("div",{className:De.planModeBox,children:[x.jsx("span",{className:De.planModeLabel,children:Ce("ui.exitPlanMode")}),f.length>0&&x.jsxs("div",{className:De.planModePermissions,children:[x.jsx("div",{className:De.planModePermLabel,children:Ce("ui.allowedPrompts")}),f.map((m,g)=>x.jsxs("div",{className:De.askOptionItem,children:["• ",m.prompt||m.tool]},g))]})]},n.id)}let c=n.name;const u=Object.keys(r);if(u.length===0)return i(c,null);const d=u.map(f=>{const m=r[f],g=typeof m=="string"?m:JSON.stringify(m),v=g.length>200?g.substring(0,200)+"...":g;return x.jsxs("div",{className:De.kvItem,children:[x.jsxs("span",{className:De.kvKey,children:[f,": "]}),x.jsx("span",{className:De.kvValue,children:v})]},f)});return i(c,x.jsx("div",{className:De.kvContainer,children:d}))}renderHighlightBubble(n,r){const{highlight:i}=this.props,o=`${n}${i==="active"?" "+De.bubbleHighlight:""}${i==="fading"?" "+De.bubbleHighlightFading:""}`,a=n===De.bubbleUser;return x.jsxs("div",{className:o,style:{position:"relative"},children:[(i==="active"||i==="fading")&&x.jsx("svg",{className:`${De.borderSvg}${i==="fading"?" "+De.borderSvgFading:""}`,preserveAspectRatio:"none",children:x.jsx("rect",{x:"0.5",y:"0.5",width:"calc(100% - 1px)",height:"calc(100% - 1px)",rx:"8",ry:"8",fill:"none",stroke:a?"#ffffff":"#1668dc",strokeWidth:"1",strokeDasharray:"6 4",className:De.borderRect})}),r]})}renderUserMessage(){const{text:n,timestamp:r}=this.props,i=this.formatTime(r),o=this.getUserName();return n&&n.includes("This session is being continued from a previous conversation that ran out of context")?x.jsxs("div",{className:De.messageRowEnd,children:[x.jsxs("div",{className:De.contentColLimited,children:[x.jsxs("div",{className:De.labelRow,children:[i&&x.jsx(Ri,{className:De.timeTextNoMargin,children:i}),this.renderViewRequestBtn(),x.jsxs(Ri,{type:"secondary",className:De.labelTextRight,children:[o," — /compact"]})]}),this.renderHighlightBubble(De.bubbleUser,x.jsx(eu,{ghost:!0,size:"small",items:[{key:"1",label:x.jsx(Ri,{className:De.compactLabel,children:"Compact Summary"}),children:x.jsx("pre",{className:De.compactPre,children:n})}],className:De.collapseNoMargin}))]}),this.renderUserAvatar("#1e40af")]}):x.jsxs("div",{className:De.messageRowEnd,children:[x.jsxs("div",{className:De.contentColLimited,children:[x.jsxs("div",{className:De.labelRow,children:[i&&x.jsx(Ri,{className:De.timeTextNoMargin,children:i}),this.renderViewRequestBtn(),x.jsx(Ri,{type:"secondary",className:De.labelTextRight,children:o})]}),this.renderHighlightBubble(De.bubbleUser,vf(n))]}),this.renderUserAvatar("#1e40af")]})}renderToolResult(n){return n?x.jsxs("div",{className:De.toolResult,children:[x.jsx(Ri,{type:"secondary",className:De.toolResultLabel,children:n.label}),x.jsx(vx,{toolName:n.toolName,toolInput:n.toolInput,resultText:n.resultText,defaultCollapsed:this.props.collapseToolResults})]}):null}renderAssistantContent(n,r={}){const i=n.filter(u=>u.type==="thinking"),o=n.filter(u=>u.type==="text"),a=n.filter(u=>u.type==="tool_use");let c=[];return i.forEach((u,d)=>{const m=this.state.thinkingTranslated[d]||Ro(u.thinking||"");c.push(x.jsx(eu,{ghost:!0,size:"small",defaultActiveKey:this.props.expandThinking?["1"]:[],items:[{key:"1",label:x.jsxs("span",{children:[x.jsx(Ri,{type:"secondary",className:De.thinkingLabel,children:Ce("ui.thinking")}),x.jsx(kb,{text:u.thinking||"",onTranslated:g=>this.handleThinkingTranslated(d,g)})]}),children:x.jsx("div",{className:"chat-md",dangerouslySetInnerHTML:{__html:m}})}],className:De.collapseMargin},`think-${d}-${this.props.expandThinking?"e":"c"}`))}),o.forEach((u,d)=>{if(u.text){const{segments:f}=qK(u.text);c.push(x.jsx("div",{children:this.renderSegments(f)},`text-${d}`))}}),a.forEach(u=>{c.push(this.renderToolCall(u));const d=r[u.id];d&&c.push(x.jsx(J.Fragment,{children:this.renderToolResult(d)},`tr-${u.id}`))}),c}renderAssistantMessage(){const{content:n,toolResultMap:r={},modelInfo:i}=this.props,o=this.renderAssistantContent(n,r);return o.length===0?null:x.jsxs("div",{className:De.messageRow,children:[x.jsx("div",{className:De.avatar,style:{background:(i==null?void 0:i.color)||"#6b21a8"},dangerouslySetInnerHTML:{__html:(i==null?void 0:i.svg)||Nl("agent")}}),x.jsxs("div",{className:De.contentCol,children:[this.renderLabel((i==null?void 0:i.name)||"MainAgent"),this.renderHighlightBubble(De.bubbleAssistant,o)]})]})}renderSubAgentChatMessage(){const{content:n,toolResultMap:r={},label:i}=this.props,o=this.renderAssistantContent(n,r);return o.length===0?null:x.jsxs("div",{className:De.messageRowEnd,children:[x.jsxs("div",{className:De.contentColLimited,children:[x.jsxs("div",{className:De.labelRowEnd,children:[this.formatTime(this.props.timestamp)&&x.jsx(Ri,{className:De.timeText,children:this.formatTime(this.props.timestamp)}),this.renderViewRequestBtn(),x.jsx(Ri,{type:"secondary",className:De.labelTextRight,children:i||"SubAgent"})]}),this.renderHighlightBubble(De.bubbleAssistant,o)]}),x.jsx("div",{className:De.avatar,style:{background:"#4a1d96"},dangerouslySetInnerHTML:{__html:Nl("sub")}})]})}renderSubAgentMessage(){const{label:n,resultText:r,toolName:i,toolInput:o}=this.props;return x.jsxs("div",{className:De.messageRow,children:[x.jsx("div",{className:De.avatar,style:{background:"#4a1d96"},dangerouslySetInnerHTML:{__html:Nl("sub")}}),x.jsxs("div",{className:De.contentCol,children:[this.renderLabel(n),x.jsx("div",{className:De.bubbleSubAgent,children:x.jsx(vx,{toolName:i,toolInput:o,resultText:r})})]})]})}renderUserSelectionMessage(){const{questions:n,answers:r}=this.props,i=this.getUserName();return x.jsxs("div",{className:De.messageRowEnd,children:[x.jsxs("div",{className:De.contentColLimited,children:[this.renderLabel(i," — 选择"),x.jsx("div",{className:De.bubbleSelection,children:n&&n.map((o,a)=>{const c=(r==null?void 0:r[o.question])||"未选择";return x.jsxs("div",{className:a<n.length-1?De.questionSpacing:void 0,children:[x.jsx("div",{className:De.questionText,children:o.question}),x.jsx("div",{className:De.optionList,children:o.options&&o.options.map((u,d)=>{const f=c===u.label;return x.jsxs("div",{className:De.option,style:{color:f?"#e5e5e5":"#666",fontWeight:f?600:"normal"},children:[f?"● ":"○ ",u.label,u.description&&x.jsxs("span",{className:De.optionDesc,children:["— ",u.description]})]},d)})})]},a)})})]}),this.renderUserAvatar("#2ea043")]})}renderPlanPromptMessage(){const{text:n,timestamp:r,modelInfo:i}=this.props;this.formatTime(r);const o=(n||"").replace(/^Implement the following plan:\s*/i,"");return x.jsxs("div",{className:De.messageRow,children:[x.jsx("div",{className:De.avatar,style:{background:(i==null?void 0:i.color)||"#6b21a8"},dangerouslySetInnerHTML:{__html:(i==null?void 0:i.svg)||Nl("agent")}}),x.jsxs("div",{className:De.contentColLimited,children:[this.renderLabel((i==null?void 0:i.name)||"MainAgent"," (Plan)"),x.jsx("div",{className:De.bubblePlan,children:x.jsx("div",{className:"chat-md",dangerouslySetInnerHTML:{__html:Ro(o)}})})]})]})}renderSkillLoadedMessage(){const{text:n,skillName:r,timestamp:i}=this.props,o=this.formatTime(i);return x.jsxs("div",{className:De.messageRow,children:[x.jsx("div",{style:{width:32,flexShrink:0}}),x.jsx("div",{className:De.contentCol,children:x.jsx(eu,{ghost:!0,size:"small",items:[{key:"1",label:x.jsxs("span",{className:De.skillLabel,children:["📦 ",Ce("ui.skillLoaded"),": ",r,o&&x.jsx(Ri,{className:De.timeTextNoMargin,style:{marginLeft:8},children:o})]}),children:x.jsx("div",{className:"chat-md",dangerouslySetInnerHTML:{__html:Ro(n)}})}],className:De.collapseNoMargin})})]})}render(){const{role:n}=this.props;return n==="user"?this.renderUserMessage():n==="skill-loaded"?this.renderSkillLoadedMessage():n==="plan-prompt"?this.renderPlanPromptMessage():n==="user-selection"?this.renderUserSelectionMessage():n==="assistant"?this.renderAssistantMessage():n==="sub-agent-chat"?this.renderSubAgentChatMessage():n==="sub-agent"?this.renderSubAgentMessage():null}}/**
576
+ * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
577
+ * @license MIT
578
+ *
579
+ * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
580
+ * @license MIT
581
+ *
582
+ * Originally forked from (with the author's permission):
583
+ * Fabrice Bellard's javascript vt100 for jslinux:
584
+ * http://bellard.org/jslinux/
585
+ * Copyright (c) 2011 Fabrice Bellard
586
+ */var Y3=Object.defineProperty,_X=Object.getOwnPropertyDescriptor,SX=(e,t)=>{for(var n in t)Y3(e,n,{get:t[n],enumerable:!0})},or=(e,t,n,r)=>{for(var i=r>1?void 0:r?_X(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&Y3(t,n,i),i},ct=(e,t)=>(n,r)=>t(n,r,e),yx="Terminal input",$0={get:()=>yx,set:e=>yx=e},bx="Too much output to announce, navigate to rows manually to read",R0={get:()=>bx,set:e=>bx=e};function CX(e){return e.replace(/\r?\n/g,"\r")}function wX(e,t){return t?"\x1B[200~"+e+"\x1B[201~":e}function xX(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()}function EX(e,t,n,r){if(e.stopPropagation(),e.clipboardData){let i=e.clipboardData.getData("text/plain");J3(i,t,n,r)}}function J3(e,t,n,r){e=CX(e),e=wX(e,n.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=""}function Q3(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,o=e.clientY-r.top-10;t.style.width="20px",t.style.height="20px",t.style.left=`${i}px`,t.style.top=`${o}px`,t.style.zIndex="1000",t.focus()}function _x(e,t,n,r,i){Q3(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function Vs(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function _m(e,t=0,n=e.length){let r="";for(let i=t;i<n;++i){let o=e[i];o>65535?(o-=65536,r+=String.fromCharCode((o>>10)+55296)+String.fromCharCode(o%1024+56320)):r+=String.fromCharCode(o)}return r}var kX=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){let o=e.charCodeAt(i++);56320<=o&&o<=57343?t[r++]=(this._interim-55296)*1024+o-56320+65536:(t[r++]=this._interim,t[r++]=o),this._interim=0}for(let o=i;o<n;++o){let a=e.charCodeAt(o);if(55296<=a&&a<=56319){if(++o>=n)return this._interim=a,r;let c=e.charCodeAt(o);56320<=c&&c<=57343?t[r++]=(a-55296)*1024+c-56320+65536:(t[r++]=a,t[r++]=c);continue}a!==65279&&(t[r++]=a)}return r}},$X=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i,o,a,c,u=0,d=0;if(this.interim[0]){let g=!1,v=this.interim[0];v&=(v&224)===192?31:(v&240)===224?15:7;let y=0,S;for(;(S=this.interim[++y]&63)&&y<4;)v<<=6,v|=S;let _=(this.interim[0]&224)===192?2:(this.interim[0]&240)===224?3:4,C=_-y;for(;d<C;){if(d>=n)return 0;if(S=e[d++],(S&192)!==128){d--,g=!0;break}else this.interim[y++]=S,v<<=6,v|=S&63}g||(_===2?v<128?d--:t[r++]=v:_===3?v<2048||v>=55296&&v<=57343||v===65279||(t[r++]=v):v<65536||v>1114111||(t[r++]=v)),this.interim.fill(0)}let f=n-4,m=d;for(;m<n;){for(;m<f&&!((i=e[m])&128)&&!((o=e[m+1])&128)&&!((a=e[m+2])&128)&&!((c=e[m+3])&128);)t[r++]=i,t[r++]=o,t[r++]=a,t[r++]=c,m+=4;if(i=e[m++],i<128)t[r++]=i;else if((i&224)===192){if(m>=n)return this.interim[0]=i,r;if(o=e[m++],(o&192)!==128){m--;continue}if(u=(i&31)<<6|o&63,u<128){m--;continue}t[r++]=u}else if((i&240)===224){if(m>=n)return this.interim[0]=i,r;if(o=e[m++],(o&192)!==128){m--;continue}if(m>=n)return this.interim[0]=i,this.interim[1]=o,r;if(a=e[m++],(a&192)!==128){m--;continue}if(u=(i&15)<<12|(o&63)<<6|a&63,u<2048||u>=55296&&u<=57343||u===65279)continue;t[r++]=u}else if((i&248)===240){if(m>=n)return this.interim[0]=i,r;if(o=e[m++],(o&192)!==128){m--;continue}if(m>=n)return this.interim[0]=i,this.interim[1]=o,r;if(a=e[m++],(a&192)!==128){m--;continue}if(m>=n)return this.interim[0]=i,this.interim[1]=o,this.interim[2]=a,r;if(c=e[m++],(c&192)!==128){m--;continue}if(u=(i&7)<<18|(o&63)<<12|(a&63)<<6|c&63,u<65536||u>1114111)continue;t[r++]=u}}return r}},Z3="",Gs=" ",ed=class e4{constructor(){this.fg=0,this.bg=0,this.extended=new $f}static toColorRGB(t){return[t>>>16&255,t>>>8&255,t&255]}static fromColorRGB(t){return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255}clone(){let t=new e4;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},$f=class t4{constructor(t=0,n=0){this._ext=0,this._urlId=0,this._ext=t,this._urlId=n}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(t){this._ext&=-67108864,this._ext|=t&67108863}get urlId(){return this._urlId}set urlId(t){this._urlId=t}get underlineVariantOffset(){let t=(this._ext&3758096384)>>29;return t<0?t^4294967288:t}set underlineVariantOffset(t){this._ext&=536870911,this._ext|=t<<29&3758096384}clone(){return new t4(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},uo=class n4 extends ed{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new $f,this.combinedData=""}static fromCharData(t){let n=new n4;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?Vs(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(t){this.fg=t[0],this.bg=0;let n=!1;if(t[1].length>2)n=!0;else if(t[1].length===2){let r=t[1].charCodeAt(0);if(55296<=r&&r<=56319){let i=t[1].charCodeAt(1);56320<=i&&i<=57343?this.content=(r-55296)*1024+i-56320+65536|t[2]<<22:n=!0}else n=!0}else this.content=t[1].charCodeAt(0)|t[2]<<22;n&&(this.combinedData=t[1],this.content=2097152|t[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},Sx="di$target",T0="di$dependencies",Jg=new Map;function RX(e){return e[T0]||[]}function Dr(e){if(Jg.has(e))return Jg.get(e);let t=function(n,r,i){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");TX(t,n,i)};return t._id=e,Jg.set(e,t),t}function TX(e,t,n){t[Sx]===t?t[T0].push({id:e,index:n}):(t[T0]=[{id:e,index:n}],t[Sx]=t)}var vi=Dr("BufferService"),r4=Dr("CoreMouseService"),Va=Dr("CoreService"),PX=Dr("CharsetService"),$b=Dr("InstantiationService"),i4=Dr("LogService"),yi=Dr("OptionsService"),o4=Dr("OscLinkService"),OX=Dr("UnicodeService"),td=Dr("DecorationService"),P0=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){var f;let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let r=[],i=this._optionsService.rawOptions.linkHandler,o=new uo,a=n.getTrimmedLength(),c=-1,u=-1,d=!1;for(let m=0;m<a;m++)if(!(u===-1&&!n.hasContent(m))){if(n.loadCell(m,o),o.hasExtendedAttrs()&&o.extended.urlId)if(u===-1){u=m,c=o.extended.urlId;continue}else d=o.extended.urlId!==c;else u!==-1&&(d=!0);if(d||u!==-1&&m===a-1){let g=(f=this._oscLinkService.getLinkData(c))==null?void 0:f.uri;if(g){let v={start:{x:u+1,y:e},end:{x:m+(!d&&m===a-1?1:0),y:e}},y=!1;if(!(i!=null&&i.allowNonHttpProtocols))try{let S=new URL(g);["http:","https:"].includes(S.protocol)||(y=!0)}catch{y=!0}y||r.push({text:g,range:v,activate:(S,_)=>i?i.activate(S,_,v):IX(S,_),hover:(S,_)=>{var C;return(C=i==null?void 0:i.hover)==null?void 0:C.call(i,S,_,v)},leave:(S,_)=>{var C;return(C=i==null?void 0:i.leave)==null?void 0:C.call(i,S,_,v)}})}d=!1,o.hasExtendedAttrs()&&o.extended.urlId?(u=m,c=o.extended.urlId):(u=-1,c=-1)}}t(r)}};P0=or([ct(0,vi),ct(1,yi),ct(2,o4)],P0);function IX(e,t){if(confirm(`Do you want to navigate to ${t}?
587
+
588
+ WARNING: This link could potentially be dangerous`)){let n=window.open();if(n){try{n.opener=null}catch{}n.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}}var Sm=Dr("CharSizeService"),bs=Dr("CoreBrowserService"),Rb=Dr("MouseService"),_s=Dr("RenderService"),NX=Dr("SelectionService"),s4=Dr("CharacterJoinerService"),cc=Dr("ThemeService"),a4=Dr("LinkProviderService"),MX=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Cx.isErrorNoTelemetry(e)?new Cx(e.message+`
589
+
590
+ `+e.stack):new Error(e.message+`
591
+
592
+ `+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},zX=new MX;function Wh(e){jX(e)||zX.onUnexpectedError(e)}var O0="Canceled";function jX(e){return e instanceof BX?!0:e instanceof Error&&e.name===O0&&e.message===O0}var BX=class extends Error{constructor(){super(O0),this.name=this.message}};function LX(e){return new Error(`Illegal argument: ${e}`)}var Cx=class I0 extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof I0)return t;let n=new I0;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},N0=class l4 extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,l4.prototype)}};function Di(e,t=0){return e[e.length-(1+t)]}var AX;(e=>{function t(o){return o<0}e.isLessThan=t;function n(o){return o<=0}e.isLessThanOrEqual=n;function r(o){return o>0}e.isGreaterThan=r;function i(o){return o===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(AX||(AX={}));function DX(e,t){let n=this,r=!1,i;return function(){return r||(r=!0,t||(i=e.apply(n,arguments))),i}}var c4;(e=>{function t($){return $&&typeof $=="object"&&typeof $[Symbol.iterator]=="function"}e.is=t;let n=Object.freeze([]);function r(){return n}e.empty=r;function*i($){yield $}e.single=i;function o($){return t($)?$:i($)}e.wrap=o;function a($){return $||n}e.from=a;function*c($){for(let P=$.length-1;P>=0;P--)yield $[P]}e.reverse=c;function u($){return!$||$[Symbol.iterator]().next().done===!0}e.isEmpty=u;function d($){return $[Symbol.iterator]().next().value}e.first=d;function f($,P){let T=0;for(let O of $)if(P(O,T++))return!0;return!1}e.some=f;function m($,P){for(let T of $)if(P(T))return T}e.find=m;function*g($,P){for(let T of $)P(T)&&(yield T)}e.filter=g;function*v($,P){let T=0;for(let O of $)yield P(O,T++)}e.map=v;function*y($,P){let T=0;for(let O of $)yield*P(O,T++)}e.flatMap=y;function*S(...$){for(let P of $)yield*P}e.concat=S;function _($,P,T){let O=T;for(let N of $)O=P(O,N);return O}e.reduce=_;function*C($,P,T=$.length){for(P<0&&(P+=$.length),T<0?T+=$.length:T>$.length&&(T=$.length);P<T;P++)yield $[P]}e.slice=C;function E($,P=Number.POSITIVE_INFINITY){let T=[];if(P===0)return[T,$];let O=$[Symbol.iterator]();for(let N=0;N<P;N++){let I=O.next();if(I.done)return[T,e.empty()];T.push(I.value)}return[T,{[Symbol.iterator](){return O}}]}e.consume=E;async function k($){let P=[];for await(let T of $)P.push(T);return Promise.resolve(P)}e.asyncToArray=k})(c4||(c4={}));function Ba(e){if(c4.is(e)){let t=[];for(let n of e)if(n)try{n.dispose()}catch(r){t.push(r)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function HX(...e){return Kn(()=>Ba(e))}function Kn(e){return{dispose:DX(()=>{e()})}}var u4=class d4{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Ba(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?d4.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),void 0)}};u4.DISABLE_DISPOSED_WARNING=!1;var Ys=u4,en=class{constructor(){this._store=new Ys,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};en.None=Object.freeze({dispose(){}});var tc=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||((t=this._value)==null||t.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,(e=this._value)==null||e.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e}},ms=typeof window=="object"?window:globalThis,M0=class z0{constructor(t){this.element=t,this.next=z0.Undefined,this.prev=z0.Undefined}};M0.Undefined=new M0(void 0);var Qn=M0,wx=class{constructor(){this._first=Qn.Undefined,this._last=Qn.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Qn.Undefined}clear(){let e=this._first;for(;e!==Qn.Undefined;){let t=e.next;e.prev=Qn.Undefined,e.next=Qn.Undefined,e=t}this._first=Qn.Undefined,this._last=Qn.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let n=new Qn(e);if(this._first===Qn.Undefined)this._first=n,this._last=n;else if(t){let i=this._last;this._last=n,n.prev=i,i.next=n}else{let i=this._first;this._first=n,n.next=i,i.prev=n}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(n))}}shift(){if(this._first!==Qn.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Qn.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Qn.Undefined&&e.next!==Qn.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Qn.Undefined&&e.next===Qn.Undefined?(this._first=Qn.Undefined,this._last=Qn.Undefined):e.next===Qn.Undefined?(this._last=this._last.prev,this._last.next=Qn.Undefined):e.prev===Qn.Undefined&&(this._first=this._first.next,this._first.prev=Qn.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Qn.Undefined;)yield e.element,e=e.next}},FX=globalThis.performance&&typeof globalThis.performance.now=="function",WX=class h4{static create(t){return new h4(t)}constructor(t){this._now=FX&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},Kr;(e=>{e.None=()=>en.None;function t(M,j){return m(M,()=>{},0,void 0,!0,void 0,j)}e.defer=t;function n(M){return(j,B=null,H)=>{let W=!1,V;return V=M(A=>{if(!W)return V?V.dispose():W=!0,j.call(B,A)},null,H),W&&V.dispose(),V}}e.once=n;function r(M,j,B){return d((H,W=null,V)=>M(A=>H.call(W,j(A)),null,V),B)}e.map=r;function i(M,j,B){return d((H,W=null,V)=>M(A=>{j(A),H.call(W,A)},null,V),B)}e.forEach=i;function o(M,j,B){return d((H,W=null,V)=>M(A=>j(A)&&H.call(W,A),null,V),B)}e.filter=o;function a(M){return M}e.signal=a;function c(...M){return(j,B=null,H)=>{let W=HX(...M.map(V=>V(A=>j.call(B,A))));return f(W,H)}}e.any=c;function u(M,j,B,H){let W=B;return r(M,V=>(W=j(W,V),W),H)}e.reduce=u;function d(M,j){let B,H={onWillAddFirstListener(){B=M(W.fire,W)},onDidRemoveLastListener(){B==null||B.dispose()}},W=new Ue(H);return j==null||j.add(W),W.event}function f(M,j){return j instanceof Array?j.push(M):j&&j.add(M),M}function m(M,j,B=100,H=!1,W=!1,V,A){let G,q,D,U=0,Y,Z={leakWarningThreshold:V,onWillAddFirstListener(){G=M(re=>{U++,q=j(q,re),H&&!D&&(ee.fire(q),q=void 0),Y=()=>{let he=q;q=void 0,D=void 0,(!H||U>1)&&ee.fire(he),U=0},typeof B=="number"?(clearTimeout(D),D=setTimeout(Y,B)):D===void 0&&(D=0,queueMicrotask(Y))})},onWillRemoveListener(){W&&U>0&&(Y==null||Y())},onDidRemoveLastListener(){Y=void 0,G.dispose()}},ee=new Ue(Z);return A==null||A.add(ee),ee.event}e.debounce=m;function g(M,j=0,B){return e.debounce(M,(H,W)=>H?(H.push(W),H):[W],j,void 0,!0,void 0,B)}e.accumulate=g;function v(M,j=(H,W)=>H===W,B){let H=!0,W;return o(M,V=>{let A=H||!j(V,W);return H=!1,W=V,A},B)}e.latch=v;function y(M,j,B){return[e.filter(M,j,B),e.filter(M,H=>!j(H),B)]}e.split=y;function S(M,j=!1,B=[],H){let W=B.slice(),V=M(q=>{W?W.push(q):G.fire(q)});H&&H.add(V);let A=()=>{W==null||W.forEach(q=>G.fire(q)),W=null},G=new Ue({onWillAddFirstListener(){V||(V=M(q=>G.fire(q)),H&&H.add(V))},onDidAddFirstListener(){W&&(j?setTimeout(A):A())},onDidRemoveLastListener(){V&&V.dispose(),V=null}});return H&&H.add(G),G.event}e.buffer=S;function _(M,j){return(B,H,W)=>{let V=j(new E);return M(function(A){let G=V.evaluate(A);G!==C&&B.call(H,G)},void 0,W)}}e.chain=_;let C=Symbol("HaltChainable");class E{constructor(){this.steps=[]}map(j){return this.steps.push(j),this}forEach(j){return this.steps.push(B=>(j(B),B)),this}filter(j){return this.steps.push(B=>j(B)?B:C),this}reduce(j,B){let H=B;return this.steps.push(W=>(H=j(H,W),H)),this}latch(j=(B,H)=>B===H){let B=!0,H;return this.steps.push(W=>{let V=B||!j(W,H);return B=!1,H=W,V?W:C}),this}evaluate(j){for(let B of this.steps)if(j=B(j),j===C)break;return j}}function k(M,j,B=H=>H){let H=(...G)=>A.fire(B(...G)),W=()=>M.on(j,H),V=()=>M.removeListener(j,H),A=new Ue({onWillAddFirstListener:W,onDidRemoveLastListener:V});return A.event}e.fromNodeEventEmitter=k;function $(M,j,B=H=>H){let H=(...G)=>A.fire(B(...G)),W=()=>M.addEventListener(j,H),V=()=>M.removeEventListener(j,H),A=new Ue({onWillAddFirstListener:W,onDidRemoveLastListener:V});return A.event}e.fromDOMEventEmitter=$;function P(M){return new Promise(j=>n(M)(j))}e.toPromise=P;function T(M){let j=new Ue;return M.then(B=>{j.fire(B)},()=>{j.fire(void 0)}).finally(()=>{j.dispose()}),j.event}e.fromPromise=T;function O(M,j){return M(B=>j.fire(B))}e.forward=O;function N(M,j,B){return j(B),M(H=>j(H))}e.runAndSubscribe=N;class I{constructor(j,B){this._observable=j,this._counter=0,this._hasChanged=!1;let H={onWillAddFirstListener:()=>{j.addObserver(this)},onDidRemoveLastListener:()=>{j.removeObserver(this)}};this.emitter=new Ue(H),B&&B.add(this.emitter)}beginUpdate(j){this._counter++}handlePossibleChange(j){}handleChange(j,B){this._hasChanged=!0}endUpdate(j){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function z(M,j){return new I(M,j).emitter.event}e.fromObservable=z;function L(M){return(j,B,H)=>{let W=0,V=!1,A={beginUpdate(){W++},endUpdate(){W--,W===0&&(M.reportChanges(),V&&(V=!1,j.call(B)))},handlePossibleChange(){},handleChange(){V=!0}};M.addObserver(A),M.reportChanges();let G={dispose(){M.removeObserver(A)}};return H instanceof Ys?H.add(G):Array.isArray(H)&&H.push(G),G}}e.fromObservableLight=L})(Kr||(Kr={}));var j0=class B0{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${B0._idPool++}`,B0.all.add(this)}start(t){this._stopWatch=new WX,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};j0.all=new Set,j0._idPool=0;var VX=j0,UX=-1,f4=class m4{constructor(t,n,r=(m4._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=n,this.name=r,this._warnCountdown=0}dispose(){var t;(t=this._stacks)==null||t.clear()}check(t,n){let r=this.threshold;if(r<=0||n<r)return;this._stacks||(this._stacks=new Map);let i=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,i+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=r*.5;let[o,a]=this.getMostFrequentStack(),c=`[${this.name}] potential listener LEAK detected, having ${n} listeners already. MOST frequent listener (${a}):`;console.warn(c),console.warn(o);let u=new GX(c,o);this._errorHandler(u)}return()=>{let o=this._stacks.get(t.value)||0;this._stacks.set(t.value,o-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,n=0;for(let[r,i]of this._stacks)(!t||n<i)&&(t=[r,i],n=i);return t}};f4._idPool=1;var qX=f4,KX=class p4{constructor(t){this.value=t}static create(){let t=new Error;return new p4(t.stack??"")}print(){console.warn(this.value.split(`
593
+ `).slice(2).join(`
594
+ `))}},GX=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},XX=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},YX=0,Qg=class{constructor(e){this.value=e,this.id=YX++}},JX=2,QX,Ue=class{constructor(e){var t,n,r,i;this._size=0,this._options=e,this._leakageMon=(t=this._options)!=null&&t.leakWarningThreshold?new qX((e==null?void 0:e.onListenerError)??Wh,((n=this._options)==null?void 0:n.leakWarningThreshold)??UX):void 0,this._perfMon=(r=this._options)!=null&&r._profName?new VX(this._options._profName):void 0,this._deliveryQueue=(i=this._options)==null?void 0:i.deliveryQueue}dispose(){var e,t,n,r;this._disposed||(this._disposed=!0,((e=this._deliveryQueue)==null?void 0:e.current)===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),(n=(t=this._options)==null?void 0:t.onDidRemoveLastListener)==null||n.call(t),(r=this._leakageMon)==null||r.dispose())}get event(){return this._event??(this._event=(e,t,n)=>{var a,c,u,d,f;if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let m=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(m);let g=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],v=new XX(`${m}. HINT: Stack shows most frequent listener (${g[1]}-times)`,g[0]);return(((a=this._options)==null?void 0:a.onListenerError)||Wh)(v),en.None}if(this._disposed)return en.None;t&&(e=e.bind(t));let r=new Qg(e),i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=KX.create(),i=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof Qg?(this._deliveryQueue??(this._deliveryQueue=new ZX),this._listeners=[this._listeners,r]):this._listeners.push(r):((u=(c=this._options)==null?void 0:c.onWillAddFirstListener)==null||u.call(c,this),this._listeners=r,(f=(d=this._options)==null?void 0:d.onDidAddFirstListener)==null||f.call(d,this)),this._size++;let o=Kn(()=>{i==null||i(),this._removeListener(r)});return n instanceof Ys?n.add(o):Array.isArray(n)&&n.push(o),o}),this._event}_removeListener(e){var i,o,a,c;if((o=(i=this._options)==null?void 0:i.onWillRemoveListener)==null||o.call(i,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(c=(a=this._options)==null?void 0:a.onDidRemoveLastListener)==null||c.call(a,this),this._size=0;return}let t=this._listeners,n=t.indexOf(e);if(n===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[n]=void 0;let r=this._deliveryQueue.current===this;if(this._size*JX<=t.length){let u=0;for(let d=0;d<t.length;d++)t[d]?t[u++]=t[d]:r&&(this._deliveryQueue.end--,u<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=u}}_deliver(e,t){var r;if(!e)return;let n=((r=this._options)==null?void 0:r.onListenerError)||Wh;if(!n){e.value(t);return}try{e.value(t)}catch(i){n(i)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){var t,n,r,i;if((t=this._deliveryQueue)!=null&&t.current&&(this._deliverQueue(this._deliveryQueue),(n=this._perfMon)==null||n.stop()),(r=this._perfMon)==null||r.start(this._size),this._listeners)if(this._listeners instanceof Qg)this._deliver(this._listeners,e);else{let o=this._deliveryQueue;o.enqueue(this,e,this._listeners.length),this._deliverQueue(o)}(i=this._perfMon)==null||i.stop()}hasListeners(){return this._size>0}},ZX=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},L0=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new Ue,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new Ue,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(t){return this.mapWindowIdToZoomLevel.get(this.getWindowId(t))??0}setZoomLevel(t,n){if(this.getZoomLevel(n)===t)return;let r=this.getWindowId(n);this.mapWindowIdToZoomLevel.set(r,t),this._onDidChangeZoomLevel.fire(r)}getZoomFactor(t){return this.mapWindowIdToZoomFactor.get(this.getWindowId(t))??1}setZoomFactor(t,n){this.mapWindowIdToZoomFactor.set(this.getWindowId(n),t)}setFullscreen(t,n){if(this.isFullscreen(n)===t)return;let r=this.getWindowId(n);this.mapWindowIdToFullScreen.set(r,t),this._onDidChangeFullscreen.fire(r)}isFullscreen(t){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(t))}getWindowId(t){return t.vscodeWindowId}};L0.INSTANCE=new L0;var Tb=L0;function eY(e,t,n){typeof t=="string"&&(t=e.matchMedia(t)),t.addEventListener("change",n)}Tb.INSTANCE.onDidChangeZoomLevel;function tY(e){return Tb.INSTANCE.getZoomFactor(e)}Tb.INSTANCE.onDidChangeFullscreen;var uc=typeof navigator=="object"?navigator.userAgent:"",A0=uc.indexOf("Firefox")>=0,nY=uc.indexOf("AppleWebKit")>=0,Pb=uc.indexOf("Chrome")>=0,rY=!Pb&&uc.indexOf("Safari")>=0;uc.indexOf("Electron/")>=0;uc.indexOf("Android")>=0;var Zg=!1;if(typeof ms.matchMedia=="function"){let e=ms.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=ms.matchMedia("(display-mode: fullscreen)");Zg=e.matches,eY(ms,e,({matches:n})=>{Zg&&t.matches||(Zg=n)})}var Al="en",D0=!1,H0=!1,Vh=!1,g4=!1,bh,Uh=Al,xx=Al,iY,wo,Ta=globalThis,Ur,p2;typeof Ta.vscode<"u"&&typeof Ta.vscode.process<"u"?Ur=Ta.vscode.process:typeof process<"u"&&typeof((p2=process==null?void 0:process.versions)==null?void 0:p2.node)=="string"&&(Ur=process);var g2,oY=typeof((g2=Ur==null?void 0:Ur.versions)==null?void 0:g2.electron)=="string",sY=oY&&(Ur==null?void 0:Ur.type)==="renderer",v2;if(typeof Ur=="object"){D0=Ur.platform==="win32",H0=Ur.platform==="darwin",Vh=Ur.platform==="linux",Vh&&Ur.env.SNAP&&Ur.env.SNAP_REVISION,Ur.env.CI||Ur.env.BUILD_ARTIFACTSTAGINGDIRECTORY,bh=Al,Uh=Al;let e=Ur.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);bh=t.userLocale,xx=t.osLocale,Uh=t.resolvedLanguage||Al,iY=(v2=t.languagePack)==null?void 0:v2.translationsConfigFile}catch{}g4=!0}else typeof navigator=="object"&&!sY?(wo=navigator.userAgent,D0=wo.indexOf("Windows")>=0,H0=wo.indexOf("Macintosh")>=0,(wo.indexOf("Macintosh")>=0||wo.indexOf("iPad")>=0||wo.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Vh=wo.indexOf("Linux")>=0,(wo==null?void 0:wo.indexOf("Mobi"))>=0,Uh=globalThis._VSCODE_NLS_LANGUAGE||Al,bh=navigator.language.toLowerCase(),xx=bh):console.error("Unable to resolve platform.");var v4=D0,qo=H0,aY=Vh,Ex=g4,Yo=wo,As=Uh,lY;(e=>{function t(){return As}e.value=t;function n(){return As.length===2?As==="en":As.length>=3?As[0]==="e"&&As[1]==="n"&&As[2]==="-":!1}e.isDefaultVariant=n;function r(){return As==="en"}e.isDefault=r})(lY||(lY={}));var cY=typeof Ta.postMessage=="function"&&!Ta.importScripts;(()=>{if(cY){let e=[];Ta.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let r=0,i=e.length;r<i;r++){let o=e[r];if(o.id===n.data.vscodeScheduleAsyncWork){e.splice(r,1),o.callback();return}}});let t=0;return n=>{let r=++t;e.push({id:r,callback:n}),Ta.postMessage({vscodeScheduleAsyncWork:r},"*")}}return e=>setTimeout(e)})();var uY=!!(Yo&&Yo.indexOf("Chrome")>=0);Yo&&Yo.indexOf("Firefox")>=0;!uY&&Yo&&Yo.indexOf("Safari")>=0;Yo&&Yo.indexOf("Edg/")>=0;Yo&&Yo.indexOf("Android")>=0;var Ol=typeof navigator=="object"?navigator:{};Ex||document.queryCommandSupported&&document.queryCommandSupported("copy")||Ol&&Ol.clipboard&&Ol.clipboard.writeText,Ex||Ol&&Ol.clipboard&&Ol.clipboard.readText;var Ob=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},ev=new Ob,kx=new Ob,$x=new Ob,dY=new Array(230),y4;(e=>{function t(c){return ev.keyCodeToStr(c)}e.toString=t;function n(c){return ev.strToKeyCode(c)}e.fromString=n;function r(c){return kx.keyCodeToStr(c)}e.toUserSettingsUS=r;function i(c){return $x.keyCodeToStr(c)}e.toUserSettingsGeneral=i;function o(c){return kx.strToKeyCode(c)||$x.strToKeyCode(c)}e.fromUserSettings=o;function a(c){if(c>=98&&c<=113)return null;switch(c){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return ev.keyCodeToStr(c)}e.toElectronAccelerator=a})(y4||(y4={}));var hY=class b4{constructor(t,n,r,i,o){this.ctrlKey=t,this.shiftKey=n,this.altKey=r,this.metaKey=i,this.keyCode=o}equals(t){return t instanceof b4&&this.ctrlKey===t.ctrlKey&&this.shiftKey===t.shiftKey&&this.altKey===t.altKey&&this.metaKey===t.metaKey&&this.keyCode===t.keyCode}getHashCode(){let t=this.ctrlKey?"1":"0",n=this.shiftKey?"1":"0",r=this.altKey?"1":"0",i=this.metaKey?"1":"0";return`K${t}${n}${r}${i}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toKeybinding(){return new fY([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},fY=class{constructor(e){if(e.length===0)throw LX("chords");this.chords=e}getHashCode(){let e="";for(let t=0,n=this.chords.length;t<n;t++)t!==0&&(e+=";"),e+=this.chords[t].getHashCode();return e}equals(e){if(e===null||this.chords.length!==e.chords.length)return!1;for(let t=0;t<this.chords.length;t++)if(!this.chords[t].equals(e.chords[t]))return!1;return!0}};function mY(e){if(e.charCode){let n=String.fromCharCode(e.charCode).toUpperCase();return y4.fromString(n)}let t=e.keyCode;if(t===3)return 7;if(A0)switch(t){case 59:return 85;case 60:if(aY)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(qo)return 57;break}else if(nY&&(qo&&t===93||!qo&&t===92))return 57;return dY[t]||0}var pY=qo?256:2048,gY=512,vY=1024,yY=qo?2048:256,Rx=class{constructor(e){var n;this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=(n=t.getModifierState)==null?void 0:n.call(t,"AltGraph"),this.keyCode=mY(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=pY),this.altKey&&(t|=gY),this.shiftKey&&(t|=vY),this.metaKey&&(t|=yY),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new hY(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}},Tx=new WeakMap;function bY(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,n=e.parent.location;if(t.origin!=="null"&&n.origin!=="null"&&t.origin!==n.origin)return null}catch{return null}return e.parent}var _Y=class{static getSameOriginWindowChain(e){let t=Tx.get(e);if(!t){t=[],Tx.set(e,t);let n=e,r;do r=bY(n),r?t.push({window:new WeakRef(n),iframeElement:n.frameElement||null}):t.push({window:new WeakRef(n),iframeElement:null}),n=r;while(n)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let n=0,r=0,i=this.getSameOriginWindowChain(e);for(let o of i){let a=o.window.deref();if(n+=(a==null?void 0:a.scrollY)??0,r+=(a==null?void 0:a.scrollX)??0,a===t||!o.iframeElement)break;let c=o.iframeElement.getBoundingClientRect();n+=c.top,r+=c.left}return{top:n,left:r}}},_h=class{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,t.type==="dblclick"&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX=="number"?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let n=_Y.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=n.left,this.posy-=n.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},Px=class{constructor(e,t=0,n=0){var i;this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=n,this.deltaX=t;let r=!1;if(Pb){let o=navigator.userAgent.match(/Chrome\/(\d+)/);r=(o?parseInt(o[1]):123)<=122}if(e){let o=e,a=e,c=((i=e.view)==null?void 0:i.devicePixelRatio)||1;if(typeof o.wheelDeltaY<"u")r?this.deltaY=o.wheelDeltaY/(120*c):this.deltaY=o.wheelDeltaY/120;else if(typeof a.VERTICAL_AXIS<"u"&&a.axis===a.VERTICAL_AXIS)this.deltaY=-a.detail/3;else if(e.type==="wheel"){let u=e;u.deltaMode===u.DOM_DELTA_LINE?A0&&!qo?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof o.wheelDeltaX<"u")rY&&v4?this.deltaX=-(o.wheelDeltaX/120):r?this.deltaX=o.wheelDeltaX/(120*c):this.deltaX=o.wheelDeltaX/120;else if(typeof a.HORIZONTAL_AXIS<"u"&&a.axis===a.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){let u=e;u.deltaMode===u.DOM_DELTA_LINE?A0&&!qo?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(r?this.deltaY=e.wheelDelta/(120*c):this.deltaY=e.wheelDelta/120)}}preventDefault(){var e;(e=this.browserEvent)==null||e.preventDefault()}stopPropagation(){var e;(e=this.browserEvent)==null||e.stopPropagation()}},_4=Object.freeze(function(e,t){let n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}),SY;(e=>{function t(n){return n===e.None||n===e.Cancelled||n instanceof CY?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Kr.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:_4})})(SY||(SY={}));var CY=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?_4:(this._emitter||(this._emitter=new Ue),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},Ib=class{constructor(e,t){this._isDisposed=!1,this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new N0("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){if(this._isDisposed)throw new N0("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}},wY=class{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){var e;(e=this.disposable)==null||e.dispose(),this.disposable=void 0}cancelAndSet(e,t,n=globalThis){if(this.isDisposed)throw new N0("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let r=n.setInterval(()=>{e()},t);this.disposable=Kn(()=>{n.clearInterval(r),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}},xY;(e=>{async function t(r){let i,o=await Promise.all(r.map(a=>a.then(c=>c,c=>{i||(i=c)})));if(typeof i<"u")throw i;return o}e.settled=t;function n(r){return new Promise(async(i,o)=>{try{await r(i,o)}catch(a){o(a)}})}e.withAsyncBody=n})(xY||(xY={}));var Ox=class so{static fromArray(t){return new so(n=>{n.emitMany(t)})}static fromPromise(t){return new so(async n=>{n.emitMany(await t)})}static fromPromises(t){return new so(async n=>{await Promise.all(t.map(async r=>n.emitOne(await r)))})}static merge(t){return new so(async n=>{await Promise.all(t.map(async r=>{for await(let i of r)n.emitOne(i)}))})}constructor(t,n){this._state=0,this._results=[],this._error=null,this._onReturn=n,this._onStateChanged=new Ue,queueMicrotask(async()=>{let r={emitOne:i=>this.emitOne(i),emitMany:i=>this.emitMany(i),reject:i=>this.reject(i)};try{await Promise.resolve(t(r)),this.resolve()}catch(i){this.reject(i)}finally{r.emitOne=void 0,r.emitMany=void 0,r.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t<this._results.length)return{done:!1,value:this._results[t++]};if(this._state===1)return{done:!0,value:void 0};await Kr.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>{var n;return(n=this._onReturn)==null||n.call(this),{done:!0,value:void 0}}}}static map(t,n){return new so(async r=>{for await(let i of t)r.emitOne(n(i))})}map(t){return so.map(this,t)}static filter(t,n){return new so(async r=>{for await(let i of t)n(i)&&r.emitOne(i)})}filter(t){return so.filter(this,t)}static coalesce(t){return so.filter(t,n=>!!n)}coalesce(){return so.coalesce(this)}static async toPromise(t){let n=[];for await(let r of t)n.push(r);return n}toPromise(){return so.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};Ox.EMPTY=Ox.fromArray([]);var{getWindow:Vo,getWindowId:EY,onDidRegisterWindow:kY}=(function(){let e=new Map,t={window:ms,disposables:new Ys};e.set(ms.vscodeWindowId,t);let n=new Ue,r=new Ue,i=new Ue;function o(a,c){return(typeof a=="number"?e.get(a):void 0)??(c?t:void 0)}return{onDidRegisterWindow:n.event,onWillUnregisterWindow:i.event,onDidUnregisterWindow:r.event,registerWindow(a){if(e.has(a.vscodeWindowId))return en.None;let c=new Ys,u={window:a,disposables:c.add(new Ys)};return e.set(a.vscodeWindowId,u),c.add(Kn(()=>{e.delete(a.vscodeWindowId),r.fire(a)})),c.add(Vt(a,zr.BEFORE_UNLOAD,()=>{i.fire(a)})),n.fire(u),c},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(a){return a.vscodeWindowId},hasWindow(a){return e.has(a)},getWindowById:o,getWindow(a){var d;let c=a;if((d=c==null?void 0:c.ownerDocument)!=null&&d.defaultView)return c.ownerDocument.defaultView.window;let u=a;return u!=null&&u.view?u.view.window:ms},getDocument(a){return Vo(a).document}}})(),$Y=class{constructor(e,t,n,r){this._node=e,this._type=t,this._handler=n,this._options=r||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function Vt(e,t,n,r){return new $Y(e,t,n,r)}var Ix=function(e,t,n,r){return Vt(e,t,n,r)},Nb,RY=class extends wY{constructor(e){super(),this.defaultTarget=e&&Vo(e)}cancelAndSet(e,t,n){return super.cancelAndSet(e,t,n??this.defaultTarget)}},Nx=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){Wh(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let e=new Map,t=new Map,n=new Map,r=new Map,i=o=>{n.set(o,!1);let a=e.get(o)??[];for(t.set(o,a),e.set(o,[]),r.set(o,!0);a.length>0;)a.sort(Nx.sort),a.shift().execute();r.set(o,!1)};Nb=(o,a,c=0)=>{let u=EY(o),d=new Nx(a,c),f=e.get(u);return f||(f=[],e.set(u,f)),f.push(d),n.get(u)||(n.set(u,!0),o.requestAnimationFrame(()=>i(u))),d}})();function TY(e){let t=e.getBoundingClientRect(),n=Vo(e);return{left:t.left+n.scrollX,top:t.top+n.scrollY,width:t.width,height:t.height}}var zr={CLICK:"click",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",KEY_DOWN:"keydown",KEY_UP:"keyup",BEFORE_UNLOAD:"beforeunload",CHANGE:"change",FOCUS:"focus",BLUR:"blur",INPUT:"input"},PY=class{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingTop="",this._paddingLeft="",this._paddingBottom="",this._paddingRight="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){let t=Ti(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){let t=Ti(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=Ti(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=Ti(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=Ti(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=Ti(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=Ti(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingTop(e){let t=Ti(e);this._paddingTop!==t&&(this._paddingTop=t,this.domNode.style.paddingTop=this._paddingTop)}setPaddingLeft(e){let t=Ti(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setPaddingBottom(e){let t=Ti(e);this._paddingBottom!==t&&(this._paddingBottom=t,this.domNode.style.paddingBottom=this._paddingBottom)}setPaddingRight(e){let t=Ti(e);this._paddingRight!==t&&(this._paddingRight=t,this.domNode.style.paddingRight=this._paddingRight)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){let t=Ti(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){let t=Ti(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){let t=Ti(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}};function Ti(e){return typeof e=="number"?`${e}px`:e}function mu(e){return new PY(e)}var S4=class{constructor(){this._hooks=new Ys,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let n=this._onStopCallback;this._onStopCallback=null,e&&n&&n(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,n,r,i){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=r,this._onStopCallback=i;let o=e;try{e.setPointerCapture(t),this._hooks.add(Kn(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{o=Vo(e)}this._hooks.add(Vt(o,zr.POINTER_MOVE,a=>{if(a.buttons!==n){this.stopMonitoring(!0);return}a.preventDefault(),this._pointerMoveCallback(a)})),this._hooks.add(Vt(o,zr.POINTER_UP,a=>this.stopMonitoring(!0)))}};function OY(e,t,n){let r=null,i=null;if(typeof n.value=="function"?(r="value",i=n.value,i.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof n.get=="function"&&(r="get",i=n.get),!i)throw new Error("not supported");let o=`$memoize$${t}`;n[r]=function(...a){return this.hasOwnProperty(o)||Object.defineProperty(this,o,{configurable:!1,enumerable:!1,writable:!1,value:i.apply(this,a)}),this[o]}}var Ho;(e=>(e.Tap="-xterm-gesturetap",e.Change="-xterm-gesturechange",e.Start="-xterm-gesturestart",e.End="-xterm-gesturesend",e.Contextmenu="-xterm-gesturecontextmenu"))(Ho||(Ho={}));var ou=class ri extends en{constructor(){super(),this.dispatched=!1,this.targets=new wx,this.ignoreTargets=new wx,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(Kr.runAndSubscribe(kY,({window:t,disposables:n})=>{n.add(Vt(t.document,"touchstart",r=>this.onTouchStart(r),{passive:!1})),n.add(Vt(t.document,"touchend",r=>this.onTouchEnd(t,r))),n.add(Vt(t.document,"touchmove",r=>this.onTouchMove(r),{passive:!1}))},{window:ms,disposables:this._store}))}static addTarget(t){if(!ri.isTouchDevice())return en.None;ri.INSTANCE||(ri.INSTANCE=new ri);let n=ri.INSTANCE.targets.push(t);return Kn(n)}static ignoreTarget(t){if(!ri.isTouchDevice())return en.None;ri.INSTANCE||(ri.INSTANCE=new ri);let n=ri.INSTANCE.ignoreTargets.push(t);return Kn(n)}static isTouchDevice(){return"ontouchstart"in ms||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(t){let n=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let r=0,i=t.targetTouches.length;r<i;r++){let o=t.targetTouches.item(r);this.activeTouches[o.identifier]={id:o.identifier,initialTarget:o.target,initialTimeStamp:n,initialPageX:o.pageX,initialPageY:o.pageY,rollingTimestamps:[n],rollingPageX:[o.pageX],rollingPageY:[o.pageY]};let a=this.newGestureEvent(Ho.Start,o.target);a.pageX=o.pageX,a.pageY=o.pageY,this.dispatchEvent(a)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}onTouchEnd(t,n){let r=Date.now(),i=Object.keys(this.activeTouches).length;for(let o=0,a=n.changedTouches.length;o<a;o++){let c=n.changedTouches.item(o);if(!this.activeTouches.hasOwnProperty(String(c.identifier))){console.warn("move of an UNKNOWN touch",c);continue}let u=this.activeTouches[c.identifier],d=Date.now()-u.initialTimeStamp;if(d<ri.HOLD_DELAY&&Math.abs(u.initialPageX-Di(u.rollingPageX))<30&&Math.abs(u.initialPageY-Di(u.rollingPageY))<30){let f=this.newGestureEvent(Ho.Tap,u.initialTarget);f.pageX=Di(u.rollingPageX),f.pageY=Di(u.rollingPageY),this.dispatchEvent(f)}else if(d>=ri.HOLD_DELAY&&Math.abs(u.initialPageX-Di(u.rollingPageX))<30&&Math.abs(u.initialPageY-Di(u.rollingPageY))<30){let f=this.newGestureEvent(Ho.Contextmenu,u.initialTarget);f.pageX=Di(u.rollingPageX),f.pageY=Di(u.rollingPageY),this.dispatchEvent(f)}else if(i===1){let f=Di(u.rollingPageX),m=Di(u.rollingPageY),g=Di(u.rollingTimestamps)-u.rollingTimestamps[0],v=f-u.rollingPageX[0],y=m-u.rollingPageY[0],S=[...this.targets].filter(_=>u.initialTarget instanceof Node&&_.contains(u.initialTarget));this.inertia(t,S,r,Math.abs(v)/g,v>0?1:-1,f,Math.abs(y)/g,y>0?1:-1,m)}this.dispatchEvent(this.newGestureEvent(Ho.End,u.initialTarget)),delete this.activeTouches[c.identifier]}this.dispatched&&(n.preventDefault(),n.stopPropagation(),this.dispatched=!1)}newGestureEvent(t,n){let r=document.createEvent("CustomEvent");return r.initEvent(t,!1,!0),r.initialTarget=n,r.tapCount=0,r}dispatchEvent(t){if(t.type===Ho.Tap){let n=new Date().getTime(),r=0;n-this._lastSetTapCountTime>ri.CLEAR_TAP_COUNT_TIME?r=1:r=2,this._lastSetTapCountTime=n,t.tapCount=r}else(t.type===Ho.Change||t.type===Ho.Contextmenu)&&(this._lastSetTapCountTime=0);if(t.initialTarget instanceof Node){for(let r of this.ignoreTargets)if(r.contains(t.initialTarget))return;let n=[];for(let r of this.targets)if(r.contains(t.initialTarget)){let i=0,o=t.initialTarget;for(;o&&o!==r;)i++,o=o.parentElement;n.push([i,r])}n.sort((r,i)=>r[0]-i[0]);for(let[r,i]of n)i.dispatchEvent(t),this.dispatched=!0}}inertia(t,n,r,i,o,a,c,u,d){this.handle=Nb(t,()=>{let f=Date.now(),m=f-r,g=0,v=0,y=!0;i+=ri.SCROLL_FRICTION*m,c+=ri.SCROLL_FRICTION*m,i>0&&(y=!1,g=o*i*m),c>0&&(y=!1,v=u*c*m);let S=this.newGestureEvent(Ho.Change);S.translationX=g,S.translationY=v,n.forEach(_=>_.dispatchEvent(S)),y||this.inertia(t,n,f,i,o,a+g,c,u,d+v)})}onTouchMove(t){let n=Date.now();for(let r=0,i=t.changedTouches.length;r<i;r++){let o=t.changedTouches.item(r);if(!this.activeTouches.hasOwnProperty(String(o.identifier))){console.warn("end of an UNKNOWN touch",o);continue}let a=this.activeTouches[o.identifier],c=this.newGestureEvent(Ho.Change,a.initialTarget);c.translationX=o.pageX-Di(a.rollingPageX),c.translationY=o.pageY-Di(a.rollingPageY),c.pageX=o.pageX,c.pageY=o.pageY,this.dispatchEvent(c),a.rollingPageX.length>3&&(a.rollingPageX.shift(),a.rollingPageY.shift(),a.rollingTimestamps.shift()),a.rollingPageX.push(o.pageX),a.rollingPageY.push(o.pageY),a.rollingTimestamps.push(n)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}};ou.SCROLL_FRICTION=-.005,ou.HOLD_DELAY=700,ou.CLEAR_TAP_COUNT_TIME=400,or([OY],ou,"isTouchDevice",1);var IY=ou,Mb=class extends en{onclick(e,t){this._register(Vt(e,zr.CLICK,n=>t(new _h(Vo(e),n))))}onmousedown(e,t){this._register(Vt(e,zr.MOUSE_DOWN,n=>t(new _h(Vo(e),n))))}onmouseover(e,t){this._register(Vt(e,zr.MOUSE_OVER,n=>t(new _h(Vo(e),n))))}onmouseleave(e,t){this._register(Vt(e,zr.MOUSE_LEAVE,n=>t(new _h(Vo(e),n))))}onkeydown(e,t){this._register(Vt(e,zr.KEY_DOWN,n=>t(new Rx(n))))}onkeyup(e,t){this._register(Vt(e,zr.KEY_UP,n=>t(new Rx(n))))}oninput(e,t){this._register(Vt(e,zr.INPUT,t))}onblur(e,t){this._register(Vt(e,zr.BLUR,t))}onfocus(e,t){this._register(Vt(e,zr.FOCUS,t))}onchange(e,t){this._register(Vt(e,zr.CHANGE,t))}ignoreGesture(e){return IY.ignoreTarget(e)}},Mx=11,NY=class extends Mb{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.style.position="absolute",this.domNode.style.width=Mx+"px",this.domNode.style.height=Mx+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new S4),this._register(Ix(this.bgDomNode,zr.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(Ix(this.domNode,zr.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new RY),this._pointerdownScheduleRepeatTimer=this._register(new Ib)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,Vo(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,n=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}},MY=class F0{constructor(t,n,r,i,o,a,c){this._forceIntegerValues=t,this._scrollStateBrand=void 0,this._forceIntegerValues&&(n=n|0,r=r|0,i=i|0,o=o|0,a=a|0,c=c|0),this.rawScrollLeft=i,this.rawScrollTop=c,n<0&&(n=0),i+n>r&&(i=r-n),i<0&&(i=0),o<0&&(o=0),c+o>a&&(c=a-o),c<0&&(c=0),this.width=n,this.scrollWidth=r,this.scrollLeft=i,this.height=o,this.scrollHeight=a,this.scrollTop=c}equals(t){return this.rawScrollLeft===t.rawScrollLeft&&this.rawScrollTop===t.rawScrollTop&&this.width===t.width&&this.scrollWidth===t.scrollWidth&&this.scrollLeft===t.scrollLeft&&this.height===t.height&&this.scrollHeight===t.scrollHeight&&this.scrollTop===t.scrollTop}withScrollDimensions(t,n){return new F0(this._forceIntegerValues,typeof t.width<"u"?t.width:this.width,typeof t.scrollWidth<"u"?t.scrollWidth:this.scrollWidth,n?this.rawScrollLeft:this.scrollLeft,typeof t.height<"u"?t.height:this.height,typeof t.scrollHeight<"u"?t.scrollHeight:this.scrollHeight,n?this.rawScrollTop:this.scrollTop)}withScrollPosition(t){return new F0(this._forceIntegerValues,this.width,this.scrollWidth,typeof t.scrollLeft<"u"?t.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof t.scrollTop<"u"?t.scrollTop:this.rawScrollTop)}createScrollEvent(t,n){let r=this.width!==t.width,i=this.scrollWidth!==t.scrollWidth,o=this.scrollLeft!==t.scrollLeft,a=this.height!==t.height,c=this.scrollHeight!==t.scrollHeight,u=this.scrollTop!==t.scrollTop;return{inSmoothScrolling:n,oldWidth:t.width,oldScrollWidth:t.scrollWidth,oldScrollLeft:t.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:t.height,oldScrollHeight:t.scrollHeight,oldScrollTop:t.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:r,scrollWidthChanged:i,scrollLeftChanged:o,heightChanged:a,scrollHeightChanged:c,scrollTopChanged:u}}},zY=class extends en{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new Ue),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new MY(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){var r;let n=this._state.withScrollDimensions(e,t);this._setState(n,!!this._smoothScrolling),(r=this._smoothScrolling)==null||r.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};let n=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===n.scrollLeft&&this._smoothScrolling.to.scrollTop===n.scrollTop)return;let r;t?r=new jx(this._smoothScrolling.from,n,this._smoothScrolling.startTime,this._smoothScrolling.duration):r=this._smoothScrolling.combine(this._state,n,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=r}else{let n=this._state.withScrollPosition(e);this._smoothScrolling=jx.start(this._state,n,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let n=this._state;n.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(n,t)))}},zx=class{constructor(e,t,n){this.scrollLeft=e,this.scrollTop=t,this.isDone=n}};function tv(e,t){let n=t-e;return function(r){return e+n*LY(r)}}function jY(e,t,n){return function(r){return r<n?e(r/n):t((r-n)/(1-n))}}var jx=class W0{constructor(t,n,r,i){this.from=t,this.to=n,this.duration=i,this.startTime=r,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(t,n,r){if(Math.abs(t-n)>2.5*r){let i,o;return t<n?(i=t+.75*r,o=n-.75*r):(i=t-.75*r,o=n+.75*r),jY(tv(t,i),tv(o,n),.33)}return tv(t,n)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(t){this.to=t.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(t){let n=(t-this.startTime)/this.duration;if(n<1){let r=this.scrollLeft(n),i=this.scrollTop(n);return new zx(r,i,!1)}return new zx(this.to.scrollLeft,this.to.scrollTop,!0)}combine(t,n,r){return W0.start(t,n,r)}static start(t,n,r){r=r+10;let i=Date.now()-10;return new W0(t,n,i,r)}};function BY(e){return Math.pow(e,3)}function LY(e){return 1-BY(1-e)}var AY=class extends en{constructor(e,t,n){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=n,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new Ib)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{var e;(e=this._domNode)==null||e.setClassName(this._visibleClassName)},0))}_hide(e){var t;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,(t=this._domNode)==null||t.setClassName(this._invisibleClassName+(e?" fade":"")))}},DY=140,C4=class extends Mb{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new AY(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new S4),this._shouldRender=!0,this.domNode=mu(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(Vt(this.domNode.domNode,zr.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){let t=this._register(new NY(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,n,r){this.slider=mu(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof n=="number"&&this.slider.setWidth(n),typeof r=="number"&&this.slider.setHeight(r),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(Vt(this.slider.domNode,zr.POINTER_DOWN,i=>{i.button===0&&(i.preventDefault(),this._sliderPointerDown(i))})),this.onclick(this.slider.domNode,i=>{i.leftButton&&i.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,n=t+this._scrollbarState.getSliderPosition(),r=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),i=this._sliderPointerPosition(e);n<=i&&i<=r?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,n;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,n=e.offsetY;else{let i=TY(this.domNode.domNode);t=e.pageX-i.left,n=e.pageY-i.top}let r=this._pointerDownRelativePosition(t,n);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(r):this._scrollbarState.getDesiredScrollPositionFromOffset(r)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),n=this._sliderOrthogonalPointerPosition(e),r=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,i=>{let o=this._sliderOrthogonalPointerPosition(i),a=Math.abs(o-n);if(v4&&a>DY){this._setDesiredScrollPositionNow(r.getScrollPosition());return}let c=this._sliderPointerPosition(i)-t;this._setDesiredScrollPositionNow(r.getDesiredScrollPositionFromDelta(c))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}},w4=class V0{constructor(t,n,r,i,o,a){this._scrollbarSize=Math.round(n),this._oppositeScrollbarSize=Math.round(r),this._arrowSize=Math.round(t),this._visibleSize=i,this._scrollSize=o,this._scrollPosition=a,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new V0(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(t){let n=Math.round(t);return this._visibleSize!==n?(this._visibleSize=n,this._refreshComputedValues(),!0):!1}setScrollSize(t){let n=Math.round(t);return this._scrollSize!==n?(this._scrollSize=n,this._refreshComputedValues(),!0):!1}setScrollPosition(t){let n=Math.round(t);return this._scrollPosition!==n?(this._scrollPosition=n,this._refreshComputedValues(),!0):!1}setScrollbarSize(t){this._scrollbarSize=Math.round(t)}setOppositeScrollbarSize(t){this._oppositeScrollbarSize=Math.round(t)}static _computeValues(t,n,r,i,o){let a=Math.max(0,r-t),c=Math.max(0,a-2*n),u=i>0&&i>r;if(!u)return{computedAvailableSize:Math.round(a),computedIsNeeded:u,computedSliderSize:Math.round(c),computedSliderRatio:0,computedSliderPosition:0};let d=Math.round(Math.max(20,Math.floor(r*c/i))),f=(c-d)/(i-r),m=o*f;return{computedAvailableSize:Math.round(a),computedIsNeeded:u,computedSliderSize:Math.round(d),computedSliderRatio:f,computedSliderPosition:Math.round(m)}}_refreshComputedValues(){let t=V0._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(t){if(!this._computedIsNeeded)return 0;let n=t-this._arrowSize-this._computedSliderSize/2;return Math.round(n/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(t){if(!this._computedIsNeeded)return 0;let n=t-this._arrowSize,r=this._scrollPosition;return n<this._computedSliderPosition?r-=this._visibleSize:r+=this._visibleSize,r}getDesiredScrollPositionFromDelta(t){if(!this._computedIsNeeded)return 0;let n=this._computedSliderPosition+t;return Math.round(n/this._computedSliderRatio)}},HY=class extends C4{constructor(e,t,n){let r=e.getScrollDimensions(),i=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new w4(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,r.width,r.scrollWidth,i.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}},FY=class extends C4{constructor(e,t,n){let r=e.getScrollDimensions(),i=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new w4(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,r.height,r.scrollHeight,i.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}},WY=500,Bx=50,VY=class{constructor(e,t,n){this.timestamp=e,this.deltaX=t,this.deltaY=n,this.score=0}},U0=class{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let t=1,n=0,r=1,i=this._rear;do{let o=i===this._front?t:Math.pow(2,-r);if(t-=o,n+=this._memory[i].score*o,i===this._front)break;i=(this._capacity+i-1)%this._capacity,r++}while(!0);return n<=.5}acceptStandardWheelEvent(t){if(Pb){let n=Vo(t.browserEvent),r=tY(n);this.accept(Date.now(),t.deltaX*r,t.deltaY*r)}else this.accept(Date.now(),t.deltaX,t.deltaY)}accept(t,n,r){let i=null,o=new VY(t,n,r);this._front===-1&&this._rear===-1?(this._memory[0]=o,this._front=0,this._rear=0):(i=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=o),o.score=this._computeScore(o,i)}_computeScore(t,n){if(Math.abs(t.deltaX)>0&&Math.abs(t.deltaY)>0)return 1;let r=.5;if((!this._isAlmostInt(t.deltaX)||!this._isAlmostInt(t.deltaY))&&(r+=.25),n){let i=Math.abs(t.deltaX),o=Math.abs(t.deltaY),a=Math.abs(n.deltaX),c=Math.abs(n.deltaY),u=Math.max(Math.min(i,a),1),d=Math.max(Math.min(o,c),1),f=Math.max(i,a),m=Math.max(o,c);f%u===0&&m%d===0&&(r-=.5)}return Math.min(Math.max(r,0),1)}_isAlmostInt(t){return Math.abs(Math.round(t)-t)<.01}};U0.INSTANCE=new U0;var UY=U0,qY=class extends Mb{constructor(e,t,n){super(),this._onScroll=this._register(new Ue),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new Ue),this.onWillScroll=this._onWillScroll.event,this._options=GY(t),this._scrollable=n,this._register(this._scrollable.onScroll(i=>{this._onWillScroll.fire(i),this._onDidScroll(i),this._onScroll.fire(i)}));let r={onMouseWheel:i=>this._onMouseWheel(i),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new FY(this._scrollable,this._options,r)),this._horizontalScrollbar=this._register(new HY(this._scrollable,this._options,r)),this._domNode=document.createElement("div"),this._domNode.className="xterm-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=mu(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=mu(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=mu(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,i=>this._onMouseOver(i)),this.onmouseleave(this._listenOnDomNode,i=>this._onMouseLeave(i)),this._hideTimeout=this._register(new Ib),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=Ba(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,qo&&(this._options.className+=" mac"),this._domNode.className="xterm-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}setRevealOnScroll(e){this._revealOnScroll=e}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new Px(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=Ba(this._mouseWheelToDispose),e)){let t=n=>{this._onMouseWheel(new Px(n))};this._mouseWheelToDispose.push(Vt(this._listenOnDomNode,zr.MOUSE_WHEEL,t,{passive:!1}))}}_onMouseWheel(e){var i;if((i=e.browserEvent)!=null&&i.defaultPrevented)return;let t=UY.INSTANCE;t.acceptStandardWheelEvent(e);let n=!1;if(e.deltaY||e.deltaX){let o=e.deltaY*this._options.mouseWheelScrollSensitivity,a=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&a+o===0?a=o=0:Math.abs(o)>=Math.abs(a)?a=0:o=0),this._options.flipAxes&&([o,a]=[a,o]);let c=!qo&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||c)&&!a&&(a=o,o=0),e.browserEvent&&e.browserEvent.altKey&&(a=a*this._options.fastScrollSensitivity,o=o*this._options.fastScrollSensitivity);let u=this._scrollable.getFutureScrollPosition(),d={};if(o){let f=Bx*o,m=u.scrollTop-(f<0?Math.floor(f):Math.ceil(f));this._verticalScrollbar.writeScrollPosition(d,m)}if(a){let f=Bx*a,m=u.scrollLeft-(f<0?Math.floor(f):Math.ceil(f));this._horizontalScrollbar.writeScrollPosition(d,m)}d=this._scrollable.validateScrollPosition(d),(u.scrollLeft!==d.scrollLeft||u.scrollTop!==d.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(d):this._scrollable.setScrollPositionNow(d),n=!0)}let r=n;!r&&this._options.alwaysConsumeMouseWheel&&(r=!0),!r&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(r=!0),r&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,n=e.scrollLeft>0,r=n?" left":"",i=t?" top":"",o=n||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${r}`),this._topShadowDomNode.setClassName(`shadow${i}`),this._topLeftShadowDomNode.setClassName(`shadow${o}${i}${r}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),WY)}},KY=class extends qY{constructor(e,t,n){super(e,t,n)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}};function GY(e){let t={lazyRender:typeof e.lazyRender<"u"?e.lazyRender:!1,className:typeof e.className<"u"?e.className:"",useShadows:typeof e.useShadows<"u"?e.useShadows:!0,handleMouseWheel:typeof e.handleMouseWheel<"u"?e.handleMouseWheel:!0,flipAxes:typeof e.flipAxes<"u"?e.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof e.consumeMouseWheelIfScrollbarIsNeeded<"u"?e.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof e.alwaysConsumeMouseWheel<"u"?e.alwaysConsumeMouseWheel:!1,scrollYToX:typeof e.scrollYToX<"u"?e.scrollYToX:!1,mouseWheelScrollSensitivity:typeof e.mouseWheelScrollSensitivity<"u"?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof e.fastScrollSensitivity<"u"?e.fastScrollSensitivity:5,scrollPredominantAxis:typeof e.scrollPredominantAxis<"u"?e.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof e.mouseWheelSmoothScroll<"u"?e.mouseWheelSmoothScroll:!0,arrowSize:typeof e.arrowSize<"u"?e.arrowSize:11,listenOnDomNode:typeof e.listenOnDomNode<"u"?e.listenOnDomNode:null,horizontal:typeof e.horizontal<"u"?e.horizontal:1,horizontalScrollbarSize:typeof e.horizontalScrollbarSize<"u"?e.horizontalScrollbarSize:10,horizontalSliderSize:typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:0,horizontalHasArrows:typeof e.horizontalHasArrows<"u"?e.horizontalHasArrows:!1,vertical:typeof e.vertical<"u"?e.vertical:1,verticalScrollbarSize:typeof e.verticalScrollbarSize<"u"?e.verticalScrollbarSize:10,verticalHasArrows:typeof e.verticalHasArrows<"u"?e.verticalHasArrows:!1,verticalSliderSize:typeof e.verticalSliderSize<"u"?e.verticalSliderSize:0,scrollByPage:typeof e.scrollByPage<"u"?e.scrollByPage:!1};return t.horizontalSliderSize=typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=typeof e.verticalSliderSize<"u"?e.verticalSliderSize:t.verticalScrollbarSize,qo&&(t.className+=" mac"),t}var q0=class extends en{constructor(e,t,n,r,i,o,a,c){super(),this._bufferService=n,this._optionsService=a,this._renderService=c,this._onRequestScrollLines=this._register(new Ue),this.onRequestScrollLines=this._onRequestScrollLines.event,this._isSyncing=!1,this._isHandlingScroll=!1,this._suppressOnScrollHandler=!1;let u=this._register(new zY({forceIntegerValues:!1,smoothScrollDuration:this._optionsService.rawOptions.smoothScrollDuration,scheduleAtNextAnimationFrame:d=>Nb(r.window,d)}));this._register(this._optionsService.onSpecificOptionChange("smoothScrollDuration",()=>{u.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration)})),this._scrollableElement=this._register(new KY(t,{vertical:1,horizontal:2,useShadows:!1,mouseWheelSmoothScroll:!0,...this._getChangeOptions()},u)),this._register(this._optionsService.onMultipleOptionChange(["scrollSensitivity","fastScrollSensitivity","overviewRuler"],()=>this._scrollableElement.updateOptions(this._getChangeOptions()))),this._register(i.onProtocolChange(d=>{this._scrollableElement.updateOptions({handleMouseWheel:!(d&16)})})),this._scrollableElement.setScrollDimensions({height:0,scrollHeight:0}),this._register(Kr.runAndSubscribe(o.onChangeColors,()=>{this._scrollableElement.getDomNode().style.backgroundColor=o.colors.background.css})),e.appendChild(this._scrollableElement.getDomNode()),this._register(Kn(()=>this._scrollableElement.getDomNode().remove())),this._styleElement=r.mainDocument.createElement("style"),t.appendChild(this._styleElement),this._register(Kn(()=>this._styleElement.remove())),this._register(Kr.runAndSubscribe(o.onChangeColors,()=>{this._styleElement.textContent=[".xterm .xterm-scrollable-element > .scrollbar > .slider {",` background: ${o.colors.scrollbarSliderBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider:hover {",` background: ${o.colors.scrollbarSliderHoverBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider.active {",` background: ${o.colors.scrollbarSliderActiveBackground.css};`,"}"].join(`
595
+ `)})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._sync())),this._register(this._scrollableElement.onScroll(d=>this._handleScroll(d)))}scrollLines(e){let t=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({reuseAnimation:!0,scrollTop:t.scrollTop+e*this._renderService.dimensions.css.cell.height})}scrollToLine(e,t){t&&(this._latestYDisp=e),this._scrollableElement.setScrollPosition({reuseAnimation:!t,scrollTop:e*this._renderService.dimensions.css.cell.height})}_getChangeOptions(){var e;return{mouseWheelScrollSensitivity:this._optionsService.rawOptions.scrollSensitivity,fastScrollSensitivity:this._optionsService.rawOptions.fastScrollSensitivity,verticalScrollbarSize:((e=this._optionsService.rawOptions.overviewRuler)==null?void 0:e.width)||14}}queueSync(e){e!==void 0&&(this._latestYDisp=e),this._queuedAnimationFrame===void 0&&(this._queuedAnimationFrame=this._renderService.addRefreshCallback(()=>{this._queuedAnimationFrame=void 0,this._sync(this._latestYDisp)}))}_sync(e=this._bufferService.buffer.ydisp){!this._renderService||this._isSyncing||(this._isSyncing=!0,this._suppressOnScrollHandler=!0,this._scrollableElement.setScrollDimensions({height:this._renderService.dimensions.css.canvas.height,scrollHeight:this._renderService.dimensions.css.cell.height*this._bufferService.buffer.lines.length}),this._suppressOnScrollHandler=!1,e!==this._latestYDisp&&this._scrollableElement.setScrollPosition({scrollTop:e*this._renderService.dimensions.css.cell.height}),this._isSyncing=!1)}_handleScroll(e){if(!this._renderService||this._isHandlingScroll||this._suppressOnScrollHandler)return;this._isHandlingScroll=!0;let t=Math.round(e.scrollTop/this._renderService.dimensions.css.cell.height),n=t-this._bufferService.buffer.ydisp;n!==0&&(this._latestYDisp=t,this._onRequestScrollLines.fire(n)),this._isHandlingScroll=!1}};q0=or([ct(2,vi),ct(3,bs),ct(4,r4),ct(5,cc),ct(6,yi),ct(7,_s)],q0);var K0=class extends en{constructor(e,t,n,r,i){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=n,this._decorationService=r,this._renderService=i,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this._register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this._register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this._register(this._decorationService.onDecorationRemoved(o=>this._removeDecoration(o))),this._register(Kn(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){var r;let t=this._coreBrowserService.mainDocument.createElement("div");t.classList.add("xterm-decoration"),t.classList.toggle("xterm-decoration-top-layer",((r=e==null?void 0:e.options)==null?void 0:r.layer)==="top"),t.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,t.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,t.style.top=`${(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height}px`,t.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let n=e.options.x??0;return n&&n>this._bufferService.cols&&(t.style.display="none"),this._refreshXPosition(e,t),t}_refreshStyle(e){let t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display="none",e.onRenderEmitter.fire(e.element));else{let n=this._decorationElements.get(e);n||(n=this._createElement(e),e.element=n,this._decorationElements.set(e,n),this._container.appendChild(n),e.onDispose(()=>{this._decorationElements.delete(e),n.remove()})),n.style.display=this._altBufferIsActive?"none":"block",this._altBufferIsActive||(n.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,n.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,n.style.top=`${t*this._renderService.dimensions.css.cell.height}px`,n.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`),e.onRenderEmitter.fire(n)}}_refreshXPosition(e,t=e.element){if(!t)return;let n=e.options.x??0;(e.options.anchor||"left")==="right"?t.style.right=n?`${n*this._renderService.dimensions.css.cell.width}px`:"":t.style.left=n?`${n*this._renderService.dimensions.css.cell.width}px`:""}_removeDecoration(e){var t;(t=this._decorationElements.get(e))==null||t.remove(),this._decorationElements.delete(e),e.dispose()}};K0=or([ct(1,vi),ct(2,bs),ct(3,td),ct(4,_s)],K0);var XY=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(e){if(e.options.overviewRulerOptions){for(let t of this._zones)if(t.color===e.options.overviewRulerOptions.color&&t.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(t,e.marker.line))return;if(this._lineAdjacentToZone(t,e.marker.line,e.options.overviewRulerOptions.position)){this._addLineToZone(t,e.marker.line);return}}if(this._zonePoolIndex<this._zonePool.length){this._zonePool[this._zonePoolIndex].color=e.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=e.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=e.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=e.marker.line,this._zones.push(this._zonePool[this._zonePoolIndex++]);return}this._zones.push({color:e.options.overviewRulerOptions.color,position:e.options.overviewRulerOptions.position,startBufferLine:e.marker.line,endBufferLine:e.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(e){this._linePadding=e}_lineIntersectsZone(e,t){return t>=e.startBufferLine&&t<=e.endBufferLine}_lineAdjacentToZone(e,t,n){return t>=e.startBufferLine-this._linePadding[n||"full"]&&t<=e.endBufferLine+this._linePadding[n||"full"]}_addLineToZone(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)}},Lo={full:0,left:0,center:0,right:0},Ds={full:0,left:0,center:0,right:0},Kc={full:0,left:0,center:0,right:0},Rf=class extends en{constructor(e,t,n,r,i,o,a,c){var d;super(),this._viewportElement=e,this._screenElement=t,this._bufferService=n,this._decorationService=r,this._renderService=i,this._optionsService=o,this._themeService=a,this._coreBrowserService=c,this._colorZoneStore=new XY,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(d=this._viewportElement.parentElement)==null||d.insertBefore(this._canvas,this._viewportElement),this._register(Kn(()=>{var f;return(f=this._canvas)==null?void 0:f.remove()}));let u=this._canvas.getContext("2d");if(u)this._ctx=u;else throw new Error("Ctx cannot be null");this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this._register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0))),this._register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this._register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})),this._register(this._renderService.onRender(()=>{(!this._containerHeight||this._containerHeight!==this._screenElement.clientHeight)&&(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._register(this._optionsService.onSpecificOptionChange("overviewRuler",()=>this._queueRefresh(!0))),this._register(this._themeService.onChangeColors(()=>this._queueRefresh())),this._queueRefresh(!0)}get _width(){var e;return((e=this._optionsService.options.overviewRuler)==null?void 0:e.width)||0}_refreshDrawConstants(){let e=Math.floor((this._canvas.width-1)/3),t=Math.ceil((this._canvas.width-1)/3);Ds.full=this._canvas.width,Ds.left=e,Ds.center=t,Ds.right=e,this._refreshDrawHeightConstants(),Kc.full=1,Kc.left=1,Kc.center=1+Ds.left,Kc.right=1+Ds.left+Ds.center}_refreshDrawHeightConstants(){Lo.full=Math.round(2*this._coreBrowserService.dpr);let e=this._canvas.height/this._bufferService.buffer.lines.length,t=Math.round(Math.max(Math.min(e,12),6)*this._coreBrowserService.dpr);Lo.left=t,Lo.center=t,Lo.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Lo.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Lo.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Lo.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Lo.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(let t of this._decorationService.decorations)this._colorZoneStore.addDecoration(t);this._ctx.lineWidth=1,this._renderRulerOutline();let e=this._colorZoneStore.zones;for(let t of e)t.position!=="full"&&this._renderColorZone(t);for(let t of e)t.position==="full"&&this._renderColorZone(t);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderRulerOutline(){this._ctx.fillStyle=this._themeService.colors.overviewRulerBorder.css,this._ctx.fillRect(0,0,1,this._canvas.height),this._optionsService.rawOptions.overviewRuler.showTopBorder&&this._ctx.fillRect(1,0,this._canvas.width-1,1),this._optionsService.rawOptions.overviewRuler.showBottomBorder&&this._ctx.fillRect(1,this._canvas.height-1,this._canvas.width-1,this._canvas.height)}_renderColorZone(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(Kc[e.position||"full"],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-Lo[e.position||"full"]/2),Ds[e.position||"full"],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+Lo[e.position||"full"]))}_queueRefresh(e,t){this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};Rf=or([ct(2,vi),ct(3,td),ct(4,_s),ct(5,yi),ct(6,cc),ct(7,bs)],Rf);var Pe;(e=>(e.NUL="\0",e.SOH="",e.STX="",e.ETX="",e.EOT="",e.ENQ="",e.ACK="",e.BEL="\x07",e.BS="\b",e.HT=" ",e.LF=`
596
+ `,e.VT="\v",e.FF="\f",e.CR="\r",e.SO="",e.SI="",e.DLE="",e.DC1="",e.DC2="",e.DC3="",e.DC4="",e.NAK="",e.SYN="",e.ETB="",e.CAN="",e.EM="",e.SUB="",e.ESC="\x1B",e.FS="",e.GS="",e.RS="",e.US="",e.SP=" ",e.DEL=""))(Pe||(Pe={}));var qh;(e=>(e.PAD="€",e.HOP="",e.BPH="‚",e.NBH="ƒ",e.IND="„",e.NEL="…",e.SSA="†",e.ESA="‡",e.HTS="ˆ",e.HTJ="‰",e.VTS="Š",e.PLD="‹",e.PLU="Œ",e.RI="",e.SS2="Ž",e.SS3="",e.DCS="",e.PU1="‘",e.PU2="’",e.STS="“",e.CCH="”",e.MW="•",e.SPA="–",e.EPA="—",e.SOS="˜",e.SGCI="™",e.SCI="š",e.CSI="›",e.ST="œ",e.OSC="",e.PM="ž",e.APC="Ÿ"))(qh||(qh={}));var x4;(e=>e.ST=`${Pe.ESC}\\`)(x4||(x4={}));var G0=class{constructor(e,t,n,r,i,o){this._textarea=e,this._compositionView=t,this._bufferService=n,this._optionsService=r,this._coreService=i,this._renderService=o,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(e.keyCode===20||e.keyCode===229||e.keyCode===16||e.keyCode===17||e.keyCode===18)return!1;this._finalizeComposition(!1)}return e.keyCode===229?(this._handleAnyTextareaChanges(),!1):!0}_finalizeComposition(e){if(this._compositionView.classList.remove("active"),this._isComposing=!1,e){let t={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){this._isSendingComposition=!1;let n;t.start+=this._dataAlreadySent.length,this._isComposing?n=this._textarea.value.substring(t.start,this._compositionPosition.start):n=this._textarea.value.substring(t.start),n.length>0&&this._coreService.triggerDataEvent(n,!0)}},0)}else{this._isSendingComposition=!1;let t=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(t,!0)}}_handleAnyTextareaChanges(){let e=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let t=this._textarea.value,n=t.replace(e,"");this._dataAlreadySent=n,t.length>e.length?this._coreService.triggerDataEvent(n,!0):t.length<e.length?this._coreService.triggerDataEvent(`${Pe.DEL}`,!0):t.length===e.length&&t!==e&&this._coreService.triggerDataEvent(t,!0)}},0)}updateCompositionElements(e){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){let t=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),n=this._renderService.dimensions.css.cell.height,r=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,i=t*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=i+"px",this._compositionView.style.top=r+"px",this._compositionView.style.height=n+"px",this._compositionView.style.lineHeight=n+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";let o=this._compositionView.getBoundingClientRect();this._textarea.style.left=i+"px",this._textarea.style.top=r+"px",this._textarea.style.width=Math.max(o.width,1)+"px",this._textarea.style.height=Math.max(o.height,1)+"px",this._textarea.style.lineHeight=o.height+"px"}e||setTimeout(()=>this.updateCompositionElements(!0),0)}}};G0=or([ct(2,vi),ct(3,yi),ct(4,Va),ct(5,_s)],G0);var jr=0,Br=0,Lr=0,ir=0,Lx={css:"#00000000",rgba:0},vr;(e=>{function t(i,o,a,c){return c!==void 0?`#${ya(i)}${ya(o)}${ya(a)}${ya(c)}`:`#${ya(i)}${ya(o)}${ya(a)}`}e.toCss=t;function n(i,o,a,c=255){return(i<<24|o<<16|a<<8|c)>>>0}e.toRgba=n;function r(i,o,a,c){return{css:e.toCss(i,o,a,c),rgba:e.toRgba(i,o,a,c)}}e.toColor=r})(vr||(vr={}));var Vn;(e=>{function t(u,d){if(ir=(d.rgba&255)/255,ir===1)return{css:d.css,rgba:d.rgba};let f=d.rgba>>24&255,m=d.rgba>>16&255,g=d.rgba>>8&255,v=u.rgba>>24&255,y=u.rgba>>16&255,S=u.rgba>>8&255;jr=v+Math.round((f-v)*ir),Br=y+Math.round((m-y)*ir),Lr=S+Math.round((g-S)*ir);let _=vr.toCss(jr,Br,Lr),C=vr.toRgba(jr,Br,Lr);return{css:_,rgba:C}}e.blend=t;function n(u){return(u.rgba&255)===255}e.isOpaque=n;function r(u,d,f){let m=Kh.ensureContrastRatio(u.rgba,d.rgba,f);if(m)return vr.toColor(m>>24&255,m>>16&255,m>>8&255)}e.ensureContrastRatio=r;function i(u){let d=(u.rgba|255)>>>0;return[jr,Br,Lr]=Kh.toChannels(d),{css:vr.toCss(jr,Br,Lr),rgba:d}}e.opaque=i;function o(u,d){return ir=Math.round(d*255),[jr,Br,Lr]=Kh.toChannels(u.rgba),{css:vr.toCss(jr,Br,Lr,ir),rgba:vr.toRgba(jr,Br,Lr,ir)}}e.opacity=o;function a(u,d){return ir=u.rgba&255,o(u,ir*d/255)}e.multiplyOpacity=a;function c(u){return[u.rgba>>24&255,u.rgba>>16&255,u.rgba>>8&255]}e.toColorRGB=c})(Vn||(Vn={}));var Zn;(e=>{let t,n;try{let i=document.createElement("canvas");i.width=1,i.height=1;let o=i.getContext("2d",{willReadFrequently:!0});o&&(t=o,t.globalCompositeOperation="copy",n=t.createLinearGradient(0,0,1,1))}catch{}function r(i){if(i.match(/#[\da-f]{3,8}/i))switch(i.length){case 4:return jr=parseInt(i.slice(1,2).repeat(2),16),Br=parseInt(i.slice(2,3).repeat(2),16),Lr=parseInt(i.slice(3,4).repeat(2),16),vr.toColor(jr,Br,Lr);case 5:return jr=parseInt(i.slice(1,2).repeat(2),16),Br=parseInt(i.slice(2,3).repeat(2),16),Lr=parseInt(i.slice(3,4).repeat(2),16),ir=parseInt(i.slice(4,5).repeat(2),16),vr.toColor(jr,Br,Lr,ir);case 7:return{css:i,rgba:(parseInt(i.slice(1),16)<<8|255)>>>0};case 9:return{css:i,rgba:parseInt(i.slice(1),16)>>>0}}let o=i.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(o)return jr=parseInt(o[1]),Br=parseInt(o[2]),Lr=parseInt(o[3]),ir=Math.round((o[5]===void 0?1:parseFloat(o[5]))*255),vr.toColor(jr,Br,Lr,ir);if(!t||!n)throw new Error("css.toColor: Unsupported css format");if(t.fillStyle=n,t.fillStyle=i,typeof t.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(t.fillRect(0,0,1,1),[jr,Br,Lr,ir]=t.getImageData(0,0,1,1).data,ir!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:vr.toRgba(jr,Br,Lr,ir),css:i}}e.toColor=r})(Zn||(Zn={}));var hi;(e=>{function t(r){return n(r>>16&255,r>>8&255,r&255)}e.relativeLuminance=t;function n(r,i,o){let a=r/255,c=i/255,u=o/255,d=a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4),f=c<=.03928?c/12.92:Math.pow((c+.055)/1.055,2.4),m=u<=.03928?u/12.92:Math.pow((u+.055)/1.055,2.4);return d*.2126+f*.7152+m*.0722}e.relativeLuminance2=n})(hi||(hi={}));var Kh;(e=>{function t(a,c){if(ir=(c&255)/255,ir===1)return c;let u=c>>24&255,d=c>>16&255,f=c>>8&255,m=a>>24&255,g=a>>16&255,v=a>>8&255;return jr=m+Math.round((u-m)*ir),Br=g+Math.round((d-g)*ir),Lr=v+Math.round((f-v)*ir),vr.toRgba(jr,Br,Lr)}e.blend=t;function n(a,c,u){let d=hi.relativeLuminance(a>>8),f=hi.relativeLuminance(c>>8);if(ds(d,f)<u){if(f<d){let v=r(a,c,u),y=ds(d,hi.relativeLuminance(v>>8));if(y<u){let S=i(a,c,u),_=ds(d,hi.relativeLuminance(S>>8));return y>_?v:S}return v}let m=i(a,c,u),g=ds(d,hi.relativeLuminance(m>>8));if(g<u){let v=r(a,c,u),y=ds(d,hi.relativeLuminance(v>>8));return g>y?m:v}return m}}e.ensureContrastRatio=n;function r(a,c,u){let d=a>>24&255,f=a>>16&255,m=a>>8&255,g=c>>24&255,v=c>>16&255,y=c>>8&255,S=ds(hi.relativeLuminance2(g,v,y),hi.relativeLuminance2(d,f,m));for(;S<u&&(g>0||v>0||y>0);)g-=Math.max(0,Math.ceil(g*.1)),v-=Math.max(0,Math.ceil(v*.1)),y-=Math.max(0,Math.ceil(y*.1)),S=ds(hi.relativeLuminance2(g,v,y),hi.relativeLuminance2(d,f,m));return(g<<24|v<<16|y<<8|255)>>>0}e.reduceLuminance=r;function i(a,c,u){let d=a>>24&255,f=a>>16&255,m=a>>8&255,g=c>>24&255,v=c>>16&255,y=c>>8&255,S=ds(hi.relativeLuminance2(g,v,y),hi.relativeLuminance2(d,f,m));for(;S<u&&(g<255||v<255||y<255);)g=Math.min(255,g+Math.ceil((255-g)*.1)),v=Math.min(255,v+Math.ceil((255-v)*.1)),y=Math.min(255,y+Math.ceil((255-y)*.1)),S=ds(hi.relativeLuminance2(g,v,y),hi.relativeLuminance2(d,f,m));return(g<<24|v<<16|y<<8|255)>>>0}e.increaseLuminance=i;function o(a){return[a>>24&255,a>>16&255,a>>8&255,a&255]}e.toChannels=o})(Kh||(Kh={}));function ya(e){let t=e.toString(16);return t.length<2?"0"+t:t}function ds(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}var YY=class extends ed{constructor(e,t,n){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=n}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},Tf=class{constructor(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new uo}register(e){let t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id}deregister(e){for(let t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1}getJoinedCharacters(e){if(this._characterJoiners.length===0)return[];let t=this._bufferService.buffer.lines.get(e);if(!t||t.length===0)return[];let n=[],r=t.translateToString(!0),i=0,o=0,a=0,c=t.getFg(0),u=t.getBg(0);for(let d=0;d<t.getTrimmedLength();d++)if(t.loadCell(d,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==c||this._workCell.bg!==u){if(d-i>1){let f=this._getJoinedRanges(r,a,o,t,i);for(let m=0;m<f.length;m++)n.push(f[m])}i=d,a=o,c=this._workCell.fg,u=this._workCell.bg}o+=this._workCell.getChars().length||Gs.length}if(this._bufferService.cols-i>1){let d=this._getJoinedRanges(r,a,o,t,i);for(let f=0;f<d.length;f++)n.push(d[f])}return n}_getJoinedRanges(e,t,n,r,i){let o=e.substring(t,n),a=[];try{a=this._characterJoiners[0].handler(o)}catch(c){console.error(c)}for(let c=1;c<this._characterJoiners.length;c++)try{let u=this._characterJoiners[c].handler(o);for(let d=0;d<u.length;d++)Tf._mergeRanges(a,u[d])}catch(u){console.error(u)}return this._stringRangesToCellRanges(a,r,i),a}_stringRangesToCellRanges(e,t,n){let r=0,i=!1,o=0,a=e[r];if(a){for(let c=n;c<this._bufferService.cols;c++){let u=t.getWidth(c),d=t.getString(c).length||Gs.length;if(u!==0){if(!i&&a[0]<=o&&(a[0]=c,i=!0),a[1]<=o){if(a[1]=c,a=e[++r],!a)break;a[0]<=o?(a[0]=c,i=!0):i=!1}o+=d}}a&&(a[1]=this._bufferService.cols)}}static _mergeRanges(e,t){let n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(n){if(t[1]<=i[0])return e[r-1][1]=t[1],e;if(t[1]<=i[1])return e[r-1][1]=Math.max(t[1],i[1]),e.splice(r,1),e;e.splice(r,1),r--}else{if(t[1]<=i[0])return e.splice(r,0,t),e;if(t[1]<=i[1])return i[0]=Math.min(t[0],i[0]),e;t[0]<i[1]&&(i[0]=Math.min(t[0],i[0]),n=!0);continue}}return n?e[e.length-1][1]=t[1]:e.push(t),e}};Tf=or([ct(0,vi)],Tf);function JY(e){return 57508<=e&&e<=57558}function QY(e){return 9472<=e&&e<=9631}function ZY(e){return JY(e)||QY(e)}function eJ(){return{css:{canvas:Sh(),cell:Sh()},device:{canvas:Sh(),cell:Sh(),char:{width:0,height:0,left:0,top:0}}}}function Sh(){return{width:0,height:0}}var X0=class{constructor(e,t,n,r,i,o,a){this._document=e,this._characterJoinerService=t,this._optionsService=n,this._coreBrowserService=r,this._coreService=i,this._decorationService=o,this._themeService=a,this._workCell=new uo,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(e,t,n){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=n}createRow(e,t,n,r,i,o,a,c,u,d,f){let m=[],g=this._characterJoinerService.getJoinedCharacters(t),v=this._themeService.colors,y=e.getNoBgTrimmedLength();n&&y<o+1&&(y=o+1);let S,_=0,C="",E=0,k=0,$=0,P=0,T=!1,O=0,N=!1,I=0,z=0,L=[],M=d!==-1&&f!==-1;for(let j=0;j<y;j++){e.loadCell(j,this._workCell);let B=this._workCell.getWidth();if(B===0)continue;let H=!1,W=j>=z,V=j,A=this._workCell;if(g.length>0&&j===g[0][0]&&W){let ce=g.shift(),ye=this._isCellInSelection(ce[0],t);for(E=ce[0]+1;E<ce[1];E++)W&&(W=ye===this._isCellInSelection(E,t));W&&(W=!n||o<ce[0]||o>=ce[1]),W?(H=!0,A=new YY(this._workCell,e.translateToString(!0,ce[0],ce[1]),ce[1]-ce[0]),V=ce[1]-1,B=A.getWidth()):z=ce[1]}let G=this._isCellInSelection(j,t),q=n&&j===o,D=M&&j>=d&&j<=f,U=!1;this._decorationService.forEachDecorationAtCell(j,t,void 0,ce=>{U=!0});let Y=A.getChars()||Gs;if(Y===" "&&(A.isUnderline()||A.isOverline())&&(Y=" "),I=B*c-u.get(Y,A.isBold(),A.isItalic()),!S)S=this._document.createElement("span");else if(_&&(G&&N||!G&&!N&&A.bg===k)&&(G&&N&&v.selectionForeground||A.fg===$)&&A.extended.ext===P&&D===T&&I===O&&!q&&!H&&!U&&W){A.isInvisible()?C+=Gs:C+=Y,_++;continue}else _&&(S.textContent=C),S=this._document.createElement("span"),_=0,C="";if(k=A.bg,$=A.fg,P=A.extended.ext,T=D,O=I,N=G,H&&o>=j&&o<=V&&(o=j),!this._coreService.isCursorHidden&&q&&this._coreService.isCursorInitialized){if(L.push("xterm-cursor"),this._coreBrowserService.isFocused)a&&L.push("xterm-cursor-blink"),L.push(r==="bar"?"xterm-cursor-bar":r==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(i)switch(i){case"outline":L.push("xterm-cursor-outline");break;case"block":L.push("xterm-cursor-block");break;case"bar":L.push("xterm-cursor-bar");break;case"underline":L.push("xterm-cursor-underline");break}}if(A.isBold()&&L.push("xterm-bold"),A.isItalic()&&L.push("xterm-italic"),A.isDim()&&L.push("xterm-dim"),A.isInvisible()?C=Gs:C=A.getChars()||Gs,A.isUnderline()&&(L.push(`xterm-underline-${A.extended.underlineStyle}`),C===" "&&(C=" "),!A.isUnderlineColorDefault()))if(A.isUnderlineColorRGB())S.style.textDecorationColor=`rgb(${ed.toColorRGB(A.getUnderlineColor()).join(",")})`;else{let ce=A.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&A.isBold()&&ce<8&&(ce+=8),S.style.textDecorationColor=v.ansi[ce].css}A.isOverline()&&(L.push("xterm-overline"),C===" "&&(C=" ")),A.isStrikethrough()&&L.push("xterm-strikethrough"),D&&(S.style.textDecoration="underline");let Z=A.getFgColor(),ee=A.getFgColorMode(),re=A.getBgColor(),he=A.getBgColorMode(),fe=!!A.isInverse();if(fe){let ce=Z;Z=re,re=ce;let ye=ee;ee=he,he=ye}let ue,Se,ae=!1;this._decorationService.forEachDecorationAtCell(j,t,void 0,ce=>{ce.options.layer!=="top"&&ae||(ce.backgroundColorRGB&&(he=50331648,re=ce.backgroundColorRGB.rgba>>8&16777215,ue=ce.backgroundColorRGB),ce.foregroundColorRGB&&(ee=50331648,Z=ce.foregroundColorRGB.rgba>>8&16777215,Se=ce.foregroundColorRGB),ae=ce.options.layer==="top")}),!ae&&G&&(ue=this._coreBrowserService.isFocused?v.selectionBackgroundOpaque:v.selectionInactiveBackgroundOpaque,re=ue.rgba>>8&16777215,he=50331648,ae=!0,v.selectionForeground&&(ee=50331648,Z=v.selectionForeground.rgba>>8&16777215,Se=v.selectionForeground)),ae&&L.push("xterm-decoration-top");let le;switch(he){case 16777216:case 33554432:le=v.ansi[re],L.push(`xterm-bg-${re}`);break;case 50331648:le=vr.toColor(re>>16,re>>8&255,re&255),this._addStyle(S,`background-color:#${Ax((re>>>0).toString(16),"0",6)}`);break;case 0:default:fe?(le=v.foreground,L.push("xterm-bg-257")):le=v.background}switch(ue||A.isDim()&&(ue=Vn.multiplyOpacity(le,.5)),ee){case 16777216:case 33554432:A.isBold()&&Z<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Z+=8),this._applyMinimumContrast(S,le,v.ansi[Z],A,ue,void 0)||L.push(`xterm-fg-${Z}`);break;case 50331648:let ce=vr.toColor(Z>>16&255,Z>>8&255,Z&255);this._applyMinimumContrast(S,le,ce,A,ue,Se)||this._addStyle(S,`color:#${Ax(Z.toString(16),"0",6)}`);break;case 0:default:this._applyMinimumContrast(S,le,v.foreground,A,ue,Se)||fe&&L.push("xterm-fg-257")}L.length&&(S.className=L.join(" "),L.length=0),!q&&!H&&!U&&W?_++:S.textContent=C,I!==this.defaultSpacing&&(S.style.letterSpacing=`${I}px`),m.push(S),j=V}return S&&_&&(S.textContent=C),m}_applyMinimumContrast(e,t,n,r,i,o){if(this._optionsService.rawOptions.minimumContrastRatio===1||ZY(r.getCode()))return!1;let a=this._getContrastCache(r),c;if(!i&&!o&&(c=a.getColor(t.rgba,n.rgba)),c===void 0){let u=this._optionsService.rawOptions.minimumContrastRatio/(r.isDim()?2:1);c=Vn.ensureContrastRatio(i||t,o||n,u),a.setColor((i||t).rgba,(o||n).rgba,c??null)}return c?(this._addStyle(e,`color:${c.css}`),!0):!1}_getContrastCache(e){return e.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(e,t){e.setAttribute("style",`${e.getAttribute("style")||""}${t};`)}_isCellInSelection(e,t){let n=this._selectionStart,r=this._selectionEnd;return!n||!r?!1:this._columnSelectMode?n[0]<=r[0]?e>=n[0]&&t>=n[1]&&e<r[0]&&t<=r[1]:e<n[0]&&t>=n[1]&&e>=r[0]&&t<=r[1]:t>n[1]&&t<r[1]||n[1]===r[1]&&t===n[1]&&e>=n[0]&&e<r[0]||n[1]<r[1]&&t===r[1]&&e<r[0]||n[1]<r[1]&&t===n[1]&&e>=n[0]}};X0=or([ct(1,s4),ct(2,yi),ct(3,bs),ct(4,Va),ct(5,td),ct(6,cc)],X0);function Ax(e,t,n){for(;e.length<n;)e=t+e;return e}var tJ=class{constructor(e,t){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=e.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";let n=e.createElement("span");n.classList.add("xterm-char-measure-element");let r=e.createElement("span");r.classList.add("xterm-char-measure-element"),r.style.fontWeight="bold";let i=e.createElement("span");i.classList.add("xterm-char-measure-element"),i.style.fontStyle="italic";let o=e.createElement("span");o.classList.add("xterm-char-measure-element"),o.style.fontWeight="bold",o.style.fontStyle="italic",this._measureElements=[n,r,i,o],this._container.appendChild(n),this._container.appendChild(r),this._container.appendChild(i),this._container.appendChild(o),t.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(e,t,n,r){e===this._font&&t===this._fontSize&&n===this._weight&&r===this._weightBold||(this._font=e,this._fontSize=t,this._weight=n,this._weightBold=r,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${n}`,this._measureElements[1].style.fontWeight=`${r}`,this._measureElements[2].style.fontWeight=`${n}`,this._measureElements[3].style.fontWeight=`${r}`,this.clear())}get(e,t,n){let r=0;if(!t&&!n&&e.length===1&&(r=e.charCodeAt(0))<256){if(this._flat[r]!==-9999)return this._flat[r];let a=this._measure(e,0);return a>0&&(this._flat[r]=a),a}let i=e;t&&(i+="B"),n&&(i+="I");let o=this._holey.get(i);if(o===void 0){let a=0;t&&(a|=1),n&&(a|=2),o=this._measure(e,a),o>0&&this._holey.set(i,o)}return o}_measure(e,t){let n=this._measureElements[t];return n.textContent=e.repeat(32),n.offsetWidth/32}},nJ=class{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(e,t,n,r=!1){if(this.selectionStart=t,this.selectionEnd=n,!t||!n||t[0]===n[0]&&t[1]===n[1]){this.clear();return}let i=e.buffers.active.ydisp,o=t[1]-i,a=n[1]-i,c=Math.max(o,0),u=Math.min(a,e.rows-1);if(c>=e.rows||u<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=r,this.viewportStartRow=o,this.viewportEndRow=a,this.viewportCappedStartRow=c,this.viewportCappedEndRow=u,this.startCol=t[0],this.endCol=n[0]}isCellSelected(e,t,n){return this.hasSelection?(n-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&n>=this.viewportCappedStartRow&&t<this.endCol&&n<=this.viewportCappedEndRow:t<this.startCol&&n>=this.viewportCappedStartRow&&t>=this.endCol&&n<=this.viewportCappedEndRow:n>this.viewportStartRow&&n<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&n===this.viewportStartRow&&t>=this.startCol&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&n===this.viewportEndRow&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&n===this.viewportStartRow&&t>=this.startCol):!1}};function rJ(){return new nJ}var nv="xterm-dom-renderer-owner-",oo="xterm-rows",Ch="xterm-fg-",Dx="xterm-bg-",Gc="xterm-focus",wh="xterm-selection",iJ=1,Y0=class extends en{constructor(e,t,n,r,i,o,a,c,u,d,f,m,g,v){super(),this._terminal=e,this._document=t,this._element=n,this._screenElement=r,this._viewportElement=i,this._helperContainer=o,this._linkifier2=a,this._charSizeService=u,this._optionsService=d,this._bufferService=f,this._coreService=m,this._coreBrowserService=g,this._themeService=v,this._terminalClass=iJ++,this._rowElements=[],this._selectionRenderModel=rJ(),this.onRequestRedraw=this._register(new Ue).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(oo),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(wh),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=eJ(),this._updateDimensions(),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._themeService.onChangeColors(y=>this._injectCss(y))),this._injectCss(this._themeService.colors),this._rowFactory=c.createInstance(X0,document),this._element.classList.add(nv+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this._register(this._linkifier2.onShowLinkUnderline(y=>this._handleLinkHover(y))),this._register(this._linkifier2.onHideLinkUnderline(y=>this._handleLinkLeave(y))),this._register(Kn(()=>{this._element.classList.remove(nv+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new tJ(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){let e=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*e,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*e),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/e),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/e),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(let n of this._rowElements)n.style.width=`${this.dimensions.css.canvas.width}px`,n.style.height=`${this.dimensions.css.cell.height}px`,n.style.lineHeight=`${this.dimensions.css.cell.height}px`,n.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));let t=`${this._terminalSelector} .${oo} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=t,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(e){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let t=`${this._terminalSelector} .${oo} { pointer-events: none; color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;t+=`${this._terminalSelector} .${oo} .xterm-dim { color: ${Vn.multiplyOpacity(e.foreground,.5).css};}`,t+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;let n=`blink_underline_${this._terminalClass}`,r=`blink_bar_${this._terminalClass}`,i=`blink_block_${this._terminalClass}`;t+=`@keyframes ${n} { 50% { border-bottom-style: hidden; }}`,t+=`@keyframes ${r} { 50% { box-shadow: none; }}`,t+=`@keyframes ${i} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`,t+=`${this._terminalSelector} .${oo}.${Gc} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${n} 1s step-end infinite;}${this._terminalSelector} .${oo}.${Gc} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${r} 1s step-end infinite;}${this._terminalSelector} .${oo}.${Gc} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${i} 1s step-end infinite;}${this._terminalSelector} .${oo} .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .${oo} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .${oo} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${oo} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .${oo} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,t+=`${this._terminalSelector} .${wh} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${wh} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${wh} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;for(let[o,a]of e.ansi.entries())t+=`${this._terminalSelector} .${Ch}${o} { color: ${a.css}; }${this._terminalSelector} .${Ch}${o}.xterm-dim { color: ${Vn.multiplyOpacity(a,.5).css}; }${this._terminalSelector} .${Dx}${o} { background-color: ${a.css}; }`;t+=`${this._terminalSelector} .${Ch}257 { color: ${Vn.opaque(e.background).css}; }${this._terminalSelector} .${Ch}257.xterm-dim { color: ${Vn.multiplyOpacity(Vn.opaque(e.background),.5).css}; }${this._terminalSelector} .${Dx}257 { background-color: ${e.foreground.css}; }`,this._themeStyleElement.textContent=t}_setDefaultSpacing(){let e=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${e}px`,this._rowFactory.defaultSpacing=e}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(e,t){for(let n=this._rowElements.length;n<=t;n++){let r=this._document.createElement("div");this._rowContainer.appendChild(r),this._rowElements.push(r)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(e,t){this._refreshRowElements(e,t),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(Gc),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(Gc),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(e,t,n){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(e,t,n),this.renderRows(0,this._bufferService.rows-1),!e||!t||(this._selectionRenderModel.update(this._terminal,e,t,n),!this._selectionRenderModel.hasSelection))return;let r=this._selectionRenderModel.viewportStartRow,i=this._selectionRenderModel.viewportEndRow,o=this._selectionRenderModel.viewportCappedStartRow,a=this._selectionRenderModel.viewportCappedEndRow,c=this._document.createDocumentFragment();if(n){let u=e[0]>t[0];c.appendChild(this._createSelectionElement(o,u?t[0]:e[0],u?e[0]:t[0],a-o+1))}else{let u=r===o?e[0]:0,d=o===i?t[0]:this._bufferService.cols;c.appendChild(this._createSelectionElement(o,u,d));let f=a-o-1;if(c.appendChild(this._createSelectionElement(o+1,0,this._bufferService.cols,f)),o!==a){let m=i===a?t[0]:this._bufferService.cols;c.appendChild(this._createSelectionElement(a,0,m))}}this._selectionContainer.appendChild(c)}_createSelectionElement(e,t,n,r=1){let i=this._document.createElement("div"),o=t*this.dimensions.css.cell.width,a=this.dimensions.css.cell.width*(n-t);return o+a>this.dimensions.css.canvas.width&&(a=this.dimensions.css.canvas.width-o),i.style.height=`${r*this.dimensions.css.cell.height}px`,i.style.top=`${e*this.dimensions.css.cell.height}px`,i.style.left=`${o}px`,i.style.width=`${a}px`,i}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(let e of this._rowElements)e.replaceChildren()}renderRows(e,t){let n=this._bufferService.buffer,r=n.ybase+n.y,i=Math.min(n.x,this._bufferService.cols-1),o=this._coreService.decPrivateModes.cursorBlink??this._optionsService.rawOptions.cursorBlink,a=this._coreService.decPrivateModes.cursorStyle??this._optionsService.rawOptions.cursorStyle,c=this._optionsService.rawOptions.cursorInactiveStyle;for(let u=e;u<=t;u++){let d=u+n.ydisp,f=this._rowElements[u],m=n.lines.get(d);if(!f||!m)break;f.replaceChildren(...this._rowFactory.createRow(m,d,d===r,a,c,i,o,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${nv}${this._terminalClass}`}_handleLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_handleLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,n,r,i,o){n<0&&(e=0),r<0&&(t=0);let a=this._bufferService.rows-1;n=Math.max(Math.min(n,a),0),r=Math.max(Math.min(r,a),0),i=Math.min(i,this._bufferService.cols);let c=this._bufferService.buffer,u=c.ybase+c.y,d=Math.min(c.x,i-1),f=this._optionsService.rawOptions.cursorBlink,m=this._optionsService.rawOptions.cursorStyle,g=this._optionsService.rawOptions.cursorInactiveStyle;for(let v=n;v<=r;++v){let y=v+c.ydisp,S=this._rowElements[v],_=c.lines.get(y);if(!S||!_)break;S.replaceChildren(...this._rowFactory.createRow(_,y,y===u,m,g,d,f,this.dimensions.css.cell.width,this._widthCache,o?v===n?e:0:-1,o?(v===r?t:i)-1:-1))}}};Y0=or([ct(7,$b),ct(8,Sm),ct(9,yi),ct(10,vi),ct(11,Va),ct(12,bs),ct(13,cc)],Y0);var J0=class extends en{constructor(e,t,n){super(),this._optionsService=n,this.width=0,this.height=0,this._onCharSizeChange=this._register(new Ue),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this._register(new sJ(this._optionsService))}catch{this._measureStrategy=this._register(new oJ(e,t,this._optionsService))}this._register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}get hasValidSize(){return this.width>0&&this.height>0}measure(){let e=this._measureStrategy.measure();(e.width!==this.width||e.height!==this.height)&&(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};J0=or([ct(2,yi)],J0);var E4=class extends en{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(e,t){e!==void 0&&e>0&&t!==void 0&&t>0&&(this._result.width=e,this._result.height=t)}},oJ=class extends E4{constructor(e,t,n){super(),this._document=e,this._parentElement=t,this._optionsService=n,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}},sJ=class extends E4{constructor(e){super(),this._optionsService=e,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");let t=this._ctx.measureText("W");if(!("width"in t&&"fontBoundingBoxAscent"in t&&"fontBoundingBoxDescent"in t))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let e=this._ctx.measureText("W");return this._validateAndSet(e.width,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent),this._result}},aJ=class extends en{constructor(e,t,n){super(),this._textarea=e,this._window=t,this.mainDocument=n,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=this._register(new lJ(this._window)),this._onDprChange=this._register(new Ue),this.onDprChange=this._onDprChange.event,this._onWindowChange=this._register(new Ue),this.onWindowChange=this._onWindowChange.event,this._register(this.onWindowChange(r=>this._screenDprMonitor.setWindow(r))),this._register(Kr.forward(this._screenDprMonitor.onDprChange,this._onDprChange)),this._register(Vt(this._textarea,"focus",()=>this._isFocused=!0)),this._register(Vt(this._textarea,"blur",()=>this._isFocused=!1))}get window(){return this._window}set window(e){this._window!==e&&(this._window=e,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}},lJ=class extends en{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this._register(new tc),this._onDprChange=this._register(new Ue),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this._register(Kn(()=>this.clearListener()))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=Vt(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var e;this._outerListener&&((e=this._resolutionMediaMatchList)==null||e.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){!this._resolutionMediaMatchList||!this._outerListener||(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}},cJ=class extends en{constructor(){super(),this.linkProviders=[],this._register(Kn(()=>this.linkProviders.length=0))}registerLinkProvider(e){return this.linkProviders.push(e),{dispose:()=>{let t=this.linkProviders.indexOf(e);t!==-1&&this.linkProviders.splice(t,1)}}}};function zb(e,t,n){let r=n.getBoundingClientRect(),i=e.getComputedStyle(n),o=parseInt(i.getPropertyValue("padding-left")),a=parseInt(i.getPropertyValue("padding-top"));return[t.clientX-r.left-o,t.clientY-r.top-a]}function uJ(e,t,n,r,i,o,a,c,u){if(!o)return;let d=zb(e,t,n);if(d)return d[0]=Math.ceil((d[0]+(u?a/2:0))/a),d[1]=Math.ceil(d[1]/c),d[0]=Math.min(Math.max(d[0],1),r+(u?1:0)),d[1]=Math.min(Math.max(d[1],1),i),d}var Q0=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,n,r,i){return uJ(window,e,t,n,r,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,i)}getMouseReportCoords(e,t){let n=zb(window,e,t);if(this._charSizeService.hasValidSize)return n[0]=Math.min(Math.max(n[0],0),this._renderService.dimensions.css.canvas.width-1),n[1]=Math.min(Math.max(n[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(n[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(n[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(n[0]),y:Math.floor(n[1])}}};Q0=or([ct(0,_s),ct(1,Sm)],Q0);var dJ=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(e,t,n){this._rowCount=n,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t,!this._animationFrame&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0){this._runRefreshCallbacks();return}let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}},k4={};SX(k4,{getSafariVersion:()=>fJ,isChromeOS:()=>P4,isFirefox:()=>$4,isIpad:()=>mJ,isIphone:()=>pJ,isLegacyEdge:()=>hJ,isLinux:()=>jb,isMac:()=>Pf,isNode:()=>Cm,isSafari:()=>R4,isWindows:()=>T4});var Cm=typeof process<"u"&&"title"in process,nd=Cm?"node":navigator.userAgent,rd=Cm?"node":navigator.platform,$4=nd.includes("Firefox"),hJ=nd.includes("Edge"),R4=/^((?!chrome|android).)*safari/i.test(nd);function fJ(){if(!R4)return 0;let e=nd.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1])}var Pf=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(rd),mJ=rd==="iPad",pJ=rd==="iPhone",T4=["Windows","Win16","Win32","WinCE"].includes(rd),jb=rd.indexOf("Linux")>=0,P4=/\bCrOS\b/.test(nd),O4=class{constructor(){this._tasks=[],this._i=0}enqueue(e){this._tasks.push(e),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(e){this._idleCallback=void 0;let t=0,n=0,r=e.timeRemaining(),i=0;for(;this._i<this._tasks.length;){if(t=performance.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,performance.now()-t),n=Math.max(t,n),i=e.timeRemaining(),n*1.5>i){r-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-t))}ms`),this._start();return}r=i}this.clear()}},gJ=class extends O4{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},vJ=class extends O4{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},Of=!Cm&&"requestIdleCallback"in window?vJ:gJ,yJ=class{constructor(){this._queue=new Of}set(e){this._queue.clear(),this._queue.enqueue(e)}flush(){this._queue.flush()}},Z0=class extends en{constructor(e,t,n,r,i,o,a,c,u){super(),this._rowCount=e,this._optionsService=n,this._charSizeService=r,this._coreService=i,this._coreBrowserService=c,this._renderer=this._register(new tc),this._pausedResizeTask=new yJ,this._observerDisposable=this._register(new tc),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this._register(new Ue),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this._register(new Ue),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this._register(new Ue),this.onRender=this._onRender.event,this._onRefreshRequest=this._register(new Ue),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new dJ((d,f)=>this._renderRows(d,f),this._coreBrowserService),this._register(this._renderDebouncer),this._syncOutputHandler=new bJ(this._coreBrowserService,this._coreService,()=>this._fullRefresh()),this._register(Kn(()=>this._syncOutputHandler.dispose())),this._register(this._coreBrowserService.onDprChange(()=>this.handleDevicePixelRatioChange())),this._register(a.onResize(()=>this._fullRefresh())),this._register(a.buffers.onBufferActivate(()=>{var d;return(d=this._renderer.value)==null?void 0:d.clear()})),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this._register(o.onDecorationRegistered(()=>this._fullRefresh())),this._register(o.onDecorationRemoved(()=>this._fullRefresh())),this._register(this._optionsService.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(a.cols,a.rows),this._fullRefresh()})),this._register(this._optionsService.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(a.buffer.y,a.buffer.y,!0))),this._register(u.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(this._coreBrowserService.window,t),this._register(this._coreBrowserService.onWindowChange(d=>this._registerIntersectionObserver(d,t)))}get dimensions(){return this._renderer.value.dimensions}_registerIntersectionObserver(e,t){if("IntersectionObserver"in e){let n=new e.IntersectionObserver(r=>this._handleIntersectionChange(r[r.length-1]),{threshold:0});n.observe(t),this._observerDisposable.value=Kn(()=>n.disconnect())}}_handleIntersectionChange(e){this._isPaused=e.isIntersecting===void 0?e.intersectionRatio===0:!e.isIntersecting,!this._isPaused&&!this._charSizeService.hasValidSize&&this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(e,t,n=!1){if(this._isPaused){this._needsFullRefresh=!0;return}if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}let r=this._syncOutputHandler.flush();r&&(e=Math.min(e,r.start),t=Math.max(t,r.end)),n||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount)}_renderRows(e,t){if(this._renderer.value){if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}e=Math.min(e,this._rowCount-1),t=Math.min(t,this._rowCount-1),this._renderer.value.renderRows(e,t),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0}}resize(e,t){this._rowCount=t,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(e){this._renderer.value=e,this._renderer.value&&(this._renderer.value.onRequestRedraw(t=>this.refreshRows(t.start,t.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var e,t;this._renderer.value&&((t=(e=this._renderer.value).clearTextureAtlas)==null||t.call(e),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(e,t){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var n;return(n=this._renderer.value)==null?void 0:n.handleResize(e,t)}):this._renderer.value.handleResize(e,t),this._fullRefresh())}handleCharSizeChanged(){var e;(e=this._renderer.value)==null||e.handleCharSizeChanged()}handleBlur(){var e;(e=this._renderer.value)==null||e.handleBlur()}handleFocus(){var e;(e=this._renderer.value)==null||e.handleFocus()}handleSelectionChanged(e,t,n){var r;this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=n,(r=this._renderer.value)==null||r.handleSelectionChanged(e,t,n)}handleCursorMove(){var e;(e=this._renderer.value)==null||e.handleCursorMove()}clear(){var e;(e=this._renderer.value)==null||e.clear()}};Z0=or([ct(2,yi),ct(3,Sm),ct(4,Va),ct(5,td),ct(6,vi),ct(7,bs),ct(8,cc)],Z0);var bJ=class{constructor(e,t,n){this._coreBrowserService=e,this._coreService=t,this._onTimeout=n,this._start=0,this._end=0,this._isBuffering=!1}bufferRows(e,t){this._isBuffering?(this._start=Math.min(this._start,e),this._end=Math.max(this._end,t)):(this._start=e,this._end=t,this._isBuffering=!0),this._timeout===void 0&&(this._timeout=this._coreBrowserService.window.setTimeout(()=>{this._timeout=void 0,this._coreService.decPrivateModes.synchronizedOutput=!1,this._onTimeout()},1e3))}flush(){if(this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0),!this._isBuffering)return;let e={start:this._start,end:this._end};return this._isBuffering=!1,e}dispose(){this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0)}};function _J(e,t,n,r){let i=n.buffer.x,o=n.buffer.y;if(!n.buffer.hasScrollback)return wJ(i,o,e,t,n,r)+wm(o,t,n,r)+xJ(i,o,e,t,n,r);let a;if(o===t)return a=i>e?"D":"C",Mu(Math.abs(i-e),Nu(a,r));a=o>t?"D":"C";let c=Math.abs(o-t),u=CJ(o>t?e:i,n)+(c-1)*n.cols+1+SJ(o>t?i:e);return Mu(u,Nu(a,r))}function SJ(e,t){return e-1}function CJ(e,t){return t.cols-e}function wJ(e,t,n,r,i,o){return wm(t,r,i,o).length===0?"":Mu(N4(e,t,e,t-La(t,i),!1,i).length,Nu("D",o))}function wm(e,t,n,r){let i=e-La(e,n),o=t-La(t,n),a=Math.abs(i-o)-EJ(e,t,n);return Mu(a,Nu(I4(e,t),r))}function xJ(e,t,n,r,i,o){let a;wm(t,r,i,o).length>0?a=r-La(r,i):a=t;let c=r,u=kJ(e,t,n,r,i,o);return Mu(N4(e,a,n,c,u==="C",i).length,Nu(u,o))}function EJ(e,t,n){var a;let r=0,i=e-La(e,n),o=t-La(t,n);for(let c=0;c<Math.abs(i-o);c++){let u=I4(e,t)==="A"?-1:1;(a=n.buffer.lines.get(i+u*c))!=null&&a.isWrapped&&r++}return r}function La(e,t){let n=0,r=t.buffer.lines.get(e),i=r==null?void 0:r.isWrapped;for(;i&&e>=0&&e<t.rows;)n++,r=t.buffer.lines.get(--e),i=r==null?void 0:r.isWrapped;return n}function kJ(e,t,n,r,i,o){let a;return wm(n,r,i,o).length>0?a=r-La(r,i):a=t,e<n&&a<=r||e>=n&&a<r?"C":"D"}function I4(e,t){return e>t?"A":"B"}function N4(e,t,n,r,i,o){let a=e,c=t,u="";for(;(a!==n||c!==r)&&c>=0&&c<o.buffer.lines.length;)a+=i?1:-1,i&&a>o.cols-1?(u+=o.buffer.translateBufferLineToString(c,!1,e,a),a=0,e=0,c++):!i&&a<0&&(u+=o.buffer.translateBufferLineToString(c,!1,0,e+1),a=o.cols-1,e=a,c--);return u+o.buffer.translateBufferLineToString(c,!1,e,a)}function Nu(e,t){let n=t?"O":"[";return Pe.ESC+n+e}function Mu(e,t){e=Math.floor(e);let n="";for(let r=0;r<e;r++)n+=t;return n}var $J=class{constructor(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:!this.selectionEnd||!this.selectionStart?this.selectionStart:this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?e%this._bufferService.cols===0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let e=this.selectionStart,t=this.selectionEnd;return!e||!t?!1:e[1]>t[1]||e[1]===t[1]&&e[0]>t[0]}handleTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}};function Hx(e,t){if(e.start.y>e.end.y)throw new Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}var rv=50,RJ=15,TJ=50,PJ=500,OJ=" ",IJ=new RegExp(OJ,"g"),ey=class extends en{constructor(e,t,n,r,i,o,a,c,u){super(),this._element=e,this._screenElement=t,this._linkifier=n,this._bufferService=r,this._coreService=i,this._mouseService=o,this._optionsService=a,this._renderService=c,this._coreBrowserService=u,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new uo,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this._register(new Ue),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this._register(new Ue),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this._register(new Ue),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this._register(new Ue),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=d=>this._handleMouseMove(d),this._mouseUpListener=d=>this._handleMouseUp(d),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(d=>this._handleTrim(d)),this._register(this._bufferService.buffers.onBufferActivate(d=>this._handleBufferActivate(d))),this.enable(),this._model=new $J(this._bufferService),this._activeSelectionMode=0,this._register(Kn(()=>{this._removeMouseDownListeners()})),this._register(this._bufferService.onResize(d=>{d.rowsChanged&&this.clearSelection()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!e||!t?!1:e[0]!==t[0]||e[1]!==t[1]}get selectionText(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return"";let n=this._bufferService.buffer,r=[];if(this._activeSelectionMode===3){if(e[0]===t[0])return"";let i=e[0]<t[0]?e[0]:t[0],o=e[0]<t[0]?t[0]:e[0];for(let a=e[1];a<=t[1];a++){let c=n.translateBufferLineToString(a,!0,i,o);r.push(c)}}else{let i=e[1]===t[1]?t[0]:void 0;r.push(n.translateBufferLineToString(e[1],!0,e[0],i));for(let o=e[1]+1;o<=t[1]-1;o++){let a=n.lines.get(o),c=n.translateBufferLineToString(o,!0);a!=null&&a.isWrapped?r[r.length-1]+=c:r.push(c)}if(e[1]!==t[1]){let o=n.lines.get(t[1]),a=n.translateBufferLineToString(t[1],!0,0,t[0]);o&&o.isWrapped?r[r.length-1]+=a:r.push(a)}}return r.map(i=>i.replace(IJ," ")).join(T4?`\r
597
+ `:`
598
+ `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),jb&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(e){let t=this._getMouseBufferCoords(e),n=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!n||!r||!t?!1:this._areCoordsInSelection(t,n,r)}isCellInSelection(e,t){let n=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!n||!r?!1:this._areCoordsInSelection([e,t],n,r)}_areCoordsInSelection(e,t,n){return e[1]>t[1]&&e[1]<n[1]||t[1]===n[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<n[0]||t[1]<n[1]&&e[1]===n[1]&&e[0]<n[0]||t[1]<n[1]&&e[1]===t[1]&&e[0]>=t[0]}_selectWordAtCursor(e,t){var i,o;let n=(o=(i=this._linkifier.currentLink)==null?void 0:i.link)==null?void 0:o.range;if(n)return this._model.selectionStart=[n.start.x-1,n.start.y-1],this._model.selectionStartLength=Hx(n,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let r=this._getMouseBufferCoords(e);return r?(this._selectWordAt(r,t),this._model.selectionEnd=void 0,!0):!1}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){let t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=zb(this._coreBrowserService.window,e,this._screenElement)[1],n=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=n?0:(t>n&&(t-=n),t=Math.min(Math.max(t,-rv),rv),t/=rv,t/Math.abs(t)+Math.round(t*(RJ-1)))}shouldForceSelection(e){return Pf?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,!(e.button===2&&this.hasSelection)&&e.button===0){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):e.detail===1?this._handleSingleClick(e):e.detail===2?this._handleDoubleClick(e):e.detail===3&&this._handleTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),TJ)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&t.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){let t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!(Pf&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;let t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd){this.refresh(!0);return}this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let n=this._bufferService.buffer;if(this._model.selectionEnd[1]<n.lines.length){let r=n.lines.get(this._model.selectionEnd[1]);r&&r.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}(!t||t[0]!==this._model.selectionEnd[0]||t[1]!==this._model.selectionEnd[1])&&this.refresh(!0)}_dragScroll(){if(!(!this._model.selectionEnd||!this._model.selectionStart)&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});let e=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}}_handleMouseUp(e){let t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&t<PJ&&e.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let n=this._mouseService.getCoords(e,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(n&&n[0]!==void 0&&n[1]!==void 0){let r=_J(n[0]-1,n[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(r,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd,n=!!e&&!!t&&(e[0]!==t[0]||e[1]!==t[1]);if(!n){this._oldHasSelection&&this._fireOnSelectionChange(e,t,n);return}!e||!t||(!this._oldSelectionStart||!this._oldSelectionEnd||e[0]!==this._oldSelectionStart[0]||e[1]!==this._oldSelectionStart[1]||t[0]!==this._oldSelectionEnd[0]||t[1]!==this._oldSelectionEnd[1])&&this._fireOnSelectionChange(e,t,n)}_fireOnSelectionChange(e,t,n){this._oldSelectionStart=e,this._oldSelectionEnd=t,this._oldHasSelection=n,this._onSelectionChange.fire()}_handleBufferActivate(e){this.clearSelection(),this._trimListener.dispose(),this._trimListener=e.activeBuffer.lines.onTrim(t=>this._handleTrim(t))}_convertViewportColToCharacterIndex(e,t){let n=t;for(let r=0;t>=r;r++){let i=e.loadCell(r,this._workCell).getChars().length;this._workCell.getWidth()===0?n--:i>1&&t!==r&&(n+=i-1)}return n}setSelection(e,t,n){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=n,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(e,t,n=!0,r=!0){if(e[0]>=this._bufferService.cols)return;let i=this._bufferService.buffer,o=i.lines.get(e[1]);if(!o)return;let a=i.translateBufferLineToString(e[1],!1),c=this._convertViewportColToCharacterIndex(o,e[0]),u=c,d=e[0]-c,f=0,m=0,g=0,v=0;if(a.charAt(c)===" "){for(;c>0&&a.charAt(c-1)===" ";)c--;for(;u<a.length&&a.charAt(u+1)===" ";)u++}else{let _=e[0],C=e[0];o.getWidth(_)===0&&(f++,_--),o.getWidth(C)===2&&(m++,C++);let E=o.getString(C).length;for(E>1&&(v+=E-1,u+=E-1);_>0&&c>0&&!this._isCharWordSeparator(o.loadCell(_-1,this._workCell));){o.loadCell(_-1,this._workCell);let k=this._workCell.getChars().length;this._workCell.getWidth()===0?(f++,_--):k>1&&(g+=k-1,c-=k-1),c--,_--}for(;C<o.length&&u+1<a.length&&!this._isCharWordSeparator(o.loadCell(C+1,this._workCell));){o.loadCell(C+1,this._workCell);let k=this._workCell.getChars().length;this._workCell.getWidth()===2?(m++,C++):k>1&&(v+=k-1,u+=k-1),u++,C++}}u++;let y=c+d-f+g,S=Math.min(this._bufferService.cols,u-c+f+m-g-v);if(!(!t&&a.slice(c,u).trim()==="")){if(n&&y===0&&o.getCodePoint(0)!==32){let _=i.lines.get(e[1]-1);if(_&&o.isWrapped&&_.getCodePoint(this._bufferService.cols-1)!==32){let C=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(C){let E=this._bufferService.cols-C.start;y-=E,S+=E}}}if(r&&y+S===this._bufferService.cols&&o.getCodePoint(this._bufferService.cols-1)!==32){let _=i.lines.get(e[1]+1);if(_!=null&&_.isWrapped&&_.getCodePoint(0)!==32){let C=this._getWordAt([0,e[1]+1],!1,!1,!0);C&&(S+=C.length)}}return{start:y,length:S}}}_selectWordAt(e,t){let n=this._getWordAt(e,t);if(n){for(;n.start<0;)n.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[n.start,e[1]],this._model.selectionStartLength=n.length}}_selectToWordAt(e){let t=this._getWordAt(e,!0);if(t){let n=e[1];for(;t.start<0;)t.start+=this._bufferService.cols,n--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,n++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,n]}}_isCharWordSeparator(e){return e.getWidth()===0?!1:this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0}_selectLineAt(e){let t=this._bufferService.buffer.getWrappedRangeForLine(e),n={start:{x:0,y:t.first},end:{x:this._bufferService.cols-1,y:t.last}};this._model.selectionStart=[0,t.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=Hx(n,this._bufferService.cols)}};ey=or([ct(3,vi),ct(4,Va),ct(5,Rb),ct(6,yi),ct(7,_s),ct(8,bs)],ey);var Fx=class{constructor(){this._data={}}set(e,t,n){this._data[e]||(this._data[e]={}),this._data[e][t]=n}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},Wx=class{constructor(){this._color=new Fx,this._css=new Fx}setCss(e,t,n){this._css.set(e,t,n)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,n){this._color.set(e,t,n)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}},Er=Object.freeze((()=>{let e=[Zn.toColor("#2e3436"),Zn.toColor("#cc0000"),Zn.toColor("#4e9a06"),Zn.toColor("#c4a000"),Zn.toColor("#3465a4"),Zn.toColor("#75507b"),Zn.toColor("#06989a"),Zn.toColor("#d3d7cf"),Zn.toColor("#555753"),Zn.toColor("#ef2929"),Zn.toColor("#8ae234"),Zn.toColor("#fce94f"),Zn.toColor("#729fcf"),Zn.toColor("#ad7fa8"),Zn.toColor("#34e2e2"),Zn.toColor("#eeeeec")],t=[0,95,135,175,215,255];for(let n=0;n<216;n++){let r=t[n/36%6|0],i=t[n/6%6|0],o=t[n%6];e.push({css:vr.toCss(r,i,o),rgba:vr.toRgba(r,i,o)})}for(let n=0;n<24;n++){let r=8+n*10;e.push({css:vr.toCss(r,r,r),rgba:vr.toRgba(r,r,r)})}return e})()),ba=Zn.toColor("#ffffff"),su=Zn.toColor("#000000"),Vx=Zn.toColor("#ffffff"),Ux=su,Xc={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117},NJ=ba,ty=class extends en{constructor(e){super(),this._optionsService=e,this._contrastCache=new Wx,this._halfContrastCache=new Wx,this._onChangeColors=this._register(new Ue),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:ba,background:su,cursor:Vx,cursorAccent:Ux,selectionForeground:void 0,selectionBackgroundTransparent:Xc,selectionBackgroundOpaque:Vn.blend(su,Xc),selectionInactiveBackgroundTransparent:Xc,selectionInactiveBackgroundOpaque:Vn.blend(su,Xc),scrollbarSliderBackground:Vn.opacity(ba,.2),scrollbarSliderHoverBackground:Vn.opacity(ba,.4),scrollbarSliderActiveBackground:Vn.opacity(ba,.5),overviewRulerBorder:ba,ansi:Er.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this._register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this._register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}get colors(){return this._colors}_setTheme(e={}){let t=this._colors;if(t.foreground=zn(e.foreground,ba),t.background=zn(e.background,su),t.cursor=Vn.blend(t.background,zn(e.cursor,Vx)),t.cursorAccent=Vn.blend(t.background,zn(e.cursorAccent,Ux)),t.selectionBackgroundTransparent=zn(e.selectionBackground,Xc),t.selectionBackgroundOpaque=Vn.blend(t.background,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundTransparent=zn(e.selectionInactiveBackground,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundOpaque=Vn.blend(t.background,t.selectionInactiveBackgroundTransparent),t.selectionForeground=e.selectionForeground?zn(e.selectionForeground,Lx):void 0,t.selectionForeground===Lx&&(t.selectionForeground=void 0),Vn.isOpaque(t.selectionBackgroundTransparent)&&(t.selectionBackgroundTransparent=Vn.opacity(t.selectionBackgroundTransparent,.3)),Vn.isOpaque(t.selectionInactiveBackgroundTransparent)&&(t.selectionInactiveBackgroundTransparent=Vn.opacity(t.selectionInactiveBackgroundTransparent,.3)),t.scrollbarSliderBackground=zn(e.scrollbarSliderBackground,Vn.opacity(t.foreground,.2)),t.scrollbarSliderHoverBackground=zn(e.scrollbarSliderHoverBackground,Vn.opacity(t.foreground,.4)),t.scrollbarSliderActiveBackground=zn(e.scrollbarSliderActiveBackground,Vn.opacity(t.foreground,.5)),t.overviewRulerBorder=zn(e.overviewRulerBorder,NJ),t.ansi=Er.slice(),t.ansi[0]=zn(e.black,Er[0]),t.ansi[1]=zn(e.red,Er[1]),t.ansi[2]=zn(e.green,Er[2]),t.ansi[3]=zn(e.yellow,Er[3]),t.ansi[4]=zn(e.blue,Er[4]),t.ansi[5]=zn(e.magenta,Er[5]),t.ansi[6]=zn(e.cyan,Er[6]),t.ansi[7]=zn(e.white,Er[7]),t.ansi[8]=zn(e.brightBlack,Er[8]),t.ansi[9]=zn(e.brightRed,Er[9]),t.ansi[10]=zn(e.brightGreen,Er[10]),t.ansi[11]=zn(e.brightYellow,Er[11]),t.ansi[12]=zn(e.brightBlue,Er[12]),t.ansi[13]=zn(e.brightMagenta,Er[13]),t.ansi[14]=zn(e.brightCyan,Er[14]),t.ansi[15]=zn(e.brightWhite,Er[15]),e.extendedAnsi){let n=Math.min(t.ansi.length-16,e.extendedAnsi.length);for(let r=0;r<n;r++)t.ansi[r+16]=zn(e.extendedAnsi[r],Er[r+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(e){this._restoreColor(e),this._onChangeColors.fire(this.colors)}_restoreColor(e){if(e===void 0){for(let t=0;t<this._restoreColors.ansi.length;++t)this._colors.ansi[t]=this._restoreColors.ansi[t];return}switch(e){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[e]=this._restoreColors.ansi[e]}}modifyColors(e){e(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};ty=or([ct(0,yi)],ty);function zn(e,t){if(e!==void 0)try{return Zn.toColor(e)}catch{}return t}var MJ=class{constructor(...e){this._entries=new Map;for(let[t,n]of e)this.set(t,n)}set(e,t){let n=this._entries.get(e);return this._entries.set(e,t),n}forEach(e){for(let[t,n]of this._entries.entries())e(t,n)}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}},zJ=class{constructor(){this._services=new MJ,this._services.set($b,this)}setService(e,t){this._services.set(e,t)}getService(e){return this._services.get(e)}createInstance(e,...t){let n=RX(e).sort((o,a)=>o.index-a.index),r=[];for(let o of n){let a=this._services.get(o.id);if(!a)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${o.id._id}.`);r.push(a)}let i=n.length>0?n[0].index:t.length;if(t.length!==i)throw new Error(`[createInstance] First service dependency of ${e.name} at position ${i+1} conflicts with ${t.length} static arguments`);return new e(...t,...r)}},jJ={trace:0,debug:1,info:2,warn:3,error:4,off:5},BJ="xterm.js: ",ny=class extends en{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel()))}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=jJ[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]=="function"&&(e[t]=e[t]())}_log(e,t,n){this._evalLazyOptionalParams(n),e.call(console,(this._optionsService.options.logger?"":BJ)+t,...n)}trace(e,...t){var n;this._logLevel<=0&&this._log(((n=this._optionsService.options.logger)==null?void 0:n.trace.bind(this._optionsService.options.logger))??console.log,e,t)}debug(e,...t){var n;this._logLevel<=1&&this._log(((n=this._optionsService.options.logger)==null?void 0:n.debug.bind(this._optionsService.options.logger))??console.log,e,t)}info(e,...t){var n;this._logLevel<=2&&this._log(((n=this._optionsService.options.logger)==null?void 0:n.info.bind(this._optionsService.options.logger))??console.info,e,t)}warn(e,...t){var n;this._logLevel<=3&&this._log(((n=this._optionsService.options.logger)==null?void 0:n.warn.bind(this._optionsService.options.logger))??console.warn,e,t)}error(e,...t){var n;this._logLevel<=4&&this._log(((n=this._optionsService.options.logger)==null?void 0:n.error.bind(this._optionsService.options.logger))??console.error,e,t)}};ny=or([ct(0,yi)],ny);var qx=class extends en{constructor(e){super(),this._maxLength=e,this.onDeleteEmitter=this._register(new Ue),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this._register(new Ue),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this._register(new Ue),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(e){if(this._maxLength===e)return;let t=new Array(e);for(let n=0;n<Math.min(e,this.length);n++)t[n]=this._array[this._getCyclicIndex(n)];this._array=t,this._maxLength=e,this._startIndex=0}get length(){return this._length}set length(e){if(e>this._length)for(let t=this._length;t<e;t++)this._array[t]=void 0;this._length=e}get(e){return this._array[this._getCyclicIndex(e)]}set(e,t){this._array[this._getCyclicIndex(e)]=t}push(e){this._array[this._getCyclicIndex(this._length)]=e,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(e,t,...n){if(t){for(let r=e;r<this._length-t;r++)this._array[this._getCyclicIndex(r)]=this._array[this._getCyclicIndex(r+t)];this._length-=t,this.onDeleteEmitter.fire({index:e,amount:t})}for(let r=this._length-1;r>=e;r--)this._array[this._getCyclicIndex(r+n.length)]=this._array[this._getCyclicIndex(r)];for(let r=0;r<n.length;r++)this._array[this._getCyclicIndex(e+r)]=n[r];if(n.length&&this.onInsertEmitter.fire({index:e,amount:n.length}),this._length+n.length>this._maxLength){let r=this._length+n.length-this._maxLength;this._startIndex+=r,this._length=this._maxLength,this.onTrimEmitter.fire(r)}else this._length+=n.length}trimStart(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)}shiftElements(e,t,n){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+n<0)throw new Error("Cannot shift elements in list beyond index 0");if(n>0){for(let i=t-1;i>=0;i--)this.set(e+i+n,this.get(e+i));let r=e+t+n-this._length;if(r>0)for(this._length+=r;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let r=0;r<t;r++)this.set(e+r+n,this.get(e+r))}}_getCyclicIndex(e){return(this._startIndex+e)%this._maxLength}},Qt=3,pr=Object.freeze(new ed),xh=0,iv=2,au=class M4{constructor(t,n,r=!1){this.isWrapped=r,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(t*Qt);let i=n||uo.fromCharData([0,Z3,1,0]);for(let o=0;o<t;++o)this.setCell(o,i);this.length=t}get(t){let n=this._data[t*Qt+0],r=n&2097151;return[this._data[t*Qt+1],n&2097152?this._combined[t]:r?Vs(r):"",n>>22,n&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):r]}set(t,n){this._data[t*Qt+1]=n[0],n[1].length>1?(this._combined[t]=n[1],this._data[t*Qt+0]=t|2097152|n[2]<<22):this._data[t*Qt+0]=n[1].charCodeAt(0)|n[2]<<22}getWidth(t){return this._data[t*Qt+0]>>22}hasWidth(t){return this._data[t*Qt+0]&12582912}getFg(t){return this._data[t*Qt+1]}getBg(t){return this._data[t*Qt+2]}hasContent(t){return this._data[t*Qt+0]&4194303}getCodePoint(t){let n=this._data[t*Qt+0];return n&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):n&2097151}isCombined(t){return this._data[t*Qt+0]&2097152}getString(t){let n=this._data[t*Qt+0];return n&2097152?this._combined[t]:n&2097151?Vs(n&2097151):""}isProtected(t){return this._data[t*Qt+2]&536870912}loadCell(t,n){return xh=t*Qt,n.content=this._data[xh+0],n.fg=this._data[xh+1],n.bg=this._data[xh+2],n.content&2097152&&(n.combinedData=this._combined[t]),n.bg&268435456&&(n.extended=this._extendedAttrs[t]),n}setCell(t,n){n.content&2097152&&(this._combined[t]=n.combinedData),n.bg&268435456&&(this._extendedAttrs[t]=n.extended),this._data[t*Qt+0]=n.content,this._data[t*Qt+1]=n.fg,this._data[t*Qt+2]=n.bg}setCellFromCodepoint(t,n,r,i){i.bg&268435456&&(this._extendedAttrs[t]=i.extended),this._data[t*Qt+0]=n|r<<22,this._data[t*Qt+1]=i.fg,this._data[t*Qt+2]=i.bg}addCodepointToCell(t,n,r){let i=this._data[t*Qt+0];i&2097152?this._combined[t]+=Vs(n):i&2097151?(this._combined[t]=Vs(i&2097151)+Vs(n),i&=-2097152,i|=2097152):i=n|1<<22,r&&(i&=-12582913,i|=r<<22),this._data[t*Qt+0]=i}insertCells(t,n,r){if(t%=this.length,t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,r),n<this.length-t){let i=new uo;for(let o=this.length-t-n-1;o>=0;--o)this.setCell(t+n+o,this.loadCell(t+o,i));for(let o=0;o<n;++o)this.setCell(t+o,r)}else for(let i=t;i<this.length;++i)this.setCell(i,r);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,r)}deleteCells(t,n,r){if(t%=this.length,n<this.length-t){let i=new uo;for(let o=0;o<this.length-t-n;++o)this.setCell(t+o,this.loadCell(t+n+o,i));for(let o=this.length-n;o<this.length;++o)this.setCell(o,r)}else for(let i=t;i<this.length;++i)this.setCell(i,r);t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,r),this.getWidth(t)===0&&!this.hasContent(t)&&this.setCellFromCodepoint(t,0,1,r)}replaceCells(t,n,r,i=!1){if(i){for(t&&this.getWidth(t-1)===2&&!this.isProtected(t-1)&&this.setCellFromCodepoint(t-1,0,1,r),n<this.length&&this.getWidth(n-1)===2&&!this.isProtected(n)&&this.setCellFromCodepoint(n,0,1,r);t<n&&t<this.length;)this.isProtected(t)||this.setCell(t,r),t++;return}for(t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,r),n<this.length&&this.getWidth(n-1)===2&&this.setCellFromCodepoint(n,0,1,r);t<n&&t<this.length;)this.setCell(t++,r)}resize(t,n){if(t===this.length)return this._data.length*4*iv<this._data.buffer.byteLength;let r=t*Qt;if(t>this.length){if(this._data.buffer.byteLength>=r*4)this._data=new Uint32Array(this._data.buffer,0,r);else{let i=new Uint32Array(r);i.set(this._data),this._data=i}for(let i=this.length;i<t;++i)this.setCell(i,n)}else{this._data=this._data.subarray(0,r);let i=Object.keys(this._combined);for(let a=0;a<i.length;a++){let c=parseInt(i[a],10);c>=t&&delete this._combined[c]}let o=Object.keys(this._extendedAttrs);for(let a=0;a<o.length;a++){let c=parseInt(o[a],10);c>=t&&delete this._extendedAttrs[c]}}return this.length=t,r*4*iv<this._data.buffer.byteLength}cleanupMemory(){if(this._data.length*4*iv<this._data.buffer.byteLength){let t=new Uint32Array(this._data.length);return t.set(this._data),this._data=t,1}return 0}fill(t,n=!1){if(n){for(let r=0;r<this.length;++r)this.isProtected(r)||this.setCell(r,t);return}this._combined={},this._extendedAttrs={};for(let r=0;r<this.length;++r)this.setCell(r,t)}copyFrom(t){this.length!==t.length?this._data=new Uint32Array(t._data):this._data.set(t._data),this.length=t.length,this._combined={};for(let n in t._combined)this._combined[n]=t._combined[n];this._extendedAttrs={};for(let n in t._extendedAttrs)this._extendedAttrs[n]=t._extendedAttrs[n];this.isWrapped=t.isWrapped}clone(){let t=new M4(0);t._data=new Uint32Array(this._data),t.length=this.length;for(let n in this._combined)t._combined[n]=this._combined[n];for(let n in this._extendedAttrs)t._extendedAttrs[n]=this._extendedAttrs[n];return t.isWrapped=this.isWrapped,t}getTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*Qt+0]&4194303)return t+(this._data[t*Qt+0]>>22);return 0}getNoBgTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*Qt+0]&4194303||this._data[t*Qt+2]&50331648)return t+(this._data[t*Qt+0]>>22);return 0}copyCellsFrom(t,n,r,i,o){let a=t._data;if(o)for(let u=i-1;u>=0;u--){for(let d=0;d<Qt;d++)this._data[(r+u)*Qt+d]=a[(n+u)*Qt+d];a[(n+u)*Qt+2]&268435456&&(this._extendedAttrs[r+u]=t._extendedAttrs[n+u])}else for(let u=0;u<i;u++){for(let d=0;d<Qt;d++)this._data[(r+u)*Qt+d]=a[(n+u)*Qt+d];a[(n+u)*Qt+2]&268435456&&(this._extendedAttrs[r+u]=t._extendedAttrs[n+u])}let c=Object.keys(t._combined);for(let u=0;u<c.length;u++){let d=parseInt(c[u],10);d>=n&&(this._combined[d-n+r]=t._combined[d])}}translateToString(t,n,r,i){n=n??0,r=r??this.length,t&&(r=Math.min(r,this.getTrimmedLength())),i&&(i.length=0);let o="";for(;n<r;){let a=this._data[n*Qt+0],c=a&2097151,u=a&2097152?this._combined[n]:c?Vs(c):Gs;if(o+=u,i)for(let d=0;d<u.length;++d)i.push(n);n+=a>>22||1}return i&&i.push(n),o}};function LJ(e,t,n,r,i,o){let a=[];for(let c=0;c<e.length-1;c++){let u=c,d=e.get(++u);if(!d.isWrapped)continue;let f=[e.get(c)];for(;u<e.length&&d.isWrapped;)f.push(d),d=e.get(++u);if(!o&&r>=c&&r<u){c+=f.length-1;continue}let m=0,g=zu(f,m,t),v=1,y=0;for(;v<f.length;){let _=zu(f,v,t),C=_-y,E=n-g,k=Math.min(C,E);f[m].copyCellsFrom(f[v],y,g,k,!1),g+=k,g===n&&(m++,g=0),y+=k,y===_&&(v++,y=0),g===0&&m!==0&&f[m-1].getWidth(n-1)===2&&(f[m].copyCellsFrom(f[m-1],n-1,g++,1,!1),f[m-1].setCell(n-1,i))}f[m].replaceCells(g,n,i);let S=0;for(let _=f.length-1;_>0&&(_>m||f[_].getTrimmedLength()===0);_--)S++;S>0&&(a.push(c+f.length-S),a.push(S)),c+=f.length-1}return a}function AJ(e,t){let n=[],r=0,i=t[r],o=0;for(let a=0;a<e.length;a++)if(i===a){let c=t[++r];e.onDeleteEmitter.fire({index:a-o,amount:c}),a+=c-1,o+=c,i=t[++r]}else n.push(a);return{layout:n,countRemoved:o}}function DJ(e,t){let n=[];for(let r=0;r<t.length;r++)n.push(e.get(t[r]));for(let r=0;r<n.length;r++)e.set(r,n[r]);e.length=t.length}function HJ(e,t,n){let r=[],i=e.map((u,d)=>zu(e,d,t)).reduce((u,d)=>u+d),o=0,a=0,c=0;for(;c<i;){if(i-c<n){r.push(i-c);break}o+=n;let u=zu(e,a,t);o>u&&(o-=u,a++);let d=e[a].getWidth(o-1)===2;d&&o--;let f=d?n-1:n;r.push(f),c+=f}return r}function zu(e,t,n){if(t===e.length-1)return e[t].getTrimmedLength();let r=!e[t].hasContent(n-1)&&e[t].getWidth(n-1)===1,i=e[t+1].getWidth(0)===2;return r&&i?n-1:n}var z4=class j4{constructor(t){this.line=t,this.isDisposed=!1,this._disposables=[],this._id=j4._nextId++,this._onDispose=this.register(new Ue),this.onDispose=this._onDispose.event}get id(){return this._id}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),Ba(this._disposables),this._disposables.length=0)}register(t){return this._disposables.push(t),t}};z4._nextId=1;var FJ=z4,Rr={},_a=Rr.B;Rr[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"};Rr.A={"#":"£"};Rr.B=void 0;Rr[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"};Rr.C=Rr[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"};Rr.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"};Rr.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"};Rr.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"};Rr.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"};Rr.E=Rr[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"};Rr.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"};Rr.H=Rr[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"};Rr["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"};var Kx=4294967295,Gx=class{constructor(e,t,n){this._hasScrollback=e,this._optionsService=t,this._bufferService=n,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=pr.clone(),this.savedCharset=_a,this.markers=[],this._nullCell=uo.fromCharData([0,Z3,1,0]),this._whitespaceCell=uo.fromCharData([0,Gs,1,32]),this._isClearing=!1,this._memoryCleanupQueue=new Of,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new qx(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new $f),this._nullCell}getWhitespaceCell(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new $f),this._whitespaceCell}getBlankLine(e,t){return new au(this._bufferService.cols,this.getNullCell(e),t)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows}_getCorrectBufferLength(e){if(!this._hasScrollback)return e;let t=e+this._optionsService.rawOptions.scrollback;return t>Kx?Kx:t}fillViewportRows(e){if(this.lines.length===0){e===void 0&&(e=pr);let t=this._rows;for(;t--;)this.lines.push(this.getBlankLine(e))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new qx(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,t){let n=this.getNullCell(pr),r=0,i=this._getCorrectBufferLength(t);if(i>this.lines.maxLength&&(this.lines.maxLength=i),this.lines.length>0){if(this._cols<e)for(let a=0;a<this.lines.length;a++)r+=+this.lines.get(a).resize(e,n);let o=0;if(this._rows<t)for(let a=this._rows;a<t;a++)this.lines.length<t+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new au(e,n)):this.ybase>0&&this.lines.length<=this.ybase+this.y+o+1?(this.ybase--,o++,this.ydisp>0&&this.ydisp--):this.lines.push(new au(e,n)));else for(let a=this._rows;a>t;a--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(i<this.lines.maxLength){let a=this.lines.length-i;a>0&&(this.lines.trimStart(a),this.ybase=Math.max(this.ybase-a,0),this.ydisp=Math.max(this.ydisp-a,0),this.savedY=Math.max(this.savedY-a,0)),this.lines.maxLength=i}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),o&&(this.y+=o),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(let o=0;o<this.lines.length;o++)r+=+this.lines.get(o).resize(e,n);this._cols=e,this._rows=t,this._memoryCleanupQueue.clear(),r>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let e=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,e=!1);let t=0;for(;this._memoryCleanupPosition<this.lines.length;)if(t+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),t>100)return!0;return e}get _isReflowEnabled(){let e=this._optionsService.rawOptions.windowsPty;return e&&e.buildNumber?this._hasScrollback&&e.backend==="conpty"&&e.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))}_reflowLarger(e,t){let n=this._optionsService.rawOptions.reflowCursorLine,r=LJ(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(pr),n);if(r.length>0){let i=AJ(this.lines,r);DJ(this.lines,i.layout),this._reflowLargerAdjustViewport(e,t,i.countRemoved)}}_reflowLargerAdjustViewport(e,t,n){let r=this.getNullCell(pr),i=n;for(;i-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<t&&this.lines.push(new au(e,r))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-n,0)}_reflowSmaller(e,t){let n=this._optionsService.rawOptions.reflowCursorLine,r=this.getNullCell(pr),i=[],o=0;for(let a=this.lines.length-1;a>=0;a--){let c=this.lines.get(a);if(!c||!c.isWrapped&&c.getTrimmedLength()<=e)continue;let u=[c];for(;c.isWrapped&&a>0;)c=this.lines.get(--a),u.unshift(c);if(!n){let k=this.ybase+this.y;if(k>=a&&k<a+u.length)continue}let d=u[u.length-1].getTrimmedLength(),f=HJ(u,this._cols,e),m=f.length-u.length,g;this.ybase===0&&this.y!==this.lines.length-1?g=Math.max(0,this.y-this.lines.maxLength+m):g=Math.max(0,this.lines.length-this.lines.maxLength+m);let v=[];for(let k=0;k<m;k++){let $=this.getBlankLine(pr,!0);v.push($)}v.length>0&&(i.push({start:a+u.length+o,newLines:v}),o+=v.length),u.push(...v);let y=f.length-1,S=f[y];S===0&&(y--,S=f[y]);let _=u.length-m-1,C=d;for(;_>=0;){let k=Math.min(C,S);if(u[y]===void 0)break;if(u[y].copyCellsFrom(u[_],C-k,S-k,k,!0),S-=k,S===0&&(y--,S=f[y]),C-=k,C===0){_--;let $=Math.max(_,0);C=zu(u,$,this._cols)}}for(let k=0;k<u.length;k++)f[k]<e&&u[k].setCell(f[k],r);let E=m-g;for(;E-- >0;)this.ybase===0?this.y<t-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+o)-t&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+m,this.ybase+t-1)}if(i.length>0){let a=[],c=[];for(let S=0;S<this.lines.length;S++)c.push(this.lines.get(S));let u=this.lines.length,d=u-1,f=0,m=i[f];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+o);let g=0;for(let S=Math.min(this.lines.maxLength-1,u+o-1);S>=0;S--)if(m&&m.start>d+g){for(let _=m.newLines.length-1;_>=0;_--)this.lines.set(S--,m.newLines[_]);S++,a.push({index:d+1,amount:m.newLines.length}),g+=m.newLines.length,m=i[++f]}else this.lines.set(S,c[d--]);let v=0;for(let S=a.length-1;S>=0;S--)a[S].index+=v,this.lines.onInsertEmitter.fire(a[S]),v+=a[S].amount;let y=Math.max(0,u+o-this.lines.maxLength);y>0&&this.lines.onTrimEmitter.fire(y)}}translateBufferLineToString(e,t,n=0,r){let i=this.lines.get(e);return i?i.translateToString(t,n,r):""}getWrappedRangeForLine(e){let t=e,n=e;for(;t>0&&this.lines.get(t).isWrapped;)t--;for(;n+1<this.lines.length&&this.lines.get(n+1).isWrapped;)n++;return{first:t,last:n}}setupTabStops(e){for(e!=null?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.rawOptions.tabStopWidth)this.tabs[e]=!0}prevStop(e){for(e==null&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e}nextStop(e){for(e==null&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e}clearMarkers(e){this._isClearing=!0;for(let t=0;t<this.markers.length;t++)this.markers[t].line===e&&(this.markers[t].dispose(),this.markers.splice(t--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let e=0;e<this.markers.length;e++)this.markers[e].dispose();this.markers.length=0,this._isClearing=!1}addMarker(e){let t=new FJ(e);return this.markers.push(t),t.register(this.lines.onTrim(n=>{t.line-=n,t.line<0&&t.dispose()})),t.register(this.lines.onInsert(n=>{t.line>=n.index&&(t.line+=n.amount)})),t.register(this.lines.onDelete(n=>{t.line>=n.index&&t.line<n.index+n.amount&&t.dispose(),t.line>n.index&&(t.line-=n.amount)})),t.register(t.onDispose(()=>this._removeMarker(t))),t}_removeMarker(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)}},WJ=class extends en{constructor(e,t){super(),this._optionsService=e,this._bufferService=t,this._onBufferActivate=this._register(new Ue),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this._register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this._register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new Gx(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new Gx(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(e,t){this._normal.resize(e,t),this._alt.resize(e,t),this.setupTabStops(e)}setupTabStops(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)}},B4=2,L4=1,ry=class extends en{constructor(e){super(),this.isUserScrolling=!1,this._onResize=this._register(new Ue),this.onResize=this._onResize.event,this._onScroll=this._register(new Ue),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,B4),this.rows=Math.max(e.rawOptions.rows||0,L4),this.buffers=this._register(new WJ(e,this)),this._register(this.buffers.onBufferActivate(t=>{this._onScroll.fire(t.activeBuffer.ydisp)}))}get buffer(){return this.buffers.active}resize(e,t){let n=this.cols!==e,r=this.rows!==t;this.cols=e,this.rows=t,this.buffers.resize(e,t),this._onResize.fire({cols:e,rows:t,colsChanged:n,rowsChanged:r})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,t=!1){let n=this.buffer,r;r=this._cachedBlankLine,(!r||r.length!==this.cols||r.getFg(0)!==e.fg||r.getBg(0)!==e.bg)&&(r=n.getBlankLine(e,t),this._cachedBlankLine=r),r.isWrapped=t;let i=n.ybase+n.scrollTop,o=n.ybase+n.scrollBottom;if(n.scrollTop===0){let a=n.lines.isFull;o===n.lines.length-1?a?n.lines.recycle().copyFrom(r):n.lines.push(r.clone()):n.lines.splice(o+1,0,r.clone()),a?this.isUserScrolling&&(n.ydisp=Math.max(n.ydisp-1,0)):(n.ybase++,this.isUserScrolling||n.ydisp++)}else{let a=o-i+1;n.lines.shiftElements(i+1,a-1,-1),n.lines.set(o,r.clone())}this.isUserScrolling||(n.ydisp=n.ybase),this._onScroll.fire(n.ydisp)}scrollLines(e,t){let n=this.buffer;if(e<0){if(n.ydisp===0)return;this.isUserScrolling=!0}else e+n.ydisp>=n.ybase&&(this.isUserScrolling=!1);let r=n.ydisp;n.ydisp=Math.max(Math.min(n.ydisp+e,n.ybase),0),r!==n.ydisp&&(t||this._onScroll.fire(n.ydisp))}};ry=or([ct(0,yi)],ry);var Il={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnEraseInDisplay:!1,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},reflowCursorLine:!1,rescaleOverlappingGlyphs:!1,rightClickSelectsWord:Pf,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRuler:{}},VJ=["normal","bold","100","200","300","400","500","600","700","800","900"],UJ=class extends en{constructor(e){super(),this._onOptionChange=this._register(new Ue),this.onOptionChange=this._onOptionChange.event;let t={...Il};for(let n in e)if(n in t)try{let r=e[n];t[n]=this._sanitizeAndValidateOption(n,r)}catch(r){console.error(r)}this.rawOptions=t,this.options={...t},this._setupOptions(),this._register(Kn(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(e,t){return this.onOptionChange(n=>{n===e&&t(this.rawOptions[e])})}onMultipleOptionChange(e,t){return this.onOptionChange(n=>{e.indexOf(n)!==-1&&t()})}_setupOptions(){let e=n=>{if(!(n in Il))throw new Error(`No option with key "${n}"`);return this.rawOptions[n]},t=(n,r)=>{if(!(n in Il))throw new Error(`No option with key "${n}"`);r=this._sanitizeAndValidateOption(n,r),this.rawOptions[n]!==r&&(this.rawOptions[n]=r,this._onOptionChange.fire(n))};for(let n in this.rawOptions){let r={get:e.bind(this,n),set:t.bind(this,n)};Object.defineProperty(this.options,n,r)}}_sanitizeAndValidateOption(e,t){switch(e){case"cursorStyle":if(t||(t=Il[e]),!qJ(t))throw new Error(`"${t}" is not a valid value for ${e}`);break;case"wordSeparator":t||(t=Il[e]);break;case"fontWeight":case"fontWeightBold":if(typeof t=="number"&&1<=t&&t<=1e3)break;t=VJ.includes(t)?t:Il[e];break;case"cursorWidth":t=Math.floor(t);case"lineHeight":case"tabStopWidth":if(t<1)throw new Error(`${e} cannot be less than 1, value: ${t}`);break;case"minimumContrastRatio":t=Math.max(1,Math.min(21,Math.round(t*10)/10));break;case"scrollback":if(t=Math.min(t,4294967295),t<0)throw new Error(`${e} cannot be less than 0, value: ${t}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(t<=0)throw new Error(`${e} cannot be less than or equal to 0, value: ${t}`);break;case"rows":case"cols":if(!t&&t!==0)throw new Error(`${e} must be numeric, value: ${t}`);break;case"windowsPty":t=t??{};break}return t}};function qJ(e){return e==="block"||e==="underline"||e==="bar"}function lu(e,t=5){if(typeof e!="object")return e;let n=Array.isArray(e)?[]:{};for(let r in e)n[r]=t<=1?e[r]:e[r]&&lu(e[r],t-1);return n}var Xx=Object.freeze({insertMode:!1}),Yx=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,cursorBlink:void 0,cursorStyle:void 0,origin:!1,reverseWraparound:!1,sendFocus:!1,synchronizedOutput:!1,wraparound:!0}),iy=class extends en{constructor(e,t,n){super(),this._bufferService=e,this._logService=t,this._optionsService=n,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this._register(new Ue),this.onData=this._onData.event,this._onUserInput=this._register(new Ue),this.onUserInput=this._onUserInput.event,this._onBinary=this._register(new Ue),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this._register(new Ue),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=lu(Xx),this.decPrivateModes=lu(Yx)}reset(){this.modes=lu(Xx),this.decPrivateModes=lu(Yx)}triggerDataEvent(e,t=!1){if(this._optionsService.rawOptions.disableStdin)return;let n=this._bufferService.buffer;t&&this._optionsService.rawOptions.scrollOnUserInput&&n.ybase!==n.ydisp&&this._onRequestScrollToBottom.fire(),t&&this._onUserInput.fire(),this._logService.debug(`sending data "${e}"`),this._logService.trace("sending data (codes)",()=>e.split("").map(r=>r.charCodeAt(0))),this._onData.fire(e)}triggerBinaryEvent(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${e}"`),this._logService.trace("sending binary (codes)",()=>e.split("").map(t=>t.charCodeAt(0))),this._onBinary.fire(e))}};iy=or([ct(0,vi),ct(1,i4),ct(2,yi)],iy);var Jx={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:e=>e.button===4||e.action!==1?!1:(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)},VT200:{events:19,restrict:e=>e.action!==32},DRAG:{events:23,restrict:e=>!(e.action===32&&e.button===3)},ANY:{events:31,restrict:e=>!0}};function ov(e,t){let n=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return e.button===4?(n|=64,n|=e.action):(n|=e.button&3,e.button&4&&(n|=64),e.button&8&&(n|=128),e.action===32?n|=32:e.action===0&&!t&&(n|=3)),n}var sv=String.fromCharCode,Qx={DEFAULT:e=>{let t=[ov(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?"":`\x1B[M${sv(t[0])}${sv(t[1])}${sv(t[2])}`},SGR:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${ov(e,!0)};${e.col};${e.row}${t}`},SGR_PIXELS:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${ov(e,!0)};${e.x};${e.y}${t}`}},oy=class extends en{constructor(e,t,n){super(),this._bufferService=e,this._coreService=t,this._optionsService=n,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._wheelPartialScroll=0,this._onProtocolChange=this._register(new Ue),this.onProtocolChange=this._onProtocolChange.event;for(let r of Object.keys(Jx))this.addProtocol(r,Jx[r]);for(let r of Object.keys(Qx))this.addEncoding(r,Qx[r]);this.reset()}addProtocol(e,t){this._protocols[e]=t}addEncoding(e,t){this._encodings[e]=t}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(e){if(!this._protocols[e])throw new Error(`unknown protocol "${e}"`);this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(e){if(!this._encodings[e])throw new Error(`unknown encoding "${e}"`);this._activeEncoding=e}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null,this._wheelPartialScroll=0}consumeWheelEvent(e,t,n){if(e.deltaY===0||e.shiftKey||t===void 0||n===void 0)return 0;let r=t/n,i=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(i/=r+0,Math.abs(e.deltaY)<50&&(i*=.3),this._wheelPartialScroll+=i,i=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(i*=this._bufferService.rows),i}_applyScrollModifier(e,t){return t.altKey||t.ctrlKey||t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity}triggerMouseEvent(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows||e.button===4&&e.action===32||e.button===3&&e.action!==32||e.button!==4&&(e.action===2||e.action===3)||(e.col++,e.row++,e.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,e,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(e))return!1;let t=this._encodings[this._activeEncoding](e);return t&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0}explainEvents(e){return{down:!!(e&1),up:!!(e&2),drag:!!(e&4),move:!!(e&8),wheel:!!(e&16)}}_equalEvents(e,t,n){if(n){if(e.x!==t.x||e.y!==t.y)return!1}else if(e.col!==t.col||e.row!==t.row)return!1;return!(e.button!==t.button||e.action!==t.action||e.ctrl!==t.ctrl||e.alt!==t.alt||e.shift!==t.shift)}};oy=or([ct(0,vi),ct(1,Va),ct(2,yi)],oy);var av=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],KJ=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],kr;function GJ(e,t){let n=0,r=t.length-1,i;if(e<t[0][0]||e>t[r][1])return!1;for(;r>=n;)if(i=n+r>>1,e>t[i][1])n=i+1;else if(e<t[i][0])r=i-1;else return!0;return!1}var XJ=class{constructor(){if(this.version="6",!kr){kr=new Uint8Array(65536),kr.fill(1),kr[0]=0,kr.fill(0,1,32),kr.fill(0,127,160),kr.fill(2,4352,4448),kr[9001]=2,kr[9002]=2,kr.fill(2,11904,42192),kr[12351]=1,kr.fill(2,44032,55204),kr.fill(2,63744,64256),kr.fill(2,65040,65050),kr.fill(2,65072,65136),kr.fill(2,65280,65377),kr.fill(2,65504,65511);for(let e=0;e<av.length;++e)kr.fill(0,av[e][0],av[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?kr[e]:GJ(e,KJ)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let n=this.wcwidth(e),r=n===0&&t!==0;if(r){let i=ka.extractWidth(t);i===0?r=!1:i>n&&(n=i)}return ka.createPropertyValue(0,n,r)}},ka=class Gh{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new Ue,this.onChange=this._onChange.event;let t=new XJ;this.register(t),this._active=t.version,this._activeProvider=t}static extractShouldJoin(t){return(t&1)!==0}static extractWidth(t){return t>>1&3}static extractCharKind(t){return t>>3}static createPropertyValue(t,n,r=!1){return(t&16777215)<<3|(n&3)<<1|(r?1:0)}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(t){if(!this._providers[t])throw new Error(`unknown Unicode version "${t}"`);this._active=t,this._activeProvider=this._providers[t],this._onChange.fire(t)}register(t){this._providers[t.version]=t}wcwidth(t){return this._activeProvider.wcwidth(t)}getStringCellWidth(t){let n=0,r=0,i=t.length;for(let o=0;o<i;++o){let a=t.charCodeAt(o);if(55296<=a&&a<=56319){if(++o>=i)return n+this.wcwidth(a);let d=t.charCodeAt(o);56320<=d&&d<=57343?a=(a-55296)*1024+d-56320+65536:n+=this.wcwidth(d)}let c=this.charProperties(a,r),u=Gh.extractWidth(c);Gh.extractShouldJoin(c)&&(u-=Gh.extractWidth(r)),n+=u,r=c}return n}charProperties(t,n){return this._activeProvider.charProperties(t,n)}},YJ=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(e){this.glevel=e,this.charset=this._charsets[e]}setgCharset(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)}};function Zx(e){var r;let t=(r=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1))==null?void 0:r.get(e.cols-1),n=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);n&&t&&(n.isWrapped=t[3]!==0&&t[3]!==32)}var Yc=2147483647,JJ=256,A4=class sy{constructor(t=32,n=32){if(this.maxLength=t,this.maxSubParamsLength=n,n>JJ)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(t),this.length=0,this._subParams=new Int32Array(n),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(t),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}static fromArray(t){let n=new sy;if(!t.length)return n;for(let r=Array.isArray(t[0])?1:0;r<t.length;++r){let i=t[r];if(Array.isArray(i))for(let o=0;o<i.length;++o)n.addSubParam(i[o]);else n.addParam(i)}return n}clone(){let t=new sy(this.maxLength,this.maxSubParamsLength);return t.params.set(this.params),t.length=this.length,t._subParams.set(this._subParams),t._subParamsLength=this._subParamsLength,t._subParamsIdx.set(this._subParamsIdx),t._rejectDigits=this._rejectDigits,t._rejectSubDigits=this._rejectSubDigits,t._digitIsSub=this._digitIsSub,t}toArray(){let t=[];for(let n=0;n<this.length;++n){t.push(this.params[n]);let r=this._subParamsIdx[n]>>8,i=this._subParamsIdx[n]&255;i-r>0&&t.push(Array.prototype.slice.call(this._subParams,r,i))}return t}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(t){if(this._digitIsSub=!1,this.length>=this.maxLength){this._rejectDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=t>Yc?Yc:t}addSubParam(t){if(this._digitIsSub=!0,!!this.length){if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength){this._rejectSubDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=t>Yc?Yc:t,this._subParamsIdx[this.length-1]++}}hasSubParams(t){return(this._subParamsIdx[t]&255)-(this._subParamsIdx[t]>>8)>0}getSubParams(t){let n=this._subParamsIdx[t]>>8,r=this._subParamsIdx[t]&255;return r-n>0?this._subParams.subarray(n,r):null}getSubParamsAll(){let t={};for(let n=0;n<this.length;++n){let r=this._subParamsIdx[n]>>8,i=this._subParamsIdx[n]&255;i-r>0&&(t[n]=this._subParams.slice(r,i))}return t}addDigit(t){let n;if(this._rejectDigits||!(n=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let r=this._digitIsSub?this._subParams:this.params,i=r[n-1];r[n-1]=~i?Math.min(i*10+t,Yc):t}},Jc=[],QJ=class{constructor(){this._state=0,this._active=Jc,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let n=this._handlers[e];return n.push(t),{dispose:()=>{let r=n.indexOf(t);r!==-1&&n.splice(r,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=Jc}reset(){if(this._state===2)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=Jc,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||Jc,!this._active.length)this._handlerFb(this._id,"START");else for(let e=this._active.length-1;e>=0;e--)this._active[e].start()}_put(e,t,n){if(!this._active.length)this._handlerFb(this._id,"PUT",_m(e,t,n));else for(let r=this._active.length-1;r>=0;r--)this._active[r].put(e,t,n)}start(){this.reset(),this._state=1}put(e,t,n){if(this._state!==3){if(this._state===1)for(;t<n;){let r=e[t++];if(r===59){this._state=2,this._start();break}if(r<48||57<r){this._state=3;return}this._id===-1&&(this._id=0),this._id=this._id*10+r-48}this._state===2&&n-t>0&&this._put(e,t,n)}}end(e,t=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),!this._active.length)this._handlerFb(this._id,"END",e);else{let n=!1,r=this._active.length-1,i=!1;if(this._stack.paused&&(r=this._stack.loopPosition-1,n=t,i=this._stack.fallThrough,this._stack.paused=!1),!i&&n===!1){for(;r>=0&&(n=this._active[r].end(e),n!==!0);r--)if(n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!1,n;r--}for(;r>=0;r--)if(n=this._active[r].end(!1),n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!0,n}this._active=Jc,this._id=-1,this._state=0}}},Hi=class{constructor(e){this._handler=e,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(e,t,n){this._hitLimit||(this._data+=_m(e,t,n),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}end(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data),t instanceof Promise))return t.then(n=>(this._data="",this._hitLimit=!1,n));return this._data="",this._hitLimit=!1,t}},Qc=[],ZJ=class{constructor(){this._handlers=Object.create(null),this._active=Qc,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=Qc}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let n=this._handlers[e];return n.push(t),{dispose:()=>{let r=n.indexOf(t);r!==-1&&n.splice(r,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}reset(){if(this._active.length)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=Qc,this._ident=0}hook(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||Qc,!this._active.length)this._handlerFb(this._ident,"HOOK",t);else for(let n=this._active.length-1;n>=0;n--)this._active[n].hook(t)}put(e,t,n){if(!this._active.length)this._handlerFb(this._ident,"PUT",_m(e,t,n));else for(let r=this._active.length-1;r>=0;r--)this._active[r].put(e,t,n)}unhook(e,t=!0){if(!this._active.length)this._handlerFb(this._ident,"UNHOOK",e);else{let n=!1,r=this._active.length-1,i=!1;if(this._stack.paused&&(r=this._stack.loopPosition-1,n=t,i=this._stack.fallThrough,this._stack.paused=!1),!i&&n===!1){for(;r>=0&&(n=this._active[r].unhook(e),n!==!0);r--)if(n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!1,n;r--}for(;r>=0;r--)if(n=this._active[r].unhook(!1),n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!0,n}this._active=Qc,this._ident=0}},cu=new A4;cu.addParam(0);var e2=class{constructor(e){this._handler=e,this._data="",this._params=cu,this._hitLimit=!1}hook(e){this._params=e.length>1||e.params[0]?e.clone():cu,this._data="",this._hitLimit=!1}put(e,t,n){this._hitLimit||(this._data+=_m(e,t,n),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}unhook(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data,this._params),t instanceof Promise))return t.then(n=>(this._params=cu,this._data="",this._hitLimit=!1,n));return this._params=cu,this._data="",this._hitLimit=!1,t}},eQ=class{constructor(e){this.table=new Uint8Array(e)}setDefault(e,t){this.table.fill(e<<4|t)}add(e,t,n,r){this.table[t<<8|e]=n<<4|r}addMany(e,t,n,r){for(let i=0;i<e.length;i++)this.table[t<<8|e[i]]=n<<4|r}},lo=160,tQ=(function(){let e=new eQ(4095),t=Array.apply(null,Array(256)).map((c,u)=>u),n=(c,u)=>t.slice(c,u),r=n(32,127),i=n(0,24);i.push(25),i.push.apply(i,n(28,32));let o=n(0,14),a;e.setDefault(1,0),e.addMany(r,0,2,0);for(a in o)e.addMany([24,26,153,154],a,3,0),e.addMany(n(128,144),a,3,0),e.addMany(n(144,152),a,3,0),e.add(156,a,0,0),e.add(27,a,11,1),e.add(157,a,4,8),e.addMany([152,158,159],a,0,7),e.add(155,a,11,3),e.add(144,a,11,9);return e.addMany(i,0,3,0),e.addMany(i,1,3,1),e.add(127,1,0,1),e.addMany(i,8,0,8),e.addMany(i,3,3,3),e.add(127,3,0,3),e.addMany(i,4,3,4),e.add(127,4,0,4),e.addMany(i,6,3,6),e.addMany(i,5,3,5),e.add(127,5,0,5),e.addMany(i,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(r,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(n(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(r,7,0,7),e.addMany(i,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(n(64,127),3,7,0),e.addMany(n(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(n(48,60),4,8,4),e.addMany(n(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(n(32,64),6,0,6),e.add(127,6,0,6),e.addMany(n(64,127),6,0,0),e.addMany(n(32,48),3,9,5),e.addMany(n(32,48),5,9,5),e.addMany(n(48,64),5,0,6),e.addMany(n(64,127),5,7,0),e.addMany(n(32,48),4,9,5),e.addMany(n(32,48),1,9,2),e.addMany(n(32,48),2,9,2),e.addMany(n(48,127),2,10,0),e.addMany(n(48,80),1,10,0),e.addMany(n(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(n(96,127),1,10,0),e.add(80,1,11,9),e.addMany(i,9,0,9),e.add(127,9,0,9),e.addMany(n(28,32),9,0,9),e.addMany(n(32,48),9,9,12),e.addMany(n(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(i,11,0,11),e.addMany(n(32,128),11,0,11),e.addMany(n(28,32),11,0,11),e.addMany(i,10,0,10),e.add(127,10,0,10),e.addMany(n(28,32),10,0,10),e.addMany(n(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(n(32,48),10,9,12),e.addMany(i,12,0,12),e.add(127,12,0,12),e.addMany(n(28,32),12,0,12),e.addMany(n(32,48),12,9,12),e.addMany(n(48,64),12,0,11),e.addMany(n(64,127),12,12,13),e.addMany(n(64,127),10,12,13),e.addMany(n(64,127),9,12,13),e.addMany(i,13,13,13),e.addMany(r,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(lo,0,2,0),e.add(lo,8,5,8),e.add(lo,6,0,6),e.add(lo,11,0,11),e.add(lo,13,13,13),e})(),nQ=class extends en{constructor(e=tQ){super(),this._transitions=e,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new A4,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(t,n,r)=>{},this._executeHandlerFb=t=>{},this._csiHandlerFb=(t,n)=>{},this._escHandlerFb=t=>{},this._errorHandlerFb=t=>t,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this._register(Kn(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this._register(new QJ),this._dcsParser=this._register(new ZJ),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(e,t=[64,126]){let n=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if(n=e.prefix.charCodeAt(0),n&&60>n||n>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(e.intermediates){if(e.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let i=0;i<e.intermediates.length;++i){let o=e.intermediates.charCodeAt(i);if(32>o||o>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");n<<=8,n|=o}}if(e.final.length!==1)throw new Error("final must be a single byte");let r=e.final.charCodeAt(0);if(t[0]>r||r>t[1])throw new Error(`final must be in range ${t[0]} .. ${t[1]}`);return n<<=8,n|=r,n}identToString(e){let t=[];for(;e;)t.push(String.fromCharCode(e&255)),e>>=8;return t.reverse().join("")}setPrintHandler(e){this._printHandler=e}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(e,t){let n=this._identifier(e,[48,126]);this._escHandlers[n]===void 0&&(this._escHandlers[n]=[]);let r=this._escHandlers[n];return r.push(t),{dispose:()=>{let i=r.indexOf(t);i!==-1&&r.splice(i,1)}}}clearEscHandler(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]}setEscHandlerFallback(e){this._escHandlerFb=e}setExecuteHandler(e,t){this._executeHandlers[e.charCodeAt(0)]=t}clearExecuteHandler(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]}setExecuteHandlerFallback(e){this._executeHandlerFb=e}registerCsiHandler(e,t){let n=this._identifier(e);this._csiHandlers[n]===void 0&&(this._csiHandlers[n]=[]);let r=this._csiHandlers[n];return r.push(t),{dispose:()=>{let i=r.indexOf(t);i!==-1&&r.splice(i,1)}}}clearCsiHandler(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]}setCsiHandlerFallback(e){this._csiHandlerFb=e}registerDcsHandler(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)}clearDcsHandler(e){this._dcsParser.clearHandler(this._identifier(e))}setDcsHandlerFallback(e){this._dcsParser.setHandlerFallback(e)}registerOscHandler(e,t){return this._oscParser.registerHandler(e,t)}clearOscHandler(e){this._oscParser.clearHandler(e)}setOscHandlerFallback(e){this._oscParser.setHandlerFallback(e)}setErrorHandler(e){this._errorHandler=e}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(e,t,n,r,i){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=n,this._parseStack.transition=r,this._parseStack.chunkPos=i}parse(e,t,n){let r=0,i=0,o=0,a;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,o=this._parseStack.chunkPos+1;else{if(n===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");let c=this._parseStack.handlers,u=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(n===!1&&u>-1){for(;u>=0&&(a=c[u](this._params),a!==!0);u--)if(a instanceof Promise)return this._parseStack.handlerPos=u,a}this._parseStack.handlers=[];break;case 4:if(n===!1&&u>-1){for(;u>=0&&(a=c[u](),a!==!0);u--)if(a instanceof Promise)return this._parseStack.handlerPos=u,a}this._parseStack.handlers=[];break;case 6:if(r=e[this._parseStack.chunkPos],a=this._dcsParser.unhook(r!==24&&r!==26,n),a)return a;r===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(r=e[this._parseStack.chunkPos],a=this._oscParser.end(r!==24&&r!==26,n),a)return a;r===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break}this._parseStack.state=0,o=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=this._parseStack.transition&15}for(let c=o;c<t;++c){switch(r=e[c],i=this._transitions.table[this.currentState<<8|(r<160?r:lo)],i>>4){case 2:for(let g=c+1;;++g){if(g>=t||(r=e[g])<32||r>126&&r<lo){this._printHandler(e,c,g),c=g-1;break}if(++g>=t||(r=e[g])<32||r>126&&r<lo){this._printHandler(e,c,g),c=g-1;break}if(++g>=t||(r=e[g])<32||r>126&&r<lo){this._printHandler(e,c,g),c=g-1;break}if(++g>=t||(r=e[g])<32||r>126&&r<lo){this._printHandler(e,c,g),c=g-1;break}}break;case 3:this._executeHandlers[r]?this._executeHandlers[r]():this._executeHandlerFb(r),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:c,code:r,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:let u=this._csiHandlers[this._collect<<8|r],d=u?u.length-1:-1;for(;d>=0&&(a=u[d](this._params),a!==!0);d--)if(a instanceof Promise)return this._preserveStack(3,u,d,i,c),a;d<0&&this._csiHandlerFb(this._collect<<8|r,this._params),this.precedingJoinState=0;break;case 8:do switch(r){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(r-48)}while(++c<t&&(r=e[c])>47&&r<60);c--;break;case 9:this._collect<<=8,this._collect|=r;break;case 10:let f=this._escHandlers[this._collect<<8|r],m=f?f.length-1:-1;for(;m>=0&&(a=f[m](),a!==!0);m--)if(a instanceof Promise)return this._preserveStack(4,f,m,i,c),a;m<0&&this._escHandlerFb(this._collect<<8|r),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|r,this._params);break;case 13:for(let g=c+1;;++g)if(g>=t||(r=e[g])===24||r===26||r===27||r>127&&r<lo){this._dcsParser.put(e,c,g),c=g-1;break}break;case 14:if(a=this._dcsParser.unhook(r!==24&&r!==26),a)return this._preserveStack(6,[],0,i,c),a;r===27&&(i|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let g=c+1;;g++)if(g>=t||(r=e[g])<32||r>127&&r<lo){this._oscParser.put(e,c,g),c=g-1;break}break;case 6:if(a=this._oscParser.end(r!==24&&r!==26),a)return this._preserveStack(5,[],0,i,c),a;r===27&&(i|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break}this.currentState=i&15}}},rQ=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,iQ=/^[\da-f]+$/;function t2(e){if(!e)return;let t=e.toLowerCase();if(t.indexOf("rgb:")===0){t=t.slice(4);let n=rQ.exec(t);if(n){let r=n[1]?15:n[4]?255:n[7]?4095:65535;return[Math.round(parseInt(n[1]||n[4]||n[7]||n[10],16)/r*255),Math.round(parseInt(n[2]||n[5]||n[8]||n[11],16)/r*255),Math.round(parseInt(n[3]||n[6]||n[9]||n[12],16)/r*255)]}}else if(t.indexOf("#")===0&&(t=t.slice(1),iQ.exec(t)&&[3,6,9,12].includes(t.length))){let n=t.length/3,r=[0,0,0];for(let i=0;i<3;++i){let o=parseInt(t.slice(n*i,n*i+n),16);r[i]=n===1?o<<4:n===2?o:n===3?o>>4:o>>8}return r}}function lv(e,t){let n=e.toString(16),r=n.length<2?"0"+n:n;switch(t){case 4:return n[0];case 8:return r;case 12:return(r+r).slice(0,3);default:return r+r}}function oQ(e,t=16){let[n,r,i]=e;return`rgb:${lv(n,t)}/${lv(r,t)}/${lv(i,t)}`}var sQ={"(":0,")":1,"*":2,"+":3,"-":1,".":2},Hs=131072,n2=10;function r2(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}var i2=5e3,o2=0,aQ=class extends en{constructor(e,t,n,r,i,o,a,c,u=new nQ){super(),this._bufferService=e,this._charsetService=t,this._coreService=n,this._logService=r,this._optionsService=i,this._oscLinkService=o,this._coreMouseService=a,this._unicodeService=c,this._parser=u,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new kX,this._utf8Decoder=new $X,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=pr.clone(),this._eraseAttrDataInternal=pr.clone(),this._onRequestBell=this._register(new Ue),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this._register(new Ue),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this._register(new Ue),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this._register(new Ue),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this._register(new Ue),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this._register(new Ue),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this._register(new Ue),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this._register(new Ue),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this._register(new Ue),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this._register(new Ue),this.onLineFeed=this._onLineFeed.event,this._onScroll=this._register(new Ue),this.onScroll=this._onScroll.event,this._onTitleChange=this._register(new Ue),this.onTitleChange=this._onTitleChange.event,this._onColor=this._register(new Ue),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this._register(this._parser),this._dirtyRowTracker=new ay(this._bufferService),this._activeBuffer=this._bufferService.buffer,this._register(this._bufferService.buffers.onBufferActivate(d=>this._activeBuffer=d.activeBuffer)),this._parser.setCsiHandlerFallback((d,f)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(d),params:f.toArray()})}),this._parser.setEscHandlerFallback(d=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(d)})}),this._parser.setExecuteHandlerFallback(d=>{this._logService.debug("Unknown EXECUTE code: ",{code:d})}),this._parser.setOscHandlerFallback((d,f,m)=>{this._logService.debug("Unknown OSC code: ",{identifier:d,action:f,data:m})}),this._parser.setDcsHandlerFallback((d,f,m)=>{f==="HOOK"&&(m=m.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(d),action:f,payload:m})}),this._parser.setPrintHandler((d,f,m)=>this.print(d,f,m)),this._parser.registerCsiHandler({final:"@"},d=>this.insertChars(d)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},d=>this.scrollLeft(d)),this._parser.registerCsiHandler({final:"A"},d=>this.cursorUp(d)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},d=>this.scrollRight(d)),this._parser.registerCsiHandler({final:"B"},d=>this.cursorDown(d)),this._parser.registerCsiHandler({final:"C"},d=>this.cursorForward(d)),this._parser.registerCsiHandler({final:"D"},d=>this.cursorBackward(d)),this._parser.registerCsiHandler({final:"E"},d=>this.cursorNextLine(d)),this._parser.registerCsiHandler({final:"F"},d=>this.cursorPrecedingLine(d)),this._parser.registerCsiHandler({final:"G"},d=>this.cursorCharAbsolute(d)),this._parser.registerCsiHandler({final:"H"},d=>this.cursorPosition(d)),this._parser.registerCsiHandler({final:"I"},d=>this.cursorForwardTab(d)),this._parser.registerCsiHandler({final:"J"},d=>this.eraseInDisplay(d,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},d=>this.eraseInDisplay(d,!0)),this._parser.registerCsiHandler({final:"K"},d=>this.eraseInLine(d,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},d=>this.eraseInLine(d,!0)),this._parser.registerCsiHandler({final:"L"},d=>this.insertLines(d)),this._parser.registerCsiHandler({final:"M"},d=>this.deleteLines(d)),this._parser.registerCsiHandler({final:"P"},d=>this.deleteChars(d)),this._parser.registerCsiHandler({final:"S"},d=>this.scrollUp(d)),this._parser.registerCsiHandler({final:"T"},d=>this.scrollDown(d)),this._parser.registerCsiHandler({final:"X"},d=>this.eraseChars(d)),this._parser.registerCsiHandler({final:"Z"},d=>this.cursorBackwardTab(d)),this._parser.registerCsiHandler({final:"`"},d=>this.charPosAbsolute(d)),this._parser.registerCsiHandler({final:"a"},d=>this.hPositionRelative(d)),this._parser.registerCsiHandler({final:"b"},d=>this.repeatPrecedingCharacter(d)),this._parser.registerCsiHandler({final:"c"},d=>this.sendDeviceAttributesPrimary(d)),this._parser.registerCsiHandler({prefix:">",final:"c"},d=>this.sendDeviceAttributesSecondary(d)),this._parser.registerCsiHandler({final:"d"},d=>this.linePosAbsolute(d)),this._parser.registerCsiHandler({final:"e"},d=>this.vPositionRelative(d)),this._parser.registerCsiHandler({final:"f"},d=>this.hVPosition(d)),this._parser.registerCsiHandler({final:"g"},d=>this.tabClear(d)),this._parser.registerCsiHandler({final:"h"},d=>this.setMode(d)),this._parser.registerCsiHandler({prefix:"?",final:"h"},d=>this.setModePrivate(d)),this._parser.registerCsiHandler({final:"l"},d=>this.resetMode(d)),this._parser.registerCsiHandler({prefix:"?",final:"l"},d=>this.resetModePrivate(d)),this._parser.registerCsiHandler({final:"m"},d=>this.charAttributes(d)),this._parser.registerCsiHandler({final:"n"},d=>this.deviceStatus(d)),this._parser.registerCsiHandler({prefix:"?",final:"n"},d=>this.deviceStatusPrivate(d)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},d=>this.softReset(d)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},d=>this.setCursorStyle(d)),this._parser.registerCsiHandler({final:"r"},d=>this.setScrollRegion(d)),this._parser.registerCsiHandler({final:"s"},d=>this.saveCursor(d)),this._parser.registerCsiHandler({final:"t"},d=>this.windowOptions(d)),this._parser.registerCsiHandler({final:"u"},d=>this.restoreCursor(d)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},d=>this.insertColumns(d)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},d=>this.deleteColumns(d)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},d=>this.selectProtected(d)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},d=>this.requestMode(d,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},d=>this.requestMode(d,!1)),this._parser.setExecuteHandler(Pe.BEL,()=>this.bell()),this._parser.setExecuteHandler(Pe.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(Pe.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(Pe.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(Pe.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(Pe.BS,()=>this.backspace()),this._parser.setExecuteHandler(Pe.HT,()=>this.tab()),this._parser.setExecuteHandler(Pe.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(Pe.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(qh.IND,()=>this.index()),this._parser.setExecuteHandler(qh.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(qh.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new Hi(d=>(this.setTitle(d),this.setIconName(d),!0))),this._parser.registerOscHandler(1,new Hi(d=>this.setIconName(d))),this._parser.registerOscHandler(2,new Hi(d=>this.setTitle(d))),this._parser.registerOscHandler(4,new Hi(d=>this.setOrReportIndexedColor(d))),this._parser.registerOscHandler(8,new Hi(d=>this.setHyperlink(d))),this._parser.registerOscHandler(10,new Hi(d=>this.setOrReportFgColor(d))),this._parser.registerOscHandler(11,new Hi(d=>this.setOrReportBgColor(d))),this._parser.registerOscHandler(12,new Hi(d=>this.setOrReportCursorColor(d))),this._parser.registerOscHandler(104,new Hi(d=>this.restoreIndexedColor(d))),this._parser.registerOscHandler(110,new Hi(d=>this.restoreFgColor(d))),this._parser.registerOscHandler(111,new Hi(d=>this.restoreBgColor(d))),this._parser.registerOscHandler(112,new Hi(d=>this.restoreCursorColor(d))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(let d in Rr)this._parser.registerEscHandler({intermediates:"(",final:d},()=>this.selectCharset("("+d)),this._parser.registerEscHandler({intermediates:")",final:d},()=>this.selectCharset(")"+d)),this._parser.registerEscHandler({intermediates:"*",final:d},()=>this.selectCharset("*"+d)),this._parser.registerEscHandler({intermediates:"+",final:d},()=>this.selectCharset("+"+d)),this._parser.registerEscHandler({intermediates:"-",final:d},()=>this.selectCharset("-"+d)),this._parser.registerEscHandler({intermediates:".",final:d},()=>this.selectCharset("."+d)),this._parser.registerEscHandler({intermediates:"/",final:d},()=>this.selectCharset("/"+d));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(d=>(this._logService.error("Parsing error: ",d),d)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new e2((d,f)=>this.requestStatusString(d,f)))}getAttrData(){return this._curAttrData}_preserveStack(e,t,n,r){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=n,this._parseStack.position=r}_logSlowResolvingAsync(e){this._logService.logLevel<=3&&Promise.race([e,new Promise((t,n)=>setTimeout(()=>n("#SLOW_TIMEOUT"),i2))]).catch(t=>{if(t!=="#SLOW_TIMEOUT")throw t;console.warn(`async parser handler taking longer than ${i2} ms`)})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(e,t){let n,r=this._activeBuffer.x,i=this._activeBuffer.y,o=0,a=this._parseStack.paused;if(a){if(n=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(n),n;r=this._parseStack.cursorStartX,i=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>Hs&&(o=this._parseStack.position+Hs)}if(this._logService.logLevel<=1&&this._logService.debug(`parsing data ${typeof e=="string"?` "${e}"`:` "${Array.prototype.map.call(e,d=>String.fromCharCode(d)).join("")}"`}`),this._logService.logLevel===0&&this._logService.trace("parsing data (codes)",typeof e=="string"?e.split("").map(d=>d.charCodeAt(0)):e),this._parseBuffer.length<e.length&&this._parseBuffer.length<Hs&&(this._parseBuffer=new Uint32Array(Math.min(e.length,Hs))),a||this._dirtyRowTracker.clearRange(),e.length>Hs)for(let d=o;d<e.length;d+=Hs){let f=d+Hs<e.length?d+Hs:e.length,m=typeof e=="string"?this._stringDecoder.decode(e.substring(d,f),this._parseBuffer):this._utf8Decoder.decode(e.subarray(d,f),this._parseBuffer);if(n=this._parser.parse(this._parseBuffer,m))return this._preserveStack(r,i,m,d),this._logSlowResolvingAsync(n),n}else if(!a){let d=typeof e=="string"?this._stringDecoder.decode(e,this._parseBuffer):this._utf8Decoder.decode(e,this._parseBuffer);if(n=this._parser.parse(this._parseBuffer,d))return this._preserveStack(r,i,d,0),this._logSlowResolvingAsync(n),n}(this._activeBuffer.x!==r||this._activeBuffer.y!==i)&&this._onCursorMove.fire();let c=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),u=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);u<this._bufferService.rows&&this._onRequestRefreshRows.fire({start:Math.min(u,this._bufferService.rows-1),end:Math.min(c,this._bufferService.rows-1)})}print(e,t,n){let r,i,o=this._charsetService.charset,a=this._optionsService.rawOptions.screenReaderMode,c=this._bufferService.cols,u=this._coreService.decPrivateModes.wraparound,d=this._coreService.modes.insertMode,f=this._curAttrData,m=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&n-t>0&&m.getWidth(this._activeBuffer.x-1)===2&&m.setCellFromCodepoint(this._activeBuffer.x-1,0,1,f);let g=this._parser.precedingJoinState;for(let v=t;v<n;++v){if(r=e[v],r<127&&o){let C=o[String.fromCharCode(r)];C&&(r=C.charCodeAt(0))}let y=this._unicodeService.charProperties(r,g);i=ka.extractWidth(y);let S=ka.extractShouldJoin(y),_=S?ka.extractWidth(g):0;if(g=y,a&&this._onA11yChar.fire(Vs(r)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+i-_>c){if(u){let C=m,E=this._activeBuffer.x-_;for(this._activeBuffer.x=_,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),m=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),_>0&&m instanceof au&&m.copyCellsFrom(C,E,0,_,!1);E<c;)C.setCellFromCodepoint(E++,0,1,f)}else if(this._activeBuffer.x=c-1,i===2)continue}if(S&&this._activeBuffer.x){let C=m.getWidth(this._activeBuffer.x-1)?1:2;m.addCodepointToCell(this._activeBuffer.x-C,r,i);for(let E=i-_;--E>=0;)m.setCellFromCodepoint(this._activeBuffer.x++,0,0,f);continue}if(d&&(m.insertCells(this._activeBuffer.x,i-_,this._activeBuffer.getNullCell(f)),m.getWidth(c-1)===2&&m.setCellFromCodepoint(c-1,0,1,f)),m.setCellFromCodepoint(this._activeBuffer.x++,r,i,f),i>0)for(;--i;)m.setCellFromCodepoint(this._activeBuffer.x++,0,0,f)}this._parser.precedingJoinState=g,this._activeBuffer.x<c&&n-t>0&&m.getWidth(this._activeBuffer.x)===0&&!m.hasContent(this._activeBuffer.x)&&m.setCellFromCodepoint(this._activeBuffer.x,0,1,f),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(e,t){return e.final==="t"&&!e.prefix&&!e.intermediates?this._parser.registerCsiHandler(e,n=>r2(n.params[0],this._optionsService.rawOptions.windowOptions)?t(n):!0):this._parser.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._parser.registerDcsHandler(e,new e2(t))}registerEscHandler(e,t){return this._parser.registerEscHandler(e,t)}registerOscHandler(e,t){return this._parser.registerOscHandler(e,new Hi(t))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var e;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&e.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);t.hasWidth(this._activeBuffer.x)&&!t.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let e=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-e),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(e=this._bufferService.cols-1){this._activeBuffer.x=Math.min(e,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(e,t){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=e,this._activeBuffer.y=this._activeBuffer.scrollTop+t):(this._activeBuffer.x=e,this._activeBuffer.y=t),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(e,t){this._restrictCursor(),this._setCursor(this._activeBuffer.x+e,this._activeBuffer.y+t)}cursorUp(e){let t=this._activeBuffer.y-this._activeBuffer.scrollTop;return t>=0?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1)),!0}cursorDown(e){let t=this._activeBuffer.scrollBottom-this._activeBuffer.y;return t>=0?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1),!0}cursorForward(e){return this._moveCursor(e.params[0]||1,0),!0}cursorBackward(e){return this._moveCursor(-(e.params[0]||1),0),!0}cursorNextLine(e){return this.cursorDown(e),this._activeBuffer.x=0,!0}cursorPrecedingLine(e){return this.cursorUp(e),this._activeBuffer.x=0,!0}cursorCharAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(e){return this._setCursor(e.length>=2?(e.params[1]||1)-1:0,(e.params[0]||1)-1),!0}charPosAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(e){return this._moveCursor(e.params[0]||1,0),!0}linePosAbsolute(e){return this._setCursor(this._activeBuffer.x,(e.params[0]||1)-1),!0}vPositionRelative(e){return this._moveCursor(0,e.params[0]||1),!0}hVPosition(e){return this.cursorPosition(e),!0}tabClear(e){let t=e.params[0];return t===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:t===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(e){let t=e.params[0];return t===1&&(this._curAttrData.bg|=536870912),(t===2||t===0)&&(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(e,t,n,r=!1,i=!1){let o=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);o.replaceCells(t,n,this._activeBuffer.getNullCell(this._eraseAttrData()),i),r&&(o.isWrapped=!1)}_resetBufferLine(e,t=!1){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n&&(n.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),t),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),n.isWrapped=!1)}eraseInDisplay(e,t=!1){var r;this._restrictCursor(this._bufferService.cols);let n;switch(e.params[0]){case 0:for(n=this._activeBuffer.y,this._dirtyRowTracker.markDirty(n),this._eraseInBufferLine(n++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);n<this._bufferService.rows;n++)this._resetBufferLine(n,t);this._dirtyRowTracker.markDirty(n);break;case 1:for(n=this._activeBuffer.y,this._dirtyRowTracker.markDirty(n),this._eraseInBufferLine(n,0,this._activeBuffer.x+1,!0,t),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(n+1).isWrapped=!1);n--;)this._resetBufferLine(n,t);this._dirtyRowTracker.markDirty(0);break;case 2:if(this._optionsService.rawOptions.scrollOnEraseInDisplay){for(n=this._bufferService.rows,this._dirtyRowTracker.markRangeDirty(0,n-1);n--&&!((r=this._activeBuffer.lines.get(this._activeBuffer.ybase+n))!=null&&r.getTrimmedLength()););for(;n>=0;n--)this._bufferService.scroll(this._eraseAttrData())}else{for(n=this._bufferService.rows,this._dirtyRowTracker.markDirty(n-1);n--;)this._resetBufferLine(n,t);this._dirtyRowTracker.markDirty(0)}break;case 3:let i=this._activeBuffer.lines.length-this._bufferService.rows;i>0&&(this._activeBuffer.lines.trimStart(i),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-i,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-i,0),this._onScroll.fire(0));break}return!0}eraseInLine(e,t=!1){switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,t);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,t);break}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let n=this._activeBuffer.ybase+this._activeBuffer.y,r=this._bufferService.rows-1-this._activeBuffer.scrollBottom,i=this._bufferService.rows-1+this._activeBuffer.ybase-r+1;for(;t--;)this._activeBuffer.lines.splice(i-1,1),this._activeBuffer.lines.splice(n,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let n=this._activeBuffer.ybase+this._activeBuffer.y,r;for(r=this._bufferService.rows-1-this._activeBuffer.scrollBottom,r=this._bufferService.rows-1+this._activeBuffer.ybase-r;t--;)this._activeBuffer.lines.splice(n,1),this._activeBuffer.lines.splice(r,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.insertCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.deleteCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(pr));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let n=this._activeBuffer.scrollTop;n<=this._activeBuffer.scrollBottom;++n){let r=this._activeBuffer.lines.get(this._activeBuffer.ybase+n);r.deleteCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),r.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let n=this._activeBuffer.scrollTop;n<=this._activeBuffer.scrollBottom;++n){let r=this._activeBuffer.lines.get(this._activeBuffer.ybase+n);r.insertCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),r.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let n=this._activeBuffer.scrollTop;n<=this._activeBuffer.scrollBottom;++n){let r=this._activeBuffer.lines.get(this._activeBuffer.ybase+n);r.insertCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),r.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let n=this._activeBuffer.scrollTop;n<=this._activeBuffer.scrollBottom;++n){let r=this._activeBuffer.lines.get(this._activeBuffer.ybase+n);r.deleteCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),r.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(e.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(e){let t=this._parser.precedingJoinState;if(!t)return!0;let n=e.params[0]||1,r=ka.extractWidth(t),i=this._activeBuffer.x-r,o=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(i),a=new Uint32Array(o.length*n),c=0;for(let d=0;d<o.length;){let f=o.codePointAt(d)||0;a[c++]=f,d+=f>65535?2:1}let u=c;for(let d=1;d<n;++d)a.copyWithin(u,0,c),u+=c;return this.print(a,0,u),!0}sendDeviceAttributesPrimary(e){return e.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(Pe.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(Pe.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(e){return e.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(Pe.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(Pe.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(e.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(Pe.ESC+"[>83;40003;0c")),!0}_is(e){return(this._optionsService.rawOptions.termName+"").indexOf(e)===0}setMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0;break}return!0}setModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,_a),this._charsetService.setgCharset(1,_a),this._charsetService.setgCharset(2,_a),this._charsetService.setgCharset(3,_a);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!0;break}return!0}resetMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1;break}return!0}resetModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),e.params[t]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!1,this._onRequestRefreshRows.fire(void 0);break}return!0}requestMode(e,t){(S=>(S[S.NOT_RECOGNIZED=0]="NOT_RECOGNIZED",S[S.SET=1]="SET",S[S.RESET=2]="RESET",S[S.PERMANENTLY_SET=3]="PERMANENTLY_SET",S[S.PERMANENTLY_RESET=4]="PERMANENTLY_RESET"))(void 0||(n={}));let r=this._coreService.decPrivateModes,{activeProtocol:i,activeEncoding:o}=this._coreMouseService,a=this._coreService,{buffers:c,cols:u}=this._bufferService,{active:d,alt:f}=c,m=this._optionsService.rawOptions,g=(S,_)=>(a.triggerDataEvent(`${Pe.ESC}[${t?"":"?"}${S};${_}$y`),!0),v=S=>S?1:2,y=e.params[0];return t?y===2?g(y,4):y===4?g(y,v(a.modes.insertMode)):y===12?g(y,3):y===20?g(y,v(m.convertEol)):g(y,0):y===1?g(y,v(r.applicationCursorKeys)):y===3?g(y,m.windowOptions.setWinLines?u===80?2:u===132?1:0:0):y===6?g(y,v(r.origin)):y===7?g(y,v(r.wraparound)):y===8?g(y,3):y===9?g(y,v(i==="X10")):y===12?g(y,v(m.cursorBlink)):y===25?g(y,v(!a.isCursorHidden)):y===45?g(y,v(r.reverseWraparound)):y===66?g(y,v(r.applicationKeypad)):y===67?g(y,4):y===1e3?g(y,v(i==="VT200")):y===1002?g(y,v(i==="DRAG")):y===1003?g(y,v(i==="ANY")):y===1004?g(y,v(r.sendFocus)):y===1005?g(y,4):y===1006?g(y,v(o==="SGR")):y===1015?g(y,4):y===1016?g(y,v(o==="SGR_PIXELS")):y===1048?g(y,1):y===47||y===1047||y===1049?g(y,v(d===f)):y===2004?g(y,v(r.bracketedPasteMode)):y===2026?g(y,v(r.synchronizedOutput)):g(y,0)}_updateAttrColor(e,t,n,r,i){return t===2?(e|=50331648,e&=-16777216,e|=ed.fromColorRGB([n,r,i])):t===5&&(e&=-50331904,e|=33554432|n&255),e}_extractColor(e,t,n){let r=[0,0,-1,0,0,0],i=0,o=0;do{if(r[o+i]=e.params[t+o],e.hasSubParams(t+o)){let a=e.getSubParams(t+o),c=0;do r[1]===5&&(i=1),r[o+c+1+i]=a[c];while(++c<a.length&&c+o+1+i<r.length);break}if(r[1]===5&&o+i>=2||r[1]===2&&o+i>=5)break;r[1]&&(i=1)}while(++o+t<e.length&&o+i<r.length);for(let a=2;a<r.length;++a)r[a]===-1&&(r[a]=0);switch(r[0]){case 38:n.fg=this._updateAttrColor(n.fg,r[1],r[3],r[4],r[5]);break;case 48:n.bg=this._updateAttrColor(n.bg,r[1],r[3],r[4],r[5]);break;case 58:n.extended=n.extended.clone(),n.extended.underlineColor=this._updateAttrColor(n.extended.underlineColor,r[1],r[3],r[4],r[5])}return o}_processUnderline(e,t){t.extended=t.extended.clone(),(!~e||e>5)&&(e=1),t.extended.underlineStyle=e,t.fg|=268435456,e===0&&(t.fg&=-268435457),t.updateExtended()}_processSGR0(e){e.fg=pr.fg,e.bg=pr.bg,e.extended=e.extended.clone(),e.extended.underlineStyle=0,e.extended.underlineColor&=-67108864,e.updateExtended()}charAttributes(e){if(e.length===1&&e.params[0]===0)return this._processSGR0(this._curAttrData),!0;let t=e.length,n,r=this._curAttrData;for(let i=0;i<t;i++)n=e.params[i],n>=30&&n<=37?(r.fg&=-50331904,r.fg|=16777216|n-30):n>=40&&n<=47?(r.bg&=-50331904,r.bg|=16777216|n-40):n>=90&&n<=97?(r.fg&=-50331904,r.fg|=16777216|n-90|8):n>=100&&n<=107?(r.bg&=-50331904,r.bg|=16777216|n-100|8):n===0?this._processSGR0(r):n===1?r.fg|=134217728:n===3?r.bg|=67108864:n===4?(r.fg|=268435456,this._processUnderline(e.hasSubParams(i)?e.getSubParams(i)[0]:1,r)):n===5?r.fg|=536870912:n===7?r.fg|=67108864:n===8?r.fg|=1073741824:n===9?r.fg|=2147483648:n===2?r.bg|=134217728:n===21?this._processUnderline(2,r):n===22?(r.fg&=-134217729,r.bg&=-134217729):n===23?r.bg&=-67108865:n===24?(r.fg&=-268435457,this._processUnderline(0,r)):n===25?r.fg&=-536870913:n===27?r.fg&=-67108865:n===28?r.fg&=-1073741825:n===29?r.fg&=2147483647:n===39?(r.fg&=-67108864,r.fg|=pr.fg&16777215):n===49?(r.bg&=-67108864,r.bg|=pr.bg&16777215):n===38||n===48||n===58?i+=this._extractColor(e,i,r):n===53?r.bg|=1073741824:n===55?r.bg&=-1073741825:n===59?(r.extended=r.extended.clone(),r.extended.underlineColor=-1,r.updateExtended()):n===100?(r.fg&=-67108864,r.fg|=pr.fg&16777215,r.bg&=-67108864,r.bg|=pr.bg&16777215):this._logService.debug("Unknown SGR attribute: %d.",n);return!0}deviceStatus(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(`${Pe.ESC}[0n`);break;case 6:let t=this._activeBuffer.y+1,n=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${Pe.ESC}[${t};${n}R`);break}return!0}deviceStatusPrivate(e){switch(e.params[0]){case 6:let t=this._activeBuffer.y+1,n=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${Pe.ESC}[?${t};${n}R`);break}return!0}softReset(e){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=pr.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(e){let t=e.length===0?1:e.params[0];if(t===0)this._coreService.decPrivateModes.cursorStyle=void 0,this._coreService.decPrivateModes.cursorBlink=void 0;else{switch(t){case 1:case 2:this._coreService.decPrivateModes.cursorStyle="block";break;case 3:case 4:this._coreService.decPrivateModes.cursorStyle="underline";break;case 5:case 6:this._coreService.decPrivateModes.cursorStyle="bar";break}let n=t%2===1;this._coreService.decPrivateModes.cursorBlink=n}return!0}setScrollRegion(e){let t=e.params[0]||1,n;return(e.length<2||(n=e.params[1])>this._bufferService.rows||n===0)&&(n=this._bufferService.rows),n>t&&(this._activeBuffer.scrollTop=t-1,this._activeBuffer.scrollBottom=n-1,this._setCursor(0,0)),!0}windowOptions(e){if(!r2(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;let t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:t!==2&&this._onRequestWindowsOptionsReport.fire(0);break;case 16:this._onRequestWindowsOptionsReport.fire(1);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${Pe.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:(t===0||t===2)&&(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>n2&&this._windowTitleStack.shift()),(t===0||t===1)&&(this._iconNameStack.push(this._iconName),this._iconNameStack.length>n2&&this._iconNameStack.shift());break;case 23:(t===0||t===2)&&this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),(t===0||t===1)&&this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop());break}return!0}saveCursor(e){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(e){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(e){return this._windowTitle=e,this._onTitleChange.fire(e),!0}setIconName(e){return this._iconName=e,!0}setOrReportIndexedColor(e){let t=[],n=e.split(";");for(;n.length>1;){let r=n.shift(),i=n.shift();if(/^\d+$/.exec(r)){let o=parseInt(r);if(s2(o))if(i==="?")t.push({type:0,index:o});else{let a=t2(i);a&&t.push({type:1,index:o,color:a})}}}return t.length&&this._onColor.fire(t),!0}setHyperlink(e){let t=e.indexOf(";");if(t===-1)return!0;let n=e.slice(0,t).trim(),r=e.slice(t+1);return r?this._createHyperlink(n,r):n.trim()?!1:this._finishHyperlink()}_createHyperlink(e,t){this._getCurrentLinkId()&&this._finishHyperlink();let n=e.split(":"),r,i=n.findIndex(o=>o.startsWith("id="));return i!==-1&&(r=n[i].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:r,uri:t}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(e,t){let n=e.split(";");for(let r=0;r<n.length&&!(t>=this._specialColors.length);++r,++t)if(n[r]==="?")this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{let i=t2(n[r]);i&&this._onColor.fire([{type:1,index:this._specialColors[t],color:i}])}return!0}setOrReportFgColor(e){return this._setOrReportSpecialColor(e,0)}setOrReportBgColor(e){return this._setOrReportSpecialColor(e,1)}setOrReportCursorColor(e){return this._setOrReportSpecialColor(e,2)}restoreIndexedColor(e){if(!e)return this._onColor.fire([{type:2}]),!0;let t=[],n=e.split(";");for(let r=0;r<n.length;++r)if(/^\d+$/.exec(n[r])){let i=parseInt(n[r]);s2(i)&&t.push({type:2,index:i})}return t.length&&this._onColor.fire(t),!0}restoreFgColor(e){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(e){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(e){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,_a),!0}selectCharset(e){return e.length!==2?(this.selectDefaultCharset(),!0):(e[0]==="/"||this._charsetService.setgCharset(sQ[e[0]],Rr[e[1]]||_a),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){let e=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,e,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=pr.clone(),this._eraseAttrDataInternal=pr.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=this._curAttrData.bg&67108863,this._eraseAttrDataInternal}setgLevel(e){return this._charsetService.setgLevel(e),!0}screenAlignmentPattern(){let e=new uo;e.content=1<<22|69,e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(let t=0;t<this._bufferService.rows;++t){let n=this._activeBuffer.ybase+this._activeBuffer.y+t,r=this._activeBuffer.lines.get(n);r&&(r.fill(e),r.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(e,t){let n=a=>(this._coreService.triggerDataEvent(`${Pe.ESC}${a}${Pe.ESC}\\`),!0),r=this._bufferService.buffer,i=this._optionsService.rawOptions;return n(e==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:e==='"p'?'P1$r61;1"p':e==="r"?`P1$r${r.scrollTop+1};${r.scrollBottom+1}r`:e==="m"?"P1$r0m":e===" q"?`P1$r${{block:2,underline:4,bar:6}[i.cursorStyle]-(i.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(e,t){this._dirtyRowTracker.markRangeDirty(e,t)}},ay=class{constructor(e){this._bufferService=e,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(e){e<this.start?this.start=e:e>this.end&&(this.end=e)}markRangeDirty(e,t){e>t&&(o2=e,e=t,t=o2),e<this.start&&(this.start=e),t>this.end&&(this.end=t)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};ay=or([ct(0,vi)],ay);function s2(e){return 0<=e&&e<256}var lQ=5e7,a2=12,cQ=50,uQ=class extends en{constructor(e){super(),this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this._register(new Ue),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(e,t){if(t!==void 0&&this._syncCalls>t){this._syncCalls=0;return}if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;this._isSyncWriting=!0;let n;for(;n=this._writeBuffer.shift();){this._action(n);let r=this._callbacks.shift();r&&r()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(e,t){if(this._pendingData>lQ)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput){this._didUserInput=!1,this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t),this._innerWrite();return}setTimeout(()=>this._innerWrite())}this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)}_innerWrite(e=0,t=!0){let n=e||performance.now();for(;this._writeBuffer.length>this._bufferOffset;){let r=this._writeBuffer[this._bufferOffset],i=this._action(r,t);if(i){let a=c=>performance.now()-n>=a2?setTimeout(()=>this._innerWrite(0,c)):this._innerWrite(n,c);i.catch(c=>(queueMicrotask(()=>{throw c}),Promise.resolve(!1))).then(a);return}let o=this._callbacks[this._bufferOffset];if(o&&o(),this._bufferOffset++,this._pendingData-=r.length,performance.now()-n>=a2)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>cQ&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}},ly=class{constructor(e){this._bufferService=e,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(e){let t=this._bufferService.buffer;if(e.id===void 0){let c=t.addMarker(t.ybase+t.y),u={data:e,id:this._nextId++,lines:[c]};return c.onDispose(()=>this._removeMarkerFromLink(u,c)),this._dataByLinkId.set(u.id,u),u.id}let n=e,r=this._getEntryIdKey(n),i=this._entriesWithId.get(r);if(i)return this.addLineToLink(i.id,t.ybase+t.y),i.id;let o=t.addMarker(t.ybase+t.y),a={id:this._nextId++,key:this._getEntryIdKey(n),data:n,lines:[o]};return o.onDispose(()=>this._removeMarkerFromLink(a,o)),this._entriesWithId.set(a.key,a),this._dataByLinkId.set(a.id,a),a.id}addLineToLink(e,t){let n=this._dataByLinkId.get(e);if(n&&n.lines.every(r=>r.line!==t)){let r=this._bufferService.buffer.addMarker(t);n.lines.push(r),r.onDispose(()=>this._removeMarkerFromLink(n,r))}}getLinkData(e){var t;return(t=this._dataByLinkId.get(e))==null?void 0:t.data}_getEntryIdKey(e){return`${e.id};;${e.uri}`}_removeMarkerFromLink(e,t){let n=e.lines.indexOf(t);n!==-1&&(e.lines.splice(n,1),e.lines.length===0&&(e.data.id!==void 0&&this._entriesWithId.delete(e.key),this._dataByLinkId.delete(e.id)))}};ly=or([ct(0,vi)],ly);var l2=!1,dQ=class extends en{constructor(e){super(),this._windowsWrappingHeuristics=this._register(new tc),this._onBinary=this._register(new Ue),this.onBinary=this._onBinary.event,this._onData=this._register(new Ue),this.onData=this._onData.event,this._onLineFeed=this._register(new Ue),this.onLineFeed=this._onLineFeed.event,this._onResize=this._register(new Ue),this.onResize=this._onResize.event,this._onWriteParsed=this._register(new Ue),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this._register(new Ue),this._instantiationService=new zJ,this.optionsService=this._register(new UJ(e)),this._instantiationService.setService(yi,this.optionsService),this._bufferService=this._register(this._instantiationService.createInstance(ry)),this._instantiationService.setService(vi,this._bufferService),this._logService=this._register(this._instantiationService.createInstance(ny)),this._instantiationService.setService(i4,this._logService),this.coreService=this._register(this._instantiationService.createInstance(iy)),this._instantiationService.setService(Va,this.coreService),this.coreMouseService=this._register(this._instantiationService.createInstance(oy)),this._instantiationService.setService(r4,this.coreMouseService),this.unicodeService=this._register(this._instantiationService.createInstance(ka)),this._instantiationService.setService(OX,this.unicodeService),this._charsetService=this._instantiationService.createInstance(YJ),this._instantiationService.setService(PX,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(ly),this._instantiationService.setService(o4,this._oscLinkService),this._inputHandler=this._register(new aQ(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this._register(Kr.forward(this._inputHandler.onLineFeed,this._onLineFeed)),this._register(this._inputHandler),this._register(Kr.forward(this._bufferService.onResize,this._onResize)),this._register(Kr.forward(this.coreService.onData,this._onData)),this._register(Kr.forward(this.coreService.onBinary,this._onBinary)),this._register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom(!0))),this._register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this._register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this._register(this._bufferService.onScroll(()=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this._register(new uQ((t,n)=>this._inputHandler.parse(t,n))),this._register(Kr.forward(this._writeBuffer.onWriteParsed,this._onWriteParsed))}get onScroll(){return this._onScrollApi||(this._onScrollApi=this._register(new Ue),this._onScroll.event(e=>{var t;(t=this._onScrollApi)==null||t.fire(e.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(e){for(let t in e)this.optionsService.options[t]=e[t]}write(e,t){this._writeBuffer.write(e,t)}writeSync(e,t){this._logService.logLevel<=3&&!l2&&(this._logService.warn("writeSync is unreliable and will be removed soon."),l2=!0),this._writeBuffer.writeSync(e,t)}input(e,t=!0){this.coreService.triggerDataEvent(e,t)}resize(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,B4),t=Math.max(t,L4),this._bufferService.resize(e,t))}scroll(e,t=!1){this._bufferService.scroll(e,t)}scrollLines(e,t){this._bufferService.scrollLines(e,t)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}registerEscHandler(e,t){return this._inputHandler.registerEscHandler(e,t)}registerDcsHandler(e,t){return this._inputHandler.registerDcsHandler(e,t)}registerCsiHandler(e,t){return this._inputHandler.registerCsiHandler(e,t)}registerOscHandler(e,t){return this._inputHandler.registerOscHandler(e,t)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let e=!1,t=this.optionsService.rawOptions.windowsPty;t&&t.buildNumber!==void 0&&t.buildNumber!==void 0?e=t.backend==="conpty"&&t.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(e=!0),e?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let e=[];e.push(this.onLineFeed(Zx.bind(null,this._bufferService))),e.push(this.registerCsiHandler({final:"H"},()=>(Zx(this._bufferService),!1))),this._windowsWrappingHeuristics.value=Kn(()=>{for(let t of e)t.dispose()})}}},hQ={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};function fQ(e,t,n,r){var a;let i={type:0,cancel:!1,key:void 0},o=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:e.key==="UIKeyInputUpArrow"?t?i.key=Pe.ESC+"OA":i.key=Pe.ESC+"[A":e.key==="UIKeyInputLeftArrow"?t?i.key=Pe.ESC+"OD":i.key=Pe.ESC+"[D":e.key==="UIKeyInputRightArrow"?t?i.key=Pe.ESC+"OC":i.key=Pe.ESC+"[C":e.key==="UIKeyInputDownArrow"&&(t?i.key=Pe.ESC+"OB":i.key=Pe.ESC+"[B");break;case 8:i.key=e.ctrlKey?"\b":Pe.DEL,e.altKey&&(i.key=Pe.ESC+i.key);break;case 9:if(e.shiftKey){i.key=Pe.ESC+"[Z";break}i.key=Pe.HT,i.cancel=!0;break;case 13:i.key=e.altKey?Pe.ESC+Pe.CR:Pe.CR,i.cancel=!0;break;case 27:i.key=Pe.ESC,e.altKey&&(i.key=Pe.ESC+Pe.ESC),i.cancel=!0;break;case 37:if(e.metaKey)break;o?i.key=Pe.ESC+"[1;"+(o+1)+"D":t?i.key=Pe.ESC+"OD":i.key=Pe.ESC+"[D";break;case 39:if(e.metaKey)break;o?i.key=Pe.ESC+"[1;"+(o+1)+"C":t?i.key=Pe.ESC+"OC":i.key=Pe.ESC+"[C";break;case 38:if(e.metaKey)break;o?i.key=Pe.ESC+"[1;"+(o+1)+"A":t?i.key=Pe.ESC+"OA":i.key=Pe.ESC+"[A";break;case 40:if(e.metaKey)break;o?i.key=Pe.ESC+"[1;"+(o+1)+"B":t?i.key=Pe.ESC+"OB":i.key=Pe.ESC+"[B";break;case 45:!e.shiftKey&&!e.ctrlKey&&(i.key=Pe.ESC+"[2~");break;case 46:o?i.key=Pe.ESC+"[3;"+(o+1)+"~":i.key=Pe.ESC+"[3~";break;case 36:o?i.key=Pe.ESC+"[1;"+(o+1)+"H":t?i.key=Pe.ESC+"OH":i.key=Pe.ESC+"[H";break;case 35:o?i.key=Pe.ESC+"[1;"+(o+1)+"F":t?i.key=Pe.ESC+"OF":i.key=Pe.ESC+"[F";break;case 33:e.shiftKey?i.type=2:e.ctrlKey?i.key=Pe.ESC+"[5;"+(o+1)+"~":i.key=Pe.ESC+"[5~";break;case 34:e.shiftKey?i.type=3:e.ctrlKey?i.key=Pe.ESC+"[6;"+(o+1)+"~":i.key=Pe.ESC+"[6~";break;case 112:o?i.key=Pe.ESC+"[1;"+(o+1)+"P":i.key=Pe.ESC+"OP";break;case 113:o?i.key=Pe.ESC+"[1;"+(o+1)+"Q":i.key=Pe.ESC+"OQ";break;case 114:o?i.key=Pe.ESC+"[1;"+(o+1)+"R":i.key=Pe.ESC+"OR";break;case 115:o?i.key=Pe.ESC+"[1;"+(o+1)+"S":i.key=Pe.ESC+"OS";break;case 116:o?i.key=Pe.ESC+"[15;"+(o+1)+"~":i.key=Pe.ESC+"[15~";break;case 117:o?i.key=Pe.ESC+"[17;"+(o+1)+"~":i.key=Pe.ESC+"[17~";break;case 118:o?i.key=Pe.ESC+"[18;"+(o+1)+"~":i.key=Pe.ESC+"[18~";break;case 119:o?i.key=Pe.ESC+"[19;"+(o+1)+"~":i.key=Pe.ESC+"[19~";break;case 120:o?i.key=Pe.ESC+"[20;"+(o+1)+"~":i.key=Pe.ESC+"[20~";break;case 121:o?i.key=Pe.ESC+"[21;"+(o+1)+"~":i.key=Pe.ESC+"[21~";break;case 122:o?i.key=Pe.ESC+"[23;"+(o+1)+"~":i.key=Pe.ESC+"[23~";break;case 123:o?i.key=Pe.ESC+"[24;"+(o+1)+"~":i.key=Pe.ESC+"[24~";break;default:if(e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey)e.keyCode>=65&&e.keyCode<=90?i.key=String.fromCharCode(e.keyCode-64):e.keyCode===32?i.key=Pe.NUL:e.keyCode>=51&&e.keyCode<=55?i.key=String.fromCharCode(e.keyCode-51+27):e.keyCode===56?i.key=Pe.DEL:e.keyCode===219?i.key=Pe.ESC:e.keyCode===220?i.key=Pe.FS:e.keyCode===221&&(i.key=Pe.GS);else if((!n||r)&&e.altKey&&!e.metaKey){let c=(a=hQ[e.keyCode])==null?void 0:a[e.shiftKey?1:0];if(c)i.key=Pe.ESC+c;else if(e.keyCode>=65&&e.keyCode<=90){let u=e.ctrlKey?e.keyCode-64:e.keyCode+32,d=String.fromCharCode(u);e.shiftKey&&(d=d.toUpperCase()),i.key=Pe.ESC+d}else if(e.keyCode===32)i.key=Pe.ESC+(e.ctrlKey?Pe.NUL:" ");else if(e.key==="Dead"&&e.code.startsWith("Key")){let u=e.code.slice(3,4);e.shiftKey||(u=u.toLowerCase()),i.key=Pe.ESC+u,i.cancel=!0}}else n&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.metaKey?e.keyCode===65&&(i.type=1):e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&e.key.length===1?i.key=e.key:e.key&&e.ctrlKey&&(e.key==="_"&&(i.key=Pe.US),e.key==="@"&&(i.key=Pe.NUL));break}return i}var cr=0,mQ=class{constructor(e){this._getKey=e,this._array=[],this._insertedValues=[],this._flushInsertedTask=new Of,this._isFlushingInserted=!1,this._deletedIndices=[],this._flushDeletedTask=new Of,this._isFlushingDeleted=!1}clear(){this._array.length=0,this._insertedValues.length=0,this._flushInsertedTask.clear(),this._isFlushingInserted=!1,this._deletedIndices.length=0,this._flushDeletedTask.clear(),this._isFlushingDeleted=!1}insert(e){this._flushCleanupDeleted(),this._insertedValues.length===0&&this._flushInsertedTask.enqueue(()=>this._flushInserted()),this._insertedValues.push(e)}_flushInserted(){let e=this._insertedValues.sort((i,o)=>this._getKey(i)-this._getKey(o)),t=0,n=0,r=new Array(this._array.length+this._insertedValues.length);for(let i=0;i<r.length;i++)n>=this._array.length||this._getKey(e[t])<=this._getKey(this._array[n])?(r[i]=e[t],t++):r[i]=this._array[n++];this._array=r,this._insertedValues.length=0}_flushCleanupInserted(){!this._isFlushingInserted&&this._insertedValues.length>0&&this._flushInsertedTask.flush()}delete(e){if(this._flushCleanupInserted(),this._array.length===0)return!1;let t=this._getKey(e);if(t===void 0||(cr=this._search(t),cr===-1)||this._getKey(this._array[cr])!==t)return!1;do if(this._array[cr]===e)return this._deletedIndices.length===0&&this._flushDeletedTask.enqueue(()=>this._flushDeleted()),this._deletedIndices.push(cr),!0;while(++cr<this._array.length&&this._getKey(this._array[cr])===t);return!1}_flushDeleted(){this._isFlushingDeleted=!0;let e=this._deletedIndices.sort((i,o)=>i-o),t=0,n=new Array(this._array.length-e.length),r=0;for(let i=0;i<this._array.length;i++)e[t]===i?t++:n[r++]=this._array[i];this._array=n,this._deletedIndices.length=0,this._isFlushingDeleted=!1}_flushCleanupDeleted(){!this._isFlushingDeleted&&this._deletedIndices.length>0&&this._flushDeletedTask.flush()}*getKeyIterator(e){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(cr=this._search(e),!(cr<0||cr>=this._array.length)&&this._getKey(this._array[cr])===e))do yield this._array[cr];while(++cr<this._array.length&&this._getKey(this._array[cr])===e)}forEachByKey(e,t){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(cr=this._search(e),!(cr<0||cr>=this._array.length)&&this._getKey(this._array[cr])===e))do t(this._array[cr]);while(++cr<this._array.length&&this._getKey(this._array[cr])===e)}values(){return this._flushCleanupInserted(),this._flushCleanupDeleted(),[...this._array].values()}_search(e){let t=0,n=this._array.length-1;for(;n>=t;){let r=t+n>>1,i=this._getKey(this._array[r]);if(i>e)n=r-1;else if(i<e)t=r+1;else{for(;r>0&&this._getKey(this._array[r-1])===e;)r--;return r}}return t}},cv=0,c2=0,pQ=class extends en{constructor(){super(),this._decorations=new mQ(e=>e==null?void 0:e.marker.line),this._onDecorationRegistered=this._register(new Ue),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this._register(new Ue),this.onDecorationRemoved=this._onDecorationRemoved.event,this._register(Kn(()=>this.reset()))}get decorations(){return this._decorations.values()}registerDecoration(e){if(e.marker.isDisposed)return;let t=new gQ(e);if(t){let n=t.marker.onDispose(()=>t.dispose()),r=t.onDispose(()=>{r.dispose(),t&&(this._decorations.delete(t)&&this._onDecorationRemoved.fire(t),n.dispose())});this._decorations.insert(t),this._onDecorationRegistered.fire(t)}return t}reset(){for(let e of this._decorations.values())e.dispose();this._decorations.clear()}*getDecorationsAtCell(e,t,n){let r=0,i=0;for(let o of this._decorations.getKeyIterator(t))r=o.options.x??0,i=r+(o.options.width??1),e>=r&&e<i&&(!n||(o.options.layer??"bottom")===n)&&(yield o)}forEachDecorationAtCell(e,t,n,r){this._decorations.forEachByKey(t,i=>{cv=i.options.x??0,c2=cv+(i.options.width??1),e>=cv&&e<c2&&(!n||(i.options.layer??"bottom")===n)&&r(i)})}},gQ=class extends Ys{constructor(e){super(),this.options=e,this.onRenderEmitter=this.add(new Ue),this.onRender=this.onRenderEmitter.event,this._onDispose=this.add(new Ue),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=e.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=Zn.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=Zn.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}dispose(){this._onDispose.fire(),super.dispose()}},vQ=1e3,yQ=class{constructor(e,t=vQ){this._renderCallback=e,this._debounceThresholdMS=t,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(e,t,n){this._rowCount=n,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t;let r=performance.now();if(r-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=r,this._innerRefresh();else if(!this._additionalRefreshRequested){let i=r-this._lastRefreshMs,o=this._debounceThresholdMS-i;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=performance.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},o)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}},u2=20,If=class extends en{constructor(e,t,n,r){super(),this._terminal=e,this._coreBrowserService=n,this._renderService=r,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="";let i=this._coreBrowserService.mainDocument;this._accessibilityContainer=i.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=i.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let o=0;o<this._terminal.rows;o++)this._rowElements[o]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[o]);if(this._topBoundaryFocusListener=o=>this._handleBoundaryFocus(o,0),this._bottomBoundaryFocusListener=o=>this._handleBoundaryFocus(o,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=i.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this._register(new yQ(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this._register(this._terminal.onResize(o=>this._handleResize(o.rows))),this._register(this._terminal.onRender(o=>this._refreshRows(o.start,o.end))),this._register(this._terminal.onScroll(()=>this._refreshRows())),this._register(this._terminal.onA11yChar(o=>this._handleChar(o))),this._register(this._terminal.onLineFeed(()=>this._handleChar(`
599
+ `))),this._register(this._terminal.onA11yTab(o=>this._handleTab(o))),this._register(this._terminal.onKey(o=>this._handleKey(o.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(Vt(i,"selectionchange",()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(Kn(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<u2+1&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
600
+ `&&(this._liveRegionLineCount++,this._liveRegionLineCount===u2+1&&(this._liveRegion.textContent+=R0.get())))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let n=this._terminal.buffer,r=n.lines.length.toString();for(let i=e;i<=t;i++){let o=n.lines.get(n.ydisp+i),a=[],c=(o==null?void 0:o.translateToString(!0,void 0,void 0,a))||"",u=(n.ydisp+i+1).toString(),d=this._rowElements[i];d&&(c.length===0?(d.textContent=" ",this._rowColumns.set(d,[0,1])):(d.textContent=c,this._rowColumns.set(d,a)),d.setAttribute("aria-posinset",u),d.setAttribute("aria-setsize",r),this._alignRowWidth(d))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,t){let n=e.target,r=this._rowElements[t===0?1:this._rowElements.length-2],i=n.getAttribute("aria-posinset"),o=t===0?"1":`${this._terminal.buffer.lines.length}`;if(i===o||e.relatedTarget!==r)return;let a,c;if(t===0?(a=n,c=this._rowElements.pop(),this._rowContainer.removeChild(c)):(a=this._rowElements.shift(),c=n,this._rowContainer.removeChild(a)),a.removeEventListener("focus",this._topBoundaryFocusListener),c.removeEventListener("focus",this._bottomBoundaryFocusListener),t===0){let u=this._createAccessibilityTreeNode();this._rowElements.unshift(u),this._rowContainer.insertAdjacentElement("afterbegin",u)}else{let u=this._createAccessibilityTreeNode();this._rowElements.push(u),this._rowContainer.appendChild(u)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){var c;if(this._rowElements.length===0)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode){console.error("anchorNode and/or focusNode are null");return}let t={node:e.anchorNode,offset:e.anchorOffset},n={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(n.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===n.node&&t.offset>n.offset)&&([t,n]=[n,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let r=this._rowElements.slice(-1)[0];if(n.node.compareDocumentPosition(r)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(n={node:r,offset:((c=r.textContent)==null?void 0:c.length)??0}),!this._rowContainer.contains(n.node))return;let i=({node:u,offset:d})=>{let f=u instanceof Text?u.parentNode:u,m=parseInt(f==null?void 0:f.getAttribute("aria-posinset"),10)-1;if(isNaN(m))return console.warn("row is invalid. Race condition?"),null;let g=this._rowColumns.get(f);if(!g)return console.warn("columns is null. Race condition?"),null;let v=d<g.length?g[d]:g.slice(-1)[0]+1;return v>=this._terminal.cols&&(++m,v=0),{row:m,column:v}},o=i(t),a=i(n);if(!(!o||!a)){if(o.row>a.row||o.row===a.row&&o.column>=a.column)throw new Error("invalid range");this._terminal.select(o.column,o.row,(a.row-o.row)*this._terminal.cols-o.column+a.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e]),this._alignRowWidth(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}_alignRowWidth(e){var i,o;e.style.transform="";let t=e.getBoundingClientRect().width,n=(o=(i=this._rowColumns.get(e))==null?void 0:i.slice(-1))==null?void 0:o[0];if(!n)return;let r=n*this._renderService.dimensions.css.cell.width;e.style.transform=`scaleX(${r/t})`}};If=or([ct(1,$b),ct(2,bs),ct(3,_s)],If);var cy=class extends en{constructor(e,t,n,r,i){super(),this._element=e,this._mouseService=t,this._renderService=n,this._bufferService=r,this._linkProviderService=i,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this._register(new Ue),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this._register(new Ue),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this._register(Kn(()=>{var o;Ba(this._linkCacheDisposables),this._linkCacheDisposables.length=0,this._lastMouseEvent=void 0,(o=this._activeProviderReplies)==null||o.clear()})),this._register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this._register(Vt(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(Vt(this._element,"mousemove",this._handleMouseMove.bind(this))),this._register(Vt(this._element,"mousedown",this._handleMouseDown.bind(this))),this._register(Vt(this._element,"mouseup",this._handleMouseUp.bind(this)))}get currentLink(){return this._currentLink}_handleMouseMove(e){this._lastMouseEvent=e;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;let n=e.composedPath();for(let r=0;r<n.length;r++){let i=n[r];if(i.classList.contains("xterm"))break;if(i.classList.contains("xterm-hover"))return}(!this._lastBufferCell||t.x!==this._lastBufferCell.x||t.y!==this._lastBufferCell.y)&&(this._handleHover(t),this._lastBufferCell=t)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized){this._clearCurrentLink(),this._askForLink(e,!1),this._wasResized=!1;return}this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,t){var r,i;(!this._activeProviderReplies||!t)&&((r=this._activeProviderReplies)==null||r.forEach(o=>{o==null||o.forEach(a=>{a.link.dispose&&a.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let n=!1;for(let[o,a]of this._linkProviderService.linkProviders.entries())t?(i=this._activeProviderReplies)!=null&&i.get(o)&&(n=this._checkLinkProviderResult(o,e,n)):a.provideLinks(e.y,c=>{var d,f;if(this._isMouseOut)return;let u=c==null?void 0:c.map(m=>({link:m}));(d=this._activeProviderReplies)==null||d.set(o,u),n=this._checkLinkProviderResult(o,e,n),((f=this._activeProviderReplies)==null?void 0:f.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,t){let n=new Set;for(let r=0;r<t.size;r++){let i=t.get(r);if(i)for(let o=0;o<i.length;o++){let a=i[o],c=a.link.range.start.y<e?0:a.link.range.start.x,u=a.link.range.end.y>e?this._bufferService.cols:a.link.range.end.x;for(let d=c;d<=u;d++){if(n.has(d)){i.splice(o--,1);break}n.add(d)}}}}_checkLinkProviderResult(e,t,n){var o;if(!this._activeProviderReplies)return n;let r=this._activeProviderReplies.get(e),i=!1;for(let a=0;a<e;a++)(!this._activeProviderReplies.has(a)||this._activeProviderReplies.get(a))&&(i=!0);if(!i&&r){let a=r.find(c=>this._linkAtPosition(c.link,t));a&&(n=!0,this._handleNewLink(a))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!n)for(let a=0;a<this._activeProviderReplies.size;a++){let c=(o=this._activeProviderReplies.get(a))==null?void 0:o.find(u=>this._linkAtPosition(u.link,t));if(c){n=!0,this._handleNewLink(c);break}}return n}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink&&bQ(this._mouseDownLink.link,this._currentLink.link)&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){!this._currentLink||!this._lastMouseEvent||(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,Ba(this._linkCacheDisposables),this._linkCacheDisposables.length=0)}_handleNewLink(e){if(!this._lastMouseEvent)return;let t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0?!0:e.link.decorations.underline,pointerCursor:e.link.decorations===void 0?!0:e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>{var n,r;return(r=(n=this._currentLink)==null?void 0:n.state)==null?void 0:r.decorations.pointerCursor},set:n=>{var r;(r=this._currentLink)!=null&&r.state&&this._currentLink.state.decorations.pointerCursor!==n&&(this._currentLink.state.decorations.pointerCursor=n,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",n))}},underline:{get:()=>{var n,r;return(r=(n=this._currentLink)==null?void 0:n.state)==null?void 0:r.decorations.underline},set:n=>{var r,i,o;(r=this._currentLink)!=null&&r.state&&((o=(i=this._currentLink)==null?void 0:i.state)==null?void 0:o.decorations.underline)!==n&&(this._currentLink.state.decorations.underline=n,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,n))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(n=>{if(!this._currentLink)return;let r=n.start===0?0:n.start+1+this._bufferService.buffer.ydisp,i=this._bufferService.buffer.ydisp+1+n.end;if(this._currentLink.link.range.start.y>=r&&this._currentLink.link.range.end.y<=i&&(this._clearCurrentLink(r,i),this._lastMouseEvent)){let o=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);o&&this._askForLink(o,!1)}})))}_linkHover(e,t,n){var r;(r=this._currentLink)!=null&&r.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),t.hover&&t.hover(n,t.text)}_fireUnderlineEvent(e,t){let n=e.range,r=this._bufferService.buffer.ydisp,i=this._createLinkUnderlineEvent(n.start.x-1,n.start.y-r-1,n.end.x,n.end.y-r-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(i)}_linkLeave(e,t,n){var r;(r=this._currentLink)!=null&&r.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),t.leave&&t.leave(n,t.text)}_linkAtPosition(e,t){let n=e.range.start.y*this._bufferService.cols+e.range.start.x,r=e.range.end.y*this._bufferService.cols+e.range.end.x,i=t.y*this._bufferService.cols+t.x;return n<=i&&i<=r}_positionFromMouseEvent(e,t,n){let r=n.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(r)return{x:r[0],y:r[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,n,r,i){return{x1:e,y1:t,x2:n,y2:r,cols:this._bufferService.cols,fg:i}}};cy=or([ct(1,Rb),ct(2,_s),ct(3,vi),ct(4,a4)],cy);function bQ(e,t){return e.text===t.text&&e.range.start.x===t.range.start.x&&e.range.start.y===t.range.start.y&&e.range.end.x===t.range.end.x&&e.range.end.y===t.range.end.y}var _Q=class extends dQ{constructor(e={}){super(e),this._linkifier=this._register(new tc),this.browser=k4,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new tc),this._onCursorMove=this._register(new Ue),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new Ue),this.onKey=this._onKey.event,this._onRender=this._register(new Ue),this.onRender=this._onRender.event,this._onSelectionChange=this._register(new Ue),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new Ue),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new Ue),this.onBell=this._onBell.event,this._onFocus=this._register(new Ue),this._onBlur=this._register(new Ue),this._onA11yCharEmitter=this._register(new Ue),this._onA11yTabEmitter=this._register(new Ue),this._onWillOpen=this._register(new Ue),this._setup(),this._decorationService=this._instantiationService.createInstance(pQ),this._instantiationService.setService(td,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(cJ),this._instantiationService.setService(a4,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(P0)),this._register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this._register(this._inputHandler.onRequestRefreshRows(t=>this.refresh((t==null?void 0:t.start)??0,(t==null?void 0:t.end)??this.rows-1))),this._register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this._register(this._inputHandler.onRequestReset(()=>this.reset())),this._register(this._inputHandler.onRequestWindowsOptionsReport(t=>this._reportWindowsOptions(t))),this._register(this._inputHandler.onColor(t=>this._handleColorEvent(t))),this._register(Kr.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register(Kr.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register(Kr.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register(Kr.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(t=>this._afterResize(t.cols,t.rows))),this._register(Kn(()=>{var t,n;this._customKeyEventHandler=void 0,(n=(t=this.element)==null?void 0:t.parentNode)==null||n.removeChild(this.element)}))}get linkifier(){return this._linkifier.value}get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}_handleColorEvent(e){if(this._themeService)for(let t of e){let n,r="";switch(t.index){case 256:n="foreground",r="10";break;case 257:n="background",r="11";break;case 258:n="cursor",r="12";break;default:n="ansi",r="4;"+t.index}switch(t.type){case 0:let i=Vn.toColorRGB(n==="ansi"?this._themeService.colors.ansi[t.index]:this._themeService.colors[n]);this.coreService.triggerDataEvent(`${Pe.ESC}]${r};${oQ(i)}${x4.ST}`);break;case 1:if(n==="ansi")this._themeService.modifyColors(o=>o.ansi[t.index]=vr.toColor(...t.color));else{let o=n;this._themeService.modifyColors(a=>a[o]=vr.toColor(...t.color))}break;case 2:this._themeService.restoreColor(t.index);break}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(If,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Pe.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var e;return(e=this.textarea)==null?void 0:e.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Pe.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;let n=Math.min(this.buffer.x,this.cols-1),r=this._renderService.dimensions.css.cell.height,i=t.getWidth(n),o=this._renderService.dimensions.css.cell.width*i,a=this.buffer.y*this._renderService.dimensions.css.cell.height,c=n*this._renderService.dimensions.css.cell.width;this.textarea.style.left=c+"px",this.textarea.style.top=a+"px",this.textarea.style.width=o+"px",this.textarea.style.height=r+"px",this.textarea.style.lineHeight=r+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this._register(Vt(this.element,"copy",t=>{this.hasSelection()&&xX(t,this._selectionService)}));let e=t=>EX(t,this.textarea,this.coreService,this.optionsService);this._register(Vt(this.textarea,"paste",e)),this._register(Vt(this.element,"paste",e)),$4?this._register(Vt(this.element,"mousedown",t=>{t.button===2&&_x(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(Vt(this.element,"contextmenu",t=>{_x(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),jb&&this._register(Vt(this.element,"auxclick",t=>{t.button===1&&Q3(t,this.textarea,this.screenElement)}))}_bindKeys(){this._register(Vt(this.textarea,"keyup",e=>this._keyUp(e),!0)),this._register(Vt(this.textarea,"keydown",e=>this._keyDown(e),!0)),this._register(Vt(this.textarea,"keypress",e=>this._keyPress(e),!0)),this._register(Vt(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this._register(Vt(this.textarea,"compositionupdate",e=>this._compositionHelper.compositionupdate(e))),this._register(Vt(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this._register(Vt(this.textarea,"input",e=>this._inputEvent(e),!0)),this._register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(e){var i;if(!e)throw new Error("Terminal requires a parent element.");if(e.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((i=this.element)==null?void 0:i.ownerDocument.defaultView)&&this._coreBrowserService){this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView);return}this._document=e.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),e.appendChild(this.element);let t=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),t.appendChild(this._viewportElement),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._register(Vt(this.screenElement,"mousemove",o=>this.updateCursorStyle(o))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement);let n=this.textarea=this._document.createElement("textarea");this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",$0.get()),P4||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._register(this.optionsService.onSpecificOptionChange("disableStdin",()=>n.readOnly=this.optionsService.rawOptions.disableStdin)),this.textarea.readOnly=this.optionsService.rawOptions.disableStdin,this._coreBrowserService=this._register(this._instantiationService.createInstance(aJ,this.textarea,e.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(bs,this._coreBrowserService),this._register(Vt(this.textarea,"focus",o=>this._handleTextAreaFocus(o))),this._register(Vt(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(J0,this._document,this._helperContainer),this._instantiationService.setService(Sm,this._charSizeService),this._themeService=this._instantiationService.createInstance(ty),this._instantiationService.setService(cc,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(Tf),this._instantiationService.setService(s4,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance(Z0,this.rows,this.screenElement)),this._instantiationService.setService(_s,this._renderService),this._register(this._renderService.onRenderedViewportChange(o=>this._onRender.fire(o))),this.onResize(o=>this._renderService.resize(o.cols,o.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(G0,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(Q0),this._instantiationService.setService(Rb,this._mouseService);let r=this._linkifier.value=this._register(this._instantiationService.createInstance(cy,this.screenElement));this.element.appendChild(t);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this._register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this._register(this.onBlur(()=>this._renderService.handleBlur())),this._register(this.onFocus(()=>this._renderService.handleFocus())),this._viewport=this._register(this._instantiationService.createInstance(q0,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(o=>{super.scrollLines(o,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(ey,this.element,this.screenElement,r)),this._instantiationService.setService(NX,this._selectionService),this._register(this._selectionService.onRequestScrollLines(o=>this.scrollLines(o.amount,o.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(o=>this._renderService.handleSelectionChanged(o.start,o.end,o.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(o=>{this.textarea.value=o,this.textarea.focus(),this.textarea.select()})),this._register(Kr.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{var o;this._selectionService.refresh(),(o=this._viewport)==null||o.queueSync()})),this._register(this._instantiationService.createInstance(K0,this.screenElement)),this._register(Vt(this.element,"mousedown",o=>this._selectionService.handleMouseDown(o))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(If,this)),this._register(this.optionsService.onSpecificOptionChange("screenReaderMode",o=>this._handleScreenReaderModeOptionChange(o))),this.options.overviewRuler.width&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(Rf,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRuler",o=>{!this._overviewRulerRenderer&&o&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(Rf,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(Y0,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let e=this,t=this.element;function n(o){var d,f,m,g,v;let a=e._mouseService.getMouseReportCoords(o,e.screenElement);if(!a)return!1;let c,u;switch(o.overrideType||o.type){case"mousemove":u=32,o.buttons===void 0?(c=3,o.button!==void 0&&(c=o.button<3?o.button:3)):c=o.buttons&1?0:o.buttons&4?1:o.buttons&2?2:3;break;case"mouseup":u=0,c=o.button<3?o.button:3;break;case"mousedown":u=1,c=o.button<3?o.button:3;break;case"wheel":if(e._customWheelEventHandler&&e._customWheelEventHandler(o)===!1)return!1;let y=o.deltaY;if(y===0||e.coreMouseService.consumeWheelEvent(o,(g=(m=(f=(d=e._renderService)==null?void 0:d.dimensions)==null?void 0:f.device)==null?void 0:m.cell)==null?void 0:g.height,(v=e._coreBrowserService)==null?void 0:v.dpr)===0)return!1;u=y<0?0:1,c=4;break;default:return!1}return u===void 0||c===void 0||c>4?!1:e.coreMouseService.triggerMouseEvent({col:a.col,row:a.row,x:a.x,y:a.y,button:c,action:u,ctrl:o.ctrlKey,alt:o.altKey,shift:o.shiftKey})}let r={mouseup:null,wheel:null,mousedrag:null,mousemove:null},i={mouseup:o=>(n(o),o.buttons||(this._document.removeEventListener("mouseup",r.mouseup),r.mousedrag&&this._document.removeEventListener("mousemove",r.mousedrag)),this.cancel(o)),wheel:o=>(n(o),this.cancel(o,!0)),mousedrag:o=>{o.buttons&&n(o)},mousemove:o=>{o.buttons||n(o)}};this._register(this.coreMouseService.onProtocolChange(o=>{o?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(o)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),o&8?r.mousemove||(t.addEventListener("mousemove",i.mousemove),r.mousemove=i.mousemove):(t.removeEventListener("mousemove",r.mousemove),r.mousemove=null),o&16?r.wheel||(t.addEventListener("wheel",i.wheel,{passive:!1}),r.wheel=i.wheel):(t.removeEventListener("wheel",r.wheel),r.wheel=null),o&2?r.mouseup||(r.mouseup=i.mouseup):(this._document.removeEventListener("mouseup",r.mouseup),r.mouseup=null),o&4?r.mousedrag||(r.mousedrag=i.mousedrag):(this._document.removeEventListener("mousemove",r.mousedrag),r.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this._register(Vt(t,"mousedown",o=>{if(o.preventDefault(),this.focus(),!(!this.coreMouseService.areMouseEventsActive||this._selectionService.shouldForceSelection(o)))return n(o),r.mouseup&&this._document.addEventListener("mouseup",r.mouseup),r.mousedrag&&this._document.addEventListener("mousemove",r.mousedrag),this.cancel(o)})),this._register(Vt(t,"wheel",o=>{var a,c,u,d,f;if(!r.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(o)===!1)return!1;if(!this.buffer.hasScrollback){if(o.deltaY===0)return!1;if(e.coreMouseService.consumeWheelEvent(o,(d=(u=(c=(a=e._renderService)==null?void 0:a.dimensions)==null?void 0:c.device)==null?void 0:u.cell)==null?void 0:d.height,(f=e._coreBrowserService)==null?void 0:f.dpr)===0)return this.cancel(o,!0);let m=Pe.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(o.deltaY<0?"A":"B");return this.coreService.triggerDataEvent(m,!0),this.cancel(o,!0)}}},{passive:!1}))}refresh(e,t){var n;(n=this._renderService)==null||n.refreshRows(e,t)}updateCursorStyle(e){var t;(t=this._selectionService)!=null&&t.shouldColumnSelect(e)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(e,t){this._viewport?this._viewport.scrollLines(e):super.scrollLines(e,t),this.refresh(0,this.rows-1)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){e&&this._viewport?this._viewport.scrollToLine(this.buffer.ybase,!0):this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}paste(e){J3(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");let t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return this._selectionService?this._selectionService.hasSelection:!1}select(e,t,n){this._selectionService.setSelection(e,t,n)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(!(!this._selectionService||!this._selectionService.hasSelection))return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var e;(e=this._selectionService)==null||e.clearSelection()}selectAll(){var e;(e=this._selectionService)==null||e.selectAll()}selectLines(e,t){var n;(n=this._selectionService)==null||n.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;let t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(!0),!1;!t&&(e.key==="Dead"||e.key==="AltGraph")&&(this._unprocessedDeadKey=!0);let n=fQ(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),n.type===3||n.type===2){let r=this.rows-1;return this.scrollLines(n.type===2?-r:r),this.cancel(e,!0)}if(n.type===1&&this.selectAll(),this._isThirdLevelShift(this.browser,e)||(n.cancel&&this.cancel(e,!0),!n.key)||e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.key.length===1&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)return!0;if(this._unprocessedDeadKey)return this._unprocessedDeadKey=!1,!0;if((n.key===Pe.ETX||n.key===Pe.CR)&&(this.textarea.value=""),this._onKey.fire({key:n.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(n.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey)return this.cancel(e,!0);this._keyDownHandled=!0}_isThirdLevelShift(e,t){let n=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState("AltGraph");return t.type==="keypress"?n:n&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,!(this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)&&(SQ(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(e.which===null||e.which===void 0)t=e.keyCode;else if(e.which!==0&&e.charCode!==0)t=e.which;else return!1;return!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)?!1:(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,!0)}_inputEvent(e){if(e.data&&e.inputType==="insertText"&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){if(e===this.cols&&t===this.rows){this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure();return}super.resize(e,t)}_afterResize(e,t){var n;(n=this._charSizeService)==null||n.measure()}clear(){if(!(this.buffer.ybase===0&&this.buffer.y===0)){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(pr));this._onScroll.fire({position:this.buffer.ydisp}),this.refresh(0,this.rows-1)}}reset(){var t;this.options.rows=this.rows,this.options.cols=this.cols;let e=this._customKeyEventHandler;this._setup(),super.reset(),(t=this._selectionService)==null||t.reset(),this._decorationService.reset(),this._customKeyEventHandler=e,this.refresh(0,this.rows-1)}clearTextureAtlas(){var e;(e=this._renderService)==null||e.clearTextureAtlas()}_reportFocus(){var e;(e=this.element)!=null&&e.classList.contains("focus")?this.coreService.triggerDataEvent(Pe.ESC+"[I"):this.coreService.triggerDataEvent(Pe.ESC+"[O")}_reportWindowsOptions(e){if(this._renderService)switch(e){case 0:let t=this._renderService.dimensions.css.canvas.width.toFixed(0),n=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${Pe.ESC}[4;${n};${t}t`);break;case 1:let r=this._renderService.dimensions.css.cell.width.toFixed(0),i=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${Pe.ESC}[6;${i};${r}t`);break}}cancel(e,t){if(!(!this.options.cancelEvents&&!t))return e.preventDefault(),e.stopPropagation(),!1}};function SQ(e){return e.keyCode===16||e.keyCode===17||e.keyCode===18}var CQ=class{constructor(){this._addons=[]}dispose(){for(let e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){let n={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(n),t.dispose=()=>this._wrappedAddonDispose(n),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let n=0;n<this._addons.length;n++)if(this._addons[n]===e){t=n;break}if(t===-1)throw new Error("Could not dispose an addon that has not been loaded");e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(t,1)}},wQ=class{constructor(e){this._line=e}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new uo)}translateToString(e,t,n){return this._line.translateToString(e,t,n)}},d2=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(e){let t=this._buffer.lines.get(e);if(t)return new wQ(t)}getNullCell(){return new uo}},xQ=class extends en{constructor(e){super(),this._core=e,this._onBufferChange=this._register(new Ue),this.onBufferChange=this._onBufferChange.event,this._normal=new d2(this._core.buffers.normal,"normal"),this._alternate=new d2(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}},EQ=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,n=>t(n.toArray()))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,(n,r)=>t(n,r.toArray()))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}},kQ=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}},$Q=["cols","rows"],Ao=0,RQ=class extends en{constructor(e){super(),this._core=this._register(new _Q(e)),this._addonManager=this._register(new CQ),this._publicOptions={...this._core.options};let t=r=>this._core.options[r],n=(r,i)=>{this._checkReadonlyOptions(r),this._core.options[r]=i};for(let r in this._core.options){let i={get:t.bind(this,r),set:n.bind(this,r)};Object.defineProperty(this._publicOptions,r,i)}}_checkReadonlyOptions(e){if($Q.includes(e))throw new Error(`Option "${e}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new EQ(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new kQ(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this._register(new xQ(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let e=this._core.coreService.decPrivateModes,t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any";break}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,synchronizedOutputMode:e.synchronizedOutput,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(let t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}input(e,t=!0){this._core.input(e,t)}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(e=0){return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){return this._checkProposedApi(),this._verifyPositiveIntegers(e.x??0,e.width??0,e.height??0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,n){this._verifyIntegers(e,t,n),this._core.select(e,t,n)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write(`\r
601
+ `,t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return $0.get()},set promptLabel(e){$0.set(e)},get tooMuchOutput(){return R0.get()},set tooMuchOutput(e){R0.set(e)}}}_verifyIntegers(...e){for(Ao of e)if(Ao===1/0||isNaN(Ao)||Ao%1!==0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...e){for(Ao of e)if(Ao&&(Ao===1/0||isNaN(Ao)||Ao%1!==0||Ao<0))throw new Error("This API only accepts positive integers")}};/**
602
+ * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
603
+ * @license MIT
604
+ *
605
+ * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
606
+ * @license MIT
607
+ *
608
+ * Originally forked from (with the author's permission):
609
+ * Fabrice Bellard's javascript vt100 for jslinux:
610
+ * http://bellard.org/jslinux/
611
+ * Copyright (c) 2011 Fabrice Bellard
612
+ */var TQ=2,PQ=1,OQ=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){var m;if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:((m=this._terminal.options.overviewRuler)==null?void 0:m.width)||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue("height")),i=Math.max(0,parseInt(n.getPropertyValue("width"))),o=window.getComputedStyle(this._terminal.element),a={top:parseInt(o.getPropertyValue("padding-top")),bottom:parseInt(o.getPropertyValue("padding-bottom")),right:parseInt(o.getPropertyValue("padding-right")),left:parseInt(o.getPropertyValue("padding-left"))},c=a.top+a.bottom,u=a.right+a.left,d=r-c,f=i-u-t;return{cols:Math.max(TQ,Math.floor(f/e.css.cell.width)),rows:Math.max(PQ,Math.floor(d/e.css.cell.height))}}};const IQ="_terminalPanel_821xm_1",NQ="_terminalContainer_821xm_8",MQ="_virtualKeybar_821xm_14",zQ="_virtualKey_821xm_14",Eh={terminalPanel:IQ,terminalContainer:NQ,virtualKeybar:MQ,virtualKey:zQ},h2=/Android|iPhone|iPad|iPod|Mobile/i.test(navigator.userAgent),jQ=[{label:"↑",seq:"\x1B[A"},{label:"↓",seq:"\x1B[B"},{label:"←",seq:"\x1B[D"},{label:"→",seq:"\x1B[C"},{label:"Enter",seq:"\r"},{label:"Tab",seq:" "},{label:"Esc",seq:"\x1B"},{label:"Ctrl+C",seq:""}];class D4 extends J.Component{constructor(n){super(n);kt(this,"handleVirtualKey",n=>{var r;this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify({type:"input",data:n})),(r=this.terminal)==null||r.focus()});this.containerRef=J.createRef(),this.terminal=null,this.fitAddon=null,this.ws=null,this.resizeObserver=null}componentDidMount(){this.initTerminal(),this.connectWebSocket(),this.setupResizeObserver()}componentWillUnmount(){this.ws&&(this.ws.close(),this.ws=null),this.resizeObserver&&this.resizeObserver.disconnect(),this.terminal&&this.terminal.dispose()}initTerminal(){this.terminal=new RQ({cursorBlink:!0,fontSize:h2?11:13,fontFamily:'Menlo, Monaco, "Courier New", monospace',theme:{background:"#0a0a0a",foreground:"#d4d4d4",cursor:"#d4d4d4",selectionBackground:"#264f78"},allowProposedApi:!0}),this.fitAddon=new OQ,this.terminal.loadAddon(this.fitAddon),this.terminal.open(this.containerRef.current),requestAnimationFrame(()=>{this.fitAddon.fit()}),this.terminal.onData(n=>{this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify({type:"input",data:n}))})}connectWebSocket(){const r=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/terminal`;this.ws=new WebSocket(r),this.ws.onmessage=i=>{try{const o=JSON.parse(i.data);o.type==="data"?this.terminal.write(o.data):o.type==="exit"?this.terminal.write(`\r
613
+ \x1B[33m${Ce("ui.terminal.exited",{code:o.exitCode??"?"})}\x1B[0m\r
614
+ `):o.type==="state"&&!o.running&&o.exitCode!==null&&this.terminal.write(`\x1B[33m${Ce("ui.terminal.exited",{code:o.exitCode})}\x1B[0m\r
615
+ `)}catch{}},this.ws.onclose=()=>{setTimeout(()=>{this.containerRef.current&&this.connectWebSocket()},2e3)},this.ws.onopen=()=>{this.sendResize()}}sendResize(){this.ws&&this.ws.readyState===WebSocket.OPEN&&this.terminal&&this.ws.send(JSON.stringify({type:"resize",cols:this.terminal.cols,rows:this.terminal.rows}))}setupResizeObserver(){this.resizeObserver=new ResizeObserver(()=>{if(this.fitAddon&&this.containerRef.current)try{this.fitAddon.fit(),this.sendResize()}catch{}}),this.containerRef.current&&this.resizeObserver.observe(this.containerRef.current)}render(){return x.jsxs("div",{className:Eh.terminalPanel,children:[x.jsx("div",{ref:this.containerRef,className:Eh.terminalContainer}),h2&&x.jsx("div",{className:Eh.virtualKeybar,children:jQ.map(n=>x.jsx("button",{className:Eh.virtualKey,onTouchStart:r=>{r.preventDefault(),this.handleVirtualKey(n.seq)},onClick:()=>this.handleVirtualKey(n.seq),children:n.label},n.label))})]})}}const BQ="_centerEmpty_s1mzc_1",LQ="_container_s1mzc_8",AQ="_sessionDividerText_s1mzc_16",DQ="_lastResponseLabel_s1mzc_21",HQ="_splitContainer_s1mzc_25",FQ="_chatSection_s1mzc_32",WQ="_vResizer_s1mzc_39",VQ="_chatInputBar_s1mzc_53",UQ="_chatInputWrapper_s1mzc_63",qQ="_chatTextareaWrap_s1mzc_78",KQ="_chatTextarea_s1mzc_78",GQ="_chatInputHint_s1mzc_102",XQ="_chatSendBtn_s1mzc_109",YQ="_messageListWrap_s1mzc_138",JQ="_stickyBottomBtn_s1mzc_146",QQ="_ptyPromptBubble_s1mzc_172",ZQ="_ptyPromptResolved_s1mzc_181",eZ="_ptyPromptQuestion_s1mzc_190",tZ="_ptyPromptOptions_s1mzc_197",nZ="_ptyPromptOption_s1mzc_197",rZ="_ptyPromptOptionPrimary_s1mzc_221",iZ="_ptyPromptOptionChosen_s1mzc_239",oZ="_ptyPromptOptionDimmed_s1mzc_250",sZ="_ghostText_s1mzc_261",aZ="_suggestionChip_s1mzc_277",lZ="_suggestionChipText_s1mzc_293",cZ="_suggestionChipAction_s1mzc_302",En={centerEmpty:BQ,container:LQ,sessionDividerText:AQ,lastResponseLabel:DQ,splitContainer:HQ,chatSection:FQ,vResizer:WQ,chatInputBar:VQ,chatInputWrapper:UQ,chatTextareaWrap:qQ,chatTextarea:KQ,chatInputHint:GQ,chatSendBtn:XQ,messageListWrap:YQ,stickyBottomBtn:JQ,ptyPromptBubble:QQ,ptyPromptResolved:ZQ,ptyPromptQuestion:eZ,ptyPromptOptions:tZ,ptyPromptOption:nZ,ptyPromptOptionPrimary:rZ,ptyPromptOptionChosen:iZ,ptyPromptOptionDimmed:oZ,ghostText:sZ,suggestionChip:aZ,suggestionChipText:lZ,suggestionChipAction:cZ},{Text:f2}=No,uZ=20;function dZ(){return 100+Math.random()*50}function m2(e){const t={};for(const r of e)if(r.role==="assistant"&&Array.isArray(r.content))for(const i of r.content)i.type==="tool_use"&&(t[i.id]=i);const n={};for(const r of e)if(r.role==="user"&&Array.isArray(r.content)){for(const i of r.content)if(i.type==="tool_result"){const o=t[i.tool_use_id];let a=Ce("ui.toolReturn"),c=null,u=null;if(o)if(c=o.name,u=o.input,o.name==="Task"&&o.input){const d=o.input.subagent_type||"",f=o.input.description||"";a=`SubAgent: ${d}${f?" — "+f:""}`}else a=Ce("ui.toolReturnNamed",{name:o.name});n[i.tool_use_id]={label:a,toolName:c,toolInput:u,resultText:I3(i)}}}return{toolUseMap:t,toolResultMap:n}}class hZ extends J.Component{constructor(n){super(n);kt(this,"handleStickToBottom",()=>{this.setState({stickyBottom:!0},()=>{const n=this.containerRef.current;n&&(n.scrollTop=n.scrollHeight)})});kt(this,"handlePromptOptionClick",n=>{const r=this._inputWs;if(!r||r.readyState!==WebSocket.OPEN)return;const i=this.state.ptyPrompt;if(!i)return;const o=i.options,a=o.findIndex(g=>g.number===n);let c=o.findIndex(g=>g.selected);c<0&&(c=0);const u=a-c,d=u>0?"\x1B[B":"\x1B[A",f=Math.abs(u),m=g=>{g<f?(r.send(JSON.stringify({type:"input",data:d})),setTimeout(()=>m(g+1),30)):setTimeout(()=>{r.readyState===WebSocket.OPEN&&r.send(JSON.stringify({type:"input",data:"\r"}))},50)};m(0),this.setState(g=>{const v=g.ptyPromptHistory.slice(),y=v[v.length-1];return y&&y.status==="active"&&(v[v.length-1]={...y,status:"answered",selectedNumber:n}),{ptyPrompt:null,ptyPromptHistory:v}}),this._ptyBuffer="",this._ptyDebounceTimer&&clearTimeout(this._ptyDebounceTimer)});kt(this,"handleInputSend",()=>{const n=this._inputRef.current;if(!n)return;const r=n.value.trim();r&&this._inputWs&&this._inputWs.readyState===WebSocket.OPEN&&(this._inputWs.send(JSON.stringify({type:"input",data:r})),setTimeout(()=>{this._inputWs&&this._inputWs.readyState===WebSocket.OPEN&&this._inputWs.send(JSON.stringify({type:"input",data:"\r"}))},50),n.value="",n.style.height="auto",this.setState({inputEmpty:!0,pendingInput:r,inputSuggestion:null},()=>this.scrollToBottom()))});kt(this,"handleInputKeyDown",n=>{if(n.key==="Tab"&&this.state.inputSuggestion){n.preventDefault();const r=this._inputRef.current;r&&(r.value=this.state.inputSuggestion,r.style.height="auto",r.style.height=Math.min(r.scrollHeight,120)+"px"),this.setState({inputSuggestion:null,inputEmpty:!1});return}n.key==="Enter"&&!n.shiftKey&&(n.preventDefault(),this.handleInputSend())});kt(this,"handleInputChange",n=>{const r=n.target;r.style.height="auto",r.style.height=Math.min(r.scrollHeight,120)+"px";const i=!r.value.trim();this.setState({inputEmpty:i}),this.state.inputSuggestion&&!i&&this.setState({inputSuggestion:null})});kt(this,"handleSuggestionToTerminal",()=>{const n=this.state.inputSuggestion;!n||!this._inputWs||this._inputWs.readyState!==WebSocket.OPEN||(this._inputWs.send(JSON.stringify({type:"input",data:n})),setTimeout(()=>{this._inputWs&&this._inputWs.readyState===WebSocket.OPEN&&this._inputWs.send(JSON.stringify({type:"input",data:"\r"}))},50),this.setState({inputSuggestion:null,pendingInput:n},()=>this.scrollToBottom()))});kt(this,"handleSplitMouseDown",n=>{n.preventDefault(),this._resizing=!0;const r=o=>{if(!this._resizing)return;const a=this.splitContainerRef.current;if(!a)return;const c=a.getBoundingClientRect(),u=(o.clientX-c.left)/c.width,d=Math.min(.85,Math.max(.25,u));this.setState({splitRatio:d})},i=()=>{this._resizing=!1,document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",i),document.body.style.cursor="",document.body.style.userSelect=""};document.addEventListener("mousemove",r),document.addEventListener("mouseup",i),document.body.style.cursor="col-resize",document.body.style.userSelect="none"});this.containerRef=J.createRef(),this.splitContainerRef=J.createRef(),this.state={visibleCount:0,loading:!1,allItems:[],highlightTs:null,highlightFading:!1,splitRatio:.6,inputEmpty:!0,pendingInput:null,stickyBottom:!0,ptyPrompt:null,ptyPromptHistory:[],inputSuggestion:null},this._queueTimer=null,this._prevItemsLen=0,this._scrollTargetIdx=null,this._scrollTargetRef=J.createRef(),this._scrollFadeTimer=null,this._resizing=!1,this._inputWs=null,this._inputRef=J.createRef(),this._ptyBuffer="",this._ptyDebounceTimer=null}componentDidMount(){this.startRender(),this.props.cliMode&&this.connectInputWs(),this._bindStickyScroll()}componentDidUpdate(n){if(n.mainAgentSessions!==this.props.mainAgentSessions)this.startRender(),this.state.pendingInput&&this.setState({pendingInput:null}),this._updateSuggestion();else if(n.collapseToolResults!==this.props.collapseToolResults||n.expandThinking!==this.props.expandThinking){const r=this.buildAllItems();this.setState({allItems:r,visibleCount:r.length})}if(!n.scrollToTimestamp&&this.props.scrollToTimestamp){const r=this.buildAllItems();this.setState({allItems:r,visibleCount:r.length},()=>this.scrollToBottom())}!n.cliMode&&this.props.cliMode&&this.connectInputWs(),this._rebindStickyEl()}componentWillUnmount(){this._queueTimer&&clearTimeout(this._queueTimer),this._fadeClearTimer&&clearTimeout(this._fadeClearTimer),this._ptyDebounceTimer&&clearTimeout(this._ptyDebounceTimer),this._unbindScrollFade(),this._unbindStickyScroll(),this._inputWs&&(this._inputWs.close(),this._inputWs=null)}startRender(){this._queueTimer&&clearTimeout(this._queueTimer);const n=this.buildAllItems(),r=this._prevItemsLen;this._prevItemsLen=n.length;const i=n.length-r;if(i<=0||r>0&&i<=3){this.setState({allItems:n,visibleCount:n.length,loading:!1},()=>this.scrollToBottom());return}if(n.length>uZ)this.setState({allItems:n,visibleCount:0,loading:!0}),this._queueTimer=setTimeout(()=>{this.setState({visibleCount:n.length,loading:!1},()=>this.scrollToBottom())},300);else{const o=Math.max(0,r);this.setState({allItems:n,visibleCount:o,loading:!1}),this.queueNext(o,n.length)}}queueNext(n,r){n>=r||(this._queueTimer=setTimeout(()=>{this.setState({visibleCount:n+1},()=>{this.scrollToBottom(),this.queueNext(n+1,r)})},dZ()))}_isNearBottom(){const n=this.containerRef.current;return n?n.scrollHeight-n.scrollTop-n.clientHeight<=30:!0}scrollToBottom(){if(this._scrollTargetRef.current){const n=this._scrollTargetRef.current,r=this.containerRef.current;r&&n.offsetHeight>r.clientHeight?n.scrollIntoView({block:"start",behavior:"instant"}):n.scrollIntoView({block:"center",behavior:"instant"});const i=this.props.scrollToTimestamp;this._scrollTargetRef=J.createRef(),i&&(this.setState({highlightTs:i,highlightFading:!1}),this._bindScrollFade()),this.props.onScrollTsDone&&this.props.onScrollTsDone();return}if(this.state.stickyBottom){const n=this.containerRef.current;n&&(n.scrollTop=n.scrollHeight)}}_bindStickyScroll(){this._onStickyScroll=()=>{if(this._stickyScrollLock)return;const n=this.containerRef.current;if(!n)return;const r=n.scrollHeight-n.scrollTop-n.clientHeight;this.state.stickyBottom&&r>30?this.setState({stickyBottom:!1}):!this.state.stickyBottom&&r<=5&&this.setState({stickyBottom:!0})},this._rebindStickyEl()}_rebindStickyEl(){const n=this.containerRef.current;n!==this._stickyBoundEl&&(this._stickyBoundEl&&this._stickyBoundEl.removeEventListener("scroll",this._onStickyScroll),this._stickyBoundEl=n,n&&n.addEventListener("scroll",this._onStickyScroll))}_unbindStickyScroll(){this._stickyBoundEl&&this._onStickyScroll&&(this._stickyBoundEl.removeEventListener("scroll",this._onStickyScroll),this._stickyBoundEl=null)}_bindScrollFade(){this._unbindScrollFade();const n=this.containerRef.current;n&&(this._scrollFadeIgnoreFirst=!0,this._onScrollFade=()=>{if(this._scrollFadeIgnoreFirst){this._scrollFadeIgnoreFirst=!1;return}this.setState({highlightFading:!0}),this._fadeClearTimer=setTimeout(()=>{this.setState({highlightTs:null,highlightFading:!1})},2e3),this._unbindScrollFade()},n.addEventListener("scroll",this._onScrollFade))}_unbindScrollFade(){this._onScrollFade&&this.containerRef.current&&(this.containerRef.current.removeEventListener("scroll",this._onScrollFade),this._onScrollFade=null)}renderSessionMessages(n,r,i,o){var v;const{userProfile:a,collapseToolResults:c,expandThinking:u,onViewRequest:d}=this.props,{toolUseMap:f,toolResultMap:m}=m2(n),g=[];for(let y=0;y<n.length;y++){const S=n[y],_=S.content,C=S._timestamp||null,E=C?o[C]:void 0,k=E!=null&&d?{requestIndex:E,onViewRequest:d}:{};if(S.role==="user"){if(Array.isArray(_)){const $=_.find(T=>T.type==="text"&&/^\[SUGGESTION MODE:/i.test((T.text||"").trim())),P=_.filter(T=>T.type==="tool_result");if($&&P.length>0){let T=null,O={};for(const N of P){const I=f[N.tool_use_id];if(I&&I.name==="AskUserQuestion"&&((v=I.input)!=null&&v.questions)){T=I.input.questions;const z=I3(N);try{O=JSON.parse(z).answers||{}}catch{}break}}T&&g.push(x.jsx(Co,{role:"user-selection",questions:T,answers:O,timestamp:C,userProfile:a,...k},`${r}-selection-${y}`))}else{const{commands:T,textBlocks:O,skillBlocks:N}=P3(_);for(let I=0;I<T.length;I++)g.push(x.jsx(Co,{role:"user",text:T[I],timestamp:C,userProfile:a,modelInfo:i,...k},`${r}-cmd-${y}-${I}`));for(const I of N){const z=I.text.match(/^#\s+(.+)$/m),L=z?z[1]:"Skill";g.push(x.jsx(Co,{role:"skill-loaded",text:I.text,skillName:L,timestamp:C,...k},`${r}-skill-${y}`))}for(let I=0;I<O.length;I++){const z=/^Implement the following plan:/i.test((O[I].text||"").trim());g.push(x.jsx(Co,{role:z?"plan-prompt":"user",text:O[I].text,timestamp:C,userProfile:a,modelInfo:i,...k},`${r}-user-${y}-${I}`))}}}else if(typeof _=="string"&&!fb(_)){const $=/^Implement the following plan:/i.test(_.trim());g.push(x.jsx(Co,{role:$?"plan-prompt":"user",text:_,timestamp:C,userProfile:a,modelInfo:i,...k},`${r}-user-${y}`))}}else S.role==="assistant"&&(Array.isArray(_)?g.push(x.jsx(Co,{role:"assistant",content:_,toolResultMap:m,timestamp:C,modelInfo:i,collapseToolResults:c,expandThinking:u,...k},`${r}-asst-${y}`)):typeof _=="string"&&g.push(x.jsx(Co,{role:"assistant",content:[{type:"text",text:_}],toolResultMap:m,timestamp:C,modelInfo:i,collapseToolResults:c,expandThinking:u,...k},`${r}-asst-${y}`)))}return g}buildAllItems(){var S,_,C,E;const{mainAgentSessions:n,requests:r,collapseToolResults:i,expandThinking:o,onViewRequest:a}=this.props;if(!n||n.length===0)return[];const c={};if(r)for(let k=0;k<r.length;k++)qr(r[k])&&r[k].timestamp&&(c[r[k].timestamp]=k);let u=null;if(r){for(let k=r.length-1;k>=0;k--)if(qr(r[k])&&((S=r[k].body)!=null&&S.model)){u=r[k].body.model;break}}const d=tW(u),f=[],m={},g=[];if(r)for(let k=0;k<r.length;k++){const $=r[k];if(!$.timestamp)continue;const P=za($,r[k+1]);if(P.type==="SubAgent"){const T=(C=(_=$.response)==null?void 0:_.body)==null?void 0:C.content;if(Array.isArray(T)&&T.length>0){const O=m2(((E=$.body)==null?void 0:E.messages)||[]).toolResultMap;g.push({timestamp:$.timestamp,content:T,toolResultMap:O,label:_f(P.type,P.subType),requestIndex:k})}}}let v=0;n.forEach((k,$)=>{var T,O,N,I;$>0&&f.push(x.jsx(zw,{style:{borderColor:"#333",margin:"16px 0"},children:x.jsx(f2,{className:En.sessionDividerText,children:"Session"})},`session-div-${$}`));const P=this.renderSessionMessages(k.messages,`s${$}`,d,c);for(const z of P){const L=z.props.timestamp;for(;v<g.length&&L&&g[v].timestamp<=L;){const M=g[v];M.timestamp&&(m[M.timestamp]=f.length),f.push(x.jsx(Co,{role:"sub-agent-chat",content:M.content,toolResultMap:M.toolResultMap,label:M.label,timestamp:M.timestamp,collapseToolResults:i,expandThinking:o,requestIndex:M.requestIndex,onViewRequest:a},`sub-chat-${v}`)),v++}L&&(m[L]=f.length),f.push(z)}for(;v<g.length;){const z=g[v],L=$<n.length-1&&((O=(T=n[$+1].messages)==null?void 0:T[0])==null?void 0:O._timestamp);if(L&&z.timestamp>L)break;z.timestamp&&(m[z.timestamp]=f.length),f.push(x.jsx(Co,{role:"sub-agent-chat",content:z.content,toolResultMap:z.toolResultMap,label:z.label,timestamp:z.timestamp,collapseToolResults:i,expandThinking:o,requestIndex:z.requestIndex,onViewRequest:a},`sub-chat-${v}`)),v++}if($===n.length-1&&((I=(N=k.response)==null?void 0:N.body)!=null&&I.content)){const z=k.response.body.content;Array.isArray(z)&&(f.push(x.jsx(J.Fragment,{children:x.jsx(zw,{style:{borderColor:"#2a2a2a",margin:"8px 0"},children:x.jsx(f2,{type:"secondary",className:En.lastResponseLabel,children:Ce("ui.lastResponse")})})},"resp-divider")),k.entryTimestamp&&(m[k.entryTimestamp]=f.length),f.push(x.jsx(Co,{role:"assistant",content:z,timestamp:k.entryTimestamp,modelInfo:d,collapseToolResults:i,expandThinking:o,toolResultMap:{}},"resp-asst")))}});const{scrollToTimestamp:y}=this.props;return this._scrollTargetIdx=y&&m[y]!=null?m[y]:null,this._tsItemMap=m,f}_extractSuggestion(){var u;const{mainAgentSessions:n}=this.props;if(!(n!=null&&n.length))return null;const r=n[n.length-1],i=r==null?void 0:r.response;if(!i)return null;const o=i.body;if(!o)return null;const a=o.stop_reason;if(a!=="end_turn"&&a!=="max_tokens")return null;const c=o.content;if(!Array.isArray(c))return null;for(let d=c.length-1;d>=0;d--)if(c[d].type==="text"&&((u=c[d].text)!=null&&u.trim()))return c[d].text.trim();return null}_updateSuggestion(){const n=this._extractSuggestion();this.setState({inputSuggestion:n||null})}connectInputWs(){const r=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/terminal`;this._inputWs=new WebSocket(r),this._inputWs.onmessage=i=>{try{const o=JSON.parse(i.data);o.type==="data"?this._appendPtyData(o.data):o.type==="exit"&&this._clearPtyPrompt()}catch{}},this._inputWs.onclose=()=>{setTimeout(()=>{this.splitContainerRef.current&&this.props.cliMode&&this.connectInputWs()},2e3)}}_stripAnsi(n){return n.replace(/\x1b\[[0-9;]*[A-Za-z]/g,"").replace(/\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)/g,"").replace(/\x1b[^[\]](.|$)/g,"").replace(/[\x00-\x08\x0b\x0c\x0e-\x1f]/g,"")}_appendPtyData(n){const r=this._stripAnsi(n);this._ptyBuffer+=r,this._ptyBuffer.length>4096&&(this._ptyBuffer=this._ptyBuffer.slice(-4096)),this._ptyDebounceTimer&&clearTimeout(this._ptyDebounceTimer),this._ptyDebounceTimer=setTimeout(()=>this._detectPrompt(),200)}_detectPrompt(){const r=this._ptyBuffer.match(/([^\n]*\?)\s*\n((?:\s*[❯>]?\s*\d+\.\s+[^\n]+\n?){2,})$/);if(r){const i=r[1].trim(),a=r[2].match(/\s*([❯>])?\s*(\d+)\.\s+([^\n]+)/g);if(a){const c=a.map(f=>{const m=f.match(/\s*([❯>])?\s*(\d+)\.\s+(.+)/);return{number:parseInt(m[2],10),text:m[3].trim(),selected:!!m[1]}}),u=this.state.ptyPrompt,d={question:i,options:c};u&&u.question===i?this.setState({ptyPrompt:d}):(this.setState(f=>{const m=f.ptyPromptHistory.slice();if(f.ptyPrompt){const g=m[m.length-1];g&&g.status==="active"&&(m[m.length-1]={...g,status:"dismissed"})}return m.push({...d,status:"active",selectedNumber:null,timestamp:new Date().toISOString()}),{ptyPrompt:d,ptyPromptHistory:m}}),this.scrollToBottom());return}}this.state.ptyPrompt&&this.setState(i=>{const o=i.ptyPromptHistory.slice(),a=o[o.length-1];return a&&a.status==="active"&&(o[o.length-1]={...a,status:"dismissed"}),{ptyPrompt:null,ptyPromptHistory:o}})}_clearPtyPrompt(){this._ptyBuffer="",this._ptyDebounceTimer&&clearTimeout(this._ptyDebounceTimer),this.state.ptyPrompt&&this.setState({ptyPrompt:null})}render(){const{mainAgentSessions:n,cliMode:r,terminalVisible:i}=this.props,{allItems:o,visibleCount:a,loading:c,splitRatio:u}=this.state,d=!n||n.length===0;if(d&&!r)return x.jsx("div",{className:En.centerEmpty,children:x.jsx(Pi,{description:Ce("ui.noChat")})});if(c&&!r)return x.jsx("div",{className:En.centerEmpty,children:x.jsx(Na,{size:"large"})});const f=this._scrollTargetIdx,{highlightTs:m,highlightFading:g}=this.state,v=m&&this._tsItemMap&&this._tsItemMap[m]!=null?this._tsItemMap[m]:null,y=o.slice(0,a),{pendingInput:S,stickyBottom:_,ptyPromptHistory:C}=this.state,E=r&&S?x.jsx(Co,{role:"user",text:S,timestamp:new Date().toISOString(),userProfile:this.props.userProfile},"pending-input"):null,k=_?null:x.jsxs("button",{className:En.stickyBottomBtn,onClick:this.handleStickToBottom,children:[x.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:x.jsx("polyline",{points:"6 9 12 15 18 9"})}),Ce("ui.stickyBottom")]}),$=r&&C.length>0?C.map((T,O)=>{const N=T.status==="active",I=T.status==="answered";return x.jsxs("div",{className:`${En.ptyPromptBubble}${N?"":" "+En.ptyPromptResolved}`,children:[x.jsx("div",{className:En.ptyPromptQuestion,children:T.question}),x.jsx("div",{className:En.ptyPromptOptions,children:T.options.map(z=>{const L=I&&T.selectedNumber===z.number;let M=En.ptyPromptOption;return N&&z.selected&&(M=En.ptyPromptOptionPrimary),L&&(M=En.ptyPromptOptionChosen),!N&&!L&&(M=En.ptyPromptOptionDimmed),x.jsxs("button",{className:M,disabled:!N,onClick:N?()=>this.handlePromptOptionClick(z.number):void 0,children:[z.number,". ",z.text]},z.number)})})]},`pty-prompt-${O}`)}):null,P=d||c?x.jsxs("div",{className:En.messageListWrap,children:[x.jsxs("div",{ref:this.containerRef,className:En.container,children:[!r||c?x.jsx("div",{className:En.centerEmpty,children:c?x.jsx(Na,{size:"large"}):x.jsx(Pi,{description:Ce("ui.noChat")})}):null,E,$]}),k]}):x.jsxs("div",{className:En.messageListWrap,children:[x.jsxs("div",{ref:this.containerRef,className:En.container,children:[y.map((T,O)=>{const N=O===f,I=O===v;let z=T;return I&&(z=J.cloneElement(z,{highlight:g?"fading":"active"})),N?x.jsx("div",{ref:this._scrollTargetRef,children:z},T.key+"-anchor"):z}),E,$]}),k]});return r?x.jsxs("div",{ref:this.splitContainerRef,className:En.splitContainer,children:[x.jsxs("div",{className:En.chatSection,style:i?{flex:u,minWidth:0}:{flex:1,minWidth:0},children:[P,!i&&x.jsxs("div",{className:En.chatInputBar,children:[x.jsxs("div",{className:En.chatInputWrapper,children:[x.jsxs("div",{className:En.chatTextareaWrap,children:[x.jsx("textarea",{ref:this._inputRef,className:En.chatTextarea,placeholder:this.state.inputSuggestion?"":Ce("ui.chatInput.placeholder"),rows:1,onKeyDown:this.handleInputKeyDown,onInput:this.handleInputChange}),this.state.inputSuggestion&&this.state.inputEmpty&&x.jsx("div",{className:En.ghostText,children:this.state.inputSuggestion})]}),x.jsx("div",{className:En.chatInputHint,children:this.state.inputSuggestion&&this.state.inputEmpty?Ce("ui.chatInput.hintTab"):Ce("ui.chatInput.hintEnter")})]}),x.jsx("button",{className:En.chatSendBtn,onClick:this.handleInputSend,disabled:this.state.inputEmpty,title:Ce("ui.chatInput.send"),children:x.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),x.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),i&&this.state.inputSuggestion&&x.jsxs("div",{className:En.suggestionChip,onClick:this.handleSuggestionToTerminal,children:[x.jsx("span",{className:En.suggestionChipText,children:this.state.inputSuggestion}),x.jsx("span",{className:En.suggestionChipAction,children:"↵"})]})]}),i&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:En.vResizer,onMouseDown:this.handleSplitMouseDown}),x.jsx("div",{style:{flex:1-u,minWidth:200,display:"flex",flexDirection:"column"},children:x.jsx(D4,{})})]})]}):P}}const fZ="_resizer_yamj2_1",mZ={resizer:fZ};class pZ extends J.Component{constructor(t){super(t),this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this)}handleMouseDown(t){t.preventDefault(),document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}handleMouseMove(t){this.props.onResize&&this.props.onResize(t.clientX)}handleMouseUp(){document.body.style.cursor="",document.body.style.userSelect="",document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp)}componentWillUnmount(){document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp)}render(){return x.jsx("div",{onMouseDown:this.handleMouseDown,className:mZ.resizer})}}const gZ="_layout_1hck6_1",vZ="_header_1hck6_6",yZ="_content_1hck6_14",bZ="_mainContainer_1hck6_19",_Z="_leftPanel_1hck6_24",SZ="_leftPanelHeader_1hck6_32",CZ="_leftPanelCount_1hck6_43",wZ="_leftPanelBody_1hck6_49",xZ="_rightPanel_1hck6_54",EZ="_modalActions_1hck6_60",kZ="_spinCenter_1hck6_64",$Z="_emptyCenter_1hck6_69",RZ="_logCheckbox_1hck6_75",TZ="_logListContainer_1hck6_79",PZ="_logListItem_1hck6_85",OZ="_logItemRow_1hck6_91",IZ="_logFileName_1hck6_108",NZ="_logFileIcon_1hck6_121",MZ="_loadingOverlay_1hck6_127",zZ="_loadingText_1hck6_140",jZ="_footer_1hck6_146",BZ="_footerRight_1hck6_156",LZ="_footerText_1hck6_164",AZ="_footerLink_1hck6_169",DZ="_footerIcon_1hck6_181",HZ="_footerDivider_1hck6_186",FZ="_guideContainer_1hck6_194",WZ="_guideContent_1hck6_202",VZ="_guideTitle_1hck6_207",UZ="_guideStep_1hck6_214",qZ="_guideStepNum_1hck6_220",KZ="_guideStepBody_1hck6_235",GZ="_guideText_1hck6_240",XZ="_guideCode_1hck6_247",qt={layout:gZ,header:vZ,content:yZ,mainContainer:bZ,leftPanel:_Z,leftPanelHeader:SZ,leftPanelCount:CZ,leftPanelBody:wZ,rightPanel:xZ,modalActions:EZ,spinCenter:kZ,emptyCenter:$Z,logCheckbox:RZ,logListContainer:TZ,logListItem:PZ,logItemRow:OZ,logFileName:IZ,logFileIcon:NZ,loadingOverlay:MZ,loadingText:zZ,footer:jZ,footerRight:BZ,footerText:LZ,footerLink:AZ,footerIcon:DZ,footerDivider:HZ,guideContainer:FZ,guideContent:WZ,guideTitle:VZ,guideStep:UZ,guideStepNum:qZ,guideStepBody:KZ,guideText:GZ,guideCode:XZ};class YZ extends J.Component{constructor(n){super(n);kt(this,"handleSelectRequest",n=>{this.setState({selectedIndex:n,scrollCenter:!1})});kt(this,"handleViewRequest",n=>{this.setState({viewMode:"raw",selectedIndex:n,scrollCenter:!0})});kt(this,"handleViewInChat",()=>{this.setState(n=>{const i=(n.showAll?n.requests:us(n.requests))[n.selectedIndex];if(!i)return null;let o=null;if(qr(i)&&i.timestamp)o=i.timestamp;else{if(za(i).type==="SubAgent"&&i.timestamp)o=i.timestamp;else{const c=n.requests.indexOf(i);c>=0&&(o=lx(n.requests,c))}o||Fi.info(Ce("ui.cannotMap"))}return{viewMode:"chat",chatScrollToTs:o}})});kt(this,"handleToggleViewMode",()=>{this.setState(n=>{const r=n.viewMode==="raw"?"chat":"raw";if(r==="raw"){if(n.selectedIndex===null){const a=n.showAll?n.requests:us(n.requests);return{viewMode:r,selectedIndex:a.length>0?a.length-1:null,scrollCenter:!0}}return{viewMode:r,scrollCenter:!0}}const i=n.showAll?n.requests:us(n.requests),o=n.selectedIndex!=null?i[n.selectedIndex]:null;if(o){let a=null;if(qr(o)&&o.timestamp)a=o.timestamp;else if(za(o).type==="SubAgent"&&o.timestamp)a=o.timestamp;else{const u=n.requests.indexOf(o);u>=0&&(a=lx(n.requests,u)),a||Fi.info(Ce("ui.cannotMap"))}return{viewMode:r,chatScrollToTs:a}}return{viewMode:r,chatScrollToTs:null}})});kt(this,"handleLangChange",()=>{const n=ec();this.setState({lang:n}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({lang:n})}).catch(()=>{})});kt(this,"handleCollapseToolResultsChange",n=>{this.setState({collapseToolResults:n}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({collapseToolResults:n})}).catch(()=>{})});kt(this,"handleExpandThinkingChange",n=>{this.setState({expandThinking:n}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expandThinking:n})}).catch(()=>{})});kt(this,"handleExpandDiffChange",n=>{this.setState({expandDiff:n}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expandDiff:n})}).catch(()=>{})});kt(this,"handleFilterIrrelevantChange",n=>{this.setState(r=>{const i=!n,o=i?r.requests:us(r.requests);return{showAll:i,selectedIndex:o.length>0?o.length-1:null}}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filterIrrelevant:n})}).catch(()=>{})});kt(this,"handleTabChange",n=>{this.setState({currentTab:n})});kt(this,"handleResize",n=>{const r=this.mainContainerRef.current;if(!r)return;const i=r.getBoundingClientRect(),o=n-i.left;o>=250&&o<=800&&this.setState({leftPanelWidth:o})});kt(this,"handleImportLocalLogs",()=>{this.setState({importModalVisible:!0,localLogsLoading:!0}),fetch("/api/local-logs").then(n=>n.json()).then(n=>{const{_currentProject:r,...i}=n;this.setState({localLogs:i,currentProject:r||"",localLogsLoading:!1})}).catch(()=>{this.setState({localLogs:{},localLogsLoading:!1})})});kt(this,"handleCloseImportModal",()=>{this.setState({importModalVisible:!1,selectedLogs:new Set})});kt(this,"handleToggleLogSelect",(n,r)=>{this.setState(i=>{const o=new Set(i.selectedLogs);return r?o.add(n):o.delete(n),{selectedLogs:o}})});kt(this,"handleMergeLogs",()=>{const{selectedLogs:n,localLogs:r,currentProject:i}=this.state;if(n.size<2)return;const o=r[i];if(!o)return;const a=[];if(o.forEach((d,f)=>{n.has(d.file)&&a.push(f)}),a.sort((d,f)=>d-f),n.has(o[0].file)){Fi.warning(Ce("ui.mergeLatestNotAllowed"));return}for(let d=1;d<a.length;d++)if(a[d]-a[d-1]!==1){Fi.warning(Ce("ui.mergeNotConsecutive"));return}if(a.reduce((d,f)=>d+o[f].size,0)>500*1024*1024){Fi.warning(Ce("ui.mergeTooLarge"));return}const u=a.map(d=>o[d].file).reverse();fetch("/api/merge-logs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:u})}).then(d=>d.json()).then(d=>{d.ok?(Fi.success(Ce("ui.mergeSuccess")),this.setState({selectedLogs:new Set}),this.handleImportLocalLogs()):Fi.error(d.error||"Merge failed")}).catch(()=>Fi.error("Merge failed"))});kt(this,"handleOpenLogFile",n=>{const r=window.location.port||window.location.host.split(":")[1]||"7008";window.open(`${window.location.protocol}//${window.location.hostname}:${r}?logfile=${encodeURIComponent(n)}`,"_blank"),this.setState({importModalVisible:!1})});kt(this,"handleResumeChoice",n=>{fetch("/api/resume-choice",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({choice:n})}).catch(r=>console.error("resume-choice failed:",r))});kt(this,"handleLoadLocalJsonlFile",()=>{const n=document.createElement("input");n.type="file",n.accept=".jsonl",n.onchange=r=>{const i=r.target.files[0];if(!i)return;if(i.size>500*1024*1024){Fi.error(Ce("ui.fileTooLarge"));return}this.setState({fileLoading:!0,fileLoadingCount:0});const o=new FileReader;o.onload=a=>{try{const u=a.target.result.split(`
616
+ ---
617
+ `).filter(d=>d.trim()).map(d=>{try{return JSON.parse(d)}catch{return null}}).filter(Boolean);if(u.length===0){Fi.error(Ce("ui.noLogs")),this.setState({fileLoading:!1,fileLoadingCount:0});return}this.animateLoadingCount(u.length,()=>{let d=[];for(const m of u)qr(m)&&m.body&&Array.isArray(m.body.messages)&&(d=this.mergeMainAgentSessions(d,m));const f=us(u);this._isLocalLog=!0,this._localLogFile=i.name,this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.setState({requests:u,selectedIndex:f.length>0?f.length-1:null,mainAgentSessions:d,importModalVisible:!1,fileLoading:!1,fileLoadingCount:0})})}catch{Fi.error(Ce("ui.noLogs")),this.setState({fileLoading:!1,fileLoadingCount:0})}},o.readAsText(i)},n.click()});const r=parseInt(localStorage.getItem("ccv_cacheExpireAt"),10)||null,i=localStorage.getItem("ccv_cacheType")||null,o=Date.now(),a=r&&r>o?r:null,c=a?i:null;this.state={requests:[],selectedIndex:null,viewMode:"raw",currentTab:"request",cacheExpireAt:a,cacheType:c,leftPanelWidth:380,mainAgentSessions:[],importModalVisible:!1,localLogs:{},localLogsLoading:!1,showAll:!1,lang:ec(),userProfile:null,projectName:"",resumeModalVisible:!1,resumeFileName:"",collapseToolResults:!0,expandThinking:!0,expandDiff:!1,fileLoading:!1,fileLoadingCount:0,selectedLogs:new Set,githubStars:null,cliMode:!1,terminalVisible:!0},this.eventSource=null,this._autoSelectTimer=null,this.mainContainerRef=J.createRef()}componentDidMount(){fetch("/api/preferences").then(i=>i.json()).then(i=>{i.lang&&(gb(i.lang),this.setState({lang:i.lang})),i.collapseToolResults!==void 0&&this.setState({collapseToolResults:!!i.collapseToolResults}),i.expandThinking!==void 0&&this.setState({expandThinking:!!i.expandThinking}),i.expandDiff!==void 0&&this.setState({expandDiff:!!i.expandDiff});const o=i.filterIrrelevant!==void 0?!!i.filterIrrelevant:!0;this.setState({showAll:!o})}).catch(()=>{}),fetch("/api/user-profile").then(i=>i.json()).then(i=>this.setState({userProfile:i})).catch(()=>{}),fetch("/api/project-name").then(i=>i.json()).then(i=>this.setState({projectName:i.projectName||""})).catch(()=>{}),fetch("https://api.github.com/repos/weiesky/cc-viewer").then(i=>i.json()).then(i=>{i.stargazers_count!=null&&this.setState({githubStars:i.stargazers_count})}).catch(()=>{}),fetch("/api/cli-mode").then(i=>i.json()).then(i=>{i.cliMode&&this.setState({cliMode:!0,viewMode:"chat"})}).catch(()=>{});const r=new URLSearchParams(window.location.search).get("logfile");r?this.loadLocalLogFile(r):this.initSSE()}componentWillUnmount(){this.eventSource&&this.eventSource.close(),this._autoSelectTimer&&clearTimeout(this._autoSelectTimer),this._loadingCountTimer&&cancelAnimationFrame(this._loadingCountTimer)}animateLoadingCount(n,r){const i=Math.min(800,Math.max(300,n*.5)),o=performance.now(),a=c=>{const u=Math.min((c-o)/i,1),d=Math.round(u*n);this.setState({fileLoadingCount:d}),u<1?this._loadingCountTimer=requestAnimationFrame(a):(this._loadingCountTimer=null,r())};this._loadingCountTimer=requestAnimationFrame(a)}initSSE(){this.setState({fileLoading:!0,fileLoadingCount:0});try{this.eventSource=new EventSource("/events"),this.eventSource.onmessage=n=>this.handleEventMessage(n),this.eventSource.addEventListener("resume_prompt",n=>{try{const r=JSON.parse(n.data);this.setState({resumeModalVisible:!0,resumeFileName:r.recentFileName||""})}catch{}}),this.eventSource.addEventListener("resume_resolved",()=>{this.setState({resumeModalVisible:!1,resumeFileName:""})}),this.eventSource.addEventListener("update_completed",n=>{try{const r=JSON.parse(n.data);this.setState({updateInfo:{type:"completed",version:r.version}})}catch{}}),this.eventSource.addEventListener("update_major_available",n=>{try{const r=JSON.parse(n.data);this.setState({updateInfo:{type:"major",version:r.version}})}catch{}}),this.eventSource.addEventListener("full_reload",n=>{try{const r=JSON.parse(n.data);if(Array.isArray(r)){this.assignMessageTimestamps(r);const i=this.buildSessionsFromEntries(r),o=us(r);r.length>0?this.animateLoadingCount(r.length,()=>{this.setState({requests:r,selectedIndex:o.length>0?o.length-1:null,mainAgentSessions:i,fileLoading:!1,fileLoadingCount:0})}):this.setState({requests:r,selectedIndex:null,mainAgentSessions:i,fileLoading:!1,fileLoadingCount:0})}else this.setState({fileLoading:!1,fileLoadingCount:0})}catch{this.setState({fileLoading:!1,fileLoadingCount:0})}}),this.eventSource.onerror=()=>console.error("SSE连接错误")}catch(n){console.error("EventSource初始化失败:",n),this.setState({fileLoading:!1,fileLoadingCount:0})}}loadLocalLogFile(n){this._isLocalLog=!0,this._localLogFile=n,this.setState({fileLoading:!0,fileLoadingCount:0}),fetch(`/api/local-log?file=${encodeURIComponent(n)}`).then(r=>r.json()).then(r=>{Array.isArray(r)?this.animateLoadingCount(r.length,()=>{this.assignMessageTimestamps(r);const i=this.buildSessionsFromEntries(r),o=us(r);this.setState({requests:r,selectedIndex:o.length>0?o.length-1:null,mainAgentSessions:i,fileLoading:!1,fileLoadingCount:0})}):this.setState({fileLoading:!1,fileLoadingCount:0})}).catch(r=>{console.error("加载日志文件失败:",r),this.setState({fileLoading:!1,fileLoadingCount:0})})}handleEventMessage(n){try{const r=JSON.parse(n.data);this.setState(i=>{var m,g;const o=[...i.requests],a=o.findIndex(v=>v.timestamp===r.timestamp&&v.url===r.url);a>=0?o[a]=r:o.push(r);let c=i.cacheExpireAt,u=i.cacheType;if(qr(r)){const v=(g=(m=r.response)==null?void 0:m.body)==null?void 0:g.usage;if(v!=null&&v.cache_creation){const y=v.cache_creation,S=r.timestamp?new Date(r.timestamp).getTime():Date.now();let _=null,C=null;if(y.ephemeral_1h_input_tokens>0?(_=S+3600*1e3,C="1h"):y.ephemeral_5m_input_tokens>0&&(_=S+300*1e3,C="5m"),_&&_>Date.now()){c=_;const E=(v.cache_read_input_tokens||0)+(v.cache_creation_input_tokens||0);u=E>0?dr(E):C,localStorage.setItem("ccv_cacheExpireAt",String(c)),localStorage.setItem("ccv_cacheType",u)}}}let d=i.mainAgentSessions;if(qr(r)&&r.body&&Array.isArray(r.body.messages)){const v=r.timestamp||new Date().toISOString(),y=d.length>0?d[d.length-1]:null,S=(y==null?void 0:y.messages)||[],_=r.body.messages,C=S.length,E=C>0&&_.length<C*.5&&C-_.length>4;for(let k=0;k<_.length;k++)!E&&k<C&&S[k]._timestamp?_[k]._timestamp=S[k]._timestamp:_[k]._timestamp||(_[k]._timestamp=v);d=this.mergeMainAgentSessions(i.mainAgentSessions,r)}return i.selectedIndex===null&&o.length>0&&(this._autoSelectTimer&&clearTimeout(this._autoSelectTimer),this._autoSelectTimer=setTimeout(()=>{this.setState(v=>{if(v.selectedIndex===null&&v.requests.length>0){const y=v.showAll?v.requests:us(v.requests);return y.length>0?{selectedIndex:y.length-1}:null}return null})},200)),{requests:o,cacheExpireAt:c,cacheType:u,mainAgentSessions:d}})}catch(r){console.error("处理事件消息失败:",r)}}assignMessageTimestamps(n){var o;let r=[],i=null;for(const a of n){if(!qr(a)||!a.body||!Array.isArray(a.body.messages))continue;const c=a.body.messages,u=c.length,d=((o=a.body.metadata)==null?void 0:o.user_id)||null,f=a.timestamp||new Date().toISOString(),m=r.length;m>0&&(u<m*.5&&m-u>4||i&&d&&d!==i)&&(r=[]);for(let v=r.length;v<u;v++)r.push(f);for(let v=0;v<u;v++)c[v]._timestamp=r[v];i=d}}buildSessionsFromEntries(n){let r=[];for(const i of n)qr(i)&&i.body&&Array.isArray(i.body.messages)&&(r=this.mergeMainAgentSessions(r,i));return r}mergeMainAgentSessions(n,r){var m;const i=r.body.messages,o=r.response,a=((m=r.body.metadata)==null?void 0:m.user_id)||null,c=r.timestamp||null;if(n.length===0)return[{userId:a,messages:i,response:o,entryTimestamp:c}];const u=n[n.length-1],d=u.messages?u.messages.length:0,f=d>0&&i.length<d*.5&&d-i.length>4;if(a&&a===u.userId&&!f){const g=[...n];return g[g.length-1]={userId:a,messages:i,response:o,entryTimestamp:c},g}else return[...n,{userId:a,messages:i,response:o,entryTimestamp:c}]}formatTimestamp(n){return!n||n.length<15?n:`${n.slice(0,4)}-${n.slice(4,6)}-${n.slice(6,8)} ${n.slice(9,11)}:${n.slice(11,13)}:${n.slice(13,15)}`}formatSize(n){return n<1024?n+" B":n<1024*1024?(n/1024).toFixed(1)+" KB":(n/(1024*1024)).toFixed(1)+" MB"}render(){const{requests:n,selectedIndex:r,viewMode:i,currentTab:o,cacheExpireAt:a,cacheType:c,leftPanelWidth:u,mainAgentSessions:d,showAll:f,fileLoading:m,fileLoadingCount:g}=this.state,v=f?n:us(n),y=r!==null?v[r]:null,S=/Android|iPhone|iPad|iPod|Mobile/i.test(navigator.userAgent);return this.state.cliMode&&S?x.jsxs("div",{style:{width:"100vw",height:"100vh",display:"flex",flexDirection:"column",background:"#000"},children:[x.jsxs("div",{style:{padding:"6px 12px",background:"#111",borderBottom:"1px solid #222",display:"flex",alignItems:"center",gap:6,flexShrink:0},children:[x.jsx(Ky,{status:"processing",color:"green"}),x.jsxs("span",{style:{fontSize:12,color:"#aaa"},children:[Ce("ui.liveMonitoring"),this.state.projectName?`: ${this.state.projectName}`:""]})]}),x.jsx(D4,{})]}):x.jsxs(Qo,{theme:{algorithm:TH.darkAlgorithm,token:{colorBgContainer:"#111",colorBgLayout:"#0a0a0a",colorBgElevated:"#1a1a1a",colorBorder:"#2a2a2a"}},children:[m&&x.jsx("div",{className:qt.loadingOverlay,children:x.jsxs("div",{className:qt.loadingText,children:["Loading...(",g,")"]})}),x.jsxs(Xs,{className:qt.layout,children:[x.jsx(Xs.Header,{className:qt.header,children:x.jsx(w0,{requestCount:v.length,requests:v,viewMode:i,cacheExpireAt:a,cacheType:c,onToggleViewMode:this.handleToggleViewMode,onLangChange:this.handleLangChange,onImportLocalLogs:this.handleImportLocalLogs,isLocalLog:!!this._isLocalLog,localLogFile:this._localLogFile,projectName:this.state.projectName,collapseToolResults:this.state.collapseToolResults,onCollapseToolResultsChange:this.handleCollapseToolResultsChange,expandThinking:this.state.expandThinking,onExpandThinkingChange:this.handleExpandThinkingChange,expandDiff:this.state.expandDiff,onExpandDiffChange:this.handleExpandDiffChange,filterIrrelevant:!this.state.showAll,onFilterIrrelevantChange:this.handleFilterIrrelevantChange,updateInfo:this.state.updateInfo,onDismissUpdate:()=>this.setState({updateInfo:null}),cliMode:this.state.cliMode,terminalVisible:this.state.terminalVisible,onToggleTerminal:()=>this.setState(_=>({terminalVisible:!_.terminalVisible}))})}),x.jsxs(Xs.Content,{className:qt.content,children:[i==="raw"&&(v.length===0?x.jsx("div",{className:qt.guideContainer,children:x.jsxs("div",{className:qt.guideContent,children:[x.jsx("h2",{className:qt.guideTitle,children:Ce("ui.guide.title")}),x.jsxs("div",{className:qt.guideStep,children:[x.jsx("div",{className:qt.guideStepNum,children:"1"}),x.jsxs("div",{className:qt.guideStepBody,children:[x.jsx("p",{className:qt.guideText,children:Ce("ui.guide.step1")}),x.jsx("code",{className:qt.guideCode,children:Ce("ui.guide.exampleQuestion")})]})]}),x.jsxs("div",{className:qt.guideStep,children:[x.jsx("div",{className:qt.guideStepNum,children:"2"}),x.jsxs("div",{className:qt.guideStepBody,children:[x.jsx("p",{className:qt.guideText,children:Ce("ui.guide.step2")}),x.jsx("code",{className:qt.guideCode,children:Ce("ui.guide.troubleshootCmd")})]})]}),x.jsxs("div",{className:qt.guideStep,children:[x.jsx("div",{className:qt.guideStepNum,children:"3"}),x.jsxs("div",{className:qt.guideStepBody,children:[x.jsx("p",{className:qt.guideText,children:Ce("ui.guide.step3")}),x.jsx("code",{className:qt.guideCode,children:"npm install -g @anthropic-ai/claude-code"})]})]})]})}):x.jsxs("div",{ref:this.mainContainerRef,className:qt.mainContainer,children:[x.jsxs("div",{className:qt.leftPanel,style:{width:u},children:[x.jsxs("div",{className:qt.leftPanelHeader,children:[x.jsx("span",{children:Ce("ui.requestList")}),x.jsx("span",{className:qt.leftPanelCount,children:Ce("ui.totalRequests",{count:v.length})})]}),x.jsx("div",{className:qt.leftPanelBody,children:x.jsx(jU,{requests:v,selectedIndex:r,scrollCenter:this.state.scrollCenter,onSelect:this.handleSelectRequest,onScrollDone:()=>this.setState({scrollCenter:!1})})})]}),x.jsx(pZ,{onResize:this.handleResize}),x.jsx("div",{className:qt.rightPanel,children:x.jsx(WK,{request:y,requests:v,selectedIndex:r,currentTab:o,onTabChange:this.handleTabChange,onViewInChat:this.handleViewInChat,expandDiff:this.state.expandDiff})})]})),x.jsx("div",{style:{display:i==="chat"?"flex":"none",height:"100%",flexDirection:"column"},children:x.jsx(hZ,{requests:v,mainAgentSessions:d,userProfile:this.state.userProfile,collapseToolResults:this.state.collapseToolResults,expandThinking:this.state.expandThinking,onViewRequest:this.handleViewRequest,scrollToTimestamp:this.state.chatScrollToTs,onScrollTsDone:()=>this.setState({chatScrollToTs:null}),cliMode:this.state.cliMode,terminalVisible:this.state.terminalVisible})})]}),x.jsx("div",{className:qt.footer,children:x.jsxs("div",{className:qt.footerRight,children:[x.jsx("span",{className:qt.footerText,children:Ce("ui.footer.starRequest")}),x.jsxs("a",{href:"https://github.com/weiesky/cc-viewer",target:"_blank",rel:"noopener noreferrer",className:qt.footerLink,children:[x.jsx("svg",{className:qt.footerIcon,viewBox:"0 0 16 16",fill:"currentColor",children:x.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})}),"GitHub",this.state.githubStars!=null?` ★ ${this.state.githubStars}`:""]}),x.jsx("span",{className:qt.footerDivider,children:"|"}),x.jsx("a",{href:"dingtalk://dingtalkclient/action/sendmsg?dingtalk_id=sthk5es",className:qt.footerLink,children:Ce("ui.footer.contact")})]})})]}),x.jsx(Oi,{title:Ce("ui.resume.title"),open:this.state.resumeModalVisible,closable:!1,maskClosable:!1,keyboard:!1,footer:[x.jsx(hr,{type:"primary",onClick:()=>this.handleResumeChoice("continue"),children:Ce("ui.resume.continue")},"continue"),x.jsx(hr,{onClick:()=>this.handleResumeChoice("new"),children:Ce("ui.resume.new")},"new")],children:x.jsx("p",{children:Ce("ui.resume.message",{file:this.state.resumeFileName})})}),x.jsxs(Oi,{title:Ce("ui.importLocalLogs"),open:this.state.importModalVisible,onCancel:this.handleCloseImportModal,footer:null,width:1e3,styles:{body:{maxHeight:"60vh",overflow:"auto"}},children:[x.jsxs("div",{className:qt.modalActions,children:[x.jsx(hr,{icon:x.jsx(VF,{}),onClick:this.handleLoadLocalJsonlFile,children:Ce("ui.loadLocalJsonl")}),x.jsx(hr,{size:"small",type:this.state.selectedLogs.size>1?"primary":"default",disabled:this.state.selectedLogs.size<2,onClick:this.handleMergeLogs,style:{marginLeft:8},children:Ce("ui.mergeLogs")})]}),this.state.localLogsLoading?x.jsx("div",{className:qt.spinCenter,children:x.jsx(Na,{})}):(()=>{const _=this.state.localLogs[this.state.currentProject];return!_||_.length===0?x.jsx("div",{className:qt.emptyCenter,children:Ce("ui.noLogs")}):x.jsx("div",{className:qt.logListContainer,children:x.jsx(Pu,{size:"small",dataSource:_,renderItem:C=>x.jsx(Pu.Item,{className:qt.logListItem,onClick:()=>{const E=!this.state.selectedLogs.has(C.file);this.handleToggleLogSelect(C.file,E)},children:x.jsxs("div",{className:qt.logItemRow,children:[x.jsxs("span",{children:[x.jsx(ab,{className:qt.logCheckbox,checked:this.state.selectedLogs.has(C.file)||!1,onClick:E=>E.stopPropagation(),onChange:E=>{E.stopPropagation(),this.handleToggleLogSelect(C.file,E.target.checked)}}),x.jsx(fu,{className:qt.logFileIcon}),x.jsx("span",{className:qt.logFileName,children:this.formatTimestamp(C.timestamp)})]}),x.jsxs("span",{children:[x.jsxs(Ui,{style:{background:"#0a0a0a",border:"1px solid #444",color:"#999"},children:[C.turns||0," ",Ce("ui.turns")]}),x.jsx(Ui,{style:{background:"#0a0a0a",border:"1px solid #444",color:"#999"},children:this.formatSize(C.size)}),x.jsx(hr,{size:"small",type:"primary",onClick:E=>{E.stopPropagation(),this.handleOpenLogFile(C.file)},children:Ce("ui.openLog")})]})]})})})})})()]})]})}}const JZ=kT.createRoot(document.getElementById("root"));JZ.render(x.jsx(YZ,{}));