@cluesmith/codev 3.3.4 → 3.3.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.
- package/dashboard-dist/assets/index-BuflRUi6.js +220 -0
- package/dashboard-dist/assets/index-BuflRUi6.js.map +1 -0
- package/dashboard-dist/assets/index-r3bZzLmX.css +32 -0
- package/dashboard-dist/index.html +2 -2
- package/dist/agent-farm/commands/send.d.ts +3 -2
- package/dist/agent-farm/commands/send.d.ts.map +1 -1
- package/dist/agent-farm/commands/send.js +24 -5
- package/dist/agent-farm/commands/send.js.map +1 -1
- package/dist/agent-farm/commands/spawn-worktree.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn-worktree.js +12 -2
- package/dist/agent-farm/commands/spawn-worktree.js.map +1 -1
- package/dist/agent-farm/servers/decisions/file.d.ts +50 -0
- package/dist/agent-farm/servers/decisions/file.d.ts.map +1 -0
- package/dist/agent-farm/servers/decisions/file.js +146 -0
- package/dist/agent-farm/servers/decisions/file.js.map +1 -0
- package/dist/agent-farm/servers/decisions/grammar.d.ts +36 -0
- package/dist/agent-farm/servers/decisions/grammar.d.ts.map +1 -0
- package/dist/agent-farm/servers/decisions/grammar.js +109 -0
- package/dist/agent-farm/servers/decisions/grammar.js.map +1 -0
- package/dist/agent-farm/servers/decisions/notice.d.ts +11 -0
- package/dist/agent-farm/servers/decisions/notice.d.ts.map +1 -0
- package/dist/agent-farm/servers/decisions/notice.js +18 -0
- package/dist/agent-farm/servers/decisions/notice.js.map +1 -0
- package/dist/agent-farm/servers/decisions/parse.d.ts +36 -0
- package/dist/agent-farm/servers/decisions/parse.d.ts.map +1 -0
- package/dist/agent-farm/servers/decisions/parse.js +308 -0
- package/dist/agent-farm/servers/decisions/parse.js.map +1 -0
- package/dist/agent-farm/servers/decisions/routes.d.ts +17 -0
- package/dist/agent-farm/servers/decisions/routes.d.ts.map +1 -0
- package/dist/agent-farm/servers/decisions/routes.js +160 -0
- package/dist/agent-farm/servers/decisions/routes.js.map +1 -0
- package/dist/agent-farm/servers/decisions/splice.d.ts +26 -0
- package/dist/agent-farm/servers/decisions/splice.d.ts.map +1 -0
- package/dist/agent-farm/servers/decisions/splice.js +120 -0
- package/dist/agent-farm/servers/decisions/splice.js.map +1 -0
- package/dist/agent-farm/servers/decisions/stamp.d.ts +4 -0
- package/dist/agent-farm/servers/decisions/stamp.d.ts.map +1 -0
- package/dist/agent-farm/servers/decisions/stamp.js +171 -0
- package/dist/agent-farm/servers/decisions/stamp.js.map +1 -0
- package/dist/agent-farm/servers/overview.d.ts +4 -3
- package/dist/agent-farm/servers/overview.d.ts.map +1 -1
- package/dist/agent-farm/servers/overview.js +51 -24
- package/dist/agent-farm/servers/overview.js.map +1 -1
- package/dist/agent-farm/servers/tower-routes.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-routes.js +63 -5
- package/dist/agent-farm/servers/tower-routes.js.map +1 -1
- package/dist/agent-farm/utils/message-format.d.ts +8 -0
- package/dist/agent-farm/utils/message-format.d.ts.map +1 -1
- package/dist/agent-farm/utils/message-format.js +16 -0
- package/dist/agent-farm/utils/message-format.js.map +1 -1
- package/dist/commands/consult/index.d.ts +20 -1
- package/dist/commands/consult/index.d.ts.map +1 -1
- package/dist/commands/consult/index.js +56 -2
- package/dist/commands/consult/index.js.map +1 -1
- package/dist/commands/porch/checks.d.ts +7 -1
- package/dist/commands/porch/checks.d.ts.map +1 -1
- package/dist/commands/porch/checks.js +77 -14
- package/dist/commands/porch/checks.js.map +1 -1
- package/dist/commands/porch/index.d.ts +38 -1
- package/dist/commands/porch/index.d.ts.map +1 -1
- package/dist/commands/porch/index.js +79 -43
- package/dist/commands/porch/index.js.map +1 -1
- package/dist/commands/porch/protocol.d.ts +4 -3
- package/dist/commands/porch/protocol.d.ts.map +1 -1
- package/dist/commands/porch/protocol.js +32 -5
- package/dist/commands/porch/protocol.js.map +1 -1
- package/dist/commands/porch/types.d.ts +2 -0
- package/dist/commands/porch/types.d.ts.map +1 -1
- package/dist/lib/agent-env.d.ts +10 -1
- package/dist/lib/agent-env.d.ts.map +1 -1
- package/dist/lib/agent-env.js +12 -1
- package/dist/lib/agent-env.js.map +1 -1
- package/dist/lib/config.d.ts +8 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js.map +1 -1
- package/package.json +4 -4
- package/skeleton/.claude/skills/afx/SKILL.md +15 -0
- package/skeleton/.claude/skills/arch-init/SKILL.md +56 -9
- package/skeleton/.claude/skills/arch-save/SKILL.md +100 -9
- package/skeleton/.claude/skills/consult/SKILL.md +9 -0
- package/skeleton/.claude/skills/porch/SKILL.md +18 -0
- package/skeleton/.codex/skills/afx/SKILL.md +15 -0
- package/skeleton/.codex/skills/arch-init/SKILL.md +56 -9
- package/skeleton/.codex/skills/arch-save/SKILL.md +100 -9
- package/skeleton/.codex/skills/consult/SKILL.md +9 -0
- package/skeleton/.codex/skills/porch/SKILL.md +18 -0
- package/skeleton/protocol-schema.json +6 -0
- package/skeleton/protocols/maintain/protocol.md +5 -0
- package/skeleton/protocols/pir/prompts/review.md +0 -1
- package/skeleton/protocols/protocol-schema.json +6 -0
- package/skeleton/resources/commands/agent-farm.md +44 -0
- package/skeleton/resources/commands/consult.md +9 -2
- package/skeleton/templates/cheatsheet.md +1 -1
- package/dashboard-dist/assets/index-DZf6pNPE.js +0 -199
- package/dashboard-dist/assets/index-DZf6pNPE.js.map +0 -1
- package/dashboard-dist/assets/index-DnYLy5C_.css +0 -32
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
var XD=Object.defineProperty;var ZD=(e,t,r)=>t in e?XD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var wt=(e,t,r)=>ZD(e,typeof t!="symbol"?t+"":t,r);function QD(e,t){for(var r=0;r<t.length;r++){const i=t[r];if(typeof i!="string"&&!Array.isArray(i)){for(const o in i)if(o!=="default"&&!(o in e)){const h=Object.getOwnPropertyDescriptor(i,o);h&&Object.defineProperty(e,o,h.get?h:{enumerable:!0,get:()=>i[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"]'))i(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"&&i(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 i(o){if(o.ep)return;o.ep=!0;const h=r(o);fetch(o.href,h)}})();function Qn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hv={exports:{}},ul={};/**
|
|
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 sS;function JD(){if(sS)return ul;sS=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(i,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:i,key:g,ref:o!==void 0?o:null,props:h}}return ul.Fragment=t,ul.jsx=r,ul.jsxs=r,ul}var aS;function eR(){return aS||(aS=1,Hv.exports=JD()),Hv.exports}var $=eR(),$v={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 oS;function tR(){if(oS)return je;oS=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=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(z){return z===null||typeof z!="object"?null:(z=m&&z[m]||z["@@iterator"],typeof z=="function"?z:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,d={};function y(z,F,Z){this.props=z,this.context=F,this.refs=d,this.updater=Z||C}y.prototype.isReactComponent={},y.prototype.setState=function(z,F){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,F,"setState")},y.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function b(){}b.prototype=y.prototype;function S(z,F,Z){this.props=z,this.context=F,this.refs=d,this.updater=Z||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(z,F,Z){var re=Z.ref;return{$$typeof:e,type:z,key:F,ref:re!==void 0?re:null,props:Z}}function k(z,F){return D(z.type,F,z.props)}function P(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function R(z){var F={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(Z){return F[Z]})}var B=/\/+/g;function U(z,F){return typeof z=="object"&&z!==null&&z.key!=null?R(""+z.key):F.toString(36)}function V(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(x,x):(z.status="pending",z.then(function(F){z.status==="pending"&&(z.status="fulfilled",z.value=F)},function(F){z.status==="pending"&&(z.status="rejected",z.reason=F)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function q(z,F,Z,re,he){var ge=typeof z;(ge==="undefined"||ge==="boolean")&&(z=null);var X=!1;if(z===null)X=!0;else switch(ge){case"bigint":case"string":case"number":X=!0;break;case"object":switch(z.$$typeof){case e:case t:X=!0;break;case v:return X=z._init,q(X(z._payload),F,Z,re,he)}}if(X)return he=he(z),X=re===""?"."+U(z,0):re,L(he)?(Z="",X!=null&&(Z=X.replace(B,"$&/")+"/"),q(he,F,Z,"",function(Q){return Q})):he!=null&&(P(he)&&(he=k(he,Z+(he.key==null||z&&z.key===he.key?"":(""+he.key).replace(B,"$&/")+"/")+X)),F.push(he)),1;X=0;var G=re===""?".":re+":";if(L(z))for(var ee=0;ee<z.length;ee++)re=z[ee],ge=G+U(re,ee),X+=q(re,F,Z,ge,he);else if(ee=w(z),typeof ee=="function")for(z=ee.call(z),ee=0;!(re=z.next()).done;)re=re.value,ge=G+U(re,ee++),X+=q(re,F,Z,ge,he);else if(ge==="object"){if(typeof z.then=="function")return q(V(z),F,Z,re,he);throw F=String(z),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return X}function Y(z,F,Z){if(z==null)return z;var re=[],he=0;return q(z,re,"","",function(ge){return F.call(Z,ge,he++)}),re}function W(z){if(z._status===-1){var F=z._result;F=F(),F.then(function(Z){(z._status===0||z._status===-1)&&(z._status=1,z._result=Z)},function(Z){(z._status===0||z._status===-1)&&(z._status=2,z._result=Z)}),z._status===-1&&(z._status=0,z._result=F)}if(z._status===1)return z._result.default;throw z._result}var j=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},H={map:Y,forEach:function(z,F,Z){Y(z,function(){F.apply(this,arguments)},Z)},count:function(z){var F=0;return Y(z,function(){F++}),F},toArray:function(z){return Y(z,function(F){return F})||[]},only:function(z){if(!P(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return je.Activity=u,je.Children=H,je.Component=y,je.Fragment=r,je.Profiler=o,je.PureComponent=S,je.StrictMode=i,je.Suspense=c,je.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,je.__COMPILER_RUNTIME={__proto__:null,c:function(z){return O.H.useMemoCache(z)}},je.cache=function(z){return function(){return z.apply(null,arguments)}},je.cacheSignal=function(){return null},je.cloneElement=function(z,F,Z){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var re=_({},z.props),he=z.key;if(F!=null)for(ge in F.key!==void 0&&(he=""+F.key),F)!M.call(F,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&F.ref===void 0||(re[ge]=F[ge]);var ge=arguments.length-2;if(ge===1)re.children=Z;else if(1<ge){for(var X=Array(ge),G=0;G<ge;G++)X[G]=arguments[G+2];re.children=X}return D(z.type,he,re)},je.createContext=function(z){return z={$$typeof:g,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:h,_context:z},z},je.createElement=function(z,F,Z){var re,he={},ge=null;if(F!=null)for(re in F.key!==void 0&&(ge=""+F.key),F)M.call(F,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(he[re]=F[re]);var X=arguments.length-2;if(X===1)he.children=Z;else if(1<X){for(var G=Array(X),ee=0;ee<X;ee++)G[ee]=arguments[ee+2];he.children=G}if(z&&z.defaultProps)for(re in X=z.defaultProps,X)he[re]===void 0&&(he[re]=X[re]);return D(z,ge,he)},je.createRef=function(){return{current:null}},je.forwardRef=function(z){return{$$typeof:a,render:z}},je.isValidElement=P,je.lazy=function(z){return{$$typeof:v,_payload:{_status:-1,_result:z},_init:W}},je.memo=function(z,F){return{$$typeof:f,type:z,compare:F===void 0?null:F}},je.startTransition=function(z){var F=O.T,Z={};O.T=Z;try{var re=z(),he=O.S;he!==null&&he(Z,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(x,j)}catch(ge){j(ge)}finally{F!==null&&Z.types!==null&&(F.types=Z.types),O.T=F}},je.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},je.use=function(z){return O.H.use(z)},je.useActionState=function(z,F,Z){return O.H.useActionState(z,F,Z)},je.useCallback=function(z,F){return O.H.useCallback(z,F)},je.useContext=function(z){return O.H.useContext(z)},je.useDebugValue=function(){},je.useDeferredValue=function(z,F){return O.H.useDeferredValue(z,F)},je.useEffect=function(z,F){return O.H.useEffect(z,F)},je.useEffectEvent=function(z){return O.H.useEffectEvent(z)},je.useId=function(){return O.H.useId()},je.useImperativeHandle=function(z,F,Z){return O.H.useImperativeHandle(z,F,Z)},je.useInsertionEffect=function(z,F){return O.H.useInsertionEffect(z,F)},je.useLayoutEffect=function(z,F){return O.H.useLayoutEffect(z,F)},je.useMemo=function(z,F){return O.H.useMemo(z,F)},je.useOptimistic=function(z,F){return O.H.useOptimistic(z,F)},je.useReducer=function(z,F,Z){return O.H.useReducer(z,F,Z)},je.useRef=function(z){return O.H.useRef(z)},je.useState=function(z){return O.H.useState(z)},je.useSyncExternalStore=function(z,F,Z){return O.H.useSyncExternalStore(z,F,Z)},je.useTransition=function(){return O.H.useTransition()},je.version="19.2.5",je}var lS;function so(){return lS||(lS=1,$v.exports=tR()),$v.exports}var N=so();const rR=Qn(N),iR=QD({__proto__:null,default:rR},[N]);var Uv={exports:{}},hl={},Fv={exports:{}},Wv={};/**
|
|
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 cS;function nR(){return cS||(cS=1,(function(e){function t(q,Y){var W=q.length;q.push(Y);e:for(;0<W;){var j=W-1>>>1,H=q[j];if(0<o(H,Y))q[j]=Y,q[W]=H,W=j;else break e}}function r(q){return q.length===0?null:q[0]}function i(q){if(q.length===0)return null;var Y=q[0],W=q.pop();if(W!==Y){q[0]=W;e:for(var j=0,H=q.length,z=H>>>1;j<z;){var F=2*(j+1)-1,Z=q[F],re=F+1,he=q[re];if(0>o(Z,W))re<H&&0>o(he,Z)?(q[j]=he,q[re]=W,j=re):(q[j]=Z,q[F]=W,j=F);else if(re<H&&0>o(he,W))q[j]=he,q[re]=W,j=re;else break e}}return Y}function o(q,Y){var W=q.sortIndex-Y.sortIndex;return W!==0?W:q.id-Y.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(q){for(var Y=r(f);Y!==null;){if(Y.callback===null)i(f);else if(Y.startTime<=q)i(f),Y.sortIndex=Y.expirationTime,t(c,Y);else break;Y=r(f)}}function L(q){if(_=!1,E(q),!C)if(r(c)!==null)C=!0,x||(x=!0,R());else{var Y=r(f);Y!==null&&V(L,Y.startTime-q)}}var x=!1,O=-1,M=5,D=-1;function k(){return d?!0:!(e.unstable_now()-D<M)}function P(){if(d=!1,x){var q=e.unstable_now();D=q;var Y=!0;try{e:{C=!1,_&&(_=!1,b(O),O=-1),w=!0;var W=m;try{t:{for(E(q),u=r(c);u!==null&&!(u.expirationTime>q&&k());){var j=u.callback;if(typeof j=="function"){u.callback=null,m=u.priorityLevel;var H=j(u.expirationTime<=q);if(q=e.unstable_now(),typeof H=="function"){u.callback=H,E(q),Y=!0;break t}u===r(c)&&i(c),E(q)}else i(c);u=r(c)}if(u!==null)Y=!0;else{var z=r(f);z!==null&&V(L,z.startTime-q),Y=!1}}break e}finally{u=null,m=W,w=!1}Y=void 0}}finally{Y?R():x=!1}}}var R;if(typeof S=="function")R=function(){S(P)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,U=B.port2;B.port1.onmessage=P,R=function(){U.postMessage(null)}}else R=function(){y(P,0)};function V(q,Y){O=y(function(){q(e.unstable_now())},Y)}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(q){q.callback=null},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_next=function(q){switch(m){case 1:case 2:case 3:var Y=3;break;default:Y=m}var W=m;m=Y;try{return q()}finally{m=W}},e.unstable_requestPaint=function(){d=!0},e.unstable_runWithPriority=function(q,Y){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var W=m;m=q;try{return Y()}finally{m=W}},e.unstable_scheduleCallback=function(q,Y,W){var j=e.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?j+W:j):W=j,q){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=W+H,q={id:v++,callback:Y,priorityLevel:q,startTime:W,expirationTime:H,sortIndex:-1},W>j?(q.sortIndex=W,t(f,q),r(c)===null&&q===r(f)&&(_?(b(O),O=-1):_=!0,V(L,W-j))):(q.sortIndex=H,t(c,q),C||w||(C=!0,x||(x=!0,R()))),q},e.unstable_shouldYield=k,e.unstable_wrapCallback=function(q){var Y=m;return function(){var W=m;m=Y;try{return q.apply(this,arguments)}finally{m=W}}}})(Wv)),Wv}var uS;function sR(){return uS||(uS=1,Fv.exports=nR()),Fv.exports}var qv={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 hS;function aR(){if(hS)return ar;hS=1;var e=so();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 i={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=i,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=i.p;try{if(g.T=null,i.p=2,c)return c()}finally{g.T=f,i.p=v,i.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,i.d.C(c,f))},ar.prefetchDNS=function(c){typeof c=="string"&&i.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"?i.d.S(c,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:u,integrity:m,fetchPriority:w}):v==="script"&&i.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);i.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&&i.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);i.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);i.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 i.d.m(c)},ar.requestFormReset=function(c){i.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.5",ar}var fS;function v2(){if(fS)return qv.exports;fS=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(),qv.exports=aR(),qv.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 dS;function oR(){if(dS)return hl;dS=1;var e=sR(),t=so(),r=v2();function i(n){var s="https://react.dev/errors/"+n;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 #"+n+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function h(n){var s=n,l=n;if(n.alternate)for(;s.return;)s=s.return;else{n=s;do s=n,(s.flags&4098)!==0&&(l=s.return),n=s.return;while(n)}return s.tag===3?l:null}function g(n){if(n.tag===13){var s=n.memoizedState;if(s===null&&(n=n.alternate,n!==null&&(s=n.memoizedState)),s!==null)return s.dehydrated}return null}function a(n){if(n.tag===31){var s=n.memoizedState;if(s===null&&(n=n.alternate,n!==null&&(s=n.memoizedState)),s!==null)return s.dehydrated}return null}function c(n){if(h(n)!==n)throw Error(i(188))}function f(n){var s=n.alternate;if(!s){if(s=h(n),s===null)throw Error(i(188));return s!==n?null:n}for(var l=n,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),n;if(T===p)return c(A),s;T=T.sibling}throw Error(i(188))}if(l.return!==p.return)l=A,p=T;else{for(var I=!1,K=A.child;K;){if(K===l){I=!0,l=A,p=T;break}if(K===p){I=!0,p=A,l=T;break}K=K.sibling}if(!I){for(K=T.child;K;){if(K===l){I=!0,l=T,p=A;break}if(K===p){I=!0,p=T,l=A;break}K=K.sibling}if(!I)throw Error(i(189))}}if(l.alternate!==p)throw Error(i(190))}if(l.tag!==3)throw Error(i(188));return l.stateNode.current===l?n:s}function v(n){var s=n.tag;if(s===5||s===26||s===27||s===6)return n;for(n=n.child;n!==null;){if(s=v(n),s!==null)return s;n=n.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"),P=Symbol.iterator;function R(n){return n===null||typeof n!="object"?null:(n=P&&n[P]||n["@@iterator"],typeof n=="function"?n:null)}var B=Symbol.for("react.client.reference");function U(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===B?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){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 n=="object")switch(n.$$typeof){case C:return"Portal";case S:return n.displayName||"Context";case b:return(n._context.displayName||"Context")+".Consumer";case E:var s=n.render;return n=n.displayName,n||(n=s.displayName||s.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case O:return s=n.displayName||null,s!==null?s:U(n.type)||"Memo";case M:s=n._payload,n=n._init;try{return U(n(s))}catch{}}return null}var V=Array.isArray,q=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},j=[],H=-1;function z(n){return{current:n}}function F(n){0>H||(n.current=j[H],j[H]=null,H--)}function Z(n,s){H++,j[H]=n.current,n.current=s}var re=z(null),he=z(null),ge=z(null),X=z(null);function G(n,s){switch(Z(ge,s),Z(he,n),Z(re,null),s.nodeType){case 9:case 11:n=(n=s.documentElement)&&(n=n.namespaceURI)?L1(n):0;break;default:if(n=s.tagName,s=s.namespaceURI)s=L1(s),n=O1(s,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}F(re),Z(re,n)}function ee(){F(re),F(he),F(ge)}function Q(n){n.memoizedState!==null&&Z(X,n);var s=re.current,l=O1(s,n.type);s!==l&&(Z(he,n),Z(re,l))}function se(n){he.current===n&&(F(re),F(he)),X.current===n&&(F(X),al._currentValue=W)}var te,me;function fe(n){if(te===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);te=s&&s[1]||"",me=-1<l.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+te+n+me}var ye=!1;function Le(n,s){if(!n||ye)return"";ye=!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(ue){var ce=ue}Reflect.construct(n,[],_e)}else{try{_e.call()}catch(ue){ce=ue}n.call(_e.prototype)}}else{try{throw Error()}catch(ue){ce=ue}(_e=n())&&typeof _e.catch=="function"&&_e.catch(function(){})}}catch(ue){if(ue&&ce&&typeof ue.stack=="string")return[ue.stack,ce.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],K=T[1];if(I&&K){var J=I.split(`
|
|
44
|
-
`),oe=K.split(`
|
|
45
|
-
`);for(A=p=0;p<J.length&&!J[p].includes("DetermineComponentFrameRoot");)p++;for(;A<oe.length&&!oe[A].includes("DetermineComponentFrameRoot");)A++;if(p===J.length||A===oe.length)for(p=J.length-1,A=oe.length-1;1<=p&&0<=A&&J[p]!==oe[A];)A--;for(;1<=p&&0<=A;p--,A--)if(J[p]!==oe[A]){if(p!==1||A!==1)do if(p--,A--,0>A||J[p]!==oe[A]){var de=`
|
|
46
|
-
`+J[p].replace(" at new "," at ");return n.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",n.displayName)),de}while(1<=p&&0<=A);break}}}finally{ye=!1,Error.prepareStackTrace=l}return(l=n?n.displayName||n.name:"")?fe(l):""}function be(n,s){switch(n.tag){case 26:case 27:case 5:return fe(n.type);case 16:return fe("Lazy");case 13:return n.child!==s&&s!==null?fe("Suspense Fallback"):fe("Suspense");case 19:return fe("SuspenseList");case 0:case 15:return Le(n.type,!1);case 11:return Le(n.type.render,!1);case 1:return Le(n.type,!0);case 31:return fe("Activity");default:return""}}function Qe(n){try{var s="",l=null;do s+=be(n,l),l=n,n=n.return;while(n);return s}catch(p){return`
|
|
47
|
-
Error generating stack: `+p.message+`
|
|
48
|
-
`+p.stack}}var Rt=Object.prototype.hasOwnProperty,xe=e.unstable_scheduleCallback,Se=e.unstable_cancelCallback,we=e.unstable_shouldYield,ve=e.unstable_requestPaint,Ce=e.unstable_now,$e=e.unstable_getCurrentPriorityLevel,Be=e.unstable_ImmediatePriority,$t=e.unstable_UserBlockingPriority,ct=e.unstable_NormalPriority,yt=e.unstable_LowPriority,We=e.unstable_IdlePriority,Pe=e.log,De=e.unstable_setDisableYieldValue,cr=null,_t=null;function Ut(n){if(typeof Pe=="function"&&De(n),_t&&typeof _t.setStrictMode=="function")try{_t.setStrictMode(cr,n)}catch{}}var kt=Math.clz32?Math.clz32:mo,ai=Math.log,_o=Math.LN2;function mo(n){return n>>>=0,n===0?32:31-(ai(n)/_o|0)|0}var Hr=256,mi=262144,yi=4194304;function oi(n){var s=n&42;if(s!==0)return s;switch(n&-n){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 n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function ac(n,s,l){var p=n.pendingLanes;if(p===0)return 0;var A=0,T=n.suspendedLanes,I=n.pingedLanes;n=n.warmLanes;var K=p&134217727;return K!==0?(p=K&~T,p!==0?A=oi(p):(I&=K,I!==0?A=oi(I):l||(l=K&~n,l!==0&&(A=oi(l))))):(K=p&~T,K!==0?A=oi(K):I!==0?A=oi(I):l||(l=p&~n,l!==0&&(A=oi(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 yo(n,s){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&s)===0}function IO(n,s){switch(n){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 c0(){var n=yi;return yi<<=1,(yi&62914560)===0&&(yi=4194304),n}function Lf(n){for(var s=[],l=0;31>l;l++)s.push(n);return s}function bo(n,s){n.pendingLanes|=s,s!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function NO(n,s,l,p,A,T){var I=n.pendingLanes;n.pendingLanes=l,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=l,n.entangledLanes&=l,n.errorRecoveryDisabledLanes&=l,n.shellSuspendCounter=0;var K=n.entanglements,J=n.expirationTimes,oe=n.hiddenUpdates;for(l=I&~l;0<l;){var de=31-kt(l),_e=1<<de;K[de]=0,J[de]=-1;var ce=oe[de];if(ce!==null)for(oe[de]=null,de=0;de<ce.length;de++){var ue=ce[de];ue!==null&&(ue.lane&=-536870913)}l&=~_e}p!==0&&u0(n,p,0),T!==0&&A===0&&n.tag!==0&&(n.suspendedLanes|=T&~(I&~s))}function u0(n,s,l){n.pendingLanes|=s,n.suspendedLanes&=~s;var p=31-kt(s);n.entangledLanes|=s,n.entanglements[p]=n.entanglements[p]|1073741824|l&261930}function h0(n,s){var l=n.entangledLanes|=s;for(n=n.entanglements;l;){var p=31-kt(l),A=1<<p;A&s|n[p]&s&&(n[p]|=s),l&=~A}}function f0(n,s){var l=s&-s;return l=(l&42)!==0?1:Of(l),(l&(n.suspendedLanes|s))!==0?0:l}function Of(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=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:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Tf(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function d0(){var n=Y.p;return n!==0?n:(n=window.event,n===void 0?32:Q1(n.type))}function v0(n,s){var l=Y.p;try{return Y.p=n,s()}finally{Y.p=l}}var mn=Math.random().toString(36).slice(2),Zt="__reactFiber$"+mn,pr="__reactProps$"+mn,Ys="__reactContainer$"+mn,Df="__reactEvents$"+mn,zO="__reactListeners$"+mn,HO="__reactHandles$"+mn,g0="__reactResources$"+mn,So="__reactMarker$"+mn;function Rf(n){delete n[Zt],delete n[pr],delete n[Df],delete n[zO],delete n[HO]}function Vs(n){var s=n[Zt];if(s)return s;for(var l=n.parentNode;l;){if(s=l[Ys]||l[Zt]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(n=j1(n);n!==null;){if(l=n[Zt])return l;n=j1(n)}return s}n=l,l=n.parentNode}return null}function Xs(n){if(n=n[Zt]||n[Ys]){var s=n.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return n}return null}function wo(n){var s=n.tag;if(s===5||s===26||s===27||s===6)return n.stateNode;throw Error(i(33))}function Zs(n){var s=n[g0];return s||(s=n[g0]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Ft(n){n[So]=!0}var p0=new Set,_0={};function is(n,s){Qs(n,s),Qs(n+"Capture",s)}function Qs(n,s){for(_0[n]=s,n=0;n<s.length;n++)p0.add(s[n])}var $O=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]*$"),m0={},y0={};function UO(n){return Rt.call(y0,n)?!0:Rt.call(m0,n)?!1:$O.test(n)?y0[n]=!0:(m0[n]=!0,!1)}function oc(n,s,l){if(UO(s))if(l===null)n.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":n.removeAttribute(s);return;case"boolean":var p=s.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){n.removeAttribute(s);return}}n.setAttribute(s,""+l)}}function lc(n,s,l){if(l===null)n.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(s);return}n.setAttribute(s,""+l)}}function Ii(n,s,l,p){if(p===null)n.removeAttribute(l);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(l);return}n.setAttributeNS(s,l,""+p)}}function $r(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function b0(n){var s=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function FO(n,s,l){var p=Object.getOwnPropertyDescriptor(n.constructor.prototype,s);if(!n.hasOwnProperty(s)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var A=p.get,T=p.set;return Object.defineProperty(n,s,{configurable:!0,get:function(){return A.call(this)},set:function(I){l=""+I,T.call(this,I)}}),Object.defineProperty(n,s,{enumerable:p.enumerable}),{getValue:function(){return l},setValue:function(I){l=""+I},stopTracking:function(){n._valueTracker=null,delete n[s]}}}}function kf(n){if(!n._valueTracker){var s=b0(n)?"checked":"value";n._valueTracker=FO(n,s,""+n[s])}}function S0(n){if(!n)return!1;var s=n._valueTracker;if(!s)return!0;var l=s.getValue(),p="";return n&&(p=b0(n)?n.checked?"true":"false":n.value),n=p,n!==l?(s.setValue(n),!0):!1}function cc(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var WO=/[\n"\\]/g;function Ur(n){return n.replace(WO,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Pf(n,s,l,p,A,T,I,K){n.name="",I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?n.type=I:n.removeAttribute("type"),s!=null?I==="number"?(s===0&&n.value===""||n.value!=s)&&(n.value=""+$r(s)):n.value!==""+$r(s)&&(n.value=""+$r(s)):I!=="submit"&&I!=="reset"||n.removeAttribute("value"),s!=null?Bf(n,I,$r(s)):l!=null?Bf(n,I,$r(l)):p!=null&&n.removeAttribute("value"),A==null&&T!=null&&(n.defaultChecked=!!T),A!=null&&(n.checked=A&&typeof A!="function"&&typeof A!="symbol"),K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?n.name=""+$r(K):n.removeAttribute("name")}function w0(n,s,l,p,A,T,I,K){if(T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(n.type=T),s!=null||l!=null){if(!(T!=="submit"&&T!=="reset"||s!=null)){kf(n);return}l=l!=null?""+$r(l):"",s=s!=null?""+$r(s):l,K||s===n.value||(n.value=s),n.defaultValue=s}p=p??A,p=typeof p!="function"&&typeof p!="symbol"&&!!p,n.checked=K?n.checked:!!p,n.defaultChecked=!!p,I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"&&(n.name=I),kf(n)}function Bf(n,s,l){s==="number"&&cc(n.ownerDocument)===n||n.defaultValue===""+l||(n.defaultValue=""+l)}function Js(n,s,l,p){if(n=n.options,s){s={};for(var A=0;A<l.length;A++)s["$"+l[A]]=!0;for(l=0;l<n.length;l++)A=s.hasOwnProperty("$"+n[l].value),n[l].selected!==A&&(n[l].selected=A),A&&p&&(n[l].defaultSelected=!0)}else{for(l=""+$r(l),s=null,A=0;A<n.length;A++){if(n[A].value===l){n[A].selected=!0,p&&(n[A].defaultSelected=!0);return}s!==null||n[A].disabled||(s=n[A])}s!==null&&(s.selected=!0)}}function C0(n,s,l){if(s!=null&&(s=""+$r(s),s!==n.value&&(n.value=s),l==null)){n.defaultValue!==s&&(n.defaultValue=s);return}n.defaultValue=l!=null?""+$r(l):""}function x0(n,s,l,p){if(s==null){if(p!=null){if(l!=null)throw Error(i(92));if(V(p)){if(1<p.length)throw Error(i(93));p=p[0]}l=p}l==null&&(l=""),s=l}l=$r(s),n.defaultValue=l,p=n.textContent,p===l&&p!==""&&p!==null&&(n.value=p),kf(n)}function ea(n,s){if(s){var l=n.firstChild;if(l&&l===n.lastChild&&l.nodeType===3){l.nodeValue=s;return}}n.textContent=s}var qO=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 E0(n,s,l){var p=s.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?p?n.setProperty(s,""):s==="float"?n.cssFloat="":n[s]="":p?n.setProperty(s,l):typeof l!="number"||l===0||qO.has(s)?s==="float"?n.cssFloat=l:n[s]=(""+l).trim():n[s]=l+"px"}function A0(n,s,l){if(s!=null&&typeof s!="object")throw Error(i(62));if(n=n.style,l!=null){for(var p in l)!l.hasOwnProperty(p)||s!=null&&s.hasOwnProperty(p)||(p.indexOf("--")===0?n.setProperty(p,""):p==="float"?n.cssFloat="":n[p]="");for(var A in s)p=s[A],s.hasOwnProperty(A)&&l[A]!==p&&E0(n,A,p)}else for(var T in s)s.hasOwnProperty(T)&&E0(n,T,s[T])}function jf(n){if(n.indexOf("-")===-1)return!1;switch(n){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 GO=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"]]),KO=/^[\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 uc(n){return KO.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Ni(){}var If=null;function Nf(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var ta=null,ra=null;function M0(n){var s=Xs(n);if(s&&(n=s.stateNode)){var l=n[pr]||null;e:switch(n=s.stateNode,s.type){case"input":if(Pf(n,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),s=l.name,l.type==="radio"&&s!=null){for(l=n;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Ur(""+s)+'"][type="radio"]'),s=0;s<l.length;s++){var p=l[s];if(p!==n&&p.form===n.form){var A=p[pr]||null;if(!A)throw Error(i(90));Pf(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===n.form&&S0(p)}break e;case"textarea":C0(n,l.value,l.defaultValue);break e;case"select":s=l.value,s!=null&&Js(n,!!l.multiple,s,!1)}}}var zf=!1;function L0(n,s,l){if(zf)return n(s,l);zf=!0;try{var p=n(s);return p}finally{if(zf=!1,(ta!==null||ra!==null)&&(Zc(),ta&&(s=ta,n=ra,ra=ta=null,M0(s),n)))for(s=0;s<n.length;s++)M0(n[s])}}function Co(n,s){var l=n.stateNode;if(l===null)return null;var p=l[pr]||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)||(n=n.type,p=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!p;break e;default:n=!1}if(n)return null;if(l&&typeof l!="function")throw Error(i(231,s,typeof l));return l}var zi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hf=!1;if(zi)try{var xo={};Object.defineProperty(xo,"passive",{get:function(){Hf=!0}}),window.addEventListener("test",xo,xo),window.removeEventListener("test",xo,xo)}catch{Hf=!1}var yn=null,$f=null,hc=null;function O0(){if(hc)return hc;var n,s=$f,l=s.length,p,A="value"in yn?yn.value:yn.textContent,T=A.length;for(n=0;n<l&&s[n]===A[n];n++);var I=l-n;for(p=1;p<=I&&s[l-p]===A[T-p];p++);return hc=A.slice(n,1<p?1-p:void 0)}function fc(n){var s=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&s===13&&(n=13)):n=s,n===10&&(n=13),32<=n||n===13?n:0}function dc(){return!0}function T0(){return!1}function _r(n){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 K in n)n.hasOwnProperty(K)&&(l=n[K],this[K]=l?l(T):T[K]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?dc:T0,this.isPropagationStopped=T0,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=dc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=dc)},persist:function(){},isPersistent:dc}),s}var ns={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vc=_r(ns),Eo=u({},ns,{view:0,detail:0}),YO=_r(Eo),Uf,Ff,Ao,gc=u({},Eo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qf,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Ao&&(Ao&&n.type==="mousemove"?(Uf=n.screenX-Ao.screenX,Ff=n.screenY-Ao.screenY):Ff=Uf=0,Ao=n),Uf)},movementY:function(n){return"movementY"in n?n.movementY:Ff}}),D0=_r(gc),VO=u({},gc,{dataTransfer:0}),XO=_r(VO),ZO=u({},Eo,{relatedTarget:0}),Wf=_r(ZO),QO=u({},ns,{animationName:0,elapsedTime:0,pseudoElement:0}),JO=_r(QO),eT=u({},ns,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),tT=_r(eT),rT=u({},ns,{data:0}),R0=_r(rT),iT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},nT={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"},sT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function aT(n){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(n):(n=sT[n])?!!s[n]:!1}function qf(){return aT}var oT=u({},Eo,{key:function(n){if(n.key){var s=iT[n.key]||n.key;if(s!=="Unidentified")return s}return n.type==="keypress"?(n=fc(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?nT[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qf,charCode:function(n){return n.type==="keypress"?fc(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?fc(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),lT=_r(oT),cT=u({},gc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),k0=_r(cT),uT=u({},Eo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qf}),hT=_r(uT),fT=u({},ns,{propertyName:0,elapsedTime:0,pseudoElement:0}),dT=_r(fT),vT=u({},gc,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),gT=_r(vT),pT=u({},ns,{newState:0,oldState:0}),_T=_r(pT),mT=[9,13,27,32],Gf=zi&&"CompositionEvent"in window,Mo=null;zi&&"documentMode"in document&&(Mo=document.documentMode);var yT=zi&&"TextEvent"in window&&!Mo,P0=zi&&(!Gf||Mo&&8<Mo&&11>=Mo),B0=" ",j0=!1;function I0(n,s){switch(n){case"keyup":return mT.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function N0(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var ia=!1;function bT(n,s){switch(n){case"compositionend":return N0(s);case"keypress":return s.which!==32?null:(j0=!0,B0);case"textInput":return n=s.data,n===B0&&j0?null:n;default:return null}}function ST(n,s){if(ia)return n==="compositionend"||!Gf&&I0(n,s)?(n=O0(),hc=$f=yn=null,ia=!1,n):null;switch(n){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 P0&&s.locale!=="ko"?null:s.data;default:return null}}var wT={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 z0(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s==="input"?!!wT[n.type]:s==="textarea"}function H0(n,s,l,p){ta?ra?ra.push(p):ra=[p]:ta=p,s=nu(s,"onChange"),0<s.length&&(l=new vc("onChange","change",null,l,p),n.push({event:l,listeners:s}))}var Lo=null,Oo=null;function CT(n){w1(n,0)}function pc(n){var s=wo(n);if(S0(s))return n}function $0(n,s){if(n==="change")return s}var U0=!1;if(zi){var Kf;if(zi){var Yf="oninput"in document;if(!Yf){var F0=document.createElement("div");F0.setAttribute("oninput","return;"),Yf=typeof F0.oninput=="function"}Kf=Yf}else Kf=!1;U0=Kf&&(!document.documentMode||9<document.documentMode)}function W0(){Lo&&(Lo.detachEvent("onpropertychange",q0),Oo=Lo=null)}function q0(n){if(n.propertyName==="value"&&pc(Oo)){var s=[];H0(s,Oo,n,Nf(n)),L0(CT,s)}}function xT(n,s,l){n==="focusin"?(W0(),Lo=s,Oo=l,Lo.attachEvent("onpropertychange",q0)):n==="focusout"&&W0()}function ET(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return pc(Oo)}function AT(n,s){if(n==="click")return pc(s)}function MT(n,s){if(n==="input"||n==="change")return pc(s)}function LT(n,s){return n===s&&(n!==0||1/n===1/s)||n!==n&&s!==s}var Ar=typeof Object.is=="function"?Object.is:LT;function To(n,s){if(Ar(n,s))return!0;if(typeof n!="object"||n===null||typeof s!="object"||s===null)return!1;var l=Object.keys(n),p=Object.keys(s);if(l.length!==p.length)return!1;for(p=0;p<l.length;p++){var A=l[p];if(!Rt.call(s,A)||!Ar(n[A],s[A]))return!1}return!0}function G0(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function K0(n,s){var l=G0(n);n=0;for(var p;l;){if(l.nodeType===3){if(p=n+l.textContent.length,n<=s&&p>=s)return{node:l,offset:s-n};n=p}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=G0(l)}}function Y0(n,s){return n&&s?n===s?!0:n&&n.nodeType===3?!1:s&&s.nodeType===3?Y0(n,s.parentNode):"contains"in n?n.contains(s):n.compareDocumentPosition?!!(n.compareDocumentPosition(s)&16):!1:!1}function V0(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var s=cc(n.document);s instanceof n.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch{l=!1}if(l)n=s.contentWindow;else break;s=cc(n.document)}return s}function Vf(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s&&(s==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||s==="textarea"||n.contentEditable==="true")}var OT=zi&&"documentMode"in document&&11>=document.documentMode,na=null,Xf=null,Do=null,Zf=!1;function X0(n,s,l){var p=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Zf||na==null||na!==cc(p)||(p=na,"selectionStart"in p&&Vf(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}),Do&&To(Do,p)||(Do=p,p=nu(Xf,"onSelect"),0<p.length&&(s=new vc("onSelect","select",null,s,l),n.push({event:s,listeners:p}),s.target=na)))}function ss(n,s){var l={};return l[n.toLowerCase()]=s.toLowerCase(),l["Webkit"+n]="webkit"+s,l["Moz"+n]="moz"+s,l}var sa={animationend:ss("Animation","AnimationEnd"),animationiteration:ss("Animation","AnimationIteration"),animationstart:ss("Animation","AnimationStart"),transitionrun:ss("Transition","TransitionRun"),transitionstart:ss("Transition","TransitionStart"),transitioncancel:ss("Transition","TransitionCancel"),transitionend:ss("Transition","TransitionEnd")},Qf={},Z0={};zi&&(Z0=document.createElement("div").style,"AnimationEvent"in window||(delete sa.animationend.animation,delete sa.animationiteration.animation,delete sa.animationstart.animation),"TransitionEvent"in window||delete sa.transitionend.transition);function as(n){if(Qf[n])return Qf[n];if(!sa[n])return n;var s=sa[n],l;for(l in s)if(s.hasOwnProperty(l)&&l in Z0)return Qf[n]=s[l];return n}var Q0=as("animationend"),J0=as("animationiteration"),ey=as("animationstart"),TT=as("transitionrun"),DT=as("transitionstart"),RT=as("transitioncancel"),ty=as("transitionend"),ry=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 li(n,s){ry.set(n,s),is(s,[n])}var _c=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=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(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},Fr=[],aa=0,ed=0;function mc(){for(var n=aa,s=ed=aa=0;s<n;){var l=Fr[s];Fr[s++]=null;var p=Fr[s];Fr[s++]=null;var A=Fr[s];Fr[s++]=null;var T=Fr[s];if(Fr[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&&iy(l,A,T)}}function yc(n,s,l,p){Fr[aa++]=n,Fr[aa++]=s,Fr[aa++]=l,Fr[aa++]=p,ed|=p,n.lanes|=p,n=n.alternate,n!==null&&(n.lanes|=p)}function td(n,s,l,p){return yc(n,s,l,p),bc(n)}function os(n,s){return yc(n,null,null,s),bc(n)}function iy(n,s,l){n.lanes|=l;var p=n.alternate;p!==null&&(p.lanes|=l);for(var A=!1,T=n.return;T!==null;)T.childLanes|=l,p=T.alternate,p!==null&&(p.childLanes|=l),T.tag===22&&(n=T.stateNode,n===null||n._visibility&1||(A=!0)),n=T,T=T.return;return n.tag===3?(T=n.stateNode,A&&s!==null&&(A=31-kt(l),n=T.hiddenUpdates,p=n[A],p===null?n[A]=[s]:p.push(s),s.lane=l|536870912),T):null}function bc(n){if(50<Jo)throw Jo=0,uv=null,Error(i(185));for(var s=n.return;s!==null;)n=s,s=n.return;return n.tag===3?n.stateNode:null}var oa={};function kT(n,s,l,p){this.tag=n,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 Mr(n,s,l,p){return new kT(n,s,l,p)}function rd(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Hi(n,s){var l=n.alternate;return l===null?(l=Mr(n.tag,s,n.key,n.mode),l.elementType=n.elementType,l.type=n.type,l.stateNode=n.stateNode,l.alternate=n,n.alternate=l):(l.pendingProps=s,l.type=n.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=n.flags&65011712,l.childLanes=n.childLanes,l.lanes=n.lanes,l.child=n.child,l.memoizedProps=n.memoizedProps,l.memoizedState=n.memoizedState,l.updateQueue=n.updateQueue,s=n.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=n.sibling,l.index=n.index,l.ref=n.ref,l.refCleanup=n.refCleanup,l}function ny(n,s){n.flags&=65011714;var l=n.alternate;return l===null?(n.childLanes=0,n.lanes=s,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=l.childLanes,n.lanes=l.lanes,n.child=l.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=l.memoizedProps,n.memoizedState=l.memoizedState,n.updateQueue=l.updateQueue,n.type=l.type,s=l.dependencies,n.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),n}function Sc(n,s,l,p,A,T){var I=0;if(p=n,typeof n=="function")rd(n)&&(I=1);else if(typeof n=="string")I=ND(n,l,re.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case D:return n=Mr(31,l,s,A),n.elementType=D,n.lanes=T,n;case _:return ls(l.children,A,T,s);case d:I=8,A|=24;break;case y:return n=Mr(12,l,s,A|2),n.elementType=y,n.lanes=T,n;case L:return n=Mr(13,l,s,A),n.elementType=L,n.lanes=T,n;case x:return n=Mr(19,l,s,A),n.elementType=x,n.lanes=T,n;default:if(typeof n=="object"&&n!==null)switch(n.$$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(i(130,n===null?"null":typeof n,"")),p=null}return s=Mr(I,l,s,A),s.elementType=n,s.type=p,s.lanes=T,s}function ls(n,s,l,p){return n=Mr(7,n,p,s),n.lanes=l,n}function id(n,s,l){return n=Mr(6,n,null,s),n.lanes=l,n}function sy(n){var s=Mr(18,null,null,0);return s.stateNode=n,s}function nd(n,s,l){return s=Mr(4,n.children!==null?n.children:[],n.key,s),s.lanes=l,s.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},s}var ay=new WeakMap;function Wr(n,s){if(typeof n=="object"&&n!==null){var l=ay.get(n);return l!==void 0?l:(s={value:n,source:s,stack:Qe(s)},ay.set(n,s),s)}return{value:n,source:s,stack:Qe(s)}}var la=[],ca=0,wc=null,Ro=0,qr=[],Gr=0,bn=null,bi=1,Si="";function $i(n,s){la[ca++]=Ro,la[ca++]=wc,wc=n,Ro=s}function oy(n,s,l){qr[Gr++]=bi,qr[Gr++]=Si,qr[Gr++]=bn,bn=n;var p=bi;n=Si;var A=32-kt(p)-1;p&=~(1<<A),l+=1;var T=32-kt(s)+A;if(30<T){var I=A-A%5;T=(p&(1<<I)-1).toString(32),p>>=I,A-=I,bi=1<<32-kt(s)+A|l<<A|p,Si=T+n}else bi=1<<T|l<<A|p,Si=n}function sd(n){n.return!==null&&($i(n,1),oy(n,1,0))}function ad(n){for(;n===wc;)wc=la[--ca],la[ca]=null,Ro=la[--ca],la[ca]=null;for(;n===bn;)bn=qr[--Gr],qr[Gr]=null,Si=qr[--Gr],qr[Gr]=null,bi=qr[--Gr],qr[Gr]=null}function ly(n,s){qr[Gr++]=bi,qr[Gr++]=Si,qr[Gr++]=bn,bi=s.id,Si=s.overflow,bn=n}var Qt=null,ut=null,qe=!1,Sn=null,Kr=!1,od=Error(i(519));function wn(n){var s=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ko(Wr(s,n)),od}function cy(n){var s=n.stateNode,l=n.type,p=n.memoizedProps;switch(s[Zt]=n,s[pr]=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<tl.length;l++)He(tl[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),w0(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),x0(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||A1(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=Ni),s=!0):s=!1,s||wn(n,!0)}function uy(n){for(Qt=n.return;Qt;)switch(Qt.tag){case 5:case 31:case 13:Kr=!1;return;case 27:case 3:Kr=!0;return;default:Qt=Qt.return}}function ua(n){if(n!==Qt)return!1;if(!qe)return uy(n),qe=!0,!1;var s=n.tag,l;if((l=s!==3&&s!==27)&&((l=s===5)&&(l=n.type,l=!(l!=="form"&&l!=="button")||Ev(n.type,n.memoizedProps)),l=!l),l&&ut&&wn(n),uy(n),s===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));ut=B1(n)}else if(s===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));ut=B1(n)}else s===27?(s=ut,jn(n.type)?(n=Tv,Tv=null,ut=n):ut=s):ut=Qt?Vr(n.stateNode.nextSibling):null;return!0}function cs(){ut=Qt=null,qe=!1}function ld(){var n=Sn;return n!==null&&(Sr===null?Sr=n:Sr.push.apply(Sr,n),Sn=null),n}function ko(n){Sn===null?Sn=[n]:Sn.push(n)}var cd=z(null),us=null,Ui=null;function Cn(n,s,l){Z(cd,s._currentValue),s._currentValue=l}function Fi(n){n._currentValue=cd.current,F(cd)}function ud(n,s,l){for(;n!==null;){var p=n.alternate;if((n.childLanes&s)!==s?(n.childLanes|=s,p!==null&&(p.childLanes|=s)):p!==null&&(p.childLanes&s)!==s&&(p.childLanes|=s),n===l)break;n=n.return}}function hd(n,s,l,p){var A=n.child;for(A!==null&&(A.return=n);A!==null;){var T=A.dependencies;if(T!==null){var I=A.child;T=T.firstContext;e:for(;T!==null;){var K=T;T=A;for(var J=0;J<s.length;J++)if(K.context===s[J]){T.lanes|=l,K=T.alternate,K!==null&&(K.lanes|=l),ud(T.return,l,n),p||(I=null);break e}T=K.next}}else if(A.tag===18){if(I=A.return,I===null)throw Error(i(341));I.lanes|=l,T=I.alternate,T!==null&&(T.lanes|=l),ud(I,l,n),I=null}else I=A.child;if(I!==null)I.return=A;else for(I=A;I!==null;){if(I===n){I=null;break}if(A=I.sibling,A!==null){A.return=I.return,I=A;break}I=I.return}A=I}}function ha(n,s,l,p){n=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(i(387));if(I=I.memoizedProps,I!==null){var K=A.type;Ar(A.pendingProps.value,I.value)||(n!==null?n.push(K):n=[K])}}else if(A===X.current){if(I=A.alternate,I===null)throw Error(i(387));I.memoizedState.memoizedState!==A.memoizedState.memoizedState&&(n!==null?n.push(al):n=[al])}A=A.return}n!==null&&hd(s,n,l,p),s.flags|=262144}function Cc(n){for(n=n.firstContext;n!==null;){if(!Ar(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function hs(n){us=n,Ui=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function Jt(n){return hy(us,n)}function xc(n,s){return us===null&&hs(n),hy(n,s)}function hy(n,s){var l=s._currentValue;if(s={context:s,memoizedValue:l,next:null},Ui===null){if(n===null)throw Error(i(308));Ui=s,n.dependencies={lanes:0,firstContext:s},n.flags|=524288}else Ui=Ui.next=s;return l}var PT=typeof AbortController<"u"?AbortController:function(){var n=[],s=this.signal={aborted:!1,addEventListener:function(l,p){n.push(p)}};this.abort=function(){s.aborted=!0,n.forEach(function(l){return l()})}},BT=e.unstable_scheduleCallback,jT=e.unstable_NormalPriority,Mt={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function fd(){return{controller:new PT,data:new Map,refCount:0}}function Po(n){n.refCount--,n.refCount===0&&BT(jT,function(){n.controller.abort()})}var Bo=null,dd=0,fa=0,da=null;function IT(n,s){if(Bo===null){var l=Bo=[];dd=0,fa=pv(),da={status:"pending",value:void 0,then:function(p){l.push(p)}}}return dd++,s.then(fy,fy),s}function fy(){if(--dd===0&&Bo!==null){da!==null&&(da.status="fulfilled");var n=Bo;Bo=null,fa=0,da=null;for(var s=0;s<n.length;s++)(0,n[s])()}}function NT(n,s){var l=[],p={status:"pending",value:null,reason:null,then:function(A){l.push(A)}};return n.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 dy=q.S;q.S=function(n,s){Xb=Ce(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&IT(n,s),dy!==null&&dy(n,s)};var fs=z(null);function vd(){var n=fs.current;return n!==null?n:st.pooledCache}function Ec(n,s){s===null?Z(fs,fs.current):Z(fs,s.pool)}function vy(){var n=vd();return n===null?null:{parent:Mt._currentValue,pool:n}}var va=Error(i(460)),gd=Error(i(474)),Ac=Error(i(542)),Mc={then:function(){}};function gy(n){return n=n.status,n==="fulfilled"||n==="rejected"}function py(n,s,l){switch(l=n[l],l===void 0?n.push(s):l!==s&&(s.then(Ni,Ni),s=l),s.status){case"fulfilled":return s.value;case"rejected":throw n=s.reason,my(n),n;default:if(typeof s.status=="string")s.then(Ni,Ni);else{if(n=st,n!==null&&100<n.shellSuspendCounter)throw Error(i(482));n=s,n.status="pending",n.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 n=s.reason,my(n),n}throw vs=s,va}}function ds(n){try{var s=n._init;return s(n._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(vs=l,va):l}}var vs=null;function _y(){if(vs===null)throw Error(i(459));var n=vs;return vs=null,n}function my(n){if(n===va||n===Ac)throw Error(i(483))}var ga=null,jo=0;function Lc(n){var s=jo;return jo+=1,ga===null&&(ga=[]),py(ga,n,s)}function Io(n,s){s=s.props.ref,n.ref=s!==void 0?s:null}function Oc(n,s){throw s.$$typeof===m?Error(i(525)):(n=Object.prototype.toString.call(s),Error(i(31,n==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":n)))}function yy(n){function s(ne,ie){if(n){var ae=ne.deletions;ae===null?(ne.deletions=[ie],ne.flags|=16):ae.push(ie)}}function l(ne,ie){if(!n)return null;for(;ie!==null;)s(ne,ie),ie=ie.sibling;return null}function p(ne){for(var ie=new Map;ne!==null;)ne.key!==null?ie.set(ne.key,ne):ie.set(ne.index,ne),ne=ne.sibling;return ie}function A(ne,ie){return ne=Hi(ne,ie),ne.index=0,ne.sibling=null,ne}function T(ne,ie,ae){return ne.index=ae,n?(ae=ne.alternate,ae!==null?(ae=ae.index,ae<ie?(ne.flags|=67108866,ie):ae):(ne.flags|=67108866,ie)):(ne.flags|=1048576,ie)}function I(ne){return n&&ne.alternate===null&&(ne.flags|=67108866),ne}function K(ne,ie,ae,pe){return ie===null||ie.tag!==6?(ie=id(ae,ne.mode,pe),ie.return=ne,ie):(ie=A(ie,ae),ie.return=ne,ie)}function J(ne,ie,ae,pe){var Oe=ae.type;return Oe===_?de(ne,ie,ae.props.children,pe,ae.key):ie!==null&&(ie.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===M&&ds(Oe)===ie.type)?(ie=A(ie,ae.props),Io(ie,ae),ie.return=ne,ie):(ie=Sc(ae.type,ae.key,ae.props,null,ne.mode,pe),Io(ie,ae),ie.return=ne,ie)}function oe(ne,ie,ae,pe){return ie===null||ie.tag!==4||ie.stateNode.containerInfo!==ae.containerInfo||ie.stateNode.implementation!==ae.implementation?(ie=nd(ae,ne.mode,pe),ie.return=ne,ie):(ie=A(ie,ae.children||[]),ie.return=ne,ie)}function de(ne,ie,ae,pe,Oe){return ie===null||ie.tag!==7?(ie=ls(ae,ne.mode,pe,Oe),ie.return=ne,ie):(ie=A(ie,ae),ie.return=ne,ie)}function _e(ne,ie,ae){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return ie=id(""+ie,ne.mode,ae),ie.return=ne,ie;if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case w:return ae=Sc(ie.type,ie.key,ie.props,null,ne.mode,ae),Io(ae,ie),ae.return=ne,ae;case C:return ie=nd(ie,ne.mode,ae),ie.return=ne,ie;case M:return ie=ds(ie),_e(ne,ie,ae)}if(V(ie)||R(ie))return ie=ls(ie,ne.mode,ae,null),ie.return=ne,ie;if(typeof ie.then=="function")return _e(ne,Lc(ie),ae);if(ie.$$typeof===S)return _e(ne,xc(ne,ie),ae);Oc(ne,ie)}return null}function ce(ne,ie,ae,pe){var Oe=ie!==null?ie.key:null;if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return Oe!==null?null:K(ne,ie,""+ae,pe);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case w:return ae.key===Oe?J(ne,ie,ae,pe):null;case C:return ae.key===Oe?oe(ne,ie,ae,pe):null;case M:return ae=ds(ae),ce(ne,ie,ae,pe)}if(V(ae)||R(ae))return Oe!==null?null:de(ne,ie,ae,pe,null);if(typeof ae.then=="function")return ce(ne,ie,Lc(ae),pe);if(ae.$$typeof===S)return ce(ne,ie,xc(ne,ae),pe);Oc(ne,ae)}return null}function ue(ne,ie,ae,pe,Oe){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return ne=ne.get(ae)||null,K(ie,ne,""+pe,Oe);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case w:return ne=ne.get(pe.key===null?ae:pe.key)||null,J(ie,ne,pe,Oe);case C:return ne=ne.get(pe.key===null?ae:pe.key)||null,oe(ie,ne,pe,Oe);case M:return pe=ds(pe),ue(ne,ie,ae,pe,Oe)}if(V(pe)||R(pe))return ne=ne.get(ae)||null,de(ie,ne,pe,Oe,null);if(typeof pe.then=="function")return ue(ne,ie,ae,Lc(pe),Oe);if(pe.$$typeof===S)return ue(ne,ie,ae,xc(ie,pe),Oe);Oc(ie,pe)}return null}function Ae(ne,ie,ae,pe){for(var Oe=null,Ke=null,Me=ie,Ne=ie=0,Fe=null;Me!==null&&Ne<ae.length;Ne++){Me.index>Ne?(Fe=Me,Me=null):Fe=Me.sibling;var Ye=ce(ne,Me,ae[Ne],pe);if(Ye===null){Me===null&&(Me=Fe);break}n&&Me&&Ye.alternate===null&&s(ne,Me),ie=T(Ye,ie,Ne),Ke===null?Oe=Ye:Ke.sibling=Ye,Ke=Ye,Me=Fe}if(Ne===ae.length)return l(ne,Me),qe&&$i(ne,Ne),Oe;if(Me===null){for(;Ne<ae.length;Ne++)Me=_e(ne,ae[Ne],pe),Me!==null&&(ie=T(Me,ie,Ne),Ke===null?Oe=Me:Ke.sibling=Me,Ke=Me);return qe&&$i(ne,Ne),Oe}for(Me=p(Me);Ne<ae.length;Ne++)Fe=ue(Me,ne,Ne,ae[Ne],pe),Fe!==null&&(n&&Fe.alternate!==null&&Me.delete(Fe.key===null?Ne:Fe.key),ie=T(Fe,ie,Ne),Ke===null?Oe=Fe:Ke.sibling=Fe,Ke=Fe);return n&&Me.forEach(function($n){return s(ne,$n)}),qe&&$i(ne,Ne),Oe}function ke(ne,ie,ae,pe){if(ae==null)throw Error(i(151));for(var Oe=null,Ke=null,Me=ie,Ne=ie=0,Fe=null,Ye=ae.next();Me!==null&&!Ye.done;Ne++,Ye=ae.next()){Me.index>Ne?(Fe=Me,Me=null):Fe=Me.sibling;var $n=ce(ne,Me,Ye.value,pe);if($n===null){Me===null&&(Me=Fe);break}n&&Me&&$n.alternate===null&&s(ne,Me),ie=T($n,ie,Ne),Ke===null?Oe=$n:Ke.sibling=$n,Ke=$n,Me=Fe}if(Ye.done)return l(ne,Me),qe&&$i(ne,Ne),Oe;if(Me===null){for(;!Ye.done;Ne++,Ye=ae.next())Ye=_e(ne,Ye.value,pe),Ye!==null&&(ie=T(Ye,ie,Ne),Ke===null?Oe=Ye:Ke.sibling=Ye,Ke=Ye);return qe&&$i(ne,Ne),Oe}for(Me=p(Me);!Ye.done;Ne++,Ye=ae.next())Ye=ue(Me,ne,Ne,Ye.value,pe),Ye!==null&&(n&&Ye.alternate!==null&&Me.delete(Ye.key===null?Ne:Ye.key),ie=T(Ye,ie,Ne),Ke===null?Oe=Ye:Ke.sibling=Ye,Ke=Ye);return n&&Me.forEach(function(VD){return s(ne,VD)}),qe&&$i(ne,Ne),Oe}function it(ne,ie,ae,pe){if(typeof ae=="object"&&ae!==null&&ae.type===_&&ae.key===null&&(ae=ae.props.children),typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case w:e:{for(var Oe=ae.key;ie!==null;){if(ie.key===Oe){if(Oe=ae.type,Oe===_){if(ie.tag===7){l(ne,ie.sibling),pe=A(ie,ae.props.children),pe.return=ne,ne=pe;break e}}else if(ie.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===M&&ds(Oe)===ie.type){l(ne,ie.sibling),pe=A(ie,ae.props),Io(pe,ae),pe.return=ne,ne=pe;break e}l(ne,ie);break}else s(ne,ie);ie=ie.sibling}ae.type===_?(pe=ls(ae.props.children,ne.mode,pe,ae.key),pe.return=ne,ne=pe):(pe=Sc(ae.type,ae.key,ae.props,null,ne.mode,pe),Io(pe,ae),pe.return=ne,ne=pe)}return I(ne);case C:e:{for(Oe=ae.key;ie!==null;){if(ie.key===Oe)if(ie.tag===4&&ie.stateNode.containerInfo===ae.containerInfo&&ie.stateNode.implementation===ae.implementation){l(ne,ie.sibling),pe=A(ie,ae.children||[]),pe.return=ne,ne=pe;break e}else{l(ne,ie);break}else s(ne,ie);ie=ie.sibling}pe=nd(ae,ne.mode,pe),pe.return=ne,ne=pe}return I(ne);case M:return ae=ds(ae),it(ne,ie,ae,pe)}if(V(ae))return Ae(ne,ie,ae,pe);if(R(ae)){if(Oe=R(ae),typeof Oe!="function")throw Error(i(150));return ae=Oe.call(ae),ke(ne,ie,ae,pe)}if(typeof ae.then=="function")return it(ne,ie,Lc(ae),pe);if(ae.$$typeof===S)return it(ne,ie,xc(ne,ae),pe);Oc(ne,ae)}return typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint"?(ae=""+ae,ie!==null&&ie.tag===6?(l(ne,ie.sibling),pe=A(ie,ae),pe.return=ne,ne=pe):(l(ne,ie),pe=id(ae,ne.mode,pe),pe.return=ne,ne=pe),I(ne)):l(ne,ie)}return function(ne,ie,ae,pe){try{jo=0;var Oe=it(ne,ie,ae,pe);return ga=null,Oe}catch(Me){if(Me===va||Me===Ac)throw Me;var Ke=Mr(29,Me,null,ne.mode);return Ke.lanes=pe,Ke.return=ne,Ke}finally{}}}var gs=yy(!0),by=yy(!1),xn=!1;function pd(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function _d(n,s){n=n.updateQueue,s.updateQueue===n&&(s.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function En(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function An(n,s,l){var p=n.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=bc(n),iy(n,null,l),s}return yc(n,p,s,l),bc(n)}function No(n,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194048)!==0)){var p=s.lanes;p&=n.pendingLanes,l|=p,s.lanes=l,h0(n,l)}}function md(n,s){var l=n.updateQueue,p=n.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},n.updateQueue=l;return}n=l.lastBaseUpdate,n===null?l.firstBaseUpdate=s:n.next=s,l.lastBaseUpdate=s}var yd=!1;function zo(){if(yd){var n=da;if(n!==null)throw n}}function Ho(n,s,l,p){yd=!1;var A=n.updateQueue;xn=!1;var T=A.firstBaseUpdate,I=A.lastBaseUpdate,K=A.shared.pending;if(K!==null){A.shared.pending=null;var J=K,oe=J.next;J.next=null,I===null?T=oe:I.next=oe,I=J;var de=n.alternate;de!==null&&(de=de.updateQueue,K=de.lastBaseUpdate,K!==I&&(K===null?de.firstBaseUpdate=oe:K.next=oe,de.lastBaseUpdate=J))}if(T!==null){var _e=A.baseState;I=0,de=oe=J=null,K=T;do{var ce=K.lane&-536870913,ue=ce!==K.lane;if(ue?(Ue&ce)===ce:(p&ce)===ce){ce!==0&&ce===fa&&(yd=!0),de!==null&&(de=de.next={lane:0,tag:K.tag,payload:K.payload,callback:null,next:null});e:{var Ae=n,ke=K;ce=s;var it=l;switch(ke.tag){case 1:if(Ae=ke.payload,typeof Ae=="function"){_e=Ae.call(it,_e,ce);break e}_e=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=ke.payload,ce=typeof Ae=="function"?Ae.call(it,_e,ce):Ae,ce==null)break e;_e=u({},_e,ce);break e;case 2:xn=!0}}ce=K.callback,ce!==null&&(n.flags|=64,ue&&(n.flags|=8192),ue=A.callbacks,ue===null?A.callbacks=[ce]:ue.push(ce))}else ue={lane:ce,tag:K.tag,payload:K.payload,callback:K.callback,next:null},de===null?(oe=de=ue,J=_e):de=de.next=ue,I|=ce;if(K=K.next,K===null){if(K=A.shared.pending,K===null)break;ue=K,K=ue.next,ue.next=null,A.lastBaseUpdate=ue,A.shared.pending=null}}while(!0);de===null&&(J=_e),A.baseState=J,A.firstBaseUpdate=oe,A.lastBaseUpdate=de,T===null&&(A.shared.lanes=0),Dn|=I,n.lanes=I,n.memoizedState=_e}}function Sy(n,s){if(typeof n!="function")throw Error(i(191,n));n.call(s)}function wy(n,s){var l=n.callbacks;if(l!==null)for(n.callbacks=null,n=0;n<l.length;n++)Sy(l[n],s)}var pa=z(null),Tc=z(0);function Cy(n,s){n=Qi,Z(Tc,n),Z(pa,s),Qi=n|s.baseLanes}function bd(){Z(Tc,Qi),Z(pa,pa.current)}function Sd(){Qi=Tc.current,F(pa),F(Tc)}var Lr=z(null),Yr=null;function Mn(n){var s=n.alternate;Z(Et,Et.current&1),Z(Lr,n),Yr===null&&(s===null||pa.current!==null||s.memoizedState!==null)&&(Yr=n)}function wd(n){Z(Et,Et.current),Z(Lr,n),Yr===null&&(Yr=n)}function xy(n){n.tag===22?(Z(Et,Et.current),Z(Lr,n),Yr===null&&(Yr=n)):Ln()}function Ln(){Z(Et,Et.current),Z(Lr,Lr.current)}function Or(n){F(Lr),Yr===n&&(Yr=null),F(Et)}var Et=z(0);function Dc(n){for(var s=n;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Lv(l)||Ov(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===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Wi=0,Ie=null,tt=null,Lt=null,Rc=!1,_a=!1,ps=!1,kc=0,$o=0,ma=null,zT=0;function bt(){throw Error(i(321))}function Cd(n,s){if(s===null)return!1;for(var l=0;l<s.length&&l<n.length;l++)if(!Ar(n[l],s[l]))return!1;return!0}function xd(n,s,l,p,A,T){return Wi=T,Ie=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,q.H=n===null||n.memoizedState===null?ob:zd,ps=!1,T=l(p,A),ps=!1,_a&&(T=Ay(s,l,p,A)),Ey(n),T}function Ey(n){q.H=Wo;var s=tt!==null&&tt.next!==null;if(Wi=0,Lt=tt=Ie=null,Rc=!1,$o=0,ma=null,s)throw Error(i(300));n===null||Ot||(n=n.dependencies,n!==null&&Cc(n)&&(Ot=!0))}function Ay(n,s,l,p){Ie=n;var A=0;do{if(_a&&(ma=null),$o=0,_a=!1,25<=A)throw Error(i(301));if(A+=1,Lt=tt=null,n.updateQueue!=null){var T=n.updateQueue;T.lastEffect=null,T.events=null,T.stores=null,T.memoCache!=null&&(T.memoCache.index=0)}q.H=lb,T=s(l,p)}while(_a);return T}function HT(){var n=q.H,s=n.useState()[0];return s=typeof s.then=="function"?Uo(s):s,n=n.useState()[0],(tt!==null?tt.memoizedState:null)!==n&&(Ie.flags|=1024),s}function Ed(){var n=kc!==0;return kc=0,n}function Ad(n,s,l){s.updateQueue=n.updateQueue,s.flags&=-2053,n.lanes&=~l}function Md(n){if(Rc){for(n=n.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Rc=!1}Wi=0,Lt=tt=Ie=null,_a=!1,$o=kc=0,ma=null}function ur(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Lt===null?Ie.memoizedState=Lt=n:Lt=Lt.next=n,Lt}function At(){if(tt===null){var n=Ie.alternate;n=n!==null?n.memoizedState:null}else n=tt.next;var s=Lt===null?Ie.memoizedState:Lt.next;if(s!==null)Lt=s,tt=n;else{if(n===null)throw Ie.alternate===null?Error(i(467)):Error(i(310));tt=n,n={memoizedState:tt.memoizedState,baseState:tt.baseState,baseQueue:tt.baseQueue,queue:tt.queue,next:null},Lt===null?Ie.memoizedState=Lt=n:Lt=Lt.next=n}return Lt}function Pc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Uo(n){var s=$o;return $o+=1,ma===null&&(ma=[]),n=py(ma,n,s),s=Ie,(Lt===null?s.memoizedState:Lt.next)===null&&(s=s.alternate,q.H=s===null||s.memoizedState===null?ob:zd),n}function Bc(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Uo(n);if(n.$$typeof===S)return Jt(n)}throw Error(i(438,String(n)))}function Ld(n){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=Pc(),Ie.updateQueue=l),l.memoCache=s,l=s.data[s.index],l===void 0)for(l=s.data[s.index]=Array(n),p=0;p<n;p++)l[p]=k;return s.index++,l}function qi(n,s){return typeof s=="function"?s(n):s}function jc(n){var s=At();return Od(s,tt,n)}function Od(n,s,l){var p=n.queue;if(p===null)throw Error(i(311));p.lastRenderedReducer=l;var A=n.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=n.baseState,A===null)n.memoizedState=T;else{s=A.next;var K=I=null,J=null,oe=s,de=!1;do{var _e=oe.lane&-536870913;if(_e!==oe.lane?(Ue&_e)===_e:(Wi&_e)===_e){var ce=oe.revertLane;if(ce===0)J!==null&&(J=J.next={lane:0,revertLane:0,gesture:null,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null}),_e===fa&&(de=!0);else if((Wi&ce)===ce){oe=oe.next,ce===fa&&(de=!0);continue}else _e={lane:0,revertLane:oe.revertLane,gesture:null,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null},J===null?(K=J=_e,I=T):J=J.next=_e,Ie.lanes|=ce,Dn|=ce;_e=oe.action,ps&&l(T,_e),T=oe.hasEagerState?oe.eagerState:l(T,_e)}else ce={lane:_e,revertLane:oe.revertLane,gesture:oe.gesture,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null},J===null?(K=J=ce,I=T):J=J.next=ce,Ie.lanes|=_e,Dn|=_e;oe=oe.next}while(oe!==null&&oe!==s);if(J===null?I=T:J.next=K,!Ar(T,n.memoizedState)&&(Ot=!0,de&&(l=da,l!==null)))throw l;n.memoizedState=T,n.baseState=I,n.baseQueue=J,p.lastRenderedState=T}return A===null&&(p.lanes=0),[n.memoizedState,p.dispatch]}function Td(n){var s=At(),l=s.queue;if(l===null)throw Error(i(311));l.lastRenderedReducer=n;var p=l.dispatch,A=l.pending,T=s.memoizedState;if(A!==null){l.pending=null;var I=A=A.next;do T=n(T,I.action),I=I.next;while(I!==A);Ar(T,s.memoizedState)||(Ot=!0),s.memoizedState=T,s.baseQueue===null&&(s.baseState=T),l.lastRenderedState=T}return[T,p]}function My(n,s,l){var p=Ie,A=At(),T=qe;if(T){if(l===void 0)throw Error(i(407));l=l()}else l=s();var I=!Ar((tt||A).memoizedState,l);if(I&&(A.memoizedState=l,Ot=!0),A=A.queue,kd(Ty.bind(null,p,A,n),[n]),A.getSnapshot!==s||I||Lt!==null&&Lt.memoizedState.tag&1){if(p.flags|=2048,ya(9,{destroy:void 0},Oy.bind(null,p,A,l,s),null),st===null)throw Error(i(349));T||(Wi&127)!==0||Ly(p,s,l)}return l}function Ly(n,s,l){n.flags|=16384,n={getSnapshot:s,value:l},s=Ie.updateQueue,s===null?(s=Pc(),Ie.updateQueue=s,s.stores=[n]):(l=s.stores,l===null?s.stores=[n]:l.push(n))}function Oy(n,s,l,p){s.value=l,s.getSnapshot=p,Dy(s)&&Ry(n)}function Ty(n,s,l){return l(function(){Dy(s)&&Ry(n)})}function Dy(n){var s=n.getSnapshot;n=n.value;try{var l=s();return!Ar(n,l)}catch{return!0}}function Ry(n){var s=os(n,2);s!==null&&wr(s,n,2)}function Dd(n){var s=ur();if(typeof n=="function"){var l=n;if(n=l(),ps){Ut(!0);try{l()}finally{Ut(!1)}}}return s.memoizedState=s.baseState=n,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qi,lastRenderedState:n},s}function ky(n,s,l,p){return n.baseState=l,Od(n,tt,typeof p=="function"?p:qi)}function $T(n,s,l,p,A){if(zc(n))throw Error(i(485));if(n=s.action,n!==null){var T={payload:A,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(I){T.listeners.push(I)}};q.T!==null?l(!0):T.isTransition=!1,p(T),l=s.pending,l===null?(T.next=s.pending=T,Py(s,T)):(T.next=l.next,s.pending=l.next=T)}}function Py(n,s){var l=s.action,p=s.payload,A=n.state;if(s.isTransition){var T=q.T,I={};q.T=I;try{var K=l(A,p),J=q.S;J!==null&&J(I,K),By(n,s,K)}catch(oe){Rd(n,s,oe)}finally{T!==null&&I.types!==null&&(T.types=I.types),q.T=T}}else try{T=l(A,p),By(n,s,T)}catch(oe){Rd(n,s,oe)}}function By(n,s,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(p){jy(n,s,p)},function(p){return Rd(n,s,p)}):jy(n,s,l)}function jy(n,s,l){s.status="fulfilled",s.value=l,Iy(s),n.state=l,s=n.pending,s!==null&&(l=s.next,l===s?n.pending=null:(l=l.next,s.next=l,Py(n,l)))}function Rd(n,s,l){var p=n.pending;if(n.pending=null,p!==null){p=p.next;do s.status="rejected",s.reason=l,Iy(s),s=s.next;while(s!==p)}n.action=null}function Iy(n){n=n.listeners;for(var s=0;s<n.length;s++)(0,n[s])()}function Ny(n,s){return s}function zy(n,s){if(qe){var l=st.formState;if(l!==null){e:{var p=Ie;if(qe){if(ut){t:{for(var A=ut,T=Kr;A.nodeType!==8;){if(!T){A=null;break t}if(A=Vr(A.nextSibling),A===null){A=null;break t}}T=A.data,A=T==="F!"||T==="F"?A:null}if(A){ut=Vr(A.nextSibling),p=A.data==="F!";break e}}wn(p)}p=!1}p&&(s=l[0])}}return l=ur(),l.memoizedState=l.baseState=s,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ny,lastRenderedState:s},l.queue=p,l=nb.bind(null,Ie,p),p.dispatch=l,p=Dd(!1),T=Nd.bind(null,Ie,!1,p.queue),p=ur(),A={state:s,dispatch:null,action:n,pending:null},p.queue=A,l=$T.bind(null,Ie,A,T,l),A.dispatch=l,p.memoizedState=n,[s,l,!1]}function Hy(n){var s=At();return $y(s,tt,n)}function $y(n,s,l){if(s=Od(n,s,Ny)[0],n=jc(qi)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var p=Uo(s)}catch(I){throw I===va?Ac:I}else p=s;s=At();var A=s.queue,T=A.dispatch;return l!==s.memoizedState&&(Ie.flags|=2048,ya(9,{destroy:void 0},UT.bind(null,A,l),null)),[p,T,n]}function UT(n,s){n.action=s}function Uy(n){var s=At(),l=tt;if(l!==null)return $y(s,l,n);At(),s=s.memoizedState,l=At();var p=l.queue.dispatch;return l.memoizedState=n,[s,p,!1]}function ya(n,s,l,p){return n={tag:n,create:l,deps:p,inst:s,next:null},s=Ie.updateQueue,s===null&&(s=Pc(),Ie.updateQueue=s),l=s.lastEffect,l===null?s.lastEffect=n.next=n:(p=l.next,l.next=n,n.next=p,s.lastEffect=n),n}function Fy(){return At().memoizedState}function Ic(n,s,l,p){var A=ur();Ie.flags|=n,A.memoizedState=ya(1|s,{destroy:void 0},l,p===void 0?null:p)}function Nc(n,s,l,p){var A=At();p=p===void 0?null:p;var T=A.memoizedState.inst;tt!==null&&p!==null&&Cd(p,tt.memoizedState.deps)?A.memoizedState=ya(s,T,l,p):(Ie.flags|=n,A.memoizedState=ya(1|s,T,l,p))}function Wy(n,s){Ic(8390656,8,n,s)}function kd(n,s){Nc(2048,8,n,s)}function FT(n){Ie.flags|=4;var s=Ie.updateQueue;if(s===null)s=Pc(),Ie.updateQueue=s,s.events=[n];else{var l=s.events;l===null?s.events=[n]:l.push(n)}}function qy(n){var s=At().memoizedState;return FT({ref:s,nextImpl:n}),function(){if((Xe&2)!==0)throw Error(i(440));return s.impl.apply(void 0,arguments)}}function Gy(n,s){return Nc(4,2,n,s)}function Ky(n,s){return Nc(4,4,n,s)}function Yy(n,s){if(typeof s=="function"){n=n();var l=s(n);return function(){typeof l=="function"?l():s(null)}}if(s!=null)return n=n(),s.current=n,function(){s.current=null}}function Vy(n,s,l){l=l!=null?l.concat([n]):null,Nc(4,4,Yy.bind(null,s,n),l)}function Pd(){}function Xy(n,s){var l=At();s=s===void 0?null:s;var p=l.memoizedState;return s!==null&&Cd(s,p[1])?p[0]:(l.memoizedState=[n,s],n)}function Zy(n,s){var l=At();s=s===void 0?null:s;var p=l.memoizedState;if(s!==null&&Cd(s,p[1]))return p[0];if(p=n(),ps){Ut(!0);try{n()}finally{Ut(!1)}}return l.memoizedState=[p,s],p}function Bd(n,s,l){return l===void 0||(Wi&1073741824)!==0&&(Ue&261930)===0?n.memoizedState=s:(n.memoizedState=l,n=Qb(),Ie.lanes|=n,Dn|=n,l)}function Qy(n,s,l,p){return Ar(l,s)?l:pa.current!==null?(n=Bd(n,l,p),Ar(n,s)||(Ot=!0),n):(Wi&42)===0||(Wi&1073741824)!==0&&(Ue&261930)===0?(Ot=!0,n.memoizedState=l):(n=Qb(),Ie.lanes|=n,Dn|=n,s)}function Jy(n,s,l,p,A){var T=Y.p;Y.p=T!==0&&8>T?T:8;var I=q.T,K={};q.T=K,Nd(n,!1,s,l);try{var J=A(),oe=q.S;if(oe!==null&&oe(K,J),J!==null&&typeof J=="object"&&typeof J.then=="function"){var de=NT(J,p);Fo(n,s,de,Rr(n))}else Fo(n,s,p,Rr(n))}catch(_e){Fo(n,s,{then:function(){},status:"rejected",reason:_e},Rr())}finally{Y.p=T,I!==null&&K.types!==null&&(I.types=K.types),q.T=I}}function WT(){}function jd(n,s,l,p){if(n.tag!==5)throw Error(i(476));var A=eb(n).queue;Jy(n,A,s,W,l===null?WT:function(){return tb(n),l(p)})}function eb(n){var s=n.memoizedState;if(s!==null)return s;s={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qi,lastRenderedState:W},next:null};var l={};return s.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qi,lastRenderedState:l},next:null},n.memoizedState=s,n=n.alternate,n!==null&&(n.memoizedState=s),s}function tb(n){var s=eb(n);s.next===null&&(s=n.alternate.memoizedState),Fo(n,s.next.queue,{},Rr())}function Id(){return Jt(al)}function rb(){return At().memoizedState}function ib(){return At().memoizedState}function qT(n){for(var s=n.return;s!==null;){switch(s.tag){case 24:case 3:var l=Rr();n=En(l);var p=An(s,n,l);p!==null&&(wr(p,s,l),No(p,s,l)),s={cache:fd()},n.payload=s;return}s=s.return}}function GT(n,s,l){var p=Rr();l={lane:p,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},zc(n)?sb(s,l):(l=td(n,s,l,p),l!==null&&(wr(l,n,p),ab(l,s,p)))}function nb(n,s,l){var p=Rr();Fo(n,s,l,p)}function Fo(n,s,l,p){var A={lane:p,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(zc(n))sb(s,A);else{var T=n.alternate;if(n.lanes===0&&(T===null||T.lanes===0)&&(T=s.lastRenderedReducer,T!==null))try{var I=s.lastRenderedState,K=T(I,l);if(A.hasEagerState=!0,A.eagerState=K,Ar(K,I))return yc(n,s,A,0),st===null&&mc(),!1}catch{}finally{}if(l=td(n,s,A,p),l!==null)return wr(l,n,p),ab(l,s,p),!0}return!1}function Nd(n,s,l,p){if(p={lane:2,revertLane:pv(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},zc(n)){if(s)throw Error(i(479))}else s=td(n,l,p,2),s!==null&&wr(s,n,2)}function zc(n){var s=n.alternate;return n===Ie||s!==null&&s===Ie}function sb(n,s){_a=Rc=!0;var l=n.pending;l===null?s.next=s:(s.next=l.next,l.next=s),n.pending=s}function ab(n,s,l){if((l&4194048)!==0){var p=s.lanes;p&=n.pendingLanes,l|=p,s.lanes=l,h0(n,l)}}var Wo={readContext:Jt,use:Bc,useCallback:bt,useContext:bt,useEffect:bt,useImperativeHandle:bt,useLayoutEffect:bt,useInsertionEffect:bt,useMemo:bt,useReducer:bt,useRef:bt,useState:bt,useDebugValue:bt,useDeferredValue:bt,useTransition:bt,useSyncExternalStore:bt,useId:bt,useHostTransitionStatus:bt,useFormState:bt,useActionState:bt,useOptimistic:bt,useMemoCache:bt,useCacheRefresh:bt};Wo.useEffectEvent=bt;var ob={readContext:Jt,use:Bc,useCallback:function(n,s){return ur().memoizedState=[n,s===void 0?null:s],n},useContext:Jt,useEffect:Wy,useImperativeHandle:function(n,s,l){l=l!=null?l.concat([n]):null,Ic(4194308,4,Yy.bind(null,s,n),l)},useLayoutEffect:function(n,s){return Ic(4194308,4,n,s)},useInsertionEffect:function(n,s){Ic(4,2,n,s)},useMemo:function(n,s){var l=ur();s=s===void 0?null:s;var p=n();if(ps){Ut(!0);try{n()}finally{Ut(!1)}}return l.memoizedState=[p,s],p},useReducer:function(n,s,l){var p=ur();if(l!==void 0){var A=l(s);if(ps){Ut(!0);try{l(s)}finally{Ut(!1)}}}else A=s;return p.memoizedState=p.baseState=A,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:A},p.queue=n,n=n.dispatch=GT.bind(null,Ie,n),[p.memoizedState,n]},useRef:function(n){var s=ur();return n={current:n},s.memoizedState=n},useState:function(n){n=Dd(n);var s=n.queue,l=nb.bind(null,Ie,s);return s.dispatch=l,[n.memoizedState,l]},useDebugValue:Pd,useDeferredValue:function(n,s){var l=ur();return Bd(l,n,s)},useTransition:function(){var n=Dd(!1);return n=Jy.bind(null,Ie,n.queue,!0,!1),ur().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,s,l){var p=Ie,A=ur();if(qe){if(l===void 0)throw Error(i(407));l=l()}else{if(l=s(),st===null)throw Error(i(349));(Ue&127)!==0||Ly(p,s,l)}A.memoizedState=l;var T={value:l,getSnapshot:s};return A.queue=T,Wy(Ty.bind(null,p,T,n),[n]),p.flags|=2048,ya(9,{destroy:void 0},Oy.bind(null,p,T,l,s),null),l},useId:function(){var n=ur(),s=st.identifierPrefix;if(qe){var l=Si,p=bi;l=(p&~(1<<32-kt(p)-1)).toString(32)+l,s="_"+s+"R_"+l,l=kc++,0<l&&(s+="H"+l.toString(32)),s+="_"}else l=zT++,s="_"+s+"r_"+l.toString(32)+"_";return n.memoizedState=s},useHostTransitionStatus:Id,useFormState:zy,useActionState:zy,useOptimistic:function(n){var s=ur();s.memoizedState=s.baseState=n;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=l,s=Nd.bind(null,Ie,!0,l),l.dispatch=s,[n,s]},useMemoCache:Ld,useCacheRefresh:function(){return ur().memoizedState=qT.bind(null,Ie)},useEffectEvent:function(n){var s=ur(),l={impl:n};return s.memoizedState=l,function(){if((Xe&2)!==0)throw Error(i(440));return l.impl.apply(void 0,arguments)}}},zd={readContext:Jt,use:Bc,useCallback:Xy,useContext:Jt,useEffect:kd,useImperativeHandle:Vy,useInsertionEffect:Gy,useLayoutEffect:Ky,useMemo:Zy,useReducer:jc,useRef:Fy,useState:function(){return jc(qi)},useDebugValue:Pd,useDeferredValue:function(n,s){var l=At();return Qy(l,tt.memoizedState,n,s)},useTransition:function(){var n=jc(qi)[0],s=At().memoizedState;return[typeof n=="boolean"?n:Uo(n),s]},useSyncExternalStore:My,useId:rb,useHostTransitionStatus:Id,useFormState:Hy,useActionState:Hy,useOptimistic:function(n,s){var l=At();return ky(l,tt,n,s)},useMemoCache:Ld,useCacheRefresh:ib};zd.useEffectEvent=qy;var lb={readContext:Jt,use:Bc,useCallback:Xy,useContext:Jt,useEffect:kd,useImperativeHandle:Vy,useInsertionEffect:Gy,useLayoutEffect:Ky,useMemo:Zy,useReducer:Td,useRef:Fy,useState:function(){return Td(qi)},useDebugValue:Pd,useDeferredValue:function(n,s){var l=At();return tt===null?Bd(l,n,s):Qy(l,tt.memoizedState,n,s)},useTransition:function(){var n=Td(qi)[0],s=At().memoizedState;return[typeof n=="boolean"?n:Uo(n),s]},useSyncExternalStore:My,useId:rb,useHostTransitionStatus:Id,useFormState:Uy,useActionState:Uy,useOptimistic:function(n,s){var l=At();return tt!==null?ky(l,tt,n,s):(l.baseState=n,[n,l.queue.dispatch])},useMemoCache:Ld,useCacheRefresh:ib};lb.useEffectEvent=qy;function Hd(n,s,l,p){s=n.memoizedState,l=l(p,s),l=l==null?s:u({},s,l),n.memoizedState=l,n.lanes===0&&(n.updateQueue.baseState=l)}var $d={enqueueSetState:function(n,s,l){n=n._reactInternals;var p=Rr(),A=En(p);A.payload=s,l!=null&&(A.callback=l),s=An(n,A,p),s!==null&&(wr(s,n,p),No(s,n,p))},enqueueReplaceState:function(n,s,l){n=n._reactInternals;var p=Rr(),A=En(p);A.tag=1,A.payload=s,l!=null&&(A.callback=l),s=An(n,A,p),s!==null&&(wr(s,n,p),No(s,n,p))},enqueueForceUpdate:function(n,s){n=n._reactInternals;var l=Rr(),p=En(l);p.tag=2,s!=null&&(p.callback=s),s=An(n,p,l),s!==null&&(wr(s,n,l),No(s,n,l))}};function cb(n,s,l,p,A,T,I){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(p,T,I):s.prototype&&s.prototype.isPureReactComponent?!To(l,p)||!To(A,T):!0}function ub(n,s,l,p){n=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,p),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,p),s.state!==n&&$d.enqueueReplaceState(s,s.state,null)}function _s(n,s){var l=s;if("ref"in s){l={};for(var p in s)p!=="ref"&&(l[p]=s[p])}if(n=n.defaultProps){l===s&&(l=u({},l));for(var A in n)l[A]===void 0&&(l[A]=n[A])}return l}function hb(n){_c(n)}function fb(n){console.error(n)}function db(n){_c(n)}function Hc(n,s){try{var l=n.onUncaughtError;l(s.value,{componentStack:s.stack})}catch(p){setTimeout(function(){throw p})}}function vb(n,s,l){try{var p=n.onCaughtError;p(l.value,{componentStack:l.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(A){setTimeout(function(){throw A})}}function Ud(n,s,l){return l=En(l),l.tag=3,l.payload={element:null},l.callback=function(){Hc(n,s)},l}function gb(n){return n=En(n),n.tag=3,n}function pb(n,s,l,p){var A=l.type.getDerivedStateFromError;if(typeof A=="function"){var T=p.value;n.payload=function(){return A(T)},n.callback=function(){vb(s,l,p)}}var I=l.stateNode;I!==null&&typeof I.componentDidCatch=="function"&&(n.callback=function(){vb(s,l,p),typeof A!="function"&&(Rn===null?Rn=new Set([this]):Rn.add(this));var K=p.stack;this.componentDidCatch(p.value,{componentStack:K!==null?K:""})})}function KT(n,s,l,p,A){if(l.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(s=l.alternate,s!==null&&ha(s,l,A,!0),l=Lr.current,l!==null){switch(l.tag){case 31:case 13:return Yr===null?Qc():l.alternate===null&&St===0&&(St=3),l.flags&=-257,l.flags|=65536,l.lanes=A,p===Mc?l.flags|=16384:(s=l.updateQueue,s===null?l.updateQueue=new Set([p]):s.add(p),dv(n,p,A)),!1;case 22:return l.flags|=65536,p===Mc?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)),dv(n,p,A)),!1}throw Error(i(435,l.tag))}return dv(n,p,A),Qc(),!1}if(qe)return s=Lr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=A,p!==od&&(n=Error(i(422),{cause:p}),ko(Wr(n,l)))):(p!==od&&(s=Error(i(423),{cause:p}),ko(Wr(s,l))),n=n.current.alternate,n.flags|=65536,A&=-A,n.lanes|=A,p=Wr(p,l),A=Ud(n.stateNode,p,A),md(n,A),St!==4&&(St=2)),!1;var T=Error(i(520),{cause:p});if(T=Wr(T,l),Qo===null?Qo=[T]:Qo.push(T),St!==4&&(St=2),s===null)return!0;p=Wr(p,l),l=s;do{switch(l.tag){case 3:return l.flags|=65536,n=A&-A,l.lanes|=n,n=Ud(l.stateNode,p,n),md(l,n),!1;case 1:if(s=l.type,T=l.stateNode,(l.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(Rn===null||!Rn.has(T))))return l.flags|=65536,A&=-A,l.lanes|=A,A=gb(A),pb(A,n,l,p),md(l,A),!1}l=l.return}while(l!==null);return!1}var Fd=Error(i(461)),Ot=!1;function er(n,s,l,p){s.child=n===null?by(s,null,l,p):gs(s,n.child,l,p)}function _b(n,s,l,p,A){l=l.render;var T=s.ref;if("ref"in p){var I={};for(var K in p)K!=="ref"&&(I[K]=p[K])}else I=p;return hs(s),p=xd(n,s,l,I,T,A),K=Ed(),n!==null&&!Ot?(Ad(n,s,A),Gi(n,s,A)):(qe&&K&&sd(s),s.flags|=1,er(n,s,p,A),s.child)}function mb(n,s,l,p,A){if(n===null){var T=l.type;return typeof T=="function"&&!rd(T)&&T.defaultProps===void 0&&l.compare===null?(s.tag=15,s.type=T,yb(n,s,T,p,A)):(n=Sc(l.type,null,p,s,s.mode,A),n.ref=s.ref,n.return=s,s.child=n)}if(T=n.child,!Zd(n,A)){var I=T.memoizedProps;if(l=l.compare,l=l!==null?l:To,l(I,p)&&n.ref===s.ref)return Gi(n,s,A)}return s.flags|=1,n=Hi(T,p),n.ref=s.ref,n.return=s,s.child=n}function yb(n,s,l,p,A){if(n!==null){var T=n.memoizedProps;if(To(T,p)&&n.ref===s.ref)if(Ot=!1,s.pendingProps=p=T,Zd(n,A))(n.flags&131072)!==0&&(Ot=!0);else return s.lanes=n.lanes,Gi(n,s,A)}return Wd(n,s,l,p,A)}function bb(n,s,l,p){var A=p.children,T=n!==null?n.memoizedState:null;if(n===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,n!==null){for(p=s.child=n.child,A=0;p!==null;)A=A|p.lanes|p.childLanes,p=p.sibling;p=A&~T}else p=0,s.child=null;return Sb(n,s,T,l,p)}if((l&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},n!==null&&Ec(s,T!==null?T.cachePool:null),T!==null?Cy(s,T):bd(),xy(s);else return p=s.lanes=536870912,Sb(n,s,T!==null?T.baseLanes|l:l,l,p)}else T!==null?(Ec(s,T.cachePool),Cy(s,T),Ln(),s.memoizedState=null):(n!==null&&Ec(s,null),bd(),Ln());return er(n,s,A,l),s.child}function qo(n,s){return n!==null&&n.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function Sb(n,s,l,p,A){var T=vd();return T=T===null?null:{parent:Mt._currentValue,pool:T},s.memoizedState={baseLanes:l,cachePool:T},n!==null&&Ec(s,null),bd(),xy(s),n!==null&&ha(n,s,p,!0),s.childLanes=A,null}function $c(n,s){return s=Fc({mode:s.mode,children:s.children},n.mode),s.ref=n.ref,n.child=s,s.return=n,s}function wb(n,s,l){return gs(s,n.child,null,l),n=$c(s,s.pendingProps),n.flags|=2,Or(s),s.memoizedState=null,n}function YT(n,s,l){var p=s.pendingProps,A=(s.flags&128)!==0;if(s.flags&=-129,n===null){if(qe){if(p.mode==="hidden")return n=$c(s,p),s.lanes=536870912,qo(null,n);if(wd(s),(n=ut)?(n=P1(n,Kr),n=n!==null&&n.data==="&"?n:null,n!==null&&(s.memoizedState={dehydrated:n,treeContext:bn!==null?{id:bi,overflow:Si}:null,retryLane:536870912,hydrationErrors:null},l=sy(n),l.return=s,s.child=l,Qt=s,ut=null)):n=null,n===null)throw wn(s);return s.lanes=536870912,null}return $c(s,p)}var T=n.memoizedState;if(T!==null){var I=T.dehydrated;if(wd(s),A)if(s.flags&256)s.flags&=-257,s=wb(n,s,l);else if(s.memoizedState!==null)s.child=n.child,s.flags|=128,s=null;else throw Error(i(558));else if(Ot||ha(n,s,l,!1),A=(l&n.childLanes)!==0,Ot||A){if(p=st,p!==null&&(I=f0(p,l),I!==0&&I!==T.retryLane))throw T.retryLane=I,os(n,I),wr(p,n,I),Fd;Qc(),s=wb(n,s,l)}else n=T.treeContext,ut=Vr(I.nextSibling),Qt=s,qe=!0,Sn=null,Kr=!1,n!==null&&ly(s,n),s=$c(s,p),s.flags|=4096;return s}return n=Hi(n.child,{mode:p.mode,children:p.children}),n.ref=s.ref,s.child=n,n.return=s,n}function Uc(n,s){var l=s.ref;if(l===null)n!==null&&n.ref!==null&&(s.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(i(284));(n===null||n.ref!==l)&&(s.flags|=4194816)}}function Wd(n,s,l,p,A){return hs(s),l=xd(n,s,l,p,void 0,A),p=Ed(),n!==null&&!Ot?(Ad(n,s,A),Gi(n,s,A)):(qe&&p&&sd(s),s.flags|=1,er(n,s,l,A),s.child)}function Cb(n,s,l,p,A,T){return hs(s),s.updateQueue=null,l=Ay(s,p,l,A),Ey(n),p=Ed(),n!==null&&!Ot?(Ad(n,s,T),Gi(n,s,T)):(qe&&p&&sd(s),s.flags|=1,er(n,s,l,T),s.child)}function xb(n,s,l,p,A){if(hs(s),s.stateNode===null){var T=oa,I=l.contextType;typeof I=="object"&&I!==null&&(T=Jt(I)),T=new l(p,T),s.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,T.updater=$d,s.stateNode=T,T._reactInternals=s,T=s.stateNode,T.props=p,T.state=s.memoizedState,T.refs={},pd(s),I=l.contextType,T.context=typeof I=="object"&&I!==null?Jt(I):oa,T.state=s.memoizedState,I=l.getDerivedStateFromProps,typeof I=="function"&&(Hd(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&&$d.enqueueReplaceState(T,T.state,null),Ho(s,p,T,A),zo(),T.state=s.memoizedState),typeof T.componentDidMount=="function"&&(s.flags|=4194308),p=!0}else if(n===null){T=s.stateNode;var K=s.memoizedProps,J=_s(l,K);T.props=J;var oe=T.context,de=l.contextType;I=oa,typeof de=="object"&&de!==null&&(I=Jt(de));var _e=l.getDerivedStateFromProps;de=typeof _e=="function"||typeof T.getSnapshotBeforeUpdate=="function",K=s.pendingProps!==K,de||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(K||oe!==I)&&ub(s,T,p,I),xn=!1;var ce=s.memoizedState;T.state=ce,Ho(s,p,T,A),zo(),oe=s.memoizedState,K||ce!==oe||xn?(typeof _e=="function"&&(Hd(s,l,_e,p),oe=s.memoizedState),(J=xn||cb(s,l,J,p,ce,oe,I))?(de||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=oe),T.props=p,T.state=oe,T.context=I,p=J):(typeof T.componentDidMount=="function"&&(s.flags|=4194308),p=!1)}else{T=s.stateNode,_d(n,s),I=s.memoizedProps,de=_s(l,I),T.props=de,_e=s.pendingProps,ce=T.context,oe=l.contextType,J=oa,typeof oe=="object"&&oe!==null&&(J=Jt(oe)),K=l.getDerivedStateFromProps,(oe=typeof K=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(I!==_e||ce!==J)&&ub(s,T,p,J),xn=!1,ce=s.memoizedState,T.state=ce,Ho(s,p,T,A),zo();var ue=s.memoizedState;I!==_e||ce!==ue||xn||n!==null&&n.dependencies!==null&&Cc(n.dependencies)?(typeof K=="function"&&(Hd(s,l,K,p),ue=s.memoizedState),(de=xn||cb(s,l,de,p,ce,ue,J)||n!==null&&n.dependencies!==null&&Cc(n.dependencies))?(oe||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(p,ue,J),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(p,ue,J)),typeof T.componentDidUpdate=="function"&&(s.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof T.componentDidUpdate!="function"||I===n.memoizedProps&&ce===n.memoizedState||(s.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||I===n.memoizedProps&&ce===n.memoizedState||(s.flags|=1024),s.memoizedProps=p,s.memoizedState=ue),T.props=p,T.state=ue,T.context=J,p=de):(typeof T.componentDidUpdate!="function"||I===n.memoizedProps&&ce===n.memoizedState||(s.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||I===n.memoizedProps&&ce===n.memoizedState||(s.flags|=1024),p=!1)}return T=p,Uc(n,s),p=(s.flags&128)!==0,T||p?(T=s.stateNode,l=p&&typeof l.getDerivedStateFromError!="function"?null:T.render(),s.flags|=1,n!==null&&p?(s.child=gs(s,n.child,null,A),s.child=gs(s,null,l,A)):er(n,s,l,A),s.memoizedState=T.state,n=s.child):n=Gi(n,s,A),n}function Eb(n,s,l,p){return cs(),s.flags|=256,er(n,s,l,p),s.child}var qd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Gd(n){return{baseLanes:n,cachePool:vy()}}function Kd(n,s,l){return n=n!==null?n.childLanes&~l:0,s&&(n|=Dr),n}function Ab(n,s,l){var p=s.pendingProps,A=!1,T=(s.flags&128)!==0,I;if((I=T)||(I=n!==null&&n.memoizedState===null?!1:(Et.current&2)!==0),I&&(A=!0,s.flags&=-129),I=(s.flags&32)!==0,s.flags&=-33,n===null){if(qe){if(A?Mn(s):Ln(),(n=ut)?(n=P1(n,Kr),n=n!==null&&n.data!=="&"?n:null,n!==null&&(s.memoizedState={dehydrated:n,treeContext:bn!==null?{id:bi,overflow:Si}:null,retryLane:536870912,hydrationErrors:null},l=sy(n),l.return=s,s.child=l,Qt=s,ut=null)):n=null,n===null)throw wn(s);return Ov(n)?s.lanes=32:s.lanes=536870912,null}var K=p.children;return p=p.fallback,A?(Ln(),A=s.mode,K=Fc({mode:"hidden",children:K},A),p=ls(p,A,l,null),K.return=s,p.return=s,K.sibling=p,s.child=K,p=s.child,p.memoizedState=Gd(l),p.childLanes=Kd(n,I,l),s.memoizedState=qd,qo(null,p)):(Mn(s),Yd(s,K))}var J=n.memoizedState;if(J!==null&&(K=J.dehydrated,K!==null)){if(T)s.flags&256?(Mn(s),s.flags&=-257,s=Vd(n,s,l)):s.memoizedState!==null?(Ln(),s.child=n.child,s.flags|=128,s=null):(Ln(),K=p.fallback,A=s.mode,p=Fc({mode:"visible",children:p.children},A),K=ls(K,A,l,null),K.flags|=2,p.return=s,K.return=s,p.sibling=K,s.child=p,gs(s,n.child,null,l),p=s.child,p.memoizedState=Gd(l),p.childLanes=Kd(n,I,l),s.memoizedState=qd,s=qo(null,p));else if(Mn(s),Ov(K)){if(I=K.nextSibling&&K.nextSibling.dataset,I)var oe=I.dgst;I=oe,p=Error(i(419)),p.stack="",p.digest=I,ko({value:p,source:null,stack:null}),s=Vd(n,s,l)}else if(Ot||ha(n,s,l,!1),I=(l&n.childLanes)!==0,Ot||I){if(I=st,I!==null&&(p=f0(I,l),p!==0&&p!==J.retryLane))throw J.retryLane=p,os(n,p),wr(I,n,p),Fd;Lv(K)||Qc(),s=Vd(n,s,l)}else Lv(K)?(s.flags|=192,s.child=n.child,s=null):(n=J.treeContext,ut=Vr(K.nextSibling),Qt=s,qe=!0,Sn=null,Kr=!1,n!==null&&ly(s,n),s=Yd(s,p.children),s.flags|=4096);return s}return A?(Ln(),K=p.fallback,A=s.mode,J=n.child,oe=J.sibling,p=Hi(J,{mode:"hidden",children:p.children}),p.subtreeFlags=J.subtreeFlags&65011712,oe!==null?K=Hi(oe,K):(K=ls(K,A,l,null),K.flags|=2),K.return=s,p.return=s,p.sibling=K,s.child=p,qo(null,p),p=s.child,K=n.child.memoizedState,K===null?K=Gd(l):(A=K.cachePool,A!==null?(J=Mt._currentValue,A=A.parent!==J?{parent:J,pool:J}:A):A=vy(),K={baseLanes:K.baseLanes|l,cachePool:A}),p.memoizedState=K,p.childLanes=Kd(n,I,l),s.memoizedState=qd,qo(n.child,p)):(Mn(s),l=n.child,n=l.sibling,l=Hi(l,{mode:"visible",children:p.children}),l.return=s,l.sibling=null,n!==null&&(I=s.deletions,I===null?(s.deletions=[n],s.flags|=16):I.push(n)),s.child=l,s.memoizedState=null,l)}function Yd(n,s){return s=Fc({mode:"visible",children:s},n.mode),s.return=n,n.child=s}function Fc(n,s){return n=Mr(22,n,null,s),n.lanes=0,n}function Vd(n,s,l){return gs(s,n.child,null,l),n=Yd(s,s.pendingProps.children),n.flags|=2,s.memoizedState=null,n}function Mb(n,s,l){n.lanes|=s;var p=n.alternate;p!==null&&(p.lanes|=s),ud(n.return,s,l)}function Xd(n,s,l,p,A,T){var I=n.memoizedState;I===null?n.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 Lb(n,s,l){var p=s.pendingProps,A=p.revealOrder,T=p.tail;p=p.children;var I=Et.current,K=(I&2)!==0;if(K?(I=I&1|2,s.flags|=128):I&=1,Z(Et,I),er(n,s,p,l),p=qe?Ro:0,!K&&n!==null&&(n.flags&128)!==0)e:for(n=s.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Mb(n,l,s);else if(n.tag===19)Mb(n,l,s);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===s)break e;for(;n.sibling===null;){if(n.return===null||n.return===s)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(A){case"forwards":for(l=s.child,A=null;l!==null;)n=l.alternate,n!==null&&Dc(n)===null&&(A=l),l=l.sibling;l=A,l===null?(A=s.child,s.child=null):(A=l.sibling,l.sibling=null),Xd(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(n=A.alternate,n!==null&&Dc(n)===null){s.child=A;break}n=A.sibling,A.sibling=l,l=A,A=n}Xd(s,!0,l,null,T,p);break;case"together":Xd(s,!1,null,null,void 0,p);break;default:s.memoizedState=null}return s.child}function Gi(n,s,l){if(n!==null&&(s.dependencies=n.dependencies),Dn|=s.lanes,(l&s.childLanes)===0)if(n!==null){if(ha(n,s,l,!1),(l&s.childLanes)===0)return null}else return null;if(n!==null&&s.child!==n.child)throw Error(i(153));if(s.child!==null){for(n=s.child,l=Hi(n,n.pendingProps),s.child=l,l.return=s;n.sibling!==null;)n=n.sibling,l=l.sibling=Hi(n,n.pendingProps),l.return=s;l.sibling=null}return s.child}function Zd(n,s){return(n.lanes&s)!==0?!0:(n=n.dependencies,!!(n!==null&&Cc(n)))}function VT(n,s,l){switch(s.tag){case 3:G(s,s.stateNode.containerInfo),Cn(s,Mt,n.memoizedState.cache),cs();break;case 27:case 5:Q(s);break;case 4:G(s,s.stateNode.containerInfo);break;case 10:Cn(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,wd(s),null;break;case 13:var p=s.memoizedState;if(p!==null)return p.dehydrated!==null?(Mn(s),s.flags|=128,null):(l&s.child.childLanes)!==0?Ab(n,s,l):(Mn(s),n=Gi(n,s,l),n!==null?n.sibling:null);Mn(s);break;case 19:var A=(n.flags&128)!==0;if(p=(l&s.childLanes)!==0,p||(ha(n,s,l,!1),p=(l&s.childLanes)!==0),A){if(p)return Lb(n,s,l);s.flags|=128}if(A=s.memoizedState,A!==null&&(A.rendering=null,A.tail=null,A.lastEffect=null),Z(Et,Et.current),p)break;return null;case 22:return s.lanes=0,bb(n,s,l,s.pendingProps);case 24:Cn(s,Mt,n.memoizedState.cache)}return Gi(n,s,l)}function Ob(n,s,l){if(n!==null)if(n.memoizedProps!==s.pendingProps)Ot=!0;else{if(!Zd(n,l)&&(s.flags&128)===0)return Ot=!1,VT(n,s,l);Ot=(n.flags&131072)!==0}else Ot=!1,qe&&(s.flags&1048576)!==0&&oy(s,Ro,s.index);switch(s.lanes=0,s.tag){case 16:e:{var p=s.pendingProps;if(n=ds(s.elementType),s.type=n,typeof n=="function")rd(n)?(p=_s(n,p),s.tag=1,s=xb(null,s,n,p,l)):(s.tag=0,s=Wd(null,s,n,p,l));else{if(n!=null){var A=n.$$typeof;if(A===E){s.tag=11,s=_b(null,s,n,p,l);break e}else if(A===O){s.tag=14,s=mb(null,s,n,p,l);break e}}throw s=U(n)||n,Error(i(306,s,""))}}return s;case 0:return Wd(n,s,s.type,s.pendingProps,l);case 1:return p=s.type,A=_s(p,s.pendingProps),xb(n,s,p,A,l);case 3:e:{if(G(s,s.stateNode.containerInfo),n===null)throw Error(i(387));p=s.pendingProps;var T=s.memoizedState;A=T.element,_d(n,s),Ho(s,p,null,l);var I=s.memoizedState;if(p=I.cache,Cn(s,Mt,p),p!==T.cache&&hd(s,[Mt],l,!0),zo(),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=Eb(n,s,p,l);break e}else if(p!==A){A=Wr(Error(i(424)),s),ko(A),s=Eb(n,s,p,l);break e}else{switch(n=s.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}for(ut=Vr(n.firstChild),Qt=s,qe=!0,Sn=null,Kr=!0,l=by(s,null,p,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(cs(),p===A){s=Gi(n,s,l);break e}er(n,s,p,l)}s=s.child}return s;case 26:return Uc(n,s),n===null?(l=H1(s.type,null,s.pendingProps,null))?s.memoizedState=l:qe||(l=s.type,n=s.pendingProps,p=su(ge.current).createElement(l),p[Zt]=s,p[pr]=n,tr(p,l,n),Ft(p),s.stateNode=p):s.memoizedState=H1(s.type,n.memoizedProps,s.pendingProps,n.memoizedState),null;case 27:return Q(s),n===null&&qe&&(p=s.stateNode=I1(s.type,s.pendingProps,ge.current),Qt=s,Kr=!0,A=ut,jn(s.type)?(Tv=A,ut=Vr(p.firstChild)):ut=A),er(n,s,s.pendingProps.children,l),Uc(n,s),n===null&&(s.flags|=4194304),s.child;case 5:return n===null&&qe&&((A=p=ut)&&(p=ED(p,s.type,s.pendingProps,Kr),p!==null?(s.stateNode=p,Qt=s,ut=Vr(p.firstChild),Kr=!1,A=!0):A=!1),A||wn(s)),Q(s),A=s.type,T=s.pendingProps,I=n!==null?n.memoizedProps:null,p=T.children,Ev(A,T)?p=null:I!==null&&Ev(A,I)&&(s.flags|=32),s.memoizedState!==null&&(A=xd(n,s,HT,null,null,l),al._currentValue=A),Uc(n,s),er(n,s,p,l),s.child;case 6:return n===null&&qe&&((n=l=ut)&&(l=AD(l,s.pendingProps,Kr),l!==null?(s.stateNode=l,Qt=s,ut=null,n=!0):n=!1),n||wn(s)),null;case 13:return Ab(n,s,l);case 4:return G(s,s.stateNode.containerInfo),p=s.pendingProps,n===null?s.child=gs(s,null,p,l):er(n,s,p,l),s.child;case 11:return _b(n,s,s.type,s.pendingProps,l);case 7:return er(n,s,s.pendingProps,l),s.child;case 8:return er(n,s,s.pendingProps.children,l),s.child;case 12:return er(n,s,s.pendingProps.children,l),s.child;case 10:return p=s.pendingProps,Cn(s,s.type,p.value),er(n,s,p.children,l),s.child;case 9:return A=s.type._context,p=s.pendingProps.children,hs(s),A=Jt(A),p=p(A),s.flags|=1,er(n,s,p,l),s.child;case 14:return mb(n,s,s.type,s.pendingProps,l);case 15:return yb(n,s,s.type,s.pendingProps,l);case 19:return Lb(n,s,l);case 31:return YT(n,s,l);case 22:return bb(n,s,l,s.pendingProps);case 24:return hs(s),p=Jt(Mt),n===null?(A=vd(),A===null&&(A=st,T=fd(),A.pooledCache=T,T.refCount++,T!==null&&(A.pooledCacheLanes|=l),A=T),s.memoizedState={parent:p,cache:A},pd(s),Cn(s,Mt,A)):((n.lanes&l)!==0&&(_d(n,s),Ho(s,null,null,l),zo()),A=n.memoizedState,T=s.memoizedState,A.parent!==p?(A={parent:p,cache:p},s.memoizedState=A,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=A),Cn(s,Mt,p)):(p=T.cache,Cn(s,Mt,p),p!==A.cache&&hd(s,[Mt],l,!0))),er(n,s,s.pendingProps.children,l),s.child;case 29:throw s.pendingProps}throw Error(i(156,s.tag))}function Ki(n){n.flags|=4}function Qd(n,s,l,p,A){if((s=(n.mode&32)!==0)&&(s=!1),s){if(n.flags|=16777216,(A&335544128)===A)if(n.stateNode.complete)n.flags|=8192;else if(r1())n.flags|=8192;else throw vs=Mc,gd}else n.flags&=-16777217}function Tb(n,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!q1(s))if(r1())n.flags|=8192;else throw vs=Mc,gd}function Wc(n,s){s!==null&&(n.flags|=4),n.flags&16384&&(s=n.tag!==22?c0():536870912,n.lanes|=s,Ca|=s)}function Go(n,s){if(!qe)switch(n.tailMode){case"hidden":s=n.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?n.tail=null:l.sibling=null;break;case"collapsed":l=n.tail;for(var p=null;l!==null;)l.alternate!==null&&(p=l),l=l.sibling;p===null?s||n.tail===null?n.tail=null:n.tail.sibling=null:p.sibling=null}}function ht(n){var s=n.alternate!==null&&n.alternate.child===n.child,l=0,p=0;if(s)for(var A=n.child;A!==null;)l|=A.lanes|A.childLanes,p|=A.subtreeFlags&65011712,p|=A.flags&65011712,A.return=n,A=A.sibling;else for(A=n.child;A!==null;)l|=A.lanes|A.childLanes,p|=A.subtreeFlags,p|=A.flags,A.return=n,A=A.sibling;return n.subtreeFlags|=p,n.childLanes=l,s}function XT(n,s,l){var p=s.pendingProps;switch(ad(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,n!==null&&(p=n.memoizedState.cache),s.memoizedState.cache!==p&&(s.flags|=2048),Fi(Mt),ee(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(n===null||n.child===null)&&(ua(s)?Ki(s):n===null||n.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,ld())),ht(s),null;case 26:var A=s.type,T=s.memoizedState;return n===null?(Ki(s),T!==null?(ht(s),Tb(s,T)):(ht(s),Qd(s,A,null,p,l))):T?T!==n.memoizedState?(Ki(s),ht(s),Tb(s,T)):(ht(s),s.flags&=-16777217):(n=n.memoizedProps,n!==p&&Ki(s),ht(s),Qd(s,A,n,p,l)),null;case 27:if(se(s),l=ge.current,A=s.type,n!==null&&s.stateNode!=null)n.memoizedProps!==p&&Ki(s);else{if(!p){if(s.stateNode===null)throw Error(i(166));return ht(s),null}n=re.current,ua(s)?cy(s):(n=I1(A,p,l),s.stateNode=n,Ki(s))}return ht(s),null;case 5:if(se(s),A=s.type,n!==null&&s.stateNode!=null)n.memoizedProps!==p&&Ki(s);else{if(!p){if(s.stateNode===null)throw Error(i(166));return ht(s),null}if(T=re.current,ua(s))cy(s);else{var I=su(ge.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[Zt]=s,T[pr]=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(tr(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&&Ki(s)}}return ht(s),Qd(s,s.type,n===null?null:n.memoizedProps,s.pendingProps,l),null;case 6:if(n&&s.stateNode!=null)n.memoizedProps!==p&&Ki(s);else{if(typeof p!="string"&&s.stateNode===null)throw Error(i(166));if(n=ge.current,ua(s)){if(n=s.stateNode,l=s.memoizedProps,p=null,A=Qt,A!==null)switch(A.tag){case 27:case 5:p=A.memoizedProps}n[Zt]=s,n=!!(n.nodeValue===l||p!==null&&p.suppressHydrationWarning===!0||A1(n.nodeValue,l)),n||wn(s,!0)}else n=su(n).createTextNode(p),n[Zt]=s,s.stateNode=n}return ht(s),null;case 31:if(l=s.memoizedState,n===null||n.memoizedState!==null){if(p=ua(s),l!==null){if(n===null){if(!p)throw Error(i(318));if(n=s.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(557));n[Zt]=s}else cs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;ht(s),n=!1}else l=ld(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=l),n=!0;if(!n)return s.flags&256?(Or(s),s):(Or(s),null);if((s.flags&128)!==0)throw Error(i(558))}return ht(s),null;case 13:if(p=s.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(A=ua(s),p!==null&&p.dehydrated!==null){if(n===null){if(!A)throw Error(i(318));if(A=s.memoizedState,A=A!==null?A.dehydrated:null,!A)throw Error(i(317));A[Zt]=s}else cs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;ht(s),A=!1}else A=ld(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=A),A=!0;if(!A)return s.flags&256?(Or(s),s):(Or(s),null)}return Or(s),(s.flags&128)!==0?(s.lanes=l,s):(l=p!==null,n=n!==null&&n.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!==n&&l&&(s.child.flags|=8192),Wc(s,s.updateQueue),ht(s),null);case 4:return ee(),n===null&&bv(s.stateNode.containerInfo),ht(s),null;case 10:return Fi(s.type),ht(s),null;case 19:if(F(Et),p=s.memoizedState,p===null)return ht(s),null;if(A=(s.flags&128)!==0,T=p.rendering,T===null)if(A)Go(p,!1);else{if(St!==0||n!==null&&(n.flags&128)!==0)for(n=s.child;n!==null;){if(T=Dc(n),T!==null){for(s.flags|=128,Go(p,!1),n=T.updateQueue,s.updateQueue=n,Wc(s,n),s.subtreeFlags=0,n=l,l=s.child;l!==null;)ny(l,n),l=l.sibling;return Z(Et,Et.current&1|2),qe&&$i(s,p.treeForkCount),s.child}n=n.sibling}p.tail!==null&&Ce()>Vc&&(s.flags|=128,A=!0,Go(p,!1),s.lanes=4194304)}else{if(!A)if(n=Dc(T),n!==null){if(s.flags|=128,A=!0,n=n.updateQueue,s.updateQueue=n,Wc(s,n),Go(p,!0),p.tail===null&&p.tailMode==="hidden"&&!T.alternate&&!qe)return ht(s),null}else 2*Ce()-p.renderingStartTime>Vc&&l!==536870912&&(s.flags|=128,A=!0,Go(p,!1),s.lanes=4194304);p.isBackwards?(T.sibling=s.child,s.child=T):(n=p.last,n!==null?n.sibling=T:s.child=T,p.last=T)}return p.tail!==null?(n=p.tail,p.rendering=n,p.tail=n.sibling,p.renderingStartTime=Ce(),n.sibling=null,l=Et.current,Z(Et,A?l&1|2:l&1),qe&&$i(s,p.treeForkCount),n):(ht(s),null);case 22:case 23:return Or(s),Sd(),p=s.memoizedState!==null,n!==null?n.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&&Wc(s,l.retryQueue),l=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),p=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),p!==l&&(s.flags|=2048),n!==null&&F(fs),null;case 24:return l=null,n!==null&&(l=n.memoizedState.cache),s.memoizedState.cache!==l&&(s.flags|=2048),Fi(Mt),ht(s),null;case 25:return null;case 30:return null}throw Error(i(156,s.tag))}function ZT(n,s){switch(ad(s),s.tag){case 1:return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 3:return Fi(Mt),ee(),n=s.flags,(n&65536)!==0&&(n&128)===0?(s.flags=n&-65537|128,s):null;case 26:case 27:case 5:return se(s),null;case 31:if(s.memoizedState!==null){if(Or(s),s.alternate===null)throw Error(i(340));cs()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 13:if(Or(s),n=s.memoizedState,n!==null&&n.dehydrated!==null){if(s.alternate===null)throw Error(i(340));cs()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 19:return F(Et),null;case 4:return ee(),null;case 10:return Fi(s.type),null;case 22:case 23:return Or(s),Sd(),n!==null&&F(fs),n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 24:return Fi(Mt),null;case 25:return null;default:return null}}function Db(n,s){switch(ad(s),s.tag){case 3:Fi(Mt),ee();break;case 26:case 27:case 5:se(s);break;case 4:ee();break;case 31:s.memoizedState!==null&&Or(s);break;case 13:Or(s);break;case 19:F(Et);break;case 10:Fi(s.type);break;case 22:case 23:Or(s),Sd(),n!==null&&F(fs);break;case 24:Fi(Mt)}}function Ko(n,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&n)===n){p=void 0;var T=l.create,I=l.inst;p=T(),I.destroy=p}l=l.next}while(l!==A)}}catch(K){et(s,s.return,K)}}function On(n,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&n)===n){var I=p.inst,K=I.destroy;if(K!==void 0){I.destroy=void 0,A=s;var J=l,oe=K;try{oe()}catch(de){et(A,J,de)}}}p=p.next}while(p!==T)}}catch(de){et(s,s.return,de)}}function Rb(n){var s=n.updateQueue;if(s!==null){var l=n.stateNode;try{wy(s,l)}catch(p){et(n,n.return,p)}}}function kb(n,s,l){l.props=_s(n.type,n.memoizedProps),l.state=n.memoizedState;try{l.componentWillUnmount()}catch(p){et(n,s,p)}}function Yo(n,s){try{var l=n.ref;if(l!==null){switch(n.tag){case 26:case 27:case 5:var p=n.stateNode;break;case 30:p=n.stateNode;break;default:p=n.stateNode}typeof l=="function"?n.refCleanup=l(p):l.current=p}}catch(A){et(n,s,A)}}function wi(n,s){var l=n.ref,p=n.refCleanup;if(l!==null)if(typeof p=="function")try{p()}catch(A){et(n,s,A)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(A){et(n,s,A)}else l.current=null}function Pb(n){var s=n.type,l=n.memoizedProps,p=n.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){et(n,n.return,A)}}function Jd(n,s,l){try{var p=n.stateNode;yD(p,n.type,l,s),p[pr]=s}catch(A){et(n,n.return,A)}}function Bb(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&jn(n.type)||n.tag===4}function ev(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Bb(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&jn(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function tv(n,s,l){var p=n.tag;if(p===5||p===6)n=n.stateNode,s?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(n,s):(s=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,s.appendChild(n),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=Ni));else if(p!==4&&(p===27&&jn(n.type)&&(l=n.stateNode,s=null),n=n.child,n!==null))for(tv(n,s,l),n=n.sibling;n!==null;)tv(n,s,l),n=n.sibling}function qc(n,s,l){var p=n.tag;if(p===5||p===6)n=n.stateNode,s?l.insertBefore(n,s):l.appendChild(n);else if(p!==4&&(p===27&&jn(n.type)&&(l=n.stateNode),n=n.child,n!==null))for(qc(n,s,l),n=n.sibling;n!==null;)qc(n,s,l),n=n.sibling}function jb(n){var s=n.stateNode,l=n.memoizedProps;try{for(var p=n.type,A=s.attributes;A.length;)s.removeAttributeNode(A[0]);tr(s,p,l),s[Zt]=n,s[pr]=l}catch(T){et(n,n.return,T)}}var Yi=!1,Tt=!1,rv=!1,Ib=typeof WeakSet=="function"?WeakSet:Set,Wt=null;function QT(n,s){if(n=n.containerInfo,Cv=fu,n=V0(n),Vf(n)){if("selectionStart"in n)var l={start:n.selectionStart,end:n.selectionEnd};else e:{l=(l=n.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,K=-1,J=-1,oe=0,de=0,_e=n,ce=null;t:for(;;){for(var ue;_e!==l||A!==0&&_e.nodeType!==3||(K=I+A),_e!==T||p!==0&&_e.nodeType!==3||(J=I+p),_e.nodeType===3&&(I+=_e.nodeValue.length),(ue=_e.firstChild)!==null;)ce=_e,_e=ue;for(;;){if(_e===n)break t;if(ce===l&&++oe===A&&(K=I),ce===T&&++de===p&&(J=I),(ue=_e.nextSibling)!==null)break;_e=ce,ce=_e.parentNode}_e=ue}l=K===-1||J===-1?null:{start:K,end:J}}else l=null}l=l||{start:0,end:0}}else l=null;for(xv={focusedElem:n,selectionRange:l},fu=!1,Wt=s;Wt!==null;)if(s=Wt,n=s.child,(s.subtreeFlags&1028)!==0&&n!==null)n.return=s,Wt=n;else for(;Wt!==null;){switch(s=Wt,T=s.alternate,n=s.flags,s.tag){case 0:if((n&4)!==0&&(n=s.updateQueue,n=n!==null?n.events:null,n!==null))for(l=0;l<n.length;l++)A=n[l],A.ref.impl=A.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&T!==null){n=void 0,l=s,A=T.memoizedProps,T=T.memoizedState,p=l.stateNode;try{var Ae=_s(l.type,A);n=p.getSnapshotBeforeUpdate(Ae,T),p.__reactInternalSnapshotBeforeUpdate=n}catch(ke){et(l,l.return,ke)}}break;case 3:if((n&1024)!==0){if(n=s.stateNode.containerInfo,l=n.nodeType,l===9)Mv(n);else if(l===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Mv(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(i(163))}if(n=s.sibling,n!==null){n.return=s.return,Wt=n;break}Wt=s.return}}function Nb(n,s,l){var p=l.flags;switch(l.tag){case 0:case 11:case 15:Xi(n,l),p&4&&Ko(5,l);break;case 1:if(Xi(n,l),p&4)if(n=l.stateNode,s===null)try{n.componentDidMount()}catch(I){et(l,l.return,I)}else{var A=_s(l.type,s.memoizedProps);s=s.memoizedState;try{n.componentDidUpdate(A,s,n.__reactInternalSnapshotBeforeUpdate)}catch(I){et(l,l.return,I)}}p&64&&Rb(l),p&512&&Yo(l,l.return);break;case 3:if(Xi(n,l),p&64&&(n=l.updateQueue,n!==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{wy(n,s)}catch(I){et(l,l.return,I)}}break;case 27:s===null&&p&4&&jb(l);case 26:case 5:Xi(n,l),s===null&&p&4&&Pb(l),p&512&&Yo(l,l.return);break;case 12:Xi(n,l);break;case 31:Xi(n,l),p&4&&$b(n,l);break;case 13:Xi(n,l),p&4&&Ub(n,l),p&64&&(n=l.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(l=oD.bind(null,l),MD(n,l))));break;case 22:if(p=l.memoizedState!==null||Yi,!p){s=s!==null&&s.memoizedState!==null||Tt,A=Yi;var T=Tt;Yi=p,(Tt=s)&&!T?Zi(n,l,(l.subtreeFlags&8772)!==0):Xi(n,l),Yi=A,Tt=T}break;case 30:break;default:Xi(n,l)}}function zb(n){var s=n.alternate;s!==null&&(n.alternate=null,zb(s)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(s=n.stateNode,s!==null&&Rf(s)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var gt=null,mr=!1;function Vi(n,s,l){for(l=l.child;l!==null;)Hb(n,s,l),l=l.sibling}function Hb(n,s,l){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(cr,l)}catch{}switch(l.tag){case 26:Tt||wi(l,s),Vi(n,s,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Tt||wi(l,s);var p=gt,A=mr;jn(l.type)&&(gt=l.stateNode,mr=!1),Vi(n,s,l),il(l.stateNode),gt=p,mr=A;break;case 5:Tt||wi(l,s);case 6:if(p=gt,A=mr,gt=null,Vi(n,s,l),gt=p,mr=A,gt!==null)if(mr)try{(gt.nodeType===9?gt.body:gt.nodeName==="HTML"?gt.ownerDocument.body:gt).removeChild(l.stateNode)}catch(T){et(l,s,T)}else try{gt.removeChild(l.stateNode)}catch(T){et(l,s,T)}break;case 18:gt!==null&&(mr?(n=gt,R1(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,l.stateNode),Da(n)):R1(gt,l.stateNode));break;case 4:p=gt,A=mr,gt=l.stateNode.containerInfo,mr=!0,Vi(n,s,l),gt=p,mr=A;break;case 0:case 11:case 14:case 15:On(2,l,s),Tt||On(4,l,s),Vi(n,s,l);break;case 1:Tt||(wi(l,s),p=l.stateNode,typeof p.componentWillUnmount=="function"&&kb(l,s,p)),Vi(n,s,l);break;case 21:Vi(n,s,l);break;case 22:Tt=(p=Tt)||l.memoizedState!==null,Vi(n,s,l),Tt=p;break;default:Vi(n,s,l)}}function $b(n,s){if(s.memoizedState===null&&(n=s.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Da(n)}catch(l){et(s,s.return,l)}}}function Ub(n,s){if(s.memoizedState===null&&(n=s.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Da(n)}catch(l){et(s,s.return,l)}}function JT(n){switch(n.tag){case 31:case 13:case 19:var s=n.stateNode;return s===null&&(s=n.stateNode=new Ib),s;case 22:return n=n.stateNode,s=n._retryCache,s===null&&(s=n._retryCache=new Ib),s;default:throw Error(i(435,n.tag))}}function Gc(n,s){var l=JT(n);s.forEach(function(p){if(!l.has(p)){l.add(p);var A=lD.bind(null,n,p);p.then(A,A)}})}function yr(n,s){var l=s.deletions;if(l!==null)for(var p=0;p<l.length;p++){var A=l[p],T=n,I=s,K=I;e:for(;K!==null;){switch(K.tag){case 27:if(jn(K.type)){gt=K.stateNode,mr=!1;break e}break;case 5:gt=K.stateNode,mr=!1;break e;case 3:case 4:gt=K.stateNode.containerInfo,mr=!0;break e}K=K.return}if(gt===null)throw Error(i(160));Hb(T,I,A),gt=null,mr=!1,T=A.alternate,T!==null&&(T.return=null),A.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)Fb(s,n),s=s.sibling}var ci=null;function Fb(n,s){var l=n.alternate,p=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:yr(s,n),br(n),p&4&&(On(3,n,n.return),Ko(3,n),On(5,n,n.return));break;case 1:yr(s,n),br(n),p&512&&(Tt||l===null||wi(l,l.return)),p&64&&Yi&&(n=n.updateQueue,n!==null&&(p=n.callbacks,p!==null&&(l=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=l===null?p:l.concat(p))));break;case 26:var A=ci;if(yr(s,n),br(n),p&512&&(Tt||l===null||wi(l,l.return)),p&4){var T=l!==null?l.memoizedState:null;if(p=n.memoizedState,l===null)if(p===null)if(n.stateNode===null){e:{p=n.type,l=n.memoizedProps,A=A.ownerDocument||A;t:switch(p){case"title":T=A.getElementsByTagName("title")[0],(!T||T[So]||T[Zt]||T.namespaceURI==="http://www.w3.org/2000/svg"||T.hasAttribute("itemprop"))&&(T=A.createElement(p),A.head.insertBefore(T,A.querySelector("head > title"))),tr(T,p,l),T[Zt]=n,Ft(T),p=T;break e;case"link":var I=F1("link","href",A).get(p+(l.href||""));if(I){for(var K=0;K<I.length;K++)if(T=I[K],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(K,1);break t}}T=A.createElement(p),tr(T,p,l),A.head.appendChild(T);break;case"meta":if(I=F1("meta","content",A).get(p+(l.content||""))){for(K=0;K<I.length;K++)if(T=I[K],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(K,1);break t}}T=A.createElement(p),tr(T,p,l),A.head.appendChild(T);break;default:throw Error(i(468,p))}T[Zt]=n,Ft(T),p=T}n.stateNode=p}else W1(A,n.type,n.stateNode);else n.stateNode=U1(A,p,n.memoizedProps);else T!==p?(T===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):T.count--,p===null?W1(A,n.type,n.stateNode):U1(A,p,n.memoizedProps)):p===null&&n.stateNode!==null&&Jd(n,n.memoizedProps,l.memoizedProps)}break;case 27:yr(s,n),br(n),p&512&&(Tt||l===null||wi(l,l.return)),l!==null&&p&4&&Jd(n,n.memoizedProps,l.memoizedProps);break;case 5:if(yr(s,n),br(n),p&512&&(Tt||l===null||wi(l,l.return)),n.flags&32){A=n.stateNode;try{ea(A,"")}catch(Ae){et(n,n.return,Ae)}}p&4&&n.stateNode!=null&&(A=n.memoizedProps,Jd(n,A,l!==null?l.memoizedProps:A)),p&1024&&(rv=!0);break;case 6:if(yr(s,n),br(n),p&4){if(n.stateNode===null)throw Error(i(162));p=n.memoizedProps,l=n.stateNode;try{l.nodeValue=p}catch(Ae){et(n,n.return,Ae)}}break;case 3:if(lu=null,A=ci,ci=au(s.containerInfo),yr(s,n),ci=A,br(n),p&4&&l!==null&&l.memoizedState.isDehydrated)try{Da(s.containerInfo)}catch(Ae){et(n,n.return,Ae)}rv&&(rv=!1,Wb(n));break;case 4:p=ci,ci=au(n.stateNode.containerInfo),yr(s,n),br(n),ci=p;break;case 12:yr(s,n),br(n);break;case 31:yr(s,n),br(n),p&4&&(p=n.updateQueue,p!==null&&(n.updateQueue=null,Gc(n,p)));break;case 13:yr(s,n),br(n),n.child.flags&8192&&n.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Yc=Ce()),p&4&&(p=n.updateQueue,p!==null&&(n.updateQueue=null,Gc(n,p)));break;case 22:A=n.memoizedState!==null;var J=l!==null&&l.memoizedState!==null,oe=Yi,de=Tt;if(Yi=oe||A,Tt=de||J,yr(s,n),Tt=de,Yi=oe,br(n),p&8192)e:for(s=n.stateNode,s._visibility=A?s._visibility&-2:s._visibility|1,A&&(l===null||J||Yi||Tt||ms(n)),l=null,s=n;;){if(s.tag===5||s.tag===26){if(l===null){J=l=s;try{if(T=J.stateNode,A)I=T.style,typeof I.setProperty=="function"?I.setProperty("display","none","important"):I.display="none";else{K=J.stateNode;var _e=J.memoizedProps.style,ce=_e!=null&&_e.hasOwnProperty("display")?_e.display:null;K.style.display=ce==null||typeof ce=="boolean"?"":(""+ce).trim()}}catch(Ae){et(J,J.return,Ae)}}}else if(s.tag===6){if(l===null){J=s;try{J.stateNode.nodeValue=A?"":J.memoizedProps}catch(Ae){et(J,J.return,Ae)}}}else if(s.tag===18){if(l===null){J=s;try{var ue=J.stateNode;A?k1(ue,!0):k1(J.stateNode,!1)}catch(Ae){et(J,J.return,Ae)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===n)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break e;for(;s.sibling===null;){if(s.return===null||s.return===n)break e;l===s&&(l=null),s=s.return}l===s&&(l=null),s.sibling.return=s.return,s=s.sibling}p&4&&(p=n.updateQueue,p!==null&&(l=p.retryQueue,l!==null&&(p.retryQueue=null,Gc(n,l))));break;case 19:yr(s,n),br(n),p&4&&(p=n.updateQueue,p!==null&&(n.updateQueue=null,Gc(n,p)));break;case 30:break;case 21:break;default:yr(s,n),br(n)}}function br(n){var s=n.flags;if(s&2){try{for(var l,p=n.return;p!==null;){if(Bb(p)){l=p;break}p=p.return}if(l==null)throw Error(i(160));switch(l.tag){case 27:var A=l.stateNode,T=ev(n);qc(n,T,A);break;case 5:var I=l.stateNode;l.flags&32&&(ea(I,""),l.flags&=-33);var K=ev(n);qc(n,K,I);break;case 3:case 4:var J=l.stateNode.containerInfo,oe=ev(n);tv(n,oe,J);break;default:throw Error(i(161))}}catch(de){et(n,n.return,de)}n.flags&=-3}s&4096&&(n.flags&=-4097)}function Wb(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var s=n;Wb(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),n=n.sibling}}function Xi(n,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)Nb(n,s.alternate,s),s=s.sibling}function ms(n){for(n=n.child;n!==null;){var s=n;switch(s.tag){case 0:case 11:case 14:case 15:On(4,s,s.return),ms(s);break;case 1:wi(s,s.return);var l=s.stateNode;typeof l.componentWillUnmount=="function"&&kb(s,s.return,l),ms(s);break;case 27:il(s.stateNode);case 26:case 5:wi(s,s.return),ms(s);break;case 22:s.memoizedState===null&&ms(s);break;case 30:ms(s);break;default:ms(s)}n=n.sibling}}function Zi(n,s,l){for(l=l&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var p=s.alternate,A=n,T=s,I=T.flags;switch(T.tag){case 0:case 11:case 15:Zi(A,T,l),Ko(4,T);break;case 1:if(Zi(A,T,l),p=T,A=p.stateNode,typeof A.componentDidMount=="function")try{A.componentDidMount()}catch(oe){et(p,p.return,oe)}if(p=T,A=p.updateQueue,A!==null){var K=p.stateNode;try{var J=A.shared.hiddenCallbacks;if(J!==null)for(A.shared.hiddenCallbacks=null,A=0;A<J.length;A++)Sy(J[A],K)}catch(oe){et(p,p.return,oe)}}l&&I&64&&Rb(T),Yo(T,T.return);break;case 27:jb(T);case 26:case 5:Zi(A,T,l),l&&p===null&&I&4&&Pb(T),Yo(T,T.return);break;case 12:Zi(A,T,l);break;case 31:Zi(A,T,l),l&&I&4&&$b(A,T);break;case 13:Zi(A,T,l),l&&I&4&&Ub(A,T);break;case 22:T.memoizedState===null&&Zi(A,T,l),Yo(T,T.return);break;case 30:break;default:Zi(A,T,l)}s=s.sibling}}function iv(n,s){var l=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),n=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(n=s.memoizedState.cachePool.pool),n!==l&&(n!=null&&n.refCount++,l!=null&&Po(l))}function nv(n,s){n=null,s.alternate!==null&&(n=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==n&&(s.refCount++,n!=null&&Po(n))}function ui(n,s,l,p){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)qb(n,s,l,p),s=s.sibling}function qb(n,s,l,p){var A=s.flags;switch(s.tag){case 0:case 11:case 15:ui(n,s,l,p),A&2048&&Ko(9,s);break;case 1:ui(n,s,l,p);break;case 3:ui(n,s,l,p),A&2048&&(n=null,s.alternate!==null&&(n=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==n&&(s.refCount++,n!=null&&Po(n)));break;case 12:if(A&2048){ui(n,s,l,p),n=s.stateNode;try{var T=s.memoizedProps,I=T.id,K=T.onPostCommit;typeof K=="function"&&K(I,s.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(J){et(s,s.return,J)}}else ui(n,s,l,p);break;case 31:ui(n,s,l,p);break;case 13:ui(n,s,l,p);break;case 23:break;case 22:T=s.stateNode,I=s.alternate,s.memoizedState!==null?T._visibility&2?ui(n,s,l,p):Vo(n,s):T._visibility&2?ui(n,s,l,p):(T._visibility|=2,ba(n,s,l,p,(s.subtreeFlags&10256)!==0||!1)),A&2048&&iv(I,s);break;case 24:ui(n,s,l,p),A&2048&&nv(s.alternate,s);break;default:ui(n,s,l,p)}}function ba(n,s,l,p,A){for(A=A&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var T=n,I=s,K=l,J=p,oe=I.flags;switch(I.tag){case 0:case 11:case 15:ba(T,I,K,J,A),Ko(8,I);break;case 23:break;case 22:var de=I.stateNode;I.memoizedState!==null?de._visibility&2?ba(T,I,K,J,A):Vo(T,I):(de._visibility|=2,ba(T,I,K,J,A)),A&&oe&2048&&iv(I.alternate,I);break;case 24:ba(T,I,K,J,A),A&&oe&2048&&nv(I.alternate,I);break;default:ba(T,I,K,J,A)}s=s.sibling}}function Vo(n,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var l=n,p=s,A=p.flags;switch(p.tag){case 22:Vo(l,p),A&2048&&iv(p.alternate,p);break;case 24:Vo(l,p),A&2048&&nv(p.alternate,p);break;default:Vo(l,p)}s=s.sibling}}var Xo=8192;function Sa(n,s,l){if(n.subtreeFlags&Xo)for(n=n.child;n!==null;)Gb(n,s,l),n=n.sibling}function Gb(n,s,l){switch(n.tag){case 26:Sa(n,s,l),n.flags&Xo&&n.memoizedState!==null&&zD(l,ci,n.memoizedState,n.memoizedProps);break;case 5:Sa(n,s,l);break;case 3:case 4:var p=ci;ci=au(n.stateNode.containerInfo),Sa(n,s,l),ci=p;break;case 22:n.memoizedState===null&&(p=n.alternate,p!==null&&p.memoizedState!==null?(p=Xo,Xo=16777216,Sa(n,s,l),Xo=p):Sa(n,s,l));break;default:Sa(n,s,l)}}function Kb(n){var s=n.alternate;if(s!==null&&(n=s.child,n!==null)){s.child=null;do s=n.sibling,n.sibling=null,n=s;while(n!==null)}}function Zo(n){var s=n.deletions;if((n.flags&16)!==0){if(s!==null)for(var l=0;l<s.length;l++){var p=s[l];Wt=p,Vb(p,n)}Kb(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Yb(n),n=n.sibling}function Yb(n){switch(n.tag){case 0:case 11:case 15:Zo(n),n.flags&2048&&On(9,n,n.return);break;case 3:Zo(n);break;case 12:Zo(n);break;case 22:var s=n.stateNode;n.memoizedState!==null&&s._visibility&2&&(n.return===null||n.return.tag!==13)?(s._visibility&=-3,Kc(n)):Zo(n);break;default:Zo(n)}}function Kc(n){var s=n.deletions;if((n.flags&16)!==0){if(s!==null)for(var l=0;l<s.length;l++){var p=s[l];Wt=p,Vb(p,n)}Kb(n)}for(n=n.child;n!==null;){switch(s=n,s.tag){case 0:case 11:case 15:On(8,s,s.return),Kc(s);break;case 22:l=s.stateNode,l._visibility&2&&(l._visibility&=-3,Kc(s));break;default:Kc(s)}n=n.sibling}}function Vb(n,s){for(;Wt!==null;){var l=Wt;switch(l.tag){case 0:case 11:case 15:On(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:Po(l.memoizedState.cache)}if(p=l.child,p!==null)p.return=l,Wt=p;else e:for(l=n;Wt!==null;){p=Wt;var A=p.sibling,T=p.return;if(zb(p),p===l){Wt=null;break e}if(A!==null){A.return=T,Wt=A;break e}Wt=T}}}var eD={getCacheForType:function(n){var s=Jt(Mt),l=s.data.get(n);return l===void 0&&(l=n(),s.data.set(n,l)),l},cacheSignal:function(){return Jt(Mt).controller.signal}},tD=typeof WeakMap=="function"?WeakMap:Map,Xe=0,st=null,ze=null,Ue=0,Je=0,Tr=null,Tn=!1,wa=!1,sv=!1,Qi=0,St=0,Dn=0,ys=0,av=0,Dr=0,Ca=0,Qo=null,Sr=null,ov=!1,Yc=0,Xb=0,Vc=1/0,Xc=null,Rn=null,Pt=0,kn=null,xa=null,Ji=0,lv=0,cv=null,Zb=null,Jo=0,uv=null;function Rr(){return(Xe&2)!==0&&Ue!==0?Ue&-Ue:q.T!==null?pv():d0()}function Qb(){if(Dr===0)if((Ue&536870912)===0||qe){var n=mi;mi<<=1,(mi&3932160)===0&&(mi=262144),Dr=n}else Dr=536870912;return n=Lr.current,n!==null&&(n.flags|=32),Dr}function wr(n,s,l){(n===st&&(Je===2||Je===9)||n.cancelPendingCommit!==null)&&(Ea(n,0),Pn(n,Ue,Dr,!1)),bo(n,l),((Xe&2)===0||n!==st)&&(n===st&&((Xe&2)===0&&(ys|=l),St===4&&Pn(n,Ue,Dr,!1)),Ci(n))}function Jb(n,s,l){if((Xe&6)!==0)throw Error(i(327));var p=!l&&(s&127)===0&&(s&n.expiredLanes)===0||yo(n,s),A=p?nD(n,s):fv(n,s,!0),T=p;do{if(A===0){wa&&!p&&Pn(n,s,0,!1);break}else{if(l=n.current.alternate,T&&!rD(l)){A=fv(n,s,!1),T=!1;continue}if(A===2){if(T=s,n.errorRecoveryDisabledLanes&T)var I=0;else I=n.pendingLanes&-536870913,I=I!==0?I:I&536870912?536870912:0;if(I!==0){s=I;e:{var K=n;A=Qo;var J=K.current.memoizedState.isDehydrated;if(J&&(Ea(K,I).flags|=256),I=fv(K,I,!1),I!==2){if(sv&&!J){K.errorRecoveryDisabledLanes|=T,ys|=T,A=4;break e}T=Sr,Sr=A,T!==null&&(Sr===null?Sr=T:Sr.push.apply(Sr,T))}A=I}if(T=!1,A!==2)continue}}if(A===1){Ea(n,0),Pn(n,s,0,!0);break}e:{switch(p=n,T=A,T){case 0:case 1:throw Error(i(345));case 4:if((s&4194048)!==s)break;case 6:Pn(p,s,Dr,!Tn);break e;case 2:Sr=null;break;case 3:case 5:break;default:throw Error(i(329))}if((s&62914560)===s&&(A=Yc+300-Ce(),10<A)){if(Pn(p,s,Dr,!Tn),ac(p,0,!0)!==0)break e;Ji=s,p.timeoutHandle=T1(e1.bind(null,p,l,Sr,Xc,ov,s,Dr,ys,Ca,Tn,T,"Throttled",-0,0),A);break e}e1(p,l,Sr,Xc,ov,s,Dr,ys,Ca,Tn,T,null,-0,0)}}break}while(!0);Ci(n)}function e1(n,s,l,p,A,T,I,K,J,oe,de,_e,ce,ue){if(n.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:Ni},Gb(s,T,_e);var Ae=(T&62914560)===T?Yc-Ce():(T&4194048)===T?Xb-Ce():0;if(Ae=HD(_e,Ae),Ae!==null){Ji=T,n.cancelPendingCommit=Ae(l1.bind(null,n,s,T,l,p,A,I,K,J,de,_e,null,ce,ue)),Pn(n,T,I,!oe);return}}l1(n,s,T,l,p,A,I,K,J)}function rD(n){for(var s=n;;){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(!Ar(T(),A))return!1}catch{return!1}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Pn(n,s,l,p){s&=~av,s&=~ys,n.suspendedLanes|=s,n.pingedLanes&=~s,p&&(n.warmLanes|=s),p=n.expirationTimes;for(var A=s;0<A;){var T=31-kt(A),I=1<<T;p[T]=-1,A&=~I}l!==0&&u0(n,l,s)}function Zc(){return(Xe&6)===0?(el(0),!1):!0}function hv(){if(ze!==null){if(Je===0)var n=ze.return;else n=ze,Ui=us=null,Md(n),ga=null,jo=0,n=ze;for(;n!==null;)Db(n.alternate,n),n=n.return;ze=null}}function Ea(n,s){var l=n.timeoutHandle;l!==-1&&(n.timeoutHandle=-1,wD(l)),l=n.cancelPendingCommit,l!==null&&(n.cancelPendingCommit=null,l()),Ji=0,hv(),st=n,ze=l=Hi(n.current,null),Ue=s,Je=0,Tr=null,Tn=!1,wa=yo(n,s),sv=!1,Ca=Dr=av=ys=Dn=St=0,Sr=Qo=null,ov=!1,(s&8)!==0&&(s|=s&32);var p=n.entangledLanes;if(p!==0)for(n=n.entanglements,p&=s;0<p;){var A=31-kt(p),T=1<<A;s|=n[A],p&=~T}return Qi=s,mc(),l}function t1(n,s){Ie=null,q.H=Wo,s===va||s===Ac?(s=_y(),Je=3):s===gd?(s=_y(),Je=4):Je=s===Fd?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Tr=s,ze===null&&(St=1,Hc(n,Wr(s,n.current)))}function r1(){var n=Lr.current;return n===null?!0:(Ue&4194048)===Ue?Yr===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?n===Yr:!1}function i1(){var n=q.H;return q.H=Wo,n===null?Wo:n}function n1(){var n=q.A;return q.A=eD,n}function Qc(){St=4,Tn||(Ue&4194048)!==Ue&&Lr.current!==null||(wa=!0),(Dn&134217727)===0&&(ys&134217727)===0||st===null||Pn(st,Ue,Dr,!1)}function fv(n,s,l){var p=Xe;Xe|=2;var A=i1(),T=n1();(st!==n||Ue!==s)&&(Xc=null,Ea(n,s)),s=!1;var I=St;e:do try{if(Je!==0&&ze!==null){var K=ze,J=Tr;switch(Je){case 8:hv(),I=6;break e;case 3:case 2:case 9:case 6:Lr.current===null&&(s=!0);var oe=Je;if(Je=0,Tr=null,Aa(n,K,J,oe),l&&wa){I=0;break e}break;default:oe=Je,Je=0,Tr=null,Aa(n,K,J,oe)}}iD(),I=St;break}catch(de){t1(n,de)}while(!0);return s&&n.shellSuspendCounter++,Ui=us=null,Xe=p,q.H=A,q.A=T,ze===null&&(st=null,Ue=0,mc()),I}function iD(){for(;ze!==null;)s1(ze)}function nD(n,s){var l=Xe;Xe|=2;var p=i1(),A=n1();st!==n||Ue!==s?(Xc=null,Vc=Ce()+500,Ea(n,s)):wa=yo(n,s);e:do try{if(Je!==0&&ze!==null){s=ze;var T=Tr;t:switch(Je){case 1:Je=0,Tr=null,Aa(n,s,T,1);break;case 2:case 9:if(gy(T)){Je=0,Tr=null,a1(s);break}s=function(){Je!==2&&Je!==9||st!==n||(Je=7),Ci(n)},T.then(s,s);break e;case 3:Je=7;break e;case 4:Je=5;break e;case 7:gy(T)?(Je=0,Tr=null,a1(s)):(Je=0,Tr=null,Aa(n,s,T,7));break;case 5:var I=null;switch(ze.tag){case 26:I=ze.memoizedState;case 5:case 27:var K=ze;if(I?q1(I):K.stateNode.complete){Je=0,Tr=null;var J=K.sibling;if(J!==null)ze=J;else{var oe=K.return;oe!==null?(ze=oe,Jc(oe)):ze=null}break t}}Je=0,Tr=null,Aa(n,s,T,5);break;case 6:Je=0,Tr=null,Aa(n,s,T,6);break;case 8:hv(),St=6;break e;default:throw Error(i(462))}}sD();break}catch(de){t1(n,de)}while(!0);return Ui=us=null,q.H=p,q.A=A,Xe=l,ze!==null?0:(st=null,Ue=0,mc(),St)}function sD(){for(;ze!==null&&!we();)s1(ze)}function s1(n){var s=Ob(n.alternate,n,Qi);n.memoizedProps=n.pendingProps,s===null?Jc(n):ze=s}function a1(n){var s=n,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:Md(s);default:Db(l,s),s=ze=ny(s,Qi),s=Ob(l,s,Qi)}n.memoizedProps=n.pendingProps,s===null?Jc(n):ze=s}function Aa(n,s,l,p){Ui=us=null,Md(s),ga=null,jo=0;var A=s.return;try{if(KT(n,A,s,l,Ue)){St=1,Hc(n,Wr(l,n.current)),ze=null;return}}catch(T){if(A!==null)throw ze=A,T;St=1,Hc(n,Wr(l,n.current)),ze=null;return}s.flags&32768?(qe||p===1?n=!0:wa||(Ue&536870912)!==0?n=!1:(Tn=n=!0,(p===2||p===9||p===3||p===6)&&(p=Lr.current,p!==null&&p.tag===13&&(p.flags|=16384))),o1(s,n)):Jc(s)}function Jc(n){var s=n;do{if((s.flags&32768)!==0){o1(s,Tn);return}n=s.return;var l=XT(s.alternate,s,Qi);if(l!==null){ze=l;return}if(s=s.sibling,s!==null){ze=s;return}ze=s=n}while(s!==null);St===0&&(St=5)}function o1(n,s){do{var l=ZT(n.alternate,n);if(l!==null){l.flags&=32767,ze=l;return}if(l=n.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!s&&(n=n.sibling,n!==null)){ze=n;return}ze=n=l}while(n!==null);St=6,ze=null}function l1(n,s,l,p,A,T,I,K,J){n.cancelPendingCommit=null;do eu();while(Pt!==0);if((Xe&6)!==0)throw Error(i(327));if(s!==null){if(s===n.current)throw Error(i(177));if(T=s.lanes|s.childLanes,T|=ed,NO(n,l,T,I,K,J),n===st&&(ze=st=null,Ue=0),xa=s,kn=n,Ji=l,lv=T,cv=A,Zb=p,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,cD(ct,function(){return d1(),null})):(n.callbackNode=null,n.callbackPriority=0),p=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||p){p=q.T,q.T=null,A=Y.p,Y.p=2,I=Xe,Xe|=4;try{QT(n,s,l)}finally{Xe=I,Y.p=A,q.T=p}}Pt=1,c1(),u1(),h1()}}function c1(){if(Pt===1){Pt=0;var n=kn,s=xa,l=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||l){l=q.T,q.T=null;var p=Y.p;Y.p=2;var A=Xe;Xe|=4;try{Fb(s,n);var T=xv,I=V0(n.containerInfo),K=T.focusedElem,J=T.selectionRange;if(I!==K&&K&&K.ownerDocument&&Y0(K.ownerDocument.documentElement,K)){if(J!==null&&Vf(K)){var oe=J.start,de=J.end;if(de===void 0&&(de=oe),"selectionStart"in K)K.selectionStart=oe,K.selectionEnd=Math.min(de,K.value.length);else{var _e=K.ownerDocument||document,ce=_e&&_e.defaultView||window;if(ce.getSelection){var ue=ce.getSelection(),Ae=K.textContent.length,ke=Math.min(J.start,Ae),it=J.end===void 0?ke:Math.min(J.end,Ae);!ue.extend&&ke>it&&(I=it,it=ke,ke=I);var ne=K0(K,ke),ie=K0(K,it);if(ne&&ie&&(ue.rangeCount!==1||ue.anchorNode!==ne.node||ue.anchorOffset!==ne.offset||ue.focusNode!==ie.node||ue.focusOffset!==ie.offset)){var ae=_e.createRange();ae.setStart(ne.node,ne.offset),ue.removeAllRanges(),ke>it?(ue.addRange(ae),ue.extend(ie.node,ie.offset)):(ae.setEnd(ie.node,ie.offset),ue.addRange(ae))}}}}for(_e=[],ue=K;ue=ue.parentNode;)ue.nodeType===1&&_e.push({element:ue,left:ue.scrollLeft,top:ue.scrollTop});for(typeof K.focus=="function"&&K.focus(),K=0;K<_e.length;K++){var pe=_e[K];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}fu=!!Cv,xv=Cv=null}finally{Xe=A,Y.p=p,q.T=l}}n.current=s,Pt=2}}function u1(){if(Pt===2){Pt=0;var n=kn,s=xa,l=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||l){l=q.T,q.T=null;var p=Y.p;Y.p=2;var A=Xe;Xe|=4;try{Nb(n,s.alternate,s)}finally{Xe=A,Y.p=p,q.T=l}}Pt=3}}function h1(){if(Pt===4||Pt===3){Pt=0,ve();var n=kn,s=xa,l=Ji,p=Zb;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Pt=5:(Pt=0,xa=kn=null,f1(n,n.pendingLanes));var A=n.pendingLanes;if(A===0&&(Rn=null),Tf(l),s=s.stateNode,_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(cr,s,void 0,(s.current.flags&128)===128)}catch{}if(p!==null){s=q.T,A=Y.p,Y.p=2,q.T=null;try{for(var T=n.onRecoverableError,I=0;I<p.length;I++){var K=p[I];T(K.value,{componentStack:K.stack})}}finally{q.T=s,Y.p=A}}(Ji&3)!==0&&eu(),Ci(n),A=n.pendingLanes,(l&261930)!==0&&(A&42)!==0?n===uv?Jo++:(Jo=0,uv=n):Jo=0,el(0)}}function f1(n,s){(n.pooledCacheLanes&=s)===0&&(s=n.pooledCache,s!=null&&(n.pooledCache=null,Po(s)))}function eu(){return c1(),u1(),h1(),d1()}function d1(){if(Pt!==5)return!1;var n=kn,s=lv;lv=0;var l=Tf(Ji),p=q.T,A=Y.p;try{Y.p=32>l?32:l,q.T=null,l=cv,cv=null;var T=kn,I=Ji;if(Pt=0,xa=kn=null,Ji=0,(Xe&6)!==0)throw Error(i(331));var K=Xe;if(Xe|=4,Yb(T.current),qb(T,T.current,I,l),Xe=K,el(0,!1),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(cr,T)}catch{}return!0}finally{Y.p=A,q.T=p,f1(n,s)}}function v1(n,s,l){s=Wr(l,s),s=Ud(n.stateNode,s,2),n=An(n,s,2),n!==null&&(bo(n,2),Ci(n))}function et(n,s,l){if(n.tag===3)v1(n,n,l);else for(;s!==null;){if(s.tag===3){v1(s,n,l);break}else if(s.tag===1){var p=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Rn===null||!Rn.has(p))){n=Wr(l,n),l=gb(2),p=An(s,l,2),p!==null&&(pb(l,p,s,n),bo(p,2),Ci(p));break}}s=s.return}}function dv(n,s,l){var p=n.pingCache;if(p===null){p=n.pingCache=new tD;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)||(sv=!0,A.add(l),n=aD.bind(null,n,s,l),s.then(n,n))}function aD(n,s,l){var p=n.pingCache;p!==null&&p.delete(s),n.pingedLanes|=n.suspendedLanes&l,n.warmLanes&=~l,st===n&&(Ue&l)===l&&(St===4||St===3&&(Ue&62914560)===Ue&&300>Ce()-Yc?(Xe&2)===0&&Ea(n,0):av|=l,Ca===Ue&&(Ca=0)),Ci(n)}function g1(n,s){s===0&&(s=c0()),n=os(n,s),n!==null&&(bo(n,s),Ci(n))}function oD(n){var s=n.memoizedState,l=0;s!==null&&(l=s.retryLane),g1(n,l)}function lD(n,s){var l=0;switch(n.tag){case 31:case 13:var p=n.stateNode,A=n.memoizedState;A!==null&&(l=A.retryLane);break;case 19:p=n.stateNode;break;case 22:p=n.stateNode._retryCache;break;default:throw Error(i(314))}p!==null&&p.delete(s),g1(n,l)}function cD(n,s){return xe(n,s)}var tu=null,Ma=null,vv=!1,ru=!1,gv=!1,Bn=0;function Ci(n){n!==Ma&&n.next===null&&(Ma===null?tu=Ma=n:Ma=Ma.next=n),ru=!0,vv||(vv=!0,hD())}function el(n,s){if(!gv&&ru){gv=!0;do for(var l=!1,p=tu;p!==null;){if(n!==0){var A=p.pendingLanes;if(A===0)var T=0;else{var I=p.suspendedLanes,K=p.pingedLanes;T=(1<<31-kt(42|n)+1)-1,T&=A&~(I&~K),T=T&201326741?T&201326741|1:T?T|2:0}T!==0&&(l=!0,y1(p,T))}else T=Ue,T=ac(p,p===st?T:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(T&3)===0||yo(p,T)||(l=!0,y1(p,T));p=p.next}while(l);gv=!1}}function uD(){p1()}function p1(){ru=vv=!1;var n=0;Bn!==0&&SD()&&(n=Bn);for(var s=Ce(),l=null,p=tu;p!==null;){var A=p.next,T=_1(p,s);T===0?(p.next=null,l===null?tu=A:l.next=A,A===null&&(Ma=l)):(l=p,(n!==0||(T&3)!==0)&&(ru=!0)),p=A}Pt!==0&&Pt!==5||el(n),Bn!==0&&(Bn=0)}function _1(n,s){for(var l=n.suspendedLanes,p=n.pingedLanes,A=n.expirationTimes,T=n.pendingLanes&-62914561;0<T;){var I=31-kt(T),K=1<<I,J=A[I];J===-1?((K&l)===0||(K&p)!==0)&&(A[I]=IO(K,s)):J<=s&&(n.expiredLanes|=K),T&=~K}if(s=st,l=Ue,l=ac(n,n===s?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),p=n.callbackNode,l===0||n===s&&(Je===2||Je===9)||n.cancelPendingCommit!==null)return p!==null&&p!==null&&Se(p),n.callbackNode=null,n.callbackPriority=0;if((l&3)===0||yo(n,l)){if(s=l&-l,s===n.callbackPriority)return s;switch(p!==null&&Se(p),Tf(l)){case 2:case 8:l=$t;break;case 32:l=ct;break;case 268435456:l=We;break;default:l=ct}return p=m1.bind(null,n),l=xe(l,p),n.callbackPriority=s,n.callbackNode=l,s}return p!==null&&p!==null&&Se(p),n.callbackPriority=2,n.callbackNode=null,2}function m1(n,s){if(Pt!==0&&Pt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var l=n.callbackNode;if(eu()&&n.callbackNode!==l)return null;var p=Ue;return p=ac(n,n===st?p:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),p===0?null:(Jb(n,p,s),_1(n,Ce()),n.callbackNode!=null&&n.callbackNode===l?m1.bind(null,n):null)}function y1(n,s){if(eu())return null;Jb(n,s,!0)}function hD(){CD(function(){(Xe&6)!==0?xe(Be,uD):p1()})}function pv(){if(Bn===0){var n=fa;n===0&&(n=Hr,Hr<<=1,(Hr&261888)===0&&(Hr=256)),Bn=n}return Bn}function b1(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:uc(""+n)}function S1(n,s){var l=s.ownerDocument.createElement("input");return l.name=s.name,l.value=s.value,n.id&&l.setAttribute("form",n.id),s.parentNode.insertBefore(l,s),n=new FormData(n),l.parentNode.removeChild(l),n}function fD(n,s,l,p,A){if(s==="submit"&&l&&l.stateNode===A){var T=b1((A[pr]||null).action),I=p.submitter;I&&(s=(s=I[pr]||null)?b1(s.formAction):I.getAttribute("formAction"),s!==null&&(T=s,I=null));var K=new vc("action","action",null,p,A);n.push({event:K,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(Bn!==0){var J=I?S1(A,I):new FormData(A);jd(l,{pending:!0,data:J,method:A.method,action:T},null,J)}}else typeof T=="function"&&(K.preventDefault(),J=I?S1(A,I):new FormData(A),jd(l,{pending:!0,data:J,method:A.method,action:T},T,J))},currentTarget:A}]})}}for(var _v=0;_v<Jf.length;_v++){var mv=Jf[_v],dD=mv.toLowerCase(),vD=mv[0].toUpperCase()+mv.slice(1);li(dD,"on"+vD)}li(Q0,"onAnimationEnd"),li(J0,"onAnimationIteration"),li(ey,"onAnimationStart"),li("dblclick","onDoubleClick"),li("focusin","onFocus"),li("focusout","onBlur"),li(TT,"onTransitionRun"),li(DT,"onTransitionStart"),li(RT,"onTransitionCancel"),li(ty,"onTransitionEnd"),Qs("onMouseEnter",["mouseout","mouseover"]),Qs("onMouseLeave",["mouseout","mouseover"]),Qs("onPointerEnter",["pointerout","pointerover"]),Qs("onPointerLeave",["pointerout","pointerover"]),is("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),is("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),is("onBeforeInput",["compositionend","keypress","textInput","paste"]),is("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),is("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),is("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var tl="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(" "),gD=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(tl));function w1(n,s){s=(s&4)!==0;for(var l=0;l<n.length;l++){var p=n[l],A=p.event;p=p.listeners;e:{var T=void 0;if(s)for(var I=p.length-1;0<=I;I--){var K=p[I],J=K.instance,oe=K.currentTarget;if(K=K.listener,J!==T&&A.isPropagationStopped())break e;T=K,A.currentTarget=oe;try{T(A)}catch(de){_c(de)}A.currentTarget=null,T=J}else for(I=0;I<p.length;I++){if(K=p[I],J=K.instance,oe=K.currentTarget,K=K.listener,J!==T&&A.isPropagationStopped())break e;T=K,A.currentTarget=oe;try{T(A)}catch(de){_c(de)}A.currentTarget=null,T=J}}}}function He(n,s){var l=s[Df];l===void 0&&(l=s[Df]=new Set);var p=n+"__bubble";l.has(p)||(C1(s,n,2,!1),l.add(p))}function yv(n,s,l){var p=0;s&&(p|=4),C1(l,n,p,s)}var iu="_reactListening"+Math.random().toString(36).slice(2);function bv(n){if(!n[iu]){n[iu]=!0,p0.forEach(function(l){l!=="selectionchange"&&(gD.has(l)||yv(l,!1,n),yv(l,!0,n))});var s=n.nodeType===9?n:n.ownerDocument;s===null||s[iu]||(s[iu]=!0,yv("selectionchange",!1,s))}}function C1(n,s,l,p){switch(Q1(s)){case 2:var A=FD;break;case 8:A=WD;break;default:A=Bv}l=A.bind(null,s,l,n),A=void 0,!Hf||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(A=!0),p?A!==void 0?n.addEventListener(s,l,{capture:!0,passive:A}):n.addEventListener(s,l,!0):A!==void 0?n.addEventListener(s,l,{passive:A}):n.addEventListener(s,l,!1)}function Sv(n,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 K=p.stateNode.containerInfo;if(K===A)break;if(I===4)for(I=p.return;I!==null;){var J=I.tag;if((J===3||J===4)&&I.stateNode.containerInfo===A)return;I=I.return}for(;K!==null;){if(I=Vs(K),I===null)return;if(J=I.tag,J===5||J===6||J===26||J===27){p=T=I;continue e}K=K.parentNode}}p=p.return}L0(function(){var oe=T,de=Nf(l),_e=[];e:{var ce=ry.get(n);if(ce!==void 0){var ue=vc,Ae=n;switch(n){case"keypress":if(fc(l)===0)break e;case"keydown":case"keyup":ue=lT;break;case"focusin":Ae="focus",ue=Wf;break;case"focusout":Ae="blur",ue=Wf;break;case"beforeblur":case"afterblur":ue=Wf;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":ue=D0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ue=XO;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ue=hT;break;case Q0:case J0:case ey:ue=JO;break;case ty:ue=dT;break;case"scroll":case"scrollend":ue=YO;break;case"wheel":ue=gT;break;case"copy":case"cut":case"paste":ue=tT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ue=k0;break;case"toggle":case"beforetoggle":ue=_T}var ke=(s&4)!==0,it=!ke&&(n==="scroll"||n==="scrollend"),ne=ke?ce!==null?ce+"Capture":null:ce;ke=[];for(var ie=oe,ae;ie!==null;){var pe=ie;if(ae=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||ae===null||ne===null||(pe=Co(ie,ne),pe!=null&&ke.push(rl(ie,pe,ae))),it)break;ie=ie.return}0<ke.length&&(ce=new ue(ce,Ae,null,l,de),_e.push({event:ce,listeners:ke}))}}if((s&7)===0){e:{if(ce=n==="mouseover"||n==="pointerover",ue=n==="mouseout"||n==="pointerout",ce&&l!==If&&(Ae=l.relatedTarget||l.fromElement)&&(Vs(Ae)||Ae[Ys]))break e;if((ue||ce)&&(ce=de.window===de?de:(ce=de.ownerDocument)?ce.defaultView||ce.parentWindow:window,ue?(Ae=l.relatedTarget||l.toElement,ue=oe,Ae=Ae?Vs(Ae):null,Ae!==null&&(it=h(Ae),ke=Ae.tag,Ae!==it||ke!==5&&ke!==27&&ke!==6)&&(Ae=null)):(ue=null,Ae=oe),ue!==Ae)){if(ke=D0,pe="onMouseLeave",ne="onMouseEnter",ie="mouse",(n==="pointerout"||n==="pointerover")&&(ke=k0,pe="onPointerLeave",ne="onPointerEnter",ie="pointer"),it=ue==null?ce:wo(ue),ae=Ae==null?ce:wo(Ae),ce=new ke(pe,ie+"leave",ue,l,de),ce.target=it,ce.relatedTarget=ae,pe=null,Vs(de)===oe&&(ke=new ke(ne,ie+"enter",Ae,l,de),ke.target=ae,ke.relatedTarget=it,pe=ke),it=pe,ue&&Ae)t:{for(ke=pD,ne=ue,ie=Ae,ae=0,pe=ne;pe;pe=ke(pe))ae++;pe=0;for(var Oe=ie;Oe;Oe=ke(Oe))pe++;for(;0<ae-pe;)ne=ke(ne),ae--;for(;0<pe-ae;)ie=ke(ie),pe--;for(;ae--;){if(ne===ie||ie!==null&&ne===ie.alternate){ke=ne;break t}ne=ke(ne),ie=ke(ie)}ke=null}else ke=null;ue!==null&&x1(_e,ce,ue,ke,!1),Ae!==null&&it!==null&&x1(_e,it,Ae,ke,!0)}}e:{if(ce=oe?wo(oe):window,ue=ce.nodeName&&ce.nodeName.toLowerCase(),ue==="select"||ue==="input"&&ce.type==="file")var Ke=$0;else if(z0(ce))if(U0)Ke=MT;else{Ke=ET;var Me=xT}else ue=ce.nodeName,!ue||ue.toLowerCase()!=="input"||ce.type!=="checkbox"&&ce.type!=="radio"?oe&&jf(oe.elementType)&&(Ke=$0):Ke=AT;if(Ke&&(Ke=Ke(n,oe))){H0(_e,Ke,l,de);break e}Me&&Me(n,ce,oe),n==="focusout"&&oe&&ce.type==="number"&&oe.memoizedProps.value!=null&&Bf(ce,"number",ce.value)}switch(Me=oe?wo(oe):window,n){case"focusin":(z0(Me)||Me.contentEditable==="true")&&(na=Me,Xf=oe,Do=null);break;case"focusout":Do=Xf=na=null;break;case"mousedown":Zf=!0;break;case"contextmenu":case"mouseup":case"dragend":Zf=!1,X0(_e,l,de);break;case"selectionchange":if(OT)break;case"keydown":case"keyup":X0(_e,l,de)}var Ne;if(Gf)e:{switch(n){case"compositionstart":var Fe="onCompositionStart";break e;case"compositionend":Fe="onCompositionEnd";break e;case"compositionupdate":Fe="onCompositionUpdate";break e}Fe=void 0}else ia?I0(n,l)&&(Fe="onCompositionEnd"):n==="keydown"&&l.keyCode===229&&(Fe="onCompositionStart");Fe&&(P0&&l.locale!=="ko"&&(ia||Fe!=="onCompositionStart"?Fe==="onCompositionEnd"&&ia&&(Ne=O0()):(yn=de,$f="value"in yn?yn.value:yn.textContent,ia=!0)),Me=nu(oe,Fe),0<Me.length&&(Fe=new R0(Fe,n,null,l,de),_e.push({event:Fe,listeners:Me}),Ne?Fe.data=Ne:(Ne=N0(l),Ne!==null&&(Fe.data=Ne)))),(Ne=yT?bT(n,l):ST(n,l))&&(Fe=nu(oe,"onBeforeInput"),0<Fe.length&&(Me=new R0("onBeforeInput","beforeinput",null,l,de),_e.push({event:Me,listeners:Fe}),Me.data=Ne)),fD(_e,n,oe,l,de)}w1(_e,s)})}function rl(n,s,l){return{instance:n,listener:s,currentTarget:l}}function nu(n,s){for(var l=s+"Capture",p=[];n!==null;){var A=n,T=A.stateNode;if(A=A.tag,A!==5&&A!==26&&A!==27||T===null||(A=Co(n,l),A!=null&&p.unshift(rl(n,A,T)),A=Co(n,s),A!=null&&p.push(rl(n,A,T))),n.tag===3)return p;n=n.return}return[]}function pD(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function x1(n,s,l,p,A){for(var T=s._reactName,I=[];l!==null&&l!==p;){var K=l,J=K.alternate,oe=K.stateNode;if(K=K.tag,J!==null&&J===p)break;K!==5&&K!==26&&K!==27||oe===null||(J=oe,A?(oe=Co(l,T),oe!=null&&I.unshift(rl(l,oe,J))):A||(oe=Co(l,T),oe!=null&&I.push(rl(l,oe,J)))),l=l.return}I.length!==0&&n.push({event:s,listeners:I})}var _D=/\r\n?/g,mD=/\u0000|\uFFFD/g;function E1(n){return(typeof n=="string"?n:""+n).replace(_D,`
|
|
49
|
-
`).replace(mD,"")}function A1(n,s){return s=E1(s),E1(n)===s}function rt(n,s,l,p,A,T){switch(l){case"children":typeof p=="string"?s==="body"||s==="textarea"&&p===""||ea(n,p):(typeof p=="number"||typeof p=="bigint")&&s!=="body"&&ea(n,""+p);break;case"className":lc(n,"class",p);break;case"tabIndex":lc(n,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":lc(n,l,p);break;case"style":A0(n,p,T);break;case"data":if(s!=="object"){lc(n,"data",p);break}case"src":case"href":if(p===""&&(s!=="a"||l!=="href")){n.removeAttribute(l);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){n.removeAttribute(l);break}p=uc(""+p),n.setAttribute(l,p);break;case"action":case"formAction":if(typeof p=="function"){n.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(n,s,"name",A.name,A,null),rt(n,s,"formEncType",A.formEncType,A,null),rt(n,s,"formMethod",A.formMethod,A,null),rt(n,s,"formTarget",A.formTarget,A,null)):(rt(n,s,"encType",A.encType,A,null),rt(n,s,"method",A.method,A,null),rt(n,s,"target",A.target,A,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){n.removeAttribute(l);break}p=uc(""+p),n.setAttribute(l,p);break;case"onClick":p!=null&&(n.onclick=Ni);break;case"onScroll":p!=null&&He("scroll",n);break;case"onScrollEnd":p!=null&&He("scrollend",n);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(i(61));if(l=p.__html,l!=null){if(A.children!=null)throw Error(i(60));n.innerHTML=l}}break;case"multiple":n.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":n.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"){n.removeAttribute("xlink:href");break}l=uc(""+p),n.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"?n.setAttribute(l,""+p):n.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"?n.setAttribute(l,""):n.removeAttribute(l);break;case"capture":case"download":p===!0?n.setAttribute(l,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?n.setAttribute(l,p):n.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?n.setAttribute(l,p):n.removeAttribute(l);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?n.removeAttribute(l):n.setAttribute(l,p);break;case"popover":He("beforetoggle",n),He("toggle",n),oc(n,"popover",p);break;case"xlinkActuate":Ii(n,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":Ii(n,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":Ii(n,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":Ii(n,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":Ii(n,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":Ii(n,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":Ii(n,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":Ii(n,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":Ii(n,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":oc(n,"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=GO.get(l)||l,oc(n,l,p))}}function wv(n,s,l,p,A,T){switch(l){case"style":A0(n,p,T);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(i(61));if(l=p.__html,l!=null){if(A.children!=null)throw Error(i(60));n.innerHTML=l}}break;case"children":typeof p=="string"?ea(n,p):(typeof p=="number"||typeof p=="bigint")&&ea(n,""+p);break;case"onScroll":p!=null&&He("scroll",n);break;case"onScrollEnd":p!=null&&He("scrollend",n);break;case"onClick":p!=null&&(n.onclick=Ni);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!_0.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=n[pr]||null,T=T!=null?T[l]:null,typeof T=="function"&&n.removeEventListener(s,T,A),typeof p=="function")){typeof T!="function"&&T!==null&&(l in n?n[l]=null:n.hasAttribute(l)&&n.removeAttribute(l)),n.addEventListener(s,p,A);break e}l in n?n[l]=p:p===!0?n.setAttribute(l,""):oc(n,l,p)}}}function tr(n,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",n),He("load",n);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(i(137,s));default:rt(n,s,T,I,l,null)}}A&&rt(n,s,"srcSet",l.srcSet,l,null),p&&rt(n,s,"src",l.src,l,null);return;case"input":He("invalid",n);var K=T=I=A=null,J=null,oe=null;for(p in l)if(l.hasOwnProperty(p)){var de=l[p];if(de!=null)switch(p){case"name":A=de;break;case"type":I=de;break;case"checked":J=de;break;case"defaultChecked":oe=de;break;case"value":T=de;break;case"defaultValue":K=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(i(137,s));break;default:rt(n,s,p,de,l,null)}}w0(n,T,K,J,oe,I,A,!1);return;case"select":He("invalid",n),p=I=T=null;for(A in l)if(l.hasOwnProperty(A)&&(K=l[A],K!=null))switch(A){case"value":T=K;break;case"defaultValue":I=K;break;case"multiple":p=K;default:rt(n,s,A,K,l,null)}s=T,l=I,n.multiple=!!p,s!=null?Js(n,!!p,s,!1):l!=null&&Js(n,!!p,l,!0);return;case"textarea":He("invalid",n),T=A=p=null;for(I in l)if(l.hasOwnProperty(I)&&(K=l[I],K!=null))switch(I){case"value":p=K;break;case"defaultValue":A=K;break;case"children":T=K;break;case"dangerouslySetInnerHTML":if(K!=null)throw Error(i(91));break;default:rt(n,s,I,K,l,null)}x0(n,p,A,T);return;case"option":for(J in l)if(l.hasOwnProperty(J)&&(p=l[J],p!=null))switch(J){case"selected":n.selected=p&&typeof p!="function"&&typeof p!="symbol";break;default:rt(n,s,J,p,l,null)}return;case"dialog":He("beforetoggle",n),He("toggle",n),He("cancel",n),He("close",n);break;case"iframe":case"object":He("load",n);break;case"video":case"audio":for(p=0;p<tl.length;p++)He(tl[p],n);break;case"image":He("error",n),He("load",n);break;case"details":He("toggle",n);break;case"embed":case"source":case"link":He("error",n),He("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(oe in l)if(l.hasOwnProperty(oe)&&(p=l[oe],p!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,s));default:rt(n,s,oe,p,l,null)}return;default:if(jf(s)){for(de in l)l.hasOwnProperty(de)&&(p=l[de],p!==void 0&&wv(n,s,de,p,l,void 0));return}}for(K in l)l.hasOwnProperty(K)&&(p=l[K],p!=null&&rt(n,s,K,p,l,null))}function yD(n,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,K=null,J=null,oe=null,de=null;for(ue in l){var _e=l[ue];if(l.hasOwnProperty(ue)&&_e!=null)switch(ue){case"checked":break;case"value":break;case"defaultValue":J=_e;default:p.hasOwnProperty(ue)||rt(n,s,ue,null,p,_e)}}for(var ce in p){var ue=p[ce];if(_e=l[ce],p.hasOwnProperty(ce)&&(ue!=null||_e!=null))switch(ce){case"type":T=ue;break;case"name":A=ue;break;case"checked":oe=ue;break;case"defaultChecked":de=ue;break;case"value":I=ue;break;case"defaultValue":K=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(i(137,s));break;default:ue!==_e&&rt(n,s,ce,ue,p,_e)}}Pf(n,I,K,J,oe,de,T,A);return;case"select":ue=I=K=ce=null;for(T in l)if(J=l[T],l.hasOwnProperty(T)&&J!=null)switch(T){case"value":break;case"multiple":ue=J;default:p.hasOwnProperty(T)||rt(n,s,T,null,p,J)}for(A in p)if(T=p[A],J=l[A],p.hasOwnProperty(A)&&(T!=null||J!=null))switch(A){case"value":ce=T;break;case"defaultValue":K=T;break;case"multiple":I=T;default:T!==J&&rt(n,s,A,T,p,J)}s=K,l=I,p=ue,ce!=null?Js(n,!!l,ce,!1):!!p!=!!l&&(s!=null?Js(n,!!l,s,!0):Js(n,!!l,l?[]:"",!1));return;case"textarea":ue=ce=null;for(K in l)if(A=l[K],l.hasOwnProperty(K)&&A!=null&&!p.hasOwnProperty(K))switch(K){case"value":break;case"children":break;default:rt(n,s,K,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":ce=A;break;case"defaultValue":ue=A;break;case"children":break;case"dangerouslySetInnerHTML":if(A!=null)throw Error(i(91));break;default:A!==T&&rt(n,s,I,A,p,T)}C0(n,ce,ue);return;case"option":for(var Ae in l)if(ce=l[Ae],l.hasOwnProperty(Ae)&&ce!=null&&!p.hasOwnProperty(Ae))switch(Ae){case"selected":n.selected=!1;break;default:rt(n,s,Ae,null,p,ce)}for(J in p)if(ce=p[J],ue=l[J],p.hasOwnProperty(J)&&ce!==ue&&(ce!=null||ue!=null))switch(J){case"selected":n.selected=ce&&typeof ce!="function"&&typeof ce!="symbol";break;default:rt(n,s,J,ce,p,ue)}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 ke in l)ce=l[ke],l.hasOwnProperty(ke)&&ce!=null&&!p.hasOwnProperty(ke)&&rt(n,s,ke,null,p,ce);for(oe in p)if(ce=p[oe],ue=l[oe],p.hasOwnProperty(oe)&&ce!==ue&&(ce!=null||ue!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(i(137,s));break;default:rt(n,s,oe,ce,p,ue)}return;default:if(jf(s)){for(var it in l)ce=l[it],l.hasOwnProperty(it)&&ce!==void 0&&!p.hasOwnProperty(it)&&wv(n,s,it,void 0,p,ce);for(de in p)ce=p[de],ue=l[de],!p.hasOwnProperty(de)||ce===ue||ce===void 0&&ue===void 0||wv(n,s,de,ce,p,ue);return}}for(var ne in l)ce=l[ne],l.hasOwnProperty(ne)&&ce!=null&&!p.hasOwnProperty(ne)&&rt(n,s,ne,null,p,ce);for(_e in p)ce=p[_e],ue=l[_e],!p.hasOwnProperty(_e)||ce===ue||ce==null&&ue==null||rt(n,s,_e,ce,p,ue)}function M1(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function bD(){if(typeof performance.getEntriesByType=="function"){for(var n=0,s=0,l=performance.getEntriesByType("resource"),p=0;p<l.length;p++){var A=l[p],T=A.transferSize,I=A.initiatorType,K=A.duration;if(T&&K&&M1(I)){for(I=0,K=A.responseEnd,p+=1;p<l.length;p++){var J=l[p],oe=J.startTime;if(oe>K)break;var de=J.transferSize,_e=J.initiatorType;de&&M1(_e)&&(J=J.responseEnd,I+=de*(J<K?1:(K-oe)/(J-oe)))}if(--p,s+=8*(T+I)/(A.duration/1e3),n++,10<n)break}}if(0<n)return s/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var Cv=null,xv=null;function su(n){return n.nodeType===9?n:n.ownerDocument}function L1(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function O1(n,s){if(n===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&s==="foreignObject"?0:n}function Ev(n,s){return n==="textarea"||n==="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 Av=null;function SD(){var n=window.event;return n&&n.type==="popstate"?n===Av?!1:(Av=n,!0):(Av=null,!1)}var T1=typeof setTimeout=="function"?setTimeout:void 0,wD=typeof clearTimeout=="function"?clearTimeout:void 0,D1=typeof Promise=="function"?Promise:void 0,CD=typeof queueMicrotask=="function"?queueMicrotask:typeof D1<"u"?function(n){return D1.resolve(null).then(n).catch(xD)}:T1;function xD(n){setTimeout(function(){throw n})}function jn(n){return n==="head"}function R1(n,s){var l=s,p=0;do{var A=l.nextSibling;if(n.removeChild(l),A&&A.nodeType===8)if(l=A.data,l==="/$"||l==="/&"){if(p===0){n.removeChild(A),Da(s);return}p--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")p++;else if(l==="html")il(n.ownerDocument.documentElement);else if(l==="head"){l=n.ownerDocument.head,il(l);for(var T=l.firstChild;T;){var I=T.nextSibling,K=T.nodeName;T[So]||K==="SCRIPT"||K==="STYLE"||K==="LINK"&&T.rel.toLowerCase()==="stylesheet"||l.removeChild(T),T=I}}else l==="body"&&il(n.ownerDocument.body);l=A}while(l);Da(s)}function k1(n,s){var l=n;n=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(n===0)break;n--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||n++;l=p}while(l)}function Mv(n){var s=n.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":Mv(l),Rf(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}n.removeChild(l)}}function ED(n,s,l,p){for(;n.nodeType===1;){var A=l;if(n.nodeName.toLowerCase()!==s.toLowerCase()){if(!p&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(p){if(!n[So])switch(s){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(T=n.getAttribute("rel"),T==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(T!==A.rel||n.getAttribute("href")!==(A.href==null||A.href===""?null:A.href)||n.getAttribute("crossorigin")!==(A.crossOrigin==null?null:A.crossOrigin)||n.getAttribute("title")!==(A.title==null?null:A.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(T=n.getAttribute("src"),(T!==(A.src==null?null:A.src)||n.getAttribute("type")!==(A.type==null?null:A.type)||n.getAttribute("crossorigin")!==(A.crossOrigin==null?null:A.crossOrigin))&&T&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(s==="input"&&n.type==="hidden"){var T=A.name==null?null:""+A.name;if(A.type==="hidden"&&n.getAttribute("name")===T)return n}else return n;if(n=Vr(n.nextSibling),n===null)break}return null}function AD(n,s,l){if(s==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!l||(n=Vr(n.nextSibling),n===null))return null;return n}function P1(n,s){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!s||(n=Vr(n.nextSibling),n===null))return null;return n}function Lv(n){return n.data==="$?"||n.data==="$~"}function Ov(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function MD(n,s){var l=n.ownerDocument;if(n.data==="$~")n._reactRetry=s;else if(n.data!=="$?"||l.readyState!=="loading")s();else{var p=function(){s(),l.removeEventListener("DOMContentLoaded",p)};l.addEventListener("DOMContentLoaded",p),n._reactRetry=p}}function Vr(n){for(;n!=null;n=n.nextSibling){var s=n.nodeType;if(s===1||s===3)break;if(s===8){if(s=n.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return n}var Tv=null;function B1(n){n=n.nextSibling;for(var s=0;n;){if(n.nodeType===8){var l=n.data;if(l==="/$"||l==="/&"){if(s===0)return Vr(n.nextSibling);s--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||s++}n=n.nextSibling}return null}function j1(n){n=n.previousSibling;for(var s=0;n;){if(n.nodeType===8){var l=n.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(s===0)return n;s--}else l!=="/$"&&l!=="/&"||s++}n=n.previousSibling}return null}function I1(n,s,l){switch(s=su(l),n){case"html":if(n=s.documentElement,!n)throw Error(i(452));return n;case"head":if(n=s.head,!n)throw Error(i(453));return n;case"body":if(n=s.body,!n)throw Error(i(454));return n;default:throw Error(i(451))}}function il(n){for(var s=n.attributes;s.length;)n.removeAttributeNode(s[0]);Rf(n)}var Xr=new Map,N1=new Set;function au(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var en=Y.d;Y.d={f:LD,r:OD,D:TD,C:DD,L:RD,m:kD,X:BD,S:PD,M:jD};function LD(){var n=en.f(),s=Zc();return n||s}function OD(n){var s=Xs(n);s!==null&&s.tag===5&&s.type==="form"?tb(s):en.r(n)}var La=typeof document>"u"?null:document;function z1(n,s,l){var p=La;if(p&&typeof s=="string"&&s){var A=Ur(s);A='link[rel="'+n+'"][href="'+A+'"]',typeof l=="string"&&(A+='[crossorigin="'+l+'"]'),N1.has(A)||(N1.add(A),n={rel:n,crossOrigin:l,href:s},p.querySelector(A)===null&&(s=p.createElement("link"),tr(s,"link",n),Ft(s),p.head.appendChild(s)))}}function TD(n){en.D(n),z1("dns-prefetch",n,null)}function DD(n,s){en.C(n,s),z1("preconnect",n,s)}function RD(n,s,l){en.L(n,s,l);var p=La;if(p&&n&&s){var A='link[rel="preload"][as="'+Ur(s)+'"]';s==="image"&&l&&l.imageSrcSet?(A+='[imagesrcset="'+Ur(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(A+='[imagesizes="'+Ur(l.imageSizes)+'"]')):A+='[href="'+Ur(n)+'"]';var T=A;switch(s){case"style":T=Oa(n);break;case"script":T=Ta(n)}Xr.has(T)||(n=u({rel:"preload",href:s==="image"&&l&&l.imageSrcSet?void 0:n,as:s},l),Xr.set(T,n),p.querySelector(A)!==null||s==="style"&&p.querySelector(nl(T))||s==="script"&&p.querySelector(sl(T))||(s=p.createElement("link"),tr(s,"link",n),Ft(s),p.head.appendChild(s)))}}function kD(n,s){en.m(n,s);var l=La;if(l&&n){var p=s&&typeof s.as=="string"?s.as:"script",A='link[rel="modulepreload"][as="'+Ur(p)+'"][href="'+Ur(n)+'"]',T=A;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":T=Ta(n)}if(!Xr.has(T)&&(n=u({rel:"modulepreload",href:n},s),Xr.set(T,n),l.querySelector(A)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(sl(T)))return}p=l.createElement("link"),tr(p,"link",n),Ft(p),l.head.appendChild(p)}}}function PD(n,s,l){en.S(n,s,l);var p=La;if(p&&n){var A=Zs(p).hoistableStyles,T=Oa(n);s=s||"default";var I=A.get(T);if(!I){var K={loading:0,preload:null};if(I=p.querySelector(nl(T)))K.loading=5;else{n=u({rel:"stylesheet",href:n,"data-precedence":s},l),(l=Xr.get(T))&&Dv(n,l);var J=I=p.createElement("link");Ft(J),tr(J,"link",n),J._p=new Promise(function(oe,de){J.onload=oe,J.onerror=de}),J.addEventListener("load",function(){K.loading|=1}),J.addEventListener("error",function(){K.loading|=2}),K.loading|=4,ou(I,s,p)}I={type:"stylesheet",instance:I,count:1,state:K},A.set(T,I)}}}function BD(n,s){en.X(n,s);var l=La;if(l&&n){var p=Zs(l).hoistableScripts,A=Ta(n),T=p.get(A);T||(T=l.querySelector(sl(A)),T||(n=u({src:n,async:!0},s),(s=Xr.get(A))&&Rv(n,s),T=l.createElement("script"),Ft(T),tr(T,"link",n),l.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},p.set(A,T))}}function jD(n,s){en.M(n,s);var l=La;if(l&&n){var p=Zs(l).hoistableScripts,A=Ta(n),T=p.get(A);T||(T=l.querySelector(sl(A)),T||(n=u({src:n,async:!0,type:"module"},s),(s=Xr.get(A))&&Rv(n,s),T=l.createElement("script"),Ft(T),tr(T,"link",n),l.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},p.set(A,T))}}function H1(n,s,l,p){var A=(A=ge.current)?au(A):null;if(!A)throw Error(i(446));switch(n){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(s=Oa(l.href),l=Zs(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"){n=Oa(l.href);var T=Zs(A).hoistableStyles,I=T.get(n);if(I||(A=A.ownerDocument||A,I={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},T.set(n,I),(T=A.querySelector(nl(n)))&&!T._p&&(I.instance=T,I.state.loading=5),Xr.has(n)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Xr.set(n,l),T||ID(A,n,l,I.state))),s&&p===null)throw Error(i(528,""));return I}if(s&&p!==null)throw Error(i(529,""));return null;case"script":return s=l.async,l=l.src,typeof l=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Ta(l),l=Zs(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(i(444,n))}}function Oa(n){return'href="'+Ur(n)+'"'}function nl(n){return'link[rel="stylesheet"]['+n+"]"}function $1(n){return u({},n,{"data-precedence":n.precedence,precedence:null})}function ID(n,s,l,p){n.querySelector('link[rel="preload"][as="style"]['+s+"]")?p.loading=1:(s=n.createElement("link"),p.preload=s,s.addEventListener("load",function(){return p.loading|=1}),s.addEventListener("error",function(){return p.loading|=2}),tr(s,"link",l),Ft(s),n.head.appendChild(s))}function Ta(n){return'[src="'+Ur(n)+'"]'}function sl(n){return"script[async]"+n}function U1(n,s,l){if(s.count++,s.instance===null)switch(s.type){case"style":var p=n.querySelector('style[data-href~="'+Ur(l.href)+'"]');if(p)return s.instance=p,Ft(p),p;var A=u({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return p=(n.ownerDocument||n).createElement("style"),Ft(p),tr(p,"style",A),ou(p,l.precedence,n),s.instance=p;case"stylesheet":A=Oa(l.href);var T=n.querySelector(nl(A));if(T)return s.state.loading|=4,s.instance=T,Ft(T),T;p=$1(l),(A=Xr.get(A))&&Dv(p,A),T=(n.ownerDocument||n).createElement("link"),Ft(T);var I=T;return I._p=new Promise(function(K,J){I.onload=K,I.onerror=J}),tr(T,"link",p),s.state.loading|=4,ou(T,l.precedence,n),s.instance=T;case"script":return T=Ta(l.src),(A=n.querySelector(sl(T)))?(s.instance=A,Ft(A),A):(p=l,(A=Xr.get(T))&&(p=u({},l),Rv(p,A)),n=n.ownerDocument||n,A=n.createElement("script"),Ft(A),tr(A,"link",p),n.head.appendChild(A),s.instance=A);case"void":return null;default:throw Error(i(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(p=s.instance,s.state.loading|=4,ou(p,l.precedence,n));return s.instance}function ou(n,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 K=p[I];if(K.dataset.precedence===s)T=K;else if(T!==A)break}T?T.parentNode.insertBefore(n,T.nextSibling):(s=l.nodeType===9?l.head:l,s.insertBefore(n,s.firstChild))}function Dv(n,s){n.crossOrigin==null&&(n.crossOrigin=s.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=s.referrerPolicy),n.title==null&&(n.title=s.title)}function Rv(n,s){n.crossOrigin==null&&(n.crossOrigin=s.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=s.referrerPolicy),n.integrity==null&&(n.integrity=s.integrity)}var lu=null;function F1(n,s,l){if(lu===null){var p=new Map,A=lu=new Map;A.set(l,p)}else A=lu,p=A.get(l),p||(p=new Map,A.set(l,p));if(p.has(n))return p;for(p.set(n,null),l=l.getElementsByTagName(n),A=0;A<l.length;A++){var T=l[A];if(!(T[So]||T[Zt]||n==="link"&&T.getAttribute("rel")==="stylesheet")&&T.namespaceURI!=="http://www.w3.org/2000/svg"){var I=T.getAttribute(s)||"";I=n+I;var K=p.get(I);K?K.push(T):p.set(I,[T])}}return p}function W1(n,s,l){n=n.ownerDocument||n,n.head.insertBefore(l,s==="title"?n.querySelector("head > title"):null)}function ND(n,s,l){if(l===1||s.itemProp!=null)return!1;switch(n){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 n=s.disabled,typeof s.precedence=="string"&&n==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 q1(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function zD(n,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=Oa(p.href),T=s.querySelector(nl(A));if(T){s=T._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(n.count++,n=cu.bind(n),s.then(n,n)),l.state.loading|=4,l.instance=T,Ft(T);return}T=s.ownerDocument||s,p=$1(p),(A=Xr.get(A))&&Dv(p,A),T=T.createElement("link"),Ft(T);var I=T;I._p=new Promise(function(K,J){I.onload=K,I.onerror=J}),tr(T,"link",p),l.instance=T}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(l,s),(s=l.state.preload)&&(l.state.loading&3)===0&&(n.count++,l=cu.bind(n),s.addEventListener("load",l),s.addEventListener("error",l))}}var kv=0;function HD(n,s){return n.stylesheets&&n.count===0&&hu(n,n.stylesheets),0<n.count||0<n.imgCount?function(l){var p=setTimeout(function(){if(n.stylesheets&&hu(n,n.stylesheets),n.unsuspend){var T=n.unsuspend;n.unsuspend=null,T()}},6e4+s);0<n.imgBytes&&kv===0&&(kv=62500*bD());var A=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&hu(n,n.stylesheets),n.unsuspend)){var T=n.unsuspend;n.unsuspend=null,T()}},(n.imgBytes>kv?50:800)+s);return n.unsuspend=l,function(){n.unsuspend=null,clearTimeout(p),clearTimeout(A)}}:null}function cu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)hu(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var uu=null;function hu(n,s){n.stylesheets=null,n.unsuspend!==null&&(n.count++,uu=new Map,s.forEach($D,n),uu=null,cu.call(n))}function $D(n,s){if(!(s.state.loading&4)){var l=uu.get(n);if(l)var p=l.get(null);else{l=new Map,uu.set(n,l);for(var A=n.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=cu.bind(this),A.addEventListener("load",p),A.addEventListener("error",p),T?T.parentNode.insertBefore(A,T.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(A,n.firstChild)),s.state.loading|=4}}var al={$$typeof:S,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function UD(n,s,l,p,A,T,I,K,J){this.tag=1,this.containerInfo=n,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=Lf(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Lf(0),this.hiddenUpdates=Lf(null),this.identifierPrefix=p,this.onUncaughtError=A,this.onCaughtError=T,this.onRecoverableError=I,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=J,this.incompleteTransitions=new Map}function G1(n,s,l,p,A,T,I,K,J,oe,de,_e){return n=new UD(n,s,l,I,J,oe,de,_e,K),s=1,T===!0&&(s|=24),T=Mr(3,null,null,s),n.current=T,T.stateNode=n,s=fd(),s.refCount++,n.pooledCache=s,s.refCount++,T.memoizedState={element:p,isDehydrated:l,cache:s},pd(T),n}function K1(n){return n?(n=oa,n):oa}function Y1(n,s,l,p,A,T){A=K1(A),p.context===null?p.context=A:p.pendingContext=A,p=En(s),p.payload={element:l},T=T===void 0?null:T,T!==null&&(p.callback=T),l=An(n,p,s),l!==null&&(wr(l,n,s),No(l,n,s))}function V1(n,s){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var l=n.retryLane;n.retryLane=l!==0&&l<s?l:s}}function Pv(n,s){V1(n,s),(n=n.alternate)&&V1(n,s)}function X1(n){if(n.tag===13||n.tag===31){var s=os(n,67108864);s!==null&&wr(s,n,67108864),Pv(n,67108864)}}function Z1(n){if(n.tag===13||n.tag===31){var s=Rr();s=Of(s);var l=os(n,s);l!==null&&wr(l,n,s),Pv(n,s)}}var fu=!0;function FD(n,s,l,p){var A=q.T;q.T=null;var T=Y.p;try{Y.p=2,Bv(n,s,l,p)}finally{Y.p=T,q.T=A}}function WD(n,s,l,p){var A=q.T;q.T=null;var T=Y.p;try{Y.p=8,Bv(n,s,l,p)}finally{Y.p=T,q.T=A}}function Bv(n,s,l,p){if(fu){var A=jv(p);if(A===null)Sv(n,s,p,du,l),J1(n,p);else if(GD(A,n,s,l,p))p.stopPropagation();else if(J1(n,p),s&4&&-1<qD.indexOf(n)){for(;A!==null;){var T=Xs(A);if(T!==null)switch(T.tag){case 3:if(T=T.stateNode,T.current.memoizedState.isDehydrated){var I=oi(T.pendingLanes);if(I!==0){var K=T;for(K.pendingLanes|=2,K.entangledLanes|=2;I;){var J=1<<31-kt(I);K.entanglements[1]|=J,I&=~J}Ci(T),(Xe&6)===0&&(Vc=Ce()+500,el(0))}}break;case 31:case 13:K=os(T,2),K!==null&&wr(K,T,2),Zc(),Pv(T,2)}if(T=jv(p),T===null&&Sv(n,s,p,du,l),T===A)break;A=T}A!==null&&p.stopPropagation()}else Sv(n,s,p,null,l)}}function jv(n){return n=Nf(n),Iv(n)}var du=null;function Iv(n){if(du=null,n=Vs(n),n!==null){var s=h(n);if(s===null)n=null;else{var l=s.tag;if(l===13){if(n=g(s),n!==null)return n;n=null}else if(l===31){if(n=a(s),n!==null)return n;n=null}else if(l===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;n=null}else s!==n&&(n=null)}}return du=n,null}function Q1(n){switch(n){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 $t:return 8;case ct:case yt:return 32;case We:return 268435456;default:return 32}default:return 32}}var Nv=!1,In=null,Nn=null,zn=null,ol=new Map,ll=new Map,Hn=[],qD="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 J1(n,s){switch(n){case"focusin":case"focusout":In=null;break;case"dragenter":case"dragleave":Nn=null;break;case"mouseover":case"mouseout":zn=null;break;case"pointerover":case"pointerout":ol.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":ll.delete(s.pointerId)}}function cl(n,s,l,p,A,T){return n===null||n.nativeEvent!==T?(n={blockedOn:s,domEventName:l,eventSystemFlags:p,nativeEvent:T,targetContainers:[A]},s!==null&&(s=Xs(s),s!==null&&X1(s)),n):(n.eventSystemFlags|=p,s=n.targetContainers,A!==null&&s.indexOf(A)===-1&&s.push(A),n)}function GD(n,s,l,p,A){switch(s){case"focusin":return In=cl(In,n,s,l,p,A),!0;case"dragenter":return Nn=cl(Nn,n,s,l,p,A),!0;case"mouseover":return zn=cl(zn,n,s,l,p,A),!0;case"pointerover":var T=A.pointerId;return ol.set(T,cl(ol.get(T)||null,n,s,l,p,A)),!0;case"gotpointercapture":return T=A.pointerId,ll.set(T,cl(ll.get(T)||null,n,s,l,p,A)),!0}return!1}function eS(n){var s=Vs(n.target);if(s!==null){var l=h(s);if(l!==null){if(s=l.tag,s===13){if(s=g(l),s!==null){n.blockedOn=s,v0(n.priority,function(){Z1(l)});return}}else if(s===31){if(s=a(l),s!==null){n.blockedOn=s,v0(n.priority,function(){Z1(l)});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){n.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}n.blockedOn=null}function vu(n){if(n.blockedOn!==null)return!1;for(var s=n.targetContainers;0<s.length;){var l=jv(n.nativeEvent);if(l===null){l=n.nativeEvent;var p=new l.constructor(l.type,l);If=p,l.target.dispatchEvent(p),If=null}else return s=Xs(l),s!==null&&X1(s),n.blockedOn=l,!1;s.shift()}return!0}function tS(n,s,l){vu(n)&&l.delete(s)}function KD(){Nv=!1,In!==null&&vu(In)&&(In=null),Nn!==null&&vu(Nn)&&(Nn=null),zn!==null&&vu(zn)&&(zn=null),ol.forEach(tS),ll.forEach(tS)}function gu(n,s){n.blockedOn===s&&(n.blockedOn=null,Nv||(Nv=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,KD)))}var pu=null;function rS(n){pu!==n&&(pu=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){pu===n&&(pu=null);for(var s=0;s<n.length;s+=3){var l=n[s],p=n[s+1],A=n[s+2];if(typeof p!="function"){if(Iv(p||l)===null)continue;break}var T=Xs(l);T!==null&&(n.splice(s,3),s-=3,jd(T,{pending:!0,data:A,method:l.method,action:p},p,A))}}))}function Da(n){function s(J){return gu(J,n)}In!==null&&gu(In,n),Nn!==null&&gu(Nn,n),zn!==null&&gu(zn,n),ol.forEach(s),ll.forEach(s);for(var l=0;l<Hn.length;l++){var p=Hn[l];p.blockedOn===n&&(p.blockedOn=null)}for(;0<Hn.length&&(l=Hn[0],l.blockedOn===null);)eS(l),l.blockedOn===null&&Hn.shift();if(l=(n.ownerDocument||n).$$reactFormReplay,l!=null)for(p=0;p<l.length;p+=3){var A=l[p],T=l[p+1],I=A[pr]||null;if(typeof T=="function")I||rS(l);else if(I){var K=null;if(T&&T.hasAttribute("formAction")){if(A=T,I=T[pr]||null)K=I.formAction;else if(Iv(A)!==null)continue}else K=I.action;typeof K=="function"?l[p+1]=K:(l.splice(p,3),p-=3),rS(l)}}}function iS(){function n(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",n),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(l,100),function(){p=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),A!==null&&(A(),A=null)}}}function zv(n){this._internalRoot=n}_u.prototype.render=zv.prototype.render=function(n){var s=this._internalRoot;if(s===null)throw Error(i(409));var l=s.current,p=Rr();Y1(l,p,n,s,null,null)},_u.prototype.unmount=zv.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var s=n.containerInfo;Y1(n.current,2,null,n,null,null),Zc(),s[Ys]=null}};function _u(n){this._internalRoot=n}_u.prototype.unstable_scheduleHydration=function(n){if(n){var s=d0();n={blockedOn:null,target:n,priority:s};for(var l=0;l<Hn.length&&s!==0&&s<Hn[l].priority;l++);Hn.splice(l,0,n),l===0&&eS(n)}};var nS=t.version;if(nS!=="19.2.5")throw Error(i(527,nS,"19.2.5"));Y.findDOMNode=function(n){var s=n._reactInternals;if(s===void 0)throw typeof n.render=="function"?Error(i(188)):(n=Object.keys(n).join(","),Error(i(268,n)));return n=f(s),n=n!==null?v(n):null,n=n===null?null:n.stateNode,n};var YD={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var mu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mu.isDisabled&&mu.supportsFiber)try{cr=mu.inject(YD),_t=mu}catch{}}return hl.createRoot=function(n,s){if(!o(n))throw Error(i(299));var l=!1,p="",A=hb,T=fb,I=db;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=G1(n,1,!1,null,null,l,p,null,A,T,I,iS),n[Ys]=s.current,bv(n),new zv(s)},hl.hydrateRoot=function(n,s,l){if(!o(n))throw Error(i(299));var p=!1,A="",T=hb,I=fb,K=db,J=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&&(K=l.onRecoverableError),l.formState!==void 0&&(J=l.formState)),s=G1(n,1,!0,s,l??null,p,A,J,T,I,K,iS),s.context=K1(null),l=s.current,p=Rr(),p=Of(p),A=En(p),A.callback=null,An(l,A,p),l=p,s.current.lanes=l,bo(s,l),Ci(s),n[Ys]=s.current,bv(n),new _u(s)},hl.version="19.2.5",hl}var vS;function lR(){if(vS)return Uv.exports;vS=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(),Uv.exports=oR(),Uv.exports}var cR=lR();const g2="codev-tower-key",uR="codev.tower.v1",hR="codev-key.";function fR(e){return e?[uR,`${hR}${e}`]:void 0}const p2=768,dR=1e3;function _2(){return"./"}function vr(e){const t=_2(),r=e.startsWith("/")?e.slice(1):e;return t+r}function T_(){const e=window.__CODEV_TOWER_KEY__;if(e){try{localStorage.setItem("codev-tower-key",e)}catch{}return e}return localStorage.getItem("codev-tower-key")}function Er(){const e=T_();return e?{[g2]:e}:{}}async function vR(){const e=await fetch(vr("api/state"),{headers:Er()});if(!e.ok)throw new Error(`Failed to fetch state: ${e.status}`);return e.json()}async function gR(e){const t=await fetch(vr(`api/architects/${encodeURIComponent(e)}`),{method:"DELETE",headers:Er()});if(t.ok)return{success:!0};try{const r=await t.json();return{success:!1,error:(r==null?void 0:r.error)??`HTTP ${t.status}`}}catch{return{success:!1,error:`HTTP ${t.status}`}}}async function pR(e,t){const r=new URLSearchParams({range:e});t&&r.set("refresh","1");const i=await fetch(vr(`api/analytics?${r}`),{headers:Er()});if(!i.ok)throw new Error(`Failed to fetch analytics: ${i.status}`);return i.json()}async function _R(){const e=await fetch(vr("api/team"),{headers:Er()});if(!e.ok)throw new Error(`Failed to fetch team: ${e.status}`);return e.json()}async function mR(){const e=await fetch(vr("api/overview"),{headers:Er()});if(!e.ok)throw new Error(`Failed to fetch overview: ${e.status}`);return e.json()}async function yR(){const e=await fetch(vr("api/inbox"),{headers:Er()});if(!e.ok)throw new Error(`Failed to fetch held messages: ${e.status}`);return e.json()}async function bR(){await fetch(vr("api/overview/refresh"),{method:"POST",headers:Er()})}async function SR(){const e=await fetch(vr("api/tabs/shell"),{method:"POST",headers:{"Content-Type":"application/json",...Er()}});if(!e.ok)throw new Error(await e.text());return e.json()}async function zh(e,t,r){const i=await fetch(vr("api/tabs/file"),{method:"POST",headers:{"Content-Type":"application/json",...Er()},body:JSON.stringify({path:e,line:t,terminalId:r})});if(!i.ok)throw new Error(await i.text());return i.json()}async function wR(e){const t=await fetch(vr(`api/tabs/${e}`),{method:"DELETE",headers:Er()});if(!t.ok)throw new Error(await t.text())}async function CR(){const e=await fetch(vr("api/files"),{headers:Er()});if(!e.ok)throw new Error(`Failed to fetch files: ${e.status}`);return e.json()}async function m2(e){const t=await fetch(vr("api/paste-image"),{method:"POST",headers:{"Content-Type":e.type||"image/png",...Er()},body:e});if(!t.ok)throw new Error(`Image upload failed: ${t.status}`);return t.json()}function Gv(e){if(e.terminalId){const t=window.location.pathname;return`${t.endsWith("/")?t:t+"/"}ws/terminal/${e.terminalId}`}return null}function xR(){return vr("api/events")}async function ER(){const e=await fetch(vr("api/git/status"),{headers:Er()});if(!e.ok)throw new Error(`Failed to fetch git status: ${e.status}`);return e.json()}async function AR(){const e=await fetch(vr("api/files/recent"),{headers:Er()});if(!e.ok)throw new Error(`Failed to fetch recent files: ${e.status}`);return e.json()}const Fa=new Set;let Ts=null,gS=!1,Wa=null;function y2(){for(const e of Fa)e()}function D_(){if(Ts||typeof fetch>"u"||typeof document<"u"&&document.hidden)return;const e=new AbortController;Ts=e,MR(e)}async function MR(e){const t={},r=T_();r&&(t[g2]=r);try{const i=await fetch(xR(),{headers:t,signal:e.signal});if(!i.ok||!i.body){Ts===e&&(Wu(),pS());return}const o=i.body.getReader(),h=new TextDecoder;let g="";for(;;){const{done:a,value:c}=await o.read();if(a)break;g+=h.decode(c,{stream:!0});const f=g.split(`
|
|
50
|
-
|
|
51
|
-
`);g=f.pop()||"";for(const v of f)/^data:/m.test(v)&&y2()}}catch{}Ts===e&&(Wu(),pS())}function pS(){if(Wa||Fa.size===0)return;const e=2e3+Math.floor(Math.random()*3e3);Wa=setTimeout(()=>{Wa=null,D_()},e)}function Wu(){Wa&&(clearTimeout(Wa),Wa=null),Ts&&(Ts.abort(),Ts=null)}function LR(){document.hidden?Wu():Fa.size>0&&(D_(),y2())}function OR(){gS||typeof document>"u"||(document.addEventListener("visibilitychange",LR),gS=!0)}function b2(e){N.useEffect(()=>(Fa.add(e),OR(),D_(),()=>{Fa.delete(e),Fa.size===0&&Wu()}),[e])}function TR(){const[e,t]=N.useState(null),[r,i]=N.useState(null),o=N.useCallback(async()=>{try{const h=await vR();t(h),i(null)}catch(h){i(h.message)}},[]);return N.useEffect(()=>{o();const h=setInterval(o,dR);return()=>clearInterval(h)},[o]),b2(o),{state:e,error:r,refresh:o}}function DR(e,t){return e===0?"architect":`architect:${t}`}function RR(e){const t=(e==null?void 0:e.architects)??(e!=null&&e.architect?[e.architect]:[]),r=t.length===1;return t.map((i,o)=>{const h=i.name??"main";return{id:DR(o,h),type:"architect",label:r?"Architect":h,closable:h!=="main",terminalId:i.terminalId,persistent:i.persistent,architectName:h}})}function kR(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}),t.push(...RR(e));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 i=r.file.split("/").pop()??r.file;t.push({id:r.id,type:"file",label:i,closable:!0,annotationId:r.id,filePath:r.file})}return t}function PR(e){const[t,r]=N.useState("work"),i=N.useRef(null),o=N.useRef(!1),h=kR(e);N.useEffect(()=>{if(o.current||e===null)return;const f=new URLSearchParams(window.location.search).get("tab");if(f){if(f.startsWith("architect:")){const u=f.slice(10),m=h.find(w=>w.type==="architect"&&w.architectName===u)??h.find(w=>w.type==="architect");if(m){r(m.id),o.current=!0;const w=new URL(window.location.href);w.searchParams.delete("tab"),window.history.replaceState({},"",w.toString());return}}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());return}}o.current=!0},[h,e]),N.useEffect(()=>{const c=new Set(h.map(f=>f.id));if(i.current===null){e!==null&&(i.current=c);return}for(const f of h)i.current.has(f.id)||r(f.id);c.has(t)||(h.find(v=>v.id==="architect")?r("architect"):h.length>0&&r(h[0].id)),i.current=c},[h.map(c=>c.id).join(","),e!==null,t]);const g=N.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]=N.useState(()=>typeof window<"u"?window.matchMedia(e).matches:!1);return N.useEffect(()=>{const i=window.matchMedia(e),o=h=>r(h.matches);return i.addEventListener("change",o),r(i.matches),()=>i.removeEventListener("change",o)},[e]),t}const BR=2500;function w2(){const[e,t]=N.useState(null),[r,i]=N.useState(null),o=N.useCallback(async()=>{try{const g=await mR();t(a=>a!==null&&JSON.stringify(a)===JSON.stringify(g)?a:g),i(null)}catch(g){i(g instanceof Error?g.message:"Failed to fetch overview")}},[]);N.useEffect(()=>{o();const g=setInterval(o,BR);return()=>clearInterval(g)},[o]),b2(o);const h=N.useCallback(async()=>{await bR(),await o()},[o]);return{data:e,error:r,refresh:h}}const C2="codev-active-architect:";function x2(){return window.location.pathname}function jR(){try{return localStorage.getItem(C2+x2())}catch{return null}}function IR(e){try{localStorage.setItem(C2+x2(),e)}catch{}}function NR({left:e,right:t,defaultSplit:r=50,collapsedPane:i=null,onExpandLeft:o,onExpandRight:h}){const[g,a]=N.useState(r),c=N.useRef(null),f=N.useRef(!1),v=N.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=i==="left",m=i==="right";return $.jsxs("div",{ref:c,className:"split-pane",children:[u&&o&&$.jsx("button",{className:"expand-bar expand-bar-left",onClick:o,title:"Expand architect panel","aria-label":"Expand architect panel",children:$.jsx("svg",{width:"10",height:"24",viewBox:"0 0 10 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:$.jsx("path",{d:"M3 8l4 4-4 4"})})}),$.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}),!i&&$.jsx("div",{className:"split-handle",onMouseDown:v,role:"separator","aria-label":"Resize panels"}),$.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&&$.jsx("button",{className:"expand-bar expand-bar-right",onClick:h,title:"Expand work panel","aria-label":"Expand work panel",children:$.jsx("svg",{width:"10",height:"24",viewBox:"0 0 10 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:$.jsx("path",{d:"M7 8l-4 4 4 4"})})})]})}const zR={work:"📋",architect:"🏛️",builder:"🔨",shell:"💻",file:"📄",activity:"⚡",files:"📁",analytics:"📊",team:"👥"};function E2({tabs:e,activeTabId:t,onSelectTab:r,onRefresh:i}){const o=async(h,g)=>{h.stopPropagation();try{await wR(g.id),i()}catch(a){console.error("Failed to close tab:",a)}};return $.jsx("div",{className:"tab-bar",role:"tablist","aria-label":"Content tabs",children:e.map(h=>$.jsxs("button",{role:"tab","aria-selected":h.id===t,className:`tab ${h.id===t?"tab-active":""}`,onClick:()=>r(h.id),title:h.label,children:[$.jsx("span",{className:"tab-icon","aria-hidden":"true",children:zR[h.type]}),$.jsx("span",{className:"tab-label",children:h.label}),h.closable&&$.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))})}function HR({tabs:e,activeTabId:t,onSelectTab:r,onRequestRemove:i}){function o(h,g){h.stopPropagation(),h.preventDefault(),!(!g.architectName||!i)&&i(g.architectName)}return $.jsx("div",{className:"architect-tab-strip tab-bar",role:"tablist","aria-label":"Architect tabs",children:e.map(h=>$.jsxs("button",{role:"tab","aria-selected":h.id===t,className:`tab ${h.id===t?"tab-active":""}`,onClick:()=>r(h.id),title:h.label,children:[$.jsx("span",{className:"tab-label",children:h.label}),h.closable&&$.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===" ")&&o(g,h)},children:$.jsx("span",{"aria-hidden":"true",children:"×"})})]},h.id))})}var Kv={exports:{}},_S;function $R(){return _S||(_S=1,(function(e,t){(function(r,i){e.exports=i()})(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(`
|
|
52
|
-
`)))),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===`
|
|
53
|
-
`&&(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(),P=this._rowElements[x];P&&(D.length===0?(P.innerText=" ",this._rowColumns.set(P,[0,1])):(P.textContent=D,this._rowColumns.set(P,M)),P.setAttribute("aria-posinset",k),P.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:P})=>{const R=k instanceof Text?k.parentNode:k;let B=parseInt(R==null?void 0:R.getAttribute("aria-posinset"),10)-1;if(isNaN(B))return console.warn("row is invalid. Race condition?"),null;const U=this._rowColumns.get(R);if(!U)return console.warn("columns is null. Race condition?"),null;let V=P<U.length?U[P]:U.slice(-1)[0]+1;return V>=this._terminal.cols&&(++B,V=0),{row:B,column:V}},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,P;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),((P=this._activeProviderReplies)==null?void 0:P.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 P=(D=this._oscLinkService.getLinkData(x))==null?void 0:D.uri;if(P){const R={start:{x:O+1,y:_},end:{x:k+(M||k!==L-1?0:1),y:_}};let B=!1;if(!(S!=null&&S.allowNonHttpProtocols))try{const U=new URL(P);["http:","https:"].includes(U.protocol)||(B=!0)}catch{B=!0}B||b.push({text:P,range:R,activate:(U,V)=>S?S.activate(U,V,R):C(0,V),hover:(U,V)=>{var q;return(q=S==null?void 0:S.hover)==null?void 0:q.call(S,U,V,R)},leave:(U,V)=>{var q;return(q=S==null?void 0:S.leave)==null?void 0:q.call(S,U,V,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}?
|
|
54
|
-
|
|
55
|
-
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),P=c(8055),R=c(8969),B=c(8460),U=c(844),V=c(6114),q=c(8437),Y=c(2584),W=c(7399),j=c(5941),H=c(9074),z=c(2585),F=c(5435),Z=c(4567),re=c(779);class he 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(X={}){super(X),this.browser=V,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new U.MutableDisposable),this._onCursorMove=this.register(new B.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new B.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new B.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new B.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new B.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new B.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new B.EventEmitter),this._onBlur=this.register(new B.EventEmitter),this._onA11yCharEmitter=this.register(new B.EventEmitter),this._onA11yTabEmitter=this.register(new B.EventEmitter),this._onWillOpen=this.register(new B.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(H.DecorationService),this._instantiationService.setService(z.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(re.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(((G,ee)=>this.refresh(G,ee)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((G=>this._reportWindowsOptions(G)))),this.register(this._inputHandler.onColor((G=>this._handleColorEvent(G)))),this.register((0,B.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,B.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,B.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,B.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((G=>this._afterResize(G.cols,G.rows)))),this.register((0,U.toDisposable)((()=>{var G,ee;this._customKeyEventHandler=void 0,(ee=(G=this.element)==null?void 0:G.parentNode)==null||ee.removeChild(this.element)})))}_handleColorEvent(X){if(this._themeService)for(const G of X){let ee,Q="";switch(G.index){case 256:ee="foreground",Q="10";break;case 257:ee="background",Q="11";break;case 258:ee="cursor",Q="12";break;default:ee="ansi",Q="4;"+G.index}switch(G.type){case 0:const se=P.color.toColorRGB(ee==="ansi"?this._themeService.colors.ansi[G.index]:this._themeService.colors[ee]);this.coreService.triggerDataEvent(`${Y.C0.ESC}]${Q};${(0,j.toRgbString)(se)}${Y.C1_ESCAPED.ST}`);break;case 1:if(ee==="ansi")this._themeService.modifyColors((te=>te.ansi[G.index]=P.channels.toColor(...G.color)));else{const te=ee;this._themeService.modifyColors((me=>me[te]=P.channels.toColor(...G.color)))}break;case 2:this._themeService.restoreColor(G.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(X){X?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(Z.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(X){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Y.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var X;return(X=this.textarea)==null?void 0:X.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Y.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 X=this.buffer.ybase+this.buffer.y,G=this.buffer.lines.get(X);if(!G)return;const ee=Math.min(this.buffer.x,this.cols-1),Q=this._renderService.dimensions.css.cell.height,se=G.getWidth(ee),te=this._renderService.dimensions.css.cell.width*se,me=this.buffer.y*this._renderService.dimensions.css.cell.height,fe=ee*this._renderService.dimensions.css.cell.width;this.textarea.style.left=fe+"px",this.textarea.style.top=me+"px",this.textarea.style.width=te+"px",this.textarea.style.height=Q+"px",this.textarea.style.lineHeight=Q+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,v.addDisposableDomListener)(this.element,"copy",(G=>{this.hasSelection()&&(0,f.copyHandler)(G,this._selectionService)})));const X=G=>(0,f.handlePasteEvent)(G,this.textarea,this.coreService,this.optionsService);this.register((0,v.addDisposableDomListener)(this.textarea,"paste",X)),this.register((0,v.addDisposableDomListener)(this.element,"paste",X)),V.isFirefox?this.register((0,v.addDisposableDomListener)(this.element,"mousedown",(G=>{G.button===2&&(0,f.rightClickHandler)(G,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,v.addDisposableDomListener)(this.element,"contextmenu",(G=>{(0,f.rightClickHandler)(G,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),V.isLinux&&this.register((0,v.addDisposableDomListener)(this.element,"auxclick",(G=>{G.button===1&&(0,f.moveTextAreaUnderMouseCursor)(G,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,v.addDisposableDomListener)(this.textarea,"keyup",(X=>this._keyUp(X)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keydown",(X=>this._keyDown(X)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keypress",(X=>this._keyPress(X)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionupdate",(X=>this._compositionHelper.compositionupdate(X)))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,v.addDisposableDomListener)(this.textarea,"input",(X=>this._inputEvent(X)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(X){var ee;if(!X)throw new Error("Terminal requires a parent element.");if(X.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((ee=this.element)==null?void 0:ee.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=X.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"),X.appendChild(this.element);const G=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),G.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",(Q=>this.updateCursorStyle(Q)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),G.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",m.promptLabel),V.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,X.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",(Q=>this._handleTextAreaFocus(Q)))),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((Q=>this._onRender.fire(Q)))),this.onResize((Q=>this._renderService.resize(Q.cols,Q.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(G);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((Q=>this.scrollLines(Q.amount,Q.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((Q=>this.scrollLines(Q.amount,Q.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((Q=>this._renderService.handleSelectionChanged(Q.start,Q.end,Q.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((Q=>{this.textarea.value=Q,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((Q=>{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",(Q=>this._selectionService.handleMouseDown(Q)))),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(Z.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(Q=>this._handleScreenReaderModeOptionChange(Q)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(d.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(Q=>{!this._overviewRulerRenderer&&Q&&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 X=this,G=this.element;function ee(te){const me=X._mouseService.getMouseReportCoords(te,X.screenElement);if(!me)return!1;let fe,ye;switch(te.overrideType||te.type){case"mousemove":ye=32,te.buttons===void 0?(fe=3,te.button!==void 0&&(fe=te.button<3?te.button:3)):fe=1&te.buttons?0:4&te.buttons?1:2&te.buttons?2:3;break;case"mouseup":ye=0,fe=te.button<3?te.button:3;break;case"mousedown":ye=1,fe=te.button<3?te.button:3;break;case"wheel":if(X._customWheelEventHandler&&X._customWheelEventHandler(te)===!1||X.viewport.getLinesScrolled(te)===0)return!1;ye=te.deltaY<0?0:1,fe=4;break;default:return!1}return!(ye===void 0||fe===void 0||fe>4)&&X.coreMouseService.triggerMouseEvent({col:me.col,row:me.row,x:me.x,y:me.y,button:fe,action:ye,ctrl:te.ctrlKey,alt:te.altKey,shift:te.shiftKey})}const Q={mouseup:null,wheel:null,mousedrag:null,mousemove:null},se={mouseup:te=>(ee(te),te.buttons||(this._document.removeEventListener("mouseup",Q.mouseup),Q.mousedrag&&this._document.removeEventListener("mousemove",Q.mousedrag)),this.cancel(te)),wheel:te=>(ee(te),this.cancel(te,!0)),mousedrag:te=>{te.buttons&&ee(te)},mousemove:te=>{te.buttons||ee(te)}};this.register(this.coreMouseService.onProtocolChange((te=>{te?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(te)),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&te?Q.mousemove||(G.addEventListener("mousemove",se.mousemove),Q.mousemove=se.mousemove):(G.removeEventListener("mousemove",Q.mousemove),Q.mousemove=null),16&te?Q.wheel||(G.addEventListener("wheel",se.wheel,{passive:!1}),Q.wheel=se.wheel):(G.removeEventListener("wheel",Q.wheel),Q.wheel=null),2&te?Q.mouseup||(Q.mouseup=se.mouseup):(this._document.removeEventListener("mouseup",Q.mouseup),Q.mouseup=null),4&te?Q.mousedrag||(Q.mousedrag=se.mousedrag):(this._document.removeEventListener("mousemove",Q.mousedrag),Q.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,v.addDisposableDomListener)(G,"mousedown",(te=>{if(te.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(te))return ee(te),Q.mouseup&&this._document.addEventListener("mouseup",Q.mouseup),Q.mousedrag&&this._document.addEventListener("mousemove",Q.mousedrag),this.cancel(te)}))),this.register((0,v.addDisposableDomListener)(G,"wheel",(te=>{if(!Q.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(te)===!1)return!1;if(!this.buffer.hasScrollback){const me=this.viewport.getLinesScrolled(te);if(me===0)return;const fe=Y.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(te.deltaY<0?"A":"B");let ye="";for(let Le=0;Le<Math.abs(me);Le++)ye+=fe;return this.coreService.triggerDataEvent(ye,!0),this.cancel(te,!0)}return this.viewport.handleWheel(te)?this.cancel(te):void 0}}),{passive:!1})),this.register((0,v.addDisposableDomListener)(G,"touchstart",(te=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(te),this.cancel(te)}),{passive:!0})),this.register((0,v.addDisposableDomListener)(G,"touchmove",(te=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(te)?void 0:this.cancel(te)}),{passive:!1}))}refresh(X,G){var ee;(ee=this._renderService)==null||ee.refreshRows(X,G)}updateCursorStyle(X){var G;(G=this._selectionService)!=null&&G.shouldColumnSelect(X)?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(X,G,ee=0){var Q;ee===1?(super.scrollLines(X,G,ee),this.refresh(0,this.rows-1)):(Q=this.viewport)==null||Q.scrollLines(X)}paste(X){(0,f.paste)(X,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(X){this._customKeyEventHandler=X}attachCustomWheelEventHandler(X){this._customWheelEventHandler=X}registerLinkProvider(X){return this._linkProviderService.registerLinkProvider(X)}registerCharacterJoiner(X){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const G=this._characterJoinerService.register(X);return this.refresh(0,this.rows-1),G}deregisterCharacterJoiner(X){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(X)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(X){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+X)}registerDecoration(X){return this._decorationService.registerDecoration(X)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(X,G,ee){this._selectionService.setSelection(X,G,ee)}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 X;(X=this._selectionService)==null||X.clearSelection()}selectAll(){var X;(X=this._selectionService)==null||X.selectAll()}selectLines(X,G){var ee;(ee=this._selectionService)==null||ee.selectLines(X,G)}_keyDown(X){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(X)===!1)return!1;const G=this.browser.isMac&&this.options.macOptionIsMeta&&X.altKey;if(!G&&!this._compositionHelper.keydown(X))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;G||X.key!=="Dead"&&X.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ee=(0,W.evaluateKeyboardEvent)(X,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(X),ee.type===3||ee.type===2){const Q=this.rows-1;return this.scrollLines(ee.type===2?-Q:Q),this.cancel(X,!0)}return ee.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,X)||(ee.cancel&&this.cancel(X,!0),!ee.key||!!(X.key&&!X.ctrlKey&&!X.altKey&&!X.metaKey&&X.key.length===1&&X.key.charCodeAt(0)>=65&&X.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ee.key!==Y.C0.ETX&&ee.key!==Y.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ee.key,domEvent:X}),this._showCursor(),this.coreService.triggerDataEvent(ee.key,!0),!this.optionsService.rawOptions.screenReaderMode||X.altKey||X.ctrlKey?this.cancel(X,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(X,G){const ee=X.isMac&&!this.options.macOptionIsMeta&&G.altKey&&!G.ctrlKey&&!G.metaKey||X.isWindows&&G.altKey&&G.ctrlKey&&!G.metaKey||X.isWindows&&G.getModifierState("AltGraph");return G.type==="keypress"?ee:ee&&(!G.keyCode||G.keyCode>47)}_keyUp(X){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(X)===!1||((function(G){return G.keyCode===16||G.keyCode===17||G.keyCode===18})(X)||this.focus(),this.updateCursorStyle(X),this._keyPressHandled=!1)}_keyPress(X){let G;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(X)===!1)return!1;if(this.cancel(X),X.charCode)G=X.charCode;else if(X.which===null||X.which===void 0)G=X.keyCode;else{if(X.which===0||X.charCode===0)return!1;G=X.which}return!(!G||(X.altKey||X.ctrlKey||X.metaKey)&&!this._isThirdLevelShift(this.browser,X)||(G=String.fromCharCode(G),this._onKey.fire({key:G,domEvent:X}),this._showCursor(),this.coreService.triggerDataEvent(G,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(X){if(X.data&&X.inputType==="insertText"&&(!X.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const G=X.data;return this.coreService.triggerDataEvent(G,!0),this.cancel(X),!0}return!1}resize(X,G){X!==this.cols||G!==this.rows?super.resize(X,G):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(X,G){var ee,Q;(ee=this._charSizeService)==null||ee.measure(),(Q=this.viewport)==null||Q.syncScrollArea(!0)}clear(){var X;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 G=1;G<this.rows;G++)this.buffer.lines.push(this.buffer.getBlankLine(q.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(X=this.viewport)==null||X.reset(),this.refresh(0,this.rows-1)}}reset(){var G,ee;this.options.rows=this.rows,this.options.cols=this.cols;const X=this._customKeyEventHandler;this._setup(),super.reset(),(G=this._selectionService)==null||G.reset(),this._decorationService.reset(),(ee=this.viewport)==null||ee.reset(),this._customKeyEventHandler=X,this.refresh(0,this.rows-1)}clearTextureAtlas(){var X;(X=this._renderService)==null||X.clearTextureAtlas()}_reportFocus(){var X;(X=this.element)!=null&&X.classList.contains("focus")?this.coreService.triggerDataEvent(Y.C0.ESC+"[I"):this.coreService.triggerDataEvent(Y.C0.ESC+"[O")}_reportWindowsOptions(X){if(this._renderService)switch(X){case F.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const G=this._renderService.dimensions.css.canvas.width.toFixed(0),ee=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${Y.C0.ESC}[4;${ee};${G}t`);break;case F.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const Q=this._renderService.dimensions.css.cell.width.toFixed(0),se=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${Y.C0.ESC}[6;${se};${Q}t`)}}cancel(X,G){if(this.options.cancelEvents||G)return X.preventDefault(),X.stopPropagation(),!1}}a.Terminal=he},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 P=(M=O.get(D+1))==null?void 0:M.isWrapped;if(E+=k.translateToString(!P),!P||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 P;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(),(P=this._viewportElement.parentElement)==null||P.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 P=O-u(O,D),R=M-u(M,D);for(let B=0;B<Math.abs(P-R);B++){const U=m(O,M)==="A"?-1:1,V=D.buffer.lines.get(P+U*B);V!=null&&V.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,P,R,B){return v(D,P,R,B).length===0?"":_(w(M,D,M,D-u(D,R),!1,R).length,C("D",B))})(E,L,0,y,b,S)+v(L,y,b,S)+(function(M,D,k,P,R,B){let U;U=v(D,P,R,B).length>0?P-u(P,R):D;const V=P,q=(function(Y,W,j,H,z,F){let Z;return Z=v(j,H,z,F).length>0?H-u(H,z):W,Y<j&&Z<=H||Y>=j&&Z<H?"C":"D"})(M,D,k,P,R,B);return _(w(M,U,k,V,q==="C",R).length,C(q,B))})(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(B,U,V,q){var Y,W=arguments.length,j=W<3?U:q===null?q=Object.getOwnPropertyDescriptor(U,V):q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(B,U,V,q);else for(var H=B.length-1;H>=0;H--)(Y=B[H])&&(j=(W<3?Y(j):W>3?Y(U,V,j):Y(U,V))||j);return W>3&&j&&Object.defineProperty(U,V,j),j},v=this&&this.__param||function(B,U){return function(V,q){U(V,q,B)}};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 P=1,R=a.DomRenderer=class extends S.Disposable{constructor(B,U,V,q,Y,W,j,H,z,F,Z,re,he){super(),this._terminal=B,this._document=U,this._element=V,this._screenElement=q,this._viewportElement=Y,this._helperContainer=W,this._linkifier2=j,this._charSizeService=z,this._optionsService=F,this._bufferService=Z,this._coreBrowserService=re,this._themeService=he,this._terminalClass=P++,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((ge=>this._injectCss(ge)))),this._injectCss(this._themeService.colors),this._rowFactory=H.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((ge=>this._handleLinkHover(ge)))),this.register(this._linkifier2.onHideLinkUnderline((ge=>this._handleLinkLeave(ge)))),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 B=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*B,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*B),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/B),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/B),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 V of this._rowElements)V.style.width=`${this.dimensions.css.canvas.width}px`,V.style.height=`${this.dimensions.css.cell.height}px`,V.style.lineHeight=`${this.dimensions.css.cell.height}px`,V.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const U=`${this._terminalSelector} .${x} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=U,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(B){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let U=`${this._terminalSelector} .${x} { color: ${B.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;U+=`${this._terminalSelector} .${x} .xterm-dim { color: ${y.color.multiplyOpacity(B.foreground,.5).css};}`,U+=`${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 V=`blink_underline_${this._terminalClass}`,q=`blink_bar_${this._terminalClass}`,Y=`blink_block_${this._terminalClass}`;U+=`@keyframes ${V} { 50% { border-bottom-style: hidden; }}`,U+=`@keyframes ${q} { 50% { box-shadow: none; }}`,U+=`@keyframes ${Y} { 0% { background-color: ${B.cursor.css}; color: ${B.cursorAccent.css}; } 50% { background-color: inherit; color: ${B.cursor.css}; }}`,U+=`${this._terminalSelector} .${x}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${V} 1s step-end infinite;}${this._terminalSelector} .${x}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${q} 1s step-end infinite;}${this._terminalSelector} .${x}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Y} 1s step-end infinite;}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-block { background-color: ${B.cursor.css}; color: ${B.cursorAccent.css};}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${B.cursor.css} !important; color: ${B.cursorAccent.css} !important;}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${B.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${B.cursor.css} inset;}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${B.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,U+=`${this._terminalSelector} .${k} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${k} div { position: absolute; background-color: ${B.selectionBackgroundOpaque.css};}${this._terminalSelector} .${k} div { position: absolute; background-color: ${B.selectionInactiveBackgroundOpaque.css};}`;for(const[W,j]of B.ansi.entries())U+=`${this._terminalSelector} .${O}${W} { color: ${j.css}; }${this._terminalSelector} .${O}${W}.xterm-dim { color: ${y.color.multiplyOpacity(j,.5).css}; }${this._terminalSelector} .${M}${W} { background-color: ${j.css}; }`;U+=`${this._terminalSelector} .${O}${w.INVERTED_DEFAULT_COLOR} { color: ${y.color.opaque(B.background).css}; }${this._terminalSelector} .${O}${w.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${y.color.multiplyOpacity(y.color.opaque(B.background),.5).css}; }${this._terminalSelector} .${M}${w.INVERTED_DEFAULT_COLOR} { background-color: ${B.foreground.css}; }`,this._themeStyleElement.textContent=U}_setDefaultSpacing(){const B=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${B}px`,this._rowFactory.defaultSpacing=B}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(B,U){for(let V=this._rowElements.length;V<=U;V++){const q=this._document.createElement("div");this._rowContainer.appendChild(q),this._rowElements.push(q)}for(;this._rowElements.length>U;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(B,U){this._refreshRowElements(B,U),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(B,U,V){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(B,U,V),this.renderRows(0,this._bufferService.rows-1),!B||!U)return;this._selectionRenderModel.update(this._terminal,B,U,V);const q=this._selectionRenderModel.viewportStartRow,Y=this._selectionRenderModel.viewportEndRow,W=this._selectionRenderModel.viewportCappedStartRow,j=this._selectionRenderModel.viewportCappedEndRow;if(W>=this._bufferService.rows||j<0)return;const H=this._document.createDocumentFragment();if(V){const z=B[0]>U[0];H.appendChild(this._createSelectionElement(W,z?U[0]:B[0],z?B[0]:U[0],j-W+1))}else{const z=q===W?B[0]:0,F=W===Y?U[0]:this._bufferService.cols;H.appendChild(this._createSelectionElement(W,z,F));const Z=j-W-1;if(H.appendChild(this._createSelectionElement(W+1,0,this._bufferService.cols,Z)),W!==j){const re=Y===j?U[0]:this._bufferService.cols;H.appendChild(this._createSelectionElement(j,0,re))}}this._selectionContainer.appendChild(H)}_createSelectionElement(B,U,V,q=1){const Y=this._document.createElement("div"),W=U*this.dimensions.css.cell.width;let j=this.dimensions.css.cell.width*(V-U);return W+j>this.dimensions.css.canvas.width&&(j=this.dimensions.css.canvas.width-W),Y.style.height=q*this.dimensions.css.cell.height+"px",Y.style.top=B*this.dimensions.css.cell.height+"px",Y.style.left=`${W}px`,Y.style.width=`${j}px`,Y}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 B of this._rowElements)B.replaceChildren()}renderRows(B,U){const V=this._bufferService.buffer,q=V.ybase+V.y,Y=Math.min(V.x,this._bufferService.cols-1),W=this._optionsService.rawOptions.cursorBlink,j=this._optionsService.rawOptions.cursorStyle,H=this._optionsService.rawOptions.cursorInactiveStyle;for(let z=B;z<=U;z++){const F=z+V.ydisp,Z=this._rowElements[z],re=V.lines.get(F);if(!Z||!re)break;Z.replaceChildren(...this._rowFactory.createRow(re,F,F===q,j,H,Y,W,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${L}${this._terminalClass}`}_handleLinkHover(B){this._setCellUnderline(B.x1,B.x2,B.y1,B.y2,B.cols,!0)}_handleLinkLeave(B){this._setCellUnderline(B.x1,B.x2,B.y1,B.y2,B.cols,!1)}_setCellUnderline(B,U,V,q,Y,W){V<0&&(B=0),q<0&&(U=0);const j=this._bufferService.rows-1;V=Math.max(Math.min(V,j),0),q=Math.max(Math.min(q,j),0),Y=Math.min(Y,this._bufferService.cols);const H=this._bufferService.buffer,z=H.ybase+H.y,F=Math.min(H.x,Y-1),Z=this._optionsService.rawOptions.cursorBlink,re=this._optionsService.rawOptions.cursorStyle,he=this._optionsService.rawOptions.cursorInactiveStyle;for(let ge=V;ge<=q;++ge){const X=ge+H.ydisp,G=this._rowElements[ge],ee=H.lines.get(X);if(!G||!ee)break;G.replaceChildren(...this._rowFactory.createRow(ee,X,X===z,re,he,F,Z,this.dimensions.css.cell.width,this._widthCache,W?ge===V?B:0:-1,W?(ge===q?U:Y)-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,P=arguments.length,R=P<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 B=x.length-1;B>=0;B--)(k=x[B])&&(R=(P<3?k(R):P>3?k(O,M,R):k(O,M))||R);return P>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,P,R){this._document=x,this._characterJoinerService=O,this._optionsService=M,this._coreBrowserService=D,this._coreService=k,this._decorationService=P,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,P,R,B,U,V,q){const Y=[],W=this._characterJoinerService.getJoinedCharacters(O),j=this._themeService.colors;let H,z=x.getNoBgTrimmedLength();M&&z<P+1&&(z=P+1);let F=0,Z="",re=0,he=0,ge=0,X=!1,G=0,ee=!1,Q=0;const se=[],te=V!==-1&&q!==-1;for(let me=0;me<z;me++){x.loadCell(me,this._workCell);let fe=this._workCell.getWidth();if(fe===0)continue;let ye=!1,Le=me,be=this._workCell;if(W.length>0&&me===W[0][0]){ye=!0;const De=W.shift();be=new y.JoinedCellData(this._workCell,x.translateToString(!0,De[0],De[1]),De[1]-De[0]),Le=De[1]-1,fe=be.getWidth()}const Qe=this._isCellInSelection(me,O),Rt=M&&me===P,xe=te&&me>=V&&me<=q;let Se=!1;this._decorationService.forEachDecorationAtCell(me,O,void 0,(De=>{Se=!0}));let we=be.getChars()||m.WHITESPACE_CELL_CHAR;if(we===" "&&(be.isUnderline()||be.isOverline())&&(we=" "),Q=fe*B-U.get(we,be.isBold(),be.isItalic()),H){if(F&&(Qe&&ee||!Qe&&!ee&&be.bg===re)&&(Qe&&ee&&j.selectionForeground||be.fg===he)&&be.extended.ext===ge&&xe===X&&Q===G&&!Rt&&!ye&&!Se){be.isInvisible()?Z+=m.WHITESPACE_CELL_CHAR:Z+=we,F++;continue}F&&(H.textContent=Z),H=this._document.createElement("span"),F=0,Z=""}else H=this._document.createElement("span");if(re=be.bg,he=be.fg,ge=be.extended.ext,X=xe,G=Q,ee=Qe,ye&&P>=me&&P<=Le&&(P=me),!this._coreService.isCursorHidden&&Rt&&this._coreService.isCursorInitialized){if(se.push("xterm-cursor"),this._coreBrowserService.isFocused)R&&se.push("xterm-cursor-blink"),se.push(D==="bar"?"xterm-cursor-bar":D==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(k)switch(k){case"outline":se.push("xterm-cursor-outline");break;case"block":se.push("xterm-cursor-block");break;case"bar":se.push("xterm-cursor-bar");break;case"underline":se.push("xterm-cursor-underline")}}if(be.isBold()&&se.push("xterm-bold"),be.isItalic()&&se.push("xterm-italic"),be.isDim()&&se.push("xterm-dim"),Z=be.isInvisible()?m.WHITESPACE_CELL_CHAR:be.getChars()||m.WHITESPACE_CELL_CHAR,be.isUnderline()&&(se.push(`xterm-underline-${be.extended.underlineStyle}`),Z===" "&&(Z=" "),!be.isUnderlineColorDefault()))if(be.isUnderlineColorRGB())H.style.textDecorationColor=`rgb(${S.AttributeData.toColorRGB(be.getUnderlineColor()).join(",")})`;else{let De=be.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&be.isBold()&&De<8&&(De+=8),H.style.textDecorationColor=j.ansi[De].css}be.isOverline()&&(se.push("xterm-overline"),Z===" "&&(Z=" ")),be.isStrikethrough()&&se.push("xterm-strikethrough"),xe&&(H.style.textDecoration="underline");let ve=be.getFgColor(),Ce=be.getFgColorMode(),$e=be.getBgColor(),Be=be.getBgColorMode();const $t=!!be.isInverse();if($t){const De=ve;ve=$e,$e=De;const cr=Ce;Ce=Be,Be=cr}let ct,yt,We,Pe=!1;switch(this._decorationService.forEachDecorationAtCell(me,O,void 0,(De=>{De.options.layer!=="top"&&Pe||(De.backgroundColorRGB&&(Be=50331648,$e=De.backgroundColorRGB.rgba>>8&16777215,ct=De.backgroundColorRGB),De.foregroundColorRGB&&(Ce=50331648,ve=De.foregroundColorRGB.rgba>>8&16777215,yt=De.foregroundColorRGB),Pe=De.options.layer==="top")})),!Pe&&Qe&&(ct=this._coreBrowserService.isFocused?j.selectionBackgroundOpaque:j.selectionInactiveBackgroundOpaque,$e=ct.rgba>>8&16777215,Be=50331648,Pe=!0,j.selectionForeground&&(Ce=50331648,ve=j.selectionForeground.rgba>>8&16777215,yt=j.selectionForeground)),Pe&&se.push("xterm-decoration-top"),Be){case 16777216:case 33554432:We=j.ansi[$e],se.push(`xterm-bg-${$e}`);break;case 50331648:We=_.channels.toColor($e>>16,$e>>8&255,255&$e),this._addStyle(H,`background-color:#${L(($e>>>0).toString(16),"0",6)}`);break;default:$t?(We=j.foreground,se.push(`xterm-bg-${u.INVERTED_DEFAULT_COLOR}`)):We=j.background}switch(ct||be.isDim()&&(ct=_.color.multiplyOpacity(We,.5)),Ce){case 16777216:case 33554432:be.isBold()&&ve<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ve+=8),this._applyMinimumContrast(H,We,j.ansi[ve],be,ct,void 0)||se.push(`xterm-fg-${ve}`);break;case 50331648:const De=_.channels.toColor(ve>>16&255,ve>>8&255,255&ve);this._applyMinimumContrast(H,We,De,be,ct,yt)||this._addStyle(H,`color:#${L(ve.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(H,We,j.foreground,be,ct,yt)||$t&&se.push(`xterm-fg-${u.INVERTED_DEFAULT_COLOR}`)}se.length&&(H.className=se.join(" "),se.length=0),Rt||ye||Se?H.textContent=Z:F++,Q!==this.defaultSpacing&&(H.style.letterSpacing=`${Q}px`),Y.push(H),me=Le}return H&&F&&(H.textContent=Z),Y}_applyMinimumContrast(x,O,M,D,k,P){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,b.treatGlyphAsBackgroundColor)(D.getCode()))return!1;const R=this._getContrastCache(D);let B;if(k||P||(B=R.getColor(O.rgba,M.rgba)),B===void 0){const U=this._optionsService.rawOptions.minimumContrastRatio/(D.isDim()?2:1);B=_.color.ensureContrastRatio(k||O,P||M,U),R.setColor((k||O).rgba,(P||M).rgba,B??null)}return!!B&&(this._addStyle(x,`color:${B.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 A2{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 P=0;P<S.getTrimmedLength();P++)if(S.loadCell(P,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==D||this._workCell.bg!==k){if(P-x>1){const R=this._getJoinedRanges(L,M,O,S,x);for(let B=0;B<R.length;B++)E.push(R[B])}x=P,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 P=this._getJoinedRanges(L,M,O,S,x);for(let R=0;R<P.length;R++)E.push(P[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 P=0;P<k.length;P++)A2._mergeRanges(M,k[P])}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),P=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+=P}}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,P)=>this._renderRows(k,P)),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,P){var R,B=arguments.length,U=B<3?D:P===null?P=Object.getOwnPropertyDescriptor(D,k):P;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(M,D,k,P);else for(var V=M.length-1;V>=0;V--)(R=M[V])&&(U=(B<3?R(U):B>3?R(D,k,U):R(D,k))||U);return B>3&&U&&Object.defineProperty(D,k,U),U},v=this&&this.__param||function(M,D){return function(k,P){D(k,P,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,P,R,B,U,V,q){super(),this._element=M,this._screenElement=D,this._linkifier=k,this._bufferService=P,this._coreService=R,this._mouseService=B,this._optionsService=U,this._renderService=V,this._coreBrowserService=q,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=Y=>this._handleMouseMove(Y),this._mouseUpListener=Y=>this._handleMouseUp(Y),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((Y=>this._handleTrim(Y))),this.register(this._bufferService.buffers.onBufferActivate((Y=>this._handleBufferActivate(Y)))),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,P=[];if(this._activeSelectionMode===3){if(M[0]===D[0])return"";const R=M[0]<D[0]?M[0]:D[0],B=M[0]<D[0]?D[0]:M[0];for(let U=M[1];U<=D[1];U++){const V=k.translateBufferLineToString(U,!0,R,B);P.push(V)}}else{const R=M[1]===D[1]?D[0]:void 0;P.push(k.translateBufferLineToString(M[1],!0,M[0],R));for(let B=M[1]+1;B<=D[1]-1;B++){const U=k.lines.get(B),V=k.translateBufferLineToString(B,!0);U!=null&&U.isWrapped?P[P.length-1]+=V:P.push(V)}if(M[1]!==D[1]){const B=k.lines.get(D[1]),U=k.translateBufferLineToString(D[1],!0,0,D[0]);B&&B.isWrapped?P[P.length-1]+=U:P.push(U)}}return P.map((R=>R.replace(x," "))).join(y.isWindows?`\r
|
|
56
|
-
`:`
|
|
57
|
-
`)}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,P=this._model.finalSelectionEnd;return!!(k&&P&&D)&&this._areCoordsInSelection(D,k,P)}isCellInSelection(M,D){const k=this._model.finalSelectionStart,P=this._model.finalSelectionEnd;return!(!k||!P)&&this._areCoordsInSelection([M,D],k,P)}_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,B;const k=(B=(R=this._linkifier.currentLink)==null?void 0:R.link)==null?void 0:B.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 P=this._getMouseBufferCoords(M);return!!P&&(this._selectWordAt(P,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 P=k.lines.get(this._model.selectionEnd[1]);P&&P.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 P=(0,m.moveToCellSequence)(k[0]-1,k[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(P,!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 P=0;D>=P;P++){const R=M.loadCell(P,this._workCell).getChars().length;this._workCell.getWidth()===0?k--:R>1&&D!==P&&(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,P=!0){if(M[0]>=this._bufferService.cols)return;const R=this._bufferService.buffer,B=R.lines.get(M[1]);if(!B)return;const U=R.translateBufferLineToString(M[1],!1);let V=this._convertViewportColToCharacterIndex(B,M[0]),q=V;const Y=M[0]-V;let W=0,j=0,H=0,z=0;if(U.charAt(V)===" "){for(;V>0&&U.charAt(V-1)===" ";)V--;for(;q<U.length&&U.charAt(q+1)===" ";)q++}else{let re=M[0],he=M[0];B.getWidth(re)===0&&(W++,re--),B.getWidth(he)===2&&(j++,he++);const ge=B.getString(he).length;for(ge>1&&(z+=ge-1,q+=ge-1);re>0&&V>0&&!this._isCharWordSeparator(B.loadCell(re-1,this._workCell));){B.loadCell(re-1,this._workCell);const X=this._workCell.getChars().length;this._workCell.getWidth()===0?(W++,re--):X>1&&(H+=X-1,V-=X-1),V--,re--}for(;he<B.length&&q+1<U.length&&!this._isCharWordSeparator(B.loadCell(he+1,this._workCell));){B.loadCell(he+1,this._workCell);const X=this._workCell.getChars().length;this._workCell.getWidth()===2?(j++,he++):X>1&&(z+=X-1,q+=X-1),q++,he++}}q++;let F=V+Y-W+H,Z=Math.min(this._bufferService.cols,q-V+W+j-H-z);if(D||U.slice(V,q).trim()!==""){if(k&&F===0&&B.getCodePoint(0)!==32){const re=R.lines.get(M[1]-1);if(re&&B.isWrapped&&re.getCodePoint(this._bufferService.cols-1)!==32){const he=this._getWordAt([this._bufferService.cols-1,M[1]-1],!1,!0,!1);if(he){const ge=this._bufferService.cols-he.start;F-=ge,Z+=ge}}}if(P&&F+Z===this._bufferService.cols&&B.getCodePoint(this._bufferService.cols-1)!==32){const re=R.lines.get(M[1]+1);if(re!=null&&re.isWrapped&&re.getCodePoint(0)!==32){const he=this._getWordAt([0,M[1]+1],!1,!1,!0);he&&(Z+=he.length)}}return{start:F,length:Z}}}_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 P,R=arguments.length,B=R<3?M:k===null?k=Object.getOwnPropertyDescriptor(M,D):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(O,M,D,k);else for(var U=O.length-1;U>=0;U--)(P=O[U])&&(B=(R<3?P(B):R>3?P(M,D,B):P(M,D))||B);return R>3&&B&&Object.defineProperty(M,D,B),B},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],P=M[D/6%6|0],R=M[D%6];O.push({css:m.channels.toCss(k,P,R),rgba:m.channels.toRgba(k,P,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,P=L.rgba>>16&255,R=L.rgba>>8&255;return c=k+Math.round((O-k)*u),f=P+Math.round((M-P)*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,P=x>>8&255;let R=O>>24&255,B=O>>16&255,U=O>>8&255,V=b(_.relativeLuminance2(R,B,U),_.relativeLuminance2(D,k,P));for(;V<M&&(R>0||B>0||U>0);)R-=Math.max(0,Math.ceil(.1*R)),B-=Math.max(0,Math.ceil(.1*B)),U-=Math.max(0,Math.ceil(.1*U)),V=b(_.relativeLuminance2(R,B,U),_.relativeLuminance2(D,k,P));return(R<<24|B<<16|U<<8|255)>>>0}function L(x,O,M){const D=x>>24&255,k=x>>16&255,P=x>>8&255;let R=O>>24&255,B=O>>16&255,U=O>>8&255,V=b(_.relativeLuminance2(R,B,U),_.relativeLuminance2(D,k,P));for(;V<M&&(R<255||B<255||U<255);)R=Math.min(255,R+Math.ceil(.1*(255-R))),B=Math.min(255,B+Math.ceil(.1*(255-B))),U=Math.min(255,U+Math.ceil(.1*(255-U))),V=b(_.relativeLuminance2(R,B,U),_.relativeLuminance2(D,k,P));return(R<<24|B<<16|U<<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,P=x>>24&255,R=x>>16&255,B=x>>8&255;return c=P+Math.round((M-P)*u),f=R+Math.round((D-R)*u),v=B+Math.round((k-B)*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 B=E(x,O,M),U=b(D,_.relativeLuminance(B>>8));if(U<M){const V=L(x,O,M);return U>b(D,_.relativeLuminance(V>>8))?B:V}return B}const P=L(x,O,M),R=b(D,_.relativeLuminance(P>>8));if(R<M){const B=E(x,O,M);return R>b(D,_.relativeLuminance(B>>8))?P:B}return P}},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((P=>{var R;(R=this._onScrollApi)==null||R.fire(P.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(P){for(const R in P)this.optionsService.options[R]=P[R]}constructor(P){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(P)),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,B)=>this._inputHandler.parse(R,B)))),this.register((0,d.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(P,R){this._writeBuffer.write(P,R)}writeSync(P,R){this._logService.logLevel<=v.LogLevelEnum.WARN&&!M&&(this._logService.warn("writeSync is unreliable and will be removed soon."),M=!0),this._writeBuffer.writeSync(P,R)}input(P,R=!0){this.coreService.triggerDataEvent(P,R)}resize(P,R){isNaN(P)||isNaN(R)||(P=Math.max(P,w.MINIMUM_COLS),R=Math.max(R,w.MINIMUM_ROWS),this._bufferService.resize(P,R))}scroll(P,R=!1){this._bufferService.scroll(P,R)}scrollLines(P,R,B){this._bufferService.scrollLines(P,R,B)}scrollPages(P){this.scrollLines(P*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(P){const R=P-this._bufferService.buffer.ydisp;R!==0&&this.scrollLines(R)}registerEscHandler(P,R){return this._inputHandler.registerEscHandler(P,R)}registerDcsHandler(P,R){return this._inputHandler.registerDcsHandler(P,R)}registerCsiHandler(P,R){return this._inputHandler.registerCsiHandler(P,R)}registerOscHandler(P,R){return this._inputHandler.registerOscHandler(P,R)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let P=!1;const R=this.optionsService.rawOptions.windowsPty;R&&R.buildNumber!==void 0&&R.buildNumber!==void 0?P=R.backend==="conpty"&&R.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(P=!0),P?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const P=[];P.push(this.onLineFeed(E.updateWindowsModeWrappedState.bind(null,this._bufferService))),P.push(this.registerCsiHandler({final:"H"},(()=>((0,E.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,f.toDisposable)((()=>{for(const R of P)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(W,j,H,z){var F,Z=arguments.length,re=Z<3?j:z===null?z=Object.getOwnPropertyDescriptor(j,H):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")re=Reflect.decorate(W,j,H,z);else for(var he=W.length-1;he>=0;he--)(F=W[he])&&(re=(Z<3?F(re):Z>3?F(j,H,re):F(j,H))||re);return Z>3&&re&&Object.defineProperty(j,H,re),re},v=this&&this.__param||function(W,j){return function(H,z){j(H,z,W)}};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},P=131072;function R(W,j){if(W>24)return j.setWinLines||!1;switch(W){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 B;(function(W){W[W.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",W[W.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(B||(a.WindowsOptionsReportType=B={}));let U=0;class V extends C.Disposable{getAttrData(){return this._curAttrData}constructor(j,H,z,F,Z,re,he,ge,X=new w.EscapeSequenceParser){super(),this._bufferService=j,this._charsetService=H,this._coreService=z,this._logService=F,this._optionsService=Z,this._oscLinkService=re,this._coreMouseService=he,this._unicodeService=ge,this._parser=X,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 q(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((G=>this._activeBuffer=G.activeBuffer))),this._parser.setCsiHandlerFallback(((G,ee)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(G),params:ee.toArray()})})),this._parser.setEscHandlerFallback((G=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(G)})})),this._parser.setExecuteHandlerFallback((G=>{this._logService.debug("Unknown EXECUTE code: ",{code:G})})),this._parser.setOscHandlerFallback(((G,ee,Q)=>{this._logService.debug("Unknown OSC code: ",{identifier:G,action:ee,data:Q})})),this._parser.setDcsHandlerFallback(((G,ee,Q)=>{ee==="HOOK"&&(Q=Q.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(G),action:ee,payload:Q})})),this._parser.setPrintHandler(((G,ee,Q)=>this.print(G,ee,Q))),this._parser.registerCsiHandler({final:"@"},(G=>this.insertChars(G))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(G=>this.scrollLeft(G))),this._parser.registerCsiHandler({final:"A"},(G=>this.cursorUp(G))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(G=>this.scrollRight(G))),this._parser.registerCsiHandler({final:"B"},(G=>this.cursorDown(G))),this._parser.registerCsiHandler({final:"C"},(G=>this.cursorForward(G))),this._parser.registerCsiHandler({final:"D"},(G=>this.cursorBackward(G))),this._parser.registerCsiHandler({final:"E"},(G=>this.cursorNextLine(G))),this._parser.registerCsiHandler({final:"F"},(G=>this.cursorPrecedingLine(G))),this._parser.registerCsiHandler({final:"G"},(G=>this.cursorCharAbsolute(G))),this._parser.registerCsiHandler({final:"H"},(G=>this.cursorPosition(G))),this._parser.registerCsiHandler({final:"I"},(G=>this.cursorForwardTab(G))),this._parser.registerCsiHandler({final:"J"},(G=>this.eraseInDisplay(G,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(G=>this.eraseInDisplay(G,!0))),this._parser.registerCsiHandler({final:"K"},(G=>this.eraseInLine(G,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(G=>this.eraseInLine(G,!0))),this._parser.registerCsiHandler({final:"L"},(G=>this.insertLines(G))),this._parser.registerCsiHandler({final:"M"},(G=>this.deleteLines(G))),this._parser.registerCsiHandler({final:"P"},(G=>this.deleteChars(G))),this._parser.registerCsiHandler({final:"S"},(G=>this.scrollUp(G))),this._parser.registerCsiHandler({final:"T"},(G=>this.scrollDown(G))),this._parser.registerCsiHandler({final:"X"},(G=>this.eraseChars(G))),this._parser.registerCsiHandler({final:"Z"},(G=>this.cursorBackwardTab(G))),this._parser.registerCsiHandler({final:"`"},(G=>this.charPosAbsolute(G))),this._parser.registerCsiHandler({final:"a"},(G=>this.hPositionRelative(G))),this._parser.registerCsiHandler({final:"b"},(G=>this.repeatPrecedingCharacter(G))),this._parser.registerCsiHandler({final:"c"},(G=>this.sendDeviceAttributesPrimary(G))),this._parser.registerCsiHandler({prefix:">",final:"c"},(G=>this.sendDeviceAttributesSecondary(G))),this._parser.registerCsiHandler({final:"d"},(G=>this.linePosAbsolute(G))),this._parser.registerCsiHandler({final:"e"},(G=>this.vPositionRelative(G))),this._parser.registerCsiHandler({final:"f"},(G=>this.hVPosition(G))),this._parser.registerCsiHandler({final:"g"},(G=>this.tabClear(G))),this._parser.registerCsiHandler({final:"h"},(G=>this.setMode(G))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(G=>this.setModePrivate(G))),this._parser.registerCsiHandler({final:"l"},(G=>this.resetMode(G))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(G=>this.resetModePrivate(G))),this._parser.registerCsiHandler({final:"m"},(G=>this.charAttributes(G))),this._parser.registerCsiHandler({final:"n"},(G=>this.deviceStatus(G))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(G=>this.deviceStatusPrivate(G))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(G=>this.softReset(G))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(G=>this.setCursorStyle(G))),this._parser.registerCsiHandler({final:"r"},(G=>this.setScrollRegion(G))),this._parser.registerCsiHandler({final:"s"},(G=>this.saveCursor(G))),this._parser.registerCsiHandler({final:"t"},(G=>this.windowOptions(G))),this._parser.registerCsiHandler({final:"u"},(G=>this.restoreCursor(G))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(G=>this.insertColumns(G))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(G=>this.deleteColumns(G))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(G=>this.selectProtected(G))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(G=>this.requestMode(G,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(G=>this.requestMode(G,!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((G=>(this.setTitle(G),this.setIconName(G),!0)))),this._parser.registerOscHandler(1,new O.OscHandler((G=>this.setIconName(G)))),this._parser.registerOscHandler(2,new O.OscHandler((G=>this.setTitle(G)))),this._parser.registerOscHandler(4,new O.OscHandler((G=>this.setOrReportIndexedColor(G)))),this._parser.registerOscHandler(8,new O.OscHandler((G=>this.setHyperlink(G)))),this._parser.registerOscHandler(10,new O.OscHandler((G=>this.setOrReportFgColor(G)))),this._parser.registerOscHandler(11,new O.OscHandler((G=>this.setOrReportBgColor(G)))),this._parser.registerOscHandler(12,new O.OscHandler((G=>this.setOrReportCursorColor(G)))),this._parser.registerOscHandler(104,new O.OscHandler((G=>this.restoreIndexedColor(G)))),this._parser.registerOscHandler(110,new O.OscHandler((G=>this.restoreFgColor(G)))),this._parser.registerOscHandler(111,new O.OscHandler((G=>this.restoreBgColor(G)))),this._parser.registerOscHandler(112,new O.OscHandler((G=>this.restoreCursorColor(G)))),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 G in m.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:G},(()=>this.selectCharset("("+G))),this._parser.registerEscHandler({intermediates:")",final:G},(()=>this.selectCharset(")"+G))),this._parser.registerEscHandler({intermediates:"*",final:G},(()=>this.selectCharset("*"+G))),this._parser.registerEscHandler({intermediates:"+",final:G},(()=>this.selectCharset("+"+G))),this._parser.registerEscHandler({intermediates:"-",final:G},(()=>this.selectCharset("-"+G))),this._parser.registerEscHandler({intermediates:".",final:G},(()=>this.selectCharset("."+G))),this._parser.registerEscHandler({intermediates:"/",final:G},(()=>this.selectCharset("/"+G)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((G=>(this._logService.error("Parsing error: ",G),G))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new M.DcsHandler(((G,ee)=>this.requestStatusString(G,ee))))}_preserveStack(j,H,z,F){this._parseStack.paused=!0,this._parseStack.cursorStartX=j,this._parseStack.cursorStartY=H,this._parseStack.decodedLength=z,this._parseStack.position=F}_logSlowResolvingAsync(j){this._logService.logLevel<=L.LogLevelEnum.WARN&&Promise.race([j,new Promise(((H,z)=>setTimeout((()=>z("#SLOW_TIMEOUT")),5e3)))]).catch((H=>{if(H!=="#SLOW_TIMEOUT")throw H;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(j,H){let z,F=this._activeBuffer.x,Z=this._activeBuffer.y,re=0;const he=this._parseStack.paused;if(he){if(z=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,H))return this._logSlowResolvingAsync(z),z;F=this._parseStack.cursorStartX,Z=this._parseStack.cursorStartY,this._parseStack.paused=!1,j.length>P&&(re=this._parseStack.position+P)}if(this._logService.logLevel<=L.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof j=="string"?` "${j}"`:` "${Array.prototype.map.call(j,(G=>String.fromCharCode(G))).join("")}"`),typeof j=="string"?j.split("").map((G=>G.charCodeAt(0))):j),this._parseBuffer.length<j.length&&this._parseBuffer.length<P&&(this._parseBuffer=new Uint32Array(Math.min(j.length,P))),he||this._dirtyRowTracker.clearRange(),j.length>P)for(let G=re;G<j.length;G+=P){const ee=G+P<j.length?G+P:j.length,Q=typeof j=="string"?this._stringDecoder.decode(j.substring(G,ee),this._parseBuffer):this._utf8Decoder.decode(j.subarray(G,ee),this._parseBuffer);if(z=this._parser.parse(this._parseBuffer,Q))return this._preserveStack(F,Z,Q,G),this._logSlowResolvingAsync(z),z}else if(!he){const G=typeof j=="string"?this._stringDecoder.decode(j,this._parseBuffer):this._utf8Decoder.decode(j,this._parseBuffer);if(z=this._parser.parse(this._parseBuffer,G))return this._preserveStack(F,Z,G,0),this._logSlowResolvingAsync(z),z}this._activeBuffer.x===F&&this._activeBuffer.y===Z||this._onCursorMove.fire();const ge=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),X=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);X<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(X,this._bufferService.rows-1),Math.min(ge,this._bufferService.rows-1))}print(j,H,z){let F,Z;const re=this._charsetService.charset,he=this._optionsService.rawOptions.screenReaderMode,ge=this._bufferService.cols,X=this._coreService.decPrivateModes.wraparound,G=this._coreService.modes.insertMode,ee=this._curAttrData;let Q=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&z-H>0&&Q.getWidth(this._activeBuffer.x-1)===2&&Q.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ee);let se=this._parser.precedingJoinState;for(let te=H;te<z;++te){if(F=j[te],F<127&&re){const Le=re[String.fromCharCode(F)];Le&&(F=Le.charCodeAt(0))}const me=this._unicodeService.charProperties(F,se);Z=x.UnicodeService.extractWidth(me);const fe=x.UnicodeService.extractShouldJoin(me),ye=fe?x.UnicodeService.extractWidth(se):0;if(se=me,he&&this._onA11yChar.fire((0,_.stringFromCodePoint)(F)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+Z-ye>ge){if(X){const Le=Q;let be=this._activeBuffer.x-ye;for(this._activeBuffer.x=ye,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),Q=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),ye>0&&Q instanceof d.BufferLine&&Q.copyCellsFrom(Le,be,0,ye,!1);be<ge;)Le.setCellFromCodepoint(be++,0,1,ee)}else if(this._activeBuffer.x=ge-1,Z===2)continue}if(fe&&this._activeBuffer.x){const Le=Q.getWidth(this._activeBuffer.x-1)?1:2;Q.addCodepointToCell(this._activeBuffer.x-Le,F,Z);for(let be=Z-ye;--be>=0;)Q.setCellFromCodepoint(this._activeBuffer.x++,0,0,ee)}else if(G&&(Q.insertCells(this._activeBuffer.x,Z-ye,this._activeBuffer.getNullCell(ee)),Q.getWidth(ge-1)===2&&Q.setCellFromCodepoint(ge-1,b.NULL_CELL_CODE,b.NULL_CELL_WIDTH,ee)),Q.setCellFromCodepoint(this._activeBuffer.x++,F,Z,ee),Z>0)for(;--Z;)Q.setCellFromCodepoint(this._activeBuffer.x++,0,0,ee)}this._parser.precedingJoinState=se,this._activeBuffer.x<ge&&z-H>0&&Q.getWidth(this._activeBuffer.x)===0&&!Q.hasContent(this._activeBuffer.x)&&Q.setCellFromCodepoint(this._activeBuffer.x,0,1,ee),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(j,H){return j.final!=="t"||j.prefix||j.intermediates?this._parser.registerCsiHandler(j,H):this._parser.registerCsiHandler(j,(z=>!R(z.params[0],this._optionsService.rawOptions.windowOptions)||H(z)))}registerDcsHandler(j,H){return this._parser.registerDcsHandler(j,new M.DcsHandler(H))}registerEscHandler(j,H){return this._parser.registerEscHandler(j,H)}registerOscHandler(j,H){return this._parser.registerOscHandler(j,new O.OscHandler(H))}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 H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);H.hasWidth(this._activeBuffer.x)&&!H.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,H){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=j,this._activeBuffer.y=this._activeBuffer.scrollTop+H):(this._activeBuffer.x=j,this._activeBuffer.y=H),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(j,H){this._restrictCursor(),this._setCursor(this._activeBuffer.x+j,this._activeBuffer.y+H)}cursorUp(j){const H=this._activeBuffer.y-this._activeBuffer.scrollTop;return H>=0?this._moveCursor(0,-Math.min(H,j.params[0]||1)):this._moveCursor(0,-(j.params[0]||1)),!0}cursorDown(j){const H=this._activeBuffer.scrollBottom-this._activeBuffer.y;return H>=0?this._moveCursor(0,Math.min(H,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 H=j.params[0];return H===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:H===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(j){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let H=j.params[0]||1;for(;H--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(j){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let H=j.params[0]||1;for(;H--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(j){const H=j.params[0];return H===1&&(this._curAttrData.bg|=536870912),H!==2&&H!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(j,H,z,F=!1,Z=!1){const re=this._activeBuffer.lines.get(this._activeBuffer.ybase+j);re.replaceCells(H,z,this._activeBuffer.getNullCell(this._eraseAttrData()),Z),F&&(re.isWrapped=!1)}_resetBufferLine(j,H=!1){const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+j);z&&(z.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),H),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+j),z.isWrapped=!1)}eraseInDisplay(j,H=!1){let z;switch(this._restrictCursor(this._bufferService.cols),j.params[0]){case 0:for(z=this._activeBuffer.y,this._dirtyRowTracker.markDirty(z),this._eraseInBufferLine(z++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,H);z<this._bufferService.rows;z++)this._resetBufferLine(z,H);this._dirtyRowTracker.markDirty(z);break;case 1:for(z=this._activeBuffer.y,this._dirtyRowTracker.markDirty(z),this._eraseInBufferLine(z,0,this._activeBuffer.x+1,!0,H),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(z+1).isWrapped=!1);z--;)this._resetBufferLine(z,H);this._dirtyRowTracker.markDirty(0);break;case 2:for(z=this._bufferService.rows,this._dirtyRowTracker.markDirty(z-1);z--;)this._resetBufferLine(z,H);this._dirtyRowTracker.markDirty(0);break;case 3:const F=this._activeBuffer.lines.length-this._bufferService.rows;F>0&&(this._activeBuffer.lines.trimStart(F),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-F,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-F,0),this._onScroll.fire(0))}return!0}eraseInLine(j,H=!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,H);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,H);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,H)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(j){this._restrictCursor();let H=j.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=this._activeBuffer.ybase+this._activeBuffer.y,F=this._bufferService.rows-1-this._activeBuffer.scrollBottom,Z=this._bufferService.rows-1+this._activeBuffer.ybase-F+1;for(;H--;)this._activeBuffer.lines.splice(Z-1,1),this._activeBuffer.lines.splice(z,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 H=j.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=this._activeBuffer.ybase+this._activeBuffer.y;let F;for(F=this._bufferService.rows-1-this._activeBuffer.scrollBottom,F=this._bufferService.rows-1+this._activeBuffer.ybase-F;H--;)this._activeBuffer.lines.splice(z,1),this._activeBuffer.lines.splice(F,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 H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.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 H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.deleteCells(this._activeBuffer.x,j.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(j){let H=j.params[0]||1;for(;H--;)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 H=j.params[0]||1;for(;H--;)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 H=j.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);F.deleteCells(0,H,this._activeBuffer.getNullCell(this._eraseAttrData())),F.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 H=j.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);F.insertCells(0,H,this._activeBuffer.getNullCell(this._eraseAttrData())),F.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 H=j.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);F.insertCells(this._activeBuffer.x,H,this._activeBuffer.getNullCell(this._eraseAttrData())),F.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 H=j.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);F.deleteCells(this._activeBuffer.x,H,this._activeBuffer.getNullCell(this._eraseAttrData())),F.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(j){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.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 H=this._parser.precedingJoinState;if(!H)return!0;const z=j.params[0]||1,F=x.UnicodeService.extractWidth(H),Z=this._activeBuffer.x-F,re=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(Z),he=new Uint32Array(re.length*z);let ge=0;for(let G=0;G<re.length;){const ee=re.codePointAt(G)||0;he[ge++]=ee,G+=ee>65535?2:1}let X=ge;for(let G=1;G<z;++G)he.copyWithin(X,0,ge),X+=ge;return this.print(he,0,X),!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 H=0;H<j.length;H++)switch(j.params[H]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(j){for(let H=0;H<j.length;H++)switch(j.params[H]){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 H=0;H<j.length;H++)switch(j.params[H]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(j){for(let H=0;H<j.length;H++)switch(j.params[H]){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[H]===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,H){const z=this._coreService.decPrivateModes,{activeProtocol:F,activeEncoding:Z}=this._coreMouseService,re=this._coreService,{buffers:he,cols:ge}=this._bufferService,{active:X,alt:G}=he,ee=this._optionsService.rawOptions,Q=fe=>fe?1:2,se=j.params[0];return te=se,me=H?se===2?4:se===4?Q(re.modes.insertMode):se===12?3:se===20?Q(ee.convertEol):0:se===1?Q(z.applicationCursorKeys):se===3?ee.windowOptions.setWinLines?ge===80?2:ge===132?1:0:0:se===6?Q(z.origin):se===7?Q(z.wraparound):se===8?3:se===9?Q(F==="X10"):se===12?Q(ee.cursorBlink):se===25?Q(!re.isCursorHidden):se===45?Q(z.reverseWraparound):se===66?Q(z.applicationKeypad):se===67?4:se===1e3?Q(F==="VT200"):se===1002?Q(F==="DRAG"):se===1003?Q(F==="ANY"):se===1004?Q(z.sendFocus):se===1005?4:se===1006?Q(Z==="SGR"):se===1015?4:se===1016?Q(Z==="SGR_PIXELS"):se===1048?1:se===47||se===1047||se===1049?Q(X===G):se===2004?Q(z.bracketedPasteMode):0,re.triggerDataEvent(`${u.C0.ESC}[${H?"":"?"}${te};${me}$y`),!0;var te,me}_updateAttrColor(j,H,z,F,Z){return H===2?(j|=50331648,j&=-16777216,j|=E.AttributeData.fromColorRGB([z,F,Z])):H===5&&(j&=-50331904,j|=33554432|255&z),j}_extractColor(j,H,z){const F=[0,0,-1,0,0,0];let Z=0,re=0;do{if(F[re+Z]=j.params[H+re],j.hasSubParams(H+re)){const he=j.getSubParams(H+re);let ge=0;do F[1]===5&&(Z=1),F[re+ge+1+Z]=he[ge];while(++ge<he.length&&ge+re+1+Z<F.length);break}if(F[1]===5&&re+Z>=2||F[1]===2&&re+Z>=5)break;F[1]&&(Z=1)}while(++re+H<j.length&&re+Z<F.length);for(let he=2;he<F.length;++he)F[he]===-1&&(F[he]=0);switch(F[0]){case 38:z.fg=this._updateAttrColor(z.fg,F[1],F[3],F[4],F[5]);break;case 48:z.bg=this._updateAttrColor(z.bg,F[1],F[3],F[4],F[5]);break;case 58:z.extended=z.extended.clone(),z.extended.underlineColor=this._updateAttrColor(z.extended.underlineColor,F[1],F[3],F[4],F[5])}return re}_processUnderline(j,H){H.extended=H.extended.clone(),(!~j||j>5)&&(j=1),H.extended.underlineStyle=j,H.fg|=268435456,j===0&&(H.fg&=-268435457),H.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 H=j.length;let z;const F=this._curAttrData;for(let Z=0;Z<H;Z++)z=j.params[Z],z>=30&&z<=37?(F.fg&=-50331904,F.fg|=16777216|z-30):z>=40&&z<=47?(F.bg&=-50331904,F.bg|=16777216|z-40):z>=90&&z<=97?(F.fg&=-50331904,F.fg|=16777224|z-90):z>=100&&z<=107?(F.bg&=-50331904,F.bg|=16777224|z-100):z===0?this._processSGR0(F):z===1?F.fg|=134217728:z===3?F.bg|=67108864:z===4?(F.fg|=268435456,this._processUnderline(j.hasSubParams(Z)?j.getSubParams(Z)[0]:1,F)):z===5?F.fg|=536870912:z===7?F.fg|=67108864:z===8?F.fg|=1073741824:z===9?F.fg|=2147483648:z===2?F.bg|=134217728:z===21?this._processUnderline(2,F):z===22?(F.fg&=-134217729,F.bg&=-134217729):z===23?F.bg&=-67108865:z===24?(F.fg&=-268435457,this._processUnderline(0,F)):z===25?F.fg&=-536870913:z===27?F.fg&=-67108865:z===28?F.fg&=-1073741825:z===29?F.fg&=2147483647:z===39?(F.fg&=-67108864,F.fg|=16777215&d.DEFAULT_ATTR_DATA.fg):z===49?(F.bg&=-67108864,F.bg|=16777215&d.DEFAULT_ATTR_DATA.bg):z===38||z===48||z===58?Z+=this._extractColor(j,Z,F):z===53?F.bg|=1073741824:z===55?F.bg&=-1073741825:z===59?(F.extended=F.extended.clone(),F.extended.underlineColor=-1,F.updateExtended()):z===100?(F.fg&=-67108864,F.fg|=16777215&d.DEFAULT_ATTR_DATA.fg,F.bg&=-67108864,F.bg|=16777215&d.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",z);return!0}deviceStatus(j){switch(j.params[0]){case 5:this._coreService.triggerDataEvent(`${u.C0.ESC}[0n`);break;case 6:const H=this._activeBuffer.y+1,z=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[${H};${z}R`)}return!0}deviceStatusPrivate(j){if(j.params[0]===6){const H=this._activeBuffer.y+1,z=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[?${H};${z}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 H=j.params[0]||1;switch(H){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 z=H%2==1;return this._optionsService.options.cursorBlink=z,!0}setScrollRegion(j){const H=j.params[0]||1;let z;return(j.length<2||(z=j.params[1])>this._bufferService.rows||z===0)&&(z=this._bufferService.rows),z>H&&(this._activeBuffer.scrollTop=H-1,this._activeBuffer.scrollBottom=z-1,this._setCursor(0,0)),!0}windowOptions(j){if(!R(j.params[0],this._optionsService.rawOptions.windowOptions))return!0;const H=j.length>1?j.params[1]:0;switch(j.params[0]){case 14:H!==2&&this._onRequestWindowsOptionsReport.fire(B.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(B.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:H!==0&&H!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),H!==0&&H!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:H!==0&&H!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),H!==0&&H!==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 H=[],z=j.split(";");for(;z.length>1;){const F=z.shift(),Z=z.shift();if(/^\d+$/.exec(F)){const re=parseInt(F);if(Y(re))if(Z==="?")H.push({type:0,index:re});else{const he=(0,D.parseColor)(Z);he&&H.push({type:1,index:re,color:he})}}}return H.length&&this._onColor.fire(H),!0}setHyperlink(j){const H=j.split(";");return!(H.length<2)&&(H[1]?this._createHyperlink(H[0],H[1]):!H[0]&&this._finishHyperlink())}_createHyperlink(j,H){this._getCurrentLinkId()&&this._finishHyperlink();const z=j.split(":");let F;const Z=z.findIndex((re=>re.startsWith("id=")));return Z!==-1&&(F=z[Z].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:F,uri:H}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(j,H){const z=j.split(";");for(let F=0;F<z.length&&!(H>=this._specialColors.length);++F,++H)if(z[F]==="?")this._onColor.fire([{type:0,index:this._specialColors[H]}]);else{const Z=(0,D.parseColor)(z[F]);Z&&this._onColor.fire([{type:1,index:this._specialColors[H],color:Z}])}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 H=[],z=j.split(";");for(let F=0;F<z.length;++F)if(/^\d+$/.exec(z[F])){const Z=parseInt(z[F]);Y(Z)&&H.push({type:2,index:Z})}return H.length&&this._onColor.fire(H),!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 H=0;H<this._bufferService.rows;++H){const z=this._activeBuffer.ybase+this._activeBuffer.y+H,F=this._activeBuffer.lines.get(z);F&&(F.fill(j),F.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(j,H){const z=this._bufferService.buffer,F=this._optionsService.rawOptions;return(Z=>(this._coreService.triggerDataEvent(`${u.C0.ESC}${Z}${u.C0.ESC}\\`),!0))(j==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:j==='"p'?'P1$r61;1"p':j==="r"?`P1$r${z.scrollTop+1};${z.scrollBottom+1}r`:j==="m"?"P1$r0m":j===" q"?`P1$r${{block:2,underline:4,bar:6}[F.cursorStyle]-(F.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(j,H){this._dirtyRowTracker.markRangeDirty(j,H)}}a.InputHandler=V;let q=class{constructor(W){this._bufferService=W,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(W){W<this.start?this.start=W:W>this.end&&(this.end=W)}markRangeDirty(W,j){W>j&&(U=W,W=j,j=U),W<this.start&&(this.start=W),j>this.end&&(this.end=j)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Y(W){return 0<=W&&W<256}q=f([v(0,L.IBufferService)],q)},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 P=D[D.length-1].getTrimmedLength(),R=(0,w.reflowSmallerGetNewLineLengths)(D,this._cols,b),B=R.length-D.length;let U;U=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+B):Math.max(0,this.lines.length-this.lines.maxLength+B);const V=[];for(let z=0;z<B;z++){const F=this.getBlankLine(m.DEFAULT_ATTR_DATA,!0);V.push(F)}V.length>0&&(L.push({start:O+D.length+x,newLines:V}),x+=V.length),D.push(...V);let q=R.length-1,Y=R[q];Y===0&&(q--,Y=R[q]);let W=D.length-B-1,j=P;for(;W>=0;){const z=Math.min(j,Y);if(D[q]===void 0)break;if(D[q].copyCellsFrom(D[W],j-z,Y-z,z,!0),Y-=z,Y===0&&(q--,Y=R[q]),j-=z,j===0){W--;const F=Math.max(W,0);j=(0,w.getWrappedLineTrimmedLength)(D,F,this._cols)}}for(let z=0;z<D.length;z++)R[z]<b&&D[z].setCell(R[z],E);let H=B-U;for(;H-- >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+B,this.ybase+S-1)}if(L.length>0){const O=[],M=[];for(let q=0;q<this.lines.length;q++)M.push(this.lines.get(q));const D=this.lines.length;let k=D-1,P=0,R=L[P];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+x);let B=0;for(let q=Math.min(this.lines.maxLength-1,D+x-1);q>=0;q--)if(R&&R.start>k+B){for(let Y=R.newLines.length-1;Y>=0;Y--)this.lines.set(q--,R.newLines[Y]);q++,O.push({index:k+1,amount:R.newLines.length}),B+=R.newLines.length,R=L[++P]}else this.lines.set(q,M[k--]);let U=0;for(let q=O.length-1;q>=0;q--)O[q].index+=U,this.lines.onInsertEmitter.fire(O[q]),U+=O[q].amount;const V=Math.max(0,D+x-this.lines.maxLength);V>0&&this.lines.onTrimEmitter.fire(V)}}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,P=Math.min(D,k);b[S].copyCellsFrom(b[L],x,E,P,!1),E+=P,E===u&&(S++,E=0),x+=P,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=`
|
|
58
|
-
`,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 B=M+1;;++B){if(B>=b||(L=y[B])<32||L>126&&L<C){this._printHandler(y,M,B),M=B-1;break}if(++B>=b||(L=y[B])<32||L>126&&L<C){this._printHandler(y,M,B),M=B-1;break}if(++B>=b||(L=y[B])<32||L>126&&L<C){this._printHandler(y,M,B),M=B-1;break}if(++B>=b||(L=y[B])<32||L>126&&L<C){this._printHandler(y,M,B),M=B-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 P=this._escHandlers[this._collect<<8|L];let R=P?P.length-1:-1;for(;R>=0&&(E=P[R](),E!==!0);R--)if(E instanceof Promise)return this._preserveStack(4,P,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 B=M+1;;++B)if(B>=b||(L=y[B])===24||L===26||L===27||L>127&&L<C){this._dcsParser.put(y,M,B),M=B-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 B=M+1;;B++)if(B>=b||(L=y[B])<32||L>127&&L<C){this._oscParser.put(y,M,B),M=B-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}},i={};function o(g){var a=i[g];if(a!==void 0)return a.exports;var c=i[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
|
|
59
|
-
`,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})()))})(Kv)),Kv.exports}var UR=$R(),Yv={exports:{}},mS;function FR(){return mS||(mS=1,(function(e,t){(function(r,i){e.exports=i()})(self,(()=>(()=>{var r={};return(()=>{var i=r;Object.defineProperty(i,"__esModule",{value:!0}),i.FitAddon=void 0,i.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})()))})(Yv)),Yv.exports}var WR=FR(),Vv={exports:{}},yS;function qR(){return yS||(yS=1,(function(e,t){(function(r,i){e.exports=i()})(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
|
|
60
|
-
layout (location = 0) in vec2 a_unitquad;
|
|
61
|
-
layout (location = 1) in vec2 a_cellpos;
|
|
62
|
-
layout (location = 2) in vec2 a_offset;
|
|
63
|
-
layout (location = 3) in vec2 a_size;
|
|
64
|
-
layout (location = 4) in float a_texpage;
|
|
65
|
-
layout (location = 5) in vec2 a_texcoord;
|
|
66
|
-
layout (location = 6) in vec2 a_texsize;
|
|
67
|
-
|
|
68
|
-
uniform mat4 u_projection;
|
|
69
|
-
uniform vec2 u_resolution;
|
|
70
|
-
|
|
71
|
-
out vec2 v_texcoord;
|
|
72
|
-
flat out int v_texpage;
|
|
73
|
-
|
|
74
|
-
void main() {
|
|
75
|
-
vec2 zeroToOne = (a_offset / u_resolution) + a_cellpos + (a_unitquad * a_size);
|
|
76
|
-
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
77
|
-
v_texpage = int(a_texpage);
|
|
78
|
-
v_texcoord = a_texcoord + a_unitquad * a_texsize;
|
|
79
|
-
}`,(function(q){let Y="";for(let W=1;W<q;W++)Y+=` else if (v_texpage == ${W}) { outColor = texture(u_texture[${W}], v_texcoord); }`;return`#version 300 es
|
|
80
|
-
precision lowp float;
|
|
81
|
-
|
|
82
|
-
in vec2 v_texcoord;
|
|
83
|
-
flat in int v_texpage;
|
|
84
|
-
|
|
85
|
-
uniform sampler2D u_texture[${q}];
|
|
86
|
-
|
|
87
|
-
out vec4 outColor;
|
|
88
|
-
|
|
89
|
-
void main() {
|
|
90
|
-
if (v_texpage == 0) {
|
|
91
|
-
outColor = texture(u_texture[0], v_texcoord);
|
|
92
|
-
} ${Y}
|
|
93
|
-
}`})(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 P=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,P,k.STATIC_DRAW),k.enableVertexAttribArray(0),k.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const B=new Uint8Array([0,1,2,3]),U=k.createBuffer();this.register((0,m.toDisposable)((()=>k.deleteBuffer(U)))),k.bindBuffer(k.ELEMENT_ARRAY_BUFFER,U),k.bufferData(k.ELEMENT_ARRAY_BUFFER,B,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 V=new Int32Array(v.TextureAtlas.maxAtlasPages);for(let q=0;q<v.TextureAtlas.maxAtlasPages;q++)V[q]=q;k.uniform1iv(this._textureLocation,V),k.uniformMatrix4fv(this._projectionLocation,!1,w.PROJECTION_MATRIX),this._atlasTextures=[];for(let q=0;q<v.TextureAtlas.maxAtlasPages;q++){const Y=new w.GLTexture((0,f.throwIfFalsy)(k.createTexture()));this.register((0,m.toDisposable)((()=>k.deleteTexture(Y.texture)))),k.activeTexture(k.TEXTURE0+q),k.bindTexture(k.TEXTURE_2D,Y.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[q]=Y}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,P,R,B,U){this._updateCell(this._vertices.attributes,x,O,M,D,k,P,R,B,U)}_updateCell(x,O,M,D,k,P,R,B,U,V){y=(M*this._terminal.cols+O)*C,D!==u.NULL_CELL_CODE&&D!==void 0?this._atlas&&(d=B&&B.length>1?this._atlas.getRasterizedGlyphCombinedChar(B,k,P,R,!1):this._atlas.getRasterizedGlyph(D,k,P,R,!1),b=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),k!==V&&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,U,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 P=k*this._terminal.cols*C,R=this._vertices.attributes.subarray(P,P+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,P){super(),this._terminal=M,this._gl=D,this._dimensions=k,this._themeService=P,this._vertices=new C,this._verticesCursor=new C;const R=this._gl;this._program=(0,f.throwIfFalsy)((0,m.createProgram)(R,`#version 300 es
|
|
94
|
-
layout (location = 0) in vec2 a_position;
|
|
95
|
-
layout (location = 1) in vec2 a_size;
|
|
96
|
-
layout (location = 2) in vec4 a_color;
|
|
97
|
-
layout (location = 3) in vec2 a_unitquad;
|
|
98
|
-
|
|
99
|
-
uniform mat4 u_projection;
|
|
100
|
-
|
|
101
|
-
out vec4 v_color;
|
|
102
|
-
|
|
103
|
-
void main() {
|
|
104
|
-
vec2 zeroToOne = a_position + (a_unitquad * a_size);
|
|
105
|
-
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
106
|
-
v_color = a_color;
|
|
107
|
-
}`,`#version 300 es
|
|
108
|
-
precision lowp float;
|
|
109
|
-
|
|
110
|
-
in vec4 v_color;
|
|
111
|
-
|
|
112
|
-
out vec4 outColor;
|
|
113
|
-
|
|
114
|
-
void main() {
|
|
115
|
-
outColor = v_color;
|
|
116
|
-
}`)),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 B=new Float32Array([0,0,1,0,0,1,1,1]),U=R.createBuffer();this.register((0,v.toDisposable)((()=>R.deleteBuffer(U)))),R.bindBuffer(R.ARRAY_BUFFER,U),R.bufferData(R.ARRAY_BUFFER,B,R.STATIC_DRAW),R.enableVertexAttribArray(3),R.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const V=new Uint8Array([0,1,2,3]),q=R.createBuffer();this.register((0,v.toDisposable)((()=>R.deleteBuffer(q)))),R.bindBuffer(R.ELEMENT_ARRAY_BUFFER,q),R.bufferData(R.ELEMENT_ARRAY_BUFFER,V,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(P.colors),this.register(this._themeService.onChangeColors((Y=>{this._updateCachedColors(Y),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 P,R,B,U,V,q,Y,W,j,H,z,F=1;for(P=0;P<D.rows;P++){for(B=-1,U=0,V=0,q=!1,R=0;R<D.cols;R++)Y=(P*D.cols+R)*u.RENDER_MODEL_INDICIES_PER_CELL,W=M.cells[Y+u.RENDER_MODEL_BG_OFFSET],j=M.cells[Y+u.RENDER_MODEL_FG_OFFSET],H=!!(67108864&j),(W!==U||j!==V&&(q||H))&&((U!==0||q&&V!==0)&&(z=8*F++,this._updateRectangle(k,z,V,U,B,R,P)),B=R,U=W,V=j,q=H);(U!==0||q&&V!==0)&&(z=8*F++,this._updateRectangle(k,z,V,U,B,D.cols,P))}k.count=F}updateCursor(M){const D=this._verticesCursor,k=M.cursor;if(!k||k.style==="block")return void(D.count=0);let P,R=0;k.style!=="bar"&&k.style!=="outline"||(P=8*R++,this._addRectangleFloat(D.attributes,P,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"||(P=8*R++,this._addRectangleFloat(D.attributes,P,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"&&(P=8*R++,this._addRectangleFloat(D.attributes,P,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),P=8*R++,this._addRectangleFloat(D.attributes,P,(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,P,R,B,U){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&P){case 16777216:case 33554432:_=this._themeService.colors.ansi[255&P].rgba;break;case 50331648:_=(16777215&P)<<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=U*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,(B-R)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,b,S,E,L)}_addRectangle(M,D,k,P,R,B,U,V,q,Y){M[D]=k/this._dimensions.device.canvas.width,M[D+1]=P/this._dimensions.device.canvas.height,M[D+2]=R/this._dimensions.device.canvas.width,M[D+3]=B/this._dimensions.device.canvas.height,M[D+4]=U,M[D+5]=V,M[D+6]=q,M[D+7]=Y}_addRectangleFloat(M,D,k,P,R,B,U){M[D]=k/this._dimensions.device.canvas.width,M[D+1]=P/this._dimensions.device.canvas.height,M[D+2]=R/this._dimensions.device.canvas.width,M[D+3]=B/this._dimensions.device.canvas.height,M[D+4]=U[0],M[D+5]=U[1],M[D+6]=U[2],M[D+7]=U[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,B,U,V,q,Y,W,j,H){super(),this._terminal=R,this._characterJoinerService=B,this._charSizeService=U,this._coreBrowserService=V,this._coreService=q,this._decorationService=Y,this._optionsService=W,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,W,this._themeService)],this.dimensions=(0,C.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(W.onOptionChange((()=>this._handleOptionsChanged()))),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const z={antialias:!1,depth:!1,preserveDrawingBuffer:H};if(this._gl=this._canvas.getContext("webgl2",z),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,f.addDisposableDomListener)(this._canvas,"webglcontextlost",(F=>{console.log("webglcontextlost event received"),F.preventDefault(),this._contextRestorationTimeout=setTimeout((()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(F)}),3e3)}))),this.register((0,f.addDisposableDomListener)(this._canvas,"webglcontextrestored",(F=>{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,((F,Z)=>this._setCanvasDevicePixelDimensions(F,Z))),this.register(this._coreBrowserService.onWindowChange((F=>{this._observerDisposable.value=(0,w.observeDevicePixelDimensions)(this._canvas,F,((Z,re)=>this._setCanvasDevicePixelDimensions(Z,re)))}))),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 F;for(const Z of this._renderLayers)Z.dispose();(F=this._canvas.parentElement)==null||F.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,B){var U,V,q,Y;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const W of this._renderLayers)W.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`,(U=this._rectangleRenderer.value)==null||U.setDimensions(this.dimensions),(V=this._rectangleRenderer.value)==null||V.handleResize(),(q=this._glyphRenderer.value)==null||q.setDimensions(this.dimensions),(Y=this._glyphRenderer.value)==null||Y.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var R;for(const B of this._renderLayers)B.handleBlur(this._terminal);(R=this._cursorBlinkStateManager.value)==null||R.pause(),this._requestRedrawViewport()}handleFocus(){var R;for(const B of this._renderLayers)B.handleFocus(this._terminal);(R=this._cursorBlinkStateManager.value)==null||R.resume(),this._requestRedrawViewport()}handleSelectionChanged(R,B,U){for(const V of this._renderLayers)V.handleSelectionChanged(this._terminal,R,B,U);this._model.selection.update(this._core,R,B,U),this._requestRedrawViewport()}handleCursorMove(){var R;for(const B of this._renderLayers)B.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 B;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(),(B=this._glyphRenderer.value)==null||B.setAtlas(this._charAtlas)}_clearModel(R){var B;this._model.clear(),R&&((B=this._glyphRenderer.value)==null||B.clear())}clearTextureAtlas(){var R;(R=this._charAtlas)==null||R.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var R;this._clearModel(!0);for(const B of this._renderLayers)B.reset(this._terminal);(R=this._cursorBlinkStateManager.value)==null||R.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(R){return-1}deregisterCharacterJoiner(R){return!1}renderRows(R,B){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 U of this._renderLayers)U.handleGridChanged(this._terminal,R,B);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(R,B),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,B){const U=this._core;let V,q,Y,W,j,H,z,F,Z,re,he,ge,X,G,ee=this._workCell;R=k(R,U.rows-1,0),B=k(B,U.rows-1,0);const Q=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,se=Q-U.buffer.ydisp,te=Math.min(this._terminal.buffer.active.cursorX,U.cols-1);let me=-1;const fe=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let ye=!1;for(q=R;q<=B;q++)for(Y=q+U.buffer.ydisp,W=U.buffer.lines.get(Y),this._model.lineLengths[q]=0,j=this._characterJoinerService.getJoinedCharacters(Y),X=0;X<U.cols;X++)if(V=this._cellColorResolver.result.bg,W.loadCell(X,ee),X===0&&(V=this._cellColorResolver.result.bg),H=!1,z=X,j.length>0&&X===j[0][0]&&(H=!0,F=j.shift(),ee=new D(ee,W.translateToString(!0,F[0],F[1]),F[1]-F[0]),z=F[1]-1),Z=ee.getChars(),re=ee.getCode(),ge=(q*U.cols+X)*x.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(ee,X,Y,this.dimensions.device.cell.width),fe&&Y===Q&&(X===te&&(this._model.cursor={x:te,y:se,width:ee.getWidth(),style:this._coreBrowserService.isFocused?U.options.cursorStyle||"block":U.options.cursorInactiveStyle,cursorWidth:U.options.cursorWidth,dpr:this._devicePixelRatio},me=te+ee.getWidth()-1),X>=te&&X<=me&&(this._coreBrowserService.isFocused&&(U.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&U.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)),re!==S.NULL_CELL_CODE&&(this._model.lineLengths[q]=X+1),(this._model.cells[ge]!==re||this._model.cells[ge+x.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[ge+x.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[ge+x.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(ye=!0,Z.length>1&&(re|=x.COMBINED_CHAR_BIT_MASK),this._model.cells[ge]=re,this._model.cells[ge+x.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[ge+x.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[ge+x.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,he=ee.getWidth(),this._glyphRenderer.value.updateCell(X,q,re,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,Z,he,V),H))for(ee=this._workCell,X++;X<z;X++)G=(q*U.cols+X)*x.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(X,q,S.NULL_CELL_CODE,0,0,0,S.NULL_CELL_CHAR,0,0),this._model.cells[G]=S.NULL_CELL_CODE,this._model.cells[G+x.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[G+x.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[G+x.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;ye&&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,B){this._canvas.width===R&&this._canvas.height===B||(this._canvas.width=R,this._canvas.height=B,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,B,U){super(),this.content=0,this.combinedData="",this.fg=R.fg,this.bg=R.bg,this.combinedData=B,this._width=U}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(P,R,B=0){return Math.max(Math.min(P,R),B)}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(P,R,B,U,V,q){for(let Y=0;Y<R.length;Y++){const W=R[Y],j=V/8,H=q/8;P.fillRect(B+W.x*j,U+W.y*H,W.w*j,W.h*H)}})(_,O,y,b,S,E),!0;const M=v[d];if(M)return(function(P,R,B,U,V,q){let Y=u.get(R);Y||(Y=new Map,u.set(R,Y));const W=P.fillStyle;if(typeof W!="string")throw new Error(`Unexpected fillStyle type "${W}"`);let j=Y.get(W);if(!j){const H=R[0].length,z=R.length,F=P.canvas.ownerDocument.createElement("canvas");F.width=H,F.height=z;const Z=(0,f.throwIfFalsy)(F.getContext("2d")),re=new ImageData(H,z);let he,ge,X,G;if(W.startsWith("#"))he=parseInt(W.slice(1,3),16),ge=parseInt(W.slice(3,5),16),X=parseInt(W.slice(5,7),16),G=W.length>7&&parseInt(W.slice(7,9),16)||1;else{if(!W.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${W}" when drawing pattern glyph`);[he,ge,X,G]=W.substring(5,W.length-1).split(",").map((ee=>parseFloat(ee)))}for(let ee=0;ee<z;ee++)for(let Q=0;Q<H;Q++)re.data[4*(ee*H+Q)]=he,re.data[4*(ee*H+Q)+1]=ge,re.data[4*(ee*H+Q)+2]=X,re.data[4*(ee*H+Q)+3]=R[ee][Q]*(255*G);Z.putImageData(re,0,0),j=(0,f.throwIfFalsy)(P.createPattern(F,null)),Y.set(W,j)}P.fillStyle=j,P.fillRect(B,U,V,q)})(_,M,y,b,S,E),!0;const D=a.boxDrawingDefinitions[d];if(D)return(function(P,R,B,U,V,q,Y){P.strokeStyle=P.fillStyle;for(const[W,j]of Object.entries(R)){let H;P.beginPath(),P.lineWidth=Y*Number.parseInt(W),H=typeof j=="function"?j(.15,.15/q*V):j;for(const z of H.split(" ")){const F=z[0],Z=w[F];if(!Z){console.error(`Could not find drawing instructions for "${F}"`);continue}const re=z.substring(1).split(",");re[0]&&re[1]&&Z(P,C(re,V,q,B,U,!0,Y))}P.stroke(),P.closePath()}})(_,D,y,b,S,E,x),!0;const k=a.powerlineDefinitions[d];return!!k&&((function(P,R,B,U,V,q,Y,W){const j=new Path2D;j.rect(B,U,V,q),P.clip(j),P.beginPath();const H=Y/12;P.lineWidth=W*H;for(const z of R.d.split(" ")){const F=z[0],Z=w[F];if(!Z){console.error(`Could not find drawing instructions for "${F}"`);continue}const re=z.substring(1).split(",");re[0]&&re[1]&&Z(P,C(re,V,q,B,U,!1,W,(R.leftPadding??0)*(H/2),(R.rightPadding??0)*(H/2)))}R.type===1?(P.strokeStyle=P.fillStyle,P.stroke()):P.fill(),P.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,P){this._document=D,this._config=k,this._unicodeService=P,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 P=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,P)}}))}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((Y=>2*Y.canvas.width<=(E.maxTextureSize||4096))).sort(((Y,W)=>W.canvas.width!==Y.canvas.width?W.canvas.width-Y.canvas.width:W.percentageUsed-Y.percentageUsed));let P=-1,R=0;for(let Y=0;Y<k.length;Y++)if(k[Y].canvas.width!==R)P=Y,R=k[Y].canvas.width;else if(Y-P==3)break;const B=k.slice(P,P+4),U=B.map((Y=>Y.glyphs[0].texturePage)).sort(((Y,W)=>Y>W?1:-1)),V=this.pages.length-B.length,q=this._mergePages(B,V);q.version++;for(let Y=U.length-1;Y>=0;Y--)this._deletePage(U[Y]);this.pages.push(q),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(q.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 P=2*D[0].canvas.width,R=new L(this._document,P,D);for(const[B,U]of D.entries()){const V=B*U.canvas.width%P,q=Math.floor(B/2)*U.canvas.height;R.ctx.drawImage(U.canvas,V,q);for(const W of U.glyphs)W.texturePage=k,W.sizeClipSpace.x=W.size.x/P,W.sizeClipSpace.y=W.size.y/P,W.texturePosition.x+=V,W.texturePosition.y+=q,W.texturePositionClipSpace.x=W.texturePosition.x/P,W.texturePositionClipSpace.y=W.texturePosition.y/P;this._onRemoveTextureAtlasCanvas.fire(U.canvas);const Y=this._activePages.indexOf(U);Y!==-1&&this._activePages.splice(Y,1)}return R}_deletePage(D){this._pages.splice(D,1);for(let k=D;k<this._pages.length;k++){const P=this._pages[k];for(const R of P.glyphs)R.texturePage--;P.version++}}getRasterizedGlyphCombinedChar(D,k,P,R,B){return this._getFromCacheMap(this._cacheMapCombined,D,k,P,R,B)}getRasterizedGlyph(D,k,P,R,B){return this._getFromCacheMap(this._cacheMap,D,k,P,R,B)}_getFromCacheMap(D,k,P,R,B,U=!1){return S=D.get(k,P,R,B),S||(S=this._drawToCache(k,P,R,B,U),D.set(k,P,R,B,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,P,R){if(this._config.allowTransparency)return m.NULL_COLOR;let B;switch(D){case 16777216:case 33554432:B=this._getColorFromAnsiIndex(k);break;case 50331648:const U=d.AttributeData.toColorRGB(k);B=m.channels.toColor(U[0],U[1],U[2]);break;default:B=P?m.color.opaque(this._config.colors.foreground):this._config.colors.background}return B}_getForegroundColor(D,k,P,R,B,U,V,q,Y,W){const j=this._getMinimumContrastColor(D,k,P,R,B,U,V,Y,q,W);if(j)return j;let H;switch(B){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&Y&&U<8&&(U+=8),H=this._getColorFromAnsiIndex(U);break;case 50331648:const z=d.AttributeData.toColorRGB(U);H=m.channels.toColor(z[0],z[1],z[2]);break;default:H=V?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(H=m.color.opaque(H)),q&&(H=m.color.multiplyOpacity(H,f.DIM_OPACITY)),H}_resolveBackgroundRgba(D,k,P){switch(D){case 16777216:case 33554432:return this._getColorFromAnsiIndex(k).rgba;case 50331648:return k<<8;default:return P?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(D,k,P,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 P?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(D,k,P,R,B,U,V,q,Y,W){if(this._config.minimumContrastRatio===1||W)return;const j=this._getContrastCache(Y),H=j.getColor(D,R);if(H!==void 0)return H||void 0;const z=this._resolveBackgroundRgba(k,P,V),F=this._resolveForegroundRgba(B,U,V,q),Z=m.rgba.ensureContrastRatio(z,F,this._config.minimumContrastRatio/(Y?2:1));if(!Z)return void j.setColor(D,R,null);const re=m.channels.toColor(Z>>24&255,Z>>16&255,Z>>8&255);return j.setColor(D,R,re),re}_getContrastCache(D){return D?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(D,k,P,R,B=!1){const U=typeof D=="number"?String.fromCharCode(D):D,V=Math.min(this._config.deviceCellWidth*Math.max(U.length,2)+4,this._textureSize);this._tmpCanvas.width<V&&(this._tmpCanvas.width=V);const q=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<q&&(this._tmpCanvas.height=q),this._tmpCtx.save(),this._workAttributeData.fg=P,this._workAttributeData.bg=k,this._workAttributeData.extended.ext=R,this._workAttributeData.isInvisible())return b;const Y=!!this._workAttributeData.isBold(),W=!!this._workAttributeData.isInverse(),j=!!this._workAttributeData.isDim(),H=!!this._workAttributeData.isItalic(),z=!!this._workAttributeData.isUnderline(),F=!!this._workAttributeData.isStrikethrough(),Z=!!this._workAttributeData.isOverline();let re=this._workAttributeData.getFgColor(),he=this._workAttributeData.getFgColorMode(),ge=this._workAttributeData.getBgColor(),X=this._workAttributeData.getBgColorMode();if(W){const ve=re;re=ge,ge=ve;const Ce=he;he=X,X=Ce}const G=this._getBackgroundColor(X,ge,W,j);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=G.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const ee=Y?this._config.fontWeightBold:this._config.fontWeight,Q=H?"italic":"";this._tmpCtx.font=`${Q} ${ee} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=f.TEXT_BASELINE;const se=U.length===1&&(0,u.isPowerlineGlyph)(U.charCodeAt(0)),te=U.length===1&&(0,u.isRestrictedPowerlineGlyph)(U.charCodeAt(0)),me=this._getForegroundColor(k,X,ge,P,he,re,W,j,Y,(0,u.treatGlyphAsBackgroundColor)(U.charCodeAt(0)));this._tmpCtx.fillStyle=me.css;const fe=te?0:4;let ye=!1;this._config.customGlyphs!==!1&&(ye=(0,v.tryDrawCustomChar)(this._tmpCtx,U,fe,fe,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let Le,be=!se;if(Le=typeof D=="number"?this._unicodeService.wcwidth(D):this._unicodeService.getStringCellWidth(D),z){this._tmpCtx.save();const ve=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),Ce=ve%2==1?.5:0;if(this._tmpCtx.lineWidth=ve,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())be=!1,this._tmpCtx.strokeStyle=`rgb(${d.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{be=!1;let We=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&We<8&&(We+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(We).css}this._tmpCtx.beginPath();const $e=fe,Be=Math.ceil(fe+this._config.deviceCharHeight)-Ce-(B?2*ve:0),$t=Be+ve,ct=Be+2*ve;let yt=this._workAttributeData.getUnderlineVariantOffset();for(let We=0;We<Le;We++){this._tmpCtx.save();const Pe=$e+We*this._config.deviceCellWidth,De=$e+(We+1)*this._config.deviceCellWidth,cr=Pe+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(Pe,Be),this._tmpCtx.lineTo(De,Be),this._tmpCtx.moveTo(Pe,ct),this._tmpCtx.lineTo(De,ct);break;case 3:const _t=ve<=1?ct:Math.ceil(fe+this._config.deviceCharHeight-ve/2)-Ce,Ut=ve<=1?Be:Math.ceil(fe+this._config.deviceCharHeight+ve/2)-Ce,kt=new Path2D;kt.rect(Pe,Be,this._config.deviceCellWidth,ct-Be),this._tmpCtx.clip(kt),this._tmpCtx.moveTo(Pe-this._config.deviceCellWidth/2,$t),this._tmpCtx.bezierCurveTo(Pe-this._config.deviceCellWidth/2,Ut,Pe,Ut,Pe,$t),this._tmpCtx.bezierCurveTo(Pe,_t,cr,_t,cr,$t),this._tmpCtx.bezierCurveTo(cr,Ut,De,Ut,De,$t),this._tmpCtx.bezierCurveTo(De,_t,De+this._config.deviceCellWidth/2,_t,De+this._config.deviceCellWidth/2,$t);break;case 4:const ai=yt===0?0:yt>=ve?2*ve-yt:ve-yt;yt>=ve||ai===0?(this._tmpCtx.setLineDash([Math.round(ve),Math.round(ve)]),this._tmpCtx.moveTo(Pe+ai,Be),this._tmpCtx.lineTo(De,Be)):(this._tmpCtx.setLineDash([Math.round(ve),Math.round(ve)]),this._tmpCtx.moveTo(Pe,Be),this._tmpCtx.lineTo(Pe+ai,Be),this._tmpCtx.moveTo(Pe+ai+ve,Be),this._tmpCtx.lineTo(De,Be)),yt=(0,u.computeNextVariantOffset)(De-Pe,ve,yt);break;case 5:const _o=.6,mo=.3,Hr=De-Pe,mi=Math.floor(_o*Hr),yi=Math.floor(mo*Hr),oi=Hr-mi-yi;this._tmpCtx.setLineDash([mi,yi,oi]),this._tmpCtx.moveTo(Pe,Be),this._tmpCtx.lineTo(De,Be);break;default:this._tmpCtx.moveTo(Pe,Be),this._tmpCtx.lineTo(De,Be)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!ye&&this._config.fontSize>=12&&!this._config.allowTransparency&&U!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const We=this._tmpCtx.measureText(U);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in We&&We.actualBoundingBoxDescent>0){this._tmpCtx.save();const Pe=new Path2D;Pe.rect($e,Be-Math.ceil(ve/2),this._config.deviceCellWidth*Le,ct-Be+Math.ceil(ve/2)),this._tmpCtx.clip(Pe),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=G.css,this._tmpCtx.strokeText(U,fe,fe+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(Z){const ve=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),Ce=ve%2==1?.5:0;this._tmpCtx.lineWidth=ve,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(fe,fe+Ce),this._tmpCtx.lineTo(fe+this._config.deviceCharWidth*Le,fe+Ce),this._tmpCtx.stroke()}if(ye||this._tmpCtx.fillText(U,fe,fe+this._config.deviceCharHeight),U==="_"&&!this._config.allowTransparency){let ve=x(this._tmpCtx.getImageData(fe,fe,this._config.deviceCellWidth,this._config.deviceCellHeight),G,me,be);if(ve)for(let Ce=1;Ce<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=G.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(U,fe,fe+this._config.deviceCharHeight-Ce),ve=x(this._tmpCtx.getImageData(fe,fe,this._config.deviceCellWidth,this._config.deviceCellHeight),G,me,be),ve);Ce++);}if(F){const ve=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),Ce=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=ve,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(fe,fe+Math.floor(this._config.deviceCharHeight/2)-Ce),this._tmpCtx.lineTo(fe+this._config.deviceCharWidth*Le,fe+Math.floor(this._config.deviceCharHeight/2)-Ce),this._tmpCtx.stroke()}this._tmpCtx.restore();const Qe=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Rt;if(Rt=this._config.allowTransparency?(function(ve){for(let Ce=0;Ce<ve.data.length;Ce+=4)if(ve.data[Ce+3]>0)return!1;return!0})(Qe):x(Qe,G,me,be),Rt)return b;const xe=this._findGlyphBoundingBox(Qe,this._workBoundingBox,V,te,ye,fe);let Se,we;for(;;){if(this._activePages.length===0){const ve=this._createNewPage();Se=ve,we=ve.currentRow,we.height=xe.size.y;break}Se=this._activePages[this._activePages.length-1],we=Se.currentRow;for(const ve of this._activePages)xe.size.y<=ve.currentRow.height&&(Se=ve,we=ve.currentRow);for(let ve=this._activePages.length-1;ve>=0;ve--)for(const Ce of this._activePages[ve].fixedRows)Ce.height<=we.height&&xe.size.y<=Ce.height&&(Se=this._activePages[ve],we=Ce);if(we.y+xe.size.y>=Se.canvas.height||we.height>xe.size.y+2){let ve=!1;if(Se.currentRow.y+Se.currentRow.height+xe.size.y>=Se.canvas.height){let Ce;for(const $e of this._activePages)if($e.currentRow.y+$e.currentRow.height+xe.size.y<$e.canvas.height){Ce=$e;break}if(Ce)Se=Ce;else if(E.maxAtlasPages&&this._pages.length>=E.maxAtlasPages&&we.y+xe.size.y<=Se.canvas.height&&we.height>=xe.size.y&&we.x+xe.size.x<=Se.canvas.width)ve=!0;else{const $e=this._createNewPage();Se=$e,we=$e.currentRow,we.height=xe.size.y,ve=!0}}ve||(Se.currentRow.height>0&&Se.fixedRows.push(Se.currentRow),we={x:0,y:Se.currentRow.y+Se.currentRow.height,height:xe.size.y},Se.fixedRows.push(we),Se.currentRow={x:0,y:we.y+we.height,height:0})}if(we.x+xe.size.x<=Se.canvas.width)break;we===Se.currentRow?(we.x=0,we.y+=we.height,we.height=0):Se.fixedRows.splice(Se.fixedRows.indexOf(we),1)}return xe.texturePage=this._pages.indexOf(Se),xe.texturePosition.x=we.x,xe.texturePosition.y=we.y,xe.texturePositionClipSpace.x=we.x/Se.canvas.width,xe.texturePositionClipSpace.y=we.y/Se.canvas.height,xe.sizeClipSpace.x/=Se.canvas.width,xe.sizeClipSpace.y/=Se.canvas.height,we.height=Math.max(we.height,xe.size.y),we.x+=xe.size.x,Se.ctx.putImageData(Qe,xe.texturePosition.x-this._workBoundingBox.left,xe.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,xe.size.x,xe.size.y),Se.addGlyph(xe),Se.version++,xe}_findGlyphBoundingBox(D,k,P,R,B,U){k.top=0;const V=R?this._config.deviceCellHeight:this._tmpCanvas.height,q=R?this._config.deviceCellWidth:P;let Y=!1;for(let W=0;W<V;W++){for(let j=0;j<q;j++){const H=W*this._tmpCanvas.width*4+4*j+3;if(D.data[H]!==0){k.top=W,Y=!0;break}}if(Y)break}k.left=0,Y=!1;for(let W=0;W<U+q;W++){for(let j=0;j<V;j++){const H=j*this._tmpCanvas.width*4+4*W+3;if(D.data[H]!==0){k.left=W,Y=!0;break}}if(Y)break}k.right=q,Y=!1;for(let W=U+q-1;W>=U;W--){for(let j=0;j<V;j++){const H=j*this._tmpCanvas.width*4+4*W+3;if(D.data[H]!==0){k.right=W,Y=!0;break}}if(Y)break}k.bottom=V,Y=!1;for(let W=V-1;W>=0;W--){for(let j=0;j<q;j++){const H=W*this._tmpCanvas.width*4+4*j+3;if(D.data[H]!==0){k.bottom=W,Y=!0;break}}if(Y)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+U+(R||B?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-k.top+U+(R||B?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,P){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],P)for(const R of P)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,P){const R=D.rgba>>>24,B=D.rgba>>>16&255,U=D.rgba>>>8&255,V=k.rgba>>>24,q=k.rgba>>>16&255,Y=k.rgba>>>8&255,W=Math.floor((Math.abs(R-V)+Math.abs(B-q)+Math.abs(U-Y))/12);let j=!0;for(let H=0;H<M.data.length;H+=4)M.data[H]===R&&M.data[H+1]===B&&M.data[H+2]===U||P&&Math.abs(M.data[H]-R)+Math.abs(M.data[H+1]-B)+Math.abs(M.data[H+2]-U)<W?M.data[H+3]=0:j=!1;return j}function O(M,D,k){const P=M.createElement("canvas");return P.width=D,P.height=k,P}},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,P=L.rgba>>16&255,R=L.rgba>>8&255;return c=k+Math.round((O-k)*u),f=P+Math.round((M-P)*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,P=x>>8&255;let R=O>>24&255,B=O>>16&255,U=O>>8&255,V=b(_.relativeLuminance2(R,B,U),_.relativeLuminance2(D,k,P));for(;V<M&&(R>0||B>0||U>0);)R-=Math.max(0,Math.ceil(.1*R)),B-=Math.max(0,Math.ceil(.1*B)),U-=Math.max(0,Math.ceil(.1*U)),V=b(_.relativeLuminance2(R,B,U),_.relativeLuminance2(D,k,P));return(R<<24|B<<16|U<<8|255)>>>0}function L(x,O,M){const D=x>>24&255,k=x>>16&255,P=x>>8&255;let R=O>>24&255,B=O>>16&255,U=O>>8&255,V=b(_.relativeLuminance2(R,B,U),_.relativeLuminance2(D,k,P));for(;V<M&&(R<255||B<255||U<255);)R=Math.min(255,R+Math.ceil(.1*(255-R))),B=Math.min(255,B+Math.ceil(.1*(255-B))),U=Math.min(255,U+Math.ceil(.1*(255-U))),V=b(_.relativeLuminance2(R,B,U),_.relativeLuminance2(D,k,P));return(R<<24|B<<16|U<<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,P=x>>24&255,R=x>>16&255,B=x>>8&255;return c=P+Math.round((M-P)*u),f=R+Math.round((D-R)*u),v=B+Math.round((k-B)*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 B=E(x,O,M),U=b(D,_.relativeLuminance(B>>8));if(U<M){const V=L(x,O,M);return U>b(D,_.relativeLuminance(V>>8))?B:V}return B}const P=L(x,O,M),R=b(D,_.relativeLuminance(P>>8));if(R<M){const B=E(x,O,M);return R>b(D,_.relativeLuminance(B>>8))?P:B}return P}},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")}},i={};function o(g){var a=i[g];if(a!==void 0)return a.exports;var c=i[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})()))})(Vv)),Vv.exports}var GR=qR(),Xv={exports:{}},bS;function KR(){return bS||(bS=1,(function(e,t){(function(r,i){e.exports=i()})(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,P,R,B,U,V){super(),this._terminal=x,this._container=O,this._alpha=k,this._themeService=P,this._bufferService=R,this._optionsService=B,this._decorationService=U,this._coreBrowserService=V,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((q=>{this._refreshCharAtlas(q),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 P=(x+k)*this._deviceCellWidth,R=(x+k+.5)*this._deviceCellWidth,B=(x+k+1)*this._deviceCellWidth,U=(O+1)*this._deviceCellHeight-D-1,V=U-D,q=U+D;this._ctx.moveTo(P,U),this._ctx.bezierCurveTo(P,V,R,V,R,U),this._ctx.bezierCurveTo(R,q,B,q,B,U)}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,P=(O+1)*this._deviceCellHeight-D-1;this._ctx.moveTo(k,P);for(let R=0;R<M;R++){const B=(x+M+R)*this._deviceCellWidth;this._ctx.lineTo(B,P)}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,P=(x+M)*this._deviceCellWidth,R=(O+1)*this._deviceCellHeight-D-1;this._ctx.moveTo(k,R),this._ctx.lineTo(P,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 U,V,q,Y;const D=x.getChars(),k=x.getCode(),P=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&&((V=(U=this._bitmapGenerator[R.texturePage])==null?void 0:U.bitmap)==null||V.close(),delete this._bitmapGenerator[R.texturePage]),this._charAtlas.pages[R.texturePage].version!==((q=this._bitmapGenerator[R.texturePage])==null?void 0:q.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 B=R.size.x;this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,w.allowRescaling)(k,P,R.size.x,this._deviceCellWidth)&&(B=this._deviceCellWidth-1),this._ctx.drawImage(((Y=this._bitmapGenerator[R.texturePage])==null?void 0:Y.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,B,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,P,R,B,U){super(),this._terminal=E,this._screenElement=L,this._bufferService=O,this._charSizeService=M,this._optionsService=D,this._coreBrowserService=R,this._themeService=U,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 V=this._optionsService.rawOptions.allowTransparency;this._renderLayers=[new y.TextRenderLayer(this._terminal,this._screenElement,0,V,this._bufferService,this._optionsService,k,B,this._coreBrowserService,U),new d.SelectionRenderLayer(this._terminal,this._screenElement,1,this._bufferService,this._coreBrowserService,B,this._optionsService,U),new _.LinkRenderLayer(this._terminal,this._screenElement,2,x,this._bufferService,this._optionsService,B,this._coreBrowserService,U),new C.CursorRenderLayer(this._terminal,this._screenElement,3,this._onRequestRedraw,this._bufferService,this._optionsService,P,this._coreBrowserService,B,U)];for(const q of this._renderLayers)(0,m.forwardEvent)(q.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,((q,Y)=>this._setCanvasDevicePixelDimensions(q,Y))),this.register(this._coreBrowserService.onWindowChange((q=>{this._observerDisposable.value=(0,v.observeDevicePixelDimensions)(this._renderLayers[0].canvas,q,((Y,W)=>this._setCanvasDevicePixelDimensions(Y,W)))}))),this.register((0,w.toDisposable)((()=>{for(const q of this._renderLayers)q.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",(P=>this._setTransparency(P))))}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,P=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]),P=R[1]-1}!k&&this._isOverlapping(D)&&P<x.length-1&&x.getCodePoint(P+1)===m.NULL_CELL_CODE&&(D.content&=-12582913,D.content|=8388608),S(D,M,E),M=P}}}}_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 P=null;M.isInverse()?P=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()?P=`rgb(${v.AttributeData.toColorRGB(M.getBgColor()).join(",")})`:M.isBgPalette()&&(P=this._themeService.colors.ansi[M.getBgColor()].css);let R=!1;this._decorationService.forEachDecorationAtCell(D,this._bufferService.buffer.ydisp+k,void 0,(B=>{B.options.layer!=="top"&&R||(B.backgroundColorRGB&&(P=B.backgroundColorRGB.css),R=B.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!==P&&(S.fillStyle=O||"",this._fillCells(L,x,D-L,1),L=D,x=k),O=P})),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(P,R,B,U,V,q){for(let Y=0;Y<R.length;Y++){const W=R[Y],j=V/8,H=q/8;P.fillRect(B+W.x*j,U+W.y*H,W.w*j,W.h*H)}})(_,O,y,b,S,E),!0;const M=v[d];if(M)return(function(P,R,B,U,V,q){let Y=u.get(R);Y||(Y=new Map,u.set(R,Y));const W=P.fillStyle;if(typeof W!="string")throw new Error(`Unexpected fillStyle type "${W}"`);let j=Y.get(W);if(!j){const H=R[0].length,z=R.length,F=P.canvas.ownerDocument.createElement("canvas");F.width=H,F.height=z;const Z=(0,f.throwIfFalsy)(F.getContext("2d")),re=new ImageData(H,z);let he,ge,X,G;if(W.startsWith("#"))he=parseInt(W.slice(1,3),16),ge=parseInt(W.slice(3,5),16),X=parseInt(W.slice(5,7),16),G=W.length>7&&parseInt(W.slice(7,9),16)||1;else{if(!W.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${W}" when drawing pattern glyph`);[he,ge,X,G]=W.substring(5,W.length-1).split(",").map((ee=>parseFloat(ee)))}for(let ee=0;ee<z;ee++)for(let Q=0;Q<H;Q++)re.data[4*(ee*H+Q)]=he,re.data[4*(ee*H+Q)+1]=ge,re.data[4*(ee*H+Q)+2]=X,re.data[4*(ee*H+Q)+3]=R[ee][Q]*(255*G);Z.putImageData(re,0,0),j=(0,f.throwIfFalsy)(P.createPattern(F,null)),Y.set(W,j)}P.fillStyle=j,P.fillRect(B,U,V,q)})(_,M,y,b,S,E),!0;const D=a.boxDrawingDefinitions[d];if(D)return(function(P,R,B,U,V,q,Y){P.strokeStyle=P.fillStyle;for(const[W,j]of Object.entries(R)){let H;P.beginPath(),P.lineWidth=Y*Number.parseInt(W),H=typeof j=="function"?j(.15,.15/q*V):j;for(const z of H.split(" ")){const F=z[0],Z=w[F];if(!Z){console.error(`Could not find drawing instructions for "${F}"`);continue}const re=z.substring(1).split(",");re[0]&&re[1]&&Z(P,C(re,V,q,B,U,!0,Y))}P.stroke(),P.closePath()}})(_,D,y,b,S,E,x),!0;const k=a.powerlineDefinitions[d];return!!k&&((function(P,R,B,U,V,q,Y,W){const j=new Path2D;j.rect(B,U,V,q),P.clip(j),P.beginPath();const H=Y/12;P.lineWidth=W*H;for(const z of R.d.split(" ")){const F=z[0],Z=w[F];if(!Z){console.error(`Could not find drawing instructions for "${F}"`);continue}const re=z.substring(1).split(",");re[0]&&re[1]&&Z(P,C(re,V,q,B,U,!1,W,(R.leftPadding??0)*(H/2),(R.rightPadding??0)*(H/2)))}R.type===1?(P.strokeStyle=P.fillStyle,P.stroke()):P.fill(),P.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,P){this._document=D,this._config=k,this._unicodeService=P,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 P=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,P)}}))}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((Y=>2*Y.canvas.width<=(E.maxTextureSize||4096))).sort(((Y,W)=>W.canvas.width!==Y.canvas.width?W.canvas.width-Y.canvas.width:W.percentageUsed-Y.percentageUsed));let P=-1,R=0;for(let Y=0;Y<k.length;Y++)if(k[Y].canvas.width!==R)P=Y,R=k[Y].canvas.width;else if(Y-P==3)break;const B=k.slice(P,P+4),U=B.map((Y=>Y.glyphs[0].texturePage)).sort(((Y,W)=>Y>W?1:-1)),V=this.pages.length-B.length,q=this._mergePages(B,V);q.version++;for(let Y=U.length-1;Y>=0;Y--)this._deletePage(U[Y]);this.pages.push(q),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(q.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 P=2*D[0].canvas.width,R=new L(this._document,P,D);for(const[B,U]of D.entries()){const V=B*U.canvas.width%P,q=Math.floor(B/2)*U.canvas.height;R.ctx.drawImage(U.canvas,V,q);for(const W of U.glyphs)W.texturePage=k,W.sizeClipSpace.x=W.size.x/P,W.sizeClipSpace.y=W.size.y/P,W.texturePosition.x+=V,W.texturePosition.y+=q,W.texturePositionClipSpace.x=W.texturePosition.x/P,W.texturePositionClipSpace.y=W.texturePosition.y/P;this._onRemoveTextureAtlasCanvas.fire(U.canvas);const Y=this._activePages.indexOf(U);Y!==-1&&this._activePages.splice(Y,1)}return R}_deletePage(D){this._pages.splice(D,1);for(let k=D;k<this._pages.length;k++){const P=this._pages[k];for(const R of P.glyphs)R.texturePage--;P.version++}}getRasterizedGlyphCombinedChar(D,k,P,R,B){return this._getFromCacheMap(this._cacheMapCombined,D,k,P,R,B)}getRasterizedGlyph(D,k,P,R,B){return this._getFromCacheMap(this._cacheMap,D,k,P,R,B)}_getFromCacheMap(D,k,P,R,B,U=!1){return S=D.get(k,P,R,B),S||(S=this._drawToCache(k,P,R,B,U),D.set(k,P,R,B,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,P,R){if(this._config.allowTransparency)return m.NULL_COLOR;let B;switch(D){case 16777216:case 33554432:B=this._getColorFromAnsiIndex(k);break;case 50331648:const U=d.AttributeData.toColorRGB(k);B=m.channels.toColor(U[0],U[1],U[2]);break;default:B=P?m.color.opaque(this._config.colors.foreground):this._config.colors.background}return B}_getForegroundColor(D,k,P,R,B,U,V,q,Y,W){const j=this._getMinimumContrastColor(D,k,P,R,B,U,V,Y,q,W);if(j)return j;let H;switch(B){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&Y&&U<8&&(U+=8),H=this._getColorFromAnsiIndex(U);break;case 50331648:const z=d.AttributeData.toColorRGB(U);H=m.channels.toColor(z[0],z[1],z[2]);break;default:H=V?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(H=m.color.opaque(H)),q&&(H=m.color.multiplyOpacity(H,f.DIM_OPACITY)),H}_resolveBackgroundRgba(D,k,P){switch(D){case 16777216:case 33554432:return this._getColorFromAnsiIndex(k).rgba;case 50331648:return k<<8;default:return P?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(D,k,P,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 P?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(D,k,P,R,B,U,V,q,Y,W){if(this._config.minimumContrastRatio===1||W)return;const j=this._getContrastCache(Y),H=j.getColor(D,R);if(H!==void 0)return H||void 0;const z=this._resolveBackgroundRgba(k,P,V),F=this._resolveForegroundRgba(B,U,V,q),Z=m.rgba.ensureContrastRatio(z,F,this._config.minimumContrastRatio/(Y?2:1));if(!Z)return void j.setColor(D,R,null);const re=m.channels.toColor(Z>>24&255,Z>>16&255,Z>>8&255);return j.setColor(D,R,re),re}_getContrastCache(D){return D?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(D,k,P,R,B=!1){const U=typeof D=="number"?String.fromCharCode(D):D,V=Math.min(this._config.deviceCellWidth*Math.max(U.length,2)+4,this._textureSize);this._tmpCanvas.width<V&&(this._tmpCanvas.width=V);const q=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<q&&(this._tmpCanvas.height=q),this._tmpCtx.save(),this._workAttributeData.fg=P,this._workAttributeData.bg=k,this._workAttributeData.extended.ext=R,this._workAttributeData.isInvisible())return b;const Y=!!this._workAttributeData.isBold(),W=!!this._workAttributeData.isInverse(),j=!!this._workAttributeData.isDim(),H=!!this._workAttributeData.isItalic(),z=!!this._workAttributeData.isUnderline(),F=!!this._workAttributeData.isStrikethrough(),Z=!!this._workAttributeData.isOverline();let re=this._workAttributeData.getFgColor(),he=this._workAttributeData.getFgColorMode(),ge=this._workAttributeData.getBgColor(),X=this._workAttributeData.getBgColorMode();if(W){const ve=re;re=ge,ge=ve;const Ce=he;he=X,X=Ce}const G=this._getBackgroundColor(X,ge,W,j);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=G.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const ee=Y?this._config.fontWeightBold:this._config.fontWeight,Q=H?"italic":"";this._tmpCtx.font=`${Q} ${ee} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=f.TEXT_BASELINE;const se=U.length===1&&(0,u.isPowerlineGlyph)(U.charCodeAt(0)),te=U.length===1&&(0,u.isRestrictedPowerlineGlyph)(U.charCodeAt(0)),me=this._getForegroundColor(k,X,ge,P,he,re,W,j,Y,(0,u.treatGlyphAsBackgroundColor)(U.charCodeAt(0)));this._tmpCtx.fillStyle=me.css;const fe=te?0:4;let ye=!1;this._config.customGlyphs!==!1&&(ye=(0,v.tryDrawCustomChar)(this._tmpCtx,U,fe,fe,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let Le,be=!se;if(Le=typeof D=="number"?this._unicodeService.wcwidth(D):this._unicodeService.getStringCellWidth(D),z){this._tmpCtx.save();const ve=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),Ce=ve%2==1?.5:0;if(this._tmpCtx.lineWidth=ve,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())be=!1,this._tmpCtx.strokeStyle=`rgb(${d.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{be=!1;let We=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&We<8&&(We+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(We).css}this._tmpCtx.beginPath();const $e=fe,Be=Math.ceil(fe+this._config.deviceCharHeight)-Ce-(B?2*ve:0),$t=Be+ve,ct=Be+2*ve;let yt=this._workAttributeData.getUnderlineVariantOffset();for(let We=0;We<Le;We++){this._tmpCtx.save();const Pe=$e+We*this._config.deviceCellWidth,De=$e+(We+1)*this._config.deviceCellWidth,cr=Pe+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(Pe,Be),this._tmpCtx.lineTo(De,Be),this._tmpCtx.moveTo(Pe,ct),this._tmpCtx.lineTo(De,ct);break;case 3:const _t=ve<=1?ct:Math.ceil(fe+this._config.deviceCharHeight-ve/2)-Ce,Ut=ve<=1?Be:Math.ceil(fe+this._config.deviceCharHeight+ve/2)-Ce,kt=new Path2D;kt.rect(Pe,Be,this._config.deviceCellWidth,ct-Be),this._tmpCtx.clip(kt),this._tmpCtx.moveTo(Pe-this._config.deviceCellWidth/2,$t),this._tmpCtx.bezierCurveTo(Pe-this._config.deviceCellWidth/2,Ut,Pe,Ut,Pe,$t),this._tmpCtx.bezierCurveTo(Pe,_t,cr,_t,cr,$t),this._tmpCtx.bezierCurveTo(cr,Ut,De,Ut,De,$t),this._tmpCtx.bezierCurveTo(De,_t,De+this._config.deviceCellWidth/2,_t,De+this._config.deviceCellWidth/2,$t);break;case 4:const ai=yt===0?0:yt>=ve?2*ve-yt:ve-yt;yt>=ve||ai===0?(this._tmpCtx.setLineDash([Math.round(ve),Math.round(ve)]),this._tmpCtx.moveTo(Pe+ai,Be),this._tmpCtx.lineTo(De,Be)):(this._tmpCtx.setLineDash([Math.round(ve),Math.round(ve)]),this._tmpCtx.moveTo(Pe,Be),this._tmpCtx.lineTo(Pe+ai,Be),this._tmpCtx.moveTo(Pe+ai+ve,Be),this._tmpCtx.lineTo(De,Be)),yt=(0,u.computeNextVariantOffset)(De-Pe,ve,yt);break;case 5:const _o=.6,mo=.3,Hr=De-Pe,mi=Math.floor(_o*Hr),yi=Math.floor(mo*Hr),oi=Hr-mi-yi;this._tmpCtx.setLineDash([mi,yi,oi]),this._tmpCtx.moveTo(Pe,Be),this._tmpCtx.lineTo(De,Be);break;default:this._tmpCtx.moveTo(Pe,Be),this._tmpCtx.lineTo(De,Be)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!ye&&this._config.fontSize>=12&&!this._config.allowTransparency&&U!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const We=this._tmpCtx.measureText(U);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in We&&We.actualBoundingBoxDescent>0){this._tmpCtx.save();const Pe=new Path2D;Pe.rect($e,Be-Math.ceil(ve/2),this._config.deviceCellWidth*Le,ct-Be+Math.ceil(ve/2)),this._tmpCtx.clip(Pe),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=G.css,this._tmpCtx.strokeText(U,fe,fe+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(Z){const ve=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),Ce=ve%2==1?.5:0;this._tmpCtx.lineWidth=ve,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(fe,fe+Ce),this._tmpCtx.lineTo(fe+this._config.deviceCharWidth*Le,fe+Ce),this._tmpCtx.stroke()}if(ye||this._tmpCtx.fillText(U,fe,fe+this._config.deviceCharHeight),U==="_"&&!this._config.allowTransparency){let ve=x(this._tmpCtx.getImageData(fe,fe,this._config.deviceCellWidth,this._config.deviceCellHeight),G,me,be);if(ve)for(let Ce=1;Ce<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=G.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(U,fe,fe+this._config.deviceCharHeight-Ce),ve=x(this._tmpCtx.getImageData(fe,fe,this._config.deviceCellWidth,this._config.deviceCellHeight),G,me,be),ve);Ce++);}if(F){const ve=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),Ce=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=ve,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(fe,fe+Math.floor(this._config.deviceCharHeight/2)-Ce),this._tmpCtx.lineTo(fe+this._config.deviceCharWidth*Le,fe+Math.floor(this._config.deviceCharHeight/2)-Ce),this._tmpCtx.stroke()}this._tmpCtx.restore();const Qe=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Rt;if(Rt=this._config.allowTransparency?(function(ve){for(let Ce=0;Ce<ve.data.length;Ce+=4)if(ve.data[Ce+3]>0)return!1;return!0})(Qe):x(Qe,G,me,be),Rt)return b;const xe=this._findGlyphBoundingBox(Qe,this._workBoundingBox,V,te,ye,fe);let Se,we;for(;;){if(this._activePages.length===0){const ve=this._createNewPage();Se=ve,we=ve.currentRow,we.height=xe.size.y;break}Se=this._activePages[this._activePages.length-1],we=Se.currentRow;for(const ve of this._activePages)xe.size.y<=ve.currentRow.height&&(Se=ve,we=ve.currentRow);for(let ve=this._activePages.length-1;ve>=0;ve--)for(const Ce of this._activePages[ve].fixedRows)Ce.height<=we.height&&xe.size.y<=Ce.height&&(Se=this._activePages[ve],we=Ce);if(we.y+xe.size.y>=Se.canvas.height||we.height>xe.size.y+2){let ve=!1;if(Se.currentRow.y+Se.currentRow.height+xe.size.y>=Se.canvas.height){let Ce;for(const $e of this._activePages)if($e.currentRow.y+$e.currentRow.height+xe.size.y<$e.canvas.height){Ce=$e;break}if(Ce)Se=Ce;else if(E.maxAtlasPages&&this._pages.length>=E.maxAtlasPages&&we.y+xe.size.y<=Se.canvas.height&&we.height>=xe.size.y&&we.x+xe.size.x<=Se.canvas.width)ve=!0;else{const $e=this._createNewPage();Se=$e,we=$e.currentRow,we.height=xe.size.y,ve=!0}}ve||(Se.currentRow.height>0&&Se.fixedRows.push(Se.currentRow),we={x:0,y:Se.currentRow.y+Se.currentRow.height,height:xe.size.y},Se.fixedRows.push(we),Se.currentRow={x:0,y:we.y+we.height,height:0})}if(we.x+xe.size.x<=Se.canvas.width)break;we===Se.currentRow?(we.x=0,we.y+=we.height,we.height=0):Se.fixedRows.splice(Se.fixedRows.indexOf(we),1)}return xe.texturePage=this._pages.indexOf(Se),xe.texturePosition.x=we.x,xe.texturePosition.y=we.y,xe.texturePositionClipSpace.x=we.x/Se.canvas.width,xe.texturePositionClipSpace.y=we.y/Se.canvas.height,xe.sizeClipSpace.x/=Se.canvas.width,xe.sizeClipSpace.y/=Se.canvas.height,we.height=Math.max(we.height,xe.size.y),we.x+=xe.size.x,Se.ctx.putImageData(Qe,xe.texturePosition.x-this._workBoundingBox.left,xe.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,xe.size.x,xe.size.y),Se.addGlyph(xe),Se.version++,xe}_findGlyphBoundingBox(D,k,P,R,B,U){k.top=0;const V=R?this._config.deviceCellHeight:this._tmpCanvas.height,q=R?this._config.deviceCellWidth:P;let Y=!1;for(let W=0;W<V;W++){for(let j=0;j<q;j++){const H=W*this._tmpCanvas.width*4+4*j+3;if(D.data[H]!==0){k.top=W,Y=!0;break}}if(Y)break}k.left=0,Y=!1;for(let W=0;W<U+q;W++){for(let j=0;j<V;j++){const H=j*this._tmpCanvas.width*4+4*W+3;if(D.data[H]!==0){k.left=W,Y=!0;break}}if(Y)break}k.right=q,Y=!1;for(let W=U+q-1;W>=U;W--){for(let j=0;j<V;j++){const H=j*this._tmpCanvas.width*4+4*W+3;if(D.data[H]!==0){k.right=W,Y=!0;break}}if(Y)break}k.bottom=V,Y=!1;for(let W=V-1;W>=0;W--){for(let j=0;j<q;j++){const H=W*this._tmpCanvas.width*4+4*j+3;if(D.data[H]!==0){k.bottom=W,Y=!0;break}}if(Y)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+U+(R||B?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-k.top+U+(R||B?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,P){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],P)for(const R of P)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,P){const R=D.rgba>>>24,B=D.rgba>>>16&255,U=D.rgba>>>8&255,V=k.rgba>>>24,q=k.rgba>>>16&255,Y=k.rgba>>>8&255,W=Math.floor((Math.abs(R-V)+Math.abs(B-q)+Math.abs(U-Y))/12);let j=!0;for(let H=0;H<M.data.length;H+=4)M.data[H]===R&&M.data[H+1]===B&&M.data[H+2]===U||P&&Math.abs(M.data[H]-R)+Math.abs(M.data[H+1]-B)+Math.abs(M.data[H+2]-U)<W?M.data[H+3]=0:j=!1;return j}function O(M,D,k){const P=M.createElement("canvas");return P.width=D,P.height=k,P}},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 M2{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 P=0;P<S.getTrimmedLength();P++)if(S.loadCell(P,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==D||this._workCell.bg!==k){if(P-x>1){const R=this._getJoinedRanges(L,M,O,S,x);for(let B=0;B<R.length;B++)E.push(R[B])}x=P,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 P=this._getJoinedRanges(L,M,O,S,x);for(let R=0;R<P.length;R++)E.push(P[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 P=0;P<k.length;P++)M2._mergeRanges(M,k[P])}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),P=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+=P}}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,P=L.rgba>>16&255,R=L.rgba>>8&255;return c=k+Math.round((O-k)*u),f=P+Math.round((M-P)*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,P=x>>8&255;let R=O>>24&255,B=O>>16&255,U=O>>8&255,V=b(_.relativeLuminance2(R,B,U),_.relativeLuminance2(D,k,P));for(;V<M&&(R>0||B>0||U>0);)R-=Math.max(0,Math.ceil(.1*R)),B-=Math.max(0,Math.ceil(.1*B)),U-=Math.max(0,Math.ceil(.1*U)),V=b(_.relativeLuminance2(R,B,U),_.relativeLuminance2(D,k,P));return(R<<24|B<<16|U<<8|255)>>>0}function L(x,O,M){const D=x>>24&255,k=x>>16&255,P=x>>8&255;let R=O>>24&255,B=O>>16&255,U=O>>8&255,V=b(_.relativeLuminance2(R,B,U),_.relativeLuminance2(D,k,P));for(;V<M&&(R<255||B<255||U<255);)R=Math.min(255,R+Math.ceil(.1*(255-R))),B=Math.min(255,B+Math.ceil(.1*(255-B))),U=Math.min(255,U+Math.ceil(.1*(255-U))),V=b(_.relativeLuminance2(R,B,U),_.relativeLuminance2(D,k,P));return(R<<24|B<<16|U<<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,P=x>>24&255,R=x>>16&255,B=x>>8&255;return c=P+Math.round((M-P)*u),f=R+Math.round((D-R)*u),v=B+Math.round((k-B)*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 B=E(x,O,M),U=b(D,_.relativeLuminance(B>>8));if(U<M){const V=L(x,O,M);return U>b(D,_.relativeLuminance(V>>8))?B:V}return B}const P=L(x,O,M),R=b(D,_.relativeLuminance(P>>8));if(R<M){const B=E(x,O,M);return R>b(D,_.relativeLuminance(B>>8))?P:B}return P}},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")}},i={};function o(g){var a=i[g];if(a!==void 0)return a.exports;var c=i[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,P=S._themeService;(0,f.setTraceLogger)(k),this._renderer=new v.CanvasRenderer(w,y,b,E,O,d,x,_,M,D,P),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})()))})(Xv)),Xv.exports}var YR=KR();/**
|
|
117
|
-
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
118
|
-
* @license MIT
|
|
119
|
-
*
|
|
120
|
-
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
121
|
-
* @license MIT
|
|
122
|
-
*
|
|
123
|
-
* Originally forked from (with the author's permission):
|
|
124
|
-
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
125
|
-
* http://bellard.org/jslinux/
|
|
126
|
-
* Copyright (c) 2011 Fabrice Bellard
|
|
127
|
-
*/var VR=class{constructor(e,t,r,i={}){this._terminal=e,this._regex=t,this._handler=r,this._options=i}provideLinks(e,t){let r=ZR.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,i)=>{if(this._options.hover){let{range:o}=t;this._options.hover(r,i,o)}},t))}};function XR(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 ZR=class Iu{static computeLink(t,r,i,o){let h=new RegExp(r.source,(r.flags||"")+"g"),[g,a]=Iu._getWindowedLineStrings(t-1,i),c=g.join(""),f,v=[];for(;f=h.exec(c);){let u=f[0];if(!XR(u))continue;let[m,w]=Iu._mapStrIdx(i,a,0,f.index),[C,_]=Iu._mapStrIdx(i,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 i,o=t,h=t,g=0,a="",c=[];if(i=r.buffer.active.getLine(t)){let f=i.translateToString(!0);if(i.isWrapped&&f[0]!==" "){for(g=0;(i=r.buffer.active.getLine(--o))&&g<2048&&(a=i.translateToString(!0),g+=a.length,c.push(a),!(!i.isWrapped||a.indexOf(" ")!==-1)););c.reverse()}for(c.push(f),g=0;(i=r.buffer.active.getLine(++h))&&i.isWrapped&&g<2048&&(a=i.translateToString(!0),g+=a.length,c.push(a),a.indexOf(" ")===-1););}return[c,o]}static _mapStrIdx(t,r,i,o){let h=t.buffer.active,g=h.getNullCell(),a=i;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]}},QR=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function JR(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 e3=class{constructor(e=JR,t={}){this._handler=e,this._options=t}activate(e){this._terminal=e;let t=this._options,r=t.urlRegex||QR;this._linkProvider=this._terminal.registerLinkProvider(new VR(this._terminal,r,this._handler,t))}dispose(){var e;(e=this._linkProvider)==null||e.dispose()}};const qu=new RegExp("(?<![a-zA-Z]:\\/\\/)(?:^|[\\s\"'`(\\[{])([./]?[\\w./-]+\\.[a-zA-Z]{1,10})(?::(\\d+)(?::(\\d+))?|\\((\\d+),(\\d+)\\))?","g");function L2(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 t3=typeof navigator<"u"&&navigator.platform.toUpperCase().includes("MAC");class r3{constructor(t,r,i,o){this.terminal=t,this.onFileOpen=r,this.terminalId=i,this.decorationManager=o}provideLinks(t,r){const i=this.terminal.buffer.active.getLine(t-1);if(!i){r(void 0);return}const o=i.translateToString(),h=new RegExp(qu.source,qu.flags),g=[];let a;for(;(a=h.exec(o))!==null;){const c=a[1];if(!c||!L2(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)=>{(t3?!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 i3{constructor(t){wt(this,"disposables",[]);wt(this,"entries",[]);wt(this,"lastScannedLine",-1);this.terminal=t,this.disposables.push(t.onWriteParsed(()=>this.scanNewLines()))}highlightAt(t,r){for(const i of this.entries)i.marker.line===t&&i.x===r&&i.element&&i.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 i=this.lastScannedLine+1;i<=r;i++)this.decorateLine(i);this.lastScannedLine=r}decorateLine(t){const r=this.terminal.buffer.active,i=r.getLine(t);if(!i)return;const o=i.translateToString(),h=new RegExp(qu.source,qu.flags);let g;for(;(g=h.exec(o))!==null;){const a=g[1];if(!a||!L2(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 n3=1;function SS(e,t){if(!e||e.readyState!==WebSocket.OPEN)return;const r=new TextEncoder().encode(t),i=new Uint8Array(1+r.length);i[0]=n3,i.set(r,1),e.send(i.buffer)}function s3({wsRef:e,modifierRef:t}){const[r,i]=N.useState(null);N.useEffect(()=>(t.current.clearCallback=()=>i(null),()=>{t.current.clearCallback=null}),[t]);const o=N.useCallback(c=>{c.preventDefault(),SS(e.current,"\x1B")},[e]),h=N.useCallback(c=>{c.preventDefault(),SS(e.current," ")},[e]),g=N.useCallback(c=>{c.preventDefault();const f=r==="ctrl"?null:"ctrl";i(f),t.current.ctrl=f==="ctrl",t.current.cmd=!1},[r,t]),a=N.useCallback(c=>{c.preventDefault();const f=r==="cmd"?null:"cmd";i(f),t.current.cmd=f==="cmd",t.current.ctrl=!1},[r,t]);return $.jsxs("div",{className:"virtual-keyboard",role:"toolbar","aria-label":"Virtual modifier keys",children:[$.jsx("button",{className:"virtual-key",onPointerDown:o,tabIndex:-1,children:"Esc"}),$.jsx("button",{className:"virtual-key",onPointerDown:h,tabIndex:-1,children:"Tab"}),$.jsx("button",{className:`virtual-key virtual-key-modifier${r==="ctrl"?" virtual-key-active":""}`,onPointerDown:g,tabIndex:-1,"aria-pressed":r==="ctrl",children:"Ctrl"}),$.jsx("button",{className:`virtual-key virtual-key-modifier${r==="cmd"?" virtual-key-active":""}`,onPointerDown:a,tabIndex:-1,"aria-pressed":r==="cmd",children:"Cmd"})]})}class a3{constructor(t){wt(this,"term");wt(this,"fitAddon");wt(this,"getContainer");wt(this,"debug");wt(this,"_phase","initial-load");wt(this,"_viewportY",0);wt(this,"_baseY",0);wt(this,"_wasAtBottom",!0);wt(this,"_fitSuppressed",!1);wt(this,"_isProgrammaticScroll",!1);wt(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,i=this._viewportY;this.fitAddon.fit(),r?(this.programmaticScroll(()=>this.term.scrollToBottom()),this.log("safeFit","fit + scrollToBottom (was at bottom)")):i>0?(this.programmaticScroll(()=>this.term.scrollToLine(i)),this.log("safeFit",`fit + scrollToLine(${i})`)):(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 i,o,h,g,a,c,f,v;if(this._isProgrammaticScroll){const u=((o=(i=this.term.buffer)==null?void 0:i.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;this._baseY=t,this._viewportY=r,this._wasAtBottom=!t||r>=t-2,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}`)}}class o3{constructor(){wt(this,"pending","")}write(t){t=this.pending+t,this.pending="";const r=t.lastIndexOf("\x1B");if(r===-1)return t;const i=t.substring(r);return l3(i)?t:(this.pending=i,t.substring(0,r))}flush(){const t=this.pending;return this.pending="",t}get hasPending(){return this.pending.length>0}}function l3(e){if(e.length<2)return!1;const t=e.charCodeAt(1);if(t===91){for(let r=2;r<e.length;r++){const i=e.charCodeAt(r);if(i>=64&&i<=126)return!0;if(!(i>=32&&i<=63))return!0}return!1}if(t===93){for(let r=2;r<e.length;r++)if(e.charCodeAt(r)===7||e.charCodeAt(r)===27&&r+1<e.length&&e.charCodeAt(r+1)===92)return!0;return!1}if(t===80||t===95||t===94||t===88){for(let r=2;r<e.length;r++)if(e.charCodeAt(r)===27&&r+1<e.length&&e.charCodeAt(r+1)===92)return!0;return!1}return t>=32&&t<=126,!0}const c3=1e3,u3=3e4,h3=6;function f3(e,t={}){const{floor:r}=t;if(r&&e>=r.afterAttempts)return r.delayMs;const i=t.baseMs??c3,o=t.capMs??u3,h=t.jitterMs??0,g=t.random??Math.random,a=Math.max(0,e),c=h>0?Math.floor(g()*h):0;return Math.min(i*2**a+c,o)}class d3{constructor(t={}){wt(this,"opts");wt(this,"maxAttempts");wt(this,"_attempt",0);wt(this,"_status","idle");this.opts=t,this.maxAttempts=t.maxAttempts??h3}get status(){return this._status}get attempt(){return this._attempt}start(){this._status="connecting"}recordSuccess(){this._attempt=0,this._status="connected"}recordFailure(){return this._attempt>=this.maxAttempts?(this._status="giving-up","give-up"):(this._attempt++,this._status="connecting","retry")}nextDelayMs(){return f3(this._attempt-1,this.opts)}reset(){this._attempt=0,this._status="connecting"}stop(){this._status="idle"}}const v3=4404;function g3(e){return typeof e=="string"?wS(e)?"permanent":"transient":e.code===v3||typeof e.code=="number"&&e.code>=400&&e.code<500||typeof e.message=="string"&&wS(e.message)?"permanent":"transient"}const p3=/Unexpected server response: 4\d\d/;function wS(e){return p3.test(e)}function _3({fitRef:e,wsRef:t,xtermRef:r,connStatus:i,toolbarExtra:o,onReconnect:h}){const g=c=>{c.preventDefault(),h()},a=c=>{var f;c.preventDefault(),(f=r.current)==null||f.scrollToBottom()};return $.jsxs("div",{className:"terminal-controls",children:[$.jsx("button",{className:"terminal-control-btn",onPointerDown:g,tabIndex:-1,"aria-label":"Refresh terminal",children:$.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[$.jsx("path",{d:"M13.5 2.5v4h-4"}),$.jsx("path",{d:"M2.5 8a5.5 5.5 0 0 1 9.35-3.5L13.5 6.5"}),$.jsx("path",{d:"M2.5 13.5v-4h4"}),$.jsx("path",{d:"M13.5 8a5.5 5.5 0 0 1-9.35 3.5L2.5 9.5"})]})}),$.jsx("button",{className:"terminal-control-btn",onPointerDown:a,tabIndex:-1,"aria-label":"Scroll to bottom",children:$.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[$.jsx("path",{d:"M8 3v8"}),$.jsx("path",{d:"M4 8l4 4 4-4"}),$.jsx("line",{x1:"4",y1:"13",x2:"12",y2:"13"})]})}),$.jsx("span",{className:`terminal-control-btn terminal-status-icon terminal-status-${i}`,role:"status",title:i==="connected"?"Connected":i==="reconnecting"?"Reconnecting…":"Disconnected","aria-label":i==="connected"?"Connected":i==="reconnecting"?"Reconnecting":"Disconnected",children:$.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:$.jsx("circle",{cx:"8",cy:"8",r:"4",fill:"currentColor"})})}),o&&$.jsxs($.Fragment,{children:[$.jsx("span",{className:"toolbar-divider"}),o]})]})}const O2=0,T2=1,m3=4e3,D2=["image/png","image/jpeg","image/gif","image/webp","image/bmp"];async function y3(e){var r;if(!((r=navigator.clipboard)!=null&&r.read))return!1;let t=!1;try{const i=await navigator.clipboard.read();for(const o of i){const h=o.types.find(g=>D2.includes(g));if(h){t=!0;const g=await o.getType(h);e.write(`\r
|
|
128
|
-
\x1B[90m[Uploading image...]\x1B[0m`);const{path:a}=await m2(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
|
|
129
|
-
`),!0}return!1}async function b3(e){var t;if(!await y3(e))try{const r=await((t=navigator.clipboard)==null?void 0:t.readText());r&&e.paste(r)}catch{}}function S3(e,t){var i;const r=(i=e.clipboardData)==null?void 0:i.items;if(r){for(const o of Array.from(r))if(D2.includes(o.type)){const h=o.getAsFile();if(!h)continue;e.preventDefault(),t.write(`\r
|
|
130
|
-
\x1B[90m[Uploading image...]\x1B[0m`),m2(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
|
|
131
|
-
`)});return}}}function Zv({wsPath:e,onFileOpen:t,persistent:r,toolbarExtra:i,onPermanentClose:o}){const h=N.useRef(null),g=N.useRef(null),a=N.useRef(null),c=N.useRef(null),f=N.useRef({ctrl:!1,cmd:!1,clearCallback:null}),v=S2(`(max-width: ${p2}px)`),[u,m]=N.useState("connected"),w=N.useRef(null);return N.useEffect(()=>{var ee,Q;if(!h.current)return;const C=new UR.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:(se,te)=>{window.open(te,"_blank","noopener")}}});g.current=C;const _=new WR.FitAddon;c.current=_,C.loadAddon(_),C.open(h.current);const d=()=>{try{C.loadAddon(new YR.CanvasAddon)}catch{}};try{const se=new GR.WebglAddon;se.onContextLoss(()=>{var ye,Le,be,Qe;const te=((Le=(ye=C.buffer)==null?void 0:ye.active)==null?void 0:Le.viewportY)??0,me=((Qe=(be=C.buffer)==null?void 0:be.active)==null?void 0:Qe.baseY)??0,fe=!me||te>=me;se.dispose(),d(),fe?C.scrollToBottom():te>0&&C.scrollToLine(te)}),C.loadAddon(se)}catch{d()}const y=new e3((se,te)=>{se.preventDefault(),window.open(te,"_blank")});C.loadAddon(y);const b=e.split("/").pop();let S=null,E=null;if(t){E=new i3(C);const se=new r3(C,(te,me,fe,ye)=>{t(te,me,fe,ye)},b,E);S=C.registerLinkProvider(se)}const L=navigator.platform.toUpperCase().includes("MAC");C.attachCustomKeyEventHandler(se=>{if(se.type!=="keydown")return!0;if(se.key==="Enter"&&se.shiftKey)return se.preventDefault(),C.paste(`\\
|
|
132
|
-
`),!1;if(!(L?se.metaKey:se.ctrlKey&&se.shiftKey))return!0;if(se.key==="c"||se.key==="C"){const me=C.getSelection();return me?(se.preventDefault(),navigator.clipboard.writeText(me).catch(()=>{}),!1):!0}return se.key==="v"||se.key==="V"?(se.preventDefault(),b3(C),!1):!0});const x=se=>S3(se,C);h.current.addEventListener("paste",x);try{const se=C._core,te=se==null?void 0:se._inputHandler;if(te&&typeof te.eraseInDisplay=="function"){const me=te.eraseInDisplay.bind(te);te.eraseInDisplay=(fe,ye)=>fe.params[0]===3?!0:me(fe,ye)}}catch{}const O=new a3({term:C,fitAddon:_,debug:!1,getContainer:()=>h.current});let M=null;const D=()=>{M&&clearTimeout(M),M=setTimeout(()=>{M=null,O.safeFit()},150)};O.safeFit();const k=setTimeout(D,300),R=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}${e}`,B={lastSeq:0,timer:null,disposed:!1,initialPhase:!0,initialBuffer:"",flushTimer:null,skipReplay:!1,recoveryTimer:null},U=6,V=new d3({maxAttempts:U}),q=se=>(se=se.replace(/\x1b\[[\?>][\d;]*c/g,""),se=se.replace(/\[[\?>][\d;]*c/g,""),se),Y=new o3,W=se=>{const te=se!==void 0?`${R}?resume=${se}`:R,me=fR(T_()),fe=me?new WebSocket(te,me):new WebSocket(te);fe.binaryType="arraybuffer",a.current=fe,B.initialPhase=!0,B.initialBuffer="",B.flushTimer&&(clearTimeout(B.flushTimer),B.flushTimer=null),Y.flush(),O.reset();const ye=()=>{B.initialPhase=!1,B.flushTimer=null;const Le=()=>{var be;((be=a.current)==null?void 0:be.readyState)===WebSocket.OPEN&&yu(a.current,"resize",{cols:C.cols,rows:C.rows})};if(B.initialBuffer){const be=q(B.initialBuffer);B.initialBuffer="",be?(O.beginReplay(),C.write(be,()=>{O.endReplay(),Le()})):(O.enterInteractive(),D(),Le())}else O.enterInteractive(),D(),Le()};fe.onopen=()=>{V.recordSuccess(),m("connected"),yu(fe,"resize",{cols:C.cols,rows:C.rows})},fe.onmessage=Le=>{var xe;const be=new Uint8Array(Le.data);if(be.length===0)return;const Qe=be[0],Rt=be.subarray(1);if(Qe===T2){const Se=new TextDecoder().decode(Rt);if(B.initialPhase)B.initialBuffer+=Se,B.flushTimer||(B.flushTimer=setTimeout(ye,500));else{const we=Y.write(Se);if(we){const ve=q(we);ve&&C.write(ve)}}}else if(Qe===O2)try{const Se=JSON.parse(new TextDecoder().decode(Rt));Se.type==="seq"&&typeof((xe=Se.payload)==null?void 0:xe.seq)=="number"&&(B.lastSeq=Se.payload.seq)}catch{}},fe.onclose=Le=>{if(B.disposed)return;if(g3({code:Le.code})==="permanent"){m("reconnecting"),o==null||o(),B.recoveryTimer||(B.recoveryTimer=setTimeout(()=>{B.recoveryTimer=null,!B.disposed&&(m("disconnected"),C.write(`\r
|
|
133
|
-
\x1B[31m[Codev: This terminal session no longer exists. Press the refresh button to reconnect.]\x1B[0m\r
|
|
134
|
-
`))},m3));return}if(V.recordFailure()==="give-up"){m("disconnected");return}m("reconnecting");const be=V.nextDelayMs();B.timer=setTimeout(()=>{B.disposed||W(B.lastSeq||void 0)},be)},fe.onerror=()=>{}},j=((Q=(ee=window.matchMedia)==null?void 0:ee.call(window,"(pointer: coarse)"))==null?void 0:Q.matches)??!1,H=C.textarea;let z=!1,F=0,Z="",re=0;const he=()=>{z=!0},ge=()=>{z=!1,F=Date.now()};H&&(H.addEventListener("compositionstart",he),H.addEventListener("compositionend",ge)),C.onData(se=>{var Le,be,Qe,Rt,xe,Se;const te=a.current;if(!te||te.readyState!==WebSocket.OPEN)return;const me=Date.now();if((z||me-F<150||j)&&se===Z&&me-re<150)return;if(Z=se,re=me,B.initialPhase){const we=se.replace(/\x1b\[[\?>][\d;]*c/g,"").replace(/\x1b\[\d+;\d+R/g,"").replace(/\x1b\[\?[\d;]*\$y/g,"");if(!we)return;se=we}const ye=f.current;if((ye.ctrl||ye.cmd)&&se.length===1){const we=se.charCodeAt(0);if(ye.ctrl)we>=97&&we<=122?se=String.fromCharCode(we-96):we>=65&&we<=90&&(se=String.fromCharCode(we-64)),ye.ctrl=!1,ye.cmd=!1,(Le=ye.clearCallback)==null||Le.call(ye);else if(ye.cmd){const ve=se.toLowerCase();if(ve==="v"){(be=navigator.clipboard)==null||be.readText().then(Ce=>{Ce&&C.paste(Ce)}).catch(()=>{}),ye.ctrl=!1,ye.cmd=!1,(Qe=ye.clearCallback)==null||Qe.call(ye);return}if(ve==="c"){const Ce=C.getSelection();Ce&&((Rt=navigator.clipboard)==null||Rt.writeText(Ce).catch(()=>{})),ye.ctrl=!1,ye.cmd=!1,(xe=ye.clearCallback)==null||xe.call(ye);return}ye.ctrl=!1,ye.cmd=!1,(Se=ye.clearCallback)==null||Se.call(ye)}}w3(te,se)}),C.onResize(({cols:se,rows:te})=>{const me=a.current;(me==null?void 0:me.readyState)===WebSocket.OPEN&&yu(me,"resize",{cols:se,rows:te})}),w.current=()=>{const se=a.current;if((se==null?void 0:se.readyState)===WebSocket.OPEN){c.current&&c.current.fit(),yu(se,"resize",{cols:C.cols,rows:C.rows});return}B.disposed||(B.timer&&(clearTimeout(B.timer),B.timer=null),V.reset(),W(B.lastSeq||void 0))},W();const X=new ResizeObserver(()=>D());X.observe(h.current);const G=()=>{document.hidden||D()};return document.addEventListener("visibilitychange",G),()=>{var se,te;B.disposed=!0,B.timer&&clearTimeout(B.timer),B.flushTimer&&clearTimeout(B.flushTimer),B.recoveryTimer&&clearTimeout(B.recoveryTimer),clearTimeout(k),M&&clearTimeout(M),H&&(H.removeEventListener("compositionstart",he),H.removeEventListener("compositionend",ge)),O.dispose(),E==null||E.dispose(),S==null||S.dispose(),(se=h.current)==null||se.removeEventListener("paste",x),X.disconnect(),document.removeEventListener("visibilitychange",G),(te=a.current)==null||te.close(),C.dispose(),g.current=null,a.current=null,c.current=null}},[e]),$.jsxs("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",position:"relative"},children:[r===!1&&$.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"}),$.jsx("div",{ref:h,className:"terminal-container",style:{width:"100%",flex:1,minHeight:0,overflow:"hidden",backgroundColor:"#1a1a1a"}}),$.jsx(_3,{fitRef:c,wsRef:a,xtermRef:g,connStatus:u,toolbarExtra:i,onReconnect:()=>{var C;return(C=w.current)==null?void 0:C.call(w)}}),v&&$.jsx(s3,{wsRef:a,modifierRef:f})]})}function w3(e,t){const r=new TextEncoder().encode(t),i=new Uint8Array(1+r.length);i[0]=T2,i.set(r,1),e.send(i.buffer)}function yu(e,t,r){const i=JSON.stringify({type:t,payload:r}),o=new TextEncoder().encode(i),h=new Uint8Array(1+o.length);h[0]=O2,h.set(o,1),e.send(h.buffer)}const C3=300*1e3;function R2(e,t=Date.now()){return e.blocked||e.phase==="complete"||e.phase==="verified"||!e.lastDataAt?!1:t-new Date(e.lastDataAt).getTime()>C3}function x3(e){if(e.blocked)return`Blocked: ${e.blocked}`;if(R2(e))return"Waiting on input";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(i=>i.id===e.phase);return r===-1?e.phase:`${e.phase} (${r+1}/${t.length})`}function Qv(e){if(e<0)return"-";const t=Math.floor(e/6e4);if(t<60)return`${t}m`;const r=Math.floor(t/60),i=t%60;return r<24?`${r}h ${i}m`:`${Math.floor(r/24)}d ${r%24}h`}function E3(e,t){if(!e)return"-";const r=Date.now()-new Date(e).getTime();if(r<0)return"-";const i=Math.max(0,r-t);return t===0?Qv(r):`${Qv(r)} wc / ${Qv(i)} ag`}function A3({builder:e,onOpen:t,architectCount:r=0}){const i=e.issueId?`#${e.issueId}`:e.id,o=e.issueTitle||e.id,h=e.blocked!==null&&e.blocked!=="",g=!h&&R2(e),a=Math.min(100,Math.max(0,Math.round(e.progress??0))),c=r>1&&!!e.spawnedByArchitect,f=h?" builder-row--blocked":g?" builder-row--waiting":"",v=h?" progress-fill--blocked":g?" progress-fill--waiting":"";return $.jsxs("tr",{className:`builder-row${f}`,children:[$.jsxs("td",{className:"builder-col-id",children:[i,c&&$.jsxs("span",{className:"builder-attribution",title:`spawned by ${e.spawnedByArchitect}`,children:[" · ",e.spawnedByArchitect]})]}),$.jsx("td",{className:"builder-col-title",children:o}),$.jsx("td",{className:"builder-col-state",children:$.jsx("span",{className:h||g?"builder-state-blocked":"builder-state-active",children:x3(e)})}),$.jsxs("td",{className:"builder-col-progress",children:[$.jsx("div",{className:"progress-bar",children:$.jsx("div",{className:`progress-fill${v}`,style:{width:`${a}%`}})}),$.jsxs("span",{className:"progress-pct",children:[a,"%"]})]}),$.jsx("td",{className:"builder-col-elapsed",children:E3(e.startedAt,e.idleMs??0)}),$.jsx("td",{className:"builder-col-actions",children:t&&$.jsx("button",{className:"builder-row-open",onClick:()=>t(e),children:"Open"})})]})}function M3(e){switch(e){case"spec review":return"attention-kind--spec";case"plan review":return"attention-kind--plan";case"dev review":return"attention-kind--dev";case"PR review":return"attention-kind--pr";case"verify review":return"attention-kind--verify";default:return"attention-kind--plan"}}function L3(e){const t=Date.now()-new Date(e).getTime(),r=Math.floor(t/6e4);if(r<60)return`${Math.max(1,r)}m`;const i=Math.floor(r/60);return i<24?`${i}h`:`${Math.floor(i/24)}d`}function O3(e,t){const r=[],i=new Map,o=new Set,h=new Set;for(const g of t)g.issueId&&(h.add(g.issueId),g.prReady&&(o.add(g.issueId),g.blockedSince&&i.set(g.issueId,g.blockedSince)));for(const g of e){const a=g.linkedIssue!==null&&h.has(g.linkedIssue),c=g.linkedIssue!==null&&o.has(g.linkedIssue),f=c&&g.linkedIssue!==null?i.get(g.linkedIssue):void 0,v=!a&&g.reviewStatus==="REVIEW_REQUIRED";if(!c&&!v)continue;const u=c?f??g.createdAt:g.createdAt;r.push({key:`pr-${g.id}`,issueOrPR:`#${g.id}`,title:g.title,kind:"PR review",kindClass:"attention-kind--pr",waitingSince:u,url:g.url})}for(const g of t){if(g.prReady||!g.blocked||!g.blockedSince)continue;const a=g.issueId?`#${g.issueId}`:g.id;r.push({key:`gate-${g.id}`,issueOrPR:a,title:g.issueTitle||g.id,kind:g.blocked,kindClass:M3(g.blocked),waitingSince:g.blockedSince})}return r.sort((g,a)=>new Date(g.waitingSince).getTime()-new Date(a.waitingSince).getTime()),r}function T3({prs:e,builders:t}){const r=O3(e,t);return r.length===0?$.jsx("p",{className:"work-empty",children:"Nothing needs attention"}):$.jsx("div",{className:"attention-rows",children:r.map(i=>{const o=$.jsxs($.Fragment,{children:[$.jsx("span",{className:"attention-row-id",children:i.issueOrPR}),$.jsx("span",{className:"attention-row-title",children:i.title}),$.jsx("span",{className:`attention-row-kind ${i.kindClass}`,children:i.kind}),$.jsx("span",{className:"attention-row-age",children:L3(i.waitingSince)})]});return i.url?$.jsx("a",{className:"attention-row",href:i.url,target:"_blank",rel:"noopener noreferrer",children:o},i.key):$.jsx("div",{className:"attention-row",children:o},i.key)})})}function D3(e){const t=Date.now()-new Date(e).getTime(),r=Math.floor(t/6e4);if(r<60)return`${Math.max(1,r)}m`;const i=Math.floor(r/60);return i<24?`${i}h`:`${Math.floor(i/24)}d`}const R3={high:"priority-dot--high",medium:"priority-dot--med",low:"priority-dot--low"},k3={bug:"type-tag--bug",project:"type-tag--project",spike:"type-tag--spike"};function Jv({label:e,filePath:t,onRefresh:r}){return $.jsx("button",{className:"backlog-artifact-link",onClick:async i=>{i.preventDefault(),i.stopPropagation(),await zh(t),r==null||r()},children:e})}function P3({items:e,onRefresh:t}){const r=e.filter(i=>!i.hasBuilder);return r.length===0?$.jsx("p",{className:"work-empty",children:"No open issues"}):$.jsx("div",{className:"backlog-rows",children:r.map(i=>$.jsxs("div",{className:"backlog-row",children:[$.jsxs("a",{className:"backlog-row-main",href:i.url,target:"_blank",rel:"noopener noreferrer",children:[$.jsx("span",{className:`backlog-priority-dot ${R3[i.priority]??"priority-dot--low"}`}),$.jsxs("span",{className:"backlog-row-number",children:["#",i.id]}),$.jsx("span",{className:`backlog-type-tag ${k3[i.type]??""}`,children:i.type}),$.jsx("span",{className:"backlog-row-title",children:i.title}),i.author&&$.jsxs("span",{className:"backlog-row-author",children:["r: @",i.author]}),$.jsxs("span",{className:"backlog-row-assignees",children:["a: ",i.assignees&&i.assignees.length>0?i.assignees.map(o=>`@${o}`).join(", "):"none"]}),$.jsx("span",{className:"backlog-row-age",children:D3(i.createdAt)})]}),(i.specPath||i.planPath||i.reviewPath)&&$.jsxs("span",{className:"backlog-artifacts",children:[i.specPath&&$.jsx(Jv,{label:"spec",filePath:i.specPath,onRefresh:t}),i.planPath&&$.jsx(Jv,{label:"plan",filePath:i.planPath,onRefresh:t}),i.reviewPath&&$.jsx(Jv,{label:"review",filePath:i.reviewPath,onRefresh:t})]})]},i.id))})}function B3(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 i=Math.floor(r/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}const j3={bug:"type-tag--bug",project:"type-tag--project",spike:"type-tag--spike"};function eg({label:e,filePath:t,onRefresh:r}){return $.jsx("button",{className:"backlog-artifact-link",onClick:async i=>{i.preventDefault(),i.stopPropagation(),await zh(t),r==null||r()},children:e})}function I3({items:e,onRefresh:t}){return e.length===0?null:$.jsx("div",{className:"recently-closed-rows",children:e.map(r=>{const i=r.prUrl||r.specPath||r.planPath||r.reviewPath;return $.jsxs("div",{className:"recently-closed-row",children:[$.jsxs("a",{className:"recently-closed-row-main",href:r.url,target:"_blank",rel:"noopener noreferrer",children:[$.jsx("span",{className:"recently-closed-check",children:"✓"}),$.jsxs("span",{className:"backlog-row-number",children:["#",r.id]}),$.jsx("span",{className:`backlog-type-tag ${j3[r.type]??""}`,children:r.type}),$.jsx("span",{className:"backlog-row-title",children:r.title}),$.jsx("span",{className:"backlog-row-age",children:B3(r.closedAt)})]}),i&&$.jsxs("span",{className:"backlog-artifacts",children:[r.specPath&&$.jsx(eg,{label:"spec",filePath:r.specPath,onRefresh:t}),r.planPath&&$.jsx(eg,{label:"plan",filePath:r.planPath,onRefresh:t}),r.reviewPath&&$.jsx(eg,{label:"review",filePath:r.reviewPath,onRefresh:t}),r.prUrl&&$.jsx("a",{className:"backlog-artifact-link",href:r.prUrl,target:"_blank",rel:"noopener noreferrer",onClick:o=>o.stopPropagation(),children:"PR"})]})]},r.id)})})}function N3(e,t){const r=e.replace(/^\//,"");return t.staged.some(i=>r.endsWith(i)||i.endsWith(r))?{indicator:"A",className:"git-staged"}:t.modified.some(i=>r.endsWith(i)||i.endsWith(r))?{indicator:"M",className:"git-modified"}:t.untracked.some(i=>r.endsWith(i)||i.endsWith(r))?{indicator:"?",className:"git-untracked"}:null}function k2({entry:e,expanded:t,gitStatus:r,onToggle:i,onOpen:o,depth:h=0}){var f;const g=e.type==="directory",a=t.has(e.path),c=g?null:N3(e.path,r);return $.jsxs($.Fragment,{children:[$.jsxs("div",{className:`file-node ${g?"directory":"file"}`,style:{paddingLeft:`${h*16+8}px`},onClick:()=>g?i(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?i(e.path):o(e.path))},children:[$.jsx("span",{className:"file-icon",children:g?a?"📂":"📁":"📄"}),$.jsx("span",{className:"file-name",children:e.name}),c&&$.jsx("span",{className:`git-indicator ${c.className}`,children:c.indicator})]}),g&&a&&((f=e.children)==null?void 0:f.map(v=>$.jsx(k2,{entry:v,expanded:t,gitStatus:r,onToggle:i,onOpen:o,depth:h+1},v.path)))]})}function P2(e,t=[]){for(const r of e)r.type==="file"&&t.push(r),r.children&&P2(r.children,t);return t}function z3({onRefresh:e}){const[t,r]=N.useState([]),[i,o]=N.useState(new Set),[h,g]=N.useState(null),[a,c]=N.useState(!1),[f,v]=N.useState({modified:[],staged:[],untracked:[]}),[u,m]=N.useState([]),[w,C]=N.useState(""),[_,d]=N.useState(!1),y=N.useRef(null),b=N.useCallback(async()=>{try{const R=await CR();r(R),g(null),c(!0)}catch(R){g(R.message)}},[]),S=N.useCallback(async()=>{try{const R=await ER();v(R)}catch(R){console.error("Failed to load git status:",R)}},[]),E=N.useCallback(async()=>{try{const R=await AR();m(R)}catch(R){console.error("Failed to load recent files:",R)}},[]);N.useEffect(()=>{a||(b(),S(),E())},[a,b,S,E]),N.useEffect(()=>{const R=setInterval(()=>{b(),S()},5e3);return()=>clearInterval(R)},[b,S]);const L=R=>{o(B=>{const U=new Set(B);return U.has(R)?U.delete(R):U.add(R),U})},x=async R=>{try{await zh(R),e(),E()}catch(B){console.error("Failed to open file:",B)}},O=N.useMemo(()=>P2(t),[t]),M=N.useMemo(()=>{if(!w.trim())return[];const R=w.toLowerCase();return O.filter(B=>B.name.toLowerCase().includes(R)||B.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))},P=R=>{x(R),C(""),d(!1)};return h?$.jsxs("div",{className:"file-tree-error",children:["Error: ",h]}):a?$.jsxs("div",{className:"file-tree-container",children:[$.jsxs("div",{className:"file-search",children:[$.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&&$.jsx("div",{className:"file-search-suggestions",children:M.map(R=>$.jsxs("div",{className:"file-search-suggestion",onMouseDown:()=>P(R.path),children:[$.jsx("span",{className:"suggestion-name",children:R.name}),$.jsx("span",{className:"suggestion-path",children:R.path})]},R.path))})]}),u.length>0&&$.jsxs("div",{className:"file-tree-section",children:[$.jsx("div",{className:"file-tree-section-header",children:"Recent"}),u.map(R=>$.jsxs("div",{className:"file-node file recent-file",style:{paddingLeft:"8px"},onClick:()=>x(R.path),role:"treeitem",tabIndex:0,onKeyDown:B=>{(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),x(R.path))},children:[$.jsx("span",{className:"file-icon",children:"🕐"}),$.jsx("span",{className:"file-name",children:R.name}),$.jsx("span",{className:"file-path-hint",children:R.relativePath})]},R.id))]}),$.jsxs("div",{className:"file-tree-section",children:[$.jsx("div",{className:"file-tree-section-header",children:"Files"}),$.jsx("div",{className:"file-tree",role:"tree","aria-label":"Project files",children:t.map(R=>$.jsx(k2,{entry:R,expanded:i,gitStatus:f,onToggle:L,onOpen:x},R.path))})]})]}):$.jsx("div",{className:"file-tree-loading",children:"Loading files..."})}function H3(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 $3(e){const t=e.split("/").filter(Boolean);return t.length<=1?e:t.slice(-2).join("/")}const U3=3e4;function F3({utils:e,annotations:t,onSelectTab:r}){if(e.length===0&&t.length===0)return null;const i=Date.now();return $.jsxs("section",{className:"work-section",children:[$.jsx("h3",{className:"work-section-title",children:"Open Files & Shells"}),$.jsxs("div",{className:"ofs-rows",children:[e.length>0&&$.jsxs($.Fragment,{children:[$.jsx("div",{className:"ofs-subgroup-label",children:"Shells"}),e.map(o=>{const h=!o.lastDataAt||i-o.lastDataAt>U3,g=o.lastDataAt?H3(i-o.lastDataAt):"";return $.jsxs("div",{className:"ofs-row",onClick:()=>r(o.id),children:[$.jsx("span",{className:`ofs-dot ${h?"ofs-dot--idle":"ofs-dot--running"}`}),$.jsx("span",{className:"ofs-name",children:o.name||`Shell ${o.id}`}),h&&g&&$.jsx("span",{className:"ofs-idle",children:g})]},o.id)})]}),t.length>0&&$.jsxs($.Fragment,{children:[$.jsx("div",{className:"ofs-subgroup-label",children:"Files"}),t.map(o=>{const h=o.file.split("/").pop()??o.file;return $.jsxs("div",{className:"ofs-row",onClick:()=>r(o.id),title:o.file,children:[$.jsx("span",{className:"ofs-file-icon",children:"📄"}),$.jsx("span",{className:"ofs-name",children:h}),$.jsx("span",{className:"ofs-path",children:$3(o.file)})]},o.id)})]})]})]})}const Ra=['Use `afx spawn --task "description"` for quick one-off tasks that don\'t need a spec',"Run `afx status` to see all active builders and their current phase",'Use `afx send architect "message"` to notify the architect when you need guidance',"Run `afx cleanup --project 0042` after merging a PR to clean up the worktree","Use `afx spawn --soft -p 42` for flexible, protocol-guided work without strict porch orchestration","Run `afx workspace start` to launch the architect dashboard","Use `afx spawn 42 --resume` to resume an existing builder worktree instead of recreating it","Use `afx open file.ts` to open a file in the dashboard annotation viewer","Run `afx tower start` to start the Tower server — there is no `restart` command, use stop then start","Check `.codev/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 W3(e){const t=new Date(e.getFullYear(),0,0);return Math.floor((e.getTime()-t.getTime())/864e5)}function B2(e){const t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getDate()).padStart(2,"0");return`tip-dismissed-${t}-${r}-${i}`}function q3(){try{return localStorage.getItem(B2(new Date))==="1"}catch{return!1}}function G3(){try{localStorage.setItem(B2(new Date),"1")}catch{}}function K3(e){return e.split("`").map((r,i)=>i%2===1?$.jsx("code",{children:r},i):$.jsx("span",{children:r},i))}function Y3(){const e=W3(new Date)%Ra.length,[t,r]=N.useState(e),[i,o]=N.useState(q3);if(i||Ra.length===0)return null;const h=()=>{r((t-1+Ra.length)%Ra.length)},g=()=>{r((t+1)%Ra.length)},a=()=>{G3(),o(!0)};return $.jsxs("div",{className:"tip-banner",children:[$.jsx("button",{className:"tip-banner-nav",onClick:h,"aria-label":"Previous tip",children:"‹"}),$.jsx("span",{className:"tip-banner-label",children:"Tip:"}),$.jsx("span",{className:"tip-banner-text",children:K3(Ra[t])}),$.jsx("button",{className:"tip-banner-nav",onClick:g,"aria-label":"Next tip",children:"›"}),$.jsx("button",{className:"tip-banner-dismiss",onClick:a,"aria-label":"Dismiss tip",children:"×"})]})}function V3({state:e,onRefresh:t,onSelectTab:r}){var u,m,w;const{data:i,error:o,refresh:h}=w2(),[g,a]=N.useState(!1),c=N.useCallback(async()=>{try{await SR(),t()}catch(C){console.error("Failed to create shell:",C)}},[t]),f=N.useCallback(C=>{var d;const _=(d=e==null?void 0:e.builders)==null?void 0:d.find(y=>{var b,S,E,L;return C.issueId?((b=y.name)==null?void 0:b.includes(C.issueId))||((S=y.id)==null?void 0:S.includes(C.issueId)):((E=y.id)==null?void 0:E.includes(C.id))||((L=y.name)==null?void 0:L.includes(C.id))});_&&(r==null||r(_.id))},[e==null?void 0:e.builders,r]);if(!e)return $.jsx("div",{className:"work-view",children:$.jsx("p",{className:"work-loading",children:"Loading..."})});const v=((u=e.architects)==null?void 0:u.length)??0;return $.jsxs("div",{className:`work-view ${g?"file-panel-open":""}`,children:[$.jsxs("div",{className:"work-content",children:[$.jsxs("div",{className:"work-header",children:[$.jsx("h2",{className:"work-title",children:"Work"}),$.jsxs("div",{className:"work-actions",children:[$.jsx("button",{className:"work-btn",onClick:c,children:"+ Shell"}),$.jsx("button",{className:"work-btn work-btn-secondary",onClick:h,children:"Refresh"})]})]}),o&&$.jsxs("div",{className:"work-error",children:["Failed to load overview: ",o]}),$.jsx(Y3,{}),$.jsxs("section",{className:"work-section",children:[$.jsx("h3",{className:"work-section-title",children:"Builders"}),i!=null&&i.builders&&i.builders.length>0?$.jsxs("table",{className:"builder-table",children:[$.jsx("thead",{children:$.jsxs("tr",{children:[$.jsx("th",{children:"Issue"}),$.jsx("th",{children:"Title"}),$.jsx("th",{children:"State"}),$.jsx("th",{children:"Progress"}),$.jsx("th",{children:"Elapsed"}),$.jsx("th",{})]})}),$.jsx("tbody",{children:i.builders.map(C=>$.jsx(A3,{builder:C,onOpen:f,architectCount:v},C.id))})]}):$.jsx("p",{className:"work-empty",children:"No active builders"})]}),$.jsx(F3,{utils:(e==null?void 0:e.utils)??[],annotations:(e==null?void 0:e.annotations)??[],onSelectTab:C=>r==null?void 0:r(C)}),(i==null?void 0:i.forgeStatus)==="rate-limited"&&$.jsxs("p",{className:"work-unavailable",children:["Forge rate limited — PRs, backlog and recently closed may be stale until"," ",i.forgeResetAt?new Date(i.forgeResetAt).toLocaleTimeString():"the budget resets"]}),$.jsxs("section",{className:"work-section",children:[$.jsx("h3",{className:"work-section-title",children:"Needs Attention"}),(m=i==null?void 0:i.errors)!=null&&m.prs?$.jsx("p",{className:"work-unavailable",children:i.errors.prs}):$.jsx(T3,{prs:(i==null?void 0:i.pendingPRs)??[],builders:(i==null?void 0:i.builders)??[]})]}),$.jsxs("section",{className:"work-section",children:[$.jsx("h3",{className:"work-section-title",children:"Backlog"}),(w=i==null?void 0:i.errors)!=null&&w.issues?$.jsx("p",{className:"work-unavailable",children:i.errors.issues}):$.jsx(P3,{items:(i==null?void 0:i.backlog)??[],onRefresh:t})]}),(i==null?void 0:i.recentlyClosed)&&i.recentlyClosed.length>0&&$.jsxs("section",{className:"work-section",children:[$.jsx("h3",{className:"work-section-title",children:"Recently Closed"}),$.jsx(I3,{items:i.recentlyClosed,onRefresh:t})]})]}),$.jsxs("div",{className:`work-file-panel ${g?"expanded":"collapsed"}`,children:[$.jsxs("div",{className:"work-file-panel-header",children:[$.jsx("span",{className:"work-file-panel-toggle",onClick:()=>a(!g),children:g?"▼":"▲"}),$.jsx("span",{className:"work-file-panel-label",onClick:()=>a(!g),children:"Files"}),!g&&$.jsx("input",{className:"work-file-panel-search",type:"text",placeholder:"Search files...",onFocus:()=>a(!0)})]}),g&&$.jsx("div",{className:"work-file-panel-content",children:$.jsx(z3,{onRefresh:t})})]})]})}function X3(e,t,r="held"){const i=e??r;return t?`${i}:${t}`:i}function j2(e){const t=Math.max(0,Math.floor(e/1e3));if(t<60)return`${t}s`;const r=Math.floor(t/60);if(r<60)return`${r}m`;const i=Math.floor(r/60);return i<24?`${i}h`:`${Math.floor(i/24)}d`}function Z3(e,t){return j2(t-e)}function kp(e,t){return e!=null&&e>t}function CS({message:e,now:t}){const r=kp(e.notBefore,t),i=`${e.fromAgent??"?"} → ${e.toAgent}`,o=r?`→${j2(e.notBefore-t)}`:Z3(e.createdAt,t),h=r?"scheduled":X3(e.reason,e.detail);return $.jsxs("li",{className:`held-row${e.escalated?" held-row--attention":""}`,"data-testid":"held-row",children:[$.jsx("span",{className:"held-row-addresses",children:i}),$.jsxs("span",{className:"held-row-meta",children:[o," · ",h,e.escalated&&!r?"!":""]})]})}function Q3({count:e,escalated:t,loadMessages:r}){const[i,o]=N.useState(!1),[h,g]=N.useState({kind:"loading"}),[a,c]=N.useState(!1),f=N.useRef(null),v=N.useRef(null),u=N.useId(),m=N.useRef(0),w=N.useRef(r);N.useEffect(()=>{w.current=r},[r]);const C=N.useCallback(()=>{const L=++m.current;c(!0),g(x=>x.kind==="ready"?x:{kind:"loading"}),w.current().then(x=>{m.current===L&&(c(!1),g({kind:"ready",messages:x}))},x=>{m.current===L&&(c(!1),g({kind:"error",message:x instanceof Error?x.message:String(x)}))})},[]);if(N.useEffect(()=>{i&&C()},[i,e,C]),N.useEffect(()=>{if(!i)return;const L=O=>{var M;O.key==="Escape"&&(o(!1),(M=f.current)==null||M.focus())},x=O=>{var M;(M=v.current)!=null&&M.contains(O.target)||o(!1)};return document.addEventListener("keydown",L),document.addEventListener("mousedown",x),()=>{document.removeEventListener("keydown",L),document.removeEventListener("mousedown",x)}},[i]),e<=0&&!i)return null;const _=`${e} held`,d=t?`${e} held message${e===1?"":"s"} — at least one past the escalation age. Click to list them.`:`${e} held message${e===1?"":"s"} awaiting a clear prompt. Click to list them.`,y=Date.now(),b=h.kind==="ready"?h.messages:[],S=b.filter(L=>!kp(L.notBefore,y)),E=b.filter(L=>kp(L.notBefore,y));return $.jsxs("div",{className:"held-badge-wrapper",ref:v,children:[$.jsxs("button",{type:"button",ref:f,className:`held-badge${t?" held-badge--attention":""}`,"data-testid":"held-badge",title:d,"aria-expanded":i,"aria-controls":u,onClick:()=>o(L=>!L),children:[$.jsx("span",{className:`held-dot${t?" held-dot--attention":""}`}),_]}),i&&$.jsxs("div",{className:"held-popover",id:u,"data-testid":"held-popover","aria-live":"polite","aria-busy":a,children:[h.kind==="loading"&&$.jsx("p",{className:"held-popover-note",children:"Loading…"}),h.kind==="error"&&$.jsxs("p",{className:"held-popover-note held-popover-note--error","data-testid":"held-error",children:["Could not load held messages: ",h.message]}),h.kind==="ready"&&S.length===0&&$.jsx("p",{className:"held-popover-note","data-testid":"held-empty",children:e<=0&&b.length>0?"No held messages — the rows below are scheduled.":e<=0?"Held mail cleared.":"No held messages."}),S.length>0&&$.jsxs("section",{className:"held-group",children:[$.jsxs("h2",{className:"held-group-title",children:["Held (",S.length,")"]}),$.jsx("ul",{className:"held-list","data-testid":"held-group-held",children:S.map(L=>$.jsx(CS,{message:L,now:y},L.id))})]}),E.length>0&&$.jsxs("section",{className:"held-group held-group--scheduled",children:[$.jsxs("h2",{className:"held-group-title",children:["Scheduled (",E.length,")"]}),$.jsx("p",{className:"held-group-note",children:"Waiting for their due time — not counted above."}),$.jsx("ul",{className:"held-list","data-testid":"held-group-scheduled",children:E.map(L=>$.jsx(CS,{message:L,now:y},L.id))})]}),$.jsxs("p",{className:"held-popover-foot",children:["Ids and dismissal: ",$.jsx("code",{children:"afx inbox"})]})]})]})}function J3({tabs:e,activeTabId:t,onSelectTab:r,onRefresh:i,children:o}){return $.jsxs("div",{className:"mobile-layout",children:[$.jsx(E2,{tabs:e,activeTabId:t,onSelectTab:r,onRefresh:i}),$.jsx("div",{className:"mobile-content",children:o})]})}function ek({tabId:e,initialLine:t}){let i=`${_2()}api/annotate/${e}/`;return t&&(i+=`?line=${t}`),$.jsx("div",{className:"file-viewer",style:{width:"100%",height:"100%"},children:$.jsx("iframe",{src:i,style:{width:"100%",height:"100%",border:"none"},title:"File Annotator"})})}function tk(e){return e==="24h"?"1":e==="7d"?"7":e==="30d"?"30":"all"}function rk(e){const[t,r]=N.useState(null),[i,o]=N.useState(null),[h,g]=N.useState(!1),[a,c]=N.useState("7d"),f=N.useCallback(async(u,m=!1)=>{g(!0),o(null);try{const w=await pR(tk(u),m);r(w)}catch(w){o(w instanceof Error?w.message:"Failed to fetch analytics")}finally{g(!1)}},[]);N.useEffect(()=>{e&&f(a)},[a,e,f]);const v=N.useCallback(()=>{f(a,!0)},[f,a]);return{data:t,error:i,loading:h,range:a,setRange:c,refresh:v}}function I2(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=I2(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function vt(){for(var e,t,r=0,i="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=I2(e))&&(i&&(i+=" "),i+=t);return i}var ik=["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 R_(e){if(typeof e!="string")return!1;var t=ik;return t.includes(e)}var nk=["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"],sk=new Set(nk);function N2(e){return typeof e!="string"?!1:sk.has(e)}function z2(e){return typeof e=="string"&&e.startsWith("data-")}function Vn(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(N2(r)||z2(r))&&(t[r]=e[r]);return t}function k_(e){if(e==null)return null;if(N.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Vn(t)}return typeof e=="object"&&!Array.isArray(e)?Vn(e):null}function ri(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(N2(r)||z2(r)||R_(r))&&(t[r]=e[r]);return t}var ak=["children","width","height","viewBox","className","style","title","desc"];function Pp(){return Pp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},Pp.apply(null,arguments)}function ok(e,t){if(e==null)return{};var r,i,o=lk(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(i=0;i<h.length;i++)r=h[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function lk(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}var H2=N.forwardRef((e,t)=>{var{children:r,width:i,height:o,viewBox:h,className:g,style:a,title:c,desc:f}=e,v=ok(e,ak),u=h||{width:i,height:o,x:0,y:0},m=vt("recharts-surface",g);return N.createElement("svg",Pp({},ri(v),{className:m,width:i,height:o,style:a,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height),ref:t}),N.createElement("title",null,c),N.createElement("desc",null,f),r)}),ck=["children","className"];function Bp(){return Bp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},Bp.apply(null,arguments)}function uk(e,t){if(e==null)return{};var r,i,o=hk(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(i=0;i<h.length;i++)r=h[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function hk(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}var Ri=N.forwardRef((e,t)=>{var{children:r,className:i}=e,o=uk(e,ck),h=vt("recharts-layer",i);return N.createElement("g",Bp({className:h},ri(o),{ref:t}),r)}),$2=v2(),fk=N.createContext(null);function lt(e){return function(){return e}}const U2=Math.cos,Gu=Math.sin,pi=Math.sqrt,Ku=Math.PI,Hh=2*Ku,jp=Math.PI,Ip=2*jp,xs=1e-6,dk=Ip-xs;function F2(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function vk(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return F2;const r=10**t;return function(i){this._+=i[0];for(let o=1,h=i.length;o<h;++o)this._+=Math.round(arguments[o]*r)/r+i[o]}}class gk{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?F2:vk(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,i,o){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+o}`}bezierCurveTo(t,r,i,o,h,g){this._append`C${+t},${+r},${+i},${+o},${this._x1=+h},${this._y1=+g}`}arcTo(t,r,i,o,h){if(t=+t,r=+r,i=+i,o=+o,h=+h,h<0)throw new Error(`negative radius: ${h}`);let g=this._x1,a=this._y1,c=i-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>xs)if(!(Math.abs(u*c-f*v)>xs)||!h)this._append`L${this._x1=t},${this._y1=r}`;else{let w=i-g,C=o-a,_=c*c+f*f,d=w*w+C*C,y=Math.sqrt(_),b=Math.sqrt(m),S=h*Math.tan((jp-Math.acos((_+m-d)/(2*y*b)))/2),E=S/b,L=S/y;Math.abs(E-1)>xs&&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,i,o,h,g){if(t=+t,r=+r,i=+i,g=!!g,i<0)throw new Error(`negative radius: ${i}`);let a=i*Math.cos(o),c=i*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)>xs||Math.abs(this._y1-v)>xs)&&this._append`L${f},${v}`,i&&(m<0&&(m=m%Ip+Ip),m>dk?this._append`A${i},${i},0,1,${u},${t-a},${r-c}A${i},${i},0,1,${u},${this._x1=f},${this._y1=v}`:m>xs&&this._append`A${i},${i},0,${+(m>=jp)},${u},${this._x1=t+i*Math.cos(h)},${this._y1=r+i*Math.sin(h)}`)}rect(t,r,i,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+o}h${-i}Z`}toString(){return this._}}function P_(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new gk(t)}function B_(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function W2(e){this._context=e}W2.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 $h(e){return new W2(e)}function q2(e){return e[0]}function G2(e){return e[1]}function K2(e,t){var r=lt(!0),i=null,o=$h,h=null,g=P_(a);e=typeof e=="function"?e:e===void 0?q2:lt(e),t=typeof t=="function"?t:t===void 0?G2:lt(t);function a(c){var f,v=(c=B_(c)).length,u,m=!1,w;for(i==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,i!=null&&(h=o(i)),a):o},a.context=function(c){return arguments.length?(c==null?i=h=null:h=o(i=c),a):i},a}function bu(e,t,r){var i=null,o=lt(!0),h=null,g=$h,a=null,c=P_(f);e=typeof e=="function"?e:e===void 0?q2:lt(+e),t=typeof t=="function"?t:lt(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?G2:lt(+r);function f(u){var m,w,C,_=(u=B_(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(i?+i(d,m,u):S[m],r?+r(d,m,u):E[m]))}if(b)return a=null,b+""||null}function v(){return K2().defined(o).curve(g).context(h)}return f.x=function(u){return arguments.length?(e=typeof u=="function"?u:lt(+u),i=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?(i=u==null?null:typeof u=="function"?u:lt(+u),f):i},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(i).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 Y2{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 pk(e){return new Y2(e,!0)}function _k(e){return new Y2(e,!1)}const j_={draw(e,t){const r=pi(t/Ku);e.moveTo(r,0),e.arc(0,0,r,0,Hh)}},mk={draw(e,t){const r=pi(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()}},V2=pi(1/3),yk=V2*2,bk={draw(e,t){const r=pi(t/yk),i=r*V2;e.moveTo(0,-r),e.lineTo(i,0),e.lineTo(0,r),e.lineTo(-i,0),e.closePath()}},Sk={draw(e,t){const r=pi(t),i=-r/2;e.rect(i,i,r,r)}},wk=.8908130915292852,X2=Gu(Ku/10)/Gu(7*Ku/10),Ck=Gu(Hh/10)*X2,xk=-U2(Hh/10)*X2,Ek={draw(e,t){const r=pi(t*wk),i=Ck*r,o=xk*r;e.moveTo(0,-r),e.lineTo(i,o);for(let h=1;h<5;++h){const g=Hh*h/5,a=U2(g),c=Gu(g);e.lineTo(c*r,-a*r),e.lineTo(a*i-c*o,c*i+a*o)}e.closePath()}},tg=pi(3),Ak={draw(e,t){const r=-pi(t/(tg*3));e.moveTo(0,r*2),e.lineTo(-tg*r,-r),e.lineTo(tg*r,-r),e.closePath()}},Zr=-.5,Qr=pi(3)/2,Np=1/pi(12),Mk=(Np/2+1)*3,Lk={draw(e,t){const r=pi(t/Mk),i=r/2,o=r*Np,h=i,g=r*Np+r,a=-h,c=g;e.moveTo(i,o),e.lineTo(h,g),e.lineTo(a,c),e.lineTo(Zr*i-Qr*o,Qr*i+Zr*o),e.lineTo(Zr*h-Qr*g,Qr*h+Zr*g),e.lineTo(Zr*a-Qr*c,Qr*a+Zr*c),e.lineTo(Zr*i+Qr*o,Zr*o-Qr*i),e.lineTo(Zr*h+Qr*g,Zr*g-Qr*h),e.lineTo(Zr*a+Qr*c,Zr*c-Qr*a),e.closePath()}};function Ok(e,t){let r=null,i=P_(o);e=typeof e=="function"?e:lt(e||j_),t=typeof t=="function"?t:lt(t===void 0?64:+t);function o(){let h;if(r||(r=h=i()),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 Yu(){}function Vu(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 Z2(e){this._context=e}Z2.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:Vu(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:Vu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Tk(e){return new Z2(e)}function Q2(e){this._context=e}Q2.prototype={areaStart:Yu,areaEnd:Yu,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:Vu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Dk(e){return new Q2(e)}function J2(e){this._context=e}J2.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,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:Vu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Rk(e){return new J2(e)}function eE(e){this._context=e}eE.prototype={areaStart:Yu,areaEnd:Yu,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 kk(e){return new eE(e)}function xS(e){return e<0?-1:1}function ES(e,t,r){var i=e._x1-e._x0,o=t-e._x1,h=(e._y1-e._y0)/(i||o<0&&-0),g=(r-e._y1)/(o||i<0&&-0),a=(h*o+g*i)/(i+o);return(xS(h)+xS(g))*Math.min(Math.abs(h),Math.abs(g),.5*Math.abs(a))||0}function AS(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function rg(e,t,r){var i=e._x0,o=e._y0,h=e._x1,g=e._y1,a=(h-i)/3;e._context.bezierCurveTo(i+a,o+a*t,h-a,g-a*r,h,g)}function Xu(e){this._context=e}Xu.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:rg(this,this._t0,AS(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,rg(this,AS(this,r=ES(this,e,t)),r);break;default:rg(this,this._t0,r=ES(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function tE(e){this._context=new rE(e)}(tE.prototype=Object.create(Xu.prototype)).point=function(e,t){Xu.prototype.point.call(this,t,e)};function rE(e){this._context=e}rE.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,i,o,h){this._context.bezierCurveTo(t,e,i,r,h,o)}};function Pk(e){return new Xu(e)}function Bk(e){return new tE(e)}function iE(e){this._context=e}iE.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 i=MS(e),o=MS(t),h=0,g=1;g<r;++h,++g)this._context.bezierCurveTo(i[0][h],o[0][h],i[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 MS(e){var t,r=e.length-1,i,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)i=o[t]/h[t-1],h[t]-=i,g[t]-=i*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 jk(e){return new iE(e)}function Uh(e,t){this._context=e,this._t=t}Uh.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 Ik(e){return new Uh(e,.5)}function Nk(e){return new Uh(e,0)}function zk(e){return new Uh(e,1)}function Bs(e,t){if((g=e.length)>1)for(var r=1,i,o,h=e[t[0]],g,a=h.length;r<g;++r)for(o=h,h=e[t[r]],i=0;i<a;++i)h[i][1]+=h[i][0]=isNaN(o[i][1])?o[i][0]:o[i][1]}function zp(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function Hk(e,t){return e[t]}function $k(e){const t=[];return t.key=e,t}function Uk(){var e=lt([]),t=zp,r=Bs,i=Hk;function o(h){var g=Array.from(e.apply(this,arguments),$k),a,c=g.length,f=-1,v;for(const u of h)for(a=0,++f;a<c;++a)(g[a][f]=[0,+i(u,g[a].key,f,h)]).data=u;for(a=0,v=B_(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?(i=typeof h=="function"?h:lt(+h),o):i},o.order=function(h){return arguments.length?(t=h==null?zp:typeof h=="function"?h:lt(Array.from(h)),o):t},o.offset=function(h){return arguments.length?(r=h??Bs,o):r},o}function Fk(e,t){if((i=e.length)>0){for(var r,i,o=0,h=e[0].length,g;o<h;++o){for(g=r=0;r<i;++r)g+=e[r][o][1]||0;if(g)for(r=0;r<i;++r)e[r][o][1]/=g}Bs(e,t)}}function Wk(e,t){if((o=e.length)>0){for(var r=0,i=e[t[0]],o,h=i.length;r<h;++r){for(var g=0,a=0;g<o;++g)a+=e[g][r][1]||0;i[r][1]+=i[r][0]=-a/2}Bs(e,t)}}function qk(e,t){if(!(!((g=e.length)>0)||!((h=(o=e[t[0]]).length)>0))){for(var r=0,i=1,o,h,g;i<h;++i){for(var a=0,c=0,f=0;a<g;++a){for(var v=e[t[a]],u=v[i][1]||0,m=v[i-1][1]||0,w=(u-m)/2,C=0;C<a;++C){var _=e[t[C]],d=_[i][1]||0,y=_[i-1][1]||0;w+=d-y}c+=u,f+=w*u}o[i-1][1]+=o[i-1][0]=r,c&&(r-=f/c)}o[i-1][1]+=o[i-1][0]=r,Bs(e,t)}}var ig={},ng={},LS;function Gk(){return LS||(LS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(ng)),ng}var sg={},OS;function nE(){return OS||(OS=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})(sg)),sg}var ag={},TS;function I_(){return TS||(TS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){var i;return typeof r=="string"||typeof r=="symbol"?r:Object.is((i=r==null?void 0:r.valueOf)==null?void 0:i.call(r),-0)?"-0":String(r)}e.toKey=t})(ag)),ag}var og={},lg={},DS;function Kk(){return DS||(DS=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 i=String(r);return i==="0"&&Object.is(Number(r),-0)?"-0":i}e.toString=t})(lg)),lg}var RS;function N_(){return RS||(RS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Kk(),r=I_();function i(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=i})(og)),og}var kS;function z_(){return kS||(kS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Gk(),r=nE(),i=I_(),o=N_();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=i.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})(ig)),ig}var cg,PS;function Yk(){return PS||(PS=1,cg=z_().get),cg}var Vk=Yk();const Ya=Qn(Vk);var Xk=4;function Gn(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xk,r=10**t,i=Math.round(e*r)/r;return Object.is(i,-0)?0:i}function xt(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return e.reduce((o,h,g)=>{var a=r[g-1];return typeof a=="string"?o+a+h:a!==void 0?o+Gn(a)+h:o+h},"")}var Pr=e=>e===0?0:e>0?1:-1,ki=e=>typeof e=="number"&&e!=+e,js=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,Te=e=>(typeof e=="number"||e instanceof Number)&&!ki(e),Pi=e=>Te(e)||typeof e=="string",Zk=0,Ll=e=>{var t=++Zk;return"".concat(e||"").concat(t)},vi=function(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Te(t)&&typeof t!="string")return i;var h;if(js(t)){if(r==null)return i;var g=t.indexOf("%");h=r*parseFloat(t.slice(0,g))/100}else h=+t;return ki(h)&&(h=i),o&&r!=null&&h>r&&(h=r),h},sE=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},i=0;i<t;i++)if(!r[String(e[i])])r[String(e[i])]=!0;else return!0;return!1};function nr(e,t,r){return Te(e)&&Te(t)?Gn(e+r*(t-e)):t}function Qk(e,t,r){if(!(!e||!e.length))return e.find(i=>i&&(typeof t=="function"?t(i):Ya(i,t))===r)}var Nt=e=>e===null||typeof e>"u",Fl=e=>Nt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Mi(e){return e!=null}function ao(){}var Jk=["type","size","sizeType"];function Hp(){return Hp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},Hp.apply(null,arguments)}function BS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function jS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BS(Object(r),!0).forEach(function(i){eP(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BS(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function eP(e,t,r){return(t=tP(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tP(e){var t=rP(e,"string");return typeof t=="symbol"?t:t+""}function rP(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function iP(e,t){if(e==null)return{};var r,i,o=nP(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(i=0;i<h.length;i++)r=h[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function nP(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}var aE={symbolCircle:j_,symbolCross:mk,symbolDiamond:bk,symbolSquare:Sk,symbolStar:Ek,symbolTriangle:Ak,symbolWye:Lk},sP=Math.PI/180,aP=e=>{var t="symbol".concat(Fl(e));return aE[t]||j_},oP=(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 i=18*sP;return 1.25*e*e*(Math.tan(i)-Math.tan(i*2)*Math.tan(i)**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}},lP=(e,t)=>{aE["symbol".concat(Fl(e))]=t},oE=e=>{var{type:t="circle",size:r=64,sizeType:i="area"}=e,o=iP(e,Jk),h=jS(jS({},o),{},{type:t,size:r,sizeType:i}),g="circle";typeof t=="string"&&(g=t);var a=()=>{var m=aP(g),w=Ok().type(m).size(oP(r,i,g)),C=w();if(C!==null)return C},{className:c,cx:f,cy:v}=h,u=ri(h);return Te(f)&&Te(v)&&Te(r)?N.createElement("path",Hp({},u,{className:vt("recharts-symbols",c),transform:"translate(".concat(f,", ").concat(v,")"),d:a()})):null};oE.registerSymbol=lP;var lE=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,cP=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(N.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var i={};return Object.keys(r).forEach(o=>{R_(o)&&typeof r[o]=="function"&&(i[o]=(h=>r[o](r,h)))}),i},uP=(e,t,r)=>i=>(e(t,r,i),null),H_=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var i=null;return Object.keys(e).forEach(o=>{var h=e[o];R_(o)&&typeof h=="function"&&(i||(i={}),i[o]=uP(h,t,r))}),i};function IS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function hP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?IS(Object(r),!0).forEach(function(i){fP(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):IS(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function fP(e,t,r){return(t=dP(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dP(e){var t=vP(e,"string");return typeof t=="symbol"?t:t+""}function vP(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ni(e,t){var r=hP({},e),i=t,o=Object.keys(t),h=o.reduce((g,a)=>(g[a]===void 0&&i[a]!==void 0&&(g[a]=i[a]),g),r);return h}var ug={},hg={},NS;function gP(){return NS||(NS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,i){const o=new Map;for(let h=0;h<r.length;h++){const g=r[h],a=i(g,h,r);o.has(a)||o.set(a,g)}return Array.from(o.values())}e.uniqBy=t})(hg)),hg}var fg={},zS;function pP(){return zS||(zS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,i){return function(...o){return r.apply(this,o.slice(0,i))}}e.ary=t})(fg)),fg}var dg={},HS;function cE(){return HS||(HS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(dg)),dg}var vg={},gg={},pg={},$S;function _P(){return $S||($S=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(pg)),pg}var US;function uE(){return US||(US=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_P();function r(i){return i!=null&&typeof i!="function"&&t.isLength(i.length)}e.isArrayLike=r})(gg)),gg}var _g={},FS;function mP(){return FS||(FS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(_g)),_g}var WS;function yP(){return WS||(WS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=uE(),r=mP();function i(o){return r.isObjectLike(o)&&t.isArrayLike(o)}e.isArrayLikeObject=i})(vg)),vg}var mg={},yg={},qS;function bP(){return qS||(qS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=z_();function r(i){return function(o){return t.get(o,i)}}e.property=r})(yg)),yg}var bg={},Sg={},wg={},Cg={},GS;function hE(){return GS||(GS=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})(Cg)),Cg}var xg={},KS;function fE(){return KS||(KS=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})(xg)),xg}var Eg={},YS;function dE(){return YS||(YS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,i){return r===i||Number.isNaN(r)&&Number.isNaN(i)}e.isEqualsSameValueZero=t})(Eg)),Eg}var VS;function SP(){return VS||(VS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=hE(),r=fE(),i=dE();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):i.isEqualsSameValueZero(v,u);default:return t.isObject(v)?typeof u=="string"?u==="":!0:i.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})(wg)),wg}var XS;function vE(){return XS||(XS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=SP();function r(i,o){return t.isMatchWith(i,o,()=>{})}e.isMatch=r})(Sg)),Sg}var Ag={},Mg={},Lg={},ZS;function wP(){return ZS||(ZS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Object.getOwnPropertySymbols(r).filter(i=>Object.prototype.propertyIsEnumerable.call(r,i))}e.getSymbols=t})(Lg)),Lg}var Og={},QS;function $_(){return QS||(QS=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})(Og)),Og}var Tg={},JS;function gE(){return JS||(JS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",r="[object String]",i="[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=i,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})(Tg)),Tg}var Dg={},ew;function CP(){return ew||(ew=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(Dg)),Dg}var tw;function pE(){return tw||(tw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=wP(),r=$_(),i=gE(),o=fE(),h=CP();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=structuredClone(v);return w.set(v,d),d.message=v.message,d.name=v.name,d.stack=v.stack,d.cause=v.cause,d.constructor=v.constructor,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 i.argumentsTag:case i.arrayTag:case i.arrayBufferTag:case i.dataViewTag:case i.booleanTag:case i.dateTag:case i.float32ArrayTag:case i.float64ArrayTag:case i.int8ArrayTag:case i.int16ArrayTag:case i.int32ArrayTag:case i.mapTag:case i.numberTag:case i.objectTag:case i.regexpTag:case i.setTag:case i.stringTag:case i.symbolTag:case i.uint8ArrayTag:case i.uint8ClampedArrayTag:case i.uint16ArrayTag:case i.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=g,e.cloneDeepWithImpl=a,e.copyProperties=c})(Mg)),Mg}var rw;function xP(){return rw||(rw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=pE();function r(i){return t.cloneDeepWithImpl(i,void 0,i,new Map,void 0)}e.cloneDeep=r})(Ag)),Ag}var iw;function EP(){return iw||(iw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=vE(),r=xP();function i(o){return o=r.cloneDeep(o),h=>t.isMatch(h,o)}e.matches=i})(bg)),bg}var Rg={},kg={},Pg={},nw;function AP(){return nw||(nw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=pE(),r=$_(),i=gE();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)===i.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 i.numberTag:case i.stringTag:case i.booleanTag:{const m=new h.constructor(h==null?void 0:h.valueOf());return t.copyProperties(m,h),m}case i.argumentsTag:{const m={};return t.copyProperties(m,h),m.length=h.length,m[Symbol.iterator]=h[Symbol.iterator],m}default:return}}})}e.cloneDeepWith=o})(Pg)),Pg}var sw;function MP(){return sw||(sw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=AP();function r(i){return t.cloneDeepWith(i)}e.cloneDeep=r})(kg)),kg}var Bg={},jg={},aw;function _E(){return aw||(aw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function r(i,o=Number.MAX_SAFE_INTEGER){switch(typeof i){case"number":return Number.isInteger(i)&&i>=0&&i<o;case"symbol":return!1;case"string":return t.test(i)}}e.isIndex=r})(jg)),jg}var Ig={},ow;function LP(){return ow||(ow=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$_();function r(i){return i!==null&&typeof i=="object"&&t.getTag(i)==="[object Arguments]"}e.isArguments=r})(Ig)),Ig}var lw;function OP(){return lw||(lw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nE(),r=_E(),i=LP(),o=N_();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)||i.isArguments(f))&&r.isIndex(u)&&u<f.length))return!1;f=f[u]}return!0}e.has=h})(Bg)),Bg}var cw;function TP(){return cw||(cw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=vE(),r=I_(),i=MP(),o=z_(),h=OP();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=i.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})(Rg)),Rg}var uw;function DP(){return uw||(uw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=cE(),r=bP(),i=EP(),o=TP();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]):i.matches(g);case"string":case"symbol":case"number":return r.property(g)}}e.iteratee=h})(mg)),mg}var hw;function RP(){return hw||(hw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=gP(),r=pP(),i=cE(),o=yP(),h=DP();function g(a,c=i.identity){return o.isArrayLikeObject(a)?t.uniqBy(Array.from(a),r.ary(h.iteratee(c),1)):[]}e.uniqBy=g})(ug)),ug}var Ng,fw;function kP(){return fw||(fw=1,Ng=RP().uniqBy),Ng}var PP=kP();const dw=Qn(PP);function BP(e,t,r){return t===!0?dw(e,r):typeof t=="function"?dw(e,t):e}var zg={exports:{}},Hg={},$g={exports:{}},Ug={};/**
|
|
135
|
-
* @license React
|
|
136
|
-
* use-sync-external-store-shim.production.js
|
|
137
|
-
*
|
|
138
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
139
|
-
*
|
|
140
|
-
* This source code is licensed under the MIT license found in the
|
|
141
|
-
* LICENSE file in the root directory of this source tree.
|
|
142
|
-
*/var vw;function jP(){if(vw)return Ug;vw=1;var e=so();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,i=e.useState,o=e.useEffect,h=e.useLayoutEffect,g=e.useDebugValue;function a(u,m){var w=m(),C=i({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 Ug.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v,Ug}var gw;function IP(){return gw||(gw=1,$g.exports=jP()),$g.exports}/**
|
|
143
|
-
* @license React
|
|
144
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
145
|
-
*
|
|
146
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
147
|
-
*
|
|
148
|
-
* This source code is licensed under the MIT license found in the
|
|
149
|
-
* LICENSE file in the root directory of this source tree.
|
|
150
|
-
*/var pw;function NP(){if(pw)return Hg;pw=1;var e=so(),t=IP();function r(f,v){return f===v&&(f!==0||1/f===1/v)||f!==f&&v!==v}var i=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,h=e.useRef,g=e.useEffect,a=e.useMemo,c=e.useDebugValue;return Hg.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,i(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},Hg}var _w;function zP(){return _w||(_w=1,zg.exports=NP()),zg.exports}var HP=zP(),U_=N.createContext(null),$P=e=>e,mt=()=>{var e=N.useContext(U_);return e?e.store.dispatch:$P},Nu=()=>{},UP=()=>Nu,FP=(e,t)=>e===t;function Re(e){var t=N.useContext(U_),r=N.useMemo(()=>t?i=>{if(i!=null)return e(i)}:Nu,[t,e]);return HP.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:UP,t?t.store.getState:Nu,t?t.store.getState:Nu,r,FP)}function WP(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function qP(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function GP(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(i=>typeof i=="function"?`function ${i.name||"unnamed"}()`:typeof i).join(", ");throw new TypeError(`${t}[${r}]`)}}var mw=e=>Array.isArray(e)?e:[e];function KP(e){const t=Array.isArray(e[0])?e[0]:e;return GP(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function YP(e,t){const r=[],{length:i}=e;for(let o=0;o<i;o++)r.push(e[o].apply(null,t));return r}var VP=class{constructor(e){this.value=e}deref(){return this.value}},XP=typeof WeakRef<"u"?WeakRef:VP,ZP=0,yw=1;function Su(){return{s:ZP,v:void 0,o:null,p:null}}function mE(e,t={}){let r=Su();const{resultEqualityCheck:i}=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===yw)v=a.v;else if(v=e.apply(null,arguments),h++,i){const m=((u=o==null?void 0:o.deref)==null?void 0:u.call(o))??o;m!=null&&i(m,v)&&(v=m,h!==0&&h--),o=typeof v=="object"&&v!==null||typeof v=="function"?new XP(v):v}return f.s=yw,f.v=v,v}return g.clearCache=()=>{r=Su(),g.resetResultsCount()},g.resultsCount=()=>h,g.resetResultsCount=()=>{h=0},g}function QP(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,i=(...o)=>{let h=0,g=0,a,c={},f=o.pop();typeof f=="object"&&(c=f,f=o.pop()),WP(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const v={...r,...c},{memoize:u,memoizeOptions:m=[],argsMemoize:w=mE,argsMemoizeOptions:C=[]}=v,_=mw(m),d=mw(C),y=KP(o),b=u(function(){return h++,f.apply(null,arguments)},..._),S=w(function(){g++;const L=YP(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(i,{withTypes:()=>i}),i}var le=QP(mE),JP=Object.assign((e,t=le)=>{qP(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),i=r.map(h=>e[h]);return t(i,(...h)=>h.reduce((g,a,c)=>(g[r[c]]=a,g),{}))},{withTypes:()=>JP}),Fg={},Wg={},qg={},bw;function e4(){return bw||(bw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(i){return typeof i=="symbol"?1:i===null?2:i===void 0?3:i!==i?4:0}const r=(i,o,h)=>{if(i!==o){const g=t(i),a=t(o);if(g===a&&g===0){if(i<o)return h==="desc"?1:-1;if(i>o)return h==="desc"?-1:1}return h==="desc"?a-g:g-a}return 0};e.compareValues=r})(qg)),qg}var Gg={},Kg={},Sw;function yE(){return Sw||(Sw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(Kg)),Kg}var ww;function t4(){return ww||(ww=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=yE(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\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"&&(i.test(h)||!r.test(h))||g!=null&&Object.hasOwn(g,h)}e.isKey=o})(Gg)),Gg}var Cw;function r4(){return Cw||(Cw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=e4(),r=t4(),i=N_();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:i.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})(Wg)),Wg}var Yg={},xw;function i4(){return xw||(xw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,i=1){const o=[],h=Math.floor(i),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})(Yg)),Yg}var Vg={},Ew;function bE(){return Ew||(Ew=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_E(),r=uE(),i=hE(),o=dE();function h(g,a,c){return i.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})(Vg)),Vg}var Aw;function n4(){return Aw||(Aw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=r4(),r=i4(),i=bE();function o(h,...g){const a=g.length;return a>1&&i.isIterateeCall(h,g[0],g[1])?g=[]:a>2&&i.isIterateeCall(g[0],g[1],g[2])&&(g=[g[0]]),t.orderBy(h,r.flatten(g),["asc"])}e.sortBy=o})(Fg)),Fg}var Xg,Mw;function s4(){return Mw||(Mw=1,Xg=n4().sortBy),Xg}var a4=s4();const Fh=Qn(a4);var SE=e=>e.legend.settings,o4=e=>e.legend.size,l4=e=>e.legend.payload;le([l4,SE],(e,t)=>{var{itemSorter:r}=t,i=e.flat(1);return r?Fh(i,r):i});var wu=1;function c4(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=N.useState({height:0,left:0,top:0,width:0}),i=N.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)>wu||Math.abs(g.left-t.left)>wu||Math.abs(g.top-t.top)>wu||Math.abs(g.width-t.width)>wu)&&r({height:g.height,left:g.left,top:g.top,width:g.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,i]}function rr(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 u4=typeof Symbol=="function"&&Symbol.observable||"@@observable",Lw=u4,Zg=()=>Math.random().toString(36).substring(7).split("").join("."),h4={INIT:`@@redux/INIT${Zg()}`,REPLACE:`@@redux/REPLACE${Zg()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Zg()}`},Zu=h4;function F_(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 wE(e,t,r){if(typeof e!="function")throw new Error(rr(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(rr(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(rr(1));return r(wE)(e,t)}let i=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(rr(3));return o}function u(d){if(typeof d!="function")throw new Error(rr(4));if(c)throw new Error(rr(5));let y=!0;f();const b=a++;return g.set(b,d),function(){if(y){if(c)throw new Error(rr(6));y=!1,f(),g.delete(b),h=null}}}function m(d){if(!F_(d))throw new Error(rr(7));if(typeof d.type>"u")throw new Error(rr(8));if(typeof d.type!="string")throw new Error(rr(17));if(c)throw new Error(rr(9));try{c=!0,o=i(o,d)}finally{c=!1}return(h=g).forEach(b=>{b()}),d}function w(d){if(typeof d!="function")throw new Error(rr(10));i=d,m({type:Zu.REPLACE})}function C(){const d=u;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(rr(11));function b(){const E=y;E.next&&E.next(v())}return b(),{unsubscribe:d(b)}},[Lw](){return this}}}return m({type:Zu.INIT}),{dispatch:m,subscribe:u,getState:v,replaceReducer:w,[Lw]:C}}function f4(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:Zu.INIT})>"u")throw new Error(rr(12));if(typeof r(void 0,{type:Zu.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(rr(13))})}function CE(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 i=Object.keys(r);let o;try{f4(r)}catch(h){o=h}return function(g={},a){if(o)throw o;let c=!1;const f={};for(let v=0;v<i.length;v++){const u=i[v],m=r[u],w=g[u],C=m(w,a);if(typeof C>"u")throw a&&a.type,new Error(rr(14));f[u]=C,c=c||C!==w}return c=c||i.length!==Object.keys(g).length,c?f:g}}function Qu(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...i)=>t(r(...i)))}function d4(...e){return t=>(r,i)=>{const o=t(r,i);let h=()=>{throw new Error(rr(15))};const g={getState:o.getState,dispatch:(c,...f)=>h(c,...f)},a=e.map(c=>c(g));return h=Qu(...a)(o.dispatch),{...o,dispatch:h}}}function xE(e){return F_(e)&&"type"in e&&typeof e.type=="string"}var EE=Symbol.for("immer-nothing"),Ow=Symbol.for("immer-draftable"),dr=Symbol.for("immer-state");function hi(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Br=Object,Va=Br.getPrototypeOf,Ju="constructor",Wh="prototype",$p="configurable",eh="enumerable",zu="writable",Ol="value",ln=e=>!!e&&!!e[dr];function gi(e){var t;return e?AE(e)||Gh(e)||!!e[Ow]||!!((t=e[Ju])!=null&&t[Ow])||Kh(e)||Yh(e):!1}var v4=Br[Wh][Ju].toString(),Tw=new WeakMap;function AE(e){if(!e||!W_(e))return!1;const t=Va(e);if(t===null||t===Br[Wh])return!0;const r=Br.hasOwnProperty.call(t,Ju)&&t[Ju];if(r===Object)return!0;if(!Ha(r))return!1;let i=Tw.get(r);return i===void 0&&(i=Function.toString.call(r),Tw.set(r,i)),i===v4}function qh(e,t,r=!0){Wl(e)===0?(r?Reflect.ownKeys(e):Br.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((i,o)=>t(o,i,e))}function Wl(e){const t=e[dr];return t?t.type_:Gh(e)?1:Kh(e)?2:Yh(e)?3:0}var Dw=(e,t,r=Wl(e))=>r===2?e.has(t):Br[Wh].hasOwnProperty.call(e,t),Up=(e,t,r=Wl(e))=>r===2?e.get(t):e[t],th=(e,t,r,i=Wl(e))=>{i===2?e.set(t,r):i===3?e.add(r):e[t]=r};function g4(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Gh=Array.isArray,Kh=e=>e instanceof Map,Yh=e=>e instanceof Set,W_=e=>typeof e=="object",Ha=e=>typeof e=="function",Qg=e=>typeof e=="boolean";function p4(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var tn=e=>e.copy_||e.base_,q_=e=>e.modified_?e.copy_:e.base_;function Fp(e,t){if(Kh(e))return new Map(e);if(Yh(e))return new Set(e);if(Gh(e))return Array[Wh].slice.call(e);const r=AE(e);if(t===!0||t==="class_only"&&!r){const i=Br.getOwnPropertyDescriptors(e);delete i[dr];let o=Reflect.ownKeys(i);for(let h=0;h<o.length;h++){const g=o[h],a=i[g];a[zu]===!1&&(a[zu]=!0,a[$p]=!0),(a.get||a.set)&&(i[g]={[$p]:!0,[zu]:!0,[eh]:a[eh],[Ol]:e[g]})}return Br.create(Va(e),i)}else{const i=Va(e);if(i!==null&&r)return{...e};const o=Br.create(i);return Br.assign(o,e)}}function G_(e,t=!1){return Vh(e)||ln(e)||!gi(e)||(Wl(e)>1&&Br.defineProperties(e,{set:Cu,add:Cu,clear:Cu,delete:Cu}),Br.freeze(e),t&&qh(e,(r,i)=>{G_(i,!0)},!1)),e}function _4(){hi(2)}var Cu={[Ol]:_4};function Vh(e){return e===null||!W_(e)?!0:Br.isFrozen(e)}var rh="MapSet",Wp="Patches",Rw="ArrayMethods",ME={};function Is(e){const t=ME[e];return t||hi(0,e),t}var kw=e=>!!ME[e],Tl,LE=()=>Tl,m4=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:kw(rh)?Is(rh):void 0,arrayMethodsPlugin_:kw(Rw)?Is(Rw):void 0});function Pw(e,t){t&&(e.patchPlugin_=Is(Wp),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function qp(e){Gp(e),e.drafts_.forEach(y4),e.drafts_=null}function Gp(e){e===Tl&&(Tl=e.parent_)}var Bw=e=>Tl=m4(Tl,e);function y4(e){const t=e[dr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function jw(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[dr].modified_&&(qp(t),hi(4)),gi(e)&&(e=Iw(t,e));const{patchPlugin_:o}=t;o&&o.generateReplacementPatches_(r[dr].base_,e,t)}else e=Iw(t,r);return b4(t,e,!0),qp(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==EE?e:void 0}function Iw(e,t){if(Vh(t))return t;const r=t[dr];if(!r)return ih(t,e.handledSet_,e);if(!Xh(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:i}=r;if(i)for(;i.length>0;)i.pop()(e);DE(r,e)}return r.copy_}function b4(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&G_(t,r)}function OE(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Xh=(e,t)=>e.scope_===t,S4=[];function TE(e,t,r,i){const o=tn(e),h=e.type_;if(i!==void 0&&Up(o,i,h)===t){th(o,i,r,h);return}if(!e.draftLocations_){const a=e.draftLocations_=new Map;qh(o,(c,f)=>{if(ln(f)){const v=a.get(f)||[];v.push(c),a.set(f,v)}})}const g=e.draftLocations_.get(t)??S4;for(const a of g)th(o,a,r,h)}function w4(e,t,r){e.callbacks_.push(function(o){var a;const h=t;if(!h||!Xh(h,o))return;(a=o.mapSetPlugin_)==null||a.fixSetContents(h);const g=q_(h);TE(e,h.draft_??h,g,r),DE(h,o)})}function DE(e,t){var i;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((i=e.assigned_)==null?void 0:i.size)??0)>0)){const{patchPlugin_:o}=t;if(o){const h=o.getPath(e);h&&o.generatePatches_(e,h,t)}OE(e)}}function C4(e,t,r){const{scope_:i}=e;if(ln(r)){const o=r[dr];Xh(o,i)&&o.callbacks_.push(function(){Hu(e);const g=q_(o);TE(e,r,g,t)})}else gi(r)&&e.callbacks_.push(function(){const h=tn(e);e.type_===3?h.has(r)&&ih(r,i.handledSet_,i):Up(h,t,e.type_)===r&&i.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&ih(Up(e.copy_,t,e.type_),i.handledSet_,i)})}function ih(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||ln(e)||t.has(e)||!gi(e)||Vh(e)||(t.add(e),qh(e,(i,o)=>{if(ln(o)){const h=o[dr];if(Xh(h,r)){const g=q_(h);th(e,i,g,e.type_),OE(h)}}else gi(o)&&ih(o,t,r)})),e}function x4(e,t){const r=Gh(e),i={type_:r?1:0,scope_:t?t.scope_:LE(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let o=i,h=nh;r&&(o=[i],h=Dl);const{revoke:g,proxy:a}=Proxy.revocable(o,h);return i.draft_=a,i.revoke_=g,[a,i]}var nh={get(e,t){if(t===dr)return e;let r=e.scope_.arrayMethodsPlugin_;const i=e.type_===1&&typeof t=="string";if(i&&r!=null&&r.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const o=tn(e);if(!Dw(o,t,e.type_))return E4(e,o,t);const h=o[t];if(e.finalized_||!gi(h)||i&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&p4(t))return h;if(h===Jg(e.base_,t)){Hu(e);const g=e.type_===1?+t:t,a=Yp(e.scope_,h,e,g);return e.copy_[g]=a}return h},has(e,t){return t in tn(e)},ownKeys(e){return Reflect.ownKeys(tn(e))},set(e,t,r){const i=RE(tn(e),t);if(i!=null&&i.set)return i.set.call(e.draft_,r),!0;if(!e.modified_){const o=Jg(tn(e),t),h=o==null?void 0:o[dr];if(h&&h.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(g4(r,o)&&(r!==void 0||Dw(e.base_,t,e.type_)))return!0;Hu(e),Kp(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),C4(e,t,r)),!0},deleteProperty(e,t){return Hu(e),Jg(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Kp(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=tn(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i&&{[zu]:!0,[$p]:e.type_!==1||t!=="length",[eh]:i[eh],[Ol]:r[t]}},defineProperty(){hi(11)},getPrototypeOf(e){return Va(e.base_)},setPrototypeOf(){hi(12)}},Dl={};for(let e in nh){let t=nh[e];Dl[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Dl.deleteProperty=function(e,t){return Dl.set.call(this,e,t,void 0)};Dl.set=function(e,t,r){return nh.set.call(this,e[0],t,r,e[0])};function Jg(e,t){const r=e[dr];return(r?tn(r):e)[t]}function E4(e,t,r){var o;const i=RE(t,r);return i?Ol in i?i[Ol]:(o=i.get)==null?void 0:o.call(e.draft_):void 0}function RE(e,t){if(!(t in e))return;let r=Va(e);for(;r;){const i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=Va(r)}}function Kp(e){e.modified_||(e.modified_=!0,e.parent_&&Kp(e.parent_))}function Hu(e){e.copy_||(e.assigned_=new Map,e.copy_=Fp(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var A4=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,i,o)=>{if(Ha(r)&&!Ha(i)){const g=i;i=r;const a=this;return function(f=g,...v){return a.produce(f,u=>i.call(this,u,...v))}}Ha(i)||hi(6),o!==void 0&&!Ha(o)&&hi(7);let h;if(gi(r)){const g=Bw(this),a=Yp(g,r,void 0);let c=!0;try{h=i(a),c=!1}finally{c?qp(g):Gp(g)}return Pw(g,o),jw(h,g)}else if(!r||!W_(r)){if(h=i(r),h===void 0&&(h=r),h===EE&&(h=void 0),this.autoFreeze_&&G_(h,!0),o){const g=[],a=[];Is(Wp).generateReplacementPatches_(r,h,{patches_:g,inversePatches_:a}),o(g,a)}return h}else hi(1,r)},this.produceWithPatches=(r,i)=>{if(Ha(r))return(a,...c)=>this.produceWithPatches(a,f=>r(f,...c));let o,h;return[this.produce(r,i,(a,c)=>{o=a,h=c}),o,h]},Qg(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Qg(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Qg(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){gi(t)||hi(8),ln(t)&&(t=ei(t));const r=Bw(this),i=Yp(r,t,void 0);return i[dr].isManual_=!0,Gp(r),i}finishDraft(t,r){const i=t&&t[dr];(!i||!i.isManual_)&&hi(9);const{scope_:o}=i;return Pw(o,r),jw(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 i;for(i=r.length-1;i>=0;i--){const h=r[i];if(h.path.length===0&&h.op==="replace"){t=h.value;break}}i>-1&&(r=r.slice(i+1));const o=Is(Wp).applyPatches_;return ln(t)?o(t,r):this.produce(t,h=>o(h,r))}};function Yp(e,t,r,i){const[o,h]=Kh(t)?Is(rh).proxyMap_(t,r):Yh(t)?Is(rh).proxySet_(t,r):x4(t,r);return((r==null?void 0:r.scope_)??LE()).drafts_.push(o),h.callbacks_=(r==null?void 0:r.callbacks_)??[],h.key_=i,r&&i!==void 0?w4(r,h,i):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 ei(e){return ln(e)||hi(10,e),kE(e)}function kE(e){if(!gi(e)||Vh(e))return e;const t=e[dr];let r,i=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Fp(e,t.scope_.immer_.useStrictShallowCopy_),i=t.scope_.immer_.shouldUseStrictIteration()}else r=Fp(e,!0);return qh(r,(o,h)=>{th(r,o,kE(h))},i),t&&(t.finalized_=!1),r}var M4=new A4,PE=M4.produce;function BE(e){return({dispatch:r,getState:i})=>o=>h=>typeof h=="function"?h(r,i,e):o(h)}var L4=BE(),O4=BE,T4=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Qu:Qu.apply(null,arguments)};function Ir(e,t){function r(...i){if(t){let o=t(...i);if(!o)throw new Error(jr(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:i[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=i=>xE(i)&&i.type===e,r}var jE=class Cl extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Cl.prototype)}static get[Symbol.species](){return Cl}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Cl(...t[0].concat(this)):new Cl(...t.concat(this))}};function Nw(e){return gi(e)?PE(e,()=>{}):e}function xu(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function D4(e){return typeof e=="boolean"}var R4=()=>function(t){const{thunk:r=!0,immutableCheck:i=!0,serializableCheck:o=!0,actionCreatorCheck:h=!0}=t??{};let g=new jE;return r&&(D4(r)?g.push(L4):g.push(O4(r.extraArgument))),g},IE="RTK_autoBatch",ft=()=>e=>({payload:e,meta:{[IE]:!0}}),zw=e=>t=>{setTimeout(t,e)},NE=(e={type:"raf"})=>t=>(...r)=>{const i=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:zw(10):e.type==="callback"?e.queueNotification:zw(e.timeout),f=()=>{g=!1,h&&(h=!1,a.forEach(v=>v()))};return Object.assign({},i,{subscribe(v){const u=()=>o&&v(),m=i.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[IE]),h=!o,h&&(g||(g=!0,c(f))),i.dispatch(v)}finally{o=!0}}})},k4=e=>function(r){const{autoBatch:i=!0}=r??{};let o=new jE(e);return i&&o.push(NE(typeof i=="object"?i:void 0)),o};function P4(e){const t=R4(),{reducer:r=void 0,middleware:i,devTools:o=!0,preloadedState:h=void 0,enhancers:g=void 0}=e||{};let a;if(typeof r=="function")a=r;else if(F_(r))a=CE(r);else throw new Error(jr(1));let c;typeof i=="function"?c=i(t):c=t();let f=Qu;o&&(f=T4({trace:!1,...typeof o=="object"&&o}));const v=d4(...c),u=k4(v);let m=typeof g=="function"?g(u):u();const w=f(...m);return wE(a,h,w)}function zE(e){const t={},r=[];let i;const o={addCase(h,g){const a=typeof h=="string"?h:h.type;if(!a)throw new Error(jr(28));if(a in t)throw new Error(jr(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 i=h,o}};return e(o),[t,r,i]}function B4(e){return typeof e=="function"}function j4(e,t){let[r,i,o]=zE(t),h;if(B4(e))h=()=>Nw(e());else{const a=Nw(e);h=()=>a}function g(a=h(),c){let f=[r[c.type],...i.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(ln(v)){const w=u(v,c);return w===void 0?v:w}else{if(gi(v))return PE(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 I4="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",N4=(e=21)=>{let t="",r=e;for(;r--;)t+=I4[Math.random()*64|0];return t},z4=Symbol.for("rtk-slice-createasyncthunk");function H4(e,t){return`${e}/${t}`}function $4({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[z4];return function(o){const{name:h,reducerPath:g=h}=o;if(!h)throw new Error(jr(11));const a=(typeof o.reducers=="function"?o.reducers(F4()):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(jr(12));if(x in f.sliceCaseReducersByType)throw new Error(jr(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:H4(h,E),createNotation:typeof o.reducers=="function"};q4(L)?K4(x,L,v,t):W4(x,L,v)});function u(){const[E={},L=[],x=void 0]=typeof o.extraReducers=="function"?zE(o.extraReducers):[o.extraReducers],O={...E,...f.sliceCaseReducersByType};return j4(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=xu(C,x,y)),D}function O(M=m){const D=xu(w,L,()=>new WeakMap);return xu(D,M,()=>{const k={};for(const[P,R]of Object.entries(o.selectors??{}))k[P]=U4(R,M,()=>xu(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 U4(e,t,r,i){function o(h,...g){let a=t(h);return typeof a>"u"&&i&&(a=r()),e(a,...g)}return o.unwrapped=e,o}var lr=$4();function F4(){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 W4({type:e,reducerName:t,createNotation:r},i,o){let h,g;if("reducer"in i){if(r&&!G4(i))throw new Error(jr(17));h=i.reducer,g=i.prepare}else h=i;o.addCase(e,h).exposeCaseReducer(t,h).exposeAction(t,g?Ir(e,g):Ir(e))}function q4(e){return e._reducerDefinitionType==="asyncThunk"}function G4(e){return e._reducerDefinitionType==="reducerWithPrepare"}function K4({type:e,reducerName:t},r,i,o){if(!o)throw new Error(jr(18));const{payloadCreator:h,fulfilled:g,pending:a,rejected:c,settled:f,options:v}=r,u=o(e,h,v);i.exposeAction(t,u),g&&i.addCase(u.fulfilled,g),a&&i.addCase(u.pending,a),c&&i.addCase(u.rejected,c),f&&i.addMatcher(u.settled,f),i.exposeCaseReducer(t,{fulfilled:g||Eu,pending:a||Eu,rejected:c||Eu,settled:f||Eu})}function Eu(){}var Y4="task",HE="listener",$E="completed",K_="cancelled",V4=`task-${K_}`,X4=`task-${$E}`,Vp=`${HE}-${K_}`,Z4=`${HE}-${$E}`,Zh=class{constructor(e){wt(this,"name","TaskAbortError");wt(this,"message");this.code=e,this.message=`${Y4} ${K_} (reason: ${e})`}},Y_=(e,t)=>{if(typeof e!="function")throw new TypeError(jr(32))},sh=()=>{},UE=(e,t=sh)=>(e.catch(t),e),FE=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Ds=e=>{if(e.aborted)throw new Zh(e.reason)};function WE(e,t){let r=sh;return new Promise((i,o)=>{const h=()=>o(new Zh(e.reason));if(e.aborted){h();return}r=FE(e,h),t.finally(()=>r()).then(i,o)}).finally(()=>{r=sh})}var Q4=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Zh?"cancelled":"rejected",error:r}}finally{t==null||t()}},ah=e=>t=>UE(WE(e,t).then(r=>(Ds(e),r))),qE=e=>{const t=ah(e);return r=>t(new Promise(i=>setTimeout(i,r)))},{assign:qa}=Object,Hw={},Qh="listenerMiddleware",J4=(e,t)=>{const r=i=>FE(e,()=>i.abort(e.reason));return(i,o)=>{Y_(i);const h=new AbortController;r(h);const g=Q4(async()=>{Ds(e),Ds(h.signal);const a=await i({pause:ah(h.signal),delay:qE(h.signal),signal:h.signal});return Ds(h.signal),a},()=>h.abort(X4));return o!=null&&o.autoJoin&&t.push(g.catch(sh)),{result:ah(e)(g),cancel(){h.abort(V4)}}}},e6=(e,t)=>{const r=async(i,o)=>{Ds(t);let h=()=>{};const a=[new Promise((c,f)=>{let v=e({predicate:i,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 Ds(t),c}finally{h()}};return(i,o)=>UE(r(i,o))},GE=e=>{let{type:t,actionCreator:r,matcher:i,predicate:o,effect:h}=e;if(t)o=Ir(t).match;else if(r)t=r.type,o=r.match;else if(i)o=i;else if(!o)throw new Error(jr(21));return Y_(h),{predicate:o,type:t,effect:h}},KE=qa(e=>{const{type:t,predicate:r,effect:i}=GE(e);return{id:N4(),effect:i,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(jr(22))}}},{withTypes:()=>KE}),$w=(e,t)=>{const{type:r,effect:i,predicate:o}=GE(t);return Array.from(e.values()).find(h=>(typeof r=="string"?h.type===r:h.predicate===o)&&h.effect===i)},Xp=e=>{e.pending.forEach(t=>{t.abort(Vp)})},t6=(e,t)=>()=>{for(const r of t.keys())Xp(r);e.clear()},Uw=(e,t,r)=>{try{e(t,r)}catch(i){setTimeout(()=>{throw i},0)}},YE=qa(Ir(`${Qh}/add`),{withTypes:()=>YE}),r6=Ir(`${Qh}/removeAll`),VE=qa(Ir(`${Qh}/remove`),{withTypes:()=>VE}),i6=(...e)=>{console.error(`${Qh}/error`,...e)},ql=(e={})=>{const t=new Map,r=new Map,i=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=i6}=e;Y_(g);const a=w=>(w.unsubscribe=()=>t.delete(w.id),t.set(w.id,w),C=>{w.unsubscribe(),C!=null&&C.cancelActive&&Xp(w)}),c=w=>{const C=$w(t,w)??KE(w);return a(C)};qa(c,{withTypes:()=>c});const f=w=>{const C=$w(t,w);return C&&(C.unsubscribe(),w.cancelActive&&Xp(C)),!!C};qa(f,{withTypes:()=>f});const v=async(w,C,_,d)=>{const y=new AbortController,b=e6(c,y.signal),S=[];try{w.pending.add(y),i(w),await Promise.resolve(w.effect(C,qa({},_,{getOriginalState:d,condition:(E,L)=>b(E,L).then(Boolean),take:b,delay:qE(y.signal),pause:ah(y.signal),extra:h,signal:y.signal,fork:J4(y.signal,S),unsubscribe:w.unsubscribe,subscribe:()=>{t.set(w.id,w)},cancelActiveListeners:()=>{w.pending.forEach((E,L,x)=>{E!==y&&(E.abort(Vp),x.delete(E))})},cancel:()=>{y.abort(Vp),w.pending.delete(y)},throwIfCancelled:()=>{Ds(y.signal)}})))}catch(E){E instanceof Zh||Uw(g,E,{raisedBy:"effect"})}finally{await Promise.all(S),y.abort(Z4),o(w),w.pending.delete(y)}},u=t6(t,r);return{middleware:w=>C=>_=>{if(!xE(_))return C(_);if(YE.match(_))return c(_.payload);if(r6.match(_)){u();return}if(VE.match(_))return f(_.payload);let d=w.getState();const y=()=>{if(d===Hw)throw new Error(jr(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,Uw(g,O,{raisedBy:"predicate"})}x&&v(L,_,w,y)}}}finally{d=Hw}return b},startListening:c,stopListening:f,clearListeners:u}};function jr(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 n6={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},XE=lr({name:"chartLayout",initialState:n6,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,i,o,h;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(i=t.payload.right)!==null&&i!==void 0?i: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:s6,setLayout:a6,setChartSize:o6,setScale:l6}=XE.actions,c6=XE.reducer;function ZE(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 Xn(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function Fw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function $a(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fw(Object(r),!0).forEach(function(i){u6(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fw(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function u6(e,t,r){return(t=h6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h6(e){var t=f6(e,"string");return typeof t=="symbol"?t:t+""}function f6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gt(e,t,r){return Nt(e)||Nt(t)?r:Pi(t)?Ya(e,t,r):typeof t=="function"?t(e):r}var d6=(e,t,r)=>{if(t&&r){var{width:i,height:o}=r,{align:h,verticalAlign:g,layout:a}=t;if((a==="vertical"||a==="horizontal"&&g==="middle")&&h!=="center"&&Te(e[h]))return $a($a({},e),{},{[h]:e[h]+(i||0)});if((a==="horizontal"||a==="vertical"&&h==="center")&&g!=="middle"&&Te(e[g]))return $a($a({},e),{},{[g]:e[g]+(o||0)})}return e},Jn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",v6=(e,t)=>{if(!t||t.length!==2||!Te(t[0])||!Te(t[1]))return e;var r=Math.min(t[0],t[1]),i=Math.max(t[0],t[1]),o=[e[0],e[1]];return(!Te(e[0])||e[0]<r)&&(o[0]=r),(!Te(e[1])||e[1]>i)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]<r&&(o[1]=r),o},g6=e=>{var t,r=e.length;if(!(r<=0)){var i=(t=e[0])===null||t===void 0?void 0:t.length;if(!(i==null||i<=0))for(var o=0;o<i;++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=ki(v)?u:v;m>=0?(f[0]=h,h+=m,f[1]=h):(f[0]=g,g+=m,f[1]=g)}}}},p6=e=>{var t,r=e.length;if(!(r<=0)){var i=(t=e[0])===null||t===void 0?void 0:t.length;if(!(i==null||i<=0))for(var o=0;o<i;++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=ki(c[1])?c[0]:c[1];f>=0?(c[0]=h,h+=f,c[1]=h):(c[0]=0,c[1]=0)}}}},_6={sign:g6,expand:Fk,none:Bs,silhouette:Wk,wiggle:qk,positive:p6},m6=(e,t,r)=>{var i,o=(i=_6[r])!==null&&i!==void 0?i:Bs,h=Uk().keys(t).value((a,c)=>Number(Gt(a,c,0))).order(zp).offset(o),g=h(e);return g.forEach((a,c)=>{a.forEach((f,v)=>{var u=Gt(e[v],t[c],0);Array.isArray(u)&&u.length===2&&Te(u[0])&&Te(u[1])&&(f[0]=u[0],f[1]=u[1])})}),g};function y6(e){return e==null?void 0:String(e)}var Ww=e=>{var{axis:t,ticks:r,offset:i,bandSize:o,entry:h,index:g}=e;if(t.type==="category")return r[g]?r[g].coordinate+i:null;var a=Gt(h,t.dataKey,t.scale.domain()[g]);if(Nt(a))return null;var c=t.scale.map(a);return Te(c)?c-o/2+i:null},b6=e=>{var{numericAxis:t}=e,r=t.scale.domain();if(t.type==="number"){var i=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return i<=0&&o>=0?0:o<0?o:i}return r[0]},S6=e=>{var t=e.flat(2).filter(Te);return[Math.min(...t),Math.max(...t)]},w6=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],C6=(e,t,r)=>{if(e!=null)return w6(Object.keys(e).reduce((i,o)=>{var h=e[o];if(!h)return i;var{stackedData:g}=h,a=g.reduce((c,f)=>{var v=ZE(f,t,r),u=S6(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],i[0]),Math.max(a[1],i[1])]},[1/0,-1/0]))},qw=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Gw=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,oh=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var i=e.scale.bandwidth();if(!r||i>0)return i}if(e&&t&&t.length>=2){for(var o=Fh(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 Kw(e){var{tooltipEntrySettings:t,dataKey:r,payload:i,value:o,name:h}=e;return $a($a({},t),{},{dataKey:r,payload:i,value:o,name:h})}function QE(e,t){if(e)return String(e);if(typeof t=="string")return t}var x6=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},E6=(e,t)=>t==="centric"?e.angle:e.radius,fn=e=>e.layout.width,dn=e=>e.layout.height,A6=e=>e.layout.scale,JE=e=>e.layout.margin,Jh=le(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),ef=le(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),M6="data-recharts-item-index",L6="data-recharts-item-id",Gl=60;function Yw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Au(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yw(Object(r),!0).forEach(function(i){O6(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yw(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function O6(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 i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var R6=e=>e.brush.height;function k6(e){var t=ef(e);return t.reduce((r,i)=>{if(i.orientation==="left"&&!i.mirror&&!i.hide){var o=typeof i.width=="number"?i.width:Gl;return r+o}return r},0)}function P6(e){var t=ef(e);return t.reduce((r,i)=>{if(i.orientation==="right"&&!i.mirror&&!i.hide){var o=typeof i.width=="number"?i.width:Gl;return r+o}return r},0)}function B6(e){var t=Jh(e);return t.reduce((r,i)=>i.orientation==="top"&&!i.mirror&&!i.hide?r+i.height:r,0)}function j6(e){var t=Jh(e);return t.reduce((r,i)=>i.orientation==="bottom"&&!i.mirror&&!i.hide?r+i.height:r,0)}var Kt=le([fn,dn,JE,R6,k6,P6,B6,j6,SE,o4],(e,t,r,i,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=Au(Au({},u),v),w=m.bottom;m.bottom+=i,m=d6(m,c,f);var C=e-m.left-m.right,_=t-m.top-m.bottom;return Au(Au({brushBottom:w},m),{},{width:Math.max(C,0),height:Math.max(_,0)})}),I6=le(Kt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),V_=le(fn,dn,(e,t)=>({x:0,y:0,width:e,height:t})),N6=N.createContext(null),zr=()=>N.useContext(N6)!=null,tf=e=>e.brush,rf=le([tf,Kt,JE],(e,t,r)=>({height:e.height,x:Te(e.x)?e.x:t.left,y:Te(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:Te(e.width)?e.width:t.width})),ep={},tp={},rp={},Vw;function z6(){return Vw||(Vw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,i,{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()},i)},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})(rp)),rp}var Xw;function H6(){return Xw||(Xw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=z6();function r(i,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=i.apply(this,_),u=null},o,{edges:f}),w=function(..._){return c!=null&&(u===null&&(u=Date.now()),Date.now()-u>=c)?(v=i.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})(tp)),tp}var Zw;function $6(){return Zw||(Zw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=H6();function r(i,o=0,h={}){const{leading:g=!0,trailing:a=!0}=h;return t.debounce(i,o,{leading:g,maxWait:o,trailing:a})}e.throttle=r})(ep)),ep}var ip,Qw;function U6(){return Qw||(Qw=1,ip=$6().throttle),ip}var F6=U6();const W6=Qn(F6);var Jw=function(t,r){for(var i=arguments.length,o=new Array(i>2?i-2:0),h=2;h<i;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++]))}},Li={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},eA=(e,t,r)=>{var{width:i=Li.width,height:o=Li.height,aspect:h,maxHeight:g}=r,a=js(i)?e:Number(i),c=js(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}},q6={width:0,height:0,overflow:"visible"},G6={width:0,overflowX:"visible"},K6={height:0,overflowY:"visible"},Y6={},V6=e=>{var{width:t,height:r}=e,i=js(t),o=js(r);return i&&o?q6:i?G6:o?K6:Y6};function X6(e){var{width:t,height:r,aspect:i}=e,o=t,h=r;return o===void 0&&h===void 0?(o=Li.width,h=Li.height):o===void 0?o=i&&i>0?void 0:Li.width:h===void 0&&(h=i&&i>0?void 0:Li.height),{width:o,height:h}}function Zp(){return Zp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},Zp.apply(null,arguments)}function eC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}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(i){Z6(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eC(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Z6(e,t,r){return(t=Q6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Q6(e){var t=J6(e,"string");return typeof t=="symbol"?t:t+""}function J6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tA=N.createContext(Li.initialDimension);function eB(e){return Xn(e.width)&&Xn(e.height)}function rA(e){var{children:t,width:r,height:i}=e,o=N.useMemo(()=>({width:r,height:i}),[r,i]);return eB(o)?N.createElement(tA.Provider,{value:o},t):null}var X_=()=>N.useContext(tA),tB=N.forwardRef((e,t)=>{var{aspect:r,initialDimension:i=Li.initialDimension,width:o,height:h,minWidth:g=Li.minWidth,minHeight:a,maxHeight:c,children:f,debounce:v=Li.debounce,id:u,className:m,onResize:w,style:C={}}=e,_=N.useRef(null),d=N.useRef();d.current=w,N.useImperativeHandle(t,()=>_.current);var[y,b]=N.useState({containerWidth:i.width,containerHeight:i.height}),S=N.useCallback((M,D)=>{b(k=>{var P=Math.round(M),R=Math.round(D);return k.containerWidth===P&&k.containerHeight===R?k:{containerWidth:P,containerHeight:R}})},[]);N.useEffect(()=>{if(_.current==null||typeof ResizeObserver>"u")return ao;var M=R=>{var B,U=R[0];if(U!=null){var{width:V,height:q}=U.contentRect;S(V,q),(B=d.current)===null||B===void 0||B.call(d,V,q)}};v>0&&(M=W6(M,v,{trailing:!0,leading:!1}));var D=new ResizeObserver(M),{width:k,height:P}=_.current.getBoundingClientRect();return S(k,P),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}=eA(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,
|
|
151
|
-
please check the style of container, or the props width(%s) and height(%s),
|
|
152
|
-
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
153
|
-
height and width.`,x,O,o,h,g,a,r),N.createElement("div",{id:u?"".concat(u):void 0,className:vt("recharts-responsive-container",m),style:tC(tC({},C),{},{width:o,height:h,minWidth:g,minHeight:a,maxHeight:c}),ref:_},N.createElement("div",{style:V6({width:o,height:h})},N.createElement(rA,{width:x,height:O},f)))}),rB=N.forwardRef((e,t)=>{var r=X_();if(Xn(r.width)&&Xn(r.height))return e.children;var{width:i,height:o}=X6({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:h,calculatedHeight:g}=eA(void 0,void 0,{width:i,height:o,aspect:e.aspect,maxHeight:e.maxHeight});return Te(h)&&Te(g)?N.createElement(rA,{width:h,height:g},e.children):N.createElement(tB,Zp({},e,{width:i,height:o,ref:t}))});function Z_(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 nf=()=>{var e,t=zr(),r=Re(I6),i=Re(rf),o=(e=Re(tf))===null||e===void 0?void 0:e.padding;return!t||!i||!o?r:{width:i.width-o.left-o.right,height:i.height-o.top-o.bottom,x:o.left,y:o.top}},iB={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},nB=()=>{var e;return(e=Re(Kt))!==null&&e!==void 0?e:iB},sB=()=>Re(fn),aB=()=>Re(dn),ot=e=>e.layout.layoutType,oo=()=>Re(ot),iA=()=>{var e=oo();if(e==="horizontal"||e==="vertical")return e},nA=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},oB=()=>{var e=oo();return e!==void 0},Kl=e=>{var t=mt(),r=zr(),{width:i,height:o}=e,h=X_(),g=i,a=o;return h&&(g=h.width>0?h.width:i,a=h.height>0?h.height:o),N.useEffect(()=>{!r&&Xn(g)&&Xn(a)&&t(o6({width:g,height:a}))},[t,r,g,a]),null},sA=Symbol.for("immer-nothing"),rC=Symbol.for("immer-draftable"),Nr=Symbol.for("immer-state");function fi(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Rl=Object.getPrototypeOf;function Xa(e){return!!e&&!!e[Nr]}function Ns(e){var t;return e?aA(e)||Array.isArray(e)||!!e[rC]||!!((t=e.constructor)!=null&&t[rC])||Yl(e)||af(e):!1}var lB=Object.prototype.constructor.toString(),iC=new WeakMap;function aA(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 i=iC.get(r);return i===void 0&&(i=Function.toString.call(r),iC.set(r,i)),i===lB}function lh(e,t,r=!0){sf(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((i,o)=>t(o,i,e))}function sf(e){const t=e[Nr];return t?t.type_:Array.isArray(e)?1:Yl(e)?2:af(e)?3:0}function Qp(e,t){return sf(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function oA(e,t,r){const i=sf(e);i===2?e.set(t,r):i===3?e.add(r):e[t]=r}function cB(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Yl(e){return e instanceof Map}function af(e){return e instanceof Set}function Es(e){return e.copy_||e.base_}function Jp(e,t){if(Yl(e))return new Map(e);if(af(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=aA(e);if(t===!0||t==="class_only"&&!r){const i=Object.getOwnPropertyDescriptors(e);delete i[Nr];let o=Reflect.ownKeys(i);for(let h=0;h<o.length;h++){const g=o[h],a=i[g];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(i[g]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[g]})}return Object.create(Rl(e),i)}else{const i=Rl(e);if(i!==null&&r)return{...e};const o=Object.create(i);return Object.assign(o,e)}}function Q_(e,t=!1){return of(e)||Xa(e)||!Ns(e)||(sf(e)>1&&Object.defineProperties(e,{set:Mu,add:Mu,clear:Mu,delete:Mu}),Object.freeze(e),t&&Object.values(e).forEach(r=>Q_(r,!0))),e}function uB(){fi(2)}var Mu={value:uB};function of(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var hB={};function zs(e){const t=hB[e];return t||fi(0,e),t}var kl;function lA(){return kl}function fB(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function nC(e,t){t&&(zs("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function e_(e){t_(e),e.drafts_.forEach(dB),e.drafts_=null}function t_(e){e===kl&&(kl=e.parent_)}function sC(e){return kl=fB(kl,e)}function dB(e){const t=e[Nr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function aC(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[Nr].modified_&&(e_(t),fi(4)),Ns(e)&&(e=ch(t,e),t.parent_||uh(t,e)),t.patches_&&zs("Patches").generateReplacementPatches_(r[Nr].base_,e,t.patches_,t.inversePatches_)):e=ch(t,r,[]),e_(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==sA?e:void 0}function ch(e,t,r){if(of(t))return t;const i=e.immer_.shouldUseStrictIteration(),o=t[Nr];if(!o)return lh(t,(h,g)=>oC(e,o,t,h,g,r),i),t;if(o.scope_!==e)return t;if(!o.modified_)return uh(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),lh(g,(c,f)=>oC(e,o,h,c,f,r,a),i),uh(e,h,!1),r&&e.patches_&&zs("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function oC(e,t,r,i,o,h,g){if(o==null||typeof o!="object"&&!g)return;const a=of(o);if(!(a&&!g)){if(Xa(o)){const c=h&&t&&t.type_!==3&&!Qp(t.assigned_,i)?h.concat(i):void 0,f=ch(e,o,c);if(oA(r,i,f),Xa(f))e.canAutoFreeze_=!1;else return}else g&&r.add(o);if(Ns(o)&&!a){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[i]===o&&a)return;ch(e,o),(!t||!t.scope_.parent_)&&typeof i!="symbol"&&(Yl(r)?r.has(i):Object.prototype.propertyIsEnumerable.call(r,i))&&uh(e,o)}}}function uh(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Q_(t,r)}function vB(e,t){const r=Array.isArray(e),i={type_:r?1:0,scope_:t?t.scope_:lA(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=i,h=J_;r&&(o=[i],h=Pl);const{revoke:g,proxy:a}=Proxy.revocable(o,h);return i.draft_=a,i.revoke_=g,a}var J_={get(e,t){if(t===Nr)return e;const r=Es(e);if(!Qp(r,t))return gB(e,r,t);const i=r[t];return e.finalized_||!Ns(i)?i:i===np(e.base_,t)?(sp(e),e.copy_[t]=i_(i,e)):i},has(e,t){return t in Es(e)},ownKeys(e){return Reflect.ownKeys(Es(e))},set(e,t,r){const i=cA(Es(e),t);if(i!=null&&i.set)return i.set.call(e.draft_,r),!0;if(!e.modified_){const o=np(Es(e),t),h=o==null?void 0:o[Nr];if(h&&h.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(cB(r,o)&&(r!==void 0||Qp(e.base_,t)))return!0;sp(e),r_(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 np(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,sp(e),r_(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Es(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:i.enumerable,value:r[t]}},defineProperty(){fi(11)},getPrototypeOf(e){return Rl(e.base_)},setPrototypeOf(){fi(12)}},Pl={};lh(J_,(e,t)=>{Pl[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Pl.deleteProperty=function(e,t){return Pl.set.call(this,e,t,void 0)};Pl.set=function(e,t,r){return J_.set.call(this,e[0],t,r,e[0])};function np(e,t){const r=e[Nr];return(r?Es(r):e)[t]}function gB(e,t,r){var o;const i=cA(t,r);return i?"value"in i?i.value:(o=i.get)==null?void 0:o.call(e.draft_):void 0}function cA(e,t){if(!(t in e))return;let r=Rl(e);for(;r;){const i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=Rl(r)}}function r_(e){e.modified_||(e.modified_=!0,e.parent_&&r_(e.parent_))}function sp(e){e.copy_||(e.copy_=Jp(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var pB=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,i)=>{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"&&fi(6),i!==void 0&&typeof i!="function"&&fi(7);let o;if(Ns(t)){const h=sC(this),g=i_(t,void 0);let a=!0;try{o=r(g),a=!1}finally{a?e_(h):t_(h)}return nC(h,i),aC(o,h)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===sA&&(o=void 0),this.autoFreeze_&&Q_(o,!0),i){const h=[],g=[];zs("Patches").generateReplacementPatches_(t,o,h,g),i(h,g)}return o}else fi(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(g,...a)=>this.produceWithPatches(g,c=>t(c,...a));let i,o;return[this.produce(t,r,(g,a)=>{i=g,o=a}),i,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){Ns(e)||fi(8),Xa(e)&&(e=_B(e));const t=sC(this),r=i_(e,void 0);return r[Nr].isManual_=!0,t_(t),r}finishDraft(e,t){const r=e&&e[Nr];(!r||!r.isManual_)&&fi(9);const{scope_:i}=r;return nC(i,t),aC(void 0,i)}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 i=zs("Patches").applyPatches_;return Xa(e)?i(e,t):this.produce(e,o=>i(o,t))}};function i_(e,t){const r=Yl(e)?zs("MapSet").proxyMap_(e,t):af(e)?zs("MapSet").proxySet_(e,t):vB(e,t);return(t?t.scope_:lA()).drafts_.push(r),r}function _B(e){return Xa(e)||fi(10,e),uA(e)}function uA(e){if(!Ns(e)||of(e))return e;const t=e[Nr];let r,i=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Jp(e,t.scope_.immer_.useStrictShallowCopy_),i=t.scope_.immer_.shouldUseStrictIteration()}else r=Jp(e,!0);return lh(r,(o,h)=>{oA(r,o,uA(h))},i),t&&(t.finalized_=!1),r}var mB=new pB;mB.produce;var yB={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},hA=lr({name:"legend",initialState:yB,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:ft()},replaceLegendPayload:{reducer(e,t){var{prev:r,next:i}=t.payload,o=ei(e).payload.indexOf(r);o>-1&&(e.payload[o]=i)},prepare:ft()},removeLegendPayload:{reducer(e,t){var r=ei(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:ft()}}}),{setLegendSize:mG,setLegendSettings:yG,addLegendPayload:bB,replaceLegendPayload:SB,removeLegendPayload:wB}=hA.actions,CB=hA.reducer,ap={exports:{}},op={};/**
|
|
154
|
-
* @license React
|
|
155
|
-
* use-sync-external-store-with-selector.production.js
|
|
156
|
-
*
|
|
157
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
158
|
-
*
|
|
159
|
-
* This source code is licensed under the MIT license found in the
|
|
160
|
-
* LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/var lC;function xB(){if(lC)return op;lC=1;var e=so();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,i=e.useSyncExternalStore,o=e.useRef,h=e.useEffect,g=e.useMemo,a=e.useDebugValue;return op.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 _=i(c,w[0],w[1]);return h(function(){C.hasValue=!0,C.value=_},[_]),a(_),_},op}var cC;function EB(){return cC||(cC=1,ap.exports=xB()),ap.exports}EB();function AB(e){e()}function MB(){let e=null,t=null;return{clear(){e=null,t=null},notify(){AB(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let i=e;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0;const o=t={callback:r,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!i||e===null||(i=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var uC={notify(){},get:()=>[]};function LB(e,t){let r,i=uC,o=0,h=!1;function g(_){v();const d=i.subscribe(_);let y=!1;return()=>{y||(y=!0,d(),u())}}function a(){i.notify()}function c(){C.onStateChange&&C.onStateChange()}function f(){return h}function v(){o++,r||(r=e.subscribe(c),i=MB())}function u(){o--,r&&o===0&&(r(),r=void 0,i.clear(),i=uC)}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:()=>i};return C}var OB=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",TB=OB(),DB=()=>typeof navigator<"u"&&navigator.product==="ReactNative",RB=DB(),kB=()=>TB||RB?N.useLayoutEffect:N.useEffect,PB=kB();function hC(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function BB(e,t){if(hC(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(let o=0;o<r.length;o++)if(!Object.prototype.hasOwnProperty.call(t,r[o])||!hC(e[r[o]],t[r[o]]))return!1;return!0}var lp=Symbol.for("react-redux-context"),cp=typeof globalThis<"u"?globalThis:{};function jB(){if(!N.createContext)return{};const e=cp[lp]??(cp[lp]=new Map);let t=e.get(N.createContext);return t||(t=N.createContext(null),e.set(N.createContext,t)),t}var IB=jB();function NB(e){const{children:t,context:r,serverState:i,store:o}=e,h=N.useMemo(()=>{const c=LB(o);return{store:o,subscription:c,getServerState:i?()=>i:void 0}},[o,i]),g=N.useMemo(()=>o.getState(),[o]);PB(()=>{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||IB;return N.createElement(a.Provider,{value:h},t)}var zB=NB,HB=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function $B(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function lf(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var i of r)if(HB.has(i)){if(e[i]==null&&t[i]==null)continue;if(!BB(e[i],t[i]))return!1}else if(!$B(e[i],t[i]))return!1;return!0}function n_(){return n_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},n_.apply(null,arguments)}function fC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function fl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fC(Object(r),!0).forEach(function(i){UB(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fC(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function UB(e,t,r){return(t=FB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FB(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 i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qB(e){return Array.isArray(e)&&Pi(e[0])&&Pi(e[1])?e.join(" ~ "):e}var ka={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};function GB(e,t){return t==null?e:Fh(e,t)}var KB=e=>{var{separator:t=ka.separator,contentStyle:r,itemStyle:i,labelStyle:o=ka.labelStyle,payload:h,formatter:g,itemSorter:a,wrapperClassName:c,labelClassName:f,label:v,labelFormatter:u,accessibilityLayer:m=ka.accessibilityLayer}=e,w=()=>{if(h&&h.length){var L={padding:0,margin:0},x=GB(h,a),O=x.map((M,D)=>{if(!M||M.type==="none")return null;var k=M.formatter||g||qB,{value:P,name:R}=M,B=P,U=R;if(k){var V=k(P,R,M,D,h);if(Array.isArray(V))[B,U]=V;else if(V!=null)B=V;else return null}var q=fl(fl({},ka.itemStyle),{},{color:M.color||ka.itemStyle.color},i);return N.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(D),style:q},Pi(U)?N.createElement("span",{className:"recharts-tooltip-item-name"},U):null,Pi(U)?N.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,N.createElement("span",{className:"recharts-tooltip-item-value"},B),N.createElement("span",{className:"recharts-tooltip-item-unit"},M.unit||""))});return N.createElement("ul",{className:"recharts-tooltip-item-list",style:L},O)}return null},C=fl(fl({},ka.contentStyle),r),_=fl({margin:0},o),d=!Nt(v),y=d?v:"",b=vt("recharts-default-tooltip",c),S=vt("recharts-tooltip-label",f);d&&u&&h!==void 0&&h!==null&&(y=u(v,h));var E=m?{role:"status","aria-live":"assertive"}:{};return N.createElement("div",n_({className:b,style:C},E),N.createElement("p",{className:S,style:_},N.isValidElement(y)?y:"".concat(y)),w())},dl="recharts-tooltip-wrapper",YB={visibility:"hidden"};function VB(e){var{coordinate:t,translateX:r,translateY:i}=e;return vt(dl,{["".concat(dl,"-right")]:Te(r)&&t&&Te(t.x)&&r>=t.x,["".concat(dl,"-left")]:Te(r)&&t&&Te(t.x)&&r<t.x,["".concat(dl,"-bottom")]:Te(i)&&t&&Te(t.y)&&i>=t.y,["".concat(dl,"-top")]:Te(i)&&t&&Te(t.y)&&i<t.y})}function dC(e){var{allowEscapeViewBox:t,coordinate:r,key:i,offset:o,position:h,reverseDirection:g,tooltipDimension:a,viewBox:c,viewBoxDimension:f}=e;if(h&&Te(h[i]))return h[i];var v=r[i]-a-(o>0?o:0),u=r[i]+o;if(t[i])return g[i]?v:u;var m=c[i];if(m==null)return 0;if(g[i]){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 XB(e){var{translateX:t,translateY:r,useTranslate3d:i}=e;return{transform:i?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function ZB(e){var{allowEscapeViewBox:t,coordinate:r,offsetTop:i,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=dC({allowEscapeViewBox:t,coordinate:r,key:"x",offset:o,position:h,reverseDirection:g,tooltipDimension:a.width,viewBox:f,viewBoxDimension:f.width}),m=dC({allowEscapeViewBox:t,coordinate:r,key:"y",offset:i,position:h,reverseDirection:g,tooltipDimension:a.height,viewBox:f,viewBoxDimension:f.height}),v=XB({translateX:u,translateY:m,useTranslate3d:c})):v=YB,{cssProperties:v,cssClasses:VB({translateX:u,translateY:m,coordinate:r})}}var QB=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Vl={isSsr:QB()};function fA(){var[e,t]=N.useState(()=>Vl.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return N.useEffect(()=>{if(window.matchMedia){var r=window.matchMedia("(prefers-reduced-motion: reduce)"),i=()=>{t(r.matches)};return r.addEventListener("change",i),()=>{r.removeEventListener("change",i)}}},[]),e}function vC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Pa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vC(Object(r),!0).forEach(function(i){JB(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vC(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function JB(e,t,r){return(t=e8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function e8(e){var t=t8(e,"string");return typeof t=="symbol"?t:t+""}function t8(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function r8(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function i8(e){var t,r,i,o,h,g,a=fA(),[c,f]=N.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));N.useEffect(()=>{var C=_=>{if(_.key==="Escape"){var d,y,b,S;f({dismissed:!0,dismissedAtCoordinate:{x:(d=(y=e.coordinate)===null||y===void 0?void 0:y.x)!==null&&d!==void 0?d:0,y:(b=(S=e.coordinate)===null||S===void 0?void 0:S.y)!==null&&b!==void 0?b:0}})}};return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),c.dismissed&&(((i=(o=e.coordinate)===null||o===void 0?void 0:o.x)!==null&&i!==void 0?i:0)!==c.dismissedAtCoordinate.x||((h=(g=e.coordinate)===null||g===void 0?void 0:g.y)!==null&&h!==void 0?h:0)!==c.dismissedAtCoordinate.y)&&f(Pa(Pa({},c),{},{dismissed:!1}));var{cssClasses:v,cssProperties:u}=ZB({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),m=e.hasPortalFromProps?{}:Pa(Pa({transition:r8({prefersReducedMotion:a,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},u),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),w=Pa(Pa({},m),{},{visibility:!c.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return N.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:v,style:w,ref:e.innerRef},e.children)}var n8=N.memo(i8),dA=()=>{var e;return(e=Re(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function s_(){return s_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},s_.apply(null,arguments)}function gC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function pC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gC(Object(r),!0).forEach(function(i){s8(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gC(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function s8(e,t,r){return(t=a8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a8(e){var t=o8(e,"string");return typeof t=="symbol"?t:t+""}function o8(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _C={curveBasisClosed:Dk,curveBasisOpen:Rk,curveBasis:Tk,curveBumpX:pk,curveBumpY:_k,curveLinearClosed:kk,curveLinear:$h,curveMonotoneX:Pk,curveMonotoneY:Bk,curveNatural:jk,curveStep:Ik,curveStepAfter:zk,curveStepBefore:Nk},hh=e=>Ze(e.x)&&Ze(e.y),mC=e=>e.base!=null&&hh(e.base)&&hh(e),vl=e=>e.x,gl=e=>e.y,l8=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(Fl(e));if((r==="curveMonotone"||r==="curveBump")&&t){var i=_C["".concat(r).concat(t==="vertical"?"Y":"X")];if(i)return i}return _C[r]||$h},yC={connectNulls:!1,type:"linear"},c8=e=>{var{type:t=yC.type,points:r=[],baseLine:i,layout:o,connectNulls:h=yC.connectNulls}=e,g=l8(t,o),a=h?r.filter(hh):r;if(Array.isArray(i)){var c,f=r.map((C,_)=>pC(pC({},C),{},{base:i[_]}));o==="vertical"?c=bu().y(gl).x1(vl).x0(C=>C.base.x):c=bu().x(vl).y1(gl).y0(C=>C.base.y);var v=c.defined(mC).curve(g),u=h?f.filter(mC):f;return v(u)}var m;o==="vertical"&&Te(i)?m=bu().y(gl).x1(vl).x0(i):Te(i)?m=bu().x(vl).y1(gl).y0(i):m=K2().x(vl).y(gl);var w=m.defined(hh).curve(g);return w(a)},vA=e=>{var{className:t,points:r,path:i,pathRef:o}=e,h=oo();if((!r||!r.length)&&!i)return null;var g={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||h,connectNulls:e.connectNulls},a=r&&r.length?c8(g):i;return N.createElement("path",s_({},Vn(e),cP(e),{className:vt("recharts-curve",t),d:a===null?void 0:a,ref:o}))},u8=["x","y","top","left","width","height","className"];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 i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},a_.apply(null,arguments)}function bC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function h8(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bC(Object(r),!0).forEach(function(i){f8(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bC(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function f8(e,t,r){return(t=d8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d8(e){var t=v8(e,"string");return typeof t=="symbol"?t:t+""}function v8(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function g8(e,t){if(e==null)return{};var r,i,o=p8(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(i=0;i<h.length;i++)r=h[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function p8(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}var _8=(e,t,r,i,o,h)=>"M".concat(e,",").concat(o,"v").concat(i,"M").concat(h,",").concat(t,"h").concat(r),m8=e=>{var{x:t=0,y:r=0,top:i=0,left:o=0,width:h=0,height:g=0,className:a}=e,c=g8(e,u8),f=h8({x:t,y:r,top:i,left:o,width:h,height:g},c);return!Te(t)||!Te(r)||!Te(h)||!Te(g)||!Te(i)||!Te(o)?null:N.createElement("path",a_({},ri(f),{className:vt("recharts-cross",a),d:_8(t,r,h,g,i,o)}))};function y8(e,t,r,i){var o=i/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"?i:r.width-1,height:e==="horizontal"?r.height-1:i}}function SC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}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(i){b8(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SC(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function b8(e,t,r){return(t=S8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S8(e){var t=w8(e,"string");return typeof t=="symbol"?t:t+""}function w8(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var C8=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),gA=(e,t,r)=>e.map(i=>"".concat(C8(i)," ").concat(t,"ms ").concat(r)).join(","),x8=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((r,i)=>r.filter(o=>i.includes(o))),Bl=(e,t)=>Object.keys(t).reduce((r,i)=>wC(wC({},r),{},{[i]:e(i,t[i])}),{});function CC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function It(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CC(Object(r),!0).forEach(function(i){E8(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CC(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function E8(e,t,r){return(t=A8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function A8(e){var t=M8(e,"string");return typeof t=="symbol"?t:t+""}function M8(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fh=(e,t,r)=>e+(t-e)*r,o_=e=>{var{from:t,to:r}=e;return t!==r},pA=(e,t,r)=>{var i=Bl((o,h)=>{if(o_(h)){var[g,a]=e(h.from,h.to,h.velocity);return It(It({},h),{},{from:g,velocity:a})}return h},t);return r<1?Bl((o,h)=>o_(h)&&i[o]!=null?It(It({},h),{},{velocity:fh(h.velocity,i[o].velocity,r),from:fh(h.from,i[o].from,r)}):h,t):pA(e,i,r-1)};function L8(e,t,r,i,o,h){var g,a=i.reduce((m,w)=>It(It({},m),{},{[w]:{from:e[w],velocity:0,to:t[w]}}),{}),c=()=>Bl((m,w)=>w.from,a),f=()=>!Object.values(a).filter(o_).length,v=null,u=m=>{g||(g=m);var w=m-g,C=w/r.dt;a=pA(r,a,C),o(It(It(It({},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 O8(e,t,r,i,o,h,g){var a=null,c=o.reduce((u,m)=>{var w=e[m],C=t[m];return w==null||C==null?u:It(It({},u),{},{[m]:[w,C]})},{}),f,v=u=>{f||(f=u);var m=(u-f)/i,w=Bl((_,d)=>fh(...d,r(m)),c);if(h(It(It(It({},e),t),w)),m<1)a=g.setTimeout(v);else{var C=Bl((_,d)=>fh(...d,r(1)),c);h(It(It(It({},e),t),C))}};return()=>(a=g.setTimeout(v),()=>{var u;(u=a)===null||u===void 0||u()})}const T8=(e,t,r,i,o,h)=>{var g=x8(e,t);return r==null?()=>(o(It(It({},e),t)),()=>{}):r.isStepper===!0?L8(e,t,r,g,o,h):O8(e,t,r,i,g,o,h)};var dh=1e-4,_A=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],mA=(e,t)=>e.map((r,i)=>r*t**i).reduce((r,i)=>r+i),xC=(e,t)=>r=>{var i=_A(e,t);return mA(i,r)},D8=(e,t)=>r=>{var i=_A(e,t),o=[...i.map((h,g)=>h*g).slice(1),0];return mA(o,r)},R8=e=>{var t,r=e.split("(");if(r.length!==2||r[0]!=="cubic-bezier")return null;var i=(t=r[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(i==null||i.length!==4)return null;var o=i.map(h=>parseFloat(h));return[o[0],o[1],o[2],o[3]]},k8=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];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=R8(r[0]);if(o)return o}}return r.length===4?r:[0,0,1,1]},P8=(e,t,r,i)=>{var o=xC(e,r),h=xC(t,i),g=D8(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)<dh||C<dh)return h(u);u=a(u-w/C)}return h(u)};return c.isStepper=!1,c},EC=function(){return P8(...k8(...arguments))},B8=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:r=100,damping:i=8,dt:o=17}=t,h=(g,a,c)=>{var f=-(g-a)*r,v=c*i,u=c+(f-v)*o/1e3,m=c*o/1e3+g;return Math.abs(m-a)<dh&&Math.abs(u)<dh?[a,0]:[m,u]};return h.isStepper=!0,h.dt=o,h},j8=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return EC(e);case"spring":return B8();default:if(e.split("(")[0]==="cubic-bezier")return EC(e)}return typeof e=="function"?e:null};function I8(e){var t,r=()=>null,i=!1,o=null,h=g=>{if(!i){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:()=>{i=!0},start:g=>{i=!1,o&&(o(),o=null),h(g)},subscribe:g=>(r=g,()=>{r=()=>null}),getTimeoutController:()=>e}}class N8{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=performance.now(),o=null,h=g=>{g-i>=r?t(g):typeof requestAnimationFrame=="function"&&(o=requestAnimationFrame(h))};return o=requestAnimationFrame(h),()=>{o!=null&&cancelAnimationFrame(o)}}}function z8(){return I8(new N8)}var H8=N.createContext(z8);function $8(e,t){var r=N.useContext(H8);return N.useMemo(()=>t??r(e),[e,t,r])}var U8={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},AC={t:0},up={t:1};function em(e){var t=ni(e,U8),{isActive:r,canBegin:i,duration:o,easing:h,begin:g,onAnimationEnd:a,onAnimationStart:c,children:f}=t,v=fA(),u=r==="auto"?!Vl.isSsr&&!v:r,m=$8(t.animationId,t.animationManager),[w,C]=N.useState(u?AC:up),_=N.useRef(null);return N.useEffect(()=>{u||C(up)},[u]),N.useEffect(()=>{if(!u||!i)return ao;var d=T8(AC,up,j8(h),o,C,m.getTimeoutController()),y=()=>{_.current=d()};return m.start([c,g,y,o,a]),()=>{m.stop(),_.current&&_.current(),a()}},[u,i,o,h,g,c,a,m]),f(w.t)}function tm(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=N.useRef(Ll(t)),i=N.useRef(e);return i.current!==e&&(r.current=Ll(t),i.current=e),r.current}var F8=["radius"],W8=["radius"],MC,LC,OC,TC,DC,RC,kC,PC,BC,jC;function IC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function NC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?IC(Object(r),!0).forEach(function(i){q8(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):IC(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function q8(e,t,r){return(t=G8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function G8(e){var t=K8(e,"string");return typeof t=="symbol"?t:t+""}function K8(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vh(){return vh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},vh.apply(null,arguments)}function zC(e,t){if(e==null)return{};var r,i,o=Y8(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(i=0;i<h.length;i++)r=h[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Y8(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}function xi(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var HC=(e,t,r,i,o)=>{var h=Gn(r),g=Gn(i),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=xt(MC||(MC=xi(["M",",",""])),e,t+c*m[0]),m[0]>0&&(u+=xt(LC||(LC=xi(["A ",",",",0,0,",",",",",""])),m[0],m[0],v,e+f*m[0],t)),u+=xt(OC||(OC=xi(["L ",",",""])),e+r-f*m[1],t),m[1]>0&&(u+=xt(TC||(TC=xi(["A ",",",",0,0,",`,
|
|
162
|
-
`,",",""])),m[1],m[1],v,e+r,t+c*m[1])),u+=xt(DC||(DC=xi(["L ",",",""])),e+r,t+i-c*m[2]),m[2]>0&&(u+=xt(RC||(RC=xi(["A ",",",",0,0,",`,
|
|
163
|
-
`,",",""])),m[2],m[2],v,e+r-f*m[2],t+i)),u+=xt(kC||(kC=xi(["L ",",",""])),e+f*m[3],t+i),m[3]>0&&(u+=xt(PC||(PC=xi(["A ",",",",0,0,",`,
|
|
164
|
-
`,",",""])),m[3],m[3],v,e,t+i-c*m[3])),u+="Z"}else if(a>0&&o===+o&&o>0){var y=Math.min(a,o);u=xt(BC||(BC=xi(["M ",",",`
|
|
165
|
-
A `,",",",0,0,",",",",",`
|
|
166
|
-
L `,",",`
|
|
167
|
-
A `,",",",0,0,",",",",",`
|
|
168
|
-
L `,",",`
|
|
169
|
-
A `,",",",0,0,",",",",",`
|
|
170
|
-
L `,",",`
|
|
171
|
-
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+i-c*y,y,y,v,e+r-f*y,t+i,e+f*y,t+i,y,y,v,e,t+i-c*y)}else u=xt(jC||(jC=xi(["M ",","," h "," v "," h "," Z"])),e,t,r,i,-r);return u},$C={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},yA=e=>{var t=ni(e,$C),r=N.useRef(null),[i,o]=N.useState(-1);N.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var Y=r.current.getTotalLength();Y&&o(Y)}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=N.useRef(a),y=N.useRef(c),b=N.useRef(h),S=N.useRef(g),E=N.useMemo(()=>({x:h,y:g,width:a,height:c,radius:f}),[h,g,a,c,f]),L=tm(E,"rectangle-");if(h!==+h||g!==+g||a!==+a||c!==+c||a===0||c===0)return null;var x=vt("recharts-rectangle",v);if(!_){var O=ri(t),{radius:M}=O,D=zC(O,F8);return N.createElement("path",vh({},D,{x:Gn(h),y:Gn(g),width:Gn(a),height:Gn(c),radius:typeof f=="number"?f:void 0,className:x,d:HC(h,g,a,c,f)}))}var k=d.current,P=y.current,R=b.current,B=S.current,U="0px ".concat(i===-1?1:i,"px"),V="".concat(i,"px ").concat(i,"px"),q=gA(["strokeDasharray"],m,typeof u=="string"?u:$C.animationEasing);return N.createElement(em,{animationId:L,key:L,canBegin:i>0,duration:m,easing:u,isActive:_,begin:w},Y=>{var W=nr(k,a,Y),j=nr(P,c,Y),H=nr(R,h,Y),z=nr(B,g,Y);r.current&&(d.current=W,y.current=j,b.current=H,S.current=z);var F;C?Y>0?F={transition:q,strokeDasharray:V}:F={strokeDasharray:U}:F={strokeDasharray:V};var Z=ri(t),{radius:re}=Z,he=zC(Z,W8);return N.createElement("path",vh({},he,{radius:typeof f=="number"?f:void 0,className:x,d:HC(H,z,W,j,f),ref:r,style:NC(NC({},F),t.style)}))})};function UC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function FC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?UC(Object(r),!0).forEach(function(i){V8(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):UC(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function V8(e,t,r){return(t=X8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function X8(e){var t=Z8(e,"string");return typeof t=="symbol"?t:t+""}function Z8(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gh=Math.PI/180,Q8=e=>e*180/Math.PI,sr=(e,t,r,i)=>({x:e+Math.cos(-gh*i)*r,y:t+Math.sin(-gh*i)*r}),J8=function(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(i.left||0)-(i.right||0)),Math.abs(r-(i.top||0)-(i.bottom||0)))/2},ej=(e,t)=>{var{x:r,y:i}=e,{x:o,y:h}=t;return Math.sqrt((r-o)**2+(i-h)**2)},tj=(e,t)=>{var{x:r,y:i}=e,{cx:o,cy:h}=t,g=ej({x:r,y:i},{x:o,y:h});if(g<=0)return{radius:g,angle:0};var a=(r-o)/g,c=Math.acos(a);return i>h&&(c=2*Math.PI-c),{radius:g,angle:Q8(c),angleInRadian:c}},rj=e=>{var{startAngle:t,endAngle:r}=e,i=Math.floor(t/360),o=Math.floor(r/360),h=Math.min(i,o);return{startAngle:t-h*360,endAngle:r-h*360}},ij=(e,t)=>{var{startAngle:r,endAngle:i}=t,o=Math.floor(r/360),h=Math.floor(i/360),g=Math.min(o,h);return e+g*360},nj=(e,t)=>{var{relativeX:r,relativeY:i}=e,{radius:o,angle:h}=tj({x:r,y:i},t),{innerRadius:g,outerRadius:a}=t;if(o<g||o>a||o===0)return null;var{startAngle:c,endAngle:f}=rj(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?FC(FC({},t),{},{radius:o,angle:ij(v,t)}):null};function bA(e){var{cx:t,cy:r,radius:i,startAngle:o,endAngle:h}=e,g=sr(t,r,i,o),a=sr(t,r,i,h);return{points:[g,a],cx:t,cy:r,radius:i,startAngle:o,endAngle:h}}var WC,qC,GC,KC,YC,VC,XC;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 i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},l_.apply(null,arguments)}function Ms(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var sj=(e,t)=>{var r=Pr(t-e),i=Math.min(Math.abs(t-e),359.999);return r*i},Lu=e=>{var{cx:t,cy:r,radius:i,angle:o,sign:h,isExternal:g,cornerRadius:a,cornerIsExternal:c}=e,f=a*(g?1:-1)+i,v=Math.asin(a/f)/gh,u=c?o:o+h*v,m=sr(t,r,f,u),w=sr(t,r,i,u),C=c?o-h*v:o,_=sr(t,r,f*Math.cos(v*gh),C);return{center:m,circleTangency:w,lineTangency:_,theta:v}},SA=e=>{var{cx:t,cy:r,innerRadius:i,outerRadius:o,startAngle:h,endAngle:g}=e,a=sj(h,g),c=h+a,f=sr(t,r,o,h),v=sr(t,r,o,c),u=xt(WC||(WC=Ms(["M ",",",`
|
|
172
|
-
A `,",",`,0,
|
|
173
|
-
`,",",`,
|
|
174
|
-
`,",",`
|
|
175
|
-
`])),f.x,f.y,o,o,+(Math.abs(a)>180),+(h>c),v.x,v.y);if(i>0){var m=sr(t,r,i,h),w=sr(t,r,i,c);u+=xt(qC||(qC=Ms(["L ",",",`
|
|
176
|
-
A `,",",`,0,
|
|
177
|
-
`,",",`,
|
|
178
|
-
`,","," Z"])),w.x,w.y,i,i,+(Math.abs(a)>180),+(h<=c),m.x,m.y)}else u+=xt(GC||(GC=Ms(["L ",","," Z"])),t,r);return u},aj=e=>{var{cx:t,cy:r,innerRadius:i,outerRadius:o,cornerRadius:h,forceCornerRadius:g,cornerIsExternal:a,startAngle:c,endAngle:f}=e,v=Pr(f-c),{circleTangency:u,lineTangency:m,theta:w}=Lu({cx:t,cy:r,radius:o,angle:c,sign:v,cornerRadius:h,cornerIsExternal:a}),{circleTangency:C,lineTangency:_,theta:d}=Lu({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?xt(KC||(KC=Ms(["M ",",",`
|
|
179
|
-
a`,",",",0,0,1,",`,0
|
|
180
|
-
a`,",",",0,0,1,",`,0
|
|
181
|
-
`])),m.x,m.y,h,h,h*2,h,h,-h*2):SA({cx:t,cy:r,innerRadius:i,outerRadius:o,startAngle:c,endAngle:f});var b=xt(YC||(YC=Ms(["M ",",",`
|
|
182
|
-
A`,",",",0,0,",",",",",`
|
|
183
|
-
A`,",",",0,",",",",",",",`
|
|
184
|
-
A`,",",",0,0,",",",",",`
|
|
185
|
-
`])),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(i>0){var{circleTangency:S,lineTangency:E,theta:L}=Lu({cx:t,cy:r,radius:i,angle:c,sign:v,isExternal:!0,cornerRadius:h,cornerIsExternal:a}),{circleTangency:x,lineTangency:O,theta:M}=Lu({cx:t,cy:r,radius:i,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+=xt(VC||(VC=Ms(["L",",",`
|
|
186
|
-
A`,",",",0,0,",",",",",`
|
|
187
|
-
A`,",",",0,",",",",",",",`
|
|
188
|
-
A`,",",",0,0,",",",",","Z"])),O.x,O.y,h,h,+(v<0),x.x,x.y,i,i,+(D>180),+(v>0),S.x,S.y,h,h,+(v<0),E.x,E.y)}else b+=xt(XC||(XC=Ms(["L",",","Z"])),t,r);return b},oj={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},wA=e=>{var t=ni(e,oj),{cx:r,cy:i,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=vt("recharts-sector",u),w=h-o,C=vi(g,w,0,!0),_;return C>0&&Math.abs(f-v)<360?_=aj({cx:r,cy:i,innerRadius:o,outerRadius:h,cornerRadius:Math.min(C,w/2),forceCornerRadius:a,cornerIsExternal:c,startAngle:f,endAngle:v}):_=SA({cx:r,cy:i,innerRadius:o,outerRadius:h,startAngle:f,endAngle:v}),N.createElement("path",l_({},ri(t),{className:m,d:_}))};function lj(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(lE(t)){if(e==="centric"){var{cx:i,cy:o,innerRadius:h,outerRadius:g,angle:a}=t,c=sr(i,o,h,a),f=sr(i,o,g,a);return[{x:c.x,y:c.y},{x:f.x,y:f.y}]}return bA(t)}}var hp={},fp={},dp={},ZC;function cj(){return ZC||(ZC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=yE();function r(i){return t.isSymbol(i)?NaN:Number(i)}e.toNumber=r})(dp)),dp}var QC;function uj(){return QC||(QC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=cj();function r(i){return i?(i=t.toNumber(i),i===1/0||i===-1/0?(i<0?-1:1)*Number.MAX_VALUE:i===i?i:0):i===0?i:0}e.toFinite=r})(fp)),fp}var JC;function hj(){return JC||(JC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=bE(),r=uj();function i(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=i})(hp)),hp}var vp,ex;function fj(){return ex||(ex=1,vp=hj().range),vp}var dj=fj();const CA=Qn(dj);var _i=e=>e.chartData,rm=le([_i],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),cf=(e,t,r,i)=>i?rm(e):_i(e),vj=(e,t,r)=>r?rm(e):_i(e),gj=le([cf],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:i}=e;return t!=null?t.slice(r,i+1):[]});le([rm],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:i}=e;return t!=null?t.slice(r,i+1):[]});var pj=le([_i],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:i}=e;return t!=null?t.slice(r,i+1):[]});function Ti(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(Ze(t)&&Ze(r))return!0}return!1}function tx(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function xA(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,i]=e,o,h;if(Ze(r))o=r;else if(typeof r=="function")return;if(Ze(i))h=i;else if(typeof i=="function")return;var g=[o,h];if(Ti(g))return g}}function _j(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var i=e(t,r);if(Ti(i))return tx(i,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(Te(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"&&qw.test(o)){var c=qw.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(Te(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"&&Gw.test(h)){var v=Gw.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(Ti(m))return t==null?m:tx(m,t,r)}}}var lo=1e9,mj={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},nm,pt=!0,ii="[DecimalError] ",Rs=ii+"Invalid argument: ",im=ii+"Exponent out of range: ",co=Math.floor,As=Math.pow,yj=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,kr,qt=1e7,dt=7,EA=9007199254740991,ph=co(EA/dt),Ee={};Ee.absoluteValue=Ee.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Ee.comparedTo=Ee.cmp=function(e){var t,r,i,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(i=h.d.length,o=e.d.length,t=0,r=i<o?i:o;t<r;++t)if(h.d[t]!==e.d[t])return h.d[t]>e.d[t]^h.s<0?1:-1;return i===o?0:i>o^h.s<0?1:-1};Ee.decimalPlaces=Ee.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*dt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};Ee.dividedBy=Ee.div=function(e){return on(this,new this.constructor(e))};Ee.dividedToIntegerBy=Ee.idiv=function(e){var t=this,r=t.constructor;return at(on(t,new r(e),0,1),r.precision)};Ee.equals=Ee.eq=function(e){return!this.cmp(e)};Ee.exponent=function(){return Dt(this)};Ee.greaterThan=Ee.gt=function(e){return this.cmp(e)>0};Ee.greaterThanOrEqualTo=Ee.gte=function(e){return this.cmp(e)>=0};Ee.isInteger=Ee.isint=function(){return this.e>this.d.length-2};Ee.isNegative=Ee.isneg=function(){return this.s<0};Ee.isPositive=Ee.ispos=function(){return this.s>0};Ee.isZero=function(){return this.s===0};Ee.lessThan=Ee.lt=function(e){return this.cmp(e)<0};Ee.lessThanOrEqualTo=Ee.lte=function(e){return this.cmp(e)<1};Ee.logarithm=Ee.log=function(e){var t,r=this,i=r.constructor,o=i.precision,h=o+5;if(e===void 0)e=new i(10);else if(e=new i(e),e.s<1||e.eq(kr))throw Error(ii+"NaN");if(r.s<1)throw Error(ii+(r.s?"NaN":"-Infinity"));return r.eq(kr)?new i(0):(pt=!1,t=on(jl(r,h),jl(e,h),h),pt=!0,at(t,o))};Ee.minus=Ee.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?LA(t,e):AA(t,(e.s=-e.s,e))};Ee.modulo=Ee.mod=function(e){var t,r=this,i=r.constructor,o=i.precision;if(e=new i(e),!e.s)throw Error(ii+"NaN");return r.s?(pt=!1,t=on(r,e,0,1).times(e),pt=!0,r.minus(t)):at(new i(r),o)};Ee.naturalExponential=Ee.exp=function(){return MA(this)};Ee.naturalLogarithm=Ee.ln=function(){return jl(this)};Ee.negated=Ee.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Ee.plus=Ee.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?AA(t,e):LA(t,(e.s=-e.s,e))};Ee.precision=Ee.sd=function(e){var t,r,i,o=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Rs+e);if(t=Dt(o)+1,i=o.d.length-1,r=i*dt+1,i=o.d[i],i){for(;i%10==0;i/=10)r--;for(i=o.d[0];i>=10;i/=10)r++}return e&&t>r?t:r};Ee.squareRoot=Ee.sqrt=function(){var e,t,r,i,o,h,g,a=this,c=a.constructor;if(a.s<1){if(!a.s)return new c(0);throw Error(ii+"NaN")}for(e=Dt(a),pt=!1,o=Math.sqrt(+a),o==0||o==1/0?(t=Oi(a.d),(t.length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=co((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),i=new c(t)):i=new c(o.toString()),r=c.precision,o=g=r+3;;)if(h=i,i=h.plus(on(a,h,g+2)).times(.5),Oi(h.d).slice(0,g)===(t=Oi(i.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)){i=h;break}}else if(t!="9999")break;g+=4}return pt=!0,at(i,r)};Ee.times=Ee.mul=function(e){var t,r,i,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,i=g;i--;)h.push(0);for(i=f;--i>=0;){for(t=0,o=c+i;o>i;)a=h[o]+w[i]*m[o-i-1]+t,h[o--]=a%qt|0,t=a/qt|0;h[o]=(h[o]+t)%qt|0}for(;!h[--g];)h.pop();return t?++r:h.shift(),e.d=h,e.e=r,pt?at(e,u.precision):e};Ee.toDecimalPlaces=Ee.todp=function(e,t){var r=this,i=r.constructor;return r=new i(r),e===void 0?r:(Bi(e,0,lo),t===void 0?t=i.rounding:Bi(t,0,8),at(r,e+Dt(r)+1,t))};Ee.toExponential=function(e,t){var r,i=this,o=i.constructor;return e===void 0?r=Hs(i,!0):(Bi(e,0,lo),t===void 0?t=o.rounding:Bi(t,0,8),i=at(new o(i),e+1,t),r=Hs(i,!0,e+1)),r};Ee.toFixed=function(e,t){var r,i,o=this,h=o.constructor;return e===void 0?Hs(o):(Bi(e,0,lo),t===void 0?t=h.rounding:Bi(t,0,8),i=at(new h(o),e+Dt(o)+1,t),r=Hs(i.abs(),!1,e+Dt(i)+1),o.isneg()&&!o.isZero()?"-"+r:r)};Ee.toInteger=Ee.toint=function(){var e=this,t=e.constructor;return at(new t(e),Dt(e)+1,t.rounding)};Ee.toNumber=function(){return+this};Ee.toPower=Ee.pow=function(e){var t,r,i,o,h,g,a=this,c=a.constructor,f=12,v=+(e=new c(e));if(!e.s)return new c(kr);if(a=new c(a),!a.s){if(e.s<1)throw Error(ii+"Infinity");return a}if(a.eq(kr))return a;if(i=c.precision,e.eq(kr))return at(a,i);if(t=e.e,r=e.d.length-1,g=t>=r,h=a.s,g){if((r=v<0?-v:v)<=EA){for(o=new c(kr),t=Math.ceil(i/dt+4),pt=!1;r%2&&(o=o.times(a),ix(o.d,t)),r=co(r/2),r!==0;)a=a.times(a),ix(a.d,t);return pt=!0,e.s<0?new c(kr).div(o):at(o,i)}}else if(h<0)throw Error(ii+"NaN");return h=h<0&&e.d[Math.max(t,r)]&1?-1:1,a.s=1,pt=!1,o=e.times(jl(a,i+f)),pt=!0,o=MA(o),o.s=h,o};Ee.toPrecision=function(e,t){var r,i,o=this,h=o.constructor;return e===void 0?(r=Dt(o),i=Hs(o,r<=h.toExpNeg||r>=h.toExpPos)):(Bi(e,1,lo),t===void 0?t=h.rounding:Bi(t,0,8),o=at(new h(o),e,t),r=Dt(o),i=Hs(o,e<=r||r<=h.toExpNeg,e)),i};Ee.toSignificantDigits=Ee.tosd=function(e,t){var r=this,i=r.constructor;return e===void 0?(e=i.precision,t=i.rounding):(Bi(e,1,lo),t===void 0?t=i.rounding:Bi(t,0,8)),at(new i(r),e,t)};Ee.toString=Ee.valueOf=Ee.val=Ee.toJSON=Ee[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Dt(e),r=e.constructor;return Hs(e,t<=r.toExpNeg||t>=r.toExpPos)};function AA(e,t){var r,i,o,h,g,a,c,f,v=e.constructor,u=v.precision;if(!e.s||!t.s)return t.s||(t=new v(e)),pt?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?(i=c,h=-h,a=f.length):(i=f,o=g,a=c.length),g=Math.ceil(u/dt),a=g>a?g+1:a+1,h>a&&(h=a,i.length=1),i.reverse();h--;)i.push(0);i.reverse()}for(a=c.length,h=f.length,a-h<0&&(h=a,i=f,f=c,c=i),r=0;h;)r=(c[--h]=c[h]+f[h]+r)/qt|0,c[h]%=qt;for(r&&(c.unshift(r),++o),a=c.length;c[--a]==0;)c.pop();return t.d=c,t.e=o,pt?at(t,u):t}function Bi(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Rs+e)}function Oi(e){var t,r,i,o=e.length-1,h="",g=e[0];if(o>0){for(h+=g,t=1;t<o;t++)i=e[t]+"",r=dt-i.length,r&&(h+=Fn(r)),h+=i;g=e[t],i=g+"",r=dt-i.length,r&&(h+=Fn(r))}else if(g===0)return"0";for(;g%10===0;)g/=10;return h+g}var on=(function(){function e(i,o){var h,g=0,a=i.length;for(i=i.slice();a--;)h=i[a]*o+g,i[a]=h%qt|0,g=h/qt|0;return g&&i.unshift(g),i}function t(i,o,h,g){var a,c;if(h!=g)c=h>g?1:-1;else for(a=c=0;a<h;a++)if(i[a]!=o[a]){c=i[a]>o[a]?1:-1;break}return c}function r(i,o,h){for(var g=0;h--;)i[h]-=g,g=i[h]<o[h]?1:0,i[h]=g*qt+i[h]-o[h];for(;!i[0]&&i.length>1;)i.shift()}return function(i,o,h,g){var a,c,f,v,u,m,w,C,_,d,y,b,S,E,L,x,O,M,D=i.constructor,k=i.s==o.s?1:-1,P=i.d,R=o.d;if(!i.s)return new D(i);if(!o.s)throw Error(ii+"Division by zero");for(c=i.e-o.e,O=R.length,L=P.length,w=new D(k),C=w.d=[],f=0;R[f]==(P[f]||0);)++f;if(R[f]>(P[f]||0)&&--c,h==null?b=h=D.precision:g?b=h+(Dt(i)-Dt(o))+1:b=h,b<0)return new D(0);if(b=b/dt+2|0,f=0,O==1)for(v=0,R=R[0],b++;(f<L||v)&&b--;f++)S=v*qt+(P[f]||0),C[f]=S/R|0,v=S%R|0;else{for(v=qt/(R[0]+1)|0,v>1&&(R=e(R,v),P=e(P,v),O=R.length,L=P.length),E=O,_=P.slice(0,O),d=_.length;d<O;)_[d++]=0;M=R.slice(),M.unshift(0),x=R[0],R[1]>=qt/2&&++x;do v=0,a=t(R,_,O,d),a<0?(y=_[0],O!=d&&(y=y*qt+(_[1]||0)),v=y/x|0,v>1?(v>=qt&&(v=qt-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++]=P[E]||0:(_=[P[E]],d=1);while((E++<L||_[0]!==void 0)&&b--)}return C[0]||C.shift(),w.e=c,at(w,g?h+Dt(w)+1:h)}})();function MA(e,t){var r,i,o,h,g,a,c=0,f=0,v=e.constructor,u=v.precision;if(Dt(e)>16)throw Error(im+Dt(e));if(!e.s)return new v(kr);for(pt=!1,a=u,g=new v(.03125);e.abs().gte(.1);)e=e.times(g),f+=5;for(i=Math.log(As(2,f))/Math.LN10*2+5|0,a+=i,r=o=h=new v(kr),v.precision=a;;){if(o=at(o.times(e),a),r=r.times(++c),g=h.plus(on(o,r,a)),Oi(g.d).slice(0,a)===Oi(h.d).slice(0,a)){for(;f--;)h=at(h.times(h),a);return v.precision=u,t==null?(pt=!0,at(h,u)):h}h=g}}function Dt(e){for(var t=e.e*dt,r=e.d[0];r>=10;r/=10)t++;return t}function gp(e,t,r){if(t>e.LN10.sd())throw pt=!0,r&&(e.precision=r),Error(ii+"LN10 precision limit exceeded");return at(new e(e.LN10),t)}function Fn(e){for(var t="";e--;)t+="0";return t}function jl(e,t){var r,i,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(ii+(w.s?"NaN":"-Infinity"));if(w.eq(kr))return new _(0);if(t==null?(pt=!1,f=d):f=t,w.eq(10))return t==null&&(pt=!0),gp(_,f);if(f+=m,_.precision=f,r=Oi(C),i=r.charAt(0),h=Dt(w),Math.abs(h)<15e14){for(;i<7&&i!=1||i==1&&r.charAt(1)>3;)w=w.times(e),r=Oi(w.d),i=r.charAt(0),u++;h=Dt(w),i>1?(w=new _("0."+r),h++):w=new _(i+"."+r.slice(1))}else return c=gp(_,f+2,d).times(h+""),w=jl(new _(i+"."+r.slice(1)),f-m).plus(c),_.precision=d,t==null?(pt=!0,at(w,d)):w;for(a=g=w=on(w.minus(kr),w.plus(kr),f),v=at(w.times(w),f),o=3;;){if(g=at(g.times(v),f),c=a.plus(on(g,new _(o),f)),Oi(c.d).slice(0,f)===Oi(a.d).slice(0,f))return a=a.times(2),h!==0&&(a=a.plus(gp(_,f+2,d).times(h+""))),a=on(a,new _(u),f),_.precision=d,t==null?(pt=!0,at(a,d)):a;a=c,o+=2}}function rx(e,t){var r,i,o;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(i=t.search(/e/i))>0?(r<0&&(r=i),r+=+t.slice(i+1),t=t.substring(0,i)):r<0&&(r=t.length),i=0;t.charCodeAt(i)===48;)++i;for(o=t.length;t.charCodeAt(o-1)===48;)--o;if(t=t.slice(i,o),t){if(o-=i,r=r-i-1,e.e=co(r/dt),e.d=[],i=(r+1)%dt,r<0&&(i+=dt),i<o){for(i&&e.d.push(+t.slice(0,i)),o-=dt;i<o;)e.d.push(+t.slice(i,i+=dt));t=t.slice(i),i=dt-t.length}else i-=o;for(;i--;)t+="0";if(e.d.push(+t),pt&&(e.e>ph||e.e<-ph))throw Error(im+r)}else e.s=0,e.e=0,e.d=[0];return e}function at(e,t,r){var i,o,h,g,a,c,f,v,u=e.d;for(g=1,h=u[0];h>=10;h/=10)g++;if(i=t-g,i<0)i+=dt,o=t,f=u[v=0];else{if(v=Math.ceil((i+1)/dt),h=u.length,v>=h)return e;for(f=h=u[v],g=1;h>=10;h/=10)g++;i%=dt,o=i-dt+g}if(r!==void 0&&(h=As(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&&(i>0?o>0?f/As(10,g-o):0:u[v-1])%10&1||r==(e.s<0?8:7))),t<1||!u[0])return c?(h=Dt(e),u.length=1,t=t-h-1,u[0]=As(10,(dt-t%dt)%dt),e.e=co(-t/dt)||0):(u.length=1,u[0]=e.e=e.s=0),e;if(i==0?(u.length=v,h=1,v--):(u.length=v+1,h=As(10,dt-i),u[v]=o>0?(f/As(10,g-o)%As(10,o)|0)*h:0),c)for(;;)if(v==0){(u[0]+=h)==qt&&(u[0]=1,++e.e);break}else{if(u[v]+=h,u[v]!=qt)break;u[v--]=0,h=1}for(i=u.length;u[--i]===0;)u.pop();if(pt&&(e.e>ph||e.e<-ph))throw Error(im+Dt(e));return e}function LA(e,t){var r,i,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),pt?at(t,w):t;if(c=e.d,u=t.d,i=t.e,f=e.e,c=c.slice(),g=f-i,g){for(v=g<0,v?(r=c,g=-g,a=u.length):(r=u,i=f,a=c.length),o=Math.max(Math.ceil(w/dt),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]=qt-1;--c[h],c[o]+=qt}c[o]-=u[o]}for(;c[--a]===0;)c.pop();for(;c[0]===0;c.shift())--i;return c[0]?(t.d=c,t.e=i,pt?at(t,w):t):new m(0)}function Hs(e,t,r){var i,o=Dt(e),h=Oi(e.d),g=h.length;return t?(r&&(i=r-g)>0?h=h.charAt(0)+"."+h.slice(1)+Fn(i):g>1&&(h=h.charAt(0)+"."+h.slice(1)),h=h+(o<0?"e":"e+")+o):o<0?(h="0."+Fn(-o-1)+h,r&&(i=r-g)>0&&(h+=Fn(i))):o>=g?(h+=Fn(o+1-g),r&&(i=r-o-1)>0&&(h=h+"."+Fn(i))):((i=o+1)<g&&(h=h.slice(0,i)+"."+h.slice(i)),r&&(i=r-g)>0&&(o+1===g&&(h+="."),h+=Fn(i))),e.s<0?"-"+h:h}function ix(e,t){if(e.length>t)return e.length=t,!0}function OA(e){var t,r,i;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(Rs+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 rx(g,h.toString())}else if(typeof h!="string")throw Error(Rs+h);if(h.charCodeAt(0)===45?(h=h.slice(1),g.s=-1):g.s=1,yj.test(h))rx(g,h);else throw Error(Rs+h)}if(o.prototype=Ee,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=OA,o.config=o.set=bj,e===void 0&&(e={}),e)for(i=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<i.length;)e.hasOwnProperty(r=i[t++])||(e[r]=this[r]);return o.config(e),o}function bj(e){if(!e||typeof e!="object")throw Error(ii+"Object expected");var t,r,i,o=["precision",1,lo,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<o.length;t+=3)if((i=e[r=o[t]])!==void 0)if(co(i)===i&&i>=o[t+1]&&i<=o[t+2])this[r]=i;else throw Error(Rs+r+": "+i);if((i=e[r="LN10"])!==void 0)if(i==Math.LN10)this[r]=new this(i);else throw Error(Rs+r+": "+i);return this}var nm=OA(mj);kr=new nm(1);const Ge=nm;function TA(e){var t;return e===0?t=1:t=Math.floor(new Ge(e).abs().log(10).toNumber())+1,t}function DA(e,t,r){for(var i=new Ge(e),o=0,h=[];i.lt(t)&&o<1e5;)h.push(i.toNumber()),i=i.add(r),o++;return h}var RA=e=>{var[t,r]=e,[i,o]=[t,r];return t>r&&([i,o]=[r,t]),[i,o]},sm=(e,t,r)=>{if(e.lte(0))return new Ge(0);var i=TA(e.toNumber()),o=new Ge(10).pow(i),h=e.div(o),g=i!==1?.05:.1,a=new Ge(Math.ceil(h.div(g).toNumber())).add(r).mul(g),c=a.mul(o);return t?new Ge(c.toNumber()):new Ge(Math.ceil(c.toNumber()))},kA=(e,t,r)=>{var i;if(e.lte(0))return new Ge(0);var o=[1,2,2.5,5],h=e.toNumber(),g=Math.floor(new Ge(h).abs().log(10).toNumber()),a=new Ge(10).pow(g),c=e.div(a).toNumber(),f=o.findIndex(w=>w>=c-1e-10);if(f===-1&&(a=a.mul(10),f=0),f+=r,f>=o.length){var v=Math.floor(f/o.length);f%=o.length,a=a.mul(new Ge(10).pow(v))}var u=(i=o[f])!==null&&i!==void 0?i:1,m=new Ge(u).mul(a);return t?m:new Ge(Math.ceil(m.toNumber()))},Sj=(e,t,r)=>{var i=new Ge(1),o=new Ge(e);if(!o.isint()&&r){var h=Math.abs(e);h<1?(i=new Ge(10).pow(TA(e)-1),o=new Ge(Math.floor(o.div(i).toNumber())).mul(i)):h>1&&(o=new Ge(Math.floor(e)))}else e===0?o=new Ge(Math.floor((t-1)/2)):r||(o=new Ge(Math.floor(e)));for(var g=Math.floor((t-1)/2),a=[],c=0;c<t;c++)a.push(o.add(new Ge(c-g).mul(i)).toNumber());return a},PA=function(t,r,i,o){var h=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,g=arguments.length>5&&arguments[5]!==void 0?arguments[5]:sm;if(!Number.isFinite((r-t)/(i-1)))return{step:new Ge(0),tickMin:new Ge(0),tickMax:new Ge(0)};var a=g(new Ge(r).sub(t).div(i-1),o,h),c;t<=0&&r>=0?c=new Ge(0):(c=new Ge(t).add(r).div(2),c=c.sub(new Ge(c).mod(a)));var f=Math.ceil(c.sub(t).div(a).toNumber()),v=Math.ceil(new Ge(r).sub(c).div(a).toNumber()),u=f+v+1;return u>i?PA(t,r,i,o,h+1,g):(u<i&&(v=r>0?v+(i-u):v,f=r>0?f:f+(i-u)),{step:a,tickMin:c.sub(new Ge(f).mul(a)),tickMax:c.add(new Ge(v).mul(a))})},nx=function(t){var[r,i]=t,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",a=Math.max(o,2),[c,f]=RA([r,i]);if(c===-1/0||f===1/0){var v=f===1/0?[c,...Array(o-1).fill(1/0)]:[...Array(o-1).fill(-1/0),f];return r>i?v.reverse():v}if(c===f)return Sj(c,o,h);var u=g==="snap125"?kA:sm,{step:m,tickMin:w,tickMax:C}=PA(c,f,a,h,0,u),_=DA(w,C.add(new Ge(.1).mul(m)),m);return r>i?_.reverse():_},sx=function(t,r){var[i,o]=t,h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",[a,c]=RA([i,o]);if(a===-1/0||c===1/0)return[i,o];if(a===c)return[a];var f=g==="snap125"?kA:sm,v=Math.max(r,2),u=f(new Ge(c).sub(a).div(v-1),h,0),m=[...DA(new Ge(a),new Ge(c),u),c];return h===!1&&(m=m.map(w=>Math.round(w))),i>o?m.reverse():m},BA=e=>e.rootProps.maxBarSize,wj=e=>e.rootProps.barGap,jA=e=>e.rootProps.barCategoryGap,Cj=e=>e.rootProps.barSize,uf=e=>e.rootProps.stackOffset,IA=e=>e.rootProps.reverseStackOrder,am=e=>e.options.chartName,om=e=>e.rootProps.syncId,NA=e=>e.rootProps.syncMethod,lm=e=>e.options.eventEmitter,Cr={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},bs={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Ei={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},hf=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function ff(e,t,r){if(r!=="auto")return r;if(e!=null)return Jn(e,t)?"category":"number"}function ax(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function _h(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ax(Object(r),!0).forEach(function(i){xj(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ax(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function xj(e,t,r){return(t=Ej(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ej(e){var t=Aj(e,"string");return typeof t=="symbol"?t:t+""}function Aj(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ox={allowDataOverflow:bs.allowDataOverflow,allowDecimals:bs.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:bs.angleAxisId,includeHidden:!1,name:void 0,reversed:bs.reversed,scale:bs.scale,tick:bs.tick,tickCount:void 0,ticks:void 0,type:bs.type,unit:void 0,niceTicks:"auto"},lx={allowDataOverflow:Ei.allowDataOverflow,allowDecimals:Ei.allowDecimals,allowDuplicatedCategory:Ei.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Ei.radiusAxisId,includeHidden:Ei.includeHidden,name:void 0,reversed:Ei.reversed,scale:Ei.scale,tick:Ei.tick,tickCount:Ei.tickCount,ticks:void 0,type:Ei.type,unit:void 0,niceTicks:"auto"},Mj=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},cm=le([Mj,nA],(e,t)=>{var r;if(e!=null)return e;var i=(r=ff(t,"angleAxis",ox.type))!==null&&r!==void 0?r:"category";return _h(_h({},ox),{},{type:i})}),Lj=(e,t)=>e.polarAxis.radiusAxis[t],um=le([Lj,nA],(e,t)=>{var r;if(e!=null)return e;var i=(r=ff(t,"radiusAxis",lx.type))!==null&&r!==void 0?r:"category";return _h(_h({},lx),{},{type:i})}),df=e=>e.polarOptions,hm=le([fn,dn,Kt],J8),zA=le([df,hm],(e,t)=>{if(e!=null)return vi(e.innerRadius,t,0)}),HA=le([df,hm],(e,t)=>{if(e!=null)return vi(e.outerRadius,t,t*.8)}),Oj=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},$A=le([df],Oj);le([cm,$A],hf);var UA=le([hm,zA,HA],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});le([um,UA],hf);var FA=le([ot,df,zA,HA,fn,dn],(e,t,r,i,o,h)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||i==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:i,startAngle:c,endAngle:f,clockWise:!1}}}),Yt=(e,t)=>t,vf=(e,t,r)=>r;function fm(e){return e==null?void 0:e.id}function WA(e,t,r){var{chartData:i=[]}=t,{allowDuplicatedCategory:o,dataKey:h}=r,g=new Map;return e.forEach(a=>{var c,f=(c=a.data)!==null&&c!==void 0?c:i;if(!(f==null||f.length===0)){var v=fm(a);f.forEach((u,m)=>{var w=h==null||o?m:String(Gt(u,h,null)),C=Gt(u,a.dataKey,0),_;g.has(w)?_=g.get(w):_={},Object.assign(_,{[v]:C}),g.set(w,_)})}}),Array.from(g.values())}function gf(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var pf=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function _f(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function Tj(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 Vt=e=>{var t=ot(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},uo=e=>e.tooltip.settings.axisId;function dm(e){if(e!=null){var t=e.ticks,r=e.bandwidth,i=e.range(),o=[Math.min(...i),Math.max(...i)];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}}}}}var Dj=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!Ti(t)){for(var r,i,o=0;o<t.length;o++){var h=t[o];Ze(h)&&((r===void 0||h<r)&&(r=h),(i===void 0||h>i)&&(i=h))}return r!==void 0&&i!==void 0?[r,i]:void 0}return t}default:return t}};function Kn(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Rj(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function vm(e){let t,r,i;e.length!==2?(t=Kn,r=(a,c)=>Kn(e(a),c),i=(a,c)=>e(a)-c):(t=e===Kn||e===Rj?e:kj,r=e,i=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&&i(a[u-1],c)>-i(a[u],c)?u-1:u}return{left:o,center:g,right:h}}function kj(){return 0}function qA(e){return e===null?NaN:+e}function*Pj(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const Bj=vm(Kn),Xl=Bj.right;vm(qA).center;class cx extends Map{constructor(t,r=Nj){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[i,o]of t)this.set(i,o)}get(t){return super.get(ux(this,t))}has(t){return super.has(ux(this,t))}set(t,r){return super.set(jj(this,t),r)}delete(t){return super.delete(Ij(this,t))}}function ux({_intern:e,_key:t},r){const i=t(r);return e.has(i)?e.get(i):r}function jj({_intern:e,_key:t},r){const i=t(r);return e.has(i)?e.get(i):(e.set(i,r),r)}function Ij({_intern:e,_key:t},r){const i=t(r);return e.has(i)&&(r=e.get(i),e.delete(i)),r}function Nj(e){return e!==null&&typeof e=="object"?e.valueOf():e}function zj(e=Kn){if(e===Kn)return GA;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const i=e(t,r);return i||i===0?i:(e(r,r)===0)-(e(t,t)===0)}}function GA(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Hj=Math.sqrt(50),$j=Math.sqrt(10),Uj=Math.sqrt(2);function mh(e,t,r){const i=(t-e)/Math.max(0,r),o=Math.floor(Math.log10(i)),h=i/Math.pow(10,o),g=h>=Hj?10:h>=$j?5:h>=Uj?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?mh(e,t,r*2):[a,c,f]}function c_(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const i=t<e,[o,h,g]=i?mh(t,e,r):mh(e,t,r);if(!(h>=o))return[];const a=h-o+1,c=new Array(a);if(i)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 u_(e,t,r){return t=+t,e=+e,r=+r,mh(e,t,r)[2]}function h_(e,t,r){t=+t,e=+e,r=+r;const i=t<e,o=i?u_(t,e,r):u_(e,t,r);return(i?-1:1)*(o<0?1/-o:o)}function hx(e,t){let r;for(const i of e)i!=null&&(r<i||r===void 0&&i>=i)&&(r=i);return r}function fx(e,t){let r;for(const i of e)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);return r}function KA(e,t,r=0,i=1/0,o){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),i=Math.floor(Math.min(e.length-1,i)),!(r<=t&&t<=i))return e;for(o=o===void 0?GA:zj(o);i>r;){if(i-r>600){const c=i-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(i,Math.floor(t+(c-f)*u/c+m));KA(e,t,w,C,o)}const h=e[t];let g=r,a=i;for(pl(e,r,t),o(e[i],h)>0&&pl(e,r,i);g<a;){for(pl(e,g,a),++g,--a;o(e[g],h)<0;)++g;for(;o(e[a],h)>0;)--a}o(e[r],h)===0?pl(e,r,a):(++a,pl(e,a,i)),a<=t&&(r=a+1),t<=a&&(i=a-1)}return e}function pl(e,t,r){const i=e[t];e[t]=e[r],e[r]=i}function Fj(e,t,r){if(e=Float64Array.from(Pj(e)),!(!(i=e.length)||isNaN(t=+t))){if(t<=0||i<2)return fx(e);if(t>=1)return hx(e);var i,o=(i-1)*t,h=Math.floor(o),g=hx(KA(e,h).subarray(0,h+1)),a=fx(e.subarray(h+1));return g+(a-g)*(o-h)}}function Wj(e,t,r=qA){if(!(!(i=e.length)||isNaN(t=+t))){if(t<=0||i<2)return+r(e[0],0,e);if(t>=1)return+r(e[i-1],i-1,e);var i,o=(i-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 qj(e,t,r){e=+e,t=+t,r=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+r;for(var i=-1,o=Math.max(0,Math.ceil((t-e)/r))|0,h=new Array(o);++i<o;)h[i]=e+i*r;return h}function si(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function vn(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 f_=Symbol("implicit");function gm(){var e=new cx,t=[],r=[],i=f_;function o(h){let g=e.get(h);if(g===void 0){if(i!==f_)return i;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 cx;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?(i=h,o):i},o.copy=function(){return gm(t,r).unknown(i)},si.apply(o,arguments),o}function pm(){var e=gm().unknown(void 0),t=e.domain,r=e.range,i=0,o=1,h,g,a=!1,c=0,f=0,v=.5;delete e.unknown;function u(){var m=t().length,w=o<i,C=w?o:i,_=w?i: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=qj(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?([i,o]=m,i=+i,o=+o,u()):[i,o]},e.rangeRound=function(m){return[i,o]=m,i=+i,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 pm(t(),[i,o]).round(a).paddingInner(c).paddingOuter(f).align(v)},si.apply(u(),arguments)}function YA(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return YA(t())},e}function Gj(){return YA(pm.apply(null,arguments).paddingInner(1))}function _m(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function VA(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function Zl(){}var Il=.7,yh=1/Il,Ga="\\s*([+-]?\\d+)\\s*",Nl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Di="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Kj=/^#([0-9a-f]{3,8})$/,Yj=new RegExp(`^rgb\\(${Ga},${Ga},${Ga}\\)$`),Vj=new RegExp(`^rgb\\(${Di},${Di},${Di}\\)$`),Xj=new RegExp(`^rgba\\(${Ga},${Ga},${Ga},${Nl}\\)$`),Zj=new RegExp(`^rgba\\(${Di},${Di},${Di},${Nl}\\)$`),Qj=new RegExp(`^hsl\\(${Nl},${Di},${Di}\\)$`),Jj=new RegExp(`^hsla\\(${Nl},${Di},${Di},${Nl}\\)$`),dx={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};_m(Zl,zl,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:vx,formatHex:vx,formatHex8:eI,formatHsl:tI,formatRgb:gx,toString:gx});function vx(){return this.rgb().formatHex()}function eI(){return this.rgb().formatHex8()}function tI(){return XA(this).formatHsl()}function gx(){return this.rgb().formatRgb()}function zl(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Kj.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?px(t):r===3?new xr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Ou(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Ou(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=Yj.exec(e))?new xr(t[1],t[2],t[3],1):(t=Vj.exec(e))?new xr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Xj.exec(e))?Ou(t[1],t[2],t[3],t[4]):(t=Zj.exec(e))?Ou(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Qj.exec(e))?yx(t[1],t[2]/100,t[3]/100,1):(t=Jj.exec(e))?yx(t[1],t[2]/100,t[3]/100,t[4]):dx.hasOwnProperty(e)?px(dx[e]):e==="transparent"?new xr(NaN,NaN,NaN,0):null}function px(e){return new xr(e>>16&255,e>>8&255,e&255,1)}function Ou(e,t,r,i){return i<=0&&(e=t=r=NaN),new xr(e,t,r,i)}function rI(e){return e instanceof Zl||(e=zl(e)),e?(e=e.rgb(),new xr(e.r,e.g,e.b,e.opacity)):new xr}function d_(e,t,r,i){return arguments.length===1?rI(e):new xr(e,t,r,i??1)}function xr(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}_m(xr,d_,VA(Zl,{brighter(e){return e=e==null?yh:Math.pow(yh,e),new xr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Il:Math.pow(Il,e),new xr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new xr(ks(this.r),ks(this.g),ks(this.b),bh(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:_x,formatHex:_x,formatHex8:iI,formatRgb:mx,toString:mx}));function _x(){return`#${Ls(this.r)}${Ls(this.g)}${Ls(this.b)}`}function iI(){return`#${Ls(this.r)}${Ls(this.g)}${Ls(this.b)}${Ls((isNaN(this.opacity)?1:this.opacity)*255)}`}function mx(){const e=bh(this.opacity);return`${e===1?"rgb(":"rgba("}${ks(this.r)}, ${ks(this.g)}, ${ks(this.b)}${e===1?")":`, ${e})`}`}function bh(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ks(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ls(e){return e=ks(e),(e<16?"0":"")+e.toString(16)}function yx(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new di(e,t,r,i)}function XA(e){if(e instanceof di)return new di(e.h,e.s,e.l,e.opacity);if(e instanceof Zl||(e=zl(e)),!e)return new di;if(e instanceof di)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,o=Math.min(t,r,i),h=Math.max(t,r,i),g=NaN,a=h-o,c=(h+o)/2;return a?(t===h?g=(r-i)/a+(r<i)*6:r===h?g=(i-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 di(g,a,c,e.opacity)}function nI(e,t,r,i){return arguments.length===1?XA(e):new di(e,t,r,i??1)}function di(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}_m(di,nI,VA(Zl,{brighter(e){return e=e==null?yh:Math.pow(yh,e),new di(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Il:Math.pow(Il,e),new di(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,i=r+(r<.5?r:1-r)*t,o=2*r-i;return new xr(pp(e>=240?e-240:e+120,o,i),pp(e,o,i),pp(e<120?e+240:e-120,o,i),this.opacity)},clamp(){return new di(bx(this.h),Tu(this.s),Tu(this.l),bh(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=bh(this.opacity);return`${e===1?"hsl(":"hsla("}${bx(this.h)}, ${Tu(this.s)*100}%, ${Tu(this.l)*100}%${e===1?")":`, ${e})`}`}}));function bx(e){return e=(e||0)%360,e<0?e+360:e}function Tu(e){return Math.max(0,Math.min(1,e||0))}function pp(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 mm=e=>()=>e;function sI(e,t){return function(r){return e+r*t}}function aI(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function oI(e){return(e=+e)==1?ZA:function(t,r){return r-t?aI(t,r,e):mm(isNaN(t)?r:t)}}function ZA(e,t){var r=t-e;return r?sI(e,r):mm(isNaN(e)?t:e)}const Sx=(function e(t){var r=oI(t);function i(o,h){var g=r((o=d_(o)).r,(h=d_(h)).r),a=r(o.g,h.g),c=r(o.b,h.b),f=ZA(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 i.gamma=e,i})(1);function lI(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,i=t.slice(),o;return function(h){for(o=0;o<r;++o)i[o]=e[o]*(1-h)+t[o]*h;return i}}function cI(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function uI(e,t){var r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),h=new Array(r),g;for(g=0;g<i;++g)o[g]=ho(e[g],t[g]);for(;g<r;++g)h[g]=t[g];return function(a){for(g=0;g<i;++g)h[g]=o[g](a);return h}}function hI(e,t){var r=new Date;return e=+e,t=+t,function(i){return r.setTime(e*(1-i)+t*i),r}}function Sh(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function fI(e,t){var r={},i={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?r[o]=ho(e[o],t[o]):i[o]=t[o];return function(h){for(o in r)i[o]=r[o](h);return i}}var v_=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,_p=new RegExp(v_.source,"g");function dI(e){return function(){return e}}function vI(e){return function(t){return e(t)+""}}function gI(e,t){var r=v_.lastIndex=_p.lastIndex=0,i,o,h,g=-1,a=[],c=[];for(e=e+"",t=t+"";(i=v_.exec(e))&&(o=_p.exec(t));)(h=o.index)>r&&(h=t.slice(r,h),a[g]?a[g]+=h:a[++g]=h),(i=i[0])===(o=o[0])?a[g]?a[g]+=o:a[++g]=o:(a[++g]=null,c.push({i:g,x:Sh(i,o)})),r=_p.lastIndex;return r<t.length&&(h=t.slice(r),a[g]?a[g]+=h:a[++g]=h),a.length<2?c[0]?vI(c[0].x):dI(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 ho(e,t){var r=typeof t,i;return t==null||r==="boolean"?mm(t):(r==="number"?Sh:r==="string"?(i=zl(t))?(t=i,Sx):gI:t instanceof zl?Sx:t instanceof Date?hI:cI(t)?lI:Array.isArray(t)?uI:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?fI:Sh)(e,t)}function ym(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function pI(e,t){t===void 0&&(t=e,e=ho);for(var r=0,i=t.length-1,o=t[0],h=new Array(i<0?0:i);r<i;)h[r]=e(o,o=t[++r]);return function(g){var a=Math.max(0,Math.min(i-1,Math.floor(g*=i)));return h[a](g-a)}}function _I(e){return function(){return e}}function wh(e){return+e}var wx=[0,1];function fr(e){return e}function g_(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:_I(isNaN(t)?NaN:.5)}function mI(e,t){var r;return e>t&&(r=e,e=t,t=r),function(i){return Math.max(e,Math.min(t,i))}}function yI(e,t,r){var i=e[0],o=e[1],h=t[0],g=t[1];return o<i?(i=g_(o,i),h=r(g,h)):(i=g_(i,o),h=r(h,g)),function(a){return h(i(a))}}function bI(e,t,r){var i=Math.min(e.length,t.length)-1,o=new Array(i),h=new Array(i),g=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++g<i;)o[g]=g_(e[g],e[g+1]),h[g]=r(t[g],t[g+1]);return function(a){var c=Xl(e,a,1,i)-1;return h[c](o[c](a))}}function Ql(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function mf(){var e=wx,t=wx,r=ho,i,o,h,g=fr,a,c,f;function v(){var m=Math.min(e.length,t.length);return g!==fr&&(g=mI(e[0],e[m-1])),a=m>2?bI:yI,c=f=null,u}function u(m){return m==null||isNaN(m=+m)?h:(c||(c=a(e.map(i),t,r)))(i(g(m)))}return u.invert=function(m){return g(o((f||(f=a(t,e.map(i),Sh)))(m)))},u.domain=function(m){return arguments.length?(e=Array.from(m,wh),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=ym,v()},u.clamp=function(m){return arguments.length?(g=m?!0:fr,v()):g!==fr},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 i=m,o=w,v()}}function bm(){return mf()(fr,fr)}function SI(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Ch(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),i=e.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+e.slice(r+1)]}function Za(e){return e=Ch(Math.abs(e)),e?e[1]:NaN}function wI(e,t){return function(r,i){for(var o=r.length,h=[],g=0,a=e[0],c=0;o>0&&a>0&&(c+a+1>i&&(a=Math.max(1,i-c)),h.push(r.substring(o-=a,o+a)),!((c+=a+1)>i));)a=e[g=(g+1)%e.length];return h.reverse().join(t)}}function CI(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var xI=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Hl(e){if(!(t=xI.exec(e)))throw new Error("invalid format: "+e);var t;return new Sm({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]})}Hl.prototype=Sm.prototype;function Sm(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+""}Sm.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 EI(e){e:for(var t=e.length,r=1,i=-1,o;r<t;++r)switch(e[r]){case".":i=o=r;break;case"0":i===0&&(i=r),o=r;break;default:if(!+e[r])break e;i>0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(o+1):e}var xh;function AI(e,t){var r=Ch(e,t);if(!r)return xh=void 0,e.toPrecision(t);var i=r[0],o=r[1],h=o-(xh=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,g=i.length;return h===g?i:h>g?i+new Array(h-g+1).join("0"):h>0?i.slice(0,h)+"."+i.slice(h):"0."+new Array(1-h).join("0")+Ch(e,Math.max(0,t+h-1))[0]}function Cx(e,t){var r=Ch(e,t);if(!r)return e+"";var i=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}const xx={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:SI,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)=>Cx(e*100,t),r:Cx,s:AI,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Ex(e){return e}var Ax=Array.prototype.map,Mx=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function MI(e){var t=e.grouping===void 0||e.thousands===void 0?Ex:wI(Ax.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",h=e.numerals===void 0?Ex:CI(Ax.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=Hl(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"):xx[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==="$"?i:/[%p]/.test(x)?g:"")+(m&&m.suffix!==void 0?m.suffix:""),D=xx[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 P(R){var B=O,U=M,V,q,Y;if(x==="c")U=D(R)+U,R="";else{R=+R;var W=R<0||1/R<0;if(R=isNaN(R)?c:D(Math.abs(R),E),L&&(R=EI(R)),W&&+R==0&&_!=="+"&&(W=!1),B=(W?_==="("?_:a:_==="-"||_==="("?"":_)+B,U=(x==="s"&&!isNaN(R)&&xh!==void 0?Mx[8+xh/3]:"")+U+(W&&_==="("?")":""),k){for(V=-1,q=R.length;++V<q;)if(Y=R.charCodeAt(V),48>Y||Y>57){U=(Y===46?o+R.slice(V+1):R.slice(V))+U,R=R.slice(0,V);break}}}S&&!y&&(R=t(R,1/0));var j=B.length+R.length+U.length,H=j<b?new Array(b-j+1).join(w):"";switch(S&&y&&(R=t(H+R,H.length?b-U.length:1/0),H=""),C){case"<":R=B+R+U+H;break;case"=":R=B+H+R+U;break;case"^":R=H.slice(0,j=H.length>>1)+B+R+U+H.slice(j);break;default:R=H+B+R+U;break}return h(R)}return P.toString=function(){return u+""},P}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=Hl(u),u.type="f",u),{suffix:Mx[8+w/3]});return function(d){return _(C*d)}}return{format:f,formatPrefix:v}}var Du,wm,QA;LI({thousands:",",grouping:[3],currency:["$",""]});function LI(e){return Du=MI(e),wm=Du.format,QA=Du.formatPrefix,Du}function OI(e){return Math.max(0,-Za(Math.abs(e)))}function TI(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Za(t)/3)))*3-Za(Math.abs(e)))}function DI(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Za(t)-Za(e))+1}function JA(e,t,r,i){var o=h_(e,t,r),h;switch(i=Hl(i??",f"),i.type){case"s":{var g=Math.max(Math.abs(e),Math.abs(t));return i.precision==null&&!isNaN(h=TI(o,g))&&(i.precision=h),QA(i,g)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(h=DI(o,Math.max(Math.abs(e),Math.abs(t))))&&(i.precision=h-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(h=OI(o))&&(i.precision=h-(i.type==="%")*2);break}}return wm(i)}function es(e){var t=e.domain;return e.ticks=function(r){var i=t();return c_(i[0],i[i.length-1],r??10)},e.tickFormat=function(r,i){var o=t();return JA(o[0],o[o.length-1],r??10,i)},e.nice=function(r){r==null&&(r=10);var i=t(),o=0,h=i.length-1,g=i[o],a=i[h],c,f,v=10;for(a<g&&(f=g,g=a,a=f,f=o,o=h,h=f);v-- >0;){if(f=u_(g,a,r),f===c)return i[o]=g,i[h]=a,t(i);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 eM(){var e=bm();return e.copy=function(){return Ql(e,eM())},si.apply(e,arguments),es(e)}function tM(e){var t;function r(i){return i==null||isNaN(i=+i)?t:i}return r.invert=r,r.domain=r.range=function(i){return arguments.length?(e=Array.from(i,wh),r):e.slice()},r.unknown=function(i){return arguments.length?(t=i,r):t},r.copy=function(){return tM(e).unknown(t)},e=arguments.length?Array.from(e,wh):[0,1],es(r)}function rM(e,t){e=e.slice();var r=0,i=e.length-1,o=e[r],h=e[i],g;return h<o&&(g=r,r=i,i=g,g=o,o=h,h=g),e[r]=t.floor(o),e[i]=t.ceil(h),e}function Lx(e){return Math.log(e)}function Ox(e){return Math.exp(e)}function RI(e){return-Math.log(-e)}function kI(e){return-Math.exp(-e)}function PI(e){return isFinite(e)?+("1e"+e):e<0?0:e}function BI(e){return e===10?PI:e===Math.E?Math.exp:t=>Math.pow(e,t)}function jI(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 Cm(e){const t=e(Lx,Ox),r=t.domain;let i=10,o,h;function g(){return o=jI(i),h=BI(i),r()[0]<0?(o=Tx(o),h=Tx(h),e(RI,kI)):e(Lx,Ox),t}return t.base=function(a){return arguments.length?(i=+a,g()):i},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(!(i%1)&&w-m<d){if(m=Math.floor(m),w=Math.ceil(w),f>0){for(;m<=w;++m)for(C=1;C<i;++C)if(_=m<0?C/h(-m):C*h(m),!(_<f)){if(_>v)break;y.push(_)}}else for(;m<=w;++m)for(C=i-1;C>=1;--C)if(_=m>0?C/h(-m):C*h(m),!(_<f)){if(_>v)break;y.push(_)}y.length*2<d&&(y=c_(f,v,d))}else y=c_(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=i===10?"s":","),typeof c!="function"&&(!(i%1)&&(c=Hl(c)).precision==null&&(c.trim=!0),c=wm(c)),a===1/0)return c;const f=Math.max(1,i*a/t.ticks().length);return v=>{let u=v/h(Math.round(o(v)));return u*i<i-.5&&(u*=i),u<=f?c(v):""}},t.nice=()=>r(rM(r(),{floor:a=>h(Math.floor(o(a))),ceil:a=>h(Math.ceil(o(a)))})),t}function iM(){const e=Cm(mf()).domain([1,10]);return e.copy=()=>Ql(e,iM()).base(e.base()),si.apply(e,arguments),e}function Dx(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Rx(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function xm(e){var t=1,r=e(Dx(t),Rx(t));return r.constant=function(i){return arguments.length?e(Dx(t=+i),Rx(t)):t},es(r)}function nM(){var e=xm(mf());return e.copy=function(){return Ql(e,nM()).constant(e.constant())},si.apply(e,arguments)}function kx(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function II(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function NI(e){return e<0?-e*e:e*e}function Em(e){var t=e(fr,fr),r=1;function i(){return r===1?e(fr,fr):r===.5?e(II,NI):e(kx(r),kx(1/r))}return t.exponent=function(o){return arguments.length?(r=+o,i()):r},es(t)}function Am(){var e=Em(mf());return e.copy=function(){return Ql(e,Am()).exponent(e.exponent())},si.apply(e,arguments),e}function zI(){return Am.apply(null,arguments).exponent(.5)}function Px(e){return Math.sign(e)*e*e}function HI(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function sM(){var e=bm(),t=[0,1],r=!1,i;function o(h){var g=HI(e(h));return isNaN(g)?i:r?Math.round(g):g}return o.invert=function(h){return e.invert(Px(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,wh)).map(Px)),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?(i=h,o):i},o.copy=function(){return sM(e.domain(),t).round(r).clamp(e.clamp()).unknown(i)},si.apply(o,arguments),es(o)}function aM(){var e=[],t=[],r=[],i;function o(){var g=0,a=Math.max(1,t.length);for(r=new Array(a-1);++g<a;)r[g-1]=Wj(e,g/a);return h}function h(g){return g==null||isNaN(g=+g)?i:t[Xl(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(Kn),o()},h.range=function(g){return arguments.length?(t=Array.from(g),o()):t.slice()},h.unknown=function(g){return arguments.length?(i=g,h):i},h.quantiles=function(){return r.slice()},h.copy=function(){return aM().domain(e).range(t).unknown(i)},si.apply(h,arguments)}function oM(){var e=0,t=1,r=1,i=[.5],o=[0,1],h;function g(c){return c!=null&&c<=c?o[Xl(i,c,0,r)]:h}function a(){var c=-1;for(i=new Array(r);++c<r;)i[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,i[0]]:f>=r?[i[r-1],t]:[i[f-1],i[f]]},g.unknown=function(c){return arguments.length&&(h=c),g},g.thresholds=function(){return i.slice()},g.copy=function(){return oM().domain([e,t]).range(o).unknown(h)},si.apply(es(g),arguments)}function lM(){var e=[.5],t=[0,1],r,i=1;function o(h){return h!=null&&h<=h?t[Xl(e,h,0,i)]:r}return o.domain=function(h){return arguments.length?(e=Array.from(h),i=Math.min(e.length,t.length-1),o):e.slice()},o.range=function(h){return arguments.length?(t=Array.from(h),i=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 lM().domain(e).range(t).unknown(r)},si.apply(o,arguments)}const mp=new Date,yp=new Date;function zt(e,t,r,i){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=>zt(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)=>(mp.setTime(+h),yp.setTime(+g),e(mp),e(yp),Math.floor(r(mp,yp))),o.every=h=>(h=Math.floor(h),!isFinite(h)||!(h>0)?null:h>1?o.filter(i?g=>i(g)%h===0:g=>o.count(0,g)%h===0):o)),o}const Eh=zt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Eh.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?zt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Eh);Eh.range;const sn=1e3,ti=sn*60,an=ti*60,cn=an*24,Mm=cn*7,Bx=cn*30,bp=cn*365,Os=zt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*sn)},(e,t)=>(t-e)/sn,e=>e.getUTCSeconds());Os.range;const Lm=zt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*sn)},(e,t)=>{e.setTime(+e+t*ti)},(e,t)=>(t-e)/ti,e=>e.getMinutes());Lm.range;const Om=zt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ti)},(e,t)=>(t-e)/ti,e=>e.getUTCMinutes());Om.range;const Tm=zt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*sn-e.getMinutes()*ti)},(e,t)=>{e.setTime(+e+t*an)},(e,t)=>(t-e)/an,e=>e.getHours());Tm.range;const Dm=zt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*an)},(e,t)=>(t-e)/an,e=>e.getUTCHours());Dm.range;const Jl=zt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ti)/cn,e=>e.getDate()-1);Jl.range;const yf=zt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/cn,e=>e.getUTCDate()-1);yf.range;const cM=zt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/cn,e=>Math.floor(e/cn));cM.range;function Fs(e){return zt(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())*ti)/Mm)}const bf=Fs(0),Ah=Fs(1),$I=Fs(2),UI=Fs(3),Qa=Fs(4),FI=Fs(5),WI=Fs(6);bf.range;Ah.range;$I.range;UI.range;Qa.range;FI.range;WI.range;function Ws(e){return zt(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)/Mm)}const Sf=Ws(0),Mh=Ws(1),qI=Ws(2),GI=Ws(3),Ja=Ws(4),KI=Ws(5),YI=Ws(6);Sf.range;Mh.range;qI.range;GI.range;Ja.range;KI.range;YI.range;const Rm=zt(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());Rm.range;const km=zt(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());km.range;const un=zt(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());un.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:zt(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)});un.range;const hn=zt(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());hn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:zt(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)});hn.range;function uM(e,t,r,i,o,h){const g=[[Os,1,sn],[Os,5,5*sn],[Os,15,15*sn],[Os,30,30*sn],[h,1,ti],[h,5,5*ti],[h,15,15*ti],[h,30,30*ti],[o,1,an],[o,3,3*an],[o,6,6*an],[o,12,12*an],[i,1,cn],[i,2,2*cn],[r,1,Mm],[t,1,Bx],[t,3,3*Bx],[e,1,bp]];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=vm(([,,d])=>d).right(g,m);if(w===g.length)return e.every(h_(f/bp,v/bp,u));if(w===0)return Eh.every(Math.max(h_(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[VI,XI]=uM(hn,km,Sf,cM,Dm,Om),[ZI,QI]=uM(un,Rm,bf,Jl,Tm,Lm);function Sp(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 wp(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 _l(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function JI(e){var t=e.dateTime,r=e.date,i=e.time,o=e.periods,h=e.days,g=e.shortDays,a=e.months,c=e.shortMonths,f=ml(o),v=yl(o),u=ml(h),m=yl(h),w=ml(g),C=yl(g),_=ml(a),d=yl(a),y=ml(c),b=yl(c),S={a:Y,A:W,b:j,B:H,c:null,d:$x,e:$x,f:wN,g:RN,G:PN,H:yN,I:bN,j:SN,L:hM,m:CN,M:xN,p:z,q:F,Q:Wx,s:qx,S:EN,u:AN,U:MN,V:LN,w:ON,W:TN,x:null,X:null,y:DN,Y:kN,Z:BN,"%":Fx},E={a:Z,A:re,b:he,B:ge,c:null,d:Ux,e:Ux,f:zN,g:VN,G:ZN,H:jN,I:IN,j:NN,L:dM,m:HN,M:$N,p:X,q:G,Q:Wx,s:qx,S:UN,u:FN,U:WN,V:qN,w:GN,W:KN,x:null,X:null,y:YN,Y:XN,Z:QN,"%":Fx},L={a:k,A:P,b:R,B,c:U,d:zx,e:zx,f:gN,g:Nx,G:Ix,H:Hx,I:Hx,j:hN,L:vN,m:uN,M:fN,p:D,q:cN,Q:_N,s:mN,S:dN,u:nN,U:sN,V:aN,w:iN,W:oN,x:V,X:q,y:Nx,Y:Ix,Z:lN,"%":pN};S.x=x(r,S),S.X=x(i,S),S.c=x(t,S),E.x=x(r,E),E.X=x(i,E),E.c=x(t,E);function x(ee,Q){return function(se){var te=[],me=-1,fe=0,ye=ee.length,Le,be,Qe;for(se instanceof Date||(se=new Date(+se));++me<ye;)ee.charCodeAt(me)===37&&(te.push(ee.slice(fe,me)),(be=jx[Le=ee.charAt(++me)])!=null?Le=ee.charAt(++me):be=Le==="e"?" ":"0",(Qe=Q[Le])&&(Le=Qe(se,be)),te.push(Le),fe=me+1);return te.push(ee.slice(fe,me)),te.join("")}}function O(ee,Q){return function(se){var te=_l(1900,void 0,1),me=M(te,ee,se+="",0),fe,ye;if(me!=se.length)return null;if("Q"in te)return new Date(te.Q);if("s"in te)return new Date(te.s*1e3+("L"in te?te.L:0));if(Q&&!("Z"in te)&&(te.Z=0),"p"in te&&(te.H=te.H%12+te.p*12),te.m===void 0&&(te.m="q"in te?te.q:0),"V"in te){if(te.V<1||te.V>53)return null;"w"in te||(te.w=1),"Z"in te?(fe=wp(_l(te.y,0,1)),ye=fe.getUTCDay(),fe=ye>4||ye===0?Mh.ceil(fe):Mh(fe),fe=yf.offset(fe,(te.V-1)*7),te.y=fe.getUTCFullYear(),te.m=fe.getUTCMonth(),te.d=fe.getUTCDate()+(te.w+6)%7):(fe=Sp(_l(te.y,0,1)),ye=fe.getDay(),fe=ye>4||ye===0?Ah.ceil(fe):Ah(fe),fe=Jl.offset(fe,(te.V-1)*7),te.y=fe.getFullYear(),te.m=fe.getMonth(),te.d=fe.getDate()+(te.w+6)%7)}else("W"in te||"U"in te)&&("w"in te||(te.w="u"in te?te.u%7:"W"in te?1:0),ye="Z"in te?wp(_l(te.y,0,1)).getUTCDay():Sp(_l(te.y,0,1)).getDay(),te.m=0,te.d="W"in te?(te.w+6)%7+te.W*7-(ye+5)%7:te.w+te.U*7-(ye+6)%7);return"Z"in te?(te.H+=te.Z/100|0,te.M+=te.Z%100,wp(te)):Sp(te)}}function M(ee,Q,se,te){for(var me=0,fe=Q.length,ye=se.length,Le,be;me<fe;){if(te>=ye)return-1;if(Le=Q.charCodeAt(me++),Le===37){if(Le=Q.charAt(me++),be=L[Le in jx?Q.charAt(me++):Le],!be||(te=be(ee,se,te))<0)return-1}else if(Le!=se.charCodeAt(te++))return-1}return te}function D(ee,Q,se){var te=f.exec(Q.slice(se));return te?(ee.p=v.get(te[0].toLowerCase()),se+te[0].length):-1}function k(ee,Q,se){var te=w.exec(Q.slice(se));return te?(ee.w=C.get(te[0].toLowerCase()),se+te[0].length):-1}function P(ee,Q,se){var te=u.exec(Q.slice(se));return te?(ee.w=m.get(te[0].toLowerCase()),se+te[0].length):-1}function R(ee,Q,se){var te=y.exec(Q.slice(se));return te?(ee.m=b.get(te[0].toLowerCase()),se+te[0].length):-1}function B(ee,Q,se){var te=_.exec(Q.slice(se));return te?(ee.m=d.get(te[0].toLowerCase()),se+te[0].length):-1}function U(ee,Q,se){return M(ee,t,Q,se)}function V(ee,Q,se){return M(ee,r,Q,se)}function q(ee,Q,se){return M(ee,i,Q,se)}function Y(ee){return g[ee.getDay()]}function W(ee){return h[ee.getDay()]}function j(ee){return c[ee.getMonth()]}function H(ee){return a[ee.getMonth()]}function z(ee){return o[+(ee.getHours()>=12)]}function F(ee){return 1+~~(ee.getMonth()/3)}function Z(ee){return g[ee.getUTCDay()]}function re(ee){return h[ee.getUTCDay()]}function he(ee){return c[ee.getUTCMonth()]}function ge(ee){return a[ee.getUTCMonth()]}function X(ee){return o[+(ee.getUTCHours()>=12)]}function G(ee){return 1+~~(ee.getUTCMonth()/3)}return{format:function(ee){var Q=x(ee+="",S);return Q.toString=function(){return ee},Q},parse:function(ee){var Q=O(ee+="",!1);return Q.toString=function(){return ee},Q},utcFormat:function(ee){var Q=x(ee+="",E);return Q.toString=function(){return ee},Q},utcParse:function(ee){var Q=O(ee+="",!0);return Q.toString=function(){return ee},Q}}}var jx={"-":"",_:" ",0:"0"},Xt=/^\s*\d+/,eN=/^%/,tN=/[\\^$*+?|[\]().{}]/g;function Ve(e,t,r){var i=e<0?"-":"",o=(i?-e:e)+"",h=o.length;return i+(h<r?new Array(r-h+1).join(t)+o:o)}function rN(e){return e.replace(tN,"\\$&")}function ml(e){return new RegExp("^(?:"+e.map(rN).join("|")+")","i")}function yl(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function iN(e,t,r){var i=Xt.exec(t.slice(r,r+1));return i?(e.w=+i[0],r+i[0].length):-1}function nN(e,t,r){var i=Xt.exec(t.slice(r,r+1));return i?(e.u=+i[0],r+i[0].length):-1}function sN(e,t,r){var i=Xt.exec(t.slice(r,r+2));return i?(e.U=+i[0],r+i[0].length):-1}function aN(e,t,r){var i=Xt.exec(t.slice(r,r+2));return i?(e.V=+i[0],r+i[0].length):-1}function oN(e,t,r){var i=Xt.exec(t.slice(r,r+2));return i?(e.W=+i[0],r+i[0].length):-1}function Ix(e,t,r){var i=Xt.exec(t.slice(r,r+4));return i?(e.y=+i[0],r+i[0].length):-1}function Nx(e,t,r){var i=Xt.exec(t.slice(r,r+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function lN(e,t,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function cN(e,t,r){var i=Xt.exec(t.slice(r,r+1));return i?(e.q=i[0]*3-3,r+i[0].length):-1}function uN(e,t,r){var i=Xt.exec(t.slice(r,r+2));return i?(e.m=i[0]-1,r+i[0].length):-1}function zx(e,t,r){var i=Xt.exec(t.slice(r,r+2));return i?(e.d=+i[0],r+i[0].length):-1}function hN(e,t,r){var i=Xt.exec(t.slice(r,r+3));return i?(e.m=0,e.d=+i[0],r+i[0].length):-1}function Hx(e,t,r){var i=Xt.exec(t.slice(r,r+2));return i?(e.H=+i[0],r+i[0].length):-1}function fN(e,t,r){var i=Xt.exec(t.slice(r,r+2));return i?(e.M=+i[0],r+i[0].length):-1}function dN(e,t,r){var i=Xt.exec(t.slice(r,r+2));return i?(e.S=+i[0],r+i[0].length):-1}function vN(e,t,r){var i=Xt.exec(t.slice(r,r+3));return i?(e.L=+i[0],r+i[0].length):-1}function gN(e,t,r){var i=Xt.exec(t.slice(r,r+6));return i?(e.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function pN(e,t,r){var i=eN.exec(t.slice(r,r+1));return i?r+i[0].length:-1}function _N(e,t,r){var i=Xt.exec(t.slice(r));return i?(e.Q=+i[0],r+i[0].length):-1}function mN(e,t,r){var i=Xt.exec(t.slice(r));return i?(e.s=+i[0],r+i[0].length):-1}function $x(e,t){return Ve(e.getDate(),t,2)}function yN(e,t){return Ve(e.getHours(),t,2)}function bN(e,t){return Ve(e.getHours()%12||12,t,2)}function SN(e,t){return Ve(1+Jl.count(un(e),e),t,3)}function hM(e,t){return Ve(e.getMilliseconds(),t,3)}function wN(e,t){return hM(e,t)+"000"}function CN(e,t){return Ve(e.getMonth()+1,t,2)}function xN(e,t){return Ve(e.getMinutes(),t,2)}function EN(e,t){return Ve(e.getSeconds(),t,2)}function AN(e){var t=e.getDay();return t===0?7:t}function MN(e,t){return Ve(bf.count(un(e)-1,e),t,2)}function fM(e){var t=e.getDay();return t>=4||t===0?Qa(e):Qa.ceil(e)}function LN(e,t){return e=fM(e),Ve(Qa.count(un(e),e)+(un(e).getDay()===4),t,2)}function ON(e){return e.getDay()}function TN(e,t){return Ve(Ah.count(un(e)-1,e),t,2)}function DN(e,t){return Ve(e.getFullYear()%100,t,2)}function RN(e,t){return e=fM(e),Ve(e.getFullYear()%100,t,2)}function kN(e,t){return Ve(e.getFullYear()%1e4,t,4)}function PN(e,t){var r=e.getDay();return e=r>=4||r===0?Qa(e):Qa.ceil(e),Ve(e.getFullYear()%1e4,t,4)}function BN(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ve(t/60|0,"0",2)+Ve(t%60,"0",2)}function Ux(e,t){return Ve(e.getUTCDate(),t,2)}function jN(e,t){return Ve(e.getUTCHours(),t,2)}function IN(e,t){return Ve(e.getUTCHours()%12||12,t,2)}function NN(e,t){return Ve(1+yf.count(hn(e),e),t,3)}function dM(e,t){return Ve(e.getUTCMilliseconds(),t,3)}function zN(e,t){return dM(e,t)+"000"}function HN(e,t){return Ve(e.getUTCMonth()+1,t,2)}function $N(e,t){return Ve(e.getUTCMinutes(),t,2)}function UN(e,t){return Ve(e.getUTCSeconds(),t,2)}function FN(e){var t=e.getUTCDay();return t===0?7:t}function WN(e,t){return Ve(Sf.count(hn(e)-1,e),t,2)}function vM(e){var t=e.getUTCDay();return t>=4||t===0?Ja(e):Ja.ceil(e)}function qN(e,t){return e=vM(e),Ve(Ja.count(hn(e),e)+(hn(e).getUTCDay()===4),t,2)}function GN(e){return e.getUTCDay()}function KN(e,t){return Ve(Mh.count(hn(e)-1,e),t,2)}function YN(e,t){return Ve(e.getUTCFullYear()%100,t,2)}function VN(e,t){return e=vM(e),Ve(e.getUTCFullYear()%100,t,2)}function XN(e,t){return Ve(e.getUTCFullYear()%1e4,t,4)}function ZN(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Ja(e):Ja.ceil(e),Ve(e.getUTCFullYear()%1e4,t,4)}function QN(){return"+0000"}function Fx(){return"%"}function Wx(e){return+e}function qx(e){return Math.floor(+e/1e3)}var Ba,gM,pM;JN({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 JN(e){return Ba=JI(e),gM=Ba.format,Ba.parse,pM=Ba.utcFormat,Ba.utcParse,Ba}function e7(e){return new Date(e)}function t7(e){return e instanceof Date?+e:+new Date(+e)}function Pm(e,t,r,i,o,h,g,a,c,f){var v=bm(),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:i(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,t7)):m().map(e7)},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(rM(O,x)):v},v.copy=function(){return Ql(v,Pm(e,t,r,i,o,h,g,a,c,f))},v}function r7(){return si.apply(Pm(ZI,QI,un,Rm,bf,Jl,Tm,Lm,Os,gM).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function i7(){return si.apply(Pm(VI,XI,hn,km,Sf,yf,Dm,Om,Os,pM).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function wf(){var e=0,t=1,r,i,o,h,g=fr,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),i=h(t=+t),o=r===i?0:1/(i-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(ho),f.rangeRound=v(ym),f.unknown=function(u){return arguments.length?(c=u,f):c},function(u){return h=u,r=u(e),i=u(t),o=r===i?0:1/(i-r),f}}function ts(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function _M(){var e=es(wf()(fr));return e.copy=function(){return ts(e,_M())},vn.apply(e,arguments)}function mM(){var e=Cm(wf()).domain([1,10]);return e.copy=function(){return ts(e,mM()).base(e.base())},vn.apply(e,arguments)}function yM(){var e=xm(wf());return e.copy=function(){return ts(e,yM()).constant(e.constant())},vn.apply(e,arguments)}function Bm(){var e=Em(wf());return e.copy=function(){return ts(e,Bm()).exponent(e.exponent())},vn.apply(e,arguments)}function n7(){return Bm.apply(null,arguments).exponent(.5)}function bM(){var e=[],t=fr;function r(i){if(i!=null&&!isNaN(i=+i))return t((Xl(e,i,1)-1)/(e.length-1))}return r.domain=function(i){if(!arguments.length)return e.slice();e=[];for(let o of i)o!=null&&!isNaN(o=+o)&&e.push(o);return e.sort(Kn),r},r.interpolator=function(i){return arguments.length?(t=i,r):t},r.range=function(){return e.map((i,o)=>t(o/(e.length-1)))},r.quantiles=function(i){return Array.from({length:i+1},(o,h)=>Fj(e,h/i))},r.copy=function(){return bM(t).domain(e)},vn.apply(r,arguments)}function Cf(){var e=0,t=.5,r=1,i=1,o,h,g,a,c,f=fr,v,u=!1,m;function w(_){return isNaN(_=+_)?m:(_=.5+((_=+v(_))-h)*(i*_<i*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),i=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=pI(_,[y,b,S]),w):[f(0),f(.5),f(1)]}}return w.range=C(ho),w.rangeRound=C(ym),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),i=h<o?-1:1,w}}function SM(){var e=es(Cf()(fr));return e.copy=function(){return ts(e,SM())},vn.apply(e,arguments)}function wM(){var e=Cm(Cf()).domain([.1,1,10]);return e.copy=function(){return ts(e,wM()).base(e.base())},vn.apply(e,arguments)}function CM(){var e=xm(Cf());return e.copy=function(){return ts(e,CM()).constant(e.constant())},vn.apply(e,arguments)}function jm(){var e=Em(Cf());return e.copy=function(){return ts(e,jm()).exponent(e.exponent())},vn.apply(e,arguments)}function s7(){return jm.apply(null,arguments).exponent(.5)}const xM=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:pm,scaleDiverging:SM,scaleDivergingLog:wM,scaleDivergingPow:jm,scaleDivergingSqrt:s7,scaleDivergingSymlog:CM,scaleIdentity:tM,scaleImplicit:f_,scaleLinear:eM,scaleLog:iM,scaleOrdinal:gm,scalePoint:Gj,scalePow:Am,scaleQuantile:aM,scaleQuantize:oM,scaleRadial:sM,scaleSequential:_M,scaleSequentialLog:mM,scaleSequentialPow:Bm,scaleSequentialQuantile:bM,scaleSequentialSqrt:n7,scaleSequentialSymlog:yM,scaleSqrt:zI,scaleSymlog:nM,scaleThreshold:lM,scaleTime:r7,scaleUtc:i7,tickFormat:JA},Symbol.toStringTag,{value:"Module"}));function a7(e){var t=xM;if(e in t&&typeof t[e]=="function")return t[e]();var r="scale".concat(Fl(e));if(r in t&&typeof t[r]=="function")return t[r]()}function Gx(e,t,r){if(typeof e=="function")return e.copy().domain(t).range(r);if(e!=null){var i=a7(e);if(i!=null)return i.domain(t).range(r),i}}function Im(e,t,r,i){if(!(r==null||i==null))return typeof e.scale=="function"?Gx(e.scale,r,i):Gx(t,r,i)}function o7(e){return"scale".concat(Fl(e))}function l7(e){return o7(e)in xM}var EM=(e,t,r)=>{if(e!=null){var{scale:i,type:o}=e;if(i==="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 i=="string")return l7(i)?i:"point"}};function c7(e,t){for(var r=0,i=e.length,o=e[0]<e[e.length-1];r<i;){var h=Math.floor((r+i)/2);(o?e[h]<t:e[h]>t)?r=h+1:i=h}return r}function AM(e,t){if(e){var r=t??e.domain(),i=r.map(h=>{var g;return(g=e(h))!==null&&g!==void 0?g:0}),o=e.range();if(!(r.length===0||o.length<2))return h=>{var g,a,c=c7(i,h);if(c<=0)return r[0];if(c>=r.length)return r[r.length-1];var f=(g=i[c-1])!==null&&g!==void 0?g:0,v=(a=i[c])!==null&&a!==void 0?a:0;return Math.abs(h-f)<=Math.abs(h-v)?r[c-1]:r[c]}}}function u7(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):AM(e,void 0)}function Kx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Lh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kx(Object(r),!0).forEach(function(i){h7(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kx(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function h7(e,t,r){return(t=f7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f7(e){var t=d7(e,"string");return typeof t=="symbol"?t:t+""}function d7(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var p_=[0,"auto"],Bt={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,niceTicks:"auto"},MM=(e,t)=>e.cartesianAxis.xAxis[t],gn=(e,t)=>{var r=MM(e,t);return r??Bt},jt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:p_,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,niceTicks:"auto",width:Gl},LM=(e,t)=>e.cartesianAxis.yAxis[t],pn=(e,t)=>{var r=LM(e,t);return r??jt},v7={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:""},Nm=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??v7},gr=(e,t,r)=>{switch(t){case"xAxis":return gn(e,r);case"yAxis":return pn(e,r);case"zAxis":return Nm(e,r);case"angleAxis":return cm(e,r);case"radiusAxis":return um(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},g7=(e,t,r)=>{switch(t){case"xAxis":return gn(e,r);case"yAxis":return pn(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},ec=(e,t,r)=>{switch(t){case"xAxis":return gn(e,r);case"yAxis":return pn(e,r);case"angleAxis":return cm(e,r);case"radiusAxis":return um(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},OM=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function TM(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 zm=e=>e.graphicalItems.cartesianItems,p7=le([Yt,vf],TM),DM=(e,t,r)=>e.filter(r).filter(i=>(t==null?void 0:t.includeHidden)===!0?!0:!i.hide),fo=le([zm,gr,p7],DM,{memoizeOptions:{resultEqualityCheck:_f}}),RM=le([fo],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(gf)),kM=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),_7=le([fo],kM),PM=e=>e.map(t=>t.data).filter(Boolean).flat(1),m7=le([fo],e=>e.some(t=>!t.data)),BM=le([fo],PM,{memoizeOptions:{resultEqualityCheck:_f}}),jM=(e,t)=>{var{chartData:r=[],dataStartIndex:i,dataEndIndex:o}=t;return e.length>0?e:r.slice(i,o+1)},Hm=le([BM,cf],jM),y7=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(i=>({value:Gt(i,t.dataKey)})):r.length>0?r.map(i=>i.dataKey).flatMap(i=>e.map(o=>({value:Gt(o,i)}))):e.map(i=>({value:i})),IM=(e,t,r,i,o,h)=>{var{chartData:g=[],dataStartIndex:a,dataEndIndex:c}=i,f=y7(e,t,r);if(o&&(t==null?void 0:t.dataKey)!=null&&h.length>0){var v=g.slice(a,c+1),u=v.map(m=>({value:Gt(m,t.dataKey)})).filter(m=>m.value!=null);return[...u,...f]}return f},tc=le([Hm,gr,fo,cf,m7,BM],IM);function Ka(e){if(Pi(e)||e instanceof Date){var t=Number(e);if(Ze(t))return t}}function Yx(e){if(Array.isArray(e)){var t=[Ka(e[0]),Ka(e[1])];return Ti(t)?t:void 0}var r=Ka(e);if(r!=null)return[r,r]}function ji(e){return e.map(Ka).filter(Mi)}function b7(e,t){var r=Ka(e),i=Ka(t);return r==null&&i==null?0:r==null?-1:i==null?1:r-i}var S7=le([tc],e=>e==null?void 0:e.map(t=>t.value).sort(b7));function NM(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function w7(e,t,r){if(!r)return[];if(!r.length)return[];var i;if(typeof t=="number"&&!ki(t))i=t;else if(Array.isArray(t)){var o=ji(t);o.length>0&&(i=Math.max(...o))}return i==null?[]:ji(r.flatMap(h=>{var g=Gt(e,h.dataKey),a,c;if(Array.isArray(g)?[a,c]=g:a=c=g,!(!Ze(a)||!Ze(c)))return[i-a,i+c]}))}var Ht=e=>{var t=Vt(e),r=uo(e);return ec(e,t,r)},eo=le([Ht],e=>e==null?void 0:e.dataKey),C7=le([RM,cf,Ht],WA),zM=(e,t,r,i)=>{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=i?[...c].reverse():c,v=f.map(fm);return[a,{stackedData:m6(e,v,r),graphicalItems:f}]}))},__=le([C7,RM,uf,IA],zM),HM=(e,t,r,i)=>{var{dataStartIndex:o,dataEndIndex:h}=t;if(i==null&&r!=="zAxis"){var g=C6(e,o,h);if(!(g!=null&&g[0]===0&&g[1]===0))return g}},x7=le([gr],e=>e.allowDataOverflow),$m=e=>{var t;if(e==null||!("domain"in e))return p_;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=ji(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:p_},$M=le([gr],$m),UM=le([$M,x7],xA),E7=le([__,_i,Yt,UM],HM,{memoizeOptions:{resultEqualityCheck:pf}}),Um=e=>e.errorBars,A7=(e,t,r)=>e.flatMap(i=>t[i.id]).filter(Boolean).filter(i=>NM(r,i)),Oh=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];var o=r.filter(Boolean);if(o.length!==0){var h=o.flat(),g=Math.min(...h),a=Math.max(...h);return[g,a]}},FM=function(t,r,i,o,h){var g=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],a,c;if(i.length>0&&i.forEach(f=>{var v,u=f.data!=null?[...f.data]:g,m=(v=o[f.id])===null||v===void 0?void 0:v.filter(w=>NM(h,w));u.forEach(w=>{var C,_=Gt(w,(C=r.dataKey)!==null&&C!==void 0?C:f.dataKey),d=w7(w,_,m);if(d.length>=2){var y=Math.min(...d),b=Math.max(...d);(a==null||y<a)&&(a=y),(c==null||b>c)&&(c=b)}var S=Yx(_);S!=null&&(a=a==null?S[0]:Math.min(a,S[0]),c=c==null?S[1]:Math.max(c,S[1]))})}),(r==null?void 0:r.dataKey)!=null&&i.length===0&&t.forEach(f=>{var v=Yx(Gt(f,r.dataKey));v!=null&&(a=a==null?v[0]:Math.min(a,v[0]),c=c==null?v[1]:Math.max(c,v[1]))}),Ze(a)&&Ze(c))return[a,c]},M7=le([Hm,gr,_7,Um,Yt,gj],FM,{memoizeOptions:{resultEqualityCheck:pf}});function L7(e){var{value:t}=e;if(Pi(t)||t instanceof Date)return t}var O7=(e,t,r)=>{var i=e.map(L7).filter(o=>o!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&sE(i))?CA(0,e.length):t.allowDuplicatedCategory?i:Array.from(new Set(i))},WM=e=>e.referenceElements.dots,vo=(e,t,r)=>e.filter(i=>i.ifOverflow==="extendDomain").filter(i=>t==="xAxis"?i.xAxisId===r:i.yAxisId===r),T7=le([WM,Yt,vf],vo),qM=e=>e.referenceElements.areas,D7=le([qM,Yt,vf],vo),GM=e=>e.referenceElements.lines,R7=le([GM,Yt,vf],vo),KM=(e,t)=>{if(e!=null){var r=ji(e.map(i=>t==="xAxis"?i.x:i.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},k7=le(T7,Yt,KM),YM=(e,t)=>{if(e!=null){var r=ji(e.flatMap(i=>[t==="xAxis"?i.x1:i.y1,t==="xAxis"?i.x2:i.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},P7=le([D7,Yt],YM);function B7(e){var t;if(e.x!=null)return ji([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(i=>i.x);return r==null||r.length===0?[]:ji(r)}function j7(e){var t;if(e.y!=null)return ji([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(i=>i.y);return r==null||r.length===0?[]:ji(r)}var VM=(e,t)=>{if(e!=null){var r=e.flatMap(i=>t==="xAxis"?B7(i):j7(i));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},I7=le([R7,Yt],VM),N7=le(k7,I7,P7,(e,t,r)=>Oh(e,r,t)),XM=(e,t,r,i,o,h,g,a)=>{if(r!=null)return r;var c=g==="vertical"&&a==="xAxis"||g==="horizontal"&&a==="yAxis",f=c?Oh(i,h,o):Oh(h,o);return _j(t,f,e.allowDataOverflow)},z7=le([gr,$M,UM,E7,M7,N7,ot,Yt],XM,{memoizeOptions:{resultEqualityCheck:pf}}),H7=[0,1],ZM=(e,t,r,i,o,h,g)=>{if(!((e==null||r==null||r.length===0)&&g===void 0)){var{dataKey:a,type:c}=e,f=Jn(t,h);if(f&&a==null){var v;return CA(0,(v=r==null?void 0:r.length)!==null&&v!==void 0?v:0)}return c==="category"?O7(i,e,f):o==="expand"&&!f?H7:g}},Fm=le([gr,ot,Hm,tc,uf,Yt,z7],ZM),go=le([gr,OM,am],EM),QM=(e,t,r)=>{var{niceTicks:i}=t;if(i!=="none"){var o=$m(t),h=Array.isArray(o)&&(o[0]==="auto"||o[1]==="auto");if((i==="snap125"||i==="adaptive")&&t!=null&&t.tickCount&&Ti(e)){if(h)return nx(e,t.tickCount,t.allowDecimals,i);if(t.type==="number")return sx(e,t.tickCount,t.allowDecimals,i)}if(i==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(h&&Ti(e))return nx(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&Ti(e))return sx(e,t.tickCount,t.allowDecimals,"adaptive")}}},Wm=le([Fm,ec,go],QM),JM=(e,t,r,i)=>{if(i!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&Ti(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},$7=le([gr,Fm,Wm,Yt],JM),U7=le(tc,gr,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,i=Array.from(ji(e.map(u=>u.value))).sort((u,m)=>u-m),o=i[0],h=i[i.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<i.length-1;a++){var c=i[a],f=i[a+1];if(!(c==null||f==null)){var v=f-c;r=Math.min(r,v)}}return r/g}}),eL=le(U7,ot,jA,Kt,(e,t,r,i,o)=>o,(e,t,r,i,o)=>{if(!Ze(e))return 0;var h=t==="vertical"?i.height:i.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}),F7=(e,t,r)=>{var i=gn(e,t);return i==null||typeof i.padding!="string"?0:eL(e,"xAxis",t,r,i.padding)},W7=(e,t,r)=>{var i=pn(e,t);return i==null||typeof i.padding!="string"?0:eL(e,"yAxis",t,r,i.padding)},q7=le(gn,F7,(e,t)=>{var r,i;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:((i=o.right)!==null&&i!==void 0?i:0)+t}}),G7=le(pn,W7,(e,t)=>{var r,i;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:((i=o.bottom)!==null&&i!==void 0?i:0)+t}}),K7=le([Kt,q7,rf,tf,(e,t,r)=>r],(e,t,r,i,o)=>{var{padding:h}=i;return o?[h.left,r.width-h.right]:[e.left+t.left,e.left+e.width-t.right]}),Y7=le([Kt,ot,G7,rf,tf,(e,t,r)=>r],(e,t,r,i,o,h)=>{var{padding:g}=o;return h?[i.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]}),rc=(e,t,r,i)=>{var o;switch(t){case"xAxis":return K7(e,r,i);case"yAxis":return Y7(e,r,i);case"zAxis":return(o=Nm(e,r))===null||o===void 0?void 0:o.range;case"angleAxis":return $A(e);case"radiusAxis":return UA(e,r);default:return}},tL=le([gr,rc],hf),V7=le([go,$7],Dj),qm=le([gr,go,V7,tL],Im),rL=(e,t,r,i)=>{if(!(r==null||r.dataKey==null)){var{type:o,scale:h}=r,g=Jn(e,i);if(g&&(o==="number"||h!=="auto"))return t.map(a=>a.value)}},Gm=le([ot,tc,ec,Yt],rL),xf=le([qm],dm);le([qm],u7);le([qm,S7],AM);le([fo,Um,Yt],A7);function iL(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Ef=(e,t)=>t,Af=(e,t,r)=>r,X7=le(Jh,Ef,Af,(e,t,r)=>e.filter(i=>i.orientation===t).filter(i=>i.mirror===r).sort(iL)),Z7=le(ef,Ef,Af,(e,t,r)=>e.filter(i=>i.orientation===t).filter(i=>i.mirror===r).sort(iL)),nL=(e,t)=>({width:e.width,height:t.height}),Q7=(e,t)=>{var r=typeof t.width=="number"?t.width:Gl;return{width:r,height:e.height}},sL=le(Kt,gn,nL),J7=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},ez=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},tz=le(dn,Kt,X7,Ef,Af,(e,t,r,i,o)=>{var h={},g;return r.forEach(a=>{var c=nL(t,a);g==null&&(g=J7(t,i,e));var f=i==="top"&&!o||i==="bottom"&&o;h[a.id]=g-Number(f)*c.height,g+=(f?-1:1)*c.height}),h}),rz=le(fn,Kt,Z7,Ef,Af,(e,t,r,i,o)=>{var h={},g;return r.forEach(a=>{var c=Q7(t,a);g==null&&(g=ez(t,i,e));var f=i==="left"&&!o||i==="right"&&o;h[a.id]=g-Number(f)*c.width,g+=(f?-1:1)*c.width}),h}),iz=(e,t)=>{var r=gn(e,t);if(r!=null)return tz(e,r.orientation,r.mirror)},nz=le([Kt,gn,iz,(e,t)=>t],(e,t,r,i)=>{if(t!=null){var o=r==null?void 0:r[i];return o==null?{x:e.left,y:0}:{x:e.left,y:o}}}),sz=(e,t)=>{var r=pn(e,t);if(r!=null)return rz(e,r.orientation,r.mirror)},az=le([Kt,pn,sz,(e,t)=>t],(e,t,r,i)=>{if(t!=null){var o=r==null?void 0:r[i];return o==null?{x:0,y:e.top}:{x:o,y:e.top}}}),aL=le(Kt,pn,(e,t)=>{var r=typeof t.width=="number"?t.width:Gl;return{width:r,height:e.height}}),Vx=(e,t,r)=>{switch(t){case"xAxis":return sL(e,r).width;case"yAxis":return aL(e,r).height;default:return}},oL=(e,t,r,i)=>{if(r!=null){var{allowDuplicatedCategory:o,type:h,dataKey:g}=r,a=Jn(e,i),c=t.map(v=>v.value),f=c.filter(v=>v!=null);if(g&&a&&h==="category"&&o&&sE(f))return c}},Km=le([ot,tc,gr,Yt],oL);le([ot,g7,go,xf,Km,Gm,rc,Wm,Yt],(e,t,r,i,o,h,g,a,c)=>{if(t!=null){var f=Jn(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:i}}});var oz=(e,t,r,i,o,h,g,a,c)=>{if(!(t==null||i==null)){var f=Jn(e,c),{type:v,ticks:u,tickCount:m}=t,w=r==="scaleBand"&&typeof i.bandwidth=="function"?i.bandwidth()/2:2,C=v==="category"&&i.bandwidth?i.bandwidth()/w:0;C=c==="angleAxis"&&h!=null&&h.length>=2?Pr(h[0]-h[1])*2*C:C;var _=u||o;return _?_.map((d,y)=>{var b=g?g.indexOf(d):d,S=i.map(b);return Ze(S)?{index:y,coordinate:S+C,value:d,offset:C}:null}).filter(Mi):f&&a?a.map((d,y)=>{var b=i.map(d);return Ze(b)?{coordinate:b+C,value:d,index:y,offset:C}:null}).filter(Mi):i.ticks?i.ticks(m).map((d,y)=>{var b=i.map(d);return Ze(b)?{coordinate:b+C,value:d,index:y,offset:C}:null}).filter(Mi):i.domain().map((d,y)=>{var b=i.map(d);return Ze(b)?{coordinate:b+C,value:g?g[d]:d,index:y,offset:C}:null}).filter(Mi)}},lL=le([ot,ec,go,xf,Wm,rc,Km,Gm,Yt],oz),lz=(e,t,r,i,o,h,g)=>{if(!(t==null||r==null||i==null||i[0]===i[1])){var a=Jn(e,g),{tickCount:c}=t,f=0;return f=g==="angleAxis"&&(i==null?void 0:i.length)>=2?Pr(i[0]-i[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(Mi):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(Mi):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(Mi)}},to=le([ot,ec,xf,rc,Km,Gm,Yt],lz),ro=le(gr,xf,(e,t)=>{if(!(e==null||t==null))return Lh(Lh({},e),{},{scale:t})}),cz=le([gr,go,Fm,tL],Im),uz=le([cz],dm);le((e,t,r)=>Nm(e,r),uz,(e,t)=>{if(!(e==null||t==null))return Lh(Lh({},e),{},{scale:t})});var hz=le([ot,Jh,ef],(e,t,r)=>{switch(e){case"horizontal":return t.some(i=>i.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(i=>i.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),fz=(e,t,r)=>{var i;return(i=e.renderedTicks[t])===null||i===void 0?void 0:i[r]};le([fz],e=>{if(!(!e||e.length===0))return t=>{var r,i=1/0,o=e[0];for(var h of e){var g=Math.abs(h.coordinate-t);g<i&&(i=g,o=h)}return(r=o)===null||r===void 0?void 0:r.value}});var cL=e=>e.options.defaultTooltipEventType,uL=e=>e.options.validateTooltipEventTypes;function hL(e,t,r){if(e==null)return t;var i=e?"axis":"item";return r==null?t:r.includes(i)?i:t}function ic(e,t){var r=cL(e),i=uL(e);return hL(t,r,i)}function dz(e){return Re(t=>ic(t,e))}var fL=(e,t)=>{var r,i=Number(t);if(!(ki(i)||t==null))return i>=0?e==null||(r=e[i])===null||r===void 0?void 0:r.value:void 0},vz=e=>e.tooltip.settings,qn={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},gz={itemInteraction:{click:qn,hover:qn},axisInteraction:{click:qn,hover:qn},keyboardInteraction:qn,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}},dL=lr({name:"tooltip",initialState:gz,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:ft()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:r,next:i}=t.payload,o=ei(e).tooltipItemPayloads.indexOf(r);o>-1&&(e.tooltipItemPayloads[o]=i)},prepare:ft()},removeTooltipEntrySettings:{reducer(e,t){var r=ei(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:ft()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,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.syncInteraction.sourceViewBox=void 0,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.syncInteraction.sourceViewBox=void 0,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.syncInteraction.sourceViewBox=void 0,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:pz,replaceTooltipEntrySettings:_z,removeTooltipEntrySettings:mz,setTooltipSettingsState:yz,setActiveMouseOverItemIndex:vL,mouseLeaveItem:bz,mouseLeaveChart:gL,setActiveClickItemIndex:Sz,setMouseOverAxisIndex:pL,setMouseClickAxisIndex:wz,setSyncInteraction:xl,setKeyboardInteraction:Th}=dL.actions,Cz=dL.reducer;function Xx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Ru(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xx(Object(r),!0).forEach(function(i){xz(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xx(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function xz(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=Az(e,"string");return typeof t=="symbol"?t:t+""}function Az(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mz(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function Lz(e){return e.index!=null}var _L=(e,t,r,i)=>{if(t==null)return qn;var o=Mz(e,t,r);if(o==null)return qn;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(Lz(o)){if(h)return Ru(Ru({},o),{},{active:!0})}else if(i!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:i,graphicalItemId:void 0};return Ru(Ru({},qn),{},{coordinate:o.coordinate})};function Oz(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 Tz(e,t){var r=Oz(e),i=t[0],o=t[1];if(r===void 0)return!1;var h=Math.min(i,o),g=Math.max(i,o);return r>=h&&r<=g}function Dz(e,t,r){if(r==null||t==null)return!0;var i=Gt(e,t);return i==null||!Ti(r)?!0:Tz(i,r)}var Al=(e,t,r,i)=>{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||Dz(f,r,i)?String(c):null},mL=(e,t,r,i,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:(i.top+t)/2};default:return{x:(i.left+e)/2,y:f.coordinate}}}},yL=(e,t,r,i)=>{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,e.syncInteraction.active&&o==null)return e.tooltipItemPayloads;if(o==null&&(i!=null||e.keyboardInteraction.active)){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})},bL=e=>e.options.tooltipPayloadSearcher,po=e=>e.tooltip;function Zx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Qx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zx(Object(r),!0).forEach(function(i){Rz(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zx(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Rz(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=Pz(e,"string");return typeof t=="symbol"?t:t+""}function Pz(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Bz(e){if(typeof e=="string"||typeof e=="number")return e}function jz(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function Iz(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function Jx(e){if(typeof e=="string")return e}function Nz(e){if(!(e==null||typeof e!="object")){var t="name"in e?Bz(e.name):void 0,r="unit"in e?jz(e.unit):void 0,i="dataKey"in e?Iz(e.dataKey):void 0,o="payload"in e?e.payload:void 0,h="color"in e?Jx(e.color):void 0,g="fill"in e?Jx(e.fill):void 0;return{name:t,unit:r,dataKey:i,payload:o,color:h,fill:g}}}function zz(e,t){return e??t}var SL=(e,t,r,i,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=zz(_,a),b=Array.isArray(y)?ZE(y,f,v):y,S=(C=d==null?void 0:d.dataKey)!==null&&C!==void 0?C:i,E=d==null?void 0:d.nameKey,L;if(i&&Array.isArray(b)&&!Array.isArray(b[0])&&g==="axis"?L=Qk(b,i,o):L=h(b,t,c,E),Array.isArray(L))L.forEach(O=>{var M,D,k=Nz(O),P=k==null?void 0:k.name,R=k==null?void 0:k.dataKey,B=k==null?void 0:k.payload,U=Qx(Qx({},d),{},{name:P,unit:k==null?void 0:k.unit,color:(M=k==null?void 0:k.color)!==null&&M!==void 0?M:d==null?void 0:d.color,fill:(D=k==null?void 0:k.fill)!==null&&D!==void 0?D:d==null?void 0:d.fill});m.push(Kw({tooltipEntrySettings:U,dataKey:R,payload:B,value:Gt(B,R),name:P==null?void 0:String(P)}))});else{var x;m.push(Kw({tooltipEntrySettings:d,dataKey:S,payload:L,value:Gt(L,S),name:(x=Gt(L,E))!==null&&x!==void 0?x:d==null?void 0:d.name}))}return m},u)}},Ym=le([Ht,OM,am],EM),Hz=le([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),$z=le([Vt,uo],TM),qs=le([Hz,Ht,$z],DM,{memoizeOptions:{resultEqualityCheck:_f}}),Uz=le([qs],e=>e.filter(gf)),wL=le([qs],PM,{memoizeOptions:{resultEqualityCheck:_f}}),Fz=le([qs],e=>e.some(t=>!t.data)),$s=le([wL,_i],jM),Wz=le([Uz,_i,Ht],WA),Vm=le([$s,Ht,qs,_i,Fz,wL],IM),CL=le([Ht],$m),qz=le([Ht],e=>e.allowDataOverflow),xL=le([CL,qz],xA),Gz=le([qs],e=>e.filter(gf)),Kz=le([Wz,Gz,uf,IA],zM),Yz=le([Kz,_i,Vt,xL],HM),Vz=le([qs],kM),Xz=le([$s,Ht,Vz,Um,Vt,pj],FM,{memoizeOptions:{resultEqualityCheck:pf}}),Zz=le([WM,Vt,uo],vo),Qz=le([Zz,Vt],KM),Jz=le([qM,Vt,uo],vo),eH=le([Jz,Vt],YM),tH=le([GM,Vt,uo],vo),rH=le([tH,Vt],VM),iH=le([Qz,rH,eH],Oh),nH=le([Ht,CL,xL,Yz,Xz,iH,ot,Vt],XM),io=le([Ht,ot,$s,Vm,uf,Vt,nH],ZM),sH=le([io,Ht,Ym],QM),aH=le([Ht,io,sH,Vt],JM),EL=e=>{var t=Vt(e),r=uo(e),i=!1;return rc(e,t,r,i)},AL=le([Ht,EL],hf),oH=le([Ht,Ym,aH,AL],Im),ML=le([oH],dm),lH=le([ot,Vm,Ht,Vt],oL),cH=le([ot,Vm,Ht,Vt],rL),uH=(e,t,r,i,o,h,g,a)=>{if(t){var{type:c}=t,f=Jn(e,a);if(i){var v=r==="scaleBand"&&i.bandwidth?i.bandwidth()/2:2,u=c==="category"&&i.bandwidth?i.bandwidth()/v:0;return u=a==="angleAxis"&&o!=null&&(o==null?void 0:o.length)>=2?Pr(o[0]-o[1])*2*u:u,f&&g?g.map((m,w)=>{var C=i.map(m);return Ze(C)?{coordinate:C+u,value:m,index:w,offset:u}:null}).filter(Mi):i.domain().map((m,w)=>{var C=i.map(m);return Ze(C)?{coordinate:C+u,value:h?h[m]:m,index:w,offset:u}:null}).filter(Mi)}}},_n=le([ot,Ht,Ym,ML,EL,lH,cH,Vt],uH),Xm=le([cL,uL,vz],(e,t,r)=>hL(r.shared,e,t)),LL=e=>e.tooltip.settings.trigger,Zm=e=>e.tooltip.settings.defaultIndex,nc=le([po,Xm,LL,Zm],_L),no=le([nc,$s,eo,io],Al),OL=le([_n,no],fL),TL=le([nc],e=>{if(e)return e.dataKey}),hH=le([nc],e=>{if(e)return e.graphicalItemId}),DL=le([po,Xm,LL,Zm],yL),fH=le([fn,dn,ot,Kt,_n,Zm,DL],mL),dH=le([nc,fH],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),vH=le([nc],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),gH=le([DL,no,_i,eo,OL,bL,Xm],SL);le([gH],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function e5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function t5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?e5(Object(r),!0).forEach(function(i){pH(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e5(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function pH(e,t,r){return(t=_H(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _H(e){var t=mH(e,"string");return typeof t=="symbol"?t:t+""}function mH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var yH=()=>Re(Ht),bH=()=>{var e=yH(),t=Re(_n),r=Re(ML);return oh(!e||!r?void 0:t5(t5({},e),{},{scale:r}),t)};function r5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function ja(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?r5(Object(r),!0).forEach(function(i){SH(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):r5(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function SH(e,t,r){return(t=wH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wH(e){var t=CH(e,"string");return typeof t=="symbol"?t:t+""}function CH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xH=(e,t,r,i)=>{var o=t.find(h=>h&&h.index===r);if(o){if(e==="horizontal")return{x:o.coordinate,y:i.relativeY};if(e==="vertical")return{x:i.relativeX,y:o.coordinate}}return{x:0,y:0}},EH=(e,t,r,i)=>{var o=t.find(f=>f&&f.index===r);if(o){if(e==="centric"){var h=o.coordinate,{radius:g}=i;return ja(ja(ja({},i),sr(i.cx,i.cy,g,h)),{},{angle:h,radius:g})}var a=o.coordinate,{angle:c}=i;return ja(ja(ja({},i),sr(i.cx,i.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 AH(e,t){var{relativeX:r,relativeY:i}=e;return r>=t.left&&r<=t.left+t.width&&i>=t.top&&i<=t.top+t.height}var RL=(e,t,r,i,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(i==="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(Pr(C-w)!==Pr(_-C)){var y=[];if(Pr(_-C)===Pr(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 P=t[D+1],R=t[D-1];if(D===0&&P!=null&&e<=(k.coordinate+P.coordinate)/2||D===g-1&&R!=null&&e>(k.coordinate+R.coordinate)/2||D>0&&D<g-1&&R!=null&&P!=null&&e>(k.coordinate+R.coordinate)/2&&e<=(k.coordinate+P.coordinate)/2)return k.index}}return-1},MH=()=>Re(am),Qm=(e,t)=>t,kL=(e,t,r)=>r,Jm=(e,t,r,i)=>i,LH=le(_n,e=>Fh(e,t=>t.coordinate)),e0=le([po,Qm,kL,Jm],_L),t0=le([e0,$s,eo,io],Al),OH=(e,t,r)=>{if(t!=null){var i=po(e);return t==="axis"?r==="hover"?i.axisInteraction.hover.dataKey:i.axisInteraction.click.dataKey:r==="hover"?i.itemInteraction.hover.dataKey:i.itemInteraction.click.dataKey}},PL=le([po,Qm,kL,Jm],yL),Dh=le([fn,dn,ot,Kt,_n,Jm,PL],mL),TH=le([e0,Dh],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),BL=le([_n,t0],fL),DH=le([PL,t0,_i,eo,BL,bL,Qm],SL),RH=le([e0,t0],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),kH=(e,t,r,i,o,h,g)=>{if(!(!e||!r||!i||!o)&&AH(e,g)){var a=x6(e,t),c=RL(a,h,o,r,i),f=xH(t,o,c,e);return{activeIndex:String(c),activeCoordinate:f}}},PH=(e,t,r,i,o,h,g)=>{if(!(!e||!i||!o||!h||!r)){var a=nj(e,r);if(a){var c=E6(a,t),f=RL(c,g,h,i,o),v=EH(t,h,f,a);return{activeIndex:String(f),activeCoordinate:v}}}},BH=(e,t,r,i,o,h,g,a)=>{if(!(!e||!t||!i||!o||!h))return t==="horizontal"||t==="vertical"?kH(e,t,i,o,h,g,a):PH(e,t,r,i,o,h,g)},jH=le(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var i=e[t];if(i!=null)return r?i.panoramaElement:i.element}}),IH=le(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(i=>parseInt(i,10)).concat(Object.values(Cr)),r=Array.from(new Set(t));return r.sort((i,o)=>i-o)},{memoizeOptions:{resultEqualityCheck:Tj}});function i5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function n5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?i5(Object(r),!0).forEach(function(i){NH(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i5(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function NH(e,t,r){return(t=zH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zH(e){var t=HH(e,"string");return typeof t=="symbol"?t:t+""}function HH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var $H={},UH={zIndexMap:Object.values(Cr).reduce((e,t)=>n5(n5({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),$H)},FH=new Set(Object.values(Cr));function WH(e){return FH.has(e)}var jL=lr({name:"zIndex",initialState:UH,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:ft()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!WH(r)&&delete e.zIndexMap[r])},prepare:ft()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r,element:i,isPanorama:o}=t.payload;e.zIndexMap[r]?o?e.zIndexMap[r].panoramaElement=i:e.zIndexMap[r].element=i:e.zIndexMap[r]={consumers:0,element:o?void 0:i,panoramaElement:o?i:void 0}},prepare:ft()},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:ft()}}}),{registerZIndexPortal:qH,unregisterZIndexPortal:Cp,registerZIndexPortalElement:GH,unregisterZIndexPortalElement:KH}=jL.actions,YH=jL.reducer;function rs(e){var{zIndex:t,children:r}=e,i=oB(),o=i&&t!==void 0&&t!==0,h=zr(),g=N.useRef(void 0),a=N.useRef(new Set),c=mt(),f=Re(u=>jH(u,t,h));if(N.useLayoutEffect(()=>{if(!o){var u=a.current;u.forEach(w=>{c(Cp({zIndex:w}))}),u.clear(),g.current=void 0;return}if(a.current.has(t)||(c(qH({zIndex:t})),a.current.add(t)),f){g.current=f;var m=a.current;m.forEach(w=>{w!==t&&(c(Cp({zIndex:w})),m.delete(w))})}},[c,t,o,f]),N.useLayoutEffect(()=>{var u=a.current;return()=>{u.forEach(m=>{c(Cp({zIndex:m}))}),u.clear()}},[c]),!o)return r;var v=f??g.current;return v?$2.createPortal(r,v):null}function m_(){return m_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},m_.apply(null,arguments)}function s5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function ku(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?s5(Object(r),!0).forEach(function(i){VH(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s5(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function VH(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=ZH(e,"string");return typeof t=="symbol"?t:t+""}function ZH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function QH(e){var{cursor:t,cursorComp:r,cursorProps:i}=e;return N.isValidElement(t)?N.cloneElement(t,i):N.createElement(r,i)}function JH(e){var t,{coordinate:r,payload:i,index:o,offset:h,tooltipAxisBandSize:g,layout:a,cursor:c,tooltipEventType:f,chartName:v}=e,u=r,m=i,w=o;if(!c||!u||v!=="ScatterChart"&&f!=="axis")return null;var C,_,d;if(v==="ScatterChart")C=u,_=m8,d=Cr.cursorLine;else if(v==="BarChart")C=y8(a,u,h,g),_=yA,d=Cr.cursorRectangle;else if(a==="radial"&&lE(u)){var{cx:y,cy:b,radius:S,startAngle:E,endAngle:L}=bA(u);C={cx:y,cy:b,startAngle:E,endAngle:L,innerRadius:S,outerRadius:S},_=wA,d=Cr.cursorLine}else C={points:lj(a,u,h)},_=vA,d=Cr.cursorLine;var x=typeof c=="object"&&"className"in c?c.className:void 0,O=ku(ku(ku(ku({stroke:"#ccc",pointerEvents:"none"},h),C),k_(c)),{},{payload:m,payloadIndex:w,className:vt("recharts-tooltip-cursor",x)});return N.createElement(rs,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:d},N.createElement(QH,{cursor:c,cursorComp:_,cursorProps:O}))}function e$(e){var t=bH(),r=nB(),i=oo(),o=MH();return t==null||r==null||i==null||o==null?null:N.createElement(JH,m_({},e,{offset:r,layout:i,tooltipAxisBandSize:t,chartName:o}))}var IL=N.createContext(null),t$=()=>N.useContext(IL),xp={exports:{}},a5;function r$(){return a5||(a5=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__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 i:delete c._events[f]}function a(){this._events=new i,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 i,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})(xp)),xp.exports}var i$=r$();const n$=Qn(i$);var $l=new n$,y_="recharts.syncEvent.tooltip",o5="recharts.syncEvent.brush",s$=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!ki(r))return e[r]}},a$={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},NL=lr({name:"options",initialState:a$,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),o$=NL.reducer,{createEventEmitter:l$}=NL.actions;function c$(e){return e.tooltip.syncInteraction}var u$={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},zL=lr({name:"chartData",initialState:u$,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:i}=t.payload;r!=null&&(e.dataStartIndex=r),i!=null&&(e.dataEndIndex=i)}}}),{setChartData:l5,setDataStartEndIndexes:h$,setComputedData:bG}=zL.actions,f$=zL.reducer,d$=["x","y"];function c5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Ia(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?c5(Object(r),!0).forEach(function(i){v$(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c5(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function v$(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=p$(e,"string");return typeof t=="symbol"?t:t+""}function p$(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _$(e,t){if(e==null)return{};var r,i,o=m$(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(i=0;i<h.length;i++)r=h[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function m$(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}function y$(){var e=Re(om),t=Re(lm),r=mt(),i=Re(NA),o=Re(_n),h=oo(),g=nf(),a=Re(c=>c.rootProps.className);N.useEffect(()=>{if(e==null)return ao;var c=(f,v,u)=>{if(t!==u&&e===f){if(v.payload.active===!1){r(xl({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(i==="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=_$(w,d$),{x:y,y:b,width:S,height:E}=v.payload.sourceViewBox,L=Ia(Ia({},d),{},{x:g.x+(S?(C-y)/S:0)*g.width,y:g.y+(E?(_-b)/E:0)*g.height});r(Ia(Ia({},v),{},{payload:Ia(Ia({},v.payload),{},{coordinate:L})}))}else r(v);return}if(o!=null){var x;if(typeof i=="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=i(o,O);x=o[M]}else i==="value"&&(x=o.find(q=>String(q.value)===v.payload.label));var{coordinate:D}=v.payload;if(D==null||g==null){r(xl({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(x==null){r(xl({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:v.payload.sourceViewBox,graphicalItemId:void 0}));return}var{x:k,y:P}=D,R=Math.min(k,g.x+g.width),B=Math.min(P,g.y+g.height),U={x:h==="horizontal"?x.coordinate:R,y:h==="horizontal"?B:x.coordinate},V=xl({active:v.payload.active,coordinate:U,dataKey:v.payload.dataKey,index:String(x.index),label:v.payload.label,sourceViewBox:v.payload.sourceViewBox,graphicalItemId:v.payload.graphicalItemId});r(V)}}};return $l.on(y_,c),()=>{$l.off(y_,c)}},[a,r,t,e,i,o,h,g])}function b$(){var e=Re(om),t=Re(lm),r=mt();N.useEffect(()=>{if(e==null)return ao;var i=(o,h,g)=>{t!==g&&e===o&&r(h$(h))};return $l.on(o5,i),()=>{$l.off(o5,i)}},[r,t,e])}function S$(){var e=mt();N.useEffect(()=>{e(l$())},[e]),y$(),b$()}function w$(e,t,r,i,o,h){var g=Re(C=>OH(C,e,t)),a=Re(hH),c=Re(lm),f=Re(om),v=Re(NA),u=Re(c$),m=(u==null?void 0:u.sourceViewBox)!=null,w=nf();N.useEffect(()=>{if(!m&&f!=null&&c!=null){var C=xl({active:h,coordinate:r,dataKey:g,index:o,label:typeof i=="number"?String(i):i,sourceViewBox:w,graphicalItemId:a});$l.emit(y_,f,C,c)}},[m,r,g,a,o,i,c,f,v,h,w])}function u5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function h5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?u5(Object(r),!0).forEach(function(i){C$(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u5(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}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 i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function A$(e){return e.dataKey}function M$(e,t){return N.isValidElement(e)?N.cloneElement(e,t):typeof e=="function"?N.createElement(e,t):N.createElement(KB,t)}var f5=[],L$={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 O$(e){var t,r,i=ni(e,L$),{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}=i,O=mt(),M=typeof E=="number"?String(E):E;N.useEffect(()=>{O(yz({shared:b,trigger:S,axisId:x,active:o,defaultIndex:M}))},[O,b,S,x,o,M]);var D=nf(),k=dA(),P=dz(b),{activeIndex:R,isActive:B}=(t=Re(G=>RH(G,P,S,M)))!==null&&t!==void 0?t:{},U=Re(G=>DH(G,P,S,M)),V=Re(G=>BL(G,P,S,M)),q=Re(G=>TH(G,P,S,M)),Y=U,W=t$(),j=(r=o??B)!==null&&r!==void 0?r:!1,[H,z]=c4([Y,j]),F=P==="axis"?V:void 0;w$(P,S,q,F,R,j);var Z=L??W;if(Z==null||D==null||P==null)return null;var re=Y??f5;j||(re=f5),f&&re.length&&(re=BP(re.filter(G=>G.value!=null&&(G.hide!==!0||i.includeHidden)),m,A$));var he=re.length>0,ge=h5(h5({},i),{},{payload:re,label:F,active:j,activeIndex:R,coordinate:q,accessibilityLayer:k}),X=N.createElement(n8,{allowEscapeViewBox:h,animationDuration:g,animationEasing:a,isAnimationActive:v,active:j,coordinate:q,hasPayload:he,offset:u,position:w,reverseDirection:C,useTranslate3d:_,viewBox:D,wrapperStyle:d,lastBoundingBox:H,innerRef:z,hasPortalFromProps:!!L},M$(c,ge));return N.createElement(N.Fragment,null,$2.createPortal(X,Z),j&&N.createElement(e$,{cursor:y,tooltipEventType:P,coordinate:q,payload:re,index:R}))}var r0=e=>null;r0.displayName="Cell";function T$(e,t,r){return(t=D$(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function D$(e){var t=R$(e,"string");return typeof t=="symbol"?t:t+""}function R$(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class k${constructor(t){T$(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 i=this.cache.keys().next().value;i!=null&&this.cache.delete(i)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function d5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function P$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?d5(Object(r),!0).forEach(function(i){B$(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d5(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function B$(e,t,r){return(t=j$(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j$(e){var t=I$(e,"string");return typeof t=="symbol"?t:t+""}function I$(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var N$={cacheSize:2e3,enableCache:!0},HL=P$({},N$),v5=new k$(HL.cacheSize),z$={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},g5="recharts_measurement_span";function H$(e,t){var r=t.fontSize||"",i=t.fontFamily||"",o=t.fontWeight||"",h=t.fontStyle||"",g=t.letterSpacing||"",a=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(i,"|").concat(o,"|").concat(h,"|").concat(g,"|").concat(a)}var p5=(e,t)=>{try{var r=document.getElementById(g5);r||(r=document.createElement("span"),r.setAttribute("id",g5),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,z$,t),r.textContent="".concat(e);var i=r.getBoundingClientRect();return{width:i.width,height:i.height}}catch{return{width:0,height:0}}},Ml=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Vl.isSsr)return{width:0,height:0};if(!HL.enableCache)return p5(t,r);var i=H$(t,r),o=v5.get(i);if(o)return o;var h=p5(t,r);return v5.set(i,h),h},$L;function $$(e,t,r){return(t=U$(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function U$(e){var t=F$(e,"string");return typeof t=="symbol"?t:t+""}function F$(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _5=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,m5=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,W$=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,q$=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,G$={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},K$=["cm","mm","pt","pc","in","Q","px"];function Y$(e){return K$.includes(e)}var Ua="NaN";function V$(e,t){return e*G$[t]}class ir{static parse(t){var r,[,i,o]=(r=q$.exec(t))!==null&&r!==void 0?r:[];return i==null?ir.NaN:new ir(parseFloat(i),o??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,ki(t)&&(this.unit=""),r!==""&&!W$.test(r)&&(this.num=NaN,this.unit=""),Y$(r)&&(this.num=V$(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new ir(NaN,""):new ir(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new ir(NaN,""):new ir(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new ir(NaN,""):new ir(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new ir(NaN,""):new ir(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return ki(this.num)}}$L=ir;$$(ir,"NaN",new $L(NaN,""));function UL(e){if(e==null||e.includes(Ua))return Ua;for(var t=e;t.includes("*")||t.includes("/");){var r,[,i,o,h]=(r=_5.exec(t))!==null&&r!==void 0?r:[],g=ir.parse(i??""),a=ir.parse(h??""),c=o==="*"?g.multiply(a):g.divide(a);if(c.isNaN())return Ua;t=t.replace(_5,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,[,v,u,m]=(f=m5.exec(t))!==null&&f!==void 0?f:[],w=ir.parse(v??""),C=ir.parse(m??""),_=u==="+"?w.add(C):w.subtract(C);if(_.isNaN())return Ua;t=t.replace(m5,_.toString())}return t}var y5=/\(([^()]*)\)/;function X$(e){for(var t=e,r;(r=y5.exec(t))!=null;){var[,i]=r;t=t.replace(y5,UL(i))}return t}function Z$(e){var t=e.replace(/\s+/g,"");return t=X$(t),t=UL(t),t}function Q$(e){try{return Z$(e)}catch{return Ua}}function Ep(e){var t=Q$(e.slice(5,-1));return t===Ua?"":t}var J$=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],eU=["dx","dy","angle","className","breakAll"];function b_(){return b_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},b_.apply(null,arguments)}function b5(e,t){if(e==null)return{};var r,i,o=tU(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(i=0;i<h.length;i++)r=h[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function tU(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}var FL=/[ \f\n\r\t\v\u2028\u2029]+/,WL=e=>{var{children:t,breakAll:r,style:i}=e;try{var o=[];Nt(t)||(r?o=t.toString().split(""):o=t.toString().split(FL));var h=o.map(a=>({word:a,width:Ml(a,i).width})),g=r?0:Ml(" ",i).width;return{wordsWithComputedWidth:h,spaceWidth:g}}catch{return null}};function qL(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function rU(e){return Nt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var GL=(e,t,r,i)=>e.reduce((o,h)=>{var{word:g,width:a}=h,c=o[o.length-1];if(c&&a!=null&&(t==null||i||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},[]),KL=e=>e.reduce((t,r)=>t.width>r.width?t:r),iU="…",S5=(e,t,r,i,o,h,g,a)=>{var c=e.slice(0,t),f=WL({breakAll:r,style:i,children:c+iU});if(!f)return[!1,[]];var v=GL(f.wordsWithComputedWidth,h,g,a),u=v.length>o||KL(v).width>Number(h);return[u,v]},nU=(e,t,r,i,o)=>{var{maxLines:h,children:g,style:a,breakAll:c}=e,f=Te(h),v=String(g),u=GL(t,i,r,o);if(!f||o)return u;var m=u.length>h||KL(u).width>Number(i);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]=S5(v,b,c,a,h,i,r,o),[L]=S5(v,y,c,a,h,i,r,o);if(!S&&!L&&(w=y+1),S&&L&&(C=y-1),!S&&L){d=E;break}_++}return d||u},w5=e=>{var t=Nt(e)?[]:e.toString().split(FL);return[{words:t,width:void 0}]},sU=e=>{var{width:t,scaleToFit:r,children:i,style:o,breakAll:h,maxLines:g}=e;if((t||r)&&!Vl.isSsr){var a,c,f=WL({breakAll:h,children:i,style:o});if(f){var{wordsWithComputedWidth:v,spaceWidth:u}=f;a=v,c=u}else return w5(i);return nU({breakAll:h,children:i,maxLines:g,style:o},a,c,t,!!r)}return w5(i)},YL="#808080",aU={angle:0,breakAll:!1,capHeight:"0.71em",fill:YL,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},i0=N.forwardRef((e,t)=>{var r=ni(e,aU),{x:i,y:o,lineHeight:h,capHeight:g,fill:a,scaleToFit:c,textAnchor:f,verticalAnchor:v}=r,u=b5(r,J$),m=N.useMemo(()=>sU({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=b5(u,eU);if(!Pi(i)||!Pi(o)||m.length===0)return null;var S=Number(i)+(Te(w)?w:0),E=Number(o)+(Te(C)?C:0);if(!Ze(S)||!Ze(E))return null;var L;switch(v){case"start":L=Ep("calc(".concat(g,")"));break;case"middle":L=Ep("calc(".concat((m.length-1)/2," * -").concat(h," + (").concat(g," / 2))"));break;default:L=Ep("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(Te(D)&&Te(M)?D/M:1,")"))}return _&&x.push("rotate(".concat(_,", ").concat(S,", ").concat(E,")")),x.length&&(b.transform=x.join(" ")),N.createElement("text",b_({},ri(b),{ref:t,x:S,y:E,className:vt("recharts-text",d),textAnchor:f,fill:a.includes("url")?YL:a}),m.map((k,P)=>{var R=k.words.join(y?"":" ");return N.createElement("tspan",{x:S,dy:P===0?L:h,key:"".concat(R,"-").concat(P)},R)}))});i0.displayName="Text";function C5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Ai(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?C5(Object(r),!0).forEach(function(i){oU(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C5(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function oU(e,t,r){return(t=lU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lU(e){var t=cU(e,"string");return typeof t=="symbol"?t:t+""}function cU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var uU=e=>{var{viewBox:t,position:r,offset:i=0,parentViewBox:o}=e,{x:h,y:g,height:a,upperWidth:c,lowerWidth:f}=Z_(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=_*i,y=_>0?"end":"start",b=_>0?"start":"end",S=c>=0?1:-1,E=S*i,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 P={x:m+w+E,y:g+a/2,horizontalAnchor:x,verticalAnchor:"middle"};return O&&(P.width=Math.max(O.x+O.width-P.x,0),P.height=a),P}var R=O?{width:w,height:a}:{};return r==="insideLeft"?Ai({x:m+E,y:g+a/2,horizontalAnchor:x,verticalAnchor:"middle"},R):r==="insideRight"?Ai({x:m+w-E,y:g+a/2,horizontalAnchor:L,verticalAnchor:"middle"},R):r==="insideTop"?Ai({x:v+c/2,y:g+d,horizontalAnchor:"middle",verticalAnchor:b},R):r==="insideBottom"?Ai({x:u+f/2,y:g+a-d,horizontalAnchor:"middle",verticalAnchor:y},R):r==="insideTopLeft"?Ai({x:v+E,y:g+d,horizontalAnchor:x,verticalAnchor:b},R):r==="insideTopRight"?Ai({x:v+c-E,y:g+d,horizontalAnchor:L,verticalAnchor:b},R):r==="insideBottomLeft"?Ai({x:u+E,y:g+a-d,horizontalAnchor:x,verticalAnchor:y},R):r==="insideBottomRight"?Ai({x:u+f-E,y:g+a-d,horizontalAnchor:L,verticalAnchor:y},R):r&&typeof r=="object"&&(Te(r.x)||js(r.x))&&(Te(r.y)||js(r.y))?Ai({x:h+vi(r.x,w),y:g+vi(r.y,a),horizontalAnchor:"end",verticalAnchor:"end"},R):Ai({x:C,y:g+a/2,horizontalAnchor:"middle",verticalAnchor:"middle"},R)},hU=["labelRef"],fU=["content"];function x5(e,t){if(e==null)return{};var r,i,o=dU(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(i=0;i<h.length;i++)r=h[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function dU(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}function E5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function El(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?E5(Object(r),!0).forEach(function(i){vU(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E5(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function vU(e,t,r){return(t=gU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gU(e){var t=pU(e,"string");return typeof t=="symbol"?t:t+""}function pU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rn(){return rn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},rn.apply(null,arguments)}var VL=N.createContext(null),_U=e=>{var{x:t,y:r,upperWidth:i,lowerWidth:o,width:h,height:g,children:a}=e,c=N.useMemo(()=>({x:t,y:r,upperWidth:i,lowerWidth:o,width:h,height:g}),[t,r,i,o,h,g]);return N.createElement(VL.Provider,{value:c},a)},XL=()=>{var e=N.useContext(VL),t=nf();return e||(t?Z_(t):void 0)},mU=N.createContext(null),yU=()=>{var e=N.useContext(mU),t=Re(FA);return e||t},bU=e=>{var{value:t,formatter:r}=e,i=Nt(e.children)?t:e.children;return typeof r=="function"?r(i):i},n0=e=>e!=null&&typeof e=="function",SU=(e,t)=>{var r=Pr(t-e),i=Math.min(Math.abs(t-e),360);return r*i},wU=(e,t,r,i,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,_=SU(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=sr(a,c,C,y),E=sr(a,c,C,y+(b?1:-1)*359),L="M".concat(S.x,",").concat(S.y,`
|
|
189
|
-
A`).concat(C,",").concat(C,",0,1,").concat(b?0:1,`,
|
|
190
|
-
`).concat(E.x,",").concat(E.y),x=Nt(e.id)?Ll("recharts-radial-line-"):e.id;return N.createElement("text",rn({},i,{dominantBaseline:"central",className:vt("recharts-radial-bar-label",g)}),N.createElement("defs",null,N.createElement("path",{id:x,d:L})),N.createElement("textPath",{xlinkHref:"#".concat(x)},r))},CU=(e,t,r)=>{var{cx:i,cy:o,innerRadius:h,outerRadius:g,startAngle:a,endAngle:c}=e,f=(a+c)/2;if(r==="outside"){var{x:v,y:u}=sr(i,o,g+t,f);return{x:v,y:u,textAnchor:v>=i?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:i,y:o,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:i,y:o,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:i,y:o,textAnchor:"middle",verticalAnchor:"end"};var m=(h+g)/2,{x:w,y:C}=sr(i,o,m,f);return{x:w,y:C,textAnchor:"middle",verticalAnchor:"middle"}},$u=e=>e!=null&&"cx"in e&&Te(e.cx),xU={angle:0,offset:5,zIndex:Cr.label,position:"middle",textBreakAll:!1};function EU(e){if(!$u(e))return e;var{cx:t,cy:r,outerRadius:i}=e,o=i*2;return{x:t-i,y:r-i,width:o,upperWidth:o,lowerWidth:o,height:o}}function Wn(e){var t=ni(e,xU),{viewBox:r,parentViewBox:i,position:o,value:h,children:g,content:a,className:c="",textBreakAll:f,labelRef:v}=t,u=yU(),m=XL(),w=o==="center"?m:u??m,C,_,d;r==null?C=w:$u(r)?C=r:C=Z_(r);var y=EU(C);if(!C||Nt(h)&&Nt(g)&&!N.isValidElement(a)&&typeof a!="function")return null;var b=El(El({},t),{},{viewBox:C});if(N.isValidElement(a)){var{labelRef:S}=b,E=x5(b,hU);return N.cloneElement(a,E)}if(typeof a=="function"){var{content:L}=b,x=x5(b,fU);if(_=N.createElement(a,x),N.isValidElement(_))return _}else _=bU(t);var O=ri(t);if($u(C)){if(o==="insideStart"||o==="insideEnd"||o==="end")return wU(t,o,_,O,C);d=CU(C,t.offset,t.position)}else{if(!y)return null;var M=uU({viewBox:y,position:o,offset:t.offset,parentViewBox:$u(i)?void 0:i});d=El(El({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 N.createElement(rs,{zIndex:t.zIndex},N.createElement(i0,rn({ref:v,className:vt("recharts-label",c)},O,d,{textAnchor:qL(O.textAnchor)?O.textAnchor:d.textAnchor,breakAll:f}),_))}Wn.displayName="Label";var AU=(e,t,r)=>{if(!e)return null;var i={viewBox:t,labelRef:r};return e===!0?N.createElement(Wn,rn({key:"label-implicit"},i)):Pi(e)?N.createElement(Wn,rn({key:"label-implicit",value:e},i)):N.isValidElement(e)?e.type===Wn?N.cloneElement(e,El({key:"label-implicit"},i)):N.createElement(Wn,rn({key:"label-implicit",content:e},i)):n0(e)?N.createElement(Wn,rn({key:"label-implicit",content:e},i)):e&&typeof e=="object"?N.createElement(Wn,rn({},e,{key:"label-implicit"},i)):null};function MU(e){var{label:t,labelRef:r}=e,i=XL();return AU(t,i,r)||null}var LU=["valueAccessor"],OU=["dataKey","clockWise","id","textBreakAll","zIndex"];function Rh(){return Rh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},Rh.apply(null,arguments)}function A5(e,t){if(e==null)return{};var r,i,o=TU(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(i=0;i<h.length;i++)r=h[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function TU(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}var DU=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(rU(t))return t},ZL=N.createContext(void 0),RU=ZL.Provider,QL=N.createContext(void 0);QL.Provider;function kU(){return N.useContext(ZL)}function PU(){return N.useContext(QL)}function Uu(e){var{valueAccessor:t=DU}=e,r=A5(e,LU),{dataKey:i,clockWise:o,id:h,textBreakAll:g,zIndex:a}=r,c=A5(r,OU),f=kU(),v=PU(),u=f||v;return!u||!u.length?null:N.createElement(rs,{zIndex:a??Cr.label},N.createElement(Ri,{className:"recharts-label-list"},u.map((m,w)=>{var C,_=Nt(i)?t(m,w):Gt(m.payload,i),d=Nt(h)?{}:{id:"".concat(h,"-").concat(w)};return N.createElement(Wn,Rh({key:"label-".concat(w)},ri(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}))})))}Uu.displayName="LabelList";function BU(e){var{label:t}=e;return t?t===!0?N.createElement(Uu,{key:"labelList-implicit"}):N.isValidElement(t)||n0(t)?N.createElement(Uu,{key:"labelList-implicit",content:t}):typeof t=="object"?N.createElement(Uu,Rh({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}var jU={radiusAxis:{},angleAxis:{}},JL=lr({name:"polarAxis",initialState:jU,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:SG,removeRadiusAxis:wG,addAngleAxis:CG,removeAngleAxis:xG}=JL.actions,IU=JL.reducer;function NU(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var Ap={exports:{}},nt={};/**
|
|
191
|
-
* @license React
|
|
192
|
-
* react-is.production.js
|
|
193
|
-
*
|
|
194
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
195
|
-
*
|
|
196
|
-
* This source code is licensed under the MIT license found in the
|
|
197
|
-
* LICENSE file in the root directory of this source tree.
|
|
198
|
-
*/var M5;function zU(){if(M5)return nt;M5=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=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.suspense_list"),v=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),w=Symbol.for("react.client.reference");function C(_){if(typeof _=="object"&&_!==null){var d=_.$$typeof;switch(d){case e:switch(_=_.type,_){case r:case o:case i:case c:case f:case m:return _;default:switch(_=_&&_.$$typeof,_){case g:case a:case u:case v:return _;case h:return _;default:return d}}case t:return d}}}return nt.ContextConsumer=h,nt.ContextProvider=g,nt.Element=e,nt.ForwardRef=a,nt.Fragment=r,nt.Lazy=u,nt.Memo=v,nt.Portal=t,nt.Profiler=o,nt.StrictMode=i,nt.Suspense=c,nt.SuspenseList=f,nt.isContextConsumer=function(_){return C(_)===h},nt.isContextProvider=function(_){return C(_)===g},nt.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===e},nt.isForwardRef=function(_){return C(_)===a},nt.isFragment=function(_){return C(_)===r},nt.isLazy=function(_){return C(_)===u},nt.isMemo=function(_){return C(_)===v},nt.isPortal=function(_){return C(_)===t},nt.isProfiler=function(_){return C(_)===o},nt.isStrictMode=function(_){return C(_)===i},nt.isSuspense=function(_){return C(_)===c},nt.isSuspenseList=function(_){return C(_)===f},nt.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===r||_===o||_===i||_===c||_===f||typeof _=="object"&&_!==null&&(_.$$typeof===u||_.$$typeof===v||_.$$typeof===g||_.$$typeof===h||_.$$typeof===a||_.$$typeof===w||_.getModuleId!==void 0)},nt.typeOf=C,nt}var L5;function HU(){return L5||(L5=1,Ap.exports=zU()),Ap.exports}var $U=HU(),O5=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",T5=null,Mp=null,eO=e=>{if(e===T5&&Array.isArray(Mp))return Mp;var t=[];return N.Children.forEach(e,r=>{Nt(r)||($U.isFragment(r)?t=t.concat(eO(r.props.children)):t.push(r))}),Mp=t,T5=e,t};function UU(e,t){var r=[],i=[];return Array.isArray(t)?i=t.map(o=>O5(o)):i=[O5(t)],eO(e).forEach(o=>{var h=Ya(o,"type.displayName")||Ya(o,"type.name");h&&i.indexOf(h)!==-1&&r.push(o)}),r}var Lp={},D5;function FU(){return D5||(D5=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 i=r;for(;Object.getPrototypeOf(i)!==null;)i=Object.getPrototypeOf(i);return Object.getPrototypeOf(r)===i}e.isPlainObject=t})(Lp)),Lp}var Op,R5;function WU(){return R5||(R5=1,Op=FU().isPlainObject),Op}var qU=WU();const GU=Qn(qU);var k5,P5,B5,j5,I5;function N5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}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(i){KU(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N5(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function KU(e,t,r){return(t=YU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YU(e){var t=VU(e,"string");return typeof t=="symbol"?t:t+""}function VU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kh(){return kh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},kh.apply(null,arguments)}function bl(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var H5=(e,t,r,i,o)=>{var h=r-i,g;return g=xt(k5||(k5=bl(["M ",",",""])),e,t),g+=xt(P5||(P5=bl(["L ",",",""])),e+r,t),g+=xt(B5||(B5=bl(["L ",",",""])),e+r-h/2,t+o),g+=xt(j5||(j5=bl(["L ",",",""])),e+r-h/2-i,t+o),g+=xt(I5||(I5=bl(["L ",","," Z"])),e,t),g},XU={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},ZU=e=>{var t=ni(e,XU),{x:r,y:i,upperWidth:o,lowerWidth:h,height:g,className:a}=t,{animationEasing:c,animationDuration:f,animationBegin:v,isUpdateAnimationActive:u}=t,m=N.useRef(null),[w,C]=N.useState(-1),_=N.useRef(o),d=N.useRef(h),y=N.useRef(g),b=N.useRef(r),S=N.useRef(i),E=tm(e,"trapezoid-");if(N.useEffect(()=>{if(m.current&&m.current.getTotalLength)try{var U=m.current.getTotalLength();U&&C(U)}catch{}},[]),r!==+r||i!==+i||o!==+o||h!==+h||g!==+g||o===0&&h===0||g===0)return null;var L=vt("recharts-trapezoid",a);if(!u)return N.createElement("g",null,N.createElement("path",kh({},ri(t),{className:L,d:H5(r,i,o,h,g)})));var x=_.current,O=d.current,M=y.current,D=b.current,k=S.current,P="0px ".concat(w===-1?1:w,"px"),R="".concat(w,"px ").concat(w,"px"),B=gA(["strokeDasharray"],f,c);return N.createElement(em,{animationId:E,key:E,canBegin:w>0,duration:f,easing:c,isActive:u,begin:v},U=>{var V=nr(x,o,U),q=nr(O,h,U),Y=nr(M,g,U),W=nr(D,r,U),j=nr(k,i,U);m.current&&(_.current=V,d.current=q,y.current=Y,b.current=W,S.current=j);var H=U>0?{transition:B,strokeDasharray:R}:{strokeDasharray:P};return N.createElement("path",kh({},ri(t),{className:L,d:H5(W,j,V,q,Y),ref:m,style:z5(z5({},H),t.style)}))})},QU=["option","shapeType","activeClassName","inActiveClassName"];function JU(e,t){if(e==null)return{};var r,i,o=e9(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(i=0;i<h.length;i++)r=h[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function e9(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}function $5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Ph(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$5(Object(r),!0).forEach(function(i){t9(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$5(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function t9(e,t,r){return(t=r9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r9(e){var t=i9(e,"string");return typeof t=="symbol"?t:t+""}function i9(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function n9(e,t){return Ph(Ph({},t),e)}function s9(e,t){return e==="symbols"}function U5(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return N.createElement(yA,r);case"trapezoid":return N.createElement(ZU,r);case"sector":return N.createElement(wA,r);case"symbols":if(s9(t))return N.createElement(oE,r);break;case"curve":return N.createElement(vA,r);default:return null}}function a9(e){return N.isValidElement(e)?e.props:e}function o9(e){var{option:t,shapeType:r,activeClassName:i="recharts-active-shape",inActiveClassName:o="recharts-shape"}=e,h=JU(e,QU),g;if(N.isValidElement(t))g=N.cloneElement(t,Ph(Ph({},h),a9(t)));else if(typeof t=="function")g=t(h,h.index);else if(GU(t)&&typeof t!="boolean"){var a=n9(t,h);g=N.createElement(U5,{shapeType:r,elementProps:a})}else{var c=h;g=N.createElement(U5,{shapeType:r,elementProps:c})}return h.isActive?N.createElement(Ri,{className:i},g):N.createElement(Ri,{className:o},g)}var tO=(e,t,r)=>{var i=mt();return(o,h)=>g=>{e==null||e(o,h,g),i(vL({activeIndex:String(h),activeDataKey:t,activeCoordinate:o.tooltipPosition,activeGraphicalItemId:r}))}},rO=e=>{var t=mt();return(r,i)=>o=>{e==null||e(r,i,o),t(bz())}},iO=(e,t,r)=>{var i=mt();return(o,h)=>g=>{e==null||e(o,h,g),i(Sz({activeIndex:String(h),activeDataKey:t,activeCoordinate:o.tooltipPosition,activeGraphicalItemId:r}))}};function l9(e){var{tooltipEntrySettings:t}=e,r=mt(),i=zr(),o=N.useRef(null);return N.useLayoutEffect(()=>{i||(o.current===null?r(pz(t)):o.current!==t&&r(_z({prev:o.current,next:t})),o.current=t)},[t,r,i]),N.useLayoutEffect(()=>()=>{o.current&&(r(mz(o.current)),o.current=null)},[r]),null}function c9(e){var{legendPayload:t}=e,r=mt(),i=zr(),o=N.useRef(null);return N.useLayoutEffect(()=>{i||(o.current===null?r(bB(t)):o.current!==t&&r(SB({prev:o.current,next:t})),o.current=t)},[r,i,t]),N.useLayoutEffect(()=>()=>{o.current&&(r(wB(o.current)),o.current=null)},[r]),null}var Tp,u9=()=>{var[e]=N.useState(()=>Ll("uid-"));return e},h9=(Tp=iR.useId)!==null&&Tp!==void 0?Tp:u9;function f9(e,t){var r=h9();return t||(e?"".concat(e,"-").concat(r):r)}var d9=N.createContext(void 0),v9=e=>{var{id:t,type:r,children:i}=e,o=f9("recharts-".concat(r),t);return N.createElement(d9.Provider,{value:o},i(o))},g9={cartesianItems:[],polarItems:[]},nO=lr({name:"graphicalItems",initialState:g9,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:ft()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:i}=t.payload,o=ei(e).cartesianItems.indexOf(r);o>-1&&(e.cartesianItems[o]=i)},prepare:ft()},removeCartesianGraphicalItem:{reducer(e,t){var r=ei(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:ft()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:ft()},removePolarGraphicalItem:{reducer(e,t){var r=ei(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:ft()},replacePolarGraphicalItem:{reducer(e,t){var{prev:r,next:i}=t.payload,o=ei(e).polarItems.indexOf(r);o>-1&&(e.polarItems[o]=i)},prepare:ft()}}}),{addCartesianGraphicalItem:p9,replaceCartesianGraphicalItem:_9,removeCartesianGraphicalItem:m9,addPolarGraphicalItem:EG,removePolarGraphicalItem:AG,replacePolarGraphicalItem:MG}=nO.actions,y9=nO.reducer,b9=e=>{var t=mt(),r=N.useRef(null);return N.useLayoutEffect(()=>{r.current===null?t(p9(e)):r.current!==e&&t(_9({prev:r.current,next:e})),r.current=e},[t,e]),N.useLayoutEffect(()=>()=>{r.current&&(t(m9(r.current)),r.current=null)},[t]),null},S9=N.memo(b9);function F5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function W5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?F5(Object(r),!0).forEach(function(i){w9(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F5(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function w9(e,t,r){return(t=C9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function C9(e){var t=x9(e,"string");return typeof t=="symbol"?t:t+""}function x9(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sO=0,E9={xAxis:{},yAxis:{},zAxis:{}},aO=lr({name:"cartesianAxis",initialState:E9,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:ft()},replaceXAxis:{reducer(e,t){var{prev:r,next:i}=t.payload;e.xAxis[r.id]!==void 0&&(r.id!==i.id&&delete e.xAxis[r.id],e.xAxis[i.id]=i)},prepare:ft()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:ft()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:ft()},replaceYAxis:{reducer(e,t){var{prev:r,next:i}=t.payload;e.yAxis[r.id]!==void 0&&(r.id!==i.id&&delete e.yAxis[r.id],e.yAxis[i.id]=i)},prepare:ft()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:ft()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:ft()},replaceZAxis:{reducer(e,t){var{prev:r,next:i}=t.payload;e.zAxis[r.id]!==void 0&&(r.id!==i.id&&delete e.zAxis[r.id],e.zAxis[i.id]=i)},prepare:ft()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:ft()},updateYAxisWidth(e,t){var{id:r,width:i}=t.payload,o=e.yAxis[r];if(o){var h,g=o.widthHistory||[];if(g.length===3&&g[0]===g[2]&&i===g[1]&&i!==o.width&&Math.abs(i-((h=g[0])!==null&&h!==void 0?h:0))<=1)return;var a=[...g,i].slice(-3);e.yAxis[r]=W5(W5({},o),{},{width:i,widthHistory:a})}}}}),{addXAxis:A9,replaceXAxis:M9,removeXAxis:L9,addYAxis:O9,replaceYAxis:T9,removeYAxis:D9,addZAxis:LG,replaceZAxis:OG,removeZAxis:TG,updateYAxisWidth:R9}=aO.actions,k9=aO.reducer,P9=le([Kt],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),B9=le([P9,fn,dn],(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)}}),oO=()=>Re(B9),q5=(e,t,r)=>{var i=r??e;if(!Nt(i))return vi(i,t,0)},j9=(e,t,r)=>{var i={},o=e.filter(gf),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},i),a=Object.entries(g).map(f=>{var v,[u,m]=f,w=m.map(_=>_.dataKey),C=q5(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=q5(t,r,f.barSize);return{stackId:void 0,dataKeys:v,barSize:u}});return[...a,...c]};function G5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Pu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?G5(Object(r),!0).forEach(function(i){I9(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G5(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function I9(e,t,r){return(t=N9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function N9(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 i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function H9(e,t,r,i,o){var h,g=i.length;if(!(g<1)){var a=vi(e,r,0,!0),c,f=[];if(Ze((h=i[0])===null||h===void 0?void 0:h.barSize)){var v=!1,u=r/g,m=i.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=i.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=i.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 $9=(e,t,r,i,o,h,g)=>{var a=Nt(g)?t:g,c=H9(r,i,o!==h?o:h,e,a);return o!==h&&c!=null&&(c=c.map(f=>Pu(Pu({},f),{},{position:Pu(Pu({},f.position),{},{offset:f.position.offset-o/2})}))),c},U9=(e,t)=>{var r=fm(t);if(!(!e||r==null||t==null)){var{stackId:i}=t;if(i!=null){var o=e[i];if(o){var{stackedData:h}=o;if(h)return h.find(g=>g.key===r)}}}},F9=(e,t)=>{if(!(e==null||t==null)){var r=e.find(i=>i.stackId===t.stackId&&t.dataKey!=null&&i.dataKeys.includes(t.dataKey));if(r!=null)return r.position}};function W9(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&Ze(e.zIndex)?e.zIndex:t}var q9=e=>{var{chartData:t}=e,r=mt(),i=zr();return N.useEffect(()=>i?()=>{}:(r(l5(t)),()=>{r(l5(void 0))}),[t,r,i]),null},K5={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},lO=lr({name:"brush",initialState:K5,reducers:{setBrushSettings(e,t){return t.payload==null?K5:t.payload}}}),{setBrushSettings:DG}=lO.actions,G9=lO.reducer;function K9(e){return(e%180+180)%180}var Y9=function(t){var{width:r,height:i}=t,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,h=K9(o),g=h*Math.PI/180,a=Math.atan(i/r),c=g>a&&g<Math.PI-a?i/Math.sin(g):r/Math.cos(g);return Math.abs(c)},V9={dots:[],areas:[],lines:[]},cO=lr({name:"referenceElements",initialState:V9,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=ei(e).dots.findIndex(i=>i===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=ei(e).areas.findIndex(i=>i===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=ei(e).lines.findIndex(i=>i===t.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:RG,removeDot:kG,addArea:PG,removeArea:BG,addLine:jG,removeLine:IG}=cO.actions,X9=cO.reducer,Z9=N.createContext(void 0),Q9=e=>{var{children:t}=e,[r]=N.useState("".concat(Ll("recharts"),"-clip")),i=oO();if(i==null)return null;var{x:o,y:h,width:g,height:a}=i;return N.createElement(Z9.Provider,{value:r},N.createElement("defs",null,N.createElement("clipPath",{id:r},N.createElement("rect",{x:o,y:h,height:a,width:g}))),t)};function uO(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],i=0;i<e.length;i+=t){var o=e[i];o!==void 0&&r.push(o)}return r}function J9(e,t,r){var i={width:e.width+t.width,height:e.height+t.height};return Y9(i,r)}function eF(e,t,r){var i=r==="width",{x:o,y:h,width:g,height:a}=e;return t===1?{start:i?o:h,end:i?o+g:h+a}:{start:i?o+g:h+a,end:i?o:h}}function Ul(e,t,r,i,o){if(e*t<e*i||e*t>e*o)return!1;var h=r();return e*(t-e*h/2-i)>=0&&e*(t+e*h/2-o)<=0}function tF(e,t){return uO(e,t+1)}function rF(e,t,r,i,o){for(var h=(i||[]).slice(),{start:g,end:a}=t,c=0,f=1,v=g,u=function(){var C=i==null?void 0:i[c];if(C===void 0)return{v:uO(i,f)};var _=c,d,y=()=>(d===void 0&&(d=r(C,_)),d),b=C.coordinate,S=c===0||Ul(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 iF(e,t,r,i,o){var h=(i||[]).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=i[_];if(E==null)return 0;var L=_,x,O=()=>(x===void 0&&(x=r(E,L)),x),M=E.coordinate,D=_===v||Ul(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=i[y];b!=null&&d.push(b)}return d}}return[]}function Y5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function or(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Y5(Object(r),!0).forEach(function(i){nF(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y5(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function nF(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=aF(e,"string");return typeof t=="symbol"?t:t+""}function aF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oF(e,t,r,i,o){for(var h=(i||[]).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=Ul(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 lF(e,t,r,i,o,h){var g=(i||[]).slice(),a=g.length,{start:c,end:f}=t;if(h){var v=i[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=Ul(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=Ul(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 cF(e,t,r){var{tick:i,ticks:o,viewBox:h,minTickGap:g,orientation:a,interval:c,tickFormatter:f,unit:v,angle:u}=e;if(!o||!o.length||!i)return[];if(Te(c)||Vl.isSsr){var m;return(m=tF(o,Te(c)?c:0))!==null&&m!==void 0?m:[]}var w=[],C=a==="top"||a==="bottom"?"width":"height",_=v&&C==="width"?Ml(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"?J9(Ml(O,{fontSize:t,letterSpacing:r}),_,u):Ml(O,{fontSize:t,letterSpacing:r})[C]},y=o[0],b=o[1],S=o.length>=2&&y!=null&&b!=null?Pr(b.coordinate-y.coordinate):1,E=eF(h,S,C);return c==="equidistantPreserveStart"?rF(S,E,d,o,g):c==="equidistantPreserveEnd"?iF(S,E,d,o,g):(c==="preserveStart"||c==="preserveStartEnd"?w=lF(S,E,d,o,g,c==="preserveStartEnd"):w=oF(S,E,d,o,g),w.filter(L=>L.isShow))}var uF=e=>{var{ticks:t,label:r,labelGapWithTick:i=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?i:0);return Math.round(f)}return 0},hF={xAxis:{},yAxis:{}},hO=lr({name:"renderedTicks",initialState:hF,reducers:{setRenderedTicks:(e,t)=>{var{axisType:r,axisId:i,ticks:o}=t.payload;e[r][i]=o},removeRenderedTicks:(e,t)=>{var{axisType:r,axisId:i}=t.payload;delete e[r][i]}}}),{setRenderedTicks:fF,removeRenderedTicks:dF}=hO.actions,vF=hO.reducer,gF=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function pF(e,t){if(e==null)return{};var r,i,o=_F(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(i=0;i<h.length;i++)r=h[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _F(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}function Us(){return Us=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},Us.apply(null,arguments)}function V5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Ct(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?V5(Object(r),!0).forEach(function(i){mF(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V5(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function mF(e,t,r){return(t=yF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yF(e){var t=bF(e,"string");return typeof t=="symbol"?t:t+""}function bF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ps={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:Cr.axis};function SF(e){var{x:t,y:r,width:i,height:o,orientation:h,mirror:g,axisLine:a,otherSvgProps:c}=e;if(!a)return null;var f=Ct(Ct(Ct({},c),Vn(a)),{},{fill:"none"});if(h==="top"||h==="bottom"){var v=+(h==="top"&&!g||h==="bottom"&&g);f=Ct(Ct({},f),{},{x1:t,y1:r+v*o,x2:t+i,y2:r+v*o})}else{var u=+(h==="left"&&!g||h==="right"&&g);f=Ct(Ct({},f),{},{x1:t+u*i,y1:r,x2:t+u*i,y2:r+o})}return N.createElement("line",Us({},f,{className:vt("recharts-cartesian-axis-line",Ya(a,"className"))}))}function wF(e,t,r,i,o,h,g,a,c){var f,v,u,m,w,C,_=a?-1:1,d=e.tickSize||g,y=Te(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*i,f=v-_*d,w=f-_*c,C=y;break;case"right":u=m=e.coordinate,v=t+ +a*i,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 CF(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function xF(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function EF(e){var{option:t,tickProps:r,value:i}=e,o,h=vt(r.className,"recharts-cartesian-axis-tick-value");if(N.isValidElement(t))o=N.cloneElement(t,Ct(Ct({},r),{},{className:h}));else if(typeof t=="function")o=t(Ct(Ct({},r),{},{className:h}));else{var g="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(g=vt(g,NU(t))),o=N.createElement(i0,Us({},r,{className:g}),i)}return o}function AF(e){var{ticks:t,axisType:r,axisId:i}=e,o=mt();return N.useEffect(()=>{if(i==null||r==null)return ao;var h=t.map(g=>({value:g.value,coordinate:g.coordinate,offset:g.offset,index:g.index}));return o(fF({ticks:h,axisId:i,axisType:r})),()=>{o(dF({axisId:i,axisType:r}))}},[o,t,i,r]),null}var MF=N.forwardRef((e,t)=>{var{ticks:r=[],tick:i,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,axisId:O}=e,M=cF(Ct(Ct({},E),{},{ticks:r}),b,S),D=Vn(E),k=k_(i),P=qL(D.textAnchor)?D.textAnchor:CF(v,u),R=xF(v,u),B={};typeof o=="object"&&(B=o);var U=Ct(Ct({},D),{},{fill:"none"},B),V=M.map(W=>Ct({entry:W},wF(W,m,w,C,_,v,d,u,y))),q=V.map(W=>{var{entry:j,line:H}=W;return N.createElement(Ri,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(j.value,"-").concat(j.coordinate,"-").concat(j.tickCoord)},o&&N.createElement("line",Us({},U,H,{className:vt("recharts-cartesian-axis-tick-line",Ya(o,"className"))})))}),Y=V.map((W,j)=>{var H,z,{entry:F,tick:Z}=W,re=Ct(Ct(Ct(Ct({verticalAnchor:R},D),{},{textAnchor:P,stroke:"none",fill:h},Z),{},{index:j,payload:F,visibleTicksCount:M.length,tickFormatter:g,padding:c},f),{},{angle:(H=(z=f==null?void 0:f.angle)!==null&&z!==void 0?z:D.angle)!==null&&H!==void 0?H:0}),he=Ct(Ct({},re),k);return N.createElement(Ri,Us({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(F.value,"-").concat(F.coordinate,"-").concat(F.tickCoord)},H_(L,F,j)),i&&N.createElement(EF,{option:i,tickProps:he,value:"".concat(typeof g=="function"?g(F.value,j):F.value).concat(a||"")}))});return N.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(x,"-ticks")},N.createElement(AF,{ticks:M,axisId:O,axisType:x}),Y.length>0&&N.createElement(rs,{zIndex:Cr.label},N.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(x,"-tick-labels"),ref:t},Y)),q.length>0&&N.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(x,"-tick-lines")},q))}),LF=N.forwardRef((e,t)=>{var{axisLine:r,width:i,height:o,className:h,hide:g,ticks:a,axisType:c,axisId:f}=e,v=pF(e,gF),[u,m]=N.useState(""),[w,C]=N.useState(""),_=N.useRef(null);N.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var y;return uF({ticks:_.current,label:(y=e.labelRef)===null||y===void 0?void 0:y.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var d=N.useCallback(y=>{if(y){var b=y.getElementsByClassName("recharts-cartesian-axis-tick-value");_.current=b;var S=b[0];if(S){var E=window.getComputedStyle(S),L=E.fontSize,x=E.letterSpacing;(L!==u||x!==w)&&(m(L),C(x))}}},[u,w]);return g||i!=null&&i<=0||o!=null&&o<=0?null:N.createElement(rs,{zIndex:e.zIndex},N.createElement(Ri,{className:vt("recharts-cartesian-axis",h)},N.createElement(SF,{x:e.x,y:e.y,width:i,height:o,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:Vn(e)}),N.createElement(MF,{ref:d,axisType:c,events:v,fontSize:u,getTicksConfig:e,height:e.height,letterSpacing:w,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,axisId:f}),N.createElement(_U,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},N.createElement(MU,{label:e.label,labelRef:e.labelRef}),e.children)))}),s0=N.forwardRef((e,t)=>{var r=ni(e,Ps);return N.createElement(LF,Us({},r,{ref:t}))});s0.displayName="CartesianAxis";var OF={},fO=lr({name:"errorBars",initialState:OF,reducers:{addErrorBar:(e,t)=>{var{itemId:r,errorBar:i}=t.payload;e[r]||(e[r]=[]),e[r].push(i)},replaceErrorBar:(e,t)=>{var{itemId:r,prev:i,next:o}=t.payload;e[r]&&(e[r]=e[r].map(h=>h.dataKey===i.dataKey&&h.direction===i.direction?o:h))},removeErrorBar:(e,t)=>{var{itemId:r,errorBar:i}=t.payload;e[r]&&(e[r]=e[r].filter(o=>o.dataKey!==i.dataKey||o.direction!==i.direction))}}}),{addErrorBar:NG,replaceErrorBar:zG,removeErrorBar:HG}=fO.actions,TF=fO.reducer,DF=["children"];function RF(e,t){if(e==null)return{};var r,i,o=kF(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(i=0;i<h.length;i++)r=h[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function kF(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}var PF={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},BF=N.createContext(PF);function jF(e){var{children:t}=e,r=RF(e,DF);return N.createElement(BF.Provider,{value:r},t)}function dO(e,t){var r,i,o=Re(f=>gn(f,e)),h=Re(f=>pn(f,t)),g=(r=o==null?void 0:o.allowDataOverflow)!==null&&r!==void 0?r:Bt.allowDataOverflow,a=(i=h==null?void 0:h.allowDataOverflow)!==null&&i!==void 0?i:jt.allowDataOverflow,c=g||a;return{needClip:c,needClipX:g,needClipY:a}}function IF(e){var{xAxisId:t,yAxisId:r,clipPathId:i}=e,o=oO(),{needClipX:h,needClipY:g,needClip:a}=dO(t,r);if(!a||!o)return null;var{x:c,y:f,width:v,height:u}=o;return N.createElement("clipPath",{id:"clipPath-".concat(i)},N.createElement("rect",{x:h?c:c-v/2,y:g?f:f-u/2,width:h?v:v*2,height:g?u:u*2}))}function Gs(e,t){var r,i;return(r=(i=e.graphicalItems.cartesianItems.find(o=>o.id===t))===null||i===void 0?void 0:i.xAxisId)!==null&&r!==void 0?r:sO}function Ks(e,t){var r,i;return(r=(i=e.graphicalItems.cartesianItems.find(o=>o.id===t))===null||i===void 0?void 0:i.yAxisId)!==null&&r!==void 0?r:sO}var NF="Invariant failed";function zF(e,t){throw new Error(NF)}function S_(){return S_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},S_.apply(null,arguments)}function a0(e){return N.createElement(o9,S_({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},e))}var HF=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(i,o)=>{if(Te(t))return t;var h=Te(i)||Nt(i);return h?t(i,o):(h||zF(),r)}},$F=(e,t,r)=>r,UF=(e,t)=>t,sc=le([zm,UF],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),FF=le([sc],e=>e==null?void 0:e.maxBarSize),WF=(e,t,r,i)=>i,qF=le([ot,zm,Gs,Ks,$F],(e,t,r,i,o)=>t.filter(h=>e==="horizontal"?h.xAxisId===r:h.yAxisId===i).filter(h=>h.isPanorama===o).filter(h=>h.hide===!1).filter(h=>h.type==="bar")),GF=(e,t,r)=>{var i=ot(e),o=Gs(e,t),h=Ks(e,t);if(!(o==null||h==null))return i==="horizontal"?__(e,"yAxis",h,r):__(e,"xAxis",o,r)},KF=(e,t)=>{var r=ot(e),i=Gs(e,t),o=Ks(e,t);if(!(i==null||o==null))return r==="horizontal"?Vx(e,"xAxis",i):Vx(e,"yAxis",o)},YF=le([qF,Cj,KF],j9),VF=(e,t,r)=>{var i,o,h=sc(e,t);if(h==null)return 0;var g=Gs(e,t),a=Ks(e,t);if(g==null||a==null)return 0;var c=ot(e),f=BA(e),{maxBarSize:v}=h,u=Nt(v)?f:v,m,w;return c==="horizontal"?(m=ro(e,"xAxis",g,r),w=to(e,"xAxis",g,r)):(m=ro(e,"yAxis",a,r),w=to(e,"yAxis",a,r)),(i=(o=oh(m,w,!0))!==null&&o!==void 0?o:u)!==null&&i!==void 0?i:0},vO=(e,t,r)=>{var i=ot(e),o=Gs(e,t),h=Ks(e,t);if(!(o==null||h==null)){var g,a;return i==="horizontal"?(g=ro(e,"xAxis",o,r),a=to(e,"xAxis",o,r)):(g=ro(e,"yAxis",h,r),a=to(e,"yAxis",h,r)),oh(g,a)}},XF=le([YF,BA,wj,jA,VF,vO,FF],$9),ZF=(e,t,r)=>{var i=Gs(e,t);if(i!=null)return ro(e,"xAxis",i,r)},QF=(e,t,r)=>{var i=Ks(e,t);if(i!=null)return ro(e,"yAxis",i,r)},JF=(e,t,r)=>{var i=Gs(e,t);if(i!=null)return to(e,"xAxis",i,r)},eW=(e,t,r)=>{var i=Ks(e,t);if(i!=null)return to(e,"yAxis",i,r)},tW=le([XF,sc],F9),rW=le([GF,sc],U9),iW=le([Kt,V_,ZF,QF,JF,eW,tW,ot,vj,vO,rW,sc,WF],(e,t,r,i,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||i==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 DW({layout:a,barSettings:u,pos:g,parentViewBox:t,bandSize:f,xAxis:r,yAxis:i,xAxisTicks:o,yAxisTicks:h,stackedData:v,displayedData:y,offset:e,cells:m,dataStartIndex:C})}}),nW=["index"];function w_(){return w_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},w_.apply(null,arguments)}function sW(e,t){if(e==null)return{};var r,i,o=aW(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(i=0;i<h.length;i++)r=h[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function aW(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}var gO=N.createContext(void 0),oW=e=>{var t=N.useContext(gO);if(t!=null)return t.stackId;if(e!=null)return y6(e)},lW=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),cW=e=>{var t=N.useContext(gO);if(t!=null){var{stackId:r}=t;return"url(#".concat(lW(r,e),")")}},pO=e=>{var{index:t}=e,r=sW(e,nW),i=cW(t);return N.createElement(Ri,w_({className:"recharts-bar-stack-layer",clipPath:i},r))},uW=["onMouseEnter","onMouseLeave","onClick"],hW=["value","background","tooltipPosition"],fW=["id"],dW=["onMouseEnter","onClick","onMouseLeave"];function Zn(){return Zn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},Zn.apply(null,arguments)}function X5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function hr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?X5(Object(r),!0).forEach(function(i){vW(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X5(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function vW(e,t,r){return(t=gW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gW(e){var t=pW(e,"string");return typeof t=="symbol"?t:t+""}function pW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Bh(e,t){if(e==null)return{};var r,i,o=_W(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(i=0;i<h.length;i++)r=h[i],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 i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}var mW=e=>{var{dataKey:t,name:r,fill:i,legendType:o,hide:h}=e;return[{inactive:h,dataKey:t,type:o,color:i,value:QE(r,t),payload:e}]},yW=N.memo(e=>{var{dataKey:t,stroke:r,strokeWidth:i,fill:o,name:h,hide:g,unit:a,tooltipType:c,id:f}=e,v={dataDefinedOnItem:void 0,getPosition:ao,settings:{stroke:r,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:QE(h,t),hide:g,type:c,color:o,unit:a,graphicalItemId:f}};return N.createElement(l9,{tooltipEntrySettings:v})});function bW(e){var t=Re(no),{data:r,dataKey:i,background:o,allOtherBarProps:h}=e,{onMouseEnter:g,onMouseLeave:a,onClick:c}=h,f=Bh(h,uW),v=tO(g,i,h.id),u=rO(a),m=iO(c,i,h.id);if(!o||r==null)return null;var w=k_(o);return N.createElement(rs,{zIndex:W9(o,Cr.barBackground)},r.map((C,_)=>{var{value:d,background:y,tooltipPosition:b}=C,S=Bh(C,hW);if(!y)return null;var E=v(C,_),L=u(C,_),x=m(C,_),O=hr(hr(hr(hr(hr({option:o,isActive:String(_)===t},S),{},{fill:"#eee"},y),w),H_(f,C,_)),{},{onMouseEnter:E,onMouseLeave:L,onClick:x,dataKey:i,index:_,className:"recharts-bar-background-rectangle"});return N.createElement(a0,Zn({key:"background-bar-".concat(_)},O))}))}function SW(e){var{showLabels:t,children:r,rects:i}=e,o=i==null?void 0:i.map(h=>{var g={x:h.x,y:h.y,width:h.width,lowerWidth:h.width,upperWidth:h.width,height:h.height};return hr(hr({},g),{},{value:h.value,payload:h.payload,parentViewBox:h.parentViewBox,viewBox:g,fill:h.fill})});return N.createElement(RU,{value:t?o:void 0},r)}function wW(e){var{shape:t,activeBar:r,baseProps:i,entry:o,index:h,dataKey:g}=e,a=Re(no),c=Re(TL),f=r&&String(o.originalDataIndex)===a&&(c==null||g===c),[v,u]=N.useState(!1),[m,w]=N.useState(!1);N.useEffect(()=>{var S;return f?(u(!0),S=requestAnimationFrame(()=>{w(!0)})):w(!1),()=>{cancelAnimationFrame(S)}},[f]);var C=N.useCallback(()=>{f||u(!1)},[f]),_=f&&m,d=f||v,y;f?r===!0?y=t:y=r:y=t;var b=N.createElement(a0,Zn({},i,{name:String(i.name)},o,{isActive:_,option:y,index:h,dataKey:g,onTransitionEnd:C}));return d?N.createElement(rs,{zIndex:Cr.activeBar},N.createElement(pO,{index:o.originalDataIndex},b)):b}function CW(e){var{shape:t,baseProps:r,entry:i,index:o,dataKey:h}=e;return N.createElement(a0,Zn({},r,{name:String(r.name)},i,{isActive:!1,option:t,index:o,dataKey:h}))}function xW(e){var t,{data:r,props:i}=e,o=(t=Vn(i))!==null&&t!==void 0?t:{},{id:h}=o,g=Bh(o,fW),{shape:a,dataKey:c,activeBar:f}=i,{onMouseEnter:v,onClick:u,onMouseLeave:m}=i,w=Bh(i,dW),C=tO(v,c,h),_=rO(m),d=iO(u,c,h);return r?N.createElement(N.Fragment,null,r.map((y,b)=>N.createElement(pO,Zn({index:y.originalDataIndex,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"},H_(w,y,b),{onMouseEnter:C(y,b),onMouseLeave:_(y,b),onClick:d(y,b)}),f?N.createElement(wW,{shape:a,activeBar:f,baseProps:g,entry:y,index:b,dataKey:c}):N.createElement(CW,{shape:a,baseProps:g,entry:y,index:b,dataKey:c})))):null}function EW(e){var{props:t,previousRectanglesRef:r}=e,{data:i,layout:o,isAnimationActive:h,animationBegin:g,animationDuration:a,animationEasing:c,onAnimationEnd:f,onAnimationStart:v}=t,u=r.current,m=tm(t,"recharts-bar-"),[w,C]=N.useState(!1),_=!w,d=N.useCallback(()=>{typeof f=="function"&&f(),C(!1)},[f]),y=N.useCallback(()=>{typeof v=="function"&&v(),C(!0)},[v]);return N.createElement(SW,{showLabels:_,rects:i},N.createElement(em,{animationId:m,begin:g,duration:a,isActive:h,easing:c,onAnimationEnd:d,onAnimationStart:y,key:m},b=>{var S=b===1?i:i==null?void 0:i.map((E,L)=>{var x=u&&u[L];if(x)return hr(hr({},E),{},{x:nr(x.x,E.x,b),y:nr(x.y,E.y,b),width:nr(x.width,E.width,b),height:nr(x.height,E.height,b)});if(o==="horizontal"){var O=nr(0,E.height,b),M=nr(E.stackedBarStart,E.y,b);return hr(hr({},E),{},{y:M,height:O})}var D=nr(0,E.width,b),k=nr(E.stackedBarStart,E.x,b);return hr(hr({},E),{},{width:D,x:k})});return b>0&&(r.current=S??null),S==null?null:N.createElement(Ri,null,N.createElement(xW,{props:t,data:S}))}),N.createElement(BU,{label:t.label}),t.children)}function AW(e){var t=N.useRef(null);return N.createElement(EW,{previousRectanglesRef:t,props:e})}var _O=0,MW=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:Gt(e,t)}};class LW extends N.PureComponent{render(){var{hide:t,data:r,dataKey:i,className:o,xAxisId:h,yAxisId:g,needClip:a,background:c,id:f}=this.props;if(t||r==null)return null;var v=vt("recharts-bar",o),u=f;return N.createElement(Ri,{className:v,id:f},a&&N.createElement("defs",null,N.createElement(IF,{clipPathId:u,xAxisId:h,yAxisId:g})),N.createElement(Ri,{className:"recharts-bar-rectangles",clipPath:a?"url(#clipPath-".concat(u,")"):void 0},N.createElement(bW,{data:r,dataKey:i,background:c,allOtherBarProps:this.props}),N.createElement(AW,this.props)))}}var OW={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:_O,xAxisId:0,yAxisId:0,zIndex:Cr.bar};function TW(e){var{xAxisId:t,yAxisId:r,hide:i,legendType:o,minPointSize:h,activeBar:g,animationBegin:a,animationDuration:c,animationEasing:f,isAnimationActive:v}=e,{needClip:u}=dO(t,r),m=oo(),w=zr(),C=UU(e.children,r0),_=Re(b=>iW(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,N.createElement(jF,{xAxisId:t,yAxisId:r,data:_,dataPointFormatter:MW,errorBarOffset:d},N.createElement(LW,Zn({},e,{layout:m,needClip:u,data:_,xAxisId:t,yAxisId:r,hide:i,legendType:o,minPointSize:h,activeBar:g,animationBegin:a,animationDuration:c,animationEasing:f,isAnimationActive:v})))}function DW(e){var{layout:t,barSettings:{dataKey:r,minPointSize:i,hasCustomShape:o},pos:h,bandSize:g,xAxis:a,yAxis:c,xAxisTicks:f,yAxisTicks:v,stackedData:u,displayedData:m,offset:w,cells:C,parentViewBox:_,dataStartIndex:d}=e,y=t==="horizontal"?c:a,b=u?y.scale.domain():null,S=b6({numericAxis:y}),E=y.scale.map(S);return m.map((L,x)=>{var O,M,D,k,P,R;if(u){var B=u[x+d];if(B==null)return null;O=v6(B,b)}else O=Gt(L,r),Array.isArray(O)||(O=[S,O]);var U=HF(i,_O)(O[1],x);if(t==="horizontal"){var V,q=c.scale.map(O[0]),Y=c.scale.map(O[1]);if(q==null||Y==null)return null;M=Ww({axis:a,ticks:f,bandSize:g,offset:h.offset,entry:L,index:x}),D=(V=Y??q)!==null&&V!==void 0?V:void 0,k=h.size;var W=q-Y;if(P=ki(W)?0:W,R={x:M,y:w.top,width:k,height:w.height},Math.abs(U)>0&&Math.abs(P)<Math.abs(U)){var j=Pr(P||U)*(Math.abs(U)-Math.abs(P));D-=j,P+=j}}else{var H=a.scale.map(O[0]),z=a.scale.map(O[1]);if(H==null||z==null)return null;if(M=H,D=Ww({axis:c,ticks:v,bandSize:g,offset:h.offset,entry:L,index:x}),k=z-H,P=h.size,R={x:w.left,y:D,width:w.width,height:P},Math.abs(U)>0&&Math.abs(k)<Math.abs(U)){var F=Pr(k||U)*(Math.abs(U)-Math.abs(k));k+=F}}if(M==null||D==null||k==null||P==null||!o&&(k===0||P===0))return null;var Z=hr(hr({},L),{},{stackedBarStart:E,x:M,y:D,width:k,height:P,value:u?O:O[1],payload:L,background:R,tooltipPosition:{x:M+k/2,y:D+P/2},parentViewBox:_,originalDataIndex:x},C&&C[x]&&C[x].props);return Z}).filter(Boolean)}function RW(e){var t=ni(e,OW),r=oW(t.stackId),i=zr();return N.createElement(v9,{id:t.id,type:"bar"},o=>N.createElement(N.Fragment,null,N.createElement(c9,{legendPayload:mW(t)}),N.createElement(yW,{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}),N.createElement(S9,{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:i,hasCustomShape:t.shape!=null}),N.createElement(rs,{zIndex:t.zIndex},N.createElement(TW,Zn({},t,{id:o})))))}var mO=N.memo(RW,lf);mO.displayName="Bar";var kW=["domain","range"],PW=["domain","range"];function Z5(e,t){if(e==null)return{};var r,i,o=BW(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(i=0;i<h.length;i++)r=h[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function BW(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}function Q5(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 yO(e,t){if(e===t)return!0;var{domain:r,range:i}=e,o=Z5(e,kW),{domain:h,range:g}=t,a=Z5(t,PW);return!Q5(r,h)||!Q5(i,g)?!1:lf(o,a)}var jW=["type"],IW=["dangerouslySetInnerHTML","ticks","scale"],NW=["id","scale"];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 i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},C_.apply(null,arguments)}function J5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function e2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?J5(Object(r),!0).forEach(function(i){zW(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):J5(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function zW(e,t,r){return(t=HW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HW(e){var t=$W(e,"string");return typeof t=="symbol"?t:t+""}function $W(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function x_(e,t){if(e==null)return{};var r,i,o=UW(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(i=0;i<h.length;i++)r=h[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function UW(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}function FW(e){var t=mt(),r=N.useRef(null),i=iA(),{type:o}=e,h=x_(e,jW),g=ff(i,"xAxis",o),a=N.useMemo(()=>{if(g!=null)return e2(e2({},h),{},{type:g})},[h,g]);return N.useLayoutEffect(()=>{a!=null&&(r.current===null?t(A9(a)):r.current!==a&&t(M9({prev:r.current,next:a})),r.current=a)},[a,t]),N.useLayoutEffect(()=>()=>{r.current&&(t(L9(r.current)),r.current=null)},[t]),null}var WW=e=>{var{xAxisId:t,className:r}=e,i=Re(V_),o=zr(),h="xAxis",g=Re(y=>lL(y,h,t,o)),a=Re(y=>sL(y,t)),c=Re(y=>nz(y,t)),f=Re(y=>MM(y,t));if(a==null||c==null||f==null)return null;var{dangerouslySetInnerHTML:v,ticks:u,scale:m}=e,w=x_(e,IW),{id:C,scale:_}=f,d=x_(f,NW);return N.createElement(s0,C_({},w,d,{x:c.x,y:c.y,width:a.width,height:a.height,className:vt("recharts-".concat(h," ").concat(h),r),viewBox:i,ticks:g,axisType:h,axisId:t}))},qW={allowDataOverflow:Bt.allowDataOverflow,allowDecimals:Bt.allowDecimals,allowDuplicatedCategory:Bt.allowDuplicatedCategory,angle:Bt.angle,axisLine:Ps.axisLine,height:Bt.height,hide:!1,includeHidden:Bt.includeHidden,interval:Bt.interval,label:!1,minTickGap:Bt.minTickGap,mirror:Bt.mirror,orientation:Bt.orientation,padding:Bt.padding,reversed:Bt.reversed,scale:Bt.scale,tick:Bt.tick,tickCount:Bt.tickCount,tickLine:Ps.tickLine,tickSize:Ps.tickSize,type:Bt.type,niceTicks:Bt.niceTicks,xAxisId:0},GW=e=>{var t=ni(e,qW);return N.createElement(N.Fragment,null,N.createElement(FW,{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,niceTicks:t.niceTicks}),N.createElement(WW,t))},bO=N.memo(GW,yO);bO.displayName="XAxis";var KW=["type"],YW=["dangerouslySetInnerHTML","ticks","scale"],VW=["id","scale"];function E_(){return E_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},E_.apply(null,arguments)}function t2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function r2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?t2(Object(r),!0).forEach(function(i){XW(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t2(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function XW(e,t,r){return(t=ZW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZW(e){var t=QW(e,"string");return typeof t=="symbol"?t:t+""}function QW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function A_(e,t){if(e==null)return{};var r,i,o=JW(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(i=0;i<h.length;i++)r=h[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function JW(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}function eq(e){var t=mt(),r=N.useRef(null),i=iA(),{type:o}=e,h=A_(e,KW),g=ff(i,"yAxis",o),a=N.useMemo(()=>{if(g!=null)return r2(r2({},h),{},{type:g})},[g,h]);return N.useLayoutEffect(()=>{a!=null&&(r.current===null?t(O9(a)):r.current!==a&&t(T9({prev:r.current,next:a})),r.current=a)},[a,t]),N.useLayoutEffect(()=>()=>{r.current&&(t(D9(r.current)),r.current=null)},[t]),null}function tq(e){var{yAxisId:t,className:r,width:i,label:o}=e,h=N.useRef(null),g=N.useRef(null),a=Re(V_),c=zr(),f=mt(),v="yAxis",u=Re(x=>aL(x,t)),m=Re(x=>az(x,t)),w=Re(x=>lL(x,v,t,c)),C=Re(x=>LM(x,t));if(N.useLayoutEffect(()=>{if(!(i!=="auto"||!u||n0(o)||N.isValidElement(o)||C==null)){var x=h.current;if(x){var O=x.getCalculatedWidth();Math.round(u.width)!==Math.round(O)&&f(R9({id:t,width:O}))}}},[w,u,f,o,t,i,C]),u==null||m==null||C==null)return null;var{dangerouslySetInnerHTML:_,ticks:d,scale:y}=e,b=A_(e,YW),{id:S,scale:E}=C,L=A_(C,VW);return N.createElement(s0,E_({},b,L,{ref:h,labelRef:g,x:m.x,y:m.y,tickTextProps:i==="auto"?{width:void 0}:{width:i},width:u.width,height:u.height,className:vt("recharts-".concat(v," ").concat(v),r),viewBox:a,ticks:w,axisType:v,axisId:t}))}var rq={allowDataOverflow:jt.allowDataOverflow,allowDecimals:jt.allowDecimals,allowDuplicatedCategory:jt.allowDuplicatedCategory,angle:jt.angle,axisLine:Ps.axisLine,hide:!1,includeHidden:jt.includeHidden,interval:jt.interval,label:!1,minTickGap:jt.minTickGap,mirror:jt.mirror,orientation:jt.orientation,padding:jt.padding,reversed:jt.reversed,scale:jt.scale,tick:jt.tick,tickCount:jt.tickCount,tickLine:Ps.tickLine,tickSize:Ps.tickSize,type:jt.type,niceTicks:jt.niceTicks,width:jt.width,yAxisId:0},iq=e=>{var t=ni(e,rq);return N.createElement(N.Fragment,null,N.createElement(eq,{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,niceTicks:t.niceTicks}),N.createElement(tq,t))},SO=N.memo(iq,yO);SO.displayName="YAxis";var nq=(e,t)=>t,o0=le([nq,ot,FA,Vt,AL,_n,LH,Kt],BH);function sq(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function l0(e){var t=e.currentTarget.getBoundingClientRect(),r,i;if(sq(e)){var o=e.currentTarget.getBBox();r=o.width>0?t.width/o.width:1,i=o.height>0?t.height/o.height:1}else{var h=e.currentTarget;r=h.offsetWidth>0?t.width/h.offsetWidth:1,i=h.offsetHeight>0?t.height/h.offsetHeight:1}var g=(a,c)=>({relativeX:Math.round((a-t.left)/r),relativeY:Math.round((c-t.top)/i)});return"touches"in e?Array.from(e.touches).map(a=>g(a.clientX,a.clientY)):g(e.clientX,e.clientY)}var wO=Ir("mouseClick"),CO=ql();CO.startListening({actionCreator:wO,effect:(e,t)=>{var r=e.payload,i=o0(t.getState(),l0(r));(i==null?void 0:i.activeIndex)!=null&&t.dispatch(wz({activeIndex:i.activeIndex,activeDataKey:void 0,activeCoordinate:i.activeCoordinate}))}});var M_=Ir("mouseMove"),xO=ql(),Na=null,Ss=null,Dp=null;xO.startListening({actionCreator:M_,effect:(e,t)=>{var r=e.payload,i=t.getState(),{throttleDelay:o,throttledEvents:h}=i.eventSettings,g=h==="all"||(h==null?void 0:h.includes("mousemove"));Na!==null&&(cancelAnimationFrame(Na),Na=null),Ss!==null&&(typeof o!="number"||!g)&&(clearTimeout(Ss),Ss=null),Dp=l0(r);var a=()=>{var c=t.getState(),f=ic(c,c.tooltip.settings.shared);if(!Dp){Na=null,Ss=null;return}if(f==="axis"){var v=o0(c,Dp);(v==null?void 0:v.activeIndex)!=null?t.dispatch(pL({activeIndex:v.activeIndex,activeDataKey:void 0,activeCoordinate:v.activeCoordinate})):t.dispatch(gL())}Na=null,Ss=null};if(!g){a();return}o==="raf"?Na=requestAnimationFrame(a):typeof o=="number"&&Ss===null&&(Ss=setTimeout(a,o))}});function aq(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 i2={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},EO=lr({name:"rootProps",initialState:i2,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:i2.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}}}),oq=EO.reducer,{updateOptions:lq}=EO.actions,cq=null,uq={updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)},AO=lr({name:"polarOptions",initialState:cq,reducers:uq}),{updatePolarOptions:$G}=AO.actions,hq=AO.reducer,MO=Ir("keyDown"),LO=Ir("focus"),OO=Ir("blur"),Mf=ql(),za=null,ws=null,Bu=null;Mf.startListening({actionCreator:MO,effect:(e,t)=>{Bu=e.payload,za!==null&&(cancelAnimationFrame(za),za=null);var r=t.getState(),{throttleDelay:i,throttledEvents:o}=r.eventSettings,h=o==="all"||o.includes("keydown");ws!==null&&(typeof i!="number"||!h)&&(clearTimeout(ws),ws=null);var g=()=>{try{var a=t.getState(),c=a.rootProps.accessibilityLayer!==!1;if(!c)return;var{keyboardInteraction:f}=a.tooltip,v=Bu;if(v!=="ArrowRight"&&v!=="ArrowLeft"&&v!=="Enter")return;var u=Al(f,$s(a),eo(a),io(a)),m=u==null?-1:Number(u),w=!Number.isFinite(m)||m<0,C=_n(a),_=$s(a),d=ic(a,a.tooltip.settings.shared);if(v==="Enter"){if(w)return;var y=Dh(a,d,"hover",String(f.index));t.dispatch(Th({active:!f.active,activeIndex:f.index,activeCoordinate:y}));return}var b=hz(a),S=b==="left-to-right"?1:-1,E=v==="ArrowRight"?1:-1,L;if(w){var x=eo(a),O=io(a),M=E*S,D=U=>({active:!1,index:String(U),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(L=-1,M>0){for(var k=0;k<_.length;k++)if(Al(D(k),_,x,O)!=null){L=k;break}}else for(var P=_.length-1;P>=0;P--)if(Al(D(P),_,x,O)!=null){L=P;break}if(L<0)return}else{L=m+E*S;var R=(C==null?void 0:C.length)||_.length;if(R===0||L>=R||L<0)return}var B=Dh(a,d,"hover",String(L));t.dispatch(Th({active:!0,activeIndex:L.toString(),activeCoordinate:B}))}finally{za=null,ws=null}};if(!h){g();return}i==="raf"?za=requestAnimationFrame(g):typeof i=="number"&&ws===null&&(g(),Bu=null,ws=setTimeout(()=>{Bu?g():(ws=null,za=null)},i))}});Mf.startListening({actionCreator:LO,effect:(e,t)=>{var r=t.getState(),i=r.rootProps.accessibilityLayer!==!1;if(i){var{keyboardInteraction:o}=r.tooltip;if(!o.active&&o.index==null){var h="0",g=ic(r,r.tooltip.settings.shared),a=Dh(r,g,"hover",String(h));t.dispatch(Th({active:!0,activeIndex:h,activeCoordinate:a}))}}}});Mf.startListening({actionCreator:OO,effect:(e,t)=>{var r=t.getState(),i=r.rootProps.accessibilityLayer!==!1;if(i){var{keyboardInteraction:o}=r.tooltip;o.active&&t.dispatch(Th({active:!1,activeIndex:o.index,activeCoordinate:o.coordinate}))}}});function TO(e){e.persist();var{currentTarget:t}=e;return new Proxy(e,{get:(r,i)=>{if(i==="currentTarget")return t;var o=Reflect.get(r,i);return typeof o=="function"?o.bind(r):o}})}var Jr=Ir("externalEvent"),DO=ql(),ju=new Map,Sl=new Map,Rp=new Map;DO.startListening({actionCreator:Jr,effect:(e,t)=>{var{handler:r,reactEvent:i}=e.payload;if(r!=null){var o=i.type,h=TO(i);Rp.set(o,{handler:r,reactEvent:h});var g=ju.get(o);g!==void 0&&(cancelAnimationFrame(g),ju.delete(o));var a=t.getState(),{throttleDelay:c,throttledEvents:f}=a.eventSettings,v=f,u=v==="all"||(v==null?void 0:v.includes(o)),m=Sl.get(o);m!==void 0&&(typeof c!="number"||!u)&&(clearTimeout(m),Sl.delete(o));var w=()=>{var d=Rp.get(o);try{if(!d)return;var{handler:y,reactEvent:b}=d,S=t.getState(),E={activeCoordinate:dH(S),activeDataKey:TL(S),activeIndex:no(S),activeLabel:OL(S),activeTooltipIndex:no(S),isTooltipActive:vH(S)};y&&y(E,b)}finally{ju.delete(o),Sl.delete(o),Rp.delete(o)}};if(!u){w();return}if(c==="raf"){var C=requestAnimationFrame(w);ju.set(o,C)}else if(typeof c=="number"){if(!Sl.has(o)){w();var _=setTimeout(w,c);Sl.set(o,_)}}else w()}}});var fq=le([po],e=>e.tooltipItemPayloads),dq=le([fq,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(t!=null){var i=e.find(h=>h.settings.graphicalItemId===r);if(i!=null){var{getPosition:o}=i;if(o!=null)return o(t)}}}),RO=Ir("touchMove"),kO=ql(),Cs=null,Un=null,n2=null,wl=null;kO.startListening({actionCreator:RO,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){wl=TO(r);var i=t.getState(),{throttleDelay:o,throttledEvents:h}=i.eventSettings,g=h==="all"||h.includes("touchmove");Cs!==null&&(cancelAnimationFrame(Cs),Cs=null),Un!==null&&(typeof o!="number"||!g)&&(clearTimeout(Un),Un=null),n2=Array.from(r.touches).map(c=>l0({clientX:c.clientX,clientY:c.clientY,currentTarget:r.currentTarget}));var a=()=>{if(wl!=null){var c=t.getState(),f=ic(c,c.tooltip.settings.shared);if(f==="axis"){var v,u=(v=n2)===null||v===void 0?void 0:v[0];if(u==null){Cs=null,Un=null;return}var m=o0(c,u);(m==null?void 0:m.activeIndex)!=null&&t.dispatch(pL({activeIndex:m.activeIndex,activeDataKey:void 0,activeCoordinate:m.activeCoordinate}))}else if(f==="item"){var w,C=wl.touches[0];if(document.elementFromPoint==null||C==null)return;var _=document.elementFromPoint(C.clientX,C.clientY);if(!_||!_.getAttribute)return;var d=_.getAttribute(M6),y=(w=_.getAttribute(L6))!==null&&w!==void 0?w:void 0,b=qs(c).find(L=>L.id===y);if(d==null||b==null||y==null)return;var{dataKey:S}=b,E=dq(c,d,y);t.dispatch(vL({activeDataKey:S,activeIndex:d,activeCoordinate:E,activeGraphicalItemId:y}))}Cs=null,Un=null}};if(!g){a();return}o==="raf"?Cs=requestAnimationFrame(a):typeof o=="number"&&Un===null&&(a(),wl=null,Un=setTimeout(()=>{wl?a():(Un=null,Cs=null)},o))}}});var PO={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},BO=lr({name:"eventSettings",initialState:PO,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:vq}=BO.actions,gq=BO.reducer,pq=CE({brush:G9,cartesianAxis:k9,chartData:f$,errorBars:TF,eventSettings:gq,graphicalItems:y9,layout:c6,legend:CB,options:o$,polarAxis:IU,polarOptions:hq,referenceElements:X9,renderedTicks:vF,rootProps:oq,tooltip:Cz,zIndex:YH}),_q=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return P4({reducer:pq,preloadedState:t,middleware:i=>{var o;return i({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((o="es6")!==null&&o!==void 0?o:"")}).concat([CO.middleware,xO.middleware,Mf.middleware,DO.middleware,kO.middleware])},enhancers:i=>{var o=i;return typeof i=="function"&&(o=i()),o.concat(NE({type:"raf"}))},devTools:{serialize:{replacer:aq},name:"recharts-".concat(r)}})};function mq(e){var{preloadedState:t,children:r,reduxStoreName:i}=e,o=zr(),h=N.useRef(null);if(o)return r;h.current==null&&(h.current=_q(t,i));var g=U_;return N.createElement(zB,{context:g,store:h.current},r)}function yq(e){var{layout:t,margin:r}=e,i=mt(),o=zr();return N.useEffect(()=>{o||(i(a6(t)),i(s6(r)))},[i,o,t,r]),null}var bq=N.memo(yq,lf);function Sq(e){var t=mt();return N.useEffect(()=>{t(lq(e))},[t,e]),null}var wq=e=>{var t=mt();return N.useEffect(()=>{t(vq(e))},[t,e]),null},Cq=N.memo(wq,lf);function s2(e){var{zIndex:t,isPanorama:r}=e,i=N.useRef(null),o=mt();return N.useLayoutEffect(()=>(i.current&&o(GH({zIndex:t,element:i.current,isPanorama:r})),()=>{o(KH({zIndex:t,isPanorama:r}))}),[o,t,r]),N.createElement("g",{tabIndex:-1,ref:i,className:"recharts-zIndex-layer_".concat(t)})}function a2(e){var{children:t,isPanorama:r}=e,i=Re(IH);if(!i||i.length===0)return t;var o=i.filter(g=>g<0),h=i.filter(g=>g>0);return N.createElement(N.Fragment,null,o.map(g=>N.createElement(s2,{key:g,zIndex:g,isPanorama:r})),t,h.map(g=>N.createElement(s2,{key:g,zIndex:g,isPanorama:r})))}var xq=["children"];function Eq(e,t){if(e==null)return{};var r,i,o=Aq(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(i=0;i<h.length;i++)r=h[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Aq(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}function jh(){return jh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},jh.apply(null,arguments)}var Mq={width:"100%",height:"100%",display:"block"},Lq=N.forwardRef((e,t)=>{var r=sB(),i=aB(),o=dA();if(!Xn(r)||!Xn(i))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),N.createElement(H2,jh({},g,{title:a,desc:c,role:v,tabIndex:f,width:r,height:i,style:Mq,ref:t}),h)}),Oq=e=>{var{children:t}=e,r=Re(rf);if(!r)return null;var{width:i,height:o,y:h,x:g}=r;return N.createElement(H2,{width:i,height:o,x:g,y:h},t)},o2=N.forwardRef((e,t)=>{var{children:r}=e,i=Eq(e,xq),o=zr();return o?N.createElement(Oq,null,N.createElement(a2,{isPanorama:!0},r)):N.createElement(Lq,jh({ref:t},i),N.createElement(a2,{isPanorama:!1},r))});function Tq(){var e=mt(),[t,r]=N.useState(null),i=Re(A6);return N.useEffect(()=>{if(t!=null){var o=t.getBoundingClientRect(),h=o.width/t.offsetWidth;Ze(h)&&h!==i&&e(l6(h))}},[t,e,i]),r}function l2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Dq(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?l2(Object(r),!0).forEach(function(i){Rq(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l2(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Rq(e,t,r){return(t=kq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kq(e){var t=Pq(e,"string");return typeof t=="symbol"?t:t+""}function Pq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yn(){return Yn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},Yn.apply(null,arguments)}var Bq=()=>(S$(),null);function Ih(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var jq=N.forwardRef((e,t)=>{var r,i,o=N.useRef(null),[h,g]=N.useState({containerWidth:Ih((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:Ih((i=e.style)===null||i===void 0?void 0:i.height)}),a=N.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=N.useCallback(f=>{if(typeof t=="function"&&t(f),o.current!=null&&(o.current.disconnect(),o.current=null),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 N.useEffect(()=>()=>{var f=o.current;f!=null&&f.disconnect()},[a]),N.createElement(N.Fragment,null,N.createElement(Kl,{width:h.containerWidth,height:h.containerHeight}),N.createElement("div",Yn({ref:c},e)))}),Iq=N.forwardRef((e,t)=>{var{width:r,height:i}=e,[o,h]=N.useState({containerWidth:Ih(r),containerHeight:Ih(i)}),g=N.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=N.useCallback(c=>{if(typeof t=="function"&&t(c),c!=null){var{width:f,height:v}=c.getBoundingClientRect();g(f,v)}},[t,g]);return N.createElement(N.Fragment,null,N.createElement(Kl,{width:o.containerWidth,height:o.containerHeight}),N.createElement("div",Yn({ref:a},e)))}),Nq=N.forwardRef((e,t)=>{var{width:r,height:i}=e;return N.createElement(N.Fragment,null,N.createElement(Kl,{width:r,height:i}),N.createElement("div",Yn({ref:t},e)))}),zq=N.forwardRef((e,t)=>{var{width:r,height:i}=e;return typeof r=="string"||typeof i=="string"?N.createElement(Iq,Yn({},e,{ref:t})):typeof r=="number"&&typeof i=="number"?N.createElement(Nq,Yn({},e,{width:r,height:i,ref:t})):N.createElement(N.Fragment,null,N.createElement(Kl,{width:r,height:i}),N.createElement("div",Yn({ref:t},e)))});function Hq(e){return e?jq:zq}var $q=N.forwardRef((e,t)=>{var{children:r,className:i,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=N.useRef(null),L=mt(),[x,O]=N.useState(null),[M,D]=N.useState(null),k=Tq(),P=X_(),R=(P==null?void 0:P.width)>0?P.width:y,B=(P==null?void 0:P.height)>0?P.height:o,U=N.useCallback(Q=>{k(Q),typeof t=="function"&&t(Q),O(Q),D(Q),Q!=null&&(E.current=Q)},[k,t,O,D]),V=N.useCallback(Q=>{L(wO(Q)),L(Jr({handler:h,reactEvent:Q}))},[L,h]),q=N.useCallback(Q=>{L(M_(Q)),L(Jr({handler:f,reactEvent:Q}))},[L,f]),Y=N.useCallback(Q=>{L(gL()),L(Jr({handler:v,reactEvent:Q}))},[L,v]),W=N.useCallback(Q=>{L(M_(Q)),L(Jr({handler:u,reactEvent:Q}))},[L,u]),j=N.useCallback(()=>{L(LO())},[L]),H=N.useCallback(()=>{L(OO())},[L]),z=N.useCallback(Q=>{L(MO(Q.key))},[L]),F=N.useCallback(Q=>{L(Jr({handler:g,reactEvent:Q}))},[L,g]),Z=N.useCallback(Q=>{L(Jr({handler:a,reactEvent:Q}))},[L,a]),re=N.useCallback(Q=>{L(Jr({handler:c,reactEvent:Q}))},[L,c]),he=N.useCallback(Q=>{L(Jr({handler:m,reactEvent:Q}))},[L,m]),ge=N.useCallback(Q=>{L(Jr({handler:_,reactEvent:Q}))},[L,_]),X=N.useCallback(Q=>{S&&L(RO(Q)),L(Jr({handler:C,reactEvent:Q}))},[L,S,C]),G=N.useCallback(Q=>{L(Jr({handler:w,reactEvent:Q}))},[L,w]),ee=Hq(b);return N.createElement(IL.Provider,{value:x},N.createElement(fk.Provider,{value:M},N.createElement(ee,{width:R??(d==null?void 0:d.width),height:B??(d==null?void 0:d.height),className:vt("recharts-wrapper",i),style:Dq({position:"relative",cursor:"default",width:R,height:B},d),onClick:V,onContextMenu:F,onDoubleClick:Z,onFocus:j,onBlur:H,onKeyDown:z,onMouseDown:re,onMouseEnter:q,onMouseLeave:Y,onMouseMove:W,onMouseUp:he,onTouchEnd:G,onTouchMove:X,onTouchStart:ge,ref:U},N.createElement(Bq,null),r)))}),Uq=["width","height","responsive","children","className","style","compact","title","desc"];function Fq(e,t){if(e==null)return{};var r,i,o=Wq(e,t);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(i=0;i<h.length;i++)r=h[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Wq(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}var qq=N.forwardRef((e,t)=>{var{width:r,height:i,responsive:o,children:h,className:g,style:a,compact:c,title:f,desc:v}=e,u=Fq(e,Uq),m=Vn(u);return c?N.createElement(N.Fragment,null,N.createElement(Kl,{width:r,height:i}),N.createElement(o2,{otherAttributes:m,title:f,desc:v},h)):N.createElement($q,{className:g,style:a,width:r,height:i,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},N.createElement(o2,{otherAttributes:m,title:f,desc:v,ref:t},N.createElement(Q9,null,h)))});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 i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},L_.apply(null,arguments)}function c2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Gq(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?c2(Object(r),!0).forEach(function(i){Kq(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c2(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Kq(e,t,r){return(t=Yq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yq(e){var t=Vq(e,"string");return typeof t=="symbol"?t:t+""}function Vq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Xq={top:5,right:5,bottom:5,left:5},Zq=Gq({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:Xq,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},PO),Qq=N.forwardRef(function(t,r){var i,o=ni(t.categoricalChartProps,Zq),{chartName:h,defaultTooltipEventType:g,validateTooltipEventTypes:a,tooltipPayloadSearcher:c,categoricalChartProps:f}=t,v={chartName:h,defaultTooltipEventType:g,validateTooltipEventTypes:a,tooltipPayloadSearcher:c,eventEmitter:void 0};return N.createElement(mq,{preloadedState:{options:v},reduxStoreName:(i=f.id)!==null&&i!==void 0?i:h},N.createElement(q9,{chartData:f.data}),N.createElement(bq,{layout:o.layout,margin:o.margin}),N.createElement(Cq,{throttleDelay:o.throttleDelay,throttledEvents:o.throttledEvents}),N.createElement(Sq,{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}),N.createElement(qq,L_({},o,{ref:r})))}),Jq=["axis","item"],eG=N.forwardRef((e,t)=>N.createElement(Qq,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Jq,tooltipPayloadSearcher:s$,categoricalChartProps:e,ref:t}));const u2=["#6366f1","#8b5cf6","#a78bfa","#c4b5fd","#ddd6fe","#818cf8","#4f46e5","#7c3aed","#5b21b6","#3730a3"];function Nh(e,t=1,r=""){return e===null?"—":`${Number(e.toFixed(t))}${r}`}function h2(e){return e===null?"—":`$${e.toFixed(2)}`}function f2(e){return e===null?"—":`${e.toFixed(1)}%`}function jO({title:e,error:t,defaultOpen:r=!0,children:i}){const[o,h]=N.useState(r);return $.jsxs("section",{className:"analytics-section",children:[$.jsxs("h3",{className:"analytics-section-title",onClick:()=>h(!o),style:{cursor:"pointer",userSelect:"none"},children:[$.jsx("span",{className:"analytics-collapse-icon",children:o?"▾":"▸"}),e]}),t&&$.jsx("div",{className:"analytics-error",children:t}),o&&i]})}function O_({children:e}){return $.jsx("div",{className:"analytics-metric-grid",children:e})}function nn({label:e,value:t}){return $.jsxs("div",{className:"analytics-metric",children:[$.jsx("span",{className:"analytics-metric-value",children:t}),$.jsx("span",{className:"analytics-metric-label",children:e})]})}function Fu({data:e,dataKey:t,nameKey:r,color:i,formatter:o}){if(e.length===0)return null;const h=Math.max(120,e.length*28+30);return $.jsx(rB,{width:"100%",height:h,children:$.jsxs(eG,{data:e,layout:"vertical",margin:{top:4,right:40,bottom:4,left:0},children:[$.jsx(bO,{type:"number",hide:!0}),$.jsx(SO,{type:"category",dataKey:r,width:80,tick:{fontSize:10,fill:"var(--text-secondary)"}}),$.jsx(O$,{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)"}}),$.jsx(mO,{dataKey:t,radius:[0,3,3,0],children:e.map((g,a)=>$.jsx(r0,{fill:i??u2[a%u2.length]},a))})]})})}function d2(e){return e===null?"—":e<1?`${Math.round(e*60)}m`:`${Number(e.toFixed(1))}h`}function tG({activity:e,errors:t}){const r=Object.entries(e.projectsByProtocol).map(([i,o])=>({name:i.toUpperCase(),count:o.count,avgWallClock:o.avgWallClockHours,avgAgentTime:o.avgAgentTimeHours})).sort((i,o)=>o.count-i.count);return $.jsxs(jO,{title:"Activity",error:t==null?void 0:t.github,children:[r.length>0&&$.jsxs("div",{className:"analytics-sub-section",children:[$.jsx("h4",{className:"analytics-sub-title",children:"Projects by Protocol"}),$.jsx(O_,{children:r.map(i=>$.jsx(nn,{label:i.name,value:`${i.count} (wall ${d2(i.avgWallClock)}${i.avgAgentTime!=null?`, agent ${d2(i.avgAgentTime)}`:""})`},i.name))}),$.jsx(Fu,{data:r,dataKey:"count",nameKey:"name"})]}),$.jsxs(O_,{children:[$.jsx(nn,{label:"PRs Merged",value:String(e.prsMerged)}),$.jsx(nn,{label:"Issues Closed",value:String(e.issuesClosed)}),$.jsx(nn,{label:"Median Time to Merge",value:Nh(e.medianTimeToMergeHours,1,"h")}),$.jsx(nn,{label:"Median Time to Close Bugs",value:Nh(e.medianTimeToCloseBugsHours,1,"h")})]})]})}function rG({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})),i=Object.entries(e.byReviewType).map(([h,g])=>({name:h,value:g})),o=Object.entries(e.byProtocol).map(([h,g])=>({name:h,value:g}));return $.jsxs(jO,{title:"Consultation",error:t==null?void 0:t.consultation,children:[$.jsxs(O_,{children:[$.jsx(nn,{label:"Total Consultations",value:String(e.totalCount)}),$.jsx(nn,{label:"Total Cost",value:h2(e.totalCostUsd)}),$.jsx(nn,{label:"Avg Latency",value:Nh(e.avgLatencySeconds,1,"s")}),$.jsx(nn,{label:"Success Rate",value:f2(e.successRate)})]}),r.length>0&&$.jsxs("div",{className:"analytics-sub-section",children:[$.jsx("h4",{className:"analytics-sub-title",children:"Cost by Model"}),$.jsx(Fu,{data:r,dataKey:"cost",nameKey:"name",formatter:h=>`$${h.toFixed(2)}`})]}),r.length>0&&$.jsxs("div",{className:"analytics-sub-section",children:[$.jsx("h4",{className:"analytics-sub-title",children:"Per Model"}),$.jsxs("table",{className:"analytics-table",children:[$.jsx("thead",{children:$.jsxs("tr",{children:[$.jsx("th",{children:"Model"}),$.jsx("th",{children:"Count"}),$.jsx("th",{children:"Cost"}),$.jsx("th",{children:"Latency"}),$.jsx("th",{children:"Success"})]})}),$.jsx("tbody",{children:e.byModel.map(h=>$.jsxs("tr",{children:[$.jsx("td",{children:h.model}),$.jsx("td",{children:h.count}),$.jsx("td",{children:h2(h.totalCost)}),$.jsx("td",{children:Nh(h.avgLatency,1,"s")}),$.jsx("td",{children:f2(h.successRate)})]},h.model))})]})]}),(i.length>0||o.length>0)&&$.jsxs("div",{className:"analytics-charts-row",children:[i.length>0&&$.jsxs("div",{className:"analytics-sub-section analytics-chart-half",children:[$.jsx("h4",{className:"analytics-sub-title",children:"By Review Type"}),$.jsx(Fu,{data:i,dataKey:"value",nameKey:"name"})]}),o.length>0&&$.jsxs("div",{className:"analytics-sub-section analytics-chart-half",children:[$.jsx("h4",{className:"analytics-sub-title",children:"By Protocol"}),$.jsx(Fu,{data:o,dataKey:"value",nameKey:"name"})]})]})]})}function iG({isActive:e}){const{data:t,error:r,loading:i,range:o,setRange:h,refresh:g}=rk(e),a=["24h","7d","30d","all"];return $.jsx("div",{className:"analytics-view",children:$.jsxs("div",{className:"analytics-content",children:[$.jsxs("div",{className:"analytics-header",children:[$.jsx("h2",{className:"analytics-title",children:"Analytics"}),$.jsxs("div",{className:"analytics-actions",children:[$.jsx("div",{className:"analytics-range-selector",children:a.map(c=>$.jsx("button",{className:`analytics-range-btn ${o===c?"active":""}`,onClick:()=>h(c),children:c==="all"?"All":c},c))}),$.jsx("button",{className:"work-btn work-btn-secondary",onClick:g,disabled:i,children:i?"Loading...":"Refresh"})]})]}),r&&!t&&$.jsx("div",{className:"analytics-error",children:r}),i&&!t&&$.jsx("div",{className:"analytics-loading",children:"Loading analytics..."}),t&&$.jsxs($.Fragment,{children:[$.jsx(tG,{activity:t.activity,errors:t.errors}),$.jsx(rG,{consultation:t.consultation,errors:t.errors})]})]})})}function nG(e){const[t,r]=N.useState(null),[i,o]=N.useState(null),[h,g]=N.useState(!1),a=N.useCallback(async()=>{g(!0),o(null);try{const f=await _R();r(f)}catch(f){o(f instanceof Error?f.message:"Failed to fetch team data")}finally{g(!1)}},[]);N.useEffect(()=>{e&&a()},[e,a]);const c=N.useCallback(()=>{a()},[a]);return{data:t,error:i,loading:h,refresh:c}}function sG(e){if(!e)return"";const t=Date.now()-new Date(e).getTime();if(!isFinite(t)||t<0)return"";const r=Math.floor(t/(1e3*60*60));return r<1?"<1h waiting":r<24?`${r}h waiting`:`${Math.floor(r/24)}d waiting`}function aG({entries:e}){return e.length===0?null:$.jsxs("div",{className:"team-member-section team-review-blocking",children:[$.jsx("span",{className:"team-section-label",children:"Review blocking"}),$.jsx("ul",{className:"team-review-blocking-list",children:e.map((t,r)=>$.jsxs("li",{className:"team-review-blocking-item",children:[$.jsxs("span",{className:"team-review-blocking-sentence",children:[t.direction==="authored"?$.jsxs($.Fragment,{children:["You're waiting for ",$.jsx("strong",{children:t.otherName})," to review"," "]}):$.jsxs($.Fragment,{children:[$.jsx("strong",{children:t.otherName})," is waiting for you to review"," "]}),$.jsxs("a",{className:"team-item-link team-review-blocking-link",href:t.pr.url,target:"_blank",rel:"noopener noreferrer",children:["#",t.pr.number," ",t.pr.title]})]}),$.jsx("span",{className:"team-review-blocking-age",children:sG(t.pr.createdAt)})]},`${t.direction}-${t.pr.number}-${t.otherGithub}-${r}`))})]})}function oG({member:e}){const t=e.github_data,r=(t==null?void 0:t.recentActivity.mergedPRs.length)??0,i=(t==null?void 0:t.recentActivity.closedIssues.length)??0;return $.jsxs("div",{className:"team-member-card",children:[$.jsxs("div",{className:"team-member-header",children:[$.jsx("span",{className:"team-member-name",children:e.name}),$.jsx("span",{className:"team-member-role",children:e.role})]}),$.jsxs("a",{className:"team-member-github",href:`https://github.com/${e.github}`,target:"_blank",rel:"noopener noreferrer",children:["@",e.github]}),t&&$.jsxs($.Fragment,{children:[$.jsxs("div",{className:"team-member-section",children:[$.jsx("span",{className:"team-section-label",children:"Working on"}),t.assignedIssues.length>0?$.jsx("div",{className:"team-item-list",children:t.assignedIssues.map(o=>$.jsxs("a",{className:"team-item-link",href:o.url,target:"_blank",rel:"noopener noreferrer",children:["#",o.number," ",o.title]},o.number))}):$.jsx("span",{className:"team-item-empty",children:"No assigned issues"})]}),$.jsxs("div",{className:"team-member-section",children:[$.jsx("span",{className:"team-section-label",children:"Open PRs"}),t.openPRs.length>0?$.jsx("div",{className:"team-item-list",children:t.openPRs.map(o=>$.jsxs("a",{className:"team-item-link",href:o.url,target:"_blank",rel:"noopener noreferrer",children:["#",o.number," ",o.title]},o.number))}):$.jsx("span",{className:"team-item-empty",children:"No open PRs"})]}),$.jsx(aG,{entries:t.reviewBlocking??[]})]}),(r>0||i>0)&&$.jsxs("div",{className:"team-member-activity",children:[r>0&&$.jsxs("span",{children:[r," merged"]}),i>0&&$.jsxs("span",{children:[i," closed"]}),$.jsx("span",{className:"team-activity-label",children:"last 7d"})]})]})}function lG({message:e}){return $.jsxs("div",{className:"team-message",children:[$.jsxs("div",{className:"team-message-header",children:[$.jsx("span",{className:"team-message-author",children:e.author}),$.jsx("span",{className:"team-message-time",children:e.timestamp})]}),$.jsx("div",{className:"team-message-body",children:e.body})]})}function cG(e){const t=Date.now()-new Date(e).getTime(),r=Math.floor(t/(1e3*60*60));return r<1?"just now":r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function uG(e){const t=[];for(const r of e){const i=r.github_data;if(i){for(const o of i.recentActivity.mergedPRs)t.push({type:"merged",number:o.number,title:o.title,url:o.url,timestamp:o.mergedAt,author:r.github});for(const o of i.recentActivity.closedIssues)t.push({type:"closed",number:o.number,title:o.title,url:o.url,timestamp:o.closedAt,author:r.github})}}return t.sort((r,i)=>new Date(i.timestamp).getTime()-new Date(r.timestamp).getTime()),t}function hG({members:e}){const t=uG(e);return t.length===0?$.jsx("div",{className:"team-no-messages",children:"No recent activity"}):$.jsx("div",{className:"team-activity-feed",children:t.map((r,i)=>$.jsxs("a",{className:"team-activity-entry",href:r.url,target:"_blank",rel:"noopener noreferrer",children:[$.jsx("span",{className:"team-activity-date",children:cG(r.timestamp)}),$.jsxs("span",{className:"team-activity-author",children:["@",r.author]}),$.jsx("span",{className:"team-activity-action",children:r.type}),$.jsxs("span",{className:"team-activity-ref",children:["#",r.number]}),$.jsx("span",{className:"team-activity-title",children:r.title})]},`${r.type}-${r.number}-${i}`))})}function fG({isActive:e}){const{data:t,error:r,loading:i,refresh:o}=nG(e);if(i&&!t)return $.jsx("div",{className:"team-view",children:$.jsx("div",{className:"team-loading",children:"Loading team data..."})});if(r&&!t)return $.jsx("div",{className:"team-view",children:$.jsx("div",{className:"team-error",children:r})});if(!t||!t.enabled)return null;const h=t.members??[],a=[...t.messages??[]].reverse();return $.jsx("div",{className:"team-view",children:$.jsxs("div",{className:"team-content",children:[$.jsxs("div",{className:"team-header",children:[$.jsx("h2",{className:"team-title",children:"Team"}),$.jsx("button",{className:"team-refresh-btn",onClick:o,disabled:i,children:i?"Refreshing...":"Refresh"})]}),t.githubError&&$.jsx("div",{className:"team-error",children:t.githubError}),$.jsxs("div",{className:"team-section",children:[$.jsxs("h3",{className:"team-section-title",children:["Members (",h.length,")"]}),$.jsx("div",{className:"team-member-grid",children:h.map(c=>$.jsx(oG,{member:c},c.github))})]}),$.jsxs("div",{className:"team-section",children:[$.jsx("h3",{className:"team-section-title",children:"Messages"}),a.length===0?$.jsx("div",{className:"team-no-messages",children:"No messages yet"}):$.jsx("div",{className:"team-messages",children:a.map((c,f)=>$.jsx(lG,{message:c},f))})]}),$.jsxs("div",{className:"team-section",children:[$.jsx("h3",{className:"team-section-title",children:"Recent Activity"}),$.jsx(hG,{members:h})]})]})})}function dG(e,t){const r=e==null?void 0:e.trim(),i=t==null?void 0:t.trim();return r&&i&&r.toLowerCase()!==i.toLowerCase()?`${i} on ${r} overview`:i?`${i} overview`:"overview"}function vG(){const{state:e,refresh:t}=TR(),{data:r}=w2(),{tabs:i,activeTab:o,activeTabId:h,selectTab:g}=PR(e),a=S2(`(max-width: ${p2}px)`),[c,f]=N.useState(null),[v,u]=N.useState(()=>jR()),[m,w]=N.useState(null),[C,_]=N.useState(!1),[d,y]=N.useState(null);N.useEffect(()=>{(o==null?void 0:o.type)==="architect"&&o.architectName&&u(o.architectName)},[o==null?void 0:o.id,o==null?void 0:o.type,o==null?void 0:o.architectName]);const[b,S]=N.useState(new Set),E=N.useRef(new Map),L=N.useCallback(async(W,j,H,z)=>{try{const F=await zh(W,j,z);j&&j>0&&E.current.set(F.id,j),t()}catch(F){console.error("Failed to open file:",F)}},[t]),x=dG(e==null?void 0:e.hostname,e==null?void 0:e.workspaceName);N.useEffect(()=>{document.title=x},[x]);const[O]=N.useState(()=>new URLSearchParams(window.location.search).get("fullscreen")==="1");N.useEffect(()=>{if(!o)return;(o.type==="architect"||o.type==="builder"||o.type==="shell")&&S(j=>{if(j.has(o.id))return j;const H=new Set(j);return H.add(o.id),H})},[o==null?void 0:o.id,o==null?void 0:o.type]);const M=W=>{const j=Gv(W);return j?$.jsx(Zv,{wsPath:j,onFileOpen:L,persistent:W.persistent,onPermanentClose:t}):$.jsx("div",{className:"no-terminal",children:"No terminal session"})},D=W=>{if(!W.annotationId||!e)return $.jsx("div",{className:"no-terminal",children:"No file viewer"});if(!e.annotations.find(z=>z.id===W.annotationId))return $.jsx("div",{className:"no-terminal",children:"Annotation not found"});const H=E.current.get(W.annotationId);return H!==void 0&&E.current.delete(W.annotationId),$.jsx(ek,{tabId:W.annotationId,initialLine:H??W.initialLine})},k=N.useCallback((W,j,H)=>W.map(z=>{const F=Gv(z),Z=j===z.id;return $.jsx("div",{className:"terminal-tab-pane",style:{display:Z?void 0:"none"},children:F?$.jsx(Zv,{wsPath:F,onFileOpen:L,persistent:z.persistent,toolbarExtra:Z?H:void 0,onPermanentClose:t}):$.jsx("div",{className:"no-terminal",children:"No terminal session"})},z.id)}),[L,t]),P=W=>{const j=i.filter(H=>W.includes(H.type)&&b.has(H.id));return $.jsxs($.Fragment,{children:[k(j,h),$.jsx("div",{style:{display:(o==null?void 0:o.type)==="work"?void 0:"none",height:"100%"},children:$.jsx(V3,{state:e,onRefresh:t,onSelectTab:g})}),$.jsx("div",{style:{display:(o==null?void 0:o.type)==="analytics"?void 0:"none",height:"100%"},children:$.jsx(iG,{isActive:(o==null?void 0:o.type)==="analytics"})}),(e==null?void 0:e.teamEnabled)&&$.jsx("div",{style:{display:(o==null?void 0:o.type)==="team"?void 0:"none",height:"100%"},children:$.jsx(fG,{isActive:(o==null?void 0:o.type)==="team"})}),(o==null?void 0:o.type)==="file"&&D(o)]})};if(O)return o&&(o.type==="architect"||o.type==="builder"||o.type==="shell")?$.jsx("div",{className:"fullscreen-terminal",children:M(o)}):$.jsx("div",{className:"fullscreen-terminal"});if(a)return $.jsx("div",{className:"mobile-wrapper",children:$.jsx(J3,{tabs:i,activeTabId:h,onSelectTab:g,onRefresh:t,children:P(["architect","builder","shell"])})});const R=i.filter(W=>W.type==="architect"),B=R[0],U=()=>{f(c==="right"?null:"left")},V=()=>{f(c==="left"?null:"right")},q=$.jsxs($.Fragment,{children:[c!=="left"&&$.jsx("button",{className:"terminal-control-btn",onPointerDown:W=>W.preventDefault(),onClick:U,title:c==="right"?"Restore split layout":"Collapse architect panel","aria-label":c==="right"?"Restore split layout":"Collapse architect panel",children:$.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[$.jsx("line",{x1:"3",y1:"2",x2:"3",y2:"14"}),$.jsx("path",{d:"M12 5l-4 3 4 3"})]})}),c!=="right"&&$.jsx("button",{className:"terminal-control-btn",onPointerDown:W=>W.preventDefault(),onClick:V,title:"Collapse work panel","aria-label":"Collapse work panel",children:$.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[$.jsx("line",{x1:"13",y1:"2",x2:"13",y2:"14"}),$.jsx("path",{d:"M4 5l4 3-4 3"})]})})]});let Y;if(R.length===0)Y=$.jsx("div",{className:"no-architect",children:"No architect terminal"});else if(R.length===1){const W=Gv(B);Y=W?$.jsx(Zv,{wsPath:W,onFileOpen:L,persistent:B.persistent,toolbarExtra:q,onPermanentClose:t}):$.jsx("div",{className:"no-architect",children:"No architect terminal"})}else{const W=R.find(H=>H.architectName===v)??R[0],j=(W==null?void 0:W.id)??"";Y=$.jsxs("div",{className:"architect-pane",children:[$.jsx(HR,{tabs:R,activeTabId:j,onSelectTab:H=>{const z=R.find(F=>F.id===H);z!=null&&z.architectName&&(u(z.architectName),IR(z.architectName))},onRequestRemove:H=>{w(H),y(null)}}),$.jsx("div",{className:"architect-pane-body",children:k(R,j,q)})]})}return $.jsxs("div",{className:"app",children:[$.jsxs("header",{className:"app-header",children:[$.jsx("h1",{className:"app-title",children:x}),$.jsxs("div",{className:"header-controls",children:[$.jsx(Q3,{count:(r==null?void 0:r.heldCount)??0,escalated:(r==null?void 0:r.mailboxEscalated)??!1,loadMessages:yR}),(e==null?void 0:e.version)&&$.jsxs("span",{className:"header-version",children:["v",e.version]})]})]}),$.jsx("div",{className:"app-body",children:$.jsx(NR,{left:Y,right:$.jsxs("div",{className:"right-panel",children:[$.jsx(E2,{tabs:i.filter(W=>W.type!=="architect"),activeTabId:h,onSelectTab:g,onRefresh:t}),$.jsx("div",{className:"tab-content",role:"tabpanel",children:P(["builder","shell"])})]}),collapsedPane:c,onExpandLeft:()=>f(null),onExpandRight:()=>f(null)})}),m&&$.jsx(gG,{name:m,inFlightBuilders:((e==null?void 0:e.builders)??[]).filter(W=>W.spawnedByArchitect===m),submitting:C,error:d,onCancel:()=>{C||(w(null),y(null))},onConfirm:async()=>{if(!C){_(!0),y(null);try{const W=await gR(m);W.success?(w(null),t()):y(W.error??"Failed to remove architect.")}catch(W){y(W instanceof Error?W.message:String(W))}finally{_(!1)}}}})]})}function gG({name:e,inFlightBuilders:t,submitting:r,error:i,onCancel:o,onConfirm:h}){return $.jsx("div",{className:"remove-architect-modal-backdrop",role:"dialog","aria-modal":"true","aria-labelledby":"remove-arch-title",children:$.jsxs("div",{className:"remove-architect-modal",children:[$.jsxs("h2",{id:"remove-arch-title",children:["Remove architect ",$.jsx("code",{children:e}),"?"]}),t.length>0?$.jsxs("p",{children:[$.jsxs("strong",{children:[t.length," in-flight builder",t.length===1?"":"s"]})," ","spawned by ",$.jsx("code",{children:e}),":"," ",t.map(g=>g.name||g.id).filter(Boolean).join(", "),"."," ","They’ll continue running and fall back to ",$.jsx("code",{children:"main"})," for routing."]}):$.jsx("p",{children:"This architect has no in-flight builders."}),i&&$.jsx("p",{className:"remove-architect-error",role:"alert",children:i}),$.jsxs("div",{className:"remove-architect-modal-actions",children:[$.jsx("button",{type:"button",onClick:o,disabled:r,children:"Cancel"}),$.jsx("button",{type:"button",onClick:h,disabled:r,className:"primary",children:r?"Removing…":"Remove"})]})]})})}cR.createRoot(document.getElementById("root")).render($.jsx(N.StrictMode,{children:$.jsx(vG,{})}));
|
|
199
|
-
//# sourceMappingURL=index-DZf6pNPE.js.map
|