@dotobokuri/fleet-console 1.5.1 → 1.5.3
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/dist/cli-bin.mjs +297 -6
- package/dist/cli.mjs +297 -6
- package/dist/client/assets/{_baseUniq-Cj5iZsnm.js → _baseUniq-D0ScniwI.js} +1 -1
- package/dist/client/assets/{arc-Jbxpc55P.js → arc-BVncG7ke.js} +1 -1
- package/dist/client/assets/{architectureDiagram-Q4EWVU46-C2AL37ZH.js → architectureDiagram-Q4EWVU46-ClShr277.js} +1 -1
- package/dist/client/assets/{blockDiagram-DXYQGD6D-Z33MGAR0.js → blockDiagram-DXYQGD6D-CrivdCAG.js} +1 -1
- package/dist/client/assets/{c4Diagram-AHTNJAMY-DTyyZjbr.js → c4Diagram-AHTNJAMY-B7PCIQAH.js} +1 -1
- package/dist/client/assets/channel-BQxlgV4A.js +1 -0
- package/dist/client/assets/{chunk-4BX2VUAB-MhU_yYsg.js → chunk-4BX2VUAB-DXeu-dM9.js} +1 -1
- package/dist/client/assets/{chunk-4TB4RGXK-rush3WYT.js → chunk-4TB4RGXK-BLl_OCcS.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-2q7GyaDY.js → chunk-55IACEB6-Dw15rh74.js} +1 -1
- package/dist/client/assets/{chunk-EDXVE4YY-BNJul5Gb.js → chunk-EDXVE4YY-D-RaYxb6.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-RLF-A4M2.js → chunk-FMBD7UC4-BURzGCgv.js} +1 -1
- package/dist/client/assets/{chunk-OYMX7WX6-O3WaO8eP.js → chunk-OYMX7WX6-RlVYpHiY.js} +1 -1
- package/dist/client/assets/{chunk-QZHKN3VN-VmMF7Q4N.js → chunk-QZHKN3VN-Cwh5KNNT.js} +1 -1
- package/dist/client/assets/{chunk-YZCP3GAM-Bh6gYhu2.js → chunk-YZCP3GAM-CiQn7QhX.js} +1 -1
- package/dist/client/assets/classDiagram-6PBFFD2Q-DKVGUl6t.js +1 -0
- package/dist/client/assets/classDiagram-v2-HSJHXN6E-DKVGUl6t.js +1 -0
- package/dist/client/assets/clone-BWF9pDhJ.js +1 -0
- package/dist/client/assets/{cose-bilkent-S5V4N54A-D3DS835d.js → cose-bilkent-S5V4N54A-BjrkHodW.js} +1 -1
- package/dist/client/assets/{dagre-KV5264BT-Ciubq0vM.js → dagre-KV5264BT-C2l7dBaN.js} +1 -1
- package/dist/client/assets/{diagram-5BDNPKRD-BZZIvHWa.js → diagram-5BDNPKRD-DLbWU7o6.js} +1 -1
- package/dist/client/assets/{diagram-G4DWMVQ6-BtXUzyHa.js → diagram-G4DWMVQ6-CHa3wC_6.js} +1 -1
- package/dist/client/assets/{diagram-MMDJMWI5-DCUsuoWB.js → diagram-MMDJMWI5-unre4XlN.js} +1 -1
- package/dist/client/assets/{diagram-TYMM5635-B4qobpfh.js → diagram-TYMM5635-Cdt0vfut.js} +1 -1
- package/dist/client/assets/{erDiagram-SMLLAGMA-By9AUj2W.js → erDiagram-SMLLAGMA-BYzXAxxJ.js} +1 -1
- package/dist/client/assets/{flowDiagram-DWJPFMVM-BwnN5h7R.js → flowDiagram-DWJPFMVM-CNV2iyQR.js} +1 -1
- package/dist/client/assets/{ganttDiagram-T4ZO3ILL-CXKwXiMU.js → ganttDiagram-T4ZO3ILL-DThuKZ5c.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-UUTBAWPF-DNT5RSum.js → gitGraphDiagram-UUTBAWPF-aQ8ynpC0.js} +1 -1
- package/dist/client/assets/{graph-CjPVI8l2.js → graph-C8-VhfUV.js} +1 -1
- package/dist/client/assets/{index-BULfWUw5.js → index-BWz6DiTE.js} +150 -150
- package/dist/client/assets/index-DyIWJOIv.css +1 -0
- package/dist/client/assets/{infoDiagram-42DDH7IO-U_AT1-iD.js → infoDiagram-42DDH7IO-Do5t0VWS.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-UXIWVN3A-Qex4lNxT.js → ishikawaDiagram-UXIWVN3A-DIe1b4HJ.js} +1 -1
- package/dist/client/assets/{journeyDiagram-VCZTEJTY-DzQ-n2Dr.js → journeyDiagram-VCZTEJTY-BwHcjLfa.js} +1 -1
- package/dist/client/assets/{kanban-definition-6JOO6SKY-Nca0w4w_.js → kanban-definition-6JOO6SKY-B-zHtqTS.js} +1 -1
- package/dist/client/assets/{layout-CSAtztCW.js → layout-CtVjuQFw.js} +1 -1
- package/dist/client/assets/{linear-DCMai7XD.js → linear-rOcX3Xk5.js} +1 -1
- package/dist/client/assets/{mermaid.core-DgeiljBl.js → mermaid.core-BJTjy7aS.js} +4 -4
- package/dist/client/assets/{min-CXx0Defw.js → min-BUMqT8iZ.js} +1 -1
- package/dist/client/assets/{mindmap-definition-QFDTVHPH-3eAEbAuc.js → mindmap-definition-QFDTVHPH-DW7Wysk_.js} +1 -1
- package/dist/client/assets/{pieDiagram-DEJITSTG-QzP0SY9Q.js → pieDiagram-DEJITSTG-DY0ruViO.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-34T5L4WZ-BESlSjcj.js → quadrantDiagram-34T5L4WZ-CCEy2zsl.js} +1 -1
- package/dist/client/assets/{requirementDiagram-MS252O5E-C_Epj4-C.js → requirementDiagram-MS252O5E-D6PFLt6T.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-XADWPNL6-Djw1Duzy.js → sankeyDiagram-XADWPNL6-B07GNfPe.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-FGHM5R23-Dx1GQsBc.js → sequenceDiagram-FGHM5R23-CdYYCcr6.js} +1 -1
- package/dist/client/assets/{stateDiagram-FHFEXIEX-CFbPjyzN.js → stateDiagram-FHFEXIEX-DC3oywwW.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-D0vnD8Cl.js +1 -0
- package/dist/client/assets/{timeline-definition-GMOUNBTQ-eL6NFeHV.js → timeline-definition-GMOUNBTQ-D85mj2bC.js} +1 -1
- package/dist/client/assets/{vennDiagram-DHZGUBPP-DWTRRBRv.js → vennDiagram-DHZGUBPP-Co2lMv4A.js} +1 -1
- package/dist/client/assets/{wardley-RL74JXVD-lzn8v7--.js → wardley-RL74JXVD-3QSiNklf.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-NUSXRM2D-CeSqsVbB.js → wardleyDiagram-NUSXRM2D-CHETmdOb.js} +1 -1
- package/dist/client/assets/{xychartDiagram-5P7HB3ND-CVYHXTp8.js → xychartDiagram-5P7HB3ND-ByAvOHKb.js} +1 -1
- package/dist/client/index.html +2 -2
- package/package.json +1 -1
- package/dist/client/assets/channel-C7CS_KI3.js +0 -1
- package/dist/client/assets/classDiagram-6PBFFD2Q-DNK0Ad4c.js +0 -1
- package/dist/client/assets/classDiagram-v2-HSJHXN6E-DNK0Ad4c.js +0 -1
- package/dist/client/assets/clone-DOhXj8NM.js +0 -1
- package/dist/client/assets/index-B2Ok0q13.css +0 -1
- package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-CqOKCF9r.js +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))o(l);new MutationObserver(l=>{for(const y of l)if(y.type==="childList")for(const b of y.addedNodes)b.tagName==="LINK"&&b.rel==="modulepreload"&&o(b)}).observe(document,{childList:!0,subtree:!0});function s(l){const y={};return l.integrity&&(y.integrity=l.integrity),l.referrerPolicy&&(y.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?y.credentials="include":l.crossOrigin==="anonymous"?y.credentials="omit":y.credentials="same-origin",y}function o(l){if(l.ep)return;l.ep=!0;const y=s(l);fetch(l.href,y)}})();function P1(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function JL(i){if(Object.prototype.hasOwnProperty.call(i,"__esModule"))return i;var n=i.default;if(typeof n=="function"){var s=function o(){var l=!1;try{l=this instanceof o}catch{}return l?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};s.prototype=n.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(i).forEach(function(o){var l=Object.getOwnPropertyDescriptor(i,o);Object.defineProperty(s,o,l.get?l:{enumerable:!0,get:function(){return i[o]}})}),s}var fd={exports:{}},Bo={};var $m;function j1(){if($m)return Bo;$m=1;var i=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function s(o,l,y){var b=null;if(y!==void 0&&(b=""+y),l.key!==void 0&&(b=""+l.key),"key"in l){y={};for(var c in l)c!=="key"&&(y[c]=l[c])}else y=l;return l=y.ref,{$$typeof:i,type:o,key:b,ref:l!==void 0?l:null,props:y}}return Bo.Fragment=n,Bo.jsx=s,Bo.jsxs=s,Bo}var Um;function F1(){return Um||(Um=1,fd.exports=j1()),fd.exports}var z=F1(),pd={exports:{}},Pe={};var Pm;function q1(){if(Pm)return Pe;Pm=1;var i=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),b=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),C=Symbol.iterator;function x(M){return M===null||typeof M!="object"?null:(M=C&&M[C]||M["@@iterator"],typeof M=="function"?M:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,p={};function S(M,U,V){this.props=M,this.context=U,this.refs=p,this.updater=V||A}S.prototype.isReactComponent={},S.prototype.setState=function(M,U){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,U,"setState")},S.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function _(){}_.prototype=S.prototype;function g(M,U,V){this.props=M,this.context=U,this.refs=p,this.updater=V||A}var w=g.prototype=new _;w.constructor=g,E(w,S.prototype),w.isPureReactComponent=!0;var R=Array.isArray;function L(){}var D={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function B(M,U,V){var ae=V.ref;return{$$typeof:i,type:M,key:U,ref:ae!==void 0?ae:null,props:V}}function W(M,U){return B(M.type,U,M.props)}function P(M){return typeof M=="object"&&M!==null&&M.$$typeof===i}function F(M){var U={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(V){return U[V]})}var I=/\/+/g;function Z(M,U){return typeof M=="object"&&M!==null&&M.key!=null?F(""+M.key):U.toString(36)}function ee(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(L,L):(M.status="pending",M.then(function(U){M.status==="pending"&&(M.status="fulfilled",M.value=U)},function(U){M.status==="pending"&&(M.status="rejected",M.reason=U)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function j(M,U,V,ae,ce){var me=typeof M;(me==="undefined"||me==="boolean")&&(M=null);var Q=!1;if(M===null)Q=!0;else switch(me){case"bigint":case"string":case"number":Q=!0;break;case"object":switch(M.$$typeof){case i:case n:Q=!0;break;case v:return Q=M._init,j(Q(M._payload),U,V,ae,ce)}}if(Q)return ce=ce(M),Q=ae===""?"."+Z(M,0):ae,R(ce)?(V="",Q!=null&&(V=Q.replace(I,"$&/")+"/"),j(ce,U,V,"",function(_e){return _e})):ce!=null&&(P(ce)&&(ce=W(ce,V+(ce.key==null||M&&M.key===ce.key?"":(""+ce.key).replace(I,"$&/")+"/")+Q)),U.push(ce)),1;Q=0;var $=ae===""?".":ae+":";if(R(M))for(var oe=0;oe<M.length;oe++)ae=M[oe],me=$+Z(ae,oe),Q+=j(ae,U,V,me,ce);else if(oe=x(M),typeof oe=="function")for(M=oe.call(M),oe=0;!(ae=M.next()).done;)ae=ae.value,me=$+Z(ae,oe++),Q+=j(ae,U,V,me,ce);else if(me==="object"){if(typeof M.then=="function")return j(ee(M),U,V,ae,ce);throw U=String(M),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return Q}function Y(M,U,V){if(M==null)return M;var ae=[],ce=0;return j(M,ae,"","",function(me){return U.call(V,me,ce++)}),ae}function K(M){if(M._status===-1){var U=M._result;U=U(),U.then(function(V){(M._status===0||M._status===-1)&&(M._status=1,M._result=V)},function(V){(M._status===0||M._status===-1)&&(M._status=2,M._result=V)}),M._status===-1&&(M._status=0,M._result=U)}if(M._status===1)return M._result.default;throw M._result}var O=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},H={map:Y,forEach:function(M,U,V){Y(M,function(){U.apply(this,arguments)},V)},count:function(M){var U=0;return Y(M,function(){U++}),U},toArray:function(M){return Y(M,function(U){return U})||[]},only:function(M){if(!P(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return Pe.Activity=f,Pe.Children=H,Pe.Component=S,Pe.Fragment=s,Pe.Profiler=l,Pe.PureComponent=g,Pe.StrictMode=o,Pe.Suspense=u,Pe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,Pe.__COMPILER_RUNTIME={__proto__:null,c:function(M){return D.H.useMemoCache(M)}},Pe.cache=function(M){return function(){return M.apply(null,arguments)}},Pe.cacheSignal=function(){return null},Pe.cloneElement=function(M,U,V){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var ae=E({},M.props),ce=M.key;if(U!=null)for(me in U.key!==void 0&&(ce=""+U.key),U)!T.call(U,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&U.ref===void 0||(ae[me]=U[me]);var me=arguments.length-2;if(me===1)ae.children=V;else if(1<me){for(var Q=Array(me),$=0;$<me;$++)Q[$]=arguments[$+2];ae.children=Q}return B(M.type,ce,ae)},Pe.createContext=function(M){return M={$$typeof:b,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:y,_context:M},M},Pe.createElement=function(M,U,V){var ae,ce={},me=null;if(U!=null)for(ae in U.key!==void 0&&(me=""+U.key),U)T.call(U,ae)&&ae!=="key"&&ae!=="__self"&&ae!=="__source"&&(ce[ae]=U[ae]);var Q=arguments.length-2;if(Q===1)ce.children=V;else if(1<Q){for(var $=Array(Q),oe=0;oe<Q;oe++)$[oe]=arguments[oe+2];ce.children=$}if(M&&M.defaultProps)for(ae in Q=M.defaultProps,Q)ce[ae]===void 0&&(ce[ae]=Q[ae]);return B(M,me,ce)},Pe.createRef=function(){return{current:null}},Pe.forwardRef=function(M){return{$$typeof:c,render:M}},Pe.isValidElement=P,Pe.lazy=function(M){return{$$typeof:v,_payload:{_status:-1,_result:M},_init:K}},Pe.memo=function(M,U){return{$$typeof:h,type:M,compare:U===void 0?null:U}},Pe.startTransition=function(M){var U=D.T,V={};D.T=V;try{var ae=M(),ce=D.S;ce!==null&&ce(V,ae),typeof ae=="object"&&ae!==null&&typeof ae.then=="function"&&ae.then(L,O)}catch(me){O(me)}finally{U!==null&&V.types!==null&&(U.types=V.types),D.T=U}},Pe.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},Pe.use=function(M){return D.H.use(M)},Pe.useActionState=function(M,U,V){return D.H.useActionState(M,U,V)},Pe.useCallback=function(M,U){return D.H.useCallback(M,U)},Pe.useContext=function(M){return D.H.useContext(M)},Pe.useDebugValue=function(){},Pe.useDeferredValue=function(M,U){return D.H.useDeferredValue(M,U)},Pe.useEffect=function(M,U){return D.H.useEffect(M,U)},Pe.useEffectEvent=function(M){return D.H.useEffectEvent(M)},Pe.useId=function(){return D.H.useId()},Pe.useImperativeHandle=function(M,U,V){return D.H.useImperativeHandle(M,U,V)},Pe.useInsertionEffect=function(M,U){return D.H.useInsertionEffect(M,U)},Pe.useLayoutEffect=function(M,U){return D.H.useLayoutEffect(M,U)},Pe.useMemo=function(M,U){return D.H.useMemo(M,U)},Pe.useOptimistic=function(M,U){return D.H.useOptimistic(M,U)},Pe.useReducer=function(M,U,V){return D.H.useReducer(M,U,V)},Pe.useRef=function(M){return D.H.useRef(M)},Pe.useState=function(M){return D.H.useState(M)},Pe.useSyncExternalStore=function(M,U,V){return D.H.useSyncExternalStore(M,U,V)},Pe.useTransition=function(){return D.H.useTransition()},Pe.version="19.2.7",Pe}var jm;function Rf(){return jm||(jm=1,pd.exports=q1()),pd.exports}var te=Rf(),_d={exports:{}},No={},gd={exports:{}},md={};var Fm;function W1(){return Fm||(Fm=1,(function(i){function n(j,Y){var K=j.length;j.push(Y);e:for(;0<K;){var O=K-1>>>1,H=j[O];if(0<l(H,Y))j[O]=Y,j[K]=H,K=O;else break e}}function s(j){return j.length===0?null:j[0]}function o(j){if(j.length===0)return null;var Y=j[0],K=j.pop();if(K!==Y){j[0]=K;e:for(var O=0,H=j.length,M=H>>>1;O<M;){var U=2*(O+1)-1,V=j[U],ae=U+1,ce=j[ae];if(0>l(V,K))ae<H&&0>l(ce,V)?(j[O]=ce,j[ae]=K,O=ae):(j[O]=V,j[U]=K,O=U);else if(ae<H&&0>l(ce,K))j[O]=ce,j[ae]=K,O=ae;else break e}}return Y}function l(j,Y){var K=j.sortIndex-Y.sortIndex;return K!==0?K:j.id-Y.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var y=performance;i.unstable_now=function(){return y.now()}}else{var b=Date,c=b.now();i.unstable_now=function(){return b.now()-c}}var u=[],h=[],v=1,f=null,C=3,x=!1,A=!1,E=!1,p=!1,S=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;function w(j){for(var Y=s(h);Y!==null;){if(Y.callback===null)o(h);else if(Y.startTime<=j)o(h),Y.sortIndex=Y.expirationTime,n(u,Y);else break;Y=s(h)}}function R(j){if(E=!1,w(j),!A)if(s(u)!==null)A=!0,L||(L=!0,F());else{var Y=s(h);Y!==null&&ee(R,Y.startTime-j)}}var L=!1,D=-1,T=5,B=-1;function W(){return p?!0:!(i.unstable_now()-B<T)}function P(){if(p=!1,L){var j=i.unstable_now();B=j;var Y=!0;try{e:{A=!1,E&&(E=!1,_(D),D=-1),x=!0;var K=C;try{t:{for(w(j),f=s(u);f!==null&&!(f.expirationTime>j&&W());){var O=f.callback;if(typeof O=="function"){f.callback=null,C=f.priorityLevel;var H=O(f.expirationTime<=j);if(j=i.unstable_now(),typeof H=="function"){f.callback=H,w(j),Y=!0;break t}f===s(u)&&o(u),w(j)}else o(u);f=s(u)}if(f!==null)Y=!0;else{var M=s(h);M!==null&&ee(R,M.startTime-j),Y=!1}}break e}finally{f=null,C=K,x=!1}Y=void 0}}finally{Y?F():L=!1}}}var F;if(typeof g=="function")F=function(){g(P)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,Z=I.port2;I.port1.onmessage=P,F=function(){Z.postMessage(null)}}else F=function(){S(P,0)};function ee(j,Y){D=S(function(){j(i.unstable_now())},Y)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(j){j.callback=null},i.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<j?Math.floor(1e3/j):5},i.unstable_getCurrentPriorityLevel=function(){return C},i.unstable_next=function(j){switch(C){case 1:case 2:case 3:var Y=3;break;default:Y=C}var K=C;C=Y;try{return j()}finally{C=K}},i.unstable_requestPaint=function(){p=!0},i.unstable_runWithPriority=function(j,Y){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var K=C;C=j;try{return Y()}finally{C=K}},i.unstable_scheduleCallback=function(j,Y,K){var O=i.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?O+K:O):K=O,j){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=K+H,j={id:v++,callback:Y,priorityLevel:j,startTime:K,expirationTime:H,sortIndex:-1},K>O?(j.sortIndex=K,n(h,j),s(u)===null&&j===s(h)&&(E?(_(D),D=-1):E=!0,ee(R,K-O))):(j.sortIndex=H,n(u,j),A||x||(A=!0,L||(L=!0,F()))),j},i.unstable_shouldYield=W,i.unstable_wrapCallback=function(j){var Y=C;return function(){var K=C;C=Y;try{return j.apply(this,arguments)}finally{C=K}}}})(md)),md}var qm;function G1(){return qm||(qm=1,gd.exports=W1()),gd.exports}var vd={exports:{}},Ri={};var Wm;function K1(){if(Wm)return Ri;Wm=1;var i=Rf();function n(u){var h="https://react.dev/errors/"+u;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)h+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+u+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var o={d:{f:s,r:function(){throw Error(n(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},l=Symbol.for("react.portal");function y(u,h,v){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:f==null?null:""+f,children:u,containerInfo:h,implementation:v}}var b=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(u,h){if(u==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Ri.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Ri.createPortal=function(u,h){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(n(299));return y(u,h,null,v)},Ri.flushSync=function(u){var h=b.T,v=o.p;try{if(b.T=null,o.p=2,u)return u()}finally{b.T=h,o.p=v,o.d.f()}},Ri.preconnect=function(u,h){typeof u=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(u,h))},Ri.prefetchDNS=function(u){typeof u=="string"&&o.d.D(u)},Ri.preinit=function(u,h){if(typeof u=="string"&&h&&typeof h.as=="string"){var v=h.as,f=c(v,h.crossOrigin),C=typeof h.integrity=="string"?h.integrity:void 0,x=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;v==="style"?o.d.S(u,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:f,integrity:C,fetchPriority:x}):v==="script"&&o.d.X(u,{crossOrigin:f,integrity:C,fetchPriority:x,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Ri.preinitModule=function(u,h){if(typeof u=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var v=c(h.as,h.crossOrigin);o.d.M(u,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&o.d.M(u)},Ri.preload=function(u,h){if(typeof u=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var v=h.as,f=c(v,h.crossOrigin);o.d.L(u,v,{crossOrigin:f,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Ri.preloadModule=function(u,h){if(typeof u=="string")if(h){var v=c(h.as,h.crossOrigin);o.d.m(u,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(u)},Ri.requestFormReset=function(u){o.d.r(u)},Ri.unstable_batchedUpdates=function(u,h){return u(h)},Ri.useFormState=function(u,h,v){return b.H.useFormState(u,h,v)},Ri.useFormStatus=function(){return b.H.useHostTransitionStatus()},Ri.version="19.2.7",Ri}var Gm;function Y1(){if(Gm)return vd.exports;Gm=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(n){console.error(n)}}return i(),vd.exports=K1(),vd.exports}var Km;function V1(){if(Km)return No;Km=1;var i=G1(),n=Rf(),s=Y1();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function y(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function b(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(y(e)!==e)throw Error(o(188))}function h(e){var t=e.alternate;if(!t){if(t=y(e),t===null)throw Error(o(188));return t!==e?null:e}for(var r=e,a=t;;){var d=r.return;if(d===null)break;var m=d.alternate;if(m===null){if(a=d.return,a!==null){r=a;continue}break}if(d.child===m.child){for(m=d.child;m;){if(m===r)return u(d),e;if(m===a)return u(d),t;m=m.sibling}throw Error(o(188))}if(r.return!==a.return)r=d,a=m;else{for(var k=!1,N=d.child;N;){if(N===r){k=!0,r=d,a=m;break}if(N===a){k=!0,a=d,r=m;break}N=N.sibling}if(!k){for(N=m.child;N;){if(N===r){k=!0,r=m,a=d;break}if(N===a){k=!0,a=m,r=d;break}N=N.sibling}if(!k)throw Error(o(189))}}if(r.alternate!==a)throw Error(o(190))}if(r.tag!==3)throw Error(o(188));return r.stateNode.current===r?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,C=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),g=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),W=Symbol.for("react.memo_cache_sentinel"),P=Symbol.iterator;function F(e){return e===null||typeof e!="object"?null:(e=P&&e[P]||e["@@iterator"],typeof e=="function"?e:null)}var I=Symbol.for("react.client.reference");function Z(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===I?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case S:return"Profiler";case p:return"StrictMode";case R:return"Suspense";case L:return"SuspenseList";case B:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case A:return"Portal";case g:return e.displayName||"Context";case _:return(e._context.displayName||"Context")+".Consumer";case w:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case D:return t=e.displayName||null,t!==null?t:Z(e.type)||"Memo";case T:t=e._payload,e=e._init;try{return Z(e(t))}catch{}}return null}var ee=Array.isArray,j=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K={pending:!1,data:null,method:null,action:null},O=[],H=-1;function M(e){return{current:e}}function U(e){0>H||(e.current=O[H],O[H]=null,H--)}function V(e,t){H++,O[H]=e.current,e.current=t}var ae=M(null),ce=M(null),me=M(null),Q=M(null);function $(e,t){switch(V(me,t),V(ce,e),V(ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?lm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=lm(t),e=cm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}U(ae),V(ae,e)}function oe(){U(ae),U(ce),U(me)}function _e(e){e.memoizedState!==null&&V(Q,e);var t=ae.current,r=cm(t,e.type);t!==r&&(V(ce,e),V(ae,r))}function Se(e){ce.current===e&&(U(ae),U(ce)),Q.current===e&&(U(Q),ko._currentValue=K)}var be,$e;function je(e){if(be===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);be=t&&t[1]||"",$e=-1<r.stack.indexOf(`
|
|
1
|
+
(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))o(l);new MutationObserver(l=>{for(const y of l)if(y.type==="childList")for(const b of y.addedNodes)b.tagName==="LINK"&&b.rel==="modulepreload"&&o(b)}).observe(document,{childList:!0,subtree:!0});function s(l){const y={};return l.integrity&&(y.integrity=l.integrity),l.referrerPolicy&&(y.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?y.credentials="include":l.crossOrigin==="anonymous"?y.credentials="omit":y.credentials="same-origin",y}function o(l){if(l.ep)return;l.ep=!0;const y=s(l);fetch(l.href,y)}})();function j1(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function tk(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var n=t.default;if(typeof n=="function"){var s=function o(){var l=!1;try{l=this instanceof o}catch{}return l?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};s.prototype=n.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(t).forEach(function(o){var l=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(s,o,l.get?l:{enumerable:!0,get:function(){return t[o]}})}),s}var fd={exports:{}},Bo={};var $m;function F1(){if($m)return Bo;$m=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function s(o,l,y){var b=null;if(y!==void 0&&(b=""+y),l.key!==void 0&&(b=""+l.key),"key"in l){y={};for(var c in l)c!=="key"&&(y[c]=l[c])}else y=l;return l=y.ref,{$$typeof:t,type:o,key:b,ref:l!==void 0?l:null,props:y}}return Bo.Fragment=n,Bo.jsx=s,Bo.jsxs=s,Bo}var Um;function q1(){return Um||(Um=1,fd.exports=F1()),fd.exports}var z=q1(),pd={exports:{}},Pe={};var Pm;function W1(){if(Pm)return Pe;Pm=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),b=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),C=Symbol.iterator;function x(M){return M===null||typeof M!="object"?null:(M=C&&M[C]||M["@@iterator"],typeof M=="function"?M:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,p={};function S(M,U,V){this.props=M,this.context=U,this.refs=p,this.updater=V||A}S.prototype.isReactComponent={},S.prototype.setState=function(M,U){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,U,"setState")},S.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function _(){}_.prototype=S.prototype;function g(M,U,V){this.props=M,this.context=U,this.refs=p,this.updater=V||A}var w=g.prototype=new _;w.constructor=g,E(w,S.prototype),w.isPureReactComponent=!0;var R=Array.isArray;function L(){}var D={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function B(M,U,V){var ae=V.ref;return{$$typeof:t,type:M,key:U,ref:ae!==void 0?ae:null,props:V}}function W(M,U){return B(M.type,U,M.props)}function P(M){return typeof M=="object"&&M!==null&&M.$$typeof===t}function F(M){var U={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(V){return U[V]})}var I=/\/+/g;function Z(M,U){return typeof M=="object"&&M!==null&&M.key!=null?F(""+M.key):U.toString(36)}function ee(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(L,L):(M.status="pending",M.then(function(U){M.status==="pending"&&(M.status="fulfilled",M.value=U)},function(U){M.status==="pending"&&(M.status="rejected",M.reason=U)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function j(M,U,V,ae,ce){var me=typeof M;(me==="undefined"||me==="boolean")&&(M=null);var Q=!1;if(M===null)Q=!0;else switch(me){case"bigint":case"string":case"number":Q=!0;break;case"object":switch(M.$$typeof){case t:case n:Q=!0;break;case v:return Q=M._init,j(Q(M._payload),U,V,ae,ce)}}if(Q)return ce=ce(M),Q=ae===""?"."+Z(M,0):ae,R(ce)?(V="",Q!=null&&(V=Q.replace(I,"$&/")+"/"),j(ce,U,V,"",function(_e){return _e})):ce!=null&&(P(ce)&&(ce=W(ce,V+(ce.key==null||M&&M.key===ce.key?"":(""+ce.key).replace(I,"$&/")+"/")+Q)),U.push(ce)),1;Q=0;var $=ae===""?".":ae+":";if(R(M))for(var oe=0;oe<M.length;oe++)ae=M[oe],me=$+Z(ae,oe),Q+=j(ae,U,V,me,ce);else if(oe=x(M),typeof oe=="function")for(M=oe.call(M),oe=0;!(ae=M.next()).done;)ae=ae.value,me=$+Z(ae,oe++),Q+=j(ae,U,V,me,ce);else if(me==="object"){if(typeof M.then=="function")return j(ee(M),U,V,ae,ce);throw U=String(M),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return Q}function Y(M,U,V){if(M==null)return M;var ae=[],ce=0;return j(M,ae,"","",function(me){return U.call(V,me,ce++)}),ae}function K(M){if(M._status===-1){var U=M._result;U=U(),U.then(function(V){(M._status===0||M._status===-1)&&(M._status=1,M._result=V)},function(V){(M._status===0||M._status===-1)&&(M._status=2,M._result=V)}),M._status===-1&&(M._status=0,M._result=U)}if(M._status===1)return M._result.default;throw M._result}var O=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},H={map:Y,forEach:function(M,U,V){Y(M,function(){U.apply(this,arguments)},V)},count:function(M){var U=0;return Y(M,function(){U++}),U},toArray:function(M){return Y(M,function(U){return U})||[]},only:function(M){if(!P(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return Pe.Activity=f,Pe.Children=H,Pe.Component=S,Pe.Fragment=s,Pe.Profiler=l,Pe.PureComponent=g,Pe.StrictMode=o,Pe.Suspense=u,Pe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,Pe.__COMPILER_RUNTIME={__proto__:null,c:function(M){return D.H.useMemoCache(M)}},Pe.cache=function(M){return function(){return M.apply(null,arguments)}},Pe.cacheSignal=function(){return null},Pe.cloneElement=function(M,U,V){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var ae=E({},M.props),ce=M.key;if(U!=null)for(me in U.key!==void 0&&(ce=""+U.key),U)!T.call(U,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&U.ref===void 0||(ae[me]=U[me]);var me=arguments.length-2;if(me===1)ae.children=V;else if(1<me){for(var Q=Array(me),$=0;$<me;$++)Q[$]=arguments[$+2];ae.children=Q}return B(M.type,ce,ae)},Pe.createContext=function(M){return M={$$typeof:b,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:y,_context:M},M},Pe.createElement=function(M,U,V){var ae,ce={},me=null;if(U!=null)for(ae in U.key!==void 0&&(me=""+U.key),U)T.call(U,ae)&&ae!=="key"&&ae!=="__self"&&ae!=="__source"&&(ce[ae]=U[ae]);var Q=arguments.length-2;if(Q===1)ce.children=V;else if(1<Q){for(var $=Array(Q),oe=0;oe<Q;oe++)$[oe]=arguments[oe+2];ce.children=$}if(M&&M.defaultProps)for(ae in Q=M.defaultProps,Q)ce[ae]===void 0&&(ce[ae]=Q[ae]);return B(M,me,ce)},Pe.createRef=function(){return{current:null}},Pe.forwardRef=function(M){return{$$typeof:c,render:M}},Pe.isValidElement=P,Pe.lazy=function(M){return{$$typeof:v,_payload:{_status:-1,_result:M},_init:K}},Pe.memo=function(M,U){return{$$typeof:h,type:M,compare:U===void 0?null:U}},Pe.startTransition=function(M){var U=D.T,V={};D.T=V;try{var ae=M(),ce=D.S;ce!==null&&ce(V,ae),typeof ae=="object"&&ae!==null&&typeof ae.then=="function"&&ae.then(L,O)}catch(me){O(me)}finally{U!==null&&V.types!==null&&(U.types=V.types),D.T=U}},Pe.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},Pe.use=function(M){return D.H.use(M)},Pe.useActionState=function(M,U,V){return D.H.useActionState(M,U,V)},Pe.useCallback=function(M,U){return D.H.useCallback(M,U)},Pe.useContext=function(M){return D.H.useContext(M)},Pe.useDebugValue=function(){},Pe.useDeferredValue=function(M,U){return D.H.useDeferredValue(M,U)},Pe.useEffect=function(M,U){return D.H.useEffect(M,U)},Pe.useEffectEvent=function(M){return D.H.useEffectEvent(M)},Pe.useId=function(){return D.H.useId()},Pe.useImperativeHandle=function(M,U,V){return D.H.useImperativeHandle(M,U,V)},Pe.useInsertionEffect=function(M,U){return D.H.useInsertionEffect(M,U)},Pe.useLayoutEffect=function(M,U){return D.H.useLayoutEffect(M,U)},Pe.useMemo=function(M,U){return D.H.useMemo(M,U)},Pe.useOptimistic=function(M,U){return D.H.useOptimistic(M,U)},Pe.useReducer=function(M,U,V){return D.H.useReducer(M,U,V)},Pe.useRef=function(M){return D.H.useRef(M)},Pe.useState=function(M){return D.H.useState(M)},Pe.useSyncExternalStore=function(M,U,V){return D.H.useSyncExternalStore(M,U,V)},Pe.useTransition=function(){return D.H.useTransition()},Pe.version="19.2.7",Pe}var jm;function Rf(){return jm||(jm=1,pd.exports=W1()),pd.exports}var te=Rf(),_d={exports:{}},No={},gd={exports:{}},md={};var Fm;function G1(){return Fm||(Fm=1,(function(t){function n(j,Y){var K=j.length;j.push(Y);e:for(;0<K;){var O=K-1>>>1,H=j[O];if(0<l(H,Y))j[O]=Y,j[K]=H,K=O;else break e}}function s(j){return j.length===0?null:j[0]}function o(j){if(j.length===0)return null;var Y=j[0],K=j.pop();if(K!==Y){j[0]=K;e:for(var O=0,H=j.length,M=H>>>1;O<M;){var U=2*(O+1)-1,V=j[U],ae=U+1,ce=j[ae];if(0>l(V,K))ae<H&&0>l(ce,V)?(j[O]=ce,j[ae]=K,O=ae):(j[O]=V,j[U]=K,O=U);else if(ae<H&&0>l(ce,K))j[O]=ce,j[ae]=K,O=ae;else break e}}return Y}function l(j,Y){var K=j.sortIndex-Y.sortIndex;return K!==0?K:j.id-Y.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var y=performance;t.unstable_now=function(){return y.now()}}else{var b=Date,c=b.now();t.unstable_now=function(){return b.now()-c}}var u=[],h=[],v=1,f=null,C=3,x=!1,A=!1,E=!1,p=!1,S=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;function w(j){for(var Y=s(h);Y!==null;){if(Y.callback===null)o(h);else if(Y.startTime<=j)o(h),Y.sortIndex=Y.expirationTime,n(u,Y);else break;Y=s(h)}}function R(j){if(E=!1,w(j),!A)if(s(u)!==null)A=!0,L||(L=!0,F());else{var Y=s(h);Y!==null&&ee(R,Y.startTime-j)}}var L=!1,D=-1,T=5,B=-1;function W(){return p?!0:!(t.unstable_now()-B<T)}function P(){if(p=!1,L){var j=t.unstable_now();B=j;var Y=!0;try{e:{A=!1,E&&(E=!1,_(D),D=-1),x=!0;var K=C;try{t:{for(w(j),f=s(u);f!==null&&!(f.expirationTime>j&&W());){var O=f.callback;if(typeof O=="function"){f.callback=null,C=f.priorityLevel;var H=O(f.expirationTime<=j);if(j=t.unstable_now(),typeof H=="function"){f.callback=H,w(j),Y=!0;break t}f===s(u)&&o(u),w(j)}else o(u);f=s(u)}if(f!==null)Y=!0;else{var M=s(h);M!==null&&ee(R,M.startTime-j),Y=!1}}break e}finally{f=null,C=K,x=!1}Y=void 0}}finally{Y?F():L=!1}}}var F;if(typeof g=="function")F=function(){g(P)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,Z=I.port2;I.port1.onmessage=P,F=function(){Z.postMessage(null)}}else F=function(){S(P,0)};function ee(j,Y){D=S(function(){j(t.unstable_now())},Y)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(j){j.callback=null},t.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<j?Math.floor(1e3/j):5},t.unstable_getCurrentPriorityLevel=function(){return C},t.unstable_next=function(j){switch(C){case 1:case 2:case 3:var Y=3;break;default:Y=C}var K=C;C=Y;try{return j()}finally{C=K}},t.unstable_requestPaint=function(){p=!0},t.unstable_runWithPriority=function(j,Y){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var K=C;C=j;try{return Y()}finally{C=K}},t.unstable_scheduleCallback=function(j,Y,K){var O=t.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?O+K:O):K=O,j){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=K+H,j={id:v++,callback:Y,priorityLevel:j,startTime:K,expirationTime:H,sortIndex:-1},K>O?(j.sortIndex=K,n(h,j),s(u)===null&&j===s(h)&&(E?(_(D),D=-1):E=!0,ee(R,K-O))):(j.sortIndex=H,n(u,j),A||x||(A=!0,L||(L=!0,F()))),j},t.unstable_shouldYield=W,t.unstable_wrapCallback=function(j){var Y=C;return function(){var K=C;C=Y;try{return j.apply(this,arguments)}finally{C=K}}}})(md)),md}var qm;function K1(){return qm||(qm=1,gd.exports=G1()),gd.exports}var vd={exports:{}},Ri={};var Wm;function Y1(){if(Wm)return Ri;Wm=1;var t=Rf();function n(u){var h="https://react.dev/errors/"+u;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)h+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+u+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var o={d:{f:s,r:function(){throw Error(n(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},l=Symbol.for("react.portal");function y(u,h,v){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:f==null?null:""+f,children:u,containerInfo:h,implementation:v}}var b=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(u,h){if(u==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Ri.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Ri.createPortal=function(u,h){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(n(299));return y(u,h,null,v)},Ri.flushSync=function(u){var h=b.T,v=o.p;try{if(b.T=null,o.p=2,u)return u()}finally{b.T=h,o.p=v,o.d.f()}},Ri.preconnect=function(u,h){typeof u=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(u,h))},Ri.prefetchDNS=function(u){typeof u=="string"&&o.d.D(u)},Ri.preinit=function(u,h){if(typeof u=="string"&&h&&typeof h.as=="string"){var v=h.as,f=c(v,h.crossOrigin),C=typeof h.integrity=="string"?h.integrity:void 0,x=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;v==="style"?o.d.S(u,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:f,integrity:C,fetchPriority:x}):v==="script"&&o.d.X(u,{crossOrigin:f,integrity:C,fetchPriority:x,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Ri.preinitModule=function(u,h){if(typeof u=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var v=c(h.as,h.crossOrigin);o.d.M(u,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&o.d.M(u)},Ri.preload=function(u,h){if(typeof u=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var v=h.as,f=c(v,h.crossOrigin);o.d.L(u,v,{crossOrigin:f,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Ri.preloadModule=function(u,h){if(typeof u=="string")if(h){var v=c(h.as,h.crossOrigin);o.d.m(u,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(u)},Ri.requestFormReset=function(u){o.d.r(u)},Ri.unstable_batchedUpdates=function(u,h){return u(h)},Ri.useFormState=function(u,h,v){return b.H.useFormState(u,h,v)},Ri.useFormStatus=function(){return b.H.useHostTransitionStatus()},Ri.version="19.2.7",Ri}var Gm;function V1(){if(Gm)return vd.exports;Gm=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),vd.exports=Y1(),vd.exports}var Km;function X1(){if(Km)return No;Km=1;var t=K1(),n=Rf(),s=V1();function o(e){var i="https://react.dev/errors/"+e;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)i+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function y(e){var i=e,r=e;if(e.alternate)for(;i.return;)i=i.return;else{e=i;do i=e,(i.flags&4098)!==0&&(r=i.return),e=i.return;while(e)}return i.tag===3?r:null}function b(e){if(e.tag===13){var i=e.memoizedState;if(i===null&&(e=e.alternate,e!==null&&(i=e.memoizedState)),i!==null)return i.dehydrated}return null}function c(e){if(e.tag===31){var i=e.memoizedState;if(i===null&&(e=e.alternate,e!==null&&(i=e.memoizedState)),i!==null)return i.dehydrated}return null}function u(e){if(y(e)!==e)throw Error(o(188))}function h(e){var i=e.alternate;if(!i){if(i=y(e),i===null)throw Error(o(188));return i!==e?null:e}for(var r=e,a=i;;){var d=r.return;if(d===null)break;var m=d.alternate;if(m===null){if(a=d.return,a!==null){r=a;continue}break}if(d.child===m.child){for(m=d.child;m;){if(m===r)return u(d),e;if(m===a)return u(d),i;m=m.sibling}throw Error(o(188))}if(r.return!==a.return)r=d,a=m;else{for(var k=!1,N=d.child;N;){if(N===r){k=!0,r=d,a=m;break}if(N===a){k=!0,a=d,r=m;break}N=N.sibling}if(!k){for(N=m.child;N;){if(N===r){k=!0,r=m,a=d;break}if(N===a){k=!0,a=m,r=d;break}N=N.sibling}if(!k)throw Error(o(189))}}if(r.alternate!==a)throw Error(o(190))}if(r.tag!==3)throw Error(o(188));return r.stateNode.current===r?e:i}function v(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e;for(e=e.child;e!==null;){if(i=v(e),i!==null)return i;e=e.sibling}return null}var f=Object.assign,C=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),g=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),W=Symbol.for("react.memo_cache_sentinel"),P=Symbol.iterator;function F(e){return e===null||typeof e!="object"?null:(e=P&&e[P]||e["@@iterator"],typeof e=="function"?e:null)}var I=Symbol.for("react.client.reference");function Z(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===I?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case S:return"Profiler";case p:return"StrictMode";case R:return"Suspense";case L:return"SuspenseList";case B:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case A:return"Portal";case g:return e.displayName||"Context";case _:return(e._context.displayName||"Context")+".Consumer";case w:var i=e.render;return e=e.displayName,e||(e=i.displayName||i.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case D:return i=e.displayName||null,i!==null?i:Z(e.type)||"Memo";case T:i=e._payload,e=e._init;try{return Z(e(i))}catch{}}return null}var ee=Array.isArray,j=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K={pending:!1,data:null,method:null,action:null},O=[],H=-1;function M(e){return{current:e}}function U(e){0>H||(e.current=O[H],O[H]=null,H--)}function V(e,i){H++,O[H]=e.current,e.current=i}var ae=M(null),ce=M(null),me=M(null),Q=M(null);function $(e,i){switch(V(me,i),V(ce,e),V(ae,null),i.nodeType){case 9:case 11:e=(e=i.documentElement)&&(e=e.namespaceURI)?lm(e):0;break;default:if(e=i.tagName,i=i.namespaceURI)i=lm(i),e=cm(i,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}U(ae),V(ae,e)}function oe(){U(ae),U(ce),U(me)}function _e(e){e.memoizedState!==null&&V(Q,e);var i=ae.current,r=cm(i,e.type);i!==r&&(V(ce,e),V(ae,r))}function Se(e){ce.current===e&&(U(ae),U(ce)),Q.current===e&&(U(Q),ko._currentValue=K)}var be,$e;function je(e){if(be===void 0)try{throw Error()}catch(r){var i=r.stack.trim().match(/\n( *(at )?)/);be=i&&i[1]||"",$e=-1<r.stack.indexOf(`
|
|
2
2
|
at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+be+e+$e}var Ke=!1;function Ct(e,
|
|
3
|
+
`+be+e+$e}var Ke=!1;function Ct(e,i){if(!e||Ke)return"";Ke=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(i){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(le){var se=le}Reflect.construct(e,[],fe)}else{try{fe.call()}catch(le){se=le}e.call(fe.prototype)}}else{try{throw Error()}catch(le){se=le}(fe=e())&&typeof fe.catch=="function"&&fe.catch(function(){})}}catch(le){if(le&&se&&typeof le.stack=="string")return[le.stack,se.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=a.DetermineComponentFrameRoot(),k=m[0],N=m[1];if(k&&N){var G=k.split(`
|
|
4
4
|
`),re=N.split(`
|
|
5
5
|
`);for(d=a=0;a<G.length&&!G[a].includes("DetermineComponentFrameRoot");)a++;for(;d<re.length&&!re[d].includes("DetermineComponentFrameRoot");)d++;if(a===G.length||d===re.length)for(a=G.length-1,d=re.length-1;1<=a&&0<=d&&G[a]!==re[d];)d--;for(;1<=a&&0<=d;a--,d--)if(G[a]!==re[d]){if(a!==1||d!==1)do if(a--,d--,0>d||G[a]!==re[d]){var ue=`
|
|
6
|
-
`+G[a].replace(" at new "," at ");return e.displayName&&ue.includes("<anonymous>")&&(ue=ue.replace("<anonymous>",e.displayName)),ue}while(1<=a&&0<=d);break}}}finally{Ke=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?je(r):""}function Be(e,
|
|
6
|
+
`+G[a].replace(" at new "," at ");return e.displayName&&ue.includes("<anonymous>")&&(ue=ue.replace("<anonymous>",e.displayName)),ue}while(1<=a&&0<=d);break}}}finally{Ke=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?je(r):""}function Be(e,i){switch(e.tag){case 26:case 27:case 5:return je(e.type);case 16:return je("Lazy");case 13:return e.child!==i&&i!==null?je("Suspense Fallback"):je("Suspense");case 19:return je("SuspenseList");case 0:case 15:return Ct(e.type,!1);case 11:return Ct(e.type.render,!1);case 1:return Ct(e.type,!0);case 31:return je("Activity");default:return""}}function Qt(e){try{var i="",r=null;do i+=Be(e,r),r=e,e=e.return;while(e);return i}catch(a){return`
|
|
7
7
|
Error generating stack: `+a.message+`
|
|
8
|
-
`+a.stack}}var gi=Object.prototype.hasOwnProperty,mi=i.unstable_scheduleCallback,un=i.unstable_cancelCallback,An=i.unstable_shouldYield,Jt=i.unstable_requestPaint,lt=i.unstable_now,Gt=i.unstable_getCurrentPriorityLevel,It=i.unstable_ImmediatePriority,Ht=i.unstable_UserBlockingPriority,ei=i.unstable_NormalPriority,Rn=i.unstable_LowPriority,Ti=i.unstable_IdlePriority,Xi=i.log,ut=i.unstable_setDisableYieldValue,Ii=null,Kt=null;function Yt(e){if(typeof Xi=="function"&&ut(e),Kt&&typeof Kt.setStrictMode=="function")try{Kt.setStrictMode(Ii,e)}catch{}}var zt=Math.clz32?Math.clz32:Ps,us=Math.log,er=Math.LN2;function Ps(e){return e>>>=0,e===0?32:31-(us(e)/er|0)|0}var Ln=256,Pn=262144,tr=4194304;function ti(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function X(e,t,r){var a=e.pendingLanes;if(a===0)return 0;var d=0,m=e.suspendedLanes,k=e.pingedLanes;e=e.warmLanes;var N=a&134217727;return N!==0?(a=N&~m,a!==0?d=ti(a):(k&=N,k!==0?d=ti(k):r||(r=N&~e,r!==0&&(d=ti(r))))):(N=a&~m,N!==0?d=ti(N):k!==0?d=ti(k):r||(r=a&~e,r!==0&&(d=ti(r)))),d===0?0:t!==0&&t!==d&&(t&m)===0&&(m=d&-d,r=t&-t,m>=r||m===32&&(r&4194048)!==0)?t:d}function he(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ve(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 Ie(){var e=tr;return tr<<=1,(tr&62914560)===0&&(tr=4194304),e}function St(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function ht(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ee(e,t,r,a,d,m){var k=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var N=e.entanglements,G=e.expirationTimes,re=e.hiddenUpdates;for(r=k&~r;0<r;){var ue=31-zt(r),fe=1<<ue;N[ue]=0,G[ue]=-1;var se=re[ue];if(se!==null)for(re[ue]=null,ue=0;ue<se.length;ue++){var le=se[ue];le!==null&&(le.lane&=-536870913)}r&=~fe}a!==0&&Ce(e,a,0),m!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=m&~(k&~t))}function Ce(e,t,r){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-zt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|r&261930}function He(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var a=31-zt(r),d=1<<a;d&t|e[a]&t&&(e[a]|=t),r&=~d}}function Bt(e,t){var r=t&-t;return r=(r&42)!==0?1:Qe(r),(r&(e.suspendedLanes|t))!==0?0:r}function Qe(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function vi(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ir(){var e=Y.p;return e!==0?e:(e=window.event,e===void 0?32:Dm(e.type))}function nr(e,t){var r=Y.p;try{return Y.p=e,t()}finally{Y.p=r}}var Hi=Math.random().toString(36).slice(2),xt="__reactFiber$"+Hi,wt="__reactProps$"+Hi,kn="__reactContainer$"+Hi,Mr="__reactEvents$"+Hi,js="__reactListeners$"+Hi,rr="__reactHandles$"+Hi,hs="__reactResources$"+Hi,jn="__reactMarker$"+Hi;function Me(e){delete e[xt],delete e[wt],delete e[Mr],delete e[js],delete e[rr]}function q(e){var t=e[xt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[kn]||r[xt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=gm(e);e!==null;){if(r=e[xt])return r;e=gm(e)}return t}e=r,r=e.parentNode}return null}function pe(e){if(e=e[xt]||e[kn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function we(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function it(e){var t=e[hs];return t||(t=e[hs]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ye(e){e[jn]=!0}var Tt=new Set,$t={};function Ut(e,t){ge(e,t),ge(e+"Capture",t)}function ge(e,t){for($t[e]=t,e=0;e<t.length;e++)Tt.add(t[e])}var Le=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]*$"),De={},rt={};function Mt(e){return gi.call(rt,e)?!0:gi.call(De,e)?!1:Le.test(e)?rt[e]=!0:(De[e]=!0,!1)}function Ai(e,t,r){if(Mt(t))if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+r)}}function Zi(e,t,r){if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+r)}}function zi(e,t,r,a){if(a===null)e.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(t,r,""+a)}}function Et(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Qi(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ul(e,t,r){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var d=a.get,m=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return d.call(this)},set:function(k){r=""+k,m.call(this,k)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return r},setValue:function(k){r=""+k},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Fs(e){if(!e._valueTracker){var t=Qi(e)?"checked":"value";e._valueTracker=ul(e,t,""+e[t])}}function ja(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),a="";return e&&(a=Qi(e)?e.checked?"true":"false":e.value),e=a,e!==r?(t.setValue(e),!0):!1}function qs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var du=/[\n"\\]/g;function $i(e){return e.replace(du,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Fa(e,t,r,a,d,m,k,N){e.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?e.type=k:e.removeAttribute("type"),t!=null?k==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Et(t)):e.value!==""+Et(t)&&(e.value=""+Et(t)):k!=="submit"&&k!=="reset"||e.removeAttribute("value"),t!=null?Ws(e,k,Et(t)):r!=null?Ws(e,k,Et(r)):a!=null&&e.removeAttribute("value"),d==null&&m!=null&&(e.defaultChecked=!!m),d!=null&&(e.checked=d&&typeof d!="function"&&typeof d!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?e.name=""+Et(N):e.removeAttribute("name")}function ds(e,t,r,a,d,m,k,N){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(e.type=m),t!=null||r!=null){if(!(m!=="submit"&&m!=="reset"||t!=null)){Fs(e);return}r=r!=null?""+Et(r):"",t=t!=null?""+Et(t):r,N||t===e.value||(e.value=t),e.defaultValue=t}a=a??d,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=N?e.checked:!!a,e.defaultChecked=!!a,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(e.name=k),Fs(e)}function Ws(e,t,r){t==="number"&&qs(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function bi(e,t,r,a){if(e=e.options,t){t={};for(var d=0;d<r.length;d++)t["$"+r[d]]=!0;for(r=0;r<e.length;r++)d=t.hasOwnProperty("$"+e[r].value),e[r].selected!==d&&(e[r].selected=d),d&&a&&(e[r].defaultSelected=!0)}else{for(r=""+Et(r),t=null,d=0;d<e.length;d++){if(e[d].value===r){e[d].selected=!0,a&&(e[d].defaultSelected=!0);return}t!==null||e[d].disabled||(t=e[d])}t!==null&&(t.selected=!0)}}function hl(e,t,r){if(t!=null&&(t=""+Et(t),t!==e.value&&(e.value=t),r==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=r!=null?""+Et(r):""}function Gs(e,t,r,a){if(t==null){if(a!=null){if(r!=null)throw Error(o(92));if(ee(a)){if(1<a.length)throw Error(o(93));a=a[0]}r=a}r==null&&(r=""),t=r}r=Et(t),e.defaultValue=r,a=e.textContent,a===r&&a!==""&&a!==null&&(e.value=a),Fs(e)}function Ue(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var dl=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 ii(e,t,r){var a=t.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,r):typeof r!="number"||r===0||dl.has(t)?t==="float"?e.cssFloat=r:e[t]=(""+r).trim():e[t]=r+"px"}function ft(e,t,r){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,r!=null){for(var a in r)!r.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var d in t)a=t[d],t.hasOwnProperty(d)&&r[d]!==a&&ii(e,d,a)}else for(var m in t)t.hasOwnProperty(m)&&ii(e,m,t[m])}function Dr(e){if(e.indexOf("-")===-1)return!1;switch(e){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 sr=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"]]),qa=/^[\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 Or(e){return qa.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ye(){}var Ae=null;function Fe(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Je=null,Nt=null;function hn(e){var t=pe(e);if(t&&(e=t.stateNode)){var r=e[wt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Fa(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+$i(""+t)+'"][type="radio"]'),t=0;t<r.length;t++){var a=r[t];if(a!==e&&a.form===e.form){var d=a[wt]||null;if(!d)throw Error(o(90));Fa(a,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(t=0;t<r.length;t++)a=r[t],a.form===e.form&&ja(a)}break e;case"textarea":hl(e,r.value,r.defaultValue);break e;case"select":t=r.value,t!=null&&bi(e,!!r.multiple,t,!1)}}}var Wa=!1;function fl(e,t,r){if(Wa)return e(t,r);Wa=!0;try{var a=e(t);return a}finally{if(Wa=!1,(Je!==null||Nt!==null)&&(ec(),Je&&(t=Je,e=Nt,Nt=Je=null,hn(t),e)))for(t=0;t<e.length;t++)hn(e[t])}}function Ga(e,t){var r=e.stateNode;if(r===null)return null;var a=r[wt]||null;if(a===null)return null;r=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(o(231,t,typeof r));return r}var ar=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fu=!1;if(ar)try{var Ka={};Object.defineProperty(Ka,"passive",{get:function(){fu=!0}}),window.addEventListener("test",Ka,Ka),window.removeEventListener("test",Ka,Ka)}catch{fu=!1}var Br=null,pu=null,pl=null;function cp(){if(pl)return pl;var e,t=pu,r=t.length,a,d="value"in Br?Br.value:Br.textContent,m=d.length;for(e=0;e<r&&t[e]===d[e];e++);var k=r-e;for(a=1;a<=k&&t[r-a]===d[m-a];a++);return pl=d.slice(e,1<a?1-a:void 0)}function _l(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function gl(){return!0}function up(){return!1}function Ui(e){function t(r,a,d,m,k){this._reactName=r,this._targetInst=d,this.type=a,this.nativeEvent=m,this.target=k,this.currentTarget=null;for(var N in e)e.hasOwnProperty(N)&&(r=e[N],this[N]=r?r(m):m[N]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?gl:up,this.isPropagationStopped=up,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=gl)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=gl)},persist:function(){},isPersistent:gl}),t}var fs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ml=Ui(fs),Ya=f({},fs,{view:0,detail:0}),$S=Ui(Ya),_u,gu,Va,vl=f({},Ya,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Va&&(Va&&e.type==="mousemove"?(_u=e.screenX-Va.screenX,gu=e.screenY-Va.screenY):gu=_u=0,Va=e),_u)},movementY:function(e){return"movementY"in e?e.movementY:gu}}),hp=Ui(vl),US=f({},vl,{dataTransfer:0}),PS=Ui(US),jS=f({},Ya,{relatedTarget:0}),mu=Ui(jS),FS=f({},fs,{animationName:0,elapsedTime:0,pseudoElement:0}),qS=Ui(FS),WS=f({},fs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),GS=Ui(WS),KS=f({},fs,{data:0}),dp=Ui(KS),YS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},VS={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"},XS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ZS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=XS[e])?!!t[e]:!1}function vu(){return ZS}var QS=f({},Ya,{key:function(e){if(e.key){var t=YS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=_l(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?VS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vu,charCode:function(e){return e.type==="keypress"?_l(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?_l(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),JS=Ui(QS),ey=f({},vl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),fp=Ui(ey),ty=f({},Ya,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vu}),iy=Ui(ty),ny=f({},fs,{propertyName:0,elapsedTime:0,pseudoElement:0}),ry=Ui(ny),sy=f({},vl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),ay=Ui(sy),oy=f({},fs,{newState:0,oldState:0}),ly=Ui(oy),cy=[9,13,27,32],bu=ar&&"CompositionEvent"in window,Xa=null;ar&&"documentMode"in document&&(Xa=document.documentMode);var uy=ar&&"TextEvent"in window&&!Xa,pp=ar&&(!bu||Xa&&8<Xa&&11>=Xa),_p=" ",gp=!1;function mp(e,t){switch(e){case"keyup":return cy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ks=!1;function hy(e,t){switch(e){case"compositionend":return vp(t);case"keypress":return t.which!==32?null:(gp=!0,_p);case"textInput":return e=t.data,e===_p&&gp?null:e;default:return null}}function dy(e,t){if(Ks)return e==="compositionend"||!bu&&mp(e,t)?(e=cp(),pl=pu=Br=null,Ks=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return pp&&t.locale!=="ko"?null:t.data;default:return null}}var fy={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 bp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!fy[e.type]:t==="textarea"}function Sp(e,t,r,a){Je?Nt?Nt.push(a):Nt=[a]:Je=a,t=oc(t,"onChange"),0<t.length&&(r=new ml("onChange","change",null,r,a),e.push({event:r,listeners:t}))}var Za=null,Qa=null;function py(e){im(e,0)}function bl(e){var t=we(e);if(ja(t))return e}function yp(e,t){if(e==="change")return t}var Cp=!1;if(ar){var Su;if(ar){var yu="oninput"in document;if(!yu){var wp=document.createElement("div");wp.setAttribute("oninput","return;"),yu=typeof wp.oninput=="function"}Su=yu}else Su=!1;Cp=Su&&(!document.documentMode||9<document.documentMode)}function Ep(){Za&&(Za.detachEvent("onpropertychange",xp),Qa=Za=null)}function xp(e){if(e.propertyName==="value"&&bl(Qa)){var t=[];Sp(t,Qa,e,Fe(e)),fl(py,t)}}function _y(e,t,r){e==="focusin"?(Ep(),Za=t,Qa=r,Za.attachEvent("onpropertychange",xp)):e==="focusout"&&Ep()}function gy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return bl(Qa)}function my(e,t){if(e==="click")return bl(t)}function vy(e,t){if(e==="input"||e==="change")return bl(t)}function by(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ji=typeof Object.is=="function"?Object.is:by;function Ja(e,t){if(Ji(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),a=Object.keys(t);if(r.length!==a.length)return!1;for(a=0;a<r.length;a++){var d=r[a];if(!gi.call(t,d)||!Ji(e[d],t[d]))return!1}return!0}function Tp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ap(e,t){var r=Tp(e);e=0;for(var a;r;){if(r.nodeType===3){if(a=e+r.textContent.length,e<=t&&a>=t)return{node:r,offset:t-e};e=a}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Tp(r)}}function Rp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Rp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Lp(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=qs(e.document);t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=qs(e.document)}return t}function Cu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Sy=ar&&"documentMode"in document&&11>=document.documentMode,Ys=null,wu=null,eo=null,Eu=!1;function kp(e,t,r){var a=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Eu||Ys==null||Ys!==qs(a)||(a=Ys,"selectionStart"in a&&Cu(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),eo&&Ja(eo,a)||(eo=a,a=oc(wu,"onSelect"),0<a.length&&(t=new ml("onSelect","select",null,t,r),e.push({event:t,listeners:a}),t.target=Ys)))}function ps(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Vs={animationend:ps("Animation","AnimationEnd"),animationiteration:ps("Animation","AnimationIteration"),animationstart:ps("Animation","AnimationStart"),transitionrun:ps("Transition","TransitionRun"),transitionstart:ps("Transition","TransitionStart"),transitioncancel:ps("Transition","TransitionCancel"),transitionend:ps("Transition","TransitionEnd")},xu={},Mp={};ar&&(Mp=document.createElement("div").style,"AnimationEvent"in window||(delete Vs.animationend.animation,delete Vs.animationiteration.animation,delete Vs.animationstart.animation),"TransitionEvent"in window||delete Vs.transitionend.transition);function _s(e){if(xu[e])return xu[e];if(!Vs[e])return e;var t=Vs[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Mp)return xu[e]=t[r];return e}var Dp=_s("animationend"),Op=_s("animationiteration"),Bp=_s("animationstart"),yy=_s("transitionrun"),Cy=_s("transitionstart"),wy=_s("transitioncancel"),Np=_s("transitionend"),Ip=new Map,Tu="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(" ");Tu.push("scrollEnd");function Mn(e,t){Ip.set(e,t),Ut(t,[e])}var Sl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},dn=[],Xs=0,Au=0;function yl(){for(var e=Xs,t=Au=Xs=0;t<e;){var r=dn[t];dn[t++]=null;var a=dn[t];dn[t++]=null;var d=dn[t];dn[t++]=null;var m=dn[t];if(dn[t++]=null,a!==null&&d!==null){var k=a.pending;k===null?d.next=d:(d.next=k.next,k.next=d),a.pending=d}m!==0&&Hp(r,d,m)}}function Cl(e,t,r,a){dn[Xs++]=e,dn[Xs++]=t,dn[Xs++]=r,dn[Xs++]=a,Au|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Ru(e,t,r,a){return Cl(e,t,r,a),wl(e)}function gs(e,t){return Cl(e,null,null,t),wl(e)}function Hp(e,t,r){e.lanes|=r;var a=e.alternate;a!==null&&(a.lanes|=r);for(var d=!1,m=e.return;m!==null;)m.childLanes|=r,a=m.alternate,a!==null&&(a.childLanes|=r),m.tag===22&&(e=m.stateNode,e===null||e._visibility&1||(d=!0)),e=m,m=m.return;return e.tag===3?(m=e.stateNode,d&&t!==null&&(d=31-zt(r),e=m.hiddenUpdates,a=e[d],a===null?e[d]=[t]:a.push(t),t.lane=r|536870912),m):null}function wl(e){if(50<wo)throw wo=0,Hh=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Zs={};function Ey(e,t,r,a){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function en(e,t,r,a){return new Ey(e,t,r,a)}function Lu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function or(e,t){var r=e.alternate;return r===null?(r=en(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function zp(e,t){e.flags&=65011714;var r=e.alternate;return r===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,t=r.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function El(e,t,r,a,d,m){var k=0;if(a=e,typeof e=="function")Lu(e)&&(k=1);else if(typeof e=="string")k=L1(e,r,ae.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case B:return e=en(31,r,t,d),e.elementType=B,e.lanes=m,e;case E:return ms(r.children,d,m,t);case p:k=8,d|=24;break;case S:return e=en(12,r,t,d|2),e.elementType=S,e.lanes=m,e;case R:return e=en(13,r,t,d),e.elementType=R,e.lanes=m,e;case L:return e=en(19,r,t,d),e.elementType=L,e.lanes=m,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case g:k=10;break e;case _:k=9;break e;case w:k=11;break e;case D:k=14;break e;case T:k=16,a=null;break e}k=29,r=Error(o(130,e===null?"null":typeof e,"")),a=null}return t=en(k,r,t,d),t.elementType=e,t.type=a,t.lanes=m,t}function ms(e,t,r,a){return e=en(7,e,a,t),e.lanes=r,e}function ku(e,t,r){return e=en(6,e,null,t),e.lanes=r,e}function $p(e){var t=en(18,null,null,0);return t.stateNode=e,t}function Mu(e,t,r){return t=en(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Up=new WeakMap;function fn(e,t){if(typeof e=="object"&&e!==null){var r=Up.get(e);return r!==void 0?r:(t={value:e,source:t,stack:Qt(t)},Up.set(e,t),t)}return{value:e,source:t,stack:Qt(t)}}var Qs=[],Js=0,xl=null,to=0,pn=[],_n=0,Nr=null,Fn=1,qn="";function lr(e,t){Qs[Js++]=to,Qs[Js++]=xl,xl=e,to=t}function Pp(e,t,r){pn[_n++]=Fn,pn[_n++]=qn,pn[_n++]=Nr,Nr=e;var a=Fn;e=qn;var d=32-zt(a)-1;a&=~(1<<d),r+=1;var m=32-zt(t)+d;if(30<m){var k=d-d%5;m=(a&(1<<k)-1).toString(32),a>>=k,d-=k,Fn=1<<32-zt(t)+d|r<<d|a,qn=m+e}else Fn=1<<m|r<<d|a,qn=e}function Du(e){e.return!==null&&(lr(e,1),Pp(e,1,0))}function Ou(e){for(;e===xl;)xl=Qs[--Js],Qs[Js]=null,to=Qs[--Js],Qs[Js]=null;for(;e===Nr;)Nr=pn[--_n],pn[_n]=null,qn=pn[--_n],pn[_n]=null,Fn=pn[--_n],pn[_n]=null}function jp(e,t){pn[_n++]=Fn,pn[_n++]=qn,pn[_n++]=Nr,Fn=t.id,qn=t.overflow,Nr=e}var Si=null,At=null,nt=!1,Ir=null,gn=!1,Bu=Error(o(519));function Hr(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw io(fn(t,e)),Bu}function Fp(e){var t=e.stateNode,r=e.type,a=e.memoizedProps;switch(t[xt]=e,t[wt]=a,r){case"dialog":Xe("cancel",t),Xe("close",t);break;case"iframe":case"object":case"embed":Xe("load",t);break;case"video":case"audio":for(r=0;r<xo.length;r++)Xe(xo[r],t);break;case"source":Xe("error",t);break;case"img":case"image":case"link":Xe("error",t),Xe("load",t);break;case"details":Xe("toggle",t);break;case"input":Xe("invalid",t),ds(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Xe("invalid",t);break;case"textarea":Xe("invalid",t),Gs(t,a.value,a.defaultValue,a.children)}r=a.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||t.textContent===""+r||a.suppressHydrationWarning===!0||am(t.textContent,r)?(a.popover!=null&&(Xe("beforetoggle",t),Xe("toggle",t)),a.onScroll!=null&&Xe("scroll",t),a.onScrollEnd!=null&&Xe("scrollend",t),a.onClick!=null&&(t.onclick=ye),t=!0):t=!1,t||Hr(e,!0)}function qp(e){for(Si=e.return;Si;)switch(Si.tag){case 5:case 31:case 13:gn=!1;return;case 27:case 3:gn=!0;return;default:Si=Si.return}}function ea(e){if(e!==Si)return!1;if(!nt)return qp(e),nt=!0,!1;var t=e.tag,r;if((r=t!==3&&t!==27)&&((r=t===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||Qh(e.type,e.memoizedProps)),r=!r),r&&At&&Hr(e),qp(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));At=_m(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));At=_m(e)}else t===27?(t=At,Zr(e.type)?(e=nd,nd=null,At=e):At=t):At=Si?vn(e.stateNode.nextSibling):null;return!0}function vs(){At=Si=null,nt=!1}function Nu(){var e=Ir;return e!==null&&(qi===null?qi=e:qi.push.apply(qi,e),Ir=null),e}function io(e){Ir===null?Ir=[e]:Ir.push(e)}var Iu=M(null),bs=null,cr=null;function zr(e,t,r){V(Iu,t._currentValue),t._currentValue=r}function ur(e){e._currentValue=Iu.current,U(Iu)}function Hu(e,t,r){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===r)break;e=e.return}}function zu(e,t,r,a){var d=e.child;for(d!==null&&(d.return=e);d!==null;){var m=d.dependencies;if(m!==null){var k=d.child;m=m.firstContext;e:for(;m!==null;){var N=m;m=d;for(var G=0;G<t.length;G++)if(N.context===t[G]){m.lanes|=r,N=m.alternate,N!==null&&(N.lanes|=r),Hu(m.return,r,e),a||(k=null);break e}m=N.next}}else if(d.tag===18){if(k=d.return,k===null)throw Error(o(341));k.lanes|=r,m=k.alternate,m!==null&&(m.lanes|=r),Hu(k,r,e),k=null}else k=d.child;if(k!==null)k.return=d;else for(k=d;k!==null;){if(k===e){k=null;break}if(d=k.sibling,d!==null){d.return=k.return,k=d;break}k=k.return}d=k}}function ta(e,t,r,a){e=null;for(var d=t,m=!1;d!==null;){if(!m){if((d.flags&524288)!==0)m=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var k=d.alternate;if(k===null)throw Error(o(387));if(k=k.memoizedProps,k!==null){var N=d.type;Ji(d.pendingProps.value,k.value)||(e!==null?e.push(N):e=[N])}}else if(d===Q.current){if(k=d.alternate,k===null)throw Error(o(387));k.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(e!==null?e.push(ko):e=[ko])}d=d.return}e!==null&&zu(t,e,r,a),t.flags|=262144}function Tl(e){for(e=e.firstContext;e!==null;){if(!Ji(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ss(e){bs=e,cr=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function yi(e){return Wp(bs,e)}function Al(e,t){return bs===null&&Ss(e),Wp(e,t)}function Wp(e,t){var r=t._currentValue;if(t={context:t,memoizedValue:r,next:null},cr===null){if(e===null)throw Error(o(308));cr=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else cr=cr.next=t;return r}var xy=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(r,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(r){return r()})}},Ty=i.unstable_scheduleCallback,Ay=i.unstable_NormalPriority,ni={$$typeof:g,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function $u(){return{controller:new xy,data:new Map,refCount:0}}function no(e){e.refCount--,e.refCount===0&&Ty(Ay,function(){e.controller.abort()})}var ro=null,Uu=0,ia=0,na=null;function Ry(e,t){if(ro===null){var r=ro=[];Uu=0,ia=Fh(),na={status:"pending",value:void 0,then:function(a){r.push(a)}}}return Uu++,t.then(Gp,Gp),t}function Gp(){if(--Uu===0&&ro!==null){na!==null&&(na.status="fulfilled");var e=ro;ro=null,ia=0,na=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ly(e,t){var r=[],a={status:"pending",value:null,reason:null,then:function(d){r.push(d)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var d=0;d<r.length;d++)(0,r[d])(t)},function(d){for(a.status="rejected",a.reason=d,d=0;d<r.length;d++)(0,r[d])(void 0)}),a}var Kp=j.S;j.S=function(e,t){kg=lt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Ry(e,t),Kp!==null&&Kp(e,t)};var ys=M(null);function Pu(){var e=ys.current;return e!==null?e:yt.pooledCache}function Rl(e,t){t===null?V(ys,ys.current):V(ys,t.pool)}function Yp(){var e=Pu();return e===null?null:{parent:ni._currentValue,pool:e}}var ra=Error(o(460)),ju=Error(o(474)),Ll=Error(o(542)),kl={then:function(){}};function Vp(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Xp(e,t,r){switch(r=e[r],r===void 0?e.push(t):r!==t&&(t.then(ye,ye),t=r),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Qp(e),e;default:if(typeof t.status=="string")t.then(ye,ye);else{if(e=yt,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var d=t;d.status="fulfilled",d.value=a}},function(a){if(t.status==="pending"){var d=t;d.status="rejected",d.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Qp(e),e}throw ws=t,ra}}function Cs(e){try{var t=e._init;return t(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(ws=r,ra):r}}var ws=null;function Zp(){if(ws===null)throw Error(o(459));var e=ws;return ws=null,e}function Qp(e){if(e===ra||e===Ll)throw Error(o(483))}var sa=null,so=0;function Ml(e){var t=so;return so+=1,sa===null&&(sa=[]),Xp(sa,e,t)}function ao(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Dl(e,t){throw t.$$typeof===C?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Jp(e){function t(ie,J){if(e){var ne=ie.deletions;ne===null?(ie.deletions=[J],ie.flags|=16):ne.push(J)}}function r(ie,J){if(!e)return null;for(;J!==null;)t(ie,J),J=J.sibling;return null}function a(ie){for(var J=new Map;ie!==null;)ie.key!==null?J.set(ie.key,ie):J.set(ie.index,ie),ie=ie.sibling;return J}function d(ie,J){return ie=or(ie,J),ie.index=0,ie.sibling=null,ie}function m(ie,J,ne){return ie.index=ne,e?(ne=ie.alternate,ne!==null?(ne=ne.index,ne<J?(ie.flags|=67108866,J):ne):(ie.flags|=67108866,J)):(ie.flags|=1048576,J)}function k(ie){return e&&ie.alternate===null&&(ie.flags|=67108866),ie}function N(ie,J,ne,de){return J===null||J.tag!==6?(J=ku(ne,ie.mode,de),J.return=ie,J):(J=d(J,ne),J.return=ie,J)}function G(ie,J,ne,de){var Ne=ne.type;return Ne===E?ue(ie,J,ne.props.children,de,ne.key):J!==null&&(J.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===T&&Cs(Ne)===J.type)?(J=d(J,ne.props),ao(J,ne),J.return=ie,J):(J=El(ne.type,ne.key,ne.props,null,ie.mode,de),ao(J,ne),J.return=ie,J)}function re(ie,J,ne,de){return J===null||J.tag!==4||J.stateNode.containerInfo!==ne.containerInfo||J.stateNode.implementation!==ne.implementation?(J=Mu(ne,ie.mode,de),J.return=ie,J):(J=d(J,ne.children||[]),J.return=ie,J)}function ue(ie,J,ne,de,Ne){return J===null||J.tag!==7?(J=ms(ne,ie.mode,de,Ne),J.return=ie,J):(J=d(J,ne),J.return=ie,J)}function fe(ie,J,ne){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return J=ku(""+J,ie.mode,ne),J.return=ie,J;if(typeof J=="object"&&J!==null){switch(J.$$typeof){case x:return ne=El(J.type,J.key,J.props,null,ie.mode,ne),ao(ne,J),ne.return=ie,ne;case A:return J=Mu(J,ie.mode,ne),J.return=ie,J;case T:return J=Cs(J),fe(ie,J,ne)}if(ee(J)||F(J))return J=ms(J,ie.mode,ne,null),J.return=ie,J;if(typeof J.then=="function")return fe(ie,Ml(J),ne);if(J.$$typeof===g)return fe(ie,Al(ie,J),ne);Dl(ie,J)}return null}function se(ie,J,ne,de){var Ne=J!==null?J.key:null;if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return Ne!==null?null:N(ie,J,""+ne,de);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case x:return ne.key===Ne?G(ie,J,ne,de):null;case A:return ne.key===Ne?re(ie,J,ne,de):null;case T:return ne=Cs(ne),se(ie,J,ne,de)}if(ee(ne)||F(ne))return Ne!==null?null:ue(ie,J,ne,de,null);if(typeof ne.then=="function")return se(ie,J,Ml(ne),de);if(ne.$$typeof===g)return se(ie,J,Al(ie,ne),de);Dl(ie,ne)}return null}function le(ie,J,ne,de,Ne){if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return ie=ie.get(ne)||null,N(J,ie,""+de,Ne);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case x:return ie=ie.get(de.key===null?ne:de.key)||null,G(J,ie,de,Ne);case A:return ie=ie.get(de.key===null?ne:de.key)||null,re(J,ie,de,Ne);case T:return de=Cs(de),le(ie,J,ne,de,Ne)}if(ee(de)||F(de))return ie=ie.get(ne)||null,ue(J,ie,de,Ne,null);if(typeof de.then=="function")return le(ie,J,ne,Ml(de),Ne);if(de.$$typeof===g)return le(ie,J,ne,Al(J,de),Ne);Dl(J,de)}return null}function xe(ie,J,ne,de){for(var Ne=null,st=null,Re=J,We=J=0,tt=null;Re!==null&&We<ne.length;We++){Re.index>We?(tt=Re,Re=null):tt=Re.sibling;var at=se(ie,Re,ne[We],de);if(at===null){Re===null&&(Re=tt);break}e&&Re&&at.alternate===null&&t(ie,Re),J=m(at,J,We),st===null?Ne=at:st.sibling=at,st=at,Re=tt}if(We===ne.length)return r(ie,Re),nt&&lr(ie,We),Ne;if(Re===null){for(;We<ne.length;We++)Re=fe(ie,ne[We],de),Re!==null&&(J=m(Re,J,We),st===null?Ne=Re:st.sibling=Re,st=Re);return nt&&lr(ie,We),Ne}for(Re=a(Re);We<ne.length;We++)tt=le(Re,ie,We,ne[We],de),tt!==null&&(e&&tt.alternate!==null&&Re.delete(tt.key===null?We:tt.key),J=m(tt,J,We),st===null?Ne=tt:st.sibling=tt,st=tt);return e&&Re.forEach(function(is){return t(ie,is)}),nt&&lr(ie,We),Ne}function ze(ie,J,ne,de){if(ne==null)throw Error(o(151));for(var Ne=null,st=null,Re=J,We=J=0,tt=null,at=ne.next();Re!==null&&!at.done;We++,at=ne.next()){Re.index>We?(tt=Re,Re=null):tt=Re.sibling;var is=se(ie,Re,at.value,de);if(is===null){Re===null&&(Re=tt);break}e&&Re&&is.alternate===null&&t(ie,Re),J=m(is,J,We),st===null?Ne=is:st.sibling=is,st=is,Re=tt}if(at.done)return r(ie,Re),nt&&lr(ie,We),Ne;if(Re===null){for(;!at.done;We++,at=ne.next())at=fe(ie,at.value,de),at!==null&&(J=m(at,J,We),st===null?Ne=at:st.sibling=at,st=at);return nt&&lr(ie,We),Ne}for(Re=a(Re);!at.done;We++,at=ne.next())at=le(Re,ie,We,at.value,de),at!==null&&(e&&at.alternate!==null&&Re.delete(at.key===null?We:at.key),J=m(at,J,We),st===null?Ne=at:st.sibling=at,st=at);return e&&Re.forEach(function(U1){return t(ie,U1)}),nt&&lr(ie,We),Ne}function vt(ie,J,ne,de){if(typeof ne=="object"&&ne!==null&&ne.type===E&&ne.key===null&&(ne=ne.props.children),typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case x:e:{for(var Ne=ne.key;J!==null;){if(J.key===Ne){if(Ne=ne.type,Ne===E){if(J.tag===7){r(ie,J.sibling),de=d(J,ne.props.children),de.return=ie,ie=de;break e}}else if(J.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===T&&Cs(Ne)===J.type){r(ie,J.sibling),de=d(J,ne.props),ao(de,ne),de.return=ie,ie=de;break e}r(ie,J);break}else t(ie,J);J=J.sibling}ne.type===E?(de=ms(ne.props.children,ie.mode,de,ne.key),de.return=ie,ie=de):(de=El(ne.type,ne.key,ne.props,null,ie.mode,de),ao(de,ne),de.return=ie,ie=de)}return k(ie);case A:e:{for(Ne=ne.key;J!==null;){if(J.key===Ne)if(J.tag===4&&J.stateNode.containerInfo===ne.containerInfo&&J.stateNode.implementation===ne.implementation){r(ie,J.sibling),de=d(J,ne.children||[]),de.return=ie,ie=de;break e}else{r(ie,J);break}else t(ie,J);J=J.sibling}de=Mu(ne,ie.mode,de),de.return=ie,ie=de}return k(ie);case T:return ne=Cs(ne),vt(ie,J,ne,de)}if(ee(ne))return xe(ie,J,ne,de);if(F(ne)){if(Ne=F(ne),typeof Ne!="function")throw Error(o(150));return ne=Ne.call(ne),ze(ie,J,ne,de)}if(typeof ne.then=="function")return vt(ie,J,Ml(ne),de);if(ne.$$typeof===g)return vt(ie,J,Al(ie,ne),de);Dl(ie,ne)}return typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint"?(ne=""+ne,J!==null&&J.tag===6?(r(ie,J.sibling),de=d(J,ne),de.return=ie,ie=de):(r(ie,J),de=ku(ne,ie.mode,de),de.return=ie,ie=de),k(ie)):r(ie,J)}return function(ie,J,ne,de){try{so=0;var Ne=vt(ie,J,ne,de);return sa=null,Ne}catch(Re){if(Re===ra||Re===Ll)throw Re;var st=en(29,Re,null,ie.mode);return st.lanes=de,st.return=ie,st}}}var Es=Jp(!0),e_=Jp(!1),$r=!1;function Fu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ur(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Pr(e,t,r){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(ct&2)!==0){var d=a.pending;return d===null?t.next=t:(t.next=d.next,d.next=t),a.pending=t,t=wl(e),Hp(e,null,r),t}return Cl(e,a,t,r),wl(e)}function oo(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,r|=a,t.lanes=r,He(e,r)}}function Wu(e,t){var r=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,r===a)){var d=null,m=null;if(r=r.firstBaseUpdate,r!==null){do{var k={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};m===null?d=m=k:m=m.next=k,r=r.next}while(r!==null);m===null?d=m=t:m=m.next=t}else d=m=t;r={baseState:a.baseState,firstBaseUpdate:d,lastBaseUpdate:m,shared:a.shared,callbacks:a.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}var Gu=!1;function lo(){if(Gu){var e=na;if(e!==null)throw e}}function co(e,t,r,a){Gu=!1;var d=e.updateQueue;$r=!1;var m=d.firstBaseUpdate,k=d.lastBaseUpdate,N=d.shared.pending;if(N!==null){d.shared.pending=null;var G=N,re=G.next;G.next=null,k===null?m=re:k.next=re,k=G;var ue=e.alternate;ue!==null&&(ue=ue.updateQueue,N=ue.lastBaseUpdate,N!==k&&(N===null?ue.firstBaseUpdate=re:N.next=re,ue.lastBaseUpdate=G))}if(m!==null){var fe=d.baseState;k=0,ue=re=G=null,N=m;do{var se=N.lane&-536870913,le=se!==N.lane;if(le?(et&se)===se:(a&se)===se){se!==0&&se===ia&&(Gu=!0),ue!==null&&(ue=ue.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var xe=e,ze=N;se=t;var vt=r;switch(ze.tag){case 1:if(xe=ze.payload,typeof xe=="function"){fe=xe.call(vt,fe,se);break e}fe=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=ze.payload,se=typeof xe=="function"?xe.call(vt,fe,se):xe,se==null)break e;fe=f({},fe,se);break e;case 2:$r=!0}}se=N.callback,se!==null&&(e.flags|=64,le&&(e.flags|=8192),le=d.callbacks,le===null?d.callbacks=[se]:le.push(se))}else le={lane:se,tag:N.tag,payload:N.payload,callback:N.callback,next:null},ue===null?(re=ue=le,G=fe):ue=ue.next=le,k|=se;if(N=N.next,N===null){if(N=d.shared.pending,N===null)break;le=N,N=le.next,le.next=null,d.lastBaseUpdate=le,d.shared.pending=null}}while(!0);ue===null&&(G=fe),d.baseState=G,d.firstBaseUpdate=re,d.lastBaseUpdate=ue,m===null&&(d.shared.lanes=0),Gr|=k,e.lanes=k,e.memoizedState=fe}}function t_(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function i_(e,t){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)t_(r[e],t)}var aa=M(null),Ol=M(0);function n_(e,t){e=br,V(Ol,e),V(aa,t),br=e|t.baseLanes}function Ku(){V(Ol,br),V(aa,aa.current)}function Yu(){br=Ol.current,U(aa),U(Ol)}var tn=M(null),mn=null;function jr(e){var t=e.alternate;V(Vt,Vt.current&1),V(tn,e),mn===null&&(t===null||aa.current!==null||t.memoizedState!==null)&&(mn=e)}function Vu(e){V(Vt,Vt.current),V(tn,e),mn===null&&(mn=e)}function r_(e){e.tag===22?(V(Vt,Vt.current),V(tn,e),mn===null&&(mn=e)):Fr()}function Fr(){V(Vt,Vt.current),V(tn,tn.current)}function nn(e){U(tn),mn===e&&(mn=null),U(Vt)}var Vt=M(0);function Bl(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||td(r)||id(r)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var hr=0,qe=null,gt=null,ri=null,Nl=!1,oa=!1,xs=!1,Il=0,uo=0,la=null,ky=0;function Pt(){throw Error(o(321))}function Xu(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Ji(e[r],t[r]))return!1;return!0}function Zu(e,t,r,a,d,m){return hr=m,qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,j.H=e===null||e.memoizedState===null?P_:dh,xs=!1,m=r(a,d),xs=!1,oa&&(m=a_(t,r,a,d)),s_(e),m}function s_(e){j.H=po;var t=gt!==null&>.next!==null;if(hr=0,ri=gt=qe=null,Nl=!1,uo=0,la=null,t)throw Error(o(300));e===null||si||(e=e.dependencies,e!==null&&Tl(e)&&(si=!0))}function a_(e,t,r,a){qe=e;var d=0;do{if(oa&&(la=null),uo=0,oa=!1,25<=d)throw Error(o(301));if(d+=1,ri=gt=null,e.updateQueue!=null){var m=e.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}j.H=j_,m=t(r,a)}while(oa);return m}function My(){var e=j.H,t=e.useState()[0];return t=typeof t.then=="function"?ho(t):t,e=e.useState()[0],(gt!==null?gt.memoizedState:null)!==e&&(qe.flags|=1024),t}function Qu(){var e=Il!==0;return Il=0,e}function Ju(e,t,r){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r}function eh(e){if(Nl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Nl=!1}hr=0,ri=gt=qe=null,oa=!1,uo=Il=0,la=null}function ki(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ri===null?qe.memoizedState=ri=e:ri=ri.next=e,ri}function Xt(){if(gt===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=gt.next;var t=ri===null?qe.memoizedState:ri.next;if(t!==null)ri=t,gt=e;else{if(e===null)throw qe.alternate===null?Error(o(467)):Error(o(310));gt=e,e={memoizedState:gt.memoizedState,baseState:gt.baseState,baseQueue:gt.baseQueue,queue:gt.queue,next:null},ri===null?qe.memoizedState=ri=e:ri=ri.next=e}return ri}function Hl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ho(e){var t=uo;return uo+=1,la===null&&(la=[]),e=Xp(la,e,t),t=qe,(ri===null?t.memoizedState:ri.next)===null&&(t=t.alternate,j.H=t===null||t.memoizedState===null?P_:dh),e}function zl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ho(e);if(e.$$typeof===g)return yi(e)}throw Error(o(438,String(e)))}function th(e){var t=null,r=qe.updateQueue;if(r!==null&&(t=r.memoCache),t==null){var a=qe.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(d){return d.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),r===null&&(r=Hl(),qe.updateQueue=r),r.memoCache=t,r=t.data[t.index],r===void 0)for(r=t.data[t.index]=Array(e),a=0;a<e;a++)r[a]=W;return t.index++,r}function dr(e,t){return typeof t=="function"?t(e):t}function $l(e){var t=Xt();return ih(t,gt,e)}function ih(e,t,r){var a=e.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=r;var d=e.baseQueue,m=a.pending;if(m!==null){if(d!==null){var k=d.next;d.next=m.next,m.next=k}t.baseQueue=d=m,a.pending=null}if(m=e.baseState,d===null)e.memoizedState=m;else{t=d.next;var N=k=null,G=null,re=t,ue=!1;do{var fe=re.lane&-536870913;if(fe!==re.lane?(et&fe)===fe:(hr&fe)===fe){var se=re.revertLane;if(se===0)G!==null&&(G=G.next={lane:0,revertLane:0,gesture:null,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null}),fe===ia&&(ue=!0);else if((hr&se)===se){re=re.next,se===ia&&(ue=!0);continue}else fe={lane:0,revertLane:re.revertLane,gesture:null,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null},G===null?(N=G=fe,k=m):G=G.next=fe,qe.lanes|=se,Gr|=se;fe=re.action,xs&&r(m,fe),m=re.hasEagerState?re.eagerState:r(m,fe)}else se={lane:fe,revertLane:re.revertLane,gesture:re.gesture,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null},G===null?(N=G=se,k=m):G=G.next=se,qe.lanes|=fe,Gr|=fe;re=re.next}while(re!==null&&re!==t);if(G===null?k=m:G.next=N,!Ji(m,e.memoizedState)&&(si=!0,ue&&(r=na,r!==null)))throw r;e.memoizedState=m,e.baseState=k,e.baseQueue=G,a.lastRenderedState=m}return d===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function nh(e){var t=Xt(),r=t.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=e;var a=r.dispatch,d=r.pending,m=t.memoizedState;if(d!==null){r.pending=null;var k=d=d.next;do m=e(m,k.action),k=k.next;while(k!==d);Ji(m,t.memoizedState)||(si=!0),t.memoizedState=m,t.baseQueue===null&&(t.baseState=m),r.lastRenderedState=m}return[m,a]}function o_(e,t,r){var a=qe,d=Xt(),m=nt;if(m){if(r===void 0)throw Error(o(407));r=r()}else r=t();var k=!Ji((gt||d).memoizedState,r);if(k&&(d.memoizedState=r,si=!0),d=d.queue,ah(u_.bind(null,a,d,e),[e]),d.getSnapshot!==t||k||ri!==null&&ri.memoizedState.tag&1){if(a.flags|=2048,ca(9,{destroy:void 0},c_.bind(null,a,d,r,t),null),yt===null)throw Error(o(349));m||(hr&127)!==0||l_(a,t,r)}return r}function l_(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=qe.updateQueue,t===null?(t=Hl(),qe.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function c_(e,t,r,a){t.value=r,t.getSnapshot=a,h_(t)&&d_(e)}function u_(e,t,r){return r(function(){h_(t)&&d_(e)})}function h_(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Ji(e,r)}catch{return!0}}function d_(e){var t=gs(e,2);t!==null&&Wi(t,e,2)}function rh(e){var t=ki();if(typeof e=="function"){var r=e;if(e=r(),xs){Yt(!0);try{r()}finally{Yt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:dr,lastRenderedState:e},t}function f_(e,t,r,a){return e.baseState=r,ih(e,gt,typeof a=="function"?a:dr)}function Dy(e,t,r,a,d){if(jl(e))throw Error(o(485));if(e=t.action,e!==null){var m={payload:d,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(k){m.listeners.push(k)}};j.T!==null?r(!0):m.isTransition=!1,a(m),r=t.pending,r===null?(m.next=t.pending=m,p_(t,m)):(m.next=r.next,t.pending=r.next=m)}}function p_(e,t){var r=t.action,a=t.payload,d=e.state;if(t.isTransition){var m=j.T,k={};j.T=k;try{var N=r(d,a),G=j.S;G!==null&&G(k,N),__(e,t,N)}catch(re){sh(e,t,re)}finally{m!==null&&k.types!==null&&(m.types=k.types),j.T=m}}else try{m=r(d,a),__(e,t,m)}catch(re){sh(e,t,re)}}function __(e,t,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(a){g_(e,t,a)},function(a){return sh(e,t,a)}):g_(e,t,r)}function g_(e,t,r){t.status="fulfilled",t.value=r,m_(t),e.state=r,t=e.pending,t!==null&&(r=t.next,r===t?e.pending=null:(r=r.next,t.next=r,p_(e,r)))}function sh(e,t,r){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=r,m_(t),t=t.next;while(t!==a)}e.action=null}function m_(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function v_(e,t){return t}function b_(e,t){if(nt){var r=yt.formState;if(r!==null){e:{var a=qe;if(nt){if(At){t:{for(var d=At,m=gn;d.nodeType!==8;){if(!m){d=null;break t}if(d=vn(d.nextSibling),d===null){d=null;break t}}m=d.data,d=m==="F!"||m==="F"?d:null}if(d){At=vn(d.nextSibling),a=d.data==="F!";break e}}Hr(a)}a=!1}a&&(t=r[0])}}return r=ki(),r.memoizedState=r.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:v_,lastRenderedState:t},r.queue=a,r=z_.bind(null,qe,a),a.dispatch=r,a=rh(!1),m=hh.bind(null,qe,!1,a.queue),a=ki(),d={state:t,dispatch:null,action:e,pending:null},a.queue=d,r=Dy.bind(null,qe,d,m,r),d.dispatch=r,a.memoizedState=e,[t,r,!1]}function S_(e){var t=Xt();return y_(t,gt,e)}function y_(e,t,r){if(t=ih(e,t,v_)[0],e=$l(dr)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=ho(t)}catch(k){throw k===ra?Ll:k}else a=t;t=Xt();var d=t.queue,m=d.dispatch;return r!==t.memoizedState&&(qe.flags|=2048,ca(9,{destroy:void 0},Oy.bind(null,d,r),null)),[a,m,e]}function Oy(e,t){e.action=t}function C_(e){var t=Xt(),r=gt;if(r!==null)return y_(t,r,e);Xt(),t=t.memoizedState,r=Xt();var a=r.queue.dispatch;return r.memoizedState=e,[t,a,!1]}function ca(e,t,r,a){return e={tag:e,create:r,deps:a,inst:t,next:null},t=qe.updateQueue,t===null&&(t=Hl(),qe.updateQueue=t),r=t.lastEffect,r===null?t.lastEffect=e.next=e:(a=r.next,r.next=e,e.next=a,t.lastEffect=e),e}function w_(){return Xt().memoizedState}function Ul(e,t,r,a){var d=ki();qe.flags|=e,d.memoizedState=ca(1|t,{destroy:void 0},r,a===void 0?null:a)}function Pl(e,t,r,a){var d=Xt();a=a===void 0?null:a;var m=d.memoizedState.inst;gt!==null&&a!==null&&Xu(a,gt.memoizedState.deps)?d.memoizedState=ca(t,m,r,a):(qe.flags|=e,d.memoizedState=ca(1|t,m,r,a))}function E_(e,t){Ul(8390656,8,e,t)}function ah(e,t){Pl(2048,8,e,t)}function By(e){qe.flags|=4;var t=qe.updateQueue;if(t===null)t=Hl(),qe.updateQueue=t,t.events=[e];else{var r=t.events;r===null?t.events=[e]:r.push(e)}}function x_(e){var t=Xt().memoizedState;return By({ref:t,nextImpl:e}),function(){if((ct&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function T_(e,t){return Pl(4,2,e,t)}function A_(e,t){return Pl(4,4,e,t)}function R_(e,t){if(typeof t=="function"){e=e();var r=t(e);return function(){typeof r=="function"?r():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function L_(e,t,r){r=r!=null?r.concat([e]):null,Pl(4,4,R_.bind(null,t,e),r)}function oh(){}function k_(e,t){var r=Xt();t=t===void 0?null:t;var a=r.memoizedState;return t!==null&&Xu(t,a[1])?a[0]:(r.memoizedState=[e,t],e)}function M_(e,t){var r=Xt();t=t===void 0?null:t;var a=r.memoizedState;if(t!==null&&Xu(t,a[1]))return a[0];if(a=e(),xs){Yt(!0);try{e()}finally{Yt(!1)}}return r.memoizedState=[a,t],a}function lh(e,t,r){return r===void 0||(hr&1073741824)!==0&&(et&261930)===0?e.memoizedState=t:(e.memoizedState=r,e=Dg(),qe.lanes|=e,Gr|=e,r)}function D_(e,t,r,a){return Ji(r,t)?r:aa.current!==null?(e=lh(e,r,a),Ji(e,t)||(si=!0),e):(hr&42)===0||(hr&1073741824)!==0&&(et&261930)===0?(si=!0,e.memoizedState=r):(e=Dg(),qe.lanes|=e,Gr|=e,t)}function O_(e,t,r,a,d){var m=Y.p;Y.p=m!==0&&8>m?m:8;var k=j.T,N={};j.T=N,hh(e,!1,t,r);try{var G=d(),re=j.S;if(re!==null&&re(N,G),G!==null&&typeof G=="object"&&typeof G.then=="function"){var ue=Ly(G,a);fo(e,t,ue,an(e))}else fo(e,t,a,an(e))}catch(fe){fo(e,t,{then:function(){},status:"rejected",reason:fe},an())}finally{Y.p=m,k!==null&&N.types!==null&&(k.types=N.types),j.T=k}}function Ny(){}function ch(e,t,r,a){if(e.tag!==5)throw Error(o(476));var d=B_(e).queue;O_(e,d,t,K,r===null?Ny:function(){return N_(e),r(a)})}function B_(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:K,baseState:K,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:dr,lastRenderedState:K},next:null};var r={};return t.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:dr,lastRenderedState:r},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function N_(e){var t=B_(e);t.next===null&&(t=e.alternate.memoizedState),fo(e,t.next.queue,{},an())}function uh(){return yi(ko)}function I_(){return Xt().memoizedState}function H_(){return Xt().memoizedState}function Iy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var r=an();e=Ur(r);var a=Pr(t,e,r);a!==null&&(Wi(a,t,r),oo(a,t,r)),t={cache:$u()},e.payload=t;return}t=t.return}}function Hy(e,t,r){var a=an();r={lane:a,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},jl(e)?$_(t,r):(r=Ru(e,t,r,a),r!==null&&(Wi(r,e,a),U_(r,t,a)))}function z_(e,t,r){var a=an();fo(e,t,r,a)}function fo(e,t,r,a){var d={lane:a,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(jl(e))$_(t,d);else{var m=e.alternate;if(e.lanes===0&&(m===null||m.lanes===0)&&(m=t.lastRenderedReducer,m!==null))try{var k=t.lastRenderedState,N=m(k,r);if(d.hasEagerState=!0,d.eagerState=N,Ji(N,k))return Cl(e,t,d,0),yt===null&&yl(),!1}catch{}if(r=Ru(e,t,d,a),r!==null)return Wi(r,e,a),U_(r,t,a),!0}return!1}function hh(e,t,r,a){if(a={lane:2,revertLane:Fh(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},jl(e)){if(t)throw Error(o(479))}else t=Ru(e,r,a,2),t!==null&&Wi(t,e,2)}function jl(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function $_(e,t){oa=Nl=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function U_(e,t,r){if((r&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,r|=a,t.lanes=r,He(e,r)}}var po={readContext:yi,use:zl,useCallback:Pt,useContext:Pt,useEffect:Pt,useImperativeHandle:Pt,useLayoutEffect:Pt,useInsertionEffect:Pt,useMemo:Pt,useReducer:Pt,useRef:Pt,useState:Pt,useDebugValue:Pt,useDeferredValue:Pt,useTransition:Pt,useSyncExternalStore:Pt,useId:Pt,useHostTransitionStatus:Pt,useFormState:Pt,useActionState:Pt,useOptimistic:Pt,useMemoCache:Pt,useCacheRefresh:Pt};po.useEffectEvent=Pt;var P_={readContext:yi,use:zl,useCallback:function(e,t){return ki().memoizedState=[e,t===void 0?null:t],e},useContext:yi,useEffect:E_,useImperativeHandle:function(e,t,r){r=r!=null?r.concat([e]):null,Ul(4194308,4,R_.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Ul(4194308,4,e,t)},useInsertionEffect:function(e,t){Ul(4,2,e,t)},useMemo:function(e,t){var r=ki();t=t===void 0?null:t;var a=e();if(xs){Yt(!0);try{e()}finally{Yt(!1)}}return r.memoizedState=[a,t],a},useReducer:function(e,t,r){var a=ki();if(r!==void 0){var d=r(t);if(xs){Yt(!0);try{r(t)}finally{Yt(!1)}}}else d=t;return a.memoizedState=a.baseState=d,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:d},a.queue=e,e=e.dispatch=Hy.bind(null,qe,e),[a.memoizedState,e]},useRef:function(e){var t=ki();return e={current:e},t.memoizedState=e},useState:function(e){e=rh(e);var t=e.queue,r=z_.bind(null,qe,t);return t.dispatch=r,[e.memoizedState,r]},useDebugValue:oh,useDeferredValue:function(e,t){var r=ki();return lh(r,e,t)},useTransition:function(){var e=rh(!1);return e=O_.bind(null,qe,e.queue,!0,!1),ki().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,r){var a=qe,d=ki();if(nt){if(r===void 0)throw Error(o(407));r=r()}else{if(r=t(),yt===null)throw Error(o(349));(et&127)!==0||l_(a,t,r)}d.memoizedState=r;var m={value:r,getSnapshot:t};return d.queue=m,E_(u_.bind(null,a,m,e),[e]),a.flags|=2048,ca(9,{destroy:void 0},c_.bind(null,a,m,r,t),null),r},useId:function(){var e=ki(),t=yt.identifierPrefix;if(nt){var r=qn,a=Fn;r=(a&~(1<<32-zt(a)-1)).toString(32)+r,t="_"+t+"R_"+r,r=Il++,0<r&&(t+="H"+r.toString(32)),t+="_"}else r=ky++,t="_"+t+"r_"+r.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:uh,useFormState:b_,useActionState:b_,useOptimistic:function(e){var t=ki();t.memoizedState=t.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=r,t=hh.bind(null,qe,!0,r),r.dispatch=t,[e,t]},useMemoCache:th,useCacheRefresh:function(){return ki().memoizedState=Iy.bind(null,qe)},useEffectEvent:function(e){var t=ki(),r={impl:e};return t.memoizedState=r,function(){if((ct&2)!==0)throw Error(o(440));return r.impl.apply(void 0,arguments)}}},dh={readContext:yi,use:zl,useCallback:k_,useContext:yi,useEffect:ah,useImperativeHandle:L_,useInsertionEffect:T_,useLayoutEffect:A_,useMemo:M_,useReducer:$l,useRef:w_,useState:function(){return $l(dr)},useDebugValue:oh,useDeferredValue:function(e,t){var r=Xt();return D_(r,gt.memoizedState,e,t)},useTransition:function(){var e=$l(dr)[0],t=Xt().memoizedState;return[typeof e=="boolean"?e:ho(e),t]},useSyncExternalStore:o_,useId:I_,useHostTransitionStatus:uh,useFormState:S_,useActionState:S_,useOptimistic:function(e,t){var r=Xt();return f_(r,gt,e,t)},useMemoCache:th,useCacheRefresh:H_};dh.useEffectEvent=x_;var j_={readContext:yi,use:zl,useCallback:k_,useContext:yi,useEffect:ah,useImperativeHandle:L_,useInsertionEffect:T_,useLayoutEffect:A_,useMemo:M_,useReducer:nh,useRef:w_,useState:function(){return nh(dr)},useDebugValue:oh,useDeferredValue:function(e,t){var r=Xt();return gt===null?lh(r,e,t):D_(r,gt.memoizedState,e,t)},useTransition:function(){var e=nh(dr)[0],t=Xt().memoizedState;return[typeof e=="boolean"?e:ho(e),t]},useSyncExternalStore:o_,useId:I_,useHostTransitionStatus:uh,useFormState:C_,useActionState:C_,useOptimistic:function(e,t){var r=Xt();return gt!==null?f_(r,gt,e,t):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:th,useCacheRefresh:H_};j_.useEffectEvent=x_;function fh(e,t,r,a){t=e.memoizedState,r=r(a,t),r=r==null?t:f({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var ph={enqueueSetState:function(e,t,r){e=e._reactInternals;var a=an(),d=Ur(a);d.payload=t,r!=null&&(d.callback=r),t=Pr(e,d,a),t!==null&&(Wi(t,e,a),oo(t,e,a))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var a=an(),d=Ur(a);d.tag=1,d.payload=t,r!=null&&(d.callback=r),t=Pr(e,d,a),t!==null&&(Wi(t,e,a),oo(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=an(),a=Ur(r);a.tag=2,t!=null&&(a.callback=t),t=Pr(e,a,r),t!==null&&(Wi(t,e,r),oo(t,e,r))}};function F_(e,t,r,a,d,m,k){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,m,k):t.prototype&&t.prototype.isPureReactComponent?!Ja(r,a)||!Ja(d,m):!0}function q_(e,t,r,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,a),t.state!==e&&ph.enqueueReplaceState(t,t.state,null)}function Ts(e,t){var r=t;if("ref"in t){r={};for(var a in t)a!=="ref"&&(r[a]=t[a])}if(e=e.defaultProps){r===t&&(r=f({},r));for(var d in e)r[d]===void 0&&(r[d]=e[d])}return r}function W_(e){Sl(e)}function G_(e){console.error(e)}function K_(e){Sl(e)}function Fl(e,t){try{var r=e.onUncaughtError;r(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Y_(e,t,r){try{var a=e.onCaughtError;a(r.value,{componentStack:r.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function _h(e,t,r){return r=Ur(r),r.tag=3,r.payload={element:null},r.callback=function(){Fl(e,t)},r}function V_(e){return e=Ur(e),e.tag=3,e}function X_(e,t,r,a){var d=r.type.getDerivedStateFromError;if(typeof d=="function"){var m=a.value;e.payload=function(){return d(m)},e.callback=function(){Y_(t,r,a)}}var k=r.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(e.callback=function(){Y_(t,r,a),typeof d!="function"&&(Kr===null?Kr=new Set([this]):Kr.add(this));var N=a.stack;this.componentDidCatch(a.value,{componentStack:N!==null?N:""})})}function zy(e,t,r,a,d){if(r.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=r.alternate,t!==null&&ta(t,r,d,!0),r=tn.current,r!==null){switch(r.tag){case 31:case 13:return mn===null?tc():r.alternate===null&&jt===0&&(jt=3),r.flags&=-257,r.flags|=65536,r.lanes=d,a===kl?r.flags|=16384:(t=r.updateQueue,t===null?r.updateQueue=new Set([a]):t.add(a),Uh(e,a,d)),!1;case 22:return r.flags|=65536,a===kl?r.flags|=16384:(t=r.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},r.updateQueue=t):(r=t.retryQueue,r===null?t.retryQueue=new Set([a]):r.add(a)),Uh(e,a,d)),!1}throw Error(o(435,r.tag))}return Uh(e,a,d),tc(),!1}if(nt)return t=tn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=d,a!==Bu&&(e=Error(o(422),{cause:a}),io(fn(e,r)))):(a!==Bu&&(t=Error(o(423),{cause:a}),io(fn(t,r))),e=e.current.alternate,e.flags|=65536,d&=-d,e.lanes|=d,a=fn(a,r),d=_h(e.stateNode,a,d),Wu(e,d),jt!==4&&(jt=2)),!1;var m=Error(o(520),{cause:a});if(m=fn(m,r),Co===null?Co=[m]:Co.push(m),jt!==4&&(jt=2),t===null)return!0;a=fn(a,r),r=t;do{switch(r.tag){case 3:return r.flags|=65536,e=d&-d,r.lanes|=e,e=_h(r.stateNode,a,e),Wu(r,e),!1;case 1:if(t=r.type,m=r.stateNode,(r.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Kr===null||!Kr.has(m))))return r.flags|=65536,d&=-d,r.lanes|=d,d=V_(d),X_(d,e,r,a),Wu(r,d),!1}r=r.return}while(r!==null);return!1}var gh=Error(o(461)),si=!1;function Ci(e,t,r,a){t.child=e===null?e_(t,null,r,a):Es(t,e.child,r,a)}function Z_(e,t,r,a,d){r=r.render;var m=t.ref;if("ref"in a){var k={};for(var N in a)N!=="ref"&&(k[N]=a[N])}else k=a;return Ss(t),a=Zu(e,t,r,k,m,d),N=Qu(),e!==null&&!si?(Ju(e,t,d),fr(e,t,d)):(nt&&N&&Du(t),t.flags|=1,Ci(e,t,a,d),t.child)}function Q_(e,t,r,a,d){if(e===null){var m=r.type;return typeof m=="function"&&!Lu(m)&&m.defaultProps===void 0&&r.compare===null?(t.tag=15,t.type=m,J_(e,t,m,a,d)):(e=El(r.type,null,a,t,t.mode,d),e.ref=t.ref,e.return=t,t.child=e)}if(m=e.child,!Eh(e,d)){var k=m.memoizedProps;if(r=r.compare,r=r!==null?r:Ja,r(k,a)&&e.ref===t.ref)return fr(e,t,d)}return t.flags|=1,e=or(m,a),e.ref=t.ref,e.return=t,t.child=e}function J_(e,t,r,a,d){if(e!==null){var m=e.memoizedProps;if(Ja(m,a)&&e.ref===t.ref)if(si=!1,t.pendingProps=a=m,Eh(e,d))(e.flags&131072)!==0&&(si=!0);else return t.lanes=e.lanes,fr(e,t,d)}return mh(e,t,r,a,d)}function eg(e,t,r,a){var d=a.children,m=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(m=m!==null?m.baseLanes|r:r,e!==null){for(a=t.child=e.child,d=0;a!==null;)d=d|a.lanes|a.childLanes,a=a.sibling;a=d&~m}else a=0,t.child=null;return tg(e,t,m,r,a)}if((r&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Rl(t,m!==null?m.cachePool:null),m!==null?n_(t,m):Ku(),r_(t);else return a=t.lanes=536870912,tg(e,t,m!==null?m.baseLanes|r:r,r,a)}else m!==null?(Rl(t,m.cachePool),n_(t,m),Fr(),t.memoizedState=null):(e!==null&&Rl(t,null),Ku(),Fr());return Ci(e,t,d,r),t.child}function _o(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function tg(e,t,r,a,d){var m=Pu();return m=m===null?null:{parent:ni._currentValue,pool:m},t.memoizedState={baseLanes:r,cachePool:m},e!==null&&Rl(t,null),Ku(),r_(t),e!==null&&ta(e,t,a,!0),t.childLanes=d,null}function ql(e,t){return t=Gl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function ig(e,t,r){return Es(t,e.child,null,r),e=ql(t,t.pendingProps),e.flags|=2,nn(t),t.memoizedState=null,e}function $y(e,t,r){var a=t.pendingProps,d=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(nt){if(a.mode==="hidden")return e=ql(t,a),t.lanes=536870912,_o(null,e);if(Vu(t),(e=At)?(e=pm(e,gn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Nr!==null?{id:Fn,overflow:qn}:null,retryLane:536870912,hydrationErrors:null},r=$p(e),r.return=t,t.child=r,Si=t,At=null)):e=null,e===null)throw Hr(t);return t.lanes=536870912,null}return ql(t,a)}var m=e.memoizedState;if(m!==null){var k=m.dehydrated;if(Vu(t),d)if(t.flags&256)t.flags&=-257,t=ig(e,t,r);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(si||ta(e,t,r,!1),d=(r&e.childLanes)!==0,si||d){if(a=yt,a!==null&&(k=Bt(a,r),k!==0&&k!==m.retryLane))throw m.retryLane=k,gs(e,k),Wi(a,e,k),gh;tc(),t=ig(e,t,r)}else e=m.treeContext,At=vn(k.nextSibling),Si=t,nt=!0,Ir=null,gn=!1,e!==null&&jp(t,e),t=ql(t,a),t.flags|=4096;return t}return e=or(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Wl(e,t){var r=t.ref;if(r===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(o(284));(e===null||e.ref!==r)&&(t.flags|=4194816)}}function mh(e,t,r,a,d){return Ss(t),r=Zu(e,t,r,a,void 0,d),a=Qu(),e!==null&&!si?(Ju(e,t,d),fr(e,t,d)):(nt&&a&&Du(t),t.flags|=1,Ci(e,t,r,d),t.child)}function ng(e,t,r,a,d,m){return Ss(t),t.updateQueue=null,r=a_(t,a,r,d),s_(e),a=Qu(),e!==null&&!si?(Ju(e,t,m),fr(e,t,m)):(nt&&a&&Du(t),t.flags|=1,Ci(e,t,r,m),t.child)}function rg(e,t,r,a,d){if(Ss(t),t.stateNode===null){var m=Zs,k=r.contextType;typeof k=="object"&&k!==null&&(m=yi(k)),m=new r(a,m),t.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=ph,t.stateNode=m,m._reactInternals=t,m=t.stateNode,m.props=a,m.state=t.memoizedState,m.refs={},Fu(t),k=r.contextType,m.context=typeof k=="object"&&k!==null?yi(k):Zs,m.state=t.memoizedState,k=r.getDerivedStateFromProps,typeof k=="function"&&(fh(t,r,k,a),m.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(k=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),k!==m.state&&ph.enqueueReplaceState(m,m.state,null),co(t,a,m,d),lo(),m.state=t.memoizedState),typeof m.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){m=t.stateNode;var N=t.memoizedProps,G=Ts(r,N);m.props=G;var re=m.context,ue=r.contextType;k=Zs,typeof ue=="object"&&ue!==null&&(k=yi(ue));var fe=r.getDerivedStateFromProps;ue=typeof fe=="function"||typeof m.getSnapshotBeforeUpdate=="function",N=t.pendingProps!==N,ue||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(N||re!==k)&&q_(t,m,a,k),$r=!1;var se=t.memoizedState;m.state=se,co(t,a,m,d),lo(),re=t.memoizedState,N||se!==re||$r?(typeof fe=="function"&&(fh(t,r,fe,a),re=t.memoizedState),(G=$r||F_(t,r,G,a,se,re,k))?(ue||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(t.flags|=4194308)):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=re),m.props=a,m.state=re,m.context=k,a=G):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{m=t.stateNode,qu(e,t),k=t.memoizedProps,ue=Ts(r,k),m.props=ue,fe=t.pendingProps,se=m.context,re=r.contextType,G=Zs,typeof re=="object"&&re!==null&&(G=yi(re)),N=r.getDerivedStateFromProps,(re=typeof N=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(k!==fe||se!==G)&&q_(t,m,a,G),$r=!1,se=t.memoizedState,m.state=se,co(t,a,m,d),lo();var le=t.memoizedState;k!==fe||se!==le||$r||e!==null&&e.dependencies!==null&&Tl(e.dependencies)?(typeof N=="function"&&(fh(t,r,N,a),le=t.memoizedState),(ue=$r||F_(t,r,ue,a,se,le,G)||e!==null&&e.dependencies!==null&&Tl(e.dependencies))?(re||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(a,le,G),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(a,le,G)),typeof m.componentDidUpdate=="function"&&(t.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof m.componentDidUpdate!="function"||k===e.memoizedProps&&se===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||k===e.memoizedProps&&se===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=le),m.props=a,m.state=le,m.context=G,a=ue):(typeof m.componentDidUpdate!="function"||k===e.memoizedProps&&se===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||k===e.memoizedProps&&se===e.memoizedState||(t.flags|=1024),a=!1)}return m=a,Wl(e,t),a=(t.flags&128)!==0,m||a?(m=t.stateNode,r=a&&typeof r.getDerivedStateFromError!="function"?null:m.render(),t.flags|=1,e!==null&&a?(t.child=Es(t,e.child,null,d),t.child=Es(t,null,r,d)):Ci(e,t,r,d),t.memoizedState=m.state,e=t.child):e=fr(e,t,d),e}function sg(e,t,r,a){return vs(),t.flags|=256,Ci(e,t,r,a),t.child}var vh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bh(e){return{baseLanes:e,cachePool:Yp()}}function Sh(e,t,r){return e=e!==null?e.childLanes&~r:0,t&&(e|=sn),e}function ag(e,t,r){var a=t.pendingProps,d=!1,m=(t.flags&128)!==0,k;if((k=m)||(k=e!==null&&e.memoizedState===null?!1:(Vt.current&2)!==0),k&&(d=!0,t.flags&=-129),k=(t.flags&32)!==0,t.flags&=-33,e===null){if(nt){if(d?jr(t):Fr(),(e=At)?(e=pm(e,gn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Nr!==null?{id:Fn,overflow:qn}:null,retryLane:536870912,hydrationErrors:null},r=$p(e),r.return=t,t.child=r,Si=t,At=null)):e=null,e===null)throw Hr(t);return id(e)?t.lanes=32:t.lanes=536870912,null}var N=a.children;return a=a.fallback,d?(Fr(),d=t.mode,N=Gl({mode:"hidden",children:N},d),a=ms(a,d,r,null),N.return=t,a.return=t,N.sibling=a,t.child=N,a=t.child,a.memoizedState=bh(r),a.childLanes=Sh(e,k,r),t.memoizedState=vh,_o(null,a)):(jr(t),yh(t,N))}var G=e.memoizedState;if(G!==null&&(N=G.dehydrated,N!==null)){if(m)t.flags&256?(jr(t),t.flags&=-257,t=Ch(e,t,r)):t.memoizedState!==null?(Fr(),t.child=e.child,t.flags|=128,t=null):(Fr(),N=a.fallback,d=t.mode,a=Gl({mode:"visible",children:a.children},d),N=ms(N,d,r,null),N.flags|=2,a.return=t,N.return=t,a.sibling=N,t.child=a,Es(t,e.child,null,r),a=t.child,a.memoizedState=bh(r),a.childLanes=Sh(e,k,r),t.memoizedState=vh,t=_o(null,a));else if(jr(t),id(N)){if(k=N.nextSibling&&N.nextSibling.dataset,k)var re=k.dgst;k=re,a=Error(o(419)),a.stack="",a.digest=k,io({value:a,source:null,stack:null}),t=Ch(e,t,r)}else if(si||ta(e,t,r,!1),k=(r&e.childLanes)!==0,si||k){if(k=yt,k!==null&&(a=Bt(k,r),a!==0&&a!==G.retryLane))throw G.retryLane=a,gs(e,a),Wi(k,e,a),gh;td(N)||tc(),t=Ch(e,t,r)}else td(N)?(t.flags|=192,t.child=e.child,t=null):(e=G.treeContext,At=vn(N.nextSibling),Si=t,nt=!0,Ir=null,gn=!1,e!==null&&jp(t,e),t=yh(t,a.children),t.flags|=4096);return t}return d?(Fr(),N=a.fallback,d=t.mode,G=e.child,re=G.sibling,a=or(G,{mode:"hidden",children:a.children}),a.subtreeFlags=G.subtreeFlags&65011712,re!==null?N=or(re,N):(N=ms(N,d,r,null),N.flags|=2),N.return=t,a.return=t,a.sibling=N,t.child=a,_o(null,a),a=t.child,N=e.child.memoizedState,N===null?N=bh(r):(d=N.cachePool,d!==null?(G=ni._currentValue,d=d.parent!==G?{parent:G,pool:G}:d):d=Yp(),N={baseLanes:N.baseLanes|r,cachePool:d}),a.memoizedState=N,a.childLanes=Sh(e,k,r),t.memoizedState=vh,_o(e.child,a)):(jr(t),r=e.child,e=r.sibling,r=or(r,{mode:"visible",children:a.children}),r.return=t,r.sibling=null,e!==null&&(k=t.deletions,k===null?(t.deletions=[e],t.flags|=16):k.push(e)),t.child=r,t.memoizedState=null,r)}function yh(e,t){return t=Gl({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Gl(e,t){return e=en(22,e,null,t),e.lanes=0,e}function Ch(e,t,r){return Es(t,e.child,null,r),e=yh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function og(e,t,r){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Hu(e.return,t,r)}function wh(e,t,r,a,d,m){var k=e.memoizedState;k===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:r,tailMode:d,treeForkCount:m}:(k.isBackwards=t,k.rendering=null,k.renderingStartTime=0,k.last=a,k.tail=r,k.tailMode=d,k.treeForkCount=m)}function lg(e,t,r){var a=t.pendingProps,d=a.revealOrder,m=a.tail;a=a.children;var k=Vt.current,N=(k&2)!==0;if(N?(k=k&1|2,t.flags|=128):k&=1,V(Vt,k),Ci(e,t,a,r),a=nt?to:0,!N&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&og(e,r,t);else if(e.tag===19)og(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(d){case"forwards":for(r=t.child,d=null;r!==null;)e=r.alternate,e!==null&&Bl(e)===null&&(d=r),r=r.sibling;r=d,r===null?(d=t.child,t.child=null):(d=r.sibling,r.sibling=null),wh(t,!1,d,r,m,a);break;case"backwards":case"unstable_legacy-backwards":for(r=null,d=t.child,t.child=null;d!==null;){if(e=d.alternate,e!==null&&Bl(e)===null){t.child=d;break}e=d.sibling,d.sibling=r,r=d,d=e}wh(t,!0,r,null,m,a);break;case"together":wh(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function fr(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Gr|=t.lanes,(r&t.childLanes)===0)if(e!==null){if(ta(e,t,r,!1),(r&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,r=or(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=or(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Eh(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Tl(e)))}function Uy(e,t,r){switch(t.tag){case 3:$(t,t.stateNode.containerInfo),zr(t,ni,e.memoizedState.cache),vs();break;case 27:case 5:_e(t);break;case 4:$(t,t.stateNode.containerInfo);break;case 10:zr(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Vu(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(jr(t),t.flags|=128,null):(r&t.child.childLanes)!==0?ag(e,t,r):(jr(t),e=fr(e,t,r),e!==null?e.sibling:null);jr(t);break;case 19:var d=(e.flags&128)!==0;if(a=(r&t.childLanes)!==0,a||(ta(e,t,r,!1),a=(r&t.childLanes)!==0),d){if(a)return lg(e,t,r);t.flags|=128}if(d=t.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),V(Vt,Vt.current),a)break;return null;case 22:return t.lanes=0,eg(e,t,r,t.pendingProps);case 24:zr(t,ni,e.memoizedState.cache)}return fr(e,t,r)}function cg(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps)si=!0;else{if(!Eh(e,r)&&(t.flags&128)===0)return si=!1,Uy(e,t,r);si=(e.flags&131072)!==0}else si=!1,nt&&(t.flags&1048576)!==0&&Pp(t,to,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Cs(t.elementType),t.type=e,typeof e=="function")Lu(e)?(a=Ts(e,a),t.tag=1,t=rg(null,t,e,a,r)):(t.tag=0,t=mh(null,t,e,a,r));else{if(e!=null){var d=e.$$typeof;if(d===w){t.tag=11,t=Z_(null,t,e,a,r);break e}else if(d===D){t.tag=14,t=Q_(null,t,e,a,r);break e}}throw t=Z(e)||e,Error(o(306,t,""))}}return t;case 0:return mh(e,t,t.type,t.pendingProps,r);case 1:return a=t.type,d=Ts(a,t.pendingProps),rg(e,t,a,d,r);case 3:e:{if($(t,t.stateNode.containerInfo),e===null)throw Error(o(387));a=t.pendingProps;var m=t.memoizedState;d=m.element,qu(e,t),co(t,a,null,r);var k=t.memoizedState;if(a=k.cache,zr(t,ni,a),a!==m.cache&&zu(t,[ni],r,!0),lo(),a=k.element,m.isDehydrated)if(m={element:a,isDehydrated:!1,cache:k.cache},t.updateQueue.baseState=m,t.memoizedState=m,t.flags&256){t=sg(e,t,a,r);break e}else if(a!==d){d=fn(Error(o(424)),t),io(d),t=sg(e,t,a,r);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,At=vn(e.firstChild),Si=t,nt=!0,Ir=null,gn=!0,r=e_(t,null,a,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(vs(),a===d){t=fr(e,t,r);break e}Ci(e,t,a,r)}t=t.child}return t;case 26:return Wl(e,t),e===null?(r=Sm(t.type,null,t.pendingProps,null))?t.memoizedState=r:nt||(r=t.type,e=t.pendingProps,a=lc(me.current).createElement(r),a[xt]=t,a[wt]=e,wi(a,r,e),Ye(a),t.stateNode=a):t.memoizedState=Sm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return _e(t),e===null&&nt&&(a=t.stateNode=mm(t.type,t.pendingProps,me.current),Si=t,gn=!0,d=At,Zr(t.type)?(nd=d,At=vn(a.firstChild)):At=d),Ci(e,t,t.pendingProps.children,r),Wl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&nt&&((d=a=At)&&(a=g1(a,t.type,t.pendingProps,gn),a!==null?(t.stateNode=a,Si=t,At=vn(a.firstChild),gn=!1,d=!0):d=!1),d||Hr(t)),_e(t),d=t.type,m=t.pendingProps,k=e!==null?e.memoizedProps:null,a=m.children,Qh(d,m)?a=null:k!==null&&Qh(d,k)&&(t.flags|=32),t.memoizedState!==null&&(d=Zu(e,t,My,null,null,r),ko._currentValue=d),Wl(e,t),Ci(e,t,a,r),t.child;case 6:return e===null&&nt&&((e=r=At)&&(r=m1(r,t.pendingProps,gn),r!==null?(t.stateNode=r,Si=t,At=null,e=!0):e=!1),e||Hr(t)),null;case 13:return ag(e,t,r);case 4:return $(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Es(t,null,a,r):Ci(e,t,a,r),t.child;case 11:return Z_(e,t,t.type,t.pendingProps,r);case 7:return Ci(e,t,t.pendingProps,r),t.child;case 8:return Ci(e,t,t.pendingProps.children,r),t.child;case 12:return Ci(e,t,t.pendingProps.children,r),t.child;case 10:return a=t.pendingProps,zr(t,t.type,a.value),Ci(e,t,a.children,r),t.child;case 9:return d=t.type._context,a=t.pendingProps.children,Ss(t),d=yi(d),a=a(d),t.flags|=1,Ci(e,t,a,r),t.child;case 14:return Q_(e,t,t.type,t.pendingProps,r);case 15:return J_(e,t,t.type,t.pendingProps,r);case 19:return lg(e,t,r);case 31:return $y(e,t,r);case 22:return eg(e,t,r,t.pendingProps);case 24:return Ss(t),a=yi(ni),e===null?(d=Pu(),d===null&&(d=yt,m=$u(),d.pooledCache=m,m.refCount++,m!==null&&(d.pooledCacheLanes|=r),d=m),t.memoizedState={parent:a,cache:d},Fu(t),zr(t,ni,d)):((e.lanes&r)!==0&&(qu(e,t),co(t,null,null,r),lo()),d=e.memoizedState,m=t.memoizedState,d.parent!==a?(d={parent:a,cache:a},t.memoizedState=d,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=d),zr(t,ni,a)):(a=m.cache,zr(t,ni,a),a!==d.cache&&zu(t,[ni],r,!0))),Ci(e,t,t.pendingProps.children,r),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function pr(e){e.flags|=4}function xh(e,t,r,a,d){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(d&335544128)===d)if(e.stateNode.complete)e.flags|=8192;else if(Ig())e.flags|=8192;else throw ws=kl,ju}else e.flags&=-16777217}function ug(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!xm(t))if(Ig())e.flags|=8192;else throw ws=kl,ju}function Kl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ie():536870912,e.lanes|=t,fa|=t)}function go(e,t){if(!nt)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Rt(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,a=0;if(t)for(var d=e.child;d!==null;)r|=d.lanes|d.childLanes,a|=d.subtreeFlags&65011712,a|=d.flags&65011712,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)r|=d.lanes|d.childLanes,a|=d.subtreeFlags,a|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=a,e.childLanes=r,t}function Py(e,t,r){var a=t.pendingProps;switch(Ou(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Rt(t),null;case 1:return Rt(t),null;case 3:return r=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ur(ni),oe(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ea(t)?pr(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Nu())),Rt(t),null;case 26:var d=t.type,m=t.memoizedState;return e===null?(pr(t),m!==null?(Rt(t),ug(t,m)):(Rt(t),xh(t,d,null,a,r))):m?m!==e.memoizedState?(pr(t),Rt(t),ug(t,m)):(Rt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&pr(t),Rt(t),xh(t,d,e,a,r)),null;case 27:if(Se(t),r=me.current,d=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&pr(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return Rt(t),null}e=ae.current,ea(t)?Fp(t):(e=mm(d,a,r),t.stateNode=e,pr(t))}return Rt(t),null;case 5:if(Se(t),d=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&pr(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return Rt(t),null}if(m=ae.current,ea(t))Fp(t);else{var k=lc(me.current);switch(m){case 1:m=k.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:m=k.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":m=k.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":m=k.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":m=k.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof a.is=="string"?k.createElement("select",{is:a.is}):k.createElement("select"),a.multiple?m.multiple=!0:a.size&&(m.size=a.size);break;default:m=typeof a.is=="string"?k.createElement(d,{is:a.is}):k.createElement(d)}}m[xt]=t,m[wt]=a;e:for(k=t.child;k!==null;){if(k.tag===5||k.tag===6)m.appendChild(k.stateNode);else if(k.tag!==4&&k.tag!==27&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===t)break e;for(;k.sibling===null;){if(k.return===null||k.return===t)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}t.stateNode=m;e:switch(wi(m,d,a),d){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&pr(t)}}return Rt(t),xh(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,r),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&pr(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(o(166));if(e=me.current,ea(t)){if(e=t.stateNode,r=t.memoizedProps,a=null,d=Si,d!==null)switch(d.tag){case 27:case 5:a=d.memoizedProps}e[xt]=t,e=!!(e.nodeValue===r||a!==null&&a.suppressHydrationWarning===!0||am(e.nodeValue,r)),e||Hr(t,!0)}else e=lc(e).createTextNode(a),e[xt]=t,t.stateNode=e}return Rt(t),null;case 31:if(r=t.memoizedState,e===null||e.memoizedState!==null){if(a=ea(t),r!==null){if(e===null){if(!a)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[xt]=t}else vs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Rt(t),e=!1}else r=Nu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return t.flags&256?(nn(t),t):(nn(t),null);if((t.flags&128)!==0)throw Error(o(558))}return Rt(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(d=ea(t),a!==null&&a.dehydrated!==null){if(e===null){if(!d)throw Error(o(318));if(d=t.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(o(317));d[xt]=t}else vs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Rt(t),d=!1}else d=Nu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=d),d=!0;if(!d)return t.flags&256?(nn(t),t):(nn(t),null)}return nn(t),(t.flags&128)!==0?(t.lanes=r,t):(r=a!==null,e=e!==null&&e.memoizedState!==null,r&&(a=t.child,d=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(d=a.alternate.memoizedState.cachePool.pool),m=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(m=a.memoizedState.cachePool.pool),m!==d&&(a.flags|=2048)),r!==e&&r&&(t.child.flags|=8192),Kl(t,t.updateQueue),Rt(t),null);case 4:return oe(),e===null&&Kh(t.stateNode.containerInfo),Rt(t),null;case 10:return ur(t.type),Rt(t),null;case 19:if(U(Vt),a=t.memoizedState,a===null)return Rt(t),null;if(d=(t.flags&128)!==0,m=a.rendering,m===null)if(d)go(a,!1);else{if(jt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(m=Bl(e),m!==null){for(t.flags|=128,go(a,!1),e=m.updateQueue,t.updateQueue=e,Kl(t,e),t.subtreeFlags=0,e=r,r=t.child;r!==null;)zp(r,e),r=r.sibling;return V(Vt,Vt.current&1|2),nt&&lr(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&<()>Ql&&(t.flags|=128,d=!0,go(a,!1),t.lanes=4194304)}else{if(!d)if(e=Bl(m),e!==null){if(t.flags|=128,d=!0,e=e.updateQueue,t.updateQueue=e,Kl(t,e),go(a,!0),a.tail===null&&a.tailMode==="hidden"&&!m.alternate&&!nt)return Rt(t),null}else 2*lt()-a.renderingStartTime>Ql&&r!==536870912&&(t.flags|=128,d=!0,go(a,!1),t.lanes=4194304);a.isBackwards?(m.sibling=t.child,t.child=m):(e=a.last,e!==null?e.sibling=m:t.child=m,a.last=m)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=lt(),e.sibling=null,r=Vt.current,V(Vt,d?r&1|2:r&1),nt&&lr(t,a.treeForkCount),e):(Rt(t),null);case 22:case 23:return nn(t),Yu(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(r&536870912)!==0&&(t.flags&128)===0&&(Rt(t),t.subtreeFlags&6&&(t.flags|=8192)):Rt(t),r=t.updateQueue,r!==null&&Kl(t,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==r&&(t.flags|=2048),e!==null&&U(ys),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ur(ni),Rt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function jy(e,t){switch(Ou(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ur(ni),oe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Se(t),null;case 31:if(t.memoizedState!==null){if(nn(t),t.alternate===null)throw Error(o(340));vs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(nn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));vs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return U(Vt),null;case 4:return oe(),null;case 10:return ur(t.type),null;case 22:case 23:return nn(t),Yu(),e!==null&&U(ys),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ur(ni),null;case 25:return null;default:return null}}function hg(e,t){switch(Ou(t),t.tag){case 3:ur(ni),oe();break;case 26:case 27:case 5:Se(t);break;case 4:oe();break;case 31:t.memoizedState!==null&&nn(t);break;case 13:nn(t);break;case 19:U(Vt);break;case 10:ur(t.type);break;case 22:case 23:nn(t),Yu(),e!==null&&U(ys);break;case 24:ur(ni)}}function mo(e,t){try{var r=t.updateQueue,a=r!==null?r.lastEffect:null;if(a!==null){var d=a.next;r=d;do{if((r.tag&e)===e){a=void 0;var m=r.create,k=r.inst;a=m(),k.destroy=a}r=r.next}while(r!==d)}}catch(N){_t(t,t.return,N)}}function qr(e,t,r){try{var a=t.updateQueue,d=a!==null?a.lastEffect:null;if(d!==null){var m=d.next;a=m;do{if((a.tag&e)===e){var k=a.inst,N=k.destroy;if(N!==void 0){k.destroy=void 0,d=t;var G=r,re=N;try{re()}catch(ue){_t(d,G,ue)}}}a=a.next}while(a!==m)}}catch(ue){_t(t,t.return,ue)}}function dg(e){var t=e.updateQueue;if(t!==null){var r=e.stateNode;try{i_(t,r)}catch(a){_t(e,e.return,a)}}}function fg(e,t,r){r.props=Ts(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(a){_t(e,t,a)}}function vo(e,t){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof r=="function"?e.refCleanup=r(a):r.current=a}}catch(d){_t(e,t,d)}}function Wn(e,t){var r=e.ref,a=e.refCleanup;if(r!==null)if(typeof a=="function")try{a()}catch(d){_t(e,t,d)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(d){_t(e,t,d)}else r.current=null}function pg(e){var t=e.type,r=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":r.autoFocus&&a.focus();break e;case"img":r.src?a.src=r.src:r.srcSet&&(a.srcset=r.srcSet)}}catch(d){_t(e,e.return,d)}}function Th(e,t,r){try{var a=e.stateNode;u1(a,e.type,r,t),a[wt]=t}catch(d){_t(e,e.return,d)}}function _g(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zr(e.type)||e.tag===4}function Ah(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||_g(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zr(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Rh(e,t,r){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,t):(t=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,t.appendChild(e),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=ye));else if(a!==4&&(a===27&&Zr(e.type)&&(r=e.stateNode,t=null),e=e.child,e!==null))for(Rh(e,t,r),e=e.sibling;e!==null;)Rh(e,t,r),e=e.sibling}function Yl(e,t,r){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(a!==4&&(a===27&&Zr(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(Yl(e,t,r),e=e.sibling;e!==null;)Yl(e,t,r),e=e.sibling}function gg(e){var t=e.stateNode,r=e.memoizedProps;try{for(var a=e.type,d=t.attributes;d.length;)t.removeAttributeNode(d[0]);wi(t,a,r),t[xt]=e,t[wt]=r}catch(m){_t(e,e.return,m)}}var _r=!1,ai=!1,Lh=!1,mg=typeof WeakSet=="function"?WeakSet:Set,hi=null;function Fy(e,t){if(e=e.containerInfo,Xh=_c,e=Lp(e),Cu(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var a=r.getSelection&&r.getSelection();if(a&&a.rangeCount!==0){r=a.anchorNode;var d=a.anchorOffset,m=a.focusNode;a=a.focusOffset;try{r.nodeType,m.nodeType}catch{r=null;break e}var k=0,N=-1,G=-1,re=0,ue=0,fe=e,se=null;t:for(;;){for(var le;fe!==r||d!==0&&fe.nodeType!==3||(N=k+d),fe!==m||a!==0&&fe.nodeType!==3||(G=k+a),fe.nodeType===3&&(k+=fe.nodeValue.length),(le=fe.firstChild)!==null;)se=fe,fe=le;for(;;){if(fe===e)break t;if(se===r&&++re===d&&(N=k),se===m&&++ue===a&&(G=k),(le=fe.nextSibling)!==null)break;fe=se,se=fe.parentNode}fe=le}r=N===-1||G===-1?null:{start:N,end:G}}else r=null}r=r||{start:0,end:0}}else r=null;for(Zh={focusedElem:e,selectionRange:r},_c=!1,hi=t;hi!==null;)if(t=hi,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,hi=e;else for(;hi!==null;){switch(t=hi,m=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(r=0;r<e.length;r++)d=e[r],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&m!==null){e=void 0,r=t,d=m.memoizedProps,m=m.memoizedState,a=r.stateNode;try{var xe=Ts(r.type,d);e=a.getSnapshotBeforeUpdate(xe,m),a.__reactInternalSnapshotBeforeUpdate=e}catch(ze){_t(r,r.return,ze)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,r=e.nodeType,r===9)ed(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ed(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,hi=e;break}hi=t.return}}function vg(e,t,r){var a=r.flags;switch(r.tag){case 0:case 11:case 15:mr(e,r),a&4&&mo(5,r);break;case 1:if(mr(e,r),a&4)if(e=r.stateNode,t===null)try{e.componentDidMount()}catch(k){_t(r,r.return,k)}else{var d=Ts(r.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(d,t,e.__reactInternalSnapshotBeforeUpdate)}catch(k){_t(r,r.return,k)}}a&64&&dg(r),a&512&&vo(r,r.return);break;case 3:if(mr(e,r),a&64&&(e=r.updateQueue,e!==null)){if(t=null,r.child!==null)switch(r.child.tag){case 27:case 5:t=r.child.stateNode;break;case 1:t=r.child.stateNode}try{i_(e,t)}catch(k){_t(r,r.return,k)}}break;case 27:t===null&&a&4&&gg(r);case 26:case 5:mr(e,r),t===null&&a&4&&pg(r),a&512&&vo(r,r.return);break;case 12:mr(e,r);break;case 31:mr(e,r),a&4&&yg(e,r);break;case 13:mr(e,r),a&4&&Cg(e,r),a&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=Qy.bind(null,r),v1(e,r))));break;case 22:if(a=r.memoizedState!==null||_r,!a){t=t!==null&&t.memoizedState!==null||ai,d=_r;var m=ai;_r=a,(ai=t)&&!m?vr(e,r,(r.subtreeFlags&8772)!==0):mr(e,r),_r=d,ai=m}break;case 30:break;default:mr(e,r)}}function bg(e){var t=e.alternate;t!==null&&(e.alternate=null,bg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Me(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Dt=null,Pi=!1;function gr(e,t,r){for(r=r.child;r!==null;)Sg(e,t,r),r=r.sibling}function Sg(e,t,r){if(Kt&&typeof Kt.onCommitFiberUnmount=="function")try{Kt.onCommitFiberUnmount(Ii,r)}catch{}switch(r.tag){case 26:ai||Wn(r,t),gr(e,t,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:ai||Wn(r,t);var a=Dt,d=Pi;Zr(r.type)&&(Dt=r.stateNode,Pi=!1),gr(e,t,r),Ao(r.stateNode),Dt=a,Pi=d;break;case 5:ai||Wn(r,t);case 6:if(a=Dt,d=Pi,Dt=null,gr(e,t,r),Dt=a,Pi=d,Dt!==null)if(Pi)try{(Dt.nodeType===9?Dt.body:Dt.nodeName==="HTML"?Dt.ownerDocument.body:Dt).removeChild(r.stateNode)}catch(m){_t(r,t,m)}else try{Dt.removeChild(r.stateNode)}catch(m){_t(r,t,m)}break;case 18:Dt!==null&&(Pi?(e=Dt,dm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),ya(e)):dm(Dt,r.stateNode));break;case 4:a=Dt,d=Pi,Dt=r.stateNode.containerInfo,Pi=!0,gr(e,t,r),Dt=a,Pi=d;break;case 0:case 11:case 14:case 15:qr(2,r,t),ai||qr(4,r,t),gr(e,t,r);break;case 1:ai||(Wn(r,t),a=r.stateNode,typeof a.componentWillUnmount=="function"&&fg(r,t,a)),gr(e,t,r);break;case 21:gr(e,t,r);break;case 22:ai=(a=ai)||r.memoizedState!==null,gr(e,t,r),ai=a;break;default:gr(e,t,r)}}function yg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ya(e)}catch(r){_t(t,t.return,r)}}}function Cg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ya(e)}catch(r){_t(t,t.return,r)}}function qy(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new mg),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new mg),t;default:throw Error(o(435,e.tag))}}function Vl(e,t){var r=qy(e);t.forEach(function(a){if(!r.has(a)){r.add(a);var d=Jy.bind(null,e,a);a.then(d,d)}})}function ji(e,t){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var d=r[a],m=e,k=t,N=k;e:for(;N!==null;){switch(N.tag){case 27:if(Zr(N.type)){Dt=N.stateNode,Pi=!1;break e}break;case 5:Dt=N.stateNode,Pi=!1;break e;case 3:case 4:Dt=N.stateNode.containerInfo,Pi=!0;break e}N=N.return}if(Dt===null)throw Error(o(160));Sg(m,k,d),Dt=null,Pi=!1,m=d.alternate,m!==null&&(m.return=null),d.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)wg(t,e),t=t.sibling}var Dn=null;function wg(e,t){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ji(t,e),Fi(e),a&4&&(qr(3,e,e.return),mo(3,e),qr(5,e,e.return));break;case 1:ji(t,e),Fi(e),a&512&&(ai||r===null||Wn(r,r.return)),a&64&&_r&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?a:r.concat(a))));break;case 26:var d=Dn;if(ji(t,e),Fi(e),a&512&&(ai||r===null||Wn(r,r.return)),a&4){var m=r!==null?r.memoizedState:null;if(a=e.memoizedState,r===null)if(a===null)if(e.stateNode===null){e:{a=e.type,r=e.memoizedProps,d=d.ownerDocument||d;t:switch(a){case"title":m=d.getElementsByTagName("title")[0],(!m||m[jn]||m[xt]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=d.createElement(a),d.head.insertBefore(m,d.querySelector("head > title"))),wi(m,a,r),m[xt]=e,Ye(m),a=m;break e;case"link":var k=wm("link","href",d).get(a+(r.href||""));if(k){for(var N=0;N<k.length;N++)if(m=k[N],m.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&m.getAttribute("rel")===(r.rel==null?null:r.rel)&&m.getAttribute("title")===(r.title==null?null:r.title)&&m.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){k.splice(N,1);break t}}m=d.createElement(a),wi(m,a,r),d.head.appendChild(m);break;case"meta":if(k=wm("meta","content",d).get(a+(r.content||""))){for(N=0;N<k.length;N++)if(m=k[N],m.getAttribute("content")===(r.content==null?null:""+r.content)&&m.getAttribute("name")===(r.name==null?null:r.name)&&m.getAttribute("property")===(r.property==null?null:r.property)&&m.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&m.getAttribute("charset")===(r.charSet==null?null:r.charSet)){k.splice(N,1);break t}}m=d.createElement(a),wi(m,a,r),d.head.appendChild(m);break;default:throw Error(o(468,a))}m[xt]=e,Ye(m),a=m}e.stateNode=a}else Em(d,e.type,e.stateNode);else e.stateNode=Cm(d,a,e.memoizedProps);else m!==a?(m===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):m.count--,a===null?Em(d,e.type,e.stateNode):Cm(d,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Th(e,e.memoizedProps,r.memoizedProps)}break;case 27:ji(t,e),Fi(e),a&512&&(ai||r===null||Wn(r,r.return)),r!==null&&a&4&&Th(e,e.memoizedProps,r.memoizedProps);break;case 5:if(ji(t,e),Fi(e),a&512&&(ai||r===null||Wn(r,r.return)),e.flags&32){d=e.stateNode;try{Ue(d,"")}catch(xe){_t(e,e.return,xe)}}a&4&&e.stateNode!=null&&(d=e.memoizedProps,Th(e,d,r!==null?r.memoizedProps:d)),a&1024&&(Lh=!0);break;case 6:if(ji(t,e),Fi(e),a&4){if(e.stateNode===null)throw Error(o(162));a=e.memoizedProps,r=e.stateNode;try{r.nodeValue=a}catch(xe){_t(e,e.return,xe)}}break;case 3:if(hc=null,d=Dn,Dn=cc(t.containerInfo),ji(t,e),Dn=d,Fi(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{ya(t.containerInfo)}catch(xe){_t(e,e.return,xe)}Lh&&(Lh=!1,Eg(e));break;case 4:a=Dn,Dn=cc(e.stateNode.containerInfo),ji(t,e),Fi(e),Dn=a;break;case 12:ji(t,e),Fi(e);break;case 31:ji(t,e),Fi(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Vl(e,a)));break;case 13:ji(t,e),Fi(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(Zl=lt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Vl(e,a)));break;case 22:d=e.memoizedState!==null;var G=r!==null&&r.memoizedState!==null,re=_r,ue=ai;if(_r=re||d,ai=ue||G,ji(t,e),ai=ue,_r=re,Fi(e),a&8192)e:for(t=e.stateNode,t._visibility=d?t._visibility&-2:t._visibility|1,d&&(r===null||G||_r||ai||As(e)),r=null,t=e;;){if(t.tag===5||t.tag===26){if(r===null){G=r=t;try{if(m=G.stateNode,d)k=m.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else{N=G.stateNode;var fe=G.memoizedProps.style,se=fe!=null&&fe.hasOwnProperty("display")?fe.display:null;N.style.display=se==null||typeof se=="boolean"?"":(""+se).trim()}}catch(xe){_t(G,G.return,xe)}}}else if(t.tag===6){if(r===null){G=t;try{G.stateNode.nodeValue=d?"":G.memoizedProps}catch(xe){_t(G,G.return,xe)}}}else if(t.tag===18){if(r===null){G=t;try{var le=G.stateNode;d?fm(le,!0):fm(G.stateNode,!1)}catch(xe){_t(G,G.return,xe)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;r===t&&(r=null),t=t.return}r===t&&(r=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(r=a.retryQueue,r!==null&&(a.retryQueue=null,Vl(e,r))));break;case 19:ji(t,e),Fi(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Vl(e,a)));break;case 30:break;case 21:break;default:ji(t,e),Fi(e)}}function Fi(e){var t=e.flags;if(t&2){try{for(var r,a=e.return;a!==null;){if(_g(a)){r=a;break}a=a.return}if(r==null)throw Error(o(160));switch(r.tag){case 27:var d=r.stateNode,m=Ah(e);Yl(e,m,d);break;case 5:var k=r.stateNode;r.flags&32&&(Ue(k,""),r.flags&=-33);var N=Ah(e);Yl(e,N,k);break;case 3:case 4:var G=r.stateNode.containerInfo,re=Ah(e);Rh(e,re,G);break;default:throw Error(o(161))}}catch(ue){_t(e,e.return,ue)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Eg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Eg(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function mr(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)vg(e,t.alternate,t),t=t.sibling}function As(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:qr(4,t,t.return),As(t);break;case 1:Wn(t,t.return);var r=t.stateNode;typeof r.componentWillUnmount=="function"&&fg(t,t.return,r),As(t);break;case 27:Ao(t.stateNode);case 26:case 5:Wn(t,t.return),As(t);break;case 22:t.memoizedState===null&&As(t);break;case 30:As(t);break;default:As(t)}e=e.sibling}}function vr(e,t,r){for(r=r&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,d=e,m=t,k=m.flags;switch(m.tag){case 0:case 11:case 15:vr(d,m,r),mo(4,m);break;case 1:if(vr(d,m,r),a=m,d=a.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(re){_t(a,a.return,re)}if(a=m,d=a.updateQueue,d!==null){var N=a.stateNode;try{var G=d.shared.hiddenCallbacks;if(G!==null)for(d.shared.hiddenCallbacks=null,d=0;d<G.length;d++)t_(G[d],N)}catch(re){_t(a,a.return,re)}}r&&k&64&&dg(m),vo(m,m.return);break;case 27:gg(m);case 26:case 5:vr(d,m,r),r&&a===null&&k&4&&pg(m),vo(m,m.return);break;case 12:vr(d,m,r);break;case 31:vr(d,m,r),r&&k&4&&yg(d,m);break;case 13:vr(d,m,r),r&&k&4&&Cg(d,m);break;case 22:m.memoizedState===null&&vr(d,m,r),vo(m,m.return);break;case 30:break;default:vr(d,m,r)}t=t.sibling}}function kh(e,t){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&no(r))}function Mh(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&no(e))}function On(e,t,r,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)xg(e,t,r,a),t=t.sibling}function xg(e,t,r,a){var d=t.flags;switch(t.tag){case 0:case 11:case 15:On(e,t,r,a),d&2048&&mo(9,t);break;case 1:On(e,t,r,a);break;case 3:On(e,t,r,a),d&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&no(e)));break;case 12:if(d&2048){On(e,t,r,a),e=t.stateNode;try{var m=t.memoizedProps,k=m.id,N=m.onPostCommit;typeof N=="function"&&N(k,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(G){_t(t,t.return,G)}}else On(e,t,r,a);break;case 31:On(e,t,r,a);break;case 13:On(e,t,r,a);break;case 23:break;case 22:m=t.stateNode,k=t.alternate,t.memoizedState!==null?m._visibility&2?On(e,t,r,a):bo(e,t):m._visibility&2?On(e,t,r,a):(m._visibility|=2,ua(e,t,r,a,(t.subtreeFlags&10256)!==0||!1)),d&2048&&kh(k,t);break;case 24:On(e,t,r,a),d&2048&&Mh(t.alternate,t);break;default:On(e,t,r,a)}}function ua(e,t,r,a,d){for(d=d&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var m=e,k=t,N=r,G=a,re=k.flags;switch(k.tag){case 0:case 11:case 15:ua(m,k,N,G,d),mo(8,k);break;case 23:break;case 22:var ue=k.stateNode;k.memoizedState!==null?ue._visibility&2?ua(m,k,N,G,d):bo(m,k):(ue._visibility|=2,ua(m,k,N,G,d)),d&&re&2048&&kh(k.alternate,k);break;case 24:ua(m,k,N,G,d),d&&re&2048&&Mh(k.alternate,k);break;default:ua(m,k,N,G,d)}t=t.sibling}}function bo(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var r=e,a=t,d=a.flags;switch(a.tag){case 22:bo(r,a),d&2048&&kh(a.alternate,a);break;case 24:bo(r,a),d&2048&&Mh(a.alternate,a);break;default:bo(r,a)}t=t.sibling}}var So=8192;function ha(e,t,r){if(e.subtreeFlags&So)for(e=e.child;e!==null;)Tg(e,t,r),e=e.sibling}function Tg(e,t,r){switch(e.tag){case 26:ha(e,t,r),e.flags&So&&e.memoizedState!==null&&k1(r,Dn,e.memoizedState,e.memoizedProps);break;case 5:ha(e,t,r);break;case 3:case 4:var a=Dn;Dn=cc(e.stateNode.containerInfo),ha(e,t,r),Dn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=So,So=16777216,ha(e,t,r),So=a):ha(e,t,r));break;default:ha(e,t,r)}}function Ag(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function yo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var a=t[r];hi=a,Lg(a,e)}Ag(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Rg(e),e=e.sibling}function Rg(e){switch(e.tag){case 0:case 11:case 15:yo(e),e.flags&2048&&qr(9,e,e.return);break;case 3:yo(e);break;case 12:yo(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Xl(e)):yo(e);break;default:yo(e)}}function Xl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var a=t[r];hi=a,Lg(a,e)}Ag(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:qr(8,t,t.return),Xl(t);break;case 22:r=t.stateNode,r._visibility&2&&(r._visibility&=-3,Xl(t));break;default:Xl(t)}e=e.sibling}}function Lg(e,t){for(;hi!==null;){var r=hi;switch(r.tag){case 0:case 11:case 15:qr(8,r,t);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var a=r.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:no(r.memoizedState.cache)}if(a=r.child,a!==null)a.return=r,hi=a;else e:for(r=e;hi!==null;){a=hi;var d=a.sibling,m=a.return;if(bg(a),a===r){hi=null;break e}if(d!==null){d.return=m,hi=d;break e}hi=m}}}var Wy={getCacheForType:function(e){var t=yi(ni),r=t.data.get(e);return r===void 0&&(r=e(),t.data.set(e,r)),r},cacheSignal:function(){return yi(ni).controller.signal}},Gy=typeof WeakMap=="function"?WeakMap:Map,ct=0,yt=null,Ve=null,et=0,pt=0,rn=null,Wr=!1,da=!1,Dh=!1,br=0,jt=0,Gr=0,Rs=0,Oh=0,sn=0,fa=0,Co=null,qi=null,Bh=!1,Zl=0,kg=0,Ql=1/0,Jl=null,Kr=null,ui=0,Yr=null,pa=null,Sr=0,Nh=0,Ih=null,Mg=null,wo=0,Hh=null;function an(){return(ct&2)!==0&&et!==0?et&-et:j.T!==null?Fh():ir()}function Dg(){if(sn===0)if((et&536870912)===0||nt){var e=Pn;Pn<<=1,(Pn&3932160)===0&&(Pn=262144),sn=e}else sn=536870912;return e=tn.current,e!==null&&(e.flags|=32),sn}function Wi(e,t,r){(e===yt&&(pt===2||pt===9)||e.cancelPendingCommit!==null)&&(_a(e,0),Vr(e,et,sn,!1)),ht(e,r),((ct&2)===0||e!==yt)&&(e===yt&&((ct&2)===0&&(Rs|=r),jt===4&&Vr(e,et,sn,!1)),Gn(e))}function Og(e,t,r){if((ct&6)!==0)throw Error(o(327));var a=!r&&(t&127)===0&&(t&e.expiredLanes)===0||he(e,t),d=a?Vy(e,t):$h(e,t,!0),m=a;do{if(d===0){da&&!a&&Vr(e,t,0,!1);break}else{if(r=e.current.alternate,m&&!Ky(r)){d=$h(e,t,!1),m=!1;continue}if(d===2){if(m=t,e.errorRecoveryDisabledLanes&m)var k=0;else k=e.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){t=k;e:{var N=e;d=Co;var G=N.current.memoizedState.isDehydrated;if(G&&(_a(N,k).flags|=256),k=$h(N,k,!1),k!==2){if(Dh&&!G){N.errorRecoveryDisabledLanes|=m,Rs|=m,d=4;break e}m=qi,qi=d,m!==null&&(qi===null?qi=m:qi.push.apply(qi,m))}d=k}if(m=!1,d!==2)continue}}if(d===1){_a(e,0),Vr(e,t,0,!0);break}e:{switch(a=e,m=d,m){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Vr(a,t,sn,!Wr);break e;case 2:qi=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(d=Zl+300-lt(),10<d)){if(Vr(a,t,sn,!Wr),X(a,0,!0)!==0)break e;Sr=t,a.timeoutHandle=um(Bg.bind(null,a,r,qi,Jl,Bh,t,sn,Rs,fa,Wr,m,"Throttled",-0,0),d);break e}Bg(a,r,qi,Jl,Bh,t,sn,Rs,fa,Wr,m,null,-0,0)}}break}while(!0);Gn(e)}function Bg(e,t,r,a,d,m,k,N,G,re,ue,fe,se,le){if(e.timeoutHandle=-1,fe=t.subtreeFlags,fe&8192||(fe&16785408)===16785408){fe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ye},Tg(t,m,fe);var xe=(m&62914560)===m?Zl-lt():(m&4194048)===m?kg-lt():0;if(xe=M1(fe,xe),xe!==null){Sr=m,e.cancelPendingCommit=xe(jg.bind(null,e,t,m,r,a,d,k,N,G,ue,fe,null,se,le)),Vr(e,m,k,!re);return}}jg(e,t,m,r,a,d,k,N,G)}function Ky(e){for(var t=e;;){var r=t.tag;if((r===0||r===11||r===15)&&t.flags&16384&&(r=t.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var a=0;a<r.length;a++){var d=r[a],m=d.getSnapshot;d=d.value;try{if(!Ji(m(),d))return!1}catch{return!1}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Vr(e,t,r,a){t&=~Oh,t&=~Rs,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var d=t;0<d;){var m=31-zt(d),k=1<<m;a[m]=-1,d&=~k}r!==0&&Ce(e,r,t)}function ec(){return(ct&6)===0?(Eo(0),!1):!0}function zh(){if(Ve!==null){if(pt===0)var e=Ve.return;else e=Ve,cr=bs=null,eh(e),sa=null,so=0,e=Ve;for(;e!==null;)hg(e.alternate,e),e=e.return;Ve=null}}function _a(e,t){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,f1(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),Sr=0,zh(),yt=e,Ve=r=or(e.current,null),et=t,pt=0,rn=null,Wr=!1,da=he(e,t),Dh=!1,fa=sn=Oh=Rs=Gr=jt=0,qi=Co=null,Bh=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var d=31-zt(a),m=1<<d;t|=e[d],a&=~m}return br=t,yl(),r}function Ng(e,t){qe=null,j.H=po,t===ra||t===Ll?(t=Zp(),pt=3):t===ju?(t=Zp(),pt=4):pt=t===gh?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,rn=t,Ve===null&&(jt=1,Fl(e,fn(t,e.current)))}function Ig(){var e=tn.current;return e===null?!0:(et&4194048)===et?mn===null:(et&62914560)===et||(et&536870912)!==0?e===mn:!1}function Hg(){var e=j.H;return j.H=po,e===null?po:e}function zg(){var e=j.A;return j.A=Wy,e}function tc(){jt=4,Wr||(et&4194048)!==et&&tn.current!==null||(da=!0),(Gr&134217727)===0&&(Rs&134217727)===0||yt===null||Vr(yt,et,sn,!1)}function $h(e,t,r){var a=ct;ct|=2;var d=Hg(),m=zg();(yt!==e||et!==t)&&(Jl=null,_a(e,t)),t=!1;var k=jt;e:do try{if(pt!==0&&Ve!==null){var N=Ve,G=rn;switch(pt){case 8:zh(),k=6;break e;case 3:case 2:case 9:case 6:tn.current===null&&(t=!0);var re=pt;if(pt=0,rn=null,ga(e,N,G,re),r&&da){k=0;break e}break;default:re=pt,pt=0,rn=null,ga(e,N,G,re)}}Yy(),k=jt;break}catch(ue){Ng(e,ue)}while(!0);return t&&e.shellSuspendCounter++,cr=bs=null,ct=a,j.H=d,j.A=m,Ve===null&&(yt=null,et=0,yl()),k}function Yy(){for(;Ve!==null;)$g(Ve)}function Vy(e,t){var r=ct;ct|=2;var a=Hg(),d=zg();yt!==e||et!==t?(Jl=null,Ql=lt()+500,_a(e,t)):da=he(e,t);e:do try{if(pt!==0&&Ve!==null){t=Ve;var m=rn;t:switch(pt){case 1:pt=0,rn=null,ga(e,t,m,1);break;case 2:case 9:if(Vp(m)){pt=0,rn=null,Ug(t);break}t=function(){pt!==2&&pt!==9||yt!==e||(pt=7),Gn(e)},m.then(t,t);break e;case 3:pt=7;break e;case 4:pt=5;break e;case 7:Vp(m)?(pt=0,rn=null,Ug(t)):(pt=0,rn=null,ga(e,t,m,7));break;case 5:var k=null;switch(Ve.tag){case 26:k=Ve.memoizedState;case 5:case 27:var N=Ve;if(k?xm(k):N.stateNode.complete){pt=0,rn=null;var G=N.sibling;if(G!==null)Ve=G;else{var re=N.return;re!==null?(Ve=re,ic(re)):Ve=null}break t}}pt=0,rn=null,ga(e,t,m,5);break;case 6:pt=0,rn=null,ga(e,t,m,6);break;case 8:zh(),jt=6;break e;default:throw Error(o(462))}}Xy();break}catch(ue){Ng(e,ue)}while(!0);return cr=bs=null,j.H=a,j.A=d,ct=r,Ve!==null?0:(yt=null,et=0,yl(),jt)}function Xy(){for(;Ve!==null&&!An();)$g(Ve)}function $g(e){var t=cg(e.alternate,e,br);e.memoizedProps=e.pendingProps,t===null?ic(e):Ve=t}function Ug(e){var t=e,r=t.alternate;switch(t.tag){case 15:case 0:t=ng(r,t,t.pendingProps,t.type,void 0,et);break;case 11:t=ng(r,t,t.pendingProps,t.type.render,t.ref,et);break;case 5:eh(t);default:hg(r,t),t=Ve=zp(t,br),t=cg(r,t,br)}e.memoizedProps=e.pendingProps,t===null?ic(e):Ve=t}function ga(e,t,r,a){cr=bs=null,eh(t),sa=null,so=0;var d=t.return;try{if(zy(e,d,t,r,et)){jt=1,Fl(e,fn(r,e.current)),Ve=null;return}}catch(m){if(d!==null)throw Ve=d,m;jt=1,Fl(e,fn(r,e.current)),Ve=null;return}t.flags&32768?(nt||a===1?e=!0:da||(et&536870912)!==0?e=!1:(Wr=e=!0,(a===2||a===9||a===3||a===6)&&(a=tn.current,a!==null&&a.tag===13&&(a.flags|=16384))),Pg(t,e)):ic(t)}function ic(e){var t=e;do{if((t.flags&32768)!==0){Pg(t,Wr);return}e=t.return;var r=Py(t.alternate,t,br);if(r!==null){Ve=r;return}if(t=t.sibling,t!==null){Ve=t;return}Ve=t=e}while(t!==null);jt===0&&(jt=5)}function Pg(e,t){do{var r=jy(e.alternate,e);if(r!==null){r.flags&=32767,Ve=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!t&&(e=e.sibling,e!==null)){Ve=e;return}Ve=e=r}while(e!==null);jt=6,Ve=null}function jg(e,t,r,a,d,m,k,N,G){e.cancelPendingCommit=null;do nc();while(ui!==0);if((ct&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(m=t.lanes|t.childLanes,m|=Au,Ee(e,r,m,k,N,G),e===yt&&(Ve=yt=null,et=0),pa=t,Yr=e,Sr=r,Nh=m,Ih=d,Mg=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,e1(ei,function(){return Kg(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=j.T,j.T=null,d=Y.p,Y.p=2,k=ct,ct|=4;try{Fy(e,t,r)}finally{ct=k,Y.p=d,j.T=a}}ui=1,Fg(),qg(),Wg()}}function Fg(){if(ui===1){ui=0;var e=Yr,t=pa,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=j.T,j.T=null;var a=Y.p;Y.p=2;var d=ct;ct|=4;try{wg(t,e);var m=Zh,k=Lp(e.containerInfo),N=m.focusedElem,G=m.selectionRange;if(k!==N&&N&&N.ownerDocument&&Rp(N.ownerDocument.documentElement,N)){if(G!==null&&Cu(N)){var re=G.start,ue=G.end;if(ue===void 0&&(ue=re),"selectionStart"in N)N.selectionStart=re,N.selectionEnd=Math.min(ue,N.value.length);else{var fe=N.ownerDocument||document,se=fe&&fe.defaultView||window;if(se.getSelection){var le=se.getSelection(),xe=N.textContent.length,ze=Math.min(G.start,xe),vt=G.end===void 0?ze:Math.min(G.end,xe);!le.extend&&ze>vt&&(k=vt,vt=ze,ze=k);var ie=Ap(N,ze),J=Ap(N,vt);if(ie&&J&&(le.rangeCount!==1||le.anchorNode!==ie.node||le.anchorOffset!==ie.offset||le.focusNode!==J.node||le.focusOffset!==J.offset)){var ne=fe.createRange();ne.setStart(ie.node,ie.offset),le.removeAllRanges(),ze>vt?(le.addRange(ne),le.extend(J.node,J.offset)):(ne.setEnd(J.node,J.offset),le.addRange(ne))}}}}for(fe=[],le=N;le=le.parentNode;)le.nodeType===1&&fe.push({element:le,left:le.scrollLeft,top:le.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<fe.length;N++){var de=fe[N];de.element.scrollLeft=de.left,de.element.scrollTop=de.top}}_c=!!Xh,Zh=Xh=null}finally{ct=d,Y.p=a,j.T=r}}e.current=t,ui=2}}function qg(){if(ui===2){ui=0;var e=Yr,t=pa,r=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||r){r=j.T,j.T=null;var a=Y.p;Y.p=2;var d=ct;ct|=4;try{vg(e,t.alternate,t)}finally{ct=d,Y.p=a,j.T=r}}ui=3}}function Wg(){if(ui===4||ui===3){ui=0,Jt();var e=Yr,t=pa,r=Sr,a=Mg;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ui=5:(ui=0,pa=Yr=null,Gg(e,e.pendingLanes));var d=e.pendingLanes;if(d===0&&(Kr=null),vi(r),t=t.stateNode,Kt&&typeof Kt.onCommitFiberRoot=="function")try{Kt.onCommitFiberRoot(Ii,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=j.T,d=Y.p,Y.p=2,j.T=null;try{for(var m=e.onRecoverableError,k=0;k<a.length;k++){var N=a[k];m(N.value,{componentStack:N.stack})}}finally{j.T=t,Y.p=d}}(Sr&3)!==0&&nc(),Gn(e),d=e.pendingLanes,(r&261930)!==0&&(d&42)!==0?e===Hh?wo++:(wo=0,Hh=e):wo=0,Eo(0)}}function Gg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,no(t)))}function nc(){return Fg(),qg(),Wg(),Kg()}function Kg(){if(ui!==5)return!1;var e=Yr,t=Nh;Nh=0;var r=vi(Sr),a=j.T,d=Y.p;try{Y.p=32>r?32:r,j.T=null,r=Ih,Ih=null;var m=Yr,k=Sr;if(ui=0,pa=Yr=null,Sr=0,(ct&6)!==0)throw Error(o(331));var N=ct;if(ct|=4,Rg(m.current),xg(m,m.current,k,r),ct=N,Eo(0,!1),Kt&&typeof Kt.onPostCommitFiberRoot=="function")try{Kt.onPostCommitFiberRoot(Ii,m)}catch{}return!0}finally{Y.p=d,j.T=a,Gg(e,t)}}function Yg(e,t,r){t=fn(r,t),t=_h(e.stateNode,t,2),e=Pr(e,t,2),e!==null&&(ht(e,2),Gn(e))}function _t(e,t,r){if(e.tag===3)Yg(e,e,r);else for(;t!==null;){if(t.tag===3){Yg(t,e,r);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Kr===null||!Kr.has(a))){e=fn(r,e),r=V_(2),a=Pr(t,r,2),a!==null&&(X_(r,a,t,e),ht(a,2),Gn(a));break}}t=t.return}}function Uh(e,t,r){var a=e.pingCache;if(a===null){a=e.pingCache=new Gy;var d=new Set;a.set(t,d)}else d=a.get(t),d===void 0&&(d=new Set,a.set(t,d));d.has(r)||(Dh=!0,d.add(r),e=Zy.bind(null,e,t,r),t.then(e,e))}function Zy(e,t,r){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,yt===e&&(et&r)===r&&(jt===4||jt===3&&(et&62914560)===et&&300>lt()-Zl?(ct&2)===0&&_a(e,0):Oh|=r,fa===et&&(fa=0)),Gn(e)}function Vg(e,t){t===0&&(t=Ie()),e=gs(e,t),e!==null&&(ht(e,t),Gn(e))}function Qy(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Vg(e,r)}function Jy(e,t){var r=0;switch(e.tag){case 31:case 13:var a=e.stateNode,d=e.memoizedState;d!==null&&(r=d.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(o(314))}a!==null&&a.delete(t),Vg(e,r)}function e1(e,t){return mi(e,t)}var rc=null,ma=null,Ph=!1,sc=!1,jh=!1,Xr=0;function Gn(e){e!==ma&&e.next===null&&(ma===null?rc=ma=e:ma=ma.next=e),sc=!0,Ph||(Ph=!0,i1())}function Eo(e,t){if(!jh&&sc){jh=!0;do for(var r=!1,a=rc;a!==null;){if(e!==0){var d=a.pendingLanes;if(d===0)var m=0;else{var k=a.suspendedLanes,N=a.pingedLanes;m=(1<<31-zt(42|e)+1)-1,m&=d&~(k&~N),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(r=!0,Jg(a,m))}else m=et,m=X(a,a===yt?m:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(m&3)===0||he(a,m)||(r=!0,Jg(a,m));a=a.next}while(r);jh=!1}}function t1(){Xg()}function Xg(){sc=Ph=!1;var e=0;Xr!==0&&d1()&&(e=Xr);for(var t=lt(),r=null,a=rc;a!==null;){var d=a.next,m=Zg(a,t);m===0?(a.next=null,r===null?rc=d:r.next=d,d===null&&(ma=r)):(r=a,(e!==0||(m&3)!==0)&&(sc=!0)),a=d}ui!==0&&ui!==5||Eo(e),Xr!==0&&(Xr=0)}function Zg(e,t){for(var r=e.suspendedLanes,a=e.pingedLanes,d=e.expirationTimes,m=e.pendingLanes&-62914561;0<m;){var k=31-zt(m),N=1<<k,G=d[k];G===-1?((N&r)===0||(N&a)!==0)&&(d[k]=ve(N,t)):G<=t&&(e.expiredLanes|=N),m&=~N}if(t=yt,r=et,r=X(e,e===t?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,r===0||e===t&&(pt===2||pt===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&un(a),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||he(e,r)){if(t=r&-r,t===e.callbackPriority)return t;switch(a!==null&&un(a),vi(r)){case 2:case 8:r=Ht;break;case 32:r=ei;break;case 268435456:r=Ti;break;default:r=ei}return a=Qg.bind(null,e),r=mi(r,a),e.callbackPriority=t,e.callbackNode=r,t}return a!==null&&a!==null&&un(a),e.callbackPriority=2,e.callbackNode=null,2}function Qg(e,t){if(ui!==0&&ui!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(nc()&&e.callbackNode!==r)return null;var a=et;return a=X(e,e===yt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Og(e,a,t),Zg(e,lt()),e.callbackNode!=null&&e.callbackNode===r?Qg.bind(null,e):null)}function Jg(e,t){if(nc())return null;Og(e,t,!0)}function i1(){p1(function(){(ct&6)!==0?mi(It,t1):Xg()})}function Fh(){if(Xr===0){var e=ia;e===0&&(e=Ln,Ln<<=1,(Ln&261888)===0&&(Ln=256)),Xr=e}return Xr}function em(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Or(""+e)}function tm(e,t){var r=t.ownerDocument.createElement("input");return r.name=t.name,r.value=t.value,e.id&&r.setAttribute("form",e.id),t.parentNode.insertBefore(r,t),e=new FormData(e),r.parentNode.removeChild(r),e}function n1(e,t,r,a,d){if(t==="submit"&&r&&r.stateNode===d){var m=em((d[wt]||null).action),k=a.submitter;k&&(t=(t=k[wt]||null)?em(t.formAction):k.getAttribute("formAction"),t!==null&&(m=t,k=null));var N=new ml("action","action",null,a,d);e.push({event:N,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Xr!==0){var G=k?tm(d,k):new FormData(d);ch(r,{pending:!0,data:G,method:d.method,action:m},null,G)}}else typeof m=="function"&&(N.preventDefault(),G=k?tm(d,k):new FormData(d),ch(r,{pending:!0,data:G,method:d.method,action:m},m,G))},currentTarget:d}]})}}for(var qh=0;qh<Tu.length;qh++){var Wh=Tu[qh],r1=Wh.toLowerCase(),s1=Wh[0].toUpperCase()+Wh.slice(1);Mn(r1,"on"+s1)}Mn(Dp,"onAnimationEnd"),Mn(Op,"onAnimationIteration"),Mn(Bp,"onAnimationStart"),Mn("dblclick","onDoubleClick"),Mn("focusin","onFocus"),Mn("focusout","onBlur"),Mn(yy,"onTransitionRun"),Mn(Cy,"onTransitionStart"),Mn(wy,"onTransitionCancel"),Mn(Np,"onTransitionEnd"),ge("onMouseEnter",["mouseout","mouseover"]),ge("onMouseLeave",["mouseout","mouseover"]),ge("onPointerEnter",["pointerout","pointerover"]),ge("onPointerLeave",["pointerout","pointerover"]),Ut("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ut("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ut("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ut("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ut("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ut("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xo="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(" "),a1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(xo));function im(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var a=e[r],d=a.event;a=a.listeners;e:{var m=void 0;if(t)for(var k=a.length-1;0<=k;k--){var N=a[k],G=N.instance,re=N.currentTarget;if(N=N.listener,G!==m&&d.isPropagationStopped())break e;m=N,d.currentTarget=re;try{m(d)}catch(ue){Sl(ue)}d.currentTarget=null,m=G}else for(k=0;k<a.length;k++){if(N=a[k],G=N.instance,re=N.currentTarget,N=N.listener,G!==m&&d.isPropagationStopped())break e;m=N,d.currentTarget=re;try{m(d)}catch(ue){Sl(ue)}d.currentTarget=null,m=G}}}}function Xe(e,t){var r=t[Mr];r===void 0&&(r=t[Mr]=new Set);var a=e+"__bubble";r.has(a)||(nm(t,e,2,!1),r.add(a))}function Gh(e,t,r){var a=0;t&&(a|=4),nm(r,e,a,t)}var ac="_reactListening"+Math.random().toString(36).slice(2);function Kh(e){if(!e[ac]){e[ac]=!0,Tt.forEach(function(r){r!=="selectionchange"&&(a1.has(r)||Gh(r,!1,e),Gh(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ac]||(t[ac]=!0,Gh("selectionchange",!1,t))}}function nm(e,t,r,a){switch(Dm(t)){case 2:var d=B1;break;case 8:d=N1;break;default:d=ld}r=d.bind(null,t,r,e),d=void 0,!fu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(d=!0),a?d!==void 0?e.addEventListener(t,r,{capture:!0,passive:d}):e.addEventListener(t,r,!0):d!==void 0?e.addEventListener(t,r,{passive:d}):e.addEventListener(t,r,!1)}function Yh(e,t,r,a,d){var m=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var k=a.tag;if(k===3||k===4){var N=a.stateNode.containerInfo;if(N===d)break;if(k===4)for(k=a.return;k!==null;){var G=k.tag;if((G===3||G===4)&&k.stateNode.containerInfo===d)return;k=k.return}for(;N!==null;){if(k=q(N),k===null)return;if(G=k.tag,G===5||G===6||G===26||G===27){a=m=k;continue e}N=N.parentNode}}a=a.return}fl(function(){var re=m,ue=Fe(r),fe=[];e:{var se=Ip.get(e);if(se!==void 0){var le=ml,xe=e;switch(e){case"keypress":if(_l(r)===0)break e;case"keydown":case"keyup":le=JS;break;case"focusin":xe="focus",le=mu;break;case"focusout":xe="blur",le=mu;break;case"beforeblur":case"afterblur":le=mu;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":le=hp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":le=PS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":le=iy;break;case Dp:case Op:case Bp:le=qS;break;case Np:le=ry;break;case"scroll":case"scrollend":le=$S;break;case"wheel":le=ay;break;case"copy":case"cut":case"paste":le=GS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":le=fp;break;case"toggle":case"beforetoggle":le=ly}var ze=(t&4)!==0,vt=!ze&&(e==="scroll"||e==="scrollend"),ie=ze?se!==null?se+"Capture":null:se;ze=[];for(var J=re,ne;J!==null;){var de=J;if(ne=de.stateNode,de=de.tag,de!==5&&de!==26&&de!==27||ne===null||ie===null||(de=Ga(J,ie),de!=null&&ze.push(To(J,de,ne))),vt)break;J=J.return}0<ze.length&&(se=new le(se,xe,null,r,ue),fe.push({event:se,listeners:ze}))}}if((t&7)===0){e:{if(se=e==="mouseover"||e==="pointerover",le=e==="mouseout"||e==="pointerout",se&&r!==Ae&&(xe=r.relatedTarget||r.fromElement)&&(q(xe)||xe[kn]))break e;if((le||se)&&(se=ue.window===ue?ue:(se=ue.ownerDocument)?se.defaultView||se.parentWindow:window,le?(xe=r.relatedTarget||r.toElement,le=re,xe=xe?q(xe):null,xe!==null&&(vt=y(xe),ze=xe.tag,xe!==vt||ze!==5&&ze!==27&&ze!==6)&&(xe=null)):(le=null,xe=re),le!==xe)){if(ze=hp,de="onMouseLeave",ie="onMouseEnter",J="mouse",(e==="pointerout"||e==="pointerover")&&(ze=fp,de="onPointerLeave",ie="onPointerEnter",J="pointer"),vt=le==null?se:we(le),ne=xe==null?se:we(xe),se=new ze(de,J+"leave",le,r,ue),se.target=vt,se.relatedTarget=ne,de=null,q(ue)===re&&(ze=new ze(ie,J+"enter",xe,r,ue),ze.target=ne,ze.relatedTarget=vt,de=ze),vt=de,le&&xe)t:{for(ze=o1,ie=le,J=xe,ne=0,de=ie;de;de=ze(de))ne++;de=0;for(var Ne=J;Ne;Ne=ze(Ne))de++;for(;0<ne-de;)ie=ze(ie),ne--;for(;0<de-ne;)J=ze(J),de--;for(;ne--;){if(ie===J||J!==null&&ie===J.alternate){ze=ie;break t}ie=ze(ie),J=ze(J)}ze=null}else ze=null;le!==null&&rm(fe,se,le,ze,!1),xe!==null&&vt!==null&&rm(fe,vt,xe,ze,!0)}}e:{if(se=re?we(re):window,le=se.nodeName&&se.nodeName.toLowerCase(),le==="select"||le==="input"&&se.type==="file")var st=yp;else if(bp(se))if(Cp)st=vy;else{st=gy;var Re=_y}else le=se.nodeName,!le||le.toLowerCase()!=="input"||se.type!=="checkbox"&&se.type!=="radio"?re&&Dr(re.elementType)&&(st=yp):st=my;if(st&&(st=st(e,re))){Sp(fe,st,r,ue);break e}Re&&Re(e,se,re),e==="focusout"&&re&&se.type==="number"&&re.memoizedProps.value!=null&&Ws(se,"number",se.value)}switch(Re=re?we(re):window,e){case"focusin":(bp(Re)||Re.contentEditable==="true")&&(Ys=Re,wu=re,eo=null);break;case"focusout":eo=wu=Ys=null;break;case"mousedown":Eu=!0;break;case"contextmenu":case"mouseup":case"dragend":Eu=!1,kp(fe,r,ue);break;case"selectionchange":if(Sy)break;case"keydown":case"keyup":kp(fe,r,ue)}var We;if(bu)e:{switch(e){case"compositionstart":var tt="onCompositionStart";break e;case"compositionend":tt="onCompositionEnd";break e;case"compositionupdate":tt="onCompositionUpdate";break e}tt=void 0}else Ks?mp(e,r)&&(tt="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(tt="onCompositionStart");tt&&(pp&&r.locale!=="ko"&&(Ks||tt!=="onCompositionStart"?tt==="onCompositionEnd"&&Ks&&(We=cp()):(Br=ue,pu="value"in Br?Br.value:Br.textContent,Ks=!0)),Re=oc(re,tt),0<Re.length&&(tt=new dp(tt,e,null,r,ue),fe.push({event:tt,listeners:Re}),We?tt.data=We:(We=vp(r),We!==null&&(tt.data=We)))),(We=uy?hy(e,r):dy(e,r))&&(tt=oc(re,"onBeforeInput"),0<tt.length&&(Re=new dp("onBeforeInput","beforeinput",null,r,ue),fe.push({event:Re,listeners:tt}),Re.data=We)),n1(fe,e,re,r,ue)}im(fe,t)})}function To(e,t,r){return{instance:e,listener:t,currentTarget:r}}function oc(e,t){for(var r=t+"Capture",a=[];e!==null;){var d=e,m=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||m===null||(d=Ga(e,r),d!=null&&a.unshift(To(e,d,m)),d=Ga(e,t),d!=null&&a.push(To(e,d,m))),e.tag===3)return a;e=e.return}return[]}function o1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function rm(e,t,r,a,d){for(var m=t._reactName,k=[];r!==null&&r!==a;){var N=r,G=N.alternate,re=N.stateNode;if(N=N.tag,G!==null&&G===a)break;N!==5&&N!==26&&N!==27||re===null||(G=re,d?(re=Ga(r,m),re!=null&&k.unshift(To(r,re,G))):d||(re=Ga(r,m),re!=null&&k.push(To(r,re,G)))),r=r.return}k.length!==0&&e.push({event:t,listeners:k})}var l1=/\r\n?/g,c1=/\u0000|\uFFFD/g;function sm(e){return(typeof e=="string"?e:""+e).replace(l1,`
|
|
9
|
-
`).replace(c1,"")}function am(e,t){return t=sm(t),sm(e)===t}function mt(e,t,r,a,d,m){switch(r){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Ue(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Ue(e,""+a);break;case"className":Zi(e,"class",a);break;case"tabIndex":Zi(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Zi(e,r,a);break;case"style":ft(e,a,m);break;case"data":if(t!=="object"){Zi(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||r!=="href")){e.removeAttribute(r);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(r);break}a=Or(""+a),e.setAttribute(r,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(r,"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 m=="function"&&(r==="formAction"?(t!=="input"&&mt(e,t,"name",d.name,d,null),mt(e,t,"formEncType",d.formEncType,d,null),mt(e,t,"formMethod",d.formMethod,d,null),mt(e,t,"formTarget",d.formTarget,d,null)):(mt(e,t,"encType",d.encType,d,null),mt(e,t,"method",d.method,d,null),mt(e,t,"target",d.target,d,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(r);break}a=Or(""+a),e.setAttribute(r,a);break;case"onClick":a!=null&&(e.onclick=ye);break;case"onScroll":a!=null&&Xe("scroll",e);break;case"onScrollEnd":a!=null&&Xe("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(r=a.__html,r!=null){if(d.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}r=Or(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(r,""+a):e.removeAttribute(r);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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":a===!0?e.setAttribute(r,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(r,a):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(r,a):e.removeAttribute(r);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(r):e.setAttribute(r,a);break;case"popover":Xe("beforetoggle",e),Xe("toggle",e),Ai(e,"popover",a);break;case"xlinkActuate":zi(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":zi(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":zi(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":zi(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":zi(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":zi(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":zi(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":zi(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":zi(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Ai(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=sr.get(r)||r,Ai(e,r,a))}}function Vh(e,t,r,a,d,m){switch(r){case"style":ft(e,a,m);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(r=a.__html,r!=null){if(d.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"children":typeof a=="string"?Ue(e,a):(typeof a=="number"||typeof a=="bigint")&&Ue(e,""+a);break;case"onScroll":a!=null&&Xe("scroll",e);break;case"onScrollEnd":a!=null&&Xe("scrollend",e);break;case"onClick":a!=null&&(e.onclick=ye);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!$t.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(d=r.endsWith("Capture"),t=r.slice(2,d?r.length-7:void 0),m=e[wt]||null,m=m!=null?m[r]:null,typeof m=="function"&&e.removeEventListener(t,m,d),typeof a=="function")){typeof m!="function"&&m!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(t,a,d);break e}r in e?e[r]=a:a===!0?e.setAttribute(r,""):Ai(e,r,a)}}}function wi(e,t,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Xe("error",e),Xe("load",e);var a=!1,d=!1,m;for(m in r)if(r.hasOwnProperty(m)){var k=r[m];if(k!=null)switch(m){case"src":a=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:mt(e,t,m,k,r,null)}}d&&mt(e,t,"srcSet",r.srcSet,r,null),a&&mt(e,t,"src",r.src,r,null);return;case"input":Xe("invalid",e);var N=m=k=d=null,G=null,re=null;for(a in r)if(r.hasOwnProperty(a)){var ue=r[a];if(ue!=null)switch(a){case"name":d=ue;break;case"type":k=ue;break;case"checked":G=ue;break;case"defaultChecked":re=ue;break;case"value":m=ue;break;case"defaultValue":N=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(o(137,t));break;default:mt(e,t,a,ue,r,null)}}ds(e,m,N,G,re,k,d,!1);return;case"select":Xe("invalid",e),a=k=m=null;for(d in r)if(r.hasOwnProperty(d)&&(N=r[d],N!=null))switch(d){case"value":m=N;break;case"defaultValue":k=N;break;case"multiple":a=N;default:mt(e,t,d,N,r,null)}t=m,r=k,e.multiple=!!a,t!=null?bi(e,!!a,t,!1):r!=null&&bi(e,!!a,r,!0);return;case"textarea":Xe("invalid",e),m=d=a=null;for(k in r)if(r.hasOwnProperty(k)&&(N=r[k],N!=null))switch(k){case"value":a=N;break;case"defaultValue":d=N;break;case"children":m=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(o(91));break;default:mt(e,t,k,N,r,null)}Gs(e,a,d,m);return;case"option":for(G in r)r.hasOwnProperty(G)&&(a=r[G],a!=null)&&(G==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":mt(e,t,G,a,r,null));return;case"dialog":Xe("beforetoggle",e),Xe("toggle",e),Xe("cancel",e),Xe("close",e);break;case"iframe":case"object":Xe("load",e);break;case"video":case"audio":for(a=0;a<xo.length;a++)Xe(xo[a],e);break;case"image":Xe("error",e),Xe("load",e);break;case"details":Xe("toggle",e);break;case"embed":case"source":case"link":Xe("error",e),Xe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(re in r)if(r.hasOwnProperty(re)&&(a=r[re],a!=null))switch(re){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:mt(e,t,re,a,r,null)}return;default:if(Dr(t)){for(ue in r)r.hasOwnProperty(ue)&&(a=r[ue],a!==void 0&&Vh(e,t,ue,a,r,void 0));return}}for(N in r)r.hasOwnProperty(N)&&(a=r[N],a!=null&&mt(e,t,N,a,r,null))}function u1(e,t,r,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,m=null,k=null,N=null,G=null,re=null,ue=null;for(le in r){var fe=r[le];if(r.hasOwnProperty(le)&&fe!=null)switch(le){case"checked":break;case"value":break;case"defaultValue":G=fe;default:a.hasOwnProperty(le)||mt(e,t,le,null,a,fe)}}for(var se in a){var le=a[se];if(fe=r[se],a.hasOwnProperty(se)&&(le!=null||fe!=null))switch(se){case"type":m=le;break;case"name":d=le;break;case"checked":re=le;break;case"defaultChecked":ue=le;break;case"value":k=le;break;case"defaultValue":N=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(o(137,t));break;default:le!==fe&&mt(e,t,se,le,a,fe)}}Fa(e,k,N,G,re,ue,m,d);return;case"select":le=k=N=se=null;for(m in r)if(G=r[m],r.hasOwnProperty(m)&&G!=null)switch(m){case"value":break;case"multiple":le=G;default:a.hasOwnProperty(m)||mt(e,t,m,null,a,G)}for(d in a)if(m=a[d],G=r[d],a.hasOwnProperty(d)&&(m!=null||G!=null))switch(d){case"value":se=m;break;case"defaultValue":N=m;break;case"multiple":k=m;default:m!==G&&mt(e,t,d,m,a,G)}t=N,r=k,a=le,se!=null?bi(e,!!r,se,!1):!!a!=!!r&&(t!=null?bi(e,!!r,t,!0):bi(e,!!r,r?[]:"",!1));return;case"textarea":le=se=null;for(N in r)if(d=r[N],r.hasOwnProperty(N)&&d!=null&&!a.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:mt(e,t,N,null,a,d)}for(k in a)if(d=a[k],m=r[k],a.hasOwnProperty(k)&&(d!=null||m!=null))switch(k){case"value":se=d;break;case"defaultValue":le=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(o(91));break;default:d!==m&&mt(e,t,k,d,a,m)}hl(e,se,le);return;case"option":for(var xe in r)se=r[xe],r.hasOwnProperty(xe)&&se!=null&&!a.hasOwnProperty(xe)&&(xe==="selected"?e.selected=!1:mt(e,t,xe,null,a,se));for(G in a)se=a[G],le=r[G],a.hasOwnProperty(G)&&se!==le&&(se!=null||le!=null)&&(G==="selected"?e.selected=se&&typeof se!="function"&&typeof se!="symbol":mt(e,t,G,se,a,le));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 ze in r)se=r[ze],r.hasOwnProperty(ze)&&se!=null&&!a.hasOwnProperty(ze)&&mt(e,t,ze,null,a,se);for(re in a)if(se=a[re],le=r[re],a.hasOwnProperty(re)&&se!==le&&(se!=null||le!=null))switch(re){case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(o(137,t));break;default:mt(e,t,re,se,a,le)}return;default:if(Dr(t)){for(var vt in r)se=r[vt],r.hasOwnProperty(vt)&&se!==void 0&&!a.hasOwnProperty(vt)&&Vh(e,t,vt,void 0,a,se);for(ue in a)se=a[ue],le=r[ue],!a.hasOwnProperty(ue)||se===le||se===void 0&&le===void 0||Vh(e,t,ue,se,a,le);return}}for(var ie in r)se=r[ie],r.hasOwnProperty(ie)&&se!=null&&!a.hasOwnProperty(ie)&&mt(e,t,ie,null,a,se);for(fe in a)se=a[fe],le=r[fe],!a.hasOwnProperty(fe)||se===le||se==null&&le==null||mt(e,t,fe,se,a,le)}function om(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function h1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,r=performance.getEntriesByType("resource"),a=0;a<r.length;a++){var d=r[a],m=d.transferSize,k=d.initiatorType,N=d.duration;if(m&&N&&om(k)){for(k=0,N=d.responseEnd,a+=1;a<r.length;a++){var G=r[a],re=G.startTime;if(re>N)break;var ue=G.transferSize,fe=G.initiatorType;ue&&om(fe)&&(G=G.responseEnd,k+=ue*(G<N?1:(N-re)/(G-re)))}if(--a,t+=8*(m+k)/(d.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Xh=null,Zh=null;function lc(e){return e.nodeType===9?e:e.ownerDocument}function lm(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function cm(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Qh(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Jh=null;function d1(){var e=window.event;return e&&e.type==="popstate"?e===Jh?!1:(Jh=e,!0):(Jh=null,!1)}var um=typeof setTimeout=="function"?setTimeout:void 0,f1=typeof clearTimeout=="function"?clearTimeout:void 0,hm=typeof Promise=="function"?Promise:void 0,p1=typeof queueMicrotask=="function"?queueMicrotask:typeof hm<"u"?function(e){return hm.resolve(null).then(e).catch(_1)}:um;function _1(e){setTimeout(function(){throw e})}function Zr(e){return e==="head"}function dm(e,t){var r=t,a=0;do{var d=r.nextSibling;if(e.removeChild(r),d&&d.nodeType===8)if(r=d.data,r==="/$"||r==="/&"){if(a===0){e.removeChild(d),ya(t);return}a--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")a++;else if(r==="html")Ao(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,Ao(r);for(var m=r.firstChild;m;){var k=m.nextSibling,N=m.nodeName;m[jn]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&m.rel.toLowerCase()==="stylesheet"||r.removeChild(m),m=k}}else r==="body"&&Ao(e.ownerDocument.body);r=d}while(r);ya(t)}function fm(e,t){var r=e;e=0;do{var a=r.nextSibling;if(r.nodeType===1?t?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(t?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),a&&a.nodeType===8)if(r=a.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=a}while(r)}function ed(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var r=t;switch(t=t.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":ed(r),Me(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function g1(e,t,r,a){for(;e.nodeType===1;){var d=r;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[jn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(m=e.getAttribute("rel"),m==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(m!==d.rel||e.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||e.getAttribute("title")!==(d.title==null?null:d.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(m=e.getAttribute("src"),(m!==(d.src==null?null:d.src)||e.getAttribute("type")!==(d.type==null?null:d.type)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&m&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var m=d.name==null?null:""+d.name;if(d.type==="hidden"&&e.getAttribute("name")===m)return e}else return e;if(e=vn(e.nextSibling),e===null)break}return null}function m1(e,t,r){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=vn(e.nextSibling),e===null))return null;return e}function pm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=vn(e.nextSibling),e===null))return null;return e}function td(e){return e.data==="$?"||e.data==="$~"}function id(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function v1(e,t){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||r.readyState!=="loading")t();else{var a=function(){t(),r.removeEventListener("DOMContentLoaded",a)};r.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function vn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var nd=null;function _m(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(t===0)return vn(e.nextSibling);t--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||t++}e=e.nextSibling}return null}function gm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(t===0)return e;t--}else r!=="/$"&&r!=="/&"||t++}e=e.previousSibling}return null}function mm(e,t,r){switch(t=lc(r),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Ao(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Me(e)}var bn=new Map,vm=new Set;function cc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var yr=Y.d;Y.d={f:b1,r:S1,D:y1,C:C1,L:w1,m:E1,X:T1,S:x1,M:A1};function b1(){var e=yr.f(),t=ec();return e||t}function S1(e){var t=pe(e);t!==null&&t.tag===5&&t.type==="form"?N_(t):yr.r(e)}var va=typeof document>"u"?null:document;function bm(e,t,r){var a=va;if(a&&typeof t=="string"&&t){var d=$i(t);d='link[rel="'+e+'"][href="'+d+'"]',typeof r=="string"&&(d+='[crossorigin="'+r+'"]'),vm.has(d)||(vm.add(d),e={rel:e,crossOrigin:r,href:t},a.querySelector(d)===null&&(t=a.createElement("link"),wi(t,"link",e),Ye(t),a.head.appendChild(t)))}}function y1(e){yr.D(e),bm("dns-prefetch",e,null)}function C1(e,t){yr.C(e,t),bm("preconnect",e,t)}function w1(e,t,r){yr.L(e,t,r);var a=va;if(a&&e&&t){var d='link[rel="preload"][as="'+$i(t)+'"]';t==="image"&&r&&r.imageSrcSet?(d+='[imagesrcset="'+$i(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(d+='[imagesizes="'+$i(r.imageSizes)+'"]')):d+='[href="'+$i(e)+'"]';var m=d;switch(t){case"style":m=ba(e);break;case"script":m=Sa(e)}bn.has(m)||(e=f({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),bn.set(m,e),a.querySelector(d)!==null||t==="style"&&a.querySelector(Ro(m))||t==="script"&&a.querySelector(Lo(m))||(t=a.createElement("link"),wi(t,"link",e),Ye(t),a.head.appendChild(t)))}}function E1(e,t){yr.m(e,t);var r=va;if(r&&e){var a=t&&typeof t.as=="string"?t.as:"script",d='link[rel="modulepreload"][as="'+$i(a)+'"][href="'+$i(e)+'"]',m=d;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Sa(e)}if(!bn.has(m)&&(e=f({rel:"modulepreload",href:e},t),bn.set(m,e),r.querySelector(d)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Lo(m)))return}a=r.createElement("link"),wi(a,"link",e),Ye(a),r.head.appendChild(a)}}}function x1(e,t,r){yr.S(e,t,r);var a=va;if(a&&e){var d=it(a).hoistableStyles,m=ba(e);t=t||"default";var k=d.get(m);if(!k){var N={loading:0,preload:null};if(k=a.querySelector(Ro(m)))N.loading=5;else{e=f({rel:"stylesheet",href:e,"data-precedence":t},r),(r=bn.get(m))&&rd(e,r);var G=k=a.createElement("link");Ye(G),wi(G,"link",e),G._p=new Promise(function(re,ue){G.onload=re,G.onerror=ue}),G.addEventListener("load",function(){N.loading|=1}),G.addEventListener("error",function(){N.loading|=2}),N.loading|=4,uc(k,t,a)}k={type:"stylesheet",instance:k,count:1,state:N},d.set(m,k)}}}function T1(e,t){yr.X(e,t);var r=va;if(r&&e){var a=it(r).hoistableScripts,d=Sa(e),m=a.get(d);m||(m=r.querySelector(Lo(d)),m||(e=f({src:e,async:!0},t),(t=bn.get(d))&&sd(e,t),m=r.createElement("script"),Ye(m),wi(m,"link",e),r.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},a.set(d,m))}}function A1(e,t){yr.M(e,t);var r=va;if(r&&e){var a=it(r).hoistableScripts,d=Sa(e),m=a.get(d);m||(m=r.querySelector(Lo(d)),m||(e=f({src:e,async:!0,type:"module"},t),(t=bn.get(d))&&sd(e,t),m=r.createElement("script"),Ye(m),wi(m,"link",e),r.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},a.set(d,m))}}function Sm(e,t,r,a){var d=(d=me.current)?cc(d):null;if(!d)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(t=ba(r.href),r=it(d).hoistableStyles,a=r.get(t),a||(a={type:"style",instance:null,count:0,state:null},r.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=ba(r.href);var m=it(d).hoistableStyles,k=m.get(e);if(k||(d=d.ownerDocument||d,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(e,k),(m=d.querySelector(Ro(e)))&&!m._p&&(k.instance=m,k.state.loading=5),bn.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},bn.set(e,r),m||R1(d,e,r,k.state))),t&&a===null)throw Error(o(528,""));return k}if(t&&a!==null)throw Error(o(529,""));return null;case"script":return t=r.async,r=r.src,typeof r=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Sa(r),r=it(d).hoistableScripts,a=r.get(t),a||(a={type:"script",instance:null,count:0,state:null},r.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function ba(e){return'href="'+$i(e)+'"'}function Ro(e){return'link[rel="stylesheet"]['+e+"]"}function ym(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function R1(e,t,r,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),wi(t,"link",r),Ye(t),e.head.appendChild(t))}function Sa(e){return'[src="'+$i(e)+'"]'}function Lo(e){return"script[async]"+e}function Cm(e,t,r){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+$i(r.href)+'"]');if(a)return t.instance=a,Ye(a),a;var d=f({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Ye(a),wi(a,"style",d),uc(a,r.precedence,e),t.instance=a;case"stylesheet":d=ba(r.href);var m=e.querySelector(Ro(d));if(m)return t.state.loading|=4,t.instance=m,Ye(m),m;a=ym(r),(d=bn.get(d))&&rd(a,d),m=(e.ownerDocument||e).createElement("link"),Ye(m);var k=m;return k._p=new Promise(function(N,G){k.onload=N,k.onerror=G}),wi(m,"link",a),t.state.loading|=4,uc(m,r.precedence,e),t.instance=m;case"script":return m=Sa(r.src),(d=e.querySelector(Lo(m)))?(t.instance=d,Ye(d),d):(a=r,(d=bn.get(m))&&(a=f({},r),sd(a,d)),e=e.ownerDocument||e,d=e.createElement("script"),Ye(d),wi(d,"link",a),e.head.appendChild(d),t.instance=d);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,uc(a,r.precedence,e));return t.instance}function uc(e,t,r){for(var a=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=a.length?a[a.length-1]:null,m=d,k=0;k<a.length;k++){var N=a[k];if(N.dataset.precedence===t)m=N;else if(m!==d)break}m?m.parentNode.insertBefore(e,m.nextSibling):(t=r.nodeType===9?r.head:r,t.insertBefore(e,t.firstChild))}function rd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function sd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var hc=null;function wm(e,t,r){if(hc===null){var a=new Map,d=hc=new Map;d.set(r,a)}else d=hc,a=d.get(r),a||(a=new Map,d.set(r,a));if(a.has(e))return a;for(a.set(e,null),r=r.getElementsByTagName(e),d=0;d<r.length;d++){var m=r[d];if(!(m[jn]||m[xt]||e==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var k=m.getAttribute(t)||"";k=e+k;var N=a.get(k);N?N.push(m):a.set(k,[m])}}return a}function Em(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null)}function L1(e,t,r){if(r===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function xm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function k1(e,t,r,a){if(r.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var d=ba(a.href),m=t.querySelector(Ro(d));if(m){t=m._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=dc.bind(e),t.then(e,e)),r.state.loading|=4,r.instance=m,Ye(m);return}m=t.ownerDocument||t,a=ym(a),(d=bn.get(d))&&rd(a,d),m=m.createElement("link"),Ye(m);var k=m;k._p=new Promise(function(N,G){k.onload=N,k.onerror=G}),wi(m,"link",a),r.instance=m}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,t),(t=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=dc.bind(e),t.addEventListener("load",r),t.addEventListener("error",r))}}var ad=0;function M1(e,t){return e.stylesheets&&e.count===0&&pc(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var a=setTimeout(function(){if(e.stylesheets&&pc(e,e.stylesheets),e.unsuspend){var m=e.unsuspend;e.unsuspend=null,m()}},6e4+t);0<e.imgBytes&&ad===0&&(ad=62500*h1());var d=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&pc(e,e.stylesheets),e.unsuspend)){var m=e.unsuspend;e.unsuspend=null,m()}},(e.imgBytes>ad?50:800)+t);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(d)}}:null}function dc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)pc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var fc=null;function pc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,fc=new Map,t.forEach(D1,e),fc=null,dc.call(e))}function D1(e,t){if(!(t.state.loading&4)){var r=fc.get(e);if(r)var a=r.get(null);else{r=new Map,fc.set(e,r);for(var d=e.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<d.length;m++){var k=d[m];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(r.set(k.dataset.precedence,k),a=k)}a&&r.set(null,a)}d=t.instance,k=d.getAttribute("data-precedence"),m=r.get(k)||a,m===a&&r.set(null,d),r.set(k,d),this.count++,a=dc.bind(this),d.addEventListener("load",a),d.addEventListener("error",a),m?m.parentNode.insertBefore(d,m.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(d,e.firstChild)),t.state.loading|=4}}var ko={$$typeof:g,Provider:null,Consumer:null,_currentValue:K,_currentValue2:K,_threadCount:0};function O1(e,t,r,a,d,m,k,N,G){this.tag=1,this.containerInfo=e,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=St(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=St(0),this.hiddenUpdates=St(null),this.identifierPrefix=a,this.onUncaughtError=d,this.onCaughtError=m,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=G,this.incompleteTransitions=new Map}function Tm(e,t,r,a,d,m,k,N,G,re,ue,fe){return e=new O1(e,t,r,k,G,re,ue,fe,N),t=1,m===!0&&(t|=24),m=en(3,null,null,t),e.current=m,m.stateNode=e,t=$u(),t.refCount++,e.pooledCache=t,t.refCount++,m.memoizedState={element:a,isDehydrated:r,cache:t},Fu(m),e}function Am(e){return e?(e=Zs,e):Zs}function Rm(e,t,r,a,d,m){d=Am(d),a.context===null?a.context=d:a.pendingContext=d,a=Ur(t),a.payload={element:r},m=m===void 0?null:m,m!==null&&(a.callback=m),r=Pr(e,a,t),r!==null&&(Wi(r,e,t),oo(r,e,t))}function Lm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function od(e,t){Lm(e,t),(e=e.alternate)&&Lm(e,t)}function km(e){if(e.tag===13||e.tag===31){var t=gs(e,67108864);t!==null&&Wi(t,e,67108864),od(e,67108864)}}function Mm(e){if(e.tag===13||e.tag===31){var t=an();t=Qe(t);var r=gs(e,t);r!==null&&Wi(r,e,t),od(e,t)}}var _c=!0;function B1(e,t,r,a){var d=j.T;j.T=null;var m=Y.p;try{Y.p=2,ld(e,t,r,a)}finally{Y.p=m,j.T=d}}function N1(e,t,r,a){var d=j.T;j.T=null;var m=Y.p;try{Y.p=8,ld(e,t,r,a)}finally{Y.p=m,j.T=d}}function ld(e,t,r,a){if(_c){var d=cd(a);if(d===null)Yh(e,t,a,gc,r),Om(e,a);else if(H1(d,e,t,r,a))a.stopPropagation();else if(Om(e,a),t&4&&-1<I1.indexOf(e)){for(;d!==null;){var m=pe(d);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var k=ti(m.pendingLanes);if(k!==0){var N=m;for(N.pendingLanes|=2,N.entangledLanes|=2;k;){var G=1<<31-zt(k);N.entanglements[1]|=G,k&=~G}Gn(m),(ct&6)===0&&(Ql=lt()+500,Eo(0))}}break;case 31:case 13:N=gs(m,2),N!==null&&Wi(N,m,2),ec(),od(m,2)}if(m=cd(a),m===null&&Yh(e,t,a,gc,r),m===d)break;d=m}d!==null&&a.stopPropagation()}else Yh(e,t,a,null,r)}}function cd(e){return e=Fe(e),ud(e)}var gc=null;function ud(e){if(gc=null,e=q(e),e!==null){var t=y(e);if(t===null)e=null;else{var r=t.tag;if(r===13){if(e=b(t),e!==null)return e;e=null}else if(r===31){if(e=c(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return gc=e,null}function Dm(e){switch(e){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(Gt()){case It:return 2;case Ht:return 8;case ei:case Rn:return 32;case Ti:return 268435456;default:return 32}default:return 32}}var hd=!1,Qr=null,Jr=null,es=null,Mo=new Map,Do=new Map,ts=[],I1="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 Om(e,t){switch(e){case"focusin":case"focusout":Qr=null;break;case"dragenter":case"dragleave":Jr=null;break;case"mouseover":case"mouseout":es=null;break;case"pointerover":case"pointerout":Mo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Do.delete(t.pointerId)}}function Oo(e,t,r,a,d,m){return e===null||e.nativeEvent!==m?(e={blockedOn:t,domEventName:r,eventSystemFlags:a,nativeEvent:m,targetContainers:[d]},t!==null&&(t=pe(t),t!==null&&km(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,d!==null&&t.indexOf(d)===-1&&t.push(d),e)}function H1(e,t,r,a,d){switch(t){case"focusin":return Qr=Oo(Qr,e,t,r,a,d),!0;case"dragenter":return Jr=Oo(Jr,e,t,r,a,d),!0;case"mouseover":return es=Oo(es,e,t,r,a,d),!0;case"pointerover":var m=d.pointerId;return Mo.set(m,Oo(Mo.get(m)||null,e,t,r,a,d)),!0;case"gotpointercapture":return m=d.pointerId,Do.set(m,Oo(Do.get(m)||null,e,t,r,a,d)),!0}return!1}function Bm(e){var t=q(e.target);if(t!==null){var r=y(t);if(r!==null){if(t=r.tag,t===13){if(t=b(r),t!==null){e.blockedOn=t,nr(e.priority,function(){Mm(r)});return}}else if(t===31){if(t=c(r),t!==null){e.blockedOn=t,nr(e.priority,function(){Mm(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function mc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=cd(e.nativeEvent);if(r===null){r=e.nativeEvent;var a=new r.constructor(r.type,r);Ae=a,r.target.dispatchEvent(a),Ae=null}else return t=pe(r),t!==null&&km(t),e.blockedOn=r,!1;t.shift()}return!0}function Nm(e,t,r){mc(e)&&r.delete(t)}function z1(){hd=!1,Qr!==null&&mc(Qr)&&(Qr=null),Jr!==null&&mc(Jr)&&(Jr=null),es!==null&&mc(es)&&(es=null),Mo.forEach(Nm),Do.forEach(Nm)}function vc(e,t){e.blockedOn===t&&(e.blockedOn=null,hd||(hd=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,z1)))}var bc=null;function Im(e){bc!==e&&(bc=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){bc===e&&(bc=null);for(var t=0;t<e.length;t+=3){var r=e[t],a=e[t+1],d=e[t+2];if(typeof a!="function"){if(ud(a||r)===null)continue;break}var m=pe(r);m!==null&&(e.splice(t,3),t-=3,ch(m,{pending:!0,data:d,method:r.method,action:a},a,d))}}))}function ya(e){function t(G){return vc(G,e)}Qr!==null&&vc(Qr,e),Jr!==null&&vc(Jr,e),es!==null&&vc(es,e),Mo.forEach(t),Do.forEach(t);for(var r=0;r<ts.length;r++){var a=ts[r];a.blockedOn===e&&(a.blockedOn=null)}for(;0<ts.length&&(r=ts[0],r.blockedOn===null);)Bm(r),r.blockedOn===null&&ts.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(a=0;a<r.length;a+=3){var d=r[a],m=r[a+1],k=d[wt]||null;if(typeof m=="function")k||Im(r);else if(k){var N=null;if(m&&m.hasAttribute("formAction")){if(d=m,k=m[wt]||null)N=k.formAction;else if(ud(d)!==null)continue}else N=k.action;typeof N=="function"?r[a+1]=N:(r.splice(a,3),a-=3),Im(r)}}}function Hm(){function e(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(k){return d=k})},focusReset:"manual",scroll:"manual"})}function t(){d!==null&&(d(),d=null),a||setTimeout(r,20)}function r(){if(!a&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,d=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(r,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),d!==null&&(d(),d=null)}}}function dd(e){this._internalRoot=e}Sc.prototype.render=dd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var r=t.current,a=an();Rm(r,a,e,t,null,null)},Sc.prototype.unmount=dd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Rm(e.current,2,null,e,null,null),ec(),t[kn]=null}};function Sc(e){this._internalRoot=e}Sc.prototype.unstable_scheduleHydration=function(e){if(e){var t=ir();e={blockedOn:null,target:e,priority:t};for(var r=0;r<ts.length&&t!==0&&t<ts[r].priority;r++);ts.splice(r,0,e),r===0&&Bm(e)}};var zm=n.version;if(zm!=="19.2.7")throw Error(o(527,zm,"19.2.7"));Y.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=h(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var $1={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var yc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yc.isDisabled&&yc.supportsFiber)try{Ii=yc.inject($1),Kt=yc}catch{}}return No.createRoot=function(e,t){if(!l(e))throw Error(o(299));var r=!1,a="",d=W_,m=G_,k=K_;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(d=t.onUncaughtError),t.onCaughtError!==void 0&&(m=t.onCaughtError),t.onRecoverableError!==void 0&&(k=t.onRecoverableError)),t=Tm(e,1,!1,null,null,r,a,null,d,m,k,Hm),e[kn]=t.current,Kh(e),new dd(t)},No.hydrateRoot=function(e,t,r){if(!l(e))throw Error(o(299));var a=!1,d="",m=W_,k=G_,N=K_,G=null;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(d=r.identifierPrefix),r.onUncaughtError!==void 0&&(m=r.onUncaughtError),r.onCaughtError!==void 0&&(k=r.onCaughtError),r.onRecoverableError!==void 0&&(N=r.onRecoverableError),r.formState!==void 0&&(G=r.formState)),t=Tm(e,1,!0,t,r??null,a,d,G,m,k,N,Hm),t.context=Am(null),r=t.current,a=an(),a=Qe(a),d=Ur(a),d.callback=null,Pr(r,d,a),r=a,t.current.lanes=r,ht(t,r),Gn(t),e[kn]=t.current,Kh(e),new Sc(t)},No.version="19.2.7",No}var Ym;function X1(){if(Ym)return _d.exports;Ym=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(n){console.error(n)}}return i(),_d.exports=V1(),_d.exports}var Z1=X1();var Vm="popstate";function Xm(i){return typeof i=="object"&&i!=null&&"pathname"in i&&"search"in i&&"hash"in i&&"state"in i&&"key"in i}function Q1(i={}){function n(o,l){let y=l.state?.masked,{pathname:b,search:c,hash:u}=y||o.location;return Qd("",{pathname:b,search:c,hash:u},l.state&&l.state.usr||null,l.state&&l.state.key||"default",y?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function s(o,l){return typeof l=="string"?l:nl(l)}return eC(n,s,null,i)}function Ot(i,n){if(i===!1||i===null||typeof i>"u")throw new Error(n)}function zn(i,n){if(!i){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function J1(){return Math.random().toString(36).substring(2,10)}function Zm(i,n){return{usr:i.state,key:i.key,idx:n,masked:i.mask?{pathname:i.pathname,search:i.search,hash:i.hash}:void 0}}function Qd(i,n,s=null,o,l){return{pathname:typeof i=="string"?i:i.pathname,search:"",hash:"",...typeof n=="string"?Ba(n):n,state:s,key:n&&n.key||o||J1(),mask:l}}function nl({pathname:i="/",search:n="",hash:s=""}){return n&&n!=="?"&&(i+=n.charAt(0)==="?"?n:"?"+n),s&&s!=="#"&&(i+=s.charAt(0)==="#"?s:"#"+s),i}function Ba(i){let n={};if(i){let s=i.indexOf("#");s>=0&&(n.hash=i.substring(s),i=i.substring(0,s));let o=i.indexOf("?");o>=0&&(n.search=i.substring(o),i=i.substring(0,o)),i&&(n.pathname=i)}return n}function eC(i,n,s,o={}){let{window:l=document.defaultView,v5Compat:y=!1}=o,b=l.history,c="POP",u=null,h=v();h==null&&(h=0,b.replaceState({...b.state,idx:h},""));function v(){return(b.state||{idx:null}).idx}function f(){c="POP";let p=v(),S=p==null?null:p-h;h=p,u&&u({action:c,location:E.location,delta:S})}function C(p,S){c="PUSH";let _=Xm(p)?p:Qd(E.location,p,S);h=v()+1;let g=Zm(_,h),w=E.createHref(_.mask||_);try{b.pushState(g,"",w)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;l.location.assign(w)}y&&u&&u({action:c,location:E.location,delta:1})}function x(p,S){c="REPLACE";let _=Xm(p)?p:Qd(E.location,p,S);h=v();let g=Zm(_,h),w=E.createHref(_.mask||_);b.replaceState(g,"",w),y&&u&&u({action:c,location:E.location,delta:0})}function A(p){return tC(l,p)}let E={get action(){return c},get location(){return i(l,b)},listen(p){if(u)throw new Error("A history only accepts one active listener");return l.addEventListener(Vm,f),u=p,()=>{l.removeEventListener(Vm,f),u=null}},createHref(p){return n(l,p)},createURL:A,encodeLocation(p){let S=A(p);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:C,replace:x,go(p){return b.go(p)}};return E}function tC(i,n,s=!1){let o="http://localhost";i&&(o=i.location.origin!=="null"?i.location.origin:i.location.href),Ot(o,"No window.location.(origin|href) available to create URL");let l=typeof n=="string"?n:nl(n);return l=l.replace(/ $/,"%20"),!s&&l.startsWith("//")&&(l=o+l),new URL(l,o)}function R0(i,n,s="/"){return iC(i,n,s,!1)}function iC(i,n,s,o,l){let y=typeof n=="string"?Ba(n):n,b=Lr(y.pathname||"/",s);if(b==null)return null;let c=nC(i),u=null,h=_C(b);for(let v=0;u==null&&v<c.length;++v)u=fC(c[v],h,o);return u}function nC(i){let n=L0(i);return rC(n),n}function L0(i,n=[],s=[],o="",l=!1){let y=(b,c,u=l,h)=>{let v={relativePath:h===void 0?b.path||"":h,caseSensitive:b.caseSensitive===!0,childrenIndex:c,route:b};if(v.relativePath.startsWith("/")){if(!v.relativePath.startsWith(o)&&u)return;Ot(v.relativePath.startsWith(o),`Absolute route path "${v.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(o.length)}let f=Hn([o,v.relativePath]),C=s.concat(v);b.children&&b.children.length>0&&(Ot(b.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),L0(b.children,n,C,f,u)),!(b.path==null&&!b.index)&&n.push({path:f,score:hC(f,b.index),routesMeta:C})};return i.forEach((b,c)=>{if(b.path===""||!b.path?.includes("?"))y(b,c);else for(let u of k0(b.path))y(b,c,!0,u)}),n}function k0(i){let n=i.split("/");if(n.length===0)return[];let[s,...o]=n,l=s.endsWith("?"),y=s.replace(/\?$/,"");if(o.length===0)return l?[y,""]:[y];let b=k0(o.join("/")),c=[];return c.push(...b.map(u=>u===""?y:[y,u].join("/"))),l&&c.push(...b),c.map(u=>i.startsWith("/")&&u===""?"/":u)}function rC(i){i.sort((n,s)=>n.score!==s.score?s.score-n.score:dC(n.routesMeta.map(o=>o.childrenIndex),s.routesMeta.map(o=>o.childrenIndex)))}var sC=/^:[\w-]+$/,aC=3,oC=2,lC=1,cC=10,uC=-2,Qm=i=>i==="*";function hC(i,n){let s=i.split("/"),o=s.length;return s.some(Qm)&&(o+=uC),n&&(o+=oC),s.filter(l=>!Qm(l)).reduce((l,y)=>l+(sC.test(y)?aC:y===""?lC:cC),o)}function dC(i,n){return i.length===n.length&&i.slice(0,-1).every((o,l)=>o===n[l])?i[i.length-1]-n[n.length-1]:0}function fC(i,n,s=!1){let{routesMeta:o}=i,l={},y="/",b=[];for(let c=0;c<o.length;++c){let u=o[c],h=c===o.length-1,v=y==="/"?n:n.slice(y.length)||"/",f=Wc({path:u.relativePath,caseSensitive:u.caseSensitive,end:h},v),C=u.route;if(!f&&h&&s&&!o[o.length-1].route.index&&(f=Wc({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},v)),!f)return null;Object.assign(l,f.params),b.push({params:l,pathname:Hn([y,f.pathname]),pathnameBase:bC(Hn([y,f.pathnameBase])),route:C}),f.pathnameBase!=="/"&&(y=Hn([y,f.pathnameBase]))}return b}function Wc(i,n){typeof i=="string"&&(i={path:i,caseSensitive:!1,end:!0});let[s,o]=pC(i.path,i.caseSensitive,i.end),l=n.match(s);if(!l)return null;let y=l[0],b=y.replace(/(.)\/+$/,"$1"),c=l.slice(1);return{params:o.reduce((h,{paramName:v,isOptional:f},C)=>{if(v==="*"){let A=c[C]||"";b=y.slice(0,y.length-A.length).replace(/(.)\/+$/,"$1")}const x=c[C];return f&&!x?h[v]=void 0:h[v]=(x||"").replace(/%2F/g,"/"),h},{}),pathname:y,pathnameBase:b,pattern:i}}function pC(i,n=!1,s=!0){zn(i==="*"||!i.endsWith("*")||i.endsWith("/*"),`Route path "${i}" will be treated as if it were "${i.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${i.replace(/\*$/,"/*")}".`);let o=[],l="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(b,c,u,h,v)=>{if(o.push({paramName:c,isOptional:u!=null}),u){let f=v.charAt(h+b.length);return f&&f!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return i.endsWith("*")?(o.push({paramName:"*"}),l+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?l+="\\/*$":i!==""&&i!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,n?void 0:"i"),o]}function _C(i){try{return i.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return zn(!1,`The URL path "${i}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),i}}function Lr(i,n){if(n==="/")return i;if(!i.toLowerCase().startsWith(n.toLowerCase()))return null;let s=n.endsWith("/")?n.length-1:n.length,o=i.charAt(s);return o&&o!=="/"?null:i.slice(s)||"/"}var gC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function mC(i,n="/"){let{pathname:s,search:o="",hash:l=""}=typeof i=="string"?Ba(i):i,y;return s?(s=M0(s),s.startsWith("/")?y=Jm(s.substring(1),"/"):y=Jm(s,n)):y=n,{pathname:y,search:SC(o),hash:yC(l)}}function Jm(i,n){let s=Gc(n).split("/");return i.split("/").forEach(l=>{l===".."?s.length>1&&s.pop():l!=="."&&s.push(l)}),s.length>1?s.join("/"):"/"}function bd(i,n,s,o){return`Cannot include a '${i}' character in a manually specified \`to.${n}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function vC(i){return i.filter((n,s)=>s===0||n.route.path&&n.route.path.length>0)}function Lf(i){let n=vC(i);return n.map((s,o)=>o===n.length-1?s.pathname:s.pathnameBase)}function ru(i,n,s,o=!1){let l;typeof i=="string"?l=Ba(i):(l={...i},Ot(!l.pathname||!l.pathname.includes("?"),bd("?","pathname","search",l)),Ot(!l.pathname||!l.pathname.includes("#"),bd("#","pathname","hash",l)),Ot(!l.search||!l.search.includes("#"),bd("#","search","hash",l)));let y=i===""||l.pathname==="",b=y?"/":l.pathname,c;if(b==null)c=s;else{let f=n.length-1;if(!o&&b.startsWith("..")){let C=b.split("/");for(;C[0]==="..";)C.shift(),f-=1;l.pathname=C.join("/")}c=f>=0?n[f]:"/"}let u=mC(l,c),h=b&&b!=="/"&&b.endsWith("/"),v=(y||b===".")&&s.endsWith("/");return!u.pathname.endsWith("/")&&(h||v)&&(u.pathname+="/"),u}var M0=i=>i.replace(/\/\/+/g,"/"),Hn=i=>M0(i.join("/")),Gc=i=>i.replace(/\/+$/,""),bC=i=>Gc(i).replace(/^\/*/,"/"),SC=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,yC=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i,CC=class{constructor(i,n,s,o=!1){this.status=i,this.statusText=n||"",this.internal=o,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function wC(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}function EC(i){let n=i.map(s=>s.route.path).filter(Boolean);return Hn(n)||"/"}var D0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function O0(i,n){let s=i;if(typeof s!="string"||!gC.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let o=s,l=!1;if(D0)try{let y=new URL(window.location.href),b=s.startsWith("//")?new URL(y.protocol+s):new URL(s),c=Lr(b.pathname,n);b.origin===y.origin&&c!=null?s=c+b.search+b.hash:l=!0}catch{zn(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:l,to:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var B0=["POST","PUT","PATCH","DELETE"];new Set(B0);var xC=["GET",...B0];new Set(xC);var Na=te.createContext(null);Na.displayName="DataRouter";var su=te.createContext(null);su.displayName="DataRouterState";var N0=te.createContext(!1);function TC(){return te.useContext(N0)}var I0=te.createContext({isTransitioning:!1});I0.displayName="ViewTransition";var AC=te.createContext(new Map);AC.displayName="Fetchers";var RC=te.createContext(null);RC.displayName="Await";var ln=te.createContext(null);ln.displayName="Navigation";var al=te.createContext(null);al.displayName="Location";var Zn=te.createContext({outlet:null,matches:[],isDataRoute:!1});Zn.displayName="Route";var kf=te.createContext(null);kf.displayName="RouteError";var H0="REACT_ROUTER_ERROR",LC="REDIRECT",kC="ROUTE_ERROR_RESPONSE";function MC(i){if(i.startsWith(`${H0}:${LC}:{`))try{let n=JSON.parse(i.slice(28));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.location=="string"&&typeof n.reloadDocument=="boolean"&&typeof n.replace=="boolean")return n}catch{}}function DC(i){if(i.startsWith(`${H0}:${kC}:{`))try{let n=JSON.parse(i.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new CC(n.status,n.statusText,n.data)}catch{}}function OC(i,{relative:n}={}){Ot(Ia(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:o}=te.useContext(ln),{hash:l,pathname:y,search:b}=ol(i,{relative:n}),c=y;return s!=="/"&&(c=y==="/"?s:Hn([s,y])),o.createHref({pathname:c,search:b,hash:l})}function Ia(){return te.useContext(al)!=null}function Un(){return Ot(Ia(),"useLocation() may be used only in the context of a <Router> component."),te.useContext(al).location}var z0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function $0(i){te.useContext(ln).static||te.useLayoutEffect(i)}function U0(){let{isDataRoute:i}=te.useContext(Zn);return i?GC():BC()}function BC(){Ot(Ia(),"useNavigate() may be used only in the context of a <Router> component.");let i=te.useContext(Na),{basename:n,navigator:s}=te.useContext(ln),{matches:o}=te.useContext(Zn),{pathname:l}=Un(),y=JSON.stringify(Lf(o)),b=te.useRef(!1);return $0(()=>{b.current=!0}),te.useCallback((u,h={})=>{if(zn(b.current,z0),!b.current)return;if(typeof u=="number"){s.go(u);return}let v=ru(u,JSON.parse(y),l,h.relative==="path");i==null&&n!=="/"&&(v.pathname=v.pathname==="/"?n:Hn([n,v.pathname])),(h.replace?s.replace:s.push)(v,h.state,h)},[n,s,y,l,i])}te.createContext(null);function ol(i,{relative:n}={}){let{matches:s}=te.useContext(Zn),{pathname:o}=Un(),l=JSON.stringify(Lf(s));return te.useMemo(()=>ru(i,JSON.parse(l),o,n==="path"),[i,l,o,n])}function NC(i,n){return P0(i,n)}function P0(i,n,s){Ot(Ia(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=te.useContext(ln),{matches:l}=te.useContext(Zn),y=l[l.length-1],b=y?y.params:{},c=y?y.pathname:"/",u=y?y.pathnameBase:"/",h=y&&y.route;{let p=h&&h.path||"";F0(c,!h||p.endsWith("*")||p.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${p}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
8
|
+
`+a.stack}}var gi=Object.prototype.hasOwnProperty,mi=t.unstable_scheduleCallback,un=t.unstable_cancelCallback,An=t.unstable_shouldYield,Jt=t.unstable_requestPaint,lt=t.unstable_now,Gt=t.unstable_getCurrentPriorityLevel,It=t.unstable_ImmediatePriority,Ht=t.unstable_UserBlockingPriority,ei=t.unstable_NormalPriority,Rn=t.unstable_LowPriority,Ti=t.unstable_IdlePriority,Xi=t.log,ht=t.unstable_setDisableYieldValue,Ii=null,Kt=null;function Yt(e){if(typeof Xi=="function"&&ht(e),Kt&&typeof Kt.setStrictMode=="function")try{Kt.setStrictMode(Ii,e)}catch{}}var zt=Math.clz32?Math.clz32:Ps,us=Math.log,er=Math.LN2;function Ps(e){return e>>>=0,e===0?32:31-(us(e)/er|0)|0}var Ln=256,Pn=262144,tr=4194304;function ti(e){var i=e&42;if(i!==0)return i;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function X(e,i,r){var a=e.pendingLanes;if(a===0)return 0;var d=0,m=e.suspendedLanes,k=e.pingedLanes;e=e.warmLanes;var N=a&134217727;return N!==0?(a=N&~m,a!==0?d=ti(a):(k&=N,k!==0?d=ti(k):r||(r=N&~e,r!==0&&(d=ti(r))))):(N=a&~m,N!==0?d=ti(N):k!==0?d=ti(k):r||(r=a&~e,r!==0&&(d=ti(r)))),d===0?0:i!==0&&i!==d&&(i&m)===0&&(m=d&-d,r=i&-i,m>=r||m===32&&(r&4194048)!==0)?i:d}function he(e,i){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&i)===0}function ve(e,i){switch(e){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 Ie(){var e=tr;return tr<<=1,(tr&62914560)===0&&(tr=4194304),e}function St(e){for(var i=[],r=0;31>r;r++)i.push(e);return i}function dt(e,i){e.pendingLanes|=i,i!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ee(e,i,r,a,d,m){var k=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var N=e.entanglements,G=e.expirationTimes,re=e.hiddenUpdates;for(r=k&~r;0<r;){var ue=31-zt(r),fe=1<<ue;N[ue]=0,G[ue]=-1;var se=re[ue];if(se!==null)for(re[ue]=null,ue=0;ue<se.length;ue++){var le=se[ue];le!==null&&(le.lane&=-536870913)}r&=~fe}a!==0&&Ce(e,a,0),m!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=m&~(k&~i))}function Ce(e,i,r){e.pendingLanes|=i,e.suspendedLanes&=~i;var a=31-zt(i);e.entangledLanes|=i,e.entanglements[a]=e.entanglements[a]|1073741824|r&261930}function He(e,i){var r=e.entangledLanes|=i;for(e=e.entanglements;r;){var a=31-zt(r),d=1<<a;d&i|e[a]&i&&(e[a]|=i),r&=~d}}function Bt(e,i){var r=i&-i;return r=(r&42)!==0?1:Qe(r),(r&(e.suspendedLanes|i))!==0?0:r}function Qe(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function vi(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ir(){var e=Y.p;return e!==0?e:(e=window.event,e===void 0?32:Dm(e.type))}function nr(e,i){var r=Y.p;try{return Y.p=e,i()}finally{Y.p=r}}var Hi=Math.random().toString(36).slice(2),xt="__reactFiber$"+Hi,wt="__reactProps$"+Hi,kn="__reactContainer$"+Hi,Mr="__reactEvents$"+Hi,js="__reactListeners$"+Hi,rr="__reactHandles$"+Hi,hs="__reactResources$"+Hi,jn="__reactMarker$"+Hi;function Me(e){delete e[xt],delete e[wt],delete e[Mr],delete e[js],delete e[rr]}function q(e){var i=e[xt];if(i)return i;for(var r=e.parentNode;r;){if(i=r[kn]||r[xt]){if(r=i.alternate,i.child!==null||r!==null&&r.child!==null)for(e=gm(e);e!==null;){if(r=e[xt])return r;e=gm(e)}return i}e=r,r=e.parentNode}return null}function pe(e){if(e=e[xt]||e[kn]){var i=e.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return e}return null}function we(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e.stateNode;throw Error(o(33))}function it(e){var i=e[hs];return i||(i=e[hs]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Ye(e){e[jn]=!0}var Tt=new Set,$t={};function Ut(e,i){ge(e,i),ge(e+"Capture",i)}function ge(e,i){for($t[e]=i,e=0;e<i.length;e++)Tt.add(i[e])}var Le=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]*$"),De={},rt={};function Mt(e){return gi.call(rt,e)?!0:gi.call(De,e)?!1:Le.test(e)?rt[e]=!0:(De[e]=!0,!1)}function Ai(e,i,r){if(Mt(i))if(r===null)e.removeAttribute(i);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(i);return;case"boolean":var a=i.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(i);return}}e.setAttribute(i,""+r)}}function Zi(e,i,r){if(r===null)e.removeAttribute(i);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttribute(i,""+r)}}function zi(e,i,r,a){if(a===null)e.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(i,r,""+a)}}function Et(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Qi(e){var i=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function ul(e,i,r){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);if(!e.hasOwnProperty(i)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var d=a.get,m=a.set;return Object.defineProperty(e,i,{configurable:!0,get:function(){return d.call(this)},set:function(k){r=""+k,m.call(this,k)}}),Object.defineProperty(e,i,{enumerable:a.enumerable}),{getValue:function(){return r},setValue:function(k){r=""+k},stopTracking:function(){e._valueTracker=null,delete e[i]}}}}function Fs(e){if(!e._valueTracker){var i=Qi(e)?"checked":"value";e._valueTracker=ul(e,i,""+e[i])}}function ja(e){if(!e)return!1;var i=e._valueTracker;if(!i)return!0;var r=i.getValue(),a="";return e&&(a=Qi(e)?e.checked?"true":"false":e.value),e=a,e!==r?(i.setValue(e),!0):!1}function qs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var du=/[\n"\\]/g;function $i(e){return e.replace(du,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Fa(e,i,r,a,d,m,k,N){e.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?e.type=k:e.removeAttribute("type"),i!=null?k==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+Et(i)):e.value!==""+Et(i)&&(e.value=""+Et(i)):k!=="submit"&&k!=="reset"||e.removeAttribute("value"),i!=null?Ws(e,k,Et(i)):r!=null?Ws(e,k,Et(r)):a!=null&&e.removeAttribute("value"),d==null&&m!=null&&(e.defaultChecked=!!m),d!=null&&(e.checked=d&&typeof d!="function"&&typeof d!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?e.name=""+Et(N):e.removeAttribute("name")}function ds(e,i,r,a,d,m,k,N){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(e.type=m),i!=null||r!=null){if(!(m!=="submit"&&m!=="reset"||i!=null)){Fs(e);return}r=r!=null?""+Et(r):"",i=i!=null?""+Et(i):r,N||i===e.value||(e.value=i),e.defaultValue=i}a=a??d,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=N?e.checked:!!a,e.defaultChecked=!!a,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(e.name=k),Fs(e)}function Ws(e,i,r){i==="number"&&qs(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function bi(e,i,r,a){if(e=e.options,i){i={};for(var d=0;d<r.length;d++)i["$"+r[d]]=!0;for(r=0;r<e.length;r++)d=i.hasOwnProperty("$"+e[r].value),e[r].selected!==d&&(e[r].selected=d),d&&a&&(e[r].defaultSelected=!0)}else{for(r=""+Et(r),i=null,d=0;d<e.length;d++){if(e[d].value===r){e[d].selected=!0,a&&(e[d].defaultSelected=!0);return}i!==null||e[d].disabled||(i=e[d])}i!==null&&(i.selected=!0)}}function hl(e,i,r){if(i!=null&&(i=""+Et(i),i!==e.value&&(e.value=i),r==null)){e.defaultValue!==i&&(e.defaultValue=i);return}e.defaultValue=r!=null?""+Et(r):""}function Gs(e,i,r,a){if(i==null){if(a!=null){if(r!=null)throw Error(o(92));if(ee(a)){if(1<a.length)throw Error(o(93));a=a[0]}r=a}r==null&&(r=""),i=r}r=Et(i),e.defaultValue=r,a=e.textContent,a===r&&a!==""&&a!==null&&(e.value=a),Fs(e)}function Ue(e,i){if(i){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=i;return}}e.textContent=i}var dl=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 ii(e,i,r){var a=i.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?a?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="":a?e.setProperty(i,r):typeof r!="number"||r===0||dl.has(i)?i==="float"?e.cssFloat=r:e[i]=(""+r).trim():e[i]=r+"px"}function ft(e,i,r){if(i!=null&&typeof i!="object")throw Error(o(62));if(e=e.style,r!=null){for(var a in r)!r.hasOwnProperty(a)||i!=null&&i.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var d in i)a=i[d],i.hasOwnProperty(d)&&r[d]!==a&&ii(e,d,a)}else for(var m in i)i.hasOwnProperty(m)&&ii(e,m,i[m])}function Dr(e){if(e.indexOf("-")===-1)return!1;switch(e){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 sr=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"]]),qa=/^[\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 Or(e){return qa.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ye(){}var Ae=null;function Fe(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Je=null,Nt=null;function hn(e){var i=pe(e);if(i&&(e=i.stateNode)){var r=e[wt]||null;e:switch(e=i.stateNode,i.type){case"input":if(Fa(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),i=r.name,r.type==="radio"&&i!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+$i(""+i)+'"][type="radio"]'),i=0;i<r.length;i++){var a=r[i];if(a!==e&&a.form===e.form){var d=a[wt]||null;if(!d)throw Error(o(90));Fa(a,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(i=0;i<r.length;i++)a=r[i],a.form===e.form&&ja(a)}break e;case"textarea":hl(e,r.value,r.defaultValue);break e;case"select":i=r.value,i!=null&&bi(e,!!r.multiple,i,!1)}}}var Wa=!1;function fl(e,i,r){if(Wa)return e(i,r);Wa=!0;try{var a=e(i);return a}finally{if(Wa=!1,(Je!==null||Nt!==null)&&(ec(),Je&&(i=Je,e=Nt,Nt=Je=null,hn(i),e)))for(i=0;i<e.length;i++)hn(e[i])}}function Ga(e,i){var r=e.stateNode;if(r===null)return null;var a=r[wt]||null;if(a===null)return null;r=a[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(o(231,i,typeof r));return r}var ar=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fu=!1;if(ar)try{var Ka={};Object.defineProperty(Ka,"passive",{get:function(){fu=!0}}),window.addEventListener("test",Ka,Ka),window.removeEventListener("test",Ka,Ka)}catch{fu=!1}var Br=null,pu=null,pl=null;function cp(){if(pl)return pl;var e,i=pu,r=i.length,a,d="value"in Br?Br.value:Br.textContent,m=d.length;for(e=0;e<r&&i[e]===d[e];e++);var k=r-e;for(a=1;a<=k&&i[r-a]===d[m-a];a++);return pl=d.slice(e,1<a?1-a:void 0)}function _l(e){var i=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&i===13&&(e=13)):e=i,e===10&&(e=13),32<=e||e===13?e:0}function gl(){return!0}function up(){return!1}function Ui(e){function i(r,a,d,m,k){this._reactName=r,this._targetInst=d,this.type=a,this.nativeEvent=m,this.target=k,this.currentTarget=null;for(var N in e)e.hasOwnProperty(N)&&(r=e[N],this[N]=r?r(m):m[N]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?gl:up,this.isPropagationStopped=up,this}return f(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=gl)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=gl)},persist:function(){},isPersistent:gl}),i}var fs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ml=Ui(fs),Ya=f({},fs,{view:0,detail:0}),US=Ui(Ya),_u,gu,Va,vl=f({},Ya,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Va&&(Va&&e.type==="mousemove"?(_u=e.screenX-Va.screenX,gu=e.screenY-Va.screenY):gu=_u=0,Va=e),_u)},movementY:function(e){return"movementY"in e?e.movementY:gu}}),hp=Ui(vl),PS=f({},vl,{dataTransfer:0}),jS=Ui(PS),FS=f({},Ya,{relatedTarget:0}),mu=Ui(FS),qS=f({},fs,{animationName:0,elapsedTime:0,pseudoElement:0}),WS=Ui(qS),GS=f({},fs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),KS=Ui(GS),YS=f({},fs,{data:0}),dp=Ui(YS),VS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},XS={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"},ZS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function QS(e){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(e):(e=ZS[e])?!!i[e]:!1}function vu(){return QS}var JS=f({},Ya,{key:function(e){if(e.key){var i=VS[e.key]||e.key;if(i!=="Unidentified")return i}return e.type==="keypress"?(e=_l(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?XS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vu,charCode:function(e){return e.type==="keypress"?_l(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?_l(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ey=Ui(JS),ty=f({},vl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),fp=Ui(ty),iy=f({},Ya,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vu}),ny=Ui(iy),ry=f({},fs,{propertyName:0,elapsedTime:0,pseudoElement:0}),sy=Ui(ry),ay=f({},vl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),oy=Ui(ay),ly=f({},fs,{newState:0,oldState:0}),cy=Ui(ly),uy=[9,13,27,32],bu=ar&&"CompositionEvent"in window,Xa=null;ar&&"documentMode"in document&&(Xa=document.documentMode);var hy=ar&&"TextEvent"in window&&!Xa,pp=ar&&(!bu||Xa&&8<Xa&&11>=Xa),_p=" ",gp=!1;function mp(e,i){switch(e){case"keyup":return uy.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ks=!1;function dy(e,i){switch(e){case"compositionend":return vp(i);case"keypress":return i.which!==32?null:(gp=!0,_p);case"textInput":return e=i.data,e===_p&&gp?null:e;default:return null}}function fy(e,i){if(Ks)return e==="compositionend"||!bu&&mp(e,i)?(e=cp(),pl=pu=Br=null,Ks=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return pp&&i.locale!=="ko"?null:i.data;default:return null}}var py={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 bp(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i==="input"?!!py[e.type]:i==="textarea"}function Sp(e,i,r,a){Je?Nt?Nt.push(a):Nt=[a]:Je=a,i=oc(i,"onChange"),0<i.length&&(r=new ml("onChange","change",null,r,a),e.push({event:r,listeners:i}))}var Za=null,Qa=null;function _y(e){im(e,0)}function bl(e){var i=we(e);if(ja(i))return e}function yp(e,i){if(e==="change")return i}var Cp=!1;if(ar){var Su;if(ar){var yu="oninput"in document;if(!yu){var wp=document.createElement("div");wp.setAttribute("oninput","return;"),yu=typeof wp.oninput=="function"}Su=yu}else Su=!1;Cp=Su&&(!document.documentMode||9<document.documentMode)}function Ep(){Za&&(Za.detachEvent("onpropertychange",xp),Qa=Za=null)}function xp(e){if(e.propertyName==="value"&&bl(Qa)){var i=[];Sp(i,Qa,e,Fe(e)),fl(_y,i)}}function gy(e,i,r){e==="focusin"?(Ep(),Za=i,Qa=r,Za.attachEvent("onpropertychange",xp)):e==="focusout"&&Ep()}function my(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return bl(Qa)}function vy(e,i){if(e==="click")return bl(i)}function by(e,i){if(e==="input"||e==="change")return bl(i)}function Sy(e,i){return e===i&&(e!==0||1/e===1/i)||e!==e&&i!==i}var Ji=typeof Object.is=="function"?Object.is:Sy;function Ja(e,i){if(Ji(e,i))return!0;if(typeof e!="object"||e===null||typeof i!="object"||i===null)return!1;var r=Object.keys(e),a=Object.keys(i);if(r.length!==a.length)return!1;for(a=0;a<r.length;a++){var d=r[a];if(!gi.call(i,d)||!Ji(e[d],i[d]))return!1}return!0}function Tp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ap(e,i){var r=Tp(e);e=0;for(var a;r;){if(r.nodeType===3){if(a=e+r.textContent.length,e<=i&&a>=i)return{node:r,offset:i-e};e=a}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Tp(r)}}function Rp(e,i){return e&&i?e===i?!0:e&&e.nodeType===3?!1:i&&i.nodeType===3?Rp(e,i.parentNode):"contains"in e?e.contains(i):e.compareDocumentPosition?!!(e.compareDocumentPosition(i)&16):!1:!1}function Lp(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var i=qs(e.document);i instanceof e.HTMLIFrameElement;){try{var r=typeof i.contentWindow.location.href=="string"}catch{r=!1}if(r)e=i.contentWindow;else break;i=qs(e.document)}return i}function Cu(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i&&(i==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||i==="textarea"||e.contentEditable==="true")}var yy=ar&&"documentMode"in document&&11>=document.documentMode,Ys=null,wu=null,eo=null,Eu=!1;function kp(e,i,r){var a=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Eu||Ys==null||Ys!==qs(a)||(a=Ys,"selectionStart"in a&&Cu(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),eo&&Ja(eo,a)||(eo=a,a=oc(wu,"onSelect"),0<a.length&&(i=new ml("onSelect","select",null,i,r),e.push({event:i,listeners:a}),i.target=Ys)))}function ps(e,i){var r={};return r[e.toLowerCase()]=i.toLowerCase(),r["Webkit"+e]="webkit"+i,r["Moz"+e]="moz"+i,r}var Vs={animationend:ps("Animation","AnimationEnd"),animationiteration:ps("Animation","AnimationIteration"),animationstart:ps("Animation","AnimationStart"),transitionrun:ps("Transition","TransitionRun"),transitionstart:ps("Transition","TransitionStart"),transitioncancel:ps("Transition","TransitionCancel"),transitionend:ps("Transition","TransitionEnd")},xu={},Mp={};ar&&(Mp=document.createElement("div").style,"AnimationEvent"in window||(delete Vs.animationend.animation,delete Vs.animationiteration.animation,delete Vs.animationstart.animation),"TransitionEvent"in window||delete Vs.transitionend.transition);function _s(e){if(xu[e])return xu[e];if(!Vs[e])return e;var i=Vs[e],r;for(r in i)if(i.hasOwnProperty(r)&&r in Mp)return xu[e]=i[r];return e}var Dp=_s("animationend"),Op=_s("animationiteration"),Bp=_s("animationstart"),Cy=_s("transitionrun"),wy=_s("transitionstart"),Ey=_s("transitioncancel"),Np=_s("transitionend"),Ip=new Map,Tu="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(" ");Tu.push("scrollEnd");function Mn(e,i){Ip.set(e,i),Ut(i,[e])}var Sl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},dn=[],Xs=0,Au=0;function yl(){for(var e=Xs,i=Au=Xs=0;i<e;){var r=dn[i];dn[i++]=null;var a=dn[i];dn[i++]=null;var d=dn[i];dn[i++]=null;var m=dn[i];if(dn[i++]=null,a!==null&&d!==null){var k=a.pending;k===null?d.next=d:(d.next=k.next,k.next=d),a.pending=d}m!==0&&Hp(r,d,m)}}function Cl(e,i,r,a){dn[Xs++]=e,dn[Xs++]=i,dn[Xs++]=r,dn[Xs++]=a,Au|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Ru(e,i,r,a){return Cl(e,i,r,a),wl(e)}function gs(e,i){return Cl(e,null,null,i),wl(e)}function Hp(e,i,r){e.lanes|=r;var a=e.alternate;a!==null&&(a.lanes|=r);for(var d=!1,m=e.return;m!==null;)m.childLanes|=r,a=m.alternate,a!==null&&(a.childLanes|=r),m.tag===22&&(e=m.stateNode,e===null||e._visibility&1||(d=!0)),e=m,m=m.return;return e.tag===3?(m=e.stateNode,d&&i!==null&&(d=31-zt(r),e=m.hiddenUpdates,a=e[d],a===null?e[d]=[i]:a.push(i),i.lane=r|536870912),m):null}function wl(e){if(50<wo)throw wo=0,Hh=null,Error(o(185));for(var i=e.return;i!==null;)e=i,i=e.return;return e.tag===3?e.stateNode:null}var Zs={};function xy(e,i,r,a){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function en(e,i,r,a){return new xy(e,i,r,a)}function Lu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function or(e,i){var r=e.alternate;return r===null?(r=en(e.tag,i,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=i,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,i=e.dependencies,r.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function zp(e,i){e.flags&=65011714;var r=e.alternate;return r===null?(e.childLanes=0,e.lanes=i,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,i=r.dependencies,e.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),e}function El(e,i,r,a,d,m){var k=0;if(a=e,typeof e=="function")Lu(e)&&(k=1);else if(typeof e=="string")k=k1(e,r,ae.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case B:return e=en(31,r,i,d),e.elementType=B,e.lanes=m,e;case E:return ms(r.children,d,m,i);case p:k=8,d|=24;break;case S:return e=en(12,r,i,d|2),e.elementType=S,e.lanes=m,e;case R:return e=en(13,r,i,d),e.elementType=R,e.lanes=m,e;case L:return e=en(19,r,i,d),e.elementType=L,e.lanes=m,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case g:k=10;break e;case _:k=9;break e;case w:k=11;break e;case D:k=14;break e;case T:k=16,a=null;break e}k=29,r=Error(o(130,e===null?"null":typeof e,"")),a=null}return i=en(k,r,i,d),i.elementType=e,i.type=a,i.lanes=m,i}function ms(e,i,r,a){return e=en(7,e,a,i),e.lanes=r,e}function ku(e,i,r){return e=en(6,e,null,i),e.lanes=r,e}function $p(e){var i=en(18,null,null,0);return i.stateNode=e,i}function Mu(e,i,r){return i=en(4,e.children!==null?e.children:[],e.key,i),i.lanes=r,i.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},i}var Up=new WeakMap;function fn(e,i){if(typeof e=="object"&&e!==null){var r=Up.get(e);return r!==void 0?r:(i={value:e,source:i,stack:Qt(i)},Up.set(e,i),i)}return{value:e,source:i,stack:Qt(i)}}var Qs=[],Js=0,xl=null,to=0,pn=[],_n=0,Nr=null,Fn=1,qn="";function lr(e,i){Qs[Js++]=to,Qs[Js++]=xl,xl=e,to=i}function Pp(e,i,r){pn[_n++]=Fn,pn[_n++]=qn,pn[_n++]=Nr,Nr=e;var a=Fn;e=qn;var d=32-zt(a)-1;a&=~(1<<d),r+=1;var m=32-zt(i)+d;if(30<m){var k=d-d%5;m=(a&(1<<k)-1).toString(32),a>>=k,d-=k,Fn=1<<32-zt(i)+d|r<<d|a,qn=m+e}else Fn=1<<m|r<<d|a,qn=e}function Du(e){e.return!==null&&(lr(e,1),Pp(e,1,0))}function Ou(e){for(;e===xl;)xl=Qs[--Js],Qs[Js]=null,to=Qs[--Js],Qs[Js]=null;for(;e===Nr;)Nr=pn[--_n],pn[_n]=null,qn=pn[--_n],pn[_n]=null,Fn=pn[--_n],pn[_n]=null}function jp(e,i){pn[_n++]=Fn,pn[_n++]=qn,pn[_n++]=Nr,Fn=i.id,qn=i.overflow,Nr=e}var Si=null,At=null,nt=!1,Ir=null,gn=!1,Bu=Error(o(519));function Hr(e){var i=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw io(fn(i,e)),Bu}function Fp(e){var i=e.stateNode,r=e.type,a=e.memoizedProps;switch(i[xt]=e,i[wt]=a,r){case"dialog":Xe("cancel",i),Xe("close",i);break;case"iframe":case"object":case"embed":Xe("load",i);break;case"video":case"audio":for(r=0;r<xo.length;r++)Xe(xo[r],i);break;case"source":Xe("error",i);break;case"img":case"image":case"link":Xe("error",i),Xe("load",i);break;case"details":Xe("toggle",i);break;case"input":Xe("invalid",i),ds(i,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Xe("invalid",i);break;case"textarea":Xe("invalid",i),Gs(i,a.value,a.defaultValue,a.children)}r=a.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||i.textContent===""+r||a.suppressHydrationWarning===!0||am(i.textContent,r)?(a.popover!=null&&(Xe("beforetoggle",i),Xe("toggle",i)),a.onScroll!=null&&Xe("scroll",i),a.onScrollEnd!=null&&Xe("scrollend",i),a.onClick!=null&&(i.onclick=ye),i=!0):i=!1,i||Hr(e,!0)}function qp(e){for(Si=e.return;Si;)switch(Si.tag){case 5:case 31:case 13:gn=!1;return;case 27:case 3:gn=!0;return;default:Si=Si.return}}function ea(e){if(e!==Si)return!1;if(!nt)return qp(e),nt=!0,!1;var i=e.tag,r;if((r=i!==3&&i!==27)&&((r=i===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||Qh(e.type,e.memoizedProps)),r=!r),r&&At&&Hr(e),qp(e),i===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));At=_m(e)}else if(i===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));At=_m(e)}else i===27?(i=At,Zr(e.type)?(e=nd,nd=null,At=e):At=i):At=Si?vn(e.stateNode.nextSibling):null;return!0}function vs(){At=Si=null,nt=!1}function Nu(){var e=Ir;return e!==null&&(qi===null?qi=e:qi.push.apply(qi,e),Ir=null),e}function io(e){Ir===null?Ir=[e]:Ir.push(e)}var Iu=M(null),bs=null,cr=null;function zr(e,i,r){V(Iu,i._currentValue),i._currentValue=r}function ur(e){e._currentValue=Iu.current,U(Iu)}function Hu(e,i,r){for(;e!==null;){var a=e.alternate;if((e.childLanes&i)!==i?(e.childLanes|=i,a!==null&&(a.childLanes|=i)):a!==null&&(a.childLanes&i)!==i&&(a.childLanes|=i),e===r)break;e=e.return}}function zu(e,i,r,a){var d=e.child;for(d!==null&&(d.return=e);d!==null;){var m=d.dependencies;if(m!==null){var k=d.child;m=m.firstContext;e:for(;m!==null;){var N=m;m=d;for(var G=0;G<i.length;G++)if(N.context===i[G]){m.lanes|=r,N=m.alternate,N!==null&&(N.lanes|=r),Hu(m.return,r,e),a||(k=null);break e}m=N.next}}else if(d.tag===18){if(k=d.return,k===null)throw Error(o(341));k.lanes|=r,m=k.alternate,m!==null&&(m.lanes|=r),Hu(k,r,e),k=null}else k=d.child;if(k!==null)k.return=d;else for(k=d;k!==null;){if(k===e){k=null;break}if(d=k.sibling,d!==null){d.return=k.return,k=d;break}k=k.return}d=k}}function ta(e,i,r,a){e=null;for(var d=i,m=!1;d!==null;){if(!m){if((d.flags&524288)!==0)m=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var k=d.alternate;if(k===null)throw Error(o(387));if(k=k.memoizedProps,k!==null){var N=d.type;Ji(d.pendingProps.value,k.value)||(e!==null?e.push(N):e=[N])}}else if(d===Q.current){if(k=d.alternate,k===null)throw Error(o(387));k.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(e!==null?e.push(ko):e=[ko])}d=d.return}e!==null&&zu(i,e,r,a),i.flags|=262144}function Tl(e){for(e=e.firstContext;e!==null;){if(!Ji(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ss(e){bs=e,cr=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function yi(e){return Wp(bs,e)}function Al(e,i){return bs===null&&Ss(e),Wp(e,i)}function Wp(e,i){var r=i._currentValue;if(i={context:i,memoizedValue:r,next:null},cr===null){if(e===null)throw Error(o(308));cr=i,e.dependencies={lanes:0,firstContext:i},e.flags|=524288}else cr=cr.next=i;return r}var Ty=typeof AbortController<"u"?AbortController:function(){var e=[],i=this.signal={aborted:!1,addEventListener:function(r,a){e.push(a)}};this.abort=function(){i.aborted=!0,e.forEach(function(r){return r()})}},Ay=t.unstable_scheduleCallback,Ry=t.unstable_NormalPriority,ni={$$typeof:g,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function $u(){return{controller:new Ty,data:new Map,refCount:0}}function no(e){e.refCount--,e.refCount===0&&Ay(Ry,function(){e.controller.abort()})}var ro=null,Uu=0,ia=0,na=null;function Ly(e,i){if(ro===null){var r=ro=[];Uu=0,ia=Fh(),na={status:"pending",value:void 0,then:function(a){r.push(a)}}}return Uu++,i.then(Gp,Gp),i}function Gp(){if(--Uu===0&&ro!==null){na!==null&&(na.status="fulfilled");var e=ro;ro=null,ia=0,na=null;for(var i=0;i<e.length;i++)(0,e[i])()}}function ky(e,i){var r=[],a={status:"pending",value:null,reason:null,then:function(d){r.push(d)}};return e.then(function(){a.status="fulfilled",a.value=i;for(var d=0;d<r.length;d++)(0,r[d])(i)},function(d){for(a.status="rejected",a.reason=d,d=0;d<r.length;d++)(0,r[d])(void 0)}),a}var Kp=j.S;j.S=function(e,i){kg=lt(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&Ly(e,i),Kp!==null&&Kp(e,i)};var ys=M(null);function Pu(){var e=ys.current;return e!==null?e:yt.pooledCache}function Rl(e,i){i===null?V(ys,ys.current):V(ys,i.pool)}function Yp(){var e=Pu();return e===null?null:{parent:ni._currentValue,pool:e}}var ra=Error(o(460)),ju=Error(o(474)),Ll=Error(o(542)),kl={then:function(){}};function Vp(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Xp(e,i,r){switch(r=e[r],r===void 0?e.push(i):r!==i&&(i.then(ye,ye),i=r),i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,Qp(e),e;default:if(typeof i.status=="string")i.then(ye,ye);else{if(e=yt,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=i,e.status="pending",e.then(function(a){if(i.status==="pending"){var d=i;d.status="fulfilled",d.value=a}},function(a){if(i.status==="pending"){var d=i;d.status="rejected",d.reason=a}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,Qp(e),e}throw ws=i,ra}}function Cs(e){try{var i=e._init;return i(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(ws=r,ra):r}}var ws=null;function Zp(){if(ws===null)throw Error(o(459));var e=ws;return ws=null,e}function Qp(e){if(e===ra||e===Ll)throw Error(o(483))}var sa=null,so=0;function Ml(e){var i=so;return so+=1,sa===null&&(sa=[]),Xp(sa,e,i)}function ao(e,i){i=i.props.ref,e.ref=i!==void 0?i:null}function Dl(e,i){throw i.$$typeof===C?Error(o(525)):(e=Object.prototype.toString.call(i),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":e)))}function Jp(e){function i(ie,J){if(e){var ne=ie.deletions;ne===null?(ie.deletions=[J],ie.flags|=16):ne.push(J)}}function r(ie,J){if(!e)return null;for(;J!==null;)i(ie,J),J=J.sibling;return null}function a(ie){for(var J=new Map;ie!==null;)ie.key!==null?J.set(ie.key,ie):J.set(ie.index,ie),ie=ie.sibling;return J}function d(ie,J){return ie=or(ie,J),ie.index=0,ie.sibling=null,ie}function m(ie,J,ne){return ie.index=ne,e?(ne=ie.alternate,ne!==null?(ne=ne.index,ne<J?(ie.flags|=67108866,J):ne):(ie.flags|=67108866,J)):(ie.flags|=1048576,J)}function k(ie){return e&&ie.alternate===null&&(ie.flags|=67108866),ie}function N(ie,J,ne,de){return J===null||J.tag!==6?(J=ku(ne,ie.mode,de),J.return=ie,J):(J=d(J,ne),J.return=ie,J)}function G(ie,J,ne,de){var Ne=ne.type;return Ne===E?ue(ie,J,ne.props.children,de,ne.key):J!==null&&(J.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===T&&Cs(Ne)===J.type)?(J=d(J,ne.props),ao(J,ne),J.return=ie,J):(J=El(ne.type,ne.key,ne.props,null,ie.mode,de),ao(J,ne),J.return=ie,J)}function re(ie,J,ne,de){return J===null||J.tag!==4||J.stateNode.containerInfo!==ne.containerInfo||J.stateNode.implementation!==ne.implementation?(J=Mu(ne,ie.mode,de),J.return=ie,J):(J=d(J,ne.children||[]),J.return=ie,J)}function ue(ie,J,ne,de,Ne){return J===null||J.tag!==7?(J=ms(ne,ie.mode,de,Ne),J.return=ie,J):(J=d(J,ne),J.return=ie,J)}function fe(ie,J,ne){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return J=ku(""+J,ie.mode,ne),J.return=ie,J;if(typeof J=="object"&&J!==null){switch(J.$$typeof){case x:return ne=El(J.type,J.key,J.props,null,ie.mode,ne),ao(ne,J),ne.return=ie,ne;case A:return J=Mu(J,ie.mode,ne),J.return=ie,J;case T:return J=Cs(J),fe(ie,J,ne)}if(ee(J)||F(J))return J=ms(J,ie.mode,ne,null),J.return=ie,J;if(typeof J.then=="function")return fe(ie,Ml(J),ne);if(J.$$typeof===g)return fe(ie,Al(ie,J),ne);Dl(ie,J)}return null}function se(ie,J,ne,de){var Ne=J!==null?J.key:null;if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return Ne!==null?null:N(ie,J,""+ne,de);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case x:return ne.key===Ne?G(ie,J,ne,de):null;case A:return ne.key===Ne?re(ie,J,ne,de):null;case T:return ne=Cs(ne),se(ie,J,ne,de)}if(ee(ne)||F(ne))return Ne!==null?null:ue(ie,J,ne,de,null);if(typeof ne.then=="function")return se(ie,J,Ml(ne),de);if(ne.$$typeof===g)return se(ie,J,Al(ie,ne),de);Dl(ie,ne)}return null}function le(ie,J,ne,de,Ne){if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return ie=ie.get(ne)||null,N(J,ie,""+de,Ne);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case x:return ie=ie.get(de.key===null?ne:de.key)||null,G(J,ie,de,Ne);case A:return ie=ie.get(de.key===null?ne:de.key)||null,re(J,ie,de,Ne);case T:return de=Cs(de),le(ie,J,ne,de,Ne)}if(ee(de)||F(de))return ie=ie.get(ne)||null,ue(J,ie,de,Ne,null);if(typeof de.then=="function")return le(ie,J,ne,Ml(de),Ne);if(de.$$typeof===g)return le(ie,J,ne,Al(J,de),Ne);Dl(J,de)}return null}function xe(ie,J,ne,de){for(var Ne=null,st=null,Re=J,We=J=0,tt=null;Re!==null&&We<ne.length;We++){Re.index>We?(tt=Re,Re=null):tt=Re.sibling;var at=se(ie,Re,ne[We],de);if(at===null){Re===null&&(Re=tt);break}e&&Re&&at.alternate===null&&i(ie,Re),J=m(at,J,We),st===null?Ne=at:st.sibling=at,st=at,Re=tt}if(We===ne.length)return r(ie,Re),nt&&lr(ie,We),Ne;if(Re===null){for(;We<ne.length;We++)Re=fe(ie,ne[We],de),Re!==null&&(J=m(Re,J,We),st===null?Ne=Re:st.sibling=Re,st=Re);return nt&&lr(ie,We),Ne}for(Re=a(Re);We<ne.length;We++)tt=le(Re,ie,We,ne[We],de),tt!==null&&(e&&tt.alternate!==null&&Re.delete(tt.key===null?We:tt.key),J=m(tt,J,We),st===null?Ne=tt:st.sibling=tt,st=tt);return e&&Re.forEach(function(is){return i(ie,is)}),nt&&lr(ie,We),Ne}function ze(ie,J,ne,de){if(ne==null)throw Error(o(151));for(var Ne=null,st=null,Re=J,We=J=0,tt=null,at=ne.next();Re!==null&&!at.done;We++,at=ne.next()){Re.index>We?(tt=Re,Re=null):tt=Re.sibling;var is=se(ie,Re,at.value,de);if(is===null){Re===null&&(Re=tt);break}e&&Re&&is.alternate===null&&i(ie,Re),J=m(is,J,We),st===null?Ne=is:st.sibling=is,st=is,Re=tt}if(at.done)return r(ie,Re),nt&&lr(ie,We),Ne;if(Re===null){for(;!at.done;We++,at=ne.next())at=fe(ie,at.value,de),at!==null&&(J=m(at,J,We),st===null?Ne=at:st.sibling=at,st=at);return nt&&lr(ie,We),Ne}for(Re=a(Re);!at.done;We++,at=ne.next())at=le(Re,ie,We,at.value,de),at!==null&&(e&&at.alternate!==null&&Re.delete(at.key===null?We:at.key),J=m(at,J,We),st===null?Ne=at:st.sibling=at,st=at);return e&&Re.forEach(function(P1){return i(ie,P1)}),nt&&lr(ie,We),Ne}function vt(ie,J,ne,de){if(typeof ne=="object"&&ne!==null&&ne.type===E&&ne.key===null&&(ne=ne.props.children),typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case x:e:{for(var Ne=ne.key;J!==null;){if(J.key===Ne){if(Ne=ne.type,Ne===E){if(J.tag===7){r(ie,J.sibling),de=d(J,ne.props.children),de.return=ie,ie=de;break e}}else if(J.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===T&&Cs(Ne)===J.type){r(ie,J.sibling),de=d(J,ne.props),ao(de,ne),de.return=ie,ie=de;break e}r(ie,J);break}else i(ie,J);J=J.sibling}ne.type===E?(de=ms(ne.props.children,ie.mode,de,ne.key),de.return=ie,ie=de):(de=El(ne.type,ne.key,ne.props,null,ie.mode,de),ao(de,ne),de.return=ie,ie=de)}return k(ie);case A:e:{for(Ne=ne.key;J!==null;){if(J.key===Ne)if(J.tag===4&&J.stateNode.containerInfo===ne.containerInfo&&J.stateNode.implementation===ne.implementation){r(ie,J.sibling),de=d(J,ne.children||[]),de.return=ie,ie=de;break e}else{r(ie,J);break}else i(ie,J);J=J.sibling}de=Mu(ne,ie.mode,de),de.return=ie,ie=de}return k(ie);case T:return ne=Cs(ne),vt(ie,J,ne,de)}if(ee(ne))return xe(ie,J,ne,de);if(F(ne)){if(Ne=F(ne),typeof Ne!="function")throw Error(o(150));return ne=Ne.call(ne),ze(ie,J,ne,de)}if(typeof ne.then=="function")return vt(ie,J,Ml(ne),de);if(ne.$$typeof===g)return vt(ie,J,Al(ie,ne),de);Dl(ie,ne)}return typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint"?(ne=""+ne,J!==null&&J.tag===6?(r(ie,J.sibling),de=d(J,ne),de.return=ie,ie=de):(r(ie,J),de=ku(ne,ie.mode,de),de.return=ie,ie=de),k(ie)):r(ie,J)}return function(ie,J,ne,de){try{so=0;var Ne=vt(ie,J,ne,de);return sa=null,Ne}catch(Re){if(Re===ra||Re===Ll)throw Re;var st=en(29,Re,null,ie.mode);return st.lanes=de,st.return=ie,st}}}var Es=Jp(!0),e_=Jp(!1),$r=!1;function Fu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qu(e,i){e=e.updateQueue,i.updateQueue===e&&(i.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ur(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Pr(e,i,r){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(ct&2)!==0){var d=a.pending;return d===null?i.next=i:(i.next=d.next,d.next=i),a.pending=i,i=wl(e),Hp(e,null,r),i}return Cl(e,a,i,r),wl(e)}function oo(e,i,r){if(i=i.updateQueue,i!==null&&(i=i.shared,(r&4194048)!==0)){var a=i.lanes;a&=e.pendingLanes,r|=a,i.lanes=r,He(e,r)}}function Wu(e,i){var r=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,r===a)){var d=null,m=null;if(r=r.firstBaseUpdate,r!==null){do{var k={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};m===null?d=m=k:m=m.next=k,r=r.next}while(r!==null);m===null?d=m=i:m=m.next=i}else d=m=i;r={baseState:a.baseState,firstBaseUpdate:d,lastBaseUpdate:m,shared:a.shared,callbacks:a.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=i:e.next=i,r.lastBaseUpdate=i}var Gu=!1;function lo(){if(Gu){var e=na;if(e!==null)throw e}}function co(e,i,r,a){Gu=!1;var d=e.updateQueue;$r=!1;var m=d.firstBaseUpdate,k=d.lastBaseUpdate,N=d.shared.pending;if(N!==null){d.shared.pending=null;var G=N,re=G.next;G.next=null,k===null?m=re:k.next=re,k=G;var ue=e.alternate;ue!==null&&(ue=ue.updateQueue,N=ue.lastBaseUpdate,N!==k&&(N===null?ue.firstBaseUpdate=re:N.next=re,ue.lastBaseUpdate=G))}if(m!==null){var fe=d.baseState;k=0,ue=re=G=null,N=m;do{var se=N.lane&-536870913,le=se!==N.lane;if(le?(et&se)===se:(a&se)===se){se!==0&&se===ia&&(Gu=!0),ue!==null&&(ue=ue.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var xe=e,ze=N;se=i;var vt=r;switch(ze.tag){case 1:if(xe=ze.payload,typeof xe=="function"){fe=xe.call(vt,fe,se);break e}fe=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=ze.payload,se=typeof xe=="function"?xe.call(vt,fe,se):xe,se==null)break e;fe=f({},fe,se);break e;case 2:$r=!0}}se=N.callback,se!==null&&(e.flags|=64,le&&(e.flags|=8192),le=d.callbacks,le===null?d.callbacks=[se]:le.push(se))}else le={lane:se,tag:N.tag,payload:N.payload,callback:N.callback,next:null},ue===null?(re=ue=le,G=fe):ue=ue.next=le,k|=se;if(N=N.next,N===null){if(N=d.shared.pending,N===null)break;le=N,N=le.next,le.next=null,d.lastBaseUpdate=le,d.shared.pending=null}}while(!0);ue===null&&(G=fe),d.baseState=G,d.firstBaseUpdate=re,d.lastBaseUpdate=ue,m===null&&(d.shared.lanes=0),Gr|=k,e.lanes=k,e.memoizedState=fe}}function t_(e,i){if(typeof e!="function")throw Error(o(191,e));e.call(i)}function i_(e,i){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)t_(r[e],i)}var aa=M(null),Ol=M(0);function n_(e,i){e=br,V(Ol,e),V(aa,i),br=e|i.baseLanes}function Ku(){V(Ol,br),V(aa,aa.current)}function Yu(){br=Ol.current,U(aa),U(Ol)}var tn=M(null),mn=null;function jr(e){var i=e.alternate;V(Vt,Vt.current&1),V(tn,e),mn===null&&(i===null||aa.current!==null||i.memoizedState!==null)&&(mn=e)}function Vu(e){V(Vt,Vt.current),V(tn,e),mn===null&&(mn=e)}function r_(e){e.tag===22?(V(Vt,Vt.current),V(tn,e),mn===null&&(mn=e)):Fr()}function Fr(){V(Vt,Vt.current),V(tn,tn.current)}function nn(e){U(tn),mn===e&&(mn=null),U(Vt)}var Vt=M(0);function Bl(e){for(var i=e;i!==null;){if(i.tag===13){var r=i.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||td(r)||id(r)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var hr=0,qe=null,gt=null,ri=null,Nl=!1,oa=!1,xs=!1,Il=0,uo=0,la=null,My=0;function Pt(){throw Error(o(321))}function Xu(e,i){if(i===null)return!1;for(var r=0;r<i.length&&r<e.length;r++)if(!Ji(e[r],i[r]))return!1;return!0}function Zu(e,i,r,a,d,m){return hr=m,qe=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,j.H=e===null||e.memoizedState===null?P_:dh,xs=!1,m=r(a,d),xs=!1,oa&&(m=a_(i,r,a,d)),s_(e),m}function s_(e){j.H=po;var i=gt!==null&>.next!==null;if(hr=0,ri=gt=qe=null,Nl=!1,uo=0,la=null,i)throw Error(o(300));e===null||si||(e=e.dependencies,e!==null&&Tl(e)&&(si=!0))}function a_(e,i,r,a){qe=e;var d=0;do{if(oa&&(la=null),uo=0,oa=!1,25<=d)throw Error(o(301));if(d+=1,ri=gt=null,e.updateQueue!=null){var m=e.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}j.H=j_,m=i(r,a)}while(oa);return m}function Dy(){var e=j.H,i=e.useState()[0];return i=typeof i.then=="function"?ho(i):i,e=e.useState()[0],(gt!==null?gt.memoizedState:null)!==e&&(qe.flags|=1024),i}function Qu(){var e=Il!==0;return Il=0,e}function Ju(e,i,r){i.updateQueue=e.updateQueue,i.flags&=-2053,e.lanes&=~r}function eh(e){if(Nl){for(e=e.memoizedState;e!==null;){var i=e.queue;i!==null&&(i.pending=null),e=e.next}Nl=!1}hr=0,ri=gt=qe=null,oa=!1,uo=Il=0,la=null}function ki(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ri===null?qe.memoizedState=ri=e:ri=ri.next=e,ri}function Xt(){if(gt===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=gt.next;var i=ri===null?qe.memoizedState:ri.next;if(i!==null)ri=i,gt=e;else{if(e===null)throw qe.alternate===null?Error(o(467)):Error(o(310));gt=e,e={memoizedState:gt.memoizedState,baseState:gt.baseState,baseQueue:gt.baseQueue,queue:gt.queue,next:null},ri===null?qe.memoizedState=ri=e:ri=ri.next=e}return ri}function Hl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ho(e){var i=uo;return uo+=1,la===null&&(la=[]),e=Xp(la,e,i),i=qe,(ri===null?i.memoizedState:ri.next)===null&&(i=i.alternate,j.H=i===null||i.memoizedState===null?P_:dh),e}function zl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ho(e);if(e.$$typeof===g)return yi(e)}throw Error(o(438,String(e)))}function th(e){var i=null,r=qe.updateQueue;if(r!==null&&(i=r.memoCache),i==null){var a=qe.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(i={data:a.data.map(function(d){return d.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),r===null&&(r=Hl(),qe.updateQueue=r),r.memoCache=i,r=i.data[i.index],r===void 0)for(r=i.data[i.index]=Array(e),a=0;a<e;a++)r[a]=W;return i.index++,r}function dr(e,i){return typeof i=="function"?i(e):i}function $l(e){var i=Xt();return ih(i,gt,e)}function ih(e,i,r){var a=e.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=r;var d=e.baseQueue,m=a.pending;if(m!==null){if(d!==null){var k=d.next;d.next=m.next,m.next=k}i.baseQueue=d=m,a.pending=null}if(m=e.baseState,d===null)e.memoizedState=m;else{i=d.next;var N=k=null,G=null,re=i,ue=!1;do{var fe=re.lane&-536870913;if(fe!==re.lane?(et&fe)===fe:(hr&fe)===fe){var se=re.revertLane;if(se===0)G!==null&&(G=G.next={lane:0,revertLane:0,gesture:null,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null}),fe===ia&&(ue=!0);else if((hr&se)===se){re=re.next,se===ia&&(ue=!0);continue}else fe={lane:0,revertLane:re.revertLane,gesture:null,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null},G===null?(N=G=fe,k=m):G=G.next=fe,qe.lanes|=se,Gr|=se;fe=re.action,xs&&r(m,fe),m=re.hasEagerState?re.eagerState:r(m,fe)}else se={lane:fe,revertLane:re.revertLane,gesture:re.gesture,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null},G===null?(N=G=se,k=m):G=G.next=se,qe.lanes|=fe,Gr|=fe;re=re.next}while(re!==null&&re!==i);if(G===null?k=m:G.next=N,!Ji(m,e.memoizedState)&&(si=!0,ue&&(r=na,r!==null)))throw r;e.memoizedState=m,e.baseState=k,e.baseQueue=G,a.lastRenderedState=m}return d===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function nh(e){var i=Xt(),r=i.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=e;var a=r.dispatch,d=r.pending,m=i.memoizedState;if(d!==null){r.pending=null;var k=d=d.next;do m=e(m,k.action),k=k.next;while(k!==d);Ji(m,i.memoizedState)||(si=!0),i.memoizedState=m,i.baseQueue===null&&(i.baseState=m),r.lastRenderedState=m}return[m,a]}function o_(e,i,r){var a=qe,d=Xt(),m=nt;if(m){if(r===void 0)throw Error(o(407));r=r()}else r=i();var k=!Ji((gt||d).memoizedState,r);if(k&&(d.memoizedState=r,si=!0),d=d.queue,ah(u_.bind(null,a,d,e),[e]),d.getSnapshot!==i||k||ri!==null&&ri.memoizedState.tag&1){if(a.flags|=2048,ca(9,{destroy:void 0},c_.bind(null,a,d,r,i),null),yt===null)throw Error(o(349));m||(hr&127)!==0||l_(a,i,r)}return r}function l_(e,i,r){e.flags|=16384,e={getSnapshot:i,value:r},i=qe.updateQueue,i===null?(i=Hl(),qe.updateQueue=i,i.stores=[e]):(r=i.stores,r===null?i.stores=[e]:r.push(e))}function c_(e,i,r,a){i.value=r,i.getSnapshot=a,h_(i)&&d_(e)}function u_(e,i,r){return r(function(){h_(i)&&d_(e)})}function h_(e){var i=e.getSnapshot;e=e.value;try{var r=i();return!Ji(e,r)}catch{return!0}}function d_(e){var i=gs(e,2);i!==null&&Wi(i,e,2)}function rh(e){var i=ki();if(typeof e=="function"){var r=e;if(e=r(),xs){Yt(!0);try{r()}finally{Yt(!1)}}}return i.memoizedState=i.baseState=e,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:dr,lastRenderedState:e},i}function f_(e,i,r,a){return e.baseState=r,ih(e,gt,typeof a=="function"?a:dr)}function Oy(e,i,r,a,d){if(jl(e))throw Error(o(485));if(e=i.action,e!==null){var m={payload:d,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(k){m.listeners.push(k)}};j.T!==null?r(!0):m.isTransition=!1,a(m),r=i.pending,r===null?(m.next=i.pending=m,p_(i,m)):(m.next=r.next,i.pending=r.next=m)}}function p_(e,i){var r=i.action,a=i.payload,d=e.state;if(i.isTransition){var m=j.T,k={};j.T=k;try{var N=r(d,a),G=j.S;G!==null&&G(k,N),__(e,i,N)}catch(re){sh(e,i,re)}finally{m!==null&&k.types!==null&&(m.types=k.types),j.T=m}}else try{m=r(d,a),__(e,i,m)}catch(re){sh(e,i,re)}}function __(e,i,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(a){g_(e,i,a)},function(a){return sh(e,i,a)}):g_(e,i,r)}function g_(e,i,r){i.status="fulfilled",i.value=r,m_(i),e.state=r,i=e.pending,i!==null&&(r=i.next,r===i?e.pending=null:(r=r.next,i.next=r,p_(e,r)))}function sh(e,i,r){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do i.status="rejected",i.reason=r,m_(i),i=i.next;while(i!==a)}e.action=null}function m_(e){e=e.listeners;for(var i=0;i<e.length;i++)(0,e[i])()}function v_(e,i){return i}function b_(e,i){if(nt){var r=yt.formState;if(r!==null){e:{var a=qe;if(nt){if(At){t:{for(var d=At,m=gn;d.nodeType!==8;){if(!m){d=null;break t}if(d=vn(d.nextSibling),d===null){d=null;break t}}m=d.data,d=m==="F!"||m==="F"?d:null}if(d){At=vn(d.nextSibling),a=d.data==="F!";break e}}Hr(a)}a=!1}a&&(i=r[0])}}return r=ki(),r.memoizedState=r.baseState=i,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:v_,lastRenderedState:i},r.queue=a,r=z_.bind(null,qe,a),a.dispatch=r,a=rh(!1),m=hh.bind(null,qe,!1,a.queue),a=ki(),d={state:i,dispatch:null,action:e,pending:null},a.queue=d,r=Oy.bind(null,qe,d,m,r),d.dispatch=r,a.memoizedState=e,[i,r,!1]}function S_(e){var i=Xt();return y_(i,gt,e)}function y_(e,i,r){if(i=ih(e,i,v_)[0],e=$l(dr)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var a=ho(i)}catch(k){throw k===ra?Ll:k}else a=i;i=Xt();var d=i.queue,m=d.dispatch;return r!==i.memoizedState&&(qe.flags|=2048,ca(9,{destroy:void 0},By.bind(null,d,r),null)),[a,m,e]}function By(e,i){e.action=i}function C_(e){var i=Xt(),r=gt;if(r!==null)return y_(i,r,e);Xt(),i=i.memoizedState,r=Xt();var a=r.queue.dispatch;return r.memoizedState=e,[i,a,!1]}function ca(e,i,r,a){return e={tag:e,create:r,deps:a,inst:i,next:null},i=qe.updateQueue,i===null&&(i=Hl(),qe.updateQueue=i),r=i.lastEffect,r===null?i.lastEffect=e.next=e:(a=r.next,r.next=e,e.next=a,i.lastEffect=e),e}function w_(){return Xt().memoizedState}function Ul(e,i,r,a){var d=ki();qe.flags|=e,d.memoizedState=ca(1|i,{destroy:void 0},r,a===void 0?null:a)}function Pl(e,i,r,a){var d=Xt();a=a===void 0?null:a;var m=d.memoizedState.inst;gt!==null&&a!==null&&Xu(a,gt.memoizedState.deps)?d.memoizedState=ca(i,m,r,a):(qe.flags|=e,d.memoizedState=ca(1|i,m,r,a))}function E_(e,i){Ul(8390656,8,e,i)}function ah(e,i){Pl(2048,8,e,i)}function Ny(e){qe.flags|=4;var i=qe.updateQueue;if(i===null)i=Hl(),qe.updateQueue=i,i.events=[e];else{var r=i.events;r===null?i.events=[e]:r.push(e)}}function x_(e){var i=Xt().memoizedState;return Ny({ref:i,nextImpl:e}),function(){if((ct&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}function T_(e,i){return Pl(4,2,e,i)}function A_(e,i){return Pl(4,4,e,i)}function R_(e,i){if(typeof i=="function"){e=e();var r=i(e);return function(){typeof r=="function"?r():i(null)}}if(i!=null)return e=e(),i.current=e,function(){i.current=null}}function L_(e,i,r){r=r!=null?r.concat([e]):null,Pl(4,4,R_.bind(null,i,e),r)}function oh(){}function k_(e,i){var r=Xt();i=i===void 0?null:i;var a=r.memoizedState;return i!==null&&Xu(i,a[1])?a[0]:(r.memoizedState=[e,i],e)}function M_(e,i){var r=Xt();i=i===void 0?null:i;var a=r.memoizedState;if(i!==null&&Xu(i,a[1]))return a[0];if(a=e(),xs){Yt(!0);try{e()}finally{Yt(!1)}}return r.memoizedState=[a,i],a}function lh(e,i,r){return r===void 0||(hr&1073741824)!==0&&(et&261930)===0?e.memoizedState=i:(e.memoizedState=r,e=Dg(),qe.lanes|=e,Gr|=e,r)}function D_(e,i,r,a){return Ji(r,i)?r:aa.current!==null?(e=lh(e,r,a),Ji(e,i)||(si=!0),e):(hr&42)===0||(hr&1073741824)!==0&&(et&261930)===0?(si=!0,e.memoizedState=r):(e=Dg(),qe.lanes|=e,Gr|=e,i)}function O_(e,i,r,a,d){var m=Y.p;Y.p=m!==0&&8>m?m:8;var k=j.T,N={};j.T=N,hh(e,!1,i,r);try{var G=d(),re=j.S;if(re!==null&&re(N,G),G!==null&&typeof G=="object"&&typeof G.then=="function"){var ue=ky(G,a);fo(e,i,ue,an(e))}else fo(e,i,a,an(e))}catch(fe){fo(e,i,{then:function(){},status:"rejected",reason:fe},an())}finally{Y.p=m,k!==null&&N.types!==null&&(k.types=N.types),j.T=k}}function Iy(){}function ch(e,i,r,a){if(e.tag!==5)throw Error(o(476));var d=B_(e).queue;O_(e,d,i,K,r===null?Iy:function(){return N_(e),r(a)})}function B_(e){var i=e.memoizedState;if(i!==null)return i;i={memoizedState:K,baseState:K,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:dr,lastRenderedState:K},next:null};var r={};return i.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:dr,lastRenderedState:r},next:null},e.memoizedState=i,e=e.alternate,e!==null&&(e.memoizedState=i),i}function N_(e){var i=B_(e);i.next===null&&(i=e.alternate.memoizedState),fo(e,i.next.queue,{},an())}function uh(){return yi(ko)}function I_(){return Xt().memoizedState}function H_(){return Xt().memoizedState}function Hy(e){for(var i=e.return;i!==null;){switch(i.tag){case 24:case 3:var r=an();e=Ur(r);var a=Pr(i,e,r);a!==null&&(Wi(a,i,r),oo(a,i,r)),i={cache:$u()},e.payload=i;return}i=i.return}}function zy(e,i,r){var a=an();r={lane:a,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},jl(e)?$_(i,r):(r=Ru(e,i,r,a),r!==null&&(Wi(r,e,a),U_(r,i,a)))}function z_(e,i,r){var a=an();fo(e,i,r,a)}function fo(e,i,r,a){var d={lane:a,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(jl(e))$_(i,d);else{var m=e.alternate;if(e.lanes===0&&(m===null||m.lanes===0)&&(m=i.lastRenderedReducer,m!==null))try{var k=i.lastRenderedState,N=m(k,r);if(d.hasEagerState=!0,d.eagerState=N,Ji(N,k))return Cl(e,i,d,0),yt===null&&yl(),!1}catch{}if(r=Ru(e,i,d,a),r!==null)return Wi(r,e,a),U_(r,i,a),!0}return!1}function hh(e,i,r,a){if(a={lane:2,revertLane:Fh(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},jl(e)){if(i)throw Error(o(479))}else i=Ru(e,r,a,2),i!==null&&Wi(i,e,2)}function jl(e){var i=e.alternate;return e===qe||i!==null&&i===qe}function $_(e,i){oa=Nl=!0;var r=e.pending;r===null?i.next=i:(i.next=r.next,r.next=i),e.pending=i}function U_(e,i,r){if((r&4194048)!==0){var a=i.lanes;a&=e.pendingLanes,r|=a,i.lanes=r,He(e,r)}}var po={readContext:yi,use:zl,useCallback:Pt,useContext:Pt,useEffect:Pt,useImperativeHandle:Pt,useLayoutEffect:Pt,useInsertionEffect:Pt,useMemo:Pt,useReducer:Pt,useRef:Pt,useState:Pt,useDebugValue:Pt,useDeferredValue:Pt,useTransition:Pt,useSyncExternalStore:Pt,useId:Pt,useHostTransitionStatus:Pt,useFormState:Pt,useActionState:Pt,useOptimistic:Pt,useMemoCache:Pt,useCacheRefresh:Pt};po.useEffectEvent=Pt;var P_={readContext:yi,use:zl,useCallback:function(e,i){return ki().memoizedState=[e,i===void 0?null:i],e},useContext:yi,useEffect:E_,useImperativeHandle:function(e,i,r){r=r!=null?r.concat([e]):null,Ul(4194308,4,R_.bind(null,i,e),r)},useLayoutEffect:function(e,i){return Ul(4194308,4,e,i)},useInsertionEffect:function(e,i){Ul(4,2,e,i)},useMemo:function(e,i){var r=ki();i=i===void 0?null:i;var a=e();if(xs){Yt(!0);try{e()}finally{Yt(!1)}}return r.memoizedState=[a,i],a},useReducer:function(e,i,r){var a=ki();if(r!==void 0){var d=r(i);if(xs){Yt(!0);try{r(i)}finally{Yt(!1)}}}else d=i;return a.memoizedState=a.baseState=d,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:d},a.queue=e,e=e.dispatch=zy.bind(null,qe,e),[a.memoizedState,e]},useRef:function(e){var i=ki();return e={current:e},i.memoizedState=e},useState:function(e){e=rh(e);var i=e.queue,r=z_.bind(null,qe,i);return i.dispatch=r,[e.memoizedState,r]},useDebugValue:oh,useDeferredValue:function(e,i){var r=ki();return lh(r,e,i)},useTransition:function(){var e=rh(!1);return e=O_.bind(null,qe,e.queue,!0,!1),ki().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,i,r){var a=qe,d=ki();if(nt){if(r===void 0)throw Error(o(407));r=r()}else{if(r=i(),yt===null)throw Error(o(349));(et&127)!==0||l_(a,i,r)}d.memoizedState=r;var m={value:r,getSnapshot:i};return d.queue=m,E_(u_.bind(null,a,m,e),[e]),a.flags|=2048,ca(9,{destroy:void 0},c_.bind(null,a,m,r,i),null),r},useId:function(){var e=ki(),i=yt.identifierPrefix;if(nt){var r=qn,a=Fn;r=(a&~(1<<32-zt(a)-1)).toString(32)+r,i="_"+i+"R_"+r,r=Il++,0<r&&(i+="H"+r.toString(32)),i+="_"}else r=My++,i="_"+i+"r_"+r.toString(32)+"_";return e.memoizedState=i},useHostTransitionStatus:uh,useFormState:b_,useActionState:b_,useOptimistic:function(e){var i=ki();i.memoizedState=i.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=r,i=hh.bind(null,qe,!0,r),r.dispatch=i,[e,i]},useMemoCache:th,useCacheRefresh:function(){return ki().memoizedState=Hy.bind(null,qe)},useEffectEvent:function(e){var i=ki(),r={impl:e};return i.memoizedState=r,function(){if((ct&2)!==0)throw Error(o(440));return r.impl.apply(void 0,arguments)}}},dh={readContext:yi,use:zl,useCallback:k_,useContext:yi,useEffect:ah,useImperativeHandle:L_,useInsertionEffect:T_,useLayoutEffect:A_,useMemo:M_,useReducer:$l,useRef:w_,useState:function(){return $l(dr)},useDebugValue:oh,useDeferredValue:function(e,i){var r=Xt();return D_(r,gt.memoizedState,e,i)},useTransition:function(){var e=$l(dr)[0],i=Xt().memoizedState;return[typeof e=="boolean"?e:ho(e),i]},useSyncExternalStore:o_,useId:I_,useHostTransitionStatus:uh,useFormState:S_,useActionState:S_,useOptimistic:function(e,i){var r=Xt();return f_(r,gt,e,i)},useMemoCache:th,useCacheRefresh:H_};dh.useEffectEvent=x_;var j_={readContext:yi,use:zl,useCallback:k_,useContext:yi,useEffect:ah,useImperativeHandle:L_,useInsertionEffect:T_,useLayoutEffect:A_,useMemo:M_,useReducer:nh,useRef:w_,useState:function(){return nh(dr)},useDebugValue:oh,useDeferredValue:function(e,i){var r=Xt();return gt===null?lh(r,e,i):D_(r,gt.memoizedState,e,i)},useTransition:function(){var e=nh(dr)[0],i=Xt().memoizedState;return[typeof e=="boolean"?e:ho(e),i]},useSyncExternalStore:o_,useId:I_,useHostTransitionStatus:uh,useFormState:C_,useActionState:C_,useOptimistic:function(e,i){var r=Xt();return gt!==null?f_(r,gt,e,i):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:th,useCacheRefresh:H_};j_.useEffectEvent=x_;function fh(e,i,r,a){i=e.memoizedState,r=r(a,i),r=r==null?i:f({},i,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var ph={enqueueSetState:function(e,i,r){e=e._reactInternals;var a=an(),d=Ur(a);d.payload=i,r!=null&&(d.callback=r),i=Pr(e,d,a),i!==null&&(Wi(i,e,a),oo(i,e,a))},enqueueReplaceState:function(e,i,r){e=e._reactInternals;var a=an(),d=Ur(a);d.tag=1,d.payload=i,r!=null&&(d.callback=r),i=Pr(e,d,a),i!==null&&(Wi(i,e,a),oo(i,e,a))},enqueueForceUpdate:function(e,i){e=e._reactInternals;var r=an(),a=Ur(r);a.tag=2,i!=null&&(a.callback=i),i=Pr(e,a,r),i!==null&&(Wi(i,e,r),oo(i,e,r))}};function F_(e,i,r,a,d,m,k){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,m,k):i.prototype&&i.prototype.isPureReactComponent?!Ja(r,a)||!Ja(d,m):!0}function q_(e,i,r,a){e=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(r,a),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(r,a),i.state!==e&&ph.enqueueReplaceState(i,i.state,null)}function Ts(e,i){var r=i;if("ref"in i){r={};for(var a in i)a!=="ref"&&(r[a]=i[a])}if(e=e.defaultProps){r===i&&(r=f({},r));for(var d in e)r[d]===void 0&&(r[d]=e[d])}return r}function W_(e){Sl(e)}function G_(e){console.error(e)}function K_(e){Sl(e)}function Fl(e,i){try{var r=e.onUncaughtError;r(i.value,{componentStack:i.stack})}catch(a){setTimeout(function(){throw a})}}function Y_(e,i,r){try{var a=e.onCaughtError;a(r.value,{componentStack:r.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function _h(e,i,r){return r=Ur(r),r.tag=3,r.payload={element:null},r.callback=function(){Fl(e,i)},r}function V_(e){return e=Ur(e),e.tag=3,e}function X_(e,i,r,a){var d=r.type.getDerivedStateFromError;if(typeof d=="function"){var m=a.value;e.payload=function(){return d(m)},e.callback=function(){Y_(i,r,a)}}var k=r.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(e.callback=function(){Y_(i,r,a),typeof d!="function"&&(Kr===null?Kr=new Set([this]):Kr.add(this));var N=a.stack;this.componentDidCatch(a.value,{componentStack:N!==null?N:""})})}function $y(e,i,r,a,d){if(r.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(i=r.alternate,i!==null&&ta(i,r,d,!0),r=tn.current,r!==null){switch(r.tag){case 31:case 13:return mn===null?tc():r.alternate===null&&jt===0&&(jt=3),r.flags&=-257,r.flags|=65536,r.lanes=d,a===kl?r.flags|=16384:(i=r.updateQueue,i===null?r.updateQueue=new Set([a]):i.add(a),Uh(e,a,d)),!1;case 22:return r.flags|=65536,a===kl?r.flags|=16384:(i=r.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([a])},r.updateQueue=i):(r=i.retryQueue,r===null?i.retryQueue=new Set([a]):r.add(a)),Uh(e,a,d)),!1}throw Error(o(435,r.tag))}return Uh(e,a,d),tc(),!1}if(nt)return i=tn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=d,a!==Bu&&(e=Error(o(422),{cause:a}),io(fn(e,r)))):(a!==Bu&&(i=Error(o(423),{cause:a}),io(fn(i,r))),e=e.current.alternate,e.flags|=65536,d&=-d,e.lanes|=d,a=fn(a,r),d=_h(e.stateNode,a,d),Wu(e,d),jt!==4&&(jt=2)),!1;var m=Error(o(520),{cause:a});if(m=fn(m,r),Co===null?Co=[m]:Co.push(m),jt!==4&&(jt=2),i===null)return!0;a=fn(a,r),r=i;do{switch(r.tag){case 3:return r.flags|=65536,e=d&-d,r.lanes|=e,e=_h(r.stateNode,a,e),Wu(r,e),!1;case 1:if(i=r.type,m=r.stateNode,(r.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Kr===null||!Kr.has(m))))return r.flags|=65536,d&=-d,r.lanes|=d,d=V_(d),X_(d,e,r,a),Wu(r,d),!1}r=r.return}while(r!==null);return!1}var gh=Error(o(461)),si=!1;function Ci(e,i,r,a){i.child=e===null?e_(i,null,r,a):Es(i,e.child,r,a)}function Z_(e,i,r,a,d){r=r.render;var m=i.ref;if("ref"in a){var k={};for(var N in a)N!=="ref"&&(k[N]=a[N])}else k=a;return Ss(i),a=Zu(e,i,r,k,m,d),N=Qu(),e!==null&&!si?(Ju(e,i,d),fr(e,i,d)):(nt&&N&&Du(i),i.flags|=1,Ci(e,i,a,d),i.child)}function Q_(e,i,r,a,d){if(e===null){var m=r.type;return typeof m=="function"&&!Lu(m)&&m.defaultProps===void 0&&r.compare===null?(i.tag=15,i.type=m,J_(e,i,m,a,d)):(e=El(r.type,null,a,i,i.mode,d),e.ref=i.ref,e.return=i,i.child=e)}if(m=e.child,!Eh(e,d)){var k=m.memoizedProps;if(r=r.compare,r=r!==null?r:Ja,r(k,a)&&e.ref===i.ref)return fr(e,i,d)}return i.flags|=1,e=or(m,a),e.ref=i.ref,e.return=i,i.child=e}function J_(e,i,r,a,d){if(e!==null){var m=e.memoizedProps;if(Ja(m,a)&&e.ref===i.ref)if(si=!1,i.pendingProps=a=m,Eh(e,d))(e.flags&131072)!==0&&(si=!0);else return i.lanes=e.lanes,fr(e,i,d)}return mh(e,i,r,a,d)}function eg(e,i,r,a){var d=a.children,m=e!==null?e.memoizedState:null;if(e===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((i.flags&128)!==0){if(m=m!==null?m.baseLanes|r:r,e!==null){for(a=i.child=e.child,d=0;a!==null;)d=d|a.lanes|a.childLanes,a=a.sibling;a=d&~m}else a=0,i.child=null;return tg(e,i,m,r,a)}if((r&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},e!==null&&Rl(i,m!==null?m.cachePool:null),m!==null?n_(i,m):Ku(),r_(i);else return a=i.lanes=536870912,tg(e,i,m!==null?m.baseLanes|r:r,r,a)}else m!==null?(Rl(i,m.cachePool),n_(i,m),Fr(),i.memoizedState=null):(e!==null&&Rl(i,null),Ku(),Fr());return Ci(e,i,d,r),i.child}function _o(e,i){return e!==null&&e.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function tg(e,i,r,a,d){var m=Pu();return m=m===null?null:{parent:ni._currentValue,pool:m},i.memoizedState={baseLanes:r,cachePool:m},e!==null&&Rl(i,null),Ku(),r_(i),e!==null&&ta(e,i,a,!0),i.childLanes=d,null}function ql(e,i){return i=Gl({mode:i.mode,children:i.children},e.mode),i.ref=e.ref,e.child=i,i.return=e,i}function ig(e,i,r){return Es(i,e.child,null,r),e=ql(i,i.pendingProps),e.flags|=2,nn(i),i.memoizedState=null,e}function Uy(e,i,r){var a=i.pendingProps,d=(i.flags&128)!==0;if(i.flags&=-129,e===null){if(nt){if(a.mode==="hidden")return e=ql(i,a),i.lanes=536870912,_o(null,e);if(Vu(i),(e=At)?(e=pm(e,gn),e=e!==null&&e.data==="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:Nr!==null?{id:Fn,overflow:qn}:null,retryLane:536870912,hydrationErrors:null},r=$p(e),r.return=i,i.child=r,Si=i,At=null)):e=null,e===null)throw Hr(i);return i.lanes=536870912,null}return ql(i,a)}var m=e.memoizedState;if(m!==null){var k=m.dehydrated;if(Vu(i),d)if(i.flags&256)i.flags&=-257,i=ig(e,i,r);else if(i.memoizedState!==null)i.child=e.child,i.flags|=128,i=null;else throw Error(o(558));else if(si||ta(e,i,r,!1),d=(r&e.childLanes)!==0,si||d){if(a=yt,a!==null&&(k=Bt(a,r),k!==0&&k!==m.retryLane))throw m.retryLane=k,gs(e,k),Wi(a,e,k),gh;tc(),i=ig(e,i,r)}else e=m.treeContext,At=vn(k.nextSibling),Si=i,nt=!0,Ir=null,gn=!1,e!==null&&jp(i,e),i=ql(i,a),i.flags|=4096;return i}return e=or(e.child,{mode:a.mode,children:a.children}),e.ref=i.ref,i.child=e,e.return=i,e}function Wl(e,i){var r=i.ref;if(r===null)e!==null&&e.ref!==null&&(i.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(o(284));(e===null||e.ref!==r)&&(i.flags|=4194816)}}function mh(e,i,r,a,d){return Ss(i),r=Zu(e,i,r,a,void 0,d),a=Qu(),e!==null&&!si?(Ju(e,i,d),fr(e,i,d)):(nt&&a&&Du(i),i.flags|=1,Ci(e,i,r,d),i.child)}function ng(e,i,r,a,d,m){return Ss(i),i.updateQueue=null,r=a_(i,a,r,d),s_(e),a=Qu(),e!==null&&!si?(Ju(e,i,m),fr(e,i,m)):(nt&&a&&Du(i),i.flags|=1,Ci(e,i,r,m),i.child)}function rg(e,i,r,a,d){if(Ss(i),i.stateNode===null){var m=Zs,k=r.contextType;typeof k=="object"&&k!==null&&(m=yi(k)),m=new r(a,m),i.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=ph,i.stateNode=m,m._reactInternals=i,m=i.stateNode,m.props=a,m.state=i.memoizedState,m.refs={},Fu(i),k=r.contextType,m.context=typeof k=="object"&&k!==null?yi(k):Zs,m.state=i.memoizedState,k=r.getDerivedStateFromProps,typeof k=="function"&&(fh(i,r,k,a),m.state=i.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(k=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),k!==m.state&&ph.enqueueReplaceState(m,m.state,null),co(i,a,m,d),lo(),m.state=i.memoizedState),typeof m.componentDidMount=="function"&&(i.flags|=4194308),a=!0}else if(e===null){m=i.stateNode;var N=i.memoizedProps,G=Ts(r,N);m.props=G;var re=m.context,ue=r.contextType;k=Zs,typeof ue=="object"&&ue!==null&&(k=yi(ue));var fe=r.getDerivedStateFromProps;ue=typeof fe=="function"||typeof m.getSnapshotBeforeUpdate=="function",N=i.pendingProps!==N,ue||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(N||re!==k)&&q_(i,m,a,k),$r=!1;var se=i.memoizedState;m.state=se,co(i,a,m,d),lo(),re=i.memoizedState,N||se!==re||$r?(typeof fe=="function"&&(fh(i,r,fe,a),re=i.memoizedState),(G=$r||F_(i,r,G,a,se,re,k))?(ue||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(i.flags|=4194308)):(typeof m.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=a,i.memoizedState=re),m.props=a,m.state=re,m.context=k,a=G):(typeof m.componentDidMount=="function"&&(i.flags|=4194308),a=!1)}else{m=i.stateNode,qu(e,i),k=i.memoizedProps,ue=Ts(r,k),m.props=ue,fe=i.pendingProps,se=m.context,re=r.contextType,G=Zs,typeof re=="object"&&re!==null&&(G=yi(re)),N=r.getDerivedStateFromProps,(re=typeof N=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(k!==fe||se!==G)&&q_(i,m,a,G),$r=!1,se=i.memoizedState,m.state=se,co(i,a,m,d),lo();var le=i.memoizedState;k!==fe||se!==le||$r||e!==null&&e.dependencies!==null&&Tl(e.dependencies)?(typeof N=="function"&&(fh(i,r,N,a),le=i.memoizedState),(ue=$r||F_(i,r,ue,a,se,le,G)||e!==null&&e.dependencies!==null&&Tl(e.dependencies))?(re||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(a,le,G),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(a,le,G)),typeof m.componentDidUpdate=="function"&&(i.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof m.componentDidUpdate!="function"||k===e.memoizedProps&&se===e.memoizedState||(i.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||k===e.memoizedProps&&se===e.memoizedState||(i.flags|=1024),i.memoizedProps=a,i.memoizedState=le),m.props=a,m.state=le,m.context=G,a=ue):(typeof m.componentDidUpdate!="function"||k===e.memoizedProps&&se===e.memoizedState||(i.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||k===e.memoizedProps&&se===e.memoizedState||(i.flags|=1024),a=!1)}return m=a,Wl(e,i),a=(i.flags&128)!==0,m||a?(m=i.stateNode,r=a&&typeof r.getDerivedStateFromError!="function"?null:m.render(),i.flags|=1,e!==null&&a?(i.child=Es(i,e.child,null,d),i.child=Es(i,null,r,d)):Ci(e,i,r,d),i.memoizedState=m.state,e=i.child):e=fr(e,i,d),e}function sg(e,i,r,a){return vs(),i.flags|=256,Ci(e,i,r,a),i.child}var vh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bh(e){return{baseLanes:e,cachePool:Yp()}}function Sh(e,i,r){return e=e!==null?e.childLanes&~r:0,i&&(e|=sn),e}function ag(e,i,r){var a=i.pendingProps,d=!1,m=(i.flags&128)!==0,k;if((k=m)||(k=e!==null&&e.memoizedState===null?!1:(Vt.current&2)!==0),k&&(d=!0,i.flags&=-129),k=(i.flags&32)!==0,i.flags&=-33,e===null){if(nt){if(d?jr(i):Fr(),(e=At)?(e=pm(e,gn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:Nr!==null?{id:Fn,overflow:qn}:null,retryLane:536870912,hydrationErrors:null},r=$p(e),r.return=i,i.child=r,Si=i,At=null)):e=null,e===null)throw Hr(i);return id(e)?i.lanes=32:i.lanes=536870912,null}var N=a.children;return a=a.fallback,d?(Fr(),d=i.mode,N=Gl({mode:"hidden",children:N},d),a=ms(a,d,r,null),N.return=i,a.return=i,N.sibling=a,i.child=N,a=i.child,a.memoizedState=bh(r),a.childLanes=Sh(e,k,r),i.memoizedState=vh,_o(null,a)):(jr(i),yh(i,N))}var G=e.memoizedState;if(G!==null&&(N=G.dehydrated,N!==null)){if(m)i.flags&256?(jr(i),i.flags&=-257,i=Ch(e,i,r)):i.memoizedState!==null?(Fr(),i.child=e.child,i.flags|=128,i=null):(Fr(),N=a.fallback,d=i.mode,a=Gl({mode:"visible",children:a.children},d),N=ms(N,d,r,null),N.flags|=2,a.return=i,N.return=i,a.sibling=N,i.child=a,Es(i,e.child,null,r),a=i.child,a.memoizedState=bh(r),a.childLanes=Sh(e,k,r),i.memoizedState=vh,i=_o(null,a));else if(jr(i),id(N)){if(k=N.nextSibling&&N.nextSibling.dataset,k)var re=k.dgst;k=re,a=Error(o(419)),a.stack="",a.digest=k,io({value:a,source:null,stack:null}),i=Ch(e,i,r)}else if(si||ta(e,i,r,!1),k=(r&e.childLanes)!==0,si||k){if(k=yt,k!==null&&(a=Bt(k,r),a!==0&&a!==G.retryLane))throw G.retryLane=a,gs(e,a),Wi(k,e,a),gh;td(N)||tc(),i=Ch(e,i,r)}else td(N)?(i.flags|=192,i.child=e.child,i=null):(e=G.treeContext,At=vn(N.nextSibling),Si=i,nt=!0,Ir=null,gn=!1,e!==null&&jp(i,e),i=yh(i,a.children),i.flags|=4096);return i}return d?(Fr(),N=a.fallback,d=i.mode,G=e.child,re=G.sibling,a=or(G,{mode:"hidden",children:a.children}),a.subtreeFlags=G.subtreeFlags&65011712,re!==null?N=or(re,N):(N=ms(N,d,r,null),N.flags|=2),N.return=i,a.return=i,a.sibling=N,i.child=a,_o(null,a),a=i.child,N=e.child.memoizedState,N===null?N=bh(r):(d=N.cachePool,d!==null?(G=ni._currentValue,d=d.parent!==G?{parent:G,pool:G}:d):d=Yp(),N={baseLanes:N.baseLanes|r,cachePool:d}),a.memoizedState=N,a.childLanes=Sh(e,k,r),i.memoizedState=vh,_o(e.child,a)):(jr(i),r=e.child,e=r.sibling,r=or(r,{mode:"visible",children:a.children}),r.return=i,r.sibling=null,e!==null&&(k=i.deletions,k===null?(i.deletions=[e],i.flags|=16):k.push(e)),i.child=r,i.memoizedState=null,r)}function yh(e,i){return i=Gl({mode:"visible",children:i},e.mode),i.return=e,e.child=i}function Gl(e,i){return e=en(22,e,null,i),e.lanes=0,e}function Ch(e,i,r){return Es(i,e.child,null,r),e=yh(i,i.pendingProps.children),e.flags|=2,i.memoizedState=null,e}function og(e,i,r){e.lanes|=i;var a=e.alternate;a!==null&&(a.lanes|=i),Hu(e.return,i,r)}function wh(e,i,r,a,d,m){var k=e.memoizedState;k===null?e.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:a,tail:r,tailMode:d,treeForkCount:m}:(k.isBackwards=i,k.rendering=null,k.renderingStartTime=0,k.last=a,k.tail=r,k.tailMode=d,k.treeForkCount=m)}function lg(e,i,r){var a=i.pendingProps,d=a.revealOrder,m=a.tail;a=a.children;var k=Vt.current,N=(k&2)!==0;if(N?(k=k&1|2,i.flags|=128):k&=1,V(Vt,k),Ci(e,i,a,r),a=nt?to:0,!N&&e!==null&&(e.flags&128)!==0)e:for(e=i.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&og(e,r,i);else if(e.tag===19)og(e,r,i);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===i)break e;for(;e.sibling===null;){if(e.return===null||e.return===i)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(d){case"forwards":for(r=i.child,d=null;r!==null;)e=r.alternate,e!==null&&Bl(e)===null&&(d=r),r=r.sibling;r=d,r===null?(d=i.child,i.child=null):(d=r.sibling,r.sibling=null),wh(i,!1,d,r,m,a);break;case"backwards":case"unstable_legacy-backwards":for(r=null,d=i.child,i.child=null;d!==null;){if(e=d.alternate,e!==null&&Bl(e)===null){i.child=d;break}e=d.sibling,d.sibling=r,r=d,d=e}wh(i,!0,r,null,m,a);break;case"together":wh(i,!1,null,null,void 0,a);break;default:i.memoizedState=null}return i.child}function fr(e,i,r){if(e!==null&&(i.dependencies=e.dependencies),Gr|=i.lanes,(r&i.childLanes)===0)if(e!==null){if(ta(e,i,r,!1),(r&i.childLanes)===0)return null}else return null;if(e!==null&&i.child!==e.child)throw Error(o(153));if(i.child!==null){for(e=i.child,r=or(e,e.pendingProps),i.child=r,r.return=i;e.sibling!==null;)e=e.sibling,r=r.sibling=or(e,e.pendingProps),r.return=i;r.sibling=null}return i.child}function Eh(e,i){return(e.lanes&i)!==0?!0:(e=e.dependencies,!!(e!==null&&Tl(e)))}function Py(e,i,r){switch(i.tag){case 3:$(i,i.stateNode.containerInfo),zr(i,ni,e.memoizedState.cache),vs();break;case 27:case 5:_e(i);break;case 4:$(i,i.stateNode.containerInfo);break;case 10:zr(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Vu(i),null;break;case 13:var a=i.memoizedState;if(a!==null)return a.dehydrated!==null?(jr(i),i.flags|=128,null):(r&i.child.childLanes)!==0?ag(e,i,r):(jr(i),e=fr(e,i,r),e!==null?e.sibling:null);jr(i);break;case 19:var d=(e.flags&128)!==0;if(a=(r&i.childLanes)!==0,a||(ta(e,i,r,!1),a=(r&i.childLanes)!==0),d){if(a)return lg(e,i,r);i.flags|=128}if(d=i.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),V(Vt,Vt.current),a)break;return null;case 22:return i.lanes=0,eg(e,i,r,i.pendingProps);case 24:zr(i,ni,e.memoizedState.cache)}return fr(e,i,r)}function cg(e,i,r){if(e!==null)if(e.memoizedProps!==i.pendingProps)si=!0;else{if(!Eh(e,r)&&(i.flags&128)===0)return si=!1,Py(e,i,r);si=(e.flags&131072)!==0}else si=!1,nt&&(i.flags&1048576)!==0&&Pp(i,to,i.index);switch(i.lanes=0,i.tag){case 16:e:{var a=i.pendingProps;if(e=Cs(i.elementType),i.type=e,typeof e=="function")Lu(e)?(a=Ts(e,a),i.tag=1,i=rg(null,i,e,a,r)):(i.tag=0,i=mh(null,i,e,a,r));else{if(e!=null){var d=e.$$typeof;if(d===w){i.tag=11,i=Z_(null,i,e,a,r);break e}else if(d===D){i.tag=14,i=Q_(null,i,e,a,r);break e}}throw i=Z(e)||e,Error(o(306,i,""))}}return i;case 0:return mh(e,i,i.type,i.pendingProps,r);case 1:return a=i.type,d=Ts(a,i.pendingProps),rg(e,i,a,d,r);case 3:e:{if($(i,i.stateNode.containerInfo),e===null)throw Error(o(387));a=i.pendingProps;var m=i.memoizedState;d=m.element,qu(e,i),co(i,a,null,r);var k=i.memoizedState;if(a=k.cache,zr(i,ni,a),a!==m.cache&&zu(i,[ni],r,!0),lo(),a=k.element,m.isDehydrated)if(m={element:a,isDehydrated:!1,cache:k.cache},i.updateQueue.baseState=m,i.memoizedState=m,i.flags&256){i=sg(e,i,a,r);break e}else if(a!==d){d=fn(Error(o(424)),i),io(d),i=sg(e,i,a,r);break e}else for(e=i.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,At=vn(e.firstChild),Si=i,nt=!0,Ir=null,gn=!0,r=e_(i,null,a,r),i.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(vs(),a===d){i=fr(e,i,r);break e}Ci(e,i,a,r)}i=i.child}return i;case 26:return Wl(e,i),e===null?(r=Sm(i.type,null,i.pendingProps,null))?i.memoizedState=r:nt||(r=i.type,e=i.pendingProps,a=lc(me.current).createElement(r),a[xt]=i,a[wt]=e,wi(a,r,e),Ye(a),i.stateNode=a):i.memoizedState=Sm(i.type,e.memoizedProps,i.pendingProps,e.memoizedState),null;case 27:return _e(i),e===null&&nt&&(a=i.stateNode=mm(i.type,i.pendingProps,me.current),Si=i,gn=!0,d=At,Zr(i.type)?(nd=d,At=vn(a.firstChild)):At=d),Ci(e,i,i.pendingProps.children,r),Wl(e,i),e===null&&(i.flags|=4194304),i.child;case 5:return e===null&&nt&&((d=a=At)&&(a=m1(a,i.type,i.pendingProps,gn),a!==null?(i.stateNode=a,Si=i,At=vn(a.firstChild),gn=!1,d=!0):d=!1),d||Hr(i)),_e(i),d=i.type,m=i.pendingProps,k=e!==null?e.memoizedProps:null,a=m.children,Qh(d,m)?a=null:k!==null&&Qh(d,k)&&(i.flags|=32),i.memoizedState!==null&&(d=Zu(e,i,Dy,null,null,r),ko._currentValue=d),Wl(e,i),Ci(e,i,a,r),i.child;case 6:return e===null&&nt&&((e=r=At)&&(r=v1(r,i.pendingProps,gn),r!==null?(i.stateNode=r,Si=i,At=null,e=!0):e=!1),e||Hr(i)),null;case 13:return ag(e,i,r);case 4:return $(i,i.stateNode.containerInfo),a=i.pendingProps,e===null?i.child=Es(i,null,a,r):Ci(e,i,a,r),i.child;case 11:return Z_(e,i,i.type,i.pendingProps,r);case 7:return Ci(e,i,i.pendingProps,r),i.child;case 8:return Ci(e,i,i.pendingProps.children,r),i.child;case 12:return Ci(e,i,i.pendingProps.children,r),i.child;case 10:return a=i.pendingProps,zr(i,i.type,a.value),Ci(e,i,a.children,r),i.child;case 9:return d=i.type._context,a=i.pendingProps.children,Ss(i),d=yi(d),a=a(d),i.flags|=1,Ci(e,i,a,r),i.child;case 14:return Q_(e,i,i.type,i.pendingProps,r);case 15:return J_(e,i,i.type,i.pendingProps,r);case 19:return lg(e,i,r);case 31:return Uy(e,i,r);case 22:return eg(e,i,r,i.pendingProps);case 24:return Ss(i),a=yi(ni),e===null?(d=Pu(),d===null&&(d=yt,m=$u(),d.pooledCache=m,m.refCount++,m!==null&&(d.pooledCacheLanes|=r),d=m),i.memoizedState={parent:a,cache:d},Fu(i),zr(i,ni,d)):((e.lanes&r)!==0&&(qu(e,i),co(i,null,null,r),lo()),d=e.memoizedState,m=i.memoizedState,d.parent!==a?(d={parent:a,cache:a},i.memoizedState=d,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=d),zr(i,ni,a)):(a=m.cache,zr(i,ni,a),a!==d.cache&&zu(i,[ni],r,!0))),Ci(e,i,i.pendingProps.children,r),i.child;case 29:throw i.pendingProps}throw Error(o(156,i.tag))}function pr(e){e.flags|=4}function xh(e,i,r,a,d){if((i=(e.mode&32)!==0)&&(i=!1),i){if(e.flags|=16777216,(d&335544128)===d)if(e.stateNode.complete)e.flags|=8192;else if(Ig())e.flags|=8192;else throw ws=kl,ju}else e.flags&=-16777217}function ug(e,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!xm(i))if(Ig())e.flags|=8192;else throw ws=kl,ju}function Kl(e,i){i!==null&&(e.flags|=4),e.flags&16384&&(i=e.tag!==22?Ie():536870912,e.lanes|=i,fa|=i)}function go(e,i){if(!nt)switch(e.tailMode){case"hidden":i=e.tail;for(var r=null;i!==null;)i.alternate!==null&&(r=i),i=i.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?i||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Rt(e){var i=e.alternate!==null&&e.alternate.child===e.child,r=0,a=0;if(i)for(var d=e.child;d!==null;)r|=d.lanes|d.childLanes,a|=d.subtreeFlags&65011712,a|=d.flags&65011712,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)r|=d.lanes|d.childLanes,a|=d.subtreeFlags,a|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=a,e.childLanes=r,i}function jy(e,i,r){var a=i.pendingProps;switch(Ou(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Rt(i),null;case 1:return Rt(i),null;case 3:return r=i.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),i.memoizedState.cache!==a&&(i.flags|=2048),ur(ni),oe(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ea(i)?pr(i):e===null||e.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Nu())),Rt(i),null;case 26:var d=i.type,m=i.memoizedState;return e===null?(pr(i),m!==null?(Rt(i),ug(i,m)):(Rt(i),xh(i,d,null,a,r))):m?m!==e.memoizedState?(pr(i),Rt(i),ug(i,m)):(Rt(i),i.flags&=-16777217):(e=e.memoizedProps,e!==a&&pr(i),Rt(i),xh(i,d,e,a,r)),null;case 27:if(Se(i),r=me.current,d=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==a&&pr(i);else{if(!a){if(i.stateNode===null)throw Error(o(166));return Rt(i),null}e=ae.current,ea(i)?Fp(i):(e=mm(d,a,r),i.stateNode=e,pr(i))}return Rt(i),null;case 5:if(Se(i),d=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==a&&pr(i);else{if(!a){if(i.stateNode===null)throw Error(o(166));return Rt(i),null}if(m=ae.current,ea(i))Fp(i);else{var k=lc(me.current);switch(m){case 1:m=k.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:m=k.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":m=k.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":m=k.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":m=k.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof a.is=="string"?k.createElement("select",{is:a.is}):k.createElement("select"),a.multiple?m.multiple=!0:a.size&&(m.size=a.size);break;default:m=typeof a.is=="string"?k.createElement(d,{is:a.is}):k.createElement(d)}}m[xt]=i,m[wt]=a;e:for(k=i.child;k!==null;){if(k.tag===5||k.tag===6)m.appendChild(k.stateNode);else if(k.tag!==4&&k.tag!==27&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===i)break e;for(;k.sibling===null;){if(k.return===null||k.return===i)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}i.stateNode=m;e:switch(wi(m,d,a),d){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&pr(i)}}return Rt(i),xh(i,i.type,e===null?null:e.memoizedProps,i.pendingProps,r),null;case 6:if(e&&i.stateNode!=null)e.memoizedProps!==a&&pr(i);else{if(typeof a!="string"&&i.stateNode===null)throw Error(o(166));if(e=me.current,ea(i)){if(e=i.stateNode,r=i.memoizedProps,a=null,d=Si,d!==null)switch(d.tag){case 27:case 5:a=d.memoizedProps}e[xt]=i,e=!!(e.nodeValue===r||a!==null&&a.suppressHydrationWarning===!0||am(e.nodeValue,r)),e||Hr(i,!0)}else e=lc(e).createTextNode(a),e[xt]=i,i.stateNode=e}return Rt(i),null;case 31:if(r=i.memoizedState,e===null||e.memoizedState!==null){if(a=ea(i),r!==null){if(e===null){if(!a)throw Error(o(318));if(e=i.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[xt]=i}else vs(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Rt(i),e=!1}else r=Nu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return i.flags&256?(nn(i),i):(nn(i),null);if((i.flags&128)!==0)throw Error(o(558))}return Rt(i),null;case 13:if(a=i.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(d=ea(i),a!==null&&a.dehydrated!==null){if(e===null){if(!d)throw Error(o(318));if(d=i.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(o(317));d[xt]=i}else vs(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Rt(i),d=!1}else d=Nu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=d),d=!0;if(!d)return i.flags&256?(nn(i),i):(nn(i),null)}return nn(i),(i.flags&128)!==0?(i.lanes=r,i):(r=a!==null,e=e!==null&&e.memoizedState!==null,r&&(a=i.child,d=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(d=a.alternate.memoizedState.cachePool.pool),m=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(m=a.memoizedState.cachePool.pool),m!==d&&(a.flags|=2048)),r!==e&&r&&(i.child.flags|=8192),Kl(i,i.updateQueue),Rt(i),null);case 4:return oe(),e===null&&Kh(i.stateNode.containerInfo),Rt(i),null;case 10:return ur(i.type),Rt(i),null;case 19:if(U(Vt),a=i.memoizedState,a===null)return Rt(i),null;if(d=(i.flags&128)!==0,m=a.rendering,m===null)if(d)go(a,!1);else{if(jt!==0||e!==null&&(e.flags&128)!==0)for(e=i.child;e!==null;){if(m=Bl(e),m!==null){for(i.flags|=128,go(a,!1),e=m.updateQueue,i.updateQueue=e,Kl(i,e),i.subtreeFlags=0,e=r,r=i.child;r!==null;)zp(r,e),r=r.sibling;return V(Vt,Vt.current&1|2),nt&&lr(i,a.treeForkCount),i.child}e=e.sibling}a.tail!==null&<()>Ql&&(i.flags|=128,d=!0,go(a,!1),i.lanes=4194304)}else{if(!d)if(e=Bl(m),e!==null){if(i.flags|=128,d=!0,e=e.updateQueue,i.updateQueue=e,Kl(i,e),go(a,!0),a.tail===null&&a.tailMode==="hidden"&&!m.alternate&&!nt)return Rt(i),null}else 2*lt()-a.renderingStartTime>Ql&&r!==536870912&&(i.flags|=128,d=!0,go(a,!1),i.lanes=4194304);a.isBackwards?(m.sibling=i.child,i.child=m):(e=a.last,e!==null?e.sibling=m:i.child=m,a.last=m)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=lt(),e.sibling=null,r=Vt.current,V(Vt,d?r&1|2:r&1),nt&&lr(i,a.treeForkCount),e):(Rt(i),null);case 22:case 23:return nn(i),Yu(),a=i.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(i.flags|=8192):a&&(i.flags|=8192),a?(r&536870912)!==0&&(i.flags&128)===0&&(Rt(i),i.subtreeFlags&6&&(i.flags|=8192)):Rt(i),r=i.updateQueue,r!==null&&Kl(i,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),a=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(a=i.memoizedState.cachePool.pool),a!==r&&(i.flags|=2048),e!==null&&U(ys),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),i.memoizedState.cache!==r&&(i.flags|=2048),ur(ni),Rt(i),null;case 25:return null;case 30:return null}throw Error(o(156,i.tag))}function Fy(e,i){switch(Ou(i),i.tag){case 1:return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 3:return ur(ni),oe(),e=i.flags,(e&65536)!==0&&(e&128)===0?(i.flags=e&-65537|128,i):null;case 26:case 27:case 5:return Se(i),null;case 31:if(i.memoizedState!==null){if(nn(i),i.alternate===null)throw Error(o(340));vs()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 13:if(nn(i),e=i.memoizedState,e!==null&&e.dehydrated!==null){if(i.alternate===null)throw Error(o(340));vs()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 19:return U(Vt),null;case 4:return oe(),null;case 10:return ur(i.type),null;case 22:case 23:return nn(i),Yu(),e!==null&&U(ys),e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 24:return ur(ni),null;case 25:return null;default:return null}}function hg(e,i){switch(Ou(i),i.tag){case 3:ur(ni),oe();break;case 26:case 27:case 5:Se(i);break;case 4:oe();break;case 31:i.memoizedState!==null&&nn(i);break;case 13:nn(i);break;case 19:U(Vt);break;case 10:ur(i.type);break;case 22:case 23:nn(i),Yu(),e!==null&&U(ys);break;case 24:ur(ni)}}function mo(e,i){try{var r=i.updateQueue,a=r!==null?r.lastEffect:null;if(a!==null){var d=a.next;r=d;do{if((r.tag&e)===e){a=void 0;var m=r.create,k=r.inst;a=m(),k.destroy=a}r=r.next}while(r!==d)}}catch(N){_t(i,i.return,N)}}function qr(e,i,r){try{var a=i.updateQueue,d=a!==null?a.lastEffect:null;if(d!==null){var m=d.next;a=m;do{if((a.tag&e)===e){var k=a.inst,N=k.destroy;if(N!==void 0){k.destroy=void 0,d=i;var G=r,re=N;try{re()}catch(ue){_t(d,G,ue)}}}a=a.next}while(a!==m)}}catch(ue){_t(i,i.return,ue)}}function dg(e){var i=e.updateQueue;if(i!==null){var r=e.stateNode;try{i_(i,r)}catch(a){_t(e,e.return,a)}}}function fg(e,i,r){r.props=Ts(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(a){_t(e,i,a)}}function vo(e,i){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof r=="function"?e.refCleanup=r(a):r.current=a}}catch(d){_t(e,i,d)}}function Wn(e,i){var r=e.ref,a=e.refCleanup;if(r!==null)if(typeof a=="function")try{a()}catch(d){_t(e,i,d)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(d){_t(e,i,d)}else r.current=null}function pg(e){var i=e.type,r=e.memoizedProps,a=e.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":r.autoFocus&&a.focus();break e;case"img":r.src?a.src=r.src:r.srcSet&&(a.srcset=r.srcSet)}}catch(d){_t(e,e.return,d)}}function Th(e,i,r){try{var a=e.stateNode;h1(a,e.type,r,i),a[wt]=i}catch(d){_t(e,e.return,d)}}function _g(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zr(e.type)||e.tag===4}function Ah(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||_g(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zr(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Rh(e,i,r){var a=e.tag;if(a===5||a===6)e=e.stateNode,i?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,i):(i=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,i.appendChild(e),r=r._reactRootContainer,r!=null||i.onclick!==null||(i.onclick=ye));else if(a!==4&&(a===27&&Zr(e.type)&&(r=e.stateNode,i=null),e=e.child,e!==null))for(Rh(e,i,r),e=e.sibling;e!==null;)Rh(e,i,r),e=e.sibling}function Yl(e,i,r){var a=e.tag;if(a===5||a===6)e=e.stateNode,i?r.insertBefore(e,i):r.appendChild(e);else if(a!==4&&(a===27&&Zr(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(Yl(e,i,r),e=e.sibling;e!==null;)Yl(e,i,r),e=e.sibling}function gg(e){var i=e.stateNode,r=e.memoizedProps;try{for(var a=e.type,d=i.attributes;d.length;)i.removeAttributeNode(d[0]);wi(i,a,r),i[xt]=e,i[wt]=r}catch(m){_t(e,e.return,m)}}var _r=!1,ai=!1,Lh=!1,mg=typeof WeakSet=="function"?WeakSet:Set,hi=null;function qy(e,i){if(e=e.containerInfo,Xh=_c,e=Lp(e),Cu(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var a=r.getSelection&&r.getSelection();if(a&&a.rangeCount!==0){r=a.anchorNode;var d=a.anchorOffset,m=a.focusNode;a=a.focusOffset;try{r.nodeType,m.nodeType}catch{r=null;break e}var k=0,N=-1,G=-1,re=0,ue=0,fe=e,se=null;t:for(;;){for(var le;fe!==r||d!==0&&fe.nodeType!==3||(N=k+d),fe!==m||a!==0&&fe.nodeType!==3||(G=k+a),fe.nodeType===3&&(k+=fe.nodeValue.length),(le=fe.firstChild)!==null;)se=fe,fe=le;for(;;){if(fe===e)break t;if(se===r&&++re===d&&(N=k),se===m&&++ue===a&&(G=k),(le=fe.nextSibling)!==null)break;fe=se,se=fe.parentNode}fe=le}r=N===-1||G===-1?null:{start:N,end:G}}else r=null}r=r||{start:0,end:0}}else r=null;for(Zh={focusedElem:e,selectionRange:r},_c=!1,hi=i;hi!==null;)if(i=hi,e=i.child,(i.subtreeFlags&1028)!==0&&e!==null)e.return=i,hi=e;else for(;hi!==null;){switch(i=hi,m=i.alternate,e=i.flags,i.tag){case 0:if((e&4)!==0&&(e=i.updateQueue,e=e!==null?e.events:null,e!==null))for(r=0;r<e.length;r++)d=e[r],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&m!==null){e=void 0,r=i,d=m.memoizedProps,m=m.memoizedState,a=r.stateNode;try{var xe=Ts(r.type,d);e=a.getSnapshotBeforeUpdate(xe,m),a.__reactInternalSnapshotBeforeUpdate=e}catch(ze){_t(r,r.return,ze)}}break;case 3:if((e&1024)!==0){if(e=i.stateNode.containerInfo,r=e.nodeType,r===9)ed(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ed(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=i.sibling,e!==null){e.return=i.return,hi=e;break}hi=i.return}}function vg(e,i,r){var a=r.flags;switch(r.tag){case 0:case 11:case 15:mr(e,r),a&4&&mo(5,r);break;case 1:if(mr(e,r),a&4)if(e=r.stateNode,i===null)try{e.componentDidMount()}catch(k){_t(r,r.return,k)}else{var d=Ts(r.type,i.memoizedProps);i=i.memoizedState;try{e.componentDidUpdate(d,i,e.__reactInternalSnapshotBeforeUpdate)}catch(k){_t(r,r.return,k)}}a&64&&dg(r),a&512&&vo(r,r.return);break;case 3:if(mr(e,r),a&64&&(e=r.updateQueue,e!==null)){if(i=null,r.child!==null)switch(r.child.tag){case 27:case 5:i=r.child.stateNode;break;case 1:i=r.child.stateNode}try{i_(e,i)}catch(k){_t(r,r.return,k)}}break;case 27:i===null&&a&4&&gg(r);case 26:case 5:mr(e,r),i===null&&a&4&&pg(r),a&512&&vo(r,r.return);break;case 12:mr(e,r);break;case 31:mr(e,r),a&4&&yg(e,r);break;case 13:mr(e,r),a&4&&Cg(e,r),a&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=Jy.bind(null,r),b1(e,r))));break;case 22:if(a=r.memoizedState!==null||_r,!a){i=i!==null&&i.memoizedState!==null||ai,d=_r;var m=ai;_r=a,(ai=i)&&!m?vr(e,r,(r.subtreeFlags&8772)!==0):mr(e,r),_r=d,ai=m}break;case 30:break;default:mr(e,r)}}function bg(e){var i=e.alternate;i!==null&&(e.alternate=null,bg(i)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(i=e.stateNode,i!==null&&Me(i)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Dt=null,Pi=!1;function gr(e,i,r){for(r=r.child;r!==null;)Sg(e,i,r),r=r.sibling}function Sg(e,i,r){if(Kt&&typeof Kt.onCommitFiberUnmount=="function")try{Kt.onCommitFiberUnmount(Ii,r)}catch{}switch(r.tag){case 26:ai||Wn(r,i),gr(e,i,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:ai||Wn(r,i);var a=Dt,d=Pi;Zr(r.type)&&(Dt=r.stateNode,Pi=!1),gr(e,i,r),Ao(r.stateNode),Dt=a,Pi=d;break;case 5:ai||Wn(r,i);case 6:if(a=Dt,d=Pi,Dt=null,gr(e,i,r),Dt=a,Pi=d,Dt!==null)if(Pi)try{(Dt.nodeType===9?Dt.body:Dt.nodeName==="HTML"?Dt.ownerDocument.body:Dt).removeChild(r.stateNode)}catch(m){_t(r,i,m)}else try{Dt.removeChild(r.stateNode)}catch(m){_t(r,i,m)}break;case 18:Dt!==null&&(Pi?(e=Dt,dm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),ya(e)):dm(Dt,r.stateNode));break;case 4:a=Dt,d=Pi,Dt=r.stateNode.containerInfo,Pi=!0,gr(e,i,r),Dt=a,Pi=d;break;case 0:case 11:case 14:case 15:qr(2,r,i),ai||qr(4,r,i),gr(e,i,r);break;case 1:ai||(Wn(r,i),a=r.stateNode,typeof a.componentWillUnmount=="function"&&fg(r,i,a)),gr(e,i,r);break;case 21:gr(e,i,r);break;case 22:ai=(a=ai)||r.memoizedState!==null,gr(e,i,r),ai=a;break;default:gr(e,i,r)}}function yg(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ya(e)}catch(r){_t(i,i.return,r)}}}function Cg(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ya(e)}catch(r){_t(i,i.return,r)}}function Wy(e){switch(e.tag){case 31:case 13:case 19:var i=e.stateNode;return i===null&&(i=e.stateNode=new mg),i;case 22:return e=e.stateNode,i=e._retryCache,i===null&&(i=e._retryCache=new mg),i;default:throw Error(o(435,e.tag))}}function Vl(e,i){var r=Wy(e);i.forEach(function(a){if(!r.has(a)){r.add(a);var d=e1.bind(null,e,a);a.then(d,d)}})}function ji(e,i){var r=i.deletions;if(r!==null)for(var a=0;a<r.length;a++){var d=r[a],m=e,k=i,N=k;e:for(;N!==null;){switch(N.tag){case 27:if(Zr(N.type)){Dt=N.stateNode,Pi=!1;break e}break;case 5:Dt=N.stateNode,Pi=!1;break e;case 3:case 4:Dt=N.stateNode.containerInfo,Pi=!0;break e}N=N.return}if(Dt===null)throw Error(o(160));Sg(m,k,d),Dt=null,Pi=!1,m=d.alternate,m!==null&&(m.return=null),d.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)wg(i,e),i=i.sibling}var Dn=null;function wg(e,i){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ji(i,e),Fi(e),a&4&&(qr(3,e,e.return),mo(3,e),qr(5,e,e.return));break;case 1:ji(i,e),Fi(e),a&512&&(ai||r===null||Wn(r,r.return)),a&64&&_r&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?a:r.concat(a))));break;case 26:var d=Dn;if(ji(i,e),Fi(e),a&512&&(ai||r===null||Wn(r,r.return)),a&4){var m=r!==null?r.memoizedState:null;if(a=e.memoizedState,r===null)if(a===null)if(e.stateNode===null){e:{a=e.type,r=e.memoizedProps,d=d.ownerDocument||d;t:switch(a){case"title":m=d.getElementsByTagName("title")[0],(!m||m[jn]||m[xt]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=d.createElement(a),d.head.insertBefore(m,d.querySelector("head > title"))),wi(m,a,r),m[xt]=e,Ye(m),a=m;break e;case"link":var k=wm("link","href",d).get(a+(r.href||""));if(k){for(var N=0;N<k.length;N++)if(m=k[N],m.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&m.getAttribute("rel")===(r.rel==null?null:r.rel)&&m.getAttribute("title")===(r.title==null?null:r.title)&&m.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){k.splice(N,1);break t}}m=d.createElement(a),wi(m,a,r),d.head.appendChild(m);break;case"meta":if(k=wm("meta","content",d).get(a+(r.content||""))){for(N=0;N<k.length;N++)if(m=k[N],m.getAttribute("content")===(r.content==null?null:""+r.content)&&m.getAttribute("name")===(r.name==null?null:r.name)&&m.getAttribute("property")===(r.property==null?null:r.property)&&m.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&m.getAttribute("charset")===(r.charSet==null?null:r.charSet)){k.splice(N,1);break t}}m=d.createElement(a),wi(m,a,r),d.head.appendChild(m);break;default:throw Error(o(468,a))}m[xt]=e,Ye(m),a=m}e.stateNode=a}else Em(d,e.type,e.stateNode);else e.stateNode=Cm(d,a,e.memoizedProps);else m!==a?(m===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):m.count--,a===null?Em(d,e.type,e.stateNode):Cm(d,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Th(e,e.memoizedProps,r.memoizedProps)}break;case 27:ji(i,e),Fi(e),a&512&&(ai||r===null||Wn(r,r.return)),r!==null&&a&4&&Th(e,e.memoizedProps,r.memoizedProps);break;case 5:if(ji(i,e),Fi(e),a&512&&(ai||r===null||Wn(r,r.return)),e.flags&32){d=e.stateNode;try{Ue(d,"")}catch(xe){_t(e,e.return,xe)}}a&4&&e.stateNode!=null&&(d=e.memoizedProps,Th(e,d,r!==null?r.memoizedProps:d)),a&1024&&(Lh=!0);break;case 6:if(ji(i,e),Fi(e),a&4){if(e.stateNode===null)throw Error(o(162));a=e.memoizedProps,r=e.stateNode;try{r.nodeValue=a}catch(xe){_t(e,e.return,xe)}}break;case 3:if(hc=null,d=Dn,Dn=cc(i.containerInfo),ji(i,e),Dn=d,Fi(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{ya(i.containerInfo)}catch(xe){_t(e,e.return,xe)}Lh&&(Lh=!1,Eg(e));break;case 4:a=Dn,Dn=cc(e.stateNode.containerInfo),ji(i,e),Fi(e),Dn=a;break;case 12:ji(i,e),Fi(e);break;case 31:ji(i,e),Fi(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Vl(e,a)));break;case 13:ji(i,e),Fi(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(Zl=lt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Vl(e,a)));break;case 22:d=e.memoizedState!==null;var G=r!==null&&r.memoizedState!==null,re=_r,ue=ai;if(_r=re||d,ai=ue||G,ji(i,e),ai=ue,_r=re,Fi(e),a&8192)e:for(i=e.stateNode,i._visibility=d?i._visibility&-2:i._visibility|1,d&&(r===null||G||_r||ai||As(e)),r=null,i=e;;){if(i.tag===5||i.tag===26){if(r===null){G=r=i;try{if(m=G.stateNode,d)k=m.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else{N=G.stateNode;var fe=G.memoizedProps.style,se=fe!=null&&fe.hasOwnProperty("display")?fe.display:null;N.style.display=se==null||typeof se=="boolean"?"":(""+se).trim()}}catch(xe){_t(G,G.return,xe)}}}else if(i.tag===6){if(r===null){G=i;try{G.stateNode.nodeValue=d?"":G.memoizedProps}catch(xe){_t(G,G.return,xe)}}}else if(i.tag===18){if(r===null){G=i;try{var le=G.stateNode;d?fm(le,!0):fm(G.stateNode,!1)}catch(xe){_t(G,G.return,xe)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===e)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break e;for(;i.sibling===null;){if(i.return===null||i.return===e)break e;r===i&&(r=null),i=i.return}r===i&&(r=null),i.sibling.return=i.return,i=i.sibling}a&4&&(a=e.updateQueue,a!==null&&(r=a.retryQueue,r!==null&&(a.retryQueue=null,Vl(e,r))));break;case 19:ji(i,e),Fi(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Vl(e,a)));break;case 30:break;case 21:break;default:ji(i,e),Fi(e)}}function Fi(e){var i=e.flags;if(i&2){try{for(var r,a=e.return;a!==null;){if(_g(a)){r=a;break}a=a.return}if(r==null)throw Error(o(160));switch(r.tag){case 27:var d=r.stateNode,m=Ah(e);Yl(e,m,d);break;case 5:var k=r.stateNode;r.flags&32&&(Ue(k,""),r.flags&=-33);var N=Ah(e);Yl(e,N,k);break;case 3:case 4:var G=r.stateNode.containerInfo,re=Ah(e);Rh(e,re,G);break;default:throw Error(o(161))}}catch(ue){_t(e,e.return,ue)}e.flags&=-3}i&4096&&(e.flags&=-4097)}function Eg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var i=e;Eg(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),e=e.sibling}}function mr(e,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)vg(e,i.alternate,i),i=i.sibling}function As(e){for(e=e.child;e!==null;){var i=e;switch(i.tag){case 0:case 11:case 14:case 15:qr(4,i,i.return),As(i);break;case 1:Wn(i,i.return);var r=i.stateNode;typeof r.componentWillUnmount=="function"&&fg(i,i.return,r),As(i);break;case 27:Ao(i.stateNode);case 26:case 5:Wn(i,i.return),As(i);break;case 22:i.memoizedState===null&&As(i);break;case 30:As(i);break;default:As(i)}e=e.sibling}}function vr(e,i,r){for(r=r&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var a=i.alternate,d=e,m=i,k=m.flags;switch(m.tag){case 0:case 11:case 15:vr(d,m,r),mo(4,m);break;case 1:if(vr(d,m,r),a=m,d=a.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(re){_t(a,a.return,re)}if(a=m,d=a.updateQueue,d!==null){var N=a.stateNode;try{var G=d.shared.hiddenCallbacks;if(G!==null)for(d.shared.hiddenCallbacks=null,d=0;d<G.length;d++)t_(G[d],N)}catch(re){_t(a,a.return,re)}}r&&k&64&&dg(m),vo(m,m.return);break;case 27:gg(m);case 26:case 5:vr(d,m,r),r&&a===null&&k&4&&pg(m),vo(m,m.return);break;case 12:vr(d,m,r);break;case 31:vr(d,m,r),r&&k&4&&yg(d,m);break;case 13:vr(d,m,r),r&&k&4&&Cg(d,m);break;case 22:m.memoizedState===null&&vr(d,m,r),vo(m,m.return);break;case 30:break;default:vr(d,m,r)}i=i.sibling}}function kh(e,i){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(e=i.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&no(r))}function Mh(e,i){e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&no(e))}function On(e,i,r,a){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)xg(e,i,r,a),i=i.sibling}function xg(e,i,r,a){var d=i.flags;switch(i.tag){case 0:case 11:case 15:On(e,i,r,a),d&2048&&mo(9,i);break;case 1:On(e,i,r,a);break;case 3:On(e,i,r,a),d&2048&&(e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&no(e)));break;case 12:if(d&2048){On(e,i,r,a),e=i.stateNode;try{var m=i.memoizedProps,k=m.id,N=m.onPostCommit;typeof N=="function"&&N(k,i.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(G){_t(i,i.return,G)}}else On(e,i,r,a);break;case 31:On(e,i,r,a);break;case 13:On(e,i,r,a);break;case 23:break;case 22:m=i.stateNode,k=i.alternate,i.memoizedState!==null?m._visibility&2?On(e,i,r,a):bo(e,i):m._visibility&2?On(e,i,r,a):(m._visibility|=2,ua(e,i,r,a,(i.subtreeFlags&10256)!==0||!1)),d&2048&&kh(k,i);break;case 24:On(e,i,r,a),d&2048&&Mh(i.alternate,i);break;default:On(e,i,r,a)}}function ua(e,i,r,a,d){for(d=d&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var m=e,k=i,N=r,G=a,re=k.flags;switch(k.tag){case 0:case 11:case 15:ua(m,k,N,G,d),mo(8,k);break;case 23:break;case 22:var ue=k.stateNode;k.memoizedState!==null?ue._visibility&2?ua(m,k,N,G,d):bo(m,k):(ue._visibility|=2,ua(m,k,N,G,d)),d&&re&2048&&kh(k.alternate,k);break;case 24:ua(m,k,N,G,d),d&&re&2048&&Mh(k.alternate,k);break;default:ua(m,k,N,G,d)}i=i.sibling}}function bo(e,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var r=e,a=i,d=a.flags;switch(a.tag){case 22:bo(r,a),d&2048&&kh(a.alternate,a);break;case 24:bo(r,a),d&2048&&Mh(a.alternate,a);break;default:bo(r,a)}i=i.sibling}}var So=8192;function ha(e,i,r){if(e.subtreeFlags&So)for(e=e.child;e!==null;)Tg(e,i,r),e=e.sibling}function Tg(e,i,r){switch(e.tag){case 26:ha(e,i,r),e.flags&So&&e.memoizedState!==null&&M1(r,Dn,e.memoizedState,e.memoizedProps);break;case 5:ha(e,i,r);break;case 3:case 4:var a=Dn;Dn=cc(e.stateNode.containerInfo),ha(e,i,r),Dn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=So,So=16777216,ha(e,i,r),So=a):ha(e,i,r));break;default:ha(e,i,r)}}function Ag(e){var i=e.alternate;if(i!==null&&(e=i.child,e!==null)){i.child=null;do i=e.sibling,e.sibling=null,e=i;while(e!==null)}}function yo(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var r=0;r<i.length;r++){var a=i[r];hi=a,Lg(a,e)}Ag(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Rg(e),e=e.sibling}function Rg(e){switch(e.tag){case 0:case 11:case 15:yo(e),e.flags&2048&&qr(9,e,e.return);break;case 3:yo(e);break;case 12:yo(e);break;case 22:var i=e.stateNode;e.memoizedState!==null&&i._visibility&2&&(e.return===null||e.return.tag!==13)?(i._visibility&=-3,Xl(e)):yo(e);break;default:yo(e)}}function Xl(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var r=0;r<i.length;r++){var a=i[r];hi=a,Lg(a,e)}Ag(e)}for(e=e.child;e!==null;){switch(i=e,i.tag){case 0:case 11:case 15:qr(8,i,i.return),Xl(i);break;case 22:r=i.stateNode,r._visibility&2&&(r._visibility&=-3,Xl(i));break;default:Xl(i)}e=e.sibling}}function Lg(e,i){for(;hi!==null;){var r=hi;switch(r.tag){case 0:case 11:case 15:qr(8,r,i);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var a=r.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:no(r.memoizedState.cache)}if(a=r.child,a!==null)a.return=r,hi=a;else e:for(r=e;hi!==null;){a=hi;var d=a.sibling,m=a.return;if(bg(a),a===r){hi=null;break e}if(d!==null){d.return=m,hi=d;break e}hi=m}}}var Gy={getCacheForType:function(e){var i=yi(ni),r=i.data.get(e);return r===void 0&&(r=e(),i.data.set(e,r)),r},cacheSignal:function(){return yi(ni).controller.signal}},Ky=typeof WeakMap=="function"?WeakMap:Map,ct=0,yt=null,Ve=null,et=0,pt=0,rn=null,Wr=!1,da=!1,Dh=!1,br=0,jt=0,Gr=0,Rs=0,Oh=0,sn=0,fa=0,Co=null,qi=null,Bh=!1,Zl=0,kg=0,Ql=1/0,Jl=null,Kr=null,ui=0,Yr=null,pa=null,Sr=0,Nh=0,Ih=null,Mg=null,wo=0,Hh=null;function an(){return(ct&2)!==0&&et!==0?et&-et:j.T!==null?Fh():ir()}function Dg(){if(sn===0)if((et&536870912)===0||nt){var e=Pn;Pn<<=1,(Pn&3932160)===0&&(Pn=262144),sn=e}else sn=536870912;return e=tn.current,e!==null&&(e.flags|=32),sn}function Wi(e,i,r){(e===yt&&(pt===2||pt===9)||e.cancelPendingCommit!==null)&&(_a(e,0),Vr(e,et,sn,!1)),dt(e,r),((ct&2)===0||e!==yt)&&(e===yt&&((ct&2)===0&&(Rs|=r),jt===4&&Vr(e,et,sn,!1)),Gn(e))}function Og(e,i,r){if((ct&6)!==0)throw Error(o(327));var a=!r&&(i&127)===0&&(i&e.expiredLanes)===0||he(e,i),d=a?Xy(e,i):$h(e,i,!0),m=a;do{if(d===0){da&&!a&&Vr(e,i,0,!1);break}else{if(r=e.current.alternate,m&&!Yy(r)){d=$h(e,i,!1),m=!1;continue}if(d===2){if(m=i,e.errorRecoveryDisabledLanes&m)var k=0;else k=e.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){i=k;e:{var N=e;d=Co;var G=N.current.memoizedState.isDehydrated;if(G&&(_a(N,k).flags|=256),k=$h(N,k,!1),k!==2){if(Dh&&!G){N.errorRecoveryDisabledLanes|=m,Rs|=m,d=4;break e}m=qi,qi=d,m!==null&&(qi===null?qi=m:qi.push.apply(qi,m))}d=k}if(m=!1,d!==2)continue}}if(d===1){_a(e,0),Vr(e,i,0,!0);break}e:{switch(a=e,m=d,m){case 0:case 1:throw Error(o(345));case 4:if((i&4194048)!==i)break;case 6:Vr(a,i,sn,!Wr);break e;case 2:qi=null;break;case 3:case 5:break;default:throw Error(o(329))}if((i&62914560)===i&&(d=Zl+300-lt(),10<d)){if(Vr(a,i,sn,!Wr),X(a,0,!0)!==0)break e;Sr=i,a.timeoutHandle=um(Bg.bind(null,a,r,qi,Jl,Bh,i,sn,Rs,fa,Wr,m,"Throttled",-0,0),d);break e}Bg(a,r,qi,Jl,Bh,i,sn,Rs,fa,Wr,m,null,-0,0)}}break}while(!0);Gn(e)}function Bg(e,i,r,a,d,m,k,N,G,re,ue,fe,se,le){if(e.timeoutHandle=-1,fe=i.subtreeFlags,fe&8192||(fe&16785408)===16785408){fe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ye},Tg(i,m,fe);var xe=(m&62914560)===m?Zl-lt():(m&4194048)===m?kg-lt():0;if(xe=D1(fe,xe),xe!==null){Sr=m,e.cancelPendingCommit=xe(jg.bind(null,e,i,m,r,a,d,k,N,G,ue,fe,null,se,le)),Vr(e,m,k,!re);return}}jg(e,i,m,r,a,d,k,N,G)}function Yy(e){for(var i=e;;){var r=i.tag;if((r===0||r===11||r===15)&&i.flags&16384&&(r=i.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var a=0;a<r.length;a++){var d=r[a],m=d.getSnapshot;d=d.value;try{if(!Ji(m(),d))return!1}catch{return!1}}if(r=i.child,i.subtreeFlags&16384&&r!==null)r.return=i,i=r;else{if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function Vr(e,i,r,a){i&=~Oh,i&=~Rs,e.suspendedLanes|=i,e.pingedLanes&=~i,a&&(e.warmLanes|=i),a=e.expirationTimes;for(var d=i;0<d;){var m=31-zt(d),k=1<<m;a[m]=-1,d&=~k}r!==0&&Ce(e,r,i)}function ec(){return(ct&6)===0?(Eo(0),!1):!0}function zh(){if(Ve!==null){if(pt===0)var e=Ve.return;else e=Ve,cr=bs=null,eh(e),sa=null,so=0,e=Ve;for(;e!==null;)hg(e.alternate,e),e=e.return;Ve=null}}function _a(e,i){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,p1(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),Sr=0,zh(),yt=e,Ve=r=or(e.current,null),et=i,pt=0,rn=null,Wr=!1,da=he(e,i),Dh=!1,fa=sn=Oh=Rs=Gr=jt=0,qi=Co=null,Bh=!1,(i&8)!==0&&(i|=i&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=i;0<a;){var d=31-zt(a),m=1<<d;i|=e[d],a&=~m}return br=i,yl(),r}function Ng(e,i){qe=null,j.H=po,i===ra||i===Ll?(i=Zp(),pt=3):i===ju?(i=Zp(),pt=4):pt=i===gh?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,rn=i,Ve===null&&(jt=1,Fl(e,fn(i,e.current)))}function Ig(){var e=tn.current;return e===null?!0:(et&4194048)===et?mn===null:(et&62914560)===et||(et&536870912)!==0?e===mn:!1}function Hg(){var e=j.H;return j.H=po,e===null?po:e}function zg(){var e=j.A;return j.A=Gy,e}function tc(){jt=4,Wr||(et&4194048)!==et&&tn.current!==null||(da=!0),(Gr&134217727)===0&&(Rs&134217727)===0||yt===null||Vr(yt,et,sn,!1)}function $h(e,i,r){var a=ct;ct|=2;var d=Hg(),m=zg();(yt!==e||et!==i)&&(Jl=null,_a(e,i)),i=!1;var k=jt;e:do try{if(pt!==0&&Ve!==null){var N=Ve,G=rn;switch(pt){case 8:zh(),k=6;break e;case 3:case 2:case 9:case 6:tn.current===null&&(i=!0);var re=pt;if(pt=0,rn=null,ga(e,N,G,re),r&&da){k=0;break e}break;default:re=pt,pt=0,rn=null,ga(e,N,G,re)}}Vy(),k=jt;break}catch(ue){Ng(e,ue)}while(!0);return i&&e.shellSuspendCounter++,cr=bs=null,ct=a,j.H=d,j.A=m,Ve===null&&(yt=null,et=0,yl()),k}function Vy(){for(;Ve!==null;)$g(Ve)}function Xy(e,i){var r=ct;ct|=2;var a=Hg(),d=zg();yt!==e||et!==i?(Jl=null,Ql=lt()+500,_a(e,i)):da=he(e,i);e:do try{if(pt!==0&&Ve!==null){i=Ve;var m=rn;t:switch(pt){case 1:pt=0,rn=null,ga(e,i,m,1);break;case 2:case 9:if(Vp(m)){pt=0,rn=null,Ug(i);break}i=function(){pt!==2&&pt!==9||yt!==e||(pt=7),Gn(e)},m.then(i,i);break e;case 3:pt=7;break e;case 4:pt=5;break e;case 7:Vp(m)?(pt=0,rn=null,Ug(i)):(pt=0,rn=null,ga(e,i,m,7));break;case 5:var k=null;switch(Ve.tag){case 26:k=Ve.memoizedState;case 5:case 27:var N=Ve;if(k?xm(k):N.stateNode.complete){pt=0,rn=null;var G=N.sibling;if(G!==null)Ve=G;else{var re=N.return;re!==null?(Ve=re,ic(re)):Ve=null}break t}}pt=0,rn=null,ga(e,i,m,5);break;case 6:pt=0,rn=null,ga(e,i,m,6);break;case 8:zh(),jt=6;break e;default:throw Error(o(462))}}Zy();break}catch(ue){Ng(e,ue)}while(!0);return cr=bs=null,j.H=a,j.A=d,ct=r,Ve!==null?0:(yt=null,et=0,yl(),jt)}function Zy(){for(;Ve!==null&&!An();)$g(Ve)}function $g(e){var i=cg(e.alternate,e,br);e.memoizedProps=e.pendingProps,i===null?ic(e):Ve=i}function Ug(e){var i=e,r=i.alternate;switch(i.tag){case 15:case 0:i=ng(r,i,i.pendingProps,i.type,void 0,et);break;case 11:i=ng(r,i,i.pendingProps,i.type.render,i.ref,et);break;case 5:eh(i);default:hg(r,i),i=Ve=zp(i,br),i=cg(r,i,br)}e.memoizedProps=e.pendingProps,i===null?ic(e):Ve=i}function ga(e,i,r,a){cr=bs=null,eh(i),sa=null,so=0;var d=i.return;try{if($y(e,d,i,r,et)){jt=1,Fl(e,fn(r,e.current)),Ve=null;return}}catch(m){if(d!==null)throw Ve=d,m;jt=1,Fl(e,fn(r,e.current)),Ve=null;return}i.flags&32768?(nt||a===1?e=!0:da||(et&536870912)!==0?e=!1:(Wr=e=!0,(a===2||a===9||a===3||a===6)&&(a=tn.current,a!==null&&a.tag===13&&(a.flags|=16384))),Pg(i,e)):ic(i)}function ic(e){var i=e;do{if((i.flags&32768)!==0){Pg(i,Wr);return}e=i.return;var r=jy(i.alternate,i,br);if(r!==null){Ve=r;return}if(i=i.sibling,i!==null){Ve=i;return}Ve=i=e}while(i!==null);jt===0&&(jt=5)}function Pg(e,i){do{var r=Fy(e.alternate,e);if(r!==null){r.flags&=32767,Ve=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!i&&(e=e.sibling,e!==null)){Ve=e;return}Ve=e=r}while(e!==null);jt=6,Ve=null}function jg(e,i,r,a,d,m,k,N,G){e.cancelPendingCommit=null;do nc();while(ui!==0);if((ct&6)!==0)throw Error(o(327));if(i!==null){if(i===e.current)throw Error(o(177));if(m=i.lanes|i.childLanes,m|=Au,Ee(e,r,m,k,N,G),e===yt&&(Ve=yt=null,et=0),pa=i,Yr=e,Sr=r,Nh=m,Ih=d,Mg=a,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,t1(ei,function(){return Kg(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||a){a=j.T,j.T=null,d=Y.p,Y.p=2,k=ct,ct|=4;try{qy(e,i,r)}finally{ct=k,Y.p=d,j.T=a}}ui=1,Fg(),qg(),Wg()}}function Fg(){if(ui===1){ui=0;var e=Yr,i=pa,r=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||r){r=j.T,j.T=null;var a=Y.p;Y.p=2;var d=ct;ct|=4;try{wg(i,e);var m=Zh,k=Lp(e.containerInfo),N=m.focusedElem,G=m.selectionRange;if(k!==N&&N&&N.ownerDocument&&Rp(N.ownerDocument.documentElement,N)){if(G!==null&&Cu(N)){var re=G.start,ue=G.end;if(ue===void 0&&(ue=re),"selectionStart"in N)N.selectionStart=re,N.selectionEnd=Math.min(ue,N.value.length);else{var fe=N.ownerDocument||document,se=fe&&fe.defaultView||window;if(se.getSelection){var le=se.getSelection(),xe=N.textContent.length,ze=Math.min(G.start,xe),vt=G.end===void 0?ze:Math.min(G.end,xe);!le.extend&&ze>vt&&(k=vt,vt=ze,ze=k);var ie=Ap(N,ze),J=Ap(N,vt);if(ie&&J&&(le.rangeCount!==1||le.anchorNode!==ie.node||le.anchorOffset!==ie.offset||le.focusNode!==J.node||le.focusOffset!==J.offset)){var ne=fe.createRange();ne.setStart(ie.node,ie.offset),le.removeAllRanges(),ze>vt?(le.addRange(ne),le.extend(J.node,J.offset)):(ne.setEnd(J.node,J.offset),le.addRange(ne))}}}}for(fe=[],le=N;le=le.parentNode;)le.nodeType===1&&fe.push({element:le,left:le.scrollLeft,top:le.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<fe.length;N++){var de=fe[N];de.element.scrollLeft=de.left,de.element.scrollTop=de.top}}_c=!!Xh,Zh=Xh=null}finally{ct=d,Y.p=a,j.T=r}}e.current=i,ui=2}}function qg(){if(ui===2){ui=0;var e=Yr,i=pa,r=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||r){r=j.T,j.T=null;var a=Y.p;Y.p=2;var d=ct;ct|=4;try{vg(e,i.alternate,i)}finally{ct=d,Y.p=a,j.T=r}}ui=3}}function Wg(){if(ui===4||ui===3){ui=0,Jt();var e=Yr,i=pa,r=Sr,a=Mg;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?ui=5:(ui=0,pa=Yr=null,Gg(e,e.pendingLanes));var d=e.pendingLanes;if(d===0&&(Kr=null),vi(r),i=i.stateNode,Kt&&typeof Kt.onCommitFiberRoot=="function")try{Kt.onCommitFiberRoot(Ii,i,void 0,(i.current.flags&128)===128)}catch{}if(a!==null){i=j.T,d=Y.p,Y.p=2,j.T=null;try{for(var m=e.onRecoverableError,k=0;k<a.length;k++){var N=a[k];m(N.value,{componentStack:N.stack})}}finally{j.T=i,Y.p=d}}(Sr&3)!==0&&nc(),Gn(e),d=e.pendingLanes,(r&261930)!==0&&(d&42)!==0?e===Hh?wo++:(wo=0,Hh=e):wo=0,Eo(0)}}function Gg(e,i){(e.pooledCacheLanes&=i)===0&&(i=e.pooledCache,i!=null&&(e.pooledCache=null,no(i)))}function nc(){return Fg(),qg(),Wg(),Kg()}function Kg(){if(ui!==5)return!1;var e=Yr,i=Nh;Nh=0;var r=vi(Sr),a=j.T,d=Y.p;try{Y.p=32>r?32:r,j.T=null,r=Ih,Ih=null;var m=Yr,k=Sr;if(ui=0,pa=Yr=null,Sr=0,(ct&6)!==0)throw Error(o(331));var N=ct;if(ct|=4,Rg(m.current),xg(m,m.current,k,r),ct=N,Eo(0,!1),Kt&&typeof Kt.onPostCommitFiberRoot=="function")try{Kt.onPostCommitFiberRoot(Ii,m)}catch{}return!0}finally{Y.p=d,j.T=a,Gg(e,i)}}function Yg(e,i,r){i=fn(r,i),i=_h(e.stateNode,i,2),e=Pr(e,i,2),e!==null&&(dt(e,2),Gn(e))}function _t(e,i,r){if(e.tag===3)Yg(e,e,r);else for(;i!==null;){if(i.tag===3){Yg(i,e,r);break}else if(i.tag===1){var a=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Kr===null||!Kr.has(a))){e=fn(r,e),r=V_(2),a=Pr(i,r,2),a!==null&&(X_(r,a,i,e),dt(a,2),Gn(a));break}}i=i.return}}function Uh(e,i,r){var a=e.pingCache;if(a===null){a=e.pingCache=new Ky;var d=new Set;a.set(i,d)}else d=a.get(i),d===void 0&&(d=new Set,a.set(i,d));d.has(r)||(Dh=!0,d.add(r),e=Qy.bind(null,e,i,r),i.then(e,e))}function Qy(e,i,r){var a=e.pingCache;a!==null&&a.delete(i),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,yt===e&&(et&r)===r&&(jt===4||jt===3&&(et&62914560)===et&&300>lt()-Zl?(ct&2)===0&&_a(e,0):Oh|=r,fa===et&&(fa=0)),Gn(e)}function Vg(e,i){i===0&&(i=Ie()),e=gs(e,i),e!==null&&(dt(e,i),Gn(e))}function Jy(e){var i=e.memoizedState,r=0;i!==null&&(r=i.retryLane),Vg(e,r)}function e1(e,i){var r=0;switch(e.tag){case 31:case 13:var a=e.stateNode,d=e.memoizedState;d!==null&&(r=d.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(o(314))}a!==null&&a.delete(i),Vg(e,r)}function t1(e,i){return mi(e,i)}var rc=null,ma=null,Ph=!1,sc=!1,jh=!1,Xr=0;function Gn(e){e!==ma&&e.next===null&&(ma===null?rc=ma=e:ma=ma.next=e),sc=!0,Ph||(Ph=!0,n1())}function Eo(e,i){if(!jh&&sc){jh=!0;do for(var r=!1,a=rc;a!==null;){if(e!==0){var d=a.pendingLanes;if(d===0)var m=0;else{var k=a.suspendedLanes,N=a.pingedLanes;m=(1<<31-zt(42|e)+1)-1,m&=d&~(k&~N),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(r=!0,Jg(a,m))}else m=et,m=X(a,a===yt?m:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(m&3)===0||he(a,m)||(r=!0,Jg(a,m));a=a.next}while(r);jh=!1}}function i1(){Xg()}function Xg(){sc=Ph=!1;var e=0;Xr!==0&&f1()&&(e=Xr);for(var i=lt(),r=null,a=rc;a!==null;){var d=a.next,m=Zg(a,i);m===0?(a.next=null,r===null?rc=d:r.next=d,d===null&&(ma=r)):(r=a,(e!==0||(m&3)!==0)&&(sc=!0)),a=d}ui!==0&&ui!==5||Eo(e),Xr!==0&&(Xr=0)}function Zg(e,i){for(var r=e.suspendedLanes,a=e.pingedLanes,d=e.expirationTimes,m=e.pendingLanes&-62914561;0<m;){var k=31-zt(m),N=1<<k,G=d[k];G===-1?((N&r)===0||(N&a)!==0)&&(d[k]=ve(N,i)):G<=i&&(e.expiredLanes|=N),m&=~N}if(i=yt,r=et,r=X(e,e===i?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,r===0||e===i&&(pt===2||pt===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&un(a),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||he(e,r)){if(i=r&-r,i===e.callbackPriority)return i;switch(a!==null&&un(a),vi(r)){case 2:case 8:r=Ht;break;case 32:r=ei;break;case 268435456:r=Ti;break;default:r=ei}return a=Qg.bind(null,e),r=mi(r,a),e.callbackPriority=i,e.callbackNode=r,i}return a!==null&&a!==null&&un(a),e.callbackPriority=2,e.callbackNode=null,2}function Qg(e,i){if(ui!==0&&ui!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(nc()&&e.callbackNode!==r)return null;var a=et;return a=X(e,e===yt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Og(e,a,i),Zg(e,lt()),e.callbackNode!=null&&e.callbackNode===r?Qg.bind(null,e):null)}function Jg(e,i){if(nc())return null;Og(e,i,!0)}function n1(){_1(function(){(ct&6)!==0?mi(It,i1):Xg()})}function Fh(){if(Xr===0){var e=ia;e===0&&(e=Ln,Ln<<=1,(Ln&261888)===0&&(Ln=256)),Xr=e}return Xr}function em(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Or(""+e)}function tm(e,i){var r=i.ownerDocument.createElement("input");return r.name=i.name,r.value=i.value,e.id&&r.setAttribute("form",e.id),i.parentNode.insertBefore(r,i),e=new FormData(e),r.parentNode.removeChild(r),e}function r1(e,i,r,a,d){if(i==="submit"&&r&&r.stateNode===d){var m=em((d[wt]||null).action),k=a.submitter;k&&(i=(i=k[wt]||null)?em(i.formAction):k.getAttribute("formAction"),i!==null&&(m=i,k=null));var N=new ml("action","action",null,a,d);e.push({event:N,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Xr!==0){var G=k?tm(d,k):new FormData(d);ch(r,{pending:!0,data:G,method:d.method,action:m},null,G)}}else typeof m=="function"&&(N.preventDefault(),G=k?tm(d,k):new FormData(d),ch(r,{pending:!0,data:G,method:d.method,action:m},m,G))},currentTarget:d}]})}}for(var qh=0;qh<Tu.length;qh++){var Wh=Tu[qh],s1=Wh.toLowerCase(),a1=Wh[0].toUpperCase()+Wh.slice(1);Mn(s1,"on"+a1)}Mn(Dp,"onAnimationEnd"),Mn(Op,"onAnimationIteration"),Mn(Bp,"onAnimationStart"),Mn("dblclick","onDoubleClick"),Mn("focusin","onFocus"),Mn("focusout","onBlur"),Mn(Cy,"onTransitionRun"),Mn(wy,"onTransitionStart"),Mn(Ey,"onTransitionCancel"),Mn(Np,"onTransitionEnd"),ge("onMouseEnter",["mouseout","mouseover"]),ge("onMouseLeave",["mouseout","mouseover"]),ge("onPointerEnter",["pointerout","pointerover"]),ge("onPointerLeave",["pointerout","pointerover"]),Ut("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ut("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ut("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ut("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ut("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ut("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xo="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(" "),o1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(xo));function im(e,i){i=(i&4)!==0;for(var r=0;r<e.length;r++){var a=e[r],d=a.event;a=a.listeners;e:{var m=void 0;if(i)for(var k=a.length-1;0<=k;k--){var N=a[k],G=N.instance,re=N.currentTarget;if(N=N.listener,G!==m&&d.isPropagationStopped())break e;m=N,d.currentTarget=re;try{m(d)}catch(ue){Sl(ue)}d.currentTarget=null,m=G}else for(k=0;k<a.length;k++){if(N=a[k],G=N.instance,re=N.currentTarget,N=N.listener,G!==m&&d.isPropagationStopped())break e;m=N,d.currentTarget=re;try{m(d)}catch(ue){Sl(ue)}d.currentTarget=null,m=G}}}}function Xe(e,i){var r=i[Mr];r===void 0&&(r=i[Mr]=new Set);var a=e+"__bubble";r.has(a)||(nm(i,e,2,!1),r.add(a))}function Gh(e,i,r){var a=0;i&&(a|=4),nm(r,e,a,i)}var ac="_reactListening"+Math.random().toString(36).slice(2);function Kh(e){if(!e[ac]){e[ac]=!0,Tt.forEach(function(r){r!=="selectionchange"&&(o1.has(r)||Gh(r,!1,e),Gh(r,!0,e))});var i=e.nodeType===9?e:e.ownerDocument;i===null||i[ac]||(i[ac]=!0,Gh("selectionchange",!1,i))}}function nm(e,i,r,a){switch(Dm(i)){case 2:var d=N1;break;case 8:d=I1;break;default:d=ld}r=d.bind(null,i,r,e),d=void 0,!fu||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(d=!0),a?d!==void 0?e.addEventListener(i,r,{capture:!0,passive:d}):e.addEventListener(i,r,!0):d!==void 0?e.addEventListener(i,r,{passive:d}):e.addEventListener(i,r,!1)}function Yh(e,i,r,a,d){var m=a;if((i&1)===0&&(i&2)===0&&a!==null)e:for(;;){if(a===null)return;var k=a.tag;if(k===3||k===4){var N=a.stateNode.containerInfo;if(N===d)break;if(k===4)for(k=a.return;k!==null;){var G=k.tag;if((G===3||G===4)&&k.stateNode.containerInfo===d)return;k=k.return}for(;N!==null;){if(k=q(N),k===null)return;if(G=k.tag,G===5||G===6||G===26||G===27){a=m=k;continue e}N=N.parentNode}}a=a.return}fl(function(){var re=m,ue=Fe(r),fe=[];e:{var se=Ip.get(e);if(se!==void 0){var le=ml,xe=e;switch(e){case"keypress":if(_l(r)===0)break e;case"keydown":case"keyup":le=ey;break;case"focusin":xe="focus",le=mu;break;case"focusout":xe="blur",le=mu;break;case"beforeblur":case"afterblur":le=mu;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":le=hp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":le=jS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":le=ny;break;case Dp:case Op:case Bp:le=WS;break;case Np:le=sy;break;case"scroll":case"scrollend":le=US;break;case"wheel":le=oy;break;case"copy":case"cut":case"paste":le=KS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":le=fp;break;case"toggle":case"beforetoggle":le=cy}var ze=(i&4)!==0,vt=!ze&&(e==="scroll"||e==="scrollend"),ie=ze?se!==null?se+"Capture":null:se;ze=[];for(var J=re,ne;J!==null;){var de=J;if(ne=de.stateNode,de=de.tag,de!==5&&de!==26&&de!==27||ne===null||ie===null||(de=Ga(J,ie),de!=null&&ze.push(To(J,de,ne))),vt)break;J=J.return}0<ze.length&&(se=new le(se,xe,null,r,ue),fe.push({event:se,listeners:ze}))}}if((i&7)===0){e:{if(se=e==="mouseover"||e==="pointerover",le=e==="mouseout"||e==="pointerout",se&&r!==Ae&&(xe=r.relatedTarget||r.fromElement)&&(q(xe)||xe[kn]))break e;if((le||se)&&(se=ue.window===ue?ue:(se=ue.ownerDocument)?se.defaultView||se.parentWindow:window,le?(xe=r.relatedTarget||r.toElement,le=re,xe=xe?q(xe):null,xe!==null&&(vt=y(xe),ze=xe.tag,xe!==vt||ze!==5&&ze!==27&&ze!==6)&&(xe=null)):(le=null,xe=re),le!==xe)){if(ze=hp,de="onMouseLeave",ie="onMouseEnter",J="mouse",(e==="pointerout"||e==="pointerover")&&(ze=fp,de="onPointerLeave",ie="onPointerEnter",J="pointer"),vt=le==null?se:we(le),ne=xe==null?se:we(xe),se=new ze(de,J+"leave",le,r,ue),se.target=vt,se.relatedTarget=ne,de=null,q(ue)===re&&(ze=new ze(ie,J+"enter",xe,r,ue),ze.target=ne,ze.relatedTarget=vt,de=ze),vt=de,le&&xe)t:{for(ze=l1,ie=le,J=xe,ne=0,de=ie;de;de=ze(de))ne++;de=0;for(var Ne=J;Ne;Ne=ze(Ne))de++;for(;0<ne-de;)ie=ze(ie),ne--;for(;0<de-ne;)J=ze(J),de--;for(;ne--;){if(ie===J||J!==null&&ie===J.alternate){ze=ie;break t}ie=ze(ie),J=ze(J)}ze=null}else ze=null;le!==null&&rm(fe,se,le,ze,!1),xe!==null&&vt!==null&&rm(fe,vt,xe,ze,!0)}}e:{if(se=re?we(re):window,le=se.nodeName&&se.nodeName.toLowerCase(),le==="select"||le==="input"&&se.type==="file")var st=yp;else if(bp(se))if(Cp)st=by;else{st=my;var Re=gy}else le=se.nodeName,!le||le.toLowerCase()!=="input"||se.type!=="checkbox"&&se.type!=="radio"?re&&Dr(re.elementType)&&(st=yp):st=vy;if(st&&(st=st(e,re))){Sp(fe,st,r,ue);break e}Re&&Re(e,se,re),e==="focusout"&&re&&se.type==="number"&&re.memoizedProps.value!=null&&Ws(se,"number",se.value)}switch(Re=re?we(re):window,e){case"focusin":(bp(Re)||Re.contentEditable==="true")&&(Ys=Re,wu=re,eo=null);break;case"focusout":eo=wu=Ys=null;break;case"mousedown":Eu=!0;break;case"contextmenu":case"mouseup":case"dragend":Eu=!1,kp(fe,r,ue);break;case"selectionchange":if(yy)break;case"keydown":case"keyup":kp(fe,r,ue)}var We;if(bu)e:{switch(e){case"compositionstart":var tt="onCompositionStart";break e;case"compositionend":tt="onCompositionEnd";break e;case"compositionupdate":tt="onCompositionUpdate";break e}tt=void 0}else Ks?mp(e,r)&&(tt="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(tt="onCompositionStart");tt&&(pp&&r.locale!=="ko"&&(Ks||tt!=="onCompositionStart"?tt==="onCompositionEnd"&&Ks&&(We=cp()):(Br=ue,pu="value"in Br?Br.value:Br.textContent,Ks=!0)),Re=oc(re,tt),0<Re.length&&(tt=new dp(tt,e,null,r,ue),fe.push({event:tt,listeners:Re}),We?tt.data=We:(We=vp(r),We!==null&&(tt.data=We)))),(We=hy?dy(e,r):fy(e,r))&&(tt=oc(re,"onBeforeInput"),0<tt.length&&(Re=new dp("onBeforeInput","beforeinput",null,r,ue),fe.push({event:Re,listeners:tt}),Re.data=We)),r1(fe,e,re,r,ue)}im(fe,i)})}function To(e,i,r){return{instance:e,listener:i,currentTarget:r}}function oc(e,i){for(var r=i+"Capture",a=[];e!==null;){var d=e,m=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||m===null||(d=Ga(e,r),d!=null&&a.unshift(To(e,d,m)),d=Ga(e,i),d!=null&&a.push(To(e,d,m))),e.tag===3)return a;e=e.return}return[]}function l1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function rm(e,i,r,a,d){for(var m=i._reactName,k=[];r!==null&&r!==a;){var N=r,G=N.alternate,re=N.stateNode;if(N=N.tag,G!==null&&G===a)break;N!==5&&N!==26&&N!==27||re===null||(G=re,d?(re=Ga(r,m),re!=null&&k.unshift(To(r,re,G))):d||(re=Ga(r,m),re!=null&&k.push(To(r,re,G)))),r=r.return}k.length!==0&&e.push({event:i,listeners:k})}var c1=/\r\n?/g,u1=/\u0000|\uFFFD/g;function sm(e){return(typeof e=="string"?e:""+e).replace(c1,`
|
|
9
|
+
`).replace(u1,"")}function am(e,i){return i=sm(i),sm(e)===i}function mt(e,i,r,a,d,m){switch(r){case"children":typeof a=="string"?i==="body"||i==="textarea"&&a===""||Ue(e,a):(typeof a=="number"||typeof a=="bigint")&&i!=="body"&&Ue(e,""+a);break;case"className":Zi(e,"class",a);break;case"tabIndex":Zi(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Zi(e,r,a);break;case"style":ft(e,a,m);break;case"data":if(i!=="object"){Zi(e,"data",a);break}case"src":case"href":if(a===""&&(i!=="a"||r!=="href")){e.removeAttribute(r);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(r);break}a=Or(""+a),e.setAttribute(r,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(r,"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 m=="function"&&(r==="formAction"?(i!=="input"&&mt(e,i,"name",d.name,d,null),mt(e,i,"formEncType",d.formEncType,d,null),mt(e,i,"formMethod",d.formMethod,d,null),mt(e,i,"formTarget",d.formTarget,d,null)):(mt(e,i,"encType",d.encType,d,null),mt(e,i,"method",d.method,d,null),mt(e,i,"target",d.target,d,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(r);break}a=Or(""+a),e.setAttribute(r,a);break;case"onClick":a!=null&&(e.onclick=ye);break;case"onScroll":a!=null&&Xe("scroll",e);break;case"onScrollEnd":a!=null&&Xe("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(r=a.__html,r!=null){if(d.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}r=Or(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(r,""+a):e.removeAttribute(r);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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":a===!0?e.setAttribute(r,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(r,a):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(r,a):e.removeAttribute(r);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(r):e.setAttribute(r,a);break;case"popover":Xe("beforetoggle",e),Xe("toggle",e),Ai(e,"popover",a);break;case"xlinkActuate":zi(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":zi(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":zi(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":zi(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":zi(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":zi(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":zi(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":zi(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":zi(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Ai(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=sr.get(r)||r,Ai(e,r,a))}}function Vh(e,i,r,a,d,m){switch(r){case"style":ft(e,a,m);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(r=a.__html,r!=null){if(d.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"children":typeof a=="string"?Ue(e,a):(typeof a=="number"||typeof a=="bigint")&&Ue(e,""+a);break;case"onScroll":a!=null&&Xe("scroll",e);break;case"onScrollEnd":a!=null&&Xe("scrollend",e);break;case"onClick":a!=null&&(e.onclick=ye);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!$t.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(d=r.endsWith("Capture"),i=r.slice(2,d?r.length-7:void 0),m=e[wt]||null,m=m!=null?m[r]:null,typeof m=="function"&&e.removeEventListener(i,m,d),typeof a=="function")){typeof m!="function"&&m!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(i,a,d);break e}r in e?e[r]=a:a===!0?e.setAttribute(r,""):Ai(e,r,a)}}}function wi(e,i,r){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Xe("error",e),Xe("load",e);var a=!1,d=!1,m;for(m in r)if(r.hasOwnProperty(m)){var k=r[m];if(k!=null)switch(m){case"src":a=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,i));default:mt(e,i,m,k,r,null)}}d&&mt(e,i,"srcSet",r.srcSet,r,null),a&&mt(e,i,"src",r.src,r,null);return;case"input":Xe("invalid",e);var N=m=k=d=null,G=null,re=null;for(a in r)if(r.hasOwnProperty(a)){var ue=r[a];if(ue!=null)switch(a){case"name":d=ue;break;case"type":k=ue;break;case"checked":G=ue;break;case"defaultChecked":re=ue;break;case"value":m=ue;break;case"defaultValue":N=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(o(137,i));break;default:mt(e,i,a,ue,r,null)}}ds(e,m,N,G,re,k,d,!1);return;case"select":Xe("invalid",e),a=k=m=null;for(d in r)if(r.hasOwnProperty(d)&&(N=r[d],N!=null))switch(d){case"value":m=N;break;case"defaultValue":k=N;break;case"multiple":a=N;default:mt(e,i,d,N,r,null)}i=m,r=k,e.multiple=!!a,i!=null?bi(e,!!a,i,!1):r!=null&&bi(e,!!a,r,!0);return;case"textarea":Xe("invalid",e),m=d=a=null;for(k in r)if(r.hasOwnProperty(k)&&(N=r[k],N!=null))switch(k){case"value":a=N;break;case"defaultValue":d=N;break;case"children":m=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(o(91));break;default:mt(e,i,k,N,r,null)}Gs(e,a,d,m);return;case"option":for(G in r)r.hasOwnProperty(G)&&(a=r[G],a!=null)&&(G==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":mt(e,i,G,a,r,null));return;case"dialog":Xe("beforetoggle",e),Xe("toggle",e),Xe("cancel",e),Xe("close",e);break;case"iframe":case"object":Xe("load",e);break;case"video":case"audio":for(a=0;a<xo.length;a++)Xe(xo[a],e);break;case"image":Xe("error",e),Xe("load",e);break;case"details":Xe("toggle",e);break;case"embed":case"source":case"link":Xe("error",e),Xe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(re in r)if(r.hasOwnProperty(re)&&(a=r[re],a!=null))switch(re){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,i));default:mt(e,i,re,a,r,null)}return;default:if(Dr(i)){for(ue in r)r.hasOwnProperty(ue)&&(a=r[ue],a!==void 0&&Vh(e,i,ue,a,r,void 0));return}}for(N in r)r.hasOwnProperty(N)&&(a=r[N],a!=null&&mt(e,i,N,a,r,null))}function h1(e,i,r,a){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,m=null,k=null,N=null,G=null,re=null,ue=null;for(le in r){var fe=r[le];if(r.hasOwnProperty(le)&&fe!=null)switch(le){case"checked":break;case"value":break;case"defaultValue":G=fe;default:a.hasOwnProperty(le)||mt(e,i,le,null,a,fe)}}for(var se in a){var le=a[se];if(fe=r[se],a.hasOwnProperty(se)&&(le!=null||fe!=null))switch(se){case"type":m=le;break;case"name":d=le;break;case"checked":re=le;break;case"defaultChecked":ue=le;break;case"value":k=le;break;case"defaultValue":N=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(o(137,i));break;default:le!==fe&&mt(e,i,se,le,a,fe)}}Fa(e,k,N,G,re,ue,m,d);return;case"select":le=k=N=se=null;for(m in r)if(G=r[m],r.hasOwnProperty(m)&&G!=null)switch(m){case"value":break;case"multiple":le=G;default:a.hasOwnProperty(m)||mt(e,i,m,null,a,G)}for(d in a)if(m=a[d],G=r[d],a.hasOwnProperty(d)&&(m!=null||G!=null))switch(d){case"value":se=m;break;case"defaultValue":N=m;break;case"multiple":k=m;default:m!==G&&mt(e,i,d,m,a,G)}i=N,r=k,a=le,se!=null?bi(e,!!r,se,!1):!!a!=!!r&&(i!=null?bi(e,!!r,i,!0):bi(e,!!r,r?[]:"",!1));return;case"textarea":le=se=null;for(N in r)if(d=r[N],r.hasOwnProperty(N)&&d!=null&&!a.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:mt(e,i,N,null,a,d)}for(k in a)if(d=a[k],m=r[k],a.hasOwnProperty(k)&&(d!=null||m!=null))switch(k){case"value":se=d;break;case"defaultValue":le=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(o(91));break;default:d!==m&&mt(e,i,k,d,a,m)}hl(e,se,le);return;case"option":for(var xe in r)se=r[xe],r.hasOwnProperty(xe)&&se!=null&&!a.hasOwnProperty(xe)&&(xe==="selected"?e.selected=!1:mt(e,i,xe,null,a,se));for(G in a)se=a[G],le=r[G],a.hasOwnProperty(G)&&se!==le&&(se!=null||le!=null)&&(G==="selected"?e.selected=se&&typeof se!="function"&&typeof se!="symbol":mt(e,i,G,se,a,le));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 ze in r)se=r[ze],r.hasOwnProperty(ze)&&se!=null&&!a.hasOwnProperty(ze)&&mt(e,i,ze,null,a,se);for(re in a)if(se=a[re],le=r[re],a.hasOwnProperty(re)&&se!==le&&(se!=null||le!=null))switch(re){case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(o(137,i));break;default:mt(e,i,re,se,a,le)}return;default:if(Dr(i)){for(var vt in r)se=r[vt],r.hasOwnProperty(vt)&&se!==void 0&&!a.hasOwnProperty(vt)&&Vh(e,i,vt,void 0,a,se);for(ue in a)se=a[ue],le=r[ue],!a.hasOwnProperty(ue)||se===le||se===void 0&&le===void 0||Vh(e,i,ue,se,a,le);return}}for(var ie in r)se=r[ie],r.hasOwnProperty(ie)&&se!=null&&!a.hasOwnProperty(ie)&&mt(e,i,ie,null,a,se);for(fe in a)se=a[fe],le=r[fe],!a.hasOwnProperty(fe)||se===le||se==null&&le==null||mt(e,i,fe,se,a,le)}function om(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function d1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,i=0,r=performance.getEntriesByType("resource"),a=0;a<r.length;a++){var d=r[a],m=d.transferSize,k=d.initiatorType,N=d.duration;if(m&&N&&om(k)){for(k=0,N=d.responseEnd,a+=1;a<r.length;a++){var G=r[a],re=G.startTime;if(re>N)break;var ue=G.transferSize,fe=G.initiatorType;ue&&om(fe)&&(G=G.responseEnd,k+=ue*(G<N?1:(N-re)/(G-re)))}if(--a,i+=8*(m+k)/(d.duration/1e3),e++,10<e)break}}if(0<e)return i/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Xh=null,Zh=null;function lc(e){return e.nodeType===9?e:e.ownerDocument}function lm(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function cm(e,i){if(e===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&i==="foreignObject"?0:e}function Qh(e,i){return e==="textarea"||e==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Jh=null;function f1(){var e=window.event;return e&&e.type==="popstate"?e===Jh?!1:(Jh=e,!0):(Jh=null,!1)}var um=typeof setTimeout=="function"?setTimeout:void 0,p1=typeof clearTimeout=="function"?clearTimeout:void 0,hm=typeof Promise=="function"?Promise:void 0,_1=typeof queueMicrotask=="function"?queueMicrotask:typeof hm<"u"?function(e){return hm.resolve(null).then(e).catch(g1)}:um;function g1(e){setTimeout(function(){throw e})}function Zr(e){return e==="head"}function dm(e,i){var r=i,a=0;do{var d=r.nextSibling;if(e.removeChild(r),d&&d.nodeType===8)if(r=d.data,r==="/$"||r==="/&"){if(a===0){e.removeChild(d),ya(i);return}a--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")a++;else if(r==="html")Ao(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,Ao(r);for(var m=r.firstChild;m;){var k=m.nextSibling,N=m.nodeName;m[jn]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&m.rel.toLowerCase()==="stylesheet"||r.removeChild(m),m=k}}else r==="body"&&Ao(e.ownerDocument.body);r=d}while(r);ya(i)}function fm(e,i){var r=e;e=0;do{var a=r.nextSibling;if(r.nodeType===1?i?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(i?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),a&&a.nodeType===8)if(r=a.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=a}while(r)}function ed(e){var i=e.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var r=i;switch(i=i.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":ed(r),Me(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function m1(e,i,r,a){for(;e.nodeType===1;){var d=r;if(e.nodeName.toLowerCase()!==i.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[jn])switch(i){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(m=e.getAttribute("rel"),m==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(m!==d.rel||e.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||e.getAttribute("title")!==(d.title==null?null:d.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(m=e.getAttribute("src"),(m!==(d.src==null?null:d.src)||e.getAttribute("type")!==(d.type==null?null:d.type)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&m&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(i==="input"&&e.type==="hidden"){var m=d.name==null?null:""+d.name;if(d.type==="hidden"&&e.getAttribute("name")===m)return e}else return e;if(e=vn(e.nextSibling),e===null)break}return null}function v1(e,i,r){if(i==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=vn(e.nextSibling),e===null))return null;return e}function pm(e,i){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=vn(e.nextSibling),e===null))return null;return e}function td(e){return e.data==="$?"||e.data==="$~"}function id(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function b1(e,i){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=i;else if(e.data!=="$?"||r.readyState!=="loading")i();else{var a=function(){i(),r.removeEventListener("DOMContentLoaded",a)};r.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function vn(e){for(;e!=null;e=e.nextSibling){var i=e.nodeType;if(i===1||i===3)break;if(i===8){if(i=e.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return e}var nd=null;function _m(e){e=e.nextSibling;for(var i=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(i===0)return vn(e.nextSibling);i--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||i++}e=e.nextSibling}return null}function gm(e){e=e.previousSibling;for(var i=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(i===0)return e;i--}else r!=="/$"&&r!=="/&"||i++}e=e.previousSibling}return null}function mm(e,i,r){switch(i=lc(r),e){case"html":if(e=i.documentElement,!e)throw Error(o(452));return e;case"head":if(e=i.head,!e)throw Error(o(453));return e;case"body":if(e=i.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Ao(e){for(var i=e.attributes;i.length;)e.removeAttributeNode(i[0]);Me(e)}var bn=new Map,vm=new Set;function cc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var yr=Y.d;Y.d={f:S1,r:y1,D:C1,C:w1,L:E1,m:x1,X:A1,S:T1,M:R1};function S1(){var e=yr.f(),i=ec();return e||i}function y1(e){var i=pe(e);i!==null&&i.tag===5&&i.type==="form"?N_(i):yr.r(e)}var va=typeof document>"u"?null:document;function bm(e,i,r){var a=va;if(a&&typeof i=="string"&&i){var d=$i(i);d='link[rel="'+e+'"][href="'+d+'"]',typeof r=="string"&&(d+='[crossorigin="'+r+'"]'),vm.has(d)||(vm.add(d),e={rel:e,crossOrigin:r,href:i},a.querySelector(d)===null&&(i=a.createElement("link"),wi(i,"link",e),Ye(i),a.head.appendChild(i)))}}function C1(e){yr.D(e),bm("dns-prefetch",e,null)}function w1(e,i){yr.C(e,i),bm("preconnect",e,i)}function E1(e,i,r){yr.L(e,i,r);var a=va;if(a&&e&&i){var d='link[rel="preload"][as="'+$i(i)+'"]';i==="image"&&r&&r.imageSrcSet?(d+='[imagesrcset="'+$i(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(d+='[imagesizes="'+$i(r.imageSizes)+'"]')):d+='[href="'+$i(e)+'"]';var m=d;switch(i){case"style":m=ba(e);break;case"script":m=Sa(e)}bn.has(m)||(e=f({rel:"preload",href:i==="image"&&r&&r.imageSrcSet?void 0:e,as:i},r),bn.set(m,e),a.querySelector(d)!==null||i==="style"&&a.querySelector(Ro(m))||i==="script"&&a.querySelector(Lo(m))||(i=a.createElement("link"),wi(i,"link",e),Ye(i),a.head.appendChild(i)))}}function x1(e,i){yr.m(e,i);var r=va;if(r&&e){var a=i&&typeof i.as=="string"?i.as:"script",d='link[rel="modulepreload"][as="'+$i(a)+'"][href="'+$i(e)+'"]',m=d;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Sa(e)}if(!bn.has(m)&&(e=f({rel:"modulepreload",href:e},i),bn.set(m,e),r.querySelector(d)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Lo(m)))return}a=r.createElement("link"),wi(a,"link",e),Ye(a),r.head.appendChild(a)}}}function T1(e,i,r){yr.S(e,i,r);var a=va;if(a&&e){var d=it(a).hoistableStyles,m=ba(e);i=i||"default";var k=d.get(m);if(!k){var N={loading:0,preload:null};if(k=a.querySelector(Ro(m)))N.loading=5;else{e=f({rel:"stylesheet",href:e,"data-precedence":i},r),(r=bn.get(m))&&rd(e,r);var G=k=a.createElement("link");Ye(G),wi(G,"link",e),G._p=new Promise(function(re,ue){G.onload=re,G.onerror=ue}),G.addEventListener("load",function(){N.loading|=1}),G.addEventListener("error",function(){N.loading|=2}),N.loading|=4,uc(k,i,a)}k={type:"stylesheet",instance:k,count:1,state:N},d.set(m,k)}}}function A1(e,i){yr.X(e,i);var r=va;if(r&&e){var a=it(r).hoistableScripts,d=Sa(e),m=a.get(d);m||(m=r.querySelector(Lo(d)),m||(e=f({src:e,async:!0},i),(i=bn.get(d))&&sd(e,i),m=r.createElement("script"),Ye(m),wi(m,"link",e),r.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},a.set(d,m))}}function R1(e,i){yr.M(e,i);var r=va;if(r&&e){var a=it(r).hoistableScripts,d=Sa(e),m=a.get(d);m||(m=r.querySelector(Lo(d)),m||(e=f({src:e,async:!0,type:"module"},i),(i=bn.get(d))&&sd(e,i),m=r.createElement("script"),Ye(m),wi(m,"link",e),r.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},a.set(d,m))}}function Sm(e,i,r,a){var d=(d=me.current)?cc(d):null;if(!d)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(i=ba(r.href),r=it(d).hoistableStyles,a=r.get(i),a||(a={type:"style",instance:null,count:0,state:null},r.set(i,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=ba(r.href);var m=it(d).hoistableStyles,k=m.get(e);if(k||(d=d.ownerDocument||d,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(e,k),(m=d.querySelector(Ro(e)))&&!m._p&&(k.instance=m,k.state.loading=5),bn.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},bn.set(e,r),m||L1(d,e,r,k.state))),i&&a===null)throw Error(o(528,""));return k}if(i&&a!==null)throw Error(o(529,""));return null;case"script":return i=r.async,r=r.src,typeof r=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Sa(r),r=it(d).hoistableScripts,a=r.get(i),a||(a={type:"script",instance:null,count:0,state:null},r.set(i,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function ba(e){return'href="'+$i(e)+'"'}function Ro(e){return'link[rel="stylesheet"]['+e+"]"}function ym(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function L1(e,i,r,a){e.querySelector('link[rel="preload"][as="style"]['+i+"]")?a.loading=1:(i=e.createElement("link"),a.preload=i,i.addEventListener("load",function(){return a.loading|=1}),i.addEventListener("error",function(){return a.loading|=2}),wi(i,"link",r),Ye(i),e.head.appendChild(i))}function Sa(e){return'[src="'+$i(e)+'"]'}function Lo(e){return"script[async]"+e}function Cm(e,i,r){if(i.count++,i.instance===null)switch(i.type){case"style":var a=e.querySelector('style[data-href~="'+$i(r.href)+'"]');if(a)return i.instance=a,Ye(a),a;var d=f({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Ye(a),wi(a,"style",d),uc(a,r.precedence,e),i.instance=a;case"stylesheet":d=ba(r.href);var m=e.querySelector(Ro(d));if(m)return i.state.loading|=4,i.instance=m,Ye(m),m;a=ym(r),(d=bn.get(d))&&rd(a,d),m=(e.ownerDocument||e).createElement("link"),Ye(m);var k=m;return k._p=new Promise(function(N,G){k.onload=N,k.onerror=G}),wi(m,"link",a),i.state.loading|=4,uc(m,r.precedence,e),i.instance=m;case"script":return m=Sa(r.src),(d=e.querySelector(Lo(m)))?(i.instance=d,Ye(d),d):(a=r,(d=bn.get(m))&&(a=f({},r),sd(a,d)),e=e.ownerDocument||e,d=e.createElement("script"),Ye(d),wi(d,"link",a),e.head.appendChild(d),i.instance=d);case"void":return null;default:throw Error(o(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(a=i.instance,i.state.loading|=4,uc(a,r.precedence,e));return i.instance}function uc(e,i,r){for(var a=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=a.length?a[a.length-1]:null,m=d,k=0;k<a.length;k++){var N=a[k];if(N.dataset.precedence===i)m=N;else if(m!==d)break}m?m.parentNode.insertBefore(e,m.nextSibling):(i=r.nodeType===9?r.head:r,i.insertBefore(e,i.firstChild))}function rd(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.title==null&&(e.title=i.title)}function sd(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.integrity==null&&(e.integrity=i.integrity)}var hc=null;function wm(e,i,r){if(hc===null){var a=new Map,d=hc=new Map;d.set(r,a)}else d=hc,a=d.get(r),a||(a=new Map,d.set(r,a));if(a.has(e))return a;for(a.set(e,null),r=r.getElementsByTagName(e),d=0;d<r.length;d++){var m=r[d];if(!(m[jn]||m[xt]||e==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var k=m.getAttribute(i)||"";k=e+k;var N=a.get(k);N?N.push(m):a.set(k,[m])}}return a}function Em(e,i,r){e=e.ownerDocument||e,e.head.insertBefore(r,i==="title"?e.querySelector("head > title"):null)}function k1(e,i,r){if(r===1||i.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(e=i.disabled,typeof i.precedence=="string"&&e==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function xm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function M1(e,i,r,a){if(r.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var d=ba(a.href),m=i.querySelector(Ro(d));if(m){i=m._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(e.count++,e=dc.bind(e),i.then(e,e)),r.state.loading|=4,r.instance=m,Ye(m);return}m=i.ownerDocument||i,a=ym(a),(d=bn.get(d))&&rd(a,d),m=m.createElement("link"),Ye(m);var k=m;k._p=new Promise(function(N,G){k.onload=N,k.onerror=G}),wi(m,"link",a),r.instance=m}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,i),(i=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=dc.bind(e),i.addEventListener("load",r),i.addEventListener("error",r))}}var ad=0;function D1(e,i){return e.stylesheets&&e.count===0&&pc(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var a=setTimeout(function(){if(e.stylesheets&&pc(e,e.stylesheets),e.unsuspend){var m=e.unsuspend;e.unsuspend=null,m()}},6e4+i);0<e.imgBytes&&ad===0&&(ad=62500*d1());var d=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&pc(e,e.stylesheets),e.unsuspend)){var m=e.unsuspend;e.unsuspend=null,m()}},(e.imgBytes>ad?50:800)+i);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(d)}}:null}function dc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)pc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var fc=null;function pc(e,i){e.stylesheets=null,e.unsuspend!==null&&(e.count++,fc=new Map,i.forEach(O1,e),fc=null,dc.call(e))}function O1(e,i){if(!(i.state.loading&4)){var r=fc.get(e);if(r)var a=r.get(null);else{r=new Map,fc.set(e,r);for(var d=e.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<d.length;m++){var k=d[m];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(r.set(k.dataset.precedence,k),a=k)}a&&r.set(null,a)}d=i.instance,k=d.getAttribute("data-precedence"),m=r.get(k)||a,m===a&&r.set(null,d),r.set(k,d),this.count++,a=dc.bind(this),d.addEventListener("load",a),d.addEventListener("error",a),m?m.parentNode.insertBefore(d,m.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(d,e.firstChild)),i.state.loading|=4}}var ko={$$typeof:g,Provider:null,Consumer:null,_currentValue:K,_currentValue2:K,_threadCount:0};function B1(e,i,r,a,d,m,k,N,G){this.tag=1,this.containerInfo=e,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=St(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=St(0),this.hiddenUpdates=St(null),this.identifierPrefix=a,this.onUncaughtError=d,this.onCaughtError=m,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=G,this.incompleteTransitions=new Map}function Tm(e,i,r,a,d,m,k,N,G,re,ue,fe){return e=new B1(e,i,r,k,G,re,ue,fe,N),i=1,m===!0&&(i|=24),m=en(3,null,null,i),e.current=m,m.stateNode=e,i=$u(),i.refCount++,e.pooledCache=i,i.refCount++,m.memoizedState={element:a,isDehydrated:r,cache:i},Fu(m),e}function Am(e){return e?(e=Zs,e):Zs}function Rm(e,i,r,a,d,m){d=Am(d),a.context===null?a.context=d:a.pendingContext=d,a=Ur(i),a.payload={element:r},m=m===void 0?null:m,m!==null&&(a.callback=m),r=Pr(e,a,i),r!==null&&(Wi(r,e,i),oo(r,e,i))}function Lm(e,i){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<i?r:i}}function od(e,i){Lm(e,i),(e=e.alternate)&&Lm(e,i)}function km(e){if(e.tag===13||e.tag===31){var i=gs(e,67108864);i!==null&&Wi(i,e,67108864),od(e,67108864)}}function Mm(e){if(e.tag===13||e.tag===31){var i=an();i=Qe(i);var r=gs(e,i);r!==null&&Wi(r,e,i),od(e,i)}}var _c=!0;function N1(e,i,r,a){var d=j.T;j.T=null;var m=Y.p;try{Y.p=2,ld(e,i,r,a)}finally{Y.p=m,j.T=d}}function I1(e,i,r,a){var d=j.T;j.T=null;var m=Y.p;try{Y.p=8,ld(e,i,r,a)}finally{Y.p=m,j.T=d}}function ld(e,i,r,a){if(_c){var d=cd(a);if(d===null)Yh(e,i,a,gc,r),Om(e,a);else if(z1(d,e,i,r,a))a.stopPropagation();else if(Om(e,a),i&4&&-1<H1.indexOf(e)){for(;d!==null;){var m=pe(d);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var k=ti(m.pendingLanes);if(k!==0){var N=m;for(N.pendingLanes|=2,N.entangledLanes|=2;k;){var G=1<<31-zt(k);N.entanglements[1]|=G,k&=~G}Gn(m),(ct&6)===0&&(Ql=lt()+500,Eo(0))}}break;case 31:case 13:N=gs(m,2),N!==null&&Wi(N,m,2),ec(),od(m,2)}if(m=cd(a),m===null&&Yh(e,i,a,gc,r),m===d)break;d=m}d!==null&&a.stopPropagation()}else Yh(e,i,a,null,r)}}function cd(e){return e=Fe(e),ud(e)}var gc=null;function ud(e){if(gc=null,e=q(e),e!==null){var i=y(e);if(i===null)e=null;else{var r=i.tag;if(r===13){if(e=b(i),e!==null)return e;e=null}else if(r===31){if(e=c(i),e!==null)return e;e=null}else if(r===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;e=null}else i!==e&&(e=null)}}return gc=e,null}function Dm(e){switch(e){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(Gt()){case It:return 2;case Ht:return 8;case ei:case Rn:return 32;case Ti:return 268435456;default:return 32}default:return 32}}var hd=!1,Qr=null,Jr=null,es=null,Mo=new Map,Do=new Map,ts=[],H1="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 Om(e,i){switch(e){case"focusin":case"focusout":Qr=null;break;case"dragenter":case"dragleave":Jr=null;break;case"mouseover":case"mouseout":es=null;break;case"pointerover":case"pointerout":Mo.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Do.delete(i.pointerId)}}function Oo(e,i,r,a,d,m){return e===null||e.nativeEvent!==m?(e={blockedOn:i,domEventName:r,eventSystemFlags:a,nativeEvent:m,targetContainers:[d]},i!==null&&(i=pe(i),i!==null&&km(i)),e):(e.eventSystemFlags|=a,i=e.targetContainers,d!==null&&i.indexOf(d)===-1&&i.push(d),e)}function z1(e,i,r,a,d){switch(i){case"focusin":return Qr=Oo(Qr,e,i,r,a,d),!0;case"dragenter":return Jr=Oo(Jr,e,i,r,a,d),!0;case"mouseover":return es=Oo(es,e,i,r,a,d),!0;case"pointerover":var m=d.pointerId;return Mo.set(m,Oo(Mo.get(m)||null,e,i,r,a,d)),!0;case"gotpointercapture":return m=d.pointerId,Do.set(m,Oo(Do.get(m)||null,e,i,r,a,d)),!0}return!1}function Bm(e){var i=q(e.target);if(i!==null){var r=y(i);if(r!==null){if(i=r.tag,i===13){if(i=b(r),i!==null){e.blockedOn=i,nr(e.priority,function(){Mm(r)});return}}else if(i===31){if(i=c(r),i!==null){e.blockedOn=i,nr(e.priority,function(){Mm(r)});return}}else if(i===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function mc(e){if(e.blockedOn!==null)return!1;for(var i=e.targetContainers;0<i.length;){var r=cd(e.nativeEvent);if(r===null){r=e.nativeEvent;var a=new r.constructor(r.type,r);Ae=a,r.target.dispatchEvent(a),Ae=null}else return i=pe(r),i!==null&&km(i),e.blockedOn=r,!1;i.shift()}return!0}function Nm(e,i,r){mc(e)&&r.delete(i)}function $1(){hd=!1,Qr!==null&&mc(Qr)&&(Qr=null),Jr!==null&&mc(Jr)&&(Jr=null),es!==null&&mc(es)&&(es=null),Mo.forEach(Nm),Do.forEach(Nm)}function vc(e,i){e.blockedOn===i&&(e.blockedOn=null,hd||(hd=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,$1)))}var bc=null;function Im(e){bc!==e&&(bc=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){bc===e&&(bc=null);for(var i=0;i<e.length;i+=3){var r=e[i],a=e[i+1],d=e[i+2];if(typeof a!="function"){if(ud(a||r)===null)continue;break}var m=pe(r);m!==null&&(e.splice(i,3),i-=3,ch(m,{pending:!0,data:d,method:r.method,action:a},a,d))}}))}function ya(e){function i(G){return vc(G,e)}Qr!==null&&vc(Qr,e),Jr!==null&&vc(Jr,e),es!==null&&vc(es,e),Mo.forEach(i),Do.forEach(i);for(var r=0;r<ts.length;r++){var a=ts[r];a.blockedOn===e&&(a.blockedOn=null)}for(;0<ts.length&&(r=ts[0],r.blockedOn===null);)Bm(r),r.blockedOn===null&&ts.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(a=0;a<r.length;a+=3){var d=r[a],m=r[a+1],k=d[wt]||null;if(typeof m=="function")k||Im(r);else if(k){var N=null;if(m&&m.hasAttribute("formAction")){if(d=m,k=m[wt]||null)N=k.formAction;else if(ud(d)!==null)continue}else N=k.action;typeof N=="function"?r[a+1]=N:(r.splice(a,3),a-=3),Im(r)}}}function Hm(){function e(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(k){return d=k})},focusReset:"manual",scroll:"manual"})}function i(){d!==null&&(d(),d=null),a||setTimeout(r,20)}function r(){if(!a&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,d=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(r,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),d!==null&&(d(),d=null)}}}function dd(e){this._internalRoot=e}Sc.prototype.render=dd.prototype.render=function(e){var i=this._internalRoot;if(i===null)throw Error(o(409));var r=i.current,a=an();Rm(r,a,e,i,null,null)},Sc.prototype.unmount=dd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var i=e.containerInfo;Rm(e.current,2,null,e,null,null),ec(),i[kn]=null}};function Sc(e){this._internalRoot=e}Sc.prototype.unstable_scheduleHydration=function(e){if(e){var i=ir();e={blockedOn:null,target:e,priority:i};for(var r=0;r<ts.length&&i!==0&&i<ts[r].priority;r++);ts.splice(r,0,e),r===0&&Bm(e)}};var zm=n.version;if(zm!=="19.2.7")throw Error(o(527,zm,"19.2.7"));Y.findDOMNode=function(e){var i=e._reactInternals;if(i===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=h(i),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var U1={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var yc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yc.isDisabled&&yc.supportsFiber)try{Ii=yc.inject(U1),Kt=yc}catch{}}return No.createRoot=function(e,i){if(!l(e))throw Error(o(299));var r=!1,a="",d=W_,m=G_,k=K_;return i!=null&&(i.unstable_strictMode===!0&&(r=!0),i.identifierPrefix!==void 0&&(a=i.identifierPrefix),i.onUncaughtError!==void 0&&(d=i.onUncaughtError),i.onCaughtError!==void 0&&(m=i.onCaughtError),i.onRecoverableError!==void 0&&(k=i.onRecoverableError)),i=Tm(e,1,!1,null,null,r,a,null,d,m,k,Hm),e[kn]=i.current,Kh(e),new dd(i)},No.hydrateRoot=function(e,i,r){if(!l(e))throw Error(o(299));var a=!1,d="",m=W_,k=G_,N=K_,G=null;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(d=r.identifierPrefix),r.onUncaughtError!==void 0&&(m=r.onUncaughtError),r.onCaughtError!==void 0&&(k=r.onCaughtError),r.onRecoverableError!==void 0&&(N=r.onRecoverableError),r.formState!==void 0&&(G=r.formState)),i=Tm(e,1,!0,i,r??null,a,d,G,m,k,N,Hm),i.context=Am(null),r=i.current,a=an(),a=Qe(a),d=Ur(a),d.callback=null,Pr(r,d,a),r=a,i.current.lanes=r,dt(i,r),Gn(i),e[kn]=i.current,Kh(e),new Sc(i)},No.version="19.2.7",No}var Ym;function Z1(){if(Ym)return _d.exports;Ym=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),_d.exports=X1(),_d.exports}var Q1=Z1();var Vm="popstate";function Xm(t){return typeof t=="object"&&t!=null&&"pathname"in t&&"search"in t&&"hash"in t&&"state"in t&&"key"in t}function J1(t={}){function n(o,l){let y=l.state?.masked,{pathname:b,search:c,hash:u}=y||o.location;return Qd("",{pathname:b,search:c,hash:u},l.state&&l.state.usr||null,l.state&&l.state.key||"default",y?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function s(o,l){return typeof l=="string"?l:nl(l)}return tC(n,s,null,t)}function Ot(t,n){if(t===!1||t===null||typeof t>"u")throw new Error(n)}function zn(t,n){if(!t){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function eC(){return Math.random().toString(36).substring(2,10)}function Zm(t,n){return{usr:t.state,key:t.key,idx:n,masked:t.mask?{pathname:t.pathname,search:t.search,hash:t.hash}:void 0}}function Qd(t,n,s=null,o,l){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof n=="string"?Ba(n):n,state:s,key:n&&n.key||o||eC(),mask:l}}function nl({pathname:t="/",search:n="",hash:s=""}){return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),s&&s!=="#"&&(t+=s.charAt(0)==="#"?s:"#"+s),t}function Ba(t){let n={};if(t){let s=t.indexOf("#");s>=0&&(n.hash=t.substring(s),t=t.substring(0,s));let o=t.indexOf("?");o>=0&&(n.search=t.substring(o),t=t.substring(0,o)),t&&(n.pathname=t)}return n}function tC(t,n,s,o={}){let{window:l=document.defaultView,v5Compat:y=!1}=o,b=l.history,c="POP",u=null,h=v();h==null&&(h=0,b.replaceState({...b.state,idx:h},""));function v(){return(b.state||{idx:null}).idx}function f(){c="POP";let p=v(),S=p==null?null:p-h;h=p,u&&u({action:c,location:E.location,delta:S})}function C(p,S){c="PUSH";let _=Xm(p)?p:Qd(E.location,p,S);h=v()+1;let g=Zm(_,h),w=E.createHref(_.mask||_);try{b.pushState(g,"",w)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;l.location.assign(w)}y&&u&&u({action:c,location:E.location,delta:1})}function x(p,S){c="REPLACE";let _=Xm(p)?p:Qd(E.location,p,S);h=v();let g=Zm(_,h),w=E.createHref(_.mask||_);b.replaceState(g,"",w),y&&u&&u({action:c,location:E.location,delta:0})}function A(p){return iC(l,p)}let E={get action(){return c},get location(){return t(l,b)},listen(p){if(u)throw new Error("A history only accepts one active listener");return l.addEventListener(Vm,f),u=p,()=>{l.removeEventListener(Vm,f),u=null}},createHref(p){return n(l,p)},createURL:A,encodeLocation(p){let S=A(p);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:C,replace:x,go(p){return b.go(p)}};return E}function iC(t,n,s=!1){let o="http://localhost";t&&(o=t.location.origin!=="null"?t.location.origin:t.location.href),Ot(o,"No window.location.(origin|href) available to create URL");let l=typeof n=="string"?n:nl(n);return l=l.replace(/ $/,"%20"),!s&&l.startsWith("//")&&(l=o+l),new URL(l,o)}function R0(t,n,s="/"){return nC(t,n,s,!1)}function nC(t,n,s,o,l){let y=typeof n=="string"?Ba(n):n,b=Lr(y.pathname||"/",s);if(b==null)return null;let c=rC(t),u=null,h=gC(b);for(let v=0;u==null&&v<c.length;++v)u=pC(c[v],h,o);return u}function rC(t){let n=L0(t);return sC(n),n}function L0(t,n=[],s=[],o="",l=!1){let y=(b,c,u=l,h)=>{let v={relativePath:h===void 0?b.path||"":h,caseSensitive:b.caseSensitive===!0,childrenIndex:c,route:b};if(v.relativePath.startsWith("/")){if(!v.relativePath.startsWith(o)&&u)return;Ot(v.relativePath.startsWith(o),`Absolute route path "${v.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(o.length)}let f=Hn([o,v.relativePath]),C=s.concat(v);b.children&&b.children.length>0&&(Ot(b.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),L0(b.children,n,C,f,u)),!(b.path==null&&!b.index)&&n.push({path:f,score:dC(f,b.index),routesMeta:C})};return t.forEach((b,c)=>{if(b.path===""||!b.path?.includes("?"))y(b,c);else for(let u of k0(b.path))y(b,c,!0,u)}),n}function k0(t){let n=t.split("/");if(n.length===0)return[];let[s,...o]=n,l=s.endsWith("?"),y=s.replace(/\?$/,"");if(o.length===0)return l?[y,""]:[y];let b=k0(o.join("/")),c=[];return c.push(...b.map(u=>u===""?y:[y,u].join("/"))),l&&c.push(...b),c.map(u=>t.startsWith("/")&&u===""?"/":u)}function sC(t){t.sort((n,s)=>n.score!==s.score?s.score-n.score:fC(n.routesMeta.map(o=>o.childrenIndex),s.routesMeta.map(o=>o.childrenIndex)))}var aC=/^:[\w-]+$/,oC=3,lC=2,cC=1,uC=10,hC=-2,Qm=t=>t==="*";function dC(t,n){let s=t.split("/"),o=s.length;return s.some(Qm)&&(o+=hC),n&&(o+=lC),s.filter(l=>!Qm(l)).reduce((l,y)=>l+(aC.test(y)?oC:y===""?cC:uC),o)}function fC(t,n){return t.length===n.length&&t.slice(0,-1).every((o,l)=>o===n[l])?t[t.length-1]-n[n.length-1]:0}function pC(t,n,s=!1){let{routesMeta:o}=t,l={},y="/",b=[];for(let c=0;c<o.length;++c){let u=o[c],h=c===o.length-1,v=y==="/"?n:n.slice(y.length)||"/",f=Wc({path:u.relativePath,caseSensitive:u.caseSensitive,end:h},v),C=u.route;if(!f&&h&&s&&!o[o.length-1].route.index&&(f=Wc({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},v)),!f)return null;Object.assign(l,f.params),b.push({params:l,pathname:Hn([y,f.pathname]),pathnameBase:SC(Hn([y,f.pathnameBase])),route:C}),f.pathnameBase!=="/"&&(y=Hn([y,f.pathnameBase]))}return b}function Wc(t,n){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[s,o]=_C(t.path,t.caseSensitive,t.end),l=n.match(s);if(!l)return null;let y=l[0],b=y.replace(/(.)\/+$/,"$1"),c=l.slice(1);return{params:o.reduce((h,{paramName:v,isOptional:f},C)=>{if(v==="*"){let A=c[C]||"";b=y.slice(0,y.length-A.length).replace(/(.)\/+$/,"$1")}const x=c[C];return f&&!x?h[v]=void 0:h[v]=(x||"").replace(/%2F/g,"/"),h},{}),pathname:y,pathnameBase:b,pattern:t}}function _C(t,n=!1,s=!0){zn(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let o=[],l="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(b,c,u,h,v)=>{if(o.push({paramName:c,isOptional:u!=null}),u){let f=v.charAt(h+b.length);return f&&f!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(o.push({paramName:"*"}),l+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?l+="\\/*$":t!==""&&t!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,n?void 0:"i"),o]}function gC(t){try{return t.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return zn(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),t}}function Lr(t,n){if(n==="/")return t;if(!t.toLowerCase().startsWith(n.toLowerCase()))return null;let s=n.endsWith("/")?n.length-1:n.length,o=t.charAt(s);return o&&o!=="/"?null:t.slice(s)||"/"}var mC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function vC(t,n="/"){let{pathname:s,search:o="",hash:l=""}=typeof t=="string"?Ba(t):t,y;return s?(s=M0(s),s.startsWith("/")?y=Jm(s.substring(1),"/"):y=Jm(s,n)):y=n,{pathname:y,search:yC(o),hash:CC(l)}}function Jm(t,n){let s=Gc(n).split("/");return t.split("/").forEach(l=>{l===".."?s.length>1&&s.pop():l!=="."&&s.push(l)}),s.length>1?s.join("/"):"/"}function bd(t,n,s,o){return`Cannot include a '${t}' character in a manually specified \`to.${n}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function bC(t){return t.filter((n,s)=>s===0||n.route.path&&n.route.path.length>0)}function Lf(t){let n=bC(t);return n.map((s,o)=>o===n.length-1?s.pathname:s.pathnameBase)}function ru(t,n,s,o=!1){let l;typeof t=="string"?l=Ba(t):(l={...t},Ot(!l.pathname||!l.pathname.includes("?"),bd("?","pathname","search",l)),Ot(!l.pathname||!l.pathname.includes("#"),bd("#","pathname","hash",l)),Ot(!l.search||!l.search.includes("#"),bd("#","search","hash",l)));let y=t===""||l.pathname==="",b=y?"/":l.pathname,c;if(b==null)c=s;else{let f=n.length-1;if(!o&&b.startsWith("..")){let C=b.split("/");for(;C[0]==="..";)C.shift(),f-=1;l.pathname=C.join("/")}c=f>=0?n[f]:"/"}let u=vC(l,c),h=b&&b!=="/"&&b.endsWith("/"),v=(y||b===".")&&s.endsWith("/");return!u.pathname.endsWith("/")&&(h||v)&&(u.pathname+="/"),u}var M0=t=>t.replace(/\/\/+/g,"/"),Hn=t=>M0(t.join("/")),Gc=t=>t.replace(/\/+$/,""),SC=t=>Gc(t).replace(/^\/*/,"/"),yC=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,CC=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,wC=class{constructor(t,n,s,o=!1){this.status=t,this.statusText=n||"",this.internal=o,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function EC(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function xC(t){let n=t.map(s=>s.route.path).filter(Boolean);return Hn(n)||"/"}var D0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function O0(t,n){let s=t;if(typeof s!="string"||!mC.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let o=s,l=!1;if(D0)try{let y=new URL(window.location.href),b=s.startsWith("//")?new URL(y.protocol+s):new URL(s),c=Lr(b.pathname,n);b.origin===y.origin&&c!=null?s=c+b.search+b.hash:l=!0}catch{zn(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:l,to:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var B0=["POST","PUT","PATCH","DELETE"];new Set(B0);var TC=["GET",...B0];new Set(TC);var Na=te.createContext(null);Na.displayName="DataRouter";var su=te.createContext(null);su.displayName="DataRouterState";var N0=te.createContext(!1);function AC(){return te.useContext(N0)}var I0=te.createContext({isTransitioning:!1});I0.displayName="ViewTransition";var RC=te.createContext(new Map);RC.displayName="Fetchers";var LC=te.createContext(null);LC.displayName="Await";var ln=te.createContext(null);ln.displayName="Navigation";var al=te.createContext(null);al.displayName="Location";var Zn=te.createContext({outlet:null,matches:[],isDataRoute:!1});Zn.displayName="Route";var kf=te.createContext(null);kf.displayName="RouteError";var H0="REACT_ROUTER_ERROR",kC="REDIRECT",MC="ROUTE_ERROR_RESPONSE";function DC(t){if(t.startsWith(`${H0}:${kC}:{`))try{let n=JSON.parse(t.slice(28));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.location=="string"&&typeof n.reloadDocument=="boolean"&&typeof n.replace=="boolean")return n}catch{}}function OC(t){if(t.startsWith(`${H0}:${MC}:{`))try{let n=JSON.parse(t.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new wC(n.status,n.statusText,n.data)}catch{}}function BC(t,{relative:n}={}){Ot(Ia(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:o}=te.useContext(ln),{hash:l,pathname:y,search:b}=ol(t,{relative:n}),c=y;return s!=="/"&&(c=y==="/"?s:Hn([s,y])),o.createHref({pathname:c,search:b,hash:l})}function Ia(){return te.useContext(al)!=null}function Un(){return Ot(Ia(),"useLocation() may be used only in the context of a <Router> component."),te.useContext(al).location}var z0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function $0(t){te.useContext(ln).static||te.useLayoutEffect(t)}function U0(){let{isDataRoute:t}=te.useContext(Zn);return t?KC():NC()}function NC(){Ot(Ia(),"useNavigate() may be used only in the context of a <Router> component.");let t=te.useContext(Na),{basename:n,navigator:s}=te.useContext(ln),{matches:o}=te.useContext(Zn),{pathname:l}=Un(),y=JSON.stringify(Lf(o)),b=te.useRef(!1);return $0(()=>{b.current=!0}),te.useCallback((u,h={})=>{if(zn(b.current,z0),!b.current)return;if(typeof u=="number"){s.go(u);return}let v=ru(u,JSON.parse(y),l,h.relative==="path");t==null&&n!=="/"&&(v.pathname=v.pathname==="/"?n:Hn([n,v.pathname])),(h.replace?s.replace:s.push)(v,h.state,h)},[n,s,y,l,t])}te.createContext(null);function ol(t,{relative:n}={}){let{matches:s}=te.useContext(Zn),{pathname:o}=Un(),l=JSON.stringify(Lf(s));return te.useMemo(()=>ru(t,JSON.parse(l),o,n==="path"),[t,l,o,n])}function IC(t,n){return P0(t,n)}function P0(t,n,s){Ot(Ia(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=te.useContext(ln),{matches:l}=te.useContext(Zn),y=l[l.length-1],b=y?y.params:{},c=y?y.pathname:"/",u=y?y.pathnameBase:"/",h=y&&y.route;{let p=h&&h.path||"";F0(c,!h||p.endsWith("*")||p.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${p}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
10
10
|
|
|
11
|
-
Please change the parent <Route path="${p}"> to <Route path="${p==="/"?"*":`${p}/*`}">.`)}let v=Un(),f;if(n){let p=typeof n=="string"?Ba(n):n;Ot(u==="/"||p.pathname?.startsWith(u),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${p.pathname}" was given in the \`location\` prop.`),f=p}else f=v;let C=f.pathname||"/",x=C;if(u!=="/"){let p=u.replace(/^\//,"").split("/");x="/"+C.replace(/^\//,"").split("/").slice(p.length).join("/")}let A=s&&s.state.matches.length?s.state.matches.map(p=>Object.assign(p,{route:s.manifest[p.route.id]||p.route})):R0(i,{pathname:x});zn(h||A!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),zn(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let E=UC(A&&A.map(p=>Object.assign({},p,{params:Object.assign({},b,p.params),pathname:Hn([u,o.encodeLocation?o.encodeLocation(p.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:p.pathname]),pathnameBase:p.pathnameBase==="/"?u:Hn([u,o.encodeLocation?o.encodeLocation(p.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:p.pathnameBase])})),l,s);return n&&E?te.createElement(al.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...f},navigationType:"POP"}},E):E}function IC(){let i=WC(),n=wC(i)?`${i.status} ${i.statusText}`:i instanceof Error?i.message:JSON.stringify(i),s=i instanceof Error?i.stack:null,o="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:o},y={padding:"2px 4px",backgroundColor:o},b=null;return console.error("Error handled by React Router default ErrorBoundary:",i),b=te.createElement(te.Fragment,null,te.createElement("p",null,"💿 Hey developer 👋"),te.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",te.createElement("code",{style:y},"ErrorBoundary")," or"," ",te.createElement("code",{style:y},"errorElement")," prop on your route.")),te.createElement(te.Fragment,null,te.createElement("h2",null,"Unexpected Application Error!"),te.createElement("h3",{style:{fontStyle:"italic"}},n),s?te.createElement("pre",{style:l},s):null,b)}var HC=te.createElement(IC,null),j0=class extends te.Component{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,n){return n.location!==i.location||n.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:n.error,location:n.location,revalidation:i.revalidation||n.revalidation}}componentDidCatch(i,n){this.props.onError?this.props.onError(i,n):console.error("React Router caught the following error during render",i)}render(){let i=this.state.error;if(this.context&&typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){const s=DC(i.digest);s&&(i=s)}let n=i!==void 0?te.createElement(Zn.Provider,{value:this.props.routeContext},te.createElement(kf.Provider,{value:i,children:this.props.component})):this.props.children;return this.context?te.createElement(zC,{error:i},n):n}};j0.contextType=N0;var Sd=new WeakMap;function zC({children:i,error:n}){let{basename:s}=te.useContext(ln);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let o=MC(n.digest);if(o){let l=Sd.get(n);if(l)throw l;let y=O0(o.location,s);if(D0&&!Sd.get(n))if(y.isExternal||o.reloadDocument)window.location.href=y.absoluteURL||y.to;else{const b=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(y.to,{replace:o.replace}));throw Sd.set(n,b),b}return te.createElement("meta",{httpEquiv:"refresh",content:`0;url=${y.absoluteURL||y.to}`})}}return i}function $C({routeContext:i,match:n,children:s}){let o=te.useContext(Na);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),te.createElement(Zn.Provider,{value:i},s)}function UC(i,n=[],s){let o=s?.state;if(i==null){if(!o)return null;if(o.errors)i=o.matches;else if(n.length===0&&!o.initialized&&o.matches.length>0)i=o.matches;else return null}let l=i,y=o?.errors;if(y!=null){let v=l.findIndex(f=>f.route.id&&y?.[f.route.id]!==void 0);Ot(v>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(y).join(",")}`),l=l.slice(0,Math.min(l.length,v+1))}let b=!1,c=-1;if(s&&o){b=o.renderFallback;for(let v=0;v<l.length;v++){let f=l[v];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=v),f.route.id){let{loaderData:C,errors:x}=o,A=f.route.loader&&!C.hasOwnProperty(f.route.id)&&(!x||x[f.route.id]===void 0);if(f.route.lazy||A){s.isStatic&&(b=!0),c>=0?l=l.slice(0,c+1):l=[l[0]];break}}}}let u=s?.onError,h=o&&u?(v,f)=>{u(v,{location:o.location,params:o.matches?.[0]?.params??{},pattern:EC(o.matches),errorInfo:f})}:void 0;return l.reduceRight((v,f,C)=>{let x,A=!1,E=null,p=null;o&&(x=y&&f.route.id?y[f.route.id]:void 0,E=f.route.errorElement||HC,b&&(c<0&&C===0?(F0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),A=!0,p=null):c===C&&(A=!0,p=f.route.hydrateFallbackElement||null)));let S=n.concat(l.slice(0,C+1)),_=()=>{let g;return x?g=E:A?g=p:f.route.Component?g=te.createElement(f.route.Component,null):f.route.element?g=f.route.element:g=v,te.createElement($C,{match:f,routeContext:{outlet:v,matches:S,isDataRoute:o!=null},children:g})};return o&&(f.route.ErrorBoundary||f.route.errorElement||C===0)?te.createElement(j0,{location:o.location,revalidation:o.revalidation,component:E,error:x,children:_(),routeContext:{outlet:null,matches:S,isDataRoute:!0},onError:h}):_()},null)}function Mf(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function PC(i){let n=te.useContext(Na);return Ot(n,Mf(i)),n}function jC(i){let n=te.useContext(su);return Ot(n,Mf(i)),n}function FC(i){let n=te.useContext(Zn);return Ot(n,Mf(i)),n}function Df(i){let n=FC(i),s=n.matches[n.matches.length-1];return Ot(s.route.id,`${i} can only be used on routes that contain a unique "id"`),s.route.id}function qC(){return Df("useRouteId")}function WC(){let i=te.useContext(kf),n=jC("useRouteError"),s=Df("useRouteError");return i!==void 0?i:n.errors?.[s]}function GC(){let{router:i}=PC("useNavigate"),n=Df("useNavigate"),s=te.useRef(!1);return $0(()=>{s.current=!0}),te.useCallback(async(l,y={})=>{zn(s.current,z0),s.current&&(typeof l=="number"?await i.navigate(l):await i.navigate(l,{fromRouteId:n,...y}))},[i,n])}var ev={};function F0(i,n,s){!n&&!ev[i]&&(ev[i]=!0,zn(!1,s))}te.memo(KC);function KC({routes:i,manifest:n,future:s,state:o,isStatic:l,onError:y}){return P0(i,void 0,{manifest:n,state:o,isStatic:l,onError:y})}function YC({to:i,replace:n,state:s,relative:o}){Ot(Ia(),"<Navigate> may be used only in the context of a <Router> component.");let{static:l}=te.useContext(ln);zn(!l,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:y}=te.useContext(Zn),{pathname:b}=Un(),c=U0(),u=ru(i,Lf(y),b,o==="path"),h=JSON.stringify(u);return te.useEffect(()=>{c(JSON.parse(h),{replace:n,state:s,relative:o})},[c,h,o,n,s]),null}function Ko(i){Ot(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function VC({basename:i="/",children:n=null,location:s,navigationType:o="POP",navigator:l,static:y=!1,useTransitions:b}){Ot(!Ia(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=i.replace(/^\/*/,"/"),u=te.useMemo(()=>({basename:c,navigator:l,static:y,useTransitions:b,future:{}}),[c,l,y,b]);typeof s=="string"&&(s=Ba(s));let{pathname:h="/",search:v="",hash:f="",state:C=null,key:x="default",mask:A}=s,E=te.useMemo(()=>{let p=Lr(h,c);return p==null?null:{location:{pathname:p,search:v,hash:f,state:C,key:x,mask:A},navigationType:o}},[c,h,v,f,C,x,o,A]);return zn(E!=null,`<Router basename="${c}"> is not able to match the URL "${h}${v}${f}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:te.createElement(ln.Provider,{value:u},te.createElement(al.Provider,{children:n,value:E}))}function XC({children:i,location:n}){return NC(Jd(i),n)}function Jd(i,n=[]){let s=[];return te.Children.forEach(i,(o,l)=>{if(!te.isValidElement(o))return;let y=[...n,l];if(o.type===te.Fragment){s.push.apply(s,Jd(o.props.children,y));return}Ot(o.type===Ko,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ot(!o.props.index||!o.props.children,"An index route cannot have child routes.");let b={id:o.props.id||y.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(b.children=Jd(o.props.children,y)),s.push(b)}),s}var Nc="get",Ic="application/x-www-form-urlencoded";function au(i){return typeof HTMLElement<"u"&&i instanceof HTMLElement}function ZC(i){return au(i)&&i.tagName.toLowerCase()==="button"}function QC(i){return au(i)&&i.tagName.toLowerCase()==="form"}function JC(i){return au(i)&&i.tagName.toLowerCase()==="input"}function ew(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function tw(i,n){return i.button===0&&(!n||n==="_self")&&!ew(i)}var Cc=null;function iw(){if(Cc===null)try{new FormData(document.createElement("form"),0),Cc=!1}catch{Cc=!0}return Cc}var nw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function yd(i){return i!=null&&!nw.has(i)?(zn(!1,`"${i}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ic}"`),null):i}function rw(i,n){let s,o,l,y,b;if(QC(i)){let c=i.getAttribute("action");o=c?Lr(c,n):null,s=i.getAttribute("method")||Nc,l=yd(i.getAttribute("enctype"))||Ic,y=new FormData(i)}else if(ZC(i)||JC(i)&&(i.type==="submit"||i.type==="image")){let c=i.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=i.getAttribute("formaction")||c.getAttribute("action");if(o=u?Lr(u,n):null,s=i.getAttribute("formmethod")||c.getAttribute("method")||Nc,l=yd(i.getAttribute("formenctype"))||yd(c.getAttribute("enctype"))||Ic,y=new FormData(c,i),!iw()){let{name:h,type:v,value:f}=i;if(v==="image"){let C=h?`${h}.`:"";y.append(`${C}x`,"0"),y.append(`${C}y`,"0")}else h&&y.append(h,f)}}else{if(au(i))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=Nc,o=null,l=Ic,b=i}return y&&l==="text/plain"&&(b=y,y=void 0),{action:o,method:s.toLowerCase(),encType:l,formData:y,body:b}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Of(i,n){if(i===!1||i===null||typeof i>"u")throw new Error(n)}function q0(i,n,s,o){let l=typeof i=="string"?new URL(i,typeof window>"u"?"server://singlefetch/":window.location.origin):i;return s?l.pathname.endsWith("/")?l.pathname=`${l.pathname}_.${o}`:l.pathname=`${l.pathname}.${o}`:l.pathname==="/"?l.pathname=`_root.${o}`:n&&Lr(l.pathname,n)==="/"?l.pathname=`${Gc(n)}/_root.${o}`:l.pathname=`${Gc(l.pathname)}.${o}`,l}async function sw(i,n){if(i.id in n)return n[i.id];try{let s=await import(i.module);return n[i.id]=s,s}catch(s){return console.error(`Error loading route module \`${i.module}\`, reloading page...`),console.error(s),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function aw(i){return i==null?!1:i.href==null?i.rel==="preload"&&typeof i.imageSrcSet=="string"&&typeof i.imageSizes=="string":typeof i.rel=="string"&&typeof i.href=="string"}async function ow(i,n,s){let o=await Promise.all(i.map(async l=>{let y=n.routes[l.route.id];if(y){let b=await sw(y,s);return b.links?b.links():[]}return[]}));return hw(o.flat(1).filter(aw).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function tv(i,n,s,o,l,y){let b=(u,h)=>s[h]?u.route.id!==s[h].route.id:!0,c=(u,h)=>s[h].pathname!==u.pathname||s[h].route.path?.endsWith("*")&&s[h].params["*"]!==u.params["*"];return y==="assets"?n.filter((u,h)=>b(u,h)||c(u,h)):y==="data"?n.filter((u,h)=>{let v=o.routes[u.route.id];if(!v||!v.hasLoader)return!1;if(b(u,h)||c(u,h))return!0;if(u.route.shouldRevalidate){let f=u.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:s[0]?.params||{},nextUrl:new URL(i,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function lw(i,n,{includeHydrateFallback:s}={}){return cw(i.map(o=>{let l=n.routes[o.route.id];if(!l)return[];let y=[l.module];return l.clientActionModule&&(y=y.concat(l.clientActionModule)),l.clientLoaderModule&&(y=y.concat(l.clientLoaderModule)),s&&l.hydrateFallbackModule&&(y=y.concat(l.hydrateFallbackModule)),l.imports&&(y=y.concat(l.imports)),y}).flat(1))}function cw(i){return[...new Set(i)]}function uw(i){let n={},s=Object.keys(i).sort();for(let o of s)n[o]=i[o];return n}function hw(i,n){let s=new Set;return new Set(n),i.reduce((o,l)=>{let y=JSON.stringify(uw(l));return s.has(y)||(s.add(y),o.push({key:y,link:l})),o},[])}function Bf(){let i=te.useContext(Na);return Of(i,"You must render this element inside a <DataRouterContext.Provider> element"),i}function dw(){let i=te.useContext(su);return Of(i,"You must render this element inside a <DataRouterStateContext.Provider> element"),i}var Nf=te.createContext(void 0);Nf.displayName="FrameworkContext";function If(){let i=te.useContext(Nf);return Of(i,"You must render this element inside a <HydratedRouter> element"),i}function fw(i,n){let s=te.useContext(Nf),[o,l]=te.useState(!1),[y,b]=te.useState(!1),{onFocus:c,onBlur:u,onMouseEnter:h,onMouseLeave:v,onTouchStart:f}=n,C=te.useRef(null);te.useEffect(()=>{if(i==="render"&&b(!0),i==="viewport"){let E=S=>{S.forEach(_=>{b(_.isIntersecting)})},p=new IntersectionObserver(E,{threshold:.5});return C.current&&p.observe(C.current),()=>{p.disconnect()}}},[i]),te.useEffect(()=>{if(o){let E=setTimeout(()=>{b(!0)},100);return()=>{clearTimeout(E)}}},[o]);let x=()=>{l(!0)},A=()=>{l(!1),b(!1)};return s?i!=="intent"?[y,C,{}]:[y,C,{onFocus:Io(c,x),onBlur:Io(u,A),onMouseEnter:Io(h,x),onMouseLeave:Io(v,A),onTouchStart:Io(f,x)}]:[!1,C,{}]}function Io(i,n){return s=>{i&&i(s),s.defaultPrevented||n(s)}}function pw({page:i,...n}){let s=TC(),{router:o}=Bf(),l=te.useMemo(()=>R0(o.routes,i,o.basename),[o.routes,i,o.basename]);return l?s?te.createElement(gw,{page:i,matches:l,...n}):te.createElement(mw,{page:i,matches:l,...n}):null}function _w(i){let{manifest:n,routeModules:s}=If(),[o,l]=te.useState([]);return te.useEffect(()=>{let y=!1;return ow(i,n,s).then(b=>{y||l(b)}),()=>{y=!0}},[i,n,s]),o}function gw({page:i,matches:n,...s}){let o=Un(),{future:l}=If(),{basename:y}=Bf(),b=te.useMemo(()=>{if(i===o.pathname+o.search+o.hash)return[];let c=q0(i,y,l.v8_trailingSlashAwareDataRequests,"rsc"),u=!1,h=[];for(let v of n)typeof v.route.shouldRevalidate=="function"?u=!0:h.push(v.route.id);return u&&h.length>0&&c.searchParams.set("_routes",h.join(",")),[c.pathname+c.search]},[y,l.v8_trailingSlashAwareDataRequests,i,o,n]);return te.createElement(te.Fragment,null,b.map(c=>te.createElement("link",{key:c,rel:"prefetch",as:"fetch",href:c,...s})))}function mw({page:i,matches:n,...s}){let o=Un(),{future:l,manifest:y,routeModules:b}=If(),{basename:c}=Bf(),{loaderData:u,matches:h}=dw(),v=te.useMemo(()=>tv(i,n,h,y,o,"data"),[i,n,h,y,o]),f=te.useMemo(()=>tv(i,n,h,y,o,"assets"),[i,n,h,y,o]),C=te.useMemo(()=>{if(i===o.pathname+o.search+o.hash)return[];let E=new Set,p=!1;if(n.forEach(_=>{let g=y.routes[_.route.id];!g||!g.hasLoader||(!v.some(w=>w.route.id===_.route.id)&&_.route.id in u&&b[_.route.id]?.shouldRevalidate||g.hasClientLoader?p=!0:E.add(_.route.id))}),E.size===0)return[];let S=q0(i,c,l.v8_trailingSlashAwareDataRequests,"data");return p&&E.size>0&&S.searchParams.set("_routes",n.filter(_=>E.has(_.route.id)).map(_=>_.route.id).join(",")),[S.pathname+S.search]},[c,l.v8_trailingSlashAwareDataRequests,u,o,y,v,n,i,b]),x=te.useMemo(()=>lw(f,y),[f,y]),A=_w(f);return te.createElement(te.Fragment,null,C.map(E=>te.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...s})),x.map(E=>te.createElement("link",{key:E,rel:"modulepreload",href:E,...s})),A.map(({key:E,link:p})=>te.createElement("link",{key:E,nonce:s.nonce,...p,crossOrigin:p.crossOrigin??s.crossOrigin})))}function vw(...i){return n=>{i.forEach(s=>{typeof s=="function"?s(n):s!=null&&(s.current=n)})}}var bw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{bw&&(window.__reactRouterVersion="7.17.0")}catch{}function Sw({basename:i,children:n,useTransitions:s,window:o}){let l=te.useRef();l.current==null&&(l.current=Q1({window:o,v5Compat:!0}));let y=l.current,[b,c]=te.useState({action:y.action,location:y.location}),u=te.useCallback(h=>{s===!1?c(h):te.startTransition(()=>c(h))},[s]);return te.useLayoutEffect(()=>y.listen(u),[y,u]),te.createElement(VC,{basename:i,children:n,location:b.location,navigationType:b.action,navigator:y,useTransitions:s})}var W0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Hf=te.forwardRef(function({onClick:n,discover:s="render",prefetch:o="none",relative:l,reloadDocument:y,replace:b,mask:c,state:u,target:h,to:v,preventScrollReset:f,viewTransition:C,defaultShouldRevalidate:x,...A},E){let{basename:p,navigator:S,useTransitions:_}=te.useContext(ln),g=typeof v=="string"&&W0.test(v),w=O0(v,p);v=w.to;let R=OC(v,{relative:l}),L=Un(),D=null;if(c){let ee=ru(c,[],L.mask?L.mask.pathname:"/",!0);p!=="/"&&(ee.pathname=ee.pathname==="/"?p:Hn([p,ee.pathname])),D=S.createHref(ee)}let[T,B,W]=fw(o,A),P=ww(v,{replace:b,mask:c,state:u,target:h,preventScrollReset:f,relative:l,viewTransition:C,defaultShouldRevalidate:x,useTransitions:_});function F(ee){n&&n(ee),ee.defaultPrevented||P(ee)}let I=!(w.isExternal||y),Z=te.createElement("a",{...A,...W,href:(I?D:void 0)||w.absoluteURL||R,onClick:I?F:n,ref:vw(E,B),target:h,"data-discover":!g&&s==="render"?"true":void 0});return T&&!g?te.createElement(te.Fragment,null,Z,te.createElement(pw,{page:R})):Z});Hf.displayName="Link";var G0=te.forwardRef(function({"aria-current":n="page",caseSensitive:s=!1,className:o="",end:l=!1,style:y,to:b,viewTransition:c,children:u,...h},v){let f=ol(b,{relative:h.relative}),C=Un(),x=te.useContext(su),{navigator:A,basename:E}=te.useContext(ln),p=x!=null&&Rw(f)&&c===!0,S=A.encodeLocation?A.encodeLocation(f).pathname:f.pathname,_=C.pathname,g=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;s||(_=_.toLowerCase(),g=g?g.toLowerCase():null,S=S.toLowerCase()),g&&E&&(g=Lr(g,E)||g);const w=S!=="/"&&S.endsWith("/")?S.length-1:S.length;let R=_===S||!l&&_.startsWith(S)&&_.charAt(w)==="/",L=g!=null&&(g===S||!l&&g.startsWith(S)&&g.charAt(S.length)==="/"),D={isActive:R,isPending:L,isTransitioning:p},T=R?n:void 0,B;typeof o=="function"?B=o(D):B=[o,R?"active":null,L?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let W=typeof y=="function"?y(D):y;return te.createElement(Hf,{...h,"aria-current":T,className:B,ref:v,style:W,to:b,viewTransition:c},typeof u=="function"?u(D):u)});G0.displayName="NavLink";var yw=te.forwardRef(({discover:i="render",fetcherKey:n,navigate:s,reloadDocument:o,replace:l,state:y,method:b=Nc,action:c,onSubmit:u,relative:h,preventScrollReset:v,viewTransition:f,defaultShouldRevalidate:C,...x},A)=>{let{useTransitions:E}=te.useContext(ln),p=Tw(),S=Aw(c,{relative:h}),_=b.toLowerCase()==="get"?"get":"post",g=typeof c=="string"&&W0.test(c),w=R=>{if(u&&u(R),R.defaultPrevented)return;R.preventDefault();let L=R.nativeEvent.submitter,D=L?.getAttribute("formmethod")||b,T=()=>p(L||R.currentTarget,{fetcherKey:n,method:D,navigate:s,replace:l,state:y,relative:h,preventScrollReset:v,viewTransition:f,defaultShouldRevalidate:C});E&&s!==!1?te.startTransition(()=>T()):T()};return te.createElement("form",{ref:A,method:_,action:S,onSubmit:o?u:w,...x,"data-discover":!g&&i==="render"?"true":void 0})});yw.displayName="Form";function Cw(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function K0(i){let n=te.useContext(Na);return Ot(n,Cw(i)),n}function ww(i,{target:n,replace:s,mask:o,state:l,preventScrollReset:y,relative:b,viewTransition:c,defaultShouldRevalidate:u,useTransitions:h}={}){let v=U0(),f=Un(),C=ol(i,{relative:b});return te.useCallback(x=>{if(tw(x,n)){x.preventDefault();let A=s!==void 0?s:nl(f)===nl(C),E=()=>v(i,{replace:A,mask:o,state:l,preventScrollReset:y,relative:b,viewTransition:c,defaultShouldRevalidate:u});h?te.startTransition(()=>E()):E()}},[f,v,C,s,o,l,n,i,y,b,c,u,h])}var Ew=0,xw=()=>`__${String(++Ew)}__`;function Tw(){let{router:i}=K0("useSubmit"),{basename:n}=te.useContext(ln),s=qC(),o=i.fetch,l=i.navigate;return te.useCallback(async(y,b={})=>{let{action:c,method:u,encType:h,formData:v,body:f}=rw(y,n);if(b.navigate===!1){let C=b.fetcherKey||xw();await o(C,s,b.action||c,{defaultShouldRevalidate:b.defaultShouldRevalidate,preventScrollReset:b.preventScrollReset,formData:v,body:f,formMethod:b.method||u,formEncType:b.encType||h,flushSync:b.flushSync})}else await l(b.action||c,{defaultShouldRevalidate:b.defaultShouldRevalidate,preventScrollReset:b.preventScrollReset,formData:v,body:f,formMethod:b.method||u,formEncType:b.encType||h,replace:b.replace,state:b.state,fromRouteId:s,flushSync:b.flushSync,viewTransition:b.viewTransition})},[o,l,n,s])}function Aw(i,{relative:n}={}){let{basename:s}=te.useContext(ln),o=te.useContext(Zn);Ot(o,"useFormAction must be used inside a RouteContext");let[l]=o.matches.slice(-1),y={...ol(i||".",{relative:n})},b=Un();if(i==null){y.search=b.search;let c=new URLSearchParams(y.search),u=c.getAll("index");if(u.some(v=>v==="")){c.delete("index"),u.filter(f=>f).forEach(f=>c.append("index",f));let v=c.toString();y.search=v?`?${v}`:""}}return(!i||i===".")&&l.route.index&&(y.search=y.search?y.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(y.pathname=y.pathname==="/"?s:Hn([s,y.pathname])),nl(y)}function Rw(i,{relative:n}={}){let s=te.useContext(I0);Ot(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=K0("useViewTransitionState"),l=ol(i,{relative:n});if(!s.isTransitioning)return!1;let y=Lr(s.currentLocation.pathname,o)||s.currentLocation.pathname,b=Lr(s.nextLocation.pathname,o)||s.nextLocation.pathname;return Wc(l.pathname,b)!=null||Wc(l.pathname,y)!=null}class cn extends Error{status;constructor(n,s){super(s),this.name="ApiError",this.status=n}}async function Y0(i){const n=await fetch("/observer/tenants",{signal:i});await Tn(n);const s=await n.json();if(!Array.isArray(s.tenants))throw new cn(n.status,"Invalid tenants response");return s.tenants.map(o=>Uw(o,n.status))}async function Lw(i){const n=await fetch("/observer/jobs",{signal:i});return await Tn(n),(await n.json()).tenants}async function kw(i){const n=await fetch("/observer/events",{signal:i});if(await Tn(n),!n.body)throw new cn(n.status,"Observer stream unavailable");return n.body.getReader()}async function Mw(i){const n=await fetch("/observer/theaters",{signal:i});await Tn(n);const s=await n.json();if(!Array.isArray(s.theaters))throw new cn(n.status,"Invalid Theater response");return s.theaters.map(o=>X0(o,n.status))}async function Dw(i,n){const s=i?`?theaterId=${encodeURIComponent(i)}`:"",o=await fetch(`/observer/status${s}`,{signal:n});return await Tn(o),Pw(await o.json(),o.status)}async function Ow(i){const n=await fetch("/observer/carriers",{signal:i});await Tn(n);const s=await n.json();if(!Array.isArray(s.carriers))throw new cn(n.status,"Invalid carrier readiness response");return s.carriers.map(o=>jw(o,n.status))}async function Bw(i){const n=await fetch("/observer/theaters",{method:"POST",signal:i});await Tn(n);const s=await n.json();return typeof s=="object"&&s!==null&&s.cancelled===!0?{cancelled:!0}:X0(s,n.status)}async function Nw(i,n){const s=await fetch(`/observer/theaters/${encodeURIComponent(i)}/sessions`,{method:"POST",signal:n});return await Tn(s),zf(await s.json(),s.status)}async function V0(i,n){const s=await fetch(`/terminal/sessions/${encodeURIComponent(i)}`,{method:"DELETE",signal:n});await Tn(s)}async function Iw(i,n){const s=await fetch(`/terminal/sessions/${encodeURIComponent(i)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({label:n})});return await Tn(s),zf(await s.json(),s.status)}async function Hw(i){const n=await fetch("/terminal/sessions",{signal:i});await Tn(n);const s=await n.json();if(!Array.isArray(s.sessions))throw new cn(n.status,"Invalid terminal sessions response");return s.sessions.map(o=>zf(o,n.status))}async function zw(i,n){const s=$w(n),o=await fetch("/terminal/ticket",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:i,...s.kind?{kind:s.kind}:{}}),signal:s.signal});await Tn(o);const l=await o.json();if(typeof l.ticket!="string"||typeof l.ttlMs!="number")throw new cn(o.status,"Invalid terminal ticket response");return{ticket:l.ticket,ttlMs:l.ttlMs}}function $w(i){return i?i instanceof AbortSignal?{signal:i}:i:{}}function zf(i,n){const s=i;if(!s||typeof s.sessionId!="string"||typeof s.cwdLabel!="string"||typeof s.sequence!="number"||typeof s.status!="string"||typeof s.createdAt!="number"||"cwd"in s||"canonicalCwd"in s)throw new cn(n,"Invalid terminal session response");return{sessionId:s.sessionId,terminalSessionId:typeof s.terminalSessionId=="string"?s.terminalSessionId:s.sessionId,cwdLabel:s.cwdLabel,sequence:s.sequence,label:typeof s.label=="string"?s.label:void 0,status:s.status,createdAt:s.createdAt,theaterId:typeof s.theaterId=="string"?s.theaterId:void 0,tenantId:typeof s.tenantId=="string"?s.tenantId:void 0,registrationId:typeof s.registrationId=="string"?s.registrationId:void 0}}function Uw(i,n){const s=i;if(!s||typeof s.tenantId!="string"||typeof s.tenantLabel!="string"||typeof s.createdAt!="number"||typeof s.sessions!="number"||"cwd"in s)throw new cn(n,"Invalid tenants response");return{tenantId:s.tenantId,tenantLabel:s.tenantLabel,createdAt:s.createdAt,sessions:s.sessions,status:s.status,cliRunId:typeof s.cliRunId=="string"?s.cliRunId:void 0,registrationId:typeof s.registrationId=="string"?s.registrationId:void 0,theaterId:typeof s.theaterId=="string"?s.theaterId:void 0,terminalSessionId:typeof s.terminalSessionId=="string"?s.terminalSessionId:void 0}}function Pw(i,n){const s=i;if(!s||typeof s.workspaces!="number"||typeof s.jobs!="number"||typeof s.version!="string"||s.channel!=="stable"&&s.channel!=="local"&&s.channel!=="unknown"||typeof s.port!="number"||s.wikiServerStatus!=="available"&&s.wikiServerStatus!=="unavailable"&&s.wikiServerStatus!=="unknown"||"token"in s||"path"in s||"cwd"in s||"knowledgeRoot"in s)throw new cn(n,"Invalid observer status response");return{workspaces:s.workspaces,jobs:s.jobs,version:s.version,channel:s.channel,port:s.port,wikiServerStatus:s.wikiServerStatus}}function jw(i,n){const s=i;if(!s||typeof s.carrierId!="string"||typeof s.displayName!="string"||s.role!==null&&typeof s.role!="string"||typeof s.model!="string"||s.effort!==null&&typeof s.effort!="string"||typeof s.taskForceBackendCount!="number"||typeof s.subagentMode!="boolean"||s.category!==void 0&&s.category!=="strategy"&&s.category!=="planning"&&s.category!=="operations"||typeof s.slot!="number"||typeof s.cliType!="string"||"token"in s||"key"in s||"credential"in s||"cwd"in s||"path"in s||"persona"in s||"prompt"in s||"toolAllowlist"in s||"allowedExecutorTools"in s)throw new cn(n,"Invalid carrier readiness response");return{carrierId:s.carrierId,displayName:s.displayName,role:s.role,model:s.model,effort:s.effort,taskForceBackendCount:s.taskForceBackendCount,subagentMode:s.subagentMode,...s.category?{category:s.category}:{},slot:s.slot,cliType:s.cliType}}function X0(i,n){const s=i;if(!s||typeof s.id!="string"||typeof s.label!="string"||"path"in s||typeof s.createdAt!="string"||typeof s.lastOpenedAt!="string"||typeof s.hasWiki!="boolean"||typeof s.activeAdmiralCount!="number")throw new cn(n,"Invalid Theater response");return{id:s.id,label:s.label,createdAt:s.createdAt,lastOpenedAt:s.lastOpenedAt,hasWiki:s.hasWiki,activeAdmiralCount:s.activeAdmiralCount}}async function Tn(i){if(i.ok)return;let n=i.statusText;try{n=(await i.json()).error??n}catch{}throw new cn(i.status,n||`HTTP ${i.status}`)}const iv=120,Fw="active",ef=new Set(["done","error","aborted"]);function qw(i,n){let s=Q0(i,n.jobId,n.updatedAt);for(const o of n.events)s=Z0(s,o);return ef.has(n.status)&&!ef.has(s.status)&&(s={...s,status:n.status}),s}function Z0(i,n){if(n.id<=i.lastEventId)return i;const s=n.event,o={...i,updatedAt:n.at,lastEventId:n.id,recentEvents:Kw(i.recentEvents,n)};switch(n.type){case"job:registered":return Ww(o,s);case"job:finalized":return{...o,status:oi(s.status)??"done",finishedAt:ss(s.finishedAt)??n.at,summary:oi(s.summary),error:oi(s.error)};case"track:begin":return Ca(o,s,l=>({...l,startedAt:ss(s.startedAt)??n.at,requestPreview:oi(s.requestPreview)}));case"track:status":return Ca(o,s,l=>({...l,status:oi(s.status)??l.status}));case"track:text":return Ca(o,s,l=>({...l,status:"stream",text:l.text+(oi(s.text)??""),sentTextLength:l.sentTextLength+(ss(s.textLength)??oi(s.text)?.length??0)}));case"track:thought":return Ca(o,s,l=>({...l,thought:l.thought+(oi(s.text)??""),sentThoughtLength:l.sentThoughtLength+(ss(s.textLength)??oi(s.text)?.length??0)}));case"track:tool":return Ca(o,s,l=>({...l,status:"stream",tools:Gw(l.tools,s)}));case"track:finalized":return Ca(o,s,l=>{const y=nv(l.text,l.sentTextLength,oi(s.fallbackText),ss(s.fallbackTextLength)),b=nv(l.thought,l.sentThoughtLength,oi(s.fallbackThought),ss(s.fallbackThoughtLength));return{...l,status:oi(s.status)??"done",finishedAt:ss(s.finishedAt)??n.at,error:oi(s.error),text:y.text,sentTextLength:y.sentLength,thought:b.text,sentThoughtLength:b.sentLength}});default:return o}}function Q0(i,n,s){return{jobId:n,tenantId:i,status:Fw,updatedAt:s,trackOrder:[],tracks:{},lastEventId:0,recentEvents:[]}}function Jo(i){return ef.has(i)}function Ww(i,n){const s=Array.isArray(n.tracks)?n.tracks:[];let o=i.trackOrder,l=i.tracks;for(const y of s){if(!y.trackId)continue;const b=l[y.trackId],c={...b??J0(y.trackId),displayName:y.displayName??b?.displayName??y.trackId,displayCli:y.displayCli??b?.displayCli,model:y.model??b?.model,effort:y.effort??b?.effort,subtitle:y.subtitle??b?.subtitle,kind:y.kind??b?.kind,startedAt:y.startedAt??b?.startedAt};b||(o=[...o,y.trackId]),l={...l,[y.trackId]:c}}return{...i,label:oi(n.label)??i.label,ownerCarrierId:oi(n.ownerCarrierId)??i.ownerCarrierId,kind:oi(n.kind)??i.kind,startedAt:ss(n.startedAt)??i.startedAt,trackOrder:o,tracks:l}}function Ca(i,n,s){const o=oi(n.trackId);if(!o)return i;const l=i.tracks[o],y=s(l??J0(o));return{...i,trackOrder:l?i.trackOrder:[...i.trackOrder,o],tracks:{...i.tracks,[o]:y}}}function J0(i){return{trackId:i,displayName:i,status:"queued",text:"",thought:"",sentTextLength:0,sentThoughtLength:0,tools:[]}}function nv(i,n,s,o){const l=o??s?.length??0;return s!==void 0&&l>i.length?{text:s,sentLength:Math.max(l,n)}:{text:i,sentLength:Math.max(n,l)}}function Gw(i,n){const s=oi(n.title)??"tool",o=oi(n.status)??"",l=oi(n.toolCallId),y=l??`${s}#${i.length}`;if(l){const b=i.findIndex(c=>c.key===l);if(b>=0){const c=[...i];return c[b]={key:l,title:s,status:o},c}}return[...i,{key:y,title:s,status:o}]}function Kw(i,n){const s=[...i,n];return s.length>iv?s.slice(-iv):s}function oi(i){return typeof i=="string"?i:void 0}function ss(i){return typeof i=="number"&&Number.isFinite(i)?i:void 0}const tf=200,nf="fleet-console.activeTheaterId",eb="fleet-console.activeTheme",Cd="maritime",rf="shell",sf=new Set;let Oe={connection:"connecting",connectionError:null,activeTheme:cb(),tenants:[],theaters:[],activeTheaterId:null,addingTheater:!1,theaterError:null,sessions:{},sessionOrder:[],activeTerminalSessionId:null,creatingTerminalSession:!1,terminalSessionError:null,tenantJobs:{},tenantOrder:[],timelineOpen:!1,shellOpen:!1,selectedJobId:null};function rv(){return Oe}function Yw(i){return sf.add(i),()=>{sf.delete(i)}}function dt(i){Oe={...Oe,...i},ub()}function Vw(){tb(cb())}function Xw(i){SE(i),tb(i),dt({activeTheme:i})}function tb(i){if(!(typeof document>"u")){if(i==="maritime"){document.documentElement.removeAttribute("data-theme");return}document.documentElement.setAttribute("data-theme",i)}}function Zw(i){const n={};for(const l of i)n[l.sessionId]=Uf(l);const s=[...i].sort((l,y)=>y.createdAt-l.createdAt).map(l=>l.sessionId),o=ob(n,Oe.tenants);dt({sessions:o,sessionOrder:s,activeTerminalSessionId:Ha(Oe.activeTheaterId,o,s,Oe.activeTerminalSessionId)})}function Qw(i){const n=vE(i,Oe.activeTheaterId);dt({theaters:i,activeTheaterId:n,activeTerminalSessionId:Ha(n,Oe.sessions,Oe.sessionOrder,Oe.activeTerminalSessionId),selectedJobId:null})}function Jw(i){lb(i),dt({activeTheaterId:i,activeTerminalSessionId:Ha(i,Oe.sessions,Oe.sessionOrder,null),selectedJobId:null})}function eE(){dt({addingTheater:!0,theaterError:null})}function tE(i){const n=[i,...Oe.theaters.filter(s=>s.id!==i.id)];lb(i.id),dt({theaters:n,activeTheaterId:i.id,addingTheater:!1,theaterError:null,activeTerminalSessionId:Ha(i.id,Oe.sessions,Oe.sessionOrder,null),selectedJobId:null})}function iE(){dt({addingTheater:!1,theaterError:null})}function nE(i){dt({addingTheater:!1,theaterError:i})}function rE(i){dt({activeTerminalSessionId:i,selectedJobId:null})}function sE(){dt({creatingTerminalSession:!0,terminalSessionError:null})}function aE(i){const n=Uf(i);dt({sessions:{...Oe.sessions,[n.sessionId]:n},sessionOrder:[n.sessionId,...Oe.sessionOrder.filter(s=>s!==n.sessionId)],activeTerminalSessionId:!Oe.activeTheaterId||Kc(n,Oe.activeTheaterId)?n.sessionId:Oe.activeTerminalSessionId,creatingTerminalSession:!1,terminalSessionError:null,selectedJobId:null})}function ib(i){const n=Oe.sessions[i.sessionId],s=Uf({...n??{},...i}),o=!!n,l={...Oe.sessions,[s.sessionId]:s},y=o?Oe.sessionOrder:[s.sessionId,...Oe.sessionOrder.filter(b=>b!==s.sessionId)];dt({sessions:l,sessionOrder:y,activeTerminalSessionId:Ha(Oe.activeTheaterId,l,y,Oe.activeTerminalSessionId)})}function oE(i){dt({creatingTerminalSession:!1,terminalSessionError:i})}function lE(){dt({timelineOpen:!Oe.timelineOpen})}function nb(){if(Oe.shellOpen){Yo();return}dt({shellOpen:!0})}function Yo(){Oe.shellOpen&&(dt({shellOpen:!1}),V0(rf).catch(()=>{}))}function cE(i){dt({terminalSessionError:i})}function uE(i){dt({terminalSessionError:i})}function rb(i){if(!Oe.sessions[i])return;const n={...Oe.sessions};delete n[i];const s=Oe.sessionOrder.filter(l=>l!==i),o=Oe.activeTerminalSessionId===i;dt({sessions:n,sessionOrder:s,activeTerminalSessionId:o?s[0]??null:Oe.activeTerminalSessionId,selectedJobId:o?null:Oe.selectedJobId})}function hE(i){dt({selectedJobId:Oe.selectedJobId===i?null:i})}function wd(){dt({selectedJobId:null})}function sb(i){const n=new Set(i.map(l=>l.tenantId)),s=ob(Oe.sessions,i),o=[...i.map(l=>l.tenantId),...Oe.tenantOrder.filter(l=>!n.has(l)&&Oe.tenantJobs[l])];dt({tenants:i,sessions:s,tenantOrder:o,activeTerminalSessionId:Ha(Oe.activeTheaterId,s,Oe.sessionOrder,Oe.activeTerminalSessionId)})}function dE(i){const n={},s=[];for(const l of i){const y={};for(const c of l.jobs)y[c.jobId]=qw(l.tenantId,c);const b=Object.values(y).sort((c,u)=>(c.startedAt??c.updatedAt)-(u.startedAt??u.updatedAt)).map(c=>c.jobId);n[l.tenantId]={tenantId:l.tenantId,tenantLabel:l.tenantLabel,jobOrder:b,jobs:y,truncation:l.truncation},s.push(l.tenantId)}const o=[...Oe.tenantOrder.filter(l=>n[l]),...s.filter(l=>!Oe.tenantOrder.includes(l))];dt({tenantJobs:n,tenantOrder:o.length>0?o:s})}function fE(i,n){const s=Oe.tenantJobs[i.tenantId],o=!s&&!Oe.tenants.some(c=>c.tenantId===i.tenantId),l=s??{tenantId:i.tenantId,tenantLabel:n,jobOrder:[],jobs:{},truncation:{droppedCount:0}};let y=n&&l.tenantLabel!==n?{...l,tenantLabel:n}:l;if(i.jobId){const c=y.jobs[i.jobId],u=Z0(c??Q0(i.tenantId,i.jobId,i.at),i),h=c?y.jobOrder:[...y.jobOrder,i.jobId];y={...y,jobs:yE({...y.jobs,[i.jobId]:u},h),jobOrder:h.slice(-tf)}}const b={...Oe.tenantJobs,[i.tenantId]:y};return Oe={...Oe,connection:"live",connectionError:null,tenantJobs:b,tenantOrder:Oe.tenantOrder.includes(i.tenantId)?Oe.tenantOrder:[...Oe.tenantOrder,i.tenantId]},ub(),{unknownTenant:o}}function pE(i,n,s){const o=Oe.tenantJobs[i]??{tenantId:i,tenantLabel:n,jobOrder:[],jobs:{},truncation:{droppedCount:0}};dt({tenantJobs:{...Oe.tenantJobs,[i]:{...o,truncation:s}},tenantOrder:Oe.tenantOrder.includes(i)?Oe.tenantOrder:[...Oe.tenantOrder,i]})}function _E(i){if(!i.selectedJobId||i.activeTheaterId&&i.activeTerminalSessionId&&!$f(i).includes(i.activeTerminalSessionId))return null;const n=gE(i);return n?i.tenantJobs[n]?.jobs[i.selectedJobId]??null:null}function gE(i){return i.activeTerminalSessionId?ab(i.sessions[i.activeTerminalSessionId]):null}function $f(i){return i.activeTheaterId?i.sessionOrder.filter(n=>Kc(i.sessions[n],i.activeTheaterId)):[]}function mE(i,n){const s=ab(n);if(!s)return[];const o=i.tenantJobs[s];if(!o)return[];const l=[];for(const y of o.jobOrder){const b=o.jobs[y];b&&l.push({job:b,tenant:o})}return l}function ab(i){return i?.tenantId??i?.sessionId??null}function Uf(i){return{...i,terminalSessionId:i.terminalSessionId??i.sessionId,status:i.status==="starting"&&i.tenantId?"registered":i.status}}function ob(i,n){const s={...i};for(const o of n){if(!o.terminalSessionId)continue;const l=s[o.terminalSessionId];l&&(s[o.terminalSessionId]={...l,status:o.status==="deregistered"?"closed":"registered",tenantId:o.tenantId,registrationId:o.registrationId,theaterId:o.theaterId??l.theaterId})}return s}function vE(i,n){const s=new Set(i.map(l=>l.id)),o=bE();return o&&s.has(o)?o:n&&s.has(n)?n:i[0]?.id??null}function Ha(i,n,s,o){return i?o&&Kc(n[o],i)?o:s.find(l=>Kc(n[l],i))??null:o&&n[o]?o:s[0]??null}function Kc(i,n){return!i||!n?!1:i.theaterId===n}function bE(){if(typeof window>"u")return null;try{return window.localStorage.getItem(nf)}catch{return null}}function lb(i){if(!(typeof window>"u"))try{i?window.localStorage.setItem(nf,i):window.localStorage.removeItem(nf)}catch{}}function cb(){if(typeof window>"u")return Cd;try{const i=window.localStorage.getItem(eb);return i==="maritime"||i==="carbon"?i:Cd}catch{return Cd}}function SE(i){if(!(typeof window>"u"))try{window.localStorage.setItem(eb,i)}catch{}}function yE(i,n){if(n.length<=tf)return i;const s=new Set(n.slice(-tf)),o={};for(const l of Object.keys(i))s.has(l)&&(o[l]=i[l]);return o}function ub(){for(const i of sf)i()}var Ed={exports:{}},sv;function CE(){return sv||(sv=1,(function(i,n){(function(s,o){i.exports=o()})(self,(()=>(()=>{var s={};return(()=>{var o=s;Object.defineProperty(o,"__esModule",{value:!0}),o.FitAddon=void 0,o.FitAddon=class{activate(l){this._terminal=l}dispose(){}fit(){const l=this.proposeDimensions();if(!l||!this._terminal||isNaN(l.cols)||isNaN(l.rows))return;const y=this._terminal._core;this._terminal.rows===l.rows&&this._terminal.cols===l.cols||(y._renderService.clear(),this._terminal.resize(l.cols,l.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const l=this._terminal._core,y=l._renderService.dimensions;if(y.css.cell.width===0||y.css.cell.height===0)return;const b=this._terminal.options.scrollback===0?0:l.viewport.scrollBarWidth,c=window.getComputedStyle(this._terminal.element.parentElement),u=parseInt(c.getPropertyValue("height")),h=Math.max(0,parseInt(c.getPropertyValue("width"))),v=window.getComputedStyle(this._terminal.element),f=u-(parseInt(v.getPropertyValue("padding-top"))+parseInt(v.getPropertyValue("padding-bottom"))),C=h-(parseInt(v.getPropertyValue("padding-right"))+parseInt(v.getPropertyValue("padding-left")))-b;return{cols:Math.max(2,Math.floor(C/y.css.cell.width)),rows:Math.max(1,Math.floor(f/y.css.cell.height))}}}})(),s})()))})(Ed)),Ed.exports}var wE=CE();var EE=(i,n,s,o)=>{for(var l=n,y=i.length-1,b;y>=0;y--)(b=i[y])&&(l=b(l)||l);return l},xE=(i,n)=>(s,o)=>n(s,o,i),TE=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(i){setTimeout(()=>{throw i.stack?av.isErrorNoTelemetry(i)?new av(i.message+`
|
|
11
|
+
Please change the parent <Route path="${p}"> to <Route path="${p==="/"?"*":`${p}/*`}">.`)}let v=Un(),f;if(n){let p=typeof n=="string"?Ba(n):n;Ot(u==="/"||p.pathname?.startsWith(u),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${p.pathname}" was given in the \`location\` prop.`),f=p}else f=v;let C=f.pathname||"/",x=C;if(u!=="/"){let p=u.replace(/^\//,"").split("/");x="/"+C.replace(/^\//,"").split("/").slice(p.length).join("/")}let A=s&&s.state.matches.length?s.state.matches.map(p=>Object.assign(p,{route:s.manifest[p.route.id]||p.route})):R0(t,{pathname:x});zn(h||A!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),zn(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let E=PC(A&&A.map(p=>Object.assign({},p,{params:Object.assign({},b,p.params),pathname:Hn([u,o.encodeLocation?o.encodeLocation(p.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:p.pathname]),pathnameBase:p.pathnameBase==="/"?u:Hn([u,o.encodeLocation?o.encodeLocation(p.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:p.pathnameBase])})),l,s);return n&&E?te.createElement(al.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...f},navigationType:"POP"}},E):E}function HC(){let t=GC(),n=EC(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),s=t instanceof Error?t.stack:null,o="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:o},y={padding:"2px 4px",backgroundColor:o},b=null;return console.error("Error handled by React Router default ErrorBoundary:",t),b=te.createElement(te.Fragment,null,te.createElement("p",null,"💿 Hey developer 👋"),te.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",te.createElement("code",{style:y},"ErrorBoundary")," or"," ",te.createElement("code",{style:y},"errorElement")," prop on your route.")),te.createElement(te.Fragment,null,te.createElement("h2",null,"Unexpected Application Error!"),te.createElement("h3",{style:{fontStyle:"italic"}},n),s?te.createElement("pre",{style:l},s):null,b)}var zC=te.createElement(HC,null),j0=class extends te.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){this.props.onError?this.props.onError(t,n):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const s=OC(t.digest);s&&(t=s)}let n=t!==void 0?te.createElement(Zn.Provider,{value:this.props.routeContext},te.createElement(kf.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?te.createElement($C,{error:t},n):n}};j0.contextType=N0;var Sd=new WeakMap;function $C({children:t,error:n}){let{basename:s}=te.useContext(ln);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let o=DC(n.digest);if(o){let l=Sd.get(n);if(l)throw l;let y=O0(o.location,s);if(D0&&!Sd.get(n))if(y.isExternal||o.reloadDocument)window.location.href=y.absoluteURL||y.to;else{const b=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(y.to,{replace:o.replace}));throw Sd.set(n,b),b}return te.createElement("meta",{httpEquiv:"refresh",content:`0;url=${y.absoluteURL||y.to}`})}}return t}function UC({routeContext:t,match:n,children:s}){let o=te.useContext(Na);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),te.createElement(Zn.Provider,{value:t},s)}function PC(t,n=[],s){let o=s?.state;if(t==null){if(!o)return null;if(o.errors)t=o.matches;else if(n.length===0&&!o.initialized&&o.matches.length>0)t=o.matches;else return null}let l=t,y=o?.errors;if(y!=null){let v=l.findIndex(f=>f.route.id&&y?.[f.route.id]!==void 0);Ot(v>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(y).join(",")}`),l=l.slice(0,Math.min(l.length,v+1))}let b=!1,c=-1;if(s&&o){b=o.renderFallback;for(let v=0;v<l.length;v++){let f=l[v];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=v),f.route.id){let{loaderData:C,errors:x}=o,A=f.route.loader&&!C.hasOwnProperty(f.route.id)&&(!x||x[f.route.id]===void 0);if(f.route.lazy||A){s.isStatic&&(b=!0),c>=0?l=l.slice(0,c+1):l=[l[0]];break}}}}let u=s?.onError,h=o&&u?(v,f)=>{u(v,{location:o.location,params:o.matches?.[0]?.params??{},pattern:xC(o.matches),errorInfo:f})}:void 0;return l.reduceRight((v,f,C)=>{let x,A=!1,E=null,p=null;o&&(x=y&&f.route.id?y[f.route.id]:void 0,E=f.route.errorElement||zC,b&&(c<0&&C===0?(F0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),A=!0,p=null):c===C&&(A=!0,p=f.route.hydrateFallbackElement||null)));let S=n.concat(l.slice(0,C+1)),_=()=>{let g;return x?g=E:A?g=p:f.route.Component?g=te.createElement(f.route.Component,null):f.route.element?g=f.route.element:g=v,te.createElement(UC,{match:f,routeContext:{outlet:v,matches:S,isDataRoute:o!=null},children:g})};return o&&(f.route.ErrorBoundary||f.route.errorElement||C===0)?te.createElement(j0,{location:o.location,revalidation:o.revalidation,component:E,error:x,children:_(),routeContext:{outlet:null,matches:S,isDataRoute:!0},onError:h}):_()},null)}function Mf(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jC(t){let n=te.useContext(Na);return Ot(n,Mf(t)),n}function FC(t){let n=te.useContext(su);return Ot(n,Mf(t)),n}function qC(t){let n=te.useContext(Zn);return Ot(n,Mf(t)),n}function Df(t){let n=qC(t),s=n.matches[n.matches.length-1];return Ot(s.route.id,`${t} can only be used on routes that contain a unique "id"`),s.route.id}function WC(){return Df("useRouteId")}function GC(){let t=te.useContext(kf),n=FC("useRouteError"),s=Df("useRouteError");return t!==void 0?t:n.errors?.[s]}function KC(){let{router:t}=jC("useNavigate"),n=Df("useNavigate"),s=te.useRef(!1);return $0(()=>{s.current=!0}),te.useCallback(async(l,y={})=>{zn(s.current,z0),s.current&&(typeof l=="number"?await t.navigate(l):await t.navigate(l,{fromRouteId:n,...y}))},[t,n])}var ev={};function F0(t,n,s){!n&&!ev[t]&&(ev[t]=!0,zn(!1,s))}te.memo(YC);function YC({routes:t,manifest:n,future:s,state:o,isStatic:l,onError:y}){return P0(t,void 0,{manifest:n,state:o,isStatic:l,onError:y})}function VC({to:t,replace:n,state:s,relative:o}){Ot(Ia(),"<Navigate> may be used only in the context of a <Router> component.");let{static:l}=te.useContext(ln);zn(!l,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:y}=te.useContext(Zn),{pathname:b}=Un(),c=U0(),u=ru(t,Lf(y),b,o==="path"),h=JSON.stringify(u);return te.useEffect(()=>{c(JSON.parse(h),{replace:n,state:s,relative:o})},[c,h,o,n,s]),null}function Ko(t){Ot(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function XC({basename:t="/",children:n=null,location:s,navigationType:o="POP",navigator:l,static:y=!1,useTransitions:b}){Ot(!Ia(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=t.replace(/^\/*/,"/"),u=te.useMemo(()=>({basename:c,navigator:l,static:y,useTransitions:b,future:{}}),[c,l,y,b]);typeof s=="string"&&(s=Ba(s));let{pathname:h="/",search:v="",hash:f="",state:C=null,key:x="default",mask:A}=s,E=te.useMemo(()=>{let p=Lr(h,c);return p==null?null:{location:{pathname:p,search:v,hash:f,state:C,key:x,mask:A},navigationType:o}},[c,h,v,f,C,x,o,A]);return zn(E!=null,`<Router basename="${c}"> is not able to match the URL "${h}${v}${f}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:te.createElement(ln.Provider,{value:u},te.createElement(al.Provider,{children:n,value:E}))}function ZC({children:t,location:n}){return IC(Jd(t),n)}function Jd(t,n=[]){let s=[];return te.Children.forEach(t,(o,l)=>{if(!te.isValidElement(o))return;let y=[...n,l];if(o.type===te.Fragment){s.push.apply(s,Jd(o.props.children,y));return}Ot(o.type===Ko,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ot(!o.props.index||!o.props.children,"An index route cannot have child routes.");let b={id:o.props.id||y.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(b.children=Jd(o.props.children,y)),s.push(b)}),s}var Nc="get",Ic="application/x-www-form-urlencoded";function au(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function QC(t){return au(t)&&t.tagName.toLowerCase()==="button"}function JC(t){return au(t)&&t.tagName.toLowerCase()==="form"}function ew(t){return au(t)&&t.tagName.toLowerCase()==="input"}function tw(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function iw(t,n){return t.button===0&&(!n||n==="_self")&&!tw(t)}var Cc=null;function nw(){if(Cc===null)try{new FormData(document.createElement("form"),0),Cc=!1}catch{Cc=!0}return Cc}var rw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function yd(t){return t!=null&&!rw.has(t)?(zn(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ic}"`),null):t}function sw(t,n){let s,o,l,y,b;if(JC(t)){let c=t.getAttribute("action");o=c?Lr(c,n):null,s=t.getAttribute("method")||Nc,l=yd(t.getAttribute("enctype"))||Ic,y=new FormData(t)}else if(QC(t)||ew(t)&&(t.type==="submit"||t.type==="image")){let c=t.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=t.getAttribute("formaction")||c.getAttribute("action");if(o=u?Lr(u,n):null,s=t.getAttribute("formmethod")||c.getAttribute("method")||Nc,l=yd(t.getAttribute("formenctype"))||yd(c.getAttribute("enctype"))||Ic,y=new FormData(c,t),!nw()){let{name:h,type:v,value:f}=t;if(v==="image"){let C=h?`${h}.`:"";y.append(`${C}x`,"0"),y.append(`${C}y`,"0")}else h&&y.append(h,f)}}else{if(au(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=Nc,o=null,l=Ic,b=t}return y&&l==="text/plain"&&(b=y,y=void 0),{action:o,method:s.toLowerCase(),encType:l,formData:y,body:b}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Of(t,n){if(t===!1||t===null||typeof t>"u")throw new Error(n)}function q0(t,n,s,o){let l=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return s?l.pathname.endsWith("/")?l.pathname=`${l.pathname}_.${o}`:l.pathname=`${l.pathname}.${o}`:l.pathname==="/"?l.pathname=`_root.${o}`:n&&Lr(l.pathname,n)==="/"?l.pathname=`${Gc(n)}/_root.${o}`:l.pathname=`${Gc(l.pathname)}.${o}`,l}async function aw(t,n){if(t.id in n)return n[t.id];try{let s=await import(t.module);return n[t.id]=s,s}catch(s){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(s),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ow(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function lw(t,n,s){let o=await Promise.all(t.map(async l=>{let y=n.routes[l.route.id];if(y){let b=await aw(y,s);return b.links?b.links():[]}return[]}));return dw(o.flat(1).filter(ow).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function tv(t,n,s,o,l,y){let b=(u,h)=>s[h]?u.route.id!==s[h].route.id:!0,c=(u,h)=>s[h].pathname!==u.pathname||s[h].route.path?.endsWith("*")&&s[h].params["*"]!==u.params["*"];return y==="assets"?n.filter((u,h)=>b(u,h)||c(u,h)):y==="data"?n.filter((u,h)=>{let v=o.routes[u.route.id];if(!v||!v.hasLoader)return!1;if(b(u,h)||c(u,h))return!0;if(u.route.shouldRevalidate){let f=u.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:s[0]?.params||{},nextUrl:new URL(t,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function cw(t,n,{includeHydrateFallback:s}={}){return uw(t.map(o=>{let l=n.routes[o.route.id];if(!l)return[];let y=[l.module];return l.clientActionModule&&(y=y.concat(l.clientActionModule)),l.clientLoaderModule&&(y=y.concat(l.clientLoaderModule)),s&&l.hydrateFallbackModule&&(y=y.concat(l.hydrateFallbackModule)),l.imports&&(y=y.concat(l.imports)),y}).flat(1))}function uw(t){return[...new Set(t)]}function hw(t){let n={},s=Object.keys(t).sort();for(let o of s)n[o]=t[o];return n}function dw(t,n){let s=new Set;return new Set(n),t.reduce((o,l)=>{let y=JSON.stringify(hw(l));return s.has(y)||(s.add(y),o.push({key:y,link:l})),o},[])}function Bf(){let t=te.useContext(Na);return Of(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function fw(){let t=te.useContext(su);return Of(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var Nf=te.createContext(void 0);Nf.displayName="FrameworkContext";function If(){let t=te.useContext(Nf);return Of(t,"You must render this element inside a <HydratedRouter> element"),t}function pw(t,n){let s=te.useContext(Nf),[o,l]=te.useState(!1),[y,b]=te.useState(!1),{onFocus:c,onBlur:u,onMouseEnter:h,onMouseLeave:v,onTouchStart:f}=n,C=te.useRef(null);te.useEffect(()=>{if(t==="render"&&b(!0),t==="viewport"){let E=S=>{S.forEach(_=>{b(_.isIntersecting)})},p=new IntersectionObserver(E,{threshold:.5});return C.current&&p.observe(C.current),()=>{p.disconnect()}}},[t]),te.useEffect(()=>{if(o){let E=setTimeout(()=>{b(!0)},100);return()=>{clearTimeout(E)}}},[o]);let x=()=>{l(!0)},A=()=>{l(!1),b(!1)};return s?t!=="intent"?[y,C,{}]:[y,C,{onFocus:Io(c,x),onBlur:Io(u,A),onMouseEnter:Io(h,x),onMouseLeave:Io(v,A),onTouchStart:Io(f,x)}]:[!1,C,{}]}function Io(t,n){return s=>{t&&t(s),s.defaultPrevented||n(s)}}function _w({page:t,...n}){let s=AC(),{router:o}=Bf(),l=te.useMemo(()=>R0(o.routes,t,o.basename),[o.routes,t,o.basename]);return l?s?te.createElement(mw,{page:t,matches:l,...n}):te.createElement(vw,{page:t,matches:l,...n}):null}function gw(t){let{manifest:n,routeModules:s}=If(),[o,l]=te.useState([]);return te.useEffect(()=>{let y=!1;return lw(t,n,s).then(b=>{y||l(b)}),()=>{y=!0}},[t,n,s]),o}function mw({page:t,matches:n,...s}){let o=Un(),{future:l}=If(),{basename:y}=Bf(),b=te.useMemo(()=>{if(t===o.pathname+o.search+o.hash)return[];let c=q0(t,y,l.v8_trailingSlashAwareDataRequests,"rsc"),u=!1,h=[];for(let v of n)typeof v.route.shouldRevalidate=="function"?u=!0:h.push(v.route.id);return u&&h.length>0&&c.searchParams.set("_routes",h.join(",")),[c.pathname+c.search]},[y,l.v8_trailingSlashAwareDataRequests,t,o,n]);return te.createElement(te.Fragment,null,b.map(c=>te.createElement("link",{key:c,rel:"prefetch",as:"fetch",href:c,...s})))}function vw({page:t,matches:n,...s}){let o=Un(),{future:l,manifest:y,routeModules:b}=If(),{basename:c}=Bf(),{loaderData:u,matches:h}=fw(),v=te.useMemo(()=>tv(t,n,h,y,o,"data"),[t,n,h,y,o]),f=te.useMemo(()=>tv(t,n,h,y,o,"assets"),[t,n,h,y,o]),C=te.useMemo(()=>{if(t===o.pathname+o.search+o.hash)return[];let E=new Set,p=!1;if(n.forEach(_=>{let g=y.routes[_.route.id];!g||!g.hasLoader||(!v.some(w=>w.route.id===_.route.id)&&_.route.id in u&&b[_.route.id]?.shouldRevalidate||g.hasClientLoader?p=!0:E.add(_.route.id))}),E.size===0)return[];let S=q0(t,c,l.v8_trailingSlashAwareDataRequests,"data");return p&&E.size>0&&S.searchParams.set("_routes",n.filter(_=>E.has(_.route.id)).map(_=>_.route.id).join(",")),[S.pathname+S.search]},[c,l.v8_trailingSlashAwareDataRequests,u,o,y,v,n,t,b]),x=te.useMemo(()=>cw(f,y),[f,y]),A=gw(f);return te.createElement(te.Fragment,null,C.map(E=>te.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...s})),x.map(E=>te.createElement("link",{key:E,rel:"modulepreload",href:E,...s})),A.map(({key:E,link:p})=>te.createElement("link",{key:E,nonce:s.nonce,...p,crossOrigin:p.crossOrigin??s.crossOrigin})))}function bw(...t){return n=>{t.forEach(s=>{typeof s=="function"?s(n):s!=null&&(s.current=n)})}}var Sw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Sw&&(window.__reactRouterVersion="7.17.0")}catch{}function yw({basename:t,children:n,useTransitions:s,window:o}){let l=te.useRef();l.current==null&&(l.current=J1({window:o,v5Compat:!0}));let y=l.current,[b,c]=te.useState({action:y.action,location:y.location}),u=te.useCallback(h=>{s===!1?c(h):te.startTransition(()=>c(h))},[s]);return te.useLayoutEffect(()=>y.listen(u),[y,u]),te.createElement(XC,{basename:t,children:n,location:b.location,navigationType:b.action,navigator:y,useTransitions:s})}var W0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Hf=te.forwardRef(function({onClick:n,discover:s="render",prefetch:o="none",relative:l,reloadDocument:y,replace:b,mask:c,state:u,target:h,to:v,preventScrollReset:f,viewTransition:C,defaultShouldRevalidate:x,...A},E){let{basename:p,navigator:S,useTransitions:_}=te.useContext(ln),g=typeof v=="string"&&W0.test(v),w=O0(v,p);v=w.to;let R=BC(v,{relative:l}),L=Un(),D=null;if(c){let ee=ru(c,[],L.mask?L.mask.pathname:"/",!0);p!=="/"&&(ee.pathname=ee.pathname==="/"?p:Hn([p,ee.pathname])),D=S.createHref(ee)}let[T,B,W]=pw(o,A),P=Ew(v,{replace:b,mask:c,state:u,target:h,preventScrollReset:f,relative:l,viewTransition:C,defaultShouldRevalidate:x,useTransitions:_});function F(ee){n&&n(ee),ee.defaultPrevented||P(ee)}let I=!(w.isExternal||y),Z=te.createElement("a",{...A,...W,href:(I?D:void 0)||w.absoluteURL||R,onClick:I?F:n,ref:bw(E,B),target:h,"data-discover":!g&&s==="render"?"true":void 0});return T&&!g?te.createElement(te.Fragment,null,Z,te.createElement(_w,{page:R})):Z});Hf.displayName="Link";var G0=te.forwardRef(function({"aria-current":n="page",caseSensitive:s=!1,className:o="",end:l=!1,style:y,to:b,viewTransition:c,children:u,...h},v){let f=ol(b,{relative:h.relative}),C=Un(),x=te.useContext(su),{navigator:A,basename:E}=te.useContext(ln),p=x!=null&&Lw(f)&&c===!0,S=A.encodeLocation?A.encodeLocation(f).pathname:f.pathname,_=C.pathname,g=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;s||(_=_.toLowerCase(),g=g?g.toLowerCase():null,S=S.toLowerCase()),g&&E&&(g=Lr(g,E)||g);const w=S!=="/"&&S.endsWith("/")?S.length-1:S.length;let R=_===S||!l&&_.startsWith(S)&&_.charAt(w)==="/",L=g!=null&&(g===S||!l&&g.startsWith(S)&&g.charAt(S.length)==="/"),D={isActive:R,isPending:L,isTransitioning:p},T=R?n:void 0,B;typeof o=="function"?B=o(D):B=[o,R?"active":null,L?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let W=typeof y=="function"?y(D):y;return te.createElement(Hf,{...h,"aria-current":T,className:B,ref:v,style:W,to:b,viewTransition:c},typeof u=="function"?u(D):u)});G0.displayName="NavLink";var Cw=te.forwardRef(({discover:t="render",fetcherKey:n,navigate:s,reloadDocument:o,replace:l,state:y,method:b=Nc,action:c,onSubmit:u,relative:h,preventScrollReset:v,viewTransition:f,defaultShouldRevalidate:C,...x},A)=>{let{useTransitions:E}=te.useContext(ln),p=Aw(),S=Rw(c,{relative:h}),_=b.toLowerCase()==="get"?"get":"post",g=typeof c=="string"&&W0.test(c),w=R=>{if(u&&u(R),R.defaultPrevented)return;R.preventDefault();let L=R.nativeEvent.submitter,D=L?.getAttribute("formmethod")||b,T=()=>p(L||R.currentTarget,{fetcherKey:n,method:D,navigate:s,replace:l,state:y,relative:h,preventScrollReset:v,viewTransition:f,defaultShouldRevalidate:C});E&&s!==!1?te.startTransition(()=>T()):T()};return te.createElement("form",{ref:A,method:_,action:S,onSubmit:o?u:w,...x,"data-discover":!g&&t==="render"?"true":void 0})});Cw.displayName="Form";function ww(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function K0(t){let n=te.useContext(Na);return Ot(n,ww(t)),n}function Ew(t,{target:n,replace:s,mask:o,state:l,preventScrollReset:y,relative:b,viewTransition:c,defaultShouldRevalidate:u,useTransitions:h}={}){let v=U0(),f=Un(),C=ol(t,{relative:b});return te.useCallback(x=>{if(iw(x,n)){x.preventDefault();let A=s!==void 0?s:nl(f)===nl(C),E=()=>v(t,{replace:A,mask:o,state:l,preventScrollReset:y,relative:b,viewTransition:c,defaultShouldRevalidate:u});h?te.startTransition(()=>E()):E()}},[f,v,C,s,o,l,n,t,y,b,c,u,h])}var xw=0,Tw=()=>`__${String(++xw)}__`;function Aw(){let{router:t}=K0("useSubmit"),{basename:n}=te.useContext(ln),s=WC(),o=t.fetch,l=t.navigate;return te.useCallback(async(y,b={})=>{let{action:c,method:u,encType:h,formData:v,body:f}=sw(y,n);if(b.navigate===!1){let C=b.fetcherKey||Tw();await o(C,s,b.action||c,{defaultShouldRevalidate:b.defaultShouldRevalidate,preventScrollReset:b.preventScrollReset,formData:v,body:f,formMethod:b.method||u,formEncType:b.encType||h,flushSync:b.flushSync})}else await l(b.action||c,{defaultShouldRevalidate:b.defaultShouldRevalidate,preventScrollReset:b.preventScrollReset,formData:v,body:f,formMethod:b.method||u,formEncType:b.encType||h,replace:b.replace,state:b.state,fromRouteId:s,flushSync:b.flushSync,viewTransition:b.viewTransition})},[o,l,n,s])}function Rw(t,{relative:n}={}){let{basename:s}=te.useContext(ln),o=te.useContext(Zn);Ot(o,"useFormAction must be used inside a RouteContext");let[l]=o.matches.slice(-1),y={...ol(t||".",{relative:n})},b=Un();if(t==null){y.search=b.search;let c=new URLSearchParams(y.search),u=c.getAll("index");if(u.some(v=>v==="")){c.delete("index"),u.filter(f=>f).forEach(f=>c.append("index",f));let v=c.toString();y.search=v?`?${v}`:""}}return(!t||t===".")&&l.route.index&&(y.search=y.search?y.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(y.pathname=y.pathname==="/"?s:Hn([s,y.pathname])),nl(y)}function Lw(t,{relative:n}={}){let s=te.useContext(I0);Ot(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=K0("useViewTransitionState"),l=ol(t,{relative:n});if(!s.isTransitioning)return!1;let y=Lr(s.currentLocation.pathname,o)||s.currentLocation.pathname,b=Lr(s.nextLocation.pathname,o)||s.nextLocation.pathname;return Wc(l.pathname,b)!=null||Wc(l.pathname,y)!=null}class cn extends Error{status;constructor(n,s){super(s),this.name="ApiError",this.status=n}}async function Y0(t){const n=await fetch("/observer/tenants",{signal:t});await Tn(n);const s=await n.json();if(!Array.isArray(s.tenants))throw new cn(n.status,"Invalid tenants response");return s.tenants.map(o=>Uw(o,n.status))}async function kw(t){const n=await fetch("/observer/jobs",{signal:t});return await Tn(n),(await n.json()).tenants}async function Mw(t){const n=await fetch("/observer/events",{signal:t});if(await Tn(n),!n.body)throw new cn(n.status,"Observer stream unavailable");return n.body.getReader()}async function Dw(t){const n=await fetch("/observer/theaters",{signal:t});await Tn(n);const s=await n.json();if(!Array.isArray(s.theaters))throw new cn(n.status,"Invalid Theater response");return s.theaters.map(o=>Z0(o,n.status))}async function V0(t,n){const s=t?`?theaterId=${encodeURIComponent(t)}`:"",o=await fetch(`/observer/status${s}`,{signal:n});return await Tn(o),Pw(await o.json(),o.status)}async function Ow(t){const n=await fetch("/observer/carriers",{signal:t});await Tn(n);const s=await n.json();if(!Array.isArray(s.carriers))throw new cn(n.status,"Invalid carrier readiness response");return s.carriers.map(o=>jw(o,n.status))}async function Bw(t){const n=await fetch("/observer/theaters",{method:"POST",signal:t});await Tn(n);const s=await n.json();return typeof s=="object"&&s!==null&&s.cancelled===!0?{cancelled:!0}:Z0(s,n.status)}async function Nw(t,n){const s=await fetch(`/observer/theaters/${encodeURIComponent(t)}/sessions`,{method:"POST",signal:n});return await Tn(s),zf(await s.json(),s.status)}async function X0(t,n){const s=await fetch(`/terminal/sessions/${encodeURIComponent(t)}`,{method:"DELETE",signal:n});await Tn(s)}async function Iw(t,n){const s=await fetch(`/terminal/sessions/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({label:n})});return await Tn(s),zf(await s.json(),s.status)}async function Hw(t){const n=await fetch("/terminal/sessions",{signal:t});await Tn(n);const s=await n.json();if(!Array.isArray(s.sessions))throw new cn(n.status,"Invalid terminal sessions response");return s.sessions.map(o=>zf(o,n.status))}async function zw(t,n){const s=$w(n),o=await fetch("/terminal/ticket",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:t,...s.kind?{kind:s.kind}:{}}),signal:s.signal});await Tn(o);const l=await o.json();if(typeof l.ticket!="string"||typeof l.ttlMs!="number")throw new cn(o.status,"Invalid terminal ticket response");return{ticket:l.ticket,ttlMs:l.ttlMs}}function $w(t){return t?t instanceof AbortSignal?{signal:t}:t:{}}function zf(t,n){const s=t;if(!s||typeof s.sessionId!="string"||typeof s.cwdLabel!="string"||typeof s.sequence!="number"||typeof s.status!="string"||typeof s.createdAt!="number"||"cwd"in s||"canonicalCwd"in s)throw new cn(n,"Invalid terminal session response");return{sessionId:s.sessionId,terminalSessionId:typeof s.terminalSessionId=="string"?s.terminalSessionId:s.sessionId,cwdLabel:s.cwdLabel,sequence:s.sequence,label:typeof s.label=="string"?s.label:void 0,status:s.status,createdAt:s.createdAt,theaterId:typeof s.theaterId=="string"?s.theaterId:void 0,tenantId:typeof s.tenantId=="string"?s.tenantId:void 0,registrationId:typeof s.registrationId=="string"?s.registrationId:void 0}}function Uw(t,n){const s=t;if(!s||typeof s.tenantId!="string"||typeof s.tenantLabel!="string"||typeof s.createdAt!="number"||typeof s.sessions!="number"||"cwd"in s)throw new cn(n,"Invalid tenants response");return{tenantId:s.tenantId,tenantLabel:s.tenantLabel,createdAt:s.createdAt,sessions:s.sessions,status:s.status,cliRunId:typeof s.cliRunId=="string"?s.cliRunId:void 0,registrationId:typeof s.registrationId=="string"?s.registrationId:void 0,theaterId:typeof s.theaterId=="string"?s.theaterId:void 0,terminalSessionId:typeof s.terminalSessionId=="string"?s.terminalSessionId:void 0}}function Pw(t,n){const s=t;if(!s||typeof s.workspaces!="number"||typeof s.jobs!="number"||typeof s.version!="string"||s.channel!=="stable"&&s.channel!=="local"&&s.channel!=="unknown"||typeof s.updateAvailable!="boolean"||s.latestVersion!==void 0&&typeof s.latestVersion!="string"||typeof s.port!="number"||s.wikiServerStatus!=="available"&&s.wikiServerStatus!=="unavailable"&&s.wikiServerStatus!=="unknown"||"token"in s||"path"in s||"cwd"in s||"knowledgeRoot"in s)throw new cn(n,"Invalid observer status response");return{workspaces:s.workspaces,jobs:s.jobs,version:s.version,channel:s.channel,updateAvailable:s.updateAvailable,...s.latestVersion!==void 0?{latestVersion:s.latestVersion}:{},port:s.port,wikiServerStatus:s.wikiServerStatus}}function jw(t,n){const s=t;if(!s||typeof s.carrierId!="string"||typeof s.displayName!="string"||s.role!==null&&typeof s.role!="string"||typeof s.model!="string"||s.effort!==null&&typeof s.effort!="string"||typeof s.taskForceBackendCount!="number"||typeof s.subagentMode!="boolean"||s.category!==void 0&&s.category!=="strategy"&&s.category!=="planning"&&s.category!=="operations"||typeof s.slot!="number"||typeof s.cliType!="string"||"token"in s||"key"in s||"credential"in s||"cwd"in s||"path"in s||"persona"in s||"prompt"in s||"toolAllowlist"in s||"allowedExecutorTools"in s)throw new cn(n,"Invalid carrier readiness response");return{carrierId:s.carrierId,displayName:s.displayName,role:s.role,model:s.model,effort:s.effort,taskForceBackendCount:s.taskForceBackendCount,subagentMode:s.subagentMode,...s.category?{category:s.category}:{},slot:s.slot,cliType:s.cliType}}function Z0(t,n){const s=t;if(!s||typeof s.id!="string"||typeof s.label!="string"||"path"in s||typeof s.createdAt!="string"||typeof s.lastOpenedAt!="string"||typeof s.hasWiki!="boolean"||typeof s.activeAdmiralCount!="number")throw new cn(n,"Invalid Theater response");return{id:s.id,label:s.label,createdAt:s.createdAt,lastOpenedAt:s.lastOpenedAt,hasWiki:s.hasWiki,activeAdmiralCount:s.activeAdmiralCount}}async function Tn(t){if(t.ok)return;let n=t.statusText;try{n=(await t.json()).error??n}catch{}throw new cn(t.status,n||`HTTP ${t.status}`)}const iv=120,Fw="active",ef=new Set(["done","error","aborted"]);function qw(t,n){let s=J0(t,n.jobId,n.updatedAt);for(const o of n.events)s=Q0(s,o);return ef.has(n.status)&&!ef.has(s.status)&&(s={...s,status:n.status}),s}function Q0(t,n){if(n.id<=t.lastEventId)return t;const s=n.event,o={...t,updatedAt:n.at,lastEventId:n.id,recentEvents:Kw(t.recentEvents,n)};switch(n.type){case"job:registered":return Ww(o,s);case"job:finalized":return{...o,status:oi(s.status)??"done",finishedAt:ss(s.finishedAt)??n.at,summary:oi(s.summary),error:oi(s.error)};case"track:begin":return Ca(o,s,l=>({...l,startedAt:ss(s.startedAt)??n.at,requestPreview:oi(s.requestPreview)}));case"track:status":return Ca(o,s,l=>({...l,status:oi(s.status)??l.status}));case"track:text":return Ca(o,s,l=>({...l,status:"stream",text:l.text+(oi(s.text)??""),sentTextLength:l.sentTextLength+(ss(s.textLength)??oi(s.text)?.length??0)}));case"track:thought":return Ca(o,s,l=>({...l,thought:l.thought+(oi(s.text)??""),sentThoughtLength:l.sentThoughtLength+(ss(s.textLength)??oi(s.text)?.length??0)}));case"track:tool":return Ca(o,s,l=>({...l,status:"stream",tools:Gw(l.tools,s)}));case"track:finalized":return Ca(o,s,l=>{const y=nv(l.text,l.sentTextLength,oi(s.fallbackText),ss(s.fallbackTextLength)),b=nv(l.thought,l.sentThoughtLength,oi(s.fallbackThought),ss(s.fallbackThoughtLength));return{...l,status:oi(s.status)??"done",finishedAt:ss(s.finishedAt)??n.at,error:oi(s.error),text:y.text,sentTextLength:y.sentLength,thought:b.text,sentThoughtLength:b.sentLength}});default:return o}}function J0(t,n,s){return{jobId:n,tenantId:t,status:Fw,updatedAt:s,trackOrder:[],tracks:{},lastEventId:0,recentEvents:[]}}function Jo(t){return ef.has(t)}function Ww(t,n){const s=Array.isArray(n.tracks)?n.tracks:[];let o=t.trackOrder,l=t.tracks;for(const y of s){if(!y.trackId)continue;const b=l[y.trackId],c={...b??eb(y.trackId),displayName:y.displayName??b?.displayName??y.trackId,displayCli:y.displayCli??b?.displayCli,model:y.model??b?.model,effort:y.effort??b?.effort,subtitle:y.subtitle??b?.subtitle,kind:y.kind??b?.kind,startedAt:y.startedAt??b?.startedAt};b||(o=[...o,y.trackId]),l={...l,[y.trackId]:c}}return{...t,label:oi(n.label)??t.label,ownerCarrierId:oi(n.ownerCarrierId)??t.ownerCarrierId,kind:oi(n.kind)??t.kind,startedAt:ss(n.startedAt)??t.startedAt,trackOrder:o,tracks:l}}function Ca(t,n,s){const o=oi(n.trackId);if(!o)return t;const l=t.tracks[o],y=s(l??eb(o));return{...t,trackOrder:l?t.trackOrder:[...t.trackOrder,o],tracks:{...t.tracks,[o]:y}}}function eb(t){return{trackId:t,displayName:t,status:"queued",text:"",thought:"",sentTextLength:0,sentThoughtLength:0,tools:[]}}function nv(t,n,s,o){const l=o??s?.length??0;return s!==void 0&&l>t.length?{text:s,sentLength:Math.max(l,n)}:{text:t,sentLength:Math.max(n,l)}}function Gw(t,n){const s=oi(n.title)??"tool",o=oi(n.status)??"",l=oi(n.toolCallId),y=l??`${s}#${t.length}`;if(l){const b=t.findIndex(c=>c.key===l);if(b>=0){const c=[...t];return c[b]={key:l,title:s,status:o},c}}return[...t,{key:y,title:s,status:o}]}function Kw(t,n){const s=[...t,n];return s.length>iv?s.slice(-iv):s}function oi(t){return typeof t=="string"?t:void 0}function ss(t){return typeof t=="number"&&Number.isFinite(t)?t:void 0}const tf=200,nf="fleet-console.activeTheaterId",tb="fleet-console.activeTheme",Cd="maritime",rf="shell",sf=new Set;let Oe={connection:"connecting",connectionError:null,activeTheme:ub(),updateAvailable:!1,latestVersion:null,tenants:[],theaters:[],activeTheaterId:null,addingTheater:!1,theaterError:null,sessions:{},sessionOrder:[],activeTerminalSessionId:null,creatingTerminalSession:!1,terminalSessionError:null,tenantJobs:{},tenantOrder:[],timelineOpen:!1,shellOpen:!1,selectedJobId:null};function rv(){return Oe}function Yw(t){return sf.add(t),()=>{sf.delete(t)}}function ut(t){Oe={...Oe,...t},hb()}function Vw(){ib(ub())}function Xw(t){yE(t),ib(t),ut({activeTheme:t})}function Zw(t){ut({updateAvailable:t.updateAvailable,latestVersion:t.latestVersion??null})}function ib(t){if(!(typeof document>"u")){if(t==="maritime"){document.documentElement.removeAttribute("data-theme");return}document.documentElement.setAttribute("data-theme",t)}}function Qw(t){const n={};for(const l of t)n[l.sessionId]=Uf(l);const s=[...t].sort((l,y)=>y.createdAt-l.createdAt).map(l=>l.sessionId),o=lb(n,Oe.tenants);ut({sessions:o,sessionOrder:s,activeTerminalSessionId:Ha(Oe.activeTheaterId,o,s,Oe.activeTerminalSessionId)})}function Jw(t){const n=bE(t,Oe.activeTheaterId);ut({theaters:t,activeTheaterId:n,activeTerminalSessionId:Ha(n,Oe.sessions,Oe.sessionOrder,Oe.activeTerminalSessionId),selectedJobId:null})}function eE(t){cb(t),ut({activeTheaterId:t,activeTerminalSessionId:Ha(t,Oe.sessions,Oe.sessionOrder,null),selectedJobId:null})}function tE(){ut({addingTheater:!0,theaterError:null})}function iE(t){const n=[t,...Oe.theaters.filter(s=>s.id!==t.id)];cb(t.id),ut({theaters:n,activeTheaterId:t.id,addingTheater:!1,theaterError:null,activeTerminalSessionId:Ha(t.id,Oe.sessions,Oe.sessionOrder,null),selectedJobId:null})}function nE(){ut({addingTheater:!1,theaterError:null})}function rE(t){ut({addingTheater:!1,theaterError:t})}function sE(t){ut({activeTerminalSessionId:t,selectedJobId:null})}function aE(){ut({creatingTerminalSession:!0,terminalSessionError:null})}function oE(t){const n=Uf(t);ut({sessions:{...Oe.sessions,[n.sessionId]:n},sessionOrder:[n.sessionId,...Oe.sessionOrder.filter(s=>s!==n.sessionId)],activeTerminalSessionId:!Oe.activeTheaterId||Kc(n,Oe.activeTheaterId)?n.sessionId:Oe.activeTerminalSessionId,creatingTerminalSession:!1,terminalSessionError:null,selectedJobId:null})}function nb(t){const n=Oe.sessions[t.sessionId],s=Uf({...n??{},...t}),o=!!n,l={...Oe.sessions,[s.sessionId]:s},y=o?Oe.sessionOrder:[s.sessionId,...Oe.sessionOrder.filter(b=>b!==s.sessionId)];ut({sessions:l,sessionOrder:y,activeTerminalSessionId:Ha(Oe.activeTheaterId,l,y,Oe.activeTerminalSessionId)})}function lE(t){ut({creatingTerminalSession:!1,terminalSessionError:t})}function cE(){ut({timelineOpen:!Oe.timelineOpen})}function rb(){if(Oe.shellOpen){Yo();return}ut({shellOpen:!0})}function Yo(){Oe.shellOpen&&(ut({shellOpen:!1}),X0(rf).catch(()=>{}))}function uE(t){ut({terminalSessionError:t})}function hE(t){ut({terminalSessionError:t})}function sb(t){if(!Oe.sessions[t])return;const n={...Oe.sessions};delete n[t];const s=Oe.sessionOrder.filter(l=>l!==t),o=Oe.activeTerminalSessionId===t;ut({sessions:n,sessionOrder:s,activeTerminalSessionId:o?s[0]??null:Oe.activeTerminalSessionId,selectedJobId:o?null:Oe.selectedJobId})}function dE(t){ut({selectedJobId:Oe.selectedJobId===t?null:t})}function wd(){ut({selectedJobId:null})}function ab(t){const n=new Set(t.map(l=>l.tenantId)),s=lb(Oe.sessions,t),o=[...t.map(l=>l.tenantId),...Oe.tenantOrder.filter(l=>!n.has(l)&&Oe.tenantJobs[l])];ut({tenants:t,sessions:s,tenantOrder:o,activeTerminalSessionId:Ha(Oe.activeTheaterId,s,Oe.sessionOrder,Oe.activeTerminalSessionId)})}function fE(t){const n={},s=[];for(const l of t){const y={};for(const c of l.jobs)y[c.jobId]=qw(l.tenantId,c);const b=Object.values(y).sort((c,u)=>(c.startedAt??c.updatedAt)-(u.startedAt??u.updatedAt)).map(c=>c.jobId);n[l.tenantId]={tenantId:l.tenantId,tenantLabel:l.tenantLabel,jobOrder:b,jobs:y,truncation:l.truncation},s.push(l.tenantId)}const o=[...Oe.tenantOrder.filter(l=>n[l]),...s.filter(l=>!Oe.tenantOrder.includes(l))];ut({tenantJobs:n,tenantOrder:o.length>0?o:s})}function pE(t,n){const s=Oe.tenantJobs[t.tenantId],o=!s&&!Oe.tenants.some(c=>c.tenantId===t.tenantId),l=s??{tenantId:t.tenantId,tenantLabel:n,jobOrder:[],jobs:{},truncation:{droppedCount:0}};let y=n&&l.tenantLabel!==n?{...l,tenantLabel:n}:l;if(t.jobId){const c=y.jobs[t.jobId],u=Q0(c??J0(t.tenantId,t.jobId,t.at),t),h=c?y.jobOrder:[...y.jobOrder,t.jobId];y={...y,jobs:CE({...y.jobs,[t.jobId]:u},h),jobOrder:h.slice(-tf)}}const b={...Oe.tenantJobs,[t.tenantId]:y};return Oe={...Oe,connection:"live",connectionError:null,tenantJobs:b,tenantOrder:Oe.tenantOrder.includes(t.tenantId)?Oe.tenantOrder:[...Oe.tenantOrder,t.tenantId]},hb(),{unknownTenant:o}}function _E(t,n,s){const o=Oe.tenantJobs[t]??{tenantId:t,tenantLabel:n,jobOrder:[],jobs:{},truncation:{droppedCount:0}};ut({tenantJobs:{...Oe.tenantJobs,[t]:{...o,truncation:s}},tenantOrder:Oe.tenantOrder.includes(t)?Oe.tenantOrder:[...Oe.tenantOrder,t]})}function gE(t){if(!t.selectedJobId||t.activeTheaterId&&t.activeTerminalSessionId&&!$f(t).includes(t.activeTerminalSessionId))return null;const n=mE(t);return n?t.tenantJobs[n]?.jobs[t.selectedJobId]??null:null}function mE(t){return t.activeTerminalSessionId?ob(t.sessions[t.activeTerminalSessionId]):null}function $f(t){return t.activeTheaterId?t.sessionOrder.filter(n=>Kc(t.sessions[n],t.activeTheaterId)):[]}function vE(t,n){const s=ob(n);if(!s)return[];const o=t.tenantJobs[s];if(!o)return[];const l=[];for(const y of o.jobOrder){const b=o.jobs[y];b&&l.push({job:b,tenant:o})}return l}function ob(t){return t?.tenantId??t?.sessionId??null}function Uf(t){return{...t,terminalSessionId:t.terminalSessionId??t.sessionId,status:t.status==="starting"&&t.tenantId?"registered":t.status}}function lb(t,n){const s={...t};for(const o of n){if(!o.terminalSessionId)continue;const l=s[o.terminalSessionId];l&&(s[o.terminalSessionId]={...l,status:o.status==="deregistered"?"closed":"registered",tenantId:o.tenantId,registrationId:o.registrationId,theaterId:o.theaterId??l.theaterId})}return s}function bE(t,n){const s=new Set(t.map(l=>l.id)),o=SE();return o&&s.has(o)?o:n&&s.has(n)?n:t[0]?.id??null}function Ha(t,n,s,o){return t?o&&Kc(n[o],t)?o:s.find(l=>Kc(n[l],t))??null:o&&n[o]?o:s[0]??null}function Kc(t,n){return!t||!n?!1:t.theaterId===n}function SE(){if(typeof window>"u")return null;try{return window.localStorage.getItem(nf)}catch{return null}}function cb(t){if(!(typeof window>"u"))try{t?window.localStorage.setItem(nf,t):window.localStorage.removeItem(nf)}catch{}}function ub(){if(typeof window>"u")return Cd;try{const t=window.localStorage.getItem(tb);return t==="maritime"||t==="carbon"?t:Cd}catch{return Cd}}function yE(t){if(!(typeof window>"u"))try{window.localStorage.setItem(tb,t)}catch{}}function CE(t,n){if(n.length<=tf)return t;const s=new Set(n.slice(-tf)),o={};for(const l of Object.keys(t))s.has(l)&&(o[l]=t[l]);return o}function hb(){for(const t of sf)t()}var Ed={exports:{}},sv;function wE(){return sv||(sv=1,(function(t,n){(function(s,o){t.exports=o()})(self,(()=>(()=>{var s={};return(()=>{var o=s;Object.defineProperty(o,"__esModule",{value:!0}),o.FitAddon=void 0,o.FitAddon=class{activate(l){this._terminal=l}dispose(){}fit(){const l=this.proposeDimensions();if(!l||!this._terminal||isNaN(l.cols)||isNaN(l.rows))return;const y=this._terminal._core;this._terminal.rows===l.rows&&this._terminal.cols===l.cols||(y._renderService.clear(),this._terminal.resize(l.cols,l.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const l=this._terminal._core,y=l._renderService.dimensions;if(y.css.cell.width===0||y.css.cell.height===0)return;const b=this._terminal.options.scrollback===0?0:l.viewport.scrollBarWidth,c=window.getComputedStyle(this._terminal.element.parentElement),u=parseInt(c.getPropertyValue("height")),h=Math.max(0,parseInt(c.getPropertyValue("width"))),v=window.getComputedStyle(this._terminal.element),f=u-(parseInt(v.getPropertyValue("padding-top"))+parseInt(v.getPropertyValue("padding-bottom"))),C=h-(parseInt(v.getPropertyValue("padding-right"))+parseInt(v.getPropertyValue("padding-left")))-b;return{cols:Math.max(2,Math.floor(C/y.css.cell.width)),rows:Math.max(1,Math.floor(f/y.css.cell.height))}}}})(),s})()))})(Ed)),Ed.exports}var EE=wE();var xE=(t,n,s,o)=>{for(var l=n,y=t.length-1,b;y>=0;y--)(b=t[y])&&(l=b(l)||l);return l},TE=(t,n)=>(s,o)=>n(s,o,t),AE=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?av.isErrorNoTelemetry(t)?new av(t.message+`
|
|
12
12
|
|
|
13
|
-
`+
|
|
13
|
+
`+t.stack):new Error(t.message+`
|
|
14
14
|
|
|
15
|
-
`+i.stack):i},0)}}addListener(i){return this.listeners.push(i),()=>{this._removeListener(i)}}emit(i){this.listeners.forEach(n=>{n(i)})}_removeListener(i){this.listeners.splice(this.listeners.indexOf(i),1)}setUnexpectedErrorHandler(i){this.unexpectedErrorHandler=i}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(i){this.unexpectedErrorHandler(i),this.emit(i)}onUnexpectedExternalError(i){this.unexpectedErrorHandler(i)}},AE=new TE;function xd(i){RE(i)||AE.onUnexpectedError(i)}var af="Canceled";function RE(i){return i instanceof LE?!0:i instanceof Error&&i.name===af&&i.message===af}var LE=class extends Error{constructor(){super(af),this.name=this.message}},av=class of extends Error{constructor(n){super(n),this.name="CodeExpectedError"}static fromError(n){if(n instanceof of)return n;let s=new of;return s.message=n.message,s.stack=n.stack,s}static isErrorNoTelemetry(n){return n.name==="CodeExpectedError"}},kE;(i=>{function n(y){return y<0}i.isLessThan=n;function s(y){return y<=0}i.isLessThanOrEqual=s;function o(y){return y>0}i.isGreaterThan=o;function l(y){return y===0}i.isNeitherLessOrGreaterThan=l,i.greaterThan=1,i.lessThan=-1,i.neitherLessOrGreaterThan=0})(kE||={});function ME(i,n){let s=this,o=!1,l;return function(){return o||(o=!0,n||(l=i.apply(s,arguments))),l}}var hb;(i=>{function n(w){return w&&typeof w=="object"&&typeof w[Symbol.iterator]=="function"}i.is=n;let s=Object.freeze([]);function o(){return s}i.empty=o;function*l(w){yield w}i.single=l;function y(w){return n(w)?w:l(w)}i.wrap=y;function b(w){return w||s}i.from=b;function*c(w){for(let R=w.length-1;R>=0;R--)yield w[R]}i.reverse=c;function u(w){return!w||w[Symbol.iterator]().next().done===!0}i.isEmpty=u;function h(w){return w[Symbol.iterator]().next().value}i.first=h;function v(w,R){let L=0;for(let D of w)if(R(D,L++))return!0;return!1}i.some=v;function f(w,R){for(let L of w)if(R(L))return L}i.find=f;function*C(w,R){for(let L of w)R(L)&&(yield L)}i.filter=C;function*x(w,R){let L=0;for(let D of w)yield R(D,L++)}i.map=x;function*A(w,R){let L=0;for(let D of w)yield*R(D,L++)}i.flatMap=A;function*E(...w){for(let R of w)yield*R}i.concat=E;function p(w,R,L){let D=L;for(let T of w)D=R(D,T);return D}i.reduce=p;function*S(w,R,L=w.length){for(R<0&&(R+=w.length),L<0?L+=w.length:L>w.length&&(L=w.length);R<L;R++)yield w[R]}i.slice=S;function _(w,R=Number.POSITIVE_INFINITY){let L=[];if(R===0)return[L,w];let D=w[Symbol.iterator]();for(let T=0;T<R;T++){let B=D.next();if(B.done)return[L,i.empty()];L.push(B.value)}return[L,{[Symbol.iterator](){return D}}]}i.consume=_;async function g(w){let R=[];for await(let L of w)R.push(L);return Promise.resolve(R)}i.asyncToArray=g})(hb||={});function db(i){if(hb.is(i)){let n=[];for(let s of i)if(s)try{s.dispose()}catch(o){n.push(o)}if(n.length===1)throw n[0];if(n.length>1)throw new AggregateError(n,"Encountered errors while disposing of store");return Array.isArray(i)?[]:i}else if(i)return i.dispose(),i}function fb(...i){return Li(()=>db(i))}function Li(i){return{dispose:ME(()=>{i()})}}var pb=class _b{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{db(this._toDispose)}finally{this._toDispose.clear()}}add(n){if(!n)return n;if(n===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?_b.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(n),n}delete(n){if(n){if(n===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(n),n.dispose()}}deleteAndLeak(n){n&&this._toDispose.has(n)&&(this._toDispose.delete(n),void 0)}};pb.DISABLE_DISPOSED_WARNING=!1;var Da=pb,$n=class{constructor(){this._store=new Da,this._store}dispose(){this._store.dispose()}_register(n){if(n===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(n)}};$n.None=Object.freeze({dispose(){}});var Ho=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(n){this._isDisposed||n===this._value||(this._value?.dispose(),this._value=n)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}clearAndLeak(){let n=this._value;return this._value=void 0,n}},Pf=typeof process<"u"&&"title"in process,ou=Pf?"node":navigator.userAgent,DE=Pf?"node":navigator.platform,OE=ou.includes("Firefox"),BE=ou.includes("Edge"),gb=/^((?!chrome|android).)*safari/i.test(ou);function NE(){if(!gb)return 0;let i=ou.match(/Version\/(\d+)/);return i===null||i.length<2?0:parseInt(i[1])}DE.indexOf("Linux")>=0;var IE="",fi=0,pi=0,_i=0,Wt=0,yn={css:"#00000000",rgba:0},Oi;(i=>{function n(l,y,b,c){return c!==void 0?`#${Ls(l)}${Ls(y)}${Ls(b)}${Ls(c)}`:`#${Ls(l)}${Ls(y)}${Ls(b)}`}i.toCss=n;function s(l,y,b,c=255){return(l<<24|y<<16|b<<8|c)>>>0}i.toRgba=s;function o(l,y,b,c){return{css:i.toCss(l,y,b,c),rgba:i.toRgba(l,y,b,c)}}i.toColor=o})(Oi||={});var Vo;(i=>{function n(u,h){if(Wt=(h.rgba&255)/255,Wt===1)return{css:h.css,rgba:h.rgba};let v=h.rgba>>24&255,f=h.rgba>>16&255,C=h.rgba>>8&255,x=u.rgba>>24&255,A=u.rgba>>16&255,E=u.rgba>>8&255;fi=x+Math.round((v-x)*Wt),pi=A+Math.round((f-A)*Wt),_i=E+Math.round((C-E)*Wt);let p=Oi.toCss(fi,pi,_i),S=Oi.toRgba(fi,pi,_i);return{css:p,rgba:S}}i.blend=n;function s(u){return(u.rgba&255)===255}i.isOpaque=s;function o(u,h,v){let f=Os.ensureContrastRatio(u.rgba,h.rgba,v);if(f)return Oi.toColor(f>>24&255,f>>16&255,f>>8&255)}i.ensureContrastRatio=o;function l(u){let h=(u.rgba|255)>>>0;return[fi,pi,_i]=Os.toChannels(h),{css:Oi.toCss(fi,pi,_i),rgba:h}}i.opaque=l;function y(u,h){return Wt=Math.round(h*255),[fi,pi,_i]=Os.toChannels(u.rgba),{css:Oi.toCss(fi,pi,_i,Wt),rgba:Oi.toRgba(fi,pi,_i,Wt)}}i.opacity=y;function b(u,h){return Wt=u.rgba&255,y(u,Wt*h/255)}i.multiplyOpacity=b;function c(u){return[u.rgba>>24&255,u.rgba>>16&255,u.rgba>>8&255]}i.toColorRGB=c})(Vo||={});var HE;(i=>{let n,s;try{let l=document.createElement("canvas");l.width=1,l.height=1;let y=l.getContext("2d",{willReadFrequently:!0});y&&(n=y,n.globalCompositeOperation="copy",s=n.createLinearGradient(0,0,1,1))}catch{}function o(l){if(l.match(/#[\da-f]{3,8}/i))switch(l.length){case 4:return fi=parseInt(l.slice(1,2).repeat(2),16),pi=parseInt(l.slice(2,3).repeat(2),16),_i=parseInt(l.slice(3,4).repeat(2),16),Oi.toColor(fi,pi,_i);case 5:return fi=parseInt(l.slice(1,2).repeat(2),16),pi=parseInt(l.slice(2,3).repeat(2),16),_i=parseInt(l.slice(3,4).repeat(2),16),Wt=parseInt(l.slice(4,5).repeat(2),16),Oi.toColor(fi,pi,_i,Wt);case 7:return{css:l,rgba:(parseInt(l.slice(1),16)<<8|255)>>>0};case 9:return{css:l,rgba:parseInt(l.slice(1),16)>>>0}}let y=l.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(y)return fi=parseInt(y[1]),pi=parseInt(y[2]),_i=parseInt(y[3]),Wt=Math.round((y[5]===void 0?1:parseFloat(y[5]))*255),Oi.toColor(fi,pi,_i,Wt);if(!n||!s)throw new Error("css.toColor: Unsupported css format");if(n.fillStyle=s,n.fillStyle=l,typeof n.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(n.fillRect(0,0,1,1),[fi,pi,_i,Wt]=n.getImageData(0,0,1,1).data,Wt!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:Oi.toRgba(fi,pi,_i,Wt),css:l}}i.toColor=o})(HE||={});var Mi;(i=>{function n(o){return s(o>>16&255,o>>8&255,o&255)}i.relativeLuminance=n;function s(o,l,y){let b=o/255,c=l/255,u=y/255,h=b<=.03928?b/12.92:Math.pow((b+.055)/1.055,2.4),v=c<=.03928?c/12.92:Math.pow((c+.055)/1.055,2.4),f=u<=.03928?u/12.92:Math.pow((u+.055)/1.055,2.4);return h*.2126+v*.7152+f*.0722}i.relativeLuminance2=s})(Mi||={});var Os;(i=>{function n(b,c){if(Wt=(c&255)/255,Wt===1)return c;let u=c>>24&255,h=c>>16&255,v=c>>8&255,f=b>>24&255,C=b>>16&255,x=b>>8&255;return fi=f+Math.round((u-f)*Wt),pi=C+Math.round((h-C)*Wt),_i=x+Math.round((v-x)*Wt),Oi.toRgba(fi,pi,_i)}i.blend=n;function s(b,c,u){let h=Mi.relativeLuminance(b>>8),v=Mi.relativeLuminance(c>>8);if(Cr(h,v)<u){if(v<h){let x=o(b,c,u),A=Cr(h,Mi.relativeLuminance(x>>8));if(A<u){let E=l(b,c,u),p=Cr(h,Mi.relativeLuminance(E>>8));return A>p?x:E}return x}let f=l(b,c,u),C=Cr(h,Mi.relativeLuminance(f>>8));if(C<u){let x=o(b,c,u),A=Cr(h,Mi.relativeLuminance(x>>8));return C>A?f:x}return f}}i.ensureContrastRatio=s;function o(b,c,u){let h=b>>24&255,v=b>>16&255,f=b>>8&255,C=c>>24&255,x=c>>16&255,A=c>>8&255,E=Cr(Mi.relativeLuminance2(C,x,A),Mi.relativeLuminance2(h,v,f));for(;E<u&&(C>0||x>0||A>0);)C-=Math.max(0,Math.ceil(C*.1)),x-=Math.max(0,Math.ceil(x*.1)),A-=Math.max(0,Math.ceil(A*.1)),E=Cr(Mi.relativeLuminance2(C,x,A),Mi.relativeLuminance2(h,v,f));return(C<<24|x<<16|A<<8|255)>>>0}i.reduceLuminance=o;function l(b,c,u){let h=b>>24&255,v=b>>16&255,f=b>>8&255,C=c>>24&255,x=c>>16&255,A=c>>8&255,E=Cr(Mi.relativeLuminance2(C,x,A),Mi.relativeLuminance2(h,v,f));for(;E<u&&(C<255||x<255||A<255);)C=Math.min(255,C+Math.ceil((255-C)*.1)),x=Math.min(255,x+Math.ceil((255-x)*.1)),A=Math.min(255,A+Math.ceil((255-A)*.1)),E=Cr(Mi.relativeLuminance2(C,x,A),Mi.relativeLuminance2(h,v,f));return(C<<24|x<<16|A<<8|255)>>>0}i.increaseLuminance=l;function y(b){return[b>>24&255,b>>16&255,b>>8&255,b&255]}i.toChannels=y})(Os||={});function Ls(i){let n=i.toString(16);return n.length<2?"0"+n:n}function Cr(i,n){return i<n?(n+.05)/(i+.05):(i+.05)/(n+.05)}function li(i){if(!i)throw new Error("value must not be falsy");return i}function jf(i){return 57508<=i&&i<=57558}function zE(i){return 57520<=i&&i<=57527}function $E(i){return 57344<=i&&i<=63743}function UE(i){return 9472<=i&&i<=9631}function PE(i){return i>=128512&&i<=128591||i>=127744&&i<=128511||i>=128640&&i<=128767||i>=9728&&i<=9983||i>=9984&&i<=10175||i>=65024&&i<=65039||i>=129280&&i<=129535||i>=127462&&i<=127487}function jE(i,n,s,o){return n===1&&s>Math.ceil(o*1.5)&&i!==void 0&&i>255&&!PE(i)&&!jf(i)&&!$E(i)}function mb(i){return jf(i)||UE(i)}function FE(){return{css:{canvas:wc(),cell:wc()},device:{canvas:wc(),cell:wc(),char:{width:0,height:0,left:0,top:0}}}}function wc(){return{width:0,height:0}}function qE(i,n,s=0){return(i-(Math.round(n)*2-s))%(Math.round(n)*2)}var Ei=0,di=0,Kn=!1,wr=!1,Ec=!1,Gi,Td=0,WE=class{constructor(i,n,s,o,l,y){this._terminal=i,this._optionService=n,this._selectionRenderModel=s,this._decorationService=o,this._coreBrowserService=l,this._themeService=y,this.result={fg:0,bg:0,ext:0}}resolve(i,n,s,o){if(this.result.bg=i.bg,this.result.fg=i.fg,this.result.ext=i.bg&268435456?i.extended.ext:0,di=0,Ei=0,wr=!1,Kn=!1,Ec=!1,Gi=this._themeService.colors,Td=0,i.getCode()!==0&&i.extended.underlineStyle===4){let l=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));Td=n*o%(Math.round(l)*2)}if(this._decorationService.forEachDecorationAtCell(n,s,"bottom",l=>{l.backgroundColorRGB&&(di=l.backgroundColorRGB.rgba>>8&16777215,wr=!0),l.foregroundColorRGB&&(Ei=l.foregroundColorRGB.rgba>>8&16777215,Kn=!0)}),Ec=this._selectionRenderModel.isCellSelected(this._terminal,n,s),Ec){if(this.result.fg&67108864||(this.result.bg&50331648)!==0){if(this.result.fg&67108864)switch(this.result.fg&50331648){case 16777216:case 33554432:di=this._themeService.colors.ansi[this.result.fg&255].rgba;break;case 50331648:di=(this.result.fg&16777215)<<8|255;break;default:di=this._themeService.colors.foreground.rgba}else switch(this.result.bg&50331648){case 16777216:case 33554432:di=this._themeService.colors.ansi[this.result.bg&255].rgba;break;case 50331648:di=(this.result.bg&16777215)<<8|255;break}di=Os.blend(di,(this._coreBrowserService.isFocused?Gi.selectionBackgroundOpaque:Gi.selectionInactiveBackgroundOpaque).rgba&4294967040|128)>>8&16777215}else di=(this._coreBrowserService.isFocused?Gi.selectionBackgroundOpaque:Gi.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(wr=!0,Gi.selectionForeground&&(Ei=Gi.selectionForeground.rgba>>8&16777215,Kn=!0),mb(i.getCode())){if(this.result.fg&67108864&&(this.result.bg&50331648)===0)Ei=(this._coreBrowserService.isFocused?Gi.selectionBackgroundOpaque:Gi.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(this.result.fg&67108864)switch(this.result.bg&50331648){case 16777216:case 33554432:Ei=this._themeService.colors.ansi[this.result.bg&255].rgba;break;case 50331648:Ei=(this.result.bg&16777215)<<8|255;break}else switch(this.result.fg&50331648){case 16777216:case 33554432:Ei=this._themeService.colors.ansi[this.result.fg&255].rgba;break;case 50331648:Ei=(this.result.fg&16777215)<<8|255;break;default:Ei=this._themeService.colors.foreground.rgba}Ei=Os.blend(Ei,(this._coreBrowserService.isFocused?Gi.selectionBackgroundOpaque:Gi.selectionInactiveBackgroundOpaque).rgba&4294967040|128)>>8&16777215}Kn=!0}}this._decorationService.forEachDecorationAtCell(n,s,"top",l=>{l.backgroundColorRGB&&(di=l.backgroundColorRGB.rgba>>8&16777215,wr=!0),l.foregroundColorRGB&&(Ei=l.foregroundColorRGB.rgba>>8&16777215,Kn=!0)}),wr&&(Ec?di=i.bg&-16777216&-134217729|di|50331648:di=i.bg&-16777216|di|50331648),Kn&&(Ei=i.fg&-16777216&-67108865|Ei|50331648),this.result.fg&67108864&&(wr&&!Kn&&((this.result.bg&50331648)===0?Ei=this.result.fg&-134217728|Gi.background.rgba>>8&16777215&16777215|50331648:Ei=this.result.fg&-134217728|this.result.bg&67108863,Kn=!0),!wr&&Kn&&((this.result.fg&50331648)===0?di=this.result.bg&-67108864|Gi.foreground.rgba>>8&16777215&16777215|50331648:di=this.result.bg&-67108864|this.result.fg&67108863,wr=!0)),Gi=void 0,this.result.bg=wr?di:this.result.bg,this.result.fg=Kn?Ei:this.result.fg,this.result.ext&=536870911,this.result.ext|=Td<<29&3758096384}},GE=.5,vb=OE||BE?"bottom":"ideographic",KE={"▀":[{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}]},YE={"░":[[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]]},VE={"─":{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:(i,n)=>`M0,${.5-n} L1,${.5-n} M0,${.5+n} L1,${.5+n}`},"║":{1:(i,n)=>`M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1`},"╒":{1:(i,n)=>`M.5,1 L.5,${.5-n} L1,${.5-n} M.5,${.5+n} L1,${.5+n}`},"╓":{1:(i,n)=>`M${.5-i},1 L${.5-i},.5 L1,.5 M${.5+i},.5 L${.5+i},1`},"╔":{1:(i,n)=>`M1,${.5-n} L${.5-i},${.5-n} L${.5-i},1 M1,${.5+n} L${.5+i},${.5+n} L${.5+i},1`},"╕":{1:(i,n)=>`M0,${.5-n} L.5,${.5-n} L.5,1 M0,${.5+n} L.5,${.5+n}`},"╖":{1:(i,n)=>`M${.5+i},1 L${.5+i},.5 L0,.5 M${.5-i},.5 L${.5-i},1`},"╗":{1:(i,n)=>`M0,${.5+n} L${.5-i},${.5+n} L${.5-i},1 M0,${.5-n} L${.5+i},${.5-n} L${.5+i},1`},"╘":{1:(i,n)=>`M.5,0 L.5,${.5+n} L1,${.5+n} M.5,${.5-n} L1,${.5-n}`},"╙":{1:(i,n)=>`M1,.5 L${.5-i},.5 L${.5-i},0 M${.5+i},.5 L${.5+i},0`},"╚":{1:(i,n)=>`M1,${.5-n} L${.5+i},${.5-n} L${.5+i},0 M1,${.5+n} L${.5-i},${.5+n} L${.5-i},0`},"╛":{1:(i,n)=>`M0,${.5+n} L.5,${.5+n} L.5,0 M0,${.5-n} L.5,${.5-n}`},"╜":{1:(i,n)=>`M0,.5 L${.5+i},.5 L${.5+i},0 M${.5-i},.5 L${.5-i},0`},"╝":{1:(i,n)=>`M0,${.5-n} L${.5-i},${.5-n} L${.5-i},0 M0,${.5+n} L${.5+i},${.5+n} L${.5+i},0`},"╞":{1:(i,n)=>`M.5,0 L.5,1 M.5,${.5-n} L1,${.5-n} M.5,${.5+n} L1,${.5+n}`},"╟":{1:(i,n)=>`M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1 M${.5+i},.5 L1,.5`},"╠":{1:(i,n)=>`M${.5-i},0 L${.5-i},1 M1,${.5+n} L${.5+i},${.5+n} L${.5+i},1 M1,${.5-n} L${.5+i},${.5-n} L${.5+i},0`},"╡":{1:(i,n)=>`M.5,0 L.5,1 M0,${.5-n} L.5,${.5-n} M0,${.5+n} L.5,${.5+n}`},"╢":{1:(i,n)=>`M0,.5 L${.5-i},.5 M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1`},"╣":{1:(i,n)=>`M${.5+i},0 L${.5+i},1 M0,${.5+n} L${.5-i},${.5+n} L${.5-i},1 M0,${.5-n} L${.5-i},${.5-n} L${.5-i},0`},"╤":{1:(i,n)=>`M0,${.5-n} L1,${.5-n} M0,${.5+n} L1,${.5+n} M.5,${.5+n} L.5,1`},"╥":{1:(i,n)=>`M0,.5 L1,.5 M${.5-i},.5 L${.5-i},1 M${.5+i},.5 L${.5+i},1`},"╦":{1:(i,n)=>`M0,${.5-n} L1,${.5-n} M0,${.5+n} L${.5-i},${.5+n} L${.5-i},1 M1,${.5+n} L${.5+i},${.5+n} L${.5+i},1`},"╧":{1:(i,n)=>`M.5,0 L.5,${.5-n} M0,${.5-n} L1,${.5-n} M0,${.5+n} L1,${.5+n}`},"╨":{1:(i,n)=>`M0,.5 L1,.5 M${.5-i},.5 L${.5-i},0 M${.5+i},.5 L${.5+i},0`},"╩":{1:(i,n)=>`M0,${.5+n} L1,${.5+n} M0,${.5-n} L${.5-i},${.5-n} L${.5-i},0 M1,${.5-n} L${.5+i},${.5-n} L${.5+i},0`},"╪":{1:(i,n)=>`M.5,0 L.5,1 M0,${.5-n} L1,${.5-n} M0,${.5+n} L1,${.5+n}`},"╫":{1:(i,n)=>`M0,.5 L1,.5 M${.5-i},0 L${.5-i},1 M${.5+i},0 L${.5+i},1`},"╬":{1:(i,n)=>`M0,${.5+n} L${.5-i},${.5+n} L${.5-i},1 M1,${.5+n} L${.5+i},${.5+n} L${.5+i},1 M0,${.5-n} L${.5-i},${.5-n} L${.5-i},0 M1,${.5-n} L${.5+i},${.5-n} L${.5+i},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:(i,n)=>`M.5,1 L.5,${.5+n/.15*.5} C.5,${.5+n/.15*.5},.5,.5,1,.5`},"╮":{1:(i,n)=>`M.5,1 L.5,${.5+n/.15*.5} C.5,${.5+n/.15*.5},.5,.5,0,.5`},"╯":{1:(i,n)=>`M.5,0 L.5,${.5-n/.15*.5} C.5,${.5-n/.15*.5},.5,.5,0,.5`},"╰":{1:(i,n)=>`M.5,0 L.5,${.5-n/.15*.5} C.5,${.5-n/.15*.5},.5,.5,1,.5`}},rl={"":{d:"M.3,1 L.03,1 L.03,.88 C.03,.82,.06,.78,.11,.73 C.15,.7,.2,.68,.28,.65 L.43,.6 C.49,.58,.53,.56,.56,.53 C.59,.5,.6,.47,.6,.43 L.6,.27 L.4,.27 L.69,.1 L.98,.27 L.78,.27 L.78,.46 C.78,.52,.76,.56,.72,.61 C.68,.66,.63,.67,.56,.7 L.48,.72 C.42,.74,.38,.76,.35,.78 C.32,.8,.31,.84,.31,.88 L.31,1 M.3,.5 L.03,.59 L.03,.09 L.3,.09 L.3,.655",type:0},"":{d:"M.7,.4 L.7,.47 L.2,.47 L.2,.03 L.355,.03 L.355,.4 L.705,.4 M.7,.5 L.86,.5 L.86,.95 L.69,.95 L.44,.66 L.46,.86 L.46,.95 L.3,.95 L.3,.49 L.46,.49 L.71,.78 L.69,.565 L.69,.5",type:0},"":{d:"M.25,.94 C.16,.94,.11,.92,.11,.87 L.11,.53 C.11,.48,.15,.455,.23,.45 L.23,.3 C.23,.25,.26,.22,.31,.19 C.36,.16,.43,.15,.51,.15 C.59,.15,.66,.16,.71,.19 C.77,.22,.79,.26,.79,.3 L.79,.45 C.87,.45,.91,.48,.91,.53 L.91,.87 C.91,.92,.86,.94,.77,.94 L.24,.94 M.53,.2 C.49,.2,.45,.21,.42,.23 C.39,.25,.38,.27,.38,.3 L.38,.45 L.68,.45 L.68,.3 C.68,.27,.67,.25,.64,.23 C.61,.21,.58,.2,.53,.2 M.58,.82 L.58,.66 C.63,.65,.65,.63,.65,.6 C.65,.58,.64,.57,.61,.56 C.58,.55,.56,.54,.52,.54 C.48,.54,.46,.55,.43,.56 C.4,.57,.39,.59,.39,.6 C.39,.63,.41,.64,.46,.66 L.46,.82 L.57,.82",type:0},"":{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}};rl[""]=rl[""];rl[""]=rl[""];function XE(i,n,s,o,l,y,b,c){let u=KE[n];if(u)return ZE(i,u,s,o,l,y),!0;let h=YE[n];if(h)return QE(i,h,s,o,l,y),!0;let v=VE[n];if(v)return JE(i,v,s,o,l,y,c),!0;let f=rl[n];return f?(ex(i,f,s,o,l,y,b,c),!0):!1}function ZE(i,n,s,o,l,y){for(let b=0;b<n.length;b++){let c=n[b],u=l/8,h=y/8;i.fillRect(s+c.x*u,o+c.y*h,c.w*u,c.h*h)}}var ov=new Map;function QE(i,n,s,o,l,y){let b=ov.get(n);b||(b=new Map,ov.set(n,b));let c=i.fillStyle;if(typeof c!="string")throw new Error(`Unexpected fillStyle type "${c}"`);let u=b.get(c);if(!u){let h=n[0].length,v=n.length,f=i.canvas.ownerDocument.createElement("canvas");f.width=h,f.height=v;let C=li(f.getContext("2d")),x=new ImageData(h,v),A,E,p,S;if(c.startsWith("#"))A=parseInt(c.slice(1,3),16),E=parseInt(c.slice(3,5),16),p=parseInt(c.slice(5,7),16),S=c.length>7&&parseInt(c.slice(7,9),16)||1;else if(c.startsWith("rgba"))[A,E,p,S]=c.substring(5,c.length-1).split(",").map(_=>parseFloat(_));else throw new Error(`Unexpected fillStyle color format "${c}" when drawing pattern glyph`);for(let _=0;_<v;_++)for(let g=0;g<h;g++)x.data[(_*h+g)*4]=A,x.data[(_*h+g)*4+1]=E,x.data[(_*h+g)*4+2]=p,x.data[(_*h+g)*4+3]=n[_][g]*(S*255);C.putImageData(x,0,0),u=li(i.createPattern(f,null)),b.set(c,u)}i.fillStyle=u,i.fillRect(s,o,l,y)}function JE(i,n,s,o,l,y,b){i.strokeStyle=i.fillStyle;for(let[c,u]of Object.entries(n)){i.beginPath(),i.lineWidth=b*Number.parseInt(c);let h;if(typeof u=="function"){let v=.15/y*l;h=u(.15,v)}else h=u;for(let v of h.split(" ")){let f=v[0],C=bb[f];if(!C){console.error(`Could not find drawing instructions for "${f}"`);continue}let x=v.substring(1).split(",");!x[0]||!x[1]||C(i,Sb(x,l,y,s,o,!0,b))}i.stroke(),i.closePath()}}function ex(i,n,s,o,l,y,b,c){let u=new Path2D;u.rect(s,o,l,y),i.clip(u),i.beginPath();let h=b/12;i.lineWidth=c*h;for(let v of n.d.split(" ")){let f=v[0],C=bb[f];if(!C){console.error(`Could not find drawing instructions for "${f}"`);continue}let x=v.substring(1).split(",");!x[0]||!x[1]||C(i,Sb(x,l,y,s,o,!1,c,(n.leftPadding??0)*(h/2),(n.rightPadding??0)*(h/2)))}n.type===1?(i.strokeStyle=i.fillStyle,i.stroke()):i.fill(),i.closePath()}function lv(i,n,s=0){return Math.max(Math.min(i,n),s)}var bb={C:(i,n)=>i.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]),L:(i,n)=>i.lineTo(n[0],n[1]),M:(i,n)=>i.moveTo(n[0],n[1])};function Sb(i,n,s,o,l,y,b,c=0,u=0){let h=i.map(v=>parseFloat(v)||parseInt(v));if(h.length<2)throw new Error("Too few arguments for instruction");for(let v=0;v<h.length;v+=2)h[v]*=n-c*b-u*b,y&&h[v]!==0&&(h[v]=lv(Math.round(h[v]+.5)-.5,n,0)),h[v]+=o+c*b;for(let v=1;v<h.length;v+=2)h[v]*=s,y&&h[v]!==0&&(h[v]=lv(Math.round(h[v]+.5)-.5,s,0)),h[v]+=l;return h}var cv=class{constructor(){this._data={}}set(i,n,s){this._data[i]||(this._data[i]={}),this._data[i][n]=s}get(i,n){return this._data[i]?this._data[i][n]:void 0}clear(){this._data={}}},uv=class{constructor(){this._data=new cv}set(i,n,s,o,l){this._data.get(i,n)||this._data.set(i,n,new cv),this._data.get(i,n).set(s,o,l)}get(i,n,s,o){return this._data.get(i,n)?.get(s,o)}clear(){this._data.clear()}},yb=class{constructor(){this._tasks=[],this._i=0}enqueue(i){this._tasks.push(i),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(i){this._idleCallback=void 0;let n=0,s=0,o=i.timeRemaining(),l=0;for(;this._i<this._tasks.length;){if(n=performance.now(),this._tasks[this._i]()||this._i++,n=Math.max(1,performance.now()-n),s=Math.max(n,s),l=i.timeRemaining(),s*1.5>l){o-n<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(o-n))}ms`),this._start();return}o=l}this.clear()}},tx=class extends yb{_requestCallback(i){return setTimeout(()=>i(this._createDeadline(16)))}_cancelCallback(i){clearTimeout(i)}_createDeadline(i){let n=performance.now()+i;return{timeRemaining:()=>Math.max(0,n-performance.now())}}},ix=class extends yb{_requestCallback(i){return requestIdleCallback(i)}_cancelCallback(i){cancelIdleCallback(i)}},nx=!Pf&&"requestIdleCallback"in window?ix:tx,La=class Cb{constructor(){this.fg=0,this.bg=0,this.extended=new wb}static toColorRGB(n){return[n>>>16&255,n>>>8&255,n&255]}static fromColorRGB(n){return(n[0]&255)<<16|(n[1]&255)<<8|n[2]&255}clone(){let n=new Cb;return n.fg=this.fg,n.bg=this.bg,n.extended=this.extended.clone(),n}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},wb=class Eb{constructor(n=0,s=0){this._ext=0,this._urlId=0,this._ext=n,this._urlId=s}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(n){this._ext=n}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(n){this._ext&=-469762049,this._ext|=n<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(n){this._ext&=-67108864,this._ext|=n&67108863}get urlId(){return this._urlId}set urlId(n){this._urlId=n}get underlineVariantOffset(){let n=(this._ext&3758096384)>>29;return n<0?n^4294967288:n}set underlineVariantOffset(n){this._ext&=536870911,this._ext|=n<<29&3758096384}clone(){return new Eb(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},rx=globalThis.performance&&typeof globalThis.performance.now=="function",sx=class xb{static create(n){return new xb(n)}constructor(n){this._now=rx&&n===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},Rr;(i=>{i.None=()=>$n.None;function n(F,I){return f(F,()=>{},0,void 0,!0,void 0,I)}i.defer=n;function s(F){return(I,Z=null,ee)=>{let j=!1,Y;return Y=F(K=>{if(!j)return Y?Y.dispose():j=!0,I.call(Z,K)},null,ee),j&&Y.dispose(),Y}}i.once=s;function o(F,I,Z){return h((ee,j=null,Y)=>F(K=>ee.call(j,I(K)),null,Y),Z)}i.map=o;function l(F,I,Z){return h((ee,j=null,Y)=>F(K=>{I(K),ee.call(j,K)},null,Y),Z)}i.forEach=l;function y(F,I,Z){return h((ee,j=null,Y)=>F(K=>I(K)&&ee.call(j,K),null,Y),Z)}i.filter=y;function b(F){return F}i.signal=b;function c(...F){return(I,Z=null,ee)=>{let j=fb(...F.map(Y=>Y(K=>I.call(Z,K))));return v(j,ee)}}i.any=c;function u(F,I,Z,ee){let j=Z;return o(F,Y=>(j=I(j,Y),j),ee)}i.reduce=u;function h(F,I){let Z,ee={onWillAddFirstListener(){Z=F(j.fire,j)},onDidRemoveLastListener(){Z?.dispose()}},j=new kt(ee);return I?.add(j),j.event}function v(F,I){return I instanceof Array?I.push(F):I&&I.add(F),F}function f(F,I,Z=100,ee=!1,j=!1,Y,K){let O,H,M,U=0,V,ae={leakWarningThreshold:Y,onWillAddFirstListener(){O=F(me=>{U++,H=I(H,me),ee&&!M&&(ce.fire(H),H=void 0),V=()=>{let Q=H;H=void 0,M=void 0,(!ee||U>1)&&ce.fire(Q),U=0},typeof Z=="number"?(clearTimeout(M),M=setTimeout(V,Z)):M===void 0&&(M=0,queueMicrotask(V))})},onWillRemoveListener(){j&&U>0&&V?.()},onDidRemoveLastListener(){V=void 0,O.dispose()}},ce=new kt(ae);return K?.add(ce),ce.event}i.debounce=f;function C(F,I=0,Z){return i.debounce(F,(ee,j)=>ee?(ee.push(j),ee):[j],I,void 0,!0,void 0,Z)}i.accumulate=C;function x(F,I=(ee,j)=>ee===j,Z){let ee=!0,j;return y(F,Y=>{let K=ee||!I(Y,j);return ee=!1,j=Y,K},Z)}i.latch=x;function A(F,I,Z){return[i.filter(F,I,Z),i.filter(F,ee=>!I(ee),Z)]}i.split=A;function E(F,I=!1,Z=[],ee){let j=Z.slice(),Y=F(H=>{j?j.push(H):O.fire(H)});ee&&ee.add(Y);let K=()=>{j?.forEach(H=>O.fire(H)),j=null},O=new kt({onWillAddFirstListener(){Y||(Y=F(H=>O.fire(H)),ee&&ee.add(Y))},onDidAddFirstListener(){j&&(I?setTimeout(K):K())},onDidRemoveLastListener(){Y&&Y.dispose(),Y=null}});return ee&&ee.add(O),O.event}i.buffer=E;function p(F,I){return(Z,ee,j)=>{let Y=I(new _);return F(function(K){let O=Y.evaluate(K);O!==S&&Z.call(ee,O)},void 0,j)}}i.chain=p;let S=Symbol("HaltChainable");class _{constructor(){this.steps=[]}map(I){return this.steps.push(I),this}forEach(I){return this.steps.push(Z=>(I(Z),Z)),this}filter(I){return this.steps.push(Z=>I(Z)?Z:S),this}reduce(I,Z){let ee=Z;return this.steps.push(j=>(ee=I(ee,j),ee)),this}latch(I=(Z,ee)=>Z===ee){let Z=!0,ee;return this.steps.push(j=>{let Y=Z||!I(j,ee);return Z=!1,ee=j,Y?j:S}),this}evaluate(I){for(let Z of this.steps)if(I=Z(I),I===S)break;return I}}function g(F,I,Z=ee=>ee){let ee=(...O)=>K.fire(Z(...O)),j=()=>F.on(I,ee),Y=()=>F.removeListener(I,ee),K=new kt({onWillAddFirstListener:j,onDidRemoveLastListener:Y});return K.event}i.fromNodeEventEmitter=g;function w(F,I,Z=ee=>ee){let ee=(...O)=>K.fire(Z(...O)),j=()=>F.addEventListener(I,ee),Y=()=>F.removeEventListener(I,ee),K=new kt({onWillAddFirstListener:j,onDidRemoveLastListener:Y});return K.event}i.fromDOMEventEmitter=w;function R(F){return new Promise(I=>s(F)(I))}i.toPromise=R;function L(F){let I=new kt;return F.then(Z=>{I.fire(Z)},()=>{I.fire(void 0)}).finally(()=>{I.dispose()}),I.event}i.fromPromise=L;function D(F,I){return F(Z=>I.fire(Z))}i.forward=D;function T(F,I,Z){return I(Z),F(ee=>I(ee))}i.runAndSubscribe=T;class B{constructor(I,Z){this._observable=I,this._counter=0,this._hasChanged=!1;let ee={onWillAddFirstListener:()=>{I.addObserver(this)},onDidRemoveLastListener:()=>{I.removeObserver(this)}};this.emitter=new kt(ee),Z&&Z.add(this.emitter)}beginUpdate(I){this._counter++}handlePossibleChange(I){}handleChange(I,Z){this._hasChanged=!0}endUpdate(I){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function W(F,I){return new B(F,I).emitter.event}i.fromObservable=W;function P(F){return(I,Z,ee)=>{let j=0,Y=!1,K={beginUpdate(){j++},endUpdate(){j--,j===0&&(F.reportChanges(),Y&&(Y=!1,I.call(Z)))},handlePossibleChange(){},handleChange(){Y=!0}};F.addObserver(K),F.reportChanges();let O={dispose(){F.removeObserver(K)}};return ee instanceof Da?ee.add(O):Array.isArray(ee)&&ee.push(O),O}}i.fromObservableLight=P})(Rr||={});var lf=class cf{constructor(n){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${n}_${cf._idPool++}`,cf.all.add(this)}start(n){this._stopWatch=new sx,this.listenerCount=n}stop(){if(this._stopWatch){let n=this._stopWatch.elapsed();this.durations.push(n),this.elapsedOverall+=n,this.invocationCount+=1,this._stopWatch=void 0}}};lf.all=new Set,lf._idPool=0;var ax=lf,ox=-1,Tb=class Ab{constructor(n,s,o=(Ab._idPool++).toString(16).padStart(3,"0")){this._errorHandler=n,this.threshold=s,this.name=o,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(n,s){let o=this.threshold;if(o<=0||s<o)return;this._stacks||(this._stacks=new Map);let l=this._stacks.get(n.value)||0;if(this._stacks.set(n.value,l+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=o*.5;let[y,b]=this.getMostFrequentStack(),c=`[${this.name}] potential listener LEAK detected, having ${s} listeners already. MOST frequent listener (${b}):`;console.warn(c),console.warn(y);let u=new ux(c,y);this._errorHandler(u)}return()=>{let y=this._stacks.get(n.value)||0;this._stacks.set(n.value,y-1)}}getMostFrequentStack(){if(!this._stacks)return;let n,s=0;for(let[o,l]of this._stacks)(!n||s<l)&&(n=[o,l],s=l);return n}};Tb._idPool=1;var lx=Tb,cx=class Rb{constructor(n){this.value=n}static create(){let n=new Error;return new Rb(n.stack??"")}print(){console.warn(this.value.split(`
|
|
15
|
+
`+t.stack):t},0)}}addListener(t){return this.listeners.push(t),()=>{this._removeListener(t)}}emit(t){this.listeners.forEach(n=>{n(t)})}_removeListener(t){this.listeners.splice(this.listeners.indexOf(t),1)}setUnexpectedErrorHandler(t){this.unexpectedErrorHandler=t}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}},RE=new AE;function xd(t){LE(t)||RE.onUnexpectedError(t)}var af="Canceled";function LE(t){return t instanceof kE?!0:t instanceof Error&&t.name===af&&t.message===af}var kE=class extends Error{constructor(){super(af),this.name=this.message}},av=class of extends Error{constructor(n){super(n),this.name="CodeExpectedError"}static fromError(n){if(n instanceof of)return n;let s=new of;return s.message=n.message,s.stack=n.stack,s}static isErrorNoTelemetry(n){return n.name==="CodeExpectedError"}},ME;(t=>{function n(y){return y<0}t.isLessThan=n;function s(y){return y<=0}t.isLessThanOrEqual=s;function o(y){return y>0}t.isGreaterThan=o;function l(y){return y===0}t.isNeitherLessOrGreaterThan=l,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(ME||={});function DE(t,n){let s=this,o=!1,l;return function(){return o||(o=!0,n||(l=t.apply(s,arguments))),l}}var db;(t=>{function n(w){return w&&typeof w=="object"&&typeof w[Symbol.iterator]=="function"}t.is=n;let s=Object.freeze([]);function o(){return s}t.empty=o;function*l(w){yield w}t.single=l;function y(w){return n(w)?w:l(w)}t.wrap=y;function b(w){return w||s}t.from=b;function*c(w){for(let R=w.length-1;R>=0;R--)yield w[R]}t.reverse=c;function u(w){return!w||w[Symbol.iterator]().next().done===!0}t.isEmpty=u;function h(w){return w[Symbol.iterator]().next().value}t.first=h;function v(w,R){let L=0;for(let D of w)if(R(D,L++))return!0;return!1}t.some=v;function f(w,R){for(let L of w)if(R(L))return L}t.find=f;function*C(w,R){for(let L of w)R(L)&&(yield L)}t.filter=C;function*x(w,R){let L=0;for(let D of w)yield R(D,L++)}t.map=x;function*A(w,R){let L=0;for(let D of w)yield*R(D,L++)}t.flatMap=A;function*E(...w){for(let R of w)yield*R}t.concat=E;function p(w,R,L){let D=L;for(let T of w)D=R(D,T);return D}t.reduce=p;function*S(w,R,L=w.length){for(R<0&&(R+=w.length),L<0?L+=w.length:L>w.length&&(L=w.length);R<L;R++)yield w[R]}t.slice=S;function _(w,R=Number.POSITIVE_INFINITY){let L=[];if(R===0)return[L,w];let D=w[Symbol.iterator]();for(let T=0;T<R;T++){let B=D.next();if(B.done)return[L,t.empty()];L.push(B.value)}return[L,{[Symbol.iterator](){return D}}]}t.consume=_;async function g(w){let R=[];for await(let L of w)R.push(L);return Promise.resolve(R)}t.asyncToArray=g})(db||={});function fb(t){if(db.is(t)){let n=[];for(let s of t)if(s)try{s.dispose()}catch(o){n.push(o)}if(n.length===1)throw n[0];if(n.length>1)throw new AggregateError(n,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function pb(...t){return Li(()=>fb(t))}function Li(t){return{dispose:DE(()=>{t()})}}var _b=class gb{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{fb(this._toDispose)}finally{this._toDispose.clear()}}add(n){if(!n)return n;if(n===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?gb.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(n),n}delete(n){if(n){if(n===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(n),n.dispose()}}deleteAndLeak(n){n&&this._toDispose.has(n)&&(this._toDispose.delete(n),void 0)}};_b.DISABLE_DISPOSED_WARNING=!1;var Da=_b,$n=class{constructor(){this._store=new Da,this._store}dispose(){this._store.dispose()}_register(n){if(n===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(n)}};$n.None=Object.freeze({dispose(){}});var Ho=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(n){this._isDisposed||n===this._value||(this._value?.dispose(),this._value=n)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}clearAndLeak(){let n=this._value;return this._value=void 0,n}},Pf=typeof process<"u"&&"title"in process,ou=Pf?"node":navigator.userAgent,OE=Pf?"node":navigator.platform,BE=ou.includes("Firefox"),NE=ou.includes("Edge"),mb=/^((?!chrome|android).)*safari/i.test(ou);function IE(){if(!mb)return 0;let t=ou.match(/Version\/(\d+)/);return t===null||t.length<2?0:parseInt(t[1])}OE.indexOf("Linux")>=0;var HE="",fi=0,pi=0,_i=0,Wt=0,yn={css:"#00000000",rgba:0},Oi;(t=>{function n(l,y,b,c){return c!==void 0?`#${Ls(l)}${Ls(y)}${Ls(b)}${Ls(c)}`:`#${Ls(l)}${Ls(y)}${Ls(b)}`}t.toCss=n;function s(l,y,b,c=255){return(l<<24|y<<16|b<<8|c)>>>0}t.toRgba=s;function o(l,y,b,c){return{css:t.toCss(l,y,b,c),rgba:t.toRgba(l,y,b,c)}}t.toColor=o})(Oi||={});var Vo;(t=>{function n(u,h){if(Wt=(h.rgba&255)/255,Wt===1)return{css:h.css,rgba:h.rgba};let v=h.rgba>>24&255,f=h.rgba>>16&255,C=h.rgba>>8&255,x=u.rgba>>24&255,A=u.rgba>>16&255,E=u.rgba>>8&255;fi=x+Math.round((v-x)*Wt),pi=A+Math.round((f-A)*Wt),_i=E+Math.round((C-E)*Wt);let p=Oi.toCss(fi,pi,_i),S=Oi.toRgba(fi,pi,_i);return{css:p,rgba:S}}t.blend=n;function s(u){return(u.rgba&255)===255}t.isOpaque=s;function o(u,h,v){let f=Os.ensureContrastRatio(u.rgba,h.rgba,v);if(f)return Oi.toColor(f>>24&255,f>>16&255,f>>8&255)}t.ensureContrastRatio=o;function l(u){let h=(u.rgba|255)>>>0;return[fi,pi,_i]=Os.toChannels(h),{css:Oi.toCss(fi,pi,_i),rgba:h}}t.opaque=l;function y(u,h){return Wt=Math.round(h*255),[fi,pi,_i]=Os.toChannels(u.rgba),{css:Oi.toCss(fi,pi,_i,Wt),rgba:Oi.toRgba(fi,pi,_i,Wt)}}t.opacity=y;function b(u,h){return Wt=u.rgba&255,y(u,Wt*h/255)}t.multiplyOpacity=b;function c(u){return[u.rgba>>24&255,u.rgba>>16&255,u.rgba>>8&255]}t.toColorRGB=c})(Vo||={});var zE;(t=>{let n,s;try{let l=document.createElement("canvas");l.width=1,l.height=1;let y=l.getContext("2d",{willReadFrequently:!0});y&&(n=y,n.globalCompositeOperation="copy",s=n.createLinearGradient(0,0,1,1))}catch{}function o(l){if(l.match(/#[\da-f]{3,8}/i))switch(l.length){case 4:return fi=parseInt(l.slice(1,2).repeat(2),16),pi=parseInt(l.slice(2,3).repeat(2),16),_i=parseInt(l.slice(3,4).repeat(2),16),Oi.toColor(fi,pi,_i);case 5:return fi=parseInt(l.slice(1,2).repeat(2),16),pi=parseInt(l.slice(2,3).repeat(2),16),_i=parseInt(l.slice(3,4).repeat(2),16),Wt=parseInt(l.slice(4,5).repeat(2),16),Oi.toColor(fi,pi,_i,Wt);case 7:return{css:l,rgba:(parseInt(l.slice(1),16)<<8|255)>>>0};case 9:return{css:l,rgba:parseInt(l.slice(1),16)>>>0}}let y=l.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(y)return fi=parseInt(y[1]),pi=parseInt(y[2]),_i=parseInt(y[3]),Wt=Math.round((y[5]===void 0?1:parseFloat(y[5]))*255),Oi.toColor(fi,pi,_i,Wt);if(!n||!s)throw new Error("css.toColor: Unsupported css format");if(n.fillStyle=s,n.fillStyle=l,typeof n.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(n.fillRect(0,0,1,1),[fi,pi,_i,Wt]=n.getImageData(0,0,1,1).data,Wt!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:Oi.toRgba(fi,pi,_i,Wt),css:l}}t.toColor=o})(zE||={});var Mi;(t=>{function n(o){return s(o>>16&255,o>>8&255,o&255)}t.relativeLuminance=n;function s(o,l,y){let b=o/255,c=l/255,u=y/255,h=b<=.03928?b/12.92:Math.pow((b+.055)/1.055,2.4),v=c<=.03928?c/12.92:Math.pow((c+.055)/1.055,2.4),f=u<=.03928?u/12.92:Math.pow((u+.055)/1.055,2.4);return h*.2126+v*.7152+f*.0722}t.relativeLuminance2=s})(Mi||={});var Os;(t=>{function n(b,c){if(Wt=(c&255)/255,Wt===1)return c;let u=c>>24&255,h=c>>16&255,v=c>>8&255,f=b>>24&255,C=b>>16&255,x=b>>8&255;return fi=f+Math.round((u-f)*Wt),pi=C+Math.round((h-C)*Wt),_i=x+Math.round((v-x)*Wt),Oi.toRgba(fi,pi,_i)}t.blend=n;function s(b,c,u){let h=Mi.relativeLuminance(b>>8),v=Mi.relativeLuminance(c>>8);if(Cr(h,v)<u){if(v<h){let x=o(b,c,u),A=Cr(h,Mi.relativeLuminance(x>>8));if(A<u){let E=l(b,c,u),p=Cr(h,Mi.relativeLuminance(E>>8));return A>p?x:E}return x}let f=l(b,c,u),C=Cr(h,Mi.relativeLuminance(f>>8));if(C<u){let x=o(b,c,u),A=Cr(h,Mi.relativeLuminance(x>>8));return C>A?f:x}return f}}t.ensureContrastRatio=s;function o(b,c,u){let h=b>>24&255,v=b>>16&255,f=b>>8&255,C=c>>24&255,x=c>>16&255,A=c>>8&255,E=Cr(Mi.relativeLuminance2(C,x,A),Mi.relativeLuminance2(h,v,f));for(;E<u&&(C>0||x>0||A>0);)C-=Math.max(0,Math.ceil(C*.1)),x-=Math.max(0,Math.ceil(x*.1)),A-=Math.max(0,Math.ceil(A*.1)),E=Cr(Mi.relativeLuminance2(C,x,A),Mi.relativeLuminance2(h,v,f));return(C<<24|x<<16|A<<8|255)>>>0}t.reduceLuminance=o;function l(b,c,u){let h=b>>24&255,v=b>>16&255,f=b>>8&255,C=c>>24&255,x=c>>16&255,A=c>>8&255,E=Cr(Mi.relativeLuminance2(C,x,A),Mi.relativeLuminance2(h,v,f));for(;E<u&&(C<255||x<255||A<255);)C=Math.min(255,C+Math.ceil((255-C)*.1)),x=Math.min(255,x+Math.ceil((255-x)*.1)),A=Math.min(255,A+Math.ceil((255-A)*.1)),E=Cr(Mi.relativeLuminance2(C,x,A),Mi.relativeLuminance2(h,v,f));return(C<<24|x<<16|A<<8|255)>>>0}t.increaseLuminance=l;function y(b){return[b>>24&255,b>>16&255,b>>8&255,b&255]}t.toChannels=y})(Os||={});function Ls(t){let n=t.toString(16);return n.length<2?"0"+n:n}function Cr(t,n){return t<n?(n+.05)/(t+.05):(t+.05)/(n+.05)}function li(t){if(!t)throw new Error("value must not be falsy");return t}function jf(t){return 57508<=t&&t<=57558}function $E(t){return 57520<=t&&t<=57527}function UE(t){return 57344<=t&&t<=63743}function PE(t){return 9472<=t&&t<=9631}function jE(t){return t>=128512&&t<=128591||t>=127744&&t<=128511||t>=128640&&t<=128767||t>=9728&&t<=9983||t>=9984&&t<=10175||t>=65024&&t<=65039||t>=129280&&t<=129535||t>=127462&&t<=127487}function FE(t,n,s,o){return n===1&&s>Math.ceil(o*1.5)&&t!==void 0&&t>255&&!jE(t)&&!jf(t)&&!UE(t)}function vb(t){return jf(t)||PE(t)}function qE(){return{css:{canvas:wc(),cell:wc()},device:{canvas:wc(),cell:wc(),char:{width:0,height:0,left:0,top:0}}}}function wc(){return{width:0,height:0}}function WE(t,n,s=0){return(t-(Math.round(n)*2-s))%(Math.round(n)*2)}var Ei=0,di=0,Kn=!1,wr=!1,Ec=!1,Gi,Td=0,GE=class{constructor(t,n,s,o,l,y){this._terminal=t,this._optionService=n,this._selectionRenderModel=s,this._decorationService=o,this._coreBrowserService=l,this._themeService=y,this.result={fg:0,bg:0,ext:0}}resolve(t,n,s,o){if(this.result.bg=t.bg,this.result.fg=t.fg,this.result.ext=t.bg&268435456?t.extended.ext:0,di=0,Ei=0,wr=!1,Kn=!1,Ec=!1,Gi=this._themeService.colors,Td=0,t.getCode()!==0&&t.extended.underlineStyle===4){let l=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));Td=n*o%(Math.round(l)*2)}if(this._decorationService.forEachDecorationAtCell(n,s,"bottom",l=>{l.backgroundColorRGB&&(di=l.backgroundColorRGB.rgba>>8&16777215,wr=!0),l.foregroundColorRGB&&(Ei=l.foregroundColorRGB.rgba>>8&16777215,Kn=!0)}),Ec=this._selectionRenderModel.isCellSelected(this._terminal,n,s),Ec){if(this.result.fg&67108864||(this.result.bg&50331648)!==0){if(this.result.fg&67108864)switch(this.result.fg&50331648){case 16777216:case 33554432:di=this._themeService.colors.ansi[this.result.fg&255].rgba;break;case 50331648:di=(this.result.fg&16777215)<<8|255;break;default:di=this._themeService.colors.foreground.rgba}else switch(this.result.bg&50331648){case 16777216:case 33554432:di=this._themeService.colors.ansi[this.result.bg&255].rgba;break;case 50331648:di=(this.result.bg&16777215)<<8|255;break}di=Os.blend(di,(this._coreBrowserService.isFocused?Gi.selectionBackgroundOpaque:Gi.selectionInactiveBackgroundOpaque).rgba&4294967040|128)>>8&16777215}else di=(this._coreBrowserService.isFocused?Gi.selectionBackgroundOpaque:Gi.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(wr=!0,Gi.selectionForeground&&(Ei=Gi.selectionForeground.rgba>>8&16777215,Kn=!0),vb(t.getCode())){if(this.result.fg&67108864&&(this.result.bg&50331648)===0)Ei=(this._coreBrowserService.isFocused?Gi.selectionBackgroundOpaque:Gi.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(this.result.fg&67108864)switch(this.result.bg&50331648){case 16777216:case 33554432:Ei=this._themeService.colors.ansi[this.result.bg&255].rgba;break;case 50331648:Ei=(this.result.bg&16777215)<<8|255;break}else switch(this.result.fg&50331648){case 16777216:case 33554432:Ei=this._themeService.colors.ansi[this.result.fg&255].rgba;break;case 50331648:Ei=(this.result.fg&16777215)<<8|255;break;default:Ei=this._themeService.colors.foreground.rgba}Ei=Os.blend(Ei,(this._coreBrowserService.isFocused?Gi.selectionBackgroundOpaque:Gi.selectionInactiveBackgroundOpaque).rgba&4294967040|128)>>8&16777215}Kn=!0}}this._decorationService.forEachDecorationAtCell(n,s,"top",l=>{l.backgroundColorRGB&&(di=l.backgroundColorRGB.rgba>>8&16777215,wr=!0),l.foregroundColorRGB&&(Ei=l.foregroundColorRGB.rgba>>8&16777215,Kn=!0)}),wr&&(Ec?di=t.bg&-16777216&-134217729|di|50331648:di=t.bg&-16777216|di|50331648),Kn&&(Ei=t.fg&-16777216&-67108865|Ei|50331648),this.result.fg&67108864&&(wr&&!Kn&&((this.result.bg&50331648)===0?Ei=this.result.fg&-134217728|Gi.background.rgba>>8&16777215&16777215|50331648:Ei=this.result.fg&-134217728|this.result.bg&67108863,Kn=!0),!wr&&Kn&&((this.result.fg&50331648)===0?di=this.result.bg&-67108864|Gi.foreground.rgba>>8&16777215&16777215|50331648:di=this.result.bg&-67108864|this.result.fg&67108863,wr=!0)),Gi=void 0,this.result.bg=wr?di:this.result.bg,this.result.fg=Kn?Ei:this.result.fg,this.result.ext&=536870911,this.result.ext|=Td<<29&3758096384}},KE=.5,bb=BE||NE?"bottom":"ideographic",YE={"▀":[{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}]},VE={"░":[[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]]},XE={"─":{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:(t,n)=>`M0,${.5-n} L1,${.5-n} M0,${.5+n} L1,${.5+n}`},"║":{1:(t,n)=>`M${.5-t},0 L${.5-t},1 M${.5+t},0 L${.5+t},1`},"╒":{1:(t,n)=>`M.5,1 L.5,${.5-n} L1,${.5-n} M.5,${.5+n} L1,${.5+n}`},"╓":{1:(t,n)=>`M${.5-t},1 L${.5-t},.5 L1,.5 M${.5+t},.5 L${.5+t},1`},"╔":{1:(t,n)=>`M1,${.5-n} L${.5-t},${.5-n} L${.5-t},1 M1,${.5+n} L${.5+t},${.5+n} L${.5+t},1`},"╕":{1:(t,n)=>`M0,${.5-n} L.5,${.5-n} L.5,1 M0,${.5+n} L.5,${.5+n}`},"╖":{1:(t,n)=>`M${.5+t},1 L${.5+t},.5 L0,.5 M${.5-t},.5 L${.5-t},1`},"╗":{1:(t,n)=>`M0,${.5+n} L${.5-t},${.5+n} L${.5-t},1 M0,${.5-n} L${.5+t},${.5-n} L${.5+t},1`},"╘":{1:(t,n)=>`M.5,0 L.5,${.5+n} L1,${.5+n} M.5,${.5-n} L1,${.5-n}`},"╙":{1:(t,n)=>`M1,.5 L${.5-t},.5 L${.5-t},0 M${.5+t},.5 L${.5+t},0`},"╚":{1:(t,n)=>`M1,${.5-n} L${.5+t},${.5-n} L${.5+t},0 M1,${.5+n} L${.5-t},${.5+n} L${.5-t},0`},"╛":{1:(t,n)=>`M0,${.5+n} L.5,${.5+n} L.5,0 M0,${.5-n} L.5,${.5-n}`},"╜":{1:(t,n)=>`M0,.5 L${.5+t},.5 L${.5+t},0 M${.5-t},.5 L${.5-t},0`},"╝":{1:(t,n)=>`M0,${.5-n} L${.5-t},${.5-n} L${.5-t},0 M0,${.5+n} L${.5+t},${.5+n} L${.5+t},0`},"╞":{1:(t,n)=>`M.5,0 L.5,1 M.5,${.5-n} L1,${.5-n} M.5,${.5+n} L1,${.5+n}`},"╟":{1:(t,n)=>`M${.5-t},0 L${.5-t},1 M${.5+t},0 L${.5+t},1 M${.5+t},.5 L1,.5`},"╠":{1:(t,n)=>`M${.5-t},0 L${.5-t},1 M1,${.5+n} L${.5+t},${.5+n} L${.5+t},1 M1,${.5-n} L${.5+t},${.5-n} L${.5+t},0`},"╡":{1:(t,n)=>`M.5,0 L.5,1 M0,${.5-n} L.5,${.5-n} M0,${.5+n} L.5,${.5+n}`},"╢":{1:(t,n)=>`M0,.5 L${.5-t},.5 M${.5-t},0 L${.5-t},1 M${.5+t},0 L${.5+t},1`},"╣":{1:(t,n)=>`M${.5+t},0 L${.5+t},1 M0,${.5+n} L${.5-t},${.5+n} L${.5-t},1 M0,${.5-n} L${.5-t},${.5-n} L${.5-t},0`},"╤":{1:(t,n)=>`M0,${.5-n} L1,${.5-n} M0,${.5+n} L1,${.5+n} M.5,${.5+n} L.5,1`},"╥":{1:(t,n)=>`M0,.5 L1,.5 M${.5-t},.5 L${.5-t},1 M${.5+t},.5 L${.5+t},1`},"╦":{1:(t,n)=>`M0,${.5-n} L1,${.5-n} M0,${.5+n} L${.5-t},${.5+n} L${.5-t},1 M1,${.5+n} L${.5+t},${.5+n} L${.5+t},1`},"╧":{1:(t,n)=>`M.5,0 L.5,${.5-n} M0,${.5-n} L1,${.5-n} M0,${.5+n} L1,${.5+n}`},"╨":{1:(t,n)=>`M0,.5 L1,.5 M${.5-t},.5 L${.5-t},0 M${.5+t},.5 L${.5+t},0`},"╩":{1:(t,n)=>`M0,${.5+n} L1,${.5+n} M0,${.5-n} L${.5-t},${.5-n} L${.5-t},0 M1,${.5-n} L${.5+t},${.5-n} L${.5+t},0`},"╪":{1:(t,n)=>`M.5,0 L.5,1 M0,${.5-n} L1,${.5-n} M0,${.5+n} L1,${.5+n}`},"╫":{1:(t,n)=>`M0,.5 L1,.5 M${.5-t},0 L${.5-t},1 M${.5+t},0 L${.5+t},1`},"╬":{1:(t,n)=>`M0,${.5+n} L${.5-t},${.5+n} L${.5-t},1 M1,${.5+n} L${.5+t},${.5+n} L${.5+t},1 M0,${.5-n} L${.5-t},${.5-n} L${.5-t},0 M1,${.5-n} L${.5+t},${.5-n} L${.5+t},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:(t,n)=>`M.5,1 L.5,${.5+n/.15*.5} C.5,${.5+n/.15*.5},.5,.5,1,.5`},"╮":{1:(t,n)=>`M.5,1 L.5,${.5+n/.15*.5} C.5,${.5+n/.15*.5},.5,.5,0,.5`},"╯":{1:(t,n)=>`M.5,0 L.5,${.5-n/.15*.5} C.5,${.5-n/.15*.5},.5,.5,0,.5`},"╰":{1:(t,n)=>`M.5,0 L.5,${.5-n/.15*.5} C.5,${.5-n/.15*.5},.5,.5,1,.5`}},rl={"":{d:"M.3,1 L.03,1 L.03,.88 C.03,.82,.06,.78,.11,.73 C.15,.7,.2,.68,.28,.65 L.43,.6 C.49,.58,.53,.56,.56,.53 C.59,.5,.6,.47,.6,.43 L.6,.27 L.4,.27 L.69,.1 L.98,.27 L.78,.27 L.78,.46 C.78,.52,.76,.56,.72,.61 C.68,.66,.63,.67,.56,.7 L.48,.72 C.42,.74,.38,.76,.35,.78 C.32,.8,.31,.84,.31,.88 L.31,1 M.3,.5 L.03,.59 L.03,.09 L.3,.09 L.3,.655",type:0},"":{d:"M.7,.4 L.7,.47 L.2,.47 L.2,.03 L.355,.03 L.355,.4 L.705,.4 M.7,.5 L.86,.5 L.86,.95 L.69,.95 L.44,.66 L.46,.86 L.46,.95 L.3,.95 L.3,.49 L.46,.49 L.71,.78 L.69,.565 L.69,.5",type:0},"":{d:"M.25,.94 C.16,.94,.11,.92,.11,.87 L.11,.53 C.11,.48,.15,.455,.23,.45 L.23,.3 C.23,.25,.26,.22,.31,.19 C.36,.16,.43,.15,.51,.15 C.59,.15,.66,.16,.71,.19 C.77,.22,.79,.26,.79,.3 L.79,.45 C.87,.45,.91,.48,.91,.53 L.91,.87 C.91,.92,.86,.94,.77,.94 L.24,.94 M.53,.2 C.49,.2,.45,.21,.42,.23 C.39,.25,.38,.27,.38,.3 L.38,.45 L.68,.45 L.68,.3 C.68,.27,.67,.25,.64,.23 C.61,.21,.58,.2,.53,.2 M.58,.82 L.58,.66 C.63,.65,.65,.63,.65,.6 C.65,.58,.64,.57,.61,.56 C.58,.55,.56,.54,.52,.54 C.48,.54,.46,.55,.43,.56 C.4,.57,.39,.59,.39,.6 C.39,.63,.41,.64,.46,.66 L.46,.82 L.57,.82",type:0},"":{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}};rl[""]=rl[""];rl[""]=rl[""];function ZE(t,n,s,o,l,y,b,c){let u=YE[n];if(u)return QE(t,u,s,o,l,y),!0;let h=VE[n];if(h)return JE(t,h,s,o,l,y),!0;let v=XE[n];if(v)return ex(t,v,s,o,l,y,c),!0;let f=rl[n];return f?(tx(t,f,s,o,l,y,b,c),!0):!1}function QE(t,n,s,o,l,y){for(let b=0;b<n.length;b++){let c=n[b],u=l/8,h=y/8;t.fillRect(s+c.x*u,o+c.y*h,c.w*u,c.h*h)}}var ov=new Map;function JE(t,n,s,o,l,y){let b=ov.get(n);b||(b=new Map,ov.set(n,b));let c=t.fillStyle;if(typeof c!="string")throw new Error(`Unexpected fillStyle type "${c}"`);let u=b.get(c);if(!u){let h=n[0].length,v=n.length,f=t.canvas.ownerDocument.createElement("canvas");f.width=h,f.height=v;let C=li(f.getContext("2d")),x=new ImageData(h,v),A,E,p,S;if(c.startsWith("#"))A=parseInt(c.slice(1,3),16),E=parseInt(c.slice(3,5),16),p=parseInt(c.slice(5,7),16),S=c.length>7&&parseInt(c.slice(7,9),16)||1;else if(c.startsWith("rgba"))[A,E,p,S]=c.substring(5,c.length-1).split(",").map(_=>parseFloat(_));else throw new Error(`Unexpected fillStyle color format "${c}" when drawing pattern glyph`);for(let _=0;_<v;_++)for(let g=0;g<h;g++)x.data[(_*h+g)*4]=A,x.data[(_*h+g)*4+1]=E,x.data[(_*h+g)*4+2]=p,x.data[(_*h+g)*4+3]=n[_][g]*(S*255);C.putImageData(x,0,0),u=li(t.createPattern(f,null)),b.set(c,u)}t.fillStyle=u,t.fillRect(s,o,l,y)}function ex(t,n,s,o,l,y,b){t.strokeStyle=t.fillStyle;for(let[c,u]of Object.entries(n)){t.beginPath(),t.lineWidth=b*Number.parseInt(c);let h;if(typeof u=="function"){let v=.15/y*l;h=u(.15,v)}else h=u;for(let v of h.split(" ")){let f=v[0],C=Sb[f];if(!C){console.error(`Could not find drawing instructions for "${f}"`);continue}let x=v.substring(1).split(",");!x[0]||!x[1]||C(t,yb(x,l,y,s,o,!0,b))}t.stroke(),t.closePath()}}function tx(t,n,s,o,l,y,b,c){let u=new Path2D;u.rect(s,o,l,y),t.clip(u),t.beginPath();let h=b/12;t.lineWidth=c*h;for(let v of n.d.split(" ")){let f=v[0],C=Sb[f];if(!C){console.error(`Could not find drawing instructions for "${f}"`);continue}let x=v.substring(1).split(",");!x[0]||!x[1]||C(t,yb(x,l,y,s,o,!1,c,(n.leftPadding??0)*(h/2),(n.rightPadding??0)*(h/2)))}n.type===1?(t.strokeStyle=t.fillStyle,t.stroke()):t.fill(),t.closePath()}function lv(t,n,s=0){return Math.max(Math.min(t,n),s)}var Sb={C:(t,n)=>t.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]),L:(t,n)=>t.lineTo(n[0],n[1]),M:(t,n)=>t.moveTo(n[0],n[1])};function yb(t,n,s,o,l,y,b,c=0,u=0){let h=t.map(v=>parseFloat(v)||parseInt(v));if(h.length<2)throw new Error("Too few arguments for instruction");for(let v=0;v<h.length;v+=2)h[v]*=n-c*b-u*b,y&&h[v]!==0&&(h[v]=lv(Math.round(h[v]+.5)-.5,n,0)),h[v]+=o+c*b;for(let v=1;v<h.length;v+=2)h[v]*=s,y&&h[v]!==0&&(h[v]=lv(Math.round(h[v]+.5)-.5,s,0)),h[v]+=l;return h}var cv=class{constructor(){this._data={}}set(t,n,s){this._data[t]||(this._data[t]={}),this._data[t][n]=s}get(t,n){return this._data[t]?this._data[t][n]:void 0}clear(){this._data={}}},uv=class{constructor(){this._data=new cv}set(t,n,s,o,l){this._data.get(t,n)||this._data.set(t,n,new cv),this._data.get(t,n).set(s,o,l)}get(t,n,s,o){return this._data.get(t,n)?.get(s,o)}clear(){this._data.clear()}},Cb=class{constructor(){this._tasks=[],this._i=0}enqueue(t){this._tasks.push(t),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(t){this._idleCallback=void 0;let n=0,s=0,o=t.timeRemaining(),l=0;for(;this._i<this._tasks.length;){if(n=performance.now(),this._tasks[this._i]()||this._i++,n=Math.max(1,performance.now()-n),s=Math.max(n,s),l=t.timeRemaining(),s*1.5>l){o-n<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(o-n))}ms`),this._start();return}o=l}this.clear()}},ix=class extends Cb{_requestCallback(t){return setTimeout(()=>t(this._createDeadline(16)))}_cancelCallback(t){clearTimeout(t)}_createDeadline(t){let n=performance.now()+t;return{timeRemaining:()=>Math.max(0,n-performance.now())}}},nx=class extends Cb{_requestCallback(t){return requestIdleCallback(t)}_cancelCallback(t){cancelIdleCallback(t)}},rx=!Pf&&"requestIdleCallback"in window?nx:ix,La=class wb{constructor(){this.fg=0,this.bg=0,this.extended=new Eb}static toColorRGB(n){return[n>>>16&255,n>>>8&255,n&255]}static fromColorRGB(n){return(n[0]&255)<<16|(n[1]&255)<<8|n[2]&255}clone(){let n=new wb;return n.fg=this.fg,n.bg=this.bg,n.extended=this.extended.clone(),n}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},Eb=class xb{constructor(n=0,s=0){this._ext=0,this._urlId=0,this._ext=n,this._urlId=s}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(n){this._ext=n}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(n){this._ext&=-469762049,this._ext|=n<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(n){this._ext&=-67108864,this._ext|=n&67108863}get urlId(){return this._urlId}set urlId(n){this._urlId=n}get underlineVariantOffset(){let n=(this._ext&3758096384)>>29;return n<0?n^4294967288:n}set underlineVariantOffset(n){this._ext&=536870911,this._ext|=n<<29&3758096384}clone(){return new xb(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},sx=globalThis.performance&&typeof globalThis.performance.now=="function",ax=class Tb{static create(n){return new Tb(n)}constructor(n){this._now=sx&&n===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},Rr;(t=>{t.None=()=>$n.None;function n(F,I){return f(F,()=>{},0,void 0,!0,void 0,I)}t.defer=n;function s(F){return(I,Z=null,ee)=>{let j=!1,Y;return Y=F(K=>{if(!j)return Y?Y.dispose():j=!0,I.call(Z,K)},null,ee),j&&Y.dispose(),Y}}t.once=s;function o(F,I,Z){return h((ee,j=null,Y)=>F(K=>ee.call(j,I(K)),null,Y),Z)}t.map=o;function l(F,I,Z){return h((ee,j=null,Y)=>F(K=>{I(K),ee.call(j,K)},null,Y),Z)}t.forEach=l;function y(F,I,Z){return h((ee,j=null,Y)=>F(K=>I(K)&&ee.call(j,K),null,Y),Z)}t.filter=y;function b(F){return F}t.signal=b;function c(...F){return(I,Z=null,ee)=>{let j=pb(...F.map(Y=>Y(K=>I.call(Z,K))));return v(j,ee)}}t.any=c;function u(F,I,Z,ee){let j=Z;return o(F,Y=>(j=I(j,Y),j),ee)}t.reduce=u;function h(F,I){let Z,ee={onWillAddFirstListener(){Z=F(j.fire,j)},onDidRemoveLastListener(){Z?.dispose()}},j=new kt(ee);return I?.add(j),j.event}function v(F,I){return I instanceof Array?I.push(F):I&&I.add(F),F}function f(F,I,Z=100,ee=!1,j=!1,Y,K){let O,H,M,U=0,V,ae={leakWarningThreshold:Y,onWillAddFirstListener(){O=F(me=>{U++,H=I(H,me),ee&&!M&&(ce.fire(H),H=void 0),V=()=>{let Q=H;H=void 0,M=void 0,(!ee||U>1)&&ce.fire(Q),U=0},typeof Z=="number"?(clearTimeout(M),M=setTimeout(V,Z)):M===void 0&&(M=0,queueMicrotask(V))})},onWillRemoveListener(){j&&U>0&&V?.()},onDidRemoveLastListener(){V=void 0,O.dispose()}},ce=new kt(ae);return K?.add(ce),ce.event}t.debounce=f;function C(F,I=0,Z){return t.debounce(F,(ee,j)=>ee?(ee.push(j),ee):[j],I,void 0,!0,void 0,Z)}t.accumulate=C;function x(F,I=(ee,j)=>ee===j,Z){let ee=!0,j;return y(F,Y=>{let K=ee||!I(Y,j);return ee=!1,j=Y,K},Z)}t.latch=x;function A(F,I,Z){return[t.filter(F,I,Z),t.filter(F,ee=>!I(ee),Z)]}t.split=A;function E(F,I=!1,Z=[],ee){let j=Z.slice(),Y=F(H=>{j?j.push(H):O.fire(H)});ee&&ee.add(Y);let K=()=>{j?.forEach(H=>O.fire(H)),j=null},O=new kt({onWillAddFirstListener(){Y||(Y=F(H=>O.fire(H)),ee&&ee.add(Y))},onDidAddFirstListener(){j&&(I?setTimeout(K):K())},onDidRemoveLastListener(){Y&&Y.dispose(),Y=null}});return ee&&ee.add(O),O.event}t.buffer=E;function p(F,I){return(Z,ee,j)=>{let Y=I(new _);return F(function(K){let O=Y.evaluate(K);O!==S&&Z.call(ee,O)},void 0,j)}}t.chain=p;let S=Symbol("HaltChainable");class _{constructor(){this.steps=[]}map(I){return this.steps.push(I),this}forEach(I){return this.steps.push(Z=>(I(Z),Z)),this}filter(I){return this.steps.push(Z=>I(Z)?Z:S),this}reduce(I,Z){let ee=Z;return this.steps.push(j=>(ee=I(ee,j),ee)),this}latch(I=(Z,ee)=>Z===ee){let Z=!0,ee;return this.steps.push(j=>{let Y=Z||!I(j,ee);return Z=!1,ee=j,Y?j:S}),this}evaluate(I){for(let Z of this.steps)if(I=Z(I),I===S)break;return I}}function g(F,I,Z=ee=>ee){let ee=(...O)=>K.fire(Z(...O)),j=()=>F.on(I,ee),Y=()=>F.removeListener(I,ee),K=new kt({onWillAddFirstListener:j,onDidRemoveLastListener:Y});return K.event}t.fromNodeEventEmitter=g;function w(F,I,Z=ee=>ee){let ee=(...O)=>K.fire(Z(...O)),j=()=>F.addEventListener(I,ee),Y=()=>F.removeEventListener(I,ee),K=new kt({onWillAddFirstListener:j,onDidRemoveLastListener:Y});return K.event}t.fromDOMEventEmitter=w;function R(F){return new Promise(I=>s(F)(I))}t.toPromise=R;function L(F){let I=new kt;return F.then(Z=>{I.fire(Z)},()=>{I.fire(void 0)}).finally(()=>{I.dispose()}),I.event}t.fromPromise=L;function D(F,I){return F(Z=>I.fire(Z))}t.forward=D;function T(F,I,Z){return I(Z),F(ee=>I(ee))}t.runAndSubscribe=T;class B{constructor(I,Z){this._observable=I,this._counter=0,this._hasChanged=!1;let ee={onWillAddFirstListener:()=>{I.addObserver(this)},onDidRemoveLastListener:()=>{I.removeObserver(this)}};this.emitter=new kt(ee),Z&&Z.add(this.emitter)}beginUpdate(I){this._counter++}handlePossibleChange(I){}handleChange(I,Z){this._hasChanged=!0}endUpdate(I){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function W(F,I){return new B(F,I).emitter.event}t.fromObservable=W;function P(F){return(I,Z,ee)=>{let j=0,Y=!1,K={beginUpdate(){j++},endUpdate(){j--,j===0&&(F.reportChanges(),Y&&(Y=!1,I.call(Z)))},handlePossibleChange(){},handleChange(){Y=!0}};F.addObserver(K),F.reportChanges();let O={dispose(){F.removeObserver(K)}};return ee instanceof Da?ee.add(O):Array.isArray(ee)&&ee.push(O),O}}t.fromObservableLight=P})(Rr||={});var lf=class cf{constructor(n){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${n}_${cf._idPool++}`,cf.all.add(this)}start(n){this._stopWatch=new ax,this.listenerCount=n}stop(){if(this._stopWatch){let n=this._stopWatch.elapsed();this.durations.push(n),this.elapsedOverall+=n,this.invocationCount+=1,this._stopWatch=void 0}}};lf.all=new Set,lf._idPool=0;var ox=lf,lx=-1,Ab=class Rb{constructor(n,s,o=(Rb._idPool++).toString(16).padStart(3,"0")){this._errorHandler=n,this.threshold=s,this.name=o,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(n,s){let o=this.threshold;if(o<=0||s<o)return;this._stacks||(this._stacks=new Map);let l=this._stacks.get(n.value)||0;if(this._stacks.set(n.value,l+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=o*.5;let[y,b]=this.getMostFrequentStack(),c=`[${this.name}] potential listener LEAK detected, having ${s} listeners already. MOST frequent listener (${b}):`;console.warn(c),console.warn(y);let u=new hx(c,y);this._errorHandler(u)}return()=>{let y=this._stacks.get(n.value)||0;this._stacks.set(n.value,y-1)}}getMostFrequentStack(){if(!this._stacks)return;let n,s=0;for(let[o,l]of this._stacks)(!n||s<l)&&(n=[o,l],s=l);return n}};Ab._idPool=1;var cx=Ab,ux=class Lb{constructor(n){this.value=n}static create(){let n=new Error;return new Lb(n.stack??"")}print(){console.warn(this.value.split(`
|
|
16
16
|
`).slice(2).join(`
|
|
17
|
-
`))}},ux=class extends Error{constructor(i,n){super(i),this.name="ListenerLeakError",this.stack=n}},hx=class extends Error{constructor(i,n){super(i),this.name="ListenerRefusalError",this.stack=n}},dx=0,Ad=class{constructor(n){this.value=n,this.id=dx++}},fx=2,px,kt=class{constructor(n){this._size=0,this._options=n,this._leakageMon=this._options?.leakWarningThreshold?new lx(n?.onListenerError??xd,this._options?.leakWarningThreshold??ox):void 0,this._perfMon=this._options?._profName?new ax(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(n,s,o)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let c=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(c);let u=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],h=new hx(`${c}. HINT: Stack shows most frequent listener (${u[1]}-times)`,u[0]);return(this._options?.onListenerError||xd)(h),$n.None}if(this._disposed)return $n.None;s&&(n=n.bind(s));let l=new Ad(n),y;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(l.stack=cx.create(),y=this._leakageMon.check(l.stack,this._size+1)),this._listeners?this._listeners instanceof Ad?(this._deliveryQueue??=new _x,this._listeners=[this._listeners,l]):this._listeners.push(l):(this._options?.onWillAddFirstListener?.(this),this._listeners=l,this._options?.onDidAddFirstListener?.(this)),this._size++;let b=Li(()=>{y?.(),this._removeListener(l)});return o instanceof Da?o.add(b):Array.isArray(o)&&o.push(b),b},this._event}_removeListener(n){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let s=this._listeners,o=s.indexOf(n);if(o===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,s[o]=void 0;let l=this._deliveryQueue.current===this;if(this._size*fx<=s.length){let y=0;for(let b=0;b<s.length;b++)s[b]?s[y++]=s[b]:l&&(this._deliveryQueue.end--,y<this._deliveryQueue.i&&this._deliveryQueue.i--);s.length=y}}_deliver(n,s){if(!n)return;let o=this._options?.onListenerError||xd;if(!o){n.value(s);return}try{n.value(s)}catch(l){o(l)}}_deliverQueue(n){let s=n.current._listeners;for(;n.i<n.end;)this._deliver(s[n.i++],n.value);n.reset()}fire(n){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof Ad)this._deliver(this._listeners,n);else{let s=this._deliveryQueue;s.enqueue(this,n,this._listeners.length),this._deliverQueue(s)}this._perfMon?.stop()}hasListeners(){return this._size>0}},_x=class{constructor(){this.i=-1,this.end=0}enqueue(i,n,s){this.i=0,this.end=s,this.current=i,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},hv={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}},zo=2,$o,as=class Ta{constructor(n,s,o){this._document=n,this._config=s,this._unicodeService=o,this._didWarmUp=!1,this._cacheMap=new uv,this._cacheMapCombined=new uv,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new La,this._textureSize=512,this._onAddTextureAtlasCanvas=new kt,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new kt,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=Lb(n,this._config.deviceCellWidth*4+zo*2,this._config.deviceCellHeight+zo*2),this._tmpCtx=li(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}get pages(){return this._pages}dispose(){this._tmpCanvas.remove();for(let n of this.pages)n.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){let n=new nx;for(let s=33;s<126;s++)n.enqueue(()=>{if(!this._cacheMap.get(s,0,0,0)){let o=this._drawToCache(s,0,0,0,!1,void 0);this._cacheMap.set(s,0,0,0,o)}})}beginFrame(){return this._requestClearModel}clearTexture(){if(!(this._pages[0].currentRow.x===0&&this._pages[0].currentRow.y===0)){for(let n of this._pages)n.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(Ta.maxAtlasPages&&this._pages.length>=Math.max(4,Ta.maxAtlasPages)){let s=this._pages.filter(h=>h.canvas.width*2<=(Ta.maxTextureSize||4096)).sort((h,v)=>v.canvas.width!==h.canvas.width?v.canvas.width-h.canvas.width:v.percentageUsed-h.percentageUsed),o=-1,l=0;for(let h=0;h<s.length;h++)if(s[h].canvas.width!==l)o=h,l=s[h].canvas.width;else if(h-o===3)break;let y=s.slice(o,o+4),b=y.map(h=>h.glyphs[0].texturePage).sort((h,v)=>h>v?1:-1),c=this.pages.length-y.length,u=this._mergePages(y,c);u.version++;for(let h=b.length-1;h>=0;h--)this._deletePage(b[h]);this.pages.push(u),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(u.canvas)}let n=new Rd(this._document,this._textureSize);return this._pages.push(n),this._activePages.push(n),this._onAddTextureAtlasCanvas.fire(n.canvas),n}_mergePages(n,s){let o=n[0].canvas.width*2,l=new Rd(this._document,o,n);for(let[y,b]of n.entries()){let c=y*b.canvas.width%o,u=Math.floor(y/2)*b.canvas.height;l.ctx.drawImage(b.canvas,c,u);for(let v of b.glyphs)v.texturePage=s,v.sizeClipSpace.x=v.size.x/o,v.sizeClipSpace.y=v.size.y/o,v.texturePosition.x+=c,v.texturePosition.y+=u,v.texturePositionClipSpace.x=v.texturePosition.x/o,v.texturePositionClipSpace.y=v.texturePosition.y/o;this._onRemoveTextureAtlasCanvas.fire(b.canvas);let h=this._activePages.indexOf(b);h!==-1&&this._activePages.splice(h,1)}return l}_deletePage(n){this._pages.splice(n,1);for(let s=n;s<this._pages.length;s++){let o=this._pages[s];for(let l of o.glyphs)l.texturePage--;o.version++}}getRasterizedGlyphCombinedChar(n,s,o,l,y,b){return this._getFromCacheMap(this._cacheMapCombined,n,s,o,l,y,b)}getRasterizedGlyph(n,s,o,l,y,b){return this._getFromCacheMap(this._cacheMap,n,s,o,l,y,b)}_getFromCacheMap(n,s,o,l,y,b,c){return $o=n.get(s,o,l,y),$o||($o=this._drawToCache(s,o,l,y,b,c),n.set(s,o,l,y,$o)),$o}_getColorFromAnsiIndex(n){if(n>=this._config.colors.ansi.length)throw new Error("No color found for idx "+n);return this._config.colors.ansi[n]}_getBackgroundColor(n,s,o,l){if(this._config.allowTransparency)return yn;let y;switch(n){case 16777216:case 33554432:y=this._getColorFromAnsiIndex(s);break;case 50331648:let b=La.toColorRGB(s);y=Oi.toColor(b[0],b[1],b[2]);break;default:o?y=Vo.opaque(this._config.colors.foreground):y=this._config.colors.background;break}return this._config.allowTransparency||(y=Vo.opaque(y)),y}_getForegroundColor(n,s,o,l,y,b,c,u,h,v){let f=this._getMinimumContrastColor(n,s,o,l,y,b,c,h,u,v);if(f)return f;let C;switch(y){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&h&&b<8&&(b+=8),C=this._getColorFromAnsiIndex(b);break;case 50331648:let x=La.toColorRGB(b);C=Oi.toColor(x[0],x[1],x[2]);break;default:c?C=this._config.colors.background:C=this._config.colors.foreground}return this._config.allowTransparency&&(C=Vo.opaque(C)),u&&(C=Vo.multiplyOpacity(C,GE)),C}_resolveBackgroundRgba(n,s,o){switch(n){case 16777216:case 33554432:return this._getColorFromAnsiIndex(s).rgba;case 50331648:return s<<8;default:return o?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(n,s,o,l){switch(n){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&l&&s<8&&(s+=8),this._getColorFromAnsiIndex(s).rgba;case 50331648:return s<<8;default:return o?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(n,s,o,l,y,b,c,u,h,v){if(this._config.minimumContrastRatio===1||v)return;let f=this._getContrastCache(h),C=f.getColor(n,l);if(C!==void 0)return C||void 0;let x=this._resolveBackgroundRgba(s,o,c),A=this._resolveForegroundRgba(y,b,c,u),E=Os.ensureContrastRatio(x,A,this._config.minimumContrastRatio/(h?2:1));if(!E){f.setColor(n,l,null);return}let p=Oi.toColor(E>>24&255,E>>16&255,E>>8&255);return f.setColor(n,l,p),p}_getContrastCache(n){return n?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(n,s,o,l,y,b){let c=typeof n=="number"?String.fromCharCode(n):n;b&&this._tmpCanvas.parentElement!==b&&(this._tmpCanvas.style.display="none",b.append(this._tmpCanvas));let u=Math.min(this._config.deviceCellWidth*Math.max(c.length,2)+zo*2,this._config.deviceMaxTextureSize);this._tmpCanvas.width<u&&(this._tmpCanvas.width=u);let h=Math.min(this._config.deviceCellHeight+zo*4,this._textureSize);if(this._tmpCanvas.height<h&&(this._tmpCanvas.height=h),this._tmpCtx.save(),this._workAttributeData.fg=o,this._workAttributeData.bg=s,this._workAttributeData.extended.ext=l,!!this._workAttributeData.isInvisible())return hv;let v=!!this._workAttributeData.isBold(),f=!!this._workAttributeData.isInverse(),C=!!this._workAttributeData.isDim(),x=!!this._workAttributeData.isItalic(),A=!!this._workAttributeData.isUnderline(),E=!!this._workAttributeData.isStrikethrough(),p=!!this._workAttributeData.isOverline(),S=this._workAttributeData.getFgColor(),_=this._workAttributeData.getFgColorMode(),g=this._workAttributeData.getBgColor(),w=this._workAttributeData.getBgColorMode();if(f){let H=S;S=g,g=H;let M=_;_=w,w=M}let R=this._getBackgroundColor(w,g,f,C);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=R.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";let L=v?this._config.fontWeightBold:this._config.fontWeight,D=x?"italic":"";this._tmpCtx.font=`${D} ${L} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=vb;let T=c.length===1&&jf(c.charCodeAt(0)),B=c.length===1&&zE(c.charCodeAt(0)),W=this._getForegroundColor(s,w,g,o,_,S,f,C,v,mb(c.charCodeAt(0)));this._tmpCtx.fillStyle=W.css;let P=B?0:zo*2,F=!1;this._config.customGlyphs!==!1&&(F=XE(this._tmpCtx,c,P,P,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let I=!T,Z;if(typeof n=="number"?Z=this._unicodeService.wcwidth(n):Z=this._unicodeService.getStringCellWidth(n),A){this._tmpCtx.save();let H=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),M=H%2===1?.5:0;if(this._tmpCtx.lineWidth=H,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())I=!1,this._tmpCtx.strokeStyle=`rgb(${La.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{I=!1;let Q=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&Q<8&&(Q+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(Q).css}this._tmpCtx.beginPath();let U=P,V=Math.ceil(P+this._config.deviceCharHeight)-M-(y?H*2:0),ae=V+H,ce=V+H*2,me=this._workAttributeData.getUnderlineVariantOffset();for(let Q=0;Q<Z;Q++){this._tmpCtx.save();let $=U+Q*this._config.deviceCellWidth,oe=U+(Q+1)*this._config.deviceCellWidth,_e=$+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo($,V),this._tmpCtx.lineTo(oe,V),this._tmpCtx.moveTo($,ce),this._tmpCtx.lineTo(oe,ce);break;case 3:let Se=H<=1?ce:Math.ceil(P+this._config.deviceCharHeight-H/2)-M,be=H<=1?V:Math.ceil(P+this._config.deviceCharHeight+H/2)-M,$e=new Path2D;$e.rect($,V,this._config.deviceCellWidth,ce-V),this._tmpCtx.clip($e),this._tmpCtx.moveTo($-this._config.deviceCellWidth/2,ae),this._tmpCtx.bezierCurveTo($-this._config.deviceCellWidth/2,be,$,be,$,ae),this._tmpCtx.bezierCurveTo($,Se,_e,Se,_e,ae),this._tmpCtx.bezierCurveTo(_e,be,oe,be,oe,ae),this._tmpCtx.bezierCurveTo(oe,Se,oe+this._config.deviceCellWidth/2,Se,oe+this._config.deviceCellWidth/2,ae);break;case 4:let je=me===0?0:me>=H?H*2-me:H-me;me>=H||je===0?(this._tmpCtx.setLineDash([Math.round(H),Math.round(H)]),this._tmpCtx.moveTo($+je,V),this._tmpCtx.lineTo(oe,V)):(this._tmpCtx.setLineDash([Math.round(H),Math.round(H)]),this._tmpCtx.moveTo($,V),this._tmpCtx.lineTo($+je,V),this._tmpCtx.moveTo($+je+H,V),this._tmpCtx.lineTo(oe,V)),me=qE(oe-$,H,me);break;case 5:let Ke=.6,Ct=.3,Be=oe-$,Qt=Math.floor(Ke*Be),gi=Math.floor(Ct*Be),mi=Be-Qt-gi;this._tmpCtx.setLineDash([Qt,gi,mi]),this._tmpCtx.moveTo($,V),this._tmpCtx.lineTo(oe,V);break;default:this._tmpCtx.moveTo($,V),this._tmpCtx.lineTo(oe,V);break}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!F&&this._config.fontSize>=12&&!this._config.allowTransparency&&c!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";let Q=this._tmpCtx.measureText(c);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in Q&&Q.actualBoundingBoxDescent>0){this._tmpCtx.save();let $=new Path2D;$.rect(U,V-Math.ceil(H/2),this._config.deviceCellWidth*Z,ce-V+Math.ceil(H/2)),this._tmpCtx.clip($),this._tmpCtx.lineWidth=this._config.devicePixelRatio*3,this._tmpCtx.strokeStyle=R.css,this._tmpCtx.strokeText(c,P,P+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(p){let H=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),M=H%2===1?.5:0;this._tmpCtx.lineWidth=H,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(P,P+M),this._tmpCtx.lineTo(P+this._config.deviceCharWidth*Z,P+M),this._tmpCtx.stroke()}if(F||this._tmpCtx.fillText(c,P,P+this._config.deviceCharHeight),c==="_"&&!this._config.allowTransparency){let H=Ld(this._tmpCtx.getImageData(P,P,this._config.deviceCellWidth,this._config.deviceCellHeight),R,W,I);if(H)for(let M=1;M<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=R.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(c,P,P+this._config.deviceCharHeight-M),H=Ld(this._tmpCtx.getImageData(P,P,this._config.deviceCellWidth,this._config.deviceCellHeight),R,W,I),!!H);M++);}if(E){let H=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),M=this._tmpCtx.lineWidth%2===1?.5:0;this._tmpCtx.lineWidth=H,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(P,P+Math.floor(this._config.deviceCharHeight/2)-M),this._tmpCtx.lineTo(P+this._config.deviceCharWidth*Z,P+Math.floor(this._config.deviceCharHeight/2)-M),this._tmpCtx.stroke()}this._tmpCtx.restore();let ee=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height),j;if(this._config.allowTransparency?j=gx(ee):j=Ld(ee,R,W,I),j)return hv;let Y=this._findGlyphBoundingBox(ee,this._workBoundingBox,u,B,F,P),K,O;for(;;){if(this._activePages.length===0){let H=this._createNewPage();K=H,O=H.currentRow,O.height=Y.size.y;break}K=this._activePages[this._activePages.length-1],O=K.currentRow;for(let H of this._activePages)Y.size.y<=H.currentRow.height&&(K=H,O=H.currentRow);for(let H=this._activePages.length-1;H>=0;H--)for(let M of this._activePages[H].fixedRows)M.height<=O.height&&Y.size.y<=M.height&&(K=this._activePages[H],O=M);if(Y.size.x>this._textureSize){this._overflowSizePage||(this._overflowSizePage=new Rd(this._document,this._config.deviceMaxTextureSize),this.pages.push(this._overflowSizePage),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(this._overflowSizePage.canvas)),K=this._overflowSizePage,O=this._overflowSizePage.currentRow,O.x+Y.size.x>=K.canvas.width&&(O.x=0,O.y+=O.height,O.height=0);break}if(O.y+Y.size.y>=K.canvas.height||O.height>Y.size.y+2){let H=!1;if(K.currentRow.y+K.currentRow.height+Y.size.y>=K.canvas.height){let M;for(let U of this._activePages)if(U.currentRow.y+U.currentRow.height+Y.size.y<U.canvas.height){M=U;break}if(M)K=M;else if(Ta.maxAtlasPages&&this._pages.length>=Ta.maxAtlasPages&&O.y+Y.size.y<=K.canvas.height&&O.height>=Y.size.y&&O.x+Y.size.x<=K.canvas.width)H=!0;else{let U=this._createNewPage();K=U,O=U.currentRow,O.height=Y.size.y,H=!0}}H||(K.currentRow.height>0&&K.fixedRows.push(K.currentRow),O={x:0,y:K.currentRow.y+K.currentRow.height,height:Y.size.y},K.fixedRows.push(O),K.currentRow={x:0,y:O.y+O.height,height:0})}if(O.x+Y.size.x<=K.canvas.width)break;O===K.currentRow?(O.x=0,O.y+=O.height,O.height=0):K.fixedRows.splice(K.fixedRows.indexOf(O),1)}return Y.texturePage=this._pages.indexOf(K),Y.texturePosition.x=O.x,Y.texturePosition.y=O.y,Y.texturePositionClipSpace.x=O.x/K.canvas.width,Y.texturePositionClipSpace.y=O.y/K.canvas.height,Y.sizeClipSpace.x/=K.canvas.width,Y.sizeClipSpace.y/=K.canvas.height,O.height=Math.max(O.height,Y.size.y),O.x+=Y.size.x,K.ctx.putImageData(ee,Y.texturePosition.x-this._workBoundingBox.left,Y.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Y.size.x,Y.size.y),K.addGlyph(Y),K.version++,Y}_findGlyphBoundingBox(n,s,o,l,y,b){s.top=0;let c=l?this._config.deviceCellHeight:this._tmpCanvas.height,u=l?this._config.deviceCellWidth:o,h=!1;for(let v=0;v<c;v++){for(let f=0;f<u;f++){let C=v*this._tmpCanvas.width*4+f*4+3;if(n.data[C]!==0){s.top=v,h=!0;break}}if(h)break}s.left=0,h=!1;for(let v=0;v<b+u;v++){for(let f=0;f<c;f++){let C=f*this._tmpCanvas.width*4+v*4+3;if(n.data[C]!==0){s.left=v,h=!0;break}}if(h)break}s.right=u,h=!1;for(let v=b+u-1;v>=b;v--){for(let f=0;f<c;f++){let C=f*this._tmpCanvas.width*4+v*4+3;if(n.data[C]!==0){s.right=v,h=!0;break}}if(h)break}s.bottom=c,h=!1;for(let v=c-1;v>=0;v--){for(let f=0;f<u;f++){let C=v*this._tmpCanvas.width*4+f*4+3;if(n.data[C]!==0){s.bottom=v,h=!0;break}}if(h)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:s.right-s.left+1,y:s.bottom-s.top+1},sizeClipSpace:{x:s.right-s.left+1,y:s.bottom-s.top+1},offset:{x:-s.left+b+(l||y?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-s.top+b+(l||y?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}},Rd=class{constructor(i,n,s){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],s)for(let o of s)this._glyphs.push(...o.glyphs),this._usedPixels+=o._usedPixels;this.canvas=Lb(i,n,n),this.ctx=li(this.canvas.getContext("2d",{alpha:!0}))}get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(i){this._glyphs.push(i),this._usedPixels+=i.size.x*i.size.y}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 Ld(i,n,s,o){let l=n.rgba>>>24,y=n.rgba>>>16&255,b=n.rgba>>>8&255,c=s.rgba>>>24,u=s.rgba>>>16&255,h=s.rgba>>>8&255,v=Math.floor((Math.abs(l-c)+Math.abs(y-u)+Math.abs(b-h))/12),f=!0;for(let C=0;C<i.data.length;C+=4)i.data[C]===l&&i.data[C+1]===y&&i.data[C+2]===b||o&&Math.abs(i.data[C]-l)+Math.abs(i.data[C+1]-y)+Math.abs(i.data[C+2]-b)<v?i.data[C+3]=0:f=!1;return f}function gx(i){for(let n=0;n<i.data.length;n+=4)if(i.data[n+3]>0)return!1;return!0}function Lb(i,n,s){let o=i.createElement("canvas");return o.width=n,o.height=s,o}function mx(i,n,s,o,l,y,b,c){let u={foreground:y.foreground,background:y.background,cursor:yn,cursorAccent:yn,selectionForeground:yn,selectionBackgroundTransparent:yn,selectionBackgroundOpaque:yn,selectionInactiveBackgroundTransparent:yn,selectionInactiveBackgroundOpaque:yn,overviewRulerBorder:yn,scrollbarSliderBackground:yn,scrollbarSliderHoverBackground:yn,scrollbarSliderActiveBackground:yn,ansi:y.ansi.slice(),contrastCache:y.contrastCache,halfContrastCache:y.halfContrastCache};return{customGlyphs:l.customGlyphs,devicePixelRatio:b,deviceMaxTextureSize:c,letterSpacing:l.letterSpacing,lineHeight:l.lineHeight,deviceCellWidth:i,deviceCellHeight:n,deviceCharWidth:s,deviceCharHeight:o,fontFamily:l.fontFamily,fontSize:l.fontSize,fontWeight:l.fontWeight,fontWeightBold:l.fontWeightBold,allowTransparency:l.allowTransparency,drawBoldTextInBrightColors:l.drawBoldTextInBrightColors,minimumContrastRatio:l.minimumContrastRatio,colors:u}}function dv(i,n){for(let s=0;s<i.colors.ansi.length;s++)if(i.colors.ansi[s].rgba!==n.colors.ansi[s].rgba)return!1;return i.devicePixelRatio===n.devicePixelRatio&&i.customGlyphs===n.customGlyphs&&i.lineHeight===n.lineHeight&&i.letterSpacing===n.letterSpacing&&i.fontFamily===n.fontFamily&&i.fontSize===n.fontSize&&i.fontWeight===n.fontWeight&&i.fontWeightBold===n.fontWeightBold&&i.allowTransparency===n.allowTransparency&&i.deviceCharWidth===n.deviceCharWidth&&i.deviceCharHeight===n.deviceCharHeight&&i.drawBoldTextInBrightColors===n.drawBoldTextInBrightColors&&i.minimumContrastRatio===n.minimumContrastRatio&&i.colors.foreground.rgba===n.colors.foreground.rgba&&i.colors.background.rgba===n.colors.background.rgba}function vx(i){return(i&50331648)===16777216||(i&50331648)===33554432}var En=[];function kb(i,n,s,o,l,y,b,c,u){let h=mx(o,l,y,b,n,s,c,u);for(let C=0;C<En.length;C++){let x=En[C],A=x.ownedBy.indexOf(i);if(A>=0){if(dv(x.config,h))return x.atlas;x.ownedBy.length===1?(x.atlas.dispose(),En.splice(C,1)):x.ownedBy.splice(A,1);break}}for(let C=0;C<En.length;C++){let x=En[C];if(dv(x.config,h))return x.ownedBy.push(i),x.atlas}let v=i._core,f={atlas:new as(document,h,v.unicodeService),config:h,ownedBy:[i]};return En.push(f),f.atlas}function fv(i){for(let n=0;n<En.length;n++){let s=En[n].ownedBy.indexOf(i);if(s!==-1){En[n].ownedBy.length===1?(En[n].atlas.dispose(),En.splice(n,1)):En[n].ownedBy.splice(s,1);break}}}var xc=600,bx=class{constructor(i,n){this._renderCallback=i,this._coreBrowserService=n,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(i=xc){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout(()=>{if(this._animationTimeRestarted){let n=xc-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,n>0){this._restartInterval(n);return}}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0}),this._blinkInterval=this._coreBrowserService.window.setInterval(()=>{if(this._animationTimeRestarted){let n=xc-(Date.now()-this._animationTimeRestarted);this._animationTimeRestarted=void 0,this._restartInterval(n);return}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})},xc)},i)}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()}};function pv(i,n,s){let o=new n.ResizeObserver(l=>{let y=l.find(u=>u.target===i);if(!y)return;if(!("devicePixelContentBoxSize"in y)){o?.disconnect(),o=void 0;return}let b=y.devicePixelContentBoxSize[0].inlineSize,c=y.devicePixelContentBoxSize[0].blockSize;b>0&&c>0&&s(b,c)});try{o.observe(i,{box:["device-pixel-content-box"]})}catch{o.disconnect(),o=void 0}return Li(()=>o?.disconnect())}function Sx(i){return i>65535?(i-=65536,String.fromCharCode((i>>10)+55296)+String.fromCharCode(i%1024+56320)):String.fromCharCode(i)}var _v=class Mb extends La{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new wb,this.combinedData=""}static fromCharData(n){let s=new Mb;return s.setFromCharData(n),s}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?Sx(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(n){this.fg=n[0],this.bg=0;let s=!1;if(n[1].length>2)s=!0;else if(n[1].length===2){let o=n[1].charCodeAt(0);if(55296<=o&&o<=56319){let l=n[1].charCodeAt(1);56320<=l&&l<=57343?this.content=(o-55296)*1024+l-56320+65536|n[2]<<22:s=!0}else s=!0}else this.content=n[1].charCodeAt(0)|n[2]<<22;s&&(this.combinedData=n[1],this.content=2097152|n[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},Db=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]);function Ob(i,n,s){let o=li(i.createProgram());if(i.attachShader(o,li(gv(i,i.VERTEX_SHADER,n))),i.attachShader(o,li(gv(i,i.FRAGMENT_SHADER,s))),i.linkProgram(o),i.getProgramParameter(o,i.LINK_STATUS))return o;console.error(i.getProgramInfoLog(o)),i.deleteProgram(o)}function gv(i,n,s){let o=li(i.createShader(n));if(i.shaderSource(o,s),i.compileShader(o),i.getShaderParameter(o,i.COMPILE_STATUS))return o;console.error(i.getShaderInfoLog(o)),i.deleteShader(o)}function yx(i,n){let s=Math.min(i.length*2,n),o=new Float32Array(s);for(let l=0;l<i.length;l++)o[l]=i[l];return o}var Cx=class{constructor(i){this.texture=i,this.version=-1}},wx=`#version 300 es
|
|
17
|
+
`))}},hx=class extends Error{constructor(t,n){super(t),this.name="ListenerLeakError",this.stack=n}},dx=class extends Error{constructor(t,n){super(t),this.name="ListenerRefusalError",this.stack=n}},fx=0,Ad=class{constructor(n){this.value=n,this.id=fx++}},px=2,_x,kt=class{constructor(n){this._size=0,this._options=n,this._leakageMon=this._options?.leakWarningThreshold?new cx(n?.onListenerError??xd,this._options?.leakWarningThreshold??lx):void 0,this._perfMon=this._options?._profName?new ox(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(n,s,o)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let c=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(c);let u=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],h=new dx(`${c}. HINT: Stack shows most frequent listener (${u[1]}-times)`,u[0]);return(this._options?.onListenerError||xd)(h),$n.None}if(this._disposed)return $n.None;s&&(n=n.bind(s));let l=new Ad(n),y;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(l.stack=ux.create(),y=this._leakageMon.check(l.stack,this._size+1)),this._listeners?this._listeners instanceof Ad?(this._deliveryQueue??=new gx,this._listeners=[this._listeners,l]):this._listeners.push(l):(this._options?.onWillAddFirstListener?.(this),this._listeners=l,this._options?.onDidAddFirstListener?.(this)),this._size++;let b=Li(()=>{y?.(),this._removeListener(l)});return o instanceof Da?o.add(b):Array.isArray(o)&&o.push(b),b},this._event}_removeListener(n){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let s=this._listeners,o=s.indexOf(n);if(o===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,s[o]=void 0;let l=this._deliveryQueue.current===this;if(this._size*px<=s.length){let y=0;for(let b=0;b<s.length;b++)s[b]?s[y++]=s[b]:l&&(this._deliveryQueue.end--,y<this._deliveryQueue.i&&this._deliveryQueue.i--);s.length=y}}_deliver(n,s){if(!n)return;let o=this._options?.onListenerError||xd;if(!o){n.value(s);return}try{n.value(s)}catch(l){o(l)}}_deliverQueue(n){let s=n.current._listeners;for(;n.i<n.end;)this._deliver(s[n.i++],n.value);n.reset()}fire(n){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof Ad)this._deliver(this._listeners,n);else{let s=this._deliveryQueue;s.enqueue(this,n,this._listeners.length),this._deliverQueue(s)}this._perfMon?.stop()}hasListeners(){return this._size>0}},gx=class{constructor(){this.i=-1,this.end=0}enqueue(t,n,s){this.i=0,this.end=s,this.current=t,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},hv={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}},zo=2,$o,as=class Ta{constructor(n,s,o){this._document=n,this._config=s,this._unicodeService=o,this._didWarmUp=!1,this._cacheMap=new uv,this._cacheMapCombined=new uv,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new La,this._textureSize=512,this._onAddTextureAtlasCanvas=new kt,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new kt,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=kb(n,this._config.deviceCellWidth*4+zo*2,this._config.deviceCellHeight+zo*2),this._tmpCtx=li(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}get pages(){return this._pages}dispose(){this._tmpCanvas.remove();for(let n of this.pages)n.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){let n=new rx;for(let s=33;s<126;s++)n.enqueue(()=>{if(!this._cacheMap.get(s,0,0,0)){let o=this._drawToCache(s,0,0,0,!1,void 0);this._cacheMap.set(s,0,0,0,o)}})}beginFrame(){return this._requestClearModel}clearTexture(){if(!(this._pages[0].currentRow.x===0&&this._pages[0].currentRow.y===0)){for(let n of this._pages)n.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(Ta.maxAtlasPages&&this._pages.length>=Math.max(4,Ta.maxAtlasPages)){let s=this._pages.filter(h=>h.canvas.width*2<=(Ta.maxTextureSize||4096)).sort((h,v)=>v.canvas.width!==h.canvas.width?v.canvas.width-h.canvas.width:v.percentageUsed-h.percentageUsed),o=-1,l=0;for(let h=0;h<s.length;h++)if(s[h].canvas.width!==l)o=h,l=s[h].canvas.width;else if(h-o===3)break;let y=s.slice(o,o+4),b=y.map(h=>h.glyphs[0].texturePage).sort((h,v)=>h>v?1:-1),c=this.pages.length-y.length,u=this._mergePages(y,c);u.version++;for(let h=b.length-1;h>=0;h--)this._deletePage(b[h]);this.pages.push(u),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(u.canvas)}let n=new Rd(this._document,this._textureSize);return this._pages.push(n),this._activePages.push(n),this._onAddTextureAtlasCanvas.fire(n.canvas),n}_mergePages(n,s){let o=n[0].canvas.width*2,l=new Rd(this._document,o,n);for(let[y,b]of n.entries()){let c=y*b.canvas.width%o,u=Math.floor(y/2)*b.canvas.height;l.ctx.drawImage(b.canvas,c,u);for(let v of b.glyphs)v.texturePage=s,v.sizeClipSpace.x=v.size.x/o,v.sizeClipSpace.y=v.size.y/o,v.texturePosition.x+=c,v.texturePosition.y+=u,v.texturePositionClipSpace.x=v.texturePosition.x/o,v.texturePositionClipSpace.y=v.texturePosition.y/o;this._onRemoveTextureAtlasCanvas.fire(b.canvas);let h=this._activePages.indexOf(b);h!==-1&&this._activePages.splice(h,1)}return l}_deletePage(n){this._pages.splice(n,1);for(let s=n;s<this._pages.length;s++){let o=this._pages[s];for(let l of o.glyphs)l.texturePage--;o.version++}}getRasterizedGlyphCombinedChar(n,s,o,l,y,b){return this._getFromCacheMap(this._cacheMapCombined,n,s,o,l,y,b)}getRasterizedGlyph(n,s,o,l,y,b){return this._getFromCacheMap(this._cacheMap,n,s,o,l,y,b)}_getFromCacheMap(n,s,o,l,y,b,c){return $o=n.get(s,o,l,y),$o||($o=this._drawToCache(s,o,l,y,b,c),n.set(s,o,l,y,$o)),$o}_getColorFromAnsiIndex(n){if(n>=this._config.colors.ansi.length)throw new Error("No color found for idx "+n);return this._config.colors.ansi[n]}_getBackgroundColor(n,s,o,l){if(this._config.allowTransparency)return yn;let y;switch(n){case 16777216:case 33554432:y=this._getColorFromAnsiIndex(s);break;case 50331648:let b=La.toColorRGB(s);y=Oi.toColor(b[0],b[1],b[2]);break;default:o?y=Vo.opaque(this._config.colors.foreground):y=this._config.colors.background;break}return this._config.allowTransparency||(y=Vo.opaque(y)),y}_getForegroundColor(n,s,o,l,y,b,c,u,h,v){let f=this._getMinimumContrastColor(n,s,o,l,y,b,c,h,u,v);if(f)return f;let C;switch(y){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&h&&b<8&&(b+=8),C=this._getColorFromAnsiIndex(b);break;case 50331648:let x=La.toColorRGB(b);C=Oi.toColor(x[0],x[1],x[2]);break;default:c?C=this._config.colors.background:C=this._config.colors.foreground}return this._config.allowTransparency&&(C=Vo.opaque(C)),u&&(C=Vo.multiplyOpacity(C,KE)),C}_resolveBackgroundRgba(n,s,o){switch(n){case 16777216:case 33554432:return this._getColorFromAnsiIndex(s).rgba;case 50331648:return s<<8;default:return o?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(n,s,o,l){switch(n){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&l&&s<8&&(s+=8),this._getColorFromAnsiIndex(s).rgba;case 50331648:return s<<8;default:return o?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(n,s,o,l,y,b,c,u,h,v){if(this._config.minimumContrastRatio===1||v)return;let f=this._getContrastCache(h),C=f.getColor(n,l);if(C!==void 0)return C||void 0;let x=this._resolveBackgroundRgba(s,o,c),A=this._resolveForegroundRgba(y,b,c,u),E=Os.ensureContrastRatio(x,A,this._config.minimumContrastRatio/(h?2:1));if(!E){f.setColor(n,l,null);return}let p=Oi.toColor(E>>24&255,E>>16&255,E>>8&255);return f.setColor(n,l,p),p}_getContrastCache(n){return n?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(n,s,o,l,y,b){let c=typeof n=="number"?String.fromCharCode(n):n;b&&this._tmpCanvas.parentElement!==b&&(this._tmpCanvas.style.display="none",b.append(this._tmpCanvas));let u=Math.min(this._config.deviceCellWidth*Math.max(c.length,2)+zo*2,this._config.deviceMaxTextureSize);this._tmpCanvas.width<u&&(this._tmpCanvas.width=u);let h=Math.min(this._config.deviceCellHeight+zo*4,this._textureSize);if(this._tmpCanvas.height<h&&(this._tmpCanvas.height=h),this._tmpCtx.save(),this._workAttributeData.fg=o,this._workAttributeData.bg=s,this._workAttributeData.extended.ext=l,!!this._workAttributeData.isInvisible())return hv;let v=!!this._workAttributeData.isBold(),f=!!this._workAttributeData.isInverse(),C=!!this._workAttributeData.isDim(),x=!!this._workAttributeData.isItalic(),A=!!this._workAttributeData.isUnderline(),E=!!this._workAttributeData.isStrikethrough(),p=!!this._workAttributeData.isOverline(),S=this._workAttributeData.getFgColor(),_=this._workAttributeData.getFgColorMode(),g=this._workAttributeData.getBgColor(),w=this._workAttributeData.getBgColorMode();if(f){let H=S;S=g,g=H;let M=_;_=w,w=M}let R=this._getBackgroundColor(w,g,f,C);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=R.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";let L=v?this._config.fontWeightBold:this._config.fontWeight,D=x?"italic":"";this._tmpCtx.font=`${D} ${L} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=bb;let T=c.length===1&&jf(c.charCodeAt(0)),B=c.length===1&&$E(c.charCodeAt(0)),W=this._getForegroundColor(s,w,g,o,_,S,f,C,v,vb(c.charCodeAt(0)));this._tmpCtx.fillStyle=W.css;let P=B?0:zo*2,F=!1;this._config.customGlyphs!==!1&&(F=ZE(this._tmpCtx,c,P,P,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let I=!T,Z;if(typeof n=="number"?Z=this._unicodeService.wcwidth(n):Z=this._unicodeService.getStringCellWidth(n),A){this._tmpCtx.save();let H=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),M=H%2===1?.5:0;if(this._tmpCtx.lineWidth=H,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())I=!1,this._tmpCtx.strokeStyle=`rgb(${La.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{I=!1;let Q=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&Q<8&&(Q+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(Q).css}this._tmpCtx.beginPath();let U=P,V=Math.ceil(P+this._config.deviceCharHeight)-M-(y?H*2:0),ae=V+H,ce=V+H*2,me=this._workAttributeData.getUnderlineVariantOffset();for(let Q=0;Q<Z;Q++){this._tmpCtx.save();let $=U+Q*this._config.deviceCellWidth,oe=U+(Q+1)*this._config.deviceCellWidth,_e=$+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo($,V),this._tmpCtx.lineTo(oe,V),this._tmpCtx.moveTo($,ce),this._tmpCtx.lineTo(oe,ce);break;case 3:let Se=H<=1?ce:Math.ceil(P+this._config.deviceCharHeight-H/2)-M,be=H<=1?V:Math.ceil(P+this._config.deviceCharHeight+H/2)-M,$e=new Path2D;$e.rect($,V,this._config.deviceCellWidth,ce-V),this._tmpCtx.clip($e),this._tmpCtx.moveTo($-this._config.deviceCellWidth/2,ae),this._tmpCtx.bezierCurveTo($-this._config.deviceCellWidth/2,be,$,be,$,ae),this._tmpCtx.bezierCurveTo($,Se,_e,Se,_e,ae),this._tmpCtx.bezierCurveTo(_e,be,oe,be,oe,ae),this._tmpCtx.bezierCurveTo(oe,Se,oe+this._config.deviceCellWidth/2,Se,oe+this._config.deviceCellWidth/2,ae);break;case 4:let je=me===0?0:me>=H?H*2-me:H-me;me>=H||je===0?(this._tmpCtx.setLineDash([Math.round(H),Math.round(H)]),this._tmpCtx.moveTo($+je,V),this._tmpCtx.lineTo(oe,V)):(this._tmpCtx.setLineDash([Math.round(H),Math.round(H)]),this._tmpCtx.moveTo($,V),this._tmpCtx.lineTo($+je,V),this._tmpCtx.moveTo($+je+H,V),this._tmpCtx.lineTo(oe,V)),me=WE(oe-$,H,me);break;case 5:let Ke=.6,Ct=.3,Be=oe-$,Qt=Math.floor(Ke*Be),gi=Math.floor(Ct*Be),mi=Be-Qt-gi;this._tmpCtx.setLineDash([Qt,gi,mi]),this._tmpCtx.moveTo($,V),this._tmpCtx.lineTo(oe,V);break;default:this._tmpCtx.moveTo($,V),this._tmpCtx.lineTo(oe,V);break}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!F&&this._config.fontSize>=12&&!this._config.allowTransparency&&c!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";let Q=this._tmpCtx.measureText(c);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in Q&&Q.actualBoundingBoxDescent>0){this._tmpCtx.save();let $=new Path2D;$.rect(U,V-Math.ceil(H/2),this._config.deviceCellWidth*Z,ce-V+Math.ceil(H/2)),this._tmpCtx.clip($),this._tmpCtx.lineWidth=this._config.devicePixelRatio*3,this._tmpCtx.strokeStyle=R.css,this._tmpCtx.strokeText(c,P,P+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(p){let H=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),M=H%2===1?.5:0;this._tmpCtx.lineWidth=H,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(P,P+M),this._tmpCtx.lineTo(P+this._config.deviceCharWidth*Z,P+M),this._tmpCtx.stroke()}if(F||this._tmpCtx.fillText(c,P,P+this._config.deviceCharHeight),c==="_"&&!this._config.allowTransparency){let H=Ld(this._tmpCtx.getImageData(P,P,this._config.deviceCellWidth,this._config.deviceCellHeight),R,W,I);if(H)for(let M=1;M<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=R.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(c,P,P+this._config.deviceCharHeight-M),H=Ld(this._tmpCtx.getImageData(P,P,this._config.deviceCellWidth,this._config.deviceCellHeight),R,W,I),!!H);M++);}if(E){let H=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),M=this._tmpCtx.lineWidth%2===1?.5:0;this._tmpCtx.lineWidth=H,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(P,P+Math.floor(this._config.deviceCharHeight/2)-M),this._tmpCtx.lineTo(P+this._config.deviceCharWidth*Z,P+Math.floor(this._config.deviceCharHeight/2)-M),this._tmpCtx.stroke()}this._tmpCtx.restore();let ee=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height),j;if(this._config.allowTransparency?j=mx(ee):j=Ld(ee,R,W,I),j)return hv;let Y=this._findGlyphBoundingBox(ee,this._workBoundingBox,u,B,F,P),K,O;for(;;){if(this._activePages.length===0){let H=this._createNewPage();K=H,O=H.currentRow,O.height=Y.size.y;break}K=this._activePages[this._activePages.length-1],O=K.currentRow;for(let H of this._activePages)Y.size.y<=H.currentRow.height&&(K=H,O=H.currentRow);for(let H=this._activePages.length-1;H>=0;H--)for(let M of this._activePages[H].fixedRows)M.height<=O.height&&Y.size.y<=M.height&&(K=this._activePages[H],O=M);if(Y.size.x>this._textureSize){this._overflowSizePage||(this._overflowSizePage=new Rd(this._document,this._config.deviceMaxTextureSize),this.pages.push(this._overflowSizePage),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(this._overflowSizePage.canvas)),K=this._overflowSizePage,O=this._overflowSizePage.currentRow,O.x+Y.size.x>=K.canvas.width&&(O.x=0,O.y+=O.height,O.height=0);break}if(O.y+Y.size.y>=K.canvas.height||O.height>Y.size.y+2){let H=!1;if(K.currentRow.y+K.currentRow.height+Y.size.y>=K.canvas.height){let M;for(let U of this._activePages)if(U.currentRow.y+U.currentRow.height+Y.size.y<U.canvas.height){M=U;break}if(M)K=M;else if(Ta.maxAtlasPages&&this._pages.length>=Ta.maxAtlasPages&&O.y+Y.size.y<=K.canvas.height&&O.height>=Y.size.y&&O.x+Y.size.x<=K.canvas.width)H=!0;else{let U=this._createNewPage();K=U,O=U.currentRow,O.height=Y.size.y,H=!0}}H||(K.currentRow.height>0&&K.fixedRows.push(K.currentRow),O={x:0,y:K.currentRow.y+K.currentRow.height,height:Y.size.y},K.fixedRows.push(O),K.currentRow={x:0,y:O.y+O.height,height:0})}if(O.x+Y.size.x<=K.canvas.width)break;O===K.currentRow?(O.x=0,O.y+=O.height,O.height=0):K.fixedRows.splice(K.fixedRows.indexOf(O),1)}return Y.texturePage=this._pages.indexOf(K),Y.texturePosition.x=O.x,Y.texturePosition.y=O.y,Y.texturePositionClipSpace.x=O.x/K.canvas.width,Y.texturePositionClipSpace.y=O.y/K.canvas.height,Y.sizeClipSpace.x/=K.canvas.width,Y.sizeClipSpace.y/=K.canvas.height,O.height=Math.max(O.height,Y.size.y),O.x+=Y.size.x,K.ctx.putImageData(ee,Y.texturePosition.x-this._workBoundingBox.left,Y.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Y.size.x,Y.size.y),K.addGlyph(Y),K.version++,Y}_findGlyphBoundingBox(n,s,o,l,y,b){s.top=0;let c=l?this._config.deviceCellHeight:this._tmpCanvas.height,u=l?this._config.deviceCellWidth:o,h=!1;for(let v=0;v<c;v++){for(let f=0;f<u;f++){let C=v*this._tmpCanvas.width*4+f*4+3;if(n.data[C]!==0){s.top=v,h=!0;break}}if(h)break}s.left=0,h=!1;for(let v=0;v<b+u;v++){for(let f=0;f<c;f++){let C=f*this._tmpCanvas.width*4+v*4+3;if(n.data[C]!==0){s.left=v,h=!0;break}}if(h)break}s.right=u,h=!1;for(let v=b+u-1;v>=b;v--){for(let f=0;f<c;f++){let C=f*this._tmpCanvas.width*4+v*4+3;if(n.data[C]!==0){s.right=v,h=!0;break}}if(h)break}s.bottom=c,h=!1;for(let v=c-1;v>=0;v--){for(let f=0;f<u;f++){let C=v*this._tmpCanvas.width*4+f*4+3;if(n.data[C]!==0){s.bottom=v,h=!0;break}}if(h)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:s.right-s.left+1,y:s.bottom-s.top+1},sizeClipSpace:{x:s.right-s.left+1,y:s.bottom-s.top+1},offset:{x:-s.left+b+(l||y?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-s.top+b+(l||y?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}},Rd=class{constructor(t,n,s){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],s)for(let o of s)this._glyphs.push(...o.glyphs),this._usedPixels+=o._usedPixels;this.canvas=kb(t,n,n),this.ctx=li(this.canvas.getContext("2d",{alpha:!0}))}get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(t){this._glyphs.push(t),this._usedPixels+=t.size.x*t.size.y}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 Ld(t,n,s,o){let l=n.rgba>>>24,y=n.rgba>>>16&255,b=n.rgba>>>8&255,c=s.rgba>>>24,u=s.rgba>>>16&255,h=s.rgba>>>8&255,v=Math.floor((Math.abs(l-c)+Math.abs(y-u)+Math.abs(b-h))/12),f=!0;for(let C=0;C<t.data.length;C+=4)t.data[C]===l&&t.data[C+1]===y&&t.data[C+2]===b||o&&Math.abs(t.data[C]-l)+Math.abs(t.data[C+1]-y)+Math.abs(t.data[C+2]-b)<v?t.data[C+3]=0:f=!1;return f}function mx(t){for(let n=0;n<t.data.length;n+=4)if(t.data[n+3]>0)return!1;return!0}function kb(t,n,s){let o=t.createElement("canvas");return o.width=n,o.height=s,o}function vx(t,n,s,o,l,y,b,c){let u={foreground:y.foreground,background:y.background,cursor:yn,cursorAccent:yn,selectionForeground:yn,selectionBackgroundTransparent:yn,selectionBackgroundOpaque:yn,selectionInactiveBackgroundTransparent:yn,selectionInactiveBackgroundOpaque:yn,overviewRulerBorder:yn,scrollbarSliderBackground:yn,scrollbarSliderHoverBackground:yn,scrollbarSliderActiveBackground:yn,ansi:y.ansi.slice(),contrastCache:y.contrastCache,halfContrastCache:y.halfContrastCache};return{customGlyphs:l.customGlyphs,devicePixelRatio:b,deviceMaxTextureSize:c,letterSpacing:l.letterSpacing,lineHeight:l.lineHeight,deviceCellWidth:t,deviceCellHeight:n,deviceCharWidth:s,deviceCharHeight:o,fontFamily:l.fontFamily,fontSize:l.fontSize,fontWeight:l.fontWeight,fontWeightBold:l.fontWeightBold,allowTransparency:l.allowTransparency,drawBoldTextInBrightColors:l.drawBoldTextInBrightColors,minimumContrastRatio:l.minimumContrastRatio,colors:u}}function dv(t,n){for(let s=0;s<t.colors.ansi.length;s++)if(t.colors.ansi[s].rgba!==n.colors.ansi[s].rgba)return!1;return t.devicePixelRatio===n.devicePixelRatio&&t.customGlyphs===n.customGlyphs&&t.lineHeight===n.lineHeight&&t.letterSpacing===n.letterSpacing&&t.fontFamily===n.fontFamily&&t.fontSize===n.fontSize&&t.fontWeight===n.fontWeight&&t.fontWeightBold===n.fontWeightBold&&t.allowTransparency===n.allowTransparency&&t.deviceCharWidth===n.deviceCharWidth&&t.deviceCharHeight===n.deviceCharHeight&&t.drawBoldTextInBrightColors===n.drawBoldTextInBrightColors&&t.minimumContrastRatio===n.minimumContrastRatio&&t.colors.foreground.rgba===n.colors.foreground.rgba&&t.colors.background.rgba===n.colors.background.rgba}function bx(t){return(t&50331648)===16777216||(t&50331648)===33554432}var En=[];function Mb(t,n,s,o,l,y,b,c,u){let h=vx(o,l,y,b,n,s,c,u);for(let C=0;C<En.length;C++){let x=En[C],A=x.ownedBy.indexOf(t);if(A>=0){if(dv(x.config,h))return x.atlas;x.ownedBy.length===1?(x.atlas.dispose(),En.splice(C,1)):x.ownedBy.splice(A,1);break}}for(let C=0;C<En.length;C++){let x=En[C];if(dv(x.config,h))return x.ownedBy.push(t),x.atlas}let v=t._core,f={atlas:new as(document,h,v.unicodeService),config:h,ownedBy:[t]};return En.push(f),f.atlas}function fv(t){for(let n=0;n<En.length;n++){let s=En[n].ownedBy.indexOf(t);if(s!==-1){En[n].ownedBy.length===1?(En[n].atlas.dispose(),En.splice(n,1)):En[n].ownedBy.splice(s,1);break}}}var xc=600,Sx=class{constructor(t,n){this._renderCallback=t,this._coreBrowserService=n,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(t=xc){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout(()=>{if(this._animationTimeRestarted){let n=xc-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,n>0){this._restartInterval(n);return}}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0}),this._blinkInterval=this._coreBrowserService.window.setInterval(()=>{if(this._animationTimeRestarted){let n=xc-(Date.now()-this._animationTimeRestarted);this._animationTimeRestarted=void 0,this._restartInterval(n);return}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})},xc)},t)}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()}};function pv(t,n,s){let o=new n.ResizeObserver(l=>{let y=l.find(u=>u.target===t);if(!y)return;if(!("devicePixelContentBoxSize"in y)){o?.disconnect(),o=void 0;return}let b=y.devicePixelContentBoxSize[0].inlineSize,c=y.devicePixelContentBoxSize[0].blockSize;b>0&&c>0&&s(b,c)});try{o.observe(t,{box:["device-pixel-content-box"]})}catch{o.disconnect(),o=void 0}return Li(()=>o?.disconnect())}function yx(t){return t>65535?(t-=65536,String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):String.fromCharCode(t)}var _v=class Db extends La{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new Eb,this.combinedData=""}static fromCharData(n){let s=new Db;return s.setFromCharData(n),s}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?yx(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(n){this.fg=n[0],this.bg=0;let s=!1;if(n[1].length>2)s=!0;else if(n[1].length===2){let o=n[1].charCodeAt(0);if(55296<=o&&o<=56319){let l=n[1].charCodeAt(1);56320<=l&&l<=57343?this.content=(o-55296)*1024+l-56320+65536|n[2]<<22:s=!0}else s=!0}else this.content=n[1].charCodeAt(0)|n[2]<<22;s&&(this.combinedData=n[1],this.content=2097152|n[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},Ob=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]);function Bb(t,n,s){let o=li(t.createProgram());if(t.attachShader(o,li(gv(t,t.VERTEX_SHADER,n))),t.attachShader(o,li(gv(t,t.FRAGMENT_SHADER,s))),t.linkProgram(o),t.getProgramParameter(o,t.LINK_STATUS))return o;console.error(t.getProgramInfoLog(o)),t.deleteProgram(o)}function gv(t,n,s){let o=li(t.createShader(n));if(t.shaderSource(o,s),t.compileShader(o),t.getShaderParameter(o,t.COMPILE_STATUS))return o;console.error(t.getShaderInfoLog(o)),t.deleteShader(o)}function Cx(t,n){let s=Math.min(t.length*2,n),o=new Float32Array(s);for(let l=0;l<t.length;l++)o[l]=t[l];return o}var wx=class{constructor(t){this.texture=t,this.version=-1}},Ex=`#version 300 es
|
|
18
18
|
layout (location = 0) in vec2 a_unitquad;
|
|
19
19
|
layout (location = 1) in vec2 a_cellpos;
|
|
20
20
|
layout (location = 2) in vec2 a_offset;
|
|
@@ -34,13 +34,13 @@ void main() {
|
|
|
34
34
|
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
35
35
|
v_texpage = int(a_texpage);
|
|
36
36
|
v_texcoord = a_texcoord + a_unitquad * a_texsize;
|
|
37
|
-
}`;function
|
|
37
|
+
}`;function xx(t){let n="";for(let s=1;s<t;s++)n+=` else if (v_texpage == ${s}) { outColor = texture(u_texture[${s}], v_texcoord); }`;return`#version 300 es
|
|
38
38
|
precision lowp float;
|
|
39
39
|
|
|
40
40
|
in vec2 v_texcoord;
|
|
41
41
|
flat in int v_texpage;
|
|
42
42
|
|
|
43
|
-
uniform sampler2D u_texture[${
|
|
43
|
+
uniform sampler2D u_texture[${t}];
|
|
44
44
|
|
|
45
45
|
out vec4 outColor;
|
|
46
46
|
|
|
@@ -48,7 +48,7 @@ void main() {
|
|
|
48
48
|
if (v_texpage == 0) {
|
|
49
49
|
outColor = texture(u_texture[0], v_texcoord);
|
|
50
50
|
} ${n}
|
|
51
|
-
}`}var os=11,wa=os*Float32Array.BYTES_PER_ELEMENT,
|
|
51
|
+
}`}var os=11,wa=os*Float32Array.BYTES_PER_ELEMENT,Tx=2,Ft=0,Lt,kd=0,Uo=0,Ax=class extends $n{constructor(t,n,s,o){super(),this._terminal=t,this._gl=n,this._dimensions=s,this._optionsService=o,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};let l=this._gl;as.maxAtlasPages===void 0&&(as.maxAtlasPages=Math.min(32,li(l.getParameter(l.MAX_TEXTURE_IMAGE_UNITS))),as.maxTextureSize=li(l.getParameter(l.MAX_TEXTURE_SIZE))),this._program=li(Bb(l,Ex,xx(as.maxAtlasPages))),this._register(Li(()=>l.deleteProgram(this._program))),this._projectionLocation=li(l.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=li(l.getUniformLocation(this._program,"u_resolution")),this._textureLocation=li(l.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=l.createVertexArray(),l.bindVertexArray(this._vertexArrayObject);let y=new Float32Array([0,0,1,0,0,1,1,1]),b=l.createBuffer();this._register(Li(()=>l.deleteBuffer(b))),l.bindBuffer(l.ARRAY_BUFFER,b),l.bufferData(l.ARRAY_BUFFER,y,l.STATIC_DRAW),l.enableVertexAttribArray(0),l.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);let c=new Uint8Array([0,1,2,3]),u=l.createBuffer();this._register(Li(()=>l.deleteBuffer(u))),l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,u),l.bufferData(l.ELEMENT_ARRAY_BUFFER,c,l.STATIC_DRAW),this._attributesBuffer=li(l.createBuffer()),this._register(Li(()=>l.deleteBuffer(this._attributesBuffer))),l.bindBuffer(l.ARRAY_BUFFER,this._attributesBuffer),l.enableVertexAttribArray(2),l.vertexAttribPointer(2,2,l.FLOAT,!1,wa,0),l.vertexAttribDivisor(2,1),l.enableVertexAttribArray(3),l.vertexAttribPointer(3,2,l.FLOAT,!1,wa,2*Float32Array.BYTES_PER_ELEMENT),l.vertexAttribDivisor(3,1),l.enableVertexAttribArray(4),l.vertexAttribPointer(4,1,l.FLOAT,!1,wa,4*Float32Array.BYTES_PER_ELEMENT),l.vertexAttribDivisor(4,1),l.enableVertexAttribArray(5),l.vertexAttribPointer(5,2,l.FLOAT,!1,wa,5*Float32Array.BYTES_PER_ELEMENT),l.vertexAttribDivisor(5,1),l.enableVertexAttribArray(6),l.vertexAttribPointer(6,2,l.FLOAT,!1,wa,7*Float32Array.BYTES_PER_ELEMENT),l.vertexAttribDivisor(6,1),l.enableVertexAttribArray(1),l.vertexAttribPointer(1,2,l.FLOAT,!1,wa,9*Float32Array.BYTES_PER_ELEMENT),l.vertexAttribDivisor(1,1),l.useProgram(this._program);let h=new Int32Array(as.maxAtlasPages);for(let v=0;v<as.maxAtlasPages;v++)h[v]=v;l.uniform1iv(this._textureLocation,h),l.uniformMatrix4fv(this._projectionLocation,!1,Ob),this._atlasTextures=[];for(let v=0;v<as.maxAtlasPages;v++){let f=new wx(li(l.createTexture()));this._register(Li(()=>l.deleteTexture(f.texture))),l.activeTexture(l.TEXTURE0+v),l.bindTexture(l.TEXTURE_2D,f.texture),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,l.CLAMP_TO_EDGE),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,l.CLAMP_TO_EDGE),l.texImage2D(l.TEXTURE_2D,0,l.RGBA,1,1,0,l.RGBA,l.UNSIGNED_BYTE,new Uint8Array([255,0,0,255])),this._atlasTextures[v]=f}l.enable(l.BLEND),l.blendFunc(l.SRC_ALPHA,l.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return this._atlas?this._atlas.beginFrame():!0}updateCell(t,n,s,o,l,y,b,c,u){this._updateCell(this._vertices.attributes,t,n,s,o,l,y,b,c,u)}_updateCell(t,n,s,o,l,y,b,c,u,h){if(Ft=(s*this._terminal.cols+n)*os,o===0||o===void 0){t.fill(0,Ft,Ft+os-1-Tx);return}this._atlas&&(c&&c.length>1?Lt=this._atlas.getRasterizedGlyphCombinedChar(c,l,y,b,!1,this._terminal.element):Lt=this._atlas.getRasterizedGlyph(o,l,y,b,!1,this._terminal.element),kd=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),l!==h&&Lt.offset.x>kd?(Uo=Lt.offset.x-kd,t[Ft]=-(Lt.offset.x-Uo)+this._dimensions.device.char.left,t[Ft+1]=-Lt.offset.y+this._dimensions.device.char.top,t[Ft+2]=(Lt.size.x-Uo)/this._dimensions.device.canvas.width,t[Ft+3]=Lt.size.y/this._dimensions.device.canvas.height,t[Ft+4]=Lt.texturePage,t[Ft+5]=Lt.texturePositionClipSpace.x+Uo/this._atlas.pages[Lt.texturePage].canvas.width,t[Ft+6]=Lt.texturePositionClipSpace.y,t[Ft+7]=Lt.sizeClipSpace.x-Uo/this._atlas.pages[Lt.texturePage].canvas.width,t[Ft+8]=Lt.sizeClipSpace.y):(t[Ft]=-Lt.offset.x+this._dimensions.device.char.left,t[Ft+1]=-Lt.offset.y+this._dimensions.device.char.top,t[Ft+2]=Lt.size.x/this._dimensions.device.canvas.width,t[Ft+3]=Lt.size.y/this._dimensions.device.canvas.height,t[Ft+4]=Lt.texturePage,t[Ft+5]=Lt.texturePositionClipSpace.x,t[Ft+6]=Lt.texturePositionClipSpace.y,t[Ft+7]=Lt.sizeClipSpace.x,t[Ft+8]=Lt.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&FE(o,u,Lt.size.x,this._dimensions.device.cell.width)&&(t[Ft+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width))}clear(){let t=this._terminal,n=t.cols*t.rows*os;this._vertices.count!==n?this._vertices.attributes=new Float32Array(n):this._vertices.attributes.fill(0);let s=0;for(;s<this._vertices.attributesBuffers.length;s++)this._vertices.count!==n?this._vertices.attributesBuffers[s]=new Float32Array(n):this._vertices.attributesBuffers[s].fill(0);this._vertices.count=n,s=0;for(let o=0;o<t.rows;o++)for(let l=0;l<t.cols;l++)this._vertices.attributes[s+9]=l/t.cols,this._vertices.attributes[s+10]=o/t.rows,s+=os}handleResize(){let t=this._gl;t.useProgram(this._program),t.viewport(0,0,t.canvas.width,t.canvas.height),t.uniform2f(this._resolutionLocation,t.canvas.width,t.canvas.height),this.clear()}render(t){if(!this._atlas)return;let n=this._gl;n.useProgram(this._program),n.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;let s=this._vertices.attributesBuffers[this._activeBuffer],o=0;for(let l=0;l<t.lineLengths.length;l++){let y=l*this._terminal.cols*os,b=this._vertices.attributes.subarray(y,y+t.lineLengths[l]*os);s.set(b,o),o+=b.length}n.bindBuffer(n.ARRAY_BUFFER,this._attributesBuffer),n.bufferData(n.ARRAY_BUFFER,s.subarray(0,o),n.STREAM_DRAW);for(let l=0;l<this._atlas.pages.length;l++)this._atlas.pages[l].version!==this._atlasTextures[l].version&&this._bindAtlasPageTexture(n,this._atlas,l);n.drawElementsInstanced(n.TRIANGLE_STRIP,4,n.UNSIGNED_BYTE,0,o/os)}setAtlas(t){this._atlas=t;for(let n of this._atlasTextures)n.version=-1}_bindAtlasPageTexture(t,n,s){t.activeTexture(t.TEXTURE0+s),t.bindTexture(t.TEXTURE_2D,this._atlasTextures[s].texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,n.pages[s].canvas),t.generateMipmap(t.TEXTURE_2D),this._atlasTextures[s].version=n.pages[s].version}setDimensions(t){this._dimensions=t}},Rx=class{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(t,n,s,o=!1){if(this.selectionStart=n,this.selectionEnd=s,!n||!s||n[0]===s[0]&&n[1]===s[1]){this.clear();return}let l=t.buffers.active.ydisp,y=n[1]-l,b=s[1]-l,c=Math.max(y,0),u=Math.min(b,t.rows-1);if(c>=t.rows||u<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=o,this.viewportStartRow=y,this.viewportEndRow=b,this.viewportCappedStartRow=c,this.viewportCappedEndRow=u,this.startCol=n[0],this.endCol=s[0]}isCellSelected(t,n,s){return this.hasSelection?(s-=t.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?n>=this.startCol&&s>=this.viewportCappedStartRow&&n<this.endCol&&s<=this.viewportCappedEndRow:n<this.startCol&&s>=this.viewportCappedStartRow&&n>=this.endCol&&s<=this.viewportCappedEndRow:s>this.viewportStartRow&&s<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&s===this.viewportStartRow&&n>=this.startCol&&n<this.endCol||this.viewportStartRow<this.viewportEndRow&&s===this.viewportEndRow&&n<this.endCol||this.viewportStartRow<this.viewportEndRow&&s===this.viewportStartRow&&n>=this.startCol):!1}};function Lx(){return new Rx}var Yc=4,Hc=1,zc=2,Md=3,kx=2147483648,Mx=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=Lx()}resize(t,n){let s=t*n*Yc;s!==this.cells.length&&(this.cells=new Uint32Array(s),this.lineLengths=new Uint32Array(n))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}},Dx=`#version 300 es
|
|
52
52
|
layout (location = 0) in vec2 a_position;
|
|
53
53
|
layout (location = 1) in vec2 a_size;
|
|
54
54
|
layout (location = 2) in vec4 a_color;
|
|
@@ -62,7 +62,7 @@ void main() {
|
|
|
62
62
|
vec2 zeroToOne = a_position + (a_unitquad * a_size);
|
|
63
63
|
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
64
64
|
v_color = a_color;
|
|
65
|
-
}`,
|
|
65
|
+
}`,Ox=`#version 300 es
|
|
66
66
|
precision lowp float;
|
|
67
67
|
|
|
68
68
|
in vec4 v_color;
|
|
@@ -71,30 +71,30 @@ out vec4 outColor;
|
|
|
71
71
|
|
|
72
72
|
void main() {
|
|
73
73
|
outColor = v_color;
|
|
74
|
-
}`,Ar=8,Dd=Ar*Float32Array.BYTES_PER_ELEMENT,Ox=20*Ar,mv=class{constructor(){this.attributes=new Float32Array(Ox),this.count=0}},Er=0,vv=0,bv=0,Sv=0,yv=0,Cv=0,wv=0,Bx=class extends $n{constructor(i,n,s,o){super(),this._terminal=i,this._gl=n,this._dimensions=s,this._themeService=o,this._vertices=new mv,this._verticesCursor=new mv;let l=this._gl;this._program=li(Ob(l,Mx,Dx)),this._register(Li(()=>l.deleteProgram(this._program))),this._projectionLocation=li(l.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=l.createVertexArray(),l.bindVertexArray(this._vertexArrayObject);let y=new Float32Array([0,0,1,0,0,1,1,1]),b=l.createBuffer();this._register(Li(()=>l.deleteBuffer(b))),l.bindBuffer(l.ARRAY_BUFFER,b),l.bufferData(l.ARRAY_BUFFER,y,l.STATIC_DRAW),l.enableVertexAttribArray(3),l.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);let c=new Uint8Array([0,1,2,3]),u=l.createBuffer();this._register(Li(()=>l.deleteBuffer(u))),l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,u),l.bufferData(l.ELEMENT_ARRAY_BUFFER,c,l.STATIC_DRAW),this._attributesBuffer=li(l.createBuffer()),this._register(Li(()=>l.deleteBuffer(this._attributesBuffer))),l.bindBuffer(l.ARRAY_BUFFER,this._attributesBuffer),l.enableVertexAttribArray(0),l.vertexAttribPointer(0,2,l.FLOAT,!1,Dd,0),l.vertexAttribDivisor(0,1),l.enableVertexAttribArray(1),l.vertexAttribPointer(1,2,l.FLOAT,!1,Dd,2*Float32Array.BYTES_PER_ELEMENT),l.vertexAttribDivisor(1,1),l.enableVertexAttribArray(2),l.vertexAttribPointer(2,4,l.FLOAT,!1,Dd,4*Float32Array.BYTES_PER_ELEMENT),l.vertexAttribDivisor(2,1),this._updateCachedColors(o.colors),this._register(this._themeService.onChangeColors(h=>{this._updateCachedColors(h),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(i){let n=this._gl;n.useProgram(this._program),n.bindVertexArray(this._vertexArrayObject),n.uniformMatrix4fv(this._projectionLocation,!1,Db),n.bindBuffer(n.ARRAY_BUFFER,this._attributesBuffer),n.bufferData(n.ARRAY_BUFFER,i.attributes,n.DYNAMIC_DRAW),n.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,n.UNSIGNED_BYTE,0,i.count)}handleResize(){this._updateViewportRectangle()}setDimensions(i){this._dimensions=i}_updateCachedColors(i){this._bgFloat=this._colorToFloat32Array(i.background),this._cursorFloat=this._colorToFloat32Array(i.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(i){let n=this._terminal,s=this._vertices,o=1,l,y,b,c,u,h,v,f,C,x,A;for(l=0;l<n.rows;l++){for(b=-1,c=0,u=0,h=!1,y=0;y<n.cols;y++)v=(l*n.cols+y)*Yc,f=i.cells[v+Hc],C=i.cells[v+zc],x=!!(C&67108864),(f!==c||C!==u&&(h||x))&&((c!==0||h&&u!==0)&&(A=o++*Ar,this._updateRectangle(s,A,u,c,b,y,l)),b=y,c=f,u=C,h=x);(c!==0||h&&u!==0)&&(A=o++*Ar,this._updateRectangle(s,A,u,c,b,n.cols,l))}s.count=o}updateCursor(i){let n=this._verticesCursor,s=i.cursor;if(!s||s.style==="block"){n.count=0;return}let o,l=0;(s.style==="bar"||s.style==="outline")&&(o=l++*Ar,this._addRectangleFloat(n.attributes,o,s.x*this._dimensions.device.cell.width,s.y*this._dimensions.device.cell.height,s.style==="bar"?s.dpr*s.cursorWidth:s.dpr,this._dimensions.device.cell.height,this._cursorFloat)),(s.style==="underline"||s.style==="outline")&&(o=l++*Ar,this._addRectangleFloat(n.attributes,o,s.x*this._dimensions.device.cell.width,(s.y+1)*this._dimensions.device.cell.height-s.dpr,s.width*this._dimensions.device.cell.width,s.dpr,this._cursorFloat)),s.style==="outline"&&(o=l++*Ar,this._addRectangleFloat(n.attributes,o,s.x*this._dimensions.device.cell.width,s.y*this._dimensions.device.cell.height,s.width*this._dimensions.device.cell.width,s.dpr,this._cursorFloat),o=l++*Ar,this._addRectangleFloat(n.attributes,o,(s.x+s.width)*this._dimensions.device.cell.width-s.dpr,s.y*this._dimensions.device.cell.height,s.dpr,this._dimensions.device.cell.height,this._cursorFloat)),n.count=l}_updateRectangle(i,n,s,o,l,y,b){if(s&67108864)switch(s&50331648){case 16777216:case 33554432:Er=this._themeService.colors.ansi[s&255].rgba;break;case 50331648:Er=(s&16777215)<<8;break;default:Er=this._themeService.colors.foreground.rgba}else switch(o&50331648){case 16777216:case 33554432:Er=this._themeService.colors.ansi[o&255].rgba;break;case 50331648:Er=(o&16777215)<<8;break;default:Er=this._themeService.colors.background.rgba}i.attributes.length<n+4&&(i.attributes=yx(i.attributes,this._terminal.rows*this._terminal.cols*Ar)),vv=l*this._dimensions.device.cell.width,bv=b*this._dimensions.device.cell.height,Sv=(Er>>24&255)/255,yv=(Er>>16&255)/255,Cv=(Er>>8&255)/255,wv=1,this._addRectangle(i.attributes,n,vv,bv,(y-l)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,Sv,yv,Cv,wv)}_addRectangle(i,n,s,o,l,y,b,c,u,h){i[n]=s/this._dimensions.device.canvas.width,i[n+1]=o/this._dimensions.device.canvas.height,i[n+2]=l/this._dimensions.device.canvas.width,i[n+3]=y/this._dimensions.device.canvas.height,i[n+4]=b,i[n+5]=c,i[n+6]=u,i[n+7]=h}_addRectangleFloat(i,n,s,o,l,y,b){i[n]=s/this._dimensions.device.canvas.width,i[n+1]=o/this._dimensions.device.canvas.height,i[n+2]=l/this._dimensions.device.canvas.width,i[n+3]=y/this._dimensions.device.canvas.height,i[n+4]=b[0],i[n+5]=b[1],i[n+6]=b[2],i[n+7]=b[3]}_colorToFloat32Array(i){return new Float32Array([(i.rgba>>24&255)/255,(i.rgba>>16&255)/255,(i.rgba>>8&255)/255,(i.rgba&255)/255])}},Nx=class extends $n{constructor(i,n,s,o,l,y,b,c){super(),this._container=n,this._alpha=l,this._coreBrowserService=y,this._optionsService=b,this._themeService=c,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-${s}-layer`),this._canvas.style.zIndex=o.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._register(this._themeService.onChangeColors(u=>{this._refreshCharAtlas(i,u),this.reset(i)})),this._register(Li(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=li(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(i){}handleFocus(i){}handleCursorMove(i){}handleGridChanged(i,n,s){}handleSelectionChanged(i,n,s,o=!1){}_setTransparency(i,n){if(n===this._alpha)return;let s=this._canvas;this._alpha=n,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,s),this._refreshCharAtlas(i,this._themeService.colors),this.handleGridChanged(i,0,i.rows-1)}_refreshCharAtlas(i,n){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=kb(i,this._optionsService.rawOptions,n,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr,2048),this._charAtlas.warmUp())}resize(i,n){this._deviceCellWidth=n.device.cell.width,this._deviceCellHeight=n.device.cell.height,this._deviceCharWidth=n.device.char.width,this._deviceCharHeight=n.device.char.height,this._deviceCharLeft=n.device.char.left,this._deviceCharTop=n.device.char.top,this._canvas.width=n.device.canvas.width,this._canvas.height=n.device.canvas.height,this._canvas.style.width=`${n.css.canvas.width}px`,this._canvas.style.height=`${n.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(i,this._themeService.colors)}_fillBottomLineAtCells(i,n,s=1){this._ctx.fillRect(i*this._deviceCellWidth,(n+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,s*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(i,n,s,o){this._alpha?this._ctx.clearRect(i*this._deviceCellWidth,n*this._deviceCellHeight,s*this._deviceCellWidth,o*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(i*this._deviceCellWidth,n*this._deviceCellHeight,s*this._deviceCellWidth,o*this._deviceCellHeight))}_fillCharTrueColor(i,n,s,o){this._ctx.font=this._getFont(i,!1,!1),this._ctx.textBaseline=vb,this._clipCell(s,o,n.getWidth()),this._ctx.fillText(n.getChars(),s*this._deviceCellWidth+this._deviceCharLeft,o*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(i,n,s){this._ctx.beginPath(),this._ctx.rect(i*this._deviceCellWidth,n*this._deviceCellHeight,s*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(i,n,s){let o=n?i.options.fontWeightBold:i.options.fontWeight;return`${s?"italic":""} ${o} ${i.options.fontSize*this._coreBrowserService.dpr}px ${i.options.fontFamily}`}},Ix=class extends Nx{constructor(i,n,s,o,l,y,b){super(s,i,"link",n,!0,l,y,b),this._register(o.onShowLinkUnderline(c=>this._handleShowLinkUnderline(c))),this._register(o.onHideLinkUnderline(c=>this._handleHideLinkUnderline(c)))}resize(i,n){super.resize(i,n),this._state=void 0}reset(i){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);let i=this._state.y2-this._state.y1-1;i>0&&this._clearCells(0,this._state.y1+1,this._state.cols,i),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(i){if(i.fg===257?this._ctx.fillStyle=this._themeService.colors.background.css:i.fg!==void 0&&vx(i.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[i.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,i.y1===i.y2)this._fillBottomLineAtCells(i.x1,i.y1,i.x2-i.x1);else{this._fillBottomLineAtCells(i.x1,i.y1,i.cols-i.x1);for(let n=i.y1+1;n<i.y2;n++)this._fillBottomLineAtCells(0,n,i.cols);this._fillBottomLineAtCells(0,i.y2,i.x2)}this._state=i}_handleHideLinkUnderline(i){this._clearCurrentLink()}},Ds=typeof window=="object"?window:globalThis,uf=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new kt,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new kt,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(n){return this.mapWindowIdToZoomLevel.get(this.getWindowId(n))??0}setZoomLevel(n,s){if(this.getZoomLevel(s)===n)return;let o=this.getWindowId(s);this.mapWindowIdToZoomLevel.set(o,n),this._onDidChangeZoomLevel.fire(o)}getZoomFactor(n){return this.mapWindowIdToZoomFactor.get(this.getWindowId(n))??1}setZoomFactor(n,s){this.mapWindowIdToZoomFactor.set(this.getWindowId(s),n)}setFullscreen(n,s){if(this.isFullscreen(s)===n)return;let o=this.getWindowId(s);this.mapWindowIdToFullScreen.set(o,n),this._onDidChangeFullscreen.fire(o)}isFullscreen(n){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(n))}getWindowId(n){return n.vscodeWindowId}};uf.INSTANCE=new uf;var Bb=uf;function Hx(i,n,s){typeof n=="string"&&(n=i.matchMedia(n)),n.addEventListener("change",s)}Bb.INSTANCE.onDidChangeZoomLevel;Bb.INSTANCE.onDidChangeFullscreen;var za=typeof navigator=="object"?navigator.userAgent:"";za.indexOf("Firefox")>=0;za.indexOf("AppleWebKit")>=0;var zx=za.indexOf("Chrome")>=0;!zx&&za.indexOf("Safari")>=0;za.indexOf("Electron/")>=0;za.indexOf("Android")>=0;var Od=!1;if(typeof Ds.matchMedia=="function"){let i=Ds.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),n=Ds.matchMedia("(display-mode: fullscreen)");Od=i.matches,Hx(Ds,i,({matches:s})=>{Od&&n.matches||(Od=s)})}var ka="en",Bd=!1,Nb=!1,Tc,$c=ka,Ev=ka,$x,xr,Bs=globalThis,on;typeof Bs.vscode<"u"&&typeof Bs.vscode.process<"u"?on=Bs.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(on=process);var Ux=typeof on?.versions?.electron=="string",Px=Ux&&on?.type==="renderer";if(typeof on=="object"){on.platform,on.platform,Bd=on.platform==="linux",Bd&&on.env.SNAP&&on.env.SNAP_REVISION,on.env.CI||on.env.BUILD_ARTIFACTSTAGINGDIRECTORY,Tc=ka,$c=ka;let i=on.env.VSCODE_NLS_CONFIG;if(i)try{let n=JSON.parse(i);Tc=n.userLocale,Ev=n.osLocale,$c=n.resolvedLanguage||ka,$x=n.languagePack?.translationsConfigFile}catch{}Nb=!0}else typeof navigator=="object"&&!Px?(xr=navigator.userAgent,xr.indexOf("Windows")>=0,xr.indexOf("Macintosh")>=0,(xr.indexOf("Macintosh")>=0||xr.indexOf("iPad")>=0||xr.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Bd=xr.indexOf("Linux")>=0,xr?.indexOf("Mobi")>=0,$c=globalThis._VSCODE_NLS_LANGUAGE||ka,Tc=navigator.language.toLowerCase(),Ev=Tc):console.error("Unable to resolve platform.");var xv=Nb,Vn=xr,ns=$c,jx;(i=>{function n(){return ns}i.value=n;function s(){return ns.length===2?ns==="en":ns.length>=3?ns[0]==="e"&&ns[1]==="n"&&ns[2]==="-":!1}i.isDefaultVariant=s;function o(){return ns==="en"}i.isDefault=o})(jx||={});var Fx=typeof Bs.postMessage=="function"&&!Bs.importScripts;(()=>{if(Fx){let i=[];Bs.addEventListener("message",s=>{if(s.data&&s.data.vscodeScheduleAsyncWork)for(let o=0,l=i.length;o<l;o++){let y=i[o];if(y.id===s.data.vscodeScheduleAsyncWork){i.splice(o,1),y.callback();return}}});let n=0;return s=>{let o=++n;i.push({id:o,callback:s}),Bs.postMessage({vscodeScheduleAsyncWork:o},"*")}}return i=>setTimeout(i)})();var qx=!!(Vn&&Vn.indexOf("Chrome")>=0);Vn&&Vn.indexOf("Firefox")>=0;!qx&&Vn&&Vn.indexOf("Safari")>=0;Vn&&Vn.indexOf("Edg/")>=0;Vn&&Vn.indexOf("Android")>=0;var Ea=typeof navigator=="object"?navigator:{};xv||document.queryCommandSupported&&document.queryCommandSupported("copy")||Ea&&Ea.clipboard&&Ea.clipboard.writeText,xv||Ea&&Ea.clipboard&&Ea.clipboard.readText;var Ff=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(i,n){this._keyCodeToStr[i]=n,this._strToKeyCode[n.toLowerCase()]=i}keyCodeToStr(i){return this._keyCodeToStr[i]}strToKeyCode(i){return this._strToKeyCode[i.toLowerCase()]||0}},Nd=new Ff,Tv=new Ff,Av=new Ff;new Array(230);var Wx;(i=>{function n(c){return Nd.keyCodeToStr(c)}i.toString=n;function s(c){return Nd.strToKeyCode(c)}i.fromString=s;function o(c){return Tv.keyCodeToStr(c)}i.toUserSettingsUS=o;function l(c){return Av.keyCodeToStr(c)}i.toUserSettingsGeneral=l;function y(c){return Tv.strToKeyCode(c)||Av.strToKeyCode(c)}i.fromUserSettings=y;function b(c){if(c>=98&&c<=113)return null;switch(c){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return Nd.keyCodeToStr(c)}i.toElectronAccelerator=b})(Wx||={});var Ib=Object.freeze(function(i,n){let s=setTimeout(i.bind(n),0);return{dispose(){clearTimeout(s)}}}),Gx;(i=>{function n(s){return s===i.None||s===i.Cancelled||s instanceof Kx?!0:!s||typeof s!="object"?!1:typeof s.isCancellationRequested=="boolean"&&typeof s.onCancellationRequested=="function"}i.isCancellationToken=n,i.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Rr.None}),i.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Ib})})(Gx||={});var Kx=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Ib:(this._emitter||(this._emitter=new kt),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},Yx;(i=>{async function n(o){let l,y=await Promise.all(o.map(b=>b.then(c=>c,c=>{l||(l=c)})));if(typeof l<"u")throw l;return y}i.settled=n;function s(o){return new Promise(async(l,y)=>{try{await o(l,y)}catch(b){y(b)}})}i.withAsyncBody=s})(Yx||={});var Rv=class Cn{static fromArray(n){return new Cn(s=>{s.emitMany(n)})}static fromPromise(n){return new Cn(async s=>{s.emitMany(await n)})}static fromPromises(n){return new Cn(async s=>{await Promise.all(n.map(async o=>s.emitOne(await o)))})}static merge(n){return new Cn(async s=>{await Promise.all(n.map(async o=>{for await(let l of o)s.emitOne(l)}))})}constructor(n,s){this._state=0,this._results=[],this._error=null,this._onReturn=s,this._onStateChanged=new kt,queueMicrotask(async()=>{let o={emitOne:l=>this.emitOne(l),emitMany:l=>this.emitMany(l),reject:l=>this.reject(l)};try{await Promise.resolve(n(o)),this.resolve()}catch(l){this.reject(l)}finally{o.emitOne=void 0,o.emitMany=void 0,o.reject=void 0}})}[Symbol.asyncIterator](){let n=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(n<this._results.length)return{done:!1,value:this._results[n++]};if(this._state===1)return{done:!0,value:void 0};await Rr.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(n,s){return new Cn(async o=>{for await(let l of n)o.emitOne(s(l))})}map(n){return Cn.map(this,n)}static filter(n,s){return new Cn(async o=>{for await(let l of n)s(l)&&o.emitOne(l)})}filter(n){return Cn.filter(this,n)}static coalesce(n){return Cn.filter(n,s=>!!s)}coalesce(){return Cn.coalesce(this)}static async toPromise(n){let s=[];for await(let o of n)s.push(o);return s}toPromise(){return Cn.toPromise(this)}emitOne(n){this._state===0&&(this._results.push(n),this._onStateChanged.fire())}emitMany(n){this._state===0&&(this._results=this._results.concat(n),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(n){this._state===0&&(this._state=2,this._error=n,this._onStateChanged.fire())}};Rv.EMPTY=Rv.fromArray([]);var{getWindow:Vx}=(function(){let i=new Map,n={window:Ds,disposables:new Da};i.set(Ds.vscodeWindowId,n);let s=new kt,o=new kt,l=new kt;function y(b,c){return(typeof b=="number"?i.get(b):void 0)??(c?n:void 0)}return{onDidRegisterWindow:s.event,onWillUnregisterWindow:l.event,onDidUnregisterWindow:o.event,registerWindow(b){if(i.has(b.vscodeWindowId))return $n.None;let c=new Da,u={window:b,disposables:c.add(new Da)};return i.set(b.vscodeWindowId,u),c.add(Li(()=>{i.delete(b.vscodeWindowId),o.fire(b)})),c.add(hf(b,Zx.BEFORE_UNLOAD,()=>{l.fire(b)})),s.fire(u),c},getWindows(){return i.values()},getWindowsCount(){return i.size},getWindowId(b){return b.vscodeWindowId},hasWindow(b){return i.has(b)},getWindowById:y,getWindow(b){let c=b;if(c?.ownerDocument?.defaultView)return c.ownerDocument.defaultView.window;let u=b;return u?.view?u.view.window:Ds},getDocument(b){return Vx(b).document}}})(),Xx=class{constructor(i,n,s,o){this._node=i,this._type=n,this._handler=s,this._options=o||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function hf(i,n,s,o){return new Xx(i,n,s,o)}var Zx={BEFORE_UNLOAD:"beforeunload"},Qx=class extends $n{constructor(i,n,s,o,l,y,b,c,u){super(),this._terminal=i,this._characterJoinerService=n,this._charSizeService=s,this._coreBrowserService=o,this._coreService=l,this._decorationService=y,this._optionsService=b,this._themeService=c,this._cursorBlinkStateManager=new Ho,this._charAtlasDisposable=this._register(new Ho),this._observerDisposable=this._register(new Ho),this._model=new kx,this._workCell=new _v,this._workCell2=new _v,this._rectangleRenderer=this._register(new Ho),this._glyphRenderer=this._register(new Ho),this._onChangeTextureAtlas=this._register(new kt),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new kt),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new kt),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this._register(new kt),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this._register(new kt),this.onContextLoss=this._onContextLoss.event,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");let h={antialias:!1,depth:!1,preserveDrawingBuffer:u};if(this._gl=this._canvas.getContext("webgl2",h),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this._register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new WE(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new Ix(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,b,this._themeService)],this.dimensions=FE(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this._register(b.onOptionChange(()=>this._handleOptionsChanged())),this._deviceMaxTextureSize=this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),this._register(hf(this._canvas,"webglcontextlost",v=>{console.log("webglcontextlost event received"),v.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(v)},3e3)})),this._register(hf(this._canvas,"webglcontextrestored",v=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,fv(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=pv(this._canvas,this._coreBrowserService.window,(v,f)=>this._setCanvasDevicePixelDimensions(v,f)),this._register(this._coreBrowserService.onWindowChange(v=>{this._observerDisposable.value=pv(this._canvas,v,(f,C)=>this._setCanvasDevicePixelDimensions(f,C))})),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._core.screenElement.isConnected,this._register(Li(()=>{for(let v of this._renderLayers)v.dispose();this._canvas.parentElement?.removeChild(this._canvas),fv(this._terminal)}))}get textureAtlas(){return this._charAtlas?.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(i,n){this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(let s of this._renderLayers)s.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`,this._rectangleRenderer.value?.setDimensions(this.dimensions),this._rectangleRenderer.value?.handleResize(),this._glyphRenderer.value?.setDimensions(this.dimensions),this._glyphRenderer.value?.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){for(let i of this._renderLayers)i.handleBlur(this._terminal);this._cursorBlinkStateManager.value?.pause(),this._requestRedrawViewport()}handleFocus(){for(let i of this._renderLayers)i.handleFocus(this._terminal);this._cursorBlinkStateManager.value?.resume(),this._requestRedrawViewport()}handleSelectionChanged(i,n,s){for(let o of this._renderLayers)o.handleSelectionChanged(this._terminal,i,n,s);this._model.selection.update(this._core,i,n,s),this._requestRedrawViewport()}handleCursorMove(){for(let i of this._renderLayers)i.handleCursorMove(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new Bx(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new Tx(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0){this._isAttached=!1;return}let i=kb(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._deviceMaxTextureSize);this._charAtlas!==i&&(this._onChangeTextureAtlas.fire(i.pages[0].canvas),this._charAtlasDisposable.value=fb(Rr.forward(i.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),Rr.forward(i.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas))),this._charAtlas=i,this._charAtlas.warmUp(),this._glyphRenderer.value?.setAtlas(this._charAtlas)}_clearModel(i){this._model.clear(),i&&this._glyphRenderer.value?.clear()}clearTextureAtlas(){this._charAtlas?.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){this._clearModel(!0);for(let i of this._renderLayers)i.reset(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation(),this._updateCursorBlink()}renderRows(i,n){if(!this._isAttached)if(this._core.screenElement?.isConnected&&this._charSizeService.width&&this._charSizeService.height)this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0;else return;for(let s of this._renderLayers)s.handleGridChanged(this._terminal,i,n);!this._glyphRenderer.value||!this._rectangleRenderer.value||(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(i,n),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible)&&this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._coreService.decPrivateModes.cursorBlink??this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new bx(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(i,n){let s=this._core,o=this._workCell,l,y,b,c,u,h,v=0,f=!0,C,x,A,E,p,S,_,g,w;i=Lv(i,s.rows-1,0),n=Lv(n,s.rows-1,0);let R=this._coreService.decPrivateModes.cursorStyle??s.options.cursorStyle??"block",L=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,D=L-s.buffer.ydisp,T=Math.min(this._terminal.buffer.active.cursorX,s.cols-1),B=-1,W=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let P=!1;for(y=i;y<=n;y++)for(b=y+s.buffer.ydisp,c=s.buffer.lines.get(b),this._model.lineLengths[y]=0,A=L===b,v=0,u=this._characterJoinerService.getJoinedCharacters(b),g=0;g<s.cols;g++){if(l=this._cellColorResolver.result.bg,c.loadCell(g,o),g===0&&(l=this._cellColorResolver.result.bg),h=!1,f=g>=v,C=g,u.length>0&&g===u[0][0]&&f){x=u.shift();let F=this._model.selection.isCellSelected(this._terminal,x[0],b);for(_=x[0]+1;_<x[1];_++)f&&=F===this._model.selection.isCellSelected(this._terminal,_,b);f&&=!A||T<x[0]||T>=x[1],f?(h=!0,o=new Jx(o,c.translateToString(!0,x[0],x[1]),x[1]-x[0]),C=x[1]-1):v=x[1]}if(E=o.getChars(),p=o.getCode(),_=(y*s.cols+g)*Yc,this._cellColorResolver.resolve(o,g,b,this.dimensions.device.cell.width),W&&b===L&&(g===T&&(this._model.cursor={x:T,y:D,width:o.getWidth(),style:this._coreBrowserService.isFocused?R:s.options.cursorInactiveStyle,cursorWidth:s.options.cursorWidth,dpr:this._devicePixelRatio},B=T+o.getWidth()-1),g>=T&&g<=B&&(this._coreBrowserService.isFocused&&R==="block"||this._coreBrowserService.isFocused===!1&&s.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)),p!==0&&(this._model.lineLengths[y]=g+1),!(this._model.cells[_]===p&&this._model.cells[_+Hc]===this._cellColorResolver.result.bg&&this._model.cells[_+zc]===this._cellColorResolver.result.fg&&this._model.cells[_+Md]===this._cellColorResolver.result.ext)&&(P=!0,E.length>1&&(p|=Lx),this._model.cells[_]=p,this._model.cells[_+Hc]=this._cellColorResolver.result.bg,this._model.cells[_+zc]=this._cellColorResolver.result.fg,this._model.cells[_+Md]=this._cellColorResolver.result.ext,S=o.getWidth(),this._glyphRenderer.value.updateCell(g,y,p,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,E,S,l),h)){for(o=this._workCell,g++;g<=C;g++)w=(y*s.cols+g)*Yc,this._glyphRenderer.value.updateCell(g,y,0,0,0,0,IE,0,0),this._model.cells[w]=0,this._model.cells[w+Hc]=this._cellColorResolver.result.bg,this._model.cells[w+zc]=this._cellColorResolver.result.fg,this._model.cells[w+Md]=this._cellColorResolver.result.ext;g--}}P&&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(i,n){this._canvas.width===i&&this._canvas.height===n||(this._canvas.width=i,this._canvas.height=n,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){let i=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:i,end:i})}},Jx=class extends La{constructor(i,n,s){super(),this.content=0,this.combinedData="",this.fg=i.fg,this.bg=i.bg,this.combinedData=n,this._width=s}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(i){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}};function Lv(i,n,s=0){return Math.max(Math.min(i,n),s)}var kv="di$target",Mv="di$dependencies",Id=new Map;function Qn(i){if(Id.has(i))return Id.get(i);let n=function(s,o,l){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");e5(n,s,l)};return n._id=i,Id.set(i,n),n}function e5(i,n,s){n[kv]===n?n[Mv].push({id:i,index:s}):(n[Mv]=[{id:i,index:s}],n[kv]=n)}Qn("BufferService");Qn("CoreMouseService");Qn("CoreService");Qn("CharsetService");Qn("InstantiationService");Qn("LogService");var t5=Qn("OptionsService");Qn("OscLinkService");Qn("UnicodeService");Qn("DecorationService");var i5={trace:0,debug:1,info:2,warn:3,error:4,off:5},n5="xterm.js: ",Dv=class extends $n{constructor(i){super(),this._optionsService=i,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel()))}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=i5[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(i){for(let n=0;n<i.length;n++)typeof i[n]=="function"&&(i[n]=i[n]())}_log(i,n,s){this._evalLazyOptionalParams(s),i.call(console,(this._optionsService.options.logger?"":n5)+n,...s)}trace(i,...n){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,i,n)}debug(i,...n){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,i,n)}info(i,...n){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,i,n)}warn(i,...n){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,i,n)}error(i,...n){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,i,n)}};Dv=EE([xE(0,t5)],Dv);var r5=class extends $n{constructor(i){if(gb&&NE()<16){let n={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",n))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=i,this._onChangeTextureAtlas=this._register(new kt),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new kt),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new kt),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this._register(new kt),this.onContextLoss=this._onContextLoss.event}activate(i){let n=i._core;if(!i.element){this._register(n.onWillOpen(()=>this.activate(i)));return}this._terminal=i;let s=n.coreService,o=n.optionsService,l=n,y=l._renderService,b=l._characterJoinerService,c=l._charSizeService,u=l._coreBrowserService,h=l._decorationService;l._logService;let v=l._themeService;this._renderer=this._register(new Qx(i,b,c,u,s,h,o,v,this._preserveDrawingBuffer)),this._register(Rr.forward(this._renderer.onContextLoss,this._onContextLoss)),this._register(Rr.forward(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this._register(Rr.forward(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this._register(Rr.forward(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),y.setRenderer(this._renderer),this._register(Li(()=>{if(this._terminal._core._store._isDisposed)return;let f=this._terminal._core._renderService;f.setRenderer(this._terminal._core._createRenderer()),f.handleResize(i.cols,i.rows)}))}get textureAtlas(){return this._renderer?.textureAtlas}clearTextureAtlas(){this._renderer?.clearTextureAtlas()}},Hd={exports:{}},Ov;function s5(){return Ov||(Ov=1,(function(i,n){(function(s,o){i.exports=o()})(globalThis,(()=>(()=>{var s={4567:function(b,c,u){var h=this&&this.__decorate||function(_,g,w,R){var L,D=arguments.length,T=D<3?g:R===null?R=Object.getOwnPropertyDescriptor(g,w):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(_,g,w,R);else for(var B=_.length-1;B>=0;B--)(L=_[B])&&(T=(D<3?L(T):D>3?L(g,w,T):L(g,w))||T);return D>3&&T&&Object.defineProperty(g,w,T),T},v=this&&this.__param||function(_,g){return function(w,R){g(w,R,_)}};Object.defineProperty(c,"__esModule",{value:!0}),c.AccessibilityManager=void 0;const f=u(9042),C=u(9924),x=u(844),A=u(4725),E=u(2585),p=u(3656);let S=c.AccessibilityManager=class extends x.Disposable{constructor(_,g,w,R){super(),this._terminal=_,this._coreBrowserService=w,this._renderService=R,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 L=0;L<this._terminal.rows;L++)this._rowElements[L]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[L]);if(this._topBoundaryFocusListener=L=>this._handleBoundaryFocus(L,0),this._bottomBoundaryFocusListener=L=>this._handleBoundaryFocus(L,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 C.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((L=>this._handleResize(L.rows)))),this.register(this._terminal.onRender((L=>this._refreshRows(L.start,L.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((L=>this._handleChar(L)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
74
|
+
}`,Ar=8,Dd=Ar*Float32Array.BYTES_PER_ELEMENT,Bx=20*Ar,mv=class{constructor(){this.attributes=new Float32Array(Bx),this.count=0}},Er=0,vv=0,bv=0,Sv=0,yv=0,Cv=0,wv=0,Nx=class extends $n{constructor(t,n,s,o){super(),this._terminal=t,this._gl=n,this._dimensions=s,this._themeService=o,this._vertices=new mv,this._verticesCursor=new mv;let l=this._gl;this._program=li(Bb(l,Dx,Ox)),this._register(Li(()=>l.deleteProgram(this._program))),this._projectionLocation=li(l.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=l.createVertexArray(),l.bindVertexArray(this._vertexArrayObject);let y=new Float32Array([0,0,1,0,0,1,1,1]),b=l.createBuffer();this._register(Li(()=>l.deleteBuffer(b))),l.bindBuffer(l.ARRAY_BUFFER,b),l.bufferData(l.ARRAY_BUFFER,y,l.STATIC_DRAW),l.enableVertexAttribArray(3),l.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);let c=new Uint8Array([0,1,2,3]),u=l.createBuffer();this._register(Li(()=>l.deleteBuffer(u))),l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,u),l.bufferData(l.ELEMENT_ARRAY_BUFFER,c,l.STATIC_DRAW),this._attributesBuffer=li(l.createBuffer()),this._register(Li(()=>l.deleteBuffer(this._attributesBuffer))),l.bindBuffer(l.ARRAY_BUFFER,this._attributesBuffer),l.enableVertexAttribArray(0),l.vertexAttribPointer(0,2,l.FLOAT,!1,Dd,0),l.vertexAttribDivisor(0,1),l.enableVertexAttribArray(1),l.vertexAttribPointer(1,2,l.FLOAT,!1,Dd,2*Float32Array.BYTES_PER_ELEMENT),l.vertexAttribDivisor(1,1),l.enableVertexAttribArray(2),l.vertexAttribPointer(2,4,l.FLOAT,!1,Dd,4*Float32Array.BYTES_PER_ELEMENT),l.vertexAttribDivisor(2,1),this._updateCachedColors(o.colors),this._register(this._themeService.onChangeColors(h=>{this._updateCachedColors(h),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(t){let n=this._gl;n.useProgram(this._program),n.bindVertexArray(this._vertexArrayObject),n.uniformMatrix4fv(this._projectionLocation,!1,Ob),n.bindBuffer(n.ARRAY_BUFFER,this._attributesBuffer),n.bufferData(n.ARRAY_BUFFER,t.attributes,n.DYNAMIC_DRAW),n.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,n.UNSIGNED_BYTE,0,t.count)}handleResize(){this._updateViewportRectangle()}setDimensions(t){this._dimensions=t}_updateCachedColors(t){this._bgFloat=this._colorToFloat32Array(t.background),this._cursorFloat=this._colorToFloat32Array(t.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(t){let n=this._terminal,s=this._vertices,o=1,l,y,b,c,u,h,v,f,C,x,A;for(l=0;l<n.rows;l++){for(b=-1,c=0,u=0,h=!1,y=0;y<n.cols;y++)v=(l*n.cols+y)*Yc,f=t.cells[v+Hc],C=t.cells[v+zc],x=!!(C&67108864),(f!==c||C!==u&&(h||x))&&((c!==0||h&&u!==0)&&(A=o++*Ar,this._updateRectangle(s,A,u,c,b,y,l)),b=y,c=f,u=C,h=x);(c!==0||h&&u!==0)&&(A=o++*Ar,this._updateRectangle(s,A,u,c,b,n.cols,l))}s.count=o}updateCursor(t){let n=this._verticesCursor,s=t.cursor;if(!s||s.style==="block"){n.count=0;return}let o,l=0;(s.style==="bar"||s.style==="outline")&&(o=l++*Ar,this._addRectangleFloat(n.attributes,o,s.x*this._dimensions.device.cell.width,s.y*this._dimensions.device.cell.height,s.style==="bar"?s.dpr*s.cursorWidth:s.dpr,this._dimensions.device.cell.height,this._cursorFloat)),(s.style==="underline"||s.style==="outline")&&(o=l++*Ar,this._addRectangleFloat(n.attributes,o,s.x*this._dimensions.device.cell.width,(s.y+1)*this._dimensions.device.cell.height-s.dpr,s.width*this._dimensions.device.cell.width,s.dpr,this._cursorFloat)),s.style==="outline"&&(o=l++*Ar,this._addRectangleFloat(n.attributes,o,s.x*this._dimensions.device.cell.width,s.y*this._dimensions.device.cell.height,s.width*this._dimensions.device.cell.width,s.dpr,this._cursorFloat),o=l++*Ar,this._addRectangleFloat(n.attributes,o,(s.x+s.width)*this._dimensions.device.cell.width-s.dpr,s.y*this._dimensions.device.cell.height,s.dpr,this._dimensions.device.cell.height,this._cursorFloat)),n.count=l}_updateRectangle(t,n,s,o,l,y,b){if(s&67108864)switch(s&50331648){case 16777216:case 33554432:Er=this._themeService.colors.ansi[s&255].rgba;break;case 50331648:Er=(s&16777215)<<8;break;default:Er=this._themeService.colors.foreground.rgba}else switch(o&50331648){case 16777216:case 33554432:Er=this._themeService.colors.ansi[o&255].rgba;break;case 50331648:Er=(o&16777215)<<8;break;default:Er=this._themeService.colors.background.rgba}t.attributes.length<n+4&&(t.attributes=Cx(t.attributes,this._terminal.rows*this._terminal.cols*Ar)),vv=l*this._dimensions.device.cell.width,bv=b*this._dimensions.device.cell.height,Sv=(Er>>24&255)/255,yv=(Er>>16&255)/255,Cv=(Er>>8&255)/255,wv=1,this._addRectangle(t.attributes,n,vv,bv,(y-l)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,Sv,yv,Cv,wv)}_addRectangle(t,n,s,o,l,y,b,c,u,h){t[n]=s/this._dimensions.device.canvas.width,t[n+1]=o/this._dimensions.device.canvas.height,t[n+2]=l/this._dimensions.device.canvas.width,t[n+3]=y/this._dimensions.device.canvas.height,t[n+4]=b,t[n+5]=c,t[n+6]=u,t[n+7]=h}_addRectangleFloat(t,n,s,o,l,y,b){t[n]=s/this._dimensions.device.canvas.width,t[n+1]=o/this._dimensions.device.canvas.height,t[n+2]=l/this._dimensions.device.canvas.width,t[n+3]=y/this._dimensions.device.canvas.height,t[n+4]=b[0],t[n+5]=b[1],t[n+6]=b[2],t[n+7]=b[3]}_colorToFloat32Array(t){return new Float32Array([(t.rgba>>24&255)/255,(t.rgba>>16&255)/255,(t.rgba>>8&255)/255,(t.rgba&255)/255])}},Ix=class extends $n{constructor(t,n,s,o,l,y,b,c){super(),this._container=n,this._alpha=l,this._coreBrowserService=y,this._optionsService=b,this._themeService=c,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-${s}-layer`),this._canvas.style.zIndex=o.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._register(this._themeService.onChangeColors(u=>{this._refreshCharAtlas(t,u),this.reset(t)})),this._register(Li(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=li(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(t){}handleFocus(t){}handleCursorMove(t){}handleGridChanged(t,n,s){}handleSelectionChanged(t,n,s,o=!1){}_setTransparency(t,n){if(n===this._alpha)return;let s=this._canvas;this._alpha=n,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,s),this._refreshCharAtlas(t,this._themeService.colors),this.handleGridChanged(t,0,t.rows-1)}_refreshCharAtlas(t,n){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=Mb(t,this._optionsService.rawOptions,n,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr,2048),this._charAtlas.warmUp())}resize(t,n){this._deviceCellWidth=n.device.cell.width,this._deviceCellHeight=n.device.cell.height,this._deviceCharWidth=n.device.char.width,this._deviceCharHeight=n.device.char.height,this._deviceCharLeft=n.device.char.left,this._deviceCharTop=n.device.char.top,this._canvas.width=n.device.canvas.width,this._canvas.height=n.device.canvas.height,this._canvas.style.width=`${n.css.canvas.width}px`,this._canvas.style.height=`${n.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(t,this._themeService.colors)}_fillBottomLineAtCells(t,n,s=1){this._ctx.fillRect(t*this._deviceCellWidth,(n+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,s*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(t,n,s,o){this._alpha?this._ctx.clearRect(t*this._deviceCellWidth,n*this._deviceCellHeight,s*this._deviceCellWidth,o*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(t*this._deviceCellWidth,n*this._deviceCellHeight,s*this._deviceCellWidth,o*this._deviceCellHeight))}_fillCharTrueColor(t,n,s,o){this._ctx.font=this._getFont(t,!1,!1),this._ctx.textBaseline=bb,this._clipCell(s,o,n.getWidth()),this._ctx.fillText(n.getChars(),s*this._deviceCellWidth+this._deviceCharLeft,o*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(t,n,s){this._ctx.beginPath(),this._ctx.rect(t*this._deviceCellWidth,n*this._deviceCellHeight,s*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(t,n,s){let o=n?t.options.fontWeightBold:t.options.fontWeight;return`${s?"italic":""} ${o} ${t.options.fontSize*this._coreBrowserService.dpr}px ${t.options.fontFamily}`}},Hx=class extends Ix{constructor(t,n,s,o,l,y,b){super(s,t,"link",n,!0,l,y,b),this._register(o.onShowLinkUnderline(c=>this._handleShowLinkUnderline(c))),this._register(o.onHideLinkUnderline(c=>this._handleHideLinkUnderline(c)))}resize(t,n){super.resize(t,n),this._state=void 0}reset(t){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);let t=this._state.y2-this._state.y1-1;t>0&&this._clearCells(0,this._state.y1+1,this._state.cols,t),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(t){if(t.fg===257?this._ctx.fillStyle=this._themeService.colors.background.css:t.fg!==void 0&&bx(t.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[t.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,t.y1===t.y2)this._fillBottomLineAtCells(t.x1,t.y1,t.x2-t.x1);else{this._fillBottomLineAtCells(t.x1,t.y1,t.cols-t.x1);for(let n=t.y1+1;n<t.y2;n++)this._fillBottomLineAtCells(0,n,t.cols);this._fillBottomLineAtCells(0,t.y2,t.x2)}this._state=t}_handleHideLinkUnderline(t){this._clearCurrentLink()}},Ds=typeof window=="object"?window:globalThis,uf=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new kt,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new kt,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(n){return this.mapWindowIdToZoomLevel.get(this.getWindowId(n))??0}setZoomLevel(n,s){if(this.getZoomLevel(s)===n)return;let o=this.getWindowId(s);this.mapWindowIdToZoomLevel.set(o,n),this._onDidChangeZoomLevel.fire(o)}getZoomFactor(n){return this.mapWindowIdToZoomFactor.get(this.getWindowId(n))??1}setZoomFactor(n,s){this.mapWindowIdToZoomFactor.set(this.getWindowId(s),n)}setFullscreen(n,s){if(this.isFullscreen(s)===n)return;let o=this.getWindowId(s);this.mapWindowIdToFullScreen.set(o,n),this._onDidChangeFullscreen.fire(o)}isFullscreen(n){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(n))}getWindowId(n){return n.vscodeWindowId}};uf.INSTANCE=new uf;var Nb=uf;function zx(t,n,s){typeof n=="string"&&(n=t.matchMedia(n)),n.addEventListener("change",s)}Nb.INSTANCE.onDidChangeZoomLevel;Nb.INSTANCE.onDidChangeFullscreen;var za=typeof navigator=="object"?navigator.userAgent:"";za.indexOf("Firefox")>=0;za.indexOf("AppleWebKit")>=0;var $x=za.indexOf("Chrome")>=0;!$x&&za.indexOf("Safari")>=0;za.indexOf("Electron/")>=0;za.indexOf("Android")>=0;var Od=!1;if(typeof Ds.matchMedia=="function"){let t=Ds.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),n=Ds.matchMedia("(display-mode: fullscreen)");Od=t.matches,zx(Ds,t,({matches:s})=>{Od&&n.matches||(Od=s)})}var ka="en",Bd=!1,Ib=!1,Tc,$c=ka,Ev=ka,Ux,xr,Bs=globalThis,on;typeof Bs.vscode<"u"&&typeof Bs.vscode.process<"u"?on=Bs.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(on=process);var Px=typeof on?.versions?.electron=="string",jx=Px&&on?.type==="renderer";if(typeof on=="object"){on.platform,on.platform,Bd=on.platform==="linux",Bd&&on.env.SNAP&&on.env.SNAP_REVISION,on.env.CI||on.env.BUILD_ARTIFACTSTAGINGDIRECTORY,Tc=ka,$c=ka;let t=on.env.VSCODE_NLS_CONFIG;if(t)try{let n=JSON.parse(t);Tc=n.userLocale,Ev=n.osLocale,$c=n.resolvedLanguage||ka,Ux=n.languagePack?.translationsConfigFile}catch{}Ib=!0}else typeof navigator=="object"&&!jx?(xr=navigator.userAgent,xr.indexOf("Windows")>=0,xr.indexOf("Macintosh")>=0,(xr.indexOf("Macintosh")>=0||xr.indexOf("iPad")>=0||xr.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Bd=xr.indexOf("Linux")>=0,xr?.indexOf("Mobi")>=0,$c=globalThis._VSCODE_NLS_LANGUAGE||ka,Tc=navigator.language.toLowerCase(),Ev=Tc):console.error("Unable to resolve platform.");var xv=Ib,Vn=xr,ns=$c,Fx;(t=>{function n(){return ns}t.value=n;function s(){return ns.length===2?ns==="en":ns.length>=3?ns[0]==="e"&&ns[1]==="n"&&ns[2]==="-":!1}t.isDefaultVariant=s;function o(){return ns==="en"}t.isDefault=o})(Fx||={});var qx=typeof Bs.postMessage=="function"&&!Bs.importScripts;(()=>{if(qx){let t=[];Bs.addEventListener("message",s=>{if(s.data&&s.data.vscodeScheduleAsyncWork)for(let o=0,l=t.length;o<l;o++){let y=t[o];if(y.id===s.data.vscodeScheduleAsyncWork){t.splice(o,1),y.callback();return}}});let n=0;return s=>{let o=++n;t.push({id:o,callback:s}),Bs.postMessage({vscodeScheduleAsyncWork:o},"*")}}return t=>setTimeout(t)})();var Wx=!!(Vn&&Vn.indexOf("Chrome")>=0);Vn&&Vn.indexOf("Firefox")>=0;!Wx&&Vn&&Vn.indexOf("Safari")>=0;Vn&&Vn.indexOf("Edg/")>=0;Vn&&Vn.indexOf("Android")>=0;var Ea=typeof navigator=="object"?navigator:{};xv||document.queryCommandSupported&&document.queryCommandSupported("copy")||Ea&&Ea.clipboard&&Ea.clipboard.writeText,xv||Ea&&Ea.clipboard&&Ea.clipboard.readText;var Ff=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(t,n){this._keyCodeToStr[t]=n,this._strToKeyCode[n.toLowerCase()]=t}keyCodeToStr(t){return this._keyCodeToStr[t]}strToKeyCode(t){return this._strToKeyCode[t.toLowerCase()]||0}},Nd=new Ff,Tv=new Ff,Av=new Ff;new Array(230);var Gx;(t=>{function n(c){return Nd.keyCodeToStr(c)}t.toString=n;function s(c){return Nd.strToKeyCode(c)}t.fromString=s;function o(c){return Tv.keyCodeToStr(c)}t.toUserSettingsUS=o;function l(c){return Av.keyCodeToStr(c)}t.toUserSettingsGeneral=l;function y(c){return Tv.strToKeyCode(c)||Av.strToKeyCode(c)}t.fromUserSettings=y;function b(c){if(c>=98&&c<=113)return null;switch(c){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return Nd.keyCodeToStr(c)}t.toElectronAccelerator=b})(Gx||={});var Hb=Object.freeze(function(t,n){let s=setTimeout(t.bind(n),0);return{dispose(){clearTimeout(s)}}}),Kx;(t=>{function n(s){return s===t.None||s===t.Cancelled||s instanceof Yx?!0:!s||typeof s!="object"?!1:typeof s.isCancellationRequested=="boolean"&&typeof s.onCancellationRequested=="function"}t.isCancellationToken=n,t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Rr.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Hb})})(Kx||={});var Yx=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Hb:(this._emitter||(this._emitter=new kt),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},Vx;(t=>{async function n(o){let l,y=await Promise.all(o.map(b=>b.then(c=>c,c=>{l||(l=c)})));if(typeof l<"u")throw l;return y}t.settled=n;function s(o){return new Promise(async(l,y)=>{try{await o(l,y)}catch(b){y(b)}})}t.withAsyncBody=s})(Vx||={});var Rv=class Cn{static fromArray(n){return new Cn(s=>{s.emitMany(n)})}static fromPromise(n){return new Cn(async s=>{s.emitMany(await n)})}static fromPromises(n){return new Cn(async s=>{await Promise.all(n.map(async o=>s.emitOne(await o)))})}static merge(n){return new Cn(async s=>{await Promise.all(n.map(async o=>{for await(let l of o)s.emitOne(l)}))})}constructor(n,s){this._state=0,this._results=[],this._error=null,this._onReturn=s,this._onStateChanged=new kt,queueMicrotask(async()=>{let o={emitOne:l=>this.emitOne(l),emitMany:l=>this.emitMany(l),reject:l=>this.reject(l)};try{await Promise.resolve(n(o)),this.resolve()}catch(l){this.reject(l)}finally{o.emitOne=void 0,o.emitMany=void 0,o.reject=void 0}})}[Symbol.asyncIterator](){let n=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(n<this._results.length)return{done:!1,value:this._results[n++]};if(this._state===1)return{done:!0,value:void 0};await Rr.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(n,s){return new Cn(async o=>{for await(let l of n)o.emitOne(s(l))})}map(n){return Cn.map(this,n)}static filter(n,s){return new Cn(async o=>{for await(let l of n)s(l)&&o.emitOne(l)})}filter(n){return Cn.filter(this,n)}static coalesce(n){return Cn.filter(n,s=>!!s)}coalesce(){return Cn.coalesce(this)}static async toPromise(n){let s=[];for await(let o of n)s.push(o);return s}toPromise(){return Cn.toPromise(this)}emitOne(n){this._state===0&&(this._results.push(n),this._onStateChanged.fire())}emitMany(n){this._state===0&&(this._results=this._results.concat(n),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(n){this._state===0&&(this._state=2,this._error=n,this._onStateChanged.fire())}};Rv.EMPTY=Rv.fromArray([]);var{getWindow:Xx}=(function(){let t=new Map,n={window:Ds,disposables:new Da};t.set(Ds.vscodeWindowId,n);let s=new kt,o=new kt,l=new kt;function y(b,c){return(typeof b=="number"?t.get(b):void 0)??(c?n:void 0)}return{onDidRegisterWindow:s.event,onWillUnregisterWindow:l.event,onDidUnregisterWindow:o.event,registerWindow(b){if(t.has(b.vscodeWindowId))return $n.None;let c=new Da,u={window:b,disposables:c.add(new Da)};return t.set(b.vscodeWindowId,u),c.add(Li(()=>{t.delete(b.vscodeWindowId),o.fire(b)})),c.add(hf(b,Qx.BEFORE_UNLOAD,()=>{l.fire(b)})),s.fire(u),c},getWindows(){return t.values()},getWindowsCount(){return t.size},getWindowId(b){return b.vscodeWindowId},hasWindow(b){return t.has(b)},getWindowById:y,getWindow(b){let c=b;if(c?.ownerDocument?.defaultView)return c.ownerDocument.defaultView.window;let u=b;return u?.view?u.view.window:Ds},getDocument(b){return Xx(b).document}}})(),Zx=class{constructor(t,n,s,o){this._node=t,this._type=n,this._handler=s,this._options=o||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function hf(t,n,s,o){return new Zx(t,n,s,o)}var Qx={BEFORE_UNLOAD:"beforeunload"},Jx=class extends $n{constructor(t,n,s,o,l,y,b,c,u){super(),this._terminal=t,this._characterJoinerService=n,this._charSizeService=s,this._coreBrowserService=o,this._coreService=l,this._decorationService=y,this._optionsService=b,this._themeService=c,this._cursorBlinkStateManager=new Ho,this._charAtlasDisposable=this._register(new Ho),this._observerDisposable=this._register(new Ho),this._model=new Mx,this._workCell=new _v,this._workCell2=new _v,this._rectangleRenderer=this._register(new Ho),this._glyphRenderer=this._register(new Ho),this._onChangeTextureAtlas=this._register(new kt),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new kt),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new kt),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this._register(new kt),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this._register(new kt),this.onContextLoss=this._onContextLoss.event,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");let h={antialias:!1,depth:!1,preserveDrawingBuffer:u};if(this._gl=this._canvas.getContext("webgl2",h),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this._register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new GE(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new Hx(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,b,this._themeService)],this.dimensions=qE(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this._register(b.onOptionChange(()=>this._handleOptionsChanged())),this._deviceMaxTextureSize=this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),this._register(hf(this._canvas,"webglcontextlost",v=>{console.log("webglcontextlost event received"),v.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(v)},3e3)})),this._register(hf(this._canvas,"webglcontextrestored",v=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,fv(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=pv(this._canvas,this._coreBrowserService.window,(v,f)=>this._setCanvasDevicePixelDimensions(v,f)),this._register(this._coreBrowserService.onWindowChange(v=>{this._observerDisposable.value=pv(this._canvas,v,(f,C)=>this._setCanvasDevicePixelDimensions(f,C))})),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._core.screenElement.isConnected,this._register(Li(()=>{for(let v of this._renderLayers)v.dispose();this._canvas.parentElement?.removeChild(this._canvas),fv(this._terminal)}))}get textureAtlas(){return this._charAtlas?.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(t,n){this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(let s of this._renderLayers)s.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`,this._rectangleRenderer.value?.setDimensions(this.dimensions),this._rectangleRenderer.value?.handleResize(),this._glyphRenderer.value?.setDimensions(this.dimensions),this._glyphRenderer.value?.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){for(let t of this._renderLayers)t.handleBlur(this._terminal);this._cursorBlinkStateManager.value?.pause(),this._requestRedrawViewport()}handleFocus(){for(let t of this._renderLayers)t.handleFocus(this._terminal);this._cursorBlinkStateManager.value?.resume(),this._requestRedrawViewport()}handleSelectionChanged(t,n,s){for(let o of this._renderLayers)o.handleSelectionChanged(this._terminal,t,n,s);this._model.selection.update(this._core,t,n,s),this._requestRedrawViewport()}handleCursorMove(){for(let t of this._renderLayers)t.handleCursorMove(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new Nx(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new Ax(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0){this._isAttached=!1;return}let t=Mb(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._deviceMaxTextureSize);this._charAtlas!==t&&(this._onChangeTextureAtlas.fire(t.pages[0].canvas),this._charAtlasDisposable.value=pb(Rr.forward(t.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),Rr.forward(t.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas))),this._charAtlas=t,this._charAtlas.warmUp(),this._glyphRenderer.value?.setAtlas(this._charAtlas)}_clearModel(t){this._model.clear(),t&&this._glyphRenderer.value?.clear()}clearTextureAtlas(){this._charAtlas?.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){this._clearModel(!0);for(let t of this._renderLayers)t.reset(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation(),this._updateCursorBlink()}renderRows(t,n){if(!this._isAttached)if(this._core.screenElement?.isConnected&&this._charSizeService.width&&this._charSizeService.height)this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0;else return;for(let s of this._renderLayers)s.handleGridChanged(this._terminal,t,n);!this._glyphRenderer.value||!this._rectangleRenderer.value||(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(t,n),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible)&&this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._coreService.decPrivateModes.cursorBlink??this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new Sx(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(t,n){let s=this._core,o=this._workCell,l,y,b,c,u,h,v=0,f=!0,C,x,A,E,p,S,_,g,w;t=Lv(t,s.rows-1,0),n=Lv(n,s.rows-1,0);let R=this._coreService.decPrivateModes.cursorStyle??s.options.cursorStyle??"block",L=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,D=L-s.buffer.ydisp,T=Math.min(this._terminal.buffer.active.cursorX,s.cols-1),B=-1,W=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let P=!1;for(y=t;y<=n;y++)for(b=y+s.buffer.ydisp,c=s.buffer.lines.get(b),this._model.lineLengths[y]=0,A=L===b,v=0,u=this._characterJoinerService.getJoinedCharacters(b),g=0;g<s.cols;g++){if(l=this._cellColorResolver.result.bg,c.loadCell(g,o),g===0&&(l=this._cellColorResolver.result.bg),h=!1,f=g>=v,C=g,u.length>0&&g===u[0][0]&&f){x=u.shift();let F=this._model.selection.isCellSelected(this._terminal,x[0],b);for(_=x[0]+1;_<x[1];_++)f&&=F===this._model.selection.isCellSelected(this._terminal,_,b);f&&=!A||T<x[0]||T>=x[1],f?(h=!0,o=new e5(o,c.translateToString(!0,x[0],x[1]),x[1]-x[0]),C=x[1]-1):v=x[1]}if(E=o.getChars(),p=o.getCode(),_=(y*s.cols+g)*Yc,this._cellColorResolver.resolve(o,g,b,this.dimensions.device.cell.width),W&&b===L&&(g===T&&(this._model.cursor={x:T,y:D,width:o.getWidth(),style:this._coreBrowserService.isFocused?R:s.options.cursorInactiveStyle,cursorWidth:s.options.cursorWidth,dpr:this._devicePixelRatio},B=T+o.getWidth()-1),g>=T&&g<=B&&(this._coreBrowserService.isFocused&&R==="block"||this._coreBrowserService.isFocused===!1&&s.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)),p!==0&&(this._model.lineLengths[y]=g+1),!(this._model.cells[_]===p&&this._model.cells[_+Hc]===this._cellColorResolver.result.bg&&this._model.cells[_+zc]===this._cellColorResolver.result.fg&&this._model.cells[_+Md]===this._cellColorResolver.result.ext)&&(P=!0,E.length>1&&(p|=kx),this._model.cells[_]=p,this._model.cells[_+Hc]=this._cellColorResolver.result.bg,this._model.cells[_+zc]=this._cellColorResolver.result.fg,this._model.cells[_+Md]=this._cellColorResolver.result.ext,S=o.getWidth(),this._glyphRenderer.value.updateCell(g,y,p,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,E,S,l),h)){for(o=this._workCell,g++;g<=C;g++)w=(y*s.cols+g)*Yc,this._glyphRenderer.value.updateCell(g,y,0,0,0,0,HE,0,0),this._model.cells[w]=0,this._model.cells[w+Hc]=this._cellColorResolver.result.bg,this._model.cells[w+zc]=this._cellColorResolver.result.fg,this._model.cells[w+Md]=this._cellColorResolver.result.ext;g--}}P&&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(t,n){this._canvas.width===t&&this._canvas.height===n||(this._canvas.width=t,this._canvas.height=n,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){let t=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:t,end:t})}},e5=class extends La{constructor(t,n,s){super(),this.content=0,this.combinedData="",this.fg=t.fg,this.bg=t.bg,this.combinedData=n,this._width=s}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(t){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}};function Lv(t,n,s=0){return Math.max(Math.min(t,n),s)}var kv="di$target",Mv="di$dependencies",Id=new Map;function Qn(t){if(Id.has(t))return Id.get(t);let n=function(s,o,l){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");t5(n,s,l)};return n._id=t,Id.set(t,n),n}function t5(t,n,s){n[kv]===n?n[Mv].push({id:t,index:s}):(n[Mv]=[{id:t,index:s}],n[kv]=n)}Qn("BufferService");Qn("CoreMouseService");Qn("CoreService");Qn("CharsetService");Qn("InstantiationService");Qn("LogService");var i5=Qn("OptionsService");Qn("OscLinkService");Qn("UnicodeService");Qn("DecorationService");var n5={trace:0,debug:1,info:2,warn:3,error:4,off:5},r5="xterm.js: ",Dv=class extends $n{constructor(t){super(),this._optionsService=t,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel()))}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=n5[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(t){for(let n=0;n<t.length;n++)typeof t[n]=="function"&&(t[n]=t[n]())}_log(t,n,s){this._evalLazyOptionalParams(s),t.call(console,(this._optionsService.options.logger?"":r5)+n,...s)}trace(t,...n){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,t,n)}debug(t,...n){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,t,n)}info(t,...n){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,t,n)}warn(t,...n){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,t,n)}error(t,...n){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,t,n)}};Dv=xE([TE(0,i5)],Dv);var s5=class extends $n{constructor(t){if(mb&&IE()<16){let n={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",n))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=t,this._onChangeTextureAtlas=this._register(new kt),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new kt),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new kt),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this._register(new kt),this.onContextLoss=this._onContextLoss.event}activate(t){let n=t._core;if(!t.element){this._register(n.onWillOpen(()=>this.activate(t)));return}this._terminal=t;let s=n.coreService,o=n.optionsService,l=n,y=l._renderService,b=l._characterJoinerService,c=l._charSizeService,u=l._coreBrowserService,h=l._decorationService;l._logService;let v=l._themeService;this._renderer=this._register(new Jx(t,b,c,u,s,h,o,v,this._preserveDrawingBuffer)),this._register(Rr.forward(this._renderer.onContextLoss,this._onContextLoss)),this._register(Rr.forward(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this._register(Rr.forward(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this._register(Rr.forward(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),y.setRenderer(this._renderer),this._register(Li(()=>{if(this._terminal._core._store._isDisposed)return;let f=this._terminal._core._renderService;f.setRenderer(this._terminal._core._createRenderer()),f.handleResize(t.cols,t.rows)}))}get textureAtlas(){return this._renderer?.textureAtlas}clearTextureAtlas(){this._renderer?.clearTextureAtlas()}},Hd={exports:{}},Ov;function a5(){return Ov||(Ov=1,(function(t,n){(function(s,o){t.exports=o()})(globalThis,(()=>(()=>{var s={4567:function(b,c,u){var h=this&&this.__decorate||function(_,g,w,R){var L,D=arguments.length,T=D<3?g:R===null?R=Object.getOwnPropertyDescriptor(g,w):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(_,g,w,R);else for(var B=_.length-1;B>=0;B--)(L=_[B])&&(T=(D<3?L(T):D>3?L(g,w,T):L(g,w))||T);return D>3&&T&&Object.defineProperty(g,w,T),T},v=this&&this.__param||function(_,g){return function(w,R){g(w,R,_)}};Object.defineProperty(c,"__esModule",{value:!0}),c.AccessibilityManager=void 0;const f=u(9042),C=u(9924),x=u(844),A=u(4725),E=u(2585),p=u(3656);let S=c.AccessibilityManager=class extends x.Disposable{constructor(_,g,w,R){super(),this._terminal=_,this._coreBrowserService=w,this._renderService=R,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 L=0;L<this._terminal.rows;L++)this._rowElements[L]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[L]);if(this._topBoundaryFocusListener=L=>this._handleBoundaryFocus(L,0),this._bottomBoundaryFocusListener=L=>this._handleBoundaryFocus(L,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 C.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((L=>this._handleResize(L.rows)))),this.register(this._terminal.onRender((L=>this._refreshRows(L.start,L.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((L=>this._handleChar(L)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
75
75
|
`)))),this.register(this._terminal.onA11yTab((L=>this._handleTab(L)))),this.register(this._terminal.onKey((L=>this._handleKey(L.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,p.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,x.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(_){for(let g=0;g<_;g++)this._handleChar(" ")}_handleChar(_){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==_&&(this._charsToAnnounce+=_):this._charsToAnnounce+=_,_===`
|
|
76
76
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=f.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(_){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(_)||this._charsToConsume.push(_)}_refreshRows(_,g){this._liveRegionDebouncer.refresh(_,g,this._terminal.rows)}_renderRows(_,g){const w=this._terminal.buffer,R=w.lines.length.toString();for(let L=_;L<=g;L++){const D=w.lines.get(w.ydisp+L),T=[],B=D?.translateToString(!0,void 0,void 0,T)||"",W=(w.ydisp+L+1).toString(),P=this._rowElements[L];P&&(B.length===0?(P.innerText=" ",this._rowColumns.set(P,[0,1])):(P.textContent=B,this._rowColumns.set(P,T)),P.setAttribute("aria-posinset",W),P.setAttribute("aria-setsize",R))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(_,g){const w=_.target,R=this._rowElements[g===0?1:this._rowElements.length-2];if(w.getAttribute("aria-posinset")===(g===0?"1":`${this._terminal.buffer.lines.length}`)||_.relatedTarget!==R)return;let L,D;if(g===0?(L=w,D=this._rowElements.pop(),this._rowContainer.removeChild(D)):(L=this._rowElements.shift(),D=w,this._rowContainer.removeChild(L)),L.removeEventListener("focus",this._topBoundaryFocusListener),D.removeEventListener("focus",this._bottomBoundaryFocusListener),g===0){const T=this._createAccessibilityTreeNode();this._rowElements.unshift(T),this._rowContainer.insertAdjacentElement("afterbegin",T)}else{const T=this._createAccessibilityTreeNode();this._rowElements.push(T),this._rowContainer.appendChild(T)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(g===0?-1:1),this._rowElements[g===0?1:this._rowElements.length-2].focus(),_.preventDefault(),_.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;const _=document.getSelection();if(!_)return;if(_.isCollapsed)return void(this._rowContainer.contains(_.anchorNode)&&this._terminal.clearSelection());if(!_.anchorNode||!_.focusNode)return void console.error("anchorNode and/or focusNode are null");let g={node:_.anchorNode,offset:_.anchorOffset},w={node:_.focusNode,offset:_.focusOffset};if((g.node.compareDocumentPosition(w.node)&Node.DOCUMENT_POSITION_PRECEDING||g.node===w.node&&g.offset>w.offset)&&([g,w]=[w,g]),g.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(g={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(g.node))return;const R=this._rowElements.slice(-1)[0];if(w.node.compareDocumentPosition(R)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(w={node:R,offset:R.textContent?.length??0}),!this._rowContainer.contains(w.node))return;const L=({node:B,offset:W})=>{const P=B instanceof Text?B.parentNode:B;let F=parseInt(P?.getAttribute("aria-posinset"),10)-1;if(isNaN(F))return console.warn("row is invalid. Race condition?"),null;const I=this._rowColumns.get(P);if(!I)return console.warn("columns is null. Race condition?"),null;let Z=W<I.length?I[W]:I.slice(-1)[0]+1;return Z>=this._terminal.cols&&(++F,Z=0),{row:F,column:Z}},D=L(g),T=L(w);if(D&&T){if(D.row>T.row||D.row===T.row&&D.column>=T.column)throw new Error("invalid range");this._terminal.select(D.column,D.row,(T.row-D.row)*this._terminal.cols-D.column+T.column)}}_handleResize(_){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let g=this._rowContainer.children.length;g<this._terminal.rows;g++)this._rowElements[g]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[g]);for(;this._rowElements.length>_;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const _=this._coreBrowserService.mainDocument.createElement("div");return _.setAttribute("role","listitem"),_.tabIndex=-1,this._refreshRowDimensions(_),_}_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 _=0;_<this._terminal.rows;_++)this._refreshRowDimensions(this._rowElements[_])}}_refreshRowDimensions(_){_.style.height=`${this._renderService.dimensions.css.cell.height}px`}};c.AccessibilityManager=S=h([v(1,E.IInstantiationService),v(2,A.ICoreBrowserService),v(3,A.IRenderService)],S)},3614:(b,c)=>{function u(C){return C.replace(/\r?\n/g,"\r")}function h(C,x){return x?"\x1B[200~"+C+"\x1B[201~":C}function v(C,x,A,E){C=h(C=u(C),A.decPrivateModes.bracketedPasteMode&&E.rawOptions.ignoreBracketedPasteMode!==!0),A.triggerDataEvent(C,!0),x.value=""}function f(C,x,A){const E=A.getBoundingClientRect(),p=C.clientX-E.left-10,S=C.clientY-E.top-10;x.style.width="20px",x.style.height="20px",x.style.left=`${p}px`,x.style.top=`${S}px`,x.style.zIndex="1000",x.focus()}Object.defineProperty(c,"__esModule",{value:!0}),c.rightClickHandler=c.moveTextAreaUnderMouseCursor=c.paste=c.handlePasteEvent=c.copyHandler=c.bracketTextForPaste=c.prepareTextForTerminal=void 0,c.prepareTextForTerminal=u,c.bracketTextForPaste=h,c.copyHandler=function(C,x){C.clipboardData&&C.clipboardData.setData("text/plain",x.selectionText),C.preventDefault()},c.handlePasteEvent=function(C,x,A,E){C.stopPropagation(),C.clipboardData&&v(C.clipboardData.getData("text/plain"),x,A,E)},c.paste=v,c.moveTextAreaUnderMouseCursor=f,c.rightClickHandler=function(C,x,A,E,p){f(C,x,A),p&&E.rightClickSelect(C),x.value=E.selectionText,x.select()}},7239:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ColorContrastCache=void 0;const h=u(1505);c.ColorContrastCache=class{constructor(){this._color=new h.TwoKeyMap,this._css=new h.TwoKeyMap}setCss(v,f,C){this._css.set(v,f,C)}getCss(v,f){return this._css.get(v,f)}setColor(v,f,C){this._color.set(v,f,C)}getColor(v,f){return this._color.get(v,f)}clear(){this._color.clear(),this._css.clear()}}},3656:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.addDisposableDomListener=void 0,c.addDisposableDomListener=function(u,h,v,f){u.addEventListener(h,v,f);let C=!1;return{dispose:()=>{C||(C=!0,u.removeEventListener(h,v,f))}}}},3551:function(b,c,u){var h=this&&this.__decorate||function(S,_,g,w){var R,L=arguments.length,D=L<3?_:w===null?w=Object.getOwnPropertyDescriptor(_,g):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(S,_,g,w);else for(var T=S.length-1;T>=0;T--)(R=S[T])&&(D=(L<3?R(D):L>3?R(_,g,D):R(_,g))||D);return L>3&&D&&Object.defineProperty(_,g,D),D},v=this&&this.__param||function(S,_){return function(g,w){_(g,w,S)}};Object.defineProperty(c,"__esModule",{value:!0}),c.Linkifier=void 0;const f=u(3656),C=u(8460),x=u(844),A=u(2585),E=u(4725);let p=c.Linkifier=class extends x.Disposable{get currentLink(){return this._currentLink}constructor(S,_,g,w,R){super(),this._element=S,this._mouseService=_,this._renderService=g,this._bufferService=w,this._linkProviderService=R,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new C.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new C.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,x.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,x.toDisposable)((()=>{this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,f.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,f.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(S){this._lastMouseEvent=S;const _=this._positionFromMouseEvent(S,this._element,this._mouseService);if(!_)return;this._isMouseOut=!1;const g=S.composedPath();for(let w=0;w<g.length;w++){const R=g[w];if(R.classList.contains("xterm"))break;if(R.classList.contains("xterm-hover"))return}this._lastBufferCell&&_.x===this._lastBufferCell.x&&_.y===this._lastBufferCell.y||(this._handleHover(_),this._lastBufferCell=_)}_handleHover(S){if(this._activeLine!==S.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(S,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,S)||(this._clearCurrentLink(),this._askForLink(S,!0))}_askForLink(S,_){this._activeProviderReplies&&_||(this._activeProviderReplies?.forEach((w=>{w?.forEach((R=>{R.link.dispose&&R.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=S.y);let g=!1;for(const[w,R]of this._linkProviderService.linkProviders.entries())_?this._activeProviderReplies?.get(w)&&(g=this._checkLinkProviderResult(w,S,g)):R.provideLinks(S.y,(L=>{if(this._isMouseOut)return;const D=L?.map((T=>({link:T})));this._activeProviderReplies?.set(w,D),g=this._checkLinkProviderResult(w,S,g),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(S.y,this._activeProviderReplies)}))}_removeIntersectingLinks(S,_){const g=new Set;for(let w=0;w<_.size;w++){const R=_.get(w);if(R)for(let L=0;L<R.length;L++){const D=R[L],T=D.link.range.start.y<S?0:D.link.range.start.x,B=D.link.range.end.y>S?this._bufferService.cols:D.link.range.end.x;for(let W=T;W<=B;W++){if(g.has(W)){R.splice(L--,1);break}g.add(W)}}}}_checkLinkProviderResult(S,_,g){if(!this._activeProviderReplies)return g;const w=this._activeProviderReplies.get(S);let R=!1;for(let L=0;L<S;L++)this._activeProviderReplies.has(L)&&!this._activeProviderReplies.get(L)||(R=!0);if(!R&&w){const L=w.find((D=>this._linkAtPosition(D.link,_)));L&&(g=!0,this._handleNewLink(L))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!g)for(let L=0;L<this._activeProviderReplies.size;L++){const D=this._activeProviderReplies.get(L)?.find((T=>this._linkAtPosition(T.link,_)));if(D){g=!0,this._handleNewLink(D);break}}return g}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(S){if(!this._currentLink)return;const _=this._positionFromMouseEvent(S,this._element,this._mouseService);_&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,_)&&this._currentLink.link.activate(S,this._currentLink.link.text)}_clearCurrentLink(S,_){this._currentLink&&this._lastMouseEvent&&(!S||!_||this._currentLink.link.range.start.y>=S&&this._currentLink.link.range.end.y<=_)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,x.disposeArray)(this._linkCacheDisposables))}_handleNewLink(S){if(!this._lastMouseEvent)return;const _=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);_&&this._linkAtPosition(S.link,_)&&(this._currentLink=S,this._currentLink.state={decorations:{underline:S.link.decorations===void 0||S.link.decorations.underline,pointerCursor:S.link.decorations===void 0||S.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,S.link,this._lastMouseEvent),S.link.decorations={},Object.defineProperties(S.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:g=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==g&&(this._currentLink.state.decorations.pointerCursor=g,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",g))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:g=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==g&&(this._currentLink.state.decorations.underline=g,this._currentLink.state.isHovered&&this._fireUnderlineEvent(S.link,g))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((g=>{if(!this._currentLink)return;const w=g.start===0?0:g.start+1+this._bufferService.buffer.ydisp,R=this._bufferService.buffer.ydisp+1+g.end;if(this._currentLink.link.range.start.y>=w&&this._currentLink.link.range.end.y<=R&&(this._clearCurrentLink(w,R),this._lastMouseEvent)){const L=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);L&&this._askForLink(L,!1)}}))))}_linkHover(S,_,g){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(_,!0),this._currentLink.state.decorations.pointerCursor&&S.classList.add("xterm-cursor-pointer")),_.hover&&_.hover(g,_.text)}_fireUnderlineEvent(S,_){const g=S.range,w=this._bufferService.buffer.ydisp,R=this._createLinkUnderlineEvent(g.start.x-1,g.start.y-w-1,g.end.x,g.end.y-w-1,void 0);(_?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(R)}_linkLeave(S,_,g){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(_,!1),this._currentLink.state.decorations.pointerCursor&&S.classList.remove("xterm-cursor-pointer")),_.leave&&_.leave(g,_.text)}_linkAtPosition(S,_){const g=S.range.start.y*this._bufferService.cols+S.range.start.x,w=S.range.end.y*this._bufferService.cols+S.range.end.x,R=_.y*this._bufferService.cols+_.x;return g<=R&&R<=w}_positionFromMouseEvent(S,_,g){const w=g.getCoords(S,_,this._bufferService.cols,this._bufferService.rows);if(w)return{x:w[0],y:w[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(S,_,g,w,R){return{x1:S,y1:_,x2:g,y2:w,cols:this._bufferService.cols,fg:R}}};c.Linkifier=p=h([v(1,E.IMouseService),v(2,E.IRenderService),v(3,A.IBufferService),v(4,E.ILinkProviderService)],p)},9042:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.tooMuchOutput=c.promptLabel=void 0,c.promptLabel="Terminal input",c.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(b,c,u){var h=this&&this.__decorate||function(E,p,S,_){var g,w=arguments.length,R=w<3?p:_===null?_=Object.getOwnPropertyDescriptor(p,S):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(E,p,S,_);else for(var L=E.length-1;L>=0;L--)(g=E[L])&&(R=(w<3?g(R):w>3?g(p,S,R):g(p,S))||R);return w>3&&R&&Object.defineProperty(p,S,R),R},v=this&&this.__param||function(E,p){return function(S,_){p(S,_,E)}};Object.defineProperty(c,"__esModule",{value:!0}),c.OscLinkProvider=void 0;const f=u(511),C=u(2585);let x=c.OscLinkProvider=class{constructor(E,p,S){this._bufferService=E,this._optionsService=p,this._oscLinkService=S}provideLinks(E,p){const S=this._bufferService.buffer.lines.get(E-1);if(!S)return void p(void 0);const _=[],g=this._optionsService.rawOptions.linkHandler,w=new f.CellData,R=S.getTrimmedLength();let L=-1,D=-1,T=!1;for(let B=0;B<R;B++)if(D!==-1||S.hasContent(B)){if(S.loadCell(B,w),w.hasExtendedAttrs()&&w.extended.urlId){if(D===-1){D=B,L=w.extended.urlId;continue}T=w.extended.urlId!==L}else D!==-1&&(T=!0);if(T||D!==-1&&B===R-1){const W=this._oscLinkService.getLinkData(L)?.uri;if(W){const P={start:{x:D+1,y:E},end:{x:B+(T||B!==R-1?0:1),y:E}};let F=!1;if(!g?.allowNonHttpProtocols)try{const I=new URL(W);["http:","https:"].includes(I.protocol)||(F=!0)}catch{F=!0}F||_.push({text:W,range:P,activate:(I,Z)=>g?g.activate(I,Z,P):A(0,Z),hover:(I,Z)=>g?.hover?.(I,Z,P),leave:(I,Z)=>g?.leave?.(I,Z,P)})}T=!1,w.hasExtendedAttrs()&&w.extended.urlId?(D=B,L=w.extended.urlId):(D=-1,L=-1)}}p(_)}};function A(E,p){if(confirm(`Do you want to navigate to ${p}?
|
|
77
77
|
|
|
78
|
-
WARNING: This link could potentially be dangerous`)){const S=window.open();if(S){try{S.opener=null}catch{}S.location.href=p}else console.warn("Opening link blocked as opener could not be cleared")}}c.OscLinkProvider=x=h([v(0,C.IBufferService),v(1,C.IOptionsService),v(2,C.IOscLinkService)],x)},6193:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.RenderDebouncer=void 0,c.RenderDebouncer=class{constructor(u,h){this._renderCallback=u,this._coreBrowserService=h,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(u){return this._refreshCallbacks.push(u),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(u,h,v){this._rowCount=v,u=u!==void 0?u:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,h):h,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 u=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,h),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const u of this._refreshCallbacks)u(0);this._refreshCallbacks=[]}}},3236:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Terminal=void 0;const h=u(3614),v=u(3656),f=u(3551),C=u(9042),x=u(3730),A=u(1680),E=u(3107),p=u(5744),S=u(2950),_=u(1296),g=u(428),w=u(4269),R=u(5114),L=u(8934),D=u(3230),T=u(9312),B=u(4725),W=u(6731),P=u(8055),F=u(8969),I=u(8460),Z=u(844),ee=u(6114),j=u(8437),Y=u(2584),K=u(7399),O=u(5941),H=u(9074),M=u(2585),U=u(5435),V=u(4567),ae=u(779);class ce extends F.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(Q={}){super(Q),this.browser=ee,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new Z.MutableDisposable),this._onCursorMove=this.register(new I.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new I.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new I.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new I.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new I.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new I.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new I.EventEmitter),this._onBlur=this.register(new I.EventEmitter),this._onA11yCharEmitter=this.register(new I.EventEmitter),this._onA11yTabEmitter=this.register(new I.EventEmitter),this._onWillOpen=this.register(new I.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(H.DecorationService),this._instantiationService.setService(M.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ae.LinkProviderService),this._instantiationService.setService(B.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(x.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows((($,oe)=>this.refresh($,oe)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport(($=>this._reportWindowsOptions($)))),this.register(this._inputHandler.onColor(($=>this._handleColorEvent($)))),this.register((0,I.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,I.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,I.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,I.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize(($=>this._afterResize($.cols,$.rows)))),this.register((0,Z.toDisposable)((()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)})))}_handleColorEvent(Q){if(this._themeService)for(const $ of Q){let oe,_e="";switch($.index){case 256:oe="foreground",_e="10";break;case 257:oe="background",_e="11";break;case 258:oe="cursor",_e="12";break;default:oe="ansi",_e="4;"+$.index}switch($.type){case 0:const Se=P.color.toColorRGB(oe==="ansi"?this._themeService.colors.ansi[$.index]:this._themeService.colors[oe]);this.coreService.triggerDataEvent(`${Y.C0.ESC}]${_e};${(0,O.toRgbString)(Se)}${Y.C1_ESCAPED.ST}`);break;case 1:if(oe==="ansi")this._themeService.modifyColors((be=>be.ansi[$.index]=P.channels.toColor(...$.color)));else{const be=oe;this._themeService.modifyColors(($e=>$e[be]=P.channels.toColor(...$.color)))}break;case 2:this._themeService.restoreColor($.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(Q){Q?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(V.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(Q){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Y.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.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 Q=this.buffer.ybase+this.buffer.y,$=this.buffer.lines.get(Q);if(!$)return;const oe=Math.min(this.buffer.x,this.cols-1),_e=this._renderService.dimensions.css.cell.height,Se=$.getWidth(oe),be=this._renderService.dimensions.css.cell.width*Se,$e=this.buffer.y*this._renderService.dimensions.css.cell.height,je=oe*this._renderService.dimensions.css.cell.width;this.textarea.style.left=je+"px",this.textarea.style.top=$e+"px",this.textarea.style.width=be+"px",this.textarea.style.height=_e+"px",this.textarea.style.lineHeight=_e+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,v.addDisposableDomListener)(this.element,"copy",($=>{this.hasSelection()&&(0,h.copyHandler)($,this._selectionService)})));const Q=$=>(0,h.handlePasteEvent)($,this.textarea,this.coreService,this.optionsService);this.register((0,v.addDisposableDomListener)(this.textarea,"paste",Q)),this.register((0,v.addDisposableDomListener)(this.element,"paste",Q)),ee.isFirefox?this.register((0,v.addDisposableDomListener)(this.element,"mousedown",($=>{$.button===2&&(0,h.rightClickHandler)($,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,v.addDisposableDomListener)(this.element,"contextmenu",($=>{(0,h.rightClickHandler)($,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),ee.isLinux&&this.register((0,v.addDisposableDomListener)(this.element,"auxclick",($=>{$.button===1&&(0,h.moveTextAreaUnderMouseCursor)($,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,v.addDisposableDomListener)(this.textarea,"keyup",(Q=>this._keyUp(Q)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keydown",(Q=>this._keyDown(Q)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keypress",(Q=>this._keyPress(Q)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionupdate",(Q=>this._compositionHelper.compositionupdate(Q)))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,v.addDisposableDomListener)(this.textarea,"input",(Q=>this._inputEvent(Q)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(Q){if(!Q)throw new Error("Terminal requires a parent element.");if(Q.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this.element?.ownerDocument.defaultView&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=Q.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"),Q.appendChild(this.element);const $=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),$.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",(oe=>this.updateCursorStyle(oe)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),$.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",C.promptLabel),ee.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(R.CoreBrowserService,this.textarea,Q.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(B.ICoreBrowserService,this._coreBrowserService),this.register((0,v.addDisposableDomListener)(this.textarea,"focus",(oe=>this._handleTextAreaFocus(oe)))),this.register((0,v.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(g.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(B.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(W.ThemeService),this._instantiationService.setService(B.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(w.CharacterJoinerService),this._instantiationService.setService(B.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(D.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(B.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((oe=>this._onRender.fire(oe)))),this.onResize((oe=>this._renderService.resize(oe.cols,oe.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(S.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(L.MouseService),this._instantiationService.setService(B.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(f.Linkifier,this.screenElement)),this.element.appendChild($);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(A.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((oe=>this.scrollLines(oe.amount,oe.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(T.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(B.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((oe=>this.scrollLines(oe.amount,oe.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((oe=>this._renderService.handleSelectionChanged(oe.start,oe.end,oe.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((oe=>{this.textarea.value=oe,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((oe=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,v.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(E.BufferDecorationRenderer,this.screenElement)),this.register((0,v.addDisposableDomListener)(this.element,"mousedown",(oe=>this._selectionService.handleMouseDown(oe)))),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(V.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(oe=>this._handleScreenReaderModeOptionChange(oe)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(p.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(oe=>{!this._overviewRulerRenderer&&oe&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(p.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(_.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const Q=this,$=this.element;function oe(be){const $e=Q._mouseService.getMouseReportCoords(be,Q.screenElement);if(!$e)return!1;let je,Ke;switch(be.overrideType||be.type){case"mousemove":Ke=32,be.buttons===void 0?(je=3,be.button!==void 0&&(je=be.button<3?be.button:3)):je=1&be.buttons?0:4&be.buttons?1:2&be.buttons?2:3;break;case"mouseup":Ke=0,je=be.button<3?be.button:3;break;case"mousedown":Ke=1,je=be.button<3?be.button:3;break;case"wheel":if(Q._customWheelEventHandler&&Q._customWheelEventHandler(be)===!1||Q.viewport.getLinesScrolled(be)===0)return!1;Ke=be.deltaY<0?0:1,je=4;break;default:return!1}return!(Ke===void 0||je===void 0||je>4)&&Q.coreMouseService.triggerMouseEvent({col:$e.col,row:$e.row,x:$e.x,y:$e.y,button:je,action:Ke,ctrl:be.ctrlKey,alt:be.altKey,shift:be.shiftKey})}const _e={mouseup:null,wheel:null,mousedrag:null,mousemove:null},Se={mouseup:be=>(oe(be),be.buttons||(this._document.removeEventListener("mouseup",_e.mouseup),_e.mousedrag&&this._document.removeEventListener("mousemove",_e.mousedrag)),this.cancel(be)),wheel:be=>(oe(be),this.cancel(be,!0)),mousedrag:be=>{be.buttons&&oe(be)},mousemove:be=>{be.buttons||oe(be)}};this.register(this.coreMouseService.onProtocolChange((be=>{be?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(be)),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&be?_e.mousemove||($.addEventListener("mousemove",Se.mousemove),_e.mousemove=Se.mousemove):($.removeEventListener("mousemove",_e.mousemove),_e.mousemove=null),16&be?_e.wheel||($.addEventListener("wheel",Se.wheel,{passive:!1}),_e.wheel=Se.wheel):($.removeEventListener("wheel",_e.wheel),_e.wheel=null),2&be?_e.mouseup||(_e.mouseup=Se.mouseup):(this._document.removeEventListener("mouseup",_e.mouseup),_e.mouseup=null),4&be?_e.mousedrag||(_e.mousedrag=Se.mousedrag):(this._document.removeEventListener("mousemove",_e.mousedrag),_e.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,v.addDisposableDomListener)($,"mousedown",(be=>{if(be.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(be))return oe(be),_e.mouseup&&this._document.addEventListener("mouseup",_e.mouseup),_e.mousedrag&&this._document.addEventListener("mousemove",_e.mousedrag),this.cancel(be)}))),this.register((0,v.addDisposableDomListener)($,"wheel",(be=>{if(!_e.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(be)===!1)return!1;if(!this.buffer.hasScrollback){const $e=this.viewport.getLinesScrolled(be);if($e===0)return;const je=Y.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(be.deltaY<0?"A":"B");let Ke="";for(let Ct=0;Ct<Math.abs($e);Ct++)Ke+=je;return this.coreService.triggerDataEvent(Ke,!0),this.cancel(be,!0)}return this.viewport.handleWheel(be)?this.cancel(be):void 0}}),{passive:!1})),this.register((0,v.addDisposableDomListener)($,"touchstart",(be=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(be),this.cancel(be)}),{passive:!0})),this.register((0,v.addDisposableDomListener)($,"touchmove",(be=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(be)?void 0:this.cancel(be)}),{passive:!1}))}refresh(Q,$){this._renderService?.refreshRows(Q,$)}updateCursorStyle(Q){this._selectionService?.shouldColumnSelect(Q)?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(Q,$,oe=0){oe===1?(super.scrollLines(Q,$,oe),this.refresh(0,this.rows-1)):this.viewport?.scrollLines(Q)}paste(Q){(0,h.paste)(Q,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(Q){this._customKeyEventHandler=Q}attachCustomWheelEventHandler(Q){this._customWheelEventHandler=Q}registerLinkProvider(Q){return this._linkProviderService.registerLinkProvider(Q)}registerCharacterJoiner(Q){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const $=this._characterJoinerService.register(Q);return this.refresh(0,this.rows-1),$}deregisterCharacterJoiner(Q){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(Q)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(Q){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+Q)}registerDecoration(Q){return this._decorationService.registerDecoration(Q)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(Q,$,oe){this._selectionService.setSelection(Q,$,oe)}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(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(Q,$){this._selectionService?.selectLines(Q,$)}_keyDown(Q){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(Q)===!1)return!1;const $=this.browser.isMac&&this.options.macOptionIsMeta&&Q.altKey;if(!$&&!this._compositionHelper.keydown(Q))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;$||Q.key!=="Dead"&&Q.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const oe=(0,K.evaluateKeyboardEvent)(Q,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(Q),oe.type===3||oe.type===2){const _e=this.rows-1;return this.scrollLines(oe.type===2?-_e:_e),this.cancel(Q,!0)}return oe.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,Q)||(oe.cancel&&this.cancel(Q,!0),!oe.key||!!(Q.key&&!Q.ctrlKey&&!Q.altKey&&!Q.metaKey&&Q.key.length===1&&Q.key.charCodeAt(0)>=65&&Q.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(oe.key!==Y.C0.ETX&&oe.key!==Y.C0.CR||(this.textarea.value=""),this._onKey.fire({key:oe.key,domEvent:Q}),this._showCursor(),this.coreService.triggerDataEvent(oe.key,!0),!this.optionsService.rawOptions.screenReaderMode||Q.altKey||Q.ctrlKey?this.cancel(Q,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(Q,$){const oe=Q.isMac&&!this.options.macOptionIsMeta&&$.altKey&&!$.ctrlKey&&!$.metaKey||Q.isWindows&&$.altKey&&$.ctrlKey&&!$.metaKey||Q.isWindows&&$.getModifierState("AltGraph");return $.type==="keypress"?oe:oe&&(!$.keyCode||$.keyCode>47)}_keyUp(Q){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(Q)===!1||((function($){return $.keyCode===16||$.keyCode===17||$.keyCode===18})(Q)||this.focus(),this.updateCursorStyle(Q),this._keyPressHandled=!1)}_keyPress(Q){let $;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(Q)===!1)return!1;if(this.cancel(Q),Q.charCode)$=Q.charCode;else if(Q.which===null||Q.which===void 0)$=Q.keyCode;else{if(Q.which===0||Q.charCode===0)return!1;$=Q.which}return!(!$||(Q.altKey||Q.ctrlKey||Q.metaKey)&&!this._isThirdLevelShift(this.browser,Q)||($=String.fromCharCode($),this._onKey.fire({key:$,domEvent:Q}),this._showCursor(),this.coreService.triggerDataEvent($,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(Q){if(Q.data&&Q.inputType==="insertText"&&(!Q.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const $=Q.data;return this.coreService.triggerDataEvent($,!0),this.cancel(Q),!0}return!1}resize(Q,$){Q!==this.cols||$!==this.rows?super.resize(Q,$):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(Q,$){this._charSizeService?.measure(),this.viewport?.syncScrollArea(!0)}clear(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let Q=1;Q<this.rows;Q++)this.buffer.lines.push(this.buffer.getBlankLine(j.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),this.viewport?.reset(),this.refresh(0,this.rows-1)}}reset(){this.options.rows=this.rows,this.options.cols=this.cols;const Q=this._customKeyEventHandler;this._setup(),super.reset(),this._selectionService?.reset(),this._decorationService.reset(),this.viewport?.reset(),this._customKeyEventHandler=Q,this.refresh(0,this.rows-1)}clearTextureAtlas(){this._renderService?.clearTextureAtlas()}_reportFocus(){this.element?.classList.contains("focus")?this.coreService.triggerDataEvent(Y.C0.ESC+"[I"):this.coreService.triggerDataEvent(Y.C0.ESC+"[O")}_reportWindowsOptions(Q){if(this._renderService)switch(Q){case U.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const $=this._renderService.dimensions.css.canvas.width.toFixed(0),oe=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${Y.C0.ESC}[4;${oe};${$}t`);break;case U.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const _e=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};${_e}t`)}}cancel(Q,$){if(this.options.cancelEvents||$)return Q.preventDefault(),Q.stopPropagation(),!1}}c.Terminal=ce},9924:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.TimeBasedDebouncer=void 0,c.TimeBasedDebouncer=class{constructor(u,h=1e3){this._renderCallback=u,this._debounceThresholdMS=h,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(u,h,v){this._rowCount=v,u=u!==void 0?u:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,h):h;const f=Date.now();if(f-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=f,this._innerRefresh();else if(!this._additionalRefreshRequested){const C=f-this._lastRefreshMs,x=this._debounceThresholdMS-C;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),x)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const u=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,h)}}},1680:function(b,c,u){var h=this&&this.__decorate||function(S,_,g,w){var R,L=arguments.length,D=L<3?_:w===null?w=Object.getOwnPropertyDescriptor(_,g):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(S,_,g,w);else for(var T=S.length-1;T>=0;T--)(R=S[T])&&(D=(L<3?R(D):L>3?R(_,g,D):R(_,g))||D);return L>3&&D&&Object.defineProperty(_,g,D),D},v=this&&this.__param||function(S,_){return function(g,w){_(g,w,S)}};Object.defineProperty(c,"__esModule",{value:!0}),c.Viewport=void 0;const f=u(3656),C=u(4725),x=u(8460),A=u(844),E=u(2585);let p=c.Viewport=class extends A.Disposable{constructor(S,_,g,w,R,L,D,T){super(),this._viewportElement=S,this._scrollArea=_,this._bufferService=g,this._optionsService=w,this._charSizeService=R,this._renderService=L,this._coreBrowserService=D,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 x.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,f.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((B=>this._activeBuffer=B.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((B=>this._renderDimensions=B))),this._handleThemeChange(T.colors),this.register(T.onChangeColors((B=>this._handleThemeChange(B)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(S){this._viewportElement.style.backgroundColor=S.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(S){if(S)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 _=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==_&&(this._lastRecordedBufferHeight=_,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const S=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==S&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=S),this._refreshAnimationFrame=null}syncScrollArea(S=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(S);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(S)}_handleScroll(S){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 _=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:_,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const S=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(S*(this._smoothScrollState.target-this._smoothScrollState.origin)),S<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(S,_){const g=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(_<0&&this._viewportElement.scrollTop!==0||_>0&&g<this._lastRecordedBufferHeight)||(S.cancelable&&S.preventDefault(),!1)}handleWheel(S){const _=this._getPixelsScrolled(S);return _!==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+_:this._smoothScrollState.target+=_,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=_,this._bubbleScroll(S,_))}scrollLines(S){if(S!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const _=S*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+_,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:S,suppressScrollEvent:!1})}_getPixelsScrolled(S){if(S.deltaY===0||S.shiftKey)return 0;let _=this._applyScrollModifier(S.deltaY,S);return S.deltaMode===WheelEvent.DOM_DELTA_LINE?_*=this._currentRowHeight:S.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(_*=this._currentRowHeight*this._bufferService.rows),_}getBufferElements(S,_){let g,w="";const R=[],L=_??this._bufferService.buffer.lines.length,D=this._bufferService.buffer.lines;for(let T=S;T<L;T++){const B=D.get(T);if(!B)continue;const W=D.get(T+1)?.isWrapped;if(w+=B.translateToString(!W),!W||T===D.length-1){const P=document.createElement("div");P.textContent=w,R.push(P),w.length>0&&(g=P),w=""}}return{bufferElements:R,cursorElement:g}}getLinesScrolled(S){if(S.deltaY===0||S.shiftKey)return 0;let _=this._applyScrollModifier(S.deltaY,S);return S.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(_/=this._currentRowHeight+0,this._wheelPartialScroll+=_,_=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):S.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(_*=this._bufferService.rows),_}_applyScrollModifier(S,_){const g=this._optionsService.rawOptions.fastScrollModifier;return g==="alt"&&_.altKey||g==="ctrl"&&_.ctrlKey||g==="shift"&&_.shiftKey?S*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:S*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(S){this._lastTouchY=S.touches[0].pageY}handleTouchMove(S){const _=this._lastTouchY-S.touches[0].pageY;return this._lastTouchY=S.touches[0].pageY,_!==0&&(this._viewportElement.scrollTop+=_,this._bubbleScroll(S,_))}};c.Viewport=p=h([v(2,E.IBufferService),v(3,E.IOptionsService),v(4,C.ICharSizeService),v(5,C.IRenderService),v(6,C.ICoreBrowserService),v(7,C.IThemeService)],p)},3107:function(b,c,u){var h=this&&this.__decorate||function(E,p,S,_){var g,w=arguments.length,R=w<3?p:_===null?_=Object.getOwnPropertyDescriptor(p,S):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(E,p,S,_);else for(var L=E.length-1;L>=0;L--)(g=E[L])&&(R=(w<3?g(R):w>3?g(p,S,R):g(p,S))||R);return w>3&&R&&Object.defineProperty(p,S,R),R},v=this&&this.__param||function(E,p){return function(S,_){p(S,_,E)}};Object.defineProperty(c,"__esModule",{value:!0}),c.BufferDecorationRenderer=void 0;const f=u(4725),C=u(844),x=u(2585);let A=c.BufferDecorationRenderer=class extends C.Disposable{constructor(E,p,S,_,g){super(),this._screenElement=E,this._bufferService=p,this._coreBrowserService=S,this._decorationService=_,this._renderService=g,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((w=>this._removeDecoration(w)))),this.register((0,C.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 E of this._decorationService.decorations)this._renderDecoration(E);this._dimensionsChanged=!1}_renderDecoration(E){this._refreshStyle(E),this._dimensionsChanged&&this._refreshXPosition(E)}_createElement(E){const p=this._coreBrowserService.mainDocument.createElement("div");p.classList.add("xterm-decoration"),p.classList.toggle("xterm-decoration-top-layer",E?.options?.layer==="top"),p.style.width=`${Math.round((E.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,p.style.height=(E.options.height||1)*this._renderService.dimensions.css.cell.height+"px",p.style.top=(E.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",p.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const S=E.options.x??0;return S&&S>this._bufferService.cols&&(p.style.display="none"),this._refreshXPosition(E,p),p}_refreshStyle(E){const p=E.marker.line-this._bufferService.buffers.active.ydisp;if(p<0||p>=this._bufferService.rows)E.element&&(E.element.style.display="none",E.onRenderEmitter.fire(E.element));else{let S=this._decorationElements.get(E);S||(S=this._createElement(E),E.element=S,this._decorationElements.set(E,S),this._container.appendChild(S),E.onDispose((()=>{this._decorationElements.delete(E),S.remove()}))),S.style.top=p*this._renderService.dimensions.css.cell.height+"px",S.style.display=this._altBufferIsActive?"none":"block",E.onRenderEmitter.fire(S)}}_refreshXPosition(E,p=E.element){if(!p)return;const S=E.options.x??0;(E.options.anchor||"left")==="right"?p.style.right=S?S*this._renderService.dimensions.css.cell.width+"px":"":p.style.left=S?S*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(E){this._decorationElements.get(E)?.remove(),this._decorationElements.delete(E),E.dispose()}};c.BufferDecorationRenderer=A=h([v(1,x.IBufferService),v(2,f.ICoreBrowserService),v(3,x.IDecorationService),v(4,f.IRenderService)],A)},5871:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ColorZoneStore=void 0,c.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(u){if(u.options.overviewRulerOptions){for(const h of this._zones)if(h.color===u.options.overviewRulerOptions.color&&h.position===u.options.overviewRulerOptions.position){if(this._lineIntersectsZone(h,u.marker.line))return;if(this._lineAdjacentToZone(h,u.marker.line,u.options.overviewRulerOptions.position))return void this._addLineToZone(h,u.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=u.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=u.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=u.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=u.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:u.options.overviewRulerOptions.color,position:u.options.overviewRulerOptions.position,startBufferLine:u.marker.line,endBufferLine:u.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(u){this._linePadding=u}_lineIntersectsZone(u,h){return h>=u.startBufferLine&&h<=u.endBufferLine}_lineAdjacentToZone(u,h,v){return h>=u.startBufferLine-this._linePadding[v||"full"]&&h<=u.endBufferLine+this._linePadding[v||"full"]}_addLineToZone(u,h){u.startBufferLine=Math.min(u.startBufferLine,h),u.endBufferLine=Math.max(u.endBufferLine,h)}}},5744:function(b,c,u){var h=this&&this.__decorate||function(g,w,R,L){var D,T=arguments.length,B=T<3?w:L===null?L=Object.getOwnPropertyDescriptor(w,R):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(g,w,R,L);else for(var W=g.length-1;W>=0;W--)(D=g[W])&&(B=(T<3?D(B):T>3?D(w,R,B):D(w,R))||B);return T>3&&B&&Object.defineProperty(w,R,B),B},v=this&&this.__param||function(g,w){return function(R,L){w(R,L,g)}};Object.defineProperty(c,"__esModule",{value:!0}),c.OverviewRulerRenderer=void 0;const f=u(5871),C=u(4725),x=u(844),A=u(2585),E={full:0,left:0,center:0,right:0},p={full:0,left:0,center:0,right:0},S={full:0,left:0,center:0,right:0};let _=c.OverviewRulerRenderer=class extends x.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(g,w,R,L,D,T,B){super(),this._viewportElement=g,this._screenElement=w,this._bufferService=R,this._decorationService=L,this._renderService=D,this._optionsService=T,this._coreBrowserService=B,this._colorZoneStore=new f.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(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement);const W=this._canvas.getContext("2d");if(!W)throw new Error("Ctx cannot be null");this._ctx=W,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,x.toDisposable)((()=>{this._canvas?.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 g=Math.floor(this._canvas.width/3),w=Math.ceil(this._canvas.width/3);p.full=this._canvas.width,p.left=g,p.center=w,p.right=g,this._refreshDrawHeightConstants(),S.full=0,S.left=0,S.center=p.left,S.right=p.left+p.center}_refreshDrawHeightConstants(){E.full=Math.round(2*this._coreBrowserService.dpr);const g=this._canvas.height/this._bufferService.buffer.lines.length,w=Math.round(Math.max(Math.min(g,12),6)*this._coreBrowserService.dpr);E.left=w,E.center=w,E.right=w}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*E.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*E.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*E.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*E.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 w of this._decorationService.decorations)this._colorZoneStore.addDecoration(w);this._ctx.lineWidth=1;const g=this._colorZoneStore.zones;for(const w of g)w.position!=="full"&&this._renderColorZone(w);for(const w of g)w.position==="full"&&this._renderColorZone(w);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(g){this._ctx.fillStyle=g.color,this._ctx.fillRect(S[g.position||"full"],Math.round((this._canvas.height-1)*(g.startBufferLine/this._bufferService.buffers.active.lines.length)-E[g.position||"full"]/2),p[g.position||"full"],Math.round((this._canvas.height-1)*((g.endBufferLine-g.startBufferLine)/this._bufferService.buffers.active.lines.length)+E[g.position||"full"]))}_queueRefresh(g,w){this._shouldUpdateDimensions=g||this._shouldUpdateDimensions,this._shouldUpdateAnchor=w||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};c.OverviewRulerRenderer=_=h([v(2,A.IBufferService),v(3,A.IDecorationService),v(4,C.IRenderService),v(5,A.IOptionsService),v(6,C.ICoreBrowserService)],_)},2950:function(b,c,u){var h=this&&this.__decorate||function(E,p,S,_){var g,w=arguments.length,R=w<3?p:_===null?_=Object.getOwnPropertyDescriptor(p,S):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(E,p,S,_);else for(var L=E.length-1;L>=0;L--)(g=E[L])&&(R=(w<3?g(R):w>3?g(p,S,R):g(p,S))||R);return w>3&&R&&Object.defineProperty(p,S,R),R},v=this&&this.__param||function(E,p){return function(S,_){p(S,_,E)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CompositionHelper=void 0;const f=u(4725),C=u(2585),x=u(2584);let A=c.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(E,p,S,_,g,w){this._textarea=E,this._compositionView=p,this._bufferService=S,this._optionsService=_,this._coreService=g,this._renderService=w,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(E){this._compositionView.textContent=E.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(E){if(this._isComposing||this._isSendingComposition){if(E.keyCode===229||E.keyCode===16||E.keyCode===17||E.keyCode===18)return!1;this._finalizeComposition(!1)}return E.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(E){if(this._compositionView.classList.remove("active"),this._isComposing=!1,E){const p={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let S;this._isSendingComposition=!1,p.start+=this._dataAlreadySent.length,S=this._isComposing?this._textarea.value.substring(p.start,p.end):this._textarea.value.substring(p.start),S.length>0&&this._coreService.triggerDataEvent(S,!0)}}),0)}else{this._isSendingComposition=!1;const p=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(p,!0)}}_handleAnyTextareaChanges(){const E=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const p=this._textarea.value,S=p.replace(E,"");this._dataAlreadySent=S,p.length>E.length?this._coreService.triggerDataEvent(S,!0):p.length<E.length?this._coreService.triggerDataEvent(`${x.C0.DEL}`,!0):p.length===E.length&&p!==E&&this._coreService.triggerDataEvent(p,!0)}}),0)}updateCompositionElements(E){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const p=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),S=this._renderService.dimensions.css.cell.height,_=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,g=p*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=g+"px",this._compositionView.style.top=_+"px",this._compositionView.style.height=S+"px",this._compositionView.style.lineHeight=S+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const w=this._compositionView.getBoundingClientRect();this._textarea.style.left=g+"px",this._textarea.style.top=_+"px",this._textarea.style.width=Math.max(w.width,1)+"px",this._textarea.style.height=Math.max(w.height,1)+"px",this._textarea.style.lineHeight=w.height+"px"}E||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};c.CompositionHelper=A=h([v(2,C.IBufferService),v(3,C.IOptionsService),v(4,C.ICoreService),v(5,f.IRenderService)],A)},9806:(b,c)=>{function u(h,v,f){const C=f.getBoundingClientRect(),x=h.getComputedStyle(f),A=parseInt(x.getPropertyValue("padding-left")),E=parseInt(x.getPropertyValue("padding-top"));return[v.clientX-C.left-A,v.clientY-C.top-E]}Object.defineProperty(c,"__esModule",{value:!0}),c.getCoords=c.getCoordsRelativeToElement=void 0,c.getCoordsRelativeToElement=u,c.getCoords=function(h,v,f,C,x,A,E,p,S){if(!A)return;const _=u(h,v,f);return _?(_[0]=Math.ceil((_[0]+(S?E/2:0))/E),_[1]=Math.ceil(_[1]/p),_[0]=Math.min(Math.max(_[0],1),C+(S?1:0)),_[1]=Math.min(Math.max(_[1],1),x),_):void 0}},9504:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.moveToCellSequence=void 0;const h=u(2584);function v(p,S,_,g){const w=p-f(p,_),R=S-f(S,_),L=Math.abs(w-R)-(function(D,T,B){let W=0;const P=D-f(D,B),F=T-f(T,B);for(let I=0;I<Math.abs(P-F);I++){const Z=C(D,T)==="A"?-1:1;B.buffer.lines.get(P+Z*I)?.isWrapped&&W++}return W})(p,S,_);return E(L,A(C(p,S),g))}function f(p,S){let _=0,g=S.buffer.lines.get(p),w=g?.isWrapped;for(;w&&p>=0&&p<S.rows;)_++,g=S.buffer.lines.get(--p),w=g?.isWrapped;return _}function C(p,S){return p>S?"A":"B"}function x(p,S,_,g,w,R){let L=p,D=S,T="";for(;L!==_||D!==g;)L+=w?1:-1,w&&L>R.cols-1?(T+=R.buffer.translateBufferLineToString(D,!1,p,L),L=0,p=0,D++):!w&&L<0&&(T+=R.buffer.translateBufferLineToString(D,!1,0,p+1),L=R.cols-1,p=L,D--);return T+R.buffer.translateBufferLineToString(D,!1,p,L)}function A(p,S){const _=S?"O":"[";return h.C0.ESC+_+p}function E(p,S){p=Math.floor(p);let _="";for(let g=0;g<p;g++)_+=S;return _}c.moveToCellSequence=function(p,S,_,g){const w=_.buffer.x,R=_.buffer.y;if(!_.buffer.hasScrollback)return(function(T,B,W,P,F,I){return v(B,P,F,I).length===0?"":E(x(T,B,T,B-f(B,F),!1,F).length,A("D",I))})(w,R,0,S,_,g)+v(R,S,_,g)+(function(T,B,W,P,F,I){let Z;Z=v(B,P,F,I).length>0?P-f(P,F):B;const ee=P,j=(function(Y,K,O,H,M,U){let V;return V=v(O,H,M,U).length>0?H-f(H,M):K,Y<O&&V<=H||Y>=O&&V<H?"C":"D"})(T,B,W,P,F,I);return E(x(T,Z,W,ee,j==="C",F).length,A(j,I))})(w,R,p,S,_,g);let L;if(R===S)return L=w>p?"D":"C",E(Math.abs(w-p),A(L,g));L=R>S?"D":"C";const D=Math.abs(R-S);return E((function(T,B){return B.cols-T})(R>S?p:w,_)+(D-1)*_.cols+1+((R>S?w:p)-1),A(L,g))}},1296:function(b,c,u){var h=this&&this.__decorate||function(I,Z,ee,j){var Y,K=arguments.length,O=K<3?Z:j===null?j=Object.getOwnPropertyDescriptor(Z,ee):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(I,Z,ee,j);else for(var H=I.length-1;H>=0;H--)(Y=I[H])&&(O=(K<3?Y(O):K>3?Y(Z,ee,O):Y(Z,ee))||O);return K>3&&O&&Object.defineProperty(Z,ee,O),O},v=this&&this.__param||function(I,Z){return function(ee,j){Z(ee,j,I)}};Object.defineProperty(c,"__esModule",{value:!0}),c.DomRenderer=void 0;const f=u(3787),C=u(2550),x=u(2223),A=u(6171),E=u(6052),p=u(4725),S=u(8055),_=u(8460),g=u(844),w=u(2585),R="xterm-dom-renderer-owner-",L="xterm-rows",D="xterm-fg-",T="xterm-bg-",B="xterm-focus",W="xterm-selection";let P=1,F=c.DomRenderer=class extends g.Disposable{constructor(I,Z,ee,j,Y,K,O,H,M,U,V,ae,ce){super(),this._terminal=I,this._document=Z,this._element=ee,this._screenElement=j,this._viewportElement=Y,this._helperContainer=K,this._linkifier2=O,this._charSizeService=M,this._optionsService=U,this._bufferService=V,this._coreBrowserService=ae,this._themeService=ce,this._terminalClass=P++,this._rowElements=[],this._selectionRenderModel=(0,E.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new _.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(L),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(W),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,A.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((me=>this._injectCss(me)))),this._injectCss(this._themeService.colors),this._rowFactory=H.createInstance(f.DomRendererRowFactory,document),this._element.classList.add(R+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((me=>this._handleLinkHover(me)))),this.register(this._linkifier2.onHideLinkUnderline((me=>this._handleLinkLeave(me)))),this.register((0,g.toDisposable)((()=>{this._element.classList.remove(R+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new C.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 I=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*I,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*I),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/I),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/I),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 ee of this._rowElements)ee.style.width=`${this.dimensions.css.canvas.width}px`,ee.style.height=`${this.dimensions.css.cell.height}px`,ee.style.lineHeight=`${this.dimensions.css.cell.height}px`,ee.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const Z=`${this._terminalSelector} .${L} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=Z,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(I){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let Z=`${this._terminalSelector} .${L} { color: ${I.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;Z+=`${this._terminalSelector} .${L} .xterm-dim { color: ${S.color.multiplyOpacity(I.foreground,.5).css};}`,Z+=`${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 ee=`blink_underline_${this._terminalClass}`,j=`blink_bar_${this._terminalClass}`,Y=`blink_block_${this._terminalClass}`;Z+=`@keyframes ${ee} { 50% { border-bottom-style: hidden; }}`,Z+=`@keyframes ${j} { 50% { box-shadow: none; }}`,Z+=`@keyframes ${Y} { 0% { background-color: ${I.cursor.css}; color: ${I.cursorAccent.css}; } 50% { background-color: inherit; color: ${I.cursor.css}; }}`,Z+=`${this._terminalSelector} .${L}.${B} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${ee} 1s step-end infinite;}${this._terminalSelector} .${L}.${B} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${j} 1s step-end infinite;}${this._terminalSelector} .${L}.${B} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Y} 1s step-end infinite;}${this._terminalSelector} .${L} .xterm-cursor.xterm-cursor-block { background-color: ${I.cursor.css}; color: ${I.cursorAccent.css};}${this._terminalSelector} .${L} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${I.cursor.css} !important; color: ${I.cursorAccent.css} !important;}${this._terminalSelector} .${L} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${I.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${L} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${I.cursor.css} inset;}${this._terminalSelector} .${L} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${I.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,Z+=`${this._terminalSelector} .${W} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${W} div { position: absolute; background-color: ${I.selectionBackgroundOpaque.css};}${this._terminalSelector} .${W} div { position: absolute; background-color: ${I.selectionInactiveBackgroundOpaque.css};}`;for(const[K,O]of I.ansi.entries())Z+=`${this._terminalSelector} .${D}${K} { color: ${O.css}; }${this._terminalSelector} .${D}${K}.xterm-dim { color: ${S.color.multiplyOpacity(O,.5).css}; }${this._terminalSelector} .${T}${K} { background-color: ${O.css}; }`;Z+=`${this._terminalSelector} .${D}${x.INVERTED_DEFAULT_COLOR} { color: ${S.color.opaque(I.background).css}; }${this._terminalSelector} .${D}${x.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${S.color.multiplyOpacity(S.color.opaque(I.background),.5).css}; }${this._terminalSelector} .${T}${x.INVERTED_DEFAULT_COLOR} { background-color: ${I.foreground.css}; }`,this._themeStyleElement.textContent=Z}_setDefaultSpacing(){const I=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${I}px`,this._rowFactory.defaultSpacing=I}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(I,Z){for(let ee=this._rowElements.length;ee<=Z;ee++){const j=this._document.createElement("div");this._rowContainer.appendChild(j),this._rowElements.push(j)}for(;this._rowElements.length>Z;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(I,Z){this._refreshRowElements(I,Z),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(B),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(B),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(I,Z,ee){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(I,Z,ee),this.renderRows(0,this._bufferService.rows-1),!I||!Z)return;this._selectionRenderModel.update(this._terminal,I,Z,ee);const j=this._selectionRenderModel.viewportStartRow,Y=this._selectionRenderModel.viewportEndRow,K=this._selectionRenderModel.viewportCappedStartRow,O=this._selectionRenderModel.viewportCappedEndRow;if(K>=this._bufferService.rows||O<0)return;const H=this._document.createDocumentFragment();if(ee){const M=I[0]>Z[0];H.appendChild(this._createSelectionElement(K,M?Z[0]:I[0],M?I[0]:Z[0],O-K+1))}else{const M=j===K?I[0]:0,U=K===Y?Z[0]:this._bufferService.cols;H.appendChild(this._createSelectionElement(K,M,U));const V=O-K-1;if(H.appendChild(this._createSelectionElement(K+1,0,this._bufferService.cols,V)),K!==O){const ae=Y===O?Z[0]:this._bufferService.cols;H.appendChild(this._createSelectionElement(O,0,ae))}}this._selectionContainer.appendChild(H)}_createSelectionElement(I,Z,ee,j=1){const Y=this._document.createElement("div"),K=Z*this.dimensions.css.cell.width;let O=this.dimensions.css.cell.width*(ee-Z);return K+O>this.dimensions.css.canvas.width&&(O=this.dimensions.css.canvas.width-K),Y.style.height=j*this.dimensions.css.cell.height+"px",Y.style.top=I*this.dimensions.css.cell.height+"px",Y.style.left=`${K}px`,Y.style.width=`${O}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 I of this._rowElements)I.replaceChildren()}renderRows(I,Z){const ee=this._bufferService.buffer,j=ee.ybase+ee.y,Y=Math.min(ee.x,this._bufferService.cols-1),K=this._optionsService.rawOptions.cursorBlink,O=this._optionsService.rawOptions.cursorStyle,H=this._optionsService.rawOptions.cursorInactiveStyle;for(let M=I;M<=Z;M++){const U=M+ee.ydisp,V=this._rowElements[M],ae=ee.lines.get(U);if(!V||!ae)break;V.replaceChildren(...this._rowFactory.createRow(ae,U,U===j,O,H,Y,K,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${R}${this._terminalClass}`}_handleLinkHover(I){this._setCellUnderline(I.x1,I.x2,I.y1,I.y2,I.cols,!0)}_handleLinkLeave(I){this._setCellUnderline(I.x1,I.x2,I.y1,I.y2,I.cols,!1)}_setCellUnderline(I,Z,ee,j,Y,K){ee<0&&(I=0),j<0&&(Z=0);const O=this._bufferService.rows-1;ee=Math.max(Math.min(ee,O),0),j=Math.max(Math.min(j,O),0),Y=Math.min(Y,this._bufferService.cols);const H=this._bufferService.buffer,M=H.ybase+H.y,U=Math.min(H.x,Y-1),V=this._optionsService.rawOptions.cursorBlink,ae=this._optionsService.rawOptions.cursorStyle,ce=this._optionsService.rawOptions.cursorInactiveStyle;for(let me=ee;me<=j;++me){const Q=me+H.ydisp,$=this._rowElements[me],oe=H.lines.get(Q);if(!$||!oe)break;$.replaceChildren(...this._rowFactory.createRow(oe,Q,Q===M,ae,ce,U,V,this.dimensions.css.cell.width,this._widthCache,K?me===ee?I:0:-1,K?(me===j?Z:Y)-1:-1))}}};c.DomRenderer=F=h([v(7,w.IInstantiationService),v(8,p.ICharSizeService),v(9,w.IOptionsService),v(10,w.IBufferService),v(11,p.ICoreBrowserService),v(12,p.IThemeService)],F)},3787:function(b,c,u){var h=this&&this.__decorate||function(L,D,T,B){var W,P=arguments.length,F=P<3?D:B===null?B=Object.getOwnPropertyDescriptor(D,T):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(L,D,T,B);else for(var I=L.length-1;I>=0;I--)(W=L[I])&&(F=(P<3?W(F):P>3?W(D,T,F):W(D,T))||F);return P>3&&F&&Object.defineProperty(D,T,F),F},v=this&&this.__param||function(L,D){return function(T,B){D(T,B,L)}};Object.defineProperty(c,"__esModule",{value:!0}),c.DomRendererRowFactory=void 0;const f=u(2223),C=u(643),x=u(511),A=u(2585),E=u(8055),p=u(4725),S=u(4269),_=u(6171),g=u(3734);let w=c.DomRendererRowFactory=class{constructor(L,D,T,B,W,P,F){this._document=L,this._characterJoinerService=D,this._optionsService=T,this._coreBrowserService=B,this._coreService=W,this._decorationService=P,this._themeService=F,this._workCell=new x.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(L,D,T){this._selectionStart=L,this._selectionEnd=D,this._columnSelectMode=T}createRow(L,D,T,B,W,P,F,I,Z,ee,j){const Y=[],K=this._characterJoinerService.getJoinedCharacters(D),O=this._themeService.colors;let H,M=L.getNoBgTrimmedLength();T&&M<P+1&&(M=P+1);let U=0,V="",ae=0,ce=0,me=0,Q=!1,$=0,oe=!1,_e=0;const Se=[],be=ee!==-1&&j!==-1;for(let $e=0;$e<M;$e++){L.loadCell($e,this._workCell);let je=this._workCell.getWidth();if(je===0)continue;let Ke=!1,Ct=$e,Be=this._workCell;if(K.length>0&&$e===K[0][0]){Ke=!0;const ut=K.shift();Be=new S.JoinedCellData(this._workCell,L.translateToString(!0,ut[0],ut[1]),ut[1]-ut[0]),Ct=ut[1]-1,je=Be.getWidth()}const Qt=this._isCellInSelection($e,D),gi=T&&$e===P,mi=be&&$e>=ee&&$e<=j;let un=!1;this._decorationService.forEachDecorationAtCell($e,D,void 0,(ut=>{un=!0}));let An=Be.getChars()||C.WHITESPACE_CELL_CHAR;if(An===" "&&(Be.isUnderline()||Be.isOverline())&&(An=" "),_e=je*I-Z.get(An,Be.isBold(),Be.isItalic()),H){if(U&&(Qt&&oe||!Qt&&!oe&&Be.bg===ae)&&(Qt&&oe&&O.selectionForeground||Be.fg===ce)&&Be.extended.ext===me&&mi===Q&&_e===$&&!gi&&!Ke&&!un){Be.isInvisible()?V+=C.WHITESPACE_CELL_CHAR:V+=An,U++;continue}U&&(H.textContent=V),H=this._document.createElement("span"),U=0,V=""}else H=this._document.createElement("span");if(ae=Be.bg,ce=Be.fg,me=Be.extended.ext,Q=mi,$=_e,oe=Qt,Ke&&P>=$e&&P<=Ct&&(P=$e),!this._coreService.isCursorHidden&&gi&&this._coreService.isCursorInitialized){if(Se.push("xterm-cursor"),this._coreBrowserService.isFocused)F&&Se.push("xterm-cursor-blink"),Se.push(B==="bar"?"xterm-cursor-bar":B==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(W)switch(W){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"),V=Be.isInvisible()?C.WHITESPACE_CELL_CHAR:Be.getChars()||C.WHITESPACE_CELL_CHAR,Be.isUnderline()&&(Se.push(`xterm-underline-${Be.extended.underlineStyle}`),V===" "&&(V=" "),!Be.isUnderlineColorDefault()))if(Be.isUnderlineColorRGB())H.style.textDecorationColor=`rgb(${g.AttributeData.toColorRGB(Be.getUnderlineColor()).join(",")})`;else{let ut=Be.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Be.isBold()&&ut<8&&(ut+=8),H.style.textDecorationColor=O.ansi[ut].css}Be.isOverline()&&(Se.push("xterm-overline"),V===" "&&(V=" ")),Be.isStrikethrough()&&Se.push("xterm-strikethrough"),mi&&(H.style.textDecoration="underline");let Jt=Be.getFgColor(),lt=Be.getFgColorMode(),Gt=Be.getBgColor(),It=Be.getBgColorMode();const Ht=!!Be.isInverse();if(Ht){const ut=Jt;Jt=Gt,Gt=ut;const Ii=lt;lt=It,It=Ii}let ei,Rn,Ti,Xi=!1;switch(this._decorationService.forEachDecorationAtCell($e,D,void 0,(ut=>{ut.options.layer!=="top"&&Xi||(ut.backgroundColorRGB&&(It=50331648,Gt=ut.backgroundColorRGB.rgba>>8&16777215,ei=ut.backgroundColorRGB),ut.foregroundColorRGB&&(lt=50331648,Jt=ut.foregroundColorRGB.rgba>>8&16777215,Rn=ut.foregroundColorRGB),Xi=ut.options.layer==="top")})),!Xi&&Qt&&(ei=this._coreBrowserService.isFocused?O.selectionBackgroundOpaque:O.selectionInactiveBackgroundOpaque,Gt=ei.rgba>>8&16777215,It=50331648,Xi=!0,O.selectionForeground&&(lt=50331648,Jt=O.selectionForeground.rgba>>8&16777215,Rn=O.selectionForeground)),Xi&&Se.push("xterm-decoration-top"),It){case 16777216:case 33554432:Ti=O.ansi[Gt],Se.push(`xterm-bg-${Gt}`);break;case 50331648:Ti=E.channels.toColor(Gt>>16,Gt>>8&255,255&Gt),this._addStyle(H,`background-color:#${R((Gt>>>0).toString(16),"0",6)}`);break;default:Ht?(Ti=O.foreground,Se.push(`xterm-bg-${f.INVERTED_DEFAULT_COLOR}`)):Ti=O.background}switch(ei||Be.isDim()&&(ei=E.color.multiplyOpacity(Ti,.5)),lt){case 16777216:case 33554432:Be.isBold()&&Jt<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Jt+=8),this._applyMinimumContrast(H,Ti,O.ansi[Jt],Be,ei,void 0)||Se.push(`xterm-fg-${Jt}`);break;case 50331648:const ut=E.channels.toColor(Jt>>16&255,Jt>>8&255,255&Jt);this._applyMinimumContrast(H,Ti,ut,Be,ei,Rn)||this._addStyle(H,`color:#${R(Jt.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(H,Ti,O.foreground,Be,ei,Rn)||Ht&&Se.push(`xterm-fg-${f.INVERTED_DEFAULT_COLOR}`)}Se.length&&(H.className=Se.join(" "),Se.length=0),gi||Ke||un?H.textContent=V:U++,_e!==this.defaultSpacing&&(H.style.letterSpacing=`${_e}px`),Y.push(H),$e=Ct}return H&&U&&(H.textContent=V),Y}_applyMinimumContrast(L,D,T,B,W,P){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,_.treatGlyphAsBackgroundColor)(B.getCode()))return!1;const F=this._getContrastCache(B);let I;if(W||P||(I=F.getColor(D.rgba,T.rgba)),I===void 0){const Z=this._optionsService.rawOptions.minimumContrastRatio/(B.isDim()?2:1);I=E.color.ensureContrastRatio(W||D,P||T,Z),F.setColor((W||D).rgba,(P||T).rgba,I??null)}return!!I&&(this._addStyle(L,`color:${I.css}`),!0)}_getContrastCache(L){return L.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(L,D){L.setAttribute("style",`${L.getAttribute("style")||""}${D};`)}_isCellInSelection(L,D){const T=this._selectionStart,B=this._selectionEnd;return!(!T||!B)&&(this._columnSelectMode?T[0]<=B[0]?L>=T[0]&&D>=T[1]&&L<B[0]&&D<=B[1]:L<T[0]&&D>=T[1]&&L>=B[0]&&D<=B[1]:D>T[1]&&D<B[1]||T[1]===B[1]&&D===T[1]&&L>=T[0]&&L<B[0]||T[1]<B[1]&&D===B[1]&&L<B[0]||T[1]<B[1]&&D===T[1]&&L>=T[0])}};function R(L,D,T){for(;L.length<T;)L=D+L;return L}c.DomRendererRowFactory=w=h([v(1,p.ICharacterJoinerService),v(2,A.IOptionsService),v(3,p.ICoreBrowserService),v(4,A.ICoreService),v(5,A.IDecorationService),v(6,p.IThemeService)],w)},2550:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.WidthCache=void 0,c.WidthCache=class{constructor(u,h){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=u.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=u.createElement("span");v.classList.add("xterm-char-measure-element");const f=u.createElement("span");f.classList.add("xterm-char-measure-element"),f.style.fontWeight="bold";const C=u.createElement("span");C.classList.add("xterm-char-measure-element"),C.style.fontStyle="italic";const x=u.createElement("span");x.classList.add("xterm-char-measure-element"),x.style.fontWeight="bold",x.style.fontStyle="italic",this._measureElements=[v,f,C,x],this._container.appendChild(v),this._container.appendChild(f),this._container.appendChild(C),this._container.appendChild(x),h.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(u,h,v,f){u===this._font&&h===this._fontSize&&v===this._weight&&f===this._weightBold||(this._font=u,this._fontSize=h,this._weight=v,this._weightBold=f,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${v}`,this._measureElements[1].style.fontWeight=`${f}`,this._measureElements[2].style.fontWeight=`${v}`,this._measureElements[3].style.fontWeight=`${f}`,this.clear())}get(u,h,v){let f=0;if(!h&&!v&&u.length===1&&(f=u.charCodeAt(0))<256){if(this._flat[f]!==-9999)return this._flat[f];const A=this._measure(u,0);return A>0&&(this._flat[f]=A),A}let C=u;h&&(C+="B"),v&&(C+="I");let x=this._holey.get(C);if(x===void 0){let A=0;h&&(A|=1),v&&(A|=2),x=this._measure(u,A),x>0&&this._holey.set(C,x)}return x}_measure(u,h){const v=this._measureElements[h];return v.textContent=u.repeat(32),v.offsetWidth/32}}},2223:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.TEXT_BASELINE=c.DIM_OPACITY=c.INVERTED_DEFAULT_COLOR=void 0;const h=u(6114);c.INVERTED_DEFAULT_COLOR=257,c.DIM_OPACITY=.5,c.TEXT_BASELINE=h.isFirefox||h.isLegacyEdge?"bottom":"ideographic"},6171:(b,c)=>{function u(v){return 57508<=v&&v<=57558}function h(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(c,"__esModule",{value:!0}),c.computeNextVariantOffset=c.createRenderDimensions=c.treatGlyphAsBackgroundColor=c.allowRescaling=c.isEmoji=c.isRestrictedPowerlineGlyph=c.isPowerlineGlyph=c.throwIfFalsy=void 0,c.throwIfFalsy=function(v){if(!v)throw new Error("value must not be falsy");return v},c.isPowerlineGlyph=u,c.isRestrictedPowerlineGlyph=function(v){return 57520<=v&&v<=57527},c.isEmoji=h,c.allowRescaling=function(v,f,C,x){return f===1&&C>Math.ceil(1.5*x)&&v!==void 0&&v>255&&!h(v)&&!u(v)&&!(function(A){return 57344<=A&&A<=63743})(v)},c.treatGlyphAsBackgroundColor=function(v){return u(v)||(function(f){return 9472<=f&&f<=9631})(v)},c.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}}}},c.computeNextVariantOffset=function(v,f,C=0){return(v-(2*Math.round(f)-C))%(2*Math.round(f))}},6052:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.createSelectionRenderModel=void 0;class u{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,f,C,x=!1){if(this.selectionStart=f,this.selectionEnd=C,!f||!C||f[0]===C[0]&&f[1]===C[1])return void this.clear();const A=v.buffers.active.ydisp,E=f[1]-A,p=C[1]-A,S=Math.max(E,0),_=Math.min(p,v.rows-1);S>=v.rows||_<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=x,this.viewportStartRow=E,this.viewportEndRow=p,this.viewportCappedStartRow=S,this.viewportCappedEndRow=_,this.startCol=f[0],this.endCol=C[0])}isCellSelected(v,f,C){return!!this.hasSelection&&(C-=v.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?f>=this.startCol&&C>=this.viewportCappedStartRow&&f<this.endCol&&C<=this.viewportCappedEndRow:f<this.startCol&&C>=this.viewportCappedStartRow&&f>=this.endCol&&C<=this.viewportCappedEndRow:C>this.viewportStartRow&&C<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&C===this.viewportStartRow&&f>=this.startCol&&f<this.endCol||this.viewportStartRow<this.viewportEndRow&&C===this.viewportEndRow&&f<this.endCol||this.viewportStartRow<this.viewportEndRow&&C===this.viewportStartRow&&f>=this.startCol)}}c.createSelectionRenderModel=function(){return new u}},456:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.SelectionModel=void 0,c.SelectionModel=class{constructor(u){this._bufferService=u,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 u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?u%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)-1]:[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[u,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[Math.max(u,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const u=this.selectionStart,h=this.selectionEnd;return!(!u||!h)&&(u[1]>h[1]||u[1]===h[1]&&u[0]>h[0])}handleTrim(u){return this.selectionStart&&(this.selectionStart[1]-=u),this.selectionEnd&&(this.selectionEnd[1]-=u),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(b,c,u){var h=this&&this.__decorate||function(_,g,w,R){var L,D=arguments.length,T=D<3?g:R===null?R=Object.getOwnPropertyDescriptor(g,w):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(_,g,w,R);else for(var B=_.length-1;B>=0;B--)(L=_[B])&&(T=(D<3?L(T):D>3?L(g,w,T):L(g,w))||T);return D>3&&T&&Object.defineProperty(g,w,T),T},v=this&&this.__param||function(_,g){return function(w,R){g(w,R,_)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CharSizeService=void 0;const f=u(2585),C=u(8460),x=u(844);let A=c.CharSizeService=class extends x.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(_,g,w){super(),this._optionsService=w,this.width=0,this.height=0,this._onCharSizeChange=this.register(new C.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new S(this._optionsService))}catch{this._measureStrategy=this.register(new p(_,g,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const _=this._measureStrategy.measure();_.width===this.width&&_.height===this.height||(this.width=_.width,this.height=_.height,this._onCharSizeChange.fire())}};c.CharSizeService=A=h([v(2,f.IOptionsService)],A);class E extends x.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(g,w){g!==void 0&&g>0&&w!==void 0&&w>0&&(this._result.width=g,this._result.height=w)}}class p extends E{constructor(g,w,R){super(),this._document=g,this._parentElement=w,this._optionsService=R,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 S extends E{constructor(g){super(),this._optionsService=g,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const w=this._ctx.measureText("W");if(!("width"in w&&"fontBoundingBoxAscent"in w&&"fontBoundingBoxDescent"in w))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const g=this._ctx.measureText("W");return this._validateAndSet(g.width,g.fontBoundingBoxAscent+g.fontBoundingBoxDescent),this._result}}},4269:function(b,c,u){var h=this&&this.__decorate||function(S,_,g,w){var R,L=arguments.length,D=L<3?_:w===null?w=Object.getOwnPropertyDescriptor(_,g):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(S,_,g,w);else for(var T=S.length-1;T>=0;T--)(R=S[T])&&(D=(L<3?R(D):L>3?R(_,g,D):R(_,g))||D);return L>3&&D&&Object.defineProperty(_,g,D),D},v=this&&this.__param||function(S,_){return function(g,w){_(g,w,S)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CharacterJoinerService=c.JoinedCellData=void 0;const f=u(3734),C=u(643),x=u(511),A=u(2585);class E extends f.AttributeData{constructor(_,g,w){super(),this.content=0,this.combinedData="",this.fg=_.fg,this.bg=_.bg,this.combinedData=g,this._width=w}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(_){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}c.JoinedCellData=E;let p=c.CharacterJoinerService=class Hb{constructor(_){this._bufferService=_,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new x.CellData}register(_){const g={id:this._nextCharacterJoinerId++,handler:_};return this._characterJoiners.push(g),g.id}deregister(_){for(let g=0;g<this._characterJoiners.length;g++)if(this._characterJoiners[g].id===_)return this._characterJoiners.splice(g,1),!0;return!1}getJoinedCharacters(_){if(this._characterJoiners.length===0)return[];const g=this._bufferService.buffer.lines.get(_);if(!g||g.length===0)return[];const w=[],R=g.translateToString(!0);let L=0,D=0,T=0,B=g.getFg(0),W=g.getBg(0);for(let P=0;P<g.getTrimmedLength();P++)if(g.loadCell(P,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==B||this._workCell.bg!==W){if(P-L>1){const F=this._getJoinedRanges(R,T,D,g,L);for(let I=0;I<F.length;I++)w.push(F[I])}L=P,T=D,B=this._workCell.fg,W=this._workCell.bg}D+=this._workCell.getChars().length||C.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-L>1){const P=this._getJoinedRanges(R,T,D,g,L);for(let F=0;F<P.length;F++)w.push(P[F])}return w}_getJoinedRanges(_,g,w,R,L){const D=_.substring(g,w);let T=[];try{T=this._characterJoiners[0].handler(D)}catch(B){console.error(B)}for(let B=1;B<this._characterJoiners.length;B++)try{const W=this._characterJoiners[B].handler(D);for(let P=0;P<W.length;P++)Hb._mergeRanges(T,W[P])}catch(W){console.error(W)}return this._stringRangesToCellRanges(T,R,L),T}_stringRangesToCellRanges(_,g,w){let R=0,L=!1,D=0,T=_[R];if(T){for(let B=w;B<this._bufferService.cols;B++){const W=g.getWidth(B),P=g.getString(B).length||C.WHITESPACE_CELL_CHAR.length;if(W!==0){if(!L&&T[0]<=D&&(T[0]=B,L=!0),T[1]<=D){if(T[1]=B,T=_[++R],!T)break;T[0]<=D?(T[0]=B,L=!0):L=!1}D+=P}}T&&(T[1]=this._bufferService.cols)}}static _mergeRanges(_,g){let w=!1;for(let R=0;R<_.length;R++){const L=_[R];if(w){if(g[1]<=L[0])return _[R-1][1]=g[1],_;if(g[1]<=L[1])return _[R-1][1]=Math.max(g[1],L[1]),_.splice(R,1),_;_.splice(R,1),R--}else{if(g[1]<=L[0])return _.splice(R,0,g),_;if(g[1]<=L[1])return L[0]=Math.min(g[0],L[0]),_;g[0]<L[1]&&(L[0]=Math.min(g[0],L[0]),w=!0)}}return w?_[_.length-1][1]=g[1]:_.push(g),_}};c.CharacterJoinerService=p=h([v(0,A.IBufferService)],p)},5114:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CoreBrowserService=void 0;const h=u(844),v=u(8460),f=u(3656);class C extends h.Disposable{constructor(E,p,S){super(),this._textarea=E,this._window=p,this.mainDocument=S,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new x(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((_=>this._screenDprMonitor.setWindow(_)))),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(E){this._window!==E&&(this._window=E,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}c.CoreBrowserService=C;class x extends h.Disposable{constructor(E){super(),this._parentWindow=E,this._windowResizeListener=this.register(new h.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,h.toDisposable)((()=>this.clearListener())))}setWindow(E){this._parentWindow=E,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,f.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.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:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.LinkProviderService=void 0;const h=u(844);class v extends h.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,h.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(C){return this.linkProviders.push(C),{dispose:()=>{const x=this.linkProviders.indexOf(C);x!==-1&&this.linkProviders.splice(x,1)}}}}c.LinkProviderService=v},8934:function(b,c,u){var h=this&&this.__decorate||function(A,E,p,S){var _,g=arguments.length,w=g<3?E:S===null?S=Object.getOwnPropertyDescriptor(E,p):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(A,E,p,S);else for(var R=A.length-1;R>=0;R--)(_=A[R])&&(w=(g<3?_(w):g>3?_(E,p,w):_(E,p))||w);return g>3&&w&&Object.defineProperty(E,p,w),w},v=this&&this.__param||function(A,E){return function(p,S){E(p,S,A)}};Object.defineProperty(c,"__esModule",{value:!0}),c.MouseService=void 0;const f=u(4725),C=u(9806);let x=c.MouseService=class{constructor(A,E){this._renderService=A,this._charSizeService=E}getCoords(A,E,p,S,_){return(0,C.getCoords)(window,A,E,p,S,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,_)}getMouseReportCoords(A,E){const p=(0,C.getCoordsRelativeToElement)(window,A,E);if(this._charSizeService.hasValidSize)return p[0]=Math.min(Math.max(p[0],0),this._renderService.dimensions.css.canvas.width-1),p[1]=Math.min(Math.max(p[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(p[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(p[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(p[0]),y:Math.floor(p[1])}}};c.MouseService=x=h([v(0,f.IRenderService),v(1,f.ICharSizeService)],x)},3230:function(b,c,u){var h=this&&this.__decorate||function(_,g,w,R){var L,D=arguments.length,T=D<3?g:R===null?R=Object.getOwnPropertyDescriptor(g,w):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(_,g,w,R);else for(var B=_.length-1;B>=0;B--)(L=_[B])&&(T=(D<3?L(T):D>3?L(g,w,T):L(g,w))||T);return D>3&&T&&Object.defineProperty(g,w,T),T},v=this&&this.__param||function(_,g){return function(w,R){g(w,R,_)}};Object.defineProperty(c,"__esModule",{value:!0}),c.RenderService=void 0;const f=u(6193),C=u(4725),x=u(8460),A=u(844),E=u(7226),p=u(2585);let S=c.RenderService=class extends A.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(_,g,w,R,L,D,T,B){super(),this._rowCount=_,this._charSizeService=R,this._renderer=this.register(new A.MutableDisposable),this._pausedResizeTask=new E.DebouncedIdleTask,this._observerDisposable=this.register(new A.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 x.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new x.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new x.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new x.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new f.RenderDebouncer(((W,P)=>this._renderRows(W,P)),T),this.register(this._renderDebouncer),this.register(T.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(D.onResize((()=>this._fullRefresh()))),this.register(D.buffers.onBufferActivate((()=>this._renderer.value?.clear()))),this.register(w.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(L.onDecorationRegistered((()=>this._fullRefresh()))),this.register(L.onDecorationRemoved((()=>this._fullRefresh()))),this.register(w.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(D.cols,D.rows),this._fullRefresh()}))),this.register(w.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(D.buffer.y,D.buffer.y,!0)))),this.register(B.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(T.window,g),this.register(T.onWindowChange((W=>this._registerIntersectionObserver(W,g))))}_registerIntersectionObserver(_,g){if("IntersectionObserver"in _){const w=new _.IntersectionObserver((R=>this._handleIntersectionChange(R[R.length-1])),{threshold:0});w.observe(g),this._observerDisposable.value=(0,A.toDisposable)((()=>w.disconnect()))}}_handleIntersectionChange(_){this._isPaused=_.isIntersecting===void 0?_.intersectionRatio===0:!_.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(_,g,w=!1){this._isPaused?this._needsFullRefresh=!0:(w||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(_,g,this._rowCount))}_renderRows(_,g){this._renderer.value&&(_=Math.min(_,this._rowCount-1),g=Math.min(g,this._rowCount-1),this._renderer.value.renderRows(_,g),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:_,end:g}),this._onRender.fire({start:_,end:g}),this._isNextRenderRedrawOnly=!0)}resize(_,g){this._rowCount=g,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(_){this._renderer.value=_,this._renderer.value&&(this._renderer.value.onRequestRedraw((g=>this.refreshRows(g.start,g.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(_){return this._renderDebouncer.addRefreshCallback(_)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(_,g){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>this._renderer.value?.handleResize(_,g))):this._renderer.value.handleResize(_,g),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(_,g,w){this._selectionState.start=_,this._selectionState.end=g,this._selectionState.columnSelectMode=w,this._renderer.value?.handleSelectionChanged(_,g,w)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};c.RenderService=S=h([v(2,p.IOptionsService),v(3,C.ICharSizeService),v(4,p.IDecorationService),v(5,p.IBufferService),v(6,C.ICoreBrowserService),v(7,C.IThemeService)],S)},9312:function(b,c,u){var h=this&&this.__decorate||function(T,B,W,P){var F,I=arguments.length,Z=I<3?B:P===null?P=Object.getOwnPropertyDescriptor(B,W):P;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Z=Reflect.decorate(T,B,W,P);else for(var ee=T.length-1;ee>=0;ee--)(F=T[ee])&&(Z=(I<3?F(Z):I>3?F(B,W,Z):F(B,W))||Z);return I>3&&Z&&Object.defineProperty(B,W,Z),Z},v=this&&this.__param||function(T,B){return function(W,P){B(W,P,T)}};Object.defineProperty(c,"__esModule",{value:!0}),c.SelectionService=void 0;const f=u(9806),C=u(9504),x=u(456),A=u(4725),E=u(8460),p=u(844),S=u(6114),_=u(4841),g=u(511),w=u(2585),R=" ",L=new RegExp(R,"g");let D=c.SelectionService=class extends p.Disposable{constructor(T,B,W,P,F,I,Z,ee,j){super(),this._element=T,this._screenElement=B,this._linkifier=W,this._bufferService=P,this._coreService=F,this._mouseService=I,this._optionsService=Z,this._renderService=ee,this._coreBrowserService=j,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new g.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new E.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new E.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new E.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new E.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 x.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,p.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 T=this._model.finalSelectionStart,B=this._model.finalSelectionEnd;return!(!T||!B||T[0]===B[0]&&T[1]===B[1])}get selectionText(){const T=this._model.finalSelectionStart,B=this._model.finalSelectionEnd;if(!T||!B)return"";const W=this._bufferService.buffer,P=[];if(this._activeSelectionMode===3){if(T[0]===B[0])return"";const F=T[0]<B[0]?T[0]:B[0],I=T[0]<B[0]?B[0]:T[0];for(let Z=T[1];Z<=B[1];Z++){const ee=W.translateBufferLineToString(Z,!0,F,I);P.push(ee)}}else{const F=T[1]===B[1]?B[0]:void 0;P.push(W.translateBufferLineToString(T[1],!0,T[0],F));for(let I=T[1]+1;I<=B[1]-1;I++){const Z=W.lines.get(I),ee=W.translateBufferLineToString(I,!0);Z?.isWrapped?P[P.length-1]+=ee:P.push(ee)}if(T[1]!==B[1]){const I=W.lines.get(B[1]),Z=W.translateBufferLineToString(B[1],!0,0,B[0]);I&&I.isWrapped?P[P.length-1]+=Z:P.push(Z)}}return P.map((F=>F.replace(L," "))).join(S.isWindows?`\r
|
|
78
|
+
WARNING: This link could potentially be dangerous`)){const S=window.open();if(S){try{S.opener=null}catch{}S.location.href=p}else console.warn("Opening link blocked as opener could not be cleared")}}c.OscLinkProvider=x=h([v(0,C.IBufferService),v(1,C.IOptionsService),v(2,C.IOscLinkService)],x)},6193:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.RenderDebouncer=void 0,c.RenderDebouncer=class{constructor(u,h){this._renderCallback=u,this._coreBrowserService=h,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(u){return this._refreshCallbacks.push(u),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(u,h,v){this._rowCount=v,u=u!==void 0?u:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,h):h,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 u=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,h),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const u of this._refreshCallbacks)u(0);this._refreshCallbacks=[]}}},3236:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Terminal=void 0;const h=u(3614),v=u(3656),f=u(3551),C=u(9042),x=u(3730),A=u(1680),E=u(3107),p=u(5744),S=u(2950),_=u(1296),g=u(428),w=u(4269),R=u(5114),L=u(8934),D=u(3230),T=u(9312),B=u(4725),W=u(6731),P=u(8055),F=u(8969),I=u(8460),Z=u(844),ee=u(6114),j=u(8437),Y=u(2584),K=u(7399),O=u(5941),H=u(9074),M=u(2585),U=u(5435),V=u(4567),ae=u(779);class ce extends F.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(Q={}){super(Q),this.browser=ee,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new Z.MutableDisposable),this._onCursorMove=this.register(new I.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new I.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new I.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new I.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new I.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new I.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new I.EventEmitter),this._onBlur=this.register(new I.EventEmitter),this._onA11yCharEmitter=this.register(new I.EventEmitter),this._onA11yTabEmitter=this.register(new I.EventEmitter),this._onWillOpen=this.register(new I.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(H.DecorationService),this._instantiationService.setService(M.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ae.LinkProviderService),this._instantiationService.setService(B.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(x.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows((($,oe)=>this.refresh($,oe)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport(($=>this._reportWindowsOptions($)))),this.register(this._inputHandler.onColor(($=>this._handleColorEvent($)))),this.register((0,I.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,I.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,I.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,I.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize(($=>this._afterResize($.cols,$.rows)))),this.register((0,Z.toDisposable)((()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)})))}_handleColorEvent(Q){if(this._themeService)for(const $ of Q){let oe,_e="";switch($.index){case 256:oe="foreground",_e="10";break;case 257:oe="background",_e="11";break;case 258:oe="cursor",_e="12";break;default:oe="ansi",_e="4;"+$.index}switch($.type){case 0:const Se=P.color.toColorRGB(oe==="ansi"?this._themeService.colors.ansi[$.index]:this._themeService.colors[oe]);this.coreService.triggerDataEvent(`${Y.C0.ESC}]${_e};${(0,O.toRgbString)(Se)}${Y.C1_ESCAPED.ST}`);break;case 1:if(oe==="ansi")this._themeService.modifyColors((be=>be.ansi[$.index]=P.channels.toColor(...$.color)));else{const be=oe;this._themeService.modifyColors(($e=>$e[be]=P.channels.toColor(...$.color)))}break;case 2:this._themeService.restoreColor($.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(Q){Q?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(V.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(Q){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Y.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.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 Q=this.buffer.ybase+this.buffer.y,$=this.buffer.lines.get(Q);if(!$)return;const oe=Math.min(this.buffer.x,this.cols-1),_e=this._renderService.dimensions.css.cell.height,Se=$.getWidth(oe),be=this._renderService.dimensions.css.cell.width*Se,$e=this.buffer.y*this._renderService.dimensions.css.cell.height,je=oe*this._renderService.dimensions.css.cell.width;this.textarea.style.left=je+"px",this.textarea.style.top=$e+"px",this.textarea.style.width=be+"px",this.textarea.style.height=_e+"px",this.textarea.style.lineHeight=_e+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,v.addDisposableDomListener)(this.element,"copy",($=>{this.hasSelection()&&(0,h.copyHandler)($,this._selectionService)})));const Q=$=>(0,h.handlePasteEvent)($,this.textarea,this.coreService,this.optionsService);this.register((0,v.addDisposableDomListener)(this.textarea,"paste",Q)),this.register((0,v.addDisposableDomListener)(this.element,"paste",Q)),ee.isFirefox?this.register((0,v.addDisposableDomListener)(this.element,"mousedown",($=>{$.button===2&&(0,h.rightClickHandler)($,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,v.addDisposableDomListener)(this.element,"contextmenu",($=>{(0,h.rightClickHandler)($,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),ee.isLinux&&this.register((0,v.addDisposableDomListener)(this.element,"auxclick",($=>{$.button===1&&(0,h.moveTextAreaUnderMouseCursor)($,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,v.addDisposableDomListener)(this.textarea,"keyup",(Q=>this._keyUp(Q)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keydown",(Q=>this._keyDown(Q)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keypress",(Q=>this._keyPress(Q)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionupdate",(Q=>this._compositionHelper.compositionupdate(Q)))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,v.addDisposableDomListener)(this.textarea,"input",(Q=>this._inputEvent(Q)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(Q){if(!Q)throw new Error("Terminal requires a parent element.");if(Q.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this.element?.ownerDocument.defaultView&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=Q.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"),Q.appendChild(this.element);const $=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),$.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",(oe=>this.updateCursorStyle(oe)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),$.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",C.promptLabel),ee.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(R.CoreBrowserService,this.textarea,Q.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(B.ICoreBrowserService,this._coreBrowserService),this.register((0,v.addDisposableDomListener)(this.textarea,"focus",(oe=>this._handleTextAreaFocus(oe)))),this.register((0,v.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(g.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(B.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(W.ThemeService),this._instantiationService.setService(B.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(w.CharacterJoinerService),this._instantiationService.setService(B.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(D.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(B.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((oe=>this._onRender.fire(oe)))),this.onResize((oe=>this._renderService.resize(oe.cols,oe.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(S.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(L.MouseService),this._instantiationService.setService(B.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(f.Linkifier,this.screenElement)),this.element.appendChild($);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(A.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((oe=>this.scrollLines(oe.amount,oe.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(T.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(B.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((oe=>this.scrollLines(oe.amount,oe.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((oe=>this._renderService.handleSelectionChanged(oe.start,oe.end,oe.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((oe=>{this.textarea.value=oe,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((oe=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,v.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(E.BufferDecorationRenderer,this.screenElement)),this.register((0,v.addDisposableDomListener)(this.element,"mousedown",(oe=>this._selectionService.handleMouseDown(oe)))),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(V.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(oe=>this._handleScreenReaderModeOptionChange(oe)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(p.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(oe=>{!this._overviewRulerRenderer&&oe&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(p.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(_.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const Q=this,$=this.element;function oe(be){const $e=Q._mouseService.getMouseReportCoords(be,Q.screenElement);if(!$e)return!1;let je,Ke;switch(be.overrideType||be.type){case"mousemove":Ke=32,be.buttons===void 0?(je=3,be.button!==void 0&&(je=be.button<3?be.button:3)):je=1&be.buttons?0:4&be.buttons?1:2&be.buttons?2:3;break;case"mouseup":Ke=0,je=be.button<3?be.button:3;break;case"mousedown":Ke=1,je=be.button<3?be.button:3;break;case"wheel":if(Q._customWheelEventHandler&&Q._customWheelEventHandler(be)===!1||Q.viewport.getLinesScrolled(be)===0)return!1;Ke=be.deltaY<0?0:1,je=4;break;default:return!1}return!(Ke===void 0||je===void 0||je>4)&&Q.coreMouseService.triggerMouseEvent({col:$e.col,row:$e.row,x:$e.x,y:$e.y,button:je,action:Ke,ctrl:be.ctrlKey,alt:be.altKey,shift:be.shiftKey})}const _e={mouseup:null,wheel:null,mousedrag:null,mousemove:null},Se={mouseup:be=>(oe(be),be.buttons||(this._document.removeEventListener("mouseup",_e.mouseup),_e.mousedrag&&this._document.removeEventListener("mousemove",_e.mousedrag)),this.cancel(be)),wheel:be=>(oe(be),this.cancel(be,!0)),mousedrag:be=>{be.buttons&&oe(be)},mousemove:be=>{be.buttons||oe(be)}};this.register(this.coreMouseService.onProtocolChange((be=>{be?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(be)),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&be?_e.mousemove||($.addEventListener("mousemove",Se.mousemove),_e.mousemove=Se.mousemove):($.removeEventListener("mousemove",_e.mousemove),_e.mousemove=null),16&be?_e.wheel||($.addEventListener("wheel",Se.wheel,{passive:!1}),_e.wheel=Se.wheel):($.removeEventListener("wheel",_e.wheel),_e.wheel=null),2&be?_e.mouseup||(_e.mouseup=Se.mouseup):(this._document.removeEventListener("mouseup",_e.mouseup),_e.mouseup=null),4&be?_e.mousedrag||(_e.mousedrag=Se.mousedrag):(this._document.removeEventListener("mousemove",_e.mousedrag),_e.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,v.addDisposableDomListener)($,"mousedown",(be=>{if(be.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(be))return oe(be),_e.mouseup&&this._document.addEventListener("mouseup",_e.mouseup),_e.mousedrag&&this._document.addEventListener("mousemove",_e.mousedrag),this.cancel(be)}))),this.register((0,v.addDisposableDomListener)($,"wheel",(be=>{if(!_e.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(be)===!1)return!1;if(!this.buffer.hasScrollback){const $e=this.viewport.getLinesScrolled(be);if($e===0)return;const je=Y.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(be.deltaY<0?"A":"B");let Ke="";for(let Ct=0;Ct<Math.abs($e);Ct++)Ke+=je;return this.coreService.triggerDataEvent(Ke,!0),this.cancel(be,!0)}return this.viewport.handleWheel(be)?this.cancel(be):void 0}}),{passive:!1})),this.register((0,v.addDisposableDomListener)($,"touchstart",(be=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(be),this.cancel(be)}),{passive:!0})),this.register((0,v.addDisposableDomListener)($,"touchmove",(be=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(be)?void 0:this.cancel(be)}),{passive:!1}))}refresh(Q,$){this._renderService?.refreshRows(Q,$)}updateCursorStyle(Q){this._selectionService?.shouldColumnSelect(Q)?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(Q,$,oe=0){oe===1?(super.scrollLines(Q,$,oe),this.refresh(0,this.rows-1)):this.viewport?.scrollLines(Q)}paste(Q){(0,h.paste)(Q,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(Q){this._customKeyEventHandler=Q}attachCustomWheelEventHandler(Q){this._customWheelEventHandler=Q}registerLinkProvider(Q){return this._linkProviderService.registerLinkProvider(Q)}registerCharacterJoiner(Q){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const $=this._characterJoinerService.register(Q);return this.refresh(0,this.rows-1),$}deregisterCharacterJoiner(Q){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(Q)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(Q){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+Q)}registerDecoration(Q){return this._decorationService.registerDecoration(Q)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(Q,$,oe){this._selectionService.setSelection(Q,$,oe)}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(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(Q,$){this._selectionService?.selectLines(Q,$)}_keyDown(Q){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(Q)===!1)return!1;const $=this.browser.isMac&&this.options.macOptionIsMeta&&Q.altKey;if(!$&&!this._compositionHelper.keydown(Q))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;$||Q.key!=="Dead"&&Q.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const oe=(0,K.evaluateKeyboardEvent)(Q,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(Q),oe.type===3||oe.type===2){const _e=this.rows-1;return this.scrollLines(oe.type===2?-_e:_e),this.cancel(Q,!0)}return oe.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,Q)||(oe.cancel&&this.cancel(Q,!0),!oe.key||!!(Q.key&&!Q.ctrlKey&&!Q.altKey&&!Q.metaKey&&Q.key.length===1&&Q.key.charCodeAt(0)>=65&&Q.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(oe.key!==Y.C0.ETX&&oe.key!==Y.C0.CR||(this.textarea.value=""),this._onKey.fire({key:oe.key,domEvent:Q}),this._showCursor(),this.coreService.triggerDataEvent(oe.key,!0),!this.optionsService.rawOptions.screenReaderMode||Q.altKey||Q.ctrlKey?this.cancel(Q,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(Q,$){const oe=Q.isMac&&!this.options.macOptionIsMeta&&$.altKey&&!$.ctrlKey&&!$.metaKey||Q.isWindows&&$.altKey&&$.ctrlKey&&!$.metaKey||Q.isWindows&&$.getModifierState("AltGraph");return $.type==="keypress"?oe:oe&&(!$.keyCode||$.keyCode>47)}_keyUp(Q){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(Q)===!1||((function($){return $.keyCode===16||$.keyCode===17||$.keyCode===18})(Q)||this.focus(),this.updateCursorStyle(Q),this._keyPressHandled=!1)}_keyPress(Q){let $;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(Q)===!1)return!1;if(this.cancel(Q),Q.charCode)$=Q.charCode;else if(Q.which===null||Q.which===void 0)$=Q.keyCode;else{if(Q.which===0||Q.charCode===0)return!1;$=Q.which}return!(!$||(Q.altKey||Q.ctrlKey||Q.metaKey)&&!this._isThirdLevelShift(this.browser,Q)||($=String.fromCharCode($),this._onKey.fire({key:$,domEvent:Q}),this._showCursor(),this.coreService.triggerDataEvent($,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(Q){if(Q.data&&Q.inputType==="insertText"&&(!Q.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const $=Q.data;return this.coreService.triggerDataEvent($,!0),this.cancel(Q),!0}return!1}resize(Q,$){Q!==this.cols||$!==this.rows?super.resize(Q,$):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(Q,$){this._charSizeService?.measure(),this.viewport?.syncScrollArea(!0)}clear(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let Q=1;Q<this.rows;Q++)this.buffer.lines.push(this.buffer.getBlankLine(j.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),this.viewport?.reset(),this.refresh(0,this.rows-1)}}reset(){this.options.rows=this.rows,this.options.cols=this.cols;const Q=this._customKeyEventHandler;this._setup(),super.reset(),this._selectionService?.reset(),this._decorationService.reset(),this.viewport?.reset(),this._customKeyEventHandler=Q,this.refresh(0,this.rows-1)}clearTextureAtlas(){this._renderService?.clearTextureAtlas()}_reportFocus(){this.element?.classList.contains("focus")?this.coreService.triggerDataEvent(Y.C0.ESC+"[I"):this.coreService.triggerDataEvent(Y.C0.ESC+"[O")}_reportWindowsOptions(Q){if(this._renderService)switch(Q){case U.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const $=this._renderService.dimensions.css.canvas.width.toFixed(0),oe=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${Y.C0.ESC}[4;${oe};${$}t`);break;case U.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const _e=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};${_e}t`)}}cancel(Q,$){if(this.options.cancelEvents||$)return Q.preventDefault(),Q.stopPropagation(),!1}}c.Terminal=ce},9924:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.TimeBasedDebouncer=void 0,c.TimeBasedDebouncer=class{constructor(u,h=1e3){this._renderCallback=u,this._debounceThresholdMS=h,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(u,h,v){this._rowCount=v,u=u!==void 0?u:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,h):h;const f=Date.now();if(f-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=f,this._innerRefresh();else if(!this._additionalRefreshRequested){const C=f-this._lastRefreshMs,x=this._debounceThresholdMS-C;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),x)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const u=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,h)}}},1680:function(b,c,u){var h=this&&this.__decorate||function(S,_,g,w){var R,L=arguments.length,D=L<3?_:w===null?w=Object.getOwnPropertyDescriptor(_,g):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(S,_,g,w);else for(var T=S.length-1;T>=0;T--)(R=S[T])&&(D=(L<3?R(D):L>3?R(_,g,D):R(_,g))||D);return L>3&&D&&Object.defineProperty(_,g,D),D},v=this&&this.__param||function(S,_){return function(g,w){_(g,w,S)}};Object.defineProperty(c,"__esModule",{value:!0}),c.Viewport=void 0;const f=u(3656),C=u(4725),x=u(8460),A=u(844),E=u(2585);let p=c.Viewport=class extends A.Disposable{constructor(S,_,g,w,R,L,D,T){super(),this._viewportElement=S,this._scrollArea=_,this._bufferService=g,this._optionsService=w,this._charSizeService=R,this._renderService=L,this._coreBrowserService=D,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 x.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,f.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((B=>this._activeBuffer=B.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((B=>this._renderDimensions=B))),this._handleThemeChange(T.colors),this.register(T.onChangeColors((B=>this._handleThemeChange(B)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(S){this._viewportElement.style.backgroundColor=S.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(S){if(S)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 _=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==_&&(this._lastRecordedBufferHeight=_,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const S=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==S&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=S),this._refreshAnimationFrame=null}syncScrollArea(S=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(S);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(S)}_handleScroll(S){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 _=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:_,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const S=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(S*(this._smoothScrollState.target-this._smoothScrollState.origin)),S<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(S,_){const g=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(_<0&&this._viewportElement.scrollTop!==0||_>0&&g<this._lastRecordedBufferHeight)||(S.cancelable&&S.preventDefault(),!1)}handleWheel(S){const _=this._getPixelsScrolled(S);return _!==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+_:this._smoothScrollState.target+=_,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=_,this._bubbleScroll(S,_))}scrollLines(S){if(S!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const _=S*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+_,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:S,suppressScrollEvent:!1})}_getPixelsScrolled(S){if(S.deltaY===0||S.shiftKey)return 0;let _=this._applyScrollModifier(S.deltaY,S);return S.deltaMode===WheelEvent.DOM_DELTA_LINE?_*=this._currentRowHeight:S.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(_*=this._currentRowHeight*this._bufferService.rows),_}getBufferElements(S,_){let g,w="";const R=[],L=_??this._bufferService.buffer.lines.length,D=this._bufferService.buffer.lines;for(let T=S;T<L;T++){const B=D.get(T);if(!B)continue;const W=D.get(T+1)?.isWrapped;if(w+=B.translateToString(!W),!W||T===D.length-1){const P=document.createElement("div");P.textContent=w,R.push(P),w.length>0&&(g=P),w=""}}return{bufferElements:R,cursorElement:g}}getLinesScrolled(S){if(S.deltaY===0||S.shiftKey)return 0;let _=this._applyScrollModifier(S.deltaY,S);return S.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(_/=this._currentRowHeight+0,this._wheelPartialScroll+=_,_=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):S.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(_*=this._bufferService.rows),_}_applyScrollModifier(S,_){const g=this._optionsService.rawOptions.fastScrollModifier;return g==="alt"&&_.altKey||g==="ctrl"&&_.ctrlKey||g==="shift"&&_.shiftKey?S*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:S*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(S){this._lastTouchY=S.touches[0].pageY}handleTouchMove(S){const _=this._lastTouchY-S.touches[0].pageY;return this._lastTouchY=S.touches[0].pageY,_!==0&&(this._viewportElement.scrollTop+=_,this._bubbleScroll(S,_))}};c.Viewport=p=h([v(2,E.IBufferService),v(3,E.IOptionsService),v(4,C.ICharSizeService),v(5,C.IRenderService),v(6,C.ICoreBrowserService),v(7,C.IThemeService)],p)},3107:function(b,c,u){var h=this&&this.__decorate||function(E,p,S,_){var g,w=arguments.length,R=w<3?p:_===null?_=Object.getOwnPropertyDescriptor(p,S):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(E,p,S,_);else for(var L=E.length-1;L>=0;L--)(g=E[L])&&(R=(w<3?g(R):w>3?g(p,S,R):g(p,S))||R);return w>3&&R&&Object.defineProperty(p,S,R),R},v=this&&this.__param||function(E,p){return function(S,_){p(S,_,E)}};Object.defineProperty(c,"__esModule",{value:!0}),c.BufferDecorationRenderer=void 0;const f=u(4725),C=u(844),x=u(2585);let A=c.BufferDecorationRenderer=class extends C.Disposable{constructor(E,p,S,_,g){super(),this._screenElement=E,this._bufferService=p,this._coreBrowserService=S,this._decorationService=_,this._renderService=g,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((w=>this._removeDecoration(w)))),this.register((0,C.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 E of this._decorationService.decorations)this._renderDecoration(E);this._dimensionsChanged=!1}_renderDecoration(E){this._refreshStyle(E),this._dimensionsChanged&&this._refreshXPosition(E)}_createElement(E){const p=this._coreBrowserService.mainDocument.createElement("div");p.classList.add("xterm-decoration"),p.classList.toggle("xterm-decoration-top-layer",E?.options?.layer==="top"),p.style.width=`${Math.round((E.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,p.style.height=(E.options.height||1)*this._renderService.dimensions.css.cell.height+"px",p.style.top=(E.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",p.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const S=E.options.x??0;return S&&S>this._bufferService.cols&&(p.style.display="none"),this._refreshXPosition(E,p),p}_refreshStyle(E){const p=E.marker.line-this._bufferService.buffers.active.ydisp;if(p<0||p>=this._bufferService.rows)E.element&&(E.element.style.display="none",E.onRenderEmitter.fire(E.element));else{let S=this._decorationElements.get(E);S||(S=this._createElement(E),E.element=S,this._decorationElements.set(E,S),this._container.appendChild(S),E.onDispose((()=>{this._decorationElements.delete(E),S.remove()}))),S.style.top=p*this._renderService.dimensions.css.cell.height+"px",S.style.display=this._altBufferIsActive?"none":"block",E.onRenderEmitter.fire(S)}}_refreshXPosition(E,p=E.element){if(!p)return;const S=E.options.x??0;(E.options.anchor||"left")==="right"?p.style.right=S?S*this._renderService.dimensions.css.cell.width+"px":"":p.style.left=S?S*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(E){this._decorationElements.get(E)?.remove(),this._decorationElements.delete(E),E.dispose()}};c.BufferDecorationRenderer=A=h([v(1,x.IBufferService),v(2,f.ICoreBrowserService),v(3,x.IDecorationService),v(4,f.IRenderService)],A)},5871:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ColorZoneStore=void 0,c.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(u){if(u.options.overviewRulerOptions){for(const h of this._zones)if(h.color===u.options.overviewRulerOptions.color&&h.position===u.options.overviewRulerOptions.position){if(this._lineIntersectsZone(h,u.marker.line))return;if(this._lineAdjacentToZone(h,u.marker.line,u.options.overviewRulerOptions.position))return void this._addLineToZone(h,u.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=u.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=u.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=u.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=u.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:u.options.overviewRulerOptions.color,position:u.options.overviewRulerOptions.position,startBufferLine:u.marker.line,endBufferLine:u.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(u){this._linePadding=u}_lineIntersectsZone(u,h){return h>=u.startBufferLine&&h<=u.endBufferLine}_lineAdjacentToZone(u,h,v){return h>=u.startBufferLine-this._linePadding[v||"full"]&&h<=u.endBufferLine+this._linePadding[v||"full"]}_addLineToZone(u,h){u.startBufferLine=Math.min(u.startBufferLine,h),u.endBufferLine=Math.max(u.endBufferLine,h)}}},5744:function(b,c,u){var h=this&&this.__decorate||function(g,w,R,L){var D,T=arguments.length,B=T<3?w:L===null?L=Object.getOwnPropertyDescriptor(w,R):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(g,w,R,L);else for(var W=g.length-1;W>=0;W--)(D=g[W])&&(B=(T<3?D(B):T>3?D(w,R,B):D(w,R))||B);return T>3&&B&&Object.defineProperty(w,R,B),B},v=this&&this.__param||function(g,w){return function(R,L){w(R,L,g)}};Object.defineProperty(c,"__esModule",{value:!0}),c.OverviewRulerRenderer=void 0;const f=u(5871),C=u(4725),x=u(844),A=u(2585),E={full:0,left:0,center:0,right:0},p={full:0,left:0,center:0,right:0},S={full:0,left:0,center:0,right:0};let _=c.OverviewRulerRenderer=class extends x.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(g,w,R,L,D,T,B){super(),this._viewportElement=g,this._screenElement=w,this._bufferService=R,this._decorationService=L,this._renderService=D,this._optionsService=T,this._coreBrowserService=B,this._colorZoneStore=new f.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(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement);const W=this._canvas.getContext("2d");if(!W)throw new Error("Ctx cannot be null");this._ctx=W,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,x.toDisposable)((()=>{this._canvas?.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 g=Math.floor(this._canvas.width/3),w=Math.ceil(this._canvas.width/3);p.full=this._canvas.width,p.left=g,p.center=w,p.right=g,this._refreshDrawHeightConstants(),S.full=0,S.left=0,S.center=p.left,S.right=p.left+p.center}_refreshDrawHeightConstants(){E.full=Math.round(2*this._coreBrowserService.dpr);const g=this._canvas.height/this._bufferService.buffer.lines.length,w=Math.round(Math.max(Math.min(g,12),6)*this._coreBrowserService.dpr);E.left=w,E.center=w,E.right=w}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*E.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*E.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*E.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*E.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 w of this._decorationService.decorations)this._colorZoneStore.addDecoration(w);this._ctx.lineWidth=1;const g=this._colorZoneStore.zones;for(const w of g)w.position!=="full"&&this._renderColorZone(w);for(const w of g)w.position==="full"&&this._renderColorZone(w);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(g){this._ctx.fillStyle=g.color,this._ctx.fillRect(S[g.position||"full"],Math.round((this._canvas.height-1)*(g.startBufferLine/this._bufferService.buffers.active.lines.length)-E[g.position||"full"]/2),p[g.position||"full"],Math.round((this._canvas.height-1)*((g.endBufferLine-g.startBufferLine)/this._bufferService.buffers.active.lines.length)+E[g.position||"full"]))}_queueRefresh(g,w){this._shouldUpdateDimensions=g||this._shouldUpdateDimensions,this._shouldUpdateAnchor=w||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};c.OverviewRulerRenderer=_=h([v(2,A.IBufferService),v(3,A.IDecorationService),v(4,C.IRenderService),v(5,A.IOptionsService),v(6,C.ICoreBrowserService)],_)},2950:function(b,c,u){var h=this&&this.__decorate||function(E,p,S,_){var g,w=arguments.length,R=w<3?p:_===null?_=Object.getOwnPropertyDescriptor(p,S):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(E,p,S,_);else for(var L=E.length-1;L>=0;L--)(g=E[L])&&(R=(w<3?g(R):w>3?g(p,S,R):g(p,S))||R);return w>3&&R&&Object.defineProperty(p,S,R),R},v=this&&this.__param||function(E,p){return function(S,_){p(S,_,E)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CompositionHelper=void 0;const f=u(4725),C=u(2585),x=u(2584);let A=c.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(E,p,S,_,g,w){this._textarea=E,this._compositionView=p,this._bufferService=S,this._optionsService=_,this._coreService=g,this._renderService=w,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(E){this._compositionView.textContent=E.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(E){if(this._isComposing||this._isSendingComposition){if(E.keyCode===229||E.keyCode===16||E.keyCode===17||E.keyCode===18)return!1;this._finalizeComposition(!1)}return E.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(E){if(this._compositionView.classList.remove("active"),this._isComposing=!1,E){const p={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let S;this._isSendingComposition=!1,p.start+=this._dataAlreadySent.length,S=this._isComposing?this._textarea.value.substring(p.start,p.end):this._textarea.value.substring(p.start),S.length>0&&this._coreService.triggerDataEvent(S,!0)}}),0)}else{this._isSendingComposition=!1;const p=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(p,!0)}}_handleAnyTextareaChanges(){const E=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const p=this._textarea.value,S=p.replace(E,"");this._dataAlreadySent=S,p.length>E.length?this._coreService.triggerDataEvent(S,!0):p.length<E.length?this._coreService.triggerDataEvent(`${x.C0.DEL}`,!0):p.length===E.length&&p!==E&&this._coreService.triggerDataEvent(p,!0)}}),0)}updateCompositionElements(E){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const p=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),S=this._renderService.dimensions.css.cell.height,_=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,g=p*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=g+"px",this._compositionView.style.top=_+"px",this._compositionView.style.height=S+"px",this._compositionView.style.lineHeight=S+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const w=this._compositionView.getBoundingClientRect();this._textarea.style.left=g+"px",this._textarea.style.top=_+"px",this._textarea.style.width=Math.max(w.width,1)+"px",this._textarea.style.height=Math.max(w.height,1)+"px",this._textarea.style.lineHeight=w.height+"px"}E||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};c.CompositionHelper=A=h([v(2,C.IBufferService),v(3,C.IOptionsService),v(4,C.ICoreService),v(5,f.IRenderService)],A)},9806:(b,c)=>{function u(h,v,f){const C=f.getBoundingClientRect(),x=h.getComputedStyle(f),A=parseInt(x.getPropertyValue("padding-left")),E=parseInt(x.getPropertyValue("padding-top"));return[v.clientX-C.left-A,v.clientY-C.top-E]}Object.defineProperty(c,"__esModule",{value:!0}),c.getCoords=c.getCoordsRelativeToElement=void 0,c.getCoordsRelativeToElement=u,c.getCoords=function(h,v,f,C,x,A,E,p,S){if(!A)return;const _=u(h,v,f);return _?(_[0]=Math.ceil((_[0]+(S?E/2:0))/E),_[1]=Math.ceil(_[1]/p),_[0]=Math.min(Math.max(_[0],1),C+(S?1:0)),_[1]=Math.min(Math.max(_[1],1),x),_):void 0}},9504:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.moveToCellSequence=void 0;const h=u(2584);function v(p,S,_,g){const w=p-f(p,_),R=S-f(S,_),L=Math.abs(w-R)-(function(D,T,B){let W=0;const P=D-f(D,B),F=T-f(T,B);for(let I=0;I<Math.abs(P-F);I++){const Z=C(D,T)==="A"?-1:1;B.buffer.lines.get(P+Z*I)?.isWrapped&&W++}return W})(p,S,_);return E(L,A(C(p,S),g))}function f(p,S){let _=0,g=S.buffer.lines.get(p),w=g?.isWrapped;for(;w&&p>=0&&p<S.rows;)_++,g=S.buffer.lines.get(--p),w=g?.isWrapped;return _}function C(p,S){return p>S?"A":"B"}function x(p,S,_,g,w,R){let L=p,D=S,T="";for(;L!==_||D!==g;)L+=w?1:-1,w&&L>R.cols-1?(T+=R.buffer.translateBufferLineToString(D,!1,p,L),L=0,p=0,D++):!w&&L<0&&(T+=R.buffer.translateBufferLineToString(D,!1,0,p+1),L=R.cols-1,p=L,D--);return T+R.buffer.translateBufferLineToString(D,!1,p,L)}function A(p,S){const _=S?"O":"[";return h.C0.ESC+_+p}function E(p,S){p=Math.floor(p);let _="";for(let g=0;g<p;g++)_+=S;return _}c.moveToCellSequence=function(p,S,_,g){const w=_.buffer.x,R=_.buffer.y;if(!_.buffer.hasScrollback)return(function(T,B,W,P,F,I){return v(B,P,F,I).length===0?"":E(x(T,B,T,B-f(B,F),!1,F).length,A("D",I))})(w,R,0,S,_,g)+v(R,S,_,g)+(function(T,B,W,P,F,I){let Z;Z=v(B,P,F,I).length>0?P-f(P,F):B;const ee=P,j=(function(Y,K,O,H,M,U){let V;return V=v(O,H,M,U).length>0?H-f(H,M):K,Y<O&&V<=H||Y>=O&&V<H?"C":"D"})(T,B,W,P,F,I);return E(x(T,Z,W,ee,j==="C",F).length,A(j,I))})(w,R,p,S,_,g);let L;if(R===S)return L=w>p?"D":"C",E(Math.abs(w-p),A(L,g));L=R>S?"D":"C";const D=Math.abs(R-S);return E((function(T,B){return B.cols-T})(R>S?p:w,_)+(D-1)*_.cols+1+((R>S?w:p)-1),A(L,g))}},1296:function(b,c,u){var h=this&&this.__decorate||function(I,Z,ee,j){var Y,K=arguments.length,O=K<3?Z:j===null?j=Object.getOwnPropertyDescriptor(Z,ee):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(I,Z,ee,j);else for(var H=I.length-1;H>=0;H--)(Y=I[H])&&(O=(K<3?Y(O):K>3?Y(Z,ee,O):Y(Z,ee))||O);return K>3&&O&&Object.defineProperty(Z,ee,O),O},v=this&&this.__param||function(I,Z){return function(ee,j){Z(ee,j,I)}};Object.defineProperty(c,"__esModule",{value:!0}),c.DomRenderer=void 0;const f=u(3787),C=u(2550),x=u(2223),A=u(6171),E=u(6052),p=u(4725),S=u(8055),_=u(8460),g=u(844),w=u(2585),R="xterm-dom-renderer-owner-",L="xterm-rows",D="xterm-fg-",T="xterm-bg-",B="xterm-focus",W="xterm-selection";let P=1,F=c.DomRenderer=class extends g.Disposable{constructor(I,Z,ee,j,Y,K,O,H,M,U,V,ae,ce){super(),this._terminal=I,this._document=Z,this._element=ee,this._screenElement=j,this._viewportElement=Y,this._helperContainer=K,this._linkifier2=O,this._charSizeService=M,this._optionsService=U,this._bufferService=V,this._coreBrowserService=ae,this._themeService=ce,this._terminalClass=P++,this._rowElements=[],this._selectionRenderModel=(0,E.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new _.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(L),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(W),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,A.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((me=>this._injectCss(me)))),this._injectCss(this._themeService.colors),this._rowFactory=H.createInstance(f.DomRendererRowFactory,document),this._element.classList.add(R+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((me=>this._handleLinkHover(me)))),this.register(this._linkifier2.onHideLinkUnderline((me=>this._handleLinkLeave(me)))),this.register((0,g.toDisposable)((()=>{this._element.classList.remove(R+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new C.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 I=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*I,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*I),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/I),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/I),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 ee of this._rowElements)ee.style.width=`${this.dimensions.css.canvas.width}px`,ee.style.height=`${this.dimensions.css.cell.height}px`,ee.style.lineHeight=`${this.dimensions.css.cell.height}px`,ee.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const Z=`${this._terminalSelector} .${L} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=Z,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(I){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let Z=`${this._terminalSelector} .${L} { color: ${I.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;Z+=`${this._terminalSelector} .${L} .xterm-dim { color: ${S.color.multiplyOpacity(I.foreground,.5).css};}`,Z+=`${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 ee=`blink_underline_${this._terminalClass}`,j=`blink_bar_${this._terminalClass}`,Y=`blink_block_${this._terminalClass}`;Z+=`@keyframes ${ee} { 50% { border-bottom-style: hidden; }}`,Z+=`@keyframes ${j} { 50% { box-shadow: none; }}`,Z+=`@keyframes ${Y} { 0% { background-color: ${I.cursor.css}; color: ${I.cursorAccent.css}; } 50% { background-color: inherit; color: ${I.cursor.css}; }}`,Z+=`${this._terminalSelector} .${L}.${B} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${ee} 1s step-end infinite;}${this._terminalSelector} .${L}.${B} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${j} 1s step-end infinite;}${this._terminalSelector} .${L}.${B} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Y} 1s step-end infinite;}${this._terminalSelector} .${L} .xterm-cursor.xterm-cursor-block { background-color: ${I.cursor.css}; color: ${I.cursorAccent.css};}${this._terminalSelector} .${L} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${I.cursor.css} !important; color: ${I.cursorAccent.css} !important;}${this._terminalSelector} .${L} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${I.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${L} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${I.cursor.css} inset;}${this._terminalSelector} .${L} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${I.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,Z+=`${this._terminalSelector} .${W} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${W} div { position: absolute; background-color: ${I.selectionBackgroundOpaque.css};}${this._terminalSelector} .${W} div { position: absolute; background-color: ${I.selectionInactiveBackgroundOpaque.css};}`;for(const[K,O]of I.ansi.entries())Z+=`${this._terminalSelector} .${D}${K} { color: ${O.css}; }${this._terminalSelector} .${D}${K}.xterm-dim { color: ${S.color.multiplyOpacity(O,.5).css}; }${this._terminalSelector} .${T}${K} { background-color: ${O.css}; }`;Z+=`${this._terminalSelector} .${D}${x.INVERTED_DEFAULT_COLOR} { color: ${S.color.opaque(I.background).css}; }${this._terminalSelector} .${D}${x.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${S.color.multiplyOpacity(S.color.opaque(I.background),.5).css}; }${this._terminalSelector} .${T}${x.INVERTED_DEFAULT_COLOR} { background-color: ${I.foreground.css}; }`,this._themeStyleElement.textContent=Z}_setDefaultSpacing(){const I=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${I}px`,this._rowFactory.defaultSpacing=I}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(I,Z){for(let ee=this._rowElements.length;ee<=Z;ee++){const j=this._document.createElement("div");this._rowContainer.appendChild(j),this._rowElements.push(j)}for(;this._rowElements.length>Z;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(I,Z){this._refreshRowElements(I,Z),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(B),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(B),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(I,Z,ee){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(I,Z,ee),this.renderRows(0,this._bufferService.rows-1),!I||!Z)return;this._selectionRenderModel.update(this._terminal,I,Z,ee);const j=this._selectionRenderModel.viewportStartRow,Y=this._selectionRenderModel.viewportEndRow,K=this._selectionRenderModel.viewportCappedStartRow,O=this._selectionRenderModel.viewportCappedEndRow;if(K>=this._bufferService.rows||O<0)return;const H=this._document.createDocumentFragment();if(ee){const M=I[0]>Z[0];H.appendChild(this._createSelectionElement(K,M?Z[0]:I[0],M?I[0]:Z[0],O-K+1))}else{const M=j===K?I[0]:0,U=K===Y?Z[0]:this._bufferService.cols;H.appendChild(this._createSelectionElement(K,M,U));const V=O-K-1;if(H.appendChild(this._createSelectionElement(K+1,0,this._bufferService.cols,V)),K!==O){const ae=Y===O?Z[0]:this._bufferService.cols;H.appendChild(this._createSelectionElement(O,0,ae))}}this._selectionContainer.appendChild(H)}_createSelectionElement(I,Z,ee,j=1){const Y=this._document.createElement("div"),K=Z*this.dimensions.css.cell.width;let O=this.dimensions.css.cell.width*(ee-Z);return K+O>this.dimensions.css.canvas.width&&(O=this.dimensions.css.canvas.width-K),Y.style.height=j*this.dimensions.css.cell.height+"px",Y.style.top=I*this.dimensions.css.cell.height+"px",Y.style.left=`${K}px`,Y.style.width=`${O}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 I of this._rowElements)I.replaceChildren()}renderRows(I,Z){const ee=this._bufferService.buffer,j=ee.ybase+ee.y,Y=Math.min(ee.x,this._bufferService.cols-1),K=this._optionsService.rawOptions.cursorBlink,O=this._optionsService.rawOptions.cursorStyle,H=this._optionsService.rawOptions.cursorInactiveStyle;for(let M=I;M<=Z;M++){const U=M+ee.ydisp,V=this._rowElements[M],ae=ee.lines.get(U);if(!V||!ae)break;V.replaceChildren(...this._rowFactory.createRow(ae,U,U===j,O,H,Y,K,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${R}${this._terminalClass}`}_handleLinkHover(I){this._setCellUnderline(I.x1,I.x2,I.y1,I.y2,I.cols,!0)}_handleLinkLeave(I){this._setCellUnderline(I.x1,I.x2,I.y1,I.y2,I.cols,!1)}_setCellUnderline(I,Z,ee,j,Y,K){ee<0&&(I=0),j<0&&(Z=0);const O=this._bufferService.rows-1;ee=Math.max(Math.min(ee,O),0),j=Math.max(Math.min(j,O),0),Y=Math.min(Y,this._bufferService.cols);const H=this._bufferService.buffer,M=H.ybase+H.y,U=Math.min(H.x,Y-1),V=this._optionsService.rawOptions.cursorBlink,ae=this._optionsService.rawOptions.cursorStyle,ce=this._optionsService.rawOptions.cursorInactiveStyle;for(let me=ee;me<=j;++me){const Q=me+H.ydisp,$=this._rowElements[me],oe=H.lines.get(Q);if(!$||!oe)break;$.replaceChildren(...this._rowFactory.createRow(oe,Q,Q===M,ae,ce,U,V,this.dimensions.css.cell.width,this._widthCache,K?me===ee?I:0:-1,K?(me===j?Z:Y)-1:-1))}}};c.DomRenderer=F=h([v(7,w.IInstantiationService),v(8,p.ICharSizeService),v(9,w.IOptionsService),v(10,w.IBufferService),v(11,p.ICoreBrowserService),v(12,p.IThemeService)],F)},3787:function(b,c,u){var h=this&&this.__decorate||function(L,D,T,B){var W,P=arguments.length,F=P<3?D:B===null?B=Object.getOwnPropertyDescriptor(D,T):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(L,D,T,B);else for(var I=L.length-1;I>=0;I--)(W=L[I])&&(F=(P<3?W(F):P>3?W(D,T,F):W(D,T))||F);return P>3&&F&&Object.defineProperty(D,T,F),F},v=this&&this.__param||function(L,D){return function(T,B){D(T,B,L)}};Object.defineProperty(c,"__esModule",{value:!0}),c.DomRendererRowFactory=void 0;const f=u(2223),C=u(643),x=u(511),A=u(2585),E=u(8055),p=u(4725),S=u(4269),_=u(6171),g=u(3734);let w=c.DomRendererRowFactory=class{constructor(L,D,T,B,W,P,F){this._document=L,this._characterJoinerService=D,this._optionsService=T,this._coreBrowserService=B,this._coreService=W,this._decorationService=P,this._themeService=F,this._workCell=new x.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(L,D,T){this._selectionStart=L,this._selectionEnd=D,this._columnSelectMode=T}createRow(L,D,T,B,W,P,F,I,Z,ee,j){const Y=[],K=this._characterJoinerService.getJoinedCharacters(D),O=this._themeService.colors;let H,M=L.getNoBgTrimmedLength();T&&M<P+1&&(M=P+1);let U=0,V="",ae=0,ce=0,me=0,Q=!1,$=0,oe=!1,_e=0;const Se=[],be=ee!==-1&&j!==-1;for(let $e=0;$e<M;$e++){L.loadCell($e,this._workCell);let je=this._workCell.getWidth();if(je===0)continue;let Ke=!1,Ct=$e,Be=this._workCell;if(K.length>0&&$e===K[0][0]){Ke=!0;const ht=K.shift();Be=new S.JoinedCellData(this._workCell,L.translateToString(!0,ht[0],ht[1]),ht[1]-ht[0]),Ct=ht[1]-1,je=Be.getWidth()}const Qt=this._isCellInSelection($e,D),gi=T&&$e===P,mi=be&&$e>=ee&&$e<=j;let un=!1;this._decorationService.forEachDecorationAtCell($e,D,void 0,(ht=>{un=!0}));let An=Be.getChars()||C.WHITESPACE_CELL_CHAR;if(An===" "&&(Be.isUnderline()||Be.isOverline())&&(An=" "),_e=je*I-Z.get(An,Be.isBold(),Be.isItalic()),H){if(U&&(Qt&&oe||!Qt&&!oe&&Be.bg===ae)&&(Qt&&oe&&O.selectionForeground||Be.fg===ce)&&Be.extended.ext===me&&mi===Q&&_e===$&&!gi&&!Ke&&!un){Be.isInvisible()?V+=C.WHITESPACE_CELL_CHAR:V+=An,U++;continue}U&&(H.textContent=V),H=this._document.createElement("span"),U=0,V=""}else H=this._document.createElement("span");if(ae=Be.bg,ce=Be.fg,me=Be.extended.ext,Q=mi,$=_e,oe=Qt,Ke&&P>=$e&&P<=Ct&&(P=$e),!this._coreService.isCursorHidden&&gi&&this._coreService.isCursorInitialized){if(Se.push("xterm-cursor"),this._coreBrowserService.isFocused)F&&Se.push("xterm-cursor-blink"),Se.push(B==="bar"?"xterm-cursor-bar":B==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(W)switch(W){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"),V=Be.isInvisible()?C.WHITESPACE_CELL_CHAR:Be.getChars()||C.WHITESPACE_CELL_CHAR,Be.isUnderline()&&(Se.push(`xterm-underline-${Be.extended.underlineStyle}`),V===" "&&(V=" "),!Be.isUnderlineColorDefault()))if(Be.isUnderlineColorRGB())H.style.textDecorationColor=`rgb(${g.AttributeData.toColorRGB(Be.getUnderlineColor()).join(",")})`;else{let ht=Be.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Be.isBold()&&ht<8&&(ht+=8),H.style.textDecorationColor=O.ansi[ht].css}Be.isOverline()&&(Se.push("xterm-overline"),V===" "&&(V=" ")),Be.isStrikethrough()&&Se.push("xterm-strikethrough"),mi&&(H.style.textDecoration="underline");let Jt=Be.getFgColor(),lt=Be.getFgColorMode(),Gt=Be.getBgColor(),It=Be.getBgColorMode();const Ht=!!Be.isInverse();if(Ht){const ht=Jt;Jt=Gt,Gt=ht;const Ii=lt;lt=It,It=Ii}let ei,Rn,Ti,Xi=!1;switch(this._decorationService.forEachDecorationAtCell($e,D,void 0,(ht=>{ht.options.layer!=="top"&&Xi||(ht.backgroundColorRGB&&(It=50331648,Gt=ht.backgroundColorRGB.rgba>>8&16777215,ei=ht.backgroundColorRGB),ht.foregroundColorRGB&&(lt=50331648,Jt=ht.foregroundColorRGB.rgba>>8&16777215,Rn=ht.foregroundColorRGB),Xi=ht.options.layer==="top")})),!Xi&&Qt&&(ei=this._coreBrowserService.isFocused?O.selectionBackgroundOpaque:O.selectionInactiveBackgroundOpaque,Gt=ei.rgba>>8&16777215,It=50331648,Xi=!0,O.selectionForeground&&(lt=50331648,Jt=O.selectionForeground.rgba>>8&16777215,Rn=O.selectionForeground)),Xi&&Se.push("xterm-decoration-top"),It){case 16777216:case 33554432:Ti=O.ansi[Gt],Se.push(`xterm-bg-${Gt}`);break;case 50331648:Ti=E.channels.toColor(Gt>>16,Gt>>8&255,255&Gt),this._addStyle(H,`background-color:#${R((Gt>>>0).toString(16),"0",6)}`);break;default:Ht?(Ti=O.foreground,Se.push(`xterm-bg-${f.INVERTED_DEFAULT_COLOR}`)):Ti=O.background}switch(ei||Be.isDim()&&(ei=E.color.multiplyOpacity(Ti,.5)),lt){case 16777216:case 33554432:Be.isBold()&&Jt<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Jt+=8),this._applyMinimumContrast(H,Ti,O.ansi[Jt],Be,ei,void 0)||Se.push(`xterm-fg-${Jt}`);break;case 50331648:const ht=E.channels.toColor(Jt>>16&255,Jt>>8&255,255&Jt);this._applyMinimumContrast(H,Ti,ht,Be,ei,Rn)||this._addStyle(H,`color:#${R(Jt.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(H,Ti,O.foreground,Be,ei,Rn)||Ht&&Se.push(`xterm-fg-${f.INVERTED_DEFAULT_COLOR}`)}Se.length&&(H.className=Se.join(" "),Se.length=0),gi||Ke||un?H.textContent=V:U++,_e!==this.defaultSpacing&&(H.style.letterSpacing=`${_e}px`),Y.push(H),$e=Ct}return H&&U&&(H.textContent=V),Y}_applyMinimumContrast(L,D,T,B,W,P){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,_.treatGlyphAsBackgroundColor)(B.getCode()))return!1;const F=this._getContrastCache(B);let I;if(W||P||(I=F.getColor(D.rgba,T.rgba)),I===void 0){const Z=this._optionsService.rawOptions.minimumContrastRatio/(B.isDim()?2:1);I=E.color.ensureContrastRatio(W||D,P||T,Z),F.setColor((W||D).rgba,(P||T).rgba,I??null)}return!!I&&(this._addStyle(L,`color:${I.css}`),!0)}_getContrastCache(L){return L.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(L,D){L.setAttribute("style",`${L.getAttribute("style")||""}${D};`)}_isCellInSelection(L,D){const T=this._selectionStart,B=this._selectionEnd;return!(!T||!B)&&(this._columnSelectMode?T[0]<=B[0]?L>=T[0]&&D>=T[1]&&L<B[0]&&D<=B[1]:L<T[0]&&D>=T[1]&&L>=B[0]&&D<=B[1]:D>T[1]&&D<B[1]||T[1]===B[1]&&D===T[1]&&L>=T[0]&&L<B[0]||T[1]<B[1]&&D===B[1]&&L<B[0]||T[1]<B[1]&&D===T[1]&&L>=T[0])}};function R(L,D,T){for(;L.length<T;)L=D+L;return L}c.DomRendererRowFactory=w=h([v(1,p.ICharacterJoinerService),v(2,A.IOptionsService),v(3,p.ICoreBrowserService),v(4,A.ICoreService),v(5,A.IDecorationService),v(6,p.IThemeService)],w)},2550:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.WidthCache=void 0,c.WidthCache=class{constructor(u,h){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=u.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=u.createElement("span");v.classList.add("xterm-char-measure-element");const f=u.createElement("span");f.classList.add("xterm-char-measure-element"),f.style.fontWeight="bold";const C=u.createElement("span");C.classList.add("xterm-char-measure-element"),C.style.fontStyle="italic";const x=u.createElement("span");x.classList.add("xterm-char-measure-element"),x.style.fontWeight="bold",x.style.fontStyle="italic",this._measureElements=[v,f,C,x],this._container.appendChild(v),this._container.appendChild(f),this._container.appendChild(C),this._container.appendChild(x),h.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(u,h,v,f){u===this._font&&h===this._fontSize&&v===this._weight&&f===this._weightBold||(this._font=u,this._fontSize=h,this._weight=v,this._weightBold=f,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${v}`,this._measureElements[1].style.fontWeight=`${f}`,this._measureElements[2].style.fontWeight=`${v}`,this._measureElements[3].style.fontWeight=`${f}`,this.clear())}get(u,h,v){let f=0;if(!h&&!v&&u.length===1&&(f=u.charCodeAt(0))<256){if(this._flat[f]!==-9999)return this._flat[f];const A=this._measure(u,0);return A>0&&(this._flat[f]=A),A}let C=u;h&&(C+="B"),v&&(C+="I");let x=this._holey.get(C);if(x===void 0){let A=0;h&&(A|=1),v&&(A|=2),x=this._measure(u,A),x>0&&this._holey.set(C,x)}return x}_measure(u,h){const v=this._measureElements[h];return v.textContent=u.repeat(32),v.offsetWidth/32}}},2223:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.TEXT_BASELINE=c.DIM_OPACITY=c.INVERTED_DEFAULT_COLOR=void 0;const h=u(6114);c.INVERTED_DEFAULT_COLOR=257,c.DIM_OPACITY=.5,c.TEXT_BASELINE=h.isFirefox||h.isLegacyEdge?"bottom":"ideographic"},6171:(b,c)=>{function u(v){return 57508<=v&&v<=57558}function h(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(c,"__esModule",{value:!0}),c.computeNextVariantOffset=c.createRenderDimensions=c.treatGlyphAsBackgroundColor=c.allowRescaling=c.isEmoji=c.isRestrictedPowerlineGlyph=c.isPowerlineGlyph=c.throwIfFalsy=void 0,c.throwIfFalsy=function(v){if(!v)throw new Error("value must not be falsy");return v},c.isPowerlineGlyph=u,c.isRestrictedPowerlineGlyph=function(v){return 57520<=v&&v<=57527},c.isEmoji=h,c.allowRescaling=function(v,f,C,x){return f===1&&C>Math.ceil(1.5*x)&&v!==void 0&&v>255&&!h(v)&&!u(v)&&!(function(A){return 57344<=A&&A<=63743})(v)},c.treatGlyphAsBackgroundColor=function(v){return u(v)||(function(f){return 9472<=f&&f<=9631})(v)},c.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}}}},c.computeNextVariantOffset=function(v,f,C=0){return(v-(2*Math.round(f)-C))%(2*Math.round(f))}},6052:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.createSelectionRenderModel=void 0;class u{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,f,C,x=!1){if(this.selectionStart=f,this.selectionEnd=C,!f||!C||f[0]===C[0]&&f[1]===C[1])return void this.clear();const A=v.buffers.active.ydisp,E=f[1]-A,p=C[1]-A,S=Math.max(E,0),_=Math.min(p,v.rows-1);S>=v.rows||_<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=x,this.viewportStartRow=E,this.viewportEndRow=p,this.viewportCappedStartRow=S,this.viewportCappedEndRow=_,this.startCol=f[0],this.endCol=C[0])}isCellSelected(v,f,C){return!!this.hasSelection&&(C-=v.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?f>=this.startCol&&C>=this.viewportCappedStartRow&&f<this.endCol&&C<=this.viewportCappedEndRow:f<this.startCol&&C>=this.viewportCappedStartRow&&f>=this.endCol&&C<=this.viewportCappedEndRow:C>this.viewportStartRow&&C<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&C===this.viewportStartRow&&f>=this.startCol&&f<this.endCol||this.viewportStartRow<this.viewportEndRow&&C===this.viewportEndRow&&f<this.endCol||this.viewportStartRow<this.viewportEndRow&&C===this.viewportStartRow&&f>=this.startCol)}}c.createSelectionRenderModel=function(){return new u}},456:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.SelectionModel=void 0,c.SelectionModel=class{constructor(u){this._bufferService=u,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 u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?u%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)-1]:[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[u,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[Math.max(u,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const u=this.selectionStart,h=this.selectionEnd;return!(!u||!h)&&(u[1]>h[1]||u[1]===h[1]&&u[0]>h[0])}handleTrim(u){return this.selectionStart&&(this.selectionStart[1]-=u),this.selectionEnd&&(this.selectionEnd[1]-=u),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(b,c,u){var h=this&&this.__decorate||function(_,g,w,R){var L,D=arguments.length,T=D<3?g:R===null?R=Object.getOwnPropertyDescriptor(g,w):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(_,g,w,R);else for(var B=_.length-1;B>=0;B--)(L=_[B])&&(T=(D<3?L(T):D>3?L(g,w,T):L(g,w))||T);return D>3&&T&&Object.defineProperty(g,w,T),T},v=this&&this.__param||function(_,g){return function(w,R){g(w,R,_)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CharSizeService=void 0;const f=u(2585),C=u(8460),x=u(844);let A=c.CharSizeService=class extends x.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(_,g,w){super(),this._optionsService=w,this.width=0,this.height=0,this._onCharSizeChange=this.register(new C.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new S(this._optionsService))}catch{this._measureStrategy=this.register(new p(_,g,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const _=this._measureStrategy.measure();_.width===this.width&&_.height===this.height||(this.width=_.width,this.height=_.height,this._onCharSizeChange.fire())}};c.CharSizeService=A=h([v(2,f.IOptionsService)],A);class E extends x.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(g,w){g!==void 0&&g>0&&w!==void 0&&w>0&&(this._result.width=g,this._result.height=w)}}class p extends E{constructor(g,w,R){super(),this._document=g,this._parentElement=w,this._optionsService=R,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 S extends E{constructor(g){super(),this._optionsService=g,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const w=this._ctx.measureText("W");if(!("width"in w&&"fontBoundingBoxAscent"in w&&"fontBoundingBoxDescent"in w))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const g=this._ctx.measureText("W");return this._validateAndSet(g.width,g.fontBoundingBoxAscent+g.fontBoundingBoxDescent),this._result}}},4269:function(b,c,u){var h=this&&this.__decorate||function(S,_,g,w){var R,L=arguments.length,D=L<3?_:w===null?w=Object.getOwnPropertyDescriptor(_,g):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(S,_,g,w);else for(var T=S.length-1;T>=0;T--)(R=S[T])&&(D=(L<3?R(D):L>3?R(_,g,D):R(_,g))||D);return L>3&&D&&Object.defineProperty(_,g,D),D},v=this&&this.__param||function(S,_){return function(g,w){_(g,w,S)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CharacterJoinerService=c.JoinedCellData=void 0;const f=u(3734),C=u(643),x=u(511),A=u(2585);class E extends f.AttributeData{constructor(_,g,w){super(),this.content=0,this.combinedData="",this.fg=_.fg,this.bg=_.bg,this.combinedData=g,this._width=w}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(_){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}c.JoinedCellData=E;let p=c.CharacterJoinerService=class zb{constructor(_){this._bufferService=_,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new x.CellData}register(_){const g={id:this._nextCharacterJoinerId++,handler:_};return this._characterJoiners.push(g),g.id}deregister(_){for(let g=0;g<this._characterJoiners.length;g++)if(this._characterJoiners[g].id===_)return this._characterJoiners.splice(g,1),!0;return!1}getJoinedCharacters(_){if(this._characterJoiners.length===0)return[];const g=this._bufferService.buffer.lines.get(_);if(!g||g.length===0)return[];const w=[],R=g.translateToString(!0);let L=0,D=0,T=0,B=g.getFg(0),W=g.getBg(0);for(let P=0;P<g.getTrimmedLength();P++)if(g.loadCell(P,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==B||this._workCell.bg!==W){if(P-L>1){const F=this._getJoinedRanges(R,T,D,g,L);for(let I=0;I<F.length;I++)w.push(F[I])}L=P,T=D,B=this._workCell.fg,W=this._workCell.bg}D+=this._workCell.getChars().length||C.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-L>1){const P=this._getJoinedRanges(R,T,D,g,L);for(let F=0;F<P.length;F++)w.push(P[F])}return w}_getJoinedRanges(_,g,w,R,L){const D=_.substring(g,w);let T=[];try{T=this._characterJoiners[0].handler(D)}catch(B){console.error(B)}for(let B=1;B<this._characterJoiners.length;B++)try{const W=this._characterJoiners[B].handler(D);for(let P=0;P<W.length;P++)zb._mergeRanges(T,W[P])}catch(W){console.error(W)}return this._stringRangesToCellRanges(T,R,L),T}_stringRangesToCellRanges(_,g,w){let R=0,L=!1,D=0,T=_[R];if(T){for(let B=w;B<this._bufferService.cols;B++){const W=g.getWidth(B),P=g.getString(B).length||C.WHITESPACE_CELL_CHAR.length;if(W!==0){if(!L&&T[0]<=D&&(T[0]=B,L=!0),T[1]<=D){if(T[1]=B,T=_[++R],!T)break;T[0]<=D?(T[0]=B,L=!0):L=!1}D+=P}}T&&(T[1]=this._bufferService.cols)}}static _mergeRanges(_,g){let w=!1;for(let R=0;R<_.length;R++){const L=_[R];if(w){if(g[1]<=L[0])return _[R-1][1]=g[1],_;if(g[1]<=L[1])return _[R-1][1]=Math.max(g[1],L[1]),_.splice(R,1),_;_.splice(R,1),R--}else{if(g[1]<=L[0])return _.splice(R,0,g),_;if(g[1]<=L[1])return L[0]=Math.min(g[0],L[0]),_;g[0]<L[1]&&(L[0]=Math.min(g[0],L[0]),w=!0)}}return w?_[_.length-1][1]=g[1]:_.push(g),_}};c.CharacterJoinerService=p=h([v(0,A.IBufferService)],p)},5114:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CoreBrowserService=void 0;const h=u(844),v=u(8460),f=u(3656);class C extends h.Disposable{constructor(E,p,S){super(),this._textarea=E,this._window=p,this.mainDocument=S,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new x(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((_=>this._screenDprMonitor.setWindow(_)))),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(E){this._window!==E&&(this._window=E,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}c.CoreBrowserService=C;class x extends h.Disposable{constructor(E){super(),this._parentWindow=E,this._windowResizeListener=this.register(new h.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,h.toDisposable)((()=>this.clearListener())))}setWindow(E){this._parentWindow=E,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,f.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.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:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.LinkProviderService=void 0;const h=u(844);class v extends h.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,h.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(C){return this.linkProviders.push(C),{dispose:()=>{const x=this.linkProviders.indexOf(C);x!==-1&&this.linkProviders.splice(x,1)}}}}c.LinkProviderService=v},8934:function(b,c,u){var h=this&&this.__decorate||function(A,E,p,S){var _,g=arguments.length,w=g<3?E:S===null?S=Object.getOwnPropertyDescriptor(E,p):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(A,E,p,S);else for(var R=A.length-1;R>=0;R--)(_=A[R])&&(w=(g<3?_(w):g>3?_(E,p,w):_(E,p))||w);return g>3&&w&&Object.defineProperty(E,p,w),w},v=this&&this.__param||function(A,E){return function(p,S){E(p,S,A)}};Object.defineProperty(c,"__esModule",{value:!0}),c.MouseService=void 0;const f=u(4725),C=u(9806);let x=c.MouseService=class{constructor(A,E){this._renderService=A,this._charSizeService=E}getCoords(A,E,p,S,_){return(0,C.getCoords)(window,A,E,p,S,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,_)}getMouseReportCoords(A,E){const p=(0,C.getCoordsRelativeToElement)(window,A,E);if(this._charSizeService.hasValidSize)return p[0]=Math.min(Math.max(p[0],0),this._renderService.dimensions.css.canvas.width-1),p[1]=Math.min(Math.max(p[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(p[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(p[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(p[0]),y:Math.floor(p[1])}}};c.MouseService=x=h([v(0,f.IRenderService),v(1,f.ICharSizeService)],x)},3230:function(b,c,u){var h=this&&this.__decorate||function(_,g,w,R){var L,D=arguments.length,T=D<3?g:R===null?R=Object.getOwnPropertyDescriptor(g,w):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(_,g,w,R);else for(var B=_.length-1;B>=0;B--)(L=_[B])&&(T=(D<3?L(T):D>3?L(g,w,T):L(g,w))||T);return D>3&&T&&Object.defineProperty(g,w,T),T},v=this&&this.__param||function(_,g){return function(w,R){g(w,R,_)}};Object.defineProperty(c,"__esModule",{value:!0}),c.RenderService=void 0;const f=u(6193),C=u(4725),x=u(8460),A=u(844),E=u(7226),p=u(2585);let S=c.RenderService=class extends A.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(_,g,w,R,L,D,T,B){super(),this._rowCount=_,this._charSizeService=R,this._renderer=this.register(new A.MutableDisposable),this._pausedResizeTask=new E.DebouncedIdleTask,this._observerDisposable=this.register(new A.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 x.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new x.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new x.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new x.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new f.RenderDebouncer(((W,P)=>this._renderRows(W,P)),T),this.register(this._renderDebouncer),this.register(T.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(D.onResize((()=>this._fullRefresh()))),this.register(D.buffers.onBufferActivate((()=>this._renderer.value?.clear()))),this.register(w.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(L.onDecorationRegistered((()=>this._fullRefresh()))),this.register(L.onDecorationRemoved((()=>this._fullRefresh()))),this.register(w.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(D.cols,D.rows),this._fullRefresh()}))),this.register(w.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(D.buffer.y,D.buffer.y,!0)))),this.register(B.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(T.window,g),this.register(T.onWindowChange((W=>this._registerIntersectionObserver(W,g))))}_registerIntersectionObserver(_,g){if("IntersectionObserver"in _){const w=new _.IntersectionObserver((R=>this._handleIntersectionChange(R[R.length-1])),{threshold:0});w.observe(g),this._observerDisposable.value=(0,A.toDisposable)((()=>w.disconnect()))}}_handleIntersectionChange(_){this._isPaused=_.isIntersecting===void 0?_.intersectionRatio===0:!_.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(_,g,w=!1){this._isPaused?this._needsFullRefresh=!0:(w||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(_,g,this._rowCount))}_renderRows(_,g){this._renderer.value&&(_=Math.min(_,this._rowCount-1),g=Math.min(g,this._rowCount-1),this._renderer.value.renderRows(_,g),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:_,end:g}),this._onRender.fire({start:_,end:g}),this._isNextRenderRedrawOnly=!0)}resize(_,g){this._rowCount=g,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(_){this._renderer.value=_,this._renderer.value&&(this._renderer.value.onRequestRedraw((g=>this.refreshRows(g.start,g.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(_){return this._renderDebouncer.addRefreshCallback(_)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(_,g){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>this._renderer.value?.handleResize(_,g))):this._renderer.value.handleResize(_,g),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(_,g,w){this._selectionState.start=_,this._selectionState.end=g,this._selectionState.columnSelectMode=w,this._renderer.value?.handleSelectionChanged(_,g,w)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};c.RenderService=S=h([v(2,p.IOptionsService),v(3,C.ICharSizeService),v(4,p.IDecorationService),v(5,p.IBufferService),v(6,C.ICoreBrowserService),v(7,C.IThemeService)],S)},9312:function(b,c,u){var h=this&&this.__decorate||function(T,B,W,P){var F,I=arguments.length,Z=I<3?B:P===null?P=Object.getOwnPropertyDescriptor(B,W):P;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Z=Reflect.decorate(T,B,W,P);else for(var ee=T.length-1;ee>=0;ee--)(F=T[ee])&&(Z=(I<3?F(Z):I>3?F(B,W,Z):F(B,W))||Z);return I>3&&Z&&Object.defineProperty(B,W,Z),Z},v=this&&this.__param||function(T,B){return function(W,P){B(W,P,T)}};Object.defineProperty(c,"__esModule",{value:!0}),c.SelectionService=void 0;const f=u(9806),C=u(9504),x=u(456),A=u(4725),E=u(8460),p=u(844),S=u(6114),_=u(4841),g=u(511),w=u(2585),R=" ",L=new RegExp(R,"g");let D=c.SelectionService=class extends p.Disposable{constructor(T,B,W,P,F,I,Z,ee,j){super(),this._element=T,this._screenElement=B,this._linkifier=W,this._bufferService=P,this._coreService=F,this._mouseService=I,this._optionsService=Z,this._renderService=ee,this._coreBrowserService=j,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new g.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new E.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new E.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new E.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new E.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 x.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,p.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 T=this._model.finalSelectionStart,B=this._model.finalSelectionEnd;return!(!T||!B||T[0]===B[0]&&T[1]===B[1])}get selectionText(){const T=this._model.finalSelectionStart,B=this._model.finalSelectionEnd;if(!T||!B)return"";const W=this._bufferService.buffer,P=[];if(this._activeSelectionMode===3){if(T[0]===B[0])return"";const F=T[0]<B[0]?T[0]:B[0],I=T[0]<B[0]?B[0]:T[0];for(let Z=T[1];Z<=B[1];Z++){const ee=W.translateBufferLineToString(Z,!0,F,I);P.push(ee)}}else{const F=T[1]===B[1]?B[0]:void 0;P.push(W.translateBufferLineToString(T[1],!0,T[0],F));for(let I=T[1]+1;I<=B[1]-1;I++){const Z=W.lines.get(I),ee=W.translateBufferLineToString(I,!0);Z?.isWrapped?P[P.length-1]+=ee:P.push(ee)}if(T[1]!==B[1]){const I=W.lines.get(B[1]),Z=W.translateBufferLineToString(B[1],!0,0,B[0]);I&&I.isWrapped?P[P.length-1]+=Z:P.push(Z)}}return P.map((F=>F.replace(L," "))).join(S.isWindows?`\r
|
|
79
79
|
`:`
|
|
80
80
|
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(T){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),S.isLinux&&T&&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(T){const B=this._getMouseBufferCoords(T),W=this._model.finalSelectionStart,P=this._model.finalSelectionEnd;return!!(W&&P&&B)&&this._areCoordsInSelection(B,W,P)}isCellInSelection(T,B){const W=this._model.finalSelectionStart,P=this._model.finalSelectionEnd;return!(!W||!P)&&this._areCoordsInSelection([T,B],W,P)}_areCoordsInSelection(T,B,W){return T[1]>B[1]&&T[1]<W[1]||B[1]===W[1]&&T[1]===B[1]&&T[0]>=B[0]&&T[0]<W[0]||B[1]<W[1]&&T[1]===W[1]&&T[0]<W[0]||B[1]<W[1]&&T[1]===B[1]&&T[0]>=B[0]}_selectWordAtCursor(T,B){const W=this._linkifier.currentLink?.link?.range;if(W)return this._model.selectionStart=[W.start.x-1,W.start.y-1],this._model.selectionStartLength=(0,_.getRangeLength)(W,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const P=this._getMouseBufferCoords(T);return!!P&&(this._selectWordAt(P,B),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(T,B){this._model.clearSelection(),T=Math.max(T,0),B=Math.min(B,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,T],this._model.selectionEnd=[this._bufferService.cols,B],this.refresh(),this._onSelectionChange.fire()}_handleTrim(T){this._model.handleTrim(T)&&this.refresh()}_getMouseBufferCoords(T){const B=this._mouseService.getCoords(T,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(B)return B[0]--,B[1]--,B[1]+=this._bufferService.buffer.ydisp,B}_getMouseEventScrollAmount(T){let B=(0,f.getCoordsRelativeToElement)(this._coreBrowserService.window,T,this._screenElement)[1];const W=this._renderService.dimensions.css.canvas.height;return B>=0&&B<=W?0:(B>W&&(B-=W),B=Math.min(Math.max(B,-50),50),B/=50,B/Math.abs(B)+Math.round(14*B))}shouldForceSelection(T){return S.isMac?T.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:T.shiftKey}handleMouseDown(T){if(this._mouseDownTimeStamp=T.timeStamp,(T.button!==2||!this.hasSelection)&&T.button===0){if(!this._enabled){if(!this.shouldForceSelection(T))return;T.stopPropagation()}T.preventDefault(),this._dragScrollAmount=0,this._enabled&&T.shiftKey?this._handleIncrementalClick(T):T.detail===1?this._handleSingleClick(T):T.detail===2?this._handleDoubleClick(T):T.detail===3&&this._handleTripleClick(T),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(T){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(T))}_handleSingleClick(T){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(T)?3:0,this._model.selectionStart=this._getMouseBufferCoords(T),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const B=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);B&&B.length!==this._model.selectionStart[0]&&B.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(T){this._selectWordAtCursor(T,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(T){const B=this._getMouseBufferCoords(T);B&&(this._activeSelectionMode=2,this._selectLineAt(B[1]))}shouldColumnSelect(T){return T.altKey&&!(S.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(T){if(T.stopImmediatePropagation(),!this._model.selectionStart)return;const B=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(T),!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(T),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const W=this._bufferService.buffer;if(this._model.selectionEnd[1]<W.lines.length){const P=W.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]++}B&&B[0]===this._model.selectionEnd[0]&&B[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 T=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(T.ydisp+this._bufferService.rows,T.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=T.ydisp),this.refresh()}}_handleMouseUp(T){const B=T.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&B<500&&T.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const W=this._mouseService.getCoords(T,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(W&&W[0]!==void 0&&W[1]!==void 0){const P=(0,C.moveToCellSequence)(W[0]-1,W[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(P,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const T=this._model.finalSelectionStart,B=this._model.finalSelectionEnd,W=!(!T||!B||T[0]===B[0]&&T[1]===B[1]);W?T&&B&&(this._oldSelectionStart&&this._oldSelectionEnd&&T[0]===this._oldSelectionStart[0]&&T[1]===this._oldSelectionStart[1]&&B[0]===this._oldSelectionEnd[0]&&B[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(T,B,W)):this._oldHasSelection&&this._fireOnSelectionChange(T,B,W)}_fireOnSelectionChange(T,B,W){this._oldSelectionStart=T,this._oldSelectionEnd=B,this._oldHasSelection=W,this._onSelectionChange.fire()}_handleBufferActivate(T){this.clearSelection(),this._trimListener.dispose(),this._trimListener=T.activeBuffer.lines.onTrim((B=>this._handleTrim(B)))}_convertViewportColToCharacterIndex(T,B){let W=B;for(let P=0;B>=P;P++){const F=T.loadCell(P,this._workCell).getChars().length;this._workCell.getWidth()===0?W--:F>1&&B!==P&&(W+=F-1)}return W}setSelection(T,B,W){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[T,B],this._model.selectionStartLength=W,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(T){this._isClickInSelection(T)||(this._selectWordAtCursor(T,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(T,B,W=!0,P=!0){if(T[0]>=this._bufferService.cols)return;const F=this._bufferService.buffer,I=F.lines.get(T[1]);if(!I)return;const Z=F.translateBufferLineToString(T[1],!1);let ee=this._convertViewportColToCharacterIndex(I,T[0]),j=ee;const Y=T[0]-ee;let K=0,O=0,H=0,M=0;if(Z.charAt(ee)===" "){for(;ee>0&&Z.charAt(ee-1)===" ";)ee--;for(;j<Z.length&&Z.charAt(j+1)===" ";)j++}else{let ae=T[0],ce=T[0];I.getWidth(ae)===0&&(K++,ae--),I.getWidth(ce)===2&&(O++,ce++);const me=I.getString(ce).length;for(me>1&&(M+=me-1,j+=me-1);ae>0&&ee>0&&!this._isCharWordSeparator(I.loadCell(ae-1,this._workCell));){I.loadCell(ae-1,this._workCell);const Q=this._workCell.getChars().length;this._workCell.getWidth()===0?(K++,ae--):Q>1&&(H+=Q-1,ee-=Q-1),ee--,ae--}for(;ce<I.length&&j+1<Z.length&&!this._isCharWordSeparator(I.loadCell(ce+1,this._workCell));){I.loadCell(ce+1,this._workCell);const Q=this._workCell.getChars().length;this._workCell.getWidth()===2?(O++,ce++):Q>1&&(M+=Q-1,j+=Q-1),j++,ce++}}j++;let U=ee+Y-K+H,V=Math.min(this._bufferService.cols,j-ee+K+O-H-M);if(B||Z.slice(ee,j).trim()!==""){if(W&&U===0&&I.getCodePoint(0)!==32){const ae=F.lines.get(T[1]-1);if(ae&&I.isWrapped&&ae.getCodePoint(this._bufferService.cols-1)!==32){const ce=this._getWordAt([this._bufferService.cols-1,T[1]-1],!1,!0,!1);if(ce){const me=this._bufferService.cols-ce.start;U-=me,V+=me}}}if(P&&U+V===this._bufferService.cols&&I.getCodePoint(this._bufferService.cols-1)!==32){const ae=F.lines.get(T[1]+1);if(ae?.isWrapped&&ae.getCodePoint(0)!==32){const ce=this._getWordAt([0,T[1]+1],!1,!1,!0);ce&&(V+=ce.length)}}return{start:U,length:V}}}_selectWordAt(T,B){const W=this._getWordAt(T,B);if(W){for(;W.start<0;)W.start+=this._bufferService.cols,T[1]--;this._model.selectionStart=[W.start,T[1]],this._model.selectionStartLength=W.length}}_selectToWordAt(T){const B=this._getWordAt(T,!0);if(B){let W=T[1];for(;B.start<0;)B.start+=this._bufferService.cols,W--;if(!this._model.areSelectionValuesReversed())for(;B.start+B.length>this._bufferService.cols;)B.length-=this._bufferService.cols,W++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?B.start:B.start+B.length,W]}}_isCharWordSeparator(T){return T.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(T.getChars())>=0}_selectLineAt(T){const B=this._bufferService.buffer.getWrappedRangeForLine(T),W={start:{x:0,y:B.first},end:{x:this._bufferService.cols-1,y:B.last}};this._model.selectionStart=[0,B.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,_.getRangeLength)(W,this._bufferService.cols)}};c.SelectionService=D=h([v(3,w.IBufferService),v(4,w.ICoreService),v(5,A.IMouseService),v(6,w.IOptionsService),v(7,A.IRenderService),v(8,A.ICoreBrowserService)],D)},4725:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ILinkProviderService=c.IThemeService=c.ICharacterJoinerService=c.ISelectionService=c.IRenderService=c.IMouseService=c.ICoreBrowserService=c.ICharSizeService=void 0;const h=u(8343);c.ICharSizeService=(0,h.createDecorator)("CharSizeService"),c.ICoreBrowserService=(0,h.createDecorator)("CoreBrowserService"),c.IMouseService=(0,h.createDecorator)("MouseService"),c.IRenderService=(0,h.createDecorator)("RenderService"),c.ISelectionService=(0,h.createDecorator)("SelectionService"),c.ICharacterJoinerService=(0,h.createDecorator)("CharacterJoinerService"),c.IThemeService=(0,h.createDecorator)("ThemeService"),c.ILinkProviderService=(0,h.createDecorator)("LinkProviderService")},6731:function(b,c,u){var h=this&&this.__decorate||function(D,T,B,W){var P,F=arguments.length,I=F<3?T:W===null?W=Object.getOwnPropertyDescriptor(T,B):W;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(D,T,B,W);else for(var Z=D.length-1;Z>=0;Z--)(P=D[Z])&&(I=(F<3?P(I):F>3?P(T,B,I):P(T,B))||I);return F>3&&I&&Object.defineProperty(T,B,I),I},v=this&&this.__param||function(D,T){return function(B,W){T(B,W,D)}};Object.defineProperty(c,"__esModule",{value:!0}),c.ThemeService=c.DEFAULT_ANSI_COLORS=void 0;const f=u(7239),C=u(8055),x=u(8460),A=u(844),E=u(2585),p=C.css.toColor("#ffffff"),S=C.css.toColor("#000000"),_=C.css.toColor("#ffffff"),g=C.css.toColor("#000000"),w={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};c.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const D=[C.css.toColor("#2e3436"),C.css.toColor("#cc0000"),C.css.toColor("#4e9a06"),C.css.toColor("#c4a000"),C.css.toColor("#3465a4"),C.css.toColor("#75507b"),C.css.toColor("#06989a"),C.css.toColor("#d3d7cf"),C.css.toColor("#555753"),C.css.toColor("#ef2929"),C.css.toColor("#8ae234"),C.css.toColor("#fce94f"),C.css.toColor("#729fcf"),C.css.toColor("#ad7fa8"),C.css.toColor("#34e2e2"),C.css.toColor("#eeeeec")],T=[0,95,135,175,215,255];for(let B=0;B<216;B++){const W=T[B/36%6|0],P=T[B/6%6|0],F=T[B%6];D.push({css:C.channels.toCss(W,P,F),rgba:C.channels.toRgba(W,P,F)})}for(let B=0;B<24;B++){const W=8+10*B;D.push({css:C.channels.toCss(W,W,W),rgba:C.channels.toRgba(W,W,W)})}return D})());let R=c.ThemeService=class extends A.Disposable{get colors(){return this._colors}constructor(D){super(),this._optionsService=D,this._contrastCache=new f.ColorContrastCache,this._halfContrastCache=new f.ColorContrastCache,this._onChangeColors=this.register(new x.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:p,background:S,cursor:_,cursorAccent:g,selectionForeground:void 0,selectionBackgroundTransparent:w,selectionBackgroundOpaque:C.color.blend(S,w),selectionInactiveBackgroundTransparent:w,selectionInactiveBackgroundOpaque:C.color.blend(S,w),ansi:c.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(D={}){const T=this._colors;if(T.foreground=L(D.foreground,p),T.background=L(D.background,S),T.cursor=L(D.cursor,_),T.cursorAccent=L(D.cursorAccent,g),T.selectionBackgroundTransparent=L(D.selectionBackground,w),T.selectionBackgroundOpaque=C.color.blend(T.background,T.selectionBackgroundTransparent),T.selectionInactiveBackgroundTransparent=L(D.selectionInactiveBackground,T.selectionBackgroundTransparent),T.selectionInactiveBackgroundOpaque=C.color.blend(T.background,T.selectionInactiveBackgroundTransparent),T.selectionForeground=D.selectionForeground?L(D.selectionForeground,C.NULL_COLOR):void 0,T.selectionForeground===C.NULL_COLOR&&(T.selectionForeground=void 0),C.color.isOpaque(T.selectionBackgroundTransparent)&&(T.selectionBackgroundTransparent=C.color.opacity(T.selectionBackgroundTransparent,.3)),C.color.isOpaque(T.selectionInactiveBackgroundTransparent)&&(T.selectionInactiveBackgroundTransparent=C.color.opacity(T.selectionInactiveBackgroundTransparent,.3)),T.ansi=c.DEFAULT_ANSI_COLORS.slice(),T.ansi[0]=L(D.black,c.DEFAULT_ANSI_COLORS[0]),T.ansi[1]=L(D.red,c.DEFAULT_ANSI_COLORS[1]),T.ansi[2]=L(D.green,c.DEFAULT_ANSI_COLORS[2]),T.ansi[3]=L(D.yellow,c.DEFAULT_ANSI_COLORS[3]),T.ansi[4]=L(D.blue,c.DEFAULT_ANSI_COLORS[4]),T.ansi[5]=L(D.magenta,c.DEFAULT_ANSI_COLORS[5]),T.ansi[6]=L(D.cyan,c.DEFAULT_ANSI_COLORS[6]),T.ansi[7]=L(D.white,c.DEFAULT_ANSI_COLORS[7]),T.ansi[8]=L(D.brightBlack,c.DEFAULT_ANSI_COLORS[8]),T.ansi[9]=L(D.brightRed,c.DEFAULT_ANSI_COLORS[9]),T.ansi[10]=L(D.brightGreen,c.DEFAULT_ANSI_COLORS[10]),T.ansi[11]=L(D.brightYellow,c.DEFAULT_ANSI_COLORS[11]),T.ansi[12]=L(D.brightBlue,c.DEFAULT_ANSI_COLORS[12]),T.ansi[13]=L(D.brightMagenta,c.DEFAULT_ANSI_COLORS[13]),T.ansi[14]=L(D.brightCyan,c.DEFAULT_ANSI_COLORS[14]),T.ansi[15]=L(D.brightWhite,c.DEFAULT_ANSI_COLORS[15]),D.extendedAnsi){const B=Math.min(T.ansi.length-16,D.extendedAnsi.length);for(let W=0;W<B;W++)T.ansi[W+16]=L(D.extendedAnsi[W],c.DEFAULT_ANSI_COLORS[W+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(D){this._restoreColor(D),this._onChangeColors.fire(this.colors)}_restoreColor(D){if(D!==void 0)switch(D){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[D]=this._restoreColors.ansi[D]}else for(let T=0;T<this._restoreColors.ansi.length;++T)this._colors.ansi[T]=this._restoreColors.ansi[T]}modifyColors(D){D(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 L(D,T){if(D!==void 0)try{return C.css.toColor(D)}catch{}return T}c.ThemeService=R=h([v(0,E.IOptionsService)],R)},6349:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CircularList=void 0;const h=u(8460),v=u(844);class f extends v.Disposable{constructor(x){super(),this._maxLength=x,this.onDeleteEmitter=this.register(new h.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new h.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new h.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(x){if(this._maxLength===x)return;const A=new Array(x);for(let E=0;E<Math.min(x,this.length);E++)A[E]=this._array[this._getCyclicIndex(E)];this._array=A,this._maxLength=x,this._startIndex=0}get length(){return this._length}set length(x){if(x>this._length)for(let A=this._length;A<x;A++)this._array[A]=void 0;this._length=x}get(x){return this._array[this._getCyclicIndex(x)]}set(x,A){this._array[this._getCyclicIndex(x)]=A}push(x){this._array[this._getCyclicIndex(this._length)]=x,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(x,A,...E){if(A){for(let p=x;p<this._length-A;p++)this._array[this._getCyclicIndex(p)]=this._array[this._getCyclicIndex(p+A)];this._length-=A,this.onDeleteEmitter.fire({index:x,amount:A})}for(let p=this._length-1;p>=x;p--)this._array[this._getCyclicIndex(p+E.length)]=this._array[this._getCyclicIndex(p)];for(let p=0;p<E.length;p++)this._array[this._getCyclicIndex(x+p)]=E[p];if(E.length&&this.onInsertEmitter.fire({index:x,amount:E.length}),this._length+E.length>this._maxLength){const p=this._length+E.length-this._maxLength;this._startIndex+=p,this._length=this._maxLength,this.onTrimEmitter.fire(p)}else this._length+=E.length}trimStart(x){x>this._length&&(x=this._length),this._startIndex+=x,this._length-=x,this.onTrimEmitter.fire(x)}shiftElements(x,A,E){if(!(A<=0)){if(x<0||x>=this._length)throw new Error("start argument out of range");if(x+E<0)throw new Error("Cannot shift elements in list beyond index 0");if(E>0){for(let S=A-1;S>=0;S--)this.set(x+S+E,this.get(x+S));const p=x+A+E-this._length;if(p>0)for(this._length+=p;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let p=0;p<A;p++)this.set(x+p+E,this.get(x+p))}}_getCyclicIndex(x){return(this._startIndex+x)%this._maxLength}}c.CircularList=f},1439:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.clone=void 0,c.clone=function u(h,v=5){if(typeof h!="object")return h;const f=Array.isArray(h)?[]:{};for(const C in h)f[C]=v<=1?h[C]:h[C]&&u(h[C],v-1);return f}},8055:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.contrastRatio=c.toPaddedHex=c.rgba=c.rgb=c.css=c.color=c.channels=c.NULL_COLOR=void 0;let u=0,h=0,v=0,f=0;var C,x,A,E,p;function S(g){const w=g.toString(16);return w.length<2?"0"+w:w}function _(g,w){return g<w?(w+.05)/(g+.05):(g+.05)/(w+.05)}c.NULL_COLOR={css:"#00000000",rgba:0},(function(g){g.toCss=function(w,R,L,D){return D!==void 0?`#${S(w)}${S(R)}${S(L)}${S(D)}`:`#${S(w)}${S(R)}${S(L)}`},g.toRgba=function(w,R,L,D=255){return(w<<24|R<<16|L<<8|D)>>>0},g.toColor=function(w,R,L,D){return{css:g.toCss(w,R,L,D),rgba:g.toRgba(w,R,L,D)}}})(C||(c.channels=C={})),(function(g){function w(R,L){return f=Math.round(255*L),[u,h,v]=p.toChannels(R.rgba),{css:C.toCss(u,h,v,f),rgba:C.toRgba(u,h,v,f)}}g.blend=function(R,L){if(f=(255&L.rgba)/255,f===1)return{css:L.css,rgba:L.rgba};const D=L.rgba>>24&255,T=L.rgba>>16&255,B=L.rgba>>8&255,W=R.rgba>>24&255,P=R.rgba>>16&255,F=R.rgba>>8&255;return u=W+Math.round((D-W)*f),h=P+Math.round((T-P)*f),v=F+Math.round((B-F)*f),{css:C.toCss(u,h,v),rgba:C.toRgba(u,h,v)}},g.isOpaque=function(R){return(255&R.rgba)==255},g.ensureContrastRatio=function(R,L,D){const T=p.ensureContrastRatio(R.rgba,L.rgba,D);if(T)return C.toColor(T>>24&255,T>>16&255,T>>8&255)},g.opaque=function(R){const L=(255|R.rgba)>>>0;return[u,h,v]=p.toChannels(L),{css:C.toCss(u,h,v),rgba:L}},g.opacity=w,g.multiplyOpacity=function(R,L){return f=255&R.rgba,w(R,f*L/255)},g.toColorRGB=function(R){return[R.rgba>>24&255,R.rgba>>16&255,R.rgba>>8&255]}})(x||(c.color=x={})),(function(g){let w,R;try{const L=document.createElement("canvas");L.width=1,L.height=1;const D=L.getContext("2d",{willReadFrequently:!0});D&&(w=D,w.globalCompositeOperation="copy",R=w.createLinearGradient(0,0,1,1))}catch{}g.toColor=function(L){if(L.match(/#[\da-f]{3,8}/i))switch(L.length){case 4:return u=parseInt(L.slice(1,2).repeat(2),16),h=parseInt(L.slice(2,3).repeat(2),16),v=parseInt(L.slice(3,4).repeat(2),16),C.toColor(u,h,v);case 5:return u=parseInt(L.slice(1,2).repeat(2),16),h=parseInt(L.slice(2,3).repeat(2),16),v=parseInt(L.slice(3,4).repeat(2),16),f=parseInt(L.slice(4,5).repeat(2),16),C.toColor(u,h,v,f);case 7:return{css:L,rgba:(parseInt(L.slice(1),16)<<8|255)>>>0};case 9:return{css:L,rgba:parseInt(L.slice(1),16)>>>0}}const D=L.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(D)return u=parseInt(D[1]),h=parseInt(D[2]),v=parseInt(D[3]),f=Math.round(255*(D[5]===void 0?1:parseFloat(D[5]))),C.toColor(u,h,v,f);if(!w||!R)throw new Error("css.toColor: Unsupported css format");if(w.fillStyle=R,w.fillStyle=L,typeof w.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(w.fillRect(0,0,1,1),[u,h,v,f]=w.getImageData(0,0,1,1).data,f!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:C.toRgba(u,h,v,f),css:L}}})(A||(c.css=A={})),(function(g){function w(R,L,D){const T=R/255,B=L/255,W=D/255;return .2126*(T<=.03928?T/12.92:Math.pow((T+.055)/1.055,2.4))+.7152*(B<=.03928?B/12.92:Math.pow((B+.055)/1.055,2.4))+.0722*(W<=.03928?W/12.92:Math.pow((W+.055)/1.055,2.4))}g.relativeLuminance=function(R){return w(R>>16&255,R>>8&255,255&R)},g.relativeLuminance2=w})(E||(c.rgb=E={})),(function(g){function w(L,D,T){const B=L>>24&255,W=L>>16&255,P=L>>8&255;let F=D>>24&255,I=D>>16&255,Z=D>>8&255,ee=_(E.relativeLuminance2(F,I,Z),E.relativeLuminance2(B,W,P));for(;ee<T&&(F>0||I>0||Z>0);)F-=Math.max(0,Math.ceil(.1*F)),I-=Math.max(0,Math.ceil(.1*I)),Z-=Math.max(0,Math.ceil(.1*Z)),ee=_(E.relativeLuminance2(F,I,Z),E.relativeLuminance2(B,W,P));return(F<<24|I<<16|Z<<8|255)>>>0}function R(L,D,T){const B=L>>24&255,W=L>>16&255,P=L>>8&255;let F=D>>24&255,I=D>>16&255,Z=D>>8&255,ee=_(E.relativeLuminance2(F,I,Z),E.relativeLuminance2(B,W,P));for(;ee<T&&(F<255||I<255||Z<255);)F=Math.min(255,F+Math.ceil(.1*(255-F))),I=Math.min(255,I+Math.ceil(.1*(255-I))),Z=Math.min(255,Z+Math.ceil(.1*(255-Z))),ee=_(E.relativeLuminance2(F,I,Z),E.relativeLuminance2(B,W,P));return(F<<24|I<<16|Z<<8|255)>>>0}g.blend=function(L,D){if(f=(255&D)/255,f===1)return D;const T=D>>24&255,B=D>>16&255,W=D>>8&255,P=L>>24&255,F=L>>16&255,I=L>>8&255;return u=P+Math.round((T-P)*f),h=F+Math.round((B-F)*f),v=I+Math.round((W-I)*f),C.toRgba(u,h,v)},g.ensureContrastRatio=function(L,D,T){const B=E.relativeLuminance(L>>8),W=E.relativeLuminance(D>>8);if(_(B,W)<T){if(W<B){const I=w(L,D,T),Z=_(B,E.relativeLuminance(I>>8));if(Z<T){const ee=R(L,D,T);return Z>_(B,E.relativeLuminance(ee>>8))?I:ee}return I}const P=R(L,D,T),F=_(B,E.relativeLuminance(P>>8));if(F<T){const I=w(L,D,T);return F>_(B,E.relativeLuminance(I>>8))?P:I}return P}},g.reduceLuminance=w,g.increaseLuminance=R,g.toChannels=function(L){return[L>>24&255,L>>16&255,L>>8&255,255&L]}})(p||(c.rgba=p={})),c.toPaddedHex=S,c.contrastRatio=_},8969:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CoreTerminal=void 0;const h=u(844),v=u(2585),f=u(4348),C=u(7866),x=u(744),A=u(7302),E=u(6975),p=u(8460),S=u(1753),_=u(1480),g=u(7994),w=u(9282),R=u(5435),L=u(5981),D=u(2660);let T=!1;class B extends h.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new p.EventEmitter),this._onScroll.event((P=>{this._onScrollApi?.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 F in P)this.optionsService.options[F]=P[F]}constructor(P){super(),this._windowsWrappingHeuristics=this.register(new h.MutableDisposable),this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new p.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new p.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new p.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new p.EventEmitter),this._instantiationService=new f.InstantiationService,this.optionsService=this.register(new A.OptionsService(P)),this._instantiationService.setService(v.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(x.BufferService)),this._instantiationService.setService(v.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(C.LogService)),this._instantiationService.setService(v.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(E.CoreService)),this._instantiationService.setService(v.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(S.CoreMouseService)),this._instantiationService.setService(v.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(_.UnicodeService)),this._instantiationService.setService(v.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(g.CharsetService),this._instantiationService.setService(v.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(D.OscLinkService),this._instantiationService.setService(v.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new R.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,p.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,p.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,p.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,p.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((F=>{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((F=>{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 L.WriteBuffer(((F,I)=>this._inputHandler.parse(F,I)))),this.register((0,p.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(P,F){this._writeBuffer.write(P,F)}writeSync(P,F){this._logService.logLevel<=v.LogLevelEnum.WARN&&!T&&(this._logService.warn("writeSync is unreliable and will be removed soon."),T=!0),this._writeBuffer.writeSync(P,F)}input(P,F=!0){this.coreService.triggerDataEvent(P,F)}resize(P,F){isNaN(P)||isNaN(F)||(P=Math.max(P,x.MINIMUM_COLS),F=Math.max(F,x.MINIMUM_ROWS),this._bufferService.resize(P,F))}scroll(P,F=!1){this._bufferService.scroll(P,F)}scrollLines(P,F,I){this._bufferService.scrollLines(P,F,I)}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 F=P-this._bufferService.buffer.ydisp;F!==0&&this.scrollLines(F)}registerEscHandler(P,F){return this._inputHandler.registerEscHandler(P,F)}registerDcsHandler(P,F){return this._inputHandler.registerDcsHandler(P,F)}registerCsiHandler(P,F){return this._inputHandler.registerCsiHandler(P,F)}registerOscHandler(P,F){return this._inputHandler.registerOscHandler(P,F)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let P=!1;const F=this.optionsService.rawOptions.windowsPty;F&&F.buildNumber!==void 0&&F.buildNumber!==void 0?P=F.backend==="conpty"&&F.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(w.updateWindowsModeWrappedState.bind(null,this._bufferService))),P.push(this.registerCsiHandler({final:"H"},(()=>((0,w.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,h.toDisposable)((()=>{for(const F of P)F.dispose()}))}}}c.CoreTerminal=B},8460:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.runAndSubscribe=c.forwardEvent=c.EventEmitter=void 0,c.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let h=0;h<this._listeners.length;h++)if(this._listeners[h]===u)return void this._listeners.splice(h,1)}}})),this._event}fire(u,h){const v=[];for(let f=0;f<this._listeners.length;f++)v.push(this._listeners[f]);for(let f=0;f<v.length;f++)v[f].call(void 0,u,h)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},c.forwardEvent=function(u,h){return u((v=>h.fire(v)))},c.runAndSubscribe=function(u,h){return h(void 0),u((v=>h(v)))}},5435:function(b,c,u){var h=this&&this.__decorate||function(K,O,H,M){var U,V=arguments.length,ae=V<3?O:M===null?M=Object.getOwnPropertyDescriptor(O,H):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ae=Reflect.decorate(K,O,H,M);else for(var ce=K.length-1;ce>=0;ce--)(U=K[ce])&&(ae=(V<3?U(ae):V>3?U(O,H,ae):U(O,H))||ae);return V>3&&ae&&Object.defineProperty(O,H,ae),ae},v=this&&this.__param||function(K,O){return function(H,M){O(H,M,K)}};Object.defineProperty(c,"__esModule",{value:!0}),c.InputHandler=c.WindowsOptionsReportType=void 0;const f=u(2584),C=u(7116),x=u(2015),A=u(844),E=u(482),p=u(8437),S=u(8460),_=u(643),g=u(511),w=u(3734),R=u(2585),L=u(1480),D=u(6242),T=u(6351),B=u(5941),W={"(":0,")":1,"*":2,"+":3,"-":1,".":2},P=131072;function F(K,O){if(K>24)return O.setWinLines||!1;switch(K){case 1:return!!O.restoreWin;case 2:return!!O.minimizeWin;case 3:return!!O.setWinPosition;case 4:return!!O.setWinSizePixels;case 5:return!!O.raiseWin;case 6:return!!O.lowerWin;case 7:return!!O.refreshWin;case 8:return!!O.setWinSizeChars;case 9:return!!O.maximizeWin;case 10:return!!O.fullscreenWin;case 11:return!!O.getWinState;case 13:return!!O.getWinPosition;case 14:return!!O.getWinSizePixels;case 15:return!!O.getScreenSizePixels;case 16:return!!O.getCellSizePixels;case 18:return!!O.getWinSizeChars;case 19:return!!O.getScreenSizeChars;case 20:return!!O.getIconTitle;case 21:return!!O.getWinTitle;case 22:return!!O.pushTitle;case 23:return!!O.popTitle;case 24:return!!O.setWinLines}return!1}var I;(function(K){K[K.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",K[K.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(I||(c.WindowsOptionsReportType=I={}));let Z=0;class ee extends A.Disposable{getAttrData(){return this._curAttrData}constructor(O,H,M,U,V,ae,ce,me,Q=new x.EscapeSequenceParser){super(),this._bufferService=O,this._charsetService=H,this._coreService=M,this._logService=U,this._optionsService=V,this._oscLinkService=ae,this._coreMouseService=ce,this._unicodeService=me,this._parser=Q,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new E.StringToUtf32,this._utf8Decoder=new E.Utf8ToUtf32,this._workCell=new g.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=p.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=p.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new S.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new S.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new S.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new S.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new S.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new S.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new S.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new S.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new S.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new S.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new S.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new S.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new S.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 j(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(($=>this._activeBuffer=$.activeBuffer))),this._parser.setCsiHandlerFallback((($,oe)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString($),params:oe.toArray()})})),this._parser.setEscHandlerFallback(($=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString($)})})),this._parser.setExecuteHandlerFallback(($=>{this._logService.debug("Unknown EXECUTE code: ",{code:$})})),this._parser.setOscHandlerFallback((($,oe,_e)=>{this._logService.debug("Unknown OSC code: ",{identifier:$,action:oe,data:_e})})),this._parser.setDcsHandlerFallback((($,oe,_e)=>{oe==="HOOK"&&(_e=_e.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString($),action:oe,payload:_e})})),this._parser.setPrintHandler((($,oe,_e)=>this.print($,oe,_e))),this._parser.registerCsiHandler({final:"@"},($=>this.insertChars($))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},($=>this.scrollLeft($))),this._parser.registerCsiHandler({final:"A"},($=>this.cursorUp($))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},($=>this.scrollRight($))),this._parser.registerCsiHandler({final:"B"},($=>this.cursorDown($))),this._parser.registerCsiHandler({final:"C"},($=>this.cursorForward($))),this._parser.registerCsiHandler({final:"D"},($=>this.cursorBackward($))),this._parser.registerCsiHandler({final:"E"},($=>this.cursorNextLine($))),this._parser.registerCsiHandler({final:"F"},($=>this.cursorPrecedingLine($))),this._parser.registerCsiHandler({final:"G"},($=>this.cursorCharAbsolute($))),this._parser.registerCsiHandler({final:"H"},($=>this.cursorPosition($))),this._parser.registerCsiHandler({final:"I"},($=>this.cursorForwardTab($))),this._parser.registerCsiHandler({final:"J"},($=>this.eraseInDisplay($,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},($=>this.eraseInDisplay($,!0))),this._parser.registerCsiHandler({final:"K"},($=>this.eraseInLine($,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},($=>this.eraseInLine($,!0))),this._parser.registerCsiHandler({final:"L"},($=>this.insertLines($))),this._parser.registerCsiHandler({final:"M"},($=>this.deleteLines($))),this._parser.registerCsiHandler({final:"P"},($=>this.deleteChars($))),this._parser.registerCsiHandler({final:"S"},($=>this.scrollUp($))),this._parser.registerCsiHandler({final:"T"},($=>this.scrollDown($))),this._parser.registerCsiHandler({final:"X"},($=>this.eraseChars($))),this._parser.registerCsiHandler({final:"Z"},($=>this.cursorBackwardTab($))),this._parser.registerCsiHandler({final:"`"},($=>this.charPosAbsolute($))),this._parser.registerCsiHandler({final:"a"},($=>this.hPositionRelative($))),this._parser.registerCsiHandler({final:"b"},($=>this.repeatPrecedingCharacter($))),this._parser.registerCsiHandler({final:"c"},($=>this.sendDeviceAttributesPrimary($))),this._parser.registerCsiHandler({prefix:">",final:"c"},($=>this.sendDeviceAttributesSecondary($))),this._parser.registerCsiHandler({final:"d"},($=>this.linePosAbsolute($))),this._parser.registerCsiHandler({final:"e"},($=>this.vPositionRelative($))),this._parser.registerCsiHandler({final:"f"},($=>this.hVPosition($))),this._parser.registerCsiHandler({final:"g"},($=>this.tabClear($))),this._parser.registerCsiHandler({final:"h"},($=>this.setMode($))),this._parser.registerCsiHandler({prefix:"?",final:"h"},($=>this.setModePrivate($))),this._parser.registerCsiHandler({final:"l"},($=>this.resetMode($))),this._parser.registerCsiHandler({prefix:"?",final:"l"},($=>this.resetModePrivate($))),this._parser.registerCsiHandler({final:"m"},($=>this.charAttributes($))),this._parser.registerCsiHandler({final:"n"},($=>this.deviceStatus($))),this._parser.registerCsiHandler({prefix:"?",final:"n"},($=>this.deviceStatusPrivate($))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},($=>this.softReset($))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},($=>this.setCursorStyle($))),this._parser.registerCsiHandler({final:"r"},($=>this.setScrollRegion($))),this._parser.registerCsiHandler({final:"s"},($=>this.saveCursor($))),this._parser.registerCsiHandler({final:"t"},($=>this.windowOptions($))),this._parser.registerCsiHandler({final:"u"},($=>this.restoreCursor($))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},($=>this.insertColumns($))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},($=>this.deleteColumns($))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},($=>this.selectProtected($))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},($=>this.requestMode($,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},($=>this.requestMode($,!1))),this._parser.setExecuteHandler(f.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(f.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(f.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(f.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(f.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(f.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(f.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(f.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(f.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new D.OscHandler(($=>(this.setTitle($),this.setIconName($),!0)))),this._parser.registerOscHandler(1,new D.OscHandler(($=>this.setIconName($)))),this._parser.registerOscHandler(2,new D.OscHandler(($=>this.setTitle($)))),this._parser.registerOscHandler(4,new D.OscHandler(($=>this.setOrReportIndexedColor($)))),this._parser.registerOscHandler(8,new D.OscHandler(($=>this.setHyperlink($)))),this._parser.registerOscHandler(10,new D.OscHandler(($=>this.setOrReportFgColor($)))),this._parser.registerOscHandler(11,new D.OscHandler(($=>this.setOrReportBgColor($)))),this._parser.registerOscHandler(12,new D.OscHandler(($=>this.setOrReportCursorColor($)))),this._parser.registerOscHandler(104,new D.OscHandler(($=>this.restoreIndexedColor($)))),this._parser.registerOscHandler(110,new D.OscHandler(($=>this.restoreFgColor($)))),this._parser.registerOscHandler(111,new D.OscHandler(($=>this.restoreBgColor($)))),this._parser.registerOscHandler(112,new D.OscHandler(($=>this.restoreCursorColor($)))),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 $ in C.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:$},(()=>this.selectCharset("("+$))),this._parser.registerEscHandler({intermediates:")",final:$},(()=>this.selectCharset(")"+$))),this._parser.registerEscHandler({intermediates:"*",final:$},(()=>this.selectCharset("*"+$))),this._parser.registerEscHandler({intermediates:"+",final:$},(()=>this.selectCharset("+"+$))),this._parser.registerEscHandler({intermediates:"-",final:$},(()=>this.selectCharset("-"+$))),this._parser.registerEscHandler({intermediates:".",final:$},(()=>this.selectCharset("."+$))),this._parser.registerEscHandler({intermediates:"/",final:$},(()=>this.selectCharset("/"+$)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler(($=>(this._logService.error("Parsing error: ",$),$))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new T.DcsHandler((($,oe)=>this.requestStatusString($,oe))))}_preserveStack(O,H,M,U){this._parseStack.paused=!0,this._parseStack.cursorStartX=O,this._parseStack.cursorStartY=H,this._parseStack.decodedLength=M,this._parseStack.position=U}_logSlowResolvingAsync(O){this._logService.logLevel<=R.LogLevelEnum.WARN&&Promise.race([O,new Promise(((H,M)=>setTimeout((()=>M("#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(O,H){let M,U=this._activeBuffer.x,V=this._activeBuffer.y,ae=0;const ce=this._parseStack.paused;if(ce){if(M=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,H))return this._logSlowResolvingAsync(M),M;U=this._parseStack.cursorStartX,V=this._parseStack.cursorStartY,this._parseStack.paused=!1,O.length>P&&(ae=this._parseStack.position+P)}if(this._logService.logLevel<=R.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof O=="string"?` "${O}"`:` "${Array.prototype.map.call(O,($=>String.fromCharCode($))).join("")}"`),typeof O=="string"?O.split("").map(($=>$.charCodeAt(0))):O),this._parseBuffer.length<O.length&&this._parseBuffer.length<P&&(this._parseBuffer=new Uint32Array(Math.min(O.length,P))),ce||this._dirtyRowTracker.clearRange(),O.length>P)for(let $=ae;$<O.length;$+=P){const oe=$+P<O.length?$+P:O.length,_e=typeof O=="string"?this._stringDecoder.decode(O.substring($,oe),this._parseBuffer):this._utf8Decoder.decode(O.subarray($,oe),this._parseBuffer);if(M=this._parser.parse(this._parseBuffer,_e))return this._preserveStack(U,V,_e,$),this._logSlowResolvingAsync(M),M}else if(!ce){const $=typeof O=="string"?this._stringDecoder.decode(O,this._parseBuffer):this._utf8Decoder.decode(O,this._parseBuffer);if(M=this._parser.parse(this._parseBuffer,$))return this._preserveStack(U,V,$,0),this._logSlowResolvingAsync(M),M}this._activeBuffer.x===U&&this._activeBuffer.y===V||this._onCursorMove.fire();const me=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),Q=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);Q<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(Q,this._bufferService.rows-1),Math.min(me,this._bufferService.rows-1))}print(O,H,M){let U,V;const ae=this._charsetService.charset,ce=this._optionsService.rawOptions.screenReaderMode,me=this._bufferService.cols,Q=this._coreService.decPrivateModes.wraparound,$=this._coreService.modes.insertMode,oe=this._curAttrData;let _e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&M-H>0&&_e.getWidth(this._activeBuffer.x-1)===2&&_e.setCellFromCodepoint(this._activeBuffer.x-1,0,1,oe);let Se=this._parser.precedingJoinState;for(let be=H;be<M;++be){if(U=O[be],U<127&&ae){const Ct=ae[String.fromCharCode(U)];Ct&&(U=Ct.charCodeAt(0))}const $e=this._unicodeService.charProperties(U,Se);V=L.UnicodeService.extractWidth($e);const je=L.UnicodeService.extractShouldJoin($e),Ke=je?L.UnicodeService.extractWidth(Se):0;if(Se=$e,ce&&this._onA11yChar.fire((0,E.stringFromCodePoint)(U)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+V-Ke>me){if(Q){const Ct=_e;let Be=this._activeBuffer.x-Ke;for(this._activeBuffer.x=Ke,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),_e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Ke>0&&_e instanceof p.BufferLine&&_e.copyCellsFrom(Ct,Be,0,Ke,!1);Be<me;)Ct.setCellFromCodepoint(Be++,0,1,oe)}else if(this._activeBuffer.x=me-1,V===2)continue}if(je&&this._activeBuffer.x){const Ct=_e.getWidth(this._activeBuffer.x-1)?1:2;_e.addCodepointToCell(this._activeBuffer.x-Ct,U,V);for(let Be=V-Ke;--Be>=0;)_e.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}else if($&&(_e.insertCells(this._activeBuffer.x,V-Ke,this._activeBuffer.getNullCell(oe)),_e.getWidth(me-1)===2&&_e.setCellFromCodepoint(me-1,_.NULL_CELL_CODE,_.NULL_CELL_WIDTH,oe)),_e.setCellFromCodepoint(this._activeBuffer.x++,U,V,oe),V>0)for(;--V;)_e.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}this._parser.precedingJoinState=Se,this._activeBuffer.x<me&&M-H>0&&_e.getWidth(this._activeBuffer.x)===0&&!_e.hasContent(this._activeBuffer.x)&&_e.setCellFromCodepoint(this._activeBuffer.x,0,1,oe),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(O,H){return O.final!=="t"||O.prefix||O.intermediates?this._parser.registerCsiHandler(O,H):this._parser.registerCsiHandler(O,(M=>!F(M.params[0],this._optionsService.rawOptions.windowOptions)||H(M)))}registerDcsHandler(O,H){return this._parser.registerDcsHandler(O,new T.DcsHandler(H))}registerEscHandler(O,H){return this._parser.registerEscHandler(O,H)}registerOscHandler(O,H){return this._parser.registerOscHandler(O,new D.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(){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&&this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)?.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);O.hasWidth(this._activeBuffer.x)&&!O.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const O=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-O),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(O=this._bufferService.cols-1){this._activeBuffer.x=Math.min(O,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(O,H){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=O,this._activeBuffer.y=this._activeBuffer.scrollTop+H):(this._activeBuffer.x=O,this._activeBuffer.y=H),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(O,H){this._restrictCursor(),this._setCursor(this._activeBuffer.x+O,this._activeBuffer.y+H)}cursorUp(O){const H=this._activeBuffer.y-this._activeBuffer.scrollTop;return H>=0?this._moveCursor(0,-Math.min(H,O.params[0]||1)):this._moveCursor(0,-(O.params[0]||1)),!0}cursorDown(O){const H=this._activeBuffer.scrollBottom-this._activeBuffer.y;return H>=0?this._moveCursor(0,Math.min(H,O.params[0]||1)):this._moveCursor(0,O.params[0]||1),!0}cursorForward(O){return this._moveCursor(O.params[0]||1,0),!0}cursorBackward(O){return this._moveCursor(-(O.params[0]||1),0),!0}cursorNextLine(O){return this.cursorDown(O),this._activeBuffer.x=0,!0}cursorPrecedingLine(O){return this.cursorUp(O),this._activeBuffer.x=0,!0}cursorCharAbsolute(O){return this._setCursor((O.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(O){return this._setCursor(O.length>=2?(O.params[1]||1)-1:0,(O.params[0]||1)-1),!0}charPosAbsolute(O){return this._setCursor((O.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(O){return this._moveCursor(O.params[0]||1,0),!0}linePosAbsolute(O){return this._setCursor(this._activeBuffer.x,(O.params[0]||1)-1),!0}vPositionRelative(O){return this._moveCursor(0,O.params[0]||1),!0}hVPosition(O){return this.cursorPosition(O),!0}tabClear(O){const H=O.params[0];return H===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:H===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(O){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let H=O.params[0]||1;for(;H--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(O){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let H=O.params[0]||1;for(;H--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(O){const H=O.params[0];return H===1&&(this._curAttrData.bg|=536870912),H!==2&&H!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(O,H,M,U=!1,V=!1){const ae=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);ae.replaceCells(H,M,this._activeBuffer.getNullCell(this._eraseAttrData()),V),U&&(ae.isWrapped=!1)}_resetBufferLine(O,H=!1){const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);M&&(M.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),H),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+O),M.isWrapped=!1)}eraseInDisplay(O,H=!1){let M;switch(this._restrictCursor(this._bufferService.cols),O.params[0]){case 0:for(M=this._activeBuffer.y,this._dirtyRowTracker.markDirty(M),this._eraseInBufferLine(M++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,H);M<this._bufferService.rows;M++)this._resetBufferLine(M,H);this._dirtyRowTracker.markDirty(M);break;case 1:for(M=this._activeBuffer.y,this._dirtyRowTracker.markDirty(M),this._eraseInBufferLine(M,0,this._activeBuffer.x+1,!0,H),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(M+1).isWrapped=!1);M--;)this._resetBufferLine(M,H);this._dirtyRowTracker.markDirty(0);break;case 2:for(M=this._bufferService.rows,this._dirtyRowTracker.markDirty(M-1);M--;)this._resetBufferLine(M,H);this._dirtyRowTracker.markDirty(0);break;case 3:const U=this._activeBuffer.lines.length-this._bufferService.rows;U>0&&(this._activeBuffer.lines.trimStart(U),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-U,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-U,0),this._onScroll.fire(0))}return!0}eraseInLine(O,H=!1){switch(this._restrictCursor(this._bufferService.cols),O.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(O){this._restrictCursor();let H=O.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=this._activeBuffer.ybase+this._activeBuffer.y,U=this._bufferService.rows-1-this._activeBuffer.scrollBottom,V=this._bufferService.rows-1+this._activeBuffer.ybase-U+1;for(;H--;)this._activeBuffer.lines.splice(V-1,1),this._activeBuffer.lines.splice(M,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(O){this._restrictCursor();let H=O.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=this._activeBuffer.ybase+this._activeBuffer.y;let U;for(U=this._bufferService.rows-1-this._activeBuffer.scrollBottom,U=this._bufferService.rows-1+this._activeBuffer.ybase-U;H--;)this._activeBuffer.lines.splice(M,1),this._activeBuffer.lines.splice(U,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(O){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.insertCells(this._activeBuffer.x,O.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(O){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.deleteCells(this._activeBuffer.x,O.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(O){let H=O.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(O){let H=O.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(p.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(O){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=O.params[0]||1;for(let M=this._activeBuffer.scrollTop;M<=this._activeBuffer.scrollBottom;++M){const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+M);U.deleteCells(0,H,this._activeBuffer.getNullCell(this._eraseAttrData())),U.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(O){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=O.params[0]||1;for(let M=this._activeBuffer.scrollTop;M<=this._activeBuffer.scrollBottom;++M){const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+M);U.insertCells(0,H,this._activeBuffer.getNullCell(this._eraseAttrData())),U.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(O){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=O.params[0]||1;for(let M=this._activeBuffer.scrollTop;M<=this._activeBuffer.scrollBottom;++M){const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+M);U.insertCells(this._activeBuffer.x,H,this._activeBuffer.getNullCell(this._eraseAttrData())),U.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(O){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=O.params[0]||1;for(let M=this._activeBuffer.scrollTop;M<=this._activeBuffer.scrollBottom;++M){const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+M);U.deleteCells(this._activeBuffer.x,H,this._activeBuffer.getNullCell(this._eraseAttrData())),U.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(O){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(O.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(O){const H=this._parser.precedingJoinState;if(!H)return!0;const M=O.params[0]||1,U=L.UnicodeService.extractWidth(H),V=this._activeBuffer.x-U,ae=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(V),ce=new Uint32Array(ae.length*M);let me=0;for(let $=0;$<ae.length;){const oe=ae.codePointAt($)||0;ce[me++]=oe,$+=oe>65535?2:1}let Q=me;for(let $=1;$<M;++$)ce.copyWithin(Q,0,me),Q+=me;return this.print(ce,0,Q),!0}sendDeviceAttributesPrimary(O){return O.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(f.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(f.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(O){return O.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(f.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(f.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(O.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(f.C0.ESC+"[>83;40003;0c")),!0}_is(O){return(this._optionsService.rawOptions.termName+"").indexOf(O)===0}setMode(O){for(let H=0;H<O.length;H++)switch(O.params[H]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(O){for(let H=0;H<O.length;H++)switch(O.params[H]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,C.DEFAULT_CHARSET),this._charsetService.setgCharset(1,C.DEFAULT_CHARSET),this._charsetService.setgCharset(2,C.DEFAULT_CHARSET),this._charsetService.setgCharset(3,C.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(O){for(let H=0;H<O.length;H++)switch(O.params[H]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(O){for(let H=0;H<O.length;H++)switch(O.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(),O.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(O,H){const M=this._coreService.decPrivateModes,{activeProtocol:U,activeEncoding:V}=this._coreMouseService,ae=this._coreService,{buffers:ce,cols:me}=this._bufferService,{active:Q,alt:$}=ce,oe=this._optionsService.rawOptions,_e=je=>je?1:2,Se=O.params[0];return be=Se,$e=H?Se===2?4:Se===4?_e(ae.modes.insertMode):Se===12?3:Se===20?_e(oe.convertEol):0:Se===1?_e(M.applicationCursorKeys):Se===3?oe.windowOptions.setWinLines?me===80?2:me===132?1:0:0:Se===6?_e(M.origin):Se===7?_e(M.wraparound):Se===8?3:Se===9?_e(U==="X10"):Se===12?_e(oe.cursorBlink):Se===25?_e(!ae.isCursorHidden):Se===45?_e(M.reverseWraparound):Se===66?_e(M.applicationKeypad):Se===67?4:Se===1e3?_e(U==="VT200"):Se===1002?_e(U==="DRAG"):Se===1003?_e(U==="ANY"):Se===1004?_e(M.sendFocus):Se===1005?4:Se===1006?_e(V==="SGR"):Se===1015?4:Se===1016?_e(V==="SGR_PIXELS"):Se===1048?1:Se===47||Se===1047||Se===1049?_e(Q===$):Se===2004?_e(M.bracketedPasteMode):0,ae.triggerDataEvent(`${f.C0.ESC}[${H?"":"?"}${be};${$e}$y`),!0;var be,$e}_updateAttrColor(O,H,M,U,V){return H===2?(O|=50331648,O&=-16777216,O|=w.AttributeData.fromColorRGB([M,U,V])):H===5&&(O&=-50331904,O|=33554432|255&M),O}_extractColor(O,H,M){const U=[0,0,-1,0,0,0];let V=0,ae=0;do{if(U[ae+V]=O.params[H+ae],O.hasSubParams(H+ae)){const ce=O.getSubParams(H+ae);let me=0;do U[1]===5&&(V=1),U[ae+me+1+V]=ce[me];while(++me<ce.length&&me+ae+1+V<U.length);break}if(U[1]===5&&ae+V>=2||U[1]===2&&ae+V>=5)break;U[1]&&(V=1)}while(++ae+H<O.length&&ae+V<U.length);for(let ce=2;ce<U.length;++ce)U[ce]===-1&&(U[ce]=0);switch(U[0]){case 38:M.fg=this._updateAttrColor(M.fg,U[1],U[3],U[4],U[5]);break;case 48:M.bg=this._updateAttrColor(M.bg,U[1],U[3],U[4],U[5]);break;case 58:M.extended=M.extended.clone(),M.extended.underlineColor=this._updateAttrColor(M.extended.underlineColor,U[1],U[3],U[4],U[5])}return ae}_processUnderline(O,H){H.extended=H.extended.clone(),(!~O||O>5)&&(O=1),H.extended.underlineStyle=O,H.fg|=268435456,O===0&&(H.fg&=-268435457),H.updateExtended()}_processSGR0(O){O.fg=p.DEFAULT_ATTR_DATA.fg,O.bg=p.DEFAULT_ATTR_DATA.bg,O.extended=O.extended.clone(),O.extended.underlineStyle=0,O.extended.underlineColor&=-67108864,O.updateExtended()}charAttributes(O){if(O.length===1&&O.params[0]===0)return this._processSGR0(this._curAttrData),!0;const H=O.length;let M;const U=this._curAttrData;for(let V=0;V<H;V++)M=O.params[V],M>=30&&M<=37?(U.fg&=-50331904,U.fg|=16777216|M-30):M>=40&&M<=47?(U.bg&=-50331904,U.bg|=16777216|M-40):M>=90&&M<=97?(U.fg&=-50331904,U.fg|=16777224|M-90):M>=100&&M<=107?(U.bg&=-50331904,U.bg|=16777224|M-100):M===0?this._processSGR0(U):M===1?U.fg|=134217728:M===3?U.bg|=67108864:M===4?(U.fg|=268435456,this._processUnderline(O.hasSubParams(V)?O.getSubParams(V)[0]:1,U)):M===5?U.fg|=536870912:M===7?U.fg|=67108864:M===8?U.fg|=1073741824:M===9?U.fg|=2147483648:M===2?U.bg|=134217728:M===21?this._processUnderline(2,U):M===22?(U.fg&=-134217729,U.bg&=-134217729):M===23?U.bg&=-67108865:M===24?(U.fg&=-268435457,this._processUnderline(0,U)):M===25?U.fg&=-536870913:M===27?U.fg&=-67108865:M===28?U.fg&=-1073741825:M===29?U.fg&=2147483647:M===39?(U.fg&=-67108864,U.fg|=16777215&p.DEFAULT_ATTR_DATA.fg):M===49?(U.bg&=-67108864,U.bg|=16777215&p.DEFAULT_ATTR_DATA.bg):M===38||M===48||M===58?V+=this._extractColor(O,V,U):M===53?U.bg|=1073741824:M===55?U.bg&=-1073741825:M===59?(U.extended=U.extended.clone(),U.extended.underlineColor=-1,U.updateExtended()):M===100?(U.fg&=-67108864,U.fg|=16777215&p.DEFAULT_ATTR_DATA.fg,U.bg&=-67108864,U.bg|=16777215&p.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",M);return!0}deviceStatus(O){switch(O.params[0]){case 5:this._coreService.triggerDataEvent(`${f.C0.ESC}[0n`);break;case 6:const H=this._activeBuffer.y+1,M=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[${H};${M}R`)}return!0}deviceStatusPrivate(O){if(O.params[0]===6){const H=this._activeBuffer.y+1,M=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[?${H};${M}R`)}return!0}softReset(O){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=p.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(O){const H=O.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 M=H%2==1;return this._optionsService.options.cursorBlink=M,!0}setScrollRegion(O){const H=O.params[0]||1;let M;return(O.length<2||(M=O.params[1])>this._bufferService.rows||M===0)&&(M=this._bufferService.rows),M>H&&(this._activeBuffer.scrollTop=H-1,this._activeBuffer.scrollBottom=M-1,this._setCursor(0,0)),!0}windowOptions(O){if(!F(O.params[0],this._optionsService.rawOptions.windowOptions))return!0;const H=O.length>1?O.params[1]:0;switch(O.params[0]){case 14:H!==2&&this._onRequestWindowsOptionsReport.fire(I.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(I.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${f.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(O){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(O){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(O){return this._windowTitle=O,this._onTitleChange.fire(O),!0}setIconName(O){return this._iconName=O,!0}setOrReportIndexedColor(O){const H=[],M=O.split(";");for(;M.length>1;){const U=M.shift(),V=M.shift();if(/^\d+$/.exec(U)){const ae=parseInt(U);if(Y(ae))if(V==="?")H.push({type:0,index:ae});else{const ce=(0,B.parseColor)(V);ce&&H.push({type:1,index:ae,color:ce})}}}return H.length&&this._onColor.fire(H),!0}setHyperlink(O){const H=O.split(";");return!(H.length<2)&&(H[1]?this._createHyperlink(H[0],H[1]):!H[0]&&this._finishHyperlink())}_createHyperlink(O,H){this._getCurrentLinkId()&&this._finishHyperlink();const M=O.split(":");let U;const V=M.findIndex((ae=>ae.startsWith("id=")));return V!==-1&&(U=M[V].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:U,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(O,H){const M=O.split(";");for(let U=0;U<M.length&&!(H>=this._specialColors.length);++U,++H)if(M[U]==="?")this._onColor.fire([{type:0,index:this._specialColors[H]}]);else{const V=(0,B.parseColor)(M[U]);V&&this._onColor.fire([{type:1,index:this._specialColors[H],color:V}])}return!0}setOrReportFgColor(O){return this._setOrReportSpecialColor(O,0)}setOrReportBgColor(O){return this._setOrReportSpecialColor(O,1)}setOrReportCursorColor(O){return this._setOrReportSpecialColor(O,2)}restoreIndexedColor(O){if(!O)return this._onColor.fire([{type:2}]),!0;const H=[],M=O.split(";");for(let U=0;U<M.length;++U)if(/^\d+$/.exec(M[U])){const V=parseInt(M[U]);Y(V)&&H.push({type:2,index:V})}return H.length&&this._onColor.fire(H),!0}restoreFgColor(O){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(O){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(O){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,C.DEFAULT_CHARSET),!0}selectCharset(O){return O.length!==2?(this.selectDefaultCharset(),!0):(O[0]==="/"||this._charsetService.setgCharset(W[O[0]],C.CHARSETS[O[1]]||C.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 O=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,O,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=p.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=p.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(O){return this._charsetService.setgLevel(O),!0}screenAlignmentPattern(){const O=new g.CellData;O.content=4194373,O.fg=this._curAttrData.fg,O.bg=this._curAttrData.bg,this._setCursor(0,0);for(let H=0;H<this._bufferService.rows;++H){const M=this._activeBuffer.ybase+this._activeBuffer.y+H,U=this._activeBuffer.lines.get(M);U&&(U.fill(O),U.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(O,H){const M=this._bufferService.buffer,U=this._optionsService.rawOptions;return(V=>(this._coreService.triggerDataEvent(`${f.C0.ESC}${V}${f.C0.ESC}\\`),!0))(O==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:O==='"p'?'P1$r61;1"p':O==="r"?`P1$r${M.scrollTop+1};${M.scrollBottom+1}r`:O==="m"?"P1$r0m":O===" q"?`P1$r${{block:2,underline:4,bar:6}[U.cursorStyle]-(U.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(O,H){this._dirtyRowTracker.markRangeDirty(O,H)}}c.InputHandler=ee;let j=class{constructor(K){this._bufferService=K,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(K){K<this.start?this.start=K:K>this.end&&(this.end=K)}markRangeDirty(K,O){K>O&&(Z=K,K=O,O=Z),K<this.start&&(this.start=K),O>this.end&&(this.end=O)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Y(K){return 0<=K&&K<256}j=h([v(0,R.IBufferService)],j)},844:(b,c)=>{function u(h){for(const v of h)v.dispose();h.length=0}Object.defineProperty(c,"__esModule",{value:!0}),c.getDisposeArrayDisposable=c.disposeArray=c.toDisposable=c.MutableDisposable=c.Disposable=void 0,c.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const h of this._disposables)h.dispose();this._disposables.length=0}register(h){return this._disposables.push(h),h}unregister(h){const v=this._disposables.indexOf(h);v!==-1&&this._disposables.splice(v,1)}},c.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(h){this._isDisposed||h===this._value||(this._value?.dispose(),this._value=h)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}},c.toDisposable=function(h){return{dispose:h}},c.disposeArray=u,c.getDisposeArrayDisposable=function(h){return{dispose:()=>u(h)}}},1505:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.FourKeyMap=c.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(v,f,C){this._data[v]||(this._data[v]={}),this._data[v][f]=C}get(v,f){return this._data[v]?this._data[v][f]:void 0}clear(){this._data={}}}c.TwoKeyMap=u,c.FourKeyMap=class{constructor(){this._data=new u}set(h,v,f,C,x){this._data.get(h,v)||this._data.set(h,v,new u),this._data.get(h,v).set(f,C,x)}get(h,v,f,C){return this._data.get(h,v)?.get(f,C)}clear(){this._data.clear()}}},6114:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.isChromeOS=c.isLinux=c.isWindows=c.isIphone=c.isIpad=c.isMac=c.getSafariVersion=c.isSafari=c.isLegacyEdge=c.isFirefox=c.isNode=void 0,c.isNode=typeof process<"u"&&"title"in process;const u=c.isNode?"node":navigator.userAgent,h=c.isNode?"node":navigator.platform;c.isFirefox=u.includes("Firefox"),c.isLegacyEdge=u.includes("Edge"),c.isSafari=/^((?!chrome|android).)*safari/i.test(u),c.getSafariVersion=function(){if(!c.isSafari)return 0;const v=u.match(/Version\/(\d+)/);return v===null||v.length<2?0:parseInt(v[1])},c.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(h),c.isIpad=h==="iPad",c.isIphone=h==="iPhone",c.isWindows=["Windows","Win16","Win32","WinCE"].includes(h),c.isLinux=h.indexOf("Linux")>=0,c.isChromeOS=/\bCrOS\b/.test(u)},6106:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.SortedList=void 0;let u=0;c.SortedList=class{constructor(h){this._getKey=h,this._array=[]}clear(){this._array.length=0}insert(h){this._array.length!==0?(u=this._search(this._getKey(h)),this._array.splice(u,0,h)):this._array.push(h)}delete(h){if(this._array.length===0)return!1;const v=this._getKey(h);if(v===void 0||(u=this._search(v),u===-1)||this._getKey(this._array[u])!==v)return!1;do if(this._array[u]===h)return this._array.splice(u,1),!0;while(++u<this._array.length&&this._getKey(this._array[u])===v);return!1}*getKeyIterator(h){if(this._array.length!==0&&(u=this._search(h),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===h))do yield this._array[u];while(++u<this._array.length&&this._getKey(this._array[u])===h)}forEachByKey(h,v){if(this._array.length!==0&&(u=this._search(h),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===h))do v(this._array[u]);while(++u<this._array.length&&this._getKey(this._array[u])===h)}values(){return[...this._array].values()}_search(h){let v=0,f=this._array.length-1;for(;f>=v;){let C=v+f>>1;const x=this._getKey(this._array[C]);if(x>h)f=C-1;else{if(!(x<h)){for(;C>0&&this._getKey(this._array[C-1])===h;)C--;return C}v=C+1}}return v}}},7226:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.DebouncedIdleTask=c.IdleTaskQueue=c.PriorityTaskQueue=void 0;const h=u(6114);class v{constructor(){this._tasks=[],this._i=0}enqueue(x){this._tasks.push(x),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(x){this._idleCallback=void 0;let A=0,E=0,p=x.timeRemaining(),S=0;for(;this._i<this._tasks.length;){if(A=Date.now(),this._tasks[this._i]()||this._i++,A=Math.max(1,Date.now()-A),E=Math.max(A,E),S=x.timeRemaining(),1.5*E>S)return p-A<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(p-A))}ms`),void this._start();p=S}this.clear()}}class f extends v{_requestCallback(x){return setTimeout((()=>x(this._createDeadline(16))))}_cancelCallback(x){clearTimeout(x)}_createDeadline(x){const A=Date.now()+x;return{timeRemaining:()=>Math.max(0,A-Date.now())}}}c.PriorityTaskQueue=f,c.IdleTaskQueue=!h.isNode&&"requestIdleCallback"in window?class extends v{_requestCallback(C){return requestIdleCallback(C)}_cancelCallback(C){cancelIdleCallback(C)}}:f,c.DebouncedIdleTask=class{constructor(){this._queue=new c.IdleTaskQueue}set(C){this._queue.clear(),this._queue.enqueue(C)}flush(){this._queue.flush()}}},9282:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.updateWindowsModeWrappedState=void 0;const h=u(643);c.updateWindowsModeWrappedState=function(v){const f=v.buffer.lines.get(v.buffer.ybase+v.buffer.y-1),C=f?.get(v.cols-1),x=v.buffer.lines.get(v.buffer.ybase+v.buffer.y);x&&C&&(x.isWrapped=C[h.CHAR_DATA_CODE_INDEX]!==h.NULL_CELL_CODE&&C[h.CHAR_DATA_CODE_INDEX]!==h.WHITESPACE_CELL_CODE)}},3734:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ExtendedAttrs=c.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new h}static toColorRGB(f){return[f>>>16&255,f>>>8&255,255&f]}static fromColorRGB(f){return(255&f[0])<<16|(255&f[1])<<8|255&f[2]}clone(){const f=new u;return f.fg=this.fg,f.bg=this.bg,f.extended=this.extended.clone(),f}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}}c.AttributeData=u;class h{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(f){this._ext=f}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(f){this._ext&=-469762049,this._ext|=f<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(f){this._ext&=-67108864,this._ext|=67108863&f}get urlId(){return this._urlId}set urlId(f){this._urlId=f}get underlineVariantOffset(){const f=(3758096384&this._ext)>>29;return f<0?4294967288^f:f}set underlineVariantOffset(f){this._ext&=536870911,this._ext|=f<<29&3758096384}constructor(f=0,C=0){this._ext=0,this._urlId=0,this._ext=f,this._urlId=C}clone(){return new h(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}c.ExtendedAttrs=h},9092:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Buffer=c.MAX_BUFFER_SIZE=void 0;const h=u(6349),v=u(7226),f=u(3734),C=u(8437),x=u(4634),A=u(511),E=u(643),p=u(4863),S=u(7116);c.MAX_BUFFER_SIZE=4294967295,c.Buffer=class{constructor(_,g,w){this._hasScrollback=_,this._optionsService=g,this._bufferService=w,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=C.DEFAULT_ATTR_DATA.clone(),this.savedCharset=S.DEFAULT_CHARSET,this.markers=[],this._nullCell=A.CellData.fromCharData([0,E.NULL_CELL_CHAR,E.NULL_CELL_WIDTH,E.NULL_CELL_CODE]),this._whitespaceCell=A.CellData.fromCharData([0,E.WHITESPACE_CELL_CHAR,E.WHITESPACE_CELL_WIDTH,E.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 h.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(_){return _?(this._nullCell.fg=_.fg,this._nullCell.bg=_.bg,this._nullCell.extended=_.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new f.ExtendedAttrs),this._nullCell}getWhitespaceCell(_){return _?(this._whitespaceCell.fg=_.fg,this._whitespaceCell.bg=_.bg,this._whitespaceCell.extended=_.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new f.ExtendedAttrs),this._whitespaceCell}getBlankLine(_,g){return new C.BufferLine(this._bufferService.cols,this.getNullCell(_),g)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const _=this.ybase+this.y-this.ydisp;return _>=0&&_<this._rows}_getCorrectBufferLength(_){if(!this._hasScrollback)return _;const g=_+this._optionsService.rawOptions.scrollback;return g>c.MAX_BUFFER_SIZE?c.MAX_BUFFER_SIZE:g}fillViewportRows(_){if(this.lines.length===0){_===void 0&&(_=C.DEFAULT_ATTR_DATA);let g=this._rows;for(;g--;)this.lines.push(this.getBlankLine(_))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new h.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(_,g){const w=this.getNullCell(C.DEFAULT_ATTR_DATA);let R=0;const L=this._getCorrectBufferLength(g);if(L>this.lines.maxLength&&(this.lines.maxLength=L),this.lines.length>0){if(this._cols<_)for(let T=0;T<this.lines.length;T++)R+=+this.lines.get(T).resize(_,w);let D=0;if(this._rows<g)for(let T=this._rows;T<g;T++)this.lines.length<g+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new C.BufferLine(_,w)):this.ybase>0&&this.lines.length<=this.ybase+this.y+D+1?(this.ybase--,D++,this.ydisp>0&&this.ydisp--):this.lines.push(new C.BufferLine(_,w)));else for(let T=this._rows;T>g;T--)this.lines.length>g+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(L<this.lines.maxLength){const T=this.lines.length-L;T>0&&(this.lines.trimStart(T),this.ybase=Math.max(this.ybase-T,0),this.ydisp=Math.max(this.ydisp-T,0),this.savedY=Math.max(this.savedY-T,0)),this.lines.maxLength=L}this.x=Math.min(this.x,_-1),this.y=Math.min(this.y,g-1),D&&(this.y+=D),this.savedX=Math.min(this.savedX,_-1),this.scrollTop=0}if(this.scrollBottom=g-1,this._isReflowEnabled&&(this._reflow(_,g),this._cols>_))for(let D=0;D<this.lines.length;D++)R+=+this.lines.get(D).resize(_,w);this._cols=_,this._rows=g,this._memoryCleanupQueue.clear(),R>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let _=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,_=!1);let g=0;for(;this._memoryCleanupPosition<this.lines.length;)if(g+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),g>100)return!0;return _}get _isReflowEnabled(){const _=this._optionsService.rawOptions.windowsPty;return _&&_.buildNumber?this._hasScrollback&&_.backend==="conpty"&&_.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(_,g){this._cols!==_&&(_>this._cols?this._reflowLarger(_,g):this._reflowSmaller(_,g))}_reflowLarger(_,g){const w=(0,x.reflowLargerGetLinesToRemove)(this.lines,this._cols,_,this.ybase+this.y,this.getNullCell(C.DEFAULT_ATTR_DATA));if(w.length>0){const R=(0,x.reflowLargerCreateNewLayout)(this.lines,w);(0,x.reflowLargerApplyNewLayout)(this.lines,R.layout),this._reflowLargerAdjustViewport(_,g,R.countRemoved)}}_reflowLargerAdjustViewport(_,g,w){const R=this.getNullCell(C.DEFAULT_ATTR_DATA);let L=w;for(;L-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<g&&this.lines.push(new C.BufferLine(_,R))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-w,0)}_reflowSmaller(_,g){const w=this.getNullCell(C.DEFAULT_ATTR_DATA),R=[];let L=0;for(let D=this.lines.length-1;D>=0;D--){let T=this.lines.get(D);if(!T||!T.isWrapped&&T.getTrimmedLength()<=_)continue;const B=[T];for(;T.isWrapped&&D>0;)T=this.lines.get(--D),B.unshift(T);const W=this.ybase+this.y;if(W>=D&&W<D+B.length)continue;const P=B[B.length-1].getTrimmedLength(),F=(0,x.reflowSmallerGetNewLineLengths)(B,this._cols,_),I=F.length-B.length;let Z;Z=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+I):Math.max(0,this.lines.length-this.lines.maxLength+I);const ee=[];for(let M=0;M<I;M++){const U=this.getBlankLine(C.DEFAULT_ATTR_DATA,!0);ee.push(U)}ee.length>0&&(R.push({start:D+B.length+L,newLines:ee}),L+=ee.length),B.push(...ee);let j=F.length-1,Y=F[j];Y===0&&(j--,Y=F[j]);let K=B.length-I-1,O=P;for(;K>=0;){const M=Math.min(O,Y);if(B[j]===void 0)break;if(B[j].copyCellsFrom(B[K],O-M,Y-M,M,!0),Y-=M,Y===0&&(j--,Y=F[j]),O-=M,O===0){K--;const U=Math.max(K,0);O=(0,x.getWrappedLineTrimmedLength)(B,U,this._cols)}}for(let M=0;M<B.length;M++)F[M]<_&&B[M].setCell(F[M],w);let H=I-Z;for(;H-- >0;)this.ybase===0?this.y<g-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+L)-g&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+I,this.ybase+g-1)}if(R.length>0){const D=[],T=[];for(let j=0;j<this.lines.length;j++)T.push(this.lines.get(j));const B=this.lines.length;let W=B-1,P=0,F=R[P];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+L);let I=0;for(let j=Math.min(this.lines.maxLength-1,B+L-1);j>=0;j--)if(F&&F.start>W+I){for(let Y=F.newLines.length-1;Y>=0;Y--)this.lines.set(j--,F.newLines[Y]);j++,D.push({index:W+1,amount:F.newLines.length}),I+=F.newLines.length,F=R[++P]}else this.lines.set(j,T[W--]);let Z=0;for(let j=D.length-1;j>=0;j--)D[j].index+=Z,this.lines.onInsertEmitter.fire(D[j]),Z+=D[j].amount;const ee=Math.max(0,B+L-this.lines.maxLength);ee>0&&this.lines.onTrimEmitter.fire(ee)}}translateBufferLineToString(_,g,w=0,R){const L=this.lines.get(_);return L?L.translateToString(g,w,R):""}getWrappedRangeForLine(_){let g=_,w=_;for(;g>0&&this.lines.get(g).isWrapped;)g--;for(;w+1<this.lines.length&&this.lines.get(w+1).isWrapped;)w++;return{first:g,last:w}}setupTabStops(_){for(_!=null?this.tabs[_]||(_=this.prevStop(_)):(this.tabs={},_=0);_<this._cols;_+=this._optionsService.rawOptions.tabStopWidth)this.tabs[_]=!0}prevStop(_){for(_==null&&(_=this.x);!this.tabs[--_]&&_>0;);return _>=this._cols?this._cols-1:_<0?0:_}nextStop(_){for(_==null&&(_=this.x);!this.tabs[++_]&&_<this._cols;);return _>=this._cols?this._cols-1:_<0?0:_}clearMarkers(_){this._isClearing=!0;for(let g=0;g<this.markers.length;g++)this.markers[g].line===_&&(this.markers[g].dispose(),this.markers.splice(g--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let _=0;_<this.markers.length;_++)this.markers[_].dispose(),this.markers.splice(_--,1);this._isClearing=!1}addMarker(_){const g=new p.Marker(_);return this.markers.push(g),g.register(this.lines.onTrim((w=>{g.line-=w,g.line<0&&g.dispose()}))),g.register(this.lines.onInsert((w=>{g.line>=w.index&&(g.line+=w.amount)}))),g.register(this.lines.onDelete((w=>{g.line>=w.index&&g.line<w.index+w.amount&&g.dispose(),g.line>w.index&&(g.line-=w.amount)}))),g.register(g.onDispose((()=>this._removeMarker(g)))),g}_removeMarker(_){this._isClearing||this.markers.splice(this.markers.indexOf(_),1)}}},8437:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferLine=c.DEFAULT_ATTR_DATA=void 0;const h=u(3734),v=u(511),f=u(643),C=u(482);c.DEFAULT_ATTR_DATA=Object.freeze(new h.AttributeData);let x=0;class A{constructor(p,S,_=!1){this.isWrapped=_,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*p);const g=S||v.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]);for(let w=0;w<p;++w)this.setCell(w,g);this.length=p}get(p){const S=this._data[3*p+0],_=2097151&S;return[this._data[3*p+1],2097152&S?this._combined[p]:_?(0,C.stringFromCodePoint)(_):"",S>>22,2097152&S?this._combined[p].charCodeAt(this._combined[p].length-1):_]}set(p,S){this._data[3*p+1]=S[f.CHAR_DATA_ATTR_INDEX],S[f.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[p]=S[1],this._data[3*p+0]=2097152|p|S[f.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*p+0]=S[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|S[f.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(p){return this._data[3*p+0]>>22}hasWidth(p){return 12582912&this._data[3*p+0]}getFg(p){return this._data[3*p+1]}getBg(p){return this._data[3*p+2]}hasContent(p){return 4194303&this._data[3*p+0]}getCodePoint(p){const S=this._data[3*p+0];return 2097152&S?this._combined[p].charCodeAt(this._combined[p].length-1):2097151&S}isCombined(p){return 2097152&this._data[3*p+0]}getString(p){const S=this._data[3*p+0];return 2097152&S?this._combined[p]:2097151&S?(0,C.stringFromCodePoint)(2097151&S):""}isProtected(p){return 536870912&this._data[3*p+2]}loadCell(p,S){return x=3*p,S.content=this._data[x+0],S.fg=this._data[x+1],S.bg=this._data[x+2],2097152&S.content&&(S.combinedData=this._combined[p]),268435456&S.bg&&(S.extended=this._extendedAttrs[p]),S}setCell(p,S){2097152&S.content&&(this._combined[p]=S.combinedData),268435456&S.bg&&(this._extendedAttrs[p]=S.extended),this._data[3*p+0]=S.content,this._data[3*p+1]=S.fg,this._data[3*p+2]=S.bg}setCellFromCodepoint(p,S,_,g){268435456&g.bg&&(this._extendedAttrs[p]=g.extended),this._data[3*p+0]=S|_<<22,this._data[3*p+1]=g.fg,this._data[3*p+2]=g.bg}addCodepointToCell(p,S,_){let g=this._data[3*p+0];2097152&g?this._combined[p]+=(0,C.stringFromCodePoint)(S):2097151&g?(this._combined[p]=(0,C.stringFromCodePoint)(2097151&g)+(0,C.stringFromCodePoint)(S),g&=-2097152,g|=2097152):g=S|4194304,_&&(g&=-12582913,g|=_<<22),this._data[3*p+0]=g}insertCells(p,S,_){if((p%=this.length)&&this.getWidth(p-1)===2&&this.setCellFromCodepoint(p-1,0,1,_),S<this.length-p){const g=new v.CellData;for(let w=this.length-p-S-1;w>=0;--w)this.setCell(p+S+w,this.loadCell(p+w,g));for(let w=0;w<S;++w)this.setCell(p+w,_)}else for(let g=p;g<this.length;++g)this.setCell(g,_);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,_)}deleteCells(p,S,_){if(p%=this.length,S<this.length-p){const g=new v.CellData;for(let w=0;w<this.length-p-S;++w)this.setCell(p+w,this.loadCell(p+S+w,g));for(let w=this.length-S;w<this.length;++w)this.setCell(w,_)}else for(let g=p;g<this.length;++g)this.setCell(g,_);p&&this.getWidth(p-1)===2&&this.setCellFromCodepoint(p-1,0,1,_),this.getWidth(p)!==0||this.hasContent(p)||this.setCellFromCodepoint(p,0,1,_)}replaceCells(p,S,_,g=!1){if(g)for(p&&this.getWidth(p-1)===2&&!this.isProtected(p-1)&&this.setCellFromCodepoint(p-1,0,1,_),S<this.length&&this.getWidth(S-1)===2&&!this.isProtected(S)&&this.setCellFromCodepoint(S,0,1,_);p<S&&p<this.length;)this.isProtected(p)||this.setCell(p,_),p++;else for(p&&this.getWidth(p-1)===2&&this.setCellFromCodepoint(p-1,0,1,_),S<this.length&&this.getWidth(S-1)===2&&this.setCellFromCodepoint(S,0,1,_);p<S&&p<this.length;)this.setCell(p++,_)}resize(p,S){if(p===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const _=3*p;if(p>this.length){if(this._data.buffer.byteLength>=4*_)this._data=new Uint32Array(this._data.buffer,0,_);else{const g=new Uint32Array(_);g.set(this._data),this._data=g}for(let g=this.length;g<p;++g)this.setCell(g,S)}else{this._data=this._data.subarray(0,_);const g=Object.keys(this._combined);for(let R=0;R<g.length;R++){const L=parseInt(g[R],10);L>=p&&delete this._combined[L]}const w=Object.keys(this._extendedAttrs);for(let R=0;R<w.length;R++){const L=parseInt(w[R],10);L>=p&&delete this._extendedAttrs[L]}}return this.length=p,4*_*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const p=new Uint32Array(this._data.length);return p.set(this._data),this._data=p,1}return 0}fill(p,S=!1){if(S)for(let _=0;_<this.length;++_)this.isProtected(_)||this.setCell(_,p);else{this._combined={},this._extendedAttrs={};for(let _=0;_<this.length;++_)this.setCell(_,p)}}copyFrom(p){this.length!==p.length?this._data=new Uint32Array(p._data):this._data.set(p._data),this.length=p.length,this._combined={};for(const S in p._combined)this._combined[S]=p._combined[S];this._extendedAttrs={};for(const S in p._extendedAttrs)this._extendedAttrs[S]=p._extendedAttrs[S];this.isWrapped=p.isWrapped}clone(){const p=new A(0);p._data=new Uint32Array(this._data),p.length=this.length;for(const S in this._combined)p._combined[S]=this._combined[S];for(const S in this._extendedAttrs)p._extendedAttrs[S]=this._extendedAttrs[S];return p.isWrapped=this.isWrapped,p}getTrimmedLength(){for(let p=this.length-1;p>=0;--p)if(4194303&this._data[3*p+0])return p+(this._data[3*p+0]>>22);return 0}getNoBgTrimmedLength(){for(let p=this.length-1;p>=0;--p)if(4194303&this._data[3*p+0]||50331648&this._data[3*p+2])return p+(this._data[3*p+0]>>22);return 0}copyCellsFrom(p,S,_,g,w){const R=p._data;if(w)for(let D=g-1;D>=0;D--){for(let T=0;T<3;T++)this._data[3*(_+D)+T]=R[3*(S+D)+T];268435456&R[3*(S+D)+2]&&(this._extendedAttrs[_+D]=p._extendedAttrs[S+D])}else for(let D=0;D<g;D++){for(let T=0;T<3;T++)this._data[3*(_+D)+T]=R[3*(S+D)+T];268435456&R[3*(S+D)+2]&&(this._extendedAttrs[_+D]=p._extendedAttrs[S+D])}const L=Object.keys(p._combined);for(let D=0;D<L.length;D++){const T=parseInt(L[D],10);T>=S&&(this._combined[T-S+_]=p._combined[T])}}translateToString(p,S,_,g){S=S??0,_=_??this.length,p&&(_=Math.min(_,this.getTrimmedLength())),g&&(g.length=0);let w="";for(;S<_;){const R=this._data[3*S+0],L=2097151&R,D=2097152&R?this._combined[S]:L?(0,C.stringFromCodePoint)(L):f.WHITESPACE_CELL_CHAR;if(w+=D,g)for(let T=0;T<D.length;++T)g.push(S);S+=R>>22||1}return g&&g.push(S),w}}c.BufferLine=A},4841:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.getRangeLength=void 0,c.getRangeLength=function(u,h){if(u.start.y>u.end.y)throw new Error(`Buffer range end (${u.end.x}, ${u.end.y}) cannot be before start (${u.start.x}, ${u.start.y})`);return h*(u.end.y-u.start.y)+(u.end.x-u.start.x+1)}},4634:(b,c)=>{function u(h,v,f){if(v===h.length-1)return h[v].getTrimmedLength();const C=!h[v].hasContent(f-1)&&h[v].getWidth(f-1)===1,x=h[v+1].getWidth(0)===2;return C&&x?f-1:f}Object.defineProperty(c,"__esModule",{value:!0}),c.getWrappedLineTrimmedLength=c.reflowSmallerGetNewLineLengths=c.reflowLargerApplyNewLayout=c.reflowLargerCreateNewLayout=c.reflowLargerGetLinesToRemove=void 0,c.reflowLargerGetLinesToRemove=function(h,v,f,C,x){const A=[];for(let E=0;E<h.length-1;E++){let p=E,S=h.get(++p);if(!S.isWrapped)continue;const _=[h.get(E)];for(;p<h.length&&S.isWrapped;)_.push(S),S=h.get(++p);if(C>=E&&C<p){E+=_.length-1;continue}let g=0,w=u(_,g,v),R=1,L=0;for(;R<_.length;){const T=u(_,R,v),B=T-L,W=f-w,P=Math.min(B,W);_[g].copyCellsFrom(_[R],L,w,P,!1),w+=P,w===f&&(g++,w=0),L+=P,L===T&&(R++,L=0),w===0&&g!==0&&_[g-1].getWidth(f-1)===2&&(_[g].copyCellsFrom(_[g-1],f-1,w++,1,!1),_[g-1].setCell(f-1,x))}_[g].replaceCells(w,f,x);let D=0;for(let T=_.length-1;T>0&&(T>g||_[T].getTrimmedLength()===0);T--)D++;D>0&&(A.push(E+_.length-D),A.push(D)),E+=_.length-1}return A},c.reflowLargerCreateNewLayout=function(h,v){const f=[];let C=0,x=v[C],A=0;for(let E=0;E<h.length;E++)if(x===E){const p=v[++C];h.onDeleteEmitter.fire({index:E-A,amount:p}),E+=p-1,A+=p,x=v[++C]}else f.push(E);return{layout:f,countRemoved:A}},c.reflowLargerApplyNewLayout=function(h,v){const f=[];for(let C=0;C<v.length;C++)f.push(h.get(v[C]));for(let C=0;C<f.length;C++)h.set(C,f[C]);h.length=v.length},c.reflowSmallerGetNewLineLengths=function(h,v,f){const C=[],x=h.map(((S,_)=>u(h,_,v))).reduce(((S,_)=>S+_));let A=0,E=0,p=0;for(;p<x;){if(x-p<f){C.push(x-p);break}A+=f;const S=u(h,E,v);A>S&&(A-=S,E++);const _=h[E].getWidth(A-1)===2;_&&A--;const g=_?f-1:f;C.push(g),p+=g}return C},c.getWrappedLineTrimmedLength=u},5295:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferSet=void 0;const h=u(8460),v=u(844),f=u(9092);class C extends v.Disposable{constructor(A,E){super(),this._optionsService=A,this._bufferService=E,this._onBufferActivate=this.register(new h.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 f.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new f.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(A){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(A),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(A,E){this._normal.resize(A,E),this._alt.resize(A,E),this.setupTabStops(A)}setupTabStops(A){this._normal.setupTabStops(A),this._alt.setupTabStops(A)}}c.BufferSet=C},511:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CellData=void 0;const h=u(482),v=u(643),f=u(3734);class C extends f.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new f.ExtendedAttrs,this.combinedData=""}static fromCharData(A){const E=new C;return E.setFromCharData(A),E}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,h.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(A){this.fg=A[v.CHAR_DATA_ATTR_INDEX],this.bg=0;let E=!1;if(A[v.CHAR_DATA_CHAR_INDEX].length>2)E=!0;else if(A[v.CHAR_DATA_CHAR_INDEX].length===2){const p=A[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=p&&p<=56319){const S=A[v.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=S&&S<=57343?this.content=1024*(p-55296)+S-56320+65536|A[v.CHAR_DATA_WIDTH_INDEX]<<22:E=!0}else E=!0}else this.content=A[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|A[v.CHAR_DATA_WIDTH_INDEX]<<22;E&&(this.combinedData=A[v.CHAR_DATA_CHAR_INDEX],this.content=2097152|A[v.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}c.CellData=C},643:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.WHITESPACE_CELL_CODE=c.WHITESPACE_CELL_WIDTH=c.WHITESPACE_CELL_CHAR=c.NULL_CELL_CODE=c.NULL_CELL_WIDTH=c.NULL_CELL_CHAR=c.CHAR_DATA_CODE_INDEX=c.CHAR_DATA_WIDTH_INDEX=c.CHAR_DATA_CHAR_INDEX=c.CHAR_DATA_ATTR_INDEX=c.DEFAULT_EXT=c.DEFAULT_ATTR=c.DEFAULT_COLOR=void 0,c.DEFAULT_COLOR=0,c.DEFAULT_ATTR=256|c.DEFAULT_COLOR<<9,c.DEFAULT_EXT=0,c.CHAR_DATA_ATTR_INDEX=0,c.CHAR_DATA_CHAR_INDEX=1,c.CHAR_DATA_WIDTH_INDEX=2,c.CHAR_DATA_CODE_INDEX=3,c.NULL_CELL_CHAR="",c.NULL_CELL_WIDTH=1,c.NULL_CELL_CODE=0,c.WHITESPACE_CELL_CHAR=" ",c.WHITESPACE_CELL_WIDTH=1,c.WHITESPACE_CELL_CODE=32},4863:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Marker=void 0;const h=u(8460),v=u(844);class f{get id(){return this._id}constructor(x){this.line=x,this.isDisposed=!1,this._disposables=[],this._id=f._nextId++,this._onDispose=this.register(new h.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(x){return this._disposables.push(x),x}}c.Marker=f,f._nextId=1},7116:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.DEFAULT_CHARSET=c.CHARSETS=void 0,c.CHARSETS={},c.DEFAULT_CHARSET=c.CHARSETS.B,c.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:"≥","{":"π","|":"≠","}":"£","~":"·"},c.CHARSETS.A={"#":"£"},c.CHARSETS.B=void 0,c.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},c.CHARSETS.C=c.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},c.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},c.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},c.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},c.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},c.CHARSETS.E=c.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},c.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},c.CHARSETS.H=c.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},c.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(b,c)=>{var u,h,v;Object.defineProperty(c,"__esModule",{value:!0}),c.C1_ESCAPED=c.C1=c.C0=void 0,(function(f){f.NUL="\0",f.SOH="",f.STX="",f.ETX="",f.EOT="",f.ENQ="",f.ACK="",f.BEL="\x07",f.BS="\b",f.HT=" ",f.LF=`
|
|
81
81
|
`,f.VT="\v",f.FF="\f",f.CR="\r",f.SO="",f.SI="",f.DLE="",f.DC1="",f.DC2="",f.DC3="",f.DC4="",f.NAK="",f.SYN="",f.ETB="",f.CAN="",f.EM="",f.SUB="",f.ESC="\x1B",f.FS="",f.GS="",f.RS="",f.US="",f.SP=" ",f.DEL=""})(u||(c.C0=u={})),(function(f){f.PAD="",f.HOP="",f.BPH="",f.NBH="",f.IND="",f.NEL="
",f.SSA="",f.ESA="",f.HTS="",f.HTJ="",f.VTS="",f.PLD="",f.PLU="",f.RI="",f.SS2="",f.SS3="",f.DCS="",f.PU1="",f.PU2="",f.STS="",f.CCH="",f.MW="",f.SPA="",f.EPA="",f.SOS="",f.SGCI="",f.SCI="",f.CSI="",f.ST="",f.OSC="",f.PM="",f.APC=""})(h||(c.C1=h={})),(function(f){f.ST=`${u.ESC}\\`})(v||(c.C1_ESCAPED=v={}))},7399:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.evaluateKeyboardEvent=void 0;const h=u(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:["'",'"']};c.evaluateKeyboardEvent=function(f,C,x,A){const E={type:0,cancel:!1,key:void 0},p=(f.shiftKey?1:0)|(f.altKey?2:0)|(f.ctrlKey?4:0)|(f.metaKey?8:0);switch(f.keyCode){case 0:f.key==="UIKeyInputUpArrow"?E.key=C?h.C0.ESC+"OA":h.C0.ESC+"[A":f.key==="UIKeyInputLeftArrow"?E.key=C?h.C0.ESC+"OD":h.C0.ESC+"[D":f.key==="UIKeyInputRightArrow"?E.key=C?h.C0.ESC+"OC":h.C0.ESC+"[C":f.key==="UIKeyInputDownArrow"&&(E.key=C?h.C0.ESC+"OB":h.C0.ESC+"[B");break;case 8:E.key=f.ctrlKey?"\b":h.C0.DEL,f.altKey&&(E.key=h.C0.ESC+E.key);break;case 9:if(f.shiftKey){E.key=h.C0.ESC+"[Z";break}E.key=h.C0.HT,E.cancel=!0;break;case 13:E.key=f.altKey?h.C0.ESC+h.C0.CR:h.C0.CR,E.cancel=!0;break;case 27:E.key=h.C0.ESC,f.altKey&&(E.key=h.C0.ESC+h.C0.ESC),E.cancel=!0;break;case 37:if(f.metaKey)break;p?(E.key=h.C0.ESC+"[1;"+(p+1)+"D",E.key===h.C0.ESC+"[1;3D"&&(E.key=h.C0.ESC+(x?"b":"[1;5D"))):E.key=C?h.C0.ESC+"OD":h.C0.ESC+"[D";break;case 39:if(f.metaKey)break;p?(E.key=h.C0.ESC+"[1;"+(p+1)+"C",E.key===h.C0.ESC+"[1;3C"&&(E.key=h.C0.ESC+(x?"f":"[1;5C"))):E.key=C?h.C0.ESC+"OC":h.C0.ESC+"[C";break;case 38:if(f.metaKey)break;p?(E.key=h.C0.ESC+"[1;"+(p+1)+"A",x||E.key!==h.C0.ESC+"[1;3A"||(E.key=h.C0.ESC+"[1;5A")):E.key=C?h.C0.ESC+"OA":h.C0.ESC+"[A";break;case 40:if(f.metaKey)break;p?(E.key=h.C0.ESC+"[1;"+(p+1)+"B",x||E.key!==h.C0.ESC+"[1;3B"||(E.key=h.C0.ESC+"[1;5B")):E.key=C?h.C0.ESC+"OB":h.C0.ESC+"[B";break;case 45:f.shiftKey||f.ctrlKey||(E.key=h.C0.ESC+"[2~");break;case 46:E.key=p?h.C0.ESC+"[3;"+(p+1)+"~":h.C0.ESC+"[3~";break;case 36:E.key=p?h.C0.ESC+"[1;"+(p+1)+"H":C?h.C0.ESC+"OH":h.C0.ESC+"[H";break;case 35:E.key=p?h.C0.ESC+"[1;"+(p+1)+"F":C?h.C0.ESC+"OF":h.C0.ESC+"[F";break;case 33:f.shiftKey?E.type=2:f.ctrlKey?E.key=h.C0.ESC+"[5;"+(p+1)+"~":E.key=h.C0.ESC+"[5~";break;case 34:f.shiftKey?E.type=3:f.ctrlKey?E.key=h.C0.ESC+"[6;"+(p+1)+"~":E.key=h.C0.ESC+"[6~";break;case 112:E.key=p?h.C0.ESC+"[1;"+(p+1)+"P":h.C0.ESC+"OP";break;case 113:E.key=p?h.C0.ESC+"[1;"+(p+1)+"Q":h.C0.ESC+"OQ";break;case 114:E.key=p?h.C0.ESC+"[1;"+(p+1)+"R":h.C0.ESC+"OR";break;case 115:E.key=p?h.C0.ESC+"[1;"+(p+1)+"S":h.C0.ESC+"OS";break;case 116:E.key=p?h.C0.ESC+"[15;"+(p+1)+"~":h.C0.ESC+"[15~";break;case 117:E.key=p?h.C0.ESC+"[17;"+(p+1)+"~":h.C0.ESC+"[17~";break;case 118:E.key=p?h.C0.ESC+"[18;"+(p+1)+"~":h.C0.ESC+"[18~";break;case 119:E.key=p?h.C0.ESC+"[19;"+(p+1)+"~":h.C0.ESC+"[19~";break;case 120:E.key=p?h.C0.ESC+"[20;"+(p+1)+"~":h.C0.ESC+"[20~";break;case 121:E.key=p?h.C0.ESC+"[21;"+(p+1)+"~":h.C0.ESC+"[21~";break;case 122:E.key=p?h.C0.ESC+"[23;"+(p+1)+"~":h.C0.ESC+"[23~";break;case 123:E.key=p?h.C0.ESC+"[24;"+(p+1)+"~":h.C0.ESC+"[24~";break;default:if(!f.ctrlKey||f.shiftKey||f.altKey||f.metaKey)if(x&&!A||!f.altKey||f.metaKey)!x||f.altKey||f.ctrlKey||f.shiftKey||!f.metaKey?f.key&&!f.ctrlKey&&!f.altKey&&!f.metaKey&&f.keyCode>=48&&f.key.length===1?E.key=f.key:f.key&&f.ctrlKey&&(f.key==="_"&&(E.key=h.C0.US),f.key==="@"&&(E.key=h.C0.NUL)):f.keyCode===65&&(E.type=1);else{const S=v[f.keyCode],_=S?.[f.shiftKey?1:0];if(_)E.key=h.C0.ESC+_;else if(f.keyCode>=65&&f.keyCode<=90){const g=f.ctrlKey?f.keyCode-64:f.keyCode+32;let w=String.fromCharCode(g);f.shiftKey&&(w=w.toUpperCase()),E.key=h.C0.ESC+w}else if(f.keyCode===32)E.key=h.C0.ESC+(f.ctrlKey?h.C0.NUL:" ");else if(f.key==="Dead"&&f.code.startsWith("Key")){let g=f.code.slice(3,4);f.shiftKey||(g=g.toLowerCase()),E.key=h.C0.ESC+g,E.cancel=!0}}else f.keyCode>=65&&f.keyCode<=90?E.key=String.fromCharCode(f.keyCode-64):f.keyCode===32?E.key=h.C0.NUL:f.keyCode>=51&&f.keyCode<=55?E.key=String.fromCharCode(f.keyCode-51+27):f.keyCode===56?E.key=h.C0.DEL:f.keyCode===219?E.key=h.C0.ESC:f.keyCode===220?E.key=h.C0.FS:f.keyCode===221&&(E.key=h.C0.GS)}return E}},482:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Utf8ToUtf32=c.StringToUtf32=c.utf32ToString=c.stringFromCodePoint=void 0,c.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},c.utf32ToString=function(u,h=0,v=u.length){let f="";for(let C=h;C<v;++C){let x=u[C];x>65535?(x-=65536,f+=String.fromCharCode(55296+(x>>10))+String.fromCharCode(x%1024+56320)):f+=String.fromCharCode(x)}return f},c.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,h){const v=u.length;if(!v)return 0;let f=0,C=0;if(this._interim){const x=u.charCodeAt(C++);56320<=x&&x<=57343?h[f++]=1024*(this._interim-55296)+x-56320+65536:(h[f++]=this._interim,h[f++]=x),this._interim=0}for(let x=C;x<v;++x){const A=u.charCodeAt(x);if(55296<=A&&A<=56319){if(++x>=v)return this._interim=A,f;const E=u.charCodeAt(x);56320<=E&&E<=57343?h[f++]=1024*(A-55296)+E-56320+65536:(h[f++]=A,h[f++]=E)}else A!==65279&&(h[f++]=A)}return f}},c.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,h){const v=u.length;if(!v)return 0;let f,C,x,A,E=0,p=0,S=0;if(this.interim[0]){let w=!1,R=this.interim[0];R&=(224&R)==192?31:(240&R)==224?15:7;let L,D=0;for(;(L=63&this.interim[++D])&&D<4;)R<<=6,R|=L;const T=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,B=T-D;for(;S<B;){if(S>=v)return 0;if(L=u[S++],(192&L)!=128){S--,w=!0;break}this.interim[D++]=L,R<<=6,R|=63&L}w||(T===2?R<128?S--:h[E++]=R:T===3?R<2048||R>=55296&&R<=57343||R===65279||(h[E++]=R):R<65536||R>1114111||(h[E++]=R)),this.interim.fill(0)}const _=v-4;let g=S;for(;g<v;){for(;!(!(g<_)||128&(f=u[g])||128&(C=u[g+1])||128&(x=u[g+2])||128&(A=u[g+3]));)h[E++]=f,h[E++]=C,h[E++]=x,h[E++]=A,g+=4;if(f=u[g++],f<128)h[E++]=f;else if((224&f)==192){if(g>=v)return this.interim[0]=f,E;if(C=u[g++],(192&C)!=128){g--;continue}if(p=(31&f)<<6|63&C,p<128){g--;continue}h[E++]=p}else if((240&f)==224){if(g>=v)return this.interim[0]=f,E;if(C=u[g++],(192&C)!=128){g--;continue}if(g>=v)return this.interim[0]=f,this.interim[1]=C,E;if(x=u[g++],(192&x)!=128){g--;continue}if(p=(15&f)<<12|(63&C)<<6|63&x,p<2048||p>=55296&&p<=57343||p===65279)continue;h[E++]=p}else if((248&f)==240){if(g>=v)return this.interim[0]=f,E;if(C=u[g++],(192&C)!=128){g--;continue}if(g>=v)return this.interim[0]=f,this.interim[1]=C,E;if(x=u[g++],(192&x)!=128){g--;continue}if(g>=v)return this.interim[0]=f,this.interim[1]=C,this.interim[2]=x,E;if(A=u[g++],(192&A)!=128){g--;continue}if(p=(7&f)<<18|(63&C)<<12|(63&x)<<6|63&A,p<65536||p>1114111)continue;h[E++]=p}}return E}}},225:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeV6=void 0;const h=u(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]],f=[[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 C;c.UnicodeV6=class{constructor(){if(this.version="6",!C){C=new Uint8Array(65536),C.fill(1),C[0]=0,C.fill(0,1,32),C.fill(0,127,160),C.fill(2,4352,4448),C[9001]=2,C[9002]=2,C.fill(2,11904,42192),C[12351]=1,C.fill(2,44032,55204),C.fill(2,63744,64256),C.fill(2,65040,65050),C.fill(2,65072,65136),C.fill(2,65280,65377),C.fill(2,65504,65511);for(let x=0;x<v.length;++x)C.fill(0,v[x][0],v[x][1]+1)}}wcwidth(x){return x<32?0:x<127?1:x<65536?C[x]:(function(A,E){let p,S=0,_=E.length-1;if(A<E[0][0]||A>E[_][1])return!1;for(;_>=S;)if(p=S+_>>1,A>E[p][1])S=p+1;else{if(!(A<E[p][0]))return!0;_=p-1}return!1})(x,f)?0:x>=131072&&x<=196605||x>=196608&&x<=262141?2:1}charProperties(x,A){let E=this.wcwidth(x),p=E===0&&A!==0;if(p){const S=h.UnicodeService.extractWidth(A);S===0?p=!1:S>E&&(E=S)}return h.UnicodeService.createPropertyValue(0,E,p)}}},5981:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.WriteBuffer=void 0;const h=u(8460),v=u(844);class f extends v.Disposable{constructor(x){super(),this._action=x,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new h.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(x,A){if(A!==void 0&&this._syncCalls>A)return void(this._syncCalls=0);if(this._pendingData+=x.length,this._writeBuffer.push(x),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let E;for(this._isSyncWriting=!0;E=this._writeBuffer.shift();){this._action(E);const p=this._callbacks.shift();p&&p()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(x,A){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+=x.length,this._writeBuffer.push(x),this._callbacks.push(A),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=x.length,this._writeBuffer.push(x),this._callbacks.push(A)}_innerWrite(x=0,A=!0){const E=x||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const p=this._writeBuffer[this._bufferOffset],S=this._action(p,A);if(S){const g=w=>Date.now()-E>=12?setTimeout((()=>this._innerWrite(0,w))):this._innerWrite(E,w);return void S.catch((w=>(queueMicrotask((()=>{throw w})),Promise.resolve(!1)))).then(g)}const _=this._callbacks[this._bufferOffset];if(_&&_(),this._bufferOffset++,this._pendingData-=p.length,Date.now()-E>=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()}}c.WriteBuffer=f},5941:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.toRgbString=c.parseColor=void 0;const u=/^([\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})$/,h=/^[\da-f]+$/;function v(f,C){const x=f.toString(16),A=x.length<2?"0"+x:x;switch(C){case 4:return x[0];case 8:return A;case 12:return(A+A).slice(0,3);default:return A+A}}c.parseColor=function(f){if(!f)return;let C=f.toLowerCase();if(C.indexOf("rgb:")===0){C=C.slice(4);const x=u.exec(C);if(x){const A=x[1]?15:x[4]?255:x[7]?4095:65535;return[Math.round(parseInt(x[1]||x[4]||x[7]||x[10],16)/A*255),Math.round(parseInt(x[2]||x[5]||x[8]||x[11],16)/A*255),Math.round(parseInt(x[3]||x[6]||x[9]||x[12],16)/A*255)]}}else if(C.indexOf("#")===0&&(C=C.slice(1),h.exec(C)&&[3,6,9,12].includes(C.length))){const x=C.length/3,A=[0,0,0];for(let E=0;E<3;++E){const p=parseInt(C.slice(x*E,x*E+x),16);A[E]=x===1?p<<4:x===2?p:x===3?p>>4:p>>8}return A}},c.toRgbString=function(f,C=16){const[x,A,E]=f;return`rgb:${v(x,C)}/${v(A,C)}/${v(E,C)}`}},5770:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.PAYLOAD_LIMIT=void 0,c.PAYLOAD_LIMIT=1e7},6351:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.DcsHandler=c.DcsParser=void 0;const h=u(482),v=u(8742),f=u(5770),C=[];c.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=C,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=C}registerHandler(A,E){this._handlers[A]===void 0&&(this._handlers[A]=[]);const p=this._handlers[A];return p.push(E),{dispose:()=>{const S=p.indexOf(E);S!==-1&&p.splice(S,1)}}}clearHandler(A){this._handlers[A]&&delete this._handlers[A]}setHandlerFallback(A){this._handlerFb=A}reset(){if(this._active.length)for(let A=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;A>=0;--A)this._active[A].unhook(!1);this._stack.paused=!1,this._active=C,this._ident=0}hook(A,E){if(this.reset(),this._ident=A,this._active=this._handlers[A]||C,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].hook(E);else this._handlerFb(this._ident,"HOOK",E)}put(A,E,p){if(this._active.length)for(let S=this._active.length-1;S>=0;S--)this._active[S].put(A,E,p);else this._handlerFb(this._ident,"PUT",(0,h.utf32ToString)(A,E,p))}unhook(A,E=!0){if(this._active.length){let p=!1,S=this._active.length-1,_=!1;if(this._stack.paused&&(S=this._stack.loopPosition-1,p=E,_=this._stack.fallThrough,this._stack.paused=!1),!_&&p===!1){for(;S>=0&&(p=this._active[S].unhook(A),p!==!0);S--)if(p instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=S,this._stack.fallThrough=!1,p;S--}for(;S>=0;S--)if(p=this._active[S].unhook(!1),p instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=S,this._stack.fallThrough=!0,p}else this._handlerFb(this._ident,"UNHOOK",A);this._active=C,this._ident=0}};const x=new v.Params;x.addParam(0),c.DcsHandler=class{constructor(A){this._handler=A,this._data="",this._params=x,this._hitLimit=!1}hook(A){this._params=A.length>1||A.params[0]?A.clone():x,this._data="",this._hitLimit=!1}put(A,E,p){this._hitLimit||(this._data+=(0,h.utf32ToString)(A,E,p),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(A){let E=!1;if(this._hitLimit)E=!1;else if(A&&(E=this._handler(this._data,this._params),E instanceof Promise))return E.then((p=>(this._params=x,this._data="",this._hitLimit=!1,p)));return this._params=x,this._data="",this._hitLimit=!1,E}}},2015:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.EscapeSequenceParser=c.VT500_TRANSITION_TABLE=c.TransitionTable=void 0;const h=u(844),v=u(8742),f=u(6242),C=u(6351);class x{constructor(S){this.table=new Uint8Array(S)}setDefault(S,_){this.table.fill(S<<4|_)}add(S,_,g,w){this.table[_<<8|S]=g<<4|w}addMany(S,_,g,w){for(let R=0;R<S.length;R++)this.table[_<<8|S[R]]=g<<4|w}}c.TransitionTable=x;const A=160;c.VT500_TRANSITION_TABLE=(function(){const p=new x(4095),S=Array.apply(null,Array(256)).map(((D,T)=>T)),_=(D,T)=>S.slice(D,T),g=_(32,127),w=_(0,24);w.push(25),w.push.apply(w,_(28,32));const R=_(0,14);let L;for(L in p.setDefault(1,0),p.addMany(g,0,2,0),R)p.addMany([24,26,153,154],L,3,0),p.addMany(_(128,144),L,3,0),p.addMany(_(144,152),L,3,0),p.add(156,L,0,0),p.add(27,L,11,1),p.add(157,L,4,8),p.addMany([152,158,159],L,0,7),p.add(155,L,11,3),p.add(144,L,11,9);return p.addMany(w,0,3,0),p.addMany(w,1,3,1),p.add(127,1,0,1),p.addMany(w,8,0,8),p.addMany(w,3,3,3),p.add(127,3,0,3),p.addMany(w,4,3,4),p.add(127,4,0,4),p.addMany(w,6,3,6),p.addMany(w,5,3,5),p.add(127,5,0,5),p.addMany(w,2,3,2),p.add(127,2,0,2),p.add(93,1,4,8),p.addMany(g,8,5,8),p.add(127,8,5,8),p.addMany([156,27,24,26,7],8,6,0),p.addMany(_(28,32),8,0,8),p.addMany([88,94,95],1,0,7),p.addMany(g,7,0,7),p.addMany(w,7,0,7),p.add(156,7,0,0),p.add(127,7,0,7),p.add(91,1,11,3),p.addMany(_(64,127),3,7,0),p.addMany(_(48,60),3,8,4),p.addMany([60,61,62,63],3,9,4),p.addMany(_(48,60),4,8,4),p.addMany(_(64,127),4,7,0),p.addMany([60,61,62,63],4,0,6),p.addMany(_(32,64),6,0,6),p.add(127,6,0,6),p.addMany(_(64,127),6,0,0),p.addMany(_(32,48),3,9,5),p.addMany(_(32,48),5,9,5),p.addMany(_(48,64),5,0,6),p.addMany(_(64,127),5,7,0),p.addMany(_(32,48),4,9,5),p.addMany(_(32,48),1,9,2),p.addMany(_(32,48),2,9,2),p.addMany(_(48,127),2,10,0),p.addMany(_(48,80),1,10,0),p.addMany(_(81,88),1,10,0),p.addMany([89,90,92],1,10,0),p.addMany(_(96,127),1,10,0),p.add(80,1,11,9),p.addMany(w,9,0,9),p.add(127,9,0,9),p.addMany(_(28,32),9,0,9),p.addMany(_(32,48),9,9,12),p.addMany(_(48,60),9,8,10),p.addMany([60,61,62,63],9,9,10),p.addMany(w,11,0,11),p.addMany(_(32,128),11,0,11),p.addMany(_(28,32),11,0,11),p.addMany(w,10,0,10),p.add(127,10,0,10),p.addMany(_(28,32),10,0,10),p.addMany(_(48,60),10,8,10),p.addMany([60,61,62,63],10,0,11),p.addMany(_(32,48),10,9,12),p.addMany(w,12,0,12),p.add(127,12,0,12),p.addMany(_(28,32),12,0,12),p.addMany(_(32,48),12,9,12),p.addMany(_(48,64),12,0,11),p.addMany(_(64,127),12,12,13),p.addMany(_(64,127),10,12,13),p.addMany(_(64,127),9,12,13),p.addMany(w,13,13,13),p.addMany(g,13,13,13),p.add(127,13,0,13),p.addMany([27,156,24,26],13,14,0),p.add(A,0,2,0),p.add(A,8,5,8),p.add(A,6,0,6),p.add(A,11,0,11),p.add(A,13,13,13),p})();class E extends h.Disposable{constructor(S=c.VT500_TRANSITION_TABLE){super(),this._transitions=S,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=(_,g,w)=>{},this._executeHandlerFb=_=>{},this._csiHandlerFb=(_,g)=>{},this._escHandlerFb=_=>{},this._errorHandlerFb=_=>_,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,h.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new f.OscParser),this._dcsParser=this.register(new C.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(S,_=[64,126]){let g=0;if(S.prefix){if(S.prefix.length>1)throw new Error("only one byte as prefix supported");if(g=S.prefix.charCodeAt(0),g&&60>g||g>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(S.intermediates){if(S.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let R=0;R<S.intermediates.length;++R){const L=S.intermediates.charCodeAt(R);if(32>L||L>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");g<<=8,g|=L}}if(S.final.length!==1)throw new Error("final must be a single byte");const w=S.final.charCodeAt(0);if(_[0]>w||w>_[1])throw new Error(`final must be in range ${_[0]} .. ${_[1]}`);return g<<=8,g|=w,g}identToString(S){const _=[];for(;S;)_.push(String.fromCharCode(255&S)),S>>=8;return _.reverse().join("")}setPrintHandler(S){this._printHandler=S}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(S,_){const g=this._identifier(S,[48,126]);this._escHandlers[g]===void 0&&(this._escHandlers[g]=[]);const w=this._escHandlers[g];return w.push(_),{dispose:()=>{const R=w.indexOf(_);R!==-1&&w.splice(R,1)}}}clearEscHandler(S){this._escHandlers[this._identifier(S,[48,126])]&&delete this._escHandlers[this._identifier(S,[48,126])]}setEscHandlerFallback(S){this._escHandlerFb=S}setExecuteHandler(S,_){this._executeHandlers[S.charCodeAt(0)]=_}clearExecuteHandler(S){this._executeHandlers[S.charCodeAt(0)]&&delete this._executeHandlers[S.charCodeAt(0)]}setExecuteHandlerFallback(S){this._executeHandlerFb=S}registerCsiHandler(S,_){const g=this._identifier(S);this._csiHandlers[g]===void 0&&(this._csiHandlers[g]=[]);const w=this._csiHandlers[g];return w.push(_),{dispose:()=>{const R=w.indexOf(_);R!==-1&&w.splice(R,1)}}}clearCsiHandler(S){this._csiHandlers[this._identifier(S)]&&delete this._csiHandlers[this._identifier(S)]}setCsiHandlerFallback(S){this._csiHandlerFb=S}registerDcsHandler(S,_){return this._dcsParser.registerHandler(this._identifier(S),_)}clearDcsHandler(S){this._dcsParser.clearHandler(this._identifier(S))}setDcsHandlerFallback(S){this._dcsParser.setHandlerFallback(S)}registerOscHandler(S,_){return this._oscParser.registerHandler(S,_)}clearOscHandler(S){this._oscParser.clearHandler(S)}setOscHandlerFallback(S){this._oscParser.setHandlerFallback(S)}setErrorHandler(S){this._errorHandler=S}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(S,_,g,w,R){this._parseStack.state=S,this._parseStack.handlers=_,this._parseStack.handlerPos=g,this._parseStack.transition=w,this._parseStack.chunkPos=R}parse(S,_,g){let w,R=0,L=0,D=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,D=this._parseStack.chunkPos+1;else{if(g===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const T=this._parseStack.handlers;let B=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(g===!1&&B>-1){for(;B>=0&&(w=T[B](this._params),w!==!0);B--)if(w instanceof Promise)return this._parseStack.handlerPos=B,w}this._parseStack.handlers=[];break;case 4:if(g===!1&&B>-1){for(;B>=0&&(w=T[B](),w!==!0);B--)if(w instanceof Promise)return this._parseStack.handlerPos=B,w}this._parseStack.handlers=[];break;case 6:if(R=S[this._parseStack.chunkPos],w=this._dcsParser.unhook(R!==24&&R!==26,g),w)return w;R===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(R=S[this._parseStack.chunkPos],w=this._oscParser.end(R!==24&&R!==26,g),w)return w;R===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,D=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let T=D;T<_;++T){switch(R=S[T],L=this._transitions.table[this.currentState<<8|(R<160?R:A)],L>>4){case 2:for(let I=T+1;;++I){if(I>=_||(R=S[I])<32||R>126&&R<A){this._printHandler(S,T,I),T=I-1;break}if(++I>=_||(R=S[I])<32||R>126&&R<A){this._printHandler(S,T,I),T=I-1;break}if(++I>=_||(R=S[I])<32||R>126&&R<A){this._printHandler(S,T,I),T=I-1;break}if(++I>=_||(R=S[I])<32||R>126&&R<A){this._printHandler(S,T,I),T=I-1;break}}break;case 3:this._executeHandlers[R]?this._executeHandlers[R]():this._executeHandlerFb(R),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:T,code:R,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const B=this._csiHandlers[this._collect<<8|R];let W=B?B.length-1:-1;for(;W>=0&&(w=B[W](this._params),w!==!0);W--)if(w instanceof Promise)return this._preserveStack(3,B,W,L,T),w;W<0&&this._csiHandlerFb(this._collect<<8|R,this._params),this.precedingJoinState=0;break;case 8:do switch(R){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(R-48)}while(++T<_&&(R=S[T])>47&&R<60);T--;break;case 9:this._collect<<=8,this._collect|=R;break;case 10:const P=this._escHandlers[this._collect<<8|R];let F=P?P.length-1:-1;for(;F>=0&&(w=P[F](),w!==!0);F--)if(w instanceof Promise)return this._preserveStack(4,P,F,L,T),w;F<0&&this._escHandlerFb(this._collect<<8|R),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|R,this._params);break;case 13:for(let I=T+1;;++I)if(I>=_||(R=S[I])===24||R===26||R===27||R>127&&R<A){this._dcsParser.put(S,T,I),T=I-1;break}break;case 14:if(w=this._dcsParser.unhook(R!==24&&R!==26),w)return this._preserveStack(6,[],0,L,T),w;R===27&&(L|=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 I=T+1;;I++)if(I>=_||(R=S[I])<32||R>127&&R<A){this._oscParser.put(S,T,I),T=I-1;break}break;case 6:if(w=this._oscParser.end(R!==24&&R!==26),w)return this._preserveStack(5,[],0,L,T),w;R===27&&(L|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&L}}}c.EscapeSequenceParser=E},6242:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.OscHandler=c.OscParser=void 0;const h=u(5770),v=u(482),f=[];c.OscParser=class{constructor(){this._state=0,this._active=f,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(C,x){this._handlers[C]===void 0&&(this._handlers[C]=[]);const A=this._handlers[C];return A.push(x),{dispose:()=>{const E=A.indexOf(x);E!==-1&&A.splice(E,1)}}}clearHandler(C){this._handlers[C]&&delete this._handlers[C]}setHandlerFallback(C){this._handlerFb=C}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=f}reset(){if(this._state===2)for(let C=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;C>=0;--C)this._active[C].end(!1);this._stack.paused=!1,this._active=f,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||f,this._active.length)for(let C=this._active.length-1;C>=0;C--)this._active[C].start();else this._handlerFb(this._id,"START")}_put(C,x,A){if(this._active.length)for(let E=this._active.length-1;E>=0;E--)this._active[E].put(C,x,A);else this._handlerFb(this._id,"PUT",(0,v.utf32ToString)(C,x,A))}start(){this.reset(),this._state=1}put(C,x,A){if(this._state!==3){if(this._state===1)for(;x<A;){const E=C[x++];if(E===59){this._state=2,this._start();break}if(E<48||57<E)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+E-48}this._state===2&&A-x>0&&this._put(C,x,A)}}end(C,x=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let A=!1,E=this._active.length-1,p=!1;if(this._stack.paused&&(E=this._stack.loopPosition-1,A=x,p=this._stack.fallThrough,this._stack.paused=!1),!p&&A===!1){for(;E>=0&&(A=this._active[E].end(C),A!==!0);E--)if(A instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=E,this._stack.fallThrough=!1,A;E--}for(;E>=0;E--)if(A=this._active[E].end(!1),A instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=E,this._stack.fallThrough=!0,A}else this._handlerFb(this._id,"END",C);this._active=f,this._id=-1,this._state=0}}},c.OscHandler=class{constructor(C){this._handler=C,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(C,x,A){this._hitLimit||(this._data+=(0,v.utf32ToString)(C,x,A),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(C){let x=!1;if(this._hitLimit)x=!1;else if(C&&(x=this._handler(this._data),x instanceof Promise))return x.then((A=>(this._data="",this._hitLimit=!1,A)));return this._data="",this._hitLimit=!1,x}}},8742:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Params=void 0;const u=2147483647;class h{static fromArray(f){const C=new h;if(!f.length)return C;for(let x=Array.isArray(f[0])?1:0;x<f.length;++x){const A=f[x];if(Array.isArray(A))for(let E=0;E<A.length;++E)C.addSubParam(A[E]);else C.addParam(A)}return C}constructor(f=32,C=32){if(this.maxLength=f,this.maxSubParamsLength=C,C>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(f),this.length=0,this._subParams=new Int32Array(C),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(f),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const f=new h(this.maxLength,this.maxSubParamsLength);return f.params.set(this.params),f.length=this.length,f._subParams.set(this._subParams),f._subParamsLength=this._subParamsLength,f._subParamsIdx.set(this._subParamsIdx),f._rejectDigits=this._rejectDigits,f._rejectSubDigits=this._rejectSubDigits,f._digitIsSub=this._digitIsSub,f}toArray(){const f=[];for(let C=0;C<this.length;++C){f.push(this.params[C]);const x=this._subParamsIdx[C]>>8,A=255&this._subParamsIdx[C];A-x>0&&f.push(Array.prototype.slice.call(this._subParams,x,A))}return f}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(f){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=f>u?u:f}}addSubParam(f){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=f>u?u:f,this._subParamsIdx[this.length-1]++}}hasSubParams(f){return(255&this._subParamsIdx[f])-(this._subParamsIdx[f]>>8)>0}getSubParams(f){const C=this._subParamsIdx[f]>>8,x=255&this._subParamsIdx[f];return x-C>0?this._subParams.subarray(C,x):null}getSubParamsAll(){const f={};for(let C=0;C<this.length;++C){const x=this._subParamsIdx[C]>>8,A=255&this._subParamsIdx[C];A-x>0&&(f[C]=this._subParams.slice(x,A))}return f}addDigit(f){let C;if(this._rejectDigits||!(C=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const x=this._digitIsSub?this._subParams:this.params,A=x[C-1];x[C-1]=~A?Math.min(10*A+f,u):f}}c.Params=h},5741:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.AddonManager=void 0,c.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()}loadAddon(u,h){const v={instance:h,dispose:h.dispose,isDisposed:!1};this._addons.push(v),h.dispose=()=>this._wrappedAddonDispose(v),h.activate(u)}_wrappedAddonDispose(u){if(u.isDisposed)return;let h=-1;for(let v=0;v<this._addons.length;v++)if(this._addons[v]===u){h=v;break}if(h===-1)throw new Error("Could not dispose an addon that has not been loaded");u.isDisposed=!0,u.dispose.apply(u.instance),this._addons.splice(h,1)}}},8771:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferApiView=void 0;const h=u(3785),v=u(511);c.BufferApiView=class{constructor(f,C){this._buffer=f,this.type=C}init(f){return this._buffer=f,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(f){const C=this._buffer.lines.get(f);if(C)return new h.BufferLineApiView(C)}getNullCell(){return new v.CellData}}},3785:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferLineApiView=void 0;const h=u(511);c.BufferLineApiView=class{constructor(v){this._line=v}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(v,f){if(!(v<0||v>=this._line.length))return f?(this._line.loadCell(v,f),f):this._line.loadCell(v,new h.CellData)}translateToString(v,f,C){return this._line.translateToString(v,f,C)}}},8285:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferNamespaceApi=void 0;const h=u(8771),v=u(8460),f=u(844);class C extends f.Disposable{constructor(A){super(),this._core=A,this._onBufferChange=this.register(new v.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new h.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new h.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)}}c.BufferNamespaceApi=C},7975:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ParserApi=void 0,c.ParserApi=class{constructor(u){this._core=u}registerCsiHandler(u,h){return this._core.registerCsiHandler(u,(v=>h(v.toArray())))}addCsiHandler(u,h){return this.registerCsiHandler(u,h)}registerDcsHandler(u,h){return this._core.registerDcsHandler(u,((v,f)=>h(v,f.toArray())))}addDcsHandler(u,h){return this.registerDcsHandler(u,h)}registerEscHandler(u,h){return this._core.registerEscHandler(u,h)}addEscHandler(u,h){return this.registerEscHandler(u,h)}registerOscHandler(u,h){return this._core.registerOscHandler(u,h)}addOscHandler(u,h){return this.registerOscHandler(u,h)}}},7090:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeApi=void 0,c.UnicodeApi=class{constructor(u){this._core=u}register(u){this._core.unicodeService.register(u)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(u){this._core.unicodeService.activeVersion=u}}},744:function(b,c,u){var h=this&&this.__decorate||function(p,S,_,g){var w,R=arguments.length,L=R<3?S:g===null?g=Object.getOwnPropertyDescriptor(S,_):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(p,S,_,g);else for(var D=p.length-1;D>=0;D--)(w=p[D])&&(L=(R<3?w(L):R>3?w(S,_,L):w(S,_))||L);return R>3&&L&&Object.defineProperty(S,_,L),L},v=this&&this.__param||function(p,S){return function(_,g){S(_,g,p)}};Object.defineProperty(c,"__esModule",{value:!0}),c.BufferService=c.MINIMUM_ROWS=c.MINIMUM_COLS=void 0;const f=u(8460),C=u(844),x=u(5295),A=u(2585);c.MINIMUM_COLS=2,c.MINIMUM_ROWS=1;let E=c.BufferService=class extends C.Disposable{get buffer(){return this.buffers.active}constructor(p){super(),this.isUserScrolling=!1,this._onResize=this.register(new f.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new f.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(p.rawOptions.cols||0,c.MINIMUM_COLS),this.rows=Math.max(p.rawOptions.rows||0,c.MINIMUM_ROWS),this.buffers=this.register(new x.BufferSet(p,this))}resize(p,S){this.cols=p,this.rows=S,this.buffers.resize(p,S),this._onResize.fire({cols:p,rows:S})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(p,S=!1){const _=this.buffer;let g;g=this._cachedBlankLine,g&&g.length===this.cols&&g.getFg(0)===p.fg&&g.getBg(0)===p.bg||(g=_.getBlankLine(p,S),this._cachedBlankLine=g),g.isWrapped=S;const w=_.ybase+_.scrollTop,R=_.ybase+_.scrollBottom;if(_.scrollTop===0){const L=_.lines.isFull;R===_.lines.length-1?L?_.lines.recycle().copyFrom(g):_.lines.push(g.clone()):_.lines.splice(R+1,0,g.clone()),L?this.isUserScrolling&&(_.ydisp=Math.max(_.ydisp-1,0)):(_.ybase++,this.isUserScrolling||_.ydisp++)}else{const L=R-w+1;_.lines.shiftElements(w+1,L-1,-1),_.lines.set(R,g.clone())}this.isUserScrolling||(_.ydisp=_.ybase),this._onScroll.fire(_.ydisp)}scrollLines(p,S,_){const g=this.buffer;if(p<0){if(g.ydisp===0)return;this.isUserScrolling=!0}else p+g.ydisp>=g.ybase&&(this.isUserScrolling=!1);const w=g.ydisp;g.ydisp=Math.max(Math.min(g.ydisp+p,g.ybase),0),w!==g.ydisp&&(S||this._onScroll.fire(g.ydisp))}};c.BufferService=E=h([v(0,A.IOptionsService)],E)},7994:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CharsetService=void 0,c.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(u){this.glevel=u,this.charset=this._charsets[u]}setgCharset(u,h){this._charsets[u]=h,this.glevel===u&&(this.charset=h)}}},1753:function(b,c,u){var h=this&&this.__decorate||function(g,w,R,L){var D,T=arguments.length,B=T<3?w:L===null?L=Object.getOwnPropertyDescriptor(w,R):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(g,w,R,L);else for(var W=g.length-1;W>=0;W--)(D=g[W])&&(B=(T<3?D(B):T>3?D(w,R,B):D(w,R))||B);return T>3&&B&&Object.defineProperty(w,R,B),B},v=this&&this.__param||function(g,w){return function(R,L){w(R,L,g)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CoreMouseService=void 0;const f=u(2585),C=u(8460),x=u(844),A={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:g=>g.button!==4&&g.action===1&&(g.ctrl=!1,g.alt=!1,g.shift=!1,!0)},VT200:{events:19,restrict:g=>g.action!==32},DRAG:{events:23,restrict:g=>g.action!==32||g.button!==3},ANY:{events:31,restrict:g=>!0}};function E(g,w){let R=(g.ctrl?16:0)|(g.shift?4:0)|(g.alt?8:0);return g.button===4?(R|=64,R|=g.action):(R|=3&g.button,4&g.button&&(R|=64),8&g.button&&(R|=128),g.action===32?R|=32:g.action!==0||w||(R|=3)),R}const p=String.fromCharCode,S={DEFAULT:g=>{const w=[E(g,!1)+32,g.col+32,g.row+32];return w[0]>255||w[1]>255||w[2]>255?"":`\x1B[M${p(w[0])}${p(w[1])}${p(w[2])}`},SGR:g=>{const w=g.action===0&&g.button!==4?"m":"M";return`\x1B[<${E(g,!0)};${g.col};${g.row}${w}`},SGR_PIXELS:g=>{const w=g.action===0&&g.button!==4?"m":"M";return`\x1B[<${E(g,!0)};${g.x};${g.y}${w}`}};let _=c.CoreMouseService=class extends x.Disposable{constructor(g,w){super(),this._bufferService=g,this._coreService=w,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new C.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const R of Object.keys(A))this.addProtocol(R,A[R]);for(const R of Object.keys(S))this.addEncoding(R,S[R]);this.reset()}addProtocol(g,w){this._protocols[g]=w}addEncoding(g,w){this._encodings[g]=w}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(g){if(!this._protocols[g])throw new Error(`unknown protocol "${g}"`);this._activeProtocol=g,this._onProtocolChange.fire(this._protocols[g].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(g){if(!this._encodings[g])throw new Error(`unknown encoding "${g}"`);this._activeEncoding=g}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(g){if(g.col<0||g.col>=this._bufferService.cols||g.row<0||g.row>=this._bufferService.rows||g.button===4&&g.action===32||g.button===3&&g.action!==32||g.button!==4&&(g.action===2||g.action===3)||(g.col++,g.row++,g.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,g,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(g))return!1;const w=this._encodings[this._activeEncoding](g);return w&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(w):this._coreService.triggerDataEvent(w,!0)),this._lastEvent=g,!0}explainEvents(g){return{down:!!(1&g),up:!!(2&g),drag:!!(4&g),move:!!(8&g),wheel:!!(16&g)}}_equalEvents(g,w,R){if(R){if(g.x!==w.x||g.y!==w.y)return!1}else if(g.col!==w.col||g.row!==w.row)return!1;return g.button===w.button&&g.action===w.action&&g.ctrl===w.ctrl&&g.alt===w.alt&&g.shift===w.shift}};c.CoreMouseService=_=h([v(0,f.IBufferService),v(1,f.ICoreService)],_)},6975:function(b,c,u){var h=this&&this.__decorate||function(_,g,w,R){var L,D=arguments.length,T=D<3?g:R===null?R=Object.getOwnPropertyDescriptor(g,w):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(_,g,w,R);else for(var B=_.length-1;B>=0;B--)(L=_[B])&&(T=(D<3?L(T):D>3?L(g,w,T):L(g,w))||T);return D>3&&T&&Object.defineProperty(g,w,T),T},v=this&&this.__param||function(_,g){return function(w,R){g(w,R,_)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CoreService=void 0;const f=u(1439),C=u(8460),x=u(844),A=u(2585),E=Object.freeze({insertMode:!1}),p=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let S=c.CoreService=class extends x.Disposable{constructor(_,g,w){super(),this._bufferService=_,this._logService=g,this._optionsService=w,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new C.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new C.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new C.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new C.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,f.clone)(E),this.decPrivateModes=(0,f.clone)(p)}reset(){this.modes=(0,f.clone)(E),this.decPrivateModes=(0,f.clone)(p)}triggerDataEvent(_,g=!1){if(this._optionsService.rawOptions.disableStdin)return;const w=this._bufferService.buffer;g&&this._optionsService.rawOptions.scrollOnUserInput&&w.ybase!==w.ydisp&&this._onRequestScrollToBottom.fire(),g&&this._onUserInput.fire(),this._logService.debug(`sending data "${_}"`,(()=>_.split("").map((R=>R.charCodeAt(0))))),this._onData.fire(_)}triggerBinaryEvent(_){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${_}"`,(()=>_.split("").map((g=>g.charCodeAt(0))))),this._onBinary.fire(_))}};c.CoreService=S=h([v(0,A.IBufferService),v(1,A.ILogService),v(2,A.IOptionsService)],S)},9074:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.DecorationService=void 0;const h=u(8055),v=u(8460),f=u(844),C=u(6106);let x=0,A=0;class E extends f.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new C.SortedList((_=>_?.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,f.toDisposable)((()=>this.reset())))}registerDecoration(_){if(_.marker.isDisposed)return;const g=new p(_);if(g){const w=g.marker.onDispose((()=>g.dispose()));g.onDispose((()=>{g&&(this._decorations.delete(g)&&this._onDecorationRemoved.fire(g),w.dispose())})),this._decorations.insert(g),this._onDecorationRegistered.fire(g)}return g}reset(){for(const _ of this._decorations.values())_.dispose();this._decorations.clear()}*getDecorationsAtCell(_,g,w){let R=0,L=0;for(const D of this._decorations.getKeyIterator(g))R=D.options.x??0,L=R+(D.options.width??1),_>=R&&_<L&&(!w||(D.options.layer??"bottom")===w)&&(yield D)}forEachDecorationAtCell(_,g,w,R){this._decorations.forEachByKey(g,(L=>{x=L.options.x??0,A=x+(L.options.width??1),_>=x&&_<A&&(!w||(L.options.layer??"bottom")===w)&&R(L)}))}}c.DecorationService=E;class p extends f.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=h.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=h.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(_){super(),this.options=_,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=_.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.InstantiationService=c.ServiceCollection=void 0;const h=u(2585),v=u(8343);class f{constructor(...x){this._entries=new Map;for(const[A,E]of x)this.set(A,E)}set(x,A){const E=this._entries.get(x);return this._entries.set(x,A),E}forEach(x){for(const[A,E]of this._entries.entries())x(A,E)}has(x){return this._entries.has(x)}get(x){return this._entries.get(x)}}c.ServiceCollection=f,c.InstantiationService=class{constructor(){this._services=new f,this._services.set(h.IInstantiationService,this)}setService(C,x){this._services.set(C,x)}getService(C){return this._services.get(C)}createInstance(C,...x){const A=(0,v.getServiceDependencies)(C).sort(((S,_)=>S.index-_.index)),E=[];for(const S of A){const _=this._services.get(S.id);if(!_)throw new Error(`[createInstance] ${C.name} depends on UNKNOWN service ${S.id}.`);E.push(_)}const p=A.length>0?A[0].index:x.length;if(x.length!==p)throw new Error(`[createInstance] First service dependency of ${C.name} at position ${p+1} conflicts with ${x.length} static arguments`);return new C(...x,...E)}}},7866:function(b,c,u){var h=this&&this.__decorate||function(p,S,_,g){var w,R=arguments.length,L=R<3?S:g===null?g=Object.getOwnPropertyDescriptor(S,_):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(p,S,_,g);else for(var D=p.length-1;D>=0;D--)(w=p[D])&&(L=(R<3?w(L):R>3?w(S,_,L):w(S,_))||L);return R>3&&L&&Object.defineProperty(S,_,L),L},v=this&&this.__param||function(p,S){return function(_,g){S(_,g,p)}};Object.defineProperty(c,"__esModule",{value:!0}),c.traceCall=c.setTraceLogger=c.LogService=void 0;const f=u(844),C=u(2585),x={trace:C.LogLevelEnum.TRACE,debug:C.LogLevelEnum.DEBUG,info:C.LogLevelEnum.INFO,warn:C.LogLevelEnum.WARN,error:C.LogLevelEnum.ERROR,off:C.LogLevelEnum.OFF};let A,E=c.LogService=class extends f.Disposable{get logLevel(){return this._logLevel}constructor(p){super(),this._optionsService=p,this._logLevel=C.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),A=this}_updateLogLevel(){this._logLevel=x[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(p){for(let S=0;S<p.length;S++)typeof p[S]=="function"&&(p[S]=p[S]())}_log(p,S,_){this._evalLazyOptionalParams(_),p.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+S,..._)}trace(p,...S){this._logLevel<=C.LogLevelEnum.TRACE&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,p,S)}debug(p,...S){this._logLevel<=C.LogLevelEnum.DEBUG&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,p,S)}info(p,...S){this._logLevel<=C.LogLevelEnum.INFO&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,p,S)}warn(p,...S){this._logLevel<=C.LogLevelEnum.WARN&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,p,S)}error(p,...S){this._logLevel<=C.LogLevelEnum.ERROR&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,p,S)}};c.LogService=E=h([v(0,C.IOptionsService)],E),c.setTraceLogger=function(p){A=p},c.traceCall=function(p,S,_){if(typeof _.value!="function")throw new Error("not supported");const g=_.value;_.value=function(...w){if(A.logLevel!==C.LogLevelEnum.TRACE)return g.apply(this,w);A.trace(`GlyphRenderer#${g.name}(${w.map((L=>JSON.stringify(L))).join(", ")})`);const R=g.apply(this,w);return A.trace(`GlyphRenderer#${g.name} return`,R),R}}},7302:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.OptionsService=c.DEFAULT_OPTIONS=void 0;const h=u(8460),v=u(844),f=u(6114);c.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:f.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const C=["normal","bold","100","200","300","400","500","600","700","800","900"];class x extends v.Disposable{constructor(E){super(),this._onOptionChange=this.register(new h.EventEmitter),this.onOptionChange=this._onOptionChange.event;const p={...c.DEFAULT_OPTIONS};for(const S in E)if(S in p)try{const _=E[S];p[S]=this._sanitizeAndValidateOption(S,_)}catch(_){console.error(_)}this.rawOptions=p,this.options={...p},this._setupOptions(),this.register((0,v.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(E,p){return this.onOptionChange((S=>{S===E&&p(this.rawOptions[E])}))}onMultipleOptionChange(E,p){return this.onOptionChange((S=>{E.indexOf(S)!==-1&&p()}))}_setupOptions(){const E=S=>{if(!(S in c.DEFAULT_OPTIONS))throw new Error(`No option with key "${S}"`);return this.rawOptions[S]},p=(S,_)=>{if(!(S in c.DEFAULT_OPTIONS))throw new Error(`No option with key "${S}"`);_=this._sanitizeAndValidateOption(S,_),this.rawOptions[S]!==_&&(this.rawOptions[S]=_,this._onOptionChange.fire(S))};for(const S in this.rawOptions){const _={get:E.bind(this,S),set:p.bind(this,S)};Object.defineProperty(this.options,S,_)}}_sanitizeAndValidateOption(E,p){switch(E){case"cursorStyle":if(p||(p=c.DEFAULT_OPTIONS[E]),!(function(S){return S==="block"||S==="underline"||S==="bar"})(p))throw new Error(`"${p}" is not a valid value for ${E}`);break;case"wordSeparator":p||(p=c.DEFAULT_OPTIONS[E]);break;case"fontWeight":case"fontWeightBold":if(typeof p=="number"&&1<=p&&p<=1e3)break;p=C.includes(p)?p:c.DEFAULT_OPTIONS[E];break;case"cursorWidth":p=Math.floor(p);case"lineHeight":case"tabStopWidth":if(p<1)throw new Error(`${E} cannot be less than 1, value: ${p}`);break;case"minimumContrastRatio":p=Math.max(1,Math.min(21,Math.round(10*p)/10));break;case"scrollback":if((p=Math.min(p,4294967295))<0)throw new Error(`${E} cannot be less than 0, value: ${p}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(p<=0)throw new Error(`${E} cannot be less than or equal to 0, value: ${p}`);break;case"rows":case"cols":if(!p&&p!==0)throw new Error(`${E} must be numeric, value: ${p}`);break;case"windowsPty":p=p??{}}return p}}c.OptionsService=x},2660:function(b,c,u){var h=this&&this.__decorate||function(x,A,E,p){var S,_=arguments.length,g=_<3?A:p===null?p=Object.getOwnPropertyDescriptor(A,E):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(x,A,E,p);else for(var w=x.length-1;w>=0;w--)(S=x[w])&&(g=(_<3?S(g):_>3?S(A,E,g):S(A,E))||g);return _>3&&g&&Object.defineProperty(A,E,g),g},v=this&&this.__param||function(x,A){return function(E,p){A(E,p,x)}};Object.defineProperty(c,"__esModule",{value:!0}),c.OscLinkService=void 0;const f=u(2585);let C=c.OscLinkService=class{constructor(x){this._bufferService=x,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(x){const A=this._bufferService.buffer;if(x.id===void 0){const w=A.addMarker(A.ybase+A.y),R={data:x,id:this._nextId++,lines:[w]};return w.onDispose((()=>this._removeMarkerFromLink(R,w))),this._dataByLinkId.set(R.id,R),R.id}const E=x,p=this._getEntryIdKey(E),S=this._entriesWithId.get(p);if(S)return this.addLineToLink(S.id,A.ybase+A.y),S.id;const _=A.addMarker(A.ybase+A.y),g={id:this._nextId++,key:this._getEntryIdKey(E),data:E,lines:[_]};return _.onDispose((()=>this._removeMarkerFromLink(g,_))),this._entriesWithId.set(g.key,g),this._dataByLinkId.set(g.id,g),g.id}addLineToLink(x,A){const E=this._dataByLinkId.get(x);if(E&&E.lines.every((p=>p.line!==A))){const p=this._bufferService.buffer.addMarker(A);E.lines.push(p),p.onDispose((()=>this._removeMarkerFromLink(E,p)))}}getLinkData(x){return this._dataByLinkId.get(x)?.data}_getEntryIdKey(x){return`${x.id};;${x.uri}`}_removeMarkerFromLink(x,A){const E=x.lines.indexOf(A);E!==-1&&(x.lines.splice(E,1),x.lines.length===0&&(x.data.id!==void 0&&this._entriesWithId.delete(x.key),this._dataByLinkId.delete(x.id)))}};c.OscLinkService=C=h([v(0,f.IBufferService)],C)},8343:(b,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.createDecorator=c.getServiceDependencies=c.serviceRegistry=void 0;const u="di$target",h="di$dependencies";c.serviceRegistry=new Map,c.getServiceDependencies=function(v){return v[h]||[]},c.createDecorator=function(v){if(c.serviceRegistry.has(v))return c.serviceRegistry.get(v);const f=function(C,x,A){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(E,p,S){p[u]===p?p[h].push({id:E,index:S}):(p[h]=[{id:E,index:S}],p[u]=p)})(f,C,A)};return f.toString=()=>v,c.serviceRegistry.set(v,f),f}},2585:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.IDecorationService=c.IUnicodeService=c.IOscLinkService=c.IOptionsService=c.ILogService=c.LogLevelEnum=c.IInstantiationService=c.ICharsetService=c.ICoreService=c.ICoreMouseService=c.IBufferService=void 0;const h=u(8343);var v;c.IBufferService=(0,h.createDecorator)("BufferService"),c.ICoreMouseService=(0,h.createDecorator)("CoreMouseService"),c.ICoreService=(0,h.createDecorator)("CoreService"),c.ICharsetService=(0,h.createDecorator)("CharsetService"),c.IInstantiationService=(0,h.createDecorator)("InstantiationService"),(function(f){f[f.TRACE=0]="TRACE",f[f.DEBUG=1]="DEBUG",f[f.INFO=2]="INFO",f[f.WARN=3]="WARN",f[f.ERROR=4]="ERROR",f[f.OFF=5]="OFF"})(v||(c.LogLevelEnum=v={})),c.ILogService=(0,h.createDecorator)("LogService"),c.IOptionsService=(0,h.createDecorator)("OptionsService"),c.IOscLinkService=(0,h.createDecorator)("OscLinkService"),c.IUnicodeService=(0,h.createDecorator)("UnicodeService"),c.IDecorationService=(0,h.createDecorator)("DecorationService")},1480:(b,c,u)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeService=void 0;const h=u(8460),v=u(225);class f{static extractShouldJoin(x){return(1&x)!=0}static extractWidth(x){return x>>1&3}static extractCharKind(x){return x>>3}static createPropertyValue(x,A,E=!1){return(16777215&x)<<3|(3&A)<<1|(E?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new h.EventEmitter,this.onChange=this._onChange.event;const x=new v.UnicodeV6;this.register(x),this._active=x.version,this._activeProvider=x}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(x){if(!this._providers[x])throw new Error(`unknown Unicode version "${x}"`);this._active=x,this._activeProvider=this._providers[x],this._onChange.fire(x)}register(x){this._providers[x.version]=x}wcwidth(x){return this._activeProvider.wcwidth(x)}getStringCellWidth(x){let A=0,E=0;const p=x.length;for(let S=0;S<p;++S){let _=x.charCodeAt(S);if(55296<=_&&_<=56319){if(++S>=p)return A+this.wcwidth(_);const R=x.charCodeAt(S);56320<=R&&R<=57343?_=1024*(_-55296)+R-56320+65536:A+=this.wcwidth(R)}const g=this.charProperties(_,E);let w=f.extractWidth(g);f.extractShouldJoin(g)&&(w-=f.extractWidth(E)),A+=w,E=g}return A}charProperties(x,A){return this._activeProvider.charProperties(x,A)}}c.UnicodeService=f}},o={};function l(b){var c=o[b];if(c!==void 0)return c.exports;var u=o[b]={exports:{}};return s[b].call(u.exports,u,u.exports,l),u.exports}var y={};return(()=>{var b=y;Object.defineProperty(b,"__esModule",{value:!0}),b.Terminal=void 0;const c=l(9042),u=l(3236),h=l(844),v=l(5741),f=l(8285),C=l(7975),x=l(7090),A=["cols","rows"];class E extends h.Disposable{constructor(S){super(),this._core=this.register(new u.Terminal(S)),this._addonManager=this.register(new v.AddonManager),this._publicOptions={...this._core.options};const _=w=>this._core.options[w],g=(w,R)=>{this._checkReadonlyOptions(w),this._core.options[w]=R};for(const w in this._core.options){const R={get:_.bind(this,w),set:g.bind(this,w)};Object.defineProperty(this._publicOptions,w,R)}}_checkReadonlyOptions(S){if(A.includes(S))throw new Error(`Option "${S}" 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 C.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new x.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 f.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const S=this._core.coreService.decPrivateModes;let _="none";switch(this._core.coreMouseService.activeProtocol){case"X10":_="x10";break;case"VT200":_="vt200";break;case"DRAG":_="drag";break;case"ANY":_="any"}return{applicationCursorKeysMode:S.applicationCursorKeys,applicationKeypadMode:S.applicationKeypad,bracketedPasteMode:S.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:_,originMode:S.origin,reverseWraparoundMode:S.reverseWraparound,sendFocusMode:S.sendFocus,wraparoundMode:S.wraparound}}get options(){return this._publicOptions}set options(S){for(const _ in S)this._publicOptions[_]=S[_]}blur(){this._core.blur()}focus(){this._core.focus()}input(S,_=!0){this._core.input(S,_)}resize(S,_){this._verifyIntegers(S,_),this._core.resize(S,_)}open(S){this._core.open(S)}attachCustomKeyEventHandler(S){this._core.attachCustomKeyEventHandler(S)}attachCustomWheelEventHandler(S){this._core.attachCustomWheelEventHandler(S)}registerLinkProvider(S){return this._core.registerLinkProvider(S)}registerCharacterJoiner(S){return this._checkProposedApi(),this._core.registerCharacterJoiner(S)}deregisterCharacterJoiner(S){this._checkProposedApi(),this._core.deregisterCharacterJoiner(S)}registerMarker(S=0){return this._verifyIntegers(S),this._core.registerMarker(S)}registerDecoration(S){return this._checkProposedApi(),this._verifyPositiveIntegers(S.x??0,S.width??0,S.height??0),this._core.registerDecoration(S)}hasSelection(){return this._core.hasSelection()}select(S,_,g){this._verifyIntegers(S,_,g),this._core.select(S,_,g)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(S,_){this._verifyIntegers(S,_),this._core.selectLines(S,_)}dispose(){super.dispose()}scrollLines(S){this._verifyIntegers(S),this._core.scrollLines(S)}scrollPages(S){this._verifyIntegers(S),this._core.scrollPages(S)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(S){this._verifyIntegers(S),this._core.scrollToLine(S)}clear(){this._core.clear()}write(S,_){this._core.write(S,_)}writeln(S,_){this._core.write(S),this._core.write(`\r
|
|
82
|
-
`,_)}paste(S){this._core.paste(S)}refresh(S,_){this._verifyIntegers(S,_),this._core.refresh(S,_)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(S){this._addonManager.loadAddon(this,S)}static get strings(){return c}_verifyIntegers(...S){for(const _ of S)if(_===1/0||isNaN(_)||_%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...S){for(const _ of S)if(_&&(_===1/0||isNaN(_)||_%1!=0||_<0))throw new Error("This API only accepts positive integers")}}b.Terminal=E})(),y})()))})(Hd)),Hd.exports}var a5
|
|
83
|
-
`),!1):!0);try{const g=new r5;g.onContextLoss(()=>{C||g.dispose()}),x.loadAddon(g)}catch{}const E=u5({sessionId:i,kind:n,terminal:x,onExit:()=>c.current?.(),onStatus:(g,w)=>{h(w?`${g}: ${w}`:g)}});b.current=E;const p=()=>{A.fit(),E.resize(x.cols,x.rows)},S=async()=>{await document.fonts?.ready,!C&&(p(),E.start(),x.focus())},_=new ResizeObserver(p);return _.observe(f),S(),()=>{C=!0,_.disconnect(),E.dispose(),y.current=null,b.current=null;try{x.dispose()}catch{}}},[n,i]),te.useEffect(()=>{const f=y.current;f&&(f.options.theme=Iv(o))},[o]);const v=u.startsWith("live");return z.jsx("section",{className:"terminal-stage","aria-label":n==="shell"?"Shell terminal":"Fleet terminal",children:z.jsxs("div",{className:"terminal-shell",children:[v?null:z.jsxs("div",{className:"terminal-status","aria-live":"polite",children:[z.jsx("span",{className:"terminal-status-dot","aria-hidden":"true"}),u]}),z.jsx("div",{className:"terminal-canvas",ref:l})]})})}function Iv(i){return i==="carbon"?g5:_5}function m5({state:i}){const n=te.useRef(null);return i.shellOpen&&n.current===null&&(n.current=document.activeElement),te.useEffect(()=>{if(!i.shellOpen)return;const s=o=>{o.key==="Escape"&&Yo()};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s);const o=n.current;n.current=null,o?.focus?.()}},[i.shellOpen]),i.shellOpen?z.jsxs("div",{className:"shell-overlay",role:"dialog","aria-modal":"true","aria-label":"Shell",children:[z.jsx("button",{type:"button",className:"shell-overlay-scrim",onClick:Yo,"aria-label":"Close shell"}),z.jsxs("section",{className:"shell-overlay-card",children:[z.jsxs("header",{className:"shell-overlay-header",children:[z.jsx("span",{className:"shell-overlay-kicker",children:"Free Shell"}),z.jsx("h2",{children:"Local Shell"})]}),z.jsx("button",{type:"button",className:"shell-overlay-close",onClick:Yo,"aria-label":"Close shell",children:"×"}),z.jsx("div",{className:"shell-overlay-terminal",children:z.jsx($b,{sessionId:rf,kind:"shell",onExit:Yo},rf)})]})]}):null}function v5({open:i,title:n,message:s,tone:o="info",onDismiss:l}){return i?z.jsx("div",{className:"app-toast-host",children:z.jsxs("div",{className:`app-toast app-toast--${o}`,role:"status","aria-live":"polite",children:[z.jsx("span",{className:"app-toast-dot","aria-hidden":"true"}),z.jsxs("div",{className:"app-toast-body",children:[z.jsx("p",{className:"app-toast-title",children:n}),s?z.jsx("p",{className:"app-toast-message",children:s}):null]}),l?z.jsx("button",{type:"button",className:"app-toast-close",onClick:l,"aria-label":"Dismiss notification",children:"×"}):null]})}):null}const b5=[{to:"/operations",label:"Operation",end:!1,icon:"operations"},{to:"/codex",label:"Codex",end:!1,icon:"codex"}],zd=[{id:"maritime",label:"Maritime",swatch:["oklch(78% 0.13 75)","oklch(82% 0.13 195)","oklch(32% 0.04 248)"]},{id:"carbon",label:"Carbon",swatch:["oklch(76% 0.115 62)","oklch(80% 0.105 205)","oklch(25% 0.007 252)"]}];function S5({state:i}){const n=i.connectionError!==null,s=Un().pathname,o=s.startsWith("/codex")?z.jsx(zv,{}):s.startsWith("/operations")?z.jsx(Hv,{}):z.jsx(x5,{});return z.jsxs("header",{className:"topbar",children:[z.jsxs(Hf,{className:"topbar-brand",to:"/","aria-label":"Welcome으로 이동",children:[z.jsx("span",{className:`topbar-sigil ${n?"is-alert":""}`,"aria-hidden":"true",title:i.connectionError??void 0,children:o}),z.jsxs("h1",{className:"topbar-title",children:["Fleet",z.jsx("span",{className:"topbar-title-thin",children:"Console"})]})]}),z.jsx(y5,{state:i}),z.jsxs("div",{className:"topbar-meta",children:[z.jsx("nav",{className:"topbar-nav","aria-label":"주 내비게이션",children:b5.map(l=>z.jsxs(G0,{to:l.to,end:l.end,className:({isActive:y})=>`topbar-nav-link ${y?"is-active":""}`,children:[z.jsx("span",{className:"topbar-nav-icon","aria-hidden":"true",children:l.icon==="operations"?z.jsx(Hv,{}):z.jsx(zv,{})}),z.jsx("span",{children:l.label})]},l.to))}),z.jsxs("button",{type:"button",className:"topbar-shell-button",onMouseDown:l=>l.preventDefault(),onClick:nb,"aria-label":"Shell",title:"Shell (⌘`)",children:[z.jsx(A5,{}),z.jsx("span",{children:"Shell"})]}),z.jsx(C5,{activeTheme:i.activeTheme})]})]})}function y5({state:i}){const[n,s]=te.useState(!1),o=te.useRef(null),l=te.useRef(null),y=te.useRef(null),b=i.theaters.find(f=>f.id===i.activeTheaterId)??null,c=b?.label??(i.theaters.length===0?"No Theaters":"Theater");te.useEffect(()=>{if(!n)return;const f=x=>{o.current?.contains(x.target)||s(!1)},C=x=>{x.key==="Escape"&&(s(!1),l.current?.focus())};return document.addEventListener("mousedown",f),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",f),document.removeEventListener("keydown",C)}},[n]),te.useEffect(()=>{if(!n)return;const f=y.current;if(!f)return;(f.querySelector('[data-active="true"]')??f.querySelector("[role^='menuitem']"))?.focus()},[n]);const u=f=>{Jw(f),s(!1),l.current?.focus()},h=async()=>{s(!1),eE();try{const f=await Bw();if("cancelled"in f){iE();return}tE(f)}catch(f){nE(f instanceof Error?f.message:String(f))}},v=f=>{if(f.key!=="ArrowDown"&&f.key!=="ArrowUp")return;f.preventDefault();const C=Array.from(y.current?.querySelectorAll("[role^='menuitem']")??[]);if(C.length===0)return;const x=C.indexOf(document.activeElement),A=f.key==="ArrowDown"?1:-1,E=(x+A+C.length)%C.length;C[E]?.focus()};return z.jsxs("div",{className:"theater-control",ref:o,children:[z.jsx("span",{className:"theater-eyebrow","aria-hidden":"true",children:"Theater"}),z.jsxs("button",{type:"button",ref:l,className:`theater-trigger ${n?"is-open":""}`,"aria-haspopup":"menu","aria-expanded":n,"aria-label":"Theater",title:b?.label??i.theaterError??void 0,onClick:()=>s(f=>!f),children:[z.jsx("span",{className:"theater-trigger-sigil","aria-hidden":"true",children:z.jsx(w5,{})}),z.jsx("span",{className:"theater-trigger-label",children:c}),z.jsx("span",{className:"theater-trigger-caret","aria-hidden":"true",children:z.jsx(Ub,{})})]}),n?z.jsxs("div",{className:"theater-menu",role:"menu","aria-label":"Theater",ref:y,onKeyDown:v,children:[i.theaters.length>0?z.jsx("ul",{className:"theater-menu-list",children:i.theaters.map(f=>{const C=f.id===i.activeTheaterId;return z.jsx("li",{children:z.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":C,"data-active":C?"true":void 0,className:`theater-menu-item ${C?"is-active":""}`,title:f.label,onClick:()=>u(f.id),children:[z.jsx("span",{className:"theater-menu-check","aria-hidden":"true",children:C?z.jsx(Pb,{}):null}),z.jsx("span",{className:"theater-menu-label",children:f.label})]})},f.id)})}):z.jsx("p",{className:"theater-menu-empty",children:"No Theaters yet."}),z.jsx("div",{className:"theater-menu-divider",role:"separator"}),z.jsxs("button",{type:"button",role:"menuitem",className:"theater-menu-item theater-menu-add",disabled:i.addingTheater,onClick:h,children:[z.jsx("span",{className:"theater-menu-check","aria-hidden":"true",children:z.jsx(T5,{})}),z.jsx("span",{className:"theater-menu-label",children:i.addingTheater?"Adding Theater…":"Add Theater…"})]}),i.theaterError?z.jsx("p",{className:"theater-menu-error",children:i.theaterError}):null]}):null]})}function C5({activeTheme:i}){const[n,s]=te.useState(!1),o=te.useRef(null),l=te.useRef(null),y=te.useRef(null),b=zd.find(h=>h.id===i)??zd[0];te.useEffect(()=>{if(!n)return;const h=f=>{o.current?.contains(f.target)||s(!1)},v=f=>{f.key==="Escape"&&(s(!1),l.current?.focus())};return document.addEventListener("mousedown",h),document.addEventListener("keydown",v),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",v)}},[n]),te.useEffect(()=>{if(!n)return;const h=y.current;if(!h)return;(h.querySelector('[data-active="true"]')??h.querySelector("[role^='menuitem']"))?.focus()},[n]);const c=h=>{Xw(h),s(!1),l.current?.focus()},u=h=>{if(h.key!=="ArrowDown"&&h.key!=="ArrowUp")return;h.preventDefault();const v=Array.from(y.current?.querySelectorAll("[role^='menuitem']")??[]);if(v.length===0)return;const f=v.indexOf(document.activeElement),C=h.key==="ArrowDown"?1:-1,x=(f+C+v.length)%v.length;v[x]?.focus()};return z.jsxs("div",{className:"theme-control",ref:o,children:[z.jsxs("button",{type:"button",ref:l,className:`theme-trigger ${n?"is-open":""}`,"aria-haspopup":"menu","aria-expanded":n,"aria-label":"Theme",onClick:()=>s(h=>!h),children:[z.jsx(E5,{}),z.jsx("span",{className:"theme-trigger-label",children:b.label}),z.jsx("span",{className:"theme-trigger-caret","aria-hidden":"true",children:z.jsx(Ub,{})})]}),n?z.jsx("div",{className:"theme-menu",role:"menu","aria-label":"Theme",ref:y,onKeyDown:u,children:zd.map(h=>{const v=h.id===i;return z.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":v,"data-active":v?"true":void 0,className:`theme-menu-item ${v?"is-active":""}`,onClick:()=>c(h.id),children:[z.jsx("span",{className:"theme-swatch","aria-hidden":"true",children:h.swatch.map(f=>z.jsx("i",{style:{background:f}},f))}),z.jsx("span",{className:"theme-menu-label",children:h.label}),z.jsx("span",{className:"theme-menu-check","aria-hidden":"true",children:v?z.jsx(Pb,{}):null})]},h.id)})}):null]})}function w5(){return z.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[z.jsx("circle",{cx:"8",cy:"3.2",r:"1.5",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),z.jsx("path",{d:"M8 4.7v8.1M4.3 8.2H11.7M3.4 9.1A4.7 4.7 0 0 0 12.6 9.1",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}function Ub(){return z.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:z.jsx("path",{d:"M4.5 6.5 8 10l3.5-3.5",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})}function Pb(){return z.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:z.jsx("path",{d:"M3.5 8.5 6.5 11.5 12.5 5",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function E5(){return z.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[z.jsx("path",{d:"M8 2.6a5.4 5.4 0 0 0-5.4 5.5c0 2.4 1.8 4.5 4.2 5 .8.2 1.2-.2 1.2-.8 0-.5-.4-.8-.4-1.3 0-.7.6-1.1 1.3-1.1h1.1c1.9 0 3.4-1.5 3.4-3.3C13.4 4.4 11 2.6 8 2.6Z",fill:"none",stroke:"currentColor",strokeWidth:"1.15",strokeLinejoin:"round"}),z.jsx("circle",{cx:"5.6",cy:"6.4",r:".75",fill:"currentColor"}),z.jsx("circle",{cx:"8",cy:"5.2",r:".75",fill:"currentColor"}),z.jsx("circle",{cx:"10.4",cy:"6.5",r:".75",fill:"currentColor"})]})}function x5(){return z.jsxs("svg",{viewBox:"0 0 16 16",width:"16",height:"16",children:[z.jsx("path",{d:"M8 1.8 9.5 6.5 14.2 8 9.5 9.5 8 14.2 6.5 9.5 1.8 8 6.5 6.5Z",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"}),z.jsx("path",{d:"M8 4.7 8.7 7.3 11.3 8 8.7 8.7 8 11.3 7.3 8.7 4.7 8 7.3 7.3Z",fill:"currentColor"})]})}function Hv(){return z.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[z.jsx("circle",{cx:"8",cy:"8",r:"5.4",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),z.jsx("path",{d:"M8 3.7v2.1M8 10.2v2.1M3.7 8h2.1M10.2 8h2.1M8 8l3.1-2.1",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),z.jsx("circle",{cx:"8",cy:"8",r:"1.1",fill:"currentColor"})]})}function zv(){return z.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[z.jsx("circle",{cx:"12",cy:"12",r:"9"}),z.jsx("circle",{cx:"12",cy:"12",r:"3.2",fill:"currentColor",stroke:"none",opacity:"0.16"}),z.jsx("path",{d:"M12 3v3.6M12 17.4V21M3 12h3.6M17.4 12H21"}),z.jsx("path",{d:"M12 8.6 14.2 12 12 15.4 9.8 12Z",fill:"currentColor",stroke:"none"})]})}function T5(){return z.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:z.jsx("path",{d:"M8 3.4v9.2M3.4 8h9.2",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})}function A5(){return z.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[z.jsx("path",{d:"M2.8 4.2h10.4v7.6H2.8z",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"}),z.jsx("path",{d:"M5 6.7 6.8 8 5 9.3M8.2 9.4h2.6",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function R5(){let i="";return n=>{i+=n;const s=[];let o=i.indexOf(`
|
|
82
|
+
`,_)}paste(S){this._core.paste(S)}refresh(S,_){this._verifyIntegers(S,_),this._core.refresh(S,_)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(S){this._addonManager.loadAddon(this,S)}static get strings(){return c}_verifyIntegers(...S){for(const _ of S)if(_===1/0||isNaN(_)||_%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...S){for(const _ of S)if(_&&(_===1/0||isNaN(_)||_%1!=0||_<0))throw new Error("This API only accepts positive integers")}}b.Terminal=E})(),y})()))})(Hd)),Hd.exports}var o5=a5();function $b(){return te.useSyncExternalStore(Yw,rv,rv)}const Bv=250,l5=5e3,Nv=1,c5=4e3,u5=4001;function h5(t){const n=new AbortController,s=new TextEncoder;let o=Bv,l=null,y=null,b=null,c=!1;const u=()=>{y?.dispose(),y=null},h=(C,x)=>{b={cols:C,rows:x},l?.readyState===Nv&&l.send(JSON.stringify({type:"resize",cols:C,rows:x}))},v=async()=>{for(;!n.signal.aborted;){t.onStatus?.("connecting");try{const C=t.fetchTicket??zw,{ticket:x}=await C(t.sessionId,{kind:t.kind,signal:n.signal});if(n.signal.aborted)return;await f(d5(x,t.location),t),o=Bv}catch(C){if(n.signal.aborted)return;t.onStatus?.("connecting",C instanceof Error?C.message:String(C))}await p5(o,n.signal),o=Math.min(o*2,l5)}},f=async(C,x)=>{await new Promise((A,E)=>{const p=(x.webSocketFactory??f5)(C);l=p,p.binaryType="arraybuffer",p.onopen=()=>{x.onStatus?.("live"),u(),y=x.terminal.onData(S=>{p.readyState===Nv&&p.send(s.encode(S))}),b&&h(b.cols,b.rows)},p.onmessage=S=>{S.data instanceof ArrayBuffer&&x.terminal.write(new Uint8Array(S.data))},p.onerror=()=>{E(new Error("Terminal WebSocket error"))},p.onclose=S=>{u(),l===p&&(l=null);const _=S?.code;_===c5?n.abort():_===u5&&(n.abort(),x.onExit?.()),A()}})};return{start:()=>{c||(c=!0,v())},resize:h,dispose:()=>{n.abort(),u(),t.onStatus?.("closed"),l?.close(),l=null}}}function d5(t,n=window.location){return`${n.protocol==="https:"?"wss":"ws"}://${n.host}/terminal/ws?ticket=${encodeURIComponent(t)}`}function f5(t){return new WebSocket(t)}async function p5(t,n){await new Promise(s=>{const o=()=>{clearTimeout(l),n.removeEventListener("abort",o),s()},l=setTimeout(o,t);n.addEventListener("abort",o)})}const _5={allowProposedApi:!1,convertEol:!0,cursorBlink:!0,cursorStyle:"block",fontFamily:'"Cascadia Code", "Cascadia Mono", "JetBrains Mono Variable", ui-monospace, "SF Mono", Menlo, monospace',fontSize:14,lineHeight:1.2},g5={background:"oklch(23% 0.03 248)",foreground:"oklch(86% 0.018 90)",cursor:"oklch(82% 0.13 195)",selectionBackground:"oklch(78% 0.13 75 / 28%)",black:"oklch(18% 0.045 248)",brightBlack:"oklch(48% 0.03 248)",red:"oklch(72% 0.17 25)",green:"oklch(82% 0.13 195)",yellow:"oklch(86% 0.16 78)",blue:"oklch(70% 0.08 248)",magenta:"oklch(75% 0.11 320)",cyan:"oklch(82% 0.13 195)",white:"oklch(82% 0.018 90)",brightRed:"oklch(78% 0.18 25)",brightGreen:"oklch(88% 0.14 195)",brightYellow:"oklch(90% 0.16 78)",brightBlue:"oklch(78% 0.09 248)",brightMagenta:"oklch(82% 0.12 320)",brightCyan:"oklch(88% 0.14 195)",brightWhite:"oklch(96% 0.012 88)"},m5={background:"oklch(19% 0.008 252)",foreground:"oklch(85% 0.005 250)",cursor:"oklch(80% 0.105 205)",selectionBackground:"oklch(76% 0.115 62 / 28%)",black:"oklch(16% 0.008 252)",brightBlack:"oklch(46% 0.006 250)",red:"oklch(72% 0.17 25)",green:"oklch(80% 0.11 205)",yellow:"oklch(84% 0.14 64)",blue:"oklch(68% 0.05 250)",magenta:"oklch(75% 0.11 320)",cyan:"oklch(80% 0.11 205)",white:"oklch(81% 0.005 250)",brightRed:"oklch(78% 0.18 25)",brightGreen:"oklch(86% 0.13 205)",brightYellow:"oklch(88% 0.15 66)",brightBlue:"oklch(74% 0.06 250)",brightMagenta:"oklch(82% 0.12 320)",brightCyan:"oklch(86% 0.13 205)",brightWhite:"oklch(95% 0.003 250)"};function Ub({sessionId:t,kind:n,onExit:s}){const o=$b().activeTheme,l=te.useRef(null),y=te.useRef(null),b=te.useRef(null),c=te.useRef(s);c.current=s;const[u,h]=te.useState("connecting");te.useEffect(()=>{const f=l.current;if(!f)return;let C=!1;const x=new o5.Terminal({..._5,theme:Iv(o)});y.current=x;const A=new EE.FitAddon;x.loadAddon(A),x.open(f),x.attachCustomKeyEventHandler(g=>g.key==="Enter"&&g.shiftKey?(g.type==="keydown"&&x.input(`
|
|
83
|
+
`),!1):!0);try{const g=new s5;g.onContextLoss(()=>{C||g.dispose()}),x.loadAddon(g)}catch{}const E=h5({sessionId:t,kind:n,terminal:x,onExit:()=>c.current?.(),onStatus:(g,w)=>{h(w?`${g}: ${w}`:g)}});b.current=E;const p=()=>{A.fit(),E.resize(x.cols,x.rows)},S=async()=>{await document.fonts?.ready,!C&&(p(),E.start(),x.focus())},_=new ResizeObserver(p);return _.observe(f),S(),()=>{C=!0,_.disconnect(),E.dispose(),y.current=null,b.current=null;try{x.dispose()}catch{}}},[n,t]),te.useEffect(()=>{const f=y.current;f&&(f.options.theme=Iv(o))},[o]);const v=u.startsWith("live");return z.jsx("section",{className:"terminal-stage","aria-label":n==="shell"?"Shell terminal":"Fleet terminal",children:z.jsxs("div",{className:"terminal-shell",children:[v?null:z.jsxs("div",{className:"terminal-status","aria-live":"polite",children:[z.jsx("span",{className:"terminal-status-dot","aria-hidden":"true"}),u]}),z.jsx("div",{className:"terminal-canvas",ref:l})]})})}function Iv(t){return t==="carbon"?m5:g5}function v5({state:t}){const n=te.useRef(null);return t.shellOpen&&n.current===null&&(n.current=document.activeElement),te.useEffect(()=>{if(!t.shellOpen)return;const s=o=>{o.key==="Escape"&&Yo()};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s);const o=n.current;n.current=null,o?.focus?.()}},[t.shellOpen]),t.shellOpen?z.jsxs("div",{className:"shell-overlay",role:"dialog","aria-modal":"true","aria-label":"Shell",children:[z.jsx("button",{type:"button",className:"shell-overlay-scrim",onClick:Yo,"aria-label":"Close shell"}),z.jsxs("section",{className:"shell-overlay-card",children:[z.jsxs("header",{className:"shell-overlay-header",children:[z.jsx("span",{className:"shell-overlay-kicker",children:"Free Shell"}),z.jsx("h2",{children:"Local Shell"})]}),z.jsx("button",{type:"button",className:"shell-overlay-close",onClick:Yo,"aria-label":"Close shell",children:"×"}),z.jsx("div",{className:"shell-overlay-terminal",children:z.jsx(Ub,{sessionId:rf,kind:"shell",onExit:Yo},rf)})]})]}):null}function b5({open:t,title:n,message:s,tone:o="info",onDismiss:l}){return t?z.jsx("div",{className:"app-toast-host",children:z.jsxs("div",{className:`app-toast app-toast--${o}`,role:"status","aria-live":"polite",children:[z.jsx("span",{className:"app-toast-dot","aria-hidden":"true"}),z.jsxs("div",{className:"app-toast-body",children:[z.jsx("p",{className:"app-toast-title",children:n}),s?z.jsx("p",{className:"app-toast-message",children:s}):null]}),l?z.jsx("button",{type:"button",className:"app-toast-close",onClick:l,"aria-label":"Dismiss notification",children:"×"}):null]})}):null}const S5=[{to:"/operations",label:"Operation",end:!1,icon:"operations"},{to:"/codex",label:"Codex",end:!1,icon:"codex"}],zd=[{id:"maritime",label:"Maritime",swatch:["oklch(78% 0.13 75)","oklch(82% 0.13 195)","oklch(32% 0.04 248)"]},{id:"carbon",label:"Carbon",swatch:["oklch(76% 0.115 62)","oklch(80% 0.105 205)","oklch(25% 0.007 252)"]}];function y5({state:t}){const n=t.connectionError!==null,s=Un().pathname,o=s.startsWith("/codex")?z.jsx(zv,{}):s.startsWith("/operations")?z.jsx(Hv,{}):z.jsx(T5,{});return z.jsxs("header",{className:"topbar",children:[z.jsxs(Hf,{className:"topbar-brand",to:"/","aria-label":"Welcome으로 이동",children:[z.jsx("span",{className:`topbar-sigil ${n?"is-alert":""}`,"aria-hidden":"true",title:t.connectionError??void 0,children:o}),z.jsxs("h1",{className:"topbar-title",children:["Fleet",z.jsx("span",{className:"topbar-title-thin",children:"Console"})]})]}),z.jsx(C5,{state:t}),z.jsxs("div",{className:"topbar-meta",children:[t.updateAvailable?z.jsx("a",{className:"topbar-update-badge",href:"https://www.npmjs.com/package/@dotobokuri/fleet-console",target:"_blank",rel:"noreferrer",title:t.latestVersion?`Latest version: ${t.latestVersion}`:"Update available",children:"Update available"}):null,z.jsx("nav",{className:"topbar-nav","aria-label":"주 내비게이션",children:S5.map(l=>z.jsxs(G0,{to:l.to,end:l.end,className:({isActive:y})=>`topbar-nav-link ${y?"is-active":""}`,children:[z.jsx("span",{className:"topbar-nav-icon","aria-hidden":"true",children:l.icon==="operations"?z.jsx(Hv,{}):z.jsx(zv,{})}),z.jsx("span",{children:l.label})]},l.to))}),z.jsxs("button",{type:"button",className:"topbar-shell-button",onMouseDown:l=>l.preventDefault(),onClick:rb,"aria-label":"Shell",title:"Shell (⌘`)",children:[z.jsx(R5,{}),z.jsx("span",{children:"Shell"})]}),z.jsx(w5,{activeTheme:t.activeTheme})]})]})}function C5({state:t}){const[n,s]=te.useState(!1),o=te.useRef(null),l=te.useRef(null),y=te.useRef(null),b=t.theaters.find(f=>f.id===t.activeTheaterId)??null,c=b?.label??(t.theaters.length===0?"No Theaters":"Theater");te.useEffect(()=>{if(!n)return;const f=x=>{o.current?.contains(x.target)||s(!1)},C=x=>{x.key==="Escape"&&(s(!1),l.current?.focus())};return document.addEventListener("mousedown",f),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",f),document.removeEventListener("keydown",C)}},[n]),te.useEffect(()=>{if(!n)return;const f=y.current;if(!f)return;(f.querySelector('[data-active="true"]')??f.querySelector("[role^='menuitem']"))?.focus()},[n]);const u=f=>{eE(f),s(!1),l.current?.focus()},h=async()=>{s(!1),tE();try{const f=await Bw();if("cancelled"in f){nE();return}iE(f)}catch(f){rE(f instanceof Error?f.message:String(f))}},v=f=>{if(f.key!=="ArrowDown"&&f.key!=="ArrowUp")return;f.preventDefault();const C=Array.from(y.current?.querySelectorAll("[role^='menuitem']")??[]);if(C.length===0)return;const x=C.indexOf(document.activeElement),A=f.key==="ArrowDown"?1:-1,E=(x+A+C.length)%C.length;C[E]?.focus()};return z.jsxs("div",{className:"theater-control",ref:o,children:[z.jsx("span",{className:"theater-eyebrow","aria-hidden":"true",children:"Theater"}),z.jsxs("button",{type:"button",ref:l,className:`theater-trigger ${n?"is-open":""}`,"aria-haspopup":"menu","aria-expanded":n,"aria-label":"Theater",title:b?.label??t.theaterError??void 0,onClick:()=>s(f=>!f),children:[z.jsx("span",{className:"theater-trigger-sigil","aria-hidden":"true",children:z.jsx(E5,{})}),z.jsx("span",{className:"theater-trigger-label",children:c}),z.jsx("span",{className:"theater-trigger-caret","aria-hidden":"true",children:z.jsx(Pb,{})})]}),n?z.jsxs("div",{className:"theater-menu",role:"menu","aria-label":"Theater",ref:y,onKeyDown:v,children:[t.theaters.length>0?z.jsx("ul",{className:"theater-menu-list",children:t.theaters.map(f=>{const C=f.id===t.activeTheaterId;return z.jsx("li",{children:z.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":C,"data-active":C?"true":void 0,className:`theater-menu-item ${C?"is-active":""}`,title:f.label,onClick:()=>u(f.id),children:[z.jsx("span",{className:"theater-menu-check","aria-hidden":"true",children:C?z.jsx(jb,{}):null}),z.jsx("span",{className:"theater-menu-label",children:f.label})]})},f.id)})}):z.jsx("p",{className:"theater-menu-empty",children:"No Theaters yet."}),z.jsx("div",{className:"theater-menu-divider",role:"separator"}),z.jsxs("button",{type:"button",role:"menuitem",className:"theater-menu-item theater-menu-add",disabled:t.addingTheater,onClick:h,children:[z.jsx("span",{className:"theater-menu-check","aria-hidden":"true",children:z.jsx(A5,{})}),z.jsx("span",{className:"theater-menu-label",children:t.addingTheater?"Adding Theater…":"Add Theater…"})]}),t.theaterError?z.jsx("p",{className:"theater-menu-error",children:t.theaterError}):null]}):null]})}function w5({activeTheme:t}){const[n,s]=te.useState(!1),o=te.useRef(null),l=te.useRef(null),y=te.useRef(null),b=zd.find(h=>h.id===t)??zd[0];te.useEffect(()=>{if(!n)return;const h=f=>{o.current?.contains(f.target)||s(!1)},v=f=>{f.key==="Escape"&&(s(!1),l.current?.focus())};return document.addEventListener("mousedown",h),document.addEventListener("keydown",v),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",v)}},[n]),te.useEffect(()=>{if(!n)return;const h=y.current;if(!h)return;(h.querySelector('[data-active="true"]')??h.querySelector("[role^='menuitem']"))?.focus()},[n]);const c=h=>{Xw(h),s(!1),l.current?.focus()},u=h=>{if(h.key!=="ArrowDown"&&h.key!=="ArrowUp")return;h.preventDefault();const v=Array.from(y.current?.querySelectorAll("[role^='menuitem']")??[]);if(v.length===0)return;const f=v.indexOf(document.activeElement),C=h.key==="ArrowDown"?1:-1,x=(f+C+v.length)%v.length;v[x]?.focus()};return z.jsxs("div",{className:"theme-control",ref:o,children:[z.jsxs("button",{type:"button",ref:l,className:`theme-trigger ${n?"is-open":""}`,"aria-haspopup":"menu","aria-expanded":n,"aria-label":"Theme",onClick:()=>s(h=>!h),children:[z.jsx(x5,{}),z.jsx("span",{className:"theme-trigger-label",children:b.label}),z.jsx("span",{className:"theme-trigger-caret","aria-hidden":"true",children:z.jsx(Pb,{})})]}),n?z.jsx("div",{className:"theme-menu",role:"menu","aria-label":"Theme",ref:y,onKeyDown:u,children:zd.map(h=>{const v=h.id===t;return z.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":v,"data-active":v?"true":void 0,className:`theme-menu-item ${v?"is-active":""}`,onClick:()=>c(h.id),children:[z.jsx("span",{className:"theme-swatch","aria-hidden":"true",children:h.swatch.map(f=>z.jsx("i",{style:{background:f}},f))}),z.jsx("span",{className:"theme-menu-label",children:h.label}),z.jsx("span",{className:"theme-menu-check","aria-hidden":"true",children:v?z.jsx(jb,{}):null})]},h.id)})}):null]})}function E5(){return z.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[z.jsx("circle",{cx:"8",cy:"3.2",r:"1.5",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),z.jsx("path",{d:"M8 4.7v8.1M4.3 8.2H11.7M3.4 9.1A4.7 4.7 0 0 0 12.6 9.1",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}function Pb(){return z.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:z.jsx("path",{d:"M4.5 6.5 8 10l3.5-3.5",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})}function jb(){return z.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:z.jsx("path",{d:"M3.5 8.5 6.5 11.5 12.5 5",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function x5(){return z.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[z.jsx("path",{d:"M8 2.6a5.4 5.4 0 0 0-5.4 5.5c0 2.4 1.8 4.5 4.2 5 .8.2 1.2-.2 1.2-.8 0-.5-.4-.8-.4-1.3 0-.7.6-1.1 1.3-1.1h1.1c1.9 0 3.4-1.5 3.4-3.3C13.4 4.4 11 2.6 8 2.6Z",fill:"none",stroke:"currentColor",strokeWidth:"1.15",strokeLinejoin:"round"}),z.jsx("circle",{cx:"5.6",cy:"6.4",r:".75",fill:"currentColor"}),z.jsx("circle",{cx:"8",cy:"5.2",r:".75",fill:"currentColor"}),z.jsx("circle",{cx:"10.4",cy:"6.5",r:".75",fill:"currentColor"})]})}function T5(){return z.jsxs("svg",{viewBox:"0 0 16 16",width:"16",height:"16",children:[z.jsx("path",{d:"M8 1.8 9.5 6.5 14.2 8 9.5 9.5 8 14.2 6.5 9.5 1.8 8 6.5 6.5Z",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"}),z.jsx("path",{d:"M8 4.7 8.7 7.3 11.3 8 8.7 8.7 8 11.3 7.3 8.7 4.7 8 7.3 7.3Z",fill:"currentColor"})]})}function Hv(){return z.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[z.jsx("circle",{cx:"8",cy:"8",r:"5.4",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),z.jsx("path",{d:"M8 3.7v2.1M8 10.2v2.1M3.7 8h2.1M10.2 8h2.1M8 8l3.1-2.1",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),z.jsx("circle",{cx:"8",cy:"8",r:"1.1",fill:"currentColor"})]})}function zv(){return z.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[z.jsx("circle",{cx:"12",cy:"12",r:"9"}),z.jsx("circle",{cx:"12",cy:"12",r:"3.2",fill:"currentColor",stroke:"none",opacity:"0.16"}),z.jsx("path",{d:"M12 3v3.6M12 17.4V21M3 12h3.6M17.4 12H21"}),z.jsx("path",{d:"M12 8.6 14.2 12 12 15.4 9.8 12Z",fill:"currentColor",stroke:"none"})]})}function A5(){return z.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:z.jsx("path",{d:"M8 3.4v9.2M3.4 8h9.2",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})}function R5(){return z.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[z.jsx("path",{d:"M2.8 4.2h10.4v7.6H2.8z",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"}),z.jsx("path",{d:"M5 6.7 6.8 8 5 9.3M8.2 9.4h2.6",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function L5(){let t="";return n=>{t+=n;const s=[];let o=t.indexOf(`
|
|
84
84
|
|
|
85
|
-
`);for(;o>=0;){const l=
|
|
85
|
+
`);for(;o>=0;){const l=t.slice(0,o);t=t.slice(o+2);const y=M5(l);y&&s.push(y),o=t.indexOf(`
|
|
86
86
|
|
|
87
|
-
`)}return s}}function
|
|
87
|
+
`)}return s}}function k5(t){if(!t.data)return null;let n;try{n=JSON.parse(t.data)}catch{return null}if(t.event==="observer:truncated"){const o=n.tenant?.tenantId;return!o||!n.truncation?null:{kind:"truncation",tenantId:o,tenantLabel:n.tenant?.tenantLabel,truncation:n.truncation}}if(t.event==="session:updated"){const o=D5(n.session);return o?{kind:"session",tenantId:o.tenantId??o.sessionId,session:o}:null}const s=$v(n.event)??$v(n);return s?{kind:"event",tenantId:s.tenantId,tenantLabel:n.tenant?.tenantLabel,event:s}:null}function M5(t){const n=t.split(`
|
|
88
88
|
`),s=n.find(l=>l.startsWith("event:"))?.slice(6).trim()??"message",o=n.filter(l=>l.startsWith("data:")).map(l=>l.slice(5).trim()).join(`
|
|
89
|
-
`);return!o&&s==="message"?null:{event:s,data:o}}function $v(
|
|
89
|
+
`);return!o&&s==="message"?null:{event:s,data:o}}function $v(t){if(typeof t!="object"||t===null)return null;const n=t;return typeof n.id!="number"||typeof n.tenantId!="string"||typeof n.type!="string"||typeof n.at!="number"?null:typeof n.event!="object"||n.event===null?{...n,event:{}}:n}function D5(t){if(typeof t!="object"||t===null)return null;const n=t;return typeof n.sessionId!="string"||typeof n.cwdLabel!="string"||typeof n.sequence!="number"||typeof n.status!="string"||typeof n.createdAt!="number"||"cwd"in n||"canonicalCwd"in n?null:{sessionId:n.sessionId,terminalSessionId:typeof n.terminalSessionId=="string"?n.terminalSessionId:n.sessionId,cwdLabel:n.cwdLabel,sequence:n.sequence,label:typeof n.label=="string"?n.label:void 0,status:n.status,createdAt:n.createdAt,theaterId:typeof n.theaterId=="string"?n.theaterId:void 0,tenantId:typeof n.tenantId=="string"?n.tenantId:void 0,registrationId:typeof n.registrationId=="string"?n.registrationId:void 0}}const Uv=250,O5=5e3;function B5(){const t=new AbortController;return N5(t.signal),()=>t.abort()}async function N5(t){let n=Uv,s=!1;const o=async()=>{if(!s){s=!0;try{ab(await Y0(t))}catch{}finally{s=!1}}};for(;!t.aborted;){ut({connection:"connecting"});try{await H5(t);const l=await Mw(t);ut({connection:"live",connectionError:null}),n=Uv,await I5(l,t,o),t.aborted||ut({connection:"connecting",connectionError:null})}catch(l){if(t.aborted)return;ut({connection:"connecting",connectionError:l instanceof Error?l.message:String(l)})}if(t.aborted)return;await z5(n,t),n=Math.min(n*2,O5)}}async function I5(t,n,s){const o=new TextDecoder,l=L5();for(;!n.aborted;){const y=await t.read();if(y.done)return;for(const b of l(o.decode(y.value,{stream:!0}))){const c=k5(b);if(c){if(c.kind==="truncation"&&c.truncation){_E(c.tenantId,c.tenantLabel,c.truncation);continue}if(c.kind==="session"&&c.session){nb(c.session);continue}if(c.event){const{unknownTenant:u}=pE(c.event,c.tenantLabel);u&&s()}}}}}async function H5(t){const[n,s]=await Promise.all([Y0(t),kw(t)]);ab(n),fE(s)}async function z5(t,n){await new Promise(s=>{const o=()=>{clearTimeout(l),n.removeEventListener("abort",o),s()},l=setTimeout(o,t);n.addEventListener("abort",o)})}function Te(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function Ze(t){return Te(t).replace(/"/g,""")}const $5="contextual-knowledge-not-instructions";function U5(t,n,s){const o=s?.whyThisMatched??t.frontmatter.whyThisMatched,l=Wb(t,n);return`
|
|
90
90
|
<div class="context-actions-grid">
|
|
91
91
|
<button class="context-action-btn" type="button" data-action="copy-compact-context">
|
|
92
92
|
<span class="context-action-label">Compact context</span>
|
|
93
|
-
<span class="context-action-meta">${Uc(
|
|
93
|
+
<span class="context-action-meta">${Uc(Fb(t))} tok</span>
|
|
94
94
|
</button>
|
|
95
95
|
<button class="context-action-btn" type="button" data-action="copy-provenance-context">
|
|
96
96
|
<span class="context-action-label">Provenance</span>
|
|
97
|
-
<span class="context-action-meta">${Uc(
|
|
97
|
+
<span class="context-action-meta">${Uc(qb(t))} tok</span>
|
|
98
98
|
</button>
|
|
99
99
|
<button class="context-action-btn" type="button" data-action="copy-related-context">
|
|
100
100
|
<span class="context-action-label">Context pack</span>
|
|
@@ -107,11 +107,11 @@ WARNING: This link could potentially be dangerous`)){const S=window.open();if(S)
|
|
|
107
107
|
<div class="context-why-matched" hidden>${Te(o)}</div>
|
|
108
108
|
`:""}
|
|
109
109
|
</div>
|
|
110
|
-
`}function
|
|
111
|
-
`)}function
|
|
112
|
-
`)}function Uc(i){return Math.max(1,Math.ceil(i.length/4))}function qf(i){return i.replace(/\s+/g," ").trim().slice(0,240)||"(empty)"}async function U5(){return Jn(Vi("/health"))}async function P5(){return Jn(Vi("/workspaces"))}async function j5(){return Jn(Vi("/index"))}async function F5(){return Gb(Vi("/index-md"))}async function q5(i){return Jn(Vi(`/entry/${encodeURIComponent(i)}`))}async function W5(i,n=[],s=!1){const o=new URLSearchParams;i&&o.set("q",i),n.length>0&&o.set("tags",n.join(",")),s&&o.set("enhanced","true");const l=o.toString();return Jn(Vi(`/search${l?`?${l}`:""}`))}async function G5(i){return Gb(Vi(`/raw?ref=${encodeURIComponent(i)}`))}async function lu(i){return Jn(Vi(`/queue?status=${encodeURIComponent(i)}`))}async function K5(i){return Jn(Vi(`/queue/${encodeURIComponent(i)}`))}async function Y5(i){return Kb(Vi(`/queue/${encodeURIComponent(i)}/approve`),{})}async function V5(i,n){return Kb(Vi(`/queue/${encodeURIComponent(i)}/reject`),{reason:n})}async function Wb(){return Jn(Vi("/conflicts"))}async function X5(i){return Jn(Vi(`/conflicts/${encodeURIComponent(i)}`))}async function Z5(i){const n=typeof i=="number"?`?limit=${encodeURIComponent(String(i))}`:"";return Jn(Vi(`/log${n}`))}function Vi(i){const n=window.location.pathname.match(/^\/console\/codex\/w\/([^/]+)(?:\/|$)/),s=i.startsWith("/")?i:`/${i}`;return n?`/console/codex/w/${encodeURIComponent(decodeURIComponent(n[1]??""))}/api${s}`:`/console/codex/api${s}`}async function Jn(i){const n=await fetch(i,{headers:{accept:"application/json"}});if(!n.ok)throw new Error(await Wf(i,n));return n.json()}async function Gb(i){const n=await fetch(i,{headers:{accept:"text/markdown,text/plain"}});if(!n.ok)throw new Error(await Wf(i,n));return n.text()}async function Kb(i,n){const s=await fetch(i,{method:"POST",headers:{"content-type":"application/json",accept:"application/json"},body:JSON.stringify(n)});if(!s.ok)throw new Error(await Wf(i,s));return s.json()}async function Wf(i,n){return(await n.json().catch(()=>null))?.error??`${i} request failed: ${n.status}`}const Q5=/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}-[0-9]{2}-[0-9]{2}-[0-9]{3}Z-[0-9a-f]{8}$/,In="/console/codex",df=new Set;function ll(){const i=a2(o2(Qb(window.location.pathname)).pathname);return i.name==="queue"?{name:"queue",tab:new URLSearchParams(window.location.search).get("tab")==="archived"?"archived":"pending"}:i}function ff(){return Zb(Qb(window.location.pathname))?.wsId??null}function Is(i){i!==window.location.pathname+window.location.search&&(window.history.pushState({},"",i),Gf(ll()))}function J5(i){window.history.replaceState({},"",i),Gf(ll())}function e2(i){return df.add(i),()=>df.delete(i)}function t2(){window.addEventListener("popstate",()=>Gf(ll()))}function kr(i){return Xn(`/entry/${encodeURIComponent(i)}`)}function Yb(i){return Xn(`/raw/${encodeURIComponent(i)}`)}function Oa(i="pending"){return Xn(i==="archived"?"/queue?tab=archived":"/queue")}function i2(i){return Xn(`/queue/${encodeURIComponent(i)}`)}function n2(){return Xn("/conflicts")}function r2(i){return Xn(`/conflicts/${encodeURIComponent(i)}`)}function s2(){return Xn("/index-md")}function Vb(i){return Xn(typeof i!="number"?"/log":`/log?limit=${encodeURIComponent(String(i))}`)}function Xb(){return Xn("/")}function Pv(i){return`${In}/w/${encodeURIComponent(i)}/`}function a2(i){if(i==="/index"||i==="/index-md")return{name:"index-md"};if(i==="/log"){const y=new URLSearchParams(window.location.search).get("limit"),b=Number(y??20);return{name:"log",limit:Number.isInteger(b)?b:20}}if(i==="/conflicts")return{name:"conflicts"};const n=i.match(/^\/conflicts\/([^/]+)$/);if(n)return{name:"conflict-detail",id:decodeURIComponent(n[1]??"")};const s=i.match(/^\/entry\/([^/]+)$/);if(s)return{name:"entry",id:decodeURIComponent(s[1]??"")};const o=i.match(/^\/raw\/(.+)$/);if(o)return{name:"raw",ref:decodeURIComponent(o[1]??"")};if(i==="/queue")return{name:"queue",tab:"pending"};const l=i.match(/^\/queue\/([^/]+)$/);if(l){const y=decodeURIComponent(l[1]??"");return Q5.test(y)?{name:"queue-detail",patchId:y}:{name:"home"}}return{name:"home"}}function Xn(i){const n=ff();return n?`${In}/w/${encodeURIComponent(n)}${i}`:`${In}${i}`}function o2(i){const n=Zb(i);return n?{pathname:n.pathname,wsId:n.wsId}:{pathname:i,wsId:null}}function Zb(i){const n=i.match(/^\/w\/([^/]+)(\/.*)?$/);return n?{wsId:decodeURIComponent(n[1]??""),pathname:n[2]??"/"}:null}function Qb(i){return i===In||i===`${In}/`?"/":i.startsWith(`${In}/`)?i.slice(In.length)||"/":i}function Gf(i){for(const n of df)n(i)}const Jb="fleet-wiki-web-recent",pf=new Set,Hs={health:null,index:[],currentEntry:null,currentMatchHint:null,conflicts:[],currentConflict:null,indexMarkdown:null,log:null,loading:!1,error:null,recentIds:g2(),pendingPatchCount:0,currentWorkspaceId:null,workspaces:[]};function Pc(){return Hs}function l2(i){return pf.add(i),()=>pf.delete(i)}async function c2(){Zt({loading:!0,error:null});try{const[i,n,s,o]=await Promise.all([U5(),j5(),lu("pending").catch(()=>null),P5().catch(()=>null)]);Zt({health:i,index:n,pendingPatchCount:s?.pendingCount??0,currentWorkspaceId:o?.currentWorkspaceId??null,workspaces:o?.workspaces??[],loading:!1})}catch(i){Zt({loading:!1,error:$a(i)})}}async function u2(i){Zt({loading:!0,error:null,currentEntry:null,currentMatchHint:Hs.currentMatchHint?.id===i?Hs.currentMatchHint:null,currentConflict:null,indexMarkdown:null,log:null});try{const n=await q5(i),s=_2(i);Zt({currentEntry:n,currentConflict:null,indexMarkdown:null,log:null,recentIds:s,loading:!1})}catch(n){Zt({loading:!1,error:$a(n)})}}async function h2(){Zt({loading:!0,error:null,currentEntry:null,currentConflict:null,log:null});try{Zt({indexMarkdown:await F5(),loading:!1})}catch(i){Zt({loading:!1,error:$a(i)})}}async function d2(i){Zt({loading:!0,error:null,currentEntry:null,currentConflict:null,indexMarkdown:null});try{Zt({log:await Z5(i),loading:!1})}catch(n){Zt({loading:!1,error:$a(n)})}}async function f2(){Zt({loading:!0,error:null,currentEntry:null,currentConflict:null,indexMarkdown:null,log:null});try{Zt({conflicts:await Wb(),loading:!1})}catch(i){Zt({loading:!1,error:$a(i)})}}async function p2(i){Zt({loading:!0,error:null,currentEntry:null,indexMarkdown:null,log:null});try{const[n,s]=await Promise.all([X5(i),Wb().catch(()=>Hs.conflicts)]);Zt({currentConflict:n,conflicts:s,loading:!1})}catch(n){Zt({loading:!1,error:$a(n)})}}function $d(){Zt({currentEntry:null,currentMatchHint:null,currentConflict:null,indexMarkdown:null,log:null,error:null,loading:!1})}function eS(i){Zt({currentMatchHint:i})}function Kf(i){Zt({pendingPatchCount:i})}function Zt(i){Object.assign(Hs,i);for(const n of pf)n(Hs)}function _2(i){const n=[i,...Hs.recentIds.filter(s=>s!==i)].slice(0,8);return window.localStorage.setItem(Jb,JSON.stringify(n)),n}function g2(){try{const i=window.localStorage.getItem(Jb),n=i?JSON.parse(i):[];return Array.isArray(n)?n.filter(s=>typeof s=="string").slice(0,8):[]}catch{return[]}}function $a(i){return i instanceof Error?i.message:String(i)}const ke={open:!1,query:"",selectedIndex:0,results:[],debounceId:null,searchSeq:0,previousBodyOverflow:null,previousActiveElement:null};let _f=[],Yf=[];function m2(i,n){_f=i,Yf=n,ke.open&&!ke.query&&(ke.results=Vf(),ke.selectedIndex=0,Vc())}function tS(){if(ke.open){Fv();return}ke.open=!0,ke.query="",ke.selectedIndex=0,ke.results=Vf(),ke.previousActiveElement=document.activeElement instanceof HTMLElement?document.activeElement:null,k2(),x2(),Vc(),Fv()}function el(){ke.open&&(ke.open=!1,ke.searchSeq++,ke.debounceId!==null&&(window.clearTimeout(ke.debounceId),ke.debounceId=null),T2(),M2(),D2())}function v2(){document.addEventListener("keydown",b2),document.addEventListener("input",S2),document.addEventListener("click",y2),document.addEventListener("mouseover",C2)}function b2(i){if((i.metaKey||i.ctrlKey)&&i.key.toLowerCase()==="k"){i.preventDefault(),ke.open?el():tS();return}if(ke.open){if(i.key==="Tab"){O2(i);return}if(i.key==="Escape"){i.preventDefault(),el();return}if(i.key==="ArrowDown"){i.preventDefault(),ke.selectedIndex=Math.min(ke.selectedIndex+1,Math.max(0,ke.results.length-1)),gf({scroll:!0});return}if(i.key==="ArrowUp"){i.preventDefault(),ke.selectedIndex=Math.max(0,ke.selectedIndex-1),gf({scroll:!0});return}if(i.key==="Enter"){i.preventDefault();const s=ke.results[ke.selectedIndex];if(!s)return;eS(s),Is(kr(s.id)),el()}}}function S2(i){const n=i.target;!(n instanceof HTMLInputElement)||n.id!=="command-input"||(ke.query=n.value.trim(),ke.selectedIndex=0,ke.debounceId!==null&&window.clearTimeout(ke.debounceId),ke.debounceId=window.setTimeout(()=>{w2(ke.query)},150))}function y2(i){const n=i.target;if(!(n instanceof Element))return;if(n.matches("[data-action='open-command']")||n.closest("[data-action='open-command']")){tS();return}if(!ke.open)return;if(n.classList.contains("command-overlay")){el();return}const s=n.closest("[data-command-entry-id]");if(s){const o=ke.results.find(l=>l.id===(s.dataset.commandEntryId??""));eS(o??null),Is(kr(s.dataset.commandEntryId??"")),el()}}function C2(i){if(!ke.open)return;const n=i.target;if(!(n instanceof Element))return;const s=n.closest("[data-command-index]");if(!s)return;const o=Number(s.dataset.commandIndex);!Number.isInteger(o)||o<0||o>=ke.results.length||(ke.selectedIndex=o,gf({scroll:!1}))}async function w2(i){const n=++ke.searchSeq;if(!i){ke.results=Vf(),ke.selectedIndex=0,Vc();return}let s;try{s=await W5(i)}catch{s=[]}n!==ke.searchSeq||!ke.open||(ke.results=s,ke.selectedIndex=0,Vc())}function E2(){let i=document.querySelector("#command-palette-root");return i||(i=document.createElement("div"),i.id="command-palette-root",document.body.append(i)),i}function x2(){const i=E2();i.querySelector(".command-overlay")||(i.innerHTML=A2())}function T2(){const i=document.querySelector("#command-palette-root");i&&(i.innerHTML="")}function Vc(){const i=document.querySelector("#command-results-list");if(i){if(ke.results.length===0){i.innerHTML=`<p class="empty-state">${Te("No results found.")}</p>`;return}i.innerHTML=ke.query?ke.results.map(iS).join(""):R2()}}function gf(i={scroll:!0}){const n=document.querySelectorAll(".command-result");n.forEach((o,l)=>{o.classList.toggle("active",l===ke.selectedIndex)});const s=n[ke.selectedIndex];i.scroll&&s?.scrollIntoView({block:"nearest"})}function A2(){const i=Ze("Command palette"),n=Ze("Search titles · tags · content");return`
|
|
110
|
+
`}function Fb(t){const n={id:t.frontmatter.id,title:t.frontmatter.title,status:t.frontmatter.status??null,tags:t.frontmatter.tags,updated:t.frontmatter.updated,summary:qf(t.body)};return JSON.stringify({...n,token_estimate:Uc(JSON.stringify(n))},null,2)}function qb(t){return[`# ${t.frontmatter.title} (\`${t.frontmatter.id}\`)`,"",`- updated: ${t.frontmatter.updated}`,`- status: ${t.frontmatter.status??"unknown"}`,`- raw_source_ref: ${t.frontmatter.rawSourceRef??"(none)"}`,`- raw_source_refs: ${(t.frontmatter.rawSourceRefs??[]).join(", ")||"(none)"}`,"","## Summary",qf(t.body)].join(`
|
|
111
|
+
`)}function Wb(t,n){const s=new Set([...t.frontmatter.related??[]]),o=n.filter(l=>s.has(l.id)).sort((l,y)=>l.title.localeCompare(y.title));return[`<fleet-wiki-context boundary="${$5}">`,"# Fleet Wiki Context Pack","",`## Entry: ${t.frontmatter.title} (\`${t.frontmatter.id}\`)`,"",`- updated: ${t.frontmatter.updated}`,`- status: ${t.frontmatter.status??"unknown"}`,`- tags: ${t.frontmatter.tags.join(", ")||"(none)"}`,"","### Summary",qf(t.body),"","### Related Entries",...o.length>0?o.map(l=>`- [[wiki:${l.id}]] — ${l.title}`):["- (none)"],"","</fleet-wiki-context>"].join(`
|
|
112
|
+
`)}function Uc(t){return Math.max(1,Math.ceil(t.length/4))}function qf(t){return t.replace(/\s+/g," ").trim().slice(0,240)||"(empty)"}async function P5(){return Jn(Vi("/health"))}async function j5(){return Jn(Vi("/workspaces"))}async function F5(){return Jn(Vi("/index"))}async function q5(){return Kb(Vi("/index-md"))}async function W5(t){return Jn(Vi(`/entry/${encodeURIComponent(t)}`))}async function G5(t,n=[],s=!1){const o=new URLSearchParams;t&&o.set("q",t),n.length>0&&o.set("tags",n.join(",")),s&&o.set("enhanced","true");const l=o.toString();return Jn(Vi(`/search${l?`?${l}`:""}`))}async function K5(t){return Kb(Vi(`/raw?ref=${encodeURIComponent(t)}`))}async function lu(t){return Jn(Vi(`/queue?status=${encodeURIComponent(t)}`))}async function Y5(t){return Jn(Vi(`/queue/${encodeURIComponent(t)}`))}async function V5(t){return Yb(Vi(`/queue/${encodeURIComponent(t)}/approve`),{})}async function X5(t,n){return Yb(Vi(`/queue/${encodeURIComponent(t)}/reject`),{reason:n})}async function Gb(){return Jn(Vi("/conflicts"))}async function Z5(t){return Jn(Vi(`/conflicts/${encodeURIComponent(t)}`))}async function Q5(t){const n=typeof t=="number"?`?limit=${encodeURIComponent(String(t))}`:"";return Jn(Vi(`/log${n}`))}function Vi(t){const n=window.location.pathname.match(/^\/console\/codex\/w\/([^/]+)(?:\/|$)/),s=t.startsWith("/")?t:`/${t}`;return n?`/console/codex/w/${encodeURIComponent(decodeURIComponent(n[1]??""))}/api${s}`:`/console/codex/api${s}`}async function Jn(t){const n=await fetch(t,{headers:{accept:"application/json"}});if(!n.ok)throw new Error(await Wf(t,n));return n.json()}async function Kb(t){const n=await fetch(t,{headers:{accept:"text/markdown,text/plain"}});if(!n.ok)throw new Error(await Wf(t,n));return n.text()}async function Yb(t,n){const s=await fetch(t,{method:"POST",headers:{"content-type":"application/json",accept:"application/json"},body:JSON.stringify(n)});if(!s.ok)throw new Error(await Wf(t,s));return s.json()}async function Wf(t,n){return(await n.json().catch(()=>null))?.error??`${t} request failed: ${n.status}`}const J5=/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}-[0-9]{2}-[0-9]{2}-[0-9]{3}Z-[0-9a-f]{8}$/,In="/console/codex",df=new Set;function ll(){const t=o2(l2(Jb(window.location.pathname)).pathname);return t.name==="queue"?{name:"queue",tab:new URLSearchParams(window.location.search).get("tab")==="archived"?"archived":"pending"}:t}function ff(){return Qb(Jb(window.location.pathname))?.wsId??null}function Is(t){t!==window.location.pathname+window.location.search&&(window.history.pushState({},"",t),Gf(ll()))}function e2(t){window.history.replaceState({},"",t),Gf(ll())}function t2(t){return df.add(t),()=>df.delete(t)}function i2(){window.addEventListener("popstate",()=>Gf(ll()))}function kr(t){return Xn(`/entry/${encodeURIComponent(t)}`)}function Vb(t){return Xn(`/raw/${encodeURIComponent(t)}`)}function Oa(t="pending"){return Xn(t==="archived"?"/queue?tab=archived":"/queue")}function n2(t){return Xn(`/queue/${encodeURIComponent(t)}`)}function r2(){return Xn("/conflicts")}function s2(t){return Xn(`/conflicts/${encodeURIComponent(t)}`)}function a2(){return Xn("/index-md")}function Xb(t){return Xn(typeof t!="number"?"/log":`/log?limit=${encodeURIComponent(String(t))}`)}function Zb(){return Xn("/")}function Pv(t){return`${In}/w/${encodeURIComponent(t)}/`}function o2(t){if(t==="/index"||t==="/index-md")return{name:"index-md"};if(t==="/log"){const y=new URLSearchParams(window.location.search).get("limit"),b=Number(y??20);return{name:"log",limit:Number.isInteger(b)?b:20}}if(t==="/conflicts")return{name:"conflicts"};const n=t.match(/^\/conflicts\/([^/]+)$/);if(n)return{name:"conflict-detail",id:decodeURIComponent(n[1]??"")};const s=t.match(/^\/entry\/([^/]+)$/);if(s)return{name:"entry",id:decodeURIComponent(s[1]??"")};const o=t.match(/^\/raw\/(.+)$/);if(o)return{name:"raw",ref:decodeURIComponent(o[1]??"")};if(t==="/queue")return{name:"queue",tab:"pending"};const l=t.match(/^\/queue\/([^/]+)$/);if(l){const y=decodeURIComponent(l[1]??"");return J5.test(y)?{name:"queue-detail",patchId:y}:{name:"home"}}return{name:"home"}}function Xn(t){const n=ff();return n?`${In}/w/${encodeURIComponent(n)}${t}`:`${In}${t}`}function l2(t){const n=Qb(t);return n?{pathname:n.pathname,wsId:n.wsId}:{pathname:t,wsId:null}}function Qb(t){const n=t.match(/^\/w\/([^/]+)(\/.*)?$/);return n?{wsId:decodeURIComponent(n[1]??""),pathname:n[2]??"/"}:null}function Jb(t){return t===In||t===`${In}/`?"/":t.startsWith(`${In}/`)?t.slice(In.length)||"/":t}function Gf(t){for(const n of df)n(t)}const eS="fleet-wiki-web-recent",pf=new Set,Hs={health:null,index:[],currentEntry:null,currentMatchHint:null,conflicts:[],currentConflict:null,indexMarkdown:null,log:null,loading:!1,error:null,recentIds:m2(),pendingPatchCount:0,currentWorkspaceId:null,workspaces:[]};function Pc(){return Hs}function c2(t){return pf.add(t),()=>pf.delete(t)}async function u2(){Zt({loading:!0,error:null});try{const[t,n,s,o]=await Promise.all([P5(),F5(),lu("pending").catch(()=>null),j5().catch(()=>null)]);Zt({health:t,index:n,pendingPatchCount:s?.pendingCount??0,currentWorkspaceId:o?.currentWorkspaceId??null,workspaces:o?.workspaces??[],loading:!1})}catch(t){Zt({loading:!1,error:$a(t)})}}async function h2(t){Zt({loading:!0,error:null,currentEntry:null,currentMatchHint:Hs.currentMatchHint?.id===t?Hs.currentMatchHint:null,currentConflict:null,indexMarkdown:null,log:null});try{const n=await W5(t),s=g2(t);Zt({currentEntry:n,currentConflict:null,indexMarkdown:null,log:null,recentIds:s,loading:!1})}catch(n){Zt({loading:!1,error:$a(n)})}}async function d2(){Zt({loading:!0,error:null,currentEntry:null,currentConflict:null,log:null});try{Zt({indexMarkdown:await q5(),loading:!1})}catch(t){Zt({loading:!1,error:$a(t)})}}async function f2(t){Zt({loading:!0,error:null,currentEntry:null,currentConflict:null,indexMarkdown:null});try{Zt({log:await Q5(t),loading:!1})}catch(n){Zt({loading:!1,error:$a(n)})}}async function p2(){Zt({loading:!0,error:null,currentEntry:null,currentConflict:null,indexMarkdown:null,log:null});try{Zt({conflicts:await Gb(),loading:!1})}catch(t){Zt({loading:!1,error:$a(t)})}}async function _2(t){Zt({loading:!0,error:null,currentEntry:null,indexMarkdown:null,log:null});try{const[n,s]=await Promise.all([Z5(t),Gb().catch(()=>Hs.conflicts)]);Zt({currentConflict:n,conflicts:s,loading:!1})}catch(n){Zt({loading:!1,error:$a(n)})}}function $d(){Zt({currentEntry:null,currentMatchHint:null,currentConflict:null,indexMarkdown:null,log:null,error:null,loading:!1})}function tS(t){Zt({currentMatchHint:t})}function Kf(t){Zt({pendingPatchCount:t})}function Zt(t){Object.assign(Hs,t);for(const n of pf)n(Hs)}function g2(t){const n=[t,...Hs.recentIds.filter(s=>s!==t)].slice(0,8);return window.localStorage.setItem(eS,JSON.stringify(n)),n}function m2(){try{const t=window.localStorage.getItem(eS),n=t?JSON.parse(t):[];return Array.isArray(n)?n.filter(s=>typeof s=="string").slice(0,8):[]}catch{return[]}}function $a(t){return t instanceof Error?t.message:String(t)}const ke={open:!1,query:"",selectedIndex:0,results:[],debounceId:null,searchSeq:0,previousBodyOverflow:null,previousActiveElement:null};let _f=[],Yf=[];function v2(t,n){_f=t,Yf=n,ke.open&&!ke.query&&(ke.results=Vf(),ke.selectedIndex=0,Vc())}function iS(){if(ke.open){Fv();return}ke.open=!0,ke.query="",ke.selectedIndex=0,ke.results=Vf(),ke.previousActiveElement=document.activeElement instanceof HTMLElement?document.activeElement:null,M2(),T2(),Vc(),Fv()}function el(){ke.open&&(ke.open=!1,ke.searchSeq++,ke.debounceId!==null&&(window.clearTimeout(ke.debounceId),ke.debounceId=null),A2(),D2(),O2())}function b2(){document.addEventListener("keydown",S2),document.addEventListener("input",y2),document.addEventListener("click",C2),document.addEventListener("mouseover",w2)}function S2(t){if((t.metaKey||t.ctrlKey)&&t.key.toLowerCase()==="k"){t.preventDefault(),ke.open?el():iS();return}if(ke.open){if(t.key==="Tab"){B2(t);return}if(t.key==="Escape"){t.preventDefault(),el();return}if(t.key==="ArrowDown"){t.preventDefault(),ke.selectedIndex=Math.min(ke.selectedIndex+1,Math.max(0,ke.results.length-1)),gf({scroll:!0});return}if(t.key==="ArrowUp"){t.preventDefault(),ke.selectedIndex=Math.max(0,ke.selectedIndex-1),gf({scroll:!0});return}if(t.key==="Enter"){t.preventDefault();const s=ke.results[ke.selectedIndex];if(!s)return;tS(s),Is(kr(s.id)),el()}}}function y2(t){const n=t.target;!(n instanceof HTMLInputElement)||n.id!=="command-input"||(ke.query=n.value.trim(),ke.selectedIndex=0,ke.debounceId!==null&&window.clearTimeout(ke.debounceId),ke.debounceId=window.setTimeout(()=>{E2(ke.query)},150))}function C2(t){const n=t.target;if(!(n instanceof Element))return;if(n.matches("[data-action='open-command']")||n.closest("[data-action='open-command']")){iS();return}if(!ke.open)return;if(n.classList.contains("command-overlay")){el();return}const s=n.closest("[data-command-entry-id]");if(s){const o=ke.results.find(l=>l.id===(s.dataset.commandEntryId??""));tS(o??null),Is(kr(s.dataset.commandEntryId??"")),el()}}function w2(t){if(!ke.open)return;const n=t.target;if(!(n instanceof Element))return;const s=n.closest("[data-command-index]");if(!s)return;const o=Number(s.dataset.commandIndex);!Number.isInteger(o)||o<0||o>=ke.results.length||(ke.selectedIndex=o,gf({scroll:!1}))}async function E2(t){const n=++ke.searchSeq;if(!t){ke.results=Vf(),ke.selectedIndex=0,Vc();return}let s;try{s=await G5(t)}catch{s=[]}n!==ke.searchSeq||!ke.open||(ke.results=s,ke.selectedIndex=0,Vc())}function x2(){let t=document.querySelector("#command-palette-root");return t||(t=document.createElement("div"),t.id="command-palette-root",document.body.append(t)),t}function T2(){const t=x2();t.querySelector(".command-overlay")||(t.innerHTML=R2())}function A2(){const t=document.querySelector("#command-palette-root");t&&(t.innerHTML="")}function Vc(){const t=document.querySelector("#command-results-list");if(t){if(ke.results.length===0){t.innerHTML=`<p class="empty-state">${Te("No results found.")}</p>`;return}t.innerHTML=ke.query?ke.results.map(nS).join(""):L2()}}function gf(t={scroll:!0}){const n=document.querySelectorAll(".command-result");n.forEach((o,l)=>{o.classList.toggle("active",l===ke.selectedIndex)});const s=n[ke.selectedIndex];t.scroll&&s?.scrollIntoView({block:"nearest"})}function R2(){const t=Ze("Command palette"),n=Ze("Search titles · tags · content");return`
|
|
113
113
|
<div class="command-overlay">
|
|
114
|
-
<section class="command-card" role="dialog" aria-modal="true" aria-label="${
|
|
114
|
+
<section class="command-card" role="dialog" aria-modal="true" aria-label="${t}" tabindex="-1">
|
|
115
115
|
<div class="command-search">
|
|
116
116
|
<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
117
117
|
<circle cx="11" cy="11" r="6.5" />
|
|
@@ -123,24 +123,24 @@ WARNING: This link could potentially be dangerous`)){const S=window.open();if(S)
|
|
|
123
123
|
<div class="command-results" id="command-results-list"></div>
|
|
124
124
|
</section>
|
|
125
125
|
</div>
|
|
126
|
-
`}function
|
|
127
|
-
<button class="command-result${s}" type="button" data-command-entry-id="${Ze(
|
|
126
|
+
`}function nS(t,n){const s=n===ke.selectedIndex?" active":"",o=Ze(t.title),l=t.tags.slice(0,2),y=t.tags.length-l.length,b=z2(t),c=l.map(h=>`<span class="chip chip-tag">${Te(h)}</span>`).join(""),u=y>0?`<span class="chip chip-muted">+${y}</span>`:"";return`
|
|
127
|
+
<button class="command-result${s}" type="button" data-command-entry-id="${Ze(t.id)}" data-command-index="${n}" title="${o}">
|
|
128
128
|
<span class="command-result-text">
|
|
129
|
-
<strong>${
|
|
130
|
-
<small>${Te(
|
|
129
|
+
<strong>${I2(t.title,ke.query)}</strong>
|
|
130
|
+
<small>${Te(H2(t))}</small>
|
|
131
131
|
${b?`<small class="command-result-excerpt">${Te(b)}</small>`:""}
|
|
132
132
|
</span>
|
|
133
133
|
<span class="command-result-aside">${c}${u}</span>
|
|
134
134
|
</button>
|
|
135
|
-
`}function
|
|
136
|
-
<div class="command-section-heading">${Te(
|
|
137
|
-
${n.map((o,l)=>
|
|
138
|
-
`}function Vf(){const
|
|
139
|
-
]`).replace("lheading",
|
|
135
|
+
`}function L2(){const t=k2(),n=ke.results.slice(0,t),s=ke.results.slice(t);return[n.length>0?jv("Recent",n,0):"",s.length>0?jv("All",s,t):""].join("")}function jv(t,n,s){return`
|
|
136
|
+
<div class="command-section-heading">${Te(t)}</div>
|
|
137
|
+
${n.map((o,l)=>nS(o,s+l)).join("")}
|
|
138
|
+
`}function Vf(){const t=new Set(Yf),n=rS().map(o=>_f.find(l=>l.id===o)).filter(o=>!!o),s=_f.filter(o=>!t.has(o.id));return[...n,...s].slice(0,12).map((o,l)=>({id:o.id,title:o.title,score:Math.max(1,100-l),reason:"title",excerpt:"",path:o.path,tags:o.tags,updated:o.updated}))}function k2(){return rS().filter((t,n)=>ke.results[n]?.id===t).length}function rS(){return Array.from(new Set(Yf))}function M2(){ke.previousBodyOverflow===null&&(ke.previousBodyOverflow=document.body.style.overflow,document.body.style.overflow="hidden")}function D2(){ke.previousBodyOverflow!==null&&(document.body.style.overflow=ke.previousBodyOverflow,ke.previousBodyOverflow=null)}function O2(){const t=ke.previousActiveElement;ke.previousActiveElement=null,t?.isConnected&&t.focus()}function Fv(){window.setTimeout(()=>{const t=document.querySelector("#command-input");t&&(t.focus(),t.select())},0)}function B2(t){const n=document.querySelector(".command-card");if(!n)return;const s=N2(n);if(s.length===0){t.preventDefault(),n.focus();return}const o=document.activeElement,l=o instanceof HTMLElement?s.indexOf(o):-1,y=t.shiftKey?l<=0?s.length-1:l-1:l===-1||l===s.length-1?0:l+1;(l===-1||t.shiftKey&&l===0||!t.shiftKey&&l===s.length-1)&&(t.preventDefault(),s[y]?.focus())}function N2(t){const n=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(",");return Array.from(t.querySelectorAll(n)).filter(s=>!s.hasAttribute("hidden")&&s.offsetParent!==null)}function I2(t,n){if(!n)return Te(t);const s=t.toLocaleLowerCase(),o=n.toLocaleLowerCase();if(!o)return Te(t);let l=0,y="";for(;l<t.length;){const b=s.indexOf(o,l);if(b===-1)break;y+=Te(t.slice(l,b)),y+=`<mark class="command-highlight">${Te(t.slice(b,b+n.length))}</mark>`,l=b+n.length}return y+Te(t.slice(l))}function H2(t){switch(t.reason){case"id":return"id match";case"alias":return"alias match";case"tag":return"tag match";case"title":return"title match";case"body":return"body match";default:return"match"}}function z2(t){const n=t.matchedSnippets?.find(o=>o.field==="body")?.snippet;if(t.reason!=="body")return"";const s=n??t.excerpt;return $2(s??"")}function $2(t){return P2(U2(t)).replace(/\s+/g," ").trim().slice(0,180)}function U2(t){return t.replace(/<<<[^>]*>>>/g," ")}function P2(t){return t.replace(/!\[[^\]]*]\([^)]*\)/g," ").replace(/\[\[wiki:([^\]\|]+)(?:\|[^\]]*)?]]/g,"$1").replace(/\[([^\]]+)]\([^)]*\)/g,"$1").replace(/^#{1,6}\s+/gm,"").replace(/^\s*(?:[-*]\s+|\d+\.\s+)/gm,"").replace(/^\s*>\s?/gm,"").replace(/`+/g,"").replace(/\*\*([^*]+)\*\*/g,"$1").replace(/__([^_]+)__/g,"$1").replace(/\*([^*\n]+)\*/g,"$1").replace(/_([^_\n]+)_/g,"$1")}function Xf(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Us=Xf();function sS(t){Us=t}var tl={exec:()=>null};function ot(t,n=""){let s=typeof t=="string"?t:t.source,o={replace:(l,y)=>{let b=typeof y=="string"?y:y.source;return b=b.replace(Bi.caret,"$1"),s=s.replace(l,b),o},getRegex:()=>new RegExp(s,n)};return o}var j2=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Bi={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},F2=/^(?:[ \t]*(?:\n|$))+/,q2=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,W2=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,cl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,G2=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Zf=/(?:[*+-]|\d{1,9}[.)])/,aS=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,oS=ot(aS).replace(/bull/g,Zf).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),K2=ot(aS).replace(/bull/g,Zf).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Qf=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Y2=/^[^\n]+/,Jf=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,V2=ot(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Jf).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),X2=ot(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Zf).getRegex(),cu="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ep=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Z2=ot("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ep).replace("tag",cu).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),lS=ot(Qf).replace("hr",cl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",cu).getRegex(),Q2=ot(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",lS).getRegex(),tp={blockquote:Q2,code:q2,def:V2,fences:W2,heading:G2,hr:cl,html:Z2,lheading:oS,list:X2,newline:F2,paragraph:lS,table:tl,text:Y2},qv=ot("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",cl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",cu).getRegex(),J2={...tp,lheading:K2,table:qv,paragraph:ot(Qf).replace("hr",cl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",qv).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",cu).getRegex()},eT={...tp,html:ot(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ep).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:tl,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ot(Qf).replace("hr",cl).replace("heading",` *#{1,6} *[^
|
|
139
|
+
]`).replace("lheading",oS).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},tT=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,iT=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,cS=/^( {2,}|\\)\n(?!\s*$)/,nT=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,uu=/[\p{P}\p{S}]/u,ip=/[\s\p{P}\p{S}]/u,uS=/[^\s\p{P}\p{S}]/u,rT=ot(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ip).getRegex(),hS=/(?!~)[\p{P}\p{S}]/u,sT=/(?!~)[\s\p{P}\p{S}]/u,aT=/(?:[^\s\p{P}\p{S}]|~)/u,oT=ot(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",j2?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),dS=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,lT=ot(dS,"u").replace(/punct/g,uu).getRegex(),cT=ot(dS,"u").replace(/punct/g,hS).getRegex(),fS="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",uT=ot(fS,"gu").replace(/notPunctSpace/g,uS).replace(/punctSpace/g,ip).replace(/punct/g,uu).getRegex(),hT=ot(fS,"gu").replace(/notPunctSpace/g,aT).replace(/punctSpace/g,sT).replace(/punct/g,hS).getRegex(),dT=ot("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,uS).replace(/punctSpace/g,ip).replace(/punct/g,uu).getRegex(),fT=ot(/\\(punct)/,"gu").replace(/punct/g,uu).getRegex(),pT=ot(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),_T=ot(ep).replace("(?:-->|$)","-->").getRegex(),gT=ot("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",_T).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Xc=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,mT=ot(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Xc).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),pS=ot(/^!?\[(label)\]\[(ref)\]/).replace("label",Xc).replace("ref",Jf).getRegex(),_S=ot(/^!?\[(ref)\](?:\[\])?/).replace("ref",Jf).getRegex(),vT=ot("reflink|nolink(?!\\()","g").replace("reflink",pS).replace("nolink",_S).getRegex(),Wv=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,np={_backpedal:tl,anyPunctuation:fT,autolink:pT,blockSkip:oT,br:cS,code:iT,del:tl,emStrongLDelim:lT,emStrongRDelimAst:uT,emStrongRDelimUnd:dT,escape:tT,link:mT,nolink:_S,punctuation:rT,reflink:pS,reflinkSearch:vT,tag:gT,text:nT,url:tl},bT={...np,link:ot(/^!?\[(label)\]\((.*?)\)/).replace("label",Xc).getRegex(),reflink:ot(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Xc).getRegex()},mf={...np,emStrongRDelimAst:hT,emStrongLDelim:cT,url:ot(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Wv).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ot(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Wv).getRegex()},ST={...mf,br:ot(cS).replace("{2,}","*").getRegex(),text:ot(mf.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ac={normal:tp,gfm:J2,pedantic:eT},Po={normal:np,gfm:mf,breaks:ST,pedantic:bT},yT={"&":"&","<":"<",">":">",'"':""","'":"'"},Gv=t=>yT[t];function Yn(t,n){if(n){if(Bi.escapeTest.test(t))return t.replace(Bi.escapeReplace,Gv)}else if(Bi.escapeTestNoEncode.test(t))return t.replace(Bi.escapeReplaceNoEncode,Gv);return t}function Kv(t){try{t=encodeURI(t).replace(Bi.percentDecode,"%")}catch{return null}return t}function Yv(t,n){let s=t.replace(Bi.findPipe,(y,b,c)=>{let u=!1,h=b;for(;--h>=0&&c[h]==="\\";)u=!u;return u?"|":" |"}),o=s.split(Bi.splitPipe),l=0;if(o[0].trim()||o.shift(),o.length>0&&!o.at(-1)?.trim()&&o.pop(),n)if(o.length>n)o.splice(n);else for(;o.length<n;)o.push("");for(;l<o.length;l++)o[l]=o[l].trim().replace(Bi.slashPipe,"|");return o}function jo(t,n,s){let o=t.length;if(o===0)return"";let l=0;for(;l<o&&t.charAt(o-l-1)===n;)l++;return t.slice(0,o-l)}function CT(t,n){if(t.indexOf(n[1])===-1)return-1;let s=0;for(let o=0;o<t.length;o++)if(t[o]==="\\")o++;else if(t[o]===n[0])s++;else if(t[o]===n[1]&&(s--,s<0))return o;return s>0?-2:-1}function Vv(t,n,s,o,l){let y=n.href,b=n.title||null,c=t[1].replace(l.other.outputLinkReplace,"$1");o.state.inLink=!0;let u={type:t[0].charAt(0)==="!"?"image":"link",raw:s,href:y,title:b,text:c,tokens:o.inlineTokens(c)};return o.state.inLink=!1,u}function wT(t,n,s){let o=t.match(s.other.indentCodeCompensation);if(o===null)return n;let l=o[1];return n.split(`
|
|
140
140
|
`).map(y=>{let b=y.match(s.other.beginningSpace);if(b===null)return y;let[c]=b;return c.length>=l.length?y.slice(l.length):y}).join(`
|
|
141
|
-
`)}var Zc=class{options;rules;lexer;constructor(
|
|
142
|
-
`)}}}fences(
|
|
143
|
-
`)}}blockquote(
|
|
141
|
+
`)}var Zc=class{options;rules;lexer;constructor(t){this.options=t||Us}space(t){let n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){let n=this.rules.block.code.exec(t);if(n){let s=n[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?s:jo(s,`
|
|
142
|
+
`)}}}fences(t){let n=this.rules.block.fences.exec(t);if(n){let s=n[0],o=wT(s,n[3]||"",this.rules);return{type:"code",raw:s,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:o}}}heading(t){let n=this.rules.block.heading.exec(t);if(n){let s=n[2].trim();if(this.rules.other.endingHash.test(s)){let o=jo(s,"#");(this.options.pedantic||!o||this.rules.other.endingSpaceChar.test(o))&&(s=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:s,tokens:this.lexer.inline(s)}}}hr(t){let n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:jo(n[0],`
|
|
143
|
+
`)}}blockquote(t){let n=this.rules.block.blockquote.exec(t);if(n){let s=jo(n[0],`
|
|
144
144
|
`).split(`
|
|
145
145
|
`),o="",l="",y=[];for(;s.length>0;){let b=!1,c=[],u;for(u=0;u<s.length;u++)if(this.rules.other.blockquoteStart.test(s[u]))c.push(s[u]),b=!0;else if(!b)c.push(s[u]);else break;s=s.slice(u);let h=c.join(`
|
|
146
146
|
`),v=h.replace(this.rules.other.blockquoteSetextReplace,`
|
|
@@ -151,16 +151,16 @@ ${v}`:v;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
|
|
|
151
151
|
`),E=this.blockquote(A);y[y.length-1]=E,o=o.substring(0,o.length-x.raw.length)+E.raw,l=l.substring(0,l.length-x.text.length)+E.text;break}else if(C?.type==="list"){let x=C,A=x.raw+`
|
|
152
152
|
`+s.join(`
|
|
153
153
|
`),E=this.list(A);y[y.length-1]=E,o=o.substring(0,o.length-C.raw.length)+E.raw,l=l.substring(0,l.length-x.raw.length)+E.raw,s=A.substring(y.at(-1).raw.length).split(`
|
|
154
|
-
`);continue}}return{type:"blockquote",raw:o,tokens:y,text:l}}}list(
|
|
155
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,S=>" ".repeat(3*S.length)),C=
|
|
154
|
+
`);continue}}return{type:"blockquote",raw:o,tokens:y,text:l}}}list(t){let n=this.rules.block.list.exec(t);if(n){let s=n[1].trim(),o=s.length>1,l={type:"list",raw:"",ordered:o,start:o?+s.slice(0,-1):"",loose:!1,items:[]};s=o?`\\d{1,9}\\${s.slice(-1)}`:`\\${s}`,this.options.pedantic&&(s=o?s:"[*+-]");let y=this.rules.other.listItemRegex(s),b=!1;for(;t;){let u=!1,h="",v="";if(!(n=y.exec(t))||this.rules.block.hr.test(t))break;h=n[0],t=t.substring(h.length);let f=n[2].split(`
|
|
155
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,S=>" ".repeat(3*S.length)),C=t.split(`
|
|
156
156
|
`,1)[0],x=!f.trim(),A=0;if(this.options.pedantic?(A=2,v=f.trimStart()):x?A=n[1].length+1:(A=n[2].search(this.rules.other.nonSpaceChar),A=A>4?1:A,v=f.slice(A),A+=n[1].length),x&&this.rules.other.blankLine.test(C)&&(h+=C+`
|
|
157
|
-
`,
|
|
157
|
+
`,t=t.substring(C.length+1),u=!0),!u){let S=this.rules.other.nextBulletRegex(A),_=this.rules.other.hrRegex(A),g=this.rules.other.fencesBeginRegex(A),w=this.rules.other.headingBeginRegex(A),R=this.rules.other.htmlBeginRegex(A);for(;t;){let L=t.split(`
|
|
158
158
|
`,1)[0],D;if(C=L,this.options.pedantic?(C=C.replace(this.rules.other.listReplaceNesting," "),D=C):D=C.replace(this.rules.other.tabCharGlobal," "),g.test(C)||w.test(C)||R.test(C)||S.test(C)||_.test(C))break;if(D.search(this.rules.other.nonSpaceChar)>=A||!C.trim())v+=`
|
|
159
159
|
`+D.slice(A);else{if(x||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||g.test(f)||w.test(f)||_.test(f))break;v+=`
|
|
160
160
|
`+C}!x&&!C.trim()&&(x=!0),h+=L+`
|
|
161
|
-
`,
|
|
162
|
-
`):[],y={type:"table",raw:n[0],header:[],align:[],rows:[]};if(s.length===o.length){for(let b of o)this.rules.other.tableAlignRight.test(b)?y.align.push("right"):this.rules.other.tableAlignCenter.test(b)?y.align.push("center"):this.rules.other.tableAlignLeft.test(b)?y.align.push("left"):y.align.push(null);for(let b=0;b<s.length;b++)y.header.push({text:s[b],tokens:this.lexer.inline(s[b]),header:!0,align:y.align[b]});for(let b of l)y.rows.push(Yv(b,y.header.length).map((c,u)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:y.align[u]})));return y}}lheading(
|
|
163
|
-
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:s,tokens:this.lexer.inline(s)}}}text(
|
|
161
|
+
`,t=t.substring(L.length+1),f=D.slice(A)}}l.loose||(b?l.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(b=!0));let E=null,p;this.options.gfm&&(E=this.rules.other.listIsTask.exec(v),E&&(p=E[0]!=="[ ] ",v=v.replace(this.rules.other.listReplaceTask,""))),l.items.push({type:"list_item",raw:h,task:!!E,checked:p,loose:!1,text:v,tokens:[]}),l.raw+=h}let c=l.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;l.raw=l.raw.trimEnd();for(let u=0;u<l.items.length;u++)if(this.lexer.state.top=!1,l.items[u].tokens=this.lexer.blockTokens(l.items[u].text,[]),!l.loose){let h=l.items[u].tokens.filter(f=>f.type==="space"),v=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));l.loose=v}if(l.loose)for(let u=0;u<l.items.length;u++)l.items[u].loose=!0;return l}}html(t){let n=this.rules.block.html.exec(t);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(t){let n=this.rules.block.def.exec(t);if(n){let s=n[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),o=n[2]?n[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",l=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:s,raw:n[0],href:o,title:l}}}table(t){let n=this.rules.block.table.exec(t);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;let s=Yv(n[1]),o=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=n[3]?.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
162
|
+
`):[],y={type:"table",raw:n[0],header:[],align:[],rows:[]};if(s.length===o.length){for(let b of o)this.rules.other.tableAlignRight.test(b)?y.align.push("right"):this.rules.other.tableAlignCenter.test(b)?y.align.push("center"):this.rules.other.tableAlignLeft.test(b)?y.align.push("left"):y.align.push(null);for(let b=0;b<s.length;b++)y.header.push({text:s[b],tokens:this.lexer.inline(s[b]),header:!0,align:y.align[b]});for(let b of l)y.rows.push(Yv(b,y.header.length).map((c,u)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:y.align[u]})));return y}}lheading(t){let n=this.rules.block.lheading.exec(t);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){let n=this.rules.block.paragraph.exec(t);if(n){let s=n[1].charAt(n[1].length-1)===`
|
|
163
|
+
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:s,tokens:this.lexer.inline(s)}}}text(t){let n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){let n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:n[1]}}tag(t){let n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&this.rules.other.startATag.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){let n=this.rules.inline.link.exec(t);if(n){let s=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(s)){if(!this.rules.other.endAngleBracket.test(s))return;let y=jo(s.slice(0,-1),"\\");if((s.length-y.length)%2===0)return}else{let y=CT(n[2],"()");if(y===-2)return;if(y>-1){let b=(n[0].indexOf("!")===0?5:4)+n[1].length+y;n[2]=n[2].substring(0,y),n[0]=n[0].substring(0,b).trim(),n[3]=""}}let o=n[2],l="";if(this.options.pedantic){let y=this.rules.other.pedanticHrefTitle.exec(o);y&&(o=y[1],l=y[3])}else l=n[3]?n[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(s)?o=o.slice(1):o=o.slice(1,-1)),Vv(n,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:l&&l.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer,this.rules)}}reflink(t,n){let s;if((s=this.rules.inline.reflink.exec(t))||(s=this.rules.inline.nolink.exec(t))){let o=(s[2]||s[1]).replace(this.rules.other.multipleSpaceGlobal," "),l=n[o.toLowerCase()];if(!l){let y=s[0].charAt(0);return{type:"text",raw:y,text:y}}return Vv(s,l,s[0],this.lexer,this.rules)}}emStrong(t,n,s=""){let o=this.rules.inline.emStrongLDelim.exec(t);if(!(!o||o[3]&&s.match(this.rules.other.unicodeAlphaNumeric))&&(!(o[1]||o[2])||!s||this.rules.inline.punctuation.exec(s))){let l=[...o[0]].length-1,y,b,c=l,u=0,h=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,n=n.slice(-1*t.length+l);(o=h.exec(n))!=null;){if(y=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!y)continue;if(b=[...y].length,o[3]||o[4]){c+=b;continue}else if((o[5]||o[6])&&l%3&&!((l+b)%3)){u+=b;continue}if(c-=b,c>0)continue;b=Math.min(b,b+c+u);let v=[...o[0]][0].length,f=t.slice(0,l+o.index+v+b);if(Math.min(l,b)%2){let x=f.slice(1,-1);return{type:"em",raw:f,text:x,tokens:this.lexer.inlineTokens(x)}}let C=f.slice(2,-2);return{type:"strong",raw:f,text:C,tokens:this.lexer.inlineTokens(C)}}}}codespan(t){let n=this.rules.inline.code.exec(t);if(n){let s=n[2].replace(this.rules.other.newLineCharGlobal," "),o=this.rules.other.nonSpaceChar.test(s),l=this.rules.other.startingSpaceChar.test(s)&&this.rules.other.endingSpaceChar.test(s);return o&&l&&(s=s.substring(1,s.length-1)),{type:"codespan",raw:n[0],text:s}}}br(t){let n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){let n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){let n=this.rules.inline.autolink.exec(t);if(n){let s,o;return n[2]==="@"?(s=n[1],o="mailto:"+s):(s=n[1],o=s),{type:"link",raw:n[0],text:s,href:o,tokens:[{type:"text",raw:s,text:s}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let s,o;if(n[2]==="@")s=n[0],o="mailto:"+s;else{let l;do l=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])?.[0]??"";while(l!==n[0]);s=n[0],n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:s,href:o,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let n=this.rules.inline.text.exec(t);if(n){let s=this.lexer.state.inRawBlock;return{type:"text",raw:n[0],text:n[0],escaped:s}}}},Bn=class vf{tokens;options;state;tokenizer;inlineQueue;constructor(n){this.tokens=[],this.tokens.links=Object.create(null),this.options=n||Us,this.options.tokenizer=this.options.tokenizer||new Zc,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let s={other:Bi,block:Ac.normal,inline:Po.normal};this.options.pedantic?(s.block=Ac.pedantic,s.inline=Po.pedantic):this.options.gfm&&(s.block=Ac.gfm,this.options.breaks?s.inline=Po.breaks:s.inline=Po.gfm),this.tokenizer.rules=s}static get rules(){return{block:Ac,inline:Po}}static lex(n,s){return new vf(s).lex(n)}static lexInline(n,s){return new vf(s).inlineTokens(n)}lex(n){n=n.replace(Bi.carriageReturn,`
|
|
164
164
|
`),this.blockTokens(n,this.tokens);for(let s=0;s<this.inlineQueue.length;s++){let o=this.inlineQueue[s];this.inlineTokens(o.src,o.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(n,s=[],o=!1){for(this.options.pedantic&&(n=n.replace(Bi.tabCharGlobal," ").replace(Bi.spaceLine,""));n;){let l;if(this.options.extensions?.block?.some(b=>(l=b.call({lexer:this},n,s))?(n=n.substring(l.raw.length),s.push(l),!0):!1))continue;if(l=this.tokenizer.space(n)){n=n.substring(l.raw.length);let b=s.at(-1);l.raw.length===1&&b!==void 0?b.raw+=`
|
|
165
165
|
`:s.push(l);continue}if(l=this.tokenizer.code(n)){n=n.substring(l.raw.length);let b=s.at(-1);b?.type==="paragraph"||b?.type==="text"?(b.raw+=(b.raw.endsWith(`
|
|
166
166
|
`)?"":`
|
|
@@ -174,40 +174,40 @@ ${v}`:v;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
|
|
|
174
174
|
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=b.text):s.push(l),o=y.length!==n.length,n=n.substring(l.raw.length);continue}if(l=this.tokenizer.text(n)){n=n.substring(l.raw.length);let b=s.at(-1);b?.type==="text"?(b.raw+=(b.raw.endsWith(`
|
|
175
175
|
`)?"":`
|
|
176
176
|
`)+l.raw,b.text+=`
|
|
177
|
-
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=b.text):s.push(l);continue}if(n){let b="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(b);break}else throw new Error(b)}}return this.state.top=!0,s}inline(n,s=[]){return this.inlineQueue.push({src:n,tokens:s}),s}inlineTokens(n,s=[]){let o=n,l=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)u.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.anyPunctuation.exec(o))!=null;)o=o.slice(0,l.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let y;for(;(l=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)y=l[2]?l[2].length:0,o=o.slice(0,l.index+y)+"["+"a".repeat(l[0].length-y-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);o=this.options.hooks?.emStrongMask?.call({lexer:this},o)??o;let b=!1,c="";for(;n;){b||(c=""),b=!1;let u;if(this.options.extensions?.inline?.some(v=>(u=v.call({lexer:this},n,s))?(n=n.substring(u.raw.length),s.push(u),!0):!1))continue;if(u=this.tokenizer.escape(n)){n=n.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.tag(n)){n=n.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.link(n)){n=n.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.reflink(n,this.tokens.links)){n=n.substring(u.raw.length);let v=s.at(-1);u.type==="text"&&v?.type==="text"?(v.raw+=u.raw,v.text+=u.text):s.push(u);continue}if(u=this.tokenizer.emStrong(n,o,c)){n=n.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.codespan(n)){n=n.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.br(n)){n=n.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.del(n)){n=n.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.autolink(n)){n=n.substring(u.raw.length),s.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(n))){n=n.substring(u.raw.length),s.push(u);continue}let h=n;if(this.options.extensions?.startInline){let v=1/0,f=n.slice(1),C;this.options.extensions.startInline.forEach(x=>{C=x.call({lexer:this},f),typeof C=="number"&&C>=0&&(v=Math.min(v,C))}),v<1/0&&v>=0&&(h=n.substring(0,v+1))}if(u=this.tokenizer.inlineText(h)){n=n.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(c=u.raw.slice(-1)),b=!0;let v=s.at(-1);v?.type==="text"?(v.raw+=u.raw,v.text+=u.text):s.push(u);continue}if(n){let v="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(v);break}else throw new Error(v)}}return s}},Qc=class{options;parser;constructor(
|
|
177
|
+
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=b.text):s.push(l);continue}if(n){let b="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(b);break}else throw new Error(b)}}return this.state.top=!0,s}inline(n,s=[]){return this.inlineQueue.push({src:n,tokens:s}),s}inlineTokens(n,s=[]){let o=n,l=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)u.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.anyPunctuation.exec(o))!=null;)o=o.slice(0,l.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let y;for(;(l=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)y=l[2]?l[2].length:0,o=o.slice(0,l.index+y)+"["+"a".repeat(l[0].length-y-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);o=this.options.hooks?.emStrongMask?.call({lexer:this},o)??o;let b=!1,c="";for(;n;){b||(c=""),b=!1;let u;if(this.options.extensions?.inline?.some(v=>(u=v.call({lexer:this},n,s))?(n=n.substring(u.raw.length),s.push(u),!0):!1))continue;if(u=this.tokenizer.escape(n)){n=n.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.tag(n)){n=n.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.link(n)){n=n.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.reflink(n,this.tokens.links)){n=n.substring(u.raw.length);let v=s.at(-1);u.type==="text"&&v?.type==="text"?(v.raw+=u.raw,v.text+=u.text):s.push(u);continue}if(u=this.tokenizer.emStrong(n,o,c)){n=n.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.codespan(n)){n=n.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.br(n)){n=n.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.del(n)){n=n.substring(u.raw.length),s.push(u);continue}if(u=this.tokenizer.autolink(n)){n=n.substring(u.raw.length),s.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(n))){n=n.substring(u.raw.length),s.push(u);continue}let h=n;if(this.options.extensions?.startInline){let v=1/0,f=n.slice(1),C;this.options.extensions.startInline.forEach(x=>{C=x.call({lexer:this},f),typeof C=="number"&&C>=0&&(v=Math.min(v,C))}),v<1/0&&v>=0&&(h=n.substring(0,v+1))}if(u=this.tokenizer.inlineText(h)){n=n.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(c=u.raw.slice(-1)),b=!0;let v=s.at(-1);v?.type==="text"?(v.raw+=u.raw,v.text+=u.text):s.push(u);continue}if(n){let v="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(v);break}else throw new Error(v)}}return s}},Qc=class{options;parser;constructor(t){this.options=t||Us}space(t){return""}code({text:t,lang:n,escaped:s}){let o=(n||"").match(Bi.notSpaceStart)?.[0],l=t.replace(Bi.endingNewline,"")+`
|
|
178
178
|
`;return o?'<pre><code class="language-'+Yn(o)+'">'+(s?l:Yn(l,!0))+`</code></pre>
|
|
179
179
|
`:"<pre><code>"+(s?l:Yn(l,!0))+`</code></pre>
|
|
180
|
-
`}blockquote({tokens:
|
|
181
|
-
${this.parser.parse(
|
|
182
|
-
`}html({text:
|
|
183
|
-
`}hr(
|
|
184
|
-
`}list(
|
|
180
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
181
|
+
${this.parser.parse(t)}</blockquote>
|
|
182
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:n}){return`<h${n}>${this.parser.parseInline(t)}</h${n}>
|
|
183
|
+
`}hr(t){return`<hr>
|
|
184
|
+
`}list(t){let n=t.ordered,s=t.start,o="";for(let b=0;b<t.items.length;b++){let c=t.items[b];o+=this.listitem(c)}let l=n?"ol":"ul",y=n&&s!==1?' start="'+s+'"':"";return"<"+l+y+`>
|
|
185
185
|
`+o+"</"+l+`>
|
|
186
|
-
`}listitem(
|
|
187
|
-
`}checkbox({checked:
|
|
188
|
-
`}table(
|
|
186
|
+
`}listitem(t){let n="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=s+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=s+" "+Yn(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):n+=s+" "}return n+=this.parser.parse(t.tokens,!!t.loose),`<li>${n}</li>
|
|
187
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
188
|
+
`}table(t){let n="",s="";for(let l=0;l<t.header.length;l++)s+=this.tablecell(t.header[l]);n+=this.tablerow({text:s});let o="";for(let l=0;l<t.rows.length;l++){let y=t.rows[l];s="";for(let b=0;b<y.length;b++)s+=this.tablecell(y[b]);o+=this.tablerow({text:s})}return o&&(o=`<tbody>${o}</tbody>`),`<table>
|
|
189
189
|
<thead>
|
|
190
190
|
`+n+`</thead>
|
|
191
191
|
`+o+`</table>
|
|
192
|
-
`}tablerow({text:
|
|
193
|
-
${
|
|
194
|
-
`}tablecell(
|
|
195
|
-
`}strong({tokens:
|
|
196
|
-
`+this.renderer.text(c);s?o+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):o+=u;continue}default:{let c='Token with "'+b.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return o}parseInline(n,s=this.renderer){let o="";for(let l=0;l<n.length;l++){let y=n[l];if(this.options.extensions?.renderers?.[y.type]){let c=this.options.extensions.renderers[y.type].call({parser:this},y);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(y.type)){o+=c||"";continue}}let b=y;switch(b.type){case"escape":{o+=s.text(b);break}case"html":{o+=s.html(b);break}case"link":{o+=s.link(b);break}case"image":{o+=s.image(b);break}case"strong":{o+=s.strong(b);break}case"em":{o+=s.em(b);break}case"codespan":{o+=s.codespan(b);break}case"br":{o+=s.br(b);break}case"del":{o+=s.del(b);break}case"text":{o+=s.text(b);break}default:{let c='Token with "'+b.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return o}},Xo=class{options;block;constructor(
|
|
197
|
-
Please report this to https://github.com/markedjs/marked.`,i){let o="<p>An error occurred:</p><pre>"+Yn(s.message+"",!0)+"</pre>";return n?Promise.resolve(o):o}if(n)return Promise.reject(s);throw s}}},zs=new _S;function bt(i,n){return zs.parse(i,n)}bt.options=bt.setOptions=function(i){return zs.setOptions(i),bt.defaults=zs.defaults,rS(bt.defaults),bt};bt.getDefaults=Xf;bt.defaults=Us;bt.use=function(...i){return zs.use(...i),bt.defaults=zs.defaults,rS(bt.defaults),bt};bt.walkTokens=function(i,n){return zs.walkTokens(i,n)};bt.parseInline=zs.parseInline;bt.Parser=Nn;bt.parser=Nn.parse;bt.Renderer=Qc;bt.TextRenderer=rp;bt.Lexer=Bn;bt.lexer=Bn.lex;bt.Tokenizer=Zc;bt.Hooks=Xo;bt.parse=bt;bt.options;bt.setOptions;bt.use;bt.walkTokens;bt.parseInline;Nn.parse;Bn.lex;const{entries:gS,setPrototypeOf:Xv,isFrozen:wT,getPrototypeOf:ET,getOwnPropertyDescriptor:xT}=Object;let{freeze:Ni,seal:xn,create:Aa}=Object,{apply:Sf,construct:yf}=typeof Reflect<"u"&&Reflect;Ni||(Ni=function(n){return n});xn||(xn=function(n){return n});Sf||(Sf=function(n,s){for(var o=arguments.length,l=new Array(o>2?o-2:0),y=2;y<o;y++)l[y-2]=arguments[y];return n.apply(s,l)});yf||(yf=function(n){for(var s=arguments.length,o=new Array(s>1?s-1:0),l=1;l<s;l++)o[l-1]=arguments[l];return new n(...o)});const Fo=ci(Array.prototype.forEach),TT=ci(Array.prototype.lastIndexOf),Zv=ci(Array.prototype.pop),qo=ci(Array.prototype.push),AT=ci(Array.prototype.splice),Di=Array.isArray,Zo=ci(String.prototype.toLowerCase),Ud=ci(String.prototype.toString),Qv=ci(String.prototype.match),xa=ci(String.prototype.replace),Jv=ci(String.prototype.indexOf),RT=ci(String.prototype.trim),LT=ci(Number.prototype.toString),kT=ci(Boolean.prototype.toString),e0=typeof BigInt>"u"?null:ci(BigInt.prototype.toString),t0=typeof Symbol>"u"?null:ci(Symbol.prototype.toString),qt=ci(Object.prototype.hasOwnProperty),Wo=ci(Object.prototype.toString),xi=ci(RegExp.prototype.test),Rc=MT(TypeError);function ci(i){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var s=arguments.length,o=new Array(s>1?s-1:0),l=1;l<s;l++)o[l-1]=arguments[l];return Sf(i,n,o)}}function MT(i){return function(){for(var n=arguments.length,s=new Array(n),o=0;o<n;o++)s[o]=arguments[o];return yf(i,s)}}function Ge(i,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Zo;if(Xv&&Xv(i,null),!Di(n))return i;let o=n.length;for(;o--;){let l=n[o];if(typeof l=="string"){const y=s(l);y!==l&&(wT(n)||(n[o]=y),l=y)}i[l]=!0}return i}function DT(i){for(let n=0;n<i.length;n++)qt(i,n)||(i[n]=null);return i}function Ki(i){const n=Aa(null);for(const[s,o]of gS(i))qt(i,s)&&(Di(o)?n[s]=DT(o):o&&typeof o=="object"&&o.constructor===Object?n[s]=Ki(o):n[s]=o);return n}function OT(i){switch(typeof i){case"string":return i;case"number":return LT(i);case"boolean":return kT(i);case"bigint":return e0?e0(i):"0";case"symbol":return t0?t0(i):"Symbol()";case"undefined":return Wo(i);case"function":case"object":{if(i===null)return Wo(i);const n=i,s=Ra(n,"toString");if(typeof s=="function"){const o=s(n);return typeof o=="string"?o:Wo(o)}return Wo(i)}default:return Wo(i)}}function Ra(i,n){for(;i!==null;){const o=xT(i,n);if(o){if(o.get)return ci(o.get);if(typeof o.value=="function")return ci(o.value)}i=ET(i)}function s(){return null}return s}function BT(i){try{return xi(i,""),!0}catch{return!1}}const i0=Ni(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Pd=Ni(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),jd=Ni(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),NT=Ni(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Fd=Ni(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),IT=Ni(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),n0=Ni(["#text"]),r0=Ni(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),qd=Ni(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),s0=Ni(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Lc=Ni(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),HT=xn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),zT=xn(/<%[\w\W]*|[\w\W]*%>/gm),$T=xn(/\$\{[\w\W]*/gm),UT=xn(/^data-[\-\w.\u00B7-\uFFFF]+$/),PT=xn(/^aria-[\-\w]+$/),mS=xn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),jT=xn(/^(?:\w+script|data):/i),FT=xn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),vS=xn(/^html$/i),qT=xn(/^[a-z][.\w]*(-[.\w]+)+$/i);var a0=Object.freeze({__proto__:null,ARIA_ATTR:PT,ATTR_WHITESPACE:FT,CUSTOM_ELEMENT:qT,DATA_ATTR:UT,DOCTYPE_NAME:vS,ERB_EXPR:zT,IS_ALLOWED_URI:mS,IS_SCRIPT_OR_DATA:jT,MUSTACHE_EXPR:HT,TMPLIT_EXPR:$T});const Go={element:1,text:3,progressingInstruction:7,comment:8,document:9},WT=function(){return typeof window>"u"?null:window},GT=function(n,s){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let o=null;const l="data-tt-policy-suffix";s&&s.hasAttribute(l)&&(o=s.getAttribute(l));const y="dompurify"+(o?"#"+o:"");try{return n.createPolicy(y,{createHTML(b){return b},createScriptURL(b){return b}})}catch{return console.warn("TrustedTypes policy "+y+" could not be created."),null}},o0=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function bS(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:WT();const n=Me=>bS(Me);if(n.version="3.4.2",n.removed=[],!i||!i.document||i.document.nodeType!==Go.document||!i.Element)return n.isSupported=!1,n;let{document:s}=i;const o=s,l=o.currentScript,{DocumentFragment:y,HTMLTemplateElement:b,Node:c,Element:u,NodeFilter:h,NamedNodeMap:v=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:f,DOMParser:C,trustedTypes:x}=i,A=u.prototype,E=Ra(A,"cloneNode"),p=Ra(A,"remove"),S=Ra(A,"nextSibling"),_=Ra(A,"childNodes"),g=Ra(A,"parentNode");if(typeof b=="function"){const Me=s.createElement("template");Me.content&&Me.content.ownerDocument&&(s=Me.content.ownerDocument)}let w,R="";const{implementation:L,createNodeIterator:D,createDocumentFragment:T,getElementsByTagName:B}=s,{importNode:W}=o;let P=o0();n.isSupported=typeof gS=="function"&&typeof g=="function"&&L&&L.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:F,ERB_EXPR:I,TMPLIT_EXPR:Z,DATA_ATTR:ee,ARIA_ATTR:j,IS_SCRIPT_OR_DATA:Y,ATTR_WHITESPACE:K,CUSTOM_ELEMENT:O}=a0;let{IS_ALLOWED_URI:H}=a0,M=null;const U=Ge({},[...i0,...Pd,...jd,...Fd,...n0]);let V=null;const ae=Ge({},[...r0,...qd,...s0,...Lc]);let ce=Object.seal(Aa(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),me=null,Q=null;const $=Object.seal(Aa(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let oe=!0,_e=!0,Se=!1,be=!0,$e=!1,je=!0,Ke=!1,Ct=!1,Be=!1,Qt=!1,gi=!1,mi=!1,un=!0,An=!1;const Jt="user-content-";let lt=!0,Gt=!1,It={},Ht=null;const ei=Ge({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Rn=null;const Ti=Ge({},["audio","video","img","source","image","track"]);let Xi=null;const ut=Ge({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ii="http://www.w3.org/1998/Math/MathML",Kt="http://www.w3.org/2000/svg",Yt="http://www.w3.org/1999/xhtml";let zt=Yt,us=!1,er=null;const Ps=Ge({},[Ii,Kt,Yt],Ud);let Ln=Ge({},["mi","mo","mn","ms","mtext"]),Pn=Ge({},["annotation-xml"]);const tr=Ge({},["title","style","font","a","script"]);let ti=null;const X=["application/xhtml+xml","text/html"],he="text/html";let ve=null,Ie=null;const St=s.createElement("form"),ht=function(q){return q instanceof RegExp||q instanceof Function},Ee=function(){let q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ie&&Ie===q)return;(!q||typeof q!="object")&&(q={}),q=Ki(q),ti=X.indexOf(q.PARSER_MEDIA_TYPE)===-1?he:q.PARSER_MEDIA_TYPE,ve=ti==="application/xhtml+xml"?Ud:Zo,M=qt(q,"ALLOWED_TAGS")&&Di(q.ALLOWED_TAGS)?Ge({},q.ALLOWED_TAGS,ve):U,V=qt(q,"ALLOWED_ATTR")&&Di(q.ALLOWED_ATTR)?Ge({},q.ALLOWED_ATTR,ve):ae,er=qt(q,"ALLOWED_NAMESPACES")&&Di(q.ALLOWED_NAMESPACES)?Ge({},q.ALLOWED_NAMESPACES,Ud):Ps,Xi=qt(q,"ADD_URI_SAFE_ATTR")&&Di(q.ADD_URI_SAFE_ATTR)?Ge(Ki(ut),q.ADD_URI_SAFE_ATTR,ve):ut,Rn=qt(q,"ADD_DATA_URI_TAGS")&&Di(q.ADD_DATA_URI_TAGS)?Ge(Ki(Ti),q.ADD_DATA_URI_TAGS,ve):Ti,Ht=qt(q,"FORBID_CONTENTS")&&Di(q.FORBID_CONTENTS)?Ge({},q.FORBID_CONTENTS,ve):ei,me=qt(q,"FORBID_TAGS")&&Di(q.FORBID_TAGS)?Ge({},q.FORBID_TAGS,ve):Ki({}),Q=qt(q,"FORBID_ATTR")&&Di(q.FORBID_ATTR)?Ge({},q.FORBID_ATTR,ve):Ki({}),It=qt(q,"USE_PROFILES")?q.USE_PROFILES&&typeof q.USE_PROFILES=="object"?Ki(q.USE_PROFILES):q.USE_PROFILES:!1,oe=q.ALLOW_ARIA_ATTR!==!1,_e=q.ALLOW_DATA_ATTR!==!1,Se=q.ALLOW_UNKNOWN_PROTOCOLS||!1,be=q.ALLOW_SELF_CLOSE_IN_ATTR!==!1,$e=q.SAFE_FOR_TEMPLATES||!1,je=q.SAFE_FOR_XML!==!1,Ke=q.WHOLE_DOCUMENT||!1,Qt=q.RETURN_DOM||!1,gi=q.RETURN_DOM_FRAGMENT||!1,mi=q.RETURN_TRUSTED_TYPE||!1,Be=q.FORCE_BODY||!1,un=q.SANITIZE_DOM!==!1,An=q.SANITIZE_NAMED_PROPS||!1,lt=q.KEEP_CONTENT!==!1,Gt=q.IN_PLACE||!1,H=BT(q.ALLOWED_URI_REGEXP)?q.ALLOWED_URI_REGEXP:mS,zt=typeof q.NAMESPACE=="string"?q.NAMESPACE:Yt,Ln=qt(q,"MATHML_TEXT_INTEGRATION_POINTS")&&q.MATHML_TEXT_INTEGRATION_POINTS&&typeof q.MATHML_TEXT_INTEGRATION_POINTS=="object"?Ki(q.MATHML_TEXT_INTEGRATION_POINTS):Ge({},["mi","mo","mn","ms","mtext"]),Pn=qt(q,"HTML_INTEGRATION_POINTS")&&q.HTML_INTEGRATION_POINTS&&typeof q.HTML_INTEGRATION_POINTS=="object"?Ki(q.HTML_INTEGRATION_POINTS):Ge({},["annotation-xml"]);const pe=qt(q,"CUSTOM_ELEMENT_HANDLING")&&q.CUSTOM_ELEMENT_HANDLING&&typeof q.CUSTOM_ELEMENT_HANDLING=="object"?Ki(q.CUSTOM_ELEMENT_HANDLING):Aa(null);if(ce=Aa(null),qt(pe,"tagNameCheck")&&ht(pe.tagNameCheck)&&(ce.tagNameCheck=pe.tagNameCheck),qt(pe,"attributeNameCheck")&&ht(pe.attributeNameCheck)&&(ce.attributeNameCheck=pe.attributeNameCheck),qt(pe,"allowCustomizedBuiltInElements")&&typeof pe.allowCustomizedBuiltInElements=="boolean"&&(ce.allowCustomizedBuiltInElements=pe.allowCustomizedBuiltInElements),$e&&(_e=!1),gi&&(Qt=!0),It&&(M=Ge({},n0),V=Aa(null),It.html===!0&&(Ge(M,i0),Ge(V,r0)),It.svg===!0&&(Ge(M,Pd),Ge(V,qd),Ge(V,Lc)),It.svgFilters===!0&&(Ge(M,jd),Ge(V,qd),Ge(V,Lc)),It.mathMl===!0&&(Ge(M,Fd),Ge(V,s0),Ge(V,Lc))),$.tagCheck=null,$.attributeCheck=null,qt(q,"ADD_TAGS")&&(typeof q.ADD_TAGS=="function"?$.tagCheck=q.ADD_TAGS:Di(q.ADD_TAGS)&&(M===U&&(M=Ki(M)),Ge(M,q.ADD_TAGS,ve))),qt(q,"ADD_ATTR")&&(typeof q.ADD_ATTR=="function"?$.attributeCheck=q.ADD_ATTR:Di(q.ADD_ATTR)&&(V===ae&&(V=Ki(V)),Ge(V,q.ADD_ATTR,ve))),qt(q,"ADD_URI_SAFE_ATTR")&&Di(q.ADD_URI_SAFE_ATTR)&&Ge(Xi,q.ADD_URI_SAFE_ATTR,ve),qt(q,"FORBID_CONTENTS")&&Di(q.FORBID_CONTENTS)&&(Ht===ei&&(Ht=Ki(Ht)),Ge(Ht,q.FORBID_CONTENTS,ve)),qt(q,"ADD_FORBID_CONTENTS")&&Di(q.ADD_FORBID_CONTENTS)&&(Ht===ei&&(Ht=Ki(Ht)),Ge(Ht,q.ADD_FORBID_CONTENTS,ve)),lt&&(M["#text"]=!0),Ke&&Ge(M,["html","head","body"]),M.table&&(Ge(M,["tbody"]),delete me.tbody),q.TRUSTED_TYPES_POLICY){if(typeof q.TRUSTED_TYPES_POLICY.createHTML!="function")throw Rc('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof q.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Rc('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=q.TRUSTED_TYPES_POLICY,R=w.createHTML("")}else w===void 0&&(w=GT(x,l)),w!==null&&typeof R=="string"&&(R=w.createHTML(""));Ni&&Ni(q),Ie=q},Ce=Ge({},[...Pd,...jd,...NT]),He=Ge({},[...Fd,...IT]),Bt=function(q){let pe=g(q);(!pe||!pe.tagName)&&(pe={namespaceURI:zt,tagName:"template"});const we=Zo(q.tagName),it=Zo(pe.tagName);return er[q.namespaceURI]?q.namespaceURI===Kt?pe.namespaceURI===Yt?we==="svg":pe.namespaceURI===Ii?we==="svg"&&(it==="annotation-xml"||Ln[it]):!!Ce[we]:q.namespaceURI===Ii?pe.namespaceURI===Yt?we==="math":pe.namespaceURI===Kt?we==="math"&&Pn[it]:!!He[we]:q.namespaceURI===Yt?pe.namespaceURI===Kt&&!Pn[it]||pe.namespaceURI===Ii&&!Ln[it]?!1:!He[we]&&(tr[we]||!Ce[we]):!!(ti==="application/xhtml+xml"&&er[q.namespaceURI]):!1},Qe=function(q){qo(n.removed,{element:q});try{g(q).removeChild(q)}catch{p(q)}},vi=function(q,pe){try{qo(n.removed,{attribute:pe.getAttributeNode(q),from:pe})}catch{qo(n.removed,{attribute:null,from:pe})}if(pe.removeAttribute(q),q==="is")if(Qt||gi)try{Qe(pe)}catch{}else try{pe.setAttribute(q,"")}catch{}},ir=function(q){let pe=null,we=null;if(Be)q="<remove></remove>"+q;else{const Tt=Qv(q,/^[\r\n\t ]+/);we=Tt&&Tt[0]}ti==="application/xhtml+xml"&&zt===Yt&&(q='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+q+"</body></html>");const it=w?w.createHTML(q):q;if(zt===Yt)try{pe=new C().parseFromString(it,ti)}catch{}if(!pe||!pe.documentElement){pe=L.createDocument(zt,"template",null);try{pe.documentElement.innerHTML=us?R:it}catch{}}const Ye=pe.body||pe.documentElement;return q&&we&&Ye.insertBefore(s.createTextNode(we),Ye.childNodes[0]||null),zt===Yt?B.call(pe,Ke?"html":"body")[0]:Ke?pe.documentElement:Ye},nr=function(q){return D.call(q.ownerDocument||q,q,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},Hi=function(q){return q instanceof f&&(typeof q.nodeName!="string"||typeof q.textContent!="string"||typeof q.removeChild!="function"||!(q.attributes instanceof v)||typeof q.removeAttribute!="function"||typeof q.setAttribute!="function"||typeof q.namespaceURI!="string"||typeof q.insertBefore!="function"||typeof q.hasChildNodes!="function")},xt=function(q){return typeof c=="function"&&q instanceof c};function wt(Me,q,pe){Fo(Me,we=>{we.call(n,q,pe,Ie)})}const kn=function(q){let pe=null;if(wt(P.beforeSanitizeElements,q,null),Hi(q))return Qe(q),!0;const we=ve(q.nodeName);if(wt(P.uponSanitizeElement,q,{tagName:we,allowedTags:M}),je&&q.hasChildNodes()&&!xt(q.firstElementChild)&&xi(/<[/\w!]/g,q.innerHTML)&&xi(/<[/\w!]/g,q.textContent)||je&&q.namespaceURI===Yt&&we==="style"&&xt(q.firstElementChild)||q.nodeType===Go.progressingInstruction||je&&q.nodeType===Go.comment&&xi(/<[/\w]/g,q.data))return Qe(q),!0;if(me[we]||!($.tagCheck instanceof Function&&$.tagCheck(we))&&!M[we]){if(!me[we]&&rr(we)&&(ce.tagNameCheck instanceof RegExp&&xi(ce.tagNameCheck,we)||ce.tagNameCheck instanceof Function&&ce.tagNameCheck(we)))return!1;if(lt&&!Ht[we]){const it=g(q)||q.parentNode,Ye=_(q)||q.childNodes;if(Ye&&it){const Tt=Ye.length;for(let $t=Tt-1;$t>=0;--$t){const Ut=E(Ye[$t],!0);it.insertBefore(Ut,S(q))}}}return Qe(q),!0}return q instanceof u&&!Bt(q)||(we==="noscript"||we==="noembed"||we==="noframes")&&xi(/<\/no(script|embed|frames)/i,q.innerHTML)?(Qe(q),!0):($e&&q.nodeType===Go.text&&(pe=q.textContent,Fo([F,I,Z],it=>{pe=xa(pe,it," ")}),q.textContent!==pe&&(qo(n.removed,{element:q.cloneNode()}),q.textContent=pe)),wt(P.afterSanitizeElements,q,null),!1)},Mr=function(q,pe,we){if(Q[pe]||un&&(pe==="id"||pe==="name")&&(we in s||we in St))return!1;const it=V[pe]||$.attributeCheck instanceof Function&&$.attributeCheck(pe,q);if(!(_e&&!Q[pe]&&xi(ee,pe))){if(!(oe&&xi(j,pe))){if(!it||Q[pe]){if(!(rr(q)&&(ce.tagNameCheck instanceof RegExp&&xi(ce.tagNameCheck,q)||ce.tagNameCheck instanceof Function&&ce.tagNameCheck(q))&&(ce.attributeNameCheck instanceof RegExp&&xi(ce.attributeNameCheck,pe)||ce.attributeNameCheck instanceof Function&&ce.attributeNameCheck(pe,q))||pe==="is"&&ce.allowCustomizedBuiltInElements&&(ce.tagNameCheck instanceof RegExp&&xi(ce.tagNameCheck,we)||ce.tagNameCheck instanceof Function&&ce.tagNameCheck(we))))return!1}else if(!Xi[pe]){if(!xi(H,xa(we,K,""))){if(!((pe==="src"||pe==="xlink:href"||pe==="href")&&q!=="script"&&Jv(we,"data:")===0&&Rn[q])){if(!(Se&&!xi(Y,xa(we,K,"")))){if(we)return!1}}}}}}return!0},js=Ge({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),rr=function(q){return!js[Zo(q)]&&xi(O,q)},hs=function(q){wt(P.beforeSanitizeAttributes,q,null);const{attributes:pe}=q;if(!pe||Hi(q))return;const we={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:V,forceKeepAttr:void 0};let it=pe.length;for(;it--;){const Ye=pe[it],{name:Tt,namespaceURI:$t,value:Ut}=Ye,ge=ve(Tt),Le=Ut;let De=Tt==="value"?Le:RT(Le);if(we.attrName=ge,we.attrValue=De,we.keepAttr=!0,we.forceKeepAttr=void 0,wt(P.uponSanitizeAttribute,q,we),De=we.attrValue,An&&(ge==="id"||ge==="name")&&Jv(De,Jt)!==0&&(vi(Tt,q),De=Jt+De),je&&xi(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,De)){vi(Tt,q);continue}if(ge==="attributename"&&Qv(De,"href")){vi(Tt,q);continue}if(we.forceKeepAttr)continue;if(!we.keepAttr){vi(Tt,q);continue}if(!be&&xi(/\/>/i,De)){vi(Tt,q);continue}$e&&Fo([F,I,Z],Mt=>{De=xa(De,Mt," ")});const rt=ve(q.nodeName);if(!Mr(rt,ge,De)){vi(Tt,q);continue}if(w&&typeof x=="object"&&typeof x.getAttributeType=="function"&&!$t)switch(x.getAttributeType(rt,ge)){case"TrustedHTML":{De=w.createHTML(De);break}case"TrustedScriptURL":{De=w.createScriptURL(De);break}}if(De!==Le)try{$t?q.setAttributeNS($t,Tt,De):q.setAttribute(Tt,De),Hi(q)?Qe(q):Zv(n.removed)}catch{vi(Tt,q)}}wt(P.afterSanitizeAttributes,q,null)},jn=function(q){let pe=null;const we=nr(q);for(wt(P.beforeSanitizeShadowDOM,q,null);pe=we.nextNode();)wt(P.uponSanitizeShadowNode,pe,null),kn(pe),hs(pe),pe.content instanceof y&&jn(pe.content);wt(P.afterSanitizeShadowDOM,q,null)};return n.sanitize=function(Me){let q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},pe=null,we=null,it=null,Ye=null;if(us=!Me,us&&(Me="<!-->"),typeof Me!="string"&&!xt(Me)&&(Me=OT(Me),typeof Me!="string"))throw Rc("dirty is not a string, aborting");if(!n.isSupported)return Me;if(Ct||Ee(q),n.removed=[],typeof Me=="string"&&(Gt=!1),Gt){const Ut=Me.nodeName;if(typeof Ut=="string"){const ge=ve(Ut);if(!M[ge]||me[ge])throw Rc("root node is forbidden and cannot be sanitized in-place")}}else if(Me instanceof c)pe=ir("<!---->"),we=pe.ownerDocument.importNode(Me,!0),we.nodeType===Go.element&&we.nodeName==="BODY"||we.nodeName==="HTML"?pe=we:pe.appendChild(we);else{if(!Qt&&!$e&&!Ke&&Me.indexOf("<")===-1)return w&&mi?w.createHTML(Me):Me;if(pe=ir(Me),!pe)return Qt?null:mi?R:""}pe&&Be&&Qe(pe.firstChild);const Tt=nr(Gt?Me:pe);for(;it=Tt.nextNode();)kn(it),hs(it),it.content instanceof y&&jn(it.content);if(Gt)return Me;if(Qt){if($e){pe.normalize();let Ut=pe.innerHTML;Fo([F,I,Z],ge=>{Ut=xa(Ut,ge," ")}),pe.innerHTML=Ut}if(gi)for(Ye=T.call(pe.ownerDocument);pe.firstChild;)Ye.appendChild(pe.firstChild);else Ye=pe;return(V.shadowroot||V.shadowrootmode)&&(Ye=W.call(o,Ye,!0)),Ye}let $t=Ke?pe.outerHTML:pe.innerHTML;return Ke&&M["!doctype"]&&pe.ownerDocument&&pe.ownerDocument.doctype&&pe.ownerDocument.doctype.name&&xi(vS,pe.ownerDocument.doctype.name)&&($t="<!DOCTYPE "+pe.ownerDocument.doctype.name+`>
|
|
198
|
-
`+$t),$e&&Fo([F,I,Z],Ut=>{$t=xa($t,Ut," ")}),w&&mi?w.createHTML($t):$t},n.setConfig=function(){let Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ee(Me),Ct=!0},n.clearConfig=function(){Ie=null,Ct=!1},n.isValidAttribute=function(Me,q,pe){Ie||Ee({});const we=ve(Me),it=ve(q);return Mr(we,it,pe)},n.addHook=function(Me,q){typeof q=="function"&&qo(P[Me],q)},n.removeHook=function(Me,q){if(q!==void 0){const pe=TT(P[Me],q);return pe===-1?void 0:AT(P[Me],pe,1)[0]}return Zv(P[Me])},n.removeHooks=function(Me){P[Me]=[]},n.removeAllHooks=function(){P=o0()},n}var il=bS(),Wd,l0;function KT(){if(l0)return Wd;l0=1;function i(X){return X instanceof Map?X.clear=X.delete=X.set=function(){throw new Error("map is read-only")}:X instanceof Set&&(X.add=X.clear=X.delete=function(){throw new Error("set is read-only")}),Object.freeze(X),Object.getOwnPropertyNames(X).forEach(he=>{const ve=X[he],Ie=typeof ve;(Ie==="object"||Ie==="function")&&!Object.isFrozen(ve)&&i(ve)}),X}class n{constructor(he){he.data===void 0&&(he.data={}),this.data=he.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function s(X){return X.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function o(X,...he){const ve=Object.create(null);for(const Ie in X)ve[Ie]=X[Ie];return he.forEach(function(Ie){for(const St in Ie)ve[St]=Ie[St]}),ve}const l="</span>",y=X=>!!X.scope,b=(X,{prefix:he})=>{if(X.startsWith("language:"))return X.replace("language:","language-");if(X.includes(".")){const ve=X.split(".");return[`${he}${ve.shift()}`,...ve.map((Ie,St)=>`${Ie}${"_".repeat(St+1)}`)].join(" ")}return`${he}${X}`};class c{constructor(he,ve){this.buffer="",this.classPrefix=ve.classPrefix,he.walk(this)}addText(he){this.buffer+=s(he)}openNode(he){if(!y(he))return;const ve=b(he.scope,{prefix:this.classPrefix});this.span(ve)}closeNode(he){y(he)&&(this.buffer+=l)}value(){return this.buffer}span(he){this.buffer+=`<span class="${he}">`}}const u=(X={})=>{const he={children:[]};return Object.assign(he,X),he};class h{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(he){this.top.children.push(he)}openNode(he){const ve=u({scope:he});this.add(ve),this.stack.push(ve)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(he){return this.constructor._walk(he,this.rootNode)}static _walk(he,ve){return typeof ve=="string"?he.addText(ve):ve.children&&(he.openNode(ve),ve.children.forEach(Ie=>this._walk(he,Ie)),he.closeNode(ve)),he}static _collapse(he){typeof he!="string"&&he.children&&(he.children.every(ve=>typeof ve=="string")?he.children=[he.children.join("")]:he.children.forEach(ve=>{h._collapse(ve)}))}}class v extends h{constructor(he){super(),this.options=he}addText(he){he!==""&&this.add(he)}startScope(he){this.openNode(he)}endScope(){this.closeNode()}__addSublanguage(he,ve){const Ie=he.root;ve&&(Ie.scope=`language:${ve}`),this.add(Ie)}toHTML(){return new c(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function f(X){return X?typeof X=="string"?X:X.source:null}function C(X){return E("(?=",X,")")}function x(X){return E("(?:",X,")*")}function A(X){return E("(?:",X,")?")}function E(...X){return X.map(ve=>f(ve)).join("")}function p(X){const he=X[X.length-1];return typeof he=="object"&&he.constructor===Object?(X.splice(X.length-1,1),he):{}}function S(...X){return"("+(p(X).capture?"":"?:")+X.map(Ie=>f(Ie)).join("|")+")"}function _(X){return new RegExp(X.toString()+"|").exec("").length-1}function g(X,he){const ve=X&&X.exec(he);return ve&&ve.index===0}const w=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function R(X,{joinWith:he}){let ve=0;return X.map(Ie=>{ve+=1;const St=ve;let ht=f(Ie),Ee="";for(;ht.length>0;){const Ce=w.exec(ht);if(!Ce){Ee+=ht;break}Ee+=ht.substring(0,Ce.index),ht=ht.substring(Ce.index+Ce[0].length),Ce[0][0]==="\\"&&Ce[1]?Ee+="\\"+String(Number(Ce[1])+St):(Ee+=Ce[0],Ce[0]==="("&&ve++)}return Ee}).map(Ie=>`(${Ie})`).join(he)}const L=/\b\B/,D="[a-zA-Z]\\w*",T="[a-zA-Z_]\\w*",B="\\b\\d+(\\.\\d+)?",W="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",P="\\b(0b[01]+)",F="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",I=(X={})=>{const he=/^#![ ]*\//;return X.binary&&(X.begin=E(he,/.*\b/,X.binary,/\b.*/)),o({scope:"meta",begin:he,end:/$/,relevance:0,"on:begin":(ve,Ie)=>{ve.index!==0&&Ie.ignoreMatch()}},X)},Z={begin:"\\\\[\\s\\S]",relevance:0},ee={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Z]},j={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Z]},Y={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},K=function(X,he,ve={}){const Ie=o({scope:"comment",begin:X,end:he,contains:[]},ve);Ie.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const St=S("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Ie.contains.push({begin:E(/[ ]+/,"(",St,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Ie},O=K("//","$"),H=K("/\\*","\\*/"),M=K("#","$"),U={scope:"number",begin:B,relevance:0},V={scope:"number",begin:W,relevance:0},ae={scope:"number",begin:P,relevance:0},ce={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Z,{begin:/\[/,end:/\]/,relevance:0,contains:[Z]}]},me={scope:"title",begin:D,relevance:0},Q={scope:"title",begin:T,relevance:0},$={begin:"\\.\\s*"+T,relevance:0};var _e=Object.freeze({__proto__:null,APOS_STRING_MODE:ee,BACKSLASH_ESCAPE:Z,BINARY_NUMBER_MODE:ae,BINARY_NUMBER_RE:P,COMMENT:K,C_BLOCK_COMMENT_MODE:H,C_LINE_COMMENT_MODE:O,C_NUMBER_MODE:V,C_NUMBER_RE:W,END_SAME_AS_BEGIN:function(X){return Object.assign(X,{"on:begin":(he,ve)=>{ve.data._beginMatch=he[1]},"on:end":(he,ve)=>{ve.data._beginMatch!==he[1]&&ve.ignoreMatch()}})},HASH_COMMENT_MODE:M,IDENT_RE:D,MATCH_NOTHING_RE:L,METHOD_GUARD:$,NUMBER_MODE:U,NUMBER_RE:B,PHRASAL_WORDS_MODE:Y,QUOTE_STRING_MODE:j,REGEXP_MODE:ce,RE_STARTERS_RE:F,SHEBANG:I,TITLE_MODE:me,UNDERSCORE_IDENT_RE:T,UNDERSCORE_TITLE_MODE:Q});function Se(X,he){X.input[X.index-1]==="."&&he.ignoreMatch()}function be(X,he){X.className!==void 0&&(X.scope=X.className,delete X.className)}function $e(X,he){he&&X.beginKeywords&&(X.begin="\\b("+X.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",X.__beforeBegin=Se,X.keywords=X.keywords||X.beginKeywords,delete X.beginKeywords,X.relevance===void 0&&(X.relevance=0))}function je(X,he){Array.isArray(X.illegal)&&(X.illegal=S(...X.illegal))}function Ke(X,he){if(X.match){if(X.begin||X.end)throw new Error("begin & end are not supported with match");X.begin=X.match,delete X.match}}function Ct(X,he){X.relevance===void 0&&(X.relevance=1)}const Be=(X,he)=>{if(!X.beforeMatch)return;if(X.starts)throw new Error("beforeMatch cannot be used with starts");const ve=Object.assign({},X);Object.keys(X).forEach(Ie=>{delete X[Ie]}),X.keywords=ve.keywords,X.begin=E(ve.beforeMatch,C(ve.begin)),X.starts={relevance:0,contains:[Object.assign(ve,{endsParent:!0})]},X.relevance=0,delete ve.beforeMatch},Qt=["of","and","for","in","not","or","if","then","parent","list","value"],gi="keyword";function mi(X,he,ve=gi){const Ie=Object.create(null);return typeof X=="string"?St(ve,X.split(" ")):Array.isArray(X)?St(ve,X):Object.keys(X).forEach(function(ht){Object.assign(Ie,mi(X[ht],he,ht))}),Ie;function St(ht,Ee){he&&(Ee=Ee.map(Ce=>Ce.toLowerCase())),Ee.forEach(function(Ce){const He=Ce.split("|");Ie[He[0]]=[ht,un(He[0],He[1])]})}}function un(X,he){return he?Number(he):An(X)?0:1}function An(X){return Qt.includes(X.toLowerCase())}const Jt={},lt=X=>{console.error(X)},Gt=(X,...he)=>{console.log(`WARN: ${X}`,...he)},It=(X,he)=>{Jt[`${X}/${he}`]||(console.log(`Deprecated as of ${X}. ${he}`),Jt[`${X}/${he}`]=!0)},Ht=new Error;function ei(X,he,{key:ve}){let Ie=0;const St=X[ve],ht={},Ee={};for(let Ce=1;Ce<=he.length;Ce++)Ee[Ce+Ie]=St[Ce],ht[Ce+Ie]=!0,Ie+=_(he[Ce-1]);X[ve]=Ee,X[ve]._emit=ht,X[ve]._multi=!0}function Rn(X){if(Array.isArray(X.begin)){if(X.skip||X.excludeBegin||X.returnBegin)throw lt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ht;if(typeof X.beginScope!="object"||X.beginScope===null)throw lt("beginScope must be object"),Ht;ei(X,X.begin,{key:"beginScope"}),X.begin=R(X.begin,{joinWith:""})}}function Ti(X){if(Array.isArray(X.end)){if(X.skip||X.excludeEnd||X.returnEnd)throw lt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ht;if(typeof X.endScope!="object"||X.endScope===null)throw lt("endScope must be object"),Ht;ei(X,X.end,{key:"endScope"}),X.end=R(X.end,{joinWith:""})}}function Xi(X){X.scope&&typeof X.scope=="object"&&X.scope!==null&&(X.beginScope=X.scope,delete X.scope)}function ut(X){Xi(X),typeof X.beginScope=="string"&&(X.beginScope={_wrap:X.beginScope}),typeof X.endScope=="string"&&(X.endScope={_wrap:X.endScope}),Rn(X),Ti(X)}function Ii(X){function he(Ee,Ce){return new RegExp(f(Ee),"m"+(X.case_insensitive?"i":"")+(X.unicodeRegex?"u":"")+(Ce?"g":""))}class ve{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Ce,He){He.position=this.position++,this.matchIndexes[this.matchAt]=He,this.regexes.push([He,Ce]),this.matchAt+=_(Ce)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Ce=this.regexes.map(He=>He[1]);this.matcherRe=he(R(Ce,{joinWith:"|"}),!0),this.lastIndex=0}exec(Ce){this.matcherRe.lastIndex=this.lastIndex;const He=this.matcherRe.exec(Ce);if(!He)return null;const Bt=He.findIndex((vi,ir)=>ir>0&&vi!==void 0),Qe=this.matchIndexes[Bt];return He.splice(0,Bt),Object.assign(He,Qe)}}class Ie{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Ce){if(this.multiRegexes[Ce])return this.multiRegexes[Ce];const He=new ve;return this.rules.slice(Ce).forEach(([Bt,Qe])=>He.addRule(Bt,Qe)),He.compile(),this.multiRegexes[Ce]=He,He}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Ce,He){this.rules.push([Ce,He]),He.type==="begin"&&this.count++}exec(Ce){const He=this.getMatcher(this.regexIndex);He.lastIndex=this.lastIndex;let Bt=He.exec(Ce);if(this.resumingScanAtSamePosition()&&!(Bt&&Bt.index===this.lastIndex)){const Qe=this.getMatcher(0);Qe.lastIndex=this.lastIndex+1,Bt=Qe.exec(Ce)}return Bt&&(this.regexIndex+=Bt.position+1,this.regexIndex===this.count&&this.considerAll()),Bt}}function St(Ee){const Ce=new Ie;return Ee.contains.forEach(He=>Ce.addRule(He.begin,{rule:He,type:"begin"})),Ee.terminatorEnd&&Ce.addRule(Ee.terminatorEnd,{type:"end"}),Ee.illegal&&Ce.addRule(Ee.illegal,{type:"illegal"}),Ce}function ht(Ee,Ce){const He=Ee;if(Ee.isCompiled)return He;[be,Ke,ut,Be].forEach(Qe=>Qe(Ee,Ce)),X.compilerExtensions.forEach(Qe=>Qe(Ee,Ce)),Ee.__beforeBegin=null,[$e,je,Ct].forEach(Qe=>Qe(Ee,Ce)),Ee.isCompiled=!0;let Bt=null;return typeof Ee.keywords=="object"&&Ee.keywords.$pattern&&(Ee.keywords=Object.assign({},Ee.keywords),Bt=Ee.keywords.$pattern,delete Ee.keywords.$pattern),Bt=Bt||/\w+/,Ee.keywords&&(Ee.keywords=mi(Ee.keywords,X.case_insensitive)),He.keywordPatternRe=he(Bt,!0),Ce&&(Ee.begin||(Ee.begin=/\B|\b/),He.beginRe=he(He.begin),!Ee.end&&!Ee.endsWithParent&&(Ee.end=/\B|\b/),Ee.end&&(He.endRe=he(He.end)),He.terminatorEnd=f(He.end)||"",Ee.endsWithParent&&Ce.terminatorEnd&&(He.terminatorEnd+=(Ee.end?"|":"")+Ce.terminatorEnd)),Ee.illegal&&(He.illegalRe=he(Ee.illegal)),Ee.contains||(Ee.contains=[]),Ee.contains=[].concat(...Ee.contains.map(function(Qe){return Yt(Qe==="self"?Ee:Qe)})),Ee.contains.forEach(function(Qe){ht(Qe,He)}),Ee.starts&&ht(Ee.starts,Ce),He.matcher=St(He),He}if(X.compilerExtensions||(X.compilerExtensions=[]),X.contains&&X.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return X.classNameAliases=o(X.classNameAliases||{}),ht(X)}function Kt(X){return X?X.endsWithParent||Kt(X.starts):!1}function Yt(X){return X.variants&&!X.cachedVariants&&(X.cachedVariants=X.variants.map(function(he){return o(X,{variants:null},he)})),X.cachedVariants?X.cachedVariants:Kt(X)?o(X,{starts:X.starts?o(X.starts):null}):Object.isFrozen(X)?o(X):X}var zt="11.11.1";class us extends Error{constructor(he,ve){super(he),this.name="HTMLInjectionError",this.html=ve}}const er=s,Ps=o,Ln=Symbol("nomatch"),Pn=7,tr=function(X){const he=Object.create(null),ve=Object.create(null),Ie=[];let St=!0;const ht="Could not find the language '{}', did you forget to load/include a language module?",Ee={disableAutodetect:!0,name:"Plain text",contains:[]};let Ce={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:v};function He(ge){return Ce.noHighlightRe.test(ge)}function Bt(ge){let Le=ge.className+" ";Le+=ge.parentNode?ge.parentNode.className:"";const De=Ce.languageDetectRe.exec(Le);if(De){const rt=q(De[1]);return rt||(Gt(ht.replace("{}",De[1])),Gt("Falling back to no-highlight mode for this block.",ge)),rt?De[1]:"no-highlight"}return Le.split(/\s+/).find(rt=>He(rt)||q(rt))}function Qe(ge,Le,De){let rt="",Mt="";typeof Le=="object"?(rt=ge,De=Le.ignoreIllegals,Mt=Le.language):(It("10.7.0","highlight(lang, code, ...args) has been deprecated."),It("10.7.0",`Please use highlight(code, options) instead.
|
|
192
|
+
`}tablerow({text:t}){return`<tr>
|
|
193
|
+
${t}</tr>
|
|
194
|
+
`}tablecell(t){let n=this.parser.parseInline(t.tokens),s=t.header?"th":"td";return(t.align?`<${s} align="${t.align}">`:`<${s}>`)+n+`</${s}>
|
|
195
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Yn(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:s}){let o=this.parser.parseInline(s),l=Kv(t);if(l===null)return o;t=l;let y='<a href="'+t+'"';return n&&(y+=' title="'+Yn(n)+'"'),y+=">"+o+"</a>",y}image({href:t,title:n,text:s,tokens:o}){o&&(s=this.parser.parseInline(o,this.parser.textRenderer));let l=Kv(t);if(l===null)return Yn(s);t=l;let y=`<img src="${t}" alt="${s}"`;return n&&(y+=` title="${Yn(n)}"`),y+=">",y}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Yn(t.text)}},rp=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Nn=class bf{options;renderer;textRenderer;constructor(n){this.options=n||Us,this.options.renderer=this.options.renderer||new Qc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new rp}static parse(n,s){return new bf(s).parse(n)}static parseInline(n,s){return new bf(s).parseInline(n)}parse(n,s=!0){let o="";for(let l=0;l<n.length;l++){let y=n[l];if(this.options.extensions?.renderers?.[y.type]){let c=y,u=this.options.extensions.renderers[c.type].call({parser:this},c);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(c.type)){o+=u||"";continue}}let b=y;switch(b.type){case"space":{o+=this.renderer.space(b);continue}case"hr":{o+=this.renderer.hr(b);continue}case"heading":{o+=this.renderer.heading(b);continue}case"code":{o+=this.renderer.code(b);continue}case"table":{o+=this.renderer.table(b);continue}case"blockquote":{o+=this.renderer.blockquote(b);continue}case"list":{o+=this.renderer.list(b);continue}case"html":{o+=this.renderer.html(b);continue}case"def":{o+=this.renderer.def(b);continue}case"paragraph":{o+=this.renderer.paragraph(b);continue}case"text":{let c=b,u=this.renderer.text(c);for(;l+1<n.length&&n[l+1].type==="text";)c=n[++l],u+=`
|
|
196
|
+
`+this.renderer.text(c);s?o+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):o+=u;continue}default:{let c='Token with "'+b.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return o}parseInline(n,s=this.renderer){let o="";for(let l=0;l<n.length;l++){let y=n[l];if(this.options.extensions?.renderers?.[y.type]){let c=this.options.extensions.renderers[y.type].call({parser:this},y);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(y.type)){o+=c||"";continue}}let b=y;switch(b.type){case"escape":{o+=s.text(b);break}case"html":{o+=s.html(b);break}case"link":{o+=s.link(b);break}case"image":{o+=s.image(b);break}case"strong":{o+=s.strong(b);break}case"em":{o+=s.em(b);break}case"codespan":{o+=s.codespan(b);break}case"br":{o+=s.br(b);break}case"del":{o+=s.del(b);break}case"text":{o+=s.text(b);break}default:{let c='Token with "'+b.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return o}},Xo=class{options;block;constructor(t){this.options=t||Us}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Bn.lex:Bn.lexInline}provideParser(){return this.block?Nn.parse:Nn.parseInline}},gS=class{defaults=Xf();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Nn;Renderer=Qc;TextRenderer=rp;Lexer=Bn;Tokenizer=Zc;Hooks=Xo;constructor(...t){this.use(...t)}walkTokens(t,n){let s=[];for(let o of t)switch(s=s.concat(n.call(this,o)),o.type){case"table":{let l=o;for(let y of l.header)s=s.concat(this.walkTokens(y.tokens,n));for(let y of l.rows)for(let b of y)s=s.concat(this.walkTokens(b.tokens,n));break}case"list":{let l=o;s=s.concat(this.walkTokens(l.items,n));break}default:{let l=o;this.defaults.extensions?.childTokens?.[l.type]?this.defaults.extensions.childTokens[l.type].forEach(y=>{let b=l[y].flat(1/0);s=s.concat(this.walkTokens(b,n))}):l.tokens&&(s=s.concat(this.walkTokens(l.tokens,n)))}}return s}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(s=>{let o={...s};if(o.async=this.defaults.async||o.async||!1,s.extensions&&(s.extensions.forEach(l=>{if(!l.name)throw new Error("extension name required");if("renderer"in l){let y=n.renderers[l.name];y?n.renderers[l.name]=function(...b){let c=l.renderer.apply(this,b);return c===!1&&(c=y.apply(this,b)),c}:n.renderers[l.name]=l.renderer}if("tokenizer"in l){if(!l.level||l.level!=="block"&&l.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let y=n[l.level];y?y.unshift(l.tokenizer):n[l.level]=[l.tokenizer],l.start&&(l.level==="block"?n.startBlock?n.startBlock.push(l.start):n.startBlock=[l.start]:l.level==="inline"&&(n.startInline?n.startInline.push(l.start):n.startInline=[l.start]))}"childTokens"in l&&l.childTokens&&(n.childTokens[l.name]=l.childTokens)}),o.extensions=n),s.renderer){let l=this.defaults.renderer||new Qc(this.defaults);for(let y in s.renderer){if(!(y in l))throw new Error(`renderer '${y}' does not exist`);if(["options","parser"].includes(y))continue;let b=y,c=s.renderer[b],u=l[b];l[b]=(...h)=>{let v=c.apply(l,h);return v===!1&&(v=u.apply(l,h)),v||""}}o.renderer=l}if(s.tokenizer){let l=this.defaults.tokenizer||new Zc(this.defaults);for(let y in s.tokenizer){if(!(y in l))throw new Error(`tokenizer '${y}' does not exist`);if(["options","rules","lexer"].includes(y))continue;let b=y,c=s.tokenizer[b],u=l[b];l[b]=(...h)=>{let v=c.apply(l,h);return v===!1&&(v=u.apply(l,h)),v}}o.tokenizer=l}if(s.hooks){let l=this.defaults.hooks||new Xo;for(let y in s.hooks){if(!(y in l))throw new Error(`hook '${y}' does not exist`);if(["options","block"].includes(y))continue;let b=y,c=s.hooks[b],u=l[b];Xo.passThroughHooks.has(y)?l[b]=h=>{if(this.defaults.async&&Xo.passThroughHooksRespectAsync.has(y))return(async()=>{let f=await c.call(l,h);return u.call(l,f)})();let v=c.call(l,h);return u.call(l,v)}:l[b]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await c.apply(l,h);return f===!1&&(f=await u.apply(l,h)),f})();let v=c.apply(l,h);return v===!1&&(v=u.apply(l,h)),v}}o.hooks=l}if(s.walkTokens){let l=this.defaults.walkTokens,y=s.walkTokens;o.walkTokens=function(b){let c=[];return c.push(y.call(this,b)),l&&(c=c.concat(l.call(this,b))),c}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return Bn.lex(t,n??this.defaults)}parser(t,n){return Nn.parse(t,n??this.defaults)}parseMarkdown(t){return(n,s)=>{let o={...s},l={...this.defaults,...o},y=this.onError(!!l.silent,!!l.async);if(this.defaults.async===!0&&o.async===!1)return y(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return y(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return y(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(l.hooks&&(l.hooks.options=l,l.hooks.block=t),l.async)return(async()=>{let b=l.hooks?await l.hooks.preprocess(n):n,c=await(l.hooks?await l.hooks.provideLexer():t?Bn.lex:Bn.lexInline)(b,l),u=l.hooks?await l.hooks.processAllTokens(c):c;l.walkTokens&&await Promise.all(this.walkTokens(u,l.walkTokens));let h=await(l.hooks?await l.hooks.provideParser():t?Nn.parse:Nn.parseInline)(u,l);return l.hooks?await l.hooks.postprocess(h):h})().catch(y);try{l.hooks&&(n=l.hooks.preprocess(n));let b=(l.hooks?l.hooks.provideLexer():t?Bn.lex:Bn.lexInline)(n,l);l.hooks&&(b=l.hooks.processAllTokens(b)),l.walkTokens&&this.walkTokens(b,l.walkTokens);let c=(l.hooks?l.hooks.provideParser():t?Nn.parse:Nn.parseInline)(b,l);return l.hooks&&(c=l.hooks.postprocess(c)),c}catch(b){return y(b)}}}onError(t,n){return s=>{if(s.message+=`
|
|
197
|
+
Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error occurred:</p><pre>"+Yn(s.message+"",!0)+"</pre>";return n?Promise.resolve(o):o}if(n)return Promise.reject(s);throw s}}},zs=new gS;function bt(t,n){return zs.parse(t,n)}bt.options=bt.setOptions=function(t){return zs.setOptions(t),bt.defaults=zs.defaults,sS(bt.defaults),bt};bt.getDefaults=Xf;bt.defaults=Us;bt.use=function(...t){return zs.use(...t),bt.defaults=zs.defaults,sS(bt.defaults),bt};bt.walkTokens=function(t,n){return zs.walkTokens(t,n)};bt.parseInline=zs.parseInline;bt.Parser=Nn;bt.parser=Nn.parse;bt.Renderer=Qc;bt.TextRenderer=rp;bt.Lexer=Bn;bt.lexer=Bn.lex;bt.Tokenizer=Zc;bt.Hooks=Xo;bt.parse=bt;bt.options;bt.setOptions;bt.use;bt.walkTokens;bt.parseInline;Nn.parse;Bn.lex;const{entries:mS,setPrototypeOf:Xv,isFrozen:ET,getPrototypeOf:xT,getOwnPropertyDescriptor:TT}=Object;let{freeze:Ni,seal:xn,create:Aa}=Object,{apply:Sf,construct:yf}=typeof Reflect<"u"&&Reflect;Ni||(Ni=function(n){return n});xn||(xn=function(n){return n});Sf||(Sf=function(n,s){for(var o=arguments.length,l=new Array(o>2?o-2:0),y=2;y<o;y++)l[y-2]=arguments[y];return n.apply(s,l)});yf||(yf=function(n){for(var s=arguments.length,o=new Array(s>1?s-1:0),l=1;l<s;l++)o[l-1]=arguments[l];return new n(...o)});const Fo=ci(Array.prototype.forEach),AT=ci(Array.prototype.lastIndexOf),Zv=ci(Array.prototype.pop),qo=ci(Array.prototype.push),RT=ci(Array.prototype.splice),Di=Array.isArray,Zo=ci(String.prototype.toLowerCase),Ud=ci(String.prototype.toString),Qv=ci(String.prototype.match),xa=ci(String.prototype.replace),Jv=ci(String.prototype.indexOf),LT=ci(String.prototype.trim),kT=ci(Number.prototype.toString),MT=ci(Boolean.prototype.toString),e0=typeof BigInt>"u"?null:ci(BigInt.prototype.toString),t0=typeof Symbol>"u"?null:ci(Symbol.prototype.toString),qt=ci(Object.prototype.hasOwnProperty),Wo=ci(Object.prototype.toString),xi=ci(RegExp.prototype.test),Rc=DT(TypeError);function ci(t){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var s=arguments.length,o=new Array(s>1?s-1:0),l=1;l<s;l++)o[l-1]=arguments[l];return Sf(t,n,o)}}function DT(t){return function(){for(var n=arguments.length,s=new Array(n),o=0;o<n;o++)s[o]=arguments[o];return yf(t,s)}}function Ge(t,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Zo;if(Xv&&Xv(t,null),!Di(n))return t;let o=n.length;for(;o--;){let l=n[o];if(typeof l=="string"){const y=s(l);y!==l&&(ET(n)||(n[o]=y),l=y)}t[l]=!0}return t}function OT(t){for(let n=0;n<t.length;n++)qt(t,n)||(t[n]=null);return t}function Ki(t){const n=Aa(null);for(const[s,o]of mS(t))qt(t,s)&&(Di(o)?n[s]=OT(o):o&&typeof o=="object"&&o.constructor===Object?n[s]=Ki(o):n[s]=o);return n}function BT(t){switch(typeof t){case"string":return t;case"number":return kT(t);case"boolean":return MT(t);case"bigint":return e0?e0(t):"0";case"symbol":return t0?t0(t):"Symbol()";case"undefined":return Wo(t);case"function":case"object":{if(t===null)return Wo(t);const n=t,s=Ra(n,"toString");if(typeof s=="function"){const o=s(n);return typeof o=="string"?o:Wo(o)}return Wo(t)}default:return Wo(t)}}function Ra(t,n){for(;t!==null;){const o=TT(t,n);if(o){if(o.get)return ci(o.get);if(typeof o.value=="function")return ci(o.value)}t=xT(t)}function s(){return null}return s}function NT(t){try{return xi(t,""),!0}catch{return!1}}const i0=Ni(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Pd=Ni(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),jd=Ni(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),IT=Ni(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Fd=Ni(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),HT=Ni(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),n0=Ni(["#text"]),r0=Ni(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),qd=Ni(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),s0=Ni(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Lc=Ni(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),zT=xn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),$T=xn(/<%[\w\W]*|[\w\W]*%>/gm),UT=xn(/\$\{[\w\W]*/gm),PT=xn(/^data-[\-\w.\u00B7-\uFFFF]+$/),jT=xn(/^aria-[\-\w]+$/),vS=xn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),FT=xn(/^(?:\w+script|data):/i),qT=xn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),bS=xn(/^html$/i),WT=xn(/^[a-z][.\w]*(-[.\w]+)+$/i);var a0=Object.freeze({__proto__:null,ARIA_ATTR:jT,ATTR_WHITESPACE:qT,CUSTOM_ELEMENT:WT,DATA_ATTR:PT,DOCTYPE_NAME:bS,ERB_EXPR:$T,IS_ALLOWED_URI:vS,IS_SCRIPT_OR_DATA:FT,MUSTACHE_EXPR:zT,TMPLIT_EXPR:UT});const Go={element:1,text:3,progressingInstruction:7,comment:8,document:9},GT=function(){return typeof window>"u"?null:window},KT=function(n,s){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let o=null;const l="data-tt-policy-suffix";s&&s.hasAttribute(l)&&(o=s.getAttribute(l));const y="dompurify"+(o?"#"+o:"");try{return n.createPolicy(y,{createHTML(b){return b},createScriptURL(b){return b}})}catch{return console.warn("TrustedTypes policy "+y+" could not be created."),null}},o0=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function SS(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:GT();const n=Me=>SS(Me);if(n.version="3.4.2",n.removed=[],!t||!t.document||t.document.nodeType!==Go.document||!t.Element)return n.isSupported=!1,n;let{document:s}=t;const o=s,l=o.currentScript,{DocumentFragment:y,HTMLTemplateElement:b,Node:c,Element:u,NodeFilter:h,NamedNodeMap:v=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:f,DOMParser:C,trustedTypes:x}=t,A=u.prototype,E=Ra(A,"cloneNode"),p=Ra(A,"remove"),S=Ra(A,"nextSibling"),_=Ra(A,"childNodes"),g=Ra(A,"parentNode");if(typeof b=="function"){const Me=s.createElement("template");Me.content&&Me.content.ownerDocument&&(s=Me.content.ownerDocument)}let w,R="";const{implementation:L,createNodeIterator:D,createDocumentFragment:T,getElementsByTagName:B}=s,{importNode:W}=o;let P=o0();n.isSupported=typeof mS=="function"&&typeof g=="function"&&L&&L.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:F,ERB_EXPR:I,TMPLIT_EXPR:Z,DATA_ATTR:ee,ARIA_ATTR:j,IS_SCRIPT_OR_DATA:Y,ATTR_WHITESPACE:K,CUSTOM_ELEMENT:O}=a0;let{IS_ALLOWED_URI:H}=a0,M=null;const U=Ge({},[...i0,...Pd,...jd,...Fd,...n0]);let V=null;const ae=Ge({},[...r0,...qd,...s0,...Lc]);let ce=Object.seal(Aa(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),me=null,Q=null;const $=Object.seal(Aa(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let oe=!0,_e=!0,Se=!1,be=!0,$e=!1,je=!0,Ke=!1,Ct=!1,Be=!1,Qt=!1,gi=!1,mi=!1,un=!0,An=!1;const Jt="user-content-";let lt=!0,Gt=!1,It={},Ht=null;const ei=Ge({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Rn=null;const Ti=Ge({},["audio","video","img","source","image","track"]);let Xi=null;const ht=Ge({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ii="http://www.w3.org/1998/Math/MathML",Kt="http://www.w3.org/2000/svg",Yt="http://www.w3.org/1999/xhtml";let zt=Yt,us=!1,er=null;const Ps=Ge({},[Ii,Kt,Yt],Ud);let Ln=Ge({},["mi","mo","mn","ms","mtext"]),Pn=Ge({},["annotation-xml"]);const tr=Ge({},["title","style","font","a","script"]);let ti=null;const X=["application/xhtml+xml","text/html"],he="text/html";let ve=null,Ie=null;const St=s.createElement("form"),dt=function(q){return q instanceof RegExp||q instanceof Function},Ee=function(){let q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ie&&Ie===q)return;(!q||typeof q!="object")&&(q={}),q=Ki(q),ti=X.indexOf(q.PARSER_MEDIA_TYPE)===-1?he:q.PARSER_MEDIA_TYPE,ve=ti==="application/xhtml+xml"?Ud:Zo,M=qt(q,"ALLOWED_TAGS")&&Di(q.ALLOWED_TAGS)?Ge({},q.ALLOWED_TAGS,ve):U,V=qt(q,"ALLOWED_ATTR")&&Di(q.ALLOWED_ATTR)?Ge({},q.ALLOWED_ATTR,ve):ae,er=qt(q,"ALLOWED_NAMESPACES")&&Di(q.ALLOWED_NAMESPACES)?Ge({},q.ALLOWED_NAMESPACES,Ud):Ps,Xi=qt(q,"ADD_URI_SAFE_ATTR")&&Di(q.ADD_URI_SAFE_ATTR)?Ge(Ki(ht),q.ADD_URI_SAFE_ATTR,ve):ht,Rn=qt(q,"ADD_DATA_URI_TAGS")&&Di(q.ADD_DATA_URI_TAGS)?Ge(Ki(Ti),q.ADD_DATA_URI_TAGS,ve):Ti,Ht=qt(q,"FORBID_CONTENTS")&&Di(q.FORBID_CONTENTS)?Ge({},q.FORBID_CONTENTS,ve):ei,me=qt(q,"FORBID_TAGS")&&Di(q.FORBID_TAGS)?Ge({},q.FORBID_TAGS,ve):Ki({}),Q=qt(q,"FORBID_ATTR")&&Di(q.FORBID_ATTR)?Ge({},q.FORBID_ATTR,ve):Ki({}),It=qt(q,"USE_PROFILES")?q.USE_PROFILES&&typeof q.USE_PROFILES=="object"?Ki(q.USE_PROFILES):q.USE_PROFILES:!1,oe=q.ALLOW_ARIA_ATTR!==!1,_e=q.ALLOW_DATA_ATTR!==!1,Se=q.ALLOW_UNKNOWN_PROTOCOLS||!1,be=q.ALLOW_SELF_CLOSE_IN_ATTR!==!1,$e=q.SAFE_FOR_TEMPLATES||!1,je=q.SAFE_FOR_XML!==!1,Ke=q.WHOLE_DOCUMENT||!1,Qt=q.RETURN_DOM||!1,gi=q.RETURN_DOM_FRAGMENT||!1,mi=q.RETURN_TRUSTED_TYPE||!1,Be=q.FORCE_BODY||!1,un=q.SANITIZE_DOM!==!1,An=q.SANITIZE_NAMED_PROPS||!1,lt=q.KEEP_CONTENT!==!1,Gt=q.IN_PLACE||!1,H=NT(q.ALLOWED_URI_REGEXP)?q.ALLOWED_URI_REGEXP:vS,zt=typeof q.NAMESPACE=="string"?q.NAMESPACE:Yt,Ln=qt(q,"MATHML_TEXT_INTEGRATION_POINTS")&&q.MATHML_TEXT_INTEGRATION_POINTS&&typeof q.MATHML_TEXT_INTEGRATION_POINTS=="object"?Ki(q.MATHML_TEXT_INTEGRATION_POINTS):Ge({},["mi","mo","mn","ms","mtext"]),Pn=qt(q,"HTML_INTEGRATION_POINTS")&&q.HTML_INTEGRATION_POINTS&&typeof q.HTML_INTEGRATION_POINTS=="object"?Ki(q.HTML_INTEGRATION_POINTS):Ge({},["annotation-xml"]);const pe=qt(q,"CUSTOM_ELEMENT_HANDLING")&&q.CUSTOM_ELEMENT_HANDLING&&typeof q.CUSTOM_ELEMENT_HANDLING=="object"?Ki(q.CUSTOM_ELEMENT_HANDLING):Aa(null);if(ce=Aa(null),qt(pe,"tagNameCheck")&&dt(pe.tagNameCheck)&&(ce.tagNameCheck=pe.tagNameCheck),qt(pe,"attributeNameCheck")&&dt(pe.attributeNameCheck)&&(ce.attributeNameCheck=pe.attributeNameCheck),qt(pe,"allowCustomizedBuiltInElements")&&typeof pe.allowCustomizedBuiltInElements=="boolean"&&(ce.allowCustomizedBuiltInElements=pe.allowCustomizedBuiltInElements),$e&&(_e=!1),gi&&(Qt=!0),It&&(M=Ge({},n0),V=Aa(null),It.html===!0&&(Ge(M,i0),Ge(V,r0)),It.svg===!0&&(Ge(M,Pd),Ge(V,qd),Ge(V,Lc)),It.svgFilters===!0&&(Ge(M,jd),Ge(V,qd),Ge(V,Lc)),It.mathMl===!0&&(Ge(M,Fd),Ge(V,s0),Ge(V,Lc))),$.tagCheck=null,$.attributeCheck=null,qt(q,"ADD_TAGS")&&(typeof q.ADD_TAGS=="function"?$.tagCheck=q.ADD_TAGS:Di(q.ADD_TAGS)&&(M===U&&(M=Ki(M)),Ge(M,q.ADD_TAGS,ve))),qt(q,"ADD_ATTR")&&(typeof q.ADD_ATTR=="function"?$.attributeCheck=q.ADD_ATTR:Di(q.ADD_ATTR)&&(V===ae&&(V=Ki(V)),Ge(V,q.ADD_ATTR,ve))),qt(q,"ADD_URI_SAFE_ATTR")&&Di(q.ADD_URI_SAFE_ATTR)&&Ge(Xi,q.ADD_URI_SAFE_ATTR,ve),qt(q,"FORBID_CONTENTS")&&Di(q.FORBID_CONTENTS)&&(Ht===ei&&(Ht=Ki(Ht)),Ge(Ht,q.FORBID_CONTENTS,ve)),qt(q,"ADD_FORBID_CONTENTS")&&Di(q.ADD_FORBID_CONTENTS)&&(Ht===ei&&(Ht=Ki(Ht)),Ge(Ht,q.ADD_FORBID_CONTENTS,ve)),lt&&(M["#text"]=!0),Ke&&Ge(M,["html","head","body"]),M.table&&(Ge(M,["tbody"]),delete me.tbody),q.TRUSTED_TYPES_POLICY){if(typeof q.TRUSTED_TYPES_POLICY.createHTML!="function")throw Rc('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof q.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Rc('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=q.TRUSTED_TYPES_POLICY,R=w.createHTML("")}else w===void 0&&(w=KT(x,l)),w!==null&&typeof R=="string"&&(R=w.createHTML(""));Ni&&Ni(q),Ie=q},Ce=Ge({},[...Pd,...jd,...IT]),He=Ge({},[...Fd,...HT]),Bt=function(q){let pe=g(q);(!pe||!pe.tagName)&&(pe={namespaceURI:zt,tagName:"template"});const we=Zo(q.tagName),it=Zo(pe.tagName);return er[q.namespaceURI]?q.namespaceURI===Kt?pe.namespaceURI===Yt?we==="svg":pe.namespaceURI===Ii?we==="svg"&&(it==="annotation-xml"||Ln[it]):!!Ce[we]:q.namespaceURI===Ii?pe.namespaceURI===Yt?we==="math":pe.namespaceURI===Kt?we==="math"&&Pn[it]:!!He[we]:q.namespaceURI===Yt?pe.namespaceURI===Kt&&!Pn[it]||pe.namespaceURI===Ii&&!Ln[it]?!1:!He[we]&&(tr[we]||!Ce[we]):!!(ti==="application/xhtml+xml"&&er[q.namespaceURI]):!1},Qe=function(q){qo(n.removed,{element:q});try{g(q).removeChild(q)}catch{p(q)}},vi=function(q,pe){try{qo(n.removed,{attribute:pe.getAttributeNode(q),from:pe})}catch{qo(n.removed,{attribute:null,from:pe})}if(pe.removeAttribute(q),q==="is")if(Qt||gi)try{Qe(pe)}catch{}else try{pe.setAttribute(q,"")}catch{}},ir=function(q){let pe=null,we=null;if(Be)q="<remove></remove>"+q;else{const Tt=Qv(q,/^[\r\n\t ]+/);we=Tt&&Tt[0]}ti==="application/xhtml+xml"&&zt===Yt&&(q='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+q+"</body></html>");const it=w?w.createHTML(q):q;if(zt===Yt)try{pe=new C().parseFromString(it,ti)}catch{}if(!pe||!pe.documentElement){pe=L.createDocument(zt,"template",null);try{pe.documentElement.innerHTML=us?R:it}catch{}}const Ye=pe.body||pe.documentElement;return q&&we&&Ye.insertBefore(s.createTextNode(we),Ye.childNodes[0]||null),zt===Yt?B.call(pe,Ke?"html":"body")[0]:Ke?pe.documentElement:Ye},nr=function(q){return D.call(q.ownerDocument||q,q,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},Hi=function(q){return q instanceof f&&(typeof q.nodeName!="string"||typeof q.textContent!="string"||typeof q.removeChild!="function"||!(q.attributes instanceof v)||typeof q.removeAttribute!="function"||typeof q.setAttribute!="function"||typeof q.namespaceURI!="string"||typeof q.insertBefore!="function"||typeof q.hasChildNodes!="function")},xt=function(q){return typeof c=="function"&&q instanceof c};function wt(Me,q,pe){Fo(Me,we=>{we.call(n,q,pe,Ie)})}const kn=function(q){let pe=null;if(wt(P.beforeSanitizeElements,q,null),Hi(q))return Qe(q),!0;const we=ve(q.nodeName);if(wt(P.uponSanitizeElement,q,{tagName:we,allowedTags:M}),je&&q.hasChildNodes()&&!xt(q.firstElementChild)&&xi(/<[/\w!]/g,q.innerHTML)&&xi(/<[/\w!]/g,q.textContent)||je&&q.namespaceURI===Yt&&we==="style"&&xt(q.firstElementChild)||q.nodeType===Go.progressingInstruction||je&&q.nodeType===Go.comment&&xi(/<[/\w]/g,q.data))return Qe(q),!0;if(me[we]||!($.tagCheck instanceof Function&&$.tagCheck(we))&&!M[we]){if(!me[we]&&rr(we)&&(ce.tagNameCheck instanceof RegExp&&xi(ce.tagNameCheck,we)||ce.tagNameCheck instanceof Function&&ce.tagNameCheck(we)))return!1;if(lt&&!Ht[we]){const it=g(q)||q.parentNode,Ye=_(q)||q.childNodes;if(Ye&&it){const Tt=Ye.length;for(let $t=Tt-1;$t>=0;--$t){const Ut=E(Ye[$t],!0);it.insertBefore(Ut,S(q))}}}return Qe(q),!0}return q instanceof u&&!Bt(q)||(we==="noscript"||we==="noembed"||we==="noframes")&&xi(/<\/no(script|embed|frames)/i,q.innerHTML)?(Qe(q),!0):($e&&q.nodeType===Go.text&&(pe=q.textContent,Fo([F,I,Z],it=>{pe=xa(pe,it," ")}),q.textContent!==pe&&(qo(n.removed,{element:q.cloneNode()}),q.textContent=pe)),wt(P.afterSanitizeElements,q,null),!1)},Mr=function(q,pe,we){if(Q[pe]||un&&(pe==="id"||pe==="name")&&(we in s||we in St))return!1;const it=V[pe]||$.attributeCheck instanceof Function&&$.attributeCheck(pe,q);if(!(_e&&!Q[pe]&&xi(ee,pe))){if(!(oe&&xi(j,pe))){if(!it||Q[pe]){if(!(rr(q)&&(ce.tagNameCheck instanceof RegExp&&xi(ce.tagNameCheck,q)||ce.tagNameCheck instanceof Function&&ce.tagNameCheck(q))&&(ce.attributeNameCheck instanceof RegExp&&xi(ce.attributeNameCheck,pe)||ce.attributeNameCheck instanceof Function&&ce.attributeNameCheck(pe,q))||pe==="is"&&ce.allowCustomizedBuiltInElements&&(ce.tagNameCheck instanceof RegExp&&xi(ce.tagNameCheck,we)||ce.tagNameCheck instanceof Function&&ce.tagNameCheck(we))))return!1}else if(!Xi[pe]){if(!xi(H,xa(we,K,""))){if(!((pe==="src"||pe==="xlink:href"||pe==="href")&&q!=="script"&&Jv(we,"data:")===0&&Rn[q])){if(!(Se&&!xi(Y,xa(we,K,"")))){if(we)return!1}}}}}}return!0},js=Ge({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),rr=function(q){return!js[Zo(q)]&&xi(O,q)},hs=function(q){wt(P.beforeSanitizeAttributes,q,null);const{attributes:pe}=q;if(!pe||Hi(q))return;const we={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:V,forceKeepAttr:void 0};let it=pe.length;for(;it--;){const Ye=pe[it],{name:Tt,namespaceURI:$t,value:Ut}=Ye,ge=ve(Tt),Le=Ut;let De=Tt==="value"?Le:LT(Le);if(we.attrName=ge,we.attrValue=De,we.keepAttr=!0,we.forceKeepAttr=void 0,wt(P.uponSanitizeAttribute,q,we),De=we.attrValue,An&&(ge==="id"||ge==="name")&&Jv(De,Jt)!==0&&(vi(Tt,q),De=Jt+De),je&&xi(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,De)){vi(Tt,q);continue}if(ge==="attributename"&&Qv(De,"href")){vi(Tt,q);continue}if(we.forceKeepAttr)continue;if(!we.keepAttr){vi(Tt,q);continue}if(!be&&xi(/\/>/i,De)){vi(Tt,q);continue}$e&&Fo([F,I,Z],Mt=>{De=xa(De,Mt," ")});const rt=ve(q.nodeName);if(!Mr(rt,ge,De)){vi(Tt,q);continue}if(w&&typeof x=="object"&&typeof x.getAttributeType=="function"&&!$t)switch(x.getAttributeType(rt,ge)){case"TrustedHTML":{De=w.createHTML(De);break}case"TrustedScriptURL":{De=w.createScriptURL(De);break}}if(De!==Le)try{$t?q.setAttributeNS($t,Tt,De):q.setAttribute(Tt,De),Hi(q)?Qe(q):Zv(n.removed)}catch{vi(Tt,q)}}wt(P.afterSanitizeAttributes,q,null)},jn=function(q){let pe=null;const we=nr(q);for(wt(P.beforeSanitizeShadowDOM,q,null);pe=we.nextNode();)wt(P.uponSanitizeShadowNode,pe,null),kn(pe),hs(pe),pe.content instanceof y&&jn(pe.content);wt(P.afterSanitizeShadowDOM,q,null)};return n.sanitize=function(Me){let q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},pe=null,we=null,it=null,Ye=null;if(us=!Me,us&&(Me="<!-->"),typeof Me!="string"&&!xt(Me)&&(Me=BT(Me),typeof Me!="string"))throw Rc("dirty is not a string, aborting");if(!n.isSupported)return Me;if(Ct||Ee(q),n.removed=[],typeof Me=="string"&&(Gt=!1),Gt){const Ut=Me.nodeName;if(typeof Ut=="string"){const ge=ve(Ut);if(!M[ge]||me[ge])throw Rc("root node is forbidden and cannot be sanitized in-place")}}else if(Me instanceof c)pe=ir("<!---->"),we=pe.ownerDocument.importNode(Me,!0),we.nodeType===Go.element&&we.nodeName==="BODY"||we.nodeName==="HTML"?pe=we:pe.appendChild(we);else{if(!Qt&&!$e&&!Ke&&Me.indexOf("<")===-1)return w&&mi?w.createHTML(Me):Me;if(pe=ir(Me),!pe)return Qt?null:mi?R:""}pe&&Be&&Qe(pe.firstChild);const Tt=nr(Gt?Me:pe);for(;it=Tt.nextNode();)kn(it),hs(it),it.content instanceof y&&jn(it.content);if(Gt)return Me;if(Qt){if($e){pe.normalize();let Ut=pe.innerHTML;Fo([F,I,Z],ge=>{Ut=xa(Ut,ge," ")}),pe.innerHTML=Ut}if(gi)for(Ye=T.call(pe.ownerDocument);pe.firstChild;)Ye.appendChild(pe.firstChild);else Ye=pe;return(V.shadowroot||V.shadowrootmode)&&(Ye=W.call(o,Ye,!0)),Ye}let $t=Ke?pe.outerHTML:pe.innerHTML;return Ke&&M["!doctype"]&&pe.ownerDocument&&pe.ownerDocument.doctype&&pe.ownerDocument.doctype.name&&xi(bS,pe.ownerDocument.doctype.name)&&($t="<!DOCTYPE "+pe.ownerDocument.doctype.name+`>
|
|
198
|
+
`+$t),$e&&Fo([F,I,Z],Ut=>{$t=xa($t,Ut," ")}),w&&mi?w.createHTML($t):$t},n.setConfig=function(){let Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ee(Me),Ct=!0},n.clearConfig=function(){Ie=null,Ct=!1},n.isValidAttribute=function(Me,q,pe){Ie||Ee({});const we=ve(Me),it=ve(q);return Mr(we,it,pe)},n.addHook=function(Me,q){typeof q=="function"&&qo(P[Me],q)},n.removeHook=function(Me,q){if(q!==void 0){const pe=AT(P[Me],q);return pe===-1?void 0:RT(P[Me],pe,1)[0]}return Zv(P[Me])},n.removeHooks=function(Me){P[Me]=[]},n.removeAllHooks=function(){P=o0()},n}var il=SS(),Wd,l0;function YT(){if(l0)return Wd;l0=1;function t(X){return X instanceof Map?X.clear=X.delete=X.set=function(){throw new Error("map is read-only")}:X instanceof Set&&(X.add=X.clear=X.delete=function(){throw new Error("set is read-only")}),Object.freeze(X),Object.getOwnPropertyNames(X).forEach(he=>{const ve=X[he],Ie=typeof ve;(Ie==="object"||Ie==="function")&&!Object.isFrozen(ve)&&t(ve)}),X}class n{constructor(he){he.data===void 0&&(he.data={}),this.data=he.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function s(X){return X.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function o(X,...he){const ve=Object.create(null);for(const Ie in X)ve[Ie]=X[Ie];return he.forEach(function(Ie){for(const St in Ie)ve[St]=Ie[St]}),ve}const l="</span>",y=X=>!!X.scope,b=(X,{prefix:he})=>{if(X.startsWith("language:"))return X.replace("language:","language-");if(X.includes(".")){const ve=X.split(".");return[`${he}${ve.shift()}`,...ve.map((Ie,St)=>`${Ie}${"_".repeat(St+1)}`)].join(" ")}return`${he}${X}`};class c{constructor(he,ve){this.buffer="",this.classPrefix=ve.classPrefix,he.walk(this)}addText(he){this.buffer+=s(he)}openNode(he){if(!y(he))return;const ve=b(he.scope,{prefix:this.classPrefix});this.span(ve)}closeNode(he){y(he)&&(this.buffer+=l)}value(){return this.buffer}span(he){this.buffer+=`<span class="${he}">`}}const u=(X={})=>{const he={children:[]};return Object.assign(he,X),he};class h{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(he){this.top.children.push(he)}openNode(he){const ve=u({scope:he});this.add(ve),this.stack.push(ve)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(he){return this.constructor._walk(he,this.rootNode)}static _walk(he,ve){return typeof ve=="string"?he.addText(ve):ve.children&&(he.openNode(ve),ve.children.forEach(Ie=>this._walk(he,Ie)),he.closeNode(ve)),he}static _collapse(he){typeof he!="string"&&he.children&&(he.children.every(ve=>typeof ve=="string")?he.children=[he.children.join("")]:he.children.forEach(ve=>{h._collapse(ve)}))}}class v extends h{constructor(he){super(),this.options=he}addText(he){he!==""&&this.add(he)}startScope(he){this.openNode(he)}endScope(){this.closeNode()}__addSublanguage(he,ve){const Ie=he.root;ve&&(Ie.scope=`language:${ve}`),this.add(Ie)}toHTML(){return new c(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function f(X){return X?typeof X=="string"?X:X.source:null}function C(X){return E("(?=",X,")")}function x(X){return E("(?:",X,")*")}function A(X){return E("(?:",X,")?")}function E(...X){return X.map(ve=>f(ve)).join("")}function p(X){const he=X[X.length-1];return typeof he=="object"&&he.constructor===Object?(X.splice(X.length-1,1),he):{}}function S(...X){return"("+(p(X).capture?"":"?:")+X.map(Ie=>f(Ie)).join("|")+")"}function _(X){return new RegExp(X.toString()+"|").exec("").length-1}function g(X,he){const ve=X&&X.exec(he);return ve&&ve.index===0}const w=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function R(X,{joinWith:he}){let ve=0;return X.map(Ie=>{ve+=1;const St=ve;let dt=f(Ie),Ee="";for(;dt.length>0;){const Ce=w.exec(dt);if(!Ce){Ee+=dt;break}Ee+=dt.substring(0,Ce.index),dt=dt.substring(Ce.index+Ce[0].length),Ce[0][0]==="\\"&&Ce[1]?Ee+="\\"+String(Number(Ce[1])+St):(Ee+=Ce[0],Ce[0]==="("&&ve++)}return Ee}).map(Ie=>`(${Ie})`).join(he)}const L=/\b\B/,D="[a-zA-Z]\\w*",T="[a-zA-Z_]\\w*",B="\\b\\d+(\\.\\d+)?",W="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",P="\\b(0b[01]+)",F="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",I=(X={})=>{const he=/^#![ ]*\//;return X.binary&&(X.begin=E(he,/.*\b/,X.binary,/\b.*/)),o({scope:"meta",begin:he,end:/$/,relevance:0,"on:begin":(ve,Ie)=>{ve.index!==0&&Ie.ignoreMatch()}},X)},Z={begin:"\\\\[\\s\\S]",relevance:0},ee={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Z]},j={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Z]},Y={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},K=function(X,he,ve={}){const Ie=o({scope:"comment",begin:X,end:he,contains:[]},ve);Ie.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const St=S("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Ie.contains.push({begin:E(/[ ]+/,"(",St,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Ie},O=K("//","$"),H=K("/\\*","\\*/"),M=K("#","$"),U={scope:"number",begin:B,relevance:0},V={scope:"number",begin:W,relevance:0},ae={scope:"number",begin:P,relevance:0},ce={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Z,{begin:/\[/,end:/\]/,relevance:0,contains:[Z]}]},me={scope:"title",begin:D,relevance:0},Q={scope:"title",begin:T,relevance:0},$={begin:"\\.\\s*"+T,relevance:0};var _e=Object.freeze({__proto__:null,APOS_STRING_MODE:ee,BACKSLASH_ESCAPE:Z,BINARY_NUMBER_MODE:ae,BINARY_NUMBER_RE:P,COMMENT:K,C_BLOCK_COMMENT_MODE:H,C_LINE_COMMENT_MODE:O,C_NUMBER_MODE:V,C_NUMBER_RE:W,END_SAME_AS_BEGIN:function(X){return Object.assign(X,{"on:begin":(he,ve)=>{ve.data._beginMatch=he[1]},"on:end":(he,ve)=>{ve.data._beginMatch!==he[1]&&ve.ignoreMatch()}})},HASH_COMMENT_MODE:M,IDENT_RE:D,MATCH_NOTHING_RE:L,METHOD_GUARD:$,NUMBER_MODE:U,NUMBER_RE:B,PHRASAL_WORDS_MODE:Y,QUOTE_STRING_MODE:j,REGEXP_MODE:ce,RE_STARTERS_RE:F,SHEBANG:I,TITLE_MODE:me,UNDERSCORE_IDENT_RE:T,UNDERSCORE_TITLE_MODE:Q});function Se(X,he){X.input[X.index-1]==="."&&he.ignoreMatch()}function be(X,he){X.className!==void 0&&(X.scope=X.className,delete X.className)}function $e(X,he){he&&X.beginKeywords&&(X.begin="\\b("+X.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",X.__beforeBegin=Se,X.keywords=X.keywords||X.beginKeywords,delete X.beginKeywords,X.relevance===void 0&&(X.relevance=0))}function je(X,he){Array.isArray(X.illegal)&&(X.illegal=S(...X.illegal))}function Ke(X,he){if(X.match){if(X.begin||X.end)throw new Error("begin & end are not supported with match");X.begin=X.match,delete X.match}}function Ct(X,he){X.relevance===void 0&&(X.relevance=1)}const Be=(X,he)=>{if(!X.beforeMatch)return;if(X.starts)throw new Error("beforeMatch cannot be used with starts");const ve=Object.assign({},X);Object.keys(X).forEach(Ie=>{delete X[Ie]}),X.keywords=ve.keywords,X.begin=E(ve.beforeMatch,C(ve.begin)),X.starts={relevance:0,contains:[Object.assign(ve,{endsParent:!0})]},X.relevance=0,delete ve.beforeMatch},Qt=["of","and","for","in","not","or","if","then","parent","list","value"],gi="keyword";function mi(X,he,ve=gi){const Ie=Object.create(null);return typeof X=="string"?St(ve,X.split(" ")):Array.isArray(X)?St(ve,X):Object.keys(X).forEach(function(dt){Object.assign(Ie,mi(X[dt],he,dt))}),Ie;function St(dt,Ee){he&&(Ee=Ee.map(Ce=>Ce.toLowerCase())),Ee.forEach(function(Ce){const He=Ce.split("|");Ie[He[0]]=[dt,un(He[0],He[1])]})}}function un(X,he){return he?Number(he):An(X)?0:1}function An(X){return Qt.includes(X.toLowerCase())}const Jt={},lt=X=>{console.error(X)},Gt=(X,...he)=>{console.log(`WARN: ${X}`,...he)},It=(X,he)=>{Jt[`${X}/${he}`]||(console.log(`Deprecated as of ${X}. ${he}`),Jt[`${X}/${he}`]=!0)},Ht=new Error;function ei(X,he,{key:ve}){let Ie=0;const St=X[ve],dt={},Ee={};for(let Ce=1;Ce<=he.length;Ce++)Ee[Ce+Ie]=St[Ce],dt[Ce+Ie]=!0,Ie+=_(he[Ce-1]);X[ve]=Ee,X[ve]._emit=dt,X[ve]._multi=!0}function Rn(X){if(Array.isArray(X.begin)){if(X.skip||X.excludeBegin||X.returnBegin)throw lt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ht;if(typeof X.beginScope!="object"||X.beginScope===null)throw lt("beginScope must be object"),Ht;ei(X,X.begin,{key:"beginScope"}),X.begin=R(X.begin,{joinWith:""})}}function Ti(X){if(Array.isArray(X.end)){if(X.skip||X.excludeEnd||X.returnEnd)throw lt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ht;if(typeof X.endScope!="object"||X.endScope===null)throw lt("endScope must be object"),Ht;ei(X,X.end,{key:"endScope"}),X.end=R(X.end,{joinWith:""})}}function Xi(X){X.scope&&typeof X.scope=="object"&&X.scope!==null&&(X.beginScope=X.scope,delete X.scope)}function ht(X){Xi(X),typeof X.beginScope=="string"&&(X.beginScope={_wrap:X.beginScope}),typeof X.endScope=="string"&&(X.endScope={_wrap:X.endScope}),Rn(X),Ti(X)}function Ii(X){function he(Ee,Ce){return new RegExp(f(Ee),"m"+(X.case_insensitive?"i":"")+(X.unicodeRegex?"u":"")+(Ce?"g":""))}class ve{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Ce,He){He.position=this.position++,this.matchIndexes[this.matchAt]=He,this.regexes.push([He,Ce]),this.matchAt+=_(Ce)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Ce=this.regexes.map(He=>He[1]);this.matcherRe=he(R(Ce,{joinWith:"|"}),!0),this.lastIndex=0}exec(Ce){this.matcherRe.lastIndex=this.lastIndex;const He=this.matcherRe.exec(Ce);if(!He)return null;const Bt=He.findIndex((vi,ir)=>ir>0&&vi!==void 0),Qe=this.matchIndexes[Bt];return He.splice(0,Bt),Object.assign(He,Qe)}}class Ie{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Ce){if(this.multiRegexes[Ce])return this.multiRegexes[Ce];const He=new ve;return this.rules.slice(Ce).forEach(([Bt,Qe])=>He.addRule(Bt,Qe)),He.compile(),this.multiRegexes[Ce]=He,He}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Ce,He){this.rules.push([Ce,He]),He.type==="begin"&&this.count++}exec(Ce){const He=this.getMatcher(this.regexIndex);He.lastIndex=this.lastIndex;let Bt=He.exec(Ce);if(this.resumingScanAtSamePosition()&&!(Bt&&Bt.index===this.lastIndex)){const Qe=this.getMatcher(0);Qe.lastIndex=this.lastIndex+1,Bt=Qe.exec(Ce)}return Bt&&(this.regexIndex+=Bt.position+1,this.regexIndex===this.count&&this.considerAll()),Bt}}function St(Ee){const Ce=new Ie;return Ee.contains.forEach(He=>Ce.addRule(He.begin,{rule:He,type:"begin"})),Ee.terminatorEnd&&Ce.addRule(Ee.terminatorEnd,{type:"end"}),Ee.illegal&&Ce.addRule(Ee.illegal,{type:"illegal"}),Ce}function dt(Ee,Ce){const He=Ee;if(Ee.isCompiled)return He;[be,Ke,ht,Be].forEach(Qe=>Qe(Ee,Ce)),X.compilerExtensions.forEach(Qe=>Qe(Ee,Ce)),Ee.__beforeBegin=null,[$e,je,Ct].forEach(Qe=>Qe(Ee,Ce)),Ee.isCompiled=!0;let Bt=null;return typeof Ee.keywords=="object"&&Ee.keywords.$pattern&&(Ee.keywords=Object.assign({},Ee.keywords),Bt=Ee.keywords.$pattern,delete Ee.keywords.$pattern),Bt=Bt||/\w+/,Ee.keywords&&(Ee.keywords=mi(Ee.keywords,X.case_insensitive)),He.keywordPatternRe=he(Bt,!0),Ce&&(Ee.begin||(Ee.begin=/\B|\b/),He.beginRe=he(He.begin),!Ee.end&&!Ee.endsWithParent&&(Ee.end=/\B|\b/),Ee.end&&(He.endRe=he(He.end)),He.terminatorEnd=f(He.end)||"",Ee.endsWithParent&&Ce.terminatorEnd&&(He.terminatorEnd+=(Ee.end?"|":"")+Ce.terminatorEnd)),Ee.illegal&&(He.illegalRe=he(Ee.illegal)),Ee.contains||(Ee.contains=[]),Ee.contains=[].concat(...Ee.contains.map(function(Qe){return Yt(Qe==="self"?Ee:Qe)})),Ee.contains.forEach(function(Qe){dt(Qe,He)}),Ee.starts&&dt(Ee.starts,Ce),He.matcher=St(He),He}if(X.compilerExtensions||(X.compilerExtensions=[]),X.contains&&X.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return X.classNameAliases=o(X.classNameAliases||{}),dt(X)}function Kt(X){return X?X.endsWithParent||Kt(X.starts):!1}function Yt(X){return X.variants&&!X.cachedVariants&&(X.cachedVariants=X.variants.map(function(he){return o(X,{variants:null},he)})),X.cachedVariants?X.cachedVariants:Kt(X)?o(X,{starts:X.starts?o(X.starts):null}):Object.isFrozen(X)?o(X):X}var zt="11.11.1";class us extends Error{constructor(he,ve){super(he),this.name="HTMLInjectionError",this.html=ve}}const er=s,Ps=o,Ln=Symbol("nomatch"),Pn=7,tr=function(X){const he=Object.create(null),ve=Object.create(null),Ie=[];let St=!0;const dt="Could not find the language '{}', did you forget to load/include a language module?",Ee={disableAutodetect:!0,name:"Plain text",contains:[]};let Ce={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:v};function He(ge){return Ce.noHighlightRe.test(ge)}function Bt(ge){let Le=ge.className+" ";Le+=ge.parentNode?ge.parentNode.className:"";const De=Ce.languageDetectRe.exec(Le);if(De){const rt=q(De[1]);return rt||(Gt(dt.replace("{}",De[1])),Gt("Falling back to no-highlight mode for this block.",ge)),rt?De[1]:"no-highlight"}return Le.split(/\s+/).find(rt=>He(rt)||q(rt))}function Qe(ge,Le,De){let rt="",Mt="";typeof Le=="object"?(rt=ge,De=Le.ignoreIllegals,Mt=Le.language):(It("10.7.0","highlight(lang, code, ...args) has been deprecated."),It("10.7.0",`Please use highlight(code, options) instead.
|
|
199
199
|
https://github.com/highlightjs/highlight.js/issues/2277`),Mt=ge,rt=Le),De===void 0&&(De=!0);const Ai={code:rt,language:Mt};$t("before:highlight",Ai);const Zi=Ai.result?Ai.result:vi(Ai.language,Ai.code,De);return Zi.code=Ai.code,$t("after:highlight",Zi),Zi}function vi(ge,Le,De,rt){const Mt=Object.create(null);function Ai(ye,Ae){return ye.keywords[Ae]}function Zi(){if(!Ue.keywords){ii.addText(ft);return}let ye=0;Ue.keywordPatternRe.lastIndex=0;let Ae=Ue.keywordPatternRe.exec(ft),Fe="";for(;Ae;){Fe+=ft.substring(ye,Ae.index);const Je=bi.case_insensitive?Ae[0].toLowerCase():Ae[0],Nt=Ai(Ue,Je);if(Nt){const[hn,Wa]=Nt;if(ii.addText(Fe),Fe="",Mt[Je]=(Mt[Je]||0)+1,Mt[Je]<=Pn&&(Dr+=Wa),hn.startsWith("_"))Fe+=Ae[0];else{const fl=bi.classNameAliases[hn]||hn;Qi(Ae[0],fl)}}else Fe+=Ae[0];ye=Ue.keywordPatternRe.lastIndex,Ae=Ue.keywordPatternRe.exec(ft)}Fe+=ft.substring(ye),ii.addText(Fe)}function zi(){if(ft==="")return;let ye=null;if(typeof Ue.subLanguage=="string"){if(!he[Ue.subLanguage]){ii.addText(ft);return}ye=vi(Ue.subLanguage,ft,!0,dl[Ue.subLanguage]),dl[Ue.subLanguage]=ye._top}else ye=nr(ft,Ue.subLanguage.length?Ue.subLanguage:null);Ue.relevance>0&&(Dr+=ye.relevance),ii.__addSublanguage(ye._emitter,ye.language)}function Et(){Ue.subLanguage!=null?zi():Zi(),ft=""}function Qi(ye,Ae){ye!==""&&(ii.startScope(Ae),ii.addText(ye),ii.endScope())}function ul(ye,Ae){let Fe=1;const Je=Ae.length-1;for(;Fe<=Je;){if(!ye._emit[Fe]){Fe++;continue}const Nt=bi.classNameAliases[ye[Fe]]||ye[Fe],hn=Ae[Fe];Nt?Qi(hn,Nt):(ft=hn,Zi(),ft=""),Fe++}}function Fs(ye,Ae){return ye.scope&&typeof ye.scope=="string"&&ii.openNode(bi.classNameAliases[ye.scope]||ye.scope),ye.beginScope&&(ye.beginScope._wrap?(Qi(ft,bi.classNameAliases[ye.beginScope._wrap]||ye.beginScope._wrap),ft=""):ye.beginScope._multi&&(ul(ye.beginScope,Ae),ft="")),Ue=Object.create(ye,{parent:{value:Ue}}),Ue}function ja(ye,Ae,Fe){let Je=g(ye.endRe,Fe);if(Je){if(ye["on:end"]){const Nt=new n(ye);ye["on:end"](Ae,Nt),Nt.isMatchIgnored&&(Je=!1)}if(Je){for(;ye.endsParent&&ye.parent;)ye=ye.parent;return ye}}if(ye.endsWithParent)return ja(ye.parent,Ae,Fe)}function qs(ye){return Ue.matcher.regexIndex===0?(ft+=ye[0],1):(Or=!0,0)}function du(ye){const Ae=ye[0],Fe=ye.rule,Je=new n(Fe),Nt=[Fe.__beforeBegin,Fe["on:begin"]];for(const hn of Nt)if(hn&&(hn(ye,Je),Je.isMatchIgnored))return qs(Ae);return Fe.skip?ft+=Ae:(Fe.excludeBegin&&(ft+=Ae),Et(),!Fe.returnBegin&&!Fe.excludeBegin&&(ft=Ae)),Fs(Fe,ye),Fe.returnBegin?0:Ae.length}function $i(ye){const Ae=ye[0],Fe=Le.substring(ye.index),Je=ja(Ue,ye,Fe);if(!Je)return Ln;const Nt=Ue;Ue.endScope&&Ue.endScope._wrap?(Et(),Qi(Ae,Ue.endScope._wrap)):Ue.endScope&&Ue.endScope._multi?(Et(),ul(Ue.endScope,ye)):Nt.skip?ft+=Ae:(Nt.returnEnd||Nt.excludeEnd||(ft+=Ae),Et(),Nt.excludeEnd&&(ft=Ae));do Ue.scope&&ii.closeNode(),!Ue.skip&&!Ue.subLanguage&&(Dr+=Ue.relevance),Ue=Ue.parent;while(Ue!==Je.parent);return Je.starts&&Fs(Je.starts,ye),Nt.returnEnd?0:Ae.length}function Fa(){const ye=[];for(let Ae=Ue;Ae!==bi;Ae=Ae.parent)Ae.scope&&ye.unshift(Ae.scope);ye.forEach(Ae=>ii.openNode(Ae))}let ds={};function Ws(ye,Ae){const Fe=Ae&&Ae[0];if(ft+=ye,Fe==null)return Et(),0;if(ds.type==="begin"&&Ae.type==="end"&&ds.index===Ae.index&&Fe===""){if(ft+=Le.slice(Ae.index,Ae.index+1),!St){const Je=new Error(`0 width match regex (${ge})`);throw Je.languageName=ge,Je.badRule=ds.rule,Je}return 1}if(ds=Ae,Ae.type==="begin")return du(Ae);if(Ae.type==="illegal"&&!De){const Je=new Error('Illegal lexeme "'+Fe+'" for mode "'+(Ue.scope||"<unnamed>")+'"');throw Je.mode=Ue,Je}else if(Ae.type==="end"){const Je=$i(Ae);if(Je!==Ln)return Je}if(Ae.type==="illegal"&&Fe==="")return ft+=`
|
|
200
|
-
`,1;if(qa>1e5&&qa>Ae.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ft+=Fe,Fe.length}const bi=q(ge);if(!bi)throw lt(ht.replace("{}",ge)),new Error('Unknown language: "'+ge+'"');const hl=Ii(bi);let Gs="",Ue=rt||hl;const dl={},ii=new Ce.__emitter(Ce);Fa();let ft="",Dr=0,sr=0,qa=0,Or=!1;try{if(bi.__emitTokens)bi.__emitTokens(Le,ii);else{for(Ue.matcher.considerAll();;){qa++,Or?Or=!1:Ue.matcher.considerAll(),Ue.matcher.lastIndex=sr;const ye=Ue.matcher.exec(Le);if(!ye)break;const Ae=Le.substring(sr,ye.index),Fe=Ws(Ae,ye);sr=ye.index+Fe}Ws(Le.substring(sr))}return ii.finalize(),Gs=ii.toHTML(),{language:ge,value:Gs,relevance:Dr,illegal:!1,_emitter:ii,_top:Ue}}catch(ye){if(ye.message&&ye.message.includes("Illegal"))return{language:ge,value:er(Le),illegal:!0,relevance:0,_illegalBy:{message:ye.message,index:sr,context:Le.slice(sr-100,sr+100),mode:ye.mode,resultSoFar:Gs},_emitter:ii};if(St)return{language:ge,value:er(Le),illegal:!1,relevance:0,errorRaised:ye,_emitter:ii,_top:Ue};throw ye}}function ir(ge){const Le={value:er(ge),illegal:!1,relevance:0,_top:Ee,_emitter:new Ce.__emitter(Ce)};return Le._emitter.addText(ge),Le}function nr(ge,Le){Le=Le||Ce.languages||Object.keys(he);const De=ir(ge),rt=Le.filter(q).filter(we).map(Et=>vi(Et,ge,!1));rt.unshift(De);const Mt=rt.sort((Et,Qi)=>{if(Et.relevance!==Qi.relevance)return Qi.relevance-Et.relevance;if(Et.language&&Qi.language){if(q(Et.language).supersetOf===Qi.language)return 1;if(q(Qi.language).supersetOf===Et.language)return-1}return 0}),[Ai,Zi]=Mt,zi=Ai;return zi.secondBest=Zi,zi}function Hi(ge,Le,De){const rt=Le&&ve[Le]||De;ge.classList.add("hljs"),ge.classList.add(`language-${rt}`)}function xt(ge){let Le=null;const De=Bt(ge);if(He(De))return;if($t("before:highlightElement",{el:ge,language:De}),ge.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",ge);return}if(ge.children.length>0&&(Ce.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(ge)),Ce.throwUnescapedHTML))throw new us("One of your code blocks includes unescaped HTML.",ge.innerHTML);Le=ge;const rt=Le.textContent,Mt=De?Qe(rt,{language:De,ignoreIllegals:!0}):nr(rt);ge.innerHTML=Mt.value,ge.dataset.highlighted="yes",Hi(ge,De,Mt.language),ge.result={language:Mt.language,re:Mt.relevance,relevance:Mt.relevance},Mt.secondBest&&(ge.secondBest={language:Mt.secondBest.language,relevance:Mt.secondBest.relevance}),$t("after:highlightElement",{el:ge,result:Mt,text:rt})}function wt(ge){Ce=Ps(Ce,ge)}const kn=()=>{rr(),It("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Mr(){rr(),It("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let js=!1;function rr(){function ge(){rr()}if(document.readyState==="loading"){js||window.addEventListener("DOMContentLoaded",ge,!1),js=!0;return}document.querySelectorAll(Ce.cssSelector).forEach(xt)}function hs(ge,Le){let De=null;try{De=Le(X)}catch(rt){if(lt("Language definition for '{}' could not be registered.".replace("{}",ge)),St)lt(rt);else throw rt;De=Ee}De.name||(De.name=ge),he[ge]=De,De.rawDefinition=Le.bind(null,X),De.aliases&&pe(De.aliases,{languageName:ge})}function jn(ge){delete he[ge];for(const Le of Object.keys(ve))ve[Le]===ge&&delete ve[Le]}function Me(){return Object.keys(he)}function q(ge){return ge=(ge||"").toLowerCase(),he[ge]||he[ve[ge]]}function pe(ge,{languageName:Le}){typeof ge=="string"&&(ge=[ge]),ge.forEach(De=>{ve[De.toLowerCase()]=Le})}function we(ge){const Le=q(ge);return Le&&!Le.disableAutodetect}function it(ge){ge["before:highlightBlock"]&&!ge["before:highlightElement"]&&(ge["before:highlightElement"]=Le=>{ge["before:highlightBlock"](Object.assign({block:Le.el},Le))}),ge["after:highlightBlock"]&&!ge["after:highlightElement"]&&(ge["after:highlightElement"]=Le=>{ge["after:highlightBlock"](Object.assign({block:Le.el},Le))})}function Ye(ge){it(ge),Ie.push(ge)}function Tt(ge){const Le=Ie.indexOf(ge);Le!==-1&&Ie.splice(Le,1)}function $t(ge,Le){const De=ge;Ie.forEach(function(rt){rt[De]&&rt[De](Le)})}function Ut(ge){return It("10.7.0","highlightBlock will be removed entirely in v12.0"),It("10.7.0","Please use highlightElement now."),xt(ge)}Object.assign(X,{highlight:Qe,highlightAuto:nr,highlightAll:rr,highlightElement:xt,highlightBlock:Ut,configure:wt,initHighlighting:kn,initHighlightingOnLoad:Mr,registerLanguage:hs,unregisterLanguage:jn,listLanguages:Me,getLanguage:q,registerAliases:pe,autoDetection:we,inherit:Ps,addPlugin:Ye,removePlugin:Tt}),X.debugMode=function(){St=!1},X.safeMode=function(){St=!0},X.versionString=zt,X.regex={concat:E,lookahead:C,either:S,optional:A,anyNumberOfTimes:x};for(const ge in _e)typeof _e[ge]=="object"&&i(_e[ge]);return Object.assign(X,_e),X},ti=tr({});return ti.newInstance=()=>tr({}),Wd=ti,ti.HighlightJS=ti,ti.default=ti,Wd}var YT=KT();const Sn=P1(YT);function c0(i){const n=i.regex,s={},o={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[s]}]};Object.assign(s,{className:"variable",variants:[{begin:n.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},o]});const l={className:"subst",begin:/\$\(/,end:/\)/,contains:[i.BACKSLASH_ESCAPE]},y=i.inherit(i.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),b={begin:/<<-?\s*(?=\w+)/,starts:{contains:[i.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},c={className:"string",begin:/"/,end:/"/,contains:[i.BACKSLASH_ESCAPE,s,l]};l.contains.push(c);const u={match:/\\"/},h={className:"string",begin:/'/,end:/'/},v={match:/\\'/},f={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},i.NUMBER_MODE,s]},C=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],x=i.SHEBANG({binary:`(${C.join("|")})`,relevance:10}),A={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[i.inherit(i.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},E=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],p=["true","false"],S={match:/(\/[a-z._-]+)+/},_=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],g=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],w=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],R=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:E,literal:p,built_in:[..._,...g,"set","shopt",...w,...R]},contains:[x,i.SHEBANG(),A,f,y,b,S,c,u,h,v,s]}}const u0="[A-Za-z$_][0-9A-Za-z$_]*",VT=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],XT=["true","false","null","undefined","NaN","Infinity"],SS=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],yS=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],CS=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],ZT=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],QT=[].concat(CS,SS,yS);function h0(i){const n=i.regex,s=(K,{after:O})=>{const H="</"+K[0].slice(1);return K.input.indexOf(H,O)!==-1},o=u0,l={begin:"<>",end:"</>"},y=/<[A-Za-z0-9\\._:-]+\s*\/>/,b={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(K,O)=>{const H=K[0].length+K.index,M=K.input[H];if(M==="<"||M===","){O.ignoreMatch();return}M===">"&&(s(K,{after:H})||O.ignoreMatch());let U;const V=K.input.substring(H);if(U=V.match(/^\s*=/)){O.ignoreMatch();return}if((U=V.match(/^\s+extends\s+/))&&U.index===0){O.ignoreMatch();return}}},c={$pattern:u0,keyword:VT,literal:XT,built_in:QT,"variable.language":ZT},u="[0-9](_?[0-9])*",h=`\\.(${u})`,v="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",f={className:"number",variants:[{begin:`(\\b(${v})((${h})|\\.)?|(${h}))[eE][+-]?(${u})\\b`},{begin:`\\b(${v})\\b((${h})\\b|\\.)?|(${h})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},C={className:"subst",begin:"\\$\\{",end:"\\}",keywords:c,contains:[]},x={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,C],subLanguage:"xml"}},A={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,C],subLanguage:"css"}},E={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,C],subLanguage:"graphql"}},p={className:"string",begin:"`",end:"`",contains:[i.BACKSLASH_ESCAPE,C]},_={className:"comment",variants:[i.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:o+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),i.C_BLOCK_COMMENT_MODE,i.C_LINE_COMMENT_MODE]},g=[i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,x,A,E,p,{match:/\$\d+/},f];C.contains=g.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(g)});const w=[].concat(_,C.contains),R=w.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(w)}]),L={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:R},D={variants:[{match:[/class/,/\s+/,o,/\s+/,/extends/,/\s+/,n.concat(o,"(",n.concat(/\./,o),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,o],scope:{1:"keyword",3:"title.class"}}]},T={relevance:0,match:n.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...SS,...yS]}},B={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},W={variants:[{match:[/function/,/\s+/,o,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[L],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function F(K){return n.concat("(?!",K.join("|"),")")}const I={match:n.concat(/\b/,F([...CS,"super","import"].map(K=>`${K}\\s*\\(`)),o,n.lookahead(/\s*\(/)),className:"title.function",relevance:0},Z={begin:n.concat(/\./,n.lookahead(n.concat(o,/(?![0-9A-Za-z$_(])/))),end:o,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ee={match:[/get|set/,/\s+/,o,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},L]},j="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+i.UNDERSCORE_IDENT_RE+")\\s*=>",Y={match:[/const|var|let/,/\s+/,o,/\s*/,/=\s*/,/(async\s*)?/,n.lookahead(j)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[L]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:R,CLASS_REFERENCE:T},illegal:/#(?![$_A-z])/,contains:[i.SHEBANG({label:"shebang",binary:"node",relevance:5}),B,i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,x,A,E,p,_,{match:/\$\d+/},f,T,{scope:"attr",match:o+n.lookahead(":"),relevance:0},Y,{begin:"("+i.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[_,i.REGEXP_MODE,{className:"function",begin:j,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:i.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:R}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:l.begin,end:l.end},{match:y},{begin:b.begin,"on:begin":b.isTrulyOpeningTag,end:b.end}],subLanguage:"xml",contains:[{begin:b.begin,end:b.end,skip:!0,contains:["self"]}]}]},W,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+i.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[L,i.inherit(i.TITLE_MODE,{begin:o,className:"title.function"})]},{match:/\.\.\./,relevance:0},Z,{match:"\\$"+o,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[L]},I,P,D,ee,{match:/\$[(.]/}]}}function JT(i){const n={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},s={match:/[{}[\],:]/,className:"punctuation",relevance:0},o=["true","false","null"],l={scope:"literal",beginKeywords:o.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:o},contains:[n,s,i.QUOTE_STRING_MODE,l,i.C_NUMBER_MODE,i.C_LINE_COMMENT_MODE,i.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function d0(i){const n=i.regex,s={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},o={begin:"^[-\\*]{3,}",end:"$"},l={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},y={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},b={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},c=/[A-Za-z][A-Za-z0-9+.-]*/,u={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:n.concat(/\[.+?\]\(/,c,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},h={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},v={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},f=i.inherit(h,{contains:[]}),C=i.inherit(v,{contains:[]});h.contains.push(C),v.contains.push(f);let x=[s,u];return[h,v,f,C].forEach(S=>{S.contains=S.contains.concat(x)}),x=x.concat(h,v),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:x},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:x}]}]},s,y,h,v,{className:"quote",begin:"^>\\s+",contains:x,end:"$"},l,o,u,b,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function f0(i){const n=i.regex,s=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),o=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],c={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:o,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},u={className:"meta",begin:/^(>>>|\.\.\.) /},h={className:"subst",begin:/\{/,end:/\}/,keywords:c,illegal:/#/},v={begin:/\{\{/,relevance:0},f={className:"string",contains:[i.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[i.BACKSLASH_ESCAPE,u],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[i.BACKSLASH_ESCAPE,u],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[i.BACKSLASH_ESCAPE,u,v,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[i.BACKSLASH_ESCAPE,u,v,h]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[i.BACKSLASH_ESCAPE,v,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[i.BACKSLASH_ESCAPE,v,h]},i.APOS_STRING_MODE,i.QUOTE_STRING_MODE]},C="[0-9](_?[0-9])*",x=`(\\b(${C}))?\\.(${C})|\\b(${C})\\.`,A=`\\b|${o.join("|")}`,E={className:"number",relevance:0,variants:[{begin:`(\\b(${C})|(${x}))[eE][+-]?(${C})[jJ]?(?=${A})`},{begin:`(${x})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${A})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${A})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${A})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${A})`},{begin:`\\b(${C})[jJ](?=${A})`}]},p={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:c,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},S={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:["self",u,E,f,i.HASH_COMMENT_MODE]}]};return h.contains=[f,E,u],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:c,illegal:/(<\/|\?)|=>/,contains:[u,E,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},f,p,i.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,s],scope:{1:"keyword",3:"title.function"},contains:[S]},{variants:[{match:[/\bclass/,/\s+/,s,/\s*/,/\(\s*/,s,/\s*\)/]},{match:[/\bclass/,/\s+/,s]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[E,S,f]}]}}const Jc="[A-Za-z$_][0-9A-Za-z$_]*",wS=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],ES=["true","false","null","undefined","NaN","Infinity"],xS=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],TS=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],AS=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],RS=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],LS=[].concat(AS,xS,TS);function eA(i){const n=i.regex,s=(K,{after:O})=>{const H="</"+K[0].slice(1);return K.input.indexOf(H,O)!==-1},o=Jc,l={begin:"<>",end:"</>"},y=/<[A-Za-z0-9\\._:-]+\s*\/>/,b={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(K,O)=>{const H=K[0].length+K.index,M=K.input[H];if(M==="<"||M===","){O.ignoreMatch();return}M===">"&&(s(K,{after:H})||O.ignoreMatch());let U;const V=K.input.substring(H);if(U=V.match(/^\s*=/)){O.ignoreMatch();return}if((U=V.match(/^\s+extends\s+/))&&U.index===0){O.ignoreMatch();return}}},c={$pattern:Jc,keyword:wS,literal:ES,built_in:LS,"variable.language":RS},u="[0-9](_?[0-9])*",h=`\\.(${u})`,v="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",f={className:"number",variants:[{begin:`(\\b(${v})((${h})|\\.)?|(${h}))[eE][+-]?(${u})\\b`},{begin:`\\b(${v})\\b((${h})\\b|\\.)?|(${h})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},C={className:"subst",begin:"\\$\\{",end:"\\}",keywords:c,contains:[]},x={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,C],subLanguage:"xml"}},A={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,C],subLanguage:"css"}},E={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,C],subLanguage:"graphql"}},p={className:"string",begin:"`",end:"`",contains:[i.BACKSLASH_ESCAPE,C]},_={className:"comment",variants:[i.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:o+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),i.C_BLOCK_COMMENT_MODE,i.C_LINE_COMMENT_MODE]},g=[i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,x,A,E,p,{match:/\$\d+/},f];C.contains=g.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(g)});const w=[].concat(_,C.contains),R=w.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(w)}]),L={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:R},D={variants:[{match:[/class/,/\s+/,o,/\s+/,/extends/,/\s+/,n.concat(o,"(",n.concat(/\./,o),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,o],scope:{1:"keyword",3:"title.class"}}]},T={relevance:0,match:n.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...xS,...TS]}},B={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},W={variants:[{match:[/function/,/\s+/,o,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[L],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function F(K){return n.concat("(?!",K.join("|"),")")}const I={match:n.concat(/\b/,F([...AS,"super","import"].map(K=>`${K}\\s*\\(`)),o,n.lookahead(/\s*\(/)),className:"title.function",relevance:0},Z={begin:n.concat(/\./,n.lookahead(n.concat(o,/(?![0-9A-Za-z$_(])/))),end:o,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ee={match:[/get|set/,/\s+/,o,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},L]},j="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+i.UNDERSCORE_IDENT_RE+")\\s*=>",Y={match:[/const|var|let/,/\s+/,o,/\s*/,/=\s*/,/(async\s*)?/,n.lookahead(j)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[L]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:R,CLASS_REFERENCE:T},illegal:/#(?![$_A-z])/,contains:[i.SHEBANG({label:"shebang",binary:"node",relevance:5}),B,i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,x,A,E,p,_,{match:/\$\d+/},f,T,{scope:"attr",match:o+n.lookahead(":"),relevance:0},Y,{begin:"("+i.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[_,i.REGEXP_MODE,{className:"function",begin:j,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:i.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:R}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:l.begin,end:l.end},{match:y},{begin:b.begin,"on:begin":b.isTrulyOpeningTag,end:b.end}],subLanguage:"xml",contains:[{begin:b.begin,end:b.end,skip:!0,contains:["self"]}]}]},W,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+i.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[L,i.inherit(i.TITLE_MODE,{begin:o,className:"title.function"})]},{match:/\.\.\./,relevance:0},Z,{match:"\\$"+o,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[L]},I,P,D,ee,{match:/\$[(.]/}]}}function p0(i){const n=i.regex,s=eA(i),o=Jc,l=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],y={begin:[/namespace/,/\s+/,i.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},b={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:l},contains:[s.exports.CLASS_REFERENCE]},c={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},u=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],h={$pattern:Jc,keyword:wS.concat(u),literal:ES,built_in:LS.concat(l),"variable.language":RS},v={className:"meta",begin:"@"+o},f=(E,p,S)=>{const _=E.contains.findIndex(g=>g.label===p);if(_===-1)throw new Error("can not find mode to replace");E.contains.splice(_,1,S)};Object.assign(s.keywords,h),s.exports.PARAMS_CONTAINS.push(v);const C=s.contains.find(E=>E.scope==="attr"),x=Object.assign({},C,{match:n.concat(o,n.lookahead(/\s*\?:/))});s.exports.PARAMS_CONTAINS.push([s.exports.CLASS_REFERENCE,C,x]),s.contains=s.contains.concat([v,y,b,x]),f(s,"shebang",i.SHEBANG()),f(s,"use_strict",c);const A=s.contains.find(E=>E.label==="func.def");return A.relevance=0,Object.assign(s,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),s}const tA=/\[\[wiki:([^\]]+)\]\]/g,iA=new _S({gfm:!0,breaks:!1}),_0={ALLOWED_URI_REGEXP:/^(?:(?:https?|mailto):|[#/]|\.{0,2}\/|[^:]+$)/i,ADD_ATTR:["target","rel","data-entry-id"]},Gd=dA();function Ua(i){const n=sA(i),s=iA.parse(n,{async:!1}),o=il.sanitize(s,_0),l=new DOMParser().parseFromString(o,"text/html");return aA(l),oA(l),cA(l),{html:il.sanitize(l.body.innerHTML,_0),toc:uA(l)}}function nA(i){const n=new TextEncoder().encode(i);let s="";for(const o of n)s+=String.fromCharCode(o);return btoa(s)}function rA(i){const n=atob(i),s=new Uint8Array(n.length);for(let o=0;o<n.length;o++)s[o]=n.charCodeAt(o);return new TextDecoder().decode(s)}function sA(i){return i.replace(tA,(n,s)=>{const o=s.trim();if(!o)return"";const l=Te(o),y=encodeURIComponent(o);return`<a href="${kr(o)}" data-entry-id="${y}">${l}</a>`})}function aA(i){const n=new Map;for(const s of i.querySelectorAll("h2, h3")){const o=s.textContent?.trim()??"",l=_A(o||"section"),y=n.get(l)??0;n.set(l,y+1),s.id=y===0?l:`${l}-${y+1}`}}function oA(i){for(const n of i.querySelectorAll("pre > code")){const s=fA(n.className),o=n.textContent??"",l=n.parentElement;if(!l)continue;if(s==="mermaid"){const b=i.createElement("div");b.className="diagram-block",b.setAttribute("data-mermaid-source",nA(o)),b.setAttribute("data-diagram-state","pending"),l.replaceWith(b);continue}const y=hA(o,s);n.innerHTML=y,n.classList.add("hljs"),l.classList.add("code-block"),l.dataset.code=o,l.insertBefore(lA(i,s||"text"),l.firstChild)}}function lA(i,n){const s=i.createElement("div");s.className="code-block-toolbar";const o=i.createElement("span");o.className="code-block-dots",o.setAttribute("aria-hidden","true");for(let b=0;b<3;b++)o.append(i.createElement("span"));const l=i.createElement("span");l.className="code-block-language",l.textContent=n;const y=i.createElement("button");return y.className="copy-code",y.type="button",y.dataset.action="copy-code",y.textContent="복사",s.append(o,l,y),s}function cA(i){for(const n of i.querySelectorAll("a")){const s=n.getAttribute("href")??"";pA(s)&&(n.setAttribute("target","_blank"),n.setAttribute("rel","noopener noreferrer"))}}function uA(i){return[...i.querySelectorAll("h2, h3")].map(n=>({id:n.id,text:n.textContent?.trim()??n.id,level:n.tagName.toLowerCase()==="h2"?2:3}))}function hA(i,n){return n&&Gd.getLanguage(n)?Gd.highlight(i,{language:n}).value:Gd.highlightAuto(i).value}function dA(){return Sn.registerLanguage("bash",c0),Sn.registerLanguage("sh",c0),Sn.registerLanguage("javascript",h0),Sn.registerLanguage("js",h0),Sn.registerLanguage("json",JT),Sn.registerLanguage("markdown",d0),Sn.registerLanguage("md",d0),Sn.registerLanguage("python",f0),Sn.registerLanguage("py",f0),Sn.registerLanguage("typescript",p0),Sn.registerLanguage("ts",p0),Sn}function fA(i){return i.match(/language-([a-z0-9_-]+)/i)?.[1]?.toLowerCase()??null}function pA(i){return/^[a-z][a-z0-9+.-]*:/i.test(i)&&!i.startsWith(window.location.origin)}function _A(i){return i.trim().toLowerCase().replace(/[^\p{Letter}\p{Number}]+/gu,"-").replace(/^-+|-+$/g,"")||"section"}function gA(i){return`
|
|
200
|
+
`,1;if(qa>1e5&&qa>Ae.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ft+=Fe,Fe.length}const bi=q(ge);if(!bi)throw lt(dt.replace("{}",ge)),new Error('Unknown language: "'+ge+'"');const hl=Ii(bi);let Gs="",Ue=rt||hl;const dl={},ii=new Ce.__emitter(Ce);Fa();let ft="",Dr=0,sr=0,qa=0,Or=!1;try{if(bi.__emitTokens)bi.__emitTokens(Le,ii);else{for(Ue.matcher.considerAll();;){qa++,Or?Or=!1:Ue.matcher.considerAll(),Ue.matcher.lastIndex=sr;const ye=Ue.matcher.exec(Le);if(!ye)break;const Ae=Le.substring(sr,ye.index),Fe=Ws(Ae,ye);sr=ye.index+Fe}Ws(Le.substring(sr))}return ii.finalize(),Gs=ii.toHTML(),{language:ge,value:Gs,relevance:Dr,illegal:!1,_emitter:ii,_top:Ue}}catch(ye){if(ye.message&&ye.message.includes("Illegal"))return{language:ge,value:er(Le),illegal:!0,relevance:0,_illegalBy:{message:ye.message,index:sr,context:Le.slice(sr-100,sr+100),mode:ye.mode,resultSoFar:Gs},_emitter:ii};if(St)return{language:ge,value:er(Le),illegal:!1,relevance:0,errorRaised:ye,_emitter:ii,_top:Ue};throw ye}}function ir(ge){const Le={value:er(ge),illegal:!1,relevance:0,_top:Ee,_emitter:new Ce.__emitter(Ce)};return Le._emitter.addText(ge),Le}function nr(ge,Le){Le=Le||Ce.languages||Object.keys(he);const De=ir(ge),rt=Le.filter(q).filter(we).map(Et=>vi(Et,ge,!1));rt.unshift(De);const Mt=rt.sort((Et,Qi)=>{if(Et.relevance!==Qi.relevance)return Qi.relevance-Et.relevance;if(Et.language&&Qi.language){if(q(Et.language).supersetOf===Qi.language)return 1;if(q(Qi.language).supersetOf===Et.language)return-1}return 0}),[Ai,Zi]=Mt,zi=Ai;return zi.secondBest=Zi,zi}function Hi(ge,Le,De){const rt=Le&&ve[Le]||De;ge.classList.add("hljs"),ge.classList.add(`language-${rt}`)}function xt(ge){let Le=null;const De=Bt(ge);if(He(De))return;if($t("before:highlightElement",{el:ge,language:De}),ge.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",ge);return}if(ge.children.length>0&&(Ce.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(ge)),Ce.throwUnescapedHTML))throw new us("One of your code blocks includes unescaped HTML.",ge.innerHTML);Le=ge;const rt=Le.textContent,Mt=De?Qe(rt,{language:De,ignoreIllegals:!0}):nr(rt);ge.innerHTML=Mt.value,ge.dataset.highlighted="yes",Hi(ge,De,Mt.language),ge.result={language:Mt.language,re:Mt.relevance,relevance:Mt.relevance},Mt.secondBest&&(ge.secondBest={language:Mt.secondBest.language,relevance:Mt.secondBest.relevance}),$t("after:highlightElement",{el:ge,result:Mt,text:rt})}function wt(ge){Ce=Ps(Ce,ge)}const kn=()=>{rr(),It("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Mr(){rr(),It("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let js=!1;function rr(){function ge(){rr()}if(document.readyState==="loading"){js||window.addEventListener("DOMContentLoaded",ge,!1),js=!0;return}document.querySelectorAll(Ce.cssSelector).forEach(xt)}function hs(ge,Le){let De=null;try{De=Le(X)}catch(rt){if(lt("Language definition for '{}' could not be registered.".replace("{}",ge)),St)lt(rt);else throw rt;De=Ee}De.name||(De.name=ge),he[ge]=De,De.rawDefinition=Le.bind(null,X),De.aliases&&pe(De.aliases,{languageName:ge})}function jn(ge){delete he[ge];for(const Le of Object.keys(ve))ve[Le]===ge&&delete ve[Le]}function Me(){return Object.keys(he)}function q(ge){return ge=(ge||"").toLowerCase(),he[ge]||he[ve[ge]]}function pe(ge,{languageName:Le}){typeof ge=="string"&&(ge=[ge]),ge.forEach(De=>{ve[De.toLowerCase()]=Le})}function we(ge){const Le=q(ge);return Le&&!Le.disableAutodetect}function it(ge){ge["before:highlightBlock"]&&!ge["before:highlightElement"]&&(ge["before:highlightElement"]=Le=>{ge["before:highlightBlock"](Object.assign({block:Le.el},Le))}),ge["after:highlightBlock"]&&!ge["after:highlightElement"]&&(ge["after:highlightElement"]=Le=>{ge["after:highlightBlock"](Object.assign({block:Le.el},Le))})}function Ye(ge){it(ge),Ie.push(ge)}function Tt(ge){const Le=Ie.indexOf(ge);Le!==-1&&Ie.splice(Le,1)}function $t(ge,Le){const De=ge;Ie.forEach(function(rt){rt[De]&&rt[De](Le)})}function Ut(ge){return It("10.7.0","highlightBlock will be removed entirely in v12.0"),It("10.7.0","Please use highlightElement now."),xt(ge)}Object.assign(X,{highlight:Qe,highlightAuto:nr,highlightAll:rr,highlightElement:xt,highlightBlock:Ut,configure:wt,initHighlighting:kn,initHighlightingOnLoad:Mr,registerLanguage:hs,unregisterLanguage:jn,listLanguages:Me,getLanguage:q,registerAliases:pe,autoDetection:we,inherit:Ps,addPlugin:Ye,removePlugin:Tt}),X.debugMode=function(){St=!1},X.safeMode=function(){St=!0},X.versionString=zt,X.regex={concat:E,lookahead:C,either:S,optional:A,anyNumberOfTimes:x};for(const ge in _e)typeof _e[ge]=="object"&&t(_e[ge]);return Object.assign(X,_e),X},ti=tr({});return ti.newInstance=()=>tr({}),Wd=ti,ti.HighlightJS=ti,ti.default=ti,Wd}var VT=YT();const Sn=j1(VT);function c0(t){const n=t.regex,s={},o={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[s]}]};Object.assign(s,{className:"variable",variants:[{begin:n.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},o]});const l={className:"subst",begin:/\$\(/,end:/\)/,contains:[t.BACKSLASH_ESCAPE]},y=t.inherit(t.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),b={begin:/<<-?\s*(?=\w+)/,starts:{contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},c={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,s,l]};l.contains.push(c);const u={match:/\\"/},h={className:"string",begin:/'/,end:/'/},v={match:/\\'/},f={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},t.NUMBER_MODE,s]},C=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],x=t.SHEBANG({binary:`(${C.join("|")})`,relevance:10}),A={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[t.inherit(t.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},E=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],p=["true","false"],S={match:/(\/[a-z._-]+)+/},_=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],g=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],w=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],R=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:E,literal:p,built_in:[..._,...g,"set","shopt",...w,...R]},contains:[x,t.SHEBANG(),A,f,y,b,S,c,u,h,v,s]}}const u0="[A-Za-z$_][0-9A-Za-z$_]*",XT=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],ZT=["true","false","null","undefined","NaN","Infinity"],yS=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],CS=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],wS=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],QT=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],JT=[].concat(wS,yS,CS);function h0(t){const n=t.regex,s=(K,{after:O})=>{const H="</"+K[0].slice(1);return K.input.indexOf(H,O)!==-1},o=u0,l={begin:"<>",end:"</>"},y=/<[A-Za-z0-9\\._:-]+\s*\/>/,b={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(K,O)=>{const H=K[0].length+K.index,M=K.input[H];if(M==="<"||M===","){O.ignoreMatch();return}M===">"&&(s(K,{after:H})||O.ignoreMatch());let U;const V=K.input.substring(H);if(U=V.match(/^\s*=/)){O.ignoreMatch();return}if((U=V.match(/^\s+extends\s+/))&&U.index===0){O.ignoreMatch();return}}},c={$pattern:u0,keyword:XT,literal:ZT,built_in:JT,"variable.language":QT},u="[0-9](_?[0-9])*",h=`\\.(${u})`,v="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",f={className:"number",variants:[{begin:`(\\b(${v})((${h})|\\.)?|(${h}))[eE][+-]?(${u})\\b`},{begin:`\\b(${v})\\b((${h})\\b|\\.)?|(${h})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},C={className:"subst",begin:"\\$\\{",end:"\\}",keywords:c,contains:[]},x={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,C],subLanguage:"xml"}},A={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,C],subLanguage:"css"}},E={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,C],subLanguage:"graphql"}},p={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,C]},_={className:"comment",variants:[t.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:o+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]},g=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,x,A,E,p,{match:/\$\d+/},f];C.contains=g.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(g)});const w=[].concat(_,C.contains),R=w.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(w)}]),L={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:R},D={variants:[{match:[/class/,/\s+/,o,/\s+/,/extends/,/\s+/,n.concat(o,"(",n.concat(/\./,o),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,o],scope:{1:"keyword",3:"title.class"}}]},T={relevance:0,match:n.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...yS,...CS]}},B={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},W={variants:[{match:[/function/,/\s+/,o,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[L],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function F(K){return n.concat("(?!",K.join("|"),")")}const I={match:n.concat(/\b/,F([...wS,"super","import"].map(K=>`${K}\\s*\\(`)),o,n.lookahead(/\s*\(/)),className:"title.function",relevance:0},Z={begin:n.concat(/\./,n.lookahead(n.concat(o,/(?![0-9A-Za-z$_(])/))),end:o,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ee={match:[/get|set/,/\s+/,o,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},L]},j="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",Y={match:[/const|var|let/,/\s+/,o,/\s*/,/=\s*/,/(async\s*)?/,n.lookahead(j)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[L]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:R,CLASS_REFERENCE:T},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),B,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,x,A,E,p,_,{match:/\$\d+/},f,T,{scope:"attr",match:o+n.lookahead(":"),relevance:0},Y,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[_,t.REGEXP_MODE,{className:"function",begin:j,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:R}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:l.begin,end:l.end},{match:y},{begin:b.begin,"on:begin":b.isTrulyOpeningTag,end:b.end}],subLanguage:"xml",contains:[{begin:b.begin,end:b.end,skip:!0,contains:["self"]}]}]},W,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[L,t.inherit(t.TITLE_MODE,{begin:o,className:"title.function"})]},{match:/\.\.\./,relevance:0},Z,{match:"\\$"+o,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[L]},I,P,D,ee,{match:/\$[(.]/}]}}function eA(t){const n={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},s={match:/[{}[\],:]/,className:"punctuation",relevance:0},o=["true","false","null"],l={scope:"literal",beginKeywords:o.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:o},contains:[n,s,t.QUOTE_STRING_MODE,l,t.C_NUMBER_MODE,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function d0(t){const n=t.regex,s={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},o={begin:"^[-\\*]{3,}",end:"$"},l={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},y={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},b={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},c=/[A-Za-z][A-Za-z0-9+.-]*/,u={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:n.concat(/\[.+?\]\(/,c,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},h={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},v={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},f=t.inherit(h,{contains:[]}),C=t.inherit(v,{contains:[]});h.contains.push(C),v.contains.push(f);let x=[s,u];return[h,v,f,C].forEach(S=>{S.contains=S.contains.concat(x)}),x=x.concat(h,v),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:x},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:x}]}]},s,y,h,v,{className:"quote",begin:"^>\\s+",contains:x,end:"$"},l,o,u,b,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function f0(t){const n=t.regex,s=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),o=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],c={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:o,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},u={className:"meta",begin:/^(>>>|\.\.\.) /},h={className:"subst",begin:/\{/,end:/\}/,keywords:c,illegal:/#/},v={begin:/\{\{/,relevance:0},f={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,u],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,u],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,u,v,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,u,v,h]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[t.BACKSLASH_ESCAPE,v,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,v,h]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},C="[0-9](_?[0-9])*",x=`(\\b(${C}))?\\.(${C})|\\b(${C})\\.`,A=`\\b|${o.join("|")}`,E={className:"number",relevance:0,variants:[{begin:`(\\b(${C})|(${x}))[eE][+-]?(${C})[jJ]?(?=${A})`},{begin:`(${x})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${A})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${A})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${A})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${A})`},{begin:`\\b(${C})[jJ](?=${A})`}]},p={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:c,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},S={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:["self",u,E,f,t.HASH_COMMENT_MODE]}]};return h.contains=[f,E,u],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:c,illegal:/(<\/|\?)|=>/,contains:[u,E,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},f,p,t.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,s],scope:{1:"keyword",3:"title.function"},contains:[S]},{variants:[{match:[/\bclass/,/\s+/,s,/\s*/,/\(\s*/,s,/\s*\)/]},{match:[/\bclass/,/\s+/,s]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[E,S,f]}]}}const Jc="[A-Za-z$_][0-9A-Za-z$_]*",ES=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],xS=["true","false","null","undefined","NaN","Infinity"],TS=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],AS=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],RS=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],LS=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],kS=[].concat(RS,TS,AS);function tA(t){const n=t.regex,s=(K,{after:O})=>{const H="</"+K[0].slice(1);return K.input.indexOf(H,O)!==-1},o=Jc,l={begin:"<>",end:"</>"},y=/<[A-Za-z0-9\\._:-]+\s*\/>/,b={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(K,O)=>{const H=K[0].length+K.index,M=K.input[H];if(M==="<"||M===","){O.ignoreMatch();return}M===">"&&(s(K,{after:H})||O.ignoreMatch());let U;const V=K.input.substring(H);if(U=V.match(/^\s*=/)){O.ignoreMatch();return}if((U=V.match(/^\s+extends\s+/))&&U.index===0){O.ignoreMatch();return}}},c={$pattern:Jc,keyword:ES,literal:xS,built_in:kS,"variable.language":LS},u="[0-9](_?[0-9])*",h=`\\.(${u})`,v="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",f={className:"number",variants:[{begin:`(\\b(${v})((${h})|\\.)?|(${h}))[eE][+-]?(${u})\\b`},{begin:`\\b(${v})\\b((${h})\\b|\\.)?|(${h})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},C={className:"subst",begin:"\\$\\{",end:"\\}",keywords:c,contains:[]},x={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,C],subLanguage:"xml"}},A={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,C],subLanguage:"css"}},E={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,C],subLanguage:"graphql"}},p={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,C]},_={className:"comment",variants:[t.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:o+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]},g=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,x,A,E,p,{match:/\$\d+/},f];C.contains=g.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(g)});const w=[].concat(_,C.contains),R=w.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(w)}]),L={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:R},D={variants:[{match:[/class/,/\s+/,o,/\s+/,/extends/,/\s+/,n.concat(o,"(",n.concat(/\./,o),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,o],scope:{1:"keyword",3:"title.class"}}]},T={relevance:0,match:n.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...TS,...AS]}},B={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},W={variants:[{match:[/function/,/\s+/,o,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[L],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function F(K){return n.concat("(?!",K.join("|"),")")}const I={match:n.concat(/\b/,F([...RS,"super","import"].map(K=>`${K}\\s*\\(`)),o,n.lookahead(/\s*\(/)),className:"title.function",relevance:0},Z={begin:n.concat(/\./,n.lookahead(n.concat(o,/(?![0-9A-Za-z$_(])/))),end:o,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ee={match:[/get|set/,/\s+/,o,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},L]},j="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",Y={match:[/const|var|let/,/\s+/,o,/\s*/,/=\s*/,/(async\s*)?/,n.lookahead(j)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[L]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:R,CLASS_REFERENCE:T},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),B,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,x,A,E,p,_,{match:/\$\d+/},f,T,{scope:"attr",match:o+n.lookahead(":"),relevance:0},Y,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[_,t.REGEXP_MODE,{className:"function",begin:j,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:R}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:l.begin,end:l.end},{match:y},{begin:b.begin,"on:begin":b.isTrulyOpeningTag,end:b.end}],subLanguage:"xml",contains:[{begin:b.begin,end:b.end,skip:!0,contains:["self"]}]}]},W,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[L,t.inherit(t.TITLE_MODE,{begin:o,className:"title.function"})]},{match:/\.\.\./,relevance:0},Z,{match:"\\$"+o,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[L]},I,P,D,ee,{match:/\$[(.]/}]}}function p0(t){const n=t.regex,s=tA(t),o=Jc,l=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],y={begin:[/namespace/,/\s+/,t.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},b={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:l},contains:[s.exports.CLASS_REFERENCE]},c={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},u=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],h={$pattern:Jc,keyword:ES.concat(u),literal:xS,built_in:kS.concat(l),"variable.language":LS},v={className:"meta",begin:"@"+o},f=(E,p,S)=>{const _=E.contains.findIndex(g=>g.label===p);if(_===-1)throw new Error("can not find mode to replace");E.contains.splice(_,1,S)};Object.assign(s.keywords,h),s.exports.PARAMS_CONTAINS.push(v);const C=s.contains.find(E=>E.scope==="attr"),x=Object.assign({},C,{match:n.concat(o,n.lookahead(/\s*\?:/))});s.exports.PARAMS_CONTAINS.push([s.exports.CLASS_REFERENCE,C,x]),s.contains=s.contains.concat([v,y,b,x]),f(s,"shebang",t.SHEBANG()),f(s,"use_strict",c);const A=s.contains.find(E=>E.label==="func.def");return A.relevance=0,Object.assign(s,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),s}const iA=/\[\[wiki:([^\]]+)\]\]/g,nA=new gS({gfm:!0,breaks:!1}),_0={ALLOWED_URI_REGEXP:/^(?:(?:https?|mailto):|[#/]|\.{0,2}\/|[^:]+$)/i,ADD_ATTR:["target","rel","data-entry-id"]},Gd=fA();function Ua(t){const n=aA(t),s=nA.parse(n,{async:!1}),o=il.sanitize(s,_0),l=new DOMParser().parseFromString(o,"text/html");return oA(l),lA(l),uA(l),{html:il.sanitize(l.body.innerHTML,_0),toc:hA(l)}}function rA(t){const n=new TextEncoder().encode(t);let s="";for(const o of n)s+=String.fromCharCode(o);return btoa(s)}function sA(t){const n=atob(t),s=new Uint8Array(n.length);for(let o=0;o<n.length;o++)s[o]=n.charCodeAt(o);return new TextDecoder().decode(s)}function aA(t){return t.replace(iA,(n,s)=>{const o=s.trim();if(!o)return"";const l=Te(o),y=encodeURIComponent(o);return`<a href="${kr(o)}" data-entry-id="${y}">${l}</a>`})}function oA(t){const n=new Map;for(const s of t.querySelectorAll("h2, h3")){const o=s.textContent?.trim()??"",l=gA(o||"section"),y=n.get(l)??0;n.set(l,y+1),s.id=y===0?l:`${l}-${y+1}`}}function lA(t){for(const n of t.querySelectorAll("pre > code")){const s=pA(n.className),o=n.textContent??"",l=n.parentElement;if(!l)continue;if(s==="mermaid"){const b=t.createElement("div");b.className="diagram-block",b.setAttribute("data-mermaid-source",rA(o)),b.setAttribute("data-diagram-state","pending"),l.replaceWith(b);continue}const y=dA(o,s);n.innerHTML=y,n.classList.add("hljs"),l.classList.add("code-block"),l.dataset.code=o,l.insertBefore(cA(t,s||"text"),l.firstChild)}}function cA(t,n){const s=t.createElement("div");s.className="code-block-toolbar";const o=t.createElement("span");o.className="code-block-dots",o.setAttribute("aria-hidden","true");for(let b=0;b<3;b++)o.append(t.createElement("span"));const l=t.createElement("span");l.className="code-block-language",l.textContent=n;const y=t.createElement("button");return y.className="copy-code",y.type="button",y.dataset.action="copy-code",y.textContent="복사",s.append(o,l,y),s}function uA(t){for(const n of t.querySelectorAll("a")){const s=n.getAttribute("href")??"";_A(s)&&(n.setAttribute("target","_blank"),n.setAttribute("rel","noopener noreferrer"))}}function hA(t){return[...t.querySelectorAll("h2, h3")].map(n=>({id:n.id,text:n.textContent?.trim()??n.id,level:n.tagName.toLowerCase()==="h2"?2:3}))}function dA(t,n){return n&&Gd.getLanguage(n)?Gd.highlight(t,{language:n}).value:Gd.highlightAuto(t).value}function fA(){return Sn.registerLanguage("bash",c0),Sn.registerLanguage("sh",c0),Sn.registerLanguage("javascript",h0),Sn.registerLanguage("js",h0),Sn.registerLanguage("json",eA),Sn.registerLanguage("markdown",d0),Sn.registerLanguage("md",d0),Sn.registerLanguage("python",f0),Sn.registerLanguage("py",f0),Sn.registerLanguage("typescript",p0),Sn.registerLanguage("ts",p0),Sn}function pA(t){return t.match(/language-([a-z0-9_-]+)/i)?.[1]?.toLowerCase()??null}function _A(t){return/^[a-z][a-z0-9+.-]*:/i.test(t)&&!t.startsWith(window.location.origin)}function gA(t){return t.trim().toLowerCase().replace(/[^\p{Letter}\p{Number}]+/gu,"-").replace(/^-+|-+$/g,"")||"section"}function mA(t){return`
|
|
201
201
|
<article class="document">
|
|
202
202
|
<header class="document-header">
|
|
203
203
|
<p class="eyebrow">MANIFEST · DRYDOCK</p>
|
|
204
204
|
<h1>Conflicts</h1>
|
|
205
205
|
</header>
|
|
206
|
-
${
|
|
206
|
+
${t.length>0?`
|
|
207
207
|
<ul class="conflict-list">
|
|
208
|
-
${
|
|
208
|
+
${t.map(n=>`
|
|
209
209
|
<li>
|
|
210
|
-
<a class="conflict-list-item" href="${
|
|
210
|
+
<a class="conflict-list-item" href="${s2(n.id)}">
|
|
211
211
|
<span class="conflict-list-copy">
|
|
212
212
|
<strong>${Te(n.title)}</strong>
|
|
213
213
|
<small>${Te(n.id)}</small>
|
|
@@ -219,40 +219,40 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Mt=ge,rt=Le),De===void
|
|
|
219
219
|
</ul>
|
|
220
220
|
`:'<p class="empty-state">No conflicts to display.</p>'}
|
|
221
221
|
</article>
|
|
222
|
-
`}function
|
|
222
|
+
`}function vA(t){const n=[Kd("Current",t.current),Kd("Proposed",t.proposed),Kd("Raw Source",t.rawSource)].filter(Boolean).join("");return`
|
|
223
223
|
<article class="document">
|
|
224
224
|
<header class="document-header">
|
|
225
225
|
<p class="eyebrow">MANIFEST · DRYDOCK</p>
|
|
226
|
-
<h1>${Te(
|
|
226
|
+
<h1>${Te(t.id)}</h1>
|
|
227
227
|
<div class="meta-chips">
|
|
228
|
-
<span class="chip chip-coral">${Te(String(
|
|
228
|
+
<span class="chip chip-coral">${Te(String(t.meta.status??"unknown"))}</span>
|
|
229
229
|
</div>
|
|
230
230
|
</header>
|
|
231
231
|
<section class="conflict-meta-card">
|
|
232
|
-
<pre>${Te(JSON.stringify(
|
|
232
|
+
<pre>${Te(JSON.stringify(t.meta,null,2))}</pre>
|
|
233
233
|
</section>
|
|
234
234
|
${n||'<p class="empty-state">No conflicts to display.</p>'}
|
|
235
235
|
</article>
|
|
236
|
-
`}function Kd(
|
|
236
|
+
`}function Kd(t,n){if(!n)return"";const s=Ua(n);return`
|
|
237
237
|
<section class="conflict-section">
|
|
238
|
-
<h2>${Te(
|
|
238
|
+
<h2>${Te(t)}</h2>
|
|
239
239
|
<div class="markdown-body">${s.html}</div>
|
|
240
240
|
</section>
|
|
241
|
-
`}function
|
|
241
|
+
`}function bA(t){return`
|
|
242
242
|
<article class="document">
|
|
243
243
|
<header class="document-header">
|
|
244
244
|
<p class="eyebrow">MANIFEST · CODEX</p>
|
|
245
245
|
<h1>Index</h1>
|
|
246
246
|
</header>
|
|
247
|
-
<div class="markdown-body">${Ua(
|
|
247
|
+
<div class="markdown-body">${Ua(t).html}</div>
|
|
248
248
|
</article>
|
|
249
|
-
`}function Cf(
|
|
249
|
+
`}function Cf(t,n){try{return new Date(t).toLocaleString(n??"en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}catch{return t}}function eu(t){const n=Date.now()-new Date(t).getTime(),s=Math.floor(n/6e4);if(s<1)return"just now";if(s<60)return`${s} min ago`;const o=Math.floor(s/60);if(o<24)return`${o} hr ago`;const l=Math.floor(o/24);return l<30?`${l} days ago`:`${Math.floor(l/30)} months ago`}const SA=`
|
|
250
250
|
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
251
251
|
<path d="M7 17 17 7M9 7h8v8" />
|
|
252
252
|
</svg>
|
|
253
|
-
`;function
|
|
253
|
+
`;function yA(t,n,s){if(!t)return"";const{frontmatter:o}=t,l=Cf(o.created),y=eu(o.created),b=Cf(o.updated),c=eu(o.updated),u=U5(t,n,s),h=o.tags.length>0?`<div class="queue-card-chips">${o.tags.map(f=>`<span class="chip chip-muted">${Te(f)}</span>`).join("")}</div>`:'<span class="queue-dl-muted">None</span>',v=o.rawSourceRef?`<a class="manifest-link queue-raw-link" href="${Ze(Vb(o.rawSourceRef))}" data-raw-ref="${Ze(o.rawSourceRef)}">
|
|
254
254
|
<span class="manifest-ref">${Te(o.rawSourceRef)}</span>
|
|
255
|
-
<span class="manifest-arrow" aria-hidden="true">${
|
|
255
|
+
<span class="manifest-arrow" aria-hidden="true">${SA}</span>
|
|
256
256
|
</a>`:'<span class="queue-dl-muted">None</span>';return`
|
|
257
257
|
<aside class="manifest-card">
|
|
258
258
|
<div class="manifest-header">
|
|
@@ -285,7 +285,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Mt=ge,rt=Le),De===void
|
|
|
285
285
|
</dl>
|
|
286
286
|
${u?`<div class="manifest-actions">${u}</div>`:""}
|
|
287
287
|
</aside>
|
|
288
|
-
`}const
|
|
288
|
+
`}const CA="modulepreload",wA=function(t){return"/console/"+t},g0={},EA=function(n,s,o){let l=Promise.resolve();if(s&&s.length>0){let u=function(h){return Promise.all(h.map(v=>Promise.resolve(v).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const b=document.querySelector("meta[property=csp-nonce]"),c=b?.nonce||b?.getAttribute("nonce");l=u(s.map(h=>{if(h=wA(h),h in g0)return;g0[h]=!0;const v=h.endsWith(".css"),f=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${f}`))return;const C=document.createElement("link");if(C.rel=v?"stylesheet":CA,v||(C.as="script"),C.crossOrigin="",C.href=h,c&&C.setAttribute("nonce",c),document.head.appendChild(C),v)return new Promise((x,A)=>{C.addEventListener("load",x),C.addEventListener("error",()=>A(new Error(`Unable to preload CSS for ${h}`)))})}))}function y(b){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=b,window.dispatchEvent(c),!c.defaultPrevented)throw b}return l.then(b=>{for(const c of b||[])c.status==="rejected"&&y(c.reason);return n().catch(y)})},xA=".diagram-block[data-mermaid-source]:not([data-diagram-state='rendered']):not([data-diagram-state='error'])",TA=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(","),AA=/^on/i,RA={USE_PROFILES:{svg:!0,svgFilters:!1},FORBID_TAGS:["foreignObject","script"],FORBID_ATTR:["href","xlink:href"]},m0="diagramInteractionBound",LA=/^oklch\s*\(\s*([^)]+)\s*\)$/i,kA=/^(-?\d+(?:\.\d+)?)(deg)?$/i,wn=[25,50,75,100,125,150,200,300,400],MA=["pie1","pie2","pie3","pie4","pie5","pie6","pie7","pie8","pie9","pie10","pie11","pie12"];let Yd=null,v0=!1,DA=0,OA=0,sl=null;function ls(t){const n=t.trim();if(!n)return n;const s=iR(n);return s?nR(s):n}function BA(t){if(v0)return;v0=!0,b0(t);const n=t instanceof Node?t:document.body;new MutationObserver(o=>{let l=!1;for(const y of o)if(y.type==="childList"){sl&&!sl.trigger.isConnected&&Qo(!1);for(const b of y.addedNodes)if(b instanceof Element&&(b.matches?.(".diagram-block[data-mermaid-source]")||b.querySelector?.(".diagram-block[data-mermaid-source]"))){l=!0;break}if(l)break}l&&b0(t)}).observe(n,{childList:!0,subtree:!0})}function b0(t){const n=t.querySelectorAll(xA);for(const s of n)s.dataset.diagramHydrating!=="true"&&(s.dataset.diagramHydrating="true",s.dataset.diagramState="pending",NA(s))}async function NA(t){const n=t.getAttribute("data-mermaid-source")??"";let s="";try{s=sA(n)}catch{Vd(t,"Invalid diagram source");return}if(!s.trim()){Vd(t,"Empty diagram source");return}try{const o=await HA(),l=`mermaid-diagram-${++DA}`,{svg:y}=await o.render(l,s);t.innerHTML=IA(y),UA(t,y),PA(t),jA(t),t.dataset.diagramState="rendered"}catch(o){const l=o instanceof Error?o.message:String(o);Vd(t,l)}}function Vd(t,n){t.dataset.diagramState="error",t.textContent=`Diagram render failed: ${n}`}function IA(t){const n=(s,o)=>{AA.test(o.attrName)&&(o.keepAttr=!1)};il.addHook("uponSanitizeAttribute",n);try{return il.sanitize(t,RA)}finally{il.removeHook("uponSanitizeAttribute",n)}}async function HA(){return Yd||(Yd=(async()=>{const t=await EA(()=>import("./mermaid.core-BJTjy7aS.js").then(s=>s.bC),[]),n=t.default??t;return n.initialize({securityLevel:"strict",htmlLabels:!1,suppressErrorRendering:!0,startOnLoad:!1,theme:"base",look:"handDrawn",themeVariables:zA(),themeCSS:$A(),flowchart:{htmlLabels:!1,useMaxWidth:!1}}),n})()),Yd}function zA(){const t=getComputedStyle(document.documentElement),n=(A,E)=>{const p=t.getPropertyValue(A).trim();return ls(p||E)},s=n("--brass","#c69a4a"),o=n("--brass-bright","#e6b86a"),l=n("--brass-deep","#a0782a"),y=n("--aurora","#8bd7e6"),b=n("--aurora-deep","#1f8aa8"),c=n("--coral","#ef7c63"),u=n("--ink-deep","#1d2734"),h=n("--ink-fog","#a6afbb"),v=n("--ink-pearl","#e6e9ef"),f=n("--ink-spectral","#bcc4d0"),C=[o,s,y,c,ls("oklch(70% 0.11 68)"),b,ls("oklch(76% 0.09 205)"),l,ls("oklch(68% 0.14 30)"),h,ls("oklch(62% 0.08 228)"),ls("oklch(52% 0.05 248)")],x=Object.fromEntries(MA.map((A,E)=>[A,C[E]??u]));return{background:"transparent",primaryColor:"transparent",primaryTextColor:v,primaryBorderColor:s,secondaryColor:"transparent",secondaryTextColor:v,secondaryBorderColor:o,tertiaryColor:"transparent",tertiaryTextColor:f,tertiaryBorderColor:s,lineColor:b,edgeLabelBackground:"transparent",titleColor:o,fontFamily:"JetBrains Mono Variable, ui-monospace, monospace",mainBkg:"transparent",nodeBorder:s,clusterBkg:"transparent",clusterBorder:s,pieTitleTextColor:o,pieTitleTextSize:"19px",pieSectionTextColor:v,pieSectionTextSize:"13px",pieLegendTextColor:v,pieLegendTextSize:"14px",pieStrokeColor:l,pieStrokeWidth:"1.35px",pieOuterStrokeColor:o,pieOuterStrokeWidth:"2.5px",pieOpacity:"0.96",...x}}function $A(){const t=getComputedStyle(document.documentElement),n=(h,v)=>{const f=t.getPropertyValue(h).trim();return ls(f||v)},s=n("--brass-deep","#a0782a"),o=n("--brass-bright","#e6b86a"),l=n("--aurora-deep","#1f8aa8"),y=n("--ink-abyss","#131920"),b=ls("oklch(15% 0.04 250 / 34%)"),c=n("--surface-glass","#1d2734"),u=n("--ink-pearl","#e6e9ef");return`
|
|
289
289
|
.node rect, .node polygon, .node circle, .node ellipse, .actor, .classGroup rect {
|
|
290
290
|
stroke: ${s};
|
|
291
291
|
fill: ${c};
|
|
@@ -338,29 +338,29 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Mt=ge,rt=Le),De===void
|
|
|
338
338
|
paint-order: stroke;
|
|
339
339
|
filter: saturate(0.78) brightness(0.92) drop-shadow(0 0 0.55px ${o});
|
|
340
340
|
}
|
|
341
|
-
`}function $A(i,n){const s=new DOMParser().parseFromString(n,"image/svg+xml"),o=Array.from(s.querySelectorAll("a")),l=Array.from(i.querySelectorAll("a")),y=Math.min(o.length,l.length);for(let b=0;b<y;b++){const c=o[b],u=l[b];if(!c||!u)continue;const h=c.getAttribute("href")??c.getAttribute("xlink:href")??"",v=MS(h);v&&u.setAttribute("href",v)}}function UA(i){const n=i.querySelector("svg");if(!n)return;let s;try{s=n.getBBox()}catch{return}const{x:o,y:l,width:y,height:b}=s;!Number.isFinite(o)||!Number.isFinite(l)||!Number.isFinite(y)||!Number.isFinite(b)||o<0||l<0||y<=0||b<=0||n.setAttribute("viewBox",`${Ma(o)} ${Ma(l)} ${Ma(y)} ${Ma(b)}`)}function PA(i){i.tabIndex=0,i.setAttribute("aria-label","Open diagram in expanded view"),QA(i),i.dataset[m0]!=="true"&&(i.dataset[m0]="true",i.addEventListener("click",jA),i.addEventListener("keydown",FA))}function jA(i){if(i.metaKey||i.ctrlKey||i.shiftKey||i.altKey||i.button!==0||tu(i.target))return;const n=i.currentTarget;n instanceof HTMLElement&&(i.preventDefault(),kS(n))}function FA(i){if(i.key!=="Enter"&&i.key!==" "||tu(i.target))return;const n=i.currentTarget;n instanceof HTMLElement&&(i.preventDefault(),kS(n))}function kS(i){const n=i.querySelector("svg");if(!n)return;Qo(!1);const s=typeof HTMLDialogElement<"u"&&typeof HTMLDialogElement.prototype.showModal=="function",o=document.createElement(s?"dialog":"div"),l=++DA,y=`diagram-lightbox-title-${l}`;o.className="diagram-lightbox",o.setAttribute("aria-labelledby",y),s||(o.setAttribute("role","dialog"),o.setAttribute("aria-modal","true"),o.tabIndex=-1);const b=document.createElement("div");b.className="diagram-lightbox__frame";const c=document.createElement("div");c.className="diagram-lightbox__header";const u=document.createElement("h2");u.id=y,u.textContent="MANIFEST · DIAGRAM";const h=document.createElement("button");h.className="diagram-lightbox__close",h.type="button",h.setAttribute("aria-label","Close expanded diagram"),h.textContent="Close";const v=document.createElement("div");v.className="diagram-lightbox__controls",v.setAttribute("aria-label","Diagram zoom controls");const f=kc("−","Zoom out","out"),C=document.createElement("span");C.className="diagram-lightbox__zoom-readout",C.setAttribute("aria-live","polite");const x=kc("+","Zoom in","in"),A=kc("Fit","Fit diagram to viewport","fit"),E=kc("Reset","Reset diagram zoom","reset");v.append(f,C,x,A,E);const p=document.createElement("div");p.className="diagram-lightbox__viewport";const S=GA(n),_=n.cloneNode(!0);_.removeAttribute("style"),YA(_,`diagram-lightbox-svg-${l}`),p.append(_),c.append(u,v,h),b.append(c,p),o.append(b),document.body.append(o);const g=new qA(p,_,C,S);f.addEventListener("click",()=>g.zoomOut()),x.addEventListener("click",()=>g.zoomIn()),A.addEventListener("click",()=>g.fit()),E.addEventListener("click",()=>g.reset());const w=VA(o),R=T=>{(T.target===o||T.target===h)&&Qo(!0)},L=T=>{if(T.key==="Escape"){T.preventDefault(),Qo(!0);return}g.handleKeyboard(T)||T.key==="Tab"&&ZA(T,o)},D={dialog:o,trigger:i,inertStates:w,onClick:R,onKeyDown:L,cleanupPanZoom:()=>g.destroy()};s&&(D.onCancel=T=>{T.preventDefault(),Qo(!0)},o.addEventListener("cancel",D.onCancel),o.showModal()),o.addEventListener("click",R),document.addEventListener("keydown",L,!0),sl=D,g.fit(),h.focus()}function kc(i,n,s){const o=document.createElement("button");return o.className="diagram-lightbox__zoom-button",o.type="button",o.dataset.zoomAction=s,o.setAttribute("aria-label",n),o.textContent=i,o}class qA{constructor(n,s,o,l){this.viewport=n,this.svg=s,this.readout=o,this.baseSize=l,this.applyZoom(this.zoomIndex),n.addEventListener("pointerdown",this.onPointerDown),n.addEventListener("pointermove",this.onPointerMove),n.addEventListener("pointerup",this.onPointerEnd),n.addEventListener("pointercancel",this.onPointerEnd),n.addEventListener("wheel",this.onWheel,{passive:!1}),n.addEventListener("dblclick",this.onDoubleClick),window.addEventListener("resize",this.onResize)}viewport;svg;readout;baseSize;zoomIndex=wn.indexOf(100);dragStart=null;pinchStart=null;pointers=new Map;destroy(){this.viewport.removeEventListener("pointerdown",this.onPointerDown),this.viewport.removeEventListener("pointermove",this.onPointerMove),this.viewport.removeEventListener("pointerup",this.onPointerEnd),this.viewport.removeEventListener("pointercancel",this.onPointerEnd),this.viewport.removeEventListener("wheel",this.onWheel),this.viewport.removeEventListener("dblclick",this.onDoubleClick),window.removeEventListener("resize",this.onResize),this.pointers.clear()}zoomIn(){this.zoomAroundViewportCenter(Math.min(this.zoomIndex+1,wn.length-1))}zoomOut(){this.zoomAroundViewportCenter(Math.max(this.zoomIndex-1,0))}reset(){this.zoomAroundViewportCenter(wn.indexOf(100))}fit(){const n=this.viewport.clientWidth||this.viewport.getBoundingClientRect().width||this.baseSize.width,s=this.viewport.clientHeight||this.viewport.getBoundingClientRect().height||this.baseSize.height,o=Math.min(n/this.baseSize.width,s/this.baseSize.height),l=Math.floor(o*100),y=wn.findIndex(c=>c>l),b=y===-1?wn.length-1:Math.max(0,y-1);this.applyZoom(b),this.viewport.scrollLeft=Math.max(0,(this.svgWidth-n)/2),this.viewport.scrollTop=Math.max(0,(this.svgHeight-s)/2)}handleKeyboard(n){return n.key==="+"||n.key==="="?(n.preventDefault(),this.zoomIn(),!0):n.key==="-"||n.key==="_"?(n.preventDefault(),this.zoomOut(),!0):n.key==="0"?(n.preventDefault(),this.reset(),!0):n.key.toLowerCase()==="f"?(n.preventDefault(),this.fit(),!0):!1}get svgWidth(){return this.baseSize.width*(Mc(this.zoomIndex)/100)}get svgHeight(){return this.baseSize.height*(Mc(this.zoomIndex)/100)}applyZoom(n){this.zoomIndex=n;const s=Mc(this.zoomIndex),o=s/100;this.svg.setAttribute("width",Ma(this.baseSize.width*o)),this.svg.setAttribute("height",Ma(this.baseSize.height*o)),this.readout.textContent=`${s}%`}zoomAroundViewportCenter(n){const s=this.viewport.getBoundingClientRect();this.zoomAroundPoint(n,s.left+s.width/2,s.top+s.height/2)}zoomAroundPoint(n,s,o){if(n===this.zoomIndex)return;const l=this.svgWidth,y=this.svgHeight,b=this.viewport.getBoundingClientRect(),c=this.viewport.scrollLeft+s-b.left,u=this.viewport.scrollTop+o-b.top;this.applyZoom(n),this.viewport.scrollLeft=c/l*this.svgWidth-(s-b.left),this.viewport.scrollTop=u/y*this.svgHeight-(o-b.top)}onPointerDown=n=>{if(n.button!==0||tu(n.target))return;const s=n.pointerId??1;if(this.pointers.set(s,n),this.pointers.size===2){this.pinchStart={distance:this.pointerDistance(),zoomIndex:this.zoomIndex};return}this.dragStart={x:n.clientX,y:n.clientY,scrollLeft:this.viewport.scrollLeft,scrollTop:this.viewport.scrollTop,pointerId:s},this.viewport.setPointerCapture?.(s)};onPointerMove=n=>{const s=n.pointerId??1;if(this.pointers.has(s)&&this.pointers.set(s,n),this.pinchStart&&this.pointers.size>=2){const o=this.pointerDistance()/this.pinchStart.distance,l=Mc(this.pinchStart.zoomIndex)*o;this.applyZoom(KA(l));return}!this.dragStart||this.dragStart.pointerId!==s||(n.preventDefault(),this.viewport.scrollLeft=this.dragStart.scrollLeft-(n.clientX-this.dragStart.x),this.viewport.scrollTop=this.dragStart.scrollTop-(n.clientY-this.dragStart.y))};onPointerEnd=n=>{const s=n.pointerId??1;this.pointers.delete(s),this.viewport.releasePointerCapture?.(s),this.dragStart?.pointerId===s&&(this.dragStart=null),this.pointers.size<2&&(this.pinchStart=null)};onWheel=n=>{if(!n.ctrlKey&&!n.metaKey)return;n.preventDefault();const s=n.deltaY<0?Math.min(this.zoomIndex+1,wn.length-1):Math.max(this.zoomIndex-1,0);this.zoomAroundPoint(s,n.clientX,n.clientY)};onDoubleClick=n=>{tu(n.target)||(n.preventDefault(),this.zoomAroundPoint(this.zoomIndex===wn.indexOf(200)?wn.indexOf(100):wn.indexOf(200),n.clientX,n.clientY))};onResize=()=>{this.fit()};pointerDistance(){const[n,s]=Array.from(this.pointers.values());return!n||!s?1:Math.hypot(s.clientX-n.clientX,s.clientY-n.clientY)}}function WA(i){const n=S0(i.getAttribute("width")),s=S0(i.getAttribute("height"));if(n&&s)return{width:n,height:s};const o=i.getAttribute("viewBox")?.trim().split(/[\s,]+/).map(Number)??[],l=o[2],y=o[3],b=l!==void 0&&Number.isFinite(l)&&l>0?l:null,c=y!==void 0&&Number.isFinite(y)&&y>0?y:null;return{width:n??b??800,height:s??c??600}}function GA(i){const n=i.getBoundingClientRect();return n.width>0&&n.height>0?{width:n.width,height:n.height}:WA(i)}function S0(i){if(!i)return null;const n=/^(\d+(?:\.\d+)?)/.exec(i.trim());if(!n)return null;const s=Number(n[1]);return Number.isFinite(s)&&s>0?s:null}function Ma(i){return Number.isInteger(i)?String(i):i.toFixed(2).replace(/\.?0+$/,"")}function KA(i){let n=0,s=Number.POSITIVE_INFINITY;return wn.forEach((o,l)=>{const y=Math.abs(o-i);y<s&&(s=y,n=l)}),n}function Mc(i){return wn[i]??wn[0]}function YA(i,n){const s=i.getAttribute("id")??"";i.setAttribute("id",n);const o=i.querySelector("style");!s||!o?.textContent||(o.textContent=o.textContent.split(`#${s}`).join(`#${n}`))}function Qo(i){const n=sl;n&&(n.dialog.removeEventListener("click",n.onClick),document.removeEventListener("keydown",n.onKeyDown,!0),n.onCancel&&n.dialog.removeEventListener("cancel",n.onCancel),n.cleanupPanZoom(),XA(n.inertStates),n.dialog instanceof HTMLDialogElement&&n.dialog.open&&typeof n.dialog.close=="function"&&n.dialog.close(),n.dialog.remove(),sl=null,i&&n.trigger.isConnected&&n.trigger.focus())}function VA(i){const n=[];for(const s of Array.from(document.body.children))!(s instanceof HTMLElement)||s===i||(n.push({element:s,ariaHidden:s.getAttribute("aria-hidden"),inert:s.inert}),s.inert=!0,s.setAttribute("aria-hidden","true"));return n}function XA(i){for(const n of i)n.element.inert=n.inert,n.ariaHidden===null?n.element.removeAttribute("aria-hidden"):n.element.setAttribute("aria-hidden",n.ariaHidden)}function ZA(i,n){const s=Array.from(n.querySelectorAll(xA)).filter(eR);if(s.length===0){i.preventDefault(),n.focus();return}const o=s[0],l=s[s.length-1];!o||!l||(i.shiftKey&&document.activeElement===o?(i.preventDefault(),l.focus()):!i.shiftKey&&document.activeElement===l&&(i.preventDefault(),o.focus()))}function QA(i){i.querySelector("a[href]")?i.removeAttribute("role"):i.setAttribute("role","button")}function tu(i){if(!(i instanceof Element))return!1;const n=i.closest("a[href]");return!n||!(n.getAttribute("href")?.trim()??"")?!1:!JA(n)}function JA(i){return Array.from(i.children).some(n=>n.tagName.toLowerCase()==="svg")}function eR(i){return!(i.inert||i.hidden||i.getAttribute("aria-hidden")==="true"||"disabled"in i&&i.disabled)}function MS(i){const n=i.trim();if(!n||n.includes(".."))return null;if(/^[a-z][a-z0-9+.-]*:/i.test(n)){if(/^javascript:/i.test(n)||/^data:/i.test(n))return null;let o;try{o=new URL(n)}catch{return null}return o.origin!==window.location.origin?null:MS(o.pathname)}if(/^\/entry\/[^/?#]+$/.exec(n)){const o=n.slice(7);let l;try{l=decodeURIComponent(o)}catch{return null}return/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/.test(l)?`/entry/${encodeURIComponent(l)}`:null}return/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/.test(n)?`/entry/${encodeURIComponent(n)}`:null}function tR(i){const n=RA.exec(i);if(!n)return null;const s=n[1]?.trim();if(!s)return null;const o=s.indexOf("/"),l=o>=0?s.slice(0,o):s,y=o>=0?s.slice(o+1).trim():"",b=l.trim().split(/[\s,]+/).filter(Boolean);if(b.length!==3)return null;const[c,u,h]=b;if(!c||!u||!h)return null;const v=Xd(c,1),f=Xd(u,.4),C=nR(h);if(v===null||f===null||C===null)return null;let x=1;if(o>=0){const A=Xd(y,1);if(A===null)return null;x=A}return{L:v,C:f,h:C,alpha:x}}function iR(i){const n=i.h*Math.PI/180,s=i.C*Math.cos(n),o=i.C*Math.sin(n),l=i.L,y=l+.3963377774*s+.2158037573*o,b=l-.1055613458*s-.0638541728*o,c=l-.0894841775*s-1.291485548*o,u=y**3,h=b**3,v=c**3,f=4.0767416621*u-3.3077115913*h+.2309699292*v,C=-1.2684380046*u+2.6097574011*h-.3413193965*v,x=-.0041960863*u-.7034186147*h+1.707614701*v,A=Dc(Zd(f)),E=Dc(Zd(C)),p=Dc(Zd(x));if(i.alpha<1){const S=Dc(i.alpha);return`#${ks(A)}${ks(E)}${ks(p)}${ks(S)}`}return`#${ks(A)}${ks(E)}${ks(p)}`}function Xd(i,n){if(!i)return null;if(i.endsWith("%")){const o=Number(i.slice(0,-1));return Number.isFinite(o)?o/100*n:null}const s=Number(i);return Number.isFinite(s)?s:null}function nR(i){const n=LA.exec(i);if(!n)return null;const s=Number(n[1]);return Number.isFinite(s)?s:null}function Zd(i){const n=Math.max(0,Math.min(1,i));return n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n}function Dc(i){return Math.round(Math.max(0,Math.min(1,i))*255)}function ks(i){return i.toString(16).padStart(2,"0")}function rR(i){const n=i.tags.map(o=>`<span class="chip chip-tag">${Te(o)}</span>`).join(""),s=aR(i);return`
|
|
341
|
+
`}function UA(t,n){const s=new DOMParser().parseFromString(n,"image/svg+xml"),o=Array.from(s.querySelectorAll("a")),l=Array.from(t.querySelectorAll("a")),y=Math.min(o.length,l.length);for(let b=0;b<y;b++){const c=o[b],u=l[b];if(!c||!u)continue;const h=c.getAttribute("href")??c.getAttribute("xlink:href")??"",v=DS(h);v&&u.setAttribute("href",v)}}function PA(t){const n=t.querySelector("svg");if(!n)return;let s;try{s=n.getBBox()}catch{return}const{x:o,y:l,width:y,height:b}=s;!Number.isFinite(o)||!Number.isFinite(l)||!Number.isFinite(y)||!Number.isFinite(b)||o<0||l<0||y<=0||b<=0||n.setAttribute("viewBox",`${Ma(o)} ${Ma(l)} ${Ma(y)} ${Ma(b)}`)}function jA(t){t.tabIndex=0,t.setAttribute("aria-label","Open diagram in expanded view"),JA(t),t.dataset[m0]!=="true"&&(t.dataset[m0]="true",t.addEventListener("click",FA),t.addEventListener("keydown",qA))}function FA(t){if(t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.button!==0||tu(t.target))return;const n=t.currentTarget;n instanceof HTMLElement&&(t.preventDefault(),MS(n))}function qA(t){if(t.key!=="Enter"&&t.key!==" "||tu(t.target))return;const n=t.currentTarget;n instanceof HTMLElement&&(t.preventDefault(),MS(n))}function MS(t){const n=t.querySelector("svg");if(!n)return;Qo(!1);const s=typeof HTMLDialogElement<"u"&&typeof HTMLDialogElement.prototype.showModal=="function",o=document.createElement(s?"dialog":"div"),l=++OA,y=`diagram-lightbox-title-${l}`;o.className="diagram-lightbox",o.setAttribute("aria-labelledby",y),s||(o.setAttribute("role","dialog"),o.setAttribute("aria-modal","true"),o.tabIndex=-1);const b=document.createElement("div");b.className="diagram-lightbox__frame";const c=document.createElement("div");c.className="diagram-lightbox__header";const u=document.createElement("h2");u.id=y,u.textContent="MANIFEST · DIAGRAM";const h=document.createElement("button");h.className="diagram-lightbox__close",h.type="button",h.setAttribute("aria-label","Close expanded diagram"),h.textContent="Close";const v=document.createElement("div");v.className="diagram-lightbox__controls",v.setAttribute("aria-label","Diagram zoom controls");const f=kc("−","Zoom out","out"),C=document.createElement("span");C.className="diagram-lightbox__zoom-readout",C.setAttribute("aria-live","polite");const x=kc("+","Zoom in","in"),A=kc("Fit","Fit diagram to viewport","fit"),E=kc("Reset","Reset diagram zoom","reset");v.append(f,C,x,A,E);const p=document.createElement("div");p.className="diagram-lightbox__viewport";const S=KA(n),_=n.cloneNode(!0);_.removeAttribute("style"),VA(_,`diagram-lightbox-svg-${l}`),p.append(_),c.append(u,v,h),b.append(c,p),o.append(b),document.body.append(o);const g=new WA(p,_,C,S);f.addEventListener("click",()=>g.zoomOut()),x.addEventListener("click",()=>g.zoomIn()),A.addEventListener("click",()=>g.fit()),E.addEventListener("click",()=>g.reset());const w=XA(o),R=T=>{(T.target===o||T.target===h)&&Qo(!0)},L=T=>{if(T.key==="Escape"){T.preventDefault(),Qo(!0);return}g.handleKeyboard(T)||T.key==="Tab"&&QA(T,o)},D={dialog:o,trigger:t,inertStates:w,onClick:R,onKeyDown:L,cleanupPanZoom:()=>g.destroy()};s&&(D.onCancel=T=>{T.preventDefault(),Qo(!0)},o.addEventListener("cancel",D.onCancel),o.showModal()),o.addEventListener("click",R),document.addEventListener("keydown",L,!0),sl=D,g.fit(),h.focus()}function kc(t,n,s){const o=document.createElement("button");return o.className="diagram-lightbox__zoom-button",o.type="button",o.dataset.zoomAction=s,o.setAttribute("aria-label",n),o.textContent=t,o}class WA{constructor(n,s,o,l){this.viewport=n,this.svg=s,this.readout=o,this.baseSize=l,this.applyZoom(this.zoomIndex),n.addEventListener("pointerdown",this.onPointerDown),n.addEventListener("pointermove",this.onPointerMove),n.addEventListener("pointerup",this.onPointerEnd),n.addEventListener("pointercancel",this.onPointerEnd),n.addEventListener("wheel",this.onWheel,{passive:!1}),n.addEventListener("dblclick",this.onDoubleClick),window.addEventListener("resize",this.onResize)}viewport;svg;readout;baseSize;zoomIndex=wn.indexOf(100);dragStart=null;pinchStart=null;pointers=new Map;destroy(){this.viewport.removeEventListener("pointerdown",this.onPointerDown),this.viewport.removeEventListener("pointermove",this.onPointerMove),this.viewport.removeEventListener("pointerup",this.onPointerEnd),this.viewport.removeEventListener("pointercancel",this.onPointerEnd),this.viewport.removeEventListener("wheel",this.onWheel),this.viewport.removeEventListener("dblclick",this.onDoubleClick),window.removeEventListener("resize",this.onResize),this.pointers.clear()}zoomIn(){this.zoomAroundViewportCenter(Math.min(this.zoomIndex+1,wn.length-1))}zoomOut(){this.zoomAroundViewportCenter(Math.max(this.zoomIndex-1,0))}reset(){this.zoomAroundViewportCenter(wn.indexOf(100))}fit(){const n=this.viewport.clientWidth||this.viewport.getBoundingClientRect().width||this.baseSize.width,s=this.viewport.clientHeight||this.viewport.getBoundingClientRect().height||this.baseSize.height,o=Math.min(n/this.baseSize.width,s/this.baseSize.height),l=Math.floor(o*100),y=wn.findIndex(c=>c>l),b=y===-1?wn.length-1:Math.max(0,y-1);this.applyZoom(b),this.viewport.scrollLeft=Math.max(0,(this.svgWidth-n)/2),this.viewport.scrollTop=Math.max(0,(this.svgHeight-s)/2)}handleKeyboard(n){return n.key==="+"||n.key==="="?(n.preventDefault(),this.zoomIn(),!0):n.key==="-"||n.key==="_"?(n.preventDefault(),this.zoomOut(),!0):n.key==="0"?(n.preventDefault(),this.reset(),!0):n.key.toLowerCase()==="f"?(n.preventDefault(),this.fit(),!0):!1}get svgWidth(){return this.baseSize.width*(Mc(this.zoomIndex)/100)}get svgHeight(){return this.baseSize.height*(Mc(this.zoomIndex)/100)}applyZoom(n){this.zoomIndex=n;const s=Mc(this.zoomIndex),o=s/100;this.svg.setAttribute("width",Ma(this.baseSize.width*o)),this.svg.setAttribute("height",Ma(this.baseSize.height*o)),this.readout.textContent=`${s}%`}zoomAroundViewportCenter(n){const s=this.viewport.getBoundingClientRect();this.zoomAroundPoint(n,s.left+s.width/2,s.top+s.height/2)}zoomAroundPoint(n,s,o){if(n===this.zoomIndex)return;const l=this.svgWidth,y=this.svgHeight,b=this.viewport.getBoundingClientRect(),c=this.viewport.scrollLeft+s-b.left,u=this.viewport.scrollTop+o-b.top;this.applyZoom(n),this.viewport.scrollLeft=c/l*this.svgWidth-(s-b.left),this.viewport.scrollTop=u/y*this.svgHeight-(o-b.top)}onPointerDown=n=>{if(n.button!==0||tu(n.target))return;const s=n.pointerId??1;if(this.pointers.set(s,n),this.pointers.size===2){this.pinchStart={distance:this.pointerDistance(),zoomIndex:this.zoomIndex};return}this.dragStart={x:n.clientX,y:n.clientY,scrollLeft:this.viewport.scrollLeft,scrollTop:this.viewport.scrollTop,pointerId:s},this.viewport.setPointerCapture?.(s)};onPointerMove=n=>{const s=n.pointerId??1;if(this.pointers.has(s)&&this.pointers.set(s,n),this.pinchStart&&this.pointers.size>=2){const o=this.pointerDistance()/this.pinchStart.distance,l=Mc(this.pinchStart.zoomIndex)*o;this.applyZoom(YA(l));return}!this.dragStart||this.dragStart.pointerId!==s||(n.preventDefault(),this.viewport.scrollLeft=this.dragStart.scrollLeft-(n.clientX-this.dragStart.x),this.viewport.scrollTop=this.dragStart.scrollTop-(n.clientY-this.dragStart.y))};onPointerEnd=n=>{const s=n.pointerId??1;this.pointers.delete(s),this.viewport.releasePointerCapture?.(s),this.dragStart?.pointerId===s&&(this.dragStart=null),this.pointers.size<2&&(this.pinchStart=null)};onWheel=n=>{if(!n.ctrlKey&&!n.metaKey)return;n.preventDefault();const s=n.deltaY<0?Math.min(this.zoomIndex+1,wn.length-1):Math.max(this.zoomIndex-1,0);this.zoomAroundPoint(s,n.clientX,n.clientY)};onDoubleClick=n=>{tu(n.target)||(n.preventDefault(),this.zoomAroundPoint(this.zoomIndex===wn.indexOf(200)?wn.indexOf(100):wn.indexOf(200),n.clientX,n.clientY))};onResize=()=>{this.fit()};pointerDistance(){const[n,s]=Array.from(this.pointers.values());return!n||!s?1:Math.hypot(s.clientX-n.clientX,s.clientY-n.clientY)}}function GA(t){const n=S0(t.getAttribute("width")),s=S0(t.getAttribute("height"));if(n&&s)return{width:n,height:s};const o=t.getAttribute("viewBox")?.trim().split(/[\s,]+/).map(Number)??[],l=o[2],y=o[3],b=l!==void 0&&Number.isFinite(l)&&l>0?l:null,c=y!==void 0&&Number.isFinite(y)&&y>0?y:null;return{width:n??b??800,height:s??c??600}}function KA(t){const n=t.getBoundingClientRect();return n.width>0&&n.height>0?{width:n.width,height:n.height}:GA(t)}function S0(t){if(!t)return null;const n=/^(\d+(?:\.\d+)?)/.exec(t.trim());if(!n)return null;const s=Number(n[1]);return Number.isFinite(s)&&s>0?s:null}function Ma(t){return Number.isInteger(t)?String(t):t.toFixed(2).replace(/\.?0+$/,"")}function YA(t){let n=0,s=Number.POSITIVE_INFINITY;return wn.forEach((o,l)=>{const y=Math.abs(o-t);y<s&&(s=y,n=l)}),n}function Mc(t){return wn[t]??wn[0]}function VA(t,n){const s=t.getAttribute("id")??"";t.setAttribute("id",n);const o=t.querySelector("style");!s||!o?.textContent||(o.textContent=o.textContent.split(`#${s}`).join(`#${n}`))}function Qo(t){const n=sl;n&&(n.dialog.removeEventListener("click",n.onClick),document.removeEventListener("keydown",n.onKeyDown,!0),n.onCancel&&n.dialog.removeEventListener("cancel",n.onCancel),n.cleanupPanZoom(),ZA(n.inertStates),n.dialog instanceof HTMLDialogElement&&n.dialog.open&&typeof n.dialog.close=="function"&&n.dialog.close(),n.dialog.remove(),sl=null,t&&n.trigger.isConnected&&n.trigger.focus())}function XA(t){const n=[];for(const s of Array.from(document.body.children))!(s instanceof HTMLElement)||s===t||(n.push({element:s,ariaHidden:s.getAttribute("aria-hidden"),inert:s.inert}),s.inert=!0,s.setAttribute("aria-hidden","true"));return n}function ZA(t){for(const n of t)n.element.inert=n.inert,n.ariaHidden===null?n.element.removeAttribute("aria-hidden"):n.element.setAttribute("aria-hidden",n.ariaHidden)}function QA(t,n){const s=Array.from(n.querySelectorAll(TA)).filter(tR);if(s.length===0){t.preventDefault(),n.focus();return}const o=s[0],l=s[s.length-1];!o||!l||(t.shiftKey&&document.activeElement===o?(t.preventDefault(),l.focus()):!t.shiftKey&&document.activeElement===l&&(t.preventDefault(),o.focus()))}function JA(t){t.querySelector("a[href]")?t.removeAttribute("role"):t.setAttribute("role","button")}function tu(t){if(!(t instanceof Element))return!1;const n=t.closest("a[href]");return!n||!(n.getAttribute("href")?.trim()??"")?!1:!eR(n)}function eR(t){return Array.from(t.children).some(n=>n.tagName.toLowerCase()==="svg")}function tR(t){return!(t.inert||t.hidden||t.getAttribute("aria-hidden")==="true"||"disabled"in t&&t.disabled)}function DS(t){const n=t.trim();if(!n||n.includes(".."))return null;if(/^[a-z][a-z0-9+.-]*:/i.test(n)){if(/^javascript:/i.test(n)||/^data:/i.test(n))return null;let o;try{o=new URL(n)}catch{return null}return o.origin!==window.location.origin?null:DS(o.pathname)}if(/^\/entry\/[^/?#]+$/.exec(n)){const o=n.slice(7);let l;try{l=decodeURIComponent(o)}catch{return null}return/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/.test(l)?`/entry/${encodeURIComponent(l)}`:null}return/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/.test(n)?`/entry/${encodeURIComponent(n)}`:null}function iR(t){const n=LA.exec(t);if(!n)return null;const s=n[1]?.trim();if(!s)return null;const o=s.indexOf("/"),l=o>=0?s.slice(0,o):s,y=o>=0?s.slice(o+1).trim():"",b=l.trim().split(/[\s,]+/).filter(Boolean);if(b.length!==3)return null;const[c,u,h]=b;if(!c||!u||!h)return null;const v=Xd(c,1),f=Xd(u,.4),C=rR(h);if(v===null||f===null||C===null)return null;let x=1;if(o>=0){const A=Xd(y,1);if(A===null)return null;x=A}return{L:v,C:f,h:C,alpha:x}}function nR(t){const n=t.h*Math.PI/180,s=t.C*Math.cos(n),o=t.C*Math.sin(n),l=t.L,y=l+.3963377774*s+.2158037573*o,b=l-.1055613458*s-.0638541728*o,c=l-.0894841775*s-1.291485548*o,u=y**3,h=b**3,v=c**3,f=4.0767416621*u-3.3077115913*h+.2309699292*v,C=-1.2684380046*u+2.6097574011*h-.3413193965*v,x=-.0041960863*u-.7034186147*h+1.707614701*v,A=Dc(Zd(f)),E=Dc(Zd(C)),p=Dc(Zd(x));if(t.alpha<1){const S=Dc(t.alpha);return`#${ks(A)}${ks(E)}${ks(p)}${ks(S)}`}return`#${ks(A)}${ks(E)}${ks(p)}`}function Xd(t,n){if(!t)return null;if(t.endsWith("%")){const o=Number(t.slice(0,-1));return Number.isFinite(o)?o/100*n:null}const s=Number(t);return Number.isFinite(s)?s:null}function rR(t){const n=kA.exec(t);if(!n)return null;const s=Number(n[1]);return Number.isFinite(s)?s:null}function Zd(t){const n=Math.max(0,Math.min(1,t));return n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n}function Dc(t){return Math.round(Math.max(0,Math.min(1,t))*255)}function ks(t){return t.toString(16).padStart(2,"0")}function sR(t){const n=t.tags.map(o=>`<span class="chip chip-tag">${Te(o)}</span>`).join(""),s=oR(t);return`
|
|
342
342
|
<div class="meta-chips">
|
|
343
343
|
${n}
|
|
344
344
|
${s}
|
|
345
|
-
<span class="chip">Updated ${Te(
|
|
345
|
+
<span class="chip">Updated ${Te(aR(t.updated))}</span>
|
|
346
346
|
</div>
|
|
347
|
-
`}function
|
|
347
|
+
`}function OS(t){return t.map(n=>`<span class="chip chip-muted">${Te(n)}</span>`).join("")}function aR(t){const n=new Date(t);return Number.isNaN(n.getTime())?t:n.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function oR(t){const n=lR(t);return n?`<span class="chip ${n.tone==="deprecated"?"chip-coral":n.tone==="stale"?"chip-stale":""}" title="${Ze(n.title)}">${Te(n.label)}</span>`:""}function lR(t,n=new Date){const s=t.status,o=typeof t.revalidateAfter=="string"&&!Number.isNaN(Date.parse(t.revalidateAfter))&&Date.parse(t.revalidateAfter)<n.getTime();return s==="deprecated"||s==="superseded"?{label:s,tone:"deprecated",title:o?`${s} · stale`:s}:o?{label:"stale",tone:"stale",title:t.revalidateAfter??"stale"}:s==="current"||s==="draft"?{label:s,tone:"neutral",title:s}:null}function cR(t,n,s){const o=uR(t,n,s);return o.length===0?"":`
|
|
348
348
|
<section class="related-list">
|
|
349
349
|
<h2>Related entries</h2>
|
|
350
350
|
<div class="related-items">
|
|
351
351
|
${o.map(l=>`
|
|
352
352
|
<a class="related-card" href="${kr(l.entry.id)}" data-entry-id="${Ze(l.entry.id)}">
|
|
353
353
|
<strong>${Te(l.entry.title)}</strong>
|
|
354
|
-
<span>${
|
|
354
|
+
<span>${OS(l.matchingTags)}</span>
|
|
355
355
|
</a>
|
|
356
356
|
`).join("")}
|
|
357
357
|
</div>
|
|
358
358
|
</section>
|
|
359
|
-
`}function
|
|
359
|
+
`}function uR(t,n,s){const o=new Set(n),l="en-US";return s.filter(y=>y.id!==t).map(y=>({entry:y,matchingTags:y.tags.filter(b=>o.has(b))})).filter(y=>y.matchingTags.length>0).sort((y,b)=>b.matchingTags.length-y.matchingTags.length||y.entry.title.localeCompare(b.entry.title,l,{sensitivity:"base",numeric:!0})).slice(0,5)}const hR=`
|
|
360
360
|
<svg class="arrow" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" width="16" height="16">
|
|
361
361
|
<path d="M5 12h14M13 6l6 6-6 6" />
|
|
362
362
|
</svg>
|
|
363
|
-
`;function
|
|
363
|
+
`;function dR(t,n,s=!0){const o=t.length,l=t.slice(0,6),y=t[0]??null;return`
|
|
364
364
|
<article class="document welcome">
|
|
365
365
|
<header class="welcome-title">
|
|
366
366
|
<p class="eyebrow">Fleet · Codex</p>
|
|
@@ -376,7 +376,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Mt=ge,rt=Le),De===void
|
|
|
376
376
|
${y?`
|
|
377
377
|
<a class="primary-link" href="${Ze(kr(y.id))}" data-entry-id="${Ze(y.id)}">
|
|
378
378
|
<span>Open first entry — ${Te(y.title)}</span>
|
|
379
|
-
${
|
|
379
|
+
${hR}
|
|
380
380
|
</a>
|
|
381
381
|
`:'<p class="empty-state">No wiki entries yet. Add entries with <code>wiki_ingest</code>.</p>'}
|
|
382
382
|
${l.length>0?`
|
|
@@ -384,74 +384,74 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Mt=ge,rt=Le),De===void
|
|
|
384
384
|
${l.map(b=>`
|
|
385
385
|
<a class="welcome-card" href="${Ze(kr(b.id))}" data-entry-id="${Ze(b.id)}">
|
|
386
386
|
<strong>${Te(b.title)}</strong>
|
|
387
|
-
<span class="welcome-card-tags">${
|
|
387
|
+
<span class="welcome-card-tags">${OS(b.tags.slice(0,3))}</span>
|
|
388
388
|
</a>
|
|
389
389
|
`).join("")}
|
|
390
390
|
</div>
|
|
391
391
|
`:""}
|
|
392
392
|
</article>
|
|
393
|
-
`}function
|
|
393
|
+
`}function fR(t,n){const s=Ua(t.body);return{toc:s.toc,html:`
|
|
394
394
|
<article class="document">
|
|
395
395
|
<header class="document-header">
|
|
396
396
|
<p class="eyebrow">Wiki Entry</p>
|
|
397
|
-
<h1>${Te(
|
|
398
|
-
${
|
|
397
|
+
<h1>${Te(t.frontmatter.title)}</h1>
|
|
398
|
+
${sR(t.frontmatter)}
|
|
399
399
|
</header>
|
|
400
400
|
<div class="markdown-body" id="markdown-body">
|
|
401
401
|
${s.html}
|
|
402
402
|
</div>
|
|
403
|
-
${
|
|
403
|
+
${cR(t.frontmatter.id,t.frontmatter.tags,n)}
|
|
404
404
|
</article>
|
|
405
|
-
`}}function
|
|
405
|
+
`}}function pR(){return`
|
|
406
406
|
<article class="document">
|
|
407
407
|
<p class="loading">Loading entry</p>
|
|
408
408
|
</article>
|
|
409
|
-
`}function
|
|
409
|
+
`}function _R(t){return`
|
|
410
410
|
<article class="document">
|
|
411
|
-
<p class="error-box">${Te(
|
|
411
|
+
<p class="error-box">${Te(t)}</p>
|
|
412
412
|
</article>
|
|
413
|
-
`}const jc=new Set;let Tr="entries";const
|
|
413
|
+
`}const jc=new Set;let Tr="entries";const gR=`
|
|
414
414
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
415
415
|
<circle cx="11" cy="11" r="6.5" />
|
|
416
416
|
<path d="m20 20-3.5-3.5" />
|
|
417
417
|
</svg>
|
|
418
|
-
`,
|
|
418
|
+
`,mR=`
|
|
419
419
|
<svg class="caret" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
420
420
|
<path d="m6 9 6 6 6-6" />
|
|
421
421
|
</svg>
|
|
422
|
-
`,
|
|
422
|
+
`,vR=`
|
|
423
423
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" width="14" height="14">
|
|
424
424
|
<path d="M6 6 18 18M18 6 6 18" />
|
|
425
425
|
</svg>
|
|
426
|
-
`,
|
|
426
|
+
`,bR=`
|
|
427
427
|
<svg viewBox="0 0 24 24" width="13" height="13" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
428
428
|
<circle cx="12" cy="5" r="2" />
|
|
429
429
|
<path d="M12 7v14M8 11H4a8 8 0 0 0 16 0h-4" />
|
|
430
430
|
</svg>
|
|
431
|
-
`;function
|
|
431
|
+
`;function SR(t,n,s,o=[],l=null,y){const b=t.length,c=wR(t),u=b===0?'<p class="empty-state">No wiki entries yet.</p>':Tr==="tags"?ER(t,n):xR(t,n),h=Tr==="tags"?`Tags · ${c}`:`Entries · ${b}`,v=Tr==="tags"?"tag-tree":"entry-list",f=Tr==="tags"?"Entries by tag":"All entries",C=RR(y??(typeof window<"u"?window.location.pathname:"")),x=C.startsWith("/queue"),A=C==="/index",E=C==="/log",p=C.startsWith("/conflicts"),S=s>0?`<span class="nav-drydock-badge">${s}</span>`:"";return`
|
|
432
432
|
<aside class="sidebar" id="sidebar">
|
|
433
433
|
<div class="sidebar-header">
|
|
434
434
|
<div class="sidebar-header-actions">
|
|
435
|
-
<button class="icon-button mobile-close" type="button" data-action="toggle-nav" aria-label="Close">${
|
|
435
|
+
<button class="icon-button mobile-close" type="button" data-action="toggle-nav" aria-label="Close">${vR}</button>
|
|
436
436
|
</div>
|
|
437
437
|
</div>
|
|
438
438
|
<button class="command-entry" type="button" data-action="open-command">
|
|
439
|
-
<span class="command-entry-label">${
|
|
439
|
+
<span class="command-entry-label">${gR}<span>Search entries</span></span>
|
|
440
440
|
<kbd>⌘K</kbd>
|
|
441
441
|
</button>
|
|
442
442
|
<div class="nav-drydock-section">
|
|
443
443
|
<a class="nav-drydock-link${x?" active":""}" href="${Ze(Oa())}">
|
|
444
|
-
<span class="nav-drydock-icon">${
|
|
444
|
+
<span class="nav-drydock-icon">${bR}</span>
|
|
445
445
|
<span class="nav-drydock-label">Drydock</span>
|
|
446
446
|
${S}
|
|
447
447
|
</a>
|
|
448
|
-
<a class="nav-drydock-link${A?" active":""}" href="${Ze(
|
|
448
|
+
<a class="nav-drydock-link${A?" active":""}" href="${Ze(a2())}">
|
|
449
449
|
<span class="nav-drydock-label">Index</span>
|
|
450
450
|
</a>
|
|
451
|
-
<a class="nav-drydock-link${E?" active":""}" href="${Ze(
|
|
451
|
+
<a class="nav-drydock-link${E?" active":""}" href="${Ze(Xb())}">
|
|
452
452
|
<span class="nav-drydock-label">Log</span>
|
|
453
453
|
</a>
|
|
454
|
-
<a class="nav-drydock-link${p?" active":""}" href="${Ze(
|
|
454
|
+
<a class="nav-drydock-link${p?" active":""}" href="${Ze(r2())}">
|
|
455
455
|
<span class="nav-drydock-label">Conflicts</span>
|
|
456
456
|
</a>
|
|
457
457
|
</div>
|
|
@@ -468,37 +468,37 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Mt=ge,rt=Le),De===void
|
|
|
468
468
|
${u}
|
|
469
469
|
</nav>
|
|
470
470
|
</aside>
|
|
471
|
-
`}function
|
|
471
|
+
`}function yR(t){if(jc.has(t)){jc.delete(t);return}jc.add(t)}function CR(t){Tr=t}function wR(t){const n=new Set;for(const s of t){if(s.tags.length===0){n.add("untagged");continue}for(const o of s.tags)n.add(o)}return n.size}function ER(t,n){return TR(t).map(o=>AR(o,n)).join("")}function xR(t,n){const s="en-US";return[...t].sort((l,y)=>l.title.localeCompare(y.title,s,{sensitivity:"base",numeric:!0})).map(l=>BS(l,n)).join("")}function TR(t){const n="en-US",s=new Map;for(const o of t){const l=o.tags.length>0?o.tags:["untagged"];for(const y of l){const b=s.get(y)??[];b.push(o),s.set(y,b)}}return[...s.entries()].map(([o,l])=>({tag:o,entries:l.sort((y,b)=>y.title.localeCompare(b.title,n,{sensitivity:"base",numeric:!0}))})).sort((o,l)=>o.tag.localeCompare(l.tag,n,{sensitivity:"base",numeric:!0}))}function AR(t,n){const s=jc.has(t.tag),o=s?"":t.entries.map(l=>BS(l,n)).join("");return`
|
|
472
472
|
<section class="tag-group" data-collapsed="${s?"true":"false"}">
|
|
473
|
-
<button class="tag-group-button" type="button" data-action="toggle-tag" data-tag="${Ze(
|
|
474
|
-
${
|
|
475
|
-
<span>${
|
|
476
|
-
<span class="count">${
|
|
473
|
+
<button class="tag-group-button" type="button" data-action="toggle-tag" data-tag="${Ze(t.tag)}">
|
|
474
|
+
${mR}
|
|
475
|
+
<span>${t.tag==="untagged"?"Untagged":Te(t.tag)}</span>
|
|
476
|
+
<span class="count">${t.entries.length}</span>
|
|
477
477
|
</button>
|
|
478
478
|
<div class="tag-group-list">${o}</div>
|
|
479
479
|
</section>
|
|
480
|
-
`}function
|
|
481
|
-
<a class="nav-entry${s}" href="${kr(
|
|
482
|
-
<span class="nav-entry-text">${Te(
|
|
480
|
+
`}function BS(t,n){const s=t.id===n?" active":"",o=Ze(t.title);return`
|
|
481
|
+
<a class="nav-entry${s}" href="${kr(t.id)}" data-entry-id="${Ze(t.id)}" title="${o}">
|
|
482
|
+
<span class="nav-entry-text">${Te(t.title)}</span>
|
|
483
483
|
</a>
|
|
484
|
-
`}function
|
|
484
|
+
`}function RR(t){const n=t===In||t===`${In}/`?"/":t.startsWith(`${In}/`)?t.slice(In.length)||"/":t,s=n.match(/^\/w\/[^/]+(\/.*)?$/);return s?s[1]??"/":n}const LR=`
|
|
485
485
|
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
486
486
|
<path d="M15 18 9 12l6-6" />
|
|
487
487
|
</svg>
|
|
488
|
-
`,
|
|
488
|
+
`,kR=`
|
|
489
489
|
<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
490
490
|
<path d="M5 4h11a3 3 0 0 1 3 3v9.5a3.5 3.5 0 0 1-3.5 3.5H8a3 3 0 0 1-3-3V4z" />
|
|
491
491
|
<path d="M9 9h6M9 13h6" />
|
|
492
492
|
</svg>
|
|
493
|
-
`;function
|
|
493
|
+
`;function MR(t){const n=t.ref??"";let s;return t.loading?s='<p class="loading">Loading source</p>':t.error?s=`<p class="error-box">Failed to load source — ${Te(t.error)}</p>`:t.content?s=`<div class="markdown-body">${Ua(t.content).html}</div>`:s='<p class="empty-state">Source is empty.</p>',`
|
|
494
494
|
<div class="raw-shell">
|
|
495
495
|
<header class="raw-header">
|
|
496
496
|
<a class="raw-back" href="/" data-action="navigate-home" aria-label="Back to Codex">
|
|
497
|
-
${
|
|
497
|
+
${LR}
|
|
498
498
|
<span>Codex</span>
|
|
499
499
|
</a>
|
|
500
500
|
<div class="raw-meta">
|
|
501
|
-
<span class="raw-glyph">${
|
|
501
|
+
<span class="raw-glyph">${kR}</span>
|
|
502
502
|
<div class="raw-meta-text">
|
|
503
503
|
<p class="eyebrow">Manifest · Raw Source</p>
|
|
504
504
|
<h1 class="raw-title">${Te(n)}</h1>
|
|
@@ -510,10 +510,10 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Mt=ge,rt=Le),De===void
|
|
|
510
510
|
${s}
|
|
511
511
|
</article>
|
|
512
512
|
</div>
|
|
513
|
-
`}function sp(
|
|
513
|
+
`}function sp(t,n){const s=t==="create_wiki"||!n,o=s?"+":"↻",l=s?"CREATE":"UPDATE";return`<span class="op-badge ${s?"op-badge--create":"op-badge--update"}" aria-label="${l}">
|
|
514
514
|
<span class="op-badge-glyph" aria-hidden="true">${o}</span>
|
|
515
515
|
<span class="op-badge-label">${l}</span>
|
|
516
|
-
</span>`}function
|
|
516
|
+
</span>`}function DR(t){const{tab:n,items:s,pendingCount:o,archivedCount:l,loading:y,error:b}=t;if(y&&s.length===0)return'<div class="queue-view"><p class="loading">Loading patch queue</p></div>';if(b)return`<div class="queue-view"><p class="error-box">Failed to load queue — ${Te(b)}</p></div>`;const c=s.length===0?OR(n):s.map(v=>BR(v)).join(""),u=o>0?`<span class="queue-badge">${o}</span>`:"",h=l>0?`<span class="queue-badge queue-badge--muted">${l}</span>`:"";return`
|
|
517
517
|
<div class="queue-view">
|
|
518
518
|
<div class="queue-header">
|
|
519
519
|
<p class="drydock-eyebrow">MANIFEST · DRYDOCK</p>
|
|
@@ -537,8 +537,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Mt=ge,rt=Le),De===void
|
|
|
537
537
|
${c}
|
|
538
538
|
</div>
|
|
539
539
|
</div>
|
|
540
|
-
`}function
|
|
541
|
-
<a class="queue-card" href="${Ze(
|
|
540
|
+
`}function OR(t){return`<p class="queue-empty">${t==="pending"?"No pending patches.":"No archived patches."}</p>`}function BR(t){const{id:n,meta:s,source:o,summary:l,op:y,target:b}=t,c=NR(s.status),u=eu(s.createdAt),h=s.warnings??[],v=h.slice(0,3).map(p=>`<span class="chip chip-muted">${Te(p)}</span>`).join(""),f=h.length>3?`<span class="chip chip-muted">+${h.length-3}</span>`:"",C=o==="archive"?`<span class="chip">${Te(s.status)}</span>`:"",x=y?sp(y,!0):"",A=l?`<p class="queue-card-summary">${Te(l)}</p>`:"",E=b?`<span class="queue-card-target">${Te(b)}</span>`:"";return`
|
|
541
|
+
<a class="queue-card" href="${Ze(n2(n))}">
|
|
542
542
|
${A}
|
|
543
543
|
<div class="queue-card-top">
|
|
544
544
|
<span class="queue-card-id">${Te(n)}</span>
|
|
@@ -554,20 +554,20 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Mt=ge,rt=Le),De===void
|
|
|
554
554
|
</div>
|
|
555
555
|
</div>
|
|
556
556
|
</a>
|
|
557
|
-
`}function
|
|
557
|
+
`}function NR(t){return`<span class="status-dot ${t==="pending"?"status-dot--pending":t==="accepted"?"status-dot--accepted":"status-dot--rejected"}" aria-label="${Ze(t)}"></span>`}const IR=`
|
|
558
558
|
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
559
559
|
<path d="M15 18 9 12l6-6" />
|
|
560
560
|
</svg>
|
|
561
|
-
`,
|
|
561
|
+
`,HR=`
|
|
562
562
|
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
563
563
|
<path d="M7 17 17 7M9 7h8v8" />
|
|
564
564
|
</svg>
|
|
565
|
-
`;function
|
|
565
|
+
`;function zR(t){const{current:n,loading:s,error:o}=t;return s?'<div class="queue-detail-view"><p class="loading">Loading patch</p></div>':o?`<div class="queue-detail-view"><p class="error-box">Failed to load patch — ${Te(o)}</p></div>`:n?$R(n,t):'<div class="queue-detail-view"><p class="empty-state">Patch not found.</p></div>'}function $R(t,n){const{patch:s,meta:o,wikiEntry:l,targetExists:y}=t,{frontmatter:b}=s,c=Ua(l.body),u=sp(b.op,y),h=o.rawSourceRef;return`
|
|
566
566
|
<div class="queue-detail-view">
|
|
567
567
|
<div class="queue-detail-layout">
|
|
568
568
|
<div class="queue-detail-main">
|
|
569
569
|
<a class="raw-back queue-back" href="${Ze(Oa())}" aria-label="Back to Drydock">
|
|
570
|
-
${
|
|
570
|
+
${IR}
|
|
571
571
|
<span>Drydock</span>
|
|
572
572
|
</a>
|
|
573
573
|
<div class="queue-detail-header">
|
|
@@ -581,17 +581,17 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Mt=ge,rt=Le),De===void
|
|
|
581
581
|
</article>
|
|
582
582
|
</div>
|
|
583
583
|
<aside class="queue-rail">
|
|
584
|
-
${
|
|
585
|
-
${
|
|
586
|
-
${
|
|
587
|
-
${
|
|
584
|
+
${UR(t,h)}
|
|
585
|
+
${FR(c.toc)}
|
|
586
|
+
${jR(t)}
|
|
587
|
+
${PR(t,n)}
|
|
588
588
|
</aside>
|
|
589
589
|
</div>
|
|
590
590
|
</div>
|
|
591
|
-
`}function
|
|
592
|
-
<a class="manifest-link queue-raw-link" href="${Ze(
|
|
591
|
+
`}function UR(t,n){const{patch:s,meta:o,targetExists:l}=t,{frontmatter:y}=s,b=sp(y.op,l),c=Cf(o.createdAt),u=eu(o.createdAt),h=qR(o.status),v=o.warnings??[],f=n?`<dd class="queue-dl-value">
|
|
592
|
+
<a class="manifest-link queue-raw-link" href="${Ze(Vb(n))}" data-raw-ref="${Ze(n)}">
|
|
593
593
|
<span class="manifest-ref">${Te(n)}</span>
|
|
594
|
-
<span class="manifest-arrow">${
|
|
594
|
+
<span class="manifest-arrow">${HR}</span>
|
|
595
595
|
</a>
|
|
596
596
|
</dd>`:'<dd class="queue-dl-value queue-dl-muted">None</dd>',C=v.length>0?`<dt class="queue-dl-key">Warnings</dt>
|
|
597
597
|
<dd class="queue-dl-value">
|
|
@@ -625,7 +625,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Mt=ge,rt=Le),De===void
|
|
|
625
625
|
${C}
|
|
626
626
|
</dl>
|
|
627
627
|
</div>
|
|
628
|
-
`}function
|
|
628
|
+
`}function PR(t,n){const{meta:s,source:o}=t;if(s.status!=="pending"||o!=="queue")return"";const{actionPending:l,actionError:y}=n,b=l?" disabled":"",c=Ze(s.id),u=y?`<p class="queue-action-error">${Te(y)}</p>`:"";return`
|
|
629
629
|
<div class="queue-rail-card queue-actions-card">
|
|
630
630
|
<div class="queue-rail-header">
|
|
631
631
|
<p class="drydock-eyebrow">ACTIONS</p>
|
|
@@ -655,7 +655,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Mt=ge,rt=Le),De===void
|
|
|
655
655
|
</form>
|
|
656
656
|
${u}
|
|
657
657
|
</div>
|
|
658
|
-
`}function
|
|
658
|
+
`}function jR(t){const n=t.patchSet;return!n||n.members.length===0?"":`
|
|
659
659
|
<div class="queue-rail-card">
|
|
660
660
|
<div class="queue-rail-header">
|
|
661
661
|
<p class="drydock-eyebrow">MANIFEST · DRYDOCK</p>
|
|
@@ -674,25 +674,25 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Mt=ge,rt=Le),De===void
|
|
|
674
674
|
`).join("")}
|
|
675
675
|
</ul>
|
|
676
676
|
</div>
|
|
677
|
-
`}function
|
|
677
|
+
`}function FR(t){return t.length===0?"":`
|
|
678
678
|
<div class="queue-rail-card queue-toc-card">
|
|
679
679
|
<div class="queue-rail-header">
|
|
680
680
|
<p class="drydock-eyebrow">CONTENTS</p>
|
|
681
681
|
</div>
|
|
682
682
|
<nav class="queue-toc-nav" aria-label="Table of contents">
|
|
683
|
-
${
|
|
683
|
+
${t.map(s=>`<a class="queue-toc-link queue-toc-level-${s.level}" href="#${Ze(s.id)}">${Te(s.text)}</a>`).join("")}
|
|
684
684
|
</nav>
|
|
685
685
|
</div>
|
|
686
|
-
`}function
|
|
686
|
+
`}function qR(t){return`<span class="status-dot ${t==="pending"?"status-dot--pending":t==="accepted"?"status-dot--accepted":"status-dot--rejected"}" aria-label="${Ze(t)}"></span>`}function WR(t){return t.length===0?"":`
|
|
687
687
|
<nav class="toc-panel" aria-label="Table of contents">
|
|
688
688
|
<h2>Contents</h2>
|
|
689
|
-
${
|
|
689
|
+
${t.map(n=>`
|
|
690
690
|
<a class="toc-level-${n.level}" href="#${Ze(n.id)}" data-toc-id="${Ze(n.id)}">
|
|
691
691
|
${Te(n.text)}
|
|
692
692
|
</a>
|
|
693
693
|
`).join("")}
|
|
694
694
|
</nav>
|
|
695
|
-
`}function
|
|
695
|
+
`}function GR(t){const n=t.entries.join(`
|
|
696
696
|
|
|
697
697
|
`),s=Ua(n);return`
|
|
698
698
|
<article class="document">
|
|
@@ -701,34 +701,34 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Mt=ge,rt=Le),De===void
|
|
|
701
701
|
<h1>Log</h1>
|
|
702
702
|
<div class="log-controls">
|
|
703
703
|
${[10,20,50,100].map(l=>`
|
|
704
|
-
<a class="chip ${l===
|
|
704
|
+
<a class="chip ${l===t.limit?"chip-tag":""}" href="${Xb(l)}">${l}</a>
|
|
705
705
|
`).join("")}
|
|
706
706
|
</div>
|
|
707
707
|
</header>
|
|
708
|
-
<p class="empty-state">${`Latest ${
|
|
708
|
+
<p class="empty-state">${`Latest ${t.limit} of ${t.totalEntries} entries`}</p>
|
|
709
709
|
<div class="markdown-body">${s.html}</div>
|
|
710
710
|
</article>
|
|
711
|
-
`}const wf=new Set,$s={tab:"pending",items:[],pendingCount:0,archivedCount:0,current:null,loading:!1,error:null,actionPending:!1,actionError:null};function iu(){return $s}function
|
|
712
|
-
${
|
|
711
|
+
`}const wf=new Set,$s={tab:"pending",items:[],pendingCount:0,archivedCount:0,current:null,loading:!1,error:null,actionPending:!1,actionError:null};function iu(){return $s}function KR(t){return wf.add(t),()=>wf.delete(t)}async function YR(t){Yi({tab:t,loading:!0,error:null,current:null});try{const n=await lu(t);Yi({items:n.items,pendingCount:n.pendingCount,archivedCount:n.archivedCount,loading:!1}),Kf(n.pendingCount)}catch(n){Yi({loading:!1,error:hu(n)})}}async function VR(t){Yi({loading:!0,error:null,current:null});try{const n=await Y5(t);Yi({current:n,loading:!1})}catch(n){Yi({loading:!1,error:hu(n)})}}function Ms(){Yi({items:[],current:null,error:null,loading:!1,actionPending:!1,actionError:null})}async function XR(){if($s.actionPending)return;const t=$s.current?.meta.id;if(t){Yi({actionPending:!0,actionError:null});try{await V5(t);const n=await lu("pending");Yi({actionPending:!1,pendingCount:n.pendingCount,archivedCount:n.archivedCount}),Kf(n.pendingCount),Is(Oa("archived"))}catch(n){Yi({actionPending:!1,actionError:hu(n)})}}}async function ZR(t){if($s.actionPending)return;const n=$s.current?.meta.id;if(!n)return;const s=t.trim();if(!s||s.length>256){Yi({actionError:s?"Rejection reason must be 256 characters or less.":"Please enter a rejection reason."});return}Yi({actionPending:!0,actionError:null});try{await X5(n,s);const o=await lu("pending");Yi({actionPending:!1,pendingCount:o.pendingCount,archivedCount:o.archivedCount}),Kf(o.pendingCount),Is(Oa("archived"))}catch(o){Yi({actionPending:!1,actionError:hu(o)})}}function Yi(t){Object.assign($s,t);for(const n of wf)n($s)}function hu(t){return t instanceof Error?t.message:String(t)}const Ef=new Set,cs={ref:null,content:null,loading:!1,error:null};function QR(){return cs}function JR(t){return Ef.add(t),()=>Ef.delete(t)}async function eL(t){if(!(cs.ref===t&&cs.content!==null&&!cs.error)){Fc({ref:t,content:null,loading:!0,error:null});try{const n=await K5(t);if(cs.ref!==t)return;Fc({content:n,loading:!1})}catch(n){if(cs.ref!==t)return;Fc({loading:!1,error:tL(n)})}}}function rs(){Fc({ref:null,content:null,loading:!1,error:null})}function Fc(t){Object.assign(cs,t);for(const n of Ef)n(cs)}function tL(t){return t instanceof Error?t.message:String(t)}let nu,xf=!1;function iL(t,n={}){nu=t,xf=!1,document.documentElement.lang="en",i2(),b2();const s=c2(()=>Ns()),o=JR(()=>Ns()),l=KR(()=>Ns()),y=t2(b=>{NS(b)});return document.addEventListener("click",y0),document.addEventListener("submit",C0),BA(t),n.initialWorkspaceId&&ff()!==n.initialWorkspaceId&&e2(Pv(n.initialWorkspaceId)),nL(),{navigateToWorkspace(b){ff()!==b&&Is(Pv(b))},destroy(){s(),o(),l(),y(),document.removeEventListener("click",y0),document.removeEventListener("submit",C0),t.innerHTML=""}}}async function nL(){Ns(),await u2(),await NS(ll())}async function NS(t){if(t.name==="entry"){Ms(),rs(),await h2(t.id);return}if(t.name==="raw"){Ms(),await eL(t.ref);return}if(t.name==="queue"){$d(),rs(),await YR(t.tab);return}if(t.name==="queue-detail"){$d(),rs(),await VR(t.patchId);return}if(t.name==="index-md"){Ms(),rs(),await d2();return}if(t.name==="log"){Ms(),rs(),await f2(t.limit);return}if(t.name==="conflicts"){Ms(),rs(),await p2();return}if(t.name==="conflict-detail"){Ms(),rs(),await _2(t.id);return}$d(),rs(),Ms(),Ns()}function Ns(){const t=ll();if(t.name==="raw"){rL();return}sL(Pc(),t)}function rL(){nu.innerHTML=`
|
|
712
|
+
${MR(QR())}
|
|
713
713
|
<div class="toast" id="toast" aria-live="polite"></div>
|
|
714
|
-
`}function
|
|
714
|
+
`}function sL(t,n){const s=n.name==="entry"?n.id:null,o=n.name==="queue"||n.name==="queue-detail",l=t.currentEntry?fR(t.currentEntry,t.index):null;v2(t.index,t.recentIds),nu.innerHTML=`
|
|
715
715
|
<div class="app-shell${o?" app-shell--wide":""}">
|
|
716
716
|
<button class="mobile-menu" type="button" data-action="toggle-nav" aria-label="Open menu">
|
|
717
717
|
<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
718
718
|
<path d="M4 7h16M4 12h16M4 17h10" />
|
|
719
719
|
</svg>
|
|
720
720
|
</button>
|
|
721
|
-
${
|
|
721
|
+
${SR(t.index,s,t.pendingPatchCount,t.workspaces,t.currentWorkspaceId,window.location.pathname)}
|
|
722
722
|
<main class="content">
|
|
723
|
-
${
|
|
723
|
+
${aL(t,n,l)}
|
|
724
724
|
</main>
|
|
725
725
|
<div class="rail">
|
|
726
|
-
${
|
|
726
|
+
${oL(t,n,l)}
|
|
727
727
|
</div>
|
|
728
728
|
</div>
|
|
729
729
|
<div class="toast" id="toast" aria-live="polite"></div>
|
|
730
|
-
`,xf?nu.classList.add("is-revealed"):xf=!0}function
|
|
731
|
-
${
|
|
732
|
-
${s?
|
|
733
|
-
`}function y0(
|
|
734
|
-
`);for(let s=n.length-1;s>=0;s--){const o=n[s]?.trim();if(o)return o}return null}const _L=56;function gL(i,n){const s=te.useRef(null),o=te.useRef(!0),[l,y]=te.useState(!0),b=te.useCallback(u=>{o.current!==u&&(o.current=u,y(u))},[]);te.useEffect(()=>{const u=s.current;if(!u)return;const h=()=>{const v=u.scrollHeight-u.scrollTop-u.clientHeight;b(v<=_L)};return u.addEventListener("scroll",h,{passive:!0}),()=>u.removeEventListener("scroll",h)},[b]),te.useLayoutEffect(()=>{b(!0);const u=s.current;u&&(u.scrollTop=u.scrollHeight)},[i,b]),te.useLayoutEffect(()=>{const u=s.current;!u||!o.current||(u.scrollTop=u.scrollHeight)},[n]);const c=te.useCallback(()=>{const u=s.current;u&&(u.scrollTop=u.scrollHeight,u.focus({preventScroll:!0}),b(!0))},[b]);return{containerRef:s,pinned:l,jumpToLatest:c}}const T0=400,mL=["text","fallbackText","fallbackThought"],vL=te.memo(function({events:n}){return z.jsxs("ol",{className:"timeline","aria-label":"Raw event timeline",children:[n.length===0?z.jsx("li",{className:"timeline-empty",children:"No events observed."}):null,n.map((s,o)=>{const l=n[n.length-1-o];return l?z.jsx(bL,{event:l},l.id):null})]})}),bL=te.memo(function({event:n}){return z.jsxs("li",{className:"timeline-row",children:[z.jsx("time",{className:"timeline-time",children:NS(n.at)}),z.jsx("span",{className:"timeline-type",children:n.type}),z.jsx("code",{className:"timeline-payload",children:SL(n.event)})]})});function SL(i){const n={...i};delete n.type;for(const o of mL){const l=n[o];typeof l=="string"&&(n[o]=l.length>60?`${l.slice(0,60)}… (${l.length} chars)`:l)}const s=JSON.stringify(n);return s.length>T0?`${s.slice(0,T0)}…`:s}const yL=te.memo(function({track:n}){const s=Pa(n.status),o=n.status==="stream",l=n.sentTextLength>n.text.length||n.sentThoughtLength>n.thought.length,y=n.sentTextLength+n.sentThoughtLength;return z.jsxs("article",{className:`track-card track-card--${s}`,children:[z.jsxs("header",{className:"track-head",children:[z.jsx("span",{className:`status-dot status-dot--${s}`,"aria-hidden":"true"}),z.jsx("h3",{className:"track-name",children:n.displayName}),n.displayCli?z.jsx("span",{className:"track-tag",children:n.displayCli}):null,n.model?z.jsx("span",{className:"track-tag track-tag--dim",children:n.model}):null,n.effort?z.jsx("span",{className:"track-tag track-tag--dim",children:n.effort}):null,z.jsx("span",{className:`track-status track-status--${s}`,children:dL(n.status)})]}),n.subtitle?z.jsx("p",{className:"track-subtitle",children:n.subtitle}):null,n.requestPreview?z.jsx(CL,{preview:n.requestPreview}):null,n.thought?z.jsx(wL,{thought:n.thought,streaming:o&&!n.text}):null,z.jsx(EL,{track:n}),n.text?z.jsx("div",{className:"track-output","data-streaming":o||void 0,children:z.jsxs("pre",{className:"track-text",children:[n.text,o?z.jsx("span",{className:"stream-caret","aria-hidden":"true"}):null]})}):o||n.status==="conn"||n.status==="queued"?z.jsxs("p",{className:"track-waiting",children:[z.jsx("span",{className:"stream-caret","aria-hidden":"true"})," awaiting output"]}):null,l?z.jsxs("p",{className:"track-notice",children:["Output partially retained — ",y.toLocaleString()," chars emitted in total."]}):null,n.error?z.jsx("p",{className:"track-error",children:n.error}):null]})});function CL({preview:i}){return z.jsxs("p",{className:"track-request",title:i,children:[z.jsx("span",{className:"track-request-mark","aria-hidden":"true",children:"▸"}),i]})}function wL({thought:i,streaming:n}){const[s,o]=te.useState(!1);return z.jsxs("div",{className:`thought-fold ${s?"is-open":""}`,children:[z.jsxs("button",{type:"button",className:"thought-toggle",onClick:()=>o(l=>!l),"aria-expanded":s,children:[z.jsx("span",{className:"thought-chevron","aria-hidden":"true",children:s?"▾":"▸"}),"reasoning",n?z.jsx("span",{className:"stream-caret stream-caret--dim","aria-hidden":"true"}):null]}),s?z.jsx("pre",{className:"thought-text",children:i}):null]})}function EL({track:i}){return i.tools.length===0?null:z.jsx("ul",{className:"tool-rail","aria-label":"Tool calls",children:i.tools.map(n=>z.jsxs("li",{className:`tool-chip tool-chip--${xL(n.status)}`,children:[z.jsx("span",{className:"tool-chip-glyph","aria-hidden":"true",children:"⚙"}),z.jsx("span",{className:"tool-chip-title",children:n.title}),n.status?z.jsx("span",{className:"tool-chip-status",children:n.status}):null]},n.key))})}function xL(i){const n=i.toLowerCase();return n.includes("error")||n.includes("fail")?"bad":n.includes("done")||n.includes("ok")||n.includes("complete")?"ok":n.includes("run")||n.includes("progress")||n.includes("stream")?"live":"idle"}function TL({job:i,timelineOpen:n}){const{containerRef:s,pinned:o,jumpToLatest:l}=gL(i?.jobId??"none",i?.lastEventId??0);return i?z.jsxs("main",{className:"stage",children:[z.jsx(AL,{job:i}),z.jsxs("div",{className:"stage-stream",children:[z.jsx("div",{className:"stage-scroll",ref:s,tabIndex:-1,children:z.jsxs("div",{className:"stage-content",children:[i.trackOrder.length===0?z.jsxs("p",{className:"stage-waiting",children:[z.jsx("span",{className:"stream-caret","aria-hidden":"true"})," waiting for track registration"]}):i.trackOrder.map(y=>{const b=i.tracks[y];return b?z.jsx(yL,{track:b},`${i.jobId}:${y}`):null}),i.summary?z.jsx(RL,{summary:i.summary,status:i.status,error:i.error}):null]})}),o?null:z.jsx("button",{type:"button",className:"follow-button",onClick:l,children:"↓ Follow stream"})]}),z.jsxs("section",{className:`timeline-dock ${n?"is-open":""}`,children:[z.jsxs("button",{type:"button",className:"timeline-toggle",onClick:lE,"aria-expanded":n,children:[z.jsx("span",{className:"timeline-chevron","aria-hidden":"true",children:n?"▾":"▴"}),"Event timeline",z.jsx("span",{className:"timeline-count",children:i.recentEvents.length})]}),n?z.jsx(vL,{events:i.recentEvents}):null]})]}):z.jsx("main",{className:"stage",children:z.jsxs("div",{className:"stage-idle",children:[z.jsx("p",{className:"stage-idle-mark","aria-hidden":"true",children:"▵"}),z.jsx("h2",{children:"Standing by"}),z.jsx("p",{children:"Select a job from the left rail, or dispatch carriers from a Fleet session."})]})})}const AL=te.memo(function({job:n}){const s=Pa(n.status),o=n.startedAt?uL(n.startedAt,n.finishedAt??n.updatedAt):null;return z.jsxs("header",{className:"job-head",children:[z.jsxs("div",{className:"job-head-id",children:[z.jsx("span",{className:`status-dot status-dot--${s} status-dot--lg`,"aria-hidden":"true"}),z.jsxs("div",{children:[z.jsx("h2",{className:"job-title",children:n.label??Tf(n.jobId)}),z.jsxs("p",{className:"job-meta",children:[z.jsx("span",{className:`job-status job-status--${s}`,children:Af(n.status)}),n.ownerCarrierId?z.jsxs("span",{children:["· ",n.ownerCarrierId]}):null,n.kind?z.jsxs("span",{children:["· ",n.kind]}):null,o?z.jsxs("span",{children:["· ",o]}):null,n.startedAt?z.jsxs("span",{children:["· started ",NS(n.startedAt)]}):null]})]})]}),z.jsx("code",{className:"job-id",title:n.jobId,children:Tf(n.jobId)})]})});function RL({summary:i,status:n,error:s}){return z.jsxs("aside",{className:`job-summary job-summary--${Pa(n)}`,children:[z.jsx("p",{className:"job-summary-eyebrow",children:n==="error"?"Finalized with error":"Finalized"}),z.jsx("p",{className:"job-summary-text",children:i}),s?z.jsx("p",{className:"job-summary-error",children:s}):null]})}function LL({state:i}){const n=_E(i);return te.useEffect(()=>{const s=o=>{o.key==="Escape"&&wd()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[]),n?z.jsxs("div",{className:"job-overlay",role:"dialog","aria-modal":"true","aria-label":"Carrier job stream",children:[z.jsx("button",{type:"button",className:"job-overlay-scrim",onClick:wd,"aria-label":"Close job stream"}),z.jsxs("div",{className:"job-overlay-card",children:[z.jsx("button",{type:"button",className:"job-overlay-close",onClick:wd,"aria-label":"Close job stream",children:"×"}),z.jsx(TL,{job:n,timelineOpen:i.timelineOpen})]})]}):null}function kL({creating:i,error:n,hasTheaters:s,activeTheaterId:o}){const l=s?o?"No operations in this Theater":"Choose a Theater":"Add a Theater",y=s?o?"Launch an operation from the Operations sidebar.":"Theater-scoped operations and carrier activity will appear here.":"Use the top bar Theater control to add a project root.";return z.jsxs("section",{className:"operations-landing","aria-label":"Operations workspace landing",children:[z.jsx("div",{className:"operations-landing-mark","aria-hidden":"true"}),z.jsxs("div",{children:[z.jsx("p",{className:"operations-landing-eyebrow",children:"Operation"}),z.jsx("h1",{children:l}),z.jsx("p",{children:y})]}),z.jsx("p",{className:`operations-landing-status ${i?"is-live":""}`,children:i?"Launching operation":"No terminal session selected"}),n?z.jsx("p",{className:"operations-landing-error",children:n}):null]})}function ML({state:i}){const n=$f(i),s=async()=>{if(!(i.creatingTerminalSession||i.addingTheater||!i.activeTheaterId)){sE();try{aE(await Nw(i.activeTheaterId))}catch(o){oE(o instanceof Error?o.message:String(o))}}};return z.jsxs("nav",{className:"sidebar","aria-label":"Operation sessions and carrier jobs",children:[z.jsxs("div",{className:"sidebar-heading",children:[z.jsx("p",{className:"sidebar-eyebrow",children:"Operations"}),z.jsx("button",{type:"button",className:"workspace-add-button",onClick:s,disabled:i.creatingTerminalSession||i.addingTheater||!i.activeTheaterId,"aria-label":"Launch operation",children:z.jsx(NL,{})})]}),n.length>0?z.jsx("ol",{className:"session-list",children:n.map(o=>{const l=i.sessions[o];return l?z.jsx(DL,{session:l,active:i.activeTerminalSessionId===o,jobs:mE(i,l),selectedJobId:i.selectedJobId},o):null})}):null,i.terminalSessionError?z.jsx("p",{className:"sidebar-error",children:i.terminalSessionError}):null,n.length===0?z.jsxs("p",{className:"sidebar-empty",children:[i.activeTheaterId?"No operations in this Theater.":"No Theaters registered.",z.jsx("br",{}),i.activeTheaterId?"Use + to launch one here.":"Add a Theater from the top bar."]}):null]})}const DL=te.memo(function({session:n,active:s,jobs:o,selectedJobId:l}){const[y,b]=te.useState(!1),[c,u]=te.useState(""),h=te.useRef(null),v=te.useRef(!1),f=te.useRef(!1),x=o.filter(({job:w})=>!Jo(w.status)).length>0||n.status==="registered"||n.status==="live"||n.status==="terminal-only",A=IS(n),E=[...o].sort((w,R)=>Number(Jo(w.job.status))-Number(Jo(R.job.status)));te.useEffect(()=>{y&&(h.current?.focus(),h.current?.select())},[y]);const p=()=>{f.current=!1,u(A),b(!0)},S=()=>{f.current=!0,b(!1),u("")},_=async()=>{if(!v.current){v.current=!0;try{ib(await Iw(n.sessionId,c))}catch(w){uE(w instanceof Error?w.message:String(w))}finally{v.current=!1,f.current=!0,b(!1)}}},g=w=>{if(w.key==="Enter"){w.preventDefault(),_();return}w.key==="Escape"&&(w.preventDefault(),S())};return z.jsxs("li",{className:`session-item ${s?"is-active":""}`,children:[z.jsxs("div",{className:"session-row-shell",children:[y?z.jsxs("div",{className:`session-row session-row-edit ${s?"is-active":""}`,children:[z.jsx("span",{className:`tenant-beacon ${x?"is-live":""}`,"aria-hidden":"true"}),z.jsx("input",{ref:h,className:"session-rename-input",value:c,"aria-label":`${A} 이름 변경`,onChange:w=>u(w.target.value),onKeyDown:g,onBlur:()=>{if(f.current){f.current=!1;return}_()}})]}):z.jsxs("button",{type:"button",className:`session-row ${s?"is-active":""}`,onClick:()=>rE(n.sessionId),onDoubleClick:p,"aria-current":s||void 0,"aria-label":`Operation ${A}`,children:[z.jsx("span",{className:`tenant-beacon ${x?"is-live":""}`,"aria-hidden":"true"}),z.jsx("span",{className:"tenant-row-text",children:z.jsx("span",{className:"tenant-label",children:A})}),!s&&o.length>0?z.jsx("span",{className:"tenant-count",children:o.length}):null]}),z.jsx("button",{type:"button",className:"session-close",onClick:()=>{BL(n.sessionId)},"aria-label":`Terminate operation ${A}`,title:"Terminate operation",children:z.jsx(IL,{})})]}),s?z.jsx("ol",{className:"session-job-list",children:E.length>0?E.map(({job:w})=>z.jsx(OL,{job:w,active:w.jobId===l},w.jobId)):z.jsx("li",{className:"job-list-empty",children:"No carrier jobs in this session."})}):null]})}),OL=te.memo(function({job:n,active:s}){const o=Pa(n.status),l=fL(n);return z.jsx("li",{children:z.jsxs("button",{type:"button",className:`job-row ${s?"is-active":""}`,onClick:()=>hE(n.jobId),"aria-current":s||void 0,children:[z.jsx("span",{className:`status-dot status-dot--${o}`,"aria-hidden":"true"}),z.jsxs("span",{className:"job-row-text",children:[z.jsx("span",{className:"job-row-label",children:n.label??Tf(n.jobId)}),l?z.jsx("span",{className:"job-row-stream",children:l}):null,z.jsx("span",{className:"job-row-meta",children:n.ownerCarrierId?`${hL(n.ownerCarrierId)} · ${Af(n.status)}`:Af(n.status)})]})]})})});async function BL(i){try{await V0(i)}catch(n){cE(n instanceof Error?n.message:String(n));return}rb(i)}function NL(){return z.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:z.jsx("path",{d:"M8 3.4v9.2M3.4 8h9.2",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})}function IL(){return z.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:z.jsx("path",{d:"M4.6 4.6 11.4 11.4M11.4 4.6 4.6 11.4",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})}function HL({state:i}){const n=i.activeTerminalSessionId&&$f(i).includes(i.activeTerminalSessionId)?i.activeTerminalSessionId:null;return z.jsxs("div",{className:"console-body",children:[z.jsx(ML,{state:i}),z.jsx("main",{className:"operations-terminal-stage",children:n?z.jsxs(z.Fragment,{children:[z.jsx($b,{sessionId:n,onExit:()=>rb(n)},n),z.jsx(LL,{state:i})]}):z.jsx(kL,{creating:i.creatingTerminalSession,error:i.terminalSessionError,hasTheaters:i.theaters.length>0,activeTheaterId:i.activeTheaterId})})]})}function zL(i){return{activeTheater:PL(i),readiness:UL(i,i.activeTheaterId),theaters:$L(i),connection:i.connection,connectionError:i.connectionError}}function $L(i){return i.theaters.map(n=>{const s=ap(i,n.id),o=op(i,n.id),l=lp(i,o);return{id:n.id,label:n.label,hasWiki:n.hasWiki,activeAdmiralCount:n.activeAdmiralCount,terminalSessionCount:s.length,liveJobCount:l.filter(y=>Pa(y.status)==="live").length,lastActivityAt:HS([Date.parse(n.lastOpenedAt),...s.map(y=>y.createdAt),...o.map(y=>y.createdAt),...l.map(y=>y.updatedAt)]),active:n.id===i.activeTheaterId}})}function UL(i,n){const s=n?ap(i,n):[],o=n?op(i,n):[],l=lp(i,o),y=l.filter(h=>Pa(h.status)==="live").length,b=l.filter(h=>Jo(h.status)&&h.status==="done").length,c=l.filter(h=>Jo(h.status)&&(h.status==="error"||h.status==="aborted")).length,u=i.activeTerminalSessionId?i.sessions[i.activeTerminalSessionId]:void 0;return{activeSessionLabel:u&&n&&u.theaterId===n?IS(u):"No active session",terminalSessionCount:s.length,liveJobCount:y,completedJobCount:b,failedJobCount:c,emptyState:jL(i,s,l)}}function PL(i){const n=i.theaters.find(y=>y.id===i.activeTheaterId);if(!n)return null;const s=ap(i,n.id),o=op(i,n.id),l=lp(i,o);return{id:n.id,label:n.label,hasWiki:n.hasWiki,activeAdmiralCount:n.activeAdmiralCount,terminalSessionCount:s.length,registeredTenantCount:o.filter(y=>y.status!=="deregistered").length,deregisteredTenantCount:o.filter(y=>y.status==="deregistered").length,lastActivityAt:HS([Date.parse(n.lastOpenedAt),...s.map(y=>y.createdAt),...o.map(y=>y.createdAt),...l.map(y=>y.updatedAt)])}}function ap(i,n){return i.sessionOrder.map(s=>i.sessions[s]).filter(s=>s!==void 0&&s.theaterId===n)}function op(i,n){return i.tenants.filter(s=>s.theaterId===n)}function lp(i,n){const s=[];for(const o of n){const l=i.tenantJobs[o.tenantId];if(l)for(const y of l.jobOrder){const b=l.jobs[y];b&&s.push(b)}}return s}function jL(i,n,s){return i.theaters.length===0?"no-theaters":n.length===0?"no-sessions":s.length===0?"no-jobs":null}function HS(i){const n=i.filter(s=>Number.isFinite(s));return n.length===0?null:Math.max(...n)}async function FL(i,n){const[s,o,l,y]=await Promise.all([Oc(i,"/index",n),Oc(i,"/queue?status=all",n),Oc(i,"/conflicts",n),Oc(i,"/log?limit=3",n)]);return{entryCount:Array.isArray(s)?s.length:0,pendingQueueCount:typeof o.pendingCount=="number"?o.pendingCount:0,archivedQueueCount:typeof o.archivedCount=="number"?o.archivedCount:0,openConflictCount:Array.isArray(l)?l.length:0,logEntryCount:typeof y.totalEntries=="number"?y.totalEntries:Array.isArray(y.entries)?y.entries.length:0,latestLogStatus:Array.isArray(y.entries)&&y.entries.length>0?"available":"empty"}}async function Oc(i,n,s){const o=n.startsWith("/")?n:`/${n}`,l=await fetch(`/console/codex/w/${encodeURIComponent(i)}/api${o}`,{signal:s});if(!l.ok)throw new cn(l.status,l.statusText||`HTTP ${l.status}`);return l.json()}const Bc={loading:!1,value:null,error:null},qL=15e3;function WL({state:i}){const n=zL(i),s=n.activeTheater,[o,l]=te.useState(Bc),[y,b]=te.useState(Bc),[c,u]=te.useState(Bc);return te.useEffect(()=>{if(!s?.hasWiki){l(Bc);return}const h=new AbortController;return l({loading:!0,value:null,error:null}),FL(s.id,h.signal).then(v=>l({loading:!1,value:v,error:null})).catch(v=>{h.signal.aborted||l({loading:!1,value:null,error:v instanceof Error?v.message:String(v)})}),()=>h.abort()},[s?.hasWiki,s?.id]),te.useEffect(()=>{const h=new AbortController;return b(v=>({loading:!0,value:v.value,error:null})),Dw(s?.id??null,h.signal).then(v=>b({loading:!1,value:v,error:null})).catch(v=>{h.signal.aborted||b({loading:!1,value:null,error:v instanceof Error?v.message:String(v)})}),()=>h.abort()},[s?.id]),te.useEffect(()=>{const h=new AbortController,v=()=>{u(C=>({loading:!0,value:C.value,error:null})),Ow(h.signal).then(C=>u({loading:!1,value:C,error:null})).catch(C=>{h.signal.aborted||u(x=>({loading:!1,value:x.value,error:C instanceof Error?C.message:String(C)}))})};v();const f=window.setInterval(v,qL);return()=>{window.clearInterval(f),h.abort()}},[]),z.jsxs("main",{className:"welcome-page",children:[z.jsxs("section",{className:"bridge-matrix","aria-labelledby":"bridge-matrix-title",children:[z.jsxs("div",{className:"bridge-section-heading",children:[z.jsx("p",{className:"bridge-kicker",children:"Theater Capability Matrix"}),z.jsx("h3",{id:"bridge-matrix-title",children:"Registered Theaters"})]}),z.jsxs("div",{className:"bridge-matrix-table",role:"table","aria-label":"Theater capability matrix",children:[z.jsxs("div",{className:"bridge-matrix-row bridge-matrix-head",role:"row",children:[z.jsx("span",{role:"columnheader",children:"Theater"}),z.jsx("span",{role:"columnheader",children:"Codex"}),z.jsx("span",{role:"columnheader",children:"Active"}),z.jsx("span",{role:"columnheader",children:"Terminals"}),z.jsx("span",{role:"columnheader",children:"Updated"})]}),n.theaters.length>0?n.theaters.map(h=>z.jsx(VL,{theater:h},h.id)):z.jsx("p",{className:"bridge-matrix-empty",children:"No Theaters registered."})]})]}),z.jsxs("section",{className:"bridge-carriers","aria-labelledby":"bridge-carriers-title",children:[z.jsxs("div",{className:"bridge-section-heading",children:[z.jsx("p",{className:"bridge-kicker",children:"Carrier Readiness Matrix"}),z.jsx("h3",{id:"bridge-carriers-title",children:"Carrier roster"})]}),z.jsx(YL,{carriers:c})]}),z.jsxs("section",{className:"bridge-knowledge","aria-labelledby":"bridge-knowledge-title",children:[z.jsxs("div",{className:"bridge-section-heading",children:[z.jsx("p",{className:"bridge-kicker",children:"Knowledge Readiness Panel"}),z.jsx("h3",{id:"bridge-knowledge-title",children:"Codex readiness"})]}),z.jsx(GL,{activeTheater:s,knowledge:o})]}),z.jsxs("section",{className:"bridge-health","aria-labelledby":"bridge-health-title",children:[z.jsxs("div",{className:"bridge-section-heading",children:[z.jsx("p",{className:"bridge-kicker",children:"System Information"}),z.jsx("h3",{id:"bridge-health-title",children:"Runtime status"})]}),z.jsx(KL,{health:y})]})]})}function GL({activeTheater:i,knowledge:n}){if(!i)return z.jsx("div",{className:"bridge-empty",children:z.jsx("p",{children:"Add a Theater to inspect Codex readiness."})});if(!i.hasWiki)return z.jsx("div",{className:"bridge-empty",children:z.jsx("p",{children:"Codex unavailable for this Theater."})});if(n.error)return z.jsx("div",{className:"bridge-empty bridge-empty--warn",children:z.jsx("p",{children:"Codex summary degraded."})});const s=n.value,o=[{label:"Entries",value:s?String(s.entryCount):"…",caption:"Indexed knowledge entries"},{label:"Pending",value:s?String(s.pendingQueueCount):"…",caption:"Drydock queue"},{label:"Archived",value:s?String(s.archivedQueueCount):"…",caption:"Archived decisions"},{label:"Conflicts",value:s?String(s.openConflictCount):"…",caption:"Open conflict files",tone:s&&s.openConflictCount>0?"warn":void 0},{label:"Log",value:s?s.latestLogStatus:n.loading?"loading":"empty",caption:s?`${s.logEntryCount} total entries`:"Latest log tail",tone:s?.latestLogStatus==="available"?"good":void 0}];return z.jsx("div",{className:"bridge-knowledge-grid",children:o.map(l=>z.jsx(zS,{metric:l},l.label))})}function KL({health:i}){const n=i.value,s=[{label:"Version",value:n?.version??"…",caption:"Console runtime"},{label:"Channel",value:n?.channel??"…",caption:"Release channel"},{label:"Port",value:n?String(n.port):"…",caption:"Loopback listener"},{label:"Codex",value:n?.wikiServerStatus??"unknown",caption:"Active Theater status",tone:n?.wikiServerStatus==="available"?"good":n?.wikiServerStatus==="unavailable"?"bad":void 0},{label:"Observer",value:n?`${n.workspaces}/${n.jobs}`:i.loading?"loading":"unknown",caption:"Workspaces / jobs"}];return z.jsxs(z.Fragment,{children:[z.jsx("div",{className:"bridge-health-strip",children:s.map(o=>z.jsx(zS,{metric:o},o.label))}),i.error?z.jsx("p",{className:"bridge-health-error",children:"System health unavailable."}):null]})}function YL({carriers:i}){if(i.error)return z.jsx("div",{className:"bridge-empty bridge-empty--warn",children:z.jsx("p",{children:"Carrier readiness degraded."})});const n=i.value??[];return n.length===0?z.jsx("div",{className:"bridge-empty",children:z.jsx("p",{children:i.loading?"Loading carrier readiness.":"No carrier readiness entries available."})}):z.jsxs("div",{className:"bridge-carrier-table",role:"table","aria-label":"Carrier readiness matrix",children:[z.jsxs("div",{className:"bridge-carrier-row bridge-carrier-head",role:"row",children:[z.jsx("span",{role:"columnheader",children:"Carrier"}),z.jsx("span",{role:"columnheader",children:"Role"}),z.jsx("span",{role:"columnheader",children:"Model"}),z.jsx("span",{role:"columnheader",children:"Effort"}),z.jsx("span",{role:"columnheader",children:"Task Force"}),z.jsx("span",{role:"columnheader",children:"Mode"})]}),n.map(s=>z.jsxs("div",{className:"bridge-carrier-row",role:"row",children:[z.jsxs("span",{role:"cell",className:"bridge-carrier-name","data-signature":ZL(s),children:[z.jsx("strong",{children:s.displayName}),z.jsx("small",{children:s.category??"unknown"})]}),z.jsx("span",{role:"cell",children:s.role??s.category??"unknown"}),z.jsx("span",{role:"cell",children:s.model||"unknown"}),z.jsx("span",{role:"cell",children:s.effort??"default"}),z.jsx("span",{role:"cell",children:s.taskForceBackendCount}),z.jsx("span",{role:"cell",children:s.subagentMode?"subagent":s.cliType||"cli"})]},s.carrierId))]})}function zS({metric:i}){return z.jsxs("article",{className:`bridge-card ${i.tone?`bridge-card--${i.tone}`:""}`,children:[z.jsx("p",{className:"bridge-card-label",children:i.label}),z.jsx("strong",{children:i.value}),z.jsx("p",{children:i.caption})]})}function VL({theater:i}){return z.jsxs("div",{className:`bridge-matrix-row ${i.active?"is-active":""}`,role:"row",children:[z.jsxs("span",{role:"cell",children:[z.jsx("span",{className:`bridge-theater-live ${i.liveJobCount>0?"is-live":""}`,"aria-hidden":"true"}),i.label]}),z.jsx("span",{role:"cell",children:i.hasWiki?"available":"unavailable"}),z.jsx("span",{role:"cell",children:i.activeAdmiralCount}),z.jsx("span",{role:"cell",children:i.terminalSessionCount}),z.jsx("span",{role:"cell",children:XL(i.lastActivityAt)})]})}function XL(i){return i?new Date(i).toLocaleString([],{month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit"}):"none"}function ZL(i){return!i.subagentMode&&i.taskForceBackendCount>=2?"taskforce":i.cliType}function QL(){const i=zb();return te.useEffect(()=>O5(),[]),te.useEffect(()=>{const n=new AbortController;return Mw(n.signal).then(Qw).catch(s=>{n.signal.aborted||dt({theaterError:s instanceof Error?s.message:String(s)})}),Hw(n.signal).then(Zw).catch(s=>{n.signal.aborted||dt({terminalSessionError:s instanceof Error?s.message:String(s)})}),()=>n.abort()},[]),te.useEffect(()=>{const n=s=>{(s.metaKey||s.ctrlKey)&&s.key==="`"&&(s.preventDefault(),nb())};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[]),z.jsxs("div",{className:"console-shell",children:[z.jsx(S5,{state:i}),z.jsxs(XC,{children:[z.jsx(Ko,{path:"/",element:z.jsx(WL,{state:i})}),z.jsx(Ko,{path:"/operations",element:z.jsx(HL,{state:i})}),z.jsx(Ko,{path:"/codex/*",element:z.jsx(cL,{state:i})}),z.jsx(Ko,{path:"*",element:z.jsx(YC,{to:"/",replace:!0})})]}),z.jsx(m5,{state:i}),z.jsx(v5,{open:i.connectionError!==null,tone:"error",title:"Console link interrupted",message:i.connectionError??void 0})]})}Vw();const A0=document.querySelector("#app");A0&&Z1.createRoot(A0).render(z.jsx(te.StrictMode,{children:z.jsx(Sw,{basename:"/console",children:z.jsx(QL,{})})}));export{wA as _,JL as a,P1 as g,bt as k,il as p};
|
|
730
|
+
`,xf?nu.classList.add("is-revealed"):xf=!0}function aL(t,n,s){return n.name==="queue"?DR(iu()):n.name==="queue-detail"?zR(iu()):t.error?_R(t.error):t.loading&&!t.currentEntry&&!t.indexMarkdown&&!t.log&&!t.currentConflict?pR():n.name==="index-md"&&t.indexMarkdown?bA(t.indexMarkdown):n.name==="log"&&t.log?GR(t.log):n.name==="conflicts"?mA(t.conflicts):n.name==="conflict-detail"&&t.currentConflict?vA(t.currentConflict):t.currentEntry&&s?s.html:dR(t.index,t.health?.cwd??null,!!t.currentWorkspaceId)}function oL(t,n,s){return n.name==="queue"||n.name==="queue-detail"?"":`
|
|
731
|
+
${yA(t.currentEntry,t.index,t.currentMatchHint)}
|
|
732
|
+
${s?WR(s.toc):""}
|
|
733
|
+
`}function y0(t){const n=t.target;if(!(n instanceof Element))return;const s=n.closest("[data-action]");if(s?.dataset.action==="toggle-nav"){document.body.classList.toggle("nav-open");return}if(s?.dataset.action==="navigate-home"){if(E0(t))return;t.preventDefault(),document.body.classList.remove("nav-open"),Is(Zb());return}if(s?.dataset.action==="set-nav-mode"){const b=s.dataset.mode;(b==="tags"||b==="entries")&&(CR(b),Ns());return}if(s?.dataset.action==="toggle-tag"){yR(s.dataset.tag??""),Ns();return}if(s?.dataset.action==="copy-code"){lL(s);return}if(s?.dataset.action==="copy-compact-context"){const b=Pc();b.currentEntry&&qc(Fb(b.currentEntry),"Copied compact context.");return}if(s?.dataset.action==="copy-provenance-context"){const b=Pc();b.currentEntry&&qc(qb(b.currentEntry),"Copied provenance context.");return}if(s?.dataset.action==="copy-related-context"){const b=Pc();b.currentEntry&&qc(Wb(b.currentEntry,b.index),"Copied related context pack.");return}if(s?.dataset.action==="toggle-why-matched"){const b=s.closest(".context-actions-grid")?.querySelector(".context-why-matched");b&&(b.hidden=!b.hidden);return}if(s?.dataset.action==="queue-approve"){if(iu().actionPending||!confirm("Approve this patch?"))return;s.setAttribute("disabled",""),XR();return}if(s?.dataset.action==="queue-reject-toggle"){const c=s.closest(".queue-actions-card")?.querySelector(".queue-reject-form");c&&(c.hidden=!c.hidden,c.hidden||c.querySelector("textarea")?.focus());return}if(s?.dataset.action==="queue-reject-cancel"){const c=s.closest(".queue-actions-card")?.querySelector(".queue-reject-form");c&&(c.hidden=!0);return}const o=n.closest("[data-toc-id]");if(o){t.preventDefault(),document.getElementById(o.dataset.tocId??"")?.scrollIntoView({behavior:"smooth",block:"start"});return}const l=n.closest("a");if(!l||E0(t))return;const y=cL(l);y&&(t.preventDefault(),document.body.classList.remove("nav-open"),Is(y))}function C0(t){const n=t.target;if(n instanceof HTMLFormElement&&n.dataset.action==="queue-reject-submit"){if(t.preventDefault(),iu().actionPending)return;const s=n.querySelector("button[type='submit']");s&&(s.disabled=!0);const o=n.querySelector("textarea[name='reason']");ZR(o?.value??"")}}async function lL(t){const s=t.closest(".code-block")?.dataset.code??"";s&&await qc(s,"Code copied.")}async function qc(t,n){try{await navigator.clipboard.writeText(t),w0(n)}catch{w0("Failed to copy to clipboard.")}}function w0(t){const n=document.querySelector("#toast");n&&(n.textContent=t,n.classList.add("visible"),window.setTimeout(()=>n.classList.remove("visible"),1400))}function E0(t){return t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.button!==0}function cL(t){const n=t.getAttribute("href")??"",s=t.dataset.entryId;if(s)return kr(decodeURIComponent(s));if(/^[a-z][a-z0-9+.-]*:/i.test(n)&&!n.startsWith(window.location.origin))return null;const o=new URL(n,window.location.origin);if(o.origin!==window.location.origin)return null;if(o.pathname==="/"||o.pathname==="/console/codex"||o.pathname==="/console/codex/")return Zb();if(o.pathname.match(/^\/w\/[^/]+(\/|$)/)||o.pathname.match(/^\/console\/codex\/w\/[^/]+(\/|$)/))return o.pathname+o.search;if(o.pathname.startsWith("/console/codex/entry/")||o.pathname.startsWith("/console/codex/raw/"))return o.pathname;if(o.pathname.startsWith("/console/codex/queue")||o.pathname.startsWith("/console/codex/conflicts")||o.pathname==="/console/codex/index"||o.pathname==="/console/codex/index-md"||o.pathname==="/console/codex/log")return o.pathname+o.search;if(o.pathname.startsWith("/entry/")||o.pathname.startsWith("/raw/"))return o.pathname;if(o.pathname.startsWith("/queue")||o.pathname.startsWith("/conflicts")||o.pathname==="/index"||o.pathname==="/index-md"||o.pathname==="/log")return o.pathname+o.search;if(!o.pathname.endsWith(".md"))return null;const l=o.pathname.split("/").pop()??"",y=decodeURIComponent(l.replace(/\.md$/,""));return y?kr(y):null}function uL({state:t}){const n=te.useRef(null),s=te.useRef(null),o=t.theaters.find(b=>b.id===t.activeTheaterId)??null,l=o?.id??null,y=!!o?.hasWiki;return te.useEffect(()=>{if(!y){s.current?.destroy(),s.current=null;return}const b=n.current;if(!b||!l||s.current)return;const c=iL(b,{initialWorkspaceId:l});return s.current=c,()=>{c.destroy(),s.current===c&&(s.current=null)}},[y]),te.useEffect(()=>{!y||!l||s.current?.navigateToWorkspace(l)},[l,y]),!t.activeTheaterId||t.theaters.length===0?z.jsxs("section",{className:"codex-empty-state",children:[z.jsx("p",{className:"codex-empty-eyebrow",children:"Codex"}),z.jsx("h1",{children:"Add a Theater"}),z.jsx("p",{children:"Use the top bar Theater control to choose a project root before opening Codex."})]}):o?.hasWiki?z.jsx("div",{className:"codex-host",ref:n}):z.jsxs("section",{className:"codex-empty-state",children:[z.jsx("p",{className:"codex-empty-eyebrow",children:"Codex unavailable"}),z.jsx("h1",{children:o?.label??"This Theater"}),z.jsx("p",{children:"This Theater does not have Fleet Wiki data mounted."})]})}function IS(t){return new Date(t).toLocaleTimeString([],{hour12:!1})}function HS(t){return t.label?.trim()||`#${t.sequence} Operation`}function hL(t,n){const s=Math.max(0,Math.round((n-t)/1e3)),o=Math.floor(s/60),l=s%60;return o===0?`${l}s`:o<60?`${o}m ${String(l).padStart(2,"0")}s`:`${Math.floor(o/60)}h ${String(o%60).padStart(2,"0")}m`}function Tf(t){return t.length<=14?t:`${t.slice(0,6)}…${t.slice(-6)}`}function dL(t){return t&&t.charAt(0).toUpperCase()+t.slice(1)}function Af(t){switch(t){case"active":return"running";case"done":return"done";case"error":return"error";case"aborted":return"aborted";default:return t}}function fL(t){switch(t){case"queued":return"queued";case"conn":return"connecting";case"stream":return"streaming";case"done":return"done";case"err":return"error";case"aborted":return"aborted";default:return t}}function Pa(t){switch(t){case"stream":case"active":case"conn":return"live";case"done":return"ok";case"err":case"error":return"bad";default:return"idle"}}function pL(t){if(t.status!=="active")return null;const n=t.trackOrder.map(l=>t.tracks[l]).filter(l=>!!l),s=n.filter(l=>l.status==="stream"||l.status==="conn"),o=s.length>0?s:n;for(let l=o.length-1;l>=0;l--){const y=o[l],b=y?_L(y):null;if(b)return b}return null}function _L(t){return x0(t.text)??x0(t.thought)??t.tools[t.tools.length-1]?.title??null}function x0(t){if(!t)return null;const n=t.split(`
|
|
734
|
+
`);for(let s=n.length-1;s>=0;s--){const o=n[s]?.trim();if(o)return o}return null}const gL=56;function mL(t,n){const s=te.useRef(null),o=te.useRef(!0),[l,y]=te.useState(!0),b=te.useCallback(u=>{o.current!==u&&(o.current=u,y(u))},[]);te.useEffect(()=>{const u=s.current;if(!u)return;const h=()=>{const v=u.scrollHeight-u.scrollTop-u.clientHeight;b(v<=gL)};return u.addEventListener("scroll",h,{passive:!0}),()=>u.removeEventListener("scroll",h)},[b]),te.useLayoutEffect(()=>{b(!0);const u=s.current;u&&(u.scrollTop=u.scrollHeight)},[t,b]),te.useLayoutEffect(()=>{const u=s.current;!u||!o.current||(u.scrollTop=u.scrollHeight)},[n]);const c=te.useCallback(()=>{const u=s.current;u&&(u.scrollTop=u.scrollHeight,u.focus({preventScroll:!0}),b(!0))},[b]);return{containerRef:s,pinned:l,jumpToLatest:c}}const T0=400,vL=["text","fallbackText","fallbackThought"],bL=te.memo(function({events:n}){return z.jsxs("ol",{className:"timeline","aria-label":"Raw event timeline",children:[n.length===0?z.jsx("li",{className:"timeline-empty",children:"No events observed."}):null,n.map((s,o)=>{const l=n[n.length-1-o];return l?z.jsx(SL,{event:l},l.id):null})]})}),SL=te.memo(function({event:n}){return z.jsxs("li",{className:"timeline-row",children:[z.jsx("time",{className:"timeline-time",children:IS(n.at)}),z.jsx("span",{className:"timeline-type",children:n.type}),z.jsx("code",{className:"timeline-payload",children:yL(n.event)})]})});function yL(t){const n={...t};delete n.type;for(const o of vL){const l=n[o];typeof l=="string"&&(n[o]=l.length>60?`${l.slice(0,60)}… (${l.length} chars)`:l)}const s=JSON.stringify(n);return s.length>T0?`${s.slice(0,T0)}…`:s}const CL=te.memo(function({track:n}){const s=Pa(n.status),o=n.status==="stream",l=n.sentTextLength>n.text.length||n.sentThoughtLength>n.thought.length,y=n.sentTextLength+n.sentThoughtLength;return z.jsxs("article",{className:`track-card track-card--${s}`,children:[z.jsxs("header",{className:"track-head",children:[z.jsx("span",{className:`status-dot status-dot--${s}`,"aria-hidden":"true"}),z.jsx("h3",{className:"track-name",children:n.displayName}),n.displayCli?z.jsx("span",{className:"track-tag",children:n.displayCli}):null,n.model?z.jsx("span",{className:"track-tag track-tag--dim",children:n.model}):null,n.effort?z.jsx("span",{className:"track-tag track-tag--dim",children:n.effort}):null,z.jsx("span",{className:`track-status track-status--${s}`,children:fL(n.status)})]}),n.subtitle?z.jsx("p",{className:"track-subtitle",children:n.subtitle}):null,n.requestPreview?z.jsx(wL,{preview:n.requestPreview}):null,n.thought?z.jsx(EL,{thought:n.thought,streaming:o&&!n.text}):null,z.jsx(xL,{track:n}),n.text?z.jsx("div",{className:"track-output","data-streaming":o||void 0,children:z.jsxs("pre",{className:"track-text",children:[n.text,o?z.jsx("span",{className:"stream-caret","aria-hidden":"true"}):null]})}):o||n.status==="conn"||n.status==="queued"?z.jsxs("p",{className:"track-waiting",children:[z.jsx("span",{className:"stream-caret","aria-hidden":"true"})," awaiting output"]}):null,l?z.jsxs("p",{className:"track-notice",children:["Output partially retained — ",y.toLocaleString()," chars emitted in total."]}):null,n.error?z.jsx("p",{className:"track-error",children:n.error}):null]})});function wL({preview:t}){return z.jsxs("p",{className:"track-request",title:t,children:[z.jsx("span",{className:"track-request-mark","aria-hidden":"true",children:"▸"}),t]})}function EL({thought:t,streaming:n}){const[s,o]=te.useState(!1);return z.jsxs("div",{className:`thought-fold ${s?"is-open":""}`,children:[z.jsxs("button",{type:"button",className:"thought-toggle",onClick:()=>o(l=>!l),"aria-expanded":s,children:[z.jsx("span",{className:"thought-chevron","aria-hidden":"true",children:s?"▾":"▸"}),"reasoning",n?z.jsx("span",{className:"stream-caret stream-caret--dim","aria-hidden":"true"}):null]}),s?z.jsx("pre",{className:"thought-text",children:t}):null]})}function xL({track:t}){return t.tools.length===0?null:z.jsx("ul",{className:"tool-rail","aria-label":"Tool calls",children:t.tools.map(n=>z.jsxs("li",{className:`tool-chip tool-chip--${TL(n.status)}`,children:[z.jsx("span",{className:"tool-chip-glyph","aria-hidden":"true",children:"⚙"}),z.jsx("span",{className:"tool-chip-title",children:n.title}),n.status?z.jsx("span",{className:"tool-chip-status",children:n.status}):null]},n.key))})}function TL(t){const n=t.toLowerCase();return n.includes("error")||n.includes("fail")?"bad":n.includes("done")||n.includes("ok")||n.includes("complete")?"ok":n.includes("run")||n.includes("progress")||n.includes("stream")?"live":"idle"}function AL({job:t,timelineOpen:n}){const{containerRef:s,pinned:o,jumpToLatest:l}=mL(t?.jobId??"none",t?.lastEventId??0);return t?z.jsxs("main",{className:"stage",children:[z.jsx(RL,{job:t}),z.jsxs("div",{className:"stage-stream",children:[z.jsx("div",{className:"stage-scroll",ref:s,tabIndex:-1,children:z.jsxs("div",{className:"stage-content",children:[t.trackOrder.length===0?z.jsxs("p",{className:"stage-waiting",children:[z.jsx("span",{className:"stream-caret","aria-hidden":"true"})," waiting for track registration"]}):t.trackOrder.map(y=>{const b=t.tracks[y];return b?z.jsx(CL,{track:b},`${t.jobId}:${y}`):null}),t.summary?z.jsx(LL,{summary:t.summary,status:t.status,error:t.error}):null]})}),o?null:z.jsx("button",{type:"button",className:"follow-button",onClick:l,children:"↓ Follow stream"})]}),z.jsxs("section",{className:`timeline-dock ${n?"is-open":""}`,children:[z.jsxs("button",{type:"button",className:"timeline-toggle",onClick:cE,"aria-expanded":n,children:[z.jsx("span",{className:"timeline-chevron","aria-hidden":"true",children:n?"▾":"▴"}),"Event timeline",z.jsx("span",{className:"timeline-count",children:t.recentEvents.length})]}),n?z.jsx(bL,{events:t.recentEvents}):null]})]}):z.jsx("main",{className:"stage",children:z.jsxs("div",{className:"stage-idle",children:[z.jsx("p",{className:"stage-idle-mark","aria-hidden":"true",children:"▵"}),z.jsx("h2",{children:"Standing by"}),z.jsx("p",{children:"Select a job from the left rail, or dispatch carriers from a Fleet session."})]})})}const RL=te.memo(function({job:n}){const s=Pa(n.status),o=n.startedAt?hL(n.startedAt,n.finishedAt??n.updatedAt):null;return z.jsxs("header",{className:"job-head",children:[z.jsxs("div",{className:"job-head-id",children:[z.jsx("span",{className:`status-dot status-dot--${s} status-dot--lg`,"aria-hidden":"true"}),z.jsxs("div",{children:[z.jsx("h2",{className:"job-title",children:n.label??Tf(n.jobId)}),z.jsxs("p",{className:"job-meta",children:[z.jsx("span",{className:`job-status job-status--${s}`,children:Af(n.status)}),n.ownerCarrierId?z.jsxs("span",{children:["· ",n.ownerCarrierId]}):null,n.kind?z.jsxs("span",{children:["· ",n.kind]}):null,o?z.jsxs("span",{children:["· ",o]}):null,n.startedAt?z.jsxs("span",{children:["· started ",IS(n.startedAt)]}):null]})]})]}),z.jsx("code",{className:"job-id",title:n.jobId,children:Tf(n.jobId)})]})});function LL({summary:t,status:n,error:s}){return z.jsxs("aside",{className:`job-summary job-summary--${Pa(n)}`,children:[z.jsx("p",{className:"job-summary-eyebrow",children:n==="error"?"Finalized with error":"Finalized"}),z.jsx("p",{className:"job-summary-text",children:t}),s?z.jsx("p",{className:"job-summary-error",children:s}):null]})}function kL({state:t}){const n=gE(t);return te.useEffect(()=>{const s=o=>{o.key==="Escape"&&wd()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[]),n?z.jsxs("div",{className:"job-overlay",role:"dialog","aria-modal":"true","aria-label":"Carrier job stream",children:[z.jsx("button",{type:"button",className:"job-overlay-scrim",onClick:wd,"aria-label":"Close job stream"}),z.jsxs("div",{className:"job-overlay-card",children:[z.jsx("button",{type:"button",className:"job-overlay-close",onClick:wd,"aria-label":"Close job stream",children:"×"}),z.jsx(AL,{job:n,timelineOpen:t.timelineOpen})]})]}):null}function ML({creating:t,error:n,hasTheaters:s,activeTheaterId:o}){const l=s?o?"No operations in this Theater":"Choose a Theater":"Add a Theater",y=s?o?"Launch an operation from the Operations sidebar.":"Theater-scoped operations and carrier activity will appear here.":"Use the top bar Theater control to add a project root.";return z.jsxs("section",{className:"operations-landing","aria-label":"Operations workspace landing",children:[z.jsx("div",{className:"operations-landing-mark","aria-hidden":"true"}),z.jsxs("div",{children:[z.jsx("p",{className:"operations-landing-eyebrow",children:"Operation"}),z.jsx("h1",{children:l}),z.jsx("p",{children:y})]}),z.jsx("p",{className:`operations-landing-status ${t?"is-live":""}`,children:t?"Launching operation":"No terminal session selected"}),n?z.jsx("p",{className:"operations-landing-error",children:n}):null]})}function DL({state:t}){const n=$f(t),s=async()=>{if(!(t.creatingTerminalSession||t.addingTheater||!t.activeTheaterId)){aE();try{oE(await Nw(t.activeTheaterId))}catch(o){lE(o instanceof Error?o.message:String(o))}}};return z.jsxs("nav",{className:"sidebar","aria-label":"Operation sessions and carrier jobs",children:[z.jsxs("div",{className:"sidebar-heading",children:[z.jsx("p",{className:"sidebar-eyebrow",children:"Operations"}),z.jsx("button",{type:"button",className:"workspace-add-button",onClick:s,disabled:t.creatingTerminalSession||t.addingTheater||!t.activeTheaterId,"aria-label":"Launch operation",children:z.jsx(IL,{})})]}),n.length>0?z.jsx("ol",{className:"session-list",children:n.map(o=>{const l=t.sessions[o];return l?z.jsx(OL,{session:l,active:t.activeTerminalSessionId===o,jobs:vE(t,l),selectedJobId:t.selectedJobId},o):null})}):null,t.terminalSessionError?z.jsx("p",{className:"sidebar-error",children:t.terminalSessionError}):null,n.length===0?z.jsxs("p",{className:"sidebar-empty",children:[t.activeTheaterId?"No operations in this Theater.":"No Theaters registered.",z.jsx("br",{}),t.activeTheaterId?"Use + to launch one here.":"Add a Theater from the top bar."]}):null]})}const OL=te.memo(function({session:n,active:s,jobs:o,selectedJobId:l}){const[y,b]=te.useState(!1),[c,u]=te.useState(""),h=te.useRef(null),v=te.useRef(!1),f=te.useRef(!1),x=o.filter(({job:w})=>!Jo(w.status)).length>0||n.status==="registered"||n.status==="live"||n.status==="terminal-only",A=HS(n),E=[...o].sort((w,R)=>Number(Jo(w.job.status))-Number(Jo(R.job.status)));te.useEffect(()=>{y&&(h.current?.focus(),h.current?.select())},[y]);const p=()=>{f.current=!1,u(A),b(!0)},S=()=>{f.current=!0,b(!1),u("")},_=async()=>{if(!v.current){v.current=!0;try{nb(await Iw(n.sessionId,c))}catch(w){hE(w instanceof Error?w.message:String(w))}finally{v.current=!1,f.current=!0,b(!1)}}},g=w=>{if(w.key==="Enter"){w.preventDefault(),_();return}w.key==="Escape"&&(w.preventDefault(),S())};return z.jsxs("li",{className:`session-item ${s?"is-active":""}`,children:[z.jsxs("div",{className:"session-row-shell",children:[y?z.jsxs("div",{className:`session-row session-row-edit ${s?"is-active":""}`,children:[z.jsx("span",{className:`tenant-beacon ${x?"is-live":""}`,"aria-hidden":"true"}),z.jsx("input",{ref:h,className:"session-rename-input",value:c,"aria-label":`${A} 이름 변경`,onChange:w=>u(w.target.value),onKeyDown:g,onBlur:()=>{if(f.current){f.current=!1;return}_()}})]}):z.jsxs("button",{type:"button",className:`session-row ${s?"is-active":""}`,onClick:()=>sE(n.sessionId),onDoubleClick:p,"aria-current":s||void 0,"aria-label":`Operation ${A}`,children:[z.jsx("span",{className:`tenant-beacon ${x?"is-live":""}`,"aria-hidden":"true"}),z.jsx("span",{className:"tenant-row-text",children:z.jsx("span",{className:"tenant-label",children:A})}),!s&&o.length>0?z.jsx("span",{className:"tenant-count",children:o.length}):null]}),z.jsx("button",{type:"button",className:"session-close",onClick:()=>{NL(n.sessionId)},"aria-label":`Terminate operation ${A}`,title:"Terminate operation",children:z.jsx(HL,{})})]}),s?z.jsx("ol",{className:"session-job-list",children:E.length>0?E.map(({job:w})=>z.jsx(BL,{job:w,active:w.jobId===l},w.jobId)):z.jsx("li",{className:"job-list-empty",children:"No carrier jobs in this session."})}):null]})}),BL=te.memo(function({job:n,active:s}){const o=Pa(n.status),l=pL(n);return z.jsx("li",{children:z.jsxs("button",{type:"button",className:`job-row ${s?"is-active":""}`,onClick:()=>dE(n.jobId),"aria-current":s||void 0,children:[z.jsx("span",{className:`status-dot status-dot--${o}`,"aria-hidden":"true"}),z.jsxs("span",{className:"job-row-text",children:[z.jsx("span",{className:"job-row-label",children:n.label??Tf(n.jobId)}),l?z.jsx("span",{className:"job-row-stream",children:l}):null,z.jsx("span",{className:"job-row-meta",children:n.ownerCarrierId?`${dL(n.ownerCarrierId)} · ${Af(n.status)}`:Af(n.status)})]})]})})});async function NL(t){try{await X0(t)}catch(n){uE(n instanceof Error?n.message:String(n));return}sb(t)}function IL(){return z.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:z.jsx("path",{d:"M8 3.4v9.2M3.4 8h9.2",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})}function HL(){return z.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:z.jsx("path",{d:"M4.6 4.6 11.4 11.4M11.4 4.6 4.6 11.4",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})}function zL({state:t}){const n=t.activeTerminalSessionId&&$f(t).includes(t.activeTerminalSessionId)?t.activeTerminalSessionId:null;return z.jsxs("div",{className:"console-body",children:[z.jsx(DL,{state:t}),z.jsx("main",{className:"operations-terminal-stage",children:n?z.jsxs(z.Fragment,{children:[z.jsx(Ub,{sessionId:n,onExit:()=>sb(n)},n),z.jsx(kL,{state:t})]}):z.jsx(ML,{creating:t.creatingTerminalSession,error:t.terminalSessionError,hasTheaters:t.theaters.length>0,activeTheaterId:t.activeTheaterId})})]})}function $L(t){return{activeTheater:jL(t),readiness:PL(t,t.activeTheaterId),theaters:UL(t),connection:t.connection,connectionError:t.connectionError}}function UL(t){return t.theaters.map(n=>{const s=ap(t,n.id),o=op(t,n.id),l=lp(t,o);return{id:n.id,label:n.label,hasWiki:n.hasWiki,activeAdmiralCount:n.activeAdmiralCount,terminalSessionCount:s.length,liveJobCount:l.filter(y=>Pa(y.status)==="live").length,lastActivityAt:zS([Date.parse(n.lastOpenedAt),...s.map(y=>y.createdAt),...o.map(y=>y.createdAt),...l.map(y=>y.updatedAt)]),active:n.id===t.activeTheaterId}})}function PL(t,n){const s=n?ap(t,n):[],o=n?op(t,n):[],l=lp(t,o),y=l.filter(h=>Pa(h.status)==="live").length,b=l.filter(h=>Jo(h.status)&&h.status==="done").length,c=l.filter(h=>Jo(h.status)&&(h.status==="error"||h.status==="aborted")).length,u=t.activeTerminalSessionId?t.sessions[t.activeTerminalSessionId]:void 0;return{activeSessionLabel:u&&n&&u.theaterId===n?HS(u):"No active session",terminalSessionCount:s.length,liveJobCount:y,completedJobCount:b,failedJobCount:c,emptyState:FL(t,s,l)}}function jL(t){const n=t.theaters.find(y=>y.id===t.activeTheaterId);if(!n)return null;const s=ap(t,n.id),o=op(t,n.id),l=lp(t,o);return{id:n.id,label:n.label,hasWiki:n.hasWiki,activeAdmiralCount:n.activeAdmiralCount,terminalSessionCount:s.length,registeredTenantCount:o.filter(y=>y.status!=="deregistered").length,deregisteredTenantCount:o.filter(y=>y.status==="deregistered").length,lastActivityAt:zS([Date.parse(n.lastOpenedAt),...s.map(y=>y.createdAt),...o.map(y=>y.createdAt),...l.map(y=>y.updatedAt)])}}function ap(t,n){return t.sessionOrder.map(s=>t.sessions[s]).filter(s=>s!==void 0&&s.theaterId===n)}function op(t,n){return t.tenants.filter(s=>s.theaterId===n)}function lp(t,n){const s=[];for(const o of n){const l=t.tenantJobs[o.tenantId];if(l)for(const y of l.jobOrder){const b=l.jobs[y];b&&s.push(b)}}return s}function FL(t,n,s){return t.theaters.length===0?"no-theaters":n.length===0?"no-sessions":s.length===0?"no-jobs":null}function zS(t){const n=t.filter(s=>Number.isFinite(s));return n.length===0?null:Math.max(...n)}async function qL(t,n){const[s,o,l,y]=await Promise.all([Oc(t,"/index",n),Oc(t,"/queue?status=all",n),Oc(t,"/conflicts",n),Oc(t,"/log?limit=3",n)]);return{entryCount:Array.isArray(s)?s.length:0,pendingQueueCount:typeof o.pendingCount=="number"?o.pendingCount:0,archivedQueueCount:typeof o.archivedCount=="number"?o.archivedCount:0,openConflictCount:Array.isArray(l)?l.length:0,logEntryCount:typeof y.totalEntries=="number"?y.totalEntries:Array.isArray(y.entries)?y.entries.length:0,latestLogStatus:Array.isArray(y.entries)&&y.entries.length>0?"available":"empty"}}async function Oc(t,n,s){const o=n.startsWith("/")?n:`/${n}`,l=await fetch(`/console/codex/w/${encodeURIComponent(t)}/api${o}`,{signal:s});if(!l.ok)throw new cn(l.status,l.statusText||`HTTP ${l.status}`);return l.json()}const Bc={loading:!1,value:null,error:null},WL=15e3;function GL({state:t}){const n=$L(t),s=n.activeTheater,[o,l]=te.useState(Bc),[y,b]=te.useState(Bc),[c,u]=te.useState(Bc);return te.useEffect(()=>{if(!s?.hasWiki){l(Bc);return}const h=new AbortController;return l({loading:!0,value:null,error:null}),qL(s.id,h.signal).then(v=>l({loading:!1,value:v,error:null})).catch(v=>{h.signal.aborted||l({loading:!1,value:null,error:v instanceof Error?v.message:String(v)})}),()=>h.abort()},[s?.hasWiki,s?.id]),te.useEffect(()=>{const h=new AbortController;return b(v=>({loading:!0,value:v.value,error:null})),V0(s?.id??null,h.signal).then(v=>b({loading:!1,value:v,error:null})).catch(v=>{h.signal.aborted||b({loading:!1,value:null,error:v instanceof Error?v.message:String(v)})}),()=>h.abort()},[s?.id]),te.useEffect(()=>{const h=new AbortController,v=()=>{u(C=>({loading:!0,value:C.value,error:null})),Ow(h.signal).then(C=>u({loading:!1,value:C,error:null})).catch(C=>{h.signal.aborted||u(x=>({loading:!1,value:x.value,error:C instanceof Error?C.message:String(C)}))})};v();const f=window.setInterval(v,WL);return()=>{window.clearInterval(f),h.abort()}},[]),z.jsxs("main",{className:"welcome-page",children:[z.jsxs("section",{className:"bridge-matrix","aria-labelledby":"bridge-matrix-title",children:[z.jsxs("div",{className:"bridge-section-heading",children:[z.jsx("p",{className:"bridge-kicker",children:"Theater Capability Matrix"}),z.jsx("h3",{id:"bridge-matrix-title",children:"Registered Theaters"})]}),z.jsxs("div",{className:"bridge-matrix-table",role:"table","aria-label":"Theater capability matrix",children:[z.jsxs("div",{className:"bridge-matrix-row bridge-matrix-head",role:"row",children:[z.jsx("span",{role:"columnheader",children:"Theater"}),z.jsx("span",{role:"columnheader",children:"Codex"}),z.jsx("span",{role:"columnheader",children:"Active"}),z.jsx("span",{role:"columnheader",children:"Terminals"}),z.jsx("span",{role:"columnheader",children:"Updated"})]}),n.theaters.length>0?n.theaters.map(h=>z.jsx(XL,{theater:h},h.id)):z.jsx("p",{className:"bridge-matrix-empty",children:"No Theaters registered."})]})]}),z.jsxs("section",{className:"bridge-carriers","aria-labelledby":"bridge-carriers-title",children:[z.jsxs("div",{className:"bridge-section-heading",children:[z.jsx("p",{className:"bridge-kicker",children:"Carrier Readiness Matrix"}),z.jsx("h3",{id:"bridge-carriers-title",children:"Carrier roster"})]}),z.jsx(VL,{carriers:c})]}),z.jsxs("section",{className:"bridge-knowledge","aria-labelledby":"bridge-knowledge-title",children:[z.jsxs("div",{className:"bridge-section-heading",children:[z.jsx("p",{className:"bridge-kicker",children:"Knowledge Readiness Panel"}),z.jsx("h3",{id:"bridge-knowledge-title",children:"Codex readiness"})]}),z.jsx(KL,{activeTheater:s,knowledge:o})]}),z.jsxs("section",{className:"bridge-health","aria-labelledby":"bridge-health-title",children:[z.jsxs("div",{className:"bridge-section-heading",children:[z.jsx("p",{className:"bridge-kicker",children:"System Information"}),z.jsx("h3",{id:"bridge-health-title",children:"Runtime status"})]}),z.jsx(YL,{health:y})]})]})}function KL({activeTheater:t,knowledge:n}){if(!t)return z.jsx("div",{className:"bridge-empty",children:z.jsx("p",{children:"Add a Theater to inspect Codex readiness."})});if(!t.hasWiki)return z.jsx("div",{className:"bridge-empty",children:z.jsx("p",{children:"Codex unavailable for this Theater."})});if(n.error)return z.jsx("div",{className:"bridge-empty bridge-empty--warn",children:z.jsx("p",{children:"Codex summary degraded."})});const s=n.value,o=[{label:"Entries",value:s?String(s.entryCount):"…",caption:"Indexed knowledge entries"},{label:"Pending",value:s?String(s.pendingQueueCount):"…",caption:"Drydock queue"},{label:"Archived",value:s?String(s.archivedQueueCount):"…",caption:"Archived decisions"},{label:"Conflicts",value:s?String(s.openConflictCount):"…",caption:"Open conflict files",tone:s&&s.openConflictCount>0?"warn":void 0},{label:"Log",value:s?s.latestLogStatus:n.loading?"loading":"empty",caption:s?`${s.logEntryCount} total entries`:"Latest log tail",tone:s?.latestLogStatus==="available"?"good":void 0}];return z.jsx("div",{className:"bridge-knowledge-grid",children:o.map(l=>z.jsx($S,{metric:l},l.label))})}function YL({health:t}){const n=t.value,s=[{label:"Version",value:n?.version??"…",caption:"Console runtime"},{label:"Channel",value:n?.channel??"…",caption:"Release channel"},{label:"Port",value:n?String(n.port):"…",caption:"Loopback listener"},{label:"Codex",value:n?.wikiServerStatus??"unknown",caption:"Active Theater status",tone:n?.wikiServerStatus==="available"?"good":n?.wikiServerStatus==="unavailable"?"bad":void 0},{label:"Observer",value:n?`${n.workspaces}/${n.jobs}`:t.loading?"loading":"unknown",caption:"Workspaces / jobs"}];return z.jsxs(z.Fragment,{children:[z.jsx("div",{className:"bridge-health-strip",children:s.map(o=>z.jsx($S,{metric:o},o.label))}),t.error?z.jsx("p",{className:"bridge-health-error",children:"System health unavailable."}):null]})}function VL({carriers:t}){if(t.error)return z.jsx("div",{className:"bridge-empty bridge-empty--warn",children:z.jsx("p",{children:"Carrier readiness degraded."})});const n=t.value??[];return n.length===0?z.jsx("div",{className:"bridge-empty",children:z.jsx("p",{children:t.loading?"Loading carrier readiness.":"No carrier readiness entries available."})}):z.jsxs("div",{className:"bridge-carrier-table",role:"table","aria-label":"Carrier readiness matrix",children:[z.jsxs("div",{className:"bridge-carrier-row bridge-carrier-head",role:"row",children:[z.jsx("span",{role:"columnheader",children:"Carrier"}),z.jsx("span",{role:"columnheader",children:"Role"}),z.jsx("span",{role:"columnheader",children:"Model"}),z.jsx("span",{role:"columnheader",children:"Effort"}),z.jsx("span",{role:"columnheader",children:"Task Force"}),z.jsx("span",{role:"columnheader",children:"Mode"})]}),n.map(s=>z.jsxs("div",{className:"bridge-carrier-row",role:"row",children:[z.jsxs("span",{role:"cell",className:"bridge-carrier-name","data-signature":QL(s),children:[z.jsx("strong",{children:s.displayName}),z.jsx("small",{children:s.category??"unknown"})]}),z.jsx("span",{role:"cell",children:s.role??s.category??"unknown"}),z.jsx("span",{role:"cell",children:s.model||"unknown"}),z.jsx("span",{role:"cell",children:s.effort??"default"}),z.jsx("span",{role:"cell",children:s.taskForceBackendCount}),z.jsx("span",{role:"cell",children:s.subagentMode?"subagent":s.cliType||"cli"})]},s.carrierId))]})}function $S({metric:t}){return z.jsxs("article",{className:`bridge-card ${t.tone?`bridge-card--${t.tone}`:""}`,children:[z.jsx("p",{className:"bridge-card-label",children:t.label}),z.jsx("strong",{children:t.value}),z.jsx("p",{children:t.caption})]})}function XL({theater:t}){return z.jsxs("div",{className:`bridge-matrix-row ${t.active?"is-active":""}`,role:"row",children:[z.jsxs("span",{role:"cell",children:[z.jsx("span",{className:`bridge-theater-live ${t.liveJobCount>0?"is-live":""}`,"aria-hidden":"true"}),t.label]}),z.jsx("span",{role:"cell",children:t.hasWiki?"available":"unavailable"}),z.jsx("span",{role:"cell",children:t.activeAdmiralCount}),z.jsx("span",{role:"cell",children:t.terminalSessionCount}),z.jsx("span",{role:"cell",children:ZL(t.lastActivityAt)})]})}function ZL(t){return t?new Date(t).toLocaleString([],{month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit"}):"none"}function QL(t){return!t.subagentMode&&t.taskForceBackendCount>=2?"taskforce":t.cliType}const JL=6e3;function ek(){const t=$b();return te.useEffect(()=>B5(),[]),te.useEffect(()=>{const n=new AbortController;Dw(n.signal).then(Jw).catch(l=>{n.signal.aborted||ut({theaterError:l instanceof Error?l.message:String(l)})}),Hw(n.signal).then(Qw).catch(l=>{n.signal.aborted||ut({terminalSessionError:l instanceof Error?l.message:String(l)})});const s=()=>{V0(t.activeTheaterId,n.signal).then(Zw).catch(()=>{})};s();const o=window.setTimeout(s,JL);return()=>{window.clearTimeout(o),n.abort()}},[]),te.useEffect(()=>{const n=s=>{(s.metaKey||s.ctrlKey)&&s.key==="`"&&(s.preventDefault(),rb())};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[]),z.jsxs("div",{className:"console-shell",children:[z.jsx(y5,{state:t}),z.jsxs(ZC,{children:[z.jsx(Ko,{path:"/",element:z.jsx(GL,{state:t})}),z.jsx(Ko,{path:"/operations",element:z.jsx(zL,{state:t})}),z.jsx(Ko,{path:"/codex/*",element:z.jsx(uL,{state:t})}),z.jsx(Ko,{path:"*",element:z.jsx(VC,{to:"/",replace:!0})})]}),z.jsx(v5,{state:t}),z.jsx(b5,{open:t.connectionError!==null,tone:"error",title:"Console link interrupted",message:t.connectionError??void 0})]})}Vw();const A0=document.querySelector("#app");A0&&Q1.createRoot(A0).render(z.jsx(te.StrictMode,{children:z.jsx(yw,{basename:"/console",children:z.jsx(ek,{})})}));export{EA as _,tk as a,j1 as g,bt as k,il as p};
|