@cluesmith/codev 3.0.0-rc.3 → 3.0.0-rc.5
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.
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
var yD=Object.defineProperty;var bD=(e,t,r)=>t in e?yD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var er=(e,t,r)=>bD(e,typeof t!="symbol"?t+"":t,r);function SD(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const o in n)if(o!=="default"&&!(o in e)){const h=Object.getOwnPropertyDescriptor(n,o);h&&Object.defineProperty(e,o,h.get?h:{enumerable:!0,get:()=>n[o]})}}}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 o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const h of o)if(h.type==="childList")for(const g of h.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&n(g)}).observe(document,{childList:!0,subtree:!0});function r(o){const h={};return o.integrity&&(h.integrity=o.integrity),o.referrerPolicy&&(h.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?h.credentials="include":o.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function n(o){if(o.ep)return;o.ep=!0;const h=r(o);fetch(o.href,h)}})();function fn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Cv={exports:{}},Zo={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and 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 W1;function wD(){if(W1)return Zo;W1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,o,h){var g=null;if(h!==void 0&&(g=""+h),o.key!==void 0&&(g=""+o.key),"key"in o){h={};for(var a in o)a!=="key"&&(h[a]=o[a])}else h=o;return o=h.ref,{$$typeof:e,type:n,key:g,ref:o!==void 0?o:null,props:h}}return Zo.Fragment=t,Zo.jsx=r,Zo.jsxs=r,Zo}var G1;function CD(){return G1||(G1=1,Cv.exports=wD()),Cv.exports}var G=CD(),xv={exports:{}},je={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react.production.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and 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 K1;function xD(){if(K1)return je;K1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),g=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),u=Symbol.for("react.activity"),m=Symbol.iterator;function w(N){return N===null||typeof N!="object"?null:(N=m&&N[m]||N["@@iterator"],typeof N=="function"?N:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,d={};function y(N,U,J){this.props=N,this.context=U,this.refs=d,this.updater=J||C}y.prototype.isReactComponent={},y.prototype.setState=function(N,U){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,U,"setState")},y.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function b(){}b.prototype=y.prototype;function S(N,U,J){this.props=N,this.context=U,this.refs=d,this.updater=J||C}var E=S.prototype=new b;E.constructor=S,_(E,y.prototype),E.isPureReactComponent=!0;var L=Array.isArray;function x(){}var O={H:null,A:null,T:null,S:null},M=Object.prototype.hasOwnProperty;function D(N,U,J){var te=J.ref;return{$$typeof:e,type:N,key:U,ref:te!==void 0?te:null,props:J}}function k(N,U){return D(N.type,U,N.props)}function B(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function R(N){var U={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(J){return U[J]})}var P=/\/+/g;function H(N,U){return typeof N=="object"&&N!==null&&N.key!=null?R(""+N.key):U.toString(36)}function X(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(x,x):(N.status="pending",N.then(function(U){N.status==="pending"&&(N.status="fulfilled",N.value=U)},function(U){N.status==="pending"&&(N.status="rejected",N.reason=U)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function F(N,U,J,te,fe){var ve=typeof N;(ve==="undefined"||ve==="boolean")&&(N=null);var Z=!1;if(N===null)Z=!0;else switch(ve){case"bigint":case"string":case"number":Z=!0;break;case"object":switch(N.$$typeof){case e:case t:Z=!0;break;case v:return Z=N._init,F(Z(N._payload),U,J,te,fe)}}if(Z)return fe=fe(N),Z=te===""?"."+H(N,0):te,L(fe)?(J="",Z!=null&&(J=Z.replace(P,"$&/")+"/"),F(fe,U,J,"",function(ee){return ee})):fe!=null&&(B(fe)&&(fe=k(fe,J+(fe.key==null||N&&N.key===fe.key?"":(""+fe.key).replace(P,"$&/")+"/")+Z)),U.push(fe)),1;Z=0;var W=te===""?".":te+":";if(L(N))for(var V=0;V<N.length;V++)te=N[V],ve=W+H(te,V),Z+=F(te,U,J,ve,fe);else if(V=w(N),typeof V=="function")for(N=V.call(N),V=0;!(te=N.next()).done;)te=te.value,ve=W+H(te,V++),Z+=F(te,U,J,ve,fe);else if(ve==="object"){if(typeof N.then=="function")return F(X(N),U,J,te,fe);throw U=String(N),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return Z}function K(N,U,J){if(N==null)return N;var te=[],fe=0;return F(N,te,"","",function(ve){return U.call(J,ve,fe++)}),te}function Y(N){if(N._status===-1){var U=N._result;U=U(),U.then(function(J){(N._status===0||N._status===-1)&&(N._status=1,N._result=J)},function(J){(N._status===0||N._status===-1)&&(N._status=2,N._result=J)}),N._status===-1&&(N._status=0,N._result=U)}if(N._status===1)return N._result.default;throw N._result}var j=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},$={map:K,forEach:function(N,U,J){K(N,function(){U.apply(this,arguments)},J)},count:function(N){var U=0;return K(N,function(){U++}),U},toArray:function(N){return K(N,function(U){return U})||[]},only:function(N){if(!B(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return je.Activity=u,je.Children=$,je.Component=y,je.Fragment=r,je.Profiler=o,je.PureComponent=S,je.StrictMode=n,je.Suspense=c,je.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,je.__COMPILER_RUNTIME={__proto__:null,c:function(N){return O.H.useMemoCache(N)}},je.cache=function(N){return function(){return N.apply(null,arguments)}},je.cacheSignal=function(){return null},je.cloneElement=function(N,U,J){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var te=_({},N.props),fe=N.key;if(U!=null)for(ve in U.key!==void 0&&(fe=""+U.key),U)!M.call(U,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&U.ref===void 0||(te[ve]=U[ve]);var ve=arguments.length-2;if(ve===1)te.children=J;else if(1<ve){for(var Z=Array(ve),W=0;W<ve;W++)Z[W]=arguments[W+2];te.children=Z}return D(N.type,fe,te)},je.createContext=function(N){return N={$$typeof:g,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:h,_context:N},N},je.createElement=function(N,U,J){var te,fe={},ve=null;if(U!=null)for(te in U.key!==void 0&&(ve=""+U.key),U)M.call(U,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(fe[te]=U[te]);var Z=arguments.length-2;if(Z===1)fe.children=J;else if(1<Z){for(var W=Array(Z),V=0;V<Z;V++)W[V]=arguments[V+2];fe.children=W}if(N&&N.defaultProps)for(te in Z=N.defaultProps,Z)fe[te]===void 0&&(fe[te]=Z[te]);return D(N,ve,fe)},je.createRef=function(){return{current:null}},je.forwardRef=function(N){return{$$typeof:a,render:N}},je.isValidElement=B,je.lazy=function(N){return{$$typeof:v,_payload:{_status:-1,_result:N},_init:Y}},je.memo=function(N,U){return{$$typeof:f,type:N,compare:U===void 0?null:U}},je.startTransition=function(N){var U=O.T,J={};O.T=J;try{var te=N(),fe=O.S;fe!==null&&fe(J,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(x,j)}catch(ve){j(ve)}finally{U!==null&&J.types!==null&&(U.types=J.types),O.T=U}},je.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},je.use=function(N){return O.H.use(N)},je.useActionState=function(N,U,J){return O.H.useActionState(N,U,J)},je.useCallback=function(N,U){return O.H.useCallback(N,U)},je.useContext=function(N){return O.H.useContext(N)},je.useDebugValue=function(){},je.useDeferredValue=function(N,U){return O.H.useDeferredValue(N,U)},je.useEffect=function(N,U){return O.H.useEffect(N,U)},je.useEffectEvent=function(N){return O.H.useEffectEvent(N)},je.useId=function(){return O.H.useId()},je.useImperativeHandle=function(N,U,J){return O.H.useImperativeHandle(N,U,J)},je.useInsertionEffect=function(N,U){return O.H.useInsertionEffect(N,U)},je.useLayoutEffect=function(N,U){return O.H.useLayoutEffect(N,U)},je.useMemo=function(N,U){return O.H.useMemo(N,U)},je.useOptimistic=function(N,U){return O.H.useOptimistic(N,U)},je.useReducer=function(N,U,J){return O.H.useReducer(N,U,J)},je.useRef=function(N){return O.H.useRef(N)},je.useState=function(N){return O.H.useState(N)},je.useSyncExternalStore=function(N,U,J){return O.H.useSyncExternalStore(N,U,J)},je.useTransition=function(){return O.H.useTransition()},je.version="19.2.4",je}var Y1;function Wa(){return Y1||(Y1=1,xv.exports=xD()),xv.exports}var z=Wa();const ED=fn(z),AD=SD({__proto__:null,default:ED},[z]);var Ev={exports:{}},Qo={},Av={exports:{}},Mv={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Meta Platforms, Inc. and 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 V1;function MD(){return V1||(V1=1,(function(e){function t(F,K){var Y=F.length;F.push(K);e:for(;0<Y;){var j=Y-1>>>1,$=F[j];if(0<o($,K))F[j]=K,F[Y]=$,Y=j;else break e}}function r(F){return F.length===0?null:F[0]}function n(F){if(F.length===0)return null;var K=F[0],Y=F.pop();if(Y!==K){F[0]=Y;e:for(var j=0,$=F.length,N=$>>>1;j<N;){var U=2*(j+1)-1,J=F[U],te=U+1,fe=F[te];if(0>o(J,Y))te<$&&0>o(fe,J)?(F[j]=fe,F[te]=Y,j=te):(F[j]=J,F[U]=Y,j=U);else if(te<$&&0>o(fe,Y))F[j]=fe,F[te]=Y,j=te;else break e}}return K}function o(F,K){var Y=F.sortIndex-K.sortIndex;return Y!==0?Y:F.id-K.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;e.unstable_now=function(){return h.now()}}else{var g=Date,a=g.now();e.unstable_now=function(){return g.now()-a}}var c=[],f=[],v=1,u=null,m=3,w=!1,C=!1,_=!1,d=!1,y=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;function E(F){for(var K=r(f);K!==null;){if(K.callback===null)n(f);else if(K.startTime<=F)n(f),K.sortIndex=K.expirationTime,t(c,K);else break;K=r(f)}}function L(F){if(_=!1,E(F),!C)if(r(c)!==null)C=!0,x||(x=!0,R());else{var K=r(f);K!==null&&X(L,K.startTime-F)}}var x=!1,O=-1,M=5,D=-1;function k(){return d?!0:!(e.unstable_now()-D<M)}function B(){if(d=!1,x){var F=e.unstable_now();D=F;var K=!0;try{e:{C=!1,_&&(_=!1,b(O),O=-1),w=!0;var Y=m;try{t:{for(E(F),u=r(c);u!==null&&!(u.expirationTime>F&&k());){var j=u.callback;if(typeof j=="function"){u.callback=null,m=u.priorityLevel;var $=j(u.expirationTime<=F);if(F=e.unstable_now(),typeof $=="function"){u.callback=$,E(F),K=!0;break t}u===r(c)&&n(c),E(F)}else n(c);u=r(c)}if(u!==null)K=!0;else{var N=r(f);N!==null&&X(L,N.startTime-F),K=!1}}break e}finally{u=null,m=Y,w=!1}K=void 0}}finally{K?R():x=!1}}}var R;if(typeof S=="function")R=function(){S(B)};else if(typeof MessageChannel<"u"){var P=new MessageChannel,H=P.port2;P.port1.onmessage=B,R=function(){H.postMessage(null)}}else R=function(){y(B,0)};function X(F,K){O=y(function(){F(e.unstable_now())},K)}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(F){F.callback=null},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_next=function(F){switch(m){case 1:case 2:case 3:var K=3;break;default:K=m}var Y=m;m=K;try{return F()}finally{m=Y}},e.unstable_requestPaint=function(){d=!0},e.unstable_runWithPriority=function(F,K){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var Y=m;m=F;try{return K()}finally{m=Y}},e.unstable_scheduleCallback=function(F,K,Y){var j=e.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?j+Y:j):Y=j,F){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=Y+$,F={id:v++,callback:K,priorityLevel:F,startTime:Y,expirationTime:$,sortIndex:-1},Y>j?(F.sortIndex=Y,t(f,F),r(c)===null&&F===r(f)&&(_?(b(O),O=-1):_=!0,X(L,Y-j))):(F.sortIndex=$,t(c,F),C||w||(C=!0,x||(x=!0,R()))),F},e.unstable_shouldYield=k,e.unstable_wrapCallback=function(F){var K=m;return function(){var Y=m;m=K;try{return F.apply(this,arguments)}finally{m=Y}}}})(Mv)),Mv}var X1;function LD(){return X1||(X1=1,Av.exports=MD()),Av.exports}var Lv={exports:{}},ar={};/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Meta Platforms, Inc. and 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 Z1;function OD(){if(Z1)return ar;Z1=1;var e=Wa();function t(c){var f="https://react.dev/errors/"+c;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)f+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+c+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for("react.portal");function h(c,f,v){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:u==null?null:""+u,children:c,containerInfo:f,implementation:v}}var g=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(c,f){if(c==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return ar.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,ar.createPortal=function(c,f){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return h(c,f,null,v)},ar.flushSync=function(c){var f=g.T,v=n.p;try{if(g.T=null,n.p=2,c)return c()}finally{g.T=f,n.p=v,n.d.f()}},ar.preconnect=function(c,f){typeof c=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,n.d.C(c,f))},ar.prefetchDNS=function(c){typeof c=="string"&&n.d.D(c)},ar.preinit=function(c,f){if(typeof c=="string"&&f&&typeof f.as=="string"){var v=f.as,u=a(v,f.crossOrigin),m=typeof f.integrity=="string"?f.integrity:void 0,w=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;v==="style"?n.d.S(c,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:u,integrity:m,fetchPriority:w}):v==="script"&&n.d.X(c,{crossOrigin:u,integrity:m,fetchPriority:w,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},ar.preinitModule=function(c,f){if(typeof c=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var v=a(f.as,f.crossOrigin);n.d.M(c,{crossOrigin:v,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&n.d.M(c)},ar.preload=function(c,f){if(typeof c=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var v=f.as,u=a(v,f.crossOrigin);n.d.L(c,v,{crossOrigin:u,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},ar.preloadModule=function(c,f){if(typeof c=="string")if(f){var v=a(f.as,f.crossOrigin);n.d.m(c,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:v,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else n.d.m(c)},ar.requestFormReset=function(c){n.d.r(c)},ar.unstable_batchedUpdates=function(c,f){return c(f)},ar.useFormState=function(c,f,v){return g.H.useFormState(c,f,v)},ar.useFormStatus=function(){return g.H.useHostTransitionStatus()},ar.version="19.2.4",ar}var Q1;function Z5(){if(Q1)return Lv.exports;Q1=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(),Lv.exports=OD(),Lv.exports}/**
|
|
34
|
-
* @license React
|
|
35
|
-
* react-dom-client.production.js
|
|
36
|
-
*
|
|
37
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the MIT license found in the
|
|
40
|
-
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var J1;function TD(){if(J1)return Qo;J1=1;var e=LD(),t=Wa(),r=Z5();function n(i){var s="https://react.dev/errors/"+i;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function h(i){var s=i,l=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(l=s.return),i=s.return;while(i)}return s.tag===3?l:null}function g(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function a(i){if(i.tag===31){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function c(i){if(h(i)!==i)throw Error(n(188))}function f(i){var s=i.alternate;if(!s){if(s=h(i),s===null)throw Error(n(188));return s!==i?null:i}for(var l=i,p=s;;){var A=l.return;if(A===null)break;var T=A.alternate;if(T===null){if(p=A.return,p!==null){l=p;continue}break}if(A.child===T.child){for(T=A.child;T;){if(T===l)return c(A),i;if(T===p)return c(A),s;T=T.sibling}throw Error(n(188))}if(l.return!==p.return)l=A,p=T;else{for(var I=!1,q=A.child;q;){if(q===l){I=!0,l=A,p=T;break}if(q===p){I=!0,p=A,l=T;break}q=q.sibling}if(!I){for(q=T.child;q;){if(q===l){I=!0,l=T,p=A;break}if(q===p){I=!0,p=T,l=A;break}q=q.sibling}if(!I)throw Error(n(189))}}if(l.alternate!==p)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:s}function v(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i;for(i=i.child;i!==null;){if(s=v(i),s!==null)return s;i=i.sibling}return null}var u=Object.assign,m=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),S=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),k=Symbol.for("react.memo_cache_sentinel"),B=Symbol.iterator;function R(i){return i===null||typeof i!="object"?null:(i=B&&i[B]||i["@@iterator"],typeof i=="function"?i:null)}var P=Symbol.for("react.client.reference");function H(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===P?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case _:return"Fragment";case y:return"Profiler";case d:return"StrictMode";case L:return"Suspense";case x:return"SuspenseList";case D:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case C:return"Portal";case S:return i.displayName||"Context";case b:return(i._context.displayName||"Context")+".Consumer";case E:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case O:return s=i.displayName||null,s!==null?s:H(i.type)||"Memo";case M:s=i._payload,i=i._init;try{return H(i(s))}catch{}}return null}var X=Array.isArray,F=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},j=[],$=-1;function N(i){return{current:i}}function U(i){0>$||(i.current=j[$],j[$]=null,$--)}function J(i,s){$++,j[$]=i.current,i.current=s}var te=N(null),fe=N(null),ve=N(null),Z=N(null);function W(i,s){switch(J(ve,s),J(fe,i),J(te,null),s.nodeType){case 9:case 11:i=(i=s.documentElement)&&(i=i.namespaceURI)?v1(i):0;break;default:if(i=s.tagName,s=s.namespaceURI)s=v1(s),i=p1(s,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}U(te),J(te,i)}function V(){U(te),U(fe),U(ve)}function ee(i){i.memoizedState!==null&&J(Z,i);var s=te.current,l=p1(s,i.type);s!==l&&(J(fe,i),J(te,l))}function ue(i){fe.current===i&&(U(te),U(fe)),Z.current===i&&(U(Z),Ko._currentValue=Y)}var ie,me;function de(i){if(ie===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);ie=s&&s[1]||"",me=-1<l.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+ie+i+me}var Me=!1;function ke(i,s){if(!i||Me)return"";Me=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(s){var _e=function(){throw Error()};if(Object.defineProperty(_e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(_e,[])}catch(ce){var oe=ce}Reflect.construct(i,[],_e)}else{try{_e.call()}catch(ce){oe=ce}i.call(_e.prototype)}}else{try{throw Error()}catch(ce){oe=ce}(_e=i())&&typeof _e.catch=="function"&&_e.catch(function(){})}}catch(ce){if(ce&&oe&&typeof ce.stack=="string")return[ce.stack,oe.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var A=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");A&&A.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var T=p.DetermineComponentFrameRoot(),I=T[0],q=T[1];if(I&&q){var Q=I.split(`
|
|
44
|
-
`),ae=q.split(`
|
|
45
|
-
`);for(A=p=0;p<Q.length&&!Q[p].includes("DetermineComponentFrameRoot");)p++;for(;A<ae.length&&!ae[A].includes("DetermineComponentFrameRoot");)A++;if(p===Q.length||A===ae.length)for(p=Q.length-1,A=ae.length-1;1<=p&&0<=A&&Q[p]!==ae[A];)A--;for(;1<=p&&0<=A;p--,A--)if(Q[p]!==ae[A]){if(p!==1||A!==1)do if(p--,A--,0>A||Q[p]!==ae[A]){var he=`
|
|
46
|
-
`+Q[p].replace(" at new "," at ");return i.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",i.displayName)),he}while(1<=p&&0<=A);break}}}finally{Me=!1,Error.prepareStackTrace=l}return(l=i?i.displayName||i.name:"")?de(l):""}function Ce(i,s){switch(i.tag){case 26:case 27:case 5:return de(i.type);case 16:return de("Lazy");case 13:return i.child!==s&&s!==null?de("Suspense Fallback"):de("Suspense");case 19:return de("SuspenseList");case 0:case 15:return ke(i.type,!1);case 11:return ke(i.type.render,!1);case 1:return ke(i.type,!0);case 31:return de("Activity");default:return""}}function Ve(i){try{var s="",l=null;do s+=Ce(i,l),l=i,i=i.return;while(i);return s}catch(p){return`
|
|
47
|
-
Error generating stack: `+p.message+`
|
|
48
|
-
`+p.stack}}var Dt=Object.prototype.hasOwnProperty,Se=e.unstable_scheduleCallback,ye=e.unstable_cancelCallback,be=e.unstable_shouldYield,ge=e.unstable_requestPaint,we=e.unstable_now,$e=e.unstable_getCurrentPriorityLevel,Be=e.unstable_ImmediatePriority,It=e.unstable_UserBlockingPriority,ct=e.unstable_NormalPriority,mt=e.unstable_LowPriority,qe=e.unstable_IdlePriority,Pe=e.log,Te=e.unstable_setDisableYieldValue,lr=null,_t=null;function Nt(i){if(typeof Pe=="function"&&Te(i),_t&&typeof _t.setStrictMode=="function")try{_t.setStrictMode(lr,i)}catch{}}var Rt=Math.clz32?Math.clz32:no,si=Math.log,io=Math.LN2;function no(i){return i>>>=0,i===0?32:31-(si(i)/io|0)|0}var Nr=256,_i=262144,mi=4194304;function ai(i){var s=i&42;if(s!==0)return s;switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function Wl(i,s,l){var p=i.pendingLanes;if(p===0)return 0;var A=0,T=i.suspendedLanes,I=i.pingedLanes;i=i.warmLanes;var q=p&134217727;return q!==0?(p=q&~T,p!==0?A=ai(p):(I&=q,I!==0?A=ai(I):l||(l=q&~i,l!==0&&(A=ai(l))))):(q=p&~T,q!==0?A=ai(q):I!==0?A=ai(I):l||(l=p&~i,l!==0&&(A=ai(l)))),A===0?0:s!==0&&s!==A&&(s&T)===0&&(T=A&-A,l=s&-s,T>=l||T===32&&(l&4194048)!==0)?s:A}function so(i,s){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&s)===0}function aO(i,s){switch(i){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Vm(){var i=mi;return mi<<=1,(mi&62914560)===0&&(mi=4194304),i}function hf(i){for(var s=[],l=0;31>l;l++)s.push(i);return s}function ao(i,s){i.pendingLanes|=s,s!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function oO(i,s,l,p,A,T){var I=i.pendingLanes;i.pendingLanes=l,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=l,i.entangledLanes&=l,i.errorRecoveryDisabledLanes&=l,i.shellSuspendCounter=0;var q=i.entanglements,Q=i.expirationTimes,ae=i.hiddenUpdates;for(l=I&~l;0<l;){var he=31-Rt(l),_e=1<<he;q[he]=0,Q[he]=-1;var oe=ae[he];if(oe!==null)for(ae[he]=null,he=0;he<oe.length;he++){var ce=oe[he];ce!==null&&(ce.lane&=-536870913)}l&=~_e}p!==0&&Xm(i,p,0),T!==0&&A===0&&i.tag!==0&&(i.suspendedLanes|=T&~(I&~s))}function Xm(i,s,l){i.pendingLanes|=s,i.suspendedLanes&=~s;var p=31-Rt(s);i.entangledLanes|=s,i.entanglements[p]=i.entanglements[p]|1073741824|l&261930}function Zm(i,s){var l=i.entangledLanes|=s;for(i=i.entanglements;l;){var p=31-Rt(l),A=1<<p;A&s|i[p]&s&&(i[p]|=s),l&=~A}}function Qm(i,s){var l=s&-s;return l=(l&42)!==0?1:ff(l),(l&(i.suspendedLanes|s))!==0?0:l}function ff(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function df(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function Jm(){var i=K.p;return i!==0?i:(i=window.event,i===void 0?32:N1(i.type))}function e0(i,s){var l=K.p;try{return K.p=i,s()}finally{K.p=l}}var bn=Math.random().toString(36).slice(2),Vt="__reactFiber$"+bn,vr="__reactProps$"+bn,Us="__reactContainer$"+bn,vf="__reactEvents$"+bn,lO="__reactListeners$"+bn,cO="__reactHandles$"+bn,t0="__reactResources$"+bn,oo="__reactMarker$"+bn;function pf(i){delete i[Vt],delete i[vr],delete i[vf],delete i[lO],delete i[cO]}function Fs(i){var s=i[Vt];if(s)return s;for(var l=i.parentNode;l;){if(s=l[Us]||l[Vt]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(i=w1(i);i!==null;){if(l=i[Vt])return l;i=w1(i)}return s}i=l,l=i.parentNode}return null}function qs(i){if(i=i[Vt]||i[Us]){var s=i.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return i}return null}function lo(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i.stateNode;throw Error(n(33))}function Ws(i){var s=i[t0];return s||(s=i[t0]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function zt(i){i[oo]=!0}var r0=new Set,i0={};function rs(i,s){Gs(i,s),Gs(i+"Capture",s)}function Gs(i,s){for(i0[i]=s,i=0;i<s.length;i++)r0.add(s[i])}var uO=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),n0={},s0={};function hO(i){return Dt.call(s0,i)?!0:Dt.call(n0,i)?!1:uO.test(i)?s0[i]=!0:(n0[i]=!0,!1)}function Gl(i,s,l){if(hO(s))if(l===null)i.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":i.removeAttribute(s);return;case"boolean":var p=s.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){i.removeAttribute(s);return}}i.setAttribute(s,""+l)}}function Kl(i,s,l){if(l===null)i.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(s);return}i.setAttribute(s,""+l)}}function ki(i,s,l,p){if(p===null)i.removeAttribute(l);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(l);return}i.setAttributeNS(s,l,""+p)}}function zr(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function a0(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function fO(i,s,l){var p=Object.getOwnPropertyDescriptor(i.constructor.prototype,s);if(!i.hasOwnProperty(s)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var A=p.get,T=p.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return A.call(this)},set:function(I){l=""+I,T.call(this,I)}}),Object.defineProperty(i,s,{enumerable:p.enumerable}),{getValue:function(){return l},setValue:function(I){l=""+I},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function gf(i){if(!i._valueTracker){var s=a0(i)?"checked":"value";i._valueTracker=fO(i,s,""+i[s])}}function o0(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var l=s.getValue(),p="";return i&&(p=a0(i)?i.checked?"true":"false":i.value),i=p,i!==l?(s.setValue(i),!0):!1}function Yl(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var dO=/[\n"\\]/g;function Hr(i){return i.replace(dO,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function _f(i,s,l,p,A,T,I,q){i.name="",I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?i.type=I:i.removeAttribute("type"),s!=null?I==="number"?(s===0&&i.value===""||i.value!=s)&&(i.value=""+zr(s)):i.value!==""+zr(s)&&(i.value=""+zr(s)):I!=="submit"&&I!=="reset"||i.removeAttribute("value"),s!=null?mf(i,I,zr(s)):l!=null?mf(i,I,zr(l)):p!=null&&i.removeAttribute("value"),A==null&&T!=null&&(i.defaultChecked=!!T),A!=null&&(i.checked=A&&typeof A!="function"&&typeof A!="symbol"),q!=null&&typeof q!="function"&&typeof q!="symbol"&&typeof q!="boolean"?i.name=""+zr(q):i.removeAttribute("name")}function l0(i,s,l,p,A,T,I,q){if(T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(i.type=T),s!=null||l!=null){if(!(T!=="submit"&&T!=="reset"||s!=null)){gf(i);return}l=l!=null?""+zr(l):"",s=s!=null?""+zr(s):l,q||s===i.value||(i.value=s),i.defaultValue=s}p=p??A,p=typeof p!="function"&&typeof p!="symbol"&&!!p,i.checked=q?i.checked:!!p,i.defaultChecked=!!p,I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"&&(i.name=I),gf(i)}function mf(i,s,l){s==="number"&&Yl(i.ownerDocument)===i||i.defaultValue===""+l||(i.defaultValue=""+l)}function Ks(i,s,l,p){if(i=i.options,s){s={};for(var A=0;A<l.length;A++)s["$"+l[A]]=!0;for(l=0;l<i.length;l++)A=s.hasOwnProperty("$"+i[l].value),i[l].selected!==A&&(i[l].selected=A),A&&p&&(i[l].defaultSelected=!0)}else{for(l=""+zr(l),s=null,A=0;A<i.length;A++){if(i[A].value===l){i[A].selected=!0,p&&(i[A].defaultSelected=!0);return}s!==null||i[A].disabled||(s=i[A])}s!==null&&(s.selected=!0)}}function c0(i,s,l){if(s!=null&&(s=""+zr(s),s!==i.value&&(i.value=s),l==null)){i.defaultValue!==s&&(i.defaultValue=s);return}i.defaultValue=l!=null?""+zr(l):""}function u0(i,s,l,p){if(s==null){if(p!=null){if(l!=null)throw Error(n(92));if(X(p)){if(1<p.length)throw Error(n(93));p=p[0]}l=p}l==null&&(l=""),s=l}l=zr(s),i.defaultValue=l,p=i.textContent,p===l&&p!==""&&p!==null&&(i.value=p),gf(i)}function Ys(i,s){if(s){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=s;return}}i.textContent=s}var vO=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function h0(i,s,l){var p=s.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?p?i.setProperty(s,""):s==="float"?i.cssFloat="":i[s]="":p?i.setProperty(s,l):typeof l!="number"||l===0||vO.has(s)?s==="float"?i.cssFloat=l:i[s]=(""+l).trim():i[s]=l+"px"}function f0(i,s,l){if(s!=null&&typeof s!="object")throw Error(n(62));if(i=i.style,l!=null){for(var p in l)!l.hasOwnProperty(p)||s!=null&&s.hasOwnProperty(p)||(p.indexOf("--")===0?i.setProperty(p,""):p==="float"?i.cssFloat="":i[p]="");for(var A in s)p=s[A],s.hasOwnProperty(A)&&l[A]!==p&&h0(i,A,p)}else for(var T in s)s.hasOwnProperty(T)&&h0(i,T,s[T])}function yf(i){if(i.indexOf("-")===-1)return!1;switch(i){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 pO=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),gO=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Vl(i){return gO.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Pi(){}var bf=null;function Sf(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Vs=null,Xs=null;function d0(i){var s=qs(i);if(s&&(i=s.stateNode)){var l=i[vr]||null;e:switch(i=s.stateNode,s.type){case"input":if(_f(i,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),s=l.name,l.type==="radio"&&s!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Hr(""+s)+'"][type="radio"]'),s=0;s<l.length;s++){var p=l[s];if(p!==i&&p.form===i.form){var A=p[vr]||null;if(!A)throw Error(n(90));_f(p,A.value,A.defaultValue,A.defaultValue,A.checked,A.defaultChecked,A.type,A.name)}}for(s=0;s<l.length;s++)p=l[s],p.form===i.form&&o0(p)}break e;case"textarea":c0(i,l.value,l.defaultValue);break e;case"select":s=l.value,s!=null&&Ks(i,!!l.multiple,s,!1)}}}var wf=!1;function v0(i,s,l){if(wf)return i(s,l);wf=!0;try{var p=i(s);return p}finally{if(wf=!1,(Vs!==null||Xs!==null)&&(jc(),Vs&&(s=Vs,i=Xs,Xs=Vs=null,d0(s),i)))for(s=0;s<i.length;s++)d0(i[s])}}function co(i,s){var l=i.stateNode;if(l===null)return null;var p=l[vr]||null;if(p===null)return null;l=p[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(i=i.type,p=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!p;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(n(231,s,typeof l));return l}var Bi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Cf=!1;if(Bi)try{var uo={};Object.defineProperty(uo,"passive",{get:function(){Cf=!0}}),window.addEventListener("test",uo,uo),window.removeEventListener("test",uo,uo)}catch{Cf=!1}var Sn=null,xf=null,Xl=null;function p0(){if(Xl)return Xl;var i,s=xf,l=s.length,p,A="value"in Sn?Sn.value:Sn.textContent,T=A.length;for(i=0;i<l&&s[i]===A[i];i++);var I=l-i;for(p=1;p<=I&&s[l-p]===A[T-p];p++);return Xl=A.slice(i,1<p?1-p:void 0)}function Zl(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function Ql(){return!0}function g0(){return!1}function pr(i){function s(l,p,A,T,I){this._reactName=l,this._targetInst=A,this.type=p,this.nativeEvent=T,this.target=I,this.currentTarget=null;for(var q in i)i.hasOwnProperty(q)&&(l=i[q],this[q]=l?l(T):T[q]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?Ql:g0,this.isPropagationStopped=g0,this}return u(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Ql)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Ql)},persist:function(){},isPersistent:Ql}),s}var is={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Jl=pr(is),ho=u({},is,{view:0,detail:0}),_O=pr(ho),Ef,Af,fo,ec=u({},ho,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Lf,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==fo&&(fo&&i.type==="mousemove"?(Ef=i.screenX-fo.screenX,Af=i.screenY-fo.screenY):Af=Ef=0,fo=i),Ef)},movementY:function(i){return"movementY"in i?i.movementY:Af}}),_0=pr(ec),mO=u({},ec,{dataTransfer:0}),yO=pr(mO),bO=u({},ho,{relatedTarget:0}),Mf=pr(bO),SO=u({},is,{animationName:0,elapsedTime:0,pseudoElement:0}),wO=pr(SO),CO=u({},is,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),xO=pr(CO),EO=u({},is,{data:0}),m0=pr(EO),AO={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},MO={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"},LO={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function OO(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=LO[i])?!!s[i]:!1}function Lf(){return OO}var TO=u({},ho,{key:function(i){if(i.key){var s=AO[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Zl(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?MO[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Lf,charCode:function(i){return i.type==="keypress"?Zl(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Zl(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),DO=pr(TO),RO=u({},ec,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),y0=pr(RO),kO=u({},ho,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Lf}),PO=pr(kO),BO=u({},is,{propertyName:0,elapsedTime:0,pseudoElement:0}),jO=pr(BO),IO=u({},ec,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),NO=pr(IO),zO=u({},is,{newState:0,oldState:0}),HO=pr(zO),$O=[9,13,27,32],Of=Bi&&"CompositionEvent"in window,vo=null;Bi&&"documentMode"in document&&(vo=document.documentMode);var UO=Bi&&"TextEvent"in window&&!vo,b0=Bi&&(!Of||vo&&8<vo&&11>=vo),S0=" ",w0=!1;function C0(i,s){switch(i){case"keyup":return $O.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function x0(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Zs=!1;function FO(i,s){switch(i){case"compositionend":return x0(s);case"keypress":return s.which!==32?null:(w0=!0,S0);case"textInput":return i=s.data,i===S0&&w0?null:i;default:return null}}function qO(i,s){if(Zs)return i==="compositionend"||!Of&&C0(i,s)?(i=p0(),Xl=xf=Sn=null,Zs=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return b0&&s.locale!=="ko"?null:s.data;default:return null}}var WO={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 E0(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!WO[i.type]:s==="textarea"}function A0(i,s,l,p){Vs?Xs?Xs.push(p):Xs=[p]:Vs=p,s=Fc(s,"onChange"),0<s.length&&(l=new Jl("onChange","change",null,l,p),i.push({event:l,listeners:s}))}var po=null,go=null;function GO(i){l1(i,0)}function tc(i){var s=lo(i);if(o0(s))return i}function M0(i,s){if(i==="change")return s}var L0=!1;if(Bi){var Tf;if(Bi){var Df="oninput"in document;if(!Df){var O0=document.createElement("div");O0.setAttribute("oninput","return;"),Df=typeof O0.oninput=="function"}Tf=Df}else Tf=!1;L0=Tf&&(!document.documentMode||9<document.documentMode)}function T0(){po&&(po.detachEvent("onpropertychange",D0),go=po=null)}function D0(i){if(i.propertyName==="value"&&tc(go)){var s=[];A0(s,go,i,Sf(i)),v0(GO,s)}}function KO(i,s,l){i==="focusin"?(T0(),po=s,go=l,po.attachEvent("onpropertychange",D0)):i==="focusout"&&T0()}function YO(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return tc(go)}function VO(i,s){if(i==="click")return tc(s)}function XO(i,s){if(i==="input"||i==="change")return tc(s)}function ZO(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var xr=typeof Object.is=="function"?Object.is:ZO;function _o(i,s){if(xr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var l=Object.keys(i),p=Object.keys(s);if(l.length!==p.length)return!1;for(p=0;p<l.length;p++){var A=l[p];if(!Dt.call(s,A)||!xr(i[A],s[A]))return!1}return!0}function R0(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function k0(i,s){var l=R0(i);i=0;for(var p;l;){if(l.nodeType===3){if(p=i+l.textContent.length,i<=s&&p>=s)return{node:l,offset:s-i};i=p}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=R0(l)}}function P0(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?P0(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function B0(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var s=Yl(i.document);s instanceof i.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch{l=!1}if(l)i=s.contentWindow;else break;s=Yl(i.document)}return s}function Rf(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}var QO=Bi&&"documentMode"in document&&11>=document.documentMode,Qs=null,kf=null,mo=null,Pf=!1;function j0(i,s,l){var p=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Pf||Qs==null||Qs!==Yl(p)||(p=Qs,"selectionStart"in p&&Rf(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),mo&&_o(mo,p)||(mo=p,p=Fc(kf,"onSelect"),0<p.length&&(s=new Jl("onSelect","select",null,s,l),i.push({event:s,listeners:p}),s.target=Qs)))}function ns(i,s){var l={};return l[i.toLowerCase()]=s.toLowerCase(),l["Webkit"+i]="webkit"+s,l["Moz"+i]="moz"+s,l}var Js={animationend:ns("Animation","AnimationEnd"),animationiteration:ns("Animation","AnimationIteration"),animationstart:ns("Animation","AnimationStart"),transitionrun:ns("Transition","TransitionRun"),transitionstart:ns("Transition","TransitionStart"),transitioncancel:ns("Transition","TransitionCancel"),transitionend:ns("Transition","TransitionEnd")},Bf={},I0={};Bi&&(I0=document.createElement("div").style,"AnimationEvent"in window||(delete Js.animationend.animation,delete Js.animationiteration.animation,delete Js.animationstart.animation),"TransitionEvent"in window||delete Js.transitionend.transition);function ss(i){if(Bf[i])return Bf[i];if(!Js[i])return i;var s=Js[i],l;for(l in s)if(s.hasOwnProperty(l)&&l in I0)return Bf[i]=s[l];return i}var N0=ss("animationend"),z0=ss("animationiteration"),H0=ss("animationstart"),JO=ss("transitionrun"),eT=ss("transitionstart"),tT=ss("transitioncancel"),$0=ss("transitionend"),U0=new Map,jf="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");jf.push("scrollEnd");function oi(i,s){U0.set(i,s),rs(s,[i])}var rc=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},$r=[],ea=0,If=0;function ic(){for(var i=ea,s=If=ea=0;s<i;){var l=$r[s];$r[s++]=null;var p=$r[s];$r[s++]=null;var A=$r[s];$r[s++]=null;var T=$r[s];if($r[s++]=null,p!==null&&A!==null){var I=p.pending;I===null?A.next=A:(A.next=I.next,I.next=A),p.pending=A}T!==0&&F0(l,A,T)}}function nc(i,s,l,p){$r[ea++]=i,$r[ea++]=s,$r[ea++]=l,$r[ea++]=p,If|=p,i.lanes|=p,i=i.alternate,i!==null&&(i.lanes|=p)}function Nf(i,s,l,p){return nc(i,s,l,p),sc(i)}function as(i,s){return nc(i,null,null,s),sc(i)}function F0(i,s,l){i.lanes|=l;var p=i.alternate;p!==null&&(p.lanes|=l);for(var A=!1,T=i.return;T!==null;)T.childLanes|=l,p=T.alternate,p!==null&&(p.childLanes|=l),T.tag===22&&(i=T.stateNode,i===null||i._visibility&1||(A=!0)),i=T,T=T.return;return i.tag===3?(T=i.stateNode,A&&s!==null&&(A=31-Rt(l),i=T.hiddenUpdates,p=i[A],p===null?i[A]=[s]:p.push(s),s.lane=l|536870912),T):null}function sc(i){if(50<Ho)throw Ho=0,Kd=null,Error(n(185));for(var s=i.return;s!==null;)i=s,s=i.return;return i.tag===3?i.stateNode:null}var ta={};function rT(i,s,l,p){this.tag=i,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Er(i,s,l,p){return new rT(i,s,l,p)}function zf(i){return i=i.prototype,!(!i||!i.isReactComponent)}function ji(i,s){var l=i.alternate;return l===null?(l=Er(i.tag,s,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=s,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&65011712,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,s=i.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l.refCleanup=i.refCleanup,l}function q0(i,s){i.flags&=65011714;var l=i.alternate;return l===null?(i.childLanes=0,i.lanes=s,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=l.childLanes,i.lanes=l.lanes,i.child=l.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=l.memoizedProps,i.memoizedState=l.memoizedState,i.updateQueue=l.updateQueue,i.type=l.type,s=l.dependencies,i.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),i}function ac(i,s,l,p,A,T){var I=0;if(p=i,typeof i=="function")zf(i)&&(I=1);else if(typeof i=="string")I=oD(i,l,te.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case D:return i=Er(31,l,s,A),i.elementType=D,i.lanes=T,i;case _:return os(l.children,A,T,s);case d:I=8,A|=24;break;case y:return i=Er(12,l,s,A|2),i.elementType=y,i.lanes=T,i;case L:return i=Er(13,l,s,A),i.elementType=L,i.lanes=T,i;case x:return i=Er(19,l,s,A),i.elementType=x,i.lanes=T,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case S:I=10;break e;case b:I=9;break e;case E:I=11;break e;case O:I=14;break e;case M:I=16,p=null;break e}I=29,l=Error(n(130,i===null?"null":typeof i,"")),p=null}return s=Er(I,l,s,A),s.elementType=i,s.type=p,s.lanes=T,s}function os(i,s,l,p){return i=Er(7,i,p,s),i.lanes=l,i}function Hf(i,s,l){return i=Er(6,i,null,s),i.lanes=l,i}function W0(i){var s=Er(18,null,null,0);return s.stateNode=i,s}function $f(i,s,l){return s=Er(4,i.children!==null?i.children:[],i.key,s),s.lanes=l,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}var G0=new WeakMap;function Ur(i,s){if(typeof i=="object"&&i!==null){var l=G0.get(i);return l!==void 0?l:(s={value:i,source:s,stack:Ve(s)},G0.set(i,s),s)}return{value:i,source:s,stack:Ve(s)}}var ra=[],ia=0,oc=null,yo=0,Fr=[],qr=0,wn=null,yi=1,bi="";function Ii(i,s){ra[ia++]=yo,ra[ia++]=oc,oc=i,yo=s}function K0(i,s,l){Fr[qr++]=yi,Fr[qr++]=bi,Fr[qr++]=wn,wn=i;var p=yi;i=bi;var A=32-Rt(p)-1;p&=~(1<<A),l+=1;var T=32-Rt(s)+A;if(30<T){var I=A-A%5;T=(p&(1<<I)-1).toString(32),p>>=I,A-=I,yi=1<<32-Rt(s)+A|l<<A|p,bi=T+i}else yi=1<<T|l<<A|p,bi=i}function Uf(i){i.return!==null&&(Ii(i,1),K0(i,1,0))}function Ff(i){for(;i===oc;)oc=ra[--ia],ra[ia]=null,yo=ra[--ia],ra[ia]=null;for(;i===wn;)wn=Fr[--qr],Fr[qr]=null,bi=Fr[--qr],Fr[qr]=null,yi=Fr[--qr],Fr[qr]=null}function Y0(i,s){Fr[qr++]=yi,Fr[qr++]=bi,Fr[qr++]=wn,yi=s.id,bi=s.overflow,wn=i}var Xt=null,ut=null,We=!1,Cn=null,Wr=!1,qf=Error(n(519));function xn(i){var s=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw bo(Ur(s,i)),qf}function V0(i){var s=i.stateNode,l=i.type,p=i.memoizedProps;switch(s[Vt]=i,s[vr]=p,l){case"dialog":He("cancel",s),He("close",s);break;case"iframe":case"object":case"embed":He("load",s);break;case"video":case"audio":for(l=0;l<Uo.length;l++)He(Uo[l],s);break;case"source":He("error",s);break;case"img":case"image":case"link":He("error",s),He("load",s);break;case"details":He("toggle",s);break;case"input":He("invalid",s),l0(s,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":He("invalid",s);break;case"textarea":He("invalid",s),u0(s,p.value,p.defaultValue,p.children)}l=p.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||s.textContent===""+l||p.suppressHydrationWarning===!0||f1(s.textContent,l)?(p.popover!=null&&(He("beforetoggle",s),He("toggle",s)),p.onScroll!=null&&He("scroll",s),p.onScrollEnd!=null&&He("scrollend",s),p.onClick!=null&&(s.onclick=Pi),s=!0):s=!1,s||xn(i,!0)}function X0(i){for(Xt=i.return;Xt;)switch(Xt.tag){case 5:case 31:case 13:Wr=!1;return;case 27:case 3:Wr=!0;return;default:Xt=Xt.return}}function na(i){if(i!==Xt)return!1;if(!We)return X0(i),We=!0,!1;var s=i.tag,l;if((l=s!==3&&s!==27)&&((l=s===5)&&(l=i.type,l=!(l!=="form"&&l!=="button")||lv(i.type,i.memoizedProps)),l=!l),l&&ut&&xn(i),X0(i),s===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));ut=S1(i)}else if(s===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));ut=S1(i)}else s===27?(s=ut,Nn(i.type)?(i=dv,dv=null,ut=i):ut=s):ut=Xt?Kr(i.stateNode.nextSibling):null;return!0}function ls(){ut=Xt=null,We=!1}function Wf(){var i=Cn;return i!==null&&(yr===null?yr=i:yr.push.apply(yr,i),Cn=null),i}function bo(i){Cn===null?Cn=[i]:Cn.push(i)}var Gf=N(null),cs=null,Ni=null;function En(i,s,l){J(Gf,s._currentValue),s._currentValue=l}function zi(i){i._currentValue=Gf.current,U(Gf)}function Kf(i,s,l){for(;i!==null;){var p=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,p!==null&&(p.childLanes|=s)):p!==null&&(p.childLanes&s)!==s&&(p.childLanes|=s),i===l)break;i=i.return}}function Yf(i,s,l,p){var A=i.child;for(A!==null&&(A.return=i);A!==null;){var T=A.dependencies;if(T!==null){var I=A.child;T=T.firstContext;e:for(;T!==null;){var q=T;T=A;for(var Q=0;Q<s.length;Q++)if(q.context===s[Q]){T.lanes|=l,q=T.alternate,q!==null&&(q.lanes|=l),Kf(T.return,l,i),p||(I=null);break e}T=q.next}}else if(A.tag===18){if(I=A.return,I===null)throw Error(n(341));I.lanes|=l,T=I.alternate,T!==null&&(T.lanes|=l),Kf(I,l,i),I=null}else I=A.child;if(I!==null)I.return=A;else for(I=A;I!==null;){if(I===i){I=null;break}if(A=I.sibling,A!==null){A.return=I.return,I=A;break}I=I.return}A=I}}function sa(i,s,l,p){i=null;for(var A=s,T=!1;A!==null;){if(!T){if((A.flags&524288)!==0)T=!0;else if((A.flags&262144)!==0)break}if(A.tag===10){var I=A.alternate;if(I===null)throw Error(n(387));if(I=I.memoizedProps,I!==null){var q=A.type;xr(A.pendingProps.value,I.value)||(i!==null?i.push(q):i=[q])}}else if(A===Z.current){if(I=A.alternate,I===null)throw Error(n(387));I.memoizedState.memoizedState!==A.memoizedState.memoizedState&&(i!==null?i.push(Ko):i=[Ko])}A=A.return}i!==null&&Yf(s,i,l,p),s.flags|=262144}function lc(i){for(i=i.firstContext;i!==null;){if(!xr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function us(i){cs=i,Ni=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Zt(i){return Z0(cs,i)}function cc(i,s){return cs===null&&us(i),Z0(i,s)}function Z0(i,s){var l=s._currentValue;if(s={context:s,memoizedValue:l,next:null},Ni===null){if(i===null)throw Error(n(308));Ni=s,i.dependencies={lanes:0,firstContext:s},i.flags|=524288}else Ni=Ni.next=s;return l}var iT=typeof AbortController<"u"?AbortController:function(){var i=[],s=this.signal={aborted:!1,addEventListener:function(l,p){i.push(p)}};this.abort=function(){s.aborted=!0,i.forEach(function(l){return l()})}},nT=e.unstable_scheduleCallback,sT=e.unstable_NormalPriority,At={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Vf(){return{controller:new iT,data:new Map,refCount:0}}function So(i){i.refCount--,i.refCount===0&&nT(sT,function(){i.controller.abort()})}var wo=null,Xf=0,aa=0,oa=null;function aT(i,s){if(wo===null){var l=wo=[];Xf=0,aa=Jd(),oa={status:"pending",value:void 0,then:function(p){l.push(p)}}}return Xf++,s.then(Q0,Q0),s}function Q0(){if(--Xf===0&&wo!==null){oa!==null&&(oa.status="fulfilled");var i=wo;wo=null,aa=0,oa=null;for(var s=0;s<i.length;s++)(0,i[s])()}}function oT(i,s){var l=[],p={status:"pending",value:null,reason:null,then:function(A){l.push(A)}};return i.then(function(){p.status="fulfilled",p.value=s;for(var A=0;A<l.length;A++)(0,l[A])(s)},function(A){for(p.status="rejected",p.reason=A,A=0;A<l.length;A++)(0,l[A])(void 0)}),p}var J0=F.S;F.S=function(i,s){jb=we(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&aT(i,s),J0!==null&&J0(i,s)};var hs=N(null);function Zf(){var i=hs.current;return i!==null?i:st.pooledCache}function uc(i,s){s===null?J(hs,hs.current):J(hs,s.pool)}function ey(){var i=Zf();return i===null?null:{parent:At._currentValue,pool:i}}var la=Error(n(460)),Qf=Error(n(474)),hc=Error(n(542)),fc={then:function(){}};function ty(i){return i=i.status,i==="fulfilled"||i==="rejected"}function ry(i,s,l){switch(l=i[l],l===void 0?i.push(s):l!==s&&(s.then(Pi,Pi),s=l),s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,ny(i),i;default:if(typeof s.status=="string")s.then(Pi,Pi);else{if(i=st,i!==null&&100<i.shellSuspendCounter)throw Error(n(482));i=s,i.status="pending",i.then(function(p){if(s.status==="pending"){var A=s;A.status="fulfilled",A.value=p}},function(p){if(s.status==="pending"){var A=s;A.status="rejected",A.reason=p}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,ny(i),i}throw ds=s,la}}function fs(i){try{var s=i._init;return s(i._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(ds=l,la):l}}var ds=null;function iy(){if(ds===null)throw Error(n(459));var i=ds;return ds=null,i}function ny(i){if(i===la||i===hc)throw Error(n(483))}var ca=null,Co=0;function dc(i){var s=Co;return Co+=1,ca===null&&(ca=[]),ry(ca,i,s)}function xo(i,s){s=s.props.ref,i.ref=s!==void 0?s:null}function vc(i,s){throw s.$$typeof===m?Error(n(525)):(i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i)))}function sy(i){function s(ne,re){if(i){var se=ne.deletions;se===null?(ne.deletions=[re],ne.flags|=16):se.push(re)}}function l(ne,re){if(!i)return null;for(;re!==null;)s(ne,re),re=re.sibling;return null}function p(ne){for(var re=new Map;ne!==null;)ne.key!==null?re.set(ne.key,ne):re.set(ne.index,ne),ne=ne.sibling;return re}function A(ne,re){return ne=ji(ne,re),ne.index=0,ne.sibling=null,ne}function T(ne,re,se){return ne.index=se,i?(se=ne.alternate,se!==null?(se=se.index,se<re?(ne.flags|=67108866,re):se):(ne.flags|=67108866,re)):(ne.flags|=1048576,re)}function I(ne){return i&&ne.alternate===null&&(ne.flags|=67108866),ne}function q(ne,re,se,pe){return re===null||re.tag!==6?(re=Hf(se,ne.mode,pe),re.return=ne,re):(re=A(re,se),re.return=ne,re)}function Q(ne,re,se,pe){var Le=se.type;return Le===_?he(ne,re,se.props.children,pe,se.key):re!==null&&(re.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===M&&fs(Le)===re.type)?(re=A(re,se.props),xo(re,se),re.return=ne,re):(re=ac(se.type,se.key,se.props,null,ne.mode,pe),xo(re,se),re.return=ne,re)}function ae(ne,re,se,pe){return re===null||re.tag!==4||re.stateNode.containerInfo!==se.containerInfo||re.stateNode.implementation!==se.implementation?(re=$f(se,ne.mode,pe),re.return=ne,re):(re=A(re,se.children||[]),re.return=ne,re)}function he(ne,re,se,pe,Le){return re===null||re.tag!==7?(re=os(se,ne.mode,pe,Le),re.return=ne,re):(re=A(re,se),re.return=ne,re)}function _e(ne,re,se){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return re=Hf(""+re,ne.mode,se),re.return=ne,re;if(typeof re=="object"&&re!==null){switch(re.$$typeof){case w:return se=ac(re.type,re.key,re.props,null,ne.mode,se),xo(se,re),se.return=ne,se;case C:return re=$f(re,ne.mode,se),re.return=ne,re;case M:return re=fs(re),_e(ne,re,se)}if(X(re)||R(re))return re=os(re,ne.mode,se,null),re.return=ne,re;if(typeof re.then=="function")return _e(ne,dc(re),se);if(re.$$typeof===S)return _e(ne,cc(ne,re),se);vc(ne,re)}return null}function oe(ne,re,se,pe){var Le=re!==null?re.key:null;if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return Le!==null?null:q(ne,re,""+se,pe);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case w:return se.key===Le?Q(ne,re,se,pe):null;case C:return se.key===Le?ae(ne,re,se,pe):null;case M:return se=fs(se),oe(ne,re,se,pe)}if(X(se)||R(se))return Le!==null?null:he(ne,re,se,pe,null);if(typeof se.then=="function")return oe(ne,re,dc(se),pe);if(se.$$typeof===S)return oe(ne,re,cc(ne,se),pe);vc(ne,se)}return null}function ce(ne,re,se,pe,Le){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return ne=ne.get(se)||null,q(re,ne,""+pe,Le);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case w:return ne=ne.get(pe.key===null?se:pe.key)||null,Q(re,ne,pe,Le);case C:return ne=ne.get(pe.key===null?se:pe.key)||null,ae(re,ne,pe,Le);case M:return pe=fs(pe),ce(ne,re,se,pe,Le)}if(X(pe)||R(pe))return ne=ne.get(se)||null,he(re,ne,pe,Le,null);if(typeof pe.then=="function")return ce(ne,re,se,dc(pe),Le);if(pe.$$typeof===S)return ce(ne,re,se,cc(re,pe),Le);vc(re,pe)}return null}function Ee(ne,re,se,pe){for(var Le=null,Ge=null,Ae=re,Ne=re=0,Fe=null;Ae!==null&&Ne<se.length;Ne++){Ae.index>Ne?(Fe=Ae,Ae=null):Fe=Ae.sibling;var Ke=oe(ne,Ae,se[Ne],pe);if(Ke===null){Ae===null&&(Ae=Fe);break}i&&Ae&&Ke.alternate===null&&s(ne,Ae),re=T(Ke,re,Ne),Ge===null?Le=Ke:Ge.sibling=Ke,Ge=Ke,Ae=Fe}if(Ne===se.length)return l(ne,Ae),We&&Ii(ne,Ne),Le;if(Ae===null){for(;Ne<se.length;Ne++)Ae=_e(ne,se[Ne],pe),Ae!==null&&(re=T(Ae,re,Ne),Ge===null?Le=Ae:Ge.sibling=Ae,Ge=Ae);return We&&Ii(ne,Ne),Le}for(Ae=p(Ae);Ne<se.length;Ne++)Fe=ce(Ae,ne,Ne,se[Ne],pe),Fe!==null&&(i&&Fe.alternate!==null&&Ae.delete(Fe.key===null?Ne:Fe.key),re=T(Fe,re,Ne),Ge===null?Le=Fe:Ge.sibling=Fe,Ge=Fe);return i&&Ae.forEach(function(Fn){return s(ne,Fn)}),We&&Ii(ne,Ne),Le}function De(ne,re,se,pe){if(se==null)throw Error(n(151));for(var Le=null,Ge=null,Ae=re,Ne=re=0,Fe=null,Ke=se.next();Ae!==null&&!Ke.done;Ne++,Ke=se.next()){Ae.index>Ne?(Fe=Ae,Ae=null):Fe=Ae.sibling;var Fn=oe(ne,Ae,Ke.value,pe);if(Fn===null){Ae===null&&(Ae=Fe);break}i&&Ae&&Fn.alternate===null&&s(ne,Ae),re=T(Fn,re,Ne),Ge===null?Le=Fn:Ge.sibling=Fn,Ge=Fn,Ae=Fe}if(Ke.done)return l(ne,Ae),We&&Ii(ne,Ne),Le;if(Ae===null){for(;!Ke.done;Ne++,Ke=se.next())Ke=_e(ne,Ke.value,pe),Ke!==null&&(re=T(Ke,re,Ne),Ge===null?Le=Ke:Ge.sibling=Ke,Ge=Ke);return We&&Ii(ne,Ne),Le}for(Ae=p(Ae);!Ke.done;Ne++,Ke=se.next())Ke=ce(Ae,ne,Ne,Ke.value,pe),Ke!==null&&(i&&Ke.alternate!==null&&Ae.delete(Ke.key===null?Ne:Ke.key),re=T(Ke,re,Ne),Ge===null?Le=Ke:Ge.sibling=Ke,Ge=Ke);return i&&Ae.forEach(function(mD){return s(ne,mD)}),We&&Ii(ne,Ne),Le}function it(ne,re,se,pe){if(typeof se=="object"&&se!==null&&se.type===_&&se.key===null&&(se=se.props.children),typeof se=="object"&&se!==null){switch(se.$$typeof){case w:e:{for(var Le=se.key;re!==null;){if(re.key===Le){if(Le=se.type,Le===_){if(re.tag===7){l(ne,re.sibling),pe=A(re,se.props.children),pe.return=ne,ne=pe;break e}}else if(re.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===M&&fs(Le)===re.type){l(ne,re.sibling),pe=A(re,se.props),xo(pe,se),pe.return=ne,ne=pe;break e}l(ne,re);break}else s(ne,re);re=re.sibling}se.type===_?(pe=os(se.props.children,ne.mode,pe,se.key),pe.return=ne,ne=pe):(pe=ac(se.type,se.key,se.props,null,ne.mode,pe),xo(pe,se),pe.return=ne,ne=pe)}return I(ne);case C:e:{for(Le=se.key;re!==null;){if(re.key===Le)if(re.tag===4&&re.stateNode.containerInfo===se.containerInfo&&re.stateNode.implementation===se.implementation){l(ne,re.sibling),pe=A(re,se.children||[]),pe.return=ne,ne=pe;break e}else{l(ne,re);break}else s(ne,re);re=re.sibling}pe=$f(se,ne.mode,pe),pe.return=ne,ne=pe}return I(ne);case M:return se=fs(se),it(ne,re,se,pe)}if(X(se))return Ee(ne,re,se,pe);if(R(se)){if(Le=R(se),typeof Le!="function")throw Error(n(150));return se=Le.call(se),De(ne,re,se,pe)}if(typeof se.then=="function")return it(ne,re,dc(se),pe);if(se.$$typeof===S)return it(ne,re,cc(ne,se),pe);vc(ne,se)}return typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint"?(se=""+se,re!==null&&re.tag===6?(l(ne,re.sibling),pe=A(re,se),pe.return=ne,ne=pe):(l(ne,re),pe=Hf(se,ne.mode,pe),pe.return=ne,ne=pe),I(ne)):l(ne,re)}return function(ne,re,se,pe){try{Co=0;var Le=it(ne,re,se,pe);return ca=null,Le}catch(Ae){if(Ae===la||Ae===hc)throw Ae;var Ge=Er(29,Ae,null,ne.mode);return Ge.lanes=pe,Ge.return=ne,Ge}finally{}}}var vs=sy(!0),ay=sy(!1),An=!1;function Jf(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ed(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Mn(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Ln(i,s,l){var p=i.updateQueue;if(p===null)return null;if(p=p.shared,(Xe&2)!==0){var A=p.pending;return A===null?s.next=s:(s.next=A.next,A.next=s),p.pending=s,s=sc(i),F0(i,null,l),s}return nc(i,p,s,l),sc(i)}function Eo(i,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194048)!==0)){var p=s.lanes;p&=i.pendingLanes,l|=p,s.lanes=l,Zm(i,l)}}function td(i,s){var l=i.updateQueue,p=i.alternate;if(p!==null&&(p=p.updateQueue,l===p)){var A=null,T=null;if(l=l.firstBaseUpdate,l!==null){do{var I={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};T===null?A=T=I:T=T.next=I,l=l.next}while(l!==null);T===null?A=T=s:T=T.next=s}else A=T=s;l={baseState:p.baseState,firstBaseUpdate:A,lastBaseUpdate:T,shared:p.shared,callbacks:p.callbacks},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=s:i.next=s,l.lastBaseUpdate=s}var rd=!1;function Ao(){if(rd){var i=oa;if(i!==null)throw i}}function Mo(i,s,l,p){rd=!1;var A=i.updateQueue;An=!1;var T=A.firstBaseUpdate,I=A.lastBaseUpdate,q=A.shared.pending;if(q!==null){A.shared.pending=null;var Q=q,ae=Q.next;Q.next=null,I===null?T=ae:I.next=ae,I=Q;var he=i.alternate;he!==null&&(he=he.updateQueue,q=he.lastBaseUpdate,q!==I&&(q===null?he.firstBaseUpdate=ae:q.next=ae,he.lastBaseUpdate=Q))}if(T!==null){var _e=A.baseState;I=0,he=ae=Q=null,q=T;do{var oe=q.lane&-536870913,ce=oe!==q.lane;if(ce?(Ue&oe)===oe:(p&oe)===oe){oe!==0&&oe===aa&&(rd=!0),he!==null&&(he=he.next={lane:0,tag:q.tag,payload:q.payload,callback:null,next:null});e:{var Ee=i,De=q;oe=s;var it=l;switch(De.tag){case 1:if(Ee=De.payload,typeof Ee=="function"){_e=Ee.call(it,_e,oe);break e}_e=Ee;break e;case 3:Ee.flags=Ee.flags&-65537|128;case 0:if(Ee=De.payload,oe=typeof Ee=="function"?Ee.call(it,_e,oe):Ee,oe==null)break e;_e=u({},_e,oe);break e;case 2:An=!0}}oe=q.callback,oe!==null&&(i.flags|=64,ce&&(i.flags|=8192),ce=A.callbacks,ce===null?A.callbacks=[oe]:ce.push(oe))}else ce={lane:oe,tag:q.tag,payload:q.payload,callback:q.callback,next:null},he===null?(ae=he=ce,Q=_e):he=he.next=ce,I|=oe;if(q=q.next,q===null){if(q=A.shared.pending,q===null)break;ce=q,q=ce.next,ce.next=null,A.lastBaseUpdate=ce,A.shared.pending=null}}while(!0);he===null&&(Q=_e),A.baseState=Q,A.firstBaseUpdate=ae,A.lastBaseUpdate=he,T===null&&(A.shared.lanes=0),kn|=I,i.lanes=I,i.memoizedState=_e}}function oy(i,s){if(typeof i!="function")throw Error(n(191,i));i.call(s)}function ly(i,s){var l=i.callbacks;if(l!==null)for(i.callbacks=null,i=0;i<l.length;i++)oy(l[i],s)}var ua=N(null),pc=N(0);function cy(i,s){i=Yi,J(pc,i),J(ua,s),Yi=i|s.baseLanes}function id(){J(pc,Yi),J(ua,ua.current)}function nd(){Yi=pc.current,U(ua),U(pc)}var Ar=N(null),Gr=null;function On(i){var s=i.alternate;J(Ct,Ct.current&1),J(Ar,i),Gr===null&&(s===null||ua.current!==null||s.memoizedState!==null)&&(Gr=i)}function sd(i){J(Ct,Ct.current),J(Ar,i),Gr===null&&(Gr=i)}function uy(i){i.tag===22?(J(Ct,Ct.current),J(Ar,i),Gr===null&&(Gr=i)):Tn()}function Tn(){J(Ct,Ct.current),J(Ar,Ar.current)}function Mr(i){U(Ar),Gr===i&&(Gr=null),U(Ct)}var Ct=N(0);function gc(i){for(var s=i;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||hv(l)||fv(l)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Hi=0,Ie=null,tt=null,Mt=null,_c=!1,ha=!1,ps=!1,mc=0,Lo=0,fa=null,lT=0;function yt(){throw Error(n(321))}function ad(i,s){if(s===null)return!1;for(var l=0;l<s.length&&l<i.length;l++)if(!xr(i[l],s[l]))return!1;return!0}function od(i,s,l,p,A,T){return Hi=T,Ie=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,F.H=i===null||i.memoizedState===null?Ky:wd,ps=!1,T=l(p,A),ps=!1,ha&&(T=fy(s,l,p,A)),hy(i),T}function hy(i){F.H=Do;var s=tt!==null&&tt.next!==null;if(Hi=0,Mt=tt=Ie=null,_c=!1,Lo=0,fa=null,s)throw Error(n(300));i===null||Lt||(i=i.dependencies,i!==null&&lc(i)&&(Lt=!0))}function fy(i,s,l,p){Ie=i;var A=0;do{if(ha&&(fa=null),Lo=0,ha=!1,25<=A)throw Error(n(301));if(A+=1,Mt=tt=null,i.updateQueue!=null){var T=i.updateQueue;T.lastEffect=null,T.events=null,T.stores=null,T.memoCache!=null&&(T.memoCache.index=0)}F.H=Yy,T=s(l,p)}while(ha);return T}function cT(){var i=F.H,s=i.useState()[0];return s=typeof s.then=="function"?Oo(s):s,i=i.useState()[0],(tt!==null?tt.memoizedState:null)!==i&&(Ie.flags|=1024),s}function ld(){var i=mc!==0;return mc=0,i}function cd(i,s,l){s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~l}function ud(i){if(_c){for(i=i.memoizedState;i!==null;){var s=i.queue;s!==null&&(s.pending=null),i=i.next}_c=!1}Hi=0,Mt=tt=Ie=null,ha=!1,Lo=mc=0,fa=null}function cr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?Ie.memoizedState=Mt=i:Mt=Mt.next=i,Mt}function xt(){if(tt===null){var i=Ie.alternate;i=i!==null?i.memoizedState:null}else i=tt.next;var s=Mt===null?Ie.memoizedState:Mt.next;if(s!==null)Mt=s,tt=i;else{if(i===null)throw Ie.alternate===null?Error(n(467)):Error(n(310));tt=i,i={memoizedState:tt.memoizedState,baseState:tt.baseState,baseQueue:tt.baseQueue,queue:tt.queue,next:null},Mt===null?Ie.memoizedState=Mt=i:Mt=Mt.next=i}return Mt}function yc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Oo(i){var s=Lo;return Lo+=1,fa===null&&(fa=[]),i=ry(fa,i,s),s=Ie,(Mt===null?s.memoizedState:Mt.next)===null&&(s=s.alternate,F.H=s===null||s.memoizedState===null?Ky:wd),i}function bc(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Oo(i);if(i.$$typeof===S)return Zt(i)}throw Error(n(438,String(i)))}function hd(i){var s=null,l=Ie.updateQueue;if(l!==null&&(s=l.memoCache),s==null){var p=Ie.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(s={data:p.data.map(function(A){return A.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),l===null&&(l=yc(),Ie.updateQueue=l),l.memoCache=s,l=s.data[s.index],l===void 0)for(l=s.data[s.index]=Array(i),p=0;p<i;p++)l[p]=k;return s.index++,l}function $i(i,s){return typeof s=="function"?s(i):s}function Sc(i){var s=xt();return fd(s,tt,i)}function fd(i,s,l){var p=i.queue;if(p===null)throw Error(n(311));p.lastRenderedReducer=l;var A=i.baseQueue,T=p.pending;if(T!==null){if(A!==null){var I=A.next;A.next=T.next,T.next=I}s.baseQueue=A=T,p.pending=null}if(T=i.baseState,A===null)i.memoizedState=T;else{s=A.next;var q=I=null,Q=null,ae=s,he=!1;do{var _e=ae.lane&-536870913;if(_e!==ae.lane?(Ue&_e)===_e:(Hi&_e)===_e){var oe=ae.revertLane;if(oe===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null}),_e===aa&&(he=!0);else if((Hi&oe)===oe){ae=ae.next,oe===aa&&(he=!0);continue}else _e={lane:0,revertLane:ae.revertLane,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},Q===null?(q=Q=_e,I=T):Q=Q.next=_e,Ie.lanes|=oe,kn|=oe;_e=ae.action,ps&&l(T,_e),T=ae.hasEagerState?ae.eagerState:l(T,_e)}else oe={lane:_e,revertLane:ae.revertLane,gesture:ae.gesture,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},Q===null?(q=Q=oe,I=T):Q=Q.next=oe,Ie.lanes|=_e,kn|=_e;ae=ae.next}while(ae!==null&&ae!==s);if(Q===null?I=T:Q.next=q,!xr(T,i.memoizedState)&&(Lt=!0,he&&(l=oa,l!==null)))throw l;i.memoizedState=T,i.baseState=I,i.baseQueue=Q,p.lastRenderedState=T}return A===null&&(p.lanes=0),[i.memoizedState,p.dispatch]}function dd(i){var s=xt(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var p=l.dispatch,A=l.pending,T=s.memoizedState;if(A!==null){l.pending=null;var I=A=A.next;do T=i(T,I.action),I=I.next;while(I!==A);xr(T,s.memoizedState)||(Lt=!0),s.memoizedState=T,s.baseQueue===null&&(s.baseState=T),l.lastRenderedState=T}return[T,p]}function dy(i,s,l){var p=Ie,A=xt(),T=We;if(T){if(l===void 0)throw Error(n(407));l=l()}else l=s();var I=!xr((tt||A).memoizedState,l);if(I&&(A.memoizedState=l,Lt=!0),A=A.queue,gd(gy.bind(null,p,A,i),[i]),A.getSnapshot!==s||I||Mt!==null&&Mt.memoizedState.tag&1){if(p.flags|=2048,da(9,{destroy:void 0},py.bind(null,p,A,l,s),null),st===null)throw Error(n(349));T||(Hi&127)!==0||vy(p,s,l)}return l}function vy(i,s,l){i.flags|=16384,i={getSnapshot:s,value:l},s=Ie.updateQueue,s===null?(s=yc(),Ie.updateQueue=s,s.stores=[i]):(l=s.stores,l===null?s.stores=[i]:l.push(i))}function py(i,s,l,p){s.value=l,s.getSnapshot=p,_y(s)&&my(i)}function gy(i,s,l){return l(function(){_y(s)&&my(i)})}function _y(i){var s=i.getSnapshot;i=i.value;try{var l=s();return!xr(i,l)}catch{return!0}}function my(i){var s=as(i,2);s!==null&&br(s,i,2)}function vd(i){var s=cr();if(typeof i=="function"){var l=i;if(i=l(),ps){Nt(!0);try{l()}finally{Nt(!1)}}}return s.memoizedState=s.baseState=i,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$i,lastRenderedState:i},s}function yy(i,s,l,p){return i.baseState=l,fd(i,tt,typeof p=="function"?p:$i)}function uT(i,s,l,p,A){if(xc(i))throw Error(n(485));if(i=s.action,i!==null){var T={payload:A,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(I){T.listeners.push(I)}};F.T!==null?l(!0):T.isTransition=!1,p(T),l=s.pending,l===null?(T.next=s.pending=T,by(s,T)):(T.next=l.next,s.pending=l.next=T)}}function by(i,s){var l=s.action,p=s.payload,A=i.state;if(s.isTransition){var T=F.T,I={};F.T=I;try{var q=l(A,p),Q=F.S;Q!==null&&Q(I,q),Sy(i,s,q)}catch(ae){pd(i,s,ae)}finally{T!==null&&I.types!==null&&(T.types=I.types),F.T=T}}else try{T=l(A,p),Sy(i,s,T)}catch(ae){pd(i,s,ae)}}function Sy(i,s,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(p){wy(i,s,p)},function(p){return pd(i,s,p)}):wy(i,s,l)}function wy(i,s,l){s.status="fulfilled",s.value=l,Cy(s),i.state=l,s=i.pending,s!==null&&(l=s.next,l===s?i.pending=null:(l=l.next,s.next=l,by(i,l)))}function pd(i,s,l){var p=i.pending;if(i.pending=null,p!==null){p=p.next;do s.status="rejected",s.reason=l,Cy(s),s=s.next;while(s!==p)}i.action=null}function Cy(i){i=i.listeners;for(var s=0;s<i.length;s++)(0,i[s])()}function xy(i,s){return s}function Ey(i,s){if(We){var l=st.formState;if(l!==null){e:{var p=Ie;if(We){if(ut){t:{for(var A=ut,T=Wr;A.nodeType!==8;){if(!T){A=null;break t}if(A=Kr(A.nextSibling),A===null){A=null;break t}}T=A.data,A=T==="F!"||T==="F"?A:null}if(A){ut=Kr(A.nextSibling),p=A.data==="F!";break e}}xn(p)}p=!1}p&&(s=l[0])}}return l=cr(),l.memoizedState=l.baseState=s,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xy,lastRenderedState:s},l.queue=p,l=qy.bind(null,Ie,p),p.dispatch=l,p=vd(!1),T=Sd.bind(null,Ie,!1,p.queue),p=cr(),A={state:s,dispatch:null,action:i,pending:null},p.queue=A,l=uT.bind(null,Ie,A,T,l),A.dispatch=l,p.memoizedState=i,[s,l,!1]}function Ay(i){var s=xt();return My(s,tt,i)}function My(i,s,l){if(s=fd(i,s,xy)[0],i=Sc($i)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var p=Oo(s)}catch(I){throw I===la?hc:I}else p=s;s=xt();var A=s.queue,T=A.dispatch;return l!==s.memoizedState&&(Ie.flags|=2048,da(9,{destroy:void 0},hT.bind(null,A,l),null)),[p,T,i]}function hT(i,s){i.action=s}function Ly(i){var s=xt(),l=tt;if(l!==null)return My(s,l,i);xt(),s=s.memoizedState,l=xt();var p=l.queue.dispatch;return l.memoizedState=i,[s,p,!1]}function da(i,s,l,p){return i={tag:i,create:l,deps:p,inst:s,next:null},s=Ie.updateQueue,s===null&&(s=yc(),Ie.updateQueue=s),l=s.lastEffect,l===null?s.lastEffect=i.next=i:(p=l.next,l.next=i,i.next=p,s.lastEffect=i),i}function Oy(){return xt().memoizedState}function wc(i,s,l,p){var A=cr();Ie.flags|=i,A.memoizedState=da(1|s,{destroy:void 0},l,p===void 0?null:p)}function Cc(i,s,l,p){var A=xt();p=p===void 0?null:p;var T=A.memoizedState.inst;tt!==null&&p!==null&&ad(p,tt.memoizedState.deps)?A.memoizedState=da(s,T,l,p):(Ie.flags|=i,A.memoizedState=da(1|s,T,l,p))}function Ty(i,s){wc(8390656,8,i,s)}function gd(i,s){Cc(2048,8,i,s)}function fT(i){Ie.flags|=4;var s=Ie.updateQueue;if(s===null)s=yc(),Ie.updateQueue=s,s.events=[i];else{var l=s.events;l===null?s.events=[i]:l.push(i)}}function Dy(i){var s=xt().memoizedState;return fT({ref:s,nextImpl:i}),function(){if((Xe&2)!==0)throw Error(n(440));return s.impl.apply(void 0,arguments)}}function Ry(i,s){return Cc(4,2,i,s)}function ky(i,s){return Cc(4,4,i,s)}function Py(i,s){if(typeof s=="function"){i=i();var l=s(i);return function(){typeof l=="function"?l():s(null)}}if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function By(i,s,l){l=l!=null?l.concat([i]):null,Cc(4,4,Py.bind(null,s,i),l)}function _d(){}function jy(i,s){var l=xt();s=s===void 0?null:s;var p=l.memoizedState;return s!==null&&ad(s,p[1])?p[0]:(l.memoizedState=[i,s],i)}function Iy(i,s){var l=xt();s=s===void 0?null:s;var p=l.memoizedState;if(s!==null&&ad(s,p[1]))return p[0];if(p=i(),ps){Nt(!0);try{i()}finally{Nt(!1)}}return l.memoizedState=[p,s],p}function md(i,s,l){return l===void 0||(Hi&1073741824)!==0&&(Ue&261930)===0?i.memoizedState=s:(i.memoizedState=l,i=Nb(),Ie.lanes|=i,kn|=i,l)}function Ny(i,s,l,p){return xr(l,s)?l:ua.current!==null?(i=md(i,l,p),xr(i,s)||(Lt=!0),i):(Hi&42)===0||(Hi&1073741824)!==0&&(Ue&261930)===0?(Lt=!0,i.memoizedState=l):(i=Nb(),Ie.lanes|=i,kn|=i,s)}function zy(i,s,l,p,A){var T=K.p;K.p=T!==0&&8>T?T:8;var I=F.T,q={};F.T=q,Sd(i,!1,s,l);try{var Q=A(),ae=F.S;if(ae!==null&&ae(q,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var he=oT(Q,p);To(i,s,he,Tr(i))}else To(i,s,p,Tr(i))}catch(_e){To(i,s,{then:function(){},status:"rejected",reason:_e},Tr())}finally{K.p=T,I!==null&&q.types!==null&&(I.types=q.types),F.T=I}}function dT(){}function yd(i,s,l,p){if(i.tag!==5)throw Error(n(476));var A=Hy(i).queue;zy(i,A,s,Y,l===null?dT:function(){return $y(i),l(p)})}function Hy(i){var s=i.memoizedState;if(s!==null)return s;s={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$i,lastRenderedState:Y},next:null};var l={};return s.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$i,lastRenderedState:l},next:null},i.memoizedState=s,i=i.alternate,i!==null&&(i.memoizedState=s),s}function $y(i){var s=Hy(i);s.next===null&&(s=i.alternate.memoizedState),To(i,s.next.queue,{},Tr())}function bd(){return Zt(Ko)}function Uy(){return xt().memoizedState}function Fy(){return xt().memoizedState}function vT(i){for(var s=i.return;s!==null;){switch(s.tag){case 24:case 3:var l=Tr();i=Mn(l);var p=Ln(s,i,l);p!==null&&(br(p,s,l),Eo(p,s,l)),s={cache:Vf()},i.payload=s;return}s=s.return}}function pT(i,s,l){var p=Tr();l={lane:p,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},xc(i)?Wy(s,l):(l=Nf(i,s,l,p),l!==null&&(br(l,i,p),Gy(l,s,p)))}function qy(i,s,l){var p=Tr();To(i,s,l,p)}function To(i,s,l,p){var A={lane:p,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(xc(i))Wy(s,A);else{var T=i.alternate;if(i.lanes===0&&(T===null||T.lanes===0)&&(T=s.lastRenderedReducer,T!==null))try{var I=s.lastRenderedState,q=T(I,l);if(A.hasEagerState=!0,A.eagerState=q,xr(q,I))return nc(i,s,A,0),st===null&&ic(),!1}catch{}finally{}if(l=Nf(i,s,A,p),l!==null)return br(l,i,p),Gy(l,s,p),!0}return!1}function Sd(i,s,l,p){if(p={lane:2,revertLane:Jd(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},xc(i)){if(s)throw Error(n(479))}else s=Nf(i,l,p,2),s!==null&&br(s,i,2)}function xc(i){var s=i.alternate;return i===Ie||s!==null&&s===Ie}function Wy(i,s){ha=_c=!0;var l=i.pending;l===null?s.next=s:(s.next=l.next,l.next=s),i.pending=s}function Gy(i,s,l){if((l&4194048)!==0){var p=s.lanes;p&=i.pendingLanes,l|=p,s.lanes=l,Zm(i,l)}}var Do={readContext:Zt,use:bc,useCallback:yt,useContext:yt,useEffect:yt,useImperativeHandle:yt,useLayoutEffect:yt,useInsertionEffect:yt,useMemo:yt,useReducer:yt,useRef:yt,useState:yt,useDebugValue:yt,useDeferredValue:yt,useTransition:yt,useSyncExternalStore:yt,useId:yt,useHostTransitionStatus:yt,useFormState:yt,useActionState:yt,useOptimistic:yt,useMemoCache:yt,useCacheRefresh:yt};Do.useEffectEvent=yt;var Ky={readContext:Zt,use:bc,useCallback:function(i,s){return cr().memoizedState=[i,s===void 0?null:s],i},useContext:Zt,useEffect:Ty,useImperativeHandle:function(i,s,l){l=l!=null?l.concat([i]):null,wc(4194308,4,Py.bind(null,s,i),l)},useLayoutEffect:function(i,s){return wc(4194308,4,i,s)},useInsertionEffect:function(i,s){wc(4,2,i,s)},useMemo:function(i,s){var l=cr();s=s===void 0?null:s;var p=i();if(ps){Nt(!0);try{i()}finally{Nt(!1)}}return l.memoizedState=[p,s],p},useReducer:function(i,s,l){var p=cr();if(l!==void 0){var A=l(s);if(ps){Nt(!0);try{l(s)}finally{Nt(!1)}}}else A=s;return p.memoizedState=p.baseState=A,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:A},p.queue=i,i=i.dispatch=pT.bind(null,Ie,i),[p.memoizedState,i]},useRef:function(i){var s=cr();return i={current:i},s.memoizedState=i},useState:function(i){i=vd(i);var s=i.queue,l=qy.bind(null,Ie,s);return s.dispatch=l,[i.memoizedState,l]},useDebugValue:_d,useDeferredValue:function(i,s){var l=cr();return md(l,i,s)},useTransition:function(){var i=vd(!1);return i=zy.bind(null,Ie,i.queue,!0,!1),cr().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,s,l){var p=Ie,A=cr();if(We){if(l===void 0)throw Error(n(407));l=l()}else{if(l=s(),st===null)throw Error(n(349));(Ue&127)!==0||vy(p,s,l)}A.memoizedState=l;var T={value:l,getSnapshot:s};return A.queue=T,Ty(gy.bind(null,p,T,i),[i]),p.flags|=2048,da(9,{destroy:void 0},py.bind(null,p,T,l,s),null),l},useId:function(){var i=cr(),s=st.identifierPrefix;if(We){var l=bi,p=yi;l=(p&~(1<<32-Rt(p)-1)).toString(32)+l,s="_"+s+"R_"+l,l=mc++,0<l&&(s+="H"+l.toString(32)),s+="_"}else l=lT++,s="_"+s+"r_"+l.toString(32)+"_";return i.memoizedState=s},useHostTransitionStatus:bd,useFormState:Ey,useActionState:Ey,useOptimistic:function(i){var s=cr();s.memoizedState=s.baseState=i;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=l,s=Sd.bind(null,Ie,!0,l),l.dispatch=s,[i,s]},useMemoCache:hd,useCacheRefresh:function(){return cr().memoizedState=vT.bind(null,Ie)},useEffectEvent:function(i){var s=cr(),l={impl:i};return s.memoizedState=l,function(){if((Xe&2)!==0)throw Error(n(440));return l.impl.apply(void 0,arguments)}}},wd={readContext:Zt,use:bc,useCallback:jy,useContext:Zt,useEffect:gd,useImperativeHandle:By,useInsertionEffect:Ry,useLayoutEffect:ky,useMemo:Iy,useReducer:Sc,useRef:Oy,useState:function(){return Sc($i)},useDebugValue:_d,useDeferredValue:function(i,s){var l=xt();return Ny(l,tt.memoizedState,i,s)},useTransition:function(){var i=Sc($i)[0],s=xt().memoizedState;return[typeof i=="boolean"?i:Oo(i),s]},useSyncExternalStore:dy,useId:Uy,useHostTransitionStatus:bd,useFormState:Ay,useActionState:Ay,useOptimistic:function(i,s){var l=xt();return yy(l,tt,i,s)},useMemoCache:hd,useCacheRefresh:Fy};wd.useEffectEvent=Dy;var Yy={readContext:Zt,use:bc,useCallback:jy,useContext:Zt,useEffect:gd,useImperativeHandle:By,useInsertionEffect:Ry,useLayoutEffect:ky,useMemo:Iy,useReducer:dd,useRef:Oy,useState:function(){return dd($i)},useDebugValue:_d,useDeferredValue:function(i,s){var l=xt();return tt===null?md(l,i,s):Ny(l,tt.memoizedState,i,s)},useTransition:function(){var i=dd($i)[0],s=xt().memoizedState;return[typeof i=="boolean"?i:Oo(i),s]},useSyncExternalStore:dy,useId:Uy,useHostTransitionStatus:bd,useFormState:Ly,useActionState:Ly,useOptimistic:function(i,s){var l=xt();return tt!==null?yy(l,tt,i,s):(l.baseState=i,[i,l.queue.dispatch])},useMemoCache:hd,useCacheRefresh:Fy};Yy.useEffectEvent=Dy;function Cd(i,s,l,p){s=i.memoizedState,l=l(p,s),l=l==null?s:u({},s,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var xd={enqueueSetState:function(i,s,l){i=i._reactInternals;var p=Tr(),A=Mn(p);A.payload=s,l!=null&&(A.callback=l),s=Ln(i,A,p),s!==null&&(br(s,i,p),Eo(s,i,p))},enqueueReplaceState:function(i,s,l){i=i._reactInternals;var p=Tr(),A=Mn(p);A.tag=1,A.payload=s,l!=null&&(A.callback=l),s=Ln(i,A,p),s!==null&&(br(s,i,p),Eo(s,i,p))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var l=Tr(),p=Mn(l);p.tag=2,s!=null&&(p.callback=s),s=Ln(i,p,l),s!==null&&(br(s,i,l),Eo(s,i,l))}};function Vy(i,s,l,p,A,T,I){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(p,T,I):s.prototype&&s.prototype.isPureReactComponent?!_o(l,p)||!_o(A,T):!0}function Xy(i,s,l,p){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,p),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,p),s.state!==i&&xd.enqueueReplaceState(s,s.state,null)}function gs(i,s){var l=s;if("ref"in s){l={};for(var p in s)p!=="ref"&&(l[p]=s[p])}if(i=i.defaultProps){l===s&&(l=u({},l));for(var A in i)l[A]===void 0&&(l[A]=i[A])}return l}function Zy(i){rc(i)}function Qy(i){console.error(i)}function Jy(i){rc(i)}function Ec(i,s){try{var l=i.onUncaughtError;l(s.value,{componentStack:s.stack})}catch(p){setTimeout(function(){throw p})}}function eb(i,s,l){try{var p=i.onCaughtError;p(l.value,{componentStack:l.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(A){setTimeout(function(){throw A})}}function Ed(i,s,l){return l=Mn(l),l.tag=3,l.payload={element:null},l.callback=function(){Ec(i,s)},l}function tb(i){return i=Mn(i),i.tag=3,i}function rb(i,s,l,p){var A=l.type.getDerivedStateFromError;if(typeof A=="function"){var T=p.value;i.payload=function(){return A(T)},i.callback=function(){eb(s,l,p)}}var I=l.stateNode;I!==null&&typeof I.componentDidCatch=="function"&&(i.callback=function(){eb(s,l,p),typeof A!="function"&&(Pn===null?Pn=new Set([this]):Pn.add(this));var q=p.stack;this.componentDidCatch(p.value,{componentStack:q!==null?q:""})})}function gT(i,s,l,p,A){if(l.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(s=l.alternate,s!==null&&sa(s,l,A,!0),l=Ar.current,l!==null){switch(l.tag){case 31:case 13:return Gr===null?Ic():l.alternate===null&&bt===0&&(bt=3),l.flags&=-257,l.flags|=65536,l.lanes=A,p===fc?l.flags|=16384:(s=l.updateQueue,s===null?l.updateQueue=new Set([p]):s.add(p),Xd(i,p,A)),!1;case 22:return l.flags|=65536,p===fc?l.flags|=16384:(s=l.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([p])},l.updateQueue=s):(l=s.retryQueue,l===null?s.retryQueue=new Set([p]):l.add(p)),Xd(i,p,A)),!1}throw Error(n(435,l.tag))}return Xd(i,p,A),Ic(),!1}if(We)return s=Ar.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=A,p!==qf&&(i=Error(n(422),{cause:p}),bo(Ur(i,l)))):(p!==qf&&(s=Error(n(423),{cause:p}),bo(Ur(s,l))),i=i.current.alternate,i.flags|=65536,A&=-A,i.lanes|=A,p=Ur(p,l),A=Ed(i.stateNode,p,A),td(i,A),bt!==4&&(bt=2)),!1;var T=Error(n(520),{cause:p});if(T=Ur(T,l),zo===null?zo=[T]:zo.push(T),bt!==4&&(bt=2),s===null)return!0;p=Ur(p,l),l=s;do{switch(l.tag){case 3:return l.flags|=65536,i=A&-A,l.lanes|=i,i=Ed(l.stateNode,p,i),td(l,i),!1;case 1:if(s=l.type,T=l.stateNode,(l.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(Pn===null||!Pn.has(T))))return l.flags|=65536,A&=-A,l.lanes|=A,A=tb(A),rb(A,i,l,p),td(l,A),!1}l=l.return}while(l!==null);return!1}var Ad=Error(n(461)),Lt=!1;function Qt(i,s,l,p){s.child=i===null?ay(s,null,l,p):vs(s,i.child,l,p)}function ib(i,s,l,p,A){l=l.render;var T=s.ref;if("ref"in p){var I={};for(var q in p)q!=="ref"&&(I[q]=p[q])}else I=p;return us(s),p=od(i,s,l,I,T,A),q=ld(),i!==null&&!Lt?(cd(i,s,A),Ui(i,s,A)):(We&&q&&Uf(s),s.flags|=1,Qt(i,s,p,A),s.child)}function nb(i,s,l,p,A){if(i===null){var T=l.type;return typeof T=="function"&&!zf(T)&&T.defaultProps===void 0&&l.compare===null?(s.tag=15,s.type=T,sb(i,s,T,p,A)):(i=ac(l.type,null,p,s,s.mode,A),i.ref=s.ref,i.return=s,s.child=i)}if(T=i.child,!Pd(i,A)){var I=T.memoizedProps;if(l=l.compare,l=l!==null?l:_o,l(I,p)&&i.ref===s.ref)return Ui(i,s,A)}return s.flags|=1,i=ji(T,p),i.ref=s.ref,i.return=s,s.child=i}function sb(i,s,l,p,A){if(i!==null){var T=i.memoizedProps;if(_o(T,p)&&i.ref===s.ref)if(Lt=!1,s.pendingProps=p=T,Pd(i,A))(i.flags&131072)!==0&&(Lt=!0);else return s.lanes=i.lanes,Ui(i,s,A)}return Md(i,s,l,p,A)}function ab(i,s,l,p){var A=p.children,T=i!==null?i.memoizedState:null;if(i===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((s.flags&128)!==0){if(T=T!==null?T.baseLanes|l:l,i!==null){for(p=s.child=i.child,A=0;p!==null;)A=A|p.lanes|p.childLanes,p=p.sibling;p=A&~T}else p=0,s.child=null;return ob(i,s,T,l,p)}if((l&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},i!==null&&uc(s,T!==null?T.cachePool:null),T!==null?cy(s,T):id(),uy(s);else return p=s.lanes=536870912,ob(i,s,T!==null?T.baseLanes|l:l,l,p)}else T!==null?(uc(s,T.cachePool),cy(s,T),Tn(),s.memoizedState=null):(i!==null&&uc(s,null),id(),Tn());return Qt(i,s,A,l),s.child}function Ro(i,s){return i!==null&&i.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function ob(i,s,l,p,A){var T=Zf();return T=T===null?null:{parent:At._currentValue,pool:T},s.memoizedState={baseLanes:l,cachePool:T},i!==null&&uc(s,null),id(),uy(s),i!==null&&sa(i,s,p,!0),s.childLanes=A,null}function Ac(i,s){return s=Lc({mode:s.mode,children:s.children},i.mode),s.ref=i.ref,i.child=s,s.return=i,s}function lb(i,s,l){return vs(s,i.child,null,l),i=Ac(s,s.pendingProps),i.flags|=2,Mr(s),s.memoizedState=null,i}function _T(i,s,l){var p=s.pendingProps,A=(s.flags&128)!==0;if(s.flags&=-129,i===null){if(We){if(p.mode==="hidden")return i=Ac(s,p),s.lanes=536870912,Ro(null,i);if(sd(s),(i=ut)?(i=b1(i,Wr),i=i!==null&&i.data==="&"?i:null,i!==null&&(s.memoizedState={dehydrated:i,treeContext:wn!==null?{id:yi,overflow:bi}:null,retryLane:536870912,hydrationErrors:null},l=W0(i),l.return=s,s.child=l,Xt=s,ut=null)):i=null,i===null)throw xn(s);return s.lanes=536870912,null}return Ac(s,p)}var T=i.memoizedState;if(T!==null){var I=T.dehydrated;if(sd(s),A)if(s.flags&256)s.flags&=-257,s=lb(i,s,l);else if(s.memoizedState!==null)s.child=i.child,s.flags|=128,s=null;else throw Error(n(558));else if(Lt||sa(i,s,l,!1),A=(l&i.childLanes)!==0,Lt||A){if(p=st,p!==null&&(I=Qm(p,l),I!==0&&I!==T.retryLane))throw T.retryLane=I,as(i,I),br(p,i,I),Ad;Ic(),s=lb(i,s,l)}else i=T.treeContext,ut=Kr(I.nextSibling),Xt=s,We=!0,Cn=null,Wr=!1,i!==null&&Y0(s,i),s=Ac(s,p),s.flags|=4096;return s}return i=ji(i.child,{mode:p.mode,children:p.children}),i.ref=s.ref,s.child=i,i.return=s,i}function Mc(i,s){var l=s.ref;if(l===null)i!==null&&i.ref!==null&&(s.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(n(284));(i===null||i.ref!==l)&&(s.flags|=4194816)}}function Md(i,s,l,p,A){return us(s),l=od(i,s,l,p,void 0,A),p=ld(),i!==null&&!Lt?(cd(i,s,A),Ui(i,s,A)):(We&&p&&Uf(s),s.flags|=1,Qt(i,s,l,A),s.child)}function cb(i,s,l,p,A,T){return us(s),s.updateQueue=null,l=fy(s,p,l,A),hy(i),p=ld(),i!==null&&!Lt?(cd(i,s,T),Ui(i,s,T)):(We&&p&&Uf(s),s.flags|=1,Qt(i,s,l,T),s.child)}function ub(i,s,l,p,A){if(us(s),s.stateNode===null){var T=ta,I=l.contextType;typeof I=="object"&&I!==null&&(T=Zt(I)),T=new l(p,T),s.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,T.updater=xd,s.stateNode=T,T._reactInternals=s,T=s.stateNode,T.props=p,T.state=s.memoizedState,T.refs={},Jf(s),I=l.contextType,T.context=typeof I=="object"&&I!==null?Zt(I):ta,T.state=s.memoizedState,I=l.getDerivedStateFromProps,typeof I=="function"&&(Cd(s,l,I,p),T.state=s.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof T.getSnapshotBeforeUpdate=="function"||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(I=T.state,typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount(),I!==T.state&&xd.enqueueReplaceState(T,T.state,null),Mo(s,p,T,A),Ao(),T.state=s.memoizedState),typeof T.componentDidMount=="function"&&(s.flags|=4194308),p=!0}else if(i===null){T=s.stateNode;var q=s.memoizedProps,Q=gs(l,q);T.props=Q;var ae=T.context,he=l.contextType;I=ta,typeof he=="object"&&he!==null&&(I=Zt(he));var _e=l.getDerivedStateFromProps;he=typeof _e=="function"||typeof T.getSnapshotBeforeUpdate=="function",q=s.pendingProps!==q,he||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(q||ae!==I)&&Xy(s,T,p,I),An=!1;var oe=s.memoizedState;T.state=oe,Mo(s,p,T,A),Ao(),ae=s.memoizedState,q||oe!==ae||An?(typeof _e=="function"&&(Cd(s,l,_e,p),ae=s.memoizedState),(Q=An||Vy(s,l,Q,p,oe,ae,I))?(he||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount()),typeof T.componentDidMount=="function"&&(s.flags|=4194308)):(typeof T.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=p,s.memoizedState=ae),T.props=p,T.state=ae,T.context=I,p=Q):(typeof T.componentDidMount=="function"&&(s.flags|=4194308),p=!1)}else{T=s.stateNode,ed(i,s),I=s.memoizedProps,he=gs(l,I),T.props=he,_e=s.pendingProps,oe=T.context,ae=l.contextType,Q=ta,typeof ae=="object"&&ae!==null&&(Q=Zt(ae)),q=l.getDerivedStateFromProps,(ae=typeof q=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(I!==_e||oe!==Q)&&Xy(s,T,p,Q),An=!1,oe=s.memoizedState,T.state=oe,Mo(s,p,T,A),Ao();var ce=s.memoizedState;I!==_e||oe!==ce||An||i!==null&&i.dependencies!==null&&lc(i.dependencies)?(typeof q=="function"&&(Cd(s,l,q,p),ce=s.memoizedState),(he=An||Vy(s,l,he,p,oe,ce,Q)||i!==null&&i.dependencies!==null&&lc(i.dependencies))?(ae||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(p,ce,Q),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(p,ce,Q)),typeof T.componentDidUpdate=="function"&&(s.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof T.componentDidUpdate!="function"||I===i.memoizedProps&&oe===i.memoizedState||(s.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||I===i.memoizedProps&&oe===i.memoizedState||(s.flags|=1024),s.memoizedProps=p,s.memoizedState=ce),T.props=p,T.state=ce,T.context=Q,p=he):(typeof T.componentDidUpdate!="function"||I===i.memoizedProps&&oe===i.memoizedState||(s.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||I===i.memoizedProps&&oe===i.memoizedState||(s.flags|=1024),p=!1)}return T=p,Mc(i,s),p=(s.flags&128)!==0,T||p?(T=s.stateNode,l=p&&typeof l.getDerivedStateFromError!="function"?null:T.render(),s.flags|=1,i!==null&&p?(s.child=vs(s,i.child,null,A),s.child=vs(s,null,l,A)):Qt(i,s,l,A),s.memoizedState=T.state,i=s.child):i=Ui(i,s,A),i}function hb(i,s,l,p){return ls(),s.flags|=256,Qt(i,s,l,p),s.child}var Ld={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Od(i){return{baseLanes:i,cachePool:ey()}}function Td(i,s,l){return i=i!==null?i.childLanes&~l:0,s&&(i|=Or),i}function fb(i,s,l){var p=s.pendingProps,A=!1,T=(s.flags&128)!==0,I;if((I=T)||(I=i!==null&&i.memoizedState===null?!1:(Ct.current&2)!==0),I&&(A=!0,s.flags&=-129),I=(s.flags&32)!==0,s.flags&=-33,i===null){if(We){if(A?On(s):Tn(),(i=ut)?(i=b1(i,Wr),i=i!==null&&i.data!=="&"?i:null,i!==null&&(s.memoizedState={dehydrated:i,treeContext:wn!==null?{id:yi,overflow:bi}:null,retryLane:536870912,hydrationErrors:null},l=W0(i),l.return=s,s.child=l,Xt=s,ut=null)):i=null,i===null)throw xn(s);return fv(i)?s.lanes=32:s.lanes=536870912,null}var q=p.children;return p=p.fallback,A?(Tn(),A=s.mode,q=Lc({mode:"hidden",children:q},A),p=os(p,A,l,null),q.return=s,p.return=s,q.sibling=p,s.child=q,p=s.child,p.memoizedState=Od(l),p.childLanes=Td(i,I,l),s.memoizedState=Ld,Ro(null,p)):(On(s),Dd(s,q))}var Q=i.memoizedState;if(Q!==null&&(q=Q.dehydrated,q!==null)){if(T)s.flags&256?(On(s),s.flags&=-257,s=Rd(i,s,l)):s.memoizedState!==null?(Tn(),s.child=i.child,s.flags|=128,s=null):(Tn(),q=p.fallback,A=s.mode,p=Lc({mode:"visible",children:p.children},A),q=os(q,A,l,null),q.flags|=2,p.return=s,q.return=s,p.sibling=q,s.child=p,vs(s,i.child,null,l),p=s.child,p.memoizedState=Od(l),p.childLanes=Td(i,I,l),s.memoizedState=Ld,s=Ro(null,p));else if(On(s),fv(q)){if(I=q.nextSibling&&q.nextSibling.dataset,I)var ae=I.dgst;I=ae,p=Error(n(419)),p.stack="",p.digest=I,bo({value:p,source:null,stack:null}),s=Rd(i,s,l)}else if(Lt||sa(i,s,l,!1),I=(l&i.childLanes)!==0,Lt||I){if(I=st,I!==null&&(p=Qm(I,l),p!==0&&p!==Q.retryLane))throw Q.retryLane=p,as(i,p),br(I,i,p),Ad;hv(q)||Ic(),s=Rd(i,s,l)}else hv(q)?(s.flags|=192,s.child=i.child,s=null):(i=Q.treeContext,ut=Kr(q.nextSibling),Xt=s,We=!0,Cn=null,Wr=!1,i!==null&&Y0(s,i),s=Dd(s,p.children),s.flags|=4096);return s}return A?(Tn(),q=p.fallback,A=s.mode,Q=i.child,ae=Q.sibling,p=ji(Q,{mode:"hidden",children:p.children}),p.subtreeFlags=Q.subtreeFlags&65011712,ae!==null?q=ji(ae,q):(q=os(q,A,l,null),q.flags|=2),q.return=s,p.return=s,p.sibling=q,s.child=p,Ro(null,p),p=s.child,q=i.child.memoizedState,q===null?q=Od(l):(A=q.cachePool,A!==null?(Q=At._currentValue,A=A.parent!==Q?{parent:Q,pool:Q}:A):A=ey(),q={baseLanes:q.baseLanes|l,cachePool:A}),p.memoizedState=q,p.childLanes=Td(i,I,l),s.memoizedState=Ld,Ro(i.child,p)):(On(s),l=i.child,i=l.sibling,l=ji(l,{mode:"visible",children:p.children}),l.return=s,l.sibling=null,i!==null&&(I=s.deletions,I===null?(s.deletions=[i],s.flags|=16):I.push(i)),s.child=l,s.memoizedState=null,l)}function Dd(i,s){return s=Lc({mode:"visible",children:s},i.mode),s.return=i,i.child=s}function Lc(i,s){return i=Er(22,i,null,s),i.lanes=0,i}function Rd(i,s,l){return vs(s,i.child,null,l),i=Dd(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function db(i,s,l){i.lanes|=s;var p=i.alternate;p!==null&&(p.lanes|=s),Kf(i.return,s,l)}function kd(i,s,l,p,A,T){var I=i.memoizedState;I===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:p,tail:l,tailMode:A,treeForkCount:T}:(I.isBackwards=s,I.rendering=null,I.renderingStartTime=0,I.last=p,I.tail=l,I.tailMode=A,I.treeForkCount=T)}function vb(i,s,l){var p=s.pendingProps,A=p.revealOrder,T=p.tail;p=p.children;var I=Ct.current,q=(I&2)!==0;if(q?(I=I&1|2,s.flags|=128):I&=1,J(Ct,I),Qt(i,s,p,l),p=We?yo:0,!q&&i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&db(i,l,s);else if(i.tag===19)db(i,l,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(A){case"forwards":for(l=s.child,A=null;l!==null;)i=l.alternate,i!==null&&gc(i)===null&&(A=l),l=l.sibling;l=A,l===null?(A=s.child,s.child=null):(A=l.sibling,l.sibling=null),kd(s,!1,A,l,T,p);break;case"backwards":case"unstable_legacy-backwards":for(l=null,A=s.child,s.child=null;A!==null;){if(i=A.alternate,i!==null&&gc(i)===null){s.child=A;break}i=A.sibling,A.sibling=l,l=A,A=i}kd(s,!0,l,null,T,p);break;case"together":kd(s,!1,null,null,void 0,p);break;default:s.memoizedState=null}return s.child}function Ui(i,s,l){if(i!==null&&(s.dependencies=i.dependencies),kn|=s.lanes,(l&s.childLanes)===0)if(i!==null){if(sa(i,s,l,!1),(l&s.childLanes)===0)return null}else return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,l=ji(i,i.pendingProps),s.child=l,l.return=s;i.sibling!==null;)i=i.sibling,l=l.sibling=ji(i,i.pendingProps),l.return=s;l.sibling=null}return s.child}function Pd(i,s){return(i.lanes&s)!==0?!0:(i=i.dependencies,!!(i!==null&&lc(i)))}function mT(i,s,l){switch(s.tag){case 3:W(s,s.stateNode.containerInfo),En(s,At,i.memoizedState.cache),ls();break;case 27:case 5:ee(s);break;case 4:W(s,s.stateNode.containerInfo);break;case 10:En(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,sd(s),null;break;case 13:var p=s.memoizedState;if(p!==null)return p.dehydrated!==null?(On(s),s.flags|=128,null):(l&s.child.childLanes)!==0?fb(i,s,l):(On(s),i=Ui(i,s,l),i!==null?i.sibling:null);On(s);break;case 19:var A=(i.flags&128)!==0;if(p=(l&s.childLanes)!==0,p||(sa(i,s,l,!1),p=(l&s.childLanes)!==0),A){if(p)return vb(i,s,l);s.flags|=128}if(A=s.memoizedState,A!==null&&(A.rendering=null,A.tail=null,A.lastEffect=null),J(Ct,Ct.current),p)break;return null;case 22:return s.lanes=0,ab(i,s,l,s.pendingProps);case 24:En(s,At,i.memoizedState.cache)}return Ui(i,s,l)}function pb(i,s,l){if(i!==null)if(i.memoizedProps!==s.pendingProps)Lt=!0;else{if(!Pd(i,l)&&(s.flags&128)===0)return Lt=!1,mT(i,s,l);Lt=(i.flags&131072)!==0}else Lt=!1,We&&(s.flags&1048576)!==0&&K0(s,yo,s.index);switch(s.lanes=0,s.tag){case 16:e:{var p=s.pendingProps;if(i=fs(s.elementType),s.type=i,typeof i=="function")zf(i)?(p=gs(i,p),s.tag=1,s=ub(null,s,i,p,l)):(s.tag=0,s=Md(null,s,i,p,l));else{if(i!=null){var A=i.$$typeof;if(A===E){s.tag=11,s=ib(null,s,i,p,l);break e}else if(A===O){s.tag=14,s=nb(null,s,i,p,l);break e}}throw s=H(i)||i,Error(n(306,s,""))}}return s;case 0:return Md(i,s,s.type,s.pendingProps,l);case 1:return p=s.type,A=gs(p,s.pendingProps),ub(i,s,p,A,l);case 3:e:{if(W(s,s.stateNode.containerInfo),i===null)throw Error(n(387));p=s.pendingProps;var T=s.memoizedState;A=T.element,ed(i,s),Mo(s,p,null,l);var I=s.memoizedState;if(p=I.cache,En(s,At,p),p!==T.cache&&Yf(s,[At],l,!0),Ao(),p=I.element,T.isDehydrated)if(T={element:p,isDehydrated:!1,cache:I.cache},s.updateQueue.baseState=T,s.memoizedState=T,s.flags&256){s=hb(i,s,p,l);break e}else if(p!==A){A=Ur(Error(n(424)),s),bo(A),s=hb(i,s,p,l);break e}else{switch(i=s.stateNode.containerInfo,i.nodeType){case 9:i=i.body;break;default:i=i.nodeName==="HTML"?i.ownerDocument.body:i}for(ut=Kr(i.firstChild),Xt=s,We=!0,Cn=null,Wr=!0,l=ay(s,null,p,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(ls(),p===A){s=Ui(i,s,l);break e}Qt(i,s,p,l)}s=s.child}return s;case 26:return Mc(i,s),i===null?(l=A1(s.type,null,s.pendingProps,null))?s.memoizedState=l:We||(l=s.type,i=s.pendingProps,p=qc(ve.current).createElement(l),p[Vt]=s,p[vr]=i,Jt(p,l,i),zt(p),s.stateNode=p):s.memoizedState=A1(s.type,i.memoizedProps,s.pendingProps,i.memoizedState),null;case 27:return ee(s),i===null&&We&&(p=s.stateNode=C1(s.type,s.pendingProps,ve.current),Xt=s,Wr=!0,A=ut,Nn(s.type)?(dv=A,ut=Kr(p.firstChild)):ut=A),Qt(i,s,s.pendingProps.children,l),Mc(i,s),i===null&&(s.flags|=4194304),s.child;case 5:return i===null&&We&&((A=p=ut)&&(p=YT(p,s.type,s.pendingProps,Wr),p!==null?(s.stateNode=p,Xt=s,ut=Kr(p.firstChild),Wr=!1,A=!0):A=!1),A||xn(s)),ee(s),A=s.type,T=s.pendingProps,I=i!==null?i.memoizedProps:null,p=T.children,lv(A,T)?p=null:I!==null&&lv(A,I)&&(s.flags|=32),s.memoizedState!==null&&(A=od(i,s,cT,null,null,l),Ko._currentValue=A),Mc(i,s),Qt(i,s,p,l),s.child;case 6:return i===null&&We&&((i=l=ut)&&(l=VT(l,s.pendingProps,Wr),l!==null?(s.stateNode=l,Xt=s,ut=null,i=!0):i=!1),i||xn(s)),null;case 13:return fb(i,s,l);case 4:return W(s,s.stateNode.containerInfo),p=s.pendingProps,i===null?s.child=vs(s,null,p,l):Qt(i,s,p,l),s.child;case 11:return ib(i,s,s.type,s.pendingProps,l);case 7:return Qt(i,s,s.pendingProps,l),s.child;case 8:return Qt(i,s,s.pendingProps.children,l),s.child;case 12:return Qt(i,s,s.pendingProps.children,l),s.child;case 10:return p=s.pendingProps,En(s,s.type,p.value),Qt(i,s,p.children,l),s.child;case 9:return A=s.type._context,p=s.pendingProps.children,us(s),A=Zt(A),p=p(A),s.flags|=1,Qt(i,s,p,l),s.child;case 14:return nb(i,s,s.type,s.pendingProps,l);case 15:return sb(i,s,s.type,s.pendingProps,l);case 19:return vb(i,s,l);case 31:return _T(i,s,l);case 22:return ab(i,s,l,s.pendingProps);case 24:return us(s),p=Zt(At),i===null?(A=Zf(),A===null&&(A=st,T=Vf(),A.pooledCache=T,T.refCount++,T!==null&&(A.pooledCacheLanes|=l),A=T),s.memoizedState={parent:p,cache:A},Jf(s),En(s,At,A)):((i.lanes&l)!==0&&(ed(i,s),Mo(s,null,null,l),Ao()),A=i.memoizedState,T=s.memoizedState,A.parent!==p?(A={parent:p,cache:p},s.memoizedState=A,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=A),En(s,At,p)):(p=T.cache,En(s,At,p),p!==A.cache&&Yf(s,[At],l,!0))),Qt(i,s,s.pendingProps.children,l),s.child;case 29:throw s.pendingProps}throw Error(n(156,s.tag))}function Fi(i){i.flags|=4}function Bd(i,s,l,p,A){if((s=(i.mode&32)!==0)&&(s=!1),s){if(i.flags|=16777216,(A&335544128)===A)if(i.stateNode.complete)i.flags|=8192;else if(Ub())i.flags|=8192;else throw ds=fc,Qf}else i.flags&=-16777217}function gb(i,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!D1(s))if(Ub())i.flags|=8192;else throw ds=fc,Qf}function Oc(i,s){s!==null&&(i.flags|=4),i.flags&16384&&(s=i.tag!==22?Vm():536870912,i.lanes|=s,_a|=s)}function ko(i,s){if(!We)switch(i.tailMode){case"hidden":s=i.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var p=null;l!==null;)l.alternate!==null&&(p=l),l=l.sibling;p===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:p.sibling=null}}function ht(i){var s=i.alternate!==null&&i.alternate.child===i.child,l=0,p=0;if(s)for(var A=i.child;A!==null;)l|=A.lanes|A.childLanes,p|=A.subtreeFlags&65011712,p|=A.flags&65011712,A.return=i,A=A.sibling;else for(A=i.child;A!==null;)l|=A.lanes|A.childLanes,p|=A.subtreeFlags,p|=A.flags,A.return=i,A=A.sibling;return i.subtreeFlags|=p,i.childLanes=l,s}function yT(i,s,l){var p=s.pendingProps;switch(Ff(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ht(s),null;case 1:return ht(s),null;case 3:return l=s.stateNode,p=null,i!==null&&(p=i.memoizedState.cache),s.memoizedState.cache!==p&&(s.flags|=2048),zi(At),V(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(i===null||i.child===null)&&(na(s)?Fi(s):i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Wf())),ht(s),null;case 26:var A=s.type,T=s.memoizedState;return i===null?(Fi(s),T!==null?(ht(s),gb(s,T)):(ht(s),Bd(s,A,null,p,l))):T?T!==i.memoizedState?(Fi(s),ht(s),gb(s,T)):(ht(s),s.flags&=-16777217):(i=i.memoizedProps,i!==p&&Fi(s),ht(s),Bd(s,A,i,p,l)),null;case 27:if(ue(s),l=ve.current,A=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==p&&Fi(s);else{if(!p){if(s.stateNode===null)throw Error(n(166));return ht(s),null}i=te.current,na(s)?V0(s):(i=C1(A,p,l),s.stateNode=i,Fi(s))}return ht(s),null;case 5:if(ue(s),A=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==p&&Fi(s);else{if(!p){if(s.stateNode===null)throw Error(n(166));return ht(s),null}if(T=te.current,na(s))V0(s);else{var I=qc(ve.current);switch(T){case 1:T=I.createElementNS("http://www.w3.org/2000/svg",A);break;case 2:T=I.createElementNS("http://www.w3.org/1998/Math/MathML",A);break;default:switch(A){case"svg":T=I.createElementNS("http://www.w3.org/2000/svg",A);break;case"math":T=I.createElementNS("http://www.w3.org/1998/Math/MathML",A);break;case"script":T=I.createElement("div"),T.innerHTML="<script><\/script>",T=T.removeChild(T.firstChild);break;case"select":T=typeof p.is=="string"?I.createElement("select",{is:p.is}):I.createElement("select"),p.multiple?T.multiple=!0:p.size&&(T.size=p.size);break;default:T=typeof p.is=="string"?I.createElement(A,{is:p.is}):I.createElement(A)}}T[Vt]=s,T[vr]=p;e:for(I=s.child;I!==null;){if(I.tag===5||I.tag===6)T.appendChild(I.stateNode);else if(I.tag!==4&&I.tag!==27&&I.child!==null){I.child.return=I,I=I.child;continue}if(I===s)break e;for(;I.sibling===null;){if(I.return===null||I.return===s)break e;I=I.return}I.sibling.return=I.return,I=I.sibling}s.stateNode=T;e:switch(Jt(T,A,p),A){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&Fi(s)}}return ht(s),Bd(s,s.type,i===null?null:i.memoizedProps,s.pendingProps,l),null;case 6:if(i&&s.stateNode!=null)i.memoizedProps!==p&&Fi(s);else{if(typeof p!="string"&&s.stateNode===null)throw Error(n(166));if(i=ve.current,na(s)){if(i=s.stateNode,l=s.memoizedProps,p=null,A=Xt,A!==null)switch(A.tag){case 27:case 5:p=A.memoizedProps}i[Vt]=s,i=!!(i.nodeValue===l||p!==null&&p.suppressHydrationWarning===!0||f1(i.nodeValue,l)),i||xn(s,!0)}else i=qc(i).createTextNode(p),i[Vt]=s,s.stateNode=i}return ht(s),null;case 31:if(l=s.memoizedState,i===null||i.memoizedState!==null){if(p=na(s),l!==null){if(i===null){if(!p)throw Error(n(318));if(i=s.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(557));i[Vt]=s}else ls(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;ht(s),i=!1}else l=Wf(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=l),i=!0;if(!i)return s.flags&256?(Mr(s),s):(Mr(s),null);if((s.flags&128)!==0)throw Error(n(558))}return ht(s),null;case 13:if(p=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(A=na(s),p!==null&&p.dehydrated!==null){if(i===null){if(!A)throw Error(n(318));if(A=s.memoizedState,A=A!==null?A.dehydrated:null,!A)throw Error(n(317));A[Vt]=s}else ls(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;ht(s),A=!1}else A=Wf(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=A),A=!0;if(!A)return s.flags&256?(Mr(s),s):(Mr(s),null)}return Mr(s),(s.flags&128)!==0?(s.lanes=l,s):(l=p!==null,i=i!==null&&i.memoizedState!==null,l&&(p=s.child,A=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(A=p.alternate.memoizedState.cachePool.pool),T=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(T=p.memoizedState.cachePool.pool),T!==A&&(p.flags|=2048)),l!==i&&l&&(s.child.flags|=8192),Oc(s,s.updateQueue),ht(s),null);case 4:return V(),i===null&&iv(s.stateNode.containerInfo),ht(s),null;case 10:return zi(s.type),ht(s),null;case 19:if(U(Ct),p=s.memoizedState,p===null)return ht(s),null;if(A=(s.flags&128)!==0,T=p.rendering,T===null)if(A)ko(p,!1);else{if(bt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(T=gc(i),T!==null){for(s.flags|=128,ko(p,!1),i=T.updateQueue,s.updateQueue=i,Oc(s,i),s.subtreeFlags=0,i=l,l=s.child;l!==null;)q0(l,i),l=l.sibling;return J(Ct,Ct.current&1|2),We&&Ii(s,p.treeForkCount),s.child}i=i.sibling}p.tail!==null&&we()>Pc&&(s.flags|=128,A=!0,ko(p,!1),s.lanes=4194304)}else{if(!A)if(i=gc(T),i!==null){if(s.flags|=128,A=!0,i=i.updateQueue,s.updateQueue=i,Oc(s,i),ko(p,!0),p.tail===null&&p.tailMode==="hidden"&&!T.alternate&&!We)return ht(s),null}else 2*we()-p.renderingStartTime>Pc&&l!==536870912&&(s.flags|=128,A=!0,ko(p,!1),s.lanes=4194304);p.isBackwards?(T.sibling=s.child,s.child=T):(i=p.last,i!==null?i.sibling=T:s.child=T,p.last=T)}return p.tail!==null?(i=p.tail,p.rendering=i,p.tail=i.sibling,p.renderingStartTime=we(),i.sibling=null,l=Ct.current,J(Ct,A?l&1|2:l&1),We&&Ii(s,p.treeForkCount),i):(ht(s),null);case 22:case 23:return Mr(s),nd(),p=s.memoizedState!==null,i!==null?i.memoizedState!==null!==p&&(s.flags|=8192):p&&(s.flags|=8192),p?(l&536870912)!==0&&(s.flags&128)===0&&(ht(s),s.subtreeFlags&6&&(s.flags|=8192)):ht(s),l=s.updateQueue,l!==null&&Oc(s,l.retryQueue),l=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(l=i.memoizedState.cachePool.pool),p=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),p!==l&&(s.flags|=2048),i!==null&&U(hs),null;case 24:return l=null,i!==null&&(l=i.memoizedState.cache),s.memoizedState.cache!==l&&(s.flags|=2048),zi(At),ht(s),null;case 25:return null;case 30:return null}throw Error(n(156,s.tag))}function bT(i,s){switch(Ff(s),s.tag){case 1:return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return zi(At),V(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 26:case 27:case 5:return ue(s),null;case 31:if(s.memoizedState!==null){if(Mr(s),s.alternate===null)throw Error(n(340));ls()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 13:if(Mr(s),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));ls()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return U(Ct),null;case 4:return V(),null;case 10:return zi(s.type),null;case 22:case 23:return Mr(s),nd(),i!==null&&U(hs),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 24:return zi(At),null;case 25:return null;default:return null}}function _b(i,s){switch(Ff(s),s.tag){case 3:zi(At),V();break;case 26:case 27:case 5:ue(s);break;case 4:V();break;case 31:s.memoizedState!==null&&Mr(s);break;case 13:Mr(s);break;case 19:U(Ct);break;case 10:zi(s.type);break;case 22:case 23:Mr(s),nd(),i!==null&&U(hs);break;case 24:zi(At)}}function Po(i,s){try{var l=s.updateQueue,p=l!==null?l.lastEffect:null;if(p!==null){var A=p.next;l=A;do{if((l.tag&i)===i){p=void 0;var T=l.create,I=l.inst;p=T(),I.destroy=p}l=l.next}while(l!==A)}}catch(q){Je(s,s.return,q)}}function Dn(i,s,l){try{var p=s.updateQueue,A=p!==null?p.lastEffect:null;if(A!==null){var T=A.next;p=T;do{if((p.tag&i)===i){var I=p.inst,q=I.destroy;if(q!==void 0){I.destroy=void 0,A=s;var Q=l,ae=q;try{ae()}catch(he){Je(A,Q,he)}}}p=p.next}while(p!==T)}}catch(he){Je(s,s.return,he)}}function mb(i){var s=i.updateQueue;if(s!==null){var l=i.stateNode;try{ly(s,l)}catch(p){Je(i,i.return,p)}}}function yb(i,s,l){l.props=gs(i.type,i.memoizedProps),l.state=i.memoizedState;try{l.componentWillUnmount()}catch(p){Je(i,s,p)}}function Bo(i,s){try{var l=i.ref;if(l!==null){switch(i.tag){case 26:case 27:case 5:var p=i.stateNode;break;case 30:p=i.stateNode;break;default:p=i.stateNode}typeof l=="function"?i.refCleanup=l(p):l.current=p}}catch(A){Je(i,s,A)}}function Si(i,s){var l=i.ref,p=i.refCleanup;if(l!==null)if(typeof p=="function")try{p()}catch(A){Je(i,s,A)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(A){Je(i,s,A)}else l.current=null}function bb(i){var s=i.type,l=i.memoizedProps,p=i.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":l.autoFocus&&p.focus();break e;case"img":l.src?p.src=l.src:l.srcSet&&(p.srcset=l.srcSet)}}catch(A){Je(i,i.return,A)}}function jd(i,s,l){try{var p=i.stateNode;UT(p,i.type,l,s),p[vr]=s}catch(A){Je(i,i.return,A)}}function Sb(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&Nn(i.type)||i.tag===4}function Id(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Sb(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&Nn(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Nd(i,s,l){var p=i.tag;if(p===5||p===6)i=i.stateNode,s?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(i,s):(s=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,s.appendChild(i),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=Pi));else if(p!==4&&(p===27&&Nn(i.type)&&(l=i.stateNode,s=null),i=i.child,i!==null))for(Nd(i,s,l),i=i.sibling;i!==null;)Nd(i,s,l),i=i.sibling}function Tc(i,s,l){var p=i.tag;if(p===5||p===6)i=i.stateNode,s?l.insertBefore(i,s):l.appendChild(i);else if(p!==4&&(p===27&&Nn(i.type)&&(l=i.stateNode),i=i.child,i!==null))for(Tc(i,s,l),i=i.sibling;i!==null;)Tc(i,s,l),i=i.sibling}function wb(i){var s=i.stateNode,l=i.memoizedProps;try{for(var p=i.type,A=s.attributes;A.length;)s.removeAttributeNode(A[0]);Jt(s,p,l),s[Vt]=i,s[vr]=l}catch(T){Je(i,i.return,T)}}var qi=!1,Ot=!1,zd=!1,Cb=typeof WeakSet=="function"?WeakSet:Set,Ht=null;function ST(i,s){if(i=i.containerInfo,av=Zc,i=B0(i),Rf(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var p=l.getSelection&&l.getSelection();if(p&&p.rangeCount!==0){l=p.anchorNode;var A=p.anchorOffset,T=p.focusNode;p=p.focusOffset;try{l.nodeType,T.nodeType}catch{l=null;break e}var I=0,q=-1,Q=-1,ae=0,he=0,_e=i,oe=null;t:for(;;){for(var ce;_e!==l||A!==0&&_e.nodeType!==3||(q=I+A),_e!==T||p!==0&&_e.nodeType!==3||(Q=I+p),_e.nodeType===3&&(I+=_e.nodeValue.length),(ce=_e.firstChild)!==null;)oe=_e,_e=ce;for(;;){if(_e===i)break t;if(oe===l&&++ae===A&&(q=I),oe===T&&++he===p&&(Q=I),(ce=_e.nextSibling)!==null)break;_e=oe,oe=_e.parentNode}_e=ce}l=q===-1||Q===-1?null:{start:q,end:Q}}else l=null}l=l||{start:0,end:0}}else l=null;for(ov={focusedElem:i,selectionRange:l},Zc=!1,Ht=s;Ht!==null;)if(s=Ht,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Ht=i;else for(;Ht!==null;){switch(s=Ht,T=s.alternate,i=s.flags,s.tag){case 0:if((i&4)!==0&&(i=s.updateQueue,i=i!==null?i.events:null,i!==null))for(l=0;l<i.length;l++)A=i[l],A.ref.impl=A.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&T!==null){i=void 0,l=s,A=T.memoizedProps,T=T.memoizedState,p=l.stateNode;try{var Ee=gs(l.type,A);i=p.getSnapshotBeforeUpdate(Ee,T),p.__reactInternalSnapshotBeforeUpdate=i}catch(De){Je(l,l.return,De)}}break;case 3:if((i&1024)!==0){if(i=s.stateNode.containerInfo,l=i.nodeType,l===9)uv(i);else if(l===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":uv(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(n(163))}if(i=s.sibling,i!==null){i.return=s.return,Ht=i;break}Ht=s.return}}function xb(i,s,l){var p=l.flags;switch(l.tag){case 0:case 11:case 15:Gi(i,l),p&4&&Po(5,l);break;case 1:if(Gi(i,l),p&4)if(i=l.stateNode,s===null)try{i.componentDidMount()}catch(I){Je(l,l.return,I)}else{var A=gs(l.type,s.memoizedProps);s=s.memoizedState;try{i.componentDidUpdate(A,s,i.__reactInternalSnapshotBeforeUpdate)}catch(I){Je(l,l.return,I)}}p&64&&mb(l),p&512&&Bo(l,l.return);break;case 3:if(Gi(i,l),p&64&&(i=l.updateQueue,i!==null)){if(s=null,l.child!==null)switch(l.child.tag){case 27:case 5:s=l.child.stateNode;break;case 1:s=l.child.stateNode}try{ly(i,s)}catch(I){Je(l,l.return,I)}}break;case 27:s===null&&p&4&&wb(l);case 26:case 5:Gi(i,l),s===null&&p&4&&bb(l),p&512&&Bo(l,l.return);break;case 12:Gi(i,l);break;case 31:Gi(i,l),p&4&&Mb(i,l);break;case 13:Gi(i,l),p&4&&Lb(i,l),p&64&&(i=l.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(l=TT.bind(null,l),XT(i,l))));break;case 22:if(p=l.memoizedState!==null||qi,!p){s=s!==null&&s.memoizedState!==null||Ot,A=qi;var T=Ot;qi=p,(Ot=s)&&!T?Ki(i,l,(l.subtreeFlags&8772)!==0):Gi(i,l),qi=A,Ot=T}break;case 30:break;default:Gi(i,l)}}function Eb(i){var s=i.alternate;s!==null&&(i.alternate=null,Eb(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&pf(s)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var vt=null,gr=!1;function Wi(i,s,l){for(l=l.child;l!==null;)Ab(i,s,l),l=l.sibling}function Ab(i,s,l){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(lr,l)}catch{}switch(l.tag){case 26:Ot||Si(l,s),Wi(i,s,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Ot||Si(l,s);var p=vt,A=gr;Nn(l.type)&&(vt=l.stateNode,gr=!1),Wi(i,s,l),qo(l.stateNode),vt=p,gr=A;break;case 5:Ot||Si(l,s);case 6:if(p=vt,A=gr,vt=null,Wi(i,s,l),vt=p,gr=A,vt!==null)if(gr)try{(vt.nodeType===9?vt.body:vt.nodeName==="HTML"?vt.ownerDocument.body:vt).removeChild(l.stateNode)}catch(T){Je(l,s,T)}else try{vt.removeChild(l.stateNode)}catch(T){Je(l,s,T)}break;case 18:vt!==null&&(gr?(i=vt,m1(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,l.stateNode),Ea(i)):m1(vt,l.stateNode));break;case 4:p=vt,A=gr,vt=l.stateNode.containerInfo,gr=!0,Wi(i,s,l),vt=p,gr=A;break;case 0:case 11:case 14:case 15:Dn(2,l,s),Ot||Dn(4,l,s),Wi(i,s,l);break;case 1:Ot||(Si(l,s),p=l.stateNode,typeof p.componentWillUnmount=="function"&&yb(l,s,p)),Wi(i,s,l);break;case 21:Wi(i,s,l);break;case 22:Ot=(p=Ot)||l.memoizedState!==null,Wi(i,s,l),Ot=p;break;default:Wi(i,s,l)}}function Mb(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Ea(i)}catch(l){Je(s,s.return,l)}}}function Lb(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Ea(i)}catch(l){Je(s,s.return,l)}}function wT(i){switch(i.tag){case 31:case 13:case 19:var s=i.stateNode;return s===null&&(s=i.stateNode=new Cb),s;case 22:return i=i.stateNode,s=i._retryCache,s===null&&(s=i._retryCache=new Cb),s;default:throw Error(n(435,i.tag))}}function Dc(i,s){var l=wT(i);s.forEach(function(p){if(!l.has(p)){l.add(p);var A=DT.bind(null,i,p);p.then(A,A)}})}function _r(i,s){var l=s.deletions;if(l!==null)for(var p=0;p<l.length;p++){var A=l[p],T=i,I=s,q=I;e:for(;q!==null;){switch(q.tag){case 27:if(Nn(q.type)){vt=q.stateNode,gr=!1;break e}break;case 5:vt=q.stateNode,gr=!1;break e;case 3:case 4:vt=q.stateNode.containerInfo,gr=!0;break e}q=q.return}if(vt===null)throw Error(n(160));Ab(T,I,A),vt=null,gr=!1,T=A.alternate,T!==null&&(T.return=null),A.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)Ob(s,i),s=s.sibling}var li=null;function Ob(i,s){var l=i.alternate,p=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:_r(s,i),mr(i),p&4&&(Dn(3,i,i.return),Po(3,i),Dn(5,i,i.return));break;case 1:_r(s,i),mr(i),p&512&&(Ot||l===null||Si(l,l.return)),p&64&&qi&&(i=i.updateQueue,i!==null&&(p=i.callbacks,p!==null&&(l=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=l===null?p:l.concat(p))));break;case 26:var A=li;if(_r(s,i),mr(i),p&512&&(Ot||l===null||Si(l,l.return)),p&4){var T=l!==null?l.memoizedState:null;if(p=i.memoizedState,l===null)if(p===null)if(i.stateNode===null){e:{p=i.type,l=i.memoizedProps,A=A.ownerDocument||A;t:switch(p){case"title":T=A.getElementsByTagName("title")[0],(!T||T[oo]||T[Vt]||T.namespaceURI==="http://www.w3.org/2000/svg"||T.hasAttribute("itemprop"))&&(T=A.createElement(p),A.head.insertBefore(T,A.querySelector("head > title"))),Jt(T,p,l),T[Vt]=i,zt(T),p=T;break e;case"link":var I=O1("link","href",A).get(p+(l.href||""));if(I){for(var q=0;q<I.length;q++)if(T=I[q],T.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&T.getAttribute("rel")===(l.rel==null?null:l.rel)&&T.getAttribute("title")===(l.title==null?null:l.title)&&T.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){I.splice(q,1);break t}}T=A.createElement(p),Jt(T,p,l),A.head.appendChild(T);break;case"meta":if(I=O1("meta","content",A).get(p+(l.content||""))){for(q=0;q<I.length;q++)if(T=I[q],T.getAttribute("content")===(l.content==null?null:""+l.content)&&T.getAttribute("name")===(l.name==null?null:l.name)&&T.getAttribute("property")===(l.property==null?null:l.property)&&T.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&T.getAttribute("charset")===(l.charSet==null?null:l.charSet)){I.splice(q,1);break t}}T=A.createElement(p),Jt(T,p,l),A.head.appendChild(T);break;default:throw Error(n(468,p))}T[Vt]=i,zt(T),p=T}i.stateNode=p}else T1(A,i.type,i.stateNode);else i.stateNode=L1(A,p,i.memoizedProps);else T!==p?(T===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):T.count--,p===null?T1(A,i.type,i.stateNode):L1(A,p,i.memoizedProps)):p===null&&i.stateNode!==null&&jd(i,i.memoizedProps,l.memoizedProps)}break;case 27:_r(s,i),mr(i),p&512&&(Ot||l===null||Si(l,l.return)),l!==null&&p&4&&jd(i,i.memoizedProps,l.memoizedProps);break;case 5:if(_r(s,i),mr(i),p&512&&(Ot||l===null||Si(l,l.return)),i.flags&32){A=i.stateNode;try{Ys(A,"")}catch(Ee){Je(i,i.return,Ee)}}p&4&&i.stateNode!=null&&(A=i.memoizedProps,jd(i,A,l!==null?l.memoizedProps:A)),p&1024&&(zd=!0);break;case 6:if(_r(s,i),mr(i),p&4){if(i.stateNode===null)throw Error(n(162));p=i.memoizedProps,l=i.stateNode;try{l.nodeValue=p}catch(Ee){Je(i,i.return,Ee)}}break;case 3:if(Kc=null,A=li,li=Wc(s.containerInfo),_r(s,i),li=A,mr(i),p&4&&l!==null&&l.memoizedState.isDehydrated)try{Ea(s.containerInfo)}catch(Ee){Je(i,i.return,Ee)}zd&&(zd=!1,Tb(i));break;case 4:p=li,li=Wc(i.stateNode.containerInfo),_r(s,i),mr(i),li=p;break;case 12:_r(s,i),mr(i);break;case 31:_r(s,i),mr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,Dc(i,p)));break;case 13:_r(s,i),mr(i),i.child.flags&8192&&i.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(kc=we()),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,Dc(i,p)));break;case 22:A=i.memoizedState!==null;var Q=l!==null&&l.memoizedState!==null,ae=qi,he=Ot;if(qi=ae||A,Ot=he||Q,_r(s,i),Ot=he,qi=ae,mr(i),p&8192)e:for(s=i.stateNode,s._visibility=A?s._visibility&-2:s._visibility|1,A&&(l===null||Q||qi||Ot||_s(i)),l=null,s=i;;){if(s.tag===5||s.tag===26){if(l===null){Q=l=s;try{if(T=Q.stateNode,A)I=T.style,typeof I.setProperty=="function"?I.setProperty("display","none","important"):I.display="none";else{q=Q.stateNode;var _e=Q.memoizedProps.style,oe=_e!=null&&_e.hasOwnProperty("display")?_e.display:null;q.style.display=oe==null||typeof oe=="boolean"?"":(""+oe).trim()}}catch(Ee){Je(Q,Q.return,Ee)}}}else if(s.tag===6){if(l===null){Q=s;try{Q.stateNode.nodeValue=A?"":Q.memoizedProps}catch(Ee){Je(Q,Q.return,Ee)}}}else if(s.tag===18){if(l===null){Q=s;try{var ce=Q.stateNode;A?y1(ce,!0):y1(Q.stateNode,!1)}catch(Ee){Je(Q,Q.return,Ee)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===i)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break e;for(;s.sibling===null;){if(s.return===null||s.return===i)break e;l===s&&(l=null),s=s.return}l===s&&(l=null),s.sibling.return=s.return,s=s.sibling}p&4&&(p=i.updateQueue,p!==null&&(l=p.retryQueue,l!==null&&(p.retryQueue=null,Dc(i,l))));break;case 19:_r(s,i),mr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,Dc(i,p)));break;case 30:break;case 21:break;default:_r(s,i),mr(i)}}function mr(i){var s=i.flags;if(s&2){try{for(var l,p=i.return;p!==null;){if(Sb(p)){l=p;break}p=p.return}if(l==null)throw Error(n(160));switch(l.tag){case 27:var A=l.stateNode,T=Id(i);Tc(i,T,A);break;case 5:var I=l.stateNode;l.flags&32&&(Ys(I,""),l.flags&=-33);var q=Id(i);Tc(i,q,I);break;case 3:case 4:var Q=l.stateNode.containerInfo,ae=Id(i);Nd(i,ae,Q);break;default:throw Error(n(161))}}catch(he){Je(i,i.return,he)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function Tb(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var s=i;Tb(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),i=i.sibling}}function Gi(i,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)xb(i,s.alternate,s),s=s.sibling}function _s(i){for(i=i.child;i!==null;){var s=i;switch(s.tag){case 0:case 11:case 14:case 15:Dn(4,s,s.return),_s(s);break;case 1:Si(s,s.return);var l=s.stateNode;typeof l.componentWillUnmount=="function"&&yb(s,s.return,l),_s(s);break;case 27:qo(s.stateNode);case 26:case 5:Si(s,s.return),_s(s);break;case 22:s.memoizedState===null&&_s(s);break;case 30:_s(s);break;default:_s(s)}i=i.sibling}}function Ki(i,s,l){for(l=l&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var p=s.alternate,A=i,T=s,I=T.flags;switch(T.tag){case 0:case 11:case 15:Ki(A,T,l),Po(4,T);break;case 1:if(Ki(A,T,l),p=T,A=p.stateNode,typeof A.componentDidMount=="function")try{A.componentDidMount()}catch(ae){Je(p,p.return,ae)}if(p=T,A=p.updateQueue,A!==null){var q=p.stateNode;try{var Q=A.shared.hiddenCallbacks;if(Q!==null)for(A.shared.hiddenCallbacks=null,A=0;A<Q.length;A++)oy(Q[A],q)}catch(ae){Je(p,p.return,ae)}}l&&I&64&&mb(T),Bo(T,T.return);break;case 27:wb(T);case 26:case 5:Ki(A,T,l),l&&p===null&&I&4&&bb(T),Bo(T,T.return);break;case 12:Ki(A,T,l);break;case 31:Ki(A,T,l),l&&I&4&&Mb(A,T);break;case 13:Ki(A,T,l),l&&I&4&&Lb(A,T);break;case 22:T.memoizedState===null&&Ki(A,T,l),Bo(T,T.return);break;case 30:break;default:Ki(A,T,l)}s=s.sibling}}function Hd(i,s){var l=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(l=i.memoizedState.cachePool.pool),i=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(i=s.memoizedState.cachePool.pool),i!==l&&(i!=null&&i.refCount++,l!=null&&So(l))}function $d(i,s){i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&So(i))}function ci(i,s,l,p){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Db(i,s,l,p),s=s.sibling}function Db(i,s,l,p){var A=s.flags;switch(s.tag){case 0:case 11:case 15:ci(i,s,l,p),A&2048&&Po(9,s);break;case 1:ci(i,s,l,p);break;case 3:ci(i,s,l,p),A&2048&&(i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&So(i)));break;case 12:if(A&2048){ci(i,s,l,p),i=s.stateNode;try{var T=s.memoizedProps,I=T.id,q=T.onPostCommit;typeof q=="function"&&q(I,s.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(Q){Je(s,s.return,Q)}}else ci(i,s,l,p);break;case 31:ci(i,s,l,p);break;case 13:ci(i,s,l,p);break;case 23:break;case 22:T=s.stateNode,I=s.alternate,s.memoizedState!==null?T._visibility&2?ci(i,s,l,p):jo(i,s):T._visibility&2?ci(i,s,l,p):(T._visibility|=2,va(i,s,l,p,(s.subtreeFlags&10256)!==0||!1)),A&2048&&Hd(I,s);break;case 24:ci(i,s,l,p),A&2048&&$d(s.alternate,s);break;default:ci(i,s,l,p)}}function va(i,s,l,p,A){for(A=A&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var T=i,I=s,q=l,Q=p,ae=I.flags;switch(I.tag){case 0:case 11:case 15:va(T,I,q,Q,A),Po(8,I);break;case 23:break;case 22:var he=I.stateNode;I.memoizedState!==null?he._visibility&2?va(T,I,q,Q,A):jo(T,I):(he._visibility|=2,va(T,I,q,Q,A)),A&&ae&2048&&Hd(I.alternate,I);break;case 24:va(T,I,q,Q,A),A&&ae&2048&&$d(I.alternate,I);break;default:va(T,I,q,Q,A)}s=s.sibling}}function jo(i,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var l=i,p=s,A=p.flags;switch(p.tag){case 22:jo(l,p),A&2048&&Hd(p.alternate,p);break;case 24:jo(l,p),A&2048&&$d(p.alternate,p);break;default:jo(l,p)}s=s.sibling}}var Io=8192;function pa(i,s,l){if(i.subtreeFlags&Io)for(i=i.child;i!==null;)Rb(i,s,l),i=i.sibling}function Rb(i,s,l){switch(i.tag){case 26:pa(i,s,l),i.flags&Io&&i.memoizedState!==null&&lD(l,li,i.memoizedState,i.memoizedProps);break;case 5:pa(i,s,l);break;case 3:case 4:var p=li;li=Wc(i.stateNode.containerInfo),pa(i,s,l),li=p;break;case 22:i.memoizedState===null&&(p=i.alternate,p!==null&&p.memoizedState!==null?(p=Io,Io=16777216,pa(i,s,l),Io=p):pa(i,s,l));break;default:pa(i,s,l)}}function kb(i){var s=i.alternate;if(s!==null&&(i=s.child,i!==null)){s.child=null;do s=i.sibling,i.sibling=null,i=s;while(i!==null)}}function No(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var l=0;l<s.length;l++){var p=s[l];Ht=p,Bb(p,i)}kb(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Pb(i),i=i.sibling}function Pb(i){switch(i.tag){case 0:case 11:case 15:No(i),i.flags&2048&&Dn(9,i,i.return);break;case 3:No(i);break;case 12:No(i);break;case 22:var s=i.stateNode;i.memoizedState!==null&&s._visibility&2&&(i.return===null||i.return.tag!==13)?(s._visibility&=-3,Rc(i)):No(i);break;default:No(i)}}function Rc(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var l=0;l<s.length;l++){var p=s[l];Ht=p,Bb(p,i)}kb(i)}for(i=i.child;i!==null;){switch(s=i,s.tag){case 0:case 11:case 15:Dn(8,s,s.return),Rc(s);break;case 22:l=s.stateNode,l._visibility&2&&(l._visibility&=-3,Rc(s));break;default:Rc(s)}i=i.sibling}}function Bb(i,s){for(;Ht!==null;){var l=Ht;switch(l.tag){case 0:case 11:case 15:Dn(8,l,s);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var p=l.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:So(l.memoizedState.cache)}if(p=l.child,p!==null)p.return=l,Ht=p;else e:for(l=i;Ht!==null;){p=Ht;var A=p.sibling,T=p.return;if(Eb(p),p===l){Ht=null;break e}if(A!==null){A.return=T,Ht=A;break e}Ht=T}}}var CT={getCacheForType:function(i){var s=Zt(At),l=s.data.get(i);return l===void 0&&(l=i(),s.data.set(i,l)),l},cacheSignal:function(){return Zt(At).controller.signal}},xT=typeof WeakMap=="function"?WeakMap:Map,Xe=0,st=null,ze=null,Ue=0,Qe=0,Lr=null,Rn=!1,ga=!1,Ud=!1,Yi=0,bt=0,kn=0,ms=0,Fd=0,Or=0,_a=0,zo=null,yr=null,qd=!1,kc=0,jb=0,Pc=1/0,Bc=null,Pn=null,kt=0,Bn=null,ma=null,Vi=0,Wd=0,Gd=null,Ib=null,Ho=0,Kd=null;function Tr(){return(Xe&2)!==0&&Ue!==0?Ue&-Ue:F.T!==null?Jd():Jm()}function Nb(){if(Or===0)if((Ue&536870912)===0||We){var i=_i;_i<<=1,(_i&3932160)===0&&(_i=262144),Or=i}else Or=536870912;return i=Ar.current,i!==null&&(i.flags|=32),Or}function br(i,s,l){(i===st&&(Qe===2||Qe===9)||i.cancelPendingCommit!==null)&&(ya(i,0),jn(i,Ue,Or,!1)),ao(i,l),((Xe&2)===0||i!==st)&&(i===st&&((Xe&2)===0&&(ms|=l),bt===4&&jn(i,Ue,Or,!1)),wi(i))}function zb(i,s,l){if((Xe&6)!==0)throw Error(n(327));var p=!l&&(s&127)===0&&(s&i.expiredLanes)===0||so(i,s),A=p?MT(i,s):Vd(i,s,!0),T=p;do{if(A===0){ga&&!p&&jn(i,s,0,!1);break}else{if(l=i.current.alternate,T&&!ET(l)){A=Vd(i,s,!1),T=!1;continue}if(A===2){if(T=s,i.errorRecoveryDisabledLanes&T)var I=0;else I=i.pendingLanes&-536870913,I=I!==0?I:I&536870912?536870912:0;if(I!==0){s=I;e:{var q=i;A=zo;var Q=q.current.memoizedState.isDehydrated;if(Q&&(ya(q,I).flags|=256),I=Vd(q,I,!1),I!==2){if(Ud&&!Q){q.errorRecoveryDisabledLanes|=T,ms|=T,A=4;break e}T=yr,yr=A,T!==null&&(yr===null?yr=T:yr.push.apply(yr,T))}A=I}if(T=!1,A!==2)continue}}if(A===1){ya(i,0),jn(i,s,0,!0);break}e:{switch(p=i,T=A,T){case 0:case 1:throw Error(n(345));case 4:if((s&4194048)!==s)break;case 6:jn(p,s,Or,!Rn);break e;case 2:yr=null;break;case 3:case 5:break;default:throw Error(n(329))}if((s&62914560)===s&&(A=kc+300-we(),10<A)){if(jn(p,s,Or,!Rn),Wl(p,0,!0)!==0)break e;Vi=s,p.timeoutHandle=g1(Hb.bind(null,p,l,yr,Bc,qd,s,Or,ms,_a,Rn,T,"Throttled",-0,0),A);break e}Hb(p,l,yr,Bc,qd,s,Or,ms,_a,Rn,T,null,-0,0)}}break}while(!0);wi(i)}function Hb(i,s,l,p,A,T,I,q,Q,ae,he,_e,oe,ce){if(i.timeoutHandle=-1,_e=s.subtreeFlags,_e&8192||(_e&16785408)===16785408){_e={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Pi},Rb(s,T,_e);var Ee=(T&62914560)===T?kc-we():(T&4194048)===T?jb-we():0;if(Ee=cD(_e,Ee),Ee!==null){Vi=T,i.cancelPendingCommit=Ee(Yb.bind(null,i,s,T,l,p,A,I,q,Q,he,_e,null,oe,ce)),jn(i,T,I,!ae);return}}Yb(i,s,T,l,p,A,I,q,Q)}function ET(i){for(var s=i;;){var l=s.tag;if((l===0||l===11||l===15)&&s.flags&16384&&(l=s.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var p=0;p<l.length;p++){var A=l[p],T=A.getSnapshot;A=A.value;try{if(!xr(T(),A))return!1}catch{return!1}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function jn(i,s,l,p){s&=~Fd,s&=~ms,i.suspendedLanes|=s,i.pingedLanes&=~s,p&&(i.warmLanes|=s),p=i.expirationTimes;for(var A=s;0<A;){var T=31-Rt(A),I=1<<T;p[T]=-1,A&=~I}l!==0&&Xm(i,l,s)}function jc(){return(Xe&6)===0?($o(0),!1):!0}function Yd(){if(ze!==null){if(Qe===0)var i=ze.return;else i=ze,Ni=cs=null,ud(i),ca=null,Co=0,i=ze;for(;i!==null;)_b(i.alternate,i),i=i.return;ze=null}}function ya(i,s){var l=i.timeoutHandle;l!==-1&&(i.timeoutHandle=-1,WT(l)),l=i.cancelPendingCommit,l!==null&&(i.cancelPendingCommit=null,l()),Vi=0,Yd(),st=i,ze=l=ji(i.current,null),Ue=s,Qe=0,Lr=null,Rn=!1,ga=so(i,s),Ud=!1,_a=Or=Fd=ms=kn=bt=0,yr=zo=null,qd=!1,(s&8)!==0&&(s|=s&32);var p=i.entangledLanes;if(p!==0)for(i=i.entanglements,p&=s;0<p;){var A=31-Rt(p),T=1<<A;s|=i[A],p&=~T}return Yi=s,ic(),l}function $b(i,s){Ie=null,F.H=Do,s===la||s===hc?(s=iy(),Qe=3):s===Qf?(s=iy(),Qe=4):Qe=s===Ad?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Lr=s,ze===null&&(bt=1,Ec(i,Ur(s,i.current)))}function Ub(){var i=Ar.current;return i===null?!0:(Ue&4194048)===Ue?Gr===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?i===Gr:!1}function Fb(){var i=F.H;return F.H=Do,i===null?Do:i}function qb(){var i=F.A;return F.A=CT,i}function Ic(){bt=4,Rn||(Ue&4194048)!==Ue&&Ar.current!==null||(ga=!0),(kn&134217727)===0&&(ms&134217727)===0||st===null||jn(st,Ue,Or,!1)}function Vd(i,s,l){var p=Xe;Xe|=2;var A=Fb(),T=qb();(st!==i||Ue!==s)&&(Bc=null,ya(i,s)),s=!1;var I=bt;e:do try{if(Qe!==0&&ze!==null){var q=ze,Q=Lr;switch(Qe){case 8:Yd(),I=6;break e;case 3:case 2:case 9:case 6:Ar.current===null&&(s=!0);var ae=Qe;if(Qe=0,Lr=null,ba(i,q,Q,ae),l&&ga){I=0;break e}break;default:ae=Qe,Qe=0,Lr=null,ba(i,q,Q,ae)}}AT(),I=bt;break}catch(he){$b(i,he)}while(!0);return s&&i.shellSuspendCounter++,Ni=cs=null,Xe=p,F.H=A,F.A=T,ze===null&&(st=null,Ue=0,ic()),I}function AT(){for(;ze!==null;)Wb(ze)}function MT(i,s){var l=Xe;Xe|=2;var p=Fb(),A=qb();st!==i||Ue!==s?(Bc=null,Pc=we()+500,ya(i,s)):ga=so(i,s);e:do try{if(Qe!==0&&ze!==null){s=ze;var T=Lr;t:switch(Qe){case 1:Qe=0,Lr=null,ba(i,s,T,1);break;case 2:case 9:if(ty(T)){Qe=0,Lr=null,Gb(s);break}s=function(){Qe!==2&&Qe!==9||st!==i||(Qe=7),wi(i)},T.then(s,s);break e;case 3:Qe=7;break e;case 4:Qe=5;break e;case 7:ty(T)?(Qe=0,Lr=null,Gb(s)):(Qe=0,Lr=null,ba(i,s,T,7));break;case 5:var I=null;switch(ze.tag){case 26:I=ze.memoizedState;case 5:case 27:var q=ze;if(I?D1(I):q.stateNode.complete){Qe=0,Lr=null;var Q=q.sibling;if(Q!==null)ze=Q;else{var ae=q.return;ae!==null?(ze=ae,Nc(ae)):ze=null}break t}}Qe=0,Lr=null,ba(i,s,T,5);break;case 6:Qe=0,Lr=null,ba(i,s,T,6);break;case 8:Yd(),bt=6;break e;default:throw Error(n(462))}}LT();break}catch(he){$b(i,he)}while(!0);return Ni=cs=null,F.H=p,F.A=A,Xe=l,ze!==null?0:(st=null,Ue=0,ic(),bt)}function LT(){for(;ze!==null&&!be();)Wb(ze)}function Wb(i){var s=pb(i.alternate,i,Yi);i.memoizedProps=i.pendingProps,s===null?Nc(i):ze=s}function Gb(i){var s=i,l=s.alternate;switch(s.tag){case 15:case 0:s=cb(l,s,s.pendingProps,s.type,void 0,Ue);break;case 11:s=cb(l,s,s.pendingProps,s.type.render,s.ref,Ue);break;case 5:ud(s);default:_b(l,s),s=ze=q0(s,Yi),s=pb(l,s,Yi)}i.memoizedProps=i.pendingProps,s===null?Nc(i):ze=s}function ba(i,s,l,p){Ni=cs=null,ud(s),ca=null,Co=0;var A=s.return;try{if(gT(i,A,s,l,Ue)){bt=1,Ec(i,Ur(l,i.current)),ze=null;return}}catch(T){if(A!==null)throw ze=A,T;bt=1,Ec(i,Ur(l,i.current)),ze=null;return}s.flags&32768?(We||p===1?i=!0:ga||(Ue&536870912)!==0?i=!1:(Rn=i=!0,(p===2||p===9||p===3||p===6)&&(p=Ar.current,p!==null&&p.tag===13&&(p.flags|=16384))),Kb(s,i)):Nc(s)}function Nc(i){var s=i;do{if((s.flags&32768)!==0){Kb(s,Rn);return}i=s.return;var l=yT(s.alternate,s,Yi);if(l!==null){ze=l;return}if(s=s.sibling,s!==null){ze=s;return}ze=s=i}while(s!==null);bt===0&&(bt=5)}function Kb(i,s){do{var l=bT(i.alternate,i);if(l!==null){l.flags&=32767,ze=l;return}if(l=i.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!s&&(i=i.sibling,i!==null)){ze=i;return}ze=i=l}while(i!==null);bt=6,ze=null}function Yb(i,s,l,p,A,T,I,q,Q){i.cancelPendingCommit=null;do zc();while(kt!==0);if((Xe&6)!==0)throw Error(n(327));if(s!==null){if(s===i.current)throw Error(n(177));if(T=s.lanes|s.childLanes,T|=If,oO(i,l,T,I,q,Q),i===st&&(ze=st=null,Ue=0),ma=s,Bn=i,Vi=l,Wd=T,Gd=A,Ib=p,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,RT(ct,function(){return Jb(),null})):(i.callbackNode=null,i.callbackPriority=0),p=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||p){p=F.T,F.T=null,A=K.p,K.p=2,I=Xe,Xe|=4;try{ST(i,s,l)}finally{Xe=I,K.p=A,F.T=p}}kt=1,Vb(),Xb(),Zb()}}function Vb(){if(kt===1){kt=0;var i=Bn,s=ma,l=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||l){l=F.T,F.T=null;var p=K.p;K.p=2;var A=Xe;Xe|=4;try{Ob(s,i);var T=ov,I=B0(i.containerInfo),q=T.focusedElem,Q=T.selectionRange;if(I!==q&&q&&q.ownerDocument&&P0(q.ownerDocument.documentElement,q)){if(Q!==null&&Rf(q)){var ae=Q.start,he=Q.end;if(he===void 0&&(he=ae),"selectionStart"in q)q.selectionStart=ae,q.selectionEnd=Math.min(he,q.value.length);else{var _e=q.ownerDocument||document,oe=_e&&_e.defaultView||window;if(oe.getSelection){var ce=oe.getSelection(),Ee=q.textContent.length,De=Math.min(Q.start,Ee),it=Q.end===void 0?De:Math.min(Q.end,Ee);!ce.extend&&De>it&&(I=it,it=De,De=I);var ne=k0(q,De),re=k0(q,it);if(ne&&re&&(ce.rangeCount!==1||ce.anchorNode!==ne.node||ce.anchorOffset!==ne.offset||ce.focusNode!==re.node||ce.focusOffset!==re.offset)){var se=_e.createRange();se.setStart(ne.node,ne.offset),ce.removeAllRanges(),De>it?(ce.addRange(se),ce.extend(re.node,re.offset)):(se.setEnd(re.node,re.offset),ce.addRange(se))}}}}for(_e=[],ce=q;ce=ce.parentNode;)ce.nodeType===1&&_e.push({element:ce,left:ce.scrollLeft,top:ce.scrollTop});for(typeof q.focus=="function"&&q.focus(),q=0;q<_e.length;q++){var pe=_e[q];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}Zc=!!av,ov=av=null}finally{Xe=A,K.p=p,F.T=l}}i.current=s,kt=2}}function Xb(){if(kt===2){kt=0;var i=Bn,s=ma,l=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||l){l=F.T,F.T=null;var p=K.p;K.p=2;var A=Xe;Xe|=4;try{xb(i,s.alternate,s)}finally{Xe=A,K.p=p,F.T=l}}kt=3}}function Zb(){if(kt===4||kt===3){kt=0,ge();var i=Bn,s=ma,l=Vi,p=Ib;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?kt=5:(kt=0,ma=Bn=null,Qb(i,i.pendingLanes));var A=i.pendingLanes;if(A===0&&(Pn=null),df(l),s=s.stateNode,_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(lr,s,void 0,(s.current.flags&128)===128)}catch{}if(p!==null){s=F.T,A=K.p,K.p=2,F.T=null;try{for(var T=i.onRecoverableError,I=0;I<p.length;I++){var q=p[I];T(q.value,{componentStack:q.stack})}}finally{F.T=s,K.p=A}}(Vi&3)!==0&&zc(),wi(i),A=i.pendingLanes,(l&261930)!==0&&(A&42)!==0?i===Kd?Ho++:(Ho=0,Kd=i):Ho=0,$o(0)}}function Qb(i,s){(i.pooledCacheLanes&=s)===0&&(s=i.pooledCache,s!=null&&(i.pooledCache=null,So(s)))}function zc(){return Vb(),Xb(),Zb(),Jb()}function Jb(){if(kt!==5)return!1;var i=Bn,s=Wd;Wd=0;var l=df(Vi),p=F.T,A=K.p;try{K.p=32>l?32:l,F.T=null,l=Gd,Gd=null;var T=Bn,I=Vi;if(kt=0,ma=Bn=null,Vi=0,(Xe&6)!==0)throw Error(n(331));var q=Xe;if(Xe|=4,Pb(T.current),Db(T,T.current,I,l),Xe=q,$o(0,!1),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(lr,T)}catch{}return!0}finally{K.p=A,F.T=p,Qb(i,s)}}function e1(i,s,l){s=Ur(l,s),s=Ed(i.stateNode,s,2),i=Ln(i,s,2),i!==null&&(ao(i,2),wi(i))}function Je(i,s,l){if(i.tag===3)e1(i,i,l);else for(;s!==null;){if(s.tag===3){e1(s,i,l);break}else if(s.tag===1){var p=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Pn===null||!Pn.has(p))){i=Ur(l,i),l=tb(2),p=Ln(s,l,2),p!==null&&(rb(l,p,s,i),ao(p,2),wi(p));break}}s=s.return}}function Xd(i,s,l){var p=i.pingCache;if(p===null){p=i.pingCache=new xT;var A=new Set;p.set(s,A)}else A=p.get(s),A===void 0&&(A=new Set,p.set(s,A));A.has(l)||(Ud=!0,A.add(l),i=OT.bind(null,i,s,l),s.then(i,i))}function OT(i,s,l){var p=i.pingCache;p!==null&&p.delete(s),i.pingedLanes|=i.suspendedLanes&l,i.warmLanes&=~l,st===i&&(Ue&l)===l&&(bt===4||bt===3&&(Ue&62914560)===Ue&&300>we()-kc?(Xe&2)===0&&ya(i,0):Fd|=l,_a===Ue&&(_a=0)),wi(i)}function t1(i,s){s===0&&(s=Vm()),i=as(i,s),i!==null&&(ao(i,s),wi(i))}function TT(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),t1(i,l)}function DT(i,s){var l=0;switch(i.tag){case 31:case 13:var p=i.stateNode,A=i.memoizedState;A!==null&&(l=A.retryLane);break;case 19:p=i.stateNode;break;case 22:p=i.stateNode._retryCache;break;default:throw Error(n(314))}p!==null&&p.delete(s),t1(i,l)}function RT(i,s){return Se(i,s)}var Hc=null,Sa=null,Zd=!1,$c=!1,Qd=!1,In=0;function wi(i){i!==Sa&&i.next===null&&(Sa===null?Hc=Sa=i:Sa=Sa.next=i),$c=!0,Zd||(Zd=!0,PT())}function $o(i,s){if(!Qd&&$c){Qd=!0;do for(var l=!1,p=Hc;p!==null;){if(i!==0){var A=p.pendingLanes;if(A===0)var T=0;else{var I=p.suspendedLanes,q=p.pingedLanes;T=(1<<31-Rt(42|i)+1)-1,T&=A&~(I&~q),T=T&201326741?T&201326741|1:T?T|2:0}T!==0&&(l=!0,s1(p,T))}else T=Ue,T=Wl(p,p===st?T:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(T&3)===0||so(p,T)||(l=!0,s1(p,T));p=p.next}while(l);Qd=!1}}function kT(){r1()}function r1(){$c=Zd=!1;var i=0;In!==0&&qT()&&(i=In);for(var s=we(),l=null,p=Hc;p!==null;){var A=p.next,T=i1(p,s);T===0?(p.next=null,l===null?Hc=A:l.next=A,A===null&&(Sa=l)):(l=p,(i!==0||(T&3)!==0)&&($c=!0)),p=A}kt!==0&&kt!==5||$o(i),In!==0&&(In=0)}function i1(i,s){for(var l=i.suspendedLanes,p=i.pingedLanes,A=i.expirationTimes,T=i.pendingLanes&-62914561;0<T;){var I=31-Rt(T),q=1<<I,Q=A[I];Q===-1?((q&l)===0||(q&p)!==0)&&(A[I]=aO(q,s)):Q<=s&&(i.expiredLanes|=q),T&=~q}if(s=st,l=Ue,l=Wl(i,i===s?l:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p=i.callbackNode,l===0||i===s&&(Qe===2||Qe===9)||i.cancelPendingCommit!==null)return p!==null&&p!==null&&ye(p),i.callbackNode=null,i.callbackPriority=0;if((l&3)===0||so(i,l)){if(s=l&-l,s===i.callbackPriority)return s;switch(p!==null&&ye(p),df(l)){case 2:case 8:l=It;break;case 32:l=ct;break;case 268435456:l=qe;break;default:l=ct}return p=n1.bind(null,i),l=Se(l,p),i.callbackPriority=s,i.callbackNode=l,s}return p!==null&&p!==null&&ye(p),i.callbackPriority=2,i.callbackNode=null,2}function n1(i,s){if(kt!==0&&kt!==5)return i.callbackNode=null,i.callbackPriority=0,null;var l=i.callbackNode;if(zc()&&i.callbackNode!==l)return null;var p=Ue;return p=Wl(i,i===st?p:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p===0?null:(zb(i,p,s),i1(i,we()),i.callbackNode!=null&&i.callbackNode===l?n1.bind(null,i):null)}function s1(i,s){if(zc())return null;zb(i,s,!0)}function PT(){GT(function(){(Xe&6)!==0?Se(Be,kT):r1()})}function Jd(){if(In===0){var i=aa;i===0&&(i=Nr,Nr<<=1,(Nr&261888)===0&&(Nr=256)),In=i}return In}function a1(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Vl(""+i)}function o1(i,s){var l=s.ownerDocument.createElement("input");return l.name=s.name,l.value=s.value,i.id&&l.setAttribute("form",i.id),s.parentNode.insertBefore(l,s),i=new FormData(i),l.parentNode.removeChild(l),i}function BT(i,s,l,p,A){if(s==="submit"&&l&&l.stateNode===A){var T=a1((A[vr]||null).action),I=p.submitter;I&&(s=(s=I[vr]||null)?a1(s.formAction):I.getAttribute("formAction"),s!==null&&(T=s,I=null));var q=new Jl("action","action",null,p,A);i.push({event:q,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(In!==0){var Q=I?o1(A,I):new FormData(A);yd(l,{pending:!0,data:Q,method:A.method,action:T},null,Q)}}else typeof T=="function"&&(q.preventDefault(),Q=I?o1(A,I):new FormData(A),yd(l,{pending:!0,data:Q,method:A.method,action:T},T,Q))},currentTarget:A}]})}}for(var ev=0;ev<jf.length;ev++){var tv=jf[ev],jT=tv.toLowerCase(),IT=tv[0].toUpperCase()+tv.slice(1);oi(jT,"on"+IT)}oi(N0,"onAnimationEnd"),oi(z0,"onAnimationIteration"),oi(H0,"onAnimationStart"),oi("dblclick","onDoubleClick"),oi("focusin","onFocus"),oi("focusout","onBlur"),oi(JO,"onTransitionRun"),oi(eT,"onTransitionStart"),oi(tT,"onTransitionCancel"),oi($0,"onTransitionEnd"),Gs("onMouseEnter",["mouseout","mouseover"]),Gs("onMouseLeave",["mouseout","mouseover"]),Gs("onPointerEnter",["pointerout","pointerover"]),Gs("onPointerLeave",["pointerout","pointerover"]),rs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),rs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),rs("onBeforeInput",["compositionend","keypress","textInput","paste"]),rs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),rs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),rs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Uo="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(" "),NT=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Uo));function l1(i,s){s=(s&4)!==0;for(var l=0;l<i.length;l++){var p=i[l],A=p.event;p=p.listeners;e:{var T=void 0;if(s)for(var I=p.length-1;0<=I;I--){var q=p[I],Q=q.instance,ae=q.currentTarget;if(q=q.listener,Q!==T&&A.isPropagationStopped())break e;T=q,A.currentTarget=ae;try{T(A)}catch(he){rc(he)}A.currentTarget=null,T=Q}else for(I=0;I<p.length;I++){if(q=p[I],Q=q.instance,ae=q.currentTarget,q=q.listener,Q!==T&&A.isPropagationStopped())break e;T=q,A.currentTarget=ae;try{T(A)}catch(he){rc(he)}A.currentTarget=null,T=Q}}}}function He(i,s){var l=s[vf];l===void 0&&(l=s[vf]=new Set);var p=i+"__bubble";l.has(p)||(c1(s,i,2,!1),l.add(p))}function rv(i,s,l){var p=0;s&&(p|=4),c1(l,i,p,s)}var Uc="_reactListening"+Math.random().toString(36).slice(2);function iv(i){if(!i[Uc]){i[Uc]=!0,r0.forEach(function(l){l!=="selectionchange"&&(NT.has(l)||rv(l,!1,i),rv(l,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Uc]||(s[Uc]=!0,rv("selectionchange",!1,s))}}function c1(i,s,l,p){switch(N1(s)){case 2:var A=fD;break;case 8:A=dD;break;default:A=mv}l=A.bind(null,s,l,i),A=void 0,!Cf||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(A=!0),p?A!==void 0?i.addEventListener(s,l,{capture:!0,passive:A}):i.addEventListener(s,l,!0):A!==void 0?i.addEventListener(s,l,{passive:A}):i.addEventListener(s,l,!1)}function nv(i,s,l,p,A){var T=p;if((s&1)===0&&(s&2)===0&&p!==null)e:for(;;){if(p===null)return;var I=p.tag;if(I===3||I===4){var q=p.stateNode.containerInfo;if(q===A)break;if(I===4)for(I=p.return;I!==null;){var Q=I.tag;if((Q===3||Q===4)&&I.stateNode.containerInfo===A)return;I=I.return}for(;q!==null;){if(I=Fs(q),I===null)return;if(Q=I.tag,Q===5||Q===6||Q===26||Q===27){p=T=I;continue e}q=q.parentNode}}p=p.return}v0(function(){var ae=T,he=Sf(l),_e=[];e:{var oe=U0.get(i);if(oe!==void 0){var ce=Jl,Ee=i;switch(i){case"keypress":if(Zl(l)===0)break e;case"keydown":case"keyup":ce=DO;break;case"focusin":Ee="focus",ce=Mf;break;case"focusout":Ee="blur",ce=Mf;break;case"beforeblur":case"afterblur":ce=Mf;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ce=_0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ce=yO;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ce=PO;break;case N0:case z0:case H0:ce=wO;break;case $0:ce=jO;break;case"scroll":case"scrollend":ce=_O;break;case"wheel":ce=NO;break;case"copy":case"cut":case"paste":ce=xO;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ce=y0;break;case"toggle":case"beforetoggle":ce=HO}var De=(s&4)!==0,it=!De&&(i==="scroll"||i==="scrollend"),ne=De?oe!==null?oe+"Capture":null:oe;De=[];for(var re=ae,se;re!==null;){var pe=re;if(se=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||se===null||ne===null||(pe=co(re,ne),pe!=null&&De.push(Fo(re,pe,se))),it)break;re=re.return}0<De.length&&(oe=new ce(oe,Ee,null,l,he),_e.push({event:oe,listeners:De}))}}if((s&7)===0){e:{if(oe=i==="mouseover"||i==="pointerover",ce=i==="mouseout"||i==="pointerout",oe&&l!==bf&&(Ee=l.relatedTarget||l.fromElement)&&(Fs(Ee)||Ee[Us]))break e;if((ce||oe)&&(oe=he.window===he?he:(oe=he.ownerDocument)?oe.defaultView||oe.parentWindow:window,ce?(Ee=l.relatedTarget||l.toElement,ce=ae,Ee=Ee?Fs(Ee):null,Ee!==null&&(it=h(Ee),De=Ee.tag,Ee!==it||De!==5&&De!==27&&De!==6)&&(Ee=null)):(ce=null,Ee=ae),ce!==Ee)){if(De=_0,pe="onMouseLeave",ne="onMouseEnter",re="mouse",(i==="pointerout"||i==="pointerover")&&(De=y0,pe="onPointerLeave",ne="onPointerEnter",re="pointer"),it=ce==null?oe:lo(ce),se=Ee==null?oe:lo(Ee),oe=new De(pe,re+"leave",ce,l,he),oe.target=it,oe.relatedTarget=se,pe=null,Fs(he)===ae&&(De=new De(ne,re+"enter",Ee,l,he),De.target=se,De.relatedTarget=it,pe=De),it=pe,ce&&Ee)t:{for(De=zT,ne=ce,re=Ee,se=0,pe=ne;pe;pe=De(pe))se++;pe=0;for(var Le=re;Le;Le=De(Le))pe++;for(;0<se-pe;)ne=De(ne),se--;for(;0<pe-se;)re=De(re),pe--;for(;se--;){if(ne===re||re!==null&&ne===re.alternate){De=ne;break t}ne=De(ne),re=De(re)}De=null}else De=null;ce!==null&&u1(_e,oe,ce,De,!1),Ee!==null&&it!==null&&u1(_e,it,Ee,De,!0)}}e:{if(oe=ae?lo(ae):window,ce=oe.nodeName&&oe.nodeName.toLowerCase(),ce==="select"||ce==="input"&&oe.type==="file")var Ge=M0;else if(E0(oe))if(L0)Ge=XO;else{Ge=YO;var Ae=KO}else ce=oe.nodeName,!ce||ce.toLowerCase()!=="input"||oe.type!=="checkbox"&&oe.type!=="radio"?ae&&yf(ae.elementType)&&(Ge=M0):Ge=VO;if(Ge&&(Ge=Ge(i,ae))){A0(_e,Ge,l,he);break e}Ae&&Ae(i,oe,ae),i==="focusout"&&ae&&oe.type==="number"&&ae.memoizedProps.value!=null&&mf(oe,"number",oe.value)}switch(Ae=ae?lo(ae):window,i){case"focusin":(E0(Ae)||Ae.contentEditable==="true")&&(Qs=Ae,kf=ae,mo=null);break;case"focusout":mo=kf=Qs=null;break;case"mousedown":Pf=!0;break;case"contextmenu":case"mouseup":case"dragend":Pf=!1,j0(_e,l,he);break;case"selectionchange":if(QO)break;case"keydown":case"keyup":j0(_e,l,he)}var Ne;if(Of)e:{switch(i){case"compositionstart":var Fe="onCompositionStart";break e;case"compositionend":Fe="onCompositionEnd";break e;case"compositionupdate":Fe="onCompositionUpdate";break e}Fe=void 0}else Zs?C0(i,l)&&(Fe="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(Fe="onCompositionStart");Fe&&(b0&&l.locale!=="ko"&&(Zs||Fe!=="onCompositionStart"?Fe==="onCompositionEnd"&&Zs&&(Ne=p0()):(Sn=he,xf="value"in Sn?Sn.value:Sn.textContent,Zs=!0)),Ae=Fc(ae,Fe),0<Ae.length&&(Fe=new m0(Fe,i,null,l,he),_e.push({event:Fe,listeners:Ae}),Ne?Fe.data=Ne:(Ne=x0(l),Ne!==null&&(Fe.data=Ne)))),(Ne=UO?FO(i,l):qO(i,l))&&(Fe=Fc(ae,"onBeforeInput"),0<Fe.length&&(Ae=new m0("onBeforeInput","beforeinput",null,l,he),_e.push({event:Ae,listeners:Fe}),Ae.data=Ne)),BT(_e,i,ae,l,he)}l1(_e,s)})}function Fo(i,s,l){return{instance:i,listener:s,currentTarget:l}}function Fc(i,s){for(var l=s+"Capture",p=[];i!==null;){var A=i,T=A.stateNode;if(A=A.tag,A!==5&&A!==26&&A!==27||T===null||(A=co(i,l),A!=null&&p.unshift(Fo(i,A,T)),A=co(i,s),A!=null&&p.push(Fo(i,A,T))),i.tag===3)return p;i=i.return}return[]}function zT(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function u1(i,s,l,p,A){for(var T=s._reactName,I=[];l!==null&&l!==p;){var q=l,Q=q.alternate,ae=q.stateNode;if(q=q.tag,Q!==null&&Q===p)break;q!==5&&q!==26&&q!==27||ae===null||(Q=ae,A?(ae=co(l,T),ae!=null&&I.unshift(Fo(l,ae,Q))):A||(ae=co(l,T),ae!=null&&I.push(Fo(l,ae,Q)))),l=l.return}I.length!==0&&i.push({event:s,listeners:I})}var HT=/\r\n?/g,$T=/\u0000|\uFFFD/g;function h1(i){return(typeof i=="string"?i:""+i).replace(HT,`
|
|
49
|
-
`).replace($T,"")}function f1(i,s){return s=h1(s),h1(i)===s}function rt(i,s,l,p,A,T){switch(l){case"children":typeof p=="string"?s==="body"||s==="textarea"&&p===""||Ys(i,p):(typeof p=="number"||typeof p=="bigint")&&s!=="body"&&Ys(i,""+p);break;case"className":Kl(i,"class",p);break;case"tabIndex":Kl(i,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":Kl(i,l,p);break;case"style":f0(i,p,T);break;case"data":if(s!=="object"){Kl(i,"data",p);break}case"src":case"href":if(p===""&&(s!=="a"||l!=="href")){i.removeAttribute(l);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(l);break}p=Vl(""+p),i.setAttribute(l,p);break;case"action":case"formAction":if(typeof p=="function"){i.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof T=="function"&&(l==="formAction"?(s!=="input"&&rt(i,s,"name",A.name,A,null),rt(i,s,"formEncType",A.formEncType,A,null),rt(i,s,"formMethod",A.formMethod,A,null),rt(i,s,"formTarget",A.formTarget,A,null)):(rt(i,s,"encType",A.encType,A,null),rt(i,s,"method",A.method,A,null),rt(i,s,"target",A.target,A,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(l);break}p=Vl(""+p),i.setAttribute(l,p);break;case"onClick":p!=null&&(i.onclick=Pi);break;case"onScroll":p!=null&&He("scroll",i);break;case"onScrollEnd":p!=null&&He("scrollend",i);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(n(61));if(l=p.__html,l!=null){if(A.children!=null)throw Error(n(60));i.innerHTML=l}}break;case"multiple":i.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":i.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){i.removeAttribute("xlink:href");break}l=Vl(""+p),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(l,""+p):i.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":p&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(l,""):i.removeAttribute(l);break;case"capture":case"download":p===!0?i.setAttribute(l,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(l,p):i.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?i.setAttribute(l,p):i.removeAttribute(l);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?i.removeAttribute(l):i.setAttribute(l,p);break;case"popover":He("beforetoggle",i),He("toggle",i),Gl(i,"popover",p);break;case"xlinkActuate":ki(i,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":ki(i,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":ki(i,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":ki(i,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":ki(i,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":ki(i,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":ki(i,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":ki(i,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":ki(i,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":Gl(i,"is",p);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=pO.get(l)||l,Gl(i,l,p))}}function sv(i,s,l,p,A,T){switch(l){case"style":f0(i,p,T);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(n(61));if(l=p.__html,l!=null){if(A.children!=null)throw Error(n(60));i.innerHTML=l}}break;case"children":typeof p=="string"?Ys(i,p):(typeof p=="number"||typeof p=="bigint")&&Ys(i,""+p);break;case"onScroll":p!=null&&He("scroll",i);break;case"onScrollEnd":p!=null&&He("scrollend",i);break;case"onClick":p!=null&&(i.onclick=Pi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!i0.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(A=l.endsWith("Capture"),s=l.slice(2,A?l.length-7:void 0),T=i[vr]||null,T=T!=null?T[l]:null,typeof T=="function"&&i.removeEventListener(s,T,A),typeof p=="function")){typeof T!="function"&&T!==null&&(l in i?i[l]=null:i.hasAttribute(l)&&i.removeAttribute(l)),i.addEventListener(s,p,A);break e}l in i?i[l]=p:p===!0?i.setAttribute(l,""):Gl(i,l,p)}}}function Jt(i,s,l){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":He("error",i),He("load",i);var p=!1,A=!1,T;for(T in l)if(l.hasOwnProperty(T)){var I=l[T];if(I!=null)switch(T){case"src":p=!0;break;case"srcSet":A=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,s));default:rt(i,s,T,I,l,null)}}A&&rt(i,s,"srcSet",l.srcSet,l,null),p&&rt(i,s,"src",l.src,l,null);return;case"input":He("invalid",i);var q=T=I=A=null,Q=null,ae=null;for(p in l)if(l.hasOwnProperty(p)){var he=l[p];if(he!=null)switch(p){case"name":A=he;break;case"type":I=he;break;case"checked":Q=he;break;case"defaultChecked":ae=he;break;case"value":T=he;break;case"defaultValue":q=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(n(137,s));break;default:rt(i,s,p,he,l,null)}}l0(i,T,q,Q,ae,I,A,!1);return;case"select":He("invalid",i),p=I=T=null;for(A in l)if(l.hasOwnProperty(A)&&(q=l[A],q!=null))switch(A){case"value":T=q;break;case"defaultValue":I=q;break;case"multiple":p=q;default:rt(i,s,A,q,l,null)}s=T,l=I,i.multiple=!!p,s!=null?Ks(i,!!p,s,!1):l!=null&&Ks(i,!!p,l,!0);return;case"textarea":He("invalid",i),T=A=p=null;for(I in l)if(l.hasOwnProperty(I)&&(q=l[I],q!=null))switch(I){case"value":p=q;break;case"defaultValue":A=q;break;case"children":T=q;break;case"dangerouslySetInnerHTML":if(q!=null)throw Error(n(91));break;default:rt(i,s,I,q,l,null)}u0(i,p,A,T);return;case"option":for(Q in l)if(l.hasOwnProperty(Q)&&(p=l[Q],p!=null))switch(Q){case"selected":i.selected=p&&typeof p!="function"&&typeof p!="symbol";break;default:rt(i,s,Q,p,l,null)}return;case"dialog":He("beforetoggle",i),He("toggle",i),He("cancel",i),He("close",i);break;case"iframe":case"object":He("load",i);break;case"video":case"audio":for(p=0;p<Uo.length;p++)He(Uo[p],i);break;case"image":He("error",i),He("load",i);break;case"details":He("toggle",i);break;case"embed":case"source":case"link":He("error",i),He("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ae in l)if(l.hasOwnProperty(ae)&&(p=l[ae],p!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,s));default:rt(i,s,ae,p,l,null)}return;default:if(yf(s)){for(he in l)l.hasOwnProperty(he)&&(p=l[he],p!==void 0&&sv(i,s,he,p,l,void 0));return}}for(q in l)l.hasOwnProperty(q)&&(p=l[q],p!=null&&rt(i,s,q,p,l,null))}function UT(i,s,l,p){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var A=null,T=null,I=null,q=null,Q=null,ae=null,he=null;for(ce in l){var _e=l[ce];if(l.hasOwnProperty(ce)&&_e!=null)switch(ce){case"checked":break;case"value":break;case"defaultValue":Q=_e;default:p.hasOwnProperty(ce)||rt(i,s,ce,null,p,_e)}}for(var oe in p){var ce=p[oe];if(_e=l[oe],p.hasOwnProperty(oe)&&(ce!=null||_e!=null))switch(oe){case"type":T=ce;break;case"name":A=ce;break;case"checked":ae=ce;break;case"defaultChecked":he=ce;break;case"value":I=ce;break;case"defaultValue":q=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(n(137,s));break;default:ce!==_e&&rt(i,s,oe,ce,p,_e)}}_f(i,I,q,Q,ae,he,T,A);return;case"select":ce=I=q=oe=null;for(T in l)if(Q=l[T],l.hasOwnProperty(T)&&Q!=null)switch(T){case"value":break;case"multiple":ce=Q;default:p.hasOwnProperty(T)||rt(i,s,T,null,p,Q)}for(A in p)if(T=p[A],Q=l[A],p.hasOwnProperty(A)&&(T!=null||Q!=null))switch(A){case"value":oe=T;break;case"defaultValue":q=T;break;case"multiple":I=T;default:T!==Q&&rt(i,s,A,T,p,Q)}s=q,l=I,p=ce,oe!=null?Ks(i,!!l,oe,!1):!!p!=!!l&&(s!=null?Ks(i,!!l,s,!0):Ks(i,!!l,l?[]:"",!1));return;case"textarea":ce=oe=null;for(q in l)if(A=l[q],l.hasOwnProperty(q)&&A!=null&&!p.hasOwnProperty(q))switch(q){case"value":break;case"children":break;default:rt(i,s,q,null,p,A)}for(I in p)if(A=p[I],T=l[I],p.hasOwnProperty(I)&&(A!=null||T!=null))switch(I){case"value":oe=A;break;case"defaultValue":ce=A;break;case"children":break;case"dangerouslySetInnerHTML":if(A!=null)throw Error(n(91));break;default:A!==T&&rt(i,s,I,A,p,T)}c0(i,oe,ce);return;case"option":for(var Ee in l)if(oe=l[Ee],l.hasOwnProperty(Ee)&&oe!=null&&!p.hasOwnProperty(Ee))switch(Ee){case"selected":i.selected=!1;break;default:rt(i,s,Ee,null,p,oe)}for(Q in p)if(oe=p[Q],ce=l[Q],p.hasOwnProperty(Q)&&oe!==ce&&(oe!=null||ce!=null))switch(Q){case"selected":i.selected=oe&&typeof oe!="function"&&typeof oe!="symbol";break;default:rt(i,s,Q,oe,p,ce)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var De in l)oe=l[De],l.hasOwnProperty(De)&&oe!=null&&!p.hasOwnProperty(De)&&rt(i,s,De,null,p,oe);for(ae in p)if(oe=p[ae],ce=l[ae],p.hasOwnProperty(ae)&&oe!==ce&&(oe!=null||ce!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(n(137,s));break;default:rt(i,s,ae,oe,p,ce)}return;default:if(yf(s)){for(var it in l)oe=l[it],l.hasOwnProperty(it)&&oe!==void 0&&!p.hasOwnProperty(it)&&sv(i,s,it,void 0,p,oe);for(he in p)oe=p[he],ce=l[he],!p.hasOwnProperty(he)||oe===ce||oe===void 0&&ce===void 0||sv(i,s,he,oe,p,ce);return}}for(var ne in l)oe=l[ne],l.hasOwnProperty(ne)&&oe!=null&&!p.hasOwnProperty(ne)&&rt(i,s,ne,null,p,oe);for(_e in p)oe=p[_e],ce=l[_e],!p.hasOwnProperty(_e)||oe===ce||oe==null&&ce==null||rt(i,s,_e,oe,p,ce)}function d1(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function FT(){if(typeof performance.getEntriesByType=="function"){for(var i=0,s=0,l=performance.getEntriesByType("resource"),p=0;p<l.length;p++){var A=l[p],T=A.transferSize,I=A.initiatorType,q=A.duration;if(T&&q&&d1(I)){for(I=0,q=A.responseEnd,p+=1;p<l.length;p++){var Q=l[p],ae=Q.startTime;if(ae>q)break;var he=Q.transferSize,_e=Q.initiatorType;he&&d1(_e)&&(Q=Q.responseEnd,I+=he*(Q<q?1:(q-ae)/(Q-ae)))}if(--p,s+=8*(T+I)/(A.duration/1e3),i++,10<i)break}}if(0<i)return s/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var av=null,ov=null;function qc(i){return i.nodeType===9?i:i.ownerDocument}function v1(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function p1(i,s){if(i===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&s==="foreignObject"?0:i}function lv(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var cv=null;function qT(){var i=window.event;return i&&i.type==="popstate"?i===cv?!1:(cv=i,!0):(cv=null,!1)}var g1=typeof setTimeout=="function"?setTimeout:void 0,WT=typeof clearTimeout=="function"?clearTimeout:void 0,_1=typeof Promise=="function"?Promise:void 0,GT=typeof queueMicrotask=="function"?queueMicrotask:typeof _1<"u"?function(i){return _1.resolve(null).then(i).catch(KT)}:g1;function KT(i){setTimeout(function(){throw i})}function Nn(i){return i==="head"}function m1(i,s){var l=s,p=0;do{var A=l.nextSibling;if(i.removeChild(l),A&&A.nodeType===8)if(l=A.data,l==="/$"||l==="/&"){if(p===0){i.removeChild(A),Ea(s);return}p--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")p++;else if(l==="html")qo(i.ownerDocument.documentElement);else if(l==="head"){l=i.ownerDocument.head,qo(l);for(var T=l.firstChild;T;){var I=T.nextSibling,q=T.nodeName;T[oo]||q==="SCRIPT"||q==="STYLE"||q==="LINK"&&T.rel.toLowerCase()==="stylesheet"||l.removeChild(T),T=I}}else l==="body"&&qo(i.ownerDocument.body);l=A}while(l);Ea(s)}function y1(i,s){var l=i;i=0;do{var p=l.nextSibling;if(l.nodeType===1?s?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(s?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),p&&p.nodeType===8)if(l=p.data,l==="/$"){if(i===0)break;i--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||i++;l=p}while(l)}function uv(i){var s=i.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var l=s;switch(s=s.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":uv(l),pf(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}i.removeChild(l)}}function YT(i,s,l,p){for(;i.nodeType===1;){var A=l;if(i.nodeName.toLowerCase()!==s.toLowerCase()){if(!p&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(p){if(!i[oo])switch(s){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(T=i.getAttribute("rel"),T==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(T!==A.rel||i.getAttribute("href")!==(A.href==null||A.href===""?null:A.href)||i.getAttribute("crossorigin")!==(A.crossOrigin==null?null:A.crossOrigin)||i.getAttribute("title")!==(A.title==null?null:A.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(T=i.getAttribute("src"),(T!==(A.src==null?null:A.src)||i.getAttribute("type")!==(A.type==null?null:A.type)||i.getAttribute("crossorigin")!==(A.crossOrigin==null?null:A.crossOrigin))&&T&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(s==="input"&&i.type==="hidden"){var T=A.name==null?null:""+A.name;if(A.type==="hidden"&&i.getAttribute("name")===T)return i}else return i;if(i=Kr(i.nextSibling),i===null)break}return null}function VT(i,s,l){if(s==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!l||(i=Kr(i.nextSibling),i===null))return null;return i}function b1(i,s){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!s||(i=Kr(i.nextSibling),i===null))return null;return i}function hv(i){return i.data==="$?"||i.data==="$~"}function fv(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function XT(i,s){var l=i.ownerDocument;if(i.data==="$~")i._reactRetry=s;else if(i.data!=="$?"||l.readyState!=="loading")s();else{var p=function(){s(),l.removeEventListener("DOMContentLoaded",p)};l.addEventListener("DOMContentLoaded",p),i._reactRetry=p}}function Kr(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return i}var dv=null;function S1(i){i=i.nextSibling;for(var s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"||l==="/&"){if(s===0)return Kr(i.nextSibling);s--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||s++}i=i.nextSibling}return null}function w1(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(s===0)return i;s--}else l!=="/$"&&l!=="/&"||s++}i=i.previousSibling}return null}function C1(i,s,l){switch(s=qc(l),i){case"html":if(i=s.documentElement,!i)throw Error(n(452));return i;case"head":if(i=s.head,!i)throw Error(n(453));return i;case"body":if(i=s.body,!i)throw Error(n(454));return i;default:throw Error(n(451))}}function qo(i){for(var s=i.attributes;s.length;)i.removeAttributeNode(s[0]);pf(i)}var Yr=new Map,x1=new Set;function Wc(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var Xi=K.d;K.d={f:ZT,r:QT,D:JT,C:eD,L:tD,m:rD,X:nD,S:iD,M:sD};function ZT(){var i=Xi.f(),s=jc();return i||s}function QT(i){var s=qs(i);s!==null&&s.tag===5&&s.type==="form"?$y(s):Xi.r(i)}var wa=typeof document>"u"?null:document;function E1(i,s,l){var p=wa;if(p&&typeof s=="string"&&s){var A=Hr(s);A='link[rel="'+i+'"][href="'+A+'"]',typeof l=="string"&&(A+='[crossorigin="'+l+'"]'),x1.has(A)||(x1.add(A),i={rel:i,crossOrigin:l,href:s},p.querySelector(A)===null&&(s=p.createElement("link"),Jt(s,"link",i),zt(s),p.head.appendChild(s)))}}function JT(i){Xi.D(i),E1("dns-prefetch",i,null)}function eD(i,s){Xi.C(i,s),E1("preconnect",i,s)}function tD(i,s,l){Xi.L(i,s,l);var p=wa;if(p&&i&&s){var A='link[rel="preload"][as="'+Hr(s)+'"]';s==="image"&&l&&l.imageSrcSet?(A+='[imagesrcset="'+Hr(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(A+='[imagesizes="'+Hr(l.imageSizes)+'"]')):A+='[href="'+Hr(i)+'"]';var T=A;switch(s){case"style":T=Ca(i);break;case"script":T=xa(i)}Yr.has(T)||(i=u({rel:"preload",href:s==="image"&&l&&l.imageSrcSet?void 0:i,as:s},l),Yr.set(T,i),p.querySelector(A)!==null||s==="style"&&p.querySelector(Wo(T))||s==="script"&&p.querySelector(Go(T))||(s=p.createElement("link"),Jt(s,"link",i),zt(s),p.head.appendChild(s)))}}function rD(i,s){Xi.m(i,s);var l=wa;if(l&&i){var p=s&&typeof s.as=="string"?s.as:"script",A='link[rel="modulepreload"][as="'+Hr(p)+'"][href="'+Hr(i)+'"]',T=A;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":T=xa(i)}if(!Yr.has(T)&&(i=u({rel:"modulepreload",href:i},s),Yr.set(T,i),l.querySelector(A)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Go(T)))return}p=l.createElement("link"),Jt(p,"link",i),zt(p),l.head.appendChild(p)}}}function iD(i,s,l){Xi.S(i,s,l);var p=wa;if(p&&i){var A=Ws(p).hoistableStyles,T=Ca(i);s=s||"default";var I=A.get(T);if(!I){var q={loading:0,preload:null};if(I=p.querySelector(Wo(T)))q.loading=5;else{i=u({rel:"stylesheet",href:i,"data-precedence":s},l),(l=Yr.get(T))&&vv(i,l);var Q=I=p.createElement("link");zt(Q),Jt(Q,"link",i),Q._p=new Promise(function(ae,he){Q.onload=ae,Q.onerror=he}),Q.addEventListener("load",function(){q.loading|=1}),Q.addEventListener("error",function(){q.loading|=2}),q.loading|=4,Gc(I,s,p)}I={type:"stylesheet",instance:I,count:1,state:q},A.set(T,I)}}}function nD(i,s){Xi.X(i,s);var l=wa;if(l&&i){var p=Ws(l).hoistableScripts,A=xa(i),T=p.get(A);T||(T=l.querySelector(Go(A)),T||(i=u({src:i,async:!0},s),(s=Yr.get(A))&&pv(i,s),T=l.createElement("script"),zt(T),Jt(T,"link",i),l.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},p.set(A,T))}}function sD(i,s){Xi.M(i,s);var l=wa;if(l&&i){var p=Ws(l).hoistableScripts,A=xa(i),T=p.get(A);T||(T=l.querySelector(Go(A)),T||(i=u({src:i,async:!0,type:"module"},s),(s=Yr.get(A))&&pv(i,s),T=l.createElement("script"),zt(T),Jt(T,"link",i),l.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},p.set(A,T))}}function A1(i,s,l,p){var A=(A=ve.current)?Wc(A):null;if(!A)throw Error(n(446));switch(i){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(s=Ca(l.href),l=Ws(A).hoistableStyles,p=l.get(s),p||(p={type:"style",instance:null,count:0,state:null},l.set(s,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){i=Ca(l.href);var T=Ws(A).hoistableStyles,I=T.get(i);if(I||(A=A.ownerDocument||A,I={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},T.set(i,I),(T=A.querySelector(Wo(i)))&&!T._p&&(I.instance=T,I.state.loading=5),Yr.has(i)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Yr.set(i,l),T||aD(A,i,l,I.state))),s&&p===null)throw Error(n(528,""));return I}if(s&&p!==null)throw Error(n(529,""));return null;case"script":return s=l.async,l=l.src,typeof l=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=xa(l),l=Ws(A).hoistableScripts,p=l.get(s),p||(p={type:"script",instance:null,count:0,state:null},l.set(s,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,i))}}function Ca(i){return'href="'+Hr(i)+'"'}function Wo(i){return'link[rel="stylesheet"]['+i+"]"}function M1(i){return u({},i,{"data-precedence":i.precedence,precedence:null})}function aD(i,s,l,p){i.querySelector('link[rel="preload"][as="style"]['+s+"]")?p.loading=1:(s=i.createElement("link"),p.preload=s,s.addEventListener("load",function(){return p.loading|=1}),s.addEventListener("error",function(){return p.loading|=2}),Jt(s,"link",l),zt(s),i.head.appendChild(s))}function xa(i){return'[src="'+Hr(i)+'"]'}function Go(i){return"script[async]"+i}function L1(i,s,l){if(s.count++,s.instance===null)switch(s.type){case"style":var p=i.querySelector('style[data-href~="'+Hr(l.href)+'"]');if(p)return s.instance=p,zt(p),p;var A=u({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return p=(i.ownerDocument||i).createElement("style"),zt(p),Jt(p,"style",A),Gc(p,l.precedence,i),s.instance=p;case"stylesheet":A=Ca(l.href);var T=i.querySelector(Wo(A));if(T)return s.state.loading|=4,s.instance=T,zt(T),T;p=M1(l),(A=Yr.get(A))&&vv(p,A),T=(i.ownerDocument||i).createElement("link"),zt(T);var I=T;return I._p=new Promise(function(q,Q){I.onload=q,I.onerror=Q}),Jt(T,"link",p),s.state.loading|=4,Gc(T,l.precedence,i),s.instance=T;case"script":return T=xa(l.src),(A=i.querySelector(Go(T)))?(s.instance=A,zt(A),A):(p=l,(A=Yr.get(T))&&(p=u({},l),pv(p,A)),i=i.ownerDocument||i,A=i.createElement("script"),zt(A),Jt(A,"link",p),i.head.appendChild(A),s.instance=A);case"void":return null;default:throw Error(n(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(p=s.instance,s.state.loading|=4,Gc(p,l.precedence,i));return s.instance}function Gc(i,s,l){for(var p=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),A=p.length?p[p.length-1]:null,T=A,I=0;I<p.length;I++){var q=p[I];if(q.dataset.precedence===s)T=q;else if(T!==A)break}T?T.parentNode.insertBefore(i,T.nextSibling):(s=l.nodeType===9?l.head:l,s.insertBefore(i,s.firstChild))}function vv(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.title==null&&(i.title=s.title)}function pv(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.integrity==null&&(i.integrity=s.integrity)}var Kc=null;function O1(i,s,l){if(Kc===null){var p=new Map,A=Kc=new Map;A.set(l,p)}else A=Kc,p=A.get(l),p||(p=new Map,A.set(l,p));if(p.has(i))return p;for(p.set(i,null),l=l.getElementsByTagName(i),A=0;A<l.length;A++){var T=l[A];if(!(T[oo]||T[Vt]||i==="link"&&T.getAttribute("rel")==="stylesheet")&&T.namespaceURI!=="http://www.w3.org/2000/svg"){var I=T.getAttribute(s)||"";I=i+I;var q=p.get(I);q?q.push(T):p.set(I,[T])}}return p}function T1(i,s,l){i=i.ownerDocument||i,i.head.insertBefore(l,s==="title"?i.querySelector("head > title"):null)}function oD(i,s,l){if(l===1||s.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return i=s.disabled,typeof s.precedence=="string"&&i==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function D1(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function lD(i,s,l,p){if(l.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var A=Ca(p.href),T=s.querySelector(Wo(A));if(T){s=T._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(i.count++,i=Yc.bind(i),s.then(i,i)),l.state.loading|=4,l.instance=T,zt(T);return}T=s.ownerDocument||s,p=M1(p),(A=Yr.get(A))&&vv(p,A),T=T.createElement("link"),zt(T);var I=T;I._p=new Promise(function(q,Q){I.onload=q,I.onerror=Q}),Jt(T,"link",p),l.instance=T}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(l,s),(s=l.state.preload)&&(l.state.loading&3)===0&&(i.count++,l=Yc.bind(i),s.addEventListener("load",l),s.addEventListener("error",l))}}var gv=0;function cD(i,s){return i.stylesheets&&i.count===0&&Xc(i,i.stylesheets),0<i.count||0<i.imgCount?function(l){var p=setTimeout(function(){if(i.stylesheets&&Xc(i,i.stylesheets),i.unsuspend){var T=i.unsuspend;i.unsuspend=null,T()}},6e4+s);0<i.imgBytes&&gv===0&&(gv=62500*FT());var A=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Xc(i,i.stylesheets),i.unsuspend)){var T=i.unsuspend;i.unsuspend=null,T()}},(i.imgBytes>gv?50:800)+s);return i.unsuspend=l,function(){i.unsuspend=null,clearTimeout(p),clearTimeout(A)}}:null}function Yc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xc(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Vc=null;function Xc(i,s){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Vc=new Map,s.forEach(uD,i),Vc=null,Yc.call(i))}function uD(i,s){if(!(s.state.loading&4)){var l=Vc.get(i);if(l)var p=l.get(null);else{l=new Map,Vc.set(i,l);for(var A=i.querySelectorAll("link[data-precedence],style[data-precedence]"),T=0;T<A.length;T++){var I=A[T];(I.nodeName==="LINK"||I.getAttribute("media")!=="not all")&&(l.set(I.dataset.precedence,I),p=I)}p&&l.set(null,p)}A=s.instance,I=A.getAttribute("data-precedence"),T=l.get(I)||p,T===p&&l.set(null,A),l.set(I,A),this.count++,p=Yc.bind(this),A.addEventListener("load",p),A.addEventListener("error",p),T?T.parentNode.insertBefore(A,T.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(A,i.firstChild)),s.state.loading|=4}}var Ko={$$typeof:S,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function hD(i,s,l,p,A,T,I,q,Q){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=hf(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hf(0),this.hiddenUpdates=hf(null),this.identifierPrefix=p,this.onUncaughtError=A,this.onCaughtError=T,this.onRecoverableError=I,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function R1(i,s,l,p,A,T,I,q,Q,ae,he,_e){return i=new hD(i,s,l,I,Q,ae,he,_e,q),s=1,T===!0&&(s|=24),T=Er(3,null,null,s),i.current=T,T.stateNode=i,s=Vf(),s.refCount++,i.pooledCache=s,s.refCount++,T.memoizedState={element:p,isDehydrated:l,cache:s},Jf(T),i}function k1(i){return i?(i=ta,i):ta}function P1(i,s,l,p,A,T){A=k1(A),p.context===null?p.context=A:p.pendingContext=A,p=Mn(s),p.payload={element:l},T=T===void 0?null:T,T!==null&&(p.callback=T),l=Ln(i,p,s),l!==null&&(br(l,i,s),Eo(l,i,s))}function B1(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<s?l:s}}function _v(i,s){B1(i,s),(i=i.alternate)&&B1(i,s)}function j1(i){if(i.tag===13||i.tag===31){var s=as(i,67108864);s!==null&&br(s,i,67108864),_v(i,67108864)}}function I1(i){if(i.tag===13||i.tag===31){var s=Tr();s=ff(s);var l=as(i,s);l!==null&&br(l,i,s),_v(i,s)}}var Zc=!0;function fD(i,s,l,p){var A=F.T;F.T=null;var T=K.p;try{K.p=2,mv(i,s,l,p)}finally{K.p=T,F.T=A}}function dD(i,s,l,p){var A=F.T;F.T=null;var T=K.p;try{K.p=8,mv(i,s,l,p)}finally{K.p=T,F.T=A}}function mv(i,s,l,p){if(Zc){var A=yv(p);if(A===null)nv(i,s,p,Qc,l),z1(i,p);else if(pD(A,i,s,l,p))p.stopPropagation();else if(z1(i,p),s&4&&-1<vD.indexOf(i)){for(;A!==null;){var T=qs(A);if(T!==null)switch(T.tag){case 3:if(T=T.stateNode,T.current.memoizedState.isDehydrated){var I=ai(T.pendingLanes);if(I!==0){var q=T;for(q.pendingLanes|=2,q.entangledLanes|=2;I;){var Q=1<<31-Rt(I);q.entanglements[1]|=Q,I&=~Q}wi(T),(Xe&6)===0&&(Pc=we()+500,$o(0))}}break;case 31:case 13:q=as(T,2),q!==null&&br(q,T,2),jc(),_v(T,2)}if(T=yv(p),T===null&&nv(i,s,p,Qc,l),T===A)break;A=T}A!==null&&p.stopPropagation()}else nv(i,s,p,null,l)}}function yv(i){return i=Sf(i),bv(i)}var Qc=null;function bv(i){if(Qc=null,i=Fs(i),i!==null){var s=h(i);if(s===null)i=null;else{var l=s.tag;if(l===13){if(i=g(s),i!==null)return i;i=null}else if(l===31){if(i=a(s),i!==null)return i;i=null}else if(l===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null)}}return Qc=i,null}function N1(i){switch(i){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch($e()){case Be:return 2;case It:return 8;case ct:case mt:return 32;case qe:return 268435456;default:return 32}default:return 32}}var Sv=!1,zn=null,Hn=null,$n=null,Yo=new Map,Vo=new Map,Un=[],vD="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function z1(i,s){switch(i){case"focusin":case"focusout":zn=null;break;case"dragenter":case"dragleave":Hn=null;break;case"mouseover":case"mouseout":$n=null;break;case"pointerover":case"pointerout":Yo.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vo.delete(s.pointerId)}}function Xo(i,s,l,p,A,T){return i===null||i.nativeEvent!==T?(i={blockedOn:s,domEventName:l,eventSystemFlags:p,nativeEvent:T,targetContainers:[A]},s!==null&&(s=qs(s),s!==null&&j1(s)),i):(i.eventSystemFlags|=p,s=i.targetContainers,A!==null&&s.indexOf(A)===-1&&s.push(A),i)}function pD(i,s,l,p,A){switch(s){case"focusin":return zn=Xo(zn,i,s,l,p,A),!0;case"dragenter":return Hn=Xo(Hn,i,s,l,p,A),!0;case"mouseover":return $n=Xo($n,i,s,l,p,A),!0;case"pointerover":var T=A.pointerId;return Yo.set(T,Xo(Yo.get(T)||null,i,s,l,p,A)),!0;case"gotpointercapture":return T=A.pointerId,Vo.set(T,Xo(Vo.get(T)||null,i,s,l,p,A)),!0}return!1}function H1(i){var s=Fs(i.target);if(s!==null){var l=h(s);if(l!==null){if(s=l.tag,s===13){if(s=g(l),s!==null){i.blockedOn=s,e0(i.priority,function(){I1(l)});return}}else if(s===31){if(s=a(l),s!==null){i.blockedOn=s,e0(i.priority,function(){I1(l)});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Jc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var l=yv(i.nativeEvent);if(l===null){l=i.nativeEvent;var p=new l.constructor(l.type,l);bf=p,l.target.dispatchEvent(p),bf=null}else return s=qs(l),s!==null&&j1(s),i.blockedOn=l,!1;s.shift()}return!0}function $1(i,s,l){Jc(i)&&l.delete(s)}function gD(){Sv=!1,zn!==null&&Jc(zn)&&(zn=null),Hn!==null&&Jc(Hn)&&(Hn=null),$n!==null&&Jc($n)&&($n=null),Yo.forEach($1),Vo.forEach($1)}function eu(i,s){i.blockedOn===s&&(i.blockedOn=null,Sv||(Sv=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,gD)))}var tu=null;function U1(i){tu!==i&&(tu=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){tu===i&&(tu=null);for(var s=0;s<i.length;s+=3){var l=i[s],p=i[s+1],A=i[s+2];if(typeof p!="function"){if(bv(p||l)===null)continue;break}var T=qs(l);T!==null&&(i.splice(s,3),s-=3,yd(T,{pending:!0,data:A,method:l.method,action:p},p,A))}}))}function Ea(i){function s(Q){return eu(Q,i)}zn!==null&&eu(zn,i),Hn!==null&&eu(Hn,i),$n!==null&&eu($n,i),Yo.forEach(s),Vo.forEach(s);for(var l=0;l<Un.length;l++){var p=Un[l];p.blockedOn===i&&(p.blockedOn=null)}for(;0<Un.length&&(l=Un[0],l.blockedOn===null);)H1(l),l.blockedOn===null&&Un.shift();if(l=(i.ownerDocument||i).$$reactFormReplay,l!=null)for(p=0;p<l.length;p+=3){var A=l[p],T=l[p+1],I=A[vr]||null;if(typeof T=="function")I||U1(l);else if(I){var q=null;if(T&&T.hasAttribute("formAction")){if(A=T,I=T[vr]||null)q=I.formAction;else if(bv(A)!==null)continue}else q=I.action;typeof q=="function"?l[p+1]=q:(l.splice(p,3),p-=3),U1(l)}}}function F1(){function i(T){T.canIntercept&&T.info==="react-transition"&&T.intercept({handler:function(){return new Promise(function(I){return A=I})},focusReset:"manual",scroll:"manual"})}function s(){A!==null&&(A(),A=null),p||setTimeout(l,20)}function l(){if(!p&&!navigation.transition){var T=navigation.currentEntry;T&&T.url!=null&&navigation.navigate(T.url,{state:T.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var p=!1,A=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(l,100),function(){p=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),A!==null&&(A(),A=null)}}}function wv(i){this._internalRoot=i}ru.prototype.render=wv.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));var l=s.current,p=Tr();P1(l,p,i,s,null,null)},ru.prototype.unmount=wv.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;P1(i.current,2,null,i,null,null),jc(),s[Us]=null}};function ru(i){this._internalRoot=i}ru.prototype.unstable_scheduleHydration=function(i){if(i){var s=Jm();i={blockedOn:null,target:i,priority:s};for(var l=0;l<Un.length&&s!==0&&s<Un[l].priority;l++);Un.splice(l,0,i),l===0&&H1(i)}};var q1=t.version;if(q1!=="19.2.4")throw Error(n(527,q1,"19.2.4"));K.findDOMNode=function(i){var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=f(s),i=i!==null?v(i):null,i=i===null?null:i.stateNode,i};var _D={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var iu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!iu.isDisabled&&iu.supportsFiber)try{lr=iu.inject(_D),_t=iu}catch{}}return Qo.createRoot=function(i,s){if(!o(i))throw Error(n(299));var l=!1,p="",A=Zy,T=Qy,I=Jy;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onUncaughtError!==void 0&&(A=s.onUncaughtError),s.onCaughtError!==void 0&&(T=s.onCaughtError),s.onRecoverableError!==void 0&&(I=s.onRecoverableError)),s=R1(i,1,!1,null,null,l,p,null,A,T,I,F1),i[Us]=s.current,iv(i),new wv(s)},Qo.hydrateRoot=function(i,s,l){if(!o(i))throw Error(n(299));var p=!1,A="",T=Zy,I=Qy,q=Jy,Q=null;return l!=null&&(l.unstable_strictMode===!0&&(p=!0),l.identifierPrefix!==void 0&&(A=l.identifierPrefix),l.onUncaughtError!==void 0&&(T=l.onUncaughtError),l.onCaughtError!==void 0&&(I=l.onCaughtError),l.onRecoverableError!==void 0&&(q=l.onRecoverableError),l.formState!==void 0&&(Q=l.formState)),s=R1(i,1,!0,s,l??null,p,A,Q,T,I,q,F1),s.context=k1(null),l=s.current,p=Tr(),p=ff(p),A=Mn(p),A.callback=null,Ln(l,A,p),l=p,s.current.lanes=l,ao(s,l),wi(s),i[Us]=s.current,iv(i),new ru(s)},Qo.version="19.2.4",Qo}var eS;function DD(){if(eS)return Ev.exports;eS=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(),Ev.exports=TD(),Ev.exports}var RD=DD();const Q5=768,kD=1e3;function J5(){return"./"}function jr(e){const t=J5(),r=e.startsWith("/")?e.slice(1):e;return t+r}function ri(){const e=localStorage.getItem("codev-web-key");return e?{Authorization:`Bearer ${e}`}:{}}async function PD(){const e=await fetch(jr("api/state"),{headers:ri()});if(!e.ok)throw new Error(`Failed to fetch state: ${e.status}`);return e.json()}async function BD(e,t){const r=new URLSearchParams({range:e});t&&r.set("refresh","1");const n=await fetch(jr(`api/analytics?${r}`),{headers:ri()});if(!n.ok)throw new Error(`Failed to fetch analytics: ${n.status}`);return n.json()}async function jD(){const e=await fetch(jr("api/team"),{headers:ri()});if(!e.ok)throw new Error(`Failed to fetch team: ${e.status}`);return e.json()}async function ID(){const e=await fetch(jr("api/overview"),{headers:ri()});if(!e.ok)throw new Error(`Failed to fetch overview: ${e.status}`);return e.json()}async function ND(){await fetch(jr("api/overview/refresh"),{method:"POST",headers:ri()})}async function zD(){const e=await fetch(jr("api/tabs/shell"),{method:"POST",headers:{"Content-Type":"application/json",...ri()}});if(!e.ok)throw new Error(await e.text());return e.json()}async function Ch(e,t,r){const n=await fetch(jr("api/tabs/file"),{method:"POST",headers:{"Content-Type":"application/json",...ri()},body:JSON.stringify({path:e,line:t,terminalId:r})});if(!n.ok)throw new Error(await n.text());return n.json()}async function HD(e){const t=await fetch(jr(`api/tabs/${e}`),{method:"DELETE",headers:ri()});if(!t.ok)throw new Error(await t.text())}async function $D(){const e=await fetch(jr("api/files"),{headers:ri()});if(!e.ok)throw new Error(`Failed to fetch files: ${e.status}`);return e.json()}async function e2(e){const t=await fetch(jr("api/paste-image"),{method:"POST",headers:{"Content-Type":e.type||"image/png",...ri()},body:e});if(!t.ok)throw new Error(`Image upload failed: ${t.status}`);return t.json()}function Ov(e){if(e.terminalId){const t=window.location.pathname;return`${t.endsWith("/")?t:t+"/"}ws/terminal/${e.terminalId}`}return null}function UD(){return jr("api/events")}async function FD(){const e=await fetch(jr("api/git/status"),{headers:ri()});if(!e.ok)throw new Error(`Failed to fetch git status: ${e.status}`);return e.json()}async function qD(){const e=await fetch(jr("api/files/recent"),{headers:ri()});if(!e.ok)throw new Error(`Failed to fetch recent files: ${e.status}`);return e.json()}let Cs=null;const hl=new Set;let tS=!1;function t2(){for(const e of hl)e()}function r2(){Cs||typeof EventSource>"u"||typeof document<"u"&&document.hidden||(Cs=new EventSource(UD()),Cs.onmessage=()=>t2(),Cs.onerror=()=>{})}function i2(){Cs&&(Cs.close(),Cs=null)}function WD(){document.hidden?i2():hl.size>0&&(r2(),t2())}function GD(){tS||typeof document>"u"||(document.addEventListener("visibilitychange",WD),tS=!0)}function n2(e){z.useEffect(()=>(hl.add(e),GD(),r2(),()=>{hl.delete(e),hl.size===0&&i2()}),[e])}function KD(){const[e,t]=z.useState(null),[r,n]=z.useState(null),o=z.useCallback(async()=>{try{const h=await PD();t(h),n(null)}catch(h){n(h.message)}},[]);return z.useEffect(()=>{o();const h=setInterval(o,kD);return()=>clearInterval(h)},[o]),n2(o),{state:e,error:r,refresh:o}}function YD(e){const t=[{id:"work",type:"work",label:"Work",closable:!1},{id:"analytics",type:"analytics",label:"Analytics",closable:!1,persistent:!0}];e!=null&&e.teamEnabled&&t.push({id:"team",type:"team",label:"Team",closable:!1}),e!=null&&e.architect&&t.push({id:"architect",type:"architect",label:"Architect",closable:!1,terminalId:e.architect.terminalId,persistent:e.architect.persistent});for(const r of(e==null?void 0:e.builders)??[])t.push({id:r.id,type:"builder",label:r.name||r.id,closable:!0,projectId:r.id,terminalId:r.terminalId,persistent:r.persistent});for(const r of(e==null?void 0:e.utils)??[])!r.terminalId&&(!r.pid||r.pid===0)||t.push({id:r.id,type:"shell",label:r.name||`Shell ${r.id}`,closable:!0,utilId:r.id,terminalId:r.terminalId,persistent:r.persistent});for(const r of(e==null?void 0:e.annotations)??[]){const n=r.file.split("/").pop()??r.file;t.push({id:r.id,type:"file",label:n,closable:!0,annotationId:r.id,filePath:r.file})}return t}function VD(e){const[t,r]=z.useState("work"),n=z.useRef(null),o=z.useRef(!1),h=YD(e);z.useEffect(()=>{if(o.current||e===null)return;const f=new URLSearchParams(window.location.search).get("tab");if(f){const v=h.find(u=>u.id===f||u.type===f);if(v){r(v.id),o.current=!0;const u=new URL(window.location.href);u.searchParams.delete("tab"),window.history.replaceState({},"",u.toString())}}else o.current=!0},[h,e]),z.useEffect(()=>{const c=new Set(h.map(f=>f.id));if(n.current===null){e!==null&&(n.current=c);return}for(const f of h)!n.current.has(f.id)&&f.type!=="architect"&&r(f.id);n.current=c},[h.map(c=>c.id).join(","),e!==null]);const g=z.useCallback(c=>{r(c)},[]),a=h.find(c=>c.id===t)??h[0];return{tabs:h,activeTab:a,activeTabId:t,selectTab:g}}function s2(e){const[t,r]=z.useState(()=>typeof window<"u"?window.matchMedia(e).matches:!1);return z.useEffect(()=>{const n=window.matchMedia(e),o=h=>r(h.matches);return n.addEventListener("change",o),r(n.matches),()=>n.removeEventListener("change",o)},[e]),t}function XD({left:e,right:t,defaultSplit:r=50,collapsedPane:n=null,onExpandLeft:o,onExpandRight:h}){const[g,a]=z.useState(r),c=z.useRef(null),f=z.useRef(!1),v=z.useCallback(w=>{w.preventDefault(),f.current=!0;const C=d=>{if(!f.current||!c.current)return;const y=c.current.getBoundingClientRect(),b=(d.clientX-y.left)/y.width*100;a(Math.max(20,Math.min(80,b)))},_=()=>{f.current=!1,document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",_)};document.addEventListener("mousemove",C),document.addEventListener("mouseup",_)},[]),u=n==="left",m=n==="right";return G.jsxs("div",{ref:c,className:"split-pane",children:[u&&o&&G.jsx("button",{className:"expand-bar expand-bar-left",onClick:o,title:"Expand architect panel","aria-label":"Expand architect panel",children:G.jsx("svg",{width:"10",height:"24",viewBox:"0 0 10 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:G.jsx("path",{d:"M3 8l4 4-4 4"})})}),G.jsx("div",{className:"split-left",style:{width:u?0:m?void 0:`${g}%`,flex:m?1:void 0,display:u?"none":void 0},children:e}),!n&&G.jsx("div",{className:"split-handle",onMouseDown:v,role:"separator","aria-label":"Resize panels"}),G.jsx("div",{className:"split-right",style:{width:m?0:u?void 0:`${100-g}%`,flex:u?1:void 0,display:m?"none":void 0},children:t}),m&&h&&G.jsx("button",{className:"expand-bar expand-bar-right",onClick:h,title:"Expand work panel","aria-label":"Expand work panel",children:G.jsx("svg",{width:"10",height:"24",viewBox:"0 0 10 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:G.jsx("path",{d:"M7 8l-4 4 4 4"})})})]})}const ZD={work:"📋",architect:"🏛️",builder:"🔨",shell:"💻",file:"📄",activity:"⚡",files:"📁",analytics:"📊",team:"👥"};function a2({tabs:e,activeTabId:t,onSelectTab:r,onRefresh:n}){const o=async(h,g)=>{h.stopPropagation();try{await HD(g.id),n()}catch(a){console.error("Failed to close tab:",a)}};return G.jsx("div",{className:"tab-bar",role:"tablist","aria-label":"Content tabs",children:e.map(h=>G.jsxs("button",{role:"tab","aria-selected":h.id===t,className:`tab ${h.id===t?"tab-active":""}`,onClick:()=>r(h.id),title:h.label,children:[G.jsx("span",{className:"tab-icon","aria-hidden":"true",children:ZD[h.type]}),G.jsx("span",{className:"tab-label",children:h.label}),h.closable&&G.jsx("span",{className:"tab-close",onClick:g=>o(g,h),role:"button","aria-label":`Close ${h.label}`,tabIndex:0,onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),o(g,h))},children:"×"})]},h.id))})}var Tv={exports:{}},rS;function QD(){return rS||(rS=1,(function(e,t){(function(r,n){e.exports=n()})(globalThis,(()=>(()=>{var r={4567:function(g,a,c){var f=this&&this.__decorate||function(b,S,E,L){var x,O=arguments.length,M=O<3?S:L===null?L=Object.getOwnPropertyDescriptor(S,E):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(b,S,E,L);else for(var D=b.length-1;D>=0;D--)(x=b[D])&&(M=(O<3?x(M):O>3?x(S,E,M):x(S,E))||M);return O>3&&M&&Object.defineProperty(S,E,M),M},v=this&&this.__param||function(b,S){return function(E,L){S(E,L,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const u=c(9042),m=c(9924),w=c(844),C=c(4725),_=c(2585),d=c(3656);let y=a.AccessibilityManager=class extends w.Disposable{constructor(b,S,E,L){super(),this._terminal=b,this._coreBrowserService=E,this._renderService=L,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let x=0;x<this._terminal.rows;x++)this._rowElements[x]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[x]);if(this._topBoundaryFocusListener=x=>this._handleBoundaryFocus(x,0),this._bottomBoundaryFocusListener=x=>this._handleBoundaryFocus(x,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new m.TimeBasedDebouncer(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((x=>this._handleResize(x.rows)))),this.register(this._terminal.onRender((x=>this._refreshRows(x.start,x.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((x=>this._handleChar(x)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
50
|
-
`)))),this.register(this._terminal.onA11yTab((x=>this._handleTab(x)))),this.register(this._terminal.onKey((x=>this._handleKey(x.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,d.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,w.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(b){for(let S=0;S<b;S++)this._handleChar(" ")}_handleChar(b){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==b&&(this._charsToAnnounce+=b):this._charsToAnnounce+=b,b===`
|
|
51
|
-
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=u.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(b){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(b)||this._charsToConsume.push(b)}_refreshRows(b,S){this._liveRegionDebouncer.refresh(b,S,this._terminal.rows)}_renderRows(b,S){const E=this._terminal.buffer,L=E.lines.length.toString();for(let x=b;x<=S;x++){const O=E.lines.get(E.ydisp+x),M=[],D=(O==null?void 0:O.translateToString(!0,void 0,void 0,M))||"",k=(E.ydisp+x+1).toString(),B=this._rowElements[x];B&&(D.length===0?(B.innerText=" ",this._rowColumns.set(B,[0,1])):(B.textContent=D,this._rowColumns.set(B,M)),B.setAttribute("aria-posinset",k),B.setAttribute("aria-setsize",L))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(b,S){const E=b.target,L=this._rowElements[S===0?1:this._rowElements.length-2];if(E.getAttribute("aria-posinset")===(S===0?"1":`${this._terminal.buffer.lines.length}`)||b.relatedTarget!==L)return;let x,O;if(S===0?(x=E,O=this._rowElements.pop(),this._rowContainer.removeChild(O)):(x=this._rowElements.shift(),O=E,this._rowContainer.removeChild(x)),x.removeEventListener("focus",this._topBoundaryFocusListener),O.removeEventListener("focus",this._bottomBoundaryFocusListener),S===0){const M=this._createAccessibilityTreeNode();this._rowElements.unshift(M),this._rowContainer.insertAdjacentElement("afterbegin",M)}else{const M=this._createAccessibilityTreeNode();this._rowElements.push(M),this._rowContainer.appendChild(M)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(S===0?-1:1),this._rowElements[S===0?1:this._rowElements.length-2].focus(),b.preventDefault(),b.stopImmediatePropagation()}_handleSelectionChange(){var D;if(this._rowElements.length===0)return;const b=document.getSelection();if(!b)return;if(b.isCollapsed)return void(this._rowContainer.contains(b.anchorNode)&&this._terminal.clearSelection());if(!b.anchorNode||!b.focusNode)return void console.error("anchorNode and/or focusNode are null");let S={node:b.anchorNode,offset:b.anchorOffset},E={node:b.focusNode,offset:b.focusOffset};if((S.node.compareDocumentPosition(E.node)&Node.DOCUMENT_POSITION_PRECEDING||S.node===E.node&&S.offset>E.offset)&&([S,E]=[E,S]),S.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(S={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(S.node))return;const L=this._rowElements.slice(-1)[0];if(E.node.compareDocumentPosition(L)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(E={node:L,offset:((D=L.textContent)==null?void 0:D.length)??0}),!this._rowContainer.contains(E.node))return;const x=({node:k,offset:B})=>{const R=k instanceof Text?k.parentNode:k;let P=parseInt(R==null?void 0:R.getAttribute("aria-posinset"),10)-1;if(isNaN(P))return console.warn("row is invalid. Race condition?"),null;const H=this._rowColumns.get(R);if(!H)return console.warn("columns is null. Race condition?"),null;let X=B<H.length?H[B]:H.slice(-1)[0]+1;return X>=this._terminal.cols&&(++P,X=0),{row:P,column:X}},O=x(S),M=x(E);if(O&&M){if(O.row>M.row||O.row===M.row&&O.column>=M.column)throw new Error("invalid range");this._terminal.select(O.column,O.row,(M.row-O.row)*this._terminal.cols-O.column+M.column)}}_handleResize(b){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let S=this._rowContainer.children.length;S<this._terminal.rows;S++)this._rowElements[S]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[S]);for(;this._rowElements.length>b;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const b=this._coreBrowserService.mainDocument.createElement("div");return b.setAttribute("role","listitem"),b.tabIndex=-1,this._refreshRowDimensions(b),b}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let b=0;b<this._terminal.rows;b++)this._refreshRowDimensions(this._rowElements[b])}}_refreshRowDimensions(b){b.style.height=`${this._renderService.dimensions.css.cell.height}px`}};a.AccessibilityManager=y=f([v(1,_.IInstantiationService),v(2,C.ICoreBrowserService),v(3,C.IRenderService)],y)},3614:(g,a)=>{function c(m){return m.replace(/\r?\n/g,"\r")}function f(m,w){return w?"\x1B[200~"+m+"\x1B[201~":m}function v(m,w,C,_){m=f(m=c(m),C.decPrivateModes.bracketedPasteMode&&_.rawOptions.ignoreBracketedPasteMode!==!0),C.triggerDataEvent(m,!0),w.value=""}function u(m,w,C){const _=C.getBoundingClientRect(),d=m.clientX-_.left-10,y=m.clientY-_.top-10;w.style.width="20px",w.style.height="20px",w.style.left=`${d}px`,w.style.top=`${y}px`,w.style.zIndex="1000",w.focus()}Object.defineProperty(a,"__esModule",{value:!0}),a.rightClickHandler=a.moveTextAreaUnderMouseCursor=a.paste=a.handlePasteEvent=a.copyHandler=a.bracketTextForPaste=a.prepareTextForTerminal=void 0,a.prepareTextForTerminal=c,a.bracketTextForPaste=f,a.copyHandler=function(m,w){m.clipboardData&&m.clipboardData.setData("text/plain",w.selectionText),m.preventDefault()},a.handlePasteEvent=function(m,w,C,_){m.stopPropagation(),m.clipboardData&&v(m.clipboardData.getData("text/plain"),w,C,_)},a.paste=v,a.moveTextAreaUnderMouseCursor=u,a.rightClickHandler=function(m,w,C,_,d){u(m,w,C),d&&_.rightClickSelect(m),w.value=_.selectionText,w.select()}},7239:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;const f=c(1505);a.ColorContrastCache=class{constructor(){this._color=new f.TwoKeyMap,this._css=new f.TwoKeyMap}setCss(v,u,m){this._css.set(v,u,m)}getCss(v,u){return this._css.get(v,u)}setColor(v,u,m){this._color.set(v,u,m)}getColor(v,u){return this._color.get(v,u)}clear(){this._color.clear(),this._css.clear()}}},3656:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(c,f,v,u){c.addEventListener(f,v,u);let m=!1;return{dispose:()=>{m||(m=!0,c.removeEventListener(f,v,u))}}}},3551:function(g,a,c){var f=this&&this.__decorate||function(y,b,S,E){var L,x=arguments.length,O=x<3?b:E===null?E=Object.getOwnPropertyDescriptor(b,S):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(y,b,S,E);else for(var M=y.length-1;M>=0;M--)(L=y[M])&&(O=(x<3?L(O):x>3?L(b,S,O):L(b,S))||O);return x>3&&O&&Object.defineProperty(b,S,O),O},v=this&&this.__param||function(y,b){return function(S,E){b(S,E,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const u=c(3656),m=c(8460),w=c(844),C=c(2585),_=c(4725);let d=a.Linkifier=class extends w.Disposable{get currentLink(){return this._currentLink}constructor(y,b,S,E,L){super(),this._element=y,this._mouseService=b,this._renderService=S,this._bufferService=E,this._linkProviderService=L,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new m.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new m.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,w.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,w.toDisposable)((()=>{var x;this._lastMouseEvent=void 0,(x=this._activeProviderReplies)==null||x.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,u.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,u.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(y){this._lastMouseEvent=y;const b=this._positionFromMouseEvent(y,this._element,this._mouseService);if(!b)return;this._isMouseOut=!1;const S=y.composedPath();for(let E=0;E<S.length;E++){const L=S[E];if(L.classList.contains("xterm"))break;if(L.classList.contains("xterm-hover"))return}this._lastBufferCell&&b.x===this._lastBufferCell.x&&b.y===this._lastBufferCell.y||(this._handleHover(b),this._lastBufferCell=b)}_handleHover(y){if(this._activeLine!==y.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(y,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,y)||(this._clearCurrentLink(),this._askForLink(y,!0))}_askForLink(y,b){var E,L;this._activeProviderReplies&&b||((E=this._activeProviderReplies)==null||E.forEach((x=>{x==null||x.forEach((O=>{O.link.dispose&&O.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=y.y);let S=!1;for(const[x,O]of this._linkProviderService.linkProviders.entries())b?(L=this._activeProviderReplies)!=null&&L.get(x)&&(S=this._checkLinkProviderResult(x,y,S)):O.provideLinks(y.y,(M=>{var k,B;if(this._isMouseOut)return;const D=M==null?void 0:M.map((R=>({link:R})));(k=this._activeProviderReplies)==null||k.set(x,D),S=this._checkLinkProviderResult(x,y,S),((B=this._activeProviderReplies)==null?void 0:B.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(y.y,this._activeProviderReplies)}))}_removeIntersectingLinks(y,b){const S=new Set;for(let E=0;E<b.size;E++){const L=b.get(E);if(L)for(let x=0;x<L.length;x++){const O=L[x],M=O.link.range.start.y<y?0:O.link.range.start.x,D=O.link.range.end.y>y?this._bufferService.cols:O.link.range.end.x;for(let k=M;k<=D;k++){if(S.has(k)){L.splice(x--,1);break}S.add(k)}}}}_checkLinkProviderResult(y,b,S){var x;if(!this._activeProviderReplies)return S;const E=this._activeProviderReplies.get(y);let L=!1;for(let O=0;O<y;O++)this._activeProviderReplies.has(O)&&!this._activeProviderReplies.get(O)||(L=!0);if(!L&&E){const O=E.find((M=>this._linkAtPosition(M.link,b)));O&&(S=!0,this._handleNewLink(O))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!S)for(let O=0;O<this._activeProviderReplies.size;O++){const M=(x=this._activeProviderReplies.get(O))==null?void 0:x.find((D=>this._linkAtPosition(D.link,b)));if(M){S=!0,this._handleNewLink(M);break}}return S}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(y){if(!this._currentLink)return;const b=this._positionFromMouseEvent(y,this._element,this._mouseService);b&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,b)&&this._currentLink.link.activate(y,this._currentLink.link.text)}_clearCurrentLink(y,b){this._currentLink&&this._lastMouseEvent&&(!y||!b||this._currentLink.link.range.start.y>=y&&this._currentLink.link.range.end.y<=b)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,w.disposeArray)(this._linkCacheDisposables))}_handleNewLink(y){if(!this._lastMouseEvent)return;const b=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);b&&this._linkAtPosition(y.link,b)&&(this._currentLink=y,this._currentLink.state={decorations:{underline:y.link.decorations===void 0||y.link.decorations.underline,pointerCursor:y.link.decorations===void 0||y.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,y.link,this._lastMouseEvent),y.link.decorations={},Object.defineProperties(y.link.decorations,{pointerCursor:{get:()=>{var S,E;return(E=(S=this._currentLink)==null?void 0:S.state)==null?void 0:E.decorations.pointerCursor},set:S=>{var E;(E=this._currentLink)!=null&&E.state&&this._currentLink.state.decorations.pointerCursor!==S&&(this._currentLink.state.decorations.pointerCursor=S,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",S))}},underline:{get:()=>{var S,E;return(E=(S=this._currentLink)==null?void 0:S.state)==null?void 0:E.decorations.underline},set:S=>{var E,L,x;(E=this._currentLink)!=null&&E.state&&((x=(L=this._currentLink)==null?void 0:L.state)==null?void 0:x.decorations.underline)!==S&&(this._currentLink.state.decorations.underline=S,this._currentLink.state.isHovered&&this._fireUnderlineEvent(y.link,S))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((S=>{if(!this._currentLink)return;const E=S.start===0?0:S.start+1+this._bufferService.buffer.ydisp,L=this._bufferService.buffer.ydisp+1+S.end;if(this._currentLink.link.range.start.y>=E&&this._currentLink.link.range.end.y<=L&&(this._clearCurrentLink(E,L),this._lastMouseEvent)){const x=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);x&&this._askForLink(x,!1)}}))))}_linkHover(y,b,S){var E;(E=this._currentLink)!=null&&E.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(b,!0),this._currentLink.state.decorations.pointerCursor&&y.classList.add("xterm-cursor-pointer")),b.hover&&b.hover(S,b.text)}_fireUnderlineEvent(y,b){const S=y.range,E=this._bufferService.buffer.ydisp,L=this._createLinkUnderlineEvent(S.start.x-1,S.start.y-E-1,S.end.x,S.end.y-E-1,void 0);(b?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(L)}_linkLeave(y,b,S){var E;(E=this._currentLink)!=null&&E.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(b,!1),this._currentLink.state.decorations.pointerCursor&&y.classList.remove("xterm-cursor-pointer")),b.leave&&b.leave(S,b.text)}_linkAtPosition(y,b){const S=y.range.start.y*this._bufferService.cols+y.range.start.x,E=y.range.end.y*this._bufferService.cols+y.range.end.x,L=b.y*this._bufferService.cols+b.x;return S<=L&&L<=E}_positionFromMouseEvent(y,b,S){const E=S.getCoords(y,b,this._bufferService.cols,this._bufferService.rows);if(E)return{x:E[0],y:E[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(y,b,S,E,L){return{x1:y,y1:b,x2:S,y2:E,cols:this._bufferService.cols,fg:L}}};a.Linkifier=d=f([v(1,_.IMouseService),v(2,_.IRenderService),v(3,C.IBufferService),v(4,_.ILinkProviderService)],d)},9042:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tooMuchOutput=a.promptLabel=void 0,a.promptLabel="Terminal input",a.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(g,a,c){var f=this&&this.__decorate||function(_,d,y,b){var S,E=arguments.length,L=E<3?d:b===null?b=Object.getOwnPropertyDescriptor(d,y):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(_,d,y,b);else for(var x=_.length-1;x>=0;x--)(S=_[x])&&(L=(E<3?S(L):E>3?S(d,y,L):S(d,y))||L);return E>3&&L&&Object.defineProperty(d,y,L),L},v=this&&this.__param||function(_,d){return function(y,b){d(y,b,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const u=c(511),m=c(2585);let w=a.OscLinkProvider=class{constructor(_,d,y){this._bufferService=_,this._optionsService=d,this._oscLinkService=y}provideLinks(_,d){var D;const y=this._bufferService.buffer.lines.get(_-1);if(!y)return void d(void 0);const b=[],S=this._optionsService.rawOptions.linkHandler,E=new u.CellData,L=y.getTrimmedLength();let x=-1,O=-1,M=!1;for(let k=0;k<L;k++)if(O!==-1||y.hasContent(k)){if(y.loadCell(k,E),E.hasExtendedAttrs()&&E.extended.urlId){if(O===-1){O=k,x=E.extended.urlId;continue}M=E.extended.urlId!==x}else O!==-1&&(M=!0);if(M||O!==-1&&k===L-1){const B=(D=this._oscLinkService.getLinkData(x))==null?void 0:D.uri;if(B){const R={start:{x:O+1,y:_},end:{x:k+(M||k!==L-1?0:1),y:_}};let P=!1;if(!(S!=null&&S.allowNonHttpProtocols))try{const H=new URL(B);["http:","https:"].includes(H.protocol)||(P=!0)}catch{P=!0}P||b.push({text:B,range:R,activate:(H,X)=>S?S.activate(H,X,R):C(0,X),hover:(H,X)=>{var F;return(F=S==null?void 0:S.hover)==null?void 0:F.call(S,H,X,R)},leave:(H,X)=>{var F;return(F=S==null?void 0:S.leave)==null?void 0:F.call(S,H,X,R)}})}M=!1,E.hasExtendedAttrs()&&E.extended.urlId?(O=k,x=E.extended.urlId):(O=-1,x=-1)}}d(b)}};function C(_,d){if(confirm(`Do you want to navigate to ${d}?
|
|
52
|
-
|
|
53
|
-
WARNING: This link could potentially be dangerous`)){const y=window.open();if(y){try{y.opener=null}catch{}y.location.href=d}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=w=f([v(0,m.IBufferService),v(1,m.IOptionsService),v(2,m.IOscLinkService)],w)},6193:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0,a.RenderDebouncer=class{constructor(c,f){this._renderCallback=c,this._coreBrowserService=f,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(c){return this._refreshCallbacks.push(c),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(c,f,v){this._rowCount=v,c=c!==void 0?c:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f,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)return void this._runRefreshCallbacks();const c=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,f),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const f=c(3614),v=c(3656),u=c(3551),m=c(9042),w=c(3730),C=c(1680),_=c(3107),d=c(5744),y=c(2950),b=c(1296),S=c(428),E=c(4269),L=c(5114),x=c(8934),O=c(3230),M=c(9312),D=c(4725),k=c(6731),B=c(8055),R=c(8969),P=c(8460),H=c(844),X=c(6114),F=c(8437),K=c(2584),Y=c(7399),j=c(5941),$=c(9074),N=c(2585),U=c(5435),J=c(4567),te=c(779);class fe extends R.CoreTerminal{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}constructor(Z={}){super(Z),this.browser=X,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new H.MutableDisposable),this._onCursorMove=this.register(new P.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new P.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new P.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new P.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new P.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new P.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new P.EventEmitter),this._onBlur=this.register(new P.EventEmitter),this._onA11yCharEmitter=this.register(new P.EventEmitter),this._onA11yTabEmitter=this.register(new P.EventEmitter),this._onWillOpen=this.register(new P.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance($.DecorationService),this._instantiationService.setService(N.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(te.LinkProviderService),this._instantiationService.setService(D.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(w.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((W,V)=>this.refresh(W,V)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((W=>this._reportWindowsOptions(W)))),this.register(this._inputHandler.onColor((W=>this._handleColorEvent(W)))),this.register((0,P.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,P.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,P.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,P.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((W=>this._afterResize(W.cols,W.rows)))),this.register((0,H.toDisposable)((()=>{var W,V;this._customKeyEventHandler=void 0,(V=(W=this.element)==null?void 0:W.parentNode)==null||V.removeChild(this.element)})))}_handleColorEvent(Z){if(this._themeService)for(const W of Z){let V,ee="";switch(W.index){case 256:V="foreground",ee="10";break;case 257:V="background",ee="11";break;case 258:V="cursor",ee="12";break;default:V="ansi",ee="4;"+W.index}switch(W.type){case 0:const ue=B.color.toColorRGB(V==="ansi"?this._themeService.colors.ansi[W.index]:this._themeService.colors[V]);this.coreService.triggerDataEvent(`${K.C0.ESC}]${ee};${(0,j.toRgbString)(ue)}${K.C1_ESCAPED.ST}`);break;case 1:if(V==="ansi")this._themeService.modifyColors((ie=>ie.ansi[W.index]=B.channels.toColor(...W.color)));else{const ie=V;this._themeService.modifyColors((me=>me[ie]=B.channels.toColor(...W.color)))}break;case 2:this._themeService.restoreColor(W.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(Z){Z?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(J.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(Z){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(K.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var Z;return(Z=this.textarea)==null?void 0:Z.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(K.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const Z=this.buffer.ybase+this.buffer.y,W=this.buffer.lines.get(Z);if(!W)return;const V=Math.min(this.buffer.x,this.cols-1),ee=this._renderService.dimensions.css.cell.height,ue=W.getWidth(V),ie=this._renderService.dimensions.css.cell.width*ue,me=this.buffer.y*this._renderService.dimensions.css.cell.height,de=V*this._renderService.dimensions.css.cell.width;this.textarea.style.left=de+"px",this.textarea.style.top=me+"px",this.textarea.style.width=ie+"px",this.textarea.style.height=ee+"px",this.textarea.style.lineHeight=ee+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,v.addDisposableDomListener)(this.element,"copy",(W=>{this.hasSelection()&&(0,f.copyHandler)(W,this._selectionService)})));const Z=W=>(0,f.handlePasteEvent)(W,this.textarea,this.coreService,this.optionsService);this.register((0,v.addDisposableDomListener)(this.textarea,"paste",Z)),this.register((0,v.addDisposableDomListener)(this.element,"paste",Z)),X.isFirefox?this.register((0,v.addDisposableDomListener)(this.element,"mousedown",(W=>{W.button===2&&(0,f.rightClickHandler)(W,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,v.addDisposableDomListener)(this.element,"contextmenu",(W=>{(0,f.rightClickHandler)(W,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),X.isLinux&&this.register((0,v.addDisposableDomListener)(this.element,"auxclick",(W=>{W.button===1&&(0,f.moveTextAreaUnderMouseCursor)(W,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,v.addDisposableDomListener)(this.textarea,"keyup",(Z=>this._keyUp(Z)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keydown",(Z=>this._keyDown(Z)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keypress",(Z=>this._keyPress(Z)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionupdate",(Z=>this._compositionHelper.compositionupdate(Z)))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,v.addDisposableDomListener)(this.textarea,"input",(Z=>this._inputEvent(Z)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(Z){var V;if(!Z)throw new Error("Terminal requires a parent element.");if(Z.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((V=this.element)==null?void 0:V.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=Z.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"),Z.appendChild(this.element);const W=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),W.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,v.addDisposableDomListener)(this.screenElement,"mousemove",(ee=>this.updateCursorStyle(ee)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),W.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",m.promptLabel),X.isChromeOS||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._coreBrowserService=this.register(this._instantiationService.createInstance(L.CoreBrowserService,this.textarea,Z.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(D.ICoreBrowserService,this._coreBrowserService),this.register((0,v.addDisposableDomListener)(this.textarea,"focus",(ee=>this._handleTextAreaFocus(ee)))),this.register((0,v.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(S.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(D.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(k.ThemeService),this._instantiationService.setService(D.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(E.CharacterJoinerService),this._instantiationService.setService(D.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(O.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(D.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((ee=>this._onRender.fire(ee)))),this.onResize((ee=>this._renderService.resize(ee.cols,ee.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(y.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(x.MouseService),this._instantiationService.setService(D.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(u.Linkifier,this.screenElement)),this.element.appendChild(W);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(C.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((ee=>this.scrollLines(ee.amount,ee.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),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.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(M.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(D.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ee=>this.scrollLines(ee.amount,ee.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ee=>this._renderService.handleSelectionChanged(ee.start,ee.end,ee.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ee=>{this.textarea.value=ee,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ee=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,v.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(_.BufferDecorationRenderer,this.screenElement)),this.register((0,v.addDisposableDomListener)(this.element,"mousedown",(ee=>this._selectionService.handleMouseDown(ee)))),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(J.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ee=>this._handleScreenReaderModeOptionChange(ee)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(d.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ee=>{!this._overviewRulerRenderer&&ee&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(d.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(b.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const Z=this,W=this.element;function V(ie){const me=Z._mouseService.getMouseReportCoords(ie,Z.screenElement);if(!me)return!1;let de,Me;switch(ie.overrideType||ie.type){case"mousemove":Me=32,ie.buttons===void 0?(de=3,ie.button!==void 0&&(de=ie.button<3?ie.button:3)):de=1&ie.buttons?0:4&ie.buttons?1:2&ie.buttons?2:3;break;case"mouseup":Me=0,de=ie.button<3?ie.button:3;break;case"mousedown":Me=1,de=ie.button<3?ie.button:3;break;case"wheel":if(Z._customWheelEventHandler&&Z._customWheelEventHandler(ie)===!1||Z.viewport.getLinesScrolled(ie)===0)return!1;Me=ie.deltaY<0?0:1,de=4;break;default:return!1}return!(Me===void 0||de===void 0||de>4)&&Z.coreMouseService.triggerMouseEvent({col:me.col,row:me.row,x:me.x,y:me.y,button:de,action:Me,ctrl:ie.ctrlKey,alt:ie.altKey,shift:ie.shiftKey})}const ee={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ue={mouseup:ie=>(V(ie),ie.buttons||(this._document.removeEventListener("mouseup",ee.mouseup),ee.mousedrag&&this._document.removeEventListener("mousemove",ee.mousedrag)),this.cancel(ie)),wheel:ie=>(V(ie),this.cancel(ie,!0)),mousedrag:ie=>{ie.buttons&&V(ie)},mousemove:ie=>{ie.buttons||V(ie)}};this.register(this.coreMouseService.onProtocolChange((ie=>{ie?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(ie)),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()),8&ie?ee.mousemove||(W.addEventListener("mousemove",ue.mousemove),ee.mousemove=ue.mousemove):(W.removeEventListener("mousemove",ee.mousemove),ee.mousemove=null),16&ie?ee.wheel||(W.addEventListener("wheel",ue.wheel,{passive:!1}),ee.wheel=ue.wheel):(W.removeEventListener("wheel",ee.wheel),ee.wheel=null),2&ie?ee.mouseup||(ee.mouseup=ue.mouseup):(this._document.removeEventListener("mouseup",ee.mouseup),ee.mouseup=null),4&ie?ee.mousedrag||(ee.mousedrag=ue.mousedrag):(this._document.removeEventListener("mousemove",ee.mousedrag),ee.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,v.addDisposableDomListener)(W,"mousedown",(ie=>{if(ie.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(ie))return V(ie),ee.mouseup&&this._document.addEventListener("mouseup",ee.mouseup),ee.mousedrag&&this._document.addEventListener("mousemove",ee.mousedrag),this.cancel(ie)}))),this.register((0,v.addDisposableDomListener)(W,"wheel",(ie=>{if(!ee.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(ie)===!1)return!1;if(!this.buffer.hasScrollback){const me=this.viewport.getLinesScrolled(ie);if(me===0)return;const de=K.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ie.deltaY<0?"A":"B");let Me="";for(let ke=0;ke<Math.abs(me);ke++)Me+=de;return this.coreService.triggerDataEvent(Me,!0),this.cancel(ie,!0)}return this.viewport.handleWheel(ie)?this.cancel(ie):void 0}}),{passive:!1})),this.register((0,v.addDisposableDomListener)(W,"touchstart",(ie=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(ie),this.cancel(ie)}),{passive:!0})),this.register((0,v.addDisposableDomListener)(W,"touchmove",(ie=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(ie)?void 0:this.cancel(ie)}),{passive:!1}))}refresh(Z,W){var V;(V=this._renderService)==null||V.refreshRows(Z,W)}updateCursorStyle(Z){var W;(W=this._selectionService)!=null&&W.shouldColumnSelect(Z)?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(Z,W,V=0){var ee;V===1?(super.scrollLines(Z,W,V),this.refresh(0,this.rows-1)):(ee=this.viewport)==null||ee.scrollLines(Z)}paste(Z){(0,f.paste)(Z,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(Z){this._customKeyEventHandler=Z}attachCustomWheelEventHandler(Z){this._customWheelEventHandler=Z}registerLinkProvider(Z){return this._linkProviderService.registerLinkProvider(Z)}registerCharacterJoiner(Z){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const W=this._characterJoinerService.register(Z);return this.refresh(0,this.rows-1),W}deregisterCharacterJoiner(Z){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(Z)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(Z){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+Z)}registerDecoration(Z){return this._decorationService.registerDecoration(Z)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(Z,W,V){this._selectionService.setSelection(Z,W,V)}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 Z;(Z=this._selectionService)==null||Z.clearSelection()}selectAll(){var Z;(Z=this._selectionService)==null||Z.selectAll()}selectLines(Z,W){var V;(V=this._selectionService)==null||V.selectLines(Z,W)}_keyDown(Z){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(Z)===!1)return!1;const W=this.browser.isMac&&this.options.macOptionIsMeta&&Z.altKey;if(!W&&!this._compositionHelper.keydown(Z))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;W||Z.key!=="Dead"&&Z.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const V=(0,Y.evaluateKeyboardEvent)(Z,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(Z),V.type===3||V.type===2){const ee=this.rows-1;return this.scrollLines(V.type===2?-ee:ee),this.cancel(Z,!0)}return V.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,Z)||(V.cancel&&this.cancel(Z,!0),!V.key||!!(Z.key&&!Z.ctrlKey&&!Z.altKey&&!Z.metaKey&&Z.key.length===1&&Z.key.charCodeAt(0)>=65&&Z.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(V.key!==K.C0.ETX&&V.key!==K.C0.CR||(this.textarea.value=""),this._onKey.fire({key:V.key,domEvent:Z}),this._showCursor(),this.coreService.triggerDataEvent(V.key,!0),!this.optionsService.rawOptions.screenReaderMode||Z.altKey||Z.ctrlKey?this.cancel(Z,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(Z,W){const V=Z.isMac&&!this.options.macOptionIsMeta&&W.altKey&&!W.ctrlKey&&!W.metaKey||Z.isWindows&&W.altKey&&W.ctrlKey&&!W.metaKey||Z.isWindows&&W.getModifierState("AltGraph");return W.type==="keypress"?V:V&&(!W.keyCode||W.keyCode>47)}_keyUp(Z){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(Z)===!1||((function(W){return W.keyCode===16||W.keyCode===17||W.keyCode===18})(Z)||this.focus(),this.updateCursorStyle(Z),this._keyPressHandled=!1)}_keyPress(Z){let W;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(Z)===!1)return!1;if(this.cancel(Z),Z.charCode)W=Z.charCode;else if(Z.which===null||Z.which===void 0)W=Z.keyCode;else{if(Z.which===0||Z.charCode===0)return!1;W=Z.which}return!(!W||(Z.altKey||Z.ctrlKey||Z.metaKey)&&!this._isThirdLevelShift(this.browser,Z)||(W=String.fromCharCode(W),this._onKey.fire({key:W,domEvent:Z}),this._showCursor(),this.coreService.triggerDataEvent(W,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(Z){if(Z.data&&Z.inputType==="insertText"&&(!Z.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const W=Z.data;return this.coreService.triggerDataEvent(W,!0),this.cancel(Z),!0}return!1}resize(Z,W){Z!==this.cols||W!==this.rows?super.resize(Z,W):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(Z,W){var V,ee;(V=this._charSizeService)==null||V.measure(),(ee=this.viewport)==null||ee.syncScrollArea(!0)}clear(){var Z;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 W=1;W<this.rows;W++)this.buffer.lines.push(this.buffer.getBlankLine(F.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(Z=this.viewport)==null||Z.reset(),this.refresh(0,this.rows-1)}}reset(){var W,V;this.options.rows=this.rows,this.options.cols=this.cols;const Z=this._customKeyEventHandler;this._setup(),super.reset(),(W=this._selectionService)==null||W.reset(),this._decorationService.reset(),(V=this.viewport)==null||V.reset(),this._customKeyEventHandler=Z,this.refresh(0,this.rows-1)}clearTextureAtlas(){var Z;(Z=this._renderService)==null||Z.clearTextureAtlas()}_reportFocus(){var Z;(Z=this.element)!=null&&Z.classList.contains("focus")?this.coreService.triggerDataEvent(K.C0.ESC+"[I"):this.coreService.triggerDataEvent(K.C0.ESC+"[O")}_reportWindowsOptions(Z){if(this._renderService)switch(Z){case U.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const W=this._renderService.dimensions.css.canvas.width.toFixed(0),V=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${K.C0.ESC}[4;${V};${W}t`);break;case U.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ee=this._renderService.dimensions.css.cell.width.toFixed(0),ue=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${K.C0.ESC}[6;${ue};${ee}t`)}}cancel(Z,W){if(this.options.cancelEvents||W)return Z.preventDefault(),Z.stopPropagation(),!1}}a.Terminal=fe},9924:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0,a.TimeBasedDebouncer=class{constructor(c,f=1e3){this._renderCallback=c,this._debounceThresholdMS=f,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,f,v){this._rowCount=v,c=c!==void 0?c:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f;const u=Date.now();if(u-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=u,this._innerRefresh();else if(!this._additionalRefreshRequested){const m=u-this._lastRefreshMs,w=this._debounceThresholdMS-m;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),w)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const c=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,f)}}},1680:function(g,a,c){var f=this&&this.__decorate||function(y,b,S,E){var L,x=arguments.length,O=x<3?b:E===null?E=Object.getOwnPropertyDescriptor(b,S):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(y,b,S,E);else for(var M=y.length-1;M>=0;M--)(L=y[M])&&(O=(x<3?L(O):x>3?L(b,S,O):L(b,S))||O);return x>3&&O&&Object.defineProperty(b,S,O),O},v=this&&this.__param||function(y,b){return function(S,E){b(S,E,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const u=c(3656),m=c(4725),w=c(8460),C=c(844),_=c(2585);let d=a.Viewport=class extends C.Disposable{constructor(y,b,S,E,L,x,O,M){super(),this._viewportElement=y,this._scrollArea=b,this._bufferService=S,this._optionsService=E,this._charSizeService=L,this._renderService=x,this._coreBrowserService=O,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new w.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,u.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((D=>this._activeBuffer=D.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((D=>this._renderDimensions=D))),this._handleThemeChange(M.colors),this.register(M.onChangeColors((D=>this._handleThemeChange(D)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(y){this._viewportElement.style.backgroundColor=y.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(y){if(y)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const b=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==b&&(this._lastRecordedBufferHeight=b,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const y=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==y&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=y),this._refreshAnimationFrame=null}syncScrollArea(y=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(y);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(y)}_handleScroll(y){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const b=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:b,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const y=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(y*(this._smoothScrollState.target-this._smoothScrollState.origin)),y<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(y,b){const S=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(b<0&&this._viewportElement.scrollTop!==0||b>0&&S<this._lastRecordedBufferHeight)||(y.cancelable&&y.preventDefault(),!1)}handleWheel(y){const b=this._getPixelsScrolled(y);return b!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+b:this._smoothScrollState.target+=b,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=b,this._bubbleScroll(y,b))}scrollLines(y){if(y!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const b=y*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+b,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:y,suppressScrollEvent:!1})}_getPixelsScrolled(y){if(y.deltaY===0||y.shiftKey)return 0;let b=this._applyScrollModifier(y.deltaY,y);return y.deltaMode===WheelEvent.DOM_DELTA_LINE?b*=this._currentRowHeight:y.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(b*=this._currentRowHeight*this._bufferService.rows),b}getBufferElements(y,b){var M;let S,E="";const L=[],x=b??this._bufferService.buffer.lines.length,O=this._bufferService.buffer.lines;for(let D=y;D<x;D++){const k=O.get(D);if(!k)continue;const B=(M=O.get(D+1))==null?void 0:M.isWrapped;if(E+=k.translateToString(!B),!B||D===O.length-1){const R=document.createElement("div");R.textContent=E,L.push(R),E.length>0&&(S=R),E=""}}return{bufferElements:L,cursorElement:S}}getLinesScrolled(y){if(y.deltaY===0||y.shiftKey)return 0;let b=this._applyScrollModifier(y.deltaY,y);return y.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(b/=this._currentRowHeight+0,this._wheelPartialScroll+=b,b=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):y.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(b*=this._bufferService.rows),b}_applyScrollModifier(y,b){const S=this._optionsService.rawOptions.fastScrollModifier;return S==="alt"&&b.altKey||S==="ctrl"&&b.ctrlKey||S==="shift"&&b.shiftKey?y*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:y*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(y){this._lastTouchY=y.touches[0].pageY}handleTouchMove(y){const b=this._lastTouchY-y.touches[0].pageY;return this._lastTouchY=y.touches[0].pageY,b!==0&&(this._viewportElement.scrollTop+=b,this._bubbleScroll(y,b))}};a.Viewport=d=f([v(2,_.IBufferService),v(3,_.IOptionsService),v(4,m.ICharSizeService),v(5,m.IRenderService),v(6,m.ICoreBrowserService),v(7,m.IThemeService)],d)},3107:function(g,a,c){var f=this&&this.__decorate||function(_,d,y,b){var S,E=arguments.length,L=E<3?d:b===null?b=Object.getOwnPropertyDescriptor(d,y):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(_,d,y,b);else for(var x=_.length-1;x>=0;x--)(S=_[x])&&(L=(E<3?S(L):E>3?S(d,y,L):S(d,y))||L);return E>3&&L&&Object.defineProperty(d,y,L),L},v=this&&this.__param||function(_,d){return function(y,b){d(y,b,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const u=c(4725),m=c(844),w=c(2585);let C=a.BufferDecorationRenderer=class extends m.Disposable{constructor(_,d,y,b,S){super(),this._screenElement=_,this._bufferService=d,this._coreBrowserService=y,this._decorationService=b,this._renderService=S,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((E=>this._removeDecoration(E)))),this.register((0,m.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const _ of this._decorationService.decorations)this._renderDecoration(_);this._dimensionsChanged=!1}_renderDecoration(_){this._refreshStyle(_),this._dimensionsChanged&&this._refreshXPosition(_)}_createElement(_){var b;const d=this._coreBrowserService.mainDocument.createElement("div");d.classList.add("xterm-decoration"),d.classList.toggle("xterm-decoration-top-layer",((b=_==null?void 0:_.options)==null?void 0:b.layer)==="top"),d.style.width=`${Math.round((_.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,d.style.height=(_.options.height||1)*this._renderService.dimensions.css.cell.height+"px",d.style.top=(_.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",d.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const y=_.options.x??0;return y&&y>this._bufferService.cols&&(d.style.display="none"),this._refreshXPosition(_,d),d}_refreshStyle(_){const d=_.marker.line-this._bufferService.buffers.active.ydisp;if(d<0||d>=this._bufferService.rows)_.element&&(_.element.style.display="none",_.onRenderEmitter.fire(_.element));else{let y=this._decorationElements.get(_);y||(y=this._createElement(_),_.element=y,this._decorationElements.set(_,y),this._container.appendChild(y),_.onDispose((()=>{this._decorationElements.delete(_),y.remove()}))),y.style.top=d*this._renderService.dimensions.css.cell.height+"px",y.style.display=this._altBufferIsActive?"none":"block",_.onRenderEmitter.fire(y)}}_refreshXPosition(_,d=_.element){if(!d)return;const y=_.options.x??0;(_.options.anchor||"left")==="right"?d.style.right=y?y*this._renderService.dimensions.css.cell.width+"px":"":d.style.left=y?y*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(_){var d;(d=this._decorationElements.get(_))==null||d.remove(),this._decorationElements.delete(_),_.dispose()}};a.BufferDecorationRenderer=C=f([v(1,w.IBufferService),v(2,u.ICoreBrowserService),v(3,w.IDecorationService),v(4,u.IRenderService)],C)},5871:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorZoneStore=void 0,a.ColorZoneStore=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(c){if(c.options.overviewRulerOptions){for(const f of this._zones)if(f.color===c.options.overviewRulerOptions.color&&f.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(f,c.marker.line))return;if(this._lineAdjacentToZone(f,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(f,c.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=c.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=c.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=c.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=c.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:c.options.overviewRulerOptions.color,position:c.options.overviewRulerOptions.position,startBufferLine:c.marker.line,endBufferLine:c.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(c){this._linePadding=c}_lineIntersectsZone(c,f){return f>=c.startBufferLine&&f<=c.endBufferLine}_lineAdjacentToZone(c,f,v){return f>=c.startBufferLine-this._linePadding[v||"full"]&&f<=c.endBufferLine+this._linePadding[v||"full"]}_addLineToZone(c,f){c.startBufferLine=Math.min(c.startBufferLine,f),c.endBufferLine=Math.max(c.endBufferLine,f)}}},5744:function(g,a,c){var f=this&&this.__decorate||function(S,E,L,x){var O,M=arguments.length,D=M<3?E:x===null?x=Object.getOwnPropertyDescriptor(E,L):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(S,E,L,x);else for(var k=S.length-1;k>=0;k--)(O=S[k])&&(D=(M<3?O(D):M>3?O(E,L,D):O(E,L))||D);return M>3&&D&&Object.defineProperty(E,L,D),D},v=this&&this.__param||function(S,E){return function(L,x){E(L,x,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const u=c(5871),m=c(4725),w=c(844),C=c(2585),_={full:0,left:0,center:0,right:0},d={full:0,left:0,center:0,right:0},y={full:0,left:0,center:0,right:0};let b=a.OverviewRulerRenderer=class extends w.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(S,E,L,x,O,M,D){var B;super(),this._viewportElement=S,this._screenElement=E,this._bufferService=L,this._decorationService=x,this._renderService=O,this._optionsService=M,this._coreBrowserService=D,this._colorZoneStore=new u.ColorZoneStore,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(),(B=this._viewportElement.parentElement)==null||B.insertBefore(this._canvas,this._viewportElement);const k=this._canvas.getContext("2d");if(!k)throw new Error("Ctx cannot be null");this._ctx=k,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,w.toDisposable)((()=>{var R;(R=this._canvas)==null||R.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){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())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const S=Math.floor(this._canvas.width/3),E=Math.ceil(this._canvas.width/3);d.full=this._canvas.width,d.left=S,d.center=E,d.right=S,this._refreshDrawHeightConstants(),y.full=0,y.left=0,y.center=d.left,y.right=d.left+d.center}_refreshDrawHeightConstants(){_.full=Math.round(2*this._coreBrowserService.dpr);const S=this._canvas.height/this._bufferService.buffer.lines.length,E=Math.round(Math.max(Math.min(S,12),6)*this._coreBrowserService.dpr);_.left=E,_.center=E,_.right=E}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.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(const E of this._decorationService.decorations)this._colorZoneStore.addDecoration(E);this._ctx.lineWidth=1;const S=this._colorZoneStore.zones;for(const E of S)E.position!=="full"&&this._renderColorZone(E);for(const E of S)E.position==="full"&&this._renderColorZone(E);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(S){this._ctx.fillStyle=S.color,this._ctx.fillRect(y[S.position||"full"],Math.round((this._canvas.height-1)*(S.startBufferLine/this._bufferService.buffers.active.lines.length)-_[S.position||"full"]/2),d[S.position||"full"],Math.round((this._canvas.height-1)*((S.endBufferLine-S.startBufferLine)/this._bufferService.buffers.active.lines.length)+_[S.position||"full"]))}_queueRefresh(S,E){this._shouldUpdateDimensions=S||this._shouldUpdateDimensions,this._shouldUpdateAnchor=E||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};a.OverviewRulerRenderer=b=f([v(2,C.IBufferService),v(3,C.IDecorationService),v(4,m.IRenderService),v(5,C.IOptionsService),v(6,m.ICoreBrowserService)],b)},2950:function(g,a,c){var f=this&&this.__decorate||function(_,d,y,b){var S,E=arguments.length,L=E<3?d:b===null?b=Object.getOwnPropertyDescriptor(d,y):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(_,d,y,b);else for(var x=_.length-1;x>=0;x--)(S=_[x])&&(L=(E<3?S(L):E>3?S(d,y,L):S(d,y))||L);return E>3&&L&&Object.defineProperty(d,y,L),L},v=this&&this.__param||function(_,d){return function(y,b){d(y,b,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const u=c(4725),m=c(2585),w=c(2584);let C=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(_,d,y,b,S,E){this._textarea=_,this._compositionView=d,this._bufferService=y,this._optionsService=b,this._coreService=S,this._renderService=E,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(_){this._compositionView.textContent=_.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(_){if(this._isComposing||this._isSendingComposition){if(_.keyCode===229||_.keyCode===16||_.keyCode===17||_.keyCode===18)return!1;this._finalizeComposition(!1)}return _.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(_){if(this._compositionView.classList.remove("active"),this._isComposing=!1,_){const d={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let y;this._isSendingComposition=!1,d.start+=this._dataAlreadySent.length,y=this._isComposing?this._textarea.value.substring(d.start,d.end):this._textarea.value.substring(d.start),y.length>0&&this._coreService.triggerDataEvent(y,!0)}}),0)}else{this._isSendingComposition=!1;const d=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(d,!0)}}_handleAnyTextareaChanges(){const _=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const d=this._textarea.value,y=d.replace(_,"");this._dataAlreadySent=y,d.length>_.length?this._coreService.triggerDataEvent(y,!0):d.length<_.length?this._coreService.triggerDataEvent(`${w.C0.DEL}`,!0):d.length===_.length&&d!==_&&this._coreService.triggerDataEvent(d,!0)}}),0)}updateCompositionElements(_){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const d=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),y=this._renderService.dimensions.css.cell.height,b=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,S=d*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=S+"px",this._compositionView.style.top=b+"px",this._compositionView.style.height=y+"px",this._compositionView.style.lineHeight=y+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const E=this._compositionView.getBoundingClientRect();this._textarea.style.left=S+"px",this._textarea.style.top=b+"px",this._textarea.style.width=Math.max(E.width,1)+"px",this._textarea.style.height=Math.max(E.height,1)+"px",this._textarea.style.lineHeight=E.height+"px"}_||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};a.CompositionHelper=C=f([v(2,m.IBufferService),v(3,m.IOptionsService),v(4,m.ICoreService),v(5,u.IRenderService)],C)},9806:(g,a)=>{function c(f,v,u){const m=u.getBoundingClientRect(),w=f.getComputedStyle(u),C=parseInt(w.getPropertyValue("padding-left")),_=parseInt(w.getPropertyValue("padding-top"));return[v.clientX-m.left-C,v.clientY-m.top-_]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=c,a.getCoords=function(f,v,u,m,w,C,_,d,y){if(!C)return;const b=c(f,v,u);return b?(b[0]=Math.ceil((b[0]+(y?_/2:0))/_),b[1]=Math.ceil(b[1]/d),b[0]=Math.min(Math.max(b[0],1),m+(y?1:0)),b[1]=Math.min(Math.max(b[1],1),w),b):void 0}},9504:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const f=c(2584);function v(d,y,b,S){const E=d-u(d,b),L=y-u(y,b),x=Math.abs(E-L)-(function(O,M,D){let k=0;const B=O-u(O,D),R=M-u(M,D);for(let P=0;P<Math.abs(B-R);P++){const H=m(O,M)==="A"?-1:1,X=D.buffer.lines.get(B+H*P);X!=null&&X.isWrapped&&k++}return k})(d,y,b);return _(x,C(m(d,y),S))}function u(d,y){let b=0,S=y.buffer.lines.get(d),E=S==null?void 0:S.isWrapped;for(;E&&d>=0&&d<y.rows;)b++,S=y.buffer.lines.get(--d),E=S==null?void 0:S.isWrapped;return b}function m(d,y){return d>y?"A":"B"}function w(d,y,b,S,E,L){let x=d,O=y,M="";for(;x!==b||O!==S;)x+=E?1:-1,E&&x>L.cols-1?(M+=L.buffer.translateBufferLineToString(O,!1,d,x),x=0,d=0,O++):!E&&x<0&&(M+=L.buffer.translateBufferLineToString(O,!1,0,d+1),x=L.cols-1,d=x,O--);return M+L.buffer.translateBufferLineToString(O,!1,d,x)}function C(d,y){const b=y?"O":"[";return f.C0.ESC+b+d}function _(d,y){d=Math.floor(d);let b="";for(let S=0;S<d;S++)b+=y;return b}a.moveToCellSequence=function(d,y,b,S){const E=b.buffer.x,L=b.buffer.y;if(!b.buffer.hasScrollback)return(function(M,D,k,B,R,P){return v(D,B,R,P).length===0?"":_(w(M,D,M,D-u(D,R),!1,R).length,C("D",P))})(E,L,0,y,b,S)+v(L,y,b,S)+(function(M,D,k,B,R,P){let H;H=v(D,B,R,P).length>0?B-u(B,R):D;const X=B,F=(function(K,Y,j,$,N,U){let J;return J=v(j,$,N,U).length>0?$-u($,N):Y,K<j&&J<=$||K>=j&&J<$?"C":"D"})(M,D,k,B,R,P);return _(w(M,H,k,X,F==="C",R).length,C(F,P))})(E,L,d,y,b,S);let x;if(L===y)return x=E>d?"D":"C",_(Math.abs(E-d),C(x,S));x=L>y?"D":"C";const O=Math.abs(L-y);return _((function(M,D){return D.cols-M})(L>y?d:E,b)+(O-1)*b.cols+1+((L>y?E:d)-1),C(x,S))}},1296:function(g,a,c){var f=this&&this.__decorate||function(P,H,X,F){var K,Y=arguments.length,j=Y<3?H:F===null?F=Object.getOwnPropertyDescriptor(H,X):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(P,H,X,F);else for(var $=P.length-1;$>=0;$--)(K=P[$])&&(j=(Y<3?K(j):Y>3?K(H,X,j):K(H,X))||j);return Y>3&&j&&Object.defineProperty(H,X,j),j},v=this&&this.__param||function(P,H){return function(X,F){H(X,F,P)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const u=c(3787),m=c(2550),w=c(2223),C=c(6171),_=c(6052),d=c(4725),y=c(8055),b=c(8460),S=c(844),E=c(2585),L="xterm-dom-renderer-owner-",x="xterm-rows",O="xterm-fg-",M="xterm-bg-",D="xterm-focus",k="xterm-selection";let B=1,R=a.DomRenderer=class extends S.Disposable{constructor(P,H,X,F,K,Y,j,$,N,U,J,te,fe){super(),this._terminal=P,this._document=H,this._element=X,this._screenElement=F,this._viewportElement=K,this._helperContainer=Y,this._linkifier2=j,this._charSizeService=N,this._optionsService=U,this._bufferService=J,this._coreBrowserService=te,this._themeService=fe,this._terminalClass=B++,this._rowElements=[],this._selectionRenderModel=(0,_.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new b.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(x),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(k),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,C.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ve=>this._injectCss(ve)))),this._injectCss(this._themeService.colors),this._rowFactory=$.createInstance(u.DomRendererRowFactory,document),this._element.classList.add(L+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((ve=>this._handleLinkHover(ve)))),this.register(this._linkifier2.onHideLinkUnderline((ve=>this._handleLinkLeave(ve)))),this.register((0,S.toDisposable)((()=>{this._element.classList.remove(L+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new m.WidthCache(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(){const P=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*P,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*P),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/P),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/P),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(const X of this._rowElements)X.style.width=`${this.dimensions.css.canvas.width}px`,X.style.height=`${this.dimensions.css.cell.height}px`,X.style.lineHeight=`${this.dimensions.css.cell.height}px`,X.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const H=`${this._terminalSelector} .${x} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=H,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(P){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let H=`${this._terminalSelector} .${x} { color: ${P.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;H+=`${this._terminalSelector} .${x} .xterm-dim { color: ${y.color.multiplyOpacity(P.foreground,.5).css};}`,H+=`${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;}`;const X=`blink_underline_${this._terminalClass}`,F=`blink_bar_${this._terminalClass}`,K=`blink_block_${this._terminalClass}`;H+=`@keyframes ${X} { 50% { border-bottom-style: hidden; }}`,H+=`@keyframes ${F} { 50% { box-shadow: none; }}`,H+=`@keyframes ${K} { 0% { background-color: ${P.cursor.css}; color: ${P.cursorAccent.css}; } 50% { background-color: inherit; color: ${P.cursor.css}; }}`,H+=`${this._terminalSelector} .${x}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${X} 1s step-end infinite;}${this._terminalSelector} .${x}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${F} 1s step-end infinite;}${this._terminalSelector} .${x}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${K} 1s step-end infinite;}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-block { background-color: ${P.cursor.css}; color: ${P.cursorAccent.css};}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${P.cursor.css} !important; color: ${P.cursorAccent.css} !important;}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${P.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${P.cursor.css} inset;}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${P.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,H+=`${this._terminalSelector} .${k} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${k} div { position: absolute; background-color: ${P.selectionBackgroundOpaque.css};}${this._terminalSelector} .${k} div { position: absolute; background-color: ${P.selectionInactiveBackgroundOpaque.css};}`;for(const[Y,j]of P.ansi.entries())H+=`${this._terminalSelector} .${O}${Y} { color: ${j.css}; }${this._terminalSelector} .${O}${Y}.xterm-dim { color: ${y.color.multiplyOpacity(j,.5).css}; }${this._terminalSelector} .${M}${Y} { background-color: ${j.css}; }`;H+=`${this._terminalSelector} .${O}${w.INVERTED_DEFAULT_COLOR} { color: ${y.color.opaque(P.background).css}; }${this._terminalSelector} .${O}${w.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${y.color.multiplyOpacity(y.color.opaque(P.background),.5).css}; }${this._terminalSelector} .${M}${w.INVERTED_DEFAULT_COLOR} { background-color: ${P.foreground.css}; }`,this._themeStyleElement.textContent=H}_setDefaultSpacing(){const P=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${P}px`,this._rowFactory.defaultSpacing=P}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(P,H){for(let X=this._rowElements.length;X<=H;X++){const F=this._document.createElement("div");this._rowContainer.appendChild(F),this._rowElements.push(F)}for(;this._rowElements.length>H;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(P,H){this._refreshRowElements(P,H),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(D),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(D),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(P,H,X){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(P,H,X),this.renderRows(0,this._bufferService.rows-1),!P||!H)return;this._selectionRenderModel.update(this._terminal,P,H,X);const F=this._selectionRenderModel.viewportStartRow,K=this._selectionRenderModel.viewportEndRow,Y=this._selectionRenderModel.viewportCappedStartRow,j=this._selectionRenderModel.viewportCappedEndRow;if(Y>=this._bufferService.rows||j<0)return;const $=this._document.createDocumentFragment();if(X){const N=P[0]>H[0];$.appendChild(this._createSelectionElement(Y,N?H[0]:P[0],N?P[0]:H[0],j-Y+1))}else{const N=F===Y?P[0]:0,U=Y===K?H[0]:this._bufferService.cols;$.appendChild(this._createSelectionElement(Y,N,U));const J=j-Y-1;if($.appendChild(this._createSelectionElement(Y+1,0,this._bufferService.cols,J)),Y!==j){const te=K===j?H[0]:this._bufferService.cols;$.appendChild(this._createSelectionElement(j,0,te))}}this._selectionContainer.appendChild($)}_createSelectionElement(P,H,X,F=1){const K=this._document.createElement("div"),Y=H*this.dimensions.css.cell.width;let j=this.dimensions.css.cell.width*(X-H);return Y+j>this.dimensions.css.canvas.width&&(j=this.dimensions.css.canvas.width-Y),K.style.height=F*this.dimensions.css.cell.height+"px",K.style.top=P*this.dimensions.css.cell.height+"px",K.style.left=`${Y}px`,K.style.width=`${j}px`,K}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(const P of this._rowElements)P.replaceChildren()}renderRows(P,H){const X=this._bufferService.buffer,F=X.ybase+X.y,K=Math.min(X.x,this._bufferService.cols-1),Y=this._optionsService.rawOptions.cursorBlink,j=this._optionsService.rawOptions.cursorStyle,$=this._optionsService.rawOptions.cursorInactiveStyle;for(let N=P;N<=H;N++){const U=N+X.ydisp,J=this._rowElements[N],te=X.lines.get(U);if(!J||!te)break;J.replaceChildren(...this._rowFactory.createRow(te,U,U===F,j,$,K,Y,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${L}${this._terminalClass}`}_handleLinkHover(P){this._setCellUnderline(P.x1,P.x2,P.y1,P.y2,P.cols,!0)}_handleLinkLeave(P){this._setCellUnderline(P.x1,P.x2,P.y1,P.y2,P.cols,!1)}_setCellUnderline(P,H,X,F,K,Y){X<0&&(P=0),F<0&&(H=0);const j=this._bufferService.rows-1;X=Math.max(Math.min(X,j),0),F=Math.max(Math.min(F,j),0),K=Math.min(K,this._bufferService.cols);const $=this._bufferService.buffer,N=$.ybase+$.y,U=Math.min($.x,K-1),J=this._optionsService.rawOptions.cursorBlink,te=this._optionsService.rawOptions.cursorStyle,fe=this._optionsService.rawOptions.cursorInactiveStyle;for(let ve=X;ve<=F;++ve){const Z=ve+$.ydisp,W=this._rowElements[ve],V=$.lines.get(Z);if(!W||!V)break;W.replaceChildren(...this._rowFactory.createRow(V,Z,Z===N,te,fe,U,J,this.dimensions.css.cell.width,this._widthCache,Y?ve===X?P:0:-1,Y?(ve===F?H:K)-1:-1))}}};a.DomRenderer=R=f([v(7,E.IInstantiationService),v(8,d.ICharSizeService),v(9,E.IOptionsService),v(10,E.IBufferService),v(11,d.ICoreBrowserService),v(12,d.IThemeService)],R)},3787:function(g,a,c){var f=this&&this.__decorate||function(x,O,M,D){var k,B=arguments.length,R=B<3?O:D===null?D=Object.getOwnPropertyDescriptor(O,M):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(x,O,M,D);else for(var P=x.length-1;P>=0;P--)(k=x[P])&&(R=(B<3?k(R):B>3?k(O,M,R):k(O,M))||R);return B>3&&R&&Object.defineProperty(O,M,R),R},v=this&&this.__param||function(x,O){return function(M,D){O(M,D,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const u=c(2223),m=c(643),w=c(511),C=c(2585),_=c(8055),d=c(4725),y=c(4269),b=c(6171),S=c(3734);let E=a.DomRendererRowFactory=class{constructor(x,O,M,D,k,B,R){this._document=x,this._characterJoinerService=O,this._optionsService=M,this._coreBrowserService=D,this._coreService=k,this._decorationService=B,this._themeService=R,this._workCell=new w.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(x,O,M){this._selectionStart=x,this._selectionEnd=O,this._columnSelectMode=M}createRow(x,O,M,D,k,B,R,P,H,X,F){const K=[],Y=this._characterJoinerService.getJoinedCharacters(O),j=this._themeService.colors;let $,N=x.getNoBgTrimmedLength();M&&N<B+1&&(N=B+1);let U=0,J="",te=0,fe=0,ve=0,Z=!1,W=0,V=!1,ee=0;const ue=[],ie=X!==-1&&F!==-1;for(let me=0;me<N;me++){x.loadCell(me,this._workCell);let de=this._workCell.getWidth();if(de===0)continue;let Me=!1,ke=me,Ce=this._workCell;if(Y.length>0&&me===Y[0][0]){Me=!0;const Te=Y.shift();Ce=new y.JoinedCellData(this._workCell,x.translateToString(!0,Te[0],Te[1]),Te[1]-Te[0]),ke=Te[1]-1,de=Ce.getWidth()}const Ve=this._isCellInSelection(me,O),Dt=M&&me===B,Se=ie&&me>=X&&me<=F;let ye=!1;this._decorationService.forEachDecorationAtCell(me,O,void 0,(Te=>{ye=!0}));let be=Ce.getChars()||m.WHITESPACE_CELL_CHAR;if(be===" "&&(Ce.isUnderline()||Ce.isOverline())&&(be=" "),ee=de*P-H.get(be,Ce.isBold(),Ce.isItalic()),$){if(U&&(Ve&&V||!Ve&&!V&&Ce.bg===te)&&(Ve&&V&&j.selectionForeground||Ce.fg===fe)&&Ce.extended.ext===ve&&Se===Z&&ee===W&&!Dt&&!Me&&!ye){Ce.isInvisible()?J+=m.WHITESPACE_CELL_CHAR:J+=be,U++;continue}U&&($.textContent=J),$=this._document.createElement("span"),U=0,J=""}else $=this._document.createElement("span");if(te=Ce.bg,fe=Ce.fg,ve=Ce.extended.ext,Z=Se,W=ee,V=Ve,Me&&B>=me&&B<=ke&&(B=me),!this._coreService.isCursorHidden&&Dt&&this._coreService.isCursorInitialized){if(ue.push("xterm-cursor"),this._coreBrowserService.isFocused)R&&ue.push("xterm-cursor-blink"),ue.push(D==="bar"?"xterm-cursor-bar":D==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(k)switch(k){case"outline":ue.push("xterm-cursor-outline");break;case"block":ue.push("xterm-cursor-block");break;case"bar":ue.push("xterm-cursor-bar");break;case"underline":ue.push("xterm-cursor-underline")}}if(Ce.isBold()&&ue.push("xterm-bold"),Ce.isItalic()&&ue.push("xterm-italic"),Ce.isDim()&&ue.push("xterm-dim"),J=Ce.isInvisible()?m.WHITESPACE_CELL_CHAR:Ce.getChars()||m.WHITESPACE_CELL_CHAR,Ce.isUnderline()&&(ue.push(`xterm-underline-${Ce.extended.underlineStyle}`),J===" "&&(J=" "),!Ce.isUnderlineColorDefault()))if(Ce.isUnderlineColorRGB())$.style.textDecorationColor=`rgb(${S.AttributeData.toColorRGB(Ce.getUnderlineColor()).join(",")})`;else{let Te=Ce.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Ce.isBold()&&Te<8&&(Te+=8),$.style.textDecorationColor=j.ansi[Te].css}Ce.isOverline()&&(ue.push("xterm-overline"),J===" "&&(J=" ")),Ce.isStrikethrough()&&ue.push("xterm-strikethrough"),Se&&($.style.textDecoration="underline");let ge=Ce.getFgColor(),we=Ce.getFgColorMode(),$e=Ce.getBgColor(),Be=Ce.getBgColorMode();const It=!!Ce.isInverse();if(It){const Te=ge;ge=$e,$e=Te;const lr=we;we=Be,Be=lr}let ct,mt,qe,Pe=!1;switch(this._decorationService.forEachDecorationAtCell(me,O,void 0,(Te=>{Te.options.layer!=="top"&&Pe||(Te.backgroundColorRGB&&(Be=50331648,$e=Te.backgroundColorRGB.rgba>>8&16777215,ct=Te.backgroundColorRGB),Te.foregroundColorRGB&&(we=50331648,ge=Te.foregroundColorRGB.rgba>>8&16777215,mt=Te.foregroundColorRGB),Pe=Te.options.layer==="top")})),!Pe&&Ve&&(ct=this._coreBrowserService.isFocused?j.selectionBackgroundOpaque:j.selectionInactiveBackgroundOpaque,$e=ct.rgba>>8&16777215,Be=50331648,Pe=!0,j.selectionForeground&&(we=50331648,ge=j.selectionForeground.rgba>>8&16777215,mt=j.selectionForeground)),Pe&&ue.push("xterm-decoration-top"),Be){case 16777216:case 33554432:qe=j.ansi[$e],ue.push(`xterm-bg-${$e}`);break;case 50331648:qe=_.channels.toColor($e>>16,$e>>8&255,255&$e),this._addStyle($,`background-color:#${L(($e>>>0).toString(16),"0",6)}`);break;default:It?(qe=j.foreground,ue.push(`xterm-bg-${u.INVERTED_DEFAULT_COLOR}`)):qe=j.background}switch(ct||Ce.isDim()&&(ct=_.color.multiplyOpacity(qe,.5)),we){case 16777216:case 33554432:Ce.isBold()&&ge<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ge+=8),this._applyMinimumContrast($,qe,j.ansi[ge],Ce,ct,void 0)||ue.push(`xterm-fg-${ge}`);break;case 50331648:const Te=_.channels.toColor(ge>>16&255,ge>>8&255,255&ge);this._applyMinimumContrast($,qe,Te,Ce,ct,mt)||this._addStyle($,`color:#${L(ge.toString(16),"0",6)}`);break;default:this._applyMinimumContrast($,qe,j.foreground,Ce,ct,mt)||It&&ue.push(`xterm-fg-${u.INVERTED_DEFAULT_COLOR}`)}ue.length&&($.className=ue.join(" "),ue.length=0),Dt||Me||ye?$.textContent=J:U++,ee!==this.defaultSpacing&&($.style.letterSpacing=`${ee}px`),K.push($),me=ke}return $&&U&&($.textContent=J),K}_applyMinimumContrast(x,O,M,D,k,B){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,b.treatGlyphAsBackgroundColor)(D.getCode()))return!1;const R=this._getContrastCache(D);let P;if(k||B||(P=R.getColor(O.rgba,M.rgba)),P===void 0){const H=this._optionsService.rawOptions.minimumContrastRatio/(D.isDim()?2:1);P=_.color.ensureContrastRatio(k||O,B||M,H),R.setColor((k||O).rgba,(B||M).rgba,P??null)}return!!P&&(this._addStyle(x,`color:${P.css}`),!0)}_getContrastCache(x){return x.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(x,O){x.setAttribute("style",`${x.getAttribute("style")||""}${O};`)}_isCellInSelection(x,O){const M=this._selectionStart,D=this._selectionEnd;return!(!M||!D)&&(this._columnSelectMode?M[0]<=D[0]?x>=M[0]&&O>=M[1]&&x<D[0]&&O<=D[1]:x<M[0]&&O>=M[1]&&x>=D[0]&&O<=D[1]:O>M[1]&&O<D[1]||M[1]===D[1]&&O===M[1]&&x>=M[0]&&x<D[0]||M[1]<D[1]&&O===D[1]&&x<D[0]||M[1]<D[1]&&O===M[1]&&x>=M[0])}};function L(x,O,M){for(;x.length<M;)x=O+x;return x}a.DomRendererRowFactory=E=f([v(1,d.ICharacterJoinerService),v(2,C.IOptionsService),v(3,d.ICoreBrowserService),v(4,C.ICoreService),v(5,C.IDecorationService),v(6,d.IThemeService)],E)},2550:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WidthCache=void 0,a.WidthCache=class{constructor(c,f){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=c.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";const v=c.createElement("span");v.classList.add("xterm-char-measure-element");const u=c.createElement("span");u.classList.add("xterm-char-measure-element"),u.style.fontWeight="bold";const m=c.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontStyle="italic";const w=c.createElement("span");w.classList.add("xterm-char-measure-element"),w.style.fontWeight="bold",w.style.fontStyle="italic",this._measureElements=[v,u,m,w],this._container.appendChild(v),this._container.appendChild(u),this._container.appendChild(m),this._container.appendChild(w),f.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(c,f,v,u){c===this._font&&f===this._fontSize&&v===this._weight&&u===this._weightBold||(this._font=c,this._fontSize=f,this._weight=v,this._weightBold=u,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${v}`,this._measureElements[1].style.fontWeight=`${u}`,this._measureElements[2].style.fontWeight=`${v}`,this._measureElements[3].style.fontWeight=`${u}`,this.clear())}get(c,f,v){let u=0;if(!f&&!v&&c.length===1&&(u=c.charCodeAt(0))<256){if(this._flat[u]!==-9999)return this._flat[u];const C=this._measure(c,0);return C>0&&(this._flat[u]=C),C}let m=c;f&&(m+="B"),v&&(m+="I");let w=this._holey.get(m);if(w===void 0){let C=0;f&&(C|=1),v&&(C|=2),w=this._measure(c,C),w>0&&this._holey.set(m,w)}return w}_measure(c,f){const v=this._measureElements[f];return v.textContent=c.repeat(32),v.offsetWidth/32}}},2223:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const f=c(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},6171:(g,a)=>{function c(v){return 57508<=v&&v<=57558}function f(v){return v>=128512&&v<=128591||v>=127744&&v<=128511||v>=128640&&v<=128767||v>=9728&&v<=9983||v>=9984&&v<=10175||v>=65024&&v<=65039||v>=129280&&v<=129535||v>=127462&&v<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(v){if(!v)throw new Error("value must not be falsy");return v},a.isPowerlineGlyph=c,a.isRestrictedPowerlineGlyph=function(v){return 57520<=v&&v<=57527},a.isEmoji=f,a.allowRescaling=function(v,u,m,w){return u===1&&m>Math.ceil(1.5*w)&&v!==void 0&&v>255&&!f(v)&&!c(v)&&!(function(C){return 57344<=C&&C<=63743})(v)},a.treatGlyphAsBackgroundColor=function(v){return c(v)||(function(u){return 9472<=u&&u<=9631})(v)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(v,u,m=0){return(v-(2*Math.round(u)-m))%(2*Math.round(u))}},6052:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class c{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(v,u,m,w=!1){if(this.selectionStart=u,this.selectionEnd=m,!u||!m||u[0]===m[0]&&u[1]===m[1])return void this.clear();const C=v.buffers.active.ydisp,_=u[1]-C,d=m[1]-C,y=Math.max(_,0),b=Math.min(d,v.rows-1);y>=v.rows||b<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=_,this.viewportEndRow=d,this.viewportCappedStartRow=y,this.viewportCappedEndRow=b,this.startCol=u[0],this.endCol=m[0])}isCellSelected(v,u,m){return!!this.hasSelection&&(m-=v.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?u>=this.startCol&&m>=this.viewportCappedStartRow&&u<this.endCol&&m<=this.viewportCappedEndRow:u<this.startCol&&m>=this.viewportCappedStartRow&&u>=this.endCol&&m<=this.viewportCappedEndRow:m>this.viewportStartRow&&m<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&m===this.viewportStartRow&&u>=this.startCol&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportEndRow&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportStartRow&&u>=this.startCol)}}a.createSelectionRenderModel=function(){return new c}},456:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0,a.SelectionModel=class{constructor(c){this._bufferService=c,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.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()){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?c%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)-1]:[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[c,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[Math.max(c,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const c=this.selectionStart,f=this.selectionEnd;return!(!c||!f)&&(c[1]>f[1]||c[1]===f[1]&&c[0]>f[0])}handleTrim(c){return this.selectionStart&&(this.selectionStart[1]-=c),this.selectionEnd&&(this.selectionEnd[1]-=c),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(g,a,c){var f=this&&this.__decorate||function(b,S,E,L){var x,O=arguments.length,M=O<3?S:L===null?L=Object.getOwnPropertyDescriptor(S,E):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(b,S,E,L);else for(var D=b.length-1;D>=0;D--)(x=b[D])&&(M=(O<3?x(M):O>3?x(S,E,M):x(S,E))||M);return O>3&&M&&Object.defineProperty(S,E,M),M},v=this&&this.__param||function(b,S){return function(E,L){S(E,L,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const u=c(2585),m=c(8460),w=c(844);let C=a.CharSizeService=class extends w.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(b,S,E){super(),this._optionsService=E,this.width=0,this.height=0,this._onCharSizeChange=this.register(new m.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new y(this._optionsService))}catch{this._measureStrategy=this.register(new d(b,S,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const b=this._measureStrategy.measure();b.width===this.width&&b.height===this.height||(this.width=b.width,this.height=b.height,this._onCharSizeChange.fire())}};a.CharSizeService=C=f([v(2,u.IOptionsService)],C);class _ extends w.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(S,E){S!==void 0&&S>0&&E!==void 0&&E>0&&(this._result.width=S,this._result.height=E)}}class d extends _{constructor(S,E,L){super(),this._document=S,this._parentElement=E,this._optionsService=L,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}}class y extends _{constructor(S){super(),this._optionsService=S,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const E=this._ctx.measureText("W");if(!("width"in E&&"fontBoundingBoxAscent"in E&&"fontBoundingBoxDescent"in E))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const S=this._ctx.measureText("W");return this._validateAndSet(S.width,S.fontBoundingBoxAscent+S.fontBoundingBoxDescent),this._result}}},4269:function(g,a,c){var f=this&&this.__decorate||function(y,b,S,E){var L,x=arguments.length,O=x<3?b:E===null?E=Object.getOwnPropertyDescriptor(b,S):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(y,b,S,E);else for(var M=y.length-1;M>=0;M--)(L=y[M])&&(O=(x<3?L(O):x>3?L(b,S,O):L(b,S))||O);return x>3&&O&&Object.defineProperty(b,S,O),O},v=this&&this.__param||function(y,b){return function(S,E){b(S,E,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const u=c(3734),m=c(643),w=c(511),C=c(2585);class _ extends u.AttributeData{constructor(b,S,E){super(),this.content=0,this.combinedData="",this.fg=b.fg,this.bg=b.bg,this.combinedData=S,this._width=E}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(b){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.JoinedCellData=_;let d=a.CharacterJoinerService=class o2{constructor(b){this._bufferService=b,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new w.CellData}register(b){const S={id:this._nextCharacterJoinerId++,handler:b};return this._characterJoiners.push(S),S.id}deregister(b){for(let S=0;S<this._characterJoiners.length;S++)if(this._characterJoiners[S].id===b)return this._characterJoiners.splice(S,1),!0;return!1}getJoinedCharacters(b){if(this._characterJoiners.length===0)return[];const S=this._bufferService.buffer.lines.get(b);if(!S||S.length===0)return[];const E=[],L=S.translateToString(!0);let x=0,O=0,M=0,D=S.getFg(0),k=S.getBg(0);for(let B=0;B<S.getTrimmedLength();B++)if(S.loadCell(B,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==D||this._workCell.bg!==k){if(B-x>1){const R=this._getJoinedRanges(L,M,O,S,x);for(let P=0;P<R.length;P++)E.push(R[P])}x=B,M=O,D=this._workCell.fg,k=this._workCell.bg}O+=this._workCell.getChars().length||m.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-x>1){const B=this._getJoinedRanges(L,M,O,S,x);for(let R=0;R<B.length;R++)E.push(B[R])}return E}_getJoinedRanges(b,S,E,L,x){const O=b.substring(S,E);let M=[];try{M=this._characterJoiners[0].handler(O)}catch(D){console.error(D)}for(let D=1;D<this._characterJoiners.length;D++)try{const k=this._characterJoiners[D].handler(O);for(let B=0;B<k.length;B++)o2._mergeRanges(M,k[B])}catch(k){console.error(k)}return this._stringRangesToCellRanges(M,L,x),M}_stringRangesToCellRanges(b,S,E){let L=0,x=!1,O=0,M=b[L];if(M){for(let D=E;D<this._bufferService.cols;D++){const k=S.getWidth(D),B=S.getString(D).length||m.WHITESPACE_CELL_CHAR.length;if(k!==0){if(!x&&M[0]<=O&&(M[0]=D,x=!0),M[1]<=O){if(M[1]=D,M=b[++L],!M)break;M[0]<=O?(M[0]=D,x=!0):x=!1}O+=B}}M&&(M[1]=this._bufferService.cols)}}static _mergeRanges(b,S){let E=!1;for(let L=0;L<b.length;L++){const x=b[L];if(E){if(S[1]<=x[0])return b[L-1][1]=S[1],b;if(S[1]<=x[1])return b[L-1][1]=Math.max(S[1],x[1]),b.splice(L,1),b;b.splice(L,1),L--}else{if(S[1]<=x[0])return b.splice(L,0,S),b;if(S[1]<=x[1])return x[0]=Math.min(S[0],x[0]),b;S[0]<x[1]&&(x[0]=Math.min(S[0],x[0]),E=!0)}}return E?b[b.length-1][1]=S[1]:b.push(S),b}};a.CharacterJoinerService=d=f([v(0,C.IBufferService)],d)},5114:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const f=c(844),v=c(8460),u=c(3656);class m extends f.Disposable{constructor(_,d,y){super(),this._textarea=_,this._window=d,this.mainDocument=y,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new w(this._window),this._onDprChange=this.register(new v.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new v.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((b=>this._screenDprMonitor.setWindow(b)))),this.register((0,v.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(_){this._window!==_&&(this._window=_,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}}a.CoreBrowserService=m;class w extends f.Disposable{constructor(_){super(),this._parentWindow=_,this._windowResizeListener=this.register(new f.MutableDisposable),this._onDprChange=this.register(new v.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,f.toDisposable)((()=>this.clearListener())))}setWindow(_){this._parentWindow=_,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,u.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var _;this._outerListener&&((_=this._resolutionMediaMatchList)==null||_.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)}}},779:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const f=c(844);class v extends f.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,f.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(m){return this.linkProviders.push(m),{dispose:()=>{const w=this.linkProviders.indexOf(m);w!==-1&&this.linkProviders.splice(w,1)}}}}a.LinkProviderService=v},8934:function(g,a,c){var f=this&&this.__decorate||function(C,_,d,y){var b,S=arguments.length,E=S<3?_:y===null?y=Object.getOwnPropertyDescriptor(_,d):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(C,_,d,y);else for(var L=C.length-1;L>=0;L--)(b=C[L])&&(E=(S<3?b(E):S>3?b(_,d,E):b(_,d))||E);return S>3&&E&&Object.defineProperty(_,d,E),E},v=this&&this.__param||function(C,_){return function(d,y){_(d,y,C)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const u=c(4725),m=c(9806);let w=a.MouseService=class{constructor(C,_){this._renderService=C,this._charSizeService=_}getCoords(C,_,d,y,b){return(0,m.getCoords)(window,C,_,d,y,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,b)}getMouseReportCoords(C,_){const d=(0,m.getCoordsRelativeToElement)(window,C,_);if(this._charSizeService.hasValidSize)return d[0]=Math.min(Math.max(d[0],0),this._renderService.dimensions.css.canvas.width-1),d[1]=Math.min(Math.max(d[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(d[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(d[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(d[0]),y:Math.floor(d[1])}}};a.MouseService=w=f([v(0,u.IRenderService),v(1,u.ICharSizeService)],w)},3230:function(g,a,c){var f=this&&this.__decorate||function(b,S,E,L){var x,O=arguments.length,M=O<3?S:L===null?L=Object.getOwnPropertyDescriptor(S,E):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(b,S,E,L);else for(var D=b.length-1;D>=0;D--)(x=b[D])&&(M=(O<3?x(M):O>3?x(S,E,M):x(S,E))||M);return O>3&&M&&Object.defineProperty(S,E,M),M},v=this&&this.__param||function(b,S){return function(E,L){S(E,L,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const u=c(6193),m=c(4725),w=c(8460),C=c(844),_=c(7226),d=c(2585);let y=a.RenderService=class extends C.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(b,S,E,L,x,O,M,D){super(),this._rowCount=b,this._charSizeService=L,this._renderer=this.register(new C.MutableDisposable),this._pausedResizeTask=new _.DebouncedIdleTask,this._observerDisposable=this.register(new C.MutableDisposable),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 w.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new w.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new w.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new w.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new u.RenderDebouncer(((k,B)=>this._renderRows(k,B)),M),this.register(this._renderDebouncer),this.register(M.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(O.onResize((()=>this._fullRefresh()))),this.register(O.buffers.onBufferActivate((()=>{var k;return(k=this._renderer.value)==null?void 0:k.clear()}))),this.register(E.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(x.onDecorationRegistered((()=>this._fullRefresh()))),this.register(x.onDecorationRemoved((()=>this._fullRefresh()))),this.register(E.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(O.cols,O.rows),this._fullRefresh()}))),this.register(E.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(O.buffer.y,O.buffer.y,!0)))),this.register(D.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(M.window,S),this.register(M.onWindowChange((k=>this._registerIntersectionObserver(k,S))))}_registerIntersectionObserver(b,S){if("IntersectionObserver"in b){const E=new b.IntersectionObserver((L=>this._handleIntersectionChange(L[L.length-1])),{threshold:0});E.observe(S),this._observerDisposable.value=(0,C.toDisposable)((()=>E.disconnect()))}}_handleIntersectionChange(b){this._isPaused=b.isIntersecting===void 0?b.intersectionRatio===0:!b.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(b,S,E=!1){this._isPaused?this._needsFullRefresh=!0:(E||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(b,S,this._rowCount))}_renderRows(b,S){this._renderer.value&&(b=Math.min(b,this._rowCount-1),S=Math.min(S,this._rowCount-1),this._renderer.value.renderRows(b,S),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:b,end:S}),this._onRender.fire({start:b,end:S}),this._isNextRenderRedrawOnly=!0)}resize(b,S){this._rowCount=S,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(b){this._renderer.value=b,this._renderer.value&&(this._renderer.value.onRequestRedraw((S=>this.refreshRows(S.start,S.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(b){return this._renderDebouncer.addRefreshCallback(b)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var b,S;this._renderer.value&&((S=(b=this._renderer.value).clearTextureAtlas)==null||S.call(b),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(b,S){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var E;return(E=this._renderer.value)==null?void 0:E.handleResize(b,S)})):this._renderer.value.handleResize(b,S),this._fullRefresh())}handleCharSizeChanged(){var b;(b=this._renderer.value)==null||b.handleCharSizeChanged()}handleBlur(){var b;(b=this._renderer.value)==null||b.handleBlur()}handleFocus(){var b;(b=this._renderer.value)==null||b.handleFocus()}handleSelectionChanged(b,S,E){var L;this._selectionState.start=b,this._selectionState.end=S,this._selectionState.columnSelectMode=E,(L=this._renderer.value)==null||L.handleSelectionChanged(b,S,E)}handleCursorMove(){var b;(b=this._renderer.value)==null||b.handleCursorMove()}clear(){var b;(b=this._renderer.value)==null||b.clear()}};a.RenderService=y=f([v(2,d.IOptionsService),v(3,m.ICharSizeService),v(4,d.IDecorationService),v(5,d.IBufferService),v(6,m.ICoreBrowserService),v(7,m.IThemeService)],y)},9312:function(g,a,c){var f=this&&this.__decorate||function(M,D,k,B){var R,P=arguments.length,H=P<3?D:B===null?B=Object.getOwnPropertyDescriptor(D,k):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(M,D,k,B);else for(var X=M.length-1;X>=0;X--)(R=M[X])&&(H=(P<3?R(H):P>3?R(D,k,H):R(D,k))||H);return P>3&&H&&Object.defineProperty(D,k,H),H},v=this&&this.__param||function(M,D){return function(k,B){D(k,B,M)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const u=c(9806),m=c(9504),w=c(456),C=c(4725),_=c(8460),d=c(844),y=c(6114),b=c(4841),S=c(511),E=c(2585),L=" ",x=new RegExp(L,"g");let O=a.SelectionService=class extends d.Disposable{constructor(M,D,k,B,R,P,H,X,F){super(),this._element=M,this._screenElement=D,this._linkifier=k,this._bufferService=B,this._coreService=R,this._mouseService=P,this._optionsService=H,this._renderService=X,this._coreBrowserService=F,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new S.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new _.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new _.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new _.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new _.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=K=>this._handleMouseMove(K),this._mouseUpListener=K=>this._handleMouseUp(K),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((K=>this._handleTrim(K))),this.register(this._bufferService.buffers.onBufferActivate((K=>this._handleBufferActivate(K)))),this.enable(),this._model=new w.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,d.toDisposable)((()=>{this._removeMouseDownListeners()})))}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(){const M=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;return!(!M||!D||M[0]===D[0]&&M[1]===D[1])}get selectionText(){const M=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;if(!M||!D)return"";const k=this._bufferService.buffer,B=[];if(this._activeSelectionMode===3){if(M[0]===D[0])return"";const R=M[0]<D[0]?M[0]:D[0],P=M[0]<D[0]?D[0]:M[0];for(let H=M[1];H<=D[1];H++){const X=k.translateBufferLineToString(H,!0,R,P);B.push(X)}}else{const R=M[1]===D[1]?D[0]:void 0;B.push(k.translateBufferLineToString(M[1],!0,M[0],R));for(let P=M[1]+1;P<=D[1]-1;P++){const H=k.lines.get(P),X=k.translateBufferLineToString(P,!0);H!=null&&H.isWrapped?B[B.length-1]+=X:B.push(X)}if(M[1]!==D[1]){const P=k.lines.get(D[1]),H=k.translateBufferLineToString(D[1],!0,0,D[0]);P&&P.isWrapped?B[B.length-1]+=H:B.push(H)}}return B.map((R=>R.replace(x," "))).join(y.isWindows?`\r
|
|
54
|
-
`:`
|
|
55
|
-
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(M){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),y.isLinux&&M&&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(M){const D=this._getMouseBufferCoords(M),k=this._model.finalSelectionStart,B=this._model.finalSelectionEnd;return!!(k&&B&&D)&&this._areCoordsInSelection(D,k,B)}isCellInSelection(M,D){const k=this._model.finalSelectionStart,B=this._model.finalSelectionEnd;return!(!k||!B)&&this._areCoordsInSelection([M,D],k,B)}_areCoordsInSelection(M,D,k){return M[1]>D[1]&&M[1]<k[1]||D[1]===k[1]&&M[1]===D[1]&&M[0]>=D[0]&&M[0]<k[0]||D[1]<k[1]&&M[1]===k[1]&&M[0]<k[0]||D[1]<k[1]&&M[1]===D[1]&&M[0]>=D[0]}_selectWordAtCursor(M,D){var R,P;const k=(P=(R=this._linkifier.currentLink)==null?void 0:R.link)==null?void 0:P.range;if(k)return this._model.selectionStart=[k.start.x-1,k.start.y-1],this._model.selectionStartLength=(0,b.getRangeLength)(k,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const B=this._getMouseBufferCoords(M);return!!B&&(this._selectWordAt(B,D),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(M,D){this._model.clearSelection(),M=Math.max(M,0),D=Math.min(D,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,M],this._model.selectionEnd=[this._bufferService.cols,D],this.refresh(),this._onSelectionChange.fire()}_handleTrim(M){this._model.handleTrim(M)&&this.refresh()}_getMouseBufferCoords(M){const D=this._mouseService.getCoords(M,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(D)return D[0]--,D[1]--,D[1]+=this._bufferService.buffer.ydisp,D}_getMouseEventScrollAmount(M){let D=(0,u.getCoordsRelativeToElement)(this._coreBrowserService.window,M,this._screenElement)[1];const k=this._renderService.dimensions.css.canvas.height;return D>=0&&D<=k?0:(D>k&&(D-=k),D=Math.min(Math.max(D,-50),50),D/=50,D/Math.abs(D)+Math.round(14*D))}shouldForceSelection(M){return y.isMac?M.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:M.shiftKey}handleMouseDown(M){if(this._mouseDownTimeStamp=M.timeStamp,(M.button!==2||!this.hasSelection)&&M.button===0){if(!this._enabled){if(!this.shouldForceSelection(M))return;M.stopPropagation()}M.preventDefault(),this._dragScrollAmount=0,this._enabled&&M.shiftKey?this._handleIncrementalClick(M):M.detail===1?this._handleSingleClick(M):M.detail===2?this._handleDoubleClick(M):M.detail===3&&this._handleTripleClick(M),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()),50)}_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(M){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(M))}_handleSingleClick(M){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(M)?3:0,this._model.selectionStart=this._getMouseBufferCoords(M),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const D=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);D&&D.length!==this._model.selectionStart[0]&&D.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(M){this._selectWordAtCursor(M,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(M){const D=this._getMouseBufferCoords(M);D&&(this._activeSelectionMode=2,this._selectLineAt(D[1]))}shouldColumnSelect(M){return M.altKey&&!(y.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(M){if(M.stopImmediatePropagation(),!this._model.selectionStart)return;const D=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(M),!this._model.selectionEnd)return void this.refresh(!0);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(M),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const k=this._bufferService.buffer;if(this._model.selectionEnd[1]<k.lines.length){const B=k.lines.get(this._model.selectionEnd[1]);B&&B.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}D&&D[0]===this._model.selectionEnd[0]&&D[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});const M=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(M.ydisp+this._bufferService.rows,M.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=M.ydisp),this.refresh()}}_handleMouseUp(M){const D=M.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&D<500&&M.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const k=this._mouseService.getCoords(M,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(k&&k[0]!==void 0&&k[1]!==void 0){const B=(0,m.moveToCellSequence)(k[0]-1,k[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(B,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const M=this._model.finalSelectionStart,D=this._model.finalSelectionEnd,k=!(!M||!D||M[0]===D[0]&&M[1]===D[1]);k?M&&D&&(this._oldSelectionStart&&this._oldSelectionEnd&&M[0]===this._oldSelectionStart[0]&&M[1]===this._oldSelectionStart[1]&&D[0]===this._oldSelectionEnd[0]&&D[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(M,D,k)):this._oldHasSelection&&this._fireOnSelectionChange(M,D,k)}_fireOnSelectionChange(M,D,k){this._oldSelectionStart=M,this._oldSelectionEnd=D,this._oldHasSelection=k,this._onSelectionChange.fire()}_handleBufferActivate(M){this.clearSelection(),this._trimListener.dispose(),this._trimListener=M.activeBuffer.lines.onTrim((D=>this._handleTrim(D)))}_convertViewportColToCharacterIndex(M,D){let k=D;for(let B=0;D>=B;B++){const R=M.loadCell(B,this._workCell).getChars().length;this._workCell.getWidth()===0?k--:R>1&&D!==B&&(k+=R-1)}return k}setSelection(M,D,k){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[M,D],this._model.selectionStartLength=k,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(M){this._isClickInSelection(M)||(this._selectWordAtCursor(M,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(M,D,k=!0,B=!0){if(M[0]>=this._bufferService.cols)return;const R=this._bufferService.buffer,P=R.lines.get(M[1]);if(!P)return;const H=R.translateBufferLineToString(M[1],!1);let X=this._convertViewportColToCharacterIndex(P,M[0]),F=X;const K=M[0]-X;let Y=0,j=0,$=0,N=0;if(H.charAt(X)===" "){for(;X>0&&H.charAt(X-1)===" ";)X--;for(;F<H.length&&H.charAt(F+1)===" ";)F++}else{let te=M[0],fe=M[0];P.getWidth(te)===0&&(Y++,te--),P.getWidth(fe)===2&&(j++,fe++);const ve=P.getString(fe).length;for(ve>1&&(N+=ve-1,F+=ve-1);te>0&&X>0&&!this._isCharWordSeparator(P.loadCell(te-1,this._workCell));){P.loadCell(te-1,this._workCell);const Z=this._workCell.getChars().length;this._workCell.getWidth()===0?(Y++,te--):Z>1&&($+=Z-1,X-=Z-1),X--,te--}for(;fe<P.length&&F+1<H.length&&!this._isCharWordSeparator(P.loadCell(fe+1,this._workCell));){P.loadCell(fe+1,this._workCell);const Z=this._workCell.getChars().length;this._workCell.getWidth()===2?(j++,fe++):Z>1&&(N+=Z-1,F+=Z-1),F++,fe++}}F++;let U=X+K-Y+$,J=Math.min(this._bufferService.cols,F-X+Y+j-$-N);if(D||H.slice(X,F).trim()!==""){if(k&&U===0&&P.getCodePoint(0)!==32){const te=R.lines.get(M[1]-1);if(te&&P.isWrapped&&te.getCodePoint(this._bufferService.cols-1)!==32){const fe=this._getWordAt([this._bufferService.cols-1,M[1]-1],!1,!0,!1);if(fe){const ve=this._bufferService.cols-fe.start;U-=ve,J+=ve}}}if(B&&U+J===this._bufferService.cols&&P.getCodePoint(this._bufferService.cols-1)!==32){const te=R.lines.get(M[1]+1);if(te!=null&&te.isWrapped&&te.getCodePoint(0)!==32){const fe=this._getWordAt([0,M[1]+1],!1,!1,!0);fe&&(J+=fe.length)}}return{start:U,length:J}}}_selectWordAt(M,D){const k=this._getWordAt(M,D);if(k){for(;k.start<0;)k.start+=this._bufferService.cols,M[1]--;this._model.selectionStart=[k.start,M[1]],this._model.selectionStartLength=k.length}}_selectToWordAt(M){const D=this._getWordAt(M,!0);if(D){let k=M[1];for(;D.start<0;)D.start+=this._bufferService.cols,k--;if(!this._model.areSelectionValuesReversed())for(;D.start+D.length>this._bufferService.cols;)D.length-=this._bufferService.cols,k++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?D.start:D.start+D.length,k]}}_isCharWordSeparator(M){return M.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(M.getChars())>=0}_selectLineAt(M){const D=this._bufferService.buffer.getWrappedRangeForLine(M),k={start:{x:0,y:D.first},end:{x:this._bufferService.cols-1,y:D.last}};this._model.selectionStart=[0,D.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,b.getRangeLength)(k,this._bufferService.cols)}};a.SelectionService=O=f([v(3,E.IBufferService),v(4,E.ICoreService),v(5,C.IMouseService),v(6,E.IOptionsService),v(7,C.IRenderService),v(8,C.ICoreBrowserService)],O)},4725:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ILinkProviderService=a.IThemeService=a.ICharacterJoinerService=a.ISelectionService=a.IRenderService=a.IMouseService=a.ICoreBrowserService=a.ICharSizeService=void 0;const f=c(8343);a.ICharSizeService=(0,f.createDecorator)("CharSizeService"),a.ICoreBrowserService=(0,f.createDecorator)("CoreBrowserService"),a.IMouseService=(0,f.createDecorator)("MouseService"),a.IRenderService=(0,f.createDecorator)("RenderService"),a.ISelectionService=(0,f.createDecorator)("SelectionService"),a.ICharacterJoinerService=(0,f.createDecorator)("CharacterJoinerService"),a.IThemeService=(0,f.createDecorator)("ThemeService"),a.ILinkProviderService=(0,f.createDecorator)("LinkProviderService")},6731:function(g,a,c){var f=this&&this.__decorate||function(O,M,D,k){var B,R=arguments.length,P=R<3?M:k===null?k=Object.getOwnPropertyDescriptor(M,D):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(O,M,D,k);else for(var H=O.length-1;H>=0;H--)(B=O[H])&&(P=(R<3?B(P):R>3?B(M,D,P):B(M,D))||P);return R>3&&P&&Object.defineProperty(M,D,P),P},v=this&&this.__param||function(O,M){return function(D,k){M(D,k,O)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const u=c(7239),m=c(8055),w=c(8460),C=c(844),_=c(2585),d=m.css.toColor("#ffffff"),y=m.css.toColor("#000000"),b=m.css.toColor("#ffffff"),S=m.css.toColor("#000000"),E={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const O=[m.css.toColor("#2e3436"),m.css.toColor("#cc0000"),m.css.toColor("#4e9a06"),m.css.toColor("#c4a000"),m.css.toColor("#3465a4"),m.css.toColor("#75507b"),m.css.toColor("#06989a"),m.css.toColor("#d3d7cf"),m.css.toColor("#555753"),m.css.toColor("#ef2929"),m.css.toColor("#8ae234"),m.css.toColor("#fce94f"),m.css.toColor("#729fcf"),m.css.toColor("#ad7fa8"),m.css.toColor("#34e2e2"),m.css.toColor("#eeeeec")],M=[0,95,135,175,215,255];for(let D=0;D<216;D++){const k=M[D/36%6|0],B=M[D/6%6|0],R=M[D%6];O.push({css:m.channels.toCss(k,B,R),rgba:m.channels.toRgba(k,B,R)})}for(let D=0;D<24;D++){const k=8+10*D;O.push({css:m.channels.toCss(k,k,k),rgba:m.channels.toRgba(k,k,k)})}return O})());let L=a.ThemeService=class extends C.Disposable{get colors(){return this._colors}constructor(O){super(),this._optionsService=O,this._contrastCache=new u.ColorContrastCache,this._halfContrastCache=new u.ColorContrastCache,this._onChangeColors=this.register(new w.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:d,background:y,cursor:b,cursorAccent:S,selectionForeground:void 0,selectionBackgroundTransparent:E,selectionBackgroundOpaque:m.color.blend(y,E),selectionInactiveBackgroundTransparent:E,selectionInactiveBackgroundOpaque:m.color.blend(y,E),ansi:a.DEFAULT_ANSI_COLORS.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))))}_setTheme(O={}){const M=this._colors;if(M.foreground=x(O.foreground,d),M.background=x(O.background,y),M.cursor=x(O.cursor,b),M.cursorAccent=x(O.cursorAccent,S),M.selectionBackgroundTransparent=x(O.selectionBackground,E),M.selectionBackgroundOpaque=m.color.blend(M.background,M.selectionBackgroundTransparent),M.selectionInactiveBackgroundTransparent=x(O.selectionInactiveBackground,M.selectionBackgroundTransparent),M.selectionInactiveBackgroundOpaque=m.color.blend(M.background,M.selectionInactiveBackgroundTransparent),M.selectionForeground=O.selectionForeground?x(O.selectionForeground,m.NULL_COLOR):void 0,M.selectionForeground===m.NULL_COLOR&&(M.selectionForeground=void 0),m.color.isOpaque(M.selectionBackgroundTransparent)&&(M.selectionBackgroundTransparent=m.color.opacity(M.selectionBackgroundTransparent,.3)),m.color.isOpaque(M.selectionInactiveBackgroundTransparent)&&(M.selectionInactiveBackgroundTransparent=m.color.opacity(M.selectionInactiveBackgroundTransparent,.3)),M.ansi=a.DEFAULT_ANSI_COLORS.slice(),M.ansi[0]=x(O.black,a.DEFAULT_ANSI_COLORS[0]),M.ansi[1]=x(O.red,a.DEFAULT_ANSI_COLORS[1]),M.ansi[2]=x(O.green,a.DEFAULT_ANSI_COLORS[2]),M.ansi[3]=x(O.yellow,a.DEFAULT_ANSI_COLORS[3]),M.ansi[4]=x(O.blue,a.DEFAULT_ANSI_COLORS[4]),M.ansi[5]=x(O.magenta,a.DEFAULT_ANSI_COLORS[5]),M.ansi[6]=x(O.cyan,a.DEFAULT_ANSI_COLORS[6]),M.ansi[7]=x(O.white,a.DEFAULT_ANSI_COLORS[7]),M.ansi[8]=x(O.brightBlack,a.DEFAULT_ANSI_COLORS[8]),M.ansi[9]=x(O.brightRed,a.DEFAULT_ANSI_COLORS[9]),M.ansi[10]=x(O.brightGreen,a.DEFAULT_ANSI_COLORS[10]),M.ansi[11]=x(O.brightYellow,a.DEFAULT_ANSI_COLORS[11]),M.ansi[12]=x(O.brightBlue,a.DEFAULT_ANSI_COLORS[12]),M.ansi[13]=x(O.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),M.ansi[14]=x(O.brightCyan,a.DEFAULT_ANSI_COLORS[14]),M.ansi[15]=x(O.brightWhite,a.DEFAULT_ANSI_COLORS[15]),O.extendedAnsi){const D=Math.min(M.ansi.length-16,O.extendedAnsi.length);for(let k=0;k<D;k++)M.ansi[k+16]=x(O.extendedAnsi[k],a.DEFAULT_ANSI_COLORS[k+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(O){this._restoreColor(O),this._onChangeColors.fire(this.colors)}_restoreColor(O){if(O!==void 0)switch(O){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[O]=this._restoreColors.ansi[O]}else for(let M=0;M<this._restoreColors.ansi.length;++M)this._colors.ansi[M]=this._restoreColors.ansi[M]}modifyColors(O){O(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()}}};function x(O,M){if(O!==void 0)try{return m.css.toColor(O)}catch{}return M}a.ThemeService=L=f([v(0,_.IOptionsService)],L)},6349:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const f=c(8460),v=c(844);class u extends v.Disposable{constructor(w){super(),this._maxLength=w,this.onDeleteEmitter=this.register(new f.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new f.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new f.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(w){if(this._maxLength===w)return;const C=new Array(w);for(let _=0;_<Math.min(w,this.length);_++)C[_]=this._array[this._getCyclicIndex(_)];this._array=C,this._maxLength=w,this._startIndex=0}get length(){return this._length}set length(w){if(w>this._length)for(let C=this._length;C<w;C++)this._array[C]=void 0;this._length=w}get(w){return this._array[this._getCyclicIndex(w)]}set(w,C){this._array[this._getCyclicIndex(w)]=C}push(w){this._array[this._getCyclicIndex(this._length)]=w,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(w,C,..._){if(C){for(let d=w;d<this._length-C;d++)this._array[this._getCyclicIndex(d)]=this._array[this._getCyclicIndex(d+C)];this._length-=C,this.onDeleteEmitter.fire({index:w,amount:C})}for(let d=this._length-1;d>=w;d--)this._array[this._getCyclicIndex(d+_.length)]=this._array[this._getCyclicIndex(d)];for(let d=0;d<_.length;d++)this._array[this._getCyclicIndex(w+d)]=_[d];if(_.length&&this.onInsertEmitter.fire({index:w,amount:_.length}),this._length+_.length>this._maxLength){const d=this._length+_.length-this._maxLength;this._startIndex+=d,this._length=this._maxLength,this.onTrimEmitter.fire(d)}else this._length+=_.length}trimStart(w){w>this._length&&(w=this._length),this._startIndex+=w,this._length-=w,this.onTrimEmitter.fire(w)}shiftElements(w,C,_){if(!(C<=0)){if(w<0||w>=this._length)throw new Error("start argument out of range");if(w+_<0)throw new Error("Cannot shift elements in list beyond index 0");if(_>0){for(let y=C-1;y>=0;y--)this.set(w+y+_,this.get(w+y));const d=w+C+_-this._length;if(d>0)for(this._length+=d;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let d=0;d<C;d++)this.set(w+d+_,this.get(w+d))}}_getCyclicIndex(w){return(this._startIndex+w)%this._maxLength}}a.CircularList=u},1439:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function c(f,v=5){if(typeof f!="object")return f;const u=Array.isArray(f)?[]:{};for(const m in f)u[m]=v<=1?f[m]:f[m]&&c(f[m],v-1);return u}},8055:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let c=0,f=0,v=0,u=0;var m,w,C,_,d;function y(S){const E=S.toString(16);return E.length<2?"0"+E:E}function b(S,E){return S<E?(E+.05)/(S+.05):(S+.05)/(E+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(S){S.toCss=function(E,L,x,O){return O!==void 0?`#${y(E)}${y(L)}${y(x)}${y(O)}`:`#${y(E)}${y(L)}${y(x)}`},S.toRgba=function(E,L,x,O=255){return(E<<24|L<<16|x<<8|O)>>>0},S.toColor=function(E,L,x,O){return{css:S.toCss(E,L,x,O),rgba:S.toRgba(E,L,x,O)}}})(m||(a.channels=m={})),(function(S){function E(L,x){return u=Math.round(255*x),[c,f,v]=d.toChannels(L.rgba),{css:m.toCss(c,f,v,u),rgba:m.toRgba(c,f,v,u)}}S.blend=function(L,x){if(u=(255&x.rgba)/255,u===1)return{css:x.css,rgba:x.rgba};const O=x.rgba>>24&255,M=x.rgba>>16&255,D=x.rgba>>8&255,k=L.rgba>>24&255,B=L.rgba>>16&255,R=L.rgba>>8&255;return c=k+Math.round((O-k)*u),f=B+Math.round((M-B)*u),v=R+Math.round((D-R)*u),{css:m.toCss(c,f,v),rgba:m.toRgba(c,f,v)}},S.isOpaque=function(L){return(255&L.rgba)==255},S.ensureContrastRatio=function(L,x,O){const M=d.ensureContrastRatio(L.rgba,x.rgba,O);if(M)return m.toColor(M>>24&255,M>>16&255,M>>8&255)},S.opaque=function(L){const x=(255|L.rgba)>>>0;return[c,f,v]=d.toChannels(x),{css:m.toCss(c,f,v),rgba:x}},S.opacity=E,S.multiplyOpacity=function(L,x){return u=255&L.rgba,E(L,u*x/255)},S.toColorRGB=function(L){return[L.rgba>>24&255,L.rgba>>16&255,L.rgba>>8&255]}})(w||(a.color=w={})),(function(S){let E,L;try{const x=document.createElement("canvas");x.width=1,x.height=1;const O=x.getContext("2d",{willReadFrequently:!0});O&&(E=O,E.globalCompositeOperation="copy",L=E.createLinearGradient(0,0,1,1))}catch{}S.toColor=function(x){if(x.match(/#[\da-f]{3,8}/i))switch(x.length){case 4:return c=parseInt(x.slice(1,2).repeat(2),16),f=parseInt(x.slice(2,3).repeat(2),16),v=parseInt(x.slice(3,4).repeat(2),16),m.toColor(c,f,v);case 5:return c=parseInt(x.slice(1,2).repeat(2),16),f=parseInt(x.slice(2,3).repeat(2),16),v=parseInt(x.slice(3,4).repeat(2),16),u=parseInt(x.slice(4,5).repeat(2),16),m.toColor(c,f,v,u);case 7:return{css:x,rgba:(parseInt(x.slice(1),16)<<8|255)>>>0};case 9:return{css:x,rgba:parseInt(x.slice(1),16)>>>0}}const O=x.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 c=parseInt(O[1]),f=parseInt(O[2]),v=parseInt(O[3]),u=Math.round(255*(O[5]===void 0?1:parseFloat(O[5]))),m.toColor(c,f,v,u);if(!E||!L)throw new Error("css.toColor: Unsupported css format");if(E.fillStyle=L,E.fillStyle=x,typeof E.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(E.fillRect(0,0,1,1),[c,f,v,u]=E.getImageData(0,0,1,1).data,u!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:m.toRgba(c,f,v,u),css:x}}})(C||(a.css=C={})),(function(S){function E(L,x,O){const M=L/255,D=x/255,k=O/255;return .2126*(M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4))+.7152*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.0722*(k<=.03928?k/12.92:Math.pow((k+.055)/1.055,2.4))}S.relativeLuminance=function(L){return E(L>>16&255,L>>8&255,255&L)},S.relativeLuminance2=E})(_||(a.rgb=_={})),(function(S){function E(x,O,M){const D=x>>24&255,k=x>>16&255,B=x>>8&255;let R=O>>24&255,P=O>>16&255,H=O>>8&255,X=b(_.relativeLuminance2(R,P,H),_.relativeLuminance2(D,k,B));for(;X<M&&(R>0||P>0||H>0);)R-=Math.max(0,Math.ceil(.1*R)),P-=Math.max(0,Math.ceil(.1*P)),H-=Math.max(0,Math.ceil(.1*H)),X=b(_.relativeLuminance2(R,P,H),_.relativeLuminance2(D,k,B));return(R<<24|P<<16|H<<8|255)>>>0}function L(x,O,M){const D=x>>24&255,k=x>>16&255,B=x>>8&255;let R=O>>24&255,P=O>>16&255,H=O>>8&255,X=b(_.relativeLuminance2(R,P,H),_.relativeLuminance2(D,k,B));for(;X<M&&(R<255||P<255||H<255);)R=Math.min(255,R+Math.ceil(.1*(255-R))),P=Math.min(255,P+Math.ceil(.1*(255-P))),H=Math.min(255,H+Math.ceil(.1*(255-H))),X=b(_.relativeLuminance2(R,P,H),_.relativeLuminance2(D,k,B));return(R<<24|P<<16|H<<8|255)>>>0}S.blend=function(x,O){if(u=(255&O)/255,u===1)return O;const M=O>>24&255,D=O>>16&255,k=O>>8&255,B=x>>24&255,R=x>>16&255,P=x>>8&255;return c=B+Math.round((M-B)*u),f=R+Math.round((D-R)*u),v=P+Math.round((k-P)*u),m.toRgba(c,f,v)},S.ensureContrastRatio=function(x,O,M){const D=_.relativeLuminance(x>>8),k=_.relativeLuminance(O>>8);if(b(D,k)<M){if(k<D){const P=E(x,O,M),H=b(D,_.relativeLuminance(P>>8));if(H<M){const X=L(x,O,M);return H>b(D,_.relativeLuminance(X>>8))?P:X}return P}const B=L(x,O,M),R=b(D,_.relativeLuminance(B>>8));if(R<M){const P=E(x,O,M);return R>b(D,_.relativeLuminance(P>>8))?B:P}return B}},S.reduceLuminance=E,S.increaseLuminance=L,S.toChannels=function(x){return[x>>24&255,x>>16&255,x>>8&255,255&x]}})(d||(a.rgba=d={})),a.toPaddedHex=y,a.contrastRatio=b},8969:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const f=c(844),v=c(2585),u=c(4348),m=c(7866),w=c(744),C=c(7302),_=c(6975),d=c(8460),y=c(1753),b=c(1480),S=c(7994),E=c(9282),L=c(5435),x=c(5981),O=c(2660);let M=!1;class D extends f.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new d.EventEmitter),this._onScroll.event((B=>{var R;(R=this._onScrollApi)==null||R.fire(B.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(B){for(const R in B)this.optionsService.options[R]=B[R]}constructor(B){super(),this._windowsWrappingHeuristics=this.register(new f.MutableDisposable),this._onBinary=this.register(new d.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new d.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new d.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new d.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new d.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new d.EventEmitter),this._instantiationService=new u.InstantiationService,this.optionsService=this.register(new C.OptionsService(B)),this._instantiationService.setService(v.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(w.BufferService)),this._instantiationService.setService(v.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(m.LogService)),this._instantiationService.setService(v.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(_.CoreService)),this._instantiationService.setService(v.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(y.CoreMouseService)),this._instantiationService.setService(v.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(b.UnicodeService)),this._instantiationService.setService(v.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(S.CharsetService),this._instantiationService.setService(v.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(O.OscLinkService),this._instantiationService.setService(v.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new L.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,d.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,d.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,d.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,d.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((R=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((R=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new x.WriteBuffer(((R,P)=>this._inputHandler.parse(R,P)))),this.register((0,d.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(B,R){this._writeBuffer.write(B,R)}writeSync(B,R){this._logService.logLevel<=v.LogLevelEnum.WARN&&!M&&(this._logService.warn("writeSync is unreliable and will be removed soon."),M=!0),this._writeBuffer.writeSync(B,R)}input(B,R=!0){this.coreService.triggerDataEvent(B,R)}resize(B,R){isNaN(B)||isNaN(R)||(B=Math.max(B,w.MINIMUM_COLS),R=Math.max(R,w.MINIMUM_ROWS),this._bufferService.resize(B,R))}scroll(B,R=!1){this._bufferService.scroll(B,R)}scrollLines(B,R,P){this._bufferService.scrollLines(B,R,P)}scrollPages(B){this.scrollLines(B*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(B){const R=B-this._bufferService.buffer.ydisp;R!==0&&this.scrollLines(R)}registerEscHandler(B,R){return this._inputHandler.registerEscHandler(B,R)}registerDcsHandler(B,R){return this._inputHandler.registerDcsHandler(B,R)}registerCsiHandler(B,R){return this._inputHandler.registerCsiHandler(B,R)}registerOscHandler(B,R){return this._inputHandler.registerOscHandler(B,R)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let B=!1;const R=this.optionsService.rawOptions.windowsPty;R&&R.buildNumber!==void 0&&R.buildNumber!==void 0?B=R.backend==="conpty"&&R.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(B=!0),B?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const B=[];B.push(this.onLineFeed(E.updateWindowsModeWrappedState.bind(null,this._bufferService))),B.push(this.registerCsiHandler({final:"H"},(()=>((0,E.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,f.toDisposable)((()=>{for(const R of B)R.dispose()}))}}}a.CoreTerminal=D},8460:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===c)return void this._listeners.splice(f,1)}}})),this._event}fire(c,f){const v=[];for(let u=0;u<this._listeners.length;u++)v.push(this._listeners[u]);for(let u=0;u<v.length;u++)v[u].call(void 0,c,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(c,f){return c((v=>f.fire(v)))},a.runAndSubscribe=function(c,f){return f(void 0),c((v=>f(v)))}},5435:function(g,a,c){var f=this&&this.__decorate||function(Y,j,$,N){var U,J=arguments.length,te=J<3?j:N===null?N=Object.getOwnPropertyDescriptor(j,$):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")te=Reflect.decorate(Y,j,$,N);else for(var fe=Y.length-1;fe>=0;fe--)(U=Y[fe])&&(te=(J<3?U(te):J>3?U(j,$,te):U(j,$))||te);return J>3&&te&&Object.defineProperty(j,$,te),te},v=this&&this.__param||function(Y,j){return function($,N){j($,N,Y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const u=c(2584),m=c(7116),w=c(2015),C=c(844),_=c(482),d=c(8437),y=c(8460),b=c(643),S=c(511),E=c(3734),L=c(2585),x=c(1480),O=c(6242),M=c(6351),D=c(5941),k={"(":0,")":1,"*":2,"+":3,"-":1,".":2},B=131072;function R(Y,j){if(Y>24)return j.setWinLines||!1;switch(Y){case 1:return!!j.restoreWin;case 2:return!!j.minimizeWin;case 3:return!!j.setWinPosition;case 4:return!!j.setWinSizePixels;case 5:return!!j.raiseWin;case 6:return!!j.lowerWin;case 7:return!!j.refreshWin;case 8:return!!j.setWinSizeChars;case 9:return!!j.maximizeWin;case 10:return!!j.fullscreenWin;case 11:return!!j.getWinState;case 13:return!!j.getWinPosition;case 14:return!!j.getWinSizePixels;case 15:return!!j.getScreenSizePixels;case 16:return!!j.getCellSizePixels;case 18:return!!j.getWinSizeChars;case 19:return!!j.getScreenSizeChars;case 20:return!!j.getIconTitle;case 21:return!!j.getWinTitle;case 22:return!!j.pushTitle;case 23:return!!j.popTitle;case 24:return!!j.setWinLines}return!1}var P;(function(Y){Y[Y.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",Y[Y.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(P||(a.WindowsOptionsReportType=P={}));let H=0;class X extends C.Disposable{getAttrData(){return this._curAttrData}constructor(j,$,N,U,J,te,fe,ve,Z=new w.EscapeSequenceParser){super(),this._bufferService=j,this._charsetService=$,this._coreService=N,this._logService=U,this._optionsService=J,this._oscLinkService=te,this._coreMouseService=fe,this._unicodeService=ve,this._parser=Z,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new _.StringToUtf32,this._utf8Decoder=new _.Utf8ToUtf32,this._workCell=new S.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=d.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=d.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new y.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new y.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new y.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new y.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new y.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new y.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new y.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new y.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new y.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new y.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new y.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new y.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new y.EventEmitter),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 F(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((W=>this._activeBuffer=W.activeBuffer))),this._parser.setCsiHandlerFallback(((W,V)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(W),params:V.toArray()})})),this._parser.setEscHandlerFallback((W=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(W)})})),this._parser.setExecuteHandlerFallback((W=>{this._logService.debug("Unknown EXECUTE code: ",{code:W})})),this._parser.setOscHandlerFallback(((W,V,ee)=>{this._logService.debug("Unknown OSC code: ",{identifier:W,action:V,data:ee})})),this._parser.setDcsHandlerFallback(((W,V,ee)=>{V==="HOOK"&&(ee=ee.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(W),action:V,payload:ee})})),this._parser.setPrintHandler(((W,V,ee)=>this.print(W,V,ee))),this._parser.registerCsiHandler({final:"@"},(W=>this.insertChars(W))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(W=>this.scrollLeft(W))),this._parser.registerCsiHandler({final:"A"},(W=>this.cursorUp(W))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(W=>this.scrollRight(W))),this._parser.registerCsiHandler({final:"B"},(W=>this.cursorDown(W))),this._parser.registerCsiHandler({final:"C"},(W=>this.cursorForward(W))),this._parser.registerCsiHandler({final:"D"},(W=>this.cursorBackward(W))),this._parser.registerCsiHandler({final:"E"},(W=>this.cursorNextLine(W))),this._parser.registerCsiHandler({final:"F"},(W=>this.cursorPrecedingLine(W))),this._parser.registerCsiHandler({final:"G"},(W=>this.cursorCharAbsolute(W))),this._parser.registerCsiHandler({final:"H"},(W=>this.cursorPosition(W))),this._parser.registerCsiHandler({final:"I"},(W=>this.cursorForwardTab(W))),this._parser.registerCsiHandler({final:"J"},(W=>this.eraseInDisplay(W,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(W=>this.eraseInDisplay(W,!0))),this._parser.registerCsiHandler({final:"K"},(W=>this.eraseInLine(W,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(W=>this.eraseInLine(W,!0))),this._parser.registerCsiHandler({final:"L"},(W=>this.insertLines(W))),this._parser.registerCsiHandler({final:"M"},(W=>this.deleteLines(W))),this._parser.registerCsiHandler({final:"P"},(W=>this.deleteChars(W))),this._parser.registerCsiHandler({final:"S"},(W=>this.scrollUp(W))),this._parser.registerCsiHandler({final:"T"},(W=>this.scrollDown(W))),this._parser.registerCsiHandler({final:"X"},(W=>this.eraseChars(W))),this._parser.registerCsiHandler({final:"Z"},(W=>this.cursorBackwardTab(W))),this._parser.registerCsiHandler({final:"`"},(W=>this.charPosAbsolute(W))),this._parser.registerCsiHandler({final:"a"},(W=>this.hPositionRelative(W))),this._parser.registerCsiHandler({final:"b"},(W=>this.repeatPrecedingCharacter(W))),this._parser.registerCsiHandler({final:"c"},(W=>this.sendDeviceAttributesPrimary(W))),this._parser.registerCsiHandler({prefix:">",final:"c"},(W=>this.sendDeviceAttributesSecondary(W))),this._parser.registerCsiHandler({final:"d"},(W=>this.linePosAbsolute(W))),this._parser.registerCsiHandler({final:"e"},(W=>this.vPositionRelative(W))),this._parser.registerCsiHandler({final:"f"},(W=>this.hVPosition(W))),this._parser.registerCsiHandler({final:"g"},(W=>this.tabClear(W))),this._parser.registerCsiHandler({final:"h"},(W=>this.setMode(W))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(W=>this.setModePrivate(W))),this._parser.registerCsiHandler({final:"l"},(W=>this.resetMode(W))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(W=>this.resetModePrivate(W))),this._parser.registerCsiHandler({final:"m"},(W=>this.charAttributes(W))),this._parser.registerCsiHandler({final:"n"},(W=>this.deviceStatus(W))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(W=>this.deviceStatusPrivate(W))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(W=>this.softReset(W))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(W=>this.setCursorStyle(W))),this._parser.registerCsiHandler({final:"r"},(W=>this.setScrollRegion(W))),this._parser.registerCsiHandler({final:"s"},(W=>this.saveCursor(W))),this._parser.registerCsiHandler({final:"t"},(W=>this.windowOptions(W))),this._parser.registerCsiHandler({final:"u"},(W=>this.restoreCursor(W))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(W=>this.insertColumns(W))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(W=>this.deleteColumns(W))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(W=>this.selectProtected(W))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(W=>this.requestMode(W,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(W=>this.requestMode(W,!1))),this._parser.setExecuteHandler(u.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(u.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(u.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(u.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(u.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(u.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(u.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(u.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(u.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(u.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(u.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(u.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new O.OscHandler((W=>(this.setTitle(W),this.setIconName(W),!0)))),this._parser.registerOscHandler(1,new O.OscHandler((W=>this.setIconName(W)))),this._parser.registerOscHandler(2,new O.OscHandler((W=>this.setTitle(W)))),this._parser.registerOscHandler(4,new O.OscHandler((W=>this.setOrReportIndexedColor(W)))),this._parser.registerOscHandler(8,new O.OscHandler((W=>this.setHyperlink(W)))),this._parser.registerOscHandler(10,new O.OscHandler((W=>this.setOrReportFgColor(W)))),this._parser.registerOscHandler(11,new O.OscHandler((W=>this.setOrReportBgColor(W)))),this._parser.registerOscHandler(12,new O.OscHandler((W=>this.setOrReportCursorColor(W)))),this._parser.registerOscHandler(104,new O.OscHandler((W=>this.restoreIndexedColor(W)))),this._parser.registerOscHandler(110,new O.OscHandler((W=>this.restoreFgColor(W)))),this._parser.registerOscHandler(111,new O.OscHandler((W=>this.restoreBgColor(W)))),this._parser.registerOscHandler(112,new O.OscHandler((W=>this.restoreCursorColor(W)))),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(const W in m.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:W},(()=>this.selectCharset("("+W))),this._parser.registerEscHandler({intermediates:")",final:W},(()=>this.selectCharset(")"+W))),this._parser.registerEscHandler({intermediates:"*",final:W},(()=>this.selectCharset("*"+W))),this._parser.registerEscHandler({intermediates:"+",final:W},(()=>this.selectCharset("+"+W))),this._parser.registerEscHandler({intermediates:"-",final:W},(()=>this.selectCharset("-"+W))),this._parser.registerEscHandler({intermediates:".",final:W},(()=>this.selectCharset("."+W))),this._parser.registerEscHandler({intermediates:"/",final:W},(()=>this.selectCharset("/"+W)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((W=>(this._logService.error("Parsing error: ",W),W))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new M.DcsHandler(((W,V)=>this.requestStatusString(W,V))))}_preserveStack(j,$,N,U){this._parseStack.paused=!0,this._parseStack.cursorStartX=j,this._parseStack.cursorStartY=$,this._parseStack.decodedLength=N,this._parseStack.position=U}_logSlowResolvingAsync(j){this._logService.logLevel<=L.LogLevelEnum.WARN&&Promise.race([j,new Promise((($,N)=>setTimeout((()=>N("#SLOW_TIMEOUT")),5e3)))]).catch(($=>{if($!=="#SLOW_TIMEOUT")throw $;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(j,$){let N,U=this._activeBuffer.x,J=this._activeBuffer.y,te=0;const fe=this._parseStack.paused;if(fe){if(N=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,$))return this._logSlowResolvingAsync(N),N;U=this._parseStack.cursorStartX,J=this._parseStack.cursorStartY,this._parseStack.paused=!1,j.length>B&&(te=this._parseStack.position+B)}if(this._logService.logLevel<=L.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof j=="string"?` "${j}"`:` "${Array.prototype.map.call(j,(W=>String.fromCharCode(W))).join("")}"`),typeof j=="string"?j.split("").map((W=>W.charCodeAt(0))):j),this._parseBuffer.length<j.length&&this._parseBuffer.length<B&&(this._parseBuffer=new Uint32Array(Math.min(j.length,B))),fe||this._dirtyRowTracker.clearRange(),j.length>B)for(let W=te;W<j.length;W+=B){const V=W+B<j.length?W+B:j.length,ee=typeof j=="string"?this._stringDecoder.decode(j.substring(W,V),this._parseBuffer):this._utf8Decoder.decode(j.subarray(W,V),this._parseBuffer);if(N=this._parser.parse(this._parseBuffer,ee))return this._preserveStack(U,J,ee,W),this._logSlowResolvingAsync(N),N}else if(!fe){const W=typeof j=="string"?this._stringDecoder.decode(j,this._parseBuffer):this._utf8Decoder.decode(j,this._parseBuffer);if(N=this._parser.parse(this._parseBuffer,W))return this._preserveStack(U,J,W,0),this._logSlowResolvingAsync(N),N}this._activeBuffer.x===U&&this._activeBuffer.y===J||this._onCursorMove.fire();const ve=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),Z=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);Z<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(Z,this._bufferService.rows-1),Math.min(ve,this._bufferService.rows-1))}print(j,$,N){let U,J;const te=this._charsetService.charset,fe=this._optionsService.rawOptions.screenReaderMode,ve=this._bufferService.cols,Z=this._coreService.decPrivateModes.wraparound,W=this._coreService.modes.insertMode,V=this._curAttrData;let ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&N-$>0&&ee.getWidth(this._activeBuffer.x-1)===2&&ee.setCellFromCodepoint(this._activeBuffer.x-1,0,1,V);let ue=this._parser.precedingJoinState;for(let ie=$;ie<N;++ie){if(U=j[ie],U<127&&te){const ke=te[String.fromCharCode(U)];ke&&(U=ke.charCodeAt(0))}const me=this._unicodeService.charProperties(U,ue);J=x.UnicodeService.extractWidth(me);const de=x.UnicodeService.extractShouldJoin(me),Me=de?x.UnicodeService.extractWidth(ue):0;if(ue=me,fe&&this._onA11yChar.fire((0,_.stringFromCodePoint)(U)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+J-Me>ve){if(Z){const ke=ee;let Ce=this._activeBuffer.x-Me;for(this._activeBuffer.x=Me,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),ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Me>0&&ee instanceof d.BufferLine&&ee.copyCellsFrom(ke,Ce,0,Me,!1);Ce<ve;)ke.setCellFromCodepoint(Ce++,0,1,V)}else if(this._activeBuffer.x=ve-1,J===2)continue}if(de&&this._activeBuffer.x){const ke=ee.getWidth(this._activeBuffer.x-1)?1:2;ee.addCodepointToCell(this._activeBuffer.x-ke,U,J);for(let Ce=J-Me;--Ce>=0;)ee.setCellFromCodepoint(this._activeBuffer.x++,0,0,V)}else if(W&&(ee.insertCells(this._activeBuffer.x,J-Me,this._activeBuffer.getNullCell(V)),ee.getWidth(ve-1)===2&&ee.setCellFromCodepoint(ve-1,b.NULL_CELL_CODE,b.NULL_CELL_WIDTH,V)),ee.setCellFromCodepoint(this._activeBuffer.x++,U,J,V),J>0)for(;--J;)ee.setCellFromCodepoint(this._activeBuffer.x++,0,0,V)}this._parser.precedingJoinState=ue,this._activeBuffer.x<ve&&N-$>0&&ee.getWidth(this._activeBuffer.x)===0&&!ee.hasContent(this._activeBuffer.x)&&ee.setCellFromCodepoint(this._activeBuffer.x,0,1,V),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(j,$){return j.final!=="t"||j.prefix||j.intermediates?this._parser.registerCsiHandler(j,$):this._parser.registerCsiHandler(j,(N=>!R(N.params[0],this._optionsService.rawOptions.windowOptions)||$(N)))}registerDcsHandler(j,$){return this._parser.registerDcsHandler(j,new M.DcsHandler($))}registerEscHandler(j,$){return this._parser.registerEscHandler(j,$)}registerOscHandler(j,$){return this._parser.registerOscHandler(j,new O.OscHandler($))}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 j;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&&((j=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&j.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const $=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);$.hasWidth(this._activeBuffer.x)&&!$.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const j=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-j),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(j=this._bufferService.cols-1){this._activeBuffer.x=Math.min(j,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(j,$){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=j,this._activeBuffer.y=this._activeBuffer.scrollTop+$):(this._activeBuffer.x=j,this._activeBuffer.y=$),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(j,$){this._restrictCursor(),this._setCursor(this._activeBuffer.x+j,this._activeBuffer.y+$)}cursorUp(j){const $=this._activeBuffer.y-this._activeBuffer.scrollTop;return $>=0?this._moveCursor(0,-Math.min($,j.params[0]||1)):this._moveCursor(0,-(j.params[0]||1)),!0}cursorDown(j){const $=this._activeBuffer.scrollBottom-this._activeBuffer.y;return $>=0?this._moveCursor(0,Math.min($,j.params[0]||1)):this._moveCursor(0,j.params[0]||1),!0}cursorForward(j){return this._moveCursor(j.params[0]||1,0),!0}cursorBackward(j){return this._moveCursor(-(j.params[0]||1),0),!0}cursorNextLine(j){return this.cursorDown(j),this._activeBuffer.x=0,!0}cursorPrecedingLine(j){return this.cursorUp(j),this._activeBuffer.x=0,!0}cursorCharAbsolute(j){return this._setCursor((j.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(j){return this._setCursor(j.length>=2?(j.params[1]||1)-1:0,(j.params[0]||1)-1),!0}charPosAbsolute(j){return this._setCursor((j.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(j){return this._moveCursor(j.params[0]||1,0),!0}linePosAbsolute(j){return this._setCursor(this._activeBuffer.x,(j.params[0]||1)-1),!0}vPositionRelative(j){return this._moveCursor(0,j.params[0]||1),!0}hVPosition(j){return this.cursorPosition(j),!0}tabClear(j){const $=j.params[0];return $===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:$===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(j){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let $=j.params[0]||1;for(;$--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(j){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let $=j.params[0]||1;for(;$--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(j){const $=j.params[0];return $===1&&(this._curAttrData.bg|=536870912),$!==2&&$!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(j,$,N,U=!1,J=!1){const te=this._activeBuffer.lines.get(this._activeBuffer.ybase+j);te.replaceCells($,N,this._activeBuffer.getNullCell(this._eraseAttrData()),J),U&&(te.isWrapped=!1)}_resetBufferLine(j,$=!1){const N=this._activeBuffer.lines.get(this._activeBuffer.ybase+j);N&&(N.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),$),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+j),N.isWrapped=!1)}eraseInDisplay(j,$=!1){let N;switch(this._restrictCursor(this._bufferService.cols),j.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,$);N<this._bufferService.rows;N++)this._resetBufferLine(N,$);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,$),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(N+1).isWrapped=!1);N--;)this._resetBufferLine(N,$);this._dirtyRowTracker.markDirty(0);break;case 2:for(N=this._bufferService.rows,this._dirtyRowTracker.markDirty(N-1);N--;)this._resetBufferLine(N,$);this._dirtyRowTracker.markDirty(0);break;case 3:const U=this._activeBuffer.lines.length-this._bufferService.rows;U>0&&(this._activeBuffer.lines.trimStart(U),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-U,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-U,0),this._onScroll.fire(0))}return!0}eraseInLine(j,$=!1){switch(this._restrictCursor(this._bufferService.cols),j.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,$);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,$);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,$)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(j){this._restrictCursor();let $=j.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const N=this._activeBuffer.ybase+this._activeBuffer.y,U=this._bufferService.rows-1-this._activeBuffer.scrollBottom,J=this._bufferService.rows-1+this._activeBuffer.ybase-U+1;for(;$--;)this._activeBuffer.lines.splice(J-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(j){this._restrictCursor();let $=j.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const N=this._activeBuffer.ybase+this._activeBuffer.y;let U;for(U=this._bufferService.rows-1-this._activeBuffer.scrollBottom,U=this._bufferService.rows-1+this._activeBuffer.ybase-U;$--;)this._activeBuffer.lines.splice(N,1),this._activeBuffer.lines.splice(U,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(j){this._restrictCursor();const $=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return $&&($.insertCells(this._activeBuffer.x,j.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(j){this._restrictCursor();const $=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return $&&($.deleteCells(this._activeBuffer.x,j.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(j){let $=j.params[0]||1;for(;$--;)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(j){let $=j.params[0]||1;for(;$--;)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(d.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(j){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const $=j.params[0]||1;for(let N=this._activeBuffer.scrollTop;N<=this._activeBuffer.scrollBottom;++N){const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+N);U.deleteCells(0,$,this._activeBuffer.getNullCell(this._eraseAttrData())),U.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(j){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const $=j.params[0]||1;for(let N=this._activeBuffer.scrollTop;N<=this._activeBuffer.scrollBottom;++N){const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+N);U.insertCells(0,$,this._activeBuffer.getNullCell(this._eraseAttrData())),U.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(j){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const $=j.params[0]||1;for(let N=this._activeBuffer.scrollTop;N<=this._activeBuffer.scrollBottom;++N){const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+N);U.insertCells(this._activeBuffer.x,$,this._activeBuffer.getNullCell(this._eraseAttrData())),U.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(j){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const $=j.params[0]||1;for(let N=this._activeBuffer.scrollTop;N<=this._activeBuffer.scrollBottom;++N){const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+N);U.deleteCells(this._activeBuffer.x,$,this._activeBuffer.getNullCell(this._eraseAttrData())),U.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(j){this._restrictCursor();const $=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return $&&($.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(j.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(j){const $=this._parser.precedingJoinState;if(!$)return!0;const N=j.params[0]||1,U=x.UnicodeService.extractWidth($),J=this._activeBuffer.x-U,te=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(J),fe=new Uint32Array(te.length*N);let ve=0;for(let W=0;W<te.length;){const V=te.codePointAt(W)||0;fe[ve++]=V,W+=V>65535?2:1}let Z=ve;for(let W=1;W<N;++W)fe.copyWithin(Z,0,ve),Z+=ve;return this.print(fe,0,Z),!0}sendDeviceAttributesPrimary(j){return j.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(u.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(u.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(j){return j.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(u.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(u.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(j.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(u.C0.ESC+"[>83;40003;0c")),!0}_is(j){return(this._optionsService.rawOptions.termName+"").indexOf(j)===0}setMode(j){for(let $=0;$<j.length;$++)switch(j.params[$]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(j){for(let $=0;$<j.length;$++)switch(j.params[$]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,m.DEFAULT_CHARSET),this._charsetService.setgCharset(1,m.DEFAULT_CHARSET),this._charsetService.setgCharset(2,m.DEFAULT_CHARSET),this._charsetService.setgCharset(3,m.DEFAULT_CHARSET);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(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(j){for(let $=0;$<j.length;$++)switch(j.params[$]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(j){for(let $=0;$<j.length;$++)switch(j.params[$]){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:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),j.params[$]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(j,$){const N=this._coreService.decPrivateModes,{activeProtocol:U,activeEncoding:J}=this._coreMouseService,te=this._coreService,{buffers:fe,cols:ve}=this._bufferService,{active:Z,alt:W}=fe,V=this._optionsService.rawOptions,ee=de=>de?1:2,ue=j.params[0];return ie=ue,me=$?ue===2?4:ue===4?ee(te.modes.insertMode):ue===12?3:ue===20?ee(V.convertEol):0:ue===1?ee(N.applicationCursorKeys):ue===3?V.windowOptions.setWinLines?ve===80?2:ve===132?1:0:0:ue===6?ee(N.origin):ue===7?ee(N.wraparound):ue===8?3:ue===9?ee(U==="X10"):ue===12?ee(V.cursorBlink):ue===25?ee(!te.isCursorHidden):ue===45?ee(N.reverseWraparound):ue===66?ee(N.applicationKeypad):ue===67?4:ue===1e3?ee(U==="VT200"):ue===1002?ee(U==="DRAG"):ue===1003?ee(U==="ANY"):ue===1004?ee(N.sendFocus):ue===1005?4:ue===1006?ee(J==="SGR"):ue===1015?4:ue===1016?ee(J==="SGR_PIXELS"):ue===1048?1:ue===47||ue===1047||ue===1049?ee(Z===W):ue===2004?ee(N.bracketedPasteMode):0,te.triggerDataEvent(`${u.C0.ESC}[${$?"":"?"}${ie};${me}$y`),!0;var ie,me}_updateAttrColor(j,$,N,U,J){return $===2?(j|=50331648,j&=-16777216,j|=E.AttributeData.fromColorRGB([N,U,J])):$===5&&(j&=-50331904,j|=33554432|255&N),j}_extractColor(j,$,N){const U=[0,0,-1,0,0,0];let J=0,te=0;do{if(U[te+J]=j.params[$+te],j.hasSubParams($+te)){const fe=j.getSubParams($+te);let ve=0;do U[1]===5&&(J=1),U[te+ve+1+J]=fe[ve];while(++ve<fe.length&&ve+te+1+J<U.length);break}if(U[1]===5&&te+J>=2||U[1]===2&&te+J>=5)break;U[1]&&(J=1)}while(++te+$<j.length&&te+J<U.length);for(let fe=2;fe<U.length;++fe)U[fe]===-1&&(U[fe]=0);switch(U[0]){case 38:N.fg=this._updateAttrColor(N.fg,U[1],U[3],U[4],U[5]);break;case 48:N.bg=this._updateAttrColor(N.bg,U[1],U[3],U[4],U[5]);break;case 58:N.extended=N.extended.clone(),N.extended.underlineColor=this._updateAttrColor(N.extended.underlineColor,U[1],U[3],U[4],U[5])}return te}_processUnderline(j,$){$.extended=$.extended.clone(),(!~j||j>5)&&(j=1),$.extended.underlineStyle=j,$.fg|=268435456,j===0&&($.fg&=-268435457),$.updateExtended()}_processSGR0(j){j.fg=d.DEFAULT_ATTR_DATA.fg,j.bg=d.DEFAULT_ATTR_DATA.bg,j.extended=j.extended.clone(),j.extended.underlineStyle=0,j.extended.underlineColor&=-67108864,j.updateExtended()}charAttributes(j){if(j.length===1&&j.params[0]===0)return this._processSGR0(this._curAttrData),!0;const $=j.length;let N;const U=this._curAttrData;for(let J=0;J<$;J++)N=j.params[J],N>=30&&N<=37?(U.fg&=-50331904,U.fg|=16777216|N-30):N>=40&&N<=47?(U.bg&=-50331904,U.bg|=16777216|N-40):N>=90&&N<=97?(U.fg&=-50331904,U.fg|=16777224|N-90):N>=100&&N<=107?(U.bg&=-50331904,U.bg|=16777224|N-100):N===0?this._processSGR0(U):N===1?U.fg|=134217728:N===3?U.bg|=67108864:N===4?(U.fg|=268435456,this._processUnderline(j.hasSubParams(J)?j.getSubParams(J)[0]:1,U)):N===5?U.fg|=536870912:N===7?U.fg|=67108864:N===8?U.fg|=1073741824:N===9?U.fg|=2147483648:N===2?U.bg|=134217728:N===21?this._processUnderline(2,U):N===22?(U.fg&=-134217729,U.bg&=-134217729):N===23?U.bg&=-67108865:N===24?(U.fg&=-268435457,this._processUnderline(0,U)):N===25?U.fg&=-536870913:N===27?U.fg&=-67108865:N===28?U.fg&=-1073741825:N===29?U.fg&=2147483647:N===39?(U.fg&=-67108864,U.fg|=16777215&d.DEFAULT_ATTR_DATA.fg):N===49?(U.bg&=-67108864,U.bg|=16777215&d.DEFAULT_ATTR_DATA.bg):N===38||N===48||N===58?J+=this._extractColor(j,J,U):N===53?U.bg|=1073741824:N===55?U.bg&=-1073741825:N===59?(U.extended=U.extended.clone(),U.extended.underlineColor=-1,U.updateExtended()):N===100?(U.fg&=-67108864,U.fg|=16777215&d.DEFAULT_ATTR_DATA.fg,U.bg&=-67108864,U.bg|=16777215&d.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",N);return!0}deviceStatus(j){switch(j.params[0]){case 5:this._coreService.triggerDataEvent(`${u.C0.ESC}[0n`);break;case 6:const $=this._activeBuffer.y+1,N=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[${$};${N}R`)}return!0}deviceStatusPrivate(j){if(j.params[0]===6){const $=this._activeBuffer.y+1,N=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[?${$};${N}R`)}return!0}softReset(j){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=d.DEFAULT_ATTR_DATA.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(j){const $=j.params[0]||1;switch($){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const N=$%2==1;return this._optionsService.options.cursorBlink=N,!0}setScrollRegion(j){const $=j.params[0]||1;let N;return(j.length<2||(N=j.params[1])>this._bufferService.rows||N===0)&&(N=this._bufferService.rows),N>$&&(this._activeBuffer.scrollTop=$-1,this._activeBuffer.scrollBottom=N-1,this._setCursor(0,0)),!0}windowOptions(j){if(!R(j.params[0],this._optionsService.rawOptions.windowOptions))return!0;const $=j.length>1?j.params[1]:0;switch(j.params[0]){case 14:$!==2&&this._onRequestWindowsOptionsReport.fire(P.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(P.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${u.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:$!==0&&$!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),$!==0&&$!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:$!==0&&$!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),$!==0&&$!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(j){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(j){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(j){return this._windowTitle=j,this._onTitleChange.fire(j),!0}setIconName(j){return this._iconName=j,!0}setOrReportIndexedColor(j){const $=[],N=j.split(";");for(;N.length>1;){const U=N.shift(),J=N.shift();if(/^\d+$/.exec(U)){const te=parseInt(U);if(K(te))if(J==="?")$.push({type:0,index:te});else{const fe=(0,D.parseColor)(J);fe&&$.push({type:1,index:te,color:fe})}}}return $.length&&this._onColor.fire($),!0}setHyperlink(j){const $=j.split(";");return!($.length<2)&&($[1]?this._createHyperlink($[0],$[1]):!$[0]&&this._finishHyperlink())}_createHyperlink(j,$){this._getCurrentLinkId()&&this._finishHyperlink();const N=j.split(":");let U;const J=N.findIndex((te=>te.startsWith("id=")));return J!==-1&&(U=N[J].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:U,uri:$}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(j,$){const N=j.split(";");for(let U=0;U<N.length&&!($>=this._specialColors.length);++U,++$)if(N[U]==="?")this._onColor.fire([{type:0,index:this._specialColors[$]}]);else{const J=(0,D.parseColor)(N[U]);J&&this._onColor.fire([{type:1,index:this._specialColors[$],color:J}])}return!0}setOrReportFgColor(j){return this._setOrReportSpecialColor(j,0)}setOrReportBgColor(j){return this._setOrReportSpecialColor(j,1)}setOrReportCursorColor(j){return this._setOrReportSpecialColor(j,2)}restoreIndexedColor(j){if(!j)return this._onColor.fire([{type:2}]),!0;const $=[],N=j.split(";");for(let U=0;U<N.length;++U)if(/^\d+$/.exec(N[U])){const J=parseInt(N[U]);K(J)&&$.push({type:2,index:J})}return $.length&&this._onColor.fire($),!0}restoreFgColor(j){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(j){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(j){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,m.DEFAULT_CHARSET),!0}selectCharset(j){return j.length!==2?(this.selectDefaultCharset(),!0):(j[0]==="/"||this._charsetService.setgCharset(k[j[0]],m.CHARSETS[j[1]]||m.DEFAULT_CHARSET),!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){const j=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,j,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=d.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=d.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(j){return this._charsetService.setgLevel(j),!0}screenAlignmentPattern(){const j=new S.CellData;j.content=4194373,j.fg=this._curAttrData.fg,j.bg=this._curAttrData.bg,this._setCursor(0,0);for(let $=0;$<this._bufferService.rows;++$){const N=this._activeBuffer.ybase+this._activeBuffer.y+$,U=this._activeBuffer.lines.get(N);U&&(U.fill(j),U.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(j,$){const N=this._bufferService.buffer,U=this._optionsService.rawOptions;return(J=>(this._coreService.triggerDataEvent(`${u.C0.ESC}${J}${u.C0.ESC}\\`),!0))(j==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:j==='"p'?'P1$r61;1"p':j==="r"?`P1$r${N.scrollTop+1};${N.scrollBottom+1}r`:j==="m"?"P1$r0m":j===" q"?`P1$r${{block:2,underline:4,bar:6}[U.cursorStyle]-(U.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(j,$){this._dirtyRowTracker.markRangeDirty(j,$)}}a.InputHandler=X;let F=class{constructor(Y){this._bufferService=Y,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(Y){Y<this.start?this.start=Y:Y>this.end&&(this.end=Y)}markRangeDirty(Y,j){Y>j&&(H=Y,Y=j,j=H),Y<this.start&&(this.start=Y),j>this.end&&(this.end=j)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function K(Y){return 0<=Y&&Y<256}F=f([v(0,L.IBufferService)],F)},844:(g,a)=>{function c(f){for(const v of f)v.dispose();f.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const v=this._disposables.indexOf(f);v!==-1&&this._disposables.splice(v,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(f){var v;this._isDisposed||f===this._value||((v=this._value)==null||v.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)==null||f.dispose(),this._value=void 0}},a.toDisposable=function(f){return{dispose:f}},a.disposeArray=c,a.getDisposeArrayDisposable=function(f){return{dispose:()=>c(f)}}},1505:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(v,u,m){this._data[v]||(this._data[v]={}),this._data[v][u]=m}get(v,u){return this._data[v]?this._data[v][u]:void 0}clear(){this._data={}}}a.TwoKeyMap=c,a.FourKeyMap=class{constructor(){this._data=new c}set(f,v,u,m,w){this._data.get(f,v)||this._data.set(f,v,new c),this._data.get(f,v).set(u,m,w)}get(f,v,u,m){var w;return(w=this._data.get(f,v))==null?void 0:w.get(u,m)}clear(){this._data.clear()}}},6114:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const c=a.isNode?"node":navigator.userAgent,f=a.isNode?"node":navigator.platform;a.isFirefox=c.includes("Firefox"),a.isLegacyEdge=c.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(c),a.getSafariVersion=function(){if(!a.isSafari)return 0;const v=c.match(/Version\/(\d+)/);return v===null||v.length<2?0:parseInt(v[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),a.isIpad=f==="iPad",a.isIphone=f==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),a.isLinux=f.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(c)},6106:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let c=0;a.SortedList=class{constructor(f){this._getKey=f,this._array=[]}clear(){this._array.length=0}insert(f){this._array.length!==0?(c=this._search(this._getKey(f)),this._array.splice(c,0,f)):this._array.push(f)}delete(f){if(this._array.length===0)return!1;const v=this._getKey(f);if(v===void 0||(c=this._search(v),c===-1)||this._getKey(this._array[c])!==v)return!1;do if(this._array[c]===f)return this._array.splice(c,1),!0;while(++c<this._array.length&&this._getKey(this._array[c])===v);return!1}*getKeyIterator(f){if(this._array.length!==0&&(c=this._search(f),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===f))do yield this._array[c];while(++c<this._array.length&&this._getKey(this._array[c])===f)}forEachByKey(f,v){if(this._array.length!==0&&(c=this._search(f),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===f))do v(this._array[c]);while(++c<this._array.length&&this._getKey(this._array[c])===f)}values(){return[...this._array].values()}_search(f){let v=0,u=this._array.length-1;for(;u>=v;){let m=v+u>>1;const w=this._getKey(this._array[m]);if(w>f)u=m-1;else{if(!(w<f)){for(;m>0&&this._getKey(this._array[m-1])===f;)m--;return m}v=m+1}}return v}}},7226:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const f=c(6114);class v{constructor(){this._tasks=[],this._i=0}enqueue(w){this._tasks.push(w),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(w){this._idleCallback=void 0;let C=0,_=0,d=w.timeRemaining(),y=0;for(;this._i<this._tasks.length;){if(C=Date.now(),this._tasks[this._i]()||this._i++,C=Math.max(1,Date.now()-C),_=Math.max(C,_),y=w.timeRemaining(),1.5*_>y)return d-C<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(d-C))}ms`),void this._start();d=y}this.clear()}}class u extends v{_requestCallback(w){return setTimeout((()=>w(this._createDeadline(16))))}_cancelCallback(w){clearTimeout(w)}_createDeadline(w){const C=Date.now()+w;return{timeRemaining:()=>Math.max(0,C-Date.now())}}}a.PriorityTaskQueue=u,a.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends v{_requestCallback(m){return requestIdleCallback(m)}_cancelCallback(m){cancelIdleCallback(m)}}:u,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(m){this._queue.clear(),this._queue.enqueue(m)}flush(){this._queue.flush()}}},9282:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const f=c(643);a.updateWindowsModeWrappedState=function(v){const u=v.buffer.lines.get(v.buffer.ybase+v.buffer.y-1),m=u==null?void 0:u.get(v.cols-1),w=v.buffer.lines.get(v.buffer.ybase+v.buffer.y);w&&m&&(w.isWrapped=m[f.CHAR_DATA_CODE_INDEX]!==f.NULL_CELL_CODE&&m[f.CHAR_DATA_CODE_INDEX]!==f.WHITESPACE_CELL_CODE)}},3734:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(u){return[u>>>16&255,u>>>8&255,255&u]}static fromColorRGB(u){return(255&u[0])<<16|(255&u[1])<<8|255&u[2]}clone(){const u=new c;return u.fg=this.fg,u.bg=this.bg,u.extended=this.extended.clone(),u}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=c;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(u){this._ext=u}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(u){this._ext&=-469762049,this._ext|=u<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(u){this._ext&=-67108864,this._ext|=67108863&u}get urlId(){return this._urlId}set urlId(u){this._urlId=u}get underlineVariantOffset(){const u=(3758096384&this._ext)>>29;return u<0?4294967288^u:u}set underlineVariantOffset(u){this._ext&=536870911,this._ext|=u<<29&3758096384}constructor(u=0,m=0){this._ext=0,this._urlId=0,this._ext=u,this._urlId=m}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=f},9092:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const f=c(6349),v=c(7226),u=c(3734),m=c(8437),w=c(4634),C=c(511),_=c(643),d=c(4863),y=c(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(b,S,E){this._hasScrollback=b,this._optionsService=S,this._bufferService=E,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=m.DEFAULT_ATTR_DATA.clone(),this.savedCharset=y.DEFAULT_CHARSET,this.markers=[],this._nullCell=C.CellData.fromCharData([0,_.NULL_CELL_CHAR,_.NULL_CELL_WIDTH,_.NULL_CELL_CODE]),this._whitespaceCell=C.CellData.fromCharData([0,_.WHITESPACE_CELL_CHAR,_.WHITESPACE_CELL_WIDTH,_.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new v.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(b){return b?(this._nullCell.fg=b.fg,this._nullCell.bg=b.bg,this._nullCell.extended=b.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new u.ExtendedAttrs),this._nullCell}getWhitespaceCell(b){return b?(this._whitespaceCell.fg=b.fg,this._whitespaceCell.bg=b.bg,this._whitespaceCell.extended=b.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new u.ExtendedAttrs),this._whitespaceCell}getBlankLine(b,S){return new m.BufferLine(this._bufferService.cols,this.getNullCell(b),S)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const b=this.ybase+this.y-this.ydisp;return b>=0&&b<this._rows}_getCorrectBufferLength(b){if(!this._hasScrollback)return b;const S=b+this._optionsService.rawOptions.scrollback;return S>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:S}fillViewportRows(b){if(this.lines.length===0){b===void 0&&(b=m.DEFAULT_ATTR_DATA);let S=this._rows;for(;S--;)this.lines.push(this.getBlankLine(b))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(b,S){const E=this.getNullCell(m.DEFAULT_ATTR_DATA);let L=0;const x=this._getCorrectBufferLength(S);if(x>this.lines.maxLength&&(this.lines.maxLength=x),this.lines.length>0){if(this._cols<b)for(let M=0;M<this.lines.length;M++)L+=+this.lines.get(M).resize(b,E);let O=0;if(this._rows<S)for(let M=this._rows;M<S;M++)this.lines.length<S+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new m.BufferLine(b,E)):this.ybase>0&&this.lines.length<=this.ybase+this.y+O+1?(this.ybase--,O++,this.ydisp>0&&this.ydisp--):this.lines.push(new m.BufferLine(b,E)));else for(let M=this._rows;M>S;M--)this.lines.length>S+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(x<this.lines.maxLength){const M=this.lines.length-x;M>0&&(this.lines.trimStart(M),this.ybase=Math.max(this.ybase-M,0),this.ydisp=Math.max(this.ydisp-M,0),this.savedY=Math.max(this.savedY-M,0)),this.lines.maxLength=x}this.x=Math.min(this.x,b-1),this.y=Math.min(this.y,S-1),O&&(this.y+=O),this.savedX=Math.min(this.savedX,b-1),this.scrollTop=0}if(this.scrollBottom=S-1,this._isReflowEnabled&&(this._reflow(b,S),this._cols>b))for(let O=0;O<this.lines.length;O++)L+=+this.lines.get(O).resize(b,E);this._cols=b,this._rows=S,this._memoryCleanupQueue.clear(),L>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let b=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,b=!1);let S=0;for(;this._memoryCleanupPosition<this.lines.length;)if(S+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),S>100)return!0;return b}get _isReflowEnabled(){const b=this._optionsService.rawOptions.windowsPty;return b&&b.buildNumber?this._hasScrollback&&b.backend==="conpty"&&b.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(b,S){this._cols!==b&&(b>this._cols?this._reflowLarger(b,S):this._reflowSmaller(b,S))}_reflowLarger(b,S){const E=(0,w.reflowLargerGetLinesToRemove)(this.lines,this._cols,b,this.ybase+this.y,this.getNullCell(m.DEFAULT_ATTR_DATA));if(E.length>0){const L=(0,w.reflowLargerCreateNewLayout)(this.lines,E);(0,w.reflowLargerApplyNewLayout)(this.lines,L.layout),this._reflowLargerAdjustViewport(b,S,L.countRemoved)}}_reflowLargerAdjustViewport(b,S,E){const L=this.getNullCell(m.DEFAULT_ATTR_DATA);let x=E;for(;x-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<S&&this.lines.push(new m.BufferLine(b,L))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-E,0)}_reflowSmaller(b,S){const E=this.getNullCell(m.DEFAULT_ATTR_DATA),L=[];let x=0;for(let O=this.lines.length-1;O>=0;O--){let M=this.lines.get(O);if(!M||!M.isWrapped&&M.getTrimmedLength()<=b)continue;const D=[M];for(;M.isWrapped&&O>0;)M=this.lines.get(--O),D.unshift(M);const k=this.ybase+this.y;if(k>=O&&k<O+D.length)continue;const B=D[D.length-1].getTrimmedLength(),R=(0,w.reflowSmallerGetNewLineLengths)(D,this._cols,b),P=R.length-D.length;let H;H=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+P):Math.max(0,this.lines.length-this.lines.maxLength+P);const X=[];for(let N=0;N<P;N++){const U=this.getBlankLine(m.DEFAULT_ATTR_DATA,!0);X.push(U)}X.length>0&&(L.push({start:O+D.length+x,newLines:X}),x+=X.length),D.push(...X);let F=R.length-1,K=R[F];K===0&&(F--,K=R[F]);let Y=D.length-P-1,j=B;for(;Y>=0;){const N=Math.min(j,K);if(D[F]===void 0)break;if(D[F].copyCellsFrom(D[Y],j-N,K-N,N,!0),K-=N,K===0&&(F--,K=R[F]),j-=N,j===0){Y--;const U=Math.max(Y,0);j=(0,w.getWrappedLineTrimmedLength)(D,U,this._cols)}}for(let N=0;N<D.length;N++)R[N]<b&&D[N].setCell(R[N],E);let $=P-H;for(;$-- >0;)this.ybase===0?this.y<S-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+x)-S&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+P,this.ybase+S-1)}if(L.length>0){const O=[],M=[];for(let F=0;F<this.lines.length;F++)M.push(this.lines.get(F));const D=this.lines.length;let k=D-1,B=0,R=L[B];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+x);let P=0;for(let F=Math.min(this.lines.maxLength-1,D+x-1);F>=0;F--)if(R&&R.start>k+P){for(let K=R.newLines.length-1;K>=0;K--)this.lines.set(F--,R.newLines[K]);F++,O.push({index:k+1,amount:R.newLines.length}),P+=R.newLines.length,R=L[++B]}else this.lines.set(F,M[k--]);let H=0;for(let F=O.length-1;F>=0;F--)O[F].index+=H,this.lines.onInsertEmitter.fire(O[F]),H+=O[F].amount;const X=Math.max(0,D+x-this.lines.maxLength);X>0&&this.lines.onTrimEmitter.fire(X)}}translateBufferLineToString(b,S,E=0,L){const x=this.lines.get(b);return x?x.translateToString(S,E,L):""}getWrappedRangeForLine(b){let S=b,E=b;for(;S>0&&this.lines.get(S).isWrapped;)S--;for(;E+1<this.lines.length&&this.lines.get(E+1).isWrapped;)E++;return{first:S,last:E}}setupTabStops(b){for(b!=null?this.tabs[b]||(b=this.prevStop(b)):(this.tabs={},b=0);b<this._cols;b+=this._optionsService.rawOptions.tabStopWidth)this.tabs[b]=!0}prevStop(b){for(b==null&&(b=this.x);!this.tabs[--b]&&b>0;);return b>=this._cols?this._cols-1:b<0?0:b}nextStop(b){for(b==null&&(b=this.x);!this.tabs[++b]&&b<this._cols;);return b>=this._cols?this._cols-1:b<0?0:b}clearMarkers(b){this._isClearing=!0;for(let S=0;S<this.markers.length;S++)this.markers[S].line===b&&(this.markers[S].dispose(),this.markers.splice(S--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let b=0;b<this.markers.length;b++)this.markers[b].dispose(),this.markers.splice(b--,1);this._isClearing=!1}addMarker(b){const S=new d.Marker(b);return this.markers.push(S),S.register(this.lines.onTrim((E=>{S.line-=E,S.line<0&&S.dispose()}))),S.register(this.lines.onInsert((E=>{S.line>=E.index&&(S.line+=E.amount)}))),S.register(this.lines.onDelete((E=>{S.line>=E.index&&S.line<E.index+E.amount&&S.dispose(),S.line>E.index&&(S.line-=E.amount)}))),S.register(S.onDispose((()=>this._removeMarker(S)))),S}_removeMarker(b){this._isClearing||this.markers.splice(this.markers.indexOf(b),1)}}},8437:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const f=c(3734),v=c(511),u=c(643),m=c(482);a.DEFAULT_ATTR_DATA=Object.freeze(new f.AttributeData);let w=0;class C{constructor(d,y,b=!1){this.isWrapped=b,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*d);const S=y||v.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]);for(let E=0;E<d;++E)this.setCell(E,S);this.length=d}get(d){const y=this._data[3*d+0],b=2097151&y;return[this._data[3*d+1],2097152&y?this._combined[d]:b?(0,m.stringFromCodePoint)(b):"",y>>22,2097152&y?this._combined[d].charCodeAt(this._combined[d].length-1):b]}set(d,y){this._data[3*d+1]=y[u.CHAR_DATA_ATTR_INDEX],y[u.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[d]=y[1],this._data[3*d+0]=2097152|d|y[u.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*d+0]=y[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|y[u.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(d){return this._data[3*d+0]>>22}hasWidth(d){return 12582912&this._data[3*d+0]}getFg(d){return this._data[3*d+1]}getBg(d){return this._data[3*d+2]}hasContent(d){return 4194303&this._data[3*d+0]}getCodePoint(d){const y=this._data[3*d+0];return 2097152&y?this._combined[d].charCodeAt(this._combined[d].length-1):2097151&y}isCombined(d){return 2097152&this._data[3*d+0]}getString(d){const y=this._data[3*d+0];return 2097152&y?this._combined[d]:2097151&y?(0,m.stringFromCodePoint)(2097151&y):""}isProtected(d){return 536870912&this._data[3*d+2]}loadCell(d,y){return w=3*d,y.content=this._data[w+0],y.fg=this._data[w+1],y.bg=this._data[w+2],2097152&y.content&&(y.combinedData=this._combined[d]),268435456&y.bg&&(y.extended=this._extendedAttrs[d]),y}setCell(d,y){2097152&y.content&&(this._combined[d]=y.combinedData),268435456&y.bg&&(this._extendedAttrs[d]=y.extended),this._data[3*d+0]=y.content,this._data[3*d+1]=y.fg,this._data[3*d+2]=y.bg}setCellFromCodepoint(d,y,b,S){268435456&S.bg&&(this._extendedAttrs[d]=S.extended),this._data[3*d+0]=y|b<<22,this._data[3*d+1]=S.fg,this._data[3*d+2]=S.bg}addCodepointToCell(d,y,b){let S=this._data[3*d+0];2097152&S?this._combined[d]+=(0,m.stringFromCodePoint)(y):2097151&S?(this._combined[d]=(0,m.stringFromCodePoint)(2097151&S)+(0,m.stringFromCodePoint)(y),S&=-2097152,S|=2097152):S=y|4194304,b&&(S&=-12582913,S|=b<<22),this._data[3*d+0]=S}insertCells(d,y,b){if((d%=this.length)&&this.getWidth(d-1)===2&&this.setCellFromCodepoint(d-1,0,1,b),y<this.length-d){const S=new v.CellData;for(let E=this.length-d-y-1;E>=0;--E)this.setCell(d+y+E,this.loadCell(d+E,S));for(let E=0;E<y;++E)this.setCell(d+E,b)}else for(let S=d;S<this.length;++S)this.setCell(S,b);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,b)}deleteCells(d,y,b){if(d%=this.length,y<this.length-d){const S=new v.CellData;for(let E=0;E<this.length-d-y;++E)this.setCell(d+E,this.loadCell(d+y+E,S));for(let E=this.length-y;E<this.length;++E)this.setCell(E,b)}else for(let S=d;S<this.length;++S)this.setCell(S,b);d&&this.getWidth(d-1)===2&&this.setCellFromCodepoint(d-1,0,1,b),this.getWidth(d)!==0||this.hasContent(d)||this.setCellFromCodepoint(d,0,1,b)}replaceCells(d,y,b,S=!1){if(S)for(d&&this.getWidth(d-1)===2&&!this.isProtected(d-1)&&this.setCellFromCodepoint(d-1,0,1,b),y<this.length&&this.getWidth(y-1)===2&&!this.isProtected(y)&&this.setCellFromCodepoint(y,0,1,b);d<y&&d<this.length;)this.isProtected(d)||this.setCell(d,b),d++;else for(d&&this.getWidth(d-1)===2&&this.setCellFromCodepoint(d-1,0,1,b),y<this.length&&this.getWidth(y-1)===2&&this.setCellFromCodepoint(y,0,1,b);d<y&&d<this.length;)this.setCell(d++,b)}resize(d,y){if(d===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const b=3*d;if(d>this.length){if(this._data.buffer.byteLength>=4*b)this._data=new Uint32Array(this._data.buffer,0,b);else{const S=new Uint32Array(b);S.set(this._data),this._data=S}for(let S=this.length;S<d;++S)this.setCell(S,y)}else{this._data=this._data.subarray(0,b);const S=Object.keys(this._combined);for(let L=0;L<S.length;L++){const x=parseInt(S[L],10);x>=d&&delete this._combined[x]}const E=Object.keys(this._extendedAttrs);for(let L=0;L<E.length;L++){const x=parseInt(E[L],10);x>=d&&delete this._extendedAttrs[x]}}return this.length=d,4*b*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const d=new Uint32Array(this._data.length);return d.set(this._data),this._data=d,1}return 0}fill(d,y=!1){if(y)for(let b=0;b<this.length;++b)this.isProtected(b)||this.setCell(b,d);else{this._combined={},this._extendedAttrs={};for(let b=0;b<this.length;++b)this.setCell(b,d)}}copyFrom(d){this.length!==d.length?this._data=new Uint32Array(d._data):this._data.set(d._data),this.length=d.length,this._combined={};for(const y in d._combined)this._combined[y]=d._combined[y];this._extendedAttrs={};for(const y in d._extendedAttrs)this._extendedAttrs[y]=d._extendedAttrs[y];this.isWrapped=d.isWrapped}clone(){const d=new C(0);d._data=new Uint32Array(this._data),d.length=this.length;for(const y in this._combined)d._combined[y]=this._combined[y];for(const y in this._extendedAttrs)d._extendedAttrs[y]=this._extendedAttrs[y];return d.isWrapped=this.isWrapped,d}getTrimmedLength(){for(let d=this.length-1;d>=0;--d)if(4194303&this._data[3*d+0])return d+(this._data[3*d+0]>>22);return 0}getNoBgTrimmedLength(){for(let d=this.length-1;d>=0;--d)if(4194303&this._data[3*d+0]||50331648&this._data[3*d+2])return d+(this._data[3*d+0]>>22);return 0}copyCellsFrom(d,y,b,S,E){const L=d._data;if(E)for(let O=S-1;O>=0;O--){for(let M=0;M<3;M++)this._data[3*(b+O)+M]=L[3*(y+O)+M];268435456&L[3*(y+O)+2]&&(this._extendedAttrs[b+O]=d._extendedAttrs[y+O])}else for(let O=0;O<S;O++){for(let M=0;M<3;M++)this._data[3*(b+O)+M]=L[3*(y+O)+M];268435456&L[3*(y+O)+2]&&(this._extendedAttrs[b+O]=d._extendedAttrs[y+O])}const x=Object.keys(d._combined);for(let O=0;O<x.length;O++){const M=parseInt(x[O],10);M>=y&&(this._combined[M-y+b]=d._combined[M])}}translateToString(d,y,b,S){y=y??0,b=b??this.length,d&&(b=Math.min(b,this.getTrimmedLength())),S&&(S.length=0);let E="";for(;y<b;){const L=this._data[3*y+0],x=2097151&L,O=2097152&L?this._combined[y]:x?(0,m.stringFromCodePoint)(x):u.WHITESPACE_CELL_CHAR;if(E+=O,S)for(let M=0;M<O.length;++M)S.push(y);y+=L>>22||1}return S&&S.push(y),E}}a.BufferLine=C},4841:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(c,f){if(c.start.y>c.end.y)throw new Error(`Buffer range end (${c.end.x}, ${c.end.y}) cannot be before start (${c.start.x}, ${c.start.y})`);return f*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(g,a)=>{function c(f,v,u){if(v===f.length-1)return f[v].getTrimmedLength();const m=!f[v].hasContent(u-1)&&f[v].getWidth(u-1)===1,w=f[v+1].getWidth(0)===2;return m&&w?u-1:u}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(f,v,u,m,w){const C=[];for(let _=0;_<f.length-1;_++){let d=_,y=f.get(++d);if(!y.isWrapped)continue;const b=[f.get(_)];for(;d<f.length&&y.isWrapped;)b.push(y),y=f.get(++d);if(m>=_&&m<d){_+=b.length-1;continue}let S=0,E=c(b,S,v),L=1,x=0;for(;L<b.length;){const M=c(b,L,v),D=M-x,k=u-E,B=Math.min(D,k);b[S].copyCellsFrom(b[L],x,E,B,!1),E+=B,E===u&&(S++,E=0),x+=B,x===M&&(L++,x=0),E===0&&S!==0&&b[S-1].getWidth(u-1)===2&&(b[S].copyCellsFrom(b[S-1],u-1,E++,1,!1),b[S-1].setCell(u-1,w))}b[S].replaceCells(E,u,w);let O=0;for(let M=b.length-1;M>0&&(M>S||b[M].getTrimmedLength()===0);M--)O++;O>0&&(C.push(_+b.length-O),C.push(O)),_+=b.length-1}return C},a.reflowLargerCreateNewLayout=function(f,v){const u=[];let m=0,w=v[m],C=0;for(let _=0;_<f.length;_++)if(w===_){const d=v[++m];f.onDeleteEmitter.fire({index:_-C,amount:d}),_+=d-1,C+=d,w=v[++m]}else u.push(_);return{layout:u,countRemoved:C}},a.reflowLargerApplyNewLayout=function(f,v){const u=[];for(let m=0;m<v.length;m++)u.push(f.get(v[m]));for(let m=0;m<u.length;m++)f.set(m,u[m]);f.length=v.length},a.reflowSmallerGetNewLineLengths=function(f,v,u){const m=[],w=f.map(((y,b)=>c(f,b,v))).reduce(((y,b)=>y+b));let C=0,_=0,d=0;for(;d<w;){if(w-d<u){m.push(w-d);break}C+=u;const y=c(f,_,v);C>y&&(C-=y,_++);const b=f[_].getWidth(C-1)===2;b&&C--;const S=b?u-1:u;m.push(S),d+=S}return m},a.getWrappedLineTrimmedLength=c},5295:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const f=c(8460),v=c(844),u=c(9092);class m extends v.Disposable{constructor(C,_){super(),this._optionsService=C,this._bufferService=_,this._onBufferActivate=this.register(new f.EventEmitter),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 u.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new u.Buffer(!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(C){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(C),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(C,_){this._normal.resize(C,_),this._alt.resize(C,_),this.setupTabStops(C)}setupTabStops(C){this._normal.setupTabStops(C),this._alt.setupTabStops(C)}}a.BufferSet=m},511:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const f=c(482),v=c(643),u=c(3734);class m extends u.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new u.ExtendedAttrs,this.combinedData=""}static fromCharData(C){const _=new m;return _.setFromCharData(C),_}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(C){this.fg=C[v.CHAR_DATA_ATTR_INDEX],this.bg=0;let _=!1;if(C[v.CHAR_DATA_CHAR_INDEX].length>2)_=!0;else if(C[v.CHAR_DATA_CHAR_INDEX].length===2){const d=C[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=d&&d<=56319){const y=C[v.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=y&&y<=57343?this.content=1024*(d-55296)+y-56320+65536|C[v.CHAR_DATA_WIDTH_INDEX]<<22:_=!0}else _=!0}else this.content=C[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|C[v.CHAR_DATA_WIDTH_INDEX]<<22;_&&(this.combinedData=C[v.CHAR_DATA_CHAR_INDEX],this.content=2097152|C[v.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=m},643:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},4863:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const f=c(8460),v=c(844);class u{get id(){return this._id}constructor(w){this.line=w,this.isDisposed=!1,this._disposables=[],this._id=u._nextId++,this._onDispose=this.register(new f.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,v.disposeArray)(this._disposables),this._disposables.length=0)}register(w){return this._disposables.push(w),w}}a.Marker=u,u._nextId=1},7116:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DEFAULT_CHARSET=a.CHARSETS=void 0,a.CHARSETS={},a.DEFAULT_CHARSET=a.CHARSETS.B,a.CHARSETS[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:"≥","{":"π","|":"≠","}":"£","~":"·"},a.CHARSETS.A={"#":"£"},a.CHARSETS.B=void 0,a.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},a.CHARSETS.C=a.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},a.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},a.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},a.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},a.CHARSETS.E=a.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},a.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},a.CHARSETS.H=a.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(g,a)=>{var c,f,v;Object.defineProperty(a,"__esModule",{value:!0}),a.C1_ESCAPED=a.C1=a.C0=void 0,(function(u){u.NUL="\0",u.SOH="",u.STX="",u.ETX="",u.EOT="",u.ENQ="",u.ACK="",u.BEL="\x07",u.BS="\b",u.HT=" ",u.LF=`
|
|
56
|
-
`,u.VT="\v",u.FF="\f",u.CR="\r",u.SO="",u.SI="",u.DLE="",u.DC1="",u.DC2="",u.DC3="",u.DC4="",u.NAK="",u.SYN="",u.ETB="",u.CAN="",u.EM="",u.SUB="",u.ESC="\x1B",u.FS="",u.GS="",u.RS="",u.US="",u.SP=" ",u.DEL=""})(c||(a.C0=c={})),(function(u){u.PAD="",u.HOP="",u.BPH="",u.NBH="",u.IND="",u.NEL="
",u.SSA="",u.ESA="",u.HTS="",u.HTJ="",u.VTS="",u.PLD="",u.PLU="",u.RI="",u.SS2="",u.SS3="",u.DCS="",u.PU1="",u.PU2="",u.STS="",u.CCH="",u.MW="",u.SPA="",u.EPA="",u.SOS="",u.SGCI="",u.SCI="",u.CSI="",u.ST="",u.OSC="",u.PM="",u.APC=""})(f||(a.C1=f={})),(function(u){u.ST=`${c.ESC}\\`})(v||(a.C1_ESCAPED=v={}))},7399:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const f=c(2584),v={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:["'",'"']};a.evaluateKeyboardEvent=function(u,m,w,C){const _={type:0,cancel:!1,key:void 0},d=(u.shiftKey?1:0)|(u.altKey?2:0)|(u.ctrlKey?4:0)|(u.metaKey?8:0);switch(u.keyCode){case 0:u.key==="UIKeyInputUpArrow"?_.key=m?f.C0.ESC+"OA":f.C0.ESC+"[A":u.key==="UIKeyInputLeftArrow"?_.key=m?f.C0.ESC+"OD":f.C0.ESC+"[D":u.key==="UIKeyInputRightArrow"?_.key=m?f.C0.ESC+"OC":f.C0.ESC+"[C":u.key==="UIKeyInputDownArrow"&&(_.key=m?f.C0.ESC+"OB":f.C0.ESC+"[B");break;case 8:_.key=u.ctrlKey?"\b":f.C0.DEL,u.altKey&&(_.key=f.C0.ESC+_.key);break;case 9:if(u.shiftKey){_.key=f.C0.ESC+"[Z";break}_.key=f.C0.HT,_.cancel=!0;break;case 13:_.key=u.altKey?f.C0.ESC+f.C0.CR:f.C0.CR,_.cancel=!0;break;case 27:_.key=f.C0.ESC,u.altKey&&(_.key=f.C0.ESC+f.C0.ESC),_.cancel=!0;break;case 37:if(u.metaKey)break;d?(_.key=f.C0.ESC+"[1;"+(d+1)+"D",_.key===f.C0.ESC+"[1;3D"&&(_.key=f.C0.ESC+(w?"b":"[1;5D"))):_.key=m?f.C0.ESC+"OD":f.C0.ESC+"[D";break;case 39:if(u.metaKey)break;d?(_.key=f.C0.ESC+"[1;"+(d+1)+"C",_.key===f.C0.ESC+"[1;3C"&&(_.key=f.C0.ESC+(w?"f":"[1;5C"))):_.key=m?f.C0.ESC+"OC":f.C0.ESC+"[C";break;case 38:if(u.metaKey)break;d?(_.key=f.C0.ESC+"[1;"+(d+1)+"A",w||_.key!==f.C0.ESC+"[1;3A"||(_.key=f.C0.ESC+"[1;5A")):_.key=m?f.C0.ESC+"OA":f.C0.ESC+"[A";break;case 40:if(u.metaKey)break;d?(_.key=f.C0.ESC+"[1;"+(d+1)+"B",w||_.key!==f.C0.ESC+"[1;3B"||(_.key=f.C0.ESC+"[1;5B")):_.key=m?f.C0.ESC+"OB":f.C0.ESC+"[B";break;case 45:u.shiftKey||u.ctrlKey||(_.key=f.C0.ESC+"[2~");break;case 46:_.key=d?f.C0.ESC+"[3;"+(d+1)+"~":f.C0.ESC+"[3~";break;case 36:_.key=d?f.C0.ESC+"[1;"+(d+1)+"H":m?f.C0.ESC+"OH":f.C0.ESC+"[H";break;case 35:_.key=d?f.C0.ESC+"[1;"+(d+1)+"F":m?f.C0.ESC+"OF":f.C0.ESC+"[F";break;case 33:u.shiftKey?_.type=2:u.ctrlKey?_.key=f.C0.ESC+"[5;"+(d+1)+"~":_.key=f.C0.ESC+"[5~";break;case 34:u.shiftKey?_.type=3:u.ctrlKey?_.key=f.C0.ESC+"[6;"+(d+1)+"~":_.key=f.C0.ESC+"[6~";break;case 112:_.key=d?f.C0.ESC+"[1;"+(d+1)+"P":f.C0.ESC+"OP";break;case 113:_.key=d?f.C0.ESC+"[1;"+(d+1)+"Q":f.C0.ESC+"OQ";break;case 114:_.key=d?f.C0.ESC+"[1;"+(d+1)+"R":f.C0.ESC+"OR";break;case 115:_.key=d?f.C0.ESC+"[1;"+(d+1)+"S":f.C0.ESC+"OS";break;case 116:_.key=d?f.C0.ESC+"[15;"+(d+1)+"~":f.C0.ESC+"[15~";break;case 117:_.key=d?f.C0.ESC+"[17;"+(d+1)+"~":f.C0.ESC+"[17~";break;case 118:_.key=d?f.C0.ESC+"[18;"+(d+1)+"~":f.C0.ESC+"[18~";break;case 119:_.key=d?f.C0.ESC+"[19;"+(d+1)+"~":f.C0.ESC+"[19~";break;case 120:_.key=d?f.C0.ESC+"[20;"+(d+1)+"~":f.C0.ESC+"[20~";break;case 121:_.key=d?f.C0.ESC+"[21;"+(d+1)+"~":f.C0.ESC+"[21~";break;case 122:_.key=d?f.C0.ESC+"[23;"+(d+1)+"~":f.C0.ESC+"[23~";break;case 123:_.key=d?f.C0.ESC+"[24;"+(d+1)+"~":f.C0.ESC+"[24~";break;default:if(!u.ctrlKey||u.shiftKey||u.altKey||u.metaKey)if(w&&!C||!u.altKey||u.metaKey)!w||u.altKey||u.ctrlKey||u.shiftKey||!u.metaKey?u.key&&!u.ctrlKey&&!u.altKey&&!u.metaKey&&u.keyCode>=48&&u.key.length===1?_.key=u.key:u.key&&u.ctrlKey&&(u.key==="_"&&(_.key=f.C0.US),u.key==="@"&&(_.key=f.C0.NUL)):u.keyCode===65&&(_.type=1);else{const y=v[u.keyCode],b=y==null?void 0:y[u.shiftKey?1:0];if(b)_.key=f.C0.ESC+b;else if(u.keyCode>=65&&u.keyCode<=90){const S=u.ctrlKey?u.keyCode-64:u.keyCode+32;let E=String.fromCharCode(S);u.shiftKey&&(E=E.toUpperCase()),_.key=f.C0.ESC+E}else if(u.keyCode===32)_.key=f.C0.ESC+(u.ctrlKey?f.C0.NUL:" ");else if(u.key==="Dead"&&u.code.startsWith("Key")){let S=u.code.slice(3,4);u.shiftKey||(S=S.toLowerCase()),_.key=f.C0.ESC+S,_.cancel=!0}}else u.keyCode>=65&&u.keyCode<=90?_.key=String.fromCharCode(u.keyCode-64):u.keyCode===32?_.key=f.C0.NUL:u.keyCode>=51&&u.keyCode<=55?_.key=String.fromCharCode(u.keyCode-51+27):u.keyCode===56?_.key=f.C0.DEL:u.keyCode===219?_.key=f.C0.ESC:u.keyCode===220?_.key=f.C0.FS:u.keyCode===221&&(_.key=f.C0.GS)}return _}},482:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},a.utf32ToString=function(c,f=0,v=c.length){let u="";for(let m=f;m<v;++m){let w=c[m];w>65535?(w-=65536,u+=String.fromCharCode(55296+(w>>10))+String.fromCharCode(w%1024+56320)):u+=String.fromCharCode(w)}return u},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,f){const v=c.length;if(!v)return 0;let u=0,m=0;if(this._interim){const w=c.charCodeAt(m++);56320<=w&&w<=57343?f[u++]=1024*(this._interim-55296)+w-56320+65536:(f[u++]=this._interim,f[u++]=w),this._interim=0}for(let w=m;w<v;++w){const C=c.charCodeAt(w);if(55296<=C&&C<=56319){if(++w>=v)return this._interim=C,u;const _=c.charCodeAt(w);56320<=_&&_<=57343?f[u++]=1024*(C-55296)+_-56320+65536:(f[u++]=C,f[u++]=_)}else C!==65279&&(f[u++]=C)}return u}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,f){const v=c.length;if(!v)return 0;let u,m,w,C,_=0,d=0,y=0;if(this.interim[0]){let E=!1,L=this.interim[0];L&=(224&L)==192?31:(240&L)==224?15:7;let x,O=0;for(;(x=63&this.interim[++O])&&O<4;)L<<=6,L|=x;const M=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,D=M-O;for(;y<D;){if(y>=v)return 0;if(x=c[y++],(192&x)!=128){y--,E=!0;break}this.interim[O++]=x,L<<=6,L|=63&x}E||(M===2?L<128?y--:f[_++]=L:M===3?L<2048||L>=55296&&L<=57343||L===65279||(f[_++]=L):L<65536||L>1114111||(f[_++]=L)),this.interim.fill(0)}const b=v-4;let S=y;for(;S<v;){for(;!(!(S<b)||128&(u=c[S])||128&(m=c[S+1])||128&(w=c[S+2])||128&(C=c[S+3]));)f[_++]=u,f[_++]=m,f[_++]=w,f[_++]=C,S+=4;if(u=c[S++],u<128)f[_++]=u;else if((224&u)==192){if(S>=v)return this.interim[0]=u,_;if(m=c[S++],(192&m)!=128){S--;continue}if(d=(31&u)<<6|63&m,d<128){S--;continue}f[_++]=d}else if((240&u)==224){if(S>=v)return this.interim[0]=u,_;if(m=c[S++],(192&m)!=128){S--;continue}if(S>=v)return this.interim[0]=u,this.interim[1]=m,_;if(w=c[S++],(192&w)!=128){S--;continue}if(d=(15&u)<<12|(63&m)<<6|63&w,d<2048||d>=55296&&d<=57343||d===65279)continue;f[_++]=d}else if((248&u)==240){if(S>=v)return this.interim[0]=u,_;if(m=c[S++],(192&m)!=128){S--;continue}if(S>=v)return this.interim[0]=u,this.interim[1]=m,_;if(w=c[S++],(192&w)!=128){S--;continue}if(S>=v)return this.interim[0]=u,this.interim[1]=m,this.interim[2]=w,_;if(C=c[S++],(192&C)!=128){S--;continue}if(d=(7&u)<<18|(63&m)<<12|(63&w)<<6|63&C,d<65536||d>1114111)continue;f[_++]=d}}return _}}},225:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const f=c(1480),v=[[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]],u=[[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]];let m;a.UnicodeV6=class{constructor(){if(this.version="6",!m){m=new Uint8Array(65536),m.fill(1),m[0]=0,m.fill(0,1,32),m.fill(0,127,160),m.fill(2,4352,4448),m[9001]=2,m[9002]=2,m.fill(2,11904,42192),m[12351]=1,m.fill(2,44032,55204),m.fill(2,63744,64256),m.fill(2,65040,65050),m.fill(2,65072,65136),m.fill(2,65280,65377),m.fill(2,65504,65511);for(let w=0;w<v.length;++w)m.fill(0,v[w][0],v[w][1]+1)}}wcwidth(w){return w<32?0:w<127?1:w<65536?m[w]:(function(C,_){let d,y=0,b=_.length-1;if(C<_[0][0]||C>_[b][1])return!1;for(;b>=y;)if(d=y+b>>1,C>_[d][1])y=d+1;else{if(!(C<_[d][0]))return!0;b=d-1}return!1})(w,u)?0:w>=131072&&w<=196605||w>=196608&&w<=262141?2:1}charProperties(w,C){let _=this.wcwidth(w),d=_===0&&C!==0;if(d){const y=f.UnicodeService.extractWidth(C);y===0?d=!1:y>_&&(_=y)}return f.UnicodeService.createPropertyValue(0,_,d)}}},5981:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const f=c(8460),v=c(844);class u extends v.Disposable{constructor(w){super(),this._action=w,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new f.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(w,C){if(C!==void 0&&this._syncCalls>C)return void(this._syncCalls=0);if(this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let _;for(this._isSyncWriting=!0;_=this._writeBuffer.shift();){this._action(_);const d=this._callbacks.shift();d&&d()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(w,C){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(C),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(C)}_innerWrite(w=0,C=!0){const _=w||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const d=this._writeBuffer[this._bufferOffset],y=this._action(d,C);if(y){const S=E=>Date.now()-_>=12?setTimeout((()=>this._innerWrite(0,E))):this._innerWrite(_,E);return void y.catch((E=>(queueMicrotask((()=>{throw E})),Promise.resolve(!1)))).then(S)}const b=this._callbacks[this._bufferOffset];if(b&&b(),this._bufferOffset++,this._pendingData-=d.length,Date.now()-_>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(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()}}a.WriteBuffer=u},5941:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.toRgbString=a.parseColor=void 0;const c=/^([\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})$/,f=/^[\da-f]+$/;function v(u,m){const w=u.toString(16),C=w.length<2?"0"+w:w;switch(m){case 4:return w[0];case 8:return C;case 12:return(C+C).slice(0,3);default:return C+C}}a.parseColor=function(u){if(!u)return;let m=u.toLowerCase();if(m.indexOf("rgb:")===0){m=m.slice(4);const w=c.exec(m);if(w){const C=w[1]?15:w[4]?255:w[7]?4095:65535;return[Math.round(parseInt(w[1]||w[4]||w[7]||w[10],16)/C*255),Math.round(parseInt(w[2]||w[5]||w[8]||w[11],16)/C*255),Math.round(parseInt(w[3]||w[6]||w[9]||w[12],16)/C*255)]}}else if(m.indexOf("#")===0&&(m=m.slice(1),f.exec(m)&&[3,6,9,12].includes(m.length))){const w=m.length/3,C=[0,0,0];for(let _=0;_<3;++_){const d=parseInt(m.slice(w*_,w*_+w),16);C[_]=w===1?d<<4:w===2?d:w===3?d>>4:d>>8}return C}},a.toRgbString=function(u,m=16){const[w,C,_]=u;return`rgb:${v(w,m)}/${v(C,m)}/${v(_,m)}`}},5770:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const f=c(482),v=c(8742),u=c(5770),m=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=m,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=m}registerHandler(C,_){this._handlers[C]===void 0&&(this._handlers[C]=[]);const d=this._handlers[C];return d.push(_),{dispose:()=>{const y=d.indexOf(_);y!==-1&&d.splice(y,1)}}}clearHandler(C){this._handlers[C]&&delete this._handlers[C]}setHandlerFallback(C){this._handlerFb=C}reset(){if(this._active.length)for(let C=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;C>=0;--C)this._active[C].unhook(!1);this._stack.paused=!1,this._active=m,this._ident=0}hook(C,_){if(this.reset(),this._ident=C,this._active=this._handlers[C]||m,this._active.length)for(let d=this._active.length-1;d>=0;d--)this._active[d].hook(_);else this._handlerFb(this._ident,"HOOK",_)}put(C,_,d){if(this._active.length)for(let y=this._active.length-1;y>=0;y--)this._active[y].put(C,_,d);else this._handlerFb(this._ident,"PUT",(0,f.utf32ToString)(C,_,d))}unhook(C,_=!0){if(this._active.length){let d=!1,y=this._active.length-1,b=!1;if(this._stack.paused&&(y=this._stack.loopPosition-1,d=_,b=this._stack.fallThrough,this._stack.paused=!1),!b&&d===!1){for(;y>=0&&(d=this._active[y].unhook(C),d!==!0);y--)if(d instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=y,this._stack.fallThrough=!1,d;y--}for(;y>=0;y--)if(d=this._active[y].unhook(!1),d instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=y,this._stack.fallThrough=!0,d}else this._handlerFb(this._ident,"UNHOOK",C);this._active=m,this._ident=0}};const w=new v.Params;w.addParam(0),a.DcsHandler=class{constructor(C){this._handler=C,this._data="",this._params=w,this._hitLimit=!1}hook(C){this._params=C.length>1||C.params[0]?C.clone():w,this._data="",this._hitLimit=!1}put(C,_,d){this._hitLimit||(this._data+=(0,f.utf32ToString)(C,_,d),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(C){let _=!1;if(this._hitLimit)_=!1;else if(C&&(_=this._handler(this._data,this._params),_ instanceof Promise))return _.then((d=>(this._params=w,this._data="",this._hitLimit=!1,d)));return this._params=w,this._data="",this._hitLimit=!1,_}}},2015:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const f=c(844),v=c(8742),u=c(6242),m=c(6351);class w{constructor(y){this.table=new Uint8Array(y)}setDefault(y,b){this.table.fill(y<<4|b)}add(y,b,S,E){this.table[b<<8|y]=S<<4|E}addMany(y,b,S,E){for(let L=0;L<y.length;L++)this.table[b<<8|y[L]]=S<<4|E}}a.TransitionTable=w;const C=160;a.VT500_TRANSITION_TABLE=(function(){const d=new w(4095),y=Array.apply(null,Array(256)).map(((O,M)=>M)),b=(O,M)=>y.slice(O,M),S=b(32,127),E=b(0,24);E.push(25),E.push.apply(E,b(28,32));const L=b(0,14);let x;for(x in d.setDefault(1,0),d.addMany(S,0,2,0),L)d.addMany([24,26,153,154],x,3,0),d.addMany(b(128,144),x,3,0),d.addMany(b(144,152),x,3,0),d.add(156,x,0,0),d.add(27,x,11,1),d.add(157,x,4,8),d.addMany([152,158,159],x,0,7),d.add(155,x,11,3),d.add(144,x,11,9);return d.addMany(E,0,3,0),d.addMany(E,1,3,1),d.add(127,1,0,1),d.addMany(E,8,0,8),d.addMany(E,3,3,3),d.add(127,3,0,3),d.addMany(E,4,3,4),d.add(127,4,0,4),d.addMany(E,6,3,6),d.addMany(E,5,3,5),d.add(127,5,0,5),d.addMany(E,2,3,2),d.add(127,2,0,2),d.add(93,1,4,8),d.addMany(S,8,5,8),d.add(127,8,5,8),d.addMany([156,27,24,26,7],8,6,0),d.addMany(b(28,32),8,0,8),d.addMany([88,94,95],1,0,7),d.addMany(S,7,0,7),d.addMany(E,7,0,7),d.add(156,7,0,0),d.add(127,7,0,7),d.add(91,1,11,3),d.addMany(b(64,127),3,7,0),d.addMany(b(48,60),3,8,4),d.addMany([60,61,62,63],3,9,4),d.addMany(b(48,60),4,8,4),d.addMany(b(64,127),4,7,0),d.addMany([60,61,62,63],4,0,6),d.addMany(b(32,64),6,0,6),d.add(127,6,0,6),d.addMany(b(64,127),6,0,0),d.addMany(b(32,48),3,9,5),d.addMany(b(32,48),5,9,5),d.addMany(b(48,64),5,0,6),d.addMany(b(64,127),5,7,0),d.addMany(b(32,48),4,9,5),d.addMany(b(32,48),1,9,2),d.addMany(b(32,48),2,9,2),d.addMany(b(48,127),2,10,0),d.addMany(b(48,80),1,10,0),d.addMany(b(81,88),1,10,0),d.addMany([89,90,92],1,10,0),d.addMany(b(96,127),1,10,0),d.add(80,1,11,9),d.addMany(E,9,0,9),d.add(127,9,0,9),d.addMany(b(28,32),9,0,9),d.addMany(b(32,48),9,9,12),d.addMany(b(48,60),9,8,10),d.addMany([60,61,62,63],9,9,10),d.addMany(E,11,0,11),d.addMany(b(32,128),11,0,11),d.addMany(b(28,32),11,0,11),d.addMany(E,10,0,10),d.add(127,10,0,10),d.addMany(b(28,32),10,0,10),d.addMany(b(48,60),10,8,10),d.addMany([60,61,62,63],10,0,11),d.addMany(b(32,48),10,9,12),d.addMany(E,12,0,12),d.add(127,12,0,12),d.addMany(b(28,32),12,0,12),d.addMany(b(32,48),12,9,12),d.addMany(b(48,64),12,0,11),d.addMany(b(64,127),12,12,13),d.addMany(b(64,127),10,12,13),d.addMany(b(64,127),9,12,13),d.addMany(E,13,13,13),d.addMany(S,13,13,13),d.add(127,13,0,13),d.addMany([27,156,24,26],13,14,0),d.add(C,0,2,0),d.add(C,8,5,8),d.add(C,6,0,6),d.add(C,11,0,11),d.add(C,13,13,13),d})();class _ extends f.Disposable{constructor(y=a.VT500_TRANSITION_TABLE){super(),this._transitions=y,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new v.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(b,S,E)=>{},this._executeHandlerFb=b=>{},this._csiHandlerFb=(b,S)=>{},this._escHandlerFb=b=>{},this._errorHandlerFb=b=>b,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,f.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new u.OscParser),this._dcsParser=this.register(new m.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(y,b=[64,126]){let S=0;if(y.prefix){if(y.prefix.length>1)throw new Error("only one byte as prefix supported");if(S=y.prefix.charCodeAt(0),S&&60>S||S>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(y.intermediates){if(y.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let L=0;L<y.intermediates.length;++L){const x=y.intermediates.charCodeAt(L);if(32>x||x>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");S<<=8,S|=x}}if(y.final.length!==1)throw new Error("final must be a single byte");const E=y.final.charCodeAt(0);if(b[0]>E||E>b[1])throw new Error(`final must be in range ${b[0]} .. ${b[1]}`);return S<<=8,S|=E,S}identToString(y){const b=[];for(;y;)b.push(String.fromCharCode(255&y)),y>>=8;return b.reverse().join("")}setPrintHandler(y){this._printHandler=y}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(y,b){const S=this._identifier(y,[48,126]);this._escHandlers[S]===void 0&&(this._escHandlers[S]=[]);const E=this._escHandlers[S];return E.push(b),{dispose:()=>{const L=E.indexOf(b);L!==-1&&E.splice(L,1)}}}clearEscHandler(y){this._escHandlers[this._identifier(y,[48,126])]&&delete this._escHandlers[this._identifier(y,[48,126])]}setEscHandlerFallback(y){this._escHandlerFb=y}setExecuteHandler(y,b){this._executeHandlers[y.charCodeAt(0)]=b}clearExecuteHandler(y){this._executeHandlers[y.charCodeAt(0)]&&delete this._executeHandlers[y.charCodeAt(0)]}setExecuteHandlerFallback(y){this._executeHandlerFb=y}registerCsiHandler(y,b){const S=this._identifier(y);this._csiHandlers[S]===void 0&&(this._csiHandlers[S]=[]);const E=this._csiHandlers[S];return E.push(b),{dispose:()=>{const L=E.indexOf(b);L!==-1&&E.splice(L,1)}}}clearCsiHandler(y){this._csiHandlers[this._identifier(y)]&&delete this._csiHandlers[this._identifier(y)]}setCsiHandlerFallback(y){this._csiHandlerFb=y}registerDcsHandler(y,b){return this._dcsParser.registerHandler(this._identifier(y),b)}clearDcsHandler(y){this._dcsParser.clearHandler(this._identifier(y))}setDcsHandlerFallback(y){this._dcsParser.setHandlerFallback(y)}registerOscHandler(y,b){return this._oscParser.registerHandler(y,b)}clearOscHandler(y){this._oscParser.clearHandler(y)}setOscHandlerFallback(y){this._oscParser.setHandlerFallback(y)}setErrorHandler(y){this._errorHandler=y}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(y,b,S,E,L){this._parseStack.state=y,this._parseStack.handlers=b,this._parseStack.handlerPos=S,this._parseStack.transition=E,this._parseStack.chunkPos=L}parse(y,b,S){let E,L=0,x=0,O=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,O=this._parseStack.chunkPos+1;else{if(S===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const M=this._parseStack.handlers;let D=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(S===!1&&D>-1){for(;D>=0&&(E=M[D](this._params),E!==!0);D--)if(E instanceof Promise)return this._parseStack.handlerPos=D,E}this._parseStack.handlers=[];break;case 4:if(S===!1&&D>-1){for(;D>=0&&(E=M[D](),E!==!0);D--)if(E instanceof Promise)return this._parseStack.handlerPos=D,E}this._parseStack.handlers=[];break;case 6:if(L=y[this._parseStack.chunkPos],E=this._dcsParser.unhook(L!==24&&L!==26,S),E)return E;L===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(L=y[this._parseStack.chunkPos],E=this._oscParser.end(L!==24&&L!==26,S),E)return E;L===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,O=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let M=O;M<b;++M){switch(L=y[M],x=this._transitions.table[this.currentState<<8|(L<160?L:C)],x>>4){case 2:for(let P=M+1;;++P){if(P>=b||(L=y[P])<32||L>126&&L<C){this._printHandler(y,M,P),M=P-1;break}if(++P>=b||(L=y[P])<32||L>126&&L<C){this._printHandler(y,M,P),M=P-1;break}if(++P>=b||(L=y[P])<32||L>126&&L<C){this._printHandler(y,M,P),M=P-1;break}if(++P>=b||(L=y[P])<32||L>126&&L<C){this._printHandler(y,M,P),M=P-1;break}}break;case 3:this._executeHandlers[L]?this._executeHandlers[L]():this._executeHandlerFb(L),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:M,code:L,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const D=this._csiHandlers[this._collect<<8|L];let k=D?D.length-1:-1;for(;k>=0&&(E=D[k](this._params),E!==!0);k--)if(E instanceof Promise)return this._preserveStack(3,D,k,x,M),E;k<0&&this._csiHandlerFb(this._collect<<8|L,this._params),this.precedingJoinState=0;break;case 8:do switch(L){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(L-48)}while(++M<b&&(L=y[M])>47&&L<60);M--;break;case 9:this._collect<<=8,this._collect|=L;break;case 10:const B=this._escHandlers[this._collect<<8|L];let R=B?B.length-1:-1;for(;R>=0&&(E=B[R](),E!==!0);R--)if(E instanceof Promise)return this._preserveStack(4,B,R,x,M),E;R<0&&this._escHandlerFb(this._collect<<8|L),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|L,this._params);break;case 13:for(let P=M+1;;++P)if(P>=b||(L=y[P])===24||L===26||L===27||L>127&&L<C){this._dcsParser.put(y,M,P),M=P-1;break}break;case 14:if(E=this._dcsParser.unhook(L!==24&&L!==26),E)return this._preserveStack(6,[],0,x,M),E;L===27&&(x|=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 P=M+1;;P++)if(P>=b||(L=y[P])<32||L>127&&L<C){this._oscParser.put(y,M,P),M=P-1;break}break;case 6:if(E=this._oscParser.end(L!==24&&L!==26),E)return this._preserveStack(5,[],0,x,M),E;L===27&&(x|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&x}}}a.EscapeSequenceParser=_},6242:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const f=c(5770),v=c(482),u=[];a.OscParser=class{constructor(){this._state=0,this._active=u,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(m,w){this._handlers[m]===void 0&&(this._handlers[m]=[]);const C=this._handlers[m];return C.push(w),{dispose:()=>{const _=C.indexOf(w);_!==-1&&C.splice(_,1)}}}clearHandler(m){this._handlers[m]&&delete this._handlers[m]}setHandlerFallback(m){this._handlerFb=m}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=u}reset(){if(this._state===2)for(let m=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;m>=0;--m)this._active[m].end(!1);this._stack.paused=!1,this._active=u,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||u,this._active.length)for(let m=this._active.length-1;m>=0;m--)this._active[m].start();else this._handlerFb(this._id,"START")}_put(m,w,C){if(this._active.length)for(let _=this._active.length-1;_>=0;_--)this._active[_].put(m,w,C);else this._handlerFb(this._id,"PUT",(0,v.utf32ToString)(m,w,C))}start(){this.reset(),this._state=1}put(m,w,C){if(this._state!==3){if(this._state===1)for(;w<C;){const _=m[w++];if(_===59){this._state=2,this._start();break}if(_<48||57<_)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+_-48}this._state===2&&C-w>0&&this._put(m,w,C)}}end(m,w=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let C=!1,_=this._active.length-1,d=!1;if(this._stack.paused&&(_=this._stack.loopPosition-1,C=w,d=this._stack.fallThrough,this._stack.paused=!1),!d&&C===!1){for(;_>=0&&(C=this._active[_].end(m),C!==!0);_--)if(C instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!1,C;_--}for(;_>=0;_--)if(C=this._active[_].end(!1),C instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!0,C}else this._handlerFb(this._id,"END",m);this._active=u,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(m){this._handler=m,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(m,w,C){this._hitLimit||(this._data+=(0,v.utf32ToString)(m,w,C),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(m){let w=!1;if(this._hitLimit)w=!1;else if(m&&(w=this._handler(this._data),w instanceof Promise))return w.then((C=>(this._data="",this._hitLimit=!1,C)));return this._data="",this._hitLimit=!1,w}}},8742:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const c=2147483647;class f{static fromArray(u){const m=new f;if(!u.length)return m;for(let w=Array.isArray(u[0])?1:0;w<u.length;++w){const C=u[w];if(Array.isArray(C))for(let _=0;_<C.length;++_)m.addSubParam(C[_]);else m.addParam(C)}return m}constructor(u=32,m=32){if(this.maxLength=u,this.maxSubParamsLength=m,m>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(u),this.length=0,this._subParams=new Int32Array(m),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(u),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const u=new f(this.maxLength,this.maxSubParamsLength);return u.params.set(this.params),u.length=this.length,u._subParams.set(this._subParams),u._subParamsLength=this._subParamsLength,u._subParamsIdx.set(this._subParamsIdx),u._rejectDigits=this._rejectDigits,u._rejectSubDigits=this._rejectSubDigits,u._digitIsSub=this._digitIsSub,u}toArray(){const u=[];for(let m=0;m<this.length;++m){u.push(this.params[m]);const w=this._subParamsIdx[m]>>8,C=255&this._subParamsIdx[m];C-w>0&&u.push(Array.prototype.slice.call(this._subParams,w,C))}return u}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(u){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=u>c?c:u}}addSubParam(u){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=u>c?c:u,this._subParamsIdx[this.length-1]++}}hasSubParams(u){return(255&this._subParamsIdx[u])-(this._subParamsIdx[u]>>8)>0}getSubParams(u){const m=this._subParamsIdx[u]>>8,w=255&this._subParamsIdx[u];return w-m>0?this._subParams.subarray(m,w):null}getSubParamsAll(){const u={};for(let m=0;m<this.length;++m){const w=this._subParamsIdx[m]>>8,C=255&this._subParamsIdx[m];C-w>0&&(u[m]=this._subParams.slice(w,C))}return u}addDigit(u){let m;if(this._rejectDigits||!(m=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const w=this._digitIsSub?this._subParams:this.params,C=w[m-1];w[m-1]=~C?Math.min(10*C+u,c):u}}a.Params=f},5741:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0,a.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let c=this._addons.length-1;c>=0;c--)this._addons[c].instance.dispose()}loadAddon(c,f){const v={instance:f,dispose:f.dispose,isDisposed:!1};this._addons.push(v),f.dispose=()=>this._wrappedAddonDispose(v),f.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let f=-1;for(let v=0;v<this._addons.length;v++)if(this._addons[v]===c){f=v;break}if(f===-1)throw new Error("Could not dispose an addon that has not been loaded");c.isDisposed=!0,c.dispose.apply(c.instance),this._addons.splice(f,1)}}},8771:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const f=c(3785),v=c(511);a.BufferApiView=class{constructor(u,m){this._buffer=u,this.type=m}init(u){return this._buffer=u,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(u){const m=this._buffer.lines.get(u);if(m)return new f.BufferLineApiView(m)}getNullCell(){return new v.CellData}}},3785:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const f=c(511);a.BufferLineApiView=class{constructor(v){this._line=v}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(v,u){if(!(v<0||v>=this._line.length))return u?(this._line.loadCell(v,u),u):this._line.loadCell(v,new f.CellData)}translateToString(v,u,m){return this._line.translateToString(v,u,m)}}},8285:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const f=c(8771),v=c(8460),u=c(844);class m extends u.Disposable{constructor(C){super(),this._core=C,this._onBufferChange=this.register(new v.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new f.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new f.BufferApiView(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)}}a.BufferNamespaceApi=m},7975:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0,a.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,f){return this._core.registerCsiHandler(c,(v=>f(v.toArray())))}addCsiHandler(c,f){return this.registerCsiHandler(c,f)}registerDcsHandler(c,f){return this._core.registerDcsHandler(c,((v,u)=>f(v,u.toArray())))}addDcsHandler(c,f){return this.registerDcsHandler(c,f)}registerEscHandler(c,f){return this._core.registerEscHandler(c,f)}addEscHandler(c,f){return this.registerEscHandler(c,f)}registerOscHandler(c,f){return this._core.registerOscHandler(c,f)}addOscHandler(c,f){return this.registerOscHandler(c,f)}}},7090:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0,a.UnicodeApi=class{constructor(c){this._core=c}register(c){this._core.unicodeService.register(c)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(c){this._core.unicodeService.activeVersion=c}}},744:function(g,a,c){var f=this&&this.__decorate||function(d,y,b,S){var E,L=arguments.length,x=L<3?y:S===null?S=Object.getOwnPropertyDescriptor(y,b):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(d,y,b,S);else for(var O=d.length-1;O>=0;O--)(E=d[O])&&(x=(L<3?E(x):L>3?E(y,b,x):E(y,b))||x);return L>3&&x&&Object.defineProperty(y,b,x),x},v=this&&this.__param||function(d,y){return function(b,S){y(b,S,d)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const u=c(8460),m=c(844),w=c(5295),C=c(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let _=a.BufferService=class extends m.Disposable{get buffer(){return this.buffers.active}constructor(d){super(),this.isUserScrolling=!1,this._onResize=this.register(new u.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new u.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(d.rawOptions.cols||0,a.MINIMUM_COLS),this.rows=Math.max(d.rawOptions.rows||0,a.MINIMUM_ROWS),this.buffers=this.register(new w.BufferSet(d,this))}resize(d,y){this.cols=d,this.rows=y,this.buffers.resize(d,y),this._onResize.fire({cols:d,rows:y})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(d,y=!1){const b=this.buffer;let S;S=this._cachedBlankLine,S&&S.length===this.cols&&S.getFg(0)===d.fg&&S.getBg(0)===d.bg||(S=b.getBlankLine(d,y),this._cachedBlankLine=S),S.isWrapped=y;const E=b.ybase+b.scrollTop,L=b.ybase+b.scrollBottom;if(b.scrollTop===0){const x=b.lines.isFull;L===b.lines.length-1?x?b.lines.recycle().copyFrom(S):b.lines.push(S.clone()):b.lines.splice(L+1,0,S.clone()),x?this.isUserScrolling&&(b.ydisp=Math.max(b.ydisp-1,0)):(b.ybase++,this.isUserScrolling||b.ydisp++)}else{const x=L-E+1;b.lines.shiftElements(E+1,x-1,-1),b.lines.set(L,S.clone())}this.isUserScrolling||(b.ydisp=b.ybase),this._onScroll.fire(b.ydisp)}scrollLines(d,y,b){const S=this.buffer;if(d<0){if(S.ydisp===0)return;this.isUserScrolling=!0}else d+S.ydisp>=S.ybase&&(this.isUserScrolling=!1);const E=S.ydisp;S.ydisp=Math.max(Math.min(S.ydisp+d,S.ybase),0),E!==S.ydisp&&(y||this._onScroll.fire(S.ydisp))}};a.BufferService=_=f([v(0,C.IOptionsService)],_)},7994:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CharsetService=void 0,a.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(c){this.glevel=c,this.charset=this._charsets[c]}setgCharset(c,f){this._charsets[c]=f,this.glevel===c&&(this.charset=f)}}},1753:function(g,a,c){var f=this&&this.__decorate||function(S,E,L,x){var O,M=arguments.length,D=M<3?E:x===null?x=Object.getOwnPropertyDescriptor(E,L):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(S,E,L,x);else for(var k=S.length-1;k>=0;k--)(O=S[k])&&(D=(M<3?O(D):M>3?O(E,L,D):O(E,L))||D);return M>3&&D&&Object.defineProperty(E,L,D),D},v=this&&this.__param||function(S,E){return function(L,x){E(L,x,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const u=c(2585),m=c(8460),w=c(844),C={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:S=>S.button!==4&&S.action===1&&(S.ctrl=!1,S.alt=!1,S.shift=!1,!0)},VT200:{events:19,restrict:S=>S.action!==32},DRAG:{events:23,restrict:S=>S.action!==32||S.button!==3},ANY:{events:31,restrict:S=>!0}};function _(S,E){let L=(S.ctrl?16:0)|(S.shift?4:0)|(S.alt?8:0);return S.button===4?(L|=64,L|=S.action):(L|=3&S.button,4&S.button&&(L|=64),8&S.button&&(L|=128),S.action===32?L|=32:S.action!==0||E||(L|=3)),L}const d=String.fromCharCode,y={DEFAULT:S=>{const E=[_(S,!1)+32,S.col+32,S.row+32];return E[0]>255||E[1]>255||E[2]>255?"":`\x1B[M${d(E[0])}${d(E[1])}${d(E[2])}`},SGR:S=>{const E=S.action===0&&S.button!==4?"m":"M";return`\x1B[<${_(S,!0)};${S.col};${S.row}${E}`},SGR_PIXELS:S=>{const E=S.action===0&&S.button!==4?"m":"M";return`\x1B[<${_(S,!0)};${S.x};${S.y}${E}`}};let b=a.CoreMouseService=class extends w.Disposable{constructor(S,E){super(),this._bufferService=S,this._coreService=E,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new m.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const L of Object.keys(C))this.addProtocol(L,C[L]);for(const L of Object.keys(y))this.addEncoding(L,y[L]);this.reset()}addProtocol(S,E){this._protocols[S]=E}addEncoding(S,E){this._encodings[S]=E}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(S){if(!this._protocols[S])throw new Error(`unknown protocol "${S}"`);this._activeProtocol=S,this._onProtocolChange.fire(this._protocols[S].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(S){if(!this._encodings[S])throw new Error(`unknown encoding "${S}"`);this._activeEncoding=S}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(S){if(S.col<0||S.col>=this._bufferService.cols||S.row<0||S.row>=this._bufferService.rows||S.button===4&&S.action===32||S.button===3&&S.action!==32||S.button!==4&&(S.action===2||S.action===3)||(S.col++,S.row++,S.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,S,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(S))return!1;const E=this._encodings[this._activeEncoding](S);return E&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(E):this._coreService.triggerDataEvent(E,!0)),this._lastEvent=S,!0}explainEvents(S){return{down:!!(1&S),up:!!(2&S),drag:!!(4&S),move:!!(8&S),wheel:!!(16&S)}}_equalEvents(S,E,L){if(L){if(S.x!==E.x||S.y!==E.y)return!1}else if(S.col!==E.col||S.row!==E.row)return!1;return S.button===E.button&&S.action===E.action&&S.ctrl===E.ctrl&&S.alt===E.alt&&S.shift===E.shift}};a.CoreMouseService=b=f([v(0,u.IBufferService),v(1,u.ICoreService)],b)},6975:function(g,a,c){var f=this&&this.__decorate||function(b,S,E,L){var x,O=arguments.length,M=O<3?S:L===null?L=Object.getOwnPropertyDescriptor(S,E):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(b,S,E,L);else for(var D=b.length-1;D>=0;D--)(x=b[D])&&(M=(O<3?x(M):O>3?x(S,E,M):x(S,E))||M);return O>3&&M&&Object.defineProperty(S,E,M),M},v=this&&this.__param||function(b,S){return function(E,L){S(E,L,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const u=c(1439),m=c(8460),w=c(844),C=c(2585),_=Object.freeze({insertMode:!1}),d=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let y=a.CoreService=class extends w.Disposable{constructor(b,S,E){super(),this._bufferService=b,this._logService=S,this._optionsService=E,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new m.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new m.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new m.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new m.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,u.clone)(_),this.decPrivateModes=(0,u.clone)(d)}reset(){this.modes=(0,u.clone)(_),this.decPrivateModes=(0,u.clone)(d)}triggerDataEvent(b,S=!1){if(this._optionsService.rawOptions.disableStdin)return;const E=this._bufferService.buffer;S&&this._optionsService.rawOptions.scrollOnUserInput&&E.ybase!==E.ydisp&&this._onRequestScrollToBottom.fire(),S&&this._onUserInput.fire(),this._logService.debug(`sending data "${b}"`,(()=>b.split("").map((L=>L.charCodeAt(0))))),this._onData.fire(b)}triggerBinaryEvent(b){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${b}"`,(()=>b.split("").map((S=>S.charCodeAt(0))))),this._onBinary.fire(b))}};a.CoreService=y=f([v(0,C.IBufferService),v(1,C.ILogService),v(2,C.IOptionsService)],y)},9074:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const f=c(8055),v=c(8460),u=c(844),m=c(6106);let w=0,C=0;class _ extends u.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new m.SortedList((b=>b==null?void 0:b.marker.line)),this._onDecorationRegistered=this.register(new v.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new v.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,u.toDisposable)((()=>this.reset())))}registerDecoration(b){if(b.marker.isDisposed)return;const S=new d(b);if(S){const E=S.marker.onDispose((()=>S.dispose()));S.onDispose((()=>{S&&(this._decorations.delete(S)&&this._onDecorationRemoved.fire(S),E.dispose())})),this._decorations.insert(S),this._onDecorationRegistered.fire(S)}return S}reset(){for(const b of this._decorations.values())b.dispose();this._decorations.clear()}*getDecorationsAtCell(b,S,E){let L=0,x=0;for(const O of this._decorations.getKeyIterator(S))L=O.options.x??0,x=L+(O.options.width??1),b>=L&&b<x&&(!E||(O.options.layer??"bottom")===E)&&(yield O)}forEachDecorationAtCell(b,S,E,L){this._decorations.forEachByKey(S,(x=>{w=x.options.x??0,C=w+(x.options.width??1),b>=w&&b<C&&(!E||(x.options.layer??"bottom")===E)&&L(x)}))}}a.DecorationService=_;class d extends u.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=f.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=f.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(b){super(),this.options=b,this.onRenderEmitter=this.register(new v.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new v.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=b.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const f=c(2585),v=c(8343);class u{constructor(...w){this._entries=new Map;for(const[C,_]of w)this.set(C,_)}set(w,C){const _=this._entries.get(w);return this._entries.set(w,C),_}forEach(w){for(const[C,_]of this._entries.entries())w(C,_)}has(w){return this._entries.has(w)}get(w){return this._entries.get(w)}}a.ServiceCollection=u,a.InstantiationService=class{constructor(){this._services=new u,this._services.set(f.IInstantiationService,this)}setService(m,w){this._services.set(m,w)}getService(m){return this._services.get(m)}createInstance(m,...w){const C=(0,v.getServiceDependencies)(m).sort(((y,b)=>y.index-b.index)),_=[];for(const y of C){const b=this._services.get(y.id);if(!b)throw new Error(`[createInstance] ${m.name} depends on UNKNOWN service ${y.id}.`);_.push(b)}const d=C.length>0?C[0].index:w.length;if(w.length!==d)throw new Error(`[createInstance] First service dependency of ${m.name} at position ${d+1} conflicts with ${w.length} static arguments`);return new m(...w,..._)}}},7866:function(g,a,c){var f=this&&this.__decorate||function(d,y,b,S){var E,L=arguments.length,x=L<3?y:S===null?S=Object.getOwnPropertyDescriptor(y,b):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(d,y,b,S);else for(var O=d.length-1;O>=0;O--)(E=d[O])&&(x=(L<3?E(x):L>3?E(y,b,x):E(y,b))||x);return L>3&&x&&Object.defineProperty(y,b,x),x},v=this&&this.__param||function(d,y){return function(b,S){y(b,S,d)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const u=c(844),m=c(2585),w={trace:m.LogLevelEnum.TRACE,debug:m.LogLevelEnum.DEBUG,info:m.LogLevelEnum.INFO,warn:m.LogLevelEnum.WARN,error:m.LogLevelEnum.ERROR,off:m.LogLevelEnum.OFF};let C,_=a.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(d){super(),this._optionsService=d,this._logLevel=m.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),C=this}_updateLogLevel(){this._logLevel=w[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(d){for(let y=0;y<d.length;y++)typeof d[y]=="function"&&(d[y]=d[y]())}_log(d,y,b){this._evalLazyOptionalParams(b),d.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+y,...b)}trace(d,...y){var b;this._logLevel<=m.LogLevelEnum.TRACE&&this._log(((b=this._optionsService.options.logger)==null?void 0:b.trace.bind(this._optionsService.options.logger))??console.log,d,y)}debug(d,...y){var b;this._logLevel<=m.LogLevelEnum.DEBUG&&this._log(((b=this._optionsService.options.logger)==null?void 0:b.debug.bind(this._optionsService.options.logger))??console.log,d,y)}info(d,...y){var b;this._logLevel<=m.LogLevelEnum.INFO&&this._log(((b=this._optionsService.options.logger)==null?void 0:b.info.bind(this._optionsService.options.logger))??console.info,d,y)}warn(d,...y){var b;this._logLevel<=m.LogLevelEnum.WARN&&this._log(((b=this._optionsService.options.logger)==null?void 0:b.warn.bind(this._optionsService.options.logger))??console.warn,d,y)}error(d,...y){var b;this._logLevel<=m.LogLevelEnum.ERROR&&this._log(((b=this._optionsService.options.logger)==null?void 0:b.error.bind(this._optionsService.options.logger))??console.error,d,y)}};a.LogService=_=f([v(0,m.IOptionsService)],_),a.setTraceLogger=function(d){C=d},a.traceCall=function(d,y,b){if(typeof b.value!="function")throw new Error("not supported");const S=b.value;b.value=function(...E){if(C.logLevel!==m.LogLevelEnum.TRACE)return S.apply(this,E);C.trace(`GlyphRenderer#${S.name}(${E.map((x=>JSON.stringify(x))).join(", ")})`);const L=S.apply(this,E);return C.trace(`GlyphRenderer#${S.name} return`,L),L}}},7302:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const f=c(8460),v=c(844),u=c(6114);a.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:u.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const m=["normal","bold","100","200","300","400","500","600","700","800","900"];class w extends v.Disposable{constructor(_){super(),this._onOptionChange=this.register(new f.EventEmitter),this.onOptionChange=this._onOptionChange.event;const d={...a.DEFAULT_OPTIONS};for(const y in _)if(y in d)try{const b=_[y];d[y]=this._sanitizeAndValidateOption(y,b)}catch(b){console.error(b)}this.rawOptions=d,this.options={...d},this._setupOptions(),this.register((0,v.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(_,d){return this.onOptionChange((y=>{y===_&&d(this.rawOptions[_])}))}onMultipleOptionChange(_,d){return this.onOptionChange((y=>{_.indexOf(y)!==-1&&d()}))}_setupOptions(){const _=y=>{if(!(y in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${y}"`);return this.rawOptions[y]},d=(y,b)=>{if(!(y in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${y}"`);b=this._sanitizeAndValidateOption(y,b),this.rawOptions[y]!==b&&(this.rawOptions[y]=b,this._onOptionChange.fire(y))};for(const y in this.rawOptions){const b={get:_.bind(this,y),set:d.bind(this,y)};Object.defineProperty(this.options,y,b)}}_sanitizeAndValidateOption(_,d){switch(_){case"cursorStyle":if(d||(d=a.DEFAULT_OPTIONS[_]),!(function(y){return y==="block"||y==="underline"||y==="bar"})(d))throw new Error(`"${d}" is not a valid value for ${_}`);break;case"wordSeparator":d||(d=a.DEFAULT_OPTIONS[_]);break;case"fontWeight":case"fontWeightBold":if(typeof d=="number"&&1<=d&&d<=1e3)break;d=m.includes(d)?d:a.DEFAULT_OPTIONS[_];break;case"cursorWidth":d=Math.floor(d);case"lineHeight":case"tabStopWidth":if(d<1)throw new Error(`${_} cannot be less than 1, value: ${d}`);break;case"minimumContrastRatio":d=Math.max(1,Math.min(21,Math.round(10*d)/10));break;case"scrollback":if((d=Math.min(d,4294967295))<0)throw new Error(`${_} cannot be less than 0, value: ${d}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(d<=0)throw new Error(`${_} cannot be less than or equal to 0, value: ${d}`);break;case"rows":case"cols":if(!d&&d!==0)throw new Error(`${_} must be numeric, value: ${d}`);break;case"windowsPty":d=d??{}}return d}}a.OptionsService=w},2660:function(g,a,c){var f=this&&this.__decorate||function(w,C,_,d){var y,b=arguments.length,S=b<3?C:d===null?d=Object.getOwnPropertyDescriptor(C,_):d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(w,C,_,d);else for(var E=w.length-1;E>=0;E--)(y=w[E])&&(S=(b<3?y(S):b>3?y(C,_,S):y(C,_))||S);return b>3&&S&&Object.defineProperty(C,_,S),S},v=this&&this.__param||function(w,C){return function(_,d){C(_,d,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const u=c(2585);let m=a.OscLinkService=class{constructor(w){this._bufferService=w,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(w){const C=this._bufferService.buffer;if(w.id===void 0){const E=C.addMarker(C.ybase+C.y),L={data:w,id:this._nextId++,lines:[E]};return E.onDispose((()=>this._removeMarkerFromLink(L,E))),this._dataByLinkId.set(L.id,L),L.id}const _=w,d=this._getEntryIdKey(_),y=this._entriesWithId.get(d);if(y)return this.addLineToLink(y.id,C.ybase+C.y),y.id;const b=C.addMarker(C.ybase+C.y),S={id:this._nextId++,key:this._getEntryIdKey(_),data:_,lines:[b]};return b.onDispose((()=>this._removeMarkerFromLink(S,b))),this._entriesWithId.set(S.key,S),this._dataByLinkId.set(S.id,S),S.id}addLineToLink(w,C){const _=this._dataByLinkId.get(w);if(_&&_.lines.every((d=>d.line!==C))){const d=this._bufferService.buffer.addMarker(C);_.lines.push(d),d.onDispose((()=>this._removeMarkerFromLink(_,d)))}}getLinkData(w){var C;return(C=this._dataByLinkId.get(w))==null?void 0:C.data}_getEntryIdKey(w){return`${w.id};;${w.uri}`}_removeMarkerFromLink(w,C){const _=w.lines.indexOf(C);_!==-1&&(w.lines.splice(_,1),w.lines.length===0&&(w.data.id!==void 0&&this._entriesWithId.delete(w.key),this._dataByLinkId.delete(w.id)))}};a.OscLinkService=m=f([v(0,u.IBufferService)],m)},8343:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const c="di$target",f="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(v){return v[f]||[]},a.createDecorator=function(v){if(a.serviceRegistry.has(v))return a.serviceRegistry.get(v);const u=function(m,w,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(_,d,y){d[c]===d?d[f].push({id:_,index:y}):(d[f]=[{id:_,index:y}],d[c]=d)})(u,m,C)};return u.toString=()=>v,a.serviceRegistry.set(v,u),u}},2585:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const f=c(8343);var v;a.IBufferService=(0,f.createDecorator)("BufferService"),a.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),a.ICoreService=(0,f.createDecorator)("CoreService"),a.ICharsetService=(0,f.createDecorator)("CharsetService"),a.IInstantiationService=(0,f.createDecorator)("InstantiationService"),(function(u){u[u.TRACE=0]="TRACE",u[u.DEBUG=1]="DEBUG",u[u.INFO=2]="INFO",u[u.WARN=3]="WARN",u[u.ERROR=4]="ERROR",u[u.OFF=5]="OFF"})(v||(a.LogLevelEnum=v={})),a.ILogService=(0,f.createDecorator)("LogService"),a.IOptionsService=(0,f.createDecorator)("OptionsService"),a.IOscLinkService=(0,f.createDecorator)("OscLinkService"),a.IUnicodeService=(0,f.createDecorator)("UnicodeService"),a.IDecorationService=(0,f.createDecorator)("DecorationService")},1480:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const f=c(8460),v=c(225);class u{static extractShouldJoin(w){return(1&w)!=0}static extractWidth(w){return w>>1&3}static extractCharKind(w){return w>>3}static createPropertyValue(w,C,_=!1){return(16777215&w)<<3|(3&C)<<1|(_?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new f.EventEmitter,this.onChange=this._onChange.event;const w=new v.UnicodeV6;this.register(w),this._active=w.version,this._activeProvider=w}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(w){if(!this._providers[w])throw new Error(`unknown Unicode version "${w}"`);this._active=w,this._activeProvider=this._providers[w],this._onChange.fire(w)}register(w){this._providers[w.version]=w}wcwidth(w){return this._activeProvider.wcwidth(w)}getStringCellWidth(w){let C=0,_=0;const d=w.length;for(let y=0;y<d;++y){let b=w.charCodeAt(y);if(55296<=b&&b<=56319){if(++y>=d)return C+this.wcwidth(b);const L=w.charCodeAt(y);56320<=L&&L<=57343?b=1024*(b-55296)+L-56320+65536:C+=this.wcwidth(L)}const S=this.charProperties(b,_);let E=u.extractWidth(S);u.extractShouldJoin(S)&&(E-=u.extractWidth(_)),C+=E,_=S}return C}charProperties(w,C){return this._activeProvider.charProperties(w,C)}}a.UnicodeService=u}},n={};function o(g){var a=n[g];if(a!==void 0)return a.exports;var c=n[g]={exports:{}};return r[g].call(c.exports,c,c.exports,o),c.exports}var h={};return(()=>{var g=h;Object.defineProperty(g,"__esModule",{value:!0}),g.Terminal=void 0;const a=o(9042),c=o(3236),f=o(844),v=o(5741),u=o(8285),m=o(7975),w=o(7090),C=["cols","rows"];class _ extends f.Disposable{constructor(y){super(),this._core=this.register(new c.Terminal(y)),this._addonManager=this.register(new v.AddonManager),this._publicOptions={...this._core.options};const b=E=>this._core.options[E],S=(E,L)=>{this._checkReadonlyOptions(E),this._core.options[E]=L};for(const E in this._core.options){const L={get:b.bind(this,E),set:S.bind(this,E)};Object.defineProperty(this._publicOptions,E,L)}}_checkReadonlyOptions(y){if(C.includes(y))throw new Error(`Option "${y}" 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 m.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new w.UnicodeApi(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 u.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const y=this._core.coreService.decPrivateModes;let b="none";switch(this._core.coreMouseService.activeProtocol){case"X10":b="x10";break;case"VT200":b="vt200";break;case"DRAG":b="drag";break;case"ANY":b="any"}return{applicationCursorKeysMode:y.applicationCursorKeys,applicationKeypadMode:y.applicationKeypad,bracketedPasteMode:y.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:b,originMode:y.origin,reverseWraparoundMode:y.reverseWraparound,sendFocusMode:y.sendFocus,wraparoundMode:y.wraparound}}get options(){return this._publicOptions}set options(y){for(const b in y)this._publicOptions[b]=y[b]}blur(){this._core.blur()}focus(){this._core.focus()}input(y,b=!0){this._core.input(y,b)}resize(y,b){this._verifyIntegers(y,b),this._core.resize(y,b)}open(y){this._core.open(y)}attachCustomKeyEventHandler(y){this._core.attachCustomKeyEventHandler(y)}attachCustomWheelEventHandler(y){this._core.attachCustomWheelEventHandler(y)}registerLinkProvider(y){return this._core.registerLinkProvider(y)}registerCharacterJoiner(y){return this._checkProposedApi(),this._core.registerCharacterJoiner(y)}deregisterCharacterJoiner(y){this._checkProposedApi(),this._core.deregisterCharacterJoiner(y)}registerMarker(y=0){return this._verifyIntegers(y),this._core.registerMarker(y)}registerDecoration(y){return this._checkProposedApi(),this._verifyPositiveIntegers(y.x??0,y.width??0,y.height??0),this._core.registerDecoration(y)}hasSelection(){return this._core.hasSelection()}select(y,b,S){this._verifyIntegers(y,b,S),this._core.select(y,b,S)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(y,b){this._verifyIntegers(y,b),this._core.selectLines(y,b)}dispose(){super.dispose()}scrollLines(y){this._verifyIntegers(y),this._core.scrollLines(y)}scrollPages(y){this._verifyIntegers(y),this._core.scrollPages(y)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(y){this._verifyIntegers(y),this._core.scrollToLine(y)}clear(){this._core.clear()}write(y,b){this._core.write(y,b)}writeln(y,b){this._core.write(y),this._core.write(`\r
|
|
57
|
-
`,b)}paste(y){this._core.paste(y)}refresh(y,b){this._verifyIntegers(y,b),this._core.refresh(y,b)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(y){this._addonManager.loadAddon(this,y)}static get strings(){return a}_verifyIntegers(...y){for(const b of y)if(b===1/0||isNaN(b)||b%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...y){for(const b of y)if(b&&(b===1/0||isNaN(b)||b%1!=0||b<0))throw new Error("This API only accepts positive integers")}}g.Terminal=_})(),h})()))})(Tv)),Tv.exports}var JD=QD(),Dv={exports:{}},iS;function eR(){return iS||(iS=1,(function(e,t){(function(r,n){e.exports=n()})(self,(()=>(()=>{var r={};return(()=>{var n=r;Object.defineProperty(n,"__esModule",{value:!0}),n.FitAddon=void 0,n.FitAddon=class{activate(o){this._terminal=o}dispose(){}fit(){const o=this.proposeDimensions();if(!o||!this._terminal||isNaN(o.cols)||isNaN(o.rows))return;const h=this._terminal._core;this._terminal.rows===o.rows&&this._terminal.cols===o.cols||(h._renderService.clear(),this._terminal.resize(o.cols,o.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const o=this._terminal._core,h=o._renderService.dimensions;if(h.css.cell.width===0||h.css.cell.height===0)return;const g=this._terminal.options.scrollback===0?0:o.viewport.scrollBarWidth,a=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(a.getPropertyValue("height")),f=Math.max(0,parseInt(a.getPropertyValue("width"))),v=window.getComputedStyle(this._terminal.element),u=c-(parseInt(v.getPropertyValue("padding-top"))+parseInt(v.getPropertyValue("padding-bottom"))),m=f-(parseInt(v.getPropertyValue("padding-right"))+parseInt(v.getPropertyValue("padding-left")))-g;return{cols:Math.max(2,Math.floor(m/h.css.cell.width)),rows:Math.max(1,Math.floor(u/h.css.cell.height))}}}})(),r})()))})(Dv)),Dv.exports}var tR=eR(),Rv={exports:{}},nS;function rR(){return nS||(nS=1,(function(e,t){(function(r,n){e.exports=n()})(self,(()=>(()=>{var r={965:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.GlyphRenderer=void 0;const f=c(374),v=c(509),u=c(855),m=c(859),w=c(381),C=11,_=C*Float32Array.BYTES_PER_ELEMENT;let d,y=0,b=0,S=0;class E extends m.Disposable{constructor(x,O,M,D){super(),this._terminal=x,this._gl=O,this._dimensions=M,this._optionsService=D,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};const k=this._gl;v.TextureAtlas.maxAtlasPages===void 0&&(v.TextureAtlas.maxAtlasPages=Math.min(32,(0,f.throwIfFalsy)(k.getParameter(k.MAX_TEXTURE_IMAGE_UNITS))),v.TextureAtlas.maxTextureSize=(0,f.throwIfFalsy)(k.getParameter(k.MAX_TEXTURE_SIZE))),this._program=(0,f.throwIfFalsy)((0,w.createProgram)(k,`#version 300 es
|
|
58
|
-
layout (location = 0) in vec2 a_unitquad;
|
|
59
|
-
layout (location = 1) in vec2 a_cellpos;
|
|
60
|
-
layout (location = 2) in vec2 a_offset;
|
|
61
|
-
layout (location = 3) in vec2 a_size;
|
|
62
|
-
layout (location = 4) in float a_texpage;
|
|
63
|
-
layout (location = 5) in vec2 a_texcoord;
|
|
64
|
-
layout (location = 6) in vec2 a_texsize;
|
|
65
|
-
|
|
66
|
-
uniform mat4 u_projection;
|
|
67
|
-
uniform vec2 u_resolution;
|
|
68
|
-
|
|
69
|
-
out vec2 v_texcoord;
|
|
70
|
-
flat out int v_texpage;
|
|
71
|
-
|
|
72
|
-
void main() {
|
|
73
|
-
vec2 zeroToOne = (a_offset / u_resolution) + a_cellpos + (a_unitquad * a_size);
|
|
74
|
-
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
75
|
-
v_texpage = int(a_texpage);
|
|
76
|
-
v_texcoord = a_texcoord + a_unitquad * a_texsize;
|
|
77
|
-
}`,(function(F){let K="";for(let Y=1;Y<F;Y++)K+=` else if (v_texpage == ${Y}) { outColor = texture(u_texture[${Y}], v_texcoord); }`;return`#version 300 es
|
|
78
|
-
precision lowp float;
|
|
79
|
-
|
|
80
|
-
in vec2 v_texcoord;
|
|
81
|
-
flat in int v_texpage;
|
|
82
|
-
|
|
83
|
-
uniform sampler2D u_texture[${F}];
|
|
84
|
-
|
|
85
|
-
out vec4 outColor;
|
|
86
|
-
|
|
87
|
-
void main() {
|
|
88
|
-
if (v_texpage == 0) {
|
|
89
|
-
outColor = texture(u_texture[0], v_texcoord);
|
|
90
|
-
} ${K}
|
|
91
|
-
}`})(v.TextureAtlas.maxAtlasPages))),this.register((0,m.toDisposable)((()=>k.deleteProgram(this._program)))),this._projectionLocation=(0,f.throwIfFalsy)(k.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,f.throwIfFalsy)(k.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,f.throwIfFalsy)(k.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=k.createVertexArray(),k.bindVertexArray(this._vertexArrayObject);const B=new Float32Array([0,0,1,0,0,1,1,1]),R=k.createBuffer();this.register((0,m.toDisposable)((()=>k.deleteBuffer(R)))),k.bindBuffer(k.ARRAY_BUFFER,R),k.bufferData(k.ARRAY_BUFFER,B,k.STATIC_DRAW),k.enableVertexAttribArray(0),k.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const P=new Uint8Array([0,1,2,3]),H=k.createBuffer();this.register((0,m.toDisposable)((()=>k.deleteBuffer(H)))),k.bindBuffer(k.ELEMENT_ARRAY_BUFFER,H),k.bufferData(k.ELEMENT_ARRAY_BUFFER,P,k.STATIC_DRAW),this._attributesBuffer=(0,f.throwIfFalsy)(k.createBuffer()),this.register((0,m.toDisposable)((()=>k.deleteBuffer(this._attributesBuffer)))),k.bindBuffer(k.ARRAY_BUFFER,this._attributesBuffer),k.enableVertexAttribArray(2),k.vertexAttribPointer(2,2,k.FLOAT,!1,_,0),k.vertexAttribDivisor(2,1),k.enableVertexAttribArray(3),k.vertexAttribPointer(3,2,k.FLOAT,!1,_,2*Float32Array.BYTES_PER_ELEMENT),k.vertexAttribDivisor(3,1),k.enableVertexAttribArray(4),k.vertexAttribPointer(4,1,k.FLOAT,!1,_,4*Float32Array.BYTES_PER_ELEMENT),k.vertexAttribDivisor(4,1),k.enableVertexAttribArray(5),k.vertexAttribPointer(5,2,k.FLOAT,!1,_,5*Float32Array.BYTES_PER_ELEMENT),k.vertexAttribDivisor(5,1),k.enableVertexAttribArray(6),k.vertexAttribPointer(6,2,k.FLOAT,!1,_,7*Float32Array.BYTES_PER_ELEMENT),k.vertexAttribDivisor(6,1),k.enableVertexAttribArray(1),k.vertexAttribPointer(1,2,k.FLOAT,!1,_,9*Float32Array.BYTES_PER_ELEMENT),k.vertexAttribDivisor(1,1),k.useProgram(this._program);const X=new Int32Array(v.TextureAtlas.maxAtlasPages);for(let F=0;F<v.TextureAtlas.maxAtlasPages;F++)X[F]=F;k.uniform1iv(this._textureLocation,X),k.uniformMatrix4fv(this._projectionLocation,!1,w.PROJECTION_MATRIX),this._atlasTextures=[];for(let F=0;F<v.TextureAtlas.maxAtlasPages;F++){const K=new w.GLTexture((0,f.throwIfFalsy)(k.createTexture()));this.register((0,m.toDisposable)((()=>k.deleteTexture(K.texture)))),k.activeTexture(k.TEXTURE0+F),k.bindTexture(k.TEXTURE_2D,K.texture),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_S,k.CLAMP_TO_EDGE),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_T,k.CLAMP_TO_EDGE),k.texImage2D(k.TEXTURE_2D,0,k.RGBA,1,1,0,k.RGBA,k.UNSIGNED_BYTE,new Uint8Array([255,0,0,255])),this._atlasTextures[F]=K}k.enable(k.BLEND),k.blendFunc(k.SRC_ALPHA,k.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return!this._atlas||this._atlas.beginFrame()}updateCell(x,O,M,D,k,B,R,P,H){this._updateCell(this._vertices.attributes,x,O,M,D,k,B,R,P,H)}_updateCell(x,O,M,D,k,B,R,P,H,X){y=(M*this._terminal.cols+O)*C,D!==u.NULL_CELL_CODE&&D!==void 0?this._atlas&&(d=P&&P.length>1?this._atlas.getRasterizedGlyphCombinedChar(P,k,B,R,!1):this._atlas.getRasterizedGlyph(D,k,B,R,!1),b=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),k!==X&&d.offset.x>b?(S=d.offset.x-b,x[y]=-(d.offset.x-S)+this._dimensions.device.char.left,x[y+1]=-d.offset.y+this._dimensions.device.char.top,x[y+2]=(d.size.x-S)/this._dimensions.device.canvas.width,x[y+3]=d.size.y/this._dimensions.device.canvas.height,x[y+4]=d.texturePage,x[y+5]=d.texturePositionClipSpace.x+S/this._atlas.pages[d.texturePage].canvas.width,x[y+6]=d.texturePositionClipSpace.y,x[y+7]=d.sizeClipSpace.x-S/this._atlas.pages[d.texturePage].canvas.width,x[y+8]=d.sizeClipSpace.y):(x[y]=-d.offset.x+this._dimensions.device.char.left,x[y+1]=-d.offset.y+this._dimensions.device.char.top,x[y+2]=d.size.x/this._dimensions.device.canvas.width,x[y+3]=d.size.y/this._dimensions.device.canvas.height,x[y+4]=d.texturePage,x[y+5]=d.texturePositionClipSpace.x,x[y+6]=d.texturePositionClipSpace.y,x[y+7]=d.sizeClipSpace.x,x[y+8]=d.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,f.allowRescaling)(D,H,d.size.x,this._dimensions.device.cell.width)&&(x[y+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width)):x.fill(0,y,y+C-1-2)}clear(){const x=this._terminal,O=x.cols*x.rows*C;this._vertices.count!==O?this._vertices.attributes=new Float32Array(O):this._vertices.attributes.fill(0);let M=0;for(;M<this._vertices.attributesBuffers.length;M++)this._vertices.count!==O?this._vertices.attributesBuffers[M]=new Float32Array(O):this._vertices.attributesBuffers[M].fill(0);this._vertices.count=O,M=0;for(let D=0;D<x.rows;D++)for(let k=0;k<x.cols;k++)this._vertices.attributes[M+9]=k/x.cols,this._vertices.attributes[M+10]=D/x.rows,M+=C}handleResize(){const x=this._gl;x.useProgram(this._program),x.viewport(0,0,x.canvas.width,x.canvas.height),x.uniform2f(this._resolutionLocation,x.canvas.width,x.canvas.height),this.clear()}render(x){if(!this._atlas)return;const O=this._gl;O.useProgram(this._program),O.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;const M=this._vertices.attributesBuffers[this._activeBuffer];let D=0;for(let k=0;k<x.lineLengths.length;k++){const B=k*this._terminal.cols*C,R=this._vertices.attributes.subarray(B,B+x.lineLengths[k]*C);M.set(R,D),D+=R.length}O.bindBuffer(O.ARRAY_BUFFER,this._attributesBuffer),O.bufferData(O.ARRAY_BUFFER,M.subarray(0,D),O.STREAM_DRAW);for(let k=0;k<this._atlas.pages.length;k++)this._atlas.pages[k].version!==this._atlasTextures[k].version&&this._bindAtlasPageTexture(O,this._atlas,k);O.drawElementsInstanced(O.TRIANGLE_STRIP,4,O.UNSIGNED_BYTE,0,D/C)}setAtlas(x){this._atlas=x;for(const O of this._atlasTextures)O.version=-1}_bindAtlasPageTexture(x,O,M){x.activeTexture(x.TEXTURE0+M),x.bindTexture(x.TEXTURE_2D,this._atlasTextures[M].texture),x.texParameteri(x.TEXTURE_2D,x.TEXTURE_WRAP_S,x.CLAMP_TO_EDGE),x.texParameteri(x.TEXTURE_2D,x.TEXTURE_WRAP_T,x.CLAMP_TO_EDGE),x.texImage2D(x.TEXTURE_2D,0,x.RGBA,x.RGBA,x.UNSIGNED_BYTE,O.pages[M].canvas),x.generateMipmap(x.TEXTURE_2D),this._atlasTextures[M].version=O.pages[M].version}setDimensions(x){this._dimensions=x}}a.GlyphRenderer=E},742:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RectangleRenderer=void 0;const f=c(374),v=c(859),u=c(310),m=c(381),w=8*Float32Array.BYTES_PER_ELEMENT;class C{constructor(){this.attributes=new Float32Array(160),this.count=0}}let _=0,d=0,y=0,b=0,S=0,E=0,L=0;class x extends v.Disposable{constructor(M,D,k,B){super(),this._terminal=M,this._gl=D,this._dimensions=k,this._themeService=B,this._vertices=new C,this._verticesCursor=new C;const R=this._gl;this._program=(0,f.throwIfFalsy)((0,m.createProgram)(R,`#version 300 es
|
|
92
|
-
layout (location = 0) in vec2 a_position;
|
|
93
|
-
layout (location = 1) in vec2 a_size;
|
|
94
|
-
layout (location = 2) in vec4 a_color;
|
|
95
|
-
layout (location = 3) in vec2 a_unitquad;
|
|
96
|
-
|
|
97
|
-
uniform mat4 u_projection;
|
|
98
|
-
|
|
99
|
-
out vec4 v_color;
|
|
100
|
-
|
|
101
|
-
void main() {
|
|
102
|
-
vec2 zeroToOne = a_position + (a_unitquad * a_size);
|
|
103
|
-
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
104
|
-
v_color = a_color;
|
|
105
|
-
}`,`#version 300 es
|
|
106
|
-
precision lowp float;
|
|
107
|
-
|
|
108
|
-
in vec4 v_color;
|
|
109
|
-
|
|
110
|
-
out vec4 outColor;
|
|
111
|
-
|
|
112
|
-
void main() {
|
|
113
|
-
outColor = v_color;
|
|
114
|
-
}`)),this.register((0,v.toDisposable)((()=>R.deleteProgram(this._program)))),this._projectionLocation=(0,f.throwIfFalsy)(R.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=R.createVertexArray(),R.bindVertexArray(this._vertexArrayObject);const P=new Float32Array([0,0,1,0,0,1,1,1]),H=R.createBuffer();this.register((0,v.toDisposable)((()=>R.deleteBuffer(H)))),R.bindBuffer(R.ARRAY_BUFFER,H),R.bufferData(R.ARRAY_BUFFER,P,R.STATIC_DRAW),R.enableVertexAttribArray(3),R.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const X=new Uint8Array([0,1,2,3]),F=R.createBuffer();this.register((0,v.toDisposable)((()=>R.deleteBuffer(F)))),R.bindBuffer(R.ELEMENT_ARRAY_BUFFER,F),R.bufferData(R.ELEMENT_ARRAY_BUFFER,X,R.STATIC_DRAW),this._attributesBuffer=(0,f.throwIfFalsy)(R.createBuffer()),this.register((0,v.toDisposable)((()=>R.deleteBuffer(this._attributesBuffer)))),R.bindBuffer(R.ARRAY_BUFFER,this._attributesBuffer),R.enableVertexAttribArray(0),R.vertexAttribPointer(0,2,R.FLOAT,!1,w,0),R.vertexAttribDivisor(0,1),R.enableVertexAttribArray(1),R.vertexAttribPointer(1,2,R.FLOAT,!1,w,2*Float32Array.BYTES_PER_ELEMENT),R.vertexAttribDivisor(1,1),R.enableVertexAttribArray(2),R.vertexAttribPointer(2,4,R.FLOAT,!1,w,4*Float32Array.BYTES_PER_ELEMENT),R.vertexAttribDivisor(2,1),this._updateCachedColors(B.colors),this.register(this._themeService.onChangeColors((K=>{this._updateCachedColors(K),this._updateViewportRectangle()})))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(M){const D=this._gl;D.useProgram(this._program),D.bindVertexArray(this._vertexArrayObject),D.uniformMatrix4fv(this._projectionLocation,!1,m.PROJECTION_MATRIX),D.bindBuffer(D.ARRAY_BUFFER,this._attributesBuffer),D.bufferData(D.ARRAY_BUFFER,M.attributes,D.DYNAMIC_DRAW),D.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,D.UNSIGNED_BYTE,0,M.count)}handleResize(){this._updateViewportRectangle()}setDimensions(M){this._dimensions=M}_updateCachedColors(M){this._bgFloat=this._colorToFloat32Array(M.background),this._cursorFloat=this._colorToFloat32Array(M.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(M){const D=this._terminal,k=this._vertices;let B,R,P,H,X,F,K,Y,j,$,N,U=1;for(B=0;B<D.rows;B++){for(P=-1,H=0,X=0,F=!1,R=0;R<D.cols;R++)K=(B*D.cols+R)*u.RENDER_MODEL_INDICIES_PER_CELL,Y=M.cells[K+u.RENDER_MODEL_BG_OFFSET],j=M.cells[K+u.RENDER_MODEL_FG_OFFSET],$=!!(67108864&j),(Y!==H||j!==X&&(F||$))&&((H!==0||F&&X!==0)&&(N=8*U++,this._updateRectangle(k,N,X,H,P,R,B)),P=R,H=Y,X=j,F=$);(H!==0||F&&X!==0)&&(N=8*U++,this._updateRectangle(k,N,X,H,P,D.cols,B))}k.count=U}updateCursor(M){const D=this._verticesCursor,k=M.cursor;if(!k||k.style==="block")return void(D.count=0);let B,R=0;k.style!=="bar"&&k.style!=="outline"||(B=8*R++,this._addRectangleFloat(D.attributes,B,k.x*this._dimensions.device.cell.width,k.y*this._dimensions.device.cell.height,k.style==="bar"?k.dpr*k.cursorWidth:k.dpr,this._dimensions.device.cell.height,this._cursorFloat)),k.style!=="underline"&&k.style!=="outline"||(B=8*R++,this._addRectangleFloat(D.attributes,B,k.x*this._dimensions.device.cell.width,(k.y+1)*this._dimensions.device.cell.height-k.dpr,k.width*this._dimensions.device.cell.width,k.dpr,this._cursorFloat)),k.style==="outline"&&(B=8*R++,this._addRectangleFloat(D.attributes,B,k.x*this._dimensions.device.cell.width,k.y*this._dimensions.device.cell.height,k.width*this._dimensions.device.cell.width,k.dpr,this._cursorFloat),B=8*R++,this._addRectangleFloat(D.attributes,B,(k.x+k.width)*this._dimensions.device.cell.width-k.dpr,k.y*this._dimensions.device.cell.height,k.dpr,this._dimensions.device.cell.height,this._cursorFloat)),D.count=R}_updateRectangle(M,D,k,B,R,P,H){if(67108864&k)switch(50331648&k){case 16777216:case 33554432:_=this._themeService.colors.ansi[255&k].rgba;break;case 50331648:_=(16777215&k)<<8;break;default:_=this._themeService.colors.foreground.rgba}else switch(50331648&B){case 16777216:case 33554432:_=this._themeService.colors.ansi[255&B].rgba;break;case 50331648:_=(16777215&B)<<8;break;default:_=this._themeService.colors.background.rgba}M.attributes.length<D+4&&(M.attributes=(0,m.expandFloat32Array)(M.attributes,this._terminal.rows*this._terminal.cols*8)),d=R*this._dimensions.device.cell.width,y=H*this._dimensions.device.cell.height,b=(_>>24&255)/255,S=(_>>16&255)/255,E=(_>>8&255)/255,L=1,this._addRectangle(M.attributes,D,d,y,(P-R)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,b,S,E,L)}_addRectangle(M,D,k,B,R,P,H,X,F,K){M[D]=k/this._dimensions.device.canvas.width,M[D+1]=B/this._dimensions.device.canvas.height,M[D+2]=R/this._dimensions.device.canvas.width,M[D+3]=P/this._dimensions.device.canvas.height,M[D+4]=H,M[D+5]=X,M[D+6]=F,M[D+7]=K}_addRectangleFloat(M,D,k,B,R,P,H){M[D]=k/this._dimensions.device.canvas.width,M[D+1]=B/this._dimensions.device.canvas.height,M[D+2]=R/this._dimensions.device.canvas.width,M[D+3]=P/this._dimensions.device.canvas.height,M[D+4]=H[0],M[D+5]=H[1],M[D+6]=H[2],M[D+7]=H[3]}_colorToFloat32Array(M){return new Float32Array([(M.rgba>>24&255)/255,(M.rgba>>16&255)/255,(M.rgba>>8&255)/255,(255&M.rgba)/255])}}a.RectangleRenderer=x},310:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderModel=a.COMBINED_CHAR_BIT_MASK=a.RENDER_MODEL_EXT_OFFSET=a.RENDER_MODEL_FG_OFFSET=a.RENDER_MODEL_BG_OFFSET=a.RENDER_MODEL_INDICIES_PER_CELL=void 0;const f=c(296);a.RENDER_MODEL_INDICIES_PER_CELL=4,a.RENDER_MODEL_BG_OFFSET=1,a.RENDER_MODEL_FG_OFFSET=2,a.RENDER_MODEL_EXT_OFFSET=3,a.COMBINED_CHAR_BIT_MASK=2147483648,a.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,f.createSelectionRenderModel)()}resize(v,u){const m=v*u*a.RENDER_MODEL_INDICIES_PER_CELL;m!==this.cells.length&&(this.cells=new Uint32Array(m),this.lineLengths=new Uint32Array(u))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.JoinedCellData=a.WebglRenderer=void 0;const f=c(820),v=c(274),u=c(627),m=c(457),w=c(56),C=c(374),_=c(345),d=c(859),y=c(147),b=c(782),S=c(855),E=c(965),L=c(742),x=c(310),O=c(733);class M extends d.Disposable{constructor(R,P,H,X,F,K,Y,j,$){super(),this._terminal=R,this._characterJoinerService=P,this._charSizeService=H,this._coreBrowserService=X,this._coreService=F,this._decorationService=K,this._optionsService=Y,this._themeService=j,this._cursorBlinkStateManager=new d.MutableDisposable,this._charAtlasDisposable=this.register(new d.MutableDisposable),this._observerDisposable=this.register(new d.MutableDisposable),this._model=new x.RenderModel,this._workCell=new b.CellData,this._workCell2=new b.CellData,this._rectangleRenderer=this.register(new d.MutableDisposable),this._glyphRenderer=this.register(new d.MutableDisposable),this._onChangeTextureAtlas=this.register(new _.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new _.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new _.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new _.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new _.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors((()=>this._handleColorChange()))),this._cellColorResolver=new v.CellColorResolver(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new O.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,Y,this._themeService)],this.dimensions=(0,C.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(Y.onOptionChange((()=>this._handleOptionsChanged()))),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const N={antialias:!1,depth:!1,preserveDrawingBuffer:$};if(this._gl=this._canvas.getContext("webgl2",N),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,f.addDisposableDomListener)(this._canvas,"webglcontextlost",(U=>{console.log("webglcontextlost event received"),U.preventDefault(),this._contextRestorationTimeout=setTimeout((()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(U)}),3e3)}))),this.register((0,f.addDisposableDomListener)(this._canvas,"webglcontextrestored",(U=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,u.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()}))),this._observerDisposable.value=(0,w.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,((U,J)=>this._setCanvasDevicePixelDimensions(U,J))),this.register(this._coreBrowserService.onWindowChange((U=>{this._observerDisposable.value=(0,w.observeDevicePixelDimensions)(this._canvas,U,((J,te)=>this._setCanvasDevicePixelDimensions(J,te)))}))),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._coreBrowserService.window.document.body.contains(this._core.screenElement),this.register((0,d.toDisposable)((()=>{var U;for(const J of this._renderLayers)J.dispose();(U=this._canvas.parentElement)==null||U.removeChild(this._canvas),(0,u.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){var R;return(R=this._charAtlas)==null?void 0:R.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(R,P){var H,X,F,K;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const Y of this._renderLayers)Y.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,(H=this._rectangleRenderer.value)==null||H.setDimensions(this.dimensions),(X=this._rectangleRenderer.value)==null||X.handleResize(),(F=this._glyphRenderer.value)==null||F.setDimensions(this.dimensions),(K=this._glyphRenderer.value)==null||K.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var R;for(const P of this._renderLayers)P.handleBlur(this._terminal);(R=this._cursorBlinkStateManager.value)==null||R.pause(),this._requestRedrawViewport()}handleFocus(){var R;for(const P of this._renderLayers)P.handleFocus(this._terminal);(R=this._cursorBlinkStateManager.value)==null||R.resume(),this._requestRedrawViewport()}handleSelectionChanged(R,P,H){for(const X of this._renderLayers)X.handleSelectionChanged(this._terminal,R,P,H);this._model.selection.update(this._core,R,P,H),this._requestRedrawViewport()}handleCursorMove(){var R;for(const P of this._renderLayers)P.handleCursorMove(this._terminal);(R=this._cursorBlinkStateManager.value)==null||R.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new L.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new E.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var P;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const R=(0,u.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr);this._charAtlas!==R&&(this._onChangeTextureAtlas.fire(R.pages[0].canvas),this._charAtlasDisposable.value=(0,d.getDisposeArrayDisposable)([(0,_.forwardEvent)(R.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,_.forwardEvent)(R.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=R,this._charAtlas.warmUp(),(P=this._glyphRenderer.value)==null||P.setAtlas(this._charAtlas)}_clearModel(R){var P;this._model.clear(),R&&((P=this._glyphRenderer.value)==null||P.clear())}clearTextureAtlas(){var R;(R=this._charAtlas)==null||R.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var R;this._clearModel(!0);for(const P of this._renderLayers)P.reset(this._terminal);(R=this._cursorBlinkStateManager.value)==null||R.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(R){return-1}deregisterCharacterJoiner(R){return!1}renderRows(R,P){if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._charSizeService.width&&this._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(const H of this._renderLayers)H.handleGridChanged(this._terminal,R,P);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(R,P),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),this._cursorBlinkStateManager.value&&!this._cursorBlinkStateManager.value.isCursorVisible||this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new m.CursorBlinkStateManager((()=>{this._requestRedrawCursor()}),this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(R,P){const H=this._core;let X,F,K,Y,j,$,N,U,J,te,fe,ve,Z,W,V=this._workCell;R=k(R,H.rows-1,0),P=k(P,H.rows-1,0);const ee=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,ue=ee-H.buffer.ydisp,ie=Math.min(this._terminal.buffer.active.cursorX,H.cols-1);let me=-1;const de=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let Me=!1;for(F=R;F<=P;F++)for(K=F+H.buffer.ydisp,Y=H.buffer.lines.get(K),this._model.lineLengths[F]=0,j=this._characterJoinerService.getJoinedCharacters(K),Z=0;Z<H.cols;Z++)if(X=this._cellColorResolver.result.bg,Y.loadCell(Z,V),Z===0&&(X=this._cellColorResolver.result.bg),$=!1,N=Z,j.length>0&&Z===j[0][0]&&($=!0,U=j.shift(),V=new D(V,Y.translateToString(!0,U[0],U[1]),U[1]-U[0]),N=U[1]-1),J=V.getChars(),te=V.getCode(),ve=(F*H.cols+Z)*x.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(V,Z,K,this.dimensions.device.cell.width),de&&K===ee&&(Z===ie&&(this._model.cursor={x:ie,y:ue,width:V.getWidth(),style:this._coreBrowserService.isFocused?H.options.cursorStyle||"block":H.options.cursorInactiveStyle,cursorWidth:H.options.cursorWidth,dpr:this._devicePixelRatio},me=ie+V.getWidth()-1),Z>=ie&&Z<=me&&(this._coreBrowserService.isFocused&&(H.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&H.options.cursorInactiveStyle==="block")&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),te!==S.NULL_CELL_CODE&&(this._model.lineLengths[F]=Z+1),(this._model.cells[ve]!==te||this._model.cells[ve+x.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[ve+x.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[ve+x.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(Me=!0,J.length>1&&(te|=x.COMBINED_CHAR_BIT_MASK),this._model.cells[ve]=te,this._model.cells[ve+x.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[ve+x.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[ve+x.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,fe=V.getWidth(),this._glyphRenderer.value.updateCell(Z,F,te,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,J,fe,X),$))for(V=this._workCell,Z++;Z<N;Z++)W=(F*H.cols+Z)*x.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(Z,F,S.NULL_CELL_CODE,0,0,0,S.NULL_CELL_CHAR,0,0),this._model.cells[W]=S.NULL_CELL_CODE,this._model.cells[W+x.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[W+x.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[W+x.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;Me&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(R,P){this._canvas.width===R&&this._canvas.height===P||(this._canvas.width=R,this._canvas.height=P,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const R=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:R,end:R})}}a.WebglRenderer=M;class D extends y.AttributeData{constructor(R,P,H){super(),this.content=0,this.combinedData="",this.fg=R.fg,this.bg=R.bg,this.combinedData=P,this._width=H}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(R){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function k(B,R,P=0){return Math.max(Math.min(B,R),P)}a.JoinedCellData=D},381:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.GLTexture=a.expandFloat32Array=a.createShader=a.createProgram=a.PROJECTION_MATRIX=void 0;const f=c(374);function v(u,m,w){const C=(0,f.throwIfFalsy)(u.createShader(m));if(u.shaderSource(C,w),u.compileShader(C),u.getShaderParameter(C,u.COMPILE_STATUS))return C;console.error(u.getShaderInfoLog(C)),u.deleteShader(C)}a.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),a.createProgram=function(u,m,w){const C=(0,f.throwIfFalsy)(u.createProgram());if(u.attachShader(C,(0,f.throwIfFalsy)(v(u,u.VERTEX_SHADER,m))),u.attachShader(C,(0,f.throwIfFalsy)(v(u,u.FRAGMENT_SHADER,w))),u.linkProgram(C),u.getProgramParameter(C,u.LINK_STATUS))return C;console.error(u.getProgramInfoLog(C)),u.deleteProgram(C)},a.createShader=v,a.expandFloat32Array=function(u,m){const w=Math.min(2*u.length,m),C=new Float32Array(w);for(let _=0;_<u.length;_++)C[_]=u[_];return C},a.GLTexture=class{constructor(u){this.texture=u,this.version=-1}}},592:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BaseRenderLayer=void 0;const f=c(627),v=c(237),u=c(374),m=c(859);class w extends m.Disposable{constructor(_,d,y,b,S,E,L,x){super(),this._container=d,this._alpha=S,this._coreBrowserService=E,this._optionsService=L,this._themeService=x,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${y}-layer`),this._canvas.style.zIndex=b.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors((O=>{this._refreshCharAtlas(_,O),this.reset(_)}))),this.register((0,m.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,u.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(_){}handleFocus(_){}handleCursorMove(_){}handleGridChanged(_,d,y){}handleSelectionChanged(_,d,y,b=!1){}_setTransparency(_,d){if(d===this._alpha)return;const y=this._canvas;this._alpha=d,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,y),this._refreshCharAtlas(_,this._themeService.colors),this.handleGridChanged(_,0,_.rows-1)}_refreshCharAtlas(_,d){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,f.acquireTextureAtlas)(_,this._optionsService.rawOptions,d,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(_,d){this._deviceCellWidth=d.device.cell.width,this._deviceCellHeight=d.device.cell.height,this._deviceCharWidth=d.device.char.width,this._deviceCharHeight=d.device.char.height,this._deviceCharLeft=d.device.char.left,this._deviceCharTop=d.device.char.top,this._canvas.width=d.device.canvas.width,this._canvas.height=d.device.canvas.height,this._canvas.style.width=`${d.css.canvas.width}px`,this._canvas.style.height=`${d.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(_,this._themeService.colors)}_fillBottomLineAtCells(_,d,y=1){this._ctx.fillRect(_*this._deviceCellWidth,(d+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,y*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(_,d,y,b){this._alpha?this._ctx.clearRect(_*this._deviceCellWidth,d*this._deviceCellHeight,y*this._deviceCellWidth,b*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(_*this._deviceCellWidth,d*this._deviceCellHeight,y*this._deviceCellWidth,b*this._deviceCellHeight))}_fillCharTrueColor(_,d,y,b){this._ctx.font=this._getFont(_,!1,!1),this._ctx.textBaseline=v.TEXT_BASELINE,this._clipCell(y,b,d.getWidth()),this._ctx.fillText(d.getChars(),y*this._deviceCellWidth+this._deviceCharLeft,b*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(_,d,y){this._ctx.beginPath(),this._ctx.rect(_*this._deviceCellWidth,d*this._deviceCellHeight,y*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(_,d,y){return`${y?"italic":""} ${d?_.options.fontWeightBold:_.options.fontWeight} ${_.options.fontSize*this._coreBrowserService.dpr}px ${_.options.fontFamily}`}}a.BaseRenderLayer=w},733:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkRenderLayer=void 0;const f=c(197),v=c(237),u=c(592);class m extends u.BaseRenderLayer{constructor(C,_,d,y,b,S,E){super(d,C,"link",_,!0,b,S,E),this.register(y.onShowLinkUnderline((L=>this._handleShowLinkUnderline(L)))),this.register(y.onHideLinkUnderline((L=>this._handleHideLinkUnderline(L))))}resize(C,_){super.resize(C,_),this._state=void 0}reset(C){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const C=this._state.y2-this._state.y1-1;C>0&&this._clearCells(0,this._state.y1+1,this._state.cols,C),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(C){if(C.fg===v.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:C.fg!==void 0&&(0,f.is256Color)(C.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[C.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,C.y1===C.y2)this._fillBottomLineAtCells(C.x1,C.y1,C.x2-C.x1);else{this._fillBottomLineAtCells(C.x1,C.y1,C.cols-C.x1);for(let _=C.y1+1;_<C.y2;_++)this._fillBottomLineAtCells(0,_,C.cols);this._fillBottomLineAtCells(0,C.y2,C.x2)}this._state=C}_handleHideLinkUnderline(C){this._clearCurrentLink()}}a.LinkRenderLayer=m},820:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(c,f,v,u){c.addEventListener(f,v,u);let m=!1;return{dispose:()=>{m||(m=!0,c.removeEventListener(f,v,u))}}}},274:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellColorResolver=void 0;const f=c(855),v=c(160),u=c(374);let m,w=0,C=0,_=!1,d=!1,y=!1,b=0;a.CellColorResolver=class{constructor(S,E,L,x,O,M){this._terminal=S,this._optionService=E,this._selectionRenderModel=L,this._decorationService=x,this._coreBrowserService=O,this._themeService=M,this.result={fg:0,bg:0,ext:0}}resolve(S,E,L,x){if(this.result.bg=S.bg,this.result.fg=S.fg,this.result.ext=268435456&S.bg?S.extended.ext:0,C=0,w=0,d=!1,_=!1,y=!1,m=this._themeService.colors,b=0,S.getCode()!==f.NULL_CELL_CODE&&S.extended.underlineStyle===4){const O=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));b=E*x%(2*Math.round(O))}if(this._decorationService.forEachDecorationAtCell(E,L,"bottom",(O=>{O.backgroundColorRGB&&(C=O.backgroundColorRGB.rgba>>8&16777215,d=!0),O.foregroundColorRGB&&(w=O.foregroundColorRGB.rgba>>8&16777215,_=!0)})),y=this._selectionRenderModel.isCellSelected(this._terminal,E,L),y){if(67108864&this.result.fg||(50331648&this.result.bg)!=0){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:C=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:C=(16777215&this.result.fg)<<8|255;break;default:C=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:C=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:C=(16777215&this.result.bg)<<8|255}C=v.rgba.blend(C,4294967040&(this._coreBrowserService.isFocused?m.selectionBackgroundOpaque:m.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else C=(this._coreBrowserService.isFocused?m.selectionBackgroundOpaque:m.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(d=!0,m.selectionForeground&&(w=m.selectionForeground.rgba>>8&16777215,_=!0),(0,u.treatGlyphAsBackgroundColor)(S.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)w=(this._coreBrowserService.isFocused?m.selectionBackgroundOpaque:m.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:w=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:w=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:w=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:w=(16777215&this.result.fg)<<8|255;break;default:w=this._themeService.colors.foreground.rgba}w=v.rgba.blend(w,4294967040&(this._coreBrowserService.isFocused?m.selectionBackgroundOpaque:m.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}_=!0}}this._decorationService.forEachDecorationAtCell(E,L,"top",(O=>{O.backgroundColorRGB&&(C=O.backgroundColorRGB.rgba>>8&16777215,d=!0),O.foregroundColorRGB&&(w=O.foregroundColorRGB.rgba>>8&16777215,_=!0)})),d&&(C=y?-16777216&S.bg&-134217729|C|50331648:-16777216&S.bg|C|50331648),_&&(w=-16777216&S.fg&-67108865|w|50331648),67108864&this.result.fg&&(d&&!_&&(w=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&m.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,_=!0),!d&&_&&(C=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&m.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,d=!0)),m=void 0,this.result.bg=d?C:this.result.bg,this.result.fg=_?w:this.result.fg,this.result.ext&=536870911,this.result.ext|=b<<29&3758096384}}},627:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.removeTerminalFromCache=a.acquireTextureAtlas=void 0;const f=c(509),v=c(197),u=[];a.acquireTextureAtlas=function(m,w,C,_,d,y,b,S){const E=(0,v.generateConfig)(_,d,y,b,w,C,S);for(let O=0;O<u.length;O++){const M=u[O],D=M.ownedBy.indexOf(m);if(D>=0){if((0,v.configEquals)(M.config,E))return M.atlas;M.ownedBy.length===1?(M.atlas.dispose(),u.splice(O,1)):M.ownedBy.splice(D,1);break}}for(let O=0;O<u.length;O++){const M=u[O];if((0,v.configEquals)(M.config,E))return M.ownedBy.push(m),M.atlas}const L=m._core,x={atlas:new f.TextureAtlas(document,E,L.unicodeService),config:E,ownedBy:[m]};return u.push(x),x.atlas},a.removeTerminalFromCache=function(m){for(let w=0;w<u.length;w++){const C=u[w].ownedBy.indexOf(m);if(C!==-1){u[w].ownedBy.length===1?(u[w].atlas.dispose(),u.splice(w,1)):u[w].ownedBy.splice(C,1);break}}}},197:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.is256Color=a.configEquals=a.generateConfig=void 0;const f=c(160);a.generateConfig=function(v,u,m,w,C,_,d){const y={foreground:_.foreground,background:_.background,cursor:f.NULL_COLOR,cursorAccent:f.NULL_COLOR,selectionForeground:f.NULL_COLOR,selectionBackgroundTransparent:f.NULL_COLOR,selectionBackgroundOpaque:f.NULL_COLOR,selectionInactiveBackgroundTransparent:f.NULL_COLOR,selectionInactiveBackgroundOpaque:f.NULL_COLOR,ansi:_.ansi.slice(),contrastCache:_.contrastCache,halfContrastCache:_.halfContrastCache};return{customGlyphs:C.customGlyphs,devicePixelRatio:d,letterSpacing:C.letterSpacing,lineHeight:C.lineHeight,deviceCellWidth:v,deviceCellHeight:u,deviceCharWidth:m,deviceCharHeight:w,fontFamily:C.fontFamily,fontSize:C.fontSize,fontWeight:C.fontWeight,fontWeightBold:C.fontWeightBold,allowTransparency:C.allowTransparency,drawBoldTextInBrightColors:C.drawBoldTextInBrightColors,minimumContrastRatio:C.minimumContrastRatio,colors:y}},a.configEquals=function(v,u){for(let m=0;m<v.colors.ansi.length;m++)if(v.colors.ansi[m].rgba!==u.colors.ansi[m].rgba)return!1;return v.devicePixelRatio===u.devicePixelRatio&&v.customGlyphs===u.customGlyphs&&v.lineHeight===u.lineHeight&&v.letterSpacing===u.letterSpacing&&v.fontFamily===u.fontFamily&&v.fontSize===u.fontSize&&v.fontWeight===u.fontWeight&&v.fontWeightBold===u.fontWeightBold&&v.allowTransparency===u.allowTransparency&&v.deviceCharWidth===u.deviceCharWidth&&v.deviceCharHeight===u.deviceCharHeight&&v.drawBoldTextInBrightColors===u.drawBoldTextInBrightColors&&v.minimumContrastRatio===u.minimumContrastRatio&&v.colors.foreground.rgba===u.colors.foreground.rgba&&v.colors.background.rgba===u.colors.background.rgba},a.is256Color=function(v){return(50331648&v)==16777216||(50331648&v)==33554432}},237:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const f=c(399);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},457:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CursorBlinkStateManager=void 0,a.CursorBlinkStateManager=class{constructor(c,f){this._renderCallback=c,this._coreBrowserService=f,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))))}_restartInterval(c=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){const f=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,f>0)return void this._restartInterval(f)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0})),this._blinkInterval=this._coreBrowserService.window.setInterval((()=>{if(this._animationTimeRestarted){const f=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(f)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),c)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tryDrawCustomChar=a.powerlineDefinitions=a.boxDrawingDefinitions=a.blockElementDefinitions=void 0;const f=c(374);a.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const v={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};a.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(_,d)=>`M0,${.5-d} L1,${.5-d} M0,${.5+d} L1,${.5+d}`},"║":{1:(_,d)=>`M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1`},"╒":{1:(_,d)=>`M.5,1 L.5,${.5-d} L1,${.5-d} M.5,${.5+d} L1,${.5+d}`},"╓":{1:(_,d)=>`M${.5-_},1 L${.5-_},.5 L1,.5 M${.5+_},.5 L${.5+_},1`},"╔":{1:(_,d)=>`M1,${.5-d} L${.5-_},${.5-d} L${.5-_},1 M1,${.5+d} L${.5+_},${.5+d} L${.5+_},1`},"╕":{1:(_,d)=>`M0,${.5-d} L.5,${.5-d} L.5,1 M0,${.5+d} L.5,${.5+d}`},"╖":{1:(_,d)=>`M${.5+_},1 L${.5+_},.5 L0,.5 M${.5-_},.5 L${.5-_},1`},"╗":{1:(_,d)=>`M0,${.5+d} L${.5-_},${.5+d} L${.5-_},1 M0,${.5-d} L${.5+_},${.5-d} L${.5+_},1`},"╘":{1:(_,d)=>`M.5,0 L.5,${.5+d} L1,${.5+d} M.5,${.5-d} L1,${.5-d}`},"╙":{1:(_,d)=>`M1,.5 L${.5-_},.5 L${.5-_},0 M${.5+_},.5 L${.5+_},0`},"╚":{1:(_,d)=>`M1,${.5-d} L${.5+_},${.5-d} L${.5+_},0 M1,${.5+d} L${.5-_},${.5+d} L${.5-_},0`},"╛":{1:(_,d)=>`M0,${.5+d} L.5,${.5+d} L.5,0 M0,${.5-d} L.5,${.5-d}`},"╜":{1:(_,d)=>`M0,.5 L${.5+_},.5 L${.5+_},0 M${.5-_},.5 L${.5-_},0`},"╝":{1:(_,d)=>`M0,${.5-d} L${.5-_},${.5-d} L${.5-_},0 M0,${.5+d} L${.5+_},${.5+d} L${.5+_},0`},"╞":{1:(_,d)=>`M.5,0 L.5,1 M.5,${.5-d} L1,${.5-d} M.5,${.5+d} L1,${.5+d}`},"╟":{1:(_,d)=>`M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1 M${.5+_},.5 L1,.5`},"╠":{1:(_,d)=>`M${.5-_},0 L${.5-_},1 M1,${.5+d} L${.5+_},${.5+d} L${.5+_},1 M1,${.5-d} L${.5+_},${.5-d} L${.5+_},0`},"╡":{1:(_,d)=>`M.5,0 L.5,1 M0,${.5-d} L.5,${.5-d} M0,${.5+d} L.5,${.5+d}`},"╢":{1:(_,d)=>`M0,.5 L${.5-_},.5 M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1`},"╣":{1:(_,d)=>`M${.5+_},0 L${.5+_},1 M0,${.5+d} L${.5-_},${.5+d} L${.5-_},1 M0,${.5-d} L${.5-_},${.5-d} L${.5-_},0`},"╤":{1:(_,d)=>`M0,${.5-d} L1,${.5-d} M0,${.5+d} L1,${.5+d} M.5,${.5+d} L.5,1`},"╥":{1:(_,d)=>`M0,.5 L1,.5 M${.5-_},.5 L${.5-_},1 M${.5+_},.5 L${.5+_},1`},"╦":{1:(_,d)=>`M0,${.5-d} L1,${.5-d} M0,${.5+d} L${.5-_},${.5+d} L${.5-_},1 M1,${.5+d} L${.5+_},${.5+d} L${.5+_},1`},"╧":{1:(_,d)=>`M.5,0 L.5,${.5-d} M0,${.5-d} L1,${.5-d} M0,${.5+d} L1,${.5+d}`},"╨":{1:(_,d)=>`M0,.5 L1,.5 M${.5-_},.5 L${.5-_},0 M${.5+_},.5 L${.5+_},0`},"╩":{1:(_,d)=>`M0,${.5+d} L1,${.5+d} M0,${.5-d} L${.5-_},${.5-d} L${.5-_},0 M1,${.5-d} L${.5+_},${.5-d} L${.5+_},0`},"╪":{1:(_,d)=>`M.5,0 L.5,1 M0,${.5-d} L1,${.5-d} M0,${.5+d} L1,${.5+d}`},"╫":{1:(_,d)=>`M0,.5 L1,.5 M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1`},"╬":{1:(_,d)=>`M0,${.5+d} L${.5-_},${.5+d} L${.5-_},1 M1,${.5+d} L${.5+_},${.5+d} L${.5+_},1 M0,${.5-d} L${.5-_},${.5-d} L${.5-_},0 M1,${.5-d} L${.5+_},${.5-d} L${.5+_},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(_,d)=>`M.5,1 L.5,${.5+d/.15*.5} C.5,${.5+d/.15*.5},.5,.5,1,.5`},"╮":{1:(_,d)=>`M.5,1 L.5,${.5+d/.15*.5} C.5,${.5+d/.15*.5},.5,.5,0,.5`},"╯":{1:(_,d)=>`M.5,0 L.5,${.5-d/.15*.5} C.5,${.5-d/.15*.5},.5,.5,0,.5`},"╰":{1:(_,d)=>`M.5,0 L.5,${.5-d/.15*.5} C.5,${.5-d/.15*.5},.5,.5,1,.5`}},a.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},a.powerlineDefinitions[""]=a.powerlineDefinitions[""],a.powerlineDefinitions[""]=a.powerlineDefinitions[""],a.tryDrawCustomChar=function(_,d,y,b,S,E,L,x){const O=a.blockElementDefinitions[d];if(O)return(function(B,R,P,H,X,F){for(let K=0;K<R.length;K++){const Y=R[K],j=X/8,$=F/8;B.fillRect(P+Y.x*j,H+Y.y*$,Y.w*j,Y.h*$)}})(_,O,y,b,S,E),!0;const M=v[d];if(M)return(function(B,R,P,H,X,F){let K=u.get(R);K||(K=new Map,u.set(R,K));const Y=B.fillStyle;if(typeof Y!="string")throw new Error(`Unexpected fillStyle type "${Y}"`);let j=K.get(Y);if(!j){const $=R[0].length,N=R.length,U=B.canvas.ownerDocument.createElement("canvas");U.width=$,U.height=N;const J=(0,f.throwIfFalsy)(U.getContext("2d")),te=new ImageData($,N);let fe,ve,Z,W;if(Y.startsWith("#"))fe=parseInt(Y.slice(1,3),16),ve=parseInt(Y.slice(3,5),16),Z=parseInt(Y.slice(5,7),16),W=Y.length>7&&parseInt(Y.slice(7,9),16)||1;else{if(!Y.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${Y}" when drawing pattern glyph`);[fe,ve,Z,W]=Y.substring(5,Y.length-1).split(",").map((V=>parseFloat(V)))}for(let V=0;V<N;V++)for(let ee=0;ee<$;ee++)te.data[4*(V*$+ee)]=fe,te.data[4*(V*$+ee)+1]=ve,te.data[4*(V*$+ee)+2]=Z,te.data[4*(V*$+ee)+3]=R[V][ee]*(255*W);J.putImageData(te,0,0),j=(0,f.throwIfFalsy)(B.createPattern(U,null)),K.set(Y,j)}B.fillStyle=j,B.fillRect(P,H,X,F)})(_,M,y,b,S,E),!0;const D=a.boxDrawingDefinitions[d];if(D)return(function(B,R,P,H,X,F,K){B.strokeStyle=B.fillStyle;for(const[Y,j]of Object.entries(R)){let $;B.beginPath(),B.lineWidth=K*Number.parseInt(Y),$=typeof j=="function"?j(.15,.15/F*X):j;for(const N of $.split(" ")){const U=N[0],J=w[U];if(!J){console.error(`Could not find drawing instructions for "${U}"`);continue}const te=N.substring(1).split(",");te[0]&&te[1]&&J(B,C(te,X,F,P,H,!0,K))}B.stroke(),B.closePath()}})(_,D,y,b,S,E,x),!0;const k=a.powerlineDefinitions[d];return!!k&&((function(B,R,P,H,X,F,K,Y){const j=new Path2D;j.rect(P,H,X,F),B.clip(j),B.beginPath();const $=K/12;B.lineWidth=Y*$;for(const N of R.d.split(" ")){const U=N[0],J=w[U];if(!J){console.error(`Could not find drawing instructions for "${U}"`);continue}const te=N.substring(1).split(",");te[0]&&te[1]&&J(B,C(te,X,F,P,H,!1,Y,(R.leftPadding??0)*($/2),(R.rightPadding??0)*($/2)))}R.type===1?(B.strokeStyle=B.fillStyle,B.stroke()):B.fill(),B.closePath()})(_,k,y,b,S,E,L,x),!0)};const u=new Map;function m(_,d,y=0){return Math.max(Math.min(_,d),y)}const w={C:(_,d)=>_.bezierCurveTo(d[0],d[1],d[2],d[3],d[4],d[5]),L:(_,d)=>_.lineTo(d[0],d[1]),M:(_,d)=>_.moveTo(d[0],d[1])};function C(_,d,y,b,S,E,L,x=0,O=0){const M=_.map((D=>parseFloat(D)||parseInt(D)));if(M.length<2)throw new Error("Too few arguments for instruction");for(let D=0;D<M.length;D+=2)M[D]*=d-x*L-O*L,E&&M[D]!==0&&(M[D]=m(Math.round(M[D]+.5)-.5,d,0)),M[D]+=b+x*L;for(let D=1;D<M.length;D+=2)M[D]*=y,E&&M[D]!==0&&(M[D]=m(Math.round(M[D]+.5)-.5,y,0)),M[D]+=S;return M}},56:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.observeDevicePixelDimensions=void 0;const f=c(859);a.observeDevicePixelDimensions=function(v,u,m){let w=new u.ResizeObserver((C=>{const _=C.find((b=>b.target===v));if(!_)return;if(!("devicePixelContentBoxSize"in _))return w==null||w.disconnect(),void(w=void 0);const d=_.devicePixelContentBoxSize[0].inlineSize,y=_.devicePixelContentBoxSize[0].blockSize;d>0&&y>0&&m(d,y)}));try{w.observe(v,{box:["device-pixel-content-box"]})}catch{w.disconnect(),w=void 0}return(0,f.toDisposable)((()=>w==null?void 0:w.disconnect()))}},374:(g,a)=>{function c(v){return 57508<=v&&v<=57558}function f(v){return v>=128512&&v<=128591||v>=127744&&v<=128511||v>=128640&&v<=128767||v>=9728&&v<=9983||v>=9984&&v<=10175||v>=65024&&v<=65039||v>=129280&&v<=129535||v>=127462&&v<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(v){if(!v)throw new Error("value must not be falsy");return v},a.isPowerlineGlyph=c,a.isRestrictedPowerlineGlyph=function(v){return 57520<=v&&v<=57527},a.isEmoji=f,a.allowRescaling=function(v,u,m,w){return u===1&&m>Math.ceil(1.5*w)&&v!==void 0&&v>255&&!f(v)&&!c(v)&&!(function(C){return 57344<=C&&C<=63743})(v)},a.treatGlyphAsBackgroundColor=function(v){return c(v)||(function(u){return 9472<=u&&u<=9631})(v)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(v,u,m=0){return(v-(2*Math.round(u)-m))%(2*Math.round(u))}},296:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class c{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(v,u,m,w=!1){if(this.selectionStart=u,this.selectionEnd=m,!u||!m||u[0]===m[0]&&u[1]===m[1])return void this.clear();const C=v.buffers.active.ydisp,_=u[1]-C,d=m[1]-C,y=Math.max(_,0),b=Math.min(d,v.rows-1);y>=v.rows||b<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=_,this.viewportEndRow=d,this.viewportCappedStartRow=y,this.viewportCappedEndRow=b,this.startCol=u[0],this.endCol=m[0])}isCellSelected(v,u,m){return!!this.hasSelection&&(m-=v.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?u>=this.startCol&&m>=this.viewportCappedStartRow&&u<this.endCol&&m<=this.viewportCappedEndRow:u<this.startCol&&m>=this.viewportCappedStartRow&&u>=this.endCol&&m<=this.viewportCappedEndRow:m>this.viewportStartRow&&m<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&m===this.viewportStartRow&&u>=this.startCol&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportEndRow&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportStartRow&&u>=this.startCol)}}a.createSelectionRenderModel=function(){return new c}},509:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TextureAtlas=void 0;const f=c(237),v=c(860),u=c(374),m=c(160),w=c(345),C=c(485),_=c(385),d=c(147),y=c(855),b={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let S;class E{get pages(){return this._pages}constructor(D,k,B){this._document=D,this._config=k,this._unicodeService=B,this._didWarmUp=!1,this._cacheMap=new C.FourKeyMap,this._cacheMapCombined=new C.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new d.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new w.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new w.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=O(D,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,u.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const D of this.pages)D.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const D=new _.IdleTaskQueue;for(let k=33;k<126;k++)D.enqueue((()=>{if(!this._cacheMap.get(k,y.DEFAULT_COLOR,y.DEFAULT_COLOR,y.DEFAULT_EXT)){const B=this._drawToCache(k,y.DEFAULT_COLOR,y.DEFAULT_COLOR,y.DEFAULT_EXT);this._cacheMap.set(k,y.DEFAULT_COLOR,y.DEFAULT_COLOR,y.DEFAULT_EXT,B)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const D of this._pages)D.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(E.maxAtlasPages&&this._pages.length>=Math.max(4,E.maxAtlasPages)){const k=this._pages.filter((K=>2*K.canvas.width<=(E.maxTextureSize||4096))).sort(((K,Y)=>Y.canvas.width!==K.canvas.width?Y.canvas.width-K.canvas.width:Y.percentageUsed-K.percentageUsed));let B=-1,R=0;for(let K=0;K<k.length;K++)if(k[K].canvas.width!==R)B=K,R=k[K].canvas.width;else if(K-B==3)break;const P=k.slice(B,B+4),H=P.map((K=>K.glyphs[0].texturePage)).sort(((K,Y)=>K>Y?1:-1)),X=this.pages.length-P.length,F=this._mergePages(P,X);F.version++;for(let K=H.length-1;K>=0;K--)this._deletePage(H[K]);this.pages.push(F),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(F.canvas)}const D=new L(this._document,this._textureSize);return this._pages.push(D),this._activePages.push(D),this._onAddTextureAtlasCanvas.fire(D.canvas),D}_mergePages(D,k){const B=2*D[0].canvas.width,R=new L(this._document,B,D);for(const[P,H]of D.entries()){const X=P*H.canvas.width%B,F=Math.floor(P/2)*H.canvas.height;R.ctx.drawImage(H.canvas,X,F);for(const Y of H.glyphs)Y.texturePage=k,Y.sizeClipSpace.x=Y.size.x/B,Y.sizeClipSpace.y=Y.size.y/B,Y.texturePosition.x+=X,Y.texturePosition.y+=F,Y.texturePositionClipSpace.x=Y.texturePosition.x/B,Y.texturePositionClipSpace.y=Y.texturePosition.y/B;this._onRemoveTextureAtlasCanvas.fire(H.canvas);const K=this._activePages.indexOf(H);K!==-1&&this._activePages.splice(K,1)}return R}_deletePage(D){this._pages.splice(D,1);for(let k=D;k<this._pages.length;k++){const B=this._pages[k];for(const R of B.glyphs)R.texturePage--;B.version++}}getRasterizedGlyphCombinedChar(D,k,B,R,P){return this._getFromCacheMap(this._cacheMapCombined,D,k,B,R,P)}getRasterizedGlyph(D,k,B,R,P){return this._getFromCacheMap(this._cacheMap,D,k,B,R,P)}_getFromCacheMap(D,k,B,R,P,H=!1){return S=D.get(k,B,R,P),S||(S=this._drawToCache(k,B,R,P,H),D.set(k,B,R,P,S)),S}_getColorFromAnsiIndex(D){if(D>=this._config.colors.ansi.length)throw new Error("No color found for idx "+D);return this._config.colors.ansi[D]}_getBackgroundColor(D,k,B,R){if(this._config.allowTransparency)return m.NULL_COLOR;let P;switch(D){case 16777216:case 33554432:P=this._getColorFromAnsiIndex(k);break;case 50331648:const H=d.AttributeData.toColorRGB(k);P=m.channels.toColor(H[0],H[1],H[2]);break;default:P=B?m.color.opaque(this._config.colors.foreground):this._config.colors.background}return P}_getForegroundColor(D,k,B,R,P,H,X,F,K,Y){const j=this._getMinimumContrastColor(D,k,B,R,P,H,X,K,F,Y);if(j)return j;let $;switch(P){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&K&&H<8&&(H+=8),$=this._getColorFromAnsiIndex(H);break;case 50331648:const N=d.AttributeData.toColorRGB(H);$=m.channels.toColor(N[0],N[1],N[2]);break;default:$=X?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&($=m.color.opaque($)),F&&($=m.color.multiplyOpacity($,f.DIM_OPACITY)),$}_resolveBackgroundRgba(D,k,B){switch(D){case 16777216:case 33554432:return this._getColorFromAnsiIndex(k).rgba;case 50331648:return k<<8;default:return B?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(D,k,B,R){switch(D){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&R&&k<8&&(k+=8),this._getColorFromAnsiIndex(k).rgba;case 50331648:return k<<8;default:return B?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(D,k,B,R,P,H,X,F,K,Y){if(this._config.minimumContrastRatio===1||Y)return;const j=this._getContrastCache(K),$=j.getColor(D,R);if($!==void 0)return $||void 0;const N=this._resolveBackgroundRgba(k,B,X),U=this._resolveForegroundRgba(P,H,X,F),J=m.rgba.ensureContrastRatio(N,U,this._config.minimumContrastRatio/(K?2:1));if(!J)return void j.setColor(D,R,null);const te=m.channels.toColor(J>>24&255,J>>16&255,J>>8&255);return j.setColor(D,R,te),te}_getContrastCache(D){return D?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(D,k,B,R,P=!1){const H=typeof D=="number"?String.fromCharCode(D):D,X=Math.min(this._config.deviceCellWidth*Math.max(H.length,2)+4,this._textureSize);this._tmpCanvas.width<X&&(this._tmpCanvas.width=X);const F=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<F&&(this._tmpCanvas.height=F),this._tmpCtx.save(),this._workAttributeData.fg=B,this._workAttributeData.bg=k,this._workAttributeData.extended.ext=R,this._workAttributeData.isInvisible())return b;const K=!!this._workAttributeData.isBold(),Y=!!this._workAttributeData.isInverse(),j=!!this._workAttributeData.isDim(),$=!!this._workAttributeData.isItalic(),N=!!this._workAttributeData.isUnderline(),U=!!this._workAttributeData.isStrikethrough(),J=!!this._workAttributeData.isOverline();let te=this._workAttributeData.getFgColor(),fe=this._workAttributeData.getFgColorMode(),ve=this._workAttributeData.getBgColor(),Z=this._workAttributeData.getBgColorMode();if(Y){const ge=te;te=ve,ve=ge;const we=fe;fe=Z,Z=we}const W=this._getBackgroundColor(Z,ve,Y,j);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=W.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const V=K?this._config.fontWeightBold:this._config.fontWeight,ee=$?"italic":"";this._tmpCtx.font=`${ee} ${V} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=f.TEXT_BASELINE;const ue=H.length===1&&(0,u.isPowerlineGlyph)(H.charCodeAt(0)),ie=H.length===1&&(0,u.isRestrictedPowerlineGlyph)(H.charCodeAt(0)),me=this._getForegroundColor(k,Z,ve,B,fe,te,Y,j,K,(0,u.treatGlyphAsBackgroundColor)(H.charCodeAt(0)));this._tmpCtx.fillStyle=me.css;const de=ie?0:4;let Me=!1;this._config.customGlyphs!==!1&&(Me=(0,v.tryDrawCustomChar)(this._tmpCtx,H,de,de,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let ke,Ce=!ue;if(ke=typeof D=="number"?this._unicodeService.wcwidth(D):this._unicodeService.getStringCellWidth(D),N){this._tmpCtx.save();const ge=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),we=ge%2==1?.5:0;if(this._tmpCtx.lineWidth=ge,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())Ce=!1,this._tmpCtx.strokeStyle=`rgb(${d.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{Ce=!1;let qe=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&qe<8&&(qe+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(qe).css}this._tmpCtx.beginPath();const $e=de,Be=Math.ceil(de+this._config.deviceCharHeight)-we-(P?2*ge:0),It=Be+ge,ct=Be+2*ge;let mt=this._workAttributeData.getUnderlineVariantOffset();for(let qe=0;qe<ke;qe++){this._tmpCtx.save();const Pe=$e+qe*this._config.deviceCellWidth,Te=$e+(qe+1)*this._config.deviceCellWidth,lr=Pe+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(Pe,Be),this._tmpCtx.lineTo(Te,Be),this._tmpCtx.moveTo(Pe,ct),this._tmpCtx.lineTo(Te,ct);break;case 3:const _t=ge<=1?ct:Math.ceil(de+this._config.deviceCharHeight-ge/2)-we,Nt=ge<=1?Be:Math.ceil(de+this._config.deviceCharHeight+ge/2)-we,Rt=new Path2D;Rt.rect(Pe,Be,this._config.deviceCellWidth,ct-Be),this._tmpCtx.clip(Rt),this._tmpCtx.moveTo(Pe-this._config.deviceCellWidth/2,It),this._tmpCtx.bezierCurveTo(Pe-this._config.deviceCellWidth/2,Nt,Pe,Nt,Pe,It),this._tmpCtx.bezierCurveTo(Pe,_t,lr,_t,lr,It),this._tmpCtx.bezierCurveTo(lr,Nt,Te,Nt,Te,It),this._tmpCtx.bezierCurveTo(Te,_t,Te+this._config.deviceCellWidth/2,_t,Te+this._config.deviceCellWidth/2,It);break;case 4:const si=mt===0?0:mt>=ge?2*ge-mt:ge-mt;mt>=ge||si===0?(this._tmpCtx.setLineDash([Math.round(ge),Math.round(ge)]),this._tmpCtx.moveTo(Pe+si,Be),this._tmpCtx.lineTo(Te,Be)):(this._tmpCtx.setLineDash([Math.round(ge),Math.round(ge)]),this._tmpCtx.moveTo(Pe,Be),this._tmpCtx.lineTo(Pe+si,Be),this._tmpCtx.moveTo(Pe+si+ge,Be),this._tmpCtx.lineTo(Te,Be)),mt=(0,u.computeNextVariantOffset)(Te-Pe,ge,mt);break;case 5:const io=.6,no=.3,Nr=Te-Pe,_i=Math.floor(io*Nr),mi=Math.floor(no*Nr),ai=Nr-_i-mi;this._tmpCtx.setLineDash([_i,mi,ai]),this._tmpCtx.moveTo(Pe,Be),this._tmpCtx.lineTo(Te,Be);break;default:this._tmpCtx.moveTo(Pe,Be),this._tmpCtx.lineTo(Te,Be)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!Me&&this._config.fontSize>=12&&!this._config.allowTransparency&&H!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const qe=this._tmpCtx.measureText(H);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in qe&&qe.actualBoundingBoxDescent>0){this._tmpCtx.save();const Pe=new Path2D;Pe.rect($e,Be-Math.ceil(ge/2),this._config.deviceCellWidth*ke,ct-Be+Math.ceil(ge/2)),this._tmpCtx.clip(Pe),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=W.css,this._tmpCtx.strokeText(H,de,de+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(J){const ge=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),we=ge%2==1?.5:0;this._tmpCtx.lineWidth=ge,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(de,de+we),this._tmpCtx.lineTo(de+this._config.deviceCharWidth*ke,de+we),this._tmpCtx.stroke()}if(Me||this._tmpCtx.fillText(H,de,de+this._config.deviceCharHeight),H==="_"&&!this._config.allowTransparency){let ge=x(this._tmpCtx.getImageData(de,de,this._config.deviceCellWidth,this._config.deviceCellHeight),W,me,Ce);if(ge)for(let we=1;we<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=W.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(H,de,de+this._config.deviceCharHeight-we),ge=x(this._tmpCtx.getImageData(de,de,this._config.deviceCellWidth,this._config.deviceCellHeight),W,me,Ce),ge);we++);}if(U){const ge=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),we=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=ge,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(de,de+Math.floor(this._config.deviceCharHeight/2)-we),this._tmpCtx.lineTo(de+this._config.deviceCharWidth*ke,de+Math.floor(this._config.deviceCharHeight/2)-we),this._tmpCtx.stroke()}this._tmpCtx.restore();const Ve=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Dt;if(Dt=this._config.allowTransparency?(function(ge){for(let we=0;we<ge.data.length;we+=4)if(ge.data[we+3]>0)return!1;return!0})(Ve):x(Ve,W,me,Ce),Dt)return b;const Se=this._findGlyphBoundingBox(Ve,this._workBoundingBox,X,ie,Me,de);let ye,be;for(;;){if(this._activePages.length===0){const ge=this._createNewPage();ye=ge,be=ge.currentRow,be.height=Se.size.y;break}ye=this._activePages[this._activePages.length-1],be=ye.currentRow;for(const ge of this._activePages)Se.size.y<=ge.currentRow.height&&(ye=ge,be=ge.currentRow);for(let ge=this._activePages.length-1;ge>=0;ge--)for(const we of this._activePages[ge].fixedRows)we.height<=be.height&&Se.size.y<=we.height&&(ye=this._activePages[ge],be=we);if(be.y+Se.size.y>=ye.canvas.height||be.height>Se.size.y+2){let ge=!1;if(ye.currentRow.y+ye.currentRow.height+Se.size.y>=ye.canvas.height){let we;for(const $e of this._activePages)if($e.currentRow.y+$e.currentRow.height+Se.size.y<$e.canvas.height){we=$e;break}if(we)ye=we;else if(E.maxAtlasPages&&this._pages.length>=E.maxAtlasPages&&be.y+Se.size.y<=ye.canvas.height&&be.height>=Se.size.y&&be.x+Se.size.x<=ye.canvas.width)ge=!0;else{const $e=this._createNewPage();ye=$e,be=$e.currentRow,be.height=Se.size.y,ge=!0}}ge||(ye.currentRow.height>0&&ye.fixedRows.push(ye.currentRow),be={x:0,y:ye.currentRow.y+ye.currentRow.height,height:Se.size.y},ye.fixedRows.push(be),ye.currentRow={x:0,y:be.y+be.height,height:0})}if(be.x+Se.size.x<=ye.canvas.width)break;be===ye.currentRow?(be.x=0,be.y+=be.height,be.height=0):ye.fixedRows.splice(ye.fixedRows.indexOf(be),1)}return Se.texturePage=this._pages.indexOf(ye),Se.texturePosition.x=be.x,Se.texturePosition.y=be.y,Se.texturePositionClipSpace.x=be.x/ye.canvas.width,Se.texturePositionClipSpace.y=be.y/ye.canvas.height,Se.sizeClipSpace.x/=ye.canvas.width,Se.sizeClipSpace.y/=ye.canvas.height,be.height=Math.max(be.height,Se.size.y),be.x+=Se.size.x,ye.ctx.putImageData(Ve,Se.texturePosition.x-this._workBoundingBox.left,Se.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Se.size.x,Se.size.y),ye.addGlyph(Se),ye.version++,Se}_findGlyphBoundingBox(D,k,B,R,P,H){k.top=0;const X=R?this._config.deviceCellHeight:this._tmpCanvas.height,F=R?this._config.deviceCellWidth:B;let K=!1;for(let Y=0;Y<X;Y++){for(let j=0;j<F;j++){const $=Y*this._tmpCanvas.width*4+4*j+3;if(D.data[$]!==0){k.top=Y,K=!0;break}}if(K)break}k.left=0,K=!1;for(let Y=0;Y<H+F;Y++){for(let j=0;j<X;j++){const $=j*this._tmpCanvas.width*4+4*Y+3;if(D.data[$]!==0){k.left=Y,K=!0;break}}if(K)break}k.right=F,K=!1;for(let Y=H+F-1;Y>=H;Y--){for(let j=0;j<X;j++){const $=j*this._tmpCanvas.width*4+4*Y+3;if(D.data[$]!==0){k.right=Y,K=!0;break}}if(K)break}k.bottom=X,K=!1;for(let Y=X-1;Y>=0;Y--){for(let j=0;j<F;j++){const $=Y*this._tmpCanvas.width*4+4*j+3;if(D.data[$]!==0){k.bottom=Y,K=!0;break}}if(K)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:k.right-k.left+1,y:k.bottom-k.top+1},sizeClipSpace:{x:k.right-k.left+1,y:k.bottom-k.top+1},offset:{x:-k.left+H+(R||P?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-k.top+H+(R||P?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}a.TextureAtlas=E;class L{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(D){this._glyphs.push(D),this._usedPixels+=D.size.x*D.size.y}constructor(D,k,B){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],B)for(const R of B)this._glyphs.push(...R.glyphs),this._usedPixels+=R._usedPixels;this.canvas=O(D,k,k),this.ctx=(0,u.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}}function x(M,D,k,B){const R=D.rgba>>>24,P=D.rgba>>>16&255,H=D.rgba>>>8&255,X=k.rgba>>>24,F=k.rgba>>>16&255,K=k.rgba>>>8&255,Y=Math.floor((Math.abs(R-X)+Math.abs(P-F)+Math.abs(H-K))/12);let j=!0;for(let $=0;$<M.data.length;$+=4)M.data[$]===R&&M.data[$+1]===P&&M.data[$+2]===H||B&&Math.abs(M.data[$]-R)+Math.abs(M.data[$+1]-P)+Math.abs(M.data[$+2]-H)<Y?M.data[$+3]=0:j=!1;return j}function O(M,D,k){const B=M.createElement("canvas");return B.width=D,B.height=k,B}},160:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let c=0,f=0,v=0,u=0;var m,w,C,_,d;function y(S){const E=S.toString(16);return E.length<2?"0"+E:E}function b(S,E){return S<E?(E+.05)/(S+.05):(S+.05)/(E+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(S){S.toCss=function(E,L,x,O){return O!==void 0?`#${y(E)}${y(L)}${y(x)}${y(O)}`:`#${y(E)}${y(L)}${y(x)}`},S.toRgba=function(E,L,x,O=255){return(E<<24|L<<16|x<<8|O)>>>0},S.toColor=function(E,L,x,O){return{css:S.toCss(E,L,x,O),rgba:S.toRgba(E,L,x,O)}}})(m||(a.channels=m={})),(function(S){function E(L,x){return u=Math.round(255*x),[c,f,v]=d.toChannels(L.rgba),{css:m.toCss(c,f,v,u),rgba:m.toRgba(c,f,v,u)}}S.blend=function(L,x){if(u=(255&x.rgba)/255,u===1)return{css:x.css,rgba:x.rgba};const O=x.rgba>>24&255,M=x.rgba>>16&255,D=x.rgba>>8&255,k=L.rgba>>24&255,B=L.rgba>>16&255,R=L.rgba>>8&255;return c=k+Math.round((O-k)*u),f=B+Math.round((M-B)*u),v=R+Math.round((D-R)*u),{css:m.toCss(c,f,v),rgba:m.toRgba(c,f,v)}},S.isOpaque=function(L){return(255&L.rgba)==255},S.ensureContrastRatio=function(L,x,O){const M=d.ensureContrastRatio(L.rgba,x.rgba,O);if(M)return m.toColor(M>>24&255,M>>16&255,M>>8&255)},S.opaque=function(L){const x=(255|L.rgba)>>>0;return[c,f,v]=d.toChannels(x),{css:m.toCss(c,f,v),rgba:x}},S.opacity=E,S.multiplyOpacity=function(L,x){return u=255&L.rgba,E(L,u*x/255)},S.toColorRGB=function(L){return[L.rgba>>24&255,L.rgba>>16&255,L.rgba>>8&255]}})(w||(a.color=w={})),(function(S){let E,L;try{const x=document.createElement("canvas");x.width=1,x.height=1;const O=x.getContext("2d",{willReadFrequently:!0});O&&(E=O,E.globalCompositeOperation="copy",L=E.createLinearGradient(0,0,1,1))}catch{}S.toColor=function(x){if(x.match(/#[\da-f]{3,8}/i))switch(x.length){case 4:return c=parseInt(x.slice(1,2).repeat(2),16),f=parseInt(x.slice(2,3).repeat(2),16),v=parseInt(x.slice(3,4).repeat(2),16),m.toColor(c,f,v);case 5:return c=parseInt(x.slice(1,2).repeat(2),16),f=parseInt(x.slice(2,3).repeat(2),16),v=parseInt(x.slice(3,4).repeat(2),16),u=parseInt(x.slice(4,5).repeat(2),16),m.toColor(c,f,v,u);case 7:return{css:x,rgba:(parseInt(x.slice(1),16)<<8|255)>>>0};case 9:return{css:x,rgba:parseInt(x.slice(1),16)>>>0}}const O=x.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 c=parseInt(O[1]),f=parseInt(O[2]),v=parseInt(O[3]),u=Math.round(255*(O[5]===void 0?1:parseFloat(O[5]))),m.toColor(c,f,v,u);if(!E||!L)throw new Error("css.toColor: Unsupported css format");if(E.fillStyle=L,E.fillStyle=x,typeof E.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(E.fillRect(0,0,1,1),[c,f,v,u]=E.getImageData(0,0,1,1).data,u!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:m.toRgba(c,f,v,u),css:x}}})(C||(a.css=C={})),(function(S){function E(L,x,O){const M=L/255,D=x/255,k=O/255;return .2126*(M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4))+.7152*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.0722*(k<=.03928?k/12.92:Math.pow((k+.055)/1.055,2.4))}S.relativeLuminance=function(L){return E(L>>16&255,L>>8&255,255&L)},S.relativeLuminance2=E})(_||(a.rgb=_={})),(function(S){function E(x,O,M){const D=x>>24&255,k=x>>16&255,B=x>>8&255;let R=O>>24&255,P=O>>16&255,H=O>>8&255,X=b(_.relativeLuminance2(R,P,H),_.relativeLuminance2(D,k,B));for(;X<M&&(R>0||P>0||H>0);)R-=Math.max(0,Math.ceil(.1*R)),P-=Math.max(0,Math.ceil(.1*P)),H-=Math.max(0,Math.ceil(.1*H)),X=b(_.relativeLuminance2(R,P,H),_.relativeLuminance2(D,k,B));return(R<<24|P<<16|H<<8|255)>>>0}function L(x,O,M){const D=x>>24&255,k=x>>16&255,B=x>>8&255;let R=O>>24&255,P=O>>16&255,H=O>>8&255,X=b(_.relativeLuminance2(R,P,H),_.relativeLuminance2(D,k,B));for(;X<M&&(R<255||P<255||H<255);)R=Math.min(255,R+Math.ceil(.1*(255-R))),P=Math.min(255,P+Math.ceil(.1*(255-P))),H=Math.min(255,H+Math.ceil(.1*(255-H))),X=b(_.relativeLuminance2(R,P,H),_.relativeLuminance2(D,k,B));return(R<<24|P<<16|H<<8|255)>>>0}S.blend=function(x,O){if(u=(255&O)/255,u===1)return O;const M=O>>24&255,D=O>>16&255,k=O>>8&255,B=x>>24&255,R=x>>16&255,P=x>>8&255;return c=B+Math.round((M-B)*u),f=R+Math.round((D-R)*u),v=P+Math.round((k-P)*u),m.toRgba(c,f,v)},S.ensureContrastRatio=function(x,O,M){const D=_.relativeLuminance(x>>8),k=_.relativeLuminance(O>>8);if(b(D,k)<M){if(k<D){const P=E(x,O,M),H=b(D,_.relativeLuminance(P>>8));if(H<M){const X=L(x,O,M);return H>b(D,_.relativeLuminance(X>>8))?P:X}return P}const B=L(x,O,M),R=b(D,_.relativeLuminance(B>>8));if(R<M){const P=E(x,O,M);return R>b(D,_.relativeLuminance(P>>8))?B:P}return B}},S.reduceLuminance=E,S.increaseLuminance=L,S.toChannels=function(x){return[x>>24&255,x>>16&255,x>>8&255,255&x]}})(d||(a.rgba=d={})),a.toPaddedHex=y,a.contrastRatio=b},345:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===c)return void this._listeners.splice(f,1)}}})),this._event}fire(c,f){const v=[];for(let u=0;u<this._listeners.length;u++)v.push(this._listeners[u]);for(let u=0;u<v.length;u++)v[u].call(void 0,c,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(c,f){return c((v=>f.fire(v)))},a.runAndSubscribe=function(c,f){return f(void 0),c((v=>f(v)))}},859:(g,a)=>{function c(f){for(const v of f)v.dispose();f.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const v=this._disposables.indexOf(f);v!==-1&&this._disposables.splice(v,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(f){var v;this._isDisposed||f===this._value||((v=this._value)==null||v.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)==null||f.dispose(),this._value=void 0}},a.toDisposable=function(f){return{dispose:f}},a.disposeArray=c,a.getDisposeArrayDisposable=function(f){return{dispose:()=>c(f)}}},485:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(v,u,m){this._data[v]||(this._data[v]={}),this._data[v][u]=m}get(v,u){return this._data[v]?this._data[v][u]:void 0}clear(){this._data={}}}a.TwoKeyMap=c,a.FourKeyMap=class{constructor(){this._data=new c}set(f,v,u,m,w){this._data.get(f,v)||this._data.set(f,v,new c),this._data.get(f,v).set(u,m,w)}get(f,v,u,m){var w;return(w=this._data.get(f,v))==null?void 0:w.get(u,m)}clear(){this._data.clear()}}},399:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const c=a.isNode?"node":navigator.userAgent,f=a.isNode?"node":navigator.platform;a.isFirefox=c.includes("Firefox"),a.isLegacyEdge=c.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(c),a.getSafariVersion=function(){if(!a.isSafari)return 0;const v=c.match(/Version\/(\d+)/);return v===null||v.length<2?0:parseInt(v[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),a.isIpad=f==="iPad",a.isIphone=f==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),a.isLinux=f.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(c)},385:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const f=c(399);class v{constructor(){this._tasks=[],this._i=0}enqueue(w){this._tasks.push(w),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(w){this._idleCallback=void 0;let C=0,_=0,d=w.timeRemaining(),y=0;for(;this._i<this._tasks.length;){if(C=Date.now(),this._tasks[this._i]()||this._i++,C=Math.max(1,Date.now()-C),_=Math.max(C,_),y=w.timeRemaining(),1.5*_>y)return d-C<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(d-C))}ms`),void this._start();d=y}this.clear()}}class u extends v{_requestCallback(w){return setTimeout((()=>w(this._createDeadline(16))))}_cancelCallback(w){clearTimeout(w)}_createDeadline(w){const C=Date.now()+w;return{timeRemaining:()=>Math.max(0,C-Date.now())}}}a.PriorityTaskQueue=u,a.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends v{_requestCallback(m){return requestIdleCallback(m)}_cancelCallback(m){cancelIdleCallback(m)}}:u,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(m){this._queue.clear(),this._queue.enqueue(m)}flush(){this._queue.flush()}}},147:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(u){return[u>>>16&255,u>>>8&255,255&u]}static fromColorRGB(u){return(255&u[0])<<16|(255&u[1])<<8|255&u[2]}clone(){const u=new c;return u.fg=this.fg,u.bg=this.bg,u.extended=this.extended.clone(),u}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=c;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(u){this._ext=u}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(u){this._ext&=-469762049,this._ext|=u<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(u){this._ext&=-67108864,this._ext|=67108863&u}get urlId(){return this._urlId}set urlId(u){this._urlId=u}get underlineVariantOffset(){const u=(3758096384&this._ext)>>29;return u<0?4294967288^u:u}set underlineVariantOffset(u){this._ext&=536870911,this._ext|=u<<29&3758096384}constructor(u=0,m=0){this._ext=0,this._urlId=0,this._ext=u,this._urlId=m}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=f},782:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const f=c(133),v=c(855),u=c(147);class m extends u.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new u.ExtendedAttrs,this.combinedData=""}static fromCharData(C){const _=new m;return _.setFromCharData(C),_}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(C){this.fg=C[v.CHAR_DATA_ATTR_INDEX],this.bg=0;let _=!1;if(C[v.CHAR_DATA_CHAR_INDEX].length>2)_=!0;else if(C[v.CHAR_DATA_CHAR_INDEX].length===2){const d=C[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=d&&d<=56319){const y=C[v.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=y&&y<=57343?this.content=1024*(d-55296)+y-56320+65536|C[v.CHAR_DATA_WIDTH_INDEX]<<22:_=!0}else _=!0}else this.content=C[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|C[v.CHAR_DATA_WIDTH_INDEX]<<22;_&&(this.combinedData=C[v.CHAR_DATA_CHAR_INDEX],this.content=2097152|C[v.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=m},855:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},133:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},a.utf32ToString=function(c,f=0,v=c.length){let u="";for(let m=f;m<v;++m){let w=c[m];w>65535?(w-=65536,u+=String.fromCharCode(55296+(w>>10))+String.fromCharCode(w%1024+56320)):u+=String.fromCharCode(w)}return u},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,f){const v=c.length;if(!v)return 0;let u=0,m=0;if(this._interim){const w=c.charCodeAt(m++);56320<=w&&w<=57343?f[u++]=1024*(this._interim-55296)+w-56320+65536:(f[u++]=this._interim,f[u++]=w),this._interim=0}for(let w=m;w<v;++w){const C=c.charCodeAt(w);if(55296<=C&&C<=56319){if(++w>=v)return this._interim=C,u;const _=c.charCodeAt(w);56320<=_&&_<=57343?f[u++]=1024*(C-55296)+_-56320+65536:(f[u++]=C,f[u++]=_)}else C!==65279&&(f[u++]=C)}return u}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,f){const v=c.length;if(!v)return 0;let u,m,w,C,_=0,d=0,y=0;if(this.interim[0]){let E=!1,L=this.interim[0];L&=(224&L)==192?31:(240&L)==224?15:7;let x,O=0;for(;(x=63&this.interim[++O])&&O<4;)L<<=6,L|=x;const M=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,D=M-O;for(;y<D;){if(y>=v)return 0;if(x=c[y++],(192&x)!=128){y--,E=!0;break}this.interim[O++]=x,L<<=6,L|=63&x}E||(M===2?L<128?y--:f[_++]=L:M===3?L<2048||L>=55296&&L<=57343||L===65279||(f[_++]=L):L<65536||L>1114111||(f[_++]=L)),this.interim.fill(0)}const b=v-4;let S=y;for(;S<v;){for(;!(!(S<b)||128&(u=c[S])||128&(m=c[S+1])||128&(w=c[S+2])||128&(C=c[S+3]));)f[_++]=u,f[_++]=m,f[_++]=w,f[_++]=C,S+=4;if(u=c[S++],u<128)f[_++]=u;else if((224&u)==192){if(S>=v)return this.interim[0]=u,_;if(m=c[S++],(192&m)!=128){S--;continue}if(d=(31&u)<<6|63&m,d<128){S--;continue}f[_++]=d}else if((240&u)==224){if(S>=v)return this.interim[0]=u,_;if(m=c[S++],(192&m)!=128){S--;continue}if(S>=v)return this.interim[0]=u,this.interim[1]=m,_;if(w=c[S++],(192&w)!=128){S--;continue}if(d=(15&u)<<12|(63&m)<<6|63&w,d<2048||d>=55296&&d<=57343||d===65279)continue;f[_++]=d}else if((248&u)==240){if(S>=v)return this.interim[0]=u,_;if(m=c[S++],(192&m)!=128){S--;continue}if(S>=v)return this.interim[0]=u,this.interim[1]=m,_;if(w=c[S++],(192&w)!=128){S--;continue}if(S>=v)return this.interim[0]=u,this.interim[1]=m,this.interim[2]=w,_;if(C=c[S++],(192&C)!=128){S--;continue}if(d=(7&u)<<18|(63&m)<<12|(63&w)<<6|63&C,d<65536||d>1114111)continue;f[_++]=d}}return _}}},776:function(g,a,c){var f=this&&this.__decorate||function(d,y,b,S){var E,L=arguments.length,x=L<3?y:S===null?S=Object.getOwnPropertyDescriptor(y,b):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(d,y,b,S);else for(var O=d.length-1;O>=0;O--)(E=d[O])&&(x=(L<3?E(x):L>3?E(y,b,x):E(y,b))||x);return L>3&&x&&Object.defineProperty(y,b,x),x},v=this&&this.__param||function(d,y){return function(b,S){y(b,S,d)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const u=c(859),m=c(97),w={trace:m.LogLevelEnum.TRACE,debug:m.LogLevelEnum.DEBUG,info:m.LogLevelEnum.INFO,warn:m.LogLevelEnum.WARN,error:m.LogLevelEnum.ERROR,off:m.LogLevelEnum.OFF};let C,_=a.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(d){super(),this._optionsService=d,this._logLevel=m.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),C=this}_updateLogLevel(){this._logLevel=w[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(d){for(let y=0;y<d.length;y++)typeof d[y]=="function"&&(d[y]=d[y]())}_log(d,y,b){this._evalLazyOptionalParams(b),d.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+y,...b)}trace(d,...y){var b;this._logLevel<=m.LogLevelEnum.TRACE&&this._log(((b=this._optionsService.options.logger)==null?void 0:b.trace.bind(this._optionsService.options.logger))??console.log,d,y)}debug(d,...y){var b;this._logLevel<=m.LogLevelEnum.DEBUG&&this._log(((b=this._optionsService.options.logger)==null?void 0:b.debug.bind(this._optionsService.options.logger))??console.log,d,y)}info(d,...y){var b;this._logLevel<=m.LogLevelEnum.INFO&&this._log(((b=this._optionsService.options.logger)==null?void 0:b.info.bind(this._optionsService.options.logger))??console.info,d,y)}warn(d,...y){var b;this._logLevel<=m.LogLevelEnum.WARN&&this._log(((b=this._optionsService.options.logger)==null?void 0:b.warn.bind(this._optionsService.options.logger))??console.warn,d,y)}error(d,...y){var b;this._logLevel<=m.LogLevelEnum.ERROR&&this._log(((b=this._optionsService.options.logger)==null?void 0:b.error.bind(this._optionsService.options.logger))??console.error,d,y)}};a.LogService=_=f([v(0,m.IOptionsService)],_),a.setTraceLogger=function(d){C=d},a.traceCall=function(d,y,b){if(typeof b.value!="function")throw new Error("not supported");const S=b.value;b.value=function(...E){if(C.logLevel!==m.LogLevelEnum.TRACE)return S.apply(this,E);C.trace(`GlyphRenderer#${S.name}(${E.map((x=>JSON.stringify(x))).join(", ")})`);const L=S.apply(this,E);return C.trace(`GlyphRenderer#${S.name} return`,L),L}}},726:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const c="di$target",f="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(v){return v[f]||[]},a.createDecorator=function(v){if(a.serviceRegistry.has(v))return a.serviceRegistry.get(v);const u=function(m,w,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(_,d,y){d[c]===d?d[f].push({id:_,index:y}):(d[f]=[{id:_,index:y}],d[c]=d)})(u,m,C)};return u.toString=()=>v,a.serviceRegistry.set(v,u),u}},97:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const f=c(726);var v;a.IBufferService=(0,f.createDecorator)("BufferService"),a.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),a.ICoreService=(0,f.createDecorator)("CoreService"),a.ICharsetService=(0,f.createDecorator)("CharsetService"),a.IInstantiationService=(0,f.createDecorator)("InstantiationService"),(function(u){u[u.TRACE=0]="TRACE",u[u.DEBUG=1]="DEBUG",u[u.INFO=2]="INFO",u[u.WARN=3]="WARN",u[u.ERROR=4]="ERROR",u[u.OFF=5]="OFF"})(v||(a.LogLevelEnum=v={})),a.ILogService=(0,f.createDecorator)("LogService"),a.IOptionsService=(0,f.createDecorator)("OptionsService"),a.IOscLinkService=(0,f.createDecorator)("OscLinkService"),a.IUnicodeService=(0,f.createDecorator)("UnicodeService"),a.IDecorationService=(0,f.createDecorator)("DecorationService")}},n={};function o(g){var a=n[g];if(a!==void 0)return a.exports;var c=n[g]={exports:{}};return r[g].call(c.exports,c,c.exports,o),c.exports}var h={};return(()=>{var g=h;Object.defineProperty(g,"__esModule",{value:!0}),g.WebglAddon=void 0;const a=o(345),c=o(859),f=o(399),v=o(666),u=o(776);class m extends c.Disposable{constructor(C){if(f.isSafari&&(0,f.getSafariVersion)()<16){const _={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",_))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=C,this._onChangeTextureAtlas=this.register(new a.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new a.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new a.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new a.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(C){const _=C._core;if(!C.element)return void this.register(_.onWillOpen((()=>this.activate(C))));this._terminal=C;const d=_.coreService,y=_.optionsService,b=_,S=b._renderService,E=b._characterJoinerService,L=b._charSizeService,x=b._coreBrowserService,O=b._decorationService,M=b._logService,D=b._themeService;(0,u.setTraceLogger)(M),this._renderer=this.register(new v.WebglRenderer(C,E,L,x,d,O,y,D,this._preserveDrawingBuffer)),this.register((0,a.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,a.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,a.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,a.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),S.setRenderer(this._renderer),this.register((0,c.toDisposable)((()=>{const k=this._terminal._core._renderService;k.setRenderer(this._terminal._core._createRenderer()),k.handleResize(C.cols,C.rows)})))}get textureAtlas(){var C;return(C=this._renderer)==null?void 0:C.textureAtlas}clearTextureAtlas(){var C;(C=this._renderer)==null||C.clearTextureAtlas()}}g.WebglAddon=m})(),h})()))})(Rv)),Rv.exports}var iR=rR(),kv={exports:{}},sS;function nR(){return sS||(sS=1,(function(e,t){(function(r,n){e.exports=n()})(self,(()=>(()=>{var r={903:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BaseRenderLayer=void 0;const f=c(274),v=c(627),u=c(237),m=c(860),w=c(374),C=c(296),_=c(345),d=c(859),y=c(399),b=c(855);class S extends d.Disposable{get canvas(){return this._canvas}get cacheCanvas(){var x;return(x=this._charAtlas)==null?void 0:x.pages[0].canvas}constructor(x,O,M,D,k,B,R,P,H,X){super(),this._terminal=x,this._container=O,this._alpha=k,this._themeService=B,this._bufferService=R,this._optionsService=P,this._decorationService=H,this._coreBrowserService=X,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._selectionModel=(0,C.createSelectionRenderModel)(),this._bitmapGenerator=[],this._charAtlasDisposable=this.register(new d.MutableDisposable),this._onAddTextureAtlasCanvas=this.register(new _.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._cellColorResolver=new f.CellColorResolver(this._terminal,this._optionsService,this._selectionModel,this._decorationService,this._coreBrowserService,this._themeService),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${M}-layer`),this._canvas.style.zIndex=D.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._refreshCharAtlas(this._themeService.colors),this.register(this._themeService.onChangeColors((F=>{this._refreshCharAtlas(F),this.reset(),this.handleSelectionChanged(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}))),this.register((0,d.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,w.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(){}handleFocus(){}handleCursorMove(){}handleGridChanged(x,O){}handleSelectionChanged(x,O,M=!1){this._selectionModel.update(this._terminal._core,x,O,M)}_setTransparency(x){if(x===this._alpha)return;const O=this._canvas;this._alpha=x,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,O),this._refreshCharAtlas(this._themeService.colors),this.handleGridChanged(0,this._bufferService.rows-1)}_refreshCharAtlas(x){if(!(this._deviceCharWidth<=0&&this._deviceCharHeight<=0)){this._charAtlas=(0,v.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,x,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlasDisposable.value=(0,_.forwardEvent)(this._charAtlas.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),this._charAtlas.warmUp();for(let O=0;O<this._charAtlas.pages.length;O++)this._bitmapGenerator[O]=new E(this._charAtlas.pages[O].canvas)}}resize(x){this._deviceCellWidth=x.device.cell.width,this._deviceCellHeight=x.device.cell.height,this._deviceCharWidth=x.device.char.width,this._deviceCharHeight=x.device.char.height,this._deviceCharLeft=x.device.char.left,this._deviceCharTop=x.device.char.top,this._canvas.width=x.device.canvas.width,this._canvas.height=x.device.canvas.height,this._canvas.style.width=`${x.css.canvas.width}px`,this._canvas.style.height=`${x.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(this._themeService.colors)}clearTextureAtlas(){var x;(x=this._charAtlas)==null||x.clearTexture()}_fillCells(x,O,M,D){this._ctx.fillRect(x*this._deviceCellWidth,O*this._deviceCellHeight,M*this._deviceCellWidth,D*this._deviceCellHeight)}_fillMiddleLineAtCells(x,O,M=1){const D=Math.ceil(.5*this._deviceCellHeight);this._ctx.fillRect(x*this._deviceCellWidth,(O+1)*this._deviceCellHeight-D-this._coreBrowserService.dpr,M*this._deviceCellWidth,this._coreBrowserService.dpr)}_fillBottomLineAtCells(x,O,M=1,D=0){this._ctx.fillRect(x*this._deviceCellWidth,(O+1)*this._deviceCellHeight+D-this._coreBrowserService.dpr-1,M*this._deviceCellWidth,this._coreBrowserService.dpr)}_curlyUnderlineAtCell(x,O,M=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const D=this._coreBrowserService.dpr;this._ctx.lineWidth=D;for(let k=0;k<M;k++){const B=(x+k)*this._deviceCellWidth,R=(x+k+.5)*this._deviceCellWidth,P=(x+k+1)*this._deviceCellWidth,H=(O+1)*this._deviceCellHeight-D-1,X=H-D,F=H+D;this._ctx.moveTo(B,H),this._ctx.bezierCurveTo(B,X,R,X,R,H),this._ctx.bezierCurveTo(R,F,P,F,P,H)}this._ctx.stroke(),this._ctx.restore()}_dottedUnderlineAtCell(x,O,M=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const D=this._coreBrowserService.dpr;this._ctx.lineWidth=D,this._ctx.setLineDash([2*D,D]);const k=x*this._deviceCellWidth,B=(O+1)*this._deviceCellHeight-D-1;this._ctx.moveTo(k,B);for(let R=0;R<M;R++){const P=(x+M+R)*this._deviceCellWidth;this._ctx.lineTo(P,B)}this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_dashedUnderlineAtCell(x,O,M=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const D=this._coreBrowserService.dpr;this._ctx.lineWidth=D,this._ctx.setLineDash([4*D,3*D]);const k=x*this._deviceCellWidth,B=(x+M)*this._deviceCellWidth,R=(O+1)*this._deviceCellHeight-D-1;this._ctx.moveTo(k,R),this._ctx.lineTo(B,R),this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_fillLeftLineAtCell(x,O,M){this._ctx.fillRect(x*this._deviceCellWidth,O*this._deviceCellHeight,this._coreBrowserService.dpr*M,this._deviceCellHeight)}_strokeRectAtCell(x,O,M,D){const k=this._coreBrowserService.dpr;this._ctx.lineWidth=k,this._ctx.strokeRect(x*this._deviceCellWidth+k/2,O*this._deviceCellHeight+k/2,M*this._deviceCellWidth-k,D*this._deviceCellHeight-k)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(x,O,M,D){this._alpha?this._ctx.clearRect(x*this._deviceCellWidth,O*this._deviceCellHeight,M*this._deviceCellWidth,D*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(x*this._deviceCellWidth,O*this._deviceCellHeight,M*this._deviceCellWidth,D*this._deviceCellHeight))}_fillCharTrueColor(x,O,M){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=u.TEXT_BASELINE,this._clipRow(M);let D=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(D=(0,m.tryDrawCustomChar)(this._ctx,x.getChars(),O*this._deviceCellWidth,M*this._deviceCellHeight,this._deviceCellWidth,this._deviceCellHeight,this._optionsService.rawOptions.fontSize,this._coreBrowserService.dpr)),D||this._ctx.fillText(x.getChars(),O*this._deviceCellWidth+this._deviceCharLeft,M*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_drawChars(x,O,M){var H,X,F,K;const D=x.getChars(),k=x.getCode(),B=x.getWidth();if(this._cellColorResolver.resolve(x,O,this._bufferService.buffer.ydisp+M,this._deviceCellWidth),!this._charAtlas)return;let R;if(R=D&&D.length>1?this._charAtlas.getRasterizedGlyphCombinedChar(D,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0):this._charAtlas.getRasterizedGlyph(x.getCode()||b.WHITESPACE_CELL_CODE,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0),!R.size.x||!R.size.y)return;this._ctx.save(),this._clipRow(M),this._bitmapGenerator[R.texturePage]&&this._charAtlas.pages[R.texturePage].canvas!==this._bitmapGenerator[R.texturePage].canvas&&((X=(H=this._bitmapGenerator[R.texturePage])==null?void 0:H.bitmap)==null||X.close(),delete this._bitmapGenerator[R.texturePage]),this._charAtlas.pages[R.texturePage].version!==((F=this._bitmapGenerator[R.texturePage])==null?void 0:F.version)&&(this._bitmapGenerator[R.texturePage]||(this._bitmapGenerator[R.texturePage]=new E(this._charAtlas.pages[R.texturePage].canvas)),this._bitmapGenerator[R.texturePage].refresh(),this._bitmapGenerator[R.texturePage].version=this._charAtlas.pages[R.texturePage].version);let P=R.size.x;this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,w.allowRescaling)(k,B,R.size.x,this._deviceCellWidth)&&(P=this._deviceCellWidth-1),this._ctx.drawImage(((K=this._bitmapGenerator[R.texturePage])==null?void 0:K.bitmap)||this._charAtlas.pages[R.texturePage].canvas,R.texturePosition.x,R.texturePosition.y,R.size.x,R.size.y,O*this._deviceCellWidth+this._deviceCharLeft-R.offset.x,M*this._deviceCellHeight+this._deviceCharTop-R.offset.y,P,R.size.y),this._ctx.restore()}_clipRow(x){this._ctx.beginPath(),this._ctx.rect(0,x*this._deviceCellHeight,this._bufferService.cols*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(x,O){return`${O?"italic":""} ${x?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight} ${this._optionsService.rawOptions.fontSize*this._coreBrowserService.dpr}px ${this._optionsService.rawOptions.fontFamily}`}}a.BaseRenderLayer=S;class E{get bitmap(){return this._bitmap}constructor(x){this.canvas=x,this._state=0,this._commitTimeout=void 0,this._bitmap=void 0,this.version=-1}refresh(){var x;(x=this._bitmap)==null||x.close(),this._bitmap=void 0,y.isSafari||(this._commitTimeout===void 0&&(this._commitTimeout=window.setTimeout((()=>this._generate()),100)),this._state===1&&(this._state=2))}_generate(){var x;this._state===0&&((x=this._bitmap)==null||x.close(),this._bitmap=void 0,this._state=1,window.createImageBitmap(this.canvas).then((O=>{this._state===2?this.refresh():this._bitmap=O,this._state=0})),this._commitTimeout&&(this._commitTimeout=void 0))}}},949:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CanvasRenderer=void 0;const f=c(627),v=c(56),u=c(374),m=c(345),w=c(859),C=c(873),_=c(43),d=c(630),y=c(744);class b extends w.Disposable{constructor(E,L,x,O,M,D,k,B,R,P,H){super(),this._terminal=E,this._screenElement=L,this._bufferService=O,this._charSizeService=M,this._optionsService=D,this._coreBrowserService=R,this._themeService=H,this._observerDisposable=this.register(new w.MutableDisposable),this._onRequestRedraw=this.register(new m.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onChangeTextureAtlas=this.register(new m.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new m.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event;const X=this._optionsService.rawOptions.allowTransparency;this._renderLayers=[new y.TextRenderLayer(this._terminal,this._screenElement,0,X,this._bufferService,this._optionsService,k,P,this._coreBrowserService,H),new d.SelectionRenderLayer(this._terminal,this._screenElement,1,this._bufferService,this._coreBrowserService,P,this._optionsService,H),new _.LinkRenderLayer(this._terminal,this._screenElement,2,x,this._bufferService,this._optionsService,P,this._coreBrowserService,H),new C.CursorRenderLayer(this._terminal,this._screenElement,3,this._onRequestRedraw,this._bufferService,this._optionsService,B,this._coreBrowserService,P,H)];for(const F of this._renderLayers)(0,m.forwardEvent)(F.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas);this.dimensions=(0,u.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._observerDisposable.value=(0,v.observeDevicePixelDimensions)(this._renderLayers[0].canvas,this._coreBrowserService.window,((F,K)=>this._setCanvasDevicePixelDimensions(F,K))),this.register(this._coreBrowserService.onWindowChange((F=>{this._observerDisposable.value=(0,v.observeDevicePixelDimensions)(this._renderLayers[0].canvas,F,((K,Y)=>this._setCanvasDevicePixelDimensions(K,Y)))}))),this.register((0,w.toDisposable)((()=>{for(const F of this._renderLayers)F.dispose();(0,f.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){return this._renderLayers[0].cacheCanvas}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._bufferService.cols,this._bufferService.rows))}handleResize(E,L){this._updateDimensions();for(const x of this._renderLayers)x.resize(this.dimensions);this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}handleCharSizeChanged(){this.handleResize(this._bufferService.cols,this._bufferService.rows)}handleBlur(){this._runOperation((E=>E.handleBlur()))}handleFocus(){this._runOperation((E=>E.handleFocus()))}handleSelectionChanged(E,L,x=!1){this._runOperation((O=>O.handleSelectionChanged(E,L,x))),this._themeService.colors.selectionForeground&&this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}handleCursorMove(){this._runOperation((E=>E.handleCursorMove()))}clear(){this._runOperation((E=>E.reset()))}_runOperation(E){for(const L of this._renderLayers)E(L)}renderRows(E,L){for(const x of this._renderLayers)x.handleGridChanged(E,L)}clearTextureAtlas(){for(const E of this._renderLayers)E.clearTextureAtlas()}_updateDimensions(){if(!this._charSizeService.hasValidSize)return;const E=this._coreBrowserService.dpr;this.dimensions.device.char.width=Math.floor(this._charSizeService.width*E),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*E),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._bufferService.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._bufferService.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/E),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/E),this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows,this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols}_setCanvasDevicePixelDimensions(E,L){this.dimensions.device.canvas.height=L,this.dimensions.device.canvas.width=E;for(const x of this._renderLayers)x.resize(this.dimensions);this._requestRedrawViewport()}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}}a.CanvasRenderer=b},873:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CursorRenderLayer=void 0;const f=c(457),v=c(859),u=c(399),m=c(782),w=c(903);class C extends w.BaseRenderLayer{constructor(d,y,b,S,E,L,x,O,M,D){super(d,y,"cursor",b,!0,D,E,L,M,O),this._onRequestRedraw=S,this._coreService=x,this._cursorBlinkStateManager=this.register(new v.MutableDisposable),this._cell=new m.CellData,this._state={x:0,y:0,isFocused:!1,style:"",width:0},this._cursorRenderers={bar:this._renderBarCursor.bind(this),block:this._renderBlockCursor.bind(this),underline:this._renderUnderlineCursor.bind(this),outline:this._renderOutlineCursor.bind(this)},this.register(L.onOptionChange((()=>this._handleOptionsChanged()))),this._handleOptionsChanged()}resize(d){super.resize(d),this._state={x:0,y:0,isFocused:!1,style:"",width:0}}reset(){var d;this._clearCursor(),(d=this._cursorBlinkStateManager.value)==null||d.restartBlinkAnimation(),this._handleOptionsChanged()}handleBlur(){var d;(d=this._cursorBlinkStateManager.value)==null||d.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleFocus(){var d;(d=this._cursorBlinkStateManager.value)==null||d.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}_handleOptionsChanged(){this._optionsService.rawOptions.cursorBlink?this._cursorBlinkStateManager.value||(this._cursorBlinkStateManager.value=new f.CursorBlinkStateManager((()=>this._render(!0)),this._coreBrowserService)):this._cursorBlinkStateManager.clear(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleCursorMove(){var d;(d=this._cursorBlinkStateManager.value)==null||d.restartBlinkAnimation()}handleGridChanged(d,y){!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isPaused?this._render(!1):this._cursorBlinkStateManager.value.restartBlinkAnimation()}_render(d){if(!this._coreService.isCursorInitialized||this._coreService.isCursorHidden)return void this._clearCursor();const y=this._bufferService.buffer.ybase+this._bufferService.buffer.y,b=y-this._bufferService.buffer.ydisp;if(b<0||b>=this._bufferService.rows)return void this._clearCursor();const S=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(y).loadCell(S,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css;const E=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;return L&&L!=="none"&&this._cursorRenderers[L](S,b,this._cell),this._ctx.restore(),this._state.x=S,this._state.y=b,this._state.isFocused=!1,this._state.style=E,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible){if(this._state){if(this._state.x===S&&this._state.y===b&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.rawOptions.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.rawOptions.cursorStyle||"block"](S,b,this._cell),this._ctx.restore(),this._state.x=S,this._state.y=b,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}_clearCursor(){this._state&&(u.isFirefox||this._coreBrowserService.dpr<1?this._clearAll():this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})}_renderBarCursor(d,y,b){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillLeftLineAtCell(d,y,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()}_renderBlockCursor(d,y,b){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillCells(d,y,b.getWidth(),1),this._ctx.fillStyle=this._themeService.colors.cursorAccent.css,this._fillCharTrueColor(b,d,y),this._ctx.restore()}_renderUnderlineCursor(d,y,b){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillBottomLineAtCells(d,y),this._ctx.restore()}_renderOutlineCursor(d,y,b){this._ctx.save(),this._ctx.strokeStyle=this._themeService.colors.cursor.css,this._strokeRectAtCell(d,y,b.getWidth(),1),this._ctx.restore()}}a.CursorRenderLayer=C},574:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.GridCache=void 0,a.GridCache=class{constructor(){this.cache=[]}resize(c,f){for(let v=0;v<c;v++){this.cache.length<=v&&this.cache.push([]);for(let u=this.cache[v].length;u<f;u++)this.cache[v].push(void 0);this.cache[v].length=f}this.cache.length=c}clear(){for(let c=0;c<this.cache.length;c++)for(let f=0;f<this.cache[c].length;f++)this.cache[c][f]=void 0}}},43:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkRenderLayer=void 0;const f=c(197),v=c(237),u=c(903);class m extends u.BaseRenderLayer{constructor(C,_,d,y,b,S,E,L,x){super(C,_,"link",d,!0,x,b,S,E,L),this.register(y.onShowLinkUnderline((O=>this._handleShowLinkUnderline(O)))),this.register(y.onHideLinkUnderline((O=>this._handleHideLinkUnderline(O))))}resize(C){super.resize(C),this._state=void 0}reset(){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const C=this._state.y2-this._state.y1-1;C>0&&this._clearCells(0,this._state.y1+1,this._state.cols,C),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(C){if(C.fg===v.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:C.fg&&(0,f.is256Color)(C.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[C.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,C.y1===C.y2)this._fillBottomLineAtCells(C.x1,C.y1,C.x2-C.x1);else{this._fillBottomLineAtCells(C.x1,C.y1,C.cols-C.x1);for(let _=C.y1+1;_<C.y2;_++)this._fillBottomLineAtCells(0,_,C.cols);this._fillBottomLineAtCells(0,C.y2,C.x2)}this._state=C}_handleHideLinkUnderline(C){this._clearCurrentLink()}}a.LinkRenderLayer=m},630:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionRenderLayer=void 0;const f=c(903);class v extends f.BaseRenderLayer{constructor(m,w,C,_,d,y,b,S){super(m,w,"selection",C,!0,S,_,b,y,d),this._clearState()}_clearState(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}}resize(m){super.resize(m),this._selectionModel.selectionStart&&this._selectionModel.selectionEnd&&(this._clearState(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode))}reset(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())}handleBlur(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleFocus(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleSelectionChanged(m,w,C){super.handleSelectionChanged(m,w,C),this._redrawSelection(m,w,C)}_redrawSelection(m,w,C){if(!this._didStateChange(m,w,C,this._bufferService.buffer.ydisp))return;if(this._clearAll(),!m||!w)return void this._clearState();const _=m[1]-this._bufferService.buffer.ydisp,d=w[1]-this._bufferService.buffer.ydisp,y=Math.max(_,0),b=Math.min(d,this._bufferService.rows-1);if(y>=this._bufferService.rows||b<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=(this._coreBrowserService.isFocused?this._themeService.colors.selectionBackgroundTransparent:this._themeService.colors.selectionInactiveBackgroundTransparent).css,C){const S=m[0],E=w[0]-S,L=b-y+1;this._fillCells(S,y,E,L)}else{const S=_===y?m[0]:0,E=y===d?w[0]:this._bufferService.cols;this._fillCells(S,y,E-S,1);const L=Math.max(b-y-1,0);if(this._fillCells(0,y+1,this._bufferService.cols,L),y!==b){const x=d===b?w[0]:this._bufferService.cols;this._fillCells(0,b,x,1)}}this._state.start=[m[0],m[1]],this._state.end=[w[0],w[1]],this._state.columnSelectMode=C,this._state.ydisp=this._bufferService.buffer.ydisp}}_didStateChange(m,w,C,_){return!this._areCoordinatesEqual(m,this._state.start)||!this._areCoordinatesEqual(w,this._state.end)||C!==this._state.columnSelectMode||_!==this._state.ydisp}_areCoordinatesEqual(m,w){return!(!m||!w)&&m[0]===w[0]&&m[1]===w[1]}}a.SelectionRenderLayer=v},744:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TextRenderLayer=void 0;const f=c(577),v=c(147),u=c(782),m=c(855),w=c(903),C=c(574);class _ extends w.BaseRenderLayer{constructor(y,b,S,E,L,x,O,M,D,k){super(y,b,"text",S,E,k,L,x,M,D),this._characterJoinerService=O,this._characterWidth=0,this._characterFont="",this._characterOverlapCache={},this._workCell=new u.CellData,this._state=new C.GridCache,this.register(x.onSpecificOptionChange("allowTransparency",(B=>this._setTransparency(B))))}resize(y){super.resize(y);const b=this._getFont(!1,!1);this._characterWidth===y.device.char.width&&this._characterFont===b||(this._characterWidth=y.device.char.width,this._characterFont=b,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)}reset(){this._state.clear(),this._clearAll()}_forEachCell(y,b,S){for(let E=y;E<=b;E++){const L=E+this._bufferService.buffer.ydisp,x=this._bufferService.buffer.lines.get(L),O=this._characterJoinerService.getJoinedCharacters(L);for(let M=0;M<this._bufferService.cols;M++){x.loadCell(M,this._workCell);let D=this._workCell,k=!1,B=M;if(D.getWidth()!==0){if(O.length>0&&M===O[0][0]){k=!0;const R=O.shift();D=new f.JoinedCellData(this._workCell,x.translateToString(!0,R[0],R[1]),R[1]-R[0]),B=R[1]-1}!k&&this._isOverlapping(D)&&B<x.length-1&&x.getCodePoint(B+1)===m.NULL_CELL_CODE&&(D.content&=-12582913,D.content|=8388608),S(D,M,E),M=B}}}}_drawBackground(y,b){const S=this._ctx,E=this._bufferService.cols;let L=0,x=0,O=null;S.save(),this._forEachCell(y,b,((M,D,k)=>{let B=null;M.isInverse()?B=M.isFgDefault()?this._themeService.colors.foreground.css:M.isFgRGB()?`rgb(${v.AttributeData.toColorRGB(M.getFgColor()).join(",")})`:this._themeService.colors.ansi[M.getFgColor()].css:M.isBgRGB()?B=`rgb(${v.AttributeData.toColorRGB(M.getBgColor()).join(",")})`:M.isBgPalette()&&(B=this._themeService.colors.ansi[M.getBgColor()].css);let R=!1;this._decorationService.forEachDecorationAtCell(D,this._bufferService.buffer.ydisp+k,void 0,(P=>{P.options.layer!=="top"&&R||(P.backgroundColorRGB&&(B=P.backgroundColorRGB.css),R=P.options.layer==="top")})),O===null&&(L=D,x=k),k!==x?(S.fillStyle=O||"",this._fillCells(L,x,E-L,1),L=D,x=k):O!==B&&(S.fillStyle=O||"",this._fillCells(L,x,D-L,1),L=D,x=k),O=B})),O!==null&&(S.fillStyle=O,this._fillCells(L,x,E-L,1)),S.restore()}_drawForeground(y,b){this._forEachCell(y,b,((S,E,L)=>this._drawChars(S,E,L)))}handleGridChanged(y,b){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,y,this._bufferService.cols,b-y+1),this._drawBackground(y,b),this._drawForeground(y,b))}_isOverlapping(y){if(y.getWidth()!==1||y.getCode()<256)return!1;const b=y.getChars();if(this._characterOverlapCache.hasOwnProperty(b))return this._characterOverlapCache[b];this._ctx.save(),this._ctx.font=this._characterFont;const S=Math.floor(this._ctx.measureText(b).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[b]=S,S}}a.TextRenderLayer=_},274:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellColorResolver=void 0;const f=c(855),v=c(160),u=c(374);let m,w=0,C=0,_=!1,d=!1,y=!1,b=0;a.CellColorResolver=class{constructor(S,E,L,x,O,M){this._terminal=S,this._optionService=E,this._selectionRenderModel=L,this._decorationService=x,this._coreBrowserService=O,this._themeService=M,this.result={fg:0,bg:0,ext:0}}resolve(S,E,L,x){if(this.result.bg=S.bg,this.result.fg=S.fg,this.result.ext=268435456&S.bg?S.extended.ext:0,C=0,w=0,d=!1,_=!1,y=!1,m=this._themeService.colors,b=0,S.getCode()!==f.NULL_CELL_CODE&&S.extended.underlineStyle===4){const O=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));b=E*x%(2*Math.round(O))}if(this._decorationService.forEachDecorationAtCell(E,L,"bottom",(O=>{O.backgroundColorRGB&&(C=O.backgroundColorRGB.rgba>>8&16777215,d=!0),O.foregroundColorRGB&&(w=O.foregroundColorRGB.rgba>>8&16777215,_=!0)})),y=this._selectionRenderModel.isCellSelected(this._terminal,E,L),y){if(67108864&this.result.fg||(50331648&this.result.bg)!=0){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:C=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:C=(16777215&this.result.fg)<<8|255;break;default:C=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:C=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:C=(16777215&this.result.bg)<<8|255}C=v.rgba.blend(C,4294967040&(this._coreBrowserService.isFocused?m.selectionBackgroundOpaque:m.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else C=(this._coreBrowserService.isFocused?m.selectionBackgroundOpaque:m.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(d=!0,m.selectionForeground&&(w=m.selectionForeground.rgba>>8&16777215,_=!0),(0,u.treatGlyphAsBackgroundColor)(S.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)w=(this._coreBrowserService.isFocused?m.selectionBackgroundOpaque:m.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:w=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:w=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:w=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:w=(16777215&this.result.fg)<<8|255;break;default:w=this._themeService.colors.foreground.rgba}w=v.rgba.blend(w,4294967040&(this._coreBrowserService.isFocused?m.selectionBackgroundOpaque:m.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}_=!0}}this._decorationService.forEachDecorationAtCell(E,L,"top",(O=>{O.backgroundColorRGB&&(C=O.backgroundColorRGB.rgba>>8&16777215,d=!0),O.foregroundColorRGB&&(w=O.foregroundColorRGB.rgba>>8&16777215,_=!0)})),d&&(C=y?-16777216&S.bg&-134217729|C|50331648:-16777216&S.bg|C|50331648),_&&(w=-16777216&S.fg&-67108865|w|50331648),67108864&this.result.fg&&(d&&!_&&(w=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&m.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,_=!0),!d&&_&&(C=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&m.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,d=!0)),m=void 0,this.result.bg=d?C:this.result.bg,this.result.fg=_?w:this.result.fg,this.result.ext&=536870911,this.result.ext|=b<<29&3758096384}}},627:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.removeTerminalFromCache=a.acquireTextureAtlas=void 0;const f=c(509),v=c(197),u=[];a.acquireTextureAtlas=function(m,w,C,_,d,y,b,S){const E=(0,v.generateConfig)(_,d,y,b,w,C,S);for(let O=0;O<u.length;O++){const M=u[O],D=M.ownedBy.indexOf(m);if(D>=0){if((0,v.configEquals)(M.config,E))return M.atlas;M.ownedBy.length===1?(M.atlas.dispose(),u.splice(O,1)):M.ownedBy.splice(D,1);break}}for(let O=0;O<u.length;O++){const M=u[O];if((0,v.configEquals)(M.config,E))return M.ownedBy.push(m),M.atlas}const L=m._core,x={atlas:new f.TextureAtlas(document,E,L.unicodeService),config:E,ownedBy:[m]};return u.push(x),x.atlas},a.removeTerminalFromCache=function(m){for(let w=0;w<u.length;w++){const C=u[w].ownedBy.indexOf(m);if(C!==-1){u[w].ownedBy.length===1?(u[w].atlas.dispose(),u.splice(w,1)):u[w].ownedBy.splice(C,1);break}}}},197:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.is256Color=a.configEquals=a.generateConfig=void 0;const f=c(160);a.generateConfig=function(v,u,m,w,C,_,d){const y={foreground:_.foreground,background:_.background,cursor:f.NULL_COLOR,cursorAccent:f.NULL_COLOR,selectionForeground:f.NULL_COLOR,selectionBackgroundTransparent:f.NULL_COLOR,selectionBackgroundOpaque:f.NULL_COLOR,selectionInactiveBackgroundTransparent:f.NULL_COLOR,selectionInactiveBackgroundOpaque:f.NULL_COLOR,ansi:_.ansi.slice(),contrastCache:_.contrastCache,halfContrastCache:_.halfContrastCache};return{customGlyphs:C.customGlyphs,devicePixelRatio:d,letterSpacing:C.letterSpacing,lineHeight:C.lineHeight,deviceCellWidth:v,deviceCellHeight:u,deviceCharWidth:m,deviceCharHeight:w,fontFamily:C.fontFamily,fontSize:C.fontSize,fontWeight:C.fontWeight,fontWeightBold:C.fontWeightBold,allowTransparency:C.allowTransparency,drawBoldTextInBrightColors:C.drawBoldTextInBrightColors,minimumContrastRatio:C.minimumContrastRatio,colors:y}},a.configEquals=function(v,u){for(let m=0;m<v.colors.ansi.length;m++)if(v.colors.ansi[m].rgba!==u.colors.ansi[m].rgba)return!1;return v.devicePixelRatio===u.devicePixelRatio&&v.customGlyphs===u.customGlyphs&&v.lineHeight===u.lineHeight&&v.letterSpacing===u.letterSpacing&&v.fontFamily===u.fontFamily&&v.fontSize===u.fontSize&&v.fontWeight===u.fontWeight&&v.fontWeightBold===u.fontWeightBold&&v.allowTransparency===u.allowTransparency&&v.deviceCharWidth===u.deviceCharWidth&&v.deviceCharHeight===u.deviceCharHeight&&v.drawBoldTextInBrightColors===u.drawBoldTextInBrightColors&&v.minimumContrastRatio===u.minimumContrastRatio&&v.colors.foreground.rgba===u.colors.foreground.rgba&&v.colors.background.rgba===u.colors.background.rgba},a.is256Color=function(v){return(50331648&v)==16777216||(50331648&v)==33554432}},237:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const f=c(399);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},457:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CursorBlinkStateManager=void 0,a.CursorBlinkStateManager=class{constructor(c,f){this._renderCallback=c,this._coreBrowserService=f,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))))}_restartInterval(c=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){const f=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,f>0)return void this._restartInterval(f)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0})),this._blinkInterval=this._coreBrowserService.window.setInterval((()=>{if(this._animationTimeRestarted){const f=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(f)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),c)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tryDrawCustomChar=a.powerlineDefinitions=a.boxDrawingDefinitions=a.blockElementDefinitions=void 0;const f=c(374);a.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const v={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};a.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(_,d)=>`M0,${.5-d} L1,${.5-d} M0,${.5+d} L1,${.5+d}`},"║":{1:(_,d)=>`M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1`},"╒":{1:(_,d)=>`M.5,1 L.5,${.5-d} L1,${.5-d} M.5,${.5+d} L1,${.5+d}`},"╓":{1:(_,d)=>`M${.5-_},1 L${.5-_},.5 L1,.5 M${.5+_},.5 L${.5+_},1`},"╔":{1:(_,d)=>`M1,${.5-d} L${.5-_},${.5-d} L${.5-_},1 M1,${.5+d} L${.5+_},${.5+d} L${.5+_},1`},"╕":{1:(_,d)=>`M0,${.5-d} L.5,${.5-d} L.5,1 M0,${.5+d} L.5,${.5+d}`},"╖":{1:(_,d)=>`M${.5+_},1 L${.5+_},.5 L0,.5 M${.5-_},.5 L${.5-_},1`},"╗":{1:(_,d)=>`M0,${.5+d} L${.5-_},${.5+d} L${.5-_},1 M0,${.5-d} L${.5+_},${.5-d} L${.5+_},1`},"╘":{1:(_,d)=>`M.5,0 L.5,${.5+d} L1,${.5+d} M.5,${.5-d} L1,${.5-d}`},"╙":{1:(_,d)=>`M1,.5 L${.5-_},.5 L${.5-_},0 M${.5+_},.5 L${.5+_},0`},"╚":{1:(_,d)=>`M1,${.5-d} L${.5+_},${.5-d} L${.5+_},0 M1,${.5+d} L${.5-_},${.5+d} L${.5-_},0`},"╛":{1:(_,d)=>`M0,${.5+d} L.5,${.5+d} L.5,0 M0,${.5-d} L.5,${.5-d}`},"╜":{1:(_,d)=>`M0,.5 L${.5+_},.5 L${.5+_},0 M${.5-_},.5 L${.5-_},0`},"╝":{1:(_,d)=>`M0,${.5-d} L${.5-_},${.5-d} L${.5-_},0 M0,${.5+d} L${.5+_},${.5+d} L${.5+_},0`},"╞":{1:(_,d)=>`M.5,0 L.5,1 M.5,${.5-d} L1,${.5-d} M.5,${.5+d} L1,${.5+d}`},"╟":{1:(_,d)=>`M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1 M${.5+_},.5 L1,.5`},"╠":{1:(_,d)=>`M${.5-_},0 L${.5-_},1 M1,${.5+d} L${.5+_},${.5+d} L${.5+_},1 M1,${.5-d} L${.5+_},${.5-d} L${.5+_},0`},"╡":{1:(_,d)=>`M.5,0 L.5,1 M0,${.5-d} L.5,${.5-d} M0,${.5+d} L.5,${.5+d}`},"╢":{1:(_,d)=>`M0,.5 L${.5-_},.5 M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1`},"╣":{1:(_,d)=>`M${.5+_},0 L${.5+_},1 M0,${.5+d} L${.5-_},${.5+d} L${.5-_},1 M0,${.5-d} L${.5-_},${.5-d} L${.5-_},0`},"╤":{1:(_,d)=>`M0,${.5-d} L1,${.5-d} M0,${.5+d} L1,${.5+d} M.5,${.5+d} L.5,1`},"╥":{1:(_,d)=>`M0,.5 L1,.5 M${.5-_},.5 L${.5-_},1 M${.5+_},.5 L${.5+_},1`},"╦":{1:(_,d)=>`M0,${.5-d} L1,${.5-d} M0,${.5+d} L${.5-_},${.5+d} L${.5-_},1 M1,${.5+d} L${.5+_},${.5+d} L${.5+_},1`},"╧":{1:(_,d)=>`M.5,0 L.5,${.5-d} M0,${.5-d} L1,${.5-d} M0,${.5+d} L1,${.5+d}`},"╨":{1:(_,d)=>`M0,.5 L1,.5 M${.5-_},.5 L${.5-_},0 M${.5+_},.5 L${.5+_},0`},"╩":{1:(_,d)=>`M0,${.5+d} L1,${.5+d} M0,${.5-d} L${.5-_},${.5-d} L${.5-_},0 M1,${.5-d} L${.5+_},${.5-d} L${.5+_},0`},"╪":{1:(_,d)=>`M.5,0 L.5,1 M0,${.5-d} L1,${.5-d} M0,${.5+d} L1,${.5+d}`},"╫":{1:(_,d)=>`M0,.5 L1,.5 M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1`},"╬":{1:(_,d)=>`M0,${.5+d} L${.5-_},${.5+d} L${.5-_},1 M1,${.5+d} L${.5+_},${.5+d} L${.5+_},1 M0,${.5-d} L${.5-_},${.5-d} L${.5-_},0 M1,${.5-d} L${.5+_},${.5-d} L${.5+_},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(_,d)=>`M.5,1 L.5,${.5+d/.15*.5} C.5,${.5+d/.15*.5},.5,.5,1,.5`},"╮":{1:(_,d)=>`M.5,1 L.5,${.5+d/.15*.5} C.5,${.5+d/.15*.5},.5,.5,0,.5`},"╯":{1:(_,d)=>`M.5,0 L.5,${.5-d/.15*.5} C.5,${.5-d/.15*.5},.5,.5,0,.5`},"╰":{1:(_,d)=>`M.5,0 L.5,${.5-d/.15*.5} C.5,${.5-d/.15*.5},.5,.5,1,.5`}},a.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},a.powerlineDefinitions[""]=a.powerlineDefinitions[""],a.powerlineDefinitions[""]=a.powerlineDefinitions[""],a.tryDrawCustomChar=function(_,d,y,b,S,E,L,x){const O=a.blockElementDefinitions[d];if(O)return(function(B,R,P,H,X,F){for(let K=0;K<R.length;K++){const Y=R[K],j=X/8,$=F/8;B.fillRect(P+Y.x*j,H+Y.y*$,Y.w*j,Y.h*$)}})(_,O,y,b,S,E),!0;const M=v[d];if(M)return(function(B,R,P,H,X,F){let K=u.get(R);K||(K=new Map,u.set(R,K));const Y=B.fillStyle;if(typeof Y!="string")throw new Error(`Unexpected fillStyle type "${Y}"`);let j=K.get(Y);if(!j){const $=R[0].length,N=R.length,U=B.canvas.ownerDocument.createElement("canvas");U.width=$,U.height=N;const J=(0,f.throwIfFalsy)(U.getContext("2d")),te=new ImageData($,N);let fe,ve,Z,W;if(Y.startsWith("#"))fe=parseInt(Y.slice(1,3),16),ve=parseInt(Y.slice(3,5),16),Z=parseInt(Y.slice(5,7),16),W=Y.length>7&&parseInt(Y.slice(7,9),16)||1;else{if(!Y.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${Y}" when drawing pattern glyph`);[fe,ve,Z,W]=Y.substring(5,Y.length-1).split(",").map((V=>parseFloat(V)))}for(let V=0;V<N;V++)for(let ee=0;ee<$;ee++)te.data[4*(V*$+ee)]=fe,te.data[4*(V*$+ee)+1]=ve,te.data[4*(V*$+ee)+2]=Z,te.data[4*(V*$+ee)+3]=R[V][ee]*(255*W);J.putImageData(te,0,0),j=(0,f.throwIfFalsy)(B.createPattern(U,null)),K.set(Y,j)}B.fillStyle=j,B.fillRect(P,H,X,F)})(_,M,y,b,S,E),!0;const D=a.boxDrawingDefinitions[d];if(D)return(function(B,R,P,H,X,F,K){B.strokeStyle=B.fillStyle;for(const[Y,j]of Object.entries(R)){let $;B.beginPath(),B.lineWidth=K*Number.parseInt(Y),$=typeof j=="function"?j(.15,.15/F*X):j;for(const N of $.split(" ")){const U=N[0],J=w[U];if(!J){console.error(`Could not find drawing instructions for "${U}"`);continue}const te=N.substring(1).split(",");te[0]&&te[1]&&J(B,C(te,X,F,P,H,!0,K))}B.stroke(),B.closePath()}})(_,D,y,b,S,E,x),!0;const k=a.powerlineDefinitions[d];return!!k&&((function(B,R,P,H,X,F,K,Y){const j=new Path2D;j.rect(P,H,X,F),B.clip(j),B.beginPath();const $=K/12;B.lineWidth=Y*$;for(const N of R.d.split(" ")){const U=N[0],J=w[U];if(!J){console.error(`Could not find drawing instructions for "${U}"`);continue}const te=N.substring(1).split(",");te[0]&&te[1]&&J(B,C(te,X,F,P,H,!1,Y,(R.leftPadding??0)*($/2),(R.rightPadding??0)*($/2)))}R.type===1?(B.strokeStyle=B.fillStyle,B.stroke()):B.fill(),B.closePath()})(_,k,y,b,S,E,L,x),!0)};const u=new Map;function m(_,d,y=0){return Math.max(Math.min(_,d),y)}const w={C:(_,d)=>_.bezierCurveTo(d[0],d[1],d[2],d[3],d[4],d[5]),L:(_,d)=>_.lineTo(d[0],d[1]),M:(_,d)=>_.moveTo(d[0],d[1])};function C(_,d,y,b,S,E,L,x=0,O=0){const M=_.map((D=>parseFloat(D)||parseInt(D)));if(M.length<2)throw new Error("Too few arguments for instruction");for(let D=0;D<M.length;D+=2)M[D]*=d-x*L-O*L,E&&M[D]!==0&&(M[D]=m(Math.round(M[D]+.5)-.5,d,0)),M[D]+=b+x*L;for(let D=1;D<M.length;D+=2)M[D]*=y,E&&M[D]!==0&&(M[D]=m(Math.round(M[D]+.5)-.5,y,0)),M[D]+=S;return M}},56:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.observeDevicePixelDimensions=void 0;const f=c(859);a.observeDevicePixelDimensions=function(v,u,m){let w=new u.ResizeObserver((C=>{const _=C.find((b=>b.target===v));if(!_)return;if(!("devicePixelContentBoxSize"in _))return w==null||w.disconnect(),void(w=void 0);const d=_.devicePixelContentBoxSize[0].inlineSize,y=_.devicePixelContentBoxSize[0].blockSize;d>0&&y>0&&m(d,y)}));try{w.observe(v,{box:["device-pixel-content-box"]})}catch{w.disconnect(),w=void 0}return(0,f.toDisposable)((()=>w==null?void 0:w.disconnect()))}},374:(g,a)=>{function c(v){return 57508<=v&&v<=57558}function f(v){return v>=128512&&v<=128591||v>=127744&&v<=128511||v>=128640&&v<=128767||v>=9728&&v<=9983||v>=9984&&v<=10175||v>=65024&&v<=65039||v>=129280&&v<=129535||v>=127462&&v<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(v){if(!v)throw new Error("value must not be falsy");return v},a.isPowerlineGlyph=c,a.isRestrictedPowerlineGlyph=function(v){return 57520<=v&&v<=57527},a.isEmoji=f,a.allowRescaling=function(v,u,m,w){return u===1&&m>Math.ceil(1.5*w)&&v!==void 0&&v>255&&!f(v)&&!c(v)&&!(function(C){return 57344<=C&&C<=63743})(v)},a.treatGlyphAsBackgroundColor=function(v){return c(v)||(function(u){return 9472<=u&&u<=9631})(v)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(v,u,m=0){return(v-(2*Math.round(u)-m))%(2*Math.round(u))}},296:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class c{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(v,u,m,w=!1){if(this.selectionStart=u,this.selectionEnd=m,!u||!m||u[0]===m[0]&&u[1]===m[1])return void this.clear();const C=v.buffers.active.ydisp,_=u[1]-C,d=m[1]-C,y=Math.max(_,0),b=Math.min(d,v.rows-1);y>=v.rows||b<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=_,this.viewportEndRow=d,this.viewportCappedStartRow=y,this.viewportCappedEndRow=b,this.startCol=u[0],this.endCol=m[0])}isCellSelected(v,u,m){return!!this.hasSelection&&(m-=v.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?u>=this.startCol&&m>=this.viewportCappedStartRow&&u<this.endCol&&m<=this.viewportCappedEndRow:u<this.startCol&&m>=this.viewportCappedStartRow&&u>=this.endCol&&m<=this.viewportCappedEndRow:m>this.viewportStartRow&&m<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&m===this.viewportStartRow&&u>=this.startCol&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportEndRow&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportStartRow&&u>=this.startCol)}}a.createSelectionRenderModel=function(){return new c}},509:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TextureAtlas=void 0;const f=c(237),v=c(860),u=c(374),m=c(160),w=c(345),C=c(485),_=c(385),d=c(147),y=c(855),b={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let S;class E{get pages(){return this._pages}constructor(D,k,B){this._document=D,this._config=k,this._unicodeService=B,this._didWarmUp=!1,this._cacheMap=new C.FourKeyMap,this._cacheMapCombined=new C.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new d.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new w.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new w.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=O(D,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,u.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const D of this.pages)D.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const D=new _.IdleTaskQueue;for(let k=33;k<126;k++)D.enqueue((()=>{if(!this._cacheMap.get(k,y.DEFAULT_COLOR,y.DEFAULT_COLOR,y.DEFAULT_EXT)){const B=this._drawToCache(k,y.DEFAULT_COLOR,y.DEFAULT_COLOR,y.DEFAULT_EXT);this._cacheMap.set(k,y.DEFAULT_COLOR,y.DEFAULT_COLOR,y.DEFAULT_EXT,B)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const D of this._pages)D.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(E.maxAtlasPages&&this._pages.length>=Math.max(4,E.maxAtlasPages)){const k=this._pages.filter((K=>2*K.canvas.width<=(E.maxTextureSize||4096))).sort(((K,Y)=>Y.canvas.width!==K.canvas.width?Y.canvas.width-K.canvas.width:Y.percentageUsed-K.percentageUsed));let B=-1,R=0;for(let K=0;K<k.length;K++)if(k[K].canvas.width!==R)B=K,R=k[K].canvas.width;else if(K-B==3)break;const P=k.slice(B,B+4),H=P.map((K=>K.glyphs[0].texturePage)).sort(((K,Y)=>K>Y?1:-1)),X=this.pages.length-P.length,F=this._mergePages(P,X);F.version++;for(let K=H.length-1;K>=0;K--)this._deletePage(H[K]);this.pages.push(F),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(F.canvas)}const D=new L(this._document,this._textureSize);return this._pages.push(D),this._activePages.push(D),this._onAddTextureAtlasCanvas.fire(D.canvas),D}_mergePages(D,k){const B=2*D[0].canvas.width,R=new L(this._document,B,D);for(const[P,H]of D.entries()){const X=P*H.canvas.width%B,F=Math.floor(P/2)*H.canvas.height;R.ctx.drawImage(H.canvas,X,F);for(const Y of H.glyphs)Y.texturePage=k,Y.sizeClipSpace.x=Y.size.x/B,Y.sizeClipSpace.y=Y.size.y/B,Y.texturePosition.x+=X,Y.texturePosition.y+=F,Y.texturePositionClipSpace.x=Y.texturePosition.x/B,Y.texturePositionClipSpace.y=Y.texturePosition.y/B;this._onRemoveTextureAtlasCanvas.fire(H.canvas);const K=this._activePages.indexOf(H);K!==-1&&this._activePages.splice(K,1)}return R}_deletePage(D){this._pages.splice(D,1);for(let k=D;k<this._pages.length;k++){const B=this._pages[k];for(const R of B.glyphs)R.texturePage--;B.version++}}getRasterizedGlyphCombinedChar(D,k,B,R,P){return this._getFromCacheMap(this._cacheMapCombined,D,k,B,R,P)}getRasterizedGlyph(D,k,B,R,P){return this._getFromCacheMap(this._cacheMap,D,k,B,R,P)}_getFromCacheMap(D,k,B,R,P,H=!1){return S=D.get(k,B,R,P),S||(S=this._drawToCache(k,B,R,P,H),D.set(k,B,R,P,S)),S}_getColorFromAnsiIndex(D){if(D>=this._config.colors.ansi.length)throw new Error("No color found for idx "+D);return this._config.colors.ansi[D]}_getBackgroundColor(D,k,B,R){if(this._config.allowTransparency)return m.NULL_COLOR;let P;switch(D){case 16777216:case 33554432:P=this._getColorFromAnsiIndex(k);break;case 50331648:const H=d.AttributeData.toColorRGB(k);P=m.channels.toColor(H[0],H[1],H[2]);break;default:P=B?m.color.opaque(this._config.colors.foreground):this._config.colors.background}return P}_getForegroundColor(D,k,B,R,P,H,X,F,K,Y){const j=this._getMinimumContrastColor(D,k,B,R,P,H,X,K,F,Y);if(j)return j;let $;switch(P){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&K&&H<8&&(H+=8),$=this._getColorFromAnsiIndex(H);break;case 50331648:const N=d.AttributeData.toColorRGB(H);$=m.channels.toColor(N[0],N[1],N[2]);break;default:$=X?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&($=m.color.opaque($)),F&&($=m.color.multiplyOpacity($,f.DIM_OPACITY)),$}_resolveBackgroundRgba(D,k,B){switch(D){case 16777216:case 33554432:return this._getColorFromAnsiIndex(k).rgba;case 50331648:return k<<8;default:return B?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(D,k,B,R){switch(D){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&R&&k<8&&(k+=8),this._getColorFromAnsiIndex(k).rgba;case 50331648:return k<<8;default:return B?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(D,k,B,R,P,H,X,F,K,Y){if(this._config.minimumContrastRatio===1||Y)return;const j=this._getContrastCache(K),$=j.getColor(D,R);if($!==void 0)return $||void 0;const N=this._resolveBackgroundRgba(k,B,X),U=this._resolveForegroundRgba(P,H,X,F),J=m.rgba.ensureContrastRatio(N,U,this._config.minimumContrastRatio/(K?2:1));if(!J)return void j.setColor(D,R,null);const te=m.channels.toColor(J>>24&255,J>>16&255,J>>8&255);return j.setColor(D,R,te),te}_getContrastCache(D){return D?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(D,k,B,R,P=!1){const H=typeof D=="number"?String.fromCharCode(D):D,X=Math.min(this._config.deviceCellWidth*Math.max(H.length,2)+4,this._textureSize);this._tmpCanvas.width<X&&(this._tmpCanvas.width=X);const F=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<F&&(this._tmpCanvas.height=F),this._tmpCtx.save(),this._workAttributeData.fg=B,this._workAttributeData.bg=k,this._workAttributeData.extended.ext=R,this._workAttributeData.isInvisible())return b;const K=!!this._workAttributeData.isBold(),Y=!!this._workAttributeData.isInverse(),j=!!this._workAttributeData.isDim(),$=!!this._workAttributeData.isItalic(),N=!!this._workAttributeData.isUnderline(),U=!!this._workAttributeData.isStrikethrough(),J=!!this._workAttributeData.isOverline();let te=this._workAttributeData.getFgColor(),fe=this._workAttributeData.getFgColorMode(),ve=this._workAttributeData.getBgColor(),Z=this._workAttributeData.getBgColorMode();if(Y){const ge=te;te=ve,ve=ge;const we=fe;fe=Z,Z=we}const W=this._getBackgroundColor(Z,ve,Y,j);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=W.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const V=K?this._config.fontWeightBold:this._config.fontWeight,ee=$?"italic":"";this._tmpCtx.font=`${ee} ${V} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=f.TEXT_BASELINE;const ue=H.length===1&&(0,u.isPowerlineGlyph)(H.charCodeAt(0)),ie=H.length===1&&(0,u.isRestrictedPowerlineGlyph)(H.charCodeAt(0)),me=this._getForegroundColor(k,Z,ve,B,fe,te,Y,j,K,(0,u.treatGlyphAsBackgroundColor)(H.charCodeAt(0)));this._tmpCtx.fillStyle=me.css;const de=ie?0:4;let Me=!1;this._config.customGlyphs!==!1&&(Me=(0,v.tryDrawCustomChar)(this._tmpCtx,H,de,de,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let ke,Ce=!ue;if(ke=typeof D=="number"?this._unicodeService.wcwidth(D):this._unicodeService.getStringCellWidth(D),N){this._tmpCtx.save();const ge=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),we=ge%2==1?.5:0;if(this._tmpCtx.lineWidth=ge,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())Ce=!1,this._tmpCtx.strokeStyle=`rgb(${d.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{Ce=!1;let qe=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&qe<8&&(qe+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(qe).css}this._tmpCtx.beginPath();const $e=de,Be=Math.ceil(de+this._config.deviceCharHeight)-we-(P?2*ge:0),It=Be+ge,ct=Be+2*ge;let mt=this._workAttributeData.getUnderlineVariantOffset();for(let qe=0;qe<ke;qe++){this._tmpCtx.save();const Pe=$e+qe*this._config.deviceCellWidth,Te=$e+(qe+1)*this._config.deviceCellWidth,lr=Pe+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(Pe,Be),this._tmpCtx.lineTo(Te,Be),this._tmpCtx.moveTo(Pe,ct),this._tmpCtx.lineTo(Te,ct);break;case 3:const _t=ge<=1?ct:Math.ceil(de+this._config.deviceCharHeight-ge/2)-we,Nt=ge<=1?Be:Math.ceil(de+this._config.deviceCharHeight+ge/2)-we,Rt=new Path2D;Rt.rect(Pe,Be,this._config.deviceCellWidth,ct-Be),this._tmpCtx.clip(Rt),this._tmpCtx.moveTo(Pe-this._config.deviceCellWidth/2,It),this._tmpCtx.bezierCurveTo(Pe-this._config.deviceCellWidth/2,Nt,Pe,Nt,Pe,It),this._tmpCtx.bezierCurveTo(Pe,_t,lr,_t,lr,It),this._tmpCtx.bezierCurveTo(lr,Nt,Te,Nt,Te,It),this._tmpCtx.bezierCurveTo(Te,_t,Te+this._config.deviceCellWidth/2,_t,Te+this._config.deviceCellWidth/2,It);break;case 4:const si=mt===0?0:mt>=ge?2*ge-mt:ge-mt;mt>=ge||si===0?(this._tmpCtx.setLineDash([Math.round(ge),Math.round(ge)]),this._tmpCtx.moveTo(Pe+si,Be),this._tmpCtx.lineTo(Te,Be)):(this._tmpCtx.setLineDash([Math.round(ge),Math.round(ge)]),this._tmpCtx.moveTo(Pe,Be),this._tmpCtx.lineTo(Pe+si,Be),this._tmpCtx.moveTo(Pe+si+ge,Be),this._tmpCtx.lineTo(Te,Be)),mt=(0,u.computeNextVariantOffset)(Te-Pe,ge,mt);break;case 5:const io=.6,no=.3,Nr=Te-Pe,_i=Math.floor(io*Nr),mi=Math.floor(no*Nr),ai=Nr-_i-mi;this._tmpCtx.setLineDash([_i,mi,ai]),this._tmpCtx.moveTo(Pe,Be),this._tmpCtx.lineTo(Te,Be);break;default:this._tmpCtx.moveTo(Pe,Be),this._tmpCtx.lineTo(Te,Be)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!Me&&this._config.fontSize>=12&&!this._config.allowTransparency&&H!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const qe=this._tmpCtx.measureText(H);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in qe&&qe.actualBoundingBoxDescent>0){this._tmpCtx.save();const Pe=new Path2D;Pe.rect($e,Be-Math.ceil(ge/2),this._config.deviceCellWidth*ke,ct-Be+Math.ceil(ge/2)),this._tmpCtx.clip(Pe),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=W.css,this._tmpCtx.strokeText(H,de,de+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(J){const ge=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),we=ge%2==1?.5:0;this._tmpCtx.lineWidth=ge,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(de,de+we),this._tmpCtx.lineTo(de+this._config.deviceCharWidth*ke,de+we),this._tmpCtx.stroke()}if(Me||this._tmpCtx.fillText(H,de,de+this._config.deviceCharHeight),H==="_"&&!this._config.allowTransparency){let ge=x(this._tmpCtx.getImageData(de,de,this._config.deviceCellWidth,this._config.deviceCellHeight),W,me,Ce);if(ge)for(let we=1;we<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=W.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(H,de,de+this._config.deviceCharHeight-we),ge=x(this._tmpCtx.getImageData(de,de,this._config.deviceCellWidth,this._config.deviceCellHeight),W,me,Ce),ge);we++);}if(U){const ge=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),we=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=ge,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(de,de+Math.floor(this._config.deviceCharHeight/2)-we),this._tmpCtx.lineTo(de+this._config.deviceCharWidth*ke,de+Math.floor(this._config.deviceCharHeight/2)-we),this._tmpCtx.stroke()}this._tmpCtx.restore();const Ve=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Dt;if(Dt=this._config.allowTransparency?(function(ge){for(let we=0;we<ge.data.length;we+=4)if(ge.data[we+3]>0)return!1;return!0})(Ve):x(Ve,W,me,Ce),Dt)return b;const Se=this._findGlyphBoundingBox(Ve,this._workBoundingBox,X,ie,Me,de);let ye,be;for(;;){if(this._activePages.length===0){const ge=this._createNewPage();ye=ge,be=ge.currentRow,be.height=Se.size.y;break}ye=this._activePages[this._activePages.length-1],be=ye.currentRow;for(const ge of this._activePages)Se.size.y<=ge.currentRow.height&&(ye=ge,be=ge.currentRow);for(let ge=this._activePages.length-1;ge>=0;ge--)for(const we of this._activePages[ge].fixedRows)we.height<=be.height&&Se.size.y<=we.height&&(ye=this._activePages[ge],be=we);if(be.y+Se.size.y>=ye.canvas.height||be.height>Se.size.y+2){let ge=!1;if(ye.currentRow.y+ye.currentRow.height+Se.size.y>=ye.canvas.height){let we;for(const $e of this._activePages)if($e.currentRow.y+$e.currentRow.height+Se.size.y<$e.canvas.height){we=$e;break}if(we)ye=we;else if(E.maxAtlasPages&&this._pages.length>=E.maxAtlasPages&&be.y+Se.size.y<=ye.canvas.height&&be.height>=Se.size.y&&be.x+Se.size.x<=ye.canvas.width)ge=!0;else{const $e=this._createNewPage();ye=$e,be=$e.currentRow,be.height=Se.size.y,ge=!0}}ge||(ye.currentRow.height>0&&ye.fixedRows.push(ye.currentRow),be={x:0,y:ye.currentRow.y+ye.currentRow.height,height:Se.size.y},ye.fixedRows.push(be),ye.currentRow={x:0,y:be.y+be.height,height:0})}if(be.x+Se.size.x<=ye.canvas.width)break;be===ye.currentRow?(be.x=0,be.y+=be.height,be.height=0):ye.fixedRows.splice(ye.fixedRows.indexOf(be),1)}return Se.texturePage=this._pages.indexOf(ye),Se.texturePosition.x=be.x,Se.texturePosition.y=be.y,Se.texturePositionClipSpace.x=be.x/ye.canvas.width,Se.texturePositionClipSpace.y=be.y/ye.canvas.height,Se.sizeClipSpace.x/=ye.canvas.width,Se.sizeClipSpace.y/=ye.canvas.height,be.height=Math.max(be.height,Se.size.y),be.x+=Se.size.x,ye.ctx.putImageData(Ve,Se.texturePosition.x-this._workBoundingBox.left,Se.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Se.size.x,Se.size.y),ye.addGlyph(Se),ye.version++,Se}_findGlyphBoundingBox(D,k,B,R,P,H){k.top=0;const X=R?this._config.deviceCellHeight:this._tmpCanvas.height,F=R?this._config.deviceCellWidth:B;let K=!1;for(let Y=0;Y<X;Y++){for(let j=0;j<F;j++){const $=Y*this._tmpCanvas.width*4+4*j+3;if(D.data[$]!==0){k.top=Y,K=!0;break}}if(K)break}k.left=0,K=!1;for(let Y=0;Y<H+F;Y++){for(let j=0;j<X;j++){const $=j*this._tmpCanvas.width*4+4*Y+3;if(D.data[$]!==0){k.left=Y,K=!0;break}}if(K)break}k.right=F,K=!1;for(let Y=H+F-1;Y>=H;Y--){for(let j=0;j<X;j++){const $=j*this._tmpCanvas.width*4+4*Y+3;if(D.data[$]!==0){k.right=Y,K=!0;break}}if(K)break}k.bottom=X,K=!1;for(let Y=X-1;Y>=0;Y--){for(let j=0;j<F;j++){const $=Y*this._tmpCanvas.width*4+4*j+3;if(D.data[$]!==0){k.bottom=Y,K=!0;break}}if(K)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:k.right-k.left+1,y:k.bottom-k.top+1},sizeClipSpace:{x:k.right-k.left+1,y:k.bottom-k.top+1},offset:{x:-k.left+H+(R||P?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-k.top+H+(R||P?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}a.TextureAtlas=E;class L{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(D){this._glyphs.push(D),this._usedPixels+=D.size.x*D.size.y}constructor(D,k,B){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],B)for(const R of B)this._glyphs.push(...R.glyphs),this._usedPixels+=R._usedPixels;this.canvas=O(D,k,k),this.ctx=(0,u.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}}function x(M,D,k,B){const R=D.rgba>>>24,P=D.rgba>>>16&255,H=D.rgba>>>8&255,X=k.rgba>>>24,F=k.rgba>>>16&255,K=k.rgba>>>8&255,Y=Math.floor((Math.abs(R-X)+Math.abs(P-F)+Math.abs(H-K))/12);let j=!0;for(let $=0;$<M.data.length;$+=4)M.data[$]===R&&M.data[$+1]===P&&M.data[$+2]===H||B&&Math.abs(M.data[$]-R)+Math.abs(M.data[$+1]-P)+Math.abs(M.data[$+2]-H)<Y?M.data[$+3]=0:j=!1;return j}function O(M,D,k){const B=M.createElement("canvas");return B.width=D,B.height=k,B}},577:function(g,a,c){var f=this&&this.__decorate||function(y,b,S,E){var L,x=arguments.length,O=x<3?b:E===null?E=Object.getOwnPropertyDescriptor(b,S):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(y,b,S,E);else for(var M=y.length-1;M>=0;M--)(L=y[M])&&(O=(x<3?L(O):x>3?L(b,S,O):L(b,S))||O);return x>3&&O&&Object.defineProperty(b,S,O),O},v=this&&this.__param||function(y,b){return function(S,E){b(S,E,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const u=c(147),m=c(855),w=c(782),C=c(97);class _ extends u.AttributeData{constructor(b,S,E){super(),this.content=0,this.combinedData="",this.fg=b.fg,this.bg=b.bg,this.combinedData=S,this._width=E}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(b){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.JoinedCellData=_;let d=a.CharacterJoinerService=class l2{constructor(b){this._bufferService=b,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new w.CellData}register(b){const S={id:this._nextCharacterJoinerId++,handler:b};return this._characterJoiners.push(S),S.id}deregister(b){for(let S=0;S<this._characterJoiners.length;S++)if(this._characterJoiners[S].id===b)return this._characterJoiners.splice(S,1),!0;return!1}getJoinedCharacters(b){if(this._characterJoiners.length===0)return[];const S=this._bufferService.buffer.lines.get(b);if(!S||S.length===0)return[];const E=[],L=S.translateToString(!0);let x=0,O=0,M=0,D=S.getFg(0),k=S.getBg(0);for(let B=0;B<S.getTrimmedLength();B++)if(S.loadCell(B,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==D||this._workCell.bg!==k){if(B-x>1){const R=this._getJoinedRanges(L,M,O,S,x);for(let P=0;P<R.length;P++)E.push(R[P])}x=B,M=O,D=this._workCell.fg,k=this._workCell.bg}O+=this._workCell.getChars().length||m.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-x>1){const B=this._getJoinedRanges(L,M,O,S,x);for(let R=0;R<B.length;R++)E.push(B[R])}return E}_getJoinedRanges(b,S,E,L,x){const O=b.substring(S,E);let M=[];try{M=this._characterJoiners[0].handler(O)}catch(D){console.error(D)}for(let D=1;D<this._characterJoiners.length;D++)try{const k=this._characterJoiners[D].handler(O);for(let B=0;B<k.length;B++)l2._mergeRanges(M,k[B])}catch(k){console.error(k)}return this._stringRangesToCellRanges(M,L,x),M}_stringRangesToCellRanges(b,S,E){let L=0,x=!1,O=0,M=b[L];if(M){for(let D=E;D<this._bufferService.cols;D++){const k=S.getWidth(D),B=S.getString(D).length||m.WHITESPACE_CELL_CHAR.length;if(k!==0){if(!x&&M[0]<=O&&(M[0]=D,x=!0),M[1]<=O){if(M[1]=D,M=b[++L],!M)break;M[0]<=O?(M[0]=D,x=!0):x=!1}O+=B}}M&&(M[1]=this._bufferService.cols)}}static _mergeRanges(b,S){let E=!1;for(let L=0;L<b.length;L++){const x=b[L];if(E){if(S[1]<=x[0])return b[L-1][1]=S[1],b;if(S[1]<=x[1])return b[L-1][1]=Math.max(S[1],x[1]),b.splice(L,1),b;b.splice(L,1),L--}else{if(S[1]<=x[0])return b.splice(L,0,S),b;if(S[1]<=x[1])return x[0]=Math.min(S[0],x[0]),b;S[0]<x[1]&&(x[0]=Math.min(S[0],x[0]),E=!0)}}return E?b[b.length-1][1]=S[1]:b.push(S),b}};a.CharacterJoinerService=d=f([v(0,C.IBufferService)],d)},160:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let c=0,f=0,v=0,u=0;var m,w,C,_,d;function y(S){const E=S.toString(16);return E.length<2?"0"+E:E}function b(S,E){return S<E?(E+.05)/(S+.05):(S+.05)/(E+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(S){S.toCss=function(E,L,x,O){return O!==void 0?`#${y(E)}${y(L)}${y(x)}${y(O)}`:`#${y(E)}${y(L)}${y(x)}`},S.toRgba=function(E,L,x,O=255){return(E<<24|L<<16|x<<8|O)>>>0},S.toColor=function(E,L,x,O){return{css:S.toCss(E,L,x,O),rgba:S.toRgba(E,L,x,O)}}})(m||(a.channels=m={})),(function(S){function E(L,x){return u=Math.round(255*x),[c,f,v]=d.toChannels(L.rgba),{css:m.toCss(c,f,v,u),rgba:m.toRgba(c,f,v,u)}}S.blend=function(L,x){if(u=(255&x.rgba)/255,u===1)return{css:x.css,rgba:x.rgba};const O=x.rgba>>24&255,M=x.rgba>>16&255,D=x.rgba>>8&255,k=L.rgba>>24&255,B=L.rgba>>16&255,R=L.rgba>>8&255;return c=k+Math.round((O-k)*u),f=B+Math.round((M-B)*u),v=R+Math.round((D-R)*u),{css:m.toCss(c,f,v),rgba:m.toRgba(c,f,v)}},S.isOpaque=function(L){return(255&L.rgba)==255},S.ensureContrastRatio=function(L,x,O){const M=d.ensureContrastRatio(L.rgba,x.rgba,O);if(M)return m.toColor(M>>24&255,M>>16&255,M>>8&255)},S.opaque=function(L){const x=(255|L.rgba)>>>0;return[c,f,v]=d.toChannels(x),{css:m.toCss(c,f,v),rgba:x}},S.opacity=E,S.multiplyOpacity=function(L,x){return u=255&L.rgba,E(L,u*x/255)},S.toColorRGB=function(L){return[L.rgba>>24&255,L.rgba>>16&255,L.rgba>>8&255]}})(w||(a.color=w={})),(function(S){let E,L;try{const x=document.createElement("canvas");x.width=1,x.height=1;const O=x.getContext("2d",{willReadFrequently:!0});O&&(E=O,E.globalCompositeOperation="copy",L=E.createLinearGradient(0,0,1,1))}catch{}S.toColor=function(x){if(x.match(/#[\da-f]{3,8}/i))switch(x.length){case 4:return c=parseInt(x.slice(1,2).repeat(2),16),f=parseInt(x.slice(2,3).repeat(2),16),v=parseInt(x.slice(3,4).repeat(2),16),m.toColor(c,f,v);case 5:return c=parseInt(x.slice(1,2).repeat(2),16),f=parseInt(x.slice(2,3).repeat(2),16),v=parseInt(x.slice(3,4).repeat(2),16),u=parseInt(x.slice(4,5).repeat(2),16),m.toColor(c,f,v,u);case 7:return{css:x,rgba:(parseInt(x.slice(1),16)<<8|255)>>>0};case 9:return{css:x,rgba:parseInt(x.slice(1),16)>>>0}}const O=x.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 c=parseInt(O[1]),f=parseInt(O[2]),v=parseInt(O[3]),u=Math.round(255*(O[5]===void 0?1:parseFloat(O[5]))),m.toColor(c,f,v,u);if(!E||!L)throw new Error("css.toColor: Unsupported css format");if(E.fillStyle=L,E.fillStyle=x,typeof E.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(E.fillRect(0,0,1,1),[c,f,v,u]=E.getImageData(0,0,1,1).data,u!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:m.toRgba(c,f,v,u),css:x}}})(C||(a.css=C={})),(function(S){function E(L,x,O){const M=L/255,D=x/255,k=O/255;return .2126*(M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4))+.7152*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.0722*(k<=.03928?k/12.92:Math.pow((k+.055)/1.055,2.4))}S.relativeLuminance=function(L){return E(L>>16&255,L>>8&255,255&L)},S.relativeLuminance2=E})(_||(a.rgb=_={})),(function(S){function E(x,O,M){const D=x>>24&255,k=x>>16&255,B=x>>8&255;let R=O>>24&255,P=O>>16&255,H=O>>8&255,X=b(_.relativeLuminance2(R,P,H),_.relativeLuminance2(D,k,B));for(;X<M&&(R>0||P>0||H>0);)R-=Math.max(0,Math.ceil(.1*R)),P-=Math.max(0,Math.ceil(.1*P)),H-=Math.max(0,Math.ceil(.1*H)),X=b(_.relativeLuminance2(R,P,H),_.relativeLuminance2(D,k,B));return(R<<24|P<<16|H<<8|255)>>>0}function L(x,O,M){const D=x>>24&255,k=x>>16&255,B=x>>8&255;let R=O>>24&255,P=O>>16&255,H=O>>8&255,X=b(_.relativeLuminance2(R,P,H),_.relativeLuminance2(D,k,B));for(;X<M&&(R<255||P<255||H<255);)R=Math.min(255,R+Math.ceil(.1*(255-R))),P=Math.min(255,P+Math.ceil(.1*(255-P))),H=Math.min(255,H+Math.ceil(.1*(255-H))),X=b(_.relativeLuminance2(R,P,H),_.relativeLuminance2(D,k,B));return(R<<24|P<<16|H<<8|255)>>>0}S.blend=function(x,O){if(u=(255&O)/255,u===1)return O;const M=O>>24&255,D=O>>16&255,k=O>>8&255,B=x>>24&255,R=x>>16&255,P=x>>8&255;return c=B+Math.round((M-B)*u),f=R+Math.round((D-R)*u),v=P+Math.round((k-P)*u),m.toRgba(c,f,v)},S.ensureContrastRatio=function(x,O,M){const D=_.relativeLuminance(x>>8),k=_.relativeLuminance(O>>8);if(b(D,k)<M){if(k<D){const P=E(x,O,M),H=b(D,_.relativeLuminance(P>>8));if(H<M){const X=L(x,O,M);return H>b(D,_.relativeLuminance(X>>8))?P:X}return P}const B=L(x,O,M),R=b(D,_.relativeLuminance(B>>8));if(R<M){const P=E(x,O,M);return R>b(D,_.relativeLuminance(P>>8))?B:P}return B}},S.reduceLuminance=E,S.increaseLuminance=L,S.toChannels=function(x){return[x>>24&255,x>>16&255,x>>8&255,255&x]}})(d||(a.rgba=d={})),a.toPaddedHex=y,a.contrastRatio=b},345:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===c)return void this._listeners.splice(f,1)}}})),this._event}fire(c,f){const v=[];for(let u=0;u<this._listeners.length;u++)v.push(this._listeners[u]);for(let u=0;u<v.length;u++)v[u].call(void 0,c,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(c,f){return c((v=>f.fire(v)))},a.runAndSubscribe=function(c,f){return f(void 0),c((v=>f(v)))}},859:(g,a)=>{function c(f){for(const v of f)v.dispose();f.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const v=this._disposables.indexOf(f);v!==-1&&this._disposables.splice(v,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(f){var v;this._isDisposed||f===this._value||((v=this._value)==null||v.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)==null||f.dispose(),this._value=void 0}},a.toDisposable=function(f){return{dispose:f}},a.disposeArray=c,a.getDisposeArrayDisposable=function(f){return{dispose:()=>c(f)}}},485:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(v,u,m){this._data[v]||(this._data[v]={}),this._data[v][u]=m}get(v,u){return this._data[v]?this._data[v][u]:void 0}clear(){this._data={}}}a.TwoKeyMap=c,a.FourKeyMap=class{constructor(){this._data=new c}set(f,v,u,m,w){this._data.get(f,v)||this._data.set(f,v,new c),this._data.get(f,v).set(u,m,w)}get(f,v,u,m){var w;return(w=this._data.get(f,v))==null?void 0:w.get(u,m)}clear(){this._data.clear()}}},399:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const c=a.isNode?"node":navigator.userAgent,f=a.isNode?"node":navigator.platform;a.isFirefox=c.includes("Firefox"),a.isLegacyEdge=c.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(c),a.getSafariVersion=function(){if(!a.isSafari)return 0;const v=c.match(/Version\/(\d+)/);return v===null||v.length<2?0:parseInt(v[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),a.isIpad=f==="iPad",a.isIphone=f==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),a.isLinux=f.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(c)},385:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const f=c(399);class v{constructor(){this._tasks=[],this._i=0}enqueue(w){this._tasks.push(w),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(w){this._idleCallback=void 0;let C=0,_=0,d=w.timeRemaining(),y=0;for(;this._i<this._tasks.length;){if(C=Date.now(),this._tasks[this._i]()||this._i++,C=Math.max(1,Date.now()-C),_=Math.max(C,_),y=w.timeRemaining(),1.5*_>y)return d-C<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(d-C))}ms`),void this._start();d=y}this.clear()}}class u extends v{_requestCallback(w){return setTimeout((()=>w(this._createDeadline(16))))}_cancelCallback(w){clearTimeout(w)}_createDeadline(w){const C=Date.now()+w;return{timeRemaining:()=>Math.max(0,C-Date.now())}}}a.PriorityTaskQueue=u,a.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends v{_requestCallback(m){return requestIdleCallback(m)}_cancelCallback(m){cancelIdleCallback(m)}}:u,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(m){this._queue.clear(),this._queue.enqueue(m)}flush(){this._queue.flush()}}},147:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(u){return[u>>>16&255,u>>>8&255,255&u]}static fromColorRGB(u){return(255&u[0])<<16|(255&u[1])<<8|255&u[2]}clone(){const u=new c;return u.fg=this.fg,u.bg=this.bg,u.extended=this.extended.clone(),u}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=c;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(u){this._ext=u}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(u){this._ext&=-469762049,this._ext|=u<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(u){this._ext&=-67108864,this._ext|=67108863&u}get urlId(){return this._urlId}set urlId(u){this._urlId=u}get underlineVariantOffset(){const u=(3758096384&this._ext)>>29;return u<0?4294967288^u:u}set underlineVariantOffset(u){this._ext&=536870911,this._ext|=u<<29&3758096384}constructor(u=0,m=0){this._ext=0,this._urlId=0,this._ext=u,this._urlId=m}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=f},782:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const f=c(133),v=c(855),u=c(147);class m extends u.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new u.ExtendedAttrs,this.combinedData=""}static fromCharData(C){const _=new m;return _.setFromCharData(C),_}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(C){this.fg=C[v.CHAR_DATA_ATTR_INDEX],this.bg=0;let _=!1;if(C[v.CHAR_DATA_CHAR_INDEX].length>2)_=!0;else if(C[v.CHAR_DATA_CHAR_INDEX].length===2){const d=C[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=d&&d<=56319){const y=C[v.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=y&&y<=57343?this.content=1024*(d-55296)+y-56320+65536|C[v.CHAR_DATA_WIDTH_INDEX]<<22:_=!0}else _=!0}else this.content=C[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|C[v.CHAR_DATA_WIDTH_INDEX]<<22;_&&(this.combinedData=C[v.CHAR_DATA_CHAR_INDEX],this.content=2097152|C[v.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=m},855:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},133:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},a.utf32ToString=function(c,f=0,v=c.length){let u="";for(let m=f;m<v;++m){let w=c[m];w>65535?(w-=65536,u+=String.fromCharCode(55296+(w>>10))+String.fromCharCode(w%1024+56320)):u+=String.fromCharCode(w)}return u},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,f){const v=c.length;if(!v)return 0;let u=0,m=0;if(this._interim){const w=c.charCodeAt(m++);56320<=w&&w<=57343?f[u++]=1024*(this._interim-55296)+w-56320+65536:(f[u++]=this._interim,f[u++]=w),this._interim=0}for(let w=m;w<v;++w){const C=c.charCodeAt(w);if(55296<=C&&C<=56319){if(++w>=v)return this._interim=C,u;const _=c.charCodeAt(w);56320<=_&&_<=57343?f[u++]=1024*(C-55296)+_-56320+65536:(f[u++]=C,f[u++]=_)}else C!==65279&&(f[u++]=C)}return u}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,f){const v=c.length;if(!v)return 0;let u,m,w,C,_=0,d=0,y=0;if(this.interim[0]){let E=!1,L=this.interim[0];L&=(224&L)==192?31:(240&L)==224?15:7;let x,O=0;for(;(x=63&this.interim[++O])&&O<4;)L<<=6,L|=x;const M=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,D=M-O;for(;y<D;){if(y>=v)return 0;if(x=c[y++],(192&x)!=128){y--,E=!0;break}this.interim[O++]=x,L<<=6,L|=63&x}E||(M===2?L<128?y--:f[_++]=L:M===3?L<2048||L>=55296&&L<=57343||L===65279||(f[_++]=L):L<65536||L>1114111||(f[_++]=L)),this.interim.fill(0)}const b=v-4;let S=y;for(;S<v;){for(;!(!(S<b)||128&(u=c[S])||128&(m=c[S+1])||128&(w=c[S+2])||128&(C=c[S+3]));)f[_++]=u,f[_++]=m,f[_++]=w,f[_++]=C,S+=4;if(u=c[S++],u<128)f[_++]=u;else if((224&u)==192){if(S>=v)return this.interim[0]=u,_;if(m=c[S++],(192&m)!=128){S--;continue}if(d=(31&u)<<6|63&m,d<128){S--;continue}f[_++]=d}else if((240&u)==224){if(S>=v)return this.interim[0]=u,_;if(m=c[S++],(192&m)!=128){S--;continue}if(S>=v)return this.interim[0]=u,this.interim[1]=m,_;if(w=c[S++],(192&w)!=128){S--;continue}if(d=(15&u)<<12|(63&m)<<6|63&w,d<2048||d>=55296&&d<=57343||d===65279)continue;f[_++]=d}else if((248&u)==240){if(S>=v)return this.interim[0]=u,_;if(m=c[S++],(192&m)!=128){S--;continue}if(S>=v)return this.interim[0]=u,this.interim[1]=m,_;if(w=c[S++],(192&w)!=128){S--;continue}if(S>=v)return this.interim[0]=u,this.interim[1]=m,this.interim[2]=w,_;if(C=c[S++],(192&C)!=128){S--;continue}if(d=(7&u)<<18|(63&m)<<12|(63&w)<<6|63&C,d<65536||d>1114111)continue;f[_++]=d}}return _}}},776:function(g,a,c){var f=this&&this.__decorate||function(d,y,b,S){var E,L=arguments.length,x=L<3?y:S===null?S=Object.getOwnPropertyDescriptor(y,b):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(d,y,b,S);else for(var O=d.length-1;O>=0;O--)(E=d[O])&&(x=(L<3?E(x):L>3?E(y,b,x):E(y,b))||x);return L>3&&x&&Object.defineProperty(y,b,x),x},v=this&&this.__param||function(d,y){return function(b,S){y(b,S,d)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const u=c(859),m=c(97),w={trace:m.LogLevelEnum.TRACE,debug:m.LogLevelEnum.DEBUG,info:m.LogLevelEnum.INFO,warn:m.LogLevelEnum.WARN,error:m.LogLevelEnum.ERROR,off:m.LogLevelEnum.OFF};let C,_=a.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(d){super(),this._optionsService=d,this._logLevel=m.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),C=this}_updateLogLevel(){this._logLevel=w[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(d){for(let y=0;y<d.length;y++)typeof d[y]=="function"&&(d[y]=d[y]())}_log(d,y,b){this._evalLazyOptionalParams(b),d.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+y,...b)}trace(d,...y){var b;this._logLevel<=m.LogLevelEnum.TRACE&&this._log(((b=this._optionsService.options.logger)==null?void 0:b.trace.bind(this._optionsService.options.logger))??console.log,d,y)}debug(d,...y){var b;this._logLevel<=m.LogLevelEnum.DEBUG&&this._log(((b=this._optionsService.options.logger)==null?void 0:b.debug.bind(this._optionsService.options.logger))??console.log,d,y)}info(d,...y){var b;this._logLevel<=m.LogLevelEnum.INFO&&this._log(((b=this._optionsService.options.logger)==null?void 0:b.info.bind(this._optionsService.options.logger))??console.info,d,y)}warn(d,...y){var b;this._logLevel<=m.LogLevelEnum.WARN&&this._log(((b=this._optionsService.options.logger)==null?void 0:b.warn.bind(this._optionsService.options.logger))??console.warn,d,y)}error(d,...y){var b;this._logLevel<=m.LogLevelEnum.ERROR&&this._log(((b=this._optionsService.options.logger)==null?void 0:b.error.bind(this._optionsService.options.logger))??console.error,d,y)}};a.LogService=_=f([v(0,m.IOptionsService)],_),a.setTraceLogger=function(d){C=d},a.traceCall=function(d,y,b){if(typeof b.value!="function")throw new Error("not supported");const S=b.value;b.value=function(...E){if(C.logLevel!==m.LogLevelEnum.TRACE)return S.apply(this,E);C.trace(`GlyphRenderer#${S.name}(${E.map((x=>JSON.stringify(x))).join(", ")})`);const L=S.apply(this,E);return C.trace(`GlyphRenderer#${S.name} return`,L),L}}},726:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const c="di$target",f="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(v){return v[f]||[]},a.createDecorator=function(v){if(a.serviceRegistry.has(v))return a.serviceRegistry.get(v);const u=function(m,w,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(_,d,y){d[c]===d?d[f].push({id:_,index:y}):(d[f]=[{id:_,index:y}],d[c]=d)})(u,m,C)};return u.toString=()=>v,a.serviceRegistry.set(v,u),u}},97:(g,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const f=c(726);var v;a.IBufferService=(0,f.createDecorator)("BufferService"),a.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),a.ICoreService=(0,f.createDecorator)("CoreService"),a.ICharsetService=(0,f.createDecorator)("CharsetService"),a.IInstantiationService=(0,f.createDecorator)("InstantiationService"),(function(u){u[u.TRACE=0]="TRACE",u[u.DEBUG=1]="DEBUG",u[u.INFO=2]="INFO",u[u.WARN=3]="WARN",u[u.ERROR=4]="ERROR",u[u.OFF=5]="OFF"})(v||(a.LogLevelEnum=v={})),a.ILogService=(0,f.createDecorator)("LogService"),a.IOptionsService=(0,f.createDecorator)("OptionsService"),a.IOscLinkService=(0,f.createDecorator)("OscLinkService"),a.IUnicodeService=(0,f.createDecorator)("UnicodeService"),a.IDecorationService=(0,f.createDecorator)("DecorationService")}},n={};function o(g){var a=n[g];if(a!==void 0)return a.exports;var c=n[g]={exports:{}};return r[g].call(c.exports,c,c.exports,o),c.exports}var h={};return(()=>{var g=h;Object.defineProperty(g,"__esModule",{value:!0}),g.CanvasAddon=void 0;const a=o(345),c=o(859),f=o(776),v=o(949);class u extends c.Disposable{constructor(){super(...arguments),this._onChangeTextureAtlas=this.register(new a.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new a.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event}get textureAtlas(){var w;return(w=this._renderer)==null?void 0:w.textureAtlas}activate(w){const C=w._core;if(!w.element)return void this.register(C.onWillOpen((()=>this.activate(w))));this._terminal=w;const _=C.coreService,d=C.optionsService,y=C.screenElement,b=C.linkifier,S=C,E=S._bufferService,L=S._renderService,x=S._characterJoinerService,O=S._charSizeService,M=S._coreBrowserService,D=S._decorationService,k=S._logService,B=S._themeService;(0,f.setTraceLogger)(k),this._renderer=new v.CanvasRenderer(w,y,b,E,O,d,x,_,M,D,B),this.register((0,a.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,a.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),L.setRenderer(this._renderer),L.handleResize(E.cols,E.rows),this.register((0,c.toDisposable)((()=>{var R;L.setRenderer(this._terminal._core._createRenderer()),L.handleResize(w.cols,w.rows),(R=this._renderer)==null||R.dispose(),this._renderer=void 0})))}clearTextureAtlas(){var w;(w=this._renderer)==null||w.clearTextureAtlas()}}g.CanvasAddon=u})(),h})()))})(kv)),kv.exports}var sR=nR();/**
|
|
115
|
-
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
116
|
-
* @license MIT
|
|
117
|
-
*
|
|
118
|
-
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
119
|
-
* @license MIT
|
|
120
|
-
*
|
|
121
|
-
* Originally forked from (with the author's permission):
|
|
122
|
-
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
123
|
-
* http://bellard.org/jslinux/
|
|
124
|
-
* Copyright (c) 2011 Fabrice Bellard
|
|
125
|
-
*/var aR=class{constructor(e,t,r,n={}){this._terminal=e,this._regex=t,this._handler=r,this._options=n}provideLinks(e,t){let r=lR.computeLink(e,this._regex,this._terminal,this._handler);t(this._addCallbacks(r))}_addCallbacks(e){return e.map(t=>(t.leave=this._options.leave,t.hover=(r,n)=>{if(this._options.hover){let{range:o}=t;this._options.hover(r,n,o)}},t))}};function oR(e){try{let t=new URL(e),r=t.password&&t.username?`${t.protocol}//${t.username}:${t.password}@${t.host}`:t.username?`${t.protocol}//${t.username}@${t.host}`:`${t.protocol}//${t.host}`;return e.toLocaleLowerCase().startsWith(r.toLocaleLowerCase())}catch{return!1}}var lR=class Su{static computeLink(t,r,n,o){let h=new RegExp(r.source,(r.flags||"")+"g"),[g,a]=Su._getWindowedLineStrings(t-1,n),c=g.join(""),f,v=[];for(;f=h.exec(c);){let u=f[0];if(!oR(u))continue;let[m,w]=Su._mapStrIdx(n,a,0,f.index),[C,_]=Su._mapStrIdx(n,m,w,u.length);if(m===-1||w===-1||C===-1||_===-1)continue;let d={start:{x:w+1,y:m+1},end:{x:_,y:C+1}};v.push({range:d,text:u,activate:o})}return v}static _getWindowedLineStrings(t,r){let n,o=t,h=t,g=0,a="",c=[];if(n=r.buffer.active.getLine(t)){let f=n.translateToString(!0);if(n.isWrapped&&f[0]!==" "){for(g=0;(n=r.buffer.active.getLine(--o))&&g<2048&&(a=n.translateToString(!0),g+=a.length,c.push(a),!(!n.isWrapped||a.indexOf(" ")!==-1)););c.reverse()}for(c.push(f),g=0;(n=r.buffer.active.getLine(++h))&&n.isWrapped&&g<2048&&(a=n.translateToString(!0),g+=a.length,c.push(a),a.indexOf(" ")===-1););}return[c,o]}static _mapStrIdx(t,r,n,o){let h=t.buffer.active,g=h.getNullCell(),a=n;for(;o;){let c=h.getLine(r);if(!c)return[-1,-1];for(let f=a;f<c.length;++f){c.getCell(f,g);let v=g.getChars();if(g.getWidth()&&(o-=v.length||1,f===c.length-1&&v==="")){let u=h.getLine(r+1);u&&u.isWrapped&&(u.getCell(0,g),g.getWidth()===2&&(o+=1))}if(o<0)return[r,f]}r++,a=0}return[r,a]}},cR=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function uR(e,t){let r=window.open();if(r){try{r.opener=null}catch{}r.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}var hR=class{constructor(e=uR,t={}){this._handler=e,this._options=t}activate(e){this._terminal=e;let t=this._options,r=t.urlRegex||cR;this._linkProvider=this._terminal.registerLinkProvider(new aR(this._terminal,r,this._handler,t))}dispose(){var e;(e=this._linkProvider)==null||e.dispose()}};const Ou=new RegExp("(?<![a-zA-Z]:\\/\\/)(?:^|[\\s\"'`(\\[{])([./]?[\\w./-]+\\.[a-zA-Z]{1,10})(?::(\\d+)(?::(\\d+))?|\\((\\d+),(\\d+)\\))?","g");function c2(e){return!(!/\.[a-zA-Z]{1,10}(?::\d+(?::\d+)?|\(\d+,\d+\))?$/.test(e)||/^https?:\/\//i.test(e)||/^[a-z0-9-]+\.(com|org|net|io|dev|app|co)$/i.test(e))}const fR=typeof navigator<"u"&&navigator.platform.toUpperCase().includes("MAC");class dR{constructor(t,r,n,o){this.terminal=t,this.onFileOpen=r,this.terminalId=n,this.decorationManager=o}provideLinks(t,r){const n=this.terminal.buffer.active.getLine(t-1);if(!n){r(void 0);return}const o=n.translateToString(),h=new RegExp(Ou.source,Ou.flags),g=[];let a;for(;(a=h.exec(o))!==null;){const c=a[1];if(!c||!c2(c))continue;const f=a[2]?parseInt(a[2],10):a[4]?parseInt(a[4],10):void 0,v=a[3]?parseInt(a[3],10):a[5]?parseInt(a[5],10):void 0,u=a[0],m=u.indexOf(c),w=a.index+m,C=a.index+u.length,_=w,d=t-1;g.push({range:{start:{x:w+1,y:t},end:{x:C,y:t}},text:u.substring(m),decorations:{pointerCursor:!0,underline:!0},activate:(y,b)=>{(fR?!y.metaKey:!y.ctrlKey)||this.onFileOpen(c,f,v,this.terminalId)},hover:()=>{var y;(y=this.decorationManager)==null||y.highlightAt(d,_)},leave:()=>{var y;(y=this.decorationManager)==null||y.unhighlightAll()}})}r(g.length>0?g:void 0)}}class vR{constructor(t){er(this,"disposables",[]);er(this,"entries",[]);er(this,"lastScannedLine",-1);this.terminal=t,this.disposables.push(t.onWriteParsed(()=>this.scanNewLines()))}highlightAt(t,r){for(const n of this.entries)n.marker.line===t&&n.x===r&&n.element&&n.element.classList.add("file-path-decoration-hover")}unhighlightAll(){var t;for(const r of this.entries)(t=r.element)==null||t.classList.remove("file-path-decoration-hover")}scanNewLines(){const t=this.terminal.buffer.active,r=t.baseY+t.cursorY;for(let n=this.lastScannedLine+1;n<=r;n++)this.decorateLine(n);this.lastScannedLine=r}decorateLine(t){const r=this.terminal.buffer.active,n=r.getLine(t);if(!n)return;const o=n.translateToString(),h=new RegExp(Ou.source,Ou.flags);let g;for(;(g=h.exec(o))!==null;){const a=g[1];if(!a||!c2(a))continue;const c=g[0],f=c.indexOf(a),v=g.index+f,u=c.length-f,m=r.baseY+r.cursorY,w=t-m,C=this.terminal.registerMarker(w);if(!C||C.line===-1)continue;const _={marker:C,x:v},d=this.terminal.registerDecoration({marker:C,x:v,width:u});d&&(d.onRender(y=>{y.classList.add("file-path-decoration"),_.element=y}),this.disposables.push(d)),this.entries.push(_),this.disposables.push(C)}}dispose(){for(const t of this.disposables)t.dispose();this.disposables=[],this.entries=[],this.lastScannedLine=-1}}const pR=1;function aS(e,t){if(!e||e.readyState!==WebSocket.OPEN)return;const r=new TextEncoder().encode(t),n=new Uint8Array(1+r.length);n[0]=pR,n.set(r,1),e.send(n.buffer)}function gR({wsRef:e,modifierRef:t}){const[r,n]=z.useState(null);z.useEffect(()=>(t.current.clearCallback=()=>n(null),()=>{t.current.clearCallback=null}),[t]);const o=z.useCallback(c=>{c.preventDefault(),aS(e.current,"\x1B")},[e]),h=z.useCallback(c=>{c.preventDefault(),aS(e.current," ")},[e]),g=z.useCallback(c=>{c.preventDefault();const f=r==="ctrl"?null:"ctrl";n(f),t.current.ctrl=f==="ctrl",t.current.cmd=!1},[r,t]),a=z.useCallback(c=>{c.preventDefault();const f=r==="cmd"?null:"cmd";n(f),t.current.cmd=f==="cmd",t.current.ctrl=!1},[r,t]);return G.jsxs("div",{className:"virtual-keyboard",role:"toolbar","aria-label":"Virtual modifier keys",children:[G.jsx("button",{className:"virtual-key",onPointerDown:o,tabIndex:-1,children:"Esc"}),G.jsx("button",{className:"virtual-key",onPointerDown:h,tabIndex:-1,children:"Tab"}),G.jsx("button",{className:`virtual-key virtual-key-modifier${r==="ctrl"?" virtual-key-active":""}`,onPointerDown:g,tabIndex:-1,"aria-pressed":r==="ctrl",children:"Ctrl"}),G.jsx("button",{className:`virtual-key virtual-key-modifier${r==="cmd"?" virtual-key-active":""}`,onPointerDown:a,tabIndex:-1,"aria-pressed":r==="cmd",children:"Cmd"})]})}class _R{constructor(t){er(this,"term");er(this,"fitAddon");er(this,"getContainer");er(this,"debug");er(this,"_phase","initial-load");er(this,"_viewportY",0);er(this,"_baseY",0);er(this,"_wasAtBottom",!0);er(this,"_fitSuppressed",!1);er(this,"_isProgrammaticScroll",!1);er(this,"scrollDisposable");this.term=t.term,this.fitAddon=t.fitAddon,this.getContainer=t.getContainer,this.debug=t.debug??!1,this.scrollDisposable=this.term.onScroll(()=>this.handleScroll())}get phase(){return this._phase}get state(){return{phase:this._phase,viewportY:this._viewportY,baseY:this._baseY,wasAtBottom:this._wasAtBottom,fitSuppressed:this._fitSuppressed,isProgrammaticScroll:this._isProgrammaticScroll}}beginReplay(){if(this._phase!=="initial-load"){console.warn("[ScrollController] beginReplay called in phase:",this._phase);return}this._phase="buffer-replay",this._fitSuppressed=!0,this.log("phase","initial-load → buffer-replay")}endReplay(){if(this._phase!=="buffer-replay"){console.warn("[ScrollController] endReplay called in phase:",this._phase);return}this._fitSuppressed=!1,this._phase="interactive",this._wasAtBottom=!0,this.log("phase","buffer-replay → interactive"),this.programmaticScroll(()=>this.term.scrollToBottom()),this.safeFit()}enterInteractive(){if(this._phase!=="initial-load"){console.warn("[ScrollController] enterInteractive called in phase:",this._phase);return}this._phase="interactive",this.log("phase","initial-load → interactive")}reset(){this._phase="initial-load",this._viewportY=0,this._baseY=0,this._wasAtBottom=!0,this._fitSuppressed=!1,this._isProgrammaticScroll=!1,this.log("reset","back to initial-load")}suppressFit(){this._fitSuppressed=!0,this.log("fit","suppressed")}unsuppressFit(){this._fitSuppressed=!1,this.log("fit","unsuppressed")}safeFit(){var o,h;if(this._fitSuppressed){this.log("safeFit","skipped (fit suppressed)");return}if(!this.isContainerVisible()){this.log("safeFit","skipped (container not visible)");return}if(this._phase==="initial-load"){this.fitAddon.fit(),this.log("safeFit","fit (initial-load, no scroll preservation)");return}if(!(this._baseY>0||(((h=(o=this.term.buffer)==null?void 0:o.active)==null?void 0:h.baseY)??0)>0)){this.fitAddon.fit(),this.log("safeFit","fit (no scrollback)");return}const r=this._wasAtBottom,n=this._viewportY;this.fitAddon.fit(),r?(this.programmaticScroll(()=>this.term.scrollToBottom()),this.log("safeFit","fit + scrollToBottom (was at bottom)")):n>0?(this.programmaticScroll(()=>this.term.scrollToLine(n)),this.log("safeFit",`fit + scrollToLine(${n})`)):(console.warn("[ScrollController] restoreY=0 with scrollback — defaulting to bottom"),this.programmaticScroll(()=>this.term.scrollToBottom()))}scrollToBottom(){this.programmaticScroll(()=>this.term.scrollToBottom()),this._wasAtBottom=!0,this.log("scrollToBottom","explicit")}isContainerVisible(){const t=this.getContainer();if(!t)return!1;const r=t.getBoundingClientRect();return r.width>0&&r.height>0}dispose(){this.scrollDisposable.dispose(),this.log("dispose","cleaned up")}handleScroll(){var n,o,h,g,a,c,f,v;if(this._isProgrammaticScroll){const u=((o=(n=this.term.buffer)==null?void 0:n.active)==null?void 0:o.baseY)??0,m=((g=(h=this.term.buffer)==null?void 0:h.active)==null?void 0:g.viewportY)??0;this._baseY=u,this._viewportY=m,this._wasAtBottom=!u||m>=u,this.log("onScroll",`programmatic update: viewportY=${m} baseY=${u}`);return}if(this._phase!=="interactive"){this.log("onScroll",`ignored (phase: ${this._phase})`);return}if(!this.isContainerVisible()){this.log("onScroll","ignored (container not visible)");return}const t=((c=(a=this.term.buffer)==null?void 0:a.active)==null?void 0:c.baseY)??0,r=((v=(f=this.term.buffer)==null?void 0:f.active)==null?void 0:v.viewportY)??0;r===0&&t>0&&this._viewportY>0&&console.warn("[ScrollController] unexpected scroll-to-top in interactive phase:",`was viewportY=${this._viewportY}, now viewportY=0, baseY=${t}`),this._baseY=t,this._viewportY=r,this._wasAtBottom=!t||r>=t,this.log("onScroll",`viewportY=${r} baseY=${t} wasAtBottom=${this._wasAtBottom}`)}programmaticScroll(t){this._isProgrammaticScroll=!0;try{t()}finally{this._isProgrammaticScroll=!1}}log(t,r){this.debug&&console.debug(`[ScrollController] ${t}: ${r}`)}}function mR({fitRef:e,wsRef:t,xtermRef:r,connStatus:n,toolbarExtra:o,onReconnect:h}){const g=c=>{c.preventDefault(),h()},a=c=>{var f;c.preventDefault(),(f=r.current)==null||f.scrollToBottom()};return G.jsxs("div",{className:"terminal-controls",children:[G.jsx("button",{className:"terminal-control-btn",onPointerDown:g,tabIndex:-1,"aria-label":"Refresh terminal",children:G.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[G.jsx("path",{d:"M13.5 2.5v4h-4"}),G.jsx("path",{d:"M2.5 8a5.5 5.5 0 0 1 9.35-3.5L13.5 6.5"}),G.jsx("path",{d:"M2.5 13.5v-4h4"}),G.jsx("path",{d:"M13.5 8a5.5 5.5 0 0 1-9.35 3.5L2.5 9.5"})]})}),G.jsx("button",{className:"terminal-control-btn",onPointerDown:a,tabIndex:-1,"aria-label":"Scroll to bottom",children:G.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[G.jsx("path",{d:"M8 3v8"}),G.jsx("path",{d:"M4 8l4 4 4-4"}),G.jsx("line",{x1:"4",y1:"13",x2:"12",y2:"13"})]})}),G.jsx("span",{className:`terminal-control-btn terminal-status-icon terminal-status-${n}`,role:"status",title:n==="connected"?"Connected":n==="reconnecting"?"Reconnecting…":"Disconnected","aria-label":n==="connected"?"Connected":n==="reconnecting"?"Reconnecting":"Disconnected",children:G.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:G.jsx("circle",{cx:"8",cy:"8",r:"4",fill:"currentColor"})})}),o&&G.jsxs(G.Fragment,{children:[G.jsx("span",{className:"toolbar-divider"}),o]})]})}const u2=0,h2=1,f2=["image/png","image/jpeg","image/gif","image/webp","image/bmp"];async function yR(e){var r;if(!((r=navigator.clipboard)!=null&&r.read))return!1;let t=!1;try{const n=await navigator.clipboard.read();for(const o of n){const h=o.types.find(g=>f2.includes(g));if(h){t=!0;const g=await o.getType(h);e.write(`\r
|
|
126
|
-
\x1B[90m[Uploading image...]\x1B[0m`);const{path:a}=await e2(g);return e.write("\r\x1B[2K"),e.paste(a),!0}}}catch{if(t)return e.write(`\r\x1B[2K\x1B[31m[Image upload failed]\x1B[0m\r
|
|
127
|
-
`),!0}return!1}async function bR(e){var t;if(!await yR(e))try{const r=await((t=navigator.clipboard)==null?void 0:t.readText());r&&e.paste(r)}catch{}}function SR(e,t){var n;const r=(n=e.clipboardData)==null?void 0:n.items;if(r){for(const o of Array.from(r))if(f2.includes(o.type)){const h=o.getAsFile();if(!h)continue;e.preventDefault(),t.write(`\r
|
|
128
|
-
\x1B[90m[Uploading image...]\x1B[0m`),e2(h).then(({path:g})=>{t.write("\r\x1B[2K"),t.paste(g)}).catch(()=>{t.write(`\r\x1B[2K\x1B[31m[Image upload failed]\x1B[0m\r
|
|
129
|
-
`)});return}}}function Pv({wsPath:e,onFileOpen:t,persistent:r,toolbarExtra:n}){const o=z.useRef(null),h=z.useRef(null),g=z.useRef(null),a=z.useRef(null),c=z.useRef({ctrl:!1,cmd:!1,clearCallback:null}),f=s2(`(max-width: ${Q5}px)`),[v,u]=z.useState("connected"),m=z.useRef(null);return z.useEffect(()=>{var Z,W;if(!o.current)return;const w=new JD.Terminal({cursorBlink:!0,fontSize:13,lineHeight:1,fontFamily:'Menlo, Monaco, "Courier New", monospace',customGlyphs:!0,scrollback:5e4,theme:{background:"#1a1a1a",foreground:"#e0e0e0",cursor:"#ffffff"},allowProposedApi:!0,linkHandler:{activate:(V,ee)=>{window.open(ee,"_blank","noopener")}}});h.current=w;const C=new tR.FitAddon;a.current=C,w.loadAddon(C),w.open(o.current);const _=()=>{try{w.loadAddon(new sR.CanvasAddon)}catch{}};try{const V=new iR.WebglAddon;V.onContextLoss(()=>{V.dispose(),_()}),w.loadAddon(V)}catch{_()}const d=new hR((V,ee)=>{V.preventDefault(),window.open(ee,"_blank")});w.loadAddon(d);const y=e.split("/").pop();let b=null,S=null;if(t){S=new vR(w);const V=new dR(w,(ee,ue,ie,me)=>{t(ee,ue,ie,me)},y,S);b=w.registerLinkProvider(V)}const E=navigator.platform.toUpperCase().includes("MAC");w.attachCustomKeyEventHandler(V=>{if(V.type!=="keydown")return!0;if(V.key==="Enter"&&V.shiftKey)return V.preventDefault(),w.paste(`\\
|
|
130
|
-
`),!1;if(!(E?V.metaKey:V.ctrlKey&&V.shiftKey))return!0;if(V.key==="c"||V.key==="C"){const ue=w.getSelection();return ue?(V.preventDefault(),navigator.clipboard.writeText(ue).catch(()=>{}),!1):!0}return V.key==="v"||V.key==="V"?(V.preventDefault(),bR(w),!1):!0});const L=V=>SR(V,w);o.current.addEventListener("paste",L);const x=new _R({term:w,fitAddon:C,getContainer:()=>o.current});let O=null;const M=()=>{O&&clearTimeout(O),O=setTimeout(()=>{O=null,x.safeFit()},150)};x.safeFit();const D=setTimeout(M,300),B=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}${e}`,R={lastSeq:0,attempts:0,timer:null,disposed:!1,initialPhase:!0,initialBuffer:"",flushTimer:null,skipReplay:!1},P=50,H=3e4,X=V=>(V=V.replace(/\x1b\[[\?>][\d;]*c/g,""),V=V.replace(/\[[\?>][\d;]*c/g,""),V),F=V=>{const ee=V!==void 0?`${B}?resume=${V}`:B,ue=new WebSocket(ee);ue.binaryType="arraybuffer",g.current=ue,R.initialPhase=!0,R.initialBuffer="",R.flushTimer&&(clearTimeout(R.flushTimer),R.flushTimer=null),x.reset();const ie=()=>{R.initialPhase=!1,R.flushTimer=null;const me=()=>{var de;((de=g.current)==null?void 0:de.readyState)===WebSocket.OPEN&&Bv(g.current,"resize",{cols:w.cols,rows:w.rows})};if(R.skipReplay){R.initialBuffer="",R.skipReplay=!1,x.enterInteractive(),me();return}if(R.initialBuffer){const de=X(R.initialBuffer);R.initialBuffer="",de?(x.beginReplay(),w.write(de,()=>{x.endReplay(),me()})):(x.enterInteractive(),M(),me())}else x.enterInteractive(),M(),me()};ue.onopen=()=>{R.attempts=0,u("connected"),Bv(ue,"resize",{cols:w.cols,rows:w.rows})},ue.onmessage=me=>{var Ce;const de=new Uint8Array(me.data);if(de.length===0)return;const Me=de[0],ke=de.subarray(1);if(Me===h2){const Ve=new TextDecoder().decode(ke);if(R.initialPhase)R.initialBuffer+=Ve,R.flushTimer||(R.flushTimer=setTimeout(ie,500));else{const Dt=X(Ve);Dt&&w.write(Dt)}}else if(Me===u2)try{const Ve=JSON.parse(new TextDecoder().decode(ke));Ve.type==="seq"&&typeof((Ce=Ve.payload)==null?void 0:Ce.seq)=="number"&&(R.lastSeq=Ve.payload.seq)}catch{}},ue.onclose=()=>{if(R.disposed)return;if(R.attempts>=P){u("disconnected");return}u("reconnecting");const me=Math.min(1e3*Math.pow(2,R.attempts),H);R.attempts++,R.timer=setTimeout(()=>{R.disposed||F(R.lastSeq||void 0)},me)},ue.onerror=()=>{}},K=((W=(Z=window.matchMedia)==null?void 0:Z.call(window,"(pointer: coarse)"))==null?void 0:W.matches)??!1,Y=w.textarea;let j=!1,$=0,N="",U=0;const J=()=>{j=!0},te=()=>{j=!1,$=Date.now()};Y&&(Y.addEventListener("compositionstart",J),Y.addEventListener("compositionend",te)),w.onData(V=>{var de,Me,ke,Ce,Ve,Dt;const ee=g.current;if(!ee||ee.readyState!==WebSocket.OPEN)return;const ue=Date.now();if((j||ue-$<150||K)&&V===N&&ue-U<150)return;if(N=V,U=ue,R.initialPhase){const Se=V.replace(/\x1b\[[\?>][\d;]*c/g,"").replace(/\x1b\[\d+;\d+R/g,"").replace(/\x1b\[\?[\d;]*\$y/g,"");if(!Se)return;V=Se}const me=c.current;if((me.ctrl||me.cmd)&&V.length===1){const Se=V.charCodeAt(0);if(me.ctrl)Se>=97&&Se<=122?V=String.fromCharCode(Se-96):Se>=65&&Se<=90&&(V=String.fromCharCode(Se-64)),me.ctrl=!1,me.cmd=!1,(de=me.clearCallback)==null||de.call(me);else if(me.cmd){const ye=V.toLowerCase();if(ye==="v"){(Me=navigator.clipboard)==null||Me.readText().then(be=>{be&&w.paste(be)}).catch(()=>{}),me.ctrl=!1,me.cmd=!1,(ke=me.clearCallback)==null||ke.call(me);return}if(ye==="c"){const be=w.getSelection();be&&((Ce=navigator.clipboard)==null||Ce.writeText(be).catch(()=>{})),me.ctrl=!1,me.cmd=!1,(Ve=me.clearCallback)==null||Ve.call(me);return}me.ctrl=!1,me.cmd=!1,(Dt=me.clearCallback)==null||Dt.call(me)}}wR(ee,V)}),w.onResize(({cols:V,rows:ee})=>{const ue=g.current;(ue==null?void 0:ue.readyState)===WebSocket.OPEN&&Bv(ue,"resize",{cols:V,rows:ee})}),m.current=()=>{w.reset(),R.lastSeq=0,R.attempts=0,R.skipReplay=!0;const V=g.current;V&&(R.disposed=!0,V.close(),R.disposed=!1),F()},F();const fe=new ResizeObserver(()=>M());fe.observe(o.current);const ve=()=>{document.hidden||M()};return document.addEventListener("visibilitychange",ve),()=>{var V,ee;R.disposed=!0,R.timer&&clearTimeout(R.timer),R.flushTimer&&clearTimeout(R.flushTimer),clearTimeout(D),O&&clearTimeout(O),Y&&(Y.removeEventListener("compositionstart",J),Y.removeEventListener("compositionend",te)),x.dispose(),S==null||S.dispose(),b==null||b.dispose(),(V=o.current)==null||V.removeEventListener("paste",L),fe.disconnect(),document.removeEventListener("visibilitychange",ve),(ee=g.current)==null||ee.close(),w.dispose(),h.current=null,g.current=null,a.current=null}},[e]),G.jsxs("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",position:"relative"},children:[r===!1&&G.jsx("div",{style:{backgroundColor:"#3a2a00",color:"#ffcc00",padding:"4px 12px",fontSize:"12px",flexShrink:0},children:"Session persistence unavailable — this terminal will not survive a restart"}),G.jsx("div",{ref:o,className:"terminal-container",style:{width:"100%",flex:1,minHeight:0,overflow:"hidden",backgroundColor:"#1a1a1a"}}),G.jsx(mR,{fitRef:a,wsRef:g,xtermRef:h,connStatus:v,toolbarExtra:n,onReconnect:()=>{var w;return(w=m.current)==null?void 0:w.call(m)}}),f&&G.jsx(gR,{wsRef:g,modifierRef:c})]})}function wR(e,t){const r=new TextEncoder().encode(t),n=new Uint8Array(1+r.length);n[0]=h2,n.set(r,1),e.send(n.buffer)}function Bv(e,t,r){const n=JSON.stringify({type:t,payload:r}),o=new TextEncoder().encode(n),h=new Uint8Array(1+o.length);h[0]=u2,h.set(o,1),e.send(h.buffer)}const CR=2500;function xR(){const[e,t]=z.useState(null),[r,n]=z.useState(null),o=z.useCallback(async()=>{try{const g=await ID();t(a=>a!==null&&JSON.stringify(a)===JSON.stringify(g)?a:g),n(null)}catch(g){n(g instanceof Error?g.message:"Failed to fetch overview")}},[]);z.useEffect(()=>{o();const g=setInterval(o,CR);return()=>clearInterval(g)},[o]),n2(o);const h=z.useCallback(async()=>{await ND(),await o()},[o]);return{data:e,error:r,refresh:h}}function ER(e){if(e.blocked)return`Blocked: ${e.blocked}`;if(e.mode==="soft")return"running";if(!e.phase)return"starting";const t=e.planPhases;if(t.length===0)return e.phase;const r=t.findIndex(n=>n.id===e.phase);return r===-1?e.phase:`${e.phase} (${r+1}/${t.length})`}function jv(e){if(e<0)return"-";const t=Math.floor(e/6e4);if(t<60)return`${t}m`;const r=Math.floor(t/60),n=t%60;return r<24?`${r}h ${n}m`:`${Math.floor(r/24)}d ${r%24}h`}function AR(e,t){if(!e)return"-";const r=Date.now()-new Date(e).getTime();if(r<0)return"-";const n=Math.max(0,r-t);return t===0?jv(r):`${jv(r)} wc / ${jv(n)} ag`}function MR({builder:e,onOpen:t}){const r=e.issueId?`#${e.issueId}`:e.id,n=e.issueTitle||e.id,o=e.blocked!==null&&e.blocked!=="",h=Math.min(100,Math.max(0,Math.round(e.progress??0)));return G.jsxs("tr",{className:`builder-row${o?" builder-row--blocked":""}`,children:[G.jsx("td",{className:"builder-col-id",children:r}),G.jsx("td",{className:"builder-col-title",children:n}),G.jsx("td",{className:"builder-col-state",children:G.jsx("span",{className:o?"builder-state-blocked":"builder-state-active",children:ER(e)})}),G.jsxs("td",{className:"builder-col-progress",children:[G.jsx("div",{className:"progress-bar",children:G.jsx("div",{className:`progress-fill${o?" progress-fill--blocked":""}`,style:{width:`${h}%`}})}),G.jsxs("span",{className:"progress-pct",children:[h,"%"]})]}),G.jsx("td",{className:"builder-col-elapsed",children:AR(e.startedAt,e.idleMs??0)}),G.jsx("td",{className:"builder-col-actions",children:t&&G.jsx("button",{className:"builder-row-open",onClick:()=>t(e),children:"Open"})})]})}function LR(e){const t=Date.now()-new Date(e).getTime(),r=Math.floor(t/6e4);if(r<60)return`${Math.max(1,r)}m`;const n=Math.floor(r/60);return n<24?`${n}h`:`${Math.floor(n/24)}d`}function OR(e,t){const r=[];for(const n of e)r.push({key:`pr-${n.id}`,issueOrPR:`#${n.id}`,title:n.title,kind:"PR review",kindClass:"attention-kind--pr",waitingSince:n.createdAt,url:n.url});for(const n of t){if(!n.blocked||!n.blockedSince||n.blocked==="PR review")continue;const o=n.issueId?`#${n.issueId}`:n.id;r.push({key:`gate-${n.id}`,issueOrPR:o,title:n.issueTitle||n.id,kind:n.blocked,kindClass:n.blocked==="spec review"?"attention-kind--spec":"attention-kind--plan",waitingSince:n.blockedSince})}return r.sort((n,o)=>new Date(n.waitingSince).getTime()-new Date(o.waitingSince).getTime()),r}function TR({prs:e,builders:t}){const r=OR(e,t);return r.length===0?G.jsx("p",{className:"work-empty",children:"Nothing needs attention"}):G.jsx("div",{className:"attention-rows",children:r.map(n=>{const o=G.jsxs(G.Fragment,{children:[G.jsx("span",{className:"attention-row-id",children:n.issueOrPR}),G.jsx("span",{className:"attention-row-title",children:n.title}),G.jsx("span",{className:`attention-row-kind ${n.kindClass}`,children:n.kind}),G.jsx("span",{className:"attention-row-age",children:LR(n.waitingSince)})]});return n.url?G.jsx("a",{className:"attention-row",href:n.url,target:"_blank",rel:"noopener noreferrer",children:o},n.key):G.jsx("div",{className:"attention-row",children:o},n.key)})})}function DR(e){const t=Date.now()-new Date(e).getTime(),r=Math.floor(t/6e4);if(r<60)return`${Math.max(1,r)}m`;const n=Math.floor(r/60);return n<24?`${n}h`:`${Math.floor(n/24)}d`}const RR={high:"priority-dot--high",medium:"priority-dot--med",low:"priority-dot--low"},kR={bug:"type-tag--bug",project:"type-tag--project",spike:"type-tag--spike"};function Iv({label:e,filePath:t,onRefresh:r}){return G.jsx("button",{className:"backlog-artifact-link",onClick:async n=>{n.preventDefault(),n.stopPropagation(),await Ch(t),r==null||r()},children:e})}function PR({items:e,onRefresh:t}){const r=e.filter(n=>!n.hasBuilder);return r.length===0?G.jsx("p",{className:"work-empty",children:"No open issues"}):G.jsx("div",{className:"backlog-rows",children:r.map(n=>G.jsxs("div",{className:"backlog-row",children:[G.jsxs("a",{className:"backlog-row-main",href:n.url,target:"_blank",rel:"noopener noreferrer",children:[G.jsx("span",{className:`backlog-priority-dot ${RR[n.priority]??"priority-dot--low"}`}),G.jsxs("span",{className:"backlog-row-number",children:["#",n.id]}),G.jsx("span",{className:`backlog-type-tag ${kR[n.type]??""}`,children:n.type}),G.jsx("span",{className:"backlog-row-title",children:n.title}),G.jsx("span",{className:"backlog-row-age",children:DR(n.createdAt)})]}),(n.specPath||n.planPath||n.reviewPath)&&G.jsxs("span",{className:"backlog-artifacts",children:[n.specPath&&G.jsx(Iv,{label:"spec",filePath:n.specPath,onRefresh:t}),n.planPath&&G.jsx(Iv,{label:"plan",filePath:n.planPath,onRefresh:t}),n.reviewPath&&G.jsx(Iv,{label:"review",filePath:n.reviewPath,onRefresh:t})]})]},n.id))})}function BR(e){const t=Date.now()-new Date(e).getTime(),r=Math.floor(t/6e4);if(r<60)return`${Math.max(1,r)}m ago`;const n=Math.floor(r/60);return n<24?`${n}h ago`:`${Math.floor(n/24)}d ago`}const jR={bug:"type-tag--bug",project:"type-tag--project",spike:"type-tag--spike"};function Nv({label:e,filePath:t,onRefresh:r}){return G.jsx("button",{className:"backlog-artifact-link",onClick:async n=>{n.preventDefault(),n.stopPropagation(),await Ch(t),r==null||r()},children:e})}function IR({items:e,onRefresh:t}){return e.length===0?null:G.jsx("div",{className:"recently-closed-rows",children:e.map(r=>{const n=r.prUrl||r.specPath||r.planPath||r.reviewPath;return G.jsxs("div",{className:"recently-closed-row",children:[G.jsxs("a",{className:"recently-closed-row-main",href:r.url,target:"_blank",rel:"noopener noreferrer",children:[G.jsx("span",{className:"recently-closed-check",children:"✓"}),G.jsxs("span",{className:"backlog-row-number",children:["#",r.id]}),G.jsx("span",{className:`backlog-type-tag ${jR[r.type]??""}`,children:r.type}),G.jsx("span",{className:"backlog-row-title",children:r.title}),G.jsx("span",{className:"backlog-row-age",children:BR(r.closedAt)})]}),n&&G.jsxs("span",{className:"backlog-artifacts",children:[r.specPath&&G.jsx(Nv,{label:"spec",filePath:r.specPath,onRefresh:t}),r.planPath&&G.jsx(Nv,{label:"plan",filePath:r.planPath,onRefresh:t}),r.reviewPath&&G.jsx(Nv,{label:"review",filePath:r.reviewPath,onRefresh:t}),r.prUrl&&G.jsx("a",{className:"backlog-artifact-link",href:r.prUrl,target:"_blank",rel:"noopener noreferrer",onClick:o=>o.stopPropagation(),children:"PR"})]})]},r.id)})})}function NR(e,t){const r=e.replace(/^\//,"");return t.staged.some(n=>r.endsWith(n)||n.endsWith(r))?{indicator:"A",className:"git-staged"}:t.modified.some(n=>r.endsWith(n)||n.endsWith(r))?{indicator:"M",className:"git-modified"}:t.untracked.some(n=>r.endsWith(n)||n.endsWith(r))?{indicator:"?",className:"git-untracked"}:null}function d2({entry:e,expanded:t,gitStatus:r,onToggle:n,onOpen:o,depth:h=0}){var f;const g=e.type==="directory",a=t.has(e.path),c=g?null:NR(e.path,r);return G.jsxs(G.Fragment,{children:[G.jsxs("div",{className:`file-node ${g?"directory":"file"}`,style:{paddingLeft:`${h*16+8}px`},onClick:()=>g?n(e.path):o(e.path),role:"treeitem","aria-expanded":g?a:void 0,tabIndex:0,onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),g?n(e.path):o(e.path))},children:[G.jsx("span",{className:"file-icon",children:g?a?"📂":"📁":"📄"}),G.jsx("span",{className:"file-name",children:e.name}),c&&G.jsx("span",{className:`git-indicator ${c.className}`,children:c.indicator})]}),g&&a&&((f=e.children)==null?void 0:f.map(v=>G.jsx(d2,{entry:v,expanded:t,gitStatus:r,onToggle:n,onOpen:o,depth:h+1},v.path)))]})}function v2(e,t=[]){for(const r of e)r.type==="file"&&t.push(r),r.children&&v2(r.children,t);return t}function zR({onRefresh:e}){const[t,r]=z.useState([]),[n,o]=z.useState(new Set),[h,g]=z.useState(null),[a,c]=z.useState(!1),[f,v]=z.useState({modified:[],staged:[],untracked:[]}),[u,m]=z.useState([]),[w,C]=z.useState(""),[_,d]=z.useState(!1),y=z.useRef(null),b=z.useCallback(async()=>{try{const R=await $D();r(R),g(null),c(!0)}catch(R){g(R.message)}},[]),S=z.useCallback(async()=>{try{const R=await FD();v(R)}catch(R){console.error("Failed to load git status:",R)}},[]),E=z.useCallback(async()=>{try{const R=await qD();m(R)}catch(R){console.error("Failed to load recent files:",R)}},[]);z.useEffect(()=>{a||(b(),S(),E())},[a,b,S,E]),z.useEffect(()=>{const R=setInterval(()=>{b(),S()},5e3);return()=>clearInterval(R)},[b,S]);const L=R=>{o(P=>{const H=new Set(P);return H.has(R)?H.delete(R):H.add(R),H})},x=async R=>{try{await Ch(R),e(),E()}catch(P){console.error("Failed to open file:",P)}},O=z.useMemo(()=>v2(t),[t]),M=z.useMemo(()=>{if(!w.trim())return[];const R=w.toLowerCase();return O.filter(P=>P.name.toLowerCase().includes(R)||P.path.toLowerCase().includes(R)).slice(0,10)},[O,w]),D=R=>{C(R.target.value),d(!0)},k=R=>{R.key==="Escape"?(d(!1),C("")):R.key==="Enter"&&M.length>0&&(x(M[0].path),C(""),d(!1))},B=R=>{x(R),C(""),d(!1)};return h?G.jsxs("div",{className:"file-tree-error",children:["Error: ",h]}):a?G.jsxs("div",{className:"file-tree-container",children:[G.jsxs("div",{className:"file-search",children:[G.jsx("input",{ref:y,type:"text",className:"file-search-input",placeholder:"Search files...",value:w,onChange:D,onKeyDown:k,onFocus:()=>d(!0),onBlur:()=>setTimeout(()=>d(!1),200)}),_&&M.length>0&&G.jsx("div",{className:"file-search-suggestions",children:M.map(R=>G.jsxs("div",{className:"file-search-suggestion",onMouseDown:()=>B(R.path),children:[G.jsx("span",{className:"suggestion-name",children:R.name}),G.jsx("span",{className:"suggestion-path",children:R.path})]},R.path))})]}),u.length>0&&G.jsxs("div",{className:"file-tree-section",children:[G.jsx("div",{className:"file-tree-section-header",children:"Recent"}),u.map(R=>G.jsxs("div",{className:"file-node file recent-file",style:{paddingLeft:"8px"},onClick:()=>x(R.path),role:"treeitem",tabIndex:0,onKeyDown:P=>{(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),x(R.path))},children:[G.jsx("span",{className:"file-icon",children:"🕐"}),G.jsx("span",{className:"file-name",children:R.name}),G.jsx("span",{className:"file-path-hint",children:R.relativePath})]},R.id))]}),G.jsxs("div",{className:"file-tree-section",children:[G.jsx("div",{className:"file-tree-section-header",children:"Files"}),G.jsx("div",{className:"file-tree",role:"tree","aria-label":"Project files",children:t.map(R=>G.jsx(d2,{entry:R,expanded:n,gitStatus:f,onToggle:L,onOpen:x},R.path))})]})]}):G.jsx("div",{className:"file-tree-loading",children:"Loading files..."})}function HR(e){const t=Math.floor(e/6e4);if(t<1)return"<1m";if(t<60)return`${t}m`;const r=Math.floor(t/60);return r<24?`${r}h`:`${Math.floor(r/24)}d`}function $R(e){const t=e.split("/").filter(Boolean);return t.length<=1?e:t.slice(-2).join("/")}const UR=3e4;function FR({utils:e,annotations:t,onSelectTab:r}){if(e.length===0&&t.length===0)return null;const n=Date.now();return G.jsxs("section",{className:"work-section",children:[G.jsx("h3",{className:"work-section-title",children:"Open Files & Shells"}),G.jsxs("div",{className:"ofs-rows",children:[e.length>0&&G.jsxs(G.Fragment,{children:[G.jsx("div",{className:"ofs-subgroup-label",children:"Shells"}),e.map(o=>{const h=!o.lastDataAt||n-o.lastDataAt>UR,g=o.lastDataAt?HR(n-o.lastDataAt):"";return G.jsxs("div",{className:"ofs-row",onClick:()=>r(o.id),children:[G.jsx("span",{className:`ofs-dot ${h?"ofs-dot--idle":"ofs-dot--running"}`}),G.jsx("span",{className:"ofs-name",children:o.name||`Shell ${o.id}`}),h&&g&&G.jsx("span",{className:"ofs-idle",children:g})]},o.id)})]}),t.length>0&&G.jsxs(G.Fragment,{children:[G.jsx("div",{className:"ofs-subgroup-label",children:"Files"}),t.map(o=>{const h=o.file.split("/").pop()??o.file;return G.jsxs("div",{className:"ofs-row",onClick:()=>r(o.id),title:o.file,children:[G.jsx("span",{className:"ofs-file-icon",children:"📄"}),G.jsx("span",{className:"ofs-name",children:h}),G.jsx("span",{className:"ofs-path",children:$R(o.file)})]},o.id)})]})]})]})}const Aa=['Use `af spawn --task "description"` for quick one-off tasks that don\'t need a spec',"Run `af status` to see all active builders and their current phase",'Use `af send architect "message"` to notify the architect when you need guidance',"Run `af cleanup --project 0042` after merging a PR to clean up the worktree","Use `af spawn --soft -p 42` for flexible, protocol-guided work without strict porch orchestration","Run `af dash start` to launch the architect dashboard","Use `af spawn 42 --resume` to resume an existing builder worktree instead of recreating it","Use `af open file.ts` to open a file in the dashboard annotation viewer","Run `af tower start` to start the Tower server — there is no `restart` command, use stop then start","Check `af-config.json` at your project root to customize builder and architect commands","Run `porch pending` to see all gates waiting for your approval across all projects","Use `porch status 42` to see detailed phase status for a specific project","Run `porch next 42` to get the next tasks for a project","Use `porch done 42` to signal that the current phase work is complete","Gates like `spec-approval` and `plan-approval` require explicit human approval before advancing","Porch tracks state in `codev/projects/<id>/status.yaml` — never edit this file directly","Use `porch approve 42 spec-approval` to approve a gate (human only)","Porch drives SPIR, TICK, and BUGFIX protocols via a state machine with automatic consultations","Use `consult -m gemini --type integration` for integration reviews with Gemini","Run `consult -m gemini --protocol spir --type spec` to get a Gemini review of your specification","Use `consult -m codex --protocol spir --type spec` for a focused specification review","Run `consult -m claude --protocol spir --type plan` to get feedback on your implementation plan","The `consult` CLI supports three models: `gemini`, `codex`, and `claude`",'Use `consult -m gemini --prompt "your question"` to ask Gemini a general question with codebase context','Say "cmap the PR" to run all three consultations in parallel in the background','Consultations are enabled by default in SPIR — say "without consultation" to skip them',"Commit specs and plans to `main` before spawning — builders branch from HEAD","Always add files explicitly with `git add file1 file2` — never use `git add .` or `git add -A`","Use SPIR for new features, TICK for amendments to existing specs, and BUGFIX for issue fixes","Each SPIR feature produces exactly three documents: spec, plan, and review","Specs define WHAT to build, plans define HOW — keep them as separate documents","Add YAML frontmatter with `approved` and `validated` fields to skip phases in porch","Run `codev doctor` to check that your environment is set up correctly","Use `--merge` (not squash) when merging PRs — individual commits document the development process","The TICK protocol modifies spec and plan in-place and creates a new review file","BUGFIX protocol uses GitHub Issues as source of truth — no spec/plan artifacts needed",'Run `tokei -e "node_modules" -e ".git" -e "dist" .` to measure codebase size',"Use `codev adopt` to set up Codev in an existing project","Click a builder card in the Work view to jump to its terminal tab","The file panel in Work view lets you browse project files without leaving the dashboard","Use the Refresh button to update builder status, PRs, and backlog data","The dashboard shows active builders, pending PRs, and backlog items in one view","Click the file panel toggle arrow to expand or collapse the file browser","The dashboard supports both desktop split-pane and mobile single-pane layouts","Tab indicators show builder status at a glance — active, waiting, or implementing","Use the `+ Shell` button to quickly open a new shell terminal tab","The SPIR protocol has four phases: Specify, Plan, Implement (IDE loop), and Review","Each implementation phase follows the IDE cycle: Implement, Defend (test), Evaluate","The EXPERIMENT protocol is for testing new approaches — use it for proof-of-concept work","The MAINTAIN protocol handles code hygiene and documentation sync","Run 3-way consultations at each SPIR checkpoint for spec, plan, and implementation reviews"];function qR(e){const t=new Date(e.getFullYear(),0,0);return Math.floor((e.getTime()-t.getTime())/864e5)}function p2(e){const t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`tip-dismissed-${t}-${r}-${n}`}function WR(){try{return localStorage.getItem(p2(new Date))==="1"}catch{return!1}}function GR(){try{localStorage.setItem(p2(new Date),"1")}catch{}}function KR(e){return e.split("`").map((r,n)=>n%2===1?G.jsx("code",{children:r},n):G.jsx("span",{children:r},n))}function YR(){const e=qR(new Date)%Aa.length,[t,r]=z.useState(e),[n,o]=z.useState(WR);if(n||Aa.length===0)return null;const h=()=>{r((t-1+Aa.length)%Aa.length)},g=()=>{r((t+1)%Aa.length)},a=()=>{GR(),o(!0)};return G.jsxs("div",{className:"tip-banner",children:[G.jsx("button",{className:"tip-banner-nav",onClick:h,"aria-label":"Previous tip",children:"‹"}),G.jsx("span",{className:"tip-banner-label",children:"Tip:"}),G.jsx("span",{className:"tip-banner-text",children:KR(Aa[t])}),G.jsx("button",{className:"tip-banner-nav",onClick:g,"aria-label":"Next tip",children:"›"}),G.jsx("button",{className:"tip-banner-dismiss",onClick:a,"aria-label":"Dismiss tip",children:"×"})]})}function VR({state:e,onRefresh:t,onSelectTab:r}){var v,u;const{data:n,error:o,refresh:h}=xR(),[g,a]=z.useState(!1),c=z.useCallback(async()=>{try{await zD(),t()}catch(m){console.error("Failed to create shell:",m)}},[t]),f=z.useCallback(m=>{var C;const w=(C=e==null?void 0:e.builders)==null?void 0:C.find(_=>{var d,y,b,S;return m.issueId?((d=_.name)==null?void 0:d.includes(m.issueId))||((y=_.id)==null?void 0:y.includes(m.issueId)):((b=_.id)==null?void 0:b.includes(m.id))||((S=_.name)==null?void 0:S.includes(m.id))});w&&(r==null||r(w.id))},[e==null?void 0:e.builders,r]);return e?G.jsxs("div",{className:`work-view ${g?"file-panel-open":""}`,children:[G.jsxs("div",{className:"work-content",children:[G.jsxs("div",{className:"work-header",children:[G.jsx("h2",{className:"work-title",children:"Work"}),G.jsxs("div",{className:"work-actions",children:[G.jsx("button",{className:"work-btn",onClick:c,children:"+ Shell"}),G.jsx("button",{className:"work-btn work-btn-secondary",onClick:h,children:"Refresh"})]})]}),o&&G.jsxs("div",{className:"work-error",children:["Failed to load overview: ",o]}),G.jsx(YR,{}),G.jsxs("section",{className:"work-section",children:[G.jsx("h3",{className:"work-section-title",children:"Builders"}),n!=null&&n.builders&&n.builders.length>0?G.jsxs("table",{className:"builder-table",children:[G.jsx("thead",{children:G.jsxs("tr",{children:[G.jsx("th",{children:"Issue"}),G.jsx("th",{children:"Title"}),G.jsx("th",{children:"State"}),G.jsx("th",{children:"Progress"}),G.jsx("th",{children:"Elapsed"}),G.jsx("th",{})]})}),G.jsx("tbody",{children:n.builders.map(m=>G.jsx(MR,{builder:m,onOpen:f},m.id))})]}):G.jsx("p",{className:"work-empty",children:"No active builders"})]}),G.jsx(FR,{utils:(e==null?void 0:e.utils)??[],annotations:(e==null?void 0:e.annotations)??[],onSelectTab:m=>r==null?void 0:r(m)}),G.jsxs("section",{className:"work-section",children:[G.jsx("h3",{className:"work-section-title",children:"Needs Attention"}),(v=n==null?void 0:n.errors)!=null&&v.prs?G.jsx("p",{className:"work-unavailable",children:n.errors.prs}):G.jsx(TR,{prs:(n==null?void 0:n.pendingPRs)??[],builders:(n==null?void 0:n.builders)??[]})]}),G.jsxs("section",{className:"work-section",children:[G.jsx("h3",{className:"work-section-title",children:"Backlog"}),(u=n==null?void 0:n.errors)!=null&&u.issues?G.jsx("p",{className:"work-unavailable",children:n.errors.issues}):G.jsx(PR,{items:(n==null?void 0:n.backlog)??[],onRefresh:t})]}),(n==null?void 0:n.recentlyClosed)&&n.recentlyClosed.length>0&&G.jsxs("section",{className:"work-section",children:[G.jsx("h3",{className:"work-section-title",children:"Recently Closed"}),G.jsx(IR,{items:n.recentlyClosed,onRefresh:t})]})]}),G.jsxs("div",{className:`work-file-panel ${g?"expanded":"collapsed"}`,children:[G.jsxs("div",{className:"work-file-panel-header",children:[G.jsx("span",{className:"work-file-panel-toggle",onClick:()=>a(!g),children:g?"▼":"▲"}),G.jsx("span",{className:"work-file-panel-label",onClick:()=>a(!g),children:"Files"}),!g&&G.jsx("input",{className:"work-file-panel-search",type:"text",placeholder:"Search files...",onFocus:()=>a(!0)})]}),g&&G.jsx("div",{className:"work-file-panel-content",children:G.jsx(zR,{onRefresh:t})})]})]}):G.jsx("div",{className:"work-view",children:G.jsx("p",{className:"work-loading",children:"Loading..."})})}function XR({tabs:e,activeTabId:t,onSelectTab:r,onRefresh:n,children:o}){return G.jsxs("div",{className:"mobile-layout",children:[G.jsx(a2,{tabs:e,activeTabId:t,onSelectTab:r,onRefresh:n}),G.jsx("div",{className:"mobile-content",children:o})]})}function ZR({tabId:e,initialLine:t}){let n=`${J5()}api/annotate/${e}/`;return t&&(n+=`?line=${t}`),G.jsx("div",{className:"file-viewer",style:{width:"100%",height:"100%"},children:G.jsx("iframe",{src:n,style:{width:"100%",height:"100%",border:"none"},title:"File Annotator"})})}function QR(e){return e==="24h"?"1":e==="7d"?"7":e==="30d"?"30":"all"}function JR(e){const[t,r]=z.useState(null),[n,o]=z.useState(null),[h,g]=z.useState(!1),[a,c]=z.useState("7d"),f=z.useCallback(async(u,m=!1)=>{g(!0),o(null);try{const w=await BD(QR(u),m);r(w)}catch(w){o(w instanceof Error?w.message:"Failed to fetch analytics")}finally{g(!1)}},[]);z.useEffect(()=>{e&&f(a)},[a,e,f]);const v=z.useCallback(()=>{f(a,!0)},[f,a]);return{data:t,error:n,loading:h,range:a,setRange:c,refresh:v}}function g2(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=g2(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function dt(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=g2(e))&&(n&&(n+=" "),n+=t);return n}var e3=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function m_(e){if(typeof e!="string")return!1;var t=e3;return t.includes(e)}var t3=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],r3=new Set(t3);function _2(e){return typeof e!="string"?!1:r3.has(e)}function m2(e){return typeof e=="string"&&e.startsWith("data-")}function Xn(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(_2(r)||m2(r))&&(t[r]=e[r]);return t}function y_(e){if(e==null)return null;if(z.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Xn(t)}return typeof e=="object"&&!Array.isArray(e)?Xn(e):null}function Jr(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(_2(r)||m2(r)||m_(r))&&(t[r]=e[r]);return t}var i3=["children","width","height","viewBox","className","style","title","desc"];function yg(){return yg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yg.apply(null,arguments)}function n3(e,t){if(e==null)return{};var r,n,o=s3(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(n=0;n<h.length;n++)r=h[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function s3(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var y2=z.forwardRef((e,t)=>{var{children:r,width:n,height:o,viewBox:h,className:g,style:a,title:c,desc:f}=e,v=n3(e,i3),u=h||{width:n,height:o,x:0,y:0},m=dt("recharts-surface",g);return z.createElement("svg",yg({},Jr(v),{className:m,width:n,height:o,style:a,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height),ref:t}),z.createElement("title",null,c),z.createElement("desc",null,f),r)}),a3=["children","className"];function bg(){return bg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bg.apply(null,arguments)}function o3(e,t){if(e==null)return{};var r,n,o=l3(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(n=0;n<h.length;n++)r=h[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function l3(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var nn=z.forwardRef((e,t)=>{var{children:r,className:n}=e,o=o3(e,a3),h=dt("recharts-layer",n);return z.createElement("g",bg({className:h},Jr(o),{ref:t}),r)}),b2=Z5(),c3=z.createContext(null);function lt(e){return function(){return e}}const S2=Math.cos,Tu=Math.sin,gi=Math.sqrt,Du=Math.PI,xh=2*Du,Sg=Math.PI,wg=2*Sg,bs=1e-6,u3=wg-bs;function w2(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function h3(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return w2;const r=10**t;return function(n){this._+=n[0];for(let o=1,h=n.length;o<h;++o)this._+=Math.round(arguments[o]*r)/r+n[o]}}class f3{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?w2:h3(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,o){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+o}`}bezierCurveTo(t,r,n,o,h,g){this._append`C${+t},${+r},${+n},${+o},${this._x1=+h},${this._y1=+g}`}arcTo(t,r,n,o,h){if(t=+t,r=+r,n=+n,o=+o,h=+h,h<0)throw new Error(`negative radius: ${h}`);let g=this._x1,a=this._y1,c=n-t,f=o-r,v=g-t,u=a-r,m=v*v+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(m>bs)if(!(Math.abs(u*c-f*v)>bs)||!h)this._append`L${this._x1=t},${this._y1=r}`;else{let w=n-g,C=o-a,_=c*c+f*f,d=w*w+C*C,y=Math.sqrt(_),b=Math.sqrt(m),S=h*Math.tan((Sg-Math.acos((_+m-d)/(2*y*b)))/2),E=S/b,L=S/y;Math.abs(E-1)>bs&&this._append`L${t+E*v},${r+E*u}`,this._append`A${h},${h},0,0,${+(u*w>v*C)},${this._x1=t+L*c},${this._y1=r+L*f}`}}arc(t,r,n,o,h,g){if(t=+t,r=+r,n=+n,g=!!g,n<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(o),c=n*Math.sin(o),f=t+a,v=r+c,u=1^g,m=g?o-h:h-o;this._x1===null?this._append`M${f},${v}`:(Math.abs(this._x1-f)>bs||Math.abs(this._y1-v)>bs)&&this._append`L${f},${v}`,n&&(m<0&&(m=m%wg+wg),m>u3?this._append`A${n},${n},0,1,${u},${t-a},${r-c}A${n},${n},0,1,${u},${this._x1=f},${this._y1=v}`:m>bs&&this._append`A${n},${n},0,${+(m>=Sg)},${u},${this._x1=t+n*Math.cos(h)},${this._y1=r+n*Math.sin(h)}`)}rect(t,r,n,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+o}h${-n}Z`}toString(){return this._}}function b_(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new f3(t)}function S_(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function C2(e){this._context=e}C2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Eh(e){return new C2(e)}function x2(e){return e[0]}function E2(e){return e[1]}function A2(e,t){var r=lt(!0),n=null,o=Eh,h=null,g=b_(a);e=typeof e=="function"?e:e===void 0?x2:lt(e),t=typeof t=="function"?t:t===void 0?E2:lt(t);function a(c){var f,v=(c=S_(c)).length,u,m=!1,w;for(n==null&&(h=o(w=g())),f=0;f<=v;++f)!(f<v&&r(u=c[f],f,c))===m&&((m=!m)?h.lineStart():h.lineEnd()),m&&h.point(+e(u,f,c),+t(u,f,c));if(w)return h=null,w+""||null}return a.x=function(c){return arguments.length?(e=typeof c=="function"?c:lt(+c),a):e},a.y=function(c){return arguments.length?(t=typeof c=="function"?c:lt(+c),a):t},a.defined=function(c){return arguments.length?(r=typeof c=="function"?c:lt(!!c),a):r},a.curve=function(c){return arguments.length?(o=c,n!=null&&(h=o(n)),a):o},a.context=function(c){return arguments.length?(c==null?n=h=null:h=o(n=c),a):n},a}function nu(e,t,r){var n=null,o=lt(!0),h=null,g=Eh,a=null,c=b_(f);e=typeof e=="function"?e:e===void 0?x2:lt(+e),t=typeof t=="function"?t:lt(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?E2:lt(+r);function f(u){var m,w,C,_=(u=S_(u)).length,d,y=!1,b,S=new Array(_),E=new Array(_);for(h==null&&(a=g(b=c())),m=0;m<=_;++m){if(!(m<_&&o(d=u[m],m,u))===y)if(y=!y)w=m,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),C=m-1;C>=w;--C)a.point(S[C],E[C]);a.lineEnd(),a.areaEnd()}y&&(S[m]=+e(d,m,u),E[m]=+t(d,m,u),a.point(n?+n(d,m,u):S[m],r?+r(d,m,u):E[m]))}if(b)return a=null,b+""||null}function v(){return A2().defined(o).curve(g).context(h)}return f.x=function(u){return arguments.length?(e=typeof u=="function"?u:lt(+u),n=null,f):e},f.x0=function(u){return arguments.length?(e=typeof u=="function"?u:lt(+u),f):e},f.x1=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:lt(+u),f):n},f.y=function(u){return arguments.length?(t=typeof u=="function"?u:lt(+u),r=null,f):t},f.y0=function(u){return arguments.length?(t=typeof u=="function"?u:lt(+u),f):t},f.y1=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:lt(+u),f):r},f.lineX0=f.lineY0=function(){return v().x(e).y(t)},f.lineY1=function(){return v().x(e).y(r)},f.lineX1=function(){return v().x(n).y(t)},f.defined=function(u){return arguments.length?(o=typeof u=="function"?u:lt(!!u),f):o},f.curve=function(u){return arguments.length?(g=u,h!=null&&(a=g(h)),f):g},f.context=function(u){return arguments.length?(u==null?h=a=null:a=g(h=u),f):h},f}class M2{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function d3(e){return new M2(e,!0)}function v3(e){return new M2(e,!1)}const w_={draw(e,t){const r=gi(t/Du);e.moveTo(r,0),e.arc(0,0,r,0,xh)}},p3={draw(e,t){const r=gi(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},L2=gi(1/3),g3=L2*2,_3={draw(e,t){const r=gi(t/g3),n=r*L2;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},m3={draw(e,t){const r=gi(t),n=-r/2;e.rect(n,n,r,r)}},y3=.8908130915292852,O2=Tu(Du/10)/Tu(7*Du/10),b3=Tu(xh/10)*O2,S3=-S2(xh/10)*O2,w3={draw(e,t){const r=gi(t*y3),n=b3*r,o=S3*r;e.moveTo(0,-r),e.lineTo(n,o);for(let h=1;h<5;++h){const g=xh*h/5,a=S2(g),c=Tu(g);e.lineTo(c*r,-a*r),e.lineTo(a*n-c*o,c*n+a*o)}e.closePath()}},zv=gi(3),C3={draw(e,t){const r=-gi(t/(zv*3));e.moveTo(0,r*2),e.lineTo(-zv*r,-r),e.lineTo(zv*r,-r),e.closePath()}},Vr=-.5,Xr=gi(3)/2,Cg=1/gi(12),x3=(Cg/2+1)*3,E3={draw(e,t){const r=gi(t/x3),n=r/2,o=r*Cg,h=n,g=r*Cg+r,a=-h,c=g;e.moveTo(n,o),e.lineTo(h,g),e.lineTo(a,c),e.lineTo(Vr*n-Xr*o,Xr*n+Vr*o),e.lineTo(Vr*h-Xr*g,Xr*h+Vr*g),e.lineTo(Vr*a-Xr*c,Xr*a+Vr*c),e.lineTo(Vr*n+Xr*o,Vr*o-Xr*n),e.lineTo(Vr*h+Xr*g,Vr*g-Xr*h),e.lineTo(Vr*a+Xr*c,Vr*c-Xr*a),e.closePath()}};function A3(e,t){let r=null,n=b_(o);e=typeof e=="function"?e:lt(e||w_),t=typeof t=="function"?t:lt(t===void 0?64:+t);function o(){let h;if(r||(r=h=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),h)return r=null,h+""||null}return o.type=function(h){return arguments.length?(e=typeof h=="function"?h:lt(h),o):e},o.size=function(h){return arguments.length?(t=typeof h=="function"?h:lt(+h),o):t},o.context=function(h){return arguments.length?(r=h??null,o):r},o}function Ru(){}function ku(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function T2(e){this._context=e}T2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ku(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ku(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function M3(e){return new T2(e)}function D2(e){this._context=e}D2.prototype={areaStart:Ru,areaEnd:Ru,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:ku(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function L3(e){return new D2(e)}function R2(e){this._context=e}R2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:ku(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function O3(e){return new R2(e)}function k2(e){this._context=e}k2.prototype={areaStart:Ru,areaEnd:Ru,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function T3(e){return new k2(e)}function oS(e){return e<0?-1:1}function lS(e,t,r){var n=e._x1-e._x0,o=t-e._x1,h=(e._y1-e._y0)/(n||o<0&&-0),g=(r-e._y1)/(o||n<0&&-0),a=(h*o+g*n)/(n+o);return(oS(h)+oS(g))*Math.min(Math.abs(h),Math.abs(g),.5*Math.abs(a))||0}function cS(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Hv(e,t,r){var n=e._x0,o=e._y0,h=e._x1,g=e._y1,a=(h-n)/3;e._context.bezierCurveTo(n+a,o+a*t,h-a,g-a*r,h,g)}function Pu(e){this._context=e}Pu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Hv(this,this._t0,cS(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Hv(this,cS(this,r=lS(this,e,t)),r);break;default:Hv(this,this._t0,r=lS(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function P2(e){this._context=new B2(e)}(P2.prototype=Object.create(Pu.prototype)).point=function(e,t){Pu.prototype.point.call(this,t,e)};function B2(e){this._context=e}B2.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,o,h){this._context.bezierCurveTo(t,e,n,r,h,o)}};function D3(e){return new Pu(e)}function R3(e){return new P2(e)}function j2(e){this._context=e}j2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=uS(e),o=uS(t),h=0,g=1;g<r;++h,++g)this._context.bezierCurveTo(n[0][h],o[0][h],n[1][h],o[1][h],e[g],t[g]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function uS(e){var t,r=e.length-1,n,o=new Array(r),h=new Array(r),g=new Array(r);for(o[0]=0,h[0]=2,g[0]=e[0]+2*e[1],t=1;t<r-1;++t)o[t]=1,h[t]=4,g[t]=4*e[t]+2*e[t+1];for(o[r-1]=2,h[r-1]=7,g[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=o[t]/h[t-1],h[t]-=n,g[t]-=n*g[t-1];for(o[r-1]=g[r-1]/h[r-1],t=r-2;t>=0;--t)o[t]=(g[t]-o[t+1])/h[t];for(h[r-1]=(e[r]+o[r-1])/2,t=0;t<r-1;++t)h[t]=2*e[t+1]-o[t+1];return[o,h]}function k3(e){return new j2(e)}function Ah(e,t){this._context=e,this._t=t}Ah.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function P3(e){return new Ah(e,.5)}function B3(e){return new Ah(e,0)}function j3(e){return new Ah(e,1)}function Ds(e,t){if((g=e.length)>1)for(var r=1,n,o,h=e[t[0]],g,a=h.length;r<g;++r)for(o=h,h=e[t[r]],n=0;n<a;++n)h[n][1]+=h[n][0]=isNaN(o[n][1])?o[n][0]:o[n][1]}function xg(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function I3(e,t){return e[t]}function N3(e){const t=[];return t.key=e,t}function z3(){var e=lt([]),t=xg,r=Ds,n=I3;function o(h){var g=Array.from(e.apply(this,arguments),N3),a,c=g.length,f=-1,v;for(const u of h)for(a=0,++f;a<c;++a)(g[a][f]=[0,+n(u,g[a].key,f,h)]).data=u;for(a=0,v=S_(t(g));a<c;++a)g[v[a]].index=a;return r(g,v),g}return o.keys=function(h){return arguments.length?(e=typeof h=="function"?h:lt(Array.from(h)),o):e},o.value=function(h){return arguments.length?(n=typeof h=="function"?h:lt(+h),o):n},o.order=function(h){return arguments.length?(t=h==null?xg:typeof h=="function"?h:lt(Array.from(h)),o):t},o.offset=function(h){return arguments.length?(r=h??Ds,o):r},o}function H3(e,t){if((n=e.length)>0){for(var r,n,o=0,h=e[0].length,g;o<h;++o){for(g=r=0;r<n;++r)g+=e[r][o][1]||0;if(g)for(r=0;r<n;++r)e[r][o][1]/=g}Ds(e,t)}}function $3(e,t){if((o=e.length)>0){for(var r=0,n=e[t[0]],o,h=n.length;r<h;++r){for(var g=0,a=0;g<o;++g)a+=e[g][r][1]||0;n[r][1]+=n[r][0]=-a/2}Ds(e,t)}}function U3(e,t){if(!(!((g=e.length)>0)||!((h=(o=e[t[0]]).length)>0))){for(var r=0,n=1,o,h,g;n<h;++n){for(var a=0,c=0,f=0;a<g;++a){for(var v=e[t[a]],u=v[n][1]||0,m=v[n-1][1]||0,w=(u-m)/2,C=0;C<a;++C){var _=e[t[C]],d=_[n][1]||0,y=_[n-1][1]||0;w+=d-y}c+=u,f+=w*u}o[n-1][1]+=o[n-1][0]=r,c&&(r-=f/c)}o[n-1][1]+=o[n-1][0]=r,Ds(e,t)}}var $v={},Uv={},hS;function F3(){return hS||(hS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(Uv)),Uv}var Fv={},fS;function I2(){return fS||(fS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}e.isDeepKey=t})(Fv)),Fv}var qv={},dS;function C_(){return dS||(dS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){var n;return typeof r=="string"||typeof r=="symbol"?r:Object.is((n=r==null?void 0:r.valueOf)==null?void 0:n.call(r),-0)?"-0":String(r)}e.toKey=t})(qv)),qv}var Wv={},Gv={},vS;function q3(){return vS||(vS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(r==null)return"";if(typeof r=="string")return r;if(Array.isArray(r))return r.map(t).join(",");const n=String(r);return n==="0"&&Object.is(Number(r),-0)?"-0":n}e.toString=t})(Gv)),Gv}var pS;function x_(){return pS||(pS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=q3(),r=C_();function n(o){if(Array.isArray(o))return o.map(r.toKey);if(typeof o=="symbol")return[o];o=t.toString(o);const h=[],g=o.length;if(g===0)return h;let a=0,c="",f="",v=!1;for(o.charCodeAt(0)===46&&(h.push(""),a++);a<g;){const u=o[a];f?u==="\\"&&a+1<g?(a++,c+=o[a]):u===f?f="":c+=u:v?u==='"'||u==="'"?f=u:u==="]"?(v=!1,h.push(c),c=""):c+=u:u==="["?(v=!0,c&&(h.push(c),c="")):u==="."?c&&(h.push(c),c=""):c+=u,a++}return c&&h.push(c),h}e.toPath=n})(Wv)),Wv}var gS;function E_(){return gS||(gS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=F3(),r=I2(),n=C_(),o=x_();function h(a,c,f){if(a==null)return f;switch(typeof c){case"string":{if(t.isUnsafeProperty(c))return f;const v=a[c];return v===void 0?r.isDeepKey(c)?h(a,o.toPath(c),f):f:v}case"number":case"symbol":{typeof c=="number"&&(c=n.toKey(c));const v=a[c];return v===void 0?f:v}default:{if(Array.isArray(c))return g(a,c,f);if(Object.is(c==null?void 0:c.valueOf(),-0)?c="-0":c=String(c),t.isUnsafeProperty(c))return f;const v=a[c];return v===void 0?f:v}}}function g(a,c,f){if(c.length===0)return f;let v=a;for(let u=0;u<c.length;u++){if(v==null||t.isUnsafeProperty(c[u]))return f;v=v[c[u]]}return v===void 0?f:v}e.get=h})($v)),$v}var Kv,_S;function W3(){return _S||(_S=1,Kv=E_().get),Kv}var G3=W3();const ja=fn(G3);var K3=4;function Kn(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K3,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function wt(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.reduce((o,h,g)=>{var a=r[g-1];return typeof a=="string"?o+a+h:a!==void 0?o+Kn(a)+h:o+h},"")}var Rr=e=>e===0?0:e>0?1:-1,Ti=e=>typeof e=="number"&&e!=+e,Rs=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,Oe=e=>(typeof e=="number"||e instanceof Number)&&!Ti(e),Di=e=>Oe(e)||typeof e=="string",Y3=0,dl=e=>{var t=++Y3;return"".concat(e||"").concat(t)},vi=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Oe(t)&&typeof t!="string")return n;var h;if(Rs(t)){if(r==null)return n;var g=t.indexOf("%");h=r*parseFloat(t.slice(0,g))/100}else h=+t;return Ti(h)&&(h=n),o&&r!=null&&h>r&&(h=r),h},N2=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[String(e[n])])r[String(e[n])]=!0;else return!0;return!1};function ir(e,t,r){return Oe(e)&&Oe(t)?Kn(e+r*(t-e)):t}function V3(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):ja(n,t))===r)}var qt=e=>e===null||typeof e>"u",Ll=e=>qt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Ai(e){return e!=null}function Ga(){}var X3=["type","size","sizeType"];function Eg(){return Eg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Eg.apply(null,arguments)}function mS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function yS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mS(Object(r),!0).forEach(function(n){Z3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Z3(e,t,r){return(t=Q3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Q3(e){var t=J3(e,"string");return typeof t=="symbol"?t:t+""}function J3(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ek(e,t){if(e==null)return{};var r,n,o=tk(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(n=0;n<h.length;n++)r=h[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function tk(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var z2={symbolCircle:w_,symbolCross:p3,symbolDiamond:_3,symbolSquare:m3,symbolStar:w3,symbolTriangle:C3,symbolWye:E3},rk=Math.PI/180,ik=e=>{var t="symbol".concat(Ll(e));return z2[t]||w_},nk=(e,t,r)=>{if(t==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var n=18*rk;return 1.25*e*e*(Math.tan(n)-Math.tan(n*2)*Math.tan(n)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},sk=(e,t)=>{z2["symbol".concat(Ll(e))]=t},H2=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,o=ek(e,X3),h=yS(yS({},o),{},{type:t,size:r,sizeType:n}),g="circle";typeof t=="string"&&(g=t);var a=()=>{var m=ik(g),w=A3().type(m).size(nk(r,n,g)),C=w();if(C!==null)return C},{className:c,cx:f,cy:v}=h,u=Jr(h);return Oe(f)&&Oe(v)&&Oe(r)?z.createElement("path",Eg({},u,{className:dt("recharts-symbols",c),transform:"translate(".concat(f,", ").concat(v,")"),d:a()})):null};H2.registerSymbol=sk;var $2=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,ak=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(z.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(o=>{m_(o)&&(n[o]=(h=>r[o](r,h)))}),n},ok=(e,t,r)=>n=>(e(t,r,n),null),A_=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(o=>{var h=e[o];m_(o)&&typeof h=="function"&&(n||(n={}),n[o]=ok(h,t,r))}),n};function bS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function lk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bS(Object(r),!0).forEach(function(n){ck(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ck(e,t,r){return(t=uk(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uk(e){var t=hk(e,"string");return typeof t=="symbol"?t:t+""}function hk(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ii(e,t){var r=lk({},e),n=t,o=Object.keys(t),h=o.reduce((g,a)=>(g[a]===void 0&&n[a]!==void 0&&(g[a]=n[a]),g),r);return h}var Yv={},Vv={},SS;function fk(){return SS||(SS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){const o=new Map;for(let h=0;h<r.length;h++){const g=r[h],a=n(g,h,r);o.has(a)||o.set(a,g)}return Array.from(o.values())}e.uniqBy=t})(Vv)),Vv}var Xv={},wS;function dk(){return wS||(wS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return function(...o){return r.apply(this,o.slice(0,n))}}e.ary=t})(Xv)),Xv}var Zv={},CS;function U2(){return CS||(CS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(Zv)),Zv}var Qv={},Jv={},ep={},xS;function vk(){return xS||(xS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(ep)),ep}var ES;function M_(){return ES||(ES=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=vk();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(Jv)),Jv}var tp={},AS;function pk(){return AS||(AS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(tp)),tp}var MS;function gk(){return MS||(MS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=M_(),r=pk();function n(o){return r.isObjectLike(o)&&t.isArrayLike(o)}e.isArrayLikeObject=n})(Qv)),Qv}var rp={},ip={},LS;function _k(){return LS||(LS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=E_();function r(n){return function(o){return t.get(o,n)}}e.property=r})(ip)),ip}var np={},sp={},ap={},op={},OS;function F2(){return OS||(OS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r!==null&&(typeof r=="object"||typeof r=="function")}e.isObject=t})(op)),op}var lp={},TS;function q2(){return TS||(TS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null||typeof r!="object"&&typeof r!="function"}e.isPrimitive=t})(lp)),lp}var cp={},DS;function W2(){return DS||(DS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return r===n||Number.isNaN(r)&&Number.isNaN(n)}e.isEqualsSameValueZero=t})(cp)),cp}var RS;function mk(){return RS||(RS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=F2(),r=q2(),n=W2();function o(v,u,m){return typeof m!="function"?o(v,u,()=>{}):h(v,u,function w(C,_,d,y,b,S){const E=m(C,_,d,y,b,S);return E!==void 0?!!E:h(C,_,w,S)},new Map)}function h(v,u,m,w){if(u===v)return!0;switch(typeof u){case"object":return g(v,u,m,w);case"function":return Object.keys(u).length>0?h(v,{...u},m,w):n.isEqualsSameValueZero(v,u);default:return t.isObject(v)?typeof u=="string"?u==="":!0:n.isEqualsSameValueZero(v,u)}}function g(v,u,m,w){if(u==null)return!0;if(Array.isArray(u))return c(v,u,m,w);if(u instanceof Map)return a(v,u,m,w);if(u instanceof Set)return f(v,u,m,w);const C=Object.keys(u);if(v==null||r.isPrimitive(v))return C.length===0;if(C.length===0)return!0;if(w!=null&&w.has(u))return w.get(u)===v;w==null||w.set(u,v);try{for(let _=0;_<C.length;_++){const d=C[_];if(!r.isPrimitive(v)&&!(d in v)||u[d]===void 0&&v[d]!==void 0||u[d]===null&&v[d]!==null||!m(v[d],u[d],d,v,u,w))return!1}return!0}finally{w==null||w.delete(u)}}function a(v,u,m,w){if(u.size===0)return!0;if(!(v instanceof Map))return!1;for(const[C,_]of u.entries()){const d=v.get(C);if(m(d,_,C,v,u,w)===!1)return!1}return!0}function c(v,u,m,w){if(u.length===0)return!0;if(!Array.isArray(v))return!1;const C=new Set;for(let _=0;_<u.length;_++){const d=u[_];let y=!1;for(let b=0;b<v.length;b++){if(C.has(b))continue;const S=v[b];let E=!1;if(m(S,d,_,v,u,w)&&(E=!0),E){C.add(b),y=!0;break}}if(!y)return!1}return!0}function f(v,u,m,w){return u.size===0?!0:v instanceof Set?c([...v],[...u],m,w):!1}e.isMatchWith=o,e.isSetMatch=f})(ap)),ap}var kS;function G2(){return kS||(kS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=mk();function r(n,o){return t.isMatchWith(n,o,()=>{})}e.isMatch=r})(sp)),sp}var up={},hp={},fp={},PS;function yk(){return PS||(PS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}e.getSymbols=t})(fp)),fp}var dp={},BS;function L_(){return BS||(BS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}e.getTag=t})(dp)),dp}var vp={},jS;function K2(){return jS||(jS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",r="[object String]",n="[object Number]",o="[object Boolean]",h="[object Arguments]",g="[object Symbol]",a="[object Date]",c="[object Map]",f="[object Set]",v="[object Array]",u="[object Function]",m="[object ArrayBuffer]",w="[object Object]",C="[object Error]",_="[object DataView]",d="[object Uint8Array]",y="[object Uint8ClampedArray]",b="[object Uint16Array]",S="[object Uint32Array]",E="[object BigUint64Array]",L="[object Int8Array]",x="[object Int16Array]",O="[object Int32Array]",M="[object BigInt64Array]",D="[object Float32Array]",k="[object Float64Array]";e.argumentsTag=h,e.arrayBufferTag=m,e.arrayTag=v,e.bigInt64ArrayTag=M,e.bigUint64ArrayTag=E,e.booleanTag=o,e.dataViewTag=_,e.dateTag=a,e.errorTag=C,e.float32ArrayTag=D,e.float64ArrayTag=k,e.functionTag=u,e.int16ArrayTag=x,e.int32ArrayTag=O,e.int8ArrayTag=L,e.mapTag=c,e.numberTag=n,e.objectTag=w,e.regexpTag=t,e.setTag=f,e.stringTag=r,e.symbolTag=g,e.uint16ArrayTag=b,e.uint32ArrayTag=S,e.uint8ArrayTag=d,e.uint8ClampedArrayTag=y})(vp)),vp}var pp={},IS;function bk(){return IS||(IS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(pp)),pp}var NS;function Y2(){return NS||(NS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=yk(),r=L_(),n=K2(),o=q2(),h=bk();function g(v,u){return a(v,void 0,v,new Map,u)}function a(v,u,m,w=new Map,C=void 0){const _=C==null?void 0:C(v,u,m,w);if(_!==void 0)return _;if(o.isPrimitive(v))return v;if(w.has(v))return w.get(v);if(Array.isArray(v)){const d=new Array(v.length);w.set(v,d);for(let y=0;y<v.length;y++)d[y]=a(v[y],y,m,w,C);return Object.hasOwn(v,"index")&&(d.index=v.index),Object.hasOwn(v,"input")&&(d.input=v.input),d}if(v instanceof Date)return new Date(v.getTime());if(v instanceof RegExp){const d=new RegExp(v.source,v.flags);return d.lastIndex=v.lastIndex,d}if(v instanceof Map){const d=new Map;w.set(v,d);for(const[y,b]of v)d.set(y,a(b,y,m,w,C));return d}if(v instanceof Set){const d=new Set;w.set(v,d);for(const y of v)d.add(a(y,void 0,m,w,C));return d}if(typeof Buffer<"u"&&Buffer.isBuffer(v))return v.subarray();if(h.isTypedArray(v)){const d=new(Object.getPrototypeOf(v)).constructor(v.length);w.set(v,d);for(let y=0;y<v.length;y++)d[y]=a(v[y],y,m,w,C);return d}if(v instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&v instanceof SharedArrayBuffer)return v.slice(0);if(v instanceof DataView){const d=new DataView(v.buffer.slice(0),v.byteOffset,v.byteLength);return w.set(v,d),c(d,v,m,w,C),d}if(typeof File<"u"&&v instanceof File){const d=new File([v],v.name,{type:v.type});return w.set(v,d),c(d,v,m,w,C),d}if(typeof Blob<"u"&&v instanceof Blob){const d=new Blob([v],{type:v.type});return w.set(v,d),c(d,v,m,w,C),d}if(v instanceof Error){const d=new v.constructor;return w.set(v,d),d.message=v.message,d.name=v.name,d.stack=v.stack,d.cause=v.cause,c(d,v,m,w,C),d}if(v instanceof Boolean){const d=new Boolean(v.valueOf());return w.set(v,d),c(d,v,m,w,C),d}if(v instanceof Number){const d=new Number(v.valueOf());return w.set(v,d),c(d,v,m,w,C),d}if(v instanceof String){const d=new String(v.valueOf());return w.set(v,d),c(d,v,m,w,C),d}if(typeof v=="object"&&f(v)){const d=Object.create(Object.getPrototypeOf(v));return w.set(v,d),c(d,v,m,w,C),d}return v}function c(v,u,m=v,w,C){const _=[...Object.keys(u),...t.getSymbols(u)];for(let d=0;d<_.length;d++){const y=_[d],b=Object.getOwnPropertyDescriptor(v,y);(b==null||b.writable)&&(v[y]=a(u[y],y,m,w,C))}}function f(v){switch(r.getTag(v)){case n.argumentsTag:case n.arrayTag:case n.arrayBufferTag:case n.dataViewTag:case n.booleanTag:case n.dateTag:case n.float32ArrayTag:case n.float64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.mapTag:case n.numberTag:case n.objectTag:case n.regexpTag:case n.setTag:case n.stringTag:case n.symbolTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=g,e.cloneDeepWithImpl=a,e.copyProperties=c})(hp)),hp}var zS;function Sk(){return zS||(zS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Y2();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(up)),up}var HS;function wk(){return HS||(HS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=G2(),r=Sk();function n(o){return o=r.cloneDeep(o),h=>t.isMatch(h,o)}e.matches=n})(np)),np}var gp={},_p={},mp={},$S;function Ck(){return $S||($S=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Y2(),r=L_(),n=K2();function o(h,g){return t.cloneDeepWith(h,(a,c,f,v)=>{const u=g==null?void 0:g(a,c,f,v);if(u!==void 0)return u;if(typeof h=="object"){if(r.getTag(h)===n.objectTag&&typeof h.constructor!="function"){const m={};return v.set(h,m),t.copyProperties(m,h,f,v),m}switch(Object.prototype.toString.call(h)){case n.numberTag:case n.stringTag:case n.booleanTag:{const m=new h.constructor(h==null?void 0:h.valueOf());return t.copyProperties(m,h),m}case n.argumentsTag:{const m={};return t.copyProperties(m,h),m.length=h.length,m[Symbol.iterator]=h[Symbol.iterator],m}default:return}}})}e.cloneDeepWith=o})(mp)),mp}var US;function xk(){return US||(US=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ck();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(_p)),_p}var yp={},bp={},FS;function V2(){return FS||(FS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function r(n,o=Number.MAX_SAFE_INTEGER){switch(typeof n){case"number":return Number.isInteger(n)&&n>=0&&n<o;case"symbol":return!1;case"string":return t.test(n)}}e.isIndex=r})(bp)),bp}var Sp={},qS;function Ek(){return qS||(qS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=L_();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(Sp)),Sp}var WS;function Ak(){return WS||(WS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=I2(),r=V2(),n=Ek(),o=x_();function h(g,a){let c;if(Array.isArray(a)?c=a:typeof a=="string"&&t.isDeepKey(a)&&(g==null?void 0:g[a])==null?c=o.toPath(a):c=[a],c.length===0)return!1;let f=g;for(let v=0;v<c.length;v++){const u=c[v];if((f==null||!Object.hasOwn(f,u))&&!((Array.isArray(f)||n.isArguments(f))&&r.isIndex(u)&&u<f.length))return!1;f=f[u]}return!0}e.has=h})(yp)),yp}var GS;function Mk(){return GS||(GS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=G2(),r=C_(),n=xk(),o=E_(),h=Ak();function g(a,c){switch(typeof a){case"object":{Object.is(a==null?void 0:a.valueOf(),-0)&&(a="-0");break}case"number":{a=r.toKey(a);break}}return c=n.cloneDeep(c),function(f){const v=o.get(f,a);return v===void 0?h.has(f,a):c===void 0?v===void 0:t.isMatch(v,c)}}e.matchesProperty=g})(gp)),gp}var KS;function Lk(){return KS||(KS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=U2(),r=_k(),n=wk(),o=Mk();function h(g){if(g==null)return t.identity;switch(typeof g){case"function":return g;case"object":return Array.isArray(g)&&g.length===2?o.matchesProperty(g[0],g[1]):n.matches(g);case"string":case"symbol":case"number":return r.property(g)}}e.iteratee=h})(rp)),rp}var YS;function Ok(){return YS||(YS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=fk(),r=dk(),n=U2(),o=gk(),h=Lk();function g(a,c=n.identity){return o.isArrayLikeObject(a)?t.uniqBy(Array.from(a),r.ary(h.iteratee(c),1)):[]}e.uniqBy=g})(Yv)),Yv}var wp,VS;function Tk(){return VS||(VS=1,wp=Ok().uniqBy),wp}var Dk=Tk();const XS=fn(Dk);function Rk(e,t,r){return t===!0?XS(e,r):typeof t=="function"?XS(e,t):e}var Cp={exports:{}},xp={},Ep={exports:{}},Ap={};/**
|
|
131
|
-
* @license React
|
|
132
|
-
* use-sync-external-store-shim.production.js
|
|
133
|
-
*
|
|
134
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
135
|
-
*
|
|
136
|
-
* This source code is licensed under the MIT license found in the
|
|
137
|
-
* LICENSE file in the root directory of this source tree.
|
|
138
|
-
*/var ZS;function kk(){if(ZS)return Ap;ZS=1;var e=Wa();function t(u,m){return u===m&&(u!==0||1/u===1/m)||u!==u&&m!==m}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,o=e.useEffect,h=e.useLayoutEffect,g=e.useDebugValue;function a(u,m){var w=m(),C=n({inst:{value:w,getSnapshot:m}}),_=C[0].inst,d=C[1];return h(function(){_.value=w,_.getSnapshot=m,c(_)&&d({inst:_})},[u,w,m]),o(function(){return c(_)&&d({inst:_}),u(function(){c(_)&&d({inst:_})})},[u]),g(w),w}function c(u){var m=u.getSnapshot;u=u.value;try{var w=m();return!r(u,w)}catch{return!0}}function f(u,m){return m()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:a;return Ap.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v,Ap}var QS;function Pk(){return QS||(QS=1,Ep.exports=kk()),Ep.exports}/**
|
|
139
|
-
* @license React
|
|
140
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
141
|
-
*
|
|
142
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
143
|
-
*
|
|
144
|
-
* This source code is licensed under the MIT license found in the
|
|
145
|
-
* LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/var JS;function Bk(){if(JS)return xp;JS=1;var e=Wa(),t=Pk();function r(f,v){return f===v&&(f!==0||1/f===1/v)||f!==f&&v!==v}var n=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,h=e.useRef,g=e.useEffect,a=e.useMemo,c=e.useDebugValue;return xp.useSyncExternalStoreWithSelector=function(f,v,u,m,w){var C=h(null);if(C.current===null){var _={hasValue:!1,value:null};C.current=_}else _=C.current;C=a(function(){function y(x){if(!b){if(b=!0,S=x,x=m(x),w!==void 0&&_.hasValue){var O=_.value;if(w(O,x))return E=O}return E=x}if(O=E,n(S,x))return O;var M=m(x);return w!==void 0&&w(O,M)?(S=x,O):(S=x,E=M)}var b=!1,S,E,L=u===void 0?null:u;return[function(){return y(v())},L===null?void 0:function(){return y(L())}]},[v,u,m,w]);var d=o(f,C[0],C[1]);return g(function(){_.hasValue=!0,_.value=d},[d]),c(d),d},xp}var ew;function jk(){return ew||(ew=1,Cp.exports=Bk()),Cp.exports}var Ik=jk(),O_=z.createContext(null),Nk=e=>e,Et=()=>{var e=z.useContext(O_);return e?e.store.dispatch:Nk},wu=()=>{},zk=()=>wu,Hk=(e,t)=>e===t;function Re(e){var t=z.useContext(O_),r=z.useMemo(()=>t?n=>{if(n!=null)return e(n)}:wu,[t,e]);return Ik.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:zk,t?t.store.getState:wu,t?t.store.getState:wu,r,Hk)}function $k(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Uk(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Fk(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var tw=e=>Array.isArray(e)?e:[e];function qk(e){const t=Array.isArray(e[0])?e[0]:e;return Fk(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Wk(e,t){const r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var Gk=class{constructor(e){this.value=e}deref(){return this.value}},Kk=typeof WeakRef<"u"?WeakRef:Gk,Yk=0,rw=1;function su(){return{s:Yk,v:void 0,o:null,p:null}}function X2(e,t={}){let r=su();const{resultEqualityCheck:n}=t;let o,h=0;function g(){var u;let a=r;const{length:c}=arguments;for(let m=0,w=c;m<w;m++){const C=arguments[m];if(typeof C=="function"||typeof C=="object"&&C!==null){let _=a.o;_===null&&(a.o=_=new WeakMap);const d=_.get(C);d===void 0?(a=su(),_.set(C,a)):a=d}else{let _=a.p;_===null&&(a.p=_=new Map);const d=_.get(C);d===void 0?(a=su(),_.set(C,a)):a=d}}const f=a;let v;if(a.s===rw)v=a.v;else if(v=e.apply(null,arguments),h++,n){const m=((u=o==null?void 0:o.deref)==null?void 0:u.call(o))??o;m!=null&&n(m,v)&&(v=m,h!==0&&h--),o=typeof v=="object"&&v!==null||typeof v=="function"?new Kk(v):v}return f.s=rw,f.v=v,v}return g.clearCache=()=>{r=su(),g.resetResultsCount()},g.resultsCount=()=>h,g.resetResultsCount=()=>{h=0},g}function Vk(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let h=0,g=0,a,c={},f=o.pop();typeof f=="object"&&(c=f,f=o.pop()),$k(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const v={...r,...c},{memoize:u,memoizeOptions:m=[],argsMemoize:w=X2,argsMemoizeOptions:C=[]}=v,_=tw(m),d=tw(C),y=qk(o),b=u(function(){return h++,f.apply(null,arguments)},..._),S=w(function(){g++;const L=Wk(y,arguments);return a=b.apply(null,L),a},...d);return Object.assign(S,{resultFunc:f,memoizedResultFunc:b,dependencies:y,dependencyRecomputations:()=>g,resetDependencyRecomputations:()=>{g=0},lastResult:()=>a,recomputations:()=>h,resetRecomputations:()=>{h=0},memoize:u,argsMemoize:w})};return Object.assign(n,{withTypes:()=>n}),n}var le=Vk(X2),Xk=Object.assign((e,t=le)=>{Uk(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),n=r.map(h=>e[h]);return t(n,(...h)=>h.reduce((g,a,c)=>(g[r[c]]=a,g),{}))},{withTypes:()=>Xk}),Mp={},Lp={},Op={},iw;function Zk(){return iw||(iw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"?1:n===null?2:n===void 0?3:n!==n?4:0}const r=(n,o,h)=>{if(n!==o){const g=t(n),a=t(o);if(g===a&&g===0){if(n<o)return h==="desc"?1:-1;if(n>o)return h==="desc"?-1:1}return h==="desc"?a-g:g-a}return 0};e.compareValues=r})(Op)),Op}var Tp={},Dp={},nw;function Z2(){return nw||(nw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(Dp)),Dp}var sw;function Qk(){return sw||(sw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Z2(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function o(h,g){return Array.isArray(h)?!1:typeof h=="number"||typeof h=="boolean"||h==null||t.isSymbol(h)?!0:typeof h=="string"&&(n.test(h)||!r.test(h))||g!=null&&Object.hasOwn(g,h)}e.isKey=o})(Tp)),Tp}var aw;function Jk(){return aw||(aw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Zk(),r=Qk(),n=x_();function o(h,g,a,c){if(h==null)return[];a=c?void 0:a,Array.isArray(h)||(h=Object.values(h)),Array.isArray(g)||(g=g==null?[null]:[g]),g.length===0&&(g=[null]),Array.isArray(a)||(a=a==null?[]:[a]),a=a.map(w=>String(w));const f=(w,C)=>{let _=w;for(let d=0;d<C.length&&_!=null;++d)_=_[C[d]];return _},v=(w,C)=>C==null||w==null?C:typeof w=="object"&&"key"in w?Object.hasOwn(C,w.key)?C[w.key]:f(C,w.path):typeof w=="function"?w(C):Array.isArray(w)?f(C,w):typeof C=="object"?C[w]:C,u=g.map(w=>(Array.isArray(w)&&w.length===1&&(w=w[0]),w==null||typeof w=="function"||Array.isArray(w)||r.isKey(w)?w:{key:w,path:n.toPath(w)}));return h.map(w=>({original:w,criteria:u.map(C=>v(C,w))})).slice().sort((w,C)=>{for(let _=0;_<u.length;_++){const d=t.compareValues(w.criteria[_],C.criteria[_],a[_]);if(d!==0)return d}return 0}).map(w=>w.original)}e.orderBy=o})(Lp)),Lp}var Rp={},ow;function e4(){return ow||(ow=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n=1){const o=[],h=Math.floor(n),g=(a,c)=>{for(let f=0;f<a.length;f++){const v=a[f];Array.isArray(v)&&c<h?g(v,c+1):o.push(v)}};return g(r,0),o}e.flatten=t})(Rp)),Rp}var kp={},lw;function Q2(){return lw||(lw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=V2(),r=M_(),n=F2(),o=W2();function h(g,a,c){return n.isObject(c)&&(typeof a=="number"&&r.isArrayLike(c)&&t.isIndex(a)&&a<c.length||typeof a=="string"&&a in c)?o.isEqualsSameValueZero(c[a],g):!1}e.isIterateeCall=h})(kp)),kp}var cw;function t4(){return cw||(cw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Jk(),r=e4(),n=Q2();function o(h,...g){const a=g.length;return a>1&&n.isIterateeCall(h,g[0],g[1])?g=[]:a>2&&n.isIterateeCall(g[0],g[1],g[2])&&(g=[g[0]]),t.orderBy(h,r.flatten(g),["asc"])}e.sortBy=o})(Mp)),Mp}var Pp,uw;function r4(){return uw||(uw=1,Pp=t4().sortBy),Pp}var i4=r4();const Mh=fn(i4);var J2=e=>e.legend.settings,n4=e=>e.legend.size,s4=e=>e.legend.payload;le([s4,J2],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?Mh(n,r):n});var au=1;function a4(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=z.useState({height:0,left:0,top:0,width:0}),n=z.useCallback(o=>{if(o!=null){var h=o.getBoundingClientRect(),g={height:h.height,left:h.left,top:h.top,width:h.width};(Math.abs(g.height-t.height)>au||Math.abs(g.left-t.left)>au||Math.abs(g.top-t.top)>au||Math.abs(g.width-t.width)>au)&&r({height:g.height,left:g.left,top:g.top,width:g.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,n]}function tr(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var o4=typeof Symbol=="function"&&Symbol.observable||"@@observable",hw=o4,Bp=()=>Math.random().toString(36).substring(7).split("").join("."),l4={INIT:`@@redux/INIT${Bp()}`,REPLACE:`@@redux/REPLACE${Bp()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Bp()}`},Bu=l4;function T_(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function eE(e,t,r){if(typeof e!="function")throw new Error(tr(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(tr(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(tr(1));return r(eE)(e,t)}let n=e,o=t,h=new Map,g=h,a=0,c=!1;function f(){g===h&&(g=new Map,h.forEach((d,y)=>{g.set(y,d)}))}function v(){if(c)throw new Error(tr(3));return o}function u(d){if(typeof d!="function")throw new Error(tr(4));if(c)throw new Error(tr(5));let y=!0;f();const b=a++;return g.set(b,d),function(){if(y){if(c)throw new Error(tr(6));y=!1,f(),g.delete(b),h=null}}}function m(d){if(!T_(d))throw new Error(tr(7));if(typeof d.type>"u")throw new Error(tr(8));if(typeof d.type!="string")throw new Error(tr(17));if(c)throw new Error(tr(9));try{c=!0,o=n(o,d)}finally{c=!1}return(h=g).forEach(b=>{b()}),d}function w(d){if(typeof d!="function")throw new Error(tr(10));n=d,m({type:Bu.REPLACE})}function C(){const d=u;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(tr(11));function b(){const E=y;E.next&&E.next(v())}return b(),{unsubscribe:d(b)}},[hw](){return this}}}return m({type:Bu.INIT}),{dispatch:m,subscribe:u,getState:v,replaceReducer:w,[hw]:C}}function c4(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:Bu.INIT})>"u")throw new Error(tr(12));if(typeof r(void 0,{type:Bu.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(tr(13))})}function tE(e){const t=Object.keys(e),r={};for(let h=0;h<t.length;h++){const g=t[h];typeof e[g]=="function"&&(r[g]=e[g])}const n=Object.keys(r);let o;try{c4(r)}catch(h){o=h}return function(g={},a){if(o)throw o;let c=!1;const f={};for(let v=0;v<n.length;v++){const u=n[v],m=r[u],w=g[u],C=m(w,a);if(typeof C>"u")throw a&&a.type,new Error(tr(14));f[u]=C,c=c||C!==w}return c=c||n.length!==Object.keys(g).length,c?f:g}}function ju(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function u4(...e){return t=>(r,n)=>{const o=t(r,n);let h=()=>{throw new Error(tr(15))};const g={getState:o.getState,dispatch:(c,...f)=>h(c,...f)},a=e.map(c=>c(g));return h=ju(...a)(o.dispatch),{...o,dispatch:h}}}function rE(e){return T_(e)&&"type"in e&&typeof e.type=="string"}var iE=Symbol.for("immer-nothing"),fw=Symbol.for("immer-draftable"),fr=Symbol.for("immer-state");function ui(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var kr=Object,Ia=kr.getPrototypeOf,Iu="constructor",Lh="prototype",Ag="configurable",Nu="enumerable",Cu="writable",vl="value",sn=e=>!!e&&!!e[fr];function pi(e){var t;return e?nE(e)||Th(e)||!!e[fw]||!!((t=e[Iu])!=null&&t[fw])||Dh(e)||Rh(e):!1}var h4=kr[Lh][Iu].toString(),dw=new WeakMap;function nE(e){if(!e||!D_(e))return!1;const t=Ia(e);if(t===null||t===kr[Lh])return!0;const r=kr.hasOwnProperty.call(t,Iu)&&t[Iu];if(r===Object)return!0;if(!Da(r))return!1;let n=dw.get(r);return n===void 0&&(n=Function.toString.call(r),dw.set(r,n)),n===h4}function Oh(e,t,r=!0){Ol(e)===0?(r?Reflect.ownKeys(e):kr.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((n,o)=>t(o,n,e))}function Ol(e){const t=e[fr];return t?t.type_:Th(e)?1:Dh(e)?2:Rh(e)?3:0}var vw=(e,t,r=Ol(e))=>r===2?e.has(t):kr[Lh].hasOwnProperty.call(e,t),Mg=(e,t,r=Ol(e))=>r===2?e.get(t):e[t],zu=(e,t,r,n=Ol(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function f4(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Th=Array.isArray,Dh=e=>e instanceof Map,Rh=e=>e instanceof Set,D_=e=>typeof e=="object",Da=e=>typeof e=="function",jp=e=>typeof e=="boolean";function d4(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Zi=e=>e.copy_||e.base_,R_=e=>e.modified_?e.copy_:e.base_;function Lg(e,t){if(Dh(e))return new Map(e);if(Rh(e))return new Set(e);if(Th(e))return Array[Lh].slice.call(e);const r=nE(e);if(t===!0||t==="class_only"&&!r){const n=kr.getOwnPropertyDescriptors(e);delete n[fr];let o=Reflect.ownKeys(n);for(let h=0;h<o.length;h++){const g=o[h],a=n[g];a[Cu]===!1&&(a[Cu]=!0,a[Ag]=!0),(a.get||a.set)&&(n[g]={[Ag]:!0,[Cu]:!0,[Nu]:a[Nu],[vl]:e[g]})}return kr.create(Ia(e),n)}else{const n=Ia(e);if(n!==null&&r)return{...e};const o=kr.create(n);return kr.assign(o,e)}}function k_(e,t=!1){return kh(e)||sn(e)||!pi(e)||(Ol(e)>1&&kr.defineProperties(e,{set:ou,add:ou,clear:ou,delete:ou}),kr.freeze(e),t&&Oh(e,(r,n)=>{k_(n,!0)},!1)),e}function v4(){ui(2)}var ou={[vl]:v4};function kh(e){return e===null||!D_(e)?!0:kr.isFrozen(e)}var Hu="MapSet",Og="Patches",pw="ArrayMethods",sE={};function ks(e){const t=sE[e];return t||ui(0,e),t}var gw=e=>!!sE[e],pl,aE=()=>pl,p4=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:gw(Hu)?ks(Hu):void 0,arrayMethodsPlugin_:gw(pw)?ks(pw):void 0});function _w(e,t){t&&(e.patchPlugin_=ks(Og),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Tg(e){Dg(e),e.drafts_.forEach(g4),e.drafts_=null}function Dg(e){e===pl&&(pl=e.parent_)}var mw=e=>pl=p4(pl,e);function g4(e){const t=e[fr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function yw(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[fr].modified_&&(Tg(t),ui(4)),pi(e)&&(e=bw(t,e));const{patchPlugin_:o}=t;o&&o.generateReplacementPatches_(r[fr].base_,e,t)}else e=bw(t,r);return _4(t,e,!0),Tg(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==iE?e:void 0}function bw(e,t){if(kh(t))return t;const r=t[fr];if(!r)return $u(t,e.handledSet_,e);if(!Ph(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);cE(r,e)}return r.copy_}function _4(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&k_(t,r)}function oE(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Ph=(e,t)=>e.scope_===t,m4=[];function lE(e,t,r,n){const o=Zi(e),h=e.type_;if(n!==void 0&&Mg(o,n,h)===t){zu(o,n,r,h);return}if(!e.draftLocations_){const a=e.draftLocations_=new Map;Oh(o,(c,f)=>{if(sn(f)){const v=a.get(f)||[];v.push(c),a.set(f,v)}})}const g=e.draftLocations_.get(t)??m4;for(const a of g)zu(o,a,r,h)}function y4(e,t,r){e.callbacks_.push(function(o){var a;const h=t;if(!h||!Ph(h,o))return;(a=o.mapSetPlugin_)==null||a.fixSetContents(h);const g=R_(h);lE(e,h.draft_??h,g,r),cE(h,o)})}function cE(e,t){var n;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((n=e.assigned_)==null?void 0:n.size)??0)>0)){const{patchPlugin_:o}=t;if(o){const h=o.getPath(e);h&&o.generatePatches_(e,h,t)}oE(e)}}function b4(e,t,r){const{scope_:n}=e;if(sn(r)){const o=r[fr];Ph(o,n)&&o.callbacks_.push(function(){xu(e);const g=R_(o);lE(e,r,g,t)})}else pi(r)&&e.callbacks_.push(function(){const h=Zi(e);e.type_===3?h.has(r)&&$u(r,n.handledSet_,n):Mg(h,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&$u(Mg(e.copy_,t,e.type_),n.handledSet_,n)})}function $u(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||sn(e)||t.has(e)||!pi(e)||kh(e)||(t.add(e),Oh(e,(n,o)=>{if(sn(o)){const h=o[fr];if(Ph(h,r)){const g=R_(h);zu(e,n,g,e.type_),oE(h)}}else pi(o)&&$u(o,t,r)})),e}function S4(e,t){const r=Th(e),n={type_:r?1:0,scope_:t?t.scope_:aE(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let o=n,h=Uu;r&&(o=[n],h=gl);const{revoke:g,proxy:a}=Proxy.revocable(o,h);return n.draft_=a,n.revoke_=g,[a,n]}var Uu={get(e,t){if(t===fr)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r!=null&&r.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const o=Zi(e);if(!vw(o,t,e.type_))return w4(e,o,t);const h=o[t];if(e.finalized_||!pi(h)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&d4(t))return h;if(h===Ip(e.base_,t)){xu(e);const g=e.type_===1?+t:t,a=kg(e.scope_,h,e,g);return e.copy_[g]=a}return h},has(e,t){return t in Zi(e)},ownKeys(e){return Reflect.ownKeys(Zi(e))},set(e,t,r){const n=uE(Zi(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=Ip(Zi(e),t),h=o==null?void 0:o[fr];if(h&&h.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(f4(r,o)&&(r!==void 0||vw(e.base_,t,e.type_)))return!0;xu(e),Rg(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),b4(e,t,r)),!0},deleteProperty(e,t){return xu(e),Ip(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Rg(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Zi(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Cu]:!0,[Ag]:e.type_!==1||t!=="length",[Nu]:n[Nu],[vl]:r[t]}},defineProperty(){ui(11)},getPrototypeOf(e){return Ia(e.base_)},setPrototypeOf(){ui(12)}},gl={};for(let e in Uu){let t=Uu[e];gl[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}gl.deleteProperty=function(e,t){return gl.set.call(this,e,t,void 0)};gl.set=function(e,t,r){return Uu.set.call(this,e[0],t,r,e[0])};function Ip(e,t){const r=e[fr];return(r?Zi(r):e)[t]}function w4(e,t,r){var o;const n=uE(t,r);return n?vl in n?n[vl]:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function uE(e,t){if(!(t in e))return;let r=Ia(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ia(r)}}function Rg(e){e.modified_||(e.modified_=!0,e.parent_&&Rg(e.parent_))}function xu(e){e.copy_||(e.assigned_=new Map,e.copy_=Lg(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var C4=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,o)=>{if(Da(r)&&!Da(n)){const g=n;n=r;const a=this;return function(f=g,...v){return a.produce(f,u=>n.call(this,u,...v))}}Da(n)||ui(6),o!==void 0&&!Da(o)&&ui(7);let h;if(pi(r)){const g=mw(this),a=kg(g,r,void 0);let c=!0;try{h=n(a),c=!1}finally{c?Tg(g):Dg(g)}return _w(g,o),yw(h,g)}else if(!r||!D_(r)){if(h=n(r),h===void 0&&(h=r),h===iE&&(h=void 0),this.autoFreeze_&&k_(h,!0),o){const g=[],a=[];ks(Og).generateReplacementPatches_(r,h,{patches_:g,inversePatches_:a}),o(g,a)}return h}else ui(1,r)},this.produceWithPatches=(r,n)=>{if(Da(r))return(a,...c)=>this.produceWithPatches(a,f=>r(f,...c));let o,h;return[this.produce(r,n,(a,c)=>{o=a,h=c}),o,h]},jp(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),jp(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),jp(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){pi(t)||ui(8),sn(t)&&(t=di(t));const r=mw(this),n=kg(r,t,void 0);return n[fr].isManual_=!0,Dg(r),n}finishDraft(t,r){const n=t&&t[fr];(!n||!n.isManual_)&&ui(9);const{scope_:o}=n;return _w(o,r),yw(void 0,o)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const h=r[n];if(h.path.length===0&&h.op==="replace"){t=h.value;break}}n>-1&&(r=r.slice(n+1));const o=ks(Og).applyPatches_;return sn(t)?o(t,r):this.produce(t,h=>o(h,r))}};function kg(e,t,r,n){const[o,h]=Dh(t)?ks(Hu).proxyMap_(t,r):Rh(t)?ks(Hu).proxySet_(t,r):S4(t,r);return((r==null?void 0:r.scope_)??aE()).drafts_.push(o),h.callbacks_=(r==null?void 0:r.callbacks_)??[],h.key_=n,r&&n!==void 0?y4(r,h,n):h.callbacks_.push(function(c){var v;(v=c.mapSetPlugin_)==null||v.fixSetContents(h);const{patchPlugin_:f}=c;h.modified_&&f&&f.generatePatches_(h,[],c)}),o}function di(e){return sn(e)||ui(10,e),hE(e)}function hE(e){if(!pi(e)||kh(e))return e;const t=e[fr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Lg(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Lg(e,!0);return Oh(r,(o,h)=>{zu(r,o,hE(h))},n),t&&(t.finalized_=!1),r}var x4=new C4,fE=x4.produce;function dE(e){return({dispatch:r,getState:n})=>o=>h=>typeof h=="function"?h(r,n,e):o(h)}var E4=dE(),A4=dE,M4=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ju:ju.apply(null,arguments)};function ei(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(Pr(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>rE(n)&&n.type===e,r}var vE=class ll extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ll.prototype)}static get[Symbol.species](){return ll}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ll(...t[0].concat(this)):new ll(...t.concat(this))}};function Sw(e){return pi(e)?fE(e,()=>{}):e}function lu(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function L4(e){return typeof e=="boolean"}var O4=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:h=!0}=t??{};let g=new vE;return r&&(L4(r)?g.push(E4):g.push(A4(r.extraArgument))),g},pE="RTK_autoBatch",pt=()=>e=>({payload:e,meta:{[pE]:!0}}),ww=e=>t=>{setTimeout(t,e)},gE=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let o=!0,h=!1,g=!1;const a=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ww(10):e.type==="callback"?e.queueNotification:ww(e.timeout),f=()=>{g=!1,h&&(h=!1,a.forEach(v=>v()))};return Object.assign({},n,{subscribe(v){const u=()=>o&&v(),m=n.subscribe(u);return a.add(v),()=>{m(),a.delete(v)}},dispatch(v){var u;try{return o=!((u=v==null?void 0:v.meta)!=null&&u[pE]),h=!o,h&&(g||(g=!0,c(f))),n.dispatch(v)}finally{o=!0}}})},T4=e=>function(r){const{autoBatch:n=!0}=r??{};let o=new vE(e);return n&&o.push(gE(typeof n=="object"?n:void 0)),o};function D4(e){const t=O4(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:h=void 0,enhancers:g=void 0}=e||{};let a;if(typeof r=="function")a=r;else if(T_(r))a=tE(r);else throw new Error(Pr(1));let c;typeof n=="function"?c=n(t):c=t();let f=ju;o&&(f=M4({trace:!1,...typeof o=="object"&&o}));const v=u4(...c),u=T4(v);let m=typeof g=="function"?g(u):u();const w=f(...m);return eE(a,h,w)}function _E(e){const t={},r=[];let n;const o={addCase(h,g){const a=typeof h=="string"?h:h.type;if(!a)throw new Error(Pr(28));if(a in t)throw new Error(Pr(29));return t[a]=g,o},addAsyncThunk(h,g){return g.pending&&(t[h.pending.type]=g.pending),g.rejected&&(t[h.rejected.type]=g.rejected),g.fulfilled&&(t[h.fulfilled.type]=g.fulfilled),g.settled&&r.push({matcher:h.settled,reducer:g.settled}),o},addMatcher(h,g){return r.push({matcher:h,reducer:g}),o},addDefaultCase(h){return n=h,o}};return e(o),[t,r,n]}function R4(e){return typeof e=="function"}function k4(e,t){let[r,n,o]=_E(t),h;if(R4(e))h=()=>Sw(e());else{const a=Sw(e);h=()=>a}function g(a=h(),c){let f=[r[c.type],...n.filter(({matcher:v})=>v(c)).map(({reducer:v})=>v)];return f.filter(v=>!!v).length===0&&(f=[o]),f.reduce((v,u)=>{if(u)if(sn(v)){const w=u(v,c);return w===void 0?v:w}else{if(pi(v))return fE(v,m=>u(m,c));{const m=u(v,c);if(m===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}}return v},a)}return g.getInitialState=h,g}var P4="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",B4=(e=21)=>{let t="",r=e;for(;r--;)t+=P4[Math.random()*64|0];return t},j4=Symbol.for("rtk-slice-createasyncthunk");function I4(e,t){return`${e}/${t}`}function N4({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[j4];return function(o){const{name:h,reducerPath:g=h}=o;if(!h)throw new Error(Pr(11));const a=(typeof o.reducers=="function"?o.reducers(H4()):o.reducers)||{},c=Object.keys(a),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},v={addCase(E,L){const x=typeof E=="string"?E:E.type;if(!x)throw new Error(Pr(12));if(x in f.sliceCaseReducersByType)throw new Error(Pr(13));return f.sliceCaseReducersByType[x]=L,v},addMatcher(E,L){return f.sliceMatchers.push({matcher:E,reducer:L}),v},exposeAction(E,L){return f.actionCreators[E]=L,v},exposeCaseReducer(E,L){return f.sliceCaseReducersByName[E]=L,v}};c.forEach(E=>{const L=a[E],x={reducerName:E,type:I4(h,E),createNotation:typeof o.reducers=="function"};U4(L)?q4(x,L,v,t):$4(x,L,v)});function u(){const[E={},L=[],x=void 0]=typeof o.extraReducers=="function"?_E(o.extraReducers):[o.extraReducers],O={...E,...f.sliceCaseReducersByType};return k4(o.initialState,M=>{for(let D in O)M.addCase(D,O[D]);for(let D of f.sliceMatchers)M.addMatcher(D.matcher,D.reducer);for(let D of L)M.addMatcher(D.matcher,D.reducer);x&&M.addDefaultCase(x)})}const m=E=>E,w=new Map,C=new WeakMap;let _;function d(E,L){return _||(_=u()),_(E,L)}function y(){return _||(_=u()),_.getInitialState()}function b(E,L=!1){function x(M){let D=M[E];return typeof D>"u"&&L&&(D=lu(C,x,y)),D}function O(M=m){const D=lu(w,L,()=>new WeakMap);return lu(D,M,()=>{const k={};for(const[B,R]of Object.entries(o.selectors??{}))k[B]=z4(R,M,()=>lu(C,M,y),L);return k})}return{reducerPath:E,getSelectors:O,get selectors(){return O(x)},selectSlice:x}}const S={name:h,reducer:d,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:y,...b(g),injectInto(E,{reducerPath:L,...x}={}){const O=L??g;return E.inject({reducerPath:O,reducer:d},x),{...S,...b(O,!0)}}};return S}}function z4(e,t,r,n){function o(h,...g){let a=t(h);return typeof a>"u"&&n&&(a=r()),e(a,...g)}return o.unwrapped=e,o}var Cr=N4();function H4(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function $4({type:e,reducerName:t,createNotation:r},n,o){let h,g;if("reducer"in n){if(r&&!F4(n))throw new Error(Pr(17));h=n.reducer,g=n.prepare}else h=n;o.addCase(e,h).exposeCaseReducer(t,h).exposeAction(t,g?ei(e,g):ei(e))}function U4(e){return e._reducerDefinitionType==="asyncThunk"}function F4(e){return e._reducerDefinitionType==="reducerWithPrepare"}function q4({type:e,reducerName:t},r,n,o){if(!o)throw new Error(Pr(18));const{payloadCreator:h,fulfilled:g,pending:a,rejected:c,settled:f,options:v}=r,u=o(e,h,v);n.exposeAction(t,u),g&&n.addCase(u.fulfilled,g),a&&n.addCase(u.pending,a),c&&n.addCase(u.rejected,c),f&&n.addMatcher(u.settled,f),n.exposeCaseReducer(t,{fulfilled:g||cu,pending:a||cu,rejected:c||cu,settled:f||cu})}function cu(){}var W4="task",mE="listener",yE="completed",P_="cancelled",G4=`task-${P_}`,K4=`task-${yE}`,Pg=`${mE}-${P_}`,Y4=`${mE}-${yE}`,Bh=class{constructor(e){er(this,"name","TaskAbortError");er(this,"message");this.code=e,this.message=`${W4} ${P_} (reason: ${e})`}},B_=(e,t)=>{if(typeof e!="function")throw new TypeError(Pr(32))},Fu=()=>{},bE=(e,t=Fu)=>(e.catch(t),e),SE=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Ms=e=>{if(e.aborted)throw new Bh(e.reason)};function wE(e,t){let r=Fu;return new Promise((n,o)=>{const h=()=>o(new Bh(e.reason));if(e.aborted){h();return}r=SE(e,h),t.finally(()=>r()).then(n,o)}).finally(()=>{r=Fu})}var V4=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Bh?"cancelled":"rejected",error:r}}finally{t==null||t()}},qu=e=>t=>bE(wE(e,t).then(r=>(Ms(e),r))),CE=e=>{const t=qu(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Pa}=Object,Cw={},jh="listenerMiddleware",X4=(e,t)=>{const r=n=>SE(e,()=>n.abort(e.reason));return(n,o)=>{B_(n);const h=new AbortController;r(h);const g=V4(async()=>{Ms(e),Ms(h.signal);const a=await n({pause:qu(h.signal),delay:CE(h.signal),signal:h.signal});return Ms(h.signal),a},()=>h.abort(K4));return o!=null&&o.autoJoin&&t.push(g.catch(Fu)),{result:qu(e)(g),cancel(){h.abort(G4)}}}},Z4=(e,t)=>{const r=async(n,o)=>{Ms(t);let h=()=>{};const a=[new Promise((c,f)=>{let v=e({predicate:n,effect:(u,m)=>{m.unsubscribe(),c([u,m.getState(),m.getOriginalState()])}});h=()=>{v(),f()}})];o!=null&&a.push(new Promise(c=>setTimeout(c,o,null)));try{const c=await wE(t,Promise.race(a));return Ms(t),c}finally{h()}};return(n,o)=>bE(r(n,o))},xE=e=>{let{type:t,actionCreator:r,matcher:n,predicate:o,effect:h}=e;if(t)o=ei(t).match;else if(r)t=r.type,o=r.match;else if(n)o=n;else if(!o)throw new Error(Pr(21));return B_(h),{predicate:o,type:t,effect:h}},EE=Pa(e=>{const{type:t,predicate:r,effect:n}=xE(e);return{id:B4(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Pr(22))}}},{withTypes:()=>EE}),xw=(e,t)=>{const{type:r,effect:n,predicate:o}=xE(t);return Array.from(e.values()).find(h=>(typeof r=="string"?h.type===r:h.predicate===o)&&h.effect===n)},Bg=e=>{e.pending.forEach(t=>{t.abort(Pg)})},Q4=(e,t)=>()=>{for(const r of t.keys())Bg(r);e.clear()},Ew=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},AE=Pa(ei(`${jh}/add`),{withTypes:()=>AE}),J4=ei(`${jh}/removeAll`),ME=Pa(ei(`${jh}/remove`),{withTypes:()=>ME}),eP=(...e)=>{console.error(`${jh}/error`,...e)},Tl=(e={})=>{const t=new Map,r=new Map,n=w=>{const C=r.get(w)??0;r.set(w,C+1)},o=w=>{const C=r.get(w)??1;C===1?r.delete(w):r.set(w,C-1)},{extra:h,onError:g=eP}=e;B_(g);const a=w=>(w.unsubscribe=()=>t.delete(w.id),t.set(w.id,w),C=>{w.unsubscribe(),C!=null&&C.cancelActive&&Bg(w)}),c=w=>{const C=xw(t,w)??EE(w);return a(C)};Pa(c,{withTypes:()=>c});const f=w=>{const C=xw(t,w);return C&&(C.unsubscribe(),w.cancelActive&&Bg(C)),!!C};Pa(f,{withTypes:()=>f});const v=async(w,C,_,d)=>{const y=new AbortController,b=Z4(c,y.signal),S=[];try{w.pending.add(y),n(w),await Promise.resolve(w.effect(C,Pa({},_,{getOriginalState:d,condition:(E,L)=>b(E,L).then(Boolean),take:b,delay:CE(y.signal),pause:qu(y.signal),extra:h,signal:y.signal,fork:X4(y.signal,S),unsubscribe:w.unsubscribe,subscribe:()=>{t.set(w.id,w)},cancelActiveListeners:()=>{w.pending.forEach((E,L,x)=>{E!==y&&(E.abort(Pg),x.delete(E))})},cancel:()=>{y.abort(Pg),w.pending.delete(y)},throwIfCancelled:()=>{Ms(y.signal)}})))}catch(E){E instanceof Bh||Ew(g,E,{raisedBy:"effect"})}finally{await Promise.all(S),y.abort(Y4),o(w),w.pending.delete(y)}},u=Q4(t,r);return{middleware:w=>C=>_=>{if(!rE(_))return C(_);if(AE.match(_))return c(_.payload);if(J4.match(_)){u();return}if(ME.match(_))return f(_.payload);let d=w.getState();const y=()=>{if(d===Cw)throw new Error(Pr(23));return d};let b;try{if(b=C(_),t.size>0){const S=w.getState(),E=Array.from(t.values());for(const L of E){let x=!1;try{x=L.predicate(_,S,d)}catch(O){x=!1,Ew(g,O,{raisedBy:"predicate"})}x&&v(L,_,w,y)}}}finally{d=Cw}return b},startListening:c,stopListening:f,clearListeners:u}};function Pr(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var tP={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},LE=Cr({name:"chartLayout",initialState:tP,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,o,h;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(o=t.payload.bottom)!==null&&o!==void 0?o:0,e.margin.left=(h=t.payload.left)!==null&&h!==void 0?h:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:rP,setLayout:iP,setChartSize:nP,setScale:sP}=LE.actions,aP=LE.reducer;function OE(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function Ze(e){return Number.isFinite(e)}function Zn(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function Aw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ra(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Aw(Object(r),!0).forEach(function(n){oP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Aw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oP(e,t,r){return(t=lP(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lP(e){var t=cP(e,"string");return typeof t=="symbol"?t:t+""}function cP(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sr(e,t,r){return qt(e)||qt(t)?r:Di(t)?ja(e,t,r):typeof t=="function"?t(e):r}var uP=(e,t,r)=>{if(t&&r){var{width:n,height:o}=r,{align:h,verticalAlign:g,layout:a}=t;if((a==="vertical"||a==="horizontal"&&g==="middle")&&h!=="center"&&Oe(e[h]))return Ra(Ra({},e),{},{[h]:e[h]+(n||0)});if((a==="horizontal"||a==="vertical"&&h==="center")&&g!=="middle"&&Oe(e[g]))return Ra(Ra({},e),{},{[g]:e[g]+(o||0)})}return e},Qn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",hP=(e,t)=>{if(!t||t.length!==2||!Oe(t[0])||!Oe(t[1]))return e;var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),o=[e[0],e[1]];return(!Oe(e[0])||e[0]<r)&&(o[0]=r),(!Oe(e[1])||e[1]>n)&&(o[1]=n),o[0]>n&&(o[0]=n),o[1]<r&&(o[1]=r),o},fP=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var o=0;o<n;++o)for(var h=0,g=0,a=0;a<r;++a){var c=e[a],f=c==null?void 0:c[o];if(f!=null){var v=f[1],u=f[0],m=Ti(v)?u:v;m>=0?(f[0]=h,h+=m,f[1]=h):(f[0]=g,g+=m,f[1]=g)}}}},dP=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var o=0;o<n;++o)for(var h=0,g=0;g<r;++g){var a=e[g],c=a==null?void 0:a[o];if(c!=null){var f=Ti(c[1])?c[0]:c[1];f>=0?(c[0]=h,h+=f,c[1]=h):(c[0]=0,c[1]=0)}}}},vP={sign:fP,expand:H3,none:Ds,silhouette:$3,wiggle:U3,positive:dP},pP=(e,t,r)=>{var n,o=(n=vP[r])!==null&&n!==void 0?n:Ds,h=z3().keys(t).value((a,c)=>Number(sr(a,c,0))).order(xg).offset(o),g=h(e);return g.forEach((a,c)=>{a.forEach((f,v)=>{var u=sr(e[v],t[c],0);Array.isArray(u)&&u.length===2&&Oe(u[0])&&Oe(u[1])&&(f[0]=u[0],f[1]=u[1])})}),g};function gP(e){return e==null?void 0:String(e)}var Mw=e=>{var{axis:t,ticks:r,offset:n,bandSize:o,entry:h,index:g}=e;if(t.type==="category")return r[g]?r[g].coordinate+n:null;var a=sr(h,t.dataKey,t.scale.domain()[g]);if(qt(a))return null;var c=t.scale.map(a);return Oe(c)?c-o/2+n:null},_P=e=>{var{numericAxis:t}=e,r=t.scale.domain();if(t.type==="number"){var n=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return n<=0&&o>=0?0:o<0?o:n}return r[0]},mP=e=>{var t=e.flat(2).filter(Oe);return[Math.min(...t),Math.max(...t)]},yP=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],bP=(e,t,r)=>{if(e!=null)return yP(Object.keys(e).reduce((n,o)=>{var h=e[o];if(!h)return n;var{stackedData:g}=h,a=g.reduce((c,f)=>{var v=OE(f,t,r),u=mP(v);return!Ze(u[0])||!Ze(u[1])?c:[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);return[Math.min(a[0],n[0]),Math.max(a[1],n[1])]},[1/0,-1/0]))},Lw=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Ow=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Wu=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var o=Mh(t,v=>v.coordinate),h=1/0,g=1,a=o.length;g<a;g++){var c=o[g],f=o[g-1];h=Math.min(((c==null?void 0:c.coordinate)||0)-((f==null?void 0:f.coordinate)||0),h)}return h===1/0?0:h}return r?void 0:0};function Tw(e){var{tooltipEntrySettings:t,dataKey:r,payload:n,value:o,name:h}=e;return Ra(Ra({},t),{},{dataKey:r,payload:n,value:o,name:h})}function TE(e,t){if(e)return String(e);if(typeof t=="string")return t}var SP=(e,t)=>{if(t==="horizontal")return e.chartX;if(t==="vertical")return e.chartY},wP=(e,t)=>t==="centric"?e.angle:e.radius,dn=e=>e.layout.width,vn=e=>e.layout.height,CP=e=>e.layout.scale,DE=e=>e.layout.margin,Ih=le(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Nh=le(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),xP="data-recharts-item-index",EP="data-recharts-item-id",Dl=60;function Dw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function uu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Dw(Object(r),!0).forEach(function(n){AP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AP(e,t,r){return(t=MP(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MP(e){var t=LP(e,"string");return typeof t=="symbol"?t:t+""}function LP(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var OP=e=>e.brush.height;function TP(e){var t=Nh(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var o=typeof n.width=="number"?n.width:Dl;return r+o}return r},0)}function DP(e){var t=Nh(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var o=typeof n.width=="number"?n.width:Dl;return r+o}return r},0)}function RP(e){var t=Ih(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function kP(e){var t=Ih(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Wt=le([dn,vn,DE,OP,TP,DP,RP,kP,J2,n4],(e,t,r,n,o,h,g,a,c,f)=>{var v={left:(r.left||0)+o,right:(r.right||0)+h},u={top:(r.top||0)+g,bottom:(r.bottom||0)+a},m=uu(uu({},u),v),w=m.bottom;m.bottom+=n,m=uP(m,c,f);var C=e-m.left-m.right,_=t-m.top-m.bottom;return uu(uu({brushBottom:w},m),{},{width:Math.max(C,0),height:Math.max(_,0)})}),PP=le(Wt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),j_=le(dn,vn,(e,t)=>({x:0,y:0,width:e,height:t})),BP=z.createContext(null),Ir=()=>z.useContext(BP)!=null,zh=e=>e.brush,Hh=le([zh,Wt,DE],(e,t,r)=>({height:e.height,x:Oe(e.x)?e.x:t.left,y:Oe(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:Oe(e.width)?e.width:t.width})),Np={},zp={},Hp={},Rw;function jP(){return Rw||(Rw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n,{signal:o,edges:h}={}){let g,a=null;const c=h!=null&&h.includes("leading"),f=h==null||h.includes("trailing"),v=()=>{a!==null&&(r.apply(g,a),g=void 0,a=null)},u=()=>{f&&v(),_()};let m=null;const w=()=>{m!=null&&clearTimeout(m),m=setTimeout(()=>{m=null,u()},n)},C=()=>{m!==null&&(clearTimeout(m),m=null)},_=()=>{C(),g=void 0,a=null},d=()=>{v()},y=function(...b){if(o!=null&&o.aborted)return;g=this,a=b;const S=m==null;w(),c&&S&&v()};return y.schedule=w,y.cancel=_,y.flush=d,o==null||o.addEventListener("abort",_,{once:!0}),y}e.debounce=t})(Hp)),Hp}var kw;function IP(){return kw||(kw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=jP();function r(n,o=0,h={}){typeof h!="object"&&(h={});const{leading:g=!1,trailing:a=!0,maxWait:c}=h,f=Array(2);g&&(f[0]="leading"),a&&(f[1]="trailing");let v,u=null;const m=t.debounce(function(..._){v=n.apply(this,_),u=null},o,{edges:f}),w=function(..._){return c!=null&&(u===null&&(u=Date.now()),Date.now()-u>=c)?(v=n.apply(this,_),u=Date.now(),m.cancel(),m.schedule(),v):(m.apply(this,_),v)},C=()=>(m.flush(),v);return w.cancel=m.cancel,w.flush=C,w}e.debounce=r})(zp)),zp}var Pw;function NP(){return Pw||(Pw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=IP();function r(n,o=0,h={}){const{leading:g=!0,trailing:a=!0}=h;return t.debounce(n,o,{leading:g,maxWait:o,trailing:a})}e.throttle=r})(Np)),Np}var $p,Bw;function zP(){return Bw||(Bw=1,$p=NP().throttle),$p}var HP=zP();const $P=fn(HP);var jw=function(t,r){for(var n=arguments.length,o=new Array(n>2?n-2:0),h=2;h<n;h++)o[h-2]=arguments[h];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var g=0;console.warn(r.replace(/%s/g,()=>o[g++]))}},Mi={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},RE=(e,t,r)=>{var{width:n=Mi.width,height:o=Mi.height,aspect:h,maxHeight:g}=r,a=Rs(n)?e:Number(n),c=Rs(o)?t:Number(o);return h&&h>0&&(a?c=a/h:c&&(a=c*h),g&&c!=null&&c>g&&(c=g)),{calculatedWidth:a,calculatedHeight:c}},UP={width:0,height:0,overflow:"visible"},FP={width:0,overflowX:"visible"},qP={height:0,overflowY:"visible"},WP={},GP=e=>{var{width:t,height:r}=e,n=Rs(t),o=Rs(r);return n&&o?UP:n?FP:o?qP:WP};function KP(e){var{width:t,height:r,aspect:n}=e,o=t,h=r;return o===void 0&&h===void 0?(o=Mi.width,h=Mi.height):o===void 0?o=n&&n>0?void 0:Mi.width:h===void 0&&(h=n&&n>0?void 0:Mi.height),{width:o,height:h}}function jg(){return jg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},jg.apply(null,arguments)}function Iw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Nw(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Iw(Object(r),!0).forEach(function(n){YP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Iw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function YP(e,t,r){return(t=VP(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VP(e){var t=XP(e,"string");return typeof t=="symbol"?t:t+""}function XP(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kE=z.createContext(Mi.initialDimension);function ZP(e){return Zn(e.width)&&Zn(e.height)}function PE(e){var{children:t,width:r,height:n}=e,o=z.useMemo(()=>({width:r,height:n}),[r,n]);return ZP(o)?z.createElement(kE.Provider,{value:o},t):null}var I_=()=>z.useContext(kE),QP=z.forwardRef((e,t)=>{var{aspect:r,initialDimension:n=Mi.initialDimension,width:o,height:h,minWidth:g=Mi.minWidth,minHeight:a,maxHeight:c,children:f,debounce:v=Mi.debounce,id:u,className:m,onResize:w,style:C={}}=e,_=z.useRef(null),d=z.useRef();d.current=w,z.useImperativeHandle(t,()=>_.current);var[y,b]=z.useState({containerWidth:n.width,containerHeight:n.height}),S=z.useCallback((M,D)=>{b(k=>{var B=Math.round(M),R=Math.round(D);return k.containerWidth===B&&k.containerHeight===R?k:{containerWidth:B,containerHeight:R}})},[]);z.useEffect(()=>{if(_.current==null||typeof ResizeObserver>"u")return Ga;var M=R=>{var P,H=R[0];if(H!=null){var{width:X,height:F}=H.contentRect;S(X,F),(P=d.current)===null||P===void 0||P.call(d,X,F)}};v>0&&(M=$P(M,v,{trailing:!0,leading:!1}));var D=new ResizeObserver(M),{width:k,height:B}=_.current.getBoundingClientRect();return S(k,B),D.observe(_.current),()=>{D.disconnect()}},[S,v]);var{containerWidth:E,containerHeight:L}=y;jw(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:x,calculatedHeight:O}=RE(E,L,{width:o,height:h,aspect:r,maxHeight:c});return jw(x!=null&&x>0||O!=null&&O>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
147
|
-
please check the style of container, or the props width(%s) and height(%s),
|
|
148
|
-
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
149
|
-
height and width.`,x,O,o,h,g,a,r),z.createElement("div",{id:u?"".concat(u):void 0,className:dt("recharts-responsive-container",m),style:Nw(Nw({},C),{},{width:o,height:h,minWidth:g,minHeight:a,maxHeight:c}),ref:_},z.createElement("div",{style:GP({width:o,height:h})},z.createElement(PE,{width:x,height:O},f)))}),JP=z.forwardRef((e,t)=>{var r=I_();if(Zn(r.width)&&Zn(r.height))return e.children;var{width:n,height:o}=KP({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:h,calculatedHeight:g}=RE(void 0,void 0,{width:n,height:o,aspect:e.aspect,maxHeight:e.maxHeight});return Oe(h)&&Oe(g)?z.createElement(PE,{width:h,height:g},e.children):z.createElement(QP,jg({},e,{width:n,height:o,ref:t}))});function N_(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var $h=()=>{var e,t=Ir(),r=Re(PP),n=Re(Hh),o=(e=Re(zh))===null||e===void 0?void 0:e.padding;return!t||!n||!o?r:{width:n.width-o.left-o.right,height:n.height-o.top-o.bottom,x:o.left,y:o.top}},e6={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},t6=()=>{var e;return(e=Re(Wt))!==null&&e!==void 0?e:e6},r6=()=>Re(dn),i6=()=>Re(vn),ot=e=>e.layout.layoutType,Ka=()=>Re(ot),BE=()=>{var e=Ka();if(e==="horizontal"||e==="vertical")return e},jE=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},n6=()=>{var e=Ka();return e!==void 0},Rl=e=>{var t=Et(),r=Ir(),{width:n,height:o}=e,h=I_(),g=n,a=o;return h&&(g=h.width>0?h.width:n,a=h.height>0?h.height:o),z.useEffect(()=>{!r&&Zn(g)&&Zn(a)&&t(nP({width:g,height:a}))},[t,r,g,a]),null},IE=Symbol.for("immer-nothing"),zw=Symbol.for("immer-draftable"),Br=Symbol.for("immer-state");function hi(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var _l=Object.getPrototypeOf;function Na(e){return!!e&&!!e[Br]}function Ps(e){var t;return e?NE(e)||Array.isArray(e)||!!e[zw]||!!((t=e.constructor)!=null&&t[zw])||kl(e)||Fh(e):!1}var s6=Object.prototype.constructor.toString(),Hw=new WeakMap;function NE(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=Hw.get(r);return n===void 0&&(n=Function.toString.call(r),Hw.set(r,n)),n===s6}function Gu(e,t,r=!0){Uh(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((n,o)=>t(o,n,e))}function Uh(e){const t=e[Br];return t?t.type_:Array.isArray(e)?1:kl(e)?2:Fh(e)?3:0}function Ig(e,t){return Uh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function zE(e,t,r){const n=Uh(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function a6(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function kl(e){return e instanceof Map}function Fh(e){return e instanceof Set}function Ss(e){return e.copy_||e.base_}function Ng(e,t){if(kl(e))return new Map(e);if(Fh(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=NE(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[Br];let o=Reflect.ownKeys(n);for(let h=0;h<o.length;h++){const g=o[h],a=n[g];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(n[g]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[g]})}return Object.create(_l(e),n)}else{const n=_l(e);if(n!==null&&r)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function z_(e,t=!1){return qh(e)||Na(e)||!Ps(e)||(Uh(e)>1&&Object.defineProperties(e,{set:hu,add:hu,clear:hu,delete:hu}),Object.freeze(e),t&&Object.values(e).forEach(r=>z_(r,!0))),e}function o6(){hi(2)}var hu={value:o6};function qh(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var l6={};function Bs(e){const t=l6[e];return t||hi(0,e),t}var ml;function HE(){return ml}function c6(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function $w(e,t){t&&(Bs("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function zg(e){Hg(e),e.drafts_.forEach(u6),e.drafts_=null}function Hg(e){e===ml&&(ml=e.parent_)}function Uw(e){return ml=c6(ml,e)}function u6(e){const t=e[Br];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Fw(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[Br].modified_&&(zg(t),hi(4)),Ps(e)&&(e=Ku(t,e),t.parent_||Yu(t,e)),t.patches_&&Bs("Patches").generateReplacementPatches_(r[Br].base_,e,t.patches_,t.inversePatches_)):e=Ku(t,r,[]),zg(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==IE?e:void 0}function Ku(e,t,r){if(qh(t))return t;const n=e.immer_.shouldUseStrictIteration(),o=t[Br];if(!o)return Gu(t,(h,g)=>qw(e,o,t,h,g,r),n),t;if(o.scope_!==e)return t;if(!o.modified_)return Yu(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const h=o.copy_;let g=h,a=!1;o.type_===3&&(g=new Set(h),h.clear(),a=!0),Gu(g,(c,f)=>qw(e,o,h,c,f,r,a),n),Yu(e,h,!1),r&&e.patches_&&Bs("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function qw(e,t,r,n,o,h,g){if(o==null||typeof o!="object"&&!g)return;const a=qh(o);if(!(a&&!g)){if(Na(o)){const c=h&&t&&t.type_!==3&&!Ig(t.assigned_,n)?h.concat(n):void 0,f=Ku(e,o,c);if(zE(r,n,f),Na(f))e.canAutoFreeze_=!1;else return}else g&&r.add(o);if(Ps(o)&&!a){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===o&&a)return;Ku(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(kl(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Yu(e,o)}}}function Yu(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&z_(t,r)}function h6(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:HE(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,h=H_;r&&(o=[n],h=yl);const{revoke:g,proxy:a}=Proxy.revocable(o,h);return n.draft_=a,n.revoke_=g,a}var H_={get(e,t){if(t===Br)return e;const r=Ss(e);if(!Ig(r,t))return f6(e,r,t);const n=r[t];return e.finalized_||!Ps(n)?n:n===Up(e.base_,t)?(Fp(e),e.copy_[t]=Ug(n,e)):n},has(e,t){return t in Ss(e)},ownKeys(e){return Reflect.ownKeys(Ss(e))},set(e,t,r){const n=$E(Ss(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=Up(Ss(e),t),h=o==null?void 0:o[Br];if(h&&h.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(a6(r,o)&&(r!==void 0||Ig(e.base_,t)))return!0;Fp(e),$g(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Up(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Fp(e),$g(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Ss(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){hi(11)},getPrototypeOf(e){return _l(e.base_)},setPrototypeOf(){hi(12)}},yl={};Gu(H_,(e,t)=>{yl[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});yl.deleteProperty=function(e,t){return yl.set.call(this,e,t,void 0)};yl.set=function(e,t,r){return H_.set.call(this,e[0],t,r,e[0])};function Up(e,t){const r=e[Br];return(r?Ss(r):e)[t]}function f6(e,t,r){var o;const n=$E(t,r);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function $E(e,t){if(!(t in e))return;let r=_l(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=_l(r)}}function $g(e){e.modified_||(e.modified_=!0,e.parent_&&$g(e.parent_))}function Fp(e){e.copy_||(e.copy_=Ng(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var d6=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const h=r;r=t;const g=this;return function(c=h,...f){return g.produce(c,v=>r.call(this,v,...f))}}typeof r!="function"&&hi(6),n!==void 0&&typeof n!="function"&&hi(7);let o;if(Ps(t)){const h=Uw(this),g=Ug(t,void 0);let a=!0;try{o=r(g),a=!1}finally{a?zg(h):Hg(h)}return $w(h,n),Fw(o,h)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===IE&&(o=void 0),this.autoFreeze_&&z_(o,!0),n){const h=[],g=[];Bs("Patches").generateReplacementPatches_(t,o,h,g),n(h,g)}return o}else hi(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(g,...a)=>this.produceWithPatches(g,c=>t(c,...a));let n,o;return[this.produce(t,r,(g,a)=>{n=g,o=a}),n,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Ps(e)||hi(8),Na(e)&&(e=v6(e));const t=Uw(this),r=Ug(e,void 0);return r[Br].isManual_=!0,Hg(t),r}finishDraft(e,t){const r=e&&e[Br];(!r||!r.isManual_)&&hi(9);const{scope_:n}=r;return $w(n,t),Fw(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));const n=Bs("Patches").applyPatches_;return Na(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Ug(e,t){const r=kl(e)?Bs("MapSet").proxyMap_(e,t):Fh(e)?Bs("MapSet").proxySet_(e,t):h6(e,t);return(t?t.scope_:HE()).drafts_.push(r),r}function v6(e){return Na(e)||hi(10,e),UE(e)}function UE(e){if(!Ps(e)||qh(e))return e;const t=e[Br];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Ng(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Ng(e,!0);return Gu(r,(o,h)=>{zE(r,o,UE(h))},n),t&&(t.finalized_=!1),r}var p6=new d6;p6.produce;var g6={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},FE=Cr({name:"legend",initialState:g6,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:pt()},replaceLegendPayload:{reducer(e,t){var{prev:r,next:n}=t.payload,o=di(e).payload.indexOf(r);o>-1&&(e.payload[o]=n)},prepare:pt()},removeLegendPayload:{reducer(e,t){var r=di(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:pt()}}}),{setLegendSize:Nq,setLegendSettings:zq,addLegendPayload:_6,replaceLegendPayload:m6,removeLegendPayload:y6}=FE.actions,b6=FE.reducer;function Fg(){return Fg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fg.apply(null,arguments)}function Ww(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Jo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ww(Object(r),!0).forEach(function(n){S6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ww(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function S6(e,t,r){return(t=w6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w6(e){var t=C6(e,"string");return typeof t=="symbol"?t:t+""}function C6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function x6(e){return Array.isArray(e)&&Di(e[0])&&Di(e[1])?e.join(" ~ "):e}var Ma={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1},E6=e=>{var{separator:t=Ma.separator,contentStyle:r,itemStyle:n,labelStyle:o=Ma.labelStyle,payload:h,formatter:g,itemSorter:a,wrapperClassName:c,labelClassName:f,label:v,labelFormatter:u,accessibilityLayer:m=Ma.accessibilityLayer}=e,w=()=>{if(h&&h.length){var L={padding:0,margin:0},x=(a?Mh(h,a):h).map((O,M)=>{if(O.type==="none")return null;var D=O.formatter||g||x6,{value:k,name:B}=O,R=k,P=B;if(D){var H=D(k,B,O,M,h);if(Array.isArray(H))[R,P]=H;else if(H!=null)R=H;else return null}var X=Jo(Jo({},Ma.itemStyle),{},{color:O.color||Ma.itemStyle.color},n);return z.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(M),style:X},Di(P)?z.createElement("span",{className:"recharts-tooltip-item-name"},P):null,Di(P)?z.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,z.createElement("span",{className:"recharts-tooltip-item-value"},R),z.createElement("span",{className:"recharts-tooltip-item-unit"},O.unit||""))});return z.createElement("ul",{className:"recharts-tooltip-item-list",style:L},x)}return null},C=Jo(Jo({},Ma.contentStyle),r),_=Jo({margin:0},o),d=!qt(v),y=d?v:"",b=dt("recharts-default-tooltip",c),S=dt("recharts-tooltip-label",f);d&&u&&h!==void 0&&h!==null&&(y=u(v,h));var E=m?{role:"status","aria-live":"assertive"}:{};return z.createElement("div",Fg({className:b,style:C},E),z.createElement("p",{className:S,style:_},z.isValidElement(y)?y:"".concat(y)),w())},el="recharts-tooltip-wrapper",A6={visibility:"hidden"};function M6(e){var{coordinate:t,translateX:r,translateY:n}=e;return dt(el,{["".concat(el,"-right")]:Oe(r)&&t&&Oe(t.x)&&r>=t.x,["".concat(el,"-left")]:Oe(r)&&t&&Oe(t.x)&&r<t.x,["".concat(el,"-bottom")]:Oe(n)&&t&&Oe(t.y)&&n>=t.y,["".concat(el,"-top")]:Oe(n)&&t&&Oe(t.y)&&n<t.y})}function Gw(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offset:o,position:h,reverseDirection:g,tooltipDimension:a,viewBox:c,viewBoxDimension:f}=e;if(h&&Oe(h[n]))return h[n];var v=r[n]-a-(o>0?o:0),u=r[n]+o;if(t[n])return g[n]?v:u;var m=c[n];if(m==null)return 0;if(g[n]){var w=v,C=m;return w<C?Math.max(u,m):Math.max(v,m)}if(f==null)return 0;var _=u+a,d=m+f;return _>d?Math.max(v,m):Math.max(u,m)}function L6(e){var{translateX:t,translateY:r,useTranslate3d:n}=e;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function O6(e){var{allowEscapeViewBox:t,coordinate:r,offsetTop:n,offsetLeft:o,position:h,reverseDirection:g,tooltipBox:a,useTranslate3d:c,viewBox:f}=e,v,u,m;return a.height>0&&a.width>0&&r?(u=Gw({allowEscapeViewBox:t,coordinate:r,key:"x",offset:o,position:h,reverseDirection:g,tooltipDimension:a.width,viewBox:f,viewBoxDimension:f.width}),m=Gw({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:h,reverseDirection:g,tooltipDimension:a.height,viewBox:f,viewBoxDimension:f.height}),v=L6({translateX:u,translateY:m,useTranslate3d:c})):v=A6,{cssProperties:v,cssClasses:M6({translateX:u,translateY:m,coordinate:r})}}function Kw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function fu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kw(Object(r),!0).forEach(function(n){qg(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qg(e,t,r){return(t=T6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T6(e){var t=D6(e,"string");return typeof t=="symbol"?t:t+""}function D6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class R6 extends z.PureComponent{constructor(){super(...arguments),qg(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),qg(this,"handleKeyDown",t=>{if(t.key==="Escape"){var r,n,o,h;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(r=(n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==null&&r!==void 0?r:0,y:(o=(h=this.props.coordinate)===null||h===void 0?void 0:h.y)!==null&&o!==void 0?o:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var t,r;this.state.dismissed&&(((t=this.props.coordinate)===null||t===void 0?void 0:t.x)!==this.state.dismissedAtCoordinate.x||((r=this.props.coordinate)===null||r===void 0?void 0:r.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:t,allowEscapeViewBox:r,animationDuration:n,animationEasing:o,children:h,coordinate:g,hasPayload:a,isAnimationActive:c,offset:f,position:v,reverseDirection:u,useTranslate3d:m,viewBox:w,wrapperStyle:C,lastBoundingBox:_,innerRef:d,hasPortalFromProps:y}=this.props,b=typeof f=="number"?f:f.x,S=typeof f=="number"?f:f.y,{cssClasses:E,cssProperties:L}=O6({allowEscapeViewBox:r,coordinate:g,offsetLeft:b,offsetTop:S,position:v,reverseDirection:u,tooltipBox:{height:_.height,width:_.width},useTranslate3d:m,viewBox:w}),x=y?{}:fu(fu({transition:c&&t?"transform ".concat(n,"ms ").concat(o):void 0},L),{},{pointerEvents:"none",visibility:!this.state.dismissed&&t&&a?"visible":"hidden",position:"absolute",top:0,left:0}),O=fu(fu({},x),{},{visibility:!this.state.dismissed&&t&&a?"visible":"hidden"},C);return z.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:E,style:O,ref:d},h)}}var qE=()=>{var e;return(e=Re(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function Wg(){return Wg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wg.apply(null,arguments)}function Yw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Vw(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yw(Object(r),!0).forEach(function(n){k6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function k6(e,t,r){return(t=P6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function P6(e){var t=B6(e,"string");return typeof t=="symbol"?t:t+""}function B6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Xw={curveBasisClosed:L3,curveBasisOpen:O3,curveBasis:M3,curveBumpX:d3,curveBumpY:v3,curveLinearClosed:T3,curveLinear:Eh,curveMonotoneX:D3,curveMonotoneY:R3,curveNatural:k3,curveStep:P3,curveStepAfter:j3,curveStepBefore:B3},Vu=e=>Ze(e.x)&&Ze(e.y),Zw=e=>e.base!=null&&Vu(e.base)&&Vu(e),tl=e=>e.x,rl=e=>e.y,j6=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(Ll(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=Xw["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return Xw[r]||Eh},Qw={connectNulls:!1,type:"linear"},I6=e=>{var{type:t=Qw.type,points:r=[],baseLine:n,layout:o,connectNulls:h=Qw.connectNulls}=e,g=j6(t,o),a=h?r.filter(Vu):r;if(Array.isArray(n)){var c,f=r.map((C,_)=>Vw(Vw({},C),{},{base:n[_]}));o==="vertical"?c=nu().y(rl).x1(tl).x0(C=>C.base.x):c=nu().x(tl).y1(rl).y0(C=>C.base.y);var v=c.defined(Zw).curve(g),u=h?f.filter(Zw):f;return v(u)}var m;o==="vertical"&&Oe(n)?m=nu().y(rl).x1(tl).x0(n):Oe(n)?m=nu().x(tl).y1(rl).y0(n):m=A2().x(tl).y(rl);var w=m.defined(Vu).curve(g);return w(a)},WE=e=>{var{className:t,points:r,path:n,pathRef:o}=e,h=Ka();if((!r||!r.length)&&!n)return null;var g={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||h,connectNulls:e.connectNulls},a=r&&r.length?I6(g):n;return z.createElement("path",Wg({},Xn(e),ak(e),{className:dt("recharts-curve",t),d:a===null?void 0:a,ref:o}))},N6=["x","y","top","left","width","height","className"];function Gg(){return Gg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gg.apply(null,arguments)}function Jw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function z6(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jw(Object(r),!0).forEach(function(n){H6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function H6(e,t,r){return(t=$6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $6(e){var t=U6(e,"string");return typeof t=="symbol"?t:t+""}function U6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function F6(e,t){if(e==null)return{};var r,n,o=q6(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(n=0;n<h.length;n++)r=h[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function q6(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var W6=(e,t,r,n,o,h)=>"M".concat(e,",").concat(o,"v").concat(n,"M").concat(h,",").concat(t,"h").concat(r),G6=e=>{var{x:t=0,y:r=0,top:n=0,left:o=0,width:h=0,height:g=0,className:a}=e,c=F6(e,N6),f=z6({x:t,y:r,top:n,left:o,width:h,height:g},c);return!Oe(t)||!Oe(r)||!Oe(h)||!Oe(g)||!Oe(n)||!Oe(o)?null:z.createElement("path",Gg({},Jr(f),{className:dt("recharts-cross",a),d:W6(t,r,h,g,n,o)}))};function K6(e,t,r,n){var o=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-o:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-o,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function eC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function tC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eC(Object(r),!0).forEach(function(n){Y6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Y6(e,t,r){return(t=V6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function V6(e){var t=X6(e,"string");return typeof t=="symbol"?t:t+""}function X6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Z6=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),GE=(e,t,r)=>e.map(n=>"".concat(Z6(n)," ").concat(t,"ms ").concat(r)).join(","),Q6=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((r,n)=>r.filter(o=>n.includes(o))),bl=(e,t)=>Object.keys(t).reduce((r,n)=>tC(tC({},r),{},{[n]:e(n,t[n])}),{});function rC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Pt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rC(Object(r),!0).forEach(function(n){J6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function J6(e,t,r){return(t=eB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eB(e){var t=tB(e,"string");return typeof t=="symbol"?t:t+""}function tB(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Xu=(e,t,r)=>e+(t-e)*r,Kg=e=>{var{from:t,to:r}=e;return t!==r},KE=(e,t,r)=>{var n=bl((o,h)=>{if(Kg(h)){var[g,a]=e(h.from,h.to,h.velocity);return Pt(Pt({},h),{},{from:g,velocity:a})}return h},t);return r<1?bl((o,h)=>Kg(h)&&n[o]!=null?Pt(Pt({},h),{},{velocity:Xu(h.velocity,n[o].velocity,r),from:Xu(h.from,n[o].from,r)}):h,t):KE(e,n,r-1)};function rB(e,t,r,n,o,h){var g,a=n.reduce((m,w)=>Pt(Pt({},m),{},{[w]:{from:e[w],velocity:0,to:t[w]}}),{}),c=()=>bl((m,w)=>w.from,a),f=()=>!Object.values(a).filter(Kg).length,v=null,u=m=>{g||(g=m);var w=m-g,C=w/r.dt;a=KE(r,a,C),o(Pt(Pt(Pt({},e),t),c())),g=m,f()||(v=h.setTimeout(u))};return()=>(v=h.setTimeout(u),()=>{var m;(m=v)===null||m===void 0||m()})}function iB(e,t,r,n,o,h,g){var a=null,c=o.reduce((u,m)=>{var w=e[m],C=t[m];return w==null||C==null?u:Pt(Pt({},u),{},{[m]:[w,C]})},{}),f,v=u=>{f||(f=u);var m=(u-f)/n,w=bl((_,d)=>Xu(...d,r(m)),c);if(h(Pt(Pt(Pt({},e),t),w)),m<1)a=g.setTimeout(v);else{var C=bl((_,d)=>Xu(...d,r(1)),c);h(Pt(Pt(Pt({},e),t),C))}};return()=>(a=g.setTimeout(v),()=>{var u;(u=a)===null||u===void 0||u()})}const nB=(e,t,r,n,o,h)=>{var g=Q6(e,t);return r==null?()=>(o(Pt(Pt({},e),t)),()=>{}):r.isStepper===!0?rB(e,t,r,g,o,h):iB(e,t,r,n,g,o,h)};var Zu=1e-4,YE=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],VE=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),iC=(e,t)=>r=>{var n=YE(e,t);return VE(n,r)},sB=(e,t)=>r=>{var n=YE(e,t),o=[...n.map((h,g)=>h*g).slice(1),0];return VE(o,r)},aB=e=>{var t,r=e.split("(");if(r.length!==2||r[0]!=="cubic-bezier")return null;var n=(t=r[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(n==null||n.length!==4)return null;var o=n.map(h=>parseFloat(h));return[o[0],o[1],o[2],o[3]]},oB=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(r.length===1)switch(r[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var o=aB(r[0]);if(o)return o}}return r.length===4?r:[0,0,1,1]},lB=(e,t,r,n)=>{var o=iC(e,r),h=iC(t,n),g=sB(e,r),a=f=>f>1?1:f<0?0:f,c=f=>{for(var v=f>1?1:f,u=v,m=0;m<8;++m){var w=o(u)-v,C=g(u);if(Math.abs(w-v)<Zu||C<Zu)return h(u);u=a(u-w/C)}return h(u)};return c.isStepper=!1,c},nC=function(){return lB(...oB(...arguments))},cB=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:r=100,damping:n=8,dt:o=17}=t,h=(g,a,c)=>{var f=-(g-a)*r,v=c*n,u=c+(f-v)*o/1e3,m=c*o/1e3+g;return Math.abs(m-a)<Zu&&Math.abs(u)<Zu?[a,0]:[m,u]};return h.isStepper=!0,h.dt=o,h},uB=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return nC(e);case"spring":return cB();default:if(e.split("(")[0]==="cubic-bezier")return nC(e)}return typeof e=="function"?e:null};function hB(e){var t,r=()=>null,n=!1,o=null,h=g=>{if(!n){if(Array.isArray(g)){if(!g.length)return;var a=g,[c,...f]=a;if(typeof c=="number"){o=e.setTimeout(h.bind(null,f),c);return}h(c),o=e.setTimeout(h.bind(null,f));return}typeof g=="string"&&(t=g,r(t)),typeof g=="object"&&(t=g,r(t)),typeof g=="function"&&g()}};return{stop:()=>{n=!0},start:g=>{n=!1,o&&(o(),o=null),h(g)},subscribe:g=>(r=g,()=>{r=()=>null}),getTimeoutController:()=>e}}class fB{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),o=null,h=g=>{g-n>=r?t(g):typeof requestAnimationFrame=="function"&&(o=requestAnimationFrame(h))};return o=requestAnimationFrame(h),()=>{o!=null&&cancelAnimationFrame(o)}}}function dB(){return hB(new fB)}var vB=z.createContext(dB);function pB(e,t){var r=z.useContext(vB);return z.useMemo(()=>t??r(e),[e,t,r])}var gB=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Wh={isSsr:gB()},_B={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},sC={t:0},qp={t:1};function $_(e){var t=ii(e,_B),{isActive:r,canBegin:n,duration:o,easing:h,begin:g,onAnimationEnd:a,onAnimationStart:c,children:f}=t,v=r==="auto"?!Wh.isSsr:r,u=pB(t.animationId,t.animationManager),[m,w]=z.useState(v?sC:qp),C=z.useRef(null);return z.useEffect(()=>{v||w(qp)},[v]),z.useEffect(()=>{if(!v||!n)return Ga;var _=nB(sC,qp,uB(h),o,w,u.getTimeoutController()),d=()=>{C.current=_()};return u.start([c,g,d,o,a]),()=>{u.stop(),C.current&&C.current(),a()}},[v,n,o,h,g,c,a,u]),f(m.t)}function U_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=z.useRef(dl(t)),n=z.useRef(e);return n.current!==e&&(r.current=dl(t),n.current=e),r.current}var mB=["radius"],yB=["radius"],aC,oC,lC,cC,uC,hC,fC,dC,vC,pC;function gC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function _C(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gC(Object(r),!0).forEach(function(n){bB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bB(e,t,r){return(t=SB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SB(e){var t=wB(e,"string");return typeof t=="symbol"?t:t+""}function wB(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qu(){return Qu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qu.apply(null,arguments)}function mC(e,t){if(e==null)return{};var r,n,o=CB(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(n=0;n<h.length;n++)r=h[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function CB(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Ci(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var yC=(e,t,r,n,o)=>{var h=Kn(r),g=Kn(n),a=Math.min(Math.abs(h)/2,Math.abs(g)/2),c=g>=0?1:-1,f=h>=0?1:-1,v=g>=0&&h>=0||g<0&&h<0?1:0,u;if(a>0&&Array.isArray(o)){for(var m=[0,0,0,0],w=0,C=4;w<C;w++){var _,d=(_=o[w])!==null&&_!==void 0?_:0;m[w]=d>a?a:d}u=wt(aC||(aC=Ci(["M",",",""])),e,t+c*m[0]),m[0]>0&&(u+=wt(oC||(oC=Ci(["A ",",",",0,0,",",",",",""])),m[0],m[0],v,e+f*m[0],t)),u+=wt(lC||(lC=Ci(["L ",",",""])),e+r-f*m[1],t),m[1]>0&&(u+=wt(cC||(cC=Ci(["A ",",",",0,0,",`,
|
|
150
|
-
`,",",""])),m[1],m[1],v,e+r,t+c*m[1])),u+=wt(uC||(uC=Ci(["L ",",",""])),e+r,t+n-c*m[2]),m[2]>0&&(u+=wt(hC||(hC=Ci(["A ",",",",0,0,",`,
|
|
151
|
-
`,",",""])),m[2],m[2],v,e+r-f*m[2],t+n)),u+=wt(fC||(fC=Ci(["L ",",",""])),e+f*m[3],t+n),m[3]>0&&(u+=wt(dC||(dC=Ci(["A ",",",",0,0,",`,
|
|
152
|
-
`,",",""])),m[3],m[3],v,e,t+n-c*m[3])),u+="Z"}else if(a>0&&o===+o&&o>0){var y=Math.min(a,o);u=wt(vC||(vC=Ci(["M ",",",`
|
|
153
|
-
A `,",",",0,0,",",",",",`
|
|
154
|
-
L `,",",`
|
|
155
|
-
A `,",",",0,0,",",",",",`
|
|
156
|
-
L `,",",`
|
|
157
|
-
A `,",",",0,0,",",",",",`
|
|
158
|
-
L `,",",`
|
|
159
|
-
A `,",",",0,0,",",",","," Z"])),e,t+c*y,y,y,v,e+f*y,t,e+r-f*y,t,y,y,v,e+r,t+c*y,e+r,t+n-c*y,y,y,v,e+r-f*y,t+n,e+f*y,t+n,y,y,v,e,t+n-c*y)}else u=wt(pC||(pC=Ci(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return u},bC={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},XE=e=>{var t=ii(e,bC),r=z.useRef(null),[n,o]=z.useState(-1);z.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var K=r.current.getTotalLength();K&&o(K)}catch{}},[]);var{x:h,y:g,width:a,height:c,radius:f,className:v}=t,{animationEasing:u,animationDuration:m,animationBegin:w,isAnimationActive:C,isUpdateAnimationActive:_}=t,d=z.useRef(a),y=z.useRef(c),b=z.useRef(h),S=z.useRef(g),E=z.useMemo(()=>({x:h,y:g,width:a,height:c,radius:f}),[h,g,a,c,f]),L=U_(E,"rectangle-");if(h!==+h||g!==+g||a!==+a||c!==+c||a===0||c===0)return null;var x=dt("recharts-rectangle",v);if(!_){var O=Jr(t),{radius:M}=O,D=mC(O,mB);return z.createElement("path",Qu({},D,{x:Kn(h),y:Kn(g),width:Kn(a),height:Kn(c),radius:typeof f=="number"?f:void 0,className:x,d:yC(h,g,a,c,f)}))}var k=d.current,B=y.current,R=b.current,P=S.current,H="0px ".concat(n===-1?1:n,"px"),X="".concat(n,"px 0px"),F=GE(["strokeDasharray"],m,typeof u=="string"?u:bC.animationEasing);return z.createElement($_,{animationId:L,key:L,canBegin:n>0,duration:m,easing:u,isActive:_,begin:w},K=>{var Y=ir(k,a,K),j=ir(B,c,K),$=ir(R,h,K),N=ir(P,g,K);r.current&&(d.current=Y,y.current=j,b.current=$,S.current=N);var U;C?K>0?U={transition:F,strokeDasharray:X}:U={strokeDasharray:H}:U={strokeDasharray:X};var J=Jr(t),{radius:te}=J,fe=mC(J,yB);return z.createElement("path",Qu({},fe,{radius:typeof f=="number"?f:void 0,className:x,d:yC($,N,Y,j,f),ref:r,style:_C(_C({},U),t.style)}))})};function SC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function wC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?SC(Object(r),!0).forEach(function(n){xB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xB(e,t,r){return(t=EB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EB(e){var t=AB(e,"string");return typeof t=="symbol"?t:t+""}function AB(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ju=Math.PI/180,MB=e=>e*180/Math.PI,nr=(e,t,r,n)=>({x:e+Math.cos(-Ju*n)*r,y:t+Math.sin(-Ju*n)*r}),LB=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},OB=(e,t)=>{var{x:r,y:n}=e,{x:o,y:h}=t;return Math.sqrt((r-o)**2+(n-h)**2)},TB=(e,t)=>{var{x:r,y:n}=e,{cx:o,cy:h}=t,g=OB({x:r,y:n},{x:o,y:h});if(g<=0)return{radius:g,angle:0};var a=(r-o)/g,c=Math.acos(a);return n>h&&(c=2*Math.PI-c),{radius:g,angle:MB(c),angleInRadian:c}},DB=e=>{var{startAngle:t,endAngle:r}=e,n=Math.floor(t/360),o=Math.floor(r/360),h=Math.min(n,o);return{startAngle:t-h*360,endAngle:r-h*360}},RB=(e,t)=>{var{startAngle:r,endAngle:n}=t,o=Math.floor(r/360),h=Math.floor(n/360),g=Math.min(o,h);return e+g*360},kB=(e,t)=>{var{chartX:r,chartY:n}=e,{radius:o,angle:h}=TB({x:r,y:n},t),{innerRadius:g,outerRadius:a}=t;if(o<g||o>a||o===0)return null;var{startAngle:c,endAngle:f}=DB(t),v=h,u;if(c<=f){for(;v>f;)v-=360;for(;v<c;)v+=360;u=v>=c&&v<=f}else{for(;v>c;)v-=360;for(;v<f;)v+=360;u=v>=f&&v<=c}return u?wC(wC({},t),{},{radius:o,angle:RB(v,t)}):null};function ZE(e){var{cx:t,cy:r,radius:n,startAngle:o,endAngle:h}=e,g=nr(t,r,n,o),a=nr(t,r,n,h);return{points:[g,a],cx:t,cy:r,radius:n,startAngle:o,endAngle:h}}var CC,xC,EC,AC,MC,LC,OC;function Yg(){return Yg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yg.apply(null,arguments)}function xs(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var PB=(e,t)=>{var r=Rr(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},du=e=>{var{cx:t,cy:r,radius:n,angle:o,sign:h,isExternal:g,cornerRadius:a,cornerIsExternal:c}=e,f=a*(g?1:-1)+n,v=Math.asin(a/f)/Ju,u=c?o:o+h*v,m=nr(t,r,f,u),w=nr(t,r,n,u),C=c?o-h*v:o,_=nr(t,r,f*Math.cos(v*Ju),C);return{center:m,circleTangency:w,lineTangency:_,theta:v}},QE=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:o,startAngle:h,endAngle:g}=e,a=PB(h,g),c=h+a,f=nr(t,r,o,h),v=nr(t,r,o,c),u=wt(CC||(CC=xs(["M ",",",`
|
|
160
|
-
A `,",",`,0,
|
|
161
|
-
`,",",`,
|
|
162
|
-
`,",",`
|
|
163
|
-
`])),f.x,f.y,o,o,+(Math.abs(a)>180),+(h>c),v.x,v.y);if(n>0){var m=nr(t,r,n,h),w=nr(t,r,n,c);u+=wt(xC||(xC=xs(["L ",",",`
|
|
164
|
-
A `,",",`,0,
|
|
165
|
-
`,",",`,
|
|
166
|
-
`,","," Z"])),w.x,w.y,n,n,+(Math.abs(a)>180),+(h<=c),m.x,m.y)}else u+=wt(EC||(EC=xs(["L ",","," Z"])),t,r);return u},BB=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:o,cornerRadius:h,forceCornerRadius:g,cornerIsExternal:a,startAngle:c,endAngle:f}=e,v=Rr(f-c),{circleTangency:u,lineTangency:m,theta:w}=du({cx:t,cy:r,radius:o,angle:c,sign:v,cornerRadius:h,cornerIsExternal:a}),{circleTangency:C,lineTangency:_,theta:d}=du({cx:t,cy:r,radius:o,angle:f,sign:-v,cornerRadius:h,cornerIsExternal:a}),y=a?Math.abs(c-f):Math.abs(c-f)-w-d;if(y<0)return g?wt(AC||(AC=xs(["M ",",",`
|
|
167
|
-
a`,",",",0,0,1,",`,0
|
|
168
|
-
a`,",",",0,0,1,",`,0
|
|
169
|
-
`])),m.x,m.y,h,h,h*2,h,h,-h*2):QE({cx:t,cy:r,innerRadius:n,outerRadius:o,startAngle:c,endAngle:f});var b=wt(MC||(MC=xs(["M ",",",`
|
|
170
|
-
A`,",",",0,0,",",",",",`
|
|
171
|
-
A`,",",",0,",",",",",",",`
|
|
172
|
-
A`,",",",0,0,",",",",",`
|
|
173
|
-
`])),m.x,m.y,h,h,+(v<0),u.x,u.y,o,o,+(y>180),+(v<0),C.x,C.y,h,h,+(v<0),_.x,_.y);if(n>0){var{circleTangency:S,lineTangency:E,theta:L}=du({cx:t,cy:r,radius:n,angle:c,sign:v,isExternal:!0,cornerRadius:h,cornerIsExternal:a}),{circleTangency:x,lineTangency:O,theta:M}=du({cx:t,cy:r,radius:n,angle:f,sign:-v,isExternal:!0,cornerRadius:h,cornerIsExternal:a}),D=a?Math.abs(c-f):Math.abs(c-f)-L-M;if(D<0&&h===0)return"".concat(b,"L").concat(t,",").concat(r,"Z");b+=wt(LC||(LC=xs(["L",",",`
|
|
174
|
-
A`,",",",0,0,",",",",",`
|
|
175
|
-
A`,",",",0,",",",",",",",`
|
|
176
|
-
A`,",",",0,0,",",",",","Z"])),O.x,O.y,h,h,+(v<0),x.x,x.y,n,n,+(D>180),+(v>0),S.x,S.y,h,h,+(v<0),E.x,E.y)}else b+=wt(OC||(OC=xs(["L",",","Z"])),t,r);return b},jB={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},JE=e=>{var t=ii(e,jB),{cx:r,cy:n,innerRadius:o,outerRadius:h,cornerRadius:g,forceCornerRadius:a,cornerIsExternal:c,startAngle:f,endAngle:v,className:u}=t;if(h<o||f===v)return null;var m=dt("recharts-sector",u),w=h-o,C=vi(g,w,0,!0),_;return C>0&&Math.abs(f-v)<360?_=BB({cx:r,cy:n,innerRadius:o,outerRadius:h,cornerRadius:Math.min(C,w/2),forceCornerRadius:a,cornerIsExternal:c,startAngle:f,endAngle:v}):_=QE({cx:r,cy:n,innerRadius:o,outerRadius:h,startAngle:f,endAngle:v}),z.createElement("path",Yg({},Jr(t),{className:m,d:_}))};function IB(e,t,r){if(e==="horizontal")return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if(e==="vertical")return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if($2(t)){if(e==="centric"){var{cx:n,cy:o,innerRadius:h,outerRadius:g,angle:a}=t,c=nr(n,o,h,a),f=nr(n,o,g,a);return[{x:c.x,y:c.y},{x:f.x,y:f.y}]}return ZE(t)}}var Wp={},Gp={},Kp={},TC;function NB(){return TC||(TC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Z2();function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(Kp)),Kp}var DC;function zB(){return DC||(DC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=NB();function r(n){return n?(n=t.toNumber(n),n===1/0||n===-1/0?(n<0?-1:1)*Number.MAX_VALUE:n===n?n:0):n===0?n:0}e.toFinite=r})(Gp)),Gp}var RC;function HB(){return RC||(RC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Q2(),r=zB();function n(o,h,g){g&&typeof g!="number"&&t.isIterateeCall(o,h,g)&&(h=g=void 0),o=r.toFinite(o),h===void 0?(h=o,o=0):h=r.toFinite(h),g=g===void 0?o<h?1:-1:r.toFinite(g);const a=Math.max(Math.ceil((h-o)/(g||1)),0),c=new Array(a);for(let f=0;f<a;f++)c[f]=o,o+=g;return c}e.range=n})(Wp)),Wp}var Yp,kC;function $B(){return kC||(kC=1,Yp=HB().range),Yp}var UB=$B();const eA=fn(UB);function Yn(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function FB(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function F_(e){let t,r,n;e.length!==2?(t=Yn,r=(a,c)=>Yn(e(a),c),n=(a,c)=>e(a)-c):(t=e===Yn||e===FB?e:qB,r=e,n=e);function o(a,c,f=0,v=a.length){if(f<v){if(t(c,c)!==0)return v;do{const u=f+v>>>1;r(a[u],c)<0?f=u+1:v=u}while(f<v)}return f}function h(a,c,f=0,v=a.length){if(f<v){if(t(c,c)!==0)return v;do{const u=f+v>>>1;r(a[u],c)<=0?f=u+1:v=u}while(f<v)}return f}function g(a,c,f=0,v=a.length){const u=o(a,c,f,v-1);return u>f&&n(a[u-1],c)>-n(a[u],c)?u-1:u}return{left:o,center:g,right:h}}function qB(){return 0}function tA(e){return e===null?NaN:+e}function*WB(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const GB=F_(Yn),Pl=GB.right;F_(tA).center;class PC extends Map{constructor(t,r=VB){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,o]of t)this.set(n,o)}get(t){return super.get(BC(this,t))}has(t){return super.has(BC(this,t))}set(t,r){return super.set(KB(this,t),r)}delete(t){return super.delete(YB(this,t))}}function BC({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function KB({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function YB({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function VB(e){return e!==null&&typeof e=="object"?e.valueOf():e}function XB(e=Yn){if(e===Yn)return rA;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function rA(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const ZB=Math.sqrt(50),QB=Math.sqrt(10),JB=Math.sqrt(2);function eh(e,t,r){const n=(t-e)/Math.max(0,r),o=Math.floor(Math.log10(n)),h=n/Math.pow(10,o),g=h>=ZB?10:h>=QB?5:h>=JB?2:1;let a,c,f;return o<0?(f=Math.pow(10,-o)/g,a=Math.round(e*f),c=Math.round(t*f),a/f<e&&++a,c/f>t&&--c,f=-f):(f=Math.pow(10,o)*g,a=Math.round(e/f),c=Math.round(t/f),a*f<e&&++a,c*f>t&&--c),c<a&&.5<=r&&r<2?eh(e,t,r*2):[a,c,f]}function Vg(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[o,h,g]=n?eh(t,e,r):eh(e,t,r);if(!(h>=o))return[];const a=h-o+1,c=new Array(a);if(n)if(g<0)for(let f=0;f<a;++f)c[f]=(h-f)/-g;else for(let f=0;f<a;++f)c[f]=(h-f)*g;else if(g<0)for(let f=0;f<a;++f)c[f]=(o+f)/-g;else for(let f=0;f<a;++f)c[f]=(o+f)*g;return c}function Xg(e,t,r){return t=+t,e=+e,r=+r,eh(e,t,r)[2]}function Zg(e,t,r){t=+t,e=+e,r=+r;const n=t<e,o=n?Xg(t,e,r):Xg(e,t,r);return(n?-1:1)*(o<0?1/-o:o)}function jC(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function IC(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function iA(e,t,r=0,n=1/0,o){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(o=o===void 0?rA:XB(o);n>r;){if(n-r>600){const c=n-r+1,f=t-r+1,v=Math.log(c),u=.5*Math.exp(2*v/3),m=.5*Math.sqrt(v*u*(c-u)/c)*(f-c/2<0?-1:1),w=Math.max(r,Math.floor(t-f*u/c+m)),C=Math.min(n,Math.floor(t+(c-f)*u/c+m));iA(e,t,w,C,o)}const h=e[t];let g=r,a=n;for(il(e,r,t),o(e[n],h)>0&&il(e,r,n);g<a;){for(il(e,g,a),++g,--a;o(e[g],h)<0;)++g;for(;o(e[a],h)>0;)--a}o(e[r],h)===0?il(e,r,a):(++a,il(e,a,n)),a<=t&&(r=a+1),t<=a&&(n=a-1)}return e}function il(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function e8(e,t,r){if(e=Float64Array.from(WB(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return IC(e);if(t>=1)return jC(e);var n,o=(n-1)*t,h=Math.floor(o),g=jC(iA(e,h).subarray(0,h+1)),a=IC(e.subarray(h+1));return g+(a-g)*(o-h)}}function t8(e,t,r=tA){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,o=(n-1)*t,h=Math.floor(o),g=+r(e[h],h,e),a=+r(e[h+1],h+1,e);return g+(a-g)*(o-h)}}function r8(e,t,r){e=+e,t=+t,r=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+r;for(var n=-1,o=Math.max(0,Math.ceil((t-e)/r))|0,h=new Array(o);++n<o;)h[n]=e+n*r;return h}function ni(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function pn(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Qg=Symbol("implicit");function q_(){var e=new PC,t=[],r=[],n=Qg;function o(h){let g=e.get(h);if(g===void 0){if(n!==Qg)return n;e.set(h,g=t.push(h)-1)}return r[g%r.length]}return o.domain=function(h){if(!arguments.length)return t.slice();t=[],e=new PC;for(const g of h)e.has(g)||e.set(g,t.push(g)-1);return o},o.range=function(h){return arguments.length?(r=Array.from(h),o):r.slice()},o.unknown=function(h){return arguments.length?(n=h,o):n},o.copy=function(){return q_(t,r).unknown(n)},ni.apply(o,arguments),o}function W_(){var e=q_().unknown(void 0),t=e.domain,r=e.range,n=0,o=1,h,g,a=!1,c=0,f=0,v=.5;delete e.unknown;function u(){var m=t().length,w=o<n,C=w?o:n,_=w?n:o;h=(_-C)/Math.max(1,m-c+f*2),a&&(h=Math.floor(h)),C+=(_-C-h*(m-c))*v,g=h*(1-c),a&&(C=Math.round(C),g=Math.round(g));var d=r8(m).map(function(y){return C+h*y});return r(w?d.reverse():d)}return e.domain=function(m){return arguments.length?(t(m),u()):t()},e.range=function(m){return arguments.length?([n,o]=m,n=+n,o=+o,u()):[n,o]},e.rangeRound=function(m){return[n,o]=m,n=+n,o=+o,a=!0,u()},e.bandwidth=function(){return g},e.step=function(){return h},e.round=function(m){return arguments.length?(a=!!m,u()):a},e.padding=function(m){return arguments.length?(c=Math.min(1,f=+m),u()):c},e.paddingInner=function(m){return arguments.length?(c=Math.min(1,m),u()):c},e.paddingOuter=function(m){return arguments.length?(f=+m,u()):f},e.align=function(m){return arguments.length?(v=Math.max(0,Math.min(1,m)),u()):v},e.copy=function(){return W_(t(),[n,o]).round(a).paddingInner(c).paddingOuter(f).align(v)},ni.apply(u(),arguments)}function nA(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return nA(t())},e}function i8(){return nA(W_.apply(null,arguments).paddingInner(1))}function G_(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function sA(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Bl(){}var Sl=.7,th=1/Sl,Ba="\\s*([+-]?\\d+)\\s*",wl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Oi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",n8=/^#([0-9a-f]{3,8})$/,s8=new RegExp(`^rgb\\(${Ba},${Ba},${Ba}\\)$`),a8=new RegExp(`^rgb\\(${Oi},${Oi},${Oi}\\)$`),o8=new RegExp(`^rgba\\(${Ba},${Ba},${Ba},${wl}\\)$`),l8=new RegExp(`^rgba\\(${Oi},${Oi},${Oi},${wl}\\)$`),c8=new RegExp(`^hsl\\(${wl},${Oi},${Oi}\\)$`),u8=new RegExp(`^hsla\\(${wl},${Oi},${Oi},${wl}\\)$`),NC={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};G_(Bl,Cl,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:zC,formatHex:zC,formatHex8:h8,formatHsl:f8,formatRgb:HC,toString:HC});function zC(){return this.rgb().formatHex()}function h8(){return this.rgb().formatHex8()}function f8(){return aA(this).formatHsl()}function HC(){return this.rgb().formatRgb()}function Cl(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=n8.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?$C(t):r===3?new Sr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?vu(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?vu(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=s8.exec(e))?new Sr(t[1],t[2],t[3],1):(t=a8.exec(e))?new Sr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=o8.exec(e))?vu(t[1],t[2],t[3],t[4]):(t=l8.exec(e))?vu(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=c8.exec(e))?qC(t[1],t[2]/100,t[3]/100,1):(t=u8.exec(e))?qC(t[1],t[2]/100,t[3]/100,t[4]):NC.hasOwnProperty(e)?$C(NC[e]):e==="transparent"?new Sr(NaN,NaN,NaN,0):null}function $C(e){return new Sr(e>>16&255,e>>8&255,e&255,1)}function vu(e,t,r,n){return n<=0&&(e=t=r=NaN),new Sr(e,t,r,n)}function d8(e){return e instanceof Bl||(e=Cl(e)),e?(e=e.rgb(),new Sr(e.r,e.g,e.b,e.opacity)):new Sr}function Jg(e,t,r,n){return arguments.length===1?d8(e):new Sr(e,t,r,n??1)}function Sr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}G_(Sr,Jg,sA(Bl,{brighter(e){return e=e==null?th:Math.pow(th,e),new Sr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Sl:Math.pow(Sl,e),new Sr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Sr(Ls(this.r),Ls(this.g),Ls(this.b),rh(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:UC,formatHex:UC,formatHex8:v8,formatRgb:FC,toString:FC}));function UC(){return`#${Es(this.r)}${Es(this.g)}${Es(this.b)}`}function v8(){return`#${Es(this.r)}${Es(this.g)}${Es(this.b)}${Es((isNaN(this.opacity)?1:this.opacity)*255)}`}function FC(){const e=rh(this.opacity);return`${e===1?"rgb(":"rgba("}${Ls(this.r)}, ${Ls(this.g)}, ${Ls(this.b)}${e===1?")":`, ${e})`}`}function rh(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ls(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Es(e){return e=Ls(e),(e<16?"0":"")+e.toString(16)}function qC(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new fi(e,t,r,n)}function aA(e){if(e instanceof fi)return new fi(e.h,e.s,e.l,e.opacity);if(e instanceof Bl||(e=Cl(e)),!e)return new fi;if(e instanceof fi)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,o=Math.min(t,r,n),h=Math.max(t,r,n),g=NaN,a=h-o,c=(h+o)/2;return a?(t===h?g=(r-n)/a+(r<n)*6:r===h?g=(n-t)/a+2:g=(t-r)/a+4,a/=c<.5?h+o:2-h-o,g*=60):a=c>0&&c<1?0:g,new fi(g,a,c,e.opacity)}function p8(e,t,r,n){return arguments.length===1?aA(e):new fi(e,t,r,n??1)}function fi(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}G_(fi,p8,sA(Bl,{brighter(e){return e=e==null?th:Math.pow(th,e),new fi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Sl:Math.pow(Sl,e),new fi(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,o=2*r-n;return new Sr(Vp(e>=240?e-240:e+120,o,n),Vp(e,o,n),Vp(e<120?e+240:e-120,o,n),this.opacity)},clamp(){return new fi(WC(this.h),pu(this.s),pu(this.l),rh(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=rh(this.opacity);return`${e===1?"hsl(":"hsla("}${WC(this.h)}, ${pu(this.s)*100}%, ${pu(this.l)*100}%${e===1?")":`, ${e})`}`}}));function WC(e){return e=(e||0)%360,e<0?e+360:e}function pu(e){return Math.max(0,Math.min(1,e||0))}function Vp(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const K_=e=>()=>e;function g8(e,t){return function(r){return e+r*t}}function _8(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function m8(e){return(e=+e)==1?oA:function(t,r){return r-t?_8(t,r,e):K_(isNaN(t)?r:t)}}function oA(e,t){var r=t-e;return r?g8(e,r):K_(isNaN(e)?t:e)}const GC=(function e(t){var r=m8(t);function n(o,h){var g=r((o=Jg(o)).r,(h=Jg(h)).r),a=r(o.g,h.g),c=r(o.b,h.b),f=oA(o.opacity,h.opacity);return function(v){return o.r=g(v),o.g=a(v),o.b=c(v),o.opacity=f(v),o+""}}return n.gamma=e,n})(1);function y8(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),o;return function(h){for(o=0;o<r;++o)n[o]=e[o]*(1-h)+t[o]*h;return n}}function b8(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function S8(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,o=new Array(n),h=new Array(r),g;for(g=0;g<n;++g)o[g]=Ya(e[g],t[g]);for(;g<r;++g)h[g]=t[g];return function(a){for(g=0;g<n;++g)h[g]=o[g](a);return h}}function w8(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function ih(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function C8(e,t){var r={},n={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?r[o]=Ya(e[o],t[o]):n[o]=t[o];return function(h){for(o in r)n[o]=r[o](h);return n}}var e_=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Xp=new RegExp(e_.source,"g");function x8(e){return function(){return e}}function E8(e){return function(t){return e(t)+""}}function A8(e,t){var r=e_.lastIndex=Xp.lastIndex=0,n,o,h,g=-1,a=[],c=[];for(e=e+"",t=t+"";(n=e_.exec(e))&&(o=Xp.exec(t));)(h=o.index)>r&&(h=t.slice(r,h),a[g]?a[g]+=h:a[++g]=h),(n=n[0])===(o=o[0])?a[g]?a[g]+=o:a[++g]=o:(a[++g]=null,c.push({i:g,x:ih(n,o)})),r=Xp.lastIndex;return r<t.length&&(h=t.slice(r),a[g]?a[g]+=h:a[++g]=h),a.length<2?c[0]?E8(c[0].x):x8(t):(t=c.length,function(f){for(var v=0,u;v<t;++v)a[(u=c[v]).i]=u.x(f);return a.join("")})}function Ya(e,t){var r=typeof t,n;return t==null||r==="boolean"?K_(t):(r==="number"?ih:r==="string"?(n=Cl(t))?(t=n,GC):A8:t instanceof Cl?GC:t instanceof Date?w8:b8(t)?y8:Array.isArray(t)?S8:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?C8:ih)(e,t)}function Y_(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function M8(e,t){t===void 0&&(t=e,e=Ya);for(var r=0,n=t.length-1,o=t[0],h=new Array(n<0?0:n);r<n;)h[r]=e(o,o=t[++r]);return function(g){var a=Math.max(0,Math.min(n-1,Math.floor(g*=n)));return h[a](g-a)}}function L8(e){return function(){return e}}function nh(e){return+e}var KC=[0,1];function hr(e){return e}function t_(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:L8(isNaN(t)?NaN:.5)}function O8(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function T8(e,t,r){var n=e[0],o=e[1],h=t[0],g=t[1];return o<n?(n=t_(o,n),h=r(g,h)):(n=t_(n,o),h=r(h,g)),function(a){return h(n(a))}}function D8(e,t,r){var n=Math.min(e.length,t.length)-1,o=new Array(n),h=new Array(n),g=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++g<n;)o[g]=t_(e[g],e[g+1]),h[g]=r(t[g],t[g+1]);return function(a){var c=Pl(e,a,1,n)-1;return h[c](o[c](a))}}function jl(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Gh(){var e=KC,t=KC,r=Ya,n,o,h,g=hr,a,c,f;function v(){var m=Math.min(e.length,t.length);return g!==hr&&(g=O8(e[0],e[m-1])),a=m>2?D8:T8,c=f=null,u}function u(m){return m==null||isNaN(m=+m)?h:(c||(c=a(e.map(n),t,r)))(n(g(m)))}return u.invert=function(m){return g(o((f||(f=a(t,e.map(n),ih)))(m)))},u.domain=function(m){return arguments.length?(e=Array.from(m,nh),v()):e.slice()},u.range=function(m){return arguments.length?(t=Array.from(m),v()):t.slice()},u.rangeRound=function(m){return t=Array.from(m),r=Y_,v()},u.clamp=function(m){return arguments.length?(g=m?!0:hr,v()):g!==hr},u.interpolate=function(m){return arguments.length?(r=m,v()):r},u.unknown=function(m){return arguments.length?(h=m,u):h},function(m,w){return n=m,o=w,v()}}function V_(){return Gh()(hr,hr)}function R8(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function sh(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function za(e){return e=sh(Math.abs(e)),e?e[1]:NaN}function k8(e,t){return function(r,n){for(var o=r.length,h=[],g=0,a=e[0],c=0;o>0&&a>0&&(c+a+1>n&&(a=Math.max(1,n-c)),h.push(r.substring(o-=a,o+a)),!((c+=a+1)>n));)a=e[g=(g+1)%e.length];return h.reverse().join(t)}}function P8(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var B8=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function xl(e){if(!(t=B8.exec(e)))throw new Error("invalid format: "+e);var t;return new X_({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}xl.prototype=X_.prototype;function X_(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}X_.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function j8(e){e:for(var t=e.length,r=1,n=-1,o;r<t;++r)switch(e[r]){case".":n=o=r;break;case"0":n===0&&(n=r),o=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(o+1):e}var ah;function I8(e,t){var r=sh(e,t);if(!r)return ah=void 0,e.toPrecision(t);var n=r[0],o=r[1],h=o-(ah=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,g=n.length;return h===g?n:h>g?n+new Array(h-g+1).join("0"):h>0?n.slice(0,h)+"."+n.slice(h):"0."+new Array(1-h).join("0")+sh(e,Math.max(0,t+h-1))[0]}function YC(e,t){var r=sh(e,t);if(!r)return e+"";var n=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+n:n.length>o+1?n.slice(0,o+1)+"."+n.slice(o+1):n+new Array(o-n.length+2).join("0")}const VC={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:R8,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>YC(e*100,t),r:YC,s:I8,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function XC(e){return e}var ZC=Array.prototype.map,QC=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function N8(e){var t=e.grouping===void 0||e.thousands===void 0?XC:k8(ZC.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",h=e.numerals===void 0?XC:P8(ZC.call(e.numerals,String)),g=e.percent===void 0?"%":e.percent+"",a=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function f(u,m){u=xl(u);var w=u.fill,C=u.align,_=u.sign,d=u.symbol,y=u.zero,b=u.width,S=u.comma,E=u.precision,L=u.trim,x=u.type;x==="n"?(S=!0,x="g"):VC[x]||(E===void 0&&(E=12),L=!0,x="g"),(y||w==="0"&&C==="=")&&(y=!0,w="0",C="=");var O=(m&&m.prefix!==void 0?m.prefix:"")+(d==="$"?r:d==="#"&&/[boxX]/.test(x)?"0"+x.toLowerCase():""),M=(d==="$"?n:/[%p]/.test(x)?g:"")+(m&&m.suffix!==void 0?m.suffix:""),D=VC[x],k=/[defgprs%]/.test(x);E=E===void 0?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function B(R){var P=O,H=M,X,F,K;if(x==="c")H=D(R)+H,R="";else{R=+R;var Y=R<0||1/R<0;if(R=isNaN(R)?c:D(Math.abs(R),E),L&&(R=j8(R)),Y&&+R==0&&_!=="+"&&(Y=!1),P=(Y?_==="("?_:a:_==="-"||_==="("?"":_)+P,H=(x==="s"&&!isNaN(R)&&ah!==void 0?QC[8+ah/3]:"")+H+(Y&&_==="("?")":""),k){for(X=-1,F=R.length;++X<F;)if(K=R.charCodeAt(X),48>K||K>57){H=(K===46?o+R.slice(X+1):R.slice(X))+H,R=R.slice(0,X);break}}}S&&!y&&(R=t(R,1/0));var j=P.length+R.length+H.length,$=j<b?new Array(b-j+1).join(w):"";switch(S&&y&&(R=t($+R,$.length?b-H.length:1/0),$=""),C){case"<":R=P+R+H+$;break;case"=":R=P+$+R+H;break;case"^":R=$.slice(0,j=$.length>>1)+P+R+H+$.slice(j);break;default:R=$+P+R+H;break}return h(R)}return B.toString=function(){return u+""},B}function v(u,m){var w=Math.max(-8,Math.min(8,Math.floor(za(m)/3)))*3,C=Math.pow(10,-w),_=f((u=xl(u),u.type="f",u),{suffix:QC[8+w/3]});return function(d){return _(C*d)}}return{format:f,formatPrefix:v}}var gu,Z_,lA;z8({thousands:",",grouping:[3],currency:["$",""]});function z8(e){return gu=N8(e),Z_=gu.format,lA=gu.formatPrefix,gu}function H8(e){return Math.max(0,-za(Math.abs(e)))}function $8(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(za(t)/3)))*3-za(Math.abs(e)))}function U8(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,za(t)-za(e))+1}function cA(e,t,r,n){var o=Zg(e,t,r),h;switch(n=xl(n??",f"),n.type){case"s":{var g=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(h=$8(o,g))&&(n.precision=h),lA(n,g)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(h=U8(o,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=h-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(h=H8(o))&&(n.precision=h-(n.type==="%")*2);break}}return Z_(n)}function Jn(e){var t=e.domain;return e.ticks=function(r){var n=t();return Vg(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var o=t();return cA(o[0],o[o.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),o=0,h=n.length-1,g=n[o],a=n[h],c,f,v=10;for(a<g&&(f=g,g=a,a=f,f=o,o=h,h=f);v-- >0;){if(f=Xg(g,a,r),f===c)return n[o]=g,n[h]=a,t(n);if(f>0)g=Math.floor(g/f)*f,a=Math.ceil(a/f)*f;else if(f<0)g=Math.ceil(g*f)/f,a=Math.floor(a*f)/f;else break;c=f}return e},e}function uA(){var e=V_();return e.copy=function(){return jl(e,uA())},ni.apply(e,arguments),Jn(e)}function hA(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,nh),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return hA(e).unknown(t)},e=arguments.length?Array.from(e,nh):[0,1],Jn(r)}function fA(e,t){e=e.slice();var r=0,n=e.length-1,o=e[r],h=e[n],g;return h<o&&(g=r,r=n,n=g,g=o,o=h,h=g),e[r]=t.floor(o),e[n]=t.ceil(h),e}function JC(e){return Math.log(e)}function ex(e){return Math.exp(e)}function F8(e){return-Math.log(-e)}function q8(e){return-Math.exp(-e)}function W8(e){return isFinite(e)?+("1e"+e):e<0?0:e}function G8(e){return e===10?W8:e===Math.E?Math.exp:t=>Math.pow(e,t)}function K8(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function tx(e){return(t,r)=>-e(-t,r)}function Q_(e){const t=e(JC,ex),r=t.domain;let n=10,o,h;function g(){return o=K8(n),h=G8(n),r()[0]<0?(o=tx(o),h=tx(h),e(F8,q8)):e(JC,ex),t}return t.base=function(a){return arguments.length?(n=+a,g()):n},t.domain=function(a){return arguments.length?(r(a),g()):r()},t.ticks=a=>{const c=r();let f=c[0],v=c[c.length-1];const u=v<f;u&&([f,v]=[v,f]);let m=o(f),w=o(v),C,_;const d=a==null?10:+a;let y=[];if(!(n%1)&&w-m<d){if(m=Math.floor(m),w=Math.ceil(w),f>0){for(;m<=w;++m)for(C=1;C<n;++C)if(_=m<0?C/h(-m):C*h(m),!(_<f)){if(_>v)break;y.push(_)}}else for(;m<=w;++m)for(C=n-1;C>=1;--C)if(_=m>0?C/h(-m):C*h(m),!(_<f)){if(_>v)break;y.push(_)}y.length*2<d&&(y=Vg(f,v,d))}else y=Vg(m,w,Math.min(w-m,d)).map(h);return u?y.reverse():y},t.tickFormat=(a,c)=>{if(a==null&&(a=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=xl(c)).precision==null&&(c.trim=!0),c=Z_(c)),a===1/0)return c;const f=Math.max(1,n*a/t.ticks().length);return v=>{let u=v/h(Math.round(o(v)));return u*n<n-.5&&(u*=n),u<=f?c(v):""}},t.nice=()=>r(fA(r(),{floor:a=>h(Math.floor(o(a))),ceil:a=>h(Math.ceil(o(a)))})),t}function dA(){const e=Q_(Gh()).domain([1,10]);return e.copy=()=>jl(e,dA()).base(e.base()),ni.apply(e,arguments),e}function rx(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function ix(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function J_(e){var t=1,r=e(rx(t),ix(t));return r.constant=function(n){return arguments.length?e(rx(t=+n),ix(t)):t},Jn(r)}function vA(){var e=J_(Gh());return e.copy=function(){return jl(e,vA()).constant(e.constant())},ni.apply(e,arguments)}function nx(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Y8(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function V8(e){return e<0?-e*e:e*e}function em(e){var t=e(hr,hr),r=1;function n(){return r===1?e(hr,hr):r===.5?e(Y8,V8):e(nx(r),nx(1/r))}return t.exponent=function(o){return arguments.length?(r=+o,n()):r},Jn(t)}function tm(){var e=em(Gh());return e.copy=function(){return jl(e,tm()).exponent(e.exponent())},ni.apply(e,arguments),e}function X8(){return tm.apply(null,arguments).exponent(.5)}function sx(e){return Math.sign(e)*e*e}function Z8(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function pA(){var e=V_(),t=[0,1],r=!1,n;function o(h){var g=Z8(e(h));return isNaN(g)?n:r?Math.round(g):g}return o.invert=function(h){return e.invert(sx(h))},o.domain=function(h){return arguments.length?(e.domain(h),o):e.domain()},o.range=function(h){return arguments.length?(e.range((t=Array.from(h,nh)).map(sx)),o):t.slice()},o.rangeRound=function(h){return o.range(h).round(!0)},o.round=function(h){return arguments.length?(r=!!h,o):r},o.clamp=function(h){return arguments.length?(e.clamp(h),o):e.clamp()},o.unknown=function(h){return arguments.length?(n=h,o):n},o.copy=function(){return pA(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},ni.apply(o,arguments),Jn(o)}function gA(){var e=[],t=[],r=[],n;function o(){var g=0,a=Math.max(1,t.length);for(r=new Array(a-1);++g<a;)r[g-1]=t8(e,g/a);return h}function h(g){return g==null||isNaN(g=+g)?n:t[Pl(r,g)]}return h.invertExtent=function(g){var a=t.indexOf(g);return a<0?[NaN,NaN]:[a>0?r[a-1]:e[0],a<r.length?r[a]:e[e.length-1]]},h.domain=function(g){if(!arguments.length)return e.slice();e=[];for(let a of g)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(Yn),o()},h.range=function(g){return arguments.length?(t=Array.from(g),o()):t.slice()},h.unknown=function(g){return arguments.length?(n=g,h):n},h.quantiles=function(){return r.slice()},h.copy=function(){return gA().domain(e).range(t).unknown(n)},ni.apply(h,arguments)}function _A(){var e=0,t=1,r=1,n=[.5],o=[0,1],h;function g(c){return c!=null&&c<=c?o[Pl(n,c,0,r)]:h}function a(){var c=-1;for(n=new Array(r);++c<r;)n[c]=((c+1)*t-(c-r)*e)/(r+1);return g}return g.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,a()):[e,t]},g.range=function(c){return arguments.length?(r=(o=Array.from(c)).length-1,a()):o.slice()},g.invertExtent=function(c){var f=o.indexOf(c);return f<0?[NaN,NaN]:f<1?[e,n[0]]:f>=r?[n[r-1],t]:[n[f-1],n[f]]},g.unknown=function(c){return arguments.length&&(h=c),g},g.thresholds=function(){return n.slice()},g.copy=function(){return _A().domain([e,t]).range(o).unknown(h)},ni.apply(Jn(g),arguments)}function mA(){var e=[.5],t=[0,1],r,n=1;function o(h){return h!=null&&h<=h?t[Pl(e,h,0,n)]:r}return o.domain=function(h){return arguments.length?(e=Array.from(h),n=Math.min(e.length,t.length-1),o):e.slice()},o.range=function(h){return arguments.length?(t=Array.from(h),n=Math.min(e.length,t.length-1),o):t.slice()},o.invertExtent=function(h){var g=t.indexOf(h);return[e[g-1],e[g]]},o.unknown=function(h){return arguments.length?(r=h,o):r},o.copy=function(){return mA().domain(e).range(t).unknown(r)},ni.apply(o,arguments)}const Zp=new Date,Qp=new Date;function Bt(e,t,r,n){function o(h){return e(h=arguments.length===0?new Date:new Date(+h)),h}return o.floor=h=>(e(h=new Date(+h)),h),o.ceil=h=>(e(h=new Date(h-1)),t(h,1),e(h),h),o.round=h=>{const g=o(h),a=o.ceil(h);return h-g<a-h?g:a},o.offset=(h,g)=>(t(h=new Date(+h),g==null?1:Math.floor(g)),h),o.range=(h,g,a)=>{const c=[];if(h=o.ceil(h),a=a==null?1:Math.floor(a),!(h<g)||!(a>0))return c;let f;do c.push(f=new Date(+h)),t(h,a),e(h);while(f<h&&h<g);return c},o.filter=h=>Bt(g=>{if(g>=g)for(;e(g),!h(g);)g.setTime(g-1)},(g,a)=>{if(g>=g)if(a<0)for(;++a<=0;)for(;t(g,-1),!h(g););else for(;--a>=0;)for(;t(g,1),!h(g););}),r&&(o.count=(h,g)=>(Zp.setTime(+h),Qp.setTime(+g),e(Zp),e(Qp),Math.floor(r(Zp,Qp))),o.every=h=>(h=Math.floor(h),!isFinite(h)||!(h>0)?null:h>1?o.filter(n?g=>n(g)%h===0:g=>o.count(0,g)%h===0):o)),o}const oh=Bt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);oh.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Bt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):oh);oh.range;const en=1e3,Qr=en*60,tn=Qr*60,an=tn*24,rm=an*7,ax=an*30,Jp=an*365,As=Bt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*en)},(e,t)=>(t-e)/en,e=>e.getUTCSeconds());As.range;const im=Bt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*en)},(e,t)=>{e.setTime(+e+t*Qr)},(e,t)=>(t-e)/Qr,e=>e.getMinutes());im.range;const nm=Bt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Qr)},(e,t)=>(t-e)/Qr,e=>e.getUTCMinutes());nm.range;const sm=Bt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*en-e.getMinutes()*Qr)},(e,t)=>{e.setTime(+e+t*tn)},(e,t)=>(t-e)/tn,e=>e.getHours());sm.range;const am=Bt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*tn)},(e,t)=>(t-e)/tn,e=>e.getUTCHours());am.range;const Il=Bt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Qr)/an,e=>e.getDate()-1);Il.range;const Kh=Bt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/an,e=>e.getUTCDate()-1);Kh.range;const yA=Bt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/an,e=>Math.floor(e/an));yA.range;function Ns(e){return Bt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Qr)/rm)}const Yh=Ns(0),lh=Ns(1),Q8=Ns(2),J8=Ns(3),Ha=Ns(4),ej=Ns(5),tj=Ns(6);Yh.range;lh.range;Q8.range;J8.range;Ha.range;ej.range;tj.range;function zs(e){return Bt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/rm)}const Vh=zs(0),ch=zs(1),rj=zs(2),ij=zs(3),$a=zs(4),nj=zs(5),sj=zs(6);Vh.range;ch.range;rj.range;ij.range;$a.range;nj.range;sj.range;const om=Bt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());om.range;const lm=Bt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());lm.range;const on=Bt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());on.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Bt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});on.range;const ln=Bt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ln.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Bt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});ln.range;function bA(e,t,r,n,o,h){const g=[[As,1,en],[As,5,5*en],[As,15,15*en],[As,30,30*en],[h,1,Qr],[h,5,5*Qr],[h,15,15*Qr],[h,30,30*Qr],[o,1,tn],[o,3,3*tn],[o,6,6*tn],[o,12,12*tn],[n,1,an],[n,2,2*an],[r,1,rm],[t,1,ax],[t,3,3*ax],[e,1,Jp]];function a(f,v,u){const m=v<f;m&&([f,v]=[v,f]);const w=u&&typeof u.range=="function"?u:c(f,v,u),C=w?w.range(f,+v+1):[];return m?C.reverse():C}function c(f,v,u){const m=Math.abs(v-f)/u,w=F_(([,,d])=>d).right(g,m);if(w===g.length)return e.every(Zg(f/Jp,v/Jp,u));if(w===0)return oh.every(Math.max(Zg(f,v,u),1));const[C,_]=g[m/g[w-1][2]<g[w][2]/m?w-1:w];return C.every(_)}return[a,c]}const[aj,oj]=bA(ln,lm,Vh,yA,am,nm),[lj,cj]=bA(on,om,Yh,Il,sm,im);function eg(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function tg(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function nl(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function uj(e){var t=e.dateTime,r=e.date,n=e.time,o=e.periods,h=e.days,g=e.shortDays,a=e.months,c=e.shortMonths,f=sl(o),v=al(o),u=sl(h),m=al(h),w=sl(g),C=al(g),_=sl(a),d=al(a),y=sl(c),b=al(c),S={a:K,A:Y,b:j,B:$,c:null,d:fx,e:fx,f:kj,g:Fj,G:Wj,H:Tj,I:Dj,j:Rj,L:SA,m:Pj,M:Bj,p:N,q:U,Q:px,s:gx,S:jj,u:Ij,U:Nj,V:zj,w:Hj,W:$j,x:null,X:null,y:Uj,Y:qj,Z:Gj,"%":vx},E={a:J,A:te,b:fe,B:ve,c:null,d:dx,e:dx,f:Xj,g:aI,G:lI,H:Kj,I:Yj,j:Vj,L:CA,m:Zj,M:Qj,p:Z,q:W,Q:px,s:gx,S:Jj,u:eI,U:tI,V:rI,w:iI,W:nI,x:null,X:null,y:sI,Y:oI,Z:cI,"%":vx},L={a:k,A:B,b:R,B:P,c:H,d:ux,e:ux,f:Aj,g:cx,G:lx,H:hx,I:hx,j:wj,L:Ej,m:Sj,M:Cj,p:D,q:bj,Q:Lj,s:Oj,S:xj,u:pj,U:gj,V:_j,w:vj,W:mj,x:X,X:F,y:cx,Y:lx,Z:yj,"%":Mj};S.x=x(r,S),S.X=x(n,S),S.c=x(t,S),E.x=x(r,E),E.X=x(n,E),E.c=x(t,E);function x(V,ee){return function(ue){var ie=[],me=-1,de=0,Me=V.length,ke,Ce,Ve;for(ue instanceof Date||(ue=new Date(+ue));++me<Me;)V.charCodeAt(me)===37&&(ie.push(V.slice(de,me)),(Ce=ox[ke=V.charAt(++me)])!=null?ke=V.charAt(++me):Ce=ke==="e"?" ":"0",(Ve=ee[ke])&&(ke=Ve(ue,Ce)),ie.push(ke),de=me+1);return ie.push(V.slice(de,me)),ie.join("")}}function O(V,ee){return function(ue){var ie=nl(1900,void 0,1),me=M(ie,V,ue+="",0),de,Me;if(me!=ue.length)return null;if("Q"in ie)return new Date(ie.Q);if("s"in ie)return new Date(ie.s*1e3+("L"in ie?ie.L:0));if(ee&&!("Z"in ie)&&(ie.Z=0),"p"in ie&&(ie.H=ie.H%12+ie.p*12),ie.m===void 0&&(ie.m="q"in ie?ie.q:0),"V"in ie){if(ie.V<1||ie.V>53)return null;"w"in ie||(ie.w=1),"Z"in ie?(de=tg(nl(ie.y,0,1)),Me=de.getUTCDay(),de=Me>4||Me===0?ch.ceil(de):ch(de),de=Kh.offset(de,(ie.V-1)*7),ie.y=de.getUTCFullYear(),ie.m=de.getUTCMonth(),ie.d=de.getUTCDate()+(ie.w+6)%7):(de=eg(nl(ie.y,0,1)),Me=de.getDay(),de=Me>4||Me===0?lh.ceil(de):lh(de),de=Il.offset(de,(ie.V-1)*7),ie.y=de.getFullYear(),ie.m=de.getMonth(),ie.d=de.getDate()+(ie.w+6)%7)}else("W"in ie||"U"in ie)&&("w"in ie||(ie.w="u"in ie?ie.u%7:"W"in ie?1:0),Me="Z"in ie?tg(nl(ie.y,0,1)).getUTCDay():eg(nl(ie.y,0,1)).getDay(),ie.m=0,ie.d="W"in ie?(ie.w+6)%7+ie.W*7-(Me+5)%7:ie.w+ie.U*7-(Me+6)%7);return"Z"in ie?(ie.H+=ie.Z/100|0,ie.M+=ie.Z%100,tg(ie)):eg(ie)}}function M(V,ee,ue,ie){for(var me=0,de=ee.length,Me=ue.length,ke,Ce;me<de;){if(ie>=Me)return-1;if(ke=ee.charCodeAt(me++),ke===37){if(ke=ee.charAt(me++),Ce=L[ke in ox?ee.charAt(me++):ke],!Ce||(ie=Ce(V,ue,ie))<0)return-1}else if(ke!=ue.charCodeAt(ie++))return-1}return ie}function D(V,ee,ue){var ie=f.exec(ee.slice(ue));return ie?(V.p=v.get(ie[0].toLowerCase()),ue+ie[0].length):-1}function k(V,ee,ue){var ie=w.exec(ee.slice(ue));return ie?(V.w=C.get(ie[0].toLowerCase()),ue+ie[0].length):-1}function B(V,ee,ue){var ie=u.exec(ee.slice(ue));return ie?(V.w=m.get(ie[0].toLowerCase()),ue+ie[0].length):-1}function R(V,ee,ue){var ie=y.exec(ee.slice(ue));return ie?(V.m=b.get(ie[0].toLowerCase()),ue+ie[0].length):-1}function P(V,ee,ue){var ie=_.exec(ee.slice(ue));return ie?(V.m=d.get(ie[0].toLowerCase()),ue+ie[0].length):-1}function H(V,ee,ue){return M(V,t,ee,ue)}function X(V,ee,ue){return M(V,r,ee,ue)}function F(V,ee,ue){return M(V,n,ee,ue)}function K(V){return g[V.getDay()]}function Y(V){return h[V.getDay()]}function j(V){return c[V.getMonth()]}function $(V){return a[V.getMonth()]}function N(V){return o[+(V.getHours()>=12)]}function U(V){return 1+~~(V.getMonth()/3)}function J(V){return g[V.getUTCDay()]}function te(V){return h[V.getUTCDay()]}function fe(V){return c[V.getUTCMonth()]}function ve(V){return a[V.getUTCMonth()]}function Z(V){return o[+(V.getUTCHours()>=12)]}function W(V){return 1+~~(V.getUTCMonth()/3)}return{format:function(V){var ee=x(V+="",S);return ee.toString=function(){return V},ee},parse:function(V){var ee=O(V+="",!1);return ee.toString=function(){return V},ee},utcFormat:function(V){var ee=x(V+="",E);return ee.toString=function(){return V},ee},utcParse:function(V){var ee=O(V+="",!0);return ee.toString=function(){return V},ee}}}var ox={"-":"",_:" ",0:"0"},Gt=/^\s*\d+/,hj=/^%/,fj=/[\\^$*+?|[\]().{}]/g;function Ye(e,t,r){var n=e<0?"-":"",o=(n?-e:e)+"",h=o.length;return n+(h<r?new Array(r-h+1).join(t)+o:o)}function dj(e){return e.replace(fj,"\\$&")}function sl(e){return new RegExp("^(?:"+e.map(dj).join("|")+")","i")}function al(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function vj(e,t,r){var n=Gt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function pj(e,t,r){var n=Gt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function gj(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function _j(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function mj(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function lx(e,t,r){var n=Gt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function cx(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function yj(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function bj(e,t,r){var n=Gt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function Sj(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function ux(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function wj(e,t,r){var n=Gt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function hx(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function Cj(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function xj(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function Ej(e,t,r){var n=Gt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function Aj(e,t,r){var n=Gt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function Mj(e,t,r){var n=hj.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function Lj(e,t,r){var n=Gt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function Oj(e,t,r){var n=Gt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function fx(e,t){return Ye(e.getDate(),t,2)}function Tj(e,t){return Ye(e.getHours(),t,2)}function Dj(e,t){return Ye(e.getHours()%12||12,t,2)}function Rj(e,t){return Ye(1+Il.count(on(e),e),t,3)}function SA(e,t){return Ye(e.getMilliseconds(),t,3)}function kj(e,t){return SA(e,t)+"000"}function Pj(e,t){return Ye(e.getMonth()+1,t,2)}function Bj(e,t){return Ye(e.getMinutes(),t,2)}function jj(e,t){return Ye(e.getSeconds(),t,2)}function Ij(e){var t=e.getDay();return t===0?7:t}function Nj(e,t){return Ye(Yh.count(on(e)-1,e),t,2)}function wA(e){var t=e.getDay();return t>=4||t===0?Ha(e):Ha.ceil(e)}function zj(e,t){return e=wA(e),Ye(Ha.count(on(e),e)+(on(e).getDay()===4),t,2)}function Hj(e){return e.getDay()}function $j(e,t){return Ye(lh.count(on(e)-1,e),t,2)}function Uj(e,t){return Ye(e.getFullYear()%100,t,2)}function Fj(e,t){return e=wA(e),Ye(e.getFullYear()%100,t,2)}function qj(e,t){return Ye(e.getFullYear()%1e4,t,4)}function Wj(e,t){var r=e.getDay();return e=r>=4||r===0?Ha(e):Ha.ceil(e),Ye(e.getFullYear()%1e4,t,4)}function Gj(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ye(t/60|0,"0",2)+Ye(t%60,"0",2)}function dx(e,t){return Ye(e.getUTCDate(),t,2)}function Kj(e,t){return Ye(e.getUTCHours(),t,2)}function Yj(e,t){return Ye(e.getUTCHours()%12||12,t,2)}function Vj(e,t){return Ye(1+Kh.count(ln(e),e),t,3)}function CA(e,t){return Ye(e.getUTCMilliseconds(),t,3)}function Xj(e,t){return CA(e,t)+"000"}function Zj(e,t){return Ye(e.getUTCMonth()+1,t,2)}function Qj(e,t){return Ye(e.getUTCMinutes(),t,2)}function Jj(e,t){return Ye(e.getUTCSeconds(),t,2)}function eI(e){var t=e.getUTCDay();return t===0?7:t}function tI(e,t){return Ye(Vh.count(ln(e)-1,e),t,2)}function xA(e){var t=e.getUTCDay();return t>=4||t===0?$a(e):$a.ceil(e)}function rI(e,t){return e=xA(e),Ye($a.count(ln(e),e)+(ln(e).getUTCDay()===4),t,2)}function iI(e){return e.getUTCDay()}function nI(e,t){return Ye(ch.count(ln(e)-1,e),t,2)}function sI(e,t){return Ye(e.getUTCFullYear()%100,t,2)}function aI(e,t){return e=xA(e),Ye(e.getUTCFullYear()%100,t,2)}function oI(e,t){return Ye(e.getUTCFullYear()%1e4,t,4)}function lI(e,t){var r=e.getUTCDay();return e=r>=4||r===0?$a(e):$a.ceil(e),Ye(e.getUTCFullYear()%1e4,t,4)}function cI(){return"+0000"}function vx(){return"%"}function px(e){return+e}function gx(e){return Math.floor(+e/1e3)}var La,EA,AA;uI({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function uI(e){return La=uj(e),EA=La.format,La.parse,AA=La.utcFormat,La.utcParse,La}function hI(e){return new Date(e)}function fI(e){return e instanceof Date?+e:+new Date(+e)}function cm(e,t,r,n,o,h,g,a,c,f){var v=V_(),u=v.invert,m=v.domain,w=f(".%L"),C=f(":%S"),_=f("%I:%M"),d=f("%I %p"),y=f("%a %d"),b=f("%b %d"),S=f("%B"),E=f("%Y");function L(x){return(c(x)<x?w:a(x)<x?C:g(x)<x?_:h(x)<x?d:n(x)<x?o(x)<x?y:b:r(x)<x?S:E)(x)}return v.invert=function(x){return new Date(u(x))},v.domain=function(x){return arguments.length?m(Array.from(x,fI)):m().map(hI)},v.ticks=function(x){var O=m();return e(O[0],O[O.length-1],x??10)},v.tickFormat=function(x,O){return O==null?L:f(O)},v.nice=function(x){var O=m();return(!x||typeof x.range!="function")&&(x=t(O[0],O[O.length-1],x??10)),x?m(fA(O,x)):v},v.copy=function(){return jl(v,cm(e,t,r,n,o,h,g,a,c,f))},v}function dI(){return ni.apply(cm(lj,cj,on,om,Yh,Il,sm,im,As,EA).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function vI(){return ni.apply(cm(aj,oj,ln,lm,Vh,Kh,am,nm,As,AA).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Xh(){var e=0,t=1,r,n,o,h,g=hr,a=!1,c;function f(u){return u==null||isNaN(u=+u)?c:g(o===0?.5:(u=(h(u)-r)*o,a?Math.max(0,Math.min(1,u)):u))}f.domain=function(u){return arguments.length?([e,t]=u,r=h(e=+e),n=h(t=+t),o=r===n?0:1/(n-r),f):[e,t]},f.clamp=function(u){return arguments.length?(a=!!u,f):a},f.interpolator=function(u){return arguments.length?(g=u,f):g};function v(u){return function(m){var w,C;return arguments.length?([w,C]=m,g=u(w,C),f):[g(0),g(1)]}}return f.range=v(Ya),f.rangeRound=v(Y_),f.unknown=function(u){return arguments.length?(c=u,f):c},function(u){return h=u,r=u(e),n=u(t),o=r===n?0:1/(n-r),f}}function es(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function MA(){var e=Jn(Xh()(hr));return e.copy=function(){return es(e,MA())},pn.apply(e,arguments)}function LA(){var e=Q_(Xh()).domain([1,10]);return e.copy=function(){return es(e,LA()).base(e.base())},pn.apply(e,arguments)}function OA(){var e=J_(Xh());return e.copy=function(){return es(e,OA()).constant(e.constant())},pn.apply(e,arguments)}function um(){var e=em(Xh());return e.copy=function(){return es(e,um()).exponent(e.exponent())},pn.apply(e,arguments)}function pI(){return um.apply(null,arguments).exponent(.5)}function TA(){var e=[],t=hr;function r(n){if(n!=null&&!isNaN(n=+n))return t((Pl(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let o of n)o!=null&&!isNaN(o=+o)&&e.push(o);return e.sort(Yn),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,o)=>t(o/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(o,h)=>e8(e,h/n))},r.copy=function(){return TA(t).domain(e)},pn.apply(r,arguments)}function Zh(){var e=0,t=.5,r=1,n=1,o,h,g,a,c,f=hr,v,u=!1,m;function w(_){return isNaN(_=+_)?m:(_=.5+((_=+v(_))-h)*(n*_<n*h?a:c),f(u?Math.max(0,Math.min(1,_)):_))}w.domain=function(_){return arguments.length?([e,t,r]=_,o=v(e=+e),h=v(t=+t),g=v(r=+r),a=o===h?0:.5/(h-o),c=h===g?0:.5/(g-h),n=h<o?-1:1,w):[e,t,r]},w.clamp=function(_){return arguments.length?(u=!!_,w):u},w.interpolator=function(_){return arguments.length?(f=_,w):f};function C(_){return function(d){var y,b,S;return arguments.length?([y,b,S]=d,f=M8(_,[y,b,S]),w):[f(0),f(.5),f(1)]}}return w.range=C(Ya),w.rangeRound=C(Y_),w.unknown=function(_){return arguments.length?(m=_,w):m},function(_){return v=_,o=_(e),h=_(t),g=_(r),a=o===h?0:.5/(h-o),c=h===g?0:.5/(g-h),n=h<o?-1:1,w}}function DA(){var e=Jn(Zh()(hr));return e.copy=function(){return es(e,DA())},pn.apply(e,arguments)}function RA(){var e=Q_(Zh()).domain([.1,1,10]);return e.copy=function(){return es(e,RA()).base(e.base())},pn.apply(e,arguments)}function kA(){var e=J_(Zh());return e.copy=function(){return es(e,kA()).constant(e.constant())},pn.apply(e,arguments)}function hm(){var e=em(Zh());return e.copy=function(){return es(e,hm()).exponent(e.exponent())},pn.apply(e,arguments)}function gI(){return hm.apply(null,arguments).exponent(.5)}const cl=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:W_,scaleDiverging:DA,scaleDivergingLog:RA,scaleDivergingPow:hm,scaleDivergingSqrt:gI,scaleDivergingSymlog:kA,scaleIdentity:hA,scaleImplicit:Qg,scaleLinear:uA,scaleLog:dA,scaleOrdinal:q_,scalePoint:i8,scalePow:tm,scaleQuantile:gA,scaleQuantize:_A,scaleRadial:pA,scaleSequential:MA,scaleSequentialLog:LA,scaleSequentialPow:um,scaleSequentialQuantile:TA,scaleSequentialSqrt:pI,scaleSequentialSymlog:OA,scaleSqrt:X8,scaleSymlog:vA,scaleThreshold:mA,scaleTime:dI,scaleUtc:vI,tickFormat:cA},Symbol.toStringTag,{value:"Module"}));var gn=e=>e.chartData,PA=le([gn],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),BA=(e,t,r,n)=>n?PA(e):gn(e),_I=(e,t,r)=>r?PA(e):gn(e);function cn(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(Ze(t)&&Ze(r))return!0}return!1}function _x(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function jA(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,o,h;if(Ze(r))o=r;else if(typeof r=="function")return;if(Ze(n))h=n;else if(typeof n=="function")return;var g=[o,h];if(cn(g))return g}}function mI(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(cn(n))return _x(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var[o,h]=e,g,a;if(o==="auto")t!=null&&(g=Math.min(...t));else if(Oe(o))g=o;else if(typeof o=="function")try{t!=null&&(g=o(t==null?void 0:t[0]))}catch{}else if(typeof o=="string"&&Lw.test(o)){var c=Lw.exec(o);if(c==null||c[1]==null||t==null)g=void 0;else{var f=+c[1];g=t[0]-f}}else g=t==null?void 0:t[0];if(h==="auto")t!=null&&(a=Math.max(...t));else if(Oe(h))a=h;else if(typeof h=="function")try{t!=null&&(a=h(t==null?void 0:t[1]))}catch{}else if(typeof h=="string"&&Ow.test(h)){var v=Ow.exec(h);if(v==null||v[1]==null||t==null)a=void 0;else{var u=+v[1];a=t[1]+u}}else a=t==null?void 0:t[1];var m=[g,a];if(cn(m))return t==null?m:_x(m,t,r)}}}var Va=1e9,yI={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},dm,gt=!0,ti="[DecimalError] ",Os=ti+"Invalid argument: ",fm=ti+"Exponent out of range: ",Xa=Math.floor,ws=Math.pow,bI=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Dr,Ft=1e7,ft=7,IA=9007199254740991,uh=Xa(IA/ft),xe={};xe.absoluteValue=xe.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};xe.comparedTo=xe.cmp=function(e){var t,r,n,o,h=this;if(e=new h.constructor(e),h.s!==e.s)return h.s||-e.s;if(h.e!==e.e)return h.e>e.e^h.s<0?1:-1;for(n=h.d.length,o=e.d.length,t=0,r=n<o?n:o;t<r;++t)if(h.d[t]!==e.d[t])return h.d[t]>e.d[t]^h.s<0?1:-1;return n===o?0:n>o^h.s<0?1:-1};xe.decimalPlaces=xe.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*ft;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};xe.dividedBy=xe.div=function(e){return rn(this,new this.constructor(e))};xe.dividedToIntegerBy=xe.idiv=function(e){var t=this,r=t.constructor;return at(rn(t,new r(e),0,1),r.precision)};xe.equals=xe.eq=function(e){return!this.cmp(e)};xe.exponent=function(){return Tt(this)};xe.greaterThan=xe.gt=function(e){return this.cmp(e)>0};xe.greaterThanOrEqualTo=xe.gte=function(e){return this.cmp(e)>=0};xe.isInteger=xe.isint=function(){return this.e>this.d.length-2};xe.isNegative=xe.isneg=function(){return this.s<0};xe.isPositive=xe.ispos=function(){return this.s>0};xe.isZero=function(){return this.s===0};xe.lessThan=xe.lt=function(e){return this.cmp(e)<0};xe.lessThanOrEqualTo=xe.lte=function(e){return this.cmp(e)<1};xe.logarithm=xe.log=function(e){var t,r=this,n=r.constructor,o=n.precision,h=o+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Dr))throw Error(ti+"NaN");if(r.s<1)throw Error(ti+(r.s?"NaN":"-Infinity"));return r.eq(Dr)?new n(0):(gt=!1,t=rn(El(r,h),El(e,h),h),gt=!0,at(t,o))};xe.minus=xe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?HA(t,e):NA(t,(e.s=-e.s,e))};xe.modulo=xe.mod=function(e){var t,r=this,n=r.constructor,o=n.precision;if(e=new n(e),!e.s)throw Error(ti+"NaN");return r.s?(gt=!1,t=rn(r,e,0,1).times(e),gt=!0,r.minus(t)):at(new n(r),o)};xe.naturalExponential=xe.exp=function(){return zA(this)};xe.naturalLogarithm=xe.ln=function(){return El(this)};xe.negated=xe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};xe.plus=xe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?NA(t,e):HA(t,(e.s=-e.s,e))};xe.precision=xe.sd=function(e){var t,r,n,o=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Os+e);if(t=Tt(o)+1,n=o.d.length-1,r=n*ft+1,n=o.d[n],n){for(;n%10==0;n/=10)r--;for(n=o.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};xe.squareRoot=xe.sqrt=function(){var e,t,r,n,o,h,g,a=this,c=a.constructor;if(a.s<1){if(!a.s)return new c(0);throw Error(ti+"NaN")}for(e=Tt(a),gt=!1,o=Math.sqrt(+a),o==0||o==1/0?(t=Li(a.d),(t.length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=Xa((e+1)/2)-(e<0||e%2),o==1/0?t="5e"+e:(t=o.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new c(t)):n=new c(o.toString()),r=c.precision,o=g=r+3;;)if(h=n,n=h.plus(rn(a,h,g+2)).times(.5),Li(h.d).slice(0,g)===(t=Li(n.d)).slice(0,g)){if(t=t.slice(g-3,g+1),o==g&&t=="4999"){if(at(h,r+1,0),h.times(h).eq(a)){n=h;break}}else if(t!="9999")break;g+=4}return gt=!0,at(n,r)};xe.times=xe.mul=function(e){var t,r,n,o,h,g,a,c,f,v=this,u=v.constructor,m=v.d,w=(e=new u(e)).d;if(!v.s||!e.s)return new u(0);for(e.s*=v.s,r=v.e+e.e,c=m.length,f=w.length,c<f&&(h=m,m=w,w=h,g=c,c=f,f=g),h=[],g=c+f,n=g;n--;)h.push(0);for(n=f;--n>=0;){for(t=0,o=c+n;o>n;)a=h[o]+w[n]*m[o-n-1]+t,h[o--]=a%Ft|0,t=a/Ft|0;h[o]=(h[o]+t)%Ft|0}for(;!h[--g];)h.pop();return t?++r:h.shift(),e.d=h,e.e=r,gt?at(e,u.precision):e};xe.toDecimalPlaces=xe.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Ri(e,0,Va),t===void 0?t=n.rounding:Ri(t,0,8),at(r,e+Tt(r)+1,t))};xe.toExponential=function(e,t){var r,n=this,o=n.constructor;return e===void 0?r=js(n,!0):(Ri(e,0,Va),t===void 0?t=o.rounding:Ri(t,0,8),n=at(new o(n),e+1,t),r=js(n,!0,e+1)),r};xe.toFixed=function(e,t){var r,n,o=this,h=o.constructor;return e===void 0?js(o):(Ri(e,0,Va),t===void 0?t=h.rounding:Ri(t,0,8),n=at(new h(o),e+Tt(o)+1,t),r=js(n.abs(),!1,e+Tt(n)+1),o.isneg()&&!o.isZero()?"-"+r:r)};xe.toInteger=xe.toint=function(){var e=this,t=e.constructor;return at(new t(e),Tt(e)+1,t.rounding)};xe.toNumber=function(){return+this};xe.toPower=xe.pow=function(e){var t,r,n,o,h,g,a=this,c=a.constructor,f=12,v=+(e=new c(e));if(!e.s)return new c(Dr);if(a=new c(a),!a.s){if(e.s<1)throw Error(ti+"Infinity");return a}if(a.eq(Dr))return a;if(n=c.precision,e.eq(Dr))return at(a,n);if(t=e.e,r=e.d.length-1,g=t>=r,h=a.s,g){if((r=v<0?-v:v)<=IA){for(o=new c(Dr),t=Math.ceil(n/ft+4),gt=!1;r%2&&(o=o.times(a),yx(o.d,t)),r=Xa(r/2),r!==0;)a=a.times(a),yx(a.d,t);return gt=!0,e.s<0?new c(Dr).div(o):at(o,n)}}else if(h<0)throw Error(ti+"NaN");return h=h<0&&e.d[Math.max(t,r)]&1?-1:1,a.s=1,gt=!1,o=e.times(El(a,n+f)),gt=!0,o=zA(o),o.s=h,o};xe.toPrecision=function(e,t){var r,n,o=this,h=o.constructor;return e===void 0?(r=Tt(o),n=js(o,r<=h.toExpNeg||r>=h.toExpPos)):(Ri(e,1,Va),t===void 0?t=h.rounding:Ri(t,0,8),o=at(new h(o),e,t),r=Tt(o),n=js(o,e<=r||r<=h.toExpNeg,e)),n};xe.toSignificantDigits=xe.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Ri(e,1,Va),t===void 0?t=n.rounding:Ri(t,0,8)),at(new n(r),e,t)};xe.toString=xe.valueOf=xe.val=xe.toJSON=xe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Tt(e),r=e.constructor;return js(e,t<=r.toExpNeg||t>=r.toExpPos)};function NA(e,t){var r,n,o,h,g,a,c,f,v=e.constructor,u=v.precision;if(!e.s||!t.s)return t.s||(t=new v(e)),gt?at(t,u):t;if(c=e.d,f=t.d,g=e.e,o=t.e,c=c.slice(),h=g-o,h){for(h<0?(n=c,h=-h,a=f.length):(n=f,o=g,a=c.length),g=Math.ceil(u/ft),a=g>a?g+1:a+1,h>a&&(h=a,n.length=1),n.reverse();h--;)n.push(0);n.reverse()}for(a=c.length,h=f.length,a-h<0&&(h=a,n=f,f=c,c=n),r=0;h;)r=(c[--h]=c[h]+f[h]+r)/Ft|0,c[h]%=Ft;for(r&&(c.unshift(r),++o),a=c.length;c[--a]==0;)c.pop();return t.d=c,t.e=o,gt?at(t,u):t}function Ri(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Os+e)}function Li(e){var t,r,n,o=e.length-1,h="",g=e[0];if(o>0){for(h+=g,t=1;t<o;t++)n=e[t]+"",r=ft-n.length,r&&(h+=qn(r)),h+=n;g=e[t],n=g+"",r=ft-n.length,r&&(h+=qn(r))}else if(g===0)return"0";for(;g%10===0;)g/=10;return h+g}var rn=(function(){function e(n,o){var h,g=0,a=n.length;for(n=n.slice();a--;)h=n[a]*o+g,n[a]=h%Ft|0,g=h/Ft|0;return g&&n.unshift(g),n}function t(n,o,h,g){var a,c;if(h!=g)c=h>g?1:-1;else for(a=c=0;a<h;a++)if(n[a]!=o[a]){c=n[a]>o[a]?1:-1;break}return c}function r(n,o,h){for(var g=0;h--;)n[h]-=g,g=n[h]<o[h]?1:0,n[h]=g*Ft+n[h]-o[h];for(;!n[0]&&n.length>1;)n.shift()}return function(n,o,h,g){var a,c,f,v,u,m,w,C,_,d,y,b,S,E,L,x,O,M,D=n.constructor,k=n.s==o.s?1:-1,B=n.d,R=o.d;if(!n.s)return new D(n);if(!o.s)throw Error(ti+"Division by zero");for(c=n.e-o.e,O=R.length,L=B.length,w=new D(k),C=w.d=[],f=0;R[f]==(B[f]||0);)++f;if(R[f]>(B[f]||0)&&--c,h==null?b=h=D.precision:g?b=h+(Tt(n)-Tt(o))+1:b=h,b<0)return new D(0);if(b=b/ft+2|0,f=0,O==1)for(v=0,R=R[0],b++;(f<L||v)&&b--;f++)S=v*Ft+(B[f]||0),C[f]=S/R|0,v=S%R|0;else{for(v=Ft/(R[0]+1)|0,v>1&&(R=e(R,v),B=e(B,v),O=R.length,L=B.length),E=O,_=B.slice(0,O),d=_.length;d<O;)_[d++]=0;M=R.slice(),M.unshift(0),x=R[0],R[1]>=Ft/2&&++x;do v=0,a=t(R,_,O,d),a<0?(y=_[0],O!=d&&(y=y*Ft+(_[1]||0)),v=y/x|0,v>1?(v>=Ft&&(v=Ft-1),u=e(R,v),m=u.length,d=_.length,a=t(u,_,m,d),a==1&&(v--,r(u,O<m?M:R,m))):(v==0&&(a=v=1),u=R.slice()),m=u.length,m<d&&u.unshift(0),r(_,u,d),a==-1&&(d=_.length,a=t(R,_,O,d),a<1&&(v++,r(_,O<d?M:R,d))),d=_.length):a===0&&(v++,_=[0]),C[f++]=v,a&&_[0]?_[d++]=B[E]||0:(_=[B[E]],d=1);while((E++<L||_[0]!==void 0)&&b--)}return C[0]||C.shift(),w.e=c,at(w,g?h+Tt(w)+1:h)}})();function zA(e,t){var r,n,o,h,g,a,c=0,f=0,v=e.constructor,u=v.precision;if(Tt(e)>16)throw Error(fm+Tt(e));if(!e.s)return new v(Dr);for(gt=!1,a=u,g=new v(.03125);e.abs().gte(.1);)e=e.times(g),f+=5;for(n=Math.log(ws(2,f))/Math.LN10*2+5|0,a+=n,r=o=h=new v(Dr),v.precision=a;;){if(o=at(o.times(e),a),r=r.times(++c),g=h.plus(rn(o,r,a)),Li(g.d).slice(0,a)===Li(h.d).slice(0,a)){for(;f--;)h=at(h.times(h),a);return v.precision=u,t==null?(gt=!0,at(h,u)):h}h=g}}function Tt(e){for(var t=e.e*ft,r=e.d[0];r>=10;r/=10)t++;return t}function rg(e,t,r){if(t>e.LN10.sd())throw gt=!0,r&&(e.precision=r),Error(ti+"LN10 precision limit exceeded");return at(new e(e.LN10),t)}function qn(e){for(var t="";e--;)t+="0";return t}function El(e,t){var r,n,o,h,g,a,c,f,v,u=1,m=10,w=e,C=w.d,_=w.constructor,d=_.precision;if(w.s<1)throw Error(ti+(w.s?"NaN":"-Infinity"));if(w.eq(Dr))return new _(0);if(t==null?(gt=!1,f=d):f=t,w.eq(10))return t==null&&(gt=!0),rg(_,f);if(f+=m,_.precision=f,r=Li(C),n=r.charAt(0),h=Tt(w),Math.abs(h)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)w=w.times(e),r=Li(w.d),n=r.charAt(0),u++;h=Tt(w),n>1?(w=new _("0."+r),h++):w=new _(n+"."+r.slice(1))}else return c=rg(_,f+2,d).times(h+""),w=El(new _(n+"."+r.slice(1)),f-m).plus(c),_.precision=d,t==null?(gt=!0,at(w,d)):w;for(a=g=w=rn(w.minus(Dr),w.plus(Dr),f),v=at(w.times(w),f),o=3;;){if(g=at(g.times(v),f),c=a.plus(rn(g,new _(o),f)),Li(c.d).slice(0,f)===Li(a.d).slice(0,f))return a=a.times(2),h!==0&&(a=a.plus(rg(_,f+2,d).times(h+""))),a=rn(a,new _(u),f),_.precision=d,t==null?(gt=!0,at(a,d)):a;a=c,o+=2}}function mx(e,t){var r,n,o;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(o=t.length;t.charCodeAt(o-1)===48;)--o;if(t=t.slice(n,o),t){if(o-=n,r=r-n-1,e.e=Xa(r/ft),e.d=[],n=(r+1)%ft,r<0&&(n+=ft),n<o){for(n&&e.d.push(+t.slice(0,n)),o-=ft;n<o;)e.d.push(+t.slice(n,n+=ft));t=t.slice(n),n=ft-t.length}else n-=o;for(;n--;)t+="0";if(e.d.push(+t),gt&&(e.e>uh||e.e<-uh))throw Error(fm+r)}else e.s=0,e.e=0,e.d=[0];return e}function at(e,t,r){var n,o,h,g,a,c,f,v,u=e.d;for(g=1,h=u[0];h>=10;h/=10)g++;if(n=t-g,n<0)n+=ft,o=t,f=u[v=0];else{if(v=Math.ceil((n+1)/ft),h=u.length,v>=h)return e;for(f=h=u[v],g=1;h>=10;h/=10)g++;n%=ft,o=n-ft+g}if(r!==void 0&&(h=ws(10,g-o-1),a=f/h%10|0,c=t<0||u[v+1]!==void 0||f%h,c=r<4?(a||c)&&(r==0||r==(e.s<0?3:2)):a>5||a==5&&(r==4||c||r==6&&(n>0?o>0?f/ws(10,g-o):0:u[v-1])%10&1||r==(e.s<0?8:7))),t<1||!u[0])return c?(h=Tt(e),u.length=1,t=t-h-1,u[0]=ws(10,(ft-t%ft)%ft),e.e=Xa(-t/ft)||0):(u.length=1,u[0]=e.e=e.s=0),e;if(n==0?(u.length=v,h=1,v--):(u.length=v+1,h=ws(10,ft-n),u[v]=o>0?(f/ws(10,g-o)%ws(10,o)|0)*h:0),c)for(;;)if(v==0){(u[0]+=h)==Ft&&(u[0]=1,++e.e);break}else{if(u[v]+=h,u[v]!=Ft)break;u[v--]=0,h=1}for(n=u.length;u[--n]===0;)u.pop();if(gt&&(e.e>uh||e.e<-uh))throw Error(fm+Tt(e));return e}function HA(e,t){var r,n,o,h,g,a,c,f,v,u,m=e.constructor,w=m.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new m(e),gt?at(t,w):t;if(c=e.d,u=t.d,n=t.e,f=e.e,c=c.slice(),g=f-n,g){for(v=g<0,v?(r=c,g=-g,a=u.length):(r=u,n=f,a=c.length),o=Math.max(Math.ceil(w/ft),a)+2,g>o&&(g=o,r.length=1),r.reverse(),o=g;o--;)r.push(0);r.reverse()}else{for(o=c.length,a=u.length,v=o<a,v&&(a=o),o=0;o<a;o++)if(c[o]!=u[o]){v=c[o]<u[o];break}g=0}for(v&&(r=c,c=u,u=r,t.s=-t.s),a=c.length,o=u.length-a;o>0;--o)c[a++]=0;for(o=u.length;o>g;){if(c[--o]<u[o]){for(h=o;h&&c[--h]===0;)c[h]=Ft-1;--c[h],c[o]+=Ft}c[o]-=u[o]}for(;c[--a]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(t.d=c,t.e=n,gt?at(t,w):t):new m(0)}function js(e,t,r){var n,o=Tt(e),h=Li(e.d),g=h.length;return t?(r&&(n=r-g)>0?h=h.charAt(0)+"."+h.slice(1)+qn(n):g>1&&(h=h.charAt(0)+"."+h.slice(1)),h=h+(o<0?"e":"e+")+o):o<0?(h="0."+qn(-o-1)+h,r&&(n=r-g)>0&&(h+=qn(n))):o>=g?(h+=qn(o+1-g),r&&(n=r-o-1)>0&&(h=h+"."+qn(n))):((n=o+1)<g&&(h=h.slice(0,n)+"."+h.slice(n)),r&&(n=r-g)>0&&(o+1===g&&(h+="."),h+=qn(n))),e.s<0?"-"+h:h}function yx(e,t){if(e.length>t)return e.length=t,!0}function $A(e){var t,r,n;function o(h){var g=this;if(!(g instanceof o))return new o(h);if(g.constructor=o,h instanceof o){g.s=h.s,g.e=h.e,g.d=(h=h.d)?h.slice():h;return}if(typeof h=="number"){if(h*0!==0)throw Error(Os+h);if(h>0)g.s=1;else if(h<0)h=-h,g.s=-1;else{g.s=0,g.e=0,g.d=[0];return}if(h===~~h&&h<1e7){g.e=0,g.d=[h];return}return mx(g,h.toString())}else if(typeof h!="string")throw Error(Os+h);if(h.charCodeAt(0)===45?(h=h.slice(1),g.s=-1):g.s=1,bI.test(h))mx(g,h);else throw Error(Os+h)}if(o.prototype=xe,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=$A,o.config=o.set=SI,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return o.config(e),o}function SI(e){if(!e||typeof e!="object")throw Error(ti+"Object expected");var t,r,n,o=["precision",1,Va,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<o.length;t+=3)if((n=e[r=o[t]])!==void 0)if(Xa(n)===n&&n>=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(Os+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Os+r+": "+n);return this}var dm=$A(yI);Dr=new dm(1);const et=dm;function UA(e){var t;return e===0?t=1:t=Math.floor(new et(e).abs().log(10).toNumber())+1,t}function FA(e,t,r){for(var n=new et(e),o=0,h=[];n.lt(t)&&o<1e5;)h.push(n.toNumber()),n=n.add(r),o++;return h}var qA=e=>{var[t,r]=e,[n,o]=[t,r];return t>r&&([n,o]=[r,t]),[n,o]},WA=(e,t,r)=>{if(e.lte(0))return new et(0);var n=UA(e.toNumber()),o=new et(10).pow(n),h=e.div(o),g=n!==1?.05:.1,a=new et(Math.ceil(h.div(g).toNumber())).add(r).mul(g),c=a.mul(o);return t?new et(c.toNumber()):new et(Math.ceil(c.toNumber()))},wI=(e,t,r)=>{var n=new et(1),o=new et(e);if(!o.isint()&&r){var h=Math.abs(e);h<1?(n=new et(10).pow(UA(e)-1),o=new et(Math.floor(o.div(n).toNumber())).mul(n)):h>1&&(o=new et(Math.floor(e)))}else e===0?o=new et(Math.floor((t-1)/2)):r||(o=new et(Math.floor(e)));for(var g=Math.floor((t-1)/2),a=[],c=0;c<t;c++)a.push(o.add(new et(c-g).mul(n)).toNumber());return a},GA=function(t,r,n,o){var h=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((r-t)/(n-1)))return{step:new et(0),tickMin:new et(0),tickMax:new et(0)};var g=WA(new et(r).sub(t).div(n-1),o,h),a;t<=0&&r>=0?a=new et(0):(a=new et(t).add(r).div(2),a=a.sub(new et(a).mod(g)));var c=Math.ceil(a.sub(t).div(g).toNumber()),f=Math.ceil(new et(r).sub(a).div(g).toNumber()),v=c+f+1;return v>n?GA(t,r,n,o,h+1):(v<n&&(f=r>0?f+(n-v):f,c=r>0?c:c+(n-v)),{step:g,tickMin:a.sub(new et(c).mul(g)),tickMax:a.add(new et(f).mul(g))})},CI=function(t){var[r,n]=t,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,g=Math.max(o,2),[a,c]=qA([r,n]);if(a===-1/0||c===1/0){var f=c===1/0?[a,...Array(o-1).fill(1/0)]:[...Array(o-1).fill(-1/0),c];return r>n?f.reverse():f}if(a===c)return wI(a,o,h);var{step:v,tickMin:u,tickMax:m}=GA(a,c,g,h,0),w=FA(u,m.add(new et(.1).mul(v)),v);return r>n?w.reverse():w},xI=function(t,r){var[n,o]=t,h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[g,a]=qA([n,o]);if(g===-1/0||a===1/0)return[n,o];if(g===a)return[g];var c=Math.max(r,2),f=WA(new et(a).sub(g).div(c-1),h,0),v=[...FA(new et(g),new et(a),f),a];return h===!1&&(v=v.map(u=>Math.round(u))),n>o?v.reverse():v},KA=e=>e.rootProps.maxBarSize,EI=e=>e.rootProps.barGap,YA=e=>e.rootProps.barCategoryGap,AI=e=>e.rootProps.barSize,Qh=e=>e.rootProps.stackOffset,VA=e=>e.rootProps.reverseStackOrder,vm=e=>e.options.chartName,pm=e=>e.rootProps.syncId,XA=e=>e.rootProps.syncMethod,gm=e=>e.options.eventEmitter,wr={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},ys={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},xi={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},Jh=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function ef(e,t,r){if(r!=="auto")return r;if(e!=null)return Qn(e,t)?"category":"number"}function bx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function hh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bx(Object(r),!0).forEach(function(n){MI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function MI(e,t,r){return(t=LI(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LI(e){var t=OI(e,"string");return typeof t=="symbol"?t:t+""}function OI(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Sx={allowDataOverflow:ys.allowDataOverflow,allowDecimals:ys.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:ys.angleAxisId,includeHidden:!1,name:void 0,reversed:ys.reversed,scale:ys.scale,tick:ys.tick,tickCount:void 0,ticks:void 0,type:ys.type,unit:void 0},wx={allowDataOverflow:xi.allowDataOverflow,allowDecimals:xi.allowDecimals,allowDuplicatedCategory:xi.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:xi.radiusAxisId,includeHidden:xi.includeHidden,name:void 0,reversed:xi.reversed,scale:xi.scale,tick:xi.tick,tickCount:xi.tickCount,ticks:void 0,type:xi.type,unit:void 0},TI=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},_m=le([TI,jE],(e,t)=>{var r;if(e!=null)return e;var n=(r=ef(t,"angleAxis",Sx.type))!==null&&r!==void 0?r:"category";return hh(hh({},Sx),{},{type:n})}),DI=(e,t)=>e.polarAxis.radiusAxis[t],mm=le([DI,jE],(e,t)=>{var r;if(e!=null)return e;var n=(r=ef(t,"radiusAxis",wx.type))!==null&&r!==void 0?r:"category";return hh(hh({},wx),{},{type:n})}),tf=e=>e.polarOptions,ym=le([dn,vn,Wt],LB),ZA=le([tf,ym],(e,t)=>{if(e!=null)return vi(e.innerRadius,t,0)}),QA=le([tf,ym],(e,t)=>{if(e!=null)return vi(e.outerRadius,t,t*.8)}),RI=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},JA=le([tf],RI);le([_m,JA],Jh);var eM=le([ym,ZA,QA],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});le([mm,eM],Jh);var tM=le([ot,tf,ZA,QA,dn,vn],(e,t,r,n,o,h)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var{cx:g,cy:a,startAngle:c,endAngle:f}=t;return{cx:vi(g,o,o/2),cy:vi(a,h,h/2),innerRadius:r,outerRadius:n,startAngle:c,endAngle:f,clockWise:!1}}}),Kt=(e,t)=>t,rf=(e,t,r)=>r;function bm(e){return e==null?void 0:e.id}function rM(e,t,r){var{chartData:n=[]}=t,{allowDuplicatedCategory:o,dataKey:h}=r,g=new Map;return e.forEach(a=>{var c,f=(c=a.data)!==null&&c!==void 0?c:n;if(!(f==null||f.length===0)){var v=bm(a);f.forEach((u,m)=>{var w=h==null||o?m:String(sr(u,h,null)),C=sr(u,a.dataKey,0),_;g.has(w)?_=g.get(w):_={},Object.assign(_,{[v]:C}),g.set(w,_)})}}),Array.from(g.values())}function nf(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var sf=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function af(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function kI(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return!1}var Yt=e=>{var t=ot(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Za=e=>e.tooltip.settings.axisId;function PI(e){if(e in cl)return cl[e]();var t="scale".concat(Ll(e));if(t in cl)return cl[t]()}function Cx(e){var t=e.ticks,r=e.bandwidth,n=e.range(),o=[Math.min(...n),Math.max(...n)];return{domain:()=>e.domain(),range:(function(h){function g(){return h.apply(this,arguments)}return g.toString=function(){return h.toString()},g})(()=>o),rangeMin:()=>o[0],rangeMax:()=>o[1],isInRange(h){var g=o[0],a=o[1];return g<=a?h>=g&&h<=a:h>=a&&h<=g},bandwidth:r?()=>r.call(e):void 0,ticks:t?h=>t.call(e,h):void 0,map:(h,g)=>{var a=e(h);if(a!=null){if(e.bandwidth&&g!==null&&g!==void 0&&g.position){var c=e.bandwidth();switch(g.position){case"middle":a+=c/2;break;case"end":a+=c;break}}return a}}}}function xx(e,t,r){if(typeof e=="function")return Cx(e.copy().domain(t).range(r));if(e!=null){var n=PI(e);if(n!=null)return n.domain(t).range(r),Cx(n)}}var BI=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!cn(t)){for(var r,n,o=0;o<t.length;o++){var h=t[o];Ze(h)&&((r===void 0||h<r)&&(r=h),(n===void 0||h>n)&&(n=h))}return r!==void 0&&n!==void 0?[r,n]:void 0}return t}default:return t}};function Ex(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function fh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ex(Object(r),!0).forEach(function(n){jI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ex(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jI(e,t,r){return(t=II(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function II(e){var t=NI(e,"string");return typeof t=="symbol"?t:t+""}function NI(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var r_=[0,"auto"],$t={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0},iM=(e,t)=>e.cartesianAxis.xAxis[t],_n=(e,t)=>{var r=iM(e,t);return r??$t},Ut={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:r_,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:Dl},nM=(e,t)=>e.cartesianAxis.yAxis[t],mn=(e,t)=>{var r=nM(e,t);return r??Ut},zI={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},Sm=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??zI},dr=(e,t,r)=>{switch(t){case"xAxis":return _n(e,r);case"yAxis":return mn(e,r);case"zAxis":return Sm(e,r);case"angleAxis":return _m(e,r);case"radiusAxis":return mm(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},HI=(e,t,r)=>{switch(t){case"xAxis":return _n(e,r);case"yAxis":return mn(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},Nl=(e,t,r)=>{switch(t){case"xAxis":return _n(e,r);case"yAxis":return mn(e,r);case"angleAxis":return _m(e,r);case"radiusAxis":return mm(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},sM=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function aM(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var wm=e=>e.graphicalItems.cartesianItems,$I=le([Kt,rf],aM),oM=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),zl=le([wm,dr,$I],oM,{memoizeOptions:{resultEqualityCheck:af}}),lM=le([zl],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(nf)),cM=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),UI=le([zl],cM),uM=e=>e.map(t=>t.data).filter(Boolean).flat(1),FI=le([zl],uM,{memoizeOptions:{resultEqualityCheck:af}}),hM=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:o}=t;return e.length>0?e:r.slice(n,o+1)},Cm=le([FI,BA],hM),fM=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:sr(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(o=>({value:sr(o,n)}))):e.map(n=>({value:n})),of=le([Cm,dr,zl],fM);function dM(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function Eu(e){if(Di(e)||e instanceof Date){var t=Number(e);if(Ze(t))return t}}function Ax(e){if(Array.isArray(e)){var t=[Eu(e[0]),Eu(e[1])];return cn(t)?t:void 0}var r=Eu(e);if(r!=null)return[r,r]}function un(e){return e.map(Eu).filter(Ai)}function qI(e,t,r){return!r||typeof t!="number"||Ti(t)?[]:r.length?un(r.flatMap(n=>{var o=sr(e,n.dataKey),h,g;if(Array.isArray(o)?[h,g]=o:h=g=o,!(!Ze(h)||!Ze(g)))return[t-h,t+g]})):[]}var jt=e=>{var t=Yt(e),r=Za(e);return Nl(e,t,r)},Hl=le([jt],e=>e==null?void 0:e.dataKey),WI=le([lM,BA,jt],rM),vM=(e,t,r,n)=>{var o={},h=t.reduce((g,a)=>{if(a.stackId==null)return g;var c=g[a.stackId];return c==null&&(c=[]),c.push(a),g[a.stackId]=c,g},o);return Object.fromEntries(Object.entries(h).map(g=>{var[a,c]=g,f=n?[...c].reverse():c,v=f.map(bm);return[a,{stackedData:pP(e,v,r),graphicalItems:f}]}))},i_=le([WI,lM,Qh,VA],vM),pM=(e,t,r,n)=>{var{dataStartIndex:o,dataEndIndex:h}=t;if(n==null&&r!=="zAxis"){var g=bP(e,o,h);if(!(g!=null&&g[0]===0&&g[1]===0))return g}},GI=le([dr],e=>e.allowDataOverflow),xm=e=>{var t;if(e==null||!("domain"in e))return r_;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=un(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:r_},gM=le([dr],xm),_M=le([gM,GI],jA),KI=le([i_,gn,Kt,_M],pM,{memoizeOptions:{resultEqualityCheck:sf}}),Em=e=>e.errorBars,YI=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>dM(r,n)),dh=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=r.filter(Boolean);if(o.length!==0){var h=o.flat(),g=Math.min(...h),a=Math.max(...h);return[g,a]}},mM=(e,t,r,n,o)=>{var h,g;if(r.length>0&&e.forEach(a=>{r.forEach(c=>{var f,v,u=(f=n[c.id])===null||f===void 0?void 0:f.filter(y=>dM(o,y)),m=sr(a,(v=t.dataKey)!==null&&v!==void 0?v:c.dataKey),w=qI(a,m,u);if(w.length>=2){var C=Math.min(...w),_=Math.max(...w);(h==null||C<h)&&(h=C),(g==null||_>g)&&(g=_)}var d=Ax(m);d!=null&&(h=h==null?d[0]:Math.min(h,d[0]),g=g==null?d[1]:Math.max(g,d[1]))})}),(t==null?void 0:t.dataKey)!=null&&e.forEach(a=>{var c=Ax(sr(a,t.dataKey));c!=null&&(h=h==null?c[0]:Math.min(h,c[0]),g=g==null?c[1]:Math.max(g,c[1]))}),Ze(h)&&Ze(g))return[h,g]},VI=le([Cm,dr,UI,Em,Kt],mM,{memoizeOptions:{resultEqualityCheck:sf}});function XI(e){var{value:t}=e;if(Di(t)||t instanceof Date)return t}var ZI=(e,t,r)=>{var n=e.map(XI).filter(o=>o!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&N2(n))?eA(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},yM=e=>e.referenceElements.dots,Qa=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),QI=le([yM,Kt,rf],Qa),bM=e=>e.referenceElements.areas,JI=le([bM,Kt,rf],Qa),SM=e=>e.referenceElements.lines,eN=le([SM,Kt,rf],Qa),wM=(e,t)=>{if(e!=null){var r=un(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},tN=le(QI,Kt,wM),CM=(e,t)=>{if(e!=null){var r=un(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},rN=le([JI,Kt],CM);function iN(e){var t;if(e.x!=null)return un([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:un(r)}function nN(e){var t;if(e.y!=null)return un([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:un(r)}var xM=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?iN(n):nN(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},sN=le([eN,Kt],xM),aN=le(tN,sN,rN,(e,t,r)=>dh(e,r,t)),EM=(e,t,r,n,o,h,g,a)=>{if(r!=null)return r;var c=g==="vertical"&&a==="xAxis"||g==="horizontal"&&a==="yAxis",f=c?dh(n,h,o):dh(h,o);return mI(t,f,e.allowDataOverflow)},oN=le([dr,gM,_M,KI,VI,aN,ot,Kt],EM,{memoizeOptions:{resultEqualityCheck:sf}}),lN=[0,1],AM=(e,t,r,n,o,h,g)=>{if(!((e==null||r==null||r.length===0)&&g===void 0)){var{dataKey:a,type:c}=e,f=Qn(t,h);if(f&&a==null){var v;return eA(0,(v=r==null?void 0:r.length)!==null&&v!==void 0?v:0)}return c==="category"?ZI(n,e,f):o==="expand"?lN:g}},Am=le([dr,ot,Cm,of,Qh,Kt,oN],AM);function cN(e){return e in cl}var MM=(e,t,r)=>{if(e!=null){var{scale:n,type:o}=e;if(n==="auto")return o==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!t)?"point":o==="category"?"band":"linear";if(typeof n=="string"){var h="scale".concat(Ll(n));return cN(h)?h:"point"}}},Ja=le([dr,sM,vm],MM);function Mm(e,t,r,n){if(!(r==null||n==null))return typeof e.scale=="function"?xx(e.scale,r,n):xx(t,r,n)}var LM=(e,t,r)=>{var n=xm(t);if(!(r!=="auto"&&r!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(n)&&(n[0]==="auto"||n[1]==="auto")&&cn(e))return CI(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&cn(e))return xI(e,t.tickCount,t.allowDecimals)}},Lm=le([Am,Nl,Ja],LM),OM=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&cn(t)&&Array.isArray(r)&&r.length>0){var o,h,g=t[0],a=(o=r[0])!==null&&o!==void 0?o:0,c=t[1],f=(h=r[r.length-1])!==null&&h!==void 0?h:0;return[Math.min(g,a),Math.max(c,f)]}return t},uN=le([dr,Am,Lm,Kt],OM),hN=le(of,dr,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(un(e.map(u=>u.value))).sort((u,m)=>u-m),o=n[0],h=n[n.length-1];if(o==null||h==null)return 1/0;var g=h-o;if(g===0)return 1/0;for(var a=0;a<n.length-1;a++){var c=n[a],f=n[a+1];if(!(c==null||f==null)){var v=f-c;r=Math.min(r,v)}}return r/g}}),TM=le(hN,ot,YA,Wt,(e,t,r,n,o)=>o,(e,t,r,n,o)=>{if(!Ze(e))return 0;var h=t==="vertical"?n.height:n.width;if(o==="gap")return e*h/2;if(o==="no-gap"){var g=vi(r,e*h),a=e*h/2;return a-g-(a-g)/h*g}return 0}),fN=(e,t,r)=>{var n=_n(e,t);return n==null||typeof n.padding!="string"?0:TM(e,"xAxis",t,r,n.padding)},dN=(e,t,r)=>{var n=mn(e,t);return n==null||typeof n.padding!="string"?0:TM(e,"yAxis",t,r,n.padding)},vN=le(_n,fN,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var{padding:o}=e;return typeof o=="string"?{left:t,right:t}:{left:((r=o.left)!==null&&r!==void 0?r:0)+t,right:((n=o.right)!==null&&n!==void 0?n:0)+t}}),pN=le(mn,dN,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var{padding:o}=e;return typeof o=="string"?{top:t,bottom:t}:{top:((r=o.top)!==null&&r!==void 0?r:0)+t,bottom:((n=o.bottom)!==null&&n!==void 0?n:0)+t}}),gN=le([Wt,vN,Hh,zh,(e,t,r)=>r],(e,t,r,n,o)=>{var{padding:h}=n;return o?[h.left,r.width-h.right]:[e.left+t.left,e.left+e.width-t.right]}),_N=le([Wt,ot,pN,Hh,zh,(e,t,r)=>r],(e,t,r,n,o,h)=>{var{padding:g}=o;return h?[n.height-g.bottom,g.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),$l=(e,t,r,n)=>{var o;switch(t){case"xAxis":return gN(e,r,n);case"yAxis":return _N(e,r,n);case"zAxis":return(o=Sm(e,r))===null||o===void 0?void 0:o.range;case"angleAxis":return JA(e);case"radiusAxis":return eM(e,r);default:return}},DM=le([dr,$l],Jh),mN=le([Ja,uN],BI),lf=le([dr,Ja,mN,DM],Mm);le([zl,Em,Kt],YI);function RM(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var cf=(e,t)=>t,uf=(e,t,r)=>r,yN=le(Ih,cf,uf,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(RM)),bN=le(Nh,cf,uf,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(RM)),kM=(e,t)=>({width:e.width,height:t.height}),SN=(e,t)=>{var r=typeof t.width=="number"?t.width:Dl;return{width:r,height:e.height}},PM=le(Wt,_n,kM),wN=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},CN=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},xN=le(vn,Wt,yN,cf,uf,(e,t,r,n,o)=>{var h={},g;return r.forEach(a=>{var c=kM(t,a);g==null&&(g=wN(t,n,e));var f=n==="top"&&!o||n==="bottom"&&o;h[a.id]=g-Number(f)*c.height,g+=(f?-1:1)*c.height}),h}),EN=le(dn,Wt,bN,cf,uf,(e,t,r,n,o)=>{var h={},g;return r.forEach(a=>{var c=SN(t,a);g==null&&(g=CN(t,n,e));var f=n==="left"&&!o||n==="right"&&o;h[a.id]=g-Number(f)*c.width,g+=(f?-1:1)*c.width}),h}),AN=(e,t)=>{var r=_n(e,t);if(r!=null)return xN(e,r.orientation,r.mirror)},MN=le([Wt,_n,AN,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var o=r==null?void 0:r[n];return o==null?{x:e.left,y:0}:{x:e.left,y:o}}}),LN=(e,t)=>{var r=mn(e,t);if(r!=null)return EN(e,r.orientation,r.mirror)},ON=le([Wt,mn,LN,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var o=r==null?void 0:r[n];return o==null?{x:0,y:e.top}:{x:o,y:e.top}}}),BM=le(Wt,mn,(e,t)=>{var r=typeof t.width=="number"?t.width:Dl;return{width:r,height:e.height}}),Mx=(e,t,r)=>{switch(t){case"xAxis":return PM(e,r).width;case"yAxis":return BM(e,r).height;default:return}},jM=(e,t,r,n)=>{if(r!=null){var{allowDuplicatedCategory:o,type:h,dataKey:g}=r,a=Qn(e,n),c=t.map(f=>f.value);if(g&&a&&h==="category"&&o&&N2(c))return c}},Om=le([ot,of,dr,Kt],jM),IM=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:o,scale:h}=r,g=Qn(e,n);if(g&&(o==="number"||h!=="auto"))return t.map(a=>a.value)}},Tm=le([ot,of,Nl,Kt],IM);le([ot,HI,Ja,lf,Om,Tm,$l,Lm,Kt],(e,t,r,n,o,h,g,a,c)=>{if(t!=null){var f=Qn(e,c);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:c,categoricalDomain:h,duplicateDomain:o,isCategorical:f,niceTicks:a,range:g,realScaleType:r,scale:n}}});var TN=(e,t,r,n,o,h,g,a,c)=>{if(!(t==null||n==null)){var f=Qn(e,c),{type:v,ticks:u,tickCount:m}=t,w=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,C=v==="category"&&n.bandwidth?n.bandwidth()/w:0;C=c==="angleAxis"&&h!=null&&h.length>=2?Rr(h[0]-h[1])*2*C:C;var _=u||o;return _?_.map((d,y)=>{var b=g?g.indexOf(d):d,S=n.map(b);return Ze(S)?{index:y,coordinate:S+C,value:d,offset:C}:null}).filter(Ai):f&&a?a.map((d,y)=>{var b=n.map(d);return Ze(b)?{coordinate:b+C,value:d,index:y,offset:C}:null}).filter(Ai):n.ticks?n.ticks(m).map((d,y)=>{var b=n.map(d);return Ze(b)?{coordinate:b+C,value:d,index:y,offset:C}:null}).filter(Ai):n.domain().map((d,y)=>{var b=n.map(d);return Ze(b)?{coordinate:b+C,value:g?g[d]:d,index:y,offset:C}:null}).filter(Ai)}},NM=le([ot,Nl,Ja,lf,Lm,$l,Om,Tm,Kt],TN),DN=(e,t,r,n,o,h,g)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var a=Qn(e,g),{tickCount:c}=t,f=0;return f=g==="angleAxis"&&(n==null?void 0:n.length)>=2?Rr(n[0]-n[1])*2*f:f,a&&h?h.map((v,u)=>{var m=r.map(v);return Ze(m)?{coordinate:m+f,value:v,index:u,offset:f}:null}).filter(Ai):r.ticks?r.ticks(c).map((v,u)=>{var m=r.map(v);return Ze(m)?{coordinate:m+f,value:v,index:u,offset:f}:null}).filter(Ai):r.domain().map((v,u)=>{var m=r.map(v);return Ze(m)?{coordinate:m+f,value:o?o[v]:v,index:u,offset:f}:null}).filter(Ai)}},Ua=le([ot,Nl,lf,$l,Om,Tm,Kt],DN),Fa=le(dr,lf,(e,t)=>{if(!(e==null||t==null))return fh(fh({},e),{},{scale:t})}),RN=le([dr,Ja,Am,DM],Mm);le((e,t,r)=>Sm(e,r),RN,(e,t)=>{if(!(e==null||t==null))return fh(fh({},e),{},{scale:t})});var kN=le([ot,Ih,Nh],(e,t,r)=>{switch(e){case"horizontal":return t.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),zM=e=>e.options.defaultTooltipEventType,HM=e=>e.options.validateTooltipEventTypes;function $M(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function Dm(e,t){var r=zM(e),n=HM(e);return $M(t,r,n)}function PN(e){return Re(t=>Dm(t,e))}var UM=(e,t)=>{var r,n=Number(t);if(!(Ti(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},BN=e=>e.tooltip.settings,Gn={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},jN={itemInteraction:{click:Gn,hover:Gn},axisInteraction:{click:Gn,hover:Gn},keyboardInteraction:Gn,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},FM=Cr({name:"tooltip",initialState:jN,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:pt()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:r,next:n}=t.payload,o=di(e).tooltipItemPayloads.indexOf(r);o>-1&&(e.tooltipItemPayloads[o]=n)},prepare:pt()},removeTooltipEntrySettings:{reducer(e,t){var r=di(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:pt()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:IN,replaceTooltipEntrySettings:NN,removeTooltipEntrySettings:zN,setTooltipSettingsState:HN,setActiveMouseOverItemIndex:qM,mouseLeaveItem:$N,mouseLeaveChart:WM,setActiveClickItemIndex:UN,setMouseOverAxisIndex:GM,setMouseClickAxisIndex:FN,setSyncInteraction:n_,setKeyboardInteraction:s_}=FM.actions,qN=FM.reducer;function Lx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function _u(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lx(Object(r),!0).forEach(function(n){WN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function WN(e,t,r){return(t=GN(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GN(e){var t=KN(e,"string");return typeof t=="symbol"?t:t+""}function KN(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function YN(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function VN(e){return e.index!=null}var KM=(e,t,r,n)=>{if(t==null)return Gn;var o=YN(e,t,r);if(o==null)return Gn;if(o.active)return o;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var h=e.settings.active===!0;if(VN(o)){if(h)return _u(_u({},o),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return _u(_u({},Gn),{},{coordinate:o.coordinate})};function XN(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var r=Number(e);return Number.isFinite(r)?r:void 0}function ZN(e,t){var r=XN(e),n=t[0],o=t[1];if(r===void 0)return!1;var h=Math.min(n,o),g=Math.max(n,o);return r>=h&&r<=g}function QN(e,t,r){if(r==null||t==null)return!0;var n=sr(e,t);return n==null||!cn(r)?!0:ZN(n,r)}var Rm=(e,t,r,n)=>{var o=e==null?void 0:e.index;if(o==null)return null;var h=Number(o);if(!Ze(h))return o;var g=0,a=1/0;t.length>0&&(a=t.length-1);var c=Math.max(g,Math.min(h,a)),f=t[c];return f==null||QN(f,r,n)?String(c):null},YM=(e,t,r,n,o,h,g)=>{if(h!=null){var a=g[0],c=a==null?void 0:a.getPosition(h);if(c!=null)return c;var f=o==null?void 0:o[Number(h)];if(f)switch(r){case"horizontal":return{x:f.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:f.coordinate}}}},VM=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var o;if(r==="hover"?o=e.itemInteraction.hover.graphicalItemId:o=e.itemInteraction.click.graphicalItemId,o==null&&n!=null){var h=e.tooltipItemPayloads[0];return h!=null?[h]:[]}return e.tooltipItemPayloads.filter(g=>{var a;return((a=g.settings)===null||a===void 0?void 0:a.graphicalItemId)===o})},XM=e=>e.options.tooltipPayloadSearcher,eo=e=>e.tooltip;function Ox(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Tx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ox(Object(r),!0).forEach(function(n){JN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ox(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JN(e,t,r){return(t=e7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function e7(e){var t=t7(e,"string");return typeof t=="symbol"?t:t+""}function t7(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function r7(e,t){return e??t}var ZM=(e,t,r,n,o,h,g)=>{if(!(t==null||h==null)){var{chartData:a,computedData:c,dataStartIndex:f,dataEndIndex:v}=r,u=[];return e.reduce((m,w)=>{var C,{dataDefinedOnItem:_,settings:d}=w,y=r7(_,a),b=Array.isArray(y)?OE(y,f,v):y,S=(C=d==null?void 0:d.dataKey)!==null&&C!==void 0?C:n,E=d==null?void 0:d.nameKey,L;if(n&&Array.isArray(b)&&!Array.isArray(b[0])&&g==="axis"?L=V3(b,n,o):L=h(b,t,c,E),Array.isArray(L))L.forEach(O=>{var M=Tx(Tx({},d),{},{name:O.name,unit:O.unit,color:void 0,fill:void 0});m.push(Tw({tooltipEntrySettings:M,dataKey:O.dataKey,payload:O.payload,value:sr(O.payload,O.dataKey),name:O.name}))});else{var x;m.push(Tw({tooltipEntrySettings:d,dataKey:S,payload:L,value:sr(L,S),name:(x=sr(L,E))!==null&&x!==void 0?x:d==null?void 0:d.name}))}return m},u)}},km=le([jt,sM,vm],MM),i7=le([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),n7=le([Yt,Za],aM),to=le([i7,jt,n7],oM,{memoizeOptions:{resultEqualityCheck:af}}),s7=le([to],e=>e.filter(nf)),a7=le([to],uM,{memoizeOptions:{resultEqualityCheck:af}}),ro=le([a7,gn],hM),o7=le([s7,gn,jt],rM),Pm=le([ro,jt,to],fM),QM=le([jt],xm),l7=le([jt],e=>e.allowDataOverflow),JM=le([QM,l7],jA),c7=le([to],e=>e.filter(nf)),u7=le([o7,c7,Qh,VA],vM),h7=le([u7,gn,Yt,JM],pM),f7=le([to],cM),d7=le([ro,jt,f7,Em,Yt],mM,{memoizeOptions:{resultEqualityCheck:sf}}),v7=le([yM,Yt,Za],Qa),p7=le([v7,Yt],wM),g7=le([bM,Yt,Za],Qa),_7=le([g7,Yt],CM),m7=le([SM,Yt,Za],Qa),y7=le([m7,Yt],xM),b7=le([p7,y7,_7],dh),S7=le([jt,QM,JM,h7,d7,b7,ot,Yt],EM),Ul=le([jt,ot,ro,Pm,Qh,Yt,S7],AM),w7=le([Ul,jt,km],LM),C7=le([jt,Ul,w7,Yt],OM),eL=e=>{var t=Yt(e),r=Za(e),n=!1;return $l(e,t,r,n)},tL=le([jt,eL],Jh),rL=le([jt,km,C7,tL],Mm),x7=le([ot,Pm,jt,Yt],jM),E7=le([ot,Pm,jt,Yt],IM),A7=(e,t,r,n,o,h,g,a)=>{if(t){var{type:c}=t,f=Qn(e,a);if(n){var v=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,u=c==="category"&&n.bandwidth?n.bandwidth()/v:0;return u=a==="angleAxis"&&o!=null&&(o==null?void 0:o.length)>=2?Rr(o[0]-o[1])*2*u:u,f&&g?g.map((m,w)=>{var C=n.map(m);return Ze(C)?{coordinate:C+u,value:m,index:w,offset:u}:null}).filter(Ai):n.domain().map((m,w)=>{var C=n.map(m);return Ze(C)?{coordinate:C+u,value:h?h[m]:m,index:w,offset:u}:null}).filter(Ai)}}},yn=le([ot,jt,km,rL,eL,x7,E7,Yt],A7),Bm=le([zM,HM,BN],(e,t,r)=>$M(r.shared,e,t)),iL=e=>e.tooltip.settings.trigger,jm=e=>e.tooltip.settings.defaultIndex,Fl=le([eo,Bm,iL,jm],KM),qa=le([Fl,ro,Hl,Ul],Rm),nL=le([yn,qa],UM),sL=le([Fl],e=>{if(e)return e.dataKey});le([Fl],e=>{if(e)return e.graphicalItemId});var aL=le([eo,Bm,iL,jm],VM),M7=le([dn,vn,ot,Wt,yn,jm,aL],YM),L7=le([Fl,M7],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),O7=le([Fl],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),T7=le([aL,qa,gn,Hl,nL,XM,Bm],ZM);le([T7],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function Dx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Rx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Dx(Object(r),!0).forEach(function(n){D7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function D7(e,t,r){return(t=R7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function R7(e){var t=k7(e,"string");return typeof t=="symbol"?t:t+""}function k7(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var P7=()=>Re(jt),B7=()=>{var e=P7(),t=Re(yn),r=Re(rL);return Wu(!e||!r?void 0:Rx(Rx({},e),{},{scale:r}),t)};function kx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Oa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kx(Object(r),!0).forEach(function(n){j7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function j7(e,t,r){return(t=I7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function I7(e){var t=N7(e,"string");return typeof t=="symbol"?t:t+""}function N7(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var z7=(e,t,r,n)=>{var o=t.find(h=>h&&h.index===r);if(o){if(e==="horizontal")return{x:o.coordinate,y:n.chartY};if(e==="vertical")return{x:n.chartX,y:o.coordinate}}return{x:0,y:0}},H7=(e,t,r,n)=>{var o=t.find(f=>f&&f.index===r);if(o){if(e==="centric"){var h=o.coordinate,{radius:g}=n;return Oa(Oa(Oa({},n),nr(n.cx,n.cy,g,h)),{},{angle:h,radius:g})}var a=o.coordinate,{angle:c}=n;return Oa(Oa(Oa({},n),nr(n.cx,n.cy,a,c)),{},{angle:c,radius:a})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function $7(e,t){var{chartX:r,chartY:n}=e;return r>=t.left&&r<=t.left+t.width&&n>=t.top&&n<=t.top+t.height}var oL=(e,t,r,n,o)=>{var h,g=(h=t==null?void 0:t.length)!==null&&h!==void 0?h:0;if(g<=1||e==null)return 0;if(n==="angleAxis"&&o!=null&&Math.abs(Math.abs(o[1]-o[0])-360)<=1e-6)for(var a=0;a<g;a++){var c,f,v,u,m,w=a>0?(c=r[a-1])===null||c===void 0?void 0:c.coordinate:(f=r[g-1])===null||f===void 0?void 0:f.coordinate,C=(v=r[a])===null||v===void 0?void 0:v.coordinate,_=a>=g-1?(u=r[0])===null||u===void 0?void 0:u.coordinate:(m=r[a+1])===null||m===void 0?void 0:m.coordinate,d=void 0;if(!(w==null||C==null||_==null))if(Rr(C-w)!==Rr(_-C)){var y=[];if(Rr(_-C)===Rr(o[1]-o[0])){d=_;var b=C+o[1]-o[0];y[0]=Math.min(b,(b+w)/2),y[1]=Math.max(b,(b+w)/2)}else{d=w;var S=_+o[1]-o[0];y[0]=Math.min(C,(S+C)/2),y[1]=Math.max(C,(S+C)/2)}var E=[Math.min(C,(d+C)/2),Math.max(C,(d+C)/2)];if(e>E[0]&&e<=E[1]||e>=y[0]&&e<=y[1]){var L;return(L=r[a])===null||L===void 0?void 0:L.index}}else{var x=Math.min(w,_),O=Math.max(w,_);if(e>(x+C)/2&&e<=(O+C)/2){var M;return(M=r[a])===null||M===void 0?void 0:M.index}}}else if(t)for(var D=0;D<g;D++){var k=t[D];if(k!=null){var B=t[D+1],R=t[D-1];if(D===0&&B!=null&&e<=(k.coordinate+B.coordinate)/2||D===g-1&&R!=null&&e>(k.coordinate+R.coordinate)/2||D>0&&D<g-1&&R!=null&&B!=null&&e>(k.coordinate+R.coordinate)/2&&e<=(k.coordinate+B.coordinate)/2)return k.index}}return-1},U7=()=>Re(vm),Im=(e,t)=>t,lL=(e,t,r)=>r,Nm=(e,t,r,n)=>n,F7=le(yn,e=>Mh(e,t=>t.coordinate)),zm=le([eo,Im,lL,Nm],KM),Hm=le([zm,ro,Hl,Ul],Rm),q7=(e,t,r)=>{if(t!=null){var n=eo(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},cL=le([eo,Im,lL,Nm],VM),vh=le([dn,vn,ot,Wt,yn,Nm,cL],YM),W7=le([zm,vh],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),uL=le([yn,Hm],UM),G7=le([cL,Hm,gn,Hl,uL,XM,Im],ZM),K7=le([zm,Hm],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),Y7=(e,t,r,n,o,h,g)=>{if(!(!e||!r||!n||!o)&&$7(e,g)){var a=SP(e,t),c=oL(a,h,o,r,n),f=z7(t,o,c,e);return{activeIndex:String(c),activeCoordinate:f}}},V7=(e,t,r,n,o,h,g)=>{if(!(!e||!n||!o||!h||!r)){var a=kB(e,r);if(a){var c=wP(a,t),f=oL(c,g,h,n,o),v=H7(t,h,f,a);return{activeIndex:String(f),activeCoordinate:v}}}},X7=(e,t,r,n,o,h,g,a)=>{if(!(!e||!t||!n||!o||!h))return t==="horizontal"||t==="vertical"?Y7(e,t,n,o,h,g,a):V7(e,t,r,n,o,h,g)},Z7=le(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var n=e[t];if(n!=null)return r?n.panoramaElement:n.element}}),Q7=le(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(wr)),r=Array.from(new Set(t));return r.sort((n,o)=>n-o)},{memoizeOptions:{resultEqualityCheck:kI}});function Px(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Bx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Px(Object(r),!0).forEach(function(n){J7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Px(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function J7(e,t,r){return(t=ez(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ez(e){var t=tz(e,"string");return typeof t=="symbol"?t:t+""}function tz(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rz={},iz={zIndexMap:Object.values(wr).reduce((e,t)=>Bx(Bx({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),rz)},nz=new Set(Object.values(wr));function sz(e){return nz.has(e)}var hL=Cr({name:"zIndex",initialState:iz,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:pt()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!sz(r)&&delete e.zIndexMap[r])},prepare:pt()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r,element:n,isPanorama:o}=t.payload;e.zIndexMap[r]?o?e.zIndexMap[r].panoramaElement=n:e.zIndexMap[r].element=n:e.zIndexMap[r]={consumers:0,element:o?void 0:n,panoramaElement:o?n:void 0}},prepare:pt()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElement=void 0:e.zIndexMap[r].element=void 0)},prepare:pt()}}}),{registerZIndexPortal:az,unregisterZIndexPortal:oz,registerZIndexPortalElement:lz,unregisterZIndexPortalElement:cz}=hL.actions,uz=hL.reducer;function ts(e){var{zIndex:t,children:r}=e,n=n6(),o=n&&t!==void 0&&t!==0,h=Ir(),g=Et();z.useLayoutEffect(()=>o?(g(az({zIndex:t})),()=>{g(oz({zIndex:t}))}):Ga,[g,t,o]);var a=Re(c=>Z7(c,t,h));return o?a?b2.createPortal(r,a):null:r}function a_(){return a_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a_.apply(null,arguments)}function jx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function mu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jx(Object(r),!0).forEach(function(n){hz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hz(e,t,r){return(t=fz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fz(e){var t=dz(e,"string");return typeof t=="symbol"?t:t+""}function dz(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vz(e){var{cursor:t,cursorComp:r,cursorProps:n}=e;return z.isValidElement(t)?z.cloneElement(t,n):z.createElement(r,n)}function pz(e){var t,{coordinate:r,payload:n,index:o,offset:h,tooltipAxisBandSize:g,layout:a,cursor:c,tooltipEventType:f,chartName:v}=e,u=r,m=n,w=o;if(!c||!u||v!=="ScatterChart"&&f!=="axis")return null;var C,_,d;if(v==="ScatterChart")C=u,_=G6,d=wr.cursorLine;else if(v==="BarChart")C=K6(a,u,h,g),_=XE,d=wr.cursorRectangle;else if(a==="radial"&&$2(u)){var{cx:y,cy:b,radius:S,startAngle:E,endAngle:L}=ZE(u);C={cx:y,cy:b,startAngle:E,endAngle:L,innerRadius:S,outerRadius:S},_=JE,d=wr.cursorLine}else C={points:IB(a,u,h)},_=WE,d=wr.cursorLine;var x=typeof c=="object"&&"className"in c?c.className:void 0,O=mu(mu(mu(mu({stroke:"#ccc",pointerEvents:"none"},h),C),y_(c)),{},{payload:m,payloadIndex:w,className:dt("recharts-tooltip-cursor",x)});return z.createElement(ts,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:d},z.createElement(vz,{cursor:c,cursorComp:_,cursorProps:O}))}function gz(e){var t=B7(),r=t6(),n=Ka(),o=U7();return t==null||r==null||n==null||o==null?null:z.createElement(pz,a_({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:o}))}var fL=z.createContext(null),_z=()=>z.useContext(fL),ig={exports:{}},Ix;function mz(){return Ix||(Ix=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function o(c,f,v){this.fn=c,this.context=f,this.once=v||!1}function h(c,f,v,u,m){if(typeof v!="function")throw new TypeError("The listener must be a function");var w=new o(v,u||c,m),C=r?r+f:f;return c._events[C]?c._events[C].fn?c._events[C]=[c._events[C],w]:c._events[C].push(w):(c._events[C]=w,c._eventsCount++),c}function g(c,f){--c._eventsCount===0?c._events=new n:delete c._events[f]}function a(){this._events=new n,this._eventsCount=0}a.prototype.eventNames=function(){var f=[],v,u;if(this._eventsCount===0)return f;for(u in v=this._events)t.call(v,u)&&f.push(r?u.slice(1):u);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(v)):f},a.prototype.listeners=function(f){var v=r?r+f:f,u=this._events[v];if(!u)return[];if(u.fn)return[u.fn];for(var m=0,w=u.length,C=new Array(w);m<w;m++)C[m]=u[m].fn;return C},a.prototype.listenerCount=function(f){var v=r?r+f:f,u=this._events[v];return u?u.fn?1:u.length:0},a.prototype.emit=function(f,v,u,m,w,C){var _=r?r+f:f;if(!this._events[_])return!1;var d=this._events[_],y=arguments.length,b,S;if(d.fn){switch(d.once&&this.removeListener(f,d.fn,void 0,!0),y){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,v),!0;case 3:return d.fn.call(d.context,v,u),!0;case 4:return d.fn.call(d.context,v,u,m),!0;case 5:return d.fn.call(d.context,v,u,m,w),!0;case 6:return d.fn.call(d.context,v,u,m,w,C),!0}for(S=1,b=new Array(y-1);S<y;S++)b[S-1]=arguments[S];d.fn.apply(d.context,b)}else{var E=d.length,L;for(S=0;S<E;S++)switch(d[S].once&&this.removeListener(f,d[S].fn,void 0,!0),y){case 1:d[S].fn.call(d[S].context);break;case 2:d[S].fn.call(d[S].context,v);break;case 3:d[S].fn.call(d[S].context,v,u);break;case 4:d[S].fn.call(d[S].context,v,u,m);break;default:if(!b)for(L=1,b=new Array(y-1);L<y;L++)b[L-1]=arguments[L];d[S].fn.apply(d[S].context,b)}}return!0},a.prototype.on=function(f,v,u){return h(this,f,v,u,!1)},a.prototype.once=function(f,v,u){return h(this,f,v,u,!0)},a.prototype.removeListener=function(f,v,u,m){var w=r?r+f:f;if(!this._events[w])return this;if(!v)return g(this,w),this;var C=this._events[w];if(C.fn)C.fn===v&&(!m||C.once)&&(!u||C.context===u)&&g(this,w);else{for(var _=0,d=[],y=C.length;_<y;_++)(C[_].fn!==v||m&&!C[_].once||u&&C[_].context!==u)&&d.push(C[_]);d.length?this._events[w]=d.length===1?d[0]:d:g(this,w)}return this},a.prototype.removeAllListeners=function(f){var v;return f?(v=r?r+f:f,this._events[v]&&g(this,v)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a})(ig)),ig.exports}var yz=mz();const bz=fn(yz);var Al=new bz,o_="recharts.syncEvent.tooltip",Nx="recharts.syncEvent.brush",Sz=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!Ti(r))return e[r]}},wz={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},dL=Cr({name:"options",initialState:wz,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),Cz=dL.reducer,{createEventEmitter:xz}=dL.actions;function Ez(e){return e.tooltip.syncInteraction}var Az={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},vL=Cr({name:"chartData",initialState:Az,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:r,endIndex:n}=t.payload;r!=null&&(e.dataStartIndex=r),n!=null&&(e.dataEndIndex=n)}}}),{setChartData:zx,setDataStartEndIndexes:Mz,setComputedData:Hq}=vL.actions,Lz=vL.reducer,Oz=["x","y"];function Hx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ta(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Hx(Object(r),!0).forEach(function(n){Tz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Tz(e,t,r){return(t=Dz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dz(e){var t=Rz(e,"string");return typeof t=="symbol"?t:t+""}function Rz(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kz(e,t){if(e==null)return{};var r,n,o=Pz(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(n=0;n<h.length;n++)r=h[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Pz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Bz(){var e=Re(pm),t=Re(gm),r=Et(),n=Re(XA),o=Re(yn),h=Ka(),g=$h(),a=Re(c=>c.rootProps.className);z.useEffect(()=>{if(e==null)return Ga;var c=(f,v,u)=>{if(t!==u&&e===f){if(n==="index"){var m;if(g&&v!==null&&v!==void 0&&(m=v.payload)!==null&&m!==void 0&&m.coordinate&&v.payload.sourceViewBox){var w=v.payload.coordinate,{x:C,y:_}=w,d=kz(w,Oz),{x:y,y:b,width:S,height:E}=v.payload.sourceViewBox,L=Ta(Ta({},d),{},{x:g.x+(S?(C-y)/S:0)*g.width,y:g.y+(E?(_-b)/E:0)*g.height});r(Ta(Ta({},v),{},{payload:Ta(Ta({},v.payload),{},{coordinate:L})}))}else r(v);return}if(o!=null){var x;if(typeof n=="function"){var O={activeTooltipIndex:v.payload.index==null?void 0:Number(v.payload.index),isTooltipActive:v.payload.active,activeIndex:v.payload.index==null?void 0:Number(v.payload.index),activeLabel:v.payload.label,activeDataKey:v.payload.dataKey,activeCoordinate:v.payload.coordinate},M=n(o,O);x=o[M]}else n==="value"&&(x=o.find(F=>String(F.value)===v.payload.label));var{coordinate:D}=v.payload;if(x==null||v.payload.active===!1||D==null||g==null){r(n_({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}var{x:k,y:B}=D,R=Math.min(k,g.x+g.width),P=Math.min(B,g.y+g.height),H={x:h==="horizontal"?x.coordinate:R,y:h==="horizontal"?P:x.coordinate},X=n_({active:v.payload.active,coordinate:H,dataKey:v.payload.dataKey,index:String(x.index),label:v.payload.label,sourceViewBox:v.payload.sourceViewBox,graphicalItemId:v.payload.graphicalItemId});r(X)}}};return Al.on(o_,c),()=>{Al.off(o_,c)}},[a,r,t,e,n,o,h,g])}function jz(){var e=Re(pm),t=Re(gm),r=Et();z.useEffect(()=>{if(e==null)return Ga;var n=(o,h,g)=>{t!==g&&e===o&&r(Mz(h))};return Al.on(Nx,n),()=>{Al.off(Nx,n)}},[r,t,e])}function Iz(){var e=Et();z.useEffect(()=>{e(xz())},[e]),Bz(),jz()}function Nz(e,t,r,n,o,h){var g=Re(w=>q7(w,e,t)),a=Re(gm),c=Re(pm),f=Re(XA),v=Re(Ez),u=v==null?void 0:v.active,m=$h();z.useEffect(()=>{if(!u&&c!=null&&a!=null){var w=n_({active:h,coordinate:r,dataKey:g,index:o,label:typeof n=="number"?String(n):n,sourceViewBox:m,graphicalItemId:void 0});Al.emit(o_,c,w,a)}},[u,r,g,o,n,a,c,f,h,m])}function $x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ux(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$x(Object(r),!0).forEach(function(n){zz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$x(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zz(e,t,r){return(t=Hz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hz(e){var t=$z(e,"string");return typeof t=="symbol"?t:t+""}function $z(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Uz(e){return e.dataKey}function Fz(e,t){return z.isValidElement(e)?z.cloneElement(e,t):typeof e=="function"?z.createElement(e,t):z.createElement(E6,t)}var Fx=[],qz={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function Wz(e){var t,r,n=ii(e,qz),{active:o,allowEscapeViewBox:h,animationDuration:g,animationEasing:a,content:c,filterNull:f,isAnimationActive:v,offset:u,payloadUniqBy:m,position:w,reverseDirection:C,useTranslate3d:_,wrapperStyle:d,cursor:y,shared:b,trigger:S,defaultIndex:E,portal:L,axisId:x}=n,O=Et(),M=typeof E=="number"?String(E):E;z.useEffect(()=>{O(HN({shared:b,trigger:S,axisId:x,active:o,defaultIndex:M}))},[O,b,S,x,o,M]);var D=$h(),k=qE(),B=PN(b),{activeIndex:R,isActive:P}=(t=Re(Z=>K7(Z,B,S,M)))!==null&&t!==void 0?t:{},H=Re(Z=>G7(Z,B,S,M)),X=Re(Z=>uL(Z,B,S,M)),F=Re(Z=>W7(Z,B,S,M)),K=H,Y=_z(),j=(r=o??P)!==null&&r!==void 0?r:!1,[$,N]=a4([K,j]),U=B==="axis"?X:void 0;Nz(B,S,F,U,R,j);var J=L??Y;if(J==null||D==null||B==null)return null;var te=K??Fx;j||(te=Fx),f&&te.length&&(te=Rk(te.filter(Z=>Z.value!=null&&(Z.hide!==!0||n.includeHidden)),m,Uz));var fe=te.length>0,ve=z.createElement(R6,{allowEscapeViewBox:h,animationDuration:g,animationEasing:a,isAnimationActive:v,active:j,coordinate:F,hasPayload:fe,offset:u,position:w,reverseDirection:C,useTranslate3d:_,viewBox:D,wrapperStyle:d,lastBoundingBox:$,innerRef:N,hasPortalFromProps:!!L},Fz(c,Ux(Ux({},n),{},{payload:te,label:U,active:j,activeIndex:R,coordinate:F,accessibilityLayer:k})));return z.createElement(z.Fragment,null,b2.createPortal(ve,J),j&&z.createElement(gz,{cursor:y,tooltipEventType:B,coordinate:F,payload:te,index:R}))}var $m=e=>null;$m.displayName="Cell";function Gz(e,t,r){return(t=Kz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kz(e){var t=Yz(e,"string");return typeof t=="symbol"?t:t+""}function Yz(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class Vz{constructor(t){Gz(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;n!=null&&this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function qx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Xz(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qx(Object(r),!0).forEach(function(n){Zz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Zz(e,t,r){return(t=Qz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qz(e){var t=Jz(e,"string");return typeof t=="symbol"?t:t+""}function Jz(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var eH={cacheSize:2e3,enableCache:!0},pL=Xz({},eH),Wx=new Vz(pL.cacheSize),tH={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Gx="recharts_measurement_span";function rH(e,t){var r=t.fontSize||"",n=t.fontFamily||"",o=t.fontWeight||"",h=t.fontStyle||"",g=t.letterSpacing||"",a=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(o,"|").concat(h,"|").concat(g,"|").concat(a)}var Kx=(e,t)=>{try{var r=document.getElementById(Gx);r||(r=document.createElement("span"),r.setAttribute("id",Gx),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,tH,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},fl=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Wh.isSsr)return{width:0,height:0};if(!pL.enableCache)return Kx(t,r);var n=rH(t,r),o=Wx.get(n);if(o)return o;var h=Kx(t,r);return Wx.set(n,h),h},gL;function iH(e,t,r){return(t=nH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nH(e){var t=sH(e,"string");return typeof t=="symbol"?t:t+""}function sH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Yx=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Vx=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,aH=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,oH=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,lH={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},cH=["cm","mm","pt","pc","in","Q","px"];function uH(e){return cH.includes(e)}var ka="NaN";function hH(e,t){return e*lH[t]}class rr{static parse(t){var r,[,n,o]=(r=oH.exec(t))!==null&&r!==void 0?r:[];return n==null?rr.NaN:new rr(parseFloat(n),o??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,Ti(t)&&(this.unit=""),r!==""&&!aH.test(r)&&(this.num=NaN,this.unit=""),uH(r)&&(this.num=hH(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new rr(NaN,""):new rr(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new rr(NaN,""):new rr(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new rr(NaN,""):new rr(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new rr(NaN,""):new rr(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Ti(this.num)}}gL=rr;iH(rr,"NaN",new gL(NaN,""));function _L(e){if(e==null||e.includes(ka))return ka;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,o,h]=(r=Yx.exec(t))!==null&&r!==void 0?r:[],g=rr.parse(n??""),a=rr.parse(h??""),c=o==="*"?g.multiply(a):g.divide(a);if(c.isNaN())return ka;t=t.replace(Yx,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,[,v,u,m]=(f=Vx.exec(t))!==null&&f!==void 0?f:[],w=rr.parse(v??""),C=rr.parse(m??""),_=u==="+"?w.add(C):w.subtract(C);if(_.isNaN())return ka;t=t.replace(Vx,_.toString())}return t}var Xx=/\(([^()]*)\)/;function fH(e){for(var t=e,r;(r=Xx.exec(t))!=null;){var[,n]=r;t=t.replace(Xx,_L(n))}return t}function dH(e){var t=e.replace(/\s+/g,"");return t=fH(t),t=_L(t),t}function vH(e){try{return dH(e)}catch{return ka}}function ng(e){var t=vH(e.slice(5,-1));return t===ka?"":t}var pH=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],gH=["dx","dy","angle","className","breakAll"];function l_(){return l_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l_.apply(null,arguments)}function Zx(e,t){if(e==null)return{};var r,n,o=_H(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(n=0;n<h.length;n++)r=h[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _H(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var mL=/[ \f\n\r\t\v\u2028\u2029]+/,yL=e=>{var{children:t,breakAll:r,style:n}=e;try{var o=[];qt(t)||(r?o=t.toString().split(""):o=t.toString().split(mL));var h=o.map(a=>({word:a,width:fl(a,n).width})),g=r?0:fl(" ",n).width;return{wordsWithComputedWidth:h,spaceWidth:g}}catch{return null}};function mH(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}var bL=(e,t,r,n)=>e.reduce((o,h)=>{var{word:g,width:a}=h,c=o[o.length-1];if(c&&a!=null&&(t==null||n||c.width+a+r<Number(t)))c.words.push(g),c.width+=a+r;else{var f={words:[g],width:a};o.push(f)}return o},[]),SL=e=>e.reduce((t,r)=>t.width>r.width?t:r),yH="…",Qx=(e,t,r,n,o,h,g,a)=>{var c=e.slice(0,t),f=yL({breakAll:r,style:n,children:c+yH});if(!f)return[!1,[]];var v=bL(f.wordsWithComputedWidth,h,g,a),u=v.length>o||SL(v).width>Number(h);return[u,v]},bH=(e,t,r,n,o)=>{var{maxLines:h,children:g,style:a,breakAll:c}=e,f=Oe(h),v=String(g),u=bL(t,n,r,o);if(!f||o)return u;var m=u.length>h||SL(u).width>Number(n);if(!m)return u;for(var w=0,C=v.length-1,_=0,d;w<=C&&_<=v.length-1;){var y=Math.floor((w+C)/2),b=y-1,[S,E]=Qx(v,b,c,a,h,n,r,o),[L]=Qx(v,y,c,a,h,n,r,o);if(!S&&!L&&(w=y+1),S&&L&&(C=y-1),!S&&L){d=E;break}_++}return d||u},Jx=e=>{var t=qt(e)?[]:e.toString().split(mL);return[{words:t,width:void 0}]},SH=e=>{var{width:t,scaleToFit:r,children:n,style:o,breakAll:h,maxLines:g}=e;if((t||r)&&!Wh.isSsr){var a,c,f=yL({breakAll:h,children:n,style:o});if(f){var{wordsWithComputedWidth:v,spaceWidth:u}=f;a=v,c=u}else return Jx(n);return bH({breakAll:h,children:n,maxLines:g,style:o},a,c,t,!!r)}return Jx(n)},wL="#808080",wH={angle:0,breakAll:!1,capHeight:"0.71em",fill:wL,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},Um=z.forwardRef((e,t)=>{var r=ii(e,wH),{x:n,y:o,lineHeight:h,capHeight:g,fill:a,scaleToFit:c,textAnchor:f,verticalAnchor:v}=r,u=Zx(r,pH),m=z.useMemo(()=>SH({breakAll:u.breakAll,children:u.children,maxLines:u.maxLines,scaleToFit:c,style:u.style,width:u.width}),[u.breakAll,u.children,u.maxLines,c,u.style,u.width]),{dx:w,dy:C,angle:_,className:d,breakAll:y}=u,b=Zx(u,gH);if(!Di(n)||!Di(o)||m.length===0)return null;var S=Number(n)+(Oe(w)?w:0),E=Number(o)+(Oe(C)?C:0);if(!Ze(S)||!Ze(E))return null;var L;switch(v){case"start":L=ng("calc(".concat(g,")"));break;case"middle":L=ng("calc(".concat((m.length-1)/2," * -").concat(h," + (").concat(g," / 2))"));break;default:L=ng("calc(".concat(m.length-1," * -").concat(h,")"));break}var x=[],O=m[0];if(c&&O!=null){var M=O.width,{width:D}=u;x.push("scale(".concat(Oe(D)&&Oe(M)?D/M:1,")"))}return _&&x.push("rotate(".concat(_,", ").concat(S,", ").concat(E,")")),x.length&&(b.transform=x.join(" ")),z.createElement("text",l_({},Jr(b),{ref:t,x:S,y:E,className:dt("recharts-text",d),textAnchor:f,fill:a.includes("url")?wL:a}),m.map((k,B)=>{var R=k.words.join(y?"":" ");return z.createElement("tspan",{x:S,dy:B===0?L:h,key:"".concat(R,"-").concat(B)},R)}))});Um.displayName="Text";function e5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ei(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?e5(Object(r),!0).forEach(function(n){CH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function CH(e,t,r){return(t=xH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xH(e){var t=EH(e,"string");return typeof t=="symbol"?t:t+""}function EH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var AH=e=>{var{viewBox:t,position:r,offset:n=0,parentViewBox:o}=e,{x:h,y:g,height:a,upperWidth:c,lowerWidth:f}=N_(t),v=h,u=h+(c-f)/2,m=(v+u)/2,w=(c+f)/2,C=v+c/2,_=a>=0?1:-1,d=_*n,y=_>0?"end":"start",b=_>0?"start":"end",S=c>=0?1:-1,E=S*n,L=S>0?"end":"start",x=S>0?"start":"end",O=o;if(r==="top"){var M={x:v+c/2,y:g-d,horizontalAnchor:"middle",verticalAnchor:y};return O&&(M.height=Math.max(g-O.y,0),M.width=c),M}if(r==="bottom"){var D={x:u+f/2,y:g+a+d,horizontalAnchor:"middle",verticalAnchor:b};return O&&(D.height=Math.max(O.y+O.height-(g+a),0),D.width=f),D}if(r==="left"){var k={x:m-E,y:g+a/2,horizontalAnchor:L,verticalAnchor:"middle"};return O&&(k.width=Math.max(k.x-O.x,0),k.height=a),k}if(r==="right"){var B={x:m+w+E,y:g+a/2,horizontalAnchor:x,verticalAnchor:"middle"};return O&&(B.width=Math.max(O.x+O.width-B.x,0),B.height=a),B}var R=O?{width:w,height:a}:{};return r==="insideLeft"?Ei({x:m+E,y:g+a/2,horizontalAnchor:x,verticalAnchor:"middle"},R):r==="insideRight"?Ei({x:m+w-E,y:g+a/2,horizontalAnchor:L,verticalAnchor:"middle"},R):r==="insideTop"?Ei({x:v+c/2,y:g+d,horizontalAnchor:"middle",verticalAnchor:b},R):r==="insideBottom"?Ei({x:u+f/2,y:g+a-d,horizontalAnchor:"middle",verticalAnchor:y},R):r==="insideTopLeft"?Ei({x:v+E,y:g+d,horizontalAnchor:x,verticalAnchor:b},R):r==="insideTopRight"?Ei({x:v+c-E,y:g+d,horizontalAnchor:L,verticalAnchor:b},R):r==="insideBottomLeft"?Ei({x:u+E,y:g+a-d,horizontalAnchor:x,verticalAnchor:y},R):r==="insideBottomRight"?Ei({x:u+f-E,y:g+a-d,horizontalAnchor:L,verticalAnchor:y},R):r&&typeof r=="object"&&(Oe(r.x)||Rs(r.x))&&(Oe(r.y)||Rs(r.y))?Ei({x:h+vi(r.x,w),y:g+vi(r.y,a),horizontalAnchor:"end",verticalAnchor:"end"},R):Ei({x:C,y:g+a/2,horizontalAnchor:"middle",verticalAnchor:"middle"},R)},MH=["labelRef"],LH=["content"];function t5(e,t){if(e==null)return{};var r,n,o=OH(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(n=0;n<h.length;n++)r=h[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function OH(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function r5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ul(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?r5(Object(r),!0).forEach(function(n){TH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):r5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TH(e,t,r){return(t=DH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DH(e){var t=RH(e,"string");return typeof t=="symbol"?t:t+""}function RH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qi(){return Qi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qi.apply(null,arguments)}var CL=z.createContext(null),kH=e=>{var{x:t,y:r,upperWidth:n,lowerWidth:o,width:h,height:g,children:a}=e,c=z.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:o,width:h,height:g}),[t,r,n,o,h,g]);return z.createElement(CL.Provider,{value:c},a)},xL=()=>{var e=z.useContext(CL),t=$h();return e||(t?N_(t):void 0)},PH=z.createContext(null),BH=()=>{var e=z.useContext(PH),t=Re(tM);return e||t},jH=e=>{var{value:t,formatter:r}=e,n=qt(e.children)?t:e.children;return typeof r=="function"?r(n):n},Fm=e=>e!=null&&typeof e=="function",IH=(e,t)=>{var r=Rr(t-e),n=Math.min(Math.abs(t-e),360);return r*n},NH=(e,t,r,n,o)=>{var{offset:h,className:g}=e,{cx:a,cy:c,innerRadius:f,outerRadius:v,startAngle:u,endAngle:m,clockWise:w}=o,C=(f+v)/2,_=IH(u,m),d=_>=0?1:-1,y,b;switch(t){case"insideStart":y=u+d*h,b=w;break;case"insideEnd":y=m-d*h,b=!w;break;case"end":y=m+d*h,b=w;break;default:throw new Error("Unsupported position ".concat(t))}b=_<=0?b:!b;var S=nr(a,c,C,y),E=nr(a,c,C,y+(b?1:-1)*359),L="M".concat(S.x,",").concat(S.y,`
|
|
177
|
-
A`).concat(C,",").concat(C,",0,1,").concat(b?0:1,`,
|
|
178
|
-
`).concat(E.x,",").concat(E.y),x=qt(e.id)?dl("recharts-radial-line-"):e.id;return z.createElement("text",Qi({},n,{dominantBaseline:"central",className:dt("recharts-radial-bar-label",g)}),z.createElement("defs",null,z.createElement("path",{id:x,d:L})),z.createElement("textPath",{xlinkHref:"#".concat(x)},r))},zH=(e,t,r)=>{var{cx:n,cy:o,innerRadius:h,outerRadius:g,startAngle:a,endAngle:c}=e,f=(a+c)/2;if(r==="outside"){var{x:v,y:u}=nr(n,o,g+t,f);return{x:v,y:u,textAnchor:v>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:o,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:o,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:o,textAnchor:"middle",verticalAnchor:"end"};var m=(h+g)/2,{x:w,y:C}=nr(n,o,m,f);return{x:w,y:C,textAnchor:"middle",verticalAnchor:"middle"}},Au=e=>e!=null&&"cx"in e&&Oe(e.cx),HH={angle:0,offset:5,zIndex:wr.label,position:"middle",textBreakAll:!1};function $H(e){if(!Au(e))return e;var{cx:t,cy:r,outerRadius:n}=e,o=n*2;return{x:t-n,y:r-n,width:o,upperWidth:o,lowerWidth:o,height:o}}function Wn(e){var t=ii(e,HH),{viewBox:r,parentViewBox:n,position:o,value:h,children:g,content:a,className:c="",textBreakAll:f,labelRef:v}=t,u=BH(),m=xL(),w=o==="center"?m:u??m,C,_,d;r==null?C=w:Au(r)?C=r:C=N_(r);var y=$H(C);if(!C||qt(h)&&qt(g)&&!z.isValidElement(a)&&typeof a!="function")return null;var b=ul(ul({},t),{},{viewBox:C});if(z.isValidElement(a)){var{labelRef:S}=b,E=t5(b,MH);return z.cloneElement(a,E)}if(typeof a=="function"){var{content:L}=b,x=t5(b,LH);if(_=z.createElement(a,x),z.isValidElement(_))return _}else _=jH(t);var O=Jr(t);if(Au(C)){if(o==="insideStart"||o==="insideEnd"||o==="end")return NH(t,o,_,O,C);d=zH(C,t.offset,t.position)}else{if(!y)return null;var M=AH({viewBox:y,position:o,offset:t.offset,parentViewBox:Au(n)?void 0:n});d=ul(ul({x:M.x,y:M.y,textAnchor:M.horizontalAnchor,verticalAnchor:M.verticalAnchor},M.width!==void 0?{width:M.width}:{}),M.height!==void 0?{height:M.height}:{})}return z.createElement(ts,{zIndex:t.zIndex},z.createElement(Um,Qi({ref:v,className:dt("recharts-label",c)},O,d,{textAnchor:mH(O.textAnchor)?O.textAnchor:d.textAnchor,breakAll:f}),_))}Wn.displayName="Label";var UH=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?z.createElement(Wn,Qi({key:"label-implicit"},n)):Di(e)?z.createElement(Wn,Qi({key:"label-implicit",value:e},n)):z.isValidElement(e)?e.type===Wn?z.cloneElement(e,ul({key:"label-implicit"},n)):z.createElement(Wn,Qi({key:"label-implicit",content:e},n)):Fm(e)?z.createElement(Wn,Qi({key:"label-implicit",content:e},n)):e&&typeof e=="object"?z.createElement(Wn,Qi({},e,{key:"label-implicit"},n)):null};function FH(e){var{label:t,labelRef:r}=e,n=xL();return UH(t,n,r)||null}var sg={},ag={},i5;function qH(){return i5||(i5=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r[r.length-1]}e.last=t})(ag)),ag}var og={},n5;function WH(){return n5||(n5=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Array.isArray(r)?r:Array.from(r)}e.toArray=t})(og)),og}var s5;function GH(){return s5||(s5=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=qH(),r=WH(),n=M_();function o(h){if(n.isArrayLike(h))return t.last(r.toArray(h))}e.last=o})(sg)),sg}var lg,a5;function KH(){return a5||(a5=1,lg=GH().last),lg}var YH=KH();const VH=fn(YH);var XH=["valueAccessor"],ZH=["dataKey","clockWise","id","textBreakAll","zIndex"];function ph(){return ph=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ph.apply(null,arguments)}function o5(e,t){if(e==null)return{};var r,n,o=QH(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(n=0;n<h.length;n++)r=h[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function QH(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var JH=e=>Array.isArray(e.value)?VH(e.value):e.value,EL=z.createContext(void 0),e$=EL.Provider,AL=z.createContext(void 0);AL.Provider;function t$(){return z.useContext(EL)}function r$(){return z.useContext(AL)}function Mu(e){var{valueAccessor:t=JH}=e,r=o5(e,XH),{dataKey:n,clockWise:o,id:h,textBreakAll:g,zIndex:a}=r,c=o5(r,ZH),f=t$(),v=r$(),u=f||v;return!u||!u.length?null:z.createElement(ts,{zIndex:a??wr.label},z.createElement(nn,{className:"recharts-label-list"},u.map((m,w)=>{var C,_=qt(n)?t(m,w):sr(m.payload,n),d=qt(h)?{}:{id:"".concat(h,"-").concat(w)};return z.createElement(Wn,ph({key:"label-".concat(w)},Jr(m),c,d,{fill:(C=r.fill)!==null&&C!==void 0?C:m.fill,parentViewBox:m.parentViewBox,value:_,textBreakAll:g,viewBox:m.viewBox,index:w,zIndex:0}))})))}Mu.displayName="LabelList";function i$(e){var{label:t}=e;return t?t===!0?z.createElement(Mu,{key:"labelList-implicit"}):z.isValidElement(t)||Fm(t)?z.createElement(Mu,{key:"labelList-implicit",content:t}):typeof t=="object"?z.createElement(Mu,ph({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}var n$={radiusAxis:{},angleAxis:{}},ML=Cr({name:"polarAxis",initialState:n$,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:$q,removeRadiusAxis:Uq,addAngleAxis:Fq,removeAngleAxis:qq}=ML.actions,s$=ML.reducer;function a$(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var cg={exports:{}},nt={};/** @license React v17.0.2
|
|
179
|
-
* react-is.production.min.js
|
|
180
|
-
*
|
|
181
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
182
|
-
*
|
|
183
|
-
* This source code is licensed under the MIT license found in the
|
|
184
|
-
* LICENSE file in the root directory of this source tree.
|
|
185
|
-
*/var l5;function o$(){if(l5)return nt;l5=1;var e=60103,t=60106,r=60107,n=60108,o=60114,h=60109,g=60110,a=60112,c=60113,f=60120,v=60115,u=60116,m=60121,w=60122,C=60117,_=60129,d=60131;if(typeof Symbol=="function"&&Symbol.for){var y=Symbol.for;e=y("react.element"),t=y("react.portal"),r=y("react.fragment"),n=y("react.strict_mode"),o=y("react.profiler"),h=y("react.provider"),g=y("react.context"),a=y("react.forward_ref"),c=y("react.suspense"),f=y("react.suspense_list"),v=y("react.memo"),u=y("react.lazy"),m=y("react.block"),w=y("react.server.block"),C=y("react.fundamental"),_=y("react.debug_trace_mode"),d=y("react.legacy_hidden")}function b(P){if(typeof P=="object"&&P!==null){var H=P.$$typeof;switch(H){case e:switch(P=P.type,P){case r:case o:case n:case c:case f:return P;default:switch(P=P&&P.$$typeof,P){case g:case a:case u:case v:case h:return P;default:return H}}case t:return H}}}var S=h,E=e,L=a,x=r,O=u,M=v,D=t,k=o,B=n,R=c;return nt.ContextConsumer=g,nt.ContextProvider=S,nt.Element=E,nt.ForwardRef=L,nt.Fragment=x,nt.Lazy=O,nt.Memo=M,nt.Portal=D,nt.Profiler=k,nt.StrictMode=B,nt.Suspense=R,nt.isAsyncMode=function(){return!1},nt.isConcurrentMode=function(){return!1},nt.isContextConsumer=function(P){return b(P)===g},nt.isContextProvider=function(P){return b(P)===h},nt.isElement=function(P){return typeof P=="object"&&P!==null&&P.$$typeof===e},nt.isForwardRef=function(P){return b(P)===a},nt.isFragment=function(P){return b(P)===r},nt.isLazy=function(P){return b(P)===u},nt.isMemo=function(P){return b(P)===v},nt.isPortal=function(P){return b(P)===t},nt.isProfiler=function(P){return b(P)===o},nt.isStrictMode=function(P){return b(P)===n},nt.isSuspense=function(P){return b(P)===c},nt.isValidElementType=function(P){return typeof P=="string"||typeof P=="function"||P===r||P===o||P===_||P===n||P===c||P===f||P===d||typeof P=="object"&&P!==null&&(P.$$typeof===u||P.$$typeof===v||P.$$typeof===h||P.$$typeof===g||P.$$typeof===a||P.$$typeof===C||P.$$typeof===m||P[0]===w)},nt.typeOf=b,nt}var c5;function l$(){return c5||(c5=1,cg.exports=o$()),cg.exports}var c$=l$(),u5=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",h5=null,ug=null,LL=e=>{if(e===h5&&Array.isArray(ug))return ug;var t=[];return z.Children.forEach(e,r=>{qt(r)||(c$.isFragment(r)?t=t.concat(LL(r.props.children)):t.push(r))}),ug=t,h5=e,t};function u$(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(o=>u5(o)):n=[u5(t)],LL(e).forEach(o=>{var h=ja(o,"type.displayName")||ja(o,"type.name");h&&n.indexOf(h)!==-1&&r.push(o)}),r}var hg={},f5;function h$(){return f5||(f5=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){var o;if(typeof r!="object"||r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){const h=r[Symbol.toStringTag];return h==null||!((o=Object.getOwnPropertyDescriptor(r,Symbol.toStringTag))!=null&&o.writable)?!1:r.toString()===`[object ${h}]`}let n=r;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(r)===n}e.isPlainObject=t})(hg)),hg}var fg,d5;function f$(){return d5||(d5=1,fg=h$().isPlainObject),fg}var d$=f$();const v$=fn(d$);var v5,p5,g5,_5,m5;function y5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function b5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?y5(Object(r),!0).forEach(function(n){p$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function p$(e,t,r){return(t=g$(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g$(e){var t=_$(e,"string");return typeof t=="symbol"?t:t+""}function _$(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gh(){return gh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gh.apply(null,arguments)}function ol(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var S5=(e,t,r,n,o)=>{var h=r-n,g;return g=wt(v5||(v5=ol(["M ",",",""])),e,t),g+=wt(p5||(p5=ol(["L ",",",""])),e+r,t),g+=wt(g5||(g5=ol(["L ",",",""])),e+r-h/2,t+o),g+=wt(_5||(_5=ol(["L ",",",""])),e+r-h/2-n,t+o),g+=wt(m5||(m5=ol(["L ",","," Z"])),e,t),g},m$={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},y$=e=>{var t=ii(e,m$),{x:r,y:n,upperWidth:o,lowerWidth:h,height:g,className:a}=t,{animationEasing:c,animationDuration:f,animationBegin:v,isUpdateAnimationActive:u}=t,m=z.useRef(null),[w,C]=z.useState(-1),_=z.useRef(o),d=z.useRef(h),y=z.useRef(g),b=z.useRef(r),S=z.useRef(n),E=U_(e,"trapezoid-");if(z.useEffect(()=>{if(m.current&&m.current.getTotalLength)try{var H=m.current.getTotalLength();H&&C(H)}catch{}},[]),r!==+r||n!==+n||o!==+o||h!==+h||g!==+g||o===0&&h===0||g===0)return null;var L=dt("recharts-trapezoid",a);if(!u)return z.createElement("g",null,z.createElement("path",gh({},Jr(t),{className:L,d:S5(r,n,o,h,g)})));var x=_.current,O=d.current,M=y.current,D=b.current,k=S.current,B="0px ".concat(w===-1?1:w,"px"),R="".concat(w,"px 0px"),P=GE(["strokeDasharray"],f,c);return z.createElement($_,{animationId:E,key:E,canBegin:w>0,duration:f,easing:c,isActive:u,begin:v},H=>{var X=ir(x,o,H),F=ir(O,h,H),K=ir(M,g,H),Y=ir(D,r,H),j=ir(k,n,H);m.current&&(_.current=X,d.current=F,y.current=K,b.current=Y,S.current=j);var $=H>0?{transition:P,strokeDasharray:R}:{strokeDasharray:B};return z.createElement("path",gh({},Jr(t),{className:L,d:S5(Y,j,X,F,K),ref:m,style:b5(b5({},$),t.style)}))})},b$=["option","shapeType","activeClassName"];function S$(e,t){if(e==null)return{};var r,n,o=w$(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(n=0;n<h.length;n++)r=h[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function w$(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function w5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function _h(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?w5(Object(r),!0).forEach(function(n){C$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function C$(e,t,r){return(t=x$(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x$(e){var t=E$(e,"string");return typeof t=="symbol"?t:t+""}function E$(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function A$(e,t){return _h(_h({},t),e)}function M$(e,t){return e==="symbols"}function C5(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return z.createElement(XE,r);case"trapezoid":return z.createElement(y$,r);case"sector":return z.createElement(JE,r);case"symbols":if(M$(t))return z.createElement(H2,r);break;case"curve":return z.createElement(WE,r);default:return null}}function L$(e){return z.isValidElement(e)?e.props:e}function O$(e){var{option:t,shapeType:r,activeClassName:n="recharts-active-shape"}=e,o=S$(e,b$),h;if(z.isValidElement(t))h=z.cloneElement(t,_h(_h({},o),L$(t)));else if(typeof t=="function")h=t(o,o.index);else if(v$(t)&&typeof t!="boolean"){var g=A$(t,o);h=z.createElement(C5,{shapeType:r,elementProps:g})}else{var a=o;h=z.createElement(C5,{shapeType:r,elementProps:a})}return o.isActive?z.createElement(nn,{className:n},h):h}var OL=(e,t,r)=>{var n=Et();return(o,h)=>g=>{e==null||e(o,h,g),n(qM({activeIndex:String(h),activeDataKey:t,activeCoordinate:o.tooltipPosition,activeGraphicalItemId:r}))}},TL=e=>{var t=Et();return(r,n)=>o=>{e==null||e(r,n,o),t($N())}},DL=(e,t,r)=>{var n=Et();return(o,h)=>g=>{e==null||e(o,h,g),n(UN({activeIndex:String(h),activeDataKey:t,activeCoordinate:o.tooltipPosition,activeGraphicalItemId:r}))}};function T$(e){var{tooltipEntrySettings:t}=e,r=Et(),n=Ir(),o=z.useRef(null);return z.useLayoutEffect(()=>{n||(o.current===null?r(IN(t)):o.current!==t&&r(NN({prev:o.current,next:t})),o.current=t)},[t,r,n]),z.useLayoutEffect(()=>()=>{o.current&&(r(zN(o.current)),o.current=null)},[r]),null}function D$(e){var{legendPayload:t}=e,r=Et(),n=Ir(),o=z.useRef(null);return z.useLayoutEffect(()=>{n||(o.current===null?r(_6(t)):o.current!==t&&r(m6({prev:o.current,next:t})),o.current=t)},[r,n,t]),z.useLayoutEffect(()=>()=>{o.current&&(r(y6(o.current)),o.current=null)},[r]),null}var dg,R$=()=>{var[e]=z.useState(()=>dl("uid-"));return e},k$=(dg=AD.useId)!==null&&dg!==void 0?dg:R$;function P$(e,t){var r=k$();return t||(e?"".concat(e,"-").concat(r):r)}var B$=z.createContext(void 0),j$=e=>{var{id:t,type:r,children:n}=e,o=P$("recharts-".concat(r),t);return z.createElement(B$.Provider,{value:o},n(o))},I$={cartesianItems:[],polarItems:[]},RL=Cr({name:"graphicalItems",initialState:I$,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:pt()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,o=di(e).cartesianItems.indexOf(r);o>-1&&(e.cartesianItems[o]=n)},prepare:pt()},removeCartesianGraphicalItem:{reducer(e,t){var r=di(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:pt()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:pt()},removePolarGraphicalItem:{reducer(e,t){var r=di(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:pt()}}}),{addCartesianGraphicalItem:N$,replaceCartesianGraphicalItem:z$,removeCartesianGraphicalItem:H$,addPolarGraphicalItem:Wq,removePolarGraphicalItem:Gq}=RL.actions,$$=RL.reducer,U$=e=>{var t=Et(),r=z.useRef(null);return z.useLayoutEffect(()=>{r.current===null?t(N$(e)):r.current!==e&&t(z$({prev:r.current,next:e})),r.current=e},[t,e]),z.useLayoutEffect(()=>()=>{r.current&&(t(H$(r.current)),r.current=null)},[t]),null},F$=z.memo(U$);function x5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function E5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?x5(Object(r),!0).forEach(function(n){q$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function q$(e,t,r){return(t=W$(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function W$(e){var t=G$(e,"string");return typeof t=="symbol"?t:t+""}function G$(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kL=0,K$={xAxis:{},yAxis:{},zAxis:{}},PL=Cr({name:"cartesianAxis",initialState:K$,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:pt()},replaceXAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.xAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.xAxis[r.id],e.xAxis[n.id]=n)},prepare:pt()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:pt()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:pt()},replaceYAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.yAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.yAxis[r.id],e.yAxis[n.id]=n)},prepare:pt()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:pt()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:pt()},replaceZAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.zAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.zAxis[r.id],e.zAxis[n.id]=n)},prepare:pt()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:pt()},updateYAxisWidth(e,t){var{id:r,width:n}=t.payload,o=e.yAxis[r];if(o){var h,g=o.widthHistory||[];if(g.length===3&&g[0]===g[2]&&n===g[1]&&n!==o.width&&Math.abs(n-((h=g[0])!==null&&h!==void 0?h:0))<=1)return;var a=[...g,n].slice(-3);e.yAxis[r]=E5(E5({},o),{},{width:n,widthHistory:a})}}}}),{addXAxis:Y$,replaceXAxis:V$,removeXAxis:X$,addYAxis:Z$,replaceYAxis:Q$,removeYAxis:J$,addZAxis:Kq,replaceZAxis:Yq,removeZAxis:Vq,updateYAxisWidth:eU}=PL.actions,tU=PL.reducer,rU=le([Wt],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),iU=le([rU,dn,vn],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),BL=()=>Re(iU),A5=(e,t,r)=>{var n=r??e;if(!qt(n))return vi(n,t,0)},nU=(e,t,r)=>{var n={},o=e.filter(nf),h=e.filter(f=>f.stackId==null),g=o.reduce((f,v)=>{var u=f[v.stackId];return u==null&&(u=[]),u.push(v),f[v.stackId]=u,f},n),a=Object.entries(g).map(f=>{var v,[u,m]=f,w=m.map(_=>_.dataKey),C=A5(t,r,(v=m[0])===null||v===void 0?void 0:v.barSize);return{stackId:u,dataKeys:w,barSize:C}}),c=h.map(f=>{var v=[f.dataKey].filter(m=>m!=null),u=A5(t,r,f.barSize);return{stackId:void 0,dataKeys:v,barSize:u}});return[...a,...c]};function M5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function yu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?M5(Object(r),!0).forEach(function(n){sU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sU(e,t,r){return(t=aU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aU(e){var t=oU(e,"string");return typeof t=="symbol"?t:t+""}function oU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lU(e,t,r,n,o){var h,g=n.length;if(!(g<1)){var a=vi(e,r,0,!0),c,f=[];if(Ze((h=n[0])===null||h===void 0?void 0:h.barSize)){var v=!1,u=r/g,m=n.reduce((b,S)=>b+(S.barSize||0),0);m+=(g-1)*a,m>=r&&(m-=(g-1)*a,a=0),m>=r&&u>0&&(v=!0,u*=.9,m=g*u);var w=(r-m)/2>>0,C={offset:w-a,size:0};c=n.reduce((b,S)=>{var E,L={stackId:S.stackId,dataKeys:S.dataKeys,position:{offset:C.offset+C.size+a,size:v?u:(E=S.barSize)!==null&&E!==void 0?E:0}},x=[...b,L];return C=L.position,x},f)}else{var _=vi(t,r,0,!0);r-2*_-(g-1)*a<=0&&(a=0);var d=(r-2*_-(g-1)*a)/g;d>1&&(d>>=0);var y=Ze(o)?Math.min(d,o):d;c=n.reduce((b,S,E)=>[...b,{stackId:S.stackId,dataKeys:S.dataKeys,position:{offset:_+(d+a)*E+(d-y)/2,size:y}}],f)}return c}}var cU=(e,t,r,n,o,h,g)=>{var a=qt(g)?t:g,c=lU(r,n,o!==h?o:h,e,a);return o!==h&&c!=null&&(c=c.map(f=>yu(yu({},f),{},{position:yu(yu({},f.position),{},{offset:f.position.offset-o/2})}))),c},uU=(e,t)=>{var r=bm(t);if(!(!e||r==null||t==null)){var{stackId:n}=t;if(n!=null){var o=e[n];if(o){var{stackedData:h}=o;if(h)return h.find(g=>g.key===r)}}}},hU=(e,t)=>{if(!(e==null||t==null)){var r=e.find(n=>n.stackId===t.stackId&&t.dataKey!=null&&n.dataKeys.includes(t.dataKey));if(r!=null)return r.position}};function fU(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&Ze(e.zIndex)?e.zIndex:t}var dU=e=>{var{chartData:t}=e,r=Et(),n=Ir();return z.useEffect(()=>n?()=>{}:(r(zx(t)),()=>{r(zx(void 0))}),[t,r,n]),null},L5={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},jL=Cr({name:"brush",initialState:L5,reducers:{setBrushSettings(e,t){return t.payload==null?L5:t.payload}}}),{setBrushSettings:Xq}=jL.actions,vU=jL.reducer;function pU(e){return(e%180+180)%180}var gU=function(t){var{width:r,height:n}=t,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,h=pU(o),g=h*Math.PI/180,a=Math.atan(n/r),c=g>a&&g<Math.PI-a?n/Math.sin(g):r/Math.cos(g);return Math.abs(c)},_U={dots:[],areas:[],lines:[]},IL=Cr({name:"referenceElements",initialState:_U,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=di(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=di(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=di(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:Zq,removeDot:Qq,addArea:Jq,removeArea:eW,addLine:tW,removeLine:rW}=IL.actions,mU=IL.reducer,yU=z.createContext(void 0),bU=e=>{var{children:t}=e,[r]=z.useState("".concat(dl("recharts"),"-clip")),n=BL();if(n==null)return null;var{x:o,y:h,width:g,height:a}=n;return z.createElement(yU.Provider,{value:r},z.createElement("defs",null,z.createElement("clipPath",{id:r},z.createElement("rect",{x:o,y:h,height:a,width:g}))),t)};function NL(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;n<e.length;n+=t){var o=e[n];o!==void 0&&r.push(o)}return r}function SU(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return gU(n,r)}function wU(e,t,r){var n=r==="width",{x:o,y:h,width:g,height:a}=e;return t===1?{start:n?o:h,end:n?o+g:h+a}:{start:n?o+g:h+a,end:n?o:h}}function Ml(e,t,r,n,o){if(e*t<e*n||e*t>e*o)return!1;var h=r();return e*(t-e*h/2-n)>=0&&e*(t+e*h/2-o)<=0}function CU(e,t){return NL(e,t+1)}function xU(e,t,r,n,o){for(var h=(n||[]).slice(),{start:g,end:a}=t,c=0,f=1,v=g,u=function(){var C=n==null?void 0:n[c];if(C===void 0)return{v:NL(n,f)};var _=c,d,y=()=>(d===void 0&&(d=r(C,_)),d),b=C.coordinate,S=c===0||Ml(e,b,y,v,a);S||(c=0,v=g,f+=1),S&&(v=b+e*(y()/2+o),c+=f)},m;f<=h.length;)if(m=u(),m)return m.v;return[]}function EU(e,t,r,n,o){var h=(n||[]).slice(),g=h.length;if(g===0)return[];for(var{start:a,end:c}=t,f=1;f<=g;f++){for(var v=(g-1)%f,u=a,m=!0,w=function(){var E=n[_];if(E==null)return 0;var L=_,x,O=()=>(x===void 0&&(x=r(E,L)),x),M=E.coordinate,D=_===v||Ml(e,M,O,u,c);if(!D)return m=!1,1;D&&(u=M+e*(O()/2+o))},C,_=v;_<g&&(C=w(),!(C!==0&&C===1));_+=f);if(m){for(var d=[],y=v;y<g;y+=f){var b=n[y];b!=null&&d.push(b)}return d}}return[]}function O5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function or(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?O5(Object(r),!0).forEach(function(n){AU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AU(e,t,r){return(t=MU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MU(e){var t=LU(e,"string");return typeof t=="symbol"?t:t+""}function LU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function OU(e,t,r,n,o){for(var h=(n||[]).slice(),g=h.length,{start:a}=t,{end:c}=t,f=function(m){var w=h[m];if(w==null)return 1;var C=w,_,d=()=>(_===void 0&&(_=r(w,m)),_);if(m===g-1){var y=e*(C.coordinate+e*d()/2-c);h[m]=C=or(or({},C),{},{tickCoord:y>0?C.coordinate-y*e:C.coordinate})}else h[m]=C=or(or({},C),{},{tickCoord:C.coordinate});if(C.tickCoord!=null){var b=Ml(e,C.tickCoord,d,a,c);b&&(c=C.tickCoord-e*(d()/2+o),h[m]=or(or({},C),{},{isShow:!0}))}},v=g-1;v>=0;v--)f(v);return h}function TU(e,t,r,n,o,h){var g=(n||[]).slice(),a=g.length,{start:c,end:f}=t;if(h){var v=n[a-1];if(v!=null){var u=r(v,a-1),m=e*(v.coordinate+e*u/2-f);if(g[a-1]=v=or(or({},v),{},{tickCoord:m>0?v.coordinate-m*e:v.coordinate}),v.tickCoord!=null){var w=Ml(e,v.tickCoord,()=>u,c,f);w&&(f=v.tickCoord-e*(u/2+o),g[a-1]=or(or({},v),{},{isShow:!0}))}}}for(var C=h?a-1:a,_=function(b){var S=g[b];if(S==null)return 1;var E=S,L,x=()=>(L===void 0&&(L=r(S,b)),L);if(b===0){var O=e*(E.coordinate-e*x()/2-c);g[b]=E=or(or({},E),{},{tickCoord:O<0?E.coordinate-O*e:E.coordinate})}else g[b]=E=or(or({},E),{},{tickCoord:E.coordinate});if(E.tickCoord!=null){var M=Ml(e,E.tickCoord,x,c,f);M&&(c=E.tickCoord+e*(x()/2+o),g[b]=or(or({},E),{},{isShow:!0}))}},d=0;d<C;d++)_(d);return g}function DU(e,t,r){var{tick:n,ticks:o,viewBox:h,minTickGap:g,orientation:a,interval:c,tickFormatter:f,unit:v,angle:u}=e;if(!o||!o.length||!n)return[];if(Oe(c)||Wh.isSsr){var m;return(m=CU(o,Oe(c)?c:0))!==null&&m!==void 0?m:[]}var w=[],C=a==="top"||a==="bottom"?"width":"height",_=v&&C==="width"?fl(v,{fontSize:t,letterSpacing:r}):{width:0,height:0},d=(L,x)=>{var O=typeof f=="function"?f(L.value,x):L.value;return C==="width"?SU(fl(O,{fontSize:t,letterSpacing:r}),_,u):fl(O,{fontSize:t,letterSpacing:r})[C]},y=o[0],b=o[1],S=o.length>=2&&y!=null&&b!=null?Rr(b.coordinate-y.coordinate):1,E=wU(h,S,C);return c==="equidistantPreserveStart"?xU(S,E,d,o,g):c==="equidistantPreserveEnd"?EU(S,E,d,o,g):(c==="preserveStart"||c==="preserveStartEnd"?w=TU(S,E,d,o,g,c==="preserveStartEnd"):w=OU(S,E,d,o,g),w.filter(L=>L.isShow))}var RU=e=>{var{ticks:t,label:r,labelGapWithTick:n=5,tickSize:o=0,tickMargin:h=0}=e,g=0;if(t){Array.from(t).forEach(v=>{if(v){var u=v.getBoundingClientRect();u.width>g&&(g=u.width)}});var a=r?r.getBoundingClientRect().width:0,c=o+h,f=g+c+a+(r?n:0);return Math.round(f)}return 0},kU=["axisLine","width","height","className","hide","ticks","axisType"];function PU(e,t){if(e==null)return{};var r,n,o=BU(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(n=0;n<h.length;n++)r=h[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function BU(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Is(){return Is=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Is.apply(null,arguments)}function T5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function St(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?T5(Object(r),!0).forEach(function(n){jU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jU(e,t,r){return(t=IU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function IU(e){var t=NU(e,"string");return typeof t=="symbol"?t:t+""}function NU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ts={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:wr.axis};function zU(e){var{x:t,y:r,width:n,height:o,orientation:h,mirror:g,axisLine:a,otherSvgProps:c}=e;if(!a)return null;var f=St(St(St({},c),Xn(a)),{},{fill:"none"});if(h==="top"||h==="bottom"){var v=+(h==="top"&&!g||h==="bottom"&&g);f=St(St({},f),{},{x1:t,y1:r+v*o,x2:t+n,y2:r+v*o})}else{var u=+(h==="left"&&!g||h==="right"&&g);f=St(St({},f),{},{x1:t+u*n,y1:r,x2:t+u*n,y2:r+o})}return z.createElement("line",Is({},f,{className:dt("recharts-cartesian-axis-line",ja(a,"className"))}))}function HU(e,t,r,n,o,h,g,a,c){var f,v,u,m,w,C,_=a?-1:1,d=e.tickSize||g,y=Oe(e.tickCoord)?e.tickCoord:e.coordinate;switch(h){case"top":f=v=e.coordinate,m=r+ +!a*o,u=m-_*d,C=u-_*c,w=y;break;case"left":u=m=e.coordinate,v=t+ +!a*n,f=v-_*d,w=f-_*c,C=y;break;case"right":u=m=e.coordinate,v=t+ +a*n,f=v+_*d,w=f+_*c,C=y;break;default:f=v=e.coordinate,m=r+ +a*o,u=m+_*d,C=u+_*c,w=y;break}return{line:{x1:f,y1:u,x2:v,y2:m},tick:{x:w,y:C}}}function $U(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function UU(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function FU(e){var{option:t,tickProps:r,value:n}=e,o,h=dt(r.className,"recharts-cartesian-axis-tick-value");if(z.isValidElement(t))o=z.cloneElement(t,St(St({},r),{},{className:h}));else if(typeof t=="function")o=t(St(St({},r),{},{className:h}));else{var g="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(g=dt(g,a$(t))),o=z.createElement(Um,Is({},r,{className:g}),n)}return o}var qU=z.forwardRef((e,t)=>{var{ticks:r=[],tick:n,tickLine:o,stroke:h,tickFormatter:g,unit:a,padding:c,tickTextProps:f,orientation:v,mirror:u,x:m,y:w,width:C,height:_,tickSize:d,tickMargin:y,fontSize:b,letterSpacing:S,getTicksConfig:E,events:L,axisType:x}=e,O=DU(St(St({},E),{},{ticks:r}),b,S),M=$U(v,u),D=UU(v,u),k=Xn(E),B=y_(n),R={};typeof o=="object"&&(R=o);var P=St(St({},k),{},{fill:"none"},R),H=O.map(K=>St({entry:K},HU(K,m,w,C,_,v,d,u,y))),X=H.map(K=>{var{entry:Y,line:j}=K;return z.createElement(nn,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(Y.value,"-").concat(Y.coordinate,"-").concat(Y.tickCoord)},o&&z.createElement("line",Is({},P,j,{className:dt("recharts-cartesian-axis-tick-line",ja(o,"className"))})))}),F=H.map((K,Y)=>{var j,$,{entry:N,tick:U}=K,J=St(St(St(St({verticalAnchor:D},k),{},{textAnchor:M,stroke:"none",fill:h},U),{},{index:Y,payload:N,visibleTicksCount:O.length,tickFormatter:g,padding:c},f),{},{angle:(j=($=f==null?void 0:f.angle)!==null&&$!==void 0?$:k.angle)!==null&&j!==void 0?j:0}),te=St(St({},J),B);return z.createElement(nn,Is({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(N.value,"-").concat(N.coordinate,"-").concat(N.tickCoord)},A_(L,N,Y)),n&&z.createElement(FU,{option:n,tickProps:te,value:"".concat(typeof g=="function"?g(N.value,Y):N.value).concat(a||"")}))});return z.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(x,"-ticks")},F.length>0&&z.createElement(ts,{zIndex:wr.label},z.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(x,"-tick-labels"),ref:t},F)),X.length>0&&z.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(x,"-tick-lines")},X))}),WU=z.forwardRef((e,t)=>{var{axisLine:r,width:n,height:o,className:h,hide:g,ticks:a,axisType:c}=e,f=PU(e,kU),[v,u]=z.useState(""),[m,w]=z.useState(""),C=z.useRef(null);z.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var d;return RU({ticks:C.current,label:(d=e.labelRef)===null||d===void 0?void 0:d.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var _=z.useCallback(d=>{if(d){var y=d.getElementsByClassName("recharts-cartesian-axis-tick-value");C.current=y;var b=y[0];if(b){var S=window.getComputedStyle(b),E=S.fontSize,L=S.letterSpacing;(E!==v||L!==m)&&(u(E),w(L))}}},[v,m]);return g||n!=null&&n<=0||o!=null&&o<=0?null:z.createElement(ts,{zIndex:e.zIndex},z.createElement(nn,{className:dt("recharts-cartesian-axis",h)},z.createElement(zU,{x:e.x,y:e.y,width:n,height:o,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:Xn(e)}),z.createElement(qU,{ref:_,axisType:c,events:f,fontSize:v,getTicksConfig:e,height:e.height,letterSpacing:m,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:a,unit:e.unit,width:e.width,x:e.x,y:e.y}),z.createElement(kH,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},z.createElement(FH,{label:e.label,labelRef:e.labelRef}),e.children)))}),qm=z.forwardRef((e,t)=>{var r=ii(e,Ts);return z.createElement(WU,Is({},r,{ref:t}))});qm.displayName="CartesianAxis";var GU={},zL=Cr({name:"errorBars",initialState:GU,reducers:{addErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]||(e[r]=[]),e[r].push(n)},replaceErrorBar:(e,t)=>{var{itemId:r,prev:n,next:o}=t.payload;e[r]&&(e[r]=e[r].map(h=>h.dataKey===n.dataKey&&h.direction===n.direction?o:h))},removeErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]&&(e[r]=e[r].filter(o=>o.dataKey!==n.dataKey||o.direction!==n.direction))}}}),{addErrorBar:iW,replaceErrorBar:nW,removeErrorBar:sW}=zL.actions,KU=zL.reducer,YU=["children"];function VU(e,t){if(e==null)return{};var r,n,o=XU(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(n=0;n<h.length;n++)r=h[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function XU(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var ZU={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},QU=z.createContext(ZU);function JU(e){var{children:t}=e,r=VU(e,YU);return z.createElement(QU.Provider,{value:r},t)}function HL(e,t){var r,n,o=Re(f=>_n(f,e)),h=Re(f=>mn(f,t)),g=(r=o==null?void 0:o.allowDataOverflow)!==null&&r!==void 0?r:$t.allowDataOverflow,a=(n=h==null?void 0:h.allowDataOverflow)!==null&&n!==void 0?n:Ut.allowDataOverflow,c=g||a;return{needClip:c,needClipX:g,needClipY:a}}function e9(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,o=BL(),{needClipX:h,needClipY:g,needClip:a}=HL(t,r);if(!a||!o)return null;var{x:c,y:f,width:v,height:u}=o;return z.createElement("clipPath",{id:"clipPath-".concat(n)},z.createElement("rect",{x:h?c:c-v/2,y:g?f:f-u/2,width:h?v:v*2,height:g?u:u*2}))}var vg={exports:{}},pg={};/**
|
|
186
|
-
* @license React
|
|
187
|
-
* use-sync-external-store-with-selector.production.js
|
|
188
|
-
*
|
|
189
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
190
|
-
*
|
|
191
|
-
* This source code is licensed under the MIT license found in the
|
|
192
|
-
* LICENSE file in the root directory of this source tree.
|
|
193
|
-
*/var D5;function t9(){if(D5)return pg;D5=1;var e=Wa();function t(c,f){return c===f&&(c!==0||1/c===1/f)||c!==c&&f!==f}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,o=e.useRef,h=e.useEffect,g=e.useMemo,a=e.useDebugValue;return pg.useSyncExternalStoreWithSelector=function(c,f,v,u,m){var w=o(null);if(w.current===null){var C={hasValue:!1,value:null};w.current=C}else C=w.current;w=g(function(){function d(L){if(!y){if(y=!0,b=L,L=u(L),m!==void 0&&C.hasValue){var x=C.value;if(m(x,L))return S=x}return S=L}if(x=S,r(b,L))return x;var O=u(L);return m!==void 0&&m(x,O)?(b=L,x):(b=L,S=O)}var y=!1,b,S,E=v===void 0?null:v;return[function(){return d(f())},E===null?void 0:function(){return d(E())}]},[f,v,u,m]);var _=n(c,w[0],w[1]);return h(function(){C.hasValue=!0,C.value=_},[_]),a(_),_},pg}var R5;function r9(){return R5||(R5=1,vg.exports=t9()),vg.exports}r9();function i9(e){e()}function n9(){let e=null,t=null;return{clear(){e=null,t=null},notify(){i9(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const o=t={callback:r,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!n||e===null||(n=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var k5={notify(){},get:()=>[]};function s9(e,t){let r,n=k5,o=0,h=!1;function g(_){v();const d=n.subscribe(_);let y=!1;return()=>{y||(y=!0,d(),u())}}function a(){n.notify()}function c(){C.onStateChange&&C.onStateChange()}function f(){return h}function v(){o++,r||(r=e.subscribe(c),n=n9())}function u(){o--,r&&o===0&&(r(),r=void 0,n.clear(),n=k5)}function m(){h||(h=!0,v())}function w(){h&&(h=!1,u())}const C={addNestedSub:g,notifyNestedSubs:a,handleChangeWrapper:c,isSubscribed:f,trySubscribe:m,tryUnsubscribe:w,getListeners:()=>n};return C}var a9=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",o9=a9(),l9=()=>typeof navigator<"u"&&navigator.product==="ReactNative",c9=l9(),u9=()=>o9||c9?z.useLayoutEffect:z.useEffect,h9=u9();function P5(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function f9(e,t){if(P5(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let o=0;o<r.length;o++)if(!Object.prototype.hasOwnProperty.call(t,r[o])||!P5(e[r[o]],t[r[o]]))return!1;return!0}var gg=Symbol.for("react-redux-context"),_g=typeof globalThis<"u"?globalThis:{};function d9(){if(!z.createContext)return{};const e=_g[gg]??(_g[gg]=new Map);let t=e.get(z.createContext);return t||(t=z.createContext(null),e.set(z.createContext,t)),t}var v9=d9();function p9(e){const{children:t,context:r,serverState:n,store:o}=e,h=z.useMemo(()=>{const c=s9(o);return{store:o,subscription:c,getServerState:n?()=>n:void 0}},[o,n]),g=z.useMemo(()=>o.getState(),[o]);h9(()=>{const{subscription:c}=h;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),g!==o.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[h,g]);const a=r||v9;return z.createElement(a.Provider,{value:h},t)}var g9=p9,_9=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius"]);function m9(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Wm(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(_9.has(n)){if(e[n]==null&&t[n]==null)continue;if(!f9(e[n],t[n]))return!1}else if(!m9(e[n],t[n]))return!1;return!0}function Hs(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(o=>o.id===t))===null||n===void 0?void 0:n.xAxisId)!==null&&r!==void 0?r:kL}function $s(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(o=>o.id===t))===null||n===void 0?void 0:n.yAxisId)!==null&&r!==void 0?r:kL}var y9="Invariant failed";function b9(e,t){throw new Error(y9)}function c_(){return c_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c_.apply(null,arguments)}function mh(e){return z.createElement(O$,c_({shapeType:"rectangle",activeClassName:"recharts-active-bar"},e))}var S9=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(n,o)=>{if(Oe(t))return t;var h=Oe(n)||qt(n);return h?t(n,o):(h||b9(),r)}},w9=(e,t,r)=>r,C9=(e,t)=>t,ql=le([wm,C9],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),x9=le([ql],e=>e==null?void 0:e.maxBarSize),E9=(e,t,r,n)=>n,A9=le([ot,wm,Hs,$s,w9],(e,t,r,n,o)=>t.filter(h=>e==="horizontal"?h.xAxisId===r:h.yAxisId===n).filter(h=>h.isPanorama===o).filter(h=>h.hide===!1).filter(h=>h.type==="bar")),M9=(e,t,r)=>{var n=ot(e),o=Hs(e,t),h=$s(e,t);if(!(o==null||h==null))return n==="horizontal"?i_(e,"yAxis",h,r):i_(e,"xAxis",o,r)},L9=(e,t)=>{var r=ot(e),n=Hs(e,t),o=$s(e,t);if(!(n==null||o==null))return r==="horizontal"?Mx(e,"xAxis",n):Mx(e,"yAxis",o)},O9=le([A9,AI,L9],nU),T9=(e,t,r)=>{var n,o,h=ql(e,t);if(h==null)return 0;var g=Hs(e,t),a=$s(e,t);if(g==null||a==null)return 0;var c=ot(e),f=KA(e),{maxBarSize:v}=h,u=qt(v)?f:v,m,w;return c==="horizontal"?(m=Fa(e,"xAxis",g,r),w=Ua(e,"xAxis",g,r)):(m=Fa(e,"yAxis",a,r),w=Ua(e,"yAxis",a,r)),(n=(o=Wu(m,w,!0))!==null&&o!==void 0?o:u)!==null&&n!==void 0?n:0},$L=(e,t,r)=>{var n=ot(e),o=Hs(e,t),h=$s(e,t);if(!(o==null||h==null)){var g,a;return n==="horizontal"?(g=Fa(e,"xAxis",o,r),a=Ua(e,"xAxis",o,r)):(g=Fa(e,"yAxis",h,r),a=Ua(e,"yAxis",h,r)),Wu(g,a)}},D9=le([O9,KA,EI,YA,T9,$L,x9],cU),R9=(e,t,r)=>{var n=Hs(e,t);if(n!=null)return Fa(e,"xAxis",n,r)},k9=(e,t,r)=>{var n=$s(e,t);if(n!=null)return Fa(e,"yAxis",n,r)},P9=(e,t,r)=>{var n=Hs(e,t);if(n!=null)return Ua(e,"xAxis",n,r)},B9=(e,t,r)=>{var n=$s(e,t);if(n!=null)return Ua(e,"yAxis",n,r)},j9=le([D9,ql],hU),I9=le([M9,ql],uU),N9=le([Wt,j_,R9,k9,P9,B9,j9,ot,_I,$L,I9,ql,E9],(e,t,r,n,o,h,g,a,c,f,v,u,m)=>{var{chartData:w,dataStartIndex:C,dataEndIndex:_}=c;if(!(u==null||g==null||t==null||a!=="horizontal"&&a!=="vertical"||r==null||n==null||o==null||h==null||f==null)){var{data:d}=u,y;if(d!=null&&d.length>0?y=d:y=w==null?void 0:w.slice(C,_+1),y!=null)return fF({layout:a,barSettings:u,pos:g,parentViewBox:t,bandSize:f,xAxis:r,yAxis:n,xAxisTicks:o,yAxisTicks:h,stackedData:v,displayedData:y,offset:e,cells:m,dataStartIndex:C})}}),z9=["index"];function u_(){return u_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u_.apply(null,arguments)}function H9(e,t){if(e==null)return{};var r,n,o=$9(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(n=0;n<h.length;n++)r=h[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function $9(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var UL=z.createContext(void 0),U9=e=>{var t=z.useContext(UL);if(t!=null)return t.stackId;if(e!=null)return gP(e)},F9=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),q9=e=>{var t=z.useContext(UL);if(t!=null){var{stackId:r}=t;return"url(#".concat(F9(r,e),")")}},FL=e=>{var{index:t}=e,r=H9(e,z9),n=q9(t);return z.createElement(nn,u_({className:"recharts-bar-stack-layer",clipPath:n},r))},W9=["onMouseEnter","onMouseLeave","onClick"],G9=["value","background","tooltipPosition"],K9=["id"],Y9=["onMouseEnter","onClick","onMouseLeave"];function hn(){return hn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hn.apply(null,arguments)}function B5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ur(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?B5(Object(r),!0).forEach(function(n){V9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):B5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function V9(e,t,r){return(t=X9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function X9(e){var t=Z9(e,"string");return typeof t=="symbol"?t:t+""}function Z9(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yh(e,t){if(e==null)return{};var r,n,o=Q9(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(n=0;n<h.length;n++)r=h[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Q9(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var J9=e=>{var{dataKey:t,name:r,fill:n,legendType:o,hide:h}=e;return[{inactive:h,dataKey:t,type:o,color:n,value:TE(r,t),payload:e}]},eF=z.memo(e=>{var{dataKey:t,stroke:r,strokeWidth:n,fill:o,name:h,hide:g,unit:a,tooltipType:c,id:f}=e,v={dataDefinedOnItem:void 0,getPosition:Ga,settings:{stroke:r,strokeWidth:n,fill:o,dataKey:t,nameKey:void 0,name:TE(h,t),hide:g,type:c,color:o,unit:a,graphicalItemId:f}};return z.createElement(T$,{tooltipEntrySettings:v})});function tF(e){var t=Re(qa),{data:r,dataKey:n,background:o,allOtherBarProps:h}=e,{onMouseEnter:g,onMouseLeave:a,onClick:c}=h,f=yh(h,W9),v=OL(g,n,h.id),u=TL(a),m=DL(c,n,h.id);if(!o||r==null)return null;var w=y_(o);return z.createElement(ts,{zIndex:fU(o,wr.barBackground)},r.map((C,_)=>{var{value:d,background:y,tooltipPosition:b}=C,S=yh(C,G9);if(!y)return null;var E=v(C,_),L=u(C,_),x=m(C,_),O=ur(ur(ur(ur(ur({option:o,isActive:String(_)===t},S),{},{fill:"#eee"},y),w),A_(f,C,_)),{},{onMouseEnter:E,onMouseLeave:L,onClick:x,dataKey:n,index:_,className:"recharts-bar-background-rectangle"});return z.createElement(mh,hn({key:"background-bar-".concat(_)},O))}))}function rF(e){var{showLabels:t,children:r,rects:n}=e,o=n==null?void 0:n.map(h=>{var g={x:h.x,y:h.y,width:h.width,lowerWidth:h.width,upperWidth:h.width,height:h.height};return ur(ur({},g),{},{value:h.value,payload:h.payload,parentViewBox:h.parentViewBox,viewBox:g,fill:h.fill})});return z.createElement(e$,{value:t?o:void 0},r)}function iF(e){var{shape:t,activeBar:r,baseProps:n,entry:o,index:h,dataKey:g}=e,a=Re(qa),c=Re(sL),f=r&&String(h)===a&&(c==null||g===c),v=f?r:t;return f?z.createElement(ts,{zIndex:wr.activeBar},z.createElement(FL,{index:h},z.createElement(mh,hn({},n,{name:String(n.name)},o,{isActive:f,option:v,index:h,dataKey:g})))):z.createElement(mh,hn({},n,{name:String(n.name)},o,{isActive:f,option:v,index:h,dataKey:g}))}function nF(e){var{shape:t,baseProps:r,entry:n,index:o,dataKey:h}=e;return z.createElement(mh,hn({},r,{name:String(r.name)},n,{isActive:!1,option:t,index:o,dataKey:h}))}function sF(e){var t,{data:r,props:n}=e,o=(t=Xn(n))!==null&&t!==void 0?t:{},{id:h}=o,g=yh(o,K9),{shape:a,dataKey:c,activeBar:f}=n,{onMouseEnter:v,onClick:u,onMouseLeave:m}=n,w=yh(n,Y9),C=OL(v,c,h),_=TL(m),d=DL(u,c,h);return r?z.createElement(z.Fragment,null,r.map((y,b)=>z.createElement(FL,hn({index:b,key:"rectangle-".concat(y==null?void 0:y.x,"-").concat(y==null?void 0:y.y,"-").concat(y==null?void 0:y.value,"-").concat(b),className:"recharts-bar-rectangle"},A_(w,y,b),{onMouseEnter:C(y,b),onMouseLeave:_(y,b),onClick:d(y,b)}),f?z.createElement(iF,{shape:a,activeBar:f,baseProps:g,entry:y,index:b,dataKey:c}):z.createElement(nF,{shape:a,baseProps:g,entry:y,index:b,dataKey:c})))):null}function aF(e){var{props:t,previousRectanglesRef:r}=e,{data:n,layout:o,isAnimationActive:h,animationBegin:g,animationDuration:a,animationEasing:c,onAnimationEnd:f,onAnimationStart:v}=t,u=r.current,m=U_(t,"recharts-bar-"),[w,C]=z.useState(!1),_=!w,d=z.useCallback(()=>{typeof f=="function"&&f(),C(!1)},[f]),y=z.useCallback(()=>{typeof v=="function"&&v(),C(!0)},[v]);return z.createElement(rF,{showLabels:_,rects:n},z.createElement($_,{animationId:m,begin:g,duration:a,isActive:h,easing:c,onAnimationEnd:d,onAnimationStart:y,key:m},b=>{var S=b===1?n:n==null?void 0:n.map((E,L)=>{var x=u&&u[L];if(x)return ur(ur({},E),{},{x:ir(x.x,E.x,b),y:ir(x.y,E.y,b),width:ir(x.width,E.width,b),height:ir(x.height,E.height,b)});if(o==="horizontal"){var O=ir(0,E.height,b),M=ir(E.stackedBarStart,E.y,b);return ur(ur({},E),{},{y:M,height:O})}var D=ir(0,E.width,b),k=ir(E.stackedBarStart,E.x,b);return ur(ur({},E),{},{width:D,x:k})});return b>0&&(r.current=S??null),S==null?null:z.createElement(nn,null,z.createElement(sF,{props:t,data:S}))}),z.createElement(i$,{label:t.label}),t.children)}function oF(e){var t=z.useRef(null);return z.createElement(aF,{previousRectanglesRef:t,props:e})}var qL=0,lF=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:sr(e,t)}};class cF extends z.PureComponent{render(){var{hide:t,data:r,dataKey:n,className:o,xAxisId:h,yAxisId:g,needClip:a,background:c,id:f}=this.props;if(t||r==null)return null;var v=dt("recharts-bar",o),u=f;return z.createElement(nn,{className:v,id:f},a&&z.createElement("defs",null,z.createElement(e9,{clipPathId:u,xAxisId:h,yAxisId:g})),z.createElement(nn,{className:"recharts-bar-rectangles",clipPath:a?"url(#clipPath-".concat(u,")"):void 0},z.createElement(tF,{data:r,dataKey:n,background:c,allOtherBarProps:this.props}),z.createElement(oF,this.props)))}}var uF={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:qL,xAxisId:0,yAxisId:0,zIndex:wr.bar};function hF(e){var{xAxisId:t,yAxisId:r,hide:n,legendType:o,minPointSize:h,activeBar:g,animationBegin:a,animationDuration:c,animationEasing:f,isAnimationActive:v}=e,{needClip:u}=HL(t,r),m=Ka(),w=Ir(),C=u$(e.children,$m),_=Re(b=>N9(b,e.id,w,C));if(m!=="vertical"&&m!=="horizontal")return null;var d,y=_==null?void 0:_[0];return y==null||y.height==null||y.width==null?d=0:d=m==="vertical"?y.height/2:y.width/2,z.createElement(JU,{xAxisId:t,yAxisId:r,data:_,dataPointFormatter:lF,errorBarOffset:d},z.createElement(cF,hn({},e,{layout:m,needClip:u,data:_,xAxisId:t,yAxisId:r,hide:n,legendType:o,minPointSize:h,activeBar:g,animationBegin:a,animationDuration:c,animationEasing:f,isAnimationActive:v})))}function fF(e){var{layout:t,barSettings:{dataKey:r,minPointSize:n},pos:o,bandSize:h,xAxis:g,yAxis:a,xAxisTicks:c,yAxisTicks:f,stackedData:v,displayedData:u,offset:m,cells:w,parentViewBox:C,dataStartIndex:_}=e,d=t==="horizontal"?a:g,y=v?d.scale.domain():null,b=_P({numericAxis:d}),S=d.scale.map(b);return u.map((E,L)=>{var x,O,M,D,k,B;if(v){var R=v[L+_];if(R==null)return null;x=hP(R,y)}else x=sr(E,r),Array.isArray(x)||(x=[b,x]);var P=S9(n,qL)(x[1],L);if(t==="horizontal"){var H,X=a.scale.map(x[0]),F=a.scale.map(x[1]);if(X==null||F==null)return null;O=Mw({axis:g,ticks:c,bandSize:h,offset:o.offset,entry:E,index:L}),M=(H=F??X)!==null&&H!==void 0?H:void 0,D=o.size;var K=X-F;if(k=Ti(K)?0:K,B={x:O,y:m.top,width:D,height:m.height},Math.abs(P)>0&&Math.abs(k)<Math.abs(P)){var Y=Rr(k||P)*(Math.abs(P)-Math.abs(k));M-=Y,k+=Y}}else{var j=g.scale.map(x[0]),$=g.scale.map(x[1]);if(j==null||$==null)return null;if(O=j,M=Mw({axis:a,ticks:f,bandSize:h,offset:o.offset,entry:E,index:L}),D=$-j,k=o.size,B={x:m.left,y:M,width:m.width,height:k},Math.abs(P)>0&&Math.abs(D)<Math.abs(P)){var N=Rr(D||P)*(Math.abs(P)-Math.abs(D));D+=N}}if(O==null||M==null||D==null||k==null)return null;var U=ur(ur({},E),{},{stackedBarStart:S,x:O,y:M,width:D,height:k,value:v?x:x[1],payload:E,background:B,tooltipPosition:{x:O+D/2,y:M+k/2},parentViewBox:C},w&&w[L]&&w[L].props);return U}).filter(Boolean)}function dF(e){var t=ii(e,uF),r=U9(t.stackId),n=Ir();return z.createElement(j$,{id:t.id,type:"bar"},o=>z.createElement(z.Fragment,null,z.createElement(D$,{legendPayload:J9(t)}),z.createElement(eF,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:o}),z.createElement(F$,{type:"bar",id:o,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:r,hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:n}),z.createElement(ts,{zIndex:t.zIndex},z.createElement(hF,hn({},t,{id:o})))))}var WL=z.memo(dF,Wm);WL.displayName="Bar";var vF=["domain","range"],pF=["domain","range"];function j5(e,t){if(e==null)return{};var r,n,o=gF(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(n=0;n<h.length;n++)r=h[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function gF(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function I5(e,t){return e===t?!0:Array.isArray(e)&&e.length===2&&Array.isArray(t)&&t.length===2?e[0]===t[0]&&e[1]===t[1]:!1}function GL(e,t){if(e===t)return!0;var{domain:r,range:n}=e,o=j5(e,vF),{domain:h,range:g}=t,a=j5(t,pF);return!I5(r,h)||!I5(n,g)?!1:Wm(o,a)}var _F=["type"],mF=["dangerouslySetInnerHTML","ticks","scale"],yF=["id","scale"];function h_(){return h_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},h_.apply(null,arguments)}function N5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function z5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?N5(Object(r),!0).forEach(function(n){bF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bF(e,t,r){return(t=SF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SF(e){var t=wF(e,"string");return typeof t=="symbol"?t:t+""}function wF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function f_(e,t){if(e==null)return{};var r,n,o=CF(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(n=0;n<h.length;n++)r=h[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function CF(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function xF(e){var t=Et(),r=z.useRef(null),n=BE(),{type:o}=e,h=f_(e,_F),g=ef(n,"xAxis",o),a=z.useMemo(()=>{if(g!=null)return z5(z5({},h),{},{type:g})},[h,g]);return z.useLayoutEffect(()=>{a!=null&&(r.current===null?t(Y$(a)):r.current!==a&&t(V$({prev:r.current,next:a})),r.current=a)},[a,t]),z.useLayoutEffect(()=>()=>{r.current&&(t(X$(r.current)),r.current=null)},[t]),null}var EF=e=>{var{xAxisId:t,className:r}=e,n=Re(j_),o=Ir(),h="xAxis",g=Re(y=>NM(y,h,t,o)),a=Re(y=>PM(y,t)),c=Re(y=>MN(y,t)),f=Re(y=>iM(y,t));if(a==null||c==null||f==null)return null;var{dangerouslySetInnerHTML:v,ticks:u,scale:m}=e,w=f_(e,mF),{id:C,scale:_}=f,d=f_(f,yF);return z.createElement(qm,h_({},w,d,{x:c.x,y:c.y,width:a.width,height:a.height,className:dt("recharts-".concat(h," ").concat(h),r),viewBox:n,ticks:g,axisType:h}))},AF={allowDataOverflow:$t.allowDataOverflow,allowDecimals:$t.allowDecimals,allowDuplicatedCategory:$t.allowDuplicatedCategory,angle:$t.angle,axisLine:Ts.axisLine,height:$t.height,hide:!1,includeHidden:$t.includeHidden,interval:$t.interval,label:!1,minTickGap:$t.minTickGap,mirror:$t.mirror,orientation:$t.orientation,padding:$t.padding,reversed:$t.reversed,scale:$t.scale,tick:$t.tick,tickCount:$t.tickCount,tickLine:Ts.tickLine,tickSize:Ts.tickSize,type:$t.type,xAxisId:0},MF=e=>{var t=ii(e,AF);return z.createElement(z.Fragment,null,z.createElement(xF,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit}),z.createElement(EF,t))},KL=z.memo(MF,GL);KL.displayName="XAxis";var LF=["type"],OF=["dangerouslySetInnerHTML","ticks","scale"],TF=["id","scale"];function d_(){return d_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d_.apply(null,arguments)}function H5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function $5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?H5(Object(r),!0).forEach(function(n){DF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function DF(e,t,r){return(t=RF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RF(e){var t=kF(e,"string");return typeof t=="symbol"?t:t+""}function kF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function v_(e,t){if(e==null)return{};var r,n,o=PF(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(n=0;n<h.length;n++)r=h[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function PF(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function BF(e){var t=Et(),r=z.useRef(null),n=BE(),{type:o}=e,h=v_(e,LF),g=ef(n,"yAxis",o),a=z.useMemo(()=>{if(g!=null)return $5($5({},h),{},{type:g})},[g,h]);return z.useLayoutEffect(()=>{a!=null&&(r.current===null?t(Z$(a)):r.current!==a&&t(Q$({prev:r.current,next:a})),r.current=a)},[a,t]),z.useLayoutEffect(()=>()=>{r.current&&(t(J$(r.current)),r.current=null)},[t]),null}function jF(e){var{yAxisId:t,className:r,width:n,label:o}=e,h=z.useRef(null),g=z.useRef(null),a=Re(j_),c=Ir(),f=Et(),v="yAxis",u=Re(x=>BM(x,t)),m=Re(x=>ON(x,t)),w=Re(x=>NM(x,v,t,c)),C=Re(x=>nM(x,t));if(z.useLayoutEffect(()=>{if(!(n!=="auto"||!u||Fm(o)||z.isValidElement(o)||C==null)){var x=h.current;if(x){var O=x.getCalculatedWidth();Math.round(u.width)!==Math.round(O)&&f(eU({id:t,width:O}))}}},[w,u,f,o,t,n,C]),u==null||m==null||C==null)return null;var{dangerouslySetInnerHTML:_,ticks:d,scale:y}=e,b=v_(e,OF),{id:S,scale:E}=C,L=v_(C,TF);return z.createElement(qm,d_({},b,L,{ref:h,labelRef:g,x:m.x,y:m.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:u.width,height:u.height,className:dt("recharts-".concat(v," ").concat(v),r),viewBox:a,ticks:w,axisType:v}))}var IF={allowDataOverflow:Ut.allowDataOverflow,allowDecimals:Ut.allowDecimals,allowDuplicatedCategory:Ut.allowDuplicatedCategory,angle:Ut.angle,axisLine:Ts.axisLine,hide:!1,includeHidden:Ut.includeHidden,interval:Ut.interval,label:!1,minTickGap:Ut.minTickGap,mirror:Ut.mirror,orientation:Ut.orientation,padding:Ut.padding,reversed:Ut.reversed,scale:Ut.scale,tick:Ut.tick,tickCount:Ut.tickCount,tickLine:Ts.tickLine,tickSize:Ts.tickSize,type:Ut.type,width:Ut.width,yAxisId:0},NF=e=>{var t=ii(e,IF);return z.createElement(z.Fragment,null,z.createElement(BF,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter}),z.createElement(jF,t))},YL=z.memo(NF,GL);YL.displayName="YAxis";var zF=(e,t)=>t,Gm=le([zF,ot,tM,Yt,tL,yn,F7,Wt],X7),Km=e=>{var t=e.currentTarget.getBoundingClientRect(),r=t.width/e.currentTarget.offsetWidth,n=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/r),chartY:Math.round((e.clientY-t.top)/n)}},VL=ei("mouseClick"),XL=Tl();XL.startListening({actionCreator:VL,effect:(e,t)=>{var r=e.payload,n=Gm(t.getState(),Km(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(FN({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var p_=ei("mouseMove"),ZL=Tl(),bu=null;ZL.startListening({actionCreator:p_,effect:(e,t)=>{var r=e.payload;bu!==null&&cancelAnimationFrame(bu);var n=Km(r);bu=requestAnimationFrame(()=>{var o=t.getState(),h=Dm(o,o.tooltip.settings.shared);if(h==="axis"){var g=Gm(o,n);(g==null?void 0:g.activeIndex)!=null?t.dispatch(GM({activeIndex:g.activeIndex,activeDataKey:void 0,activeCoordinate:g.activeCoordinate})):t.dispatch(WM())}bu=null})}});function HF(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<<CHILDREN>>":t}var U5={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},QL=Cr({name:"rootProps",initialState:U5,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:U5.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),$F=QL.reducer,{updateOptions:UF}=QL.actions,FF=null,qF={updatePolarOptions:(e,t)=>t.payload},JL=Cr({name:"polarOptions",initialState:FF,reducers:qF}),{updatePolarOptions:aW}=JL.actions,WF=JL.reducer,eO=ei("keyDown"),tO=ei("focus"),Ym=Tl();Ym.startListening({actionCreator:eO,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:o}=r.tooltip,h=e.payload;if(!(h!=="ArrowRight"&&h!=="ArrowLeft"&&h!=="Enter")){var g=Rm(o,ro(r),Hl(r),Ul(r)),a=g==null?-1:Number(g);if(!(!Number.isFinite(a)||a<0)){var c=yn(r);if(h==="Enter"){var f=vh(r,"axis","hover",String(o.index));t.dispatch(s_({active:!o.active,activeIndex:o.index,activeCoordinate:f}));return}var v=kN(r),u=v==="left-to-right"?1:-1,m=h==="ArrowRight"?1:-1,w=a+m*u;if(!(c==null||w>=c.length||w<0)){var C=vh(r,"axis","hover",String(w));t.dispatch(s_({active:!0,activeIndex:w.toString(),activeCoordinate:C}))}}}}}});Ym.startListening({actionCreator:tO,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:o}=r.tooltip;if(!o.active&&o.index==null){var h="0",g=vh(r,"axis","hover",String(h));t.dispatch(s_({active:!0,activeIndex:h,activeCoordinate:g}))}}}});var Zr=ei("externalEvent"),rO=Tl(),mg=new Map;rO.startListening({actionCreator:Zr,effect:(e,t)=>{var{handler:r,reactEvent:n}=e.payload;if(r!=null){n.persist();var o=n.type,h=mg.get(o);h!==void 0&&cancelAnimationFrame(h);var g=requestAnimationFrame(()=>{try{var a=t.getState(),c={activeCoordinate:L7(a),activeDataKey:sL(a),activeIndex:qa(a),activeLabel:nL(a),activeTooltipIndex:qa(a),isTooltipActive:O7(a)};r(c,n)}finally{mg.delete(o)}});mg.set(o,g)}}});var GF=le([eo],e=>e.tooltipItemPayloads),KF=le([GF,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(t!=null){var n=e.find(h=>h.settings.graphicalItemId===r);if(n!=null){var{getPosition:o}=n;if(o!=null)return o(t)}}}),iO=ei("touchMove"),nO=Tl();nO.startListening({actionCreator:iO,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){var n=t.getState(),o=Dm(n,n.tooltip.settings.shared);if(o==="axis"){var h=r.touches[0];if(h==null)return;var g=Gm(n,Km({clientX:h.clientX,clientY:h.clientY,currentTarget:r.currentTarget}));(g==null?void 0:g.activeIndex)!=null&&t.dispatch(GM({activeIndex:g.activeIndex,activeDataKey:void 0,activeCoordinate:g.activeCoordinate}))}else if(o==="item"){var a,c=r.touches[0];if(document.elementFromPoint==null||c==null)return;var f=document.elementFromPoint(c.clientX,c.clientY);if(!f||!f.getAttribute)return;var v=f.getAttribute(xP),u=(a=f.getAttribute(EP))!==null&&a!==void 0?a:void 0,m=to(n).find(_=>_.id===u);if(v==null||m==null||u==null)return;var{dataKey:w}=m,C=KF(n,v,u);t.dispatch(qM({activeDataKey:w,activeIndex:v,activeCoordinate:C,activeGraphicalItemId:u}))}}}});var YF=tE({brush:vU,cartesianAxis:tU,chartData:Lz,errorBars:KU,graphicalItems:$$,layout:aP,legend:b6,options:Cz,polarAxis:s$,polarOptions:WF,referenceElements:mU,rootProps:$F,tooltip:qN,zIndex:uz}),VF=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return D4({reducer:YF,preloadedState:t,middleware:n=>{var o;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((o="es6")!==null&&o!==void 0?o:"")}).concat([XL.middleware,ZL.middleware,Ym.middleware,rO.middleware,nO.middleware])},enhancers:n=>{var o=n;return typeof n=="function"&&(o=n()),o.concat(gE({type:"raf"}))},devTools:{serialize:{replacer:HF},name:"recharts-".concat(r)}})};function XF(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,o=Ir(),h=z.useRef(null);if(o)return r;h.current==null&&(h.current=VF(t,n));var g=O_;return z.createElement(g9,{context:g,store:h.current},r)}function ZF(e){var{layout:t,margin:r}=e,n=Et(),o=Ir();return z.useEffect(()=>{o||(n(iP(t)),n(rP(r)))},[n,o,t,r]),null}var QF=z.memo(ZF,Wm);function JF(e){var t=Et();return z.useEffect(()=>{t(UF(e))},[t,e]),null}function F5(e){var{zIndex:t,isPanorama:r}=e,n=z.useRef(null),o=Et();return z.useLayoutEffect(()=>(n.current&&o(lz({zIndex:t,element:n.current,isPanorama:r})),()=>{o(cz({zIndex:t,isPanorama:r}))}),[o,t,r]),z.createElement("g",{tabIndex:-1,ref:n})}function q5(e){var{children:t,isPanorama:r}=e,n=Re(Q7);if(!n||n.length===0)return t;var o=n.filter(g=>g<0),h=n.filter(g=>g>0);return z.createElement(z.Fragment,null,o.map(g=>z.createElement(F5,{key:g,zIndex:g,isPanorama:r})),t,h.map(g=>z.createElement(F5,{key:g,zIndex:g,isPanorama:r})))}var eq=["children"];function tq(e,t){if(e==null)return{};var r,n,o=rq(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(n=0;n<h.length;n++)r=h[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function rq(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function bh(){return bh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bh.apply(null,arguments)}var iq={width:"100%",height:"100%",display:"block"},nq=z.forwardRef((e,t)=>{var r=r6(),n=i6(),o=qE();if(!Zn(r)||!Zn(n))return null;var{children:h,otherAttributes:g,title:a,desc:c}=e,f,v;return g!=null&&(typeof g.tabIndex=="number"?f=g.tabIndex:f=o?0:void 0,typeof g.role=="string"?v=g.role:v=o?"application":void 0),z.createElement(y2,bh({},g,{title:a,desc:c,role:v,tabIndex:f,width:r,height:n,style:iq,ref:t}),h)}),sq=e=>{var{children:t}=e,r=Re(Hh);if(!r)return null;var{width:n,height:o,y:h,x:g}=r;return z.createElement(y2,{width:n,height:o,x:g,y:h},t)},W5=z.forwardRef((e,t)=>{var{children:r}=e,n=tq(e,eq),o=Ir();return o?z.createElement(sq,null,z.createElement(q5,{isPanorama:!0},r)):z.createElement(nq,bh({ref:t},n),z.createElement(q5,{isPanorama:!1},r))});function aq(){var e=Et(),[t,r]=z.useState(null),n=Re(CP);return z.useEffect(()=>{if(t!=null){var o=t.getBoundingClientRect(),h=o.width/t.offsetWidth;Ze(h)&&h!==n&&e(sP(h))}},[t,e,n]),r}function G5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function oq(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?G5(Object(r),!0).forEach(function(n){lq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lq(e,t,r){return(t=cq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cq(e){var t=uq(e,"string");return typeof t=="symbol"?t:t+""}function uq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vn(){return Vn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vn.apply(null,arguments)}var hq=()=>(Iz(),null);function Sh(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var fq=z.forwardRef((e,t)=>{var r,n,o=z.useRef(null),[h,g]=z.useState({containerWidth:Sh((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:Sh((n=e.style)===null||n===void 0?void 0:n.height)}),a=z.useCallback((f,v)=>{g(u=>{var m=Math.round(f),w=Math.round(v);return u.containerWidth===m&&u.containerHeight===w?u:{containerWidth:m,containerHeight:w}})},[]),c=z.useCallback(f=>{if(typeof t=="function"&&t(f),f!=null&&typeof ResizeObserver<"u"){var{width:v,height:u}=f.getBoundingClientRect();a(v,u);var m=C=>{var _=C[0];if(_!=null){var{width:d,height:y}=_.contentRect;a(d,y)}},w=new ResizeObserver(m);w.observe(f),o.current=w}},[t,a]);return z.useEffect(()=>()=>{var f=o.current;f!=null&&f.disconnect()},[a]),z.createElement(z.Fragment,null,z.createElement(Rl,{width:h.containerWidth,height:h.containerHeight}),z.createElement("div",Vn({ref:c},e)))}),dq=z.forwardRef((e,t)=>{var{width:r,height:n}=e,[o,h]=z.useState({containerWidth:Sh(r),containerHeight:Sh(n)}),g=z.useCallback((c,f)=>{h(v=>{var u=Math.round(c),m=Math.round(f);return v.containerWidth===u&&v.containerHeight===m?v:{containerWidth:u,containerHeight:m}})},[]),a=z.useCallback(c=>{if(typeof t=="function"&&t(c),c!=null){var{width:f,height:v}=c.getBoundingClientRect();g(f,v)}},[t,g]);return z.createElement(z.Fragment,null,z.createElement(Rl,{width:o.containerWidth,height:o.containerHeight}),z.createElement("div",Vn({ref:a},e)))}),vq=z.forwardRef((e,t)=>{var{width:r,height:n}=e;return z.createElement(z.Fragment,null,z.createElement(Rl,{width:r,height:n}),z.createElement("div",Vn({ref:t},e)))}),pq=z.forwardRef((e,t)=>{var{width:r,height:n}=e;return typeof r=="string"||typeof n=="string"?z.createElement(dq,Vn({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?z.createElement(vq,Vn({},e,{width:r,height:n,ref:t})):z.createElement(z.Fragment,null,z.createElement(Rl,{width:r,height:n}),z.createElement("div",Vn({ref:t},e)))});function gq(e){return e?fq:pq}var _q=z.forwardRef((e,t)=>{var{children:r,className:n,height:o,onClick:h,onContextMenu:g,onDoubleClick:a,onMouseDown:c,onMouseEnter:f,onMouseLeave:v,onMouseMove:u,onMouseUp:m,onTouchEnd:w,onTouchMove:C,onTouchStart:_,style:d,width:y,responsive:b,dispatchTouchEvents:S=!0}=e,E=z.useRef(null),L=Et(),[x,O]=z.useState(null),[M,D]=z.useState(null),k=aq(),B=I_(),R=(B==null?void 0:B.width)>0?B.width:y,P=(B==null?void 0:B.height)>0?B.height:o,H=z.useCallback(V=>{k(V),typeof t=="function"&&t(V),O(V),D(V),V!=null&&(E.current=V)},[k,t,O,D]),X=z.useCallback(V=>{L(VL(V)),L(Zr({handler:h,reactEvent:V}))},[L,h]),F=z.useCallback(V=>{L(p_(V)),L(Zr({handler:f,reactEvent:V}))},[L,f]),K=z.useCallback(V=>{L(WM()),L(Zr({handler:v,reactEvent:V}))},[L,v]),Y=z.useCallback(V=>{L(p_(V)),L(Zr({handler:u,reactEvent:V}))},[L,u]),j=z.useCallback(()=>{L(tO())},[L]),$=z.useCallback(V=>{L(eO(V.key))},[L]),N=z.useCallback(V=>{L(Zr({handler:g,reactEvent:V}))},[L,g]),U=z.useCallback(V=>{L(Zr({handler:a,reactEvent:V}))},[L,a]),J=z.useCallback(V=>{L(Zr({handler:c,reactEvent:V}))},[L,c]),te=z.useCallback(V=>{L(Zr({handler:m,reactEvent:V}))},[L,m]),fe=z.useCallback(V=>{L(Zr({handler:_,reactEvent:V}))},[L,_]),ve=z.useCallback(V=>{S&&L(iO(V)),L(Zr({handler:C,reactEvent:V}))},[L,S,C]),Z=z.useCallback(V=>{L(Zr({handler:w,reactEvent:V}))},[L,w]),W=gq(b);return z.createElement(fL.Provider,{value:x},z.createElement(c3.Provider,{value:M},z.createElement(W,{width:R??(d==null?void 0:d.width),height:P??(d==null?void 0:d.height),className:dt("recharts-wrapper",n),style:oq({position:"relative",cursor:"default",width:R,height:P},d),onClick:X,onContextMenu:N,onDoubleClick:U,onFocus:j,onKeyDown:$,onMouseDown:J,onMouseEnter:F,onMouseLeave:K,onMouseMove:Y,onMouseUp:te,onTouchEnd:Z,onTouchMove:ve,onTouchStart:fe,ref:H},z.createElement(hq,null),r)))}),mq=["width","height","responsive","children","className","style","compact","title","desc"];function yq(e,t){if(e==null)return{};var r,n,o=bq(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(n=0;n<h.length;n++)r=h[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function bq(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Sq=z.forwardRef((e,t)=>{var{width:r,height:n,responsive:o,children:h,className:g,style:a,compact:c,title:f,desc:v}=e,u=yq(e,mq),m=Xn(u);return c?z.createElement(z.Fragment,null,z.createElement(Rl,{width:r,height:n}),z.createElement(W5,{otherAttributes:m,title:f,desc:v},h)):z.createElement(_q,{className:g,style:a,width:r,height:n,responsive:o??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},z.createElement(W5,{otherAttributes:m,title:f,desc:v,ref:t},z.createElement(bU,null,h)))});function g_(){return g_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},g_.apply(null,arguments)}var wq={top:5,right:5,bottom:5,left:5},Cq={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:wq,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},xq=z.forwardRef(function(t,r){var n,o=ii(t.categoricalChartProps,Cq),{chartName:h,defaultTooltipEventType:g,validateTooltipEventTypes:a,tooltipPayloadSearcher:c,categoricalChartProps:f}=t,v={chartName:h,defaultTooltipEventType:g,validateTooltipEventTypes:a,tooltipPayloadSearcher:c,eventEmitter:void 0};return z.createElement(XF,{preloadedState:{options:v},reduxStoreName:(n=f.id)!==null&&n!==void 0?n:h},z.createElement(dU,{chartData:f.data}),z.createElement(QF,{layout:o.layout,margin:o.margin}),z.createElement(JF,{baseValue:o.baseValue,accessibilityLayer:o.accessibilityLayer,barCategoryGap:o.barCategoryGap,maxBarSize:o.maxBarSize,stackOffset:o.stackOffset,barGap:o.barGap,barSize:o.barSize,syncId:o.syncId,syncMethod:o.syncMethod,className:o.className,reverseStackOrder:o.reverseStackOrder}),z.createElement(Sq,g_({},o,{ref:r})))}),Eq=["axis","item"],Aq=z.forwardRef((e,t)=>z.createElement(xq,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Eq,tooltipPayloadSearcher:Sz,categoricalChartProps:e,ref:t}));const K5=["#6366f1","#8b5cf6","#a78bfa","#c4b5fd","#ddd6fe","#818cf8","#4f46e5","#7c3aed","#5b21b6","#3730a3"];function wh(e,t=1,r=""){return e===null?"—":`${Number(e.toFixed(t))}${r}`}function Y5(e){return e===null?"—":`$${e.toFixed(2)}`}function V5(e){return e===null?"—":`${e.toFixed(1)}%`}function sO({title:e,error:t,defaultOpen:r=!0,children:n}){const[o,h]=z.useState(r);return G.jsxs("section",{className:"analytics-section",children:[G.jsxs("h3",{className:"analytics-section-title",onClick:()=>h(!o),style:{cursor:"pointer",userSelect:"none"},children:[G.jsx("span",{className:"analytics-collapse-icon",children:o?"▾":"▸"}),e]}),t&&G.jsx("div",{className:"analytics-error",children:t}),o&&n]})}function __({children:e}){return G.jsx("div",{className:"analytics-metric-grid",children:e})}function Ji({label:e,value:t}){return G.jsxs("div",{className:"analytics-metric",children:[G.jsx("span",{className:"analytics-metric-value",children:t}),G.jsx("span",{className:"analytics-metric-label",children:e})]})}function Lu({data:e,dataKey:t,nameKey:r,color:n,formatter:o}){if(e.length===0)return null;const h=Math.max(120,e.length*28+30);return G.jsx(JP,{width:"100%",height:h,children:G.jsxs(Aq,{data:e,layout:"vertical",margin:{top:4,right:40,bottom:4,left:0},children:[G.jsx(KL,{type:"number",hide:!0}),G.jsx(YL,{type:"category",dataKey:r,width:80,tick:{fontSize:10,fill:"var(--text-secondary)"}}),G.jsx(Wz,{formatter:o?(g=>typeof g=="number"?o(g):""):void 0,contentStyle:{background:"var(--bg-primary)",border:"1px solid var(--border-color)",fontSize:11,borderRadius:4},labelStyle:{color:"var(--text-primary)"},itemStyle:{color:"var(--text-secondary)"}}),G.jsx(WL,{dataKey:t,radius:[0,3,3,0],children:e.map((g,a)=>G.jsx($m,{fill:n??K5[a%K5.length]},a))})]})})}function X5(e){return e===null?"—":e<1?`${Math.round(e*60)}m`:`${Number(e.toFixed(1))}h`}function Mq({activity:e,errors:t}){const r=Object.entries(e.projectsByProtocol).map(([n,o])=>({name:n.toUpperCase(),count:o.count,avgWallClock:o.avgWallClockHours,avgAgentTime:o.avgAgentTimeHours})).sort((n,o)=>o.count-n.count);return G.jsxs(sO,{title:"Activity",error:t==null?void 0:t.github,children:[r.length>0&&G.jsxs("div",{className:"analytics-sub-section",children:[G.jsx("h4",{className:"analytics-sub-title",children:"Projects by Protocol"}),G.jsx(__,{children:r.map(n=>G.jsx(Ji,{label:n.name,value:`${n.count} (wall ${X5(n.avgWallClock)}${n.avgAgentTime!=null?`, agent ${X5(n.avgAgentTime)}`:""})`},n.name))}),G.jsx(Lu,{data:r,dataKey:"count",nameKey:"name"})]}),G.jsxs(__,{children:[G.jsx(Ji,{label:"PRs Merged",value:String(e.prsMerged)}),G.jsx(Ji,{label:"Issues Closed",value:String(e.issuesClosed)}),G.jsx(Ji,{label:"Median Time to Merge",value:wh(e.medianTimeToMergeHours,1,"h")}),G.jsx(Ji,{label:"Median Time to Close Bugs",value:wh(e.medianTimeToCloseBugsHours,1,"h")})]})]})}function Lq({consultation:e,errors:t}){const r=e.byModel.map(h=>({name:h.model,count:h.count,cost:h.totalCost??0,latency:h.avgLatency,success:h.successRate})),n=Object.entries(e.byReviewType).map(([h,g])=>({name:h,value:g})),o=Object.entries(e.byProtocol).map(([h,g])=>({name:h,value:g}));return G.jsxs(sO,{title:"Consultation",error:t==null?void 0:t.consultation,children:[G.jsxs(__,{children:[G.jsx(Ji,{label:"Total Consultations",value:String(e.totalCount)}),G.jsx(Ji,{label:"Total Cost",value:Y5(e.totalCostUsd)}),G.jsx(Ji,{label:"Avg Latency",value:wh(e.avgLatencySeconds,1,"s")}),G.jsx(Ji,{label:"Success Rate",value:V5(e.successRate)})]}),r.length>0&&G.jsxs("div",{className:"analytics-sub-section",children:[G.jsx("h4",{className:"analytics-sub-title",children:"Cost by Model"}),G.jsx(Lu,{data:r,dataKey:"cost",nameKey:"name",formatter:h=>`$${h.toFixed(2)}`})]}),r.length>0&&G.jsxs("div",{className:"analytics-sub-section",children:[G.jsx("h4",{className:"analytics-sub-title",children:"Per Model"}),G.jsxs("table",{className:"analytics-table",children:[G.jsx("thead",{children:G.jsxs("tr",{children:[G.jsx("th",{children:"Model"}),G.jsx("th",{children:"Count"}),G.jsx("th",{children:"Cost"}),G.jsx("th",{children:"Latency"}),G.jsx("th",{children:"Success"})]})}),G.jsx("tbody",{children:e.byModel.map(h=>G.jsxs("tr",{children:[G.jsx("td",{children:h.model}),G.jsx("td",{children:h.count}),G.jsx("td",{children:Y5(h.totalCost)}),G.jsx("td",{children:wh(h.avgLatency,1,"s")}),G.jsx("td",{children:V5(h.successRate)})]},h.model))})]})]}),(n.length>0||o.length>0)&&G.jsxs("div",{className:"analytics-charts-row",children:[n.length>0&&G.jsxs("div",{className:"analytics-sub-section analytics-chart-half",children:[G.jsx("h4",{className:"analytics-sub-title",children:"By Review Type"}),G.jsx(Lu,{data:n,dataKey:"value",nameKey:"name"})]}),o.length>0&&G.jsxs("div",{className:"analytics-sub-section analytics-chart-half",children:[G.jsx("h4",{className:"analytics-sub-title",children:"By Protocol"}),G.jsx(Lu,{data:o,dataKey:"value",nameKey:"name"})]})]})]})}function Oq({isActive:e}){const{data:t,error:r,loading:n,range:o,setRange:h,refresh:g}=JR(e),a=["24h","7d","30d","all"];return G.jsx("div",{className:"analytics-view",children:G.jsxs("div",{className:"analytics-content",children:[G.jsxs("div",{className:"analytics-header",children:[G.jsx("h2",{className:"analytics-title",children:"Analytics"}),G.jsxs("div",{className:"analytics-actions",children:[G.jsx("div",{className:"analytics-range-selector",children:a.map(c=>G.jsx("button",{className:`analytics-range-btn ${o===c?"active":""}`,onClick:()=>h(c),children:c==="all"?"All":c},c))}),G.jsx("button",{className:"work-btn work-btn-secondary",onClick:g,disabled:n,children:n?"Loading...":"Refresh"})]})]}),r&&!t&&G.jsx("div",{className:"analytics-error",children:r}),n&&!t&&G.jsx("div",{className:"analytics-loading",children:"Loading analytics..."}),t&&G.jsxs(G.Fragment,{children:[G.jsx(Mq,{activity:t.activity,errors:t.errors}),G.jsx(Lq,{consultation:t.consultation,errors:t.errors})]})]})})}function Tq(e){const[t,r]=z.useState(null),[n,o]=z.useState(null),[h,g]=z.useState(!1),a=z.useCallback(async()=>{g(!0),o(null);try{const f=await jD();r(f)}catch(f){o(f instanceof Error?f.message:"Failed to fetch team data")}finally{g(!1)}},[]);z.useEffect(()=>{e&&a()},[e,a]);const c=z.useCallback(()=>{a()},[a]);return{data:t,error:n,loading:h,refresh:c}}function Dq({member:e}){const t=e.github_data,r=(t==null?void 0:t.assignedIssues.length)??0,n=(t==null?void 0:t.openPRs.length)??0,o=(t==null?void 0:t.recentActivity.mergedPRs.length)??0,h=(t==null?void 0:t.recentActivity.closedIssues.length)??0;return G.jsxs("div",{className:"team-member-card",children:[G.jsxs("div",{className:"team-member-header",children:[G.jsx("span",{className:"team-member-name",children:e.name}),G.jsx("span",{className:"team-member-role",children:e.role})]}),G.jsxs("a",{className:"team-member-github",href:`https://github.com/${e.github}`,target:"_blank",rel:"noopener noreferrer",children:["@",e.github]}),G.jsxs("div",{className:"team-member-stats",children:[G.jsxs("span",{title:"Assigned issues",children:[r," issues"]}),G.jsxs("span",{title:"Open PRs",children:[n," PRs"]})]}),(o>0||h>0)&&G.jsxs("div",{className:"team-member-activity",children:[o>0&&G.jsxs("span",{children:[o," merged"]}),h>0&&G.jsxs("span",{children:[h," closed"]}),G.jsx("span",{className:"team-activity-label",children:"last 7d"})]})]})}function Rq({message:e}){return G.jsxs("div",{className:"team-message",children:[G.jsxs("div",{className:"team-message-header",children:[G.jsx("span",{className:"team-message-author",children:e.author}),G.jsx("span",{className:"team-message-time",children:e.timestamp})]}),G.jsx("div",{className:"team-message-body",children:e.body})]})}function kq({isActive:e}){const{data:t,error:r,loading:n,refresh:o}=Tq(e);if(n&&!t)return G.jsx("div",{className:"team-view",children:G.jsx("div",{className:"team-loading",children:"Loading team data..."})});if(r&&!t)return G.jsx("div",{className:"team-view",children:G.jsx("div",{className:"team-error",children:r})});if(!t||!t.enabled)return null;const h=t.members??[],a=[...t.messages??[]].reverse();return G.jsx("div",{className:"team-view",children:G.jsxs("div",{className:"team-content",children:[G.jsxs("div",{className:"team-header",children:[G.jsx("h2",{className:"team-title",children:"Team"}),G.jsx("button",{className:"team-refresh-btn",onClick:o,disabled:n,children:n?"Refreshing...":"Refresh"})]}),t.githubError&&G.jsx("div",{className:"team-error",children:t.githubError}),G.jsxs("div",{className:"team-section",children:[G.jsxs("h3",{className:"team-section-title",children:["Members (",h.length,")"]}),G.jsx("div",{className:"team-member-grid",children:h.map(c=>G.jsx(Dq,{member:c},c.github))})]}),G.jsxs("div",{className:"team-section",children:[G.jsx("h3",{className:"team-section-title",children:"Messages"}),a.length===0?G.jsx("div",{className:"team-no-messages",children:"No messages yet"}):G.jsx("div",{className:"team-messages",children:a.map((c,f)=>G.jsx(Rq,{message:c},f))})]})]})})}function Pq(e,t){const r=e==null?void 0:e.trim(),n=t==null?void 0:t.trim();return r&&n&&r.toLowerCase()!==n.toLowerCase()?`${n} on ${r} overview`:n?`${n} overview`:"overview"}function Bq(){const{state:e,refresh:t}=KD(),{tabs:r,activeTab:n,activeTabId:o,selectTab:h}=VD(e),g=s2(`(max-width: ${Q5}px)`),[a,c]=z.useState(null),[f,v]=z.useState(new Set),u=z.useRef(new Map),m=z.useCallback(async(M,D,k,B)=>{try{const R=await Ch(M,D,B);D&&D>0&&u.current.set(R.id,D),t()}catch(R){console.error("Failed to open file:",R)}},[t]),w=Pq(e==null?void 0:e.hostname,e==null?void 0:e.workspaceName);z.useEffect(()=>{document.title=w},[w]);const[C]=z.useState(()=>new URLSearchParams(window.location.search).get("fullscreen")==="1");z.useEffect(()=>{if(!n)return;(n.type==="architect"||n.type==="builder"||n.type==="shell")&&v(D=>{if(D.has(n.id))return D;const k=new Set(D);return k.add(n.id),k})},[n==null?void 0:n.id,n==null?void 0:n.type]);const _=M=>{const D=Ov(M);return D?G.jsx(Pv,{wsPath:D,onFileOpen:m,persistent:M.persistent}):G.jsx("div",{className:"no-terminal",children:"No terminal session"})},d=M=>{if(!M.annotationId||!e)return G.jsx("div",{className:"no-terminal",children:"No file viewer"});if(!e.annotations.find(B=>B.id===M.annotationId))return G.jsx("div",{className:"no-terminal",children:"Annotation not found"});const k=u.current.get(M.annotationId);return k!==void 0&&u.current.delete(M.annotationId),G.jsx(ZR,{tabId:M.annotationId,initialLine:k??M.initialLine})},y=M=>{const D=r.filter(k=>M.includes(k.type)&&f.has(k.id));return G.jsxs(G.Fragment,{children:[D.map(k=>{const B=Ov(k);return G.jsx("div",{className:"terminal-tab-pane",style:{display:o===k.id?void 0:"none"},children:B?G.jsx(Pv,{wsPath:B,onFileOpen:m,persistent:k.persistent}):G.jsx("div",{className:"no-terminal",children:"No terminal session"})},k.id)}),G.jsx("div",{style:{display:(n==null?void 0:n.type)==="work"?void 0:"none",height:"100%"},children:G.jsx(VR,{state:e,onRefresh:t,onSelectTab:h})}),G.jsx("div",{style:{display:(n==null?void 0:n.type)==="analytics"?void 0:"none",height:"100%"},children:G.jsx(Oq,{isActive:(n==null?void 0:n.type)==="analytics"})}),(e==null?void 0:e.teamEnabled)&&G.jsx("div",{style:{display:(n==null?void 0:n.type)==="team"?void 0:"none",height:"100%"},children:G.jsx(kq,{isActive:(n==null?void 0:n.type)==="team"})}),(n==null?void 0:n.type)==="file"&&d(n)]})};if(C)return n&&(n.type==="architect"||n.type==="builder"||n.type==="shell")?G.jsx("div",{className:"fullscreen-terminal",children:_(n)}):G.jsx("div",{className:"fullscreen-terminal"});if(g)return G.jsx("div",{className:"mobile-wrapper",children:G.jsx(XR,{tabs:r,activeTabId:o,onSelectTab:h,onRefresh:t,children:y(["architect","builder","shell"])})});const b=r.find(M=>M.type==="architect"),S=()=>{c(a==="right"?null:"left")},E=()=>{c(a==="left"?null:"right")},L=G.jsxs(G.Fragment,{children:[a!=="left"&&G.jsx("button",{className:"terminal-control-btn",onPointerDown:M=>M.preventDefault(),onClick:S,title:a==="right"?"Restore split layout":"Collapse architect panel","aria-label":a==="right"?"Restore split layout":"Collapse architect panel",children:G.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[G.jsx("line",{x1:"3",y1:"2",x2:"3",y2:"14"}),G.jsx("path",{d:"M12 5l-4 3 4 3"})]})}),a!=="right"&&G.jsx("button",{className:"terminal-control-btn",onPointerDown:M=>M.preventDefault(),onClick:E,title:"Collapse work panel","aria-label":"Collapse work panel",children:G.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[G.jsx("line",{x1:"13",y1:"2",x2:"13",y2:"14"}),G.jsx("path",{d:"M4 5l4 3-4 3"})]})})]}),x=b?Ov(b):null,O=x?G.jsx(Pv,{wsPath:x,onFileOpen:m,persistent:b.persistent,toolbarExtra:L}):G.jsx("div",{className:"no-architect",children:"No architect terminal"});return G.jsxs("div",{className:"app",children:[G.jsxs("header",{className:"app-header",children:[G.jsx("h1",{className:"app-title",children:w}),G.jsx("div",{className:"header-controls",children:(e==null?void 0:e.version)&&G.jsxs("span",{className:"header-version",children:["v",e.version]})})]}),G.jsx("div",{className:"app-body",children:G.jsx(XD,{left:O,right:G.jsxs("div",{className:"right-panel",children:[G.jsx(a2,{tabs:r.filter(M=>M.type!=="architect"),activeTabId:o,onSelectTab:h,onRefresh:t}),G.jsx("div",{className:"tab-content",role:"tabpanel",children:y(["builder","shell"])})]}),collapsedPane:a,onExpandLeft:()=>c(null),onExpandRight:()=>c(null)})})]})}RD.createRoot(document.getElementById("root")).render(G.jsx(z.StrictMode,{children:G.jsx(Bq,{})}));
|
|
194
|
-
//# sourceMappingURL=index-CziHWiV5.js.map
|